File "launch-store.js"
Full Path: /home/siazco/grocery.siazco.se/wp-content/plugins/woocommerce/assets/client/admin/chunks/launch-store.js
File size: 42.1 KB
MIME-type: text/plain
Charset: utf-8
"use strict";(globalThis.webpackChunk_wcAdmin_webpackJsonp=globalThis.webpackChunk_wcAdmin_webpackJsonp||[]).push([[8219],{17832:(e,t,a)=>{a.d(t,{Z:()=>c});var o=a(69307),n=a(87608),s=a.n(n),r=a(55609);function c(e){return(0,o.createElement)(r.Button,{...e,className:s()("edit-site-sidebar-button",e.className)})}},12394:(e,t,a)=>{a.d(t,{Z:()=>_});var o=a(69307),n=a(87608),s=a.n(n),r=a(55609),c=a(65736);const i=(0,o.forwardRef)((function({icon:e,size:t=24,...a},n){return(0,o.cloneElement)(e,{width:t,height:t,...a,ref:n})}));var l=a(99196),m=a(70444);const u=(0,l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(m.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})),d=(0,l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(m.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 _({className:e,icon:t,withChevron:a=!1,suffix:n,children:l,...m}){return(0,o.createElement)(r.__experimentalItem,{className:s()("edit-site-sidebar-navigation-item",{"with-suffix":!a&&n},e),...m},(0,o.createElement)(r.__experimentalHStack,{justify:"flex-start"},t&&(0,o.createElement)(i,{style:{fill:"currentcolor"},icon:t,size:24}),(0,o.createElement)(r.FlexBlock,null,l),a&&(0,o.createElement)(i,{icon:(0,c.isRTL)()?u:d,className:"edit-site-sidebar-navigation-item__drilldown-indicator",size:24}),!a&&n))}},59713:(e,t,a)=>{a.d(t,{Z:()=>_});var o=a(69307),n=a(87608),s=a.n(n),r=a(9818),c=a(55609),i=a(65736),l=a(99196),m=a(70444);const u=(0,l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,l.createElement)(m.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"}));var d=a(37798);const _=function({className:e}){const{isRequestingSite:t,siteIconUrl:a}=(0,r.useSelect)((e=>{const{getEntityRecord:t}=e(d.store),a=t("root","__unstableBase",void 0);return{isRequestingSite:!a,siteIconUrl:a?.site_icon_url}}),[]);if(t&&!a)return(0,o.createElement)("div",{className:"edit-site-site-icon__image"});const n=a?(0,o.createElement)("img",{className:"edit-site-site-icon__image",alt:(0,i.__)("Site Icon"),src:a}):(0,o.createElement)(c.Icon,{className:"edit-site-site-icon__icon",size:"48px",icon:u});return(0,o.createElement)("div",{className:s()(e,"edit-site-site-icon")},n)}},87983:(e,t,a)=>{a.d(t,{Z:()=>s});var o=a(69307),n=a(70444);const s=(0,o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(n.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"}))},83619:(e,t,a)=>{a.d(t,{Z:()=>s});var o=a(69307),n=a(70444);const s=(0,o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(n.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}))},49704:(e,t,a)=>{a.d(t,{Z:()=>s});var o=a(69307),n=a(70444);const s=(0,o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(n.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"}))},25918:(e,t,a)=>{a.d(t,{Z:()=>s});var o=a(69307),n=a(70444);const s=(0,o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(n.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"}))},6520:(e,t,a)=>{a.d(t,{Z:()=>s});var o=a(69307),n=a(70444);const s=(0,o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(n.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"}))},33532:(e,t,a)=>{a.d(t,{Z:()=>s});var o=a(69307),n=a(70444);const s=(0,o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(n.Path,{d:"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z"}))},99983:(e,t,a)=>{a.d(t,{Z:()=>n});var o=a(69307);const n=()=>(0,o.createElement)("svg",{preserveAspectRatio:"xMidYMid",version:"1.1",viewBox:"0 0 256 153",xmlns:"http://www.w3.org/2000/svg",className:"wc-icon wc-icon__woo-logo"},(0,o.createElement)("path",{d:"m23.759 0h208.38c13.187 0 23.863 10.675 23.863 23.863v79.542c0 13.187-10.675 23.863-23.863 23.863h-74.727l10.257 25.118-45.109-25.118h-98.695c-13.187 0-23.863-10.675-23.863-23.863v-79.542c-0.10466-13.083 10.571-23.863 23.758-23.863z",fill:"#7f54b3"}),(0,o.createElement)("path",{d:"m14.578 21.75c1.4569-1.9772 3.6423-3.0179 6.5561-3.226 5.3073-0.41626 8.3252 2.0813 9.0537 7.4927 3.226 21.75 6.7642 40.169 10.511 55.259l22.79-43.395c2.0813-3.9545 4.6829-6.0358 7.8049-6.2439 4.5789-0.3122 7.3886 2.6016 8.5333 8.7415 2.6016 13.841 5.9317 25.6 9.8862 35.59 2.7057-26.433 7.2846-45.476 13.737-57.236 1.561-2.9138 3.8504-4.3707 6.8683-4.5789 2.3935-0.20813 4.5789 0.52033 6.5561 2.0813 1.9772 1.561 3.0179 3.5382 3.226 5.9317 0.10406 1.8732-0.20813 3.4341-1.0407 4.9951-4.0585 7.4927-7.3886 20.085-10.094 37.567-2.6016 16.963-3.5382 30.179-2.9138 39.649 0.20813 2.6016-0.20813 4.8911-1.2488 6.8683-1.2488 2.2894-3.122 3.5382-5.5154 3.7463-2.7057 0.20813-5.5154-1.0406-8.2211-3.8504-9.678-9.8862-17.379-24.663-22.998-44.332-6.7642 13.32-11.759 23.311-14.985 29.971-6.1398 11.759-11.343 17.795-15.714 18.107-2.8098 0.20813-5.2033-2.1854-7.2846-7.1805-5.3073-13.633-11.031-39.961-17.171-78.985-0.41626-2.7057 0.20813-5.0992 1.665-6.9724zm223.64 16.338c-3.7463-6.5561-9.2618-10.511-16.65-12.072-1.9772-0.41626-3.8504-0.62439-5.6195-0.62439-9.9902 0-18.107 5.2033-24.455 15.61-5.4114 8.8455-8.1171 18.628-8.1171 29.346 0 8.013 1.665 14.881 4.9951 20.605 3.7463 6.5561 9.2618 10.511 16.65 12.072 1.9772 0.41626 3.8504 0.62439 5.6195 0.62439 10.094 0 18.211-5.2033 24.455-15.61 5.4114-8.9496 8.1171-18.732 8.1171-29.45 0.10406-8.1171-1.665-14.881-4.9951-20.501zm-13.112 28.826c-1.4569 6.8683-4.0585 11.967-7.9089 15.402-3.0179 2.7057-5.8276 3.8504-8.4293 3.3301-2.4976-0.52033-4.5789-2.7057-6.1398-6.7642-1.2488-3.226-1.8732-6.452-1.8732-9.4699 0-2.6016 0.20813-5.2033 0.72846-7.5967 0.93659-4.2667 2.7057-8.4293 5.5154-12.384 3.4341-5.0992 7.0764-7.1805 10.823-6.452 2.4976 0.52033 4.5789 2.7057 6.1398 6.7642 1.2488 3.226 1.8732 6.452 1.8732 9.4699 0 2.7057-0.20813 5.3073-0.72846 7.7008zm-52.033-28.826c-3.7463-6.5561-9.3659-10.511-16.65-12.072-1.9772-0.41626-3.8504-0.62439-5.6195-0.62439-9.9902 0-18.107 5.2033-24.455 15.61-5.4114 8.8455-8.1171 18.628-8.1171 29.346 0 8.013 1.665 14.881 4.9951 20.605 3.7463 6.5561 9.2618 10.511 16.65 12.072 1.9772 0.41626 3.8504 0.62439 5.6195 0.62439 10.094 0 18.211-5.2033 24.455-15.61 5.4114-8.9496 8.1171-18.732 8.1171-29.45 0-8.1171-1.665-14.881-4.9951-20.501zm-13.216 28.826c-1.4569 6.8683-4.0585 11.967-7.9089 15.402-3.0179 2.7057-5.8276 3.8504-8.4293 3.3301-2.4976-0.52033-4.5789-2.7057-6.1398-6.7642-1.2488-3.226-1.8732-6.452-1.8732-9.4699 0-2.6016 0.20813-5.2033 0.72846-7.5967 0.93658-4.2667 2.7057-8.4293 5.5154-12.384 3.4341-5.0992 7.0764-7.1805 10.823-6.452 2.4976 0.52033 4.5789 2.7057 6.1398 6.7642 1.2488 3.226 1.8732 6.452 1.8732 9.4699 0.10406 2.7057-0.20813 5.3073-0.72846 7.7008z",fill:"#fff"}))},46417:(e,t,a)=>{a.d(t,{Q:()=>d,Z:()=>_});var o=a(69307),n=a(7829),s=a(55609),r=a(94333),c=a(65736);const i={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},l=320,m={width:"100%",height:"100%"};function u(e,t){var a;return e/((a=t)+(.46153846153846156-a)*(1-Math.max(0,Math.min(1,(e-l)/980))))}const d=(0,o.createContext)(!1),_=function e({isFullWidth:t,isOversized:a,setIsOversized:_,isReady:h,children:p,defaultSize:g,innerContentStyle:v,isHandleVisibleByDefault:w=!1}){const[y,E]=(0,o.useState)(m),[S,k]=(0,o.useState)(),[f,C]=(0,o.useState)(!1),[b,N]=(0,o.useState)(!1),[T,x]=(0,o.useState)(1),L={type:"tween",duration:f?0:.5},[P,O]=(0,o.useState)(!1),R=(0,o.useRef)(null),M=(0,r.useInstanceId)(e,"edit-site-resizable-frame-handle-help"),z=g.width/g.height,A={default:{flexGrow:0,height:y.height},fullWidth:{flexGrow:1,height:y.height}},H=f||w?"active":b?"visible":"hidden",I=(0,o.createElement)(s.__unstableMotion.button,{key:"handle",role:"separator","aria-orientation":"vertical",className:(0,n.Z)("edit-site-resizable-frame__handle",{"is-resizing":f}),variants:{hidden:{opacity:0,left:0},visible:{opacity:.6,left:-10},active:{opacity:1,left:-10}},animate:H,"aria-label":(0,c.__)("Drag to resize","woocommerce"),"aria-describedby":M,"aria-valuenow":R.current?.resizable?.offsetWidth||void 0,"aria-valuemin":l,"aria-valuemax":g.width,onKeyDown:e=>{if(!["ArrowLeft","ArrowRight"].includes(e.key))return;e.preventDefault();const t=20*(e.shiftKey?5:1)*("ArrowLeft"===e.key?1:-1),a=Math.min(Math.max(l,R.current.resizable.offsetWidth+t),g.width);E({width:a,height:u(a,z)})},initial:"hidden",exit:"hidden",whileFocus:"active",whileHover:"active",children:w&&!P&&(0,o.createElement)(s.Popover,{className:"woocommerce-assembler-hub__resizable-frame__drag-handler",position:"middle right"},(0,c.__)("Drag to resize","woocommerce"))});return(0,o.createElement)(s.ResizableBox,{as:s.__unstableMotion.div,ref:R,initial:!1,variants:A,animate:t?"fullWidth":"default",onAnimationComplete:e=>{"fullWidth"===e&&E({width:"100%",height:"100%"})},transition:L,size:y,enable:{top:!1,right:!1,bottom:!1,left:h,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},resizeRatio:T,handleClasses:void 0,handleStyles:{left:i,right:i},minWidth:l,maxWidth:"100%",maxHeight:"100%",onFocus:()=>N(!0),onBlur:()=>N(!1),onMouseOver:()=>N(!0),onMouseOut:()=>N(!1),handleComponent:{left:(0,o.createElement)(o.Fragment,null,w?(0,o.createElement)("div",null,I):(0,o.createElement)(s.Tooltip,{position:"middle right",text:(0,c.__)("Drag to resize","woocommerce")},I),(0,o.createElement)("div",{hidden:!0,id:M},(0,c.__)("Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.","woocommerce")))},onResizeStart:(e,t,a)=>{k(a.offsetWidth),C(!0)},onResize:(e,t,o,n)=>{const s=n.width/T,r=Math.abs(s),c=n.width<0?r:(g.width-S)/2,i=Math.min(r,c),l=0===r?0:i/r;x(1-l+2*l);const m=S+n.width;_(m>g.width),E({height:a?"100%":u(m,z)})},onResizeStop:(e,t,o)=>{C(!1),P||O(!0),a&&(_(!1),E(m))},className:(0,n.Z)("edit-site-resizable-frame__inner",{"is-resizing":f})},(0,o.createElement)(s.__unstableMotion.div,{className:"customize-your-store-edit-site-resizable-frame__inner-content",animate:{borderRadius:t?0:8},transition:L,style:v},(0,o.createElement)(d.Provider,{value:f},p)))}},60970:(e,t,a)=>{a.d(t,{R:()=>g});var o=a(12314),n=a(69307),s=a(7829),r=a(9818),c=a(55609),i=a(94333),l=a(37798),m=a(22629),u=a(59713),d=a(10431),_=a(86020),h=a(15577),p=a(84279);const g=(0,n.forwardRef)((({isTransparent:e,...t},a)=>{const{siteTitle:g}=(0,r.useSelect)((e=>{const{getSite:t}=e(l.store);return{siteTitle:t()?.title}}),[]),v=(0,i.useReducedMotion)();return(0,n.createElement)(c.__unstableMotion.div,(0,o.Z)({ref:a},t,{className:(0,s.Z)("edit-site-site-hub",t.className),initial:!1,transition:{type:"tween",duration:v?0:.3,ease:"easeOut"}}),(0,n.createElement)(c.__experimentalHStack,{justify:"space-between",alignment:"center",className:"edit-site-site-hub__container"},(0,n.createElement)(c.__experimentalHStack,{justify:"flex-start",className:"edit-site-site-hub__text-content",spacing:"0"},(0,n.createElement)("div",{className:(0,s.Z)("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e})},(0,n.createElement)(_.Link,{href:(0,d.getNewPath)((0,d.getPersistedQuery)(),"/",{}),type:"wp-admin"},(0,p.id)()?(0,n.createElement)(h.Z,{size:24,className:"woocommerce-cys-wordpress-header-logo"}):(0,n.createElement)(u.Z,{className:"edit-site-layout__view-mode-toggle-icon"}))),!(0,p.id)()&&(0,n.createElement)(c.__unstableAnimatePresence,null,(0,n.createElement)(c.__unstableMotion.div,{layout:!1,animate:{opacity:1},exit:{opacity:0},className:(0,s.Z)("edit-site-site-hub__site-title",{"is-transparent":e}),transition:{type:"tween",duration:v?0:.2,ease:"easeOut",delay:.1}},(0,m.decodeEntities)(g))))))}))},84279:(e,t,a)=>{a.d(t,{LU:()=>n,id:()=>s});var o=a(92694);const n="entrepreneur-signup";(0,o.addFilter)("woocommerce_admin_persisted_queries","woocommerce_admin_customize_your_store",(e=>(e.push("ref"),e)));const s=()=>new URLSearchParams(window.location.search).get("ref")===n},15370:(e,t,a)=>{a.r(t),a.d(t,{default:()=>ge});var o=a(69307),n=a(4528),s=a(99196),r=a.n(s),c=a(7829),i=a(53736),l=a(91319),m=a(15359),u=a(77529),d=a(23743),_=a(71260),h=a(10431),p=a(67221),g=a(9818),v=a(14599),w=a(86989),y=a.n(w),E=a(65736),S=a(12394),k=a(55609),f=a(83619),C=a(70048),b=a(17832);const N=({title:e,description:t,footer:a,children:n})=>{const s=(0,E.isRTL)()?f.Z:C.Z;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(k.__experimentalVStack,{className:(0,c.Z)("edit-site-sidebar-navigation-screen__main",{"has-footer":!!a}),spacing:0,justify:"flex-start"},(0,o.createElement)(k.__experimentalHStack,{spacing:4,alignment:"flex-start",className:"edit-site-sidebar-navigation-screen__title-icon"},(0,o.createElement)(b.Z,{onClick:(i=e,r().isValidElement(i)&&"function"==typeof i.props.onClick?e.props.onClick:void 0),icon:s,label:(0,E.__)("Back","woocommerce"),showTooltip:!1}),(0,o.createElement)(k.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen__title",level:1,size:20},e)),(0,o.createElement)("div",{className:"edit-site-sidebar-navigation-screen__content"},t&&(0,o.createElement)("p",{className:"edit-site-sidebar-navigation-screen__description"},t),n)),a&&(0,o.createElement)("footer",{className:"edit-site-sidebar-navigation-screen__footer"},a));var i};var T=a(47642),x=a(25918),L=a(6520),P=a(87983),O=a(49704),R=a(33532);const M=T.Z,z={tax:x.Z,shipping:L.Z,"customize-store":P.Z,payments:O.Z,"woocommerce-payments":O.Z,products:R.Z};var A=a(60970),H=a(92694),I=a(66811),B=a(74617);const{getWithExpiry:D,setWithExpiry:U}=(0,I.createStorageUtils)("lys_recently_actioned_tasks",604800),W=({task:e,classNames:t})=>(0,o.createElement)(S.Z,{className:(0,c.Z)(e.id,"is-complete",t),icon:M,disabled:!0},e.title),Z=({task:e,classNames:t,onClick:a})=>(0,o.createElement)(S.Z,{className:(0,c.Z)(e.id,t),icon:z[e.id],withChevron:!0,onClick:a},e.title),G=(e,t)=>{let a=(0,h.getHistory)().location;const o=(0,h.getHistory)().listen((({action:o,location:n})=>{if("POP"===o){const o=new URLSearchParams(a.search),s=new URLSearchParams(n.search);o.get(e)!==s.get(e)&&(a=n,t({type:"EXTERNAL_URL_UPDATE"}))}a=n}));return()=>{o()}},V=e=>{const t=(0,h.getQuery)(),a=Object.entries(e).reduce(((e,[a,o])=>(t[a]!==o&&(e[a]=o),e)),{});Object.keys(a).length>0&&(0,h.updateQueryString)(a)};let F=null;const Y=async()=>{if(null!==F)return F;const e=await y()({path:"/wc-admin/launch-your-store/survey-completed"});return F=e,F},Q=(0,m.p4)((async()=>{const[e,t,a]=await Promise.all([Y(),(0,g.resolveSelect)(p.ONBOARDING_STORE_NAME).getTaskListsByIds(["setup","extended"]),(0,g.resolveSelect)(p.PLUGINS_STORE_NAME).getActivePlugins()]);return{surveyCompleted:e,tasklists:t,activePlugins:a}})),X=(0,m.E9)((({sendBack:e})=>G("sidebar",e))),K=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 a=await t.text();return!!(new DOMParser).parseFromString(a,"text/html").querySelector('meta[name="woo-coming-soon-page"]')}catch(t){throw new Error(`Error fetching ${e}: ${t}`)}},j=async()=>{const e=await(0,g.resolveSelect)(p.SETTINGS_STORE_NAME).getSettings("wc_admin"),t=[];return e?.shopUrl&&t.push(K({url:e.shopUrl})),e?.siteUrl&&t.push(K({url:e.siteUrl})),(await Promise.all(t)).some((e=>e))},$=(0,u.cY)({types:{},actions:{openExternalUrl:({event:e})=>{"OPEN_EXTERNAL_URL"===e.type&&(0,h.navigateTo)({url:e.url})},showLaunchStoreSuccessPage:(0,d.c)((({context:e})=>e.mainContentMachineRef),{type:"SHOW_LAUNCH_STORE_SUCCESS"}),showLaunchStorePendingCache:(0,d.c)((({context:e})=>e.mainContentMachineRef),{type:"SHOW_LAUNCH_STORE_PENDING_CACHE"}),showLoadingPage:(0,d.c)((({context:e})=>e.mainContentMachineRef),{type:"SHOW_LOADING"}),updateQueryParams:(e,t)=>{V(t)},taskClicked:({event:e})=>{"TASK_CLICKED"===e.type&&function(e){var t;const a=null!==(t=D())&&void 0!==t?t:[];U([...a,e.task.id]),window.sessionStorage.setItem("lysWaiting","yes");const{setWithExpiry:o}=(0,I.accessTaskReferralStorage)({taskId:e.task.id,referralLifetime:86400});o({referrer:"launch-your-store",returnUrl:(0,B.getAdminLink)("admin.php?page=wc-admin&path=/launch-your-store")}),(0,v.recordEvent)("launch_your_store_hub_task_clicked",{task:e.task.id}),e.task.actionUrl?(0,h.navigateTo)({url:e.task.actionUrl}):(0,h.navigateTo)({url:(0,h.getNewPath)({task:e.task.id},"/",{})})}(e)},openWcAdminUrl:({event:e})=>{"OPEN_WC_ADMIN_URL"===e.type&&(0,h.navigateTo)({url:e.url})},windowHistoryBack:()=>{window.history.back()},recordStoreLaunchAttempt:(0,d.a)({launchStoreAttemptTimestamp:({context:e})=>{const t=e.tasklist?.fullLysTaskList.length||0,a=e.tasklist?.tasks.filter((e=>!e.isComplete)).map((e=>e.id))||[],o=e.tasklist?.fullLysTaskList.filter((e=>e.isComplete)).map((e=>e.id))||[],n=o.filter((t=>e.tasklist?.recentlyActionedTasks.includes(t)));return(0,v.recordEvent)("launch_your_store_hub_store_launch_attempted",{tasks_total_count:t,tasks_completed:o,tasks_completed_count:o.length,tasks_completed_in_lys:n,tasks_completed_in_lys_count:n.length,incomplete_tasks:a,incomplete_tasks_count:a.length,delete_test_orders:e.removeTestOrders||!1}),performance.now()}}),recordStoreLaunchResults:({context:e},{success:t})=>{((e,t)=>{(0,v.recordEvent)("launch_your_store_hub_store_launch_results",{success:t,duration:(0,i.Jm)(performance.now()-e)})})(e.launchStoreAttemptTimestamp||0,t)},recordStoreLaunchCachedContentDetected:()=>{(0,v.recordEvent)("launch_your_store_hub_store_launch_cached_content_detected")}},guards:{hasSidebarLocation:(e,{sidebar:t})=>{const{sidebar:a}=(0,h.getQuery)();return!!a&&a===t},hasWooPayments:({context:e})=>!!e.hasWooPayments,siteIsShowingCachedContent:({context:e})=>!!e.siteIsShowingCachedContent},actors:{sidebarQueryParamListener:X,getTasklist:(0,m.p4)((async()=>{var e;const t=(0,H.applyFilters)("woocommerce_launch_your_store_tasklist_whitelist",["products","customize-store","woocommerce-payments","payments","shipping","tax"]),a=await(0,g.resolveSelect)(p.ONBOARDING_STORE_NAME).getTaskListsByIds(["setup"]),o=null!==(e=D())&&void 0!==e?e:[],n=a[0].tasks.filter((e=>t.includes(e.id)&&(!e.isComplete||o.includes(e.id))));return{...a[0],tasks:n,recentlyActionedTasks:o,fullLysTaskList:a[0].tasks.filter((e=>t.includes(e.id)))}})),getTestOrderCount:(0,m.p4)((async()=>(await y()({path:"/wc-admin/launch-your-store/woopayments/test-orders/count",method:"GET"})).count)),getSiteCachedStatus:(0,m.p4)(j),updateLaunchStoreOptions:(0,m.p4)((async()=>{const e=await(0,g.dispatch)(p.OPTIONS_STORE_NAME).updateOptions({woocommerce_coming_soon:"no"});if(e.success)return e;throw new Error(JSON.stringify(e))})),deleteTestOrders:(0,m.p4)((async({input:e})=>e.removeTestOrders?await y()({path:"/wc-admin/launch-your-store/woopayments/test-orders",method:"DELETE"}):null)),fetchCongratsData:Q,getWooPaymentsStatus:(0,m.p4)((async()=>{if(!1===window?.wcSettings?.admin?.plugins?.activePlugins.includes("woocommerce-payments"))return!1;const e=(await(0,g.resolveSelect)(p.PAYMENT_GATEWAYS_STORE_NAME).getPaymentGateways()).filter((e=>e.enabled));return 1===e.length&&"woocommerce_payments"===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:"hasSidebarLocation",params:{sidebar:"hub"}},target:"launchYourStoreHub"},{guard:{type:"hasSidebarLocation",params:{sidebar:"launch-success"}},target:"storeLaunchSuccessful"},{target:"launchYourStoreHub"}]},launchYourStoreHub:{initial:"preLaunchYourStoreHub",states:{preLaunchYourStoreHub:{entry:[(0,_.P)("fetchCongratsData",{id:"prefetch-congrats-data "})],invoke:{src:"getTasklist",onDone:{actions:(0,d.a)({tasklist:({event:e})=>e.output}),target:"checkWooPayments"}}},checkWooPayments:{invoke:{src:"getWooPaymentsStatus",onDone:{actions:(0,d.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,d.a)({testOrderCount:({event:e})=>e.output}),target:"launchYourStoreHub"},onError:{target:"launchYourStoreHub"}}},launchYourStoreHub:{id:"launchYourStoreHub",tags:"sidebar-visible",meta:{component:e=>{const{context:{tasklist:t,removeTestOrders:a,testOrderCount:n,launchStoreError:s}}=e,r=(0,o.createElement)(k.Button,{onClick:()=>{e.sendEventToSidebar({type:"POP_BROWSER_STACK"})}},(0,E.__)("Launch Your Store","woocommerce")),i=(0,E.__)("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"),l=t&&!t.tasks.every((e=>e.isComplete)),[m,u]=(0,o.useState)(null==a||a),[d,_]=(0,o.useState)(!1),[h,p]=(0,o.useState)(!1),g=()=>{p(!0),e.sendEventToSidebar({type:"LAUNCH_STORE",removeTestOrders:m})};return(0,o.useEffect)((()=>{s?.message&&p(!1)}),[s?.message]),(0,o.createElement)("div",{className:(0,c.Z)("launch-store-sidebar__container",e.className)},(0,o.createElement)(k.__unstableMotion.div,{className:"edit-site-layout__header-container",animate:"view"},(0,o.createElement)(A.R,{as:k.__unstableMotion.div,variants:{view:{x:0}},isTransparent:!1,className:"edit-site-layout__hub"})),(0,o.createElement)(N,{title:r,description:i},(0,o.createElement)("div",{className:"edit-site-sidebar-navigation-screen-essential-tasks__group-header"},(0,o.createElement)(k.__experimentalHeading,{level:2},(0,E.__)("Essential Tasks","woocommerce"))),(0,o.createElement)(k.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-essential-tasks__group"},t&&l&&t.tasks.map((t=>t.isComplete?(0,o.createElement)(W,{task:t,key:t.id}):(0,o.createElement)(Z,{task:t,key:t.id,onClick:()=>{e.sendEventToSidebar({type:"TASK_CLICKED",task:t})}}))),t&&!l&&(0,o.createElement)(S.Z,{className:"all-tasks-complete",icon:M},(0,E.__)("Fantastic job! Your store is ready to go — no pending tasks to complete.","woocommerce"))),n>0&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"edit-site-sidebar-navigation-screen-test-data__group-header"},(0,o.createElement)(k.__experimentalHeading,{level:2},(0,E.__)("Test data","woocommerce"))),(0,o.createElement)(k.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-remove-test-data__group"},(0,o.createElement)(k.ToggleControl,{label:(0,E.sprintf)((0,E.__)("Remove %d test orders","woocommerce"),n),checked:m,onChange:u}),(0,o.createElement)("p",null,(0,E.__)("Remove test orders and associated data, including analytics and transactions, once your store goes live. ","woocommerce")))),(0,o.createElement)(k.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-launch-store-button__group"},s?.message&&!d&&(0,o.createElement)(k.Notice,{className:"launch-store-error-notice",isDismissible:!0,onRemove:()=>_(!0),status:"error"},(0,o.createInterpolateElement)((0,E.__)("Oops! We encountered a problem while launching your store. <retryButton/>","woocommerce"),{retryButton:(0,o.createElement)(k.Button,{onClick:g,variant:"tertiary"},(0,E.__)("Please try again","woocommerce"))})),(0,o.createElement)(k.Button,{variant:"primary",onClick:g},h?(0,o.createElement)(k.Spinner,null):(0,E.__)("Launch your store","woocommerce")))))}},on:{LAUNCH_STORE:{target:"#storeLaunching"}}}}},storeLaunching:{id:"storeLaunching",initial:"launching",states:{launching:{entry:[(0,d.a)({launchStoreError:void 0}),"recordStoreLaunchAttempt"],invoke:[{src:"updateLaunchStoreOptions",onDone:{actions:[{type:"recordStoreLaunchResults",params:{success:!0}}],target:"checkingForCachedContent"},onError:{actions:[(0,d.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,d.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,d.b)((({check:e,enqueue:t})=>{if(e("siteIsShowingCachedContent"))return t({type:"showLaunchStorePendingCache"}),void t({type:"recordStoreLaunchCachedContentDetected"});t({type:"showLaunchStoreSuccessPage"})}))]},openExternalUrl:{id:"openExternalUrl",tags:"sidebar-visible",entry:["openExternalUrl"]}},on:{EXTERNAL_URL_UPDATE:{target:".navigate"},OPEN_EXTERNAL_URL:{target:"#openExternalUrl"},TASK_CLICKED:{actions:"taskClicked"},OPEN_WC_ADMIN_URL:{actions:"openWcAdminUrl"},POP_BROWSER_STACK:{actions:"windowHistoryBack"},OPEN_WC_ADMIN_URL_IN_CONTENT_AREA:{}}}),q=({children:e,className:t})=>(0,o.createElement)("div",{className:(0,c.Z)("launch-your-store-layout__sidebar",t)},e);var J=a(86020);const ee=()=>(0,o.createElement)("div",{className:"spinner-container"},(0,o.createElement)(J.Spinner,null));var te=a(94333),ae=a(17062),oe=a(46417),ne=a(99983);const se={congratsScreen:({context:e})=>(y()({path:"/wc-admin/launch-your-store/update-survey-status",data:{status:"yes"},method:"POST"}).catch((()=>{})),{...e.congratsScreen,hasCompleteSurvey:!0})},re=({activePlugins:e,allTasklists:t})=>{const a=(0,o.useMemo)((()=>(({activePlugins:e,allTasklists:t})=>{const a=[],o=(e,t)=>{a.length<3&&t&&a.push(e)},n=t.find((({id:e})=>"setup"===e))?.tasks?.reduce(((e,{id:t,isComplete:a})=>(e[t]=a||!1,e)),{}),s=t.find((({id:e})=>"extended"===e))?.tasks?.reduce(((e,{id:t,isComplete:a})=>(e[t]=a||!1,e)),{}),r=n?.marketing||!1,c=n?.payments||!1,i=s?.["get-mobile-app"]||!1,l=e.includes("mailchimp-for-woocommerce"),m={title:(0,E.__)("Promote your products","woocommerce"),description:(0,E.__)("Grow your customer base by promoting your products to millions of engaged shoppers.","woocommerce"),link:`${ae.SX}admin.php?page=wc-admin&task=marketing`,linkText:(0,E.__)("Promote products","woocommerce"),trackEvent:"launch_you_store_congrats_marketing_click"},u={title:(0,E.__)("Provide more ways to pay","woocommerce"),description:(0,E.__)("Give your shoppers more ways to pay by adding additional payment methods to your store.","woocommerce"),link:`${ae.SX}admin.php?page=wc-settings&tab=checkout`,linkText:(0,E.__)("Add payment methods","woocommerce"),trackEvent:"launch_you_store_congrats_payments_click"},d={title:(0,E.__)("Build customer relationships","woocommerce"),description:(0,E.__)("Keep your shoppers up to date with what’s new in your store and set up clever post-purchase automations.","woocommerce"),link:l?`${ae.SX}admin.php?page=mailchimp-woocommerce`:"https://woo.com/products/mailchimp-for-woocommerce/?utm_source=launch_your_store&utm_medium=product",linkText:l?(0,E.__)("Manage Mailchimp","woocommerce"):(0,E.__)("Install Mailchimp","woocommerce"),trackEvent:"launch_you_store_congrats_mailchimp_click"},_={title:(0,E.__)("Power up your store","woocommerce"),description:(0,E.__)("Add extra features and functionality to your store with Woo extensions.","woocommerce"),link:`${ae.SX}admin.php?page=wc-admin&path=%2Fextensions`,linkText:(0,E.__)("Add extensions","woocommerce"),trackEvent:"launch_you_store_congrats_extensions_click"},h={title:(0,E.__)("Manage your store on the go","woocommerce"),description:(0,E.__)("Manage your store anywhere with the free WooCommerce Mobile App.","woocommerce"),link:`${ae.SX}admin.php?page=wc-admin&mobileAppModal=true`,linkText:(0,E.__)("Get the app","woocommerce"),trackEvent:"launch_you_store_congrats_mobile_app_click"},p={title:(0,E.__)("Help is on hand","woocommerce"),description:(0,E.__)("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,E.__)("Explore support resources","woocommerce"),trackEvent:"launch_you_store_congrats_external_documentation_click"};return o(m,!r),o(u,!c),o(_,!0),o(h,i),o(d,!0),o(p,!0),o(u,!0),o(_,!0),o(p,!0),a})({activePlugins:e,allTasklists:t})),[e,t]);return(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-main-actions"},a.map(((e,t)=>(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-action",key:t},(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-action__content"},(0,o.createElement)("h3",null,e.title),(0,o.createElement)("p",null,e.description),(0,o.createElement)(k.Button,{variant:"link",href:e.link,target:-1===e.link.indexOf(ae.SX)?"_blank":"_self",onClick:()=>{(0,v.recordEvent)(e.trackEvent)}},e.linkText))))))};var ce=a(92819),ie=a(28601),le=a(75606),me=a(34052);const ue=({hasCompleteSurvey:e,onSubmit:t})=>{const[a,n]=(0,o.useState)(null),[s,r]=(0,o.useState)(""),[c,i]=(0,o.useState)(!1),[l,m]=(0,o.useState)(!e),u=(0,ce.isInteger)(a);return(0,o.createElement)(o.Fragment,null,l&&(0,o.createElement)("hr",{className:"separator"}),l&&(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-survey"},c?(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-thanks"},(0,o.createElement)("p",{className:"thanks-copy"},"🙌"," ",(0,E.__)("We appreciate your feedback!","woocommerce")),(0,o.createElement)(k.Button,{className:"close-button",label:(0,E.__)("Close","woocommerce"),icon:(0,o.createElement)(k.Icon,{icon:ie.Z,viewBox:"6 4 12 14"}),iconSize:14,size:24,onClick:()=>{i(!1),m(!1)}})):(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-section_1"},(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-survey__selection"},(0,o.createElement)(le.CustomerFeedbackSimple,{label:(0,E.__)("How was the experience of launching your store?","woocommerce"),onSelect:n,selectedValue:a})),u&&(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-survey__comment"},(0,o.createElement)("label",{className:"comment-label",htmlFor:"launch-your-store-comment"},(0,o.createInterpolateElement)((0,E.__)("Why do you feel that way? <smallText>(optional)</smallText>","woocommerce"),{smallText:(0,o.createElement)("span",{className:"small-text"})})),(0,o.createElement)(k.TextareaControl,{id:"launch-your-store-comment","data-testid":"launch-your-store-comment",value:s,onChange:e=>{r(e)}}),(0,o.createElement)("span",{className:"privacy-text"},(0,o.createInterpolateElement)((0,E.__)("Your feedback will be only be shared with WooCommerce and treated in accordance with our <privacyLink>privacy policy</privacyLink>.","woocommerce"),{privacyLink:(0,o.createElement)(J.Link,{href:"https://automattic.com/privacy/",type:"external",target:"_blank"},(0,o.createElement)(o.Fragment,null))})))),u&&!c&&(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-section_2"},(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-buttons"},(0,o.createElement)(k.Button,{className:"",variant:"tertiary",onClick:()=>{n(null)}},(0,E.__)("Cancel","woocommerce")),(0,o.createElement)(k.Button,{className:"",variant:"primary",onClick:()=>{(0,v.recordEvent)((0,me.V)()?"launch_your_store_congrats_survey_click":"launch_your_store_on_core_congrats_survey_click"),t({action:"lys_experience",score:a,comments:s}),i(!0)}},(0,E.__)("Send","woocommerce"))))))},de=(0,m.E9)((({sendBack:e})=>G("content",e))),_e=(0,u.cY)({types:{},actions:{updateQueryParams:(e,t)=>{V(t)},assignSiteCachedStatus:(0,d.a)({siteIsShowingCachedContent:!0}),recordSurveyResults:({event:e})=>{(0,u.ZD)(e,"COMPLETE_SURVEY"),(0,v.recordEvent)("launch_your_store_congrats_survey_complete",{action:e.payload.action,score:e.payload.score,comments:e.payload.comments})},recordBackToHomeClick:()=>{(0,v.recordEvent)("launch_your_store_congrats_back_to_home_click")},recordPreviewStoreClick:()=>{(0,v.recordEvent)("launch_your_store_congrats_preview_store_click")},navigateToPreview:()=>{const e=(0,B.getSetting)("homeUrl","");window.open(e,"_blank")},navigateToHome:()=>{const{invalidateResolutionForStoreSelector:e}=(0,g.dispatch)(p.ONBOARDING_STORE_NAME);e("getTaskLists"),(0,h.navigateTo)({url:"/"})}},guards:{hasContentLocation:(e,{content:t})=>{const{content:a}=(0,h.getQuery)();return!!a&&a===t}},actors:{contentQueryParamListener:de,fetchCongratsData:Q,getSiteCachedStatus:(0,m.p4)(j)}}).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:"hasContentLocation",params:{content:"site-preview"}}},{guard:{type:"hasContentLocation",params:{content:"launch-store-success"}},target:"launchStoreSuccess"},{target:"#sitePreview"}]},sitePreview:{id:"sitePreview",meta:{component:e=>{const t=(0,ae.O3)("siteUrl")+"?site-preview=1",[a,n]=(0,o.useState)(!0),s=(0,o.useRef)(null),[r,i]=(0,te.useResizeObserver)(),[l,m]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{const e=s.current?.contentWindow,t=()=>{n(!0)};return e&&e.addEventListener("beforeunload",t),()=>{e&&e.removeEventListener("beforeunload",t)}}),[s,n,a]),(0,o.createElement)("div",{className:(0,c.Z)("launch-store-site-preview-page__container",{"is-loading":a},e.className)},r,!!i.width&&(0,o.createElement)(k.__unstableMotion.div,{initial:!1,layout:"position",className:"launch-store-preview-layout__canvas"},(0,o.createElement)(oe.Z,{isReady:!a,isHandleVisibleByDefault:!1,isFullWidth:!1,defaultSize:{width:i.width-24,height:i.height},isOversized:l,setIsOversized:m,innerContentStyle:{}},a&&(0,o.createElement)("div",{className:"launch-store-site-preview-site__loading-overlay"},(0,o.createElement)(J.Spinner,null)),(0,o.createElement)("iframe",{ref:s,className:"launch-store-site__preview-site-iframe",src:t,title:"Preview",onLoad:()=>n(!1)}))))}}},launchStoreSuccess:{id:"launchStoreSuccess",initial:"loading",states:{loading:{invoke:[{src:"fetchCongratsData",onDone:{actions:(0,d.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,d.a)({siteIsShowingCachedContent:({event:e})=>e.output})},onError:{actions:(0,d.a)({siteIsShowingCachedContent:!1})}}],always:{guard:({context:e})=>e.congratsScreen.hasLoadedCongratsData&&void 0!==e.siteIsShowingCachedContent,target:"congrats"},meta:{component:ee}},congrats:{entry:[{type:"updateQueryParams",params:{content:"launch-store-success"}}],meta:{component:({context:{congratsScreen:{activePlugins:e,allTasklists:t,hasCompleteSurvey:a},siteIsShowingCachedContent:n},sendEventToMainContent:s,className:r})=>{const l=(0,E.__)("Copy link","woocommerce"),m=(0,E.__)("Copied!","woocommerce"),u=(0,B.getSetting)("homeUrl",""),d=new URL(u);let _=d?.hostname;d?.port&&(_+=":"+d.port);const[h,p]=(0,o.useState)(l),g=(0,te.useCopyToClipboard)(u,(()=>{p(m),setTimeout((()=>{p(l)}),2e3)}));return(0,i.p0)(["woocommerce-launch-your-store-success"]),(0,o.createElement)("div",{className:(0,c.Z)("launch-store-success-page__container",r)},(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats"},(0,o.createElement)(J.ConfettiAnimation,{delay:1e3,colors:["#DFD1FB","#FB79D9","#FFA60E","#03D479","#AD86E9","#7F54B3","#3C2861"]}),(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-header-container"},(0,o.createElement)("span",{className:"woologo"},(0,o.createElement)(ne.Z,null)),(0,o.createElement)(k.Button,{onClick:()=>{s({type:"BACK_TO_HOME"})},className:"back-to-home-button",variant:"link"},(0,o.createElement)(k.Dashicon,{icon:"arrow-left-alt2"}),(0,o.createElement)("span",null,(0,E.__)("Back to Home","woocommerce")))),(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-content"},(0,o.createElement)("h1",{className:"woocommerce-launch-store__congrats-heading"},n?(0,E.__)("Congratulations! Your store will launch soon","woocommerce"):(0,E.__)("Congratulations! Your store is now live","woocommerce")),(0,o.createElement)("h2",{className:"woocommerce-launch-store__congrats-subheading"},n?(0,o.createInterpolateElement)((0,E.__)("It’ll be ready to view as soon as your <link></link> have updated. Please wait, or contact your web host to find out how to do this manually.","woocommerce"),{link:(0,o.createElement)("a",{href:"https://woocommerce.com/document/configuring-woocommerce-settings/coming-soon-mode/#server-caches",target:"_blank",rel:"noreferrer"},(0,E.__)("server caches","woocommerce"))}):(0,E.__)("You’ve successfully launched your store and are ready to start selling! We can’t wait to see your business grow.","woocommerce")),(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-midsection-container"},(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-visit-store"},(0,o.createElement)("p",{className:"store-name"},_),(0,o.createElement)("div",{className:"buttons-container"},(0,o.createElement)(k.Button,{className:"",variant:"secondary",ref:g,onClick:()=>{(0,v.recordEvent)("launch_your_store_congrats_copy_store_link_click")}},h),(0,o.createElement)(k.Button,{className:"",variant:"primary",onClick:()=>{s({type:"PREVIEW_STORE"})}},(0,E.__)("Visit your store","woocommerce")))),(0,o.createElement)(ue,{hasCompleteSurvey:a,onSubmit:e=>{s({type:"COMPLETE_SURVEY",payload:e})}})),(0,o.createElement)("h2",{className:"woocommerce-launch-store__congrats-main-actions-title"},(0,E.__)("What’s next?","woocommerce")),(0,o.createElement)(re,{activePlugins:e,allTasklists:t}))))}}}},on:{COMPLETE_SURVEY:{actions:[(0,d.a)(se),"recordSurveyResults"]},PREVIEW_STORE:{actions:["recordPreviewStoreClick","navigateToPreview"]},BACK_TO_HOME:{actions:["recordBackToHomeClick","navigateToHome"]}}},loading:{id:"loading",meta:{component:ee}}},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"}}}),he=({children:e})=>(0,o.createElement)("div",{className:"launch-your-store-layout__content"},e);var pe=a(69959);const ge=()=>{(0,i.p0)(["woocommerce-launch-your-store"]),(0,s.useEffect)((()=>{window.sessionStorage.setItem("lysWaiting","no")}),[]);const{xstateV5Inspector:e}=(0,pe.r)("V5"),[t,a,r]=(0,n.eO)(_e,{inspect:e}),[m,u,d]=(0,n.eO)($,{inspect:e,input:{mainContentMachineRef:r}}),_=!m.hasTag("fullscreen"),[h]=(0,l.X)(d),[p]=(0,l.X)(r);return(0,o.createElement)("div",{className:"launch-your-store-layout__container"},(0,o.createElement)(q,{className:(0,c.Z)({"is-sidebar-hidden":!_})},h&&(0,o.createElement)(h,{sendEventToSidebar:u,sendEventToMainContent:a,context:m.context})),(0,o.createElement)(he,null,p&&(0,o.createElement)(p,{sendEventToSidebar:u,sendEventToMainContent:a,context:t.context})))}},15577:(e,t,a)=>{a.d(t,{Z:()=>c});var o=a(69307),n=a(7862),s=a.n(n);function r({className:e="wordpress-logo",size:t=72}){return(0,o.createElement)("svg",{className:e,height:t,width:t,viewBox:"0 0 72 72"},(0,o.createElement)("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"}))}r.propTypes={className:s().string,size:s().number};const c=r},28316:(e,t,a)=>{function o(e,t=new Set){if(!t.has(e)){t.add(e);for(const a in e)if(e.hasOwnProperty(a)){if("component"===a)return e;if("object"==typeof e[a]&&null!==e[a]){const n=o(e[a],t);if(void 0!==n)return n}}}}a.d(t,{r:()=>o})},91319:(e,t,a)=>{a.d(t,{X:()=>r});var o=a(4528),n=a(99196),s=a(28316);function r(e){const t=(0,o.v9)(e,(e=>{var t;return(0,s.r)(null!==(t=e.getMeta())&&void 0!==t?t:void 0)})),[a,r]=(0,n.useState)(null);return(0,n.useEffect)((()=>{t?.component&&r((()=>t.component))}),[t?.component]),[a||null]}}}]);