text: (window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[47],{281:function(e,t,o){"use strict";var s=o(0),n=o(8),r=Object(s.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(s.createElement)(n.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=r},282:function(e,t,o){"use strict";var s=o(0),n=o(8),r=Object(s.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(s.createElement)(n.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=r},479:function(e,t,o){"use strict";var s=o(0),n=o(8),r=Object(s.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(s.createElement)(n.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));t.a=r},506:function(e,t,o){"use strict";o.d(t,"b",(function(){return l})),o.d(t,"a",(function(){return m}));var s=o(0),n=o(28),r=o(91),c=o.n(r),i=o(22);const a=c()(i.a),l=e=>{const t=a.getCurrencyConfig(),o=Object(n.applyFilters)("woocommerce_admin_report_currency",t,e);return c()(o)},m=Object(s.createContext)(a)},510:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var s=o(7);function n(e){const{createNotice:t}=Object(s.dispatch)("core/notices");e.error_data&&e.errors&&Object.keys(e.errors).length?Object.keys(e.errors).forEach(o=>{t("error",e.errors[o].join(" "))}):e.message&&t(e.code?"error":"success",e.message)}},514:function(e,t,o){"use strict";var s=o(56);const n=["a","b","em","i","strong","p","br"],r=["target","href","rel","name","download"];t.a=e=>({__html:Object(s.sanitize)(e,{ALLOWED_TAGS:n,ALLOWED_ATTR:r})})},518:function(e,t,o){"use strict";function s(e){return(e||"").split(":",1)[0]}function n(e){const t=s(e);return/^woocommerce(-|_)payments$/.test(t)?"wcpay":(""+t.replace(/-/g,"_")).split(":",1)[0]}function r(e){return e?e.substr(1).split("&").reduce((e,t)=>{const o=t.split("="),s=o[0];let n=decodeURIComponent(o[1]);return n=isNaN(Number(n))?n:Number(n),e[s]=n,e},{}):{}}function c(){let e="";const{page:t,path:o,post_type:s}=r(window.location.search);if(t){const s="wc-admin"===t?"home_screen":t;e=o?o.replace(/\//g,"_").substring(1):s}else s&&(e=s);return e}o.d(t,"a",(function(){return s})),o.d(t,"b",(function(){return n})),o.d(t,"d",(function(){return r})),o.d(t,"c",(function(){return c}))},520:function(e,t,o){"use strict";var s=o(0),n=o(2),r=o(13),c=o(7),i=o(19),a=o.n(i),l=o(3),m=o(21),d=o(11),u=o(123);class p extends s.Component{constructor(e){super(e),this.state={isLoadingScripts:!1,isRequestStarted:!1}}async componentDidUpdate(e,t){const{hasErrors:o,isRequesting:s,onClose:r,onContinue:c,createNotice:i}=this.props,{isLoadingScripts:a,isRequestStarted:l}=this.state;if(!l)return;const m=!s&&!a&&(e.isRequesting||t.isLoadingScripts)&&!o,d=!s&&e.isRequesting&&o;m&&(r(),c()),d&&(i("error",Object(n.__)("There was a problem updating your preferences",'woocommerce')),r())}updateTracking({allowTracking:e}){const{updateOptions:t}=this.props;e&&"function"==typeof window.wcTracks.enable?(this.setState({isLoadingScripts:!0}),window.wcTracks.enable(()=>{this._isMounted&&(Object(u.initializeExPlat)(),this.setState({isLoadingScripts:!1}))})):e||(window.wcTracks.isEnabled=!1);const o=e?"yes":"no";this.setState({isRequestStarted:!0}),t({woocommerce_allow_tracking:o})}componentDidMount(){this._isMounted=!0}componentWillUnmount(){this._isMounted=!1}render(){const{allowTracking:e,isResolving:t,onClose:o,onContinue:r}=this.props;if(t)return null;if(e)return o(),r(),null;const{isRequesting:c,title:i=Object(n.__)("Build a better WooCommerce",'woocommerce'),message:d=a()({mixedString:Object(n.__)("Get improved features and faster fixes by sharing non-sensitive data via {{link}}usage tracking{{/link}} that shows us how WooCommerce is used. No personal data is tracked or stored.",'woocommerce'),components:{link:Object(s.createElement)(m.Link,{href:"https://woocommerce.com/usage-tracking?utm_medium=product",target:"_blank",type:"external"})}}),dismissActionText:u=Object(n.__)("No thanks",'woocommerce'),acceptActionText:p=Object(n.__)("Yes, count me in!",'woocommerce')}=this.props,{isRequestStarted:b}=this.state,h=b&&c;return Object(s.createElement)(l.Modal,{title:i,isDismissible:this.props.isDismissible,onRequestClose:()=>this.props.onClose(),className:"woocommerce-usage-modal"},Object(s.createElement)("div",{className:"woocommerce-usage-modal__wrapper"},Object(s.createElement)("div",{className:"woocommerce-usage-modal__message"},d),Object(s.createElement)("div",{className:"woocommerce-usage-modal__actions"},Object(s.createElement)(l.Button,{isSecondary:!0,isBusy:h,onClick:()=>this.updateTracking({allowTracking:!1})},u),Object(s.createElement)(l.Button,{isPrimary:!0,isBusy:h,onClick:()=>this.updateTracking({allowTracking:!0})},p))))}}t.a=Object(r.compose)(Object(c.withSelect)(e=>{const{getOption:t,getOptionsUpdatingError:o,isOptionsUpdating:s,hasFinishedResolution:n}=e(d.OPTIONS_STORE_NAME);return{allowTracking:"yes"===t("woocommerce_allow_tracking"),isRequesting:Boolean(s()),isResolving:!n("getOption",["woocommerce_allow_tracking"])||void 0===t("woocommerce_allow_tracking"),hasErrors:Boolean(o())}}),Object(c.withDispatch)(e=>{const{createNotice:t}=e("core/notices"),{updateOptions:o}=e(d.OPTIONS_STORE_NAME);return{createNotice:t,updateOptions:o}}))(p)},533:function(e,t,o){"use strict";o.d(t,"b",(function(){return O})),o.d(t,"a",(function(){return w}));var s=o(37),n=o.n(s),r=o(0),c=o(2),i=o(11),a=o(30),l=o(4),m=o(21),d=o(3),u=o(7),p=o(22);const{countries:b}=Object(p.d)("dataEndpoints",{countries:{}}),h=["addressLine1","addressLine2","city","countryState","postCode"];function _(e,t={}){var o,s;return null!==(o=t[e])&&void 0!==o&&o.hasOwnProperty("required")?null===(s=t[e])||void 0===s?void 0:s.required:"address_2"!==e}function O(e={}){return t=>{const o={};return _("address_1",e)&&!t.addressLine1.trim().length&&(o.addressLine1=Object(c.__)("Please add an address",'woocommerce')),t.countryState.trim().length||(o.countryState=Object(c.__)("Please select a country / region",'woocommerce')),_("city",e)&&!t.city.trim().length&&(o.city=Object(c.__)("Please add a city",'woocommerce')),_("postcode",e)&&!t.postCode.trim().length&&(o.postCode=Object(c.__)("Please add a post code",'woocommerce')),o}}const g=e=>e.replace(/\s/g,"").toLowerCase(),j=(e,t)=>o=>{const s=e?o.key.split(":"):o.label.split("—");if(s.length<=1)return!1;const n=s[1];if(n.includes("/")){const e=n.split("/");return g(e[0])===t||g(e[1])===t}if(n.includes("(")&&n.includes(")")){const e=n.replace(")","").split("(");return g(e[0])===t||g(e[1])===t}return g(n)===t};function w({getInputProps:e,setValue:t}){var o,s,p,O,w,f,C,v;const E=e("countryState").value,{locale:y,hasFinishedResolution:S}=Object(u.useSelect)(e=>({locale:e(i.COUNTRIES_STORE_NAME).getLocale(E),hasFinishedResolution:e(i.COUNTRIES_STORE_NAME).hasFinishedResolution("getLocales")})),N=Object(r.useMemo)(()=>b.reduce((e,t)=>{if(!t.states.length)return e.push({key:t.code,label:Object(a.decodeEntities)(t.name)}),e;const o=t.states.map(e=>({key:t.code+":"+e.code,label:Object(a.decodeEntities)(t.name)+" — "+Object(a.decodeEntities)(e.name)}));return e.push(...o),e},[]),[]),k=function(e,t,o){const[s,n]=Object(r.useState)(""),[c,i]=Object(r.useState)(""),a=Object(r.useRef)();return Object(r.useEffect)(()=>{if(!a.current){const o=e.find(e=>e.key===t),r=o?o.label.split(/\u2013|\u2014|\-/):[],a=(r[0]||"").trim(),l=(r[1]||"").trim();a===s&&l===c||(n(a),i(l))}a.current=!1},[t,e]),Object(r.useEffect)(()=>{if(void 0===a.current)return;if(!s&&!c&&t)return a.current=!0,void o("countryState","");const n=new RegExp(Object(l.escapeRegExp)(s),"i"),r=s.length<3,i=c.length<3&&!!c.match(/^[\w]+$/);let m=[];s.length&&c.length?(m=e.filter(e=>n.test(r?e.key:e.label)),m.length||(m=[...e]),m.length>1&&(m=m.filter(j(i,g(c))))):s.length?m=e.filter(e=>n.test(r?e.key:e.label)):c.length&&(m=e.filter(j(i,g(c)))),1===m.length&&t!==m[0].key&&(a.current=!0,o("countryState",m[0].key))},[s,c,e,o]),Object(r.createElement)(r.Fragment,null,Object(r.createElement)("input",{onChange:e=>n(e.target.value),value:s,name:"country",type:"text",className:"woocommerce-select-control__autofill-input",tabIndex:-1,autoComplete:"country"}),Object(r.createElement)("input",{onChange:e=>i(e.target.value),value:c,name:"state",type:"text",className:"woocommerce-select-control__autofill-input",tabIndex:-1,autoComplete:"address-level1"}))}(N,E,t);return Object(r.useEffect)(()=>{y&&h.forEach(o=>{var s,n;const r=o.replace(/(address)Line([0-9])/,"$1$2").toLowerCase(),c=e(o);null!==(s=y[r])&&void 0!==s&&s.hidden&&(null===(n=c.value)||void 0===n?void 0:n.length)>0&&t(o,"")})},[E,y]),S?Object(r.createElement)("div",{className:"woocommerce-store-address-fields"},!(null!=y&&null!==(o=y.address_1)&&void 0!==o&&o.hidden)&&Object(r.createElement)(m.TextControl,n()({label:(null==y||null===(s=y.address_1)||void 0===s?void 0:s.label)||Object(c.__)("Address line 1",'woocommerce'),required:_("address_1",y),autoComplete:"address-line1"},e("addressLine1"))),!(null!=y&&null!==(p=y.address_2)&&void 0!==p&&p.hidden)&&Object(r.createElement)(m.TextControl,n()({label:(null==y||null===(O=y.address_2)||void 0===O?void 0:O.label)||Object(c.__)("Address line 2 (optional)",'woocommerce'),required:_("address_2",y),autoComplete:"address-line2"},e("addressLine2"))),Object(r.createElement)(m.SelectControl,n()({label:Object(c.__)("Country / Region",'woocommerce'),required:!0,autoComplete:"new-password",options:N,excludeSelectedOptions:!1,showAllOnFocus:!0,isSearchable:!0},e("countryState"),{controlClassName:e("countryState").className}),k),!(null!=y&&null!==(w=y.city)&&void 0!==w&&w.hidden)&&Object(r.createElement)(m.TextControl,n()({label:(null==y||null===(f=y.city)||void 0===f?void 0:f.label)||Object(c.__)("City",'woocommerce'),required:_("city",y)},e("city"),{autoComplete:"address-level2"})),!(null!=y&&null!==(C=y.postcode)&&void 0!==C&&C.hidden)&&Object(r.createElement)(m.TextControl,n()({label:(null==y||null===(v=y.postcode)||void 0===v?void 0:v.label)||Object(c.__)("Post code",'woocommerce'),required:_("postcode",y),autoComplete:"postal-code"},e("postCode")))):Object(r.createElement)(d.Spinner,null)}},590:function(e,t,o){},591:function(e,t,o){},592:function(e,t,o){},593:function(e,t,o){},594:function(e,t,o){},595:function(e,t,o){"use strict";var s=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var s in t=arguments[o])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,o=e.size,n=void 0===o?24:o,r=e.onClick,i=(e.icon,e.className),a=function(e,t){var o={};for(var s in e)0<=t.indexOf(s)||Object.prototype.hasOwnProperty.call(e,s)&&(o[s]=e[s]);return o}(e,["size","onClick","icon","className"]),l=["gridicon","gridicons-info",i,(t=n,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return c.default.createElement("svg",s({className:l,height:n,width:n,onClick:r},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),c.default.createElement("g",null,c.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})))};var n,r=o(5),c=(n=r)&&n.__esModule?n:{default:n};e.exports=t.default},596:function(e,t,o){},597:function(e,t,o){"use strict";var s=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var s in t=arguments[o])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,o=void 0===t?24:t,n=e.onClick,r=(e.icon,e.className),i=function(e,t){var o={};for(var s in e)0<=t.indexOf(s)||Object.prototype.hasOwnProperty.call(e,s)&&(o[s]=e[s]);return o}(e,["size","onClick","icon","className"]),a=["gridicon","gridicons-cloud-upload",r,!1,!1,!1].filter(Boolean).join(" ");return c.default.createElement("svg",s({className:a,height:o,width:o,onClick:n},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),c.default.createElement("g",null,c.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-5 4v3h-2v-3H8l4-5 4 5h-3z"})))};var n,r=o(5),c=(n=r)&&n.__esModule?n:{default:n};e.exports=t.default},598:function(e,t,o){"use strict";var s=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var s in t=arguments[o])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,o=void 0===t?24:t,n=e.onClick,r=(e.icon,e.className),i=function(e,t){var o={};for(var s in e)0<=t.indexOf(s)||Object.prototype.hasOwnProperty.call(e,s)&&(o[s]=e[s]);return o}(e,["size","onClick","icon","className"]),a=["gridicon","gridicons-phone",r,!1,!1,!1].filter(Boolean).join(" ");return c.default.createElement("svg",s({className:a,height:o,width:o,onClick:n},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),c.default.createElement("g",null,c.default.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"})))};var n,r=o(5),c=(n=r)&&n.__esModule?n:{default:n};e.exports=t.default},599:function(e,t,o){"use strict";var s=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var s in t=arguments[o])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,o=void 0===t?24:t,n=e.onClick,r=(e.icon,e.className),i=function(e,t){var o={};for(var s in e)0<=t.indexOf(s)||Object.prototype.hasOwnProperty.call(e,s)&&(o[s]=e[s]);return o}(e,["size","onClick","icon","className"]),a=["gridicon","gridicons-tablet",r,!1,!1,!1].filter(Boolean).join(" ");return c.default.createElement("svg",s({className:a,height:o,width:o,onClick:n},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),c.default.createElement("g",null,c.default.createElement("path",{d:"M18 2H6c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h12c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-5 19h-2v-1h2v1zm5-2H6V5h12v14z"})))};var n,r=o(5),c=(n=r)&&n.__esModule?n:{default:n};e.exports=t.default},600:function(e,t,o){"use strict";var s=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var s in t=arguments[o])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,o=void 0===t?24:t,n=e.onClick,r=(e.icon,e.className),i=function(e,t){var o={};for(var s in e)0<=t.indexOf(s)||Object.prototype.hasOwnProperty.call(e,s)&&(o[s]=e[s]);return o}(e,["size","onClick","icon","className"]),a=["gridicon","gridicons-computer",r,!1,!1,!1].filter(Boolean).join(" ");return c.default.createElement("svg",s({className:a,height:o,width:o,onClick:n},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),c.default.createElement("g",null,c.default.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"})))};var n,r=o(5),c=(n=r)&&n.__esModule?n:{default:n};e.exports=t.default},601:function(e,t,o){},624:function(e,t,o){"use strict";o.r(t);var s=o(0);t.default=({})=>Object(s.createElement)("div",null,"Settings page")},630:function(e,t,o){"use strict";o.r(t);var s=o(0),n=o(2),r=o(28),c=o(13),i=o(4),a=o(7),l=o(12),m=o(11),d=o(16),u=o(14),p=o(37),b=o.n(p),h=o(21),_=o(3),O=o(6),g=o.n(O),j=o(506),w=o(510);const f=[{key:"shopify",label:Object(n.__)("Shopify",'woocommerce')},{key:"bigcommerce",label:Object(n.__)("BigCommerce",'woocommerce')},{key:"magento",label:Object(n.__)("Magento",'woocommerce')},{key:"wix",label:Object(n.__)("Wix",'woocommerce')},{key:"amazon",label:Object(n.__)("Amazon",'woocommerce')},{key:"ebay",label:Object(n.__)("eBay",'woocommerce')},{key:"etsy",label:Object(n.__)("Etsy",'woocommerce')},{key:"squarespace",label:Object(n.__)("Squarespace",'woocommerce')},{key:"other",label:Object(n.__)("Other",'woocommerce')}],C=[{key:"1",label:Object(n.__)("It's just me",'woocommerce')},{key:"<10",label:Object(n.__)("< 10",'woocommerce')},{key:"10-50",label:"10 - 50"},{key:"50-250",label:"50 - 250"},{key:"+250",label:Object(n.__)("+250",'woocommerce')},{key:"not specified",label:Object(n.__)("I'd rather not say",'woocommerce')}],v=[{key:"no",label:Object(n.__)("No",'woocommerce')},{key:"other",label:Object(n.__)("Yes, on another platform",'woocommerce')},{key:"other-woocommerce",label:Object(n.__)("Yes, I own a different store powered by WooCommerce",'woocommerce')},{key:"brick-mortar",label:Object(n.__)("Yes, in person at physical stores and/or events",'woocommerce')},{key:"brick-mortar-other",label:Object(n.__)("Yes, on another platform and in person at physical stores and/or events",'woocommerce')}];var E=o(65),y=o(122);const S=(e,t)=>Object(y.formatValue)(e,"number",t),N=(e,t,o=!1,s=S)=>o?Object(n.sprintf)(Object(n._x)("%1$s - %2$s","store product count or revenue range",'woocommerce'),s(e,t),s(e,o)):Object(n.sprintf)(Object(n._x)("%s+","store product count or revenue",'woocommerce'),s(e,t)),k={US:1,EU:.9,IN:71.24,GB:.76,BR:4.19,VN:23172.5,ID:14031,BD:84.87,PK:154.8,RU:63.74,TR:5.75,MX:19.37,CA:1.32},T=(e,t)=>{const o=Object(E.c)(t);if("US"===o)return e;const s=k[o]||k.US,n=s.toString().split(".")[0].length,r=Math.pow(10,2+n);return Math.round(e*s/r)*r},x=(e,t,o)=>[{key:"none",label:Object(n.sprintf)(Object(n.__)("%s (I'm just getting started)",'woocommerce'),o(0))},{key:"up-to-2500",label:Object(n.sprintf)(Object(n.__)("Up to %s",'woocommerce'),o(T(2500,t)))},{key:"2500-10000",label:N(e,T(2500,t),T(1e4,t),(e,t)=>o(t))},{key:"10000-50000",label:N(e,T(1e4,t),T(5e4,t),(e,t)=>o(t))},{key:"50000-250000",label:N(e,T(5e4,t),T(25e4,t),(e,t)=>o(t))},{key:"more-than-250000",label:Object(n.sprintf)(Object(n.__)("More than %s",'woocommerce'),o(T(25e4,t)))},{key:"rather-not-say",label:Object(n.__)("I'd rather not say",'woocommerce')}];var P=o(17),I=o(118),M=o(281),R=o(282),A=o(19),B=o.n(A);const L=()=>Object(s.createElement)("svg",{width:"200",height:"148",viewBox:"0 0 200 148",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(s.createElement)("g",{clipPath:"url(#clip0)"},Object(s.createElement)("path",{d:"M197.563 2.53875e-09H62.909C62.3961 0.000450584 61.9043 0.205742 61.5416 0.570805C61.179 0.935868 60.975 1.43087 60.9746 1.94714V50.9404H93.5623C94.4445 50.9415 95.2902 51.2947 95.9141 51.9226C96.5379 52.5505 96.8888 53.4019 96.8899 54.2899V95.7402H197.563C197.843 95.7402 198.119 95.6791 198.373 95.5612C198.627 95.4432 198.853 95.2712 199.034 95.0569C199.05 95.0402 199.064 95.0222 199.076 95.0033C199.192 94.8612 199.285 94.7024 199.354 94.5322C199.451 94.2981 199.501 94.0468 199.5 93.7931V1.94714C199.499 1.43051 199.295 0.935241 198.932 0.57014C198.569 0.20504 198.077 -2.63458e-05 197.563 2.53875e-09Z",fill:"#F2F2F2"}),Object(s.createElement)("path",{d:"M199.222 7.80469H61.25V8.36132H199.222V7.80469Z",fill:"#CCCCCC"}),Object(s.createElement)("path",{d:"M65.95 5.84371C66.8662 5.84371 67.609 5.09607 67.609 4.17381C67.609 3.25155 66.8662 2.50391 65.95 2.50391C65.0338 2.50391 64.291 3.25155 64.291 4.17381C64.291 5.09607 65.0338 5.84371 65.95 5.84371Z",fill:"#CCCCCC"}),Object(s.createElement)("path",{d:"M70.72 5.84371C71.6363 5.84371 72.379 5.09607 72.379 4.17381C72.379 3.25155 71.6363 2.50391 70.72 2.50391C69.8038 2.50391 69.061 3.25155 69.061 4.17381C69.061 5.09607 69.8038 5.84371 70.72 5.84371Z",fill:"#CCCCCC"}),Object(s.createElement)("path",{d:"M75.4896 5.84371C76.4058 5.84371 77.1486 5.09607 77.1486 4.17381C77.1486 3.25155 76.4058 2.50391 75.4896 2.50391C74.5733 2.50391 73.8306 3.25155 73.8306 4.17381C73.8306 5.09607 74.5733 5.84371 75.4896 5.84371Z",fill:"#CCCCCC"}),Object(s.createElement)("path",{d:"M164.842 19.957H95.6295C94.8646 19.957 94.1311 20.2629 93.5903 20.8073C93.0494 21.3516 92.7456 22.09 92.7456 22.8599C92.7456 23.6298 93.0494 24.3681 93.5903 24.9125C94.1311 25.4569 94.8646 25.7627 95.6295 25.7627H164.842C165.607 25.7627 166.341 25.4569 166.882 24.9125C167.422 24.3681 167.726 23.6298 167.726 22.8599C167.726 22.09 167.422 21.3516 166.882 20.8073C166.341 20.2629 165.607 19.957 164.842 19.957ZM164.842 25.3161H95.6295C94.9823 25.3161 94.3616 25.0573 93.904 24.5967C93.4464 24.1361 93.1893 23.5113 93.1893 22.8599C93.1893 22.2084 93.4464 21.5837 93.904 21.123C94.3616 20.6624 94.9823 20.4036 95.6295 20.4036H164.842C165.489 20.4036 166.11 20.6624 166.568 21.123C167.025 21.5837 167.283 22.2084 167.283 22.8599C167.283 23.5113 167.025 24.1361 166.568 24.5967C166.11 25.0573 165.489 25.3161 164.842 25.3161Z",fill:"#CCCCCC"}),Object(s.createElement)("path",{d:"M186.022 43.0859H116.809C116.044 43.0859 115.31 43.3918 114.769 43.9362C114.229 44.4806 113.925 45.2189 113.925 45.9888C113.925 46.7587 114.229 47.497 114.769 48.0414C115.31 48.5858 116.044 48.8916 116.809 48.8916H186.022C186.786 48.8916 187.52 48.5858 188.061 48.0414C188.602 47.497 188.905 46.7587 188.905 45.9888C188.905 45.2189 188.602 44.4806 188.061 43.9362C187.52 43.3918 186.786 43.0859 186.022 43.0859Z",fill:"white"}),Object(s.createElement)("path",{d:"M186.022 53.8047H116.809C116.044 53.8047 115.31 54.1105 114.769 54.6549C114.229 55.1993 113.925 55.9376 113.925 56.7075C113.925 57.4774 114.229 58.2158 114.769 58.7601C115.31 59.3045 116.044 59.6104 116.809 59.6104H186.022C186.786 59.6104 187.52 59.3045 188.061 58.7601C188.602 58.2158 188.905 57.4774 188.905 56.7075C188.905 55.9376 188.602 55.1993 188.061 54.6549C187.52 54.1105 186.786 53.8047 186.022 53.8047Z",fill:"white"}),Object(s.createElement)("path",{d:"M186.022 64.5195H116.809C116.044 64.5195 115.31 64.8254 114.769 65.3698C114.229 65.9141 113.925 66.6525 113.925 67.4224C113.925 68.1923 114.229 68.9306 114.769 69.475C115.31 70.0194 116.044 70.3252 116.809 70.3252H186.022C186.786 70.3252 187.52 70.0194 188.061 69.475C188.602 68.9306 188.905 68.1923 188.905 67.4224C188.905 66.6525 188.602 65.9141 188.061 65.3698C187.52 64.8254 186.786 64.5195 186.022 64.5195Z",fill:"white"}),Object(s.createElement)("path",{d:"M105.623 38.2852H74.1183C73.4425 38.286 72.7947 38.5565 72.3168 39.0375C71.839 39.5185 71.5702 40.1706 71.5693 40.8508V50.9416H72.013V40.8508C72.0139 40.2891 72.2359 39.7506 72.6306 39.3533C73.0252 38.9561 73.5602 38.7326 74.1183 38.7317H105.623C106.182 38.7322 106.717 38.9556 107.112 39.3529C107.506 39.7502 107.728 40.289 107.729 40.8508V72.5633C107.728 73.1251 107.506 73.6638 107.112 74.0611C106.717 74.4585 106.182 74.6819 105.623 74.6824H96.8897V75.1289H105.623C106.299 75.1285 106.947 74.858 107.425 74.377C107.903 73.8959 108.172 73.2436 108.172 72.5633V40.8508C108.172 40.1705 107.903 39.5182 107.425 39.0371C106.947 38.556 106.299 38.2856 105.623 38.2852Z",fill:"#CCCCCC"}),Object(s.createElement)("path",{d:"M23.9309 70.9116C23.8195 70.9162 19.0705 70.5847 18.9492 70.5806L19.3758 66.294L22.0808 66.212L27.2495 56.5756C26.5327 55.1996 27.4148 53.3739 28.9355 53.0925C32 52.3914 33.0526 57.2443 29.9789 57.8901L25.7036 69.6652C25.5695 70.03 25.3278 70.3449 25.011 70.5676C24.6942 70.7904 24.3174 70.9104 23.9309 70.9116Z",fill:"#FFB8B8"}),Object(s.createElement)("path",{d:"M11.4107 73.118C6.89154 73.1291 6.49482 66.2544 11.024 65.7699C23.0006 65.0415 21.485 62.0137 22.3945 70.9448C22.4224 71.2097 22.3448 71.475 22.1787 71.6824C22.0126 71.8898 21.7715 72.0223 21.5084 72.051L11.803 73.0968C11.6727 73.1109 11.5417 73.1179 11.4107 73.118Z",className:"fill-theme-color"}),Object(s.createElement)("path",{d:"M10.3793 51.3852C16.605 54.9512 11.494 64.3601 5.15222 61.0097C-1.0733 57.4438 4.03771 48.0349 10.3793 51.3852Z",fill:"#FFB8B8"}),Object(s.createElement)("path",{d:"M16.0395 132.376L18.759 132.376L20.053 121.816L16.0391 121.817L16.0395 132.376Z",fill:"#FFB8B8"}),Object(s.createElement)("path",{d:"M15.4567 134.915L24.0042 134.915C23.9716 130.476 18.2546 131.755 15.4565 131.591L15.4567 134.915Z",fill:"#2F2E41"}),Object(s.createElement)("path",{d:"M4.28218 132.376L7.00167 132.376L8.29564 121.816L4.28174 121.817L4.28218 132.376Z",fill:"#FFB8B8"}),Object(s.createElement)("path",{d:"M3.69937 134.915L12.2469 134.915C12.2142 130.476 6.49728 131.755 3.69922 131.591L3.69937 134.915Z",fill:"#2F2E41"}),Object(s.createElement)("path",{d:"M7.37266 128.688C6.71536 128.507 3.14362 129.056 2.72209 128.335C1.24999 113.483 1.57722 98.9486 4.845 90.9619L16.0806 90.2695C18.5931 94.8863 24.3684 125.522 20.8847 127.385L16.4048 127.546C16.1493 127.554 15.8988 127.474 15.6952 127.318C15.4916 127.163 15.3475 126.941 15.2869 126.691L11.539 105.229C10.6057 103.916 8.77111 127.832 8.46815 127.742C8.42864 128.006 8.29626 128.247 8.09515 128.42C7.89404 128.594 7.63762 128.689 7.37266 128.688Z",fill:"#2F2E41"}),Object(s.createElement)("path",{d:"M4.48843 92.8373C-1.18427 86.8634 2.43414 70.8475 2.25101 71.1881C2.26655 70.7958 3.55141 64.7536 6.87506 63.762C9.51196 62.886 12.4305 65.5063 12.7906 68.1566L16.7406 91.6368C16.7611 91.7646 16.7514 91.8955 16.7123 92.0188C16.6733 92.1422 16.6059 92.2546 16.5158 92.3469C16.71 92.9556 4.76613 92.7153 4.48843 92.8373Z",className:"fill-theme-color"}),Object(s.createElement)("path",{d:"M6.32941 55.5845C6.82759 55.2675 7.07312 54.7238 7.36309 54.2285C8.89053 53.3522 10.6464 55.472 12.262 54.6809C16.8302 50.2665 12.1346 48.9642 7.92721 48.7314C6.9333 48.6081 6.08781 48.963 5.33637 49.5492C-3.06805 48.9031 0.962591 60.1519 6.26679 61.6376C7.2033 62.0505 7.90582 61.2148 7.07994 60.4551C5.93728 59.2493 4.52181 56.8221 6.32941 55.5845Z",fill:"#2F2E41"}),Object(s.createElement)("path",{d:"M93.5621 50.4922H32.779C31.7793 50.4936 30.8209 50.894 30.1139 51.6056C29.407 52.3172 29.0092 53.2819 29.0078 54.2882V131.548C29.0092 132.555 29.407 133.52 30.1139 134.231C30.8209 134.943 31.7793 135.343 32.779 135.345H93.5621C94.5619 135.343 95.5202 134.943 96.2272 134.231C96.9341 133.52 97.3319 132.555 97.3333 131.548V54.2882C97.3319 53.2819 96.9341 52.3172 96.2272 51.6056C95.5202 50.894 94.5619 50.4936 93.5621 50.4922ZM96.8896 131.548C96.8886 132.436 96.5376 133.288 95.9138 133.916C95.29 134.544 94.4443 134.897 93.5621 134.898H32.779C31.8968 134.897 31.0511 134.544 30.4273 133.916C29.8035 133.288 29.4526 132.436 29.4515 131.548V54.2882C29.4526 53.4002 29.8035 52.5489 30.4273 51.921C31.0511 51.2931 31.8968 50.9399 32.779 50.9388H93.5621C94.4443 50.9399 95.29 51.2931 95.9138 51.921C96.5376 52.5489 96.8886 53.4002 96.8896 54.2882V131.548Z",fill:"#3F3D56"}),Object(s.createElement)("path",{d:"M15.6527 83.0043C13.6494 83.2327 12.7698 78.5402 12.0039 77.3445L15.9936 75.7852L17.2918 78.1751L28.168 78.4472C28.2326 78.3591 28.3032 78.2755 28.3793 78.1971C30.5362 75.9238 34.0488 79.33 31.9 81.5984C31.663 81.8519 31.3752 82.0521 31.0557 82.1855C30.7362 82.319 30.3923 82.3828 30.0465 82.3727C29.7007 82.3627 29.361 82.2789 29.0497 82.1271C28.7384 81.9753 28.4626 81.7588 28.2405 81.4918C27.9719 81.5111 15.9153 83.0114 15.6527 83.0043Z",fill:"#FFB8B8"}),Object(s.createElement)("path",{d:"M12.6985 80.7664C12.0314 81.4133 6.91061 72.3318 6.5365 72.0751C3.94893 68.0267 10.0405 64.0298 12.6727 68.0562L17.9961 76.2911C18.1402 76.5145 18.1904 76.7864 18.1356 77.047C18.0808 77.3076 17.9255 77.5357 17.7039 77.6812C17.4613 77.7956 12.8697 81.0123 12.6985 80.7664Z",className:"fill-theme-color"}),Object(s.createElement)("path",{d:"M81.583 103.974H44.7583C40.9966 103.955 40.9809 98.1877 44.7584 98.168H81.583C85.3421 98.1857 85.3624 103.954 81.583 103.974Z",fill:"#CCCCCC"}),Object(s.createElement)("path",{d:"M81.583 114.692H44.7583C40.9966 114.674 40.9809 108.906 44.7584 108.887H81.583C85.3421 108.904 85.3624 114.673 81.583 114.692Z",fill:"#CCCCCC"}),Object(s.createElement)("path",{d:"M81.583 125.411H44.7583C40.9966 125.393 40.9809 119.625 44.7584 119.605H81.583C85.3421 119.623 85.3624 125.391 81.583 125.411Z",fill:"#CCCCCC"}),Object(s.createElement)("path",{d:"M95.3371 57.6387C94.1963 57.6387 93.0812 57.2982 92.1327 56.6603C91.1842 56.0223 90.4449 55.1156 90.0084 54.0548C89.5718 52.9939 89.4576 51.8266 89.6802 50.7004C89.9027 49.5742 90.452 48.5397 91.2587 47.7278C92.0653 46.9159 93.093 46.3629 94.2118 46.1389C95.3307 45.9149 96.4904 46.0299 97.5443 46.4693C98.5982 46.9087 99.499 47.6528 100.133 48.6076C100.767 49.5623 101.105 50.6848 101.105 51.833C101.103 53.3723 100.495 54.8479 99.4136 55.9363C98.3323 57.0247 96.8662 57.637 95.3371 57.6387Z",className:"fill-theme-color"}),Object(s.createElement)("path",{d:"M97.999 51.6121H95.5588V48.821C95.5588 48.7617 95.5355 48.7049 95.4939 48.6631C95.4523 48.6212 95.3958 48.5977 95.337 48.5977C95.2782 48.5977 95.2217 48.6212 95.1801 48.6631C95.1385 48.7049 95.1152 48.7617 95.1152 48.821V51.6121H92.675C92.6161 51.6121 92.5597 51.6357 92.5181 51.6775C92.4765 51.7194 92.4531 51.7762 92.4531 51.8354C92.4531 51.8947 92.4765 51.9515 92.5181 51.9933C92.5597 52.0352 92.6161 52.0587 92.675 52.0587H95.1152V54.8499C95.1152 54.9091 95.1385 54.9659 95.1801 55.0078C95.2217 55.0497 95.2782 55.0732 95.337 55.0732C95.3958 55.0732 95.4523 55.0497 95.4939 55.0078C95.5355 54.9659 95.5588 54.9091 95.5588 54.8499V52.0587H97.999C98.0579 52.0587 98.1143 52.0352 98.1559 51.9933C98.1975 51.9515 98.2209 51.8947 98.2209 51.8354C98.2209 51.7762 98.1975 51.7194 98.1559 51.6775C98.1143 51.6357 98.0579 51.6121 97.999 51.6121Z",fill:"white"}),Object(s.createElement)("path",{d:"M80.9177 91.2002H45.424C44.4535 91.1991 43.5232 90.8105 42.837 90.1198C42.1508 89.4291 41.7648 88.4926 41.7637 87.5158V67.5086C41.7648 66.5318 42.1508 65.5953 42.837 64.9046C43.5232 64.2139 44.4535 63.8253 45.424 63.8242H80.9177C81.8882 63.8253 82.8185 64.2139 83.5047 64.9046C84.1909 65.5953 84.5769 66.5318 84.578 67.5086V87.5158C84.5769 88.4926 84.1909 89.4291 83.5047 90.1198C82.8185 90.8105 81.8882 91.1991 80.9177 91.2002Z",className:"fill-theme-color"})),Object(s.createElement)("defs",null,Object(s.createElement)("clipPath",{id:"clip0"},Object(s.createElement)("rect",{width:"199",height:"148",fill:"white",transform:"translate(0.5)"}))));o(590);var F=o(514);const z=["obw/basics","obw/grow"],D=()=>Object(s.createElement)("div",{className:"woocommerce-admin__business-details__free-badge"},Object(n.__)("Free",'woocommerce')),V=({onChange:e,description:t,isChecked:o})=>Object(s.createElement)("div",{className:"woocommerce-admin__business-details__selective-extensions-bundle__extension"},Object(s.createElement)(_.CheckboxControl,{id:"woocommerce-business-extensions__checkbox",checked:o,onChange:e}),Object(s.createElement)("p",{className:"woocommerce-admin__business-details__selective-extensions-bundle__description",dangerouslySetInnerHTML:Object(F.a)(t),onClick:e=>{const t=e.target.closest("a");t&&e.currentTarget.contains(t)&&t.href.startsWith("https://woocommerce.com/products/")&&Object(d.recordEvent)("storeprofiler_store_business_features_link_click",{extension_name:t.href.split("https://woocommerce.com/products/")[1]})}}),Object(s.createElement)(D,null)),U=({isResolving:e,title:t,extensions:o,installExtensionOptions:n,onCheckboxChange:r})=>e?Object(s.createElement)("div",null,Object(s.createElement)(_.Spinner,null)):0===o.length?null:Object(s.createElement)("div",null,Object(s.createElement)("div",{className:"woocommerce-admin__business-details__selective-extensions-bundle__category"},t),o.map(({description:e,key:t})=>Object(s.createElement)(V,{key:t,description:e,isChecked:n[t],onChange:r(t)}))),H=({isInstallingActivating:e,onSubmit:t,country:o,productTypes:r,industry:c})=>{const[i,l]=Object(s.useState)(!1),[u,p]=Object(s.useState)({install_extensions:!0}),{freeExtensions:b,isResolving:O}=Object(a.useSelect)(e=>{const{getFreeExtensions:t,hasFinishedResolution:o}=e(m.ONBOARDING_STORE_NAME);return{freeExtensions:t(),isResolving:!o("getFreeExtensions")}}),{invalidateResolutionForStoreSelector:g}=Object(a.useDispatch)(m.ONBOARDING_STORE_NAME);Object(s.useEffect)(()=>{g("getFreeExtensions")},[o,c]);const j=Object(s.useMemo)(()=>b.filter(e=>(window.wcAdminFeatures&&window.wcAdminFeatures.subscriptions&&"US"===Object(E.b)(o)&&r.includes("subscriptions")&&(e.plugins=e.plugins.filter(e=>"woocommerce-payments"!==e.key||"woocommerce-payments"===e.key&&!e.is_activated)),z.includes(e.key))),[b,r,o]);Object(s.useEffect)(()=>{e||p(e=>(({installableExtensions:e,prevInstallExtensionOptions:t})=>e.reduce((e,o)=>({...e,...o.plugins.reduce((e,o)=>t.hasOwnProperty(o.key)?e:{...e,[o.key]:!0},{})}),t))({installableExtensions:j,prevInstallExtensionOptions:e}))},[j]);const w=e=>t=>{const o={...u,[e]:t},s=1===Object.entries(o).filter(([,e])=>e).length&&o.install_extensions;p(s?{...o,install_extensions:!1}:{...u,[e]:t,install_extensions:!0})};return Object(s.createElement)("div",{className:"woocommerce-profile-wizard__business-details__free-features"},Object(s.createElement)(_.Card,null,Object(s.createElement)("div",{className:"woocommerce-profile-wizard__business-details__free-features__illustration"},Object(s.createElement)(L,null)),Object(s.createElement)("div",{className:"woocommerce-admin__business-details__selective-extensions-bundle"},Object(s.createElement)("div",{className:"woocommerce-admin__business-details__selective-extensions-bundle__extension"},Object(s.createElement)(_.CheckboxControl,{checked:u.install_extensions,onChange:e=>{var t,o;p((t=u,o=e,Object.entries(t).reduce((e,[t])=>({...e,[t]:o}),{})))}}),Object(s.createElement)("p",{className:"woocommerce-admin__business-details__selective-extensions-bundle__description"},Object(n.__)("Add recommended business features to my site",'woocommerce')),Object(s.createElement)(_.Button,{className:"woocommerce-admin__business-details__selective-extensions-bundle__expand",disabled:!j||0===j.length,onClick:()=>{l(!i),i||Object(d.recordEvent)("storeprofiler_store_business_features_accordion_click")}},Object(s.createElement)(I.a,{icon:i?M.a:R.a}))),i&&j.map(({plugins:e,key:t,title:o})=>Object(s.createElement)(U,{key:t,title:o,extensions:e,installExtensionOptions:u,onCheckboxChange:w}))),Object(s.createElement)("div",{className:"woocommerce-profile-wizard__business-details__free-features__action"},Object(s.createElement)(_.Button,{onClick:()=>{t(u,j)},isBusy:e||O,disabled:e||O,isPrimary:!0},Object(n.__)("Continue",'woocommerce')))),((e,t)=>{const o=Object.keys(e).filter(t=>e[t]&&"install_extensions"!==t);if(0===o.length)return null;const r=o.reduce((e,t)=>{const o=m.pluginNames[t];return e.includes(o)?e:[...e,o]},[]).join(", ");if(t)return Object(s.createElement)("div",{className:"woocommerce-profile-wizard__footnote"},Object(s.createElement)(P.Text,{variant:"caption",as:"p",size:"12",lineHeight:"16px"},Object(n.sprintf)(Object(n._n)("Installing the following plugin: %s","Installing the following plugins: %s",o.length,'woocommerce'),r)));const c=o.includes("jetpack")||o.includes("woocommerce-shipping"),i=Object(n.__)("User accounts are required to use these features.",'woocommerce');return Object(s.createElement)("div",{className:"woocommerce-profile-wizard__footnote"},Object(s.createElement)(P.Text,{variant:"caption",as:"p",size:"12",lineHeight:"16px"},Object(n.sprintf)(Object(n._n)("The following plugin will be installed for free: %1$s. %2$s","The following plugins will be installed for free: %1$s. %2$s",o.length,'woocommerce'),r,i)),c&&Object(s.createElement)(P.Text,{variant:"caption",as:"p",size:"12",lineHeight:"16px"},B()({mixedString:Object(n.__)("By installing Jetpack and WooCommerce Shipping plugins for free you agree to our {{link}}Terms of Service{{/link}}.",'woocommerce'),components:{link:Object(s.createElement)(h.Link,{href:"https://wordpress.com/tos/",target:"_blank",type:"external"})}})))})(u,e))};var q=o(518);o(591);const G=[{name:"0-2s",max:2},{name:"2-5s",max:5},{name:"5-10s",max:10},{name:"10-15s",max:15},{name:"15-20s",max:20},{name:"20-30s",max:30},{name:"30-60s",max:60},{name:">60s"}];function Z(e){for(const t of G){if(!t.max)return t.name;if(e<1e3*t.max)return t.name}}const W=e=>["other","brick-mortar","brick-mortar-other","other-woocommerce"].includes(e),$=e=>["other","brick-mortar-other"].includes(e);class J extends s.Component{constructor(){super(),this.state={isPopoverVisible:!1,isValid:!1,currentTab:"business-details",savedValues:null},this.onContinue=this.onContinue.bind(this),this.validate=this.validate.bind(this)}async onContinue(e,t){const{createNotice:o,goToNextStep:s,installAndActivatePlugins:r}=this.props,c=t.reduce((e,t)=>[...e,...t.plugins.filter(e=>e.is_activated).map(e=>e.key)],[]),i=((e,t=[])=>Object.keys(e).filter(o=>e[o]&&"install_extensions"!==o&&!t.includes(o)).map(q.a).filter((e,t,o)=>o.indexOf(e)===t))(e,c),a=(e=>{const t={};for(let[o,s]of Object.entries(e)){o=Object(q.a)(o);const e=Object(q.b)(o);"install_extensions"===o||t["install_"+e]||(t["install_"+e]=s)}return t})(e);Object(d.recordEvent)("storeprofiler_store_business_features_continue",{all_extensions_installed:Object.values(e).every(e=>e),...a});const l=[this.persistProfileItems({business_extensions:i})];if(i.length){const t=window.performance.now();l.push(r(i).then(o=>{const s=window.performance.now()-t,n=((e,t)=>{const o=[],s={};for(let[n]of Object.entries(e)){n=Object(q.a)(n);const e=Object(q.b)(n);t&&t.data&&t.data.install_time&&t.data.install_time[n]&&(o.push(e),s["install_time_"+e]=Z(t.data.install_time[n]))}return s.installed_extensions=o,s.activated_extensions=t&&t.data&&t.data.activated?t.data.activated:[],s})(e,o);Object(d.recordEvent)("storeprofiler_store_business_features_installed_and_activated",{success:!0,total_time:Z(s),...n}),Object(w.a)(o)}).catch(e=>{throw Object(d.recordEvent)("storeprofiler_store_business_features_installed_and_activated",{success:!1,failed_extensions:Object.keys(e.data||{}).map(e=>Object(q.b)(e))}),Object(w.a)(e),new Error}))}Promise.all(l).then(()=>{s({step:"business-features"})}).catch(()=>{o("error",Object(n.__)("There was a problem updating your business details",'woocommerce'))})}async persistProfileItems(e={}){const{updateProfileItems:t,createNotice:o}=this.props,{number_employees:s,other_platform:r,other_platform_name:c,product_count:i,revenue:a,selling_venues:l,setup_client:m}=this.state.savedValues,d={number_employees:s,other_platform:r,other_platform_name:"other"===r?c:"",product_count:i,revenue:a,selling_venues:l,setup_client:m,...e};return t(Object.entries(d).reduce((e,[t,o])=>(""!==o&&(e[t]=o),e),{})).catch(()=>{o("error",Object(n.__)("There was a problem updating your business details",'woocommerce'))})}validate(e){const t={};return e.product_count.length||(t.product_count=Object(n.__)("This field is required",'woocommerce')),e.selling_venues.length||(t.selling_venues=Object(n.__)("This field is required",'woocommerce')),!e.other_platform.length&&$(e.selling_venues)&&(t.other_platform=Object(n.__)("This field is required",'woocommerce')),!e.other_platform_name.trim().length&&"other"===e.other_platform&&$(e.selling_venues)&&(t.other_platform_name=Object(n.__)("This field is required",'woocommerce')),!e.number_employees.length&&W(e.selling_venues)&&(t.number_employees=Object(n.__)("This field is required",'woocommerce')),!e.revenue.length&&W(e.selling_venues)&&(t.revenue=Object(n.__)("This field is required",'woocommerce')),0===Object.keys(t).length&&this.setState({isValid:!0}),t}trackBusinessDetailsStep({number_employees:e,other_platform:t,other_platform_name:o,product_count:s,selling_venues:n,revenue:r,setup_client:c}){const{getCurrencyConfig:i}=this.context;Object(d.recordEvent)("storeprofiler_store_business_details_continue_variant",{number_employees:e,already_selling:n,currency:i().code,product_number:s,revenue:r,used_platform:t,used_platform_name:o,setup_client:c}),Object(d.recordEvent)("storeprofiler_step_complete",{step:"business-details",wc_version:Object(u.getSetting)("wcVersion")})}getSelectControlProps(e,t=""){const{className:o,...s}=e(t);return{...s,className:g()("woocommerce-profile-wizard__"+t.replace(/\_/g,"-"),o)}}renderBusinessDetailsStep(){const{goToNextStep:e,isInstallingActivating:t,hasInstallActivateError:o}=this.props,{formatAmount:r,getCurrencyConfig:c}=this.context,i=(a=c(),[{key:"0",label:Object(n.__)("I don't have any products yet.",'woocommerce')},{key:"1-10",label:N(a,1,10)},{key:"11-100",label:N(a,11,100)},{key:"101-1000",label:N(a,101,1e3)},{key:"1000+",label:N(a,1e3)}]);var a;return Object(s.createElement)(h.Form,{initialValues:this.state.savedValues||this.props.initialValues,onSubmit:e=>{this.setState({savedValues:e,currentTab:"business-features"}),this.trackBusinessDetailsStep(e),Object(d.recordEvent)("storeprofiler_step_view",{step:"business-features",wc_version:Object(u.getSetting)("wcVersion")})},onChange:(e,t,o)=>{this.setState({savedValues:t,isValid:o})},validate:this.validate},({getInputProps:a,handleSubmit:l,values:m,isValidForm:d})=>Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:"woocommerce-profile-wizard__step-header"},Object(s.createElement)(_.__experimentalText,{variant:"title.small",as:"h2",size:"20",lineHeight:"28px"},Object(n.__)("Tell us about your business",'woocommerce')),Object(s.createElement)(_.__experimentalText,{variant:"body",as:"p"},Object(n.__)("We'd love to know if you are just getting started or you already have a business in place.",'woocommerce'))),Object(s.createElement)(_.Card,null,Object(s.createElement)(_.CardBody,null,Object(s.createElement)(h.SelectControl,b()({excludeSelectedOptions:!1,label:Object(n.__)("How many products do you plan to display?",'woocommerce'),options:i,required:!0},this.getSelectControlProps(a,"product_count"))),Object(s.createElement)(h.SelectControl,b()({excludeSelectedOptions:!1,label:Object(n.__)("Currently selling elsewhere?",'woocommerce'),options:v,required:!0},this.getSelectControlProps(a,"selling_venues"))),W(m.selling_venues)&&Object(s.createElement)(h.SelectControl,b()({excludeSelectedOptions:!1,label:Object(n.__)("How many employees do you have?",'woocommerce'),options:C,required:!0},this.getSelectControlProps(a,"number_employees"))),W(m.selling_venues)&&Object(s.createElement)(h.SelectControl,b()({excludeSelectedOptions:!1,label:Object(n.__)("What's your current annual revenue?",'woocommerce'),options:x(c(),this.props.settings.woocommerce_default_country,r),required:!0},this.getSelectControlProps(a,"revenue"))),$(m.selling_venues)&&Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:"business-competitors"},Object(s.createElement)(h.SelectControl,b()({excludeSelectedOptions:!1,label:Object(n.__)("Which platform is the store using?",'woocommerce'),options:f,required:!0},this.getSelectControlProps(a,"other_platform"))),"other"===m.other_platform&&Object(s.createElement)(h.TextControl,b()({label:Object(n.__)("What is the platform name?",'woocommerce'),required:!0},this.getSelectControlProps(a,"other_platform_name")))))),Object(s.createElement)(_.CardFooter,{isBorderless:!0},Object(s.createElement)(_.FlexItem,null,Object(s.createElement)("div",{className:"woocommerce-profile-wizard__client"},Object(s.createElement)(_.CheckboxControl,b()({label:Object(n.__)("I'm setting up a store for a client",'woocommerce')},a("setup_client")))))),Object(s.createElement)(_.CardFooter,{justify:"center"},Object(s.createElement)(_.Button,{isPrimary:!0,onClick:async()=>{await l(),this.persistProfileItems()},disabled:!d,isBusy:t},o?Object(n.__)("Retry",'woocommerce'):Object(n.__)("Continue",'woocommerce')),o&&Object(s.createElement)(_.Button,{onClick:()=>{this.persistProfileItems(),e({step:"business-features"})}},Object(n.__)("Continue without installing",'woocommerce'))))))}renderFreeFeaturesStep(){const{isInstallingActivating:e,settings:t,profileItems:o}=this.props,r=t.woocommerce_default_country?t.woocommerce_default_country:null;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:"woocommerce-profile-wizard__step-header"},Object(s.createElement)(_.__experimentalText,{variant:"title.small",as:"h2",size:"20",lineHeight:"28px"},Object(n.__)("Included business features",'woocommerce')),Object(s.createElement)(_.__experimentalText,{variant:"body",as:"p"},Object(n.__)("We recommend enhancing your store with these free extensions",'woocommerce')),Object(s.createElement)(_.__experimentalText,{variant:"body",as:"p"},Object(n.__)("No commitment required - you can remove them at any time.",'woocommerce'))),Object(s.createElement)(H,{isInstallingActivating:e,onSubmit:this.onContinue,country:r,industry:o.industry,productTypes:o.product_types}))}render(){const{initialValues:e}=this.props;return Object(s.createElement)(_.TabPanel,{activeClass:"is-active",initialTabName:"current-tab",onSelect:t=>{this.state.currentTab!==t&&(this.setState({currentTab:t,savedValues:this.state.savedValues||e}),Object(d.recordEvent)("storeprofiler_step_view",{step:t,wc_version:Object(u.getSetting)("wcVersion")}))},tabs:[{name:"business-details"===this.state.currentTab?"current-tab":"business-details",id:"business-details",title:Object(n.__)("Business details",'woocommerce')},{name:"business-features"===this.state.currentTab?"current-tab":"business-features",id:"business-features",title:Object(n.__)("Free features",'woocommerce'),className:this.state.isValid?"":"is-disabled"}]},e=>Object(s.createElement)(s.Fragment,null,this.getTab(e.id)))}getTab(e){return"business-details"===e?this.renderBusinessDetailsStep():this.renderFreeFeaturesStep()}}J.contextType=j.a;const Y=Object(c.compose)(Object(a.withSelect)(e=>{const{getSettings:t,getSettingsError:o}=e(m.SETTINGS_STORE_NAME),{getProfileItems:s,getOnboardingError:n}=e(m.ONBOARDING_STORE_NAME),{getPluginsError:r,isPluginsRequesting:c}=e(m.PLUGINS_STORE_NAME),{general:i={}}=t("general");return{hasInstallActivateError:r("installPlugins")||r("activatePlugins"),isError:Boolean(n("updateProfileItems")),profileItems:s(),isSettingsError:Boolean(o("general")),settings:i,isInstallingActivating:c("installPlugins")||c("activatePlugins")||c("getJetpackConnectUrl")}}),Object(a.withDispatch)(e=>{const{updateProfileItems:t}=e(m.ONBOARDING_STORE_NAME),{installAndActivatePlugins:o}=e(m.PLUGINS_STORE_NAME),{createNotice:s}=e("core/notices");return{createNotice:s,installAndActivatePlugins:o,updateProfileItems:t}}))(J);o(592);const Q=e=>{const{profileItems:t,isLoading:o}=Object(a.useSelect)(e=>({isLoading:!e(m.ONBOARDING_STORE_NAME).hasFinishedResolution("getProfileItems")||!e(m.SETTINGS_STORE_NAME).hasFinishedResolution("getSettings",["general"]),profileItems:e(m.ONBOARDING_STORE_NAME).getProfileItems()}));if(o)return Object(s.createElement)("div",{className:"woocommerce-admin__business-details__spinner"},Object(s.createElement)(h.Spinner,null));const n={number_employees:t.number_employees||"",other_platform:t.other_platform||"",other_platform_name:t.other_platform_name||"",product_count:t.product_count||"",selling_venues:t.selling_venues||"",revenue:t.revenue||"",setup_client:t.setup_client||!1};return Object(s.createElement)(Y,b()({},e,{initialValues:n}))};var K=o(22);const X=Object(K.d)("onboarding",{});class ee extends s.Component{constructor(e){let t=Object(i.get)(e,"profileItems",{}).industry||[];const{locationSettings:o}=e;if("US"!==Object(E.c)(o.woocommerce_default_country)){const e="cbd-other-hemp-derived-products";t=t.filter(t=>e!==t&&e!==t.slug)}super(),this.state={error:null,selected:t,textInputListContent:{}},this.onContinue=this.onContinue.bind(this),this.onIndustryChange=this.onIndustryChange.bind(this),this.onDetailChange=this.onDetailChange.bind(this)}async onContinue(){if(await this.validateField(),this.state.error)return;const{createNotice:e,goToNextStep:t,isError:o,updateProfileItems:s}=this.props,r=this.state.selected.map(e=>e.slug),c=this.state.selected.map(e=>e.detail).filter(e=>e).join(",");Object(d.recordEvent)("storeprofiler_store_industry_continue",{store_industry:r,industries_with_detail:c}),await s({industry:this.state.selected}),o?e("error",Object(n.__)("There was a problem updating your industries",'woocommerce')):t()}async validateField(){const e=this.state.selected.length?null:Object(n.__)("Please select at least one industry",'woocommerce');this.setState({error:e})}onIndustryChange(e){this.setState(t=>{const o=t.selected,s=Object(i.find)(o,{slug:e});if(s){const o=t.textInputListContent;return o[e]=s.detail,{selected:Object(i.filter)(t.selected,t=>t.slug!==e)||[],textInputListContent:o}}return o.push({slug:e,detail:t.textInputListContent[e]}),{selected:o}},()=>this.validateField())}onDetailChange(e,t){this.setState(o=>{const s=o.selected,n=o.textInputListContent;return s[Object(i.findIndex)(s,{slug:t})].detail=e,n[t]=e,{selected:s,textInputListContent:n}})}renderIndustryLabel(e,t,o){const{textInputListContent:n}=this.state;return Object(s.createElement)(s.Fragment,null,t.label,t.use_description&&o&&Object(s.createElement)(h.TextControl,{key:"text-control-"+e,label:t.description_label,value:o.detail||n[e]||"",onChange:t=>this.onDetailChange(t,e),className:"woocommerce-profile-wizard__text"}))}render(){const{industries:e}=X,{error:t,selected:o}=this.state,{locationSettings:r,isProfileItemsRequesting:c}=this.props,a=Object(E.c)(r.woocommerce_default_country),l=Object.keys(e),m="US"===a?l:l.filter(e=>"cbd-other-hemp-derived-products"!==e);return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:"woocommerce-profile-wizard__step-header"},Object(s.createElement)(P.Text,{variant:"title.small",as:"h2",size:"20",lineHeight:"28px"},Object(n.__)("In which industry does the store operate?",'woocommerce')),Object(s.createElement)(P.Text,{variant:"body",as:"p"},Object(n.__)("Choose any that apply",'woocommerce'))),Object(s.createElement)(_.Card,null,Object(s.createElement)(_.CardBody,{size:null},Object(s.createElement)("div",{className:"woocommerce-profile-wizard__checkbox-group"},m.map(t=>{const n=Object(i.find)(o,{slug:t});return Object(s.createElement)(_.CheckboxControl,{key:"checkbox-control-"+t,label:this.renderIndustryLabel(t,e[t],n),onChange:()=>this.onIndustryChange(t),checked:n||!1,className:"woocommerce-profile-wizard__checkbox"})}),t&&Object(s.createElement)("span",{className:"woocommerce-profile-wizard__error"},t))),Object(s.createElement)(_.CardFooter,{isBorderless:!0,justify:"center"},Object(s.createElement)(_.Button,{isPrimary:!0,onClick:this.onContinue,isBusy:c,disabled:!o.length||c},Object(n.__)("Continue",'woocommerce')))))}}var te=Object(c.compose)(Object(a.withSelect)(e=>{const{getProfileItems:t,getOnboardingError:o,isOnboardingRequesting:s}=e(m.ONBOARDING_STORE_NAME),{getSettings:n}=e(m.SETTINGS_STORE_NAME),{general:r={}}=n("general");return{isError:Boolean(o("updateProfileItems")),profileItems:t(),locationSettings:r,isProfileItemsRequesting:s("updateProfileItems")}}),Object(a.withDispatch)(e=>{const{updateProfileItems:t}=e(m.ONBOARDING_STORE_NAME),{createNotice:o}=e("core/notices");return{createNotice:o,updateProfileItems:t}}))(ee),oe=o(479);function se({annualPrice:e,description:t,isMonthlyPricing:o,label:r,moreUrl:c,slug:i}){const[a,l]=Object(s.useState)("");if(!e)return r;const m=Object(n.__)("This product type requires a paid extension.\nWe'll add this to a cart so that\nyou can purchase and install it later.",'woocommerce');return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("span",{className:"woocommerce-product-wizard__product-types-label"},r),Object(s.createElement)(_.Button,{isTertiary:!0,label:Object(n.__)("Learn more about recommended free business features",'woocommerce'),onClick:()=>{l(!0)}},Object(s.createElement)(I.a,{icon:oe.a})),a&&Object(s.createElement)(_.Popover,{focusOnMount:"container",position:"top center",onClose:()=>l(!1)},B()({mixedString:t+(c?" {{moreLink/}}":""),components:{moreLink:c?Object(s.createElement)(h.Link,{href:c,target:"_blank",type:"external",onClick:()=>Object(d.recordEvent)("storeprofiler_store_product_type_learn_more",{product_type:i})},Object(n.__)("Learn more",'woocommerce')):""}})),Object(s.createElement)(_.Tooltip,{text:m,position:"bottom center"},Object(s.createElement)(h.Pill,null,Object(s.createElement)("span",{className:"screen-reader-text"},m),o?Object(n.sprintf)(Object(n.__)("$%f per month",'woocommerce'),(e/12).toFixed(2)):Object(n.sprintf)(Object(n.__)("$%f per year",'woocommerce'),e))))}o(593);class ne extends s.Component{constructor(){super(),this.state={error:null,isMonthlyPricing:!0,selected:[],isWCPayInstalled:null},this.onContinue=this.onContinue.bind(this),this.onChange=this.onChange.bind(this)}componentDidMount(){const{installedPlugins:e,invalidateResolution:t}=this.props,{isWCPayInstalled:o}=this.state;t("getProductTypes",[]),null===o&&e&&this.setState({isWCPayInstalled:e.includes("woocommerce-payments")})}componentDidUpdate(e){const{profileItems:t,productTypes:o}=this.props;if(e.productTypes!==o){const e=Object.keys(o).filter(e=>!!o[e].default);this.setState({selected:t.product_types||e})}}validateField(){const e=this.state.selected.length?null:Object(n.__)("Please select at least one product type",'woocommerce');return this.setState({error:e}),!e}onContinue(){const{selected:e}=this.state,{installedPlugins:t=[]}=this.props;if(!this.validateField())return;const{countryCode:o,createNotice:s,goToNextStep:r,installAndActivatePlugins:c,updateProfileItems:i,productTypes:a}=this.props,l={product_type:e,wcpay_installed:!1},m=[i({product_types:e})];window.wcAdminFeatures&&window.wcAdminFeatures.subscriptions&&"US"===o&&a.subscriptions&&!a.subscriptions.yearly_price&&!t.includes("woocommerce-payments")&&e.includes("subscriptions")&&m.push(c(["woocommerce-payments"]).then(e=>{l.wcpay_installed=!0,e.data&&e.data.install_time&&e.data.install_time["woocommerce-payments"]&&(l.install_time_wcpay=e.data.install_time["woocommerce-payments"]),Object(w.a)(e)}).catch(e=>{throw Object(w.a)(e),new Error})),Promise.all(m).then(()=>{Object(d.recordEvent)("storeprofiler_store_product_type_continue",l),r()}).catch(()=>s("error",Object(n.__)("There was a problem updating your product types",'woocommerce')))}onChange(e){this.setState(t=>{if(Object(i.includes)(t.selected,e))return{selected:Object(i.filter)(t.selected,t=>t!==e)||[]};const o=t.selected;return o.push(e),{selected:o}},()=>this.validateField())}render(){const{productTypes:e=[]}=this.props,{error:t,isMonthlyPricing:o,isWCPayInstalled:r,selected:c}=this.state,{countryCode:i,isInstallingActivating:a,isProductTypesRequesting:l,isProfileItemsRequesting:m}=this.props;return l?Object(s.createElement)("div",{className:"woocommerce-profile-wizard__product-types__spinner"},Object(s.createElement)(_.Spinner,null)):Object(s.createElement)("div",{className:"woocommerce-profile-wizard__product-types"},Object(s.createElement)("div",{className:"woocommerce-profile-wizard__step-header"},Object(s.createElement)(P.Text,{variant:"title.small",as:"h2",size:"20",lineHeight:"28px"},Object(n.__)("What type of products will be listed?",'woocommerce')),Object(s.createElement)(P.Text,{variant:"body",as:"p"},Object(n.__)("Choose any that apply",'woocommerce'))),Object(s.createElement)(_.Card,null,Object(s.createElement)(_.CardBody,{size:null},Object.keys(e).map(t=>Object(s.createElement)(_.CheckboxControl,{key:t,label:Object(s.createElement)(se,{description:e[t].description,label:e[t].label,annualPrice:e[t].yearly_price,isMonthlyPricing:o,moreUrl:e[t].more_url,slug:t}),onChange:()=>this.onChange(t),checked:c.includes(t),className:"woocommerce-profile-wizard__checkbox"})),t&&Object(s.createElement)("span",{className:"woocommerce-profile-wizard__error"},t)),Object(s.createElement)(_.CardFooter,{isBorderless:!0,justify:"center"},Object(s.createElement)(_.Button,{isPrimary:!0,onClick:this.onContinue,isBusy:m||a,disabled:!c.length||m||a},Object(n.__)("Continue",'woocommerce')))),Object(s.createElement)("div",{className:"woocommerce-profile-wizard__card-help-footnote"},Object(s.createElement)("div",{className:"woocommerce-profile-wizard__product-types-pricing-toggle woocommerce-profile-wizard__checkbox"},Object(s.createElement)("label",{htmlFor:"woocommerce-product-types__pricing-toggle"},Object(s.createElement)(P.Text,{variant:"body",as:"p"},Object(n.__)("Display monthly prices",'woocommerce')),Object(s.createElement)(_.FormToggle,{id:"woocommerce-product-types__pricing-toggle",checked:o,onChange:()=>this.setState({isMonthlyPricing:!o})}))),Object(s.createElement)(P.Text,{variant:"caption",size:"12",lineHeight:"16px"},Object(n.__)("Billing is annual. All purchases are covered by our 30 day money back guarantee and include access to support and updates. Extensions will be added to a cart for you to purchase later.",'woocommerce')),window.wcAdminFeatures&&window.wcAdminFeatures.subscriptions&&"US"===i&&!r&&e.subscriptions&&!e.subscriptions.yearly_price&&c.includes("subscriptions")&&Object(s.createElement)(P.Text,{variant:"body",size:"12",lineHeight:"16px",as:"p"},Object(n.__)("The following extensions will be added to your site for free: WooCommerce Payments. An account is required to use this feature.",'woocommerce'))))}}var re=Object(c.compose)(Object(a.withSelect)(e=>{const{getProfileItems:t,getProductTypes:o,getOnboardingError:s,hasFinishedResolution:n,isOnboardingRequesting:r}=e(m.ONBOARDING_STORE_NAME),{getSettings:c}=e(m.SETTINGS_STORE_NAME),{getInstalledPlugins:i,isPluginsRequesting:a}=e(m.PLUGINS_STORE_NAME),{general:l={}}=c("general");return{isError:Boolean(s("updateProfileItems")),profileItems:t(),isProfileItemsRequesting:r("updateProfileItems"),installedPlugins:i(),isInstallingActivating:a("installPlugins")||a("activatePlugins"),countryCode:Object(E.b)(l.woocommerce_default_country),productTypes:o(),isProductTypesRequesting:!n("getProductTypes")}}),Object(a.withDispatch)(e=>{const{updateProfileItems:t}=e(m.ONBOARDING_STORE_NAME),{createNotice:o}=e("core/notices"),{installAndActivatePlugins:s}=e(m.PLUGINS_STORE_NAME),{invalidateResolution:n}=e(m.ONBOARDING_STORE_NAME);return{createNotice:o,installAndActivatePlugins:s,invalidateResolution:n,updateProfileItems:t}}))(ne);class ce extends s.Component{renderStepper(){const{currentStep:e,steps:t}=this.props,o=Object(i.filter)(t,e=>!!e.label),n=o.findIndex(t=>t.key===e);return o.map((e,t)=>{const s=o[t-1];return t<n&&(e.isComplete=!0),s&&!s.isComplete||(e.onClick=e=>Object(l.updateQueryString)({step:e})),e}),Object(s.createElement)(h.Stepper,{steps:o,currentStep:e})}render(){const e=this.props.steps.find(e=>e.key===this.props.currentStep);return e&&e.label?Object(s.createElement)("div",{className:"woocommerce-profile-wizard__header"},this.renderStepper()):null}}var ie=o(15),ae=o(533),le=o(520);o(594);const me=_.FlexItem||(({children:e,align:t})=>{const o={display:"flex","justify-content":t?"center":"flex-start"};return Object(s.createElement)("div",{style:o},e)}),de=()=>Object(s.createElement)("div",{className:"woocommerce-admin__store-details__spinner"},Object(s.createElement)(_.Spinner,null));class ue extends s.Component{constructor(e){super(e),this.state={showUsageModal:!1,skipping:!1,isStoreDetailsPopoverVisible:!1,isSkipSetupPopoverVisible:!1},this.onContinue=this.onContinue.bind(this),this.onSubmit=this.onSubmit.bind(this),this.validateStoreDetails=this.validateStoreDetails.bind(this)}deriveCurrencySettings(e){if(!e)return null;const t=this.context,o=Object(E.b)(e),{currencySymbols:s={},localeInfo:n={}}=Object(K.d)("onboarding",{});return t.getDataForCountry(o,n,s)}onSubmit(){this.setState({showUsageModal:!0,skipping:!1})}async onContinue(e){const{createNotice:t,goToNextStep:o,updateProfileItems:s,updateAndPersistSettingsForGroup:r,profileItems:c,settings:i,errorsRef:a}=this.props,l=this.deriveCurrencySettings(e.countryState);this.context.setCurrency(l),Object(d.recordEvent)("storeprofiler_store_details_continue",{store_country:Object(E.b)(e.countryState),derived_currency:l.code,email_signup:e.isAgreeMarketing}),await r("general",{general:{...i,woocommerce_store_address:e.addressLine1,woocommerce_store_address_2:e.addressLine2,woocommerce_default_country:e.countryState,woocommerce_store_city:e.city,woocommerce_store_postcode:e.postCode,woocommerce_currency:l.code,woocommerce_currency_pos:l.symbolPosition,woocommerce_price_thousand_sep:l.thousandSeparator,woocommerce_price_decimal_sep:l.decimalSeparator,woocommerce_price_num_decimals:l.precision}});const m={is_agree_marketing:e.isAgreeMarketing,store_email:e.storeEmail};if("US"!==Object(E.c)(e.countryState)&&c.industry&&c.industry.length){const e="cbd-other-hemp-derived-products",t=c.industry.filter(t=>e!==t&&e!==t.slug);m.industry=t}let u=[];try{await s(m)}catch(e){var p;null!=e&&null!==(p=e.data)&&void 0!==p&&p.params&&(u=Object.values(e.data.params))}Boolean(a.current.settings)||u.length?(t("error",Object(n.__)("There was a problem saving your store details",'woocommerce')),u.forEach(e=>t("error",e))):o()}validateStoreDetails(e){const{getLocale:t}=this.props,o=t(e.countryState),s=Object(ae.b)(o)(e);return e.storeEmail&&!Object(ie.isEmail)(e.storeEmail)&&(s.storeEmail=Object(n.__)("Invalid email address",'woocommerce')),s}render(){const{showUsageModal:e,skipping:t,isStoreDetailsPopoverVisible:o,isSkipSetupPopoverVisible:r}=this.state,{skipProfiler:c,isLoading:i,isBusy:a,initialValues:l,invalidateResolutionForStoreSelector:m}=this.props,d=Object(n.__)("Manual setup is only recommended for\n experienced WooCommerce users or developers.",'woocommerce'),u=Object(n.__)("Your store address will help us configure currency\n options and shipping rules automatically.\n This information will not be publicly visible and can\n easily be changed later.",'woocommerce');return i?Object(s.createElement)("div",{className:"woocommerce-profile-wizard__store-details"},Object(s.createElement)(de,null)):Object(s.createElement)("div",{className:"woocommerce-profile-wizard__store-details"},Object(s.createElement)("div",{className:"woocommerce-profile-wizard__step-header"},Object(s.createElement)(P.Text,{variant:"title.small",as:"h2",size:"20",lineHeight:"28px"},Object(n.__)("Welcome to WooCommerce",'woocommerce')),Object(s.createElement)(P.Text,{variant:"body",as:"p"},Object(n.__)("Tell us about your store and we'll get you set up in no time",'woocommerce'),Object(s.createElement)(_.Button,{isTertiary:!0,label:Object(n.__)("Learn more about store details",'woocommerce'),onClick:()=>this.setState({isStoreDetailsPopoverVisible:!0})},Object(s.createElement)(I.a,{icon:oe.a}))),o&&Object(s.createElement)(_.Popover,{focusOnMount:"container",position:"top center",onClose:()=>this.setState({isStoreDetailsPopoverVisible:!1})},u)),Object(s.createElement)(h.Form,{initialValues:l,onSubmit:this.onSubmit,validate:this.validateStoreDetails},({getInputProps:o,handleSubmit:r,values:i,isValidForm:l,setValue:m})=>Object(s.createElement)(_.Card,null,e&&Object(s.createElement)(le.a,{onContinue:()=>{t?c():this.onContinue(i)},onClose:()=>this.setState({showUsageModal:!1,skipping:!1})}),Object(s.createElement)(_.CardBody,null,Object(s.createElement)(ae.a,{getInputProps:o,setValue:m}),Object(s.createElement)(h.TextControl,b()({label:i.isAgreeMarketing?Object(n.__)("Email address",'woocommerce'):Object(n.__)("Email address (Optional)",'woocommerce'),required:i.isAgreeMarketing,autoComplete:"email"},o("storeEmail"))),i.isAgreeMarketing&&(!i.storeEmail||!i.storeEmail.trim().length)&&Object(s.createElement)("div",{className:"woocommerce-profile-wizard__store-details-error"},Object(n.__)("Please enter your email address to subscribe",'woocommerce')),Object(s.createElement)(me,null,Object(s.createElement)("div",{className:"woocommerce-profile-wizard__newsletter-signup"},Object(s.createElement)(_.CheckboxControl,b()({label:Object(s.createElement)(s.Fragment,null,Object(n.__)("Get tips, product updates and inspiration straight to your mailbox.",'woocommerce')," ",Object(s.createElement)("span",{className:"woocommerce-profile-wizard__powered-by-mailchimp"},Object(n.__)("Powered by Mailchimp",'woocommerce')))},o("isAgreeMarketing")))))),Object(s.createElement)(_.CardFooter,{justify:"center"},Object(s.createElement)(_.Button,{isPrimary:!0,onClick:r,isBusy:a,disabled:!l||a},Object(n.__)("Continue",'woocommerce'))))),Object(s.createElement)("div",{className:"woocommerce-profile-wizard__footer"},Object(s.createElement)(_.Button,{isLink:!0,className:"woocommerce-profile-wizard__footer-link",onClick:()=>(m("getTaskLists"),this.setState({showUsageModal:!0,skipping:!0}),!1)},Object(n.__)("Skip setup store details",'woocommerce')),Object(s.createElement)(_.Button,{isTertiary:!0,label:d,onClick:()=>this.setState({isSkipSetupPopoverVisible:!0})},Object(s.createElement)(I.a,{icon:oe.a})),r&&Object(s.createElement)(_.Popover,{focusOnMount:"container",position:"top center",onClose:()=>this.setState({isSkipSetupPopoverVisible:!1})},d)))}}ue.contextType=j.a;var pe=Object(c.compose)(Object(a.withSelect)(e=>{const{getSettings:t,getSettingsError:o,isUpdateSettingsRequesting:n}=e(m.SETTINGS_STORE_NAME),{getProfileItems:r,isOnboardingRequesting:c,getEmailPrefill:i,hasFinishedResolution:a}=e(m.ONBOARDING_STORE_NAME),{getLocale:l,getLocales:d,hasFinishedResolution:u}=e(m.COUNTRIES_STORE_NAME),{isResolving:p}=e(m.OPTIONS_STORE_NAME),b=r(),h=i(),{general:_={}}=t("general"),O=c("updateProfileItems")||n("general")||p("getOption",["woocommerce_allow_tracking"]),g=!a("getProfileItems")||!a("getEmailPrefill")||!u("getLocales"),j=Object(s.useRef)({settings:null});j.current={settings:o("general")};const w=_.woocommerce_store_address&&_.woocommerce_default_country||"";d();return{getLocale:l,initialValues:{addressLine1:_.woocommerce_store_address||"",addressLine2:_.woocommerce_store_address_2||"",city:_.woocommerce_store_city||"",countryState:w,postCode:_.woocommerce_store_postcode||"",isAgreeMarketing:"boolean"!=typeof b.is_agree_marketing||b.is_agree_marketing,storeEmail:"string"==typeof b.store_email?b.store_email:h},isLoading:g,profileItems:b,isBusy:O,settings:_,errorsRef:j}}),Object(a.withDispatch)(e=>{const{createNotice:t}=e("core/notices"),{invalidateResolutionForStoreSelector:o,updateProfileItems:s}=e(m.ONBOARDING_STORE_NAME),{updateAndPersistSettingsForGroup:n}=e(m.SETTINGS_STORE_NAME);return{createNotice:t,invalidateResolutionForStoreSelector:o,updateProfileItems:s,updateAndPersistSettingsForGroup:n}}))(ue),be=o(18),he=o.n(be),_e=o(30),Oe=o(595),ge=o.n(Oe),je=(o(596),o(597)),we=o.n(je),fe=o(1),Ce=o.n(fe);const ve=({children:e,className:t})=>Object(u.isWpVersion)("5.8",">=")?Object(s.createElement)("div",{className:t},e):Object(s.createElement)(_.DropZoneProvider,null,Object(s.createElement)("div",{className:t},e));class Ee extends s.Component{constructor(){super(),this.state={isUploading:!1},this.handleFilesUpload=this.handleFilesUpload.bind(this),this.handleFilesDrop=this.handleFilesDrop.bind(this)}handleFilesDrop(e){const t=e[0];this.uploadTheme(t)}handleFilesUpload(e){const t=e.target.files[0];this.uploadTheme(t)}uploadTheme(e){const{createNotice:t,onUploadComplete:o}=this.props;this.setState({isUploading:!0});const s=new window.FormData;return s.append("pluginzip",e),he()({path:"/wc-admin/themes",method:"POST",body:s}).then(e=>{o(e),this.setState({isUploading:!1}),t(e.status,e.message)}).catch(e=>{this.setState({isUploading:!1}),e&&e.message&&t("error",e.message)})}render(){const{className:e}=this.props,{isUploading:t}=this.state,o=g()("woocommerce-theme-uploader",e,{"is-uploading":t});return Object(s.createElement)(_.Card,{className:o},Object(s.createElement)(ve,{className:"woocommerce-theme-uploader__dropzone-wrapper"},t?Object(s.createElement)(s.Fragment,null,Object(s.createElement)(h.Spinner,null),Object(s.createElement)(h.H,{className:"woocommerce-theme-uploader__title"},Object(n.__)("Uploading theme",'woocommerce')),Object(s.createElement)("p",null,Object(n.__)("Your theme is being uploaded",'woocommerce'))):Object(s.createElement)(s.Fragment,null,Object(s.createElement)(_.FormFileUpload,{accept:".zip",onChange:this.handleFilesUpload},Object(s.createElement)(we.a,null),Object(s.createElement)(h.H,{className:"woocommerce-theme-uploader__title"},Object(n.__)("Upload a theme",'woocommerce')),Object(s.createElement)("p",null,Object(n.__)("Drop a theme zip file here to upload",'woocommerce'))),Object(s.createElement)(_.DropZone,{label:Object(n.__)("Drop your theme zip file here",'woocommerce'),onFilesDrop:this.handleFilesDrop}))))}}Ee.propTypes={className:Ce.a.string,onUploadComplete:Ce.a.func},Ee.defaultProps={onUploadComplete:i.noop};var ye=Object(c.compose)(Object(a.withDispatch)(e=>{const{createNotice:t}=e("core/notices");return{createNotice:t}}))(Ee),Se=o(501),Ne=o(598),ke=o.n(Ne),Te=o(599),xe=o.n(Te),Pe=o(600),Ie=o.n(Pe);const Me=[{key:"mobile",icon:ke.a},{key:"tablet",icon:xe.a},{key:"desktop",icon:Ie.a}];class Re extends s.Component{constructor(){super(...arguments),this.state={device:"desktop"},this.handleDeviceClick=this.handleDeviceClick.bind(this)}handleDeviceClick(e){const{theme:t}=this.props;Object(d.recordEvent)("storeprofiler_store_theme_demo_device",{device:e,theme:t.slug}),this.setState({device:e})}render(){const{isBusy:e,onChoose:t,onClose:o,theme:r}=this.props,{demo_url:c,slug:i,title:a}=r,{device:l}=this.state;return Object(s.createElement)("div",{className:"woocommerce-theme-preview"},Object(s.createElement)("div",{className:"woocommerce-theme-preview__toolbar"},Object(s.createElement)(_.Button,{className:"woocommerce-theme-preview__close",onClick:o},Object(s.createElement)(I.a,{icon:Se.a})),Object(s.createElement)("div",{className:"woocommerce-theme-preview__theme-name"},B()({mixedString:Object(n.sprintf)(Object(n.__)("{{strong}}%s{{/strong}} developed by WooCommerce",'woocommerce'),a),components:{strong:Object(s.createElement)("strong",null)}})),Object(s.createElement)("div",{className:"woocommerce-theme-preview__devices"},Me.map(e=>{const t=e.icon;return Object(s.createElement)(_.Button,{key:e.key,className:g()("woocommerce-theme-preview__device",{"is-selected":e.key===l}),onClick:()=>this.handleDeviceClick(e.key)},Object(s.createElement)(t,null))})),Object(s.createElement)(_.Button,{isPrimary:!0,onClick:()=>t(i,"preview"),isBusy:e},Object(n.__)("Choose",'woocommerce'))),Object(s.createElement)(h.WebPreview,{src:c,title:a,className:"is-"+l}))}}var Ae=Re;class Be extends s.Component{constructor(){super(...arguments),this.state={activeTab:"all",chosen:null,demo:null,uploadedThemes:[]},this.handleUploadComplete=this.handleUploadComplete.bind(this),this.onChoose=this.onChoose.bind(this),this.onClosePreview=this.onClosePreview.bind(this),this.onSelectTab=this.onSelectTab.bind(this),this.openDemo=this.openDemo.bind(this),this.skipStep=this.skipStep.bind(this)}componentDidUpdate(e){const{isError:t,isUpdatingProfileItems:o,createNotice:s}=this.props,{chosen:r}=this.state,c=!o&&e.isUpdatingProfileItems&&!t&&r,i=!o&&e.isRequesting&&t;c&&(this.setState({chosen:null}),this.props.goToNextStep()),i&&(this.setState({chosen:null}),s("error",Object(n.__)("There was a problem selecting your store theme",'woocommerce')))}onChoose(e,t=""){const{updateProfileItems:o}=this.props,{is_installed:s,price:n,slug:r}=e,{activeTheme:c=""}=Object(K.d)("onboarding",{});this.setState({chosen:r}),Object(d.recordEvent)("storeprofiler_store_theme_choose",{theme:r,location:t}),r!==c&&Object(E.d)(n)<=0?s?this.activateTheme(r):this.installTheme(r):o({theme:r})}installTheme(e){const{createNotice:t}=this.props;he()({path:"/wc-admin/onboarding/themes/install?theme="+e,method:"POST"}).then(o=>{t("success",Object(n.sprintf)(Object(n.__)("%s was installed on your site",'woocommerce'),o.name)),this.activateTheme(e)}).catch(e=>{this.setState({chosen:null}),t("error",e.message)})}activateTheme(e){const{createNotice:t,updateProfileItems:o}=this.props;he()({path:"/wc-admin/onboarding/themes/activate?theme="+e,method:"POST"}).then(s=>{t("success",Object(n.sprintf)(Object(n.__)("%s was activated on your site",'woocommerce'),s.name)),Object(K.e)("onboarding",{...Object(K.d)("onboarding",{}),activeTheme:s.slug}),o({theme:e})}).catch(e=>{this.setState({chosen:null}),t("error",e.message)})}onClosePreview(){const{demo:e}=this.state;Object(d.recordEvent)("storeprofiler_store_theme_demo_close",{theme:e.slug}),document.body.classList.remove("woocommerce-theme-preview-active"),this.setState({demo:null})}openDemo(e){Object(d.recordEvent)("storeprofiler_store_theme_live_demo",{theme:e.slug}),document.body.classList.add("woocommerce-theme-preview-active"),this.setState({demo:e})}skipStep(){const{activeTheme:e=""}=Object(K.d)("onboarding",{});Object(d.recordEvent)("storeprofiler_store_theme_skip_step",{activeTheme:e}),this.props.goToNextStep()}renderTheme(e){const{demo_url:t,has_woocommerce_support:o,image:r,slug:c,title:i}=e,{chosen:a}=this.state,{activeTheme:l=""}=Object(K.d)("onboarding",{});return Object(s.createElement)(_.Card,{className:"woocommerce-profile-wizard__theme",key:c},Object(s.createElement)(_.CardBody,{size:null},r&&Object(s.createElement)("div",{className:"woocommerce-profile-wizard__theme-image",style:{backgroundImage:`url(${r})`},role:"img","aria-label":i})),Object(s.createElement)(_.CardBody,{className:"woocommerce-profile-wizard__theme-details"},Object(s.createElement)(h.H,{className:"woocommerce-profile-wizard__theme-name"},i,!o&&Object(s.createElement)(_.Tooltip,{text:Object(n.__)("This theme does not support WooCommerce.",'woocommerce')},Object(s.createElement)("span",null,Object(s.createElement)(ge.a,{role:"img","aria-hidden":"true",focusable:"false"})))),Object(s.createElement)("p",{className:"woocommerce-profile-wizard__theme-status"},this.getThemeStatus(e))),Object(s.createElement)(_.CardFooter,null,c===l?Object(s.createElement)(_.Button,{isPrimary:!0,onClick:()=>this.onChoose(e,"card"),isBusy:a===c,disabled:a===c},Object(n.__)("Continue with my active theme",'woocommerce')):Object(s.createElement)(_.Button,{isSecondary:!0,onClick:()=>this.onChoose(e,"card"),isBusy:a===c,disabled:a===c},Object(n.__)("Choose",'woocommerce')),t&&Object(s.createElement)(_.Button,{isTertiary:!0,onClick:()=>this.openDemo(e)},Object(n.__)("Live demo",'woocommerce'))))}getThemeStatus(e){const{is_installed:t,price:o,slug:s}=e,{activeTheme:r=""}=Object(K.d)("onboarding",{});return r===s?Object(n.__)("Currently active theme",'woocommerce'):t?Object(n.__)("Installed",'woocommerce'):Object(E.d)(o)<=0?Object(n.__)("Free",'woocommerce'):Object(n.sprintf)(Object(n.__)("%s per year",'woocommerce'),Object(_e.decodeEntities)(o))}doesActiveThemeSupportWooCommerce(){const{activeTheme:e=""}=Object(K.d)("onboarding",{}),t=this.getThemes().find(t=>t.slug===e);return t&&t.has_woocommerce_support}onSelectTab(e){Object(d.recordEvent)("storeprofiler_store_theme_navigate",{navigation:e}),this.setState({activeTab:e})}getPriceValue(e){return Number(Object(_e.decodeEntities)(e).replace(/[^0-9.-]+/g,""))}getThemes(e="all"){const{uploadedThemes:t}=this.state,{activeTheme:o="",themes:s=[]}=Object(K.d)("onboarding",{}),n=[...s.filter(e=>e&&(e.has_woocommerce_support||e.slug===o)),...t];switch(e){case"paid":return n.filter(e=>Object(E.d)(e.price)>0);case"free":return n.filter(e=>Object(E.d)(e.price)<=0);case"all":default:return n}}handleUploadComplete(e){"success"===e.status&&e.theme_data&&(this.setState({uploadedThemes:[...this.state.uploadedThemes,e.theme_data]}),Object(d.recordEvent)("storeprofiler_store_theme_upload",{theme:e.theme_data.slug}))}render(){const{activeTab:e,chosen:t,demo:o}=this.state,r=this.getThemes(e),c=this.doesActiveThemeSupportWooCommerce();return Object(s.createElement)(s.Fragment,null,Object(s.createElement)("div",{className:"woocommerce-profile-wizard__step-header"},Object(s.createElement)(P.Text,{variant:"title.small",as:"h2",size:"20",lineHeight:"28px"},Object(n.__)("Choose a theme",'woocommerce')),Object(s.createElement)(P.Text,{variant:"body",as:"p"},Object(n.__)("Choose how your store appears to customers. And don't worry, you can always switch themes and edit them later.",'woocommerce'))),Object(s.createElement)(_.TabPanel,{className:"woocommerce-profile-wizard__themes-tab-panel",activeClass:"is-active",onSelect:this.onSelectTab,tabs:[{name:"all",title:Object(n.__)("All themes",'woocommerce')},{name:"paid",title:Object(n.__)("Paid themes",'woocommerce')},{name:"free",title:Object(n.__)("Free themes",'woocommerce')}]},()=>Object(s.createElement)("div",{className:"woocommerce-profile-wizard__themes"},r&&r.map(e=>this.renderTheme(e)),Object(s.createElement)(ye,{onUploadComplete:this.handleUploadComplete}))),o&&Object(s.createElement)(Ae,{theme:o,onChoose:()=>this.onChoose(o,"card"),onClose:this.onClosePreview,isBusy:t===o.slug}),c&&Object(s.createElement)("p",{className:"woocommerce-profile-wizard__themes-skip-this-step"},Object(s.createElement)(_.Button,{isLink:!0,className:"woocommerce-profile-wizard__skip",onClick:()=>this.skipStep()},Object(n.__)("Skip this step",'woocommerce'))))}}var Le=Object(c.compose)(Object(a.withSelect)(e=>{const{getProfileItems:t,getOnboardingError:o,isOnboardingRequesting:s}=e(m.ONBOARDING_STORE_NAME);return{isError:Boolean(o("updateProfileItems")),isUpdatingProfileItems:s("updateProfileItems"),profileItems:t()}}),Object(a.withDispatch)(e=>{const{updateProfileItems:t}=e(m.ONBOARDING_STORE_NAME),{createNotice:o}=e("core/notices");return{createNotice:o,updateProfileItems:t}}))(Be);o(601);class Fe extends s.Component{constructor(e){super(e),this.cachedActivePlugins=e.activePlugins,this.goToNextStep=this.goToNextStep.bind(this)}componentDidUpdate(e){const{step:t}=e.query,{step:o}=this.props.query,{isError:s,isGetProfileItemsRequesting:r,createNotice:c}=this.props;!r&&e.isRequesting&&s&&c("error",Object(n.__)("There was a problem finishing the setup wizard",'woocommerce')),t!==o&&(window.document.documentElement.scrollTop=0,Object(d.recordEvent)("storeprofiler_step_view",{step:this.getCurrentStep().key,wc_version:Object(u.getSetting)("wcVersion")}))}componentDidMount(){document.body.classList.remove("woocommerce-admin-is-loading"),document.body.classList.add("woocommerce-onboarding"),document.body.classList.add("woocommerce-profile-wizard__body"),document.body.classList.add("woocommerce-admin-full-screen"),document.body.classList.add("is-wp-toolbar-disabled"),Object(d.recordEvent)("storeprofiler_step_view",{step:this.getCurrentStep().key,wc_version:Object(u.getSetting)("wcVersion")})}componentWillUnmount(){document.body.classList.remove("woocommerce-onboarding"),document.body.classList.remove("woocommerce-profile-wizard__body"),document.body.classList.remove("woocommerce-admin-full-screen"),document.body.classList.remove("is-wp-toolbar-disabled")}getSteps(){const{profileItems:e}=this.props,t=[];return t.push({key:"store-details",container:pe,label:Object(n.__)("Store Details",'woocommerce'),isComplete:e.hasOwnProperty("setup_client")&&null!==e.setup_client}),t.push({key:"industry",container:te,label:Object(n.__)("Industry",'woocommerce'),isComplete:e.hasOwnProperty("industry")&&null!==e.industry}),t.push({key:"product-types",container:re,label:Object(n.__)("Product Types",'woocommerce'),isComplete:e.hasOwnProperty("product_types")&&null!==e.product_types}),t.push({key:"business-details",container:Q,label:Object(n.__)("Business Details",'woocommerce'),isComplete:e.hasOwnProperty("product_count")&&null!==e.product_count}),t.push({key:"theme",container:Le,label:Object(n.__)("Theme",'woocommerce'),isComplete:e.hasOwnProperty("theme")&&null!==e.theme}),Object(r.applyFilters)("woocommerce_admin_profile_wizard_steps",t)}getCurrentStep(){const{step:e}=this.props.query,t=this.getSteps().find(t=>t.key===e);return t||this.getSteps()[0]}async goToNextStep(e={}){const{activePlugins:t}=this.props,o=this.getCurrentStep(),s=this.getSteps().findIndex(e=>e.key===o.key);Object(d.recordEvent)("storeprofiler_step_complete",{step:o.key,wc_version:Object(u.getSetting)("wcVersion"),...e}),this.cachedActivePlugins=t;const n=this.getSteps()[s+1];if(void 0!==n)return Object(l.updateQueryString)({step:n.key});this.completeProfiler()}completeProfiler(){const{activePlugins:e,isJetpackConnected:t,notes:o,updateNote:s,updateProfileItems:n,connectToJetpack:r}=this.props;Object(d.recordEvent)("storeprofiler_complete");const c=e.includes("jetpack")&&!t,i=o.find(e=>"wc-admin-onboarding-profiler-reminder"===e.name);i&&s(i.id,{status:"actioned"}),n({completed:!0}).then(()=>{const e=new URL(Object(l.getNewPath)({},"/",{}),window.location.href).href;c?(document.body.classList.add("woocommerce-admin-is-loading"),r(()=>e)):window.location.href=e})}skipProfiler(){const{createNotice:e,updateProfileItems:t}=this.props;t({skipped:!0}).then(()=>{Object(d.recordEvent)("storeprofiler_store_details_skip"),Object(l.getHistory)().push(Object(l.getNewPath)({},"/",{}))}).catch(()=>{e("error",Object(n.__)("There was a problem skipping the setup wizard",'woocommerce'))})}render(){const{query:e}=this.props,t=this.getCurrentStep(),o=t.key,n=Object(s.createElement)(t.container,{query:e,step:t,goToNextStep:this.goToNextStep,skipProfiler:()=>{this.skipProfiler()}}),r=this.getSteps().map(e=>Object(i.pick)(e,["key","label","isComplete"])),c="woocommerce-profile-wizard__container "+o;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(ce,{currentStep:o,steps:r}),Object(s.createElement)("div",{className:c},n))}}t.default=Object(c.compose)(Object(a.withSelect)(e=>{const{getNotes:t}=e(m.NOTES_STORE_NAME),{getProfileItems:o,getOnboardingError:s}=e(m.ONBOARDING_STORE_NAME),{getActivePlugins:n,getPluginsError:r,isJetpackConnected:c}=e(m.PLUGINS_STORE_NAME),i=o(),a=t({page:1,per_page:m.QUERY_DEFAULTS.pageSize,type:"update",status:"unactioned"}),l=n();return{getPluginsError:r,isError:Boolean(s("updateProfileItems")),isJetpackConnected:c(),notes:a,profileItems:i,activePlugins:l}}),Object(a.withDispatch)(e=>{const{connectToJetpackWithFailureRedirect:t,createErrorNotice:o}=e(m.PLUGINS_STORE_NAME),{updateNote:s}=e(m.NOTES_STORE_NAME),{updateOptions:n}=e(m.OPTIONS_STORE_NAME),{updateProfileItems:r}=e(m.ONBOARDING_STORE_NAME),{createNotice:c}=e("core/notices");return{connectToJetpack:e=>{t(e,o,u.getAdminLink)},createNotice:c,updateNote:s,updateOptions:n,updateProfileItems:r}}),Object(K.d)("plugins")?Object(m.withPluginsHydration)({...Object(K.d)("plugins"),jetpackStatus:Object(K.d)("dataEndpoints",{}).jetpackStatus}):i.identity)(Fe)}}]);