shell bypass 403
"use strict";(globalThis.webpackChunk_wcAdmin_webpackJsonp=globalThis.webpackChunk_wcAdmin_webpackJsonp||[]).push([[8219],{99600:(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"}))},857:(e,t,a)=>{a.d(t,{Z:()=>_});var o=a(69307),n=a(87608),s=a.n(n),r=a(55609),c=a(94333),i=a(65736);const l={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},m=320,u={width:"100%",height:"100%"};function d(e,t){var a;return e/((a=t)+(.46153846153846156-a)*(1-Math.max(0,Math.min(1,(e-m)/980))))}const _=function e({isFullWidth:t,isOversized:a,setIsOversized:n,isReady:_,children:p,defaultSize:h,innerContentStyle:g,isHandleVisibleByDefault:v=!1}){const[y,E]=(0,o.useState)(u),[w,k]=(0,o.useState)(),[S,f]=(0,o.useState)(!1),[b,N]=(0,o.useState)(!1),[C,L]=(0,o.useState)(1),T={type:"tween",duration:S?0:.5},[x,O]=(0,o.useState)(!1),R=(0,o.useRef)(null),P=(0,c.useInstanceId)(e,"edit-site-resizable-frame-handle-help"),A=h.width/h.height,M={default:{flexGrow:0,height:y.height},fullWidth:{flexGrow:1,height:y.height}},D=S||v?"active":b?"visible":"hidden",z=(0,o.createElement)(r.__unstableMotion.button,{key:"handle",role:"separator","aria-orientation":"vertical",className:s()("edit-site-resizable-frame__handle",{"is-resizing":S}),variants:{hidden:{opacity:0,left:0},visible:{opacity:.6,left:-10},active:{opacity:1,left:-10}},animate:D,"aria-label":(0,i.__)("Drag to resize","woocommerce"),"aria-describedby":P,"aria-valuenow":R.current?.resizable?.offsetWidth||void 0,"aria-valuemin":m,"aria-valuemax":h.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(m,R.current.resizable.offsetWidth+t),h.width);E({width:a,height:d(a,A)})},initial:"hidden",exit:"hidden",whileFocus:"active",whileHover:"active",children:v&&!x&&(0,o.createElement)(r.Popover,{className:"woocommerce-assembler-hub__resizable-frame__drag-handler",position:"middle right"},(0,i.__)("Drag to resize","woocommerce"))});return(0,o.createElement)(r.ResizableBox,{as:r.__unstableMotion.div,ref:R,initial:!1,variants:M,animate:t?"fullWidth":"default",onAnimationComplete:e=>{"fullWidth"===e&&E({width:"100%",height:"100%"})},whileHover:{scale:1.005,transition:{duration:.5,ease:"easeOut"}},transition:T,size:y,enable:{top:!1,right:!1,bottom:!1,left:_,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},resizeRatio:C,handleClasses:void 0,handleStyles:{left:l,right:l},minWidth:m,maxWidth:"100%",maxHeight:"100%",onFocus:()=>N(!0),onBlur:()=>N(!1),onMouseOver:()=>N(!0),onMouseOut:()=>N(!1),handleComponent:{left:(0,o.createElement)(o.Fragment,null,v?(0,o.createElement)("div",null,z):(0,o.createElement)(r.Tooltip,{position:"middle right",text:(0,i.__)("Drag to resize","woocommerce")},z),(0,o.createElement)("div",{hidden:!0,id:P},(0,i.__)("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),f(!0)},onResize:(e,t,o,s)=>{const r=s.width/C,c=Math.abs(r),i=s.width<0?c:(h.width-w)/2,l=Math.min(c,i),m=0===c?0:l/c;L(1-m+2*m);const u=w+s.width;n(u>h.width),E({height:a?"100%":d(u,A)})},onResizeStop:(e,t,o)=>{f(!1),x||O(!0),a&&(n(!1),E(u))},className:s()("edit-site-resizable-frame__inner",{"is-resizing":S})},(0,o.createElement)(r.__unstableMotion.div,{className:"edit-site-resizable-frame__inner-content",animate:{borderRadius:t?0:8},transition:T,style:g},p))}},41539:(e,t,a)=>{a.d(t,{R:()=>h});var o=a(12314),n=a(69307),s=a(87608),r=a.n(s),c=a(9818),i=a(55609),l=a(94333),m=a(37798),u=a(22629),d=a(90060),_=a(10431),p=a(86020);const h=(0,n.forwardRef)((({isTransparent:e,...t},a)=>{const{siteTitle:s}=(0,c.useSelect)((e=>{const{getSite:t}=e(m.store);return{siteTitle:t()?.title}}),[]),h=(0,l.useReducedMotion)();return(0,n.createElement)(i.__unstableMotion.div,(0,o.Z)({ref:a},t,{className:r()("edit-site-site-hub",t.className),initial:!1,transition:{type:"tween",duration:h?0:.3,ease:"easeOut"}}),(0,n.createElement)(i.__experimentalHStack,{justify:"space-between",alignment:"center",className:"edit-site-site-hub__container"},(0,n.createElement)(i.__experimentalHStack,{justify:"flex-start",className:"edit-site-site-hub__text-content",spacing:"0"},(0,n.createElement)("div",{className:r()("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e})},(0,n.createElement)(p.Link,{href:(0,_.getNewPath)((0,_.getPersistedQuery)(),"/",{}),type:"wp-admin"},(0,n.createElement)(d.Z,{className:"edit-site-layout__view-mode-toggle-icon"}))),(0,n.createElement)(i.__unstableAnimatePresence,null,(0,n.createElement)(i.__unstableMotion.div,{layout:!1,animate:{opacity:1},exit:{opacity:0},className:r()("edit-site-site-hub__site-title",{"is-transparent":e}),transition:{type:"tween",duration:h?0:.2,ease:"easeOut",delay:.1}},(0,u.decodeEntities)(s))))))}))},95382:(e,t,a)=>{a.r(t),a.d(t,{default:()=>ue});var o=a(69307),n=a(4528),s=a(99196),r=a.n(s),c=a(87608),i=a.n(c),l=a(14841),m=a(90556);function u(e){const t=(0,n.v9)(e,(e=>{var t;return(0,m.r)(null!==(t=e.getMeta())&&void 0!==t?t:void 0)})),[a,o]=(0,s.useState)(null);return(0,s.useEffect)((()=>{t?.component&&o((()=>t.component))}),[t?.component]),[a||null]}var d=a(3583),_=a(57724),p=a(68703),h=a(21396),g=a(10431),v=a(67221),y=a(9818),E=a(14599),w=a(65736),k=a(64703),S=a(55609),f=a(83619),b=a(70048),N=a(26655);const C=({title:e,description:t,footer:a,children:n})=>{const s=(0,w.isRTL)()?f.Z:b.Z;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(S.__experimentalVStack,{className:i()("edit-site-sidebar-navigation-screen__main",{"has-footer":!!a}),spacing:0,justify:"flex-start"},(0,o.createElement)(S.__experimentalHStack,{spacing:4,alignment:"flex-start",className:"edit-site-sidebar-navigation-screen__title-icon"},(0,o.createElement)(N.Z,{onClick:(c=e,r().isValidElement(c)&&"function"==typeof c.props.onClick?e.props.onClick:void 0),icon:s,label:(0,w.__)("Back","woocommerce"),showTooltip:!1}),(0,o.createElement)(S.__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 c};var L=a(47642),T=a(25918),x=a(6520),O=a(87983),R=a(49704),P=a(33532);const A=L.Z,M={tax:T.Z,shipping:x.Z,"customize-store":O.Z,payments:R.Z,"woocommerce-payments":R.Z,products:P.Z};var D=a(41539),z=a(92694);const{getWithExpiry:U,setWithExpiry:H}=(I="lys_recently_actioned_tasks",604800,{setWithExpiry:e=>{const t=new Date,a={data:e,expiry:new Date(t.getTime()+6048e5).toISOString()};localStorage.setItem(I,JSON.stringify(a))},getWithExpiry:()=>{const e=localStorage.getItem(I);if(!e)return null;const t=JSON.parse(e);return new Date>new Date(t.expiry)?(localStorage.removeItem(I),null):t.data}});var I;const W=({task:e,classNames:t})=>(0,o.createElement)(k.Z,{className:i()(e.id,"is-complete",t),icon:A,disabled:!0},e.title),B=({task:e,classNames:t,onClick:a})=>(0,o.createElement)(k.Z,{className:i()(e.id,t),icon:M[e.id],withChevron:!0,onClick:a},e.title),Z=(e,t)=>{let a=(0,g.getHistory)().location;const o=(0,g.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()}},Y=e=>{const t=(0,g.getQuery)(),a=Object.entries(e).reduce(((e,[a,o])=>(t[a]!==o&&(e[a]=o),e)),{});Object.keys(a).length>0&&(0,g.updateQueryString)(a)},Q=(0,d.p4)((async()=>{const[e,t,a]=await Promise.all([(0,y.resolveSelect)(v.OPTIONS_STORE_NAME).getOption("woocommerce_admin_launch_your_store_survey_completed"),(0,y.resolveSelect)(v.ONBOARDING_STORE_NAME).getTaskListsByIds(["setup","extended"]),(0,y.resolveSelect)(v.PLUGINS_STORE_NAME).getActivePlugins()]);return{surveyCompleted:e,tasklists:t,activePlugins:a}})),F=(0,d.E9)((({sendBack:e})=>Z("sidebar",e))),G=(0,_.cY)({types:{},actions:{openExternalUrl:({event:e})=>{"OPEN_EXTERNAL_URL"===e.type&&(0,g.navigateTo)({url:e.url})},showLaunchStoreSuccessPage:(0,p.c)((({context:e})=>e.mainContentMachineRef),{type:"SHOW_LAUNCH_STORE_SUCCESS"}),showLoadingPage:(0,p.c)((({context:e})=>e.mainContentMachineRef),{type:"SHOW_LOADING"}),updateQueryParams:(e,t)=>{Y(t)},taskClicked:({event:e})=>{"TASK_CLICKED"===e.type&&function(e){var t;const a=null!==(t=U())&&void 0!==t?t:[];H([...a,e.task.id]),(0,E.recordEvent)("launch_your_store_hub_task_clicked",{task:e.task.id}),e.task.actionUrl?(0,g.navigateTo)({url:e.task.actionUrl}):(0,g.navigateTo)({url:(0,g.getNewPath)({task:e.task.id},"/",{})})}(e)},openWcAdminUrl:({event:e})=>{"OPEN_WC_ADMIN_URL"===e.type&&(0,g.navigateTo)({url:e.url})},windowHistoryBack:()=>{window.history.back()},recordStoreLaunchAttempt:(0,p.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,E.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,E.recordEvent)("launch_your_store_hub_store_launch_results",{success:t,duration:(0,l.Jm)(performance.now()-e)})})(e.launchStoreAttemptTimestamp||0,t)}},guards:{hasSidebarLocation:(e,{sidebarLocation:t})=>{const{sidebar:a}=(0,g.getQuery)();return!!a&&a===t}},actors:{sidebarQueryParamListener:F,getTasklist:(0,d.p4)((async()=>{var e;const t=(0,z.applyFilters)("woocommerce_launch_your_store_tasklist_whitelist",["products","customize-store","woocommerce-payments","payments","shipping","tax"]),a=await(0,y.resolveSelect)(v.ONBOARDING_STORE_NAME).getTaskListsByIds(["setup"]),o=null!==(e=U())&&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)))}})),updateLaunchStoreOptions:(0,d.p4)((async()=>{const e=await(0,y.dispatch)(v.OPTIONS_STORE_NAME).updateOptions({woocommerce_coming_soon:"no"});if(e.success)return e;throw new Error(JSON.stringify(e))})),fetchCongratsData:Q}}).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:{sidebarLocation:"hub"}},target:"launchYourStoreHub"},{guard:{type:"hasSidebarLocation",params:{sidebarLocation:"launch-success"}},target:"storeLaunchSuccessful"},{target:"launchYourStoreHub"}]},launchYourStoreHub:{initial:"preLaunchYourStoreHub",states:{preLaunchYourStoreHub:{entry:[(0,h.P)("fetchCongratsData",{id:"prefetch-congrats-data "})],invoke:{src:"getTasklist",onDone:{actions:(0,p.a)({tasklist:({event:e})=>e.output}),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)(S.Button,{onClick:()=>{e.sendEventToSidebar({type:"POP_BROWSER_STACK"})}},(0,w.__)("Launch Your Store","woocommerce")),c=(0,w.__)("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),[p,h]=(0,o.useState)(!1),g=()=>{h(!0),e.sendEventToSidebar({type:"LAUNCH_STORE",removeTestOrders:m})};return(0,o.useEffect)((()=>{s?.message&&h(!1)}),[s?.message]),(0,o.createElement)("div",{className:i()("launch-store-sidebar__container",e.className)},(0,o.createElement)(S.__unstableMotion.div,{className:"edit-site-layout__header-container",animate:"view"},(0,o.createElement)(D.R,{as:S.__unstableMotion.div,variants:{view:{x:0}},isTransparent:!1,className:"edit-site-layout__hub"})),(0,o.createElement)(C,{title:r,description:c},(0,o.createElement)("div",{className:"edit-site-sidebar-navigation-screen-essential-tasks__group-header"},(0,o.createElement)(S.__experimentalHeading,{level:2},(0,w.__)("Essential Tasks","woocommerce"))),(0,o.createElement)(S.__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)(B,{task:t,key:t.id,onClick:()=>{e.sendEventToSidebar({type:"TASK_CLICKED",task:t})}}))),t&&!l&&(0,o.createElement)(k.Z,{className:"all-tasks-complete",icon:A},(0,w.__)("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)(S.__experimentalHeading,{level:2},(0,w.__)("Test data","woocommerce"))),(0,o.createElement)(S.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-remove-test-data__group"},(0,o.createElement)(S.ToggleControl,{label:(0,w.sprintf)((0,w.__)("Remove %d test orders","woocommerce"),n),checked:m,onChange:u}),(0,o.createElement)("p",null,(0,w.__)("Remove test orders and associated data, including analytics and transactions, once your store goes live. ","woocommerce")))),(0,o.createElement)(S.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-launch-store-button__group"},s?.message&&!d&&(0,o.createElement)(S.Notice,{className:"launch-store-error-notice",isDismissible:!0,onRemove:()=>_(!0),status:"error"},(0,o.createInterpolateElement)((0,w.__)("Oops! We encountered a problem while launching your store. <retryButton/>","woocommerce"),{retryButton:(0,o.createElement)(S.Button,{onClick:g,variant:"tertiary"},(0,w.__)("Please try again","woocommerce"))})),(0,o.createElement)(S.Button,{variant:"primary",onClick:g},p?(0,o.createElement)(S.Spinner,null):(0,w.__)("Launch your store","woocommerce")))))}},on:{LAUNCH_STORE:{target:"#storeLaunching"}}}}},storeLaunching:{id:"storeLaunching",initial:"launching",states:{launching:{entry:[(0,p.a)({launchStoreError:void 0}),"recordStoreLaunchAttempt"],invoke:{src:"updateLaunchStoreOptions",onDone:{target:"#storeLaunchSuccessful",actions:[{type:"recordStoreLaunchResults",params:{success:!0}}]},onError:{actions:[(0,p.a)({launchStoreError:({event:e})=>({message:JSON.stringify(e.error)})}),{type:"recordStoreLaunchResults",params:{success:!1}}],target:"#launchYourStoreHub"}}}}},storeLaunchSuccessful:{id:"storeLaunchSuccessful",tags:"fullscreen",entry:[{type:"updateQueryParams",params:{sidebar:"launch-success",content:"launch-store-success"}},{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:{}}}),K=({children:e,className:t})=>(0,o.createElement)("div",{className:i()("launch-your-store-layout__sidebar",t)},e);var V=a(86020),X=a(94333),j=a(61935),J=a(857),$=a(74617),q=a(92819),ee=a(28601),te=a(75606),ae=a(99600);const oe=({hasCompleteSurvey:e,isWooExpress:t,completeSurvey:a,children:n})=>{const s=(0,w.__)("Copy link","woocommerce"),r=(0,w.__)("Copied!","woocommerce"),c=(0,$.getSetting)("homeUrl",""),i=new URL(c);let l=i?.hostname;i?.port&&(l+=":"+i.port);const[m,u]=(0,o.useState)(!e),[d,_]=(0,o.useState)(null),[p,h]=(0,o.useState)(""),[k,f]=(0,o.useState)(!1),[b,N]=(0,o.useState)(s),C=(0,q.isInteger)(d),L=(0,X.useCopyToClipboard)(c,(()=>{N(r),setTimeout((()=>{N(s)}),2e3)})),{invalidateResolutionForStoreSelector:T}=(0,y.useDispatch)(v.ONBOARDING_STORE_NAME);return(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats"},(0,o.createElement)(V.ConfettiAnimation,{delay:1e3}),(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-header-container"},(0,o.createElement)("span",{className:"woologo"},(0,o.createElement)(ae.Z,null)),(0,o.createElement)(S.Button,{onClick:()=>{(0,E.recordEvent)("launch_your_store_congrats_back_to_home_click"),T("getTaskLists"),(0,g.navigateTo)({url:"/"})},className:"back-to-home-button",variant:"link"},(0,o.createElement)(S.Dashicon,{icon:"arrow-left-alt2"}),(0,o.createElement)("span",null,(0,w.__)("Back to Home","woocommerce")))),(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-content"},(0,o.createElement)("h1",{className:"woocommerce-launch-store__congrats-heading"},(0,w.__)("Congratulations! Your store is now live","woocommerce")),(0,o.createElement)("h2",{className:"woocommerce-launch-store__congrats-subheading"},(0,w.__)("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"},l),(0,o.createElement)("div",{className:"buttons-container"},(0,o.createElement)(S.Button,{className:"",variant:"secondary",ref:L,onClick:()=>{(0,E.recordEvent)("launch_your_store_congrats_copy_store_link_click")}},b),(0,o.createElement)(S.Button,{className:"",variant:"primary",onClick:()=>{(0,E.recordEvent)("launch_your_store_congrats_preview_store_click"),window.open(c,"_blank")}},(0,w.__)("Visit your store","woocommerce")))),m&&(0,o.createElement)("hr",{className:"separator"}),m&&(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-survey"},k?(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-thanks"},(0,o.createElement)("p",{className:"thanks-copy"},"🙌"," ",(0,w.__)("We appreciate your feedback!","woocommerce")),(0,o.createElement)(S.Button,{className:"close-button",label:(0,w.__)("Close","woocommerce"),icon:(0,o.createElement)(S.Icon,{icon:ee.Z,viewBox:"6 4 12 14"}),iconSize:14,size:24,onClick:()=>{f(!1),u(!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)(te.CustomerFeedbackSimple,{label:(0,w.__)("How was the experience of launching your store?","woocommerce"),onSelect:e=>_(e),selectedValue:d})),C&&(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,w.__)("Why do you feel that way? <smallText>(optional)</smallText>","woocommerce"),{smallText:(0,o.createElement)("span",{className:"small-text"})})),(0,o.createElement)(S.TextareaControl,{id:"launch-your-store-comment",value:p,onChange:e=>{h(e)}}),(0,o.createElement)("span",{className:"privacy-text"},(0,o.createInterpolateElement)((0,w.__)("Your feedback will be only be shared with WooCommerce and treated in accordance with our <privacyLink>privacy policy</privacyLink>.","woocommerce"),{privacyLink:(0,o.createElement)(V.Link,{href:"https://automattic.com/privacy/",type:"external",target:"_blank"},(0,o.createElement)(o.Fragment,null))})))),C&&!k&&(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-section_2"},(0,o.createElement)("div",{className:"woocommerce-launch-store__congrats-buttons"},(0,o.createElement)(S.Button,{className:"",variant:"tertiary",onClick:()=>{_(null)}},(0,w.__)("Cancel","woocommerce")),(0,o.createElement)(S.Button,{className:"",variant:"primary",onClick:()=>{(0,E.recordEvent)(t?"launch_your_store_congrats_survey_click":"launch_your_store_on_core_congrats_survey_click"),(()=>{const e=d?{1:"very_difficult",2:"difficult",3:"neutral",4:"good",5:"very_good"}[d]:"none";(0,E.recordEvent)("launch_your_store_congrats_survey_complete",{emoji:e,feedback:p}),f(!0),a()})()}},(0,w.__)("Send","woocommerce")))))),n))},ne={congratsScreen:({context:e})=>((0,y.dispatch)(v.OPTIONS_STORE_NAME).updateOptions({woocommerce_admin_launch_your_store_survey_completed:"yes"}),{...e.congratsScreen,hasCompleteSurvey:!0})},se=({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,w.__)("Promote your products","woocommerce"),description:(0,w.__)("Grow your customer base by promoting your products to millions of engaged shoppers.","woocommerce"),link:`${j.SX}admin.php?page=wc-admin&task=marketing`,linkText:(0,w.__)("Promote products","woocommerce"),trackEvent:"launch_you_store_congrats_marketing_click"},u={title:(0,w.__)("Provide more ways to pay","woocommerce"),description:(0,w.__)("Give your shoppers more ways to pay by adding additional payment methods to your store.","woocommerce"),link:`${j.SX}admin.php?page=wc-admin&task=payments`,linkText:(0,w.__)("Add payment methods","woocommerce"),trackEvent:"launch_you_store_congrats_payments_click"},d={title:(0,w.__)("Build customer relationships","woocommerce"),description:(0,w.__)("Keep your shoppers up to date with what's new in your store and set up clever post-purchase automations.","woocommerce"),link:l?`${j.SX}admin.php?page=mailchimp-woocommerce`:"https://woo.com/products/mailchimp-for-woocommerce/?utm_source=launch_your_store&utm_medium=product",linkText:l?(0,w.__)("Manage Mailchimp","woocommerce"):(0,w.__)("Install Mailchimp","woocommerce"),trackEvent:"launch_you_store_congrats_mailchimp_click"},_={title:(0,w.__)("Power up your store","woocommerce"),description:(0,w.__)("Add extra features and functionality to your store with Woo extensions.","woocommerce"),link:`${j.SX}admin.php?page=wc-admin&path=%2Fextensions`,linkText:(0,w.__)("Add extensions","woocommerce"),trackEvent:"launch_you_store_congrats_extensions_click"},p={title:(0,w.__)("Manage your store on the go","woocommerce"),description:(0,w.__)("Manage your store anywhere with the free WooCommerce Mobile App.","woocommerce"),link:`${j.SX}admin.php?page=wc-admin&mobileAppModal=true`,linkText:(0,w.__)("Get the app","woocommerce"),trackEvent:"launch_you_store_congrats_mobile_app_click"},h={title:(0,w.__)("Help is on hand","woocommerce"),description:(0,w.__)("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,w.__)("Explore support resources","woocommerce"),trackEvent:"launch_you_store_congrats_external_documentation_click"};return o(m,!r),o(u,!c),o(_,!0),o(p,i),o(d,!0),o(h,!0),o(u,!0),o(_,!0),o(h,!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)(S.Button,{variant:"link",href:e.link,target:-1===e.link.indexOf(j.SX)?"_blank":"_self",onClick:()=>{(0,E.recordEvent)(e.trackEvent)}},e.linkText))))))};var re=a(42819);const ce=(0,d.E9)((({sendBack:e})=>Z("content",e))),ie=(0,_.cY)({types:{},actions:{updateQueryParams:(e,t)=>{Y(t)}},guards:{hasContentLocation:(e,{contentLocation:t})=>{const{content:a}=(0,g.getQuery)();return!!a&&a===t}},actors:{contentQueryParamListener:ce,fetchCongratsData:Q}}).createMachine({id:"mainContent",initial:"navigate",context:{congratsScreen:{hasLoadedCongratsData:!1,hasCompleteSurvey:!1,allTasklists:[],activePlugins:[]}},invoke:{id:"contentQueryParamListener",src:"contentQueryParamListener"},states:{navigate:{always:[{guard:{type:"hasContentLocation",params:{contentLocation:"site-preview"}}},{guard:{type:"hasContentLocation",params:{contentLocation:"launch-store-success"}},target:"launchStoreSuccess"},{target:"#sitePreview"}]},sitePreview:{id:"sitePreview",meta:{component:e=>{const t=(0,j.O3)("siteUrl")+"?site-preview=1",[a,n]=(0,o.useState)(!0),s=(0,o.useRef)(null),[r,c]=(0,X.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:i()("launch-store-site-preview-page__container",{"is-loading":a},e.className)},r,!!c.width&&(0,o.createElement)(S.__unstableMotion.div,{initial:!1,layout:"position",className:"launch-store-preview-layout__canvas"},(0,o.createElement)(J.Z,{isReady:!a,isHandleVisibleByDefault:!1,isFullWidth:!1,defaultSize:{width:c.width-24,height:c.height},isOversized:l,setIsOversized:m,innerContentStyle:{}},a&&(0,o.createElement)("div",{className:"launch-store-site-preview-site__loading-overlay"},(0,o.createElement)(V.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",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})})}}],entry:[{type:"updateQueryParams",params:{content:"launch-store-success"}}],meta:{component:e=>e.context.congratsScreen.hasLoadedCongratsData?(0,o.createElement)("div",{className:i()("launch-store-success-page__container",e.className)},(0,o.createElement)(oe,{hasCompleteSurvey:e.context.congratsScreen.hasCompleteSurvey,isWooExpress:(0,re.V)(),completeSurvey:()=>{e.sendEventToMainContent({type:"COMPLETE_SURVEY"})}},(0,o.createElement)("h2",{className:"woocommerce-launch-store__congrats-main-actions-title"},(0,w.__)("What's next?","woocommerce")),(0,o.createElement)(se,{activePlugins:e.context.congratsScreen.activePlugins,allTasklists:e.context.congratsScreen.allTasklists}))):(0,o.createElement)("div",{className:"spinner-container"},(0,o.createElement)(V.Spinner,null))},on:{COMPLETE_SURVEY:{actions:(0,p.a)(ne)}}},loading:{id:"loading",meta:{component:e=>(0,o.createElement)("div",{className:i()("launch-store-loading-page__container",e.className)},(0,o.createElement)("p",null,"Main Content - Loading page"),(0,o.createElement)("button",{onClick:()=>{e.sendEventToSidebar({type:"LAUNCH_STORE_SUCCESS"})}},"Launch Store Success"))}}},on:{EXTERNAL_URL_UPDATE:{target:".navigate"},SHOW_LAUNCH_STORE_SUCCESS:{target:"#launchStoreSuccess"},SHOW_LOADING:{target:"#loading"}}}),le=({children:e})=>(0,o.createElement)("div",{className:"launch-your-store-layout__content"},e);var me=a(11808);const ue=()=>{(0,l.p0)(["woocommerce-launch-your-store"]);const{xstateV5Inspector:e}=(0,me.r)("V5"),[t,a,s]=(0,n.eO)(ie,{inspect:e}),[r,c,m]=(0,n.eO)(G,{inspect:e,input:{mainContentMachineRef:s}}),d=!r.hasTag("fullscreen"),[_]=u(m),[p]=u(s);return(0,o.createElement)("div",{className:"launch-your-store-layout__container"},(0,o.createElement)(K,{className:i()({"is-sidebar-hidden":!d})},_&&(0,o.createElement)(_,{sendEventToSidebar:c,sendEventToMainContent:a,context:r.context})),(0,o.createElement)(le,null,p&&(0,o.createElement)(p,{sendEventToSidebar:c,sendEventToMainContent:a,context:t.context})))}},90556:(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})}}]);