Current File : /home/kelaby89/onlycnc.com.au/wp-content/plugins/gutenverse-companion/assets/js/wizard.js |
(()=>{var e={580:(e,t,n)=>{var r=n(110)(n(325),"DataView");e.exports=r},223:(e,t,n)=>{var r=n(110)(n(325),"Map");e.exports=r},804:(e,t,n)=>{var r=n(110)(n(325),"Promise");e.exports=r},545:(e,t,n)=>{var r=n(110)(n(325),"Set");e.exports=r},873:(e,t,n)=>{var r=n(325).Symbol;e.exports=r},303:(e,t,n)=>{var r=n(110)(n(325),"WeakMap");e.exports=r},552:(e,t,n)=>{var r=n(873),a=n(659),o=n(350),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?a(e):o(e)}},534:(e,t,n)=>{var r=n(552),a=n(346);e.exports=function(e){return a(e)&&"[object Arguments]"==r(e)}},83:(e,t,n)=>{var r=n(882),a=n(296),o=n(805),i=n(473),l=/^\[object .+?Constructor\]$/,c=Function.prototype,s=Object.prototype,u=c.toString,m=s.hasOwnProperty,p=RegExp("^"+u.call(m).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||a(e))&&(r(e)?p:l).test(i(e))}},901:(e,t,n)=>{var r=n(552),a=n(294),o=n(346),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&a(e.length)&&!!i[r(e)]}},984:(e,t,n)=>{var r=n(527),a=n(650),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},301:e=>{e.exports=function(e){return function(t){return e(t)}}},481:(e,t,n)=>{var r=n(325)["__core-js_shared__"];e.exports=r},840:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},110:(e,t,n)=>{var r=n(83),a=n(392);e.exports=function(e,t){var n=a(e,t);return r(n)?n:void 0}},659:(e,t,n)=>{var r=n(873),a=Object.prototype,o=a.hasOwnProperty,i=a.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var a=i.call(e);return r&&(t?e[l]=n:delete e[l]),a}},861:(e,t,n)=>{var r=n(580),a=n(223),o=n(804),i=n(545),l=n(303),c=n(552),s=n(473),u="[object Map]",m="[object Promise]",p="[object Set]",d="[object WeakMap]",v="[object DataView]",f=s(r),g=s(a),h=s(o),w=s(i),b=s(l),E=c;(r&&E(new r(new ArrayBuffer(1)))!=v||a&&E(new a)!=u||o&&E(o.resolve())!=m||i&&E(new i)!=p||l&&E(new l)!=d)&&(E=function(e){var t=c(e),n="[object Object]"==t?e.constructor:void 0,r=n?s(n):"";if(r)switch(r){case f:return v;case g:return u;case h:return m;case w:return p;case b:return d}return t}),e.exports=E},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},296:(e,t,n)=>{var r,a=n(481),o=(r=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},527:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},650:(e,t,n)=>{var r=n(335)(Object.keys,Object);e.exports=r},9:(e,t,n)=>{e=n.nmd(e);var r=n(840),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,i=o&&o.exports===a&&r.process,l=function(){try{return o&&o.require&&o.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=l},350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},335:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},325:(e,t,n)=>{var r=n(840),a="object"==typeof self&&self&&self.Object===Object&&self,o=r||a||Function("return this")();e.exports=o},473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},428:(e,t,n)=>{var r=n(534),a=n(346),o=Object.prototype,i=o.hasOwnProperty,l=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return a(e)&&i.call(e,"callee")&&!l.call(e,"callee")};e.exports=c},449:e=>{var t=Array.isArray;e.exports=t},894:(e,t,n)=>{var r=n(882),a=n(294);e.exports=function(e){return null!=e&&a(e.length)&&!r(e)}},656:(e,t,n)=>{e=n.nmd(e);var r=n(325),a=n(935),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,l=i&&i.exports===o?r.Buffer:void 0,c=(l?l.isBuffer:void 0)||a;e.exports=c},193:(e,t,n)=>{var r=n(984),a=n(861),o=n(428),i=n(449),l=n(894),c=n(656),s=n(527),u=n(167),m=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(l(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||u(e)||o(e)))return!e.length;var t=a(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(s(e))return!r(e).length;for(var n in e)if(m.call(e,n))return!1;return!0}},882:(e,t,n)=>{var r=n(552),a=n(805);e.exports=function(e){if(!a(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},167:(e,t,n)=>{var r=n(901),a=n(301),o=n(9),i=o&&o.isTypedArray,l=i?a(i):r;e.exports=l},935:e=>{e.exports=function(){return!1}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r](o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var a=r.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=r[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{"use strict";const e=window.React,t=window.wp.element;function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const i=window.wp.i18n;var l=function(t){var n=t.updateProgress,r=window.GutenverseCompanionConfig,a=r.images,o=r.upgradePro;return(0,e.createElement)("div",{className:"upgrade-pro-wrapper"},(0,e.createElement)("div",{className:"upgrade-pro-content"},(0,e.createElement)("img",{className:"background",src:a+"/bg-upgrade-wizard.png"}),(0,e.createElement)("h3",{className:"content-title"},(0,i.__)("Unlock Limitless Possibilities with ","gutenverse-companion"),(0,e.createElement)("span",{className:"gradient-text"},(0,i.__)("Gutenverse PRO","gutenverse-companion"))),(0,e.createElement)("p",{className:"content-desc"},(0,i.__)("Empowering you to build a website that truly stands out with advanced features and seamless integration.","gutenverse-companion")),(0,e.createElement)("div",{className:"upgrade-pro-button",onClick:function(){return window.open(o,"_blank")}},(0,e.createElement)("div",{className:"button-content-wrapper"},(0,e.createElement)("span",null,(0,i.__)("Upgrade To PRO","gutenverse-companion")),(0,e.createElement)("svg",{width:16,height:16,viewBox:"0 0 15 15",fill:"white",transform:"translate(0,0)",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M3.25 9.5L2 2.625L5.4375 5.75L7.625 2L9.8125 5.75L13.25 2.625L12 9.5H3.25ZM12 11.375C12 11.75 11.75 12 11.375 12H3.875C3.5 12 3.25 11.75 3.25 11.375V10.75H12V11.375Z",fill:"white"})))),(0,e.createElement)("img",{className:"upgrade-image",src:a+"/upgrade-content.png"})),(0,e.createElement)("div",{className:"upgrade-pro-actions"},(0,e.createElement)("div",{onClick:function(){return n("importTemplate",-1)},className:"button-back"},(0,e.createElement)("svg",{width:"16",height:"9",viewBox:"0 0 16 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M15 5.1C15.3314 5.1 15.6 4.83137 15.6 4.5C15.6 4.16863 15.3314 3.9 15 3.9V5.1ZM0.575736 4.07574C0.341421 4.31005 0.341421 4.68995 0.575736 4.92426L4.39411 8.74264C4.62843 8.97696 5.00833 8.97696 5.24264 8.74264C5.47696 8.50833 5.47696 8.12843 5.24264 7.89411L1.84853 4.5L5.24264 1.10589C5.47696 0.871573 5.47696 0.491674 5.24264 0.257359C5.00833 0.0230446 4.62843 0.0230446 4.39411 0.257359L0.575736 4.07574ZM15 3.9L1 3.9V5.1L15 5.1V3.9Z",fill:"#99A2A9"})),(0,i.__)("Back","gutenverse-companion")),(0,e.createElement)("div",{onClick:function(){return n("done",1)},className:"button-next"},(0,i.__)("Next","gutenverse-companion"))))};function c(e){return c="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},c(e)}function s(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const m=window.wp.hooks;var p=n(193),d=n.n(p),v=function(t){var n=t.fill,r=void 0===n?"white":n,a=t.size,o=void 0===a?16:a,i=t.transform,l=void 0===i?"translate(0,0)":i;return(0,e.createElement)("svg",{width:o,height:o,viewBox:"0 0 15 15",fill:r,transform:l,xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M3.25 9.5L2 2.625L5.4375 5.75L7.625 2L9.8125 5.75L13.25 2.625L12 9.5H3.25ZM12 11.375C12 11.75 11.75 12 11.375 12H3.875C3.5 12 3.25 11.75 3.25 11.375V10.75H12V11.375Z",fill:r}))},f=function(t){var n=t.fill,r=void 0===n?"white":n,a=t.transform,o=void 0===a?"translate(0,0)":a;return(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",transform:o,width:"16",height:"17",viewBox:"0 0 16 17",fill:r},(0,e.createElement)("path",{d:"M3.61233 12C2.96577 11.9999 2.33109 11.8317 1.77451 11.513C1.21792 11.1943 0.759819 10.7367 0.447988 10.188C0.136157 9.63937 -0.0179755 9.0197 0.00166833 8.39366C0.0213121 7.76763 0.214013 7.15817 0.559668 6.62887C0.905324 6.09956 1.39127 5.66981 1.96681 5.38443C2.54235 5.09905 3.1864 4.96851 3.83177 5.00642C4.47714 5.04433 5.10019 5.24931 5.63591 5.59996C6.17164 5.95062 6.60042 6.43411 6.87751 7H14.4515L16 8.5L14.4515 10L13.4192 9L12.3869 10L11.3546 9L10.3223 10L9.29001 9L8.2577 10H6.87751C6.58443 10.5985 6.12202 11.1042 5.54402 11.4582C4.96603 11.8123 4.29618 12.0001 3.61233 12ZM2.58002 9.5C2.8538 9.5 3.11638 9.39464 3.30997 9.20711C3.50357 9.01957 3.61233 8.76522 3.61233 8.5C3.61233 8.23478 3.50357 7.98043 3.30997 7.79289C3.11638 7.60536 2.8538 7.5 2.58002 7.5C2.30624 7.5 2.04366 7.60536 1.85007 7.79289C1.65647 7.98043 1.54771 8.23478 1.54771 8.5C1.54771 8.76522 1.65647 9.01957 1.85007 9.20711C2.04366 9.39464 2.30624 9.5 2.58002 9.5Z",fill:r}))};function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){u(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}var w=function(t){return t.template.pro?(0,e.createElement)(b,h({},t)):(0,e.createElement)(E,h({},t))},b=function(t){var n=t.text,r=void 0===n?(0,i.__)("Upgrade To PRO","--gctd--"):n,a=t.link,o=void 0===a?null:a,l=t.template,c=window.GutenverseConfig||window.GutenverseDashboard||{},s=c.upgradeProUrl,u=c.adminUrl,p=c.api,g=o||s,w=u+"admin.php?page=gutenverse&path=license",b=p+"/account/license",y=function(t,n,r,a){return(0,e.createElement)("a",{href:r?g:a?b:w,className:"left button-upgrade-pro",target:"_blank",rel:"noreferrer"},(0,e.createElement)(e.Fragment,null,t,"crown"===n?(0,e.createElement)(v,null):(0,e.createElement)(f,null)))};return(0,e.createElement)((function(){var n,a;return d()(null===(n=window)||void 0===n?void 0:n.gprodata)?y(r,"crown",!1):(0,m.applyFilters)("gutenverse.button.pro.banner",y((0,i.__)("Activate License","--gctd--"),"key",!1),y((0,i.__)("Renew License","--gctd--"),"key",!1),(0,e.createElement)(e.Fragment,null,null!=l&&null!==(a=l.status)&&void 0!==a&&a.need_upgrade?y((0,i.__)("Upgrade License","gutenverse-companion"),"key",!1,!0):(0,e.createElement)(E,h({},t))))}),null)},E=function(t){var n,r,a,o,l=t.key,c=t.templateList,s=t.template,u=t.setAdditional,m=t.setOpen,p=t.importTemplates,d=t.setSwitchModal,v=t.setSelectedTemplate;return(0,e.createElement)("div",{className:"button-import-page ".concat(null!=s&&null!==(n=s.status)&&void 0!==n&&n.exists?null!=s&&null!==(r=s.status)&&void 0!==r&&r.using_template?"imported":"switch":"import"),onClick:function(){if(s.acf||s.post){var e=[];s.acf&&e.push({id:1,label:"ACF Data",checked:!0,desc:"Include additional ACF data to be imported on the template import."}),s.post&&e.push({id:2,label:"Post Demo",checked:!0,desc:"Include additional posts demo to be imported on the template import."}),s.status.using_template||(u(e),m(l))}else{var t,n;u([{id:1,label:"ACF Data",checked:!1},{id:2,label:"Post Demo",checked:!1}]),s.status.using_template&&null!=s&&null!==(t=s.status)&&void 0!==t&&t.exists||(!s.status.using_template&&(null==s||null===(n=s.status)||void 0===n?void 0:n.exists)?(u([{id:1,label:"Replace",checked:!1,desc:"Replace the existing page with the new one if a page with the same name already exists."},{id:2,label:"Keep a Copy",checked:!1,desc:"Keep both the existing page and the new one if a page with the same name already exists."},{id:3,label:"Do not Import",checked:!1,desc:"Skip importing the new page if a page with the same name already exists."}]),d(!0),v(s)):p(s,c.find((function(e){var t;return null==e||null===(t=e.status)||void 0===t?void 0:t.using_template}))))}}},null!=s&&null!==(a=s.status)&&void 0!==a&&a.exists?null!=s&&null!==(o=s.status)&&void 0!==o&&o.using_template?(0,i.__)("Currently Used","gutenverse-companion"):(0,i.__)("Switch Template","gutenverse-companion"):(0,i.__)("Import Demo","gutenverse-companion"))};const y=window.wp.apiFetch;var C=n.n(y);const x=window.wp.url;var _=function(){return new Promise((function(e){var t=window.GutenverseCompanionConfig.theme_slug;C()({path:"gutenverse-companion/v1/demo/get",method:"POST",data:(0,m.applyFilters)("gutenverse.library.import.parameter",{theme_slug:t})}).then((function(t){e(t)})).catch((function(t){alert(t.message),e([])}))}))},N=function(t){var n=t.importerStep,r=void 0===n?["Fetching Data","Importing Assets","Deploying Content"]:n,a=t.importerNotice,o=void 0===a?(0,i.__)("Importing “Home” demo in progress...","gutenverse-companion"):a,l=t.importerCurrent,c=void 0===l?2:l,s=t.importerStatus,u=void 0===s?(0,i.__)("Import: Demo Home....","gutenverse-companion"):s,m=t.headerText,p=void 0===m?(0,i.__)("Important Notice","gutenverse-companion"):m,d=t.warnText,v=void 0===d?(0,i.__)("Please do not refresh or close the page while importing data is in progress.","gutenverse-companion"):d,f=t.completeTitle,g=void 0===f?(0,i.__)("Install Demo Completed","gutenverse-companion"):f,h=t.completeSubtitle,w=void 0===h?(0,i.__)("All Demo is successfully imported!","gutenverse-companion"):h,b=t.done,E=void 0!==b&&b,y=t.close,C=void 0===y?function(){}:y;return(0,e.createElement)("div",{className:"gutenverse-importer-wrapper-modal-wizzard"},(0,e.createElement)("div",{className:"importer-modal"},E?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"import-complete"},(0,e.createElement)("div",{className:"auth-icon-status-wrapper"},(0,e.createElement)("svg",{viewBox:"0 0 160 160"},(0,e.createElement)("defs",null,(0,e.createElement)("circle",{id:"circle-clip",cx:"50%",cy:"50%",r:"18%"}),(0,e.createElement)("clipPath",{id:"avatar-clip"},(0,e.createElement)("use",{href:"#circle-clip"}))),(0,e.createElement)("circle",{cx:"50%",cy:"50%",r:"18%",fill:"white",fillOpacity:"1"},(0,e.createElement)("animate",{attributeName:"r",values:"18%;50%",dur:"4s",repeatCount:"indefinite"}),(0,e.createElement)("animate",{attributeName:"fill-opacity",values:"1;0",dur:"4s",repeatCount:"indefinite"})),(0,e.createElement)("circle",{cx:"50%",cy:"50%",r:"18%",fill:"white",fillOpacity:"1"},(0,e.createElement)("animate",{attributeName:"r",values:"18%;50%",dur:"4s",begin:"1s",repeatCount:"indefinite"}),(0,e.createElement)("animate",{attributeName:"fill-opacity",values:"1;0",dur:"4s",begin:"1s",repeatCount:"indefinite"})),(0,e.createElement)("circle",{cx:"50%",cy:"50%",r:"18%",fill:"white",fillOpacity:"1"},(0,e.createElement)("animate",{attributeName:"r",values:"18%;50%",dur:"4s",begin:"2s",repeatCount:"indefinite"}),(0,e.createElement)("animate",{attributeName:"fill-opacity",values:"1;0",dur:"4s",begin:"2s",repeatCount:"indefinite"})),(0,e.createElement)("circle",{cx:"50%",cy:"50%",r:"18%",fill:"white",fillOpacity:"1"},(0,e.createElement)("animate",{attributeName:"r",values:"18%;50%",dur:"4s",begin:"3s",repeatCount:"indefinite"}),(0,e.createElement)("animate",{attributeName:"fill-opacity",values:"1;0",dur:"4s",begin:"3s",repeatCount:"indefinite"}))),(0,e.createElement)("div",{className:"auth-status-icon"},(0,e.createElement)("svg",{width:"30",height:"23",viewBox:"0 0 30 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("g",{filter:"url(#filter0_b_1867_7047)"},(0,e.createElement)("path",{d:"M29.9987 2.66689L9.9987 22.6669L0.832031 13.5002L3.18203 11.1502L9.9987 17.9502L27.6487 0.316895L29.9987 2.66689Z",fill:"#1bc87f"})),(0,e.createElement)("defs",null,(0,e.createElement)("filter",{id:"filter0_b_1867_7047",x:"-3.16797",y:"-3.68311",width:"37.168",height:"30.3501",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},(0,e.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,e.createElement)("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:"2"}),(0,e.createElement)("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_1867_7047"}),(0,e.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_backgroundBlur_1867_7047",result:"shape"})))))),(0,e.createElement)("div",{className:"complete-title"},g),(0,e.createElement)("div",{className:"complete-subtitle"},w),(0,e.createElement)("div",{className:"close-buttom",onClick:function(){return C()}},(0,i.__)("Close","gutenverse-companion")))):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"importer-header"},(0,e.createElement)("span",null,p)),(0,e.createElement)("div",{className:"importer-body"},(0,e.createElement)("div",{className:"importer-warn"},(0,e.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M10 0C4.47754 0 0 4.47915 0 10C0 15.5241 4.47754 20 10 20C15.5225 20 20 15.5241 20 10C20 4.47915 15.5225 0 10 0ZM10 4.43548C10.9353 4.43548 11.6935 5.19371 11.6935 6.12903C11.6935 7.06435 10.9353 7.82258 10 7.82258C9.06468 7.82258 8.30645 7.06435 8.30645 6.12903C8.30645 5.19371 9.06468 4.43548 10 4.43548ZM12.2581 14.6774C12.2581 14.9446 12.0414 15.1613 11.7742 15.1613H8.22581C7.95859 15.1613 7.74194 14.9446 7.74194 14.6774V13.7097C7.74194 13.4425 7.95859 13.2258 8.22581 13.2258H8.70968V10.6452H8.22581C7.95859 10.6452 7.74194 10.4285 7.74194 10.1613V9.19355C7.74194 8.92633 7.95859 8.70968 8.22581 8.70968H10.8065C11.0737 8.70968 11.2903 8.92633 11.2903 9.19355V13.2258H11.7742C12.0414 13.2258 12.2581 13.4425 12.2581 13.7097V14.6774Z",fill:"#FFC908"})),(0,e.createElement)("span",null,v)),(0,e.createElement)("div",{className:"importer-step"},(0,e.createElement)("div",{className:"import-step-notice"},o),(0,e.createElement)("div",{className:"importer-inner-step"},r.map((function(t,n){var r=n+1;return(0,e.createElement)("div",{key:n,className:"steps ".concat(c>r?"done":c==r?"current":"")},c>r?(0,e.createElement)("svg",{width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("rect",{x:"0.5",y:"2.5",width:"15",height:"15",rx:"7.5",fill:"#3B57F7"}),(0,e.createElement)("rect",{x:"0.5",y:"2.5",width:"15",height:"15",rx:"7.5",stroke:"#3B57F7"}),(0,e.createElement)("path",{d:"M12 7L6.5 12.5L4 10",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"})):(0,e.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("rect",{x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5",fill:"white"}),(0,e.createElement)("rect",{x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5",stroke:"#D0D5DD"})),(0,e.createElement)("div",null,t),c>r?(0,e.createElement)("span",{className:"completed"},(0,i.__)("Completed","gutenverse-companion")):c==r?(0,e.createElement)("div",{className:"loading"},(0,e.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M8 1C8.13261 1 8.25979 1.05268 8.35355 1.14645C8.44732 1.24021 8.5 1.36739 8.5 1.5V4.5C8.5 4.63261 8.44732 4.75979 8.35355 4.85355C8.25979 4.94732 8.13261 5 8 5C7.86739 5 7.74022 4.94732 7.64645 4.85355C7.55268 4.75979 7.5 4.63261 7.5 4.5V1.5C7.5 1.36739 7.55268 1.24021 7.64645 1.14645C7.74022 1.05268 7.86739 1 8 1ZM8 11C8.13261 11 8.25979 11.0527 8.35355 11.1464C8.44732 11.2402 8.5 11.3674 8.5 11.5V14.5C8.5 14.6326 8.44732 14.7598 8.35355 14.8536C8.25979 14.9473 8.13261 15 8 15C7.86739 15 7.74022 14.9473 7.64645 14.8536C7.55268 14.7598 7.5 14.6326 7.5 14.5V11.5C7.5 11.3674 7.55268 11.2402 7.64645 11.1464C7.74022 11.0527 7.86739 11 8 11ZM15 8C15 8.13261 14.9473 8.25979 14.8536 8.35355C14.7598 8.44732 14.6326 8.5 14.5 8.5H11.5C11.3674 8.5 11.2402 8.44732 11.1464 8.35355C11.0527 8.25979 11 8.13261 11 8C11 7.86739 11.0527 7.74022 11.1464 7.64645C11.2402 7.55268 11.3674 7.5 11.5 7.5H14.5C14.6326 7.5 14.7598 7.55268 14.8536 7.64645C14.9473 7.74022 15 7.86739 15 8ZM5 8C5 8.13261 4.94732 8.25979 4.85355 8.35355C4.75979 8.44732 4.63261 8.5 4.5 8.5H1.5C1.36739 8.5 1.24021 8.44732 1.14645 8.35355C1.05268 8.25979 1 8.13261 1 8C1 7.86739 1.05268 7.74022 1.14645 7.64645C1.24021 7.55268 1.36739 7.5 1.5 7.5H4.5C4.63261 7.5 4.75979 7.55268 4.85355 7.64645C4.94732 7.74022 5 7.86739 5 8ZM3.05 3.05C3.14376 2.95626 3.27092 2.90361 3.4035 2.90361C3.53608 2.90361 3.66324 2.95626 3.757 3.05L5.88 5.172C5.97108 5.2663 6.02148 5.3926 6.02034 5.5237C6.0192 5.6548 5.96661 5.7802 5.87391 5.87291C5.78121 5.96561 5.6558 6.0182 5.5247 6.01934C5.3936 6.02048 5.2673 5.97008 5.173 5.879L3.05 3.757C2.95626 3.66324 2.90361 3.53608 2.90361 3.4035C2.90361 3.27092 2.95626 3.14376 3.05 3.05ZM10.121 10.121C10.2148 10.0273 10.3419 9.97461 10.4745 9.97461C10.6071 9.97461 10.7342 10.0273 10.828 10.121L12.95 12.243C13.0411 12.3373 13.0915 12.4636 13.0903 12.5947C13.0892 12.7258 13.0366 12.8512 12.9439 12.9439C12.8512 13.0366 12.7258 13.0892 12.5947 13.0903C12.4636 13.0915 12.3373 13.0411 12.243 12.95L10.121 10.828C10.0273 10.7342 9.97461 10.6071 9.97461 10.4745C9.97461 10.3419 10.0273 10.2148 10.121 10.121ZM12.95 3.051C13.0434 3.14472 13.0959 3.27166 13.0959 3.404C13.0959 3.53634 13.0434 3.66328 12.95 3.757L10.828 5.88C10.7337 5.97108 10.6074 6.02148 10.4763 6.02034C10.3452 6.0192 10.2198 5.96661 10.1271 5.87391C10.0344 5.78121 9.9818 5.6558 9.98066 5.5247C9.97952 5.3936 10.0299 5.2673 10.121 5.173L12.243 3.051C12.3368 2.95726 12.4639 2.90461 12.5965 2.90461C12.7291 2.90461 12.8562 2.95726 12.95 3.051ZM5.879 10.121C5.97274 10.2148 6.02539 10.3419 6.02539 10.4745C6.02539 10.6071 5.97274 10.7342 5.879 10.828L3.757 12.95C3.6627 13.0411 3.5364 13.0915 3.4053 13.0903C3.2742 13.0892 3.14879 13.0366 3.05609 12.9439C2.96339 12.8512 2.9108 12.7258 2.90966 12.5947C2.90852 12.4636 2.95892 12.3373 3.05 12.243L5.172 10.121C5.26576 10.0273 5.39292 9.97461 5.5255 9.97461C5.65808 9.97461 5.78524 10.0273 5.879 10.121Z",fill:"#3B57F7"}))):"")}))))),(0,e.createElement)("div",{className:"importer-footer"},(0,e.createElement)("div",{className:"footer-info"},(0,e.createElement)("span",null,u),(0,e.createElement)("span",null,(0,i.__)("".concat(c-1,"/").concat(r.length," Completed"),"gutenverse-companion")))),(0,e.createElement)("div",{className:"footer-loading"},(0,e.createElement)("div",{className:"loading-status",style:{width:"".concat(c/r.length*100,"%")}})))))},j=function(t){var n=t.template,r=t.importerNotice,a=t.templateList,o=t.additional,l=t.headerText,c=void 0===l?(0,i.__)("Important Notice","gutenverse-companion"):l,s=t.warnText,u=void 0===s?(0,i.__)("Please do not refresh or close the page while importing data is in progress.","gutenverse-companion"):s,m=t.importerStatus,p=void 0===m?(0,i.__)("Import: Demo Home....","gutenverse-companion"):m,d=t.setSwitchModal,v=void 0===d?function(){}:d,f=t.importTemplates,g=void 0===f?function(){}:f,h=t.setSelectedTemplate,w=void 0===h?function(){}:h,b=t.handleCheckboxChange,E=void 0===b?function(){}:b,y={fontFamily:"Inter, sans-serif",fontSize:"12px",fontWeight:"normal",fontStretch:"normal",fontStyle:"normal",lineHeight:1.67,letterSpacing:"normal",textAlign:"left",color:"#9c9ead"};return(0,e.createElement)("div",{className:"gutenverse-importer-wrapper-modal-wizzard",onClick:function(){return v(!1)}},(0,e.createElement)("div",{className:"importer-modal",onClick:function(e){return e.stopPropagation()}},(0,e.createElement)("div",{className:"importer-header"},(0,e.createElement)("span",null,c)),(0,e.createElement)("div",{className:"importer-body"},(0,e.createElement)("div",{className:"importer-warn"},(0,e.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M10 0C4.47754 0 0 4.47915 0 10C0 15.5241 4.47754 20 10 20C15.5225 20 20 15.5241 20 10C20 4.47915 15.5225 0 10 0ZM10 4.43548C10.9353 4.43548 11.6935 5.19371 11.6935 6.12903C11.6935 7.06435 10.9353 7.82258 10 7.82258C9.06468 7.82258 8.30645 7.06435 8.30645 6.12903C8.30645 5.19371 9.06468 4.43548 10 4.43548ZM12.2581 14.6774C12.2581 14.9446 12.0414 15.1613 11.7742 15.1613H8.22581C7.95859 15.1613 7.74194 14.9446 7.74194 14.6774V13.7097C7.74194 13.4425 7.95859 13.2258 8.22581 13.2258H8.70968V10.6452H8.22581C7.95859 10.6452 7.74194 10.4285 7.74194 10.1613V9.19355C7.74194 8.92633 7.95859 8.70968 8.22581 8.70968H10.8065C11.0737 8.70968 11.2903 8.92633 11.2903 9.19355V13.2258H11.7742C12.0414 13.2258 12.2581 13.4425 12.2581 13.7097V14.6774Z",fill:"#FFC908"})),(0,e.createElement)("span",null,u)),(0,e.createElement)("div",{className:"importer-step"},(0,e.createElement)("div",{className:"import-step-notice"},r),(0,e.createElement)("div",{className:"importer-inner-step"},o.map((function(t,n){return(0,e.createElement)("div",{key:n,className:"steps ".concat(t.checked?"done":""),onClick:function(){return E(t.id,!1)},style:{cursor:"pointer",alignItems:"normal"}},t.checked?(0,e.createElement)("svg",{width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("rect",{x:"0.5",y:"2.5",width:"15",height:"15",rx:"7.5",fill:"#3B57F7"}),(0,e.createElement)("rect",{x:"0.5",y:"2.5",width:"15",height:"15",rx:"7.5",stroke:"#3B57F7"}),(0,e.createElement)("path",{d:"M12 7L6.5 12.5L4 10",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"})):(0,e.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("rect",{x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5",fill:"white"}),(0,e.createElement)("rect",{x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5",stroke:"#D0D5DD"})),(0,e.createElement)("div",null,t.label,(0,e.createElement)("br",null),(0,e.createElement)("span",{style:y},t.desc)))}))))),(0,e.createElement)("div",{className:"importer-footer"},(0,e.createElement)("div",{className:"footer-info"},(0,e.createElement)("span",null,p))),(0,e.createElement)("div",{className:"footer-loading"}),(0,e.createElement)("button",{style:{cursor:"pointer",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",padding:"10px 20px",borderRadius:"5px",backgroundColor:"#3b57f7",flexGrow:0,fontFamily:"Inter, sans-serif",fontSize:"12px",fontWeight:500,textAlign:"center",color:"#fff",transition:"background-color 0.3s ease, color 0.3s ease"},className:"button-confirm",onClick:function(){v(!1),w({}),g(n,a.find((function(e){var t;return null==e||null===(t=e.status)||void 0===t?void 0:t.using_template})),o)}},"Confirm")))};function S(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k=function(n){var r=n.updateProgress,a=o((0,t.useState)(!1),2),l=a[0],c=a[1],p=o((0,t.useState)(!1),2),v=p[0],f=p[1],g=o((0,t.useState)(!0),2),h=g[0],b=g[1],E=o((0,t.useState)(["Preparing Assets","Installing Plugin","Importing Pattern","Assigning Templates","Importing Pages","Importing Menus"]),2),y=E[0],O=E[1],k=o((0,t.useState)(!1),2),L=k[0],A=k[1],T=o((0,t.useState)(!1),2),I=T[0],F=T[1],D=o((0,t.useState)({}),2),M=D[0],B=D[1],H=o((0,t.useState)(""),2),V=H[0],Z=H[1],U=o((0,t.useState)(0),2),z=U[0],G=U[1],R=o((0,t.useState)(0),2),W=R[0],$=R[1],q=o((0,t.useState)(!1),2),K=q[0],J=q[1],Q=o((0,t.useState)(null),2),X=Q[0],Y=Q[1];console.log(l),window.dispatcher&&window.dispatcher.execute("gutenverse.server.after.construct","gutenverse-pro/action/after/construct",(function(){f(!v)}));var ee=function(e,t){var n,r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[{id:1,label:"Import ACF Data",checked:!1},{id:2,label:"Import Post Demo",checked:!1}],o=window.GutenverseCompanionConfig.plugins;O(["Preparing Assets","Installing Plugin","Importing Pattern","Assigning Templates","Importing Pages","Importing Menus"]);var i=[];a.forEach((function(e){e.checked&&i.push(e.label.toString().toLowerCase().trim().replace(/[\s\W-]+/g,"-").replace(/^-+|-+$/g,""))})),Z("Importing “".concat(e.title,"” demo in progress...")),$("Preparing Data: ".concat(e.title,"....")),G(1),J(!1),A(!0);var l=[{slug:"gutenverse",name:"Gutenverse",version:e.gutenverse,url:""}].concat(s(e.requirements)),u=[];l.forEach((function(e){var t;u.push({name:e.name,slug:e.slug,version:e.version,url:e.url,installed:!!o[e.slug],active:!(null===(t=o[e.slug])||void 0===t||!t.active)})})),null===(n=wp)||void 0===n||n.apiFetch({path:"gutenverse-companion/v1/demo/import",method:"POST",data:(0,m.applyFilters)("gutenverse.library.import.parameter",{name:e.title,demo_id:null==e?void 0:e.demo_id,installed:null==e||null===(r=e.status)||void 0===r?void 0:r.exists,active:null==t?void 0:t.title})}).then((function(){var t;$("Importing Plugin...."),G(2),t=e.title,c((function(e){return e.map((function(e){return e.title===t?P(P({},e),{},{status:P(P({},e.status),{},{using_template:!0,exists:!0})}):e}))})),setTimeout((function(){var t=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;u&&n<u.length?setTimeout((function(){var e,r=u[n];if($("Installing ".concat(r.name," Plugin...")),null!=r&&r.installed)if(null!=r&&r.active)t(n+1);else{var a;null===(a=wp)||void 0===a||a.apiFetch({path:"wp/v2/plugins/plugin?plugin=".concat(null==r?void 0:r.slug,"/").concat(null==r?void 0:r.slug),method:"POST",data:{status:"active"}}).then((function(){t(n+1)})).catch((function(){console.error("Error during plugin activation"),t(n)}))}else null===(e=wp)||void 0===e||e.apiFetch({path:"wp/v2/plugins",method:"POST",data:{slug:null==r?void 0:r.slug,status:"active"}}).then((function(){t(n+1)})).catch((function(){console.error("Error during installing plugin")}))}),1500):te(e,i)};t()}),500)})).catch((function(e){alert(e.message)}))},te=function(e,t){$("Preparing Patterns..."),G(3),C()({path:(0,x.addQueryArgs)("gutenverse-companion/v1/pattern/get"),method:"POST",data:{template:e.title,misc:t}}).then((function(n){ne(n,[],e,t)})).catch((function(){ne([],[],e,t)}))},ne=function(e,t,n,r){if(d()(e))re(t,n,r);else{var a=Object.keys(e)[0];$("Importing ".concat(e[a].title," Patterns..."));var o=[],i=e[a].images;(Array.isArray(i)&&i.length>0?i.reduce((function(e,t){return e.then((function(){var e="/lib/framework/assets/img/img-placeholder.jpg";if(t.includes(e)){var n=window.GutenverseCompanionConfig.plugins_url;return o.push("".concat(n,"/gutenverse").concat(e)),Promise.resolve()}return C()({path:"gutenverse-companion/v1/import/images",method:"POST",data:{imageUrl:t}}).then((function(e){o.push(e.url)})).catch((function(e){console.error("Image import failed:",e),o.push("")}))}))}),Promise.resolve()):Promise.resolve()).then((function(){var t=e[a].content.replace(/\\u([\dA-F]{4})/gi,(function(e,t){return String.fromCharCode(parseInt(t,16))}));o.forEach((function(e,n){var r=new RegExp("\\{\\{\\{image:".concat(n,":url\\}\\}\\}"),"g");t=t.replace(r,e)}));var i=r.reduce((function(t,n){var r="acf-data"===n?"acf":"post-demo"===n?"post":null;if(r){var o,i=(null===(o=e[a])||void 0===o||null===(o=o.misc)||void 0===o?void 0:o[r])||null;t.push(u({},n,i))}return t}),[]);return C()({path:"gutenverse-companion/v1/pattern/insert",method:"POST",data:{content:t,slug:e[a].pattern_slug,title:e[a].title,additional:JSON.stringify(i),sync:e[a].is_sync,demo_slug:n.title},headers:{"X-WP-Admin":!0}})})).then((function(o){e[a];var i=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,[a].map(S));ne(i,[].concat(s(t),[u({},o.slug,o.id)]),n,r)})).catch((function(e){console.error("Error:",e)}))}},re=function(e,t,n){$("Assigning templates...."),G(4),C()({path:"gutenverse-companion/v1/demo/assign",method:"POST",data:{template:t.title,pattern:e}}).then((function(){setTimeout((function(){ae(e,t,n)}),500)})).catch((function(){}))},ae=function(e,t,n){$("Importing pages...."),G(5),C()({path:"gutenverse-companion/v1/demo/pages",method:"POST",data:{template:t.title,pattern:e,misc:n[0]}}).then((function(){setTimeout((function(){oe(t,n)}),500)})).catch((function(){}))},oe=function(e,t){$("Importing menus...."),G(6),C()({path:"gutenverse-companion/v1/import/menus",method:"POST",data:{template:e.title,misc:t[0]}}).then((function(){setTimeout((function(){J(!0),Y("Demo ".concat(e.page," is successfully imported!"))}),500)})).catch((function(){}))};(0,t.useEffect)((function(){if((null==l?void 0:l.length)>0){var e=!0;null==l||l.map((function(t){var n,r;e=e&&(null==t||null===(n=t.status)||void 0===n?void 0:n.exists)&&(null==t||null===(r=t.status)||void 0===r?void 0:r.using_template)}))}}),[l]),(0,t.useEffect)((function(){_().then((function(e){null!=e&&e.demo_list&&(c(null==e?void 0:e.demo_list),b(!1))}))}),[v]);var ie={cursor:"pointer",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",padding:"10px 20px",borderRadius:"5px",backgroundColor:"#3b57f7",flexGrow:0,fontFamily:"Inter, sans-serif",fontSize:"12px",fontWeight:500,textAlign:"center",color:"#fff",transition:"background-color 0.3s ease, color 0.3s ease"},le={fontFamily:"Inter, sans-serif",fontSize:"12px",fontWeight:"normal",fontStretch:"normal",fontStyle:"normal",lineHeight:1.67,letterSpacing:"normal",textAlign:"left",color:"#9c9ead"},ce=o((0,t.useState)(!1),2),se=ce[0],ue=ce[1],me=o((0,t.useState)([]),2),pe=me[0],de=me[1],ve=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];de((function(n){return t?n.map((function(t){return t.id===e?P(P({},t),{},{checked:!t.checked}):t})):n.map((function(t){return t.id===e?P(P({},t),{},{checked:!0}):P(P({},t),{},{checked:!1})}))}))};return(0,e.createElement)("div",{className:"template-install"},L&&(0,e.createElement)(N,{importerStep:y,importerNotice:V,importerCurrent:z,importerStatus:W,completeSubtitle:X,done:K,close:function(){A(!1),c(!1),b(!0),_().then((function(e){null!=e&&e.demo_list&&(b(!1),c(null==e?void 0:e.demo_list))}))}}),I&&(0,e.createElement)(j,{importerNotice:V,importTemplates:ee,template:M,templateList:l,additional:pe,setSwitchModal:F,setSelectedTemplate:B,handleCheckboxChange:ve}),(0,e.createElement)("div",{className:"template-title"},(0,e.createElement)("h1",{className:"content-title"},(0,i.__)("Choose Prebuilt Templates","gutenverse-companion")),(0,e.createElement)("p",null,(0,i.__)("Discover a wide selection of themes, each carefully crafted to meet the unique needs of your website. Whether you're building a blog, portfolio, or business site.","gutenverse-companion"))),(0,e.createElement)("div",{className:"template-list"},h?(0,e.createElement)("div",{className:"loader-template"}):(0,e.createElement)(e.Fragment,null,d()(l)?(0,e.createElement)("div",{className:"no-template"},(0,e.createElement)("p",null,(0,i.__)("No template found"))):null==l?void 0:l.map((function(t,n){var r,a;return(0,e.createElement)("div",{className:"template-page",key:n},se===n&&(0,e.createElement)("div",{className:"gutenverse-importer-wrapper-modal-wizzard",onClick:function(){return ue(!1)}},(0,e.createElement)("div",{className:"importer-modal",onClick:function(e){return e.stopPropagation()}},(0,e.createElement)("div",{className:"importer-header"},(0,e.createElement)("span",null,"Additional Conent")),(0,e.createElement)("div",{className:"importer-body"},(0,e.createElement)("div",{className:"importer-warn"},(0,e.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M10 0C4.47754 0 0 4.47915 0 10C0 15.5241 4.47754 20 10 20C15.5225 20 20 15.5241 20 10C20 4.47915 15.5225 0 10 0ZM10 4.43548C10.9353 4.43548 11.6935 5.19371 11.6935 6.12903C11.6935 7.06435 10.9353 7.82258 10 7.82258C9.06468 7.82258 8.30645 7.06435 8.30645 6.12903C8.30645 5.19371 9.06468 4.43548 10 4.43548ZM12.2581 14.6774C12.2581 14.9446 12.0414 15.1613 11.7742 15.1613H8.22581C7.95859 15.1613 7.74194 14.9446 7.74194 14.6774V13.7097C7.74194 13.4425 7.95859 13.2258 8.22581 13.2258H8.70968V10.6452H8.22581C7.95859 10.6452 7.74194 10.4285 7.74194 10.1613V9.19355C7.74194 8.92633 7.95859 8.70968 8.22581 8.70968H10.8065C11.0737 8.70968 11.2903 8.92633 11.2903 9.19355V13.2258H11.7742C12.0414 13.2258 12.2581 13.4425 12.2581 13.7097V14.6774Z",fill:"#FFC908"})),(0,e.createElement)("span",null,"This ",null==t?void 0:t.title," demo contain additional content, import content for this demo:")),(0,e.createElement)("div",{className:"importer-step"},(0,e.createElement)("div",{className:"import-step-notice"},"This ",null==t?void 0:t.title," demo contain additional content, import content for this demo:"),(0,e.createElement)("div",{className:"importer-inner-step"},pe.map((function(t,n){return(0,e.createElement)("div",{key:n,className:"steps ".concat(t.checked?"done":""),onClick:function(){return ve(t.id)},style:{cursor:"pointer",alignItems:"normal"}},t.checked?(0,e.createElement)("svg",{width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("rect",{x:"0.5",y:"2.5",width:"15",height:"15",rx:"7.5",fill:"#3B57F7"}),(0,e.createElement)("rect",{x:"0.5",y:"2.5",width:"15",height:"15",rx:"7.5",stroke:"#3B57F7"}),(0,e.createElement)("path",{d:"M12 7L6.5 12.5L4 10",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"})):(0,e.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("rect",{x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5",fill:"white"}),(0,e.createElement)("rect",{x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5",stroke:"#D0D5DD"})),(0,e.createElement)("div",null,t.label,(0,e.createElement)("br",null),(0,e.createElement)("span",{style:le},t.desc)))}))))),(0,e.createElement)("div",{className:"importer-footer"},(0,e.createElement)("div",{className:"footer-info"},(0,e.createElement)("div",{style:ie,onClick:function(){t.status.using_template||(ee(t,l.find((function(e){var t;return null==e||null===(t=e.status)||void 0===t?void 0:t.using_template})),pe),ue(!1))}},"Import"))))),t.pro&&(0,e.createElement)("div",{className:"pro-flag"},(0,i.__)("PRO","gutenverse-companion")),(0,e.createElement)("div",{className:"template-thumbnail"},(0,e.createElement)("img",{src:null==t?void 0:t.cover}),(null==t||null===(r=t.status)||void 0===r?void 0:r.need_upgrade)&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"thumbnail-overlay"}),(0,e.createElement)("div",{className:"required-wrapper"},(0,e.createElement)("p",{className:"required-title"},"Required License"),(0,e.createElement)("p",{className:"required-tier"},function(e){var t=e.length;if(0===t)return"";if(1===t)return e[0].toString().charAt(0).toUpperCase()+e[0].slice(1);if(2===t)return e[0].charAt(0).toUpperCase()+e[0].slice(1)+", or "+e[1].charAt(0).toUpperCase()+e[1].slice(1);var n=e[t-1],r=e.slice(0,t-1);return(r=r.map((function(e){return e.charAt(0).toUpperCase()+e.slice(1)}))).join(", ")+", or "+n}(null==t||null===(a=t.status)||void 0===a?void 0:a.required_tier))))),(0,e.createElement)("div",{className:"template-page-desc"},(0,e.createElement)("h3",null,null==t?void 0:t.title),(0,e.createElement)("div",{className:"buttons"},(0,e.createElement)(w,{elementKey:n,templateList:l,template:t,setAdditional:de,setOpen:ue,importTemplates:ee,setSelectedTemplate:B,setSwitchModal:F}),(0,e.createElement)("div",{className:"button-view-demo",onClick:function(){return window.open(null==t?void 0:t.demo,"_blank")}},(0,i.__)("View Demo","gutenverse-companion")))))})))),(0,e.createElement)("div",{className:"template-actions"},(0,e.createElement)("div",{onClick:function(){return r("installPlugin",-1)},className:"button-skip"},(0,i.__)("Skip","gutenverse-companion")),(0,e.createElement)("div",{onClick:function(){return r("upgradePro",1)},className:"button-next"},(0,i.__)("Next","gutenverse-companion"))))};const L=function(){var n=o((0,t.useState)("importTemplate"),2),r=n[0],a=n[1],c=o((0,t.useState)(0),2),s=c[0],u=c[1],m=function(e,t){a(e),u(s+t)};return(0,e.createElement)("div",{className:"theme-wizard-wrapper"},(0,e.createElement)("div",{className:"theme-wizard"},(0,e.createElement)("div",{className:"wizard-header"},(0,e.createElement)("div",{className:"progress ".concat("importTemplate"===r?"active":""," ").concat(s>=0?"done":"")},(0,e.createElement)("p",{className:"number"},"1"),(0,e.createElement)("h3",{className:"progress-title"},(0,i.__)("Choose Template","gutenverse-companion"))),(0,e.createElement)("div",{className:"progress ".concat("upgradePro"===r?"active":""," ").concat(s>=1?"done":"")},(0,e.createElement)("p",{className:"number"},"2"),(0,e.createElement)("h3",{className:"progress-title"},(0,i.__)("Upgrade Your Site","gutenverse-companion"))),(0,e.createElement)("div",{className:"progress ".concat("done"===r?"active":""," ").concat(s>=2?"done":"")},(0,e.createElement)("p",{className:"number"},"3"),(0,e.createElement)("h3",{className:"progress-title"},(0,i.__)("Finalizing","gutenverse-companion")))),(0,e.createElement)("div",{className:"wizard-body"},function(){switch(r){case"done":var t=window.GutenverseCompanionConfig.images;return(0,e.createElement)("div",{className:"finalizing"},(0,e.createElement)("div",{className:"image-wrapper"},(0,e.createElement)("img",{className:"image-done",src:t+"/final.png"})),(0,e.createElement)("div",{className:"final-detail"},(0,e.createElement)("h3",{className:"final-title"},(0,i.__)("Congratulations All Set 🤩","gutenverse-companion")),(0,e.createElement)("p",{className:"final-desc"},(0,i.__)("This theme is built with Gutenverse, a powerful and lightweight Gutenberg blocks and page builder plugin for the WordPress Site Editor.","gutenverse-companion")),(0,e.createElement)("div",{onClick:function(){window.location.href="".concat(window.GutenverseCompanionConfig.admin_url)},className:"button-visit"},(0,i.__)("Visit Dashboard","gutenverse-companion"))));case"upgradePro":return(0,e.createElement)(l,{updateProgress:m});default:return(0,e.createElement)(k,{updateProgress:m})}}())))};n.p,document.getElementById("gutenverse-companion-wizard")&&document.addEventListener("DOMContentLoaded",(function(){(0,t.createRoot)(document.getElementById("gutenverse-companion-wizard")).render((0,e.createElement)(L,null))}))})()})();