Edit file File name : 51.js Content :"use strict";(globalThis.webpackChunknewfold_Onboarding=globalThis.webpackChunknewfold_Onboarding||[]).push([[51],{1852:(e,t,n)=>{n.d(t,{A:()=>v});var a=n(1609),o=n(148),i=n(7143),s=n(7675),r=n(264),l=n(6079),c=n(8969),d=n(1056),m=n(2202),u=n(8559),b=n(6942),p=n.n(b),g=n(7677);const v=({text:e,disabled:t,className:n,icon:b})=>{const v=(0,o.Zp)(),{nextStep:f,currentData:h}=(0,i.useSelect)((e=>({nextStep:e(s.M).getNextStep(),currentData:e(s.M).getCurrentOnboardingData()})),[]),w=null===f||!1===f;return(0,a.createElement)(r.A,{className:p()("nfd-nav-card-button",n),handleClick:()=>w?async function(){h&&(h.isComplete=(new Date).getTime(),h.data.siteOverrideConsent=!1,(0,l.V1)(h)),(0,u.YR)(),(0,d.SV)(new d.iC(m.Vg)),window.location.replace(c.R0)}():v(f.path),disabled:t},(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{className:`${n}__text`},e),b&&(0,a.createElement)(g.A,{className:`${n}__icon`,icon:b})))}},5479:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(1609),o=n(431);const i=({title:e,text:t,imgType:n,className:i,animationName:s})=>(0,a.createElement)("div",{className:i},(0,a.createElement)("div",{className:"tab-text"},(0,a.createElement)("h4",null,e),t),(0,a.createElement)("div",{className:"tab-image"},(0,a.createElement)("div",{className:"tab-img"},(0,a.createElement)(o.A,{type:s},(0,a.createElement)("div",{className:n})))))},7839:(e,t,n)=>{n.d(t,{A:()=>w});var a=n(1609),o=n(6087),i=n(8468),s=n(9491),r=n(8558),l=n(8107);const c=()=>{},d=["menuitem","menuitemradio","menuitemcheckbox"];class m extends i.Component{constructor(){super(...arguments),this.onKeyDown=this.onKeyDown.bind(this),this.bindContainer=this.bindContainer.bind(this),this.getFocusableContext=this.getFocusableContext.bind(this),this.getFocusableIndex=this.getFocusableIndex.bind(this)}componentDidMount(){this.container.addEventListener("keydown",this.onKeyDown),this.container.addEventListener("focus",this.onFocus)}componentWillUnmount(){this.container.removeEventListener("keydown",this.onKeyDown),this.container.removeEventListener("focus",this.onFocus)}bindContainer(e){const{forwardedRef:t}=this.props;this.container=e,"function"==typeof t?t(e):t&&"current"in t&&(t.current=e)}getFocusableContext(e){const{onlyBrowserTabstops:t}=this.props,n=(t?l.focus.tabbable:l.focus.focusable).find(this.container),a=this.getFocusableIndex(n,e);return a>-1&&e?{index:a,target:e,focusables:n}:null}getFocusableIndex(e,t){const n=e.indexOf(t);if(-1!==n)return n}onKeyDown(e){this.props.onKeyDown&&this.props.onKeyDown(e);const{getFocusableContext:t}=this,{cycle:n=!0,eventToOffset:a,onNavigate:o=c,stopNavigationEvents:i}=this.props,s=a(e);if(void 0!==s&&i){e.stopImmediatePropagation();const t=e.target.getAttribute("role");d.includes(t)&&e.preventDefault()}if(!s)return;const r=t(e.target.ownerDocument.activeElement);if(!r)return;const{index:l,focusables:m}=r,u=n?function(e,t,n){const a=e+n;return a<0?t+a:a>=t?a-t:a}(l,m.length,s):l+s;u>=0&&u<m.length&&(m[u].focus(),o(u,m[u]))}render(){const{children:e,...t}=this.props;return(0,a.createElement)("div",{ref:this.bindContainer,...(0,o.omit)(t,["stopNavigationEvents","eventToOffset","onNavigate","onKeyDown","cycle","onlyBrowserTabstops","forwardedRef"])},e)}}const u=(e,t)=>(0,a.createElement)(m,{...e,forwardedRef:t});u.displayName="NavigableContainer";const b=(0,i.forwardRef)(u),p=(0,i.forwardRef)((function({role:e="menu",orientation:t="vertical",...n},i){return(0,a.createElement)(b,{ref:i,stopNavigationEvents:!0,onlyBrowserTabstops:!1,role:e,"aria-orientation":"presentation"===e?null:t,eventToOffset:e=>{const{keyCode:n}=e;let a=[r.DOWN],i=[r.UP];return"horizontal"===t&&(a=[r.RIGHT],i=[r.LEFT]),"both"===t&&(a=[r.RIGHT,r.DOWN],i=[r.LEFT,r.UP]),(0,o.includes)(a,n)?1:(0,o.includes)(i,n)?-1:(0,o.includes)([r.DOWN,r.UP,r.LEFT,r.RIGHT],n)?0:void 0},...n})}));(0,i.forwardRef)((function({eventToOffset:e,...t},n){return(0,a.createElement)(b,{ref:n,stopNavigationEvents:!0,onlyBrowserTabstops:!0,eventToOffset:t=>{const{keyCode:n,shiftKey:a}=t;return r.TAB===n?a?-1:1:e?e(t):void 0},...t})}));var g=n(6427);const v=()=>{},f=({tabId:e,onClick:t,children:n,selected:o,triggerEvent:i,handleEvent:s,tabName:r,...l})=>{const c=h(i,s,r);return(0,a.createElement)(g.Button,{role:"tab",tabIndex:o?null:-1,"aria-selected":o,id:e,...c,...l},n)},h=(e,t,n)=>{const a=(0,i.useCallback)((()=>t(n)),[t,n]);return"click"===e?{onClick:a}:{onMouseOver:a}};function w({className:e,children:t,tabs:n,initialTabName:r,orientation:l="horizontal",activeClass:c="is-active",notActiveClass:d="is-not-active",callback:m,onSelect:u=v,triggerEvent:b}){var g;const h=(0,s.useInstanceId)(w,"tab-panel"),[E,N]=(0,i.useState)(null),y=e=>{N(e),u(e);const t=(0,o.find)(n,{name:e});"function"==typeof m&&m(t)},_=(0,o.find)(n,{name:E}),x=`${h}-${null!==(g=_?.name)&&void 0!==g?g:"none"}`;return(0,i.useEffect)((()=>{(0,o.find)(n,{name:E})||N(r||(n.length>0?n[0].name:null))}),[n]),(0,a.createElement)("div",{className:e},(0,a.createElement)(p,{role:"tablist",orientation:l,onNavigate:(e,t)=>{t.click()},className:"components-tab-panel__tabs"},n.map((e=>(0,a.createElement)(f,{className:`components-tab-panel__tabs-item ${e.name===E&&c} ${e.name!==E&&d}`,tabId:`${h}-${e.name}`,"aria-controls":`${h}-${e.name}-view`,selected:e.name===E,key:e.name,triggerEvent:b,handleEvent:y,tabName:e.name},e.title)))),_&&(0,a.createElement)("div",{key:x,"aria-labelledby":x,role:"tabpanel",id:`${x}-view`,className:"components-tab-panel__tab-content"},t&&t(_)))}},4051:(e,t,n)=>{n.r(t),n.d(t,{default:()=>C});var a=n(1609),o=n(8468),i=n(7143),s=n(5573);const r=(0,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(s.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}));var l=n(6655),c=n(148),d=n(3988),m=n(5842),u=n(9927),b=n(1852),p=n(5479),g=n(7839),v=n(7675),f=n(8969),h=n(7723),w=n(3474);var E=n(8590),N=n(2940),y=n(67),_=n(3731),x=n(1056),T=n(2202);const C=()=>{const e=(0,c.zy)(),t=(0,c.Zp)(),{brandName:n,migrationUrl:s,allSteps:C,canMigrateSite:k}=(0,i.useSelect)((e=>({brandName:e(v.M).getNewfoldBrandName(),migrationUrl:e(v.M).getMigrationUrl(),allSteps:e(v.M).getAllSteps(),canMigrateSite:e(v.M).canMigrateSite()})),[e.pathname]),{setDrawerActiveView:S,setSidebarActiveView:A,setIsDrawerSuppressed:D,setIsHeaderNavigationEnabled:P,setHeaderActiveView:M,setIsHeaderEnabled:O,updateAllSteps:I}=(0,i.useDispatch)(v.M);(0,o.useEffect)((()=>{A(f.Qe),P(!0),D(!0),S(f.lf),M(f.Mw),O(!0)}),[]),(0,o.useEffect)((()=>{const e=(0,N.x9)(C,[_.O]);I(e.allSteps)}),[]);const R=(e=>({heading:(0,h.sprintf)(/* translators: %s: website or store */ /* translators: %s: website or store */ (0,h.__)("Make your %s dreams a reality!","wp-module-onboarding"),(0,w.P)("website")),subheading:(0,h.sprintf)(/* translators: %s: Brand */ /* translators: %s: Brand */ (0,h.__)("with WordPress and %s.","wp-module-onboarding"),e),migrateButtonText:(0,h.__)("Migrate a WordPress Site","wp-module-onboarding"),startButtonText:(0,h.__)("Start Setup","wp-module-onboarding"),tabs:[{name:"tab1",title:(0,h.__)("YOUR CONTENT","wp-module-onboarding"),subtitle:(0,h.__)("Publish boldly with WordPress Blocks.","wp-module-onboarding"),text:(0,h.sprintf)(/* translators: %s: site or store */ /* translators: %s: site or store */ (0,h.__)("Build a beautiful %s using a visual builder. Block Patterns accelerate telling your story or tending your store with professional designs.","wp-module-onboarding"),(0,w.P)("site")),imgType:"content-img",animationName:"fade-in-right"},{name:"tab2",title:(0,h.__)("POWERFUL FEATURES","wp-module-onboarding"),subtitle:(0,h.__)("Proven, easy-to-use solutions.","wp-module-onboarding"),text:(0,h.sprintf)(/* translators: 1: site or store 2: Brand */ /* translators: 1: site or store 2: Brand */ (0,h.__)("Reach for your %1$s goals using proven WordPress Plugins & %2$s solutions. Send a newsletter, host a podcast, book clients, take payments and more.","wp-module-onboarding"),(0,w.P)("site"),e),imgType:"features-img",animationName:"fade-in-up"},{name:"tab3",title:(0,h.__)("MODERN DESIGN","wp-module-onboarding"),subtitle:(0,h.__)("Paint trim. Move walls. No sweat.","wp-module-onboarding"),text:(0,h.sprintf)(/* translators: %s: site or store */ /* translators: %s: site or store */ (0,h.__)("Establish your %s's unique design. Use the WordPress Editor to refine over time with professionally-designed patterns, parts, templates, colors and type.","wp-module-onboarding"),(0,w.P)("site")),imgType:"design-img",animationName:"fade-in-left"}]}))(n);return(0,a.createElement)(d.A,{isBgPrimary:!0,isCentered:!0},(0,a.createElement)(m.A,null,(0,a.createElement)("div",{className:"welcome-card"},(0,a.createElement)(u.A,{heading:R.heading,subHeading:R.subheading}),(0,a.createElement)(g.A,{className:"nfd-onboarding-overview__tab-panel",tabs:R.tabs.map((e=>({name:e.name,title:e.title,content:(0,a.createElement)(p.A,{title:e.subtitle,text:e.text,imgType:e.imgType,animationName:e.animationName,className:"tab-data"})})))},(e=>(0,a.createElement)("div",null,e.content))),(0,a.createElement)("div",{className:"nfd-onboarding-overview__buttons"},(s||k)&&(0,a.createElement)(E.default,{className:"nfd-onboarding-overview__buttons--white",text:R.migrateButtonText,icon:r,onClick:()=>{(()=>{if(k){const e=(0,N.gK)(C,y.H);I(e.allSteps),t(_.O.path)}else window.open(s,"_blank");(0,x.v)(new x.iC(T.Qh,"MIGRATE"))})()}}),(0,a.createElement)(b.A,{className:"nfd-onboarding-overview__buttons--background",text:R.startButtonText,icon:l.A})))))}}}]); Save