File: /home/eblama1/mintawon.farm/wp-content/plugins/gutenkit-blocks-addon/build/admin/onboard/index.js
(()=>{var e={5338:(e,t,s)=>{"use strict";var a=s(5795);t.H=a.createRoot,a.hydrateRoot},5795:e=>{"use strict";e.exports=window.ReactDOM},6942:(e,t)=>{var s;!function(){"use strict";var a={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var s=arguments[t];s&&(e=o(e,n(s)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var s in e)a.call(e,s)&&e[s]&&(t=o(t,s));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(s=function(){return i}.apply(t,[]))||(e.exports=s)}()}},t={};function s(a){var i=t[a];if(void 0!==i)return i.exports;var n=t[a]={exports:{}};return e[a](n,n.exports,s),n.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var a in t)s.o(t,a)&&!s.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var a=t.getElementsByTagName("script");if(a.length)for(var i=a.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=a[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e+"../../"})(),(()=>{"use strict";var e=s(5338);const t=window.wp.element,a=(0,t.createContext)(null),i=window.ReactJSXRuntime,n={stepNumber:0,userMail:"",dataSharePermission:!0,pluginPermission:{getgenie:!1,"elementskit-lite":!1,"blocks-for-shopengine":!1,metform:!1,emailkit:!1,"popup-builder-block":!1,"wp-ultimate-review":!1,"wp-social":!1},isProcessing:!1,pluginData:{}},o=(e,t)=>{switch(t.type){case"SET_STEP_NUMBER":return{...e,stepNumber:t.stepNumber};case"SET_USER_MAIL":return{...e,userMail:t.userMail};case"SET_DATA_SHARE_PERMISSION":return{...e,dataSharePermission:t.dataSharePermission};case"SET_PLUGIN_PERMISSION":return{...e,pluginPermission:{...e.pluginPermission,[t.slug]:t.permission}};case"SET_PLUGIN_DATA":return{...e,pluginData:{...e.pluginData,[t.slug]:t.data}};case"SET_IS_PROCESSING":return{...e,isProcessing:t.isProcessing};default:return e}},r=({children:e})=>{const[s,r]=(0,t.useReducer)(o,n);return(0,i.jsx)(a.Provider,{value:{...s,dispatch:r},children:e})},l=()=>{const e=(0,t.useContext)(a);if(!e)throw new Error("Dashboard not found!");return e},c=(0,i.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"user",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"})}),d=(0,i.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"dashboard",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z"})}),p=(0,i.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"youtube",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M960 509.2c0-2.2 0-4.7-.1-7.6-.1-8.1-.3-17.2-.5-26.9-.8-27.9-2.2-55.7-4.4-81.9-3-36.1-7.4-66.2-13.4-88.8a139.52 139.52 0 00-98.3-98.5c-28.3-7.6-83.7-12.3-161.7-15.2-37.1-1.4-76.8-2.3-116.5-2.8-13.9-.2-26.8-.3-38.4-.4h-29.4c-11.6.1-24.5.2-38.4.4-39.7.5-79.4 1.4-116.5 2.8-78 3-133.5 7.7-161.7 15.2A139.35 139.35 0 0082.4 304C76.3 326.6 72 356.7 69 392.8c-2.2 26.2-3.6 54-4.4 81.9-.3 9.7-.4 18.8-.5 26.9 0 2.9-.1 5.4-.1 7.6v5.6c0 2.2 0 4.7.1 7.6.1 8.1.3 17.2.5 26.9.8 27.9 2.2 55.7 4.4 81.9 3 36.1 7.4 66.2 13.4 88.8 12.8 47.9 50.4 85.7 98.3 98.5 28.2 7.6 83.7 12.3 161.7 15.2 37.1 1.4 76.8 2.3 116.5 2.8 13.9.2 26.8.3 38.4.4h29.4c11.6-.1 24.5-.2 38.4-.4 39.7-.5 79.4-1.4 116.5-2.8 78-3 133.5-7.7 161.7-15.2 47.9-12.8 85.5-50.5 98.3-98.5 6.1-22.6 10.4-52.7 13.4-88.8 2.2-26.2 3.6-54 4.4-81.9.3-9.7.4-18.8.5-26.9 0-2.9.1-5.4.1-7.6v-5.6zm-72 5.2c0 2.1 0 4.4-.1 7.1-.1 7.8-.3 16.4-.5 25.7-.7 26.6-2.1 53.2-4.2 77.9-2.7 32.2-6.5 58.6-11.2 76.3-6.2 23.1-24.4 41.4-47.4 47.5-21 5.6-73.9 10.1-145.8 12.8-36.4 1.4-75.6 2.3-114.7 2.8-13.7.2-26.4.3-37.8.3h-28.6l-37.8-.3c-39.1-.5-78.2-1.4-114.7-2.8-71.9-2.8-124.9-7.2-145.8-12.8-23-6.2-41.2-24.4-47.4-47.5-4.7-17.7-8.5-44.1-11.2-76.3-2.1-24.7-3.4-51.3-4.2-77.9-.3-9.3-.4-18-.5-25.7 0-2.7-.1-5.1-.1-7.1v-4.8c0-2.1 0-4.4.1-7.1.1-7.8.3-16.4.5-25.7.7-26.6 2.1-53.2 4.2-77.9 2.7-32.2 6.5-58.6 11.2-76.3 6.2-23.1 24.4-41.4 47.4-47.5 21-5.6 73.9-10.1 145.8-12.8 36.4-1.4 75.6-2.3 114.7-2.8 13.7-.2 26.4-.3 37.8-.3h28.6l37.8.3c39.1.5 78.2 1.4 114.7 2.8 71.9 2.8 124.9 7.2 145.8 12.8 23 6.2 41.2 24.4 47.4 47.5 4.7 17.7 8.5 44.1 11.2 76.3 2.1 24.7 3.4 51.3 4.2 77.9.3 9.3.4 18 .5 25.7 0 2.7.1 5.1.1 7.1v4.8zM423 646l232-135-232-133z"})}),g=(0,i.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"smile",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"})}),u=(0,i.jsxs)("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),(0,i.jsx)("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsxs)("g",{id:"SVGRepo_iconCarrier",children:[" ",(0,i.jsxs)("g",{id:"Interface / Check_Big",children:[" ",(0,i.jsx)("path",{id:"Vector",d:"M4 12L8.94975 16.9497L19.5572 6.34326",stroke:"#3E77FC",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})," "]})," "]})]}),h=(0,i.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"arrow-left",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"})}),m=(0,i.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"mail",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"})}),k=(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 28 33",children:[(0,i.jsx)("defs",{children:(0,i.jsxs)("filter",{id:"icon",x:"0",y:"0",width:"28",height:"33",filterUnits:"userSpaceOnUse",children:[(0,i.jsx)("feOffset",{dx:"-1",dy:"1",input:"SourceAlpha"}),(0,i.jsx)("feGaussianBlur",{stdDeviation:"0.5",result:"blur"}),(0,i.jsx)("feFlood",{floodColor:"#af0548",floodOpacity:"0.8"}),(0,i.jsx)("feComposite",{operator:"in",in2:"blur"}),(0,i.jsx)("feComposite",{in:"SourceGraphic"})]})}),(0,i.jsx)("g",{transform:"matrix(1, 0, 0, 1, 0, 0)",filter:"url(#icon)",children:(0,i.jsx)("path",{id:"icon-2","data-name":"icon",d:"M12.428,4.287a3,3,0,0,1,5.145,0l9.7,16.169A3,3,0,0,1,24.7,25H5.3a3,3,0,0,1-2.572-4.543Z",transform:"translate(27.5 0.5) rotate(90)",fill:"#fff"})})]}),b=(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 22",fill:"none",children:[(0,i.jsx)("rect",{width:"22",height:"22",rx:"11",fill:"#0FA20C",fillOpacity:"0.1"}),(0,i.jsx)("rect",{width:"22",height:"22",rx:"11",fill:"#0FA20C",fillOpacity:"0.1"}),(0,i.jsx)("path",{d:"M15.4 8L9.35 14.02L6.6 11.27",stroke:"#0FA20C",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});var x=s(6942),v=s.n(x);const j=function(){const{stepNumber:e,dispatch:t}=l(),s=[{text:"Sign Up",icon:c},{text:"Website Powerup",icon:d},{text:"Tutorial",icon:p},{text:"Finalizing",icon:g}];return(0,i.jsxs)("ul",{className:"gkit-onboard-nav",children:[(0,i.jsx)("div",{className:"gkit-onboard-progressbar",style:{width:"129px"}}),s.map((a,n)=>{const{text:o,icon:r}=a,l=v()("gkit-onboard-nav-item",{active:0===n},{next:1===n},{last:n===s.length-1});return(0,i.jsxs)("li",{className:l,onClick:()=>(e=>{const s=document.querySelectorAll(".gkit-onboard-nav-item"),a=s[e];if(e>1&&!a.classList.contains("next")&&!a.classList.contains("selected"))return!1;t({type:"SET_STEP_NUMBER",stepNumber:e}),s.forEach((t,s)=>{t.classList.remove("active"),t.classList.remove("next"),s<e?t.classList.add("selected"):t.classList.remove("selected")}),a.classList.add("active"),s[e+1]?.classList.add("next");const i=a.closest(".gkit-onboard-nav"),n=a.classList.contains("last")?i.clientWidth:a.offsetLeft+a.clientWidth;i.querySelector(".gkit-onboard-progressbar").style.width=`${n}px`})(n),children:[(0,i.jsx)("div",{className:"gkit-onboard-nav-icon",children:e>n?u:r}),(0,i.jsx)("span",{className:"gkit-onboard-nav-text",children:o})]},n)})]})},f=window.wp.i18n,w=s.p+"images/shape-01.d0520f62.png",_=s.p+"images/shape-02.d1f63642.png",N=s.p+"images/shape-03.e715f5c1.png",S=s.p+"images/shape-04.b166430d.png",y=s.p+"images/shape-05.a4249750.png",C=s.p+"images/shape-06.a1145e3b.png",E=s.p+"images/shape-07.9de77810.png",P=s.p+"images/shape-09.34c27178.png",M=function(){const{userMail:e,dispatch:s}=l(),[a,n]=(0,t.useState)(e),[o,r]=(0,t.useState)(!1);return(0,i.jsx)("div",{className:"gkit-onboard-step-wrapper gkit-onboard-step-02",children:(0,i.jsxs)("div",{className:"gkit-onboard-step-2-inner",children:[(0,i.jsxs)("div",{className:"gkit-onboard-step-2-content",children:[(0,i.jsxs)("div",{className:"gkit-onboard-main-header",children:[(0,i.jsx)("h1",{className:"gkit-onboard-main-header--title",children:(0,i.jsxs)("strong",{children:[(0,f.__)("Welcome to","gutenkit-blocks-addon"),(0,i.jsx)("br",{}),(0,f.__)("the world of GutenKit.","gutenkit-blocks-addon")]})}),(0,i.jsx)("p",{className:"gkit-onboard-main-header--description",children:(0,f.__)("Signup to join over 3,20,000+ founders, marketers and developers in learning the best uses of WordPress","gutenkit-blocks-addon")})]}),(0,i.jsxs)("div",{className:"gkit-onboard-signup",children:[(0,i.jsx)("label",{htmlFor:"signup",children:m}),(0,i.jsx)("input",{name:"settings[newsletter_email]",id:"signup",type:"email",placeholder:"Enter your email address",value:a,onChange:e=>{const t=e.target.value;n(t),s({type:"SET_USER_MAIL",userMail:t}),r(""!==t&&!t.match(/^([\w.%+-]+)@([\w-]+\.)+([\w]{2,})$/i)),""===t&&r(!1)}})]}),o&&(0,i.jsx)("p",{className:"error",children:(0,f.__)("Please enter valid email.","gutenkit-blocks-addon")}),(0,i.jsxs)("p",{className:"gkit-onboard-signup--helptext",children:[(0,f.__)("We never spam.","gutenkit-blocks-addon")," ",(0,i.jsx)("span",{children:(0,f.__)("Promise!","gutenkit-blocks-addon")})]})]}),(0,i.jsxs)("div",{className:"gkit-onboard-shapes","aria-hidden":"true",children:[(0,i.jsx)("img",{src:w,alt:"",className:"shape-01"}),(0,i.jsx)("img",{src:_,alt:"",className:"shape-02"}),(0,i.jsx)("img",{src:N,alt:"",className:"shape-03"}),(0,i.jsx)("img",{src:S,alt:"",className:"shape-04"}),(0,i.jsx)("img",{src:y,alt:"",className:"shape-05"}),(0,i.jsx)("img",{src:C,alt:"",className:"shape-06"}),(0,i.jsx)("img",{src:E,alt:"",className:"shape-07"}),(0,i.jsx)("img",{src:P,alt:"",className:"shape-09"})]})]})})},L={getgenie:{slug:"getgenie",path:"getgenie/getgenie.php",title:(0,f.__)("AI Content & SEO Tool","gutenkit-blocks-addon"),text:(0,f.__)("Find top keywords, create winning content & track SEO results with AI.","gutenkit-blocks-addon")},"elementskit-lite":{slug:"elementskit-lite",path:"elementskit-lite/elementskit-lite.php",title:(0,f.__)("Page Builder Elements","gutenkit-blocks-addon"),text:(0,f.__)("Best companion for Elementor with top widgets and templates.","gutenkit-blocks-addon"),dependency:"elementor"},"blocks-for-shopengine":{slug:"blocks-for-shopengine",path:"blocks-for-shopengine/shopengine-gutenberg-addon.php",title:(0,f.__)("WooCommerce Builder","gutenkit-blocks-addon"),text:(0,f.__)("The ultimate solution to build a complete WooCommerce site in Gutenberg.","gutenkit-blocks-addon")},metform:{slug:"metform",path:"metform/metform.php",title:(0,f.__)("Form Builder","gutenkit-blocks-addon"),text:(0,f.__)("Most flexible form builder for Elementor with a wide range of features.","gutenkit-blocks-addon"),dependency:"elementor"},emailkit:{slug:"emailkit",path:"emailkit/EmailKit.php",title:(0,f.__)("Email Customizer","gutenkit-blocks-addon"),text:(0,f.__)("Drag-and-Drop Email Builder for WooCommerce & WordPress.","gutenkit-blocks-addon")},"popup-builder-block":{slug:"popup-builder-block",path:"popup-builder-block/popup-builder-block.php",title:(0,f.__)("Popup Builder","gutenkit-blocks-addon"),text:(0,f.__)("Design popups that convert, right in your WordPress dashboard.","gutenkit-blocks-addon")},"wp-ultimate-review":{slug:"wp-ultimate-review",path:"wp-ultimate-review/wp-ultimate-review.php",title:(0,f.__)("Review Management","gutenkit-blocks-addon"),text:(0,f.__)("Build credibility for your business with the all-in-one review plugin.","gutenkit-blocks-addon")},"wp-social":{slug:"wp-social",path:"wp-social/wp-social.php",title:(0,f.__)("Social Integration","gutenkit-blocks-addon"),text:(0,f.__)("WordPress integration with popular social platforms to show social proof.","gutenkit-blocks-addon")}},T=s.p+"images/shape-10.3fcd1b31.png",A=s.p+"images/shape-11.4ee35d53.png",O=s.p+"images/shape-12.946b0285.png",I=s.p+"images/shape-13.95923a95.png",R=function({checked:e,onChange:t}){return(0,i.jsx)("div",{className:"gkit-checkbox-wrapper",children:(0,i.jsx)("input",{type:"checkbox",className:"gkit-checkbox-wrapper-input",onChange:e=>t(e.target.checked),checked:e})})},z=(0,t.memo)(({slug:e,text:t,title:s,pluginStatus:a})=>{const{dispatch:n,pluginPermission:o}=l(),r="active"===a;return(0,i.jsxs)("div",{className:"gkit-onboard-single-plugin",children:[r?(0,i.jsx)("div",{className:"gkit-onboard-single-plugin--activated",children:(0,f.__)("Activated","gutenkit-blocks-addon")}):(0,i.jsx)(R,{checked:o[e]||!1,onChange:t=>n({type:"SET_PLUGIN_PERMISSION",slug:e,permission:t})}),(0,i.jsxs)("div",{className:"gkit-onboard-single-plugin--text",children:[(0,i.jsx)("h3",{className:"gkit-onboard-single-plugin--title",children:s}),(0,i.jsx)("p",{className:"gkit-onboard-single-plugin--description",children:t})]})]})}),B=function(){const e=window.gutenkit_onboard_localize?.plugin_status||{},[s,a]=(0,t.useState)(e),n=Object.values(L);return(0,i.jsxs)("div",{className:"gkit-onboard-step-wrapper gkit-onboard-step-03",children:[(0,i.jsxs)("div",{className:"gkit-onboard-main-header",children:[(0,i.jsx)("h1",{className:"gkit-onboard-main-header--title",children:(0,i.jsx)("strong",{children:(0,f.__)("Take your website to the next level","gutenkit-blocks-addon")})}),(0,i.jsx)("p",{className:"gkit-onboard-main-header--description",children:(0,f.__)("We have some plugins you can install to get most from WordPress.","gutenkit-blocks-addon")}),(0,i.jsx)("p",{className:"gkit-onboard-main-header--description",children:(0,f.__)("These are absolute FREE to use.","gutenkit-blocks-addon")})]}),(0,i.jsx)("div",{className:"gkit-onboard-plugin-list",children:n.map((e,t)=>(0,i.jsx)(z,{...e,pluginStatus:s[e.slug]||{}},e.slug||t))}),(0,i.jsxs)("div",{className:"gkit-onboard-shapes","aria-hidden":"true",children:[(0,i.jsx)("img",{src:C,alt:"",className:"shape-06"}),(0,i.jsx)("img",{src:T,alt:"",className:"shape-10"}),(0,i.jsx)("img",{src:A,alt:"",className:"shape-11"}),(0,i.jsx)("img",{src:O,alt:"",className:"shape-12"}),(0,i.jsx)("img",{src:I,alt:"",className:"shape-13"})]})]})},W=s.p+"images/shape-14.08e101a8.png",G=s.p+"images/shape-15.37f85080.png",U=s.p+"images/shape-16.ee39bc0e.png",H=s.p+"images/shape-17.76e07bf4.png",D=window.wp.components,F=function(){const{dataSharePermission:e,dispatch:s}=l(),[a,n]=(0,t.useState)(e);return(0,i.jsxs)("div",{className:"gkit-onboard-step-wrapper gkit-onboard-step-04",children:[(0,i.jsx)("div",{className:"gkit-onboard-main-header",children:(0,i.jsx)("h1",{className:"gkit-onboard-main-header--title",children:(0,i.jsx)("strong",{children:(0,f.__)("Watch how to use our top widgets. Save 1 hour of your learning time.","gutenkit-blocks-addon")})})}),(0,i.jsxs)("div",{className:"gkit-onboard-tutorial",children:[(0,i.jsx)("div",{className:"gkit-onboard-tutorial--btn",children:(0,i.jsx)("a",{className:"gkit-onboard-tutorial--link",children:(0,i.jsx)("div",{onClick:()=>{const e=document.querySelector(".gkit-onboard-tutorial"),t=document.querySelector(".ekti-admin-video-tutorial-iframe");e.classList.toggle("show"),t.innerHTML='<div class="video-container"><iframe src="https://www.youtube-nocookie.com/embed/mCIO63p1wQM?showinfo=0&autoplay=1&mute=1&privacy=1&rel=0" allowfullscreen></iframe></div>'},className:"video-icon",children:k})})}),(0,i.jsx)("div",{className:"ekti-admin-video-tutorial-popup",children:(0,i.jsx)("div",{className:"ekti-admin-video-tutorial-iframe"})})]}),(0,i.jsxs)("div",{className:"gkit-onboard-tut-term hidden",children:[(0,i.jsx)(D.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:a,className:"gkit-onboard-tut-term--input",onChange:()=>{n(!a),s({type:"SET_DATA_SHARE_PERMISSION",dataSharePermission:!a})},label:(0,f.__)("Share non-sensitive diagnostic data and details about plugin usage.","gutenkit-blocks-addon")}),(0,i.jsx)("p",{className:"gkit-onboard-tut-term--helptext",children:(0,f.__)("We gather non-sensitive diagnostic data as well as information about plugin use. Your site's URL, WordPress and PHP versions, plugins and themes, as well as your email address, will be used to give you a discount coupon. This information enables us to ensure that this plugin remains consistent with the most common plugins and themes at all times. We pledge not to give you any spam, for sure.","gutenkit-blocks-addon")}),(0,i.jsx)("p",{className:"gkit-onboard-tut-term--help",onClick:e=>{const t=e.target;t.classList.toggle("active"),t.previousElementSibling.classList.toggle("active")},children:(0,f.__)("What types of information do we gather?","gutenkit-blocks-addon")})]}),(0,i.jsxs)("div",{className:"gkit-onboard-shapes","aria-hidden":"true",children:[(0,i.jsx)("img",{src:E,alt:"",className:"shape-07"}),(0,i.jsx)("img",{src:W,alt:"",className:"shape-14"}),(0,i.jsx)("img",{src:G,alt:"",className:"shape-15"}),(0,i.jsx)("img",{src:U,alt:"",className:"shape-16"}),(0,i.jsx)("img",{src:H,alt:"",className:"shape-17"})]})]})},$=s.p+"images/shape-21.bc6d6f8c.png",q=s.p+"images/shape-22.5ade5d35.png",V=window.wp.apiFetch;var K=s.n(V);const Y=function(){const{userMail:e,dataSharePermission:s,pluginData:a,dispatch:n,pluginPermission:o}=l(),{plugin_status:r}=window.gutenkit_onboard_localize,[c,d]=(0,t.useState)(!1),[p,g]=(0,t.useState)(0),[u,h]=(0,t.useState)([]);(0,t.useEffect)(()=>{(async()=>{n({type:"SET_IS_PROCESSING",isProcessing:!0}),await m();const e=80/Object.keys(o).length;for(const t in o)o[t]&&r[t]?"notInstalled"===r[t]?await x(t,e):"inactive"===r[t]?await k(t,e):"active"===r[t]?g(e=>e+10):g(t=>t+(e||10)):g(t=>t+(e||10));n({type:"SET_IS_PROCESSING",isProcessing:!1}),g(100)})()},[]);const m=async()=>{try{await K()({path:"/gutenkit/v1/onboard",method:"POST",data:{userMail:e,dataSharePermission:s,pluginPermission:o}}),g(20),h(e=>[...e,(0,f.__)("Setup Configurations","gutenkit-blocks-addon")])}catch(e){console.error(e)}},k=async(e,t)=>{try{const s={"blocks-for-shopengine":"shopengine-gutenberg-addon",emailkit:"EmailKit"}[e]??e;await K()({path:`/wp/v2/plugins/${e}/${s}`,method:"POST",data:{...a[e],status:"active"}}),g(e=>e+(t||10)),h(t=>[...t,L[e].title+(0,f.__)(" Activated","gutenkit-blocks-addon")])}catch(s){g(e=>e+(t||10)),h(t=>[...t,L[e].title+(0,f.__)(" Activated","gutenkit-blocks-addon")])}},x=async(e,t)=>{try{await K()({path:`/wp/v2/plugins?slug=${e}&status=active`,method:"POST",parse:!1}),g(e=>e+(t||10)),h(t=>[...t,L[e].title+(0,f.__)(" Activated","gutenkit-blocks-addon")])}catch(s){console.error(`Plugin installation failed for ${e}:`,s),g(e=>e+(t||10))}};return(0,i.jsxs)("div",{className:"gkit-onboard-step-wrapper finalizing gkit-onboard-step-06",children:[(0,i.jsxs)("div",{className:"gkit-onboard-main-header-wrapper",children:[(0,i.jsxs)("div",{className:"gkit-onboard-main-header",children:[(0,i.jsx)("h1",{className:"gkit-onboard-main-header--title",children:(0,i.jsx)("strong",{children:(0,f.__)("Great! You're All Set!","gutenkit-blocks-addon")})}),(0,i.jsxs)("div",{className:"gkit-onboard-main-header--description-wrapper",children:[(0,i.jsx)("p",{className:"gkit-onboard-main-header--description",children:p<100?(0,f.__)("Setting up your selected plugins and configurations. This may take a few moments.","gutenkit-blocks-addon"):(0,f.__)("Here's an overview of everything that is setup.","gutenkit-blocks-addon")}),(0,i.jsxs)("span",{className:"gkit-onboard-main-header--progress-percentage",children:[Math.round(p),"%"]})]}),(0,i.jsx)("div",{className:"gkit-onboard-main-header--progress-bar",children:(0,i.jsx)("div",{className:"gkit-onboard-main-header--progress",style:{width:`${p}%`}})})]}),(0,i.jsx)("div",{className:"configure-features",children:u.map((e,t)=>(0,i.jsx)("div",{className:"configure-features--item",children:(0,i.jsxs)("div",{className:"configure-features--wrapper",children:[(0,i.jsx)("span",{className:"configure-features--icon",children:b}),(0,i.jsx)("span",{children:e})]})},t))}),100===p&&(0,i.jsx)("div",{className:"gkit-onboard-congratulations",children:(0,i.jsx)("div",{className:"gkit-onboard-congratulations--content",children:(0,i.jsx)("button",{className:"gkit-onboard-btn gkit-onboard-btn--primary "+(c?"is-loading":""),disabled:c,onClick:()=>{d(!0),window.location.reload()},children:(0,f.__)("Go to WP Dashboard","gutenkit-blocks-addon")})})})]}),(0,i.jsxs)("div",{className:"gkit-onboard-shapes","aria-hidden":"true",children:[(0,i.jsx)("img",{src:S,alt:"",className:"shape-04"}),(0,i.jsx)("img",{src:E,alt:"",className:"shape-07"}),(0,i.jsx)("img",{src:G,alt:"",className:"shape-15"}),(0,i.jsx)("img",{src:$,alt:"",className:"shape-21"}),(0,i.jsx)("img",{src:q,alt:"",className:"shape-22"})]})]})},J=function(){const{stepNumber:e,dispatch:s,pluginPermission:a}=l(),[n,o]=(0,t.useState)(!1),r=Object.values(a).some(e=>!0===e);(0,t.useEffect)(()=>{if(1===e){const e=window.gutenkit_onboard_localize?.plugin_status||{},t=Object.keys(a);if(t.length>0){const s=t.every(t=>"active"===e[t]);o(s)}}},[e,a]);const c=()=>{document.querySelector(".gkit-onboard-nav-item.active").nextElementSibling.click(),s({type:"SET_STEP_NUMBER",stepNumber:e+1})},d=1===e?"powerup-pagination":"";return(0,i.jsxs)("div",{className:`gkit-onboard-pagination ${d}`,children:[0!==e&&(0,i.jsxs)("a",{className:"gkit-onboard-btn gkit-onboard-pagi-btn prev",onClick:()=>{document.querySelector(".gkit-onboard-nav-item.active").previousElementSibling.click(),s({type:"SET_STEP_NUMBER",stepNumber:e-1})},children:[(0,i.jsx)("div",{className:"arrow-left",children:h}),(0,i.jsx)("span",{children:(0,f.__)("Back","gutenkit-blocks-addon")})]}),1===e||"1"===e?(0,i.jsx)("div",{className:"powerup-pagination-btns",children:n?(0,i.jsx)("a",{className:"gkit-onboard-btn gkit-onboard-pagi-btn next",onClick:c,children:(0,f.__)("Continue","gutenkit-blocks-addon")}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("a",{className:"gkit-onboard-btn gkit-onboard-pagi-btn skip-next secondary",onClick:c,children:r?(0,f.__)("Continue","gutenkit-blocks-addon"):(0,f.__)("Skip & Continue","gutenkit-blocks-addon")}),(0,i.jsx)("a",{className:"gkit-onboard-btn gkit-onboard-pagi-btn unlock-all",onClick:()=>{Object.keys(a).forEach(e=>{s({type:"SET_PLUGIN_PERMISSION",slug:e,permission:!0})}),setTimeout(()=>{c()},100)},children:(0,f.__)("Unlock All & Continue","gutenkit-blocks-addon")})]})}):(0,i.jsx)("a",{className:"gkit-onboard-btn gkit-onboard-pagi-btn next",onClick:c,children:(0,f.__)("Continue","gutenkit-blocks-addon")})]})},Q=()=>{const{stepNumber:e}=l(),t={0:M,1:B,2:F,3:Y}[e];return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{className:"gkit-onboard-dashboard",children:(0,i.jsxs)("div",{className:"gkit_container",children:[(0,i.jsx)(j,{}),(0,i.jsx)(t,{}),3!==e&&(0,i.jsx)(J,{})]})})})};window.addEventListener("load",()=>{document.body.classList.add("gutenkit-admin-dashboard-body");const t=document.querySelector(".gutenkit-admin-dashboard");"onboard"===t.getAttribute("data-admin")&&(0,e.H)(t).render((0,i.jsx)(r,{children:(0,i.jsx)(Q,{})}))})})()})();