!function(){var e,t,n={1984:function(e,t,n){"use strict";var r=n(9307);t.Z=function(e){let{icon:t,size:n=24,...a}=e;return(0,r.cloneElement)(t,{width:n,height:n,...a})}},5430:function(e,t,n){"use strict";var r=n(9307),a=n(444);const o=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));t.Z=o},2644:function(e,t,n){"use strict";n.d(t,{BX:function(){return q},fS:function(){return J},Fl:function(){return Y},iD:function(){return Z},_j:function(){return U},S6:function(){return G}});var r=n(9307),a=n(5736),o=n(2819),i=n(9685),s=n(6974),l=n(9818),c=n(1392),u=n(444),d=(0,r.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(u.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})),p=(0,r.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(u.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})),f=(0,r.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(u.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),m=(0,r.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(u.Path,{d:"M19.75 9c0-1.257-.565-2.197-1.39-2.858-.797-.64-1.827-1.017-2.815-1.247-1.802-.42-3.703-.403-4.383-.396L11 4.5V6l.177-.001c.696-.006 2.416-.02 4.028.356.887.207 1.67.518 2.216.957.52.416.829.945.829 1.688 0 .592-.167.966-.407 1.23-.255.281-.656.508-1.236.674-1.19.34-2.82.346-4.607.346h-.077c-1.692 0-3.527 0-4.942.404-.732.209-1.424.545-1.935 1.108-.526.579-.796 1.33-.796 2.238 0 1.257.565 2.197 1.39 2.858.797.64 1.827 1.017 2.815 1.247 1.802.42 3.703.403 4.383.396L13 19.5h.714V22L18 18.5 13.714 15v3H13l-.177.001c-.696.006-2.416.02-4.028-.356-.887-.207-1.67-.518-2.216-.957-.52-.416-.829-.945-.829-1.688 0-.592.167-.966.407-1.23.255-.281.656-.508 1.237-.674 1.189-.34 2.819-.346 4.606-.346h.077c1.692 0 3.527 0 4.941-.404.732-.209 1.425-.545 1.936-1.108.526-.579.796-1.33.796-2.238z"})),h=(0,r.createElement)(u.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(u.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})),w=n(5430),g=n(2200);const v=(0,r.lazy)((()=>n.e(187).then(n.bind(n,7187)))),b=(0,r.lazy)((()=>n.e(880).then(n.bind(n,4880)))),_=(0,r.lazy)((()=>n.e(577).then(n.bind(n,7577)))),E=((0,r.lazy)((()=>n.e(552).then(n.bind(n,2552)))),(0,r.lazy)((()=>n.e(225).then(n.bind(n,3225)))),(0,r.lazy)((()=>n.e(567).then(n.bind(n,8567))))),y=(0,r.lazy)((()=>n.e(669).then(n.bind(n,5669)))),S=(0,r.lazy)((()=>n.e(441).then(n.bind(n,6441)))),x=(0,r.lazy)((()=>n.e(282).then(n.bind(n,1282)))),I=((0,r.lazy)((()=>n.e(527).then(n.bind(n,1527)))),(0,r.lazy)((()=>n.e(16).then(n.bind(n,8016)))),(0,r.lazy)((()=>n.e(800).then(n.bind(n,5800)))),(0,r.lazy)((()=>n.e(858).then(n.bind(n,8858)))),(0,r.lazy)((()=>n.e(331).then(n.bind(n,5331)))),(0,r.lazy)((()=>n.e(437).then(n.bind(n,3437)))),(0,r.lazy)((()=>n.e(867).then(n.bind(n,8867)))),(0,r.lazy)((()=>n.e(376).then(n.bind(n,9376)))),(0,r.lazy)((()=>n.e(888).then(n.bind(n,5888))))),D=(0,r.lazy)((()=>n.e(253).then(n.bind(n,2253)))),N=(0,r.lazy)((()=>n.e(58).then(n.bind(n,1058)))),P=[{path:"/",title:"",description:"",Component:()=>{const e=(0,s.s0)(),{firstStep:t}=(0,l.useSelect)((e=>({firstStep:e(i.h).getFirstStep()})),[]);return(0,r.useEffect)((()=>{e(t.path,{replace:!0,state:{origin:"index-redirect"}})})),(0,r.createElement)(r.Fragment,null)},Icon:(0,r.createElement)(r.Fragment,null)},{path:"/page/resources",title:(0,a.__)("Resources","wp-module-onboarding"),description:"",Component:b,Icon:d},{path:"/page/what-to-expect",title:(0,a.__)("What to Expect","wp-module-onboarding"),description:"",Component:_,Icon:p},{path:"*",title:(0,a.__)("Error 404","wp-module-onboarding"),description:"Please Check Again!",Component:v,Icon:p}],O=[{path:"/wp-setup/step/get-started/welcome",title:(0,a.__)("Welcome","wp-module-onboarding"),
/* translators: %s: website or store */
heading:(0,a.sprintf)((0,a.__)("Make your %s dreams a reality!","wp-module-onboarding"),(0,c.I)("website")),subheading:(0,a.__)("with WordPress and ","wp-module-onboarding"),description:(0,a.__)("We'll use this to personalize this onboarding and future recommendations","wp-module-onboarding"),Component:E,Icon:f,priority:20,VIEW:g.mz,SidebarComponents:{LearnMore:[N]}},{path:"/wp-setup/step/get-started/experience",title:(0,a.__)("WordPress Experience","wp-module-onboarding"),
/* translators: %s: website or store */
heading:(0,a.sprintf)((0,a.__)("Help us tailor this setup to your %s","wp-module-onboarding"),(0,c.I)("site")),subheading:(0,a.__)("What is your experience with WordPress?","wp-module-onboarding"),description:(0,a.__)("We'll use this to personalize this onboarding and future recommendations","wp-module-onboarding"),Component:y,Icon:f,priority:40,VIEW:g.mz,SidebarComponents:{LearnMore:[N]}},{path:"/wp-setup/step/get-started/site-primary",
/* translators: %s: website or store */
title:(0,a.sprintf)((0,a.__)("Primary %s Setup","wp-module-onboarding"),(0,c.I)("Site")),
/* translators: %s: website or store */
heading:(0,a.sprintf)((0,a.__)("Help us tailor this setup to your %s","wp-module-onboarding"),(0,c.I)("site")),
/* translators: %s: website or store */
subheading:(0,a.sprintf)((0,a.__)("What type of %s is it?","wp-module-onboarding"),(0,c.I)("site")),
/* translators: %s: website or store */
description:(0,a.sprintf)((0,a.__)("Setup more of your %s, show you around WordPress or share secrets to success -- we'll follow your lead on how you'd like to proceed.","wp-module-onboarding"),(0,c.I)("site")),Component:I,Icon:m,priority:60},{path:"/wp-setup/step/get-started/site-secondary",
/* translators: %s: website or store */
title:(0,a.sprintf)((0,a.__)("Secondary %s Setup","wp-module-onboarding"),(0,c.I)("Site")),
/* translators: %s: website or store */
heading:(0,a.sprintf)((0,a.__)("Help us tailor this setup to your %s","wp-module-onboarding"),(0,c.I)("site")),
/* translators: %s: website or store */
subheading:(0,a.sprintf)((0,a.__)("What type of %s is it?","wp-module-onboarding"),(0,c.I)("site")),
/* translators: %s: website or store */
description:(0,a.sprintf)((0,a.__)("Setup more of your %s, show you around WordPress or share secrets to success -- we'll follow your lead on how you'd like to proceed.","wp-module-onboarding"),(0,c.I)("site")),Component:D,Icon:m,priority:80},{path:"/wp-setup/step/top-priority",title:(0,a.__)("Top Priority","wp-module-onboarding"),heading:(0,a.__)("Tell us your top priority","wp-module-onboarding"),subheading:(0,a.__)("We'll prioritize getting you there.","wp-module-onboarding"),description:(0,a.__)("We'll recommend design choices, site options and products and features we have to offer.","wp-module-onboarding"),Component:S,Icon:h,priority:100},{path:"/wp-setup/step/basic-info",title:(0,a.__)("Basic Info","wp-module-onboarding"),
/* translators: %s: website or store */
heading:(0,a.sprintf)((0,a.__)("Introduce us to this %s","wp-module-onboarding"),(0,c.I)("website")),subheading:(0,a.__)("So we can introduce it to the web","wp-module-onboarding"),
/* translators: %s: website or store */
description:(0,a.sprintf)((0,a.__)("Help visitors, search results and social media identify your %s.","wp-module-onboarding"),(0,c.I)("site")),Component:x,Icon:w.Z,priority:120}],k=[...P,...O],C=()=>{const e=(0,o.filter)(O,(e=>!e.path.includes("/step/get-started"))),t={path:"/wp-setup/step/get-started/welcome",title:(0,a.__)("Get Started","wp-module-onboarding"),heading:(0,a.__)("Get Started","wp-module-onboarding"),Icon:f,VIEW:g.mz,priority:20};return e.push(t),(0,o.orderBy)(e,["priority"],["asc"])},T=()=>(0,o.filter)(O,(e=>e.path.includes("/step/design/"))),V=()=>(0,o.filter)(O,(e=>e.path.includes("/step/get-started")));var B=(0,r.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(u.Path,{fillRule:"evenodd",d:"M19.75 11H21V8.667L19.875 4H4.125L3 8.667V11h1.25v8.75h15.5V11zm-1.5 0H5.75v7.25H10V13h4v5.25h4.25V11zm-5.5-5.5h2.067l.486 3.24.028.76H12.75v-4zm-3.567 0h2.067v4H8.669l.028-.76.486-3.24zm7.615 3.1l-.464-3.1h2.36l.806 3.345V9.5h-2.668l-.034-.9zM7.666 5.5h-2.36L4.5 8.845V9.5h2.668l.034-.9.464-3.1z",clipRule:"evenodd"})),A=(0,r.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(u.Path,{fillRule:"evenodd",d:"M18.646 9H20V8l-1-.5L12 4 5 7.5 4 8v1h14.646zm-3-1.5L12 5.677 8.354 7.5h7.292zm-7.897 9.44v-6.5h-1.5v6.5h1.5zm5-6.5v6.5h-1.5v-6.5h1.5zm5 0v6.5h-1.5v-6.5h1.5zm2.252 8.81c0 .414-.334.75-.748.75H4.752a.75.75 0 010-1.5h14.5a.75.75 0 01.749.75z",clipRule:"evenodd"})),z=(0,r.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(u.Path,{fillRule:"evenodd",d:"M5 5.5h14a.5.5 0 01.5.5v1.5a.5.5 0 01-.5.5H5a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 9.232A2 2 0 013 7.5V6a2 2 0 012-2h14a2 2 0 012 2v1.5a2 2 0 01-1 1.732V18a2 2 0 01-2 2H6a2 2 0 01-2-2V9.232zm1.5.268V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5V9.5h-13z",clipRule:"evenodd"}));const F=(0,r.lazy)((()=>n.e(978).then(n.bind(n,6978)))),W=(0,r.lazy)((()=>n.e(220).then(n.bind(n,7220)))),R=(0,r.lazy)((()=>n.e(69).then(n.bind(n,4069)))),M=[{path:"/ecommerce/step/address",title:(0,a.__)("Street Address","wp-module-onboarding"),heading:(0,a.__)("Street Address","wp-module-onboarding"),subheading:(0,a.__)("In this step you confirm the business address of your store. Simply confirm the one you provided during your initial  Bluehost account setup or provide a new one.","wp-module-onboarding"),description:(0,a.__)("In this step you confirm the business address of your store. Simply confirm the one you provided during your initial  Bluehost account setup or provide a new one.","wp-module-onboarding"),Component:F,Icon:B,priority:85,VIEW:g.dv},{path:"/ecommerce/step/tax",title:(0,a.__)("Tax Info","wp-module-onboarding"),heading:(0,a.__)("Tax Info","wp-module-onboarding"),subheading:(0,a.__)("Taxes can be configure at anytime in the WooCommerce Settings tab.","wp-module-onboarding"),description:(0,a.__)("Taxes can be configured at anytime in the WooCommerce Settings tab.","wp-module-onboarding"),Component:W,Icon:A,priority:90,VIEW:g.dv},{path:"/ecommerce/step/products",title:(0,a.__)("Product Info","wp-module-onboarding"),heading:(0,a.__)("Product Info","wp-module-onboarding"),subheading:(0,a.__)("Hello, add a subheading for the learn more sidebar.","wp-module-onboarding"),description:(0,a.__)("In this section, you can provide more information about your products and business, which will help us tailor your store setup experience and identify possible extensions you'll need for your online store.","wp-module-onboarding"),Component:R,Icon:z,priority:95,VIEW:g.dv}],L=(0,o.orderBy)([...(0,o.filter)(O,(e=>!e.path.includes("/step/top-priority")&&!e.path.includes("/step/get-started/site-primary"))),...M],["priority"],["asc"]),H=(0,o.orderBy)([...L,...k],["priority"],["asc"]);function j(){var e;return null!==(e=window.nfdOnboarding.currentFlow)&&void 0!==e?e:"wp-setup"}const $={"wp-setup":{routes:k,steps:O,initialTopSteps:C,initialDesignSteps:T,initialGetStartedSteps:V},ecommerce:{routes:H,steps:L,initialTopSteps:()=>{const e=(0,o.filter)(M,(e=>!e.path.includes("/ecommerce/step"))),t={path:"/ecommerce/step/address",title:(0,a.__)("Store Info","wp-module-onboarding"),description:"",Icon:B,VIEW:g.dv,priority:41};e.push(t);const n=(0,o.filter)(C(),(e=>!e.path.includes("/step/top-priority")));return(0,o.orderBy)([...n,...e],["priority"],["asc"])},initialDesignSteps:T,initialGetStartedSteps:()=>(0,o.filter)(V(),(e=>!e.path.includes("/step/get-started/site-primary"))),initialStoreInfoSteps:M}},U=[...$[j()].routes],G=[...$[j()].steps],Z=()=>$[j()].initialTopSteps(),q=()=>$[j()].initialDesignSteps(),J=()=>$[j()].initialGetStartedSteps(),Y=()=>$[j()].initialStoreInfoSteps?$[j()].initialStoreInfoSteps:[]},9685:function(e,t,n){"use strict";n.d(t,{h:function(){return Z}});var r={};n.r(r),n.d(r,{setActiveFlow:function(){return c},setActiveStep:function(){return u},setCurrentOnboardingData:function(){return d},setDrawerActiveView:function(){return i},setIsDrawerOpened:function(){return s},setIsDrawerSuppressed:function(){return l},setIsSidebarOpened:function(){return f},setRuntime:function(){return o},setSidebarActiveView:function(){return m},updatePreviewSettings:function(){return h},updateSettings:function(){return p}});var a={};function o(e){var t;return window.nfdOnboarding={buildUrl:e.buildUrl,siteUrl:e.siteUrl,migrated:!0,currentFlow:null!==(t=e.currentFlow)&&void 0!==t?t:"wp-setup"},{type:"SET_RUNTIME",runtime:e}}function i(e){return{type:"SET_DRAWER_ACTIVE_VIEW",view:e}}function s(e){return{type:"SET_DRAWER_OPENED",isOpen:e}}function l(e){return{type:"SET_DRAWER_SUPPRESSED",isSuppressed:e}}function c(e){return{type:"SET_ACTIVE_FLOW",flow:e}}function u(e){return{type:"SET_ACTIVE_STEP",path:e=e.replace(/\/$/,"")}}function d(e){return{type:"SET_CURRENT_DATA",currentData:e}}function p(e){return{type:"UPDATE_SETTINGS",settings:e}}function f(e){return{type:"SET_SIDEBAR_OPENED",isOpen:e}}function m(e){return{type:"SET_SIDEBAR_ACTIVE_VIEW",view:e}}function h(e){return{type:"SET_PREVIEW_SETTINGS",previewSettings:e}}n.r(a),n.d(a,{getCurrentOnboardingData:function(){return x},getCurrentStep:function(){return T},getCurrentStepPath:function(){return O},getDesignSteps:function(){return N},getDrawerView:function(){return v},getFirstStep:function(){return k},getGetStartedSteps:function(){return P},getHireExpertsUrl:function(){return S},getLastStep:function(){return C},getNewfoldBrand:function(){return E},getNewfoldBrandName:function(){return y},getNextStep:function(){return B},getOnboardingFlow:function(){return I},getPreviewSettings:function(){return W},getPreviousStep:function(){return V},getSidebarView:function(){return z},getSidebars:function(){return F},getStoreInfoSteps:function(){return R},getTopSteps:function(){return D},isDrawerOpened:function(){return b},isDrawerSuppressed:function(){return _},isSidebarOpened:function(){return A}});var w=n(2819),g=window.wp.url;function v(e){return e.drawer.view}function b(e){return e.drawer.isOpen}function _(e){return e.drawer.isSuppressed}function E(e){return e.runtime.currentBrand.brand}function y(e){return e.runtime.currentBrand.name}function S(e){const t=e.runtime.currentBrand.hireExpertsInfo;return(0,g.addQueryArgs)(null==t?void 0:t.defaultLink,null==t?void 0:t.queryParameters)+((null==t?void 0:t.fragment)||"")}function x(e){return e.currentData}function I(e){var t;return null!==(t=e.runtime.currentFlow)&&void 0!==t?t:"wp-setup"}function D(e){return e.flow.steps.topSteps}function N(e){return e.flow.steps.designSteps}function P(e){return e.flow.steps.getStartedSteps}function O(e){return e.flow.steps.currentStep}function k(e){return e.flow.steps.allSteps[0]}function C(e){return e.flow.steps.allSteps[e.flow.steps.allSteps.length-1]}function T(e){return(0,w.filter)(e.flow.steps.allSteps,["path",e.flow.steps.currentStep])[0]}function V(e){const t=(0,w.findIndex)(e.flow.steps.allSteps,{path:e.flow.steps.currentStep});return 0===t?null:-1!==t&&e.flow.steps.allSteps[t-1]}function B(e){const t=e.flow.steps.allSteps.length-1,n=(0,w.findIndex)(e.flow.steps.allSteps,{path:e.flow.steps.currentStep});return t===n?null:-1!==n&&e.flow.steps.allSteps[n+1]}function A(e){return e.sidebar.isOpen}function z(e){return e.sidebar.view}function F(e){return(0,w.filter)(e.sidebar.sidebars,["enabled",!0])}function W(e){return e.runtime.previewSettings}function R(e){return e.flow.steps.storeInfoSteps}var M=n(9818);window.wp.dataControls;var L=n(2200),H=n(2644),j=n(9307);(0,j.lazy)((()=>n.e(993).then(n.bind(n,1993)))),(0,j.lazy)((()=>n.e(257).then(n.bind(n,8257))));const $=[];var U=(0,M.combineReducers)({drawer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isOpen:!1,isSuppressed:!1,view:L.tM},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_DRAWER_OPENED":return{...e,isOpen:t.isOpen};case"SET_DRAWER_ACTIVE_VIEW":return{...e,view:t.view};case"SET_DRAWER_SUPPRESSED":return{...e,isSuppressed:t.isSuppressed,isOpen:!t.isSuppressed&&e.isOpen}}return e},runtime:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_RUNTIME":return{...e,...t.runtime};case"SET_PREVIEW_SETTINGS":return{...e,previewSettings:t.previewSettings}}return e},currentData:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SET_CURRENT_DATA"===t.type?{...e,...t.currentData}:e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},flow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{flow:"wp-setup",steps:{routes:H._j,allSteps:H.S6,topSteps:(0,H.iD)(),designSteps:(0,H.BX)(),getStartedSteps:(0,H.fS)(),storeInfoSteps:(0,H.Fl)(),currentStep:"/wp-setup/step/what-next"}},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ACTIVE_STEP":return{...e,steps:{...e.steps,currentStep:t.path}};case"SET_ACTIVE_FLOW":return{...e,flow:t.flow}}return e},sidebar:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isOpen:!1,view:"LearnMore",sidebars:$},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SIDEBAR_OPENED":return{...e,isOpen:t.isOpen};case"SET_SIDEBAR_ACTIVE_VIEW":return{...e,view:t.view}}return e}});const G={reducer:U,actions:r,selectors:a},Z=(0,M.createReduxStore)("newfold/onboarding",G);(0,M.register)(Z)},4704:function(e,t,n){"use strict";n.d(t,{F:function(){return a}});var r=n(2200);const a=e=>{var t;return`${r.bQ}/${e}`+(null!==(t=window.nfdOnboarding)&&void 0!==t&&t.currentFlow?`&flow=${window.nfdOnboarding.currentFlow}`:"")}},3768:function(e,t,n){"use strict";n.d(t,{Hs:function(){return s},pn:function(){return i},xb:function(){return o}});var r=n(6989),a=n.n(r);const o=e=>0===Object.keys(e).length;async function i(){return a()({path:"/wp/v2/settings"})}async function s(e){return a()({path:"/wp/v2/settings",method:"POST",data:e})}},7533:function(e,t,n){"use strict";n.d(t,{M:function(){return s},k:function(){return l}});var r=n(6329),a=(n(2200),n(4704)),o=n(6989),i=n.n(o);async function s(){return await(0,r.D)(i()({url:(0,a.F)("flow")}).then())}async function l(e){return await(0,r.D)(i()({url:(0,a.F)("flow"),method:"POST",data:e}).then())}},6329:function(e,t,n){"use strict";async function r(e){const t={body:null,error:null};try{t.body=await e}catch(e){t.error=e}return t}n.d(t,{D:function(){return r}})},8395:function(e,t,n){"use strict";n.d(t,{Gw:function(){return l},I2:function(){return c},j2:function(){return u}});var r=n(6989),a=n.n(r),o=n(6329),i=n(2200),s=n(4704);async function l(){return await(0,o.D)(a()({url:(0,s.F)("settings")}).then())}async function c(e){return await(0,o.D)(a()({url:(0,s.F)("settings"),method:"POST",data:e}).then())}const u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return!(e>=i.wV)&&a()({url:(0,s.F)("settings/initialize"),method:"POST"}).catch((()=>{e+=1,u(e)}))}},1392:function(e,t,n){"use strict";n.d(t,{I:function(){return o}});var r=n(5736);const a={"wp-setup":{site:{noun:(0,r._x)("site","noun","wp-module-onboarding")},website:{noun:(0,r._x)("website","noun","wp-module-onboarding")}},ecommerce:{site:{noun:(0,r._x)("store","noun","wp-module-onboarding")},website:{noun:(0,r._x)("store","noun","wp-module-onboarding")}}},o=function(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"noun";const o=(null===(t=window)||void 0===t||null===(n=t.nfdOnboarding)||void 0===n?void 0:n.currentFlow)||"wp-setup",i=a[o][e.toLowerCase()][r];return e==e.toUpperCase()?i.toUpperCase():e[0]==e[0].toUpperCase()?i[0].toUpperCase()+i.substring(1):i}},2200:function(e,t,n){"use strict";var r;n.d(t,{$P:function(){return O},BP:function(){return h},Db:function(){return p},Ei:function(){return x},Fd:function(){return g},JB:function(){return a},Jq:function(){return I},Nj:function(){return d},Vx:function(){return P},Yl:function(){return m},bQ:function(){return c},dD:function(){return o},dv:function(){return y},hF:function(){return u},jN:function(){return b},km:function(){return l},mz:function(){return E},pf:function(){return s},qB:function(){return S},qO:function(){return _},qR:function(){return v},tM:function(){return f},tX:function(){return w},tY:function(){return N},wV:function(){return D}});const a="nfd-onboarding",o="object"==typeof(null===(r=window)||void 0===r?void 0:r.nfdOnboarding)&&"buildUrl"in window.nfdOnboarding,i=window.nfdOnboarding.adminUrl,s=window.nfdOnboarding.siteUrl,l=window.nfdOnboarding.restUrl,c=`${l}/newfold-onboarding/v1`,u=`${i}index.php`,d=`${u}?page=bluehost`,p="nfd-module-onboarding-event",f="nav-primary",m="nav-design",h="nav-page",w="design-themes",g="design-theme-styles",v="design-colors",b="design-typography",_="design-header-menu",E="nav-get-started",y="nav-ecommerce-store-info",S="Sidebar",x="HeaderMenu",I="LearnMore",D=2,N="nfd_plugins",P="nfd_themes",O=[f,m,E,h,y]},4184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var i=a.apply(null,n);i&&e.push(i)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},5648:function(e,t,n){"use strict";n.d(t,{Ep:function(){return c},aU:function(){return r},cP:function(){return u},q_:function(){return i}});var r,a=n(7462);!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(r||(r={}));var o="beforeunload";function i(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,i=n.history;function d(){var e=u(n.location.hash.substr(1)),t=e.pathname,r=void 0===t?"/":t,a=e.search,o=void 0===a?"":a,s=e.hash,l=void 0===s?"":s,c=i.state||{};return[c.idx,{pathname:r,search:o,hash:l,state:c.usr||null,key:c.key||"default"}]}var p=null;function f(){if(p)b.call(p),p=null;else{var e=r.Pop,t=d(),n=t[0],a=t[1];if(b.length){if(null!=n){var o=w-n;o&&(p={action:e,location:a,retry:function(){I(-1*o)}},I(o))}}else x(e)}}n.addEventListener("popstate",f),n.addEventListener("hashchange",(function(){c(d()[1])!==c(g)&&f()}));var m=r.Pop,h=d(),w=h[0],g=h[1],v=l(),b=l();function _(e){return function(){var e=document.querySelector("base"),t="";if(e&&e.getAttribute("href")){var r=n.location.href,a=r.indexOf("#");t=-1===a?r:r.slice(0,a)}return t}()+"#"+("string"==typeof e?e:c(e))}function E(e,t){return void 0===t&&(t=null),(0,a.Z)({pathname:g.pathname,hash:"",search:""},"string"==typeof e?u(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function y(e,t){return[{usr:e.state,key:e.key,idx:t},_(e)]}function S(e,t,n){return!b.length||(b.call({action:e,location:t,retry:n}),!1)}function x(e){m=e;var t=d();w=t[0],g=t[1],v.call({action:m,location:g})}function I(e){i.go(e)}return null==w&&(w=0,i.replaceState((0,a.Z)({},i.state,{idx:w}),"")),{get action(){return m},get location(){return g},createHref:_,push:function e(t,a){var o=r.Push,s=E(t,a);if(S(o,s,(function(){e(t,a)}))){var l=y(s,w+1),c=l[0],u=l[1];try{i.pushState(c,"",u)}catch(e){n.location.assign(u)}x(o)}},replace:function e(t,n){var a=r.Replace,o=E(t,n);if(S(a,o,(function(){e(t,n)}))){var s=y(o,w),l=s[0],c=s[1];i.replaceState(l,"",c),x(a)}},go:I,back:function(){I(-1)},forward:function(){I(1)},listen:function(e){return v.push(e)},block:function(e){var t=b.push(e);return 1===b.length&&n.addEventListener(o,s),function(){t(),b.length||n.removeEventListener(o,s)}}}}function s(e){e.preventDefault(),e.returnValue=""}function l(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function c(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,a=void 0===r?"":r,o=e.hash,i=void 0===o?"":o;return a&&"?"!==a&&(n+="?"===a.charAt(0)?a:"?"+a),i&&"#"!==i&&(n+="#"===i.charAt(0)?i:"#"+i),n}function u(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}},6974:function(e,t,n){"use strict";n.d(t,{AW:function(){return N},F0:function(){return P},TH:function(){return x},WU:function(){return D},Z5:function(){return O},oQ:function(){return y},s0:function(){return I}});var r=n(5648),a=n(9196);const o=(0,a.createContext)(null),i=(0,a.createContext)(null),s=(0,a.createContext)({outlet:null,matches:[]});function l(e,t){if(!e)throw new Error(t)}function c(e,t,n){void 0===n&&(n="/");let a=g(("string"==typeof t?(0,r.cP)(t):t).pathname||"/",n);if(null==a)return null;let o=u(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let i=null;for(let e=0;null==i&&e<o.length;++e)i=m(o[e],a);return i}function u(e,t,n,r){return void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r=""),e.forEach(((e,a)=>{let o={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};o.relativePath.startsWith("/")&&(o.relativePath.startsWith(r)||l(!1),o.relativePath=o.relativePath.slice(r.length));let i=v([r,o.relativePath]),s=n.concat(o);e.children&&e.children.length>0&&(!0===e.index&&l(!1),u(e.children,t,s,i)),(null!=e.path||e.index)&&t.push({path:i,score:f(i,e.index),routesMeta:s})})),t}const d=/^:\w+$/,p=e=>"*"===e;function f(e,t){let n=e.split("/"),r=n.length;return n.some(p)&&(r+=-2),t&&(r+=2),n.filter((e=>!p(e))).reduce(((e,t)=>e+(d.test(t)?3:""===t?1:10)),r)}function m(e,t){let{routesMeta:n}=e,r={},a="/",o=[];for(let e=0;e<n.length;++e){let i=n[e],s=e===n.length-1,l="/"===a?t:t.slice(a.length)||"/",c=h({path:i.relativePath,caseSensitive:i.caseSensitive,end:s},l);if(!c)return null;Object.assign(r,c.params);let u=i.route;o.push({params:r,pathname:v([a,c.pathname]),pathnameBase:b(v([a,c.pathnameBase])),route:u}),"/"!==c.pathnameBase&&(a=v([a,c.pathnameBase]))}return o}function h(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,((e,t)=>(r.push(t),"([^\\/]+)")));return e.endsWith("*")?(r.push("*"),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):a+=n?"\\/*$":"(?:(?=[.~-]|%[0-9A-F]{2})|\\b|\\/|$)",[new RegExp(a,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:r.reduce(((e,t,n)=>{if("*"===t){let e=s[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(t){return e}}(s[n]||""),e}),{}),pathname:o,pathnameBase:i,pattern:e}}function w(e,t,n){let a,o="string"==typeof e?(0,r.cP)(e):e,i=""===e||""===o.pathname?"/":o.pathname;if(null==i)a=n;else{let e=t.length-1;if(i.startsWith("..")){let t=i.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:a="",hash:o=""}="string"==typeof e?(0,r.cP)(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:_(a),hash:E(o)}}(o,a);return i&&"/"!==i&&i.endsWith("/")&&!s.pathname.endsWith("/")&&(s.pathname+="/"),s}function g(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=e.charAt(t.length);return n&&"/"!==n?null:e.slice(t.length)||"/"}const v=e=>e.join("/").replace(/\/\/+/g,"/"),b=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",E=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function y(e){S()||l(!1);let{basename:t,navigator:n}=(0,a.useContext)(o),{hash:i,pathname:s,search:c}=D(e),u=s;if("/"!==t){let n=function(e){return""===e||""===e.pathname?"/":"string"==typeof e?(0,r.cP)(e).pathname:e.pathname}(e),a=null!=n&&n.endsWith("/");u="/"===s?t+(a?"/":""):v([t,s])}return n.createHref({pathname:u,search:c,hash:i})}function S(){return null!=(0,a.useContext)(i)}function x(){return S()||l(!1),(0,a.useContext)(i).location}function I(){S()||l(!1);let{basename:e,navigator:t}=(0,a.useContext)(o),{matches:n}=(0,a.useContext)(s),{pathname:r}=x(),i=JSON.stringify(n.map((e=>e.pathnameBase))),c=(0,a.useRef)(!1);return(0,a.useEffect)((()=>{c.current=!0})),(0,a.useCallback)((function(n,a){if(void 0===a&&(a={}),!c.current)return;if("number"==typeof n)return void t.go(n);let o=w(n,JSON.parse(i),r);"/"!==e&&(o.pathname=v([e,o.pathname])),(a.replace?t.replace:t.push)(o,a.state)}),[e,t,i,r])}function D(e){let{matches:t}=(0,a.useContext)(s),{pathname:n}=x(),r=JSON.stringify(t.map((e=>e.pathnameBase)));return(0,a.useMemo)((()=>w(e,JSON.parse(r),n)),[e,r,n])}function N(e){l(!1)}function P(e){let{basename:t="/",children:n=null,location:s,navigationType:c=r.aU.Pop,navigator:u,static:d=!1}=e;S()&&l(!1);let p=b(t),f=(0,a.useMemo)((()=>({basename:p,navigator:u,static:d})),[p,u,d]);"string"==typeof s&&(s=(0,r.cP)(s));let{pathname:m="/",search:h="",hash:w="",state:v=null,key:_="default"}=s,E=(0,a.useMemo)((()=>{let e=g(m,p);return null==e?null:{pathname:e,search:h,hash:w,state:v,key:_}}),[p,m,h,w,v,_]);return null==E?null:(0,a.createElement)(o.Provider,{value:f},(0,a.createElement)(i.Provider,{children:n,value:{location:E,navigationType:c}}))}function O(e){let{children:t,location:n}=e;return function(e,t){S()||l(!1);let{matches:n}=(0,a.useContext)(s),o=n[n.length-1],i=o?o.params:{},u=(o&&o.pathname,o?o.pathnameBase:"/");o&&o.route;let d,p=x();if(t){var f;let e="string"==typeof t?(0,r.cP)(t):t;"/"===u||(null==(f=e.pathname)?void 0:f.startsWith(u))||l(!1),d=e}else d=p;let m=d.pathname||"/",h=c(e,{pathname:"/"===u?m:m.slice(u.length)||"/"});return function(e,t){return void 0===t&&(t=[]),null==e?null:e.reduceRight(((n,r,o)=>(0,a.createElement)(s.Provider,{children:void 0!==r.route.element?r.route.element:n,value:{outlet:n,matches:t.concat(e.slice(0,o+1))}})),null)}(h&&h.map((e=>Object.assign({},e,{params:Object.assign({},i,e.params),pathname:v([u,e.pathname]),pathnameBase:"/"===e.pathnameBase?u:v([u,e.pathnameBase])}))),n)}(k(t),n)}function k(e){let t=[];return a.Children.forEach(e,(e=>{if(!(0,a.isValidElement)(e))return;if(e.type===a.Fragment)return void t.push.apply(t,k(e.props.children));e.type!==N&&l(!1);let n={caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path};e.props.children&&(n.children=k(e.props.children)),t.push(n)})),t}},9196:function(e){"use strict";e.exports=window.React},2819:function(e){"use strict";e.exports=window.lodash},5158:function(e){"use strict";e.exports=window.wp.a11y},6989:function(e){"use strict";e.exports=window.wp.apiFetch},2175:function(e){"use strict";e.exports=window.wp.blockEditor},4981:function(e){"use strict";e.exports=window.wp.blocks},5609:function(e){"use strict";e.exports=window.wp.components},4333:function(e){"use strict";e.exports=window.wp.compose},9818:function(e){"use strict";e.exports=window.wp.data},5904:function(e){"use strict";e.exports=window.wp.dom},9307:function(e){"use strict";e.exports=window.wp.element},5736:function(e){"use strict";e.exports=window.wp.i18n},9630:function(e){"use strict";e.exports=window.wp.keycodes},444:function(e){"use strict";e.exports=window.wp.primitives},7462:function(e,t,n){"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:function(){return r}})}},r={};function a(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e](o,o.exports,a),o.exports}a.m=n,a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=function(e){return Promise.all(Object.keys(a.f).reduce((function(t,n){return a.f[n](e,t),t}),[]))},a.u=function(e){return e+".js"},a.miniCssF=function(e){},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e={},t="newfold.Onboarding:",a.l=function(n,r,o,i){if(e[n])e[n].push(r);else{var s,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+o){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",t+o),s.src=n),e[n]=[r];var p=function(t,r){s.onerror=s.onload=null,clearTimeout(f);var a=e[n];if(delete e[n],s.parentNode&&s.parentNode.removeChild(s),a&&a.forEach((function(e){return e(r)})),t)return t(r)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e}(),function(){var e={343:0};a.f.j=function(t,n){var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise((function(n,a){r=e[t]=[n,a]}));n.push(r[2]=o);var i=a.p+a.u(t),s=new Error;a.l(i,(function(n){if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,r[1](s)}}),"chunk-"+t,t)}};var t=function(t,n){var r,o,i=n[0],s=n[1],l=n[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);l&&l(a)}for(t&&t(n);c<i.length;c++)o=i[c],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunknewfold_Onboarding=self.webpackChunknewfold_Onboarding||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var o={};!function(){"use strict";a.r(o);var e={};a.r(e),a.d(e,{disableComplementaryArea:function(){return ve},enableComplementaryArea:function(){return ge},pinItem:function(){return be},setFeatureDefaults:function(){return Se},setFeatureValue:function(){return ye},toggleFeature:function(){return Ee},unpinItem:function(){return _e}});var t={};a.r(t),a.d(t,{getActiveComplementaryArea:function(){return xe},isFeatureActive:function(){return De},isItemPinned:function(){return Ie}});var n=a(2200),r=window.wp.domReady,i=a.n(r),s=window.wp.blockLibrary,l=a(9307),c=a(9685),u=a(7533),d=a(6989),p=a.n(d),f=a(4704),m=a(2819);const h=e=>new URLSearchParams(location.search).get(e),w=()=>{p()({url:`${n.pf}/wp-cron.php`,method:"GET",parse:!1}).catch((e=>{console.error(e)}))};var g=a(8395),v=a(6974),b=a(5736),_=a(9818),E=a(444),y=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),S=a(5609),x=a(4184),I=a.n(x);var D=e=>{let{text:t=(0,b.__)("Exit to WordPress","wp-module-onboarding"),showIcon:r=!0,showButton:a=!0,variant:o="secondary",className:i=!1,origin:s,...d}=e;const[p,f]=(0,l.useState)(!1),m=()=>f(!1),h=(0,v.TH)(),{currentData:w}=(0,_.useSelect)((e=>({currentData:e(c.h).getCurrentOnboardingData()})),[h.pathname]),E=(0,b.__)("You can restart onboarding from your Bluehost Settings page.","wp-module-onboarding");async function x(e,t){if(t){if(t.hasExited=(new Date).getTime(),null!=e&&e.includes("basic-info")){const e=await async function(e){var t;const n=await(0,g.Gw)(),r=await(0,g.I2)(null==e||null===(t=e.data)||void 0===t?void 0:t.socialData);return null!=(null==r?void 0:r.error)?(console.error("Unable to Save Social Data!"),null==n?void 0:n.body):null==r?void 0:r.body}(t);e&&null!=t&&t.data&&(t.data.socialData=e)}(0,u.k)(t)}const r="ecommerce"==window.nfdOnboarding.currentFlow?n.Nj:n.hF;window.location.replace(r)}return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(S.Button,{icon:!!r&&y,variant:o,onClick:()=>f(!0),className:I()("nfd-onboarding-etw__trigger",i)},t),p&&(0,l.createElement)(S.Modal,{title:(0,b.__)("Exit without finishing?","wp-module-onboarding"),onRequestClose:m},(0,l.createElement)("p",null,E),(0,l.createElement)(S.ButtonGroup,{className:"nfd-onboarding-etw__buttons"},(0,l.createElement)(S.Button,{variant:"secondary",onClick:m},(0,b.__)("Continue","wp-module-onboarding")),(0,l.createElement)(S.Button,{variant:"primary",onClick:e=>x(h.pathname,w)},(0,b.__)("Exit","wp-module-onboarding")))))},N=a(1984),P=(0,l.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(E.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));const O=e=>{let{path:t}=e;const n=(0,v.s0)();return(0,l.createElement)(S.Button,{className:"navigation-buttons navigation-buttons_back",onClick:()=>n(t,{state:{origin:"header"}}),variant:"secondary"},(0,l.createElement)(N.Z,{icon:y}),(0,b.__)("Back","wp-module-onboarding"))},k=e=>{let{path:t}=e;const n=(0,v.s0)();return(0,l.createElement)(S.Button,{onClick:()=>n(t,{state:{origin:"header"}}),variant:"primary",className:"navigation-buttons navigation-buttons_next"},(0,b.__)("Next","wp-module-onboarding"),(0,l.createElement)(N.Z,{icon:P}))};async function C(e,t){if(t){if(t.isComplete=(new Date).getTime(),null!=e&&e.includes("basic-info")){const e=await async function(e){var t;const n=await(0,g.Gw)(),r=await(0,g.I2)(null==e||null===(t=e.data)||void 0===t?void 0:t.socialData);return null!=(null==r?void 0:r.error)?(console.error("Unable to Save Social Data!"),null==n?void 0:n.body):null==r?void 0:r.body}(t);e&&null!=t&&t.data&&(t.data.socialData=e)}(0,u.k)(t)}const r=V()?n.Nj:n.hF;window.location.replace(r)}const T=e=>{let{path:t,currentData:n,saveData:r}=e;return(0,l.createElement)(S.Button,{onClick:e=>r(t,n),className:"navigation-buttons navigation-buttons_finish",variant:"primary"},(0,b.__)("Finish","wp-module-onboarding"),(0,l.createElement)(N.Z,{icon:P}))},V=()=>"ecommerce"==window.nfdOnboarding.currentFlow;var B=()=>{const e=(0,v.TH)(),{previousStep:t,nextStep:n,currentData:r}=(0,_.useSelect)((e=>({nextStep:e(c.h).getNextStep(),previousStep:e(c.h).getPreviousStep(),currentData:e(c.h).getCurrentOnboardingData()})),[e.pathname]),a=null===t||!1===t,o=null===n||!1===n;return(0,l.createElement)("div",{className:"nfd-onboarding-header__step-navigation"},(0,l.createElement)(S.ButtonGroup,{style:{display:"flex",columnGap:"0.5rem"}},a?null:(0,l.createElement)(O,{path:t.path}),o?(0,l.createElement)(T,{path:e.pathname,currentData:r,saveData:C}):(0,l.createElement)(k,{path:n.path})))},A=()=>{const{sidebars:e}=(0,_.useSelect)((e=>({sidebars:e(c.h).getSidebars()})));return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(B,null),e.map((e=>(0,l.createElement)(S.Slot,{key:e.id,name:`${n.Ei}/${e.id}`}))))},z=()=>{const e=(0,v.TH)(),{firstStep:t}=(0,_.useSelect)((e=>({firstStep:e(c.h).getFirstStep()})),[]),{previousStep:n,nextStep:r}=(0,_.useSelect)((e=>({previousStep:e(c.h).getPreviousStep(),nextStep:e(c.h).getNextStep()})),[e.path]),a=(null==t?void 0:t.path)===(null==e?void 0:e.pathname);return(0,l.createElement)("div",{className:"nfd-onboarding-header"},(0,l.createElement)("div",{className:"nfd-onboarding-header__start"},a?(0,l.createElement)(D,{origin:"header-first-step"}):null),(0,l.createElement)("div",{className:"nfd-onboarding-header__center"}),(0,l.createElement)("div",{className:"nfd-onboarding-header__end"},(0,l.createElement)(A,null)))},F=a(2644),W=()=>{return(0,l.createElement)("main",{className:"nfd-onboard-content"},(0,l.createElement)(l.Suspense,{fallback:(0,l.createElement)(l.Fragment,null)},(0,l.createElement)(v.Z5,null,(e=[],F._j.map((t=>e.push((0,l.createElement)(v.AW,{key:t.path,path:t.path,end:!0,element:(0,l.createElement)(t.Component,null)})))),e))));var e},R=()=>(0,l.createElement)("div",{style:{padding:"0 16px"}},(0,l.createElement)("h2",null,(0,b.__)("Pick Color Palette","wp-module-onboarding")),(0,l.createElement)("p",null,(0,b.__)("If user has opted for custom design, panel will show color palettes to affect preview pane.","wp-module-onboarding"))),M=()=>(0,l.createElement)("div",{style:{padding:"0 16px"}},(0,l.createElement)("h2",null,(0,b.__)("Pick a Header & Menu Style","wp-module-onboarding")),(0,l.createElement)("p",null,(0,b.__)("Panel will show a few Header Patterns to affect preview pane.","wp-module-onboarding"))),L=()=>(0,l.createElement)("div",{style:{padding:"0 16px"}},(0,l.createElement)("h2",null,(0,b.__)("Pick a Theme Style","wp-module-onboarding")),(0,l.createElement)("h4",null,(0,b.__)("No Style Selected","wp-module-onboarding")),(0,l.createElement)("p",null,(0,b.__)("Panel will show Theme details","wp-module-onboarding")),(0,l.createElement)("h4",null,(0,b.__)("With Style Selected","wp-module-onboarding")),(0,l.createElement)("p",null,(0,b.__)("Panel will show single-column of other Styles.","wp-module-onboarding"))),H=()=>(0,l.createElement)("div",{style:{padding:"0 16px"}},(0,l.createElement)("h2",null,(0,b.__)("Pick a Theme","wp-module-onboarding")),(0,l.createElement)("h4",null,(0,b.__)("No Theme Selected","wp-module-onboarding")),(0,l.createElement)("p",null,(0,b.__)("Panel will show contextual help","wp-module-onboarding")),(0,l.createElement)("h4",null,(0,b.__)("With Theme Selected","wp-module-onboarding")),(0,l.createElement)("p",null,(0,b.__)("Panel will show single-column of other Themes.","wp-module-onboarding"))),j=()=>(0,l.createElement)("div",{style:{padding:"0 16px"}},(0,l.createElement)("h2",null,(0,b.__)("Pick Fonts & Text Sizes","wp-module-onboarding")),(0,l.createElement)("p",null,(0,b.__)("If user has opted for custom design, panel will show type treatments to affect preview pane.","wp-module-onboarding"))),$=a(9630),U=a(9196),G=a(5648);function Z(){return Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z.apply(this,arguments)}function q(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}const J=["onClick","reloadDocument","replace","state","target","to"],Y=["aria-current","caseSensitive","className","end","style","to","children"];function K(e){let{basename:t,children:n,window:r}=e,a=(0,U.useRef)();null==a.current&&(a.current=(0,G.q_)({window:r}));let o=a.current,[i,s]=(0,U.useState)({action:o.action,location:o.location});return(0,U.useLayoutEffect)((()=>o.listen(s)),[o]),(0,U.createElement)(v.F0,{basename:t,children:n,location:i.location,navigationType:i.action,navigator:o})}const Q=(0,U.forwardRef)((function(e,t){let{onClick:n,reloadDocument:r,replace:a=!1,state:o,target:i,to:s}=e,l=q(e,J),c=(0,v.oQ)(s),u=function(e,t){let{target:n,replace:r,state:a}=void 0===t?{}:t,o=(0,v.s0)(),i=(0,v.TH)(),s=(0,v.WU)(e);return(0,U.useCallback)((t=>{if(!(0!==t.button||n&&"_self"!==n||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t))){t.preventDefault();let n=!!r||(0,G.Ep)(i)===(0,G.Ep)(s);o(e,{replace:n,state:a})}}),[i,o,s,r,a,n,e])}(s,{replace:a,state:o,target:i});return(0,U.createElement)("a",Z({},l,{href:c,onClick:function(e){n&&n(e),e.defaultPrevented||r||u(e)},ref:t,target:i}))})),X=(0,U.forwardRef)((function(e,t){let{"aria-current":n="page",caseSensitive:r=!1,className:a="",end:o=!1,style:i,to:s,children:l}=e,c=q(e,Y),u=(0,v.TH)(),d=(0,v.WU)(s),p=u.pathname,f=d.pathname;r||(p=p.toLowerCase(),f=f.toLowerCase());let m,h=p===f||!o&&p.startsWith(f)&&"/"===p.charAt(f.length),w=h?n:void 0;m="function"==typeof a?a({isActive:h}):[a,h?"active":null].filter(Boolean).join(" ");let g="function"==typeof i?i({isActive:h}):i;return(0,U.createElement)(Q,Z({},c,{"aria-current":w,className:m,ref:t,style:g,to:s}),"function"==typeof l?l({isActive:h}):l)}));var ee=()=>{const{designSteps:e}=(0,_.useSelect)((e=>({designSteps:e(c.h).getDesignSteps()})),[]),{setDrawerActiveView:t}=(0,_.useDispatch)(c.h);return(0,l.createElement)("div",{className:"is-drawer-fade"},(0,l.createElement)(S.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y,onClick:()=>t(n.tM)},(0,b.__)("Main Menu","wp-module-onboarding")),(0,l.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,l.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},e.map((e=>(0,l.createElement)("li",{key:e.path,className:"nfd-onboarding-drawer__panel-menu-item"},(0,l.createElement)(X,{to:e.path,className:"nfd-onboarding-drawer__panel-menu-link",state:{origin:"drawer-nav"},onClick:()=>t(e.VIEW)},(0,l.createElement)(N.Z,{icon:e.Icon}),(0,l.createElement)("span",null,e.title))))))))},te=()=>{const{getStartedSteps:e}=(0,_.useSelect)((e=>({getStartedSteps:e(c.h).getGetStartedSteps()})),[]),{setDrawerActiveView:t}=(0,_.useDispatch)(c.h);return(0,l.createElement)("div",{className:"is-drawer-fade"},(0,l.createElement)(S.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y,onClick:()=>t(n.tM)},(0,b.__)("Main Menu","wp-module-onboarding")),(0,l.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,l.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},e.map((e=>(0,l.createElement)("li",{key:e.path,className:"nfd-onboarding-drawer__panel-menu-item"},(0,l.createElement)(X,{to:e.path,className:"nfd-onboarding-drawer__panel-menu-link",state:{origin:"drawer-nav"},onClick:()=>t(e.VIEW)},(0,l.createElement)(N.Z,{icon:e.Icon}),(0,l.createElement)("span",null,e.title))))))))},ne=()=>{const{setDrawerActiveView:e}=(0,_.useDispatch)(c.h);return(0,l.createElement)("div",{className:"is-drawer-fade"},(0,l.createElement)(S.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y,onClick:()=>e(n.tM)},(0,b.__)("Resume Onboarding","wp-module-onboarding")))},re=()=>{const e=(0,v.s0)(),t=(0,v.TH)(),{topSteps:n}=(0,_.useSelect)((e=>({topSteps:e(c.h).getTopSteps()})),[]),{setDrawerActiveView:r}=(0,_.useDispatch)(c.h),a=n[0].path===t.pathname;return(0,l.createElement)("div",{className:"is-drawer-fade"},a&&(0,l.createElement)(S.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",onClick:()=>e("/page/what-to-expect")},"What to Expect")||(0,l.createElement)(D,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",origin:"drawer-panel"}),(0,l.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,l.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},n.map((e=>(0,l.createElement)(S.Tooltip,{key:e.path,text:e.heading},(0,l.createElement)("li",{className:"nfd-onboarding-drawer__panel-menu-item"},(0,l.createElement)(X,{to:e.path,className:"nfd-onboarding-drawer__panel-menu-link",state:{origin:"drawer-nav"},onClick:()=>(null==e?void 0:e.VIEW)&&r(e.VIEW)},(0,l.createElement)(N.Z,{icon:e.Icon}),(0,l.createElement)("span",null,e.title)))))))))},ae=()=>{const{storeInfoSteps:e}=(0,_.useSelect)((e=>({storeInfoSteps:e(c.h).getStoreInfoSteps()})),[]),{setDrawerActiveView:t}=(0,_.useDispatch)(c.h);return(0,l.createElement)("div",{className:"is-drawer-fade"},(0,l.createElement)(S.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y,onClick:()=>t(n.tM)},(0,b.__)("Site Setup","wp-module-onboarding")),(0,l.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,l.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},e.map((e=>(0,l.createElement)("li",{key:e.path,className:"nfd-onboarding-drawer__panel-menu-item"},(0,l.createElement)(X,{to:e.path,className:"nfd-onboarding-drawer__panel-menu-link",state:{origin:"drawer-nav"},onClick:()=>t(e.VIEW)},(0,l.createElement)(N.Z,{icon:e.Icon}),(0,l.createElement)("span",null,e.title))))))))},oe=e=>{let{isOpen:t}=e;const[r,a]=(0,l.useState)(!0),{isDrawerOpen:o,drawerView:i}=(0,_.useSelect)((e=>{const{isDrawerOpened:t,getDrawerView:n}=e(c.h);return{isDrawerOpen:t(),drawerView:n()}}),[]),{setIsDrawerOpened:s,setDrawerActiveView:u}=(0,_.useDispatch)(c.h);(0,l.useEffect)((()=>{n.$P.includes(i)?a(!0):a(!1)}),[i]);const d=e=>{let{children:t}=e;return(0,l.createElement)("div",{className:"is-drawer-fade"},(0,l.createElement)(S.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y,onClick:()=>u(n.Yl)},(0,b.__)("Design","wp-module-onboarding")),t)};return(0,l.createElement)("div",{className:I()("nfd-onboarding-drawer__panel",{"is-open":o}),onKeyDown:e=>{e.keyCode!==$.ESCAPE||e.defaultPrevented||(e.preventDefault(),s(!1))}},(0,l.createElement)("div",{className:"nfd-onboarding-drawer__panel-inner"},(0,l.createElement)("div",{className:"nfd-onboarding-drawer__panel-site-title-container"},(0,l.createElement)("div",{className:"nfd-onboarding-drawer__panel-site-title"},(0,b.__)("WordPress Onboarding","wp-module-onboarding"))),(0,l.createElement)("div",{className:"nfd-onboarding-drawer__panel-scroll-container"},(0,l.createElement)("div",{className:"nfd-onboarding-drawer__panel-inside"},n.tM===i&&(0,l.createElement)(re,null),n.Yl===i&&(0,l.createElement)(ee,null),n.mz===i&&(0,l.createElement)(te,null),n.dv===i&&(0,l.createElement)(ae,null),n.BP===i&&(0,l.createElement)(ne,null),n.tX===i&&(0,l.createElement)(d,null,(0,l.createElement)(H,null)),n.Fd===i&&(0,l.createElement)(d,null,(0,l.createElement)(L,null)),n.qR===i&&(0,l.createElement)(d,null,(0,l.createElement)(R,null)),n.jN===i&&(0,l.createElement)(d,null,(0,l.createElement)(j,null)),n.qO===i&&(0,l.createElement)(d,null,(0,l.createElement)(M,null))))))},ie=e=>{let{isOpen:t}=e;const{isDrawerOpen:n,isDrawerSuppressed:r}=(0,_.useSelect)((e=>({isDrawerOpen:e(c.h).isDrawerOpened(),isDrawerSuppressed:e(c.h).isDrawerSuppressed()})),[]),{setIsDrawerOpened:a}=(0,_.useDispatch)(c.h),o=(0,l.useRef)();return(0,l.useEffect)((()=>{n||o.current.focus()}),[n]),(0,l.createElement)(S.__unstableMotion.div,{className:I()("nfd-onboarding-drawer__toggle",{"is-open":n}),whileHover:"expand"},(0,l.createElement)(S.Button,{className:`nfd-onboarding-drawer__toggle-button has-icon ${!r||"is-suppressed"}`,label:(0,b.__)("Toggle Navigation","wp-module-onboarding"),ref:o,"aria-pressed":t,onClick:()=>{r||a(!n)}},(0,l.createElement)("div",{style:{width:"36px",height:"36px",backgroundImage:"var(--nfd-onboarding-icon)",backgroundSize:"contain"}})))},se=a(4333),le=e=>{let{isDefaultOpen:t=!1}=e;const n=(0,se.useViewportMatch)("medium"),{setIsDrawerOpened:r}=(0,_.useDispatch)(c.h);return(0,l.useEffect)((()=>{r(t&&n)}),[t,n,r]),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(ie,null),(0,l.createElement)(oe,null))},ce=()=>{const{isSidebarOpened:e,sideBarView:t,sidebars:r}=(0,_.useSelect)((e=>({isSidebarOpened:e(c.h).isSidebarOpened(),sideBarView:e(c.h).getSidebarView(),sidebars:e(c.h).getSidebars()})));return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(l.Suspense,{fallback:(0,l.createElement)(l.Fragment,null)},r.map((e=>(0,l.createElement)(l.Fragment,{key:e.id},(0,l.createElement)(e.sidebar,null),(0,l.createElement)(e.menu,null))))),(0,l.createElement)("div",{className:I()("nfd-onboarding-sidebar__panel",{"is-open":e})},(0,l.createElement)("div",{className:"nfd-onboarding-sidebar__panel-inner"},e&&t&&(0,l.createElement)(S.Slot,{name:`${n.qB}/${t}`}))))},ue=a(3768),de=e=>{let{isActive:t}=e;return(0,l.useEffect)((()=>{let e=!1;return document.body.classList.contains("sticky-menu")&&(e=!0,document.body.classList.remove("sticky-menu")),()=>{e&&document.body.classList.add("sticky-menu")}}),[]),(0,l.useEffect)((()=>(t?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode"),()=>{t&&document.body.classList.remove("is-fullscreen-mode")})),[t]),null},pe=a(7462),fe=(0,l.forwardRef)((function(e,t){let{footer:n,header:r,sidebar:a,secondarySidebar:o,notices:i,content:s,drawer:c,actions:u,labels:d,className:p,shortcuts:f}=e;const m=(0,S.__unstableUseNavigateRegions)(f);!function(e){(0,l.useEffect)((()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}}),[e])}("interface-interface-skeleton__html-container");const h={
/* translators: accessibility text for the nav bar landmark region. */
drawer:(0,b.__)("Drawer"),
/* translators: accessibility text for the top bar landmark region. */
header:(0,b.__)("Header"),
/* translators: accessibility text for the content landmark region. */
body:(0,b.__)("Content"),
/* translators: accessibility text for the secondary sidebar landmark region. */
secondarySidebar:(0,b.__)("Block Library"),
/* translators: accessibility text for the settings landmark region. */
sidebar:(0,b.__)("Settings"),
/* translators: accessibility text for the publish landmark region. */
actions:(0,b.__)("Publish"),
/* translators: accessibility text for the footer landmark region. */
footer:(0,b.__)("Footer"),...d};return(0,l.createElement)("div",(0,pe.Z)({},m,{ref:(0,se.useMergeRefs)([t,m.ref]),className:I()(p,"interface-interface-skeleton",m.className,!!n&&"has-footer")}),!!c&&(0,l.createElement)("div",{className:"interface-interface-skeleton__drawer",role:"region","aria-label":h.drawer,tabIndex:"-1"},c),(0,l.createElement)("div",{className:"interface-interface-skeleton__editor"},!!r&&(0,l.createElement)("div",{className:"interface-interface-skeleton__header",role:"region","aria-label":h.header,tabIndex:"-1"},r),(0,l.createElement)("div",{className:"interface-interface-skeleton__body"},!!o&&(0,l.createElement)("div",{className:"interface-interface-skeleton__secondary-sidebar",role:"region","aria-label":h.secondarySidebar,tabIndex:"-1"},o),!!i&&(0,l.createElement)("div",{className:"interface-interface-skeleton__notices"},i),(0,l.createElement)("div",{className:"interface-interface-skeleton__content",role:"region","aria-label":h.body,tabIndex:"-1"},s),!!a&&(0,l.createElement)("div",{className:"interface-interface-skeleton__sidebar",role:"region","aria-label":h.sidebar,tabIndex:"-1"},a),!!u&&(0,l.createElement)("div",{className:"interface-interface-skeleton__actions",role:"region","aria-label":h.actions,tabIndex:"-1"},u))),!!n&&(0,l.createElement)("div",{className:"interface-interface-skeleton__footer",role:"region","aria-label":h.footer,tabIndex:"-1"},n))})),me=window.wp.deprecated,he=a.n(me),we=window.wp.preferences;const ge=(e,t)=>n=>{let{registry:r}=n;t&&r.dispatch(we.store).set(e,"complementaryArea",t)},ve=e=>t=>{let{registry:n}=t;n.dispatch(we.store).set(e,"complementaryArea",null)},be=(e,t)=>n=>{let{registry:r}=n;if(!t)return;const a=r.select(we.store).get(e,"pinnedItems");!0!==(null==a?void 0:a[t])&&r.dispatch(we.store).set(e,"pinnedItems",{...a,[t]:!0})},_e=(e,t)=>n=>{let{registry:r}=n;if(!t)return;const a=r.select(we.store).get(e,"pinnedItems");r.dispatch(we.store).set(e,"pinnedItems",{...a,[t]:!1})};function Ee(e,t){return function(n){let{registry:r}=n;he()("wp.dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"wp.dispatch( 'core/preferences' ).toggle"}),r.dispatch(we.store).toggle(e,t)}}function ye(e,t,n){return function(r){let{registry:a}=r;he()("wp.dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"wp.dispatch( 'core/preferences' ).set"}),a.dispatch(we.store).set(e,t,!!n)}}function Se(e,t){return function(n){let{registry:r}=n;he()("wp.dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"wp.dispatch( 'core/preferences' ).setDefaults"}),r.dispatch(we.store).setDefaults(e,t)}}const xe=(0,_.createRegistrySelector)((e=>(t,n)=>e(we.store).get(n,"complementaryArea"))),Ie=(0,_.createRegistrySelector)((e=>(t,n,r)=>{var a;const o=e(we.store).get(n,"pinnedItems");return null===(a=null==o?void 0:o[r])||void 0===a||a})),De=(0,_.createRegistrySelector)((e=>(t,n,r)=>(he()("wp.select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"!! wp.select( 'core/preferences' ).isFeatureActive( scope, featureName )"}),!!e(we.store).get(n,r)))),Ne=(0,_.createReduxStore)("core/interface",{reducer:()=>{},actions:e,selectors:t});(0,_.register)(Ne);var Pe=()=>{const e=(0,v.TH)(),t=(0,se.useViewportMatch)("medium"),n=(0,m.kebabCase)(e.pathname),{isDrawerOpen:r,newfoldBrand:a,onboardingFlow:o,currentData:i,firstStep:s}=(0,_.useSelect)((e=>({isDrawerOpen:e(c.h).isDrawerOpened(),newfoldBrand:e(c.h).getNewfoldBrand(),onboardingFlow:e(c.h).getOnboardingFlow(),currentData:e(c.h).getCurrentOnboardingData(),firstStep:e(c.h).getFirstStep()})),[]),[d,p]=(0,l.useState)(!1),[f,h]=(0,l.useState)(!1),[w,b]=(0,l.useState)(!1),{setActiveStep:E,setActiveFlow:y,setCurrentOnboardingData:x}=(0,_.useDispatch)(c.h);return(0,l.useEffect)((()=>{document.body.classList.add(`nfd-brand-${a}`)}),[a]),(0,l.useEffect)((()=>{(async function(){const t=(null==e?void 0:e.pathname)===(null==s?void 0:s.path);if(i&&!t&&!d){if(p(!0),w&&await async function(){let{address:e,tax:t}=i.storeDetails,n={};void 0!==e&&(delete e.country,delete e.state,n=e),void 0!==t&&(t.option,t.isStoreDetailsFilled,delete t.option,delete t.isStoreDetailsFilled,n={...n,...t}),(0,ue.xb)(n)||await(0,ue.Hs)(n),delete i.storeDetails.address,delete i.storeDetails.tax,b(!1)}(),f){const e=await async function(){var e;const t=await(0,g.Gw)(),n=await(0,g.I2)(null==i||null===(e=i.data)||void 0===e?void 0:e.socialData);return h(!1),null!=(null==n?void 0:n.error)?(console.error("Unable to Save Social Data!"),null==t?void 0:t.body):null==n?void 0:n.body}();e&&null!=i&&i.data&&(i.data.socialData=e)}const e=await(0,u.k)(i);null!=(null==e?void 0:e.error)?(p(!1),console.error("Unable to Save data!")):(x(null==e?void 0:e.body),p(!1))}null!=e&&e.pathname.includes("basic-info")&&h(!0),null!=e&&e.pathname.includes("ecommerce")&&b(!0)})(),e.pathname.includes("/step")&&(y(o),E(e.pathname))}),[e.pathname,o]),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(de,{isActive:!0}),"\\",(0,l.createElement)(S.SlotFillProvider,null,(0,l.createElement)(fe,{className:I()("nfd-onboarding-skeleton",`brand-${a}`,`path-${n}`,{"is-drawer-open":r},{"is-large-viewport":t},{"is-small-viewport":!t}),header:(0,l.createElement)(z,null),drawer:(0,l.createElement)(le,null),content:(0,l.createElement)(W,null),sidebar:(0,l.createElement)(ce,null)})))};const Oe=()=>(0,l.createElement)(K,null,(0,l.createElement)(Pe,null));n.dD?i()((()=>{(async function(e,t){(()=>{if(h(n.tY))return!0;p()({url:(0,f.F)("plugins/initialize"),method:"POST",headers:{"X-NFD-ONBOARDING":window.nfdOnboarding.pluginInstallHash}}).catch((e=>{console.error(e)}))})(),(()=>{if(h(n.Vx))return!0;p()({url:(0,f.F)("themes/initialize"),method:"POST"}).catch((e=>{console.error(e)}))})(),setInterval(w,45e3);const r=document.getElementById(e);(0,_.dispatch)(c.h).setRuntime(t);const a=await(0,u.M)();null==a.error&&(a.body=(e=>(e.hasExited=!1,e.isComplete=!1,e))(a.body),(0,_.dispatch)(c.h).setCurrentOnboardingData(a.body)),null!==r&&void 0!==l.render?((0,l.render)((0,l.createElement)(Oe,null),r),(0,g.j2)()):console.log("Could not find mount element or wp.element.render().")})(n.JB,window.nfdOnboarding),(0,s.registerCoreBlocks)()})):console.log("Cannot find Newfold Onboarding runtime data to set __webpack_public_path__.")}(),((window.newfold=window.newfold||{}).Onboarding=window.newfold.Onboarding||{}).onboarding=o}();