Version Description
Download this release
Release Info
Developer | moon0326 |
Plugin | WooCommerce Admin |
Version | 2.6.1 |
Comparing to | |
See all releases |
Code changes from version 2.6.0 to 2.6.1
- changelog.txt +5 -1
- dist/chunks/task-list.js +27 -7
- dist/chunks/task-list.min.js +1 -1
- languages/woocommerce-admin.pot +39 -39
- readme.txt +1 -1
- src/Composer/Package.php +1 -1
- src/FeaturePlugin.php +1 -1
- vendor/autoload.php +1 -1
- vendor/autoload_packages.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/jetpack_autoload_psr4.php +1 -1
- vendor/jetpack-autoloader/class-autoloader-handler.php +1 -1
- vendor/jetpack-autoloader/class-autoloader-locator.php +1 -1
- vendor/jetpack-autoloader/class-autoloader.php +1 -1
- vendor/jetpack-autoloader/class-container.php +1 -1
- vendor/jetpack-autoloader/class-hook-manager.php +1 -1
- vendor/jetpack-autoloader/class-latest-autoloader-guard.php +1 -1
- vendor/jetpack-autoloader/class-manifest-reader.php +1 -1
- vendor/jetpack-autoloader/class-path-processor.php +1 -1
- vendor/jetpack-autoloader/class-php-autoloader.php +1 -1
- vendor/jetpack-autoloader/class-plugin-locator.php +1 -1
- vendor/jetpack-autoloader/class-plugins-handler.php +1 -1
- vendor/jetpack-autoloader/class-shutdown-handler.php +1 -1
- vendor/jetpack-autoloader/class-version-loader.php +1 -1
- vendor/jetpack-autoloader/class-version-selector.php +1 -1
- woocommerce-admin.php +1 -1
changelog.txt
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
-
== 2.6.
|
|
|
|
|
|
|
|
|
2 |
|
3 |
- Fix: Fixes action button mis-alignment within card footer. #7412
|
4 |
- Fix: Fixing issues with ReportTable component data not populating correctly #7355
|
1 |
+
== 2.6.1 09/01/2021 ==
|
2 |
+
|
3 |
+
- Update: Update marketing task completion logic. #7586
|
4 |
+
|
5 |
+
== 2.6.0 08/31/2021 ==
|
6 |
|
7 |
- Fix: Fixes action button mis-alignment within card footer. #7412
|
8 |
- Fix: Fixing issues with ReportTable component data not populating correctly #7355
|
dist/chunks/task-list.js
CHANGED
@@ -1213,11 +1213,16 @@ const getMarketingExtensionLists = (freeExtensions, activePlugins, installedPlug
|
|
1213 |
});
|
1214 |
return [installed, lists];
|
1215 |
};
|
1216 |
-
const Marketing_Marketing = (
|
|
|
|
|
1217 |
const [currentPlugin, setCurrentPlugin] = Object(external_wp_element_["useState"])(null);
|
1218 |
const {
|
1219 |
installAndActivatePlugins
|
1220 |
} = Object(external_wp_data_["useDispatch"])(external_wc_data_["PLUGINS_STORE_NAME"]);
|
|
|
|
|
|
|
1221 |
const {
|
1222 |
activePlugins,
|
1223 |
freeExtensions,
|
@@ -1248,6 +1253,13 @@ const Marketing_Marketing = () => {
|
|
1248 |
selected_extension: slug,
|
1249 |
installed_extensions: installedExtensions.map(extension => extension.slug)
|
1250 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1251 |
Object(notices["a" /* createNoticesFromResponse */])(response);
|
1252 |
setCurrentPlugin(null);
|
1253 |
}).catch(response => {
|
@@ -3748,7 +3760,8 @@ function getAllTasks({
|
|
3748 |
query,
|
3749 |
toggleCartModal,
|
3750 |
onTaskSelect,
|
3751 |
-
hasCompleteAddress
|
|
|
3752 |
}) {
|
3753 |
const {
|
3754 |
hasPaymentGateway,
|
@@ -3972,14 +3985,16 @@ function getAllTasks({
|
|
3972 |
key: 'marketing',
|
3973 |
title: Object(external_wp_i18n_["__"])('Set up marketing tools', 'woocommerce-admin'),
|
3974 |
content: Object(external_wp_i18n_["__"])('Add recommended marketing tools to reach new customers and grow your business', 'woocommerce-admin'),
|
3975 |
-
container: Object(external_wp_element_["createElement"])(Marketing_Marketing,
|
|
|
|
|
3976 |
onClick: () => {
|
3977 |
onTaskSelect('marketing');
|
3978 |
Object(external_wc_navigation_["updateQueryString"])({
|
3979 |
task: 'marketing'
|
3980 |
});
|
3981 |
},
|
3982 |
-
completed: !!installedMarketingExtensions.length,
|
3983 |
visible: window.wcAdminFeatures && window.wcAdminFeatures['remote-free-extensions'] && (!!marketingExtensionsLists.length || !!installedMarketingExtensions.length),
|
3984 |
time: Object(external_wp_i18n_["__"])('1 minute', 'woocommerce-admin'),
|
3985 |
type: 'setup'
|
@@ -4458,6 +4473,7 @@ var placeholder = __webpack_require__(535);
|
|
4458 |
|
4459 |
|
4460 |
|
|
|
4461 |
|
4462 |
const taskDashboardSelect = select => {
|
4463 |
const {
|
@@ -4477,7 +4493,8 @@ const taskDashboardSelect = select => {
|
|
4477 |
isJetpackConnected
|
4478 |
} = select(external_wc_data_["PLUGINS_STORE_NAME"]);
|
4479 |
const profileItems = getProfileItems();
|
4480 |
-
const trackedCompletedTasks = getOption('woocommerce_task_list_tracked_completed_tasks') ||
|
|
|
4481 |
const {
|
4482 |
general: generalSettings = {}
|
4483 |
} = getSettings('general');
|
@@ -4503,6 +4520,7 @@ const taskDashboardSelect = select => {
|
|
4503 |
isSetupTaskListHidden: getOption('woocommerce_task_list_hidden') === 'yes',
|
4504 |
isTaskListComplete: getOption('woocommerce_task_list_complete') === 'yes',
|
4505 |
installedPlugins,
|
|
|
4506 |
onboardingStatus,
|
4507 |
profileItems,
|
4508 |
trackedCompletedTasks,
|
@@ -4538,7 +4556,8 @@ const TaskDashboard = ({
|
|
4538 |
isTaskListComplete,
|
4539 |
isExtendedTaskListHidden,
|
4540 |
isExtendedTaskListComplete,
|
4541 |
-
hasCompleteAddress
|
|
|
4542 |
} = Object(external_wp_data_["useSelect"])(taskDashboardSelect);
|
4543 |
const [isCartModalOpen, setIsCartModalOpen] = Object(external_wp_element_["useState"])(false);
|
4544 |
const [isLoadingExperiment, experimentAssignment] = Object(external_wc_explat_["useExperiment"])('woocommerce_tasklist_progression');
|
@@ -4642,7 +4661,8 @@ const TaskDashboard = ({
|
|
4642 |
query,
|
4643 |
toggleCartModal,
|
4644 |
onTaskSelect,
|
4645 |
-
hasCompleteAddress
|
|
|
4646 |
});
|
4647 |
const {
|
4648 |
extension,
|
1213 |
});
|
1214 |
return [installed, lists];
|
1215 |
};
|
1216 |
+
const Marketing_Marketing = ({
|
1217 |
+
trackedCompletedActions
|
1218 |
+
}) => {
|
1219 |
const [currentPlugin, setCurrentPlugin] = Object(external_wp_element_["useState"])(null);
|
1220 |
const {
|
1221 |
installAndActivatePlugins
|
1222 |
} = Object(external_wp_data_["useDispatch"])(external_wc_data_["PLUGINS_STORE_NAME"]);
|
1223 |
+
const {
|
1224 |
+
updateOptions
|
1225 |
+
} = Object(external_wp_data_["useDispatch"])(external_wc_data_["OPTIONS_STORE_NAME"]);
|
1226 |
const {
|
1227 |
activePlugins,
|
1228 |
freeExtensions,
|
1253 |
selected_extension: slug,
|
1254 |
installed_extensions: installedExtensions.map(extension => extension.slug)
|
1255 |
});
|
1256 |
+
|
1257 |
+
if (!trackedCompletedActions.includes('marketing')) {
|
1258 |
+
updateOptions({
|
1259 |
+
woocommerce_task_list_tracked_completed_actions: [...trackedCompletedActions, 'marketing']
|
1260 |
+
});
|
1261 |
+
}
|
1262 |
+
|
1263 |
Object(notices["a" /* createNoticesFromResponse */])(response);
|
1264 |
setCurrentPlugin(null);
|
1265 |
}).catch(response => {
|
3760 |
query,
|
3761 |
toggleCartModal,
|
3762 |
onTaskSelect,
|
3763 |
+
hasCompleteAddress,
|
3764 |
+
trackedCompletedActions
|
3765 |
}) {
|
3766 |
const {
|
3767 |
hasPaymentGateway,
|
3985 |
key: 'marketing',
|
3986 |
title: Object(external_wp_i18n_["__"])('Set up marketing tools', 'woocommerce-admin'),
|
3987 |
content: Object(external_wp_i18n_["__"])('Add recommended marketing tools to reach new customers and grow your business', 'woocommerce-admin'),
|
3988 |
+
container: Object(external_wp_element_["createElement"])(Marketing_Marketing, {
|
3989 |
+
trackedCompletedActions: trackedCompletedActions
|
3990 |
+
}),
|
3991 |
onClick: () => {
|
3992 |
onTaskSelect('marketing');
|
3993 |
Object(external_wc_navigation_["updateQueryString"])({
|
3994 |
task: 'marketing'
|
3995 |
});
|
3996 |
},
|
3997 |
+
completed: !!installedMarketingExtensions.length && trackedCompletedActions.includes('marketing') || !marketingExtensionsLists.length,
|
3998 |
visible: window.wcAdminFeatures && window.wcAdminFeatures['remote-free-extensions'] && (!!marketingExtensionsLists.length || !!installedMarketingExtensions.length),
|
3999 |
time: Object(external_wp_i18n_["__"])('1 minute', 'woocommerce-admin'),
|
4000 |
type: 'setup'
|
4473 |
|
4474 |
|
4475 |
|
4476 |
+
const EMPTY_ARRAY = [];
|
4477 |
|
4478 |
const taskDashboardSelect = select => {
|
4479 |
const {
|
4493 |
isJetpackConnected
|
4494 |
} = select(external_wc_data_["PLUGINS_STORE_NAME"]);
|
4495 |
const profileItems = getProfileItems();
|
4496 |
+
const trackedCompletedTasks = getOption('woocommerce_task_list_tracked_completed_tasks') || EMPTY_ARRAY;
|
4497 |
+
const trackedCompletedActions = getOption('woocommerce_task_list_tracked_completed_actions') || EMPTY_ARRAY;
|
4498 |
const {
|
4499 |
general: generalSettings = {}
|
4500 |
} = getSettings('general');
|
4520 |
isSetupTaskListHidden: getOption('woocommerce_task_list_hidden') === 'yes',
|
4521 |
isTaskListComplete: getOption('woocommerce_task_list_complete') === 'yes',
|
4522 |
installedPlugins,
|
4523 |
+
trackedCompletedActions,
|
4524 |
onboardingStatus,
|
4525 |
profileItems,
|
4526 |
trackedCompletedTasks,
|
4556 |
isTaskListComplete,
|
4557 |
isExtendedTaskListHidden,
|
4558 |
isExtendedTaskListComplete,
|
4559 |
+
hasCompleteAddress,
|
4560 |
+
trackedCompletedActions
|
4561 |
} = Object(external_wp_data_["useSelect"])(taskDashboardSelect);
|
4562 |
const [isCartModalOpen, setIsCartModalOpen] = Object(external_wp_element_["useState"])(false);
|
4563 |
const [isLoadingExperiment, experimentAssignment] = Object(external_wc_explat_["useExperiment"])('woocommerce_tasklist_progression');
|
4661 |
query,
|
4662 |
toggleCartModal,
|
4663 |
onTaskSelect,
|
4664 |
+
hasCompleteAddress,
|
4665 |
+
trackedCompletedActions
|
4666 |
});
|
4667 |
const {
|
4668 |
extension,
|
dist/chunks/task-list.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[49],{162:function(e,t,o){"use strict";o.d(t,"a",(function(){return s}));var c=o(14),n=o(15);const s=(e,t={})=>{const{pathname:o,search:s}=window.location,a=Object(n.f)("connectNonce","");return t={"wccom-site":Object(n.f)("siteUrl"),"wccom-back":o+s,"wccom-woo-version":Object(n.f)("wcVersion"),"wccom-connect-nonce":a,...t},Object(c.addQueryArgs)(e,t)}},470:function(e,t,o){"use strict";var c=o(0),n=o(8),s=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=s},472:function(e,t,o){"use strict";var c=o(0),n=o(8),s=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=s},522:function(e,t,o){"use strict";o.d(t,"a",(function(){return c})),o.d(t,"b",(function(){return n}));const c=(e,t,o="undefined")=>e&&Array.isArray(e)&&e.length?t?e.reduce((e,c)=>(c[t]||(c[t]=o),(e[c[t]]=e[c[t]]||[]).push(c),e),{}):e:{},n=(e,t)=>Object.entries(e).reduce((e,[o])=>({...e,[o]:t}),{})},523:function(e,t,o){"use strict";o.d(t,"b",(function(){return p})),o.d(t,"a",(function(){return u}));var c=o(35),n=o.n(c),s=o(0),a=o(2),i=o(28),r=o(3),l=o(15),m=o(21);const{countries:d}=Object(l.f)("dataEndpoints",{countries:{}});function p(e){const t={};return e.addressLine1.trim().length||(t.addressLine1=Object(a.__)("Please add an address","woocommerce-admin")),e.countryState.trim().length||(t.countryState=Object(a.__)("Please select a country / region","woocommerce-admin")),e.city.trim().length||(t.city=Object(a.__)("Please add a city","woocommerce-admin")),e.postCode.trim().length||(t.postCode=Object(a.__)("Please add a post code","woocommerce-admin")),t}function u(e){const{getInputProps:t,setValue:o}=e,c=Object(s.useMemo)(()=>d.reduce((e,t)=>{if(!t.states.length)return e.push({key:t.code,label:Object(i.decodeEntities)(t.name)}),e;const o=t.states.map(e=>({key:t.code+":"+e.code,label:Object(i.decodeEntities)(t.name)+" — "+Object(i.decodeEntities)(e.name)}));return e.push(...o),e},[]),[]),l=function(e,t,o){const[c,n]=Object(s.useState)(""),[a,i]=Object(s.useState)("");return Object(s.useEffect)(()=>{let n=[];const s=new RegExp(Object(r.escapeRegExp)(c),"i");if((a.length||c.length)&&(n=e.filter(e=>s.test(e.label))),c.length&&a.length){const e=new RegExp(Object(r.escapeRegExp)(a.replace(/\s/g,"")),"i");if(n=n.filter(t=>e.test(t.label.replace("-","").replace(/\s/g,""))),n.length>1){let e=[];e=n.filter(e=>s.test(e.key)),e.length>0&&(n=e)}if(n.length>1){let t=[];t=n.filter(t=>e.test(t.key)),1===t.length&&(n=t)}}1===n.length&&t!==n[0].key&&o("countryState",n[0].key)},[c,a,t,e,o]),Object(s.createElement)(s.Fragment,null,Object(s.createElement)("input",{onChange:e=>n(e.target.value),value:c,name:"country",type:"text",className:"woocommerce-select-control__autofill-input",tabIndex:"-1",autoComplete:"country"}),Object(s.createElement)("input",{onChange:e=>i(e.target.value),value:a,name:"state",type:"text",className:"woocommerce-select-control__autofill-input",tabIndex:"-1",autoComplete:"address-level1"}))}(c,t("countryState").value,o);return Object(s.createElement)("div",{className:"woocommerce-store-address-fields"},Object(s.createElement)(m.TextControl,n()({label:Object(a.__)("Address line 1","woocommerce-admin"),required:!0,autoComplete:"address-line1"},t("addressLine1"))),Object(s.createElement)(m.TextControl,n()({label:Object(a.__)("Address line 2 (optional)","woocommerce-admin"),required:!0,autoComplete:"address-line2"},t("addressLine2"))),Object(s.createElement)(m.SelectControl,n()({label:Object(a.__)("Country / Region","woocommerce-admin"),required:!0,options:c,excludeSelectedOptions:!1,showAllOnFocus:!0,isSearchable:!0},t("countryState"),{controlClassName:t("countryState").className}),l),Object(s.createElement)(m.TextControl,n()({label:Object(a.__)("City","woocommerce-admin"),required:!0},t("city"),{autoComplete:"address-level2"})),Object(s.createElement)(m.TextControl,n()({label:Object(a.__)("Post code","woocommerce-admin"),required:!0,autoComplete:"postal-code"},t("postCode"))))}},533:function(e,t,o){},585:function(e,t,o){},586:function(e,t,o){},587:function(e,t,o){},588:function(e,t,o){},589:function(e,t,o){},590:function(e,t,o){},603:function(e,t,o){"use strict";o.r(t);var c=o(0),n=o(2),s=o(4),a=o(472),i=o(7),r=o(11),l=o(122),m=o(16),d=o(21),p=(o(536),o(13)),u=o(3),_=o(28),b=o(15),g=o(59),h=o(504),O=o(162);class j extends c.Component{constructor(e){super(e),this.state={purchaseNowButtonBusy:!1,purchaseLaterButtonBusy:!1}}onClickPurchaseNow(){const{productIds:e,onClickPurchaseNow:t}=this.props;if(this.setState({purchaseNowButtonBusy:!0}),!e.length)return;Object(m.recordEvent)("tasklist_modal_proceed_checkout",{product_ids:e,purchase_install:!0});const o=Object(O.a)("https://woocommerce.com/cart?utm_medium=product",{"wccom-replace-with":e.join(",")});t?t(o):window.location=o}onClickPurchaseLater(){const{productIds:e}=this.props;Object(m.recordEvent)("tasklist_modal_proceed_checkout",{product_ids:e,purchase_install:!1}),this.setState({purchaseLaterButtonBusy:!0}),this.props.onClickPurchaseLater()}onClose(){const{onClose:e,productIds:t}=this.props;Object(m.recordEvent)("tasklist_modal_proceed_checkout",{product_ids:t,purchase_install:!1}),e()}renderProducts(){const{productIds:e}=this.props,{productTypes:t={},themes:o=[]}=Object(b.f)("onboarding",{}),s=[];return e.forEach(e=>{const a=Object(u.find)(t,t=>t.product===e);a&&s.push({title:a.label,content:a.description});const i=Object(u.find)(o,t=>t.id===e);i&&s.push({title:Object(n.sprintf)(Object(n.__)("%s — %s per year","woocommerce-admin"),i.title,Object(_.decodeEntities)(i.price)),content:Object(c.createElement)("span",{dangerouslySetInnerHTML:Object(h.a)(i.excerpt)})})}),Object(c.createElement)(d.List,{items:s})}render(){const{purchaseNowButtonBusy:e,purchaseLaterButtonBusy:t}=this.state;return Object(c.createElement)(s.Modal,{title:Object(n.__)("Would you like to add the following paid features to your store now?","woocommerce-admin"),onRequestClose:()=>this.onClose(),className:"woocommerce-cart-modal"},this.renderProducts(),Object(c.createElement)("p",{className:"woocommerce-cart-modal__help-text"},Object(n.__)("You won't have access to this functionality until the extensions have been purchased and installed.","woocommerce-admin")),Object(c.createElement)("div",{className:"woocommerce-cart-modal__actions"},Object(c.createElement)(s.Button,{isLink:!0,isBusy:t,onClick:()=>this.onClickPurchaseLater()},Object(n.__)("I'll do it later","woocommerce-admin")),Object(c.createElement)(s.Button,{isPrimary:!0,isBusy:e,onClick:()=>this.onClickPurchaseNow()},Object(n.__)("Buy now","woocommerce-admin"))))}}var w=Object(p.compose)(Object(i.withSelect)(e=>{const{getInstalledPlugins:t}=e(r.PLUGINS_STORE_NAME),{getProfileItems:o}=e(r.ONBOARDING_STORE_NAME),c=o(),n=t();return{profileItems:c,productIds:Object(g.e)(c,!1,n)}}))(j),y=o(30),k=o(12),E=o(17),S=o.n(E);class v extends c.Component{constructor(e){super(e);const{hasHomepage:t,hasProducts:o}=e.tasksStatus;this.stepVisibility={homepage:!t,import:!o},this.state={isDirty:!1,isPending:!1,logo:null,stepIndex:0,isUpdatingLogo:!1,isUpdatingNotice:!1,storeNoticeText:e.demoStoreNotice||""},this.completeStep=this.completeStep.bind(this),this.createHomepage=this.createHomepage.bind(this),this.importProducts=this.importProducts.bind(this),this.updateLogo=this.updateLogo.bind(this),this.updateNotice=this.updateNotice.bind(this)}componentDidMount(){const{themeMods:e}=this.props.tasksStatus;e&&e.custom_logo&&this.setState({logo:{id:e.custom_logo}})}componentDidUpdate(e){const{isPending:t,logo:o}=this.state,{demoStoreNotice:c}=this.props;!o||o.url||t||(this.setState({isPending:!0}),wp.media.attachment(o.id).fetch().then(()=>{const e=wp.media.attachment(o.id).get("url");this.setState({isPending:!1,logo:{id:o.id,url:e}})})),c&&e.demoStoreNotice!==c&&this.setState({storeNoticeText:c})}completeStep(){const{stepIndex:e}=this.state;this.getSteps()[e+1]?this.setState({stepIndex:e+1}):Object(k.getHistory)().push(Object(k.getNewPath)({},"/",{}))}importProducts(){const{clearTaskStatusCache:e,createNotice:t}=this.props;this.setState({isPending:!0}),Object(m.recordEvent)("tasklist_appearance_import_demo",{}),S()({path:r.WC_ADMIN_NAMESPACE+"/onboarding/tasks/import_sample_products",method:"POST"}).then(o=>{o.failed&&o.failed.length?t("error",Object(n.__)("There was an error importing some of the sample products","woocommerce-admin")):(t("success",Object(n.__)("All sample products have been imported","woocommerce-admin")),e()),this.setState({isPending:!1}),this.completeStep()}).catch(e=>{t("error",e.message),this.setState({isPending:!1})})}createHomepage(){const{clearTaskStatusCache:e,createNotice:t}=this.props;this.setState({isPending:!0}),Object(m.recordEvent)("tasklist_appearance_create_homepage",{create_homepage:!0}),S()({path:"/wc-admin/onboarding/tasks/create_homepage",method:"POST"}).then(o=>{e(),t(o.status,o.message,{actions:o.edit_post_link?[{label:Object(n.__)("Customize","woocommerce-admin"),onClick:()=>{Object(m.queueRecordEvent)("tasklist_appearance_customize_homepage",{}),window.location=o.edit_post_link+"&wc_onboarding_active_task=homepage"}}]:null}),this.setState({isPending:!1}),this.completeStep()}).catch(e=>{t("error",e.message),this.setState({isPending:!1})})}async updateLogo(){const{clearTaskStatusCache:e,createNotice:t,stylesheet:o,themeMods:c,updateOptions:s}=this.props,{logo:a}=this.state,i={...c,custom_logo:a?a.id:null};Object(m.recordEvent)("tasklist_appearance_upload_logo"),this.setState({isUpdatingLogo:!0});const r=await s({["theme_mods_"+o]:i});e(),r.success?(this.setState({isUpdatingLogo:!1}),t("success",Object(n.__)("Store logo updated sucessfully","woocommerce-admin")),this.completeStep()):t("error",r.message)}async updateNotice(){const{clearTaskStatusCache:e,createNotice:t,updateOptions:o}=this.props,{storeNoticeText:c}=this.state;Object(m.recordEvent)("tasklist_appearance_set_store_notice",{added_text:Boolean(c.length)}),this.setState({isUpdatingNotice:!0});const s=await o({woocommerce_task_list_appearance_complete:!0,woocommerce_demo_store:c.length?"yes":"no",woocommerce_demo_store_notice:c});e(),s.success?(this.setState({isUpdatingNotice:!1}),t("success",Object(n.__)("🎨 Your store is looking great! Don't forget to continue personalizing it","woocommerce-admin")),this.completeStep()):t("error",s.message)}getSteps(){const{isDirty:e,isPending:t,logo:o,storeNoticeText:a,isUpdatingLogo:i}=this.state,r=[{key:"import",label:Object(n.__)("Import sample products","woocommerce-admin"),description:Object(n.__)("We’ll add some products that will make it easier to see what your store looks like","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.Button,{onClick:this.importProducts,isBusy:t,isPrimary:!0},Object(n.__)("Import products","woocommerce-admin")),Object(c.createElement)(s.Button,{onClick:()=>this.completeStep()},Object(n.__)("Skip","woocommerce-admin"))),visible:this.stepVisibility.import},{key:"homepage",label:Object(n.__)("Create a custom homepage","woocommerce-admin"),description:Object(n.__)("Create a new homepage and customize it to suit your needs","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.Button,{isPrimary:!0,isBusy:t,onClick:this.createHomepage},Object(n.__)("Create homepage","woocommerce-admin")),Object(c.createElement)(s.Button,{isTertiary:!0,onClick:()=>{Object(m.recordEvent)("tasklist_appearance_create_homepage",{create_homepage:!1}),this.completeStep()}},Object(n.__)("Skip","woocommerce-admin"))),visible:this.stepVisibility.homepage},{key:"logo",label:Object(n.__)("Upload a logo","woocommerce-admin"),description:Object(n.__)("Ensure your store is on-brand by adding your logo","woocommerce-admin"),content:t?null:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(d.ImageUpload,{image:o,onChange:e=>this.setState({isDirty:!0,logo:e})}),Object(c.createElement)(s.Button,{disabled:!o&&!e,onClick:this.updateLogo,isBusy:i,isPrimary:!0},Object(n.__)("Proceed","woocommerce-admin")),Object(c.createElement)(s.Button,{isTertiary:!0,onClick:()=>this.completeStep()},Object(n.__)("Skip","woocommerce-admin"))),visible:!0},{key:"notice",label:Object(n.__)("Set a store notice","woocommerce-admin"),description:Object(n.__)("Optionally display a prominent notice across all pages of your store","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(d.TextControl,{label:Object(n.__)("Store notice text","woocommerce-admin"),placeholder:Object(n.__)("Store notice text","woocommerce-admin"),value:a,onChange:e=>this.setState({storeNoticeText:e})}),Object(c.createElement)(s.Button,{onClick:this.updateNotice,isPrimary:!0},Object(n.__)("Complete task","woocommerce-admin"))),visible:!0}];return Object(u.filter)(r,e=>e.visible)}render(){const{isPending:e,stepIndex:t,isUpdatingLogo:o,isUpdatingNotice:n}=this.state,a=this.getSteps()[t].key;return Object(c.createElement)("div",{className:"woocommerce-task-appearance"},Object(c.createElement)(s.Card,{className:"woocommerce-task-card"},Object(c.createElement)(s.CardBody,null,Object(c.createElement)(d.Stepper,{isPending:n||o||e,isVertical:!0,currentStep:a,steps:this.getSteps()}))))}}var f=Object(p.compose)(Object(i.withSelect)(e=>{const{getOption:t}=e(r.OPTIONS_STORE_NAME),{getTasksStatus:o}=e(r.ONBOARDING_STORE_NAME),c=o();return{demoStoreNotice:t("woocommerce_demo_store_notice"),stylesheet:t("stylesheet"),tasksStatus:c}}),Object(i.withDispatch)(e=>{const{createNotice:t}=e("core/notices"),{updateOptions:o}=e(r.OPTIONS_STORE_NAME),{invalidateResolutionForStoreSelector:c}=e(r.ONBOARDING_STORE_NAME);return{clearTaskStatusCache:()=>c("getTasksStatus"),createNotice:t,updateOptions:o}}))(v),C=o(20),x=(o(585),o(505));o(586);const N=({description:e,imageUrl:t,installAndActivate:o=(()=>{}),isActive:a,isBusy:i,isDisabled:r,isInstalled:l,manageUrl:d,name:p,slug:u})=>Object(c.createElement)("div",{className:"woocommerce-plugin-list__plugin"},t&&Object(c.createElement)("div",{className:"woocommerce-plugin-list__plugin-logo"},Object(c.createElement)("img",{src:t,alt:Object(n.sprintf)(Object(n.__)("%s logo","woocommerce-admin"),p)})),Object(c.createElement)("div",{className:"woocommerce-plugin-list__plugin-text"},Object(c.createElement)(C.Text,{variant:"subtitle.small",as:"h4"},p),Object(c.createElement)(C.Text,{variant:"subtitle.small"},e)),Object(c.createElement)("div",{className:"woocommerce-plugin-list__plugin-action"},a&&d&&Object(c.createElement)(s.Button,{disabled:r,isBusy:i,isSecondary:!0,href:Object(b.e)(d),onClick:()=>Object(m.recordEvent)("marketing_manage",{extension_name:u})},Object(n.__)("Manage","woocommmerce-admin")),l&&!a&&Object(c.createElement)(s.Button,{disabled:r,isBusy:i,isSecondary:!0,onClick:()=>o(u)},Object(n.__)("Activate","woocommmerce-admin")),!l&&Object(c.createElement)(s.Button,{disabled:r,isBusy:i,isSecondary:!0,onClick:()=>o(u)},Object(n.__)("Get started","woocommmerce-admin"))));o(587);const T=({currentPlugin:e,installAndActivate:t=(()=>{}),plugins:o=[],title:n})=>Object(c.createElement)("div",{className:"woocommerce-plugin-list"},n&&Object(c.createElement)("div",{className:"woocommerce-plugin-list__title"},Object(c.createElement)(C.Text,{variant:"sectionheading",as:"h3"},n)),o.map(o=>{const{description:n,imageUrl:s,isActive:a,isInstalled:i,manageUrl:r,slug:l,name:m}=o;return Object(c.createElement)(N,{key:l,description:n,manageUrl:r,name:m,imageUrl:s,installAndActivate:t,isActive:a,isBusy:e===l,isDisabled:!!e,isInstalled:i,slug:l})})),P=["reach","grow"],A=(e,t,o)=>{const c=[],n=[];return e.forEach(e=>{if(!P.includes(e.key))return;const s=[];if(e.plugins.forEach(e=>{const n=((e,t,o)=>{const{description:c,image_url:n,key:s,manage_url:a,name:i}=e,r=s.split(":")[0];return{description:c,slug:r,imageUrl:n,isActive:t.includes(r),isInstalled:o.includes(r),manageUrl:a,name:i}})(e,t,o);n.isInstalled?c.push(n):s.push(n)}),!s.length)return;const a={...e,plugins:s};n.push(a)}),[c,n]},I=()=>{const[e,t]=Object(c.useState)(null),{installAndActivatePlugins:o}=Object(i.useDispatch)(r.PLUGINS_STORE_NAME),{activePlugins:a,freeExtensions:l,installedPlugins:d,isResolving:p}=Object(i.useSelect)(e=>{const{getActivePlugins:t,getInstalledPlugins:o}=e(r.PLUGINS_STORE_NAME),{getFreeExtensions:c,hasFinishedResolution:n}=e(r.ONBOARDING_STORE_NAME);return{activePlugins:t(),freeExtensions:c(),installedPlugins:o(),isResolving:!n("getFreeExtensions")}}),[u,_]=Object(c.useMemo)(()=>A(l,a,d),[d,a,l]),b=e=>{t(e),o([e]).then(o=>{Object(m.recordEvent)("tasklist_marketing_install",{selected_extension:e,installed_extensions:u.map(e=>e.slug)}),Object(x.a)(o),t(null)}).catch(e=>{Object(x.a)(e),t(null)})};return p?Object(c.createElement)(s.Spinner,null):Object(c.createElement)("div",{className:"woocommerce-task-marketing"},!!u.length&&Object(c.createElement)(s.Card,{className:"woocommerce-task-card"},Object(c.createElement)(s.CardHeader,null,Object(c.createElement)(C.Text,{variant:"title.small",as:"h2",className:"woocommerce-task-card__title"},Object(n.__)("Installed marketing extensions","woocommerce-admin"))),Object(c.createElement)(T,{currentPlugin:e,plugins:u})),!!_.length&&Object(c.createElement)(s.Card,{className:"woocommerce-task-card"},Object(c.createElement)(s.CardHeader,null,Object(c.createElement)(C.Text,{variant:"title.small",as:"h2",className:"woocommerce-task-card__title"},Object(n.__)("Recommended marketing extensions","woocommerce-admin")),Object(c.createElement)(C.Text,{as:"span"},Object(n.__)('We recommend adding one of the following marketing tools for your store. The extension will be installed and activated for you when you click "Get started".',"woocommerce-admin"))),_.map(t=>{const{key:o,title:n,plugins:s}=t;return Object(c.createElement)(T,{currentPlugin:e,installAndActivate:b,key:o,plugins:s,title:n})})))};var R=o(115),M=o(8),B=Object(c.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(M.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),G=o(470),L=Object(c.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(c.createElement)(M.Path,{d:"M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"})),U=Object(c.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)(M.Path,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5zM8 12.8h8v-1.5H8v1.5zm0 3h8v-1.5H8v1.5z"})),F=Object(c.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(M.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"}));o(588);const D=[{key:"physical",title:Object(n.__)("Physical product","woocommerce-admin"),subtitle:Object(n.__)("Tangible items that get delivered to customers","woocommerce-admin")},{key:"digital",title:Object(n.__)("Digital product","woocommerce-admin"),subtitle:Object(n.__)("Items that customers download or access through your website","woocommerce-admin")},{key:"variable",title:Object(n.__)("Variable product","woocommerce-admin"),subtitle:Object(n.__)("Products with several versions that customers can choose from","woocommerce-admin")}];function z({onClose:e}){const[t,o]=Object(c.useState)(null),[a,l]=Object(c.useState)(!1),{createProductFromTemplate:d}=Object(i.useDispatch)(r.ITEMS_STORE_NAME),p=Object(y.applyFilters)("woocommerce_admin_onboarding_product_templates",D);return Object(c.createElement)(s.Modal,{title:Object(n.__)("Start with a template"),isDismissible:!0,onRequestClose:()=>e(),className:"woocommerce-product-template-modal"},Object(c.createElement)("div",{className:"woocommerce-product-template-modal__wrapper"},Object(c.createElement)("div",{className:"woocommerce-product-template-modal__list"},Object(c.createElement)(s.RadioControl,{selected:t,options:p.map(e=>({label:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("span",{className:"woocommerce-product-template-modal__list-title"},e.title),Object(c.createElement)("span",{className:"woocommerce-product-template-modal__list-subtitle"},e.subtitle)),value:e.key})),onChange:o})),Object(c.createElement)("div",{className:"woocommerce-product-template-modal__actions"},Object(c.createElement)(s.Button,{isPrimary:!0,isBusy:a,disabled:!t||a,onClick:()=>{l(!0),Object(m.recordEvent)("tasklist_product_template_selection",{product_type:t}),t?d({template_name:t,status:"draft"},{_fields:["id"]}).then(e=>{if(e&&e.id){const t=Object(b.e)(`post.php?post=${e.id}&action=edit&wc_onboarding_active_task=products&tutorial=true`);window.location=t}},e=>{Object(x.a)(e),l(!1)}):e&&(Object(m.recordEvent)("tasklist_product_template_dismiss"),e())}},Object(n.__)("Go")))))}const H=[{key:"addProductTemplate",title:Object(c.createElement)(c.Fragment,null,Object(n.__)("Start with a template","woocommerce-admin"),Object(c.createElement)(d.Pill,null,Object(n.__)("Recommended","woocommerce-admin"))),content:Object(n.__)("Use a template to add physical, digital, and variable products","woocommerce-admin"),before:Object(c.createElement)(R.a,{icon:B}),after:Object(c.createElement)(R.a,{icon:G.a}),onClick:()=>Object(m.recordEvent)("tasklist_add_product",{method:"product_template"})},{key:"addProductManually",title:Object(n.__)("Add manually","woocommerce-admin"),content:Object(n.__)("For small stores we recommend adding products manually","woocommerce-admin"),before:Object(c.createElement)(R.a,{icon:L}),after:Object(c.createElement)(R.a,{icon:G.a}),onClick:()=>Object(m.recordEvent)("tasklist_add_product",{method:"manually"}),href:Object(b.e)("post-new.php?post_type=product&wc_onboarding_active_task=products&tutorial=true")},{key:"importProducts",title:Object(n.__)("Import via CSV","woocommerce-admin"),content:Object(n.__)("For larger stores we recommend importing all products at once via CSV file","woocommerce-admin"),before:Object(c.createElement)(R.a,{icon:U}),after:Object(c.createElement)(R.a,{icon:G.a}),onClick:()=>Object(m.recordEvent)("tasklist_add_product",{method:"import"}),href:Object(b.e)("edit.php?post_type=product&page=product_importer&wc_onboarding_active_task=product-import")},{key:"migrateProducts",title:Object(n.__)("Import from another service","woocommerce-admin"),content:Object(n.__)("For stores currently selling elsewhere we suggest using a product migration service","woocommerce-admin"),before:Object(c.createElement)(R.a,{icon:F}),after:Object(c.createElement)(R.a,{icon:G.a}),onClick:()=>Object(m.recordEvent)("tasklist_add_product",{method:"migrate"}),href:"https://woocommerce.com/products/cart2cart/?utm_medium=product",target:"_blank"}];function q(){const[e,t]=Object(c.useState)(null),o=H.map(e=>({...e,onClick:()=>(e=>{e.onClick(),"addProductTemplate"===e.key&&t(!0)})(e)}));return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.Card,{className:"woocommerce-task-card"},Object(c.createElement)(s.CardBody,{size:null},Object(c.createElement)(d.List,{items:o}))),e?Object(c.createElement)(z,{onClose:()=>t(null)}):null)}var V=o(35),J=o.n(V),W=o(18),Y=o.n(W),Z=o(1),$=o.n(Z);class Q extends c.Component{constructor(e){super(e),this.state={isConnecting:!1},this.connectJetpack=this.connectJetpack.bind(this),e.setIsPending(!0)}componentDidUpdate(e){const{createNotice:t,error:o,isRequesting:c,onError:n,setIsPending:s}=this.props;e.isRequesting&&!c&&s(!1),o&&o!==e.error&&(n&&n(),t("error",o))}async connectJetpack(){const{jetpackConnectUrl:e,onConnect:t}=this.props;this.setState({isConnecting:!0},()=>{t&&t(),window.location=e})}render(){const{hasErrors:e,isRequesting:t,onSkip:o,skipText:a,onAbort:i,abortText:r}=this.props;return Object(c.createElement)(c.Fragment,null,e?Object(c.createElement)(s.Button,{isPrimary:!0,onClick:()=>window.location.reload()},Object(n.__)("Retry","woocommerce-admin")):Object(c.createElement)(s.Button,{disabled:t,isBusy:this.state.isConnecting,isPrimary:!0,onClick:this.connectJetpack},Object(n.__)("Connect","woocommerce-admin")),o&&Object(c.createElement)(s.Button,{onClick:o},a||Object(n.__)("No thanks","woocommerce-admin")),i&&Object(c.createElement)(s.Button,{onClick:i},r||Object(n.__)("Abort","woocommerce-admin")))}}Q.propTypes={createNotice:$.a.func.isRequired,error:$.a.string,hasErrors:$.a.bool,isRequesting:$.a.bool,jetpackConnectUrl:$.a.string,onConnect:$.a.func,onError:$.a.func,onSkip:$.a.func,redirectUrl:$.a.string,skipText:$.a.string,setIsPending:$.a.func,onAbort:$.a.func,abortText:$.a.string},Q.defaultProps={setIsPending:()=>{}};var K=Object(p.compose)(Object(i.withSelect)((e,t)=>{const{getJetpackConnectUrl:o,isPluginsRequesting:c,getPluginsError:n}=e(r.PLUGINS_STORE_NAME),s={redirect_url:t.redirectUrl||window.location.href},a=c("getJetpackConnectUrl");return{error:n("getJetpackConnectUrl")||"",isRequesting:a,jetpackConnectUrl:o(s)}}),Object(i.withDispatch)(e=>{const{createNotice:t}=e("core/notices");return{createNotice:t}}))(Q),X=o(523);class ee extends c.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this)}async onSubmit(e){const{onComplete:t,createNotice:o,isSettingsError:c,updateAndPersistSettingsForGroup:s,settings:a}=this.props;await s("general",{general:{...a,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}}),c?o("error",Object(n.__)("There was a problem saving your store location","woocommerce-admin")):t(e)}getInitialValues(){const{settings:e}=this.props,{woocommerce_store_address:t,woocommerce_store_address_2:o,woocommerce_store_city:c,woocommerce_default_country:n,woocommerce_store_postcode:s}=e;return{addressLine1:t||"",addressLine2:o||"",city:c||"",countryState:n||"",postCode:s||""}}render(){const{isSettingsRequesting:e}=this.props;return e?null:Object(c.createElement)(d.Form,{initialValues:this.getInitialValues(),onSubmit:this.onSubmit,validate:X.b},({getInputProps:e,handleSubmit:t,setValue:o})=>Object(c.createElement)(c.Fragment,null,Object(c.createElement)(X.a,{getInputProps:e,setValue:o}),Object(c.createElement)(s.Button,{isPrimary:!0,onClick:t},Object(n.__)("Continue","woocommerce-admin"))))}}var te=Object(c.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(c.createElement)(M.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),oe=o(497);class ce extends c.Component{constructor(){super(...arguments),this.updateShippingZones=this.updateShippingZones.bind(this)}getShippingMethods(e,t=null){return e&&e.methods&&Array.isArray(e.methods)?t?e.methods?e.methods.filter(e=>e.method_id===t):[]:e.methods:[]}disableShippingMethods(e,t){t.length&&t.forEach(t=>{S()({method:"POST",path:`/wc/v3/shipping/zones/${e.id}/methods/${t.instance_id}`,data:{enabled:!1}})})}async updateShippingZones(e){const{clearTaskStatusCache:t,createNotice:o,shippingZones:c}=this.props;let s=!1,a=!1;c.forEach(t=>{0===t.id?s=t.toggleable&&e[t.id+"_enabled"]:a=""!==e[t.id+"_rate"]&&parseFloat(e[t.id+"_rate"])!==parseFloat(0);const o=this.getShippingMethods(t),c=parseFloat(e[t.id+"_rate"])===parseFloat(0)?"free_shipping":"flat_rate",n=this.getShippingMethods(t,c).length?this.getShippingMethods(t,c)[0]:null;if(!t.toggleable||e[t.id+"_enabled"]){if(n){const e=o.filter(e=>e.instance_id!==n.instance_id);this.disableShippingMethods(t,e)}S()({method:"POST",path:n?`/wc/v3/shipping/zones/${t.id}/methods/${n.instance_id}`:`/wc/v3/shipping/zones/${t.id}/methods`,data:{method_id:c,enabled:!0,settings:{cost:e[t.id+"_rate"]}}})}else this.disableShippingMethods(t,o)}),Object(m.recordEvent)("tasklist_shipping_set_costs",{shipping_cost:a,rest_world:s}),t(),o("success",Object(n.__)("Your shipping rates have been updated","woocommerce-admin")),this.props.onComplete()}renderInputPrefix(){const{symbolPosition:e,symbol:t}=this.context.getCurrencyConfig();return 0===e.indexOf("right")?null:Object(c.createElement)("span",{className:"woocommerce-shipping-rate__control-prefix"},t)}renderInputSuffix(e){const{symbolPosition:t,symbol:o}=this.context.getCurrencyConfig();return 0===t.indexOf("right")?Object(c.createElement)("span",{className:"woocommerce-shipping-rate__control-suffix"},o):parseFloat(e)===parseFloat(0)?Object(c.createElement)("span",{className:"woocommerce-shipping-rate__control-suffix"},Object(n.__)("Free shipping","woocommerce-admin")):null}getFormattedRate(e){const{formatDecimalString:t}=this.context,o=t(e);return e.length&&o.length?t(e):t(0)}getInitialValues(){const{formatDecimalString:e}=this.context,t={};return this.props.shippingZones.forEach(o=>{const c=this.getShippingMethods(o),n=c.length&&c[0].settings.cost?this.getFormattedRate(c[0].settings.cost.value):e(0);t[o.id+"_rate"]=n,c.length&&c[0].enabled?t[o.id+"_enabled"]=!0:t[o.id+"_enabled"]=!1}),t}validate(e){const t={};return Object.keys(e).filter(e=>e.endsWith("_rate")).forEach(o=>{e[o]<0&&(t[o]=Object(n.__)("Shipping rates can not be negative numbers.","woocommerce-admin"))}),t}render(){const{buttonText:e,shippingZones:t}=this.props;return t.length?Object(c.createElement)(d.Form,{initialValues:this.getInitialValues(),onSubmit:this.updateShippingZones,validate:this.validate},({getInputProps:o,handleSubmit:a,setTouched:i,setValue:r,values:l})=>Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"woocommerce-shipping-rates"},t.map(e=>Object(c.createElement)("div",{className:"woocommerce-shipping-rate",key:e.id},Object(c.createElement)("div",{className:"woocommerce-shipping-rate__icon"},e.locations?e.locations.map(e=>Object(c.createElement)(d.Flag,{size:24,code:e.code,key:e.code})):Object(c.createElement)(R.a,{icon:te})),Object(c.createElement)("div",{className:"woocommerce-shipping-rate__main"},e.toggleable?Object(c.createElement)("label",{htmlFor:"woocommerce-shipping-rate__toggle-"+e.id,className:"woocommerce-shipping-rate__name"},e.name,Object(c.createElement)(s.FormToggle,J()({id:"woocommerce-shipping-rate__toggle-"+e.id},o(e.id+"_enabled")))):Object(c.createElement)("div",{className:"woocommerce-shipping-rate__name"},e.name),(!e.toggleable||l[e.id+"_enabled"])&&Object(c.createElement)(d.TextControlWithAffixes,J()({label:Object(n.__)("Shipping cost","woocommerce-admin"),required:!0},o(e.id+"_rate"),{onBlur:()=>{i(e.id+"_rate"),r(e.id+"_rate",this.getFormattedRate(l[e.id+"_rate"]))},prefix:this.renderInputPrefix(),suffix:this.renderInputSuffix(l[e.id+"_rate"]),className:"muriel-input-text woocommerce-shipping-rate__control-wrapper"})))))),Object(c.createElement)(s.Button,{isPrimary:!0,onClick:a},e||Object(n.__)("Update","woocommerce-admin")))):null}}ce.propTypes={buttonText:$.a.string,onComplete:$.a.func.isRequired,createNotice:$.a.func.isRequired,shippingZones:$.a.array},ce.defaultProps={shippingZones:[]},ce.contextType=oe.a;var ne=Object(p.compose)(Object(i.withDispatch)(e=>{const{invalidateResolutionForStoreSelector:t}=e(r.ONBOARDING_STORE_NAME);return{clearTaskStatusCache:()=>t("getTasksStatus")}}))(ce);class se extends c.Component{constructor(e){super(e),this.initialState={isPending:!1,step:"store_location",shippingZones:[]},this.activePlugins=e.activePlugins,this.state=this.initialState,this.completeStep=this.completeStep.bind(this)}componentDidMount(){this.reset()}reset(){this.setState(this.initialState)}async fetchShippingZones(){this.setState({isPending:!0});const{countryCode:e,countryName:t}=this.props,o=[],c=await S()({path:"/wc/v3/shipping/zones"});let s=!1;if(await Promise.all(c.map(async t=>{if(0===t.id)return t.methods=await S()({path:`/wc/v3/shipping/zones/${t.id}/methods`}),t.name=Object(n.__)("Rest of the world","woocommerce-admin"),t.toggleable=!0,void o.push(t);t.locations=await S()({path:`/wc/v3/shipping/zones/${t.id}/locations`});t.locations.find(t=>e===t.code)&&(t.methods=await S()({path:`/wc/v3/shipping/zones/${t.id}/methods`}),o.push(t),s=!0)})),!s){const c=await S()({method:"POST",path:"/wc/v3/shipping/zones",data:{name:t}});c.locations=await S()({method:"POST",path:`/wc/v3/shipping/zones/${c.id}/locations`,data:[{code:e,type:"country"}]}),o.push(c)}o.reverse(),this.setState({isPending:!1,shippingZones:o})}componentDidUpdate(e,t){const{countryCode:o,settings:c}=this.props,{woocommerce_store_address:n,woocommerce_default_country:s,woocommerce_store_postcode:a}=c,{step:i}=this.state;"rates"!==i||e.countryCode===o&&"rates"===t.step||this.fetchShippingZones();const r=Boolean(n&&s&&a);"store_location"===i&&r&&this.completeStep()}completeStep(){const{createNotice:e}=this.props,{step:t}=this.state,o=this.getSteps(),c=o.findIndex(e=>e.key===t),s=o[c+1];s?this.setState({step:s.key}):(e("success",Object(n.__)("📦 Shipping is done! Don't worry, you can always change it later","woocommerce-admin")),Object(k.getHistory)().push(Object(k.getNewPath)({},"/",{})))}getPluginsToActivate(){const{countryCode:e}=this.props,t=[];return["GB","CA","AU"].includes(e)?t.push("woocommerce-shipstation-integration"):"US"===e&&(t.push("woocommerce-services"),t.push("jetpack")),Object(u.difference)(t,this.activePlugins)}getSteps(){const{countryCode:e,isJetpackConnected:t,settings:o}=this.props,s=this.getPluginsToActivate(),a=!t&&"US"===e,i=[{key:"store_location",label:Object(n.__)("Set store location","woocommerce-admin"),description:Object(n.__)("The address from which your business operates","woocommerce-admin"),content:Object(c.createElement)(ee,J()({},this.props,{onComplete:e=>{const t=Object(g.b)(e.countryState);Object(m.recordEvent)("tasklist_shipping_set_location",{country:t}),this.completeStep()}})),visible:!0},{key:"rates",label:Object(n.__)("Set shipping costs","woocommerce-admin"),description:Object(n.__)("Define how much customers pay to ship to different destinations","woocommerce-admin"),content:Object(c.createElement)(ne,J()({buttonText:s.length||a?Object(n.__)("Proceed","woocommerce-admin"):Object(n.__)("Complete task","woocommerce-admin"),shippingZones:this.state.shippingZones,onComplete:this.completeStep},this.props)),visible:"disabled"!==o.woocommerce_ship_to_countries},{key:"label_printing",label:Object(n.__)("Enable shipping label printing","woocommerce-admin"),description:s.includes("woocommerce-shipstation-integration")?Y()({mixedString:Object(n.__)("We recommend using ShipStation to save time at the post office by printing your shipping labels at home. Try ShipStation free for 30 days. {{link}}Learn more{{/link}}.","woocommerce-admin"),components:{link:Object(c.createElement)(d.Link,{href:"https://woocommerce.com/products/shipstation-integration?utm_medium=product",target:"_blank",type:"external"})}}):Object(n.__)("With WooCommerce Shipping you can save time by printing your USPS and DHL Express shipping labels at home","woocommerce-admin"),content:Object(c.createElement)(d.Plugins,J()({onComplete:(e,t)=>{Object(x.a)(t),Object(m.recordEvent)("tasklist_shipping_label_printing",{install:!0,plugins_to_activate:s}),this.completeStep()},onError:(e,t)=>Object(x.a)(t),onSkip:()=>{Object(m.recordEvent)("tasklist_shipping_label_printing",{install:!1,plugins_to_activate:s}),Object(k.getHistory)().push(Object(k.getNewPath)({},"/",{}))},pluginSlugs:s},this.props)),visible:s.length},{key:"connect",label:Object(n.__)("Connect your store","woocommerce-admin"),description:Object(n.__)("Connect your store to WordPress.com to enable label printing","woocommerce-admin"),content:Object(c.createElement)(K,J()({redirectUrl:Object(b.e)("admin.php?page=wc-admin"),completeStep:this.completeStep},this.props,{onConnect:()=>{Object(m.recordEvent)("tasklist_shipping_connect_store")}})),visible:a}];return Object(u.filter)(i,e=>e.visible)}render(){const{isPending:e,step:t}=this.state,{isUpdateSettingsRequesting:o}=this.props;return Object(c.createElement)("div",{className:"woocommerce-task-shipping"},Object(c.createElement)(s.Card,{className:"woocommerce-task-card"},Object(c.createElement)(s.CardBody,null,Object(c.createElement)(d.Stepper,{isPending:e||o,isVertical:!0,currentStep:t,steps:this.getSteps()}))))}}var ae=Object(p.compose)(Object(i.withSelect)(e=>{const{getSettings:t,isUpdateSettingsRequesting:o}=e(r.SETTINGS_STORE_NAME),{getActivePlugins:c,isJetpackConnected:n}=e(r.PLUGINS_STORE_NAME),{general:s={}}=t("general"),a=Object(g.b)(s.woocommerce_default_country),{countries:i=[]}=Object(b.f)("dataEndpoints",{}),l=a?i.find(e=>e.code===a):null,m=l?l.name:null,d=c();return{countryCode:a,countryName:m,isUpdateSettingsRequesting:o("general"),settings:s,activePlugins:d,isJetpackConnected:n()}}),Object(i.withDispatch)(e=>{const{createNotice:t}=e("core/notices"),{updateAndPersistSettingsForGroup:o}=e(r.SETTINGS_STORE_NAME);return{createNotice:t,updateAndPersistSettingsForGroup:o}}))(se);class ie extends c.Component{constructor(e){super(e);const{hasCompleteAddress:t,pluginsToActivate:o}=e;this.initialState={isPending:!1,stepIndex:t?1:0,cachedPluginsToActivate:o},this.state=this.initialState,this.completeStep=this.completeStep.bind(this)}componentDidMount(){const{query:e}=this.props,{auto:t}=e;this.reset(),"true"===t&&this.enableAutomatedTax()}reset(){this.setState(this.initialState)}shouldShowSuccessScreen(){const{isJetpackConnected:e,hasCompleteAddress:t,pluginsToActivate:o}=this.props;return t&&!o.length&&e&&this.isTaxJarSupported()}isTaxJarSupported(){const{countryCode:e,tasksStatus:t}=this.props,{automatedTaxSupportedCountries:o=[],taxJarActivated:c}=t;return!c&&o.includes(e)}completeStep(){const{stepIndex:e}=this.state;this.getSteps()[e+1]&&this.setState({stepIndex:e+1})}async manuallyConfigureTaxRates(){const{generalSettings:e,updateAndPersistSettingsForGroup:t}=this.props;"yes"!==e.woocommerce_calc_taxes?(this.setState({isPending:!0}),t("general",{general:{...e,woocommerce_calc_taxes:"yes"}}).then(()=>this.redirectToTaxSettings()).catch(e=>Object(x.a)(e))):this.redirectToTaxSettings()}updateAutomatedTax(e){const{clearTaskStatusCache:t,createNotice:o,updateAndPersistSettingsForGroup:c,generalSettings:s,taxSettings:a}=this.props;Promise.all([c("tax",{tax:{...a,wc_connect_taxes_enabled:e?"yes":"no"}}),c("general",{general:{...s,woocommerce_calc_taxes:"yes"}})]).then(()=>{t(),e?(o("success",Object(n.__)("You're awesome! One less item on your to-do list ✅","woocommerce-admin")),Object(k.getHistory)().push(Object(k.getNewPath)({},"/",{}))):this.redirectToTaxSettings()}).catch(()=>{o("error",Object(n.__)("There was a problem updating your tax settings","woocommerce-admin"))})}redirectToTaxSettings(){window.location=Object(b.e)("admin.php?page=wc-settings&tab=tax§ion=standard&wc_onboarding_active_task=tax")}doNotChargeSalesTax(){const{updateOptions:e}=this.props;Object(m.queueRecordEvent)("tasklist_tax_connect_store",{connect:!1,no_tax:!0}),e({woocommerce_no_sales_tax:!0,woocommerce_calc_taxes:"no"}).then(()=>{window.location=Object(b.e)("admin.php?page=wc-admin")})}getSteps(){const{generalSettings:e,isJetpackConnected:t,isPending:o,tosAccepted:a,updateOptions:i}=this.props,{cachedPluginsToActivate:r}=this.state;let l,p;r.includes("woocommerce-services")?(l=Object(n.__)("Install Jetpack and WooCommerce Tax","woocommerce-admin"),p=Object(n.__)("By installing Jetpack and WooCommerce Tax you agree to the {{link}}Terms of Service{{/link}}.","woocommerce-admin")):(l=Object(n.__)("Install Jetpack","woocommerce-admin"),p=Object(n.__)("By installing Jetpack you agree to the {{link}}Terms of Service{{/link}}.","woocommerce-admin"));const _=[{key:"store_location",label:Object(n.__)("Set store location","woocommerce-admin"),description:Object(n.__)("The address from which your business operates","woocommerce-admin"),content:Object(c.createElement)(ee,J()({},this.props,{onComplete:e=>{const t=Object(g.b)(e.countryState);Object(m.recordEvent)("tasklist_tax_set_location",{country:t}),this.completeStep()},isSettingsRequesting:!1,settings:e})),visible:!0},{key:"plugins",label:l,description:Object(n.__)("Jetpack and WooCommerce Tax allow you to automate sales tax calculations","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(d.Plugins,{onComplete:(e,t)=>{Object(x.a)(t),Object(m.recordEvent)("tasklist_tax_install_extensions",{install_extensions:!0}),i({woocommerce_setup_jetpack_opted_in:!0}),this.completeStep()},onError:(e,t)=>Object(x.a)(t),onSkip:()=>{Object(m.queueRecordEvent)("tasklist_tax_install_extensions",{install_extensions:!1}),this.manuallyConfigureTaxRates()},skipText:Object(n.__)("Set up manually","woocommerce-admin"),onAbort:()=>this.doNotChargeSalesTax(),abortText:Object(n.__)("I don't charge sales tax","woocommerce-admin")}),!a&&Object(c.createElement)(C.Text,{variant:"caption",className:"woocommerce-task__caption",size:"12",lineHeight:"16px"},Y()({mixedString:p,components:{link:Object(c.createElement)(d.Link,{href:"https://wordpress.com/tos/",target:"_blank",type:"external"})}}))),visible:(r.length||!a)&&this.isTaxJarSupported()},{key:"connect",label:Object(n.__)("Connect your store","woocommerce-admin"),description:Object(n.__)("Connect your store to WordPress.com to enable automated sales tax calculations","woocommerce-admin"),content:Object(c.createElement)(K,J()({},this.props,{onConnect:()=>{Object(m.recordEvent)("tasklist_tax_connect_store",{connect:!0,no_tax:!1})},onSkip:()=>{Object(m.queueRecordEvent)("tasklist_tax_connect_store",{connect:!1,no_tax:!1}),this.manuallyConfigureTaxRates()},skipText:Object(n.__)("Set up tax rates manually","woocommerce-admin"),onAbort:()=>this.doNotChargeSalesTax(),abortText:Object(n.__)("My business doesn't charge sales tax","woocommerce-admin")})),visible:!t&&this.isTaxJarSupported()},{key:"manual_configuration",label:Object(n.__)("Configure tax rates","woocommerce-admin"),description:Object(n.__)("Head over to the tax rate settings screen to configure your tax rates","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.Button,{disabled:o,isPrimary:!0,isBusy:o,onClick:()=>{Object(m.recordEvent)("tasklist_tax_config_rates"),this.manuallyConfigureTaxRates()}},Object(n.__)("Configure","woocommerce-admin")),Object(c.createElement)("p",null,"yes"!==e.woocommerce_calc_taxes&&Y()({mixedString:Object(n.__)('By clicking "Configure" you\'re enabling tax rates and calculations. More info {{link}}here{{/link}}.',"woocommerce-admin"),components:{link:Object(c.createElement)(d.Link,{href:"https://docs.woocommerce.com/document/setting-up-taxes-in-woocommerce/?utm_medium=product#section-1",target:"_blank",type:"external"})}}))),visible:!this.isTaxJarSupported()}];return Object(u.filter)(_,e=>e.visible)}enableAutomatedTax(){Object(m.recordEvent)("tasklist_tax_setup_automated_proceed",{setup_automatically:!0}),this.updateAutomatedTax(!0)}renderSuccessScreen(){const{isPending:e}=this.props;return Object(c.createElement)("div",{className:"woocommerce-task-tax__success"},Object(c.createElement)("span",{className:"woocommerce-task-tax__success-icon",role:"img","aria-labelledby":"woocommerce-task-tax__success-message"},"🎊"),Object(c.createElement)(d.H,{id:"woocommerce-task-tax__success-message"},Object(n.__)("Good news!","woocommerce-admin")),Object(c.createElement)("p",null,Y()({mixedString:Object(n.__)("{{strong}}Jetpack{{/strong}} and {{strong}}WooCommerce Tax{{/strong}} can automate your sales tax calculations for you.","woocommerce-admin"),components:{strong:Object(c.createElement)("strong",null)}})),Object(c.createElement)(s.Button,{disabled:e,isPrimary:!0,isBusy:e,onClick:this.enableAutomatedTax.bind(this)},Object(n.__)("Yes please","woocommerce-admin")),Object(c.createElement)(s.Button,{disabled:e,isTertiary:!0,onClick:()=>{Object(m.recordEvent)("tasklist_tax_setup_automated_proceed",{setup_automatically:!1}),this.updateAutomatedTax(!1)}},Object(n.__)("No thanks, I'll set up manually","woocommerce-admin")),Object(c.createElement)(s.Button,{disabled:e,isTertiary:!0,onClick:()=>this.doNotChargeSalesTax()},Object(n.__)("I don't charge sales tax","woocommerce-admin")))}render(){const{stepIndex:e}=this.state,{isPending:t,isResolving:o}=this.props;if(o)return Object(c.createElement)(d.Spinner,null);const n=this.getSteps()[e];return Object(c.createElement)("div",{className:"woocommerce-task-tax"},Object(c.createElement)(s.Card,{className:"woocommerce-task-card"},Object(c.createElement)(s.CardBody,null,this.shouldShowSuccessScreen()?this.renderSuccessScreen():Object(c.createElement)(d.Stepper,{isPending:t||o,isVertical:!0,currentStep:n.key,steps:this.getSteps()}))))}}var re=Object(p.compose)(Object(i.withSelect)(e=>{const{getSettings:t,isUpdateSettingsRequesting:o}=e(r.SETTINGS_STORE_NAME),{getOption:c,isResolving:n}=e(r.OPTIONS_STORE_NAME),{getActivePlugins:s,isJetpackConnected:a,isPluginsRequesting:i}=e(r.PLUGINS_STORE_NAME),{getTasksStatus:l}=e(r.ONBOARDING_STORE_NAME),{general:m={}}=t("general"),d=Object(g.b)(m.woocommerce_default_country),{woocommerce_store_address:p,woocommerce_default_country:_,woocommerce_store_postcode:b}=m,h=Boolean(p&&_&&b),{tax:O={}}=t("tax"),j=s(),w=Object(u.difference)(["jetpack","woocommerce-services"],j),y=c("wc_connect_options")||{},k=c("woocommerce_setup_jetpack_opted_in"),E=y.tos_accepted||"1"===k,S=l(),v=o("tax")||o("general"),f=i("getJetpackConnectUrl")||n("getOption",["woocommerce_setup_jetpack_opted_in"])||void 0===k;return{countryCode:d,generalSettings:m,hasCompleteAddress:h,isJetpackConnected:a(),isPending:v,isResolving:f,pluginsToActivate:w,tasksStatus:S,taxSettings:O,tosAccepted:E}}),Object(i.withDispatch)(e=>{const{createNotice:t}=e("core/notices"),{updateOptions:o}=e(r.OPTIONS_STORE_NAME),{updateAndPersistSettingsForGroup:c}=e(r.SETTINGS_STORE_NAME),{invalidateResolutionForStoreSelector:n}=e(r.ONBOARDING_STORE_NAME);return{clearTaskStatusCache:()=>n("getTasksStatus"),createNotice:t,updateAndPersistSettingsForGroup:c,updateOptions:o}}))(ie),le=o(6),me=o.n(le),de=o(270),pe=o(537);o(533);const ue=({isRecommended:e,markConfigured:t,paymentGateway:o})=>{var n,a;const{image:i,content:r,id:l,plugins:d=[],title:p,loading:u,enabled:_=!1,installed:b=!1,needsSetup:g=!0,requiredSettings:h,settingsUrl:O,is_local_partner:j}=o,w=Object(C.useSlot)("woocommerce_payment_gateway_configure_"+l),y=Object(C.useSlot)("woocommerce_payment_gateway_setup_"+l),k=Boolean(null==w||null===(n=w.fills)||void 0===n?void 0:n.length)||Boolean(null==y||null===(a=y.fills)||void 0===a?void 0:a.length),E=Boolean(d.length||h.length||k),S=e&&g,v=me()("woocommerce-task-payment","woocommerce-task-card",g&&"woocommerce-task-payment-not-configured","woocommerce-task-payment-"+l);return Object(c.createElement)(c.Fragment,{key:l},Object(c.createElement)(s.CardBody,{style:{paddingLeft:0,marginBottom:0},className:v},Object(c.createElement)(s.CardMedia,{isBorderless:!0},Object(c.createElement)("img",{src:i,alt:p})),Object(c.createElement)("div",{className:"woocommerce-task-payment__description"},S&&Object(c.createElement)(de.RecommendedRibbon,{isLocalPartner:j}),Object(c.createElement)(C.Text,{as:"h3",className:"woocommerce-task-payment__title"},p,b&&g&&!!d.length&&Object(c.createElement)(de.SetupRequired,null)),Object(c.createElement)("div",{className:"woocommerce-task-payment__content"},r)),Object(c.createElement)("div",{className:"woocommerce-task-payment__footer"},Object(c.createElement)(pe.a,{manageUrl:O,id:l,hasSetup:E,needsSetup:g,isEnabled:_,isInstalled:b,hasPlugins:Boolean(d.length),isRecommended:e,isLoading:u,markConfigured:t,onSetUp:()=>Object(m.recordEvent)("tasklist_payment_setup",{selected:l})}))),Object(c.createElement)(s.CardDivider,null))},_e=({heading:e,markConfigured:t,recommendation:o,paymentGateways:n})=>Object(c.createElement)(s.Card,null,Object(c.createElement)(s.CardHeader,{as:"h2"},e),n.map(e=>{const{id:n}=e;return Object(c.createElement)(ue,{key:n,isRecommended:o===n,markConfigured:t,paymentGateway:e})})),be=()=>{const e=me()("woocommerce-task-payment","woocommerce-task-card");return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.CardBody,{style:{paddingLeft:0,marginBottom:0},className:e},Object(c.createElement)(s.CardMedia,{isBorderless:!0},Object(c.createElement)("span",{className:"is-placeholder"})),Object(c.createElement)("div",{className:"woocommerce-task-payment__description"},Object(c.createElement)(C.Text,{as:"h3",className:"woocommerce-task-payment__title"},Object(c.createElement)("span",{className:"is-placeholder"})),Object(c.createElement)("div",{className:"woocommerce-task-payment__content"},Object(c.createElement)("span",{className:"is-placeholder"}))),Object(c.createElement)("div",{className:"woocommerce-task-payment__footer"},Object(c.createElement)("span",{className:"is-placeholder"}))),Object(c.createElement)(s.CardDivider,null))},ge=()=>Object(c.createElement)(s.Card,{"aria-hidden":"true",className:"is-loading woocommerce-payment-gateway-suggestions-list-placeholder"},Object(c.createElement)(s.CardHeader,{as:"h2"},Object(c.createElement)("span",{className:"is-placeholder"})),Object(c.createElement)(be,null),Object(c.createElement)(be,null),Object(c.createElement)(be,null)),he=({markConfigured:e,paymentGateway:t})=>{var o;const{id:a,connectionUrl:l,setupHelpText:p,settingsUrl:u,title:_,requiredSettings:b}=t,{createNotice:g}=Object(i.useDispatch)("core/notices"),{updatePaymentGateway:O}=Object(i.useDispatch)(r.PAYMENT_GATEWAYS_STORE_NAME),j=Object(C.useSlot)("woocommerce_payment_gateway_configure_"+a),w=Boolean(null==j||null===(o=j.fills)||void 0===o?void 0:o.length),{isUpdating:y}=Object(i.useSelect)(e=>{const{isPaymentGatewayUpdating:t}=e(r.PAYMENT_GATEWAYS_STORE_NAME);return{isUpdating:t()}}),k=t=>{O(a,{enabled:!0,settings:t}).then(t=>{t&&t.id===a&&(e(a),g("success",Object(n.sprintf)(Object(n.__)("%s configured successfully","woocommerce-admin"),_)))}).catch(()=>{g("error",Object(n.__)("There was a problem saving your payment settings","woocommerce-admin"))})},E=p&&Object(c.createElement)("p",{dangerouslySetInnerHTML:Object(h.a)(p)}),S=Object(c.createElement)(d.DynamicForm,{fields:b,isBusy:y,onSubmit:k,submitLabel:Object(n.__)("Proceed","woocommerce-admin"),validate:e=>((e,t)=>{const o={},c=e=>t.find(t=>t.id===e);for(const[t,n]of Object.entries(e)){const e=c(t),s=e.label.replace(/([A-Z][a-z]+)/g,e=>e.toLowerCase());n||"checkbox"===e.type||(o[t]="Please enter your "+s)}return o})(e,b)});return w?Object(c.createElement)(de.WooPaymentGatewayConfigure.Slot,{fillProps:{defaultForm:S,defaultSubmit:k,defaultFields:b,markConfigured:()=>e(a),paymentGateway:t},id:a}):l?Object(c.createElement)(c.Fragment,null,E,Object(c.createElement)(s.Button,{isPrimary:!0,onClick:()=>Object(m.recordEvent)("tasklist_payment_connect_start",{payment_method:a}),href:l},Object(n.__)("Connect","woocommerce-admin"))):b.length?Object(c.createElement)(c.Fragment,null,E,S):Object(c.createElement)(c.Fragment,null,E||Object(c.createElement)("p",null,Object(n.__)("You can manage this payment gateway's settings by clicking the button below","woocommerce-admin")),Object(c.createElement)(s.Button,{isPrimary:!0,href:u},Object(n.__)("Set up","woocommerce-admin")))};o(589);const Oe=({markConfigured:e,paymentGateway:t})=>{var o;const{id:a,plugins:l=[],title:p,postInstallScripts:u,installed:_}=t,g=Object(C.useSlot)("woocommerce_payment_gateway_setup_"+a),h=Boolean(null==g||null===(o=g.fills)||void 0===o?void 0:o.length),[O,j]=Object(c.useState)(!1);Object(c.useEffect)(()=>{Object(m.recordEvent)("payments_task_stepper_view",{payment_method:a})},[]);const{invalidateResolutionForStoreSelector:w}=Object(i.useDispatch)(r.PAYMENT_GATEWAYS_STORE_NAME),{isOptionUpdating:y,isPaymentGatewayResolving:k,needsPluginInstall:E}=Object(i.useSelect)(e=>{const{isOptionsUpdating:t}=e(r.OPTIONS_STORE_NAME),{isResolving:o}=e(r.PAYMENT_GATEWAYS_STORE_NAME),c=e(r.PLUGINS_STORE_NAME).getActivePlugins(),n=l.filter(e=>!c.includes(e));return{isOptionUpdating:t(),isPaymentGatewayResolving:o("getPaymentGateways"),needsPluginInstall:!!n.length}});Object(c.useEffect)(()=>{if(!E)if(u&&u.length){const e=u.map(e=>Object(b.d)(e));Promise.all(e).then(()=>{j(!0)})}else j(!0)},[u,E]);const S=Object(c.useMemo)(()=>l&&l.length?{key:"install",label:Object(n.sprintf)(Object(n.__)("Install %s","woocommerce-admin"),p),content:Object(c.createElement)(d.Plugins,{onComplete:(e,t)=>{Object(x.a)(t),w("getPaymentGateways"),Object(m.recordEvent)("tasklist_payment_install_method",{plugins:l})},onError:(e,t)=>Object(x.a)(t),autoInstall:!0,pluginSlugs:l})}:null,[]),v=Object(c.useMemo)(()=>({key:"configure",label:Object(n.sprintf)(Object(n.__)("Configure your %(title)s account","woocommerce-admin"),{title:p}),content:_?Object(c.createElement)(he,{markConfigured:e,paymentGateway:t}):null}),[_]),f=E||y||k||!O,N=Object(c.createElement)(d.Stepper,{isVertical:!0,isPending:f,currentStep:E?"install":"configure",steps:[S,v].filter(Boolean)});return Object(c.createElement)(s.Card,{className:"woocommerce-task-payment-method woocommerce-task-card"},Object(c.createElement)(s.CardBody,null,h?Object(c.createElement)(de.WooPaymentGatewaySetup.Slot,{fillProps:{defaultStepper:N,defaultInstallStep:S,defaultConfigureStep:v,markConfigured:()=>e(a),paymentGateway:t},id:a}):N))},je=()=>{const e=me()("is-loading","woocommerce-task-payment-method","woocommerce-task-card");return Object(c.createElement)(s.Card,{"aria-hidden":"true",className:e},Object(c.createElement)(s.CardBody,null,Object(c.createElement)(d.Stepper,{isVertical:!0,currentStep:"none",steps:[{key:"first",label:""},{key:"second",label:""}]})))};var we=o(534),ye=o(116);const ke={account_name:"",account_number:"",bank_name:"",sort_code:"",iban:"",bic:""};Object(ye.registerPlugin)("wc-admin-payment-gateway-setup-bacs",{render:()=>{const e=Object(i.useSelect)(e=>e(r.OPTIONS_STORE_NAME).isOptionsUpdating()),{createNotice:t}=Object(i.useDispatch)("core/notices"),{updateOptions:o}=Object(i.useDispatch)(r.OPTIONS_STORE_NAME),a=e=>{const t={};return e.account_number||e.iban||(t.account_number=t.iban=Object(n.__)("Please enter an account number or IBAN","woocommerce-admin")),t};return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(de.WooPaymentGatewaySetup,{id:"bacs"},({markConfigured:i})=>Object(c.createElement)(d.Form,{initialValues:ke,onSubmit:e=>(async(e,c)=>{if((await o({woocommerce_bacs_settings:{enabled:"yes"},woocommerce_bacs_accounts:[e]})).success)return c(),void t("success",Object(n.__)("Direct bank transfer details added successfully","woocommerce-admin"));t("error",Object(n.__)("There was a problem saving your payment settings","woocommerce-admin"))})(e,i),validate:a},({getInputProps:t,handleSubmit:o})=>Object(c.createElement)(c.Fragment,null,Object(c.createElement)(d.H,null,Object(n.__)("Add your bank details","woocommerce-admin")),Object(c.createElement)("p",null,Object(n.__)("These details are required to receive payments via bank transfer","woocommerce-admin")),Object(c.createElement)("div",{className:"woocommerce-task-payment-method__fields"},Object(c.createElement)(d.TextControl,J()({label:Object(n.__)("Account name","woocommerce-admin"),required:!0},t("account_name"))),Object(c.createElement)(d.TextControl,J()({label:Object(n.__)("Account number","woocommerce-admin"),required:!0},t("account_number"))),Object(c.createElement)(d.TextControl,J()({label:Object(n.__)("Bank name","woocommerce-admin"),required:!0},t("bank_name"))),Object(c.createElement)(d.TextControl,J()({label:Object(n.__)("Sort code","woocommerce-admin"),required:!0},t("sort_code"))),Object(c.createElement)(d.TextControl,J()({label:Object(n.__)("IBAN","woocommerce-admin"),required:!0},t("iban"))),Object(c.createElement)(d.TextControl,J()({label:Object(n.__)("BIC / Swift","woocommerce-admin"),required:!0},t("bic")))),Object(c.createElement)(s.Button,{isPrimary:!0,isBusy:e,onClick:o},Object(n.__)("Save","woocommerce-admin"))))))},scope:"woocommerce-admin"});const Ee=({query:e})=>{const{invalidateResolutionForStoreSelector:t}=Object(i.useDispatch)(r.ONBOARDING_STORE_NAME),{updatePaymentGateway:o}=Object(i.useDispatch)(r.PAYMENT_GATEWAYS_STORE_NAME),{getPaymentGateway:s,paymentGatewaySuggestions:a,installedPaymentGateways:l,isResolving:d}=Object(i.useSelect)(e=>({getPaymentGateway:e(r.PAYMENT_GATEWAYS_STORE_NAME).getPaymentGateway,getOption:e(r.OPTIONS_STORE_NAME).getOption,installedPaymentGateways:e(r.PAYMENT_GATEWAYS_STORE_NAME).getPaymentGateways(),isResolving:e(r.ONBOARDING_STORE_NAME).isResolving("getPaymentGatewaySuggestions"),paymentGatewaySuggestions:e(r.ONBOARDING_STORE_NAME).getPaymentGatewaySuggestions()}),[]),p=Object(c.useMemo)(()=>{const e=l.reduce((e,t)=>(e[t.id]=t,e),{});return a.reduce((t,o)=>{const{id:c}=o,n=e[o.id]?e[c]:{},s={installed:!!e[c],postInstallScripts:n.post_install_scripts,enabled:n.enabled||!1,needsSetup:n.needs_setup,settingsUrl:n.settings_url,connectionUrl:n.connection_url,setupHelpText:n.setup_help_text,title:n.title,requiredSettings:n.required_settings_keys?n.required_settings_keys.map(e=>n.settings[e]).filter(Boolean):[],...o};return t.set(c,s),t},new Map)},[l,a]);Object(c.useEffect)(()=>{p.size&&Object(m.recordEvent)("tasklist_payments_options",{options:Array.from(p.values()).map(e=>e.id)})},[p]);const u=Object(c.useCallback)(async(e,c={})=>{if(!p.get(e))throw`Payment gateway ${e} not found in available gateways list`;(e=>{if(!e)return;const c=s(e);c&&!c.enabled&&o(e,{enabled:!0}).then(()=>{t("getTasksStatus")})})(e),Object(m.recordEvent)("tasklist_payment_connect_method",{payment_method:e}),Object(k.getHistory)().push(Object(k.getNewPath)({...c},"/",{}))},[p]),_=Object(c.useMemo)(()=>Array.from(p.values()).filter(e=>e.recommendation_priority).sort((e,t)=>e.recommendation_priority-t.recommendation_priority).map(e=>e.id).shift(),[p]),b=Object(c.useMemo)(()=>{if(!e.id||d||!p.size)return null;const t=p.get(e.id);if(!t)throw`Current gateway ${e.id} not found in available gateways list`;return t},[d,e,p]),[g,h,O]=Object(c.useMemo)(()=>Array.from(p.values()).reduce((e,t)=>{const[o,c,n]=e;return"woocommerce_payments"!==t.id||t.installed&&!t.needsSetup?t.enabled?c.push(t):n.push(t):o.push(t),e},[[],[],[]]),[p]);return e.id&&!b?Object(c.createElement)(je,null):b?Object(c.createElement)(Oe,{paymentGateway:b,markConfigured:u}):Object(c.createElement)("div",{className:"woocommerce-task-payments"},!p.size&&Object(c.createElement)(ge,null),!!g.length&&Object(c.createElement)(we.a,{paymentGateway:g[0]}),!!h.length&&Object(c.createElement)(_e,{heading:Object(n.__)("Enabled payment gateways","woocommerce-admin"),recommendation:_,paymentGateways:h}),!!O.length&&Object(c.createElement)(_e,{heading:Object(n.__)("Additional payment gateways","woocommerce-admin"),recommendation:_,paymentGateways:O,markConfigured:u}))};var Se=o(522),ve=o(538);function fe(e,t,o,c){Object(m.recordEvent)("task_view",{task_name:e,wcs_installed:c.includes("woocommerce-services"),wcs_active:o.includes("woocommerce-services"),jetpack_installed:c.includes("jetpack"),jetpack_active:o.includes("jetpack"),jetpack_connected:t})}function Ce(e,t){if(e.completed||t.completed)return e.completed?1:-1;const o=e.level||3,c=t.level||3;return o===c?0:o>c?1:-1}o(590);function xe(e,t,o){return[...new Set([...e,...t])].filter(e=>!o.includes(e))}var Ne=({query:e,name:t,eventName:o,isComplete:a,dismissedTasks:l,remindMeLaterTasks:p,tasks:u,trackedCompletedTasks:_,title:b,collapsible:g=!1,onComplete:h,onHide:O,expandingItems:j=!1})=>{var w;const{createNotice:y}=Object(i.useDispatch)("core/notices"),{updateOptions:E}=Object(i.useDispatch)(r.OPTIONS_STORE_NAME),{profileItems:S}=Object(i.useSelect)(e=>{const{getProfileItems:t}=e(r.ONBOARDING_STORE_NAME);return{profileItems:t()}}),v=Object(c.useRef)(e);Object(c.useEffect)(()=>{G()},[]),Object(c.useEffect)(()=>{const{task:t}=v.current,{task:o}=e;t!==o&&(window.document.documentElement.scrollTop=0,v.current=e),I(),R()},[e]);const f=Date.now(),x=u.filter(e=>e.visible&&!l.includes(e.key)&&(!p[e.key]||p[e.key]<f)),N=x.filter(e=>e.completed).map(e=>e.key),T=u.filter(e=>e.visible&&!e.completed&&!l.includes(e.key)),[P,A]=Object(c.useState)(null===(w=T[0])||void 0===w?void 0:w.key),I=()=>{const e=`woocommerce_${t}_complete`,o=a?{[e]:"no"}:{[e]:"yes"};(!T.length&&!a||T.length&&a)&&(E({...o}),"function"==typeof h&&h())},R=()=>{const e=function(e,t){if(!t)return[];return e.filter(e=>t.includes(e))}(N,_),t=(o=e,c=_,x.filter(e=>c.includes(e.key)&&!o.includes(e.key)).map(e=>e.key));var o,c;(function(e,t,o){if(t.length>0)return!0;if(0===o.length)return!1;return!o.every(t=>e.indexOf(t)>=0)})(e,t,N)&&E({woocommerce_task_list_tracked_completed_tasks:xe(N,_,t)})},M=e=>{const t=l.filter(t=>t!==e);E({woocommerce_task_list_dismissed_tasks:t}),Object(m.recordEvent)(o+"_undo_dismiss_task",{task_name:e})},B=e=>{const{[e]:t,...c}=p;E({woocommerce_task_list_remind_me_later_tasks:c}),Object(m.recordEvent)(o+"_undo_remindmelater_task",{task_name:e})},G=()=>{e.task||Object(m.recordEvent)(o+"_view",{number_tasks:x.length,store_connected:S.wccom_connected})},L=x.map(e=>(e.onClick||(e.onClick=t=>{if(Object(m.recordEvent)(o+"_click",{task_name:e.key}),"A"===t.target.nodeName)return!1;Object(k.updateQueryString)({task:e.key})}),e));if(!L.length)return Object(c.createElement)("div",{className:"woocommerce-task-dashboard__container"});const U=Object(n.sprintf)(Object(n._n)("Show %i more task.","Show %i more tasks.",L.length-2,"woocommerce-admin"),L.length-2),F=Object(n.__)("Show less","woocommerce-admin"),D=g?C.CollapsibleList:C.List,z=g?{collapseLabel:F,expandLabel:U,show:2,onCollapse:()=>Object(m.recordEvent)(o+"_collapse"),onExpand:()=>Object(m.recordEvent)(o+"_expand")}:{};return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"woocommerce-task-dashboard__container"},Object(c.createElement)(s.Card,{size:"large",className:"woocommerce-task-card woocommerce-homescreen-card"},Object(c.createElement)(s.CardHeader,{size:"medium"},Object(c.createElement)("div",{className:"wooocommerce-task-card__header"},Object(c.createElement)(C.Text,{size:"20",lineHeight:"28px",variant:"title.small"},b),Object(c.createElement)(d.Badge,{count:T.length})),Object(c.createElement)("div",{className:"woocommerce-card__menu woocommerce-card__header-item"},Object(c.createElement)(d.EllipsisMenu,{label:Object(n.__)("Task List Options","woocommerce-admin"),renderContent:()=>Object(c.createElement)("div",{className:"woocommerce-task-card__section-controls"},Object(c.createElement)(s.Button,{onClick:()=>(e=>{const c={[`woocommerce_${t}_hidden`]:"yes"};Object(m.recordEvent)(o+"_completed",{action:e,completed_task_count:N.length,incomplete_task_count:T.length}),E({...c}),"function"==typeof O&&O()})("remove_card")},Object(n.__)("Hide this","woocommerce-admin")))}))),Object(c.createElement)(D,J()({animation:"custom"},z),L.map(e=>Object(c.createElement)(C.TaskItem,{key:e.key,title:e.title,completed:e.completed,content:e.content,onClick:!j||e.completed?e.onClick:()=>A(e.key),expandable:j,expanded:j&&P===e.key,onDismiss:e.isDismissable?()=>(({key:e,onDismiss:t})=>{y("success",Object(n.__)("Task dismissed"),{actions:[{label:Object(n.__)("Undo","woocommerce-admin"),onClick:()=>M(e)}]}),Object(m.recordEvent)(o+"_dismiss_task",{task_name:e}),E({woocommerce_task_list_dismissed_tasks:[...l,e]}),t&&t()})(e):void 0,remindMeLater:e.allowRemindMeLater?()=>(({key:e,onDismiss:t})=>{y("success",Object(n.__)("Task postponed until tomorrow","woocommerce-admin"),{actions:[{label:Object(n.__)("Undo","woocommerce-admin"),onClick:()=>B(e)}]}),Object(m.recordEvent)(o+"_remindmelater_task",{task_name:e});const c=Date.now()+864e5;E({woocommerce_task_list_remind_me_later_tasks:{...p,[e]:c}}),t&&t()})(e):void 0,time:e.time,level:e.level,action:e.onClick,actionLabel:e.action,additionalInfo:e.additionalInfo}))))))},Te=o(252);const Pe=({taskContainer:e,query:t})=>{const o=Object(c.useRef)(),{isJetpackConnected:n,activePlugins:s,installedPlugins:a}=Object(i.useSelect)(e=>{const{getActivePlugins:t,getInstalledPlugins:o,isJetpackConnected:c}=e(r.PLUGINS_STORE_NAME);return{activePlugins:t(),isJetpackConnected:c(),installedPlugins:o()}});return Object(c.useEffect)(()=>{const{task:e}=t;o.current!==e&&(window.document.documentElement.scrollTop=0),o.current=e,(()=>{const{task:e}=t;e&&fe(e,n,s,a)})()},[t]),e&&t.task?Object(c.createElement)("div",{className:"woocommerce-task-dashboard__container"},Object(c.cloneElement)(e,{query:t})):null};var Ae=o(535);const Ie=e=>{const{getFreeExtensions:t,getProfileItems:o,getTasksStatus:c}=e(r.ONBOARDING_STORE_NAME),{getSettings:n}=e(r.SETTINGS_STORE_NAME),{getOption:s}=e(r.OPTIONS_STORE_NAME),{getActivePlugins:a,getInstalledPlugins:i,isJetpackConnected:l}=e(r.PLUGINS_STORE_NAME),m=o(),d=s("woocommerce_task_list_tracked_completed_tasks")||[],{general:p={}}=n("general"),u=Object(g.b)(p.woocommerce_default_country),{woocommerce_store_address:_,woocommerce_default_country:b,woocommerce_store_postcode:h}=p,O=Boolean(_&&b&&h),j=a(),w=i(),y=c();return{activePlugins:j,countryCode:u,dismissedTasks:s("woocommerce_task_list_dismissed_tasks"),freeExtensions:t(),remindMeLaterTasks:s("woocommerce_task_list_remind_me_later_tasks"),isExtendedTaskListComplete:"yes"===s("woocommerce_extended_task_list_complete"),isExtendedTaskListHidden:"yes"===s("woocommerce_extended_task_list_hidden"),isJetpackConnected:l(),isSetupTaskListHidden:"yes"===s("woocommerce_task_list_hidden"),isTaskListComplete:"yes"===s("woocommerce_task_list_complete"),installedPlugins:w,onboardingStatus:y,profileItems:m,trackedCompletedTasks:d,hasCompleteAddress:O}};t.default=({userPreferences:e,query:t})=>{const{createNotice:o}=Object(i.useDispatch)("core/notices"),{updateOptions:p}=Object(i.useDispatch)(r.OPTIONS_STORE_NAME),{installAndActivatePlugins:u}=Object(i.useDispatch)(r.PLUGINS_STORE_NAME),{trackedCompletedTasks:_,activePlugins:b,countryCode:h,freeExtensions:O,installedPlugins:j,isJetpackConnected:E,onboardingStatus:S,profileItems:v,isSetupTaskListHidden:C,dismissedTasks:x,remindMeLaterTasks:N,isTaskListComplete:T,isExtendedTaskListHidden:P,isExtendedTaskListComplete:R,hasCompleteAddress:M}=Object(i.useSelect)(Ie),[B,G]=Object(c.useState)(!1),[L,U]=Object(l.useExperiment)("woocommerce_tasklist_progression");Object(c.useEffect)(()=>{document.body.classList.add("woocommerce-onboarding"),document.body.classList.add("woocommerce-task-dashboard__body")},[]);const F=()=>{B||Object(m.recordEvent)("tasklist_purchase_extensions"),G(!B)},D=e=>Object(c.createElement)(Ne,{name:"extended_task_list",eventName:"extended_tasklist",collapsible:!0,dismissedTasks:x||[],remindMeLaterTasks:N||[],isComplete:R,query:t,tasks:e,title:Object(n.__)("Things to do next","woocommerce-admin"),trackedCompletedTasks:_||[]}),z=function({activePlugins:e,countryCode:t,createNotice:o,freeExtensions:s,installAndActivatePlugins:a,installedPlugins:i,isJetpackConnected:r,onboardingStatus:l,profileItems:m,query:d,toggleCartModal:p,onTaskSelect:u,hasCompleteAddress:_}){const{hasPaymentGateway:b,hasPhysicalProducts:h,hasProducts:O,isAppearanceComplete:j,isTaxComplete:w,shippingZonesCount:E,wcPayIsConnected:S}={hasPaymentGateway:!1,hasPhysicalProducts:!1,hasProducts:!1,isAppearanceComplete:!1,isTaxComplete:!1,shippingZonesCount:0,wcPayIsConnected:!1,...l},v=Object(g.a)(m,i),{products:C,remainingProducts:x,uniqueItemsList:N}=v,T=-1!==i.indexOf("woocommerce-payments"),P=-1!==e.indexOf("woocommerce-services"),{completed:R,product_types:M,business_extensions:B}=m,G=(B||[]).includes("woocommerce-payments");let L,U=Object(n.__)("Add paid extensions to my store","woocommerce-admin");if(1===N.length){var F;const{name:e}=N[0],t=Object(n.__)("Add %s to my store","woocommerce-admin");U=Object(n.sprintf)(t,e),L=null===(F=C.find(({label:t})=>t===e))||void 0===F?void 0:F.description}else{const e=N.map(({name:e})=>e),t=e.pop();let o=e.join(", ");e.length>1&&(o+=","),L=Object(n.sprintf)(Object(n.__)("Good choice! You chose to add %1$s and %2$s to your store.","woocommerce-admin"),o,t)}const{automatedTaxSupportedCountries:D=[],taxJarActivated:z}=l,H=!z&&D.includes(t),V=_&&P&&H;let J=Object(n.__)("Let's go","woocommerce-admin"),W=Object(n.__)("Set your store location and configure tax rate settings.","woocommerce-admin");V&&(J=Object(n.__)("Yes please","woocommerce-admin"),W=Object(n.__)("Good news! WooCommerce Services and Jetpack can automate your sales tax calculations for you.","woocommerce-admin"));const[Y,Z]=A(s,e,i),$=[{key:"store_details",title:Object(n.__)("Store details","woocommerce-admin"),content:Object(n.__)("Your store address is required to set the origin country for shipping, currencies, and payment options.","woocommerce-admin"),container:null,action:Object(n.__)("Let's go","woocommerce-admin"),onClick:()=>{u("store_details"),Object(k.getHistory)().push(Object(k.getNewPath)({},"/setup-wizard",{}))},completed:R,visible:!0,time:Object(n.__)("4 minutes","woocommerce-admin"),type:"setup"},{key:"purchase",title:U,content:L,container:null,action:Object(n.__)("Purchase & install now","woocommerce-admin"),onClick:()=>(u("purchase"),x.length?p():null),visible:C.length,completed:C.length&&!x.length,time:Object(n.__)("2 minutes","woocommerce-admin"),isDismissable:!0,type:"setup"},{key:"products",title:Object(n.__)("Add my products","woocommerce-admin"),content:Object(n.__)("Start by adding the first product to your store. You can add your products manually, via CSV, or import them from another service.","woocommerce-admin"),container:Object(c.createElement)(q,null),onClick:()=>{u("products"),Object(k.updateQueryString)({task:"products"})},completed:O,visible:!0,time:Object(n.__)("1 minute per product","woocommerce-admin"),type:"setup"},{key:"woocommerce-payments",title:Object(n.__)("Get paid with WooCommerce Payments","woocommerce-admin"),content:Object(n.__)("You're only one step away from getting paid. Verify your business details to start managing transactions with WooCommerce Payments.","woocommerce-admin"),action:Object(n.__)("Finish setup","woocommmerce-admin"),expanded:!0,container:Object(c.createElement)(c.Fragment,null),completed:S,onClick:async t=>{if("A"===t.target.nodeName)return!1;await new Promise((t,c)=>(fe("wcpay",r,e,i),u("woocommerce-payments"),Object(we.b)(c,o,a)))},visible:G&&T&&Object(we.c)(t),additionalInfo:Object(n.__)('By setting up, you are agreeing to the <a href="https://wordpress.com/tos/" target="_blank">Terms of Service</a>',"woocommerce-admin"),time:Object(n.__)("2 minutes","woocommerce-admin"),type:"setup"},{key:"payments",title:Object(n.__)("Set up payments","woocommerce-admin"),content:Object(n.__)("Choose payment providers and enable payment methods at checkout.","woocommerce-admin"),container:Object(c.createElement)(Ee,{query:d}),completed:b,onClick:()=>{u("payments"),Object(k.updateQueryString)({task:"payments"})},visible:window.wcAdminFeatures["payment-gateway-suggestions"]&&(!T||!G||!Object(we.c)(t)),time:Object(n.__)("2 minutes","woocommerce-admin"),type:"setup"},{key:"tax",title:Object(n.__)("Set up tax","woocommerce-admin"),content:W,container:Object(c.createElement)(re,null),action:J,onClick:(e,t={})=>{const{isExpanded:o}=t;u("tax"),Object(k.updateQueryString)({task:"tax",auto:V&&o})},completed:w,visible:!0,time:Object(n.__)("1 minute","woocommerce-admin"),type:"setup"},{key:"shipping",title:Object(n.__)("Set up shipping","woocommerce-admin"),content:Object(n.__)("Set your store location and where you'll ship to.","woocommerce-admin"),container:Object(c.createElement)(ae,null),action:Object(n.__)("Let's go","woocommerce-admin"),onClick:()=>{E>0?window.location=Object(ve.b)({type:"wc-settings",tab:"shipping"}).href:(u("shipping"),Object(k.updateQueryString)({task:"shipping"}))},completed:E>0,visible:M&&M.includes("physical")||h,time:Object(n.__)("1 minute","woocommerce-admin"),type:"setup"},{key:"marketing",title:Object(n.__)("Set up marketing tools","woocommerce-admin"),content:Object(n.__)("Add recommended marketing tools to reach new customers and grow your business","woocommerce-admin"),container:Object(c.createElement)(I,null),onClick:()=>{u("marketing"),Object(k.updateQueryString)({task:"marketing"})},completed:!!Y.length,visible:window.wcAdminFeatures&&window.wcAdminFeatures["remote-free-extensions"]&&(!!Z.length||!!Y.length),time:Object(n.__)("1 minute","woocommerce-admin"),type:"setup"},{key:"appearance",title:Object(n.__)("Personalize my store","woocommerce-admin"),content:Object(n.__)("Add your logo, create a homepage, and start designing your store.","woocommerce-admin"),container:Object(c.createElement)(f,null),action:Object(n.__)("Let's go","woocommerce-admin"),onClick:()=>{u("appearance"),Object(k.updateQueryString)({task:"appearance"})},completed:j,visible:!0,time:Object(n.__)("2 minutes","woocommerce-admin"),type:"setup"}],Q=Object(y.applyFilters)("woocommerce_admin_onboarding_task_list",$,d);for(const e of Q)e.level=e.level?parseInt(e.level,10):3;return Object(Se.a)(Q,"type","extension")}({activePlugins:b,countryCode:h,createNotice:o,freeExtensions:O,installAndActivatePlugins:u,installedPlugins:j,isJetpackConnected:E,onboardingStatus:S,profileItems:v,query:t,toggleCartModal:F,onTaskSelect:t=>{const o=(t=>{const o=e.task_list_tracked_started_tasks;return o&&o[t]?o[t]:0})(t);Object(m.recordEvent)("tasklist_click",{task_name:t}),(e=>!!_&&_.includes(e))(t)||((t,o)=>{const c=e.task_list_tracked_started_tasks||{};e.updateUserPreferences({task_list_tracked_started_tasks:{...c||{},[t]:o}})})(t,o+1)},hasCompleteAddress:M}),{extension:H,setup:V}=z,{task:J}=t,W=Array.isArray(H)&&H.sort(Ce),Y=(e=>{const{task:o}=t,c=e.find(e=>e.key===o);return c||null})([...W||[],...V||[]]);if(J&&!Y)return null;if(Y)return Object(c.createElement)(Pe,{taskContainer:Y.container,query:t});const Z="extended_task_list"===window.location.hash.substr(1);return Object(c.createElement)(c.Fragment,null,V&&(!C||J)&&(L?Object(c.createElement)(Ae.a,null):Object(c.createElement)(Ne,{name:"task_list",eventName:"tasklist",expandingItems:"treatment"===(null==U?void 0:U.variationName),dismissedTasks:x||[],remindMeLaterTasks:N||[],isComplete:T,query:t,tasks:V,title:Object(n.__)("Get ready to start selling","woocommerce-admin"),trackedCompletedTasks:_||[],onComplete:()=>p({woocommerce_default_homepage_layout:"two_columns"}),onHide:()=>p({woocommerce_task_list_prompt_shown:!0,woocommerce_default_homepage_layout:"two_columns"})})),W&&Object(c.createElement)(Te.a,null,Object(c.createElement)(s.MenuGroup,{className:"woocommerce-layout__homescreen-display-options",label:Object(n.__)("Display","woocommerce-admin")},Object(c.createElement)(s.MenuItem,{className:"woocommerce-layout__homescreen-extension-tasklist-toggle",icon:!P&&a.a,isSelected:!P,role:"menuitemcheckbox",onClick:()=>{const e=!P;Object(m.recordEvent)(e?"extended_tasklist_hide":"extended_tasklist_show"),p({woocommerce_extended_task_list_hidden:e?"yes":"no"})}},Object(n.__)("Show things to do next","woocommerce-admin")))),W&&!P&&(Z?Object(c.createElement)(d.ScrollTo,{offset:"-20"},D(W)):D(W)),B&&Object(c.createElement)(w,{onClose:()=>F(),onClickPurchaseLater:()=>F()}))}}}]);
|
1 |
+
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[49],{162:function(e,t,o){"use strict";o.d(t,"a",(function(){return s}));var c=o(14),n=o(15);const s=(e,t={})=>{const{pathname:o,search:s}=window.location,a=Object(n.f)("connectNonce","");return t={"wccom-site":Object(n.f)("siteUrl"),"wccom-back":o+s,"wccom-woo-version":Object(n.f)("wcVersion"),"wccom-connect-nonce":a,...t},Object(c.addQueryArgs)(e,t)}},470:function(e,t,o){"use strict";var c=o(0),n=o(8),s=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=s},472:function(e,t,o){"use strict";var c=o(0),n=o(8),s=Object(c.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(n.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=s},522:function(e,t,o){"use strict";o.d(t,"a",(function(){return c})),o.d(t,"b",(function(){return n}));const c=(e,t,o="undefined")=>e&&Array.isArray(e)&&e.length?t?e.reduce((e,c)=>(c[t]||(c[t]=o),(e[c[t]]=e[c[t]]||[]).push(c),e),{}):e:{},n=(e,t)=>Object.entries(e).reduce((e,[o])=>({...e,[o]:t}),{})},523:function(e,t,o){"use strict";o.d(t,"b",(function(){return p})),o.d(t,"a",(function(){return u}));var c=o(35),n=o.n(c),s=o(0),a=o(2),i=o(28),r=o(3),l=o(15),m=o(21);const{countries:d}=Object(l.f)("dataEndpoints",{countries:{}});function p(e){const t={};return e.addressLine1.trim().length||(t.addressLine1=Object(a.__)("Please add an address","woocommerce-admin")),e.countryState.trim().length||(t.countryState=Object(a.__)("Please select a country / region","woocommerce-admin")),e.city.trim().length||(t.city=Object(a.__)("Please add a city","woocommerce-admin")),e.postCode.trim().length||(t.postCode=Object(a.__)("Please add a post code","woocommerce-admin")),t}function u(e){const{getInputProps:t,setValue:o}=e,c=Object(s.useMemo)(()=>d.reduce((e,t)=>{if(!t.states.length)return e.push({key:t.code,label:Object(i.decodeEntities)(t.name)}),e;const o=t.states.map(e=>({key:t.code+":"+e.code,label:Object(i.decodeEntities)(t.name)+" — "+Object(i.decodeEntities)(e.name)}));return e.push(...o),e},[]),[]),l=function(e,t,o){const[c,n]=Object(s.useState)(""),[a,i]=Object(s.useState)("");return Object(s.useEffect)(()=>{let n=[];const s=new RegExp(Object(r.escapeRegExp)(c),"i");if((a.length||c.length)&&(n=e.filter(e=>s.test(e.label))),c.length&&a.length){const e=new RegExp(Object(r.escapeRegExp)(a.replace(/\s/g,"")),"i");if(n=n.filter(t=>e.test(t.label.replace("-","").replace(/\s/g,""))),n.length>1){let e=[];e=n.filter(e=>s.test(e.key)),e.length>0&&(n=e)}if(n.length>1){let t=[];t=n.filter(t=>e.test(t.key)),1===t.length&&(n=t)}}1===n.length&&t!==n[0].key&&o("countryState",n[0].key)},[c,a,t,e,o]),Object(s.createElement)(s.Fragment,null,Object(s.createElement)("input",{onChange:e=>n(e.target.value),value:c,name:"country",type:"text",className:"woocommerce-select-control__autofill-input",tabIndex:"-1",autoComplete:"country"}),Object(s.createElement)("input",{onChange:e=>i(e.target.value),value:a,name:"state",type:"text",className:"woocommerce-select-control__autofill-input",tabIndex:"-1",autoComplete:"address-level1"}))}(c,t("countryState").value,o);return Object(s.createElement)("div",{className:"woocommerce-store-address-fields"},Object(s.createElement)(m.TextControl,n()({label:Object(a.__)("Address line 1","woocommerce-admin"),required:!0,autoComplete:"address-line1"},t("addressLine1"))),Object(s.createElement)(m.TextControl,n()({label:Object(a.__)("Address line 2 (optional)","woocommerce-admin"),required:!0,autoComplete:"address-line2"},t("addressLine2"))),Object(s.createElement)(m.SelectControl,n()({label:Object(a.__)("Country / Region","woocommerce-admin"),required:!0,options:c,excludeSelectedOptions:!1,showAllOnFocus:!0,isSearchable:!0},t("countryState"),{controlClassName:t("countryState").className}),l),Object(s.createElement)(m.TextControl,n()({label:Object(a.__)("City","woocommerce-admin"),required:!0},t("city"),{autoComplete:"address-level2"})),Object(s.createElement)(m.TextControl,n()({label:Object(a.__)("Post code","woocommerce-admin"),required:!0,autoComplete:"postal-code"},t("postCode"))))}},533:function(e,t,o){},585:function(e,t,o){},586:function(e,t,o){},587:function(e,t,o){},588:function(e,t,o){},589:function(e,t,o){},590:function(e,t,o){},603:function(e,t,o){"use strict";o.r(t);var c=o(0),n=o(2),s=o(4),a=o(472),i=o(7),r=o(11),l=o(122),m=o(16),d=o(21),p=(o(536),o(13)),u=o(3),_=o(28),b=o(15),g=o(59),h=o(504),O=o(162);class j extends c.Component{constructor(e){super(e),this.state={purchaseNowButtonBusy:!1,purchaseLaterButtonBusy:!1}}onClickPurchaseNow(){const{productIds:e,onClickPurchaseNow:t}=this.props;if(this.setState({purchaseNowButtonBusy:!0}),!e.length)return;Object(m.recordEvent)("tasklist_modal_proceed_checkout",{product_ids:e,purchase_install:!0});const o=Object(O.a)("https://woocommerce.com/cart?utm_medium=product",{"wccom-replace-with":e.join(",")});t?t(o):window.location=o}onClickPurchaseLater(){const{productIds:e}=this.props;Object(m.recordEvent)("tasklist_modal_proceed_checkout",{product_ids:e,purchase_install:!1}),this.setState({purchaseLaterButtonBusy:!0}),this.props.onClickPurchaseLater()}onClose(){const{onClose:e,productIds:t}=this.props;Object(m.recordEvent)("tasklist_modal_proceed_checkout",{product_ids:t,purchase_install:!1}),e()}renderProducts(){const{productIds:e}=this.props,{productTypes:t={},themes:o=[]}=Object(b.f)("onboarding",{}),s=[];return e.forEach(e=>{const a=Object(u.find)(t,t=>t.product===e);a&&s.push({title:a.label,content:a.description});const i=Object(u.find)(o,t=>t.id===e);i&&s.push({title:Object(n.sprintf)(Object(n.__)("%s — %s per year","woocommerce-admin"),i.title,Object(_.decodeEntities)(i.price)),content:Object(c.createElement)("span",{dangerouslySetInnerHTML:Object(h.a)(i.excerpt)})})}),Object(c.createElement)(d.List,{items:s})}render(){const{purchaseNowButtonBusy:e,purchaseLaterButtonBusy:t}=this.state;return Object(c.createElement)(s.Modal,{title:Object(n.__)("Would you like to add the following paid features to your store now?","woocommerce-admin"),onRequestClose:()=>this.onClose(),className:"woocommerce-cart-modal"},this.renderProducts(),Object(c.createElement)("p",{className:"woocommerce-cart-modal__help-text"},Object(n.__)("You won't have access to this functionality until the extensions have been purchased and installed.","woocommerce-admin")),Object(c.createElement)("div",{className:"woocommerce-cart-modal__actions"},Object(c.createElement)(s.Button,{isLink:!0,isBusy:t,onClick:()=>this.onClickPurchaseLater()},Object(n.__)("I'll do it later","woocommerce-admin")),Object(c.createElement)(s.Button,{isPrimary:!0,isBusy:e,onClick:()=>this.onClickPurchaseNow()},Object(n.__)("Buy now","woocommerce-admin"))))}}var w=Object(p.compose)(Object(i.withSelect)(e=>{const{getInstalledPlugins:t}=e(r.PLUGINS_STORE_NAME),{getProfileItems:o}=e(r.ONBOARDING_STORE_NAME),c=o(),n=t();return{profileItems:c,productIds:Object(g.e)(c,!1,n)}}))(j),y=o(30),k=o(12),E=o(17),S=o.n(E);class v extends c.Component{constructor(e){super(e);const{hasHomepage:t,hasProducts:o}=e.tasksStatus;this.stepVisibility={homepage:!t,import:!o},this.state={isDirty:!1,isPending:!1,logo:null,stepIndex:0,isUpdatingLogo:!1,isUpdatingNotice:!1,storeNoticeText:e.demoStoreNotice||""},this.completeStep=this.completeStep.bind(this),this.createHomepage=this.createHomepage.bind(this),this.importProducts=this.importProducts.bind(this),this.updateLogo=this.updateLogo.bind(this),this.updateNotice=this.updateNotice.bind(this)}componentDidMount(){const{themeMods:e}=this.props.tasksStatus;e&&e.custom_logo&&this.setState({logo:{id:e.custom_logo}})}componentDidUpdate(e){const{isPending:t,logo:o}=this.state,{demoStoreNotice:c}=this.props;!o||o.url||t||(this.setState({isPending:!0}),wp.media.attachment(o.id).fetch().then(()=>{const e=wp.media.attachment(o.id).get("url");this.setState({isPending:!1,logo:{id:o.id,url:e}})})),c&&e.demoStoreNotice!==c&&this.setState({storeNoticeText:c})}completeStep(){const{stepIndex:e}=this.state;this.getSteps()[e+1]?this.setState({stepIndex:e+1}):Object(k.getHistory)().push(Object(k.getNewPath)({},"/",{}))}importProducts(){const{clearTaskStatusCache:e,createNotice:t}=this.props;this.setState({isPending:!0}),Object(m.recordEvent)("tasklist_appearance_import_demo",{}),S()({path:r.WC_ADMIN_NAMESPACE+"/onboarding/tasks/import_sample_products",method:"POST"}).then(o=>{o.failed&&o.failed.length?t("error",Object(n.__)("There was an error importing some of the sample products","woocommerce-admin")):(t("success",Object(n.__)("All sample products have been imported","woocommerce-admin")),e()),this.setState({isPending:!1}),this.completeStep()}).catch(e=>{t("error",e.message),this.setState({isPending:!1})})}createHomepage(){const{clearTaskStatusCache:e,createNotice:t}=this.props;this.setState({isPending:!0}),Object(m.recordEvent)("tasklist_appearance_create_homepage",{create_homepage:!0}),S()({path:"/wc-admin/onboarding/tasks/create_homepage",method:"POST"}).then(o=>{e(),t(o.status,o.message,{actions:o.edit_post_link?[{label:Object(n.__)("Customize","woocommerce-admin"),onClick:()=>{Object(m.queueRecordEvent)("tasklist_appearance_customize_homepage",{}),window.location=o.edit_post_link+"&wc_onboarding_active_task=homepage"}}]:null}),this.setState({isPending:!1}),this.completeStep()}).catch(e=>{t("error",e.message),this.setState({isPending:!1})})}async updateLogo(){const{clearTaskStatusCache:e,createNotice:t,stylesheet:o,themeMods:c,updateOptions:s}=this.props,{logo:a}=this.state,i={...c,custom_logo:a?a.id:null};Object(m.recordEvent)("tasklist_appearance_upload_logo"),this.setState({isUpdatingLogo:!0});const r=await s({["theme_mods_"+o]:i});e(),r.success?(this.setState({isUpdatingLogo:!1}),t("success",Object(n.__)("Store logo updated sucessfully","woocommerce-admin")),this.completeStep()):t("error",r.message)}async updateNotice(){const{clearTaskStatusCache:e,createNotice:t,updateOptions:o}=this.props,{storeNoticeText:c}=this.state;Object(m.recordEvent)("tasklist_appearance_set_store_notice",{added_text:Boolean(c.length)}),this.setState({isUpdatingNotice:!0});const s=await o({woocommerce_task_list_appearance_complete:!0,woocommerce_demo_store:c.length?"yes":"no",woocommerce_demo_store_notice:c});e(),s.success?(this.setState({isUpdatingNotice:!1}),t("success",Object(n.__)("🎨 Your store is looking great! Don't forget to continue personalizing it","woocommerce-admin")),this.completeStep()):t("error",s.message)}getSteps(){const{isDirty:e,isPending:t,logo:o,storeNoticeText:a,isUpdatingLogo:i}=this.state,r=[{key:"import",label:Object(n.__)("Import sample products","woocommerce-admin"),description:Object(n.__)("We’ll add some products that will make it easier to see what your store looks like","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.Button,{onClick:this.importProducts,isBusy:t,isPrimary:!0},Object(n.__)("Import products","woocommerce-admin")),Object(c.createElement)(s.Button,{onClick:()=>this.completeStep()},Object(n.__)("Skip","woocommerce-admin"))),visible:this.stepVisibility.import},{key:"homepage",label:Object(n.__)("Create a custom homepage","woocommerce-admin"),description:Object(n.__)("Create a new homepage and customize it to suit your needs","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.Button,{isPrimary:!0,isBusy:t,onClick:this.createHomepage},Object(n.__)("Create homepage","woocommerce-admin")),Object(c.createElement)(s.Button,{isTertiary:!0,onClick:()=>{Object(m.recordEvent)("tasklist_appearance_create_homepage",{create_homepage:!1}),this.completeStep()}},Object(n.__)("Skip","woocommerce-admin"))),visible:this.stepVisibility.homepage},{key:"logo",label:Object(n.__)("Upload a logo","woocommerce-admin"),description:Object(n.__)("Ensure your store is on-brand by adding your logo","woocommerce-admin"),content:t?null:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(d.ImageUpload,{image:o,onChange:e=>this.setState({isDirty:!0,logo:e})}),Object(c.createElement)(s.Button,{disabled:!o&&!e,onClick:this.updateLogo,isBusy:i,isPrimary:!0},Object(n.__)("Proceed","woocommerce-admin")),Object(c.createElement)(s.Button,{isTertiary:!0,onClick:()=>this.completeStep()},Object(n.__)("Skip","woocommerce-admin"))),visible:!0},{key:"notice",label:Object(n.__)("Set a store notice","woocommerce-admin"),description:Object(n.__)("Optionally display a prominent notice across all pages of your store","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(d.TextControl,{label:Object(n.__)("Store notice text","woocommerce-admin"),placeholder:Object(n.__)("Store notice text","woocommerce-admin"),value:a,onChange:e=>this.setState({storeNoticeText:e})}),Object(c.createElement)(s.Button,{onClick:this.updateNotice,isPrimary:!0},Object(n.__)("Complete task","woocommerce-admin"))),visible:!0}];return Object(u.filter)(r,e=>e.visible)}render(){const{isPending:e,stepIndex:t,isUpdatingLogo:o,isUpdatingNotice:n}=this.state,a=this.getSteps()[t].key;return Object(c.createElement)("div",{className:"woocommerce-task-appearance"},Object(c.createElement)(s.Card,{className:"woocommerce-task-card"},Object(c.createElement)(s.CardBody,null,Object(c.createElement)(d.Stepper,{isPending:n||o||e,isVertical:!0,currentStep:a,steps:this.getSteps()}))))}}var f=Object(p.compose)(Object(i.withSelect)(e=>{const{getOption:t}=e(r.OPTIONS_STORE_NAME),{getTasksStatus:o}=e(r.ONBOARDING_STORE_NAME),c=o();return{demoStoreNotice:t("woocommerce_demo_store_notice"),stylesheet:t("stylesheet"),tasksStatus:c}}),Object(i.withDispatch)(e=>{const{createNotice:t}=e("core/notices"),{updateOptions:o}=e(r.OPTIONS_STORE_NAME),{invalidateResolutionForStoreSelector:c}=e(r.ONBOARDING_STORE_NAME);return{clearTaskStatusCache:()=>c("getTasksStatus"),createNotice:t,updateOptions:o}}))(v),C=o(20),x=(o(585),o(505));o(586);const N=({description:e,imageUrl:t,installAndActivate:o=(()=>{}),isActive:a,isBusy:i,isDisabled:r,isInstalled:l,manageUrl:d,name:p,slug:u})=>Object(c.createElement)("div",{className:"woocommerce-plugin-list__plugin"},t&&Object(c.createElement)("div",{className:"woocommerce-plugin-list__plugin-logo"},Object(c.createElement)("img",{src:t,alt:Object(n.sprintf)(Object(n.__)("%s logo","woocommerce-admin"),p)})),Object(c.createElement)("div",{className:"woocommerce-plugin-list__plugin-text"},Object(c.createElement)(C.Text,{variant:"subtitle.small",as:"h4"},p),Object(c.createElement)(C.Text,{variant:"subtitle.small"},e)),Object(c.createElement)("div",{className:"woocommerce-plugin-list__plugin-action"},a&&d&&Object(c.createElement)(s.Button,{disabled:r,isBusy:i,isSecondary:!0,href:Object(b.e)(d),onClick:()=>Object(m.recordEvent)("marketing_manage",{extension_name:u})},Object(n.__)("Manage","woocommmerce-admin")),l&&!a&&Object(c.createElement)(s.Button,{disabled:r,isBusy:i,isSecondary:!0,onClick:()=>o(u)},Object(n.__)("Activate","woocommmerce-admin")),!l&&Object(c.createElement)(s.Button,{disabled:r,isBusy:i,isSecondary:!0,onClick:()=>o(u)},Object(n.__)("Get started","woocommmerce-admin"))));o(587);const T=({currentPlugin:e,installAndActivate:t=(()=>{}),plugins:o=[],title:n})=>Object(c.createElement)("div",{className:"woocommerce-plugin-list"},n&&Object(c.createElement)("div",{className:"woocommerce-plugin-list__title"},Object(c.createElement)(C.Text,{variant:"sectionheading",as:"h3"},n)),o.map(o=>{const{description:n,imageUrl:s,isActive:a,isInstalled:i,manageUrl:r,slug:l,name:m}=o;return Object(c.createElement)(N,{key:l,description:n,manageUrl:r,name:m,imageUrl:s,installAndActivate:t,isActive:a,isBusy:e===l,isDisabled:!!e,isInstalled:i,slug:l})})),P=["reach","grow"],A=(e,t,o)=>{const c=[],n=[];return e.forEach(e=>{if(!P.includes(e.key))return;const s=[];if(e.plugins.forEach(e=>{const n=((e,t,o)=>{const{description:c,image_url:n,key:s,manage_url:a,name:i}=e,r=s.split(":")[0];return{description:c,slug:r,imageUrl:n,isActive:t.includes(r),isInstalled:o.includes(r),manageUrl:a,name:i}})(e,t,o);n.isInstalled?c.push(n):s.push(n)}),!s.length)return;const a={...e,plugins:s};n.push(a)}),[c,n]},I=({trackedCompletedActions:e})=>{const[t,o]=Object(c.useState)(null),{installAndActivatePlugins:a}=Object(i.useDispatch)(r.PLUGINS_STORE_NAME),{updateOptions:l}=Object(i.useDispatch)(r.OPTIONS_STORE_NAME),{activePlugins:d,freeExtensions:p,installedPlugins:u,isResolving:_}=Object(i.useSelect)(e=>{const{getActivePlugins:t,getInstalledPlugins:o}=e(r.PLUGINS_STORE_NAME),{getFreeExtensions:c,hasFinishedResolution:n}=e(r.ONBOARDING_STORE_NAME);return{activePlugins:t(),freeExtensions:c(),installedPlugins:o(),isResolving:!n("getFreeExtensions")}}),[b,g]=Object(c.useMemo)(()=>A(p,d,u),[u,d,p]),h=t=>{o(t),a([t]).then(c=>{Object(m.recordEvent)("tasklist_marketing_install",{selected_extension:t,installed_extensions:b.map(e=>e.slug)}),e.includes("marketing")||l({woocommerce_task_list_tracked_completed_actions:[...e,"marketing"]}),Object(x.a)(c),o(null)}).catch(e=>{Object(x.a)(e),o(null)})};return _?Object(c.createElement)(s.Spinner,null):Object(c.createElement)("div",{className:"woocommerce-task-marketing"},!!b.length&&Object(c.createElement)(s.Card,{className:"woocommerce-task-card"},Object(c.createElement)(s.CardHeader,null,Object(c.createElement)(C.Text,{variant:"title.small",as:"h2",className:"woocommerce-task-card__title"},Object(n.__)("Installed marketing extensions","woocommerce-admin"))),Object(c.createElement)(T,{currentPlugin:t,plugins:b})),!!g.length&&Object(c.createElement)(s.Card,{className:"woocommerce-task-card"},Object(c.createElement)(s.CardHeader,null,Object(c.createElement)(C.Text,{variant:"title.small",as:"h2",className:"woocommerce-task-card__title"},Object(n.__)("Recommended marketing extensions","woocommerce-admin")),Object(c.createElement)(C.Text,{as:"span"},Object(n.__)('We recommend adding one of the following marketing tools for your store. The extension will be installed and activated for you when you click "Get started".',"woocommerce-admin"))),g.map(e=>{const{key:o,title:n,plugins:s}=e;return Object(c.createElement)(T,{currentPlugin:t,installAndActivate:h,key:o,plugins:s,title:n})})))};var R=o(115),M=o(8),B=Object(c.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(M.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})),G=o(470),L=Object(c.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(c.createElement)(M.Path,{d:"M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"})),U=Object(c.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)(M.Path,{d:"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5zM8 12.8h8v-1.5H8v1.5zm0 3h8v-1.5H8v1.5z"})),F=Object(c.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)(M.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"}));o(588);const D=[{key:"physical",title:Object(n.__)("Physical product","woocommerce-admin"),subtitle:Object(n.__)("Tangible items that get delivered to customers","woocommerce-admin")},{key:"digital",title:Object(n.__)("Digital product","woocommerce-admin"),subtitle:Object(n.__)("Items that customers download or access through your website","woocommerce-admin")},{key:"variable",title:Object(n.__)("Variable product","woocommerce-admin"),subtitle:Object(n.__)("Products with several versions that customers can choose from","woocommerce-admin")}];function z({onClose:e}){const[t,o]=Object(c.useState)(null),[a,l]=Object(c.useState)(!1),{createProductFromTemplate:d}=Object(i.useDispatch)(r.ITEMS_STORE_NAME),p=Object(y.applyFilters)("woocommerce_admin_onboarding_product_templates",D);return Object(c.createElement)(s.Modal,{title:Object(n.__)("Start with a template"),isDismissible:!0,onRequestClose:()=>e(),className:"woocommerce-product-template-modal"},Object(c.createElement)("div",{className:"woocommerce-product-template-modal__wrapper"},Object(c.createElement)("div",{className:"woocommerce-product-template-modal__list"},Object(c.createElement)(s.RadioControl,{selected:t,options:p.map(e=>({label:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("span",{className:"woocommerce-product-template-modal__list-title"},e.title),Object(c.createElement)("span",{className:"woocommerce-product-template-modal__list-subtitle"},e.subtitle)),value:e.key})),onChange:o})),Object(c.createElement)("div",{className:"woocommerce-product-template-modal__actions"},Object(c.createElement)(s.Button,{isPrimary:!0,isBusy:a,disabled:!t||a,onClick:()=>{l(!0),Object(m.recordEvent)("tasklist_product_template_selection",{product_type:t}),t?d({template_name:t,status:"draft"},{_fields:["id"]}).then(e=>{if(e&&e.id){const t=Object(b.e)(`post.php?post=${e.id}&action=edit&wc_onboarding_active_task=products&tutorial=true`);window.location=t}},e=>{Object(x.a)(e),l(!1)}):e&&(Object(m.recordEvent)("tasklist_product_template_dismiss"),e())}},Object(n.__)("Go")))))}const H=[{key:"addProductTemplate",title:Object(c.createElement)(c.Fragment,null,Object(n.__)("Start with a template","woocommerce-admin"),Object(c.createElement)(d.Pill,null,Object(n.__)("Recommended","woocommerce-admin"))),content:Object(n.__)("Use a template to add physical, digital, and variable products","woocommerce-admin"),before:Object(c.createElement)(R.a,{icon:B}),after:Object(c.createElement)(R.a,{icon:G.a}),onClick:()=>Object(m.recordEvent)("tasklist_add_product",{method:"product_template"})},{key:"addProductManually",title:Object(n.__)("Add manually","woocommerce-admin"),content:Object(n.__)("For small stores we recommend adding products manually","woocommerce-admin"),before:Object(c.createElement)(R.a,{icon:L}),after:Object(c.createElement)(R.a,{icon:G.a}),onClick:()=>Object(m.recordEvent)("tasklist_add_product",{method:"manually"}),href:Object(b.e)("post-new.php?post_type=product&wc_onboarding_active_task=products&tutorial=true")},{key:"importProducts",title:Object(n.__)("Import via CSV","woocommerce-admin"),content:Object(n.__)("For larger stores we recommend importing all products at once via CSV file","woocommerce-admin"),before:Object(c.createElement)(R.a,{icon:U}),after:Object(c.createElement)(R.a,{icon:G.a}),onClick:()=>Object(m.recordEvent)("tasklist_add_product",{method:"import"}),href:Object(b.e)("edit.php?post_type=product&page=product_importer&wc_onboarding_active_task=product-import")},{key:"migrateProducts",title:Object(n.__)("Import from another service","woocommerce-admin"),content:Object(n.__)("For stores currently selling elsewhere we suggest using a product migration service","woocommerce-admin"),before:Object(c.createElement)(R.a,{icon:F}),after:Object(c.createElement)(R.a,{icon:G.a}),onClick:()=>Object(m.recordEvent)("tasklist_add_product",{method:"migrate"}),href:"https://woocommerce.com/products/cart2cart/?utm_medium=product",target:"_blank"}];function q(){const[e,t]=Object(c.useState)(null),o=H.map(e=>({...e,onClick:()=>(e=>{e.onClick(),"addProductTemplate"===e.key&&t(!0)})(e)}));return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.Card,{className:"woocommerce-task-card"},Object(c.createElement)(s.CardBody,{size:null},Object(c.createElement)(d.List,{items:o}))),e?Object(c.createElement)(z,{onClose:()=>t(null)}):null)}var V=o(35),J=o.n(V),W=o(18),Y=o.n(W),Z=o(1),$=o.n(Z);class Q extends c.Component{constructor(e){super(e),this.state={isConnecting:!1},this.connectJetpack=this.connectJetpack.bind(this),e.setIsPending(!0)}componentDidUpdate(e){const{createNotice:t,error:o,isRequesting:c,onError:n,setIsPending:s}=this.props;e.isRequesting&&!c&&s(!1),o&&o!==e.error&&(n&&n(),t("error",o))}async connectJetpack(){const{jetpackConnectUrl:e,onConnect:t}=this.props;this.setState({isConnecting:!0},()=>{t&&t(),window.location=e})}render(){const{hasErrors:e,isRequesting:t,onSkip:o,skipText:a,onAbort:i,abortText:r}=this.props;return Object(c.createElement)(c.Fragment,null,e?Object(c.createElement)(s.Button,{isPrimary:!0,onClick:()=>window.location.reload()},Object(n.__)("Retry","woocommerce-admin")):Object(c.createElement)(s.Button,{disabled:t,isBusy:this.state.isConnecting,isPrimary:!0,onClick:this.connectJetpack},Object(n.__)("Connect","woocommerce-admin")),o&&Object(c.createElement)(s.Button,{onClick:o},a||Object(n.__)("No thanks","woocommerce-admin")),i&&Object(c.createElement)(s.Button,{onClick:i},r||Object(n.__)("Abort","woocommerce-admin")))}}Q.propTypes={createNotice:$.a.func.isRequired,error:$.a.string,hasErrors:$.a.bool,isRequesting:$.a.bool,jetpackConnectUrl:$.a.string,onConnect:$.a.func,onError:$.a.func,onSkip:$.a.func,redirectUrl:$.a.string,skipText:$.a.string,setIsPending:$.a.func,onAbort:$.a.func,abortText:$.a.string},Q.defaultProps={setIsPending:()=>{}};var K=Object(p.compose)(Object(i.withSelect)((e,t)=>{const{getJetpackConnectUrl:o,isPluginsRequesting:c,getPluginsError:n}=e(r.PLUGINS_STORE_NAME),s={redirect_url:t.redirectUrl||window.location.href},a=c("getJetpackConnectUrl");return{error:n("getJetpackConnectUrl")||"",isRequesting:a,jetpackConnectUrl:o(s)}}),Object(i.withDispatch)(e=>{const{createNotice:t}=e("core/notices");return{createNotice:t}}))(Q),X=o(523);class ee extends c.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this)}async onSubmit(e){const{onComplete:t,createNotice:o,isSettingsError:c,updateAndPersistSettingsForGroup:s,settings:a}=this.props;await s("general",{general:{...a,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}}),c?o("error",Object(n.__)("There was a problem saving your store location","woocommerce-admin")):t(e)}getInitialValues(){const{settings:e}=this.props,{woocommerce_store_address:t,woocommerce_store_address_2:o,woocommerce_store_city:c,woocommerce_default_country:n,woocommerce_store_postcode:s}=e;return{addressLine1:t||"",addressLine2:o||"",city:c||"",countryState:n||"",postCode:s||""}}render(){const{isSettingsRequesting:e}=this.props;return e?null:Object(c.createElement)(d.Form,{initialValues:this.getInitialValues(),onSubmit:this.onSubmit,validate:X.b},({getInputProps:e,handleSubmit:t,setValue:o})=>Object(c.createElement)(c.Fragment,null,Object(c.createElement)(X.a,{getInputProps:e,setValue:o}),Object(c.createElement)(s.Button,{isPrimary:!0,onClick:t},Object(n.__)("Continue","woocommerce-admin"))))}}var te=Object(c.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(c.createElement)(M.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),oe=o(497);class ce extends c.Component{constructor(){super(...arguments),this.updateShippingZones=this.updateShippingZones.bind(this)}getShippingMethods(e,t=null){return e&&e.methods&&Array.isArray(e.methods)?t?e.methods?e.methods.filter(e=>e.method_id===t):[]:e.methods:[]}disableShippingMethods(e,t){t.length&&t.forEach(t=>{S()({method:"POST",path:`/wc/v3/shipping/zones/${e.id}/methods/${t.instance_id}`,data:{enabled:!1}})})}async updateShippingZones(e){const{clearTaskStatusCache:t,createNotice:o,shippingZones:c}=this.props;let s=!1,a=!1;c.forEach(t=>{0===t.id?s=t.toggleable&&e[t.id+"_enabled"]:a=""!==e[t.id+"_rate"]&&parseFloat(e[t.id+"_rate"])!==parseFloat(0);const o=this.getShippingMethods(t),c=parseFloat(e[t.id+"_rate"])===parseFloat(0)?"free_shipping":"flat_rate",n=this.getShippingMethods(t,c).length?this.getShippingMethods(t,c)[0]:null;if(!t.toggleable||e[t.id+"_enabled"]){if(n){const e=o.filter(e=>e.instance_id!==n.instance_id);this.disableShippingMethods(t,e)}S()({method:"POST",path:n?`/wc/v3/shipping/zones/${t.id}/methods/${n.instance_id}`:`/wc/v3/shipping/zones/${t.id}/methods`,data:{method_id:c,enabled:!0,settings:{cost:e[t.id+"_rate"]}}})}else this.disableShippingMethods(t,o)}),Object(m.recordEvent)("tasklist_shipping_set_costs",{shipping_cost:a,rest_world:s}),t(),o("success",Object(n.__)("Your shipping rates have been updated","woocommerce-admin")),this.props.onComplete()}renderInputPrefix(){const{symbolPosition:e,symbol:t}=this.context.getCurrencyConfig();return 0===e.indexOf("right")?null:Object(c.createElement)("span",{className:"woocommerce-shipping-rate__control-prefix"},t)}renderInputSuffix(e){const{symbolPosition:t,symbol:o}=this.context.getCurrencyConfig();return 0===t.indexOf("right")?Object(c.createElement)("span",{className:"woocommerce-shipping-rate__control-suffix"},o):parseFloat(e)===parseFloat(0)?Object(c.createElement)("span",{className:"woocommerce-shipping-rate__control-suffix"},Object(n.__)("Free shipping","woocommerce-admin")):null}getFormattedRate(e){const{formatDecimalString:t}=this.context,o=t(e);return e.length&&o.length?t(e):t(0)}getInitialValues(){const{formatDecimalString:e}=this.context,t={};return this.props.shippingZones.forEach(o=>{const c=this.getShippingMethods(o),n=c.length&&c[0].settings.cost?this.getFormattedRate(c[0].settings.cost.value):e(0);t[o.id+"_rate"]=n,c.length&&c[0].enabled?t[o.id+"_enabled"]=!0:t[o.id+"_enabled"]=!1}),t}validate(e){const t={};return Object.keys(e).filter(e=>e.endsWith("_rate")).forEach(o=>{e[o]<0&&(t[o]=Object(n.__)("Shipping rates can not be negative numbers.","woocommerce-admin"))}),t}render(){const{buttonText:e,shippingZones:t}=this.props;return t.length?Object(c.createElement)(d.Form,{initialValues:this.getInitialValues(),onSubmit:this.updateShippingZones,validate:this.validate},({getInputProps:o,handleSubmit:a,setTouched:i,setValue:r,values:l})=>Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"woocommerce-shipping-rates"},t.map(e=>Object(c.createElement)("div",{className:"woocommerce-shipping-rate",key:e.id},Object(c.createElement)("div",{className:"woocommerce-shipping-rate__icon"},e.locations?e.locations.map(e=>Object(c.createElement)(d.Flag,{size:24,code:e.code,key:e.code})):Object(c.createElement)(R.a,{icon:te})),Object(c.createElement)("div",{className:"woocommerce-shipping-rate__main"},e.toggleable?Object(c.createElement)("label",{htmlFor:"woocommerce-shipping-rate__toggle-"+e.id,className:"woocommerce-shipping-rate__name"},e.name,Object(c.createElement)(s.FormToggle,J()({id:"woocommerce-shipping-rate__toggle-"+e.id},o(e.id+"_enabled")))):Object(c.createElement)("div",{className:"woocommerce-shipping-rate__name"},e.name),(!e.toggleable||l[e.id+"_enabled"])&&Object(c.createElement)(d.TextControlWithAffixes,J()({label:Object(n.__)("Shipping cost","woocommerce-admin"),required:!0},o(e.id+"_rate"),{onBlur:()=>{i(e.id+"_rate"),r(e.id+"_rate",this.getFormattedRate(l[e.id+"_rate"]))},prefix:this.renderInputPrefix(),suffix:this.renderInputSuffix(l[e.id+"_rate"]),className:"muriel-input-text woocommerce-shipping-rate__control-wrapper"})))))),Object(c.createElement)(s.Button,{isPrimary:!0,onClick:a},e||Object(n.__)("Update","woocommerce-admin")))):null}}ce.propTypes={buttonText:$.a.string,onComplete:$.a.func.isRequired,createNotice:$.a.func.isRequired,shippingZones:$.a.array},ce.defaultProps={shippingZones:[]},ce.contextType=oe.a;var ne=Object(p.compose)(Object(i.withDispatch)(e=>{const{invalidateResolutionForStoreSelector:t}=e(r.ONBOARDING_STORE_NAME);return{clearTaskStatusCache:()=>t("getTasksStatus")}}))(ce);class se extends c.Component{constructor(e){super(e),this.initialState={isPending:!1,step:"store_location",shippingZones:[]},this.activePlugins=e.activePlugins,this.state=this.initialState,this.completeStep=this.completeStep.bind(this)}componentDidMount(){this.reset()}reset(){this.setState(this.initialState)}async fetchShippingZones(){this.setState({isPending:!0});const{countryCode:e,countryName:t}=this.props,o=[],c=await S()({path:"/wc/v3/shipping/zones"});let s=!1;if(await Promise.all(c.map(async t=>{if(0===t.id)return t.methods=await S()({path:`/wc/v3/shipping/zones/${t.id}/methods`}),t.name=Object(n.__)("Rest of the world","woocommerce-admin"),t.toggleable=!0,void o.push(t);t.locations=await S()({path:`/wc/v3/shipping/zones/${t.id}/locations`});t.locations.find(t=>e===t.code)&&(t.methods=await S()({path:`/wc/v3/shipping/zones/${t.id}/methods`}),o.push(t),s=!0)})),!s){const c=await S()({method:"POST",path:"/wc/v3/shipping/zones",data:{name:t}});c.locations=await S()({method:"POST",path:`/wc/v3/shipping/zones/${c.id}/locations`,data:[{code:e,type:"country"}]}),o.push(c)}o.reverse(),this.setState({isPending:!1,shippingZones:o})}componentDidUpdate(e,t){const{countryCode:o,settings:c}=this.props,{woocommerce_store_address:n,woocommerce_default_country:s,woocommerce_store_postcode:a}=c,{step:i}=this.state;"rates"!==i||e.countryCode===o&&"rates"===t.step||this.fetchShippingZones();const r=Boolean(n&&s&&a);"store_location"===i&&r&&this.completeStep()}completeStep(){const{createNotice:e}=this.props,{step:t}=this.state,o=this.getSteps(),c=o.findIndex(e=>e.key===t),s=o[c+1];s?this.setState({step:s.key}):(e("success",Object(n.__)("📦 Shipping is done! Don't worry, you can always change it later","woocommerce-admin")),Object(k.getHistory)().push(Object(k.getNewPath)({},"/",{})))}getPluginsToActivate(){const{countryCode:e}=this.props,t=[];return["GB","CA","AU"].includes(e)?t.push("woocommerce-shipstation-integration"):"US"===e&&(t.push("woocommerce-services"),t.push("jetpack")),Object(u.difference)(t,this.activePlugins)}getSteps(){const{countryCode:e,isJetpackConnected:t,settings:o}=this.props,s=this.getPluginsToActivate(),a=!t&&"US"===e,i=[{key:"store_location",label:Object(n.__)("Set store location","woocommerce-admin"),description:Object(n.__)("The address from which your business operates","woocommerce-admin"),content:Object(c.createElement)(ee,J()({},this.props,{onComplete:e=>{const t=Object(g.b)(e.countryState);Object(m.recordEvent)("tasklist_shipping_set_location",{country:t}),this.completeStep()}})),visible:!0},{key:"rates",label:Object(n.__)("Set shipping costs","woocommerce-admin"),description:Object(n.__)("Define how much customers pay to ship to different destinations","woocommerce-admin"),content:Object(c.createElement)(ne,J()({buttonText:s.length||a?Object(n.__)("Proceed","woocommerce-admin"):Object(n.__)("Complete task","woocommerce-admin"),shippingZones:this.state.shippingZones,onComplete:this.completeStep},this.props)),visible:"disabled"!==o.woocommerce_ship_to_countries},{key:"label_printing",label:Object(n.__)("Enable shipping label printing","woocommerce-admin"),description:s.includes("woocommerce-shipstation-integration")?Y()({mixedString:Object(n.__)("We recommend using ShipStation to save time at the post office by printing your shipping labels at home. Try ShipStation free for 30 days. {{link}}Learn more{{/link}}.","woocommerce-admin"),components:{link:Object(c.createElement)(d.Link,{href:"https://woocommerce.com/products/shipstation-integration?utm_medium=product",target:"_blank",type:"external"})}}):Object(n.__)("With WooCommerce Shipping you can save time by printing your USPS and DHL Express shipping labels at home","woocommerce-admin"),content:Object(c.createElement)(d.Plugins,J()({onComplete:(e,t)=>{Object(x.a)(t),Object(m.recordEvent)("tasklist_shipping_label_printing",{install:!0,plugins_to_activate:s}),this.completeStep()},onError:(e,t)=>Object(x.a)(t),onSkip:()=>{Object(m.recordEvent)("tasklist_shipping_label_printing",{install:!1,plugins_to_activate:s}),Object(k.getHistory)().push(Object(k.getNewPath)({},"/",{}))},pluginSlugs:s},this.props)),visible:s.length},{key:"connect",label:Object(n.__)("Connect your store","woocommerce-admin"),description:Object(n.__)("Connect your store to WordPress.com to enable label printing","woocommerce-admin"),content:Object(c.createElement)(K,J()({redirectUrl:Object(b.e)("admin.php?page=wc-admin"),completeStep:this.completeStep},this.props,{onConnect:()=>{Object(m.recordEvent)("tasklist_shipping_connect_store")}})),visible:a}];return Object(u.filter)(i,e=>e.visible)}render(){const{isPending:e,step:t}=this.state,{isUpdateSettingsRequesting:o}=this.props;return Object(c.createElement)("div",{className:"woocommerce-task-shipping"},Object(c.createElement)(s.Card,{className:"woocommerce-task-card"},Object(c.createElement)(s.CardBody,null,Object(c.createElement)(d.Stepper,{isPending:e||o,isVertical:!0,currentStep:t,steps:this.getSteps()}))))}}var ae=Object(p.compose)(Object(i.withSelect)(e=>{const{getSettings:t,isUpdateSettingsRequesting:o}=e(r.SETTINGS_STORE_NAME),{getActivePlugins:c,isJetpackConnected:n}=e(r.PLUGINS_STORE_NAME),{general:s={}}=t("general"),a=Object(g.b)(s.woocommerce_default_country),{countries:i=[]}=Object(b.f)("dataEndpoints",{}),l=a?i.find(e=>e.code===a):null,m=l?l.name:null,d=c();return{countryCode:a,countryName:m,isUpdateSettingsRequesting:o("general"),settings:s,activePlugins:d,isJetpackConnected:n()}}),Object(i.withDispatch)(e=>{const{createNotice:t}=e("core/notices"),{updateAndPersistSettingsForGroup:o}=e(r.SETTINGS_STORE_NAME);return{createNotice:t,updateAndPersistSettingsForGroup:o}}))(se);class ie extends c.Component{constructor(e){super(e);const{hasCompleteAddress:t,pluginsToActivate:o}=e;this.initialState={isPending:!1,stepIndex:t?1:0,cachedPluginsToActivate:o},this.state=this.initialState,this.completeStep=this.completeStep.bind(this)}componentDidMount(){const{query:e}=this.props,{auto:t}=e;this.reset(),"true"===t&&this.enableAutomatedTax()}reset(){this.setState(this.initialState)}shouldShowSuccessScreen(){const{isJetpackConnected:e,hasCompleteAddress:t,pluginsToActivate:o}=this.props;return t&&!o.length&&e&&this.isTaxJarSupported()}isTaxJarSupported(){const{countryCode:e,tasksStatus:t}=this.props,{automatedTaxSupportedCountries:o=[],taxJarActivated:c}=t;return!c&&o.includes(e)}completeStep(){const{stepIndex:e}=this.state;this.getSteps()[e+1]&&this.setState({stepIndex:e+1})}async manuallyConfigureTaxRates(){const{generalSettings:e,updateAndPersistSettingsForGroup:t}=this.props;"yes"!==e.woocommerce_calc_taxes?(this.setState({isPending:!0}),t("general",{general:{...e,woocommerce_calc_taxes:"yes"}}).then(()=>this.redirectToTaxSettings()).catch(e=>Object(x.a)(e))):this.redirectToTaxSettings()}updateAutomatedTax(e){const{clearTaskStatusCache:t,createNotice:o,updateAndPersistSettingsForGroup:c,generalSettings:s,taxSettings:a}=this.props;Promise.all([c("tax",{tax:{...a,wc_connect_taxes_enabled:e?"yes":"no"}}),c("general",{general:{...s,woocommerce_calc_taxes:"yes"}})]).then(()=>{t(),e?(o("success",Object(n.__)("You're awesome! One less item on your to-do list ✅","woocommerce-admin")),Object(k.getHistory)().push(Object(k.getNewPath)({},"/",{}))):this.redirectToTaxSettings()}).catch(()=>{o("error",Object(n.__)("There was a problem updating your tax settings","woocommerce-admin"))})}redirectToTaxSettings(){window.location=Object(b.e)("admin.php?page=wc-settings&tab=tax§ion=standard&wc_onboarding_active_task=tax")}doNotChargeSalesTax(){const{updateOptions:e}=this.props;Object(m.queueRecordEvent)("tasklist_tax_connect_store",{connect:!1,no_tax:!0}),e({woocommerce_no_sales_tax:!0,woocommerce_calc_taxes:"no"}).then(()=>{window.location=Object(b.e)("admin.php?page=wc-admin")})}getSteps(){const{generalSettings:e,isJetpackConnected:t,isPending:o,tosAccepted:a,updateOptions:i}=this.props,{cachedPluginsToActivate:r}=this.state;let l,p;r.includes("woocommerce-services")?(l=Object(n.__)("Install Jetpack and WooCommerce Tax","woocommerce-admin"),p=Object(n.__)("By installing Jetpack and WooCommerce Tax you agree to the {{link}}Terms of Service{{/link}}.","woocommerce-admin")):(l=Object(n.__)("Install Jetpack","woocommerce-admin"),p=Object(n.__)("By installing Jetpack you agree to the {{link}}Terms of Service{{/link}}.","woocommerce-admin"));const _=[{key:"store_location",label:Object(n.__)("Set store location","woocommerce-admin"),description:Object(n.__)("The address from which your business operates","woocommerce-admin"),content:Object(c.createElement)(ee,J()({},this.props,{onComplete:e=>{const t=Object(g.b)(e.countryState);Object(m.recordEvent)("tasklist_tax_set_location",{country:t}),this.completeStep()},isSettingsRequesting:!1,settings:e})),visible:!0},{key:"plugins",label:l,description:Object(n.__)("Jetpack and WooCommerce Tax allow you to automate sales tax calculations","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(d.Plugins,{onComplete:(e,t)=>{Object(x.a)(t),Object(m.recordEvent)("tasklist_tax_install_extensions",{install_extensions:!0}),i({woocommerce_setup_jetpack_opted_in:!0}),this.completeStep()},onError:(e,t)=>Object(x.a)(t),onSkip:()=>{Object(m.queueRecordEvent)("tasklist_tax_install_extensions",{install_extensions:!1}),this.manuallyConfigureTaxRates()},skipText:Object(n.__)("Set up manually","woocommerce-admin"),onAbort:()=>this.doNotChargeSalesTax(),abortText:Object(n.__)("I don't charge sales tax","woocommerce-admin")}),!a&&Object(c.createElement)(C.Text,{variant:"caption",className:"woocommerce-task__caption",size:"12",lineHeight:"16px"},Y()({mixedString:p,components:{link:Object(c.createElement)(d.Link,{href:"https://wordpress.com/tos/",target:"_blank",type:"external"})}}))),visible:(r.length||!a)&&this.isTaxJarSupported()},{key:"connect",label:Object(n.__)("Connect your store","woocommerce-admin"),description:Object(n.__)("Connect your store to WordPress.com to enable automated sales tax calculations","woocommerce-admin"),content:Object(c.createElement)(K,J()({},this.props,{onConnect:()=>{Object(m.recordEvent)("tasklist_tax_connect_store",{connect:!0,no_tax:!1})},onSkip:()=>{Object(m.queueRecordEvent)("tasklist_tax_connect_store",{connect:!1,no_tax:!1}),this.manuallyConfigureTaxRates()},skipText:Object(n.__)("Set up tax rates manually","woocommerce-admin"),onAbort:()=>this.doNotChargeSalesTax(),abortText:Object(n.__)("My business doesn't charge sales tax","woocommerce-admin")})),visible:!t&&this.isTaxJarSupported()},{key:"manual_configuration",label:Object(n.__)("Configure tax rates","woocommerce-admin"),description:Object(n.__)("Head over to the tax rate settings screen to configure your tax rates","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.Button,{disabled:o,isPrimary:!0,isBusy:o,onClick:()=>{Object(m.recordEvent)("tasklist_tax_config_rates"),this.manuallyConfigureTaxRates()}},Object(n.__)("Configure","woocommerce-admin")),Object(c.createElement)("p",null,"yes"!==e.woocommerce_calc_taxes&&Y()({mixedString:Object(n.__)('By clicking "Configure" you\'re enabling tax rates and calculations. More info {{link}}here{{/link}}.',"woocommerce-admin"),components:{link:Object(c.createElement)(d.Link,{href:"https://docs.woocommerce.com/document/setting-up-taxes-in-woocommerce/?utm_medium=product#section-1",target:"_blank",type:"external"})}}))),visible:!this.isTaxJarSupported()}];return Object(u.filter)(_,e=>e.visible)}enableAutomatedTax(){Object(m.recordEvent)("tasklist_tax_setup_automated_proceed",{setup_automatically:!0}),this.updateAutomatedTax(!0)}renderSuccessScreen(){const{isPending:e}=this.props;return Object(c.createElement)("div",{className:"woocommerce-task-tax__success"},Object(c.createElement)("span",{className:"woocommerce-task-tax__success-icon",role:"img","aria-labelledby":"woocommerce-task-tax__success-message"},"🎊"),Object(c.createElement)(d.H,{id:"woocommerce-task-tax__success-message"},Object(n.__)("Good news!","woocommerce-admin")),Object(c.createElement)("p",null,Y()({mixedString:Object(n.__)("{{strong}}Jetpack{{/strong}} and {{strong}}WooCommerce Tax{{/strong}} can automate your sales tax calculations for you.","woocommerce-admin"),components:{strong:Object(c.createElement)("strong",null)}})),Object(c.createElement)(s.Button,{disabled:e,isPrimary:!0,isBusy:e,onClick:this.enableAutomatedTax.bind(this)},Object(n.__)("Yes please","woocommerce-admin")),Object(c.createElement)(s.Button,{disabled:e,isTertiary:!0,onClick:()=>{Object(m.recordEvent)("tasklist_tax_setup_automated_proceed",{setup_automatically:!1}),this.updateAutomatedTax(!1)}},Object(n.__)("No thanks, I'll set up manually","woocommerce-admin")),Object(c.createElement)(s.Button,{disabled:e,isTertiary:!0,onClick:()=>this.doNotChargeSalesTax()},Object(n.__)("I don't charge sales tax","woocommerce-admin")))}render(){const{stepIndex:e}=this.state,{isPending:t,isResolving:o}=this.props;if(o)return Object(c.createElement)(d.Spinner,null);const n=this.getSteps()[e];return Object(c.createElement)("div",{className:"woocommerce-task-tax"},Object(c.createElement)(s.Card,{className:"woocommerce-task-card"},Object(c.createElement)(s.CardBody,null,this.shouldShowSuccessScreen()?this.renderSuccessScreen():Object(c.createElement)(d.Stepper,{isPending:t||o,isVertical:!0,currentStep:n.key,steps:this.getSteps()}))))}}var re=Object(p.compose)(Object(i.withSelect)(e=>{const{getSettings:t,isUpdateSettingsRequesting:o}=e(r.SETTINGS_STORE_NAME),{getOption:c,isResolving:n}=e(r.OPTIONS_STORE_NAME),{getActivePlugins:s,isJetpackConnected:a,isPluginsRequesting:i}=e(r.PLUGINS_STORE_NAME),{getTasksStatus:l}=e(r.ONBOARDING_STORE_NAME),{general:m={}}=t("general"),d=Object(g.b)(m.woocommerce_default_country),{woocommerce_store_address:p,woocommerce_default_country:_,woocommerce_store_postcode:b}=m,h=Boolean(p&&_&&b),{tax:O={}}=t("tax"),j=s(),w=Object(u.difference)(["jetpack","woocommerce-services"],j),y=c("wc_connect_options")||{},k=c("woocommerce_setup_jetpack_opted_in"),E=y.tos_accepted||"1"===k,S=l(),v=o("tax")||o("general"),f=i("getJetpackConnectUrl")||n("getOption",["woocommerce_setup_jetpack_opted_in"])||void 0===k;return{countryCode:d,generalSettings:m,hasCompleteAddress:h,isJetpackConnected:a(),isPending:v,isResolving:f,pluginsToActivate:w,tasksStatus:S,taxSettings:O,tosAccepted:E}}),Object(i.withDispatch)(e=>{const{createNotice:t}=e("core/notices"),{updateOptions:o}=e(r.OPTIONS_STORE_NAME),{updateAndPersistSettingsForGroup:c}=e(r.SETTINGS_STORE_NAME),{invalidateResolutionForStoreSelector:n}=e(r.ONBOARDING_STORE_NAME);return{clearTaskStatusCache:()=>n("getTasksStatus"),createNotice:t,updateAndPersistSettingsForGroup:c,updateOptions:o}}))(ie),le=o(6),me=o.n(le),de=o(270),pe=o(537);o(533);const ue=({isRecommended:e,markConfigured:t,paymentGateway:o})=>{var n,a;const{image:i,content:r,id:l,plugins:d=[],title:p,loading:u,enabled:_=!1,installed:b=!1,needsSetup:g=!0,requiredSettings:h,settingsUrl:O,is_local_partner:j}=o,w=Object(C.useSlot)("woocommerce_payment_gateway_configure_"+l),y=Object(C.useSlot)("woocommerce_payment_gateway_setup_"+l),k=Boolean(null==w||null===(n=w.fills)||void 0===n?void 0:n.length)||Boolean(null==y||null===(a=y.fills)||void 0===a?void 0:a.length),E=Boolean(d.length||h.length||k),S=e&&g,v=me()("woocommerce-task-payment","woocommerce-task-card",g&&"woocommerce-task-payment-not-configured","woocommerce-task-payment-"+l);return Object(c.createElement)(c.Fragment,{key:l},Object(c.createElement)(s.CardBody,{style:{paddingLeft:0,marginBottom:0},className:v},Object(c.createElement)(s.CardMedia,{isBorderless:!0},Object(c.createElement)("img",{src:i,alt:p})),Object(c.createElement)("div",{className:"woocommerce-task-payment__description"},S&&Object(c.createElement)(de.RecommendedRibbon,{isLocalPartner:j}),Object(c.createElement)(C.Text,{as:"h3",className:"woocommerce-task-payment__title"},p,b&&g&&!!d.length&&Object(c.createElement)(de.SetupRequired,null)),Object(c.createElement)("div",{className:"woocommerce-task-payment__content"},r)),Object(c.createElement)("div",{className:"woocommerce-task-payment__footer"},Object(c.createElement)(pe.a,{manageUrl:O,id:l,hasSetup:E,needsSetup:g,isEnabled:_,isInstalled:b,hasPlugins:Boolean(d.length),isRecommended:e,isLoading:u,markConfigured:t,onSetUp:()=>Object(m.recordEvent)("tasklist_payment_setup",{selected:l})}))),Object(c.createElement)(s.CardDivider,null))},_e=({heading:e,markConfigured:t,recommendation:o,paymentGateways:n})=>Object(c.createElement)(s.Card,null,Object(c.createElement)(s.CardHeader,{as:"h2"},e),n.map(e=>{const{id:n}=e;return Object(c.createElement)(ue,{key:n,isRecommended:o===n,markConfigured:t,paymentGateway:e})})),be=()=>{const e=me()("woocommerce-task-payment","woocommerce-task-card");return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.CardBody,{style:{paddingLeft:0,marginBottom:0},className:e},Object(c.createElement)(s.CardMedia,{isBorderless:!0},Object(c.createElement)("span",{className:"is-placeholder"})),Object(c.createElement)("div",{className:"woocommerce-task-payment__description"},Object(c.createElement)(C.Text,{as:"h3",className:"woocommerce-task-payment__title"},Object(c.createElement)("span",{className:"is-placeholder"})),Object(c.createElement)("div",{className:"woocommerce-task-payment__content"},Object(c.createElement)("span",{className:"is-placeholder"}))),Object(c.createElement)("div",{className:"woocommerce-task-payment__footer"},Object(c.createElement)("span",{className:"is-placeholder"}))),Object(c.createElement)(s.CardDivider,null))},ge=()=>Object(c.createElement)(s.Card,{"aria-hidden":"true",className:"is-loading woocommerce-payment-gateway-suggestions-list-placeholder"},Object(c.createElement)(s.CardHeader,{as:"h2"},Object(c.createElement)("span",{className:"is-placeholder"})),Object(c.createElement)(be,null),Object(c.createElement)(be,null),Object(c.createElement)(be,null)),he=({markConfigured:e,paymentGateway:t})=>{var o;const{id:a,connectionUrl:l,setupHelpText:p,settingsUrl:u,title:_,requiredSettings:b}=t,{createNotice:g}=Object(i.useDispatch)("core/notices"),{updatePaymentGateway:O}=Object(i.useDispatch)(r.PAYMENT_GATEWAYS_STORE_NAME),j=Object(C.useSlot)("woocommerce_payment_gateway_configure_"+a),w=Boolean(null==j||null===(o=j.fills)||void 0===o?void 0:o.length),{isUpdating:y}=Object(i.useSelect)(e=>{const{isPaymentGatewayUpdating:t}=e(r.PAYMENT_GATEWAYS_STORE_NAME);return{isUpdating:t()}}),k=t=>{O(a,{enabled:!0,settings:t}).then(t=>{t&&t.id===a&&(e(a),g("success",Object(n.sprintf)(Object(n.__)("%s configured successfully","woocommerce-admin"),_)))}).catch(()=>{g("error",Object(n.__)("There was a problem saving your payment settings","woocommerce-admin"))})},E=p&&Object(c.createElement)("p",{dangerouslySetInnerHTML:Object(h.a)(p)}),S=Object(c.createElement)(d.DynamicForm,{fields:b,isBusy:y,onSubmit:k,submitLabel:Object(n.__)("Proceed","woocommerce-admin"),validate:e=>((e,t)=>{const o={},c=e=>t.find(t=>t.id===e);for(const[t,n]of Object.entries(e)){const e=c(t),s=e.label.replace(/([A-Z][a-z]+)/g,e=>e.toLowerCase());n||"checkbox"===e.type||(o[t]="Please enter your "+s)}return o})(e,b)});return w?Object(c.createElement)(de.WooPaymentGatewayConfigure.Slot,{fillProps:{defaultForm:S,defaultSubmit:k,defaultFields:b,markConfigured:()=>e(a),paymentGateway:t},id:a}):l?Object(c.createElement)(c.Fragment,null,E,Object(c.createElement)(s.Button,{isPrimary:!0,onClick:()=>Object(m.recordEvent)("tasklist_payment_connect_start",{payment_method:a}),href:l},Object(n.__)("Connect","woocommerce-admin"))):b.length?Object(c.createElement)(c.Fragment,null,E,S):Object(c.createElement)(c.Fragment,null,E||Object(c.createElement)("p",null,Object(n.__)("You can manage this payment gateway's settings by clicking the button below","woocommerce-admin")),Object(c.createElement)(s.Button,{isPrimary:!0,href:u},Object(n.__)("Set up","woocommerce-admin")))};o(589);const Oe=({markConfigured:e,paymentGateway:t})=>{var o;const{id:a,plugins:l=[],title:p,postInstallScripts:u,installed:_}=t,g=Object(C.useSlot)("woocommerce_payment_gateway_setup_"+a),h=Boolean(null==g||null===(o=g.fills)||void 0===o?void 0:o.length),[O,j]=Object(c.useState)(!1);Object(c.useEffect)(()=>{Object(m.recordEvent)("payments_task_stepper_view",{payment_method:a})},[]);const{invalidateResolutionForStoreSelector:w}=Object(i.useDispatch)(r.PAYMENT_GATEWAYS_STORE_NAME),{isOptionUpdating:y,isPaymentGatewayResolving:k,needsPluginInstall:E}=Object(i.useSelect)(e=>{const{isOptionsUpdating:t}=e(r.OPTIONS_STORE_NAME),{isResolving:o}=e(r.PAYMENT_GATEWAYS_STORE_NAME),c=e(r.PLUGINS_STORE_NAME).getActivePlugins(),n=l.filter(e=>!c.includes(e));return{isOptionUpdating:t(),isPaymentGatewayResolving:o("getPaymentGateways"),needsPluginInstall:!!n.length}});Object(c.useEffect)(()=>{if(!E)if(u&&u.length){const e=u.map(e=>Object(b.d)(e));Promise.all(e).then(()=>{j(!0)})}else j(!0)},[u,E]);const S=Object(c.useMemo)(()=>l&&l.length?{key:"install",label:Object(n.sprintf)(Object(n.__)("Install %s","woocommerce-admin"),p),content:Object(c.createElement)(d.Plugins,{onComplete:(e,t)=>{Object(x.a)(t),w("getPaymentGateways"),Object(m.recordEvent)("tasklist_payment_install_method",{plugins:l})},onError:(e,t)=>Object(x.a)(t),autoInstall:!0,pluginSlugs:l})}:null,[]),v=Object(c.useMemo)(()=>({key:"configure",label:Object(n.sprintf)(Object(n.__)("Configure your %(title)s account","woocommerce-admin"),{title:p}),content:_?Object(c.createElement)(he,{markConfigured:e,paymentGateway:t}):null}),[_]),f=E||y||k||!O,N=Object(c.createElement)(d.Stepper,{isVertical:!0,isPending:f,currentStep:E?"install":"configure",steps:[S,v].filter(Boolean)});return Object(c.createElement)(s.Card,{className:"woocommerce-task-payment-method woocommerce-task-card"},Object(c.createElement)(s.CardBody,null,h?Object(c.createElement)(de.WooPaymentGatewaySetup.Slot,{fillProps:{defaultStepper:N,defaultInstallStep:S,defaultConfigureStep:v,markConfigured:()=>e(a),paymentGateway:t},id:a}):N))},je=()=>{const e=me()("is-loading","woocommerce-task-payment-method","woocommerce-task-card");return Object(c.createElement)(s.Card,{"aria-hidden":"true",className:e},Object(c.createElement)(s.CardBody,null,Object(c.createElement)(d.Stepper,{isVertical:!0,currentStep:"none",steps:[{key:"first",label:""},{key:"second",label:""}]})))};var we=o(534),ye=o(116);const ke={account_name:"",account_number:"",bank_name:"",sort_code:"",iban:"",bic:""};Object(ye.registerPlugin)("wc-admin-payment-gateway-setup-bacs",{render:()=>{const e=Object(i.useSelect)(e=>e(r.OPTIONS_STORE_NAME).isOptionsUpdating()),{createNotice:t}=Object(i.useDispatch)("core/notices"),{updateOptions:o}=Object(i.useDispatch)(r.OPTIONS_STORE_NAME),a=e=>{const t={};return e.account_number||e.iban||(t.account_number=t.iban=Object(n.__)("Please enter an account number or IBAN","woocommerce-admin")),t};return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(de.WooPaymentGatewaySetup,{id:"bacs"},({markConfigured:i})=>Object(c.createElement)(d.Form,{initialValues:ke,onSubmit:e=>(async(e,c)=>{if((await o({woocommerce_bacs_settings:{enabled:"yes"},woocommerce_bacs_accounts:[e]})).success)return c(),void t("success",Object(n.__)("Direct bank transfer details added successfully","woocommerce-admin"));t("error",Object(n.__)("There was a problem saving your payment settings","woocommerce-admin"))})(e,i),validate:a},({getInputProps:t,handleSubmit:o})=>Object(c.createElement)(c.Fragment,null,Object(c.createElement)(d.H,null,Object(n.__)("Add your bank details","woocommerce-admin")),Object(c.createElement)("p",null,Object(n.__)("These details are required to receive payments via bank transfer","woocommerce-admin")),Object(c.createElement)("div",{className:"woocommerce-task-payment-method__fields"},Object(c.createElement)(d.TextControl,J()({label:Object(n.__)("Account name","woocommerce-admin"),required:!0},t("account_name"))),Object(c.createElement)(d.TextControl,J()({label:Object(n.__)("Account number","woocommerce-admin"),required:!0},t("account_number"))),Object(c.createElement)(d.TextControl,J()({label:Object(n.__)("Bank name","woocommerce-admin"),required:!0},t("bank_name"))),Object(c.createElement)(d.TextControl,J()({label:Object(n.__)("Sort code","woocommerce-admin"),required:!0},t("sort_code"))),Object(c.createElement)(d.TextControl,J()({label:Object(n.__)("IBAN","woocommerce-admin"),required:!0},t("iban"))),Object(c.createElement)(d.TextControl,J()({label:Object(n.__)("BIC / Swift","woocommerce-admin"),required:!0},t("bic")))),Object(c.createElement)(s.Button,{isPrimary:!0,isBusy:e,onClick:o},Object(n.__)("Save","woocommerce-admin"))))))},scope:"woocommerce-admin"});const Ee=({query:e})=>{const{invalidateResolutionForStoreSelector:t}=Object(i.useDispatch)(r.ONBOARDING_STORE_NAME),{updatePaymentGateway:o}=Object(i.useDispatch)(r.PAYMENT_GATEWAYS_STORE_NAME),{getPaymentGateway:s,paymentGatewaySuggestions:a,installedPaymentGateways:l,isResolving:d}=Object(i.useSelect)(e=>({getPaymentGateway:e(r.PAYMENT_GATEWAYS_STORE_NAME).getPaymentGateway,getOption:e(r.OPTIONS_STORE_NAME).getOption,installedPaymentGateways:e(r.PAYMENT_GATEWAYS_STORE_NAME).getPaymentGateways(),isResolving:e(r.ONBOARDING_STORE_NAME).isResolving("getPaymentGatewaySuggestions"),paymentGatewaySuggestions:e(r.ONBOARDING_STORE_NAME).getPaymentGatewaySuggestions()}),[]),p=Object(c.useMemo)(()=>{const e=l.reduce((e,t)=>(e[t.id]=t,e),{});return a.reduce((t,o)=>{const{id:c}=o,n=e[o.id]?e[c]:{},s={installed:!!e[c],postInstallScripts:n.post_install_scripts,enabled:n.enabled||!1,needsSetup:n.needs_setup,settingsUrl:n.settings_url,connectionUrl:n.connection_url,setupHelpText:n.setup_help_text,title:n.title,requiredSettings:n.required_settings_keys?n.required_settings_keys.map(e=>n.settings[e]).filter(Boolean):[],...o};return t.set(c,s),t},new Map)},[l,a]);Object(c.useEffect)(()=>{p.size&&Object(m.recordEvent)("tasklist_payments_options",{options:Array.from(p.values()).map(e=>e.id)})},[p]);const u=Object(c.useCallback)(async(e,c={})=>{if(!p.get(e))throw`Payment gateway ${e} not found in available gateways list`;(e=>{if(!e)return;const c=s(e);c&&!c.enabled&&o(e,{enabled:!0}).then(()=>{t("getTasksStatus")})})(e),Object(m.recordEvent)("tasklist_payment_connect_method",{payment_method:e}),Object(k.getHistory)().push(Object(k.getNewPath)({...c},"/",{}))},[p]),_=Object(c.useMemo)(()=>Array.from(p.values()).filter(e=>e.recommendation_priority).sort((e,t)=>e.recommendation_priority-t.recommendation_priority).map(e=>e.id).shift(),[p]),b=Object(c.useMemo)(()=>{if(!e.id||d||!p.size)return null;const t=p.get(e.id);if(!t)throw`Current gateway ${e.id} not found in available gateways list`;return t},[d,e,p]),[g,h,O]=Object(c.useMemo)(()=>Array.from(p.values()).reduce((e,t)=>{const[o,c,n]=e;return"woocommerce_payments"!==t.id||t.installed&&!t.needsSetup?t.enabled?c.push(t):n.push(t):o.push(t),e},[[],[],[]]),[p]);return e.id&&!b?Object(c.createElement)(je,null):b?Object(c.createElement)(Oe,{paymentGateway:b,markConfigured:u}):Object(c.createElement)("div",{className:"woocommerce-task-payments"},!p.size&&Object(c.createElement)(ge,null),!!g.length&&Object(c.createElement)(we.a,{paymentGateway:g[0]}),!!h.length&&Object(c.createElement)(_e,{heading:Object(n.__)("Enabled payment gateways","woocommerce-admin"),recommendation:_,paymentGateways:h}),!!O.length&&Object(c.createElement)(_e,{heading:Object(n.__)("Additional payment gateways","woocommerce-admin"),recommendation:_,paymentGateways:O,markConfigured:u}))};var Se=o(522),ve=o(538);function fe(e,t,o,c){Object(m.recordEvent)("task_view",{task_name:e,wcs_installed:c.includes("woocommerce-services"),wcs_active:o.includes("woocommerce-services"),jetpack_installed:c.includes("jetpack"),jetpack_active:o.includes("jetpack"),jetpack_connected:t})}function Ce(e,t){if(e.completed||t.completed)return e.completed?1:-1;const o=e.level||3,c=t.level||3;return o===c?0:o>c?1:-1}o(590);function xe(e,t,o){return[...new Set([...e,...t])].filter(e=>!o.includes(e))}var Ne=({query:e,name:t,eventName:o,isComplete:a,dismissedTasks:l,remindMeLaterTasks:p,tasks:u,trackedCompletedTasks:_,title:b,collapsible:g=!1,onComplete:h,onHide:O,expandingItems:j=!1})=>{var w;const{createNotice:y}=Object(i.useDispatch)("core/notices"),{updateOptions:E}=Object(i.useDispatch)(r.OPTIONS_STORE_NAME),{profileItems:S}=Object(i.useSelect)(e=>{const{getProfileItems:t}=e(r.ONBOARDING_STORE_NAME);return{profileItems:t()}}),v=Object(c.useRef)(e);Object(c.useEffect)(()=>{G()},[]),Object(c.useEffect)(()=>{const{task:t}=v.current,{task:o}=e;t!==o&&(window.document.documentElement.scrollTop=0,v.current=e),I(),R()},[e]);const f=Date.now(),x=u.filter(e=>e.visible&&!l.includes(e.key)&&(!p[e.key]||p[e.key]<f)),N=x.filter(e=>e.completed).map(e=>e.key),T=u.filter(e=>e.visible&&!e.completed&&!l.includes(e.key)),[P,A]=Object(c.useState)(null===(w=T[0])||void 0===w?void 0:w.key),I=()=>{const e=`woocommerce_${t}_complete`,o=a?{[e]:"no"}:{[e]:"yes"};(!T.length&&!a||T.length&&a)&&(E({...o}),"function"==typeof h&&h())},R=()=>{const e=function(e,t){if(!t)return[];return e.filter(e=>t.includes(e))}(N,_),t=(o=e,c=_,x.filter(e=>c.includes(e.key)&&!o.includes(e.key)).map(e=>e.key));var o,c;(function(e,t,o){if(t.length>0)return!0;if(0===o.length)return!1;return!o.every(t=>e.indexOf(t)>=0)})(e,t,N)&&E({woocommerce_task_list_tracked_completed_tasks:xe(N,_,t)})},M=e=>{const t=l.filter(t=>t!==e);E({woocommerce_task_list_dismissed_tasks:t}),Object(m.recordEvent)(o+"_undo_dismiss_task",{task_name:e})},B=e=>{const{[e]:t,...c}=p;E({woocommerce_task_list_remind_me_later_tasks:c}),Object(m.recordEvent)(o+"_undo_remindmelater_task",{task_name:e})},G=()=>{e.task||Object(m.recordEvent)(o+"_view",{number_tasks:x.length,store_connected:S.wccom_connected})},L=x.map(e=>(e.onClick||(e.onClick=t=>{if(Object(m.recordEvent)(o+"_click",{task_name:e.key}),"A"===t.target.nodeName)return!1;Object(k.updateQueryString)({task:e.key})}),e));if(!L.length)return Object(c.createElement)("div",{className:"woocommerce-task-dashboard__container"});const U=Object(n.sprintf)(Object(n._n)("Show %i more task.","Show %i more tasks.",L.length-2,"woocommerce-admin"),L.length-2),F=Object(n.__)("Show less","woocommerce-admin"),D=g?C.CollapsibleList:C.List,z=g?{collapseLabel:F,expandLabel:U,show:2,onCollapse:()=>Object(m.recordEvent)(o+"_collapse"),onExpand:()=>Object(m.recordEvent)(o+"_expand")}:{};return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"woocommerce-task-dashboard__container"},Object(c.createElement)(s.Card,{size:"large",className:"woocommerce-task-card woocommerce-homescreen-card"},Object(c.createElement)(s.CardHeader,{size:"medium"},Object(c.createElement)("div",{className:"wooocommerce-task-card__header"},Object(c.createElement)(C.Text,{size:"20",lineHeight:"28px",variant:"title.small"},b),Object(c.createElement)(d.Badge,{count:T.length})),Object(c.createElement)("div",{className:"woocommerce-card__menu woocommerce-card__header-item"},Object(c.createElement)(d.EllipsisMenu,{label:Object(n.__)("Task List Options","woocommerce-admin"),renderContent:()=>Object(c.createElement)("div",{className:"woocommerce-task-card__section-controls"},Object(c.createElement)(s.Button,{onClick:()=>(e=>{const c={[`woocommerce_${t}_hidden`]:"yes"};Object(m.recordEvent)(o+"_completed",{action:e,completed_task_count:N.length,incomplete_task_count:T.length}),E({...c}),"function"==typeof O&&O()})("remove_card")},Object(n.__)("Hide this","woocommerce-admin")))}))),Object(c.createElement)(D,J()({animation:"custom"},z),L.map(e=>Object(c.createElement)(C.TaskItem,{key:e.key,title:e.title,completed:e.completed,content:e.content,onClick:!j||e.completed?e.onClick:()=>A(e.key),expandable:j,expanded:j&&P===e.key,onDismiss:e.isDismissable?()=>(({key:e,onDismiss:t})=>{y("success",Object(n.__)("Task dismissed"),{actions:[{label:Object(n.__)("Undo","woocommerce-admin"),onClick:()=>M(e)}]}),Object(m.recordEvent)(o+"_dismiss_task",{task_name:e}),E({woocommerce_task_list_dismissed_tasks:[...l,e]}),t&&t()})(e):void 0,remindMeLater:e.allowRemindMeLater?()=>(({key:e,onDismiss:t})=>{y("success",Object(n.__)("Task postponed until tomorrow","woocommerce-admin"),{actions:[{label:Object(n.__)("Undo","woocommerce-admin"),onClick:()=>B(e)}]}),Object(m.recordEvent)(o+"_remindmelater_task",{task_name:e});const c=Date.now()+864e5;E({woocommerce_task_list_remind_me_later_tasks:{...p,[e]:c}}),t&&t()})(e):void 0,time:e.time,level:e.level,action:e.onClick,actionLabel:e.action,additionalInfo:e.additionalInfo}))))))},Te=o(252);const Pe=({taskContainer:e,query:t})=>{const o=Object(c.useRef)(),{isJetpackConnected:n,activePlugins:s,installedPlugins:a}=Object(i.useSelect)(e=>{const{getActivePlugins:t,getInstalledPlugins:o,isJetpackConnected:c}=e(r.PLUGINS_STORE_NAME);return{activePlugins:t(),isJetpackConnected:c(),installedPlugins:o()}});return Object(c.useEffect)(()=>{const{task:e}=t;o.current!==e&&(window.document.documentElement.scrollTop=0),o.current=e,(()=>{const{task:e}=t;e&&fe(e,n,s,a)})()},[t]),e&&t.task?Object(c.createElement)("div",{className:"woocommerce-task-dashboard__container"},Object(c.cloneElement)(e,{query:t})):null};var Ae=o(535);const Ie=[],Re=e=>{const{getFreeExtensions:t,getProfileItems:o,getTasksStatus:c}=e(r.ONBOARDING_STORE_NAME),{getSettings:n}=e(r.SETTINGS_STORE_NAME),{getOption:s}=e(r.OPTIONS_STORE_NAME),{getActivePlugins:a,getInstalledPlugins:i,isJetpackConnected:l}=e(r.PLUGINS_STORE_NAME),m=o(),d=s("woocommerce_task_list_tracked_completed_tasks")||Ie,p=s("woocommerce_task_list_tracked_completed_actions")||Ie,{general:u={}}=n("general"),_=Object(g.b)(u.woocommerce_default_country),{woocommerce_store_address:b,woocommerce_default_country:h,woocommerce_store_postcode:O}=u,j=Boolean(b&&h&&O),w=a(),y=i(),k=c();return{activePlugins:w,countryCode:_,dismissedTasks:s("woocommerce_task_list_dismissed_tasks"),freeExtensions:t(),remindMeLaterTasks:s("woocommerce_task_list_remind_me_later_tasks"),isExtendedTaskListComplete:"yes"===s("woocommerce_extended_task_list_complete"),isExtendedTaskListHidden:"yes"===s("woocommerce_extended_task_list_hidden"),isJetpackConnected:l(),isSetupTaskListHidden:"yes"===s("woocommerce_task_list_hidden"),isTaskListComplete:"yes"===s("woocommerce_task_list_complete"),installedPlugins:y,trackedCompletedActions:p,onboardingStatus:k,profileItems:m,trackedCompletedTasks:d,hasCompleteAddress:j}};t.default=({userPreferences:e,query:t})=>{const{createNotice:o}=Object(i.useDispatch)("core/notices"),{updateOptions:p}=Object(i.useDispatch)(r.OPTIONS_STORE_NAME),{installAndActivatePlugins:u}=Object(i.useDispatch)(r.PLUGINS_STORE_NAME),{trackedCompletedTasks:_,activePlugins:b,countryCode:h,freeExtensions:O,installedPlugins:j,isJetpackConnected:E,onboardingStatus:S,profileItems:v,isSetupTaskListHidden:C,dismissedTasks:x,remindMeLaterTasks:N,isTaskListComplete:T,isExtendedTaskListHidden:P,isExtendedTaskListComplete:R,hasCompleteAddress:M,trackedCompletedActions:B}=Object(i.useSelect)(Re),[G,L]=Object(c.useState)(!1),[U,F]=Object(l.useExperiment)("woocommerce_tasklist_progression");Object(c.useEffect)(()=>{document.body.classList.add("woocommerce-onboarding"),document.body.classList.add("woocommerce-task-dashboard__body")},[]);const D=()=>{G||Object(m.recordEvent)("tasklist_purchase_extensions"),L(!G)},z=e=>Object(c.createElement)(Ne,{name:"extended_task_list",eventName:"extended_tasklist",collapsible:!0,dismissedTasks:x||[],remindMeLaterTasks:N||[],isComplete:R,query:t,tasks:e,title:Object(n.__)("Things to do next","woocommerce-admin"),trackedCompletedTasks:_||[]}),H=function({activePlugins:e,countryCode:t,createNotice:o,freeExtensions:s,installAndActivatePlugins:a,installedPlugins:i,isJetpackConnected:r,onboardingStatus:l,profileItems:m,query:d,toggleCartModal:p,onTaskSelect:u,hasCompleteAddress:_,trackedCompletedActions:b}){const{hasPaymentGateway:h,hasPhysicalProducts:O,hasProducts:j,isAppearanceComplete:w,isTaxComplete:E,shippingZonesCount:S,wcPayIsConnected:v}={hasPaymentGateway:!1,hasPhysicalProducts:!1,hasProducts:!1,isAppearanceComplete:!1,isTaxComplete:!1,shippingZonesCount:0,wcPayIsConnected:!1,...l},C=Object(g.a)(m,i),{products:x,remainingProducts:N,uniqueItemsList:T}=C,P=-1!==i.indexOf("woocommerce-payments"),R=-1!==e.indexOf("woocommerce-services"),{completed:M,product_types:B,business_extensions:G}=m,L=(G||[]).includes("woocommerce-payments");let U,F=Object(n.__)("Add paid extensions to my store","woocommerce-admin");if(1===T.length){var D;const{name:e}=T[0],t=Object(n.__)("Add %s to my store","woocommerce-admin");F=Object(n.sprintf)(t,e),U=null===(D=x.find(({label:t})=>t===e))||void 0===D?void 0:D.description}else{const e=T.map(({name:e})=>e),t=e.pop();let o=e.join(", ");e.length>1&&(o+=","),U=Object(n.sprintf)(Object(n.__)("Good choice! You chose to add %1$s and %2$s to your store.","woocommerce-admin"),o,t)}const{automatedTaxSupportedCountries:z=[],taxJarActivated:H}=l,V=!H&&z.includes(t),J=_&&R&&V;let W=Object(n.__)("Let's go","woocommerce-admin"),Y=Object(n.__)("Set your store location and configure tax rate settings.","woocommerce-admin");J&&(W=Object(n.__)("Yes please","woocommerce-admin"),Y=Object(n.__)("Good news! WooCommerce Services and Jetpack can automate your sales tax calculations for you.","woocommerce-admin"));const[Z,$]=A(s,e,i),Q=[{key:"store_details",title:Object(n.__)("Store details","woocommerce-admin"),content:Object(n.__)("Your store address is required to set the origin country for shipping, currencies, and payment options.","woocommerce-admin"),container:null,action:Object(n.__)("Let's go","woocommerce-admin"),onClick:()=>{u("store_details"),Object(k.getHistory)().push(Object(k.getNewPath)({},"/setup-wizard",{}))},completed:M,visible:!0,time:Object(n.__)("4 minutes","woocommerce-admin"),type:"setup"},{key:"purchase",title:F,content:U,container:null,action:Object(n.__)("Purchase & install now","woocommerce-admin"),onClick:()=>(u("purchase"),N.length?p():null),visible:x.length,completed:x.length&&!N.length,time:Object(n.__)("2 minutes","woocommerce-admin"),isDismissable:!0,type:"setup"},{key:"products",title:Object(n.__)("Add my products","woocommerce-admin"),content:Object(n.__)("Start by adding the first product to your store. You can add your products manually, via CSV, or import them from another service.","woocommerce-admin"),container:Object(c.createElement)(q,null),onClick:()=>{u("products"),Object(k.updateQueryString)({task:"products"})},completed:j,visible:!0,time:Object(n.__)("1 minute per product","woocommerce-admin"),type:"setup"},{key:"woocommerce-payments",title:Object(n.__)("Get paid with WooCommerce Payments","woocommerce-admin"),content:Object(n.__)("You're only one step away from getting paid. Verify your business details to start managing transactions with WooCommerce Payments.","woocommerce-admin"),action:Object(n.__)("Finish setup","woocommmerce-admin"),expanded:!0,container:Object(c.createElement)(c.Fragment,null),completed:v,onClick:async t=>{if("A"===t.target.nodeName)return!1;await new Promise((t,c)=>(fe("wcpay",r,e,i),u("woocommerce-payments"),Object(we.b)(c,o,a)))},visible:L&&P&&Object(we.c)(t),additionalInfo:Object(n.__)('By setting up, you are agreeing to the <a href="https://wordpress.com/tos/" target="_blank">Terms of Service</a>',"woocommerce-admin"),time:Object(n.__)("2 minutes","woocommerce-admin"),type:"setup"},{key:"payments",title:Object(n.__)("Set up payments","woocommerce-admin"),content:Object(n.__)("Choose payment providers and enable payment methods at checkout.","woocommerce-admin"),container:Object(c.createElement)(Ee,{query:d}),completed:h,onClick:()=>{u("payments"),Object(k.updateQueryString)({task:"payments"})},visible:window.wcAdminFeatures["payment-gateway-suggestions"]&&(!P||!L||!Object(we.c)(t)),time:Object(n.__)("2 minutes","woocommerce-admin"),type:"setup"},{key:"tax",title:Object(n.__)("Set up tax","woocommerce-admin"),content:Y,container:Object(c.createElement)(re,null),action:W,onClick:(e,t={})=>{const{isExpanded:o}=t;u("tax"),Object(k.updateQueryString)({task:"tax",auto:J&&o})},completed:E,visible:!0,time:Object(n.__)("1 minute","woocommerce-admin"),type:"setup"},{key:"shipping",title:Object(n.__)("Set up shipping","woocommerce-admin"),content:Object(n.__)("Set your store location and where you'll ship to.","woocommerce-admin"),container:Object(c.createElement)(ae,null),action:Object(n.__)("Let's go","woocommerce-admin"),onClick:()=>{S>0?window.location=Object(ve.b)({type:"wc-settings",tab:"shipping"}).href:(u("shipping"),Object(k.updateQueryString)({task:"shipping"}))},completed:S>0,visible:B&&B.includes("physical")||O,time:Object(n.__)("1 minute","woocommerce-admin"),type:"setup"},{key:"marketing",title:Object(n.__)("Set up marketing tools","woocommerce-admin"),content:Object(n.__)("Add recommended marketing tools to reach new customers and grow your business","woocommerce-admin"),container:Object(c.createElement)(I,{trackedCompletedActions:b}),onClick:()=>{u("marketing"),Object(k.updateQueryString)({task:"marketing"})},completed:!!Z.length&&b.includes("marketing")||!$.length,visible:window.wcAdminFeatures&&window.wcAdminFeatures["remote-free-extensions"]&&(!!$.length||!!Z.length),time:Object(n.__)("1 minute","woocommerce-admin"),type:"setup"},{key:"appearance",title:Object(n.__)("Personalize my store","woocommerce-admin"),content:Object(n.__)("Add your logo, create a homepage, and start designing your store.","woocommerce-admin"),container:Object(c.createElement)(f,null),action:Object(n.__)("Let's go","woocommerce-admin"),onClick:()=>{u("appearance"),Object(k.updateQueryString)({task:"appearance"})},completed:w,visible:!0,time:Object(n.__)("2 minutes","woocommerce-admin"),type:"setup"}],K=Object(y.applyFilters)("woocommerce_admin_onboarding_task_list",Q,d);for(const e of K)e.level=e.level?parseInt(e.level,10):3;return Object(Se.a)(K,"type","extension")}({activePlugins:b,countryCode:h,createNotice:o,freeExtensions:O,installAndActivatePlugins:u,installedPlugins:j,isJetpackConnected:E,onboardingStatus:S,profileItems:v,query:t,toggleCartModal:D,onTaskSelect:t=>{const o=(t=>{const o=e.task_list_tracked_started_tasks;return o&&o[t]?o[t]:0})(t);Object(m.recordEvent)("tasklist_click",{task_name:t}),(e=>!!_&&_.includes(e))(t)||((t,o)=>{const c=e.task_list_tracked_started_tasks||{};e.updateUserPreferences({task_list_tracked_started_tasks:{...c||{},[t]:o}})})(t,o+1)},hasCompleteAddress:M,trackedCompletedActions:B}),{extension:V,setup:J}=H,{task:W}=t,Y=Array.isArray(V)&&V.sort(Ce),Z=(e=>{const{task:o}=t,c=e.find(e=>e.key===o);return c||null})([...Y||[],...J||[]]);if(W&&!Z)return null;if(Z)return Object(c.createElement)(Pe,{taskContainer:Z.container,query:t});const $="extended_task_list"===window.location.hash.substr(1);return Object(c.createElement)(c.Fragment,null,J&&(!C||W)&&(U?Object(c.createElement)(Ae.a,null):Object(c.createElement)(Ne,{name:"task_list",eventName:"tasklist",expandingItems:"treatment"===(null==F?void 0:F.variationName),dismissedTasks:x||[],remindMeLaterTasks:N||[],isComplete:T,query:t,tasks:J,title:Object(n.__)("Get ready to start selling","woocommerce-admin"),trackedCompletedTasks:_||[],onComplete:()=>p({woocommerce_default_homepage_layout:"two_columns"}),onHide:()=>p({woocommerce_task_list_prompt_shown:!0,woocommerce_default_homepage_layout:"two_columns"})})),Y&&Object(c.createElement)(Te.a,null,Object(c.createElement)(s.MenuGroup,{className:"woocommerce-layout__homescreen-display-options",label:Object(n.__)("Display","woocommerce-admin")},Object(c.createElement)(s.MenuItem,{className:"woocommerce-layout__homescreen-extension-tasklist-toggle",icon:!P&&a.a,isSelected:!P,role:"menuitemcheckbox",onClick:()=>{const e=!P;Object(m.recordEvent)(e?"extended_tasklist_hide":"extended_tasklist_show"),p({woocommerce_extended_task_list_hidden:e?"yes":"no"})}},Object(n.__)("Show things to do next","woocommerce-admin")))),Y&&!P&&($?Object(c.createElement)(d.ScrollTo,{offset:"-20"},z(Y)):z(Y)),G&&Object(c.createElement)(w,{onClose:()=>D(),onClickPurchaseLater:()=>D()}))}}}]);
|
languages/woocommerce-admin.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the WooCommerce Admin package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce Admin 2.6.
|
6 |
-
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/2.6.
|
7 |
-
"POT-Creation-Date: 2021-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -3842,7 +3842,7 @@ msgstr ""
|
|
3842 |
|
3843 |
#: src/Notes/SetUpAdditionalPaymentTypes.php:94
|
3844 |
#: client/header/index.js:70
|
3845 |
-
#: client/task-list/tasks.js:
|
3846 |
msgid "Set up payments"
|
3847 |
msgstr ""
|
3848 |
|
@@ -5422,7 +5422,7 @@ msgid "Display Stats:"
|
|
5422 |
msgstr ""
|
5423 |
|
5424 |
#: client/header/activity-panel/display-options/icons/display.js:41
|
5425 |
-
#: client/task-list/index.js:
|
5426 |
msgid "Display"
|
5427 |
msgstr ""
|
5428 |
|
@@ -5455,7 +5455,7 @@ msgstr ""
|
|
5455 |
|
5456 |
#: client/header/activity-panel/index.js:244
|
5457 |
#: client/marketing/overview/installed-extensions/row.js:112
|
5458 |
-
#: client/task-list/tasks.js:
|
5459 |
#: client/task-list/tasks/PaymentGatewaySuggestions/components/Action.js:119
|
5460 |
msgid "Finish setup"
|
5461 |
msgstr ""
|
@@ -5658,7 +5658,7 @@ msgid "You have inventory to review and update"
|
|
5658 |
msgstr ""
|
5659 |
|
5660 |
#: client/header/activity-panel/panels/inbox/abbreviated-notifications-panel.js:75
|
5661 |
-
#: client/task-list/index.js:
|
5662 |
msgid "Things to do next"
|
5663 |
msgstr ""
|
5664 |
|
@@ -5890,7 +5890,7 @@ msgstr ""
|
|
5890 |
|
5891 |
#: client/homescreen/welcome-from-calypso-modal/welcome-from-calypso-modal.js:73
|
5892 |
#: client/homescreen/welcome-modal/index.js:83
|
5893 |
-
#: client/task-list/tasks.js:
|
5894 |
msgid "Let's go"
|
5895 |
msgstr ""
|
5896 |
|
@@ -6063,7 +6063,7 @@ msgid "There was an error loading recommended extensions."
|
|
6063 |
msgstr ""
|
6064 |
|
6065 |
#: client/marketing/overview/installed-extensions/index.js:37
|
6066 |
-
#: client/task-list/tasks/Marketing/index.tsx:
|
6067 |
msgid "Installed marketing extensions"
|
6068 |
msgstr ""
|
6069 |
|
@@ -6616,7 +6616,7 @@ msgid "Marketing & Merchandising"
|
|
6616 |
msgstr ""
|
6617 |
|
6618 |
#: client/store-management-links/index.js:52
|
6619 |
-
#: client/task-list/tasks.js:
|
6620 |
msgid "Personalize my store"
|
6621 |
msgstr ""
|
6622 |
|
@@ -6625,7 +6625,7 @@ msgid "View my store"
|
|
6625 |
msgstr ""
|
6626 |
|
6627 |
#: client/store-management-links/index.js:75
|
6628 |
-
#: client/task-list/tasks.js:
|
6629 |
msgid "Store details"
|
6630 |
msgstr ""
|
6631 |
|
@@ -6637,11 +6637,11 @@ msgstr ""
|
|
6637 |
msgid "Tax"
|
6638 |
msgstr ""
|
6639 |
|
6640 |
-
#: client/task-list/index.js:
|
6641 |
msgid "Get ready to start selling"
|
6642 |
msgstr ""
|
6643 |
|
6644 |
-
#: client/task-list/index.js:
|
6645 |
msgid "Show things to do next"
|
6646 |
msgstr ""
|
6647 |
|
@@ -6664,112 +6664,112 @@ msgstr[1] ""
|
|
6664 |
msgid "Show less"
|
6665 |
msgstr ""
|
6666 |
|
6667 |
-
#: client/task-list/tasks.js:
|
6668 |
msgid "Add paid extensions to my store"
|
6669 |
msgstr ""
|
6670 |
|
6671 |
-
#: client/task-list/tasks.js:
|
6672 |
msgid "Add %s to my store"
|
6673 |
msgstr ""
|
6674 |
|
6675 |
-
#: client/task-list/tasks.js:
|
6676 |
msgid "Good choice! You chose to add %1$s and %2$s to your store."
|
6677 |
msgstr ""
|
6678 |
|
6679 |
-
#: client/task-list/tasks.js:
|
6680 |
msgid "Set your store location and configure tax rate settings."
|
6681 |
msgstr ""
|
6682 |
|
6683 |
-
#: client/task-list/tasks.js:
|
6684 |
#: client/task-list/tasks/tax.js:446
|
6685 |
msgid "Yes please"
|
6686 |
msgstr ""
|
6687 |
|
6688 |
-
#: client/task-list/tasks.js:
|
6689 |
msgid ""
|
6690 |
"Good news! WooCommerce Services and Jetpack can automate your sales tax "
|
6691 |
"calculations for you."
|
6692 |
msgstr ""
|
6693 |
|
6694 |
-
#: client/task-list/tasks.js:
|
6695 |
msgid ""
|
6696 |
"Your store address is required to set the origin country for shipping, "
|
6697 |
"currencies, and payment options."
|
6698 |
msgstr ""
|
6699 |
|
6700 |
-
#: client/task-list/tasks.js:
|
6701 |
msgid "4 minutes"
|
6702 |
msgstr ""
|
6703 |
|
6704 |
-
#: client/task-list/tasks.js:
|
6705 |
msgid "Purchase & install now"
|
6706 |
msgstr ""
|
6707 |
|
6708 |
-
#: client/task-list/tasks.js:
|
6709 |
msgid "Add my products"
|
6710 |
msgstr ""
|
6711 |
|
6712 |
-
#: client/task-list/tasks.js:
|
6713 |
msgid ""
|
6714 |
"Start by adding the first product to your store. You can add your products "
|
6715 |
"manually, via CSV, or import them from another service."
|
6716 |
msgstr ""
|
6717 |
|
6718 |
-
#: client/task-list/tasks.js:
|
6719 |
msgid "1 minute per product"
|
6720 |
msgstr ""
|
6721 |
|
6722 |
-
#: client/task-list/tasks.js:
|
6723 |
msgid "Get paid with WooCommerce Payments"
|
6724 |
msgstr ""
|
6725 |
|
6726 |
-
#: client/task-list/tasks.js:
|
6727 |
msgid ""
|
6728 |
"You're only one step away from getting paid. Verify your business details "
|
6729 |
"to start managing transactions with WooCommerce Payments."
|
6730 |
msgstr ""
|
6731 |
|
6732 |
-
#: client/task-list/tasks.js:
|
6733 |
msgid ""
|
6734 |
"By setting up, you are agreeing to the <a "
|
6735 |
"href=\"https://wordpress.com/tos/\" target=\"_blank\">Terms of Service</a>"
|
6736 |
msgstr ""
|
6737 |
|
6738 |
-
#: client/task-list/tasks.js:
|
6739 |
msgid "Choose payment providers and enable payment methods at checkout."
|
6740 |
msgstr ""
|
6741 |
|
6742 |
-
#: client/task-list/tasks.js:
|
6743 |
msgid "Set up tax"
|
6744 |
msgstr ""
|
6745 |
|
6746 |
-
#: client/task-list/tasks.js:
|
6747 |
msgid "Set up shipping"
|
6748 |
msgstr ""
|
6749 |
|
6750 |
-
#: client/task-list/tasks.js:
|
6751 |
msgid "Set your store location and where you'll ship to."
|
6752 |
msgstr ""
|
6753 |
|
6754 |
-
#: client/task-list/tasks.js:
|
6755 |
msgid "Set up marketing tools"
|
6756 |
msgstr ""
|
6757 |
|
6758 |
-
#: client/task-list/tasks.js:
|
6759 |
msgid ""
|
6760 |
"Add recommended marketing tools to reach new customers and grow your "
|
6761 |
"business"
|
6762 |
msgstr ""
|
6763 |
|
6764 |
-
#: client/task-list/tasks.js:
|
6765 |
msgid "1 minute"
|
6766 |
msgstr ""
|
6767 |
|
6768 |
-
#: client/task-list/tasks.js:
|
6769 |
msgid "Add your logo, create a homepage, and start designing your store."
|
6770 |
msgstr ""
|
6771 |
|
6772 |
-
#: client/task-list/tasks.js:
|
6773 |
msgid "2 minutes"
|
6774 |
msgstr ""
|
6775 |
|
@@ -6783,11 +6783,11 @@ msgstr ""
|
|
6783 |
msgid "Manage"
|
6784 |
msgstr ""
|
6785 |
|
6786 |
-
#: client/task-list/tasks/Marketing/index.tsx:
|
6787 |
msgid "Recommended marketing extensions"
|
6788 |
msgstr ""
|
6789 |
|
6790 |
-
#: client/task-list/tasks/Marketing/index.tsx:
|
6791 |
msgid ""
|
6792 |
"We recommend adding one of the following marketing tools for your store. "
|
6793 |
"The extension will be installed and activated for you when you click \"Get "
|
2 |
# This file is distributed under the same license as the WooCommerce Admin package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce Admin 2.6.1\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/2.6.1\n"
|
7 |
+
"POT-Creation-Date: 2021-09-02 00:29:55+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
3842 |
|
3843 |
#: src/Notes/SetUpAdditionalPaymentTypes.php:94
|
3844 |
#: client/header/index.js:70
|
3845 |
+
#: client/task-list/tasks.js:275
|
3846 |
msgid "Set up payments"
|
3847 |
msgstr ""
|
3848 |
|
5422 |
msgstr ""
|
5423 |
|
5424 |
#: client/header/activity-panel/display-options/icons/display.js:41
|
5425 |
+
#: client/task-list/index.js:296
|
5426 |
msgid "Display"
|
5427 |
msgstr ""
|
5428 |
|
5455 |
|
5456 |
#: client/header/activity-panel/index.js:244
|
5457 |
#: client/marketing/overview/installed-extensions/row.js:112
|
5458 |
+
#: client/task-list/tasks.js:234
|
5459 |
#: client/task-list/tasks/PaymentGatewaySuggestions/components/Action.js:119
|
5460 |
msgid "Finish setup"
|
5461 |
msgstr ""
|
5658 |
msgstr ""
|
5659 |
|
5660 |
#: client/header/activity-panel/panels/inbox/abbreviated-notifications-panel.js:75
|
5661 |
+
#: client/task-list/index.js:208
|
5662 |
msgid "Things to do next"
|
5663 |
msgstr ""
|
5664 |
|
5890 |
|
5891 |
#: client/homescreen/welcome-from-calypso-modal/welcome-from-calypso-modal.js:73
|
5892 |
#: client/homescreen/welcome-modal/index.js:83
|
5893 |
+
#: client/task-list/tasks.js:379
|
5894 |
msgid "Let's go"
|
5895 |
msgstr ""
|
5896 |
|
6063 |
msgstr ""
|
6064 |
|
6065 |
#: client/marketing/overview/installed-extensions/index.js:37
|
6066 |
+
#: client/task-list/tasks/Marketing/index.tsx:185
|
6067 |
msgid "Installed marketing extensions"
|
6068 |
msgstr ""
|
6069 |
|
6616 |
msgstr ""
|
6617 |
|
6618 |
#: client/store-management-links/index.js:52
|
6619 |
+
#: client/task-list/tasks.js:373
|
6620 |
msgid "Personalize my store"
|
6621 |
msgstr ""
|
6622 |
|
6625 |
msgstr ""
|
6626 |
|
6627 |
#: client/store-management-links/index.js:75
|
6628 |
+
#: client/task-list/tasks.js:175
|
6629 |
msgid "Store details"
|
6630 |
msgstr ""
|
6631 |
|
6637 |
msgid "Tax"
|
6638 |
msgstr ""
|
6639 |
|
6640 |
+
#: client/task-list/index.js:272
|
6641 |
msgid "Get ready to start selling"
|
6642 |
msgstr ""
|
6643 |
|
6644 |
+
#: client/task-list/index.js:305
|
6645 |
msgid "Show things to do next"
|
6646 |
msgstr ""
|
6647 |
|
6664 |
msgid "Show less"
|
6665 |
msgstr ""
|
6666 |
|
6667 |
+
#: client/task-list/tasks.js:103
|
6668 |
msgid "Add paid extensions to my store"
|
6669 |
msgstr ""
|
6670 |
|
6671 |
+
#: client/task-list/tasks.js:111
|
6672 |
msgid "Add %s to my store"
|
6673 |
msgstr ""
|
6674 |
|
6675 |
+
#: client/task-list/tasks.js:128
|
6676 |
msgid "Good choice! You chose to add %1$s and %2$s to your store."
|
6677 |
msgstr ""
|
6678 |
|
6679 |
+
#: client/task-list/tasks.js:150
|
6680 |
msgid "Set your store location and configure tax rate settings."
|
6681 |
msgstr ""
|
6682 |
|
6683 |
+
#: client/task-list/tasks.js:156
|
6684 |
#: client/task-list/tasks/tax.js:446
|
6685 |
msgid "Yes please"
|
6686 |
msgstr ""
|
6687 |
|
6688 |
+
#: client/task-list/tasks.js:157
|
6689 |
msgid ""
|
6690 |
"Good news! WooCommerce Services and Jetpack can automate your sales tax "
|
6691 |
"calculations for you."
|
6692 |
msgstr ""
|
6693 |
|
6694 |
+
#: client/task-list/tasks.js:176
|
6695 |
msgid ""
|
6696 |
"Your store address is required to set the origin country for shipping, "
|
6697 |
"currencies, and payment options."
|
6698 |
msgstr ""
|
6699 |
|
6700 |
+
#: client/task-list/tasks.js:188
|
6701 |
msgid "4 minutes"
|
6702 |
msgstr ""
|
6703 |
|
6704 |
+
#: client/task-list/tasks.js:196
|
6705 |
msgid "Purchase & install now"
|
6706 |
msgstr ""
|
6707 |
|
6708 |
+
#: client/task-list/tasks.js:209
|
6709 |
msgid "Add my products"
|
6710 |
msgstr ""
|
6711 |
|
6712 |
+
#: client/task-list/tasks.js:210
|
6713 |
msgid ""
|
6714 |
"Start by adding the first product to your store. You can add your products "
|
6715 |
"manually, via CSV, or import them from another service."
|
6716 |
msgstr ""
|
6717 |
|
6718 |
+
#: client/task-list/tasks.js:221
|
6719 |
msgid "1 minute per product"
|
6720 |
msgstr ""
|
6721 |
|
6722 |
+
#: client/task-list/tasks.js:226
|
6723 |
msgid "Get paid with WooCommerce Payments"
|
6724 |
msgstr ""
|
6725 |
|
6726 |
+
#: client/task-list/tasks.js:230
|
6727 |
msgid ""
|
6728 |
"You're only one step away from getting paid. Verify your business details "
|
6729 |
"to start managing transactions with WooCommerce Payments."
|
6730 |
msgstr ""
|
6731 |
|
6732 |
+
#: client/task-list/tasks.js:266
|
6733 |
msgid ""
|
6734 |
"By setting up, you are agreeing to the <a "
|
6735 |
"href=\"https://wordpress.com/tos/\" target=\"_blank\">Terms of Service</a>"
|
6736 |
msgstr ""
|
6737 |
|
6738 |
+
#: client/task-list/tasks.js:276
|
6739 |
msgid "Choose payment providers and enable payment methods at checkout."
|
6740 |
msgstr ""
|
6741 |
|
6742 |
+
#: client/task-list/tasks.js:296
|
6743 |
msgid "Set up tax"
|
6744 |
msgstr ""
|
6745 |
|
6746 |
+
#: client/task-list/tasks.js:318
|
6747 |
msgid "Set up shipping"
|
6748 |
msgstr ""
|
6749 |
|
6750 |
+
#: client/task-list/tasks.js:319
|
6751 |
msgid "Set your store location and where you'll ship to."
|
6752 |
msgstr ""
|
6753 |
|
6754 |
+
#: client/task-list/tasks.js:345
|
6755 |
msgid "Set up marketing tools"
|
6756 |
msgstr ""
|
6757 |
|
6758 |
+
#: client/task-list/tasks.js:346
|
6759 |
msgid ""
|
6760 |
"Add recommended marketing tools to reach new customers and grow your "
|
6761 |
"business"
|
6762 |
msgstr ""
|
6763 |
|
6764 |
+
#: client/task-list/tasks.js:368
|
6765 |
msgid "1 minute"
|
6766 |
msgstr ""
|
6767 |
|
6768 |
+
#: client/task-list/tasks.js:374
|
6769 |
msgid "Add your logo, create a homepage, and start designing your store."
|
6770 |
msgstr ""
|
6771 |
|
6772 |
+
#: client/task-list/tasks.js:386
|
6773 |
msgid "2 minutes"
|
6774 |
msgstr ""
|
6775 |
|
6783 |
msgid "Manage"
|
6784 |
msgstr ""
|
6785 |
|
6786 |
+
#: client/task-list/tasks/Marketing/index.tsx:205
|
6787 |
msgid "Recommended marketing extensions"
|
6788 |
msgstr ""
|
6789 |
|
6790 |
+
#: client/task-list/tasks/Marketing/index.tsx:211
|
6791 |
msgid ""
|
6792 |
"We recommend adding one of the following marketing tools for your store. "
|
6793 |
"The extension will be installed and activated for you when you click \"Get "
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: ecommerce, e-commerce, store, sales, reports, analytics, dashboard, activi
|
|
4 |
Requires at least: 5.4.0
|
5 |
Tested up to: 5.7.0
|
6 |
Requires PHP: 7.0
|
7 |
-
Stable tag: 2.6.
|
8 |
License: GPLv3
|
9 |
License URI: https://github.com/woocommerce/woocommerce-admin/blob/main/license.txt
|
10 |
|
4 |
Requires at least: 5.4.0
|
5 |
Tested up to: 5.7.0
|
6 |
Requires PHP: 7.0
|
7 |
+
Stable tag: 2.6.1
|
8 |
License: GPLv3
|
9 |
License URI: https://github.com/woocommerce/woocommerce-admin/blob/main/license.txt
|
10 |
|
src/Composer/Package.php
CHANGED
@@ -26,7 +26,7 @@ class Package {
|
|
26 |
*
|
27 |
* @var string
|
28 |
*/
|
29 |
-
const VERSION = '2.6.
|
30 |
|
31 |
/**
|
32 |
* Package active.
|
26 |
*
|
27 |
* @var string
|
28 |
*/
|
29 |
+
const VERSION = '2.6.1';
|
30 |
|
31 |
/**
|
32 |
* Package active.
|
src/FeaturePlugin.php
CHANGED
@@ -146,7 +146,7 @@ class FeaturePlugin {
|
|
146 |
$this->define( 'WC_ADMIN_PLUGIN_FILE', WC_ADMIN_ABSPATH . 'woocommerce-admin.php' );
|
147 |
// WARNING: Do not directly edit this version number constant.
|
148 |
// It is updated as part of the prebuild process from the package.json value.
|
149 |
-
$this->define( 'WC_ADMIN_VERSION_NUMBER', '2.6.
|
150 |
}
|
151 |
|
152 |
/**
|
146 |
$this->define( 'WC_ADMIN_PLUGIN_FILE', WC_ADMIN_ABSPATH . 'woocommerce-admin.php' );
|
147 |
// WARNING: Do not directly edit this version number constant.
|
148 |
// It is updated as part of the prebuild process from the package.json value.
|
149 |
+
$this->define( 'WC_ADMIN_VERSION_NUMBER', '2.6.1' );
|
150 |
}
|
151 |
|
152 |
/**
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit038089114c237cb193ca47e4a930d627::getLoader();
|
vendor/autoload_packages.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit0307997b7ef2e6dfb57b3553f1ae4992
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit038089114c237cb193ca47e4a930d627
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit038089114c237cb193ca47e4a930d627', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit038089114c237cb193ca47e4a930d627', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit038089114c237cb193ca47e4a930d627::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'C' =>
|
@@ -40,9 +40,9 @@ class ComposerStaticInit0307997b7ef2e6dfb57b3553f1ae4992
|
|
40 |
public static function getInitializer(ClassLoader $loader)
|
41 |
{
|
42 |
return \Closure::bind(function () use ($loader) {
|
43 |
-
$loader->prefixLengthsPsr4 =
|
44 |
-
$loader->prefixDirsPsr4 =
|
45 |
-
$loader->classMap =
|
46 |
|
47 |
}, null, ClassLoader::class);
|
48 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit038089114c237cb193ca47e4a930d627
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'C' =>
|
40 |
public static function getInitializer(ClassLoader $loader)
|
41 |
{
|
42 |
return \Closure::bind(function () use ($loader) {
|
43 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit038089114c237cb193ca47e4a930d627::$prefixLengthsPsr4;
|
44 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit038089114c237cb193ca47e4a930d627::$prefixDirsPsr4;
|
45 |
+
$loader->classMap = ComposerStaticInit038089114c237cb193ca47e4a930d627::$classMap;
|
46 |
|
47 |
}, null, ClassLoader::class);
|
48 |
}
|
vendor/composer/jetpack_autoload_psr4.php
CHANGED
@@ -11,7 +11,7 @@ return array(
|
|
11 |
'path' => array( $vendorDir . '/composer/installers/src/Composer/Installers' )
|
12 |
),
|
13 |
'Automattic\\WooCommerce\\Admin\\' => array(
|
14 |
-
'version' => '2.6.
|
15 |
'path' => array( $baseDir . '/src' )
|
16 |
),
|
17 |
'Automattic\\Jetpack\\Autoloader\\' => array(
|
11 |
'path' => array( $vendorDir . '/composer/installers/src/Composer/Installers' )
|
12 |
),
|
13 |
'Automattic\\WooCommerce\\Admin\\' => array(
|
14 |
+
'version' => '2.6.1.0',
|
15 |
'path' => array( $baseDir . '/src' )
|
16 |
),
|
17 |
'Automattic\\Jetpack\\Autoloader\\' => array(
|
vendor/jetpack-autoloader/class-autoloader-handler.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-autoloader-locator.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-autoloader.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-container.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-hook-manager.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-latest-autoloader-guard.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-manifest-reader.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-path-processor.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-php-autoloader.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-plugin-locator.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-plugins-handler.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-shutdown-handler.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-version-loader.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-version-selector.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp038089114c237cb193ca47e4a930d627;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
woocommerce-admin.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
* Author URI: https://woocommerce.com/
|
8 |
* Text Domain: woocommerce-admin
|
9 |
* Domain Path: /languages
|
10 |
-
* Version: 2.6.
|
11 |
* Requires at least: 5.4
|
12 |
* Requires PHP: 7.0
|
13 |
*
|
7 |
* Author URI: https://woocommerce.com/
|
8 |
* Text Domain: woocommerce-admin
|
9 |
* Domain Path: /languages
|
10 |
+
* Version: 2.6.1
|
11 |
* Requires at least: 5.4
|
12 |
* Requires PHP: 7.0
|
13 |
*
|