Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/blocksy-companion-pro/static/bundle/dashboard.js

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + !function(){var e={151: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},206:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
2 + /*!
3 + * Determine if an object is a Buffer
4 + *
5 + * @author Feross Aboukhadijeh <https://feross.org>
6 + * @license MIT
7 + */
8 + 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)}},213:function(e,t,n){var o,r,a;r=[],void 0===(a="function"==typeof(o=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 o(e,t,n){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){s(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function 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.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=c.saveAs||("object"!=typeof window||window!==c?function(){}:"download"in HTMLAnchorElement.prototype&&!l?function(e,t,n){var l=c.URL||c.webkitURL,s=document.createElement("a");t=t||e.name||"download",s.download=t,s.rel="noopener","string"==typeof e?(s.href=e,s.origin===location.origin?a(s):r(s.href)?o(e,t,n):a(s,s.target="_blank")):(s.href=l.createObjectURL(e),setTimeout(function(){l.revokeObjectURL(s.href)},4e4),setTimeout(function(){a(s)},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(r(e))o(e,n,c);else{var l=document.createElement("a");l.href=e,l.target="_blank",setTimeout(function(){a(l)})}}:function(e,t,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return o(e,t,n);var a="application/octet-stream"===e.type,s=/constructor/i.test(c.HTMLElement)||c.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||a&&s||l)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=i?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},u.readAsDataURL(e)}else{var m=c.URL||c.webkitURL,d=m.createObjectURL(e);r?r.location=d:location.href=d,r=null,setTimeout(function(){m.revokeObjectURL(d)},4e4)}});c.saveAs=s.saveAs=s,e.exports=s})?o.apply(t,r):o)||(e.exports=a)},503:function(e,t,n){var o,r,a,c,l;o=n(939),r=n(151).utf8,a=n(206),c=n(151).bin,(l=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?c.stringToBytes(e):r.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=o.bytesToWords(e),s=8*e.length,i=1732584193,u=-271733879,m=-1732584194,d=271733878,p=0;p<n.length;p++)n[p]=16711935&(n[p]<<8|n[p]>>>24)|4278255360&(n[p]<<24|n[p]>>>8);n[s>>>5]|=128<<s%32,n[14+(s+64>>>9<<4)]=s;var f=l._ff,h=l._gg,g=l._hh,b=l._ii;for(p=0;p<n.length;p+=16){var y=i,v=u,_=m,E=d;i=f(i,u,m,d,n[p+0],7,-680876936),d=f(d,i,u,m,n[p+1],12,-389564586),m=f(m,d,i,u,n[p+2],17,606105819),u=f(u,m,d,i,n[p+3],22,-1044525330),i=f(i,u,m,d,n[p+4],7,-176418897),d=f(d,i,u,m,n[p+5],12,1200080426),m=f(m,d,i,u,n[p+6],17,-1473231341),u=f(u,m,d,i,n[p+7],22,-45705983),i=f(i,u,m,d,n[p+8],7,1770035416),d=f(d,i,u,m,n[p+9],12,-1958414417),m=f(m,d,i,u,n[p+10],17,-42063),u=f(u,m,d,i,n[p+11],22,-1990404162),i=f(i,u,m,d,n[p+12],7,1804603682),d=f(d,i,u,m,n[p+13],12,-40341101),m=f(m,d,i,u,n[p+14],17,-1502002290),i=h(i,u=f(u,m,d,i,n[p+15],22,1236535329),m,d,n[p+1],5,-165796510),d=h(d,i,u,m,n[p+6],9,-1069501632),m=h(m,d,i,u,n[p+11],14,643717713),u=h(u,m,d,i,n[p+0],20,-373897302),i=h(i,u,m,d,n[p+5],5,-701558691),d=h(d,i,u,m,n[p+10],9,38016083),m=h(m,d,i,u,n[p+15],14,-660478335),u=h(u,m,d,i,n[p+4],20,-405537848),i=h(i,u,m,d,n[p+9],5,568446438),d=h(d,i,u,m,n[p+14],9,-1019803690),m=h(m,d,i,u,n[p+3],14,-187363961),u=h(u,m,d,i,n[p+8],20,1163531501),i=h(i,u,m,d,n[p+13],5,-1444681467),d=h(d,i,u,m,n[p+2],9,-51403784),m=h(m,d,i,u,n[p+7],14,1735328473),i=g(i,u=h(u,m,d,i,n[p+12],20,-1926607734),m,d,n[p+5],4,-378558),d=g(d,i,u,m,n[p+8],11,-2022574463),m=g(m,d,i,u,n[p+11],16,1839030562),u=g(u,m,d,i,n[p+14],23,-35309556),i=g(i,u,m,d,n[p+1],4,-1530992060),d=g(d,i,u,m,n[p+4],11,1272893353),m=g(m,d,i,u,n[p+7],16,-155497632),u=g(u,m,d,i,n[p+10],23,-1094730640),i=g(i,u,m,d,n[p+13],4,681279174),d=g(d,i,u,m,n[p+0],11,-358537222),m=g(m,d,i,u,n[p+3],16,-722521979),u=g(u,m,d,i,n[p+6],23,76029189),i=g(i,u,m,d,n[p+9],4,-640364487),d=g(d,i,u,m,n[p+12],11,-421815835),m=g(m,d,i,u,n[p+15],16,530742520),i=b(i,u=g(u,m,d,i,n[p+2],23,-995338651),m,d,n[p+0],6,-198630844),d=b(d,i,u,m,n[p+7],10,1126891415),m=b(m,d,i,u,n[p+14],15,-1416354905),u=b(u,m,d,i,n[p+5],21,-57434055),i=b(i,u,m,d,n[p+12],6,1700485571),d=b(d,i,u,m,n[p+3],10,-1894986606),m=b(m,d,i,u,n[p+10],15,-1051523),u=b(u,m,d,i,n[p+1],21,-2054922799),i=b(i,u,m,d,n[p+8],6,1873313359),d=b(d,i,u,m,n[p+15],10,-30611744),m=b(m,d,i,u,n[p+6],15,-1560198380),u=b(u,m,d,i,n[p+13],21,1309151649),i=b(i,u,m,d,n[p+4],6,-145523070),d=b(d,i,u,m,n[p+11],10,-1120210379),m=b(m,d,i,u,n[p+2],15,718787259),u=b(u,m,d,i,n[p+9],21,-343485551),i=i+y>>>0,u=u+v>>>0,m=m+_>>>0,d=d+E>>>0}return o.endian([i,u,m,d])})._ff=function(e,t,n,o,r,a,c){var l=e+(t&n|~t&o)+(r>>>0)+c;return(l<<a|l>>>32-a)+t},l._gg=function(e,t,n,o,r,a,c){var l=e+(t&o|n&~o)+(r>>>0)+c;return(l<<a|l>>>32-a)+t},l._hh=function(e,t,n,o,r,a,c){var l=e+(t^n^o)+(r>>>0)+c;return(l<<a|l>>>32-a)+t},l._ii=function(e,t,n,o,r,a,c){var l=e+(n^(t|~o))+(r>>>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=o.wordsToBytes(l(e,t));return t&&t.asBytes?n:t&&t.asString?c.bytesToString(n):o.bytesToHex(n)}},939: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,o=0;n<e.length;n++,o+=8)t[o>>>5]|=e[n]<<24-o%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=[],o=0;o<e.length;o+=3)for(var r=e[o]<<16|e[o+1]<<8|e[o+2],a=0;a<4;a++)8*o+6*a<=8*e.length?n.push(t.charAt(r>>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],o=0,r=0;o<e.length;r=++o%4)0!=r&&n.push((t.indexOf(e.charAt(o-1))&Math.pow(2,-2*r+8)-1)<<2*r|t.indexOf(e.charAt(o))>>>6-2*r);return n}},e.exports=n},942:function(e,t){var n;
9 + /*!
10 + Copyright (c) 2018 Jed Watson.
11 + Licensed under the MIT License (MIT), see
12 + http://jedwatson.github.io/classnames
13 + */!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=c(e,a(n)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=c(t,n));return t}function c(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o].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 o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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 o=t[Symbol.toPrimitive];if(void 0!==o){var r=o.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}function o(e,n,o){return(n=t(n))in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}var r=window.wp.element,a=window.ctEvents,c=n.n(a),l=window.wp.i18n,s=window.blocksyOptions;const i=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(503),d=n.n(m);function p(e){if(Array.isArray(e))return`[${e.map(function(e){return p(e)}).join(",")}]`;if("object"==typeof e&&null!==e){let t="";const n=Object.keys(e).sort();t+=`{${JSON.stringify(n)}`;for(let o=0;o<n.length;o++)t+=`${p(e[n[o]])},`;return`${t}}`}return`${JSON.stringify(e)}`}const f=function(e){return d()(p(e))},h=["fetcherName"];function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const y=0,v=1,_=2;let E={cacheKey:{state:y,response:null,payoad:{}}},w={};const k=new class{parseOptions(e){const{fetcherName:t=null}=e,n=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,h);return{args:{fetcherName:t},inputFetchOptions:n}}fetch(e,t,n){const{args:o}=this.parseOptions(n),r=f(b(b({},t),{},{url:e}));if(E[r]||(E[r]={state:y,response:null,payload:{waitingForResponse:[]}},o.fetcherName&&w[o.fetcherName]&&(w[o.fetcherName].forEach(function(e){e.abort()}),w[o.fetcherName]=[])),E[r].state===_){const e=u();return e.resolve(E[r].response.clone()),e.promise}if(E[r].state===v)return this.fetchLoadingState(r,e,t,n);if(E[r].state===y)return this.fetchEmptyState(r,e,t,n);throw new Error("Invalid state",{cacheEntry:E[r]})}fetchLoadingState(e,t,n,o){const r=u();return E[e].payload.waitingForResponse.push(r),r.promise}fetchEmptyState(e,t,n,o){const{args:r,inputFetchOptions:a}=this.parseOptions(o);E[e].state=v;let c=new AbortController;r.fetcherName&&(w[r.fetcherName]||(w[r.fetcherName]=[]),w[r.fetcherName].push(c));const l=u(),s=b({method:"POST",headers:{"Content-Type":"application/json"},signal:c.signal},a);return"POST"===s.method&&(s.body=JSON.stringify(n)),fetch(t,s).then(function(t){E[e].response=t.clone(),[l,...E[e].payload.waitingForResponse].forEach(function(t){t.resolve(E[e].response.clone())}),E[e].payload={waitingForResponse:[]},E[e].state=_,r.fetcherName&&(w[r.fetcherName]=[])}).catch(function(t){[l,...E[e].payload.waitingForResponse].forEach(function(t){t.reject(E[e].response)}),E[e].payload={waitingForResponse:[]},E[e].state=y}),l.promise}};var O=function(e,t,n={}){return k.fetch(e,t,n)};const x=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),O(e.toString(),{},{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}})};function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}let S=null,P=!1;var z=function(){const[e,t]=(0,r.useState)(!S),[n,o]=(0,r.useState)(S||[]),[a,l]=(0,r.useState)(P);let[{controller:s},u]=(0,r.useState)({controller:null});const m=async function(e={}){let{verbose:n,extension:r,extAction:a}=j({verbose:!1,extension:null,extAction:null},e);n&&t(!0),s&&s.abort();try{let e=await x();e.status&&511===e.status&&(P=!0,l(!0))}catch(c){}"AbortController"in window&&(s=new AbortController,u({controller:s}));const c=await fetch(`${wp.ajax.settings.url}?action=blocksy_extensions_status&nonce=${ctDashboardLocalizations.dashboard_actions_nonce}`,j({method:"POST",signal:s.signal},r&&a?{body:JSON.stringify({extension:r,extAction:a})}:{}));if(200!==c.status)return;const{success:m,data:d}=await c.json();return m?(null!=a&&a.require_refresh&&i(),o(d),S=d,t(!1),r?d[r]:d):void 0};return(0,r.useEffect)(function(){S||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);S=t,o(e)}}};var M=function(){return(0,r.createElement)("div",{class:"ct-demo-notification"},(0,r.createElement)("b",null,"Yikes! Something went wrong"),(0,r.createElement)("p",null,"Unfortunately something went wrong during initialization, please ",(0,r.createElement)("a",{href:"https://creativethemes.com/blocksy/support/",target:"_blank"},"contact us from here")," and we will assist you."))};var D=function({navigate:e}){const{forceEmptyExts:t,exts_status:n}=z();return(0,r.useEffect)(function(){t||Object.keys(n).length>0&&e(`/extensions/${Object.keys(n)[0]}`)},[n,t]),t?(0,r.createElement)(M,null):(0,r.createElement)("div",{className:"ct-extensions-container"},(0,r.createElement)(s.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,r.createElement)(s.animated.p,{style:e,className:"ct-loading-text"},(0,r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 100 100"},(0,r.createElement)("g",{transform:"translate(50,50)"},(0,r.createElement)("g",{transform:"scale(1)"},(0,r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"currentColor"}),(0,r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))),(0,l.__)("Loading Extensions Status...","blocksy-companion")):null}))},N=n(942),L=n.n(N);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function T(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){o(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 o=(0,r.useMemo)(function(){return Object.values(n).map(function(e,t){return T(T({},e),{},{name:Object.keys(n)[t]})}).find(function({config:e}){return e.pro})},[n]),a=(0,r.useMemo)(function(){return Object.values(n).map(function(e,t){return T(T({},e),{},{name:Object.keys(n)[t]})}).filter(function({config:e}){return!e.pro})},[n]),c=(0,r.useMemo)(function(){return Object.values(n).map(function(e,t){return T(T({},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,r.createElement)("div",{className:"ct-extensions-menu"},[{label:(0,l.__)("Free Extensions","blocksy-companion"),exts:a,order:[]},...o?[{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:o,order:a}){const c=[...a.map(function(e){return o.find(function(t){return t.name===e})}),...o.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,r.createElement)(r.Fragment,{key:n},(0,r.createElement)("h4",null,n),(0,r.createElement)("ul",null,c.map(function({name:n,config:o,status:a,__object:c}){var s;let i=!!c;return!1===(null==o||null===(s=o.requirement)||void 0===s?void 0:s.check)&&(i=!1),(0,r.createElement)("li",{key:n,className:L()({selected:t&&t.name===n,active:i}),onClick:function(){e(`/extensions/${n}`)}},o.name,(0,r.createElement)("span",{"data-tooltip-reveal":"top"},(0,r.createElement)("i",{className:"ct-tooltip"},(0,l.__)("Active","blocksy-companion"))))})))}))};const A=(window.ctDashboardLocalizations||{}).DashboardContext;(A||{}).Provider,(A||{}).Consumer;var V=A;(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 H=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:o={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,i]=(0,r.useState)(!1);return{showNotice:function(e){i(e||!0)},content:(0,r.createElement)(s.Overlay,{items:c,className:"ct-onboarding-modal",onDismiss:function(){return i(!1)},render:function(){return(0,r.createElement)("div",{className:"ct-modal-content"},(0,r.createElement)("svg",{width:"55",height:"55",viewBox:"0 0 40.5 48.3"},(0,r.createElement)("path",{fill:"#2d82c8",d:"M33.4 29.4l7.1 12.3-7.4.6-4 6-7.3-12.9"}),(0,r.createElement)("path",{d:"M33.5 29.6L26 42.7l-4.2-7.3 11.6-6 .1.2zM0 41.7l7.5.6 3.9 6 7.2-12.4-11-7.3L0 41.7z",fill:"#2271b1"}),(0,r.createElement)("path",{d:"M39.5 18.7c0 1.6-2.4 2.8-2.7 4.3-.4 1.5 1 3.8.2 5.1-.8 1.3-3.4 1.2-4.5 2.3-1.1 1.1-1 3.7-2.3 4.5-1.3.8-3.6-.6-5.1-.2-1.5.4-2.7 2.7-4.3 2.7S18 35 16.5 34.7c-1.5-.4-3.8 1-5.1.2s-1.2-3.4-2.3-4.5-3.7-1-4.5-2.3.6-3.6.2-5.1-2.7-2.7-2.7-4.3 2.4-2.8 2.7-4.3c.4-1.5-1-3.8-.2-5.1C5.4 8 8.1 8.1 9.1 7c1.1-1.1 1-3.7 2.3-4.5s3.6.6 5.1.2C18 2.4 19.2 0 20.8 0c1.6 0 2.8 2.4 4.3 2.7 1.5.4 3.8-1 5.1-.2 1.3.8 1.2 3.4 2.3 4.5 1.1 1.1 3.7 1 4.5 2.3s-.6 3.6-.2 5.1c.3 1.5 2.7 2.7 2.7 4.3z",fill:"#599fd9"}),(0,r.createElement)("path",{d:"M23.6 7c-6.4-1.5-12.9 2.5-14.4 8.9-.7 3.1-.2 6.3 1.5 9.1 1.7 2.7 4.3 4.6 7.4 5.4.9.2 1.9.3 2.8.3 2.2 0 4.4-.6 6.3-1.8 2.7-1.7 4.6-4.3 5.4-7.5C34 15 30 8.5 23.6 7zm7 14c-.6 2.6-2.2 4.8-4.5 6.2-2.3 1.4-5 1.8-7.6 1.2-2.6-.6-4.8-2.2-6.2-4.5-1.4-2.3-1.8-5-1.2-7.6.6-2.6 2.2-4.8 4.5-6.2 1.6-1 3.4-1.5 5.2-1.5.8 0 1.5.1 2.3.3 5.4 1.3 8.7 6.7 7.5 12.1zm-8.2-4.5l3.7.5-2.7 2.7.7 3.7-3.4-1.8-3.3 1.8.6-3.7-2.7-2.7 3.8-.5 1.6-3.4 1.7 3.4z",fill:"#fff"})),"personal"===t&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("h2",{className:"ct-modal-title"},n.title),(0,r.createElement)("p",null,n.description)),"professional"===t&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",null,"Required plan"),(0,r.createElement)("h2",{className:"ct-modal-title"},(0,l.__)("Business or Agency","blocksy-companion")),(0,r.createElement)("p",null,o.description)),"agency"===t&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",null,"Required plan"),(0,r.createElement)("h2",{className:"ct-modal-title"},(0,l.__)("Agency","blocksy-companion")),(0,r.createElement)("p",null,a.description)),(0,r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,r.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,r.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 $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var I=function(e,t={}){t=G({strategy:"pro-ext",modalTitle:(0,l.__)("This is a Pro extension","blocksy-companion")},t);const[n,o]=(0,r.useState)(!1),a=ctDashboardLocalizations.plugin_data.is_pro,{history:c}=(0,r.useContext)(V),s=!a&&e.config.pro,i=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:d}=H(G({currentPlan:i,requiredPlan:u},t));return{isPro:a,isProInFree:!a&&e.config.pro||e.config.plans&&e.config.plans.length&&!e.config.plans.includes(i),showNotice:d,content:"pro-ext"===t.strategy&&s||"pro"===t.strategy&&!a||e.config.plans&&e.config.plans.length&&!e.config.plans.includes(i)?m:null}};var R=function(e,t=function(){}){const[n,o]=(0,r.useState)(!1),{isProInFree:a,showNotice:c,content:l}=I(e);return[n,async function(n=function(){},r=!0){if(a)return r&&e.config.features?void n():void c();if(n(),r){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),o(!0);try{await fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:n}),e.config.require_refresh&&i(),t()}catch(e){}o(!1)}},l]},q=window.wp.hooks;function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}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){o(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 Z=function({navigate:e,currentExtension:t,onExtsSync:n,setExtsStatus:o}){const[a,c]=(0,r.useState)(!1),[s,i,u]=R(t);let m={content:null,showExtension:!0,activationStrategy:"default"};const d=t?(0,q.applyFilters)("blocksy.extensions.current_extension_content",m,{extension:t,onExtsSync:n,setExtsStatus:o,navigate:e}):m;let p=!!t&&t.__object;"from-custom-content"===d.activationStrategy&&(p=a);const f=[...t&&t.config.documentation&&!ctDashboardLocalizations.plugin_data.hide_docs_section?[(0,r.createElement)("a",{target:"_blank",href:t.config.documentation},(0,r.createElement)("svg",{width:"15px",height:"15px",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.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,r.createElement)("a",{target:"_blank",href:t.config.video},(0,r.createElement)("svg",{width:"15px",height:"15px",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.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&&p?[(0,r.createElement)("a",{href:t.config.customize,target:"_blank",className:"ct-button"},(0,r.createElement)("svg",{width:"15px",height:"15px",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.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,r.useEffect)(function(){t&&d.showExtension||e("/extensions")},[]),t?(0,r.createElement)("div",{className:"ct-extension-container"},(0,r.createElement)("div",{className:"ct-extension-info"},(0,r.createElement)("h4",null,(0,r.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,r.createElement)("div",{className:L()("ct-option-switch",{"ct-active":p}),onClick:function(){"from-custom-content"!==d.activationStrategy?i(function(){o(function(e){return U(U({},e),{},{[t.name]:U(U({},e[t.name]),{},{__object:e[t.name].__object?null:{}})})})}):c(!a)}},(0,r.createElement)("span",null))),t&&t.config.description&&(0,r.createElement)("p",null,t.config.description),f.length>0&&(0,r.createElement)("div",{className:"ct-extension-actions"},f.map(function(e,t){return(0,r.createElement)(r.Fragment,{key:t},e)}))),p&&t.config.features&&(!t.config.requirement||t.config.requirement&&t.config.requirement.check)&&(0,r.createElement)("div",{className:"ct-extension-modules"},t.config.features.map(function(e){return(0,r.createElement)("div",{className:"ct-extension-module",key:e.id},(0,r.createElement)("h5",null,e.title,(0,r.createElement)("div",{className:L()("ct-option-switch",{"ct-active":t.data&&t.data.settings.features[e.id]}),onClick:function(){i(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]})}}}),o(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,r.createElement)("span",null))),(0,r.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,r.createElement)("div",{className:"ct-extension-module-actions"},e.documentation&&!ctDashboardLocalizations.plugin_data.hide_docs_section&&(0,r.createElement)("a",{href:e.documentation,target:"_blank"},(0,r.createElement)("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.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,r.createElement)("a",{href:e.customize||e.manage,target:"_blank"},(0,r.createElement)("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.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,r.createElement)("div",{className:"ct-extension-options ct-newsletter-subscribe-options"},(0,r.createElement)("div",{className:"ct-extension-requirement"},(0,r.createElement)("span",null,(0,r.createElement)("svg",{width:"16",height:"16",fill:"#ffffff",viewBox:"0 0 24 24"},(0,r.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)),p&&d.content,u):null};var J=function(){const e=ctDashboardLocalizations.plugin_data,t=e.facebook||{},n=e.video_tutorials||{},o=e.knowledge_base||{},a=e.support||{},c=[{key:"facebook",hide:e.hide_support_facebook_section,icon:(0,r.createElement)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.createElement)("path",{d:"M8.6 6.7c0-1.9 1.5-3.5 3.4-3.5s3.4 1.5 3.4 3.5-1.5 3.5-3.4 3.5-3.4-1.6-3.4-3.5zM22 11.3h-3.9c.5.5.7 1.2.7 2v5.9c0 .6-.2 1.2-.3 1.7H22c1.2-.8 2-2.2 2-3.8v-3.7c0-1.2-.9-2.1-2-2.1zm.8-4.1c0-1.6-1.3-2.9-2.9-2.9-1.6 0-2.9 1.3-2.9 2.9 0 1.6 1.3 2.9 2.9 2.9 1.7 0 2.9-1.3 2.9-2.9zM5.2 13c.1-.7.3-1.3.7-1.8H1.8c-1 .1-1.8.9-1.8 2V17c0 1.6.8 2.9 2 3.8h3.5c-.2-.6-.3-1.3-.3-2.1V13zM4 4.4c-1.6 0-2.9 1.3-2.9 2.9 0 1.6 1.3 2.9 2.9 2.9s2.9-1.3 2.9-2.9c0-1.7-1.3-2.9-2.9-2.9zm11.2 6.9H8.8c-1.1 0-2 .9-2 2v5.5c0 .7.2 1.4.4 2.1h9.5c.3-.6.4-1.3.4-2.1v-5.5c.1-1.1-.8-2-1.9-2z"})),title:t.title||(0,l.__)("Facebook Community","blocksy"),description:t.description||(0,l.__)("Share ideas, help others, ask questions and discuss your next project in our friendly community.","blocksy"),link:t.link||"https://www.facebook.com/groups/blocksy.community",buttonText:t.buttonText||(0,l.__)("Join Our Community","blocksy")},{key:"video_tutorials",hide:e.hide_support_video_section,icon:(0,r.createElement)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.createElement)("path",{d:"M13.3 3.7 8.5.4C7.4-.3 5.9-.1 5.2 1c-.3.4-.5.9-.5 1.4v19.1c0 1.3 1.1 2.4 2.4 2.4.5 0 1-.2 1.4-.4l4.7-3.3 9-6.3c1.1-.8 1.4-2.3.6-3.4l-.6-.6-8.9-6.2z"})),title:n.title||(0,l.__)("Video Tutorials","blocksy"),description:n.description||(0,l.__)("Learn how to do just about anything within Blocksy by following our byte-sized video tutorials.","blocksy"),link:n.link||"https://creativethemes.com/blocksy/video-tutorials/",buttonText:n.buttonText||(0,l.__)("Watch Tutorials","blocksy")},{key:"knowledge_base",hide:e.hide_support_docs_section,icon:(0,r.createElement)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.createElement)("path",{d:"M24 4.1v13.8c0 .7-.5 1.2-1.2 1.3-2 .1-6.1.5-8.9 1.9-.4.2-.9-.1-.9-.6V5.7c0-.2.1-.4.3-.5 2.7-1.7 7.2-2.1 9.4-2.3.7-.1 1.3.5 1.3 1.2zM1.4 2.9C.6 2.8 0 3.4 0 4.1v13.8c0 .7.5 1.2 1.2 1.3 2 .1 6.1.5 8.9 1.9.4.2.9-.1.9-.5V5.7c0-.2-.1-.4-.3-.5C8.1 3.5 3.6 3 1.4 2.9z"})),title:o.title||(0,l.__)("Knowledge Base","blocksy"),description:o.description||(0,l.__)("Dive in with our documentation and learn tips and tricks about Blocksy and its components.","blocksy"),link:o.link||"https://creativethemes.com/blocksy/docs/",buttonText:o.buttonText||(0,l.__)("View Documentation","blocksy")},{key:"support",hide:e.hide_support_section,icon:(0,r.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},(0,r.createElement)("path",{d:"M8.3 7.3 4.1 3C6.2 1.1 9 0 12 0s5.8 1.1 7.9 3l-4.3 4.3C14.6 6.5 13.4 6 12 6s-2.6.5-3.7 1.3zM12 18c-1.4 0-2.6-.5-3.7-1.3L4.1 21c2.1 1.9 4.9 3 7.9 3s5.8-1.1 7.9-3l-4.3-4.3c-1 .8-2.2 1.3-3.6 1.3zm9-13.9-4.3 4.3c.8 1 1.3 2.3 1.3 3.7s-.5 2.6-1.3 3.7l4.3 4.3c1.9-2.1 3-4.9 3-7.9s-1.1-6-3-8.1zM6 12c0-1.4.5-2.6 1.3-3.7L3 4.1C1.1 6.2 0 9 0 12s1.1 5.8 3 7.9l4.3-4.3C6.5 14.6 6 13.4 6 12z"})),title:a.title||(0,l.__)("Support","blocksy"),description:a.description||(0,l.__)("If your questions have not been answered by documentation or video tutorials, drop us a line.","blocksy"),link:a.link||ctDashboardLocalizations.support_url,buttonText:a.buttonText||(0,l.__)("Submit a Ticket","blocksy")}].filter(function(e){return!e.hide});return 0===c.length?null:(0,r.createElement)("div",{className:"ct-support-container-wrapper"},(0,r.createElement)("ul",{className:"ct-support-container","data-placement":"bottom"},c.map(function({key:e,icon:t,title:n,description:o,link:a,buttonText:c}){return(0,r.createElement)("li",{key:e},(0,r.createElement)("h4",null,(0,r.createElement)("span",null,t),n),(0,r.createElement)("p",null,o),(0,r.createElement)("a",{href:a,className:"ct-button","data-hover":"blue",target:"_blank"},c))})))};function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var X=function(e){const{history:t}=(0,r.useContext)(V),{navigate:n}=e,{forceEmptyExts:o,exts_status:a,syncExts:c,isLoading:i,setExtsStatus:u}=z();let m=null;return a[e.extension]&&(m=K(K({},a[e.extension]),{},{name:e.extension})),o?(0,r.createElement)(M,null):(0,r.createElement)("div",{className:"ct-extensions-container"},(0,r.createElement)(s.Transition,{items:i,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return{duration:300}}},function(e,t){return t?(0,r.createElement)(s.animated.p,{style:e,className:"ct-loading-text"},(0,r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 100 100"},(0,r.createElement)("g",{transform:"translate(50,50)"},(0,r.createElement)("g",{transform:"scale(1)"},(0,r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"currentColor"}),(0,r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))),(0,l.__)("Loading Extensions Status...","blocksy-companion")):(0,r.createElement)(s.animated.div,{style:e},(0,r.createElement)("section",{className:"ct-extensions-list"},(0,r.createElement)(F,{currentExtension:m,exts_status:a,navigate:n}),(0,r.createElement)(Z,{navigate:n,currentExtension:m,setExtsStatus:u,onExtsSync:function(e={}){return c(K(K({},e),{},{extension:m.name}))}})),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(J,null)))}))};var Q=function({children:e,activated:t,checked:n,onChange:o,className:a,position:c="end"}){const l=[..."start"===c?[e]:[],(0,r.createElement)("span",{className:L()("ct-checkbox",{active:n}),key:"icon"},(0,r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),..."end"===c?[e]:[]];return(0,r.createElement)("div",{onClick:function(){return o()},className:L()("ct-checkbox-container",a,{activated:t})},l)};function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const ne=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","easy-code-manager":"Fluent Snippets"}[e]||e).replace(/\b\w/,function(e){return e.toUpperCase()})};var oe=function({demoConfiguration:e,setDemoConfiguration:t,style:n}){const{currentDemo:o,demos_list:a,pluginsStatus:c,setCurrentDemo:i}=(0,r.useContext)(nt),[u,m]=(o||"").split(":");a.filter(function({name:e}){return e===u||""});return(0,r.createElement)(s.animated.div,{style:n},(0,r.createElement)("div",{className:"ct-demo-plugins"},(0,r.createElement)("i",{className:"ct-demo-icon"},(0,r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},(0,r.createElement)("path",{fill:"#0C7AB3",d:"M20,0v7.6c0,0.3-0.2,0.5-0.5,0.5h-1.5c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c-0.5-0.7-1.3-1.1-2.1-1.1c-1.5,0-2.6,1.2-2.6,2.6c0,1.5,1.2,2.6,2.6,2.6c0.8,0,1.6-0.4,2.1-1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0h1.5c0,0,0,0,0,0c0.3,0,0.5,0.2,0.5,0.5V20h8.1v-0.8c-0.8-0.7-1.3-1.7-1.3-2.8c0-2,1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1.1-0.5,2.1-1.3,2.8V20H40C40,9,31,0,20,0z"}),(0,r.createElement)("path",{fill:"#3497D3",d:"M20,40v-7.6c0-0.3,0.2-0.5,0.5-0.5h1.5c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0.5,0.7,1.3,1.1,2.1,1.1c1.5,0,2.6-1.2,2.6-2.6c0-1.5-1.2-2.6-2.6-2.6c-0.8,0-1.6,0.4-2.1,1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0h-1.5c0,0,0,0,0,0c-0.3,0-0.5-0.2-0.5-0.5V20h-8.1v0.8c0.8,0.7,1.3,1.7,1.3,2.8c0,2-1.7,3.7-3.7,3.7c-2,0-3.7-1.7-3.7-3.7c0-1.1,0.5-2.1,1.3-2.8V20H0C0,31,9,40,20,40z"}))),(0,r.createElement)("h2",null,(0,l.__)("Install & Activate Plugins","blocksy-companion")),(0,r.createElement)("p",null,(0,l.__)("The following plugins are required for this starter site in order to work properly.","blocksy-companion")),(0,r.createElement)("div",{className:"ct-checkboxes-container","data-type":"reversed"},e.plugins.map(function({plugin:n,enabled:o}){return(0,r.createElement)(r.Fragment,{key:n},!c[n]&&(0,r.createElement)(Q,{key:n,checked:o,onChange:function(){return t(te(te({},e),{},{plugins:e.plugins.map(function(e){return e.plugin===n?te(te({},e),{},{enabled:!o}):e})}))}},ne(n)),c[n]&&(0,r.createElement)(Q,{activated:!0,checked:!0,onChange:function(){}},ne(n)))}))))};function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ae(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){o(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 ce=function(e,t="conjunction"){return new Intl.ListFormat("en-GB",{style:"long",type:t}).format(e)};var le=function({demo:e}){const{currentlyInstalledDemo:t,demos_list:n,setCurrentDemo:o,setInstallerBlockingReleased:a}=(0,r.useContext)(nt),{isProInFree:c,showNotice:s,content:i}=I({config:ae({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,r.createElement)(r.Fragment,null,(0,r.createElement)("li",{className:L()("ct-single-demo",{"ct-is-pro":e.is_pro})},(0,r.createElement)("figure",null,(0,r.createElement)("img",{src:e.screenshot}),(0,r.createElement)("section",null,e.is_pro&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("h3",null,(0,l.__)("Required plan","blocksy-companion")),(0,r.createElement)("span",{className:"ct-required-plans"},ce((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,r.createElement)("h3",null,(0,l.__)("Available for","blocksy-companion")),(0,r.createElement)("span",{className:"ct-available-builders"},ce(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 ne(e)||"Gutenberg"})))),e.is_pro&&(0,r.createElement)("span",{className:"ct-pro-badge"},"PRO")),(0,r.createElement)("div",{className:"ct-demo-actions"},(0,r.createElement)("h4",null,e.name),(0,r.createElement)("div",null,(0,r.createElement)("a",{className:"ct-button",target:"_blank",href:e.url},(0,l.__)("Preview","blocksy-companion")),(0,r.createElement)("button",{className:"ct-button-primary",onClick:function(){c?s():(a(!1),o(e.name))}},t&&t.demo.indexOf(e.name)>-1?(0,l.__)("Modify","blocksy-companion"):(0,l.__)("Import","blocksy-companion"))))),i)};var se=function(){const{demos_list:e}=(0,r.useContext)(nt);return(0,r.createElement)("ul",{className:"ct-demo-list"},e.filter(function(t,n){return e.map(function({name:e}){return e}).indexOf(t.name)===n}).map(function(e){return(0,r.createElement)(le,{key:e.name,demo:e})}))};function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const me=(0,l.__)("Unfortunately, your hosting configuration doesn't meet the minimum requirements for importing a starter site.","blocksy-companion"),de=function(e){const t=new URLSearchParams(ue({nonce:ctDashboardLocalizations.dashboard_actions_nonce,wp_customize:"on"},e));return`${ctDashboardLocalizations.ajax_url}?${t.toString()}`},pe=async function(e,t,n={},{strategy:o="default",onStatus:r=null}={}){const a=de(e.params),c={"Content-Type":"application/json"};"sse"===o&&(c.Accept="text/event-stream");const l=await fetch(a,{method:"POST",headers:c,body:JSON.stringify(ue(ue({requestsPayload:t},e.body||{}),n))});if("sse"===o){if(!l.ok)throw new Error(`HTTP ${l.status}`);return fe(l,r)}if(!l.ok)throw new Error(`HTTP ${l.status}`);const s=await l.json();var i;if(!s||!s.success)throw new Error((null==s||null===(i=s.data)||void 0===i?void 0:i.message)||"Unknown error");return{success:!0,data:s.data}},fe=async function(e,t){const n=e.body.getReader(),o=new TextDecoder;let r="",a=null,c="";const l=function(){if(!a||!c)return null;try{const e=JSON.parse(c);if("status"===a&&t)t(e.message);else{if("complete"===a)return{success:!0,data:e};if("error"===a)throw new Error(e.message)}}catch(e){if(e.message)throw e;console.error("Failed to parse SSE data:",e)}return a=null,c="",null};for(;;){const{done:e,value:t}=await n.read();if(e){if(r){const e=r.split("\n");for(const t of e)t.startsWith("event: ")?a=t.slice(7):t.startsWith("data: ")&&(c=t.slice(6))}const e=l();if(e)return e;break}r+=o.decode(t,{stream:!0});const s=r.split("\n");r=s.pop()||"";for(const e of s)if(e.startsWith("event: "))a=e.slice(7);else if(e.startsWith("data: "))c=e.slice(6);else if(""===e){const e=l();if(e)return e}}throw new Error("SSE stream ended without complete event")},he=async function(e,t,{maxRetries:n=5,strategy:o="default",onStatus:r=null}={}){let a=0;const c=e.title;let l=null;for(;a<n;){var s;if(a>0&&e.cleanup){console.log(`[${c}] Running cleanup before attempt ${a+1}`);try{await he({title:`${c} (cleanup)`,params:e.cleanup.params},{},{maxRetries:3}),console.log(`[${c}] Cleanup completed`)}catch(e){console.log(`[${c}] Cleanup failed: ${e.message}, continuing anyway`)}}if(a>=2){const e=1e3*Math.pow(2,a-2);console.log(`[${c}] Waiting ${e}ms before attempt ${a+1}`),await new Promise(function(t){return setTimeout(t,e)})}console.log(`[${c}] Attempt ${a+1}/${n}`);const u=Date.now();let m,d={};"sse"===o&&null!==l&&(d.duration=l,console.log(`[${c}] Using safe duration: ${l}s`));try{m=await pe(e,t,d,{strategy:o,onStatus:r})}catch(e){const t=Date.now()-u;console.log(`[${c}] Attempt ${a+1} failed after ${t}ms: ${e.message}`),"sse"===o&&null===l&&(l=Math.max(10,Math.floor(.7*t/1e3)),console.log(`[${c}] Calculated safe duration: ${l}s`)),a++;continue}const p=Date.now()-u;if("sse"===o&&"content_import_timeout_reached"===(null===(s=m.data)||void 0===s?void 0:s.status)){null===l&&(l=Math.max(10,Math.floor(.7*p/1e3))),console.log(`[${c}] Timeout reached, continuing with chunked import (safe duration: ${l}s)`);let n=ue(ue({},t),{},{importer_data:m.data.importer_data});for(;;){var i;let t;console.log(`[${c}] Continuing chunked import (processed: ${m.data.total_processed}/${m.data.total_posts})`);try{t=await pe(e,n,{duration:l},{strategy:o,onStatus:r})}catch(e){console.log(`[${c}] Chunked import failed: ${e.message}, restarting attempt`);break}if("content_import_timeout_reached"!==(null===(i=t.data)||void 0===i?void 0:i.status))return console.log(`[${c}] Chunked import complete`),{success:!0,data:t.data,requestsPayload:ue(ue({},n),t.data)};console.log(`[${c}] Chunk completed, more content remaining (processed: ${t.data.total_processed}/${t.data.total_posts})`),n=ue(ue({},n),{},{importer_data:t.data.importer_data})}a++;continue}console.log(`[${c}] Success on attempt ${a+1} (took ${p}ms)`);let f=t;return m.data&&null!=m.data&&"Object"===m.data.constructor.name&&(f=ue(ue({},t),m.data)),{success:!0,data:m.data,requestsPayload:f}}throw console.log(`[${c}] All ${n} attempts failed`),new Error(me)};function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function be(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){o(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 ye=function({style:e,nextStep:t}){const{is_child_theme:n}=(0,r.useContext)(V),{setCurrentlyInstalledDemo:o,setCurrentDemo:a,currentDemo:c,demos_list:i,pluginsStatus:u,setPluginsStatus:m}=(0,r.useContext)(nt),[d,p]=(0,r.useState)("idle"),[f,h]=(c||"").split(":"),g=i.filter(function({name:e}){return e===f});return(0,r.createElement)(s.animated.div,{className:"ct-modify-demo",style:e},"loading"===d&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("i",{className:"ct-demo-icon"},(0,r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},(0,r.createElement)("path",{className:"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,r.createElement)("path",{className:"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,r.createElement)("path",{className:"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,r.createElement)("h2",null,(0,l.__)("Removing starter site...","blocksy-companion")),(0,r.createElement)("p",null,(0,l.__)("Please wait and avoid closing this window while the starter site removal process is in progress.","blocksy-companion"))),"done"===d&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("i",{className:"ct-demo-icon"},(0,r.createElement)("svg",{width:"36",height:"36",viewBox:"0 0 40 40"},(0,r.createElement)("path",{d:"M5.71,40a1,1,0,0,1-1-1V21.59a1,1,0,0,1,1.91,0V39.05A1,1,0,0,1,5.71,40Zm1-31.83V1.07A1,1,0,0,0,5.71,0a1,1,0,0,0-1,1.07v7.1a1,1,0,0,0,1,1.07A1,1,0,0,0,6.67,8.17ZM21,39.05V34.29a1,1,0,1,0-1.9,0v4.76a1,1,0,1,0,1.9,0Zm0-18.14V1a1,1,0,1,0-1.9,0V20.91a1,1,0,1,0,1.9,0ZM35.24,39.05V26.35a1,1,0,0,0-1.91,0v12.7a1,1,0,0,0,1.91,0Zm0-26.25V1a1,1,0,1,0-1.91,0V12.8a1,1,0,1,0,1.91,0Z",transform:"translate(-0.71)",fill:"#dae3e8"}),(0,r.createElement)("path",{d:"M5.71,18.06a5,5,0,1,1,5-5A5,5,0,0,1,5.71,18.06ZM20,30.76a5,5,0,1,1,5-5A5,5,0,0,1,20,30.76Zm14.29-7.93a5,5,0,1,1,5-5A5,5,0,0,1,34.29,22.83Z",transform:"translate(-0.71)",fill:"#0c7ab3"}))),(0,r.createElement)("h2",null,(0,l.__)("Starter Site Removed","blocksy-companion")),(0,r.createElement)("p",null,(0,l.__)("The starter site has been successfully removed. You may now close this window.","blocksy-companion")),(0,r.createElement)("div",{className:"ct-modify-actions"},(0,r.createElement)("button",{className:"ct-demo-btn ct-dismiss",onClick:function(e){e.preventDefault(),a(`${f}:hide`)}},(0,l.__)("Close Now","blocksy-companion")))),"idle"===d&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("i",{className:"ct-demo-icon"},(0,r.createElement)("svg",{width:"36",height:"36",viewBox:"0 0 40 40"},(0,r.createElement)("path",{d:"M5.71,40a1,1,0,0,1-1-1V21.59a1,1,0,0,1,1.91,0V39.05A1,1,0,0,1,5.71,40Zm1-31.83V1.07A1,1,0,0,0,5.71,0a1,1,0,0,0-1,1.07v7.1a1,1,0,0,0,1,1.07A1,1,0,0,0,6.67,8.17ZM21,39.05V34.29a1,1,0,1,0-1.9,0v4.76a1,1,0,1,0,1.9,0Zm0-18.14V1a1,1,0,1,0-1.9,0V20.91a1,1,0,1,0,1.9,0ZM35.24,39.05V26.35a1,1,0,0,0-1.91,0v12.7a1,1,0,0,0,1.91,0Zm0-26.25V1a1,1,0,1,0-1.91,0V12.8a1,1,0,1,0,1.91,0Z",transform:"translate(-0.71)",fill:"#dae3e8"}),(0,r.createElement)("path",{d:"M5.71,18.06a5,5,0,1,1,5-5A5,5,0,0,1,5.71,18.06ZM20,30.76a5,5,0,1,1,5-5A5,5,0,0,1,20,30.76Zm14.29-7.93a5,5,0,1,1,5-5A5,5,0,0,1,34.29,22.83Z",transform:"translate(-0.71)",fill:"#0c7ab3"}))),(0,r.createElement)("h2",null,(0,l.__)("This starter site is already installed","blocksy-companion")),(0,r.createElement)("p",null,(0,l.__)("What steps do you want to perform next?","blocksy-companion")),(0,r.createElement)("div",{className:"ct-modify-actions"},(0,r.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){p("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:g[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){try{await he(e,{})}catch(t){console.error(`[${e.title}] Failed:`,t.message)}"deactivate_demo_plugins"===n&&m(be(be({},u),g[0].plugins.reduce(function(e,t){return be(be({},e),{},{[t]:!1})},{})))}}p("done")}(),e.preventDefault(),o()}},(0,l.__)("Remove","blocksy-companion")),(0,r.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 o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}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){o(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:o,child_theme_exists:a}=(0,r.useContext)(V);return(0,r.createElement)(s.animated.div,{className:"ct-demo-child",style:n},(0,r.createElement)("i",{className:"ct-demo-icon"},(0,r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 43 41.1"},(0,r.createElement)("path",{fill:"#DBE7EE",d:"M0,39.5c0,0.9,0.7,1.6,1.5,1.6h32.3c0.9,0,1.5-0.7,1.5-1.6V14H0V39.5z"}),(0,r.createElement)("path",{fill:"#BDC8D7",d:"M18.2,41.1h15.6c0.9,0,1.5-0.7,1.5-1.6V14H7.6L8,32.4L18.2,41.1z"}),(0,r.createElement)("path",{fill:"#BDC8D7",d:"M0,15.6V9.8c0-0.9,0.7-1.6,1.5-1.6h32.3c0.9,0,1.5,0.7,1.5,1.6v5.8H0z"}),(0,r.createElement)("path",{fill:"#3497D3",d:"M7.6,31.3c0,0.9,0.7,1.6,1.5,1.6h32.4c0.9,0,1.5-0.7,1.5-1.6V5.8H7.6V31.3z"}),(0,r.createElement)("path",{fill:"#0C7AB3",d:"M7.6,7.4V1.6C7.6,0.7,8.3,0,9.1,0h32.4C42.4,0,43,0.7,43,1.6v5.8H7.6z"}),(0,r.createElement)("rect",{x:"11.2",y:"11",fill:"#44ACDF",width:"16.8",height:"17.9"}),(0,r.createElement)("rect",{x:"31.5",y:"11",fill:"#44ACDF",width:"7.9",height:"17.9"}))),a?(0,r.createElement)("h2",null,(0,l.__)("Activate Child Theme","blocksy-companion")):(0,r.createElement)("h2",null,(0,l.__)("Install Child Theme","blocksy-companion")),!o&&(0,r.createElement)(r.Fragment,null,a?(0,r.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,r.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,r.createElement)("div",{className:"ct-checkboxes-container","data-type":"bordered:reversed"},(0,r.createElement)(Q,{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")))),o&&(0,l.__)("You already have a child theme properly installed and activated. Move on.","blocksy-companion"),(0,r.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 o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}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){o(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:o,demos_list:a,pluginsStatus:c,setCurrentDemo:i}=(0,r.useContext)(nt),[u,m]=(o||"").split(":"),d=a.filter(function({name:e}){return e===u||""});return(0,r.createElement)(s.animated.div,{style:n},d.length>1&&(0,r.createElement)("div",{className:"ct-demo-builder"},(0,r.createElement)("i",{className:"ct-demo-icon"},(0,r.createElement)("svg",{width:"52",height:"40",viewBox:"0 0 52 40"},(0,r.createElement)("path",{fill:"#DBE7EE",d:"M0,38.1C0,39.1,0.9,40,1.8,40h39.3c1.1,0,1.8-0.9,1.8-1.9v-31H0V38.1z"}),(0,r.createElement)("path",{fill:"#CFDBE4",d:"M13.8,14.6v18.8h22.6V14.6H13.8zM34.8,31.9H15.4V16.1h19.4V31.9z"}),(0,r.createElement)("path",{fill:"#BDC8D7",d:"M13.1,15.3L13.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,16.8,13.1,16.1,13.1,15.3z M34.1,15.3L34.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,16.8,34.1,16.1,34.1,15.3z M13.1,32.7L13.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,34.1,13.1,33.5,13.1,32.7z M34.1,32.7L34.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,34.1,34.1,33.5,34.1,32.7z M23.3,15.3L23.3,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C24,16.8,23.3,16.1,23.3,15.3z M4.2,13.9h5.9v7.9H4.2V13.9zM4.2,23.3h5.9v2.9H4.2V23.3zM0,9V1.9C0,0.9,0.9,0,1.8,0h39.3c1.1,0,1.8,0.9,1.8,1.9V9H0z M42.9,35.4V10.9h-9.3v15.2L42.9,35.4zM7.2,27.6c-1.6,0-3,1.3-3,3c0,1.6,1.3,3,3,3s3-1.3,3-3C10.2,28.9,8.8,27.6,7.2,27.6z"}),(0,r.createElement)("path",{fill:"#0C7AB3",d:"M50,27.8H35.6c-1.1,0-2-0.9-2-2v-18c0-1.1,0.9-2,2-2H50c1.1,0,2,0.9,2,2v18C52,26.9,51.1,27.8,50,27.8z"}),(0,r.createElement)("path",{fill:"#44ACDF",d:"M49,17.5H36.8c-0.7,0-1.2-0.5-1.2-1.2V9.1c0-0.7,0.5-1.2,1.2-1.2H49c0.7,0,1.2,0.5,1.2,1.2v7.3C50.2,17,49.6,17.5,49,17.5z M50.2,20.4v-0.1c0-0.5-0.4-1-1-1H36.5c-0.5,0-1,0.4-1,1v0.1c0,0.5,0.4,1,1,1h12.7C49.7,21.4,50.2,20.9,50.2,20.4z M40.8,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C41.7,24.8,41.3,25.2,40.8,25.2z M49.2,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C50.2,24.8,49.7,25.2,49.2,25.2z"}),(0,r.createElement)("path",{fill:"#C8E6F4",d:"M47.4,11.2h-9.1c-0.2,0-0.5-0.2-0.5-0.4v0c0-0.2,0.2-0.4,0.5-0.4h9.1c0.2,0,0.5,0.2,0.5,0.4v0C47.8,11,47.6,11.2,47.4,11.2z M47.9,14.7L47.9,14.7c0-0.2-0.2-0.5-0.5-0.5h-9.1c-0.2,0-0.4,0.2-0.4,0.4v0c0,0.2,0.2,0.4,0.4,0.4h9.1C47.7,15.1,47.9,14.9,47.9,14.7z"}),(0,r.createElement)("path",{fill:"#FFFFFF",d:"M26.3,20.8h-2.9l-2.9,7.9H23l0.3-0.7h2.8l0.3,0.7h2.7L26.3,20.8z M23.9,25.8l0.8-2.2h0l0.8,2.2H23.9zM46.5,10.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5S46.5,9.9,46.5,10.7zM42.1,14.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S42.1,13.9,42.1,14.7z"}))),(0,r.createElement)("h2",null,(0,l.__)("Choose Page Builder","blocksy-companion")),(0,r.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,r.createElement)("ul",{"data-count":d.length},d.sort(function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}).map(function({builder:n,plugins:o}){return(0,r.createElement)("li",{key:n,className:L()({active:n===(null===e.builder?d[0].builder:e.builder)}),onClick:function(){t(ke(ke({},e),{},{builder:n,plugins:o.map(function(e){return{plugin:e,enabled:!0}})}))}},(0,r.createElement)("figure",null,(0,r.createElement)("span",{className:L()("ct-checkbox",{active:n===(null===e.builder?d[0].builder:e.builder)})},(0,r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),""===n&&(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,r.createElement)("path",{d:"M122.5 35.5c-1.7-1.1-4-.7-5.1 1C110.8 46.4 96.8 47 96 47h-.3c-17.4 0-24 14.8-24.3 15.4-.8 1.9.1 4 1.9 4.8.5.2 1 .3 1.5.3 1.4 0 2.7-.8 3.4-2.2.1-.1 4.6-10.3 16.3-11v19c-.5 4.1-2.4 7.3-5.8 9.7-3.6 2.5-8.3 3.8-14.1 3.8-7 0-12.7-2.4-16.9-7.2-4.3-4.8-6.4-11.5-6.4-20.2l.1-20.9c.3-7.7 2.4-13.8 6.4-18.2 4.3-4.8 9.9-7.2 16.9-7.2 5.8 0 10.6 1.3 14.1 3.8 3.6 2.5 5.6 5.9 5.9 10.3v.5c0 2.5 2.1 4.6 4.6 4.6 2.5 0 4.6-2.1 4.6-4.6v-.5c-.7-6.6-3.7-11.9-9.1-15.8-5.4-4-12.2-5.9-20.4-5.9-9.7 0-17.6 3.2-23.5 9.6-5.6 6-8.6 13.8-8.9 23.5 0 .7-.1 1.3-.1 2l.1 18.8h-.1c0 10.7 3 19.2 9 25.5 6 6.4 13.8 9.6 23.5 9.6 8.2 0 14.9-1.9 20.4-5.9 5-3.6 7.9-8.4 8.9-14.3l.2-21c6.1-1.5 14.4-4.8 19.6-12.7 1.3-1.7.8-4-1-5.1z"})),"brizy"===n&&(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,r.createElement)("path",{d:"M14.6 36.7L75 0l60.4 36.7L75 73.4 14.6 36.7zm21.7.9L75 61.2l38.8-23.6L75 14 36.3 37.6z",fill:"#181c25"}),(0,r.createElement)("path",{fill:"#a7b2dd",d:"M14.6 63.2l10.8-6.5L75 86.8l49.9-30 10.5 6.4L75 100z"})),"elementor"===n&&(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,r.createElement)("path",{d:"M32.5 7.6h17v84.9h-17V7.6zm34 84.9h51v-17h-51v17zm0-34h51v-17h-51v17zm0-51v17h51v-17h-51z"}))),(0,r.createElement)("div",{className:"builder-name"},ne(n)||"Gutenberg"))}))))};function xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var je=function({demoConfiguration:e,setDemoConfiguration:t,currentDemo:n,style:o}){return(0,r.createElement)(s.animated.div,{style:o},(0,r.createElement)("div",{className:"ct-demo-content"},(0,r.createElement)("i",{className:"ct-demo-icon"},(0,r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},(0,r.createElement)("path",{d:"M25,22.67a5,5,0,0,1-10,0H0V36a3.33,3.33,0,0,0,3.33,3.33H36.67A3.33,3.33,0,0,0,40,36V22.67Z",transform:"translate(0 -0.67)",fill:"#bdc8d7"}),(0,r.createElement)("rect",{x:"2.5",y:"14",width:"35",height:"3",rx:"1.5",fill:"#0c7ab3"}),(0,r.createElement)("rect",{x:"5",y:"7",width:"30",height:"3",rx:"1.5",fill:"#3497d3"}),(0,r.createElement)("rect",{x:"7.5",width:"25",height:"3",rx:"1.5",fill:"#44acdf"}))),(0,r.createElement)("h2",null,(0,l.__)("Import Content","blocksy-companion")),(0,r.createElement)("p",null,(0,l.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts.","blocksy-companion")),(0,r.createElement)("div",{className:"ct-checkboxes-container","data-type":"reversed"},["options","widgets","content"].map(function(n){return(0,r.createElement)(Q,{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,r.createElement)(Q,{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,r.createElement)("div",null,(0,l.__)("Clean Install","blocksy-companion"),(0,r.createElement)("i",null,(0,l.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blocksy-companion")))))))};var Se=function(){const{home_url:e,customizer_url:t}=(0,r.useContext)(V);return(0,r.createElement)("div",{className:"ct-install-success"},(0,r.createElement)("h2",null,(0,l.__)("Starter Site Imported Successfully","blocksy-companion")),(0,r.createElement)("p",null,(0,l.__)("Now you can view your website or start customizing it","blocksy-companion")),(0,r.createElement)("div",null,(0,r.createElement)("a",{href:t,className:"ct-button"},(0,l.__)("Customize","blocksy-companion")),(0,r.createElement)("a",{href:e,target:"_blank",className:"ct-button-primary"},(0,l.__)("View site","blocksy-companion"))))};const Pe=function(e){e.preventDefault(),e.returnValue=""},ze=function({demoConfiguration:e,pluginsStatus:t,is_child_theme:n,includeMetaSteps:o=!1}){let r=[];return o&&r.push("register_current_demo"),e.child_theme&&(n||r.push("child_theme")),e.plugins.filter(function({enabled:e,plugin:n}){return!!e&&!t[n]}).length>0&&r.push("plugins"),e.content.erase_content&&r.push("erase_content"),e.content.options&&r.push("options"),e.content.widgets&&r.push("widgets"),e.content.content&&r.push("content"),o&&r.push("install_finish"),r},Me=function(e){const{demos_list:t,currentDemo:n,setInstallerBlockingReleased:o,setCurrentlyInstalledDemo:a,pluginsStatus:c}=(0,r.useContext)(nt),{is_child_theme:s}=(0,r.useContext)(V),[i,u]=(0,r.useState)(!1),[m,d]=(0,r.useState)(null),[p,f]=(0,r.useState)(!1),[h,g]=(0,r.useState)(0),b=(0,r.useMemo)(function(){const[o,r]=(n||"").split(":"),a=t.filter(function({name:e}){return e===o}).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,r.useMemo)(function(){return ze({demoConfiguration:e,pluginsStatus:c,is_child_theme:s,includeMetaSteps:!0})},[e,c,s]),v=(0,r.useCallback)(async function(t){const n=function(e){const{currentDemoWithVariation:t,demoConfiguration:n,pluginsStatus:o,demoContent:r}=e,a=n.plugins.filter(function({enabled:e,plugin:t}){return e&&!o[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"),ne(e)),params:{action:"blocksy_demo_activate_plugins",plugins:e}}})},erase_content:{requests:[{title:(0,l.__)("Preparing 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},cleanup:{params:{action:"blocksy_demo_erase_content",to_erase:"widgets"}}}]},content:{requests:[{title:(0,l.__)("Import content","blocksy-companion"),params:{action:"blocksy_demo_install_content",demo_name:t},cleanup:{params:{action:"blocksy_demo_erase_content",to_erase:"content"}}}]},install_finish:{requests:[{title:(0,l.__)("Final touches","blocksy-companion"),params:{action:"blocksy_demo_install_finish"}}]}}}({currentDemoWithVariation:b,demoConfiguration:e,pluginsStatus:c,demoContent:t}),r=y.length;let a=0,s={};const i=function(e,t=null){console.timeEnd("Blocksy:Dashboard:DemoInstall"),e?u(!0):f(t),o(!0),window.removeEventListener("beforeunload",Pe)};for(const e of y){const t=n[e];if(t&&0!==t.requests.length){for(const e of t.requests){d(e.title);const t="blocksy_demo_install_content"===e.params.action;try{s=(await he(e,s,t?{strategy:"sse",onStatus:function(e){d(e)}}:{})).requestsPayload}catch(e){return void i(!1,e.message)}}a++,g(a/r*100),r===a&&i(!0)}}},[y,g]),_=(0,r.useCallback)(async function(){window.addEventListener("beforeunload",Pe),console.time("Blocksy:Dashboard:DemoInstall"),a({demo:`${n}:${e.builder}`}),d((0,l.__)("Preparing data...","blocksy-companion"));const t=await fetch(de({action:"blocksy_demo_get_content_preliminary_data",demo_name:b}));if(200===t.status){const e=await t.json();if(!e.success)return void f(e.data.message||me);v(e.data)}},[v,b]);return(0,r.useEffect)(function(){_()},[]),{isCompleted:i,isError:p,lastMessage:m,progress:h}};var De=function({lastMessage:e,progress:t}){return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("i",{className:"ct-demo-icon"},(0,r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},(0,r.createElement)("path",{className:"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,r.createElement)("path",{className:"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,r.createElement)("path",{className:"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,r.createElement)("h2",null,(0,l.__)("Installing","blocksy-companion"),"..."),(0,r.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,r.createElement)("div",{className:"ct-progress-info"},(0,r.createElement)("span",{className:"ct-progress-label"},e),(0,r.createElement)("span",{className:"ct-progress-counter"},Math.round(t),"%")),(0,r.createElement)("div",{style:{"--progress":`${t}%`},className:"ct-installer-progress"},(0,r.createElement)("div",null)))};var Ne=function({isError:e}){return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("i",{className:"ct-demo-icon"},(0,r.createElement)("svg",{width:"37",height:"37",viewBox:"0 0 40 40"},(0,r.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,r.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,r.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,r.createElement)("h2",null,(0,l.__)("Can't Import Starter Site","blocksy-companion")),(0,r.createElement)("p",null,e),(0,r.createElement)("a",{href:"https://creativethemes.com/blocksy/docs/troubleshooting/starter-site-import-stuck-at-xx/",className:"ct-demo-btn",target:"_blank"},"More Information"))};var Le=function({demoConfiguration:e,style:t}){const{isCompleted:n,isError:o,lastMessage:a,progress:c}=Me(e),l=n?"complete":o?"error":"progress";return(0,r.createElement)(s.animated.div,{className:"ct-demo-install",style:t},(0,r.createElement)(s.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,r.createElement)(s.animated.div,{style:e},"complete"===t&&(0,r.createElement)(Se,null),"error"===t&&(0,r.createElement)(Ne,{isError:o}),"progress"===t&&(0,r.createElement)(De,{lastMessage:a,progress:c}))}))};var Be=function({location:e,navigate:t}){const[n,o]=(0,r.useState)(!0),{installerBlockingReleased:a,demos_list:c,currentDemo:i,pluginsStatus:u,currentlyInstalledDemo:m,setCurrentDemo:d,filters:p}=(0,r.useContext)(nt),{is_child_theme:f}=(0,r.useContext)(V),[h,g]=(0,r.useState)(m),[b,y]=(0,r.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),[v,_]=(0,r.useState)(0),[E,w]=(i||"").split(":"),k=["modify_demo","builder","content","plugins","installer"].filter(function(e){if(!i)return!1;if("modify_demo"===e){if(!h)return!1;if(-1===h.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],x=v===k.indexOf("installer")-1;return(0,r.useEffect)(function(){if(!E)return;if(i.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),g(m);let t=e[0];if("all"!==p.builder){const n=e.find(function({builder:e}){return e===p.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}})},[i]),(0,r.createElement)(s.Overlay,{items:i,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:L()("ct-demo-modal",{"ct-demo-installer":"installer"===O||"modify_demo"===O}),onDismiss:function(){("installer"!==O||a)&&d(`${E}:hide`)},onDismissed:function(){_(0)},render:function(){return(0,r.createElement)("div",{className:"ct-modal-content ct-demo-step-container"},(0,r.createElement)("div",{className:"ct-current-step"},(0,r.createElement)(s.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,r.createElement)(r.Fragment,null,"modify_demo"===t&&(0,r.createElement)(ye,{demoConfiguration:b,nextStep:function(){_(Math.min(v+1,k.length-1))},style:e}),"child_theme"===t&&(0,r.createElement)(Ee,{style:e,demoConfiguration:b,setDemoConfiguration:y}),"plugins"===t&&(0,r.createElement)(oe,{demoConfiguration:b,style:e,setDemoConfiguration:y}),"builder"===t&&(0,r.createElement)(Oe,{style:e,demoConfiguration:b,setDemoConfiguration:y}),"content"===t&&(0,r.createElement)(je,{style:e,demoConfiguration:b,setDemoConfiguration:y}),"installer"===t&&(0,r.createElement)(Le,{style:e,demoConfiguration:b}))})),"installer"!==O&&"modify_demo"!==O&&(0,r.createElement)("div",{className:"ct-demo-step-controls"},v>0&&(0,r.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,r.createElement)("ul",{className:"ct-steps-pills"},k.map(function(e,t){return t===k.length-1?null:(0,r.createElement)("li",{className:L()({active:e===O}),key:e},t+1)})),(0,r.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:x&&0===ze({demoConfiguration:b,pluginsStatus:u,is_child_theme:f}).length,onClick:function(){_(Math.min(v+1,k.length-1))}},x?(0,l.__)("Install","blocksy-companion"):(0,l.__)("Next","blocksy-companion"))))}})},Te=window.wp.components,Fe=window.React;function Ae(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Ae(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}var Ve=function(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Ae(e))&&(o&&(o+=" "),o+=t);return o};const He=(0,r.forwardRef)(({className:e,isPressed:t,...n},o)=>{const a={...n,className:Ve(e,{"is-pressed":t})||void 0,"aria-hidden":!0,focusable:!1};return(0,r.createElement)("svg",{...a,ref:o})});He.displayName="SVG";var $e=(0,Fe.createElement)(He,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Fe.createElement)(e=>(0,r.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"})),Ge=n(213),Ie=n.n(Ge);function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function qe(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){o(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}var We=function({allPlans:e,allCategories:t}){const[n,o]=(0,r.useState)(!1),[a,c]=(0,r.useState)(!1),[i,u]=(0,r.useState)([]),[m,d]=(0,r.useState)(null),[p,f]=(0,r.useState)(""),[h,g]=(0,r.useState)([]);(0,r.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&&g(e.plugins),e&&e.demoId&&d(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,r.createElement)("div",{className:"ct-filter-trigger-export"},(0,r.createElement)("button",{type:"button",className:"components-button has-icon has-text",onClick:function(e){c(!0)}},(0,r.createElement)("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fillRule:"evenodd",fill:"currentColor"},(0,r.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,r.createElement)(s.Overlay,{items:a,className:"ct-site-export-modal",onDismiss:function(){return c(!1)},render:function(){return(0,r.createElement)("div",{className:"ct-modal-content"},(0,r.createElement)("h2",null,"Export Settings"),(0,r.createElement)("div",{className:"ct-site-export-settings ct-modal-scroll"},(0,r.createElement)("section",{className:"general-section has-divider"},(0,r.createElement)("label",null,(0,r.createElement)("span",{className:"ct-label"},(0,l.__)("Starter site","blocksy-companion")),(0,r.createElement)("select",{value:m,onChange:function({target:{value:e}}){return d(parseFloat(e))}},(0,r.createElement)("option",{value:""},(0,l.__)("Select a starter site","blocksy-companion")),i.sort(function(e,t){const n=e.title.toLowerCase(),o=t.title.toLowerCase();return n<o?-1:n>o?1:0}).map(function(e){return(0,r.createElement)("option",{value:e.id,key:e.id},e.title)}))),(0,r.createElement)("label",null,(0,r.createElement)("span",{className:"ct-label"},(0,l.__)("Builder","blocksy-companion")),(0,r.createElement)("input",{type:"text",placeholder:(0,l.__)("Builder","blocksy-companion"),value:p,onChange:function({target:{value:e}}){return f(e)}}))),(0,r.createElement)("section",{className:"plugins-section"},(0,r.createElement)("h4",null,"Required plugins"),(0,r.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","easy-code-manager":"Fluent Snippets"}).filter(function(e){return"gutenberg"!==e}).map(function(e){return(0,r.createElement)("label",{tabindex:"0",onClick:function(t){t.preventDefault(),g(function(t){return t.includes(e)?t.filter(function(t){return t!==e}):[...t,e]})}},(0,r.createElement)("input",{type:"checkbox",checked:h.indexOf(e)>-1,onChange:function({target:{checked:e}}){}}),(0,r.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","easy-code-manager":"Fluent Snippets"}[e]))})))),(0,r.createElement)("div",{className:"ct-modal-actions has-divider"},(0,r.createElement)("button",{className:"button button-primary",disabled:n,onClick:function(){return async function(){o(!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",p),e.append("plugins",h.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:o}=await n.json();if(e){const e=i.find(function(e){return e.id===m}),n=qe(qe({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`})]}:{}),o.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"});Ie().saveAs(t,`${e.title}.json`)}}}catch(e){}o(!1)}()}},n?(0,l.__)("Loading...","blocksy-companion"):(0,l.__)("Export site","blocksy-companion"))))}}))};function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Je={all:(0,l.__)("All Plans","blocksy-companion"),free:(0,l.__)("Free","blocksy-companion"),pro:(0,l.__)("Pro","blocksy-companion")};var Ye=function(){const{unfiltered_demos_list:e,filters:t,setFilters:n,allPlans:o,allCategories:a}=(0,r.useContext)(nt),c=e.reduce(function(e,t){let n="gutenberg";return t.builder&&(n=t.builder),e.includes(n)||e.push(n),e},[]);return(0,r.createElement)("div",{className:"ct-demo-filters"},(0,r.createElement)(Te.DropdownMenu,{className:"ct-filter-trigger-categories",menuProps:{className:"ct-filter-dropdown-categories"},icon:(0,r.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fillRule:"evenodd",fill:"currentColor"},(0,r.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 o=t.category===e;return(0,r.createElement)(Te.MenuItem,{key:e,icon:o?(0,r.cloneElement)($e,{width:24,height:24}):null,isSelected:o,onClick:function(){n(Ze(Ze({},t),{},{category:e}))}},"all"===e?(0,l.__)("All Categories","blocksy-companion"):e)})}),(0,r.createElement)(Te.DropdownMenu,{className:"ct-filter-trigger-plans",menuProps:{className:"ct-filter-dropdown-plans"},icon:(0,r.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fillRule:"evenodd",fill:"currentColor"},(0,r.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:Je[t.plan],text:Je[t.plan]},function(){return["all","free","pro"].map(function(e){const o=t.plan===e;return(0,r.createElement)(Te.MenuItem,{key:e,icon:o?(0,r.cloneElement)($e,{width:24,height:24}):null,isSelected:o,onClick:function(){n(Ze(Ze({},t),{},{plan:e}))}},Je[e])})}),(0,r.createElement)(Te.DropdownMenu,{className:"ct-filter-trigger-builders",menuProps:{className:"ct-filter-dropdown-builders"},icon:(0,r.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fillRule:"evenodd",fill:"currentColor"},(0,r.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","easy-code-manager":"Fluent Snippets"}[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","easy-code-manager":"Fluent Snippets"}[t.builder]},function(){return["all",...c].map(function(e){const o=t.builder===e;return(0,r.createElement)(Te.MenuItem,{key:e,icon:o?(0,r.cloneElement)($e,{width:24,height:24}):null,isSelected:o,onClick:function(){n(Ze(Ze({},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","easy-code-manager":"Fluent Snippets"}[e])})}),ct_localizations.is_dev_mode&&(0,r.createElement)(We,{allPlans:o,allCategories:a}),(0,r.createElement)("div",{className:"ct-filter-search"},(0,r.createElement)("svg",{"aria-hidden":"true",width:"13",height:"13",viewBox:"0 0 15 15",fill:"currentColor"},(0,r.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,r.createElement)("input",{type:"text",placeholder:(0,l.__)("Search for a starter site...","blocksy-companion"),value:t.search,onChange:function(e){n(Ze(Ze({},t),{},{search:e.target.value}))}})))};const Ke=[{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"}],Xe=["Blog","Business","Ecommerce","News","Nonprofit","Personal","Portfolio","Travel"];function Qe(e,t){var n=t.length,o=e.length;if(o>n)return!1;if(o===n)return e===t;e:for(var r=0,a=0;r<o;r++){for(var c=e.charCodeAt(r);a<n;)if(t.charCodeAt(a++)===c)continue e;return!1}return!0}const et=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 Qe(t.search.toLowerCase(),e.trim().toLowerCase())}))||Qe(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 tt=function({demos_list:e}){const[t,n]=(0,r.useState)({search:"",category:"all",builder:"all",plan:"all"});return{filters:t,setFilters:n,unfiltered_demos_list:e,demos_list:et(e.filter(function(e){return!e.dev_v2||ct_localizations.is_dev_mode}),t),allPlans:Ke,allCategories:Xe,display:function(){return(0,r.createElement)(Ye,null)}}};const nt=(0,r.createContext)({demos:[]});let ot=null;var rt=function({children:e,path:t,location:n}){const[o,a]=(0,r.useState)(!ot),[c,i]=(0,r.useState)(ot||[]),[u,m]=(0,r.useState)(ctDashboardLocalizations.plugin_data.active_plugins),[d,p]=(0,r.useState)(null),[f,h]=(0,r.useState)(ctDashboardLocalizations.plugin_data.current_installed_demo),g=tt({demos_list:c}),[b,y]=(0,r.useState)(!1),[v,_]=(0,r.useState)({isError:!1,message:"",reason:"generic"}),[E,w]=(0,r.useState)({builder:""}),[k,O]=(0,r.useState)(!1);return(0,r.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 x();if(e.status&&511===e.status)return void y(!0);const t=await e.json();i(t),ot=t}catch(e){console.error("Blocksy:Dashboard:DemoInstall:demos_list",{response:e,reason:"frontend_starter_sites_fetch_failed"})}a(!1)}(!ot)},[]),b?(0,r.createElement)(M,null):(0,r.createElement)("div",{className:"ct-demos-list-container"},(0,r.createElement)(s.Transition,{items:o,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return{duration:300}}},function(e,t){return t?(0,r.createElement)(s.animated.p,{style:e,className:"ct-loading-text"},(0,r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 100 100"},(0,r.createElement)("g",{transform:"translate(50,50)"},(0,r.createElement)("g",{transform:"scale(1)"},(0,r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"currentColor"}),(0,r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))),(0,l.__)("Loading Starter Sites...","blocksy-companion")):v.isError?(0,r.createElement)(s.animated.div,{style:e},"ajax_request_failed"===v.reason&&(0,r.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,r.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,r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:v.message}}),(0,r.createElement)(J,null)):(0,r.createElement)(s.animated.div,{style:e},(0,r.createElement)(r.Fragment,null,(0,r.createElement)(nt.Provider,{value:{currentDemo:d,pluginsStatus:u,setPluginsStatus:m,installerBlockingReleased:k,setInstallerBlockingReleased:O,setCurrentDemo:p,currentlyInstalledDemo:f,setCurrentlyInstalledDemo:h,unfiltered_demos_list:g.unfiltered_demos_list,demos_list:g.demos_list,filters:g.filters,setFilters:g.setFilters,allPlans:g.allPlans,allCategories:g.allCategories}},g.display(),(0,r.createElement)(se,null),(0,r.createElement)(Be,null)),(0,r.createElement)(J,null)))}))};function at(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}x().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,r.createElement)(D,e)},path:"/extensions"}),e.push({Component:function(e){return(0,r.createElement)(X,e)},path:"/extensions/:extension"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({Component:function(e){return(0,r.createElement)(rt,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?at(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):at(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,r.createElement)("span",null,"PRO"))})}()}();