/*! For license information please see launch-store.js.LICENSE.txt */ (globalThis.webpackChunk_wcAdmin_webpackJsonp=globalThis.webpackChunk_wcAdmin_webpackJsonp||[]).push([[3678],{49415:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var s=o(86087),n=o(65993),a=o.n(n),r=o(56427);function i(e){return(0,s.createElement)(r.Button,{...e,className:a()("edit-site-sidebar-button",e.className)})}},91573:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var s=o(5573),n=o(39793);const a=(0,n.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(s.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"})})},20178:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var s=o(5573),n=o(39793);const a=(0,n.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(s.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})})},28629:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var s=o(5573),n=o(39793);const a=(0,n.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(s.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})})},54431:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var s=o(5573),n=o(39793);const a=(0,n.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(s.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})})},97855:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var s=o(5573),n=o(39793);const a=(0,n.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(s.Path,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"})})},75200:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var s=o(5573),n=o(39793);const a=(0,n.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(s.Path,{fillRule:"evenodd",d:"M6.5 8a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zM8 5a3 3 0 100 6 3 3 0 000-6zm6.5 11a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zm1.5-3a3 3 0 100 6 3 3 0 000-6zM5.47 17.41a.75.75 0 001.06 1.06L18.47 6.53a.75.75 0 10-1.06-1.06L5.47 17.41z",clipRule:"evenodd"})})},57727:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var s=o(5573),n=o(39793);const a=(0,n.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(s.Path,{d:"M3 6.75C3 5.784 3.784 5 4.75 5H15V7.313l.05.027 5.056 2.73.394.212v3.468a1.75 1.75 0 01-1.75 1.75h-.012a2.5 2.5 0 11-4.975 0H9.737a2.5 2.5 0 11-4.975 0H3V6.75zM13.5 14V6.5H4.75a.25.25 0 00-.25.25V14h.965a2.493 2.493 0 011.785-.75c.7 0 1.332.287 1.785.75H13.5zm4.535 0h.715a.25.25 0 00.25-.25v-2.573l-4-2.16v4.568a2.487 2.487 0 011.25-.335c.7 0 1.332.287 1.785.75zM6.282 15.5a1.002 1.002 0 00.968 1.25 1 1 0 10-.968-1.25zm9 0a1 1 0 101.937.498 1 1 0 00-1.938-.498z"})})},31034:(e,t,o)=>{"use strict";o.d(t,{a:()=>r});var s=o(4921),n=o(86087),a=o(48653);const r=({children:e,className:t})=>(0,n.createElement)("div",{className:(0,s.A)("woocommerce-onboarding-loader",t)},e);r.Layout=({children:e,className:t})=>(0,n.createElement)("div",{className:(0,s.A)("woocommerce-onboarding-loader-wrapper",t)},(0,n.createElement)("div",{className:(0,s.A)("woocommerce-onboarding-loader-container",t)},e)),r.Illustration=({children:e})=>(0,n.createElement)(n.Fragment,null,e),r.Title=({children:e,className:t})=>(0,n.createElement)("h1",{className:(0,s.A)("woocommerce-onboarding-loader__title",t)},e),r.ProgressBar=({progress:e,className:t})=>(0,n.createElement)(a.A,{className:(0,s.A)("progress-bar",t),percent:e??0,color:"var(--wp-admin-theme-color)",bgcolor:"#E0E0E0"}),r.Subtext=({children:e,className:t})=>(0,n.createElement)("p",{className:(0,s.A)("woocommerce-onboarding-loader__paragraph",t)},e),r.Sequence=({interval:e,shouldLoop:t=!0,children:o,onChange:s=()=>{}})=>{const[a,r]=(0,n.useState)(0),i=n.Children.count(o);(0,n.useEffect)(()=>{const o=setInterval(()=>{r(e=>{const n=e+1;if(t){const e=n%i;return s(e),e}return nclearInterval(o)},[e,o,t,i]);const c=n.Children.toArray(o)[a];return(0,n.createElement)(n.Fragment,null,c)}},51832:(e,t,o)=>{"use strict";o.d(t,{L:()=>j});var s=o(51609),n=o(86087),a=o(56427),r=o(63654),i=o(78051),c=o(99492),l=o(85844),m=o(7473),d=o(29652),u=o(93132),h=o(77246),p=o(86421),_=o(22950),y=o(12680),g=o(90994),w=o(93220),v=o(59634),b=o(84514),x=o(93580),S=o(73566),f=o(59999),C=o(79162),k=o(41167),E=o(53997);const P=[{name:"visa",component:(0,n.createElement)(r.A,{key:"visa"})},{name:"mastercard",component:(0,n.createElement)(i.A,{key:"mastercard"})},{name:"amex",component:(0,n.createElement)(c.A,{key:"amex"})},{name:"discover",component:(0,n.createElement)(l.A,{key:"discover"})},{name:"woopay",component:(0,n.createElement)(h.A,{key:"woopay"})},{name:"applepay",component:(0,n.createElement)(m.A,{key:"applepay"})},{name:"googlepay",component:(0,n.createElement)(d.A,{key:"googlepay"})},{name:"afterpay",component:(0,n.createElement)(p.A,{key:"afterpay"})},{name:"affirm",component:(0,n.createElement)(_.A,{key:"affirm"})},{name:"klarna",component:(0,n.createElement)(y.A,{key:"klarna"})},{name:"cartebancaire",component:(0,n.createElement)(g.A,{key:"cartebancaire"})},{name:"unionpay",component:(0,n.createElement)(w.A,{key:"unionpay"})},{name:"diners",component:(0,n.createElement)(v.A,{key:"diners"})},{name:"eftpos",component:(0,n.createElement)(b.A,{key:"eftpos"})},{name:"jcb",component:(0,n.createElement)(u.A,{key:"jcb"})},{name:"bancontact",component:(0,n.createElement)(S.A,{key:"bancontact"})},{name:"becs",component:(0,n.createElement)(C.A,{key:"becs"})},{name:"eps",component:(0,n.createElement)(f.A,{key:"eps"})},{name:"ideal",component:(0,n.createElement)(x.A,{key:"ideal"})},{name:"przelewy24",component:(0,n.createElement)(k.A,{key:"przelewy24"})},{name:"grabpay",component:(0,n.createElement)(E.A,{key:"grabpay"})}],j=({isWooPayEligible:e=!1,maxElements:t=10,tabletWidthBreakpoint:o=768,maxElementsTablet:r=7,mobileWidthBreakpoint:i=480,maxElementsMobile:c=5,totalPaymentMethods:l=21})=>{const[m,d]=(0,s.useState)(t),[u,h]=(0,s.useState)(!1),p=(0,s.useRef)(null),_=e=>{const t=e.target.closest(".woocommerce-woopayments-payment-methods-logos-count");p.current&&t!==p.current||h(e=>!e)},y=e=>{"Escape"===e.key&&u?(e.stopPropagation(),h(!1),p.current?.focus()):"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),_(e))};(0,s.useEffect)(()=>{if(!u)return;const e=e=>{"Escape"===e.key&&(e.stopPropagation(),h(!1),p.current?.focus())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[u]);const g=e?l:l-1,w=t=>e?t:t+1;(0,s.useEffect)(()=>{const e=()=>{window.innerWidth<=i?d(c):window.innerWidth<=o?d(r):d(t)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[t,c,r,o,i]);const v=P.slice(0,w(m)).filter(t=>e||"woopay"!==t.name),b=P.slice(w(m)).filter(t=>e||"woopay"!==t.name);return(0,n.createElement)("div",{className:"woocommerce-woopayments-payment-methods-logos"},v.map(e=>e.component),m{h(!1)},onKeyDown:y},(0,n.createElement)("div",{className:"woocommerce-woopayments-payment-methods-logos"},b.map(e=>e.component)))))}},43673:(e,t,o)=>{"use strict";o.d(t,{b:()=>i,J:()=>c});var s=o(84343),n=o.n(s),a=o(27723);const r={PH:{"National Capital Region":(0,a.__)("Metro Manila","woocommerce")},IT:{Rome:(0,a.__)("Roma","woocommerce")}},i=(e,t,o=.7)=>{if(!t)return null;let s=null,a=o;const i=(({country_short:e,region:t="",city:o=""})=>{if(!e)return null;const s=r[e];if(!s)return null;const n=s[t];return n||(s[o]||null)})(t);for(const o of e){if(o.key===t.country_short)return o;if(o.key.split(":")[0]===t.country_short&&o.label.includes("—")){const e=o.label.split("—")[1].trim();if(i===e)return o;if(0===e.localeCompare(t.region||"","en",{sensitivity:"base"})||0===e.localeCompare(t.city||"","en",{sensitivity:"base"}))return o;const r=Math.max(n().compareTwoStrings(e,t.region||""),n().compareTwoStrings(e,t.city||""));r>=a&&(s=o,a=r)}}return s},c=e=>e?.split(":")[0]??void 0},87889:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var s=o(39793);const n=()=>(0,s.jsxs)("svg",{width:"91",height:"24",viewBox:"0 0 91 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"wc-icon wc-icon__woo-logo new-branding",children:[(0,s.jsx)("path",{d:"M79.0537 0C72.2755 0 67.0874 5.10851 67.0874 12C67.0874 18.8915 72.2755 24 79.0537 24C85.832 24 91.0002 18.8915 91.0002 12C91.0002 5.10851 85.7923 0 79.0537 0ZM79.0537 16.6277C76.5094 16.6277 74.7602 14.6644 74.7602 12C74.7602 9.33555 76.4895 7.37228 79.0537 7.37228C81.6179 7.37228 83.3473 9.33555 83.3473 12C83.3473 14.6644 81.5981 16.6277 79.0537 16.6277Z",fill:"#873DFF"}),(0,s.jsx)("path",{d:"M53.7285 0C46.9503 0 41.7622 5.10851 41.7622 12C41.7622 18.8915 46.9701 24 53.7285 24C60.4869 24 65.675 18.8915 65.675 12C65.675 5.10851 60.4671 0 53.7285 0ZM53.7285 16.6277C51.1842 16.6277 49.435 14.6644 49.435 12C49.435 9.33555 51.1643 7.37228 53.7285 7.37228C56.2928 7.37228 58.0221 9.33555 58.0221 12C58.0221 14.6644 56.2928 16.6277 53.7285 16.6277Z",fill:"#873DFF"}),(0,s.jsx)("path",{d:"M11.688 24C14.3715 24 16.5183 22.6577 18.1483 19.5726L21.7461 12.7813V18.5509C21.7461 21.9365 23.9327 24 27.3317 24C29.9556 24 31.8837 22.798 33.792 19.5726L42.1207 5.44908C43.9494 2.36394 42.6574 0 38.6421 0C36.4953 0 35.1039 0.721201 33.8516 3.08514L28.107 13.9232V4.28714C28.107 1.40234 26.7553 0 24.2308 0C22.2629 0 20.6926 0.861435 19.4602 3.26544L14.0535 13.9032V4.38731C14.0535 1.30217 12.8012 0 9.74004 0H3.53822C1.19266 0 0 1.10184 0 3.14524C0 5.18864 1.23241 6.33054 3.53822 6.33054H6.08255V18.5309C6.10243 21.9365 8.3486 24 11.688 24Z",fill:"#873DFF"})]})},77740:(e,t,o)=>{"use strict";o.d(t,{b:()=>S});var s=o(4921),n=o(47143),a=o(56427),r=o(29491),i=o(3582),c=o(18537),l=o(86087),m=o(65993),d=o.n(m),u=o(27723),h=o(51609),p=o(5573);const _=(0,h.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,h.createElement)(p.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})),y=function({className:e}){const{isRequestingSite:t,siteIconUrl:o}=(0,n.useSelect)(e=>{const{getEntityRecord:t}=e(i.store),o=t("root","__unstableBase",void 0);return{isRequestingSite:!o,siteIconUrl:o?.site_icon_url}},[]);if(t&&!o)return(0,l.createElement)("div",{className:"edit-site-site-icon__image"});const s=o?(0,l.createElement)("img",{className:"edit-site-site-icon__image",alt:(0,u.__)("Site Icon"),src:o}):(0,l.createElement)(a.Icon,{className:"edit-site-site-icon__icon",size:"48px",icon:_});return(0,l.createElement)("div",{className:d()(e,"edit-site-site-icon")},s)};var g=o(96476),w=o(98846),v=o(39793);const b=function({className:e="wordpress-logo",size:t=72}){return(0,v.jsx)("svg",{className:e,height:t,width:t,viewBox:"0 0 72 72",children:(0,v.jsx)("path",{d:"M36,0C16.1,0,0,16.1,0,36c0,19.9,16.1,36,36,36c19.9,0,36-16.2,36-36C72,16.1,55.8,0,36,0z M3.6,36 c0-4.7,1-9.1,2.8-13.2l15.4,42.3C11.1,59.9,3.6,48.8,3.6,36z M36,68.4c-3.2,0-6.2-0.5-9.1-1.3l9.7-28.2l9.9,27.3 c0.1,0.2,0.1,0.3,0.2,0.4C43.4,67.7,39.8,68.4,36,68.4z M40.5,20.8c1.9-0.1,3.7-0.3,3.7-0.3c1.7-0.2,1.5-2.8-0.2-2.7 c0,0-5.2,0.4-8.6,0.4c-3.2,0-8.5-0.4-8.5-0.4c-1.7-0.1-2,2.6-0.2,2.7c0,0,1.7,0.2,3.4,0.3l5,13.8L28,55.9L16.2,20.8 c2-0.1,3.7-0.3,3.7-0.3c1.7-0.2,1.5-2.8-0.2-2.7c0,0-5.2,0.4-8.6,0.4c-0.6,0-1.3,0-2.1,0C14.7,9.4,24.7,3.6,36,3.6 c8.4,0,16.1,3.2,21.9,8.5c-0.1,0-0.3,0-0.4,0c-3.2,0-5.4,2.8-5.4,5.7c0,2.7,1.5,4.9,3.2,7.6c1.2,2.2,2.7,4.9,2.7,8.9 c0,2.8-0.8,6.3-2.5,10.5l-3.2,10.8L40.5,20.8z M52.3,64l9.9-28.6c1.8-4.6,2.5-8.3,2.5-11.6c0-1.2-0.1-2.3-0.2-3.3 c2.5,4.6,4,9.9,4,15.5C68.4,47.9,61.9,58.4,52.3,64z"})})};(0,o(52619).addFilter)("woocommerce_admin_persisted_queries","woocommerce_admin_customize_your_store",e=>(e.push("ref"),e));const x=()=>"entrepreneur-signup"===new URLSearchParams(window.location.search).get("ref"),S=(0,l.forwardRef)(({isTransparent:e,...t},o)=>{const{siteTitle:l}=(0,n.useSelect)(e=>{const{getSite:t}=e(i.store);return{siteTitle:t()?.title}},[]),m=(0,r.useReducedMotion)();return(0,v.jsx)(a.__unstableMotion.div,{ref:o,...t,className:(0,s.A)("woocommerce-edit-site-site-hub",t.className),initial:!1,transition:{type:"tween",duration:m?0:.3,ease:"easeOut"},children:(0,v.jsx)(a.__experimentalHStack,{justify:"space-between",alignment:"center",className:"woocommerce-edit-site-site-hub__container",children:(0,v.jsxs)(a.__experimentalHStack,{justify:"flex-start",className:"woocommerce-edit-site-site-hub__text-content",spacing:"0",children:[(0,v.jsx)("div",{className:(0,s.A)("woocommerce-edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),children:(0,v.jsx)(w.Link,{href:(0,g.getNewPath)((0,g.getPersistedQuery)(),"/",{}),type:"wp-admin",children:x()?(0,v.jsx)(b,{size:24,className:"woocommerce-cys-wordpress-header-logo"}):(0,v.jsx)(y,{className:"woocommerce-edit-site-layout__view-mode-toggle-icon"})})}),!x()&&(0,v.jsx)(a.__unstableAnimatePresence,{children:(0,v.jsx)(a.__unstableMotion.div,{layout:!1,animate:{opacity:1},exit:{opacity:0},className:(0,s.A)("woocommerce-edit-site-site-hub__site-title",{"is-transparent":e}),transition:{type:"tween",duration:m?0:.2,ease:"easeOut",delay:.1},children:(0,c.decodeEntities)(l??"")})})]})})})})},38993:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>Qe});var s=o(94859),n=o(51609),a=o.n(n),r=o(47143),i=o(40314),c=o(4921),l=o(76071),m=o(7754),d=o(7),u=o(19669),h=o(93009),p=o(98752),_=o(95747),y=o(96476),g=o(83306),w=o(1455),v=o.n(w),b=o(86087),x=o(27723),S=o(65993),f=o.n(S),C=o(56427);const k=(0,b.forwardRef)(function({icon:e,size:t=24,...o},s){return(0,b.cloneElement)(e,{width:t,height:t,...o,ref:s})});var E=o(5573);const P=(0,n.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(E.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})),j=(0,n.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(E.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));function A({className:e,icon:t,withChevron:o=!1,suffix:s,children:n,...a}){return(0,b.createElement)(C.__experimentalItem,{className:f()("edit-site-sidebar-navigation-item",{"with-suffix":!o&&s},e),...a},(0,b.createElement)(C.__experimentalHStack,{justify:"flex-start"},t&&(0,b.createElement)(k,{style:{fill:"currentcolor"},icon:t,size:24}),(0,b.createElement)(C.FlexBlock,null,n),o&&(0,b.createElement)(k,{icon:(0,x.isRTL)()?P:j,className:"edit-site-sidebar-navigation-item__drilldown-indicator",size:24}),!o&&s))}var T=o(28629),N=o(20178),L=o(77871),R=o(42905),M=o(49415),W=o(39793);const O=({title:e,description:t,footer:o,children:s,onMobileClose:n})=>{const r=(0,x.isRTL)()?T.A:N.A;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(C.__experimentalVStack,{className:(0,c.A)("woocommerce-edit-site-sidebar-navigation-screen__main",{"has-footer":!!o}),spacing:0,justify:"flex-start",children:[(0,W.jsxs)(C.__experimentalHStack,{spacing:4,alignment:"flex-start",className:"woocommerce-edit-site-sidebar-navigation-screen__title-icon",children:[(0,W.jsx)(M.A,{onClick:(i=e,a().isValidElement(i)&&"function"==typeof i.props.onClick?e.props.onClick:void 0),icon:r,label:(0,x.__)("Back","woocommerce"),showTooltip:!1}),(0,W.jsx)(C.__experimentalHeading,{className:"woocommerce-edit-site-sidebar-navigation-screen__title",level:1,as:"h1",children:e})]}),n&&(0,W.jsx)("div",{className:"woocommerce-lys-mobile-sidebar-close",children:(0,W.jsx)(C.Button,{className:"mobile-sidebar-close",onClick:n,icon:(0,W.jsx)(L.A,{icon:R.A,size:24}),"aria-label":(0,x.__)("Close sidebar","woocommerce")})}),(0,W.jsxs)("div",{className:"woocommerce-edit-site-sidebar-navigation-screen__content",children:[t&&(0,W.jsx)("p",{className:"woocommerce-edit-site-sidebar-navigation-screen__description",children:t}),s]})]}),o&&(0,W.jsx)("footer",{className:"woocommerce-edit-site-sidebar-navigation-screen__footer",children:o})]});var i};var H=o(47301),I=o(75200),z=o(57727),D=o(91573),B=o(97855);const U=(0,W.jsx)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,W.jsx)(E.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),F=(0,W.jsx)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,W.jsx)(E.Path,{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 18.5C10.2761 18.5 8.62279 17.8152 7.40381 16.5962C6.18482 15.3772 5.5 13.7239 5.5 12C5.5 10.2761 6.18482 8.62279 7.40381 7.40381C8.62279 6.18482 10.2761 5.5 12 5.5C13.7239 5.5 15.3772 6.18482 16.5962 7.40381C17.8152 8.62279 18.5 10.2761 18.5 12C18.5 13.7239 17.8152 15.3772 16.5962 16.5962C15.3772 17.8152 13.7239 18.5 12 18.5ZM4 12C4 9.87827 4.84285 7.84344 6.34315 6.34315C7.84344 4.84285 9.87827 4 12 4C14.1217 4 16.1566 4.84285 17.6569 6.34315C19.1571 7.84344 20 9.87827 20 12C20 14.1217 19.1571 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20C9.87827 20 7.84344 19.1571 6.34315 17.6569C4.84285 16.1566 4 14.1217 4 12ZM15.53 10.53L14.47 9.47L11 12.94L9.53 11.47L8.47 12.53L11 15.06L15.53 10.53Z",fill:"#00A32A"})}),Y=(0,W.jsx)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,W.jsx)(E.Path,{d:"M5 17.7C5.4 18.2 5.8 18.6 6.2 18.9L7.3 17.5C6.9 17.2 6.6 16.9 6.3 16.5L5 17.7ZM5 6.3L6.4 7.4C6.7 7 7 6.7 7.4 6.4L6.3 5C5.8 5.4 5.4 5.8 5 6.3ZM5.1 14.1L3.4 14.6C3.6 15.2 3.8 15.7 4.1 16.2L5.6 15.4C5.4 15 5.2 14.6 5.1 14.1ZM4.8 12V11.3L3 11.1V12.9L4.7 12.7C4.8 12.5 4.8 12.2 4.8 12ZM7.8 19.9C8.3 20.2 8.9 20.4 9.4 20.6L9.9 18.9C9.4 18.8 9 18.6 8.6 18.4L7.8 19.9ZM19 6.3C18.6 5.8 18.2 5.4 17.8 5.1L16.7 6.5C17.1 6.8 17.4 7.1 17.7 7.5L19 6.3ZM18.9 9.9L20.6 9.4C20.4 8.8 20.2 8.3 19.9 7.8L18.4 8.6C18.6 9 18.8 9.4 18.9 9.9ZM5.6 8.6L4.1 7.8C3.8 8.3 3.6 8.8 3.4 9.4L5.1 9.9C5.2 9.4 5.4 9 5.6 8.6ZM7.8 4.1L8.6 5.6C9 5.4 9.4 5.2 9.9 5.1L9.4 3.4C8.8 3.6 8.3 3.8 7.8 4.1ZM16.6 17.6L17.7 19C18.2 18.6 18.6 18.2 18.9 17.8L17.5 16.7C17.3 17 17 17.3 16.6 17.6ZM18.4 15.4L19.9 16.2C20.2 15.7 20.4 15.1 20.6 14.6L18.9 14.1C18.8 14.6 18.6 15 18.4 15.4ZM21 11.1L19.3 11.3V12.7L21 12.9V12V11.1ZM11.1 3L11.3 4.7H12.7L12.9 3H11.1ZM14.1 5.1C14.6 5.2 15 5.4 15.4 5.6L16.2 4.1C15.7 3.8 15.1 3.6 14.6 3.4L14.1 5.1ZM12 19.2H11.3L11.1 21H12.9L12.7 19.3C12.5 19.2 12.2 19.2 12 19.2ZM14.1 18.9L14.6 20.6C15.2 20.4 15.7 20.2 16.2 19.9L15.4 18.4C15 18.6 14.6 18.8 14.1 18.9Z",fill:"#949494"})}),V=H.A,G={tax:I.A,shipping:z.A,"customize-store":D.A,payments:B.A,"woocommerce-payments":B.A,products:U,activePaymentStep:Y,completedPaymentStep:F};var K=o(77740),Z=o(52619),$=o(32478),Q=o(15703),q=o(39826),X=o(86486);const{getWithExpiry:J,setWithExpiry:ee}=(0,$.createStorageUtils)("lys_recently_actioned_tasks",604800),te=async()=>{const e=(0,Z.applyFilters)("woocommerce_launch_your_store_tasklist_whitelist",["products","customize-store","payments","shipping","tax"]),t=await(0,r.resolveSelect)(i.onboardingStore).getTaskListsByIds(["setup"]),o=J()??[],s=t[0].tasks.filter(t=>e.includes(t.id)&&(!t.isComplete||o.includes(t.id)));return{...t[0],tasks:s,recentlyActionedTasks:o,fullLysTaskList:t[0].tasks.filter(t=>e.includes(t.id))}},oe=({task:e,classNames:t})=>(0,W.jsx)(A,{className:(0,c.A)(e.id,"is-complete",t),icon:V,disabled:!0,children:e.title}),se=({task:e,classNames:t,onClick:o})=>(0,W.jsx)(A,{className:(0,c.A)(e.id,t),icon:G[e.id],withChevron:!0,onClick:o,children:e.title}),ne=e=>{const{context:{tasklist:t,removeTestOrders:o,testOrderCount:s,launchStoreError:n}}=e,a=(0,W.jsx)(C.Button,{onClick:()=>{e.sendEventToSidebar({type:"POP_BROWSER_STACK"})},children:(0,x.__)("Launch Your Store","woocommerce")}),r=(0,x.__)("Ready to start selling? Before you launch your store, make sure you’ve completed these essential tasks. If you’d like to change your store visibility, go to WooCommerce > Settings > Site visibility.","woocommerce"),i=t&&!t.tasks.every(e=>e.isComplete),[l,m]=(0,b.useState)(o??!0),[d,u]=(0,b.useState)(!1),[h,p]=(0,b.useState)(!1),_=()=>{p(!0),e.sendEventToSidebar({type:"LAUNCH_STORE",removeTestOrders:l})};return(0,b.useEffect)(()=>{n?.message&&p(!1)},[n?.message]),(0,W.jsxs)("div",{className:(0,c.A)("launch-store-sidebar__container",e.className),children:[(0,W.jsx)(C.__unstableMotion.div,{className:"woocommerce-edit-site-layout__header-container",animate:"view",children:(0,W.jsx)(K.b,{variants:{view:{x:0}},isTransparent:!1,className:"woocommerce-edit-site-layout__hub"})}),(0,W.jsxs)(O,{title:a,description:r,onMobileClose:e.onMobileClose,children:[(0,W.jsx)("div",{className:"woocommerce-edit-site-sidebar-navigation-screen-essential-tasks__group-header",children:(0,W.jsx)(C.__experimentalHeading,{level:2,children:(0,x.__)("Essential Tasks","woocommerce")})}),(0,W.jsxs)(C.__experimentalItemGroup,{className:"woocommerce-edit-site-sidebar-navigation-screen-essential-tasks__group",children:[t&&i&&t.tasks.map(t=>t.isComplete?(0,W.jsx)(oe,{task:t},t.id):(0,W.jsx)(se,{task:t,onClick:()=>{e.sendEventToSidebar({type:"TASK_CLICKED",task:t})}},t.id)),t&&!i&&(0,W.jsx)(A,{className:"all-tasks-complete",icon:V,children:(0,x.__)("Fantastic job! Your store is ready to go — no pending tasks to complete.","woocommerce")})]}),s>0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("div",{className:"woocommerce-edit-site-sidebar-navigation-screen-test-data__group-header",children:(0,W.jsx)(C.__experimentalHeading,{level:2,children:(0,x.__)("Test data","woocommerce")})}),(0,W.jsxs)(C.__experimentalItemGroup,{className:"woocommerce-edit-site-sidebar-navigation-screen-remove-test-data__group",children:[(0,W.jsx)(C.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,x.sprintf)((0,x.__)("Remove %d test orders","woocommerce"),s),checked:l,onChange:m}),(0,W.jsx)("p",{children:(0,x.__)("Remove test orders and associated data, including analytics and transactions, once your store goes live. ","woocommerce")})]})]}),(0,W.jsxs)(C.__experimentalItemGroup,{className:"woocommerce-edit-site-sidebar-navigation-screen-launch-store-button__group",children:[n?.message&&!d&&(0,W.jsx)(C.Notice,{className:"launch-store-error-notice",isDismissible:!0,onRemove:()=>u(!0),status:"error",children:(0,b.createInterpolateElement)((0,x.__)("Oops! We encountered a problem while launching your store. ","woocommerce"),{retryButton:(0,W.jsx)(C.Button,{onClick:_,variant:"tertiary",children:(0,x.__)("Please try again","woocommerce")})})}),(0,W.jsx)(C.Button,{variant:"primary",onClick:_,children:h?(0,W.jsx)(C.Spinner,{}):(0,x.__)("Launch your store","woocommerce")})]})]})]})};var ae=o(65219);const re=({rows:e})=>{const t=Array.from({length:e}).map((e,t)=>(0,W.jsxs)(C.__unstableMotion.div,{className:"step-placeholder__item payment-step payment-step--disabled",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3,delay:.1*t,ease:"easeOut"},children:[(0,W.jsx)("div",{className:"step-placeholder__icon step-placeholder__shimmer"}),(0,W.jsx)("div",{className:"step-placeholder__content",children:(0,W.jsx)("div",{className:"step-placeholder__text step-placeholder__shimmer"})})]},t));return(0,W.jsx)(C.__unstableMotion.div,{className:"step-placeholder",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:t})};var ie=o(57309);const ce=(0,b.createContext)({isWooPaymentsActive:!1,isWooPaymentsInstalled:!1,wooPaymentsRecentlyActivated:!1,setWooPaymentsRecentlyActivated:()=>{}}),le=()=>(0,b.useContext)(ce),me=({children:e,closeModal:t})=>{const{wooPaymentsPluginSlug:o,isSlugResolved:s}=(0,r.useSelect)(e=>{const t=e(i.paymentSettingsStore),o=t.isFetching(),s=t.getPaymentProviders(),n=Array.isArray(s)?s.find(e=>(0,q.j4)(e.id)):void 0,a=!o&&Array.isArray(s),r=n?.plugin?.slug;return{wooPaymentsPluginSlug:r??X.bw,isSlugResolved:a}},[]),n=(0,r.useSelect)(e=>{const t=e(i.pluginsStore).getActivePlugins();return!!Array.isArray(t)&&t.includes(o)},[o]),a=(0,r.useSelect)(e=>{const t=e(i.pluginsStore).getInstalledPlugins();return!!Array.isArray(t)&&t.includes(o)},[o]),[c,l]=(0,b.useState)(!1),m={buildStepURL:(e,t={})=>(0,y.getNewPath)({path:e,...t},"/launch-your-store"+e,{page:"wc-admin",path:"/launch-your-store/woopayments/onboarding",sidebar:"hub",content:"payments"}),preserveParams:["sidebar","content"]};return s?(0,W.jsxs)(ce.Provider,{value:{isWooPaymentsActive:n,isWooPaymentsInstalled:a,wooPaymentsRecentlyActivated:c,setWooPaymentsRecentlyActivated:l},children:[n&&(0,W.jsx)(ae.X,{closeModal:t,onboardingSteps:ie.PK,urlStrategy:m,sessionEntryPoint:"lys",onFinish:t,children:e}),!n&&e]}):(0,W.jsx)(ce.Provider,{value:{isWooPaymentsActive:!1,isWooPaymentsInstalled:!1,wooPaymentsRecentlyActivated:!1,setWooPaymentsRecentlyActivated:()=>{}},children:e})},de=(0,W.jsx)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,W.jsx)(E.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})}),ue=({onToggle:e})=>(0,W.jsx)(C.Button,{className:"mobile-sidebar-toggle",onClick:e,"aria-label":(0,x.__)("Toggle sidebar","woocommerce"),icon:(0,W.jsx)(L.A,{icon:de,size:24})}),he=e=>(0,W.jsxs)("div",{className:"mobile-header launch-store-hub-mobile-header",children:[(0,W.jsx)(C.Button,{className:"mobile-header__back-button",onClick:()=>{e.sendEventToSidebar({type:"POP_BROWSER_STACK"})},icon:N.A,iconSize:20,"aria-label":(0,x.__)("Go back","woocommerce")}),(0,W.jsx)("h1",{className:"mobile-header__title",children:(0,x.__)("Launch your store","woocommerce")}),e.onToggle&&(0,W.jsx)(ue,{onToggle:e.onToggle})]}),pe=(e,t)=>{let o=(0,y.getHistory)().location;const s=(0,y.getHistory)().listen(({action:s,location:n})=>{if("POP"===s){const s=new URLSearchParams(o.search),a=new URLSearchParams(n.search);s.get(e)!==a.get(e)&&(o=n,t({type:"EXTERNAL_URL_UPDATE"}))}o=n});return()=>{s()}},_e=e=>{const t=(0,y.getQuery)(),o=Object.entries(e).reduce((e,[o,s])=>(t[o]!==s&&(e[o]=s),e),{});Object.keys(o).length>0&&(0,y.updateQueryString)(o)};let ye=null;const ge=async()=>{if(null!==ye)return ye;const e=await v()({path:"/wc-admin/launch-your-store/survey-completed"});return ye=e,ye},we=(0,d.Sx)(async()=>{const[e,t,o]=await Promise.all([ge(),(0,r.resolveSelect)(i.onboardingStore).getTaskListsByIds(["setup","extended"]),(0,r.resolveSelect)(i.pluginsStore).getActivePlugins()]);return{surveyCompleted:e,tasklists:t,activePlugins:o}}),ve=(0,d.SP)(({sendBack:e})=>pe("sidebar",e)),be=async({url:e})=>{try{const t=await fetch(e,{method:"GET",credentials:"omit",cache:"no-store"});if(!t.ok)throw new Error(`Failed to fetch ${e}`);const o=await t.text();return!!(new DOMParser).parseFromString(o,"text/html").querySelector('meta[name="woo-coming-soon-page"]')}catch(t){throw new Error(`Error fetching ${e}: ${t}`)}},xe=async()=>{const e=await(0,r.resolveSelect)(i.settingsStore).getSettings("wc_admin"),t=[];return e?.shopUrl&&t.push(be({url:e.shopUrl})),e?.siteUrl&&t.push(be({url:e.siteUrl})),(await Promise.all(t)).some(e=>e)},Se=(0,u.mj)({types:{},actions:{showLaunchStoreSuccessPage:(0,h.s)(({context:e})=>e.mainContentMachineRef,{type:"SHOW_LAUNCH_STORE_SUCCESS"}),showLaunchStorePendingCache:(0,h.s)(({context:e})=>e.mainContentMachineRef,{type:"SHOW_LAUNCH_STORE_PENDING_CACHE"}),showLoadingPage:(0,h.s)(({context:e})=>e.mainContentMachineRef,{type:"SHOW_LOADING"}),showSitePreview:(0,h.s)(({context:e})=>e.mainContentMachineRef,{type:"EXTERNAL_URL_UPDATE"}),updateQueryParams:(e,t)=>{_e(t)},taskClicked:({event:e,self:t})=>{if("TASK_CLICKED"===e.type){const o=function(e){const t=J()??[];ee([...t,e.task.id]),window.sessionStorage.setItem("lysWaiting","yes");const{setWithExpiry:o}=(0,$.accessTaskReferralStorage)({taskId:e.task.id,referralLifetime:86400});if(o({referrer:"launch-your-store",returnUrl:(0,Q.getAdminLink)("admin.php?page=wc-admin&path=/launch-your-store")}),(0,g.recordEvent)("launch_your_store_hub_task_clicked",{task:e.task.id}),"payments"===e.task.id){const{wooPaymentsIsActive:t,wooPaymentsSettingsCountryIsSupported:o,wooPaymentsIsOnboarded:s,wooPaymentsHasTestAccount:n,wooPaymentsHasOtherProvidersEnabled:a,wooPaymentsHasOtherProvidersNeedSetup:r}=e.task?.additionalData??{};if(o&&(!t&&!a||t&&!s||t&&n||t&&r))return(0,q.W7)("woopayments_onboarding_modal_opened",{from:"lys_sidebar_task",source:X.K7}),{type:"SHOW_PAYMENTS"}}e.task.actionUrl?(0,y.navigateTo)({url:e.task.actionUrl}):(0,y.navigateTo)({url:(0,y.getNewPath)({task:e.task.id},"/",{})})}(e);o&&"object"==typeof o&&"type"in o&&"SHOW_PAYMENTS"===o.type&&t.send({type:"SHOW_PAYMENTS"})}},openWcAdminUrl:({event:e})=>{"OPEN_WC_ADMIN_URL"===e.type&&(0,y.navigateTo)({url:e.url})},windowHistoryBack:()=>{window.history.back()},recordStoreLaunchAttempt:(0,p.a)({launchStoreAttemptTimestamp:({context:e})=>{const t=e.tasklist?.fullLysTaskList.length||0,o=e.tasklist?.tasks.filter(e=>!e.isComplete).map(e=>e.id)||[],s=e.tasklist?.fullLysTaskList.filter(e=>e.isComplete).map(e=>e.id)||[],n=s.filter(t=>e.tasklist?.recentlyActionedTasks.includes(t));return(0,g.recordEvent)("launch_your_store_hub_store_launch_attempted",{tasks_total_count:t,tasks_completed:s,tasks_completed_count:s.length,tasks_completed_in_lys:n,tasks_completed_in_lys_count:n.length,incomplete_tasks:o,incomplete_tasks_count:o.length,delete_test_orders:e.removeTestOrders||!1}),performance.now()}}),recordStoreLaunchResults:({context:e},{success:t})=>{((e,t)=>{(0,g.recordEvent)("launch_your_store_hub_store_launch_results",{success:t,duration:(0,l.D8)(performance.now()-e)})})(e.launchStoreAttemptTimestamp||0,t)},recordStoreLaunchCachedContentDetected:()=>{(0,g.recordEvent)("launch_your_store_hub_store_launch_cached_content_detected")},showPaymentsContent:(0,h.s)(({context:e})=>e.mainContentMachineRef,{type:"SHOW_PAYMENTS"}),triggerTasklistRefresh:({self:e})=>{e.send({type:"REFRESH_TASKLIST"})},navigateToWcAdmin:()=>{window.location.href="/wp-admin/admin.php?page=wc-admin"}},guards:{hasSidebarLocation:(e,{sidebar:t})=>{const{sidebar:o}=(0,y.getQuery)();return!!o&&o===t},hasPaymentsContent:()=>{const{content:e}=(0,y.getQuery)();return"payments"===e},hasWooPaymentsOnboardingPath:()=>{const e=(0,y.getQuery)();return!!e.path&&e.path.includes("/woopayments/onboarding")},hasWooPayments:({context:e})=>!!e.hasWooPayments,siteIsShowingCachedContent:({context:e})=>!!e.siteIsShowingCachedContent},actors:{sidebarQueryParamListener:ve,getTasklist:(0,d.Sx)(te),getTestOrderCount:(0,d.Sx)(async()=>(await v()({path:"/wc-admin/launch-your-store/woopayments/test-orders/count",method:"GET"})).count),getSiteCachedStatus:(0,d.Sx)(xe),updateLaunchStoreOptions:(0,d.Sx)(async()=>{const e=await(0,r.dispatch)(i.optionsStore).updateOptions({woocommerce_coming_soon:"no"});if(e.success)return e;throw new Error(JSON.stringify(e))}),deleteTestOrders:(0,d.Sx)(async({input:e})=>e.removeTestOrders?await v()({path:"/wc-admin/launch-your-store/woopayments/test-orders",method:"DELETE"}):null),fetchCongratsData:we,getWooPaymentsStatus:(0,d.Sx)(async()=>{if(!1===window?.wcSettings?.admin?.plugins?.activePlugins.includes("woocommerce-payments"))return!1;const e=(await(0,r.resolveSelect)(i.paymentGatewaysStore).getPaymentGateways()).filter(e=>e.enabled);return 1===e.length&&(0,q.j4)(e[0].id)})}}).createMachine({id:"sidebar",initial:"navigate",context:({input:e})=>({externalUrl:null,testOrderCount:0,mainContentMachineRef:e.mainContentMachineRef}),invoke:{id:"sidebarQueryParamListener",src:"sidebarQueryParamListener"},states:{navigate:{always:[{guard:{type:"hasWooPaymentsOnboardingPath"},target:"payments"},{guard:{type:"hasPaymentsContent"},target:"payments"},{guard:{type:"hasSidebarLocation",params:{sidebar:"hub"}},target:"launchYourStoreHub"},{guard:{type:"hasSidebarLocation",params:{sidebar:"launch-success"}},target:"storeLaunchSuccessful"},{target:"launchYourStoreHub"}]},launchYourStoreHub:{initial:"preLaunchYourStoreHub",states:{preLaunchYourStoreHub:{entry:[(0,_.b)("fetchCongratsData",{id:"prefetch-congrats-data "})],invoke:{src:"getTasklist",onDone:{actions:(0,p.a)({tasklist:({event:e})=>e.output}),target:"checkWooPayments"}}},checkWooPayments:{invoke:{src:"getWooPaymentsStatus",onDone:{actions:(0,p.a)({hasWooPayments:({event:e})=>e.output}),target:"maybeCountTestOrders"},onError:{target:"maybeCountTestOrders"}}},maybeCountTestOrders:{always:[{guard:"hasWooPayments",target:"countTestOrders"},{target:"launchYourStoreHub"}]},countTestOrders:{invoke:{src:"getTestOrderCount",onDone:{actions:(0,p.a)({testOrderCount:({event:e})=>e.output}),target:"launchYourStoreHub"},onError:{target:"launchYourStoreHub"}}},launchYourStoreHub:{id:"launchYourStoreHub",tags:"sidebar-visible",meta:{component:ne,mobileHeader:he},on:{LAUNCH_STORE:{target:"#storeLaunching"},POP_BROWSER_STACK:{actions:["navigateToWcAdmin"]},REFRESH_TASKLIST:{target:"backgroundRefresh"}}},backgroundRefresh:{id:"backgroundRefresh",tags:"sidebar-visible",meta:{component:ne,mobileHeader:he},invoke:[{src:"getTasklist",onDone:{actions:(0,p.a)({tasklist:({event:e})=>e.output}),target:"backgroundCheckWooPayments"},onError:{target:"launchYourStoreHub"}}],on:{LAUNCH_STORE:{target:"#storeLaunching"},POP_BROWSER_STACK:{actions:["navigateToWcAdmin"]}}},backgroundCheckWooPayments:{tags:"sidebar-visible",meta:{component:ne,mobileHeader:he},invoke:{src:"getWooPaymentsStatus",onDone:{actions:(0,p.a)({hasWooPayments:({event:e})=>e.output}),target:"backgroundMaybeCountTestOrders"},onError:{target:"backgroundMaybeCountTestOrders"}},on:{LAUNCH_STORE:{target:"#storeLaunching"},POP_BROWSER_STACK:{actions:["navigateToWcAdmin"]}}},backgroundMaybeCountTestOrders:{tags:"sidebar-visible",meta:{component:ne,mobileHeader:he},always:[{guard:"hasWooPayments",target:"backgroundCountTestOrders"},{target:"launchYourStoreHub"}]},backgroundCountTestOrders:{tags:"sidebar-visible",meta:{component:ne,mobileHeader:he},invoke:{src:"getTestOrderCount",onDone:{actions:(0,p.a)({testOrderCount:({event:e})=>e.output}),target:"launchYourStoreHub"},onError:{target:"launchYourStoreHub"}},on:{LAUNCH_STORE:{target:"#storeLaunching"},POP_BROWSER_STACK:{actions:["navigateToWcAdmin"]}}}}},storeLaunching:{id:"storeLaunching",initial:"launching",states:{launching:{entry:[(0,p.a)({launchStoreError:void 0}),"recordStoreLaunchAttempt"],invoke:[{src:"updateLaunchStoreOptions",onDone:{actions:[{type:"recordStoreLaunchResults",params:{success:!0}}],target:"checkingForCachedContent"},onError:{actions:[(0,p.a)({launchStoreError:({event:e})=>({message:JSON.stringify(e.error)})}),{type:"recordStoreLaunchResults",params:{success:!1}}],target:"#launchYourStoreHub"}},{src:"deleteTestOrders",input:({event:e})=>({removeTestOrders:e.removeTestOrders})}]},checkingForCachedContent:{invoke:[{src:"getSiteCachedStatus",onDone:{target:"#storeLaunchSuccessful",actions:(0,p.a)({siteIsShowingCachedContent:({event:e})=>e.output})},onError:{target:"#storeLaunchSuccessful"}}]}}},storeLaunchSuccessful:{id:"storeLaunchSuccessful",tags:"fullscreen",entry:[{type:"updateQueryParams",params:{sidebar:"launch-success",content:"launch-store-success"}},(0,h.e)(({check:e,enqueue:t})=>{if(e("siteIsShowingCachedContent"))return t({type:"showLaunchStorePendingCache"}),void t({type:"recordStoreLaunchCachedContentDetected"});t({type:"showLaunchStoreSuccessPage"})})]},payments:{id:"payments",meta:{component:e=>{const{wooPaymentsRecentlyActivated:t,isWooPaymentsActive:o}=le(),{steps:s,currentStep:a,justCompletedStepId:r,isLoading:i}=(0,ae.w)(),[l,m]=(0,n.useState)(void 0);(0,n.useEffect)(()=>{let e=!0;return(async()=>{try{const t=await(async()=>{try{const e=await te();return Array.isArray(e?.fullLysTaskList)?e.fullLysTaskList.find(e=>"payments"===e.id):void console.error("Invalid tasklist data: fullLysTaskList is not an array")}catch(e){return void console.error("Error fetching payments task:",e)}})();e&&m(t)}catch(e){console.error("PaymentsSidebar: Failed to fetch payments task:",e)}})(),()=>{e=!1}},[o,t]);const d=s.findIndex(e=>e.id===a?.id),u=e=>e.id===r||"completed"===e.status||d===s.length,h=s.sort((e,t)=>{const o=u(e);return o===u(t)?0:o?-1:1}),p=(0,W.jsx)(C.Button,{onClick:()=>{(0,g.recordEvent)("launch_your_store_payments_back_to_hub_click"),(0,q.W7)("woopayments_onboarding_modal_closed",{from:"lys_sidebar_back_to_hub",source:X.K7}),window.sessionStorage.setItem("lysWaiting","no"),e.sendEventToSidebar({type:"RETURN_FROM_PAYMENTS"})},children:(0,x.sprintf)((0,x.__)("Set up %s","woocommerce"),"WooPayments")}),_=({isStepComplete:e})=>(0,W.jsx)(A,{className:(0,c.A)("install-woopayments",{active:e,"payment-step":!0,"payment-step--active":e,"payment-step--disabled":e,"is-complete":e}),icon:e?V:G.activePaymentStep,disabled:!0,showChevron:!1,children:l?.additionalData?.wooPaymentsIsInstalled?(0,x.sprintf)((0,x.__)("Enable %s","woocommerce"),"WooPayments"):(0,x.sprintf)((0,x.__)("Install %s","woocommerce"),"WooPayments")},"install-woopayments");return(0,W.jsxs)("div",{className:(0,c.A)("launch-store-sidebar__container",e.className),children:[(0,W.jsx)(C.__unstableMotion.div,{className:"woocommerce-edit-site-layout__header-container",animate:"view",children:(0,W.jsx)(K.b,{variants:{view:{x:0}},isTransparent:!1,className:"woocommerce-edit-site-layout__hub"})}),(0,W.jsx)(O,{title:p,onMobileClose:e.onMobileClose,children:(0,W.jsxs)(C.__experimentalItemGroup,{className:"woocommerce-edit-site-sidebar-navigation-screen-essential-tasks__group",children:[!o&&(0,W.jsx)(C.__unstableMotion.div,{initial:{opacity:0,y:0},animate:{opacity:1,y:0},transition:{duration:.7,delay:.2},children:(0,W.jsx)(_,{isStepComplete:!1})}),o&&i&&(0,W.jsx)(C.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:(0,W.jsx)(re,{rows:3})}),o&&!i&&(0,W.jsxs)(C.__unstableMotion.div,{initial:{opacity:0,y:0},animate:{opacity:1,y:0},transition:{duration:.7,delay:.2},children:[(0,W.jsx)(_,{isStepComplete:!0}),h.map(e=>(0,W.jsx)(A,{className:(0,c.A)(e.id,{active:a?.id===e.id,"payment-step":!0,"payment-step--active":a?.id===e.id,"payment-step--disabled":a?.id!==e.id,"is-complete":u(e)}),icon:u(e)?V:G.activePaymentStep,disabled:!0,showChevron:!1,children:e.label},e.id))]})]})})]})},mobileHeader:e=>{const{wooPaymentsRecentlyActivated:t}=le(),{steps:o,currentStep:s}=(0,ae.w)();let n=o.findIndex(e=>e.id===s?.id)+1||1,a=o.length||1;return t&&(n++,a++),(0,W.jsxs)("div",{className:"mobile-header payments-mobile-header",children:[(0,W.jsx)(C.Button,{className:"mobile-header__back-button",onClick:()=>{(0,g.recordEvent)("launch_your_store_payments_back_to_hub_click"),(0,q.W7)("woopayments_onboarding_modal_closed",{from:"lys_mobile_header_back_to_hub",source:X.K7}),window.sessionStorage.setItem("lysWaiting","no"),e.sendEventToSidebar({type:"RETURN_FROM_PAYMENTS"})},icon:N.A,iconSize:20,"aria-label":(0,x.__)("Go back","woocommerce")}),(0,W.jsx)("h1",{className:"mobile-header__title",children:(0,x.sprintf)((0,x.__)("Set up %s","woocommerce"),"WooPayments")}),(0,W.jsx)("div",{className:"mobile-header__steps",children:(0,x.sprintf)((0,x.__)("Step %1$s of %2$s","woocommerce"),n,a)})]})}},entry:["showPaymentsContent",{type:"updateQueryParams",params:{sidebar:"hub",content:"payments"}}],on:{POP_BROWSER_STACK:{actions:[{type:"navigateToWcAdmin"}]},RETURN_FROM_PAYMENTS:{target:"#launchYourStoreHub",actions:[{type:"updateQueryParams",params:{sidebar:"hub",content:"site-preview"}},(0,h.s)(({context:e})=>e.mainContentMachineRef,{type:"RETURN_FROM_PAYMENTS"}),"triggerTasklistRefresh"]}}}},on:{EXTERNAL_URL_UPDATE:{target:".navigate"},TASK_CLICKED:{actions:"taskClicked"},OPEN_WC_ADMIN_URL:{actions:"openWcAdminUrl"},OPEN_WC_ADMIN_URL_IN_CONTENT_AREA:{},SHOW_PAYMENTS:{target:".payments"}}}),fe=({children:e,className:t})=>(0,W.jsx)("div",{className:(0,c.A)("launch-your-store-layout__sidebar",t),children:e});var Ce=o(98846);const ke=()=>(0,W.jsx)("div",{className:"spinner-container",children:(0,W.jsx)(Ce.Spinner,{})});var Ee=o(29491),Pe=o(90212);const je={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},Ae=320,Te=9/19.5,Ne={width:"100%",height:"100%"};function Le(e,t){const o=1-Math.max(0,Math.min(1,(e-Ae)/980));var s;return e/((s=t)+(Te-s)*o)}const Re=(0,b.createContext)(!1),Me=function e({isFullWidth:t,isOversized:o,setIsOversized:s,isReady:n,children:a,defaultSize:r,innerContentStyle:i,isHandleVisibleByDefault:l=!1}){const[m,d]=(0,b.useState)(Ne),[u,h]=(0,b.useState)(),[p,_]=(0,b.useState)(!1),[y,g]=(0,b.useState)(!1),[w,v]=(0,b.useState)(1),S={type:"tween",duration:p?0:.5},[f,k]=(0,b.useState)(!1),E=(0,b.useRef)(null),P=(0,Ee.useInstanceId)(e,"woocommerce-edit-site-resizable-frame-handle-help"),j=r.width/r.height,A={default:{flexGrow:0,height:m.height},fullWidth:{flexGrow:1,height:m.height}},T=p||l?"active":y?"visible":"hidden",N=(0,W.jsx)(C.__unstableMotion.button,{role:"separator","aria-orientation":"vertical",className:(0,c.A)("woocommerce-edit-site-resizable-frame__handle",{"is-resizing":p}),variants:{hidden:{opacity:0,left:0},visible:{opacity:.6,left:-10},active:{opacity:1,left:-10}},animate:T,"aria-label":(0,x.__)("Drag to resize","woocommerce"),"aria-describedby":P,"aria-valuenow":E.current?.resizable?.offsetWidth||void 0,"aria-valuemin":Ae,"aria-valuemax":r.width,onKeyDown:e=>{if(!["ArrowLeft","ArrowRight"].includes(e.key))return;e.preventDefault();const t=20*(e.shiftKey?5:1)*("ArrowLeft"===e.key?1:-1),o=Math.min(Math.max(Ae,E.current.resizable.offsetWidth+t),r.width);d({width:o,height:Le(o,j)})},initial:"hidden",exit:"hidden",whileFocus:"active",whileHover:"active",children:l&&!f&&(0,W.jsx)(C.Popover,{className:"woocommerce-assembler-hub__resizable-frame__drag-handler",position:"middle right",children:(0,x.__)("Drag to resize","woocommerce")})},"handle");return(0,W.jsx)(C.ResizableBox,{as:C.__unstableMotion.div,ref:E,initial:!1,variants:A,animate:t?"fullWidth":"default",onAnimationComplete:e=>{"fullWidth"===e&&d({width:"100%",height:"100%"})},transition:S,size:m,enable:{top:!1,right:!1,bottom:!1,left:n,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},resizeRatio:w,handleClasses:void 0,handleStyles:{left:je,right:je},minWidth:Ae,maxWidth:"100%",maxHeight:"100%",onFocus:()=>g(!0),onBlur:()=>g(!1),onMouseOver:()=>g(!0),onMouseOut:()=>g(!1),handleComponent:{left:(0,W.jsxs)(W.Fragment,{children:[l?(0,W.jsx)("div",{children:N}):(0,W.jsx)(C.Tooltip,{position:"middle right",text:(0,x.__)("Drag to resize","woocommerce"),children:N}),(0,W.jsx)("div",{hidden:!0,id:P,children:(0,x.__)("Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.","woocommerce")})]})},onResizeStart:(e,t,o)=>{h(o.offsetWidth),_(!0)},onResize:(e,t,n,a)=>{const i=a.width/w,c=Math.abs(i),l=a.width<0?c:(r.width-u)/2,m=Math.min(c,l),h=0===c?0:m/c;v(1-h+2*h);const p=u+a.width;s(p>r.width),d({height:o?"100%":Le(p,j)})},onResizeStop:(e,t,n)=>{_(!1),f||k(!0),o&&(s(!1),d(Ne))},className:(0,c.A)("woocommerce-edit-site-resizable-frame__inner",{"is-resizing":p}),children:(0,W.jsx)(C.__unstableMotion.div,{className:"customize-your-store-edit-site-resizable-frame__inner-content",animate:{borderRadius:t?0:8},transition:S,style:i,children:(0,W.jsx)(Re.Provider,{value:p,children:a})})})};var We=o(89196),Oe=o(92123);const He=({installWooPayments:e,isPluginInstalling:t,isPluginInstalled:o})=>{(0,b.useEffect)(()=>{(0,q.W7)("woopayments_onboarding_modal_step_view",{step:"install_woopayments",from:"lys",source:X.K7})},[]);const s=(0,r.useSelect)(e=>e(i.paymentSettingsStore).getIsWooPayEligible(),[]),n=(0,r.useSelect)(e=>e(i.paymentSettingsStore).getPaymentProviders().find(e=>(0,q.j4)(e.id)),[]),a=window.wcSettings?.admin?.woocommerce_payments_nox_profile?.business_country_code||null;let c=(0,x.__)("Install","woocommerce");return o&&!t&&(c=(0,x.__)("Enable","woocommerce")),o&&t&&(c=(0,x.__)("Enabling","woocommerce")),!o&&t&&(c=(0,x.__)("Installing","woocommerce")),(0,W.jsxs)("div",{className:"launch-your-store-payments-content__step--install-woopayments",children:[(0,W.jsx)("div",{className:"launch-your-store-payments-content__step--install-woopayments-logo",children:(0,W.jsx)("img",{src:`${Pe.GZ}images/woo-logo.svg`,alt:"",role:"presentation"})}),(0,W.jsx)("h1",{className:"launch-your-store-payments-content__step--install-woopayments-title",children:(0,x.__)("Accept payments with Woo","woocommerce")}),(0,W.jsx)("p",{className:"launch-your-store-payments-content__step--install-woopayments-description",children:(0,x.__)("Set up payments for your store in just a few steps. With WooPayments, you can accept online and in-person payments, track revenue, and handle all payment activity from one place.","woocommerce")}),(0,W.jsx)("div",{className:"launch-your-store-payments-content__step--install-woopayments-logos",children:(0,W.jsx)($.WooPaymentsMethodsLogos,{maxElements:10,isWooPayEligible:s})}),(0,W.jsx)(C.Button,{className:"launch-your-store-payments-content__step--install-woopayments-button",onClick:()=>{n?.onboarding?._links?.preload?.href&&v()({url:n?.onboarding?._links?.preload?.href,method:"POST",data:{location:a}});const t=(e=>{if("string"!=typeof e)return;const t=e.trim();return 0!==t.length?/^[a-z0-9_-]+$/.test(t)?t:void console.warn(`[WooCommerce Payments] Invalid plugin slug format: "${t}". Using default slug.`):void 0})(n?.plugin?.slug);e(t)},isBusy:t,disabled:t,variant:"primary",children:c})]})};var Ie=o(87889);const ze={congratsScreen:({context:e})=>(v()({path:"/wc-admin/launch-your-store/update-survey-status",data:{status:"yes"},method:"POST"}).catch(()=>{}),{...e.congratsScreen,hasCompleteSurvey:!0})},De=({activePlugins:e,allTasklists:t})=>{const o=(0,b.useMemo)(()=>(({activePlugins:e,allTasklists:t})=>{const o=[],s=(e,t)=>{o.length<3&&t&&o.push(e)},n=t.find(({id:e})=>"setup"===e)?.tasks?.reduce((e,{id:t,isComplete:o})=>(e[t]=o||!1,e),{}),a=t.find(({id:e})=>"extended"===e)?.tasks?.reduce((e,{id:t,isComplete:o})=>(e[t]=o||!1,e),{}),r=a?.marketing||!1,i=n?.payments||!1,c=a?.["get-mobile-app"]||!1,l=e.includes("mailchimp-for-woocommerce"),m={title:(0,x.__)("Promote your products","woocommerce"),description:(0,x.__)("Grow your customer base by promoting your products to millions of engaged shoppers.","woocommerce"),link:`${Pe.kY}admin.php?page=wc-admin&task=marketing`,linkText:(0,x.__)("Promote products","woocommerce"),trackEvent:"launch_you_store_congrats_marketing_click"},d={title:(0,x.__)("Provide more ways to pay","woocommerce"),description:(0,x.__)("Give your shoppers more ways to pay by adding additional payment methods to your store.","woocommerce"),link:`${Pe.kY}admin.php?page=wc-settings&tab=checkout`,linkText:(0,x.__)("Add payment methods","woocommerce"),trackEvent:"launch_you_store_congrats_payments_click"},u={title:(0,x.__)("Build customer relationships","woocommerce"),description:(0,x.__)("Keep your shoppers up to date with what’s new in your store and set up clever post-purchase automations.","woocommerce"),link:l?`${Pe.kY}admin.php?page=mailchimp-woocommerce`:"https://woo.com/products/mailchimp-for-woocommerce/?utm_source=launch_your_store&utm_medium=product",linkText:l?(0,x.__)("Manage Mailchimp","woocommerce"):(0,x.__)("Install Mailchimp","woocommerce"),trackEvent:"launch_you_store_congrats_mailchimp_click"},h={title:(0,x.__)("Power up your store","woocommerce"),description:(0,x.__)("Add extra features and functionality to your store with Woo extensions.","woocommerce"),link:`${Pe.kY}admin.php?page=wc-admin&path=%2Fextensions`,linkText:(0,x.__)("Add extensions","woocommerce"),trackEvent:"launch_you_store_congrats_extensions_click"},p={title:(0,x.__)("Manage your store on the go","woocommerce"),description:(0,x.__)("Manage your store anywhere with the free WooCommerce Mobile App.","woocommerce"),link:`${Pe.kY}admin.php?page=wc-admin&mobileAppModal=true`,linkText:(0,x.__)("Get the app","woocommerce"),trackEvent:"launch_you_store_congrats_mobile_app_click"},_={title:(0,x.__)("Help is on hand","woocommerce"),description:(0,x.__)("Detailed guides and our support team are always available if you’re feeling stuck or need some guidance.","woocommerce"),link:"https://woo.com/documentation/woocommerce/?utm_source=launch_your_store&utm_medium=product",linkText:(0,x.__)("Explore support resources","woocommerce"),trackEvent:"launch_you_store_congrats_external_documentation_click"};return s(m,!r),s(d,!i),s(h,!0),s(p,!c),s(u,!l),s(_,!0),s(d,!0),s(h,!0),s(_,!0),o})({activePlugins:e,allTasklists:t}),[e,t]);return(0,W.jsx)("div",{className:"woocommerce-launch-store__congrats-main-actions",children:o.map((e,t)=>(0,W.jsx)("div",{className:"woocommerce-launch-store__congrats-action",children:(0,W.jsxs)("div",{className:"woocommerce-launch-store__congrats-action__content",children:[(0,W.jsx)("h3",{children:e.title}),(0,W.jsx)("p",{children:e.description}),(0,W.jsx)(C.Button,{variant:"link",href:e.link,target:-1===e.link.indexOf(Pe.kY)?"_blank":"_self",onClick:()=>{(0,g.recordEvent)(e.trackEvent)},children:e.linkText})]})},t))})};var Be=o(66087),Ue=o(54431),Fe=o(27752),Ye=o(43930);const Ve=({hasCompleteSurvey:e,onSubmit:t})=>{const[o,s]=(0,b.useState)(null),[n,a]=(0,b.useState)(""),[r,i]=(0,b.useState)(!1),[c,l]=(0,b.useState)(!e),m=(0,Be.isInteger)(o);return(0,W.jsxs)(W.Fragment,{children:[c&&(0,W.jsx)("hr",{className:"separator"}),c&&(0,W.jsxs)("div",{className:"woocommerce-launch-store__congrats-survey",children:[r?(0,W.jsxs)("div",{className:"woocommerce-launch-store__congrats-thanks",children:[(0,W.jsxs)("p",{className:"thanks-copy",children:["🙌"," ",(0,x.__)("We appreciate your feedback!","woocommerce")]}),(0,W.jsx)(C.Button,{className:"close-button",label:(0,x.__)("Close","woocommerce"),icon:(0,W.jsx)(C.Icon,{icon:Ue.A,viewBox:"6 4 12 14"}),iconSize:14,onClick:()=>{i(!1),l(!1)}})]}):(0,W.jsxs)("div",{className:"woocommerce-launch-store__congrats-section_1",children:[(0,W.jsx)("div",{className:"woocommerce-launch-store__congrats-survey__selection",children:(0,W.jsx)(Fe.CustomerFeedbackSimple,{label:(0,x.__)("How was the experience of launching your store?","woocommerce"),onSelect:s,selectedValue:o})}),m&&(0,W.jsxs)("div",{className:"woocommerce-launch-store__congrats-survey__comment",children:[(0,W.jsx)("label",{className:"comment-label",htmlFor:"launch-your-store-comment",children:(0,b.createInterpolateElement)((0,x.__)("Why do you feel that way? (optional)","woocommerce"),{smallText:(0,W.jsx)("span",{className:"small-text"})})}),(0,W.jsx)(C.TextareaControl,{__nextHasNoMarginBottom:!0,id:"launch-your-store-comment","data-testid":"launch-your-store-comment",value:n,onChange:e=>{a(e)}}),(0,W.jsx)("span",{className:"privacy-text",children:(0,b.createInterpolateElement)((0,x.__)("Your feedback will be only be shared with WooCommerce and treated in accordance with our privacy policy.","woocommerce"),{privacyLink:(0,W.jsx)(Ce.Link,{href:"https://automattic.com/privacy/",type:"external",target:"_blank",children:(0,W.jsx)(W.Fragment,{})})})})]})]}),m&&!r&&(0,W.jsx)("div",{className:"woocommerce-launch-store__congrats-section_2",children:(0,W.jsxs)("div",{className:"woocommerce-launch-store__congrats-buttons",children:[(0,W.jsx)(C.Button,{className:"",variant:"tertiary",onClick:()=>{s(null)},children:(0,x.__)("Cancel","woocommerce")}),(0,W.jsx)(C.Button,{className:"",variant:"primary",onClick:()=>{(0,g.recordEvent)((0,Ye.E)()?"launch_your_store_congrats_survey_click":"launch_your_store_on_core_congrats_survey_click"),t({action:"lys_experience",score:o,comments:n}),i(!0)},children:(0,x.__)("Send","woocommerce")})]})})]})]})},Ge=(0,d.SP)(({sendBack:e})=>pe("content",e)),Ke=(0,u.mj)({types:{},actions:{updateQueryParams:(e,t)=>{_e(t)},cleanupPaymentsUrl:()=>{const e=new URL(window.location.href);e.searchParams.delete("content"),e.searchParams.get("path")?.includes("woopayments")&&e.searchParams.set("path","/launch-your-store"),window.history.replaceState(null,"",e.toString())},assignSiteCachedStatus:(0,p.a)({siteIsShowingCachedContent:!0}),recordSurveyResults:({event:e})=>{(0,u.DT)(e,"COMPLETE_SURVEY"),(0,g.recordEvent)("launch_your_store_congrats_survey_complete",{action:e.payload.action,score:e.payload.score,comments:e.payload.comments})},recordBackToHomeClick:()=>{(0,g.recordEvent)("launch_your_store_congrats_back_to_home_click")},recordPreviewStoreClick:()=>{(0,g.recordEvent)("launch_your_store_congrats_preview_store_click")},navigateToPreview:()=>{const e=(0,Q.getSetting)("homeUrl","");window.open(e,"_blank")},navigateToHome:()=>{const{invalidateResolutionForStoreSelector:e}=(0,r.dispatch)(i.onboardingStore);e("getTaskLists"),(0,y.navigateTo)({url:"/"})}},guards:{hasContentLocation:(e,{content:t})=>{const{content:o}=(0,y.getQuery)();return!!o&&o===t},hasWooPaymentsOnboardingPath:()=>{const e=(0,y.getQuery)();return!!e.path&&e.path.includes("/woopayments/onboarding")}},actors:{contentQueryParamListener:Ge,fetchCongratsData:we,getSiteCachedStatus:(0,d.Sx)(xe)}}).createMachine({id:"mainContent",initial:"navigate",context:{congratsScreen:{hasLoadedCongratsData:!1,hasCompleteSurvey:!1,allTasklists:[],activePlugins:[]},siteIsShowingCachedContent:void 0},invoke:{id:"contentQueryParamListener",src:"contentQueryParamListener"},states:{navigate:{always:[{guard:{type:"hasWooPaymentsOnboardingPath"},target:"payments"},{guard:{type:"hasContentLocation",params:{content:"site-preview"}}},{guard:{type:"hasContentLocation",params:{content:"launch-store-success"}},target:"launchStoreSuccess"},{guard:{type:"hasContentLocation",params:{content:"payments"}},target:"payments"},{target:"#sitePreview"}]},sitePreview:{id:"sitePreview",meta:{component:e=>{const t=(0,Pe.Qk)("siteUrl")+"?site-preview=1",[o,s]=(0,b.useState)(!0),n=(0,b.useRef)(null),[a,r]=(0,Ee.useResizeObserver)(),[i,l]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{const e=n.current?.contentWindow,t=()=>{s(!0)};return e&&e.addEventListener("beforeunload",t),()=>{e&&e.removeEventListener("beforeunload",t)}},[n,s,o]),(0,W.jsxs)("div",{className:(0,c.A)("launch-store-site-preview-page__container",{"is-loading":o},e.className),children:[a,!!r.width&&(0,W.jsx)(C.__unstableMotion.div,{initial:!1,layout:"position",className:"launch-store-preview-layout__canvas",children:(0,W.jsxs)(Me,{isReady:!o,isHandleVisibleByDefault:!1,isFullWidth:!1,defaultSize:{width:r.width-24,height:r.height},isOversized:i,setIsOversized:l,innerContentStyle:{},children:[o&&(0,W.jsx)("div",{className:"launch-store-site-preview-site__loading-overlay",children:(0,W.jsx)(Ce.Spinner,{})}),(0,W.jsx)("iframe",{ref:n,className:"launch-store-site__preview-site-iframe",src:t,title:(0,x.__)("Preview","woocommerce"),onLoad:()=>s(!1)})]})})]})}}},payments:{id:"payments",meta:{component:({})=>{const{isWooPaymentsActive:e,isWooPaymentsInstalled:t,setWooPaymentsRecentlyActivated:o}=le(),{refreshStoreData:s}=(0,ae.w)(),[a,c]=(0,b.useState)(!1),{installAndActivatePlugins:l}=(0,r.useDispatch)(i.pluginsStore),m=(0,b.useRef)(!0);(0,b.useEffect)(()=>()=>{m.current=!1},[]);const d=(0,n.useCallback)(e=>{c(!0),(0,q.TH)("recommendations_setup",{extension_selected:X.bw,extension_action:t?"activate":"install",provider_id:X.$8,suggestion_id:X.eD,provider_extension_slug:X.bw,from:"lys",source:X.K7}),l([e??X.bw]).then(async e=>{m.current&&((0,Oe.R)(e),o(!0),s(),t||(0,q.TH)("provider_installed",{provider_id:X.$8,suggestion_id:X.eD,provider_extension_slug:X.bw,from:"lys",source:X.K7}),c(!1))}).catch(e=>{if(!m.current)return;let o="provider_extension_installation_failed";t&&(o="provider_extension_activation_failed"),(0,q.TH)(o,{provider_id:X.$8,suggestion_id:X.eD,provider_extension_slug:X.bw,from:"lys",source:X.K7,reason:"error"}),(0,Oe.R)(e),c(!1)})},[t,l,o,s]);return(0,W.jsx)("div",{className:"launch-your-store-payments-content",children:(0,W.jsx)("div",{className:"launch-your-store-payments-content__canvas",children:e?(0,W.jsx)(We.A,{includeSidebar:!1}):(0,W.jsx)(He,{installWooPayments:d,isPluginInstalled:t,isPluginInstalling:a})})})}},entry:[{type:"updateQueryParams",params:{content:"payments"}}],on:{EXTERNAL_URL_UPDATE:{target:"navigate"}}},launchStoreSuccess:{id:"launchStoreSuccess",initial:"loading",states:{loading:{invoke:[{src:"fetchCongratsData",onDone:{actions:(0,p.a)({congratsScreen:({context:e,event:t})=>({...e.congratsScreen,hasLoadedCongratsData:!0,hasCompleteSurvey:"yes"===t.output.surveyCompleted,allTasklists:t.output.tasklists,activePlugins:t.output.activePlugins})})}},{src:"getSiteCachedStatus",onDone:{actions:(0,p.a)({siteIsShowingCachedContent:({event:e})=>e.output})},onError:{actions:(0,p.a)({siteIsShowingCachedContent:!1})}}],always:{guard:({context:e})=>e.congratsScreen.hasLoadedCongratsData&&void 0!==e.siteIsShowingCachedContent,target:"congrats"},meta:{component:ke}},congrats:{entry:[{type:"updateQueryParams",params:{content:"launch-store-success"}}],meta:{component:({context:{congratsScreen:{activePlugins:e,allTasklists:t,hasCompleteSurvey:o},siteIsShowingCachedContent:s},sendEventToMainContent:n,className:a})=>{const r=(0,x.__)("Copy link","woocommerce"),i=(0,x.__)("Copied!","woocommerce"),m=(0,Q.getSetting)("homeUrl",""),d=new URL(m);let u=d?.hostname;d?.port&&(u+=":"+d.port);const[h,p]=(0,b.useState)(r),_=(0,Ee.useCopyToClipboard)(m,()=>{p(i),setTimeout(()=>{p(r)},2e3)});return(0,l.xG)(["woocommerce-launch-your-store-success"]),(0,W.jsx)("div",{className:(0,c.A)("launch-store-success-page__container",a),children:(0,W.jsxs)("div",{className:"woocommerce-launch-store__congrats",children:[(0,W.jsx)(Ce.ConfettiAnimation,{delay:1e3,colors:["#DFD1FB","#FB79D9","#FFA60E","#03D479","#AD86E9","#7F54B3","#3C2861"]}),(0,W.jsxs)("div",{className:"woocommerce-launch-store__congrats-header-container",children:[(0,W.jsx)("span",{className:"woologo",children:(0,W.jsx)(Ie.A,{})}),(0,W.jsxs)(C.Button,{onClick:()=>{n({type:"BACK_TO_HOME"})},className:"back-to-home-button",variant:"link",children:[(0,W.jsx)(C.Dashicon,{icon:"arrow-left-alt2"}),(0,W.jsx)("span",{children:(0,x.__)("Back to Home","woocommerce")})]})]}),(0,W.jsxs)("div",{className:"woocommerce-launch-store__congrats-content",children:[(0,W.jsx)("h1",{className:"woocommerce-launch-store__congrats-heading",children:s?(0,x.__)("Congratulations! Your store will launch soon","woocommerce"):(0,x.__)("Congratulations! Your store is now live","woocommerce")}),(0,W.jsx)("h2",{className:"woocommerce-launch-store__congrats-subheading",children:s?(0,b.createInterpolateElement)((0,x.__)("It’ll be ready to view as soon as your have updated. Please wait, or contact your web host to find out how to do this manually.","woocommerce"),{link:(0,W.jsx)("a",{href:"https://woocommerce.com/document/configuring-woocommerce-settings/coming-soon-mode/#server-caches",target:"_blank",rel:"noreferrer",children:(0,x.__)("server caches","woocommerce")})}):(0,x.__)("You’ve successfully launched your store and are ready to start selling! We can’t wait to see your business grow.","woocommerce")}),(0,W.jsxs)("div",{className:"woocommerce-launch-store__congrats-midsection-container",children:[(0,W.jsxs)("div",{className:"woocommerce-launch-store__congrats-visit-store",children:[(0,W.jsx)("p",{className:"store-name",children:u}),(0,W.jsxs)("div",{className:"buttons-container",children:[(0,W.jsx)(C.Button,{className:"",variant:"secondary",ref:_,onClick:()=>{(0,g.recordEvent)("launch_your_store_congrats_copy_store_link_click")},children:h}),(0,W.jsx)(C.Button,{className:"",variant:"primary",onClick:()=>{n({type:"PREVIEW_STORE"})},children:(0,x.__)("Visit your store","woocommerce")})]})]}),(0,W.jsx)(Ve,{hasCompleteSurvey:o,onSubmit:e=>{n({type:"COMPLETE_SURVEY",payload:e})}})]}),(0,W.jsx)("h2",{className:"woocommerce-launch-store__congrats-main-actions-title",children:(0,x.__)("What’s next?","woocommerce")}),(0,W.jsx)(De,{activePlugins:e,allTasklists:t})]})]})})}}}},on:{COMPLETE_SURVEY:{actions:[(0,p.a)(ze),"recordSurveyResults"]},PREVIEW_STORE:{actions:["recordPreviewStoreClick","navigateToPreview"]},BACK_TO_HOME:{actions:["recordBackToHomeClick","navigateToHome"]}}},loading:{id:"loading",meta:{component:ke}}},on:{EXTERNAL_URL_UPDATE:{target:".navigate"},SHOW_LAUNCH_STORE_SUCCESS:{target:"#launchStoreSuccess"},SHOW_LAUNCH_STORE_PENDING_CACHE:{actions:["assignSiteCachedStatus"],target:"#launchStoreSuccess"},SHOW_LOADING:{target:"#loading"},SHOW_PAYMENTS:{target:"#payments"},POP_BROWSER_STACK:{actions:(0,p.a)({siteIsShowingCachedContent:void 0}),target:"#sitePreview"},RETURN_FROM_PAYMENTS:{actions:[(0,p.a)({siteIsShowingCachedContent:void 0}),"cleanupPaymentsUrl"],target:"#sitePreview"}}}),Ze=({children:e})=>(0,W.jsx)("div",{className:"launch-your-store-layout__content",children:e});var $e=o(94156);const Qe=()=>{(0,l.xG)(["woocommerce-launch-your-store"]),(0,n.useEffect)(()=>{window.sessionStorage.setItem("lysWaiting","no")},[]);const{xstateV5Inspector:e}=(0,$e.D)("V5"),{invalidateResolutionForStoreSelector:t}=(0,r.useDispatch)(i.onboardingStore),[o,a]=(0,n.useState)(!1),[d,u,h]=(0,s.zl)(Ke,{inspect:e}),[p,_,y]=(0,s.zl)(Se,{inspect:e,input:{mainContentMachineRef:h}}),g=!p.hasTag("fullscreen");(0,n.useEffect)(()=>{a(!1)},[p.value]);const[w]=(0,m.$)(y),[v]=function(e){const t=(0,s.d4)(e,e=>{const t=e.getMeta(),o=Object.values(t).find(e=>e?.mobileHeader);return o?.mobileHeader??null}),[o,a]=(0,n.useState)(null);return(0,n.useEffect)(()=>{a(t?()=>t:null)},[t]),[o||null]}(y),[b]=(0,m.$)(h),x=()=>{a(!1)};return(0,W.jsx)("div",{className:"launch-your-store-layout__container",children:(0,W.jsxs)(me,{closeModal:()=>{(0,q.W7)("woopayments_onboarding_modal_closed",{from:"lys_modal_close_button",source:X.K7}),window.sessionStorage.setItem("lysWaiting","no"),t("getTaskLists"),t("getTaskListsByIds"),_({type:"RETURN_FROM_PAYMENTS"})},children:[(0,W.jsx)(fe,{className:(0,c.A)({"is-sidebar-hidden":!g,"is-mobile-open":o}),children:w&&(0,W.jsx)(w,{sendEventToSidebar:_,sendEventToMainContent:u,context:p.context,onMobileClose:x})}),(0,W.jsxs)(Ze,{children:[v&&(0,W.jsx)(v,{sendEventToSidebar:_,sendEventToMainContent:u,context:p.context,onMobileClose:x,onToggle:()=>{a(!o)},isMobileSidebarOpen:o}),b&&(0,W.jsx)(b,{sendEventToSidebar:_,sendEventToMainContent:u,context:d.context},d.value.toString())]})]})})}},11888:(e,t,o)=>{"use strict";o.d(t,{Mk:()=>h});var s=o(27723),n=o(56427),a=o(86087),r=o(47143),i=o(40314),c=o(1455),l=o.n(c),m=o(39826),d=o(86486),u=o(39793);const h=({isOpen:e,onClose:t,hasAccount:o,isTestMode:c,isEmbeddedResetFlow:h=!1,resetUrl:p})=>{const[_,y]=(0,a.useState)(!1),{invalidateResolutionForStoreSelector:g}=(0,r.useDispatch)(i.paymentSettingsStore),{invalidateResolutionForStoreSelector:w}=(0,r.useDispatch)(i.woopaymentsOnboardingStore),{createNotice:v}=(0,r.useDispatch)("core/notices");let b,x,S;return o?(b=c?(0,s.__)("Reset your test account","woocommerce"):(0,s.__)("Reset your account","woocommerce"),x=c?(0,s.sprintf)((0,s.__)("When you reset your test account, all payment data — including your %s account details, test transactions, and payouts history — will be lost. Your order history will remain. This action cannot be undone, but you can create a new test account at any time.","woocommerce"),"WooPayments"):(0,s.sprintf)((0,s.__)("When you reset your account, all payment data — including your %s account details, test transactions, and payouts history — will be lost. Your order history will remain. This action cannot be undone, but you can create a new test account at any time.","woocommerce"),"WooPayments"),h&&(x=(0,s.sprintf)((0,s.__)("You need to reset your test account to continue onboarding with %1$s. This will create a new test account and reset any existing %2$s account details and test transactions.","woocommerce"),"WooPayments","WooPayments")),S=c?(0,s.__)("Yes, reset test account","woocommerce"):(0,s.__)("Yes, reset account","woocommerce")):(b=(0,s.__)("Reset onboarding","woocommerce"),x=(0,s.sprintf)((0,s.__)("When you reset the %s onboarding your progress and the provided data will be lost. This action cannot be undone, but you can restart the onboarding any time.","woocommerce"),"WooPayments"),S=(0,s.__)("Yes, reset onboarding","woocommerce")),(0,u.jsx)(u.Fragment,{children:e&&(0,u.jsxs)(n.Modal,{title:b,className:"woocommerce-woopayments-modal",isDismissible:!0,onRequestClose:t,children:[(0,u.jsxs)("div",{className:"woocommerce-woopayments-modal__content",children:[(0,u.jsx)("div",{className:"woocommerce-woopayments-modal__content__item",children:(0,u.jsx)("div",{children:(0,u.jsx)("span",{children:x})})}),(0,u.jsx)("div",{className:"woocommerce-woopayments-modal__content__item",children:(0,u.jsx)("h3",{children:(0,s.__)("Are you sure you'd like to continue?","woocommerce")})})]}),(0,u.jsx)("div",{className:"woocommerce-woopayments-modal__actions",children:(0,u.jsx)(n.Button,{className:h?"":"danger",variant:h?"primary":"secondary",isBusy:_,disabled:_,onClick:()=>{(0,m.TH)("provider_reset_onboarding_confirmation_click",{provider_id:d.$8,suggestion_id:d.eD,provider_extension_slug:d.bw}),(()=>{if(y(!0),!p)return(0,m.TH)("provider_reset_onboarding_failed",{provider_id:d.$8,suggestion_id:d.eD,provider_extension_slug:d.bw,reason:"missing_reset_url"}),v("error",(0,s.__)("Failed to reset: missing reset URL. Please refresh and try again.","woocommerce"),{isDismissible:!0}),void y(!1);l()({url:p,method:"POST"}).then(()=>{(0,m.TH)("provider_reset_onboarding_success",{provider_id:d.$8,suggestion_id:d.eD,provider_extension_slug:d.bw}),g("getPaymentProviders"),w("getOnboardingData")}).catch(()=>{(0,m.TH)("provider_reset_onboarding_failed",{provider_id:d.$8,suggestion_id:d.eD,provider_extension_slug:d.bw,reason:"error"}),v("error",o?(0,s.sprintf)((0,s.__)("Failed to reset your %s account.","woocommerce"),"WooPayments"):(0,s.sprintf)((0,s.__)("Failed to reset your %s onboarding.","woocommerce"),"WooPayments"),{isDismissible:!0})}).finally(()=>{y(!1),t()})})()},children:S})})]})})};o(98846),o(15703),o(90212)},86486:(e,t,o)=>{"use strict";o.d(t,{$8:()=>n,Fx:()=>i,K7:()=>c,Lw:()=>r,bw:()=>s,eD:()=>a});const s="woocommerce-payments",n="woocommerce_payments",a="woopayments",r="_wc_pes_woopayments",i="settings_payments",c="lys"},57309:(e,t,o)=>{"use strict";o.d(t,{CX:()=>d,PK:()=>h,kE:()=>u}),o(51609);var s=o(27723),n=o(46873),a=o(36295),r=o(90792),i=o(18170),c=o(57003),l=o(65977),m=o(39793);const d="test_account",u="business_verification",h=((0,s.__)("Choose your payment methods","woocommerce"),r.A,(0,s.sprintf)((0,s.__)("Connect with %s","woocommerce"),"WordPress.com"),n.A,(0,s.__)("Activate payments","woocommerce"),(0,s.__)("Test or live account","woocommerce"),c.A,(0,s.__)("Ready to test payments","woocommerce"),i.A,(0,s.__)("Activate payments","woocommerce"),a.A,(0,s.__)("Submit for verification","woocommerce"),l.A,[{id:"payment_methods",order:1,type:"backend",label:(0,s.__)("Choose your payment methods","woocommerce"),content:(0,m.jsx)(r.A,{})},{id:"wpcom_connection",order:2,type:"backend",label:(0,s.sprintf)((0,s.__)("Connect with %s","woocommerce"),"WordPress.com"),content:(0,m.jsx)(n.A,{}),dependencies:["payment_methods"]},{id:u,order:3,type:"backend",label:(0,s.__)("Activate payments","woocommerce"),dependencies:["wpcom_connection"],content:(0,m.jsx)(a.A,{})}])},39826:(e,t,o)=>{"use strict";o.d(t,{LI:()=>c,TH:()=>m,TO:()=>l,W7:()=>d,j4:()=>a,js:()=>i}),o(15703);var s=o(83306),n=(o(96476),o(90212),o(86486));const a=e=>[n.Lw,n.$8,n.eD].includes(e),r=e=>t=>t.find(t=>t.id===e)||null,i=e=>{const t=r("apple_pay")(e),o=r("google_pay")(e);return t&&o?e.map(e=>"apple_pay"===e.id?{...e,id:"apple_google",extraTitle:o.title,extraDescription:o.description,extraIcon:o.icon}:"google_pay"===e.id?null:e).filter(e=>null!==e):e},c=e=>Object.keys(e).reduce((t,o)=>("apple_pay"===o||"google_pay"===o?t.apple_google=e[o]:t[o]=e[o],t),{}),l=(e,t)=>"primary"===e.category||!!e.enabled||(t??!1),m=(e,t={})=>{e.startsWith("settings_payments_")||(e=`settings_payments_${e}`),t.business_country||(t.business_country=window.wcSettings?.admin?.woocommerce_payments_nox_profile?.business_country_code??"unknown"),(0,s.recordEvent)(e,t)},d=(e,t={})=>{e.startsWith("settings_payments_")||(e=`settings_payments_${e}`),t.business_country||(t.business_country=window.wcSettings?.admin?.woocommerce_payments_nox_profile?.business_country_code??"unknown");const o=new URLSearchParams(window.location.search);t.source||(t.source=o.get("source")?.replace(/[^\w-]+/g,"")||"unknown"),(0,s.recordEvent)(e,t)}},43930:(e,t,o)=>{"use strict";o.d(t,{E:()=>s});const s=()=>void 0!==window.wcCalypsoBridge&&window.wcCalypsoBridge.isWooExpress},27678:(e,t,o)=>{"use strict";function s(e,t=new Set){if(!t.has(e)){t.add(e);for(const o in e)if(e.hasOwnProperty(o)){if("component"===o)return e;if("object"==typeof e[o]&&null!==e[o]){const n=s(e[o],t);if(void 0!==n)return n}}}}o.d(t,{Q:()=>s})},7754:(e,t,o)=>{"use strict";o.d(t,{$:()=>r});var s=o(94859),n=o(51609),a=o(27678);function r(e){const t=(0,s.d4)(e,e=>(0,a.Q)(e.getMeta()??void 0)),[o,r]=(0,n.useState)(null);return(0,n.useEffect)(()=>{t?.component&&r(()=>t.component)},[t?.component]),[o||null]}},65993:(e,t)=>{var o;!function(){"use strict";var s={}.hasOwnProperty;function n(){for(var e="",t=0;t