Version Description
3/14/2021 ==
- Feature: Increase target audience for business feature step. #6508
- Fix: Correct a bug where the JP connection flow would not happen when installing JP in the OBW. #6521
=
Download this release
Release Info
Developer | adrianduffell |
Plugin | WooCommerce Admin |
Version | 2.1.3 |
Comparing to | |
See all releases |
Code changes from version 2.1.2 to 2.1.3
- dist/app/index.js +3 -3
- dist/app/index.min.js +1 -1
- dist/chunks/1.js +1 -1
- dist/chunks/1.min.js +1 -1
- dist/chunks/3.js +2 -2
- dist/chunks/3.min.js +1 -1
- dist/chunks/4.js +7 -7
- dist/chunks/4.min.js +1 -1
- dist/chunks/5.js +3151 -804
- dist/chunks/5.min.js +1 -1
- dist/chunks/52.js +1 -1
- dist/chunks/52.min.js +1 -1
- dist/chunks/53.js +0 -24
- dist/chunks/53.min.js +1 -1
- dist/chunks/6.js +776 -3023
- dist/chunks/6.min.js +0 -1
dist/app/index.js
CHANGED
@@ -915,7 +915,7 @@ var VariationsReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["l
|
|
915 |
return Promise.all(/* import() | analytics-report-variations */[__webpack_require__.e(0), __webpack_require__.e(19)]).then(__webpack_require__.bind(null, 487));
|
916 |
});
|
917 |
var OrdersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["lazy"])(function () {
|
918 |
-
return Promise.all(/* import() | analytics-report-orders */[__webpack_require__.e(0), __webpack_require__.e(
|
919 |
});
|
920 |
var CategoriesReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["lazy"])(function () {
|
921 |
return Promise.all(/* import() | analytics-report-categories */[__webpack_require__.e(0), __webpack_require__.e(3), __webpack_require__.e(10)]).then(__webpack_require__.bind(null, 484));
|
@@ -3485,7 +3485,7 @@ var panel_Panel = function Panel(_ref) {
|
|
3485 |
|
3486 |
|
3487 |
var HelpPanel = Object(external_this_wp_element_["lazy"])(function () {
|
3488 |
-
return Promise.all(/* import() | activity-panels-help */[__webpack_require__.e(54), __webpack_require__.e(
|
3489 |
});
|
3490 |
var InboxPanel = Object(external_this_wp_element_["lazy"])(function () {
|
3491 |
return Promise.all(/* import() | activity-panels-inbox */[__webpack_require__.e(1), __webpack_require__.e(2), __webpack_require__.e(4), __webpack_require__.e(8)]).then(__webpack_require__.bind(null, 587));
|
@@ -5299,7 +5299,7 @@ var StoreAlerts = Object(external_this_wp_element_["lazy"])(function () {
|
|
5299 |
return Promise.all(/* import() | store-alerts */[__webpack_require__.e(1), __webpack_require__.e(47)]).then(__webpack_require__.bind(null, 611));
|
5300 |
});
|
5301 |
var WCPayUsageModal = Object(external_this_wp_element_["lazy"])(function () {
|
5302 |
-
return __webpack_require__.e(/* import() | wcpay-usage-modal */ 51).then(__webpack_require__.bind(null,
|
5303 |
});
|
5304 |
var layout_PrimaryLayout = /*#__PURE__*/function (_Component) {
|
5305 |
inherits_default()(PrimaryLayout, _Component);
|
915 |
return Promise.all(/* import() | analytics-report-variations */[__webpack_require__.e(0), __webpack_require__.e(19)]).then(__webpack_require__.bind(null, 487));
|
916 |
});
|
917 |
var OrdersReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["lazy"])(function () {
|
918 |
+
return Promise.all(/* import() | analytics-report-orders */[__webpack_require__.e(0), __webpack_require__.e(6), __webpack_require__.e(14)]).then(__webpack_require__.bind(null, 488));
|
919 |
});
|
920 |
var CategoriesReport = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["lazy"])(function () {
|
921 |
return Promise.all(/* import() | analytics-report-categories */[__webpack_require__.e(0), __webpack_require__.e(3), __webpack_require__.e(10)]).then(__webpack_require__.bind(null, 484));
|
3485 |
|
3486 |
|
3487 |
var HelpPanel = Object(external_this_wp_element_["lazy"])(function () {
|
3488 |
+
return Promise.all(/* import() | activity-panels-help */[__webpack_require__.e(54), __webpack_require__.e(5), __webpack_require__.e(7)]).then(__webpack_require__.bind(null, 602));
|
3489 |
});
|
3490 |
var InboxPanel = Object(external_this_wp_element_["lazy"])(function () {
|
3491 |
return Promise.all(/* import() | activity-panels-inbox */[__webpack_require__.e(1), __webpack_require__.e(2), __webpack_require__.e(4), __webpack_require__.e(8)]).then(__webpack_require__.bind(null, 587));
|
5299 |
return Promise.all(/* import() | store-alerts */[__webpack_require__.e(1), __webpack_require__.e(47)]).then(__webpack_require__.bind(null, 611));
|
5300 |
});
|
5301 |
var WCPayUsageModal = Object(external_this_wp_element_["lazy"])(function () {
|
5302 |
+
return __webpack_require__.e(/* import() | wcpay-usage-modal */ 51).then(__webpack_require__.bind(null, 509));
|
5303 |
});
|
5304 |
var layout_PrimaryLayout = /*#__PURE__*/function (_Component) {
|
5305 |
inherits_default()(PrimaryLayout, _Component);
|
dist/app/index.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
/*! For license information please see index.min.js.LICENSE.txt */
|
2 |
-
this.wc=this.wc||{},this.wc.app=function(e){function t(t){for(var n,r,i=t[0],a=t[1],c=0,u=[];c<i.length;c++)r=i[c],Object.prototype.hasOwnProperty.call(o,r)&&o[r]&&u.push(o[r][0]),o[r]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(l&&l(t);u.length;)u.shift()()}var n={},r={21:0},o={21:0};function i(e){var t=function(e){return a.p+"chunks/"+({7:"activity-panels-help",8:"activity-panels-inbox",9:"analytics-report",10:"analytics-report-categories",11:"analytics-report-coupons",12:"analytics-report-customers",13:"analytics-report-downloads",14:"analytics-report-orders",15:"analytics-report-products",16:"analytics-report-revenue",17:"analytics-report-stock",18:"analytics-report-taxes",19:"analytics-report-variations",20:"analytics-settings",27:"customizable-dashboard",28:"dashboard",29:"dashboard-charts",32:"homescreen",34:"leaderboards",36:"marketing-overview",46:"profile-wizard",47:"store-alerts",48:"store-performance",49:"task-list",51:"wcpay-usage-modal"}[e]||e)+".min.js"}(e);return window.wcAdminAssets&&window.wcAdminAssets.version&&(t+="?ver="+window.wcAdminAssets.version),t}function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[];r[e]?t.push(r[e]):0!==r[e]&&{0:1,3:1,4:1,7:1,9:1,14:1,20:1,28:1,29:1,32:1,34:1,36:1,46:1,47:1,48:1,49:1}[e]&&t.push(r[e]=new Promise((function(t,n){for(var o="rtl"===document.dir?"./chunks/"+e+".style.rtl.css":"./chunks/"+e+".style.css",i=a.p+o,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var s=(f=c[u]).getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(s===o||s===i))return t()}var l=document.getElementsByTagName("style");for(u=0;u<l.length;u++){var f;if((s=(f=l[u]).getAttribute("data-href"))===o||s===i)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.setAttribute("data-webpack",!0),d.onload=t,d.onerror=function(t){var o=t&&t.target&&t.target.src||i,a=new Error("Loading CSS chunk "+e+" failed.\n("+o+")");a.code="CSS_CHUNK_LOAD_FAILED",a.request=o,delete r[e],d.parentNode.removeChild(d),n(a)},d.href=i,window.wcAdminAssets&&window.wcAdminAssets.version&&(d.href+="?ver="+window.wcAdminAssets.version),document.getElementsByTagName("head")[0].appendChild(d)})).then((function(){r[e]=0})));var n=o[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,r){n=o[e]=[t,r]}));t.push(n[2]=c);var u,s=document.createElement("script");s.charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.src=i(e);var l=new Error;u=function(t){s.onerror=s.onload=null,clearTimeout(f);var n=o[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+r+": "+i+")",l.name="ChunkLoadError",l.type=r,l.request=i,n[1](l)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:s})}),12e4);s.onerror=s.onload=u,document.head.appendChild(s)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var c=window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[],u=c.push.bind(c);c.push=t,c=c.slice();for(var s=0;s<c.length;s++)t(c[s]);var l=u;return a(a.s=294)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t,n){e.exports=n(77)()},10:function(e,t){!function(){e.exports=this.React}()},11:function(e,t){!function(){e.exports=this.wp.data}()},111:function(e,t){!function(){e.exports=this.wc.currency}()},12:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},121:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r={};n.r(r),n.d(r,"find",(function(){return c}));var o={};n.r(o),n.d(o,"isTabbableIndex",(function(){return l})),n.d(o,"find",(function(){return h})),n.d(o,"findPrevious",(function(){return v})),n.d(o,"findNext",(function(){return b}));var i=["[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])","iframe","object","embed","area[href]","[contenteditable]:not([contenteditable=false])"].join(",");function a(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function c(e){var t=e.querySelectorAll(i);return Array.from(t).filter((function(e){return!(!a(e)||function(e){return"iframe"===e.nodeName.toLowerCase()&&"-1"===e.getAttribute("tabindex")}(e))&&("AREA"!==e.nodeName||function(e){var t=e.closest("map[name]");if(!t)return!1;var n=e.ownerDocument.querySelector('img[usemap="#'+t.name+'"]');return!!n&&a(n)}(e))}))}var u=n(3);function s(e){var t=e.getAttribute("tabindex");return null===t?0:parseInt(t,10)}function l(e){return-1!==s(e)}function f(e,t){return{element:e,index:t}}function d(e){return e.element}function p(e,t){var n=s(e.element),r=s(t.element);return n===r?e.index-t.index:n-r}function m(e){return e.filter(l).map(f).sort(p).map(d).reduce((t={},function(e,n){var r=n.nodeName,o=n.type,i=n.checked,a=n.name;if("INPUT"!==r||"radio"!==o||!a)return e.concat(n);var c=t.hasOwnProperty(a);if(!i&&c)return e;if(c){var s=t[a];e=Object(u.without)(e,s)}return t[a]=n,e.concat(n)}),[]);var t}function h(e){return m(c(e))}function v(e){var t=c(e.ownerDocument.body),n=t.indexOf(e);return t.length=n,Object(u.last)(m(t))}function b(e){var t=c(e.ownerDocument.body),n=t.indexOf(e),r=t.slice(n+1).filter((function(t){return!e.contains(t)}));return Object(u.first)(m(r))}var y={focusable:r,tabbable:o}},122:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,i=(e.icon,e.className),c=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),u=["gridicon","gridicons-cross-small",i,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:u,height:n,width:n,onClick:o},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"})))};var o,i=n(10),a=(o=i)&&o.__esModule?o:{default:o};e.exports=t.default},125:function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,s=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&p())}function p(){if(!l){var e=c(d);l=!0;for(var t=s.length;t;){for(u=s,s=[];++f<t;)u&&u[f].run();f=-1,t=s.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new m(e,t)),1!==s.length||l||c(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},126:function(e,t,n){"use strict";e.exports=n(152)},13:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},137:function(e,t,n){"use strict";var r=n(2),o=n(43),i=n(25),a=n(0),c=Object(i.g)("manageStock","no"),u=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(16)]).then(n.bind(null,486))})),s=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(3),n.e(15)]).then(n.bind(null,482))})),l=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(19)]).then(n.bind(null,487))})),f=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(5),n.e(14)]).then(n.bind(null,488))})),d=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(3),n.e(10)]).then(n.bind(null,484))})),p=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(11)]).then(n.bind(null,489))})),m=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(18)]).then(n.bind(null,490))})),h=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(13)]).then(n.bind(null,491))})),v=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(17)]).then(n.bind(null,483))})),b=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(12)]).then(n.bind(null,485))}));t.a=function(){var e=[{report:"revenue",title:Object(r.__)("Revenue","woocommerce-admin"),component:u,navArgs:{id:"woocommerce-analytics-revenue"}},{report:"products",title:Object(r.__)("Products","woocommerce-admin"),component:s,navArgs:{id:"woocommerce-analytics-products"}},{report:"variations",title:Object(r.__)("Variations","woocommerce-admin"),component:l,navArgs:{id:"woocommerce-analytics-variations"}},{report:"orders",title:Object(r.__)("Orders","woocommerce-admin"),component:f,navArgs:{id:"woocommerce-analytics-orders"}},{report:"categories",title:Object(r.__)("Categories","woocommerce-admin"),component:d,navArgs:{id:"woocommerce-analytics-categories"}},{report:"coupons",title:Object(r.__)("Coupons","woocommerce-admin"),component:p,navArgs:{id:"woocommerce-analytics-coupons"}},{report:"taxes",title:Object(r.__)("Taxes","woocommerce-admin"),component:m,navArgs:{id:"woocommerce-analytics-taxes"}},"yes"===c?{report:"stock",title:Object(r.__)("Stock","woocommerce-admin"),component:v,navArgs:{id:"woocommerce-analytics-stock"}}:null,{report:"customers",title:Object(r.__)("Customers","woocommerce-admin"),component:b},{report:"downloads",title:Object(r.__)("Downloads","woocommerce-admin"),component:h,navArgs:{id:"woocommerce-analytics-downloads"}}].filter(Boolean);return Object(o.applyFilters)("woocommerce_admin_reports_list",e)}},138:function(e,t,n){"use strict";var r=n(126),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function u(e){return r.isMemo(e)?a:c[e.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=a;var s=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=p(n);o&&o!==m&&e(t,o,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var c=u(t),h=u(n),v=0;v<a.length;++v){var b=a[v];if(!(i[b]||r&&r[b]||h&&h[b]||c&&c[b])){var y=d(n,b);try{s(t,b,y)}catch(e){}}}}return t}},139:function(e,t){!function(){e.exports=this.wp.plugins}()},14:function(e,t,n){var r=n(72);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},140:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(54),o=n(2);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"polite",t=document.createElement("div");t.id="a11y-speak-".concat(e),t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");var n=document,r=n.body;return r&&r.appendChild(t),t}var a="";function c(e,t){!function(){for(var e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text"),n=0;n<e.length;n++)e[n].textContent="";t&&t.setAttribute("hidden","hidden")}(),e=function(e){return e=e.replace(/<[^<>]+>/g," "),a===e&&(e+=" "),a=e,e}(e);var n=document.getElementById("a11y-speak-intro-text"),r=document.getElementById("a11y-speak-assertive"),o=document.getElementById("a11y-speak-polite");r&&"assertive"===t?r.textContent=e:o&&(o.textContent=e),n&&n.removeAttribute("hidden")}Object(r.a)((function(){var e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===e&&function(){var e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=Object(o.__)("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");var t=document.body;t&&t.appendChild(e)}(),null===t&&i("assertive"),null===n&&i("polite")}))},141:function(e,t,n){"use strict";n.d(t,"c",(function(){return zt})),n.d(t,"b",(function(){return Wt})),n.d(t,"a",(function(){return Qt}));var r=n(24),o=n.n(r),i=n(34),a=n.n(i),c=n(5),u=n.n(c),s=n(12),l=n.n(s),f=n(13),d=n.n(f),p=n(14),m=n.n(p),h=n(15),v=n.n(h),b=n(7),y=n.n(b),g=n(0),w=n(20),O=n(11),j=n(38),E=n(10),_=n.n(E),k=n(1),x=n.n(k),S=n(71),C=n(183),P=n(56),A=n(32),T=n(184),N=n.n(T),R=(n(126),n(42)),L=(n(138),function(e){var t=Object(C.a)();return t.displayName=e,t}("Router-History")),M=function(e){var t=Object(C.a)();return t.displayName=e,t}("Router"),I=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(j.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return _.a.createElement(M.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},_.a.createElement(L.Provider,{children:this.props.children||null,value:this.props.history}))},t}(_.a.Component);_.a.Component;_.a.Component;var D={},V=0;function F(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,c=void 0!==a&&a,u=n.sensitive,s=void 0!==u&&u;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=D[n]||(D[n]={});if(r[e])return r[e];var o=[],i={regexp:N()(e,o,t),keys:o};return V<1e4&&(r[e]=i,V++),i}(n,{end:i,strict:c,sensitive:s}),o=r.regexp,a=r.keys,u=o.exec(e);if(!u)return null;var l=u[0],f=u.slice(1),d=e===l;return i&&!d?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:d,params:a.reduce((function(e,t,n){return e[t.name]=f[n],e}),{})}}),null)}var B=function(e){function t(){return e.apply(this,arguments)||this}return Object(j.a)(t,e),t.prototype.render=function(){var e=this;return _.a.createElement(M.Consumer,null,(function(t){t||Object(P.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?F(n.pathname,e.props):t.match,o=Object(A.a)({},t,{location:n,match:r}),i=e.props,a=i.children,c=i.component,u=i.render;return Array.isArray(a)&&0===a.length&&(a=null),_.a.createElement(M.Provider,{value:o},o.match?a?"function"==typeof a?a(o):a:c?_.a.createElement(c,o):u?u(o):null:"function"==typeof a?a(o):null)}))},t}(_.a.Component);function U(e){return"/"===e.charAt(0)?e:"/"+e}function q(e,t){if(!e)return t;var n=U(e);return 0!==t.pathname.indexOf(n)?t:Object(A.a)({},t,{pathname:t.pathname.substr(n.length)})}function z(e){return"string"==typeof e?e:Object(S.d)(e)}function H(e){return function(){Object(P.a)(!1)}}function $(){}_.a.Component;var W=function(e){function t(){return e.apply(this,arguments)||this}return Object(j.a)(t,e),t.prototype.render=function(){var e=this;return _.a.createElement(M.Consumer,null,(function(t){t||Object(P.a)(!1);var n,r,o=e.props.location||t.location;return _.a.Children.forEach(e.props.children,(function(e){if(null==r&&_.a.isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?F(o.pathname,Object(A.a)({},e.props,{path:i})):t.match}})),r?_.a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(_.a.Component);_.a.useContext;var Q=n(3),G=n(49),Y=n(47),Z=n(21),K=n(25),J=n(22),X=n(27),ee=(n(297),n(43)),te=n(2),ne=n(137),re=n(95);function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v()(this,n)}}var ie=Object(g.lazy)((function(){return n.e(9).then(n.bind(null,589))})),ae=Object(g.lazy)((function(){return n.e(20).then(n.bind(null,608))})),ce=Object(g.lazy)((function(){return n.e(28).then(n.bind(null,590))})),ue=Object(g.lazy)((function(){return Promise.all([n.e(1),n.e(2),n.e(52),n.e(4),n.e(32)]).then(n.bind(null,605))})),se=Object(g.lazy)((function(){return Promise.all([n.e(2),n.e(36)]).then(n.bind(null,609))})),le=Object(g.lazy)((function(){return Promise.all([n.e(53),n.e(46)]).then(n.bind(null,606))})),fe=Object(g.lazy)((function(){return Promise.all([n.e(53),n.e(46)]).then(n.bind(null,601))})),de=function(){var e=[],t=[["",wcSettings.woocommerceTranslation]];return e.push({container:ue,path:"/",breadcrumbs:[].concat(t,[Object(te.__)("Home","woocommerce-admin")]),wpOpenMenu:"toplevel_page_woocommerce",navArgs:{id:"woocommerce-home"},capability:"manage_woocommerce"}),window.wcAdminFeatures.analytics&&(e.push({container:ce,path:"/analytics/overview",breadcrumbs:[].concat(t,[["/analytics/overview",Object(te.__)("Analytics","woocommerce-admin")],Object(te.__)("Overview","woocommerce-admin")]),wpOpenMenu:"toplevel_page_wc-admin-path--analytics-overview",navArgs:{id:"woocommerce-analytics-overview"},capability:"view_woocommerce_reports"}),e.push({container:ae,path:"/analytics/settings",breadcrumbs:[].concat(t,[["/analytics/revenue",Object(te.__)("Analytics","woocommerce-admin")],Object(te.__)("Settings","woocommerce-admin")]),wpOpenMenu:"toplevel_page_wc-admin-path--analytics-overview",navArgs:{id:"woocommerce-analytics-settings"},capability:"view_woocommerce_reports"}),e.push({container:ie,path:"/customers",breadcrumbs:[].concat(t,[Object(te.__)("Customers","woocommerce-admin")]),wpOpenMenu:"toplevel_page_woocommerce",navArgs:{id:"woocommerce-analytics-customers"},capability:"view_woocommerce_reports"}),e.push({container:ie,path:"/analytics/:report",breadcrumbs:function(e){var n=e.match,r=Object(Q.find)(Object(ne.a)(),{report:n.params.report});return r?[].concat(t,[["/analytics/revenue",Object(te.__)("Analytics","woocommerce-admin")],r.title]):[]},wpOpenMenu:"toplevel_page_wc-admin-path--analytics-overview",capability:"view_woocommerce_reports"})),window.wcAdminFeatures.marketing&&e.push({container:se,path:"/marketing",breadcrumbs:[].concat(t,[["/marketing",Object(te.__)("Marketing","woocommerce-admin")],Object(te.__)("Overview","woocommerce-admin")]),wpOpenMenu:"toplevel_page_woocommerce-marketing",navArgs:{id:"woocommerce-marketing-overview"},capability:"view_woocommerce_reports"}),window.wcAdminFeatures.onboarding&&e.push({container:le,path:"/setup-wizard",breadcrumbs:[].concat(t,[["/setup-wizard",Object(te.__)("Setup Wizard","woocommerce-admin")]]),capability:"manage_woocommerce"}),window.wcAdminFeatures.settings&&e.push({container:fe,path:"/settings/:page",breadcrumbs:function(e){var n=e.match,r=Object(K.g)("settingsPages"),o=r[n.params.page];return o?[].concat(t,[[r.general?"/settings/general":"/settings/".concat(Object.keys(r)[0]),Object(te.__)("Settings","woocommerce-admin")],o]):[]},wpOpenMenu:"toplevel_page_woocommerce",capability:"manage_woocommerce"}),Object(ee.applyFilters)("woocommerce_admin_pages_list",e)},pe=function(e){m()(n,e);var t=oe(n);function n(){return l()(this,n),t.apply(this,arguments)}return d()(n,[{key:"componentDidMount",value:function(){window.document.documentElement.scrollTop=0,window.document.body.classList.remove("woocommerce-admin-is-loading")}},{key:"componentDidUpdate",value:function(e){var t=Object(Q.omit)(e.query,"chartType","filter","paged"),n=Object(Q.omit)(this.props.query,"chartType","filter","paged");e.query.paged>1&&!Object(Q.isEqual)(t,n)&&Object(Z.getHistory)().replace(Object(Z.getNewPath)({paged:1})),e.match.url!==this.props.match.url&&(window.document.documentElement.scrollTop=0)}},{key:"render",value:function(){var e=this.props,t=e.page,n=e.match,r=e.query,o=n.url,i=n.params;return window.wpNavMenuUrlUpdate(r),window.wpNavMenuClassChange(t,o),Object(g.createElement)(g.Suspense,{fallback:Object(g.createElement)(Y.Spinner,null)},Object(g.createElement)(t.container,{params:i,path:o,pathMatch:t.path,query:r}))}}]),n}(g.Component);window.wpNavMenuUrlUpdate=function(e){var t=Object(Z.getPersistedQuery)(e),n=Object(Z.getQueryExcludedScreens)();Array.from(document.querySelectorAll("#adminmenu a")).forEach((function(e){return function(e,t,n){if(Object(re.f)(e.href)){var r=Object(Q.last)(e.href.split("?")),o=Object(G.parse)(r),i=o.path||"homescreen",a=Object(Z.getScreenFromPath)(i),c=n.includes(a),u="admin.php?"+Object(G.stringify)(Object.assign(o,c?{}:t));e.href=u,e.onclick=function(e){e.preventDefault(),Object(Z.getHistory)().push(u)}}}(e,t,n)}))},window.wpNavMenuClassChange=function(e,t){Array.from(document.getElementsByClassName("current")).forEach((function(e){e.classList.remove("current")})),Array.from(document.querySelectorAll(".wp-has-current-submenu")).forEach((function(e){e.classList.remove("wp-has-current-submenu"),e.classList.remove("wp-menu-open"),e.classList.remove("selected"),e.classList.add("wp-not-current-submenu"),e.classList.add("menu-top")}));var n="/"===t?"admin.php?page=wc-admin":"admin.php?page=wc-admin&path="+encodeURIComponent(t),r="/"===t?'li > a[href$="'.concat(n,'"], li > a[href*="').concat(n,'?"]'):'li > a[href*="'.concat(n,'"]'),o=document.querySelectorAll(r);if(Array.from(o).forEach((function(e){e.parentElement.classList.add("current")})),e.wpOpenMenu){var i=document.querySelector("#"+e.wpOpenMenu);i&&(i.classList.remove("wp-not-current-submenu"),i.classList.add("wp-has-current-submenu"),i.classList.add("wp-menu-open"),i.classList.add("current"))}document.querySelector("#wpwrap").classList.remove("wp-responsive-open")};var me=n(6),he=n.n(me),ve=n(41),be=n(30),ye=(n(298),n(18)),ge=n.n(ye),we=n(4),Oe=n(122),je=n.n(Oe),Ee=n(197),_e=n(67),ke=Object(g.createElement)(_e.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(g.createElement)(_e.a,{fillRule:"evenodd",d:"M6 5.5h12a.5.5 0 01.5.5v7H14a2 2 0 11-4 0H5.5V6a.5.5 0 01.5-.5zm-.5 9V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5v-3.5h-3.337a3.5 3.5 0 01-6.326 0H5.5zM4 13V6a2 2 0 012-2h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2v-5z",clipRule:"evenodd"})),xe=Object(g.createElement)(_e.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(g.createElement)(_e.a,{d:"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"})),Se=(n(299),function(e){var t=e.height,n=void 0===t?24:t,r=e.width,o=void 0===r?24:r,i=e.hasUnread,a=void 0!==i&&i,c=he()("woocommerce-layout__activity-panel-toggle-bubble",{"has-unread":a});return Object(g.createElement)("div",{className:c},Object(g.createElement)("svg",{height:n,width:o,viewBox:"0 0 24 24"},Object(g.createElement)("path",{d:"M18.9 2H5.1C3.4 2 2 3.4 2 5.1v10.7C2 17.6 3.4 19 5.1 19H9l6 3-1-3h4.9c1.7 0 3.1-1.4 3.1-3.1V5.1C22 3.4 20.6 2 18.9 2zm-1.5 4.5c-.4.8-.8 2.1-1 3.9-.3 1.8-.4 3.1-.3 4.1 0 .3 0 .5-.1.7-.1.2-.3.4-.6.4s-.6-.1-.9-.4c-1-1-1.8-2.6-2.4-4.6-.7 1.4-1.2 2.4-1.6 3.1-.6 1.2-1.2 1.8-1.6 1.9-.3 0-.5-.2-.8-.7-.5-1.4-1.1-4.2-1.7-8.2 0-.3 0-.5.2-.7.1-.2.4-.3.7-.4.5 0 .9.2.9.8.3 2.3.7 4.2 1.1 5.7l2.4-4.5c.2-.4.4-.6.8-.6.5 0 .8.3.9.9.3 1.4.6 2.6 1 3.7.3-2.7.8-4.7 1.4-5.9.2-.3.4-.5.7-.5.2 0 .5.1.7.2.2.2.3.4.3.6 0 .2 0 .4-.1.5z"})))});Se.propTypes={height:x.a.number,width:x.a.number,hasUnread:x.a.bool};var Ce=Se,Pe=n(196),Ae={page:1,per_page:J.QUERY_DEFAULTS.pageSize,status:"unactioned",type:J.QUERY_DEFAULTS.noteTypes,orderby:"date",order:"desc"};function Te(e){var t=e(J.NOTES_STORE_NAME),n=t.getNotes,r=t.getNotesError,o=t.isResolving,i=(0,e(J.USER_STORE_NAME).getCurrentUser)(),a=parseInt(i&&i.woocommerce_meta&&i.woocommerce_meta.activity_panel_inbox_last_read,10);if(!a)return null;n(Ae);var c=Boolean(r("getNotes",[Ae])),u=o("getNotes",[Ae]);if(c||u)return null;var s=n(Ae);return Object(Pe.a)(s,a)>0}var Ne=function(e){var t=e.icon,n=e.title,r=e.name,o=e.unread,i=e.selected,a=e.isPanelOpen,c=e.onTabClick,u=he()("woocommerce-layout__activity-panel-tab",{"is-active":a&&i,"has-unread":o}),s="activity-panel-tab-".concat(r);return Object(g.createElement)(we.Button,{role:"tab",className:u,"aria-selected":i,"aria-controls":"activity-panel-".concat(r),key:s,id:s,onClick:function(){c(r)}},t,n," ",o&&Object(g.createElement)("span",{className:"screen-reader-text"},Object(te.__)("unread activity","woocommerce-admin")))},Re=function(e){var t=e.tabs,n=e.onTabClick,r=e.selectedTab,i=e.tabOpen,a=void 0!==i&&i,c=Object(g.useState)({tabOpen:a,currentTab:r}),u=ge()(c,2),s=u[0],l=s.tabOpen,f=s.currentTab,d=u[1];return Object(g.useEffect)((function(){d({tabOpen:a,currentTab:r})}),[a,r]),Object(g.createElement)(we.NavigableMenu,{role:"tablist",orientation:"horizontal",className:"woocommerce-layout__activity-panel-tabs"},t&&t.map((function(e,t){if(e.component){var r=e.component,i=e.options;return Object(g.createElement)(r,o()({key:t},i))}return Object(g.createElement)(Ne,o()({key:t,index:t,isPanelOpen:l,selected:f===e.name},e,{onTabClick:function(){var t=f!==e.name&&""!==f||!l;t&&f===e.name||Object(X.recordEvent)("activity_panel_open",{tab:e.name}),d({tabOpen:t,currentTab:e.name}),n(e,t)}}))})))},Le=function(){return Object(g.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon setup-progress",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(g.createElement)("path",{d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z",stroke:"#DCDCDE",strokeWidth:"2"}),Object(g.createElement)("path",{d:"M4 12V12C4 16.4183 7.58172 20 12 20V20C16.4183 20 20 16.4183 20 12V12C20 7.58172 16.4183 4 12 4V4",strokeWidth:"2",strokeLinecap:"round"}))},Me=function(){return Object(g.createElement)(g.Fragment,null,Object(g.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon",width:"24",height:"24",viewBox:"3 3 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(g.createElement)("path",{d:"M13.8053 15.3982C13.8053 15.7965 13.4867 16.1947 13.0089 16.1947H6.79646C6.55752 16.1947 6.39823 16.115 6.23894 15.9558C6.07965 15.7965 6 15.6372 6 15.3982V6.79646C6 6.63717 6.15929 6.39823 6.23894 6.23894C6.39823 6.07965 6.55752 6 6.79646 6H13.0089C13.4071 6 13.8053 6.31858 13.8053 6.79646V15.3982Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Object(g.createElement)("path",{d:"M23.9203 10.6195C23.9203 11.0177 23.6017 11.4159 23.1238 11.4159H16.9115C16.6725 11.4159 16.5132 11.3363 16.3539 11.177C16.1946 11.0177 16.115 10.8584 16.115 10.6195V6.79646C16.115 6.39823 16.4336 6 16.9115 6H23.1238C23.5221 6 23.9203 6.31858 23.9203 6.79646V10.6195Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Object(g.createElement)("path",{d:"M13.8053 23.2035C13.8053 23.4424 13.7257 23.6017 13.5664 23.761C13.4071 23.9203 13.2478 23.9999 13.0089 23.9999H6.79646C6.39823 23.9999 6 23.6813 6 23.2035V19.3804C6 19.1415 6.07965 18.9822 6.23894 18.8229C6.39823 18.6636 6.55752 18.584 6.79646 18.584H13.0089C13.4071 18.584 13.8053 18.9026 13.8053 19.3804V23.2035Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Object(g.createElement)("path",{d:"M16.9912 23.9999C16.7522 23.9999 16.5929 23.9202 16.4336 23.7609C16.2743 23.6016 16.1947 23.4423 16.1947 23.2034V14.6016C16.1947 14.3627 16.2743 14.2034 16.4336 14.0441C16.5929 13.8848 16.7522 13.8052 16.9912 13.8052H23.2036C23.4425 13.8052 23.6018 13.8848 23.7611 14.0441C23.9204 14.2034 24 14.3627 24 14.6016V23.2034C24 23.6016 23.6814 23.9999 23.2036 23.9999H16.9912Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),Object(te.__)("Display","woocommerce-admin"))},Ie=[{value:"single_column",label:Object(g.createElement)(g.Fragment,null,Object(g.createElement)((function(){return Object(g.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon",width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(g.createElement)("rect",{x:"0.5",y:"0.5",width:"11",height:"13",strokeWidth:"1"}))}),null),Object(te.__)("Single column","woocommerce-admin"))},{value:"two_columns",label:Object(g.createElement)(g.Fragment,null,Object(g.createElement)((function(){return Object(g.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon",width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(g.createElement)("rect",{x:"0.5",y:"0.5",width:"7",height:"13",strokeWidth:"1"}),Object(g.createElement)("rect",{x:"9.5",y:"0.5",width:"7",height:"13",strokeWidth:"1"}))}),null),Object(te.__)("Two columns","woocommerce-admin"))}],De=function(){var e=Object(O.useSelect)((function(e){return(0,e(J.OPTIONS_STORE_NAME).getOption)("woocommerce_default_homepage_layout")||"single_column"})),t=Object(J.useUserPreferences)(),n=t.updateUserPreferences,r=t.homepage_layout;return Object(g.createElement)(we.DropdownMenu,{icon:Object(g.createElement)(Me,null),label:Object(te.__)("Display options","woocommerce-admin"),toggleProps:{className:"woocommerce-layout__activity-panel-tab display-options",onClick:function(){return Object(X.recordEvent)("homescreen_display_click")}},popoverProps:{className:"woocommerce-layout__activity-panel-popover"}},(function(t){var o=t.onClose;return Object(g.createElement)(we.MenuGroup,{className:"woocommerce-layout__homescreen-display-options",label:Object(te.__)("Layout","woocommerce-admin")},Object(g.createElement)(we.MenuItemsChoice,{choices:Ie,onSelect:function(e){n({homepage_layout:e}),o(),Object(X.recordEvent)("homescreen_display_option",{display_option:e})},value:r||e}))}))},Ve=n(497),Fe=(n(300),"highlight-tooltip__show");function Be(e){var t=e.title,n=e.closeButtonText,r=e.content,o=e.show,i=void 0===o||o,a=e.id,c=e.onClose,u=e.delay,s=e.onShow,l=void 0===s?Q.noop:s,f=e.useAnchor,d=void 0!==f&&f,p=Object(g.useState)(u>0?null:i),m=ge()(p,2),h=m[0],v=m[1],b=Object(g.useState)(null),y=ge()(b,2),w=y[0],O=y[1],j=Object(g.useState)(null),E=ge()(j,2),_=E[0],k=E[1];function x(){if(d){var e=document.getElementById(a);k(e.getBoundingClientRect())}}Object(g.useEffect)((function(){var e,t,n=document.getElementById(a);n&&!w&&(d?(t=document.createElement("div"),document.body.appendChild(t)):t=n.parentElement,(e=document.createElement("div")).classList.add("highlight-tooltip__container"),t.appendChild(e),O(e));var r=S(e);return function(){if(e){var t=e.parentElement;t.removeChild(e),d&&t.remove()}r&&clearTimeout(r)}}),[]),Object(g.useEffect)((function(){!h&&w&&w.classList.remove(Fe)}),[h]),Object(g.useEffect)((function(){i!==h&&null!==h&&w&&(v(i),i?w&&S(w):w.classList.remove(Fe))}),[i]),Object(g.useLayoutEffect)((function(){return window.addEventListener("resize",x),function(){return window.removeEventListener("resize",x)}}),[]);var S=function(e){var t=null;return u>0?t=setTimeout((function(){t=null,C(e)}),u):h||C(e),t},C=function(e){var t=document.getElementById(a);t&&d&&k(t.getBoundingClientRect()),e&&e.classList.add(Fe),v(!0),l()},P=function(){v(!1),c&&c()};return w?Object(g.createPortal)(Object(g.createElement)("div",{className:"highlight-tooltip__portal"},h?Object(g.createElement)(g.Fragment,null,Object(g.createElement)(we.IsolatedEventContainer,{className:"highlight-tooltip__overlay"}),Object(g.createElement)(we.Popover,{className:"highlight-tooltip__popover",noArrow:!1,anchorRect:_,focusOnMount:"container"},Object(g.createElement)(we.Card,{size:"medium"},Object(g.createElement)(we.CardHeader,null,t,Object(g.createElement)(we.Button,{isSmall:!0,onClick:P,icon:Ve.a})),Object(g.createElement)(we.CardBody,null,r||null),Object(g.createElement)(we.CardFooter,{isBorderless:!0},Object(g.createElement)(we.Button,{size:"small",isPrimary:!0,onClick:P},n||Object(te.__)("Close","woocommerce-admin")))))):null),w):null}Be.propTypes={id:x.a.string.isRequired,title:x.a.string.isRequired,closeButtonText:x.a.string.isRequired,content:x.a.oneOfType([x.a.string,x.a.node]),show:x.a.bool,onClose:x.a.func,delay:x.a.number,onShow:x.a.func,useAnchor:x.a.bool};var Ue=n(121);var qe=["button","submit"];function ze(e){var t=Object(g.useRef)(e);Object(g.useEffect)((function(){t.current=e}),[e]);var n=Object(g.useRef)(!1),r=Object(g.useRef)(),o=Object(g.useCallback)((function(){clearTimeout(r.current)}),[]);Object(g.useEffect)((function(){return function(){return o()}}),[]),Object(g.useEffect)((function(){e||o()}),[e,o]);var i=Object(g.useCallback)((function(e){var t=e.type,r=e.target;Object(Q.includes)(["mouseup","touchend"],t)?n.current=!1:function(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(Q.includes)(qe,e.type)}return!1}(r)&&(n.current=!0)}),[]),a=Object(g.useCallback)((function(e){e.persist(),n.current||(r.current=setTimeout((function(){document.hasFocus()?"function"==typeof t.current&&t.current(e):e.preventDefault()}),0))}),[]);return{onFocus:o,onMouseDown:i,onMouseUp:i,onTouchStart:i,onTouchEnd:i,onBlur:a}}var He=function(e){var t=e.content,n=e.isPanelOpen,r=e.isPanelSwitching,i=e.currentTab,a=e.tab,c=e.closePanel,u=e.clearPanel,s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"firstElement",t=Object(g.useRef)(e);return Object(g.useEffect)((function(){t.current=e}),[e]),Object(g.useCallback)((function(e){if(e&&!1!==t.current&&!e.contains(e.ownerDocument.activeElement)){var n=e;if("firstElement"===t.current){var r=Ue.a.tabbable.find(e)[0];r&&(n=r)}n.focus()}}),[])}(),l=ze((function(e){var t=e.target.closest(".woocommerce-inbox-dismiss-confirmation_modal")||e.target.closest(".components-snackbar__action");n&&!t&&c()})),f=Object(g.useRef)(null),d=Object(g.useCallback)((function(e){f.current=e,s(e)}),[]);if(!a)return Object(g.createElement)("div",{className:"woocommerce-layout__activity-panel-wrapper"});if(!t)return null;var p=he()("woocommerce-layout__activity-panel-wrapper",{"is-open":n,"is-switching":r});return Object(g.createElement)("div",o()({className:p,tabIndex:0,role:"tabpanel","aria-label":a.title,onTransitionEnd:function(e){e&&"transform"===e.propertyName&&(u(),f.current&&n&&a&&s(f.current))}},l,{ref:d}),Object(g.createElement)("div",{className:"woocommerce-layout__activity-panel-content",key:"activity-panel-"+i,id:"activity-panel-"+i},Object(g.createElement)(g.Suspense,{fallback:Object(g.createElement)(Y.Spinner,null)},t)))},$e=Object(g.lazy)((function(){return Promise.all([n.e(54),n.e(6),n.e(7)]).then(n.bind(null,602))})),We=Object(g.lazy)((function(){return Promise.all([n.e(1),n.e(2),n.e(4),n.e(8)]).then(n.bind(null,587))})),Qe=function(e){var t,n,r,o=e.isEmbedded,i=e.query,a=e.userPreferencesData,c=Object(g.useState)(""),u=ge()(c,2),s=u[0],l=u[1],f=Object(g.useState)(!1),d=ge()(f,2),p=d[0],m=d[1],h=Object(g.useState)(!1),v=ge()(h,2),b=v[0],y=v[1],w=Object(g.useState)(!1),j=ge()(w,2),E=j[0],_=j[1],k=Object(O.useSelect)((function(e){var t=e(J.OPTIONS_STORE_NAME),n=t.getOption,r=t.isResolving;return{hasUnreadNotes:Te(e),requestingTaskListOptions:r("getOption",["woocommerce_task_list_complete"])||r("getOption",["woocommerce_task_list_hidden"]),setupTaskListComplete:"yes"===n("woocommerce_task_list_complete"),setupTaskListHidden:"yes"===n("woocommerce_task_list_hidden"),trackedCompletedTasks:n("woocommerce_task_list_tracked_completed_tasks")||[]}})),x=k.hasUnreadNotes,S=k.requestingTaskListOptions,C=k.setupTaskListComplete,P=k.setupTaskListHidden,A=k.trackedCompletedTasks,T=Object(O.useDispatch)(J.OPTIONS_STORE_NAME).updateOptions,N=Object(J.useUser)().currentUserCan,R=function(){return"wc-admin"===i.page&&!i.path},L=function(){return i.task&&!i.path&&(!0===S||!1===P&&!1===C)},M=function(){var e={name:"inbox",title:Object(te.__)("Inbox","woocommerce-admin"),icon:Object(g.createElement)(Ee.a,{icon:ke}),unread:x,visible:(o||!R())&&!L()},t={name:"setup",title:Object(te.__)("Store Setup","woocommerce-admin"),icon:Object(g.createElement)(Le,null),onClick:function(){return window.location.href!==Object(K.f)("admin.php?page=wc-admin")&&("no"===P?I():T({woocommerce_task_list_hidden:"no"}).then(I)),null},visible:N("manage_woocommerce")&&!C&&!P&&!L()&&(!R()||o)},n={name:"help",title:Object(te.__)("Help","woocommerce-admin"),icon:Object(g.createElement)(Ee.a,{icon:xe}),visible:R()&&!o||L()};return[e,t,{component:De,visible:!o&&R()&&!L()},n].filter((function(e){return e.visible}))},I=function(){Object(re.f)(window.location.href)?Object(Z.getHistory)().push(Object(Z.getNewPath)({},"/",{})):window.location.href=Object(K.f)("admin.php?page=wc-admin")},D=M(),V=Object(Q.uniqueId)("activity-panel-header_"),F=he()("woocommerce-layout__activity-panel",{"is-mobile-open":E}),B=(t=i.task,n=a&&a.task_list_tracked_started_tasks,r=a&&a.help_panel_highlight_shown,!(!(t&&"yes"!==r&&(n||{})[t]>1)||A.includes(t))),U=D.some((function(e){return e.unread})),q=U?Object(te.__)("View Activity Panel, you have unread activity","woocommerce-admin"):Object(te.__)("View Activity Panel","woocommerce-admin");return Object(g.createElement)("div",null,Object(g.createElement)(Y.H,{id:V,className:"screen-reader-text"},Object(te.__)("Store Activity","woocommerce-admin")),Object(g.createElement)(Y.Section,{component:"aside",id:"woocommerce-activity-panel","aria-labelledby":V},Object(g.createElement)(we.Button,{onClick:function(){!function(){var e=M();l(E?"":e[0].name),_(!E),m(!E)}()},label:E?Object(te.__)("Close Activity Panel","woocommerce-admin"):q,"aria-expanded":E,className:"woocommerce-layout__activity-panel-mobile-toggle"},E?Object(g.createElement)(je.a,null):Object(g.createElement)(Ce,{hasUnread:U})),Object(g.createElement)("div",{className:F},Object(g.createElement)(Re,{tabs:D,tabOpen:p,selectedTab:s,onTabClick:function(e,t){var n,r,o;e.onClick?e.onClick():(n=t,r=e.name,o=r!==s&&""!==s&&n&&p,l(r),_(n),m(n),y(o))}}),Object(g.createElement)(He,{currentTab:!0,isPanelOpen:p,isPanelSwitching:b,tab:Object(Q.find)(M(),{name:s}),content:function(e){var t=i.task;switch(e){case"inbox":return Object(g.createElement)(We,null);case"help":return Object(g.createElement)($e,{taskName:t});default:return null}}(s),closePanel:function(){m(!1)},clearPanel:function(){p||(y(!1),l(""))}}))),B?Object(g.createElement)(Be,{delay:1e3,useAnchor:!0,title:Object(te.__)("We're here for help","woocommerce-admin"),content:Object(te.__)("If you have any questions, feel free to explore the WooCommerce docs listed here.","woocommerce-admin"),closeButtonText:Object(te.__)("Got it","woocommerce-admin"),id:"activity-panel-tab-help",onClose:function(){return Object(X.recordEvent)("help_tooltip_click"),void(a&&a.updateUserPreferences&&a.updateUserPreferences({help_panel_highlight_shown:"yes"}))},onShow:function(){return Object(X.recordEvent)("help_tooltip_view")}}):null)};Qe.defaultProps={getHistory:Z.getHistory};var Ge=Qe,Ye=function(){return/iPhone|iPad|iPod/i.test(window.navigator.userAgent)?"ios":/Android/i.test(window.navigator.userAgent)?"android":"unknown"},Ze=function(){return Object(g.createElement)("svg",{width:"37",height:"37",viewBox:"0 0 92 92",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(g.createElement)("rect",{width:"92",height:"92",rx:"21.3953",fill:"#7F54B3"}),Object(g.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M72.5937 28.043H19.8094C16.4781 28.0459 13.7783 30.7705 13.7754 34.1324V54.4501C13.7783 57.812 16.4781 60.5366 19.8094 60.5395H44.8229L56.2573 66.9607L53.6672 60.5395H72.599C74.2009 60.5402 75.7374 59.8983 76.8702 58.7552C78.0029 57.612 78.639 56.0614 78.6383 54.4447V34.1324C78.6376 32.5157 78.0002 30.9657 76.8664 29.8235C75.7327 28.6814 74.1956 28.0408 72.5937 28.043ZM19.1057 32.4208C18.4658 32.4324 17.8646 32.7359 17.467 33.2482C17.0888 33.7635 16.9404 34.4175 17.058 35.0502C18.5962 45.0986 20.0338 51.8757 21.371 55.3816C21.8779 56.658 22.4896 57.2703 23.2063 57.2185C24.3075 57.1489 25.6263 55.5968 27.1627 52.5621C27.9964 50.8412 29.2602 48.2662 30.9539 44.837C32.3785 49.88 34.309 53.6787 36.7456 56.2331C37.4291 56.9436 38.1204 57.2748 38.8195 57.2266C39.4185 57.1931 39.953 56.8315 40.217 56.2813C40.4753 55.7358 40.5806 55.1278 40.5211 54.5248C40.3516 52.0703 40.5919 48.667 41.2421 44.3149C41.9081 39.8057 42.7523 36.5818 43.7749 34.6432C43.9822 34.2526 44.0733 33.8087 44.037 33.366C44.0039 32.7587 43.7116 32.1969 43.2374 31.829C42.7745 31.4367 42.1799 31.2446 41.5803 31.2935C40.8334 31.3325 40.1682 31.7885 39.8499 32.4797C38.2331 35.5019 37.0812 40.4109 36.3943 47.2068C35.2823 44.2394 34.4509 41.1703 33.9114 38.0412C33.623 36.4613 32.9037 35.7125 31.7536 35.7946C30.9592 35.8589 30.3063 36.3944 29.7819 37.4012L24.0348 48.5643C23.0997 44.6692 22.2205 39.9289 21.3972 34.3433C21.1997 32.9652 20.4358 32.3244 19.1057 32.4208ZM69.9089 34.6877C71.6969 35.0381 73.2407 36.2 74.1186 37.8559C74.9693 39.3247 75.3946 41.1161 75.3946 43.23C75.4148 45.9567 74.7062 48.6357 73.3477 50.9687C71.7778 53.7023 69.7195 55.0691 67.1727 55.0691C66.6933 55.0668 66.2153 55.0128 65.7467 54.9078C63.9584 54.5581 62.4143 53.396 61.5371 51.7396C60.6864 50.2452 60.261 48.4411 60.261 46.3272C60.2357 43.6127 60.945 40.9454 62.3079 38.6295C63.9023 35.8959 65.9607 34.5291 68.4829 34.5291C68.9623 34.5304 69.4402 34.5836 69.9089 34.6877ZM68.7937 49.4848C69.7707 48.5773 70.4399 47.2269 70.8012 45.4337V45.4419C70.9315 44.7826 70.9959 44.1112 70.9933 43.4382C70.986 42.5849 70.8291 41.74 70.5302 40.9452C70.1443 39.901 69.6304 39.3124 68.9884 39.1793C68.0378 38.9643 67.1239 39.5256 66.2469 40.8632C65.5812 41.8393 65.109 42.9432 64.8577 44.1106C64.7276 44.7708 64.6632 45.4432 64.6657 46.1171C64.6739 46.9677 64.8308 47.8096 65.1287 48.6019C65.5146 49.6388 66.0294 50.2274 66.6731 50.3678C67.3169 50.5081 68.0237 50.2138 68.7937 49.4848ZM57.9079 37.8559C57.0291 36.2008 55.4854 35.0392 53.6976 34.6877C53.2279 34.5837 52.749 34.5306 52.2687 34.5291C49.7443 34.5291 47.6856 35.8959 46.0927 38.6295C44.7295 40.9454 44.0201 43.6127 44.0454 46.3272C44.0454 48.4411 44.4699 50.2452 45.319 51.7396C46.1976 53.3949 47.7414 54.5566 49.5294 54.9078C49.999 55.0126 50.4779 55.0667 50.9582 55.0691C53.5055 55.0691 55.5642 53.7023 57.1343 50.9687C58.4922 48.6355 59.2001 45.9565 59.1789 43.23C59.1789 41.1161 58.7544 39.3247 57.9053 37.8559H57.9079ZM54.5903 45.4337C54.2307 47.2269 53.5614 48.5773 52.5825 49.4848C51.8115 50.2065 51.101 50.5017 50.4589 50.3678C49.8169 50.2338 49.3011 49.6461 48.9169 48.6019C48.6181 47.8097 48.4603 46.9678 48.4511 46.1171C48.4495 45.4431 48.5148 44.7707 48.6459 44.1106C48.8971 42.9432 49.3694 41.8393 50.0353 40.8632C50.9124 39.5256 51.8264 38.9643 52.7773 39.1793C53.4193 39.3124 53.9333 39.901 54.3193 40.9452C54.617 41.7404 54.7739 42.585 54.7824 43.4382C54.785 44.1112 54.7207 44.7826 54.5903 45.4419V45.4337Z",fill:"white"}))},Ke=(n(301),function(e){var t=e.onInstall,n=e.onDismiss;Object(g.useEffect)((function(){var e=document.getElementsByClassName("woocommerce-layout")[0];return"android"===Ye()&&e&&e.classList.add("woocommerce-layout__show-app-banner"),function(){e&&e.classList.remove("woocommerce-layout__show-app-banner")}}),[]);var r=Object(g.useState)(!1),o=ge()(r,2),i=o[0],a=o[1];return"android"!==Ye()||i?null:Object(g.createElement)("div",{className:"woocommerce-mobile-app-banner"},Object(g.createElement)(we.Icon,{icon:"no-alt","data-testid":"dismiss-btn",onClick:function(){n(),a(!0),Object(X.recordEvent)("wcadmin_mobile_android_banner_click",{action:"dismiss"})}}),Object(g.createElement)(Ze,null),Object(g.createElement)("div",{className:"woocommerce-mobile-app-banner__description"},Object(g.createElement)("p",{className:"woocommerce-mobile-app-banner__description__text"},Object(te.__)("Run your store from anywhere","woocommerce-admin")),Object(g.createElement)("p",{className:"woocommerce-mobile-app-banner__description__text"},Object(te.__)("Download the WooCommerce app","woocommerce-admin"))),Object(g.createElement)(we.Button,{href:"https://play.google.com/store/apps/details?id=com.woocommerce.android",isSecondary:!0,onClick:function(){t(),a(!0),Object(X.recordEvent)("wcadmin_mobile_android_banner_click",{action:"install"})}},Object(te.__)("Install","woocommerce-admin")))});function Je(){var e=Object(g.useState)(!1),t=ge()(e,2),n=t[0],r=t[1],o=Object(g.useRef)(null);return Object(g.useEffect)((function(){var e=function(){r(window.pageYOffset>20)},t=function(){o.current=window.requestAnimationFrame(e)};return window.addEventListener("scroll",t),function(){window.removeEventListener("scroll",t),window.cancelAnimationFrame(o.current)}}),[]),n}var Xe=n(139),et=(n(302),n(19)),tt=n.n(et);function nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ot=function(e){var t=window.location,n=t.origin,r=t.pathname,o=t.search;return 0===e.indexOf("#")?n+r+o+e:0===e.indexOf("http")?e:n+e},it=function(e){var t=e.replace(/[-\/\\^$*+?.()|[\]{}]/gi,"\\$&").split(/\\\?|#/),n=ge()(t,3),r=n[0],o=n[1],i=n[2],a=i?"(.*#".concat(i,"$)"):"";return"^"+r+(o?o.split("&").reduce((function(e,t){return"".concat(e,"(?=.*[?|&]").concat(t,"(&|$|#))")}),""):"")+a},at=function(e){var t,n,r;return window.wcNavigation.historyPatched||(t=window.history,n=t.pushState,r=t.replaceState,t.pushState=function(e){var r=new CustomEvent("pushstate",{state:e});return window.dispatchEvent(r),n.apply(t,arguments)},t.replaceState=function(e){var n=new CustomEvent("replacestate",{state:e});return window.dispatchEvent(n),r.apply(t,arguments)},window.wcNavigation.historyPatched=!0),window.addEventListener("popstate",e),window.addEventListener("pushstate",e),window.addEventListener("replacestate",e),function(){window.removeEventListener("popstate",e),window.removeEventListener("pushstate",e),window.removeEventListener("replacestate",e)}},ct=function(e){var t=null,n=0;return e.forEach((function(e){var r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t){var r=ot(t),o=e.href;if(r===o)return Number.MAX_SAFE_INTEGER;var i=it(r),a=new RegExp(n||i,"i");return(decodeURIComponent(o).match(a)||[]).length}}(window.location,Object(K.f)(e.url),e.matchExpression);r>0&&r>=n&&(n=r,t=e)})),t||null},ut=["primary","favorites","plugins","secondary"],st={woocommerce:{id:"woocommerce",isCategory:!0,menuId:"primary",migrate:!0,order:10,parent:"",title:"WooCommerce"}},lt=function(e){return e.sort((function(e,t){return e.order===t.order?e.title.localeCompare(t.title):e.order-t.order}))},ft=Object(g.createElement)(_e.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(g.createElement)(_e.a,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})),dt=function(){var e=Object(K.g)("siteTitle",""),t=Object(K.g)("homeUrl",""),n=Je(),r=Object(g.useState)(document.body.classList.contains(!1)),o=ge()(r,2),i=o[0],a=o[1],c="is-wc-nav-folded",u="is-wc-nav-expanded",s=function(){document.body.classList.add(c),document.body.classList.remove(u),a(!0)},l=function(){document.body.classList.remove(c),document.body.classList.add(u),a(!1)},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body.clientWidth;e<=960?s():l()};Object(g.useEffect)((function(){f();for(var e=0,t=[{eventName:"orientationchange",handler:function(e){return f(e.target.screen.availWidth)}},{eventName:"resize",handler:Object(Q.debounce)((function(){return f()}),200)}];e<t.length;e++){var n=t[e],r=n.eventName,o=n.handler;window.addEventListener(r,o,!1)}at((function(){return f()}))}),[]);var d=Object(g.createElement)(Ee.a,{size:"36px",icon:ft}),p=Object(O.useSelect)((function(e){var t=e("core/data").isResolving,n=(0,e("core").getEntityRecord)("root","__unstableBase",void 0)||{};return{isRequestingSiteIcon:t("core","getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:n.siteIconUrl}})),m=p.isRequestingSiteIcon,h=p.siteIconUrl;h?d=Object(g.createElement)("img",{alt:Object(te.__)("Site Icon"),src:h}):m&&(d=null);var v=he()("woocommerce-navigation-header",{"is-scrolled":n});return Object(g.createElement)("div",{className:v},Object(g.createElement)(we.Button,{onClick:function(){document.body.classList.contains(c)?l():s()},className:"woocommerce-navigation-header__site-icon","aria-label":"Fold navigation",role:"switch","aria-checked":i?"true":"false"},d),Object(g.createElement)(we.Button,{href:t,className:"woocommerce-navigation-header__site-title",as:"span"},Object(ve.decodeEntities)(e)))},pt=(n(303),n(304),function(e){var t=e.id,n=Object(O.useSelect)((function(e){return{favorites:e(J.NAVIGATION_STORE_NAME).getFavorites(),isResolving:e(J.NAVIGATION_STORE_NAME).isResolving("getFavorites")}})),r=n.favorites,o=n.isResolving,i=Object(O.useDispatch)(J.NAVIGATION_STORE_NAME),a=i.addFavorite,c=i.removeFavorite,u=r.includes(t);return o?null:Object(g.createElement)(we.Button,{id:"woocommerce-navigation-favorite-button",className:"woocommerce-navigation-favorite-button",isTertiary:!0,onClick:function(){(u?c:a)(t),Object(X.recordEvent)("navigation_favorite",{id:t,action:u?"unfavorite":"favorite"})},icon:u?"star-filled":"star-empty","aria-label":u?Object(te.__)("Add this item to your favorites.","woocommerce-admin"):Object(te.__)("Remove this item from your favorites.","woocommerce-admin")})}),mt="woocommerce_navigation_favorites_tooltip_hidden",ht=function(){var e=Object(O.useSelect)((function(e){var t=e(J.OPTIONS_STORE_NAME),n=t.getOption,r=t.isResolving;return{isFavoritesResolving:e(J.NAVIGATION_STORE_NAME).isResolving("getFavorites"),isOptionResolving:r("getOption",[mt]),isTooltipHidden:"yes"===n(mt)}})),t=e.isFavoritesResolving,n=e.isOptionResolving,r=e.isTooltipHidden,o=Object(O.useDispatch)(J.OPTIONS_STORE_NAME).updateOptions;return t||r||n||document.body.classList.contains("is-wc-nav-folded")?null:Object(g.createElement)(Be,{delay:1e3,title:Object(te.__)("Introducing favorites","woocommerce-admin"),content:Object(te.__)("You can now favorite your extensions to pin them in the top level of the navigation.","woocommerce-admin"),closeButtonText:Object(te.__)("Got it","woocommerce-admin"),id:"woocommerce-navigation-favorite-button",onClose:function(){return o(u()({},mt,"yes"))},useAnchor:!0})},vt=function(e){var t=e.category,n=t.id,r=t.title,o="woocommerce-navigation-category-title";return["plugins","favorites"].includes(t.menuId)?Object(g.createElement)("span",{className:o},Object(g.createElement)("span",{className:"".concat(o,"__text")},r),Object(g.createElement)(pt,{id:n}),Object(g.createElement)(ht,null)):Object(g.createElement)("span",{className:o},r)},bt=function(e){var t=e.item,n=Object(Z.useNavSlot)("woocommerce_navigation_"+t.id),r=Boolean(n.fills&&n.fills.length),o=function(e){Object(X.recordEvent)("navigation_click",{menu_item:e})};return r&&!t.isCategory?Object(g.createElement)(be.c,{key:t.id,item:t.id},Object(g.createElement)("div",{onClick:function(){return o(t.id)}},Object(g.createElement)(Z.WooNavigationItem.Slot,{name:t.id}))):Object(g.createElement)(be.c,{key:t.id,item:t.id,title:t.title,href:t.url,navigateToMenu:!t.url&&t.id,onClick:function(){return o(t.id)},hideIfTargetMenuEmpty:!0})},yt=function(e){var t=e.category,n=e.onBackClick,r=e.pluginItems,o=e.primaryItems;if(!o.length&&!r.length)return null;var i=window.wcNavigation,a=i.rootBackLabel,c=i.rootBackUrl,u="woocommerce"===t.id&&c;return Object(g.createElement)(be.d,{title:Object(g.createElement)(vt,{category:t}),menu:t.id,parentMenu:t.parent,backButtonLabel:u?a:t.backButtonLabel||null,onBackButtonClick:u?function(){n("woocommerce"),window.location=c}:function(){return n(t.id)}},!!o.length&&Object(g.createElement)(be.b,null,o.map((function(e){return Object(g.createElement)(bt,{key:e.id,item:e})}))),!!r.length&&Object(g.createElement)(be.b,{title:"woocommerce"===t.id?Object(te.__)("Extensions","woocommerce-admin"):null},r.map((function(e){return Object(g.createElement)(bt,{key:e.id,item:e})}))))},gt=function(e){var t=e.category,n=e.items,r=e.onBackClick;if(!n.length)return null;var o="woocommerce"===t.id;return Object(g.createElement)(be.d,{className:"components-navigation__menu-secondary",title:!o&&Object(g.createElement)(vt,{category:t}),menu:t.id,parentMenu:t.parent,backButtonLabel:t.backButtonLabel||null,onBackButtonClick:o?null:function(){return r(t.id)}},Object(g.createElement)(be.b,{onBackButtonClick:function(){return r(t.id)}},n.map((function(e){return Object(g.createElement)(bt,{key:e.id,item:e})}))))},wt=Object(w.compose)(Object(O.withSelect)((function(e){var t=e(J.NAVIGATION_STORE_NAME),n=t.getActiveItem,r=t.getMenuItems;return{activeItem:n(),menuItems:r()}})))((function(e){var t=e.menuItems;Object(g.useEffect)((function(){document.documentElement.classList.remove("wp-toolbar"),document.body.classList.add("has-woocommerce-navigation");var e=document.getElementById("adminmenumain");e&&e.classList.add("folded")}),[]);var n=Object(g.useState)("woocommerce-home"),r=ge()(n,2),o=r[0],i=r[1],a=Object(g.useState)("woocommerce"),c=ge()(a,2),u=c[0],s=c[1];Object(g.useEffect)((function(){var e=ct(t);return e&&o!==e&&(i(e),s(e.parent)),at((function(){setTimeout((function(){var e=ct(t);e&&i(e)}),0)}))}),[t]);var l=Object(J.useUser)().currentUserCan,f=Object(g.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=rt({},st),r=lt(e).reduce((function(e,r){return e[r.parent]||(e[r.parent]={},ut.forEach((function(t){e[r.parent][t]=[]}))),e[r.parent][r.menuId]?(t&&r.capability&&!t(r.capability)||(r.isCategory&&(n[r.id]=r),e[r.parent][r.menuId].push(r)),e):e}),{});return{items:r,categories:n}}(t,l)}),[t,l]),d=f.categories,p=f.items,m=Object(g.useRef)(null),h=function(e){Object(X.recordEvent)("navigation_back_click",{category:e})},v="woocommerce"===u,b=he()("woocommerce-navigation",{"is-root":v});return Object(g.createElement)("div",{className:b},Object(g.createElement)(dt,null),Object(g.createElement)("div",{className:"woocommerce-navigation__wrapper",ref:m},Object(g.createElement)(be.a,{activeItem:o?o.id:null,activeMenu:u,onActivateMenu:function(){m&&m.current&&(m.current.scrollTop=0),s.apply(void 0,arguments)}},Object.values(d).map((function(e){var t=p[e.id];return!!t&&[Object(g.createElement)(yt,{key:e.id,category:e,onBackClick:h,primaryItems:[].concat(tt()(t.primary),tt()(t.favorites)),pluginItems:t.plugins}),Object(g.createElement)(gt,{key:"secondary/".concat(e.id),category:e,onBackClick:h,items:t.secondary})]})))))})),Ot=Object(J.withNavigationHydration)(window.wcNavigation)((function(){return Object(g.createElement)(Z.NavSlotFillProvider,null,Object(g.createElement)(wt,null),Object(g.createElement)(Xe.PluginArea,null))}));function jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jt(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _t=function(e){var t=e.sections,n=e.isEmbedded,r=void 0!==n&&n,o=e.query,i=Object(g.useRef)(null),c=Object(K.g)("siteTitle",""),u=t.slice(-1)[0],s=Je(),l=Object(J.useUserPreferences)(),f=l.updateUserPreferences,d=a()(l,["updateUserPreferences"]),p="yes"===d.android_app_banner_dismissed,m=null,h=he()("woocommerce-layout__header",{"is-scrolled":s});Object(g.useLayoutEffect)((function(){return v(),window.addEventListener("resize",v),function(){window.removeEventListener("resize",v);var e=document.querySelector("#wpbody");e&&(e.style.marginTop=null)}}),[p]);var v=function(){clearTimeout(m),m=setTimeout((function(){var e=document.querySelector("#wpbody");e&&i.current&&(e.style.marginTop="".concat(i.current.offsetHeight,"px"))}),200)};Object(g.useEffect)((function(){if(!r){var e=t.map((function(e){return Array.isArray(e)?e[1]:e})).reverse().join(" ‹ "),n=Object(ve.decodeEntities)(Object(te.sprintf)(Object(te.__)("%1$s ‹ %2$s — WooCommerce","woocommerce-admin"),e,c));document.title!==n&&(document.title=n)}}),[r,t,c]);var b=function(){f({android_app_banner_dismissed:"yes"})};return Object(g.createElement)("div",{className:h,ref:i},!p&&Object(g.createElement)(Ke,{onDismiss:b,onInstall:b}),Object(g.createElement)("div",{className:"woocommerce-layout__header-wrapper"},window.wcAdminFeatures.navigation&&Object(g.createElement)(Ot,null),Object(g.createElement)(be.e,{className:"woocommerce-layout__header-heading",as:"h1",variant:"subtitle.small"},Object(ve.decodeEntities)(u)),window.wcAdminFeatures["activity-panels"]&&Object(g.createElement)(Ge,{isEmbedded:r,query:o,userPreferencesData:Et(Et({},d),{},{updateUserPreferences:f})})))};function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v()(this,n)}}var xt=function(e){m()(n,e);var t=kt(n);function n(){return l()(this,n),t.apply(this,arguments)}return d()(n,[{key:"render",value:function(){return Object(g.createElement)("div",{id:"woocommerce-layout__notice-list",className:"woocommerce-layout__notice-list"})}}]),n}(g.Component),St=n(8),Ct=n.n(St),Pt=n(44),At=n.n(Pt),Tt=n(182),Nt=n(277);var Rt=function(e){var t=e.notices,n=e.className,r=e.children,i=e.onRemove,a=void 0===i?Q.noop:i,c=e.onRemove2,u=void 0===c?Q.noop:c,s=Object(w.useReducedMotion)(),l=Object(g.useState)((function(){return new WeakMap})),f=ge()(l,1)[0],d=Object(Tt.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=At()(Ct.a.mark((function t(n){return Ct.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n({opacity:1,height:f.get(e).offsetHeight});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},leave:function(){return function(){var e=At()(Ct.a.mark((function e(t){return Ct.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({opacity:0});case 2:return e.next=4,t({height:0});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},immediate:s});n=he()("components-snackbar-list",n);var p=function(e){return function(){a(e.id),u(e.id)}};return Object(g.createElement)("div",{className:n},r,d.map((function(e){var t=e.item,n=e.key,r=e.props;return Object(g.createElement)(Tt.animated.div,{key:n,style:r},Object(g.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&f.set(t,e)}},Object(g.createElement)(Nt.a,o()({},Object(Q.omit)(t,["content"]),{onRemove:p(t)}),t.content)))})))};n(306);function Lt(e){var t=Object(O.useDispatch)("core/notices").removeNotice,n=Object(O.useDispatch)("core/notices2").removeNotice,r=Object(O.useSelect)((function(e){return{notices:e("core/notices").getNotices(),notices2:e("core/notices2").getNotices()}})),o=e.className,i=he()("woocommerce-transient-notices","components-notices__snackbar",o),a=function(){var e=r.notices,t=r.notices2,n=void 0===t?[]:t;return e.concat(n)}();return Object(g.createElement)(Rt,{notices:a,className:i,onRemove:t,onRemove2:n})}Lt.propTypes={className:x.a.string,notices:x.a.array};var Mt=Lt;function It(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?It(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vt(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v()(this,n)}}Object(Xe.registerPlugin)("wc-admin-navigation",{render:function(){var e=Object(g.useState)(Object(Z.getPersistedQuery)()),t=ge()(e,2),n=t[0],r=t[1],o=function(e){return Object(Z.getQueryExcludedScreens)().includes(Object(Z.getScreenFromPath)(e))};if(Object(g.useEffect)((function(){return at((function(){setTimeout((function(){o()||r(Object(Z.getPersistedQuery)())}),0)}))}),[]),!Object(re.f)(window.location.href))return null;var i=Object(ne.a)().filter((function(e){return e.navArgs})),a=de().filter((function(e){return e.navArgs})).map((function(e){return"/analytics/settings"===e.path?Dt(Dt({},e),{},{breadcrumbs:[Object(te.__)("Analytics","woocommerce-admin")]}):e}));return Object(g.createElement)(g.Fragment,null,a.map((function(e){return Object(g.createElement)(Z.WooNavigationItem,{item:e.navArgs.id,key:e.navArgs.id},Object(g.createElement)(Y.Link,{className:"components-button",href:Object(Z.getNewPath)(o(e.path)?{}:n,e.path,{}),type:"wc-admin"},e.breadcrumbs[e.breadcrumbs.length-1]))})),i.map((function(e){return Object(g.createElement)(Z.WooNavigationItem,{item:e.navArgs.id,key:e.navArgs.id},Object(g.createElement)(Y.Link,{className:"components-button",href:Object(Z.getNewPath)(o(e.report)?{}:n,"/analytics/".concat(e.report),{}),type:"wc-admin"},e.title))})))}});var Ut=Object(g.lazy)((function(){return Promise.all([n.e(1),n.e(47)]).then(n.bind(null,611))})),qt=Object(g.lazy)((function(){return n.e(51).then(n.bind(null,527))})),zt=function(e){m()(n,e);var t=Bt(n);function n(){return l()(this,n),t.apply(this,arguments)}return d()(n,[{key:"render",value:function(){var e=this.props.children;return Object(g.createElement)("div",{className:"woocommerce-layout__primary",id:"woocommerce-layout__primary"},window.wcAdminFeatures["store-alerts"]&&Object(g.createElement)(g.Suspense,{fallback:Object(g.createElement)(Y.Spinner,null)},Object(g.createElement)(Ut,null)),Object(g.createElement)(xt,null),e)}}]),n}(g.Component),Ht=function(e){m()(n,e);var t=Bt(n);function n(){return l()(this,n),t.apply(this,arguments)}return d()(n,[{key:"componentDidMount",value:function(){this.recordPageViewTrack()}},{key:"componentDidUpdate",value:function(e){var t=Object(Q.get)(e,"location.pathname"),n=Object(Q.get)(this.props,"location.pathname");t&&n&&t!==n&&this.recordPageViewTrack()}},{key:"recordPageViewTrack",value:function(){var e=this.props,t=e.activePlugins,n=e.installedPlugins,r=e.isEmbedded,o=e.isJetpackConnected,i={has_navigation:!!window.wcNavigation};if(r){var a=document.location.pathname+document.location.search;Object(X.recordPageView)(a,Ft({is_embedded:!0},i))}else{var c=Object(Q.get)(this.props,"location.pathname");if(c){var u=c.substring(1).replace(/\//g,"_");0===u.length&&(u="home_screen"),Object(X.recordPageView)(u,Ft({jetpack_installed:n.includes("jetpack"),jetpack_active:t.includes("jetpack"),jetpack_connected:o},i))}}}},{key:"getQuery",value:function(e){if(!e)return{};var t=e.substring(1);return Object(G.parse)(t)}},{key:"isWCPaySettingsPage",value:function(){var e=Object(Z.getQuery)(),t=e.page,n=e.section,r=e.tab;return"wc-settings"===t&&"checkout"===r&&"woocommerce_payments"===n}},{key:"render",value:function(){var e=this.props,t=e.isEmbedded,n=a()(e,["isEmbedded"]),r=this.props,i=r.location,c=r.page.breadcrumbs,u=this.getQuery(i&&i.search);return Object(g.createElement)("div",{className:"woocommerce-layout"},Object(g.createElement)(_t,{sections:Object(Q.isFunction)(c)?c(this.props):c,isEmbedded:t,query:u}),Object(g.createElement)(Mt,null),!t&&Object(g.createElement)(zt,null,Object(g.createElement)("div",{className:"woocommerce-layout__main"},Object(g.createElement)(pe,o()({},n,{query:u})))),t&&this.isWCPaySettingsPage()&&Object(g.createElement)(g.Suspense,{fallback:null},Object(g.createElement)(qt,null)))}}]),n}(g.Component);Ht.propTypes={isEmbedded:x.a.bool,page:x.a.shape({container:x.a.oneOfType([x.a.func,x.a.object]),path:x.a.string,breadcrumbs:x.a.oneOfType([x.a.func,x.a.arrayOf(x.a.oneOfType([x.a.arrayOf(x.a.string),x.a.string]))]).isRequired,wpOpenMenu:x.a.string}).isRequired};var $t=Object(w.compose)(Object(J.withPluginsHydration)(Ft(Ft({},window.wcSettings.plugins||{}),{},{jetpackStatus:window.wcSettings.dataEndpoints&&window.wcSettings.dataEndpoints.jetpackStatus||!1})),Object(O.withSelect)((function(e,t){if(!t.isEmbedded){var n=e(J.PLUGINS_STORE_NAME),r=n.getActivePlugins,o=n.getInstalledPlugins,i=n.isJetpackConnected;return{activePlugins:r(),isJetpackConnected:i(),installedPlugins:o()}}})))(Ht),Wt=Object(w.compose)(window.wcSettings.preloadOptions?Object(J.withOptionsHydration)(Ft({},window.wcSettings.preloadOptions)):Q.identity)((function(){var e=Object(J.useUser)().currentUserCan;return Object(g.createElement)(I,{history:Object(Z.getHistory)()},Object(g.createElement)(W,null,de().filter((function(t){return!t.capability||e(t.capability)})).map((function(e){return Object(g.createElement)(B,{key:e.path,path:e.path,exact:!0,render:function(t){return Object(g.createElement)($t,o()({page:e},t))}})}))))})),Qt=Object(w.compose)(window.wcSettings.preloadOptions?Object(J.withOptionsHydration)(Ft({},window.wcSettings.preloadOptions)):Q.identity)((function(){return Object(g.createElement)($t,{page:{breadcrumbs:Object(K.g)("embedBreadcrumbs",[])},isEmbedded:!0})}))},142:function(e,t){!function(){e.exports=this.wc.number}()},15:function(e,t,n){var r=n(31),o=n(9);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},152:function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,c=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,m=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,O=r?Symbol.for("react.scope"):60119;function j(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case d:case a:case u:case c:case m:return e;default:switch(e=e&&e.$$typeof){case l:case p:case b:case v:case s:return e;default:return t}}case i:return t}}}function E(e){return j(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=s,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=b,t.Memo=v,t.Portal=i,t.Profiler=u,t.StrictMode=c,t.Suspense=m,t.isAsyncMode=function(e){return E(e)||j(e)===f},t.isConcurrentMode=E,t.isContextConsumer=function(e){return j(e)===l},t.isContextProvider=function(e){return j(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return j(e)===p},t.isFragment=function(e){return j(e)===a},t.isLazy=function(e){return j(e)===b},t.isMemo=function(e){return j(e)===v},t.isPortal=function(e){return j(e)===i},t.isProfiler=function(e){return j(e)===u},t.isStrictMode=function(e){return j(e)===c},t.isSuspense=function(e){return j(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===u||e===c||e===m||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===v||e.$$typeof===s||e.$$typeof===l||e.$$typeof===p||e.$$typeof===g||e.$$typeof===w||e.$$typeof===O||e.$$typeof===y)},t.typeOf=j},16:function(e,t){!function(){e.exports=this.moment}()},17:function(e,t){!function(){e.exports=this.wp.dataControls}()},18:function(e,t,n){var r=n(60),o=n(61),i=n(40),a=n(62);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()}},182:function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(24)),i=r(n(97)),a=n(10),c=r(a),u=r(n(305)),s=r(n(9)),l={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(l.str(e)||l.num(e))return e===t;if(l.obj(e)&&l.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!l.und(n)||e===t}};function f(){var e=a.useState(!1)[1];return a.useCallback((function(){return e((function(e){return!e}))}),[])}function d(e,t){return l.und(e)||l.nul(e)?t:e}function p(e){return l.und(e)?[]:l.arr(e)?e:[e]}function m(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return l.fun(e)?e.apply(void 0,n):e}function h(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,i(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(l.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var i;return l.und(t[r])?o({},n,((i={})[r]=e[r],i)):n}),{});return o({to:t},n)}var v,b,y=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),g=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof y&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof y&&e.removeChild(s(t))}))},t}return u(t,e),t}(y),w=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof y&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof y&&e.removeChild(s(t))}))},t}u(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof y)&&(t[n]=r instanceof y?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(y);function O(e,t){v={fn:e,transform:t}}function j(e){b=e}var E,_=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},k=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function x(e){E=e}var S,C=function(){return Date.now()};function P(e){S=e}var A,T,N=function(e){return e.current};function R(e){A=e}var L=Object.freeze({get applyAnimatedValues(){return v},injectApplyAnimatedValues:O,get colorNames(){return b},injectColorNames:j,get requestFrame(){return _},get cancelFrame(){return k},injectFrame:function(e,t){_=e,k=t},get interpolation(){return E},injectStringInterpolator:x,get now(){return C},injectNow:function(e){C=e},get defaultElement(){return S},injectDefaultElement:P,get animatedApi(){return N},injectAnimatedApi:function(e){N=e},get createAnimatedStyle(){return A},injectCreateAnimatedStyle:R,get manualFrameloop(){return T},injectManualFrameloop:function(e){T=e}}),M=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:A(t.style)}):t,r.update=n,r.attach(),r}return u(t,e),t}(w),I=!1,D=new Set,V=function e(){if(!I)return!1;var t=C(),n=D,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var i;if(r){if(o>=n.length)break;i=n[o++]}else{if((o=n.next()).done)break;i=o.value}for(var a=i,c=!1,u=0;u<a.configs.length;u++){for(var s=a.configs[u],l=void 0,f=void 0,d=0;d<s.animatedValues.length;d++){var p=s.animatedValues[d];if(!p.done){var m=s.fromValues[d],h=s.toValues[d],v=p.lastPosition,b=h instanceof y,g=Array.isArray(s.initialVelocity)?s.initialVelocity[d]:s.initialVelocity;if(b&&(h=h.getValue()),s.immediate)p.setValue(h),p.done=!0;else if("string"!=typeof m&&"string"!=typeof h){if(void 0!==s.duration)v=m+s.easing((t-p.startTime)/s.duration)*(h-m),l=t>=p.startTime+s.duration;else if(s.decay)v=m+g/(1-.998)*(1-Math.exp(-(1-.998)*(t-p.startTime))),(l=Math.abs(p.lastPosition-v)<.1)&&(h=v);else{f=void 0!==p.lastTime?p.lastTime:t,g=void 0!==p.lastVelocity?p.lastVelocity:s.initialVelocity,t>f+64&&(f=t);for(var w=Math.floor(t-f),O=0;O<w;++O){v+=1*(g+=1*((-s.tension*(v-h)+-s.friction*g)/s.mass)/1e3)/1e3}var j=!(!s.clamp||0===s.tension)&&(m<h?v>h:v<h),E=Math.abs(g)<=s.precision,k=0===s.tension||Math.abs(h-v)<=s.precision;l=j||E&&k,p.lastVelocity=g,p.lastTime=t}b&&!s.toValues[d].done&&(l=!1),l?(p.value!==h&&(v=h),p.done=!0):c=!0,p.setValue(v),p.lastPosition=v}else p.setValue(h),p.done=!0}}a.props.onFrame&&(a.values[s.name]=s.interpolation.getValue())}a.props.onFrame&&a.props.onFrame(a.values),c||(D.delete(a),a.stop(!0))}return D.size?T?T():_(e):I=!1,I};function F(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return F({range:e,output:t,extrapolate:n});if(E&&"string"==typeof e.output[0])return E(e);var r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",c=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,a,c,u){var s=u?u(e):e;if(s<t){if("identity"===a)return s;"clamp"===a&&(s=t)}if(s>n){if("identity"===c)return s;"clamp"===c&&(s=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t);s=i(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(e,i[t],i[t+1],o[t],o[t+1],u,a,c,r.map)}}var B=function(e){function t(n,r,o,i){var a;return(a=e.call(this)||this).calc=void 0,a.payload=n instanceof g&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],a.calc=F(r,o,i),a}u(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=F(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(g);var U=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}u(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new B(this,e,t,n)},t}(y),q=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new U(e)})),n}u(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new B(this,e,t)},t}(g),z=0,H=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=z++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),n=t.delay,r=void 0===n?0:n,a=t.to,c=i(t,["delay","to"]);if(l.arr(a)||l.fun(a))this.queue.push(o({},c,{delay:r,to:a}));else if(a){var u={};Object.entries(a).forEach((function(e){var t,n=e[0],i=e[1],a=o({to:(t={},t[n]=i,t),delay:m(r,n)},c),s=u[a.delay]&&u[a.delay].to;u[a.delay]=o({},u[a.delay],a,{to:o({},s,a.to)})})),this.queue=Object.values(u)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(c),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,i=e.to,a=void 0===i?{}:i;l.obj(r)&&(n.merged=o({},r,n.merged)),l.obj(a)&&(n.merged=o({},n.merged,a))}));var r=this.local=++this.guid,a=this.localQueue=this.queue;this.queue=[],a.forEach((function(t,o){var c=t.delay,u=i(t,["delay"]),s=function(t){o===a.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},f=l.arr(u.to)||l.fun(u.to);c?setTimeout((function(){r===n.guid&&(f?n.runAsync(u,s):n.diff(u).start(s))}),c):f?n.runAsync(u,s):n.diff(u).start(s)}))}else l.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,D.has(t)||D.add(t),I||(I=!0,_(T||V));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,D.has(t)&&D.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,i(e,["delay"])),a=this.local,c=Promise.resolve(void 0);if(l.arr(r.to))for(var u=function(e){var t=e,i=o({},r,h(r.to[t]));l.arr(i.config)&&(i.config=i.config[t]),c=c.then((function(){if(a===n.guid)return new Promise((function(e){return n.diff(i).start(e)}))}))},s=0;s<r.to.length;s++)u(s);else if(l.fun(r.to)){var f,d=0;c=c.then((function(){return r.to((function(e){var t=o({},r,h(e));if(l.arr(t.config)&&(t.config=t.config[d]),d++,a===n.guid)return f=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return f}))}))}c.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,i=void 0===r?{}:r,a=n.to,c=void 0===a?{}:a,u=n.config,s=void 0===u?{}:u,f=n.reverse,h=n.attach,v=n.reset,y=n.immediate;if(f){var g=[c,i];i=g[0],c=g[1]}this.merged=o({},i,this.merged,c),this.hasChanged=!1;var w=h&&h(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],a=n[1],c=e[r]||{},u=l.num(a),f=l.str(a)&&!a.startsWith("#")&&!/\d/.test(a)&&!b[a],h=l.arr(a),g=!u&&!h&&!f,O=l.und(i[r])?a:i[r],j=u||h||f?a:1,_=m(s,r);w&&(j=w.animations[r].parent);var k,x=c.parent,S=c.interpolation,P=p(w?j.getPayload():j),A=a;g&&(A=E({range:[0,1],output:[a,a]})(1));var T,N=S&&S.getValue(),R=!l.und(x)&&c.animatedValues.some((function(e){return!e.done})),L=!l.equ(A,N),M=!l.equ(A,c.previous),I=!l.equ(_,c.config);if(v||M&&L||I){var D;if(u||f)x=S=c.parent||new U(O);else if(h)x=S=c.parent||new q(O);else if(g){var V=c.interpolation&&c.interpolation.calc(c.parent.value);V=void 0===V||v?O:V,c.parent?(x=c.parent).setValue(0,!1):x=new U(0);var F={output:[V,a]};c.interpolation?(S=c.interpolation,c.interpolation.updateConfig(F)):S=x.interpolate(F)}return P=p(w?j.getPayload():j),k=p(x.getPayload()),v&&!g&&x.setValue(O,!1),t.hasChanged=!0,k.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=R?e.lastVelocity:void 0,e.lastTime=R?e.lastTime:void 0,e.startTime=C(),e.done=!1,e.animatedStyles.clear()})),m(y,r)&&x.setValue(g?j:a,!1),o({},e,((D={})[r]=o({},c,{name:r,parent:x,interpolation:S,animatedValues:k,toValues:P,previous:A,config:_,fromValues:p(x.getValue()),immediate:m(y,r),initialVelocity:d(_.velocity,0),clamp:d(_.clamp,!1),precision:d(_.precision,.01),tension:d(_.tension,170),friction:d(_.friction,26),mass:d(_.mass,1),duration:_.duration,easing:d(_.easing,(function(e){return e})),decay:_.decay}),D))}return L?e:(g&&(x.setValue(1,!1),S.updateConfig({output:[A,A]})),x.done=!0,t.hasChanged=!0,o({},e,((T={})[r]=o({},e[r],{previous:A}),T)))}),this.animations),this.hasChanged)for(var O in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[O]=this.animations[O].interpolation,this.values[O]=this.animations[O].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),$=function(e,t){var n=a.useRef(!1),r=a.useRef(),o=l.fun(t),i=a.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var i=new H,a=o?m(t,r,i):t[r];return 0===r&&(n=a.ref),i.update(a),n||i.start(),i})),n]}),[e]),c=i[0],u=i[1];r.current=c;a.useImperativeHandle(u,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=a.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?m(e,n,t):e[n]),u||t.start()}))}}),[e]);a.useEffect((function(){n.current?o||s(t):u||r.current.forEach((function(e){return e.start()}))})),a.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var f=r.current.map((function(e){return e.getValues()}));return o?[f,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:f},W=0,Q=function(e,t){return("function"==typeof t?e.map(t):p(t)).map(String)},G=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,a=i(e,["items","keys"]);return t=p(void 0!==t?t:null),o({items:t,keys:Q(t,r)},a)};function Y(e,t){var n=function(){if(o){if(i>=r.length)return"break";a=r[i++]}else{if((i=r.next()).done)return"break";a=i.value}var n=a.key,c=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(c),e.current.deleted=e.current.deleted.filter(c))},r=e.current.deleted,o=Array.isArray(r),i=0;for(r=o?r:r[Symbol.iterator]();;){var a;if("break"===n())break}e.current.forceUpdate()}var Z=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof y||(t=v.transform(t)),n.payload=t,n}return u(t,e),t}(w),K={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},J="[-+]?\\d*\\.?\\d+";function X(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+X(J,J,J)),te=new RegExp("rgba"+X(J,J,J,J)),ne=new RegExp("hsl"+X(J,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+X(J,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",J)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{6})$/,ce=/^#([0-9a-fA-F]{8})$/;function ue(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=ue(o,r,e+1/3),a=ue(o,r,e),c=ue(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*c)<<8}function le(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function fe(e){return(parseFloat(e)%360+360)%360/360}function de(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function pe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ae.exec(t))?parseInt(n[1]+"ff",16)>>>0:K.hasOwnProperty(t)?K[t]:(n=ee.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|255)>>>0:(n=te.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|de(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ce.exec(t))?parseInt(n[1],16)>>>0:(n=ie.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(fe(n[1]),pe(n[2]),pe(n[3])))>>>0:(n=re.exec(t))?(se(fe(n[1]),pe(n[2]),pe(n[3]))|de(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ve=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,be=new RegExp("("+Object.keys(K).join("|")+")","g"),ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ge=["Webkit","Ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}ye=Object.keys(ye).reduce((function(e,t){return ge.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ye);var Oe={};R((function(e){return new Z(e)})),P("div"),x((function(e){var t=e.output.map((function(e){return e.replace(ve,me)})).map((function(e){return e.replace(be,me)})),n=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(he).map((function(t,r){return F(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(he,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),j(K),O((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,a=t.scrollLeft,c=i(t,["style","children","scrollTop","scrollLeft"]),u="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var l=0===s.indexOf("--"),f=we(s,n[s],l);"float"===s&&(s="cssFloat"),l?e.style.setProperty(s,f):e.style[s]=f}for(var d in c){var p=u?d:Oe[d]||(Oe[d]=d.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(p)&&e.setAttribute(p,c[d])}}),(function(e){return e}));var je,Ee,_e=(je=function(e){return a.forwardRef((function(t,n){var r=f(),u=a.useRef(!0),s=a.useRef(null),d=a.useRef(null),p=a.useCallback((function(e){var t=s.current;s.current=new M(e,(function(){var e=!1;d.current&&(e=v.fn(d.current,s.current.getAnimatedValue())),d.current&&!1!==e||r()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){u.current=!1,s.current&&s.current.detach()}}),[]),a.useImperativeHandle(n,(function(){return N(d,u,r)})),p(t);var m,h=s.current.getValue(),b=(h.scrollTop,h.scrollLeft,i(h,["scrollTop","scrollLeft"])),y=(m=e,!l.fun(m)||m.prototype instanceof c.Component?function(e){return d.current=function(e,t){return t&&(l.fun(t)?t(e):l.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return c.createElement(e,o({},b,{ref:y}))}))},void 0===(Ee=!1)&&(Ee=!0),function(e){return(l.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=Ee?t[0].toLowerCase()+t.substring(1):t;return e[n]=je(n),e}),je)}),ke=_e(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=_e,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=V,t.animated=ke,t.a=ke,t.interpolate=function(e,t,n){return e&&new B(e,t,n)},t.Globals=L,t.useSpring=function(e){var t=l.fun(e),n=$(1,t?e:[e]),r=n[0],o=n[1],i=n[2];return t?[r[0],o,i]:r},t.useTrail=function(e,t){var n=a.useRef(!1),r=l.fun(t),i=m(t),c=a.useRef(),u=$(e,(function(e,t){return 0===e&&(c.current=[]),c.current.push(t),o({},i,{config:m(i.config,e),attach:e>0&&function(){return c.current[e-1]}})})),s=u[0],f=u[1],d=u[2],p=a.useMemo((function(){return function(e){return f((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,a=c.current[r];return o({},e,{config:m(e.config||i.config,t),attach:a&&function(){return a}})}))}}),[e,i.reverse]);return a.useEffect((function(){n.current&&!r&&p(t)})),a.useEffect((function(){n.current=!0}),[]),r?[s,p,d]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),c=G(r),u=c.lazy,s=void 0!==u&&u,l=(c.unique,c.reset),d=void 0!==l&&l,p=(c.enter,c.leave,c.update,c.onDestroyed),h=(c.keys,c.items,c.onFrame),v=c.onRest,b=c.onStart,y=c.ref,g=i(c,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),w=f(),O=a.useRef(!1),j=a.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!O.current&&new Map,forceUpdate:w});return a.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(j.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(j.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(j.current.instances).map((function(e){return e[1]}))}}})),j.current=function(e,t){var n=e.first,r=e.prevProps,a=i(e,["first","prevProps"]),c=G(t),u=c.items,s=c.keys,l=c.initial,f=c.from,d=c.enter,p=c.leave,h=c.update,v=c.trail,b=void 0===v?0:v,y=c.unique,g=c.config,w=c.order,O=void 0===w?["enter","leave","update"]:w,j=G(r),E=j.keys,_=j.items,k=o({},a.current),x=[].concat(a.deleted),S=Object.keys(k),C=new Set(S),P=new Set(s),A=s.filter((function(e){return!C.has(e)})),T=a.transitions.filter((function(e){return!e.destroyed&&!P.has(e.originalKey)})).map((function(e){return e.originalKey})),N=s.filter((function(e){return C.has(e)})),R=-b;for(;O.length;){switch(O.shift()){case"enter":A.forEach((function(e,t){y&&x.find((function(t){return t.originalKey===e}))&&(x=x.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=u[r],i=n&&void 0!==l?"initial":"enter";k[e]={slot:i,originalKey:e,key:y?String(e):W++,item:o,trail:R+=b,config:m(g,o,i),from:m(n&&void 0!==l?l||{}:f,o),to:m(d,o)}}));break;case"leave":T.forEach((function(e){var t=E.indexOf(e),n=_[t];x.unshift(o({},k[e],{slot:"leave",destroyed:!0,left:E[Math.max(0,t-1)],right:E[Math.min(E.length,t+1)],trail:R+=b,config:m(g,n,"leave"),to:m(p,n)})),delete k[e]}));break;case"update":N.forEach((function(e){var t=s.indexOf(e),n=u[t];k[e]=o({},k[e],{item:n,slot:"update",trail:R+=b,config:m(g,n,"update"),to:m(h,n)})}))}}var L=s.map((function(e){return k[e]}));return x.forEach((function(e){var t,n=e.left,r=(e.right,i(e,["left","right"]));-1!==(t=L.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),L=[].concat(L.slice(0,t),[r],L.slice(t))})),o({},a,{changed:A.length||T.length||N.length,first:n&&0===A.length,transitions:L,current:k,deleted:x,prevProps:t})}(j.current,r),j.current.changed&&j.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,i=e.config,a=e.trail,c=e.key,u=e.item;j.current.instances.has(c)||j.current.instances.set(c,new H);var l=j.current.instances.get(c),f=o({},g,{to:r,from:n,config:i,ref:y,onRest:function(n){j.current.mounted&&(e.destroyed&&(y||s||Y(j,c),p&&p(u)),!Array.from(j.current.instances).some((function(e){return!e[1].idle}))&&(y||s)&&j.current.deleted.length>0&&Y(j),v&&v(u,t,n))},onStart:b&&function(){return b(u,t)},onFrame:h&&function(e){return h(u,t,e)},delay:a,reset:d&&"enter"===t});l.update(f),j.current.paused||l.start()})),a.useEffect((function(){return j.current.mounted=O.current=!0,function(){j.current.mounted=O.current=!1,Array.from(j.current.instances).map((function(e){return e[1].destroy()})),j.current.instances.clear()}}),[]),j.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:j.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=a.useRef();a.useEffect((function(){l.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var i=e.current;if(i){var a=i.controllers;if(a.length){var c=n*t[r];a.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+c})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=$},183:function(e,t,n){"use strict";(function(e){var r=n(10),o=n.n(r),i=n(38),a=n(1),c=n.n(a),u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:{};function s(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var l=o.a.createContext||function(e,t){var n,o,a,l="__create-react-context-"+((u[a="__global_unique_id__"]=(u[a]||0)+1)+"__"),f=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=s(t.props.value),t}Object(i.a)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[l]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((i=r)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?n=0:(n="function"==typeof t?t(r,o):1073741823,0!==(n|=0)&&this.emitter.set(e.value,n))}var i,a},r.render=function(){return this.props.children},n}(r.Component);f.childContextTypes=((n={})[l]=c.a.object.isRequired,n);var d=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(i.a)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?1073741823:t},r.componentDidMount=function(){this.context[l]&&this.context[l].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?1073741823:e},r.componentWillUnmount=function(){this.context[l]&&this.context[l].off(this.onUpdate)},r.getValue=function(){return this.context[l]?this.context[l].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return d.contextTypes=((o={})[l]=c.a.object,o),{Provider:f,Consumer:d}};t.a=l}).call(this,n(84))},184:function(e,t,n){var r=n(307);e.exports=p,e.exports.parse=i,e.exports.compile=function(e,t){return c(i(e,t),t)},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=d;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,a=0,c="",l=t&&t.delimiter||"/";null!=(n=o.exec(e));){var f=n[0],d=n[1],p=n.index;if(c+=e.slice(a,p),a=p+f.length,d)c+=d[1];else{var m=e[a],h=n[2],v=n[3],b=n[4],y=n[5],g=n[6],w=n[7];c&&(r.push(c),c="");var O=null!=h&&null!=m&&m!==h,j="+"===g||"*"===g,E="?"===g||"*"===g,_=n[2]||l,k=b||y;r.push({name:v||i++,prefix:h||"",delimiter:_,optional:E,repeat:j,partial:O,asterisk:!!w,pattern:k?s(k):w?".*":"[^"+u(_)+"]+?"})}}return a<e.length&&(c+=e.substr(a)),c&&r.push(c),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function c(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",f(t)));return function(t,o){for(var i="",c=t||{},u=(o||{}).pretty?a:encodeURIComponent,s=0;s<e.length;s++){var l=e[s];if("string"!=typeof l){var f,d=c[l.name];if(null==d){if(l.optional){l.partial&&(i+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(d)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(d)+"`");if(0===d.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var p=0;p<d.length;p++){if(f=u(d[p]),!n[s].test(f))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===p?l.prefix:l.delimiter)+f}}else{if(f=l.asterisk?encodeURI(d).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):u(d),!n[s].test(f))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+f+'"');i+=l.prefix+f}}else i+=l}return i}}function u(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function l(e,t){return e.keys=t,e}function f(e){return e&&e.sensitive?"":"i"}function d(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",c=0;c<e.length;c++){var s=e[c];if("string"==typeof s)a+=u(s);else{var d=u(s.prefix),p="(?:"+s.pattern+")";t.push(s),s.repeat&&(p+="(?:"+d+p+")*"),a+=p=s.optional?s.partial?d+"("+p+")?":"(?:"+d+"("+p+"))?":d+"("+p+")"}}var m=u(n.delimiter||"/"),h=a.slice(-m.length)===m;return o||(a=(h?a.slice(0,-m.length):a)+"(?:"+m+"(?=$))?"),a+=i?"$":o&&h?"":"(?="+m+"|$)",l(new RegExp("^"+a,f(n)),t)}function p(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(p(e[o],t,n).source);return l(new RegExp("(?:"+r.join("|")+")",f(n)),t)}(e,t,n):function(e,t,n){return d(i(e,n),t,n)}(e,t,n)}},19:function(e,t,n){var r=n(57),o=n(58),i=n(40),a=n(59);e.exports=function(e){return r(e)||o(e)||i(e)||a()}},196:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(3);function o(e,t){return Object(r.filter)(e,(function(e){var n=e.is_deleted,r=e.date_created_gmt,o=e.status;if(!n)return(!t||!r||new Date(r+"Z").getTime()>t)&&"unactioned"===o})).length}function i(e){return Object(r.filter)(e,(function(e){return!e.is_deleted})).length>0}},197:function(e,t,n){"use strict";var r=n(36),o=n(55),i=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,c=void 0===n?24:n,u=Object(o.a)(e,["icon","size"]);return Object(i.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:c,height:c},u))}},2:function(e,t){!function(){e.exports=this.wp.i18n}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},21:function(e,t){!function(){e.exports=this.wc.navigation}()},22:function(e,t){!function(){e.exports=this.wc.data}()},23:function(e,t){!function(){e.exports=this.wp.url}()},24:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},25:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return p})),n.d(t,"g",(function(){return m})),n.d(t,"h",(function(){return h})),n.d(t,"f",(function(){return v}));var r=n(31),o=n.n(r),i=n(2),a=["wcAdminSettings","preloadSettings"],c="object"===("undefined"==typeof wcSettings?"undefined":o()(wcSettings))?wcSettings:{},u=Object.keys(c).reduce((function(e,t){return a.includes(t)||(e[t]=c[t]),e}),{}),s=u.adminUrl,l=(u.countries,u.currency),f=u.locale,d=u.orderStatuses,p=(u.siteTitle,u.wcAssetUrl);function m(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e};if(a.includes(e))throw new Error(Object(i.__)("Mutable settings should be accessed via data store."));var r=u.hasOwnProperty(e)?u[e]:t;return n(r,t)}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e};if(a.includes(e))throw new Error(Object(i.__)("Mutable settings should be mutated via data store."));u[e]=n(t)}function v(e){return(s||"")+e}},26:function(e,t){!function(){e.exports=this.wp.apiFetch}()},27:function(e,t){!function(){e.exports=this.wc.tracks}()},277:function(e,t,n){"use strict";(function(e){var r=n(0),o=n(3),i=n(6),a=n.n(i),c=n(140),u=n(2),s=(n(278),n(4));t.a=Object(r.forwardRef)((function(t,n){var i=t.className,l=t.children,f=t.spokenMessage,d=void 0===f?l:f,p=t.politeness,m=void 0===p?"polite":p,h=t.actions,v=void 0===h?[]:h,b=t.onRemove,y=void 0===b?o.noop:b,g=t.icon,w=void 0===g?null:g,O=t.explicitDismiss,j=void 0!==O&&O,E=t.onDismiss,_=void 0===E?null:E;function k(e){e&&e.preventDefault&&e.preventDefault(),_(),y()}_=_||o.noop,function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(c.a)(n,t)}),[n,t])}(d,m),Object(r.useEffect)((function(){var e=setTimeout((function(){j||(_(),y())}),1e4);return function(){return clearTimeout(e)}}),[j,_,y]);var x=a()(i,"components-snackbar",{"components-snackbar-explicit-dismiss":!!j});v&&v.length>1&&(void 0!==e&&e.env,v=[v[0]]);var S=a()("components-snackbar__content",{"components-snackbar__content-with-icon":!!w});return Object(r.createElement)("div",{ref:n,className:x,onClick:j?o.noop:k,tabIndex:"0",role:j?"":"button",onKeyPress:j?o.noop:k,"aria-label":j?"":Object(u.__)("Dismiss this notice")},Object(r.createElement)("div",{className:S},w&&Object(r.createElement)("div",{className:"components-snackbar__icon"},w),l,v.map((function(e,t){var n=e.label,o=e.onClick,i=e.url;return Object(r.createElement)(s.Button,{key:t,href:i,isTertiary:!0,onClick:function(e){return function(e,t){e.stopPropagation(),y(),t&&t(e)}(e,o)},className:"components-snackbar__action"},n)})),j&&Object(r.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:k,onKeyPress:k},"✕")))}))}).call(this,n(125))},278:function(e,t,n){"use strict";(function(e){function r(t){void 0!==e&&e.env}n.d(t,"a",(function(){return r}))}).call(this,n(125))},279:function(e,t){!function(){e.exports=this.wc.customerEffortScore}()},286:function(e,t,n){"use strict";n.d(t,"a",(function(){return q}));var r={};n.r(r),n.d(r,"setCesSurveyQueue",(function(){return P})),n.d(r,"addCesSurvey",(function(){return A})),n.d(r,"addCesSurveyForAnalytics",(function(){return T}));var o={};n.r(o),n.d(o,"getCesSurveyQueue",(function(){return M}));var i={};n.r(i),n.d(i,"getCesSurveyQueue",(function(){return I}));var a=n(19),c=n.n(a),u=n(5),s=n.n(u),l=n(18),f=n.n(l),d=n(0),p=n(1),m=n.n(p),h=n(27),v=n(279),b=n.n(v),y=n(20),g=n(11),w=n(22),O=n(2);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e){var t=e.action,n=e.trackProps,r=e.label,o=e.onSubmitLabel,i=void 0===o?Object(O.__)("Thank you for your feedback!","woocommerce-admin"):o,a=e.cesShownForActions,u=e.allowTracking,l=e.resolving,p=e.storeAgeInWeeks,m=e.updateOptions,v=e.createNotice,y=Object(d.useState)(!1),g=f()(y,2),w=g[0],j=g[1];if(l)return null;if(!u)return null;if(-1!==a.indexOf(t)&&!w)return null;var _=function(){m(s()({},"woocommerce_ces_shown_for_actions",[t].concat(c()(a))))};return Object(d.createElement)(b.a,{recordScoreCallback:function(e,r){Object(h.recordEvent)("ces_feedback",E({action:t,score:e,comments:r||"",store_age:p},n)),v("success",i)},label:r,onNoticeShownCallback:function(){Object(h.recordEvent)("ces_snackbar_view",E({action:t,store_age:p},n))},onNoticeDismissedCallback:function(){Object(h.recordEvent)("ces_snackbar_dismiss",E({action:t,store_age:p},n)),_()},onModalShownCallback:function(){j(!0),Object(h.recordEvent)("ces_view",E({action:t,store_age:p},n)),_()},icon:Object(d.createElement)("span",{style:{height:21,width:21},role:"img","aria-label":Object(O.__)("Pencil icon","woocommerce-admin")},"✏️")})}_.propTypes={action:m.a.string.isRequired,trackProps:m.a.object,label:m.a.string.isRequired,onSubmitLabel:m.a.string,cesShownForActions:m.a.arrayOf(m.a.string).isRequired,allowTracking:m.a.bool,resolving:m.a.bool.isRequired,storeAgeInWeeks:m.a.number,updateOptions:m.a.func,createNotice:m.a.func};var k=Object(y.compose)(Object(g.withSelect)((function(e){var t=e(w.OPTIONS_STORE_NAME),n=t.getOption,r=t.isResolving,o=n("woocommerce_ces_shown_for_actions")||[],i=function(e){if(0===e)return null;var t=Date.now()-1e3*e;return Math.round(t/w.WEEK)}(n("woocommerce_admin_install_timestamp")||0);return{cesShownForActions:o,allowTracking:"yes"===(n("woocommerce_allow_tracking")||"no"),storeAgeInWeeks:i,resolving:r("getOption",["woocommerce_ces_shown_for_actions"])||null===i||r("getOption",["woocommerce_admin_install_timestamp"])||r("getOption",["woocommerce_allow_tracking"])}})),Object(g.withDispatch)((function(e){return{updateOptions:e(w.OPTIONS_STORE_NAME).updateOptions,createNotice:e("core/notices").createNotice}})))(_),x=n(76),S=n(17),C={SET_CES_SURVEY_QUEUE:"SET_CES_SURVEY_QUEUE",ADD_CES_SURVEY:"ADD_CES_SURVEY"};function P(e){return{type:C.SET_CES_SURVEY_QUEUE,queue:e}}function A(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.pagenow,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window.adminpage,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;return{type:C.ADD_CES_SURVEY,action:e,label:t,pageNow:n,adminPage:r,onsubmit_label:o}}function T(){return A("analytics_filtered",Object(O.__)("How easy was it to filter your store analytics?","woocommerce-admin"),"woocommerce_page_wc-admin","woocommerce_page_wc-admin")}var N=n(8),R=n.n(N),L=R.a.mark(M);function M(){var e;return R.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(S.apiFetch)({path:"".concat(x.a,"/options?options=").concat(x.b)});case 2:if(!(e=t.sent)){t.next=8;break}return t.next=6,P(e[x.b]||[]);case 6:t.next=9;break;case 8:throw new Error;case 9:case"end":return t.stop()}}),L)}function I(e){return e.queue}function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var F={queue:[]},B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case C.SET_CES_SURVEY_QUEUE:return V(V({},e),{},{queue:t.queue});case C.ADD_CES_SURVEY:var n=e.queue.filter((function(e){return e.action===t.action}));if(n.length)return e;var r={action:t.action,label:t.label,pagenow:t.pageNow,adminpage:t.adminPage,onSubmitLabel:t.onSubmitLabel};return V(V({},e),{},{queue:[].concat(c()(e.queue),[r])});default:return e}};Object(g.registerStore)(x.c,{actions:r,selectors:i,resolvers:o,controls:S.controls,reducer:B});function U(e){var t=e.queue,n=e.resolving,r=e.clearQueue;if(n)return null;var o=t.filter((function(e){return e.pagenow===window.pagenow&&e.adminpage===window.adminpage}));return o.length&&r(),Object(d.createElement)(d.Fragment,null,o.map((function(e,t){return Object(d.createElement)(k,{key:t,action:e.action,label:e.label,onSubmitLabel:e.onsubmit_label,trackProps:e.props||{}})})))}U.propTypes={queue:m.a.arrayOf(m.a.object),resolving:m.a.bool,clearQueue:m.a.func};var q=Object(y.compose)(Object(g.withSelect)((function(e){var t=e(x.c),n=t.getCesSurveyQueue,r=t.isResolving;return{queue:n(),resolving:r("getOption",[x.b])}})),Object(g.withDispatch)((function(e){var t=e(w.OPTIONS_STORE_NAME).updateOptions;return{clearQueue:function(){t({woocommerce_clear_ces_tracks_queue_for_page:{pagenow:window.pagenow,adminpage:window.adminpage}})}}})))(U)},29:function(e,t){!function(){e.exports=this.wc.date}()},294:function(e,t,n){"use strict";n.r(t),function(e){var t=n(0),r=(n(469),n(22)),o=(n(296),n(141)),i=n(286);n.p=e.wcAdminAssets.path;var a,c=document.getElementById("root"),u=document.getElementById("woocommerce-embedded-root"),s=window.wcSettings.currentUserData;if(c){var l=Object(r.withSettingsHydration)("wc_admin",window.wcSettings)(o.b);window.wcSettings.preloadSettings&&window.wcSettings.preloadSettings.general&&(l=Object(r.withSettingsHydration)("general",{general:window.wcSettings.preloadSettings.general})(l)),s&&(l=Object(r.withCurrentUserHydration)(s)(l)),Object(t.render)(Object(t.createElement)(l,null),c)}else if(u){var f=Object(r.withSettingsHydration)("wc_admin",window.wcSettings)(o.a);s&&(f=Object(r.withCurrentUserHydration)(s)(f)),Object(t.render)(Object(t.createElement)(f,null),u),u.classList.remove("is-embed-loading");var d=document.getElementById("wpbody-content"),p=d.querySelector(".wrap.woocommerce")||d.querySelector('[class="wrap"]'),m=document.createElement("div");Object(t.render)(Object(t.createElement)("div",{className:"woocommerce-layout"},Object(t.createElement)(o.c,null)),d.insertBefore(m,p))}window.wcAdminFeatures&&!0===window.wcAdminFeatures["customer-effort-score-tracks"]&&(a=c||u,Object(t.render)(Object(t.createElement)(i.a,null),a.insertBefore(document.createElement("div"),null)))}.call(this,n(84))},296:function(e,t,n){},297:function(e,t,n){},298:function(e,t,n){},299:function(e,t,n){},3:function(e,t){!function(){e.exports=this.lodash}()},30:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return s}));var r=n(4),o=r.Navigation||r.__experimentalNavigation,i=(r.NavigationBackButton||r.__experimentalNavigationBackButton,r.NavigationGroup||r.__experimentalNavigationGroup),a=r.NavigationMenu||r.__experimentalNavigationMenu,c=r.NavigationItem||r.__experimentalNavigationItem,u=r.Text||r.__experimentalText,s=r.useSlot||r.__experimentalUseSlot},300:function(e,t,n){},301:function(e,t,n){},302:function(e,t,n){},303:function(e,t,n){},304:function(e,t,n){},305:function(e,t,n){var r=n(72);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}},306:function(e,t,n){},307:function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},31:function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},32:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},34:function(e,t,n){var r=n(97);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},36:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},37:function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},38:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,"a",(function(){return o}))},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t,n){var r=n(37);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},41:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},42:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},43:function(e,t){!function(){e.exports=this.wp.hooks}()},44:function(e,t){function n(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function c(e){n(a,o,i,c,u,"next",e)}function u(e){n(a,o,i,c,u,"throw",e)}c(void 0)}))}}},469:function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"createNotice",(function(){return h})),n.d(r,"createSuccessNotice",(function(){return v})),n.d(r,"createInfoNotice",(function(){return b})),n.d(r,"createErrorNotice",(function(){return y})),n.d(r,"createWarningNotice",(function(){return g})),n.d(r,"removeNotice",(function(){return w}));var o={};n.r(o),n.d(o,"getNotices",(function(){return j}));var i=n(11),a=n(82),c=n(3),u=n(36);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e){return function(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=r[e];if(void 0===o)return n;var i=t(n[o],r);return i===n[o]?n:l({},n,Object(u.a)({},o,i))}}}("context")((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CREATE_NOTICE":return[].concat(Object(a.a)(Object(c.reject)(e,{id:t.notice.id})),[t.notice]);case"REMOVE_NOTICE":return Object(c.reject)(e,{id:t.id})}return e})),d=n(8),p=n.n(d),m=p.a.mark(h);function h(){var e,t,n,r,o,i,a,u,s,l,f,d,h,v,b,y,g=arguments;return p.a.wrap((function(p){for(;;)switch(p.prev=p.next){case 0:if(e=g.length>0&&void 0!==g[0]?g[0]:"info",t=g.length>1?g[1]:void 0,n=g.length>2&&void 0!==g[2]?g[2]:{},r=n.speak,o=void 0===r||r,i=n.isDismissible,a=void 0===i||i,u=n.context,s=void 0===u?"global":u,l=n.id,f=void 0===l?Object(c.uniqueId)(s):l,d=n.actions,h=void 0===d?[]:d,v=n.type,b=void 0===v?"default":v,y=n.__unstableHTML,t=String(t),!o){p.next=8;break}return p.next=8,{type:"SPEAK",message:t,ariaLive:"snackbar"===b?"polite":"assertive"};case 8:return p.next=10,{type:"CREATE_NOTICE",context:s,notice:{id:f,status:e,content:t,__unstableHTML:y,isDismissible:a,actions:h,type:b}};case 10:case"end":return p.stop()}}),m)}function v(e,t){return h("success",e,t)}function b(e,t){return h("info",e,t)}function y(e,t){return h("error",e,t)}function g(e,t){return h("warning",e,t)}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";return{type:"REMOVE_NOTICE",id:e,context:t}}var O=[];function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";return e[t]||O}var E=n(140),_={SPEAK:function(e){Object(E.a)(e.message,e.ariaLive||"assertive")}};Object(i.registerStore)("core/notices",{reducer:f,actions:r,selectors:o,controls:_})},47:function(e,t){!function(){e.exports=this.wc.components}()},481:function(e,t){!function(){e.exports=this.wc.csvExport}()},49:function(e,t,n){"use strict";var r=n(90),o=n(91),i=n(52);e.exports={formats:i,parse:o,stringify:r}},497:function(e,t,n){"use strict";var r=n(0),o=n(67),i=Object(r.createElement)(o.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.a,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=i},5:function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},50:function(e,t){!function(){e.exports=this.ReactDOM}()},52:function(e,t,n){"use strict";var r=String.prototype.replace,o=/%20/g,i="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return r.call(e,o,"+")},RFC3986:function(e){return String(e)}},RFC1738:i,RFC3986:a}},54:function(e,t,n){"use strict";function r(e){"complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",e):e()}n.d(t,"a",(function(){return r}))},55:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(42);function o(e,t){if(null==e)return{};var n,o,i=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},56:function(e,t,n){"use strict";t.a=function(e,t){if(!e)throw new Error("Invariant failed")}},57:function(e,t,n){var r=n(37);e.exports=function(e){if(Array.isArray(e))return r(e)}},58:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},59:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},6:function(e,t,n){!function(){"use strict";var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)&&o.length){var a=n.apply(null,o);a&&e.push(a)}else if("object"===i)for(var c in o)t.call(o,c)&&o[c]&&e.push(c)}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],(function(){return n})):window.classNames=n}()},60:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},61:function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}},62:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},67:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return f}));var r=n(36),o=n(55),i=n(6),a=n.n(i),c=n(0);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=function(e){return Object(c.createElement)("path",e)},f=function(e){var t=e.className,n=e.isPressed,r=s(s({},Object(o.a)(e,["className","isPressed"])),{},{className:a()(t,{"is-pressed":n})||void 0,role:"img","aria-hidden":!0,focusable:!1});return Object(c.createElement)("svg",r)}},68:function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new E(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===l)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=s(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var l={};function f(){}function d(){}function p(){}var m={};m[o]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(_([])));v&&v!==t&&n.call(v,o)&&(m=v);var b=p.prototype=f.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var r;this._invoke=function(o,i){function a(){return new t((function(r,a){!function r(o,i,a,c){var u=s(e[o],e,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function _(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=b.constructor=p,p.constructor=d,d.displayName=c(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,a,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},y(g.prototype),g.prototype[i]=function(){return this},e.AsyncIterator=g,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new g(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(b),c(b,a,"Generator"),b[o]=function(){return this},b.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=_,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},69:function(e,t,n){"use strict";var r=n(52),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],a=o.obj[o.prop],c=Object.keys(a),u=0;u<c.length;++u){var s=c[u],l=a[s];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(t.push({obj:a,prop:s}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,o,i){if(0===e.length)return e;var c=e;if("symbol"==typeof e?c=Symbol.prototype.toString.call(e):"string"!=typeof e&&(c=String(e)),"iso-8859-1"===n)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",s=0;s<c.length;++s){var l=c.charCodeAt(s);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===r.RFC1738&&(40===l||41===l)?u+=c.charAt(s):l<128?u+=a[l]:l<2048?u+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?u+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(s+=1,l=65536+((1023&l)<<10|1023&c.charCodeAt(s)),u+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(i(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!o.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return i(t)&&!i(n)&&(a=c(t,r)),i(t)&&i(n)?(n.forEach((function(n,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&n&&"object"==typeof n?t[i]=e(a,n,r):t.push(n)}else t[i]=n})),t):Object.keys(n).reduce((function(t,i){var a=n[i];return o.call(t,i)?t[i]=e(t[i],a,r):t[i]=a,t}),a)}}},7:function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},70:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},71:function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"c",(function(){return j})),n.d(t,"b",(function(){return m})),n.d(t,"e",(function(){return h})),n.d(t,"d",(function(){return p}));var r=n(32);function o(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}var a=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],c=e&&o(e),u=t&&o(t),s=c||u;if(e&&o(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var l=a[a.length-1];n="."===l||".."===l||""===l}else n=!1;for(var f=0,d=a.length;d>=0;d--){var p=a[d];"."===p?i(a,d):".."===p?(i(a,d),f++):f&&(i(a,d),f--)}if(!s)for(;f--;f)a.unshift("..");!s||""===a[0]||a[0]&&o(a[0])||a.unshift("");var m=a.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};function c(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=c(t),o=c(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},s=n(56);function l(e){return"/"===e.charAt(0)?e:"/"+e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function m(e,t,n,o){var i;"string"==typeof e?(i=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=Object(r.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(i.key=n),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function h(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var b=!("undefined"==typeof window||!window.document||!window.document.createElement);function y(e,t){t(window.confirm(e))}function g(){try{return window.history.state||{}}catch(e){return{}}}function w(e){void 0===e&&(e={}),b||Object(s.a)(!1);var t,n=window.history,o=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=e,c=a.forceRefresh,u=void 0!==c&&c,h=a.getUserConfirmation,w=void 0===h?y:h,O=a.keyLength,j=void 0===O?6:O,E=e.basename?d(l(e.basename)):"";function _(e){var t=e||{},n=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return E&&(i=f(i,E)),m(i,r,n)}function k(){return Math.random().toString(36).substr(2,j)}var x=v();function S(e){Object(r.a)(F,e),F.length=n.length,x.notifyListeners(F.location,F.action)}function C(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||T(_(e.state))}function P(){T(_(g()))}var A=!1;function T(e){if(A)A=!1,S();else{x.confirmTransitionTo(e,"POP",w,(function(t){t?S({action:"POP",location:e}):function(e){var t=F.location,n=R.indexOf(t.key);-1===n&&(n=0);var r=R.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(A=!0,M(o))}(e)}))}}var N=_(g()),R=[N.key];function L(e){return E+p(e)}function M(e){n.go(e)}var I=0;function D(e){1===(I+=e)&&1===e?(window.addEventListener("popstate",C),i&&window.addEventListener("hashchange",P)):0===I&&(window.removeEventListener("popstate",C),i&&window.removeEventListener("hashchange",P))}var V=!1;var F={length:n.length,action:"POP",location:N,createHref:L,push:function(e,t){var r=m(e,t,k(),F.location);x.confirmTransitionTo(r,"PUSH",w,(function(e){if(e){var t=L(r),i=r.key,a=r.state;if(o)if(n.pushState({key:i,state:a},null,t),u)window.location.href=t;else{var c=R.indexOf(F.location.key),s=R.slice(0,c+1);s.push(r.key),R=s,S({action:"PUSH",location:r})}else window.location.href=t}}))},replace:function(e,t){var r=m(e,t,k(),F.location);x.confirmTransitionTo(r,"REPLACE",w,(function(e){if(e){var t=L(r),i=r.key,a=r.state;if(o)if(n.replaceState({key:i,state:a},null,t),u)window.location.replace(t);else{var c=R.indexOf(F.location.key);-1!==c&&(R[c]=r.key),S({action:"REPLACE",location:r})}else window.location.replace(t)}}))},go:M,goBack:function(){M(-1)},goForward:function(){M(1)},block:function(e){void 0===e&&(e=!1);var t=x.setPrompt(e);return V||(D(1),V=!0),function(){return V&&(V=!1,D(-1)),t()}},listen:function(e){var t=x.appendListener(e);return D(1),function(){D(-1),t()}}};return F}function O(e,t,n){return Math.min(Math.max(e,t),n)}function j(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,o=t.initialEntries,i=void 0===o?["/"]:o,a=t.initialIndex,c=void 0===a?0:a,u=t.keyLength,s=void 0===u?6:u,l=v();function f(e){Object(r.a)(w,e),w.length=w.entries.length,l.notifyListeners(w.location,w.action)}function d(){return Math.random().toString(36).substr(2,s)}var h=O(c,0,i.length-1),b=i.map((function(e){return m(e,void 0,"string"==typeof e?d():e.key||d())})),y=p;function g(e){var t=O(w.index+e,0,w.entries.length-1),r=w.entries[t];l.confirmTransitionTo(r,"POP",n,(function(e){e?f({action:"POP",location:r,index:t}):f()}))}var w={length:b.length,action:"POP",location:b[h],index:h,entries:b,createHref:y,push:function(e,t){var r=m(e,t,d(),w.location);l.confirmTransitionTo(r,"PUSH",n,(function(e){if(e){var t=w.index+1,n=w.entries.slice(0);n.length>t?n.splice(t,n.length-t,r):n.push(r),f({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=m(e,t,d(),w.location);l.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(w.entries[w.index]=r,f({action:"REPLACE",location:r}))}))},go:g,goBack:function(){g(-1)},goForward:function(){g(1)},canGo:function(e){var t=w.index+e;return t>=0&&t<w.entries.length},block:function(e){return void 0===e&&(e=!1),l.setPrompt(e)},listen:function(e){return l.appendListener(e)}};return w}},72:function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},75:function(e,t){!function(){e.exports=this.wp.date}()},76:function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r="wc/customer-effort-score",o="/wc-admin",i="woocommerce_ces_tracks_queue"},77:function(e,t,n){"use strict";var r=n(78);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},78:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},8:function(e,t,n){e.exports=n(68)},82:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(70);var o=n(94);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},84:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},9:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},90:function(e,t,n){"use strict";var r=n(69),o=n(52),i=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,u=Array.prototype.push,s=function(e,t){u.apply(e,c(t)?t:[t])},l=Date.prototype.toISOString,f=o.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,n,o,i,a,u,l,f,p,m,h,v,b,y){var g,w=t;if("function"==typeof l?w=l(n,w):w instanceof Date?w=m(w):"comma"===o&&c(w)&&(w=r.maybeMap(w,(function(e){return e instanceof Date?m(e):e}))),null===w){if(i)return u&&!b?u(n,d.encoder,y,"key",h):n;w=""}if("string"==typeof(g=w)||"number"==typeof g||"boolean"==typeof g||"symbol"==typeof g||"bigint"==typeof g||r.isBuffer(w))return u?[v(b?n:u(n,d.encoder,y,"key",h))+"="+v(u(w,d.encoder,y,"value",h))]:[v(n)+"="+v(String(w))];var O,j=[];if(void 0===w)return j;if("comma"===o&&c(w))O=[{value:w.length>0?w.join(",")||null:void 0}];else if(c(l))O=l;else{var E=Object.keys(w);O=f?E.sort(f):E}for(var _=0;_<O.length;++_){var k=O[_],x="object"==typeof k&&void 0!==k.value?k.value:w[k];if(!a||null!==x){var S=c(w)?"function"==typeof o?o(n,k):n:n+(p?"."+k:"["+k+"]");s(j,e(x,S,o,i,a,u,l,f,p,m,h,v,b,y))}}return j};e.exports=function(e,t){var n,r=e,u=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!i.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],a=d.filter;return("function"==typeof e.filter||c(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:void 0===e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:a,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof u.filter?r=(0,u.filter)("",r):c(u.filter)&&(n=u.filter);var l,f=[];if("object"!=typeof r||null===r)return"";l=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var m=a[l];n||(n=Object.keys(r)),u.sort&&n.sort(u.sort);for(var h=0;h<n.length;++h){var v=n[h];u.skipNulls&&null===r[v]||s(f,p(r[v],v,m,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset))}var b=f.join(u.delimiter),y=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),b.length>0?y+b:""}},91:function(e,t,n){"use strict";var r=n(69),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},s=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,c=n.depth>0&&/(\[[^[\]]*])/.exec(i),s=c?i.slice(0,c.index):i,l=[];if(s){if(!n.plainObjects&&o.call(Object.prototype,s)&&!n.allowPrototypes)return;l.push(s)}for(var f=0;n.depth>0&&null!==(c=a.exec(i))&&f<n.depth;){if(f+=1,!n.plainObjects&&o.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(c[1])}return c&&l.push("["+i.slice(c.index)+"]"),function(e,t,n,r){for(var o=r?t:u(t,n),i=e.length-1;i>=0;--i){var a,c=e[i];if("[]"===c&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var s="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,l=parseInt(s,10);n.parseArrays||""!==s?!isNaN(l)&&c!==s&&String(l)===s&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=o:a[s]=o:a={0:o}}o=a}return o}(l,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var n,s={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=l.split(t.delimiter,f),p=-1,m=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?m="utf-8":"utf8=%26%2310003%3B"===d[n]&&(m="iso-8859-1"),p=n,n=d.length);for(n=0;n<d.length;++n)if(n!==p){var h,v,b=d[n],y=b.indexOf("]="),g=-1===y?b.indexOf("="):y+1;-1===g?(h=t.decoder(b,a.decoder,m,"key"),v=t.strictNullHandling?null:""):(h=t.decoder(b.slice(0,g),a.decoder,m,"key"),v=r.maybeMap(u(b.slice(g+1),t),(function(e){return t.decoder(e,a.decoder,m,"value")}))),v&&t.interpretNumericEntities&&"iso-8859-1"===m&&(v=c(v)),b.indexOf("[]=")>-1&&(v=i(v)?[v]:v),o.call(s,h)?s[h]=r.combine(s[h],v):s[h]=v}return s}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(l),p=0;p<d.length;++p){var m=d[p],h=s(m,l[m],n,"string"==typeof e);f=r.merge(f,h,n)}return r.compact(f)}},94:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(70);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},95:function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"a",(function(){return f})),n.d(t,"d",(function(){return p})),n.d(t,"f",(function(){return m}));var r=n(19),o=n.n(r),i=n(41),a=n(3),c=n(25);function u(e){return e?e.split(":")[0]:null}function s(e){var t=u(e);return Object(a.without)(Object(c.g)("onboarding",{euCountries:[]}).euCountries,"GB").includes(t)&&(t="EU"),t}function l(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=d(e,t,n),o=r.map((function(e){return e.id||e.product}));return o}function f(e,t){var n={};n.products=d(e,!0,t),n.remainingProducts=d(e,!1,t);var r=o()(new Set([].concat(o()(n.products),o()(n.remainingProducts))));return n.uniqueItemsList=r.map((function(e){return e.label?{type:"extension",name:e.label}:{type:"theme",name:e.title}})),n}function d(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=Object(c.g)("onboarding",{}),o=[];if(!r.productTypes)return o;var i=e.product_types||[];i.forEach((function(e){r.productTypes[e]&&r.productTypes[e].product&&(t||!n.includes(r.productTypes[e].slug))&&o.push(r.productTypes[e])}));var a=r.themes.find((function(t){return t.slug===e.theme}));return a&&a.id&&p(a.price)>0&&(t||!a.is_installed)&&o.push(a),o}function p(e){return Number(Object(i.decodeEntities)(e).replace(/[^0-9.-]+/g,""))}function m(e){return/admin.php\?page=wc-admin/.test(e)}},97:function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}}});
|
1 |
/*! For license information please see index.min.js.LICENSE.txt */
|
2 |
+
this.wc=this.wc||{},this.wc.app=function(e){function t(t){for(var n,r,i=t[0],a=t[1],c=0,u=[];c<i.length;c++)r=i[c],Object.prototype.hasOwnProperty.call(o,r)&&o[r]&&u.push(o[r][0]),o[r]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(l&&l(t);u.length;)u.shift()()}var n={},r={21:0},o={21:0};function i(e){var t=function(e){return a.p+"chunks/"+({7:"activity-panels-help",8:"activity-panels-inbox",9:"analytics-report",10:"analytics-report-categories",11:"analytics-report-coupons",12:"analytics-report-customers",13:"analytics-report-downloads",14:"analytics-report-orders",15:"analytics-report-products",16:"analytics-report-revenue",17:"analytics-report-stock",18:"analytics-report-taxes",19:"analytics-report-variations",20:"analytics-settings",27:"customizable-dashboard",28:"dashboard",29:"dashboard-charts",32:"homescreen",34:"leaderboards",36:"marketing-overview",46:"profile-wizard",47:"store-alerts",48:"store-performance",49:"task-list",51:"wcpay-usage-modal"}[e]||e)+".min.js"}(e);return window.wcAdminAssets&&window.wcAdminAssets.version&&(t+="?ver="+window.wcAdminAssets.version),t}function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[];r[e]?t.push(r[e]):0!==r[e]&&{0:1,3:1,4:1,7:1,9:1,14:1,20:1,28:1,29:1,32:1,34:1,36:1,46:1,47:1,48:1,49:1}[e]&&t.push(r[e]=new Promise((function(t,n){for(var o="rtl"===document.dir?"./chunks/"+e+".style.rtl.css":"./chunks/"+e+".style.css",i=a.p+o,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var s=(f=c[u]).getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(s===o||s===i))return t()}var l=document.getElementsByTagName("style");for(u=0;u<l.length;u++){var f;if((s=(f=l[u]).getAttribute("data-href"))===o||s===i)return t()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.setAttribute("data-webpack",!0),d.onload=t,d.onerror=function(t){var o=t&&t.target&&t.target.src||i,a=new Error("Loading CSS chunk "+e+" failed.\n("+o+")");a.code="CSS_CHUNK_LOAD_FAILED",a.request=o,delete r[e],d.parentNode.removeChild(d),n(a)},d.href=i,window.wcAdminAssets&&window.wcAdminAssets.version&&(d.href+="?ver="+window.wcAdminAssets.version),document.getElementsByTagName("head")[0].appendChild(d)})).then((function(){r[e]=0})));var n=o[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,r){n=o[e]=[t,r]}));t.push(n[2]=c);var u,s=document.createElement("script");s.charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.src=i(e);var l=new Error;u=function(t){s.onerror=s.onload=null,clearTimeout(f);var n=o[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+r+": "+i+")",l.name="ChunkLoadError",l.type=r,l.request=i,n[1](l)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:s})}),12e4);s.onerror=s.onload=u,document.head.appendChild(s)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var c=window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[],u=c.push.bind(c);c.push=t,c=c.slice();for(var s=0;s<c.length;s++)t(c[s]);var l=u;return a(a.s=294)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t,n){e.exports=n(77)()},10:function(e,t){!function(){e.exports=this.React}()},11:function(e,t){!function(){e.exports=this.wp.data}()},111:function(e,t){!function(){e.exports=this.wc.currency}()},12:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},121:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r={};n.r(r),n.d(r,"find",(function(){return c}));var o={};n.r(o),n.d(o,"isTabbableIndex",(function(){return l})),n.d(o,"find",(function(){return h})),n.d(o,"findPrevious",(function(){return v})),n.d(o,"findNext",(function(){return b}));var i=["[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])","iframe","object","embed","area[href]","[contenteditable]:not([contenteditable=false])"].join(",");function a(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0}function c(e){var t=e.querySelectorAll(i);return Array.from(t).filter((function(e){return!(!a(e)||function(e){return"iframe"===e.nodeName.toLowerCase()&&"-1"===e.getAttribute("tabindex")}(e))&&("AREA"!==e.nodeName||function(e){var t=e.closest("map[name]");if(!t)return!1;var n=e.ownerDocument.querySelector('img[usemap="#'+t.name+'"]');return!!n&&a(n)}(e))}))}var u=n(3);function s(e){var t=e.getAttribute("tabindex");return null===t?0:parseInt(t,10)}function l(e){return-1!==s(e)}function f(e,t){return{element:e,index:t}}function d(e){return e.element}function p(e,t){var n=s(e.element),r=s(t.element);return n===r?e.index-t.index:n-r}function m(e){return e.filter(l).map(f).sort(p).map(d).reduce((t={},function(e,n){var r=n.nodeName,o=n.type,i=n.checked,a=n.name;if("INPUT"!==r||"radio"!==o||!a)return e.concat(n);var c=t.hasOwnProperty(a);if(!i&&c)return e;if(c){var s=t[a];e=Object(u.without)(e,s)}return t[a]=n,e.concat(n)}),[]);var t}function h(e){return m(c(e))}function v(e){var t=c(e.ownerDocument.body),n=t.indexOf(e);return t.length=n,Object(u.last)(m(t))}function b(e){var t=c(e.ownerDocument.body),n=t.indexOf(e),r=t.slice(n+1).filter((function(t){return!e.contains(t)}));return Object(u.first)(m(r))}var y={focusable:r,tabbable:o}},122:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,i=(e.icon,e.className),c=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),u=["gridicon","gridicons-cross-small",i,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:u,height:n,width:n,onClick:o},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"})))};var o,i=n(10),a=(o=i)&&o.__esModule?o:{default:o};e.exports=t.default},125:function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,s=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&p())}function p(){if(!l){var e=c(d);l=!0;for(var t=s.length;t;){for(u=s,s=[];++f<t;)u&&u[f].run();f=-1,t=s.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new m(e,t)),1!==s.length||l||c(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},126:function(e,t,n){"use strict";e.exports=n(152)},13:function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},137:function(e,t,n){"use strict";var r=n(2),o=n(43),i=n(25),a=n(0),c=Object(i.g)("manageStock","no"),u=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(16)]).then(n.bind(null,486))})),s=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(3),n.e(15)]).then(n.bind(null,482))})),l=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(19)]).then(n.bind(null,487))})),f=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(6),n.e(14)]).then(n.bind(null,488))})),d=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(3),n.e(10)]).then(n.bind(null,484))})),p=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(11)]).then(n.bind(null,489))})),m=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(18)]).then(n.bind(null,490))})),h=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(13)]).then(n.bind(null,491))})),v=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(17)]).then(n.bind(null,483))})),b=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(12)]).then(n.bind(null,485))}));t.a=function(){var e=[{report:"revenue",title:Object(r.__)("Revenue","woocommerce-admin"),component:u,navArgs:{id:"woocommerce-analytics-revenue"}},{report:"products",title:Object(r.__)("Products","woocommerce-admin"),component:s,navArgs:{id:"woocommerce-analytics-products"}},{report:"variations",title:Object(r.__)("Variations","woocommerce-admin"),component:l,navArgs:{id:"woocommerce-analytics-variations"}},{report:"orders",title:Object(r.__)("Orders","woocommerce-admin"),component:f,navArgs:{id:"woocommerce-analytics-orders"}},{report:"categories",title:Object(r.__)("Categories","woocommerce-admin"),component:d,navArgs:{id:"woocommerce-analytics-categories"}},{report:"coupons",title:Object(r.__)("Coupons","woocommerce-admin"),component:p,navArgs:{id:"woocommerce-analytics-coupons"}},{report:"taxes",title:Object(r.__)("Taxes","woocommerce-admin"),component:m,navArgs:{id:"woocommerce-analytics-taxes"}},"yes"===c?{report:"stock",title:Object(r.__)("Stock","woocommerce-admin"),component:v,navArgs:{id:"woocommerce-analytics-stock"}}:null,{report:"customers",title:Object(r.__)("Customers","woocommerce-admin"),component:b},{report:"downloads",title:Object(r.__)("Downloads","woocommerce-admin"),component:h,navArgs:{id:"woocommerce-analytics-downloads"}}].filter(Boolean);return Object(o.applyFilters)("woocommerce_admin_reports_list",e)}},138:function(e,t,n){"use strict";var r=n(126),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function u(e){return r.isMemo(e)?a:c[e.$$typeof]||o}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=a;var s=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=p(n);o&&o!==m&&e(t,o,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var c=u(t),h=u(n),v=0;v<a.length;++v){var b=a[v];if(!(i[b]||r&&r[b]||h&&h[b]||c&&c[b])){var y=d(n,b);try{s(t,b,y)}catch(e){}}}}return t}},139:function(e,t){!function(){e.exports=this.wp.plugins}()},14:function(e,t,n){var r=n(72);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},140:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(54),o=n(2);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"polite",t=document.createElement("div");t.id="a11y-speak-".concat(e),t.className="a11y-speak-region",t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions text"),t.setAttribute("aria-atomic","true");var n=document,r=n.body;return r&&r.appendChild(t),t}var a="";function c(e,t){!function(){for(var e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text"),n=0;n<e.length;n++)e[n].textContent="";t&&t.setAttribute("hidden","hidden")}(),e=function(e){return e=e.replace(/<[^<>]+>/g," "),a===e&&(e+=" "),a=e,e}(e);var n=document.getElementById("a11y-speak-intro-text"),r=document.getElementById("a11y-speak-assertive"),o=document.getElementById("a11y-speak-polite");r&&"assertive"===t?r.textContent=e:o&&(o.textContent=e),n&&n.removeAttribute("hidden")}Object(r.a)((function(){var e=document.getElementById("a11y-speak-intro-text"),t=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===e&&function(){var e=document.createElement("p");e.id="a11y-speak-intro-text",e.className="a11y-speak-intro-text",e.textContent=Object(o.__)("Notifications"),e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("hidden","hidden");var t=document.body;t&&t.appendChild(e)}(),null===t&&i("assertive"),null===n&&i("polite")}))},141:function(e,t,n){"use strict";n.d(t,"c",(function(){return zt})),n.d(t,"b",(function(){return Wt})),n.d(t,"a",(function(){return Qt}));var r=n(24),o=n.n(r),i=n(34),a=n.n(i),c=n(5),u=n.n(c),s=n(12),l=n.n(s),f=n(13),d=n.n(f),p=n(14),m=n.n(p),h=n(15),v=n.n(h),b=n(7),y=n.n(b),g=n(0),w=n(20),O=n(11),j=n(38),E=n(10),_=n.n(E),k=n(1),x=n.n(k),S=n(71),C=n(183),P=n(56),A=n(32),T=n(184),N=n.n(T),R=(n(126),n(42)),L=(n(138),function(e){var t=Object(C.a)();return t.displayName=e,t}("Router-History")),M=function(e){var t=Object(C.a)();return t.displayName=e,t}("Router"),I=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(j.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return _.a.createElement(M.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},_.a.createElement(L.Provider,{children:this.props.children||null,value:this.props.history}))},t}(_.a.Component);_.a.Component;_.a.Component;var D={},V=0;function F(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,c=void 0!==a&&a,u=n.sensitive,s=void 0!==u&&u;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=D[n]||(D[n]={});if(r[e])return r[e];var o=[],i={regexp:N()(e,o,t),keys:o};return V<1e4&&(r[e]=i,V++),i}(n,{end:i,strict:c,sensitive:s}),o=r.regexp,a=r.keys,u=o.exec(e);if(!u)return null;var l=u[0],f=u.slice(1),d=e===l;return i&&!d?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:d,params:a.reduce((function(e,t,n){return e[t.name]=f[n],e}),{})}}),null)}var B=function(e){function t(){return e.apply(this,arguments)||this}return Object(j.a)(t,e),t.prototype.render=function(){var e=this;return _.a.createElement(M.Consumer,null,(function(t){t||Object(P.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?F(n.pathname,e.props):t.match,o=Object(A.a)({},t,{location:n,match:r}),i=e.props,a=i.children,c=i.component,u=i.render;return Array.isArray(a)&&0===a.length&&(a=null),_.a.createElement(M.Provider,{value:o},o.match?a?"function"==typeof a?a(o):a:c?_.a.createElement(c,o):u?u(o):null:"function"==typeof a?a(o):null)}))},t}(_.a.Component);function U(e){return"/"===e.charAt(0)?e:"/"+e}function q(e,t){if(!e)return t;var n=U(e);return 0!==t.pathname.indexOf(n)?t:Object(A.a)({},t,{pathname:t.pathname.substr(n.length)})}function z(e){return"string"==typeof e?e:Object(S.d)(e)}function H(e){return function(){Object(P.a)(!1)}}function $(){}_.a.Component;var W=function(e){function t(){return e.apply(this,arguments)||this}return Object(j.a)(t,e),t.prototype.render=function(){var e=this;return _.a.createElement(M.Consumer,null,(function(t){t||Object(P.a)(!1);var n,r,o=e.props.location||t.location;return _.a.Children.forEach(e.props.children,(function(e){if(null==r&&_.a.isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?F(o.pathname,Object(A.a)({},e.props,{path:i})):t.match}})),r?_.a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(_.a.Component);_.a.useContext;var Q=n(3),G=n(49),Y=n(47),Z=n(21),K=n(25),J=n(22),X=n(27),ee=(n(297),n(43)),te=n(2),ne=n(137),re=n(95);function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v()(this,n)}}var ie=Object(g.lazy)((function(){return n.e(9).then(n.bind(null,589))})),ae=Object(g.lazy)((function(){return n.e(20).then(n.bind(null,608))})),ce=Object(g.lazy)((function(){return n.e(28).then(n.bind(null,590))})),ue=Object(g.lazy)((function(){return Promise.all([n.e(1),n.e(2),n.e(52),n.e(4),n.e(32)]).then(n.bind(null,605))})),se=Object(g.lazy)((function(){return Promise.all([n.e(2),n.e(36)]).then(n.bind(null,609))})),le=Object(g.lazy)((function(){return Promise.all([n.e(53),n.e(46)]).then(n.bind(null,606))})),fe=Object(g.lazy)((function(){return Promise.all([n.e(53),n.e(46)]).then(n.bind(null,601))})),de=function(){var e=[],t=[["",wcSettings.woocommerceTranslation]];return e.push({container:ue,path:"/",breadcrumbs:[].concat(t,[Object(te.__)("Home","woocommerce-admin")]),wpOpenMenu:"toplevel_page_woocommerce",navArgs:{id:"woocommerce-home"},capability:"manage_woocommerce"}),window.wcAdminFeatures.analytics&&(e.push({container:ce,path:"/analytics/overview",breadcrumbs:[].concat(t,[["/analytics/overview",Object(te.__)("Analytics","woocommerce-admin")],Object(te.__)("Overview","woocommerce-admin")]),wpOpenMenu:"toplevel_page_wc-admin-path--analytics-overview",navArgs:{id:"woocommerce-analytics-overview"},capability:"view_woocommerce_reports"}),e.push({container:ae,path:"/analytics/settings",breadcrumbs:[].concat(t,[["/analytics/revenue",Object(te.__)("Analytics","woocommerce-admin")],Object(te.__)("Settings","woocommerce-admin")]),wpOpenMenu:"toplevel_page_wc-admin-path--analytics-overview",navArgs:{id:"woocommerce-analytics-settings"},capability:"view_woocommerce_reports"}),e.push({container:ie,path:"/customers",breadcrumbs:[].concat(t,[Object(te.__)("Customers","woocommerce-admin")]),wpOpenMenu:"toplevel_page_woocommerce",navArgs:{id:"woocommerce-analytics-customers"},capability:"view_woocommerce_reports"}),e.push({container:ie,path:"/analytics/:report",breadcrumbs:function(e){var n=e.match,r=Object(Q.find)(Object(ne.a)(),{report:n.params.report});return r?[].concat(t,[["/analytics/revenue",Object(te.__)("Analytics","woocommerce-admin")],r.title]):[]},wpOpenMenu:"toplevel_page_wc-admin-path--analytics-overview",capability:"view_woocommerce_reports"})),window.wcAdminFeatures.marketing&&e.push({container:se,path:"/marketing",breadcrumbs:[].concat(t,[["/marketing",Object(te.__)("Marketing","woocommerce-admin")],Object(te.__)("Overview","woocommerce-admin")]),wpOpenMenu:"toplevel_page_woocommerce-marketing",navArgs:{id:"woocommerce-marketing-overview"},capability:"view_woocommerce_reports"}),window.wcAdminFeatures.onboarding&&e.push({container:le,path:"/setup-wizard",breadcrumbs:[].concat(t,[["/setup-wizard",Object(te.__)("Setup Wizard","woocommerce-admin")]]),capability:"manage_woocommerce"}),window.wcAdminFeatures.settings&&e.push({container:fe,path:"/settings/:page",breadcrumbs:function(e){var n=e.match,r=Object(K.g)("settingsPages"),o=r[n.params.page];return o?[].concat(t,[[r.general?"/settings/general":"/settings/".concat(Object.keys(r)[0]),Object(te.__)("Settings","woocommerce-admin")],o]):[]},wpOpenMenu:"toplevel_page_woocommerce",capability:"manage_woocommerce"}),Object(ee.applyFilters)("woocommerce_admin_pages_list",e)},pe=function(e){m()(n,e);var t=oe(n);function n(){return l()(this,n),t.apply(this,arguments)}return d()(n,[{key:"componentDidMount",value:function(){window.document.documentElement.scrollTop=0,window.document.body.classList.remove("woocommerce-admin-is-loading")}},{key:"componentDidUpdate",value:function(e){var t=Object(Q.omit)(e.query,"chartType","filter","paged"),n=Object(Q.omit)(this.props.query,"chartType","filter","paged");e.query.paged>1&&!Object(Q.isEqual)(t,n)&&Object(Z.getHistory)().replace(Object(Z.getNewPath)({paged:1})),e.match.url!==this.props.match.url&&(window.document.documentElement.scrollTop=0)}},{key:"render",value:function(){var e=this.props,t=e.page,n=e.match,r=e.query,o=n.url,i=n.params;return window.wpNavMenuUrlUpdate(r),window.wpNavMenuClassChange(t,o),Object(g.createElement)(g.Suspense,{fallback:Object(g.createElement)(Y.Spinner,null)},Object(g.createElement)(t.container,{params:i,path:o,pathMatch:t.path,query:r}))}}]),n}(g.Component);window.wpNavMenuUrlUpdate=function(e){var t=Object(Z.getPersistedQuery)(e),n=Object(Z.getQueryExcludedScreens)();Array.from(document.querySelectorAll("#adminmenu a")).forEach((function(e){return function(e,t,n){if(Object(re.f)(e.href)){var r=Object(Q.last)(e.href.split("?")),o=Object(G.parse)(r),i=o.path||"homescreen",a=Object(Z.getScreenFromPath)(i),c=n.includes(a),u="admin.php?"+Object(G.stringify)(Object.assign(o,c?{}:t));e.href=u,e.onclick=function(e){e.preventDefault(),Object(Z.getHistory)().push(u)}}}(e,t,n)}))},window.wpNavMenuClassChange=function(e,t){Array.from(document.getElementsByClassName("current")).forEach((function(e){e.classList.remove("current")})),Array.from(document.querySelectorAll(".wp-has-current-submenu")).forEach((function(e){e.classList.remove("wp-has-current-submenu"),e.classList.remove("wp-menu-open"),e.classList.remove("selected"),e.classList.add("wp-not-current-submenu"),e.classList.add("menu-top")}));var n="/"===t?"admin.php?page=wc-admin":"admin.php?page=wc-admin&path="+encodeURIComponent(t),r="/"===t?'li > a[href$="'.concat(n,'"], li > a[href*="').concat(n,'?"]'):'li > a[href*="'.concat(n,'"]'),o=document.querySelectorAll(r);if(Array.from(o).forEach((function(e){e.parentElement.classList.add("current")})),e.wpOpenMenu){var i=document.querySelector("#"+e.wpOpenMenu);i&&(i.classList.remove("wp-not-current-submenu"),i.classList.add("wp-has-current-submenu"),i.classList.add("wp-menu-open"),i.classList.add("current"))}document.querySelector("#wpwrap").classList.remove("wp-responsive-open")};var me=n(6),he=n.n(me),ve=n(41),be=n(30),ye=(n(298),n(18)),ge=n.n(ye),we=n(4),Oe=n(122),je=n.n(Oe),Ee=n(197),_e=n(67),ke=Object(g.createElement)(_e.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(g.createElement)(_e.a,{fillRule:"evenodd",d:"M6 5.5h12a.5.5 0 01.5.5v7H14a2 2 0 11-4 0H5.5V6a.5.5 0 01.5-.5zm-.5 9V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5v-3.5h-3.337a3.5 3.5 0 01-6.326 0H5.5zM4 13V6a2 2 0 012-2h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2v-5z",clipRule:"evenodd"})),xe=Object(g.createElement)(_e.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(g.createElement)(_e.a,{d:"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z"})),Se=(n(299),function(e){var t=e.height,n=void 0===t?24:t,r=e.width,o=void 0===r?24:r,i=e.hasUnread,a=void 0!==i&&i,c=he()("woocommerce-layout__activity-panel-toggle-bubble",{"has-unread":a});return Object(g.createElement)("div",{className:c},Object(g.createElement)("svg",{height:n,width:o,viewBox:"0 0 24 24"},Object(g.createElement)("path",{d:"M18.9 2H5.1C3.4 2 2 3.4 2 5.1v10.7C2 17.6 3.4 19 5.1 19H9l6 3-1-3h4.9c1.7 0 3.1-1.4 3.1-3.1V5.1C22 3.4 20.6 2 18.9 2zm-1.5 4.5c-.4.8-.8 2.1-1 3.9-.3 1.8-.4 3.1-.3 4.1 0 .3 0 .5-.1.7-.1.2-.3.4-.6.4s-.6-.1-.9-.4c-1-1-1.8-2.6-2.4-4.6-.7 1.4-1.2 2.4-1.6 3.1-.6 1.2-1.2 1.8-1.6 1.9-.3 0-.5-.2-.8-.7-.5-1.4-1.1-4.2-1.7-8.2 0-.3 0-.5.2-.7.1-.2.4-.3.7-.4.5 0 .9.2.9.8.3 2.3.7 4.2 1.1 5.7l2.4-4.5c.2-.4.4-.6.8-.6.5 0 .8.3.9.9.3 1.4.6 2.6 1 3.7.3-2.7.8-4.7 1.4-5.9.2-.3.4-.5.7-.5.2 0 .5.1.7.2.2.2.3.4.3.6 0 .2 0 .4-.1.5z"})))});Se.propTypes={height:x.a.number,width:x.a.number,hasUnread:x.a.bool};var Ce=Se,Pe=n(196),Ae={page:1,per_page:J.QUERY_DEFAULTS.pageSize,status:"unactioned",type:J.QUERY_DEFAULTS.noteTypes,orderby:"date",order:"desc"};function Te(e){var t=e(J.NOTES_STORE_NAME),n=t.getNotes,r=t.getNotesError,o=t.isResolving,i=(0,e(J.USER_STORE_NAME).getCurrentUser)(),a=parseInt(i&&i.woocommerce_meta&&i.woocommerce_meta.activity_panel_inbox_last_read,10);if(!a)return null;n(Ae);var c=Boolean(r("getNotes",[Ae])),u=o("getNotes",[Ae]);if(c||u)return null;var s=n(Ae);return Object(Pe.a)(s,a)>0}var Ne=function(e){var t=e.icon,n=e.title,r=e.name,o=e.unread,i=e.selected,a=e.isPanelOpen,c=e.onTabClick,u=he()("woocommerce-layout__activity-panel-tab",{"is-active":a&&i,"has-unread":o}),s="activity-panel-tab-".concat(r);return Object(g.createElement)(we.Button,{role:"tab",className:u,"aria-selected":i,"aria-controls":"activity-panel-".concat(r),key:s,id:s,onClick:function(){c(r)}},t,n," ",o&&Object(g.createElement)("span",{className:"screen-reader-text"},Object(te.__)("unread activity","woocommerce-admin")))},Re=function(e){var t=e.tabs,n=e.onTabClick,r=e.selectedTab,i=e.tabOpen,a=void 0!==i&&i,c=Object(g.useState)({tabOpen:a,currentTab:r}),u=ge()(c,2),s=u[0],l=s.tabOpen,f=s.currentTab,d=u[1];return Object(g.useEffect)((function(){d({tabOpen:a,currentTab:r})}),[a,r]),Object(g.createElement)(we.NavigableMenu,{role:"tablist",orientation:"horizontal",className:"woocommerce-layout__activity-panel-tabs"},t&&t.map((function(e,t){if(e.component){var r=e.component,i=e.options;return Object(g.createElement)(r,o()({key:t},i))}return Object(g.createElement)(Ne,o()({key:t,index:t,isPanelOpen:l,selected:f===e.name},e,{onTabClick:function(){var t=f!==e.name&&""!==f||!l;t&&f===e.name||Object(X.recordEvent)("activity_panel_open",{tab:e.name}),d({tabOpen:t,currentTab:e.name}),n(e,t)}}))})))},Le=function(){return Object(g.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon setup-progress",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(g.createElement)("path",{d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z",stroke:"#DCDCDE",strokeWidth:"2"}),Object(g.createElement)("path",{d:"M4 12V12C4 16.4183 7.58172 20 12 20V20C16.4183 20 20 16.4183 20 12V12C20 7.58172 16.4183 4 12 4V4",strokeWidth:"2",strokeLinecap:"round"}))},Me=function(){return Object(g.createElement)(g.Fragment,null,Object(g.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon",width:"24",height:"24",viewBox:"3 3 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(g.createElement)("path",{d:"M13.8053 15.3982C13.8053 15.7965 13.4867 16.1947 13.0089 16.1947H6.79646C6.55752 16.1947 6.39823 16.115 6.23894 15.9558C6.07965 15.7965 6 15.6372 6 15.3982V6.79646C6 6.63717 6.15929 6.39823 6.23894 6.23894C6.39823 6.07965 6.55752 6 6.79646 6H13.0089C13.4071 6 13.8053 6.31858 13.8053 6.79646V15.3982Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Object(g.createElement)("path",{d:"M23.9203 10.6195C23.9203 11.0177 23.6017 11.4159 23.1238 11.4159H16.9115C16.6725 11.4159 16.5132 11.3363 16.3539 11.177C16.1946 11.0177 16.115 10.8584 16.115 10.6195V6.79646C16.115 6.39823 16.4336 6 16.9115 6H23.1238C23.5221 6 23.9203 6.31858 23.9203 6.79646V10.6195Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Object(g.createElement)("path",{d:"M13.8053 23.2035C13.8053 23.4424 13.7257 23.6017 13.5664 23.761C13.4071 23.9203 13.2478 23.9999 13.0089 23.9999H6.79646C6.39823 23.9999 6 23.6813 6 23.2035V19.3804C6 19.1415 6.07965 18.9822 6.23894 18.8229C6.39823 18.6636 6.55752 18.584 6.79646 18.584H13.0089C13.4071 18.584 13.8053 18.9026 13.8053 19.3804V23.2035Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),Object(g.createElement)("path",{d:"M16.9912 23.9999C16.7522 23.9999 16.5929 23.9202 16.4336 23.7609C16.2743 23.6016 16.1947 23.4423 16.1947 23.2034V14.6016C16.1947 14.3627 16.2743 14.2034 16.4336 14.0441C16.5929 13.8848 16.7522 13.8052 16.9912 13.8052H23.2036C23.4425 13.8052 23.6018 13.8848 23.7611 14.0441C23.9204 14.2034 24 14.3627 24 14.6016V23.2034C24 23.6016 23.6814 23.9999 23.2036 23.9999H16.9912Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),Object(te.__)("Display","woocommerce-admin"))},Ie=[{value:"single_column",label:Object(g.createElement)(g.Fragment,null,Object(g.createElement)((function(){return Object(g.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon",width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(g.createElement)("rect",{x:"0.5",y:"0.5",width:"11",height:"13",strokeWidth:"1"}))}),null),Object(te.__)("Single column","woocommerce-admin"))},{value:"two_columns",label:Object(g.createElement)(g.Fragment,null,Object(g.createElement)((function(){return Object(g.createElement)("svg",{className:"woocommerce-layout__activity-panel-tab-icon",width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(g.createElement)("rect",{x:"0.5",y:"0.5",width:"7",height:"13",strokeWidth:"1"}),Object(g.createElement)("rect",{x:"9.5",y:"0.5",width:"7",height:"13",strokeWidth:"1"}))}),null),Object(te.__)("Two columns","woocommerce-admin"))}],De=function(){var e=Object(O.useSelect)((function(e){return(0,e(J.OPTIONS_STORE_NAME).getOption)("woocommerce_default_homepage_layout")||"single_column"})),t=Object(J.useUserPreferences)(),n=t.updateUserPreferences,r=t.homepage_layout;return Object(g.createElement)(we.DropdownMenu,{icon:Object(g.createElement)(Me,null),label:Object(te.__)("Display options","woocommerce-admin"),toggleProps:{className:"woocommerce-layout__activity-panel-tab display-options",onClick:function(){return Object(X.recordEvent)("homescreen_display_click")}},popoverProps:{className:"woocommerce-layout__activity-panel-popover"}},(function(t){var o=t.onClose;return Object(g.createElement)(we.MenuGroup,{className:"woocommerce-layout__homescreen-display-options",label:Object(te.__)("Layout","woocommerce-admin")},Object(g.createElement)(we.MenuItemsChoice,{choices:Ie,onSelect:function(e){n({homepage_layout:e}),o(),Object(X.recordEvent)("homescreen_display_option",{display_option:e})},value:r||e}))}))},Ve=n(497),Fe=(n(300),"highlight-tooltip__show");function Be(e){var t=e.title,n=e.closeButtonText,r=e.content,o=e.show,i=void 0===o||o,a=e.id,c=e.onClose,u=e.delay,s=e.onShow,l=void 0===s?Q.noop:s,f=e.useAnchor,d=void 0!==f&&f,p=Object(g.useState)(u>0?null:i),m=ge()(p,2),h=m[0],v=m[1],b=Object(g.useState)(null),y=ge()(b,2),w=y[0],O=y[1],j=Object(g.useState)(null),E=ge()(j,2),_=E[0],k=E[1];function x(){if(d){var e=document.getElementById(a);k(e.getBoundingClientRect())}}Object(g.useEffect)((function(){var e,t,n=document.getElementById(a);n&&!w&&(d?(t=document.createElement("div"),document.body.appendChild(t)):t=n.parentElement,(e=document.createElement("div")).classList.add("highlight-tooltip__container"),t.appendChild(e),O(e));var r=S(e);return function(){if(e){var t=e.parentElement;t.removeChild(e),d&&t.remove()}r&&clearTimeout(r)}}),[]),Object(g.useEffect)((function(){!h&&w&&w.classList.remove(Fe)}),[h]),Object(g.useEffect)((function(){i!==h&&null!==h&&w&&(v(i),i?w&&S(w):w.classList.remove(Fe))}),[i]),Object(g.useLayoutEffect)((function(){return window.addEventListener("resize",x),function(){return window.removeEventListener("resize",x)}}),[]);var S=function(e){var t=null;return u>0?t=setTimeout((function(){t=null,C(e)}),u):h||C(e),t},C=function(e){var t=document.getElementById(a);t&&d&&k(t.getBoundingClientRect()),e&&e.classList.add(Fe),v(!0),l()},P=function(){v(!1),c&&c()};return w?Object(g.createPortal)(Object(g.createElement)("div",{className:"highlight-tooltip__portal"},h?Object(g.createElement)(g.Fragment,null,Object(g.createElement)(we.IsolatedEventContainer,{className:"highlight-tooltip__overlay"}),Object(g.createElement)(we.Popover,{className:"highlight-tooltip__popover",noArrow:!1,anchorRect:_,focusOnMount:"container"},Object(g.createElement)(we.Card,{size:"medium"},Object(g.createElement)(we.CardHeader,null,t,Object(g.createElement)(we.Button,{isSmall:!0,onClick:P,icon:Ve.a})),Object(g.createElement)(we.CardBody,null,r||null),Object(g.createElement)(we.CardFooter,{isBorderless:!0},Object(g.createElement)(we.Button,{size:"small",isPrimary:!0,onClick:P},n||Object(te.__)("Close","woocommerce-admin")))))):null),w):null}Be.propTypes={id:x.a.string.isRequired,title:x.a.string.isRequired,closeButtonText:x.a.string.isRequired,content:x.a.oneOfType([x.a.string,x.a.node]),show:x.a.bool,onClose:x.a.func,delay:x.a.number,onShow:x.a.func,useAnchor:x.a.bool};var Ue=n(121);var qe=["button","submit"];function ze(e){var t=Object(g.useRef)(e);Object(g.useEffect)((function(){t.current=e}),[e]);var n=Object(g.useRef)(!1),r=Object(g.useRef)(),o=Object(g.useCallback)((function(){clearTimeout(r.current)}),[]);Object(g.useEffect)((function(){return function(){return o()}}),[]),Object(g.useEffect)((function(){e||o()}),[e,o]);var i=Object(g.useCallback)((function(e){var t=e.type,r=e.target;Object(Q.includes)(["mouseup","touchend"],t)?n.current=!1:function(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(Q.includes)(qe,e.type)}return!1}(r)&&(n.current=!0)}),[]),a=Object(g.useCallback)((function(e){e.persist(),n.current||(r.current=setTimeout((function(){document.hasFocus()?"function"==typeof t.current&&t.current(e):e.preventDefault()}),0))}),[]);return{onFocus:o,onMouseDown:i,onMouseUp:i,onTouchStart:i,onTouchEnd:i,onBlur:a}}var He=function(e){var t=e.content,n=e.isPanelOpen,r=e.isPanelSwitching,i=e.currentTab,a=e.tab,c=e.closePanel,u=e.clearPanel,s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"firstElement",t=Object(g.useRef)(e);return Object(g.useEffect)((function(){t.current=e}),[e]),Object(g.useCallback)((function(e){if(e&&!1!==t.current&&!e.contains(e.ownerDocument.activeElement)){var n=e;if("firstElement"===t.current){var r=Ue.a.tabbable.find(e)[0];r&&(n=r)}n.focus()}}),[])}(),l=ze((function(e){var t=e.target.closest(".woocommerce-inbox-dismiss-confirmation_modal")||e.target.closest(".components-snackbar__action");n&&!t&&c()})),f=Object(g.useRef)(null),d=Object(g.useCallback)((function(e){f.current=e,s(e)}),[]);if(!a)return Object(g.createElement)("div",{className:"woocommerce-layout__activity-panel-wrapper"});if(!t)return null;var p=he()("woocommerce-layout__activity-panel-wrapper",{"is-open":n,"is-switching":r});return Object(g.createElement)("div",o()({className:p,tabIndex:0,role:"tabpanel","aria-label":a.title,onTransitionEnd:function(e){e&&"transform"===e.propertyName&&(u(),f.current&&n&&a&&s(f.current))}},l,{ref:d}),Object(g.createElement)("div",{className:"woocommerce-layout__activity-panel-content",key:"activity-panel-"+i,id:"activity-panel-"+i},Object(g.createElement)(g.Suspense,{fallback:Object(g.createElement)(Y.Spinner,null)},t)))},$e=Object(g.lazy)((function(){return Promise.all([n.e(54),n.e(5),n.e(7)]).then(n.bind(null,602))})),We=Object(g.lazy)((function(){return Promise.all([n.e(1),n.e(2),n.e(4),n.e(8)]).then(n.bind(null,587))})),Qe=function(e){var t,n,r,o=e.isEmbedded,i=e.query,a=e.userPreferencesData,c=Object(g.useState)(""),u=ge()(c,2),s=u[0],l=u[1],f=Object(g.useState)(!1),d=ge()(f,2),p=d[0],m=d[1],h=Object(g.useState)(!1),v=ge()(h,2),b=v[0],y=v[1],w=Object(g.useState)(!1),j=ge()(w,2),E=j[0],_=j[1],k=Object(O.useSelect)((function(e){var t=e(J.OPTIONS_STORE_NAME),n=t.getOption,r=t.isResolving;return{hasUnreadNotes:Te(e),requestingTaskListOptions:r("getOption",["woocommerce_task_list_complete"])||r("getOption",["woocommerce_task_list_hidden"]),setupTaskListComplete:"yes"===n("woocommerce_task_list_complete"),setupTaskListHidden:"yes"===n("woocommerce_task_list_hidden"),trackedCompletedTasks:n("woocommerce_task_list_tracked_completed_tasks")||[]}})),x=k.hasUnreadNotes,S=k.requestingTaskListOptions,C=k.setupTaskListComplete,P=k.setupTaskListHidden,A=k.trackedCompletedTasks,T=Object(O.useDispatch)(J.OPTIONS_STORE_NAME).updateOptions,N=Object(J.useUser)().currentUserCan,R=function(){return"wc-admin"===i.page&&!i.path},L=function(){return i.task&&!i.path&&(!0===S||!1===P&&!1===C)},M=function(){var e={name:"inbox",title:Object(te.__)("Inbox","woocommerce-admin"),icon:Object(g.createElement)(Ee.a,{icon:ke}),unread:x,visible:(o||!R())&&!L()},t={name:"setup",title:Object(te.__)("Store Setup","woocommerce-admin"),icon:Object(g.createElement)(Le,null),onClick:function(){return window.location.href!==Object(K.f)("admin.php?page=wc-admin")&&("no"===P?I():T({woocommerce_task_list_hidden:"no"}).then(I)),null},visible:N("manage_woocommerce")&&!C&&!P&&!L()&&(!R()||o)},n={name:"help",title:Object(te.__)("Help","woocommerce-admin"),icon:Object(g.createElement)(Ee.a,{icon:xe}),visible:R()&&!o||L()};return[e,t,{component:De,visible:!o&&R()&&!L()},n].filter((function(e){return e.visible}))},I=function(){Object(re.f)(window.location.href)?Object(Z.getHistory)().push(Object(Z.getNewPath)({},"/",{})):window.location.href=Object(K.f)("admin.php?page=wc-admin")},D=M(),V=Object(Q.uniqueId)("activity-panel-header_"),F=he()("woocommerce-layout__activity-panel",{"is-mobile-open":E}),B=(t=i.task,n=a&&a.task_list_tracked_started_tasks,r=a&&a.help_panel_highlight_shown,!(!(t&&"yes"!==r&&(n||{})[t]>1)||A.includes(t))),U=D.some((function(e){return e.unread})),q=U?Object(te.__)("View Activity Panel, you have unread activity","woocommerce-admin"):Object(te.__)("View Activity Panel","woocommerce-admin");return Object(g.createElement)("div",null,Object(g.createElement)(Y.H,{id:V,className:"screen-reader-text"},Object(te.__)("Store Activity","woocommerce-admin")),Object(g.createElement)(Y.Section,{component:"aside",id:"woocommerce-activity-panel","aria-labelledby":V},Object(g.createElement)(we.Button,{onClick:function(){!function(){var e=M();l(E?"":e[0].name),_(!E),m(!E)}()},label:E?Object(te.__)("Close Activity Panel","woocommerce-admin"):q,"aria-expanded":E,className:"woocommerce-layout__activity-panel-mobile-toggle"},E?Object(g.createElement)(je.a,null):Object(g.createElement)(Ce,{hasUnread:U})),Object(g.createElement)("div",{className:F},Object(g.createElement)(Re,{tabs:D,tabOpen:p,selectedTab:s,onTabClick:function(e,t){var n,r,o;e.onClick?e.onClick():(n=t,r=e.name,o=r!==s&&""!==s&&n&&p,l(r),_(n),m(n),y(o))}}),Object(g.createElement)(He,{currentTab:!0,isPanelOpen:p,isPanelSwitching:b,tab:Object(Q.find)(M(),{name:s}),content:function(e){var t=i.task;switch(e){case"inbox":return Object(g.createElement)(We,null);case"help":return Object(g.createElement)($e,{taskName:t});default:return null}}(s),closePanel:function(){m(!1)},clearPanel:function(){p||(y(!1),l(""))}}))),B?Object(g.createElement)(Be,{delay:1e3,useAnchor:!0,title:Object(te.__)("We're here for help","woocommerce-admin"),content:Object(te.__)("If you have any questions, feel free to explore the WooCommerce docs listed here.","woocommerce-admin"),closeButtonText:Object(te.__)("Got it","woocommerce-admin"),id:"activity-panel-tab-help",onClose:function(){return Object(X.recordEvent)("help_tooltip_click"),void(a&&a.updateUserPreferences&&a.updateUserPreferences({help_panel_highlight_shown:"yes"}))},onShow:function(){return Object(X.recordEvent)("help_tooltip_view")}}):null)};Qe.defaultProps={getHistory:Z.getHistory};var Ge=Qe,Ye=function(){return/iPhone|iPad|iPod/i.test(window.navigator.userAgent)?"ios":/Android/i.test(window.navigator.userAgent)?"android":"unknown"},Ze=function(){return Object(g.createElement)("svg",{width:"37",height:"37",viewBox:"0 0 92 92",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(g.createElement)("rect",{width:"92",height:"92",rx:"21.3953",fill:"#7F54B3"}),Object(g.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M72.5937 28.043H19.8094C16.4781 28.0459 13.7783 30.7705 13.7754 34.1324V54.4501C13.7783 57.812 16.4781 60.5366 19.8094 60.5395H44.8229L56.2573 66.9607L53.6672 60.5395H72.599C74.2009 60.5402 75.7374 59.8983 76.8702 58.7552C78.0029 57.612 78.639 56.0614 78.6383 54.4447V34.1324C78.6376 32.5157 78.0002 30.9657 76.8664 29.8235C75.7327 28.6814 74.1956 28.0408 72.5937 28.043ZM19.1057 32.4208C18.4658 32.4324 17.8646 32.7359 17.467 33.2482C17.0888 33.7635 16.9404 34.4175 17.058 35.0502C18.5962 45.0986 20.0338 51.8757 21.371 55.3816C21.8779 56.658 22.4896 57.2703 23.2063 57.2185C24.3075 57.1489 25.6263 55.5968 27.1627 52.5621C27.9964 50.8412 29.2602 48.2662 30.9539 44.837C32.3785 49.88 34.309 53.6787 36.7456 56.2331C37.4291 56.9436 38.1204 57.2748 38.8195 57.2266C39.4185 57.1931 39.953 56.8315 40.217 56.2813C40.4753 55.7358 40.5806 55.1278 40.5211 54.5248C40.3516 52.0703 40.5919 48.667 41.2421 44.3149C41.9081 39.8057 42.7523 36.5818 43.7749 34.6432C43.9822 34.2526 44.0733 33.8087 44.037 33.366C44.0039 32.7587 43.7116 32.1969 43.2374 31.829C42.7745 31.4367 42.1799 31.2446 41.5803 31.2935C40.8334 31.3325 40.1682 31.7885 39.8499 32.4797C38.2331 35.5019 37.0812 40.4109 36.3943 47.2068C35.2823 44.2394 34.4509 41.1703 33.9114 38.0412C33.623 36.4613 32.9037 35.7125 31.7536 35.7946C30.9592 35.8589 30.3063 36.3944 29.7819 37.4012L24.0348 48.5643C23.0997 44.6692 22.2205 39.9289 21.3972 34.3433C21.1997 32.9652 20.4358 32.3244 19.1057 32.4208ZM69.9089 34.6877C71.6969 35.0381 73.2407 36.2 74.1186 37.8559C74.9693 39.3247 75.3946 41.1161 75.3946 43.23C75.4148 45.9567 74.7062 48.6357 73.3477 50.9687C71.7778 53.7023 69.7195 55.0691 67.1727 55.0691C66.6933 55.0668 66.2153 55.0128 65.7467 54.9078C63.9584 54.5581 62.4143 53.396 61.5371 51.7396C60.6864 50.2452 60.261 48.4411 60.261 46.3272C60.2357 43.6127 60.945 40.9454 62.3079 38.6295C63.9023 35.8959 65.9607 34.5291 68.4829 34.5291C68.9623 34.5304 69.4402 34.5836 69.9089 34.6877ZM68.7937 49.4848C69.7707 48.5773 70.4399 47.2269 70.8012 45.4337V45.4419C70.9315 44.7826 70.9959 44.1112 70.9933 43.4382C70.986 42.5849 70.8291 41.74 70.5302 40.9452C70.1443 39.901 69.6304 39.3124 68.9884 39.1793C68.0378 38.9643 67.1239 39.5256 66.2469 40.8632C65.5812 41.8393 65.109 42.9432 64.8577 44.1106C64.7276 44.7708 64.6632 45.4432 64.6657 46.1171C64.6739 46.9677 64.8308 47.8096 65.1287 48.6019C65.5146 49.6388 66.0294 50.2274 66.6731 50.3678C67.3169 50.5081 68.0237 50.2138 68.7937 49.4848ZM57.9079 37.8559C57.0291 36.2008 55.4854 35.0392 53.6976 34.6877C53.2279 34.5837 52.749 34.5306 52.2687 34.5291C49.7443 34.5291 47.6856 35.8959 46.0927 38.6295C44.7295 40.9454 44.0201 43.6127 44.0454 46.3272C44.0454 48.4411 44.4699 50.2452 45.319 51.7396C46.1976 53.3949 47.7414 54.5566 49.5294 54.9078C49.999 55.0126 50.4779 55.0667 50.9582 55.0691C53.5055 55.0691 55.5642 53.7023 57.1343 50.9687C58.4922 48.6355 59.2001 45.9565 59.1789 43.23C59.1789 41.1161 58.7544 39.3247 57.9053 37.8559H57.9079ZM54.5903 45.4337C54.2307 47.2269 53.5614 48.5773 52.5825 49.4848C51.8115 50.2065 51.101 50.5017 50.4589 50.3678C49.8169 50.2338 49.3011 49.6461 48.9169 48.6019C48.6181 47.8097 48.4603 46.9678 48.4511 46.1171C48.4495 45.4431 48.5148 44.7707 48.6459 44.1106C48.8971 42.9432 49.3694 41.8393 50.0353 40.8632C50.9124 39.5256 51.8264 38.9643 52.7773 39.1793C53.4193 39.3124 53.9333 39.901 54.3193 40.9452C54.617 41.7404 54.7739 42.585 54.7824 43.4382C54.785 44.1112 54.7207 44.7826 54.5903 45.4419V45.4337Z",fill:"white"}))},Ke=(n(301),function(e){var t=e.onInstall,n=e.onDismiss;Object(g.useEffect)((function(){var e=document.getElementsByClassName("woocommerce-layout")[0];return"android"===Ye()&&e&&e.classList.add("woocommerce-layout__show-app-banner"),function(){e&&e.classList.remove("woocommerce-layout__show-app-banner")}}),[]);var r=Object(g.useState)(!1),o=ge()(r,2),i=o[0],a=o[1];return"android"!==Ye()||i?null:Object(g.createElement)("div",{className:"woocommerce-mobile-app-banner"},Object(g.createElement)(we.Icon,{icon:"no-alt","data-testid":"dismiss-btn",onClick:function(){n(),a(!0),Object(X.recordEvent)("wcadmin_mobile_android_banner_click",{action:"dismiss"})}}),Object(g.createElement)(Ze,null),Object(g.createElement)("div",{className:"woocommerce-mobile-app-banner__description"},Object(g.createElement)("p",{className:"woocommerce-mobile-app-banner__description__text"},Object(te.__)("Run your store from anywhere","woocommerce-admin")),Object(g.createElement)("p",{className:"woocommerce-mobile-app-banner__description__text"},Object(te.__)("Download the WooCommerce app","woocommerce-admin"))),Object(g.createElement)(we.Button,{href:"https://play.google.com/store/apps/details?id=com.woocommerce.android",isSecondary:!0,onClick:function(){t(),a(!0),Object(X.recordEvent)("wcadmin_mobile_android_banner_click",{action:"install"})}},Object(te.__)("Install","woocommerce-admin")))});function Je(){var e=Object(g.useState)(!1),t=ge()(e,2),n=t[0],r=t[1],o=Object(g.useRef)(null);return Object(g.useEffect)((function(){var e=function(){r(window.pageYOffset>20)},t=function(){o.current=window.requestAnimationFrame(e)};return window.addEventListener("scroll",t),function(){window.removeEventListener("scroll",t),window.cancelAnimationFrame(o.current)}}),[]),n}var Xe=n(139),et=(n(302),n(19)),tt=n.n(et);function nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ot=function(e){var t=window.location,n=t.origin,r=t.pathname,o=t.search;return 0===e.indexOf("#")?n+r+o+e:0===e.indexOf("http")?e:n+e},it=function(e){var t=e.replace(/[-\/\\^$*+?.()|[\]{}]/gi,"\\$&").split(/\\\?|#/),n=ge()(t,3),r=n[0],o=n[1],i=n[2],a=i?"(.*#".concat(i,"$)"):"";return"^"+r+(o?o.split("&").reduce((function(e,t){return"".concat(e,"(?=.*[?|&]").concat(t,"(&|$|#))")}),""):"")+a},at=function(e){var t,n,r;return window.wcNavigation.historyPatched||(t=window.history,n=t.pushState,r=t.replaceState,t.pushState=function(e){var r=new CustomEvent("pushstate",{state:e});return window.dispatchEvent(r),n.apply(t,arguments)},t.replaceState=function(e){var n=new CustomEvent("replacestate",{state:e});return window.dispatchEvent(n),r.apply(t,arguments)},window.wcNavigation.historyPatched=!0),window.addEventListener("popstate",e),window.addEventListener("pushstate",e),window.addEventListener("replacestate",e),function(){window.removeEventListener("popstate",e),window.removeEventListener("pushstate",e),window.removeEventListener("replacestate",e)}},ct=function(e){var t=null,n=0;return e.forEach((function(e){var r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t){var r=ot(t),o=e.href;if(r===o)return Number.MAX_SAFE_INTEGER;var i=it(r),a=new RegExp(n||i,"i");return(decodeURIComponent(o).match(a)||[]).length}}(window.location,Object(K.f)(e.url),e.matchExpression);r>0&&r>=n&&(n=r,t=e)})),t||null},ut=["primary","favorites","plugins","secondary"],st={woocommerce:{id:"woocommerce",isCategory:!0,menuId:"primary",migrate:!0,order:10,parent:"",title:"WooCommerce"}},lt=function(e){return e.sort((function(e,t){return e.order===t.order?e.title.localeCompare(t.title):e.order-t.order}))},ft=Object(g.createElement)(_e.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(g.createElement)(_e.a,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})),dt=function(){var e=Object(K.g)("siteTitle",""),t=Object(K.g)("homeUrl",""),n=Je(),r=Object(g.useState)(document.body.classList.contains(!1)),o=ge()(r,2),i=o[0],a=o[1],c="is-wc-nav-folded",u="is-wc-nav-expanded",s=function(){document.body.classList.add(c),document.body.classList.remove(u),a(!0)},l=function(){document.body.classList.remove(c),document.body.classList.add(u),a(!1)},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body.clientWidth;e<=960?s():l()};Object(g.useEffect)((function(){f();for(var e=0,t=[{eventName:"orientationchange",handler:function(e){return f(e.target.screen.availWidth)}},{eventName:"resize",handler:Object(Q.debounce)((function(){return f()}),200)}];e<t.length;e++){var n=t[e],r=n.eventName,o=n.handler;window.addEventListener(r,o,!1)}at((function(){return f()}))}),[]);var d=Object(g.createElement)(Ee.a,{size:"36px",icon:ft}),p=Object(O.useSelect)((function(e){var t=e("core/data").isResolving,n=(0,e("core").getEntityRecord)("root","__unstableBase",void 0)||{};return{isRequestingSiteIcon:t("core","getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:n.siteIconUrl}})),m=p.isRequestingSiteIcon,h=p.siteIconUrl;h?d=Object(g.createElement)("img",{alt:Object(te.__)("Site Icon"),src:h}):m&&(d=null);var v=he()("woocommerce-navigation-header",{"is-scrolled":n});return Object(g.createElement)("div",{className:v},Object(g.createElement)(we.Button,{onClick:function(){document.body.classList.contains(c)?l():s()},className:"woocommerce-navigation-header__site-icon","aria-label":"Fold navigation",role:"switch","aria-checked":i?"true":"false"},d),Object(g.createElement)(we.Button,{href:t,className:"woocommerce-navigation-header__site-title",as:"span"},Object(ve.decodeEntities)(e)))},pt=(n(303),n(304),function(e){var t=e.id,n=Object(O.useSelect)((function(e){return{favorites:e(J.NAVIGATION_STORE_NAME).getFavorites(),isResolving:e(J.NAVIGATION_STORE_NAME).isResolving("getFavorites")}})),r=n.favorites,o=n.isResolving,i=Object(O.useDispatch)(J.NAVIGATION_STORE_NAME),a=i.addFavorite,c=i.removeFavorite,u=r.includes(t);return o?null:Object(g.createElement)(we.Button,{id:"woocommerce-navigation-favorite-button",className:"woocommerce-navigation-favorite-button",isTertiary:!0,onClick:function(){(u?c:a)(t),Object(X.recordEvent)("navigation_favorite",{id:t,action:u?"unfavorite":"favorite"})},icon:u?"star-filled":"star-empty","aria-label":u?Object(te.__)("Add this item to your favorites.","woocommerce-admin"):Object(te.__)("Remove this item from your favorites.","woocommerce-admin")})}),mt="woocommerce_navigation_favorites_tooltip_hidden",ht=function(){var e=Object(O.useSelect)((function(e){var t=e(J.OPTIONS_STORE_NAME),n=t.getOption,r=t.isResolving;return{isFavoritesResolving:e(J.NAVIGATION_STORE_NAME).isResolving("getFavorites"),isOptionResolving:r("getOption",[mt]),isTooltipHidden:"yes"===n(mt)}})),t=e.isFavoritesResolving,n=e.isOptionResolving,r=e.isTooltipHidden,o=Object(O.useDispatch)(J.OPTIONS_STORE_NAME).updateOptions;return t||r||n||document.body.classList.contains("is-wc-nav-folded")?null:Object(g.createElement)(Be,{delay:1e3,title:Object(te.__)("Introducing favorites","woocommerce-admin"),content:Object(te.__)("You can now favorite your extensions to pin them in the top level of the navigation.","woocommerce-admin"),closeButtonText:Object(te.__)("Got it","woocommerce-admin"),id:"woocommerce-navigation-favorite-button",onClose:function(){return o(u()({},mt,"yes"))},useAnchor:!0})},vt=function(e){var t=e.category,n=t.id,r=t.title,o="woocommerce-navigation-category-title";return["plugins","favorites"].includes(t.menuId)?Object(g.createElement)("span",{className:o},Object(g.createElement)("span",{className:"".concat(o,"__text")},r),Object(g.createElement)(pt,{id:n}),Object(g.createElement)(ht,null)):Object(g.createElement)("span",{className:o},r)},bt=function(e){var t=e.item,n=Object(Z.useNavSlot)("woocommerce_navigation_"+t.id),r=Boolean(n.fills&&n.fills.length),o=function(e){Object(X.recordEvent)("navigation_click",{menu_item:e})};return r&&!t.isCategory?Object(g.createElement)(be.c,{key:t.id,item:t.id},Object(g.createElement)("div",{onClick:function(){return o(t.id)}},Object(g.createElement)(Z.WooNavigationItem.Slot,{name:t.id}))):Object(g.createElement)(be.c,{key:t.id,item:t.id,title:t.title,href:t.url,navigateToMenu:!t.url&&t.id,onClick:function(){return o(t.id)},hideIfTargetMenuEmpty:!0})},yt=function(e){var t=e.category,n=e.onBackClick,r=e.pluginItems,o=e.primaryItems;if(!o.length&&!r.length)return null;var i=window.wcNavigation,a=i.rootBackLabel,c=i.rootBackUrl,u="woocommerce"===t.id&&c;return Object(g.createElement)(be.d,{title:Object(g.createElement)(vt,{category:t}),menu:t.id,parentMenu:t.parent,backButtonLabel:u?a:t.backButtonLabel||null,onBackButtonClick:u?function(){n("woocommerce"),window.location=c}:function(){return n(t.id)}},!!o.length&&Object(g.createElement)(be.b,null,o.map((function(e){return Object(g.createElement)(bt,{key:e.id,item:e})}))),!!r.length&&Object(g.createElement)(be.b,{title:"woocommerce"===t.id?Object(te.__)("Extensions","woocommerce-admin"):null},r.map((function(e){return Object(g.createElement)(bt,{key:e.id,item:e})}))))},gt=function(e){var t=e.category,n=e.items,r=e.onBackClick;if(!n.length)return null;var o="woocommerce"===t.id;return Object(g.createElement)(be.d,{className:"components-navigation__menu-secondary",title:!o&&Object(g.createElement)(vt,{category:t}),menu:t.id,parentMenu:t.parent,backButtonLabel:t.backButtonLabel||null,onBackButtonClick:o?null:function(){return r(t.id)}},Object(g.createElement)(be.b,{onBackButtonClick:function(){return r(t.id)}},n.map((function(e){return Object(g.createElement)(bt,{key:e.id,item:e})}))))},wt=Object(w.compose)(Object(O.withSelect)((function(e){var t=e(J.NAVIGATION_STORE_NAME),n=t.getActiveItem,r=t.getMenuItems;return{activeItem:n(),menuItems:r()}})))((function(e){var t=e.menuItems;Object(g.useEffect)((function(){document.documentElement.classList.remove("wp-toolbar"),document.body.classList.add("has-woocommerce-navigation");var e=document.getElementById("adminmenumain");e&&e.classList.add("folded")}),[]);var n=Object(g.useState)("woocommerce-home"),r=ge()(n,2),o=r[0],i=r[1],a=Object(g.useState)("woocommerce"),c=ge()(a,2),u=c[0],s=c[1];Object(g.useEffect)((function(){var e=ct(t);return e&&o!==e&&(i(e),s(e.parent)),at((function(){setTimeout((function(){var e=ct(t);e&&i(e)}),0)}))}),[t]);var l=Object(J.useUser)().currentUserCan,f=Object(g.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=rt({},st),r=lt(e).reduce((function(e,r){return e[r.parent]||(e[r.parent]={},ut.forEach((function(t){e[r.parent][t]=[]}))),e[r.parent][r.menuId]?(t&&r.capability&&!t(r.capability)||(r.isCategory&&(n[r.id]=r),e[r.parent][r.menuId].push(r)),e):e}),{});return{items:r,categories:n}}(t,l)}),[t,l]),d=f.categories,p=f.items,m=Object(g.useRef)(null),h=function(e){Object(X.recordEvent)("navigation_back_click",{category:e})},v="woocommerce"===u,b=he()("woocommerce-navigation",{"is-root":v});return Object(g.createElement)("div",{className:b},Object(g.createElement)(dt,null),Object(g.createElement)("div",{className:"woocommerce-navigation__wrapper",ref:m},Object(g.createElement)(be.a,{activeItem:o?o.id:null,activeMenu:u,onActivateMenu:function(){m&&m.current&&(m.current.scrollTop=0),s.apply(void 0,arguments)}},Object.values(d).map((function(e){var t=p[e.id];return!!t&&[Object(g.createElement)(yt,{key:e.id,category:e,onBackClick:h,primaryItems:[].concat(tt()(t.primary),tt()(t.favorites)),pluginItems:t.plugins}),Object(g.createElement)(gt,{key:"secondary/".concat(e.id),category:e,onBackClick:h,items:t.secondary})]})))))})),Ot=Object(J.withNavigationHydration)(window.wcNavigation)((function(){return Object(g.createElement)(Z.NavSlotFillProvider,null,Object(g.createElement)(wt,null),Object(g.createElement)(Xe.PluginArea,null))}));function jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jt(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _t=function(e){var t=e.sections,n=e.isEmbedded,r=void 0!==n&&n,o=e.query,i=Object(g.useRef)(null),c=Object(K.g)("siteTitle",""),u=t.slice(-1)[0],s=Je(),l=Object(J.useUserPreferences)(),f=l.updateUserPreferences,d=a()(l,["updateUserPreferences"]),p="yes"===d.android_app_banner_dismissed,m=null,h=he()("woocommerce-layout__header",{"is-scrolled":s});Object(g.useLayoutEffect)((function(){return v(),window.addEventListener("resize",v),function(){window.removeEventListener("resize",v);var e=document.querySelector("#wpbody");e&&(e.style.marginTop=null)}}),[p]);var v=function(){clearTimeout(m),m=setTimeout((function(){var e=document.querySelector("#wpbody");e&&i.current&&(e.style.marginTop="".concat(i.current.offsetHeight,"px"))}),200)};Object(g.useEffect)((function(){if(!r){var e=t.map((function(e){return Array.isArray(e)?e[1]:e})).reverse().join(" ‹ "),n=Object(ve.decodeEntities)(Object(te.sprintf)(Object(te.__)("%1$s ‹ %2$s — WooCommerce","woocommerce-admin"),e,c));document.title!==n&&(document.title=n)}}),[r,t,c]);var b=function(){f({android_app_banner_dismissed:"yes"})};return Object(g.createElement)("div",{className:h,ref:i},!p&&Object(g.createElement)(Ke,{onDismiss:b,onInstall:b}),Object(g.createElement)("div",{className:"woocommerce-layout__header-wrapper"},window.wcAdminFeatures.navigation&&Object(g.createElement)(Ot,null),Object(g.createElement)(be.e,{className:"woocommerce-layout__header-heading",as:"h1",variant:"subtitle.small"},Object(ve.decodeEntities)(u)),window.wcAdminFeatures["activity-panels"]&&Object(g.createElement)(Ge,{isEmbedded:r,query:o,userPreferencesData:Et(Et({},d),{},{updateUserPreferences:f})})))};function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v()(this,n)}}var xt=function(e){m()(n,e);var t=kt(n);function n(){return l()(this,n),t.apply(this,arguments)}return d()(n,[{key:"render",value:function(){return Object(g.createElement)("div",{id:"woocommerce-layout__notice-list",className:"woocommerce-layout__notice-list"})}}]),n}(g.Component),St=n(8),Ct=n.n(St),Pt=n(44),At=n.n(Pt),Tt=n(182),Nt=n(277);var Rt=function(e){var t=e.notices,n=e.className,r=e.children,i=e.onRemove,a=void 0===i?Q.noop:i,c=e.onRemove2,u=void 0===c?Q.noop:c,s=Object(w.useReducedMotion)(),l=Object(g.useState)((function(){return new WeakMap})),f=ge()(l,1)[0],d=Object(Tt.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=At()(Ct.a.mark((function t(n){return Ct.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n({opacity:1,height:f.get(e).offsetHeight});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},leave:function(){return function(){var e=At()(Ct.a.mark((function e(t){return Ct.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({opacity:0});case 2:return e.next=4,t({height:0});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},immediate:s});n=he()("components-snackbar-list",n);var p=function(e){return function(){a(e.id),u(e.id)}};return Object(g.createElement)("div",{className:n},r,d.map((function(e){var t=e.item,n=e.key,r=e.props;return Object(g.createElement)(Tt.animated.div,{key:n,style:r},Object(g.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&f.set(t,e)}},Object(g.createElement)(Nt.a,o()({},Object(Q.omit)(t,["content"]),{onRemove:p(t)}),t.content)))})))};n(306);function Lt(e){var t=Object(O.useDispatch)("core/notices").removeNotice,n=Object(O.useDispatch)("core/notices2").removeNotice,r=Object(O.useSelect)((function(e){return{notices:e("core/notices").getNotices(),notices2:e("core/notices2").getNotices()}})),o=e.className,i=he()("woocommerce-transient-notices","components-notices__snackbar",o),a=function(){var e=r.notices,t=r.notices2,n=void 0===t?[]:t;return e.concat(n)}();return Object(g.createElement)(Rt,{notices:a,className:i,onRemove:t,onRemove2:n})}Lt.propTypes={className:x.a.string,notices:x.a.array};var Mt=Lt;function It(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?It(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vt(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v()(this,n)}}Object(Xe.registerPlugin)("wc-admin-navigation",{render:function(){var e=Object(g.useState)(Object(Z.getPersistedQuery)()),t=ge()(e,2),n=t[0],r=t[1],o=function(e){return Object(Z.getQueryExcludedScreens)().includes(Object(Z.getScreenFromPath)(e))};if(Object(g.useEffect)((function(){return at((function(){setTimeout((function(){o()||r(Object(Z.getPersistedQuery)())}),0)}))}),[]),!Object(re.f)(window.location.href))return null;var i=Object(ne.a)().filter((function(e){return e.navArgs})),a=de().filter((function(e){return e.navArgs})).map((function(e){return"/analytics/settings"===e.path?Dt(Dt({},e),{},{breadcrumbs:[Object(te.__)("Analytics","woocommerce-admin")]}):e}));return Object(g.createElement)(g.Fragment,null,a.map((function(e){return Object(g.createElement)(Z.WooNavigationItem,{item:e.navArgs.id,key:e.navArgs.id},Object(g.createElement)(Y.Link,{className:"components-button",href:Object(Z.getNewPath)(o(e.path)?{}:n,e.path,{}),type:"wc-admin"},e.breadcrumbs[e.breadcrumbs.length-1]))})),i.map((function(e){return Object(g.createElement)(Z.WooNavigationItem,{item:e.navArgs.id,key:e.navArgs.id},Object(g.createElement)(Y.Link,{className:"components-button",href:Object(Z.getNewPath)(o(e.report)?{}:n,"/analytics/".concat(e.report),{}),type:"wc-admin"},e.title))})))}});var Ut=Object(g.lazy)((function(){return Promise.all([n.e(1),n.e(47)]).then(n.bind(null,611))})),qt=Object(g.lazy)((function(){return n.e(51).then(n.bind(null,509))})),zt=function(e){m()(n,e);var t=Bt(n);function n(){return l()(this,n),t.apply(this,arguments)}return d()(n,[{key:"render",value:function(){var e=this.props.children;return Object(g.createElement)("div",{className:"woocommerce-layout__primary",id:"woocommerce-layout__primary"},window.wcAdminFeatures["store-alerts"]&&Object(g.createElement)(g.Suspense,{fallback:Object(g.createElement)(Y.Spinner,null)},Object(g.createElement)(Ut,null)),Object(g.createElement)(xt,null),e)}}]),n}(g.Component),Ht=function(e){m()(n,e);var t=Bt(n);function n(){return l()(this,n),t.apply(this,arguments)}return d()(n,[{key:"componentDidMount",value:function(){this.recordPageViewTrack()}},{key:"componentDidUpdate",value:function(e){var t=Object(Q.get)(e,"location.pathname"),n=Object(Q.get)(this.props,"location.pathname");t&&n&&t!==n&&this.recordPageViewTrack()}},{key:"recordPageViewTrack",value:function(){var e=this.props,t=e.activePlugins,n=e.installedPlugins,r=e.isEmbedded,o=e.isJetpackConnected,i={has_navigation:!!window.wcNavigation};if(r){var a=document.location.pathname+document.location.search;Object(X.recordPageView)(a,Ft({is_embedded:!0},i))}else{var c=Object(Q.get)(this.props,"location.pathname");if(c){var u=c.substring(1).replace(/\//g,"_");0===u.length&&(u="home_screen"),Object(X.recordPageView)(u,Ft({jetpack_installed:n.includes("jetpack"),jetpack_active:t.includes("jetpack"),jetpack_connected:o},i))}}}},{key:"getQuery",value:function(e){if(!e)return{};var t=e.substring(1);return Object(G.parse)(t)}},{key:"isWCPaySettingsPage",value:function(){var e=Object(Z.getQuery)(),t=e.page,n=e.section,r=e.tab;return"wc-settings"===t&&"checkout"===r&&"woocommerce_payments"===n}},{key:"render",value:function(){var e=this.props,t=e.isEmbedded,n=a()(e,["isEmbedded"]),r=this.props,i=r.location,c=r.page.breadcrumbs,u=this.getQuery(i&&i.search);return Object(g.createElement)("div",{className:"woocommerce-layout"},Object(g.createElement)(_t,{sections:Object(Q.isFunction)(c)?c(this.props):c,isEmbedded:t,query:u}),Object(g.createElement)(Mt,null),!t&&Object(g.createElement)(zt,null,Object(g.createElement)("div",{className:"woocommerce-layout__main"},Object(g.createElement)(pe,o()({},n,{query:u})))),t&&this.isWCPaySettingsPage()&&Object(g.createElement)(g.Suspense,{fallback:null},Object(g.createElement)(qt,null)))}}]),n}(g.Component);Ht.propTypes={isEmbedded:x.a.bool,page:x.a.shape({container:x.a.oneOfType([x.a.func,x.a.object]),path:x.a.string,breadcrumbs:x.a.oneOfType([x.a.func,x.a.arrayOf(x.a.oneOfType([x.a.arrayOf(x.a.string),x.a.string]))]).isRequired,wpOpenMenu:x.a.string}).isRequired};var $t=Object(w.compose)(Object(J.withPluginsHydration)(Ft(Ft({},window.wcSettings.plugins||{}),{},{jetpackStatus:window.wcSettings.dataEndpoints&&window.wcSettings.dataEndpoints.jetpackStatus||!1})),Object(O.withSelect)((function(e,t){if(!t.isEmbedded){var n=e(J.PLUGINS_STORE_NAME),r=n.getActivePlugins,o=n.getInstalledPlugins,i=n.isJetpackConnected;return{activePlugins:r(),isJetpackConnected:i(),installedPlugins:o()}}})))(Ht),Wt=Object(w.compose)(window.wcSettings.preloadOptions?Object(J.withOptionsHydration)(Ft({},window.wcSettings.preloadOptions)):Q.identity)((function(){var e=Object(J.useUser)().currentUserCan;return Object(g.createElement)(I,{history:Object(Z.getHistory)()},Object(g.createElement)(W,null,de().filter((function(t){return!t.capability||e(t.capability)})).map((function(e){return Object(g.createElement)(B,{key:e.path,path:e.path,exact:!0,render:function(t){return Object(g.createElement)($t,o()({page:e},t))}})}))))})),Qt=Object(w.compose)(window.wcSettings.preloadOptions?Object(J.withOptionsHydration)(Ft({},window.wcSettings.preloadOptions)):Q.identity)((function(){return Object(g.createElement)($t,{page:{breadcrumbs:Object(K.g)("embedBreadcrumbs",[])},isEmbedded:!0})}))},142:function(e,t){!function(){e.exports=this.wc.number}()},15:function(e,t,n){var r=n(31),o=n(9);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},152:function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,c=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,m=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,O=r?Symbol.for("react.scope"):60119;function j(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case d:case a:case u:case c:case m:return e;default:switch(e=e&&e.$$typeof){case l:case p:case b:case v:case s:return e;default:return t}}case i:return t}}}function E(e){return j(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=s,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=b,t.Memo=v,t.Portal=i,t.Profiler=u,t.StrictMode=c,t.Suspense=m,t.isAsyncMode=function(e){return E(e)||j(e)===f},t.isConcurrentMode=E,t.isContextConsumer=function(e){return j(e)===l},t.isContextProvider=function(e){return j(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return j(e)===p},t.isFragment=function(e){return j(e)===a},t.isLazy=function(e){return j(e)===b},t.isMemo=function(e){return j(e)===v},t.isPortal=function(e){return j(e)===i},t.isProfiler=function(e){return j(e)===u},t.isStrictMode=function(e){return j(e)===c},t.isSuspense=function(e){return j(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===u||e===c||e===m||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===v||e.$$typeof===s||e.$$typeof===l||e.$$typeof===p||e.$$typeof===g||e.$$typeof===w||e.$$typeof===O||e.$$typeof===y)},t.typeOf=j},16:function(e,t){!function(){e.exports=this.moment}()},17:function(e,t){!function(){e.exports=this.wp.dataControls}()},18:function(e,t,n){var r=n(60),o=n(61),i=n(40),a=n(62);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()}},182:function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(24)),i=r(n(97)),a=n(10),c=r(a),u=r(n(305)),s=r(n(9)),l={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(l.str(e)||l.num(e))return e===t;if(l.obj(e)&&l.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!l.und(n)||e===t}};function f(){var e=a.useState(!1)[1];return a.useCallback((function(){return e((function(e){return!e}))}),[])}function d(e,t){return l.und(e)||l.nul(e)?t:e}function p(e){return l.und(e)?[]:l.arr(e)?e:[e]}function m(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return l.fun(e)?e.apply(void 0,n):e}function h(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,i(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(l.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var i;return l.und(t[r])?o({},n,((i={})[r]=e[r],i)):n}),{});return o({to:t},n)}var v,b,y=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),g=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof y&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof y&&e.removeChild(s(t))}))},t}return u(t,e),t}(y),w=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof y&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof y&&e.removeChild(s(t))}))},t}u(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof y)&&(t[n]=r instanceof y?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(y);function O(e,t){v={fn:e,transform:t}}function j(e){b=e}var E,_=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},k=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function x(e){E=e}var S,C=function(){return Date.now()};function P(e){S=e}var A,T,N=function(e){return e.current};function R(e){A=e}var L=Object.freeze({get applyAnimatedValues(){return v},injectApplyAnimatedValues:O,get colorNames(){return b},injectColorNames:j,get requestFrame(){return _},get cancelFrame(){return k},injectFrame:function(e,t){_=e,k=t},get interpolation(){return E},injectStringInterpolator:x,get now(){return C},injectNow:function(e){C=e},get defaultElement(){return S},injectDefaultElement:P,get animatedApi(){return N},injectAnimatedApi:function(e){N=e},get createAnimatedStyle(){return A},injectCreateAnimatedStyle:R,get manualFrameloop(){return T},injectManualFrameloop:function(e){T=e}}),M=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:A(t.style)}):t,r.update=n,r.attach(),r}return u(t,e),t}(w),I=!1,D=new Set,V=function e(){if(!I)return!1;var t=C(),n=D,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var i;if(r){if(o>=n.length)break;i=n[o++]}else{if((o=n.next()).done)break;i=o.value}for(var a=i,c=!1,u=0;u<a.configs.length;u++){for(var s=a.configs[u],l=void 0,f=void 0,d=0;d<s.animatedValues.length;d++){var p=s.animatedValues[d];if(!p.done){var m=s.fromValues[d],h=s.toValues[d],v=p.lastPosition,b=h instanceof y,g=Array.isArray(s.initialVelocity)?s.initialVelocity[d]:s.initialVelocity;if(b&&(h=h.getValue()),s.immediate)p.setValue(h),p.done=!0;else if("string"!=typeof m&&"string"!=typeof h){if(void 0!==s.duration)v=m+s.easing((t-p.startTime)/s.duration)*(h-m),l=t>=p.startTime+s.duration;else if(s.decay)v=m+g/(1-.998)*(1-Math.exp(-(1-.998)*(t-p.startTime))),(l=Math.abs(p.lastPosition-v)<.1)&&(h=v);else{f=void 0!==p.lastTime?p.lastTime:t,g=void 0!==p.lastVelocity?p.lastVelocity:s.initialVelocity,t>f+64&&(f=t);for(var w=Math.floor(t-f),O=0;O<w;++O){v+=1*(g+=1*((-s.tension*(v-h)+-s.friction*g)/s.mass)/1e3)/1e3}var j=!(!s.clamp||0===s.tension)&&(m<h?v>h:v<h),E=Math.abs(g)<=s.precision,k=0===s.tension||Math.abs(h-v)<=s.precision;l=j||E&&k,p.lastVelocity=g,p.lastTime=t}b&&!s.toValues[d].done&&(l=!1),l?(p.value!==h&&(v=h),p.done=!0):c=!0,p.setValue(v),p.lastPosition=v}else p.setValue(h),p.done=!0}}a.props.onFrame&&(a.values[s.name]=s.interpolation.getValue())}a.props.onFrame&&a.props.onFrame(a.values),c||(D.delete(a),a.stop(!0))}return D.size?T?T():_(e):I=!1,I};function F(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return F({range:e,output:t,extrapolate:n});if(E&&"string"==typeof e.output[0])return E(e);var r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",c=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,a,c,u){var s=u?u(e):e;if(s<t){if("identity"===a)return s;"clamp"===a&&(s=t)}if(s>n){if("identity"===c)return s;"clamp"===c&&(s=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t);s=i(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(e,i[t],i[t+1],o[t],o[t+1],u,a,c,r.map)}}var B=function(e){function t(n,r,o,i){var a;return(a=e.call(this)||this).calc=void 0,a.payload=n instanceof g&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],a.calc=F(r,o,i),a}u(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=F(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(g);var U=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}u(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new B(this,e,t,n)},t}(y),q=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new U(e)})),n}u(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new B(this,e,t)},t}(g),z=0,H=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=z++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),n=t.delay,r=void 0===n?0:n,a=t.to,c=i(t,["delay","to"]);if(l.arr(a)||l.fun(a))this.queue.push(o({},c,{delay:r,to:a}));else if(a){var u={};Object.entries(a).forEach((function(e){var t,n=e[0],i=e[1],a=o({to:(t={},t[n]=i,t),delay:m(r,n)},c),s=u[a.delay]&&u[a.delay].to;u[a.delay]=o({},u[a.delay],a,{to:o({},s,a.to)})})),this.queue=Object.values(u)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(c),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,i=e.to,a=void 0===i?{}:i;l.obj(r)&&(n.merged=o({},r,n.merged)),l.obj(a)&&(n.merged=o({},n.merged,a))}));var r=this.local=++this.guid,a=this.localQueue=this.queue;this.queue=[],a.forEach((function(t,o){var c=t.delay,u=i(t,["delay"]),s=function(t){o===a.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},f=l.arr(u.to)||l.fun(u.to);c?setTimeout((function(){r===n.guid&&(f?n.runAsync(u,s):n.diff(u).start(s))}),c):f?n.runAsync(u,s):n.diff(u).start(s)}))}else l.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,D.has(t)||D.add(t),I||(I=!0,_(T||V));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,D.has(t)&&D.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,i(e,["delay"])),a=this.local,c=Promise.resolve(void 0);if(l.arr(r.to))for(var u=function(e){var t=e,i=o({},r,h(r.to[t]));l.arr(i.config)&&(i.config=i.config[t]),c=c.then((function(){if(a===n.guid)return new Promise((function(e){return n.diff(i).start(e)}))}))},s=0;s<r.to.length;s++)u(s);else if(l.fun(r.to)){var f,d=0;c=c.then((function(){return r.to((function(e){var t=o({},r,h(e));if(l.arr(t.config)&&(t.config=t.config[d]),d++,a===n.guid)return f=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return f}))}))}c.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,i=void 0===r?{}:r,a=n.to,c=void 0===a?{}:a,u=n.config,s=void 0===u?{}:u,f=n.reverse,h=n.attach,v=n.reset,y=n.immediate;if(f){var g=[c,i];i=g[0],c=g[1]}this.merged=o({},i,this.merged,c),this.hasChanged=!1;var w=h&&h(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],a=n[1],c=e[r]||{},u=l.num(a),f=l.str(a)&&!a.startsWith("#")&&!/\d/.test(a)&&!b[a],h=l.arr(a),g=!u&&!h&&!f,O=l.und(i[r])?a:i[r],j=u||h||f?a:1,_=m(s,r);w&&(j=w.animations[r].parent);var k,x=c.parent,S=c.interpolation,P=p(w?j.getPayload():j),A=a;g&&(A=E({range:[0,1],output:[a,a]})(1));var T,N=S&&S.getValue(),R=!l.und(x)&&c.animatedValues.some((function(e){return!e.done})),L=!l.equ(A,N),M=!l.equ(A,c.previous),I=!l.equ(_,c.config);if(v||M&&L||I){var D;if(u||f)x=S=c.parent||new U(O);else if(h)x=S=c.parent||new q(O);else if(g){var V=c.interpolation&&c.interpolation.calc(c.parent.value);V=void 0===V||v?O:V,c.parent?(x=c.parent).setValue(0,!1):x=new U(0);var F={output:[V,a]};c.interpolation?(S=c.interpolation,c.interpolation.updateConfig(F)):S=x.interpolate(F)}return P=p(w?j.getPayload():j),k=p(x.getPayload()),v&&!g&&x.setValue(O,!1),t.hasChanged=!0,k.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=R?e.lastVelocity:void 0,e.lastTime=R?e.lastTime:void 0,e.startTime=C(),e.done=!1,e.animatedStyles.clear()})),m(y,r)&&x.setValue(g?j:a,!1),o({},e,((D={})[r]=o({},c,{name:r,parent:x,interpolation:S,animatedValues:k,toValues:P,previous:A,config:_,fromValues:p(x.getValue()),immediate:m(y,r),initialVelocity:d(_.velocity,0),clamp:d(_.clamp,!1),precision:d(_.precision,.01),tension:d(_.tension,170),friction:d(_.friction,26),mass:d(_.mass,1),duration:_.duration,easing:d(_.easing,(function(e){return e})),decay:_.decay}),D))}return L?e:(g&&(x.setValue(1,!1),S.updateConfig({output:[A,A]})),x.done=!0,t.hasChanged=!0,o({},e,((T={})[r]=o({},e[r],{previous:A}),T)))}),this.animations),this.hasChanged)for(var O in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[O]=this.animations[O].interpolation,this.values[O]=this.animations[O].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),$=function(e,t){var n=a.useRef(!1),r=a.useRef(),o=l.fun(t),i=a.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var i=new H,a=o?m(t,r,i):t[r];return 0===r&&(n=a.ref),i.update(a),n||i.start(),i})),n]}),[e]),c=i[0],u=i[1];r.current=c;a.useImperativeHandle(u,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=a.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?m(e,n,t):e[n]),u||t.start()}))}}),[e]);a.useEffect((function(){n.current?o||s(t):u||r.current.forEach((function(e){return e.start()}))})),a.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var f=r.current.map((function(e){return e.getValues()}));return o?[f,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:f},W=0,Q=function(e,t){return("function"==typeof t?e.map(t):p(t)).map(String)},G=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,a=i(e,["items","keys"]);return t=p(void 0!==t?t:null),o({items:t,keys:Q(t,r)},a)};function Y(e,t){var n=function(){if(o){if(i>=r.length)return"break";a=r[i++]}else{if((i=r.next()).done)return"break";a=i.value}var n=a.key,c=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(c),e.current.deleted=e.current.deleted.filter(c))},r=e.current.deleted,o=Array.isArray(r),i=0;for(r=o?r:r[Symbol.iterator]();;){var a;if("break"===n())break}e.current.forceUpdate()}var Z=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof y||(t=v.transform(t)),n.payload=t,n}return u(t,e),t}(w),K={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},J="[-+]?\\d*\\.?\\d+";function X(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+X(J,J,J)),te=new RegExp("rgba"+X(J,J,J,J)),ne=new RegExp("hsl"+X(J,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+X(J,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",J)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{6})$/,ce=/^#([0-9a-fA-F]{8})$/;function ue(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=ue(o,r,e+1/3),a=ue(o,r,e),c=ue(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*c)<<8}function le(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function fe(e){return(parseFloat(e)%360+360)%360/360}function de(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function pe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ae.exec(t))?parseInt(n[1]+"ff",16)>>>0:K.hasOwnProperty(t)?K[t]:(n=ee.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|255)>>>0:(n=te.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|de(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ce.exec(t))?parseInt(n[1],16)>>>0:(n=ie.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(fe(n[1]),pe(n[2]),pe(n[3])))>>>0:(n=re.exec(t))?(se(fe(n[1]),pe(n[2]),pe(n[3]))|de(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ve=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,be=new RegExp("("+Object.keys(K).join("|")+")","g"),ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ge=["Webkit","Ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}ye=Object.keys(ye).reduce((function(e,t){return ge.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ye);var Oe={};R((function(e){return new Z(e)})),P("div"),x((function(e){var t=e.output.map((function(e){return e.replace(ve,me)})).map((function(e){return e.replace(be,me)})),n=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(he).map((function(t,r){return F(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(he,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),j(K),O((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,a=t.scrollLeft,c=i(t,["style","children","scrollTop","scrollLeft"]),u="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var l=0===s.indexOf("--"),f=we(s,n[s],l);"float"===s&&(s="cssFloat"),l?e.style.setProperty(s,f):e.style[s]=f}for(var d in c){var p=u?d:Oe[d]||(Oe[d]=d.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(p)&&e.setAttribute(p,c[d])}}),(function(e){return e}));var je,Ee,_e=(je=function(e){return a.forwardRef((function(t,n){var r=f(),u=a.useRef(!0),s=a.useRef(null),d=a.useRef(null),p=a.useCallback((function(e){var t=s.current;s.current=new M(e,(function(){var e=!1;d.current&&(e=v.fn(d.current,s.current.getAnimatedValue())),d.current&&!1!==e||r()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){u.current=!1,s.current&&s.current.detach()}}),[]),a.useImperativeHandle(n,(function(){return N(d,u,r)})),p(t);var m,h=s.current.getValue(),b=(h.scrollTop,h.scrollLeft,i(h,["scrollTop","scrollLeft"])),y=(m=e,!l.fun(m)||m.prototype instanceof c.Component?function(e){return d.current=function(e,t){return t&&(l.fun(t)?t(e):l.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return c.createElement(e,o({},b,{ref:y}))}))},void 0===(Ee=!1)&&(Ee=!0),function(e){return(l.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=Ee?t[0].toLowerCase()+t.substring(1):t;return e[n]=je(n),e}),je)}),ke=_e(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=_e,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=V,t.animated=ke,t.a=ke,t.interpolate=function(e,t,n){return e&&new B(e,t,n)},t.Globals=L,t.useSpring=function(e){var t=l.fun(e),n=$(1,t?e:[e]),r=n[0],o=n[1],i=n[2];return t?[r[0],o,i]:r},t.useTrail=function(e,t){var n=a.useRef(!1),r=l.fun(t),i=m(t),c=a.useRef(),u=$(e,(function(e,t){return 0===e&&(c.current=[]),c.current.push(t),o({},i,{config:m(i.config,e),attach:e>0&&function(){return c.current[e-1]}})})),s=u[0],f=u[1],d=u[2],p=a.useMemo((function(){return function(e){return f((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,a=c.current[r];return o({},e,{config:m(e.config||i.config,t),attach:a&&function(){return a}})}))}}),[e,i.reverse]);return a.useEffect((function(){n.current&&!r&&p(t)})),a.useEffect((function(){n.current=!0}),[]),r?[s,p,d]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),c=G(r),u=c.lazy,s=void 0!==u&&u,l=(c.unique,c.reset),d=void 0!==l&&l,p=(c.enter,c.leave,c.update,c.onDestroyed),h=(c.keys,c.items,c.onFrame),v=c.onRest,b=c.onStart,y=c.ref,g=i(c,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),w=f(),O=a.useRef(!1),j=a.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!O.current&&new Map,forceUpdate:w});return a.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(j.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(j.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(j.current.instances).map((function(e){return e[1]}))}}})),j.current=function(e,t){var n=e.first,r=e.prevProps,a=i(e,["first","prevProps"]),c=G(t),u=c.items,s=c.keys,l=c.initial,f=c.from,d=c.enter,p=c.leave,h=c.update,v=c.trail,b=void 0===v?0:v,y=c.unique,g=c.config,w=c.order,O=void 0===w?["enter","leave","update"]:w,j=G(r),E=j.keys,_=j.items,k=o({},a.current),x=[].concat(a.deleted),S=Object.keys(k),C=new Set(S),P=new Set(s),A=s.filter((function(e){return!C.has(e)})),T=a.transitions.filter((function(e){return!e.destroyed&&!P.has(e.originalKey)})).map((function(e){return e.originalKey})),N=s.filter((function(e){return C.has(e)})),R=-b;for(;O.length;){switch(O.shift()){case"enter":A.forEach((function(e,t){y&&x.find((function(t){return t.originalKey===e}))&&(x=x.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=u[r],i=n&&void 0!==l?"initial":"enter";k[e]={slot:i,originalKey:e,key:y?String(e):W++,item:o,trail:R+=b,config:m(g,o,i),from:m(n&&void 0!==l?l||{}:f,o),to:m(d,o)}}));break;case"leave":T.forEach((function(e){var t=E.indexOf(e),n=_[t];x.unshift(o({},k[e],{slot:"leave",destroyed:!0,left:E[Math.max(0,t-1)],right:E[Math.min(E.length,t+1)],trail:R+=b,config:m(g,n,"leave"),to:m(p,n)})),delete k[e]}));break;case"update":N.forEach((function(e){var t=s.indexOf(e),n=u[t];k[e]=o({},k[e],{item:n,slot:"update",trail:R+=b,config:m(g,n,"update"),to:m(h,n)})}))}}var L=s.map((function(e){return k[e]}));return x.forEach((function(e){var t,n=e.left,r=(e.right,i(e,["left","right"]));-1!==(t=L.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),L=[].concat(L.slice(0,t),[r],L.slice(t))})),o({},a,{changed:A.length||T.length||N.length,first:n&&0===A.length,transitions:L,current:k,deleted:x,prevProps:t})}(j.current,r),j.current.changed&&j.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,i=e.config,a=e.trail,c=e.key,u=e.item;j.current.instances.has(c)||j.current.instances.set(c,new H);var l=j.current.instances.get(c),f=o({},g,{to:r,from:n,config:i,ref:y,onRest:function(n){j.current.mounted&&(e.destroyed&&(y||s||Y(j,c),p&&p(u)),!Array.from(j.current.instances).some((function(e){return!e[1].idle}))&&(y||s)&&j.current.deleted.length>0&&Y(j),v&&v(u,t,n))},onStart:b&&function(){return b(u,t)},onFrame:h&&function(e){return h(u,t,e)},delay:a,reset:d&&"enter"===t});l.update(f),j.current.paused||l.start()})),a.useEffect((function(){return j.current.mounted=O.current=!0,function(){j.current.mounted=O.current=!1,Array.from(j.current.instances).map((function(e){return e[1].destroy()})),j.current.instances.clear()}}),[]),j.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:j.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=a.useRef();a.useEffect((function(){l.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var i=e.current;if(i){var a=i.controllers;if(a.length){var c=n*t[r];a.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+c})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=$},183:function(e,t,n){"use strict";(function(e){var r=n(10),o=n.n(r),i=n(38),a=n(1),c=n.n(a),u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:{};function s(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var l=o.a.createContext||function(e,t){var n,o,a,l="__create-react-context-"+((u[a="__global_unique_id__"]=(u[a]||0)+1)+"__"),f=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=s(t.props.value),t}Object(i.a)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[l]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((i=r)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?n=0:(n="function"==typeof t?t(r,o):1073741823,0!==(n|=0)&&this.emitter.set(e.value,n))}var i,a},r.render=function(){return this.props.children},n}(r.Component);f.childContextTypes=((n={})[l]=c.a.object.isRequired,n);var d=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(i.a)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?1073741823:t},r.componentDidMount=function(){this.context[l]&&this.context[l].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?1073741823:e},r.componentWillUnmount=function(){this.context[l]&&this.context[l].off(this.onUpdate)},r.getValue=function(){return this.context[l]?this.context[l].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return d.contextTypes=((o={})[l]=c.a.object,o),{Provider:f,Consumer:d}};t.a=l}).call(this,n(84))},184:function(e,t,n){var r=n(307);e.exports=p,e.exports.parse=i,e.exports.compile=function(e,t){return c(i(e,t),t)},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=d;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,a=0,c="",l=t&&t.delimiter||"/";null!=(n=o.exec(e));){var f=n[0],d=n[1],p=n.index;if(c+=e.slice(a,p),a=p+f.length,d)c+=d[1];else{var m=e[a],h=n[2],v=n[3],b=n[4],y=n[5],g=n[6],w=n[7];c&&(r.push(c),c="");var O=null!=h&&null!=m&&m!==h,j="+"===g||"*"===g,E="?"===g||"*"===g,_=n[2]||l,k=b||y;r.push({name:v||i++,prefix:h||"",delimiter:_,optional:E,repeat:j,partial:O,asterisk:!!w,pattern:k?s(k):w?".*":"[^"+u(_)+"]+?"})}}return a<e.length&&(c+=e.substr(a)),c&&r.push(c),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function c(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",f(t)));return function(t,o){for(var i="",c=t||{},u=(o||{}).pretty?a:encodeURIComponent,s=0;s<e.length;s++){var l=e[s];if("string"!=typeof l){var f,d=c[l.name];if(null==d){if(l.optional){l.partial&&(i+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(d)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(d)+"`");if(0===d.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var p=0;p<d.length;p++){if(f=u(d[p]),!n[s].test(f))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===p?l.prefix:l.delimiter)+f}}else{if(f=l.asterisk?encodeURI(d).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):u(d),!n[s].test(f))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+f+'"');i+=l.prefix+f}}else i+=l}return i}}function u(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function l(e,t){return e.keys=t,e}function f(e){return e&&e.sensitive?"":"i"}function d(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",c=0;c<e.length;c++){var s=e[c];if("string"==typeof s)a+=u(s);else{var d=u(s.prefix),p="(?:"+s.pattern+")";t.push(s),s.repeat&&(p+="(?:"+d+p+")*"),a+=p=s.optional?s.partial?d+"("+p+")?":"(?:"+d+"("+p+"))?":d+"("+p+")"}}var m=u(n.delimiter||"/"),h=a.slice(-m.length)===m;return o||(a=(h?a.slice(0,-m.length):a)+"(?:"+m+"(?=$))?"),a+=i?"$":o&&h?"":"(?="+m+"|$)",l(new RegExp("^"+a,f(n)),t)}function p(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(p(e[o],t,n).source);return l(new RegExp("(?:"+r.join("|")+")",f(n)),t)}(e,t,n):function(e,t,n){return d(i(e,n),t,n)}(e,t,n)}},19:function(e,t,n){var r=n(57),o=n(58),i=n(40),a=n(59);e.exports=function(e){return r(e)||o(e)||i(e)||a()}},196:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(3);function o(e,t){return Object(r.filter)(e,(function(e){var n=e.is_deleted,r=e.date_created_gmt,o=e.status;if(!n)return(!t||!r||new Date(r+"Z").getTime()>t)&&"unactioned"===o})).length}function i(e){return Object(r.filter)(e,(function(e){return!e.is_deleted})).length>0}},197:function(e,t,n){"use strict";var r=n(36),o=n(55),i=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,c=void 0===n?24:n,u=Object(o.a)(e,["icon","size"]);return Object(i.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:c,height:c},u))}},2:function(e,t){!function(){e.exports=this.wp.i18n}()},20:function(e,t){!function(){e.exports=this.wp.compose}()},21:function(e,t){!function(){e.exports=this.wc.navigation}()},22:function(e,t){!function(){e.exports=this.wc.data}()},23:function(e,t){!function(){e.exports=this.wp.url}()},24:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},25:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return p})),n.d(t,"g",(function(){return m})),n.d(t,"h",(function(){return h})),n.d(t,"f",(function(){return v}));var r=n(31),o=n.n(r),i=n(2),a=["wcAdminSettings","preloadSettings"],c="object"===("undefined"==typeof wcSettings?"undefined":o()(wcSettings))?wcSettings:{},u=Object.keys(c).reduce((function(e,t){return a.includes(t)||(e[t]=c[t]),e}),{}),s=u.adminUrl,l=(u.countries,u.currency),f=u.locale,d=u.orderStatuses,p=(u.siteTitle,u.wcAssetUrl);function m(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e};if(a.includes(e))throw new Error(Object(i.__)("Mutable settings should be accessed via data store."));var r=u.hasOwnProperty(e)?u[e]:t;return n(r,t)}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e};if(a.includes(e))throw new Error(Object(i.__)("Mutable settings should be mutated via data store."));u[e]=n(t)}function v(e){return(s||"")+e}},26:function(e,t){!function(){e.exports=this.wp.apiFetch}()},27:function(e,t){!function(){e.exports=this.wc.tracks}()},277:function(e,t,n){"use strict";(function(e){var r=n(0),o=n(3),i=n(6),a=n.n(i),c=n(140),u=n(2),s=(n(278),n(4));t.a=Object(r.forwardRef)((function(t,n){var i=t.className,l=t.children,f=t.spokenMessage,d=void 0===f?l:f,p=t.politeness,m=void 0===p?"polite":p,h=t.actions,v=void 0===h?[]:h,b=t.onRemove,y=void 0===b?o.noop:b,g=t.icon,w=void 0===g?null:g,O=t.explicitDismiss,j=void 0!==O&&O,E=t.onDismiss,_=void 0===E?null:E;function k(e){e&&e.preventDefault&&e.preventDefault(),_(),y()}_=_||o.noop,function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(c.a)(n,t)}),[n,t])}(d,m),Object(r.useEffect)((function(){var e=setTimeout((function(){j||(_(),y())}),1e4);return function(){return clearTimeout(e)}}),[j,_,y]);var x=a()(i,"components-snackbar",{"components-snackbar-explicit-dismiss":!!j});v&&v.length>1&&(void 0!==e&&e.env,v=[v[0]]);var S=a()("components-snackbar__content",{"components-snackbar__content-with-icon":!!w});return Object(r.createElement)("div",{ref:n,className:x,onClick:j?o.noop:k,tabIndex:"0",role:j?"":"button",onKeyPress:j?o.noop:k,"aria-label":j?"":Object(u.__)("Dismiss this notice")},Object(r.createElement)("div",{className:S},w&&Object(r.createElement)("div",{className:"components-snackbar__icon"},w),l,v.map((function(e,t){var n=e.label,o=e.onClick,i=e.url;return Object(r.createElement)(s.Button,{key:t,href:i,isTertiary:!0,onClick:function(e){return function(e,t){e.stopPropagation(),y(),t&&t(e)}(e,o)},className:"components-snackbar__action"},n)})),j&&Object(r.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:k,onKeyPress:k},"✕")))}))}).call(this,n(125))},278:function(e,t,n){"use strict";(function(e){function r(t){void 0!==e&&e.env}n.d(t,"a",(function(){return r}))}).call(this,n(125))},279:function(e,t){!function(){e.exports=this.wc.customerEffortScore}()},286:function(e,t,n){"use strict";n.d(t,"a",(function(){return q}));var r={};n.r(r),n.d(r,"setCesSurveyQueue",(function(){return P})),n.d(r,"addCesSurvey",(function(){return A})),n.d(r,"addCesSurveyForAnalytics",(function(){return T}));var o={};n.r(o),n.d(o,"getCesSurveyQueue",(function(){return M}));var i={};n.r(i),n.d(i,"getCesSurveyQueue",(function(){return I}));var a=n(19),c=n.n(a),u=n(5),s=n.n(u),l=n(18),f=n.n(l),d=n(0),p=n(1),m=n.n(p),h=n(27),v=n(279),b=n.n(v),y=n(20),g=n(11),w=n(22),O=n(2);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e){var t=e.action,n=e.trackProps,r=e.label,o=e.onSubmitLabel,i=void 0===o?Object(O.__)("Thank you for your feedback!","woocommerce-admin"):o,a=e.cesShownForActions,u=e.allowTracking,l=e.resolving,p=e.storeAgeInWeeks,m=e.updateOptions,v=e.createNotice,y=Object(d.useState)(!1),g=f()(y,2),w=g[0],j=g[1];if(l)return null;if(!u)return null;if(-1!==a.indexOf(t)&&!w)return null;var _=function(){m(s()({},"woocommerce_ces_shown_for_actions",[t].concat(c()(a))))};return Object(d.createElement)(b.a,{recordScoreCallback:function(e,r){Object(h.recordEvent)("ces_feedback",E({action:t,score:e,comments:r||"",store_age:p},n)),v("success",i)},label:r,onNoticeShownCallback:function(){Object(h.recordEvent)("ces_snackbar_view",E({action:t,store_age:p},n))},onNoticeDismissedCallback:function(){Object(h.recordEvent)("ces_snackbar_dismiss",E({action:t,store_age:p},n)),_()},onModalShownCallback:function(){j(!0),Object(h.recordEvent)("ces_view",E({action:t,store_age:p},n)),_()},icon:Object(d.createElement)("span",{style:{height:21,width:21},role:"img","aria-label":Object(O.__)("Pencil icon","woocommerce-admin")},"✏️")})}_.propTypes={action:m.a.string.isRequired,trackProps:m.a.object,label:m.a.string.isRequired,onSubmitLabel:m.a.string,cesShownForActions:m.a.arrayOf(m.a.string).isRequired,allowTracking:m.a.bool,resolving:m.a.bool.isRequired,storeAgeInWeeks:m.a.number,updateOptions:m.a.func,createNotice:m.a.func};var k=Object(y.compose)(Object(g.withSelect)((function(e){var t=e(w.OPTIONS_STORE_NAME),n=t.getOption,r=t.isResolving,o=n("woocommerce_ces_shown_for_actions")||[],i=function(e){if(0===e)return null;var t=Date.now()-1e3*e;return Math.round(t/w.WEEK)}(n("woocommerce_admin_install_timestamp")||0);return{cesShownForActions:o,allowTracking:"yes"===(n("woocommerce_allow_tracking")||"no"),storeAgeInWeeks:i,resolving:r("getOption",["woocommerce_ces_shown_for_actions"])||null===i||r("getOption",["woocommerce_admin_install_timestamp"])||r("getOption",["woocommerce_allow_tracking"])}})),Object(g.withDispatch)((function(e){return{updateOptions:e(w.OPTIONS_STORE_NAME).updateOptions,createNotice:e("core/notices").createNotice}})))(_),x=n(76),S=n(17),C={SET_CES_SURVEY_QUEUE:"SET_CES_SURVEY_QUEUE",ADD_CES_SURVEY:"ADD_CES_SURVEY"};function P(e){return{type:C.SET_CES_SURVEY_QUEUE,queue:e}}function A(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.pagenow,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window.adminpage,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;return{type:C.ADD_CES_SURVEY,action:e,label:t,pageNow:n,adminPage:r,onsubmit_label:o}}function T(){return A("analytics_filtered",Object(O.__)("How easy was it to filter your store analytics?","woocommerce-admin"),"woocommerce_page_wc-admin","woocommerce_page_wc-admin")}var N=n(8),R=n.n(N),L=R.a.mark(M);function M(){var e;return R.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(S.apiFetch)({path:"".concat(x.a,"/options?options=").concat(x.b)});case 2:if(!(e=t.sent)){t.next=8;break}return t.next=6,P(e[x.b]||[]);case 6:t.next=9;break;case 8:throw new Error;case 9:case"end":return t.stop()}}),L)}function I(e){return e.queue}function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var F={queue:[]},B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case C.SET_CES_SURVEY_QUEUE:return V(V({},e),{},{queue:t.queue});case C.ADD_CES_SURVEY:var n=e.queue.filter((function(e){return e.action===t.action}));if(n.length)return e;var r={action:t.action,label:t.label,pagenow:t.pageNow,adminpage:t.adminPage,onSubmitLabel:t.onSubmitLabel};return V(V({},e),{},{queue:[].concat(c()(e.queue),[r])});default:return e}};Object(g.registerStore)(x.c,{actions:r,selectors:i,resolvers:o,controls:S.controls,reducer:B});function U(e){var t=e.queue,n=e.resolving,r=e.clearQueue;if(n)return null;var o=t.filter((function(e){return e.pagenow===window.pagenow&&e.adminpage===window.adminpage}));return o.length&&r(),Object(d.createElement)(d.Fragment,null,o.map((function(e,t){return Object(d.createElement)(k,{key:t,action:e.action,label:e.label,onSubmitLabel:e.onsubmit_label,trackProps:e.props||{}})})))}U.propTypes={queue:m.a.arrayOf(m.a.object),resolving:m.a.bool,clearQueue:m.a.func};var q=Object(y.compose)(Object(g.withSelect)((function(e){var t=e(x.c),n=t.getCesSurveyQueue,r=t.isResolving;return{queue:n(),resolving:r("getOption",[x.b])}})),Object(g.withDispatch)((function(e){var t=e(w.OPTIONS_STORE_NAME).updateOptions;return{clearQueue:function(){t({woocommerce_clear_ces_tracks_queue_for_page:{pagenow:window.pagenow,adminpage:window.adminpage}})}}})))(U)},29:function(e,t){!function(){e.exports=this.wc.date}()},294:function(e,t,n){"use strict";n.r(t),function(e){var t=n(0),r=(n(469),n(22)),o=(n(296),n(141)),i=n(286);n.p=e.wcAdminAssets.path;var a,c=document.getElementById("root"),u=document.getElementById("woocommerce-embedded-root"),s=window.wcSettings.currentUserData;if(c){var l=Object(r.withSettingsHydration)("wc_admin",window.wcSettings)(o.b);window.wcSettings.preloadSettings&&window.wcSettings.preloadSettings.general&&(l=Object(r.withSettingsHydration)("general",{general:window.wcSettings.preloadSettings.general})(l)),s&&(l=Object(r.withCurrentUserHydration)(s)(l)),Object(t.render)(Object(t.createElement)(l,null),c)}else if(u){var f=Object(r.withSettingsHydration)("wc_admin",window.wcSettings)(o.a);s&&(f=Object(r.withCurrentUserHydration)(s)(f)),Object(t.render)(Object(t.createElement)(f,null),u),u.classList.remove("is-embed-loading");var d=document.getElementById("wpbody-content"),p=d.querySelector(".wrap.woocommerce")||d.querySelector('[class="wrap"]'),m=document.createElement("div");Object(t.render)(Object(t.createElement)("div",{className:"woocommerce-layout"},Object(t.createElement)(o.c,null)),d.insertBefore(m,p))}window.wcAdminFeatures&&!0===window.wcAdminFeatures["customer-effort-score-tracks"]&&(a=c||u,Object(t.render)(Object(t.createElement)(i.a,null),a.insertBefore(document.createElement("div"),null)))}.call(this,n(84))},296:function(e,t,n){},297:function(e,t,n){},298:function(e,t,n){},299:function(e,t,n){},3:function(e,t){!function(){e.exports=this.lodash}()},30:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return s}));var r=n(4),o=r.Navigation||r.__experimentalNavigation,i=(r.NavigationBackButton||r.__experimentalNavigationBackButton,r.NavigationGroup||r.__experimentalNavigationGroup),a=r.NavigationMenu||r.__experimentalNavigationMenu,c=r.NavigationItem||r.__experimentalNavigationItem,u=r.Text||r.__experimentalText,s=r.useSlot||r.__experimentalUseSlot},300:function(e,t,n){},301:function(e,t,n){},302:function(e,t,n){},303:function(e,t,n){},304:function(e,t,n){},305:function(e,t,n){var r=n(72);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}},306:function(e,t,n){},307:function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},31:function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},32:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},34:function(e,t,n){var r=n(97);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},36:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},37:function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},38:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,"a",(function(){return o}))},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t,n){var r=n(37);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},41:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},42:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},43:function(e,t){!function(){e.exports=this.wp.hooks}()},44:function(e,t){function n(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function c(e){n(a,o,i,c,u,"next",e)}function u(e){n(a,o,i,c,u,"throw",e)}c(void 0)}))}}},469:function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"createNotice",(function(){return h})),n.d(r,"createSuccessNotice",(function(){return v})),n.d(r,"createInfoNotice",(function(){return b})),n.d(r,"createErrorNotice",(function(){return y})),n.d(r,"createWarningNotice",(function(){return g})),n.d(r,"removeNotice",(function(){return w}));var o={};n.r(o),n.d(o,"getNotices",(function(){return j}));var i=n(11),a=n(82),c=n(3),u=n(36);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e){return function(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=r[e];if(void 0===o)return n;var i=t(n[o],r);return i===n[o]?n:l({},n,Object(u.a)({},o,i))}}}("context")((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CREATE_NOTICE":return[].concat(Object(a.a)(Object(c.reject)(e,{id:t.notice.id})),[t.notice]);case"REMOVE_NOTICE":return Object(c.reject)(e,{id:t.id})}return e})),d=n(8),p=n.n(d),m=p.a.mark(h);function h(){var e,t,n,r,o,i,a,u,s,l,f,d,h,v,b,y,g=arguments;return p.a.wrap((function(p){for(;;)switch(p.prev=p.next){case 0:if(e=g.length>0&&void 0!==g[0]?g[0]:"info",t=g.length>1?g[1]:void 0,n=g.length>2&&void 0!==g[2]?g[2]:{},r=n.speak,o=void 0===r||r,i=n.isDismissible,a=void 0===i||i,u=n.context,s=void 0===u?"global":u,l=n.id,f=void 0===l?Object(c.uniqueId)(s):l,d=n.actions,h=void 0===d?[]:d,v=n.type,b=void 0===v?"default":v,y=n.__unstableHTML,t=String(t),!o){p.next=8;break}return p.next=8,{type:"SPEAK",message:t,ariaLive:"snackbar"===b?"polite":"assertive"};case 8:return p.next=10,{type:"CREATE_NOTICE",context:s,notice:{id:f,status:e,content:t,__unstableHTML:y,isDismissible:a,actions:h,type:b}};case 10:case"end":return p.stop()}}),m)}function v(e,t){return h("success",e,t)}function b(e,t){return h("info",e,t)}function y(e,t){return h("error",e,t)}function g(e,t){return h("warning",e,t)}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";return{type:"REMOVE_NOTICE",id:e,context:t}}var O=[];function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";return e[t]||O}var E=n(140),_={SPEAK:function(e){Object(E.a)(e.message,e.ariaLive||"assertive")}};Object(i.registerStore)("core/notices",{reducer:f,actions:r,selectors:o,controls:_})},47:function(e,t){!function(){e.exports=this.wc.components}()},481:function(e,t){!function(){e.exports=this.wc.csvExport}()},49:function(e,t,n){"use strict";var r=n(90),o=n(91),i=n(52);e.exports={formats:i,parse:o,stringify:r}},497:function(e,t,n){"use strict";var r=n(0),o=n(67),i=Object(r.createElement)(o.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.a,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=i},5:function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},50:function(e,t){!function(){e.exports=this.ReactDOM}()},52:function(e,t,n){"use strict";var r=String.prototype.replace,o=/%20/g,i="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return r.call(e,o,"+")},RFC3986:function(e){return String(e)}},RFC1738:i,RFC3986:a}},54:function(e,t,n){"use strict";function r(e){"complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",e):e()}n.d(t,"a",(function(){return r}))},55:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(42);function o(e,t){if(null==e)return{};var n,o,i=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},56:function(e,t,n){"use strict";t.a=function(e,t){if(!e)throw new Error("Invariant failed")}},57:function(e,t,n){var r=n(37);e.exports=function(e){if(Array.isArray(e))return r(e)}},58:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},59:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},6:function(e,t,n){!function(){"use strict";var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)&&o.length){var a=n.apply(null,o);a&&e.push(a)}else if("object"===i)for(var c in o)t.call(o,c)&&o[c]&&e.push(c)}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],(function(){return n})):window.classNames=n}()},60:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},61:function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}},62:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},67:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return f}));var r=n(36),o=n(55),i=n(6),a=n.n(i),c=n(0);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=function(e){return Object(c.createElement)("path",e)},f=function(e){var t=e.className,n=e.isPressed,r=s(s({},Object(o.a)(e,["className","isPressed"])),{},{className:a()(t,{"is-pressed":n})||void 0,role:"img","aria-hidden":!0,focusable:!1});return Object(c.createElement)("svg",r)}},68:function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new E(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===l)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=s(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var l={};function f(){}function d(){}function p(){}var m={};m[o]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(_([])));v&&v!==t&&n.call(v,o)&&(m=v);var b=p.prototype=f.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var r;this._invoke=function(o,i){function a(){return new t((function(r,a){!function r(o,i,a,c){var u=s(e[o],e,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function _(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=b.constructor=p,p.constructor=d,d.displayName=c(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,a,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},y(g.prototype),g.prototype[i]=function(){return this},e.AsyncIterator=g,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new g(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(b),c(b,a,"Generator"),b[o]=function(){return this},b.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=_,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},69:function(e,t,n){"use strict";var r=n(52),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],a=o.obj[o.prop],c=Object.keys(a),u=0;u<c.length;++u){var s=c[u],l=a[s];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(t.push({obj:a,prop:s}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,o,i){if(0===e.length)return e;var c=e;if("symbol"==typeof e?c=Symbol.prototype.toString.call(e):"string"!=typeof e&&(c=String(e)),"iso-8859-1"===n)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",s=0;s<c.length;++s){var l=c.charCodeAt(s);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===r.RFC1738&&(40===l||41===l)?u+=c.charAt(s):l<128?u+=a[l]:l<2048?u+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?u+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(s+=1,l=65536+((1023&l)<<10|1023&c.charCodeAt(s)),u+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(i(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!o.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return i(t)&&!i(n)&&(a=c(t,r)),i(t)&&i(n)?(n.forEach((function(n,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&n&&"object"==typeof n?t[i]=e(a,n,r):t.push(n)}else t[i]=n})),t):Object.keys(n).reduce((function(t,i){var a=n[i];return o.call(t,i)?t[i]=e(t[i],a,r):t[i]=a,t}),a)}}},7:function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},70:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},71:function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"c",(function(){return j})),n.d(t,"b",(function(){return m})),n.d(t,"e",(function(){return h})),n.d(t,"d",(function(){return p}));var r=n(32);function o(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}var a=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],c=e&&o(e),u=t&&o(t),s=c||u;if(e&&o(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var l=a[a.length-1];n="."===l||".."===l||""===l}else n=!1;for(var f=0,d=a.length;d>=0;d--){var p=a[d];"."===p?i(a,d):".."===p?(i(a,d),f++):f&&(i(a,d),f--)}if(!s)for(;f--;f)a.unshift("..");!s||""===a[0]||a[0]&&o(a[0])||a.unshift("");var m=a.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};function c(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=c(t),o=c(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},s=n(56);function l(e){return"/"===e.charAt(0)?e:"/"+e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function m(e,t,n,o){var i;"string"==typeof e?(i=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=Object(r.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(i.key=n),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function h(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var b=!("undefined"==typeof window||!window.document||!window.document.createElement);function y(e,t){t(window.confirm(e))}function g(){try{return window.history.state||{}}catch(e){return{}}}function w(e){void 0===e&&(e={}),b||Object(s.a)(!1);var t,n=window.history,o=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=e,c=a.forceRefresh,u=void 0!==c&&c,h=a.getUserConfirmation,w=void 0===h?y:h,O=a.keyLength,j=void 0===O?6:O,E=e.basename?d(l(e.basename)):"";function _(e){var t=e||{},n=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return E&&(i=f(i,E)),m(i,r,n)}function k(){return Math.random().toString(36).substr(2,j)}var x=v();function S(e){Object(r.a)(F,e),F.length=n.length,x.notifyListeners(F.location,F.action)}function C(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||T(_(e.state))}function P(){T(_(g()))}var A=!1;function T(e){if(A)A=!1,S();else{x.confirmTransitionTo(e,"POP",w,(function(t){t?S({action:"POP",location:e}):function(e){var t=F.location,n=R.indexOf(t.key);-1===n&&(n=0);var r=R.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(A=!0,M(o))}(e)}))}}var N=_(g()),R=[N.key];function L(e){return E+p(e)}function M(e){n.go(e)}var I=0;function D(e){1===(I+=e)&&1===e?(window.addEventListener("popstate",C),i&&window.addEventListener("hashchange",P)):0===I&&(window.removeEventListener("popstate",C),i&&window.removeEventListener("hashchange",P))}var V=!1;var F={length:n.length,action:"POP",location:N,createHref:L,push:function(e,t){var r=m(e,t,k(),F.location);x.confirmTransitionTo(r,"PUSH",w,(function(e){if(e){var t=L(r),i=r.key,a=r.state;if(o)if(n.pushState({key:i,state:a},null,t),u)window.location.href=t;else{var c=R.indexOf(F.location.key),s=R.slice(0,c+1);s.push(r.key),R=s,S({action:"PUSH",location:r})}else window.location.href=t}}))},replace:function(e,t){var r=m(e,t,k(),F.location);x.confirmTransitionTo(r,"REPLACE",w,(function(e){if(e){var t=L(r),i=r.key,a=r.state;if(o)if(n.replaceState({key:i,state:a},null,t),u)window.location.replace(t);else{var c=R.indexOf(F.location.key);-1!==c&&(R[c]=r.key),S({action:"REPLACE",location:r})}else window.location.replace(t)}}))},go:M,goBack:function(){M(-1)},goForward:function(){M(1)},block:function(e){void 0===e&&(e=!1);var t=x.setPrompt(e);return V||(D(1),V=!0),function(){return V&&(V=!1,D(-1)),t()}},listen:function(e){var t=x.appendListener(e);return D(1),function(){D(-1),t()}}};return F}function O(e,t,n){return Math.min(Math.max(e,t),n)}function j(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,o=t.initialEntries,i=void 0===o?["/"]:o,a=t.initialIndex,c=void 0===a?0:a,u=t.keyLength,s=void 0===u?6:u,l=v();function f(e){Object(r.a)(w,e),w.length=w.entries.length,l.notifyListeners(w.location,w.action)}function d(){return Math.random().toString(36).substr(2,s)}var h=O(c,0,i.length-1),b=i.map((function(e){return m(e,void 0,"string"==typeof e?d():e.key||d())})),y=p;function g(e){var t=O(w.index+e,0,w.entries.length-1),r=w.entries[t];l.confirmTransitionTo(r,"POP",n,(function(e){e?f({action:"POP",location:r,index:t}):f()}))}var w={length:b.length,action:"POP",location:b[h],index:h,entries:b,createHref:y,push:function(e,t){var r=m(e,t,d(),w.location);l.confirmTransitionTo(r,"PUSH",n,(function(e){if(e){var t=w.index+1,n=w.entries.slice(0);n.length>t?n.splice(t,n.length-t,r):n.push(r),f({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=m(e,t,d(),w.location);l.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(w.entries[w.index]=r,f({action:"REPLACE",location:r}))}))},go:g,goBack:function(){g(-1)},goForward:function(){g(1)},canGo:function(e){var t=w.index+e;return t>=0&&t<w.entries.length},block:function(e){return void 0===e&&(e=!1),l.setPrompt(e)},listen:function(e){return l.appendListener(e)}};return w}},72:function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},75:function(e,t){!function(){e.exports=this.wp.date}()},76:function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r="wc/customer-effort-score",o="/wc-admin",i="woocommerce_ces_tracks_queue"},77:function(e,t,n){"use strict";var r=n(78);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},78:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},8:function(e,t,n){e.exports=n(68)},82:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(70);var o=n(94);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},84:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},9:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},90:function(e,t,n){"use strict";var r=n(69),o=n(52),i=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,u=Array.prototype.push,s=function(e,t){u.apply(e,c(t)?t:[t])},l=Date.prototype.toISOString,f=o.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,n,o,i,a,u,l,f,p,m,h,v,b,y){var g,w=t;if("function"==typeof l?w=l(n,w):w instanceof Date?w=m(w):"comma"===o&&c(w)&&(w=r.maybeMap(w,(function(e){return e instanceof Date?m(e):e}))),null===w){if(i)return u&&!b?u(n,d.encoder,y,"key",h):n;w=""}if("string"==typeof(g=w)||"number"==typeof g||"boolean"==typeof g||"symbol"==typeof g||"bigint"==typeof g||r.isBuffer(w))return u?[v(b?n:u(n,d.encoder,y,"key",h))+"="+v(u(w,d.encoder,y,"value",h))]:[v(n)+"="+v(String(w))];var O,j=[];if(void 0===w)return j;if("comma"===o&&c(w))O=[{value:w.length>0?w.join(",")||null:void 0}];else if(c(l))O=l;else{var E=Object.keys(w);O=f?E.sort(f):E}for(var _=0;_<O.length;++_){var k=O[_],x="object"==typeof k&&void 0!==k.value?k.value:w[k];if(!a||null!==x){var S=c(w)?"function"==typeof o?o(n,k):n:n+(p?"."+k:"["+k+"]");s(j,e(x,S,o,i,a,u,l,f,p,m,h,v,b,y))}}return j};e.exports=function(e,t){var n,r=e,u=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!i.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],a=d.filter;return("function"==typeof e.filter||c(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:void 0===e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:a,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof u.filter?r=(0,u.filter)("",r):c(u.filter)&&(n=u.filter);var l,f=[];if("object"!=typeof r||null===r)return"";l=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var m=a[l];n||(n=Object.keys(r)),u.sort&&n.sort(u.sort);for(var h=0;h<n.length;++h){var v=n[h];u.skipNulls&&null===r[v]||s(f,p(r[v],v,m,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset))}var b=f.join(u.delimiter),y=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),b.length>0?y+b:""}},91:function(e,t,n){"use strict";var r=n(69),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},s=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,c=n.depth>0&&/(\[[^[\]]*])/.exec(i),s=c?i.slice(0,c.index):i,l=[];if(s){if(!n.plainObjects&&o.call(Object.prototype,s)&&!n.allowPrototypes)return;l.push(s)}for(var f=0;n.depth>0&&null!==(c=a.exec(i))&&f<n.depth;){if(f+=1,!n.plainObjects&&o.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(c[1])}return c&&l.push("["+i.slice(c.index)+"]"),function(e,t,n,r){for(var o=r?t:u(t,n),i=e.length-1;i>=0;--i){var a,c=e[i];if("[]"===c&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var s="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,l=parseInt(s,10);n.parseArrays||""!==s?!isNaN(l)&&c!==s&&String(l)===s&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(a=[])[l]=o:a[s]=o:a={0:o}}o=a}return o}(l,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var n,s={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=l.split(t.delimiter,f),p=-1,m=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?m="utf-8":"utf8=%26%2310003%3B"===d[n]&&(m="iso-8859-1"),p=n,n=d.length);for(n=0;n<d.length;++n)if(n!==p){var h,v,b=d[n],y=b.indexOf("]="),g=-1===y?b.indexOf("="):y+1;-1===g?(h=t.decoder(b,a.decoder,m,"key"),v=t.strictNullHandling?null:""):(h=t.decoder(b.slice(0,g),a.decoder,m,"key"),v=r.maybeMap(u(b.slice(g+1),t),(function(e){return t.decoder(e,a.decoder,m,"value")}))),v&&t.interpretNumericEntities&&"iso-8859-1"===m&&(v=c(v)),b.indexOf("[]=")>-1&&(v=i(v)?[v]:v),o.call(s,h)?s[h]=r.combine(s[h],v):s[h]=v}return s}(e,n):e,f=n.plainObjects?Object.create(null):{},d=Object.keys(l),p=0;p<d.length;++p){var m=d[p],h=s(m,l[m],n,"string"==typeof e);f=r.merge(f,h,n)}return r.compact(f)}},94:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(70);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},95:function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"a",(function(){return f})),n.d(t,"d",(function(){return p})),n.d(t,"f",(function(){return m}));var r=n(19),o=n.n(r),i=n(41),a=n(3),c=n(25);function u(e){return e?e.split(":")[0]:null}function s(e){var t=u(e);return Object(a.without)(Object(c.g)("onboarding",{euCountries:[]}).euCountries,"GB").includes(t)&&(t="EU"),t}function l(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=d(e,t,n),o=r.map((function(e){return e.id||e.product}));return o}function f(e,t){var n={};n.products=d(e,!0,t),n.remainingProducts=d(e,!1,t);var r=o()(new Set([].concat(o()(n.products),o()(n.remainingProducts))));return n.uniqueItemsList=r.map((function(e){return e.label?{type:"extension",name:e.label}:{type:"theme",name:e.title}})),n}function d(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=Object(c.g)("onboarding",{}),o=[];if(!r.productTypes)return o;var i=e.product_types||[];i.forEach((function(e){r.productTypes[e]&&r.productTypes[e].product&&(t||!n.includes(r.productTypes[e].slug))&&o.push(r.productTypes[e])}));var a=r.themes.find((function(t){return t.slug===e.theme}));return a&&a.id&&p(a.price)>0&&(t||!a.is_installed)&&o.push(a),o}function p(e){return Number(Object(i.decodeEntities)(e).replace(/[^0-9.-]+/g,""))}function m(e){return/admin.php\?page=wc-admin/.test(e)}},97:function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}}});
|
dist/chunks/1.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
(window["__wcAdmin_webpackJsonp"] = window["__wcAdmin_webpackJsonp"] || []).push([[1],{
|
2 |
|
3 |
-
/***/
|
4 |
/***/ (function(module, exports, __webpack_require__) {
|
5 |
|
6 |
/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */
|
1 |
(window["__wcAdmin_webpackJsonp"] = window["__wcAdmin_webpackJsonp"] || []).push([[1],{
|
2 |
|
3 |
+
/***/ 515:
|
4 |
/***/ (function(module, exports, __webpack_require__) {
|
5 |
|
6 |
/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */
|
dist/chunks/1.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
/*! For license information please see 1.min.js.LICENSE.txt */
|
2 |
-
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[1],{513:function(e,t,n){e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor,i=Object.freeze,a=Object.seal,l=Object.create,c="undefined"!=typeof Reflect&&Reflect,s=c.apply,u=c.construct;s||(s=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),u||(u=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var m,f=w(Array.prototype.forEach),p=w(Array.prototype.pop),d=w(Array.prototype.push),g=w(String.prototype.toLowerCase),h=w(String.prototype.match),y=w(String.prototype.replace),v=w(String.prototype.indexOf),b=w(String.prototype.trim),T=w(RegExp.prototype.test),A=(m=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(m,t)});function w(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return s(e,t,r)}}function x(e,r){t&&t(e,null);for(var o=r.length;o--;){var i=r[o];if("string"==typeof i){var a=g(i);a!==i&&(n(r)||(r[o]=a),i=a)}e[i]=!0}return e}function S(t){var n=l(null),r=void 0;for(r in t)s(e,t,[r])&&(n[r]=t[r]);return n}function _(e,t){for(;null!==e;){var n=o(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=r(e)}return null}var k=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),D=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),E=i(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),N=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),L=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=i(["#text"]),M=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns"]),F=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),C=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),I=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),z=a(/\{\{[\s\S]*|[\s\S]*\}\}/gm),H=a(/<%[\s\S]*|[\s\S]*%>/gm),U=a(/^data-[\-\w.\u00B7-\uFFFF]/),j=a(/^aria-[\-\w]+$/),P=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B=a(/^(?:\w+script|data):/i),W=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function q(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var K=function(){return"undefined"==typeof window?null:window},V=function(e,t){if("object"!==(void 0===e?"undefined":G(e))||"function"!=typeof e.createPolicy)return null;var n=null;t.currentScript&&t.currentScript.hasAttribute("data-tt-policy-suffix")&&(n=t.currentScript.getAttribute("data-tt-policy-suffix"));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K(),n=function(t){return e(t)};if(n.version="2.2.6",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,a=t.DocumentFragment,l=t.HTMLTemplateElement,c=t.Node,s=t.Element,u=t.NodeFilter,m=t.NamedNodeMap,w=void 0===m?t.NamedNodeMap||t.MozNamedAttrMap:m,Y=t.Text,J=t.Comment,X=t.DOMParser,$=t.trustedTypes,Z=s.prototype,Q=_(Z,"cloneNode"),ee=_(Z,"nextSibling"),te=_(Z,"childNodes"),ne=_(Z,"parentNode");if("function"==typeof l){var re=o.createElement("template");re.content&&re.content.ownerDocument&&(o=re.content.ownerDocument)}var oe=V($,r),ie=oe&&ze?oe.createHTML(""):"",ae=o,le=ae.implementation,ce=ae.createNodeIterator,se=ae.getElementsByTagName,ue=ae.createDocumentFragment,me=r.importNode,fe={};try{fe=S(o).documentMode?o.documentMode:{}}catch(e){}var pe={};n.isSupported=le&&void 0!==le.createHTMLDocument&&9!==fe;var de=z,ge=H,he=U,ye=j,ve=B,be=W,Te=P,Ae=null,we=x({},[].concat(q(k),q(R),q(D),q(N),q(O))),xe=null,Se=x({},[].concat(q(M),q(F),q(C),q(I))),_e=null,ke=null,Re=!0,De=!0,Ee=!1,Ne=!1,Le=!1,Oe=!1,Me=!1,Fe=!1,Ce=!1,Ie=!0,ze=!1,He=!0,Ue=!0,je=!1,Pe={},Be=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),We=null,Ge=x({},["audio","video","img","source","image","track"]),qe=null,Ke=x({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ve=null,Ye=o.createElement("form"),Je=function(e){Ve&&Ve===e||(e&&"object"===(void 0===e?"undefined":G(e))||(e={}),e=S(e),Ae="ALLOWED_TAGS"in e?x({},e.ALLOWED_TAGS):we,xe="ALLOWED_ATTR"in e?x({},e.ALLOWED_ATTR):Se,qe="ADD_URI_SAFE_ATTR"in e?x(S(Ke),e.ADD_URI_SAFE_ATTR):Ke,We="ADD_DATA_URI_TAGS"in e?x(S(Ge),e.ADD_DATA_URI_TAGS):Ge,_e="FORBID_TAGS"in e?x({},e.FORBID_TAGS):{},ke="FORBID_ATTR"in e?x({},e.FORBID_ATTR):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,Re=!1!==e.ALLOW_ARIA_ATTR,De=!1!==e.ALLOW_DATA_ATTR,Ee=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=e.SAFE_FOR_TEMPLATES||!1,Le=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Ce=e.RETURN_DOM_FRAGMENT||!1,Ie=!1!==e.RETURN_DOM_IMPORT,ze=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,He=!1!==e.SANITIZE_DOM,Ue=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,Te=e.ALLOWED_URI_REGEXP||Te,Ne&&(De=!1),Ce&&(Fe=!0),Pe&&(Ae=x({},[].concat(q(O))),xe=[],!0===Pe.html&&(x(Ae,k),x(xe,M)),!0===Pe.svg&&(x(Ae,R),x(xe,F),x(xe,I)),!0===Pe.svgFilters&&(x(Ae,D),x(xe,F),x(xe,I)),!0===Pe.mathMl&&(x(Ae,N),x(xe,C),x(xe,I))),e.ADD_TAGS&&(Ae===we&&(Ae=S(Ae)),x(Ae,e.ADD_TAGS)),e.ADD_ATTR&&(xe===Se&&(xe=S(xe)),x(xe,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&x(qe,e.ADD_URI_SAFE_ATTR),Ue&&(Ae["#text"]=!0),Le&&x(Ae,["html","head","body"]),Ae.table&&(x(Ae,["tbody"]),delete _e.tbody),i&&i(e),Ve=e)},Xe=x({},["mi","mo","mn","ms","mtext"]),$e=x({},["foreignobject","desc","title","annotation-xml"]),Ze=x({},R);x(Ze,D),x(Ze,E);var Qe=x({},N);x(Qe,L);var et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml",rt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:nt,tagName:"template"});var n=g(e.tagName),r=g(t.tagName);if(e.namespaceURI===tt)return t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===r||Xe[r]):Boolean(Ze[n]);if(e.namespaceURI===et)return t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&$e[r]:Boolean(Qe[n]);if(e.namespaceURI===nt){if(t.namespaceURI===tt&&!$e[r])return!1;if(t.namespaceURI===et&&!Xe[r])return!1;var o=x({},["title","style","font","a","script"]);return!Qe[n]&&(o[n]||!Ze[n])}return!1},ot=function(e){d(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ie}catch(t){e.remove()}}},it=function(e,t){try{d(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(n.removed,{attribute:null,from:t})}t.removeAttribute(e)},at=function(e){var t=void 0,n=void 0;if(Me)e="<remove></remove>"+e;else{var r=h(e,/^[\r\n\t ]+/);n=r&&r[0]}var i=oe?oe.createHTML(e):e;try{t=(new X).parseFromString(i,"text/html")}catch(e){}if(!t||!t.documentElement){var a=(t=le.createHTMLDocument("")).body;a.parentNode.removeChild(a.parentNode.firstElementChild),a.outerHTML=i}return e&&n&&t.body.insertBefore(o.createTextNode(n),t.body.childNodes[0]||null),se.call(t,Le?"html":"body")[0]},lt=function(e){return ce.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,(function(){return u.FILTER_ACCEPT}),!1)},ct=function(e){return!(e instanceof Y||e instanceof J||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof w&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},st=function(e){return"object"===(void 0===c?"undefined":G(c))?e instanceof c:e&&"object"===(void 0===e?"undefined":G(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ut=function(e,t,r){pe[e]&&f(pe[e],(function(e){e.call(n,t,r,Ve)}))},mt=function(e){var t=void 0;if(ut("beforeSanitizeElements",e,null),ct(e))return ot(e),!0;if(h(e.nodeName,/[\u0080-\uFFFF]/))return ot(e),!0;var r=g(e.nodeName);if(ut("uponSanitizeElement",e,{tagName:r,allowedTags:Ae}),!st(e.firstElementChild)&&(!st(e.content)||!st(e.content.firstElementChild))&&T(/<[/\w]/g,e.innerHTML)&&T(/<[/\w]/g,e.textContent))return ot(e),!0;if(!Ae[r]||_e[r]){if(Ue&&!Be[r])for(var o=ne(e),i=te(e),a=i.length-1;a>=0;--a)o.insertBefore(Q(i[a],!0),ee(e));return ot(e),!0}return e instanceof s&&!rt(e)?(ot(e),!0):"noscript"!==r&&"noembed"!==r||!T(/<\/no(script|embed)/i,e.innerHTML)?(Ne&&3===e.nodeType&&(t=e.textContent,t=y(t,de," "),t=y(t,ge," "),e.textContent!==t&&(d(n.removed,{element:e.cloneNode()}),e.textContent=t)),ut("afterSanitizeElements",e,null),!1):(ot(e),!0)},ft=function(e,t,n){if(He&&("id"===t||"name"===t)&&(n in o||n in Ye))return!1;if(De&&T(he,t));else if(Re&&T(ye,t));else{if(!xe[t]||ke[t])return!1;if(qe[t]);else if(T(Te,y(n,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!We[e])if(Ee&&!T(ve,y(n,be,"")));else if(n)return!1}return!0},pt=function(e){var t=void 0,r=void 0,o=void 0,i=void 0;ut("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xe};for(i=a.length;i--;){var c=t=a[i],s=c.name,u=c.namespaceURI;if(r=b(t.value),o=g(s),l.attrName=o,l.attrValue=r,l.keepAttr=!0,l.forceKeepAttr=void 0,ut("uponSanitizeAttribute",e,l),r=l.attrValue,!l.forceKeepAttr&&(it(s,e),l.keepAttr))if(T(/\/>/i,r))it(s,e);else{Ne&&(r=y(r,de," "),r=y(r,ge," "));var m=e.nodeName.toLowerCase();if(ft(m,o,r))try{u?e.setAttributeNS(u,s,r):e.setAttribute(s,r),p(n.removed)}catch(e){}}}ut("afterSanitizeAttributes",e,null)}},dt=function e(t){var n=void 0,r=lt(t);for(ut("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ut("uponSanitizeShadowNode",n,null),mt(n)||(n.content instanceof a&&e(n.content),pt(n));ut("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,o){var i=void 0,l=void 0,s=void 0,u=void 0,m=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!st(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!n.isSupported){if("object"===G(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(st(e))return t.toStaticHTML(e.outerHTML)}return e}if(Oe||Je(o),n.removed=[],"string"==typeof e&&(je=!1),je);else if(e instanceof c)1===(l=(i=at("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?i=l:i.appendChild(l);else{if(!Fe&&!Ne&&!Le&&-1===e.indexOf("<"))return oe&&ze?oe.createHTML(e):e;if(!(i=at(e)))return Fe?null:ie}i&&Me&&ot(i.firstChild);for(var f=lt(je?e:i);s=f.nextNode();)3===s.nodeType&&s===u||mt(s)||(s.content instanceof a&&dt(s.content),pt(s),u=s);if(u=null,je)return e;if(Fe){if(Ce)for(m=ue.call(i.ownerDocument);i.firstChild;)m.appendChild(i.firstChild);else m=i;return Ie&&(m=me.call(r,m,!0)),m}var p=Le?i.outerHTML:i.innerHTML;return Ne&&(p=y(p,de," "),p=y(p,ge," ")),oe&&ze?oe.createHTML(p):p},n.setConfig=function(e){Je(e),Oe=!0},n.clearConfig=function(){Ve=null,Oe=!1},n.isValidAttribute=function(e,t,n){Ve||Je({});var r=g(e),o=g(t);return ft(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],d(pe[e],t))},n.removeHook=function(e){pe[e]&&p(pe[e])},n.removeHooks=function(e){pe[e]&&(pe[e]=[])},n.removeAllHooks=function(){pe={}},n}()}()}}]);
|
1 |
/*! For license information please see 1.min.js.LICENSE.txt */
|
2 |
+
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[1],{515:function(e,t,n){e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor,i=Object.freeze,a=Object.seal,l=Object.create,c="undefined"!=typeof Reflect&&Reflect,s=c.apply,u=c.construct;s||(s=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),u||(u=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var m,f=w(Array.prototype.forEach),p=w(Array.prototype.pop),d=w(Array.prototype.push),g=w(String.prototype.toLowerCase),h=w(String.prototype.match),y=w(String.prototype.replace),v=w(String.prototype.indexOf),b=w(String.prototype.trim),T=w(RegExp.prototype.test),A=(m=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(m,t)});function w(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return s(e,t,r)}}function x(e,r){t&&t(e,null);for(var o=r.length;o--;){var i=r[o];if("string"==typeof i){var a=g(i);a!==i&&(n(r)||(r[o]=a),i=a)}e[i]=!0}return e}function S(t){var n=l(null),r=void 0;for(r in t)s(e,t,[r])&&(n[r]=t[r]);return n}function _(e,t){for(;null!==e;){var n=o(e,t);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}e=r(e)}return null}var k=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),D=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),E=i(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),N=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),L=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=i(["#text"]),M=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns"]),F=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),C=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),I=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),z=a(/\{\{[\s\S]*|[\s\S]*\}\}/gm),H=a(/<%[\s\S]*|[\s\S]*%>/gm),U=a(/^data-[\-\w.\u00B7-\uFFFF]/),j=a(/^aria-[\-\w]+$/),P=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B=a(/^(?:\w+script|data):/i),W=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function q(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var K=function(){return"undefined"==typeof window?null:window},V=function(e,t){if("object"!==(void 0===e?"undefined":G(e))||"function"!=typeof e.createPolicy)return null;var n=null;t.currentScript&&t.currentScript.hasAttribute("data-tt-policy-suffix")&&(n=t.currentScript.getAttribute("data-tt-policy-suffix"));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K(),n=function(t){return e(t)};if(n.version="2.2.6",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,a=t.DocumentFragment,l=t.HTMLTemplateElement,c=t.Node,s=t.Element,u=t.NodeFilter,m=t.NamedNodeMap,w=void 0===m?t.NamedNodeMap||t.MozNamedAttrMap:m,Y=t.Text,J=t.Comment,X=t.DOMParser,$=t.trustedTypes,Z=s.prototype,Q=_(Z,"cloneNode"),ee=_(Z,"nextSibling"),te=_(Z,"childNodes"),ne=_(Z,"parentNode");if("function"==typeof l){var re=o.createElement("template");re.content&&re.content.ownerDocument&&(o=re.content.ownerDocument)}var oe=V($,r),ie=oe&&ze?oe.createHTML(""):"",ae=o,le=ae.implementation,ce=ae.createNodeIterator,se=ae.getElementsByTagName,ue=ae.createDocumentFragment,me=r.importNode,fe={};try{fe=S(o).documentMode?o.documentMode:{}}catch(e){}var pe={};n.isSupported=le&&void 0!==le.createHTMLDocument&&9!==fe;var de=z,ge=H,he=U,ye=j,ve=B,be=W,Te=P,Ae=null,we=x({},[].concat(q(k),q(R),q(D),q(N),q(O))),xe=null,Se=x({},[].concat(q(M),q(F),q(C),q(I))),_e=null,ke=null,Re=!0,De=!0,Ee=!1,Ne=!1,Le=!1,Oe=!1,Me=!1,Fe=!1,Ce=!1,Ie=!0,ze=!1,He=!0,Ue=!0,je=!1,Pe={},Be=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),We=null,Ge=x({},["audio","video","img","source","image","track"]),qe=null,Ke=x({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ve=null,Ye=o.createElement("form"),Je=function(e){Ve&&Ve===e||(e&&"object"===(void 0===e?"undefined":G(e))||(e={}),e=S(e),Ae="ALLOWED_TAGS"in e?x({},e.ALLOWED_TAGS):we,xe="ALLOWED_ATTR"in e?x({},e.ALLOWED_ATTR):Se,qe="ADD_URI_SAFE_ATTR"in e?x(S(Ke),e.ADD_URI_SAFE_ATTR):Ke,We="ADD_DATA_URI_TAGS"in e?x(S(Ge),e.ADD_DATA_URI_TAGS):Ge,_e="FORBID_TAGS"in e?x({},e.FORBID_TAGS):{},ke="FORBID_ATTR"in e?x({},e.FORBID_ATTR):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,Re=!1!==e.ALLOW_ARIA_ATTR,De=!1!==e.ALLOW_DATA_ATTR,Ee=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=e.SAFE_FOR_TEMPLATES||!1,Le=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Ce=e.RETURN_DOM_FRAGMENT||!1,Ie=!1!==e.RETURN_DOM_IMPORT,ze=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,He=!1!==e.SANITIZE_DOM,Ue=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,Te=e.ALLOWED_URI_REGEXP||Te,Ne&&(De=!1),Ce&&(Fe=!0),Pe&&(Ae=x({},[].concat(q(O))),xe=[],!0===Pe.html&&(x(Ae,k),x(xe,M)),!0===Pe.svg&&(x(Ae,R),x(xe,F),x(xe,I)),!0===Pe.svgFilters&&(x(Ae,D),x(xe,F),x(xe,I)),!0===Pe.mathMl&&(x(Ae,N),x(xe,C),x(xe,I))),e.ADD_TAGS&&(Ae===we&&(Ae=S(Ae)),x(Ae,e.ADD_TAGS)),e.ADD_ATTR&&(xe===Se&&(xe=S(xe)),x(xe,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&x(qe,e.ADD_URI_SAFE_ATTR),Ue&&(Ae["#text"]=!0),Le&&x(Ae,["html","head","body"]),Ae.table&&(x(Ae,["tbody"]),delete _e.tbody),i&&i(e),Ve=e)},Xe=x({},["mi","mo","mn","ms","mtext"]),$e=x({},["foreignobject","desc","title","annotation-xml"]),Ze=x({},R);x(Ze,D),x(Ze,E);var Qe=x({},N);x(Qe,L);var et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml",rt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:nt,tagName:"template"});var n=g(e.tagName),r=g(t.tagName);if(e.namespaceURI===tt)return t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===r||Xe[r]):Boolean(Ze[n]);if(e.namespaceURI===et)return t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&$e[r]:Boolean(Qe[n]);if(e.namespaceURI===nt){if(t.namespaceURI===tt&&!$e[r])return!1;if(t.namespaceURI===et&&!Xe[r])return!1;var o=x({},["title","style","font","a","script"]);return!Qe[n]&&(o[n]||!Ze[n])}return!1},ot=function(e){d(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ie}catch(t){e.remove()}}},it=function(e,t){try{d(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(n.removed,{attribute:null,from:t})}t.removeAttribute(e)},at=function(e){var t=void 0,n=void 0;if(Me)e="<remove></remove>"+e;else{var r=h(e,/^[\r\n\t ]+/);n=r&&r[0]}var i=oe?oe.createHTML(e):e;try{t=(new X).parseFromString(i,"text/html")}catch(e){}if(!t||!t.documentElement){var a=(t=le.createHTMLDocument("")).body;a.parentNode.removeChild(a.parentNode.firstElementChild),a.outerHTML=i}return e&&n&&t.body.insertBefore(o.createTextNode(n),t.body.childNodes[0]||null),se.call(t,Le?"html":"body")[0]},lt=function(e){return ce.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,(function(){return u.FILTER_ACCEPT}),!1)},ct=function(e){return!(e instanceof Y||e instanceof J||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof w&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},st=function(e){return"object"===(void 0===c?"undefined":G(c))?e instanceof c:e&&"object"===(void 0===e?"undefined":G(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ut=function(e,t,r){pe[e]&&f(pe[e],(function(e){e.call(n,t,r,Ve)}))},mt=function(e){var t=void 0;if(ut("beforeSanitizeElements",e,null),ct(e))return ot(e),!0;if(h(e.nodeName,/[\u0080-\uFFFF]/))return ot(e),!0;var r=g(e.nodeName);if(ut("uponSanitizeElement",e,{tagName:r,allowedTags:Ae}),!st(e.firstElementChild)&&(!st(e.content)||!st(e.content.firstElementChild))&&T(/<[/\w]/g,e.innerHTML)&&T(/<[/\w]/g,e.textContent))return ot(e),!0;if(!Ae[r]||_e[r]){if(Ue&&!Be[r])for(var o=ne(e),i=te(e),a=i.length-1;a>=0;--a)o.insertBefore(Q(i[a],!0),ee(e));return ot(e),!0}return e instanceof s&&!rt(e)?(ot(e),!0):"noscript"!==r&&"noembed"!==r||!T(/<\/no(script|embed)/i,e.innerHTML)?(Ne&&3===e.nodeType&&(t=e.textContent,t=y(t,de," "),t=y(t,ge," "),e.textContent!==t&&(d(n.removed,{element:e.cloneNode()}),e.textContent=t)),ut("afterSanitizeElements",e,null),!1):(ot(e),!0)},ft=function(e,t,n){if(He&&("id"===t||"name"===t)&&(n in o||n in Ye))return!1;if(De&&T(he,t));else if(Re&&T(ye,t));else{if(!xe[t]||ke[t])return!1;if(qe[t]);else if(T(Te,y(n,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!We[e])if(Ee&&!T(ve,y(n,be,"")));else if(n)return!1}return!0},pt=function(e){var t=void 0,r=void 0,o=void 0,i=void 0;ut("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xe};for(i=a.length;i--;){var c=t=a[i],s=c.name,u=c.namespaceURI;if(r=b(t.value),o=g(s),l.attrName=o,l.attrValue=r,l.keepAttr=!0,l.forceKeepAttr=void 0,ut("uponSanitizeAttribute",e,l),r=l.attrValue,!l.forceKeepAttr&&(it(s,e),l.keepAttr))if(T(/\/>/i,r))it(s,e);else{Ne&&(r=y(r,de," "),r=y(r,ge," "));var m=e.nodeName.toLowerCase();if(ft(m,o,r))try{u?e.setAttributeNS(u,s,r):e.setAttribute(s,r),p(n.removed)}catch(e){}}}ut("afterSanitizeAttributes",e,null)}},dt=function e(t){var n=void 0,r=lt(t);for(ut("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ut("uponSanitizeShadowNode",n,null),mt(n)||(n.content instanceof a&&e(n.content),pt(n));ut("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,o){var i=void 0,l=void 0,s=void 0,u=void 0,m=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!st(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!n.isSupported){if("object"===G(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(st(e))return t.toStaticHTML(e.outerHTML)}return e}if(Oe||Je(o),n.removed=[],"string"==typeof e&&(je=!1),je);else if(e instanceof c)1===(l=(i=at("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?i=l:i.appendChild(l);else{if(!Fe&&!Ne&&!Le&&-1===e.indexOf("<"))return oe&&ze?oe.createHTML(e):e;if(!(i=at(e)))return Fe?null:ie}i&&Me&&ot(i.firstChild);for(var f=lt(je?e:i);s=f.nextNode();)3===s.nodeType&&s===u||mt(s)||(s.content instanceof a&&dt(s.content),pt(s),u=s);if(u=null,je)return e;if(Fe){if(Ce)for(m=ue.call(i.ownerDocument);i.firstChild;)m.appendChild(i.firstChild);else m=i;return Ie&&(m=me.call(r,m,!0)),m}var p=Le?i.outerHTML:i.innerHTML;return Ne&&(p=y(p,de," "),p=y(p,ge," ")),oe&&ze?oe.createHTML(p):p},n.setConfig=function(e){Je(e),Oe=!0},n.clearConfig=function(){Ve=null,Oe=!1},n.isValidAttribute=function(e,t,n){Ve||Je({});var r=g(e),o=g(t);return ft(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],d(pe[e],t))},n.removeHook=function(e){pe[e]&&p(pe[e])},n.removeHooks=function(e){pe[e]&&(pe[e]=[])},n.removeAllHooks=function(){pe={}},n}()}()}}]);
|
dist/chunks/3.js
CHANGED
@@ -1032,7 +1032,7 @@ ReportSummary.contextType = _lib_currency_context__WEBPACK_IMPORTED_MODULE_17__[
|
|
1032 |
|
1033 |
/***/ }),
|
1034 |
|
1035 |
-
/***/
|
1036 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1037 |
|
1038 |
"use strict";
|
@@ -1092,7 +1092,7 @@ function isLowStock(status, quantity, threshold) {
|
|
1092 |
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(22);
|
1093 |
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_16__);
|
1094 |
/* harmony import */ var _categories_breadcrumbs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(531);
|
1095 |
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(
|
1096 |
/* harmony import */ var _components_report_table__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(506);
|
1097 |
/* harmony import */ var _lib_currency_context__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(498);
|
1098 |
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(575);
|
1032 |
|
1033 |
/***/ }),
|
1034 |
|
1035 |
+
/***/ 513:
|
1036 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1037 |
|
1038 |
"use strict";
|
1092 |
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(22);
|
1093 |
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_16__);
|
1094 |
/* harmony import */ var _categories_breadcrumbs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(531);
|
1095 |
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(513);
|
1096 |
/* harmony import */ var _components_report_table__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(506);
|
1097 |
/* harmony import */ var _lib_currency_context__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(498);
|
1098 |
/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(575);
|
dist/chunks/3.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[3],{500:function(e,t,r){"use strict";r.d(t,"e",(function(){return m})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return y})),r.d(t,"f",(function(){return b})),r.d(t,"h",(function(){return g})),r.d(t,"g",(function(){return v}));var a=r(23),n=r(26),o=r.n(n),i=r(3),c=r(21),s=r(22),u=r(25),l=r(501);function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.identity;return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,i="function"==typeof e?e(n):e,s=Object(c.getIdsFromQuery)(r);if(s.length<1)return Promise.resolve([]);var u={include:s.join(","),per_page:s.length};return o()({path:Object(a.addQueryArgs)(i,u)}).then((function(e){return e.map(t)}))}}m(s.NAMESPACE+"/products/attributes",(function(e){return{key:e.id,label:e.name}}));var d=m(s.NAMESPACE+"/products/categories",(function(e){return{key:e.id,label:e.name}})),f=m(s.NAMESPACE+"/coupons",(function(e){return{key:e.id,label:e.code}})),p=m(s.NAMESPACE+"/customers",(function(e){return{key:e.id,label:e.name}})),y=m(s.NAMESPACE+"/products",(function(e){return{key:e.id,label:e.name}})),b=m(s.NAMESPACE+"/taxes",(function(e){return{key:e.id,label:Object(l.a)(e)}}));function g(e){var t=e.attributes,r=e.name,a=Object(u.g)("variationTitleAttributesSeparator"," - ");if(r.indexOf(a)>-1)return r;var n=t.map((function(e){return e.option})).join(", ");return n?r+a+n:r}var v=m((function(e){var t=e.products;return t?s.NAMESPACE+"/products/".concat(t,"/variations"):s.NAMESPACE+"/variations"}),(function(e){return{key:e.id,label:g(e)}}))},501:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var a=r(2);function n(e){return[e.country,e.state,e.name||Object(a.__)("TAX","woocommerce-admin"),e.priority].map((function(e){return e.toString().toUpperCase().trim()})).filter(Boolean).join("-")}},502:function(e,t,r){"use strict";var a=r(5),n=r.n(a),o=r(12),i=r.n(o),c=r(13),s=r.n(c),u=r(14),l=r.n(u),m=r(15),d=r.n(m),f=r(7),p=r.n(f),y=r(0),b=r(2),g=r(20),v=r(75),h=r(11),O=r(3),j=r(1),_=r.n(j),R=r(47),k=r(22),w=r(29),C=r(498),S=r(499),D=r(21);function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=p()(e);if(t){var n=p()(this).constructor;r=Reflect.construct(a,arguments,n)}else r=a.apply(this,arguments);return d()(this,r)}}var T=function(e){l()(r,e);var t=P(r);function r(){return i()(this,r),t.apply(this,arguments)}return s()(r,[{key:"shouldComponentUpdate",value:function(e){return e.isRequesting!==this.props.isRequesting||e.primaryData.isRequesting!==this.props.primaryData.isRequesting||e.secondaryData.isRequesting!==this.props.secondaryData.isRequesting||!Object(O.isEqual)(e.query,this.props.query)}},{key:"getItemChartData",value:function(){var e=this.props,t=e.primaryData,r=e.selectedChart;return t.data.intervals.map((function(e){var t={};return e.subtotals.segments.forEach((function(e){if(e.segment_label){var a=t[e.segment_label]?e.segment_label+" (#"+e.segment_id+")":e.segment_label;t[e.segment_id]={label:a,value:e.subtotals[r.key]||0}}})),q({date:Object(v.format)("Y-m-d\\TH:i:s",e.date_start)},t)}))}},{key:"getTimeChartData",value:function(){var e=this.props,t=e.query,r=e.primaryData,a=e.secondaryData,n=e.selectedChart,o=e.defaultDateRange,i=Object(w.getIntervalForQuery)(t),c=Object(w.getCurrentDates)(t,o),s=c.primary,u=c.secondary;return r.data.intervals.map((function(e,r){var o=Object(w.getPreviousDate)(e.date_start,s.after,u.after,t.compare,i),c=a.data.intervals[r];return{date:Object(v.format)("Y-m-d\\TH:i:s",e.date_start),primary:{label:"".concat(s.label," (").concat(s.range,")"),labelDate:e.date_start,value:e.subtotals[n.key]||0},secondary:{label:"".concat(u.label," (").concat(u.range,")"),labelDate:o.format("YYYY-MM-DD HH:mm:ss"),value:c&&c.subtotals[n.key]||0}}}))}},{key:"getTimeChartTotals",value:function(){var e=this.props,t=e.primaryData,r=e.secondaryData,a=e.selectedChart;return{primary:Object(O.get)(t,["data","totals",a.key],null),secondary:Object(O.get)(r,["data","totals",a.key],null)}}},{key:"renderChart",value:function(e,t,r,a){var n=this.props,o=n.emptySearchResults,i=n.filterParam,c=n.interactiveLegend,s=n.itemsLabel,u=n.legendPosition,l=n.path,m=n.query,d=n.selectedChart,f=n.showHeaderControls,p=n.primaryData,g=Object(w.getIntervalForQuery)(m),v=Object(w.getAllowedIntervalsForQuery)(m),h=Object(w.getDateFormatsForInterval)(g,p.data.intervals.length),O=o?Object(b.__)("No data for the current search","woocommerce-admin"):Object(b.__)("No data for the selected date range","woocommerce-admin"),j=this.context,_=j.formatAmount,C=j.getCurrencyConfig;return Object(y.createElement)(R.Chart,{allowedIntervals:v,data:r,dateParser:"%Y-%m-%dT%H:%M:%S",emptyMessage:O,filterParam:i,interactiveLegend:c,interval:g,isRequesting:t,itemsLabel:s,legendPosition:u,legendTotals:a,mode:e,path:l,query:m,screenReaderFormat:h.screenReaderFormat,showHeaderControls:f,title:d.label,tooltipLabelFormat:h.tooltipLabelFormat,tooltipTitle:"time-comparison"===e&&d.label||null,tooltipValueFormat:Object(k.getTooltipValueFormat)(d.type,_),chartType:Object(w.getChartTypeForQuery)(m),valueType:d.type,xFormat:h.xFormat,x2Format:h.x2Format,currency:C()})}},{key:"renderItemComparison",value:function(){var e=this.props,t=e.isRequesting,r=e.primaryData;if(r.isError)return Object(y.createElement)(S.a,{isError:!0});var a=t||r.isRequesting,n=this.getItemChartData();return this.renderChart("item-comparison",a,n)}},{key:"renderTimeComparison",value:function(){var e=this.props,t=e.isRequesting,r=e.primaryData,a=e.secondaryData;if(!r||r.isError||a.isError)return Object(y.createElement)(S.a,{isError:!0});var n=t||r.isRequesting||a.isRequesting,o=this.getTimeChartData(),i=this.getTimeChartTotals();return this.renderChart("time-comparison",n,o,i)}},{key:"render",value:function(){return"item-comparison"===this.props.mode?this.renderItemComparison():this.renderTimeComparison()}}]),r}(y.Component);T.contextType=C.a,T.propTypes={filters:_.a.array,isRequesting:_.a.bool,itemsLabel:_.a.string,limitProperties:_.a.array,mode:_.a.string,path:_.a.string.isRequired,primaryData:_.a.object,query:_.a.object.isRequired,secondaryData:_.a.object,selectedChart:_.a.shape({key:_.a.string.isRequired,label:_.a.string.isRequired,order:_.a.oneOf(["asc","desc"]),orderby:_.a.string,type:_.a.oneOf(["average","number","currency"]).isRequired}).isRequired},T.defaultProps={isRequesting:!1,primaryData:{data:{intervals:[]},isError:!1,isRequesting:!1},secondaryData:{data:{intervals:[]},isError:!1,isRequesting:!1}};t.a=Object(g.compose)(Object(h.withSelect)((function(e,t){var r=t.charts,a=t.endpoint,n=t.filters,o=t.isRequesting,i=t.limitProperties,c=t.query,s=t.advancedFilters,u=i||[a],l=function e(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t||0===t.length)return null;var n=t.slice(0),o=n.pop();if(o.showFilters(r,a)){var i=Object(D.flattenFilters)(o.filters),c=r[o.param]||o.defaultValue||"all";return Object(O.find)(i,{value:c})}return e(n,r,a)}(n,c),m=Object(O.get)(l,["settings","param"]),d=t.mode||function(e,t){if(e&&t){var r=Object(O.get)(e,["settings","param"]);if(!r||Object.keys(t).includes(r))return Object(O.get)(e,["chartMode"])}return null}(l,c)||"time-comparison",f=e(k.SETTINGS_STORE_NAME).getSetting("wc_admin","wcAdminSettings").woocommerce_default_date_range,p={mode:d,filterParam:m,defaultDateRange:f};if(o)return p;var y=u.some((function(e){return c[e]&&c[e].length}));if(c.search&&!y)return q(q({},p),{},{emptySearchResults:!0});var b=r&&r.map((function(e){return e.key})),g=Object(k.getReportChartData)({endpoint:a,dataType:"primary",query:c,select:e,limitBy:u,filters:n,advancedFilters:s,defaultDateRange:f,fields:b});if("item-comparison"===d)return q(q({},p),{},{primaryData:g});var v=Object(k.getReportChartData)({endpoint:a,dataType:"secondary",query:c,select:e,limitBy:u,filters:n,advancedFilters:s,defaultDateRange:f,fields:b});return q(q({},p),{},{primaryData:g,secondaryData:v})})))(T)},503:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var a=r(3);function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object(a.find)(t,{key:e});return r||t[0]}},504:function(e,t,r){"use strict";var a=r(12),n=r.n(a),o=r(13),i=r.n(o),c=r(14),s=r.n(c),u=r(15),l=r.n(u),m=r(7),d=r.n(m),f=r(0),p=r(2),y=r(20),b=r(11),g=r(1),v=r.n(g),h=r(21),O=r(47),j=r(142),_=r(22),R=r(29),k=r(27),w=r(499),C=r(498);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=d()(e);if(t){var n=d()(this).constructor;r=Reflect.construct(a,arguments,n)}else r=a.apply(this,arguments);return l()(this,r)}}var D=function(e){s()(r,e);var t=S(r);function r(){return n()(this,r),t.apply(this,arguments)}return i()(r,[{key:"formatVal",value:function(e,t){var r=this.context,a=r.formatAmount,n=r.getCurrencyConfig;return"currency"===t?a(e):Object(j.formatValue)(n(),t,e)}},{key:"getValues",value:function(e,t){var r=this.props,a=r.emptySearchResults,n=r.summaryData.totals,o=n.primary?n.primary[e]:0,i=n.secondary?n.secondary[e]:0,c=a?0:o,s=a?0:i;return{delta:Object(j.calculateDelta)(c,s),prevValue:this.formatVal(s,t),value:this.formatVal(c,t)}}},{key:"render",value:function(){var e=this,t=this.props,r=t.charts,a=t.query,n=t.selectedChart,o=t.summaryData,i=t.endpoint,c=t.report,s=t.defaultDateRange,u=o.isError,l=o.isRequesting;if(u)return Object(f.createElement)(w.a,{isError:!0});if(l)return Object(f.createElement)(O.SummaryListPlaceholder,{numberOfItems:r.length});var m=Object(R.getDateParamsFromQuery)(a,s).compare;return Object(f.createElement)(O.SummaryList,null,(function(t){var a=t.onToggle;return r.map((function(t){var r=t.key,o=t.order,s=t.orderby,u=t.label,l=t.type,d={chart:r};s&&(d.orderby=s),o&&(d.order=o);var y=Object(h.getNewPath)(d),b=n.key===r,g=e.getValues(r,l),v=g.delta,j=g.prevValue,_=g.value;return Object(f.createElement)(O.SummaryNumber,{key:r,delta:v,href:y,label:u,prevLabel:"previous_period"===m?Object(p.__)("Previous Period:","woocommerce-admin"):Object(p.__)("Previous Year:","woocommerce-admin"),prevValue:j,selected:b,value:_,onLinkClickCallback:function(){a&&a(),Object(k.recordEvent)("analytics_chart_tab_click",{report:c||i,key:r})}})}))}))}}]),r}(f.Component);D.propTypes={charts:v.a.array.isRequired,endpoint:v.a.string.isRequired,limitProperties:v.a.array,query:v.a.object.isRequired,selectedChart:v.a.shape({key:v.a.string.isRequired,label:v.a.string.isRequired,order:v.a.oneOf(["asc","desc"]),orderby:v.a.string,type:v.a.oneOf(["average","number","currency"]).isRequired}).isRequired,summaryData:v.a.object,report:v.a.string},D.defaultProps={summaryData:{totals:{primary:{},secondary:{}},isError:!1}},D.contextType=C.a,t.a=Object(y.compose)(Object(b.withSelect)((function(e,t){var r=t.charts,a=t.endpoint,n=t.limitProperties,o=t.query,i=t.filters,c=t.advancedFilters,s=n||[a],u=s.some((function(e){return o[e]&&o[e].length}));if(o.search&&!u)return{emptySearchResults:!0};var l=r&&r.map((function(e){return e.key})),m=e(_.SETTINGS_STORE_NAME).getSetting("wc_admin","wcAdminSettings").woocommerce_default_date_range;return{summaryData:Object(_.getSummaryNumbers)({endpoint:a,query:o,select:e,limitBy:s,filters:i,advancedFilters:c,defaultDateRange:m,fields:l}),defaultDateRange:m}})))(D)},512:function(e,t,r){"use strict";function a(e,t,r){return!!t&&(e&&t<=r==="instock")}r.d(t,"a",(function(){return a}))},530:function(e,t,r){"use strict";var a=r(12),n=r.n(a),o=r(13),i=r.n(o),c=r(9),s=r.n(c),u=r(14),l=r.n(u),m=r(15),d=r.n(m),f=r(7),p=r.n(f),y=r(0),b=r(2),g=r(20),v=r(41),h=r(11),O=r(3),j=r(21),_=r(47),R=r(142),k=r(25),w=r(22),C=r(531),S=r(512),D=r(506),E=r(498);r(575);function q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=p()(e);if(t){var n=p()(this).constructor;r=Reflect.construct(a,arguments,n)}else r=a.apply(this,arguments);return d()(this,r)}}var P=Object(k.g)("manageStock","no"),T=Object(k.g)("stockStatuses",{}),A=function(e){l()(r,e);var t=q(r);function r(){var e;return n()(this,r),(e=t.call(this)).getHeadersContent=e.getHeadersContent.bind(s()(e)),e.getRowsContent=e.getRowsContent.bind(s()(e)),e.getSummary=e.getSummary.bind(s()(e)),e}return i()(r,[{key:"getHeadersContent",value:function(){return[{label:Object(b.__)("Product Title","woocommerce-admin"),key:"product_name",required:!0,isLeftAligned:!0,isSortable:!0},{label:Object(b.__)("SKU","woocommerce-admin"),key:"sku",hiddenByDefault:!0,isSortable:!0},{label:Object(b.__)("Items Sold","woocommerce-admin"),key:"items_sold",required:!0,defaultSort:!0,isSortable:!0,isNumeric:!0},{label:Object(b.__)("Net Sales","woocommerce-admin"),screenReaderLabel:Object(b.__)("Net Sales","woocommerce-admin"),key:"net_revenue",required:!0,isSortable:!0,isNumeric:!0},{label:Object(b.__)("Orders","woocommerce-admin"),key:"orders_count",isSortable:!0,isNumeric:!0},{label:Object(b.__)("Category","woocommerce-admin"),key:"product_cat"},{label:Object(b.__)("Variations","woocommerce-admin"),key:"variations",isSortable:!0},"yes"===P?{label:Object(b.__)("Status","woocommerce-admin"),key:"stock_status"}:null,"yes"===P?{label:Object(b.__)("Stock","woocommerce-admin"),key:"stock",isNumeric:!0}:null].filter(Boolean)}},{key:"getRowsContent",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.query,a=Object(j.getPersistedQuery)(r),n=this.context,o=n.render,i=n.formatDecimal,c=n.getCurrencyConfig,s=c();return Object(O.map)(t,(function(t){var n=t.product_id,c=t.items_sold,u=t.net_revenue,l=t.orders_count,m=t.extended_info||{},d=m.category_ids,f=m.low_stock_amount,p=m.manage_stock,g=m.sku,h=m.stock_status,O=m.stock_quantity,w=m.variations,D=void 0===w?[]:w,E=Object(v.decodeEntities)(m.name),q=Object(j.getNewPath)(a,"/analytics/orders",{filter:"advanced",product_includes:n}),A=Object(j.getNewPath)(a,"/analytics/products",{filter:"single_product",products:n}),N=e.props.categories,F=d&&d.map((function(e){return N.get(e)})).filter(Boolean)||[],x=Object(S.a)(h,O,f)?Object(y.createElement)(_.Link,{href:Object(k.f)("post.php?action=edit&post="+n),type:"wp-admin"},Object(b._x)("Low","Indication of a low quantity","woocommerce-admin")):T[h];return[{display:Object(y.createElement)(_.Link,{href:A,type:"wc-admin"},E),value:E},{display:g,value:g},{display:Object(R.formatValue)(s,"number",c),value:c},{display:o(u),value:i(u)},{display:Object(y.createElement)(_.Link,{href:q,type:"wc-admin"},l),value:l},{display:Object(y.createElement)("div",{className:"woocommerce-table__product-categories"},F[0]&&Object(y.createElement)(C.a,{category:F[0],categories:N}),F.length>1&&Object(y.createElement)(_.Tag,{label:Object(b.sprintf)(Object(b._x)("+%d more","categories","woocommerce-admin"),F.length-1),popoverContents:F.map((function(e){return Object(y.createElement)(C.a,{category:e,categories:N,key:e.id,query:r})}))})),value:F.map((function(e){return e.name})).join(", ")},{display:Object(R.formatValue)(s,"number",D.length),value:D.length},"yes"===P?{display:p?x:Object(b.__)("N/A","woocommerce-admin"),value:p?T[h]:null}:null,"yes"===P?{display:p?Object(R.formatValue)(s,"number",O):Object(b.__)("N/A","woocommerce-admin"),value:O}:null].filter(Boolean)}))}},{key:"getSummary",value:function(e){var t=e.products_count,r=void 0===t?0:t,a=e.items_sold,n=void 0===a?0:a,o=e.net_revenue,i=void 0===o?0:o,c=e.orders_count,s=void 0===c?0:c,u=this.context,l=u.formatAmount,m=(0,u.getCurrencyConfig)();return[{label:Object(b._n)("product","products",r,"woocommerce-admin"),value:Object(R.formatValue)(m,"number",r)},{label:Object(b._n)("item sold","items sold",n,"woocommerce-admin"),value:Object(R.formatValue)(m,"number",n)},{label:Object(b.__)("net sales","woocommerce-admin"),value:l(i)},{label:Object(b._n)("orders","orders",s,"woocommerce-admin"),value:Object(R.formatValue)(m,"number",s)}]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,r=e.baseSearchQuery,a=e.filters,n=e.hideCompare,o=e.isRequesting,i=e.query,c={helpText:Object(b.__)("Check at least two products below to compare","woocommerce-admin"),placeholder:Object(b.__)("Search by product name or SKU","woocommerce-admin")};return Object(y.createElement)(D.a,{compareBy:n?void 0:"products",endpoint:"products",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,summaryFields:["products_count","items_sold","net_revenue","orders_count"],itemIdField:"product_id",isRequesting:o,labels:c,query:i,searchBy:"products",baseSearchQuery:r,tableQuery:{orderby:i.orderby||"items_sold",order:i.order||"desc",extended_info:!0,segmentby:i.segmentby},title:Object(b.__)("Products","woocommerce-admin"),columnPrefsKey:"products_report_columns",filters:a,advancedFilters:t})}}]),r}(y.Component);A.contextType=E.a,t.a=Object(g.compose)(Object(h.withSelect)((function(e,t){var r=t.query;if(t.isRequesting||r.search&&(!r.products||!r.products.length))return{};var a=e(w.ITEMS_STORE_NAME),n=a.getItems,o=a.getItemsError,i=a.isResolving,c={per_page:-1};return{categories:n("categories",c),isError:Boolean(o("categories",c)),isRequesting:i("getItems",["categories",c])}})))(A)},531:function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var a=r(12),n=r.n(a),o=r(13),i=r.n(o),c=r(14),s=r.n(c),u=r(15),l=r.n(u),m=r(7),d=r.n(m),f=r(0),p=r(3),y=r(4),b=r(47),g=r(21);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=d()(e);if(t){var n=d()(this).constructor;r=Reflect.construct(a,arguments,n)}else r=a.apply(this,arguments);return l()(this,r)}}var h=function(e){s()(r,e);var t=v(r);function r(){return n()(this,r),t.apply(this,arguments)}return i()(r,[{key:"getCategoryAncestorIds",value:function(e,t){for(var r=[],a=e.parent;a;)r.unshift(a),a=t.get(a).parent;return r}},{key:"getCategoryAncestors",value:function(e,t){var r=this.getCategoryAncestorIds(e,t);if(r.length)return 1===r.length?t.get(Object(p.first)(r)).name+" › ":2===r.length?t.get(Object(p.first)(r)).name+" › "+t.get(Object(p.last)(r)).name+" › ":t.get(Object(p.first)(r)).name+" … "+t.get(Object(p.last)(r)).name+" › "}},{key:"render",value:function(){var e=this.props,t=e.categories,r=e.category,a=e.query,n=Object(g.getPersistedQuery)(a);return r?Object(f.createElement)("div",{className:"woocommerce-table__breadcrumbs"},this.getCategoryAncestors(r,t),Object(f.createElement)(b.Link,{href:Object(g.getNewPath)(n,"/analytics/categories",{filter:"single_category",categories:r.id}),type:"wc-admin"},r.name)):Object(f.createElement)(y.Spinner,null)}}]),r}(f.Component)},575:function(e,t,r){}}]);
|
1 |
+
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[3],{500:function(e,t,r){"use strict";r.d(t,"e",(function(){return m})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return y})),r.d(t,"f",(function(){return b})),r.d(t,"h",(function(){return g})),r.d(t,"g",(function(){return v}));var a=r(23),n=r(26),o=r.n(n),i=r(3),c=r(21),s=r(22),u=r(25),l=r(501);function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.identity;return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,i="function"==typeof e?e(n):e,s=Object(c.getIdsFromQuery)(r);if(s.length<1)return Promise.resolve([]);var u={include:s.join(","),per_page:s.length};return o()({path:Object(a.addQueryArgs)(i,u)}).then((function(e){return e.map(t)}))}}m(s.NAMESPACE+"/products/attributes",(function(e){return{key:e.id,label:e.name}}));var d=m(s.NAMESPACE+"/products/categories",(function(e){return{key:e.id,label:e.name}})),f=m(s.NAMESPACE+"/coupons",(function(e){return{key:e.id,label:e.code}})),p=m(s.NAMESPACE+"/customers",(function(e){return{key:e.id,label:e.name}})),y=m(s.NAMESPACE+"/products",(function(e){return{key:e.id,label:e.name}})),b=m(s.NAMESPACE+"/taxes",(function(e){return{key:e.id,label:Object(l.a)(e)}}));function g(e){var t=e.attributes,r=e.name,a=Object(u.g)("variationTitleAttributesSeparator"," - ");if(r.indexOf(a)>-1)return r;var n=t.map((function(e){return e.option})).join(", ");return n?r+a+n:r}var v=m((function(e){var t=e.products;return t?s.NAMESPACE+"/products/".concat(t,"/variations"):s.NAMESPACE+"/variations"}),(function(e){return{key:e.id,label:g(e)}}))},501:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var a=r(2);function n(e){return[e.country,e.state,e.name||Object(a.__)("TAX","woocommerce-admin"),e.priority].map((function(e){return e.toString().toUpperCase().trim()})).filter(Boolean).join("-")}},502:function(e,t,r){"use strict";var a=r(5),n=r.n(a),o=r(12),i=r.n(o),c=r(13),s=r.n(c),u=r(14),l=r.n(u),m=r(15),d=r.n(m),f=r(7),p=r.n(f),y=r(0),b=r(2),g=r(20),v=r(75),h=r(11),O=r(3),j=r(1),_=r.n(j),R=r(47),k=r(22),w=r(29),C=r(498),S=r(499),D=r(21);function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=p()(e);if(t){var n=p()(this).constructor;r=Reflect.construct(a,arguments,n)}else r=a.apply(this,arguments);return d()(this,r)}}var T=function(e){l()(r,e);var t=P(r);function r(){return i()(this,r),t.apply(this,arguments)}return s()(r,[{key:"shouldComponentUpdate",value:function(e){return e.isRequesting!==this.props.isRequesting||e.primaryData.isRequesting!==this.props.primaryData.isRequesting||e.secondaryData.isRequesting!==this.props.secondaryData.isRequesting||!Object(O.isEqual)(e.query,this.props.query)}},{key:"getItemChartData",value:function(){var e=this.props,t=e.primaryData,r=e.selectedChart;return t.data.intervals.map((function(e){var t={};return e.subtotals.segments.forEach((function(e){if(e.segment_label){var a=t[e.segment_label]?e.segment_label+" (#"+e.segment_id+")":e.segment_label;t[e.segment_id]={label:a,value:e.subtotals[r.key]||0}}})),q({date:Object(v.format)("Y-m-d\\TH:i:s",e.date_start)},t)}))}},{key:"getTimeChartData",value:function(){var e=this.props,t=e.query,r=e.primaryData,a=e.secondaryData,n=e.selectedChart,o=e.defaultDateRange,i=Object(w.getIntervalForQuery)(t),c=Object(w.getCurrentDates)(t,o),s=c.primary,u=c.secondary;return r.data.intervals.map((function(e,r){var o=Object(w.getPreviousDate)(e.date_start,s.after,u.after,t.compare,i),c=a.data.intervals[r];return{date:Object(v.format)("Y-m-d\\TH:i:s",e.date_start),primary:{label:"".concat(s.label," (").concat(s.range,")"),labelDate:e.date_start,value:e.subtotals[n.key]||0},secondary:{label:"".concat(u.label," (").concat(u.range,")"),labelDate:o.format("YYYY-MM-DD HH:mm:ss"),value:c&&c.subtotals[n.key]||0}}}))}},{key:"getTimeChartTotals",value:function(){var e=this.props,t=e.primaryData,r=e.secondaryData,a=e.selectedChart;return{primary:Object(O.get)(t,["data","totals",a.key],null),secondary:Object(O.get)(r,["data","totals",a.key],null)}}},{key:"renderChart",value:function(e,t,r,a){var n=this.props,o=n.emptySearchResults,i=n.filterParam,c=n.interactiveLegend,s=n.itemsLabel,u=n.legendPosition,l=n.path,m=n.query,d=n.selectedChart,f=n.showHeaderControls,p=n.primaryData,g=Object(w.getIntervalForQuery)(m),v=Object(w.getAllowedIntervalsForQuery)(m),h=Object(w.getDateFormatsForInterval)(g,p.data.intervals.length),O=o?Object(b.__)("No data for the current search","woocommerce-admin"):Object(b.__)("No data for the selected date range","woocommerce-admin"),j=this.context,_=j.formatAmount,C=j.getCurrencyConfig;return Object(y.createElement)(R.Chart,{allowedIntervals:v,data:r,dateParser:"%Y-%m-%dT%H:%M:%S",emptyMessage:O,filterParam:i,interactiveLegend:c,interval:g,isRequesting:t,itemsLabel:s,legendPosition:u,legendTotals:a,mode:e,path:l,query:m,screenReaderFormat:h.screenReaderFormat,showHeaderControls:f,title:d.label,tooltipLabelFormat:h.tooltipLabelFormat,tooltipTitle:"time-comparison"===e&&d.label||null,tooltipValueFormat:Object(k.getTooltipValueFormat)(d.type,_),chartType:Object(w.getChartTypeForQuery)(m),valueType:d.type,xFormat:h.xFormat,x2Format:h.x2Format,currency:C()})}},{key:"renderItemComparison",value:function(){var e=this.props,t=e.isRequesting,r=e.primaryData;if(r.isError)return Object(y.createElement)(S.a,{isError:!0});var a=t||r.isRequesting,n=this.getItemChartData();return this.renderChart("item-comparison",a,n)}},{key:"renderTimeComparison",value:function(){var e=this.props,t=e.isRequesting,r=e.primaryData,a=e.secondaryData;if(!r||r.isError||a.isError)return Object(y.createElement)(S.a,{isError:!0});var n=t||r.isRequesting||a.isRequesting,o=this.getTimeChartData(),i=this.getTimeChartTotals();return this.renderChart("time-comparison",n,o,i)}},{key:"render",value:function(){return"item-comparison"===this.props.mode?this.renderItemComparison():this.renderTimeComparison()}}]),r}(y.Component);T.contextType=C.a,T.propTypes={filters:_.a.array,isRequesting:_.a.bool,itemsLabel:_.a.string,limitProperties:_.a.array,mode:_.a.string,path:_.a.string.isRequired,primaryData:_.a.object,query:_.a.object.isRequired,secondaryData:_.a.object,selectedChart:_.a.shape({key:_.a.string.isRequired,label:_.a.string.isRequired,order:_.a.oneOf(["asc","desc"]),orderby:_.a.string,type:_.a.oneOf(["average","number","currency"]).isRequired}).isRequired},T.defaultProps={isRequesting:!1,primaryData:{data:{intervals:[]},isError:!1,isRequesting:!1},secondaryData:{data:{intervals:[]},isError:!1,isRequesting:!1}};t.a=Object(g.compose)(Object(h.withSelect)((function(e,t){var r=t.charts,a=t.endpoint,n=t.filters,o=t.isRequesting,i=t.limitProperties,c=t.query,s=t.advancedFilters,u=i||[a],l=function e(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t||0===t.length)return null;var n=t.slice(0),o=n.pop();if(o.showFilters(r,a)){var i=Object(D.flattenFilters)(o.filters),c=r[o.param]||o.defaultValue||"all";return Object(O.find)(i,{value:c})}return e(n,r,a)}(n,c),m=Object(O.get)(l,["settings","param"]),d=t.mode||function(e,t){if(e&&t){var r=Object(O.get)(e,["settings","param"]);if(!r||Object.keys(t).includes(r))return Object(O.get)(e,["chartMode"])}return null}(l,c)||"time-comparison",f=e(k.SETTINGS_STORE_NAME).getSetting("wc_admin","wcAdminSettings").woocommerce_default_date_range,p={mode:d,filterParam:m,defaultDateRange:f};if(o)return p;var y=u.some((function(e){return c[e]&&c[e].length}));if(c.search&&!y)return q(q({},p),{},{emptySearchResults:!0});var b=r&&r.map((function(e){return e.key})),g=Object(k.getReportChartData)({endpoint:a,dataType:"primary",query:c,select:e,limitBy:u,filters:n,advancedFilters:s,defaultDateRange:f,fields:b});if("item-comparison"===d)return q(q({},p),{},{primaryData:g});var v=Object(k.getReportChartData)({endpoint:a,dataType:"secondary",query:c,select:e,limitBy:u,filters:n,advancedFilters:s,defaultDateRange:f,fields:b});return q(q({},p),{},{primaryData:g,secondaryData:v})})))(T)},503:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var a=r(3);function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object(a.find)(t,{key:e});return r||t[0]}},504:function(e,t,r){"use strict";var a=r(12),n=r.n(a),o=r(13),i=r.n(o),c=r(14),s=r.n(c),u=r(15),l=r.n(u),m=r(7),d=r.n(m),f=r(0),p=r(2),y=r(20),b=r(11),g=r(1),v=r.n(g),h=r(21),O=r(47),j=r(142),_=r(22),R=r(29),k=r(27),w=r(499),C=r(498);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=d()(e);if(t){var n=d()(this).constructor;r=Reflect.construct(a,arguments,n)}else r=a.apply(this,arguments);return l()(this,r)}}var D=function(e){s()(r,e);var t=S(r);function r(){return n()(this,r),t.apply(this,arguments)}return i()(r,[{key:"formatVal",value:function(e,t){var r=this.context,a=r.formatAmount,n=r.getCurrencyConfig;return"currency"===t?a(e):Object(j.formatValue)(n(),t,e)}},{key:"getValues",value:function(e,t){var r=this.props,a=r.emptySearchResults,n=r.summaryData.totals,o=n.primary?n.primary[e]:0,i=n.secondary?n.secondary[e]:0,c=a?0:o,s=a?0:i;return{delta:Object(j.calculateDelta)(c,s),prevValue:this.formatVal(s,t),value:this.formatVal(c,t)}}},{key:"render",value:function(){var e=this,t=this.props,r=t.charts,a=t.query,n=t.selectedChart,o=t.summaryData,i=t.endpoint,c=t.report,s=t.defaultDateRange,u=o.isError,l=o.isRequesting;if(u)return Object(f.createElement)(w.a,{isError:!0});if(l)return Object(f.createElement)(O.SummaryListPlaceholder,{numberOfItems:r.length});var m=Object(R.getDateParamsFromQuery)(a,s).compare;return Object(f.createElement)(O.SummaryList,null,(function(t){var a=t.onToggle;return r.map((function(t){var r=t.key,o=t.order,s=t.orderby,u=t.label,l=t.type,d={chart:r};s&&(d.orderby=s),o&&(d.order=o);var y=Object(h.getNewPath)(d),b=n.key===r,g=e.getValues(r,l),v=g.delta,j=g.prevValue,_=g.value;return Object(f.createElement)(O.SummaryNumber,{key:r,delta:v,href:y,label:u,prevLabel:"previous_period"===m?Object(p.__)("Previous Period:","woocommerce-admin"):Object(p.__)("Previous Year:","woocommerce-admin"),prevValue:j,selected:b,value:_,onLinkClickCallback:function(){a&&a(),Object(k.recordEvent)("analytics_chart_tab_click",{report:c||i,key:r})}})}))}))}}]),r}(f.Component);D.propTypes={charts:v.a.array.isRequired,endpoint:v.a.string.isRequired,limitProperties:v.a.array,query:v.a.object.isRequired,selectedChart:v.a.shape({key:v.a.string.isRequired,label:v.a.string.isRequired,order:v.a.oneOf(["asc","desc"]),orderby:v.a.string,type:v.a.oneOf(["average","number","currency"]).isRequired}).isRequired,summaryData:v.a.object,report:v.a.string},D.defaultProps={summaryData:{totals:{primary:{},secondary:{}},isError:!1}},D.contextType=C.a,t.a=Object(y.compose)(Object(b.withSelect)((function(e,t){var r=t.charts,a=t.endpoint,n=t.limitProperties,o=t.query,i=t.filters,c=t.advancedFilters,s=n||[a],u=s.some((function(e){return o[e]&&o[e].length}));if(o.search&&!u)return{emptySearchResults:!0};var l=r&&r.map((function(e){return e.key})),m=e(_.SETTINGS_STORE_NAME).getSetting("wc_admin","wcAdminSettings").woocommerce_default_date_range;return{summaryData:Object(_.getSummaryNumbers)({endpoint:a,query:o,select:e,limitBy:s,filters:i,advancedFilters:c,defaultDateRange:m,fields:l}),defaultDateRange:m}})))(D)},513:function(e,t,r){"use strict";function a(e,t,r){return!!t&&(e&&t<=r==="instock")}r.d(t,"a",(function(){return a}))},530:function(e,t,r){"use strict";var a=r(12),n=r.n(a),o=r(13),i=r.n(o),c=r(9),s=r.n(c),u=r(14),l=r.n(u),m=r(15),d=r.n(m),f=r(7),p=r.n(f),y=r(0),b=r(2),g=r(20),v=r(41),h=r(11),O=r(3),j=r(21),_=r(47),R=r(142),k=r(25),w=r(22),C=r(531),S=r(513),D=r(506),E=r(498);r(575);function q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=p()(e);if(t){var n=p()(this).constructor;r=Reflect.construct(a,arguments,n)}else r=a.apply(this,arguments);return d()(this,r)}}var P=Object(k.g)("manageStock","no"),T=Object(k.g)("stockStatuses",{}),A=function(e){l()(r,e);var t=q(r);function r(){var e;return n()(this,r),(e=t.call(this)).getHeadersContent=e.getHeadersContent.bind(s()(e)),e.getRowsContent=e.getRowsContent.bind(s()(e)),e.getSummary=e.getSummary.bind(s()(e)),e}return i()(r,[{key:"getHeadersContent",value:function(){return[{label:Object(b.__)("Product Title","woocommerce-admin"),key:"product_name",required:!0,isLeftAligned:!0,isSortable:!0},{label:Object(b.__)("SKU","woocommerce-admin"),key:"sku",hiddenByDefault:!0,isSortable:!0},{label:Object(b.__)("Items Sold","woocommerce-admin"),key:"items_sold",required:!0,defaultSort:!0,isSortable:!0,isNumeric:!0},{label:Object(b.__)("Net Sales","woocommerce-admin"),screenReaderLabel:Object(b.__)("Net Sales","woocommerce-admin"),key:"net_revenue",required:!0,isSortable:!0,isNumeric:!0},{label:Object(b.__)("Orders","woocommerce-admin"),key:"orders_count",isSortable:!0,isNumeric:!0},{label:Object(b.__)("Category","woocommerce-admin"),key:"product_cat"},{label:Object(b.__)("Variations","woocommerce-admin"),key:"variations",isSortable:!0},"yes"===P?{label:Object(b.__)("Status","woocommerce-admin"),key:"stock_status"}:null,"yes"===P?{label:Object(b.__)("Stock","woocommerce-admin"),key:"stock",isNumeric:!0}:null].filter(Boolean)}},{key:"getRowsContent",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.query,a=Object(j.getPersistedQuery)(r),n=this.context,o=n.render,i=n.formatDecimal,c=n.getCurrencyConfig,s=c();return Object(O.map)(t,(function(t){var n=t.product_id,c=t.items_sold,u=t.net_revenue,l=t.orders_count,m=t.extended_info||{},d=m.category_ids,f=m.low_stock_amount,p=m.manage_stock,g=m.sku,h=m.stock_status,O=m.stock_quantity,w=m.variations,D=void 0===w?[]:w,E=Object(v.decodeEntities)(m.name),q=Object(j.getNewPath)(a,"/analytics/orders",{filter:"advanced",product_includes:n}),A=Object(j.getNewPath)(a,"/analytics/products",{filter:"single_product",products:n}),N=e.props.categories,F=d&&d.map((function(e){return N.get(e)})).filter(Boolean)||[],x=Object(S.a)(h,O,f)?Object(y.createElement)(_.Link,{href:Object(k.f)("post.php?action=edit&post="+n),type:"wp-admin"},Object(b._x)("Low","Indication of a low quantity","woocommerce-admin")):T[h];return[{display:Object(y.createElement)(_.Link,{href:A,type:"wc-admin"},E),value:E},{display:g,value:g},{display:Object(R.formatValue)(s,"number",c),value:c},{display:o(u),value:i(u)},{display:Object(y.createElement)(_.Link,{href:q,type:"wc-admin"},l),value:l},{display:Object(y.createElement)("div",{className:"woocommerce-table__product-categories"},F[0]&&Object(y.createElement)(C.a,{category:F[0],categories:N}),F.length>1&&Object(y.createElement)(_.Tag,{label:Object(b.sprintf)(Object(b._x)("+%d more","categories","woocommerce-admin"),F.length-1),popoverContents:F.map((function(e){return Object(y.createElement)(C.a,{category:e,categories:N,key:e.id,query:r})}))})),value:F.map((function(e){return e.name})).join(", ")},{display:Object(R.formatValue)(s,"number",D.length),value:D.length},"yes"===P?{display:p?x:Object(b.__)("N/A","woocommerce-admin"),value:p?T[h]:null}:null,"yes"===P?{display:p?Object(R.formatValue)(s,"number",O):Object(b.__)("N/A","woocommerce-admin"),value:O}:null].filter(Boolean)}))}},{key:"getSummary",value:function(e){var t=e.products_count,r=void 0===t?0:t,a=e.items_sold,n=void 0===a?0:a,o=e.net_revenue,i=void 0===o?0:o,c=e.orders_count,s=void 0===c?0:c,u=this.context,l=u.formatAmount,m=(0,u.getCurrencyConfig)();return[{label:Object(b._n)("product","products",r,"woocommerce-admin"),value:Object(R.formatValue)(m,"number",r)},{label:Object(b._n)("item sold","items sold",n,"woocommerce-admin"),value:Object(R.formatValue)(m,"number",n)},{label:Object(b.__)("net sales","woocommerce-admin"),value:l(i)},{label:Object(b._n)("orders","orders",s,"woocommerce-admin"),value:Object(R.formatValue)(m,"number",s)}]}},{key:"render",value:function(){var e=this.props,t=e.advancedFilters,r=e.baseSearchQuery,a=e.filters,n=e.hideCompare,o=e.isRequesting,i=e.query,c={helpText:Object(b.__)("Check at least two products below to compare","woocommerce-admin"),placeholder:Object(b.__)("Search by product name or SKU","woocommerce-admin")};return Object(y.createElement)(D.a,{compareBy:n?void 0:"products",endpoint:"products",getHeadersContent:this.getHeadersContent,getRowsContent:this.getRowsContent,getSummary:this.getSummary,summaryFields:["products_count","items_sold","net_revenue","orders_count"],itemIdField:"product_id",isRequesting:o,labels:c,query:i,searchBy:"products",baseSearchQuery:r,tableQuery:{orderby:i.orderby||"items_sold",order:i.order||"desc",extended_info:!0,segmentby:i.segmentby},title:Object(b.__)("Products","woocommerce-admin"),columnPrefsKey:"products_report_columns",filters:a,advancedFilters:t})}}]),r}(y.Component);A.contextType=E.a,t.a=Object(g.compose)(Object(h.withSelect)((function(e,t){var r=t.query;if(t.isRequesting||r.search&&(!r.products||!r.products.length))return{};var a=e(w.ITEMS_STORE_NAME),n=a.getItems,o=a.getItemsError,i=a.isResolving,c={per_page:-1};return{categories:n("categories",c),isError:Boolean(o("categories",c)),isRequesting:i("getItems",["categories",c])}})))(A)},531:function(e,t,r){"use strict";r.d(t,"a",(function(){return h}));var a=r(12),n=r.n(a),o=r(13),i=r.n(o),c=r(14),s=r.n(c),u=r(15),l=r.n(u),m=r(7),d=r.n(m),f=r(0),p=r(3),y=r(4),b=r(47),g=r(21);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=d()(e);if(t){var n=d()(this).constructor;r=Reflect.construct(a,arguments,n)}else r=a.apply(this,arguments);return l()(this,r)}}var h=function(e){s()(r,e);var t=v(r);function r(){return n()(this,r),t.apply(this,arguments)}return i()(r,[{key:"getCategoryAncestorIds",value:function(e,t){for(var r=[],a=e.parent;a;)r.unshift(a),a=t.get(a).parent;return r}},{key:"getCategoryAncestors",value:function(e,t){var r=this.getCategoryAncestorIds(e,t);if(r.length)return 1===r.length?t.get(Object(p.first)(r)).name+" › ":2===r.length?t.get(Object(p.first)(r)).name+" › "+t.get(Object(p.last)(r)).name+" › ":t.get(Object(p.first)(r)).name+" … "+t.get(Object(p.last)(r)).name+" › "}},{key:"render",value:function(){var e=this.props,t=e.categories,r=e.category,a=e.query,n=Object(g.getPersistedQuery)(a);return r?Object(f.createElement)("div",{className:"woocommerce-table__breadcrumbs"},this.getCategoryAncestors(r,t),Object(f.createElement)(b.Link,{href:Object(g.getNewPath)(n,"/analytics/categories",{filter:"single_category",categories:r.id}),type:"wc-admin"},r.name)):Object(f.createElement)(y.Spinner,null)}}]),r}(f.Component)},575:function(e,t,r){}}]);
|
dist/chunks/4.js
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
"use strict";
|
7 |
/* unused harmony export ALLOWED_TAGS */
|
8 |
/* unused harmony export ALLOWED_ATTR */
|
9 |
-
/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
10 |
/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dompurify__WEBPACK_IMPORTED_MODULE_0__);
|
11 |
/**
|
12 |
* External dependencies
|
@@ -25,7 +25,7 @@ var ALLOWED_ATTR = ['target', 'href', 'rel', 'name', 'download'];
|
|
25 |
|
26 |
/***/ }),
|
27 |
|
28 |
-
/***/
|
29 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
30 |
|
31 |
"use strict";
|
@@ -80,7 +80,7 @@ var external_this_wc_components_ = __webpack_require__(47);
|
|
80 |
var external_this_wp_components_ = __webpack_require__(4);
|
81 |
|
82 |
// EXTERNAL MODULE: ./client/header/activity-panel/activity-card/style.scss
|
83 |
-
var style = __webpack_require__(
|
84 |
|
85 |
// EXTERNAL MODULE: external "lodash"
|
86 |
var external_lodash_ = __webpack_require__(3);
|
@@ -307,14 +307,14 @@ activity_card_ActivityCard.defaultProps = {
|
|
307 |
|
308 |
/***/ }),
|
309 |
|
310 |
-
/***/
|
311 |
/***/ (function(module, exports, __webpack_require__) {
|
312 |
|
313 |
// extracted by mini-css-extract-plugin
|
314 |
|
315 |
/***/ }),
|
316 |
|
317 |
-
/***/
|
318 |
/***/ (function(module, exports, __webpack_require__) {
|
319 |
|
320 |
// extracted by mini-css-extract-plugin
|
@@ -361,7 +361,7 @@ var TransitionGroup = __webpack_require__(293);
|
|
361 |
var CSSTransition = __webpack_require__(292);
|
362 |
|
363 |
// EXTERNAL MODULE: ./client/header/activity-panel/activity-card/index.js + 1 modules
|
364 |
-
var activity_card = __webpack_require__(
|
365 |
|
366 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
|
367 |
var classCallCheck = __webpack_require__(12);
|
@@ -661,7 +661,7 @@ action_InboxNoteAction.propTypes = {
|
|
661 |
var sanitize_html = __webpack_require__(508);
|
662 |
|
663 |
// EXTERNAL MODULE: ./client/inbox-panel/style.scss
|
664 |
-
var style = __webpack_require__(
|
665 |
|
666 |
// CONCATENATED MODULE: ./client/utils/index.js
|
667 |
/**
|
6 |
"use strict";
|
7 |
/* unused harmony export ALLOWED_TAGS */
|
8 |
/* unused harmony export ALLOWED_ATTR */
|
9 |
+
/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(515);
|
10 |
/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dompurify__WEBPACK_IMPORTED_MODULE_0__);
|
11 |
/**
|
12 |
* External dependencies
|
25 |
|
26 |
/***/ }),
|
27 |
|
28 |
+
/***/ 511:
|
29 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
30 |
|
31 |
"use strict";
|
80 |
var external_this_wp_components_ = __webpack_require__(4);
|
81 |
|
82 |
// EXTERNAL MODULE: ./client/header/activity-panel/activity-card/style.scss
|
83 |
+
var style = __webpack_require__(540);
|
84 |
|
85 |
// EXTERNAL MODULE: external "lodash"
|
86 |
var external_lodash_ = __webpack_require__(3);
|
307 |
|
308 |
/***/ }),
|
309 |
|
310 |
+
/***/ 540:
|
311 |
/***/ (function(module, exports, __webpack_require__) {
|
312 |
|
313 |
// extracted by mini-css-extract-plugin
|
314 |
|
315 |
/***/ }),
|
316 |
|
317 |
+
/***/ 544:
|
318 |
/***/ (function(module, exports, __webpack_require__) {
|
319 |
|
320 |
// extracted by mini-css-extract-plugin
|
361 |
var CSSTransition = __webpack_require__(292);
|
362 |
|
363 |
// EXTERNAL MODULE: ./client/header/activity-panel/activity-card/index.js + 1 modules
|
364 |
+
var activity_card = __webpack_require__(511);
|
365 |
|
366 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
|
367 |
var classCallCheck = __webpack_require__(12);
|
661 |
var sanitize_html = __webpack_require__(508);
|
662 |
|
663 |
// EXTERNAL MODULE: ./client/inbox-panel/style.scss
|
664 |
+
var style = __webpack_require__(544);
|
665 |
|
666 |
// CONCATENATED MODULE: ./client/utils/index.js
|
667 |
/**
|
dist/chunks/4.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[4],{508:function(e,t,n){"use strict";var c=n(513),a=["a","b","em","i","strong","p","br"],o=["target","href","rel","name","download"];t.a=function(e){return{__html:Object(c.sanitize)(e,{ALLOWED_TAGS:a,ALLOWED_ATTR:o})}}},510:function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return R}));var c=n(12),a=n.n(c),o=n(13),i=n.n(o),r=n(14),s=n.n(r),l=n(15),m=n.n(l),u=n(7),d=n.n(u),f=n(0),b=n(6),p=n.n(b),_=n(189),h=n.n(_),v=n(16),y=n.n(v),O=n(1),g=n.n(O),j=n(47),N=n(4),E=(n(539),n(3));function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=d()(e);if(t){var a=d()(this).constructor;n=Reflect.construct(c,arguments,a)}else n=c.apply(this,arguments);return m()(this,n)}}var k=function(e){s()(n,e);var t=w(n);function n(){return a()(this,n),t.apply(this,arguments)}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.hasAction,c=e.hasDate,a=e.hasSubtitle,o=e.lines,i=p()("woocommerce-activity-card is-loading",t);return Object(f.createElement)("div",{className:i,"aria-hidden":!0},Object(f.createElement)("span",{className:"woocommerce-activity-card__icon"},Object(f.createElement)("span",{className:"is-placeholder"})),Object(f.createElement)("div",{className:"woocommerce-activity-card__header"},Object(f.createElement)("div",{className:"woocommerce-activity-card__title is-placeholder"}),a&&Object(f.createElement)("div",{className:"woocommerce-activity-card__subtitle is-placeholder"}),c&&Object(f.createElement)("div",{className:"woocommerce-activity-card__date"},Object(f.createElement)("span",{className:"is-placeholder"}))),Object(f.createElement)("div",{className:"woocommerce-activity-card__body"},Object(E.range)(o).map((function(e){return Object(f.createElement)("span",{className:"is-placeholder",key:e})}))),n&&Object(f.createElement)("div",{className:"woocommerce-activity-card__actions"},Object(f.createElement)("span",{className:"is-placeholder"})))}}]),n}(f.Component);k.propTypes={className:g.a.string,hasAction:g.a.bool,hasDate:g.a.bool,hasSubtitle:g.a.bool,lines:g.a.number},k.defaultProps={hasAction:!1,hasDate:!1,hasSubtitle:!1,lines:1};var R=k;function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=d()(e);if(t){var a=d()(this).constructor;n=Reflect.construct(c,arguments,a)}else n=c.apply(this,arguments);return m()(this,n)}}var C=function(e){s()(n,e);var t=D(n);function n(){return a()(this,n),t.apply(this,arguments)}return i()(n,[{key:"getCard",value:function(){var e=this.props,t=e.actions,n=e.className,c=e.children,a=e.date,o=e.icon,i=e.subtitle,r=e.title,s=e.unread,l=p()("woocommerce-activity-card",n),m=Array.isArray(t)?t:[t],u=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(a)?y.a.utc(a).fromNow():a;return Object(f.createElement)("section",{className:l},s&&Object(f.createElement)("span",{className:"woocommerce-activity-card__unread"}),o&&Object(f.createElement)("span",{className:"woocommerce-activity-card__icon","aria-hidden":!0},o),r&&Object(f.createElement)("header",{className:"woocommerce-activity-card__header"},Object(f.createElement)(j.H,{className:"woocommerce-activity-card__title"},r),i&&Object(f.createElement)("div",{className:"woocommerce-activity-card__subtitle"},i),u&&Object(f.createElement)("span",{className:"woocommerce-activity-card__date"},u)),c&&Object(f.createElement)(j.Section,{className:"woocommerce-activity-card__body"},c),t&&Object(f.createElement)("footer",{className:"woocommerce-activity-card__actions"},m.map((function(e,t){return Object(f.cloneElement)(e,{key:t})}))))}},{key:"render",value:function(){var e=this.props.onClick;return e?Object(f.createElement)(N.Button,{className:"woocommerce-activity-card__button",onClick:e},this.getCard()):this.getCard()}}]),n}(f.Component);C.propTypes={actions:g.a.oneOfType([g.a.arrayOf(g.a.element),g.a.element]),onClick:g.a.func,className:g.a.string,children:g.a.node,date:g.a.string,icon:g.a.node,subtitle:g.a.node,title:g.a.oneOfType([g.a.string,g.a.node]),unread:g.a.bool},C.defaultProps={icon:Object(f.createElement)(h.a,{size:48}),unread:!1}},539:function(e,t,n){},543:function(e,t,n){},587:function(e,t,n){"use strict";n.r(t);var c=n(18),a=n.n(c),o=n(34),i=n.n(o),r=n(0),s=n(2),l=n(20),m=n(47),u=n(22),d=n(11),f=n(293),b=n(292),p=n(510),_=n(12),h=n.n(_),v=n(13),y=n.n(v),O=n(14),g=n.n(O),j=n(15),N=n.n(j),E=n(7),w=n.n(E),k=n(1),R=n.n(k);function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(c,arguments,a)}else n=c.apply(this,arguments);return N()(this,n)}}var C=function(e){g()(n,e);var t=D(n);function n(){return h()(this,n),t.apply(this,arguments)}return y()(n,[{key:"render",value:function(){var e=this.props.className;return Object(r.createElement)("div",{className:"woocommerce-inbox-message is-placeholder ".concat(e),"aria-hidden":!0},Object(r.createElement)("div",{className:"woocommerce-inbox-message__wrapper"},Object(r.createElement)("div",{className:"woocommerce-inbox-message__content"},Object(r.createElement)("div",{className:"woocommerce-inbox-message__date"},Object(r.createElement)("div",{className:"sixth-line"})),Object(r.createElement)("div",{className:"woocommerce-inbox-message__title"},Object(r.createElement)("div",{className:"line"}),Object(r.createElement)("div",{className:"line"})),Object(r.createElement)("div",{className:"woocommerce-inbox-message__text"},Object(r.createElement)("div",{className:"line"}),Object(r.createElement)("div",{className:"third-line"}))),Object(r.createElement)("div",{className:"woocommerce-inbox-message__actions"},Object(r.createElement)("div",{className:"fifth-line"}),Object(r.createElement)("div",{className:"fifth-line"}))))}}]),n}(r.Component);C.propTypes={className:R.a.string};var x=C,A=n(9),T=n.n(A),S=n(5),B=n.n(S),M=n(4),U=n(528),P=n.n(U),L=n(16),q=n.n(L),I=n(6),F=n.n(I),Y=n(27),V=n(25);function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(c,arguments,a)}else n=c.apply(this,arguments);return N()(this,n)}}var z=function(e){g()(n,e);var t=W(n);function n(e){var c;return h()(this,n),(c=t.call(this,e)).state={inAction:!1},c.handleActionClick=c.handleActionClick.bind(T()(c)),c}return y()(n,[{key:"handleActionClick",value:function(e){var t=this.props,n=t.action,c=t.actionCallback,a=t.batchUpdateNotes,o=t.createNotice,i=t.noteId,r=t.triggerNoteAction,l=t.removeAllNotes,m=t.removeNote,u=t.onClick,d=t.updateNote,f=e.target.href||"",b=!0;f.length&&!f.startsWith(V.a)&&(e.preventDefault(),b=!1,window.open(f,"_blank")),n?this.setState({inAction:b},(function(){r(i,n.id),u&&u()})):(i?m(i).then((function(){o("success",Object(s.__)("Message dismissed","woocommerce-admin"),{actions:[{label:Object(s.__)("Undo","woocommerce-admin"),onClick:function(){d(i,{is_deleted:0})}}]})})).catch((function(){o("error",Object(s.__)("Message could not be dismissed","woocommerce-admin"))})):l().then((function(e){o("success",Object(s.__)("All messages dismissed","woocommerce-admin"),{actions:[{label:Object(s.__)("Undo","woocommerce-admin"),onClick:function(){a(e.map((function(e){return e.id})),{is_deleted:0})}}]})})).catch((function(){o("error",Object(s.__)("Message could not be dismissed","woocommerce-admin"))})),c(!0))}},{key:"render",value:function(){var e=this.props,t=e.action,n=e.dismiss,c=e.label;return Object(r.createElement)(M.Button,{isSecondary:!0,isBusy:this.state.inAction,disabled:this.state.inAction,href:t&&t.url&&t.url.length?t.url:void 0,onClick:this.handleActionClick},n?c:t.label)}}]),n}(r.Component);z.propTypes={noteId:R.a.number,label:R.a.string,dismiss:R.a.bool,actionCallback:R.a.func,action:R.a.shape({id:R.a.number.isRequired,url:R.a.string,label:R.a.string.isRequired,primary:R.a.bool.isRequired}),onClick:R.a.func};var H=Object(l.compose)(Object(d.withDispatch)((function(e){var t=e("core/notices").createNotice,n=e(u.NOTES_STORE_NAME),c=n.batchUpdateNotes,a=n.removeAllNotes,o=n.removeNote,i=n.updateNote;return{batchUpdateNotes:c,createNotice:t,removeAllNotes:a,removeNote:o,triggerNoteAction:n.triggerNoteAction,updateNote:i}})))(z),J=n(508);n(543);function Q(){var e,t="",n=(e=window.location.search)?e.substr(1).split("&").reduce((function(e,t){var n=t.split("="),c=n[0],a=decodeURIComponent(n[1]);return a=isNaN(Number(a))?a:Number(a),e[c]=a,e}),{}):{},c=n.page,a=n.path,o=n.post_type;if(c){var i="wc-admin"===c?"home_screen":c;t=a?a.replace(/\//g,"_").substring(1):i}else o&&(t=o);return t}function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(c,arguments,a)}else n=c.apply(this,arguments);return N()(this,n)}}var Z=function(e){g()(n,e);var t=G(n);function n(e){var c;return h()(this,n),c=t.call(this,e),B()(T()(c),"onActionClicked",(function(e){e.actioned_text&&c.setState({clickedActionText:e.actioned_text})})),c.onVisible=c.onVisible.bind(T()(c)),c.hasBeenSeen=!1,c.state={isDismissModalOpen:!1,dismissType:null,clickedActionText:null},c.openDismissModal=c.openDismissModal.bind(T()(c)),c.closeDismissModal=c.closeDismissModal.bind(T()(c)),c.bodyNotificationRef=Object(r.createRef)(),c.toggleButtonRef=Object(r.createRef)(),c.screen=Q(),c}return y()(n,[{key:"componentDidMount",value:function(){var e=this;this.bodyNotificationRef.current&&this.bodyNotificationRef.current.addEventListener("click",(function(t){return e.handleBodyClick(t,e.props)}))}},{key:"componentWillUnmount",value:function(){var e=this;this.bodyNotificationRef.current&&this.bodyNotificationRef.current.removeEventListener("click",(function(t){return e.handleBodyClick(t,e.props)}))}},{key:"handleBodyClick",value:function(e,t){var n=e.target.href;if(n){var c=t.note;Object(Y.recordEvent)("wcadmin_inbox_action_click",{note_name:c.name,note_title:c.title,note_content_inner_link:n})}}},{key:"onVisible",value:function(e){if(e&&!this.hasBeenSeen){var t=this.props.note;Object(Y.recordEvent)("inbox_note_view",{note_content:t.content,note_name:t.name,note_title:t.title,note_type:t.type,screen:this.screen}),this.hasBeenSeen=!0}}},{key:"openDismissModal",value:function(e,t){this.setState({isDismissModalOpen:!0,dismissType:e}),t()}},{key:"closeDismissModal",value:function(e){var t=this.state.dismissType,n=this.props.note,c="all"===t;Object(Y.recordEvent)("inbox_action_dismiss",{note_name:n.name,note_title:n.title,note_name_dismiss_all:c,note_name_dismiss_confirmation:e||!1,screen:this.screen}),this.setState({isDismissModalOpen:!1})}},{key:"handleBlur",value:function(e,t){var n;if(e.relatedTarget)n=e.relatedTarget;else if(this.toggleButtonRef.current){var c=this.toggleButtonRef.current.ownerDocument;n=c?c.activeElement:null}!!n&&["woocommerce-admin-dismiss-notification","components-popover__content"].some((function(e){return n.className.includes(e)}))?e.preventDefault():t()}},{key:"renderDismissButton",value:function(){var e=this;return this.state.clickedActionText?null:Object(r.createElement)(M.Dropdown,{contentClassName:"woocommerce-admin-dismiss-dropdown",position:"bottom right",renderToggle:function(t){var n=t.onClose,c=t.onToggle;return Object(r.createElement)(M.Button,{isTertiary:!0,onClick:c,ref:e.toggleButtonRef,onBlur:function(t){return e.handleBlur(t,n)}},Object(s.__)("Dismiss","woocommerce-admin"))},focusOnMount:!1,popoverProps:{noArrow:!0},renderContent:function(t){var n=t.onToggle;return Object(r.createElement)("ul",null,Object(r.createElement)("li",null,Object(r.createElement)(M.Button,{className:"woocommerce-admin-dismiss-notification",onClick:function(){return e.openDismissModal("this",n)}},Object(s.__)("Dismiss this message","woocommerce-admin"))),Object(r.createElement)("li",null,Object(r.createElement)(M.Button,{className:"woocommerce-admin-dismiss-notification",onClick:function(){return e.openDismissModal("all",n)}},Object(s.__)("Dismiss all messages","woocommerce-admin"))))}})}},{key:"getDismissConfirmationButton",value:function(){var e=this.props.note,t=this.state.dismissType;return Object(r.createElement)(H,{key:e.id,noteId:"all"===t?null:e.id,label:Object(s.__)("Yes, I'm sure","woocommerce-admin"),actionCallback:this.closeDismissModal,dismiss:!0,screen:this.screen})}},{key:"renderDismissConfirmationModal",value:function(){var e=this;return Object(r.createElement)(M.Modal,{title:Object(r.createElement)(r.Fragment,null,Object(s.__)("Are you sure?","woocommerce-admin")),onRequestClose:function(){return e.closeDismissModal()},className:"woocommerce-inbox-dismiss-confirmation_modal"},Object(r.createElement)("div",{className:"woocommerce-inbox-dismiss-confirmation_wrapper"},Object(r.createElement)("p",null,Object(s.__)("Dismissed messages cannot be viewed again","woocommerce-admin")),Object(r.createElement)("div",{className:"woocommerce-inbox-dismiss-confirmation_buttons"},Object(r.createElement)(M.Button,{isSecondary:!0,onClick:function(){return e.closeDismissModal()}},Object(s.__)("Cancel","woocommerce-admin")),this.getDismissConfirmationButton())))}},{key:"renderActions",value:function(e){var t=this,n=e.actions,c=e.id,a=this.state.clickedActionText;return a||(n?Object(r.createElement)(r.Fragment,null,n.map((function(e,n){return Object(r.createElement)(H,{key:n,noteId:c,action:e,onClick:function(){return t.onActionClicked(e)}})}))):void 0)}},{key:"render",value:function(){var e=this.props,t=e.lastRead,n=e.note,c=this.state.isDismissModalOpen,a=n.content,o=n.date_created,i=n.date_created_gmt,s=n.image,l=n.is_deleted,u=n.layout,d=n.status,f=n.title;if(l)return null;var b=!t||!i||new Date(i+"Z").getTime()>t,p=o,_="plain"!==u&&""!==u,h=F()("woocommerce-inbox-message",u,{"message-is-unread":b&&"unactioned"===d});return Object(r.createElement)(P.a,{onChange:this.onVisible},Object(r.createElement)("section",{className:h},_&&Object(r.createElement)("div",{className:"woocommerce-inbox-message__image"},Object(r.createElement)("img",{src:s,alt:""})),Object(r.createElement)("div",{className:"woocommerce-inbox-message__wrapper"},Object(r.createElement)("div",{className:"woocommerce-inbox-message__content"},b&&Object(r.createElement)("div",{className:"woocommerce-inbox-message__unread-indicator"}),p&&Object(r.createElement)("span",{className:"woocommerce-inbox-message__date"},q.a.utc(p).fromNow()),Object(r.createElement)(m.H,{className:"woocommerce-inbox-message__title"},f),Object(r.createElement)(m.Section,{className:"woocommerce-inbox-message__text"},Object(r.createElement)("span",{dangerouslySetInnerHTML:Object(J.a)(a),ref:this.bodyNotificationRef}))),Object(r.createElement)("div",{className:"woocommerce-inbox-message__actions"},this.renderActions(n),this.renderDismissButton())),c&&this.renderDismissConfirmationModal()))}}]),n}(r.Component);Z.propTypes={note:R.a.shape({id:R.a.number,status:R.a.string,title:R.a.string,content:R.a.string,date_created:R.a.string,date_created_gmt:R.a.string,actions:R.a.arrayOf(R.a.shape({id:R.a.number.isRequired,url:R.a.string,label:R.a.string.isRequired,primary:R.a.bool.isRequired})),layout:R.a.string,image:R.a.string,is_deleted:R.a.bool}),lastRead:R.a.number};var K=Z,X=n(196),$=function(e){var t=e.hasNotes,n=e.isBatchUpdating,c=e.lastRead,a=e.notes;if(!n){if(!t)return Object(r.createElement)(p.a,{className:"woocommerce-empty-activity-card",title:Object(s.__)("Your inbox is empty","woocommerce-admin"),icon:!1},Object(s.__)("As things begin to happen in your store your inbox will start to fill up. You'll see things like achievements, new feature announcements, extension recommendations and more!","woocommerce-admin"));var o=Object.keys(a).map((function(e){return a[e]}));return Object(r.createElement)(f.a,{role:"menu"},o.map((function(e){var t=e.id;return e.is_deleted?null:Object(r.createElement)(b.a,{key:t,timeout:500,classNames:"woocommerce-inbox-message"},Object(r.createElement)(K,{key:t,note:e,lastRead:c}))})))}},ee={page:1,per_page:u.QUERY_DEFAULTS.pageSize,status:"unactioned",type:u.QUERY_DEFAULTS.noteTypes,orderby:"date",order:"desc",_fields:["id","name","title","content","type","status","actions","date_created","date_created_gmt","layout","image","is_deleted"]};t.default=Object(l.compose)(Object(d.withSelect)((function(e){var t=e(u.NOTES_STORE_NAME),n=t.getNotes,c=t.getNotesError,a=t.isResolving,o=t.isNotesRequesting;return{notes:n(ee),isError:Boolean(c("getNotes",[ee])),isResolving:a("getNotes",[ee]),isBatchUpdating:o("batchUpdateNotes")}})))((function(e){var t=e.isError,n=e.isResolving,c=e.isBatchUpdating,o=e.notes,l=Object(u.useUserPreferences)(),d=l.updateUserPreferences,f=i()(l,["updateUserPreferences"]),b=Object(r.useState)(f.activity_panel_inbox_last_read),p=a()(b,1)[0];if(Object(r.useEffect)((function(){var e=Date.now();d({activity_panel_inbox_last_read:e})}),[]),t){var _=Object(s.__)("There was an error getting your inbox. Please try again.","woocommerce-admin"),h=Object(s.__)("Reload","woocommerce-admin");return Object(r.createElement)(m.EmptyContent,{title:_,actionLabel:h,actionURL:null,actionCallback:function(){window.location.reload()}})}var v=Object(X.b)(o);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"woocommerce-homepage-notes-wrapper"},(n||c)&&Object(r.createElement)(m.Section,null,Object(r.createElement)(x,{className:"banner message-is-unread"})),Object(r.createElement)(m.Section,null,!n&&!c&&$({hasNotes:v,isBatchUpdating:c,lastRead:p,notes:o}))))}))}}]);
|
1 |
+
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[4],{508:function(e,t,n){"use strict";var c=n(515),a=["a","b","em","i","strong","p","br"],o=["target","href","rel","name","download"];t.a=function(e){return{__html:Object(c.sanitize)(e,{ALLOWED_TAGS:a,ALLOWED_ATTR:o})}}},511:function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return R}));var c=n(12),a=n.n(c),o=n(13),i=n.n(o),r=n(14),s=n.n(r),l=n(15),m=n.n(l),u=n(7),d=n.n(u),f=n(0),b=n(6),p=n.n(b),_=n(189),h=n.n(_),v=n(16),y=n.n(v),O=n(1),g=n.n(O),j=n(47),N=n(4),E=(n(540),n(3));function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=d()(e);if(t){var a=d()(this).constructor;n=Reflect.construct(c,arguments,a)}else n=c.apply(this,arguments);return m()(this,n)}}var k=function(e){s()(n,e);var t=w(n);function n(){return a()(this,n),t.apply(this,arguments)}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.hasAction,c=e.hasDate,a=e.hasSubtitle,o=e.lines,i=p()("woocommerce-activity-card is-loading",t);return Object(f.createElement)("div",{className:i,"aria-hidden":!0},Object(f.createElement)("span",{className:"woocommerce-activity-card__icon"},Object(f.createElement)("span",{className:"is-placeholder"})),Object(f.createElement)("div",{className:"woocommerce-activity-card__header"},Object(f.createElement)("div",{className:"woocommerce-activity-card__title is-placeholder"}),a&&Object(f.createElement)("div",{className:"woocommerce-activity-card__subtitle is-placeholder"}),c&&Object(f.createElement)("div",{className:"woocommerce-activity-card__date"},Object(f.createElement)("span",{className:"is-placeholder"}))),Object(f.createElement)("div",{className:"woocommerce-activity-card__body"},Object(E.range)(o).map((function(e){return Object(f.createElement)("span",{className:"is-placeholder",key:e})}))),n&&Object(f.createElement)("div",{className:"woocommerce-activity-card__actions"},Object(f.createElement)("span",{className:"is-placeholder"})))}}]),n}(f.Component);k.propTypes={className:g.a.string,hasAction:g.a.bool,hasDate:g.a.bool,hasSubtitle:g.a.bool,lines:g.a.number},k.defaultProps={hasAction:!1,hasDate:!1,hasSubtitle:!1,lines:1};var R=k;function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=d()(e);if(t){var a=d()(this).constructor;n=Reflect.construct(c,arguments,a)}else n=c.apply(this,arguments);return m()(this,n)}}var C=function(e){s()(n,e);var t=D(n);function n(){return a()(this,n),t.apply(this,arguments)}return i()(n,[{key:"getCard",value:function(){var e=this.props,t=e.actions,n=e.className,c=e.children,a=e.date,o=e.icon,i=e.subtitle,r=e.title,s=e.unread,l=p()("woocommerce-activity-card",n),m=Array.isArray(t)?t:[t],u=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(a)?y.a.utc(a).fromNow():a;return Object(f.createElement)("section",{className:l},s&&Object(f.createElement)("span",{className:"woocommerce-activity-card__unread"}),o&&Object(f.createElement)("span",{className:"woocommerce-activity-card__icon","aria-hidden":!0},o),r&&Object(f.createElement)("header",{className:"woocommerce-activity-card__header"},Object(f.createElement)(j.H,{className:"woocommerce-activity-card__title"},r),i&&Object(f.createElement)("div",{className:"woocommerce-activity-card__subtitle"},i),u&&Object(f.createElement)("span",{className:"woocommerce-activity-card__date"},u)),c&&Object(f.createElement)(j.Section,{className:"woocommerce-activity-card__body"},c),t&&Object(f.createElement)("footer",{className:"woocommerce-activity-card__actions"},m.map((function(e,t){return Object(f.cloneElement)(e,{key:t})}))))}},{key:"render",value:function(){var e=this.props.onClick;return e?Object(f.createElement)(N.Button,{className:"woocommerce-activity-card__button",onClick:e},this.getCard()):this.getCard()}}]),n}(f.Component);C.propTypes={actions:g.a.oneOfType([g.a.arrayOf(g.a.element),g.a.element]),onClick:g.a.func,className:g.a.string,children:g.a.node,date:g.a.string,icon:g.a.node,subtitle:g.a.node,title:g.a.oneOfType([g.a.string,g.a.node]),unread:g.a.bool},C.defaultProps={icon:Object(f.createElement)(h.a,{size:48}),unread:!1}},540:function(e,t,n){},544:function(e,t,n){},587:function(e,t,n){"use strict";n.r(t);var c=n(18),a=n.n(c),o=n(34),i=n.n(o),r=n(0),s=n(2),l=n(20),m=n(47),u=n(22),d=n(11),f=n(293),b=n(292),p=n(511),_=n(12),h=n.n(_),v=n(13),y=n.n(v),O=n(14),g=n.n(O),j=n(15),N=n.n(j),E=n(7),w=n.n(E),k=n(1),R=n.n(k);function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(c,arguments,a)}else n=c.apply(this,arguments);return N()(this,n)}}var C=function(e){g()(n,e);var t=D(n);function n(){return h()(this,n),t.apply(this,arguments)}return y()(n,[{key:"render",value:function(){var e=this.props.className;return Object(r.createElement)("div",{className:"woocommerce-inbox-message is-placeholder ".concat(e),"aria-hidden":!0},Object(r.createElement)("div",{className:"woocommerce-inbox-message__wrapper"},Object(r.createElement)("div",{className:"woocommerce-inbox-message__content"},Object(r.createElement)("div",{className:"woocommerce-inbox-message__date"},Object(r.createElement)("div",{className:"sixth-line"})),Object(r.createElement)("div",{className:"woocommerce-inbox-message__title"},Object(r.createElement)("div",{className:"line"}),Object(r.createElement)("div",{className:"line"})),Object(r.createElement)("div",{className:"woocommerce-inbox-message__text"},Object(r.createElement)("div",{className:"line"}),Object(r.createElement)("div",{className:"third-line"}))),Object(r.createElement)("div",{className:"woocommerce-inbox-message__actions"},Object(r.createElement)("div",{className:"fifth-line"}),Object(r.createElement)("div",{className:"fifth-line"}))))}}]),n}(r.Component);C.propTypes={className:R.a.string};var x=C,A=n(9),T=n.n(A),S=n(5),B=n.n(S),M=n(4),U=n(528),P=n.n(U),L=n(16),q=n.n(L),I=n(6),F=n.n(I),Y=n(27),V=n(25);function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(c,arguments,a)}else n=c.apply(this,arguments);return N()(this,n)}}var z=function(e){g()(n,e);var t=W(n);function n(e){var c;return h()(this,n),(c=t.call(this,e)).state={inAction:!1},c.handleActionClick=c.handleActionClick.bind(T()(c)),c}return y()(n,[{key:"handleActionClick",value:function(e){var t=this.props,n=t.action,c=t.actionCallback,a=t.batchUpdateNotes,o=t.createNotice,i=t.noteId,r=t.triggerNoteAction,l=t.removeAllNotes,m=t.removeNote,u=t.onClick,d=t.updateNote,f=e.target.href||"",b=!0;f.length&&!f.startsWith(V.a)&&(e.preventDefault(),b=!1,window.open(f,"_blank")),n?this.setState({inAction:b},(function(){r(i,n.id),u&&u()})):(i?m(i).then((function(){o("success",Object(s.__)("Message dismissed","woocommerce-admin"),{actions:[{label:Object(s.__)("Undo","woocommerce-admin"),onClick:function(){d(i,{is_deleted:0})}}]})})).catch((function(){o("error",Object(s.__)("Message could not be dismissed","woocommerce-admin"))})):l().then((function(e){o("success",Object(s.__)("All messages dismissed","woocommerce-admin"),{actions:[{label:Object(s.__)("Undo","woocommerce-admin"),onClick:function(){a(e.map((function(e){return e.id})),{is_deleted:0})}}]})})).catch((function(){o("error",Object(s.__)("Message could not be dismissed","woocommerce-admin"))})),c(!0))}},{key:"render",value:function(){var e=this.props,t=e.action,n=e.dismiss,c=e.label;return Object(r.createElement)(M.Button,{isSecondary:!0,isBusy:this.state.inAction,disabled:this.state.inAction,href:t&&t.url&&t.url.length?t.url:void 0,onClick:this.handleActionClick},n?c:t.label)}}]),n}(r.Component);z.propTypes={noteId:R.a.number,label:R.a.string,dismiss:R.a.bool,actionCallback:R.a.func,action:R.a.shape({id:R.a.number.isRequired,url:R.a.string,label:R.a.string.isRequired,primary:R.a.bool.isRequired}),onClick:R.a.func};var H=Object(l.compose)(Object(d.withDispatch)((function(e){var t=e("core/notices").createNotice,n=e(u.NOTES_STORE_NAME),c=n.batchUpdateNotes,a=n.removeAllNotes,o=n.removeNote,i=n.updateNote;return{batchUpdateNotes:c,createNotice:t,removeAllNotes:a,removeNote:o,triggerNoteAction:n.triggerNoteAction,updateNote:i}})))(z),J=n(508);n(544);function Q(){var e,t="",n=(e=window.location.search)?e.substr(1).split("&").reduce((function(e,t){var n=t.split("="),c=n[0],a=decodeURIComponent(n[1]);return a=isNaN(Number(a))?a:Number(a),e[c]=a,e}),{}):{},c=n.page,a=n.path,o=n.post_type;if(c){var i="wc-admin"===c?"home_screen":c;t=a?a.replace(/\//g,"_").substring(1):i}else o&&(t=o);return t}function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=w()(e);if(t){var a=w()(this).constructor;n=Reflect.construct(c,arguments,a)}else n=c.apply(this,arguments);return N()(this,n)}}var Z=function(e){g()(n,e);var t=G(n);function n(e){var c;return h()(this,n),c=t.call(this,e),B()(T()(c),"onActionClicked",(function(e){e.actioned_text&&c.setState({clickedActionText:e.actioned_text})})),c.onVisible=c.onVisible.bind(T()(c)),c.hasBeenSeen=!1,c.state={isDismissModalOpen:!1,dismissType:null,clickedActionText:null},c.openDismissModal=c.openDismissModal.bind(T()(c)),c.closeDismissModal=c.closeDismissModal.bind(T()(c)),c.bodyNotificationRef=Object(r.createRef)(),c.toggleButtonRef=Object(r.createRef)(),c.screen=Q(),c}return y()(n,[{key:"componentDidMount",value:function(){var e=this;this.bodyNotificationRef.current&&this.bodyNotificationRef.current.addEventListener("click",(function(t){return e.handleBodyClick(t,e.props)}))}},{key:"componentWillUnmount",value:function(){var e=this;this.bodyNotificationRef.current&&this.bodyNotificationRef.current.removeEventListener("click",(function(t){return e.handleBodyClick(t,e.props)}))}},{key:"handleBodyClick",value:function(e,t){var n=e.target.href;if(n){var c=t.note;Object(Y.recordEvent)("wcadmin_inbox_action_click",{note_name:c.name,note_title:c.title,note_content_inner_link:n})}}},{key:"onVisible",value:function(e){if(e&&!this.hasBeenSeen){var t=this.props.note;Object(Y.recordEvent)("inbox_note_view",{note_content:t.content,note_name:t.name,note_title:t.title,note_type:t.type,screen:this.screen}),this.hasBeenSeen=!0}}},{key:"openDismissModal",value:function(e,t){this.setState({isDismissModalOpen:!0,dismissType:e}),t()}},{key:"closeDismissModal",value:function(e){var t=this.state.dismissType,n=this.props.note,c="all"===t;Object(Y.recordEvent)("inbox_action_dismiss",{note_name:n.name,note_title:n.title,note_name_dismiss_all:c,note_name_dismiss_confirmation:e||!1,screen:this.screen}),this.setState({isDismissModalOpen:!1})}},{key:"handleBlur",value:function(e,t){var n;if(e.relatedTarget)n=e.relatedTarget;else if(this.toggleButtonRef.current){var c=this.toggleButtonRef.current.ownerDocument;n=c?c.activeElement:null}!!n&&["woocommerce-admin-dismiss-notification","components-popover__content"].some((function(e){return n.className.includes(e)}))?e.preventDefault():t()}},{key:"renderDismissButton",value:function(){var e=this;return this.state.clickedActionText?null:Object(r.createElement)(M.Dropdown,{contentClassName:"woocommerce-admin-dismiss-dropdown",position:"bottom right",renderToggle:function(t){var n=t.onClose,c=t.onToggle;return Object(r.createElement)(M.Button,{isTertiary:!0,onClick:c,ref:e.toggleButtonRef,onBlur:function(t){return e.handleBlur(t,n)}},Object(s.__)("Dismiss","woocommerce-admin"))},focusOnMount:!1,popoverProps:{noArrow:!0},renderContent:function(t){var n=t.onToggle;return Object(r.createElement)("ul",null,Object(r.createElement)("li",null,Object(r.createElement)(M.Button,{className:"woocommerce-admin-dismiss-notification",onClick:function(){return e.openDismissModal("this",n)}},Object(s.__)("Dismiss this message","woocommerce-admin"))),Object(r.createElement)("li",null,Object(r.createElement)(M.Button,{className:"woocommerce-admin-dismiss-notification",onClick:function(){return e.openDismissModal("all",n)}},Object(s.__)("Dismiss all messages","woocommerce-admin"))))}})}},{key:"getDismissConfirmationButton",value:function(){var e=this.props.note,t=this.state.dismissType;return Object(r.createElement)(H,{key:e.id,noteId:"all"===t?null:e.id,label:Object(s.__)("Yes, I'm sure","woocommerce-admin"),actionCallback:this.closeDismissModal,dismiss:!0,screen:this.screen})}},{key:"renderDismissConfirmationModal",value:function(){var e=this;return Object(r.createElement)(M.Modal,{title:Object(r.createElement)(r.Fragment,null,Object(s.__)("Are you sure?","woocommerce-admin")),onRequestClose:function(){return e.closeDismissModal()},className:"woocommerce-inbox-dismiss-confirmation_modal"},Object(r.createElement)("div",{className:"woocommerce-inbox-dismiss-confirmation_wrapper"},Object(r.createElement)("p",null,Object(s.__)("Dismissed messages cannot be viewed again","woocommerce-admin")),Object(r.createElement)("div",{className:"woocommerce-inbox-dismiss-confirmation_buttons"},Object(r.createElement)(M.Button,{isSecondary:!0,onClick:function(){return e.closeDismissModal()}},Object(s.__)("Cancel","woocommerce-admin")),this.getDismissConfirmationButton())))}},{key:"renderActions",value:function(e){var t=this,n=e.actions,c=e.id,a=this.state.clickedActionText;return a||(n?Object(r.createElement)(r.Fragment,null,n.map((function(e,n){return Object(r.createElement)(H,{key:n,noteId:c,action:e,onClick:function(){return t.onActionClicked(e)}})}))):void 0)}},{key:"render",value:function(){var e=this.props,t=e.lastRead,n=e.note,c=this.state.isDismissModalOpen,a=n.content,o=n.date_created,i=n.date_created_gmt,s=n.image,l=n.is_deleted,u=n.layout,d=n.status,f=n.title;if(l)return null;var b=!t||!i||new Date(i+"Z").getTime()>t,p=o,_="plain"!==u&&""!==u,h=F()("woocommerce-inbox-message",u,{"message-is-unread":b&&"unactioned"===d});return Object(r.createElement)(P.a,{onChange:this.onVisible},Object(r.createElement)("section",{className:h},_&&Object(r.createElement)("div",{className:"woocommerce-inbox-message__image"},Object(r.createElement)("img",{src:s,alt:""})),Object(r.createElement)("div",{className:"woocommerce-inbox-message__wrapper"},Object(r.createElement)("div",{className:"woocommerce-inbox-message__content"},b&&Object(r.createElement)("div",{className:"woocommerce-inbox-message__unread-indicator"}),p&&Object(r.createElement)("span",{className:"woocommerce-inbox-message__date"},q.a.utc(p).fromNow()),Object(r.createElement)(m.H,{className:"woocommerce-inbox-message__title"},f),Object(r.createElement)(m.Section,{className:"woocommerce-inbox-message__text"},Object(r.createElement)("span",{dangerouslySetInnerHTML:Object(J.a)(a),ref:this.bodyNotificationRef}))),Object(r.createElement)("div",{className:"woocommerce-inbox-message__actions"},this.renderActions(n),this.renderDismissButton())),c&&this.renderDismissConfirmationModal()))}}]),n}(r.Component);Z.propTypes={note:R.a.shape({id:R.a.number,status:R.a.string,title:R.a.string,content:R.a.string,date_created:R.a.string,date_created_gmt:R.a.string,actions:R.a.arrayOf(R.a.shape({id:R.a.number.isRequired,url:R.a.string,label:R.a.string.isRequired,primary:R.a.bool.isRequired})),layout:R.a.string,image:R.a.string,is_deleted:R.a.bool}),lastRead:R.a.number};var K=Z,X=n(196),$=function(e){var t=e.hasNotes,n=e.isBatchUpdating,c=e.lastRead,a=e.notes;if(!n){if(!t)return Object(r.createElement)(p.a,{className:"woocommerce-empty-activity-card",title:Object(s.__)("Your inbox is empty","woocommerce-admin"),icon:!1},Object(s.__)("As things begin to happen in your store your inbox will start to fill up. You'll see things like achievements, new feature announcements, extension recommendations and more!","woocommerce-admin"));var o=Object.keys(a).map((function(e){return a[e]}));return Object(r.createElement)(f.a,{role:"menu"},o.map((function(e){var t=e.id;return e.is_deleted?null:Object(r.createElement)(b.a,{key:t,timeout:500,classNames:"woocommerce-inbox-message"},Object(r.createElement)(K,{key:t,note:e,lastRead:c}))})))}},ee={page:1,per_page:u.QUERY_DEFAULTS.pageSize,status:"unactioned",type:u.QUERY_DEFAULTS.noteTypes,orderby:"date",order:"desc",_fields:["id","name","title","content","type","status","actions","date_created","date_created_gmt","layout","image","is_deleted"]};t.default=Object(l.compose)(Object(d.withSelect)((function(e){var t=e(u.NOTES_STORE_NAME),n=t.getNotes,c=t.getNotesError,a=t.isResolving,o=t.isNotesRequesting;return{notes:n(ee),isError:Boolean(c("getNotes",[ee])),isResolving:a("getNotes",[ee]),isBatchUpdating:o("batchUpdateNotes")}})))((function(e){var t=e.isError,n=e.isResolving,c=e.isBatchUpdating,o=e.notes,l=Object(u.useUserPreferences)(),d=l.updateUserPreferences,f=i()(l,["updateUserPreferences"]),b=Object(r.useState)(f.activity_panel_inbox_last_read),p=a()(b,1)[0];if(Object(r.useEffect)((function(){var e=Date.now();d({activity_panel_inbox_last_read:e})}),[]),t){var _=Object(s.__)("There was an error getting your inbox. Please try again.","woocommerce-admin"),h=Object(s.__)("Reload","woocommerce-admin");return Object(r.createElement)(m.EmptyContent,{title:_,actionLabel:h,actionURL:null,actionCallback:function(){window.location.reload()}})}var v=Object(X.b)(o);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"woocommerce-homepage-notes-wrapper"},(n||c)&&Object(r.createElement)(m.Section,null,Object(r.createElement)(x,{className:"banner message-is-unread"})),Object(r.createElement)(m.Section,null,!n&&!c&&$({hasNotes:v,isBatchUpdating:c,lastRead:p,notes:o}))))}))}}]);
|
dist/chunks/5.js
CHANGED
@@ -1,184 +1,398 @@
|
|
1 |
(window["__wcAdmin_webpackJsonp"] = window["__wcAdmin_webpackJsonp"] || []).push([[5],{
|
2 |
|
3 |
-
/***/
|
4 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5 |
|
6 |
"use strict";
|
7 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
8 |
-
/*
|
9 |
-
/* harmony
|
10 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getCouponLabels; });
|
11 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getCustomerLabels; });
|
12 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getProductLabels; });
|
13 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getTaxRateLabels; });
|
14 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getVariationName; });
|
15 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getVariationLabels; });
|
16 |
-
/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);
|
17 |
-
/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_0__);
|
18 |
-
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26);
|
19 |
-
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__);
|
20 |
-
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
|
21 |
-
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
|
22 |
-
/* harmony import */ var _woocommerce_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21);
|
23 |
-
/* harmony import */ var _woocommerce_navigation__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_3__);
|
24 |
-
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22);
|
25 |
-
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_4__);
|
26 |
-
/* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25);
|
27 |
-
/* harmony import */ var _analytics_report_taxes_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(501);
|
28 |
/**
|
29 |
* External dependencies
|
30 |
*/
|
31 |
|
|
|
|
|
|
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
|
|
34 |
|
|
|
|
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
-
/**
|
38 |
-
* Internal dependencies
|
39 |
-
*/
|
40 |
|
41 |
|
42 |
/**
|
43 |
-
*
|
44 |
-
* returns a promise with an optional method applied to results
|
45 |
-
*
|
46 |
-
* @param {string|Function} path - api path string or a function of the query returning api path string
|
47 |
-
* @param {Function} [handleData] - function applied to each iteration of data
|
48 |
-
* @return {Function} - a function of ids returning a promise
|
49 |
*/
|
50 |
|
51 |
-
function getRequestByIdString(path) {
|
52 |
-
var handleData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : lodash__WEBPACK_IMPORTED_MODULE_2__["identity"];
|
53 |
-
return function () {
|
54 |
-
var queryString = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
55 |
-
var query = arguments.length > 1 ? arguments[1] : undefined;
|
56 |
-
var pathString = typeof path === 'function' ? path(query) : path;
|
57 |
-
var idList = Object(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_3__["getIdsFromQuery"])(queryString);
|
58 |
|
59 |
-
if (idList.length < 1) {
|
60 |
-
return Promise.resolve([]);
|
61 |
-
}
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
per_page: idList.length
|
66 |
-
};
|
67 |
-
return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
|
68 |
-
path: Object(_wordpress_url__WEBPACK_IMPORTED_MODULE_0__["addQueryArgs"])(pathString, payload)
|
69 |
-
}).then(function (data) {
|
70 |
-
return data.map(handleData);
|
71 |
-
});
|
72 |
-
};
|
73 |
-
}
|
74 |
-
var getAttributeLabels = getRequestByIdString(_woocommerce_data__WEBPACK_IMPORTED_MODULE_4__["NAMESPACE"] + '/products/attributes', function (attribute) {
|
75 |
-
return {
|
76 |
-
key: attribute.id,
|
77 |
-
label: attribute.name
|
78 |
-
};
|
79 |
-
});
|
80 |
-
var getCategoryLabels = getRequestByIdString(_woocommerce_data__WEBPACK_IMPORTED_MODULE_4__["NAMESPACE"] + '/products/categories', function (category) {
|
81 |
-
return {
|
82 |
-
key: category.id,
|
83 |
-
label: category.name
|
84 |
-
};
|
85 |
-
});
|
86 |
-
var getCouponLabels = getRequestByIdString(_woocommerce_data__WEBPACK_IMPORTED_MODULE_4__["NAMESPACE"] + '/coupons', function (coupon) {
|
87 |
-
return {
|
88 |
-
key: coupon.id,
|
89 |
-
label: coupon.code
|
90 |
-
};
|
91 |
-
});
|
92 |
-
var getCustomerLabels = getRequestByIdString(_woocommerce_data__WEBPACK_IMPORTED_MODULE_4__["NAMESPACE"] + '/customers', function (customer) {
|
93 |
-
return {
|
94 |
-
key: customer.id,
|
95 |
-
label: customer.name
|
96 |
-
};
|
97 |
-
});
|
98 |
-
var getProductLabels = getRequestByIdString(_woocommerce_data__WEBPACK_IMPORTED_MODULE_4__["NAMESPACE"] + '/products', function (product) {
|
99 |
-
return {
|
100 |
-
key: product.id,
|
101 |
-
label: product.name
|
102 |
-
};
|
103 |
-
});
|
104 |
-
var getTaxRateLabels = getRequestByIdString(_woocommerce_data__WEBPACK_IMPORTED_MODULE_4__["NAMESPACE"] + '/taxes', function (taxRate) {
|
105 |
-
return {
|
106 |
-
key: taxRate.id,
|
107 |
-
label: Object(_analytics_report_taxes_utils__WEBPACK_IMPORTED_MODULE_6__[/* getTaxCode */ "a"])(taxRate)
|
108 |
-
};
|
109 |
-
});
|
110 |
/**
|
111 |
-
*
|
112 |
-
* attribute option strings.
|
113 |
-
*
|
114 |
-
* @param {Object} variation - variation returned by the api
|
115 |
-
* @param {Array} variation.attributes - attribute objects, with option property.
|
116 |
-
* @param {string} variation.name - name of variation.
|
117 |
-
* @return {string} - formatted variation name
|
118 |
*/
|
119 |
|
120 |
-
function getVariationName(_ref) {
|
121 |
-
var attributes = _ref.attributes,
|
122 |
-
name = _ref.name;
|
123 |
-
var separator = Object(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_5__[/* getSetting */ "g"])('variationTitleAttributesSeparator', ' - ');
|
124 |
|
125 |
-
if (name.indexOf(separator) > -1) {
|
126 |
-
return name;
|
127 |
-
}
|
128 |
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
}).join(', ');
|
133 |
-
return attributeList ? name + separator + attributeList : name;
|
134 |
-
}
|
135 |
-
var getVariationLabels = getRequestByIdString(function (_ref3) {
|
136 |
-
var products = _ref3.products;
|
137 |
|
138 |
-
|
139 |
-
|
140 |
-
|
|
|
|
|
|
|
|
|
141 |
}
|
142 |
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
};
|
149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
|
151 |
/***/ }),
|
152 |
|
153 |
-
/***/
|
154 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
155 |
|
156 |
"use strict";
|
157 |
-
/* harmony
|
158 |
-
/* harmony import */ var
|
159 |
-
/* harmony import */ var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
/**
|
161 |
* External dependencies
|
162 |
*/
|
163 |
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
/***/ }),
|
171 |
|
172 |
-
/***/
|
173 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
174 |
|
175 |
"use strict";
|
176 |
|
177 |
-
//
|
|
|
|
|
|
|
|
|
178 |
|
179 |
-
// EXTERNAL MODULE: ./
|
180 |
-
var
|
181 |
-
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
|
182 |
|
183 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
|
184 |
var classCallCheck = __webpack_require__(12);
|
@@ -200,101 +414,105 @@ var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possi
|
|
200 |
var getPrototypeOf = __webpack_require__(7);
|
201 |
var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf);
|
202 |
|
203 |
-
// EXTERNAL MODULE: external {"this":["wp","element"]}
|
204 |
-
var external_this_wp_element_ = __webpack_require__(0);
|
205 |
-
|
206 |
// EXTERNAL MODULE: external {"this":["wp","i18n"]}
|
207 |
var external_this_wp_i18n_ = __webpack_require__(2);
|
208 |
|
209 |
-
// EXTERNAL MODULE: external {"this":["wp","
|
210 |
-
var
|
211 |
-
|
212 |
-
// EXTERNAL MODULE: external {"this":["wp","date"]}
|
213 |
-
var external_this_wp_date_ = __webpack_require__(75);
|
214 |
|
215 |
// EXTERNAL MODULE: external {"this":["wp","data"]}
|
216 |
var external_this_wp_data_ = __webpack_require__(11);
|
217 |
|
218 |
-
// EXTERNAL MODULE: external "
|
219 |
-
var
|
220 |
|
221 |
-
//
|
222 |
-
var prop_types = __webpack_require__(1);
|
223 |
-
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
224 |
|
225 |
-
// EXTERNAL MODULE: external {"this":["wc","components"]}
|
226 |
-
var external_this_wc_components_ = __webpack_require__(47);
|
227 |
|
228 |
-
// EXTERNAL MODULE: external {"this":["wc","data"]}
|
229 |
-
var external_this_wc_data_ = __webpack_require__(22);
|
230 |
|
231 |
-
// EXTERNAL MODULE: external {"this":["wc","date"]}
|
232 |
-
var external_this_wc_date_ = __webpack_require__(29);
|
233 |
|
234 |
-
// EXTERNAL MODULE: ./client/lib/currency-context.js
|
235 |
-
var currency_context = __webpack_require__(498);
|
236 |
|
237 |
-
// EXTERNAL MODULE: ./client/analytics/components/report-error/index.js
|
238 |
-
var report_error = __webpack_require__(499);
|
239 |
|
240 |
-
|
241 |
-
|
|
|
242 |
|
243 |
-
// CONCATENATED MODULE: ./client/analytics/components/report-chart/utils.js
|
244 |
/**
|
245 |
* External dependencies
|
246 |
*/
|
247 |
|
248 |
|
249 |
-
var DEFAULT_FILTER = 'all';
|
250 |
-
function getSelectedFilter(filters, query) {
|
251 |
-
var selectedFilterArgs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
252 |
-
|
253 |
-
if (!filters || filters.length === 0) {
|
254 |
-
return null;
|
255 |
-
}
|
256 |
|
257 |
-
var clonedFilters = filters.slice(0);
|
258 |
-
var filterConfig = clonedFilters.pop();
|
259 |
-
|
260 |
-
if (filterConfig.showFilters(query, selectedFilterArgs)) {
|
261 |
-
var allFilters = Object(external_this_wc_navigation_["flattenFilters"])(filterConfig.filters);
|
262 |
-
var value = query[filterConfig.param] || filterConfig.defaultValue || DEFAULT_FILTER;
|
263 |
-
return Object(external_lodash_["find"])(allFilters, {
|
264 |
-
value: value
|
265 |
-
});
|
266 |
-
}
|
267 |
|
268 |
-
return getSelectedFilter(clonedFilters, query, selectedFilterArgs);
|
269 |
-
}
|
270 |
-
function getChartMode(selectedFilter, query) {
|
271 |
-
if (selectedFilter && query) {
|
272 |
-
var selectedFilterParam = Object(external_lodash_["get"])(selectedFilter, ['settings', 'param']);
|
273 |
|
274 |
-
|
275 |
-
|
276 |
-
}
|
277 |
-
}
|
278 |
|
279 |
-
|
280 |
-
}
|
281 |
-
// CONCATENATED MODULE: ./client/analytics/components/report-chart/index.js
|
282 |
|
|
|
|
|
283 |
|
|
|
|
|
284 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
|
|
|
|
|
286 |
|
|
|
|
|
|
|
287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
|
|
|
|
|
|
|
289 |
|
290 |
-
|
|
|
|
|
|
|
|
|
291 |
|
292 |
-
|
|
|
293 |
|
294 |
-
|
|
|
295 |
|
296 |
-
|
|
|
297 |
|
|
|
298 |
/**
|
299 |
* External dependencies
|
300 |
*/
|
@@ -302,12 +520,37 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
302 |
|
303 |
|
304 |
|
|
|
|
|
|
|
305 |
|
306 |
|
|
|
|
|
307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
|
309 |
-
|
310 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
/**
|
312 |
* Internal dependencies
|
313 |
*/
|
@@ -315,660 +558,2764 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
315 |
|
316 |
|
317 |
|
318 |
-
/**
|
319 |
-
* Component that renders the chart in reports.
|
320 |
-
*/
|
321 |
|
322 |
-
var report_chart_ReportChart = /*#__PURE__*/function (_Component) {
|
323 |
-
inherits_default()(ReportChart, _Component);
|
324 |
|
325 |
-
|
326 |
|
327 |
-
|
328 |
-
|
329 |
|
330 |
-
|
331 |
-
}
|
332 |
|
333 |
-
|
334 |
-
|
335 |
-
value: function shouldComponentUpdate(nextProps) {
|
336 |
-
if (nextProps.isRequesting !== this.props.isRequesting || nextProps.primaryData.isRequesting !== this.props.primaryData.isRequesting || nextProps.secondaryData.isRequesting !== this.props.secondaryData.isRequesting || !Object(external_lodash_["isEqual"])(nextProps.query, this.props.query)) {
|
337 |
-
return true;
|
338 |
-
}
|
339 |
|
340 |
-
|
341 |
-
|
342 |
-
}, {
|
343 |
-
key: "getItemChartData",
|
344 |
-
value: function getItemChartData() {
|
345 |
-
var _this$props = this.props,
|
346 |
-
primaryData = _this$props.primaryData,
|
347 |
-
selectedChart = _this$props.selectedChart;
|
348 |
-
var chartData = primaryData.data.intervals.map(function (interval) {
|
349 |
-
var intervalData = {};
|
350 |
-
interval.subtotals.segments.forEach(function (segment) {
|
351 |
-
if (segment.segment_label) {
|
352 |
-
var label = intervalData[segment.segment_label] ? segment.segment_label + ' (#' + segment.segment_id + ')' : segment.segment_label;
|
353 |
-
intervalData[segment.segment_id] = {
|
354 |
-
label: label,
|
355 |
-
value: segment.subtotals[selectedChart.key] || 0
|
356 |
-
};
|
357 |
-
}
|
358 |
-
});
|
359 |
-
return _objectSpread({
|
360 |
-
date: Object(external_this_wp_date_["format"])('Y-m-d\\TH:i:s', interval.date_start)
|
361 |
-
}, intervalData);
|
362 |
-
});
|
363 |
-
return chartData;
|
364 |
-
}
|
365 |
-
}, {
|
366 |
-
key: "getTimeChartData",
|
367 |
-
value: function getTimeChartData() {
|
368 |
-
var _this$props2 = this.props,
|
369 |
-
query = _this$props2.query,
|
370 |
-
primaryData = _this$props2.primaryData,
|
371 |
-
secondaryData = _this$props2.secondaryData,
|
372 |
-
selectedChart = _this$props2.selectedChart,
|
373 |
-
defaultDateRange = _this$props2.defaultDateRange;
|
374 |
-
var currentInterval = Object(external_this_wc_date_["getIntervalForQuery"])(query);
|
375 |
-
|
376 |
-
var _getCurrentDates = Object(external_this_wc_date_["getCurrentDates"])(query, defaultDateRange),
|
377 |
-
primary = _getCurrentDates.primary,
|
378 |
-
secondary = _getCurrentDates.secondary;
|
379 |
-
|
380 |
-
var chartData = primaryData.data.intervals.map(function (interval, index) {
|
381 |
-
var secondaryDate = Object(external_this_wc_date_["getPreviousDate"])(interval.date_start, primary.after, secondary.after, query.compare, currentInterval);
|
382 |
-
var secondaryInterval = secondaryData.data.intervals[index];
|
383 |
-
return {
|
384 |
-
date: Object(external_this_wp_date_["format"])('Y-m-d\\TH:i:s', interval.date_start),
|
385 |
-
primary: {
|
386 |
-
label: "".concat(primary.label, " (").concat(primary.range, ")"),
|
387 |
-
labelDate: interval.date_start,
|
388 |
-
value: interval.subtotals[selectedChart.key] || 0
|
389 |
-
},
|
390 |
-
secondary: {
|
391 |
-
label: "".concat(secondary.label, " (").concat(secondary.range, ")"),
|
392 |
-
labelDate: secondaryDate.format('YYYY-MM-DD HH:mm:ss'),
|
393 |
-
value: secondaryInterval && secondaryInterval.subtotals[selectedChart.key] || 0
|
394 |
-
}
|
395 |
-
};
|
396 |
-
});
|
397 |
-
return chartData;
|
398 |
-
}
|
399 |
-
}, {
|
400 |
-
key: "getTimeChartTotals",
|
401 |
-
value: function getTimeChartTotals() {
|
402 |
-
var _this$props3 = this.props,
|
403 |
-
primaryData = _this$props3.primaryData,
|
404 |
-
secondaryData = _this$props3.secondaryData,
|
405 |
-
selectedChart = _this$props3.selectedChart;
|
406 |
-
return {
|
407 |
-
primary: Object(external_lodash_["get"])(primaryData, ['data', 'totals', selectedChart.key], null),
|
408 |
-
secondary: Object(external_lodash_["get"])(secondaryData, ['data', 'totals', selectedChart.key], null)
|
409 |
-
};
|
410 |
-
}
|
411 |
-
}, {
|
412 |
-
key: "renderChart",
|
413 |
-
value: function renderChart(mode, isRequesting, chartData, legendTotals) {
|
414 |
-
var _this$props4 = this.props,
|
415 |
-
emptySearchResults = _this$props4.emptySearchResults,
|
416 |
-
filterParam = _this$props4.filterParam,
|
417 |
-
interactiveLegend = _this$props4.interactiveLegend,
|
418 |
-
itemsLabel = _this$props4.itemsLabel,
|
419 |
-
legendPosition = _this$props4.legendPosition,
|
420 |
-
path = _this$props4.path,
|
421 |
-
query = _this$props4.query,
|
422 |
-
selectedChart = _this$props4.selectedChart,
|
423 |
-
showHeaderControls = _this$props4.showHeaderControls,
|
424 |
-
primaryData = _this$props4.primaryData;
|
425 |
-
var currentInterval = Object(external_this_wc_date_["getIntervalForQuery"])(query);
|
426 |
-
var allowedIntervals = Object(external_this_wc_date_["getAllowedIntervalsForQuery"])(query);
|
427 |
-
var formats = Object(external_this_wc_date_["getDateFormatsForInterval"])(currentInterval, primaryData.data.intervals.length);
|
428 |
-
var emptyMessage = emptySearchResults ? Object(external_this_wp_i18n_["__"])('No data for the current search', 'woocommerce-admin') : Object(external_this_wp_i18n_["__"])('No data for the selected date range', 'woocommerce-admin');
|
429 |
-
var _this$context = this.context,
|
430 |
-
formatAmount = _this$context.formatAmount,
|
431 |
-
getCurrencyConfig = _this$context.getCurrencyConfig;
|
432 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Chart"], {
|
433 |
-
allowedIntervals: allowedIntervals,
|
434 |
-
data: chartData,
|
435 |
-
dateParser: '%Y-%m-%dT%H:%M:%S',
|
436 |
-
emptyMessage: emptyMessage,
|
437 |
-
filterParam: filterParam,
|
438 |
-
interactiveLegend: interactiveLegend,
|
439 |
-
interval: currentInterval,
|
440 |
-
isRequesting: isRequesting,
|
441 |
-
itemsLabel: itemsLabel,
|
442 |
-
legendPosition: legendPosition,
|
443 |
-
legendTotals: legendTotals,
|
444 |
-
mode: mode,
|
445 |
-
path: path,
|
446 |
-
query: query,
|
447 |
-
screenReaderFormat: formats.screenReaderFormat,
|
448 |
-
showHeaderControls: showHeaderControls,
|
449 |
-
title: selectedChart.label,
|
450 |
-
tooltipLabelFormat: formats.tooltipLabelFormat,
|
451 |
-
tooltipTitle: mode === 'time-comparison' && selectedChart.label || null,
|
452 |
-
tooltipValueFormat: Object(external_this_wc_data_["getTooltipValueFormat"])(selectedChart.type, formatAmount),
|
453 |
-
chartType: Object(external_this_wc_date_["getChartTypeForQuery"])(query),
|
454 |
-
valueType: selectedChart.type,
|
455 |
-
xFormat: formats.xFormat,
|
456 |
-
x2Format: formats.x2Format,
|
457 |
-
currency: getCurrencyConfig()
|
458 |
-
});
|
459 |
-
}
|
460 |
-
}, {
|
461 |
-
key: "renderItemComparison",
|
462 |
-
value: function renderItemComparison() {
|
463 |
-
var _this$props5 = this.props,
|
464 |
-
isRequesting = _this$props5.isRequesting,
|
465 |
-
primaryData = _this$props5.primaryData;
|
466 |
|
467 |
-
|
468 |
-
|
469 |
-
isError: true
|
470 |
-
});
|
471 |
-
}
|
472 |
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
}
|
477 |
-
}, {
|
478 |
-
key: "renderTimeComparison",
|
479 |
-
value: function renderTimeComparison() {
|
480 |
-
var _this$props6 = this.props,
|
481 |
-
isRequesting = _this$props6.isRequesting,
|
482 |
-
primaryData = _this$props6.primaryData,
|
483 |
-
secondaryData = _this$props6.secondaryData;
|
484 |
|
485 |
-
|
486 |
-
|
487 |
-
isError: true
|
488 |
-
});
|
489 |
-
}
|
490 |
|
491 |
-
|
492 |
-
|
493 |
-
var legendTotals = this.getTimeChartTotals();
|
494 |
-
return this.renderChart('time-comparison', isChartRequesting, chartData, legendTotals);
|
495 |
-
}
|
496 |
-
}, {
|
497 |
-
key: "render",
|
498 |
-
value: function render() {
|
499 |
-
var mode = this.props.mode;
|
500 |
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
report_chart_ReportChart.propTypes = {
|
513 |
-
/**
|
514 |
-
* Filters available for that report.
|
515 |
-
*/
|
516 |
-
filters: prop_types_default.a.array,
|
517 |
-
|
518 |
-
/**
|
519 |
-
* Whether there is an API call running.
|
520 |
-
*/
|
521 |
-
isRequesting: prop_types_default.a.bool,
|
522 |
-
|
523 |
-
/**
|
524 |
-
* Label describing the legend items.
|
525 |
-
*/
|
526 |
-
itemsLabel: prop_types_default.a.string,
|
527 |
-
|
528 |
-
/**
|
529 |
-
* Allows specifying properties different from the `endpoint` that will be used
|
530 |
-
* to limit the items when there is an active search.
|
531 |
-
*/
|
532 |
-
limitProperties: prop_types_default.a.array,
|
533 |
-
|
534 |
-
/**
|
535 |
-
* `items-comparison` (default) or `time-comparison`, this is used to generate correct
|
536 |
-
* ARIA properties.
|
537 |
-
*/
|
538 |
-
mode: prop_types_default.a.string,
|
539 |
-
|
540 |
-
/**
|
541 |
-
* Current path
|
542 |
-
*/
|
543 |
-
path: prop_types_default.a.string.isRequired,
|
544 |
-
|
545 |
-
/**
|
546 |
-
* Primary data to display in the chart.
|
547 |
-
*/
|
548 |
-
primaryData: prop_types_default.a.object,
|
549 |
-
|
550 |
-
/**
|
551 |
-
* The query string represented in object form.
|
552 |
-
*/
|
553 |
-
query: prop_types_default.a.object.isRequired,
|
554 |
-
|
555 |
-
/**
|
556 |
-
* Secondary data to display in the chart.
|
557 |
-
*/
|
558 |
-
secondaryData: prop_types_default.a.object,
|
559 |
-
|
560 |
-
/**
|
561 |
-
* Properties of the selected chart.
|
562 |
-
*/
|
563 |
-
selectedChart: prop_types_default.a.shape({
|
564 |
-
/**
|
565 |
-
* Key of the selected chart.
|
566 |
-
*/
|
567 |
-
key: prop_types_default.a.string.isRequired,
|
568 |
-
|
569 |
-
/**
|
570 |
-
* Chart label.
|
571 |
-
*/
|
572 |
-
label: prop_types_default.a.string.isRequired,
|
573 |
-
|
574 |
-
/**
|
575 |
-
* Order query argument.
|
576 |
-
*/
|
577 |
-
order: prop_types_default.a.oneOf(['asc', 'desc']),
|
578 |
-
|
579 |
-
/**
|
580 |
-
* Order by query argument.
|
581 |
-
*/
|
582 |
-
orderby: prop_types_default.a.string,
|
583 |
-
|
584 |
-
/**
|
585 |
-
* Number type for formatting.
|
586 |
-
*/
|
587 |
-
type: prop_types_default.a.oneOf(['average', 'number', 'currency']).isRequired
|
588 |
-
}).isRequired
|
589 |
-
};
|
590 |
-
report_chart_ReportChart.defaultProps = {
|
591 |
-
isRequesting: false,
|
592 |
-
primaryData: {
|
593 |
-
data: {
|
594 |
-
intervals: []
|
595 |
-
},
|
596 |
-
isError: false,
|
597 |
-
isRequesting: false
|
598 |
-
},
|
599 |
-
secondaryData: {
|
600 |
-
data: {
|
601 |
-
intervals: []
|
602 |
-
},
|
603 |
-
isError: false,
|
604 |
-
isRequesting: false
|
605 |
-
}
|
606 |
-
};
|
607 |
-
/* harmony default export */ var report_chart = __webpack_exports__["a"] = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select, props) {
|
608 |
-
var charts = props.charts,
|
609 |
-
endpoint = props.endpoint,
|
610 |
-
filters = props.filters,
|
611 |
-
isRequesting = props.isRequesting,
|
612 |
-
limitProperties = props.limitProperties,
|
613 |
-
query = props.query,
|
614 |
-
advancedFilters = props.advancedFilters;
|
615 |
-
var limitBy = limitProperties || [endpoint];
|
616 |
-
var selectedFilter = getSelectedFilter(filters, query);
|
617 |
-
var filterParam = Object(external_lodash_["get"])(selectedFilter, ['settings', 'param']);
|
618 |
-
var chartMode = props.mode || getChartMode(selectedFilter, query) || 'time-comparison';
|
619 |
-
|
620 |
-
var _select$getSetting = select(external_this_wc_data_["SETTINGS_STORE_NAME"]).getSetting('wc_admin', 'wcAdminSettings'),
|
621 |
-
defaultDateRange = _select$getSetting.woocommerce_default_date_range;
|
622 |
-
|
623 |
-
var newProps = {
|
624 |
-
mode: chartMode,
|
625 |
-
filterParam: filterParam,
|
626 |
-
defaultDateRange: defaultDateRange
|
627 |
-
};
|
628 |
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
});
|
641 |
-
}
|
642 |
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
var primaryData = Object(external_this_wc_data_["getReportChartData"])({
|
647 |
-
endpoint: endpoint,
|
648 |
-
dataType: 'primary',
|
649 |
-
query: query,
|
650 |
-
select: select,
|
651 |
-
limitBy: limitBy,
|
652 |
-
filters: filters,
|
653 |
-
advancedFilters: advancedFilters,
|
654 |
-
defaultDateRange: defaultDateRange,
|
655 |
-
fields: fields
|
656 |
-
});
|
657 |
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
});
|
662 |
-
}
|
663 |
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
query: query,
|
668 |
-
select: select,
|
669 |
-
limitBy: limitBy,
|
670 |
-
filters: filters,
|
671 |
-
advancedFilters: advancedFilters,
|
672 |
-
defaultDateRange: defaultDateRange,
|
673 |
-
fields: fields
|
674 |
-
});
|
675 |
-
return _objectSpread(_objectSpread({}, newProps), {}, {
|
676 |
-
primaryData: primaryData,
|
677 |
-
secondaryData: secondaryData
|
678 |
-
});
|
679 |
-
}))(report_chart_ReportChart));
|
680 |
|
681 |
-
|
|
|
|
|
682 |
|
683 |
-
|
684 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
|
686 |
-
"use strict";
|
687 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return charts; });
|
688 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return filters; });
|
689 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return advancedFilters; });
|
690 |
-
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
691 |
-
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
692 |
-
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43);
|
693 |
-
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);
|
694 |
-
/* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25);
|
695 |
-
/* harmony import */ var _lib_async_requests__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(500);
|
696 |
/**
|
697 |
* External dependencies
|
698 |
*/
|
699 |
|
700 |
|
701 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
702 |
/**
|
703 |
-
*
|
704 |
*/
|
705 |
|
706 |
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
status: {
|
752 |
-
labels: {
|
753 |
-
add: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Order Status', 'woocommerce-admin'),
|
754 |
-
remove: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Remove order status filter', 'woocommerce-admin'),
|
755 |
-
rule: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select an order status filter match', 'woocommerce-admin'),
|
756 |
-
|
757 |
-
/* translators: A sentence describing an Order Status filter. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ */
|
758 |
-
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('{{title}}Order Status{{/title}} {{rule /}} {{filter /}}', 'woocommerce-admin'),
|
759 |
-
filter: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select an order status', 'woocommerce-admin')
|
760 |
-
},
|
761 |
-
rules: [{
|
762 |
-
value: 'is',
|
763 |
-
|
764 |
-
/* translators: Sentence fragment, logical, "Is" refers to searching for orders matching a chosen order status. Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
765 |
-
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Is', 'order status', 'woocommerce-admin')
|
766 |
-
}, {
|
767 |
-
value: 'is_not',
|
768 |
-
|
769 |
-
/* translators: Sentence fragment, logical, "Is Not" refers to searching for orders that don\'t match a chosen order status. Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
770 |
-
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Is Not', 'order status', 'woocommerce-admin')
|
771 |
-
}],
|
772 |
-
input: {
|
773 |
-
component: 'SelectControl',
|
774 |
-
options: Object.keys(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_2__[/* ORDER_STATUSES */ "d"]).map(function (key) {
|
775 |
-
return {
|
776 |
-
value: key,
|
777 |
-
label: _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_2__[/* ORDER_STATUSES */ "d"][key]
|
778 |
-
};
|
779 |
-
})
|
780 |
}
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
add: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Products', 'woocommerce-admin'),
|
785 |
-
placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Search products', 'woocommerce-admin'),
|
786 |
-
remove: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Remove products filter', 'woocommerce-admin'),
|
787 |
-
rule: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select a product filter match', 'woocommerce-admin'),
|
788 |
-
|
789 |
-
/* translators: A sentence describing a Product filter. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ */
|
790 |
-
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('{{title}}Product{{/title}} {{rule /}} {{filter /}}', 'woocommerce-admin'),
|
791 |
-
filter: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select products', 'woocommerce-admin')
|
792 |
-
},
|
793 |
-
rules: [{
|
794 |
-
value: 'includes',
|
795 |
-
|
796 |
-
/* translators: Sentence fragment, logical, "Includes" refers to orders including a given product(s). Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
797 |
-
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Includes', 'products', 'woocommerce-admin')
|
798 |
-
}, {
|
799 |
-
value: 'excludes',
|
800 |
-
|
801 |
-
/* translators: Sentence fragment, logical, "Excludes" refers to orders excluding a given product(s). Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
802 |
-
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Excludes', 'products', 'woocommerce-admin')
|
803 |
-
}],
|
804 |
-
input: {
|
805 |
-
component: 'Search',
|
806 |
-
type: 'products',
|
807 |
-
getLabels: _lib_async_requests__WEBPACK_IMPORTED_MODULE_3__[/* getProductLabels */ "d"]
|
808 |
}
|
809 |
-
}
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
/* translators: A sentence describing a Variation filter. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ */
|
818 |
-
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('{{title}}Variation{{/title}} {{rule /}} {{filter /}}', 'woocommerce-admin'),
|
819 |
-
filter: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select variation', 'woocommerce-admin')
|
820 |
-
},
|
821 |
-
rules: [{
|
822 |
-
value: 'includes',
|
823 |
-
|
824 |
-
/* translators: Sentence fragment, logical, "Includes" refers to orders including a given variation(s). Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
825 |
-
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Includes', 'variations', 'woocommerce-admin')
|
826 |
-
}, {
|
827 |
-
value: 'excludes',
|
828 |
-
|
829 |
-
/* translators: Sentence fragment, logical, "Excludes" refers to orders excluding a given variation(s). Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
830 |
-
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Excludes', 'variations', 'woocommerce-admin')
|
831 |
-
}],
|
832 |
-
input: {
|
833 |
-
component: 'Search',
|
834 |
-
type: 'variations',
|
835 |
-
getLabels: _lib_async_requests__WEBPACK_IMPORTED_MODULE_3__[/* getVariationLabels */ "g"]
|
836 |
}
|
837 |
-
}
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
864 |
}
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
},
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
886 |
}
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
value: 'full',
|
906 |
-
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Fully refunded', 'woocommerce-admin')
|
907 |
-
}, {
|
908 |
-
value: 'none',
|
909 |
-
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('None', 'woocommerce-admin')
|
910 |
-
}],
|
911 |
-
defaultOption: 'all'
|
912 |
}
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
remove: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Remove tax rate filter', 'woocommerce-admin'),
|
919 |
-
rule: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select a tax rate filter match', 'woocommerce-admin'),
|
920 |
-
|
921 |
-
/* translators: A sentence describing a tax rate filter. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ */
|
922 |
-
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('{{title}}Tax Rate{{/title}} {{rule /}} {{filter /}}', 'woocommerce-admin'),
|
923 |
-
filter: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select tax rates', 'woocommerce-admin')
|
924 |
-
},
|
925 |
-
rules: [{
|
926 |
-
value: 'includes',
|
927 |
-
|
928 |
-
/* translators: Sentence fragment, logical, "Includes" refers to orders including a given tax rate(s). Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
929 |
-
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Includes', 'tax rate', 'woocommerce-admin')
|
930 |
-
}, {
|
931 |
-
value: 'excludes',
|
932 |
-
|
933 |
-
/* translators: Sentence fragment, logical, "Excludes" refers to orders excluding a given tax rate(s). Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
934 |
-
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Excludes', 'tax rate', 'woocommerce-admin')
|
935 |
-
}],
|
936 |
-
input: {
|
937 |
-
component: 'Search',
|
938 |
-
type: 'taxes',
|
939 |
-
getLabels: _lib_async_requests__WEBPACK_IMPORTED_MODULE_3__[/* getTaxRateLabels */ "f"]
|
940 |
}
|
941 |
-
},
|
942 |
-
attribute: {
|
943 |
-
allowMultiple: true,
|
944 |
-
labels: {
|
945 |
-
add: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Attribute', 'woocommerce-admin'),
|
946 |
-
placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Search attributes', 'woocommerce-admin'),
|
947 |
-
remove: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Remove attribute filter', 'woocommerce-admin'),
|
948 |
-
rule: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select a product attribute filter match', 'woocommerce-admin'),
|
949 |
-
|
950 |
-
/* translators: A sentence describing a Product filter. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ */
|
951 |
-
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('{{title}}Attribute{{/title}} {{rule /}} {{filter /}}', 'woocommerce-admin'),
|
952 |
-
filter: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select attributes', 'woocommerce-admin')
|
953 |
-
},
|
954 |
-
rules: [{
|
955 |
-
value: 'is',
|
956 |
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
961 |
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
968 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
969 |
}
|
970 |
-
|
971 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
972 |
|
973 |
/***/ })
|
974 |
|
1 |
(window["__wcAdmin_webpackJsonp"] = window["__wcAdmin_webpackJsonp"] || []).push([[5],{
|
2 |
|
3 |
+
/***/ 507:
|
4 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5 |
|
6 |
"use strict";
|
7 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createNoticesFromResponse; });
|
8 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
|
9 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
/**
|
11 |
* External dependencies
|
12 |
*/
|
13 |
|
14 |
+
function createNoticesFromResponse(response) {
|
15 |
+
var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__["dispatch"])('core/notices'),
|
16 |
+
createNotice = _dispatch.createNotice;
|
17 |
|
18 |
+
if (response.error_data && response.errors && Object.keys(response.errors).length) {
|
19 |
+
// Loop over multi-error responses.
|
20 |
+
Object.keys(response.errors).forEach(function (errorKey) {
|
21 |
+
createNotice('error', response.errors[errorKey].join(' '));
|
22 |
+
});
|
23 |
+
} else if (response.message) {
|
24 |
+
// Handle generic messages.
|
25 |
+
createNotice(response.code ? 'error' : 'success', response.message);
|
26 |
+
}
|
27 |
+
}
|
28 |
|
29 |
+
/***/ }),
|
30 |
|
31 |
+
/***/ 509:
|
32 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
33 |
|
34 |
+
"use strict";
|
35 |
+
__webpack_require__.r(__webpack_exports__);
|
36 |
+
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
|
37 |
+
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);
|
38 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
|
39 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
|
40 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
|
41 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
42 |
+
/* harmony import */ var _woocommerce_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21);
|
43 |
+
/* harmony import */ var _woocommerce_navigation__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_3__);
|
44 |
+
/* harmony import */ var interpolate_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28);
|
45 |
+
/* harmony import */ var interpolate_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(interpolate_components__WEBPACK_IMPORTED_MODULE_4__);
|
46 |
+
/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47);
|
47 |
+
/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_components__WEBPACK_IMPORTED_MODULE_5__);
|
48 |
+
/* harmony import */ var _profile_wizard_steps_usage_modal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(510);
|
49 |
|
|
|
|
|
|
|
50 |
|
51 |
|
52 |
/**
|
53 |
+
* External dependencies
|
|
|
|
|
|
|
|
|
|
|
54 |
*/
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
|
|
|
|
|
|
57 |
|
58 |
+
|
59 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
/**
|
61 |
+
* Internal dependencies
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
*/
|
63 |
|
|
|
|
|
|
|
|
|
64 |
|
|
|
|
|
|
|
65 |
|
66 |
+
var WCPayUsageModal = function WCPayUsageModal() {
|
67 |
+
var query = Object(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_3__["getQuery"])();
|
68 |
+
var shouldDisplayModal = query['wcpay-connection-success'] === '1';
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
+
var _useState = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useState"])(shouldDisplayModal),
|
71 |
+
_useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),
|
72 |
+
isOpen = _useState2[0],
|
73 |
+
setIsOpen = _useState2[1];
|
74 |
+
|
75 |
+
if (!isOpen) {
|
76 |
+
return null;
|
77 |
}
|
78 |
|
79 |
+
var closeModal = function closeModal() {
|
80 |
+
setIsOpen(false);
|
81 |
+
Object(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_3__["updateQueryString"])({
|
82 |
+
'wcpay-connection-success': undefined
|
83 |
+
});
|
84 |
};
|
85 |
+
|
86 |
+
var title = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Help us build a better WooCommerce Payments experience', 'woocommerce-admin');
|
87 |
+
|
88 |
+
var trackingMessage = interpolate_components__WEBPACK_IMPORTED_MODULE_4___default()({
|
89 |
+
mixedString: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('By agreeing to share non-sensitive {{link}}usage data{{/link}}, you’ll help us improve features and optimize the WooCommerce Payments experience. You can opt out at any time.', 'woocommerce-admin'),
|
90 |
+
components: {
|
91 |
+
link: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_woocommerce_components__WEBPACK_IMPORTED_MODULE_5__["Link"], {
|
92 |
+
href: "https://woocommerce.com/usage-tracking",
|
93 |
+
target: "_blank",
|
94 |
+
type: "external"
|
95 |
+
})
|
96 |
+
}
|
97 |
+
});
|
98 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_profile_wizard_steps_usage_modal__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], {
|
99 |
+
isDismissible: false,
|
100 |
+
title: title,
|
101 |
+
message: trackingMessage,
|
102 |
+
acceptActionText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('I agree', 'woocommerce-admin'),
|
103 |
+
dismissActionText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('No thanks', 'woocommerce-admin'),
|
104 |
+
onContinue: closeModal,
|
105 |
+
onClose: closeModal
|
106 |
+
});
|
107 |
+
};
|
108 |
+
|
109 |
+
/* harmony default export */ __webpack_exports__["default"] = (WCPayUsageModal);
|
110 |
|
111 |
/***/ }),
|
112 |
|
113 |
+
/***/ 510:
|
114 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
115 |
|
116 |
"use strict";
|
117 |
+
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
|
118 |
+
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
|
119 |
+
/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44);
|
120 |
+
/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);
|
121 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
|
122 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);
|
123 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
|
124 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);
|
125 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14);
|
126 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);
|
127 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(15);
|
128 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);
|
129 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7);
|
130 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);
|
131 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(0);
|
132 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);
|
133 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2);
|
134 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);
|
135 |
+
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(20);
|
136 |
+
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__);
|
137 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(11);
|
138 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__);
|
139 |
+
/* harmony import */ var interpolate_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(28);
|
140 |
+
/* harmony import */ var interpolate_components__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(interpolate_components__WEBPACK_IMPORTED_MODULE_11__);
|
141 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(4);
|
142 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_12__);
|
143 |
+
/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(47);
|
144 |
+
/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_components__WEBPACK_IMPORTED_MODULE_13__);
|
145 |
+
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(22);
|
146 |
+
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_14__);
|
147 |
+
|
148 |
+
|
149 |
+
|
150 |
+
|
151 |
+
|
152 |
+
|
153 |
+
|
154 |
+
|
155 |
+
|
156 |
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, result); }; }
|
157 |
+
|
158 |
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
159 |
+
|
160 |
/**
|
161 |
* External dependencies
|
162 |
*/
|
163 |
|
164 |
+
|
165 |
+
|
166 |
+
|
167 |
+
|
168 |
+
|
169 |
+
|
170 |
+
|
171 |
+
|
172 |
+
var UsageModal = /*#__PURE__*/function (_Component) {
|
173 |
+
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(UsageModal, _Component);
|
174 |
+
|
175 |
+
var _super = _createSuper(UsageModal);
|
176 |
+
|
177 |
+
function UsageModal(props) {
|
178 |
+
var _this;
|
179 |
+
|
180 |
+
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, UsageModal);
|
181 |
+
|
182 |
+
_this = _super.call(this, props);
|
183 |
+
_this.state = {
|
184 |
+
isLoadingScripts: false,
|
185 |
+
isRequestStarted: false
|
186 |
+
};
|
187 |
+
return _this;
|
188 |
+
}
|
189 |
+
|
190 |
+
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(UsageModal, [{
|
191 |
+
key: "componentDidUpdate",
|
192 |
+
value: function () {
|
193 |
+
var _componentDidUpdate = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(prevProps, prevState) {
|
194 |
+
var _this$props, hasErrors, isRequesting, onClose, onContinue, createNotice, _this$state, isLoadingScripts, isRequestStarted, isRequestSuccessful, isRequestError;
|
195 |
+
|
196 |
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
|
197 |
+
while (1) {
|
198 |
+
switch (_context.prev = _context.next) {
|
199 |
+
case 0:
|
200 |
+
_this$props = this.props, hasErrors = _this$props.hasErrors, isRequesting = _this$props.isRequesting, onClose = _this$props.onClose, onContinue = _this$props.onContinue, createNotice = _this$props.createNotice;
|
201 |
+
_this$state = this.state, isLoadingScripts = _this$state.isLoadingScripts, isRequestStarted = _this$state.isRequestStarted; // We can't rely on isRequesting props only because option update might be triggered by other component.
|
202 |
+
|
203 |
+
if (isRequestStarted) {
|
204 |
+
_context.next = 4;
|
205 |
+
break;
|
206 |
+
}
|
207 |
+
|
208 |
+
return _context.abrupt("return");
|
209 |
+
|
210 |
+
case 4:
|
211 |
+
isRequestSuccessful = !isRequesting && !isLoadingScripts && (prevProps.isRequesting || prevState.isLoadingScripts) && !hasErrors;
|
212 |
+
isRequestError = !isRequesting && prevProps.isRequesting && hasErrors;
|
213 |
+
|
214 |
+
if (isRequestSuccessful) {
|
215 |
+
onClose();
|
216 |
+
onContinue();
|
217 |
+
}
|
218 |
+
|
219 |
+
if (isRequestError) {
|
220 |
+
createNotice('error', Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('There was a problem updating your preferences', 'woocommerce-admin'));
|
221 |
+
onClose();
|
222 |
+
}
|
223 |
+
|
224 |
+
case 8:
|
225 |
+
case "end":
|
226 |
+
return _context.stop();
|
227 |
+
}
|
228 |
+
}
|
229 |
+
}, _callee, this);
|
230 |
+
}));
|
231 |
+
|
232 |
+
function componentDidUpdate(_x, _x2) {
|
233 |
+
return _componentDidUpdate.apply(this, arguments);
|
234 |
+
}
|
235 |
+
|
236 |
+
return componentDidUpdate;
|
237 |
+
}()
|
238 |
+
}, {
|
239 |
+
key: "updateTracking",
|
240 |
+
value: function updateTracking(_ref) {
|
241 |
+
var _this2 = this;
|
242 |
+
|
243 |
+
var allowTracking = _ref.allowTracking;
|
244 |
+
var updateOptions = this.props.updateOptions;
|
245 |
+
|
246 |
+
if (allowTracking && typeof window.wcTracks.enable === 'function') {
|
247 |
+
this.setState({
|
248 |
+
isLoadingScripts: true
|
249 |
+
});
|
250 |
+
window.wcTracks.enable(function () {
|
251 |
+
// Don't update state if component is unmounted already
|
252 |
+
if (!_this2._isMounted) {
|
253 |
+
return;
|
254 |
+
}
|
255 |
+
|
256 |
+
_this2.setState({
|
257 |
+
isLoadingScripts: false
|
258 |
+
});
|
259 |
+
});
|
260 |
+
} else if (!allowTracking) {
|
261 |
+
window.wcTracks.isEnabled = false;
|
262 |
+
}
|
263 |
+
|
264 |
+
var trackingValue = allowTracking ? 'yes' : 'no';
|
265 |
+
this.setState({
|
266 |
+
isRequestStarted: true
|
267 |
+
});
|
268 |
+
updateOptions({
|
269 |
+
woocommerce_allow_tracking: trackingValue
|
270 |
+
});
|
271 |
+
}
|
272 |
+
}, {
|
273 |
+
key: "componentDidMount",
|
274 |
+
value: function componentDidMount() {
|
275 |
+
this._isMounted = true;
|
276 |
+
}
|
277 |
+
}, {
|
278 |
+
key: "componentWillUnmount",
|
279 |
+
value: function componentWillUnmount() {
|
280 |
+
this._isMounted = false;
|
281 |
+
}
|
282 |
+
}, {
|
283 |
+
key: "render",
|
284 |
+
value: function render() {
|
285 |
+
var _this3 = this;
|
286 |
+
|
287 |
+
// Bail if site has already opted in to tracking
|
288 |
+
if (this.props.allowTracking) {
|
289 |
+
var _this$props2 = this.props,
|
290 |
+
onClose = _this$props2.onClose,
|
291 |
+
onContinue = _this$props2.onContinue;
|
292 |
+
onClose();
|
293 |
+
onContinue();
|
294 |
+
return null;
|
295 |
+
}
|
296 |
+
|
297 |
+
var _this$props3 = this.props,
|
298 |
+
isRequesting = _this$props3.isRequesting,
|
299 |
+
_this$props3$title = _this$props3.title,
|
300 |
+
title = _this$props3$title === void 0 ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('Build a better WooCommerce', 'woocommerce-admin') : _this$props3$title,
|
301 |
+
_this$props3$message = _this$props3.message,
|
302 |
+
message = _this$props3$message === void 0 ? interpolate_components__WEBPACK_IMPORTED_MODULE_11___default()({
|
303 |
+
mixedString: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('Get improved features and faster fixes by sharing non-sensitive data via {{link}}usage tracking{{/link}} ' + 'that shows us how WooCommerce is used. No personal data is tracked or stored.', 'woocommerce-admin'),
|
304 |
+
components: {
|
305 |
+
link: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_woocommerce_components__WEBPACK_IMPORTED_MODULE_13__["Link"], {
|
306 |
+
href: "https://woocommerce.com/usage-tracking",
|
307 |
+
target: "_blank",
|
308 |
+
type: "external"
|
309 |
+
})
|
310 |
+
}
|
311 |
+
}) : _this$props3$message,
|
312 |
+
_this$props3$dismissA = _this$props3.dismissActionText,
|
313 |
+
dismissActionText = _this$props3$dismissA === void 0 ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('No thanks', 'woocommerce-admin') : _this$props3$dismissA,
|
314 |
+
_this$props3$acceptAc = _this$props3.acceptActionText,
|
315 |
+
acceptActionText = _this$props3$acceptAc === void 0 ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('Yes, count me in!', 'woocommerce-admin') : _this$props3$acceptAc;
|
316 |
+
var isRequestStarted = this.state.isRequestStarted;
|
317 |
+
var isBusy = isRequestStarted && isRequesting;
|
318 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_12__["Modal"], {
|
319 |
+
title: title,
|
320 |
+
isDismissible: this.props.isDismissible,
|
321 |
+
onRequestClose: function onRequestClose() {
|
322 |
+
return _this3.props.onClose();
|
323 |
+
},
|
324 |
+
className: "woocommerce-usage-modal"
|
325 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("div", {
|
326 |
+
className: "woocommerce-usage-modal__wrapper"
|
327 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("div", {
|
328 |
+
className: "woocommerce-usage-modal__message"
|
329 |
+
}, message), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("div", {
|
330 |
+
className: "woocommerce-usage-modal__actions"
|
331 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_12__["Button"], {
|
332 |
+
isSecondary: true,
|
333 |
+
isBusy: isBusy,
|
334 |
+
onClick: function onClick() {
|
335 |
+
return _this3.updateTracking({
|
336 |
+
allowTracking: false
|
337 |
+
});
|
338 |
+
}
|
339 |
+
}, dismissActionText), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_12__["Button"], {
|
340 |
+
isPrimary: true,
|
341 |
+
isBusy: isBusy,
|
342 |
+
onClick: function onClick() {
|
343 |
+
return _this3.updateTracking({
|
344 |
+
allowTracking: true
|
345 |
+
});
|
346 |
+
}
|
347 |
+
}, acceptActionText))));
|
348 |
+
}
|
349 |
+
}]);
|
350 |
+
|
351 |
+
return UsageModal;
|
352 |
+
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Component"]);
|
353 |
+
|
354 |
+
/* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__["compose"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withSelect"])(function (select) {
|
355 |
+
var _select = select(_woocommerce_data__WEBPACK_IMPORTED_MODULE_14__["OPTIONS_STORE_NAME"]),
|
356 |
+
getOption = _select.getOption,
|
357 |
+
getOptionsUpdatingError = _select.getOptionsUpdatingError,
|
358 |
+
isOptionsUpdating = _select.isOptionsUpdating;
|
359 |
+
|
360 |
+
var allowTracking = getOption('woocommerce_allow_tracking') === 'yes';
|
361 |
+
var isRequesting = Boolean(isOptionsUpdating());
|
362 |
+
var hasErrors = Boolean(getOptionsUpdatingError());
|
363 |
+
return {
|
364 |
+
allowTracking: allowTracking,
|
365 |
+
isRequesting: isRequesting,
|
366 |
+
hasErrors: hasErrors
|
367 |
+
};
|
368 |
+
}), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withDispatch"])(function (dispatch) {
|
369 |
+
var _dispatch = dispatch('core/notices'),
|
370 |
+
createNotice = _dispatch.createNotice;
|
371 |
+
|
372 |
+
var _dispatch2 = dispatch(_woocommerce_data__WEBPACK_IMPORTED_MODULE_14__["OPTIONS_STORE_NAME"]),
|
373 |
+
updateOptions = _dispatch2.updateOptions;
|
374 |
+
|
375 |
+
return {
|
376 |
+
createNotice: createNotice,
|
377 |
+
updateOptions: updateOptions
|
378 |
+
};
|
379 |
+
}))(UsageModal));
|
380 |
|
381 |
/***/ }),
|
382 |
|
383 |
+
/***/ 514:
|
384 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
385 |
|
386 |
"use strict";
|
387 |
|
388 |
+
// EXPORTS
|
389 |
+
__webpack_require__.d(__webpack_exports__, "d", function() { return /* reexport */ isWCPaySupported; });
|
390 |
+
__webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ installActivateAndConnectWcpay; });
|
391 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ wcpay; });
|
392 |
+
__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ wcpay_usage_modal["default"]; });
|
393 |
|
394 |
+
// EXTERNAL MODULE: ./client/task-list/tasks/payments/wcpay/wcpay-usage-modal.js
|
395 |
+
var wcpay_usage_modal = __webpack_require__(509);
|
|
|
396 |
|
397 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
|
398 |
var classCallCheck = __webpack_require__(12);
|
414 |
var getPrototypeOf = __webpack_require__(7);
|
415 |
var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf);
|
416 |
|
|
|
|
|
|
|
417 |
// EXTERNAL MODULE: external {"this":["wp","i18n"]}
|
418 |
var external_this_wp_i18n_ = __webpack_require__(2);
|
419 |
|
420 |
+
// EXTERNAL MODULE: external {"this":["wp","element"]}
|
421 |
+
var external_this_wp_element_ = __webpack_require__(0);
|
|
|
|
|
|
|
422 |
|
423 |
// EXTERNAL MODULE: external {"this":["wp","data"]}
|
424 |
var external_this_wp_data_ = __webpack_require__(11);
|
425 |
|
426 |
+
// EXTERNAL MODULE: external {"this":["wc","navigation"]}
|
427 |
+
var external_this_wc_navigation_ = __webpack_require__(21);
|
428 |
|
429 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/wcpay/wcpay.js
|
|
|
|
|
430 |
|
|
|
|
|
431 |
|
|
|
|
|
432 |
|
|
|
|
|
433 |
|
|
|
|
|
434 |
|
|
|
|
|
435 |
|
436 |
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
437 |
+
|
438 |
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
439 |
|
|
|
440 |
/**
|
441 |
* External dependencies
|
442 |
*/
|
443 |
|
444 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
445 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
|
|
|
|
|
|
|
|
|
|
|
447 |
|
448 |
+
var wcpay_WCPay = /*#__PURE__*/function (_Component) {
|
449 |
+
inherits_default()(WCPay, _Component);
|
|
|
|
|
450 |
|
451 |
+
var _super = _createSuper(WCPay);
|
|
|
|
|
452 |
|
453 |
+
function WCPay() {
|
454 |
+
classCallCheck_default()(this, WCPay);
|
455 |
|
456 |
+
return _super.apply(this, arguments);
|
457 |
+
}
|
458 |
|
459 |
+
createClass_default()(WCPay, [{
|
460 |
+
key: "componentDidMount",
|
461 |
+
value: function componentDidMount() {
|
462 |
+
var _this$props = this.props,
|
463 |
+
createNotice = _this$props.createNotice,
|
464 |
+
markConfigured = _this$props.markConfigured;
|
465 |
+
var query = Object(external_this_wc_navigation_["getQuery"])(); // Handle redirect back from WCPay on-boarding
|
466 |
+
|
467 |
+
if (query['wcpay-connection-success']) {
|
468 |
+
createNotice('success', Object(external_this_wp_i18n_["__"])('WooCommerce Payments connected successfully.', 'woocommerce-admin'));
|
469 |
+
markConfigured('wcpay', {
|
470 |
+
'wcpay-connection-success': '1'
|
471 |
+
});
|
472 |
+
}
|
473 |
+
}
|
474 |
+
}, {
|
475 |
+
key: "render",
|
476 |
+
value: function render() {
|
477 |
+
return null;
|
478 |
+
}
|
479 |
+
}]);
|
480 |
|
481 |
+
return WCPay;
|
482 |
+
}(external_this_wp_element_["Component"]);
|
483 |
|
484 |
+
/* harmony default export */ var wcpay = (Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
|
485 |
+
var _dispatch = dispatch('core/notices'),
|
486 |
+
createNotice = _dispatch.createNotice;
|
487 |
|
488 |
+
return {
|
489 |
+
createNotice: createNotice
|
490 |
+
};
|
491 |
+
})(wcpay_WCPay));
|
492 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/wcpay/is-supported.js
|
493 |
+
function isWCPaySupported(countryCode) {
|
494 |
+
var supportedCountries = ['US', 'PR'];
|
495 |
|
496 |
+
if (window.wcAdminFeatures && window.wcAdminFeatures['wcpay/support-international-countries']) {
|
497 |
+
supportedCountries.push('AU', 'CA', 'GB', 'IE', 'NZ');
|
498 |
+
}
|
499 |
|
500 |
+
return supportedCountries.includes(countryCode);
|
501 |
+
}
|
502 |
+
// EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
|
503 |
+
var external_this_wp_apiFetch_ = __webpack_require__(26);
|
504 |
+
var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
|
505 |
|
506 |
+
// EXTERNAL MODULE: external {"this":["wc","data"]}
|
507 |
+
var external_this_wc_data_ = __webpack_require__(22);
|
508 |
|
509 |
+
// EXTERNAL MODULE: external {"this":["wc","tracks"]}
|
510 |
+
var external_this_wc_tracks_ = __webpack_require__(27);
|
511 |
|
512 |
+
// EXTERNAL MODULE: ./client/lib/notices/index.js
|
513 |
+
var notices = __webpack_require__(507);
|
514 |
|
515 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/wcpay/install-activate-and-connect.js
|
516 |
/**
|
517 |
* External dependencies
|
518 |
*/
|
520 |
|
521 |
|
522 |
|
523 |
+
/**
|
524 |
+
* Internal dependencies
|
525 |
+
*/
|
526 |
|
527 |
|
528 |
+
function installActivateAndConnectWcpay(reject, createNotice, installAndActivatePlugins) {
|
529 |
+
var errorMessage = Object(external_this_wp_i18n_["__"])('There was an error connecting to WooCommerce Payments. Please try again or connect later in store settings.', 'woocommerce-admin');
|
530 |
|
531 |
+
var connect = function connect() {
|
532 |
+
external_this_wp_apiFetch_default()({
|
533 |
+
path: external_this_wc_data_["WC_ADMIN_NAMESPACE"] + '/plugins/connect-wcpay',
|
534 |
+
method: 'POST'
|
535 |
+
}).then(function (response) {
|
536 |
+
window.location = response.connectUrl;
|
537 |
+
}).catch(function () {
|
538 |
+
createNotice('error', errorMessage);
|
539 |
+
reject();
|
540 |
+
});
|
541 |
+
};
|
542 |
|
543 |
+
installAndActivatePlugins(['woocommerce-payments']).then(function () {
|
544 |
+
Object(external_this_wc_tracks_["recordEvent"])('woocommerce_payments_install', {
|
545 |
+
context: 'tasklist'
|
546 |
+
});
|
547 |
+
connect();
|
548 |
+
}).catch(function (error) {
|
549 |
+
Object(notices["a" /* createNoticesFromResponse */])(error);
|
550 |
+
reject();
|
551 |
+
});
|
552 |
+
}
|
553 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/wcpay/index.js
|
554 |
/**
|
555 |
* Internal dependencies
|
556 |
*/
|
558 |
|
559 |
|
560 |
|
|
|
|
|
|
|
561 |
|
|
|
|
|
562 |
|
563 |
+
/***/ }),
|
564 |
|
565 |
+
/***/ 533:
|
566 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
567 |
|
568 |
+
"use strict";
|
|
|
569 |
|
570 |
+
// EXPORTS
|
571 |
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ getPaymentMethods; });
|
|
|
|
|
|
|
|
|
572 |
|
573 |
+
// EXTERNAL MODULE: external {"this":["wp","element"]}
|
574 |
+
var external_this_wp_element_ = __webpack_require__(0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
575 |
|
576 |
+
// EXTERNAL MODULE: external {"this":["wp","i18n"]}
|
577 |
+
var external_this_wp_i18n_ = __webpack_require__(2);
|
|
|
|
|
|
|
578 |
|
579 |
+
// EXTERNAL MODULE: ./node_modules/interpolate-components/lib/index.js
|
580 |
+
var lib = __webpack_require__(28);
|
581 |
+
var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
582 |
|
583 |
+
// EXTERNAL MODULE: ./client/wc-admin-settings/index.js
|
584 |
+
var wc_admin_settings = __webpack_require__(25);
|
|
|
|
|
|
|
585 |
|
586 |
+
// EXTERNAL MODULE: external {"this":["wc","components"]}
|
587 |
+
var external_this_wc_components_ = __webpack_require__(47);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
588 |
|
589 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
|
590 |
+
var helpers_extends = __webpack_require__(24);
|
591 |
+
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
|
592 |
|
593 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
|
594 |
+
var regenerator = __webpack_require__(8);
|
595 |
+
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
596 |
|
597 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
598 |
+
var asyncToGenerator = __webpack_require__(44);
|
599 |
+
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
600 |
|
601 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
|
602 |
+
var classCallCheck = __webpack_require__(12);
|
603 |
+
var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
|
604 |
|
605 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js
|
606 |
+
var createClass = __webpack_require__(13);
|
607 |
+
var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
|
608 |
|
609 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/assertThisInitialized.js
|
610 |
+
var assertThisInitialized = __webpack_require__(9);
|
611 |
+
var assertThisInitialized_default = /*#__PURE__*/__webpack_require__.n(assertThisInitialized);
|
|
|
|
|
612 |
|
613 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js
|
614 |
+
var inherits = __webpack_require__(14);
|
615 |
+
var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
616 |
|
617 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js
|
618 |
+
var possibleConstructorReturn = __webpack_require__(15);
|
619 |
+
var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn);
|
|
|
|
|
620 |
|
621 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/getPrototypeOf.js
|
622 |
+
var getPrototypeOf = __webpack_require__(7);
|
623 |
+
var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
624 |
|
625 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
|
626 |
+
var defineProperty = __webpack_require__(5);
|
627 |
+
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
|
628 |
|
629 |
+
// EXTERNAL MODULE: external {"this":["wp","components"]}
|
630 |
+
var external_this_wp_components_ = __webpack_require__(4);
|
631 |
+
|
632 |
+
// EXTERNAL MODULE: external {"this":["wp","compose"]}
|
633 |
+
var external_this_wp_compose_ = __webpack_require__(20);
|
634 |
+
|
635 |
+
// EXTERNAL MODULE: external {"this":["wp","data"]}
|
636 |
+
var external_this_wp_data_ = __webpack_require__(11);
|
637 |
+
|
638 |
+
// EXTERNAL MODULE: external {"this":["wc","data"]}
|
639 |
+
var external_this_wc_data_ = __webpack_require__(22);
|
640 |
+
|
641 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/bacs.js
|
642 |
+
|
643 |
+
|
644 |
+
|
645 |
+
|
646 |
+
|
647 |
+
|
648 |
+
|
649 |
+
|
650 |
+
|
651 |
+
|
652 |
+
|
653 |
+
|
654 |
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
655 |
+
|
656 |
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
657 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
658 |
/**
|
659 |
* External dependencies
|
660 |
*/
|
661 |
|
662 |
|
663 |
|
664 |
+
|
665 |
+
|
666 |
+
|
667 |
+
|
668 |
+
|
669 |
+
var bacs_Bacs = /*#__PURE__*/function (_Component) {
|
670 |
+
inherits_default()(Bacs, _Component);
|
671 |
+
|
672 |
+
var _super = _createSuper(Bacs);
|
673 |
+
|
674 |
+
function Bacs() {
|
675 |
+
var _this;
|
676 |
+
|
677 |
+
classCallCheck_default()(this, Bacs);
|
678 |
+
|
679 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
680 |
+
args[_key] = arguments[_key];
|
681 |
+
}
|
682 |
+
|
683 |
+
_this = _super.call.apply(_super, [this].concat(args));
|
684 |
+
|
685 |
+
defineProperty_default()(assertThisInitialized_default()(_this), "getInitialConfigValues", function () {
|
686 |
+
return {
|
687 |
+
account_name: '',
|
688 |
+
account_number: '',
|
689 |
+
bank_name: '',
|
690 |
+
sort_code: '',
|
691 |
+
iban: '',
|
692 |
+
bic: ''
|
693 |
+
};
|
694 |
+
});
|
695 |
+
|
696 |
+
defineProperty_default()(assertThisInitialized_default()(_this), "validate", function (values) {
|
697 |
+
var errors = {};
|
698 |
+
|
699 |
+
if (!values.account_number && !values.iban) {
|
700 |
+
errors.account_number = errors.iban = Object(external_this_wp_i18n_["__"])('Please enter an account number or IBAN', 'woocommerce-admin');
|
701 |
+
}
|
702 |
+
|
703 |
+
return errors;
|
704 |
+
});
|
705 |
+
|
706 |
+
defineProperty_default()(assertThisInitialized_default()(_this), "updateSettings", /*#__PURE__*/function () {
|
707 |
+
var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee(values) {
|
708 |
+
var _this$props, updateOptions, createNotice, markConfigured, update;
|
709 |
+
|
710 |
+
return regenerator_default.a.wrap(function _callee$(_context) {
|
711 |
+
while (1) {
|
712 |
+
switch (_context.prev = _context.next) {
|
713 |
+
case 0:
|
714 |
+
_this$props = _this.props, updateOptions = _this$props.updateOptions, createNotice = _this$props.createNotice, markConfigured = _this$props.markConfigured;
|
715 |
+
_context.next = 3;
|
716 |
+
return updateOptions({
|
717 |
+
woocommerce_bacs_settings: {
|
718 |
+
enabled: 'yes'
|
719 |
+
},
|
720 |
+
woocommerce_bacs_accounts: [values]
|
721 |
+
});
|
722 |
+
|
723 |
+
case 3:
|
724 |
+
update = _context.sent;
|
725 |
+
|
726 |
+
if (update.success) {
|
727 |
+
markConfigured('bacs');
|
728 |
+
createNotice('success', Object(external_this_wp_i18n_["__"])('Direct bank transfer details added successfully', 'woocommerce-admin'));
|
729 |
+
} else {
|
730 |
+
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings', 'woocommerce-admin'));
|
731 |
+
}
|
732 |
+
|
733 |
+
case 5:
|
734 |
+
case "end":
|
735 |
+
return _context.stop();
|
736 |
+
}
|
737 |
+
}
|
738 |
+
}, _callee);
|
739 |
+
}));
|
740 |
+
|
741 |
+
return function (_x) {
|
742 |
+
return _ref.apply(this, arguments);
|
743 |
+
};
|
744 |
+
}());
|
745 |
+
|
746 |
+
return _this;
|
747 |
+
}
|
748 |
+
|
749 |
+
createClass_default()(Bacs, [{
|
750 |
+
key: "render",
|
751 |
+
value: function render() {
|
752 |
+
var isOptionsRequesting = this.props.isOptionsRequesting;
|
753 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Form"], {
|
754 |
+
initialValues: this.getInitialConfigValues(),
|
755 |
+
onSubmitCallback: this.updateSettings,
|
756 |
+
validate: this.validate
|
757 |
+
}, function (_ref2) {
|
758 |
+
var getInputProps = _ref2.getInputProps,
|
759 |
+
handleSubmit = _ref2.handleSubmit;
|
760 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["H"], null, Object(external_this_wp_i18n_["__"])('Add your bank details', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_i18n_["__"])('These details are required to receive payments via bank transfer', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])("div", {
|
761 |
+
className: "woocommerce-task-payment-method__fields"
|
762 |
+
}, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
763 |
+
label: Object(external_this_wp_i18n_["__"])('Account name', 'woocommerce-admin'),
|
764 |
+
required: true
|
765 |
+
}, getInputProps('account_name'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
766 |
+
label: Object(external_this_wp_i18n_["__"])('Account number', 'woocommerce-admin'),
|
767 |
+
required: true
|
768 |
+
}, getInputProps('account_number'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
769 |
+
label: Object(external_this_wp_i18n_["__"])('Bank name', 'woocommerce-admin'),
|
770 |
+
required: true
|
771 |
+
}, getInputProps('bank_name'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
772 |
+
label: Object(external_this_wp_i18n_["__"])('Sort code', 'woocommerce-admin'),
|
773 |
+
required: true
|
774 |
+
}, getInputProps('sort_code'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
775 |
+
label: Object(external_this_wp_i18n_["__"])('IBAN', 'woocommerce-admin'),
|
776 |
+
required: true
|
777 |
+
}, getInputProps('iban'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
778 |
+
label: Object(external_this_wp_i18n_["__"])('BIC / Swift', 'woocommerce-admin'),
|
779 |
+
required: true
|
780 |
+
}, getInputProps('bic')))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
781 |
+
isPrimary: true,
|
782 |
+
isBusy: isOptionsRequesting,
|
783 |
+
onClick: handleSubmit
|
784 |
+
}, Object(external_this_wp_i18n_["__"])('Save', 'woocommerce-admin')));
|
785 |
+
});
|
786 |
+
}
|
787 |
+
}]);
|
788 |
+
|
789 |
+
return Bacs;
|
790 |
+
}(external_this_wp_element_["Component"]);
|
791 |
+
|
792 |
+
/* harmony default export */ var bacs = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
|
793 |
+
var _select = select(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
794 |
+
isOptionsUpdating = _select.isOptionsUpdating;
|
795 |
+
|
796 |
+
var isOptionsRequesting = isOptionsUpdating();
|
797 |
+
return {
|
798 |
+
isOptionsRequesting: isOptionsRequesting
|
799 |
+
};
|
800 |
+
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
|
801 |
+
var _dispatch = dispatch('core/notices'),
|
802 |
+
createNotice = _dispatch.createNotice;
|
803 |
+
|
804 |
+
var _dispatch2 = dispatch(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
805 |
+
updateOptions = _dispatch2.updateOptions;
|
806 |
+
|
807 |
+
return {
|
808 |
+
createNotice: createNotice,
|
809 |
+
updateOptions: updateOptions
|
810 |
+
};
|
811 |
+
}))(bacs_Bacs));
|
812 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/images/bacs.js
|
813 |
+
|
814 |
+
/* harmony default export */ var images_bacs = (function () {
|
815 |
+
return Object(external_this_wp_element_["createElement"])("svg", {
|
816 |
+
width: "96",
|
817 |
+
height: "32",
|
818 |
+
viewBox: "0 0 96 32",
|
819 |
+
fill: "none",
|
820 |
+
xmlns: "http://www.w3.org/2000/svg"
|
821 |
+
}, Object(external_this_wp_element_["createElement"])("rect", {
|
822 |
+
width: "32",
|
823 |
+
height: "32",
|
824 |
+
rx: "16",
|
825 |
+
fill: "#8E9196"
|
826 |
+
}), Object(external_this_wp_element_["createElement"])("mask", {
|
827 |
+
id: "bacs0",
|
828 |
+
"mask-type": "alpha",
|
829 |
+
maskUnits: "userSpaceOnUse",
|
830 |
+
x: "8",
|
831 |
+
y: "8",
|
832 |
+
width: "16",
|
833 |
+
height: "16"
|
834 |
+
}, Object(external_this_wp_element_["createElement"])("path", {
|
835 |
+
fillRule: "evenodd",
|
836 |
+
clipRule: "evenodd",
|
837 |
+
d: "M8.875 12.25L16 8.5L23.125 12.25V13.75H8.875V12.25ZM16 10.195L19.9075 12.25H12.0925L16 10.195ZM10.75 15.25H12.25V20.5H10.75V15.25ZM15.25 20.5V15.25H16.75V20.5H15.25ZM23.125 23.5V22H8.875V23.5H23.125ZM19.75 15.25H21.25V20.5H19.75V15.25Z",
|
838 |
+
fill: "white"
|
839 |
+
})), Object(external_this_wp_element_["createElement"])("g", {
|
840 |
+
mask: "url(#bacs0)"
|
841 |
+
}, Object(external_this_wp_element_["createElement"])("rect", {
|
842 |
+
x: "7",
|
843 |
+
y: "7",
|
844 |
+
width: "18",
|
845 |
+
height: "18",
|
846 |
+
fill: "white"
|
847 |
+
})), Object(external_this_wp_element_["createElement"])("mask", {
|
848 |
+
id: "bacs1",
|
849 |
+
"mask-type": "alpha",
|
850 |
+
maskUnits: "userSpaceOnUse",
|
851 |
+
x: "39",
|
852 |
+
y: "10",
|
853 |
+
width: "18",
|
854 |
+
height: "12"
|
855 |
+
}, Object(external_this_wp_element_["createElement"])("path", {
|
856 |
+
d: "M39 17L53.17 17L49.59 20.59L51 22L57 16L51 10L49.59 11.41L53.17 15L39 15L39 17Z",
|
857 |
+
fill: "white"
|
858 |
+
})), Object(external_this_wp_element_["createElement"])("g", {
|
859 |
+
mask: "url(#bacs1)"
|
860 |
+
}, Object(external_this_wp_element_["createElement"])("rect", {
|
861 |
+
x: "60",
|
862 |
+
y: "28",
|
863 |
+
width: "24",
|
864 |
+
height: "24",
|
865 |
+
transform: "rotate(-180 60 28)",
|
866 |
+
fill: "#8E9196"
|
867 |
+
})), Object(external_this_wp_element_["createElement"])("rect", {
|
868 |
+
x: "64",
|
869 |
+
width: "32",
|
870 |
+
height: "32",
|
871 |
+
rx: "16",
|
872 |
+
fill: "#8E9196"
|
873 |
+
}), Object(external_this_wp_element_["createElement"])("mask", {
|
874 |
+
id: "bacs2",
|
875 |
+
"mask-type": "alpha",
|
876 |
+
maskUnits: "userSpaceOnUse",
|
877 |
+
x: "72",
|
878 |
+
y: "8",
|
879 |
+
width: "16",
|
880 |
+
height: "16"
|
881 |
+
}, Object(external_this_wp_element_["createElement"])("path", {
|
882 |
+
fillRule: "evenodd",
|
883 |
+
clipRule: "evenodd",
|
884 |
+
d: "M72.875 12.25L80 8.5L87.125 12.25V13.75H72.875V12.25ZM80 10.195L83.9075 12.25H76.0925L80 10.195ZM74.75 15.25H76.25V20.5H74.75V15.25ZM79.25 20.5V15.25H80.75V20.5H79.25ZM87.125 23.5V22H72.875V23.5H87.125ZM83.75 15.25H85.25V20.5H83.75V15.25Z",
|
885 |
+
fill: "white"
|
886 |
+
})), Object(external_this_wp_element_["createElement"])("g", {
|
887 |
+
mask: "url(#bacs2)"
|
888 |
+
}, Object(external_this_wp_element_["createElement"])("rect", {
|
889 |
+
x: "71",
|
890 |
+
y: "7",
|
891 |
+
width: "18",
|
892 |
+
height: "18",
|
893 |
+
fill: "white"
|
894 |
+
})));
|
895 |
+
});
|
896 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/images/cod.js
|
897 |
+
|
898 |
+
/* harmony default export */ var cod = (function () {
|
899 |
+
return Object(external_this_wp_element_["createElement"])("svg", {
|
900 |
+
width: "96",
|
901 |
+
height: "32",
|
902 |
+
viewBox: "0 0 96 32",
|
903 |
+
fill: "none",
|
904 |
+
xmlns: "http://www.w3.org/2000/svg"
|
905 |
+
}, Object(external_this_wp_element_["createElement"])("rect", {
|
906 |
+
width: "32",
|
907 |
+
height: "32",
|
908 |
+
rx: "16",
|
909 |
+
fill: "#8E9196"
|
910 |
+
}), Object(external_this_wp_element_["createElement"])("mask", {
|
911 |
+
id: "cod-mask-0",
|
912 |
+
"mask-type": "alpha",
|
913 |
+
maskUnits: "userSpaceOnUse",
|
914 |
+
x: "7",
|
915 |
+
y: "10",
|
916 |
+
width: "18",
|
917 |
+
height: "12"
|
918 |
+
}, Object(external_this_wp_element_["createElement"])("path", {
|
919 |
+
fillRule: "evenodd",
|
920 |
+
clipRule: "evenodd",
|
921 |
+
d: "M22 13H19.75V10H9.25C8.425 10 7.75 10.675 7.75 11.5V19.75H9.25C9.25 20.995 10.255 22 11.5 22C12.745 22 13.75 20.995 13.75 19.75H18.25C18.25 20.995 19.255 22 20.5 22C21.745 22 22.75 20.995 22.75 19.75H24.25V16L22 13ZM21.625 14.125L23.095 16H19.75V14.125H21.625ZM10.75 19.75C10.75 20.1625 11.0875 20.5 11.5 20.5C11.9125 20.5 12.25 20.1625 12.25 19.75C12.25 19.3375 11.9125 19 11.5 19C11.0875 19 10.75 19.3375 10.75 19.75ZM13.165 18.25C12.7525 17.7925 12.1675 17.5 11.5 17.5C10.8325 17.5 10.2475 17.7925 9.835 18.25H9.25V11.5H18.25V18.25H13.165ZM19.75 19.75C19.75 20.1625 20.0875 20.5 20.5 20.5C20.9125 20.5 21.25 20.1625 21.25 19.75C21.25 19.3375 20.9125 19 20.5 19C20.0875 19 19.75 19.3375 19.75 19.75Z",
|
922 |
+
fill: "white"
|
923 |
+
})), Object(external_this_wp_element_["createElement"])("g", {
|
924 |
+
mask: "url(#cod-mask-0)"
|
925 |
+
}, Object(external_this_wp_element_["createElement"])("rect", {
|
926 |
+
x: "7",
|
927 |
+
y: "7",
|
928 |
+
width: "18",
|
929 |
+
height: "18",
|
930 |
+
fill: "white"
|
931 |
+
})), Object(external_this_wp_element_["createElement"])("mask", {
|
932 |
+
id: "cod-mask-1",
|
933 |
+
"mask-type": "alpha",
|
934 |
+
maskUnits: "userSpaceOnUse",
|
935 |
+
x: "39",
|
936 |
+
y: "10",
|
937 |
+
width: "18",
|
938 |
+
height: "12"
|
939 |
+
}, Object(external_this_wp_element_["createElement"])("path", {
|
940 |
+
d: "M39 17L53.17 17L49.59 20.59L51 22L57 16L51 10L49.59 11.41L53.17 15L39 15L39 17Z",
|
941 |
+
fill: "white"
|
942 |
+
})), Object(external_this_wp_element_["createElement"])("g", {
|
943 |
+
mask: "url(#cod-mask-1)"
|
944 |
+
}, Object(external_this_wp_element_["createElement"])("rect", {
|
945 |
+
x: "60",
|
946 |
+
y: "28",
|
947 |
+
width: "24",
|
948 |
+
height: "24",
|
949 |
+
transform: "rotate(-180 60 28)",
|
950 |
+
fill: "#8E9196"
|
951 |
+
})), Object(external_this_wp_element_["createElement"])("rect", {
|
952 |
+
x: "64",
|
953 |
+
width: "32",
|
954 |
+
height: "32",
|
955 |
+
rx: "16",
|
956 |
+
fill: "#8E9196"
|
957 |
+
}), Object(external_this_wp_element_["createElement"])("mask", {
|
958 |
+
id: "cod-mask-2",
|
959 |
+
"mask-type": "alpha",
|
960 |
+
maskUnits: "userSpaceOnUse",
|
961 |
+
x: "76",
|
962 |
+
y: "9",
|
963 |
+
width: "8",
|
964 |
+
height: "14"
|
965 |
+
}, Object(external_this_wp_element_["createElement"])("path", {
|
966 |
+
d: "M80.2926 15.175C78.5901 14.7325 78.0426 14.275 78.0426 13.5625C78.0426 12.745 78.8001 12.175 80.0676 12.175C81.4026 12.175 81.8976 12.8125 81.9426 13.75H83.6001C83.5476 12.46 82.7601 11.275 81.1926 10.8925V9.25H78.9426V10.87C77.4876 11.185 76.3176 12.13 76.3176 13.5775C76.3176 15.31 77.7501 16.1725 79.8426 16.675C81.7176 17.125 82.0926 17.785 82.0926 18.4825C82.0926 19 81.7251 19.825 80.0676 19.825C78.5226 19.825 77.9151 19.135 77.8326 18.25H76.1826C76.2726 19.8925 77.5026 20.815 78.9426 21.1225V22.75H81.1926V21.1375C82.6551 20.86 83.8176 20.0125 83.8176 18.475C83.8176 16.345 81.9951 15.6175 80.2926 15.175Z",
|
967 |
+
fill: "white"
|
968 |
+
})), Object(external_this_wp_element_["createElement"])("g", {
|
969 |
+
mask: "url(#cod-mask-2)"
|
970 |
+
}, Object(external_this_wp_element_["createElement"])("rect", {
|
971 |
+
x: "71",
|
972 |
+
y: "7",
|
973 |
+
width: "18",
|
974 |
+
height: "18",
|
975 |
+
fill: "white"
|
976 |
+
})));
|
977 |
+
});
|
978 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/images/wcpay.js
|
979 |
+
|
980 |
+
/* harmony default export */ var wcpay = (function () {
|
981 |
+
return Object(external_this_wp_element_["createElement"])("svg", {
|
982 |
+
width: "100",
|
983 |
+
height: "64",
|
984 |
+
viewBox: "-10 0 120 64",
|
985 |
+
fill: "none",
|
986 |
+
xmlns: "http://www.w3.org/2000/svg"
|
987 |
+
}, Object(external_this_wp_element_["createElement"])("path", {
|
988 |
+
fillRule: "evenodd",
|
989 |
+
clipRule: "evenodd",
|
990 |
+
d: "M9.78073 0.5H91.1787C96.3299 0.5 100.5 4.77335 100.5 10.0522V41.8929C100.5 47.1717 96.3299 51.4451 91.1787 51.4451H61.9883L65.9948 61.5L48.3742 51.4451H9.82161C4.67036 51.4451 0.500298 47.1717 0.500298 41.8929V10.0522C0.459415 4.81524 4.62947 0.5 9.78073 0.5Z",
|
991 |
+
fill: "#7F54B3"
|
992 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
993 |
+
d: "M5.48791 9.1725C6.06028 8.37648 6.91882 7.95752 8.06354 7.87373C10.1486 7.70615 11.3342 8.71165 11.6204 10.8902C12.8877 19.6464 14.2778 27.0619 15.7495 33.1368L24.7029 15.6663C25.5206 14.0743 26.5426 13.2364 27.7691 13.1526C29.568 13.0269 30.6718 14.2 31.1215 16.6718C32.1436 22.2439 33.4519 26.9781 35.0054 31.0001C36.0684 20.3586 37.8672 12.6917 40.402 7.95753C41.0152 6.78445 41.9146 6.19791 43.1002 6.11412C44.0405 6.03033 44.8991 6.3236 45.6759 6.95203C46.4526 7.58047 46.8615 8.37648 46.9432 9.34008C46.9841 10.0942 46.8615 10.7226 46.5344 11.3511C44.94 14.3676 43.6317 19.4369 42.5688 26.4754C41.5467 33.3044 41.1787 38.6251 41.424 42.4376C41.5058 43.485 41.3423 44.4067 40.9334 45.2027C40.4428 46.1244 39.707 46.6272 38.7666 46.711C37.7037 46.7948 36.5998 46.292 35.5369 45.1608C31.7348 41.1807 28.7094 35.2316 26.5018 27.3133C23.8444 32.6759 21.882 36.6979 20.6146 39.3792C18.2025 44.1134 16.1584 46.5434 14.4413 46.6691C13.3374 46.7529 12.3971 45.7893 11.5795 43.7783C9.49445 38.2899 7.24589 27.6904 4.83379 11.9795C4.71114 10.8902 4.91555 9.92662 5.48791 9.1725Z",
|
994 |
+
fill: "white"
|
995 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
996 |
+
d: "M93.3864 15.7499C91.9146 13.1105 89.7478 11.5185 86.8451 10.89C86.0683 10.7225 85.3324 10.6387 84.6374 10.6387C80.7127 10.6387 77.5238 12.7335 75.0299 16.923C72.904 20.4841 71.8411 24.4223 71.8411 28.7376C71.8411 31.9635 72.4952 34.7286 73.8034 37.0329C75.2752 39.6723 77.442 41.2644 80.3447 41.8928C81.1215 42.0604 81.8574 42.1442 82.5524 42.1442C86.518 42.1442 89.7069 40.0494 92.1599 35.8598C94.2858 32.2568 95.3488 28.3186 95.3488 24.0034C95.3488 20.7355 94.6946 18.0123 93.3864 15.7499ZM88.2351 27.355C87.6628 30.1201 86.6407 32.173 85.128 33.5556C83.9424 34.6449 82.8386 35.1057 81.8165 34.8962C80.8353 34.6868 80.0177 33.8069 79.4044 32.173C78.9138 30.8742 78.6685 29.5755 78.6685 28.3605C78.6685 27.3131 78.7503 26.2657 78.9547 25.3021C79.3226 23.5844 80.0177 21.9086 81.1215 20.3166C82.4706 18.2637 83.9015 17.4258 85.3733 17.719C86.3545 17.9285 87.1722 18.8083 87.7854 20.4422C88.276 21.741 88.5213 23.0398 88.5213 24.2547C88.5213 25.344 88.3987 26.3914 88.2351 27.355Z",
|
997 |
+
fill: "white"
|
998 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
999 |
+
d: "M67.7528 15.7499C66.281 13.1105 64.0734 11.5185 61.2116 10.89C60.4348 10.7225 59.6989 10.6387 59.0039 10.6387C55.0791 10.6387 51.8903 12.7335 49.3964 16.923C47.2705 20.4841 46.2075 24.4223 46.2075 28.7376C46.2075 31.9635 46.8616 34.7286 48.1699 37.0329C49.6417 39.6723 51.8085 41.2644 54.7112 41.8928C55.488 42.0604 56.2238 42.1442 56.9189 42.1442C60.8845 42.1442 64.0734 40.0494 66.5263 35.8598C68.6523 32.2568 69.7152 28.3186 69.7152 24.0034C69.7152 20.7355 69.0611 18.0123 67.7528 15.7499ZM62.6016 27.355C62.0292 30.1201 61.0071 32.173 59.4945 33.5556C58.3089 34.6449 57.205 35.1057 56.183 34.8962C55.2018 34.6868 54.3841 33.8069 53.7709 32.173C53.2803 30.8742 53.035 29.5755 53.035 28.3605C53.035 27.3131 53.1167 26.2657 53.3212 25.3021C53.6891 23.5844 54.3841 21.9086 55.4879 20.3166C56.8371 18.2637 58.268 17.4258 59.7398 17.719C60.721 17.9285 61.5386 18.8083 62.1519 20.4422C62.6425 21.741 62.8878 23.0398 62.8878 24.2547C62.8878 25.344 62.806 26.3914 62.6016 27.355Z",
|
1000 |
+
fill: "white"
|
1001 |
+
}));
|
1002 |
+
});
|
1003 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/images/razorpay.js
|
1004 |
+
|
1005 |
+
/* harmony default export */ var razorpay = (function () {
|
1006 |
+
return Object(external_this_wp_element_["createElement"])("svg", {
|
1007 |
+
xmlns: "http://www.w3.org/2000/svg",
|
1008 |
+
width: "100",
|
1009 |
+
height: "24",
|
1010 |
+
fill: "#072654",
|
1011 |
+
viewBox: "0 0 1896 401"
|
1012 |
+
}, Object(external_this_wp_element_["createElement"])("path", {
|
1013 |
+
fill: "#3395FF",
|
1014 |
+
d: "M122.63 105.7l-15.75 57.97 90.15-58.3-58.96 219.98 59.88.05L285.05.48"
|
1015 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
1016 |
+
d: "M25.6 232.92L.8 325.4h122.73l50.22-188.13L25.6 232.92m426.32-81.42c-3 11.15-8.78 19.34-17.4 24.57-8.6 5.22-20.67 7.84-36.25 7.84h-49.5l17.38-64.8h49.5c15.56 0 26.25 2.6 32.05 7.9 5.8 5.3 7.2 13.4 4.22 24.6m51.25-1.4c6.3-23.4 3.7-41.4-7.82-54-11.5-12.5-31.68-18.8-60.48-18.8H324.4l-66.5 248.1h53.67l26.8-100h35.2c7.9 0 14.12 1.3 18.66 3.8 4.55 2.6 7.22 7.1 8.04 13.6l9.58 82.6h57.5l-9.32-77c-1.9-17.2-9.77-27.3-23.6-30.3 17.63-5.1 32.4-13.6 44.3-25.4a92.6 92.6 0 0 0 24.44-42.5m130.46 86.4c-4.5 16.8-11.4 29.5-20.73 38.4-9.34 8.9-20.5 13.3-33.52 13.3-13.26 0-22.25-4.3-27-13-4.76-8.7-4.92-21.3-.5-37.8 4.42-16.5 11.47-29.4 21.17-38.7 9.7-9.3 21.04-13.95 34.06-13.95 13 0 21.9 4.5 26.4 13.43 4.6 8.97 4.7 21.8.2 38.5zm23.52-87.8l-6.72 25.1c-2.9-9-8.53-16.2-16.85-21.6-8.34-5.3-18.66-8-30.97-8-15.1 0-29.6 3.9-43.5 11.7-13.9 7.8-26.1 18.8-36.5 33-10.4 14.2-18 30.3-22.9 48.4-4.8 18.2-5.8 34.1-2.9 47.9 3 13.9 9.3 24.5 19 31.9 9.8 7.5 22.3 11.2 37.6 11.2a82.4 82.4 0 0 0 35.2-7.7 82.11 82.11 0 0 0 28.4-21.2l-7 26.16h51.9L709.3 149h-52zm238.65 0H744.87l-10.55 39.4h87.82l-116.1 100.3-9.92 37h155.8l10.55-39.4h-94.1l117.88-101.8m142.4 52c-4.67 17.4-11.6 30.48-20.75 39-9.15 8.6-20.23 12.9-33.24 12.9-27.2 0-36.14-17.3-26.86-51.9 4.6-17.2 11.56-30.13 20.86-38.84 9.3-8.74 20.57-13.1 33.82-13.1 13 0 21.78 4.33 26.3 13.05 4.52 8.7 4.48 21.67-.13 38.87m30.38-80.83c-11.95-7.44-27.2-11.16-45.8-11.16-18.83 0-36.26 3.7-52.3 11.1a113.09 113.09 0 0 0-41 32.06c-11.3 13.9-19.43 30.2-24.42 48.8-4.9 18.53-5.5 34.8-1.7 48.73 3.8 13.9 11.8 24.6 23.8 32 12.1 7.46 27.5 11.17 46.4 11.17 18.6 0 35.9-3.74 51.8-11.18 15.9-7.48 29.5-18.1 40.8-32.1 11.3-13.94 19.4-30.2 24.4-48.8 5-18.6 5.6-34.84 1.8-48.8-3.8-13.9-11.7-24.6-23.6-32.05m185.1 40.8l13.3-48.1c-4.5-2.3-10.4-3.5-17.8-3.5-11.9 0-23.3 2.94-34.3 8.9-9.46 5.06-17.5 12.2-24.3 21.14l6.9-25.9-15.07.06h-37l-47.7 176.7h52.63l24.75-92.37c3.6-13.43 10.08-24 19.43-31.5 9.3-7.53 20.9-11.3 34.9-11.3 8.6 0 16.6 1.97 24.2 5.9m146.5 41.1c-4.5 16.5-11.3 29.1-20.6 37.8-9.3 8.74-20.5 13.1-33.5 13.1s-21.9-4.4-26.6-13.2c-4.8-8.85-4.9-21.6-.4-38.36 4.5-16.75 11.4-29.6 20.9-38.5 9.5-8.97 20.7-13.45 33.7-13.45 12.8 0 21.4 4.6 26 13.9 4.6 9.3 4.7 22.2.28 38.7m36.8-81.4c-9.75-7.8-22.2-11.7-37.3-11.7-13.23 0-25.84 3-37.8 9.06-11.95 6.05-21.65 14.3-29.1 24.74l.18-1.2 8.83-28.1h-51.4l-13.1 48.9-.4 1.7-54 201.44h52.7l27.2-101.4c2.7 9.02 8.2 16.1 16.6 21.22 8.4 5.1 18.77 7.63 31.1 7.63 15.3 0 29.9-3.7 43.75-11.1 13.9-7.42 25.9-18.1 36.1-31.9 10.2-13.8 17.77-29.8 22.6-47.9 4.9-18.13 5.9-34.3 3.1-48.45-2.85-14.17-9.16-25.14-18.9-32.9m174.65 80.65c-4.5 16.7-11.4 29.5-20.7 38.3-9.3 8.86-20.5 13.27-33.5 13.27-13.3 0-22.3-4.3-27-13-4.8-8.7-4.9-21.3-.5-37.8 4.4-16.5 11.42-29.4 21.12-38.7 9.7-9.3 21.05-13.94 34.07-13.94 13 0 21.8 4.5 26.4 13.4 4.6 8.93 4.63 21.76.15 38.5zm23.5-87.85l-6.73 25.1c-2.9-9.05-8.5-16.25-16.8-21.6-8.4-5.34-18.7-8-31-8-15.1 0-29.68 3.9-43.6 11.7-13.9 7.8-26.1 18.74-36.5 32.9-10.4 14.16-18 30.3-22.9 48.4-4.85 18.17-5.8 34.1-2.9 47.96 2.93 13.8 9.24 24.46 19 31.9 9.74 7.4 22.3 11.14 37.6 11.14 12.3 0 24.05-2.56 35.2-7.7a82.3 82.3 0 0 0 28.33-21.23l-7 26.18h51.9l47.38-176.7h-51.9zm269.87.06l.03-.05h-31.9c-1.02 0-1.92.05-2.85.07h-16.55l-8.5 11.8-2.1 2.8-.9 1.4-67.25 93.68-13.9-109.7h-55.08l27.9 166.7-61.6 85.3h54.9l14.9-21.13c.42-.62.8-1.14 1.3-1.8l17.4-24.7.5-.7 77.93-110.5 65.7-93 .1-.06h-.03z"
|
1017 |
+
}));
|
1018 |
+
});
|
1019 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/images/mollie.js
|
1020 |
+
|
1021 |
+
var mollie_MollieLogo = function MollieLogo() {
|
1022 |
+
return Object(external_this_wp_element_["createElement"])("svg", {
|
1023 |
+
fill: "none",
|
1024 |
+
viewBox: "0 0 677 200",
|
1025 |
+
width: "100",
|
1026 |
+
xmlns: "http://www.w3.org/2000/svg"
|
1027 |
+
}, Object(external_this_wp_element_["createElement"])("g", {
|
1028 |
+
fill: "#000"
|
1029 |
+
}, Object(external_this_wp_element_["createElement"])("path", {
|
1030 |
+
clipRule: "evenodd",
|
1031 |
+
d: "m286.342 65.3132c-37.175 0-67.35 30.2415-67.35 67.3438 0 37.101 30.245 67.343 67.35 67.343 37.106 0 67.35-30.242 67.35-67.343 0-37.1023-30.174-67.3438-67.35-67.3438zm0 102.8348c-19.533 0-35.425-15.89-35.425-35.421s15.892-35.4222 35.425-35.4222 35.426 15.8912 35.426 35.4222-15.893 35.421-35.426 35.421z",
|
1032 |
+
fillRule: "evenodd"
|
1033 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
1034 |
+
d: "m510.375 42.0021c11.6 0 21.003-9.4025 21.003-21.0011 0-11.59851-9.403-21.001-21.003-21.001-11.599 0-21.003 9.40249-21.003 21.001 0 11.5986 9.404 21.0011 21.003 21.0011z"
|
1035 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
1036 |
+
clipRule: "evenodd",
|
1037 |
+
d: "m148.842 65.3833c-1.75-.14-3.431-.21-5.181-.21-16.242 0-31.644 6.6503-42.706 18.4109-11.0617-11.6906-26.394-18.4109-42.4964-18.4109-32.2047 0-58.4586 26.1813-58.4586 58.3827v73.714h31.5047v-72.804c0-13.37 10.9916-25.691 23.9435-27.0211.9101-.07 1.8203-.14 2.6604-.14 14.5621 0 26.4639 11.9001 26.5339 26.4611v73.504h32.2045v-72.944c0-13.3 10.922-25.621 23.944-26.9511.91-.07 1.82-.14 2.66-.14 14.562 0 26.534 11.8301 26.604 26.3211v73.714h32.205v-72.804c0-14.77-5.461-28.9812-15.332-39.9717-9.872-11.0606-23.384-17.8509-38.086-19.111z",
|
1038 |
+
fillRule: "evenodd"
|
1039 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
1040 |
+
d: "m403.26 3.15015h-32.205v194.25985h32.205z"
|
1041 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
1042 |
+
d: "m464.869 3.15015h-32.205v194.25985h32.205z"
|
1043 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
1044 |
+
d: "m526.478 68.5334h-32.205v128.8066h32.205z"
|
1045 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
1046 |
+
clipRule: "evenodd",
|
1047 |
+
d: "m677 129.646c0-17.08-6.651-33.1812-18.693-45.4318-12.112-12.2506-28.074-19.0409-45.086-19.0409-.28 0-.561 0-.841 0-17.642.21-34.305 7.2103-46.766 19.741-12.462 12.5306-19.463 29.1217-19.673 46.8327-.21 18.06 6.721 35.141 19.533 48.092 12.811 12.951 29.754 20.091 47.817 20.091h.07c23.663 0 45.856-12.671 57.968-33.042l1.54-2.59-26.604-13.09-1.33 2.17c-6.651 10.99-18.202 17.501-31.014 17.501-16.383 0-30.525-10.921-34.866-26.462h97.945zm-65.04-35.2113c14.703 0 27.864 9.6603 32.485 23.3813h-64.899c4.55-13.721 17.712-23.3813 32.414-23.3813z",
|
1048 |
+
fillRule: "evenodd"
|
1049 |
+
})));
|
1050 |
+
};
|
1051 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/images/payu-india.js
|
1052 |
+
|
1053 |
+
var payu_india_PayUIndiaLogo = function PayUIndiaLogo() {
|
1054 |
+
return Object(external_this_wp_element_["createElement"])("svg", {
|
1055 |
+
xmlns: "http://www.w3.org/2000/svg",
|
1056 |
+
viewBox: "0 0 385.61334 192.41333",
|
1057 |
+
width: "100"
|
1058 |
+
}, Object(external_this_wp_element_["createElement"])("g", {
|
1059 |
+
transform: "matrix(1.3333333,0,0,-1.3333333,0,192.41333)"
|
1060 |
+
}, Object(external_this_wp_element_["createElement"])("g", {
|
1061 |
+
transform: "scale(0.1)",
|
1062 |
+
id: "g12"
|
1063 |
+
}, Object(external_this_wp_element_["createElement"])("path", {
|
1064 |
+
style: {
|
1065 |
+
fill: '#90cc23',
|
1066 |
+
fillOpacity: 1,
|
1067 |
+
fillRule: 'nonzero',
|
1068 |
+
stroke: 'none'
|
1069 |
+
},
|
1070 |
+
d: "m 2507.22,898.414 c -18.79,0 -34.01,15.234 -34,34.024 l 0.05,150.352 h -12.54 c -77.78,0 -106.71,-12.83 -106.71,-83.685 V 833.316 c -0.01,-0.351 -0.05,-0.703 -0.05,-1.054 v -36.34 c -0.02,-1.258 -0.1,-2.43 -0.1,-3.731 V 560.543 c 0,-28.293 -5.45,-50.82 -16.7,-68.32 -21.21,-32.676 -63.2,-47.532 -130.38,-47.618 -67.15,0.086 -109.13,14.93 -130.34,47.579 -11.28,17.507 -16.74,40.046 -16.74,68.359 v 231.648 c 0,1.301 -0.07,2.473 -0.09,3.731 v 36.34 c 0,0.351 -0.04,0.703 -0.05,1.054 v 165.789 c 0,70.855 -28.93,83.685 -106.71,83.685 h -24.49 c -77.79,0 -106.71,-12.83 -106.71,-83.685 V 832.262 656.723 560.543 c 0,-70.547 15.91,-130.281 46.65,-178.434 59.37,-93.3 174.38,-142.988 337.88,-142.988 0.2,0 0.4,0.008 0.6,0.008 0.21,0 0.4,-0.008 0.61,-0.008 163.5,0 278.51,49.688 337.88,142.988 30.74,48.153 46.65,107.887 46.65,178.434 v 96.18 175.539 66.121 l -84.71,0.031"
|
1071 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
1072 |
+
style: {
|
1073 |
+
fill: '#90cc23',
|
1074 |
+
fillOpacity: 1,
|
1075 |
+
fillRule: 'nonzero',
|
1076 |
+
stroke: 'none'
|
1077 |
+
},
|
1078 |
+
d: "m 2866.82,1140.67 -127.94,0.05 c -13.95,0 -25.26,11.32 -25.25,25.27 l 0.04,129.52 c 0.01,13.96 11.33,25.27 25.28,25.27 l 127.93,-0.05 c 13.96,0 25.27,-11.32 25.27,-25.28 l -0.05,-129.52 c 0,-13.95 -11.32,-25.26 -25.28,-25.26"
|
1079 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
1080 |
+
style: {
|
1081 |
+
fill: '#90cc23',
|
1082 |
+
fillOpacity: 1,
|
1083 |
+
fillRule: 'nonzero',
|
1084 |
+
stroke: 'none'
|
1085 |
+
},
|
1086 |
+
d: "m 2696.34,1320.76 -86.89,0.03 c -9.48,0.01 -17.16,7.69 -17.16,17.16 l 0.03,87.97 c 0.01,9.49 7.7,17.16 17.17,17.16 l 86.89,-0.03 c 9.48,0 17.16,-7.69 17.16,-17.17 l -0.03,-87.97 c -0.01,-9.48 -7.69,-17.15 -17.17,-17.15"
|
1087 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
1088 |
+
style: {
|
1089 |
+
fill: '#90cc23',
|
1090 |
+
fillOpacity: 1,
|
1091 |
+
fillRule: 'nonzero',
|
1092 |
+
stroke: 'none'
|
1093 |
+
},
|
1094 |
+
d: "m 496.59,815.961 c 0,-104.07 -26.574,-160.469 -166.75,-160.469 H 114.059 v 268.586 c 0,37.246 13.847,51.094 51.089,51.094 H 329.84 c 105.605,0 166.75,-26.055 166.75,-159.211 z M 329.84,1082.95 H 143.77 C 44.3438,1082.95 0.00390625,1038.6 0.00390625,939.164 V 300.512 C 0.00390625,262.102 12.332,249.77 50.7422,249.77 h 12.5742 c 38.4136,0 50.7426,12.332 50.7426,50.742 V 548.98 H 329.84 c 191.582,0 280.812,84.844 280.812,266.981 0,182.148 -89.23,266.989 -280.812,266.989"
|
1095 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
1096 |
+
style: {
|
1097 |
+
fill: '#90cc23',
|
1098 |
+
fillOpacity: 1,
|
1099 |
+
fillRule: 'nonzero',
|
1100 |
+
stroke: 'none'
|
1101 |
+
},
|
1102 |
+
d: "m 1012.01,536.82 v -87.547 c 0,-71.375 -26.455,-112.695 -161.721,-112.695 -89.359,0 -132.801,32.344 -132.801,98.863 0,72.954 43.578,101.379 155.434,101.379 z M 850.289,899.801 c -73.738,0 -119.949,-9.25 -137.476,-12.754 -31.036,-6.75 -44.012,-15.266 -44.012,-50.559 V 826.43 c 0,-13.828 2.047,-23.407 6.441,-30.145 5.113,-7.851 13.348,-11.836 24.488,-11.836 5.434,0 11.727,0.918 19.243,2.793 17.722,4.434 74.379,13.594 136.347,13.594 111.297,0 156.69,-30.832 156.69,-106.406 V 626.988 H 871.66 c -180.422,0 -264.461,-60.859 -264.461,-191.547 0,-126.761 86.778,-196.57 244.352,-196.57 187.249,0 270.749,63.719 270.749,206.633 V 694.43 c 0,138.191 -88.97,205.371 -272.011,205.371"
|
1103 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
1104 |
+
style: {
|
1105 |
+
fill: '#90cc23',
|
1106 |
+
fillOpacity: 1,
|
1107 |
+
fillRule: 'nonzero',
|
1108 |
+
stroke: 'none'
|
1109 |
+
},
|
1110 |
+
d: "m 1739.43,870.035 c -7.95,9.981 -22.98,11.356 -38.05,11.356 h -11.3 c -37.55,0 -52.28,-11.582 -60.59,-47.606 L 1525.15,400.078 c -13.02,-53.297 -31.32,-63.039 -62.63,-63.039 -38.34,0 -53.69,9.152 -68.97,63.25 l -118.18,433.699 c -9.78,36.328 -24.21,47.403 -61.77,47.403 h -10.06 c -15.16,0 -30.26,-1.395 -38.01,-11.504 -7.76,-10.125 -5.14,-25.235 -1.14,-40.086 L 1283.82,392.34 c 22.4,-83.719 49.03,-153.02 148.53,-153.02 18.57,0 35.75,2.578 50.04,7.399 -30.18,-94.91 -60.88,-136.77 -151.41,-146.071 -18.37,-1.5269 -30.31,-4.1597 -36.96,-13.0777 -6.91,-9.25 -5.34,-22.5 -2.87,-34.332 l 2.49,-11.2188 C 1299.04,16.0781 1308.25,0 1337.37,0 c 3.06,0 6.35,0.160156 9.88,0.460938 C 1482.43,9.30859 1554.86,82.0898 1597.24,251.66 l 144.62,578.453 c 3.43,14.844 5.5,29.95 -2.43,39.922"
|
1111 |
+
}), Object(external_this_wp_element_["createElement"])("path", {
|
1112 |
+
style: {
|
1113 |
+
fill: '#90cc23',
|
1114 |
+
fillOpacity: 1,
|
1115 |
+
fillRule: 'nonzero',
|
1116 |
+
stroke: 'none'
|
1117 |
+
},
|
1118 |
+
d: "m 2679.57,1140.78 -172.26,0.06 c -18.79,0 -34.02,-15.23 -34.03,-34.02 l -0.01,-24.03 h 11.95 c 77.78,0 106.71,-12.83 106.71,-83.685 V 898.383 l 87.55,-0.028 c 18.79,-0.011 34.02,15.215 34.03,34.004 l 0.06,174.381 c 0,18.79 -15.22,34.03 -34,34.04"
|
1119 |
+
}))));
|
1120 |
+
};
|
1121 |
+
// EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
|
1122 |
+
var external_this_wp_apiFetch_ = __webpack_require__(26);
|
1123 |
+
var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
|
1124 |
+
|
1125 |
+
// EXTERNAL MODULE: external {"this":["wc","navigation"]}
|
1126 |
+
var external_this_wc_navigation_ = __webpack_require__(21);
|
1127 |
+
|
1128 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/stripe.js
|
1129 |
+
|
1130 |
+
|
1131 |
+
|
1132 |
+
|
1133 |
+
|
1134 |
+
|
1135 |
+
|
1136 |
+
|
1137 |
+
|
1138 |
+
|
1139 |
+
|
1140 |
+
|
1141 |
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
1142 |
+
|
1143 |
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
1144 |
+
|
1145 |
+
function stripe_createSuper(Derived) { var hasNativeReflectConstruct = stripe_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
1146 |
+
|
1147 |
+
function stripe_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
1148 |
+
|
1149 |
/**
|
1150 |
+
* External dependencies
|
1151 |
*/
|
1152 |
|
1153 |
|
1154 |
+
|
1155 |
+
|
1156 |
+
|
1157 |
+
|
1158 |
+
|
1159 |
+
|
1160 |
+
|
1161 |
+
|
1162 |
+
|
1163 |
+
|
1164 |
+
var stripe_Stripe = /*#__PURE__*/function (_Component) {
|
1165 |
+
inherits_default()(Stripe, _Component);
|
1166 |
+
|
1167 |
+
var _super = stripe_createSuper(Stripe);
|
1168 |
+
|
1169 |
+
function Stripe(props) {
|
1170 |
+
var _this;
|
1171 |
+
|
1172 |
+
classCallCheck_default()(this, Stripe);
|
1173 |
+
|
1174 |
+
_this = _super.call(this, props);
|
1175 |
+
_this.state = {
|
1176 |
+
oAuthConnectFailed: false,
|
1177 |
+
connectURL: null,
|
1178 |
+
isPending: false
|
1179 |
+
};
|
1180 |
+
_this.updateSettings = _this.updateSettings.bind(assertThisInitialized_default()(_this));
|
1181 |
+
return _this;
|
1182 |
+
}
|
1183 |
+
|
1184 |
+
createClass_default()(Stripe, [{
|
1185 |
+
key: "componentDidMount",
|
1186 |
+
value: function componentDidMount() {
|
1187 |
+
var oAuthConnectFailed = this.state.oAuthConnectFailed;
|
1188 |
+
var stripeSettings = this.props.stripeSettings;
|
1189 |
+
var query = Object(external_this_wc_navigation_["getQuery"])(); // Handle redirect back from Stripe.
|
1190 |
+
|
1191 |
+
if (query['stripe-connect'] && query['stripe-connect'] === '1') {
|
1192 |
+
var isStripeConnected = stripeSettings.publishable_key && stripeSettings.secret_key;
|
1193 |
+
|
1194 |
+
if (isStripeConnected) {
|
1195 |
+
this.completeMethod();
|
1196 |
+
return;
|
1197 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1198 |
}
|
1199 |
+
|
1200 |
+
if (!oAuthConnectFailed) {
|
1201 |
+
this.fetchOAuthConnectURL();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1202 |
}
|
1203 |
+
}
|
1204 |
+
}, {
|
1205 |
+
key: "componentDidUpdate",
|
1206 |
+
value: function componentDidUpdate(prevProps) {
|
1207 |
+
var activePlugins = this.props.activePlugins;
|
1208 |
+
|
1209 |
+
if (!prevProps.activePlugins.includes('woocommerce-gateway-stripe') && activePlugins.includes('woocommerce-gateway-stripe')) {
|
1210 |
+
this.fetchOAuthConnectURL();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1211 |
}
|
1212 |
+
}
|
1213 |
+
}, {
|
1214 |
+
key: "completeMethod",
|
1215 |
+
value: function completeMethod() {
|
1216 |
+
var _this$props = this.props,
|
1217 |
+
createNotice = _this$props.createNotice,
|
1218 |
+
markConfigured = _this$props.markConfigured;
|
1219 |
+
this.setState({
|
1220 |
+
isPending: false
|
1221 |
+
});
|
1222 |
+
createNotice('success', Object(external_this_wp_i18n_["__"])('Stripe connected successfully.', 'woocommerce-admin'));
|
1223 |
+
markConfigured('stripe');
|
1224 |
+
}
|
1225 |
+
}, {
|
1226 |
+
key: "fetchOAuthConnectURL",
|
1227 |
+
value: function () {
|
1228 |
+
var _fetchOAuthConnectURL = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
1229 |
+
var activePlugins, result;
|
1230 |
+
return regenerator_default.a.wrap(function _callee$(_context) {
|
1231 |
+
while (1) {
|
1232 |
+
switch (_context.prev = _context.next) {
|
1233 |
+
case 0:
|
1234 |
+
activePlugins = this.props.activePlugins;
|
1235 |
+
|
1236 |
+
if (activePlugins.includes('woocommerce-gateway-stripe')) {
|
1237 |
+
_context.next = 3;
|
1238 |
+
break;
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
return _context.abrupt("return");
|
1242 |
+
|
1243 |
+
case 3:
|
1244 |
+
_context.prev = 3;
|
1245 |
+
this.setState({
|
1246 |
+
isPending: true
|
1247 |
+
});
|
1248 |
+
_context.next = 7;
|
1249 |
+
return external_this_wp_apiFetch_default()({
|
1250 |
+
path: external_this_wc_data_["WCS_NAMESPACE"] + '/connect/stripe/oauth/init',
|
1251 |
+
method: 'POST',
|
1252 |
+
data: {
|
1253 |
+
returnUrl: Object(wc_admin_settings["f" /* getAdminLink */])('admin.php?page=wc-admin&task=payments&method=stripe&stripe-connect=1')
|
1254 |
+
}
|
1255 |
+
});
|
1256 |
+
|
1257 |
+
case 7:
|
1258 |
+
result = _context.sent;
|
1259 |
+
|
1260 |
+
if (!(!result || !result.oauthUrl)) {
|
1261 |
+
_context.next = 11;
|
1262 |
+
break;
|
1263 |
+
}
|
1264 |
+
|
1265 |
+
this.setState({
|
1266 |
+
oAuthConnectFailed: true,
|
1267 |
+
isPending: false
|
1268 |
+
});
|
1269 |
+
return _context.abrupt("return");
|
1270 |
+
|
1271 |
+
case 11:
|
1272 |
+
this.setState({
|
1273 |
+
connectURL: result.oauthUrl,
|
1274 |
+
isPending: false
|
1275 |
+
});
|
1276 |
+
_context.next = 17;
|
1277 |
+
break;
|
1278 |
+
|
1279 |
+
case 14:
|
1280 |
+
_context.prev = 14;
|
1281 |
+
_context.t0 = _context["catch"](3);
|
1282 |
+
this.setState({
|
1283 |
+
oAuthConnectFailed: true,
|
1284 |
+
isPending: false
|
1285 |
+
});
|
1286 |
+
|
1287 |
+
case 17:
|
1288 |
+
case "end":
|
1289 |
+
return _context.stop();
|
1290 |
+
}
|
1291 |
+
}
|
1292 |
+
}, _callee, this, [[3, 14]]);
|
1293 |
+
}));
|
1294 |
+
|
1295 |
+
function fetchOAuthConnectURL() {
|
1296 |
+
return _fetchOAuthConnectURL.apply(this, arguments);
|
1297 |
}
|
1298 |
+
|
1299 |
+
return fetchOAuthConnectURL;
|
1300 |
+
}()
|
1301 |
+
}, {
|
1302 |
+
key: "renderConnectButton",
|
1303 |
+
value: function renderConnectButton() {
|
1304 |
+
var connectURL = this.state.connectURL;
|
1305 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
1306 |
+
isPrimary: true,
|
1307 |
+
href: connectURL
|
1308 |
+
}, Object(external_this_wp_i18n_["__"])('Connect', 'woocommerce-admin'));
|
1309 |
+
}
|
1310 |
+
}, {
|
1311 |
+
key: "updateSettings",
|
1312 |
+
value: function () {
|
1313 |
+
var _updateSettings = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee2(values) {
|
1314 |
+
var _objectSpread2;
|
1315 |
+
|
1316 |
+
var _this$props2, updateOptions, stripeSettings, createNotice, prefix, update;
|
1317 |
+
|
1318 |
+
return regenerator_default.a.wrap(function _callee2$(_context2) {
|
1319 |
+
while (1) {
|
1320 |
+
switch (_context2.prev = _context2.next) {
|
1321 |
+
case 0:
|
1322 |
+
_this$props2 = this.props, updateOptions = _this$props2.updateOptions, stripeSettings = _this$props2.stripeSettings, createNotice = _this$props2.createNotice;
|
1323 |
+
prefix = values.publishable_key.match(/^pk_live_/) ? '' : 'test_';
|
1324 |
+
_context2.next = 4;
|
1325 |
+
return updateOptions({
|
1326 |
+
woocommerce_stripe_settings: _objectSpread(_objectSpread({}, stripeSettings), {}, (_objectSpread2 = {}, defineProperty_default()(_objectSpread2, prefix + 'publishable_key', values.publishable_key), defineProperty_default()(_objectSpread2, prefix + 'secret_key', values.secret_key), defineProperty_default()(_objectSpread2, "testmode", prefix === 'test_' ? 'yes' : 'no'), defineProperty_default()(_objectSpread2, "enabled", 'yes'), _objectSpread2))
|
1327 |
+
});
|
1328 |
+
|
1329 |
+
case 4:
|
1330 |
+
update = _context2.sent;
|
1331 |
+
|
1332 |
+
if (update.success) {
|
1333 |
+
this.completeMethod();
|
1334 |
+
} else {
|
1335 |
+
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings', 'woocommerce-admin'));
|
1336 |
+
}
|
1337 |
+
|
1338 |
+
case 6:
|
1339 |
+
case "end":
|
1340 |
+
return _context2.stop();
|
1341 |
+
}
|
1342 |
+
}
|
1343 |
+
}, _callee2, this);
|
1344 |
+
}));
|
1345 |
+
|
1346 |
+
function updateSettings(_x) {
|
1347 |
+
return _updateSettings.apply(this, arguments);
|
1348 |
}
|
1349 |
+
|
1350 |
+
return updateSettings;
|
1351 |
+
}()
|
1352 |
+
}, {
|
1353 |
+
key: "getInitialConfigValues",
|
1354 |
+
value: function getInitialConfigValues() {
|
1355 |
+
return {
|
1356 |
+
publishable_key: '',
|
1357 |
+
secret_key: ''
|
1358 |
+
};
|
1359 |
+
}
|
1360 |
+
}, {
|
1361 |
+
key: "validateManualConfig",
|
1362 |
+
value: function validateManualConfig(values) {
|
1363 |
+
var errors = {};
|
1364 |
+
|
1365 |
+
if (values.publishable_key.match(/^pk_(live|test)_[a-zA-Z0-9_]+/) === null) {
|
1366 |
+
errors.publishable_key = Object(external_this_wp_i18n_["__"])('Please enter a valid publishable key (starting with "pk_").', 'woocommerce-admin');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1367 |
}
|
1368 |
+
|
1369 |
+
if (values.secret_key.match(/^[rs]k_(live|test)_[a-zA-Z0-9_]+/) === null) {
|
1370 |
+
errors.secret_key = Object(external_this_wp_i18n_["__"])('Please enter a valid secret key (starting with "sk_" or "rk_").', 'woocommerce-admin');
|
1371 |
+
} else if (values.secret_key.slice(3, 7) !== values.publishable_key.slice(3, 7)) {
|
1372 |
+
errors.secret_key = Object(external_this_wp_i18n_["__"])('Please enter a secret key in the same mode as the publishable key.', 'woocommerce-admin');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1373 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1374 |
|
1375 |
+
return errors;
|
1376 |
+
}
|
1377 |
+
}, {
|
1378 |
+
key: "renderManualConfig",
|
1379 |
+
value: function renderManualConfig() {
|
1380 |
+
var isOptionsUpdating = this.props.isOptionsUpdating;
|
1381 |
+
var stripeHelp = lib_default()({
|
1382 |
+
mixedString: Object(external_this_wp_i18n_["__"])('Your API details can be obtained from your {{docsLink}}Stripe account{{/docsLink}}. Don’t have a Stripe account? {{registerLink}}Create one.{{/registerLink}}', 'woocommerce-admin'),
|
1383 |
+
components: {
|
1384 |
+
docsLink: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
1385 |
+
href: "https://stripe.com/docs/keys",
|
1386 |
+
target: "_blank",
|
1387 |
+
type: "external"
|
1388 |
+
}),
|
1389 |
+
registerLink: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
1390 |
+
href: "https://dashboard.stripe.com/register",
|
1391 |
+
target: "_blank",
|
1392 |
+
type: "external"
|
1393 |
+
})
|
1394 |
+
}
|
1395 |
+
});
|
1396 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Form"], {
|
1397 |
+
initialValues: this.getInitialConfigValues(),
|
1398 |
+
onSubmitCallback: this.updateSettings,
|
1399 |
+
validate: this.validateManualConfig
|
1400 |
+
}, function (_ref) {
|
1401 |
+
var getInputProps = _ref.getInputProps,
|
1402 |
+
handleSubmit = _ref.handleSubmit;
|
1403 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
1404 |
+
label: Object(external_this_wp_i18n_["__"])('Publishable Key', 'woocommerce-admin'),
|
1405 |
+
required: true
|
1406 |
+
}, getInputProps('publishable_key'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
1407 |
+
label: Object(external_this_wp_i18n_["__"])('Secret Key', 'woocommerce-admin'),
|
1408 |
+
required: true
|
1409 |
+
}, getInputProps('secret_key'))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
1410 |
+
isPrimary: true,
|
1411 |
+
isBusy: isOptionsUpdating,
|
1412 |
+
onClick: handleSubmit
|
1413 |
+
}, Object(external_this_wp_i18n_["__"])('Proceed', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])("p", null, stripeHelp));
|
1414 |
+
});
|
1415 |
+
}
|
1416 |
+
}, {
|
1417 |
+
key: "renderOauthConfig",
|
1418 |
+
value: function renderOauthConfig() {
|
1419 |
+
var _this2 = this;
|
1420 |
+
|
1421 |
+
var tosPrompt = lib_default()({
|
1422 |
+
mixedString: Object(external_this_wp_i18n_["__"])('By clicking "Connect," you agree to the {{tosLink}}Terms of Service{{/tosLink}}. Or {{manualConfigLink}}manually enter your Stripe API details{{/manualConfigLink}} instead.', 'woocommerce-admin'),
|
1423 |
+
components: {
|
1424 |
+
tosLink: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
1425 |
+
href: "https://wordpress.com/tos",
|
1426 |
+
target: "_blank",
|
1427 |
+
type: "external"
|
1428 |
+
}),
|
1429 |
+
manualConfigLink: Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
1430 |
+
isLink: true,
|
1431 |
+
onClick: function onClick() {
|
1432 |
+
_this2.setState({
|
1433 |
+
connectURL: null
|
1434 |
+
});
|
1435 |
+
}
|
1436 |
+
})
|
1437 |
+
}
|
1438 |
+
});
|
1439 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("p", null, this.renderConnectButton()), tosPrompt);
|
1440 |
+
}
|
1441 |
+
}, {
|
1442 |
+
key: "getConnectStep",
|
1443 |
+
value: function getConnectStep() {
|
1444 |
+
var _this$state = this.state,
|
1445 |
+
connectURL = _this$state.connectURL,
|
1446 |
+
isPending = _this$state.isPending,
|
1447 |
+
oAuthConnectFailed = _this$state.oAuthConnectFailed;
|
1448 |
+
var connectStep = {
|
1449 |
+
key: 'connect',
|
1450 |
+
label: Object(external_this_wp_i18n_["__"])('Connect your Stripe account', 'woocommerce-admin')
|
1451 |
+
};
|
1452 |
+
|
1453 |
+
if (isPending) {
|
1454 |
+
return connectStep;
|
1455 |
+
}
|
1456 |
|
1457 |
+
if (!oAuthConnectFailed && connectURL) {
|
1458 |
+
return _objectSpread(_objectSpread({}, connectStep), {}, {
|
1459 |
+
description: Object(external_this_wp_i18n_["__"])('A Stripe account is required to process payments.', 'woocommerce-admin'),
|
1460 |
+
content: this.renderOauthConfig()
|
1461 |
+
});
|
1462 |
}
|
1463 |
+
|
1464 |
+
return _objectSpread(_objectSpread({}, connectStep), {}, {
|
1465 |
+
content: this.renderManualConfig()
|
1466 |
+
});
|
1467 |
+
}
|
1468 |
+
}, {
|
1469 |
+
key: "render",
|
1470 |
+
value: function render() {
|
1471 |
+
var _this$props3 = this.props,
|
1472 |
+
installStep = _this$props3.installStep,
|
1473 |
+
isOptionsUpdating = _this$props3.isOptionsUpdating;
|
1474 |
+
var isPending = this.state.isPending;
|
1475 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
1476 |
+
isVertical: true,
|
1477 |
+
isPending: !installStep.isComplete || isOptionsUpdating || isPending,
|
1478 |
+
currentStep: installStep.isComplete ? 'connect' : 'install',
|
1479 |
+
steps: [installStep, this.getConnectStep()]
|
1480 |
+
});
|
1481 |
}
|
1482 |
+
}]);
|
1483 |
+
|
1484 |
+
return Stripe;
|
1485 |
+
}(external_this_wp_element_["Component"]);
|
1486 |
+
|
1487 |
+
/* harmony default export */ var stripe = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
|
1488 |
+
var _select = select(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
1489 |
+
getOption = _select.getOption,
|
1490 |
+
isOptionsUpdating = _select.isOptionsUpdating;
|
1491 |
+
|
1492 |
+
var _select2 = select(external_this_wc_data_["PLUGINS_STORE_NAME"]),
|
1493 |
+
getActivePlugins = _select2.getActivePlugins;
|
1494 |
+
|
1495 |
+
return {
|
1496 |
+
activePlugins: getActivePlugins(),
|
1497 |
+
isOptionsUpdating: isOptionsUpdating(),
|
1498 |
+
stripeSettings: getOption('woocommerce_stripe_settings') || []
|
1499 |
+
};
|
1500 |
+
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
|
1501 |
+
var _dispatch = dispatch('core/notices'),
|
1502 |
+
createNotice = _dispatch.createNotice;
|
1503 |
+
|
1504 |
+
var _dispatch2 = dispatch(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
1505 |
+
updateOptions = _dispatch2.updateOptions;
|
1506 |
+
|
1507 |
+
return {
|
1508 |
+
createNotice: createNotice,
|
1509 |
+
updateOptions: updateOptions
|
1510 |
+
};
|
1511 |
+
}))(stripe_Stripe));
|
1512 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/square.js
|
1513 |
+
|
1514 |
+
|
1515 |
+
|
1516 |
+
|
1517 |
+
|
1518 |
+
|
1519 |
+
|
1520 |
+
|
1521 |
+
|
1522 |
+
|
1523 |
+
|
1524 |
+
function square_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
1525 |
+
|
1526 |
+
function square_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { square_ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { square_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
1527 |
+
|
1528 |
+
function square_createSuper(Derived) { var hasNativeReflectConstruct = square_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
1529 |
+
|
1530 |
+
function square_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
1531 |
+
|
1532 |
+
/**
|
1533 |
+
* External dependencies
|
1534 |
+
*/
|
1535 |
+
|
1536 |
+
|
1537 |
+
|
1538 |
+
|
1539 |
+
|
1540 |
+
|
1541 |
+
|
1542 |
+
|
1543 |
+
|
1544 |
+
|
1545 |
+
|
1546 |
+
var square_Square = /*#__PURE__*/function (_Component) {
|
1547 |
+
inherits_default()(Square, _Component);
|
1548 |
+
|
1549 |
+
var _super = square_createSuper(Square);
|
1550 |
+
|
1551 |
+
function Square(props) {
|
1552 |
+
var _this;
|
1553 |
+
|
1554 |
+
classCallCheck_default()(this, Square);
|
1555 |
+
|
1556 |
+
_this = _super.call(this, props);
|
1557 |
+
_this.state = {
|
1558 |
+
isPending: false
|
1559 |
+
};
|
1560 |
+
_this.connect = _this.connect.bind(assertThisInitialized_default()(_this));
|
1561 |
+
return _this;
|
1562 |
}
|
1563 |
+
|
1564 |
+
createClass_default()(Square, [{
|
1565 |
+
key: "componentDidMount",
|
1566 |
+
value: function componentDidMount() {
|
1567 |
+
var _this$props = this.props,
|
1568 |
+
createNotice = _this$props.createNotice,
|
1569 |
+
markConfigured = _this$props.markConfigured;
|
1570 |
+
var query = Object(external_this_wc_navigation_["getQuery"])(); // Handle redirect back from Square
|
1571 |
+
|
1572 |
+
if (query['square-connect']) {
|
1573 |
+
if (query['square-connect'] === '1') {
|
1574 |
+
createNotice('success', Object(external_this_wp_i18n_["__"])('Square connected successfully.', 'woocommerce-admin'));
|
1575 |
+
markConfigured('square');
|
1576 |
+
}
|
1577 |
+
}
|
1578 |
+
}
|
1579 |
+
}, {
|
1580 |
+
key: "connect",
|
1581 |
+
value: function () {
|
1582 |
+
var _connect = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
1583 |
+
var _this$props2, createNotice, hasCbdIndustry, options, updateOptions, errorMessage, newWindow, result;
|
1584 |
+
|
1585 |
+
return regenerator_default.a.wrap(function _callee$(_context) {
|
1586 |
+
while (1) {
|
1587 |
+
switch (_context.prev = _context.next) {
|
1588 |
+
case 0:
|
1589 |
+
_this$props2 = this.props, createNotice = _this$props2.createNotice, hasCbdIndustry = _this$props2.hasCbdIndustry, options = _this$props2.options, updateOptions = _this$props2.updateOptions;
|
1590 |
+
this.setState({
|
1591 |
+
isPending: true
|
1592 |
+
});
|
1593 |
+
updateOptions({
|
1594 |
+
woocommerce_square_credit_card_settings: square_objectSpread(square_objectSpread({}, options.woocommerce_square_credit_card_settings), {}, {
|
1595 |
+
enabled: 'yes'
|
1596 |
+
})
|
1597 |
+
});
|
1598 |
+
errorMessage = Object(external_this_wp_i18n_["__"])('There was an error connecting to Square. Please try again or skip to connect later in store settings.', 'woocommerce-admin');
|
1599 |
+
_context.prev = 4;
|
1600 |
+
newWindow = null;
|
1601 |
+
|
1602 |
+
if (hasCbdIndustry) {
|
1603 |
+
// It's necessary to declare the new tab before the async call,
|
1604 |
+
// otherwise, it won't be possible to open it.
|
1605 |
+
newWindow = window.open('/', '_blank');
|
1606 |
+
}
|
1607 |
+
|
1608 |
+
_context.next = 9;
|
1609 |
+
return external_this_wp_apiFetch_default()({
|
1610 |
+
path: external_this_wc_data_["WC_ADMIN_NAMESPACE"] + '/plugins/connect-square',
|
1611 |
+
method: 'POST'
|
1612 |
+
});
|
1613 |
+
|
1614 |
+
case 9:
|
1615 |
+
result = _context.sent;
|
1616 |
+
|
1617 |
+
if (!(!result || !result.connectUrl)) {
|
1618 |
+
_context.next = 15;
|
1619 |
+
break;
|
1620 |
+
}
|
1621 |
+
|
1622 |
+
this.setState({
|
1623 |
+
isPending: false
|
1624 |
+
});
|
1625 |
+
createNotice('error', errorMessage);
|
1626 |
+
|
1627 |
+
if (hasCbdIndustry) {
|
1628 |
+
newWindow.close();
|
1629 |
+
}
|
1630 |
+
|
1631 |
+
return _context.abrupt("return");
|
1632 |
+
|
1633 |
+
case 15:
|
1634 |
+
this.setState({
|
1635 |
+
isPending: true
|
1636 |
+
});
|
1637 |
+
this.redirect(result.connectUrl, newWindow);
|
1638 |
+
_context.next = 23;
|
1639 |
+
break;
|
1640 |
+
|
1641 |
+
case 19:
|
1642 |
+
_context.prev = 19;
|
1643 |
+
_context.t0 = _context["catch"](4);
|
1644 |
+
this.setState({
|
1645 |
+
isPending: false
|
1646 |
+
});
|
1647 |
+
createNotice('error', errorMessage);
|
1648 |
+
|
1649 |
+
case 23:
|
1650 |
+
case "end":
|
1651 |
+
return _context.stop();
|
1652 |
+
}
|
1653 |
+
}
|
1654 |
+
}, _callee, this, [[4, 19]]);
|
1655 |
+
}));
|
1656 |
+
|
1657 |
+
function connect() {
|
1658 |
+
return _connect.apply(this, arguments);
|
1659 |
+
}
|
1660 |
+
|
1661 |
+
return connect;
|
1662 |
+
}()
|
1663 |
+
}, {
|
1664 |
+
key: "redirect",
|
1665 |
+
value: function redirect(connectUrl, newWindow) {
|
1666 |
+
if (newWindow) {
|
1667 |
+
newWindow.location.href = connectUrl;
|
1668 |
+
window.location = Object(wc_admin_settings["f" /* getAdminLink */])('admin.php?page=wc-admin');
|
1669 |
+
} else {
|
1670 |
+
window.location = connectUrl;
|
1671 |
+
}
|
1672 |
+
}
|
1673 |
+
}, {
|
1674 |
+
key: "render",
|
1675 |
+
value: function render() {
|
1676 |
+
var installStep = this.props.installStep;
|
1677 |
+
var isPending = this.state.isPending;
|
1678 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
1679 |
+
isVertical: true,
|
1680 |
+
isPending: !installStep.isComplete || isPending,
|
1681 |
+
currentStep: installStep.isComplete ? 'connect' : 'install',
|
1682 |
+
steps: [installStep, {
|
1683 |
+
key: 'connect',
|
1684 |
+
label: Object(external_this_wp_i18n_["__"])('Connect your Square account', 'woocommerce-admin'),
|
1685 |
+
description: Object(external_this_wp_i18n_["__"])('A Square account is required to process payments. You will be redirected to the Square website to create the connection.', 'woocommerce-admin'),
|
1686 |
+
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
1687 |
+
isPrimary: true,
|
1688 |
+
isBusy: isPending,
|
1689 |
+
onClick: this.connect
|
1690 |
+
}, Object(external_this_wp_i18n_["__"])('Connect', 'woocommerce-admin')))
|
1691 |
+
}]
|
1692 |
+
});
|
1693 |
+
}
|
1694 |
+
}]);
|
1695 |
+
|
1696 |
+
return Square;
|
1697 |
+
}(external_this_wp_element_["Component"]);
|
1698 |
+
|
1699 |
+
/* harmony default export */ var square = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
|
1700 |
+
var _select = select(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
1701 |
+
getOption = _select.getOption,
|
1702 |
+
isResolving = _select.isResolving;
|
1703 |
+
|
1704 |
+
var options = getOption('woocommerce_square_credit_card_settings');
|
1705 |
+
var optionsIsRequesting = isResolving('getOption', ['woocommerce_square_credit_card_settings']);
|
1706 |
+
return {
|
1707 |
+
options: options,
|
1708 |
+
optionsIsRequesting: optionsIsRequesting
|
1709 |
+
};
|
1710 |
+
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
|
1711 |
+
var _dispatch = dispatch('core/notices'),
|
1712 |
+
createNotice = _dispatch.createNotice;
|
1713 |
+
|
1714 |
+
var _dispatch2 = dispatch(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
1715 |
+
updateOptions = _dispatch2.updateOptions;
|
1716 |
+
|
1717 |
+
return {
|
1718 |
+
createNotice: createNotice,
|
1719 |
+
updateOptions: updateOptions
|
1720 |
+
};
|
1721 |
+
}))(square_Square));
|
1722 |
+
// EXTERNAL MODULE: ./client/task-list/tasks/payments/wcpay/index.js + 3 modules
|
1723 |
+
var payments_wcpay = __webpack_require__(514);
|
1724 |
+
|
1725 |
+
// EXTERNAL MODULE: external {"this":["wp","url"]}
|
1726 |
+
var external_this_wp_url_ = __webpack_require__(23);
|
1727 |
+
|
1728 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/paypal.js
|
1729 |
+
|
1730 |
+
|
1731 |
+
|
1732 |
+
|
1733 |
+
|
1734 |
+
|
1735 |
+
|
1736 |
+
|
1737 |
+
|
1738 |
+
|
1739 |
+
|
1740 |
+
|
1741 |
+
function paypal_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
1742 |
+
|
1743 |
+
function paypal_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { paypal_ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { paypal_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
1744 |
+
|
1745 |
+
function paypal_createSuper(Derived) { var hasNativeReflectConstruct = paypal_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
1746 |
+
|
1747 |
+
function paypal_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
1748 |
+
|
1749 |
+
/* global ppcp_onboarding */
|
1750 |
+
|
1751 |
+
/**
|
1752 |
+
* External dependencies
|
1753 |
+
*/
|
1754 |
+
|
1755 |
+
|
1756 |
+
|
1757 |
+
|
1758 |
+
|
1759 |
+
|
1760 |
+
|
1761 |
+
|
1762 |
+
|
1763 |
+
|
1764 |
+
|
1765 |
+
var PAYPAL_PLUGIN = 'woocommerce-paypal-payments';
|
1766 |
+
var WC_PAYPAL_NAMESPACE = '/wc-paypal/v1';
|
1767 |
+
/**
|
1768 |
+
* Loads the onboarding script file into the dom on the fly.
|
1769 |
+
*
|
1770 |
+
* @param {string} url of the onboarding js file.
|
1771 |
+
* @param {Object} data required for the onboarding script, labeled as PayPalCommerceGatewayOnboarding
|
1772 |
+
* @param {Function} onLoad callback for when the script is loaded.
|
1773 |
+
*/
|
1774 |
+
|
1775 |
+
function loadOnboardingScript(url, data, onLoad) {
|
1776 |
+
try {
|
1777 |
+
// eslint-disable-next-line camelcase
|
1778 |
+
if (ppcp_onboarding) {
|
1779 |
+
onLoad();
|
1780 |
+
}
|
1781 |
+
} catch (e) {
|
1782 |
+
var script = document.createElement('script');
|
1783 |
+
script.src = url;
|
1784 |
+
document.body.append(script); // Callback after scripts have loaded.
|
1785 |
+
|
1786 |
+
script.onload = function () {
|
1787 |
+
onLoad();
|
1788 |
+
};
|
1789 |
+
|
1790 |
+
window.PayPalCommerceGatewayOnboarding = data;
|
1791 |
+
}
|
1792 |
+
}
|
1793 |
+
|
1794 |
+
function PaypalConnectButton(_ref) {
|
1795 |
+
var connectUrl = _ref.connectUrl;
|
1796 |
+
Object(external_this_wp_element_["useEffect"])(function () {
|
1797 |
+
// eslint-disable-next-line camelcase
|
1798 |
+
if (ppcp_onboarding) {
|
1799 |
+
// Makes sure the onboarding is hooked up to the Connect button rendered.
|
1800 |
+
ppcp_onboarding.reload();
|
1801 |
+
}
|
1802 |
+
}, []);
|
1803 |
+
return Object(external_this_wp_element_["createElement"])("a", {
|
1804 |
+
className: "button-primary",
|
1805 |
+
target: "_blank",
|
1806 |
+
rel: "noreferrer",
|
1807 |
+
href: connectUrl,
|
1808 |
+
"data-paypal-onboard-button": "true",
|
1809 |
+
"data-paypal-button": "true",
|
1810 |
+
"data-paypal-onboard-complete": "ppcp_onboarding_productionCallback"
|
1811 |
+
}, Object(external_this_wp_i18n_["__"])('Connect', 'woocommerce-admin'));
|
1812 |
+
}
|
1813 |
+
|
1814 |
+
var paypal_PayPal = /*#__PURE__*/function (_Component) {
|
1815 |
+
inherits_default()(PayPal, _Component);
|
1816 |
+
|
1817 |
+
var _super = paypal_createSuper(PayPal);
|
1818 |
+
|
1819 |
+
function PayPal(props) {
|
1820 |
+
var _this;
|
1821 |
+
|
1822 |
+
classCallCheck_default()(this, PayPal);
|
1823 |
+
|
1824 |
+
_this = _super.call(this, props);
|
1825 |
+
_this.state = {
|
1826 |
+
autoConnectFailed: false,
|
1827 |
+
connectURL: ''
|
1828 |
+
};
|
1829 |
+
_this.enablePaypalPlugin = _this.enablePaypalPlugin.bind(assertThisInitialized_default()(_this));
|
1830 |
+
_this.setCredentials = _this.setCredentials.bind(assertThisInitialized_default()(_this));
|
1831 |
+
_this.validate = _this.validate.bind(assertThisInitialized_default()(_this));
|
1832 |
+
return _this;
|
1833 |
+
}
|
1834 |
+
|
1835 |
+
createClass_default()(PayPal, [{
|
1836 |
+
key: "componentDidMount",
|
1837 |
+
value: function componentDidMount() {
|
1838 |
+
var createNotice = this.props.createNotice;
|
1839 |
+
var query = Object(external_this_wc_navigation_["getQuery"])(); // Handle redirect back from PayPal
|
1840 |
+
|
1841 |
+
if (query.onboarding) {
|
1842 |
+
if (query.onboarding === 'complete' && !query['ppcp-onboarding-error']) {
|
1843 |
+
this.enablePaypalPlugin();
|
1844 |
+
return;
|
1845 |
+
}
|
1846 |
+
|
1847 |
+
if (query['ppcp-onboarding-error']) {
|
1848 |
+
/* eslint-disable react/no-did-mount-set-state */
|
1849 |
+
this.setState({
|
1850 |
+
autoConnectFailed: true
|
1851 |
+
});
|
1852 |
+
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings through the onboarding, please fill the fields in manually.', 'woocommerce-admin'));
|
1853 |
+
}
|
1854 |
+
|
1855 |
+
return;
|
1856 |
+
}
|
1857 |
+
|
1858 |
+
this.fetchOAuthConnectURLAndOnboardingSetup();
|
1859 |
+
}
|
1860 |
+
}, {
|
1861 |
+
key: "componentDidUpdate",
|
1862 |
+
value: function componentDidUpdate(prevProps) {
|
1863 |
+
var activePlugins = this.props.activePlugins;
|
1864 |
+
|
1865 |
+
if (!prevProps.activePlugins.includes(PAYPAL_PLUGIN) && activePlugins.includes(PAYPAL_PLUGIN)) {
|
1866 |
+
this.fetchOAuthConnectURLAndOnboardingSetup();
|
1867 |
+
}
|
1868 |
+
}
|
1869 |
+
}, {
|
1870 |
+
key: "fetchOAuthConnectURLAndOnboardingSetup",
|
1871 |
+
value: function () {
|
1872 |
+
var _fetchOAuthConnectURLAndOnboardingSetup = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
1873 |
+
var _this2 = this;
|
1874 |
+
|
1875 |
+
var _this$props, activePlugins, createNotice, result;
|
1876 |
+
|
1877 |
+
return regenerator_default.a.wrap(function _callee$(_context) {
|
1878 |
+
while (1) {
|
1879 |
+
switch (_context.prev = _context.next) {
|
1880 |
+
case 0:
|
1881 |
+
_this$props = this.props, activePlugins = _this$props.activePlugins, createNotice = _this$props.createNotice;
|
1882 |
+
|
1883 |
+
if (activePlugins.includes(PAYPAL_PLUGIN)) {
|
1884 |
+
_context.next = 3;
|
1885 |
+
break;
|
1886 |
+
}
|
1887 |
+
|
1888 |
+
return _context.abrupt("return");
|
1889 |
+
|
1890 |
+
case 3:
|
1891 |
+
this.setState({
|
1892 |
+
isPending: true
|
1893 |
+
});
|
1894 |
+
_context.prev = 4;
|
1895 |
+
_context.next = 7;
|
1896 |
+
return external_this_wp_apiFetch_default()({
|
1897 |
+
path: WC_PAYPAL_NAMESPACE + '/onboarding/get-params',
|
1898 |
+
method: 'POST',
|
1899 |
+
data: {
|
1900 |
+
environment: 'production',
|
1901 |
+
returnUrlArgs: {
|
1902 |
+
ppcpobw: '1'
|
1903 |
+
}
|
1904 |
+
}
|
1905 |
+
});
|
1906 |
+
|
1907 |
+
case 7:
|
1908 |
+
result = _context.sent;
|
1909 |
+
|
1910 |
+
if (!(!result || !result.signupLink)) {
|
1911 |
+
_context.next = 11;
|
1912 |
+
break;
|
1913 |
+
}
|
1914 |
+
|
1915 |
+
this.setState({
|
1916 |
+
autoConnectFailed: true,
|
1917 |
+
isPending: false
|
1918 |
+
});
|
1919 |
+
return _context.abrupt("return");
|
1920 |
+
|
1921 |
+
case 11:
|
1922 |
+
loadOnboardingScript(result.scriptURL, result.scriptData, function () {
|
1923 |
+
_this2.setState({
|
1924 |
+
connectURL: result.signupLink,
|
1925 |
+
isPending: false
|
1926 |
+
});
|
1927 |
+
});
|
1928 |
+
_context.next = 18;
|
1929 |
+
break;
|
1930 |
+
|
1931 |
+
case 14:
|
1932 |
+
_context.prev = 14;
|
1933 |
+
_context.t0 = _context["catch"](4);
|
1934 |
+
|
1935 |
+
if (_context.t0 && _context.t0.data && _context.t0.data.status === 500) {
|
1936 |
+
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem with the Paypal onboarding setup, please fill the fields in manually.', 'woocommerce-admin'));
|
1937 |
+
}
|
1938 |
+
|
1939 |
+
this.setState({
|
1940 |
+
autoConnectFailed: true,
|
1941 |
+
isPending: false
|
1942 |
+
});
|
1943 |
+
|
1944 |
+
case 18:
|
1945 |
+
case "end":
|
1946 |
+
return _context.stop();
|
1947 |
+
}
|
1948 |
+
}
|
1949 |
+
}, _callee, this, [[4, 14]]);
|
1950 |
+
}));
|
1951 |
+
|
1952 |
+
function fetchOAuthConnectURLAndOnboardingSetup() {
|
1953 |
+
return _fetchOAuthConnectURLAndOnboardingSetup.apply(this, arguments);
|
1954 |
+
}
|
1955 |
+
|
1956 |
+
return fetchOAuthConnectURLAndOnboardingSetup;
|
1957 |
+
}()
|
1958 |
+
}, {
|
1959 |
+
key: "enablePaypalPlugin",
|
1960 |
+
value: function () {
|
1961 |
+
var _enablePaypalPlugin = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee2(skipPpcpSettingsUpdate) {
|
1962 |
+
var _this$props2, createNotice, updateOptions, markConfigured, options, updatedOptions, update;
|
1963 |
+
|
1964 |
+
return regenerator_default.a.wrap(function _callee2$(_context2) {
|
1965 |
+
while (1) {
|
1966 |
+
switch (_context2.prev = _context2.next) {
|
1967 |
+
case 0:
|
1968 |
+
_this$props2 = this.props, createNotice = _this$props2.createNotice, updateOptions = _this$props2.updateOptions, markConfigured = _this$props2.markConfigured, options = _this$props2.options;
|
1969 |
+
updatedOptions = {
|
1970 |
+
'woocommerce_ppcp-gateway_settings': {
|
1971 |
+
enabled: 'yes'
|
1972 |
+
}
|
1973 |
+
};
|
1974 |
+
|
1975 |
+
if (!skipPpcpSettingsUpdate) {
|
1976 |
+
updatedOptions['woocommerce-ppcp-settings'] = paypal_objectSpread(paypal_objectSpread({}, options), {}, {
|
1977 |
+
enabled: true
|
1978 |
+
});
|
1979 |
+
}
|
1980 |
+
|
1981 |
+
_context2.next = 5;
|
1982 |
+
return updateOptions(updatedOptions);
|
1983 |
+
|
1984 |
+
case 5:
|
1985 |
+
update = _context2.sent;
|
1986 |
+
|
1987 |
+
if (update.success) {
|
1988 |
+
createNotice('success', Object(external_this_wp_i18n_["__"])('PayPal connected successfully.', 'woocommerce-admin'));
|
1989 |
+
markConfigured('paypal');
|
1990 |
+
} else {
|
1991 |
+
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings.', 'woocommerce-admin'));
|
1992 |
+
}
|
1993 |
+
|
1994 |
+
case 7:
|
1995 |
+
case "end":
|
1996 |
+
return _context2.stop();
|
1997 |
+
}
|
1998 |
+
}
|
1999 |
+
}, _callee2, this);
|
2000 |
+
}));
|
2001 |
+
|
2002 |
+
function enablePaypalPlugin(_x) {
|
2003 |
+
return _enablePaypalPlugin.apply(this, arguments);
|
2004 |
+
}
|
2005 |
+
|
2006 |
+
return enablePaypalPlugin;
|
2007 |
+
}()
|
2008 |
+
}, {
|
2009 |
+
key: "setCredentials",
|
2010 |
+
value: function () {
|
2011 |
+
var _setCredentials = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee3(values) {
|
2012 |
+
var createNotice, result;
|
2013 |
+
return regenerator_default.a.wrap(function _callee3$(_context3) {
|
2014 |
+
while (1) {
|
2015 |
+
switch (_context3.prev = _context3.next) {
|
2016 |
+
case 0:
|
2017 |
+
createNotice = this.props.createNotice;
|
2018 |
+
_context3.prev = 1;
|
2019 |
+
_context3.next = 4;
|
2020 |
+
return external_this_wp_apiFetch_default()({
|
2021 |
+
path: WC_PAYPAL_NAMESPACE + '/onboarding/set-credentials',
|
2022 |
+
method: 'POST',
|
2023 |
+
data: paypal_objectSpread({
|
2024 |
+
environment: 'production'
|
2025 |
+
}, values)
|
2026 |
+
});
|
2027 |
+
|
2028 |
+
case 4:
|
2029 |
+
result = _context3.sent;
|
2030 |
+
|
2031 |
+
if (!(result && result.data)) {
|
2032 |
+
_context3.next = 9;
|
2033 |
+
break;
|
2034 |
+
}
|
2035 |
+
|
2036 |
+
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem updating the credentials.', 'woocommerce-admin'));
|
2037 |
+
_context3.next = 11;
|
2038 |
+
break;
|
2039 |
+
|
2040 |
+
case 9:
|
2041 |
+
_context3.next = 11;
|
2042 |
+
return this.enablePaypalPlugin(true);
|
2043 |
+
|
2044 |
+
case 11:
|
2045 |
+
_context3.next = 18;
|
2046 |
+
break;
|
2047 |
+
|
2048 |
+
case 13:
|
2049 |
+
_context3.prev = 13;
|
2050 |
+
_context3.t0 = _context3["catch"](1);
|
2051 |
+
|
2052 |
+
if (!(_context3.t0 && _context3.t0.data && _context3.t0.data.status === 404)) {
|
2053 |
+
_context3.next = 18;
|
2054 |
+
break;
|
2055 |
+
}
|
2056 |
+
|
2057 |
+
_context3.next = 18;
|
2058 |
+
return this.updateManualSettings(values);
|
2059 |
+
|
2060 |
+
case 18:
|
2061 |
+
case "end":
|
2062 |
+
return _context3.stop();
|
2063 |
+
}
|
2064 |
+
}
|
2065 |
+
}, _callee3, this, [[1, 13]]);
|
2066 |
+
}));
|
2067 |
+
|
2068 |
+
function setCredentials(_x2) {
|
2069 |
+
return _setCredentials.apply(this, arguments);
|
2070 |
+
}
|
2071 |
+
|
2072 |
+
return setCredentials;
|
2073 |
+
}()
|
2074 |
+
}, {
|
2075 |
+
key: "updateManualSettings",
|
2076 |
+
value: function () {
|
2077 |
+
var _updateManualSettings = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee4(values) {
|
2078 |
+
var _this$props3, createNotice, options, updateOptions, markConfigured, productionValues, optionValues, update;
|
2079 |
+
|
2080 |
+
return regenerator_default.a.wrap(function _callee4$(_context4) {
|
2081 |
+
while (1) {
|
2082 |
+
switch (_context4.prev = _context4.next) {
|
2083 |
+
case 0:
|
2084 |
+
_this$props3 = this.props, createNotice = _this$props3.createNotice, options = _this$props3.options, updateOptions = _this$props3.updateOptions, markConfigured = _this$props3.markConfigured;
|
2085 |
+
productionValues = Object.keys(values).reduce(function (vals, key) {
|
2086 |
+
var prodKey = key + '_production';
|
2087 |
+
return paypal_objectSpread(paypal_objectSpread({}, vals), {}, defineProperty_default()({}, prodKey, values[key]));
|
2088 |
+
}, {});
|
2089 |
+
/**
|
2090 |
+
* merchant data can be the same across sandbox and production, that's why we set it as
|
2091 |
+
* standalone as well.
|
2092 |
+
*/
|
2093 |
+
|
2094 |
+
optionValues = paypal_objectSpread(paypal_objectSpread({}, options), {}, {
|
2095 |
+
enabled: true,
|
2096 |
+
sandbox_on: false,
|
2097 |
+
merchant_email: values.merchant_email,
|
2098 |
+
merchant_id: values.merchant_id
|
2099 |
+
}, productionValues);
|
2100 |
+
_context4.next = 5;
|
2101 |
+
return updateOptions({
|
2102 |
+
'woocommerce-ppcp-settings': optionValues,
|
2103 |
+
'woocommerce_ppcp-gateway_settings': {
|
2104 |
+
enabled: 'yes'
|
2105 |
+
}
|
2106 |
+
});
|
2107 |
+
|
2108 |
+
case 5:
|
2109 |
+
update = _context4.sent;
|
2110 |
+
|
2111 |
+
if (update.success) {
|
2112 |
+
createNotice('success', Object(external_this_wp_i18n_["__"])('PayPal connected successfully.', 'woocommerce-admin'));
|
2113 |
+
markConfigured('paypal');
|
2114 |
+
} else {
|
2115 |
+
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings.', 'woocommerce-admin'));
|
2116 |
+
}
|
2117 |
+
|
2118 |
+
case 7:
|
2119 |
+
case "end":
|
2120 |
+
return _context4.stop();
|
2121 |
+
}
|
2122 |
+
}
|
2123 |
+
}, _callee4, this);
|
2124 |
+
}));
|
2125 |
+
|
2126 |
+
function updateManualSettings(_x3) {
|
2127 |
+
return _updateManualSettings.apply(this, arguments);
|
2128 |
+
}
|
2129 |
+
|
2130 |
+
return updateManualSettings;
|
2131 |
+
}()
|
2132 |
+
}, {
|
2133 |
+
key: "getInitialConfigValues",
|
2134 |
+
value: function getInitialConfigValues() {
|
2135 |
+
var options = this.props.options;
|
2136 |
+
return ['merchant_email', 'merchant_id', 'client_id', 'client_secret'].reduce(function (initialVals, key) {
|
2137 |
+
return paypal_objectSpread(paypal_objectSpread({}, initialVals), {}, defineProperty_default()({}, key, options && options[key + '_production'] ? options[key + '_production'] : ''));
|
2138 |
+
}, {});
|
2139 |
+
}
|
2140 |
+
}, {
|
2141 |
+
key: "validate",
|
2142 |
+
value: function validate(values) {
|
2143 |
+
var errors = {};
|
2144 |
+
|
2145 |
+
if (!values.merchant_email) {
|
2146 |
+
errors.merchant_email = Object(external_this_wp_i18n_["__"])('Please enter your Merchant email', 'woocommerce-admin');
|
2147 |
+
}
|
2148 |
+
|
2149 |
+
if (!Object(external_this_wp_url_["isEmail"])(values.merchant_email)) {
|
2150 |
+
errors.merchant_email = Object(external_this_wp_i18n_["__"])('Please enter a valid email address', 'woocommerce-admin');
|
2151 |
+
}
|
2152 |
+
|
2153 |
+
if (!values.merchant_id) {
|
2154 |
+
errors.merchant_id = Object(external_this_wp_i18n_["__"])('Please enter your Merchant Id', 'woocommerce-admin');
|
2155 |
+
}
|
2156 |
+
|
2157 |
+
if (!values.client_id) {
|
2158 |
+
errors.client_id = Object(external_this_wp_i18n_["__"])('Please enter your Client Id', 'woocommerce-admin');
|
2159 |
+
}
|
2160 |
+
|
2161 |
+
if (!values.client_secret) {
|
2162 |
+
errors.client_secret = Object(external_this_wp_i18n_["__"])('Please enter your Client Secret', 'woocommerce-admin');
|
2163 |
+
}
|
2164 |
+
|
2165 |
+
return errors;
|
2166 |
+
}
|
2167 |
+
}, {
|
2168 |
+
key: "renderManualConfig",
|
2169 |
+
value: function renderManualConfig() {
|
2170 |
+
var isOptionsUpdating = this.props.isOptionsUpdating;
|
2171 |
+
var stripeHelp = lib_default()({
|
2172 |
+
mixedString: Object(external_this_wp_i18n_["__"])('Your API details can be obtained from your {{docsLink}}Paypal developer account{{/docsLink}}, and your Merchant Id from your {{merchantLink}}Paypal Business account{{/merchantLink}}. Don’t have a Paypal account? {{registerLink}}Create one.{{/registerLink}}', 'woocommerce-admin'),
|
2173 |
+
components: {
|
2174 |
+
docsLink: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2175 |
+
href: "https://developer.paypal.com/docs/api-basics/manage-apps/#create-or-edit-sandbox-and-live-apps",
|
2176 |
+
target: "_blank",
|
2177 |
+
type: "external"
|
2178 |
+
}),
|
2179 |
+
merchantLink: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2180 |
+
href: "https://www.paypal.com/ca/smarthelp/article/FAQ3850",
|
2181 |
+
target: "_blank",
|
2182 |
+
type: "external"
|
2183 |
+
}),
|
2184 |
+
registerLink: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2185 |
+
href: "https://www.paypal.com/us/business",
|
2186 |
+
target: "_blank",
|
2187 |
+
type: "external"
|
2188 |
+
})
|
2189 |
+
}
|
2190 |
+
});
|
2191 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Form"], {
|
2192 |
+
initialValues: this.getInitialConfigValues(),
|
2193 |
+
onSubmitCallback: this.setCredentials,
|
2194 |
+
validate: this.validate
|
2195 |
+
}, function (_ref2) {
|
2196 |
+
var getInputProps = _ref2.getInputProps,
|
2197 |
+
handleSubmit = _ref2.handleSubmit;
|
2198 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2199 |
+
label: Object(external_this_wp_i18n_["__"])('Email address', 'woocommerce-admin'),
|
2200 |
+
required: true
|
2201 |
+
}, getInputProps('merchant_email'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2202 |
+
label: Object(external_this_wp_i18n_["__"])('Merchant Id', 'woocommerce-admin'),
|
2203 |
+
required: true
|
2204 |
+
}, getInputProps('merchant_id'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2205 |
+
label: Object(external_this_wp_i18n_["__"])('Client Id', 'woocommerce-admin'),
|
2206 |
+
required: true
|
2207 |
+
}, getInputProps('client_id'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2208 |
+
label: Object(external_this_wp_i18n_["__"])('Secret Key', 'woocommerce-admin'),
|
2209 |
+
required: true
|
2210 |
+
}, getInputProps('client_secret'))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
2211 |
+
isPrimary: true,
|
2212 |
+
isBusy: isOptionsUpdating,
|
2213 |
+
onClick: handleSubmit
|
2214 |
+
}, Object(external_this_wp_i18n_["__"])('Proceed', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])("p", null, stripeHelp));
|
2215 |
+
});
|
2216 |
+
}
|
2217 |
+
}, {
|
2218 |
+
key: "renderConnectFields",
|
2219 |
+
value: function renderConnectFields() {
|
2220 |
+
var _this$state = this.state,
|
2221 |
+
autoConnectFailed = _this$state.autoConnectFailed,
|
2222 |
+
connectURL = _this$state.connectURL;
|
2223 |
+
|
2224 |
+
if (!autoConnectFailed && connectURL) {
|
2225 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(PaypalConnectButton, {
|
2226 |
+
connectUrl: connectURL
|
2227 |
+
}), Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_i18n_["__"])('You will be redirected to the PayPal website to create the connection.', 'woocommerce-admin')));
|
2228 |
+
}
|
2229 |
+
|
2230 |
+
if (autoConnectFailed) {
|
2231 |
+
return this.renderManualConfig();
|
2232 |
+
}
|
2233 |
+
}
|
2234 |
+
}, {
|
2235 |
+
key: "getConnectStep",
|
2236 |
+
value: function getConnectStep() {
|
2237 |
+
var isRequestingOptions = this.props.isRequestingOptions;
|
2238 |
+
return {
|
2239 |
+
key: 'connect',
|
2240 |
+
label: Object(external_this_wp_i18n_["__"])('Connect your PayPal account', 'woocommerce-admin'),
|
2241 |
+
description: Object(external_this_wp_i18n_["__"])('A PayPal account is required to process payments. Connect your store to your PayPal account.', 'woocommerce-admin'),
|
2242 |
+
content: isRequestingOptions ? null : this.renderConnectFields()
|
2243 |
+
};
|
2244 |
+
}
|
2245 |
+
}, {
|
2246 |
+
key: "render",
|
2247 |
+
value: function render() {
|
2248 |
+
var _this$props4 = this.props,
|
2249 |
+
installStep = _this$props4.installStep,
|
2250 |
+
isRequestingOptions = _this$props4.isRequestingOptions,
|
2251 |
+
isOptionsUpdating = _this$props4.isOptionsUpdating;
|
2252 |
+
var isPending = this.state.isPending;
|
2253 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
2254 |
+
isVertical: true,
|
2255 |
+
isPending: !installStep.isComplete || isPending || isRequestingOptions || isOptionsUpdating,
|
2256 |
+
currentStep: installStep.isComplete ? 'connect' : 'install',
|
2257 |
+
steps: [installStep, this.getConnectStep()]
|
2258 |
+
});
|
2259 |
+
}
|
2260 |
+
}]);
|
2261 |
+
|
2262 |
+
return PayPal;
|
2263 |
+
}(external_this_wp_element_["Component"]);
|
2264 |
+
|
2265 |
+
paypal_PayPal.defaultProps = {
|
2266 |
+
manualConfig: false // WCS is not required for the PayPal OAuth flow, so we can default to smooth connection.
|
2267 |
+
|
2268 |
+
};
|
2269 |
+
/* harmony default export */ var paypal = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
|
2270 |
+
var _select = select(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
2271 |
+
getOption = _select.getOption,
|
2272 |
+
isOptionsUpdating = _select.isOptionsUpdating,
|
2273 |
+
hasFinishedResolution = _select.hasFinishedResolution;
|
2274 |
+
|
2275 |
+
var _select2 = select(external_this_wc_data_["PLUGINS_STORE_NAME"]),
|
2276 |
+
getActivePlugins = _select2.getActivePlugins;
|
2277 |
+
|
2278 |
+
var paypalOptions = getOption('woocommerce-ppcp-settings');
|
2279 |
+
var isRequestingOptions = !hasFinishedResolution('getOption', ['woocommerce-ppcp-settings']);
|
2280 |
+
var activePlugins = getActivePlugins();
|
2281 |
+
return {
|
2282 |
+
activePlugins: activePlugins,
|
2283 |
+
isOptionsUpdating: isOptionsUpdating(),
|
2284 |
+
options: paypalOptions,
|
2285 |
+
isRequestingOptions: isRequestingOptions
|
2286 |
+
};
|
2287 |
+
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
|
2288 |
+
var _dispatch = dispatch('core/notices'),
|
2289 |
+
createNotice = _dispatch.createNotice;
|
2290 |
+
|
2291 |
+
var _dispatch2 = dispatch(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
2292 |
+
updateOptions = _dispatch2.updateOptions;
|
2293 |
+
|
2294 |
+
return {
|
2295 |
+
createNotice: createNotice,
|
2296 |
+
updateOptions: updateOptions
|
2297 |
+
};
|
2298 |
+
}))(paypal_PayPal));
|
2299 |
+
|
2300 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/klarna.js
|
2301 |
+
|
2302 |
+
|
2303 |
+
|
2304 |
+
|
2305 |
+
|
2306 |
+
|
2307 |
+
|
2308 |
+
|
2309 |
+
function klarna_createSuper(Derived) { var hasNativeReflectConstruct = klarna_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
2310 |
+
|
2311 |
+
function klarna_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
2312 |
+
|
2313 |
+
/**
|
2314 |
+
* External dependencies
|
2315 |
+
*/
|
2316 |
+
|
2317 |
+
|
2318 |
+
|
2319 |
+
|
2320 |
+
|
2321 |
+
|
2322 |
+
|
2323 |
+
var klarna_Klarna = /*#__PURE__*/function (_Component) {
|
2324 |
+
inherits_default()(Klarna, _Component);
|
2325 |
+
|
2326 |
+
var _super = klarna_createSuper(Klarna);
|
2327 |
+
|
2328 |
+
function Klarna(props) {
|
2329 |
+
var _this;
|
2330 |
+
|
2331 |
+
classCallCheck_default()(this, Klarna);
|
2332 |
+
|
2333 |
+
_this = _super.call(this, props);
|
2334 |
+
_this.continue = _this.continue.bind(assertThisInitialized_default()(_this));
|
2335 |
+
return _this;
|
2336 |
+
}
|
2337 |
+
|
2338 |
+
createClass_default()(Klarna, [{
|
2339 |
+
key: "continue",
|
2340 |
+
value: function _continue() {
|
2341 |
+
var _this$props = this.props,
|
2342 |
+
markConfigured = _this$props.markConfigured,
|
2343 |
+
plugin = _this$props.plugin;
|
2344 |
+
var slug = plugin === 'checkout' ? 'klarna_checkout' : 'klarna_payments';
|
2345 |
+
markConfigured(slug);
|
2346 |
+
}
|
2347 |
+
}, {
|
2348 |
+
key: "renderConnectStep",
|
2349 |
+
value: function renderConnectStep() {
|
2350 |
+
var plugin = this.props.plugin;
|
2351 |
+
var slug = plugin === 'checkout' ? 'klarna-checkout' : 'klarna-payments';
|
2352 |
+
var section = plugin === 'checkout' ? 'kco' : 'klarna_payments';
|
2353 |
+
var link = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2354 |
+
href: wc_admin_settings["a" /* ADMIN_URL */] + 'admin.php?page=wc-settings&tab=checkout§ion=' + section,
|
2355 |
+
target: "_blank",
|
2356 |
+
type: "external"
|
2357 |
+
});
|
2358 |
+
var helpLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2359 |
+
href: 'https://docs.woocommerce.com/document/' + slug + '/#section-3',
|
2360 |
+
target: "_blank",
|
2361 |
+
type: "external"
|
2362 |
+
});
|
2363 |
+
var configureText = lib_default()({
|
2364 |
+
mixedString: Object(external_this_wp_i18n_["__"])('Klarna can be configured under your {{link}}store settings{{/link}}. Figure out {{helpLink}}what you need{{/helpLink}}.', 'woocommerce-admin'),
|
2365 |
+
components: {
|
2366 |
+
link: link,
|
2367 |
+
helpLink: helpLink
|
2368 |
+
}
|
2369 |
+
});
|
2370 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("p", null, configureText), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
2371 |
+
isPrimary: true,
|
2372 |
+
onClick: this.continue
|
2373 |
+
}, Object(external_this_wp_i18n_["__"])('Continue', 'woocommerce-admin')));
|
2374 |
+
}
|
2375 |
+
}, {
|
2376 |
+
key: "render",
|
2377 |
+
value: function render() {
|
2378 |
+
var installStep = this.props.installStep;
|
2379 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
2380 |
+
isVertical: true,
|
2381 |
+
isPending: !installStep.isComplete,
|
2382 |
+
currentStep: installStep.isComplete ? 'connect' : 'install',
|
2383 |
+
steps: [installStep, {
|
2384 |
+
key: 'connect',
|
2385 |
+
label: Object(external_this_wp_i18n_["__"])('Connect your Klarna account', 'woocommerce-admin'),
|
2386 |
+
content: this.renderConnectStep()
|
2387 |
+
}]
|
2388 |
+
});
|
2389 |
+
}
|
2390 |
+
}]);
|
2391 |
+
|
2392 |
+
return Klarna;
|
2393 |
+
}(external_this_wp_element_["Component"]);
|
2394 |
+
|
2395 |
+
/* harmony default export */ var klarna = (klarna_Klarna);
|
2396 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/payfast.js
|
2397 |
+
|
2398 |
+
|
2399 |
+
|
2400 |
+
|
2401 |
+
|
2402 |
+
|
2403 |
+
|
2404 |
+
|
2405 |
+
|
2406 |
+
|
2407 |
+
|
2408 |
+
|
2409 |
+
function payfast_createSuper(Derived) { var hasNativeReflectConstruct = payfast_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
2410 |
+
|
2411 |
+
function payfast_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
2412 |
+
|
2413 |
+
/**
|
2414 |
+
* External dependencies
|
2415 |
+
*/
|
2416 |
+
|
2417 |
+
|
2418 |
+
|
2419 |
+
|
2420 |
+
|
2421 |
+
|
2422 |
+
|
2423 |
+
|
2424 |
+
|
2425 |
+
var payfast_PayFast = /*#__PURE__*/function (_Component) {
|
2426 |
+
inherits_default()(PayFast, _Component);
|
2427 |
+
|
2428 |
+
var _super = payfast_createSuper(PayFast);
|
2429 |
+
|
2430 |
+
function PayFast() {
|
2431 |
+
var _this;
|
2432 |
+
|
2433 |
+
classCallCheck_default()(this, PayFast);
|
2434 |
+
|
2435 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
2436 |
+
args[_key] = arguments[_key];
|
2437 |
+
}
|
2438 |
+
|
2439 |
+
_this = _super.call.apply(_super, [this].concat(args));
|
2440 |
+
|
2441 |
+
defineProperty_default()(assertThisInitialized_default()(_this), "getInitialConfigValues", function () {
|
2442 |
+
return {
|
2443 |
+
merchant_id: '',
|
2444 |
+
merchant_key: '',
|
2445 |
+
pass_phrase: ''
|
2446 |
+
};
|
2447 |
+
});
|
2448 |
+
|
2449 |
+
defineProperty_default()(assertThisInitialized_default()(_this), "validate", function (values) {
|
2450 |
+
var errors = {};
|
2451 |
+
|
2452 |
+
if (!values.merchant_id) {
|
2453 |
+
errors.merchant_id = Object(external_this_wp_i18n_["__"])('Please enter your merchant ID', 'woocommerce-admin');
|
2454 |
+
}
|
2455 |
+
|
2456 |
+
if (!values.merchant_key) {
|
2457 |
+
errors.merchant_key = Object(external_this_wp_i18n_["__"])('Please enter your merchant key', 'woocommerce-admin');
|
2458 |
+
}
|
2459 |
+
|
2460 |
+
if (!values.pass_phrase) {
|
2461 |
+
errors.pass_phrase = Object(external_this_wp_i18n_["__"])('Please enter your passphrase', 'woocommerce-admin');
|
2462 |
+
}
|
2463 |
+
|
2464 |
+
return errors;
|
2465 |
+
});
|
2466 |
+
|
2467 |
+
defineProperty_default()(assertThisInitialized_default()(_this), "updateSettings", /*#__PURE__*/function () {
|
2468 |
+
var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee(values) {
|
2469 |
+
var _this$props, updateOptions, createNotice, markConfigured, update;
|
2470 |
+
|
2471 |
+
return regenerator_default.a.wrap(function _callee$(_context) {
|
2472 |
+
while (1) {
|
2473 |
+
switch (_context.prev = _context.next) {
|
2474 |
+
case 0:
|
2475 |
+
_this$props = _this.props, updateOptions = _this$props.updateOptions, createNotice = _this$props.createNotice, markConfigured = _this$props.markConfigured; // Because the PayFast extension only works with the South African Rand
|
2476 |
+
// currency, force the store to use it while setting the PayFast settings
|
2477 |
+
|
2478 |
+
_context.next = 3;
|
2479 |
+
return updateOptions({
|
2480 |
+
woocommerce_currency: 'ZAR',
|
2481 |
+
woocommerce_payfast_settings: {
|
2482 |
+
merchant_id: values.merchant_id,
|
2483 |
+
merchant_key: values.merchant_key,
|
2484 |
+
pass_phrase: values.pass_phrase,
|
2485 |
+
enabled: 'yes'
|
2486 |
+
}
|
2487 |
+
});
|
2488 |
+
|
2489 |
+
case 3:
|
2490 |
+
update = _context.sent;
|
2491 |
+
|
2492 |
+
if (update.success) {
|
2493 |
+
markConfigured('payfast');
|
2494 |
+
createNotice('success', Object(external_this_wp_i18n_["__"])('PayFast connected successfully', 'woocommerce-admin'));
|
2495 |
+
} else {
|
2496 |
+
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings', 'woocommerce-admin'));
|
2497 |
+
}
|
2498 |
+
|
2499 |
+
case 5:
|
2500 |
+
case "end":
|
2501 |
+
return _context.stop();
|
2502 |
+
}
|
2503 |
+
}
|
2504 |
+
}, _callee);
|
2505 |
+
}));
|
2506 |
+
|
2507 |
+
return function (_x) {
|
2508 |
+
return _ref.apply(this, arguments);
|
2509 |
+
};
|
2510 |
+
}());
|
2511 |
+
|
2512 |
+
return _this;
|
2513 |
+
}
|
2514 |
+
|
2515 |
+
createClass_default()(PayFast, [{
|
2516 |
+
key: "renderConnectStep",
|
2517 |
+
value: function renderConnectStep() {
|
2518 |
+
var isOptionsRequesting = this.props.isOptionsRequesting;
|
2519 |
+
var helpText = lib_default()({
|
2520 |
+
mixedString: Object(external_this_wp_i18n_["__"])('Your API details can be obtained from your {{link}}PayFast account{{/link}}', 'woocommerce-admin'),
|
2521 |
+
components: {
|
2522 |
+
link: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2523 |
+
href: "https://www.payfast.co.za/",
|
2524 |
+
target: "_blank",
|
2525 |
+
type: "external"
|
2526 |
+
})
|
2527 |
+
}
|
2528 |
+
});
|
2529 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Form"], {
|
2530 |
+
initialValues: this.getInitialConfigValues(),
|
2531 |
+
onSubmitCallback: this.updateSettings,
|
2532 |
+
validate: this.validate
|
2533 |
+
}, function (_ref2) {
|
2534 |
+
var getInputProps = _ref2.getInputProps,
|
2535 |
+
handleSubmit = _ref2.handleSubmit;
|
2536 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2537 |
+
label: Object(external_this_wp_i18n_["__"])('Merchant ID', 'woocommerce-admin'),
|
2538 |
+
required: true
|
2539 |
+
}, getInputProps('merchant_id'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2540 |
+
label: Object(external_this_wp_i18n_["__"])('Merchant Key', 'woocommerce-admin'),
|
2541 |
+
required: true
|
2542 |
+
}, getInputProps('merchant_key'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2543 |
+
label: Object(external_this_wp_i18n_["__"])('Passphrase', 'woocommerce-admin'),
|
2544 |
+
required: true
|
2545 |
+
}, getInputProps('pass_phrase'))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
2546 |
+
isPrimary: true,
|
2547 |
+
isBusy: isOptionsRequesting,
|
2548 |
+
onClick: handleSubmit
|
2549 |
+
}, Object(external_this_wp_i18n_["__"])('Proceed', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])("p", null, helpText));
|
2550 |
+
});
|
2551 |
+
}
|
2552 |
+
}, {
|
2553 |
+
key: "render",
|
2554 |
+
value: function render() {
|
2555 |
+
var _this$props2 = this.props,
|
2556 |
+
installStep = _this$props2.installStep,
|
2557 |
+
isOptionsRequesting = _this$props2.isOptionsRequesting;
|
2558 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
2559 |
+
isVertical: true,
|
2560 |
+
isPending: !installStep.isComplete || isOptionsRequesting,
|
2561 |
+
currentStep: installStep.isComplete ? 'connect' : 'install',
|
2562 |
+
steps: [installStep, {
|
2563 |
+
key: 'connect',
|
2564 |
+
label: Object(external_this_wp_i18n_["__"])('Connect your PayFast account', 'woocommerce-admin'),
|
2565 |
+
content: this.renderConnectStep()
|
2566 |
+
}]
|
2567 |
+
});
|
2568 |
+
}
|
2569 |
+
}]);
|
2570 |
+
|
2571 |
+
return PayFast;
|
2572 |
+
}(external_this_wp_element_["Component"]);
|
2573 |
+
|
2574 |
+
/* harmony default export */ var payfast = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
|
2575 |
+
var _select = select(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
2576 |
+
isOptionsUpdating = _select.isOptionsUpdating;
|
2577 |
+
|
2578 |
+
var isOptionsRequesting = isOptionsUpdating();
|
2579 |
+
return {
|
2580 |
+
isOptionsRequesting: isOptionsRequesting
|
2581 |
+
};
|
2582 |
+
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
|
2583 |
+
var _dispatch = dispatch('core/notices'),
|
2584 |
+
createNotice = _dispatch.createNotice;
|
2585 |
+
|
2586 |
+
var _dispatch2 = dispatch(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
2587 |
+
updateOptions = _dispatch2.updateOptions;
|
2588 |
+
|
2589 |
+
return {
|
2590 |
+
createNotice: createNotice,
|
2591 |
+
updateOptions: updateOptions
|
2592 |
+
};
|
2593 |
+
}))(payfast_PayFast));
|
2594 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/eway.js
|
2595 |
+
|
2596 |
+
|
2597 |
+
|
2598 |
+
|
2599 |
+
|
2600 |
+
|
2601 |
+
|
2602 |
+
|
2603 |
+
|
2604 |
+
|
2605 |
+
|
2606 |
+
|
2607 |
+
function eway_createSuper(Derived) { var hasNativeReflectConstruct = eway_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
2608 |
+
|
2609 |
+
function eway_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
2610 |
+
|
2611 |
+
/**
|
2612 |
+
* External dependencies
|
2613 |
+
*/
|
2614 |
+
|
2615 |
+
|
2616 |
+
|
2617 |
+
|
2618 |
+
|
2619 |
+
|
2620 |
+
|
2621 |
+
|
2622 |
+
|
2623 |
+
var eway_EWay = /*#__PURE__*/function (_Component) {
|
2624 |
+
inherits_default()(EWay, _Component);
|
2625 |
+
|
2626 |
+
var _super = eway_createSuper(EWay);
|
2627 |
+
|
2628 |
+
function EWay() {
|
2629 |
+
var _this;
|
2630 |
+
|
2631 |
+
classCallCheck_default()(this, EWay);
|
2632 |
+
|
2633 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
2634 |
+
args[_key] = arguments[_key];
|
2635 |
+
}
|
2636 |
+
|
2637 |
+
_this = _super.call.apply(_super, [this].concat(args));
|
2638 |
+
|
2639 |
+
defineProperty_default()(assertThisInitialized_default()(_this), "getInitialConfigValues", function () {
|
2640 |
+
return {
|
2641 |
+
customer_api: '',
|
2642 |
+
customer_password: ''
|
2643 |
+
};
|
2644 |
+
});
|
2645 |
+
|
2646 |
+
defineProperty_default()(assertThisInitialized_default()(_this), "validate", function (values) {
|
2647 |
+
var errors = {};
|
2648 |
+
|
2649 |
+
if (!values.customer_api) {
|
2650 |
+
errors.customer_api = Object(external_this_wp_i18n_["__"])('Please enter your customer API key ', 'woocommerce-admin');
|
2651 |
+
}
|
2652 |
+
|
2653 |
+
if (!values.customer_password) {
|
2654 |
+
errors.customer_password = Object(external_this_wp_i18n_["__"])('Please enter your customer password', 'woocommerce-admin');
|
2655 |
+
}
|
2656 |
+
|
2657 |
+
return errors;
|
2658 |
+
});
|
2659 |
+
|
2660 |
+
defineProperty_default()(assertThisInitialized_default()(_this), "updateSettings", /*#__PURE__*/function () {
|
2661 |
+
var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee(values) {
|
2662 |
+
var _this$props, updateOptions, createNotice, markConfigured, update;
|
2663 |
+
|
2664 |
+
return regenerator_default.a.wrap(function _callee$(_context) {
|
2665 |
+
while (1) {
|
2666 |
+
switch (_context.prev = _context.next) {
|
2667 |
+
case 0:
|
2668 |
+
_this$props = _this.props, updateOptions = _this$props.updateOptions, createNotice = _this$props.createNotice, markConfigured = _this$props.markConfigured;
|
2669 |
+
_context.next = 3;
|
2670 |
+
return updateOptions({
|
2671 |
+
woocommerce_eway_settings: {
|
2672 |
+
customer_api: values.customer_api,
|
2673 |
+
customer_password: values.customer_password,
|
2674 |
+
enabled: 'yes'
|
2675 |
+
}
|
2676 |
+
});
|
2677 |
+
|
2678 |
+
case 3:
|
2679 |
+
update = _context.sent;
|
2680 |
+
|
2681 |
+
if (update.success) {
|
2682 |
+
markConfigured('eway');
|
2683 |
+
createNotice('success', Object(external_this_wp_i18n_["__"])('eWAY connected successfully', 'woocommerce-admin'));
|
2684 |
+
} else {
|
2685 |
+
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings', 'woocommerce-admin'));
|
2686 |
+
}
|
2687 |
+
|
2688 |
+
case 5:
|
2689 |
+
case "end":
|
2690 |
+
return _context.stop();
|
2691 |
+
}
|
2692 |
+
}
|
2693 |
+
}, _callee);
|
2694 |
+
}));
|
2695 |
+
|
2696 |
+
return function (_x) {
|
2697 |
+
return _ref.apply(this, arguments);
|
2698 |
+
};
|
2699 |
+
}());
|
2700 |
+
|
2701 |
+
return _this;
|
2702 |
+
}
|
2703 |
+
|
2704 |
+
createClass_default()(EWay, [{
|
2705 |
+
key: "renderConnectStep",
|
2706 |
+
value: function renderConnectStep() {
|
2707 |
+
var isOptionsRequesting = this.props.isOptionsRequesting;
|
2708 |
+
var helpText = lib_default()({
|
2709 |
+
mixedString: Object(external_this_wp_i18n_["__"])('Your API details can be obtained from your {{link}}eWAY account{{/link}}', 'woocommerce-admin'),
|
2710 |
+
components: {
|
2711 |
+
link: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2712 |
+
href: "https://www.eway.com.au/",
|
2713 |
+
target: "_blank",
|
2714 |
+
type: "external"
|
2715 |
+
})
|
2716 |
+
}
|
2717 |
+
});
|
2718 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Form"], {
|
2719 |
+
initialValues: this.getInitialConfigValues(),
|
2720 |
+
onSubmitCallback: this.updateSettings,
|
2721 |
+
validate: this.validate
|
2722 |
+
}, function (_ref2) {
|
2723 |
+
var getInputProps = _ref2.getInputProps,
|
2724 |
+
handleSubmit = _ref2.handleSubmit;
|
2725 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2726 |
+
label: Object(external_this_wp_i18n_["__"])('Customer API Key', 'woocommerce-admin'),
|
2727 |
+
required: true
|
2728 |
+
}, getInputProps('customer_api'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2729 |
+
label: Object(external_this_wp_i18n_["__"])('Customer Password', 'woocommerce-admin'),
|
2730 |
+
required: true
|
2731 |
+
}, getInputProps('customer_password'))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
2732 |
+
isPrimary: true,
|
2733 |
+
isBusy: isOptionsRequesting,
|
2734 |
+
onClick: handleSubmit
|
2735 |
+
}, Object(external_this_wp_i18n_["__"])('Proceed', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])("p", null, helpText));
|
2736 |
+
});
|
2737 |
+
}
|
2738 |
+
}, {
|
2739 |
+
key: "render",
|
2740 |
+
value: function render() {
|
2741 |
+
var _this$props2 = this.props,
|
2742 |
+
installStep = _this$props2.installStep,
|
2743 |
+
isOptionsRequesting = _this$props2.isOptionsRequesting;
|
2744 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
2745 |
+
isVertical: true,
|
2746 |
+
isPending: !installStep.isComplete || isOptionsRequesting,
|
2747 |
+
currentStep: installStep.isComplete ? 'connect' : 'install',
|
2748 |
+
steps: [installStep, {
|
2749 |
+
key: 'connect',
|
2750 |
+
label: Object(external_this_wp_i18n_["__"])('Connect your eWAY account', 'woocommerce-admin'),
|
2751 |
+
content: this.renderConnectStep()
|
2752 |
+
}]
|
2753 |
+
});
|
2754 |
+
}
|
2755 |
+
}]);
|
2756 |
+
|
2757 |
+
return EWay;
|
2758 |
+
}(external_this_wp_element_["Component"]);
|
2759 |
+
|
2760 |
+
/* harmony default export */ var eway = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
|
2761 |
+
var _select = select(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
2762 |
+
isOptionsUpdating = _select.isOptionsUpdating;
|
2763 |
+
|
2764 |
+
var isOptionsRequesting = isOptionsUpdating();
|
2765 |
+
return {
|
2766 |
+
isOptionsRequesting: isOptionsRequesting
|
2767 |
+
};
|
2768 |
+
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
|
2769 |
+
var _dispatch = dispatch('core/notices'),
|
2770 |
+
createNotice = _dispatch.createNotice;
|
2771 |
+
|
2772 |
+
var _dispatch2 = dispatch(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
2773 |
+
updateOptions = _dispatch2.updateOptions;
|
2774 |
+
|
2775 |
+
return {
|
2776 |
+
createNotice: createNotice,
|
2777 |
+
updateOptions: updateOptions
|
2778 |
+
};
|
2779 |
+
}))(eway_EWay));
|
2780 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/razorpay.js
|
2781 |
+
|
2782 |
+
|
2783 |
+
|
2784 |
+
|
2785 |
+
|
2786 |
+
/**
|
2787 |
+
* External dependencies
|
2788 |
+
*/
|
2789 |
+
|
2790 |
+
|
2791 |
+
|
2792 |
+
|
2793 |
+
|
2794 |
+
|
2795 |
+
var INITIAL_CONFIG = {
|
2796 |
+
key_id: '',
|
2797 |
+
key_secret: ''
|
2798 |
+
};
|
2799 |
+
|
2800 |
+
var razorpay_validate = function validate(values) {
|
2801 |
+
var errors = {};
|
2802 |
+
|
2803 |
+
if (!values.key_id) {
|
2804 |
+
errors.key_id = Object(external_this_wp_i18n_["__"])('Please enter your Key ID', 'woocommerce-admin');
|
2805 |
+
}
|
2806 |
+
|
2807 |
+
if (!values.key_secret) {
|
2808 |
+
errors.key_secret = Object(external_this_wp_i18n_["__"])('Please enter your Key Secret', 'woocommerce-admin');
|
2809 |
+
}
|
2810 |
+
|
2811 |
+
return errors;
|
2812 |
+
};
|
2813 |
+
|
2814 |
+
var razorpay_updateSettings = /*#__PURE__*/function () {
|
2815 |
+
var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee(values, createNotice, markConfigured, updateOptions) {
|
2816 |
+
var update;
|
2817 |
+
return regenerator_default.a.wrap(function _callee$(_context) {
|
2818 |
+
while (1) {
|
2819 |
+
switch (_context.prev = _context.next) {
|
2820 |
+
case 0:
|
2821 |
+
_context.next = 2;
|
2822 |
+
return updateOptions({
|
2823 |
+
woocommerce_razorpay_settings: {
|
2824 |
+
key_id: values.key_id,
|
2825 |
+
key_secret: values.key_secret,
|
2826 |
+
enabled: 'yes'
|
2827 |
+
}
|
2828 |
+
});
|
2829 |
+
|
2830 |
+
case 2:
|
2831 |
+
update = _context.sent;
|
2832 |
+
|
2833 |
+
if (update.success) {
|
2834 |
+
markConfigured('razorpay');
|
2835 |
+
createNotice('success', Object(external_this_wp_i18n_["__"])('Razorpay connected successfully', 'woocommerce-admin'));
|
2836 |
+
} else {
|
2837 |
+
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings', 'woocommerce-admin'));
|
2838 |
+
}
|
2839 |
+
|
2840 |
+
case 4:
|
2841 |
+
case "end":
|
2842 |
+
return _context.stop();
|
2843 |
+
}
|
2844 |
+
}
|
2845 |
+
}, _callee);
|
2846 |
+
}));
|
2847 |
+
|
2848 |
+
return function updateSettings(_x, _x2, _x3, _x4) {
|
2849 |
+
return _ref.apply(this, arguments);
|
2850 |
+
};
|
2851 |
+
}();
|
2852 |
+
|
2853 |
+
var razorpay_renderConnectStep = function renderConnectStep(_ref2) {
|
2854 |
+
var createNotice = _ref2.createNotice,
|
2855 |
+
isOptionsRequesting = _ref2.isOptionsRequesting,
|
2856 |
+
markConfigured = _ref2.markConfigured,
|
2857 |
+
updateOptions = _ref2.updateOptions;
|
2858 |
+
var helpText = lib_default()({
|
2859 |
+
mixedString: Object(external_this_wp_i18n_["__"])('Your key details can be obtained from your {{link}}Razorpay account{{/link}}', 'woocommerce-admin'),
|
2860 |
+
components: {
|
2861 |
+
link: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2862 |
+
href: "https://dashboard.razorpay.com/#/access/signin",
|
2863 |
+
target: "_blank",
|
2864 |
+
type: "external"
|
2865 |
+
})
|
2866 |
+
}
|
2867 |
+
});
|
2868 |
+
|
2869 |
+
var onSubmit = function onSubmit(values) {
|
2870 |
+
return razorpay_updateSettings(values, createNotice, markConfigured, updateOptions);
|
2871 |
+
};
|
2872 |
+
|
2873 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Form"], {
|
2874 |
+
initialValues: INITIAL_CONFIG,
|
2875 |
+
onSubmitCallback: onSubmit,
|
2876 |
+
validate: razorpay_validate
|
2877 |
+
}, function (_ref3) {
|
2878 |
+
var getInputProps = _ref3.getInputProps,
|
2879 |
+
handleSubmit = _ref3.handleSubmit;
|
2880 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2881 |
+
label: Object(external_this_wp_i18n_["__"])('Key ID', 'woocommerce-admin'),
|
2882 |
+
required: true
|
2883 |
+
}, getInputProps('key_id'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2884 |
+
label: Object(external_this_wp_i18n_["__"])('Key Secret', 'woocommerce-admin'),
|
2885 |
+
required: true
|
2886 |
+
}, getInputProps('key_secret'))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
2887 |
+
isPrimary: true,
|
2888 |
+
isBusy: isOptionsRequesting,
|
2889 |
+
onClick: handleSubmit
|
2890 |
+
}, Object(external_this_wp_i18n_["__"])('Proceed', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])("p", null, helpText));
|
2891 |
+
});
|
2892 |
+
};
|
2893 |
+
|
2894 |
+
var razorpay_Razorpay = function Razorpay(_ref4) {
|
2895 |
+
var createNotice = _ref4.createNotice,
|
2896 |
+
installStep = _ref4.installStep,
|
2897 |
+
isOptionsRequesting = _ref4.isOptionsRequesting,
|
2898 |
+
markConfigured = _ref4.markConfigured,
|
2899 |
+
updateOptions = _ref4.updateOptions;
|
2900 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
2901 |
+
isVertical: true,
|
2902 |
+
isPending: !installStep.isComplete || isOptionsRequesting,
|
2903 |
+
currentStep: installStep.isComplete ? 'connect' : 'install',
|
2904 |
+
steps: [installStep, {
|
2905 |
+
key: 'connect',
|
2906 |
+
label: Object(external_this_wp_i18n_["__"])('Connect your Razorpay account', 'woocommerce-admin'),
|
2907 |
+
content: razorpay_renderConnectStep({
|
2908 |
+
createNotice: createNotice,
|
2909 |
+
isOptionsRequesting: isOptionsRequesting,
|
2910 |
+
markConfigured: markConfigured,
|
2911 |
+
updateOptions: updateOptions
|
2912 |
+
})
|
2913 |
+
}]
|
2914 |
+
});
|
2915 |
+
};
|
2916 |
+
/* harmony default export */ var payments_razorpay = (function (_ref5) {
|
2917 |
+
var installStep = _ref5.installStep,
|
2918 |
+
markConfigured = _ref5.markConfigured;
|
2919 |
+
var isOptionsUpdating = Object(external_this_wp_data_["useSelect"])(function (select) {
|
2920 |
+
return select(external_this_wc_data_["OPTIONS_STORE_NAME"]).isOptionsUpdating;
|
2921 |
+
});
|
2922 |
+
var isOptionsRequesting = isOptionsUpdating();
|
2923 |
+
|
2924 |
+
var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/notices'),
|
2925 |
+
createNotice = _useDispatch.createNotice;
|
2926 |
+
|
2927 |
+
var _useDispatch2 = Object(external_this_wp_data_["useDispatch"])(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
2928 |
+
updateOptions = _useDispatch2.updateOptions;
|
2929 |
+
|
2930 |
+
return Object(external_this_wp_element_["createElement"])(razorpay_Razorpay, {
|
2931 |
+
createNotice: createNotice,
|
2932 |
+
installStep: installStep,
|
2933 |
+
isOptionsRequesting: isOptionsRequesting,
|
2934 |
+
markConfigured: markConfigured,
|
2935 |
+
updateOptions: updateOptions
|
2936 |
+
});
|
2937 |
+
});
|
2938 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/mollie.js
|
2939 |
+
|
2940 |
+
|
2941 |
+
/**
|
2942 |
+
* External dependencies
|
2943 |
+
*/
|
2944 |
+
|
2945 |
+
|
2946 |
+
|
2947 |
+
|
2948 |
+
|
2949 |
+
var mollie_Mollie = function Mollie(_ref) {
|
2950 |
+
var installStep = _ref.installStep,
|
2951 |
+
markConfigured = _ref.markConfigured;
|
2952 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
2953 |
+
isVertical: true,
|
2954 |
+
isPending: !installStep.isComplete,
|
2955 |
+
currentStep: installStep.isComplete ? 'connect' : 'install',
|
2956 |
+
steps: [installStep, {
|
2957 |
+
key: 'connect',
|
2958 |
+
label: Object(external_this_wp_i18n_["__"])('Connect your Mollie account', 'woocommerce-admin'),
|
2959 |
+
content: Object(external_this_wp_element_["createElement"])(mollie_MollieConnectStep, {
|
2960 |
+
onFinish: function onFinish() {
|
2961 |
+
markConfigured('mollie');
|
2962 |
+
}
|
2963 |
+
})
|
2964 |
+
}]
|
2965 |
+
});
|
2966 |
+
};
|
2967 |
+
|
2968 |
+
var mollie_MollieConnectStep = function MollieConnectStep(_ref2) {
|
2969 |
+
var onFinish = _ref2.onFinish;
|
2970 |
+
var settingsLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2971 |
+
href: "".concat(wc_admin_settings["a" /* ADMIN_URL */], "admin.php?page=wc-settings&tab=mollie_settings#mollie-payments-for-woocommerce"),
|
2972 |
+
target: "_blank",
|
2973 |
+
type: "external"
|
2974 |
+
});
|
2975 |
+
var accountLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2976 |
+
href: 'https://www.mollie.com/dashboard/signup',
|
2977 |
+
target: "_blank",
|
2978 |
+
type: "external"
|
2979 |
+
});
|
2980 |
+
var configureText = lib_default()({
|
2981 |
+
mixedString: Object(external_this_wp_i18n_["__"])('Create a {{accountLink}}Mollie account{{/accountLink}} and finish the configuration in the {{settingsLink}}Mollie settings.{{/settingsLink}}', 'woocommerce-admin'),
|
2982 |
+
components: {
|
2983 |
+
accountLink: accountLink,
|
2984 |
+
settingsLink: settingsLink
|
2985 |
+
}
|
2986 |
+
});
|
2987 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("p", null, configureText), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
2988 |
+
isPrimary: true,
|
2989 |
+
onClick: onFinish
|
2990 |
+
}, Object(external_this_wp_i18n_["__"])('Continue', 'woocommerce-admin')));
|
2991 |
+
};
|
2992 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/payu-india.js
|
2993 |
+
|
2994 |
+
|
2995 |
+
/**
|
2996 |
+
* External dependencies
|
2997 |
+
*/
|
2998 |
+
|
2999 |
+
|
3000 |
+
|
3001 |
+
|
3002 |
+
|
3003 |
+
var payu_india_PayUIndia = function PayUIndia(_ref) {
|
3004 |
+
var installStep = _ref.installStep,
|
3005 |
+
markConfigured = _ref.markConfigured;
|
3006 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
3007 |
+
isVertical: true,
|
3008 |
+
isPending: !installStep.isComplete,
|
3009 |
+
currentStep: installStep.isComplete ? 'connect' : 'install',
|
3010 |
+
steps: [installStep, {
|
3011 |
+
key: 'connect',
|
3012 |
+
label: Object(external_this_wp_i18n_["__"])('Connect to your PayU account', 'woocommerce-admin'),
|
3013 |
+
content: Object(external_this_wp_element_["createElement"])(payu_india_PayUCredentialsStep, {
|
3014 |
+
onFinish: function onFinish() {
|
3015 |
+
markConfigured('payubiz');
|
3016 |
+
}
|
3017 |
+
})
|
3018 |
+
}]
|
3019 |
+
});
|
3020 |
+
};
|
3021 |
+
|
3022 |
+
var payu_india_PayUCredentialsStep = function PayUCredentialsStep(_ref2) {
|
3023 |
+
var onFinish = _ref2.onFinish;
|
3024 |
+
var settingsLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
3025 |
+
href: "".concat(wc_admin_settings["a" /* ADMIN_URL */], "admin.php?page=wc-settings&tab=checkout§ion=payubiz"),
|
3026 |
+
target: "_blank",
|
3027 |
+
type: "external"
|
3028 |
+
});
|
3029 |
+
var accountLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
3030 |
+
href: 'https://onboarding.payu.in/app/account',
|
3031 |
+
target: "_blank",
|
3032 |
+
type: "external"
|
3033 |
+
});
|
3034 |
+
var configureText = lib_default()({
|
3035 |
+
mixedString: Object(external_this_wp_i18n_["__"])('PayU can be configured under your {{settingsLink}}store settings.{{/settingsLink}} Create your PayU account {{accountLink}}here.{{/accountLink}}', 'woocommerce-admin'),
|
3036 |
+
components: {
|
3037 |
+
accountLink: accountLink,
|
3038 |
+
settingsLink: settingsLink
|
3039 |
+
}
|
3040 |
+
});
|
3041 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("p", null, configureText), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
3042 |
+
isPrimary: true,
|
3043 |
+
onClick: onFinish
|
3044 |
+
}, Object(external_this_wp_i18n_["__"])('Continue', 'woocommerce-admin')));
|
3045 |
+
};
|
3046 |
+
// CONCATENATED MODULE: ./client/task-list/tasks/payments/methods.js
|
3047 |
+
|
3048 |
+
|
3049 |
+
/**
|
3050 |
+
* External dependencies
|
3051 |
+
*/
|
3052 |
+
|
3053 |
+
|
3054 |
+
|
3055 |
+
|
3056 |
+
/**
|
3057 |
+
* Internal dependencies
|
3058 |
+
*/
|
3059 |
+
|
3060 |
+
|
3061 |
+
|
3062 |
+
|
3063 |
+
|
3064 |
+
|
3065 |
+
|
3066 |
+
|
3067 |
+
|
3068 |
+
|
3069 |
+
|
3070 |
+
|
3071 |
+
|
3072 |
+
|
3073 |
+
|
3074 |
+
|
3075 |
+
|
3076 |
+
|
3077 |
+
function getPaymentMethods(_ref) {
|
3078 |
+
var activePlugins = _ref.activePlugins,
|
3079 |
+
countryCode = _ref.countryCode,
|
3080 |
+
createNotice = _ref.createNotice,
|
3081 |
+
installAndActivatePlugins = _ref.installAndActivatePlugins,
|
3082 |
+
onboardingStatus = _ref.onboardingStatus,
|
3083 |
+
options = _ref.options,
|
3084 |
+
profileItems = _ref.profileItems,
|
3085 |
+
paypalOnboardingStatus = _ref.paypalOnboardingStatus,
|
3086 |
+
loadingPaypalStatus = _ref.loadingPaypalStatus;
|
3087 |
+
var _onboardingStatus$str = onboardingStatus.stripeSupportedCountries,
|
3088 |
+
stripeSupportedCountries = _onboardingStatus$str === void 0 ? [] : _onboardingStatus$str,
|
3089 |
+
_onboardingStatus$wcP = onboardingStatus.wcPayIsConnected,
|
3090 |
+
wcPayIsConnected = _onboardingStatus$wcP === void 0 ? false : _onboardingStatus$wcP,
|
3091 |
+
_onboardingStatus$ena = onboardingStatus.enabledPaymentGateways,
|
3092 |
+
enabledPaymentGateways = _onboardingStatus$ena === void 0 ? [] : _onboardingStatus$ena;
|
3093 |
+
var hasCbdIndustry = (profileItems.industry || []).some(function (_ref2) {
|
3094 |
+
var slug = _ref2.slug;
|
3095 |
+
return slug === 'cbd-other-hemp-derived-products';
|
3096 |
+
}); // Whether publishable and secret keys are filled for given mode.
|
3097 |
+
|
3098 |
+
var isStripeConfigured = options.woocommerce_stripe_settings && (options.woocommerce_stripe_settings.testmode === 'no' ? options.woocommerce_stripe_settings.publishable_key && options.woocommerce_stripe_settings.secret_key : options.woocommerce_stripe_settings.test_publishable_key && options.woocommerce_stripe_settings.test_secret_key);
|
3099 |
+
var methods = [{
|
3100 |
+
key: 'stripe',
|
3101 |
+
title: Object(external_this_wp_i18n_["__"])('Credit cards - powered by Stripe', 'woocommerce-admin'),
|
3102 |
+
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('Accept debit and credit cards in 135+ currencies, methods such as Alipay, ' + 'and one-touch checkout with Apple Pay.', 'woocommerce-admin')),
|
3103 |
+
before: Object(external_this_wp_element_["createElement"])("img", {
|
3104 |
+
src: wc_admin_settings["e" /* WC_ASSET_URL */] + 'images/stripe.png',
|
3105 |
+
alt: ""
|
3106 |
+
}),
|
3107 |
+
visible: stripeSupportedCountries.includes(countryCode) && !hasCbdIndustry,
|
3108 |
+
plugins: ['woocommerce-gateway-stripe'],
|
3109 |
+
container: Object(external_this_wp_element_["createElement"])(stripe, null),
|
3110 |
+
isConfigured: isStripeConfigured,
|
3111 |
+
isEnabled: options.woocommerce_stripe_settings && options.woocommerce_stripe_settings.enabled === 'yes',
|
3112 |
+
optionName: 'woocommerce_stripe_settings'
|
3113 |
+
}, {
|
3114 |
+
key: 'paypal',
|
3115 |
+
title: Object(external_this_wp_i18n_["__"])('PayPal Payments', 'woocommerce-admin'),
|
3116 |
+
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])("Safe and secure payments using credit cards or your customer's PayPal account.", 'woocommerce-admin')),
|
3117 |
+
before: Object(external_this_wp_element_["createElement"])("img", {
|
3118 |
+
src: wc_admin_settings["e" /* WC_ASSET_URL */] + 'images/paypal.png',
|
3119 |
+
alt: ""
|
3120 |
+
}),
|
3121 |
+
visible: !hasCbdIndustry,
|
3122 |
+
plugins: [PAYPAL_PLUGIN],
|
3123 |
+
container: Object(external_this_wp_element_["createElement"])(paypal, null),
|
3124 |
+
isConfigured: paypalOnboardingStatus && paypalOnboardingStatus.production && paypalOnboardingStatus.production.onboarded,
|
3125 |
+
isEnabled: enabledPaymentGateways.includes('ppcp-gateway'),
|
3126 |
+
optionName: 'woocommerce_ppcp-gateway_settings',
|
3127 |
+
loading: activePlugins.includes(PAYPAL_PLUGIN) ? loadingPaypalStatus : false
|
3128 |
+
}, {
|
3129 |
+
key: 'klarna_checkout',
|
3130 |
+
title: Object(external_this_wp_i18n_["__"])('Klarna Checkout', 'woocommerce-admin'),
|
3131 |
+
content: Object(external_this_wp_i18n_["__"])('Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries.', 'woocommerce-admin'),
|
3132 |
+
before: Object(external_this_wp_element_["createElement"])("img", {
|
3133 |
+
src: wc_admin_settings["e" /* WC_ASSET_URL */] + 'images/klarna-black.png',
|
3134 |
+
alt: ""
|
3135 |
+
}),
|
3136 |
+
visible: ['SE', 'FI', 'NO'].includes(countryCode) && !hasCbdIndustry,
|
3137 |
+
plugins: ['klarna-checkout-for-woocommerce'],
|
3138 |
+
container: Object(external_this_wp_element_["createElement"])(klarna, {
|
3139 |
+
plugin: 'checkout'
|
3140 |
+
}),
|
3141 |
+
// @todo This should check actual Klarna connection information.
|
3142 |
+
isConfigured: activePlugins.includes('klarna-checkout-for-woocommerce'),
|
3143 |
+
isEnabled: options.woocommerce_kco_settings && options.woocommerce_kco_settings.enabled === 'yes',
|
3144 |
+
optionName: 'woocommerce_kco_settings'
|
3145 |
+
}, {
|
3146 |
+
key: 'klarna_payments',
|
3147 |
+
title: Object(external_this_wp_i18n_["__"])('Klarna Payments', 'woocommerce-admin'),
|
3148 |
+
content: Object(external_this_wp_i18n_["__"])('Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries.', 'woocommerce-admin'),
|
3149 |
+
before: Object(external_this_wp_element_["createElement"])("img", {
|
3150 |
+
src: wc_admin_settings["e" /* WC_ASSET_URL */] + 'images/klarna-black.png',
|
3151 |
+
alt: ""
|
3152 |
+
}),
|
3153 |
+
visible: ['DK', 'DE', 'AT', 'NL', 'CH', 'BE', 'SP', 'PL', 'FR', 'IT', 'GB'].includes(countryCode) && !hasCbdIndustry,
|
3154 |
+
plugins: ['klarna-payments-for-woocommerce'],
|
3155 |
+
container: Object(external_this_wp_element_["createElement"])(klarna, {
|
3156 |
+
plugin: 'payments'
|
3157 |
+
}),
|
3158 |
+
// @todo This should check actual Klarna connection information.
|
3159 |
+
isConfigured: activePlugins.includes('klarna-payments-for-woocommerce'),
|
3160 |
+
isEnabled: options.woocommerce_klarna_payments_settings && options.woocommerce_klarna_payments_settings.enabled === 'yes',
|
3161 |
+
optionName: 'woocommerce_klarna_payments_settings'
|
3162 |
+
}, {
|
3163 |
+
key: 'mollie',
|
3164 |
+
title: Object(external_this_wp_i18n_["__"])('Mollie Payments for WooCommerce', 'woocommerce-admin'),
|
3165 |
+
before: Object(external_this_wp_element_["createElement"])(mollie_MollieLogo, null),
|
3166 |
+
plugins: ['mollie-payments-for-woocommerce'],
|
3167 |
+
isConfigured: activePlugins.includes('mollie-payments-for-woocommerce'),
|
3168 |
+
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('Effortless payments by Mollie: Offer global and local payment methods, get onboarded in minutes, and supported in your language.', 'woocommerce-admin')),
|
3169 |
+
visible: ['FR', 'DE', 'GB', 'AT', 'CH', 'ES', 'IT', 'PL', 'FI', 'NL', 'BE'].includes(countryCode),
|
3170 |
+
container: Object(external_this_wp_element_["createElement"])(mollie_Mollie, null),
|
3171 |
+
isEnabled: options.woocommerce_mollie_payments_settings && options.woocommerce_mollie_payments_settings.enabled === 'yes',
|
3172 |
+
optionName: 'woocommerce_mollie_payments_settings'
|
3173 |
+
}, {
|
3174 |
+
key: 'square',
|
3175 |
+
title: Object(external_this_wp_i18n_["__"])('Square', 'woocommerce-admin'),
|
3176 |
+
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('Securely accept credit and debit cards with one low rate, no surprise fees (custom rates available). ' + 'Sell online and in store and track sales and inventory in one place.', 'woocommerce-admin'), hasCbdIndustry && Object(external_this_wp_element_["createElement"])("span", {
|
3177 |
+
className: "text-style-strong"
|
3178 |
+
}, Object(external_this_wp_i18n_["__"])(' Selling CBD products is only supported by Square.', 'woocommerce-admin'))),
|
3179 |
+
before: Object(external_this_wp_element_["createElement"])("img", {
|
3180 |
+
src: "".concat(wc_admin_settings["e" /* WC_ASSET_URL */], "images/square-black.png"),
|
3181 |
+
alt: ""
|
3182 |
+
}),
|
3183 |
+
visible: hasCbdIndustry && ['US'].includes(countryCode) || ['brick-mortar', 'brick-mortar-other'].includes(profileItems.selling_venues) && ['US', 'CA', 'JP', 'GB', 'AU'].includes(countryCode),
|
3184 |
+
plugins: ['woocommerce-square'],
|
3185 |
+
container: Object(external_this_wp_element_["createElement"])(square, null),
|
3186 |
+
isConfigured: options.wc_square_refresh_tokens && options.wc_square_refresh_tokens.length,
|
3187 |
+
isEnabled: options.woocommerce_square_credit_card_settings && options.woocommerce_square_credit_card_settings.enabled === 'yes',
|
3188 |
+
optionName: 'woocommerce_square_credit_card_settings',
|
3189 |
+
hasCbdIndustry: hasCbdIndustry
|
3190 |
+
}, {
|
3191 |
+
key: 'payfast',
|
3192 |
+
title: Object(external_this_wp_i18n_["__"])('PayFast', 'woocommerce-admin'),
|
3193 |
+
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('The PayFast extension for WooCommerce enables you to accept payments by Credit Card and EFT via one of South Africa’s most popular payment gateways. No setup fees or monthly subscription costs.', 'woocommerce-admin'), Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_i18n_["__"])('Selecting this extension will configure your store to use South African rands as the selected currency.', 'woocommerce-admin'))),
|
3194 |
+
before: Object(external_this_wp_element_["createElement"])("img", {
|
3195 |
+
src: wc_admin_settings["e" /* WC_ASSET_URL */] + 'images/payfast.png',
|
3196 |
+
alt: "PayFast logo"
|
3197 |
+
}),
|
3198 |
+
visible: ['ZA'].includes(countryCode) && !hasCbdIndustry,
|
3199 |
+
plugins: ['woocommerce-payfast-gateway'],
|
3200 |
+
container: Object(external_this_wp_element_["createElement"])(payfast, null),
|
3201 |
+
isConfigured: options.woocommerce_payfast_settings && options.woocommerce_payfast_settings.merchant_id && options.woocommerce_payfast_settings.merchant_key && options.woocommerce_payfast_settings.pass_phrase,
|
3202 |
+
isEnabled: options.woocommerce_payfast_settings && options.woocommerce_payfast_settings.enabled === 'yes',
|
3203 |
+
optionName: 'woocommerce_payfast_settings'
|
3204 |
+
}, {
|
3205 |
+
key: 'eway',
|
3206 |
+
title: Object(external_this_wp_i18n_["__"])('eWAY', 'woocommerce-admin'),
|
3207 |
+
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('The eWAY extension for WooCommerce allows you to take credit card payments directly on your store without redirecting your customers to a third party site to make payment.', 'woocommerce-admin')),
|
3208 |
+
before: Object(external_this_wp_element_["createElement"])("img", {
|
3209 |
+
src: wc_admin_settings["e" /* WC_ASSET_URL */] + 'images/eway-logo.jpg',
|
3210 |
+
alt: "eWAY logo"
|
3211 |
+
}),
|
3212 |
+
visible: ['AU', 'NZ'].includes(countryCode) && !hasCbdIndustry,
|
3213 |
+
plugins: ['woocommerce-gateway-eway'],
|
3214 |
+
container: Object(external_this_wp_element_["createElement"])(eway, null),
|
3215 |
+
isConfigured: options.woocommerce_eway_settings && options.woocommerce_eway_settings.customer_api && options.woocommerce_eway_settings.customer_password,
|
3216 |
+
isEnabled: options.woocommerce_eway_settings && options.woocommerce_eway_settings.enabled === 'yes',
|
3217 |
+
optionName: 'woocommerce_eway_settings'
|
3218 |
+
}, {
|
3219 |
+
key: 'razorpay',
|
3220 |
+
title: Object(external_this_wp_i18n_["__"])('Razorpay', 'woocommerce-admin'),
|
3221 |
+
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('The official Razorpay extension for WooCommerce allows you to accept credit cards, debit cards, netbanking, wallet, and UPI payments.', 'woocommerce-admin')),
|
3222 |
+
before: Object(external_this_wp_element_["createElement"])(razorpay, null),
|
3223 |
+
visible: countryCode === 'IN' && !hasCbdIndustry,
|
3224 |
+
plugins: ['woo-razorpay'],
|
3225 |
+
container: Object(external_this_wp_element_["createElement"])(payments_razorpay, null),
|
3226 |
+
isConfigured: options.woocommerce_razorpay_settings && options.woocommerce_razorpay_settings.key_id && options.woocommerce_razorpay_settings.key_secret,
|
3227 |
+
isEnabled: options.woocommerce_razorpay_settings && options.woocommerce_razorpay_settings.enabled === 'yes',
|
3228 |
+
optionName: 'woocommerce_razorpay_settings'
|
3229 |
+
}, {
|
3230 |
+
key: 'payubiz',
|
3231 |
+
title: Object(external_this_wp_i18n_["__"])('PayU for WooCommerce', 'woocommerce-admin'),
|
3232 |
+
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('Enable PayU’s exclusive plugin for WooCommerce to start accepting payments in 100+ payment methods available in India including credit cards, debit cards, UPI, & more!', 'woocommerce-admin')),
|
3233 |
+
before: Object(external_this_wp_element_["createElement"])(payu_india_PayUIndiaLogo, null),
|
3234 |
+
visible: countryCode === 'IN' && !hasCbdIndustry,
|
3235 |
+
plugins: ['payu-india'],
|
3236 |
+
container: Object(external_this_wp_element_["createElement"])(payu_india_PayUIndia, null),
|
3237 |
+
isConfigured: activePlugins.includes('payu-india'),
|
3238 |
+
isEnabled: enabledPaymentGateways.includes('payubiz'),
|
3239 |
+
optionName: 'woocommerce_payubiz_settings'
|
3240 |
+
}, {
|
3241 |
+
key: 'cod',
|
3242 |
+
title: Object(external_this_wp_i18n_["__"])('Cash on delivery', 'woocommerce-admin'),
|
3243 |
+
content: Object(external_this_wp_i18n_["__"])('Take payments in cash upon delivery.', 'woocommerce-admin'),
|
3244 |
+
before: Object(external_this_wp_element_["createElement"])(cod, null),
|
3245 |
+
visible: !hasCbdIndustry,
|
3246 |
+
isEnabled: options.woocommerce_cod_settings && options.woocommerce_cod_settings.enabled === 'yes',
|
3247 |
+
optionName: 'woocommerce_cod_settings'
|
3248 |
+
}, {
|
3249 |
+
key: 'bacs',
|
3250 |
+
title: Object(external_this_wp_i18n_["__"])('Direct bank transfer', 'woocommerce-admin'),
|
3251 |
+
content: Object(external_this_wp_i18n_["__"])('Take payments via bank transfer.', 'woocommerce-admin'),
|
3252 |
+
before: Object(external_this_wp_element_["createElement"])(images_bacs, null),
|
3253 |
+
visible: !hasCbdIndustry,
|
3254 |
+
container: Object(external_this_wp_element_["createElement"])(bacs, null),
|
3255 |
+
isConfigured: options.woocommerce_bacs_accounts && options.woocommerce_bacs_accounts.length,
|
3256 |
+
isEnabled: options.woocommerce_bacs_settings && options.woocommerce_bacs_settings.enabled === 'yes',
|
3257 |
+
optionName: 'woocommerce_bacs_settings'
|
3258 |
+
}];
|
3259 |
+
|
3260 |
+
if (window.wcAdminFeatures.wcpay) {
|
3261 |
+
var tosLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
3262 |
+
href: 'https://wordpress.com/tos/',
|
3263 |
+
target: "_blank",
|
3264 |
+
type: "external"
|
3265 |
+
});
|
3266 |
+
var tosPrompt = lib_default()({
|
3267 |
+
mixedString: Object(external_this_wp_i18n_["__"])('By clicking "Set up," you agree to the {{link}}Terms of Service{{/link}}', 'woocommerce-admin'),
|
3268 |
+
components: {
|
3269 |
+
link: tosLink
|
3270 |
+
}
|
3271 |
+
});
|
3272 |
+
var wcPayDocLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
3273 |
+
href: 'https://docs.woocommerce.com/document/payments/testing/dev-mode/',
|
3274 |
+
target: "_blank",
|
3275 |
+
type: "external"
|
3276 |
+
});
|
3277 |
+
var wcPayDocPrompt = lib_default()({
|
3278 |
+
mixedString: Object(external_this_wp_i18n_["__"])('Setting up a store for a client? {{link}}Start here{{/link}}', 'woocommerce-admin'),
|
3279 |
+
components: {
|
3280 |
+
link: wcPayDocLink
|
3281 |
+
}
|
3282 |
+
});
|
3283 |
+
var wcPaySettingsLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
3284 |
+
href: Object(wc_admin_settings["f" /* getAdminLink */])('admin.php?page=wc-settings&tab=checkout§ion=woocommerce_payments'),
|
3285 |
+
type: "wp-admin"
|
3286 |
+
}, Object(external_this_wp_i18n_["__"])('Settings', 'woocommerce-admin'));
|
3287 |
+
var wcPayFeesLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
3288 |
+
href: 'https://docs.woocommerce.com/document/payments/faq/fees/',
|
3289 |
+
target: "_blank",
|
3290 |
+
type: "external"
|
3291 |
+
});
|
3292 |
+
var wooPaymentsCopy = lib_default()({
|
3293 |
+
mixedString: Object(external_this_wp_i18n_["__"])('Accept credit card payments the easy way! {{feesLink}}No setup fees. No monthly fees.{{/feesLink}}', 'woocommerce-admin'),
|
3294 |
+
components: {
|
3295 |
+
feesLink: wcPayFeesLink
|
3296 |
+
}
|
3297 |
+
});
|
3298 |
+
methods.unshift({
|
3299 |
+
key: 'wcpay',
|
3300 |
+
title: Object(external_this_wp_i18n_["__"])('WooCommerce Payments', 'woocommerce-admin'),
|
3301 |
+
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, wooPaymentsCopy, wcPayIsConnected && wcPaySettingsLink, !wcPayIsConnected && Object(external_this_wp_element_["createElement"])("p", null, tosPrompt), profileItems.setup_client && Object(external_this_wp_element_["createElement"])("p", null, wcPayDocPrompt), Object(external_this_wp_element_["createElement"])(payments_wcpay["b" /* WCPayUsageModal */], null)),
|
3302 |
+
before: Object(external_this_wp_element_["createElement"])(wcpay, null),
|
3303 |
+
onClick: function onClick(resolve, reject) {
|
3304 |
+
return Object(payments_wcpay["c" /* installActivateAndConnectWcpay */])(reject, createNotice, installAndActivatePlugins);
|
3305 |
+
},
|
3306 |
+
visible: Object(payments_wcpay["d" /* isWCPaySupported */])(countryCode) && !hasCbdIndustry,
|
3307 |
+
plugins: ['woocommerce-payments'],
|
3308 |
+
container: Object(external_this_wp_element_["createElement"])(payments_wcpay["a" /* WCPay */], null),
|
3309 |
+
isConfigured: wcPayIsConnected,
|
3310 |
+
isEnabled: options.woocommerce_woocommerce_payments_settings && options.woocommerce_woocommerce_payments_settings.enabled === 'yes',
|
3311 |
+
optionName: 'woocommerce_woocommerce_payments_settings'
|
3312 |
+
});
|
3313 |
+
}
|
3314 |
+
|
3315 |
+
return methods.filter(function (method) {
|
3316 |
+
return method.visible;
|
3317 |
+
});
|
3318 |
+
}
|
3319 |
|
3320 |
/***/ })
|
3321 |
|
dist/chunks/5.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[5],{500:function(e,t,r){"use strict";r.d(t,"e",(function(){return u})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return b})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return _})),r.d(t,"f",(function(){return f})),r.d(t,"h",(function(){return O})),r.d(t,"g",(function(){return y}));var a=r(23),o=r(26),c=r.n(o),n=r(3),i=r(21),l=r(22),m=r(25),s=r(501);function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.identity;return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1?arguments[1]:void 0,n="function"==typeof e?e(o):e,l=Object(i.getIdsFromQuery)(r);if(l.length<1)return Promise.resolve([]);var m={include:l.join(","),per_page:l.length};return c()({path:Object(a.addQueryArgs)(n,m)}).then((function(e){return e.map(t)}))}}u(l.NAMESPACE+"/products/attributes",(function(e){return{key:e.id,label:e.name}}));var d=u(l.NAMESPACE+"/products/categories",(function(e){return{key:e.id,label:e.name}})),b=u(l.NAMESPACE+"/coupons",(function(e){return{key:e.id,label:e.code}})),p=u(l.NAMESPACE+"/customers",(function(e){return{key:e.id,label:e.name}})),_=u(l.NAMESPACE+"/products",(function(e){return{key:e.id,label:e.name}})),f=u(l.NAMESPACE+"/taxes",(function(e){return{key:e.id,label:Object(s.a)(e)}}));function O(e){var t=e.attributes,r=e.name,a=Object(m.g)("variationTitleAttributesSeparator"," - ");if(r.indexOf(a)>-1)return r;var o=t.map((function(e){return e.option})).join(", ");return o?r+a+o:r}var y=u((function(e){var t=e.products;return t?l.NAMESPACE+"/products/".concat(t,"/variations"):l.NAMESPACE+"/variations"}),(function(e){return{key:e.id,label:O(e)}}))},501:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var a=r(2);function o(e){return[e.country,e.state,e.name||Object(a.__)("TAX","woocommerce-admin"),e.priority].map((function(e){return e.toString().toUpperCase().trim()})).filter(Boolean).join("-")}},502:function(e,t,r){"use strict";var a=r(5),o=r.n(a),c=r(12),n=r.n(c),i=r(13),l=r.n(i),m=r(14),s=r.n(m),u=r(15),d=r.n(u),b=r(7),p=r.n(b),_=r(0),f=r(2),O=r(20),y=r(75),v=r(11),j=r(3),g=r(1),h=r.n(g),w=r(47),S=r(22),R=r(29),C=r(498),D=r(499),x=r(21);function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=p()(e);if(t){var o=p()(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return d()(this,r)}}var q=function(e){s()(r,e);var t=P(r);function r(){return n()(this,r),t.apply(this,arguments)}return l()(r,[{key:"shouldComponentUpdate",value:function(e){return e.isRequesting!==this.props.isRequesting||e.primaryData.isRequesting!==this.props.primaryData.isRequesting||e.secondaryData.isRequesting!==this.props.secondaryData.isRequesting||!Object(j.isEqual)(e.query,this.props.query)}},{key:"getItemChartData",value:function(){var e=this.props,t=e.primaryData,r=e.selectedChart;return t.data.intervals.map((function(e){var t={};return e.subtotals.segments.forEach((function(e){if(e.segment_label){var a=t[e.segment_label]?e.segment_label+" (#"+e.segment_id+")":e.segment_label;t[e.segment_id]={label:a,value:e.subtotals[r.key]||0}}})),A({date:Object(y.format)("Y-m-d\\TH:i:s",e.date_start)},t)}))}},{key:"getTimeChartData",value:function(){var e=this.props,t=e.query,r=e.primaryData,a=e.secondaryData,o=e.selectedChart,c=e.defaultDateRange,n=Object(R.getIntervalForQuery)(t),i=Object(R.getCurrentDates)(t,c),l=i.primary,m=i.secondary;return r.data.intervals.map((function(e,r){var c=Object(R.getPreviousDate)(e.date_start,l.after,m.after,t.compare,n),i=a.data.intervals[r];return{date:Object(y.format)("Y-m-d\\TH:i:s",e.date_start),primary:{label:"".concat(l.label," (").concat(l.range,")"),labelDate:e.date_start,value:e.subtotals[o.key]||0},secondary:{label:"".concat(m.label," (").concat(m.range,")"),labelDate:c.format("YYYY-MM-DD HH:mm:ss"),value:i&&i.subtotals[o.key]||0}}}))}},{key:"getTimeChartTotals",value:function(){var e=this.props,t=e.primaryData,r=e.secondaryData,a=e.selectedChart;return{primary:Object(j.get)(t,["data","totals",a.key],null),secondary:Object(j.get)(r,["data","totals",a.key],null)}}},{key:"renderChart",value:function(e,t,r,a){var o=this.props,c=o.emptySearchResults,n=o.filterParam,i=o.interactiveLegend,l=o.itemsLabel,m=o.legendPosition,s=o.path,u=o.query,d=o.selectedChart,b=o.showHeaderControls,p=o.primaryData,O=Object(R.getIntervalForQuery)(u),y=Object(R.getAllowedIntervalsForQuery)(u),v=Object(R.getDateFormatsForInterval)(O,p.data.intervals.length),j=c?Object(f.__)("No data for the current search","woocommerce-admin"):Object(f.__)("No data for the selected date range","woocommerce-admin"),g=this.context,h=g.formatAmount,C=g.getCurrencyConfig;return Object(_.createElement)(w.Chart,{allowedIntervals:y,data:r,dateParser:"%Y-%m-%dT%H:%M:%S",emptyMessage:j,filterParam:n,interactiveLegend:i,interval:O,isRequesting:t,itemsLabel:l,legendPosition:m,legendTotals:a,mode:e,path:s,query:u,screenReaderFormat:v.screenReaderFormat,showHeaderControls:b,title:d.label,tooltipLabelFormat:v.tooltipLabelFormat,tooltipTitle:"time-comparison"===e&&d.label||null,tooltipValueFormat:Object(S.getTooltipValueFormat)(d.type,h),chartType:Object(R.getChartTypeForQuery)(u),valueType:d.type,xFormat:v.xFormat,x2Format:v.x2Format,currency:C()})}},{key:"renderItemComparison",value:function(){var e=this.props,t=e.isRequesting,r=e.primaryData;if(r.isError)return Object(_.createElement)(D.a,{isError:!0});var a=t||r.isRequesting,o=this.getItemChartData();return this.renderChart("item-comparison",a,o)}},{key:"renderTimeComparison",value:function(){var e=this.props,t=e.isRequesting,r=e.primaryData,a=e.secondaryData;if(!r||r.isError||a.isError)return Object(_.createElement)(D.a,{isError:!0});var o=t||r.isRequesting||a.isRequesting,c=this.getTimeChartData(),n=this.getTimeChartTotals();return this.renderChart("time-comparison",o,c,n)}},{key:"render",value:function(){return"item-comparison"===this.props.mode?this.renderItemComparison():this.renderTimeComparison()}}]),r}(_.Component);q.contextType=C.a,q.propTypes={filters:h.a.array,isRequesting:h.a.bool,itemsLabel:h.a.string,limitProperties:h.a.array,mode:h.a.string,path:h.a.string.isRequired,primaryData:h.a.object,query:h.a.object.isRequired,secondaryData:h.a.object,selectedChart:h.a.shape({key:h.a.string.isRequired,label:h.a.string.isRequired,order:h.a.oneOf(["asc","desc"]),orderby:h.a.string,type:h.a.oneOf(["average","number","currency"]).isRequired}).isRequired},q.defaultProps={isRequesting:!1,primaryData:{data:{intervals:[]},isError:!1,isRequesting:!1},secondaryData:{data:{intervals:[]},isError:!1,isRequesting:!1}};t.a=Object(O.compose)(Object(v.withSelect)((function(e,t){var r=t.charts,a=t.endpoint,o=t.filters,c=t.isRequesting,n=t.limitProperties,i=t.query,l=t.advancedFilters,m=n||[a],s=function e(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t||0===t.length)return null;var o=t.slice(0),c=o.pop();if(c.showFilters(r,a)){var n=Object(x.flattenFilters)(c.filters),i=r[c.param]||c.defaultValue||"all";return Object(j.find)(n,{value:i})}return e(o,r,a)}(o,i),u=Object(j.get)(s,["settings","param"]),d=t.mode||function(e,t){if(e&&t){var r=Object(j.get)(e,["settings","param"]);if(!r||Object.keys(t).includes(r))return Object(j.get)(e,["chartMode"])}return null}(s,i)||"time-comparison",b=e(S.SETTINGS_STORE_NAME).getSetting("wc_admin","wcAdminSettings").woocommerce_default_date_range,p={mode:d,filterParam:u,defaultDateRange:b};if(c)return p;var _=m.some((function(e){return i[e]&&i[e].length}));if(i.search&&!_)return A(A({},p),{},{emptySearchResults:!0});var f=r&&r.map((function(e){return e.key})),O=Object(S.getReportChartData)({endpoint:a,dataType:"primary",query:i,select:e,limitBy:m,filters:o,advancedFilters:l,defaultDateRange:b,fields:f});if("item-comparison"===d)return A(A({},p),{},{primaryData:O});var y=Object(S.getReportChartData)({endpoint:a,dataType:"secondary",query:i,select:e,limitBy:m,filters:o,advancedFilters:l,defaultDateRange:b,fields:f});return A(A({},p),{},{primaryData:O,secondaryData:y})})))(q)},532:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return m}));var a=r(2),o=r(43),c=r(25),n=r(500),i=Object(o.applyFilters)("woocommerce_admin_orders_report_charts",[{key:"orders_count",label:Object(a.__)("Orders","woocommerce-admin"),type:"number"},{key:"net_revenue",label:Object(a.__)("Net Sales","woocommerce-admin"),order:"desc",orderby:"net_total",type:"currency"},{key:"avg_order_value",label:Object(a.__)("Average Order Value","woocommerce-admin"),type:"currency"},{key:"avg_items_per_order",label:Object(a.__)("Average Items Per Order","woocommerce-admin"),order:"desc",orderby:"num_items_sold",type:"average"}]),l=Object(o.applyFilters)("woocommerce_admin_orders_report_filters",[{label:Object(a.__)("Show","woocommerce-admin"),staticParams:["chartType","paged","per_page"],param:"filter",showFilters:function(){return!0},filters:[{label:Object(a.__)("All Orders","woocommerce-admin"),value:"all"},{label:Object(a.__)("Advanced Filters","woocommerce-admin"),value:"advanced"}]}]),m=Object(o.applyFilters)("woocommerce_admin_orders_report_advanced_filters",{title:Object(a._x)("Orders Match {{select /}} Filters","A sentence describing filters for Orders. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ","woocommerce-admin"),filters:{status:{labels:{add:Object(a.__)("Order Status","woocommerce-admin"),remove:Object(a.__)("Remove order status filter","woocommerce-admin"),rule:Object(a.__)("Select an order status filter match","woocommerce-admin"),title:Object(a.__)("{{title}}Order Status{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(a.__)("Select an order status","woocommerce-admin")},rules:[{value:"is",label:Object(a._x)("Is","order status","woocommerce-admin")},{value:"is_not",label:Object(a._x)("Is Not","order status","woocommerce-admin")}],input:{component:"SelectControl",options:Object.keys(c.d).map((function(e){return{value:e,label:c.d[e]}}))}},product:{labels:{add:Object(a.__)("Products","woocommerce-admin"),placeholder:Object(a.__)("Search products","woocommerce-admin"),remove:Object(a.__)("Remove products filter","woocommerce-admin"),rule:Object(a.__)("Select a product filter match","woocommerce-admin"),title:Object(a.__)("{{title}}Product{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(a.__)("Select products","woocommerce-admin")},rules:[{value:"includes",label:Object(a._x)("Includes","products","woocommerce-admin")},{value:"excludes",label:Object(a._x)("Excludes","products","woocommerce-admin")}],input:{component:"Search",type:"products",getLabels:n.d}},variation:{labels:{add:Object(a.__)("Variations","woocommerce-admin"),placeholder:Object(a.__)("Search variations","woocommerce-admin"),remove:Object(a.__)("Remove variations filter","woocommerce-admin"),rule:Object(a.__)("Select a variation filter match","woocommerce-admin"),title:Object(a.__)("{{title}}Variation{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(a.__)("Select variation","woocommerce-admin")},rules:[{value:"includes",label:Object(a._x)("Includes","variations","woocommerce-admin")},{value:"excludes",label:Object(a._x)("Excludes","variations","woocommerce-admin")}],input:{component:"Search",type:"variations",getLabels:n.g}},coupon:{labels:{add:Object(a.__)("Coupon Codes","woocommerce-admin"),placeholder:Object(a.__)("Search coupons","woocommerce-admin"),remove:Object(a.__)("Remove coupon filter","woocommerce-admin"),rule:Object(a.__)("Select a coupon filter match","woocommerce-admin"),title:Object(a.__)("{{title}}Coupon Code{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(a.__)("Select coupon codes","woocommerce-admin")},rules:[{value:"includes",label:Object(a._x)("Includes","coupon code","woocommerce-admin")},{value:"excludes",label:Object(a._x)("Excludes","coupon code","woocommerce-admin")}],input:{component:"Search",type:"coupons",getLabels:n.b}},customer_type:{labels:{add:Object(a.__)("Customer Type","woocommerce-admin"),remove:Object(a.__)("Remove customer filter","woocommerce-admin"),rule:Object(a.__)("Select a customer filter match","woocommerce-admin"),title:Object(a.__)("{{title}}Customer is{{/title}} {{filter /}}","woocommerce-admin"),filter:Object(a.__)("Select a customer type","woocommerce-admin")},input:{component:"SelectControl",options:[{value:"new",label:Object(a.__)("New","woocommerce-admin")},{value:"returning",label:Object(a.__)("Returning","woocommerce-admin")}],defaultOption:"new"}},refunds:{labels:{add:Object(a.__)("Refunds","woocommerce-admin"),remove:Object(a.__)("Remove refunds filter","woocommerce-admin"),rule:Object(a.__)("Select a refund filter match","woocommerce-admin"),title:Object(a.__)("{{title}}Refunds{{/title}} {{filter /}}","woocommerce-admin"),filter:Object(a.__)("Select a refund type","woocommerce-admin")},input:{component:"SelectControl",options:[{value:"all",label:Object(a.__)("All","woocommerce-admin")},{value:"partial",label:Object(a.__)("Partially refunded","woocommerce-admin")},{value:"full",label:Object(a.__)("Fully refunded","woocommerce-admin")},{value:"none",label:Object(a.__)("None","woocommerce-admin")}],defaultOption:"all"}},tax_rate:{labels:{add:Object(a.__)("Tax Rates","woocommerce-admin"),placeholder:Object(a.__)("Search tax rates","woocommerce-admin"),remove:Object(a.__)("Remove tax rate filter","woocommerce-admin"),rule:Object(a.__)("Select a tax rate filter match","woocommerce-admin"),title:Object(a.__)("{{title}}Tax Rate{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(a.__)("Select tax rates","woocommerce-admin")},rules:[{value:"includes",label:Object(a._x)("Includes","tax rate","woocommerce-admin")},{value:"excludes",label:Object(a._x)("Excludes","tax rate","woocommerce-admin")}],input:{component:"Search",type:"taxes",getLabels:n.f}},attribute:{allowMultiple:!0,labels:{add:Object(a.__)("Attribute","woocommerce-admin"),placeholder:Object(a.__)("Search attributes","woocommerce-admin"),remove:Object(a.__)("Remove attribute filter","woocommerce-admin"),rule:Object(a.__)("Select a product attribute filter match","woocommerce-admin"),title:Object(a.__)("{{title}}Attribute{{/title}} {{rule /}} {{filter /}}","woocommerce-admin"),filter:Object(a.__)("Select attributes","woocommerce-admin")},rules:[{value:"is",label:Object(a._x)("Is","product attribute","woocommerce-admin")},{value:"is_not",label:Object(a._x)("Is Not","product attribute","woocommerce-admin")}],input:{component:"ProductAttribute"}}}})}}]);
|
1 |
+
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[5],{507:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var c=n(11);function r(e){var t=Object(c.dispatch)("core/notices").createNotice;e.error_data&&e.errors&&Object.keys(e.errors).length?Object.keys(e.errors).forEach((function(n){t("error",e.errors[n].join(" "))})):e.message&&t(e.code?"error":"success",e.message)}},509:function(e,t,n){"use strict";n.r(t);var c=n(18),r=n.n(c),o=n(0),a=n(2),i=n(21),s=n(28),l=n.n(s),m=n(47),u=n(510);t.default=function(){var e="1"===Object(i.getQuery)()["wcpay-connection-success"],t=Object(o.useState)(e),n=r()(t,2),c=n[0],s=n[1];if(!c)return null;var p=function(){s(!1),Object(i.updateQueryString)({"wcpay-connection-success":void 0})},d=Object(a.__)("Help us build a better WooCommerce Payments experience","woocommerce-admin"),b=l()({mixedString:Object(a.__)("By agreeing to share non-sensitive {{link}}usage data{{/link}}, you’ll help us improve features and optimize the WooCommerce Payments experience. You can opt out at any time.","woocommerce-admin"),components:{link:Object(o.createElement)(m.Link,{href:"https://woocommerce.com/usage-tracking",target:"_blank",type:"external"})}});return Object(o.createElement)(u.a,{isDismissible:!1,title:d,message:b,acceptActionText:Object(a.__)("I agree","woocommerce-admin"),dismissActionText:Object(a.__)("No thanks","woocommerce-admin"),onContinue:p,onClose:p})}},510:function(e,t,n){"use strict";var c=n(8),r=n.n(c),o=n(44),a=n.n(o),i=n(12),s=n.n(i),l=n(13),m=n.n(l),u=n(14),p=n.n(u),d=n(15),b=n.n(d),h=n(7),_=n.n(h),f=n(0),y=n(2),g=n(20),O=n(11),w=n(28),k=n.n(w),j=n(4),v=n(47),C=n(22);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=_()(e);if(t){var r=_()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return b()(this,n)}}var S=function(e){p()(c,e);var t,n=E(c);function c(e){var t;return s()(this,c),(t=n.call(this,e)).state={isLoadingScripts:!1,isRequestStarted:!1},t}return m()(c,[{key:"componentDidUpdate",value:(t=a()(r.a.mark((function e(t,n){var c,o,a,i,s,l,m,u,p,d;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=this.props,o=c.hasErrors,a=c.isRequesting,i=c.onClose,s=c.onContinue,l=c.createNotice,m=this.state,u=m.isLoadingScripts,m.isRequestStarted){e.next=4;break}return e.abrupt("return");case 4:p=!a&&!u&&(t.isRequesting||n.isLoadingScripts)&&!o,d=!a&&t.isRequesting&&o,p&&(i(),s()),d&&(l("error",Object(y.__)("There was a problem updating your preferences","woocommerce-admin")),i());case 8:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"updateTracking",value:function(e){var t=this,n=e.allowTracking,c=this.props.updateOptions;n&&"function"==typeof window.wcTracks.enable?(this.setState({isLoadingScripts:!0}),window.wcTracks.enable((function(){t._isMounted&&t.setState({isLoadingScripts:!1})}))):n||(window.wcTracks.isEnabled=!1);var r=n?"yes":"no";this.setState({isRequestStarted:!0}),c({woocommerce_allow_tracking:r})}},{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1}},{key:"render",value:function(){var e=this;if(this.props.allowTracking){var t=this.props,n=t.onClose,c=t.onContinue;return n(),c(),null}var r=this.props,o=r.isRequesting,a=r.title,i=void 0===a?Object(y.__)("Build a better WooCommerce","woocommerce-admin"):a,s=r.message,l=void 0===s?k()({mixedString:Object(y.__)("Get improved features and faster fixes by sharing non-sensitive data via {{link}}usage tracking{{/link}} that shows us how WooCommerce is used. No personal data is tracked or stored.","woocommerce-admin"),components:{link:Object(f.createElement)(v.Link,{href:"https://woocommerce.com/usage-tracking",target:"_blank",type:"external"})}}):s,m=r.dismissActionText,u=void 0===m?Object(y.__)("No thanks","woocommerce-admin"):m,p=r.acceptActionText,d=void 0===p?Object(y.__)("Yes, count me in!","woocommerce-admin"):p,b=this.state.isRequestStarted&&o;return Object(f.createElement)(j.Modal,{title:i,isDismissible:this.props.isDismissible,onRequestClose:function(){return e.props.onClose()},className:"woocommerce-usage-modal"},Object(f.createElement)("div",{className:"woocommerce-usage-modal__wrapper"},Object(f.createElement)("div",{className:"woocommerce-usage-modal__message"},l),Object(f.createElement)("div",{className:"woocommerce-usage-modal__actions"},Object(f.createElement)(j.Button,{isSecondary:!0,isBusy:b,onClick:function(){return e.updateTracking({allowTracking:!1})}},u),Object(f.createElement)(j.Button,{isPrimary:!0,isBusy:b,onClick:function(){return e.updateTracking({allowTracking:!0})}},d))))}}]),c}(f.Component);t.a=Object(g.compose)(Object(O.withSelect)((function(e){var t=e(C.OPTIONS_STORE_NAME),n=t.getOption,c=t.getOptionsUpdatingError,r=t.isOptionsUpdating;return{allowTracking:"yes"===n("woocommerce_allow_tracking"),isRequesting:Boolean(r()),hasErrors:Boolean(c())}})),Object(O.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e(C.OPTIONS_STORE_NAME).updateOptions}})))(S)},514:function(e,t,n){"use strict";n.d(t,"d",(function(){return w})),n.d(t,"c",(function(){return S})),n.d(t,"a",(function(){return O})),n.d(t,"b",(function(){return c.default}));var c=n(509),r=n(12),o=n.n(r),a=n(13),i=n.n(a),s=n(14),l=n.n(s),m=n(15),u=n.n(m),p=n(7),d=n.n(p),b=n(2),h=n(0),_=n(11),f=n(21);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=d()(e);if(t){var r=d()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return u()(this,n)}}var g=function(e){l()(n,e);var t=y(n);function n(){return o()(this,n),t.apply(this,arguments)}return i()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.createNotice,n=e.markConfigured;Object(f.getQuery)()["wcpay-connection-success"]&&(t("success",Object(b.__)("WooCommerce Payments connected successfully.","woocommerce-admin")),n("wcpay",{"wcpay-connection-success":"1"}))}},{key:"render",value:function(){return null}}]),n}(h.Component),O=Object(_.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice}}))(g);function w(e){var t=["US","PR"];return window.wcAdminFeatures&&window.wcAdminFeatures["wcpay/support-international-countries"]&&t.push("AU","CA","GB","IE","NZ"),t.includes(e)}var k=n(26),j=n.n(k),v=n(22),C=n(27),E=n(507);function S(e,t,n){var c=Object(b.__)("There was an error connecting to WooCommerce Payments. Please try again or connect later in store settings.","woocommerce-admin");n(["woocommerce-payments"]).then((function(){Object(C.recordEvent)("woocommerce_payments_install",{context:"tasklist"}),j()({path:v.WC_ADMIN_NAMESPACE+"/plugins/connect-wcpay",method:"POST"}).then((function(e){window.location=e.connectUrl})).catch((function(){t("error",c),e()}))})).catch((function(t){Object(E.a)(t),e()}))}},533:function(e,t,n){"use strict";n.d(t,"a",(function(){return xe}));var c=n(0),r=n(2),o=n(28),a=n.n(o),i=n(25),s=n(47),l=n(24),m=n.n(l),u=n(8),p=n.n(u),d=n(44),b=n.n(d),h=n(12),_=n.n(h),f=n(13),y=n.n(f),g=n(9),O=n.n(g),w=n(14),k=n.n(w),j=n(15),v=n.n(j),C=n(7),E=n.n(C),S=n(5),P=n.n(S),x=n(4),R=n(20),L=n(11),N=n(22);function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=E()(e);if(t){var r=E()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return v()(this,n)}}var A=function(e){k()(n,e);var t=T(n);function n(){var e;_()(this,n);for(var c=arguments.length,o=new Array(c),a=0;a<c;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),P()(O()(e),"getInitialConfigValues",(function(){return{account_name:"",account_number:"",bank_name:"",sort_code:"",iban:"",bic:""}})),P()(O()(e),"validate",(function(e){var t={};return e.account_number||e.iban||(t.account_number=t.iban=Object(r.__)("Please enter an account number or IBAN","woocommerce-admin")),t})),P()(O()(e),"updateSettings",function(){var t=b()(p.a.mark((function t(n){var c,o,a,i;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=e.props,o=c.updateOptions,a=c.createNotice,i=c.markConfigured,t.next=3,o({woocommerce_bacs_settings:{enabled:"yes"},woocommerce_bacs_accounts:[n]});case 3:t.sent.success?(i("bacs"),a("success",Object(r.__)("Direct bank transfer details added successfully","woocommerce-admin"))):a("error",Object(r.__)("There was a problem saving your payment settings","woocommerce-admin"));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return y()(n,[{key:"render",value:function(){var e=this.props.isOptionsRequesting;return Object(c.createElement)(s.Form,{initialValues:this.getInitialConfigValues(),onSubmitCallback:this.updateSettings,validate:this.validate},(function(t){var n=t.getInputProps,o=t.handleSubmit;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.H,null,Object(r.__)("Add your bank details","woocommerce-admin")),Object(c.createElement)("p",null,Object(r.__)("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)(s.TextControl,m()({label:Object(r.__)("Account name","woocommerce-admin"),required:!0},n("account_name"))),Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Account number","woocommerce-admin"),required:!0},n("account_number"))),Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Bank name","woocommerce-admin"),required:!0},n("bank_name"))),Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Sort code","woocommerce-admin"),required:!0},n("sort_code"))),Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("IBAN","woocommerce-admin"),required:!0},n("iban"))),Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("BIC / Swift","woocommerce-admin"),required:!0},n("bic")))),Object(c.createElement)(x.Button,{isPrimary:!0,isBusy:e,onClick:o},Object(r.__)("Save","woocommerce-admin")))}))}}]),n}(c.Component),M=Object(R.compose)(Object(L.withSelect)((function(e){return{isOptionsRequesting:(0,e(N.OPTIONS_STORE_NAME).isOptionsUpdating)()}})),Object(L.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e(N.OPTIONS_STORE_NAME).updateOptions}})))(A),q=function(){return Object(c.createElement)("svg",{width:"96",height:"32",viewBox:"0 0 96 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("rect",{width:"32",height:"32",rx:"16",fill:"#8E9196"}),Object(c.createElement)("mask",{id:"bacs0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"8",y:"8",width:"16",height:"16"},Object(c.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.875 12.25L16 8.5L23.125 12.25V13.75H8.875V12.25ZM16 10.195L19.9075 12.25H12.0925L16 10.195ZM10.75 15.25H12.25V20.5H10.75V15.25ZM15.25 20.5V15.25H16.75V20.5H15.25ZM23.125 23.5V22H8.875V23.5H23.125ZM19.75 15.25H21.25V20.5H19.75V15.25Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#bacs0)"},Object(c.createElement)("rect",{x:"7",y:"7",width:"18",height:"18",fill:"white"})),Object(c.createElement)("mask",{id:"bacs1","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"39",y:"10",width:"18",height:"12"},Object(c.createElement)("path",{d:"M39 17L53.17 17L49.59 20.59L51 22L57 16L51 10L49.59 11.41L53.17 15L39 15L39 17Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#bacs1)"},Object(c.createElement)("rect",{x:"60",y:"28",width:"24",height:"24",transform:"rotate(-180 60 28)",fill:"#8E9196"})),Object(c.createElement)("rect",{x:"64",width:"32",height:"32",rx:"16",fill:"#8E9196"}),Object(c.createElement)("mask",{id:"bacs2","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"72",y:"8",width:"16",height:"16"},Object(c.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M72.875 12.25L80 8.5L87.125 12.25V13.75H72.875V12.25ZM80 10.195L83.9075 12.25H76.0925L80 10.195ZM74.75 15.25H76.25V20.5H74.75V15.25ZM79.25 20.5V15.25H80.75V20.5H79.25ZM87.125 23.5V22H72.875V23.5H87.125ZM83.75 15.25H85.25V20.5H83.75V15.25Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#bacs2)"},Object(c.createElement)("rect",{x:"71",y:"7",width:"18",height:"18",fill:"white"})))},I=function(){return Object(c.createElement)("svg",{width:"96",height:"32",viewBox:"0 0 96 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("rect",{width:"32",height:"32",rx:"16",fill:"#8E9196"}),Object(c.createElement)("mask",{id:"cod-mask-0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"7",y:"10",width:"18",height:"12"},Object(c.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 13H19.75V10H9.25C8.425 10 7.75 10.675 7.75 11.5V19.75H9.25C9.25 20.995 10.255 22 11.5 22C12.745 22 13.75 20.995 13.75 19.75H18.25C18.25 20.995 19.255 22 20.5 22C21.745 22 22.75 20.995 22.75 19.75H24.25V16L22 13ZM21.625 14.125L23.095 16H19.75V14.125H21.625ZM10.75 19.75C10.75 20.1625 11.0875 20.5 11.5 20.5C11.9125 20.5 12.25 20.1625 12.25 19.75C12.25 19.3375 11.9125 19 11.5 19C11.0875 19 10.75 19.3375 10.75 19.75ZM13.165 18.25C12.7525 17.7925 12.1675 17.5 11.5 17.5C10.8325 17.5 10.2475 17.7925 9.835 18.25H9.25V11.5H18.25V18.25H13.165ZM19.75 19.75C19.75 20.1625 20.0875 20.5 20.5 20.5C20.9125 20.5 21.25 20.1625 21.25 19.75C21.25 19.3375 20.9125 19 20.5 19C20.0875 19 19.75 19.3375 19.75 19.75Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#cod-mask-0)"},Object(c.createElement)("rect",{x:"7",y:"7",width:"18",height:"18",fill:"white"})),Object(c.createElement)("mask",{id:"cod-mask-1","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"39",y:"10",width:"18",height:"12"},Object(c.createElement)("path",{d:"M39 17L53.17 17L49.59 20.59L51 22L57 16L51 10L49.59 11.41L53.17 15L39 15L39 17Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#cod-mask-1)"},Object(c.createElement)("rect",{x:"60",y:"28",width:"24",height:"24",transform:"rotate(-180 60 28)",fill:"#8E9196"})),Object(c.createElement)("rect",{x:"64",width:"32",height:"32",rx:"16",fill:"#8E9196"}),Object(c.createElement)("mask",{id:"cod-mask-2","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"76",y:"9",width:"8",height:"14"},Object(c.createElement)("path",{d:"M80.2926 15.175C78.5901 14.7325 78.0426 14.275 78.0426 13.5625C78.0426 12.745 78.8001 12.175 80.0676 12.175C81.4026 12.175 81.8976 12.8125 81.9426 13.75H83.6001C83.5476 12.46 82.7601 11.275 81.1926 10.8925V9.25H78.9426V10.87C77.4876 11.185 76.3176 12.13 76.3176 13.5775C76.3176 15.31 77.7501 16.1725 79.8426 16.675C81.7176 17.125 82.0926 17.785 82.0926 18.4825C82.0926 19 81.7251 19.825 80.0676 19.825C78.5226 19.825 77.9151 19.135 77.8326 18.25H76.1826C76.2726 19.8925 77.5026 20.815 78.9426 21.1225V22.75H81.1926V21.1375C82.6551 20.86 83.8176 20.0125 83.8176 18.475C83.8176 16.345 81.9951 15.6175 80.2926 15.175Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#cod-mask-2)"},Object(c.createElement)("rect",{x:"71",y:"7",width:"18",height:"18",fill:"white"})))},U=function(){return Object(c.createElement)("svg",{width:"100",height:"64",viewBox:"-10 0 120 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.78073 0.5H91.1787C96.3299 0.5 100.5 4.77335 100.5 10.0522V41.8929C100.5 47.1717 96.3299 51.4451 91.1787 51.4451H61.9883L65.9948 61.5L48.3742 51.4451H9.82161C4.67036 51.4451 0.500298 47.1717 0.500298 41.8929V10.0522C0.459415 4.81524 4.62947 0.5 9.78073 0.5Z",fill:"#7F54B3"}),Object(c.createElement)("path",{d:"M5.48791 9.1725C6.06028 8.37648 6.91882 7.95752 8.06354 7.87373C10.1486 7.70615 11.3342 8.71165 11.6204 10.8902C12.8877 19.6464 14.2778 27.0619 15.7495 33.1368L24.7029 15.6663C25.5206 14.0743 26.5426 13.2364 27.7691 13.1526C29.568 13.0269 30.6718 14.2 31.1215 16.6718C32.1436 22.2439 33.4519 26.9781 35.0054 31.0001C36.0684 20.3586 37.8672 12.6917 40.402 7.95753C41.0152 6.78445 41.9146 6.19791 43.1002 6.11412C44.0405 6.03033 44.8991 6.3236 45.6759 6.95203C46.4526 7.58047 46.8615 8.37648 46.9432 9.34008C46.9841 10.0942 46.8615 10.7226 46.5344 11.3511C44.94 14.3676 43.6317 19.4369 42.5688 26.4754C41.5467 33.3044 41.1787 38.6251 41.424 42.4376C41.5058 43.485 41.3423 44.4067 40.9334 45.2027C40.4428 46.1244 39.707 46.6272 38.7666 46.711C37.7037 46.7948 36.5998 46.292 35.5369 45.1608C31.7348 41.1807 28.7094 35.2316 26.5018 27.3133C23.8444 32.6759 21.882 36.6979 20.6146 39.3792C18.2025 44.1134 16.1584 46.5434 14.4413 46.6691C13.3374 46.7529 12.3971 45.7893 11.5795 43.7783C9.49445 38.2899 7.24589 27.6904 4.83379 11.9795C4.71114 10.8902 4.91555 9.92662 5.48791 9.1725Z",fill:"white"}),Object(c.createElement)("path",{d:"M93.3864 15.7499C91.9146 13.1105 89.7478 11.5185 86.8451 10.89C86.0683 10.7225 85.3324 10.6387 84.6374 10.6387C80.7127 10.6387 77.5238 12.7335 75.0299 16.923C72.904 20.4841 71.8411 24.4223 71.8411 28.7376C71.8411 31.9635 72.4952 34.7286 73.8034 37.0329C75.2752 39.6723 77.442 41.2644 80.3447 41.8928C81.1215 42.0604 81.8574 42.1442 82.5524 42.1442C86.518 42.1442 89.7069 40.0494 92.1599 35.8598C94.2858 32.2568 95.3488 28.3186 95.3488 24.0034C95.3488 20.7355 94.6946 18.0123 93.3864 15.7499ZM88.2351 27.355C87.6628 30.1201 86.6407 32.173 85.128 33.5556C83.9424 34.6449 82.8386 35.1057 81.8165 34.8962C80.8353 34.6868 80.0177 33.8069 79.4044 32.173C78.9138 30.8742 78.6685 29.5755 78.6685 28.3605C78.6685 27.3131 78.7503 26.2657 78.9547 25.3021C79.3226 23.5844 80.0177 21.9086 81.1215 20.3166C82.4706 18.2637 83.9015 17.4258 85.3733 17.719C86.3545 17.9285 87.1722 18.8083 87.7854 20.4422C88.276 21.741 88.5213 23.0398 88.5213 24.2547C88.5213 25.344 88.3987 26.3914 88.2351 27.355Z",fill:"white"}),Object(c.createElement)("path",{d:"M67.7528 15.7499C66.281 13.1105 64.0734 11.5185 61.2116 10.89C60.4348 10.7225 59.6989 10.6387 59.0039 10.6387C55.0791 10.6387 51.8903 12.7335 49.3964 16.923C47.2705 20.4841 46.2075 24.4223 46.2075 28.7376C46.2075 31.9635 46.8616 34.7286 48.1699 37.0329C49.6417 39.6723 51.8085 41.2644 54.7112 41.8928C55.488 42.0604 56.2238 42.1442 56.9189 42.1442C60.8845 42.1442 64.0734 40.0494 66.5263 35.8598C68.6523 32.2568 69.7152 28.3186 69.7152 24.0034C69.7152 20.7355 69.0611 18.0123 67.7528 15.7499ZM62.6016 27.355C62.0292 30.1201 61.0071 32.173 59.4945 33.5556C58.3089 34.6449 57.205 35.1057 56.183 34.8962C55.2018 34.6868 54.3841 33.8069 53.7709 32.173C53.2803 30.8742 53.035 29.5755 53.035 28.3605C53.035 27.3131 53.1167 26.2657 53.3212 25.3021C53.6891 23.5844 54.3841 21.9086 55.4879 20.3166C56.8371 18.2637 58.268 17.4258 59.7398 17.719C60.721 17.9285 61.5386 18.8083 62.1519 20.4422C62.6425 21.741 62.8878 23.0398 62.8878 24.2547C62.8878 25.344 62.806 26.3914 62.6016 27.355Z",fill:"white"}))},D=function(){return Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100",height:"24",fill:"#072654",viewBox:"0 0 1896 401"},Object(c.createElement)("path",{fill:"#3395FF",d:"M122.63 105.7l-15.75 57.97 90.15-58.3-58.96 219.98 59.88.05L285.05.48"}),Object(c.createElement)("path",{d:"M25.6 232.92L.8 325.4h122.73l50.22-188.13L25.6 232.92m426.32-81.42c-3 11.15-8.78 19.34-17.4 24.57-8.6 5.22-20.67 7.84-36.25 7.84h-49.5l17.38-64.8h49.5c15.56 0 26.25 2.6 32.05 7.9 5.8 5.3 7.2 13.4 4.22 24.6m51.25-1.4c6.3-23.4 3.7-41.4-7.82-54-11.5-12.5-31.68-18.8-60.48-18.8H324.4l-66.5 248.1h53.67l26.8-100h35.2c7.9 0 14.12 1.3 18.66 3.8 4.55 2.6 7.22 7.1 8.04 13.6l9.58 82.6h57.5l-9.32-77c-1.9-17.2-9.77-27.3-23.6-30.3 17.63-5.1 32.4-13.6 44.3-25.4a92.6 92.6 0 0 0 24.44-42.5m130.46 86.4c-4.5 16.8-11.4 29.5-20.73 38.4-9.34 8.9-20.5 13.3-33.52 13.3-13.26 0-22.25-4.3-27-13-4.76-8.7-4.92-21.3-.5-37.8 4.42-16.5 11.47-29.4 21.17-38.7 9.7-9.3 21.04-13.95 34.06-13.95 13 0 21.9 4.5 26.4 13.43 4.6 8.97 4.7 21.8.2 38.5zm23.52-87.8l-6.72 25.1c-2.9-9-8.53-16.2-16.85-21.6-8.34-5.3-18.66-8-30.97-8-15.1 0-29.6 3.9-43.5 11.7-13.9 7.8-26.1 18.8-36.5 33-10.4 14.2-18 30.3-22.9 48.4-4.8 18.2-5.8 34.1-2.9 47.9 3 13.9 9.3 24.5 19 31.9 9.8 7.5 22.3 11.2 37.6 11.2a82.4 82.4 0 0 0 35.2-7.7 82.11 82.11 0 0 0 28.4-21.2l-7 26.16h51.9L709.3 149h-52zm238.65 0H744.87l-10.55 39.4h87.82l-116.1 100.3-9.92 37h155.8l10.55-39.4h-94.1l117.88-101.8m142.4 52c-4.67 17.4-11.6 30.48-20.75 39-9.15 8.6-20.23 12.9-33.24 12.9-27.2 0-36.14-17.3-26.86-51.9 4.6-17.2 11.56-30.13 20.86-38.84 9.3-8.74 20.57-13.1 33.82-13.1 13 0 21.78 4.33 26.3 13.05 4.52 8.7 4.48 21.67-.13 38.87m30.38-80.83c-11.95-7.44-27.2-11.16-45.8-11.16-18.83 0-36.26 3.7-52.3 11.1a113.09 113.09 0 0 0-41 32.06c-11.3 13.9-19.43 30.2-24.42 48.8-4.9 18.53-5.5 34.8-1.7 48.73 3.8 13.9 11.8 24.6 23.8 32 12.1 7.46 27.5 11.17 46.4 11.17 18.6 0 35.9-3.74 51.8-11.18 15.9-7.48 29.5-18.1 40.8-32.1 11.3-13.94 19.4-30.2 24.4-48.8 5-18.6 5.6-34.84 1.8-48.8-3.8-13.9-11.7-24.6-23.6-32.05m185.1 40.8l13.3-48.1c-4.5-2.3-10.4-3.5-17.8-3.5-11.9 0-23.3 2.94-34.3 8.9-9.46 5.06-17.5 12.2-24.3 21.14l6.9-25.9-15.07.06h-37l-47.7 176.7h52.63l24.75-92.37c3.6-13.43 10.08-24 19.43-31.5 9.3-7.53 20.9-11.3 34.9-11.3 8.6 0 16.6 1.97 24.2 5.9m146.5 41.1c-4.5 16.5-11.3 29.1-20.6 37.8-9.3 8.74-20.5 13.1-33.5 13.1s-21.9-4.4-26.6-13.2c-4.8-8.85-4.9-21.6-.4-38.36 4.5-16.75 11.4-29.6 20.9-38.5 9.5-8.97 20.7-13.45 33.7-13.45 12.8 0 21.4 4.6 26 13.9 4.6 9.3 4.7 22.2.28 38.7m36.8-81.4c-9.75-7.8-22.2-11.7-37.3-11.7-13.23 0-25.84 3-37.8 9.06-11.95 6.05-21.65 14.3-29.1 24.74l.18-1.2 8.83-28.1h-51.4l-13.1 48.9-.4 1.7-54 201.44h52.7l27.2-101.4c2.7 9.02 8.2 16.1 16.6 21.22 8.4 5.1 18.77 7.63 31.1 7.63 15.3 0 29.9-3.7 43.75-11.1 13.9-7.42 25.9-18.1 36.1-31.9 10.2-13.8 17.77-29.8 22.6-47.9 4.9-18.13 5.9-34.3 3.1-48.45-2.85-14.17-9.16-25.14-18.9-32.9m174.65 80.65c-4.5 16.7-11.4 29.5-20.7 38.3-9.3 8.86-20.5 13.27-33.5 13.27-13.3 0-22.3-4.3-27-13-4.8-8.7-4.9-21.3-.5-37.8 4.4-16.5 11.42-29.4 21.12-38.7 9.7-9.3 21.05-13.94 34.07-13.94 13 0 21.8 4.5 26.4 13.4 4.6 8.93 4.63 21.76.15 38.5zm23.5-87.85l-6.73 25.1c-2.9-9.05-8.5-16.25-16.8-21.6-8.4-5.34-18.7-8-31-8-15.1 0-29.68 3.9-43.6 11.7-13.9 7.8-26.1 18.74-36.5 32.9-10.4 14.16-18 30.3-22.9 48.4-4.85 18.17-5.8 34.1-2.9 47.96 2.93 13.8 9.24 24.46 19 31.9 9.74 7.4 22.3 11.14 37.6 11.14 12.3 0 24.05-2.56 35.2-7.7a82.3 82.3 0 0 0 28.33-21.23l-7 26.18h51.9l47.38-176.7h-51.9zm269.87.06l.03-.05h-31.9c-1.02 0-1.92.05-2.85.07h-16.55l-8.5 11.8-2.1 2.8-.9 1.4-67.25 93.68-13.9-109.7h-55.08l27.9 166.7-61.6 85.3h54.9l14.9-21.13c.42-.62.8-1.14 1.3-1.8l17.4-24.7.5-.7 77.93-110.5 65.7-93 .1-.06h-.03z"}))},V=function(){return Object(c.createElement)("svg",{fill:"none",viewBox:"0 0 677 200",width:"100",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("g",{fill:"#000"},Object(c.createElement)("path",{clipRule:"evenodd",d:"m286.342 65.3132c-37.175 0-67.35 30.2415-67.35 67.3438 0 37.101 30.245 67.343 67.35 67.343 37.106 0 67.35-30.242 67.35-67.343 0-37.1023-30.174-67.3438-67.35-67.3438zm0 102.8348c-19.533 0-35.425-15.89-35.425-35.421s15.892-35.4222 35.425-35.4222 35.426 15.8912 35.426 35.4222-15.893 35.421-35.426 35.421z",fillRule:"evenodd"}),Object(c.createElement)("path",{d:"m510.375 42.0021c11.6 0 21.003-9.4025 21.003-21.0011 0-11.59851-9.403-21.001-21.003-21.001-11.599 0-21.003 9.40249-21.003 21.001 0 11.5986 9.404 21.0011 21.003 21.0011z"}),Object(c.createElement)("path",{clipRule:"evenodd",d:"m148.842 65.3833c-1.75-.14-3.431-.21-5.181-.21-16.242 0-31.644 6.6503-42.706 18.4109-11.0617-11.6906-26.394-18.4109-42.4964-18.4109-32.2047 0-58.4586 26.1813-58.4586 58.3827v73.714h31.5047v-72.804c0-13.37 10.9916-25.691 23.9435-27.0211.9101-.07 1.8203-.14 2.6604-.14 14.5621 0 26.4639 11.9001 26.5339 26.4611v73.504h32.2045v-72.944c0-13.3 10.922-25.621 23.944-26.9511.91-.07 1.82-.14 2.66-.14 14.562 0 26.534 11.8301 26.604 26.3211v73.714h32.205v-72.804c0-14.77-5.461-28.9812-15.332-39.9717-9.872-11.0606-23.384-17.8509-38.086-19.111z",fillRule:"evenodd"}),Object(c.createElement)("path",{d:"m403.26 3.15015h-32.205v194.25985h32.205z"}),Object(c.createElement)("path",{d:"m464.869 3.15015h-32.205v194.25985h32.205z"}),Object(c.createElement)("path",{d:"m526.478 68.5334h-32.205v128.8066h32.205z"}),Object(c.createElement)("path",{clipRule:"evenodd",d:"m677 129.646c0-17.08-6.651-33.1812-18.693-45.4318-12.112-12.2506-28.074-19.0409-45.086-19.0409-.28 0-.561 0-.841 0-17.642.21-34.305 7.2103-46.766 19.741-12.462 12.5306-19.463 29.1217-19.673 46.8327-.21 18.06 6.721 35.141 19.533 48.092 12.811 12.951 29.754 20.091 47.817 20.091h.07c23.663 0 45.856-12.671 57.968-33.042l1.54-2.59-26.604-13.09-1.33 2.17c-6.651 10.99-18.202 17.501-31.014 17.501-16.383 0-30.525-10.921-34.866-26.462h97.945zm-65.04-35.2113c14.703 0 27.864 9.6603 32.485 23.3813h-64.899c4.55-13.721 17.712-23.3813 32.414-23.3813z",fillRule:"evenodd"})))},F=function(){return Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 385.61334 192.41333",width:"100"},Object(c.createElement)("g",{transform:"matrix(1.3333333,0,0,-1.3333333,0,192.41333)"},Object(c.createElement)("g",{transform:"scale(0.1)",id:"g12"},Object(c.createElement)("path",{style:{fill:"#90cc23",fillOpacity:1,fillRule:"nonzero",stroke:"none"},d:"m 2507.22,898.414 c -18.79,0 -34.01,15.234 -34,34.024 l 0.05,150.352 h -12.54 c -77.78,0 -106.71,-12.83 -106.71,-83.685 V 833.316 c -0.01,-0.351 -0.05,-0.703 -0.05,-1.054 v -36.34 c -0.02,-1.258 -0.1,-2.43 -0.1,-3.731 V 560.543 c 0,-28.293 -5.45,-50.82 -16.7,-68.32 -21.21,-32.676 -63.2,-47.532 -130.38,-47.618 -67.15,0.086 -109.13,14.93 -130.34,47.579 -11.28,17.507 -16.74,40.046 -16.74,68.359 v 231.648 c 0,1.301 -0.07,2.473 -0.09,3.731 v 36.34 c 0,0.351 -0.04,0.703 -0.05,1.054 v 165.789 c 0,70.855 -28.93,83.685 -106.71,83.685 h -24.49 c -77.79,0 -106.71,-12.83 -106.71,-83.685 V 832.262 656.723 560.543 c 0,-70.547 15.91,-130.281 46.65,-178.434 59.37,-93.3 174.38,-142.988 337.88,-142.988 0.2,0 0.4,0.008 0.6,0.008 0.21,0 0.4,-0.008 0.61,-0.008 163.5,0 278.51,49.688 337.88,142.988 30.74,48.153 46.65,107.887 46.65,178.434 v 96.18 175.539 66.121 l -84.71,0.031"}),Object(c.createElement)("path",{style:{fill:"#90cc23",fillOpacity:1,fillRule:"nonzero",stroke:"none"},d:"m 2866.82,1140.67 -127.94,0.05 c -13.95,0 -25.26,11.32 -25.25,25.27 l 0.04,129.52 c 0.01,13.96 11.33,25.27 25.28,25.27 l 127.93,-0.05 c 13.96,0 25.27,-11.32 25.27,-25.28 l -0.05,-129.52 c 0,-13.95 -11.32,-25.26 -25.28,-25.26"}),Object(c.createElement)("path",{style:{fill:"#90cc23",fillOpacity:1,fillRule:"nonzero",stroke:"none"},d:"m 2696.34,1320.76 -86.89,0.03 c -9.48,0.01 -17.16,7.69 -17.16,17.16 l 0.03,87.97 c 0.01,9.49 7.7,17.16 17.17,17.16 l 86.89,-0.03 c 9.48,0 17.16,-7.69 17.16,-17.17 l -0.03,-87.97 c -0.01,-9.48 -7.69,-17.15 -17.17,-17.15"}),Object(c.createElement)("path",{style:{fill:"#90cc23",fillOpacity:1,fillRule:"nonzero",stroke:"none"},d:"m 496.59,815.961 c 0,-104.07 -26.574,-160.469 -166.75,-160.469 H 114.059 v 268.586 c 0,37.246 13.847,51.094 51.089,51.094 H 329.84 c 105.605,0 166.75,-26.055 166.75,-159.211 z M 329.84,1082.95 H 143.77 C 44.3438,1082.95 0.00390625,1038.6 0.00390625,939.164 V 300.512 C 0.00390625,262.102 12.332,249.77 50.7422,249.77 h 12.5742 c 38.4136,0 50.7426,12.332 50.7426,50.742 V 548.98 H 329.84 c 191.582,0 280.812,84.844 280.812,266.981 0,182.148 -89.23,266.989 -280.812,266.989"}),Object(c.createElement)("path",{style:{fill:"#90cc23",fillOpacity:1,fillRule:"nonzero",stroke:"none"},d:"m 1012.01,536.82 v -87.547 c 0,-71.375 -26.455,-112.695 -161.721,-112.695 -89.359,0 -132.801,32.344 -132.801,98.863 0,72.954 43.578,101.379 155.434,101.379 z M 850.289,899.801 c -73.738,0 -119.949,-9.25 -137.476,-12.754 -31.036,-6.75 -44.012,-15.266 -44.012,-50.559 V 826.43 c 0,-13.828 2.047,-23.407 6.441,-30.145 5.113,-7.851 13.348,-11.836 24.488,-11.836 5.434,0 11.727,0.918 19.243,2.793 17.722,4.434 74.379,13.594 136.347,13.594 111.297,0 156.69,-30.832 156.69,-106.406 V 626.988 H 871.66 c -180.422,0 -264.461,-60.859 -264.461,-191.547 0,-126.761 86.778,-196.57 244.352,-196.57 187.249,0 270.749,63.719 270.749,206.633 V 694.43 c 0,138.191 -88.97,205.371 -272.011,205.371"}),Object(c.createElement)("path",{style:{fill:"#90cc23",fillOpacity:1,fillRule:"nonzero",stroke:"none"},d:"m 1739.43,870.035 c -7.95,9.981 -22.98,11.356 -38.05,11.356 h -11.3 c -37.55,0 -52.28,-11.582 -60.59,-47.606 L 1525.15,400.078 c -13.02,-53.297 -31.32,-63.039 -62.63,-63.039 -38.34,0 -53.69,9.152 -68.97,63.25 l -118.18,433.699 c -9.78,36.328 -24.21,47.403 -61.77,47.403 h -10.06 c -15.16,0 -30.26,-1.395 -38.01,-11.504 -7.76,-10.125 -5.14,-25.235 -1.14,-40.086 L 1283.82,392.34 c 22.4,-83.719 49.03,-153.02 148.53,-153.02 18.57,0 35.75,2.578 50.04,7.399 -30.18,-94.91 -60.88,-136.77 -151.41,-146.071 -18.37,-1.5269 -30.31,-4.1597 -36.96,-13.0777 -6.91,-9.25 -5.34,-22.5 -2.87,-34.332 l 2.49,-11.2188 C 1299.04,16.0781 1308.25,0 1337.37,0 c 3.06,0 6.35,0.160156 9.88,0.460938 C 1482.43,9.30859 1554.86,82.0898 1597.24,251.66 l 144.62,578.453 c 3.43,14.844 5.5,29.95 -2.43,39.922"}),Object(c.createElement)("path",{style:{fill:"#90cc23",fillOpacity:1,fillRule:"nonzero",stroke:"none"},d:"m 2679.57,1140.78 -172.26,0.06 c -18.79,0 -34.02,-15.23 -34.03,-34.02 l -0.01,-24.03 h 11.95 c 77.78,0 106.71,-12.83 106.71,-83.685 V 898.383 l 87.55,-0.028 c 18.79,-0.011 34.02,15.215 34.03,34.004 l 0.06,174.381 c 0,18.79 -15.22,34.03 -34,34.04"}))))},B=n(26),z=n.n(B),H=n(21);function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=E()(e);if(t){var r=E()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return v()(this,n)}}var K=function(e){k()(l,e);var t,n,o=Y(l);function l(e){var t;return _()(this,l),(t=o.call(this,e)).state={oAuthConnectFailed:!1,connectURL:null,isPending:!1},t.updateSettings=t.updateSettings.bind(O()(t)),t}return y()(l,[{key:"componentDidMount",value:function(){var e=this.state.oAuthConnectFailed,t=this.props.stripeSettings,n=Object(H.getQuery)();if(n["stripe-connect"]&&"1"===n["stripe-connect"]&&(t.publishable_key&&t.secret_key))return void this.completeMethod();e||this.fetchOAuthConnectURL()}},{key:"componentDidUpdate",value:function(e){var t=this.props.activePlugins;!e.activePlugins.includes("woocommerce-gateway-stripe")&&t.includes("woocommerce-gateway-stripe")&&this.fetchOAuthConnectURL()}},{key:"completeMethod",value:function(){var e=this.props,t=e.createNotice,n=e.markConfigured;this.setState({isPending:!1}),t("success",Object(r.__)("Stripe connected successfully.","woocommerce-admin")),n("stripe")}},{key:"fetchOAuthConnectURL",value:(n=b()(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.props.activePlugins.includes("woocommerce-gateway-stripe")){e.next=3;break}return e.abrupt("return");case 3:return e.prev=3,this.setState({isPending:!0}),e.next=7,z()({path:N.WCS_NAMESPACE+"/connect/stripe/oauth/init",method:"POST",data:{returnUrl:Object(i.f)("admin.php?page=wc-admin&task=payments&method=stripe&stripe-connect=1")}});case 7:if((t=e.sent)&&t.oauthUrl){e.next=11;break}return this.setState({oAuthConnectFailed:!0,isPending:!1}),e.abrupt("return");case 11:this.setState({connectURL:t.oauthUrl,isPending:!1}),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(3),this.setState({oAuthConnectFailed:!0,isPending:!1});case 17:case"end":return e.stop()}}),e,this,[[3,14]])}))),function(){return n.apply(this,arguments)})},{key:"renderConnectButton",value:function(){var e=this.state.connectURL;return Object(c.createElement)(x.Button,{isPrimary:!0,href:e},Object(r.__)("Connect","woocommerce-admin"))}},{key:"updateSettings",value:(t=b()(p.a.mark((function e(t){var n,c,o,a,i,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=this.props,o=c.updateOptions,a=c.stripeSettings,i=c.createNotice,s=t.publishable_key.match(/^pk_live_/)?"":"test_",e.next=4,o({woocommerce_stripe_settings:W(W({},a),{},(n={},P()(n,s+"publishable_key",t.publishable_key),P()(n,s+"secret_key",t.secret_key),P()(n,"testmode","test_"===s?"yes":"no"),P()(n,"enabled","yes"),n))});case 4:e.sent.success?this.completeMethod():i("error",Object(r.__)("There was a problem saving your payment settings","woocommerce-admin"));case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getInitialConfigValues",value:function(){return{publishable_key:"",secret_key:""}}},{key:"validateManualConfig",value:function(e){var t={};return null===e.publishable_key.match(/^pk_(live|test)_[a-zA-Z0-9_]+/)&&(t.publishable_key=Object(r.__)('Please enter a valid publishable key (starting with "pk_").',"woocommerce-admin")),null===e.secret_key.match(/^[rs]k_(live|test)_[a-zA-Z0-9_]+/)?t.secret_key=Object(r.__)('Please enter a valid secret key (starting with "sk_" or "rk_").',"woocommerce-admin"):e.secret_key.slice(3,7)!==e.publishable_key.slice(3,7)&&(t.secret_key=Object(r.__)("Please enter a secret key in the same mode as the publishable key.","woocommerce-admin")),t}},{key:"renderManualConfig",value:function(){var e=this.props.isOptionsUpdating,t=a()({mixedString:Object(r.__)("Your API details can be obtained from your {{docsLink}}Stripe account{{/docsLink}}. Don’t have a Stripe account? {{registerLink}}Create one.{{/registerLink}}","woocommerce-admin"),components:{docsLink:Object(c.createElement)(s.Link,{href:"https://stripe.com/docs/keys",target:"_blank",type:"external"}),registerLink:Object(c.createElement)(s.Link,{href:"https://dashboard.stripe.com/register",target:"_blank",type:"external"})}});return Object(c.createElement)(s.Form,{initialValues:this.getInitialConfigValues(),onSubmitCallback:this.updateSettings,validate:this.validateManualConfig},(function(n){var o=n.getInputProps,a=n.handleSubmit;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Publishable Key","woocommerce-admin"),required:!0},o("publishable_key"))),Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Secret Key","woocommerce-admin"),required:!0},o("secret_key"))),Object(c.createElement)(x.Button,{isPrimary:!0,isBusy:e,onClick:a},Object(r.__)("Proceed","woocommerce-admin")),Object(c.createElement)("p",null,t))}))}},{key:"renderOauthConfig",value:function(){var e=this,t=a()({mixedString:Object(r.__)('By clicking "Connect," you agree to the {{tosLink}}Terms of Service{{/tosLink}}. Or {{manualConfigLink}}manually enter your Stripe API details{{/manualConfigLink}} instead.',"woocommerce-admin"),components:{tosLink:Object(c.createElement)(s.Link,{href:"https://wordpress.com/tos",target:"_blank",type:"external"}),manualConfigLink:Object(c.createElement)(x.Button,{isLink:!0,onClick:function(){e.setState({connectURL:null})}})}});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",null,this.renderConnectButton()),t)}},{key:"getConnectStep",value:function(){var e=this.state,t=e.connectURL,n=e.isPending,c=e.oAuthConnectFailed,o={key:"connect",label:Object(r.__)("Connect your Stripe account","woocommerce-admin")};return n?o:W(W({},o),{},!c&&t?{description:Object(r.__)("A Stripe account is required to process payments.","woocommerce-admin"),content:this.renderOauthConfig()}:{content:this.renderManualConfig()})}},{key:"render",value:function(){var e=this.props,t=e.installStep,n=e.isOptionsUpdating,r=this.state.isPending;return Object(c.createElement)(s.Stepper,{isVertical:!0,isPending:!t.isComplete||n||r,currentStep:t.isComplete?"connect":"install",steps:[t,this.getConnectStep()]})}}]),l}(c.Component),G=Object(R.compose)(Object(L.withSelect)((function(e){var t=e(N.OPTIONS_STORE_NAME),n=t.getOption,c=t.isOptionsUpdating;return{activePlugins:(0,e(N.PLUGINS_STORE_NAME).getActivePlugins)(),isOptionsUpdating:c(),stripeSettings:n("woocommerce_stripe_settings")||[]}})),Object(L.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e(N.OPTIONS_STORE_NAME).updateOptions}})))(K);function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=E()(e);if(t){var r=E()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return v()(this,n)}}var $=function(e){k()(o,e);var t,n=X(o);function o(e){var t;return _()(this,o),(t=n.call(this,e)).state={isPending:!1},t.connect=t.connect.bind(O()(t)),t}return y()(o,[{key:"componentDidMount",value:function(){var e=this.props,t=e.createNotice,n=e.markConfigured,c=Object(H.getQuery)();c["square-connect"]&&"1"===c["square-connect"]&&(t("success",Object(r.__)("Square connected successfully.","woocommerce-admin")),n("square"))}},{key:"connect",value:(t=b()(p.a.mark((function e(){var t,n,c,o,a,i,s,l;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.createNotice,c=t.hasCbdIndustry,o=t.options,a=t.updateOptions,this.setState({isPending:!0}),a({woocommerce_square_credit_card_settings:J(J({},o.woocommerce_square_credit_card_settings),{},{enabled:"yes"})}),i=Object(r.__)("There was an error connecting to Square. Please try again or skip to connect later in store settings.","woocommerce-admin"),e.prev=4,s=null,c&&(s=window.open("/","_blank")),e.next=9,z()({path:N.WC_ADMIN_NAMESPACE+"/plugins/connect-square",method:"POST"});case 9:if((l=e.sent)&&l.connectUrl){e.next=15;break}return this.setState({isPending:!1}),n("error",i),c&&s.close(),e.abrupt("return");case 15:this.setState({isPending:!0}),this.redirect(l.connectUrl,s),e.next=23;break;case 19:e.prev=19,e.t0=e.catch(4),this.setState({isPending:!1}),n("error",i);case 23:case"end":return e.stop()}}),e,this,[[4,19]])}))),function(){return t.apply(this,arguments)})},{key:"redirect",value:function(e,t){t?(t.location.href=e,window.location=Object(i.f)("admin.php?page=wc-admin")):window.location=e}},{key:"render",value:function(){var e=this.props.installStep,t=this.state.isPending;return Object(c.createElement)(s.Stepper,{isVertical:!0,isPending:!e.isComplete||t,currentStep:e.isComplete?"connect":"install",steps:[e,{key:"connect",label:Object(r.__)("Connect your Square account","woocommerce-admin"),description:Object(r.__)("A Square account is required to process payments. You will be redirected to the Square website to create the connection.","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(x.Button,{isPrimary:!0,isBusy:t,onClick:this.connect},Object(r.__)("Connect","woocommerce-admin")))}]})}}]),o}(c.Component),ee=Object(R.compose)(Object(L.withSelect)((function(e){var t=e(N.OPTIONS_STORE_NAME),n=t.getOption,c=t.isResolving;return{options:n("woocommerce_square_credit_card_settings"),optionsIsRequesting:c("getOption",["woocommerce_square_credit_card_settings"])}})),Object(L.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e(N.OPTIONS_STORE_NAME).updateOptions}})))($),te=n(514),ne=n(23);function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){P()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=E()(e);if(t){var r=E()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return v()(this,n)}}var ae="woocommerce-paypal-payments";function ie(e,t,n){try{ppcp_onboarding&&n()}catch(r){var c=document.createElement("script");c.src=e,document.body.append(c),c.onload=function(){n()},window.PayPalCommerceGatewayOnboarding=t}}function se(e){var t=e.connectUrl;return Object(c.useEffect)((function(){ppcp_onboarding&&ppcp_onboarding.reload()}),[]),Object(c.createElement)("a",{className:"button-primary",target:"_blank",rel:"noreferrer",href:t,"data-paypal-onboard-button":"true","data-paypal-button":"true","data-paypal-onboard-complete":"ppcp_onboarding_productionCallback"},Object(r.__)("Connect","woocommerce-admin"))}var le=function(e){k()(u,e);var t,n,o,i,l=oe(u);function u(e){var t;return _()(this,u),(t=l.call(this,e)).state={autoConnectFailed:!1,connectURL:""},t.enablePaypalPlugin=t.enablePaypalPlugin.bind(O()(t)),t.setCredentials=t.setCredentials.bind(O()(t)),t.validate=t.validate.bind(O()(t)),t}return y()(u,[{key:"componentDidMount",value:function(){var e=this.props.createNotice,t=Object(H.getQuery)();if(t.onboarding)return"complete"!==t.onboarding||t["ppcp-onboarding-error"]?void(t["ppcp-onboarding-error"]&&(this.setState({autoConnectFailed:!0}),e("error",Object(r.__)("There was a problem saving your payment settings through the onboarding, please fill the fields in manually.","woocommerce-admin")))):void this.enablePaypalPlugin();this.fetchOAuthConnectURLAndOnboardingSetup()}},{key:"componentDidUpdate",value:function(e){var t=this.props.activePlugins;!e.activePlugins.includes(ae)&&t.includes(ae)&&this.fetchOAuthConnectURLAndOnboardingSetup()}},{key:"fetchOAuthConnectURLAndOnboardingSetup",value:(i=b()(p.a.mark((function e(){var t,n,c,o,a=this;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.activePlugins,c=t.createNotice,n.includes(ae)){e.next=3;break}return e.abrupt("return");case 3:return this.setState({isPending:!0}),e.prev=4,e.next=7,z()({path:"/wc-paypal/v1/onboarding/get-params",method:"POST",data:{environment:"production",returnUrlArgs:{ppcpobw:"1"}}});case 7:if((o=e.sent)&&o.signupLink){e.next=11;break}return this.setState({autoConnectFailed:!0,isPending:!1}),e.abrupt("return");case 11:ie(o.scriptURL,o.scriptData,(function(){a.setState({connectURL:o.signupLink,isPending:!1})})),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(4),e.t0&&e.t0.data&&500===e.t0.data.status&&c("error",Object(r.__)("There was a problem with the Paypal onboarding setup, please fill the fields in manually.","woocommerce-admin")),this.setState({autoConnectFailed:!0,isPending:!1});case 18:case"end":return e.stop()}}),e,this,[[4,14]])}))),function(){return i.apply(this,arguments)})},{key:"enablePaypalPlugin",value:(o=b()(p.a.mark((function e(t){var n,c,o,a,i,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.props,c=n.createNotice,o=n.updateOptions,a=n.markConfigured,i=n.options,s={"woocommerce_ppcp-gateway_settings":{enabled:"yes"}},t||(s["woocommerce-ppcp-settings"]=re(re({},i),{},{enabled:!0})),e.next=5,o(s);case 5:e.sent.success?(c("success",Object(r.__)("PayPal connected successfully.","woocommerce-admin")),a("paypal")):c("error",Object(r.__)("There was a problem saving your payment settings.","woocommerce-admin"));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"setCredentials",value:(n=b()(p.a.mark((function e(t){var n,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.props.createNotice,e.prev=1,e.next=4,z()({path:"/wc-paypal/v1/onboarding/set-credentials",method:"POST",data:re({environment:"production"},t)});case 4:if(!(c=e.sent)||!c.data){e.next=9;break}n("error",Object(r.__)("There was a problem updating the credentials.","woocommerce-admin")),e.next=11;break;case 9:return e.next=11,this.enablePaypalPlugin(!0);case 11:e.next=18;break;case 13:if(e.prev=13,e.t0=e.catch(1),!e.t0||!e.t0.data||404!==e.t0.data.status){e.next=18;break}return e.next=18,this.updateManualSettings(t);case 18:case"end":return e.stop()}}),e,this,[[1,13]])}))),function(e){return n.apply(this,arguments)})},{key:"updateManualSettings",value:(t=b()(p.a.mark((function e(t){var n,c,o,a,i,s,l;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.props,c=n.createNotice,o=n.options,a=n.updateOptions,i=n.markConfigured,s=Object.keys(t).reduce((function(e,n){var c=n+"_production";return re(re({},e),{},P()({},c,t[n]))}),{}),l=re(re({},o),{},{enabled:!0,sandbox_on:!1,merchant_email:t.merchant_email,merchant_id:t.merchant_id},s),e.next=5,a({"woocommerce-ppcp-settings":l,"woocommerce_ppcp-gateway_settings":{enabled:"yes"}});case 5:e.sent.success?(c("success",Object(r.__)("PayPal connected successfully.","woocommerce-admin")),i("paypal")):c("error",Object(r.__)("There was a problem saving your payment settings.","woocommerce-admin"));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getInitialConfigValues",value:function(){var e=this.props.options;return["merchant_email","merchant_id","client_id","client_secret"].reduce((function(t,n){return re(re({},t),{},P()({},n,e&&e[n+"_production"]?e[n+"_production"]:""))}),{})}},{key:"validate",value:function(e){var t={};return e.merchant_email||(t.merchant_email=Object(r.__)("Please enter your Merchant email","woocommerce-admin")),Object(ne.isEmail)(e.merchant_email)||(t.merchant_email=Object(r.__)("Please enter a valid email address","woocommerce-admin")),e.merchant_id||(t.merchant_id=Object(r.__)("Please enter your Merchant Id","woocommerce-admin")),e.client_id||(t.client_id=Object(r.__)("Please enter your Client Id","woocommerce-admin")),e.client_secret||(t.client_secret=Object(r.__)("Please enter your Client Secret","woocommerce-admin")),t}},{key:"renderManualConfig",value:function(){var e=this.props.isOptionsUpdating,t=a()({mixedString:Object(r.__)("Your API details can be obtained from your {{docsLink}}Paypal developer account{{/docsLink}}, and your Merchant Id from your {{merchantLink}}Paypal Business account{{/merchantLink}}. Don’t have a Paypal account? {{registerLink}}Create one.{{/registerLink}}","woocommerce-admin"),components:{docsLink:Object(c.createElement)(s.Link,{href:"https://developer.paypal.com/docs/api-basics/manage-apps/#create-or-edit-sandbox-and-live-apps",target:"_blank",type:"external"}),merchantLink:Object(c.createElement)(s.Link,{href:"https://www.paypal.com/ca/smarthelp/article/FAQ3850",target:"_blank",type:"external"}),registerLink:Object(c.createElement)(s.Link,{href:"https://www.paypal.com/us/business",target:"_blank",type:"external"})}});return Object(c.createElement)(s.Form,{initialValues:this.getInitialConfigValues(),onSubmitCallback:this.setCredentials,validate:this.validate},(function(n){var o=n.getInputProps,a=n.handleSubmit;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Email address","woocommerce-admin"),required:!0},o("merchant_email"))),Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Merchant Id","woocommerce-admin"),required:!0},o("merchant_id"))),Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Client Id","woocommerce-admin"),required:!0},o("client_id"))),Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Secret Key","woocommerce-admin"),required:!0},o("client_secret"))),Object(c.createElement)(x.Button,{isPrimary:!0,isBusy:e,onClick:a},Object(r.__)("Proceed","woocommerce-admin")),Object(c.createElement)("p",null,t))}))}},{key:"renderConnectFields",value:function(){var e=this.state,t=e.autoConnectFailed,n=e.connectURL;return!t&&n?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(se,{connectUrl:n}),Object(c.createElement)("p",null,Object(r.__)("You will be redirected to the PayPal website to create the connection.","woocommerce-admin"))):t?this.renderManualConfig():void 0}},{key:"getConnectStep",value:function(){var e=this.props.isRequestingOptions;return{key:"connect",label:Object(r.__)("Connect your PayPal account","woocommerce-admin"),description:Object(r.__)("A PayPal account is required to process payments. Connect your store to your PayPal account.","woocommerce-admin"),content:e?null:this.renderConnectFields()}}},{key:"render",value:function(){var e=this.props,t=e.installStep,n=e.isRequestingOptions,r=e.isOptionsUpdating,o=this.state.isPending;return Object(c.createElement)(s.Stepper,{isVertical:!0,isPending:!t.isComplete||o||n||r,currentStep:t.isComplete?"connect":"install",steps:[t,this.getConnectStep()]})}}]),u}(c.Component);le.defaultProps={manualConfig:!1};var me=Object(R.compose)(Object(L.withSelect)((function(e){var t=e(N.OPTIONS_STORE_NAME),n=t.getOption,c=t.isOptionsUpdating,r=t.hasFinishedResolution,o=e(N.PLUGINS_STORE_NAME).getActivePlugins,a=n("woocommerce-ppcp-settings"),i=!r("getOption",["woocommerce-ppcp-settings"]);return{activePlugins:o(),isOptionsUpdating:c(),options:a,isRequestingOptions:i}})),Object(L.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e(N.OPTIONS_STORE_NAME).updateOptions}})))(le);function ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=E()(e);if(t){var r=E()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return v()(this,n)}}var pe=function(e){k()(n,e);var t=ue(n);function n(e){var c;return _()(this,n),(c=t.call(this,e)).continue=c.continue.bind(O()(c)),c}return y()(n,[{key:"continue",value:function(){var e=this.props;(0,e.markConfigured)("checkout"===e.plugin?"klarna_checkout":"klarna_payments")}},{key:"renderConnectStep",value:function(){var e=this.props.plugin,t="checkout"===e?"klarna-checkout":"klarna-payments",n="checkout"===e?"kco":"klarna_payments",o=Object(c.createElement)(s.Link,{href:i.a+"admin.php?page=wc-settings&tab=checkout§ion="+n,target:"_blank",type:"external"}),l=Object(c.createElement)(s.Link,{href:"https://docs.woocommerce.com/document/"+t+"/#section-3",target:"_blank",type:"external"}),m=a()({mixedString:Object(r.__)("Klarna can be configured under your {{link}}store settings{{/link}}. Figure out {{helpLink}}what you need{{/helpLink}}.","woocommerce-admin"),components:{link:o,helpLink:l}});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",null,m),Object(c.createElement)(x.Button,{isPrimary:!0,onClick:this.continue},Object(r.__)("Continue","woocommerce-admin")))}},{key:"render",value:function(){var e=this.props.installStep;return Object(c.createElement)(s.Stepper,{isVertical:!0,isPending:!e.isComplete,currentStep:e.isComplete?"connect":"install",steps:[e,{key:"connect",label:Object(r.__)("Connect your Klarna account","woocommerce-admin"),content:this.renderConnectStep()}]})}}]),n}(c.Component);function de(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=E()(e);if(t){var r=E()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return v()(this,n)}}var be=function(e){k()(n,e);var t=de(n);function n(){var e;_()(this,n);for(var c=arguments.length,o=new Array(c),a=0;a<c;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),P()(O()(e),"getInitialConfigValues",(function(){return{merchant_id:"",merchant_key:"",pass_phrase:""}})),P()(O()(e),"validate",(function(e){var t={};return e.merchant_id||(t.merchant_id=Object(r.__)("Please enter your merchant ID","woocommerce-admin")),e.merchant_key||(t.merchant_key=Object(r.__)("Please enter your merchant key","woocommerce-admin")),e.pass_phrase||(t.pass_phrase=Object(r.__)("Please enter your passphrase","woocommerce-admin")),t})),P()(O()(e),"updateSettings",function(){var t=b()(p.a.mark((function t(n){var c,o,a,i;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=e.props,o=c.updateOptions,a=c.createNotice,i=c.markConfigured,t.next=3,o({woocommerce_currency:"ZAR",woocommerce_payfast_settings:{merchant_id:n.merchant_id,merchant_key:n.merchant_key,pass_phrase:n.pass_phrase,enabled:"yes"}});case 3:t.sent.success?(i("payfast"),a("success",Object(r.__)("PayFast connected successfully","woocommerce-admin"))):a("error",Object(r.__)("There was a problem saving your payment settings","woocommerce-admin"));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return y()(n,[{key:"renderConnectStep",value:function(){var e=this.props.isOptionsRequesting,t=a()({mixedString:Object(r.__)("Your API details can be obtained from your {{link}}PayFast account{{/link}}","woocommerce-admin"),components:{link:Object(c.createElement)(s.Link,{href:"https://www.payfast.co.za/",target:"_blank",type:"external"})}});return Object(c.createElement)(s.Form,{initialValues:this.getInitialConfigValues(),onSubmitCallback:this.updateSettings,validate:this.validate},(function(n){var o=n.getInputProps,a=n.handleSubmit;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Merchant ID","woocommerce-admin"),required:!0},o("merchant_id"))),Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Merchant Key","woocommerce-admin"),required:!0},o("merchant_key"))),Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Passphrase","woocommerce-admin"),required:!0},o("pass_phrase"))),Object(c.createElement)(x.Button,{isPrimary:!0,isBusy:e,onClick:a},Object(r.__)("Proceed","woocommerce-admin")),Object(c.createElement)("p",null,t))}))}},{key:"render",value:function(){var e=this.props,t=e.installStep,n=e.isOptionsRequesting;return Object(c.createElement)(s.Stepper,{isVertical:!0,isPending:!t.isComplete||n,currentStep:t.isComplete?"connect":"install",steps:[t,{key:"connect",label:Object(r.__)("Connect your PayFast account","woocommerce-admin"),content:this.renderConnectStep()}]})}}]),n}(c.Component),he=Object(R.compose)(Object(L.withSelect)((function(e){return{isOptionsRequesting:(0,e(N.OPTIONS_STORE_NAME).isOptionsUpdating)()}})),Object(L.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e(N.OPTIONS_STORE_NAME).updateOptions}})))(be);function _e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=E()(e);if(t){var r=E()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return v()(this,n)}}var fe=function(e){k()(n,e);var t=_e(n);function n(){var e;_()(this,n);for(var c=arguments.length,o=new Array(c),a=0;a<c;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),P()(O()(e),"getInitialConfigValues",(function(){return{customer_api:"",customer_password:""}})),P()(O()(e),"validate",(function(e){var t={};return e.customer_api||(t.customer_api=Object(r.__)("Please enter your customer API key ","woocommerce-admin")),e.customer_password||(t.customer_password=Object(r.__)("Please enter your customer password","woocommerce-admin")),t})),P()(O()(e),"updateSettings",function(){var t=b()(p.a.mark((function t(n){var c,o,a,i;return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=e.props,o=c.updateOptions,a=c.createNotice,i=c.markConfigured,t.next=3,o({woocommerce_eway_settings:{customer_api:n.customer_api,customer_password:n.customer_password,enabled:"yes"}});case 3:t.sent.success?(i("eway"),a("success",Object(r.__)("eWAY connected successfully","woocommerce-admin"))):a("error",Object(r.__)("There was a problem saving your payment settings","woocommerce-admin"));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return y()(n,[{key:"renderConnectStep",value:function(){var e=this.props.isOptionsRequesting,t=a()({mixedString:Object(r.__)("Your API details can be obtained from your {{link}}eWAY account{{/link}}","woocommerce-admin"),components:{link:Object(c.createElement)(s.Link,{href:"https://www.eway.com.au/",target:"_blank",type:"external"})}});return Object(c.createElement)(s.Form,{initialValues:this.getInitialConfigValues(),onSubmitCallback:this.updateSettings,validate:this.validate},(function(n){var o=n.getInputProps,a=n.handleSubmit;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Customer API Key","woocommerce-admin"),required:!0},o("customer_api"))),Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Customer Password","woocommerce-admin"),required:!0},o("customer_password"))),Object(c.createElement)(x.Button,{isPrimary:!0,isBusy:e,onClick:a},Object(r.__)("Proceed","woocommerce-admin")),Object(c.createElement)("p",null,t))}))}},{key:"render",value:function(){var e=this.props,t=e.installStep,n=e.isOptionsRequesting;return Object(c.createElement)(s.Stepper,{isVertical:!0,isPending:!t.isComplete||n,currentStep:t.isComplete?"connect":"install",steps:[t,{key:"connect",label:Object(r.__)("Connect your eWAY account","woocommerce-admin"),content:this.renderConnectStep()}]})}}]),n}(c.Component),ye=Object(R.compose)(Object(L.withSelect)((function(e){return{isOptionsRequesting:(0,e(N.OPTIONS_STORE_NAME).isOptionsUpdating)()}})),Object(L.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e(N.OPTIONS_STORE_NAME).updateOptions}})))(fe),ge={key_id:"",key_secret:""},Oe=function(e){var t={};return e.key_id||(t.key_id=Object(r.__)("Please enter your Key ID","woocommerce-admin")),e.key_secret||(t.key_secret=Object(r.__)("Please enter your Key Secret","woocommerce-admin")),t},we=function(){var e=b()(p.a.mark((function e(t,n,c,o){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o({woocommerce_razorpay_settings:{key_id:t.key_id,key_secret:t.key_secret,enabled:"yes"}});case 2:e.sent.success?(c("razorpay"),n("success",Object(r.__)("Razorpay connected successfully","woocommerce-admin"))):n("error",Object(r.__)("There was a problem saving your payment settings","woocommerce-admin"));case 4:case"end":return e.stop()}}),e)})));return function(t,n,c,r){return e.apply(this,arguments)}}(),ke=function(e){var t=e.createNotice,n=e.isOptionsRequesting,o=e.markConfigured,i=e.updateOptions,l=a()({mixedString:Object(r.__)("Your key details can be obtained from your {{link}}Razorpay account{{/link}}","woocommerce-admin"),components:{link:Object(c.createElement)(s.Link,{href:"https://dashboard.razorpay.com/#/access/signin",target:"_blank",type:"external"})}});return Object(c.createElement)(s.Form,{initialValues:ge,onSubmitCallback:function(e){return we(e,t,o,i)},validate:Oe},(function(e){var t=e.getInputProps,o=e.handleSubmit;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Key ID","woocommerce-admin"),required:!0},t("key_id"))),Object(c.createElement)(s.TextControl,m()({label:Object(r.__)("Key Secret","woocommerce-admin"),required:!0},t("key_secret"))),Object(c.createElement)(x.Button,{isPrimary:!0,isBusy:n,onClick:o},Object(r.__)("Proceed","woocommerce-admin")),Object(c.createElement)("p",null,l))}))},je=function(e){var t=e.createNotice,n=e.installStep,o=e.isOptionsRequesting,a=e.markConfigured,i=e.updateOptions;return Object(c.createElement)(s.Stepper,{isVertical:!0,isPending:!n.isComplete||o,currentStep:n.isComplete?"connect":"install",steps:[n,{key:"connect",label:Object(r.__)("Connect your Razorpay account","woocommerce-admin"),content:ke({createNotice:t,isOptionsRequesting:o,markConfigured:a,updateOptions:i})}]})},ve=function(e){var t=e.installStep,n=e.markConfigured,r=Object(L.useSelect)((function(e){return e(N.OPTIONS_STORE_NAME).isOptionsUpdating}))(),o=Object(L.useDispatch)("core/notices").createNotice,a=Object(L.useDispatch)(N.OPTIONS_STORE_NAME).updateOptions;return Object(c.createElement)(je,{createNotice:o,installStep:t,isOptionsRequesting:r,markConfigured:n,updateOptions:a})},Ce=function(e){var t=e.installStep,n=e.markConfigured;return Object(c.createElement)(s.Stepper,{isVertical:!0,isPending:!t.isComplete,currentStep:t.isComplete?"connect":"install",steps:[t,{key:"connect",label:Object(r.__)("Connect your Mollie account","woocommerce-admin"),content:Object(c.createElement)(Ee,{onFinish:function(){n("mollie")}})}]})},Ee=function(e){var t=e.onFinish,n=Object(c.createElement)(s.Link,{href:"".concat(i.a,"admin.php?page=wc-settings&tab=mollie_settings#mollie-payments-for-woocommerce"),target:"_blank",type:"external"}),o=Object(c.createElement)(s.Link,{href:"https://www.mollie.com/dashboard/signup",target:"_blank",type:"external"}),l=a()({mixedString:Object(r.__)("Create a {{accountLink}}Mollie account{{/accountLink}} and finish the configuration in the {{settingsLink}}Mollie settings.{{/settingsLink}}","woocommerce-admin"),components:{accountLink:o,settingsLink:n}});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",null,l),Object(c.createElement)(x.Button,{isPrimary:!0,onClick:t},Object(r.__)("Continue","woocommerce-admin")))},Se=function(e){var t=e.installStep,n=e.markConfigured;return Object(c.createElement)(s.Stepper,{isVertical:!0,isPending:!t.isComplete,currentStep:t.isComplete?"connect":"install",steps:[t,{key:"connect",label:Object(r.__)("Connect to your PayU account","woocommerce-admin"),content:Object(c.createElement)(Pe,{onFinish:function(){n("payubiz")}})}]})},Pe=function(e){var t=e.onFinish,n=Object(c.createElement)(s.Link,{href:"".concat(i.a,"admin.php?page=wc-settings&tab=checkout§ion=payubiz"),target:"_blank",type:"external"}),o=Object(c.createElement)(s.Link,{href:"https://onboarding.payu.in/app/account",target:"_blank",type:"external"}),l=a()({mixedString:Object(r.__)("PayU can be configured under your {{settingsLink}}store settings.{{/settingsLink}} Create your PayU account {{accountLink}}here.{{/accountLink}}","woocommerce-admin"),components:{accountLink:o,settingsLink:n}});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",null,l),Object(c.createElement)(x.Button,{isPrimary:!0,onClick:t},Object(r.__)("Continue","woocommerce-admin")))};function xe(e){var t=e.activePlugins,n=e.countryCode,o=e.createNotice,l=e.installAndActivatePlugins,m=e.onboardingStatus,u=e.options,p=e.profileItems,d=e.paypalOnboardingStatus,b=e.loadingPaypalStatus,h=m.stripeSupportedCountries,_=void 0===h?[]:h,f=m.wcPayIsConnected,y=void 0!==f&&f,g=m.enabledPaymentGateways,O=void 0===g?[]:g,w=(p.industry||[]).some((function(e){return"cbd-other-hemp-derived-products"===e.slug})),k=u.woocommerce_stripe_settings&&("no"===u.woocommerce_stripe_settings.testmode?u.woocommerce_stripe_settings.publishable_key&&u.woocommerce_stripe_settings.secret_key:u.woocommerce_stripe_settings.test_publishable_key&&u.woocommerce_stripe_settings.test_secret_key),j=[{key:"stripe",title:Object(r.__)("Credit cards - powered by Stripe","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("Accept debit and credit cards in 135+ currencies, methods such as Alipay, and one-touch checkout with Apple Pay.","woocommerce-admin")),before:Object(c.createElement)("img",{src:i.e+"images/stripe.png",alt:""}),visible:_.includes(n)&&!w,plugins:["woocommerce-gateway-stripe"],container:Object(c.createElement)(G,null),isConfigured:k,isEnabled:u.woocommerce_stripe_settings&&"yes"===u.woocommerce_stripe_settings.enabled,optionName:"woocommerce_stripe_settings"},{key:"paypal",title:Object(r.__)("PayPal Payments","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("Safe and secure payments using credit cards or your customer's PayPal account.","woocommerce-admin")),before:Object(c.createElement)("img",{src:i.e+"images/paypal.png",alt:""}),visible:!w,plugins:[ae],container:Object(c.createElement)(me,null),isConfigured:d&&d.production&&d.production.onboarded,isEnabled:O.includes("ppcp-gateway"),optionName:"woocommerce_ppcp-gateway_settings",loading:!!t.includes(ae)&&b},{key:"klarna_checkout",title:Object(r.__)("Klarna Checkout","woocommerce-admin"),content:Object(r.__)("Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries.","woocommerce-admin"),before:Object(c.createElement)("img",{src:i.e+"images/klarna-black.png",alt:""}),visible:["SE","FI","NO"].includes(n)&&!w,plugins:["klarna-checkout-for-woocommerce"],container:Object(c.createElement)(pe,{plugin:"checkout"}),isConfigured:t.includes("klarna-checkout-for-woocommerce"),isEnabled:u.woocommerce_kco_settings&&"yes"===u.woocommerce_kco_settings.enabled,optionName:"woocommerce_kco_settings"},{key:"klarna_payments",title:Object(r.__)("Klarna Payments","woocommerce-admin"),content:Object(r.__)("Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries.","woocommerce-admin"),before:Object(c.createElement)("img",{src:i.e+"images/klarna-black.png",alt:""}),visible:["DK","DE","AT","NL","CH","BE","SP","PL","FR","IT","GB"].includes(n)&&!w,plugins:["klarna-payments-for-woocommerce"],container:Object(c.createElement)(pe,{plugin:"payments"}),isConfigured:t.includes("klarna-payments-for-woocommerce"),isEnabled:u.woocommerce_klarna_payments_settings&&"yes"===u.woocommerce_klarna_payments_settings.enabled,optionName:"woocommerce_klarna_payments_settings"},{key:"mollie",title:Object(r.__)("Mollie Payments for WooCommerce","woocommerce-admin"),before:Object(c.createElement)(V,null),plugins:["mollie-payments-for-woocommerce"],isConfigured:t.includes("mollie-payments-for-woocommerce"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("Effortless payments by Mollie: Offer global and local payment methods, get onboarded in minutes, and supported in your language.","woocommerce-admin")),visible:["FR","DE","GB","AT","CH","ES","IT","PL","FI","NL","BE"].includes(n),container:Object(c.createElement)(Ce,null),isEnabled:u.woocommerce_mollie_payments_settings&&"yes"===u.woocommerce_mollie_payments_settings.enabled,optionName:"woocommerce_mollie_payments_settings"},{key:"square",title:Object(r.__)("Square","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("Securely accept credit and debit cards with one low rate, no surprise fees (custom rates available). Sell online and in store and track sales and inventory in one place.","woocommerce-admin"),w&&Object(c.createElement)("span",{className:"text-style-strong"},Object(r.__)(" Selling CBD products is only supported by Square.","woocommerce-admin"))),before:Object(c.createElement)("img",{src:"".concat(i.e,"images/square-black.png"),alt:""}),visible:w&&["US"].includes(n)||["brick-mortar","brick-mortar-other"].includes(p.selling_venues)&&["US","CA","JP","GB","AU"].includes(n),plugins:["woocommerce-square"],container:Object(c.createElement)(ee,null),isConfigured:u.wc_square_refresh_tokens&&u.wc_square_refresh_tokens.length,isEnabled:u.woocommerce_square_credit_card_settings&&"yes"===u.woocommerce_square_credit_card_settings.enabled,optionName:"woocommerce_square_credit_card_settings",hasCbdIndustry:w},{key:"payfast",title:Object(r.__)("PayFast","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("The PayFast extension for WooCommerce enables you to accept payments by Credit Card and EFT via one of South Africa’s most popular payment gateways. No setup fees or monthly subscription costs.","woocommerce-admin"),Object(c.createElement)("p",null,Object(r.__)("Selecting this extension will configure your store to use South African rands as the selected currency.","woocommerce-admin"))),before:Object(c.createElement)("img",{src:i.e+"images/payfast.png",alt:"PayFast logo"}),visible:["ZA"].includes(n)&&!w,plugins:["woocommerce-payfast-gateway"],container:Object(c.createElement)(he,null),isConfigured:u.woocommerce_payfast_settings&&u.woocommerce_payfast_settings.merchant_id&&u.woocommerce_payfast_settings.merchant_key&&u.woocommerce_payfast_settings.pass_phrase,isEnabled:u.woocommerce_payfast_settings&&"yes"===u.woocommerce_payfast_settings.enabled,optionName:"woocommerce_payfast_settings"},{key:"eway",title:Object(r.__)("eWAY","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("The eWAY extension for WooCommerce allows you to take credit card payments directly on your store without redirecting your customers to a third party site to make payment.","woocommerce-admin")),before:Object(c.createElement)("img",{src:i.e+"images/eway-logo.jpg",alt:"eWAY logo"}),visible:["AU","NZ"].includes(n)&&!w,plugins:["woocommerce-gateway-eway"],container:Object(c.createElement)(ye,null),isConfigured:u.woocommerce_eway_settings&&u.woocommerce_eway_settings.customer_api&&u.woocommerce_eway_settings.customer_password,isEnabled:u.woocommerce_eway_settings&&"yes"===u.woocommerce_eway_settings.enabled,optionName:"woocommerce_eway_settings"},{key:"razorpay",title:Object(r.__)("Razorpay","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("The official Razorpay extension for WooCommerce allows you to accept credit cards, debit cards, netbanking, wallet, and UPI payments.","woocommerce-admin")),before:Object(c.createElement)(D,null),visible:"IN"===n&&!w,plugins:["woo-razorpay"],container:Object(c.createElement)(ve,null),isConfigured:u.woocommerce_razorpay_settings&&u.woocommerce_razorpay_settings.key_id&&u.woocommerce_razorpay_settings.key_secret,isEnabled:u.woocommerce_razorpay_settings&&"yes"===u.woocommerce_razorpay_settings.enabled,optionName:"woocommerce_razorpay_settings"},{key:"payubiz",title:Object(r.__)("PayU for WooCommerce","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("Enable PayU’s exclusive plugin for WooCommerce to start accepting payments in 100+ payment methods available in India including credit cards, debit cards, UPI, & more!","woocommerce-admin")),before:Object(c.createElement)(F,null),visible:"IN"===n&&!w,plugins:["payu-india"],container:Object(c.createElement)(Se,null),isConfigured:t.includes("payu-india"),isEnabled:O.includes("payubiz"),optionName:"woocommerce_payubiz_settings"},{key:"cod",title:Object(r.__)("Cash on delivery","woocommerce-admin"),content:Object(r.__)("Take payments in cash upon delivery.","woocommerce-admin"),before:Object(c.createElement)(I,null),visible:!w,isEnabled:u.woocommerce_cod_settings&&"yes"===u.woocommerce_cod_settings.enabled,optionName:"woocommerce_cod_settings"},{key:"bacs",title:Object(r.__)("Direct bank transfer","woocommerce-admin"),content:Object(r.__)("Take payments via bank transfer.","woocommerce-admin"),before:Object(c.createElement)(q,null),visible:!w,container:Object(c.createElement)(M,null),isConfigured:u.woocommerce_bacs_accounts&&u.woocommerce_bacs_accounts.length,isEnabled:u.woocommerce_bacs_settings&&"yes"===u.woocommerce_bacs_settings.enabled,optionName:"woocommerce_bacs_settings"}];if(window.wcAdminFeatures.wcpay){var v=Object(c.createElement)(s.Link,{href:"https://wordpress.com/tos/",target:"_blank",type:"external"}),C=a()({mixedString:Object(r.__)('By clicking "Set up," you agree to the {{link}}Terms of Service{{/link}}',"woocommerce-admin"),components:{link:v}}),E=Object(c.createElement)(s.Link,{href:"https://docs.woocommerce.com/document/payments/testing/dev-mode/",target:"_blank",type:"external"}),S=a()({mixedString:Object(r.__)("Setting up a store for a client? {{link}}Start here{{/link}}","woocommerce-admin"),components:{link:E}}),P=Object(c.createElement)(s.Link,{href:Object(i.f)("admin.php?page=wc-settings&tab=checkout§ion=woocommerce_payments"),type:"wp-admin"},Object(r.__)("Settings","woocommerce-admin")),x=Object(c.createElement)(s.Link,{href:"https://docs.woocommerce.com/document/payments/faq/fees/",target:"_blank",type:"external"}),R=a()({mixedString:Object(r.__)("Accept credit card payments the easy way! {{feesLink}}No setup fees. No monthly fees.{{/feesLink}}","woocommerce-admin"),components:{feesLink:x}});j.unshift({key:"wcpay",title:Object(r.__)("WooCommerce Payments","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,R,y&&P,!y&&Object(c.createElement)("p",null,C),p.setup_client&&Object(c.createElement)("p",null,S),Object(c.createElement)(te.b,null)),before:Object(c.createElement)(U,null),onClick:function(e,t){return Object(te.c)(t,o,l)},visible:Object(te.d)(n)&&!w,plugins:["woocommerce-payments"],container:Object(c.createElement)(te.a,null),isConfigured:y,isEnabled:u.woocommerce_woocommerce_payments_settings&&"yes"===u.woocommerce_woocommerce_payments_settings.enabled,optionName:"woocommerce_woocommerce_payments_settings"})}return j.filter((function(e){return e.visible}))}}}]);
|
dist/chunks/52.js
CHANGED
@@ -1643,7 +1643,7 @@ module.exports = ReactPropTypesSecret;
|
|
1643 |
|
1644 |
/***/ }),
|
1645 |
|
1646 |
-
/***/
|
1647 |
/***/ (function(module, exports, __webpack_require__) {
|
1648 |
|
1649 |
"use strict";
|
1643 |
|
1644 |
/***/ }),
|
1645 |
|
1646 |
+
/***/ 542:
|
1647 |
/***/ (function(module, exports, __webpack_require__) {
|
1648 |
|
1649 |
"use strict";
|
dist/chunks/52.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[52,8],{107:function(e,t,n){"use strict";var o=n(10),r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=n(83),a=n(108),c=n(109),l="function"==typeof Symbol&&Symbol.iterator;function u(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,o={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return o[e]}))):t.toString(36);var n,o}function s(e,t,n,o){var i,c=typeof e;if("undefined"!==c&&"boolean"!==c||(e=null),null===e||"string"===c||"number"===c||"object"===c&&e.$$typeof===r)return n(o,e,""===t?"."+u(e,0):t),1;var f=0,p=""===t?".":t+":";if(Array.isArray(e))for(var h=0;h<e.length;h++)f+=s(i=e[h],p+u(i,h),n,o);else{var d=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(d){0;for(var v,b=d.call(e),m=0;!(v=b.next()).done;)f+=s(i=v.value,p+u(i,m++),n,o)}else if("object"===c){0;var y=""+e;a(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===y?"object with keys {"+Object.keys(e).join(", ")+"}":y,"")}}return f}var f=/\/+/g;function p(e){return(""+e).replace(f,"$&/")}var h,d,v=b,b=function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)},m=function(e){a(e instanceof this,"Trying to release an instance into a pool of a different type."),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)};function y(e,t,n,o){this.result=e,this.keyPrefix=t,this.func=n,this.context=o,this.count=0}function g(e,t,n){var r,a,c=e.result,l=e.keyPrefix,u=e.func,s=e.context,f=u.call(s,t,e.count++);Array.isArray(f)?w(f,c,n,i.thatReturnsArgument):null!=f&&(o.isValidElement(f)&&(r=f,a=l+(!f.key||t&&t.key===f.key?"":p(f.key)+"/")+n,f=o.cloneElement(r,{key:a},void 0!==r.props?r.props.children:void 0)),c.push(f))}function w(e,t,n,o,r){var i="";null!=n&&(i=p(n)+"/");var a=y.getPooled(t,i,o,r);!function(e,t,n){null==e||s(e,"",t,n)}(e,g,a),y.release(a)}y.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h=function(e,t,n,o){if(this.instancePool.length){var r=this.instancePool.pop();return this.call(r,e,t,n,o),r}return new this(e,t,n,o)},(d=y).instancePool=[],d.getPooled=h||v,d.poolSize||(d.poolSize=10),d.release=m;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return c(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(o.isValidElement(e))return c(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;a(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)w(e[n],t,n,i.thatReturnsArgument);return t}},108:function(e,t,n){"use strict";e.exports=function(e,t,n,o,r,i,a,c){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,r,i,a,c],s=0;(l=new Error(t.replace(/%s/g,(function(){return u[s++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},109:function(e,t,n){"use strict";var o=n(83);e.exports=o},110:function(e,t,n){"use strict";function o(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(o)}},189:function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.size,r=void 0===n?24:n,i=e.onClick,c=(e.icon,e.className),l=function(e,t){var n={};for(var o in e)0<=t.indexOf(o)||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(e,["size","onClick","icon","className"]),u=["gridicon","gridicons-notice-outline",c,(t=r,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",o({className:u,height:r,width:r,onClick:i},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})))};var r,i=n(10),a=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},192:function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.size,r=void 0===n?24:n,i=e.onClick,c=(e.icon,e.className),l=function(e,t){var n={};for(var o in e)0<=t.indexOf(o)||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(e,["size","onClick","icon","className"]),u=["gridicon","gridicons-star",c,(t=r,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",o({className:u,height:r,width:r,onClick:i},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"})))};var r,i=n(10),a=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},28:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=c(n(10)),i=c(n(107)),a=c(n(110));function c(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function u(e,t){var n,a,c,s,f,p,h,d,v=[],b={};for(p=0;p<e.length;p++)if("string"!==(f=e[p]).type){if(!t.hasOwnProperty(f.value)||void 0===t[f.value])throw new Error("Invalid interpolation, missing component node: `"+f.value+"`");if("object"!==o(t[f.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+f.value+"`","\n> "+l);if("componentClose"===f.type)throw new Error("Missing opening component token: `"+f.value+"`");if("componentOpen"===f.type){n=t[f.value],c=p;break}v.push(t[f.value])}else v.push(f.value);return n&&(s=function(e,t){var n,o,r=t[e],i=0;for(o=e+1;o<t.length;o++)if((n=t[o]).value===r.value){if("componentOpen"===n.type){i++;continue}if("componentClose"===n.type){if(0===i)return o;i--}}throw new Error("Missing closing component token `"+r.value+"`")}(c,e),h=u(e.slice(c+1,s),t),a=r.default.cloneElement(n,{},h),v.push(a),s<e.length-1&&(d=u(e.slice(s+1),t),v=v.concat(d))),1===v.length?v[0]:(v.forEach((function(e,t){e&&(b["interpolation-child-"+t]=e)})),(0,i.default)(b))}t.default=function(e){var t=e.mixedString,n=e.components,r=e.throwErrors;if(l=t,!n)return t;if("object"!==(void 0===n?"undefined":o(n))){if(r)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var i=(0,a.default)(t);try{return u(i,n)}catch(e){if(r)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},46:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"h",(function(){return u})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return f})),n.d(t,"g",(function(){return p})),n.d(t,"e",(function(){return h})),n.d(t,"i",(function(){return d})),n.d(t,"f",(function(){return v})),n.d(t,"b",(function(){return b}));var o=n(36),r=n(82),i=n(3),a=n(2);function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.navigator.platform;return-1!==t.indexOf("Mac")||Object(i.includes)(["iPad","iPhone"],t)}var l=8,u=9,s=13,f=27,p=32,h=37,d=38,v=39,b=40,m="alt",y="ctrl",g="meta",w="shift",O={primary:function(e){return e()?[g]:[y]},primaryShift:function(e){return e()?[w,g]:[y,w]},primaryAlt:function(e){return e()?[m,g]:[y,m]},secondary:function(e){return e()?[w,m,g]:[y,w,m]},access:function(e){return e()?[y,m]:[w,m]},ctrl:function(){return[y]},alt:function(){return[m]},ctrlShift:function(){return[y,w]},shift:function(){return[w]},shiftAlt:function(){return[w,m]}},j=(Object(i.mapValues)(O,(function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return[].concat(Object(r.a)(e(n)),[t.toLowerCase()]).join("+")}})),Object(i.mapValues)(O,(function(e){return function(t){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c,l=a(),u=(n={},Object(o.a)(n,m,l?"⌥":"Alt"),Object(o.a)(n,y,l?"⌃":"Ctrl"),Object(o.a)(n,g,"⌘"),Object(o.a)(n,w,l?"⇧":"Shift"),n),s=e(a).reduce((function(e,t){var n=Object(i.get)(u,t,t);return[].concat(Object(r.a)(e),l?[n]:[n,"+"])}),[]),f=Object(i.capitalize)(t);return[].concat(Object(r.a)(s),[f])}})));Object(i.mapValues)(j,(function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return e(t,n).join("")}})),Object(i.mapValues)(O,(function(e){return function(t){var n,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c,u=l(),s=(n={},Object(o.a)(n,w,"Shift"),Object(o.a)(n,g,u?"Command":"Control"),Object(o.a)(n,y,"Control"),Object(o.a)(n,m,u?"Option":"Alt"),Object(o.a)(n,",",Object(a.__)("Comma")),Object(o.a)(n,".",Object(a.__)("Period")),Object(o.a)(n,"`",Object(a.__)("Backtick")),n);return[].concat(Object(r.a)(e(l)),[t]).map((function(e){return Object(i.capitalize)(Object(i.get)(s,e,e))})).join(u?" ":" + ")}}));function k(e){return[m,y,g,w].filter((function(t){return e["".concat(t,"Key")]}))}Object(i.mapValues)(O,(function(e){return function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c,r=e(o),a=k(t);return!Object(i.xor)(r,a).length&&(n?t.key===n:Object(i.includes)(r,t.key.toLowerCase()))}}))},528:function(e,t,n){var o;o=function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){e.exports=n(5)()},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=function(e,t,n){var o=e.direction,r=e.value;switch(o){case"top":return n.top+r<t.top&&n.bottom>t.bottom&&n.left<t.left&&n.right>t.right;case"left":return n.left+r<t.left&&n.bottom>t.bottom&&n.top<t.top&&n.right>t.right;case"bottom":return n.bottom-r>t.bottom&&n.left<t.left&&n.right>t.right&&n.top<t.top;case"right":return n.right-r>t.right&&n.left<t.left&&n.top<t.top&&n.bottom>t.bottom}}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return m}));var o=n(1),r=n.n(o),i=n(2),a=n.n(i),c=n(0),l=n.n(c),u=n(3),s=n.n(u);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){function t(e){var n,o,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),o=this,r=h(t).call(this,e),n=!r||"object"!==f(r)&&"function"!=typeof r?d(o):r,b(d(n),"getContainer",(function(){return n.props.containment||window})),b(d(n),"addEventListener",(function(e,t,o,r){var i;n.debounceCheck||(n.debounceCheck={});var a=function(){i=null,n.check()},c={target:e,fn:r>-1?function(){i||(i=setTimeout(a,r||0))}:function(){clearTimeout(i),i=setTimeout(a,o||0)},getLastTimeout:function(){return i}};e.addEventListener(t,c.fn),n.debounceCheck[t]=c})),b(d(n),"startWatching",(function(){n.debounceCheck||n.interval||(n.props.intervalCheck&&(n.interval=setInterval(n.check,n.props.intervalDelay)),n.props.scrollCheck&&n.addEventListener(n.getContainer(),"scroll",n.props.scrollDelay,n.props.scrollThrottle),n.props.resizeCheck&&n.addEventListener(window,"resize",n.props.resizeDelay,n.props.resizeThrottle),!n.props.delayedCall&&n.check())})),b(d(n),"stopWatching",(function(){if(n.debounceCheck)for(var e in n.debounceCheck)if(n.debounceCheck.hasOwnProperty(e)){var t=n.debounceCheck[e];clearTimeout(t.getLastTimeout()),t.target.removeEventListener(e,t.fn),n.debounceCheck[e]=null}n.debounceCheck=null,n.interval&&(n.interval=clearInterval(n.interval))})),b(d(n),"check",(function(){var e,t,o=n.node;if(!o)return n.state;if(e=function(e){return void 0===e.width&&(e.width=e.right-e.left),void 0===e.height&&(e.height=e.bottom-e.top),e}(n.roundRectDown(o.getBoundingClientRect())),n.props.containment){var r=n.props.containment.getBoundingClientRect();t={top:r.top,left:r.left,bottom:r.bottom,right:r.right}}else t={top:0,left:0,bottom:window.innerHeight||document.documentElement.clientHeight,right:window.innerWidth||document.documentElement.clientWidth};var i=n.props.offset||{};"object"===f(i)&&(t.top+=i.top||0,t.left+=i.left||0,t.bottom-=i.bottom||0,t.right-=i.right||0);var a={top:e.top>=t.top,left:e.left>=t.left,bottom:e.bottom<=t.bottom,right:e.right<=t.right},c=e.height>0&&e.width>0,l=c&&a.top&&a.left&&a.bottom&&a.right;if(c&&n.props.partialVisibility){var u=e.top<=t.bottom&&e.bottom>=t.top&&e.left<=t.right&&e.right>=t.left;"string"==typeof n.props.partialVisibility&&(u=a[n.props.partialVisibility]),l=n.props.minTopValue?u&&e.top<=t.bottom-n.props.minTopValue:u}"string"==typeof i.direction&&"number"==typeof i.value&&(console.warn("[notice] offset.direction and offset.value have been deprecated. They still work for now, but will be removed in next major version. Please upgrade to the new syntax: { %s: %d }",i.direction,i.value),l=s()(i,e,t));var p=n.state;return n.state.isVisible!==l&&(p={isVisible:l,visibilityRect:a},n.setState(p),n.props.onChange&&n.props.onChange(l)),p})),n.state={isVisible:null,visibilityRect:{}},n}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(t,e),n=t,(o=[{key:"componentDidMount",value:function(){this.node=a.a.findDOMNode(this),this.props.active&&this.startWatching()}},{key:"componentWillUnmount",value:function(){this.stopWatching()}},{key:"componentDidUpdate",value:function(e){this.node=a.a.findDOMNode(this),this.props.active&&!e.active?(this.setState({isVisible:null,visibilityRect:{}}),this.startWatching()):this.props.active||this.stopWatching()}},{key:"roundRectDown",value:function(e){return{top:Math.floor(e.top),left:Math.floor(e.left),bottom:Math.floor(e.bottom),right:Math.floor(e.right)}}},{key:"render",value:function(){return this.props.children instanceof Function?this.props.children({isVisible:this.state.isVisible,visibilityRect:this.state.visibilityRect}):r.a.Children.only(this.props.children)}}])&&p(n.prototype,o),i&&p(n,i),t}(r.a.Component);b(m,"defaultProps",{active:!0,partialVisibility:!1,minTopValue:0,scrollCheck:!1,scrollDelay:250,scrollThrottle:-1,resizeCheck:!1,resizeDelay:250,resizeThrottle:-1,intervalCheck:!0,intervalDelay:100,delayedCall:!1,offset:{},containment:null,children:r.a.createElement("span",null)}),b(m,"propTypes",{onChange:l.a.func,active:l.a.bool,partialVisibility:l.a.oneOfType([l.a.bool,l.a.oneOf(["top","right","bottom","left"])]),delayedCall:l.a.bool,offset:l.a.oneOfType([l.a.shape({top:l.a.number,left:l.a.number,bottom:l.a.number,right:l.a.number}),l.a.shape({direction:l.a.oneOf(["top","right","bottom","left"]),value:l.a.number})]),scrollCheck:l.a.bool,scrollDelay:l.a.number,scrollThrottle:l.a.number,resizeCheck:l.a.bool,resizeDelay:l.a.number,resizeThrottle:l.a.number,intervalCheck:l.a.bool,intervalDelay:l.a.number,containment:"undefined"!=typeof window?l.a.instanceOf(window.Element):l.a.any,children:l.a.oneOfType([l.a.element,l.a.func]),minTopValue:l.a.number})},function(e,t,n){"use strict";var o=n(6);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}])},e.exports=o(n(10),n(50))},541:function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.size,r=void 0===n?24:n,i=e.onClick,c=(e.icon,e.className),l=function(e,t){var n={};for(var o in e)0<=t.indexOf(o)||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(e,["size","onClick","icon","className"]),u=["gridicon","gridicons-star-outline",c,(t=r,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",o({className:u,height:r,width:r,onClick:i},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"})))};var r,i=n(10),a=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},591:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));t.a=i},592:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{fillRule:"evenodd",d:"M6.863 13.644L5 13.25h-.5a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5H5L18 6.5h2V16h-2l-3.854-.815.026.008a3.75 3.75 0 01-7.31-1.549zm1.477.313a2.251 2.251 0 004.356.921l-4.356-.921zm-2.84-3.28L18.157 8h.343v6.5h-.343L5.5 11.823v-1.146z",clipRule:"evenodd"}));t.a=i},593:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{fillRule:"evenodd",d:"M5 5.5h14a.5.5 0 01.5.5v1.5a.5.5 0 01-.5.5H5a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 9.232A2 2 0 013 7.5V6a2 2 0 012-2h14a2 2 0 012 2v1.5a2 2 0 01-1 1.732V18a2 2 0 01-2 2H6a2 2 0 01-2-2V9.232zm1.5.268V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5V9.5h-13z",clipRule:"evenodd"}));t.a=i},594:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(o.createElement)(r.a,{d:"M18.33 3.57s.27-.8-.31-1.36c-.53-.52-1.22-.24-1.22-.24-.61.3-5.76 3.47-7.67 5.57-.86.96-2.06 3.79-1.09 4.82.92.98 3.96-.17 4.79-1 2.06-2.06 5.21-7.17 5.5-7.79zM1.4 17.65c2.37-1.56 1.46-3.41 3.23-4.64.93-.65 2.22-.62 3.08.29.63.67.8 2.57-.16 3.46-1.57 1.45-4 1.55-6.15.89z"}));t.a=i},595:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"}));t.a=i},596:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=i},597:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"}));t.a=i},598:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{fillRule:"evenodd",d:"M6.5 8a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zM8 5a3 3 0 100 6 3 3 0 000-6zm6.5 11a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zm1.5-3a3 3 0 100 6 3 3 0 000-6zM5.47 17.41a.75.75 0 001.06 1.06L18.47 6.53a.75.75 0 10-1.06-1.06L5.47 17.41z",clipRule:"evenodd"}));t.a=i},599:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{d:"M3 6.75C3 5.784 3.784 5 4.75 5H15V7.313l.05.027 5.056 2.73.394.212v3.468a1.75 1.75 0 01-1.75 1.75h-.012a2.5 2.5 0 11-4.975 0H9.737a2.5 2.5 0 11-4.975 0H3V6.75zM13.5 14V6.5H4.75a.25.25 0 00-.25.25V14h.965a2.493 2.493 0 011.785-.75c.7 0 1.332.287 1.785.75H13.5zm4.535 0h.715a.25.25 0 00.25-.25v-2.573l-4-2.16v4.568a2.487 2.487 0 011.25-.335c.7 0 1.332.287 1.785.75zM6.282 15.5a1.002 1.002 0 00.968 1.25 1 1 0 10-.968-1.25zm9 0a1 1 0 101.937.498 1 1 0 00-1.938-.498z"}));t.a=i},83:function(e,t,n){"use strict";function o(e){return function(){return e}}var r=function(){};r.thatReturns=o,r.thatReturnsFalse=o(!1),r.thatReturnsTrue=o(!0),r.thatReturnsNull=o(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r}}]);
|
1 |
+
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[52,8],{107:function(e,t,n){"use strict";var o=n(10),r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=n(83),a=n(108),c=n(109),l="function"==typeof Symbol&&Symbol.iterator;function u(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,o={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return o[e]}))):t.toString(36);var n,o}function s(e,t,n,o){var i,c=typeof e;if("undefined"!==c&&"boolean"!==c||(e=null),null===e||"string"===c||"number"===c||"object"===c&&e.$$typeof===r)return n(o,e,""===t?"."+u(e,0):t),1;var f=0,p=""===t?".":t+":";if(Array.isArray(e))for(var h=0;h<e.length;h++)f+=s(i=e[h],p+u(i,h),n,o);else{var d=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(d){0;for(var v,b=d.call(e),m=0;!(v=b.next()).done;)f+=s(i=v.value,p+u(i,m++),n,o)}else if("object"===c){0;var y=""+e;a(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===y?"object with keys {"+Object.keys(e).join(", ")+"}":y,"")}}return f}var f=/\/+/g;function p(e){return(""+e).replace(f,"$&/")}var h,d,v=b,b=function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)},m=function(e){a(e instanceof this,"Trying to release an instance into a pool of a different type."),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)};function y(e,t,n,o){this.result=e,this.keyPrefix=t,this.func=n,this.context=o,this.count=0}function g(e,t,n){var r,a,c=e.result,l=e.keyPrefix,u=e.func,s=e.context,f=u.call(s,t,e.count++);Array.isArray(f)?w(f,c,n,i.thatReturnsArgument):null!=f&&(o.isValidElement(f)&&(r=f,a=l+(!f.key||t&&t.key===f.key?"":p(f.key)+"/")+n,f=o.cloneElement(r,{key:a},void 0!==r.props?r.props.children:void 0)),c.push(f))}function w(e,t,n,o,r){var i="";null!=n&&(i=p(n)+"/");var a=y.getPooled(t,i,o,r);!function(e,t,n){null==e||s(e,"",t,n)}(e,g,a),y.release(a)}y.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h=function(e,t,n,o){if(this.instancePool.length){var r=this.instancePool.pop();return this.call(r,e,t,n,o),r}return new this(e,t,n,o)},(d=y).instancePool=[],d.getPooled=h||v,d.poolSize||(d.poolSize=10),d.release=m;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return c(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(o.isValidElement(e))return c(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;a(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)w(e[n],t,n,i.thatReturnsArgument);return t}},108:function(e,t,n){"use strict";e.exports=function(e,t,n,o,r,i,a,c){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,r,i,a,c],s=0;(l=new Error(t.replace(/%s/g,(function(){return u[s++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},109:function(e,t,n){"use strict";var o=n(83);e.exports=o},110:function(e,t,n){"use strict";function o(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(o)}},189:function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.size,r=void 0===n?24:n,i=e.onClick,c=(e.icon,e.className),l=function(e,t){var n={};for(var o in e)0<=t.indexOf(o)||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(e,["size","onClick","icon","className"]),u=["gridicon","gridicons-notice-outline",c,(t=r,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",o({className:u,height:r,width:r,onClick:i},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})))};var r,i=n(10),a=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},192:function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.size,r=void 0===n?24:n,i=e.onClick,c=(e.icon,e.className),l=function(e,t){var n={};for(var o in e)0<=t.indexOf(o)||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(e,["size","onClick","icon","className"]),u=["gridicon","gridicons-star",c,(t=r,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",o({className:u,height:r,width:r,onClick:i},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"})))};var r,i=n(10),a=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},28:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=c(n(10)),i=c(n(107)),a=c(n(110));function c(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function u(e,t){var n,a,c,s,f,p,h,d,v=[],b={};for(p=0;p<e.length;p++)if("string"!==(f=e[p]).type){if(!t.hasOwnProperty(f.value)||void 0===t[f.value])throw new Error("Invalid interpolation, missing component node: `"+f.value+"`");if("object"!==o(t[f.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+f.value+"`","\n> "+l);if("componentClose"===f.type)throw new Error("Missing opening component token: `"+f.value+"`");if("componentOpen"===f.type){n=t[f.value],c=p;break}v.push(t[f.value])}else v.push(f.value);return n&&(s=function(e,t){var n,o,r=t[e],i=0;for(o=e+1;o<t.length;o++)if((n=t[o]).value===r.value){if("componentOpen"===n.type){i++;continue}if("componentClose"===n.type){if(0===i)return o;i--}}throw new Error("Missing closing component token `"+r.value+"`")}(c,e),h=u(e.slice(c+1,s),t),a=r.default.cloneElement(n,{},h),v.push(a),s<e.length-1&&(d=u(e.slice(s+1),t),v=v.concat(d))),1===v.length?v[0]:(v.forEach((function(e,t){e&&(b["interpolation-child-"+t]=e)})),(0,i.default)(b))}t.default=function(e){var t=e.mixedString,n=e.components,r=e.throwErrors;if(l=t,!n)return t;if("object"!==(void 0===n?"undefined":o(n))){if(r)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var i=(0,a.default)(t);try{return u(i,n)}catch(e){if(r)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},46:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"h",(function(){return u})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return f})),n.d(t,"g",(function(){return p})),n.d(t,"e",(function(){return h})),n.d(t,"i",(function(){return d})),n.d(t,"f",(function(){return v})),n.d(t,"b",(function(){return b}));var o=n(36),r=n(82),i=n(3),a=n(2);function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.navigator.platform;return-1!==t.indexOf("Mac")||Object(i.includes)(["iPad","iPhone"],t)}var l=8,u=9,s=13,f=27,p=32,h=37,d=38,v=39,b=40,m="alt",y="ctrl",g="meta",w="shift",O={primary:function(e){return e()?[g]:[y]},primaryShift:function(e){return e()?[w,g]:[y,w]},primaryAlt:function(e){return e()?[m,g]:[y,m]},secondary:function(e){return e()?[w,m,g]:[y,w,m]},access:function(e){return e()?[y,m]:[w,m]},ctrl:function(){return[y]},alt:function(){return[m]},ctrlShift:function(){return[y,w]},shift:function(){return[w]},shiftAlt:function(){return[w,m]}},j=(Object(i.mapValues)(O,(function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return[].concat(Object(r.a)(e(n)),[t.toLowerCase()]).join("+")}})),Object(i.mapValues)(O,(function(e){return function(t){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c,l=a(),u=(n={},Object(o.a)(n,m,l?"⌥":"Alt"),Object(o.a)(n,y,l?"⌃":"Ctrl"),Object(o.a)(n,g,"⌘"),Object(o.a)(n,w,l?"⇧":"Shift"),n),s=e(a).reduce((function(e,t){var n=Object(i.get)(u,t,t);return[].concat(Object(r.a)(e),l?[n]:[n,"+"])}),[]),f=Object(i.capitalize)(t);return[].concat(Object(r.a)(s),[f])}})));Object(i.mapValues)(j,(function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return e(t,n).join("")}})),Object(i.mapValues)(O,(function(e){return function(t){var n,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c,u=l(),s=(n={},Object(o.a)(n,w,"Shift"),Object(o.a)(n,g,u?"Command":"Control"),Object(o.a)(n,y,"Control"),Object(o.a)(n,m,u?"Option":"Alt"),Object(o.a)(n,",",Object(a.__)("Comma")),Object(o.a)(n,".",Object(a.__)("Period")),Object(o.a)(n,"`",Object(a.__)("Backtick")),n);return[].concat(Object(r.a)(e(l)),[t]).map((function(e){return Object(i.capitalize)(Object(i.get)(s,e,e))})).join(u?" ":" + ")}}));function k(e){return[m,y,g,w].filter((function(t){return e["".concat(t,"Key")]}))}Object(i.mapValues)(O,(function(e){return function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c,r=e(o),a=k(t);return!Object(i.xor)(r,a).length&&(n?t.key===n:Object(i.includes)(r,t.key.toLowerCase()))}}))},528:function(e,t,n){var o;o=function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){e.exports=n(5)()},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=function(e,t,n){var o=e.direction,r=e.value;switch(o){case"top":return n.top+r<t.top&&n.bottom>t.bottom&&n.left<t.left&&n.right>t.right;case"left":return n.left+r<t.left&&n.bottom>t.bottom&&n.top<t.top&&n.right>t.right;case"bottom":return n.bottom-r>t.bottom&&n.left<t.left&&n.right>t.right&&n.top<t.top;case"right":return n.right-r>t.right&&n.left<t.left&&n.top<t.top&&n.bottom>t.bottom}}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return m}));var o=n(1),r=n.n(o),i=n(2),a=n.n(i),c=n(0),l=n.n(c),u=n(3),s=n.n(u);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){function t(e){var n,o,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),o=this,r=h(t).call(this,e),n=!r||"object"!==f(r)&&"function"!=typeof r?d(o):r,b(d(n),"getContainer",(function(){return n.props.containment||window})),b(d(n),"addEventListener",(function(e,t,o,r){var i;n.debounceCheck||(n.debounceCheck={});var a=function(){i=null,n.check()},c={target:e,fn:r>-1?function(){i||(i=setTimeout(a,r||0))}:function(){clearTimeout(i),i=setTimeout(a,o||0)},getLastTimeout:function(){return i}};e.addEventListener(t,c.fn),n.debounceCheck[t]=c})),b(d(n),"startWatching",(function(){n.debounceCheck||n.interval||(n.props.intervalCheck&&(n.interval=setInterval(n.check,n.props.intervalDelay)),n.props.scrollCheck&&n.addEventListener(n.getContainer(),"scroll",n.props.scrollDelay,n.props.scrollThrottle),n.props.resizeCheck&&n.addEventListener(window,"resize",n.props.resizeDelay,n.props.resizeThrottle),!n.props.delayedCall&&n.check())})),b(d(n),"stopWatching",(function(){if(n.debounceCheck)for(var e in n.debounceCheck)if(n.debounceCheck.hasOwnProperty(e)){var t=n.debounceCheck[e];clearTimeout(t.getLastTimeout()),t.target.removeEventListener(e,t.fn),n.debounceCheck[e]=null}n.debounceCheck=null,n.interval&&(n.interval=clearInterval(n.interval))})),b(d(n),"check",(function(){var e,t,o=n.node;if(!o)return n.state;if(e=function(e){return void 0===e.width&&(e.width=e.right-e.left),void 0===e.height&&(e.height=e.bottom-e.top),e}(n.roundRectDown(o.getBoundingClientRect())),n.props.containment){var r=n.props.containment.getBoundingClientRect();t={top:r.top,left:r.left,bottom:r.bottom,right:r.right}}else t={top:0,left:0,bottom:window.innerHeight||document.documentElement.clientHeight,right:window.innerWidth||document.documentElement.clientWidth};var i=n.props.offset||{};"object"===f(i)&&(t.top+=i.top||0,t.left+=i.left||0,t.bottom-=i.bottom||0,t.right-=i.right||0);var a={top:e.top>=t.top,left:e.left>=t.left,bottom:e.bottom<=t.bottom,right:e.right<=t.right},c=e.height>0&&e.width>0,l=c&&a.top&&a.left&&a.bottom&&a.right;if(c&&n.props.partialVisibility){var u=e.top<=t.bottom&&e.bottom>=t.top&&e.left<=t.right&&e.right>=t.left;"string"==typeof n.props.partialVisibility&&(u=a[n.props.partialVisibility]),l=n.props.minTopValue?u&&e.top<=t.bottom-n.props.minTopValue:u}"string"==typeof i.direction&&"number"==typeof i.value&&(console.warn("[notice] offset.direction and offset.value have been deprecated. They still work for now, but will be removed in next major version. Please upgrade to the new syntax: { %s: %d }",i.direction,i.value),l=s()(i,e,t));var p=n.state;return n.state.isVisible!==l&&(p={isVisible:l,visibilityRect:a},n.setState(p),n.props.onChange&&n.props.onChange(l)),p})),n.state={isVisible:null,visibilityRect:{}},n}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(t,e),n=t,(o=[{key:"componentDidMount",value:function(){this.node=a.a.findDOMNode(this),this.props.active&&this.startWatching()}},{key:"componentWillUnmount",value:function(){this.stopWatching()}},{key:"componentDidUpdate",value:function(e){this.node=a.a.findDOMNode(this),this.props.active&&!e.active?(this.setState({isVisible:null,visibilityRect:{}}),this.startWatching()):this.props.active||this.stopWatching()}},{key:"roundRectDown",value:function(e){return{top:Math.floor(e.top),left:Math.floor(e.left),bottom:Math.floor(e.bottom),right:Math.floor(e.right)}}},{key:"render",value:function(){return this.props.children instanceof Function?this.props.children({isVisible:this.state.isVisible,visibilityRect:this.state.visibilityRect}):r.a.Children.only(this.props.children)}}])&&p(n.prototype,o),i&&p(n,i),t}(r.a.Component);b(m,"defaultProps",{active:!0,partialVisibility:!1,minTopValue:0,scrollCheck:!1,scrollDelay:250,scrollThrottle:-1,resizeCheck:!1,resizeDelay:250,resizeThrottle:-1,intervalCheck:!0,intervalDelay:100,delayedCall:!1,offset:{},containment:null,children:r.a.createElement("span",null)}),b(m,"propTypes",{onChange:l.a.func,active:l.a.bool,partialVisibility:l.a.oneOfType([l.a.bool,l.a.oneOf(["top","right","bottom","left"])]),delayedCall:l.a.bool,offset:l.a.oneOfType([l.a.shape({top:l.a.number,left:l.a.number,bottom:l.a.number,right:l.a.number}),l.a.shape({direction:l.a.oneOf(["top","right","bottom","left"]),value:l.a.number})]),scrollCheck:l.a.bool,scrollDelay:l.a.number,scrollThrottle:l.a.number,resizeCheck:l.a.bool,resizeDelay:l.a.number,resizeThrottle:l.a.number,intervalCheck:l.a.bool,intervalDelay:l.a.number,containment:"undefined"!=typeof window?l.a.instanceOf(window.Element):l.a.any,children:l.a.oneOfType([l.a.element,l.a.func]),minTopValue:l.a.number})},function(e,t,n){"use strict";var o=n(6);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}])},e.exports=o(n(10),n(50))},542:function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.size,r=void 0===n?24:n,i=e.onClick,c=(e.icon,e.className),l=function(e,t){var n={};for(var o in e)0<=t.indexOf(o)||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(e,["size","onClick","icon","className"]),u=["gridicon","gridicons-star-outline",c,(t=r,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",o({className:u,height:r,width:r,onClick:i},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"})))};var r,i=n(10),a=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},591:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));t.a=i},592:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{fillRule:"evenodd",d:"M6.863 13.644L5 13.25h-.5a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5H5L18 6.5h2V16h-2l-3.854-.815.026.008a3.75 3.75 0 01-7.31-1.549zm1.477.313a2.251 2.251 0 004.356.921l-4.356-.921zm-2.84-3.28L18.157 8h.343v6.5h-.343L5.5 11.823v-1.146z",clipRule:"evenodd"}));t.a=i},593:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{fillRule:"evenodd",d:"M5 5.5h14a.5.5 0 01.5.5v1.5a.5.5 0 01-.5.5H5a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 9.232A2 2 0 013 7.5V6a2 2 0 012-2h14a2 2 0 012 2v1.5a2 2 0 01-1 1.732V18a2 2 0 01-2 2H6a2 2 0 01-2-2V9.232zm1.5.268V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5V9.5h-13z",clipRule:"evenodd"}));t.a=i},594:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(o.createElement)(r.a,{d:"M18.33 3.57s.27-.8-.31-1.36c-.53-.52-1.22-.24-1.22-.24-.61.3-5.76 3.47-7.67 5.57-.86.96-2.06 3.79-1.09 4.82.92.98 3.96-.17 4.79-1 2.06-2.06 5.21-7.17 5.5-7.79zM1.4 17.65c2.37-1.56 1.46-3.41 3.23-4.64.93-.65 2.22-.62 3.08.29.63.67.8 2.57-.16 3.46-1.57 1.45-4 1.55-6.15.89z"}));t.a=i},595:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"}));t.a=i},596:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));t.a=i},597:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"}));t.a=i},598:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{fillRule:"evenodd",d:"M6.5 8a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zM8 5a3 3 0 100 6 3 3 0 000-6zm6.5 11a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zm1.5-3a3 3 0 100 6 3 3 0 000-6zM5.47 17.41a.75.75 0 001.06 1.06L18.47 6.53a.75.75 0 10-1.06-1.06L5.47 17.41z",clipRule:"evenodd"}));t.a=i},599:function(e,t,n){"use strict";var o=n(0),r=n(67),i=Object(o.createElement)(r.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(r.a,{d:"M3 6.75C3 5.784 3.784 5 4.75 5H15V7.313l.05.027 5.056 2.73.394.212v3.468a1.75 1.75 0 01-1.75 1.75h-.012a2.5 2.5 0 11-4.975 0H9.737a2.5 2.5 0 11-4.975 0H3V6.75zM13.5 14V6.5H4.75a.25.25 0 00-.25.25V14h.965a2.493 2.493 0 011.785-.75c.7 0 1.332.287 1.785.75H13.5zm4.535 0h.715a.25.25 0 00.25-.25v-2.573l-4-2.16v4.568a2.487 2.487 0 011.25-.335c.7 0 1.332.287 1.785.75zM6.282 15.5a1.002 1.002 0 00.968 1.25 1 1 0 10-.968-1.25zm9 0a1 1 0 101.937.498 1 1 0 00-1.938-.498z"}));t.a=i},83:function(e,t,n){"use strict";function o(e){return function(){return e}}var r=function(){};r.thatReturns=o,r.thatReturnsFalse=o(!1),r.thatReturnsTrue=o(!0),r.thatReturnsNull=o(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r}}]);
|
dist/chunks/53.js
CHANGED
@@ -671,30 +671,6 @@ var chevronDown = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["create
|
|
671 |
|
672 |
/***/ }),
|
673 |
|
674 |
-
/***/ 560:
|
675 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
676 |
-
|
677 |
-
"use strict";
|
678 |
-
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
679 |
-
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
680 |
-
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67);
|
681 |
-
|
682 |
-
|
683 |
-
/**
|
684 |
-
* WordPress dependencies
|
685 |
-
*/
|
686 |
-
|
687 |
-
var check = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__[/* SVG */ "b"], {
|
688 |
-
xmlns: "http://www.w3.org/2000/svg",
|
689 |
-
viewBox: "0 0 24 24"
|
690 |
-
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__[/* Path */ "a"], {
|
691 |
-
d: "M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"
|
692 |
-
}));
|
693 |
-
/* harmony default export */ __webpack_exports__["a"] = (check);
|
694 |
-
//# sourceMappingURL=check.js.map
|
695 |
-
|
696 |
-
/***/ }),
|
697 |
-
|
698 |
/***/ 566:
|
699 |
/***/ (function(module, exports, __webpack_require__) {
|
700 |
|
671 |
|
672 |
/***/ }),
|
673 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
674 |
/***/ 566:
|
675 |
/***/ (function(module, exports, __webpack_require__) {
|
676 |
|
dist/chunks/53.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[53],{107:function(e,t,n){"use strict";var r=n(10),o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=n(83),a=n(108),c=n(109),l="function"==typeof Symbol&&Symbol.iterator;function s(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function u(e,t,n,r){var i,c=typeof e;if("undefined"!==c&&"boolean"!==c||(e=null),null===e||"string"===c||"number"===c||"object"===c&&e.$$typeof===o)return n(r,e,""===t?"."+s(e,0):t),1;var f=0,p=""===t?".":t+":";if(Array.isArray(e))for(var v=0;v<e.length;v++)f+=u(i=e[v],p+s(i,v),n,r);else{var d=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(d){0;for(var h,m=d.call(e),w=0;!(h=m.next()).done;)f+=u(i=h.value,p+s(i,w++),n,r)}else if("object"===c){0;var g=""+e;a(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===g?"object with keys {"+Object.keys(e).join(", ")+"}":g,"")}}return f}var f=/\/+/g;function p(e){return(""+e).replace(f,"$&/")}var v,d,h=m,m=function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)},w=function(e){a(e instanceof this,"Trying to release an instance into a pool of a different type."),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)};function g(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function y(e,t,n){var o,a,c=e.result,l=e.keyPrefix,s=e.func,u=e.context,f=s.call(u,t,e.count++);Array.isArray(f)?b(f,c,n,i.thatReturnsArgument):null!=f&&(r.isValidElement(f)&&(o=f,a=l+(!f.key||t&&t.key===f.key?"":p(f.key)+"/")+n,f=r.cloneElement(o,{key:a},void 0!==o.props?o.props.children:void 0)),c.push(f))}function b(e,t,n,r,o){var i="";null!=n&&(i=p(n)+"/");var a=g.getPooled(t,i,r,o);!function(e,t,n){null==e||u(e,"",t,n)}(e,y,a),g.release(a)}g.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},v=function(e,t,n,r){if(this.instancePool.length){var o=this.instancePool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)},(d=g).instancePool=[],d.getPooled=v||h,d.poolSize||(d.poolSize=10),d.release=w;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return c(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return c(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;a(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)b(e[n],t,n,i.thatReturnsArgument);return t}},108:function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,a,c){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,c],u=0;(l=new Error(t.replace(/%s/g,(function(){return s[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},109:function(e,t,n){"use strict";var r=n(83);e.exports=r},110:function(e,t,n){"use strict";function r(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}},28:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=c(n(10)),i=c(n(107)),a=c(n(110));function c(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function s(e,t){var n,a,c,u,f,p,v,d,h=[],m={};for(p=0;p<e.length;p++)if("string"!==(f=e[p]).type){if(!t.hasOwnProperty(f.value)||void 0===t[f.value])throw new Error("Invalid interpolation, missing component node: `"+f.value+"`");if("object"!==r(t[f.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+f.value+"`","\n> "+l);if("componentClose"===f.type)throw new Error("Missing opening component token: `"+f.value+"`");if("componentOpen"===f.type){n=t[f.value],c=p;break}h.push(t[f.value])}else h.push(f.value);return n&&(u=function(e,t){var n,r,o=t[e],i=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===o.value){if("componentOpen"===n.type){i++;continue}if("componentClose"===n.type){if(0===i)return r;i--}}throw new Error("Missing closing component token `"+o.value+"`")}(c,e),v=s(e.slice(c+1,u),t),a=o.default.cloneElement(n,{},v),h.push(a),u<e.length-1&&(d=s(e.slice(u+1),t),h=h.concat(d))),1===h.length?h[0]:(h.forEach((function(e,t){e&&(m["interpolation-child-"+t]=e)})),(0,i.default)(m))}t.default=function(e){var t=e.mixedString,n=e.components,o=e.throwErrors;if(l=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var i=(0,a.default)(t);try{return s(i,n)}catch(e){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},479:function(e,t,n){"use strict";var r=n(0),o=n(67),i=Object(r.createElement)(o.b,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.a,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=i},480:function(e,t,n){"use strict";var r=n(0),o=n(67),i=Object(r.createElement)(o.b,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.a,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=i},560:function(e,t,n){"use strict";var r=n(0),o=n(67),i=Object(r.createElement)(o.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.a,{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=i},566:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.size,o=void 0===n?24:n,i=e.onClick,c=(e.icon,e.className),l=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),s=["gridicon","gridicons-info",c,(t=o,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:s,height:o,width:o,onClick:i},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})))};var o,i=n(10),a=(o=i)&&o.__esModule?o:{default:o};e.exports=t.default},568:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,i=(e.icon,e.className),c=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),l=["gridicon","gridicons-cloud-upload",i,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:l,height:n,width:n,onClick:o},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-5 4v3h-2v-3H8l4-5 4 5h-3z"})))};var o,i=n(10),a=(o=i)&&o.__esModule?o:{default:o};e.exports=t.default},569:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,i=(e.icon,e.className),c=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),l=["gridicon","gridicons-phone",i,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:l,height:n,width:n,onClick:o},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"})))};var o,i=n(10),a=(o=i)&&o.__esModule?o:{default:o};e.exports=t.default},570:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,i=(e.icon,e.className),c=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),l=["gridicon","gridicons-tablet",i,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:l,height:n,width:n,onClick:o},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M18 2H6c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h12c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-5 19h-2v-1h2v1zm5-2H6V5h12v14z"})))};var o,i=n(10),a=(o=i)&&o.__esModule?o:{default:o};e.exports=t.default},571:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,i=(e.icon,e.className),c=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),l=["gridicon","gridicons-computer",i,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:l,height:n,width:n,onClick:o},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"})))};var o,i=n(10),a=(o=i)&&o.__esModule?o:{default:o};e.exports=t.default},573:function(e,t){e.exports=function(e){if(null==e)throw new TypeError("Cannot destructure undefined")}},600:function(e,t,n){"use strict";var r=n(0),o=n(67),i=Object(r.createElement)(o.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.a,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));t.a=i},83:function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o}}]);
|
1 |
+
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[53],{107:function(e,t,n){"use strict";var r=n(10),o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,i=n(83),a=n(108),c=n(109),l="function"==typeof Symbol&&Symbol.iterator;function s(e,t){return e&&"object"==typeof e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,(function(e){return r[e]}))):t.toString(36);var n,r}function u(e,t,n,r){var i,c=typeof e;if("undefined"!==c&&"boolean"!==c||(e=null),null===e||"string"===c||"number"===c||"object"===c&&e.$$typeof===o)return n(r,e,""===t?"."+s(e,0):t),1;var f=0,p=""===t?".":t+":";if(Array.isArray(e))for(var v=0;v<e.length;v++)f+=u(i=e[v],p+s(i,v),n,r);else{var d=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(d){0;for(var h,m=d.call(e),g=0;!(h=m.next()).done;)f+=u(i=h.value,p+s(i,g++),n,r)}else if("object"===c){0;var w=""+e;a(!1,"Objects are not valid as a React child (found: %s).%s","[object Object]"===w?"object with keys {"+Object.keys(e).join(", ")+"}":w,"")}}return f}var f=/\/+/g;function p(e){return(""+e).replace(f,"$&/")}var v,d,h=m,m=function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)},g=function(e){a(e instanceof this,"Trying to release an instance into a pool of a different type."),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)};function w(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function y(e,t,n){var o,a,c=e.result,l=e.keyPrefix,s=e.func,u=e.context,f=s.call(u,t,e.count++);Array.isArray(f)?b(f,c,n,i.thatReturnsArgument):null!=f&&(r.isValidElement(f)&&(o=f,a=l+(!f.key||t&&t.key===f.key?"":p(f.key)+"/")+n,f=r.cloneElement(o,{key:a},void 0!==o.props?o.props.children:void 0)),c.push(f))}function b(e,t,n,r,o){var i="";null!=n&&(i=p(n)+"/");var a=w.getPooled(t,i,r,o);!function(e,t,n){null==e||u(e,"",t,n)}(e,y,a),w.release(a)}w.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},v=function(e,t,n,r){if(this.instancePool.length){var o=this.instancePool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)},(d=w).instancePool=[],d.getPooled=v||h,d.poolSize||(d.poolSize=10),d.release=g;e.exports=function(e){if("object"!=typeof e||!e||Array.isArray(e))return c(!1,"React.addons.createFragment only accepts a single object. Got: %s",e),e;if(r.isValidElement(e))return c(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."),e;a(1!==e.nodeType,"React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.");var t=[];for(var n in e)b(e[n],t,n,i.thatReturnsArgument);return t}},108:function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,a,c){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,c],u=0;(l=new Error(t.replace(/%s/g,(function(){return s[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},109:function(e,t,n){"use strict";var r=n(83);e.exports=r},110:function(e,t,n){"use strict";function r(e){return e.match(/^\{\{\//)?{type:"componentClose",value:e.replace(/\W/g,"")}:e.match(/\/\}\}$/)?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.match(/^\{\{/)?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}e.exports=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(r)}},28:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=c(n(10)),i=c(n(107)),a=c(n(110));function c(e){return e&&e.__esModule?e:{default:e}}var l=void 0;function s(e,t){var n,a,c,u,f,p,v,d,h=[],m={};for(p=0;p<e.length;p++)if("string"!==(f=e[p]).type){if(!t.hasOwnProperty(f.value)||void 0===t[f.value])throw new Error("Invalid interpolation, missing component node: `"+f.value+"`");if("object"!==r(t[f.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+f.value+"`","\n> "+l);if("componentClose"===f.type)throw new Error("Missing opening component token: `"+f.value+"`");if("componentOpen"===f.type){n=t[f.value],c=p;break}h.push(t[f.value])}else h.push(f.value);return n&&(u=function(e,t){var n,r,o=t[e],i=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===o.value){if("componentOpen"===n.type){i++;continue}if("componentClose"===n.type){if(0===i)return r;i--}}throw new Error("Missing closing component token `"+o.value+"`")}(c,e),v=s(e.slice(c+1,u),t),a=o.default.cloneElement(n,{},v),h.push(a),u<e.length-1&&(d=s(e.slice(u+1),t),h=h.concat(d))),1===h.length?h[0]:(h.forEach((function(e,t){e&&(m["interpolation-child-"+t]=e)})),(0,i.default)(m))}t.default=function(e){var t=e.mixedString,n=e.components,o=e.throwErrors;if(l=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var i=(0,a.default)(t);try{return s(i,n)}catch(e){if(o)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},479:function(e,t,n){"use strict";var r=n(0),o=n(67),i=Object(r.createElement)(o.b,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.a,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=i},480:function(e,t,n){"use strict";var r=n(0),o=n(67),i=Object(r.createElement)(o.b,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.a,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=i},566:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.size,o=void 0===n?24:n,i=e.onClick,c=(e.icon,e.className),l=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),s=["gridicon","gridicons-info",c,(t=o,!(0!=t%18)&&"needs-offset"),!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:s,height:o,width:o,onClick:i},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})))};var o,i=n(10),a=(o=i)&&o.__esModule?o:{default:o};e.exports=t.default},568:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,i=(e.icon,e.className),c=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),l=["gridicon","gridicons-cloud-upload",i,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:l,height:n,width:n,onClick:o},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-5 4v3h-2v-3H8l4-5 4 5h-3z"})))};var o,i=n(10),a=(o=i)&&o.__esModule?o:{default:o};e.exports=t.default},569:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,i=(e.icon,e.className),c=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),l=["gridicon","gridicons-phone",i,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:l,height:n,width:n,onClick:o},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"})))};var o,i=n(10),a=(o=i)&&o.__esModule?o:{default:o};e.exports=t.default},570:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,i=(e.icon,e.className),c=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),l=["gridicon","gridicons-tablet",i,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:l,height:n,width:n,onClick:o},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M18 2H6c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h12c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-5 19h-2v-1h2v1zm5-2H6V5h12v14z"})))};var o,i=n(10),a=(o=i)&&o.__esModule?o:{default:o};e.exports=t.default},571:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.size,n=void 0===t?24:t,o=e.onClick,i=(e.icon,e.className),c=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["size","onClick","icon","className"]),l=["gridicon","gridicons-computer",i,!1,!1,!1].filter(Boolean).join(" ");return a.default.createElement("svg",r({className:l,height:n,width:n,onClick:o},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),a.default.createElement("g",null,a.default.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"})))};var o,i=n(10),a=(o=i)&&o.__esModule?o:{default:o};e.exports=t.default},573:function(e,t){e.exports=function(e){if(null==e)throw new TypeError("Cannot destructure undefined")}},600:function(e,t,n){"use strict";var r=n(0),o=n(67),i=Object(r.createElement)(o.b,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.a,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));t.a=i},83:function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o}}]);
|
dist/chunks/6.js
CHANGED
@@ -1,346 +1,184 @@
|
|
1 |
(window["__wcAdmin_webpackJsonp"] = window["__wcAdmin_webpackJsonp"] || []).push([[6],{
|
2 |
|
3 |
-
/***/
|
4 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5 |
|
6 |
"use strict";
|
7 |
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
8 |
-
/* harmony
|
9 |
-
/* harmony
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
/**
|
11 |
* External dependencies
|
12 |
*/
|
13 |
|
14 |
-
function createNoticesFromResponse(response) {
|
15 |
-
var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__["dispatch"])('core/notices'),
|
16 |
-
createNotice = _dispatch.createNotice;
|
17 |
-
|
18 |
-
if (response.error_data && response.errors && Object.keys(response.errors).length) {
|
19 |
-
// Loop over multi-error responses.
|
20 |
-
Object.keys(response.errors).forEach(function (errorKey) {
|
21 |
-
createNotice('error', response.errors[errorKey].join(' '));
|
22 |
-
});
|
23 |
-
} else if (response.message) {
|
24 |
-
// Handle generic messages.
|
25 |
-
createNotice(response.code ? 'error' : 'success', response.message);
|
26 |
-
}
|
27 |
-
}
|
28 |
-
|
29 |
-
/***/ }),
|
30 |
-
|
31 |
-
/***/ 509:
|
32 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
33 |
-
|
34 |
-
"use strict";
|
35 |
-
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
|
36 |
-
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
|
37 |
-
/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44);
|
38 |
-
/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__);
|
39 |
-
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
|
40 |
-
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);
|
41 |
-
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
|
42 |
-
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);
|
43 |
-
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14);
|
44 |
-
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);
|
45 |
-
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(15);
|
46 |
-
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);
|
47 |
-
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7);
|
48 |
-
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);
|
49 |
-
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(0);
|
50 |
-
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);
|
51 |
-
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2);
|
52 |
-
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);
|
53 |
-
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(20);
|
54 |
-
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__);
|
55 |
-
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(11);
|
56 |
-
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__);
|
57 |
-
/* harmony import */ var interpolate_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(28);
|
58 |
-
/* harmony import */ var interpolate_components__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(interpolate_components__WEBPACK_IMPORTED_MODULE_11__);
|
59 |
-
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(4);
|
60 |
-
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_12__);
|
61 |
-
/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(47);
|
62 |
-
/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_components__WEBPACK_IMPORTED_MODULE_13__);
|
63 |
-
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(22);
|
64 |
-
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_14__);
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, result); }; }
|
75 |
-
|
76 |
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
77 |
-
|
78 |
/**
|
79 |
-
*
|
80 |
*/
|
81 |
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
var UsageModal = /*#__PURE__*/function (_Component) {
|
91 |
-
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(UsageModal, _Component);
|
92 |
-
|
93 |
-
var _super = _createSuper(UsageModal);
|
94 |
-
|
95 |
-
function UsageModal(props) {
|
96 |
-
var _this;
|
97 |
-
|
98 |
-
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, UsageModal);
|
99 |
-
|
100 |
-
_this = _super.call(this, props);
|
101 |
-
_this.state = {
|
102 |
-
isLoadingScripts: false,
|
103 |
-
isRequestStarted: false
|
104 |
-
};
|
105 |
-
return _this;
|
106 |
-
}
|
107 |
-
|
108 |
-
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(UsageModal, [{
|
109 |
-
key: "componentDidUpdate",
|
110 |
-
value: function () {
|
111 |
-
var _componentDidUpdate = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(prevProps, prevState) {
|
112 |
-
var _this$props, hasErrors, isRequesting, onClose, onContinue, createNotice, _this$state, isLoadingScripts, isRequestStarted, isRequestSuccessful, isRequestError;
|
113 |
-
|
114 |
-
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
|
115 |
-
while (1) {
|
116 |
-
switch (_context.prev = _context.next) {
|
117 |
-
case 0:
|
118 |
-
_this$props = this.props, hasErrors = _this$props.hasErrors, isRequesting = _this$props.isRequesting, onClose = _this$props.onClose, onContinue = _this$props.onContinue, createNotice = _this$props.createNotice;
|
119 |
-
_this$state = this.state, isLoadingScripts = _this$state.isLoadingScripts, isRequestStarted = _this$state.isRequestStarted; // We can't rely on isRequesting props only because option update might be triggered by other component.
|
120 |
-
|
121 |
-
if (isRequestStarted) {
|
122 |
-
_context.next = 4;
|
123 |
-
break;
|
124 |
-
}
|
125 |
-
|
126 |
-
return _context.abrupt("return");
|
127 |
-
|
128 |
-
case 4:
|
129 |
-
isRequestSuccessful = !isRequesting && !isLoadingScripts && (prevProps.isRequesting || prevState.isLoadingScripts) && !hasErrors;
|
130 |
-
isRequestError = !isRequesting && prevProps.isRequesting && hasErrors;
|
131 |
-
|
132 |
-
if (isRequestSuccessful) {
|
133 |
-
onClose();
|
134 |
-
onContinue();
|
135 |
-
}
|
136 |
-
|
137 |
-
if (isRequestError) {
|
138 |
-
createNotice('error', Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__["__"])('There was a problem updating your preferences', 'woocommerce-admin'));
|
139 |
-
onClose();
|
140 |
-
}
|
141 |
-
|
142 |
-
case 8:
|
143 |
-
case "end":
|
144 |
-
return _context.stop();
|
145 |
-
}
|
146 |
-
}
|
147 |
-
}, _callee, this);
|
148 |
-
}));
|
149 |
-
|
150 |
-
function componentDidUpdate(_x, _x2) {
|
151 |
-
return _componentDidUpdate.apply(this, arguments);
|
152 |
-
}
|
153 |
-
|
154 |
-
return componentDidUpdate;
|
155 |
-
}()
|
156 |
-
}, {
|
157 |
-
key: "updateTracking",
|
158 |
-
value: function updateTracking(_ref) {
|
159 |
-
var _this2 = this;
|
160 |
-
|
161 |
-
var allowTracking = _ref.allowTracking;
|
162 |
-
var updateOptions = this.props.updateOptions;
|
163 |
-
|
164 |
-
if (allowTracking && typeof window.wcTracks.enable === 'function') {
|
165 |
-
this.setState({
|
166 |
-
isLoadingScripts: true
|
167 |
-
});
|
168 |
-
window.wcTracks.enable(function () {
|
169 |
-
// Don't update state if component is unmounted already
|
170 |
-
if (!_this2._isMounted) {
|
171 |
-
return;
|
172 |
-
}
|
173 |
-
|
174 |
-
_this2.setState({
|
175 |
-
isLoadingScripts: false
|
176 |
-
});
|
177 |
-
});
|
178 |
-
} else if (!allowTracking) {
|
179 |
-
window.wcTracks.isEnabled = false;
|
180 |
-
}
|
181 |
-
|
182 |
-
var trackingValue = allowTracking ? 'yes' : 'no';
|
183 |
-
this.setState({
|
184 |
-
isRequestStarted: true
|
185 |
-
});
|
186 |
-
updateOptions({
|
187 |
-
woocommerce_allow_tracking: trackingValue
|
188 |
-
});
|
189 |
-
}
|
190 |
-
}, {
|
191 |
-
key: "componentDidMount",
|
192 |
-
value: function componentDidMount() {
|
193 |
-
this._isMounted = true;
|
194 |
-
}
|
195 |
-
}, {
|
196 |
-
key: "componentWillUnmount",
|
197 |
-
value: function componentWillUnmount() {
|
198 |
-
this._isMounted = false;
|
199 |
}
|
200 |
-
}, {
|
201 |
-
key: "render",
|
202 |
-
value: function render() {
|
203 |
-
var _this3 = this;
|
204 |
-
|
205 |
-
// Bail if site has already opted in to tracking
|
206 |
-
if (this.props.allowTracking) {
|
207 |
-
var _this$props2 = this.props,
|
208 |
-
onClose = _this$props2.onClose,
|
209 |
-
onContinue = _this$props2.onContinue;
|
210 |
-
onClose();
|
211 |
-
onContinue();
|
212 |
-
return null;
|
213 |
-
}
|
214 |
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
|
|
|
|
|
|
268 |
|
269 |
-
|
270 |
-
|
|
|
|
|
271 |
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
getOptionsUpdatingError = _select.getOptionsUpdatingError,
|
276 |
-
isOptionsUpdating = _select.isOptionsUpdating;
|
277 |
|
278 |
-
var
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
}), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_10__["withDispatch"])(function (dispatch) {
|
287 |
-
var _dispatch = dispatch('core/notices'),
|
288 |
-
createNotice = _dispatch.createNotice;
|
289 |
|
290 |
-
|
291 |
-
|
|
|
|
|
292 |
|
|
|
|
|
293 |
return {
|
294 |
-
|
295 |
-
|
296 |
};
|
297 |
-
})
|
298 |
|
299 |
/***/ }),
|
300 |
|
301 |
-
/***/
|
302 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
303 |
|
304 |
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
var external_this_wp_element_ = __webpack_require__(0);
|
312 |
-
|
313 |
-
// EXTERNAL MODULE: external {"this":["wp","i18n"]}
|
314 |
-
var external_this_wp_i18n_ = __webpack_require__(2);
|
315 |
-
|
316 |
-
// EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
|
317 |
-
var external_this_wp_apiFetch_ = __webpack_require__(26);
|
318 |
-
var external_this_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_apiFetch_);
|
319 |
-
|
320 |
-
// EXTERNAL MODULE: ./node_modules/interpolate-components/lib/index.js
|
321 |
-
var lib = __webpack_require__(28);
|
322 |
-
var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
|
323 |
-
|
324 |
-
// EXTERNAL MODULE: ./client/wc-admin-settings/index.js
|
325 |
-
var wc_admin_settings = __webpack_require__(25);
|
326 |
|
327 |
-
|
328 |
-
var external_this_wc_components_ = __webpack_require__(47);
|
329 |
|
330 |
-
|
331 |
-
|
332 |
|
333 |
-
|
334 |
-
var helpers_extends = __webpack_require__(24);
|
335 |
-
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
|
336 |
|
337 |
-
//
|
338 |
-
var regenerator = __webpack_require__(8);
|
339 |
-
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
340 |
|
341 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/
|
342 |
-
var
|
343 |
-
var
|
344 |
|
345 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
|
346 |
var classCallCheck = __webpack_require__(12);
|
@@ -350,10 +188,6 @@ var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
|
|
350 |
var createClass = __webpack_require__(13);
|
351 |
var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
|
352 |
|
353 |
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/assertThisInitialized.js
|
354 |
-
var assertThisInitialized = __webpack_require__(9);
|
355 |
-
var assertThisInitialized_default = /*#__PURE__*/__webpack_require__.n(assertThisInitialized);
|
356 |
-
|
357 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js
|
358 |
var inherits = __webpack_require__(14);
|
359 |
var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);
|
@@ -366,507 +200,85 @@ var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possi
|
|
366 |
var getPrototypeOf = __webpack_require__(7);
|
367 |
var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf);
|
368 |
|
369 |
-
// EXTERNAL MODULE:
|
370 |
-
var
|
371 |
-
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
|
372 |
|
373 |
-
// EXTERNAL MODULE: external {"this":["wp","
|
374 |
-
var
|
375 |
|
376 |
// EXTERNAL MODULE: external {"this":["wp","compose"]}
|
377 |
var external_this_wp_compose_ = __webpack_require__(20);
|
378 |
|
|
|
|
|
|
|
379 |
// EXTERNAL MODULE: external {"this":["wp","data"]}
|
380 |
var external_this_wp_data_ = __webpack_require__(11);
|
381 |
|
382 |
-
//
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
|
|
|
|
|
|
|
390 |
|
|
|
|
|
391 |
|
|
|
|
|
392 |
|
|
|
|
|
393 |
|
|
|
|
|
394 |
|
395 |
-
|
|
|
396 |
|
397 |
-
|
|
|
398 |
|
|
|
399 |
/**
|
400 |
* External dependencies
|
401 |
*/
|
402 |
|
403 |
|
|
|
|
|
|
|
404 |
|
|
|
|
|
|
|
405 |
|
|
|
|
|
406 |
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
var _super = _createSuper(Bacs);
|
414 |
-
|
415 |
-
function Bacs() {
|
416 |
-
var _this;
|
417 |
-
|
418 |
-
classCallCheck_default()(this, Bacs);
|
419 |
-
|
420 |
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
421 |
-
args[_key] = arguments[_key];
|
422 |
-
}
|
423 |
-
|
424 |
-
_this = _super.call.apply(_super, [this].concat(args));
|
425 |
-
|
426 |
-
defineProperty_default()(assertThisInitialized_default()(_this), "getInitialConfigValues", function () {
|
427 |
-
return {
|
428 |
-
account_name: '',
|
429 |
-
account_number: '',
|
430 |
-
bank_name: '',
|
431 |
-
sort_code: '',
|
432 |
-
iban: '',
|
433 |
-
bic: ''
|
434 |
-
};
|
435 |
-
});
|
436 |
-
|
437 |
-
defineProperty_default()(assertThisInitialized_default()(_this), "validate", function (values) {
|
438 |
-
var errors = {};
|
439 |
-
|
440 |
-
if (!values.account_number && !values.iban) {
|
441 |
-
errors.account_number = errors.iban = Object(external_this_wp_i18n_["__"])('Please enter an account number or IBAN', 'woocommerce-admin');
|
442 |
-
}
|
443 |
-
|
444 |
-
return errors;
|
445 |
});
|
446 |
-
|
447 |
-
defineProperty_default()(assertThisInitialized_default()(_this), "updateSettings", /*#__PURE__*/function () {
|
448 |
-
var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee(values) {
|
449 |
-
var _this$props, updateOptions, createNotice, markConfigured, update;
|
450 |
-
|
451 |
-
return regenerator_default.a.wrap(function _callee$(_context) {
|
452 |
-
while (1) {
|
453 |
-
switch (_context.prev = _context.next) {
|
454 |
-
case 0:
|
455 |
-
_this$props = _this.props, updateOptions = _this$props.updateOptions, createNotice = _this$props.createNotice, markConfigured = _this$props.markConfigured;
|
456 |
-
_context.next = 3;
|
457 |
-
return updateOptions({
|
458 |
-
woocommerce_bacs_settings: {
|
459 |
-
enabled: 'yes'
|
460 |
-
},
|
461 |
-
woocommerce_bacs_accounts: [values]
|
462 |
-
});
|
463 |
-
|
464 |
-
case 3:
|
465 |
-
update = _context.sent;
|
466 |
-
|
467 |
-
if (update.success) {
|
468 |
-
markConfigured('bacs');
|
469 |
-
createNotice('success', Object(external_this_wp_i18n_["__"])('Direct bank transfer details added successfully', 'woocommerce-admin'));
|
470 |
-
} else {
|
471 |
-
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings', 'woocommerce-admin'));
|
472 |
-
}
|
473 |
-
|
474 |
-
case 5:
|
475 |
-
case "end":
|
476 |
-
return _context.stop();
|
477 |
-
}
|
478 |
-
}
|
479 |
-
}, _callee);
|
480 |
-
}));
|
481 |
-
|
482 |
-
return function (_x) {
|
483 |
-
return _ref.apply(this, arguments);
|
484 |
-
};
|
485 |
-
}());
|
486 |
-
|
487 |
-
return _this;
|
488 |
}
|
489 |
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
initialValues: this.getInitialConfigValues(),
|
496 |
-
onSubmitCallback: this.updateSettings,
|
497 |
-
validate: this.validate
|
498 |
-
}, function (_ref2) {
|
499 |
-
var getInputProps = _ref2.getInputProps,
|
500 |
-
handleSubmit = _ref2.handleSubmit;
|
501 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["H"], null, Object(external_this_wp_i18n_["__"])('Add your bank details', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_i18n_["__"])('These details are required to receive payments via bank transfer', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])("div", {
|
502 |
-
className: "woocommerce-task-payment-method__fields"
|
503 |
-
}, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
504 |
-
label: Object(external_this_wp_i18n_["__"])('Account name', 'woocommerce-admin'),
|
505 |
-
required: true
|
506 |
-
}, getInputProps('account_name'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
507 |
-
label: Object(external_this_wp_i18n_["__"])('Account number', 'woocommerce-admin'),
|
508 |
-
required: true
|
509 |
-
}, getInputProps('account_number'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
510 |
-
label: Object(external_this_wp_i18n_["__"])('Bank name', 'woocommerce-admin'),
|
511 |
-
required: true
|
512 |
-
}, getInputProps('bank_name'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
513 |
-
label: Object(external_this_wp_i18n_["__"])('Sort code', 'woocommerce-admin'),
|
514 |
-
required: true
|
515 |
-
}, getInputProps('sort_code'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
516 |
-
label: Object(external_this_wp_i18n_["__"])('IBAN', 'woocommerce-admin'),
|
517 |
-
required: true
|
518 |
-
}, getInputProps('iban'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
519 |
-
label: Object(external_this_wp_i18n_["__"])('BIC / Swift', 'woocommerce-admin'),
|
520 |
-
required: true
|
521 |
-
}, getInputProps('bic')))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
522 |
-
isPrimary: true,
|
523 |
-
isBusy: isOptionsRequesting,
|
524 |
-
onClick: handleSubmit
|
525 |
-
}, Object(external_this_wp_i18n_["__"])('Save', 'woocommerce-admin')));
|
526 |
-
});
|
527 |
-
}
|
528 |
-
}]);
|
529 |
-
|
530 |
-
return Bacs;
|
531 |
-
}(external_this_wp_element_["Component"]);
|
532 |
-
|
533 |
-
/* harmony default export */ var bacs = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
|
534 |
-
var _select = select(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
535 |
-
isOptionsUpdating = _select.isOptionsUpdating;
|
536 |
-
|
537 |
-
var isOptionsRequesting = isOptionsUpdating();
|
538 |
-
return {
|
539 |
-
isOptionsRequesting: isOptionsRequesting
|
540 |
-
};
|
541 |
-
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
|
542 |
-
var _dispatch = dispatch('core/notices'),
|
543 |
-
createNotice = _dispatch.createNotice;
|
544 |
-
|
545 |
-
var _dispatch2 = dispatch(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
546 |
-
updateOptions = _dispatch2.updateOptions;
|
547 |
-
|
548 |
-
return {
|
549 |
-
createNotice: createNotice,
|
550 |
-
updateOptions: updateOptions
|
551 |
-
};
|
552 |
-
}))(bacs_Bacs));
|
553 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/images/bacs.js
|
554 |
-
|
555 |
-
/* harmony default export */ var images_bacs = (function () {
|
556 |
-
return Object(external_this_wp_element_["createElement"])("svg", {
|
557 |
-
width: "96",
|
558 |
-
height: "32",
|
559 |
-
viewBox: "0 0 96 32",
|
560 |
-
fill: "none",
|
561 |
-
xmlns: "http://www.w3.org/2000/svg"
|
562 |
-
}, Object(external_this_wp_element_["createElement"])("rect", {
|
563 |
-
width: "32",
|
564 |
-
height: "32",
|
565 |
-
rx: "16",
|
566 |
-
fill: "#8E9196"
|
567 |
-
}), Object(external_this_wp_element_["createElement"])("mask", {
|
568 |
-
id: "bacs0",
|
569 |
-
"mask-type": "alpha",
|
570 |
-
maskUnits: "userSpaceOnUse",
|
571 |
-
x: "8",
|
572 |
-
y: "8",
|
573 |
-
width: "16",
|
574 |
-
height: "16"
|
575 |
-
}, Object(external_this_wp_element_["createElement"])("path", {
|
576 |
-
fillRule: "evenodd",
|
577 |
-
clipRule: "evenodd",
|
578 |
-
d: "M8.875 12.25L16 8.5L23.125 12.25V13.75H8.875V12.25ZM16 10.195L19.9075 12.25H12.0925L16 10.195ZM10.75 15.25H12.25V20.5H10.75V15.25ZM15.25 20.5V15.25H16.75V20.5H15.25ZM23.125 23.5V22H8.875V23.5H23.125ZM19.75 15.25H21.25V20.5H19.75V15.25Z",
|
579 |
-
fill: "white"
|
580 |
-
})), Object(external_this_wp_element_["createElement"])("g", {
|
581 |
-
mask: "url(#bacs0)"
|
582 |
-
}, Object(external_this_wp_element_["createElement"])("rect", {
|
583 |
-
x: "7",
|
584 |
-
y: "7",
|
585 |
-
width: "18",
|
586 |
-
height: "18",
|
587 |
-
fill: "white"
|
588 |
-
})), Object(external_this_wp_element_["createElement"])("mask", {
|
589 |
-
id: "bacs1",
|
590 |
-
"mask-type": "alpha",
|
591 |
-
maskUnits: "userSpaceOnUse",
|
592 |
-
x: "39",
|
593 |
-
y: "10",
|
594 |
-
width: "18",
|
595 |
-
height: "12"
|
596 |
-
}, Object(external_this_wp_element_["createElement"])("path", {
|
597 |
-
d: "M39 17L53.17 17L49.59 20.59L51 22L57 16L51 10L49.59 11.41L53.17 15L39 15L39 17Z",
|
598 |
-
fill: "white"
|
599 |
-
})), Object(external_this_wp_element_["createElement"])("g", {
|
600 |
-
mask: "url(#bacs1)"
|
601 |
-
}, Object(external_this_wp_element_["createElement"])("rect", {
|
602 |
-
x: "60",
|
603 |
-
y: "28",
|
604 |
-
width: "24",
|
605 |
-
height: "24",
|
606 |
-
transform: "rotate(-180 60 28)",
|
607 |
-
fill: "#8E9196"
|
608 |
-
})), Object(external_this_wp_element_["createElement"])("rect", {
|
609 |
-
x: "64",
|
610 |
-
width: "32",
|
611 |
-
height: "32",
|
612 |
-
rx: "16",
|
613 |
-
fill: "#8E9196"
|
614 |
-
}), Object(external_this_wp_element_["createElement"])("mask", {
|
615 |
-
id: "bacs2",
|
616 |
-
"mask-type": "alpha",
|
617 |
-
maskUnits: "userSpaceOnUse",
|
618 |
-
x: "72",
|
619 |
-
y: "8",
|
620 |
-
width: "16",
|
621 |
-
height: "16"
|
622 |
-
}, Object(external_this_wp_element_["createElement"])("path", {
|
623 |
-
fillRule: "evenodd",
|
624 |
-
clipRule: "evenodd",
|
625 |
-
d: "M72.875 12.25L80 8.5L87.125 12.25V13.75H72.875V12.25ZM80 10.195L83.9075 12.25H76.0925L80 10.195ZM74.75 15.25H76.25V20.5H74.75V15.25ZM79.25 20.5V15.25H80.75V20.5H79.25ZM87.125 23.5V22H72.875V23.5H87.125ZM83.75 15.25H85.25V20.5H83.75V15.25Z",
|
626 |
-
fill: "white"
|
627 |
-
})), Object(external_this_wp_element_["createElement"])("g", {
|
628 |
-
mask: "url(#bacs2)"
|
629 |
-
}, Object(external_this_wp_element_["createElement"])("rect", {
|
630 |
-
x: "71",
|
631 |
-
y: "7",
|
632 |
-
width: "18",
|
633 |
-
height: "18",
|
634 |
-
fill: "white"
|
635 |
-
})));
|
636 |
-
});
|
637 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/images/cod.js
|
638 |
-
|
639 |
-
/* harmony default export */ var cod = (function () {
|
640 |
-
return Object(external_this_wp_element_["createElement"])("svg", {
|
641 |
-
width: "96",
|
642 |
-
height: "32",
|
643 |
-
viewBox: "0 0 96 32",
|
644 |
-
fill: "none",
|
645 |
-
xmlns: "http://www.w3.org/2000/svg"
|
646 |
-
}, Object(external_this_wp_element_["createElement"])("rect", {
|
647 |
-
width: "32",
|
648 |
-
height: "32",
|
649 |
-
rx: "16",
|
650 |
-
fill: "#8E9196"
|
651 |
-
}), Object(external_this_wp_element_["createElement"])("mask", {
|
652 |
-
id: "cod-mask-0",
|
653 |
-
"mask-type": "alpha",
|
654 |
-
maskUnits: "userSpaceOnUse",
|
655 |
-
x: "7",
|
656 |
-
y: "10",
|
657 |
-
width: "18",
|
658 |
-
height: "12"
|
659 |
-
}, Object(external_this_wp_element_["createElement"])("path", {
|
660 |
-
fillRule: "evenodd",
|
661 |
-
clipRule: "evenodd",
|
662 |
-
d: "M22 13H19.75V10H9.25C8.425 10 7.75 10.675 7.75 11.5V19.75H9.25C9.25 20.995 10.255 22 11.5 22C12.745 22 13.75 20.995 13.75 19.75H18.25C18.25 20.995 19.255 22 20.5 22C21.745 22 22.75 20.995 22.75 19.75H24.25V16L22 13ZM21.625 14.125L23.095 16H19.75V14.125H21.625ZM10.75 19.75C10.75 20.1625 11.0875 20.5 11.5 20.5C11.9125 20.5 12.25 20.1625 12.25 19.75C12.25 19.3375 11.9125 19 11.5 19C11.0875 19 10.75 19.3375 10.75 19.75ZM13.165 18.25C12.7525 17.7925 12.1675 17.5 11.5 17.5C10.8325 17.5 10.2475 17.7925 9.835 18.25H9.25V11.5H18.25V18.25H13.165ZM19.75 19.75C19.75 20.1625 20.0875 20.5 20.5 20.5C20.9125 20.5 21.25 20.1625 21.25 19.75C21.25 19.3375 20.9125 19 20.5 19C20.0875 19 19.75 19.3375 19.75 19.75Z",
|
663 |
-
fill: "white"
|
664 |
-
})), Object(external_this_wp_element_["createElement"])("g", {
|
665 |
-
mask: "url(#cod-mask-0)"
|
666 |
-
}, Object(external_this_wp_element_["createElement"])("rect", {
|
667 |
-
x: "7",
|
668 |
-
y: "7",
|
669 |
-
width: "18",
|
670 |
-
height: "18",
|
671 |
-
fill: "white"
|
672 |
-
})), Object(external_this_wp_element_["createElement"])("mask", {
|
673 |
-
id: "cod-mask-1",
|
674 |
-
"mask-type": "alpha",
|
675 |
-
maskUnits: "userSpaceOnUse",
|
676 |
-
x: "39",
|
677 |
-
y: "10",
|
678 |
-
width: "18",
|
679 |
-
height: "12"
|
680 |
-
}, Object(external_this_wp_element_["createElement"])("path", {
|
681 |
-
d: "M39 17L53.17 17L49.59 20.59L51 22L57 16L51 10L49.59 11.41L53.17 15L39 15L39 17Z",
|
682 |
-
fill: "white"
|
683 |
-
})), Object(external_this_wp_element_["createElement"])("g", {
|
684 |
-
mask: "url(#cod-mask-1)"
|
685 |
-
}, Object(external_this_wp_element_["createElement"])("rect", {
|
686 |
-
x: "60",
|
687 |
-
y: "28",
|
688 |
-
width: "24",
|
689 |
-
height: "24",
|
690 |
-
transform: "rotate(-180 60 28)",
|
691 |
-
fill: "#8E9196"
|
692 |
-
})), Object(external_this_wp_element_["createElement"])("rect", {
|
693 |
-
x: "64",
|
694 |
-
width: "32",
|
695 |
-
height: "32",
|
696 |
-
rx: "16",
|
697 |
-
fill: "#8E9196"
|
698 |
-
}), Object(external_this_wp_element_["createElement"])("mask", {
|
699 |
-
id: "cod-mask-2",
|
700 |
-
"mask-type": "alpha",
|
701 |
-
maskUnits: "userSpaceOnUse",
|
702 |
-
x: "76",
|
703 |
-
y: "9",
|
704 |
-
width: "8",
|
705 |
-
height: "14"
|
706 |
-
}, Object(external_this_wp_element_["createElement"])("path", {
|
707 |
-
d: "M80.2926 15.175C78.5901 14.7325 78.0426 14.275 78.0426 13.5625C78.0426 12.745 78.8001 12.175 80.0676 12.175C81.4026 12.175 81.8976 12.8125 81.9426 13.75H83.6001C83.5476 12.46 82.7601 11.275 81.1926 10.8925V9.25H78.9426V10.87C77.4876 11.185 76.3176 12.13 76.3176 13.5775C76.3176 15.31 77.7501 16.1725 79.8426 16.675C81.7176 17.125 82.0926 17.785 82.0926 18.4825C82.0926 19 81.7251 19.825 80.0676 19.825C78.5226 19.825 77.9151 19.135 77.8326 18.25H76.1826C76.2726 19.8925 77.5026 20.815 78.9426 21.1225V22.75H81.1926V21.1375C82.6551 20.86 83.8176 20.0125 83.8176 18.475C83.8176 16.345 81.9951 15.6175 80.2926 15.175Z",
|
708 |
-
fill: "white"
|
709 |
-
})), Object(external_this_wp_element_["createElement"])("g", {
|
710 |
-
mask: "url(#cod-mask-2)"
|
711 |
-
}, Object(external_this_wp_element_["createElement"])("rect", {
|
712 |
-
x: "71",
|
713 |
-
y: "7",
|
714 |
-
width: "18",
|
715 |
-
height: "18",
|
716 |
-
fill: "white"
|
717 |
-
})));
|
718 |
-
});
|
719 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/images/wcpay.js
|
720 |
-
|
721 |
-
/* harmony default export */ var wcpay = (function () {
|
722 |
-
return Object(external_this_wp_element_["createElement"])("svg", {
|
723 |
-
width: "100",
|
724 |
-
height: "64",
|
725 |
-
viewBox: "-10 0 120 64",
|
726 |
-
fill: "none",
|
727 |
-
xmlns: "http://www.w3.org/2000/svg"
|
728 |
-
}, Object(external_this_wp_element_["createElement"])("path", {
|
729 |
-
fillRule: "evenodd",
|
730 |
-
clipRule: "evenodd",
|
731 |
-
d: "M9.78073 0.5H91.1787C96.3299 0.5 100.5 4.77335 100.5 10.0522V41.8929C100.5 47.1717 96.3299 51.4451 91.1787 51.4451H61.9883L65.9948 61.5L48.3742 51.4451H9.82161C4.67036 51.4451 0.500298 47.1717 0.500298 41.8929V10.0522C0.459415 4.81524 4.62947 0.5 9.78073 0.5Z",
|
732 |
-
fill: "#7F54B3"
|
733 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
734 |
-
d: "M5.48791 9.1725C6.06028 8.37648 6.91882 7.95752 8.06354 7.87373C10.1486 7.70615 11.3342 8.71165 11.6204 10.8902C12.8877 19.6464 14.2778 27.0619 15.7495 33.1368L24.7029 15.6663C25.5206 14.0743 26.5426 13.2364 27.7691 13.1526C29.568 13.0269 30.6718 14.2 31.1215 16.6718C32.1436 22.2439 33.4519 26.9781 35.0054 31.0001C36.0684 20.3586 37.8672 12.6917 40.402 7.95753C41.0152 6.78445 41.9146 6.19791 43.1002 6.11412C44.0405 6.03033 44.8991 6.3236 45.6759 6.95203C46.4526 7.58047 46.8615 8.37648 46.9432 9.34008C46.9841 10.0942 46.8615 10.7226 46.5344 11.3511C44.94 14.3676 43.6317 19.4369 42.5688 26.4754C41.5467 33.3044 41.1787 38.6251 41.424 42.4376C41.5058 43.485 41.3423 44.4067 40.9334 45.2027C40.4428 46.1244 39.707 46.6272 38.7666 46.711C37.7037 46.7948 36.5998 46.292 35.5369 45.1608C31.7348 41.1807 28.7094 35.2316 26.5018 27.3133C23.8444 32.6759 21.882 36.6979 20.6146 39.3792C18.2025 44.1134 16.1584 46.5434 14.4413 46.6691C13.3374 46.7529 12.3971 45.7893 11.5795 43.7783C9.49445 38.2899 7.24589 27.6904 4.83379 11.9795C4.71114 10.8902 4.91555 9.92662 5.48791 9.1725Z",
|
735 |
-
fill: "white"
|
736 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
737 |
-
d: "M93.3864 15.7499C91.9146 13.1105 89.7478 11.5185 86.8451 10.89C86.0683 10.7225 85.3324 10.6387 84.6374 10.6387C80.7127 10.6387 77.5238 12.7335 75.0299 16.923C72.904 20.4841 71.8411 24.4223 71.8411 28.7376C71.8411 31.9635 72.4952 34.7286 73.8034 37.0329C75.2752 39.6723 77.442 41.2644 80.3447 41.8928C81.1215 42.0604 81.8574 42.1442 82.5524 42.1442C86.518 42.1442 89.7069 40.0494 92.1599 35.8598C94.2858 32.2568 95.3488 28.3186 95.3488 24.0034C95.3488 20.7355 94.6946 18.0123 93.3864 15.7499ZM88.2351 27.355C87.6628 30.1201 86.6407 32.173 85.128 33.5556C83.9424 34.6449 82.8386 35.1057 81.8165 34.8962C80.8353 34.6868 80.0177 33.8069 79.4044 32.173C78.9138 30.8742 78.6685 29.5755 78.6685 28.3605C78.6685 27.3131 78.7503 26.2657 78.9547 25.3021C79.3226 23.5844 80.0177 21.9086 81.1215 20.3166C82.4706 18.2637 83.9015 17.4258 85.3733 17.719C86.3545 17.9285 87.1722 18.8083 87.7854 20.4422C88.276 21.741 88.5213 23.0398 88.5213 24.2547C88.5213 25.344 88.3987 26.3914 88.2351 27.355Z",
|
738 |
-
fill: "white"
|
739 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
740 |
-
d: "M67.7528 15.7499C66.281 13.1105 64.0734 11.5185 61.2116 10.89C60.4348 10.7225 59.6989 10.6387 59.0039 10.6387C55.0791 10.6387 51.8903 12.7335 49.3964 16.923C47.2705 20.4841 46.2075 24.4223 46.2075 28.7376C46.2075 31.9635 46.8616 34.7286 48.1699 37.0329C49.6417 39.6723 51.8085 41.2644 54.7112 41.8928C55.488 42.0604 56.2238 42.1442 56.9189 42.1442C60.8845 42.1442 64.0734 40.0494 66.5263 35.8598C68.6523 32.2568 69.7152 28.3186 69.7152 24.0034C69.7152 20.7355 69.0611 18.0123 67.7528 15.7499ZM62.6016 27.355C62.0292 30.1201 61.0071 32.173 59.4945 33.5556C58.3089 34.6449 57.205 35.1057 56.183 34.8962C55.2018 34.6868 54.3841 33.8069 53.7709 32.173C53.2803 30.8742 53.035 29.5755 53.035 28.3605C53.035 27.3131 53.1167 26.2657 53.3212 25.3021C53.6891 23.5844 54.3841 21.9086 55.4879 20.3166C56.8371 18.2637 58.268 17.4258 59.7398 17.719C60.721 17.9285 61.5386 18.8083 62.1519 20.4422C62.6425 21.741 62.8878 23.0398 62.8878 24.2547C62.8878 25.344 62.806 26.3914 62.6016 27.355Z",
|
741 |
-
fill: "white"
|
742 |
-
}));
|
743 |
-
});
|
744 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/images/razorpay.js
|
745 |
-
|
746 |
-
/* harmony default export */ var razorpay = (function () {
|
747 |
-
return Object(external_this_wp_element_["createElement"])("svg", {
|
748 |
-
xmlns: "http://www.w3.org/2000/svg",
|
749 |
-
width: "100",
|
750 |
-
height: "24",
|
751 |
-
fill: "#072654",
|
752 |
-
viewBox: "0 0 1896 401"
|
753 |
-
}, Object(external_this_wp_element_["createElement"])("path", {
|
754 |
-
fill: "#3395FF",
|
755 |
-
d: "M122.63 105.7l-15.75 57.97 90.15-58.3-58.96 219.98 59.88.05L285.05.48"
|
756 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
757 |
-
d: "M25.6 232.92L.8 325.4h122.73l50.22-188.13L25.6 232.92m426.32-81.42c-3 11.15-8.78 19.34-17.4 24.57-8.6 5.22-20.67 7.84-36.25 7.84h-49.5l17.38-64.8h49.5c15.56 0 26.25 2.6 32.05 7.9 5.8 5.3 7.2 13.4 4.22 24.6m51.25-1.4c6.3-23.4 3.7-41.4-7.82-54-11.5-12.5-31.68-18.8-60.48-18.8H324.4l-66.5 248.1h53.67l26.8-100h35.2c7.9 0 14.12 1.3 18.66 3.8 4.55 2.6 7.22 7.1 8.04 13.6l9.58 82.6h57.5l-9.32-77c-1.9-17.2-9.77-27.3-23.6-30.3 17.63-5.1 32.4-13.6 44.3-25.4a92.6 92.6 0 0 0 24.44-42.5m130.46 86.4c-4.5 16.8-11.4 29.5-20.73 38.4-9.34 8.9-20.5 13.3-33.52 13.3-13.26 0-22.25-4.3-27-13-4.76-8.7-4.92-21.3-.5-37.8 4.42-16.5 11.47-29.4 21.17-38.7 9.7-9.3 21.04-13.95 34.06-13.95 13 0 21.9 4.5 26.4 13.43 4.6 8.97 4.7 21.8.2 38.5zm23.52-87.8l-6.72 25.1c-2.9-9-8.53-16.2-16.85-21.6-8.34-5.3-18.66-8-30.97-8-15.1 0-29.6 3.9-43.5 11.7-13.9 7.8-26.1 18.8-36.5 33-10.4 14.2-18 30.3-22.9 48.4-4.8 18.2-5.8 34.1-2.9 47.9 3 13.9 9.3 24.5 19 31.9 9.8 7.5 22.3 11.2 37.6 11.2a82.4 82.4 0 0 0 35.2-7.7 82.11 82.11 0 0 0 28.4-21.2l-7 26.16h51.9L709.3 149h-52zm238.65 0H744.87l-10.55 39.4h87.82l-116.1 100.3-9.92 37h155.8l10.55-39.4h-94.1l117.88-101.8m142.4 52c-4.67 17.4-11.6 30.48-20.75 39-9.15 8.6-20.23 12.9-33.24 12.9-27.2 0-36.14-17.3-26.86-51.9 4.6-17.2 11.56-30.13 20.86-38.84 9.3-8.74 20.57-13.1 33.82-13.1 13 0 21.78 4.33 26.3 13.05 4.52 8.7 4.48 21.67-.13 38.87m30.38-80.83c-11.95-7.44-27.2-11.16-45.8-11.16-18.83 0-36.26 3.7-52.3 11.1a113.09 113.09 0 0 0-41 32.06c-11.3 13.9-19.43 30.2-24.42 48.8-4.9 18.53-5.5 34.8-1.7 48.73 3.8 13.9 11.8 24.6 23.8 32 12.1 7.46 27.5 11.17 46.4 11.17 18.6 0 35.9-3.74 51.8-11.18 15.9-7.48 29.5-18.1 40.8-32.1 11.3-13.94 19.4-30.2 24.4-48.8 5-18.6 5.6-34.84 1.8-48.8-3.8-13.9-11.7-24.6-23.6-32.05m185.1 40.8l13.3-48.1c-4.5-2.3-10.4-3.5-17.8-3.5-11.9 0-23.3 2.94-34.3 8.9-9.46 5.06-17.5 12.2-24.3 21.14l6.9-25.9-15.07.06h-37l-47.7 176.7h52.63l24.75-92.37c3.6-13.43 10.08-24 19.43-31.5 9.3-7.53 20.9-11.3 34.9-11.3 8.6 0 16.6 1.97 24.2 5.9m146.5 41.1c-4.5 16.5-11.3 29.1-20.6 37.8-9.3 8.74-20.5 13.1-33.5 13.1s-21.9-4.4-26.6-13.2c-4.8-8.85-4.9-21.6-.4-38.36 4.5-16.75 11.4-29.6 20.9-38.5 9.5-8.97 20.7-13.45 33.7-13.45 12.8 0 21.4 4.6 26 13.9 4.6 9.3 4.7 22.2.28 38.7m36.8-81.4c-9.75-7.8-22.2-11.7-37.3-11.7-13.23 0-25.84 3-37.8 9.06-11.95 6.05-21.65 14.3-29.1 24.74l.18-1.2 8.83-28.1h-51.4l-13.1 48.9-.4 1.7-54 201.44h52.7l27.2-101.4c2.7 9.02 8.2 16.1 16.6 21.22 8.4 5.1 18.77 7.63 31.1 7.63 15.3 0 29.9-3.7 43.75-11.1 13.9-7.42 25.9-18.1 36.1-31.9 10.2-13.8 17.77-29.8 22.6-47.9 4.9-18.13 5.9-34.3 3.1-48.45-2.85-14.17-9.16-25.14-18.9-32.9m174.65 80.65c-4.5 16.7-11.4 29.5-20.7 38.3-9.3 8.86-20.5 13.27-33.5 13.27-13.3 0-22.3-4.3-27-13-4.8-8.7-4.9-21.3-.5-37.8 4.4-16.5 11.42-29.4 21.12-38.7 9.7-9.3 21.05-13.94 34.07-13.94 13 0 21.8 4.5 26.4 13.4 4.6 8.93 4.63 21.76.15 38.5zm23.5-87.85l-6.73 25.1c-2.9-9.05-8.5-16.25-16.8-21.6-8.4-5.34-18.7-8-31-8-15.1 0-29.68 3.9-43.6 11.7-13.9 7.8-26.1 18.74-36.5 32.9-10.4 14.16-18 30.3-22.9 48.4-4.85 18.17-5.8 34.1-2.9 47.96 2.93 13.8 9.24 24.46 19 31.9 9.74 7.4 22.3 11.14 37.6 11.14 12.3 0 24.05-2.56 35.2-7.7a82.3 82.3 0 0 0 28.33-21.23l-7 26.18h51.9l47.38-176.7h-51.9zm269.87.06l.03-.05h-31.9c-1.02 0-1.92.05-2.85.07h-16.55l-8.5 11.8-2.1 2.8-.9 1.4-67.25 93.68-13.9-109.7h-55.08l27.9 166.7-61.6 85.3h54.9l14.9-21.13c.42-.62.8-1.14 1.3-1.8l17.4-24.7.5-.7 77.93-110.5 65.7-93 .1-.06h-.03z"
|
758 |
-
}));
|
759 |
-
});
|
760 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/images/mollie.js
|
761 |
-
|
762 |
-
var mollie_MollieLogo = function MollieLogo() {
|
763 |
-
return Object(external_this_wp_element_["createElement"])("svg", {
|
764 |
-
fill: "none",
|
765 |
-
viewBox: "0 0 677 200",
|
766 |
-
width: "100",
|
767 |
-
xmlns: "http://www.w3.org/2000/svg"
|
768 |
-
}, Object(external_this_wp_element_["createElement"])("g", {
|
769 |
-
fill: "#000"
|
770 |
-
}, Object(external_this_wp_element_["createElement"])("path", {
|
771 |
-
clipRule: "evenodd",
|
772 |
-
d: "m286.342 65.3132c-37.175 0-67.35 30.2415-67.35 67.3438 0 37.101 30.245 67.343 67.35 67.343 37.106 0 67.35-30.242 67.35-67.343 0-37.1023-30.174-67.3438-67.35-67.3438zm0 102.8348c-19.533 0-35.425-15.89-35.425-35.421s15.892-35.4222 35.425-35.4222 35.426 15.8912 35.426 35.4222-15.893 35.421-35.426 35.421z",
|
773 |
-
fillRule: "evenodd"
|
774 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
775 |
-
d: "m510.375 42.0021c11.6 0 21.003-9.4025 21.003-21.0011 0-11.59851-9.403-21.001-21.003-21.001-11.599 0-21.003 9.40249-21.003 21.001 0 11.5986 9.404 21.0011 21.003 21.0011z"
|
776 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
777 |
-
clipRule: "evenodd",
|
778 |
-
d: "m148.842 65.3833c-1.75-.14-3.431-.21-5.181-.21-16.242 0-31.644 6.6503-42.706 18.4109-11.0617-11.6906-26.394-18.4109-42.4964-18.4109-32.2047 0-58.4586 26.1813-58.4586 58.3827v73.714h31.5047v-72.804c0-13.37 10.9916-25.691 23.9435-27.0211.9101-.07 1.8203-.14 2.6604-.14 14.5621 0 26.4639 11.9001 26.5339 26.4611v73.504h32.2045v-72.944c0-13.3 10.922-25.621 23.944-26.9511.91-.07 1.82-.14 2.66-.14 14.562 0 26.534 11.8301 26.604 26.3211v73.714h32.205v-72.804c0-14.77-5.461-28.9812-15.332-39.9717-9.872-11.0606-23.384-17.8509-38.086-19.111z",
|
779 |
-
fillRule: "evenodd"
|
780 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
781 |
-
d: "m403.26 3.15015h-32.205v194.25985h32.205z"
|
782 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
783 |
-
d: "m464.869 3.15015h-32.205v194.25985h32.205z"
|
784 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
785 |
-
d: "m526.478 68.5334h-32.205v128.8066h32.205z"
|
786 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
787 |
-
clipRule: "evenodd",
|
788 |
-
d: "m677 129.646c0-17.08-6.651-33.1812-18.693-45.4318-12.112-12.2506-28.074-19.0409-45.086-19.0409-.28 0-.561 0-.841 0-17.642.21-34.305 7.2103-46.766 19.741-12.462 12.5306-19.463 29.1217-19.673 46.8327-.21 18.06 6.721 35.141 19.533 48.092 12.811 12.951 29.754 20.091 47.817 20.091h.07c23.663 0 45.856-12.671 57.968-33.042l1.54-2.59-26.604-13.09-1.33 2.17c-6.651 10.99-18.202 17.501-31.014 17.501-16.383 0-30.525-10.921-34.866-26.462h97.945zm-65.04-35.2113c14.703 0 27.864 9.6603 32.485 23.3813h-64.899c4.55-13.721 17.712-23.3813 32.414-23.3813z",
|
789 |
-
fillRule: "evenodd"
|
790 |
-
})));
|
791 |
-
};
|
792 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/images/payu-india.js
|
793 |
-
|
794 |
-
var payu_india_PayUIndiaLogo = function PayUIndiaLogo() {
|
795 |
-
return Object(external_this_wp_element_["createElement"])("svg", {
|
796 |
-
xmlns: "http://www.w3.org/2000/svg",
|
797 |
-
viewBox: "0 0 385.61334 192.41333",
|
798 |
-
width: "100"
|
799 |
-
}, Object(external_this_wp_element_["createElement"])("g", {
|
800 |
-
transform: "matrix(1.3333333,0,0,-1.3333333,0,192.41333)"
|
801 |
-
}, Object(external_this_wp_element_["createElement"])("g", {
|
802 |
-
transform: "scale(0.1)",
|
803 |
-
id: "g12"
|
804 |
-
}, Object(external_this_wp_element_["createElement"])("path", {
|
805 |
-
style: {
|
806 |
-
fill: '#90cc23',
|
807 |
-
fillOpacity: 1,
|
808 |
-
fillRule: 'nonzero',
|
809 |
-
stroke: 'none'
|
810 |
-
},
|
811 |
-
d: "m 2507.22,898.414 c -18.79,0 -34.01,15.234 -34,34.024 l 0.05,150.352 h -12.54 c -77.78,0 -106.71,-12.83 -106.71,-83.685 V 833.316 c -0.01,-0.351 -0.05,-0.703 -0.05,-1.054 v -36.34 c -0.02,-1.258 -0.1,-2.43 -0.1,-3.731 V 560.543 c 0,-28.293 -5.45,-50.82 -16.7,-68.32 -21.21,-32.676 -63.2,-47.532 -130.38,-47.618 -67.15,0.086 -109.13,14.93 -130.34,47.579 -11.28,17.507 -16.74,40.046 -16.74,68.359 v 231.648 c 0,1.301 -0.07,2.473 -0.09,3.731 v 36.34 c 0,0.351 -0.04,0.703 -0.05,1.054 v 165.789 c 0,70.855 -28.93,83.685 -106.71,83.685 h -24.49 c -77.79,0 -106.71,-12.83 -106.71,-83.685 V 832.262 656.723 560.543 c 0,-70.547 15.91,-130.281 46.65,-178.434 59.37,-93.3 174.38,-142.988 337.88,-142.988 0.2,0 0.4,0.008 0.6,0.008 0.21,0 0.4,-0.008 0.61,-0.008 163.5,0 278.51,49.688 337.88,142.988 30.74,48.153 46.65,107.887 46.65,178.434 v 96.18 175.539 66.121 l -84.71,0.031"
|
812 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
813 |
-
style: {
|
814 |
-
fill: '#90cc23',
|
815 |
-
fillOpacity: 1,
|
816 |
-
fillRule: 'nonzero',
|
817 |
-
stroke: 'none'
|
818 |
-
},
|
819 |
-
d: "m 2866.82,1140.67 -127.94,0.05 c -13.95,0 -25.26,11.32 -25.25,25.27 l 0.04,129.52 c 0.01,13.96 11.33,25.27 25.28,25.27 l 127.93,-0.05 c 13.96,0 25.27,-11.32 25.27,-25.28 l -0.05,-129.52 c 0,-13.95 -11.32,-25.26 -25.28,-25.26"
|
820 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
821 |
-
style: {
|
822 |
-
fill: '#90cc23',
|
823 |
-
fillOpacity: 1,
|
824 |
-
fillRule: 'nonzero',
|
825 |
-
stroke: 'none'
|
826 |
-
},
|
827 |
-
d: "m 2696.34,1320.76 -86.89,0.03 c -9.48,0.01 -17.16,7.69 -17.16,17.16 l 0.03,87.97 c 0.01,9.49 7.7,17.16 17.17,17.16 l 86.89,-0.03 c 9.48,0 17.16,-7.69 17.16,-17.17 l -0.03,-87.97 c -0.01,-9.48 -7.69,-17.15 -17.17,-17.15"
|
828 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
829 |
-
style: {
|
830 |
-
fill: '#90cc23',
|
831 |
-
fillOpacity: 1,
|
832 |
-
fillRule: 'nonzero',
|
833 |
-
stroke: 'none'
|
834 |
-
},
|
835 |
-
d: "m 496.59,815.961 c 0,-104.07 -26.574,-160.469 -166.75,-160.469 H 114.059 v 268.586 c 0,37.246 13.847,51.094 51.089,51.094 H 329.84 c 105.605,0 166.75,-26.055 166.75,-159.211 z M 329.84,1082.95 H 143.77 C 44.3438,1082.95 0.00390625,1038.6 0.00390625,939.164 V 300.512 C 0.00390625,262.102 12.332,249.77 50.7422,249.77 h 12.5742 c 38.4136,0 50.7426,12.332 50.7426,50.742 V 548.98 H 329.84 c 191.582,0 280.812,84.844 280.812,266.981 0,182.148 -89.23,266.989 -280.812,266.989"
|
836 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
837 |
-
style: {
|
838 |
-
fill: '#90cc23',
|
839 |
-
fillOpacity: 1,
|
840 |
-
fillRule: 'nonzero',
|
841 |
-
stroke: 'none'
|
842 |
-
},
|
843 |
-
d: "m 1012.01,536.82 v -87.547 c 0,-71.375 -26.455,-112.695 -161.721,-112.695 -89.359,0 -132.801,32.344 -132.801,98.863 0,72.954 43.578,101.379 155.434,101.379 z M 850.289,899.801 c -73.738,0 -119.949,-9.25 -137.476,-12.754 -31.036,-6.75 -44.012,-15.266 -44.012,-50.559 V 826.43 c 0,-13.828 2.047,-23.407 6.441,-30.145 5.113,-7.851 13.348,-11.836 24.488,-11.836 5.434,0 11.727,0.918 19.243,2.793 17.722,4.434 74.379,13.594 136.347,13.594 111.297,0 156.69,-30.832 156.69,-106.406 V 626.988 H 871.66 c -180.422,0 -264.461,-60.859 -264.461,-191.547 0,-126.761 86.778,-196.57 244.352,-196.57 187.249,0 270.749,63.719 270.749,206.633 V 694.43 c 0,138.191 -88.97,205.371 -272.011,205.371"
|
844 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
845 |
-
style: {
|
846 |
-
fill: '#90cc23',
|
847 |
-
fillOpacity: 1,
|
848 |
-
fillRule: 'nonzero',
|
849 |
-
stroke: 'none'
|
850 |
-
},
|
851 |
-
d: "m 1739.43,870.035 c -7.95,9.981 -22.98,11.356 -38.05,11.356 h -11.3 c -37.55,0 -52.28,-11.582 -60.59,-47.606 L 1525.15,400.078 c -13.02,-53.297 -31.32,-63.039 -62.63,-63.039 -38.34,0 -53.69,9.152 -68.97,63.25 l -118.18,433.699 c -9.78,36.328 -24.21,47.403 -61.77,47.403 h -10.06 c -15.16,0 -30.26,-1.395 -38.01,-11.504 -7.76,-10.125 -5.14,-25.235 -1.14,-40.086 L 1283.82,392.34 c 22.4,-83.719 49.03,-153.02 148.53,-153.02 18.57,0 35.75,2.578 50.04,7.399 -30.18,-94.91 -60.88,-136.77 -151.41,-146.071 -18.37,-1.5269 -30.31,-4.1597 -36.96,-13.0777 -6.91,-9.25 -5.34,-22.5 -2.87,-34.332 l 2.49,-11.2188 C 1299.04,16.0781 1308.25,0 1337.37,0 c 3.06,0 6.35,0.160156 9.88,0.460938 C 1482.43,9.30859 1554.86,82.0898 1597.24,251.66 l 144.62,578.453 c 3.43,14.844 5.5,29.95 -2.43,39.922"
|
852 |
-
}), Object(external_this_wp_element_["createElement"])("path", {
|
853 |
-
style: {
|
854 |
-
fill: '#90cc23',
|
855 |
-
fillOpacity: 1,
|
856 |
-
fillRule: 'nonzero',
|
857 |
-
stroke: 'none'
|
858 |
-
},
|
859 |
-
d: "m 2679.57,1140.78 -172.26,0.06 c -18.79,0 -34.02,-15.23 -34.03,-34.02 l -0.01,-24.03 h 11.95 c 77.78,0 106.71,-12.83 106.71,-83.685 V 898.383 l 87.55,-0.028 c 18.79,-0.011 34.02,15.215 34.03,34.004 l 0.06,174.381 c 0,18.79 -15.22,34.03 -34,34.04"
|
860 |
-
}))));
|
861 |
-
};
|
862 |
-
// EXTERNAL MODULE: external {"this":["wc","navigation"]}
|
863 |
-
var external_this_wc_navigation_ = __webpack_require__(21);
|
864 |
-
|
865 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/stripe.js
|
866 |
-
|
867 |
-
|
868 |
|
|
|
|
|
|
|
|
|
869 |
|
|
|
|
|
|
|
870 |
|
871 |
|
872 |
|
@@ -879,9 +291,9 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
879 |
|
880 |
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
881 |
|
882 |
-
function
|
883 |
|
884 |
-
function
|
885 |
|
886 |
/**
|
887 |
* External dependencies
|
@@ -896,2326 +308,667 @@ function stripe_isNativeReflectConstruct() { if (typeof Reflect === "undefined"
|
|
896 |
|
897 |
|
898 |
|
|
|
|
|
|
|
899 |
|
900 |
|
901 |
-
var stripe_Stripe = /*#__PURE__*/function (_Component) {
|
902 |
-
inherits_default()(Stripe, _Component);
|
903 |
-
|
904 |
-
var _super = stripe_createSuper(Stripe);
|
905 |
|
906 |
-
function Stripe(props) {
|
907 |
-
var _this;
|
908 |
|
909 |
-
|
|
|
|
|
910 |
|
911 |
-
|
912 |
-
|
913 |
-
oAuthConnectFailed: false,
|
914 |
-
connectURL: null,
|
915 |
-
isPending: false
|
916 |
-
};
|
917 |
-
_this.updateSettings = _this.updateSettings.bind(assertThisInitialized_default()(_this));
|
918 |
-
return _this;
|
919 |
-
}
|
920 |
|
921 |
-
|
922 |
-
key: "componentDidMount",
|
923 |
-
value: function componentDidMount() {
|
924 |
-
var oAuthConnectFailed = this.state.oAuthConnectFailed;
|
925 |
-
var stripeSettings = this.props.stripeSettings;
|
926 |
-
var query = Object(external_this_wc_navigation_["getQuery"])(); // Handle redirect back from Stripe.
|
927 |
|
928 |
-
|
929 |
-
|
930 |
|
931 |
-
|
932 |
-
|
933 |
-
return;
|
934 |
-
}
|
935 |
-
}
|
936 |
|
937 |
-
|
938 |
-
|
|
|
|
|
|
|
939 |
}
|
940 |
-
}
|
941 |
-
}, {
|
942 |
-
key: "componentDidUpdate",
|
943 |
-
value: function componentDidUpdate(prevProps) {
|
944 |
-
var activePlugins = this.props.activePlugins;
|
945 |
|
946 |
-
|
947 |
-
this.fetchOAuthConnectURL();
|
948 |
-
}
|
949 |
}
|
950 |
}, {
|
951 |
-
key: "
|
952 |
-
value: function
|
953 |
var _this$props = this.props,
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
958 |
});
|
959 |
-
|
960 |
-
markConfigured('stripe');
|
961 |
}
|
962 |
}, {
|
963 |
-
key: "
|
964 |
-
value: function () {
|
965 |
-
var
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
}
|
992 |
-
});
|
993 |
-
|
994 |
-
case 7:
|
995 |
-
result = _context.sent;
|
996 |
-
|
997 |
-
if (!(!result || !result.oauthUrl)) {
|
998 |
-
_context.next = 11;
|
999 |
-
break;
|
1000 |
-
}
|
1001 |
-
|
1002 |
-
this.setState({
|
1003 |
-
oAuthConnectFailed: true,
|
1004 |
-
isPending: false
|
1005 |
-
});
|
1006 |
-
return _context.abrupt("return");
|
1007 |
-
|
1008 |
-
case 11:
|
1009 |
-
this.setState({
|
1010 |
-
connectURL: result.oauthUrl,
|
1011 |
-
isPending: false
|
1012 |
-
});
|
1013 |
-
_context.next = 17;
|
1014 |
-
break;
|
1015 |
-
|
1016 |
-
case 14:
|
1017 |
-
_context.prev = 14;
|
1018 |
-
_context.t0 = _context["catch"](3);
|
1019 |
-
this.setState({
|
1020 |
-
oAuthConnectFailed: true,
|
1021 |
-
isPending: false
|
1022 |
-
});
|
1023 |
-
|
1024 |
-
case 17:
|
1025 |
-
case "end":
|
1026 |
-
return _context.stop();
|
1027 |
-
}
|
1028 |
}
|
1029 |
-
}
|
1030 |
-
})
|
1031 |
-
|
1032 |
-
function fetchOAuthConnectURL() {
|
1033 |
-
return _fetchOAuthConnectURL.apply(this, arguments);
|
1034 |
-
}
|
1035 |
-
|
1036 |
-
return fetchOAuthConnectURL;
|
1037 |
-
}()
|
1038 |
-
}, {
|
1039 |
-
key: "renderConnectButton",
|
1040 |
-
value: function renderConnectButton() {
|
1041 |
-
var connectURL = this.state.connectURL;
|
1042 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
1043 |
-
isPrimary: true,
|
1044 |
-
href: connectURL
|
1045 |
-
}, Object(external_this_wp_i18n_["__"])('Connect', 'woocommerce-admin'));
|
1046 |
}
|
1047 |
}, {
|
1048 |
-
key: "
|
1049 |
-
value: function () {
|
1050 |
-
var
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
return regenerator_default.a.wrap(function _callee2$(_context2) {
|
1056 |
-
while (1) {
|
1057 |
-
switch (_context2.prev = _context2.next) {
|
1058 |
-
case 0:
|
1059 |
-
_this$props2 = this.props, updateOptions = _this$props2.updateOptions, stripeSettings = _this$props2.stripeSettings, createNotice = _this$props2.createNotice;
|
1060 |
-
prefix = values.publishable_key.match(/^pk_live_/) ? '' : 'test_';
|
1061 |
-
_context2.next = 4;
|
1062 |
-
return updateOptions({
|
1063 |
-
woocommerce_stripe_settings: _objectSpread(_objectSpread({}, stripeSettings), {}, (_objectSpread2 = {}, defineProperty_default()(_objectSpread2, prefix + 'publishable_key', values.publishable_key), defineProperty_default()(_objectSpread2, prefix + 'secret_key', values.secret_key), defineProperty_default()(_objectSpread2, "testmode", prefix === 'test_' ? 'yes' : 'no'), defineProperty_default()(_objectSpread2, "enabled", 'yes'), _objectSpread2))
|
1064 |
-
});
|
1065 |
-
|
1066 |
-
case 4:
|
1067 |
-
update = _context2.sent;
|
1068 |
-
|
1069 |
-
if (update.success) {
|
1070 |
-
this.completeMethod();
|
1071 |
-
} else {
|
1072 |
-
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings', 'woocommerce-admin'));
|
1073 |
-
}
|
1074 |
-
|
1075 |
-
case 6:
|
1076 |
-
case "end":
|
1077 |
-
return _context2.stop();
|
1078 |
-
}
|
1079 |
-
}
|
1080 |
-
}, _callee2, this);
|
1081 |
-
}));
|
1082 |
-
|
1083 |
-
function updateSettings(_x) {
|
1084 |
-
return _updateSettings.apply(this, arguments);
|
1085 |
-
}
|
1086 |
-
|
1087 |
-
return updateSettings;
|
1088 |
-
}()
|
1089 |
-
}, {
|
1090 |
-
key: "getInitialConfigValues",
|
1091 |
-
value: function getInitialConfigValues() {
|
1092 |
return {
|
1093 |
-
|
1094 |
-
|
1095 |
};
|
1096 |
}
|
1097 |
}, {
|
1098 |
-
key: "
|
1099 |
-
value: function
|
1100 |
-
var
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
label: Object(external_this_wp_i18n_["__"])('Secret Key', 'woocommerce-admin'),
|
1145 |
-
required: true
|
1146 |
-
}, getInputProps('secret_key'))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
1147 |
-
isPrimary: true,
|
1148 |
-
isBusy: isOptionsUpdating,
|
1149 |
-
onClick: handleSubmit
|
1150 |
-
}, Object(external_this_wp_i18n_["__"])('Proceed', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])("p", null, stripeHelp));
|
1151 |
-
});
|
1152 |
-
}
|
1153 |
-
}, {
|
1154 |
-
key: "renderOauthConfig",
|
1155 |
-
value: function renderOauthConfig() {
|
1156 |
-
var _this2 = this;
|
1157 |
-
|
1158 |
-
var tosPrompt = lib_default()({
|
1159 |
-
mixedString: Object(external_this_wp_i18n_["__"])('By clicking "Connect," you agree to the {{tosLink}}Terms of Service{{/tosLink}}. Or {{manualConfigLink}}manually enter your Stripe API details{{/manualConfigLink}} instead.', 'woocommerce-admin'),
|
1160 |
-
components: {
|
1161 |
-
tosLink: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
1162 |
-
href: "https://wordpress.com/tos",
|
1163 |
-
target: "_blank",
|
1164 |
-
type: "external"
|
1165 |
-
}),
|
1166 |
-
manualConfigLink: Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
1167 |
-
isLink: true,
|
1168 |
-
onClick: function onClick() {
|
1169 |
-
_this2.setState({
|
1170 |
-
connectURL: null
|
1171 |
-
});
|
1172 |
-
}
|
1173 |
-
})
|
1174 |
-
}
|
1175 |
});
|
1176 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("p", null, this.renderConnectButton()), tosPrompt);
|
1177 |
}
|
1178 |
}, {
|
1179 |
-
key: "
|
1180 |
-
value: function
|
1181 |
-
var _this$
|
1182 |
-
|
1183 |
-
|
1184 |
-
oAuthConnectFailed = _this$state.oAuthConnectFailed;
|
1185 |
-
var connectStep = {
|
1186 |
-
key: 'connect',
|
1187 |
-
label: Object(external_this_wp_i18n_["__"])('Connect your Stripe account', 'woocommerce-admin')
|
1188 |
-
};
|
1189 |
|
1190 |
-
if (
|
1191 |
-
return
|
|
|
|
|
1192 |
}
|
1193 |
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1198 |
});
|
1199 |
}
|
1200 |
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
|
|
1204 |
}
|
1205 |
}, {
|
1206 |
key: "render",
|
1207 |
value: function render() {
|
1208 |
-
var
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
currentStep: installStep.isComplete ? 'connect' : 'install',
|
1216 |
-
steps: [installStep, this.getConnectStep()]
|
1217 |
-
});
|
1218 |
}
|
1219 |
}]);
|
1220 |
|
1221 |
-
return
|
1222 |
}(external_this_wp_element_["Component"]);
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
createClass_default()(Square, [{
|
1302 |
-
key: "componentDidMount",
|
1303 |
-
value: function componentDidMount() {
|
1304 |
-
var _this$props = this.props,
|
1305 |
-
createNotice = _this$props.createNotice,
|
1306 |
-
markConfigured = _this$props.markConfigured;
|
1307 |
-
var query = Object(external_this_wc_navigation_["getQuery"])(); // Handle redirect back from Square
|
1308 |
-
|
1309 |
-
if (query['square-connect']) {
|
1310 |
-
if (query['square-connect'] === '1') {
|
1311 |
-
createNotice('success', Object(external_this_wp_i18n_["__"])('Square connected successfully.', 'woocommerce-admin'));
|
1312 |
-
markConfigured('square');
|
1313 |
-
}
|
1314 |
-
}
|
1315 |
-
}
|
1316 |
-
}, {
|
1317 |
-
key: "connect",
|
1318 |
-
value: function () {
|
1319 |
-
var _connect = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
1320 |
-
var _this$props2, createNotice, hasCbdIndustry, options, updateOptions, errorMessage, newWindow, result;
|
1321 |
-
|
1322 |
-
return regenerator_default.a.wrap(function _callee$(_context) {
|
1323 |
-
while (1) {
|
1324 |
-
switch (_context.prev = _context.next) {
|
1325 |
-
case 0:
|
1326 |
-
_this$props2 = this.props, createNotice = _this$props2.createNotice, hasCbdIndustry = _this$props2.hasCbdIndustry, options = _this$props2.options, updateOptions = _this$props2.updateOptions;
|
1327 |
-
this.setState({
|
1328 |
-
isPending: true
|
1329 |
-
});
|
1330 |
-
updateOptions({
|
1331 |
-
woocommerce_square_credit_card_settings: square_objectSpread(square_objectSpread({}, options.woocommerce_square_credit_card_settings), {}, {
|
1332 |
-
enabled: 'yes'
|
1333 |
-
})
|
1334 |
-
});
|
1335 |
-
errorMessage = Object(external_this_wp_i18n_["__"])('There was an error connecting to Square. Please try again or skip to connect later in store settings.', 'woocommerce-admin');
|
1336 |
-
_context.prev = 4;
|
1337 |
-
newWindow = null;
|
1338 |
-
|
1339 |
-
if (hasCbdIndustry) {
|
1340 |
-
// It's necessary to declare the new tab before the async call,
|
1341 |
-
// otherwise, it won't be possible to open it.
|
1342 |
-
newWindow = window.open('/', '_blank');
|
1343 |
-
}
|
1344 |
-
|
1345 |
-
_context.next = 9;
|
1346 |
-
return external_this_wp_apiFetch_default()({
|
1347 |
-
path: external_this_wc_data_["WC_ADMIN_NAMESPACE"] + '/plugins/connect-square',
|
1348 |
-
method: 'POST'
|
1349 |
-
});
|
1350 |
-
|
1351 |
-
case 9:
|
1352 |
-
result = _context.sent;
|
1353 |
-
|
1354 |
-
if (!(!result || !result.connectUrl)) {
|
1355 |
-
_context.next = 15;
|
1356 |
-
break;
|
1357 |
-
}
|
1358 |
-
|
1359 |
-
this.setState({
|
1360 |
-
isPending: false
|
1361 |
-
});
|
1362 |
-
createNotice('error', errorMessage);
|
1363 |
-
|
1364 |
-
if (hasCbdIndustry) {
|
1365 |
-
newWindow.close();
|
1366 |
-
}
|
1367 |
-
|
1368 |
-
return _context.abrupt("return");
|
1369 |
-
|
1370 |
-
case 15:
|
1371 |
-
this.setState({
|
1372 |
-
isPending: true
|
1373 |
-
});
|
1374 |
-
this.redirect(result.connectUrl, newWindow);
|
1375 |
-
_context.next = 23;
|
1376 |
-
break;
|
1377 |
-
|
1378 |
-
case 19:
|
1379 |
-
_context.prev = 19;
|
1380 |
-
_context.t0 = _context["catch"](4);
|
1381 |
-
this.setState({
|
1382 |
-
isPending: false
|
1383 |
-
});
|
1384 |
-
createNotice('error', errorMessage);
|
1385 |
-
|
1386 |
-
case 23:
|
1387 |
-
case "end":
|
1388 |
-
return _context.stop();
|
1389 |
-
}
|
1390 |
-
}
|
1391 |
-
}, _callee, this, [[4, 19]]);
|
1392 |
-
}));
|
1393 |
-
|
1394 |
-
function connect() {
|
1395 |
-
return _connect.apply(this, arguments);
|
1396 |
-
}
|
1397 |
-
|
1398 |
-
return connect;
|
1399 |
-
}()
|
1400 |
-
}, {
|
1401 |
-
key: "redirect",
|
1402 |
-
value: function redirect(connectUrl, newWindow) {
|
1403 |
-
if (newWindow) {
|
1404 |
-
newWindow.location.href = connectUrl;
|
1405 |
-
window.location = Object(wc_admin_settings["f" /* getAdminLink */])('admin.php?page=wc-admin');
|
1406 |
-
} else {
|
1407 |
-
window.location = connectUrl;
|
1408 |
-
}
|
1409 |
-
}
|
1410 |
-
}, {
|
1411 |
-
key: "render",
|
1412 |
-
value: function render() {
|
1413 |
-
var installStep = this.props.installStep;
|
1414 |
-
var isPending = this.state.isPending;
|
1415 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
1416 |
-
isVertical: true,
|
1417 |
-
isPending: !installStep.isComplete || isPending,
|
1418 |
-
currentStep: installStep.isComplete ? 'connect' : 'install',
|
1419 |
-
steps: [installStep, {
|
1420 |
-
key: 'connect',
|
1421 |
-
label: Object(external_this_wp_i18n_["__"])('Connect your Square account', 'woocommerce-admin'),
|
1422 |
-
description: Object(external_this_wp_i18n_["__"])('A Square account is required to process payments. You will be redirected to the Square website to create the connection.', 'woocommerce-admin'),
|
1423 |
-
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
1424 |
-
isPrimary: true,
|
1425 |
-
isBusy: isPending,
|
1426 |
-
onClick: this.connect
|
1427 |
-
}, Object(external_this_wp_i18n_["__"])('Connect', 'woocommerce-admin')))
|
1428 |
-
}]
|
1429 |
-
});
|
1430 |
-
}
|
1431 |
-
}]);
|
1432 |
-
|
1433 |
-
return Square;
|
1434 |
-
}(external_this_wp_element_["Component"]);
|
1435 |
-
|
1436 |
-
/* harmony default export */ var square = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
|
1437 |
-
var _select = select(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
1438 |
-
getOption = _select.getOption,
|
1439 |
-
isResolving = _select.isResolving;
|
1440 |
-
|
1441 |
-
var options = getOption('woocommerce_square_credit_card_settings');
|
1442 |
-
var optionsIsRequesting = isResolving('getOption', ['woocommerce_square_credit_card_settings']);
|
1443 |
-
return {
|
1444 |
-
options: options,
|
1445 |
-
optionsIsRequesting: optionsIsRequesting
|
1446 |
-
};
|
1447 |
-
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
|
1448 |
-
var _dispatch = dispatch('core/notices'),
|
1449 |
-
createNotice = _dispatch.createNotice;
|
1450 |
-
|
1451 |
-
var _dispatch2 = dispatch(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
1452 |
-
updateOptions = _dispatch2.updateOptions;
|
1453 |
-
|
1454 |
-
return {
|
1455 |
-
createNotice: createNotice,
|
1456 |
-
updateOptions: updateOptions
|
1457 |
-
};
|
1458 |
-
}))(square_Square));
|
1459 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/wcpay.js
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
function wcpay_createSuper(Derived) { var hasNativeReflectConstruct = wcpay_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
1467 |
-
|
1468 |
-
function wcpay_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
1469 |
-
|
1470 |
-
/**
|
1471 |
-
* External dependencies
|
1472 |
-
*/
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
var wcpay_WCPay = /*#__PURE__*/function (_Component) {
|
1479 |
-
inherits_default()(WCPay, _Component);
|
1480 |
-
|
1481 |
-
var _super = wcpay_createSuper(WCPay);
|
1482 |
-
|
1483 |
-
function WCPay() {
|
1484 |
-
classCallCheck_default()(this, WCPay);
|
1485 |
-
|
1486 |
-
return _super.apply(this, arguments);
|
1487 |
-
}
|
1488 |
-
|
1489 |
-
createClass_default()(WCPay, [{
|
1490 |
-
key: "componentDidMount",
|
1491 |
-
value: function componentDidMount() {
|
1492 |
-
var _this$props = this.props,
|
1493 |
-
createNotice = _this$props.createNotice,
|
1494 |
-
markConfigured = _this$props.markConfigured;
|
1495 |
-
var query = Object(external_this_wc_navigation_["getQuery"])(); // Handle redirect back from WCPay on-boarding
|
1496 |
-
|
1497 |
-
if (query['wcpay-connection-success']) {
|
1498 |
-
createNotice('success', Object(external_this_wp_i18n_["__"])('WooCommerce Payments connected successfully.', 'woocommerce-admin'));
|
1499 |
-
markConfigured('wcpay', {
|
1500 |
-
'wcpay-connection-success': '1'
|
1501 |
-
});
|
1502 |
-
}
|
1503 |
-
}
|
1504 |
-
}, {
|
1505 |
-
key: "render",
|
1506 |
-
value: function render() {
|
1507 |
-
return null;
|
1508 |
-
}
|
1509 |
-
}]);
|
1510 |
-
|
1511 |
-
return WCPay;
|
1512 |
-
}(external_this_wp_element_["Component"]);
|
1513 |
-
|
1514 |
-
/* harmony default export */ var payments_wcpay = (Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
|
1515 |
-
var _dispatch = dispatch('core/notices'),
|
1516 |
-
createNotice = _dispatch.createNotice;
|
1517 |
-
|
1518 |
-
return {
|
1519 |
-
createNotice: createNotice
|
1520 |
-
};
|
1521 |
-
})(wcpay_WCPay));
|
1522 |
-
// EXTERNAL MODULE: external {"this":["wp","url"]}
|
1523 |
-
var external_this_wp_url_ = __webpack_require__(23);
|
1524 |
-
|
1525 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/paypal.js
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
function paypal_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
1539 |
-
|
1540 |
-
function paypal_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { paypal_ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { paypal_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
1541 |
-
|
1542 |
-
function paypal_createSuper(Derived) { var hasNativeReflectConstruct = paypal_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
1543 |
-
|
1544 |
-
function paypal_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
1545 |
-
|
1546 |
-
/* global ppcp_onboarding */
|
1547 |
-
|
1548 |
-
/**
|
1549 |
-
* External dependencies
|
1550 |
-
*/
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
var PAYPAL_PLUGIN = 'woocommerce-paypal-payments';
|
1563 |
-
var WC_PAYPAL_NAMESPACE = '/wc-paypal/v1';
|
1564 |
-
/**
|
1565 |
-
* Loads the onboarding script file into the dom on the fly.
|
1566 |
-
*
|
1567 |
-
* @param {string} url of the onboarding js file.
|
1568 |
-
* @param {Object} data required for the onboarding script, labeled as PayPalCommerceGatewayOnboarding
|
1569 |
-
* @param {Function} onLoad callback for when the script is loaded.
|
1570 |
-
*/
|
1571 |
-
|
1572 |
-
function loadOnboardingScript(url, data, onLoad) {
|
1573 |
-
try {
|
1574 |
-
// eslint-disable-next-line camelcase
|
1575 |
-
if (ppcp_onboarding) {
|
1576 |
-
onLoad();
|
1577 |
-
}
|
1578 |
-
} catch (e) {
|
1579 |
-
var script = document.createElement('script');
|
1580 |
-
script.src = url;
|
1581 |
-
document.body.append(script); // Callback after scripts have loaded.
|
1582 |
-
|
1583 |
-
script.onload = function () {
|
1584 |
-
onLoad();
|
1585 |
-
};
|
1586 |
-
|
1587 |
-
window.PayPalCommerceGatewayOnboarding = data;
|
1588 |
-
}
|
1589 |
-
}
|
1590 |
-
|
1591 |
-
function PaypalConnectButton(_ref) {
|
1592 |
-
var connectUrl = _ref.connectUrl;
|
1593 |
-
Object(external_this_wp_element_["useEffect"])(function () {
|
1594 |
-
// eslint-disable-next-line camelcase
|
1595 |
-
if (ppcp_onboarding) {
|
1596 |
-
// Makes sure the onboarding is hooked up to the Connect button rendered.
|
1597 |
-
ppcp_onboarding.reload();
|
1598 |
-
}
|
1599 |
-
}, []);
|
1600 |
-
return Object(external_this_wp_element_["createElement"])("a", {
|
1601 |
-
className: "button-primary",
|
1602 |
-
target: "_blank",
|
1603 |
-
rel: "noreferrer",
|
1604 |
-
href: connectUrl,
|
1605 |
-
"data-paypal-onboard-button": "true",
|
1606 |
-
"data-paypal-button": "true",
|
1607 |
-
"data-paypal-onboard-complete": "ppcp_onboarding_productionCallback"
|
1608 |
-
}, Object(external_this_wp_i18n_["__"])('Connect', 'woocommerce-admin'));
|
1609 |
-
}
|
1610 |
-
|
1611 |
-
var paypal_PayPal = /*#__PURE__*/function (_Component) {
|
1612 |
-
inherits_default()(PayPal, _Component);
|
1613 |
-
|
1614 |
-
var _super = paypal_createSuper(PayPal);
|
1615 |
-
|
1616 |
-
function PayPal(props) {
|
1617 |
-
var _this;
|
1618 |
-
|
1619 |
-
classCallCheck_default()(this, PayPal);
|
1620 |
-
|
1621 |
-
_this = _super.call(this, props);
|
1622 |
-
_this.state = {
|
1623 |
-
autoConnectFailed: false,
|
1624 |
-
connectURL: ''
|
1625 |
-
};
|
1626 |
-
_this.enablePaypalPlugin = _this.enablePaypalPlugin.bind(assertThisInitialized_default()(_this));
|
1627 |
-
_this.setCredentials = _this.setCredentials.bind(assertThisInitialized_default()(_this));
|
1628 |
-
_this.validate = _this.validate.bind(assertThisInitialized_default()(_this));
|
1629 |
-
return _this;
|
1630 |
-
}
|
1631 |
-
|
1632 |
-
createClass_default()(PayPal, [{
|
1633 |
-
key: "componentDidMount",
|
1634 |
-
value: function componentDidMount() {
|
1635 |
-
var createNotice = this.props.createNotice;
|
1636 |
-
var query = Object(external_this_wc_navigation_["getQuery"])(); // Handle redirect back from PayPal
|
1637 |
-
|
1638 |
-
if (query.onboarding) {
|
1639 |
-
if (query.onboarding === 'complete' && !query['ppcp-onboarding-error']) {
|
1640 |
-
this.enablePaypalPlugin();
|
1641 |
-
return;
|
1642 |
-
}
|
1643 |
-
|
1644 |
-
if (query['ppcp-onboarding-error']) {
|
1645 |
-
/* eslint-disable react/no-did-mount-set-state */
|
1646 |
-
this.setState({
|
1647 |
-
autoConnectFailed: true
|
1648 |
-
});
|
1649 |
-
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings through the onboarding, please fill the fields in manually.', 'woocommerce-admin'));
|
1650 |
-
}
|
1651 |
-
|
1652 |
-
return;
|
1653 |
-
}
|
1654 |
-
|
1655 |
-
this.fetchOAuthConnectURLAndOnboardingSetup();
|
1656 |
-
}
|
1657 |
-
}, {
|
1658 |
-
key: "componentDidUpdate",
|
1659 |
-
value: function componentDidUpdate(prevProps) {
|
1660 |
-
var activePlugins = this.props.activePlugins;
|
1661 |
-
|
1662 |
-
if (!prevProps.activePlugins.includes(PAYPAL_PLUGIN) && activePlugins.includes(PAYPAL_PLUGIN)) {
|
1663 |
-
this.fetchOAuthConnectURLAndOnboardingSetup();
|
1664 |
-
}
|
1665 |
-
}
|
1666 |
-
}, {
|
1667 |
-
key: "fetchOAuthConnectURLAndOnboardingSetup",
|
1668 |
-
value: function () {
|
1669 |
-
var _fetchOAuthConnectURLAndOnboardingSetup = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
1670 |
-
var _this2 = this;
|
1671 |
-
|
1672 |
-
var _this$props, activePlugins, createNotice, result;
|
1673 |
-
|
1674 |
-
return regenerator_default.a.wrap(function _callee$(_context) {
|
1675 |
-
while (1) {
|
1676 |
-
switch (_context.prev = _context.next) {
|
1677 |
-
case 0:
|
1678 |
-
_this$props = this.props, activePlugins = _this$props.activePlugins, createNotice = _this$props.createNotice;
|
1679 |
-
|
1680 |
-
if (activePlugins.includes(PAYPAL_PLUGIN)) {
|
1681 |
-
_context.next = 3;
|
1682 |
-
break;
|
1683 |
-
}
|
1684 |
-
|
1685 |
-
return _context.abrupt("return");
|
1686 |
-
|
1687 |
-
case 3:
|
1688 |
-
this.setState({
|
1689 |
-
isPending: true
|
1690 |
-
});
|
1691 |
-
_context.prev = 4;
|
1692 |
-
_context.next = 7;
|
1693 |
-
return external_this_wp_apiFetch_default()({
|
1694 |
-
path: WC_PAYPAL_NAMESPACE + '/onboarding/get-params',
|
1695 |
-
method: 'POST',
|
1696 |
-
data: {
|
1697 |
-
environment: 'production',
|
1698 |
-
returnUrlArgs: {
|
1699 |
-
ppcpobw: '1'
|
1700 |
-
}
|
1701 |
-
}
|
1702 |
-
});
|
1703 |
-
|
1704 |
-
case 7:
|
1705 |
-
result = _context.sent;
|
1706 |
-
|
1707 |
-
if (!(!result || !result.signupLink)) {
|
1708 |
-
_context.next = 11;
|
1709 |
-
break;
|
1710 |
-
}
|
1711 |
-
|
1712 |
-
this.setState({
|
1713 |
-
autoConnectFailed: true,
|
1714 |
-
isPending: false
|
1715 |
-
});
|
1716 |
-
return _context.abrupt("return");
|
1717 |
-
|
1718 |
-
case 11:
|
1719 |
-
loadOnboardingScript(result.scriptURL, result.scriptData, function () {
|
1720 |
-
_this2.setState({
|
1721 |
-
connectURL: result.signupLink,
|
1722 |
-
isPending: false
|
1723 |
-
});
|
1724 |
-
});
|
1725 |
-
_context.next = 18;
|
1726 |
-
break;
|
1727 |
-
|
1728 |
-
case 14:
|
1729 |
-
_context.prev = 14;
|
1730 |
-
_context.t0 = _context["catch"](4);
|
1731 |
-
|
1732 |
-
if (_context.t0 && _context.t0.data && _context.t0.data.status === 500) {
|
1733 |
-
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem with the Paypal onboarding setup, please fill the fields in manually.', 'woocommerce-admin'));
|
1734 |
-
}
|
1735 |
-
|
1736 |
-
this.setState({
|
1737 |
-
autoConnectFailed: true,
|
1738 |
-
isPending: false
|
1739 |
-
});
|
1740 |
-
|
1741 |
-
case 18:
|
1742 |
-
case "end":
|
1743 |
-
return _context.stop();
|
1744 |
-
}
|
1745 |
-
}
|
1746 |
-
}, _callee, this, [[4, 14]]);
|
1747 |
-
}));
|
1748 |
-
|
1749 |
-
function fetchOAuthConnectURLAndOnboardingSetup() {
|
1750 |
-
return _fetchOAuthConnectURLAndOnboardingSetup.apply(this, arguments);
|
1751 |
-
}
|
1752 |
-
|
1753 |
-
return fetchOAuthConnectURLAndOnboardingSetup;
|
1754 |
-
}()
|
1755 |
-
}, {
|
1756 |
-
key: "enablePaypalPlugin",
|
1757 |
-
value: function () {
|
1758 |
-
var _enablePaypalPlugin = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee2(skipPpcpSettingsUpdate) {
|
1759 |
-
var _this$props2, createNotice, updateOptions, markConfigured, options, updatedOptions, update;
|
1760 |
-
|
1761 |
-
return regenerator_default.a.wrap(function _callee2$(_context2) {
|
1762 |
-
while (1) {
|
1763 |
-
switch (_context2.prev = _context2.next) {
|
1764 |
-
case 0:
|
1765 |
-
_this$props2 = this.props, createNotice = _this$props2.createNotice, updateOptions = _this$props2.updateOptions, markConfigured = _this$props2.markConfigured, options = _this$props2.options;
|
1766 |
-
updatedOptions = {
|
1767 |
-
'woocommerce_ppcp-gateway_settings': {
|
1768 |
-
enabled: 'yes'
|
1769 |
-
}
|
1770 |
-
};
|
1771 |
-
|
1772 |
-
if (!skipPpcpSettingsUpdate) {
|
1773 |
-
updatedOptions['woocommerce-ppcp-settings'] = paypal_objectSpread(paypal_objectSpread({}, options), {}, {
|
1774 |
-
enabled: true
|
1775 |
-
});
|
1776 |
-
}
|
1777 |
-
|
1778 |
-
_context2.next = 5;
|
1779 |
-
return updateOptions(updatedOptions);
|
1780 |
-
|
1781 |
-
case 5:
|
1782 |
-
update = _context2.sent;
|
1783 |
-
|
1784 |
-
if (update.success) {
|
1785 |
-
createNotice('success', Object(external_this_wp_i18n_["__"])('PayPal connected successfully.', 'woocommerce-admin'));
|
1786 |
-
markConfigured('paypal');
|
1787 |
-
} else {
|
1788 |
-
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings.', 'woocommerce-admin'));
|
1789 |
-
}
|
1790 |
-
|
1791 |
-
case 7:
|
1792 |
-
case "end":
|
1793 |
-
return _context2.stop();
|
1794 |
-
}
|
1795 |
-
}
|
1796 |
-
}, _callee2, this);
|
1797 |
-
}));
|
1798 |
-
|
1799 |
-
function enablePaypalPlugin(_x) {
|
1800 |
-
return _enablePaypalPlugin.apply(this, arguments);
|
1801 |
-
}
|
1802 |
-
|
1803 |
-
return enablePaypalPlugin;
|
1804 |
-
}()
|
1805 |
-
}, {
|
1806 |
-
key: "setCredentials",
|
1807 |
-
value: function () {
|
1808 |
-
var _setCredentials = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee3(values) {
|
1809 |
-
var createNotice, result;
|
1810 |
-
return regenerator_default.a.wrap(function _callee3$(_context3) {
|
1811 |
-
while (1) {
|
1812 |
-
switch (_context3.prev = _context3.next) {
|
1813 |
-
case 0:
|
1814 |
-
createNotice = this.props.createNotice;
|
1815 |
-
_context3.prev = 1;
|
1816 |
-
_context3.next = 4;
|
1817 |
-
return external_this_wp_apiFetch_default()({
|
1818 |
-
path: WC_PAYPAL_NAMESPACE + '/onboarding/set-credentials',
|
1819 |
-
method: 'POST',
|
1820 |
-
data: paypal_objectSpread({
|
1821 |
-
environment: 'production'
|
1822 |
-
}, values)
|
1823 |
-
});
|
1824 |
-
|
1825 |
-
case 4:
|
1826 |
-
result = _context3.sent;
|
1827 |
-
|
1828 |
-
if (!(result && result.data)) {
|
1829 |
-
_context3.next = 9;
|
1830 |
-
break;
|
1831 |
-
}
|
1832 |
-
|
1833 |
-
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem updating the credentials.', 'woocommerce-admin'));
|
1834 |
-
_context3.next = 11;
|
1835 |
-
break;
|
1836 |
-
|
1837 |
-
case 9:
|
1838 |
-
_context3.next = 11;
|
1839 |
-
return this.enablePaypalPlugin(true);
|
1840 |
-
|
1841 |
-
case 11:
|
1842 |
-
_context3.next = 18;
|
1843 |
-
break;
|
1844 |
-
|
1845 |
-
case 13:
|
1846 |
-
_context3.prev = 13;
|
1847 |
-
_context3.t0 = _context3["catch"](1);
|
1848 |
-
|
1849 |
-
if (!(_context3.t0 && _context3.t0.data && _context3.t0.data.status === 404)) {
|
1850 |
-
_context3.next = 18;
|
1851 |
-
break;
|
1852 |
-
}
|
1853 |
-
|
1854 |
-
_context3.next = 18;
|
1855 |
-
return this.updateManualSettings(values);
|
1856 |
-
|
1857 |
-
case 18:
|
1858 |
-
case "end":
|
1859 |
-
return _context3.stop();
|
1860 |
-
}
|
1861 |
-
}
|
1862 |
-
}, _callee3, this, [[1, 13]]);
|
1863 |
-
}));
|
1864 |
-
|
1865 |
-
function setCredentials(_x2) {
|
1866 |
-
return _setCredentials.apply(this, arguments);
|
1867 |
-
}
|
1868 |
-
|
1869 |
-
return setCredentials;
|
1870 |
-
}()
|
1871 |
-
}, {
|
1872 |
-
key: "updateManualSettings",
|
1873 |
-
value: function () {
|
1874 |
-
var _updateManualSettings = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee4(values) {
|
1875 |
-
var _this$props3, createNotice, options, updateOptions, markConfigured, productionValues, optionValues, update;
|
1876 |
-
|
1877 |
-
return regenerator_default.a.wrap(function _callee4$(_context4) {
|
1878 |
-
while (1) {
|
1879 |
-
switch (_context4.prev = _context4.next) {
|
1880 |
-
case 0:
|
1881 |
-
_this$props3 = this.props, createNotice = _this$props3.createNotice, options = _this$props3.options, updateOptions = _this$props3.updateOptions, markConfigured = _this$props3.markConfigured;
|
1882 |
-
productionValues = Object.keys(values).reduce(function (vals, key) {
|
1883 |
-
var prodKey = key + '_production';
|
1884 |
-
return paypal_objectSpread(paypal_objectSpread({}, vals), {}, defineProperty_default()({}, prodKey, values[key]));
|
1885 |
-
}, {});
|
1886 |
-
/**
|
1887 |
-
* merchant data can be the same across sandbox and production, that's why we set it as
|
1888 |
-
* standalone as well.
|
1889 |
-
*/
|
1890 |
-
|
1891 |
-
optionValues = paypal_objectSpread(paypal_objectSpread({}, options), {}, {
|
1892 |
-
enabled: true,
|
1893 |
-
sandbox_on: false,
|
1894 |
-
merchant_email: values.merchant_email,
|
1895 |
-
merchant_id: values.merchant_id
|
1896 |
-
}, productionValues);
|
1897 |
-
_context4.next = 5;
|
1898 |
-
return updateOptions({
|
1899 |
-
'woocommerce-ppcp-settings': optionValues,
|
1900 |
-
'woocommerce_ppcp-gateway_settings': {
|
1901 |
-
enabled: 'yes'
|
1902 |
-
}
|
1903 |
-
});
|
1904 |
-
|
1905 |
-
case 5:
|
1906 |
-
update = _context4.sent;
|
1907 |
-
|
1908 |
-
if (update.success) {
|
1909 |
-
createNotice('success', Object(external_this_wp_i18n_["__"])('PayPal connected successfully.', 'woocommerce-admin'));
|
1910 |
-
markConfigured('paypal');
|
1911 |
-
} else {
|
1912 |
-
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings.', 'woocommerce-admin'));
|
1913 |
-
}
|
1914 |
-
|
1915 |
-
case 7:
|
1916 |
-
case "end":
|
1917 |
-
return _context4.stop();
|
1918 |
-
}
|
1919 |
-
}
|
1920 |
-
}, _callee4, this);
|
1921 |
-
}));
|
1922 |
-
|
1923 |
-
function updateManualSettings(_x3) {
|
1924 |
-
return _updateManualSettings.apply(this, arguments);
|
1925 |
-
}
|
1926 |
-
|
1927 |
-
return updateManualSettings;
|
1928 |
-
}()
|
1929 |
-
}, {
|
1930 |
-
key: "getInitialConfigValues",
|
1931 |
-
value: function getInitialConfigValues() {
|
1932 |
-
var options = this.props.options;
|
1933 |
-
return ['merchant_email', 'merchant_id', 'client_id', 'client_secret'].reduce(function (initialVals, key) {
|
1934 |
-
return paypal_objectSpread(paypal_objectSpread({}, initialVals), {}, defineProperty_default()({}, key, options && options[key + '_production'] ? options[key + '_production'] : ''));
|
1935 |
-
}, {});
|
1936 |
-
}
|
1937 |
-
}, {
|
1938 |
-
key: "validate",
|
1939 |
-
value: function validate(values) {
|
1940 |
-
var errors = {};
|
1941 |
-
|
1942 |
-
if (!values.merchant_email) {
|
1943 |
-
errors.merchant_email = Object(external_this_wp_i18n_["__"])('Please enter your Merchant email', 'woocommerce-admin');
|
1944 |
-
}
|
1945 |
-
|
1946 |
-
if (!Object(external_this_wp_url_["isEmail"])(values.merchant_email)) {
|
1947 |
-
errors.merchant_email = Object(external_this_wp_i18n_["__"])('Please enter a valid email address', 'woocommerce-admin');
|
1948 |
-
}
|
1949 |
-
|
1950 |
-
if (!values.merchant_id) {
|
1951 |
-
errors.merchant_id = Object(external_this_wp_i18n_["__"])('Please enter your Merchant Id', 'woocommerce-admin');
|
1952 |
-
}
|
1953 |
-
|
1954 |
-
if (!values.client_id) {
|
1955 |
-
errors.client_id = Object(external_this_wp_i18n_["__"])('Please enter your Client Id', 'woocommerce-admin');
|
1956 |
-
}
|
1957 |
-
|
1958 |
-
if (!values.client_secret) {
|
1959 |
-
errors.client_secret = Object(external_this_wp_i18n_["__"])('Please enter your Client Secret', 'woocommerce-admin');
|
1960 |
-
}
|
1961 |
-
|
1962 |
-
return errors;
|
1963 |
-
}
|
1964 |
-
}, {
|
1965 |
-
key: "renderManualConfig",
|
1966 |
-
value: function renderManualConfig() {
|
1967 |
-
var isOptionsUpdating = this.props.isOptionsUpdating;
|
1968 |
-
var stripeHelp = lib_default()({
|
1969 |
-
mixedString: Object(external_this_wp_i18n_["__"])('Your API details can be obtained from your {{docsLink}}Paypal developer account{{/docsLink}}, and your Merchant Id from your {{merchantLink}}Paypal Business account{{/merchantLink}}. Don’t have a Paypal account? {{registerLink}}Create one.{{/registerLink}}', 'woocommerce-admin'),
|
1970 |
-
components: {
|
1971 |
-
docsLink: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
1972 |
-
href: "https://developer.paypal.com/docs/api-basics/manage-apps/#create-or-edit-sandbox-and-live-apps",
|
1973 |
-
target: "_blank",
|
1974 |
-
type: "external"
|
1975 |
-
}),
|
1976 |
-
merchantLink: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
1977 |
-
href: "https://www.paypal.com/ca/smarthelp/article/FAQ3850",
|
1978 |
-
target: "_blank",
|
1979 |
-
type: "external"
|
1980 |
-
}),
|
1981 |
-
registerLink: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
1982 |
-
href: "https://www.paypal.com/us/business",
|
1983 |
-
target: "_blank",
|
1984 |
-
type: "external"
|
1985 |
-
})
|
1986 |
-
}
|
1987 |
-
});
|
1988 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Form"], {
|
1989 |
-
initialValues: this.getInitialConfigValues(),
|
1990 |
-
onSubmitCallback: this.setCredentials,
|
1991 |
-
validate: this.validate
|
1992 |
-
}, function (_ref2) {
|
1993 |
-
var getInputProps = _ref2.getInputProps,
|
1994 |
-
handleSubmit = _ref2.handleSubmit;
|
1995 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
1996 |
-
label: Object(external_this_wp_i18n_["__"])('Email address', 'woocommerce-admin'),
|
1997 |
-
required: true
|
1998 |
-
}, getInputProps('merchant_email'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
1999 |
-
label: Object(external_this_wp_i18n_["__"])('Merchant Id', 'woocommerce-admin'),
|
2000 |
-
required: true
|
2001 |
-
}, getInputProps('merchant_id'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2002 |
-
label: Object(external_this_wp_i18n_["__"])('Client Id', 'woocommerce-admin'),
|
2003 |
-
required: true
|
2004 |
-
}, getInputProps('client_id'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2005 |
-
label: Object(external_this_wp_i18n_["__"])('Secret Key', 'woocommerce-admin'),
|
2006 |
-
required: true
|
2007 |
-
}, getInputProps('client_secret'))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
2008 |
-
isPrimary: true,
|
2009 |
-
isBusy: isOptionsUpdating,
|
2010 |
-
onClick: handleSubmit
|
2011 |
-
}, Object(external_this_wp_i18n_["__"])('Proceed', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])("p", null, stripeHelp));
|
2012 |
-
});
|
2013 |
-
}
|
2014 |
-
}, {
|
2015 |
-
key: "renderConnectFields",
|
2016 |
-
value: function renderConnectFields() {
|
2017 |
-
var _this$state = this.state,
|
2018 |
-
autoConnectFailed = _this$state.autoConnectFailed,
|
2019 |
-
connectURL = _this$state.connectURL;
|
2020 |
-
|
2021 |
-
if (!autoConnectFailed && connectURL) {
|
2022 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(PaypalConnectButton, {
|
2023 |
-
connectUrl: connectURL
|
2024 |
-
}), Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_i18n_["__"])('You will be redirected to the PayPal website to create the connection.', 'woocommerce-admin')));
|
2025 |
-
}
|
2026 |
-
|
2027 |
-
if (autoConnectFailed) {
|
2028 |
-
return this.renderManualConfig();
|
2029 |
-
}
|
2030 |
-
}
|
2031 |
-
}, {
|
2032 |
-
key: "getConnectStep",
|
2033 |
-
value: function getConnectStep() {
|
2034 |
-
var isRequestingOptions = this.props.isRequestingOptions;
|
2035 |
-
return {
|
2036 |
-
key: 'connect',
|
2037 |
-
label: Object(external_this_wp_i18n_["__"])('Connect your PayPal account', 'woocommerce-admin'),
|
2038 |
-
description: Object(external_this_wp_i18n_["__"])('A PayPal account is required to process payments. Connect your store to your PayPal account.', 'woocommerce-admin'),
|
2039 |
-
content: isRequestingOptions ? null : this.renderConnectFields()
|
2040 |
-
};
|
2041 |
-
}
|
2042 |
-
}, {
|
2043 |
-
key: "render",
|
2044 |
-
value: function render() {
|
2045 |
-
var _this$props4 = this.props,
|
2046 |
-
installStep = _this$props4.installStep,
|
2047 |
-
isRequestingOptions = _this$props4.isRequestingOptions,
|
2048 |
-
isOptionsUpdating = _this$props4.isOptionsUpdating;
|
2049 |
-
var isPending = this.state.isPending;
|
2050 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
2051 |
-
isVertical: true,
|
2052 |
-
isPending: !installStep.isComplete || isPending || isRequestingOptions || isOptionsUpdating,
|
2053 |
-
currentStep: installStep.isComplete ? 'connect' : 'install',
|
2054 |
-
steps: [installStep, this.getConnectStep()]
|
2055 |
-
});
|
2056 |
-
}
|
2057 |
-
}]);
|
2058 |
-
|
2059 |
-
return PayPal;
|
2060 |
-
}(external_this_wp_element_["Component"]);
|
2061 |
-
|
2062 |
-
paypal_PayPal.defaultProps = {
|
2063 |
-
manualConfig: false // WCS is not required for the PayPal OAuth flow, so we can default to smooth connection.
|
2064 |
-
|
2065 |
-
};
|
2066 |
-
/* harmony default export */ var paypal = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
|
2067 |
-
var _select = select(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
2068 |
-
getOption = _select.getOption,
|
2069 |
-
isOptionsUpdating = _select.isOptionsUpdating,
|
2070 |
-
hasFinishedResolution = _select.hasFinishedResolution;
|
2071 |
-
|
2072 |
-
var _select2 = select(external_this_wc_data_["PLUGINS_STORE_NAME"]),
|
2073 |
-
getActivePlugins = _select2.getActivePlugins;
|
2074 |
-
|
2075 |
-
var paypalOptions = getOption('woocommerce-ppcp-settings');
|
2076 |
-
var isRequestingOptions = !hasFinishedResolution('getOption', ['woocommerce-ppcp-settings']);
|
2077 |
-
var activePlugins = getActivePlugins();
|
2078 |
-
return {
|
2079 |
-
activePlugins: activePlugins,
|
2080 |
-
isOptionsUpdating: isOptionsUpdating(),
|
2081 |
-
options: paypalOptions,
|
2082 |
-
isRequestingOptions: isRequestingOptions
|
2083 |
-
};
|
2084 |
-
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
|
2085 |
-
var _dispatch = dispatch('core/notices'),
|
2086 |
-
createNotice = _dispatch.createNotice;
|
2087 |
-
|
2088 |
-
var _dispatch2 = dispatch(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
2089 |
-
updateOptions = _dispatch2.updateOptions;
|
2090 |
-
|
2091 |
-
return {
|
2092 |
-
createNotice: createNotice,
|
2093 |
-
updateOptions: updateOptions
|
2094 |
-
};
|
2095 |
-
}))(paypal_PayPal));
|
2096 |
-
|
2097 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/klarna.js
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
function klarna_createSuper(Derived) { var hasNativeReflectConstruct = klarna_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
2107 |
-
|
2108 |
-
function klarna_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
2109 |
-
|
2110 |
-
/**
|
2111 |
-
* External dependencies
|
2112 |
-
*/
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
var klarna_Klarna = /*#__PURE__*/function (_Component) {
|
2121 |
-
inherits_default()(Klarna, _Component);
|
2122 |
-
|
2123 |
-
var _super = klarna_createSuper(Klarna);
|
2124 |
-
|
2125 |
-
function Klarna(props) {
|
2126 |
-
var _this;
|
2127 |
-
|
2128 |
-
classCallCheck_default()(this, Klarna);
|
2129 |
-
|
2130 |
-
_this = _super.call(this, props);
|
2131 |
-
_this.continue = _this.continue.bind(assertThisInitialized_default()(_this));
|
2132 |
-
return _this;
|
2133 |
-
}
|
2134 |
-
|
2135 |
-
createClass_default()(Klarna, [{
|
2136 |
-
key: "continue",
|
2137 |
-
value: function _continue() {
|
2138 |
-
var _this$props = this.props,
|
2139 |
-
markConfigured = _this$props.markConfigured,
|
2140 |
-
plugin = _this$props.plugin;
|
2141 |
-
var slug = plugin === 'checkout' ? 'klarna_checkout' : 'klarna_payments';
|
2142 |
-
markConfigured(slug);
|
2143 |
-
}
|
2144 |
-
}, {
|
2145 |
-
key: "renderConnectStep",
|
2146 |
-
value: function renderConnectStep() {
|
2147 |
-
var plugin = this.props.plugin;
|
2148 |
-
var slug = plugin === 'checkout' ? 'klarna-checkout' : 'klarna-payments';
|
2149 |
-
var section = plugin === 'checkout' ? 'kco' : 'klarna_payments';
|
2150 |
-
var link = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2151 |
-
href: wc_admin_settings["a" /* ADMIN_URL */] + 'admin.php?page=wc-settings&tab=checkout§ion=' + section,
|
2152 |
-
target: "_blank",
|
2153 |
-
type: "external"
|
2154 |
-
});
|
2155 |
-
var helpLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2156 |
-
href: 'https://docs.woocommerce.com/document/' + slug + '/#section-3',
|
2157 |
-
target: "_blank",
|
2158 |
-
type: "external"
|
2159 |
-
});
|
2160 |
-
var configureText = lib_default()({
|
2161 |
-
mixedString: Object(external_this_wp_i18n_["__"])('Klarna can be configured under your {{link}}store settings{{/link}}. Figure out {{helpLink}}what you need{{/helpLink}}.', 'woocommerce-admin'),
|
2162 |
-
components: {
|
2163 |
-
link: link,
|
2164 |
-
helpLink: helpLink
|
2165 |
-
}
|
2166 |
-
});
|
2167 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("p", null, configureText), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
2168 |
-
isPrimary: true,
|
2169 |
-
onClick: this.continue
|
2170 |
-
}, Object(external_this_wp_i18n_["__"])('Continue', 'woocommerce-admin')));
|
2171 |
-
}
|
2172 |
-
}, {
|
2173 |
-
key: "render",
|
2174 |
-
value: function render() {
|
2175 |
-
var installStep = this.props.installStep;
|
2176 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
2177 |
-
isVertical: true,
|
2178 |
-
isPending: !installStep.isComplete,
|
2179 |
-
currentStep: installStep.isComplete ? 'connect' : 'install',
|
2180 |
-
steps: [installStep, {
|
2181 |
-
key: 'connect',
|
2182 |
-
label: Object(external_this_wp_i18n_["__"])('Connect your Klarna account', 'woocommerce-admin'),
|
2183 |
-
content: this.renderConnectStep()
|
2184 |
-
}]
|
2185 |
-
});
|
2186 |
-
}
|
2187 |
-
}]);
|
2188 |
-
|
2189 |
-
return Klarna;
|
2190 |
-
}(external_this_wp_element_["Component"]);
|
2191 |
-
|
2192 |
-
/* harmony default export */ var klarna = (klarna_Klarna);
|
2193 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/payfast.js
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
function payfast_createSuper(Derived) { var hasNativeReflectConstruct = payfast_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
2207 |
-
|
2208 |
-
function payfast_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
2209 |
-
|
2210 |
-
/**
|
2211 |
-
* External dependencies
|
2212 |
-
*/
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
var payfast_PayFast = /*#__PURE__*/function (_Component) {
|
2223 |
-
inherits_default()(PayFast, _Component);
|
2224 |
-
|
2225 |
-
var _super = payfast_createSuper(PayFast);
|
2226 |
-
|
2227 |
-
function PayFast() {
|
2228 |
-
var _this;
|
2229 |
-
|
2230 |
-
classCallCheck_default()(this, PayFast);
|
2231 |
-
|
2232 |
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
2233 |
-
args[_key] = arguments[_key];
|
2234 |
-
}
|
2235 |
-
|
2236 |
-
_this = _super.call.apply(_super, [this].concat(args));
|
2237 |
-
|
2238 |
-
defineProperty_default()(assertThisInitialized_default()(_this), "getInitialConfigValues", function () {
|
2239 |
-
return {
|
2240 |
-
merchant_id: '',
|
2241 |
-
merchant_key: '',
|
2242 |
-
pass_phrase: ''
|
2243 |
-
};
|
2244 |
-
});
|
2245 |
-
|
2246 |
-
defineProperty_default()(assertThisInitialized_default()(_this), "validate", function (values) {
|
2247 |
-
var errors = {};
|
2248 |
-
|
2249 |
-
if (!values.merchant_id) {
|
2250 |
-
errors.merchant_id = Object(external_this_wp_i18n_["__"])('Please enter your merchant ID', 'woocommerce-admin');
|
2251 |
-
}
|
2252 |
-
|
2253 |
-
if (!values.merchant_key) {
|
2254 |
-
errors.merchant_key = Object(external_this_wp_i18n_["__"])('Please enter your merchant key', 'woocommerce-admin');
|
2255 |
-
}
|
2256 |
-
|
2257 |
-
if (!values.pass_phrase) {
|
2258 |
-
errors.pass_phrase = Object(external_this_wp_i18n_["__"])('Please enter your passphrase', 'woocommerce-admin');
|
2259 |
-
}
|
2260 |
-
|
2261 |
-
return errors;
|
2262 |
-
});
|
2263 |
-
|
2264 |
-
defineProperty_default()(assertThisInitialized_default()(_this), "updateSettings", /*#__PURE__*/function () {
|
2265 |
-
var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee(values) {
|
2266 |
-
var _this$props, updateOptions, createNotice, markConfigured, update;
|
2267 |
-
|
2268 |
-
return regenerator_default.a.wrap(function _callee$(_context) {
|
2269 |
-
while (1) {
|
2270 |
-
switch (_context.prev = _context.next) {
|
2271 |
-
case 0:
|
2272 |
-
_this$props = _this.props, updateOptions = _this$props.updateOptions, createNotice = _this$props.createNotice, markConfigured = _this$props.markConfigured; // Because the PayFast extension only works with the South African Rand
|
2273 |
-
// currency, force the store to use it while setting the PayFast settings
|
2274 |
-
|
2275 |
-
_context.next = 3;
|
2276 |
-
return updateOptions({
|
2277 |
-
woocommerce_currency: 'ZAR',
|
2278 |
-
woocommerce_payfast_settings: {
|
2279 |
-
merchant_id: values.merchant_id,
|
2280 |
-
merchant_key: values.merchant_key,
|
2281 |
-
pass_phrase: values.pass_phrase,
|
2282 |
-
enabled: 'yes'
|
2283 |
-
}
|
2284 |
-
});
|
2285 |
-
|
2286 |
-
case 3:
|
2287 |
-
update = _context.sent;
|
2288 |
-
|
2289 |
-
if (update.success) {
|
2290 |
-
markConfigured('payfast');
|
2291 |
-
createNotice('success', Object(external_this_wp_i18n_["__"])('PayFast connected successfully', 'woocommerce-admin'));
|
2292 |
-
} else {
|
2293 |
-
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings', 'woocommerce-admin'));
|
2294 |
-
}
|
2295 |
-
|
2296 |
-
case 5:
|
2297 |
-
case "end":
|
2298 |
-
return _context.stop();
|
2299 |
-
}
|
2300 |
-
}
|
2301 |
-
}, _callee);
|
2302 |
-
}));
|
2303 |
-
|
2304 |
-
return function (_x) {
|
2305 |
-
return _ref.apply(this, arguments);
|
2306 |
-
};
|
2307 |
-
}());
|
2308 |
-
|
2309 |
-
return _this;
|
2310 |
-
}
|
2311 |
-
|
2312 |
-
createClass_default()(PayFast, [{
|
2313 |
-
key: "renderConnectStep",
|
2314 |
-
value: function renderConnectStep() {
|
2315 |
-
var isOptionsRequesting = this.props.isOptionsRequesting;
|
2316 |
-
var helpText = lib_default()({
|
2317 |
-
mixedString: Object(external_this_wp_i18n_["__"])('Your API details can be obtained from your {{link}}PayFast account{{/link}}', 'woocommerce-admin'),
|
2318 |
-
components: {
|
2319 |
-
link: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2320 |
-
href: "https://www.payfast.co.za/",
|
2321 |
-
target: "_blank",
|
2322 |
-
type: "external"
|
2323 |
-
})
|
2324 |
-
}
|
2325 |
-
});
|
2326 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Form"], {
|
2327 |
-
initialValues: this.getInitialConfigValues(),
|
2328 |
-
onSubmitCallback: this.updateSettings,
|
2329 |
-
validate: this.validate
|
2330 |
-
}, function (_ref2) {
|
2331 |
-
var getInputProps = _ref2.getInputProps,
|
2332 |
-
handleSubmit = _ref2.handleSubmit;
|
2333 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2334 |
-
label: Object(external_this_wp_i18n_["__"])('Merchant ID', 'woocommerce-admin'),
|
2335 |
-
required: true
|
2336 |
-
}, getInputProps('merchant_id'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2337 |
-
label: Object(external_this_wp_i18n_["__"])('Merchant Key', 'woocommerce-admin'),
|
2338 |
-
required: true
|
2339 |
-
}, getInputProps('merchant_key'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2340 |
-
label: Object(external_this_wp_i18n_["__"])('Passphrase', 'woocommerce-admin'),
|
2341 |
-
required: true
|
2342 |
-
}, getInputProps('pass_phrase'))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
2343 |
-
isPrimary: true,
|
2344 |
-
isBusy: isOptionsRequesting,
|
2345 |
-
onClick: handleSubmit
|
2346 |
-
}, Object(external_this_wp_i18n_["__"])('Proceed', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])("p", null, helpText));
|
2347 |
-
});
|
2348 |
-
}
|
2349 |
-
}, {
|
2350 |
-
key: "render",
|
2351 |
-
value: function render() {
|
2352 |
-
var _this$props2 = this.props,
|
2353 |
-
installStep = _this$props2.installStep,
|
2354 |
-
isOptionsRequesting = _this$props2.isOptionsRequesting;
|
2355 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
2356 |
-
isVertical: true,
|
2357 |
-
isPending: !installStep.isComplete || isOptionsRequesting,
|
2358 |
-
currentStep: installStep.isComplete ? 'connect' : 'install',
|
2359 |
-
steps: [installStep, {
|
2360 |
-
key: 'connect',
|
2361 |
-
label: Object(external_this_wp_i18n_["__"])('Connect your PayFast account', 'woocommerce-admin'),
|
2362 |
-
content: this.renderConnectStep()
|
2363 |
-
}]
|
2364 |
-
});
|
2365 |
-
}
|
2366 |
-
}]);
|
2367 |
-
|
2368 |
-
return PayFast;
|
2369 |
-
}(external_this_wp_element_["Component"]);
|
2370 |
-
|
2371 |
-
/* harmony default export */ var payfast = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
|
2372 |
-
var _select = select(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
2373 |
-
isOptionsUpdating = _select.isOptionsUpdating;
|
2374 |
-
|
2375 |
-
var isOptionsRequesting = isOptionsUpdating();
|
2376 |
-
return {
|
2377 |
-
isOptionsRequesting: isOptionsRequesting
|
2378 |
-
};
|
2379 |
-
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
|
2380 |
-
var _dispatch = dispatch('core/notices'),
|
2381 |
-
createNotice = _dispatch.createNotice;
|
2382 |
-
|
2383 |
-
var _dispatch2 = dispatch(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
2384 |
-
updateOptions = _dispatch2.updateOptions;
|
2385 |
-
|
2386 |
-
return {
|
2387 |
-
createNotice: createNotice,
|
2388 |
-
updateOptions: updateOptions
|
2389 |
-
};
|
2390 |
-
}))(payfast_PayFast));
|
2391 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/eway.js
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
-
|
2404 |
-
function eway_createSuper(Derived) { var hasNativeReflectConstruct = eway_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
2405 |
-
|
2406 |
-
function eway_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
2407 |
-
|
2408 |
-
/**
|
2409 |
-
* External dependencies
|
2410 |
-
*/
|
2411 |
-
|
2412 |
-
|
2413 |
-
|
2414 |
-
|
2415 |
-
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
2419 |
-
|
2420 |
-
var eway_EWay = /*#__PURE__*/function (_Component) {
|
2421 |
-
inherits_default()(EWay, _Component);
|
2422 |
-
|
2423 |
-
var _super = eway_createSuper(EWay);
|
2424 |
-
|
2425 |
-
function EWay() {
|
2426 |
-
var _this;
|
2427 |
-
|
2428 |
-
classCallCheck_default()(this, EWay);
|
2429 |
-
|
2430 |
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
2431 |
-
args[_key] = arguments[_key];
|
2432 |
-
}
|
2433 |
-
|
2434 |
-
_this = _super.call.apply(_super, [this].concat(args));
|
2435 |
-
|
2436 |
-
defineProperty_default()(assertThisInitialized_default()(_this), "getInitialConfigValues", function () {
|
2437 |
-
return {
|
2438 |
-
customer_api: '',
|
2439 |
-
customer_password: ''
|
2440 |
-
};
|
2441 |
-
});
|
2442 |
-
|
2443 |
-
defineProperty_default()(assertThisInitialized_default()(_this), "validate", function (values) {
|
2444 |
-
var errors = {};
|
2445 |
-
|
2446 |
-
if (!values.customer_api) {
|
2447 |
-
errors.customer_api = Object(external_this_wp_i18n_["__"])('Please enter your customer API key ', 'woocommerce-admin');
|
2448 |
-
}
|
2449 |
-
|
2450 |
-
if (!values.customer_password) {
|
2451 |
-
errors.customer_password = Object(external_this_wp_i18n_["__"])('Please enter your customer password', 'woocommerce-admin');
|
2452 |
-
}
|
2453 |
-
|
2454 |
-
return errors;
|
2455 |
-
});
|
2456 |
-
|
2457 |
-
defineProperty_default()(assertThisInitialized_default()(_this), "updateSettings", /*#__PURE__*/function () {
|
2458 |
-
var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee(values) {
|
2459 |
-
var _this$props, updateOptions, createNotice, markConfigured, update;
|
2460 |
-
|
2461 |
-
return regenerator_default.a.wrap(function _callee$(_context) {
|
2462 |
-
while (1) {
|
2463 |
-
switch (_context.prev = _context.next) {
|
2464 |
-
case 0:
|
2465 |
-
_this$props = _this.props, updateOptions = _this$props.updateOptions, createNotice = _this$props.createNotice, markConfigured = _this$props.markConfigured;
|
2466 |
-
_context.next = 3;
|
2467 |
-
return updateOptions({
|
2468 |
-
woocommerce_eway_settings: {
|
2469 |
-
customer_api: values.customer_api,
|
2470 |
-
customer_password: values.customer_password,
|
2471 |
-
enabled: 'yes'
|
2472 |
-
}
|
2473 |
-
});
|
2474 |
-
|
2475 |
-
case 3:
|
2476 |
-
update = _context.sent;
|
2477 |
-
|
2478 |
-
if (update.success) {
|
2479 |
-
markConfigured('eway');
|
2480 |
-
createNotice('success', Object(external_this_wp_i18n_["__"])('eWAY connected successfully', 'woocommerce-admin'));
|
2481 |
-
} else {
|
2482 |
-
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings', 'woocommerce-admin'));
|
2483 |
-
}
|
2484 |
-
|
2485 |
-
case 5:
|
2486 |
-
case "end":
|
2487 |
-
return _context.stop();
|
2488 |
-
}
|
2489 |
-
}
|
2490 |
-
}, _callee);
|
2491 |
-
}));
|
2492 |
-
|
2493 |
-
return function (_x) {
|
2494 |
-
return _ref.apply(this, arguments);
|
2495 |
-
};
|
2496 |
-
}());
|
2497 |
-
|
2498 |
-
return _this;
|
2499 |
-
}
|
2500 |
-
|
2501 |
-
createClass_default()(EWay, [{
|
2502 |
-
key: "renderConnectStep",
|
2503 |
-
value: function renderConnectStep() {
|
2504 |
-
var isOptionsRequesting = this.props.isOptionsRequesting;
|
2505 |
-
var helpText = lib_default()({
|
2506 |
-
mixedString: Object(external_this_wp_i18n_["__"])('Your API details can be obtained from your {{link}}eWAY account{{/link}}', 'woocommerce-admin'),
|
2507 |
-
components: {
|
2508 |
-
link: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2509 |
-
href: "https://www.eway.com.au/",
|
2510 |
-
target: "_blank",
|
2511 |
-
type: "external"
|
2512 |
-
})
|
2513 |
-
}
|
2514 |
-
});
|
2515 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Form"], {
|
2516 |
-
initialValues: this.getInitialConfigValues(),
|
2517 |
-
onSubmitCallback: this.updateSettings,
|
2518 |
-
validate: this.validate
|
2519 |
-
}, function (_ref2) {
|
2520 |
-
var getInputProps = _ref2.getInputProps,
|
2521 |
-
handleSubmit = _ref2.handleSubmit;
|
2522 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2523 |
-
label: Object(external_this_wp_i18n_["__"])('Customer API Key', 'woocommerce-admin'),
|
2524 |
-
required: true
|
2525 |
-
}, getInputProps('customer_api'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2526 |
-
label: Object(external_this_wp_i18n_["__"])('Customer Password', 'woocommerce-admin'),
|
2527 |
-
required: true
|
2528 |
-
}, getInputProps('customer_password'))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
2529 |
-
isPrimary: true,
|
2530 |
-
isBusy: isOptionsRequesting,
|
2531 |
-
onClick: handleSubmit
|
2532 |
-
}, Object(external_this_wp_i18n_["__"])('Proceed', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])("p", null, helpText));
|
2533 |
-
});
|
2534 |
-
}
|
2535 |
-
}, {
|
2536 |
-
key: "render",
|
2537 |
-
value: function render() {
|
2538 |
-
var _this$props2 = this.props,
|
2539 |
-
installStep = _this$props2.installStep,
|
2540 |
-
isOptionsRequesting = _this$props2.isOptionsRequesting;
|
2541 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
2542 |
-
isVertical: true,
|
2543 |
-
isPending: !installStep.isComplete || isOptionsRequesting,
|
2544 |
-
currentStep: installStep.isComplete ? 'connect' : 'install',
|
2545 |
-
steps: [installStep, {
|
2546 |
-
key: 'connect',
|
2547 |
-
label: Object(external_this_wp_i18n_["__"])('Connect your eWAY account', 'woocommerce-admin'),
|
2548 |
-
content: this.renderConnectStep()
|
2549 |
-
}]
|
2550 |
-
});
|
2551 |
-
}
|
2552 |
-
}]);
|
2553 |
-
|
2554 |
-
return EWay;
|
2555 |
-
}(external_this_wp_element_["Component"]);
|
2556 |
-
|
2557 |
-
/* harmony default export */ var eway = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
|
2558 |
-
var _select = select(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
2559 |
-
isOptionsUpdating = _select.isOptionsUpdating;
|
2560 |
-
|
2561 |
-
var isOptionsRequesting = isOptionsUpdating();
|
2562 |
-
return {
|
2563 |
-
isOptionsRequesting: isOptionsRequesting
|
2564 |
-
};
|
2565 |
-
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
|
2566 |
-
var _dispatch = dispatch('core/notices'),
|
2567 |
-
createNotice = _dispatch.createNotice;
|
2568 |
-
|
2569 |
-
var _dispatch2 = dispatch(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
2570 |
-
updateOptions = _dispatch2.updateOptions;
|
2571 |
-
|
2572 |
-
return {
|
2573 |
-
createNotice: createNotice,
|
2574 |
-
updateOptions: updateOptions
|
2575 |
-
};
|
2576 |
-
}))(eway_EWay));
|
2577 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/razorpay.js
|
2578 |
-
|
2579 |
-
|
2580 |
-
|
2581 |
-
|
2582 |
-
|
2583 |
-
/**
|
2584 |
-
* External dependencies
|
2585 |
-
*/
|
2586 |
-
|
2587 |
-
|
2588 |
-
|
2589 |
-
|
2590 |
-
|
2591 |
-
|
2592 |
-
var INITIAL_CONFIG = {
|
2593 |
-
key_id: '',
|
2594 |
-
key_secret: ''
|
2595 |
};
|
2596 |
-
|
2597 |
-
|
2598 |
-
|
2599 |
-
|
2600 |
-
|
2601 |
-
|
2602 |
-
|
2603 |
-
|
2604 |
-
|
2605 |
-
|
|
|
|
|
|
|
|
|
|
|
2606 |
}
|
2607 |
-
|
2608 |
-
return errors;
|
2609 |
};
|
2610 |
-
|
2611 |
-
var
|
2612 |
-
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
2630 |
-
if (update.success) {
|
2631 |
-
markConfigured('razorpay');
|
2632 |
-
createNotice('success', Object(external_this_wp_i18n_["__"])('Razorpay connected successfully', 'woocommerce-admin'));
|
2633 |
-
} else {
|
2634 |
-
createNotice('error', Object(external_this_wp_i18n_["__"])('There was a problem saving your payment settings', 'woocommerce-admin'));
|
2635 |
-
}
|
2636 |
-
|
2637 |
-
case 4:
|
2638 |
-
case "end":
|
2639 |
-
return _context.stop();
|
2640 |
-
}
|
2641 |
-
}
|
2642 |
-
}, _callee);
|
2643 |
-
}));
|
2644 |
-
|
2645 |
-
return function updateSettings(_x, _x2, _x3, _x4) {
|
2646 |
-
return _ref.apply(this, arguments);
|
2647 |
-
};
|
2648 |
-
}();
|
2649 |
-
|
2650 |
-
var razorpay_renderConnectStep = function renderConnectStep(_ref2) {
|
2651 |
-
var createNotice = _ref2.createNotice,
|
2652 |
-
isOptionsRequesting = _ref2.isOptionsRequesting,
|
2653 |
-
markConfigured = _ref2.markConfigured,
|
2654 |
-
updateOptions = _ref2.updateOptions;
|
2655 |
-
var helpText = lib_default()({
|
2656 |
-
mixedString: Object(external_this_wp_i18n_["__"])('Your key details can be obtained from your {{link}}Razorpay account{{/link}}', 'woocommerce-admin'),
|
2657 |
-
components: {
|
2658 |
-
link: Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2659 |
-
href: "https://dashboard.razorpay.com/#/access/signin",
|
2660 |
-
target: "_blank",
|
2661 |
-
type: "external"
|
2662 |
-
})
|
2663 |
-
}
|
2664 |
-
});
|
2665 |
-
|
2666 |
-
var onSubmit = function onSubmit(values) {
|
2667 |
-
return razorpay_updateSettings(values, createNotice, markConfigured, updateOptions);
|
2668 |
};
|
2669 |
|
2670 |
-
|
2671 |
-
|
2672 |
-
|
2673 |
-
validate: razorpay_validate
|
2674 |
-
}, function (_ref3) {
|
2675 |
-
var getInputProps = _ref3.getInputProps,
|
2676 |
-
handleSubmit = _ref3.handleSubmit;
|
2677 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2678 |
-
label: Object(external_this_wp_i18n_["__"])('Key ID', 'woocommerce-admin'),
|
2679 |
-
required: true
|
2680 |
-
}, getInputProps('key_id'))), Object(external_this_wp_element_["createElement"])(external_this_wc_components_["TextControl"], extends_default()({
|
2681 |
-
label: Object(external_this_wp_i18n_["__"])('Key Secret', 'woocommerce-admin'),
|
2682 |
-
required: true
|
2683 |
-
}, getInputProps('key_secret'))), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
2684 |
-
isPrimary: true,
|
2685 |
-
isBusy: isOptionsRequesting,
|
2686 |
-
onClick: handleSubmit
|
2687 |
-
}, Object(external_this_wp_i18n_["__"])('Proceed', 'woocommerce-admin')), Object(external_this_wp_element_["createElement"])("p", null, helpText));
|
2688 |
-
});
|
2689 |
-
};
|
2690 |
-
|
2691 |
-
var razorpay_Razorpay = function Razorpay(_ref4) {
|
2692 |
-
var createNotice = _ref4.createNotice,
|
2693 |
-
installStep = _ref4.installStep,
|
2694 |
-
isOptionsRequesting = _ref4.isOptionsRequesting,
|
2695 |
-
markConfigured = _ref4.markConfigured,
|
2696 |
-
updateOptions = _ref4.updateOptions;
|
2697 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
2698 |
-
isVertical: true,
|
2699 |
-
isPending: !installStep.isComplete || isOptionsRequesting,
|
2700 |
-
currentStep: installStep.isComplete ? 'connect' : 'install',
|
2701 |
-
steps: [installStep, {
|
2702 |
-
key: 'connect',
|
2703 |
-
label: Object(external_this_wp_i18n_["__"])('Connect your Razorpay account', 'woocommerce-admin'),
|
2704 |
-
content: razorpay_renderConnectStep({
|
2705 |
-
createNotice: createNotice,
|
2706 |
-
isOptionsRequesting: isOptionsRequesting,
|
2707 |
-
markConfigured: markConfigured,
|
2708 |
-
updateOptions: updateOptions
|
2709 |
-
})
|
2710 |
-
}]
|
2711 |
-
});
|
2712 |
-
};
|
2713 |
-
/* harmony default export */ var payments_razorpay = (function (_ref5) {
|
2714 |
-
var installStep = _ref5.installStep,
|
2715 |
-
markConfigured = _ref5.markConfigured;
|
2716 |
-
var isOptionsUpdating = Object(external_this_wp_data_["useSelect"])(function (select) {
|
2717 |
-
return select(external_this_wc_data_["OPTIONS_STORE_NAME"]).isOptionsUpdating;
|
2718 |
-
});
|
2719 |
-
var isOptionsRequesting = isOptionsUpdating();
|
2720 |
-
|
2721 |
-
var _useDispatch = Object(external_this_wp_data_["useDispatch"])('core/notices'),
|
2722 |
-
createNotice = _useDispatch.createNotice;
|
2723 |
-
|
2724 |
-
var _useDispatch2 = Object(external_this_wp_data_["useDispatch"])(external_this_wc_data_["OPTIONS_STORE_NAME"]),
|
2725 |
-
updateOptions = _useDispatch2.updateOptions;
|
2726 |
-
|
2727 |
-
return Object(external_this_wp_element_["createElement"])(razorpay_Razorpay, {
|
2728 |
-
createNotice: createNotice,
|
2729 |
-
installStep: installStep,
|
2730 |
-
isOptionsRequesting: isOptionsRequesting,
|
2731 |
-
markConfigured: markConfigured,
|
2732 |
-
updateOptions: updateOptions
|
2733 |
-
});
|
2734 |
-
});
|
2735 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/mollie.js
|
2736 |
-
|
2737 |
-
|
2738 |
-
/**
|
2739 |
-
* External dependencies
|
2740 |
-
*/
|
2741 |
-
|
2742 |
-
|
2743 |
-
|
2744 |
-
|
2745 |
-
|
2746 |
-
var mollie_Mollie = function Mollie(_ref) {
|
2747 |
-
var installStep = _ref.installStep,
|
2748 |
-
markConfigured = _ref.markConfigured;
|
2749 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Stepper"], {
|
2750 |
-
isVertical: true,
|
2751 |
-
isPending: !installStep.isComplete,
|
2752 |
-
currentStep: installStep.isComplete ? 'connect' : 'install',
|
2753 |
-
steps: [installStep, {
|
2754 |
-
key: 'connect',
|
2755 |
-
label: Object(external_this_wp_i18n_["__"])('Connect your Mollie account', 'woocommerce-admin'),
|
2756 |
-
content: Object(external_this_wp_element_["createElement"])(mollie_MollieConnectStep, {
|
2757 |
-
onFinish: function onFinish() {
|
2758 |
-
markConfigured('mollie');
|
2759 |
-
}
|
2760 |
-
})
|
2761 |
-
}]
|
2762 |
-
});
|
2763 |
-
};
|
2764 |
|
2765 |
-
var
|
2766 |
-
|
2767 |
-
var settingsLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2768 |
-
href: "".concat(wc_admin_settings["a" /* ADMIN_URL */], "admin.php?page=wc-settings&tab=mollie_settings#mollie-payments-for-woocommerce"),
|
2769 |
-
target: "_blank",
|
2770 |
-
type: "external"
|
2771 |
-
});
|
2772 |
-
var accountLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2773 |
-
href: 'https://www.mollie.com/dashboard/signup',
|
2774 |
-
target: "_blank",
|
2775 |
-
type: "external"
|
2776 |
});
|
2777 |
-
var configureText = lib_default()({
|
2778 |
-
mixedString: Object(external_this_wp_i18n_["__"])('Create a {{accountLink}}Mollie account{{/accountLink}} and finish the configuration in the {{settingsLink}}Mollie settings.{{/settingsLink}}', 'woocommerce-admin'),
|
2779 |
-
components: {
|
2780 |
-
accountLink: accountLink,
|
2781 |
-
settingsLink: settingsLink
|
2782 |
-
}
|
2783 |
-
});
|
2784 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("p", null, configureText), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
2785 |
-
isPrimary: true,
|
2786 |
-
onClick: onFinish
|
2787 |
-
}, Object(external_this_wp_i18n_["__"])('Continue', 'woocommerce-admin')));
|
2788 |
-
};
|
2789 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/payu-india.js
|
2790 |
-
|
2791 |
-
|
2792 |
-
/**
|
2793 |
-
* External dependencies
|
2794 |
-
*/
|
2795 |
-
|
2796 |
-
|
2797 |
-
|
2798 |
-
|
2799 |
|
2800 |
-
|
2801 |
-
|
2802 |
-
|
2803 |
-
|
2804 |
-
|
2805 |
-
isPending: !installStep.isComplete,
|
2806 |
-
currentStep: installStep.isComplete ? 'connect' : 'install',
|
2807 |
-
steps: [installStep, {
|
2808 |
-
key: 'connect',
|
2809 |
-
label: Object(external_this_wp_i18n_["__"])('Connect to your PayU account', 'woocommerce-admin'),
|
2810 |
-
content: Object(external_this_wp_element_["createElement"])(payu_india_PayUCredentialsStep, {
|
2811 |
-
onFinish: function onFinish() {
|
2812 |
-
markConfigured('payubiz');
|
2813 |
-
}
|
2814 |
-
})
|
2815 |
-
}]
|
2816 |
-
});
|
2817 |
-
};
|
2818 |
|
2819 |
-
var
|
2820 |
-
|
2821 |
-
var settingsLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
2822 |
-
href: "".concat(wc_admin_settings["a" /* ADMIN_URL */], "admin.php?page=wc-settings&tab=checkout§ion=payubiz"),
|
2823 |
-
target: "_blank",
|
2824 |
-
type: "external"
|
2825 |
});
|
2826 |
-
var
|
2827 |
-
|
2828 |
-
|
2829 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
2830 |
});
|
2831 |
-
var configureText = lib_default()({
|
2832 |
-
mixedString: Object(external_this_wp_i18n_["__"])('PayU can be configured under your {{settingsLink}}store settings.{{/settingsLink}} Create your PayU account {{accountLink}}here.{{/accountLink}}', 'woocommerce-admin'),
|
2833 |
-
components: {
|
2834 |
-
accountLink: accountLink,
|
2835 |
-
settingsLink: settingsLink
|
2836 |
-
}
|
2837 |
-
});
|
2838 |
-
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_element_["createElement"])("p", null, configureText), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
|
2839 |
-
isPrimary: true,
|
2840 |
-
onClick: onFinish
|
2841 |
-
}, Object(external_this_wp_i18n_["__"])('Continue', 'woocommerce-admin')));
|
2842 |
-
};
|
2843 |
-
// EXTERNAL MODULE: ./client/task-list/tasks/payments/wcpay-usage-modal.js
|
2844 |
-
var wcpay_usage_modal = __webpack_require__(527);
|
2845 |
-
|
2846 |
-
// EXTERNAL MODULE: ./client/lib/notices/index.js
|
2847 |
-
var notices = __webpack_require__(507);
|
2848 |
-
|
2849 |
-
// CONCATENATED MODULE: ./client/task-list/tasks/payments/methods.js
|
2850 |
-
|
2851 |
-
|
2852 |
-
/**
|
2853 |
-
* External dependencies
|
2854 |
-
*/
|
2855 |
-
|
2856 |
-
|
2857 |
|
2858 |
-
|
2859 |
-
|
2860 |
-
|
2861 |
-
/**
|
2862 |
-
* Internal dependencies
|
2863 |
-
*/
|
2864 |
-
|
2865 |
-
|
2866 |
-
|
2867 |
-
|
2868 |
-
|
2869 |
-
|
2870 |
-
|
2871 |
-
|
2872 |
-
|
2873 |
-
|
2874 |
-
|
2875 |
-
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
2879 |
-
|
2880 |
-
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
function installActivateAndConnectWcpay(resolve, reject, createNotice, installAndActivatePlugins) {
|
2885 |
-
var errorMessage = Object(external_this_wp_i18n_["__"])('There was an error connecting to WooCommerce Payments. Please try again or connect later in store settings.', 'woocommerce-admin');
|
2886 |
-
|
2887 |
-
var connect = function connect() {
|
2888 |
-
external_this_wp_apiFetch_default()({
|
2889 |
-
path: external_this_wc_data_["WC_ADMIN_NAMESPACE"] + '/plugins/connect-wcpay',
|
2890 |
-
method: 'POST'
|
2891 |
-
}).then(function (response) {
|
2892 |
-
window.location = response.connectUrl;
|
2893 |
-
}).catch(function () {
|
2894 |
-
createNotice('error', errorMessage);
|
2895 |
-
reject();
|
2896 |
-
});
|
2897 |
-
};
|
2898 |
-
|
2899 |
-
installAndActivatePlugins(['woocommerce-payments']).then(function () {
|
2900 |
-
return connect();
|
2901 |
-
}).catch(function (error) {
|
2902 |
-
Object(notices["a" /* createNoticesFromResponse */])(error);
|
2903 |
-
reject();
|
2904 |
-
});
|
2905 |
-
}
|
2906 |
-
function getPaymentMethods(_ref) {
|
2907 |
-
var activePlugins = _ref.activePlugins,
|
2908 |
-
countryCode = _ref.countryCode,
|
2909 |
-
createNotice = _ref.createNotice,
|
2910 |
-
installAndActivatePlugins = _ref.installAndActivatePlugins,
|
2911 |
-
onboardingStatus = _ref.onboardingStatus,
|
2912 |
-
options = _ref.options,
|
2913 |
-
profileItems = _ref.profileItems,
|
2914 |
-
paypalOnboardingStatus = _ref.paypalOnboardingStatus,
|
2915 |
-
loadingPaypalStatus = _ref.loadingPaypalStatus;
|
2916 |
-
var _onboardingStatus$str = onboardingStatus.stripeSupportedCountries,
|
2917 |
-
stripeSupportedCountries = _onboardingStatus$str === void 0 ? [] : _onboardingStatus$str,
|
2918 |
-
_onboardingStatus$wcP = onboardingStatus.wcPayIsConnected,
|
2919 |
-
wcPayIsConnected = _onboardingStatus$wcP === void 0 ? false : _onboardingStatus$wcP,
|
2920 |
-
_onboardingStatus$ena = onboardingStatus.enabledPaymentGateways,
|
2921 |
-
enabledPaymentGateways = _onboardingStatus$ena === void 0 ? [] : _onboardingStatus$ena;
|
2922 |
-
var hasCbdIndustry = (profileItems.industry || []).some(function (_ref2) {
|
2923 |
-
var slug = _ref2.slug;
|
2924 |
-
return slug === 'cbd-other-hemp-derived-products';
|
2925 |
-
}); // Whether publishable and secret keys are filled for given mode.
|
2926 |
-
|
2927 |
-
var isStripeConfigured = options.woocommerce_stripe_settings && (options.woocommerce_stripe_settings.testmode === 'no' ? options.woocommerce_stripe_settings.publishable_key && options.woocommerce_stripe_settings.secret_key : options.woocommerce_stripe_settings.test_publishable_key && options.woocommerce_stripe_settings.test_secret_key);
|
2928 |
-
var methods = [{
|
2929 |
-
key: 'stripe',
|
2930 |
-
title: Object(external_this_wp_i18n_["__"])('Credit cards - powered by Stripe', 'woocommerce-admin'),
|
2931 |
-
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('Accept debit and credit cards in 135+ currencies, methods such as Alipay, ' + 'and one-touch checkout with Apple Pay.', 'woocommerce-admin')),
|
2932 |
-
before: Object(external_this_wp_element_["createElement"])("img", {
|
2933 |
-
src: wc_admin_settings["e" /* WC_ASSET_URL */] + 'images/stripe.png',
|
2934 |
-
alt: ""
|
2935 |
-
}),
|
2936 |
-
visible: stripeSupportedCountries.includes(countryCode) && !hasCbdIndustry,
|
2937 |
-
plugins: ['woocommerce-gateway-stripe'],
|
2938 |
-
container: Object(external_this_wp_element_["createElement"])(stripe, null),
|
2939 |
-
isConfigured: isStripeConfigured,
|
2940 |
-
isEnabled: options.woocommerce_stripe_settings && options.woocommerce_stripe_settings.enabled === 'yes',
|
2941 |
-
optionName: 'woocommerce_stripe_settings'
|
2942 |
-
}, {
|
2943 |
-
key: 'paypal',
|
2944 |
-
title: Object(external_this_wp_i18n_["__"])('PayPal Payments', 'woocommerce-admin'),
|
2945 |
-
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])("Safe and secure payments using credit cards or your customer's PayPal account.", 'woocommerce-admin')),
|
2946 |
-
before: Object(external_this_wp_element_["createElement"])("img", {
|
2947 |
-
src: wc_admin_settings["e" /* WC_ASSET_URL */] + 'images/paypal.png',
|
2948 |
-
alt: ""
|
2949 |
-
}),
|
2950 |
-
visible: !hasCbdIndustry,
|
2951 |
-
plugins: [PAYPAL_PLUGIN],
|
2952 |
-
container: Object(external_this_wp_element_["createElement"])(paypal, null),
|
2953 |
-
isConfigured: paypalOnboardingStatus && paypalOnboardingStatus.production && paypalOnboardingStatus.production.onboarded,
|
2954 |
-
isEnabled: enabledPaymentGateways.includes('ppcp-gateway'),
|
2955 |
-
optionName: 'woocommerce_ppcp-gateway_settings',
|
2956 |
-
loading: activePlugins.includes(PAYPAL_PLUGIN) ? loadingPaypalStatus : false
|
2957 |
-
}, {
|
2958 |
-
key: 'klarna_checkout',
|
2959 |
-
title: Object(external_this_wp_i18n_["__"])('Klarna Checkout', 'woocommerce-admin'),
|
2960 |
-
content: Object(external_this_wp_i18n_["__"])('Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries.', 'woocommerce-admin'),
|
2961 |
-
before: Object(external_this_wp_element_["createElement"])("img", {
|
2962 |
-
src: wc_admin_settings["e" /* WC_ASSET_URL */] + 'images/klarna-black.png',
|
2963 |
-
alt: ""
|
2964 |
-
}),
|
2965 |
-
visible: ['SE', 'FI', 'NO'].includes(countryCode) && !hasCbdIndustry,
|
2966 |
-
plugins: ['klarna-checkout-for-woocommerce'],
|
2967 |
-
container: Object(external_this_wp_element_["createElement"])(klarna, {
|
2968 |
-
plugin: 'checkout'
|
2969 |
-
}),
|
2970 |
-
// @todo This should check actual Klarna connection information.
|
2971 |
-
isConfigured: activePlugins.includes('klarna-checkout-for-woocommerce'),
|
2972 |
-
isEnabled: options.woocommerce_kco_settings && options.woocommerce_kco_settings.enabled === 'yes',
|
2973 |
-
optionName: 'woocommerce_kco_settings'
|
2974 |
-
}, {
|
2975 |
-
key: 'klarna_payments',
|
2976 |
-
title: Object(external_this_wp_i18n_["__"])('Klarna Payments', 'woocommerce-admin'),
|
2977 |
-
content: Object(external_this_wp_i18n_["__"])('Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries.', 'woocommerce-admin'),
|
2978 |
-
before: Object(external_this_wp_element_["createElement"])("img", {
|
2979 |
-
src: wc_admin_settings["e" /* WC_ASSET_URL */] + 'images/klarna-black.png',
|
2980 |
-
alt: ""
|
2981 |
-
}),
|
2982 |
-
visible: ['DK', 'DE', 'AT', 'NL', 'CH', 'BE', 'SP', 'PL', 'FR', 'IT', 'GB'].includes(countryCode) && !hasCbdIndustry,
|
2983 |
-
plugins: ['klarna-payments-for-woocommerce'],
|
2984 |
-
container: Object(external_this_wp_element_["createElement"])(klarna, {
|
2985 |
-
plugin: 'payments'
|
2986 |
-
}),
|
2987 |
-
// @todo This should check actual Klarna connection information.
|
2988 |
-
isConfigured: activePlugins.includes('klarna-payments-for-woocommerce'),
|
2989 |
-
isEnabled: options.woocommerce_klarna_payments_settings && options.woocommerce_klarna_payments_settings.enabled === 'yes',
|
2990 |
-
optionName: 'woocommerce_klarna_payments_settings'
|
2991 |
-
}, {
|
2992 |
-
key: 'mollie',
|
2993 |
-
title: Object(external_this_wp_i18n_["__"])('Mollie Payments for WooCommerce', 'woocommerce-admin'),
|
2994 |
-
before: Object(external_this_wp_element_["createElement"])(mollie_MollieLogo, null),
|
2995 |
-
plugins: ['mollie-payments-for-woocommerce'],
|
2996 |
-
isConfigured: activePlugins.includes('mollie-payments-for-woocommerce'),
|
2997 |
-
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('Effortless payments by Mollie: Offer global and local payment methods, get onboarded in minutes, and supported in your language.', 'woocommerce-admin')),
|
2998 |
-
visible: ['FR', 'DE', 'GB', 'AT', 'CH', 'ES', 'IT', 'PL', 'FI', 'NL', 'BE'].includes(countryCode),
|
2999 |
-
container: Object(external_this_wp_element_["createElement"])(mollie_Mollie, null),
|
3000 |
-
isEnabled: options.woocommerce_mollie_payments_settings && options.woocommerce_mollie_payments_settings.enabled === 'yes',
|
3001 |
-
optionName: 'woocommerce_mollie_payments_settings'
|
3002 |
-
}, {
|
3003 |
-
key: 'square',
|
3004 |
-
title: Object(external_this_wp_i18n_["__"])('Square', 'woocommerce-admin'),
|
3005 |
-
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('Securely accept credit and debit cards with one low rate, no surprise fees (custom rates available). ' + 'Sell online and in store and track sales and inventory in one place.', 'woocommerce-admin'), hasCbdIndustry && Object(external_this_wp_element_["createElement"])("span", {
|
3006 |
-
className: "text-style-strong"
|
3007 |
-
}, Object(external_this_wp_i18n_["__"])(' Selling CBD products is only supported by Square.', 'woocommerce-admin'))),
|
3008 |
-
before: Object(external_this_wp_element_["createElement"])("img", {
|
3009 |
-
src: "".concat(wc_admin_settings["e" /* WC_ASSET_URL */], "images/square-black.png"),
|
3010 |
-
alt: ""
|
3011 |
-
}),
|
3012 |
-
visible: hasCbdIndustry && ['US'].includes(countryCode) || ['brick-mortar', 'brick-mortar-other'].includes(profileItems.selling_venues) && ['US', 'CA', 'JP', 'GB', 'AU'].includes(countryCode),
|
3013 |
-
plugins: ['woocommerce-square'],
|
3014 |
-
container: Object(external_this_wp_element_["createElement"])(square, null),
|
3015 |
-
isConfigured: options.wc_square_refresh_tokens && options.wc_square_refresh_tokens.length,
|
3016 |
-
isEnabled: options.woocommerce_square_credit_card_settings && options.woocommerce_square_credit_card_settings.enabled === 'yes',
|
3017 |
-
optionName: 'woocommerce_square_credit_card_settings',
|
3018 |
-
hasCbdIndustry: hasCbdIndustry
|
3019 |
-
}, {
|
3020 |
-
key: 'payfast',
|
3021 |
-
title: Object(external_this_wp_i18n_["__"])('PayFast', 'woocommerce-admin'),
|
3022 |
-
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('The PayFast extension for WooCommerce enables you to accept payments by Credit Card and EFT via one of South Africa’s most popular payment gateways. No setup fees or monthly subscription costs.', 'woocommerce-admin'), Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_i18n_["__"])('Selecting this extension will configure your store to use South African rands as the selected currency.', 'woocommerce-admin'))),
|
3023 |
-
before: Object(external_this_wp_element_["createElement"])("img", {
|
3024 |
-
src: wc_admin_settings["e" /* WC_ASSET_URL */] + 'images/payfast.png',
|
3025 |
-
alt: "PayFast logo"
|
3026 |
-
}),
|
3027 |
-
visible: ['ZA'].includes(countryCode) && !hasCbdIndustry,
|
3028 |
-
plugins: ['woocommerce-payfast-gateway'],
|
3029 |
-
container: Object(external_this_wp_element_["createElement"])(payfast, null),
|
3030 |
-
isConfigured: options.woocommerce_payfast_settings && options.woocommerce_payfast_settings.merchant_id && options.woocommerce_payfast_settings.merchant_key && options.woocommerce_payfast_settings.pass_phrase,
|
3031 |
-
isEnabled: options.woocommerce_payfast_settings && options.woocommerce_payfast_settings.enabled === 'yes',
|
3032 |
-
optionName: 'woocommerce_payfast_settings'
|
3033 |
-
}, {
|
3034 |
-
key: 'eway',
|
3035 |
-
title: Object(external_this_wp_i18n_["__"])('eWAY', 'woocommerce-admin'),
|
3036 |
-
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('The eWAY extension for WooCommerce allows you to take credit card payments directly on your store without redirecting your customers to a third party site to make payment.', 'woocommerce-admin')),
|
3037 |
-
before: Object(external_this_wp_element_["createElement"])("img", {
|
3038 |
-
src: wc_admin_settings["e" /* WC_ASSET_URL */] + 'images/eway-logo.jpg',
|
3039 |
-
alt: "eWAY logo"
|
3040 |
-
}),
|
3041 |
-
visible: ['AU', 'NZ'].includes(countryCode) && !hasCbdIndustry,
|
3042 |
-
plugins: ['woocommerce-gateway-eway'],
|
3043 |
-
container: Object(external_this_wp_element_["createElement"])(eway, null),
|
3044 |
-
isConfigured: options.woocommerce_eway_settings && options.woocommerce_eway_settings.customer_api && options.woocommerce_eway_settings.customer_password,
|
3045 |
-
isEnabled: options.woocommerce_eway_settings && options.woocommerce_eway_settings.enabled === 'yes',
|
3046 |
-
optionName: 'woocommerce_eway_settings'
|
3047 |
-
}, {
|
3048 |
-
key: 'razorpay',
|
3049 |
-
title: Object(external_this_wp_i18n_["__"])('Razorpay', 'woocommerce-admin'),
|
3050 |
-
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('The official Razorpay extension for WooCommerce allows you to accept credit cards, debit cards, netbanking, wallet, and UPI payments.', 'woocommerce-admin')),
|
3051 |
-
before: Object(external_this_wp_element_["createElement"])(razorpay, null),
|
3052 |
-
visible: countryCode === 'IN' && !hasCbdIndustry,
|
3053 |
-
plugins: ['woo-razorpay'],
|
3054 |
-
container: Object(external_this_wp_element_["createElement"])(payments_razorpay, null),
|
3055 |
-
isConfigured: options.woocommerce_razorpay_settings && options.woocommerce_razorpay_settings.key_id && options.woocommerce_razorpay_settings.key_secret,
|
3056 |
-
isEnabled: options.woocommerce_razorpay_settings && options.woocommerce_razorpay_settings.enabled === 'yes',
|
3057 |
-
optionName: 'woocommerce_razorpay_settings'
|
3058 |
-
}, {
|
3059 |
-
key: 'payubiz',
|
3060 |
-
title: Object(external_this_wp_i18n_["__"])('PayU for WooCommerce', 'woocommerce-admin'),
|
3061 |
-
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('Enable PayU’s exclusive plugin for WooCommerce to start accepting payments in 100+ payment methods available in India including credit cards, debit cards, UPI, & more!', 'woocommerce-admin')),
|
3062 |
-
before: Object(external_this_wp_element_["createElement"])(payu_india_PayUIndiaLogo, null),
|
3063 |
-
visible: countryCode === 'IN' && !hasCbdIndustry,
|
3064 |
-
plugins: ['payu-india'],
|
3065 |
-
container: Object(external_this_wp_element_["createElement"])(payu_india_PayUIndia, null),
|
3066 |
-
isConfigured: activePlugins.includes('payu-india'),
|
3067 |
-
isEnabled: enabledPaymentGateways.includes('payubiz'),
|
3068 |
-
optionName: 'woocommerce_payubiz_settings'
|
3069 |
-
}, {
|
3070 |
-
key: 'cod',
|
3071 |
-
title: Object(external_this_wp_i18n_["__"])('Cash on delivery', 'woocommerce-admin'),
|
3072 |
-
content: Object(external_this_wp_i18n_["__"])('Take payments in cash upon delivery.', 'woocommerce-admin'),
|
3073 |
-
before: Object(external_this_wp_element_["createElement"])(cod, null),
|
3074 |
-
visible: !hasCbdIndustry,
|
3075 |
-
isEnabled: options.woocommerce_cod_settings && options.woocommerce_cod_settings.enabled === 'yes',
|
3076 |
-
optionName: 'woocommerce_cod_settings'
|
3077 |
-
}, {
|
3078 |
-
key: 'bacs',
|
3079 |
-
title: Object(external_this_wp_i18n_["__"])('Direct bank transfer', 'woocommerce-admin'),
|
3080 |
-
content: Object(external_this_wp_i18n_["__"])('Take payments via bank transfer.', 'woocommerce-admin'),
|
3081 |
-
before: Object(external_this_wp_element_["createElement"])(images_bacs, null),
|
3082 |
-
visible: !hasCbdIndustry,
|
3083 |
-
container: Object(external_this_wp_element_["createElement"])(bacs, null),
|
3084 |
-
isConfigured: options.woocommerce_bacs_accounts && options.woocommerce_bacs_accounts.length,
|
3085 |
-
isEnabled: options.woocommerce_bacs_settings && options.woocommerce_bacs_settings.enabled === 'yes',
|
3086 |
-
optionName: 'woocommerce_bacs_settings'
|
3087 |
-
}];
|
3088 |
-
|
3089 |
-
if (window.wcAdminFeatures.wcpay) {
|
3090 |
-
var tosLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
3091 |
-
href: 'https://wordpress.com/tos/',
|
3092 |
-
target: "_blank",
|
3093 |
-
type: "external"
|
3094 |
-
});
|
3095 |
-
var tosPrompt = lib_default()({
|
3096 |
-
mixedString: Object(external_this_wp_i18n_["__"])('By clicking "Set up," you agree to the {{link}}Terms of Service{{/link}}', 'woocommerce-admin'),
|
3097 |
-
components: {
|
3098 |
-
link: tosLink
|
3099 |
-
}
|
3100 |
-
});
|
3101 |
-
var wcPayDocLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
3102 |
-
href: 'https://docs.woocommerce.com/document/payments/testing/dev-mode/',
|
3103 |
-
target: "_blank",
|
3104 |
-
type: "external"
|
3105 |
-
});
|
3106 |
-
var wcPayDocPrompt = lib_default()({
|
3107 |
-
mixedString: Object(external_this_wp_i18n_["__"])('Setting up a store for a client? {{link}}Start here{{/link}}', 'woocommerce-admin'),
|
3108 |
-
components: {
|
3109 |
-
link: wcPayDocLink
|
3110 |
-
}
|
3111 |
-
});
|
3112 |
-
var wcPaySettingsLink = Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Link"], {
|
3113 |
-
href: Object(wc_admin_settings["f" /* getAdminLink */])('admin.php?page=wc-settings&tab=checkout§ion=woocommerce_payments'),
|
3114 |
-
type: "wp-admin"
|
3115 |
-
}, Object(external_this_wp_i18n_["__"])('Settings', 'woocommerce-admin'));
|
3116 |
-
methods.unshift({
|
3117 |
-
key: 'wcpay',
|
3118 |
-
title: Object(external_this_wp_i18n_["__"])('WooCommerce Payments', 'woocommerce-admin'),
|
3119 |
-
content: Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, Object(external_this_wp_i18n_["__"])('Accept credit card payments the easy way! No setup fees. No ' + 'monthly fees. Just 2.9% + $0.30 per transaction ' + 'on U.S. issued cards. ', 'woocommerce-admin'), wcPayIsConnected && wcPaySettingsLink, !wcPayIsConnected && Object(external_this_wp_element_["createElement"])("p", null, tosPrompt), profileItems.setup_client && Object(external_this_wp_element_["createElement"])("p", null, wcPayDocPrompt), Object(external_this_wp_element_["createElement"])(wcpay_usage_modal["default"], null)),
|
3120 |
-
before: Object(external_this_wp_element_["createElement"])(wcpay, null),
|
3121 |
-
onClick: function onClick(resolve, reject) {
|
3122 |
-
return installActivateAndConnectWcpay(resolve, reject, createNotice, installAndActivatePlugins);
|
3123 |
-
},
|
3124 |
-
visible: ['US', 'PR'].includes(countryCode) && !hasCbdIndustry,
|
3125 |
-
plugins: ['woocommerce-payments'],
|
3126 |
-
container: Object(external_this_wp_element_["createElement"])(payments_wcpay, null),
|
3127 |
-
isConfigured: wcPayIsConnected,
|
3128 |
-
isEnabled: options.woocommerce_woocommerce_payments_settings && options.woocommerce_woocommerce_payments_settings.enabled === 'yes',
|
3129 |
-
optionName: 'woocommerce_woocommerce_payments_settings'
|
3130 |
});
|
3131 |
}
|
3132 |
|
3133 |
-
|
3134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3135 |
});
|
3136 |
-
}
|
|
|
|
|
|
|
|
|
3137 |
|
3138 |
/***/ }),
|
3139 |
|
3140 |
-
/***/
|
3141 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
3142 |
|
3143 |
"use strict";
|
3144 |
-
__webpack_require__.
|
3145 |
-
/* harmony
|
3146 |
-
/* harmony
|
3147 |
-
/* harmony import */ var
|
3148 |
-
/* harmony import */ var
|
3149 |
-
/* harmony import */ var
|
3150 |
-
/* harmony import */ var
|
3151 |
-
/* harmony import */ var
|
3152 |
-
/* harmony import */ var
|
3153 |
-
/* harmony import */ var interpolate_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28);
|
3154 |
-
/* harmony import */ var interpolate_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(interpolate_components__WEBPACK_IMPORTED_MODULE_4__);
|
3155 |
-
/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47);
|
3156 |
-
/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_components__WEBPACK_IMPORTED_MODULE_5__);
|
3157 |
-
/* harmony import */ var _profile_wizard_steps_usage_modal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(509);
|
3158 |
-
|
3159 |
-
|
3160 |
-
|
3161 |
/**
|
3162 |
* External dependencies
|
3163 |
*/
|
3164 |
|
3165 |
|
3166 |
|
3167 |
-
|
3168 |
-
|
3169 |
/**
|
3170 |
* Internal dependencies
|
3171 |
*/
|
3172 |
|
3173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3174 |
|
3175 |
-
|
3176 |
-
|
3177 |
-
|
3178 |
-
|
3179 |
-
var _useState = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useState"])(shouldDisplayModal),
|
3180 |
-
_useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),
|
3181 |
-
isOpen = _useState2[0],
|
3182 |
-
setIsOpen = _useState2[1];
|
3183 |
-
|
3184 |
-
if (!isOpen) {
|
3185 |
-
return null;
|
3186 |
-
}
|
3187 |
-
|
3188 |
-
var closeModal = function closeModal() {
|
3189 |
-
setIsOpen(false);
|
3190 |
-
Object(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_3__["updateQueryString"])({
|
3191 |
-
'wcpay-connection-success': undefined
|
3192 |
-
});
|
3193 |
-
};
|
3194 |
-
|
3195 |
-
var title = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Help us build a better WooCommerce Payments experience', 'woocommerce-admin');
|
3196 |
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
type: "external"
|
3204 |
-
})
|
3205 |
}
|
3206 |
-
}
|
3207 |
-
|
3208 |
-
|
3209 |
-
title: title,
|
3210 |
-
message: trackingMessage,
|
3211 |
-
acceptActionText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('I agree', 'woocommerce-admin'),
|
3212 |
-
dismissActionText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('No thanks', 'woocommerce-admin'),
|
3213 |
-
onContinue: closeModal,
|
3214 |
-
onClose: closeModal
|
3215 |
-
});
|
3216 |
-
};
|
3217 |
-
|
3218 |
-
/* harmony default export */ __webpack_exports__["default"] = (WCPayUsageModal);
|
3219 |
|
3220 |
/***/ })
|
3221 |
|
1 |
(window["__wcAdmin_webpackJsonp"] = window["__wcAdmin_webpackJsonp"] || []).push([[6],{
|
2 |
|
3 |
+
/***/ 500:
|
4 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
5 |
|
6 |
"use strict";
|
7 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getRequestByIdString; });
|
8 |
+
/* unused harmony export getAttributeLabels */
|
9 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getCategoryLabels; });
|
10 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getCouponLabels; });
|
11 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getCustomerLabels; });
|
12 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getProductLabels; });
|
13 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getTaxRateLabels; });
|
14 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getVariationName; });
|
15 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getVariationLabels; });
|
16 |
+
/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);
|
17 |
+
/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_0__);
|
18 |
+
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26);
|
19 |
+
/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__);
|
20 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
|
21 |
+
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
|
22 |
+
/* harmony import */ var _woocommerce_navigation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21);
|
23 |
+
/* harmony import */ var _woocommerce_navigation__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_3__);
|
24 |
+
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22);
|
25 |
+
/* harmony import */ var _woocommerce_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_data__WEBPACK_IMPORTED_MODULE_4__);
|
26 |
+
/* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25);
|
27 |
+
/* harmony import */ var _analytics_report_taxes_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(501);
|
28 |
/**
|
29 |
* External dependencies
|
30 |
*/
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
|
|
|
|
|
|
|
|
37 |
/**
|
38 |
+
* Internal dependencies
|
39 |
*/
|
40 |
|
41 |
|
42 |
+
/**
|
43 |
+
* Get a function that accepts ids as they are found in url parameter and
|
44 |
+
* returns a promise with an optional method applied to results
|
45 |
+
*
|
46 |
+
* @param {string|Function} path - api path string or a function of the query returning api path string
|
47 |
+
* @param {Function} [handleData] - function applied to each iteration of data
|
48 |
+
* @return {Function} - a function of ids returning a promise
|
49 |
+
*/
|
50 |
|
51 |
+
function getRequestByIdString(path) {
|
52 |
+
var handleData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : lodash__WEBPACK_IMPORTED_MODULE_2__["identity"];
|
53 |
+
return function () {
|
54 |
+
var queryString = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
55 |
+
var query = arguments.length > 1 ? arguments[1] : undefined;
|
56 |
+
var pathString = typeof path === 'function' ? path(query) : path;
|
57 |
+
var idList = Object(_woocommerce_navigation__WEBPACK_IMPORTED_MODULE_3__["getIdsFromQuery"])(queryString);
|
58 |
|
59 |
+
if (idList.length < 1) {
|
60 |
+
return Promise.resolve([]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
+
var payload = {
|
64 |
+
include: idList.join(','),
|
65 |
+
per_page: idList.length
|
66 |
+
};
|
67 |
+
return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
|
68 |
+
path: Object(_wordpress_url__WEBPACK_IMPORTED_MODULE_0__["addQueryArgs"])(pathString, payload)
|
69 |
+
}).then(function (data) {
|
70 |
+
return data.map(handleData);
|
71 |
+
});
|
72 |
+
};
|
73 |
+
}
|
74 |
+
var getAttributeLabels = getRequestByIdString(_woocommerce_data__WEBPACK_IMPORTED_MODULE_4__["NAMESPACE"] + '/products/attributes', function (attribute) {
|
75 |
+
return {
|
76 |
+
key: attribute.id,
|
77 |
+
label: attribute.name
|
78 |
+
};
|
79 |
+
});
|
80 |
+
var getCategoryLabels = getRequestByIdString(_woocommerce_data__WEBPACK_IMPORTED_MODULE_4__["NAMESPACE"] + '/products/categories', function (category) {
|
81 |
+
return {
|
82 |
+
key: category.id,
|
83 |
+
label: category.name
|
84 |
+
};
|
85 |
+
});
|
86 |
+
var getCouponLabels = getRequestByIdString(_woocommerce_data__WEBPACK_IMPORTED_MODULE_4__["NAMESPACE"] + '/coupons', function (coupon) {
|
87 |
+
return {
|
88 |
+
key: coupon.id,
|
89 |
+
label: coupon.code
|
90 |
+
};
|
91 |
+
});
|
92 |
+
var getCustomerLabels = getRequestByIdString(_woocommerce_data__WEBPACK_IMPORTED_MODULE_4__["NAMESPACE"] + '/customers', function (customer) {
|
93 |
+
return {
|
94 |
+
key: customer.id,
|
95 |
+
label: customer.name
|
96 |
+
};
|
97 |
+
});
|
98 |
+
var getProductLabels = getRequestByIdString(_woocommerce_data__WEBPACK_IMPORTED_MODULE_4__["NAMESPACE"] + '/products', function (product) {
|
99 |
+
return {
|
100 |
+
key: product.id,
|
101 |
+
label: product.name
|
102 |
+
};
|
103 |
+
});
|
104 |
+
var getTaxRateLabels = getRequestByIdString(_woocommerce_data__WEBPACK_IMPORTED_MODULE_4__["NAMESPACE"] + '/taxes', function (taxRate) {
|
105 |
+
return {
|
106 |
+
key: taxRate.id,
|
107 |
+
label: Object(_analytics_report_taxes_utils__WEBPACK_IMPORTED_MODULE_6__[/* getTaxCode */ "a"])(taxRate)
|
108 |
+
};
|
109 |
+
});
|
110 |
+
/**
|
111 |
+
* Create a variation name by concatenating each of the variation's
|
112 |
+
* attribute option strings.
|
113 |
+
*
|
114 |
+
* @param {Object} variation - variation returned by the api
|
115 |
+
* @param {Array} variation.attributes - attribute objects, with option property.
|
116 |
+
* @param {string} variation.name - name of variation.
|
117 |
+
* @return {string} - formatted variation name
|
118 |
+
*/
|
119 |
|
120 |
+
function getVariationName(_ref) {
|
121 |
+
var attributes = _ref.attributes,
|
122 |
+
name = _ref.name;
|
123 |
+
var separator = Object(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_5__[/* getSetting */ "g"])('variationTitleAttributesSeparator', ' - ');
|
124 |
|
125 |
+
if (name.indexOf(separator) > -1) {
|
126 |
+
return name;
|
127 |
+
}
|
|
|
|
|
128 |
|
129 |
+
var attributeList = attributes.map(function (_ref2) {
|
130 |
+
var option = _ref2.option;
|
131 |
+
return option;
|
132 |
+
}).join(', ');
|
133 |
+
return attributeList ? name + separator + attributeList : name;
|
134 |
+
}
|
135 |
+
var getVariationLabels = getRequestByIdString(function (_ref3) {
|
136 |
+
var products = _ref3.products;
|
|
|
|
|
|
|
137 |
|
138 |
+
// If a product was specified, get just its variations.
|
139 |
+
if (products) {
|
140 |
+
return _woocommerce_data__WEBPACK_IMPORTED_MODULE_4__["NAMESPACE"] + "/products/".concat(products, "/variations");
|
141 |
+
}
|
142 |
|
143 |
+
return _woocommerce_data__WEBPACK_IMPORTED_MODULE_4__["NAMESPACE"] + '/variations';
|
144 |
+
}, function (variation) {
|
145 |
return {
|
146 |
+
key: variation.id,
|
147 |
+
label: getVariationName(variation)
|
148 |
};
|
149 |
+
});
|
150 |
|
151 |
/***/ }),
|
152 |
|
153 |
+
/***/ 501:
|
154 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
155 |
|
156 |
"use strict";
|
157 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getTaxCode; });
|
158 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
159 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
160 |
+
/**
|
161 |
+
* External dependencies
|
162 |
+
*/
|
163 |
|
164 |
+
function getTaxCode(tax) {
|
165 |
+
return [tax.country, tax.state, tax.name || Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('TAX', 'woocommerce-admin'), tax.priority].map(function (item) {
|
166 |
+
return item.toString().toUpperCase().trim();
|
167 |
+
}).filter(Boolean).join('-');
|
168 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
+
/***/ }),
|
|
|
171 |
|
172 |
+
/***/ 502:
|
173 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
174 |
|
175 |
+
"use strict";
|
|
|
|
|
176 |
|
177 |
+
// UNUSED EXPORTS: ReportChart
|
|
|
|
|
178 |
|
179 |
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
|
180 |
+
var defineProperty = __webpack_require__(5);
|
181 |
+
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
|
182 |
|
183 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
|
184 |
var classCallCheck = __webpack_require__(12);
|
188 |
var createClass = __webpack_require__(13);
|
189 |
var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
|
190 |
|
|
|
|
|
|
|
|
|
191 |
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js
|
192 |
var inherits = __webpack_require__(14);
|
193 |
var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);
|
200 |
var getPrototypeOf = __webpack_require__(7);
|
201 |
var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf);
|
202 |
|
203 |
+
// EXTERNAL MODULE: external {"this":["wp","element"]}
|
204 |
+
var external_this_wp_element_ = __webpack_require__(0);
|
|
|
205 |
|
206 |
+
// EXTERNAL MODULE: external {"this":["wp","i18n"]}
|
207 |
+
var external_this_wp_i18n_ = __webpack_require__(2);
|
208 |
|
209 |
// EXTERNAL MODULE: external {"this":["wp","compose"]}
|
210 |
var external_this_wp_compose_ = __webpack_require__(20);
|
211 |
|
212 |
+
// EXTERNAL MODULE: external {"this":["wp","date"]}
|
213 |
+
var external_this_wp_date_ = __webpack_require__(75);
|
214 |
+
|
215 |
// EXTERNAL MODULE: external {"this":["wp","data"]}
|
216 |
var external_this_wp_data_ = __webpack_require__(11);
|
217 |
|
218 |
+
// EXTERNAL MODULE: external "lodash"
|
219 |
+
var external_lodash_ = __webpack_require__(3);
|
|
|
|
|
|
|
|
|
|
|
220 |
|
221 |
+
// EXTERNAL MODULE: ./node_modules/prop-types/index.js
|
222 |
+
var prop_types = __webpack_require__(1);
|
223 |
+
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
224 |
|
225 |
+
// EXTERNAL MODULE: external {"this":["wc","components"]}
|
226 |
+
var external_this_wc_components_ = __webpack_require__(47);
|
227 |
|
228 |
+
// EXTERNAL MODULE: external {"this":["wc","data"]}
|
229 |
+
var external_this_wc_data_ = __webpack_require__(22);
|
230 |
|
231 |
+
// EXTERNAL MODULE: external {"this":["wc","date"]}
|
232 |
+
var external_this_wc_date_ = __webpack_require__(29);
|
233 |
|
234 |
+
// EXTERNAL MODULE: ./client/lib/currency-context.js
|
235 |
+
var currency_context = __webpack_require__(498);
|
236 |
|
237 |
+
// EXTERNAL MODULE: ./client/analytics/components/report-error/index.js
|
238 |
+
var report_error = __webpack_require__(499);
|
239 |
|
240 |
+
// EXTERNAL MODULE: external {"this":["wc","navigation"]}
|
241 |
+
var external_this_wc_navigation_ = __webpack_require__(21);
|
242 |
|
243 |
+
// CONCATENATED MODULE: ./client/analytics/components/report-chart/utils.js
|
244 |
/**
|
245 |
* External dependencies
|
246 |
*/
|
247 |
|
248 |
|
249 |
+
var DEFAULT_FILTER = 'all';
|
250 |
+
function getSelectedFilter(filters, query) {
|
251 |
+
var selectedFilterArgs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
252 |
|
253 |
+
if (!filters || filters.length === 0) {
|
254 |
+
return null;
|
255 |
+
}
|
256 |
|
257 |
+
var clonedFilters = filters.slice(0);
|
258 |
+
var filterConfig = clonedFilters.pop();
|
259 |
|
260 |
+
if (filterConfig.showFilters(query, selectedFilterArgs)) {
|
261 |
+
var allFilters = Object(external_this_wc_navigation_["flattenFilters"])(filterConfig.filters);
|
262 |
+
var value = query[filterConfig.param] || filterConfig.defaultValue || DEFAULT_FILTER;
|
263 |
+
return Object(external_lodash_["find"])(allFilters, {
|
264 |
+
value: value
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
}
|
267 |
|
268 |
+
return getSelectedFilter(clonedFilters, query, selectedFilterArgs);
|
269 |
+
}
|
270 |
+
function getChartMode(selectedFilter, query) {
|
271 |
+
if (selectedFilter && query) {
|
272 |
+
var selectedFilterParam = Object(external_lodash_["get"])(selectedFilter, ['settings', 'param']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
|
274 |
+
if (!selectedFilterParam || Object.keys(query).includes(selectedFilterParam)) {
|
275 |
+
return Object(external_lodash_["get"])(selectedFilter, ['chartMode']);
|
276 |
+
}
|
277 |
+
}
|
278 |
|
279 |
+
return null;
|
280 |
+
}
|
281 |
+
// CONCATENATED MODULE: ./client/analytics/components/report-chart/index.js
|
282 |
|
283 |
|
284 |
|
291 |
|
292 |
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
293 |
|
294 |
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
|
295 |
|
296 |
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
297 |
|
298 |
/**
|
299 |
* External dependencies
|
308 |
|
309 |
|
310 |
|
311 |
+
/**
|
312 |
+
* Internal dependencies
|
313 |
+
*/
|
314 |
|
315 |
|
|
|
|
|
|
|
|
|
316 |
|
|
|
|
|
317 |
|
318 |
+
/**
|
319 |
+
* Component that renders the chart in reports.
|
320 |
+
*/
|
321 |
|
322 |
+
var report_chart_ReportChart = /*#__PURE__*/function (_Component) {
|
323 |
+
inherits_default()(ReportChart, _Component);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
|
325 |
+
var _super = _createSuper(ReportChart);
|
|
|
|
|
|
|
|
|
|
|
326 |
|
327 |
+
function ReportChart() {
|
328 |
+
classCallCheck_default()(this, ReportChart);
|
329 |
|
330 |
+
return _super.apply(this, arguments);
|
331 |
+
}
|
|
|
|
|
|
|
332 |
|
333 |
+
createClass_default()(ReportChart, [{
|
334 |
+
key: "shouldComponentUpdate",
|
335 |
+
value: function shouldComponentUpdate(nextProps) {
|
336 |
+
if (nextProps.isRequesting !== this.props.isRequesting || nextProps.primaryData.isRequesting !== this.props.primaryData.isRequesting || nextProps.secondaryData.isRequesting !== this.props.secondaryData.isRequesting || !Object(external_lodash_["isEqual"])(nextProps.query, this.props.query)) {
|
337 |
+
return true;
|
338 |
}
|
|
|
|
|
|
|
|
|
|
|
339 |
|
340 |
+
return false;
|
|
|
|
|
341 |
}
|
342 |
}, {
|
343 |
+
key: "getItemChartData",
|
344 |
+
value: function getItemChartData() {
|
345 |
var _this$props = this.props,
|
346 |
+
primaryData = _this$props.primaryData,
|
347 |
+
selectedChart = _this$props.selectedChart;
|
348 |
+
var chartData = primaryData.data.intervals.map(function (interval) {
|
349 |
+
var intervalData = {};
|
350 |
+
interval.subtotals.segments.forEach(function (segment) {
|
351 |
+
if (segment.segment_label) {
|
352 |
+
var label = intervalData[segment.segment_label] ? segment.segment_label + ' (#' + segment.segment_id + ')' : segment.segment_label;
|
353 |
+
intervalData[segment.segment_id] = {
|
354 |
+
label: label,
|
355 |
+
value: segment.subtotals[selectedChart.key] || 0
|
356 |
+
};
|
357 |
+
}
|
358 |
+
});
|
359 |
+
return _objectSpread({
|
360 |
+
date: Object(external_this_wp_date_["format"])('Y-m-d\\TH:i:s', interval.date_start)
|
361 |
+
}, intervalData);
|
362 |
});
|
363 |
+
return chartData;
|
|
|
364 |
}
|
365 |
}, {
|
366 |
+
key: "getTimeChartData",
|
367 |
+
value: function getTimeChartData() {
|
368 |
+
var _this$props2 = this.props,
|
369 |
+
query = _this$props2.query,
|
370 |
+
primaryData = _this$props2.primaryData,
|
371 |
+
secondaryData = _this$props2.secondaryData,
|
372 |
+
selectedChart = _this$props2.selectedChart,
|
373 |
+
defaultDateRange = _this$props2.defaultDateRange;
|
374 |
+
var currentInterval = Object(external_this_wc_date_["getIntervalForQuery"])(query);
|
375 |
+
|
376 |
+
var _getCurrentDates = Object(external_this_wc_date_["getCurrentDates"])(query, defaultDateRange),
|
377 |
+
primary = _getCurrentDates.primary,
|
378 |
+
secondary = _getCurrentDates.secondary;
|
379 |
+
|
380 |
+
var chartData = primaryData.data.intervals.map(function (interval, index) {
|
381 |
+
var secondaryDate = Object(external_this_wc_date_["getPreviousDate"])(interval.date_start, primary.after, secondary.after, query.compare, currentInterval);
|
382 |
+
var secondaryInterval = secondaryData.data.intervals[index];
|
383 |
+
return {
|
384 |
+
date: Object(external_this_wp_date_["format"])('Y-m-d\\TH:i:s', interval.date_start),
|
385 |
+
primary: {
|
386 |
+
label: "".concat(primary.label, " (").concat(primary.range, ")"),
|
387 |
+
labelDate: interval.date_start,
|
388 |
+
value: interval.subtotals[selectedChart.key] || 0
|
389 |
+
},
|
390 |
+
secondary: {
|
391 |
+
label: "".concat(secondary.label, " (").concat(secondary.range, ")"),
|
392 |
+
labelDate: secondaryDate.format('YYYY-MM-DD HH:mm:ss'),
|
393 |
+
value: secondaryInterval && secondaryInterval.subtotals[selectedChart.key] || 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
}
|
395 |
+
};
|
396 |
+
});
|
397 |
+
return chartData;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
}
|
399 |
}, {
|
400 |
+
key: "getTimeChartTotals",
|
401 |
+
value: function getTimeChartTotals() {
|
402 |
+
var _this$props3 = this.props,
|
403 |
+
primaryData = _this$props3.primaryData,
|
404 |
+
secondaryData = _this$props3.secondaryData,
|
405 |
+
selectedChart = _this$props3.selectedChart;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
return {
|
407 |
+
primary: Object(external_lodash_["get"])(primaryData, ['data', 'totals', selectedChart.key], null),
|
408 |
+
secondary: Object(external_lodash_["get"])(secondaryData, ['data', 'totals', selectedChart.key], null)
|
409 |
};
|
410 |
}
|
411 |
}, {
|
412 |
+
key: "renderChart",
|
413 |
+
value: function renderChart(mode, isRequesting, chartData, legendTotals) {
|
414 |
+
var _this$props4 = this.props,
|
415 |
+
emptySearchResults = _this$props4.emptySearchResults,
|
416 |
+
filterParam = _this$props4.filterParam,
|
417 |
+
interactiveLegend = _this$props4.interactiveLegend,
|
418 |
+
itemsLabel = _this$props4.itemsLabel,
|
419 |
+
legendPosition = _this$props4.legendPosition,
|
420 |
+
path = _this$props4.path,
|
421 |
+
query = _this$props4.query,
|
422 |
+
selectedChart = _this$props4.selectedChart,
|
423 |
+
showHeaderControls = _this$props4.showHeaderControls,
|
424 |
+
primaryData = _this$props4.primaryData;
|
425 |
+
var currentInterval = Object(external_this_wc_date_["getIntervalForQuery"])(query);
|
426 |
+
var allowedIntervals = Object(external_this_wc_date_["getAllowedIntervalsForQuery"])(query);
|
427 |
+
var formats = Object(external_this_wc_date_["getDateFormatsForInterval"])(currentInterval, primaryData.data.intervals.length);
|
428 |
+
var emptyMessage = emptySearchResults ? Object(external_this_wp_i18n_["__"])('No data for the current search', 'woocommerce-admin') : Object(external_this_wp_i18n_["__"])('No data for the selected date range', 'woocommerce-admin');
|
429 |
+
var _this$context = this.context,
|
430 |
+
formatAmount = _this$context.formatAmount,
|
431 |
+
getCurrencyConfig = _this$context.getCurrencyConfig;
|
432 |
+
return Object(external_this_wp_element_["createElement"])(external_this_wc_components_["Chart"], {
|
433 |
+
allowedIntervals: allowedIntervals,
|
434 |
+
data: chartData,
|
435 |
+
dateParser: '%Y-%m-%dT%H:%M:%S',
|
436 |
+
emptyMessage: emptyMessage,
|
437 |
+
filterParam: filterParam,
|
438 |
+
interactiveLegend: interactiveLegend,
|
439 |
+
interval: currentInterval,
|
440 |
+
isRequesting: isRequesting,
|
441 |
+
itemsLabel: itemsLabel,
|
442 |
+
legendPosition: legendPosition,
|
443 |
+
legendTotals: legendTotals,
|
444 |
+
mode: mode,
|
445 |
+
path: path,
|
446 |
+
query: query,
|
447 |
+
screenReaderFormat: formats.screenReaderFormat,
|
448 |
+
showHeaderControls: showHeaderControls,
|
449 |
+
title: selectedChart.label,
|
450 |
+
tooltipLabelFormat: formats.tooltipLabelFormat,
|
451 |
+
tooltipTitle: mode === 'time-comparison' && selectedChart.label || null,
|
452 |
+
tooltipValueFormat: Object(external_this_wc_data_["getTooltipValueFormat"])(selectedChart.type, formatAmount),
|
453 |
+
chartType: Object(external_this_wc_date_["getChartTypeForQuery"])(query),
|
454 |
+
valueType: selectedChart.type,
|
455 |
+
xFormat: formats.xFormat,
|
456 |
+
x2Format: formats.x2Format,
|
457 |
+
currency: getCurrencyConfig()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
});
|
|
|
459 |
}
|
460 |
}, {
|
461 |
+
key: "renderItemComparison",
|
462 |
+
value: function renderItemComparison() {
|
463 |
+
var _this$props5 = this.props,
|
464 |
+
isRequesting = _this$props5.isRequesting,
|
465 |
+
primaryData = _this$props5.primaryData;
|
|
|
|
|
|
|
|
|
|
|
466 |
|
467 |
+
if (primaryData.isError) {
|
468 |
+
return Object(external_this_wp_element_["createElement"])(report_error["a" /* default */], {
|
469 |
+
isError: true
|
470 |
+
});
|
471 |
}
|
472 |
|
473 |
+
var isChartRequesting = isRequesting || primaryData.isRequesting;
|
474 |
+
var chartData = this.getItemChartData();
|
475 |
+
return this.renderChart('item-comparison', isChartRequesting, chartData);
|
476 |
+
}
|
477 |
+
}, {
|
478 |
+
key: "renderTimeComparison",
|
479 |
+
value: function renderTimeComparison() {
|
480 |
+
var _this$props6 = this.props,
|
481 |
+
isRequesting = _this$props6.isRequesting,
|
482 |
+
primaryData = _this$props6.primaryData,
|
483 |
+
secondaryData = _this$props6.secondaryData;
|
484 |
+
|
485 |
+
if (!primaryData || primaryData.isError || secondaryData.isError) {
|
486 |
+
return Object(external_this_wp_element_["createElement"])(report_error["a" /* default */], {
|
487 |
+
isError: true
|
488 |
});
|
489 |
}
|
490 |
|
491 |
+
var isChartRequesting = isRequesting || primaryData.isRequesting || secondaryData.isRequesting;
|
492 |
+
var chartData = this.getTimeChartData();
|
493 |
+
var legendTotals = this.getTimeChartTotals();
|
494 |
+
return this.renderChart('time-comparison', isChartRequesting, chartData, legendTotals);
|
495 |
}
|
496 |
}, {
|
497 |
key: "render",
|
498 |
value: function render() {
|
499 |
+
var mode = this.props.mode;
|
500 |
+
|
501 |
+
if (mode === 'item-comparison') {
|
502 |
+
return this.renderItemComparison();
|
503 |
+
}
|
504 |
+
|
505 |
+
return this.renderTimeComparison();
|
|
|
|
|
|
|
506 |
}
|
507 |
}]);
|
508 |
|
509 |
+
return ReportChart;
|
510 |
}(external_this_wp_element_["Component"]);
|
511 |
+
report_chart_ReportChart.contextType = currency_context["a" /* CurrencyContext */];
|
512 |
+
report_chart_ReportChart.propTypes = {
|
513 |
+
/**
|
514 |
+
* Filters available for that report.
|
515 |
+
*/
|
516 |
+
filters: prop_types_default.a.array,
|
517 |
+
|
518 |
+
/**
|
519 |
+
* Whether there is an API call running.
|
520 |
+
*/
|
521 |
+
isRequesting: prop_types_default.a.bool,
|
522 |
+
|
523 |
+
/**
|
524 |
+
* Label describing the legend items.
|
525 |
+
*/
|
526 |
+
itemsLabel: prop_types_default.a.string,
|
527 |
+
|
528 |
+
/**
|
529 |
+
* Allows specifying properties different from the `endpoint` that will be used
|
530 |
+
* to limit the items when there is an active search.
|
531 |
+
*/
|
532 |
+
limitProperties: prop_types_default.a.array,
|
533 |
+
|
534 |
+
/**
|
535 |
+
* `items-comparison` (default) or `time-comparison`, this is used to generate correct
|
536 |
+
* ARIA properties.
|
537 |
+
*/
|
538 |
+
mode: prop_types_default.a.string,
|
539 |
+
|
540 |
+
/**
|
541 |
+
* Current path
|
542 |
+
*/
|
543 |
+
path: prop_types_default.a.string.isRequired,
|
544 |
+
|
545 |
+
/**
|
546 |
+
* Primary data to display in the chart.
|
547 |
+
*/
|
548 |
+
primaryData: prop_types_default.a.object,
|
549 |
+
|
550 |
+
/**
|
551 |
+
* The query string represented in object form.
|
552 |
+
*/
|
553 |
+
query: prop_types_default.a.object.isRequired,
|
554 |
+
|
555 |
+
/**
|
556 |
+
* Secondary data to display in the chart.
|
557 |
+
*/
|
558 |
+
secondaryData: prop_types_default.a.object,
|
559 |
+
|
560 |
+
/**
|
561 |
+
* Properties of the selected chart.
|
562 |
+
*/
|
563 |
+
selectedChart: prop_types_default.a.shape({
|
564 |
+
/**
|
565 |
+
* Key of the selected chart.
|
566 |
+
*/
|
567 |
+
key: prop_types_default.a.string.isRequired,
|
568 |
+
|
569 |
+
/**
|
570 |
+
* Chart label.
|
571 |
+
*/
|
572 |
+
label: prop_types_default.a.string.isRequired,
|
573 |
+
|
574 |
+
/**
|
575 |
+
* Order query argument.
|
576 |
+
*/
|
577 |
+
order: prop_types_default.a.oneOf(['asc', 'desc']),
|
578 |
+
|
579 |
+
/**
|
580 |
+
* Order by query argument.
|
581 |
+
*/
|
582 |
+
orderby: prop_types_default.a.string,
|
583 |
+
|
584 |
+
/**
|
585 |
+
* Number type for formatting.
|
586 |
+
*/
|
587 |
+
type: prop_types_default.a.oneOf(['average', 'number', 'currency']).isRequired
|
588 |
+
}).isRequired
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
};
|
590 |
+
report_chart_ReportChart.defaultProps = {
|
591 |
+
isRequesting: false,
|
592 |
+
primaryData: {
|
593 |
+
data: {
|
594 |
+
intervals: []
|
595 |
+
},
|
596 |
+
isError: false,
|
597 |
+
isRequesting: false
|
598 |
+
},
|
599 |
+
secondaryData: {
|
600 |
+
data: {
|
601 |
+
intervals: []
|
602 |
+
},
|
603 |
+
isError: false,
|
604 |
+
isRequesting: false
|
605 |
}
|
|
|
|
|
606 |
};
|
607 |
+
/* harmony default export */ var report_chart = __webpack_exports__["a"] = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select, props) {
|
608 |
+
var charts = props.charts,
|
609 |
+
endpoint = props.endpoint,
|
610 |
+
filters = props.filters,
|
611 |
+
isRequesting = props.isRequesting,
|
612 |
+
limitProperties = props.limitProperties,
|
613 |
+
query = props.query,
|
614 |
+
advancedFilters = props.advancedFilters;
|
615 |
+
var limitBy = limitProperties || [endpoint];
|
616 |
+
var selectedFilter = getSelectedFilter(filters, query);
|
617 |
+
var filterParam = Object(external_lodash_["get"])(selectedFilter, ['settings', 'param']);
|
618 |
+
var chartMode = props.mode || getChartMode(selectedFilter, query) || 'time-comparison';
|
619 |
+
|
620 |
+
var _select$getSetting = select(external_this_wc_data_["SETTINGS_STORE_NAME"]).getSetting('wc_admin', 'wcAdminSettings'),
|
621 |
+
defaultDateRange = _select$getSetting.woocommerce_default_date_range;
|
622 |
+
|
623 |
+
var newProps = {
|
624 |
+
mode: chartMode,
|
625 |
+
filterParam: filterParam,
|
626 |
+
defaultDateRange: defaultDateRange
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
627 |
};
|
628 |
|
629 |
+
if (isRequesting) {
|
630 |
+
return newProps;
|
631 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
632 |
|
633 |
+
var hasLimitByParam = limitBy.some(function (item) {
|
634 |
+
return query[item] && query[item].length;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
635 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
636 |
|
637 |
+
if (query.search && !hasLimitByParam) {
|
638 |
+
return _objectSpread(_objectSpread({}, newProps), {}, {
|
639 |
+
emptySearchResults: true
|
640 |
+
});
|
641 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
|
643 |
+
var fields = charts && charts.map(function (chart) {
|
644 |
+
return chart.key;
|
|
|
|
|
|
|
|
|
645 |
});
|
646 |
+
var primaryData = Object(external_this_wc_data_["getReportChartData"])({
|
647 |
+
endpoint: endpoint,
|
648 |
+
dataType: 'primary',
|
649 |
+
query: query,
|
650 |
+
select: select,
|
651 |
+
limitBy: limitBy,
|
652 |
+
filters: filters,
|
653 |
+
advancedFilters: advancedFilters,
|
654 |
+
defaultDateRange: defaultDateRange,
|
655 |
+
fields: fields
|
656 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
657 |
|
658 |
+
if (chartMode === 'item-comparison') {
|
659 |
+
return _objectSpread(_objectSpread({}, newProps), {}, {
|
660 |
+
primaryData: primaryData
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
661 |
});
|
662 |
}
|
663 |
|
664 |
+
var secondaryData = Object(external_this_wc_data_["getReportChartData"])({
|
665 |
+
endpoint: endpoint,
|
666 |
+
dataType: 'secondary',
|
667 |
+
query: query,
|
668 |
+
select: select,
|
669 |
+
limitBy: limitBy,
|
670 |
+
filters: filters,
|
671 |
+
advancedFilters: advancedFilters,
|
672 |
+
defaultDateRange: defaultDateRange,
|
673 |
+
fields: fields
|
674 |
});
|
675 |
+
return _objectSpread(_objectSpread({}, newProps), {}, {
|
676 |
+
primaryData: primaryData,
|
677 |
+
secondaryData: secondaryData
|
678 |
+
});
|
679 |
+
}))(report_chart_ReportChart));
|
680 |
|
681 |
/***/ }),
|
682 |
|
683 |
+
/***/ 532:
|
684 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
685 |
|
686 |
"use strict";
|
687 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return charts; });
|
688 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return filters; });
|
689 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return advancedFilters; });
|
690 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
691 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
|
692 |
+
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43);
|
693 |
+
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);
|
694 |
+
/* harmony import */ var _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25);
|
695 |
+
/* harmony import */ var _lib_async_requests__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(500);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
696 |
/**
|
697 |
* External dependencies
|
698 |
*/
|
699 |
|
700 |
|
701 |
|
|
|
|
|
702 |
/**
|
703 |
* Internal dependencies
|
704 |
*/
|
705 |
|
706 |
|
707 |
+
var ORDERS_REPORT_CHARTS_FILTER = 'woocommerce_admin_orders_report_charts';
|
708 |
+
var ORDERS_REPORT_FILTERS_FILTER = 'woocommerce_admin_orders_report_filters';
|
709 |
+
var ORDERS_REPORT_ADVANCED_FILTERS_FILTER = 'woocommerce_admin_orders_report_advanced_filters';
|
710 |
+
var charts = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__["applyFilters"])(ORDERS_REPORT_CHARTS_FILTER, [{
|
711 |
+
key: 'orders_count',
|
712 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Orders', 'woocommerce-admin'),
|
713 |
+
type: 'number'
|
714 |
+
}, {
|
715 |
+
key: 'net_revenue',
|
716 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Net Sales', 'woocommerce-admin'),
|
717 |
+
order: 'desc',
|
718 |
+
orderby: 'net_total',
|
719 |
+
type: 'currency'
|
720 |
+
}, {
|
721 |
+
key: 'avg_order_value',
|
722 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Average Order Value', 'woocommerce-admin'),
|
723 |
+
type: 'currency'
|
724 |
+
}, {
|
725 |
+
key: 'avg_items_per_order',
|
726 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Average Items Per Order', 'woocommerce-admin'),
|
727 |
+
order: 'desc',
|
728 |
+
orderby: 'num_items_sold',
|
729 |
+
type: 'average'
|
730 |
+
}]);
|
731 |
+
var filters = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__["applyFilters"])(ORDERS_REPORT_FILTERS_FILTER, [{
|
732 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Show', 'woocommerce-admin'),
|
733 |
+
staticParams: ['chartType', 'paged', 'per_page'],
|
734 |
+
param: 'filter',
|
735 |
+
showFilters: function showFilters() {
|
736 |
+
return true;
|
737 |
+
},
|
738 |
+
filters: [{
|
739 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('All Orders', 'woocommerce-admin'),
|
740 |
+
value: 'all'
|
741 |
+
}, {
|
742 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Advanced Filters', 'woocommerce-admin'),
|
743 |
+
value: 'advanced'
|
744 |
+
}]
|
745 |
+
}]);
|
746 |
+
/*eslint-disable max-len*/
|
747 |
+
|
748 |
+
var advancedFilters = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__["applyFilters"])(ORDERS_REPORT_ADVANCED_FILTERS_FILTER, {
|
749 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Orders Match {{select /}} Filters', 'A sentence describing filters for Orders. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ', 'woocommerce-admin'),
|
750 |
+
filters: {
|
751 |
+
status: {
|
752 |
+
labels: {
|
753 |
+
add: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Order Status', 'woocommerce-admin'),
|
754 |
+
remove: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Remove order status filter', 'woocommerce-admin'),
|
755 |
+
rule: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select an order status filter match', 'woocommerce-admin'),
|
756 |
+
|
757 |
+
/* translators: A sentence describing an Order Status filter. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ */
|
758 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('{{title}}Order Status{{/title}} {{rule /}} {{filter /}}', 'woocommerce-admin'),
|
759 |
+
filter: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select an order status', 'woocommerce-admin')
|
760 |
+
},
|
761 |
+
rules: [{
|
762 |
+
value: 'is',
|
763 |
+
|
764 |
+
/* translators: Sentence fragment, logical, "Is" refers to searching for orders matching a chosen order status. Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
765 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Is', 'order status', 'woocommerce-admin')
|
766 |
+
}, {
|
767 |
+
value: 'is_not',
|
768 |
+
|
769 |
+
/* translators: Sentence fragment, logical, "Is Not" refers to searching for orders that don\'t match a chosen order status. Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
770 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Is Not', 'order status', 'woocommerce-admin')
|
771 |
+
}],
|
772 |
+
input: {
|
773 |
+
component: 'SelectControl',
|
774 |
+
options: Object.keys(_woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_2__[/* ORDER_STATUSES */ "d"]).map(function (key) {
|
775 |
+
return {
|
776 |
+
value: key,
|
777 |
+
label: _woocommerce_wc_admin_settings__WEBPACK_IMPORTED_MODULE_2__[/* ORDER_STATUSES */ "d"][key]
|
778 |
+
};
|
779 |
+
})
|
780 |
+
}
|
781 |
+
},
|
782 |
+
product: {
|
783 |
+
labels: {
|
784 |
+
add: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Products', 'woocommerce-admin'),
|
785 |
+
placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Search products', 'woocommerce-admin'),
|
786 |
+
remove: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Remove products filter', 'woocommerce-admin'),
|
787 |
+
rule: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select a product filter match', 'woocommerce-admin'),
|
788 |
+
|
789 |
+
/* translators: A sentence describing a Product filter. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ */
|
790 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('{{title}}Product{{/title}} {{rule /}} {{filter /}}', 'woocommerce-admin'),
|
791 |
+
filter: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select products', 'woocommerce-admin')
|
792 |
+
},
|
793 |
+
rules: [{
|
794 |
+
value: 'includes',
|
795 |
+
|
796 |
+
/* translators: Sentence fragment, logical, "Includes" refers to orders including a given product(s). Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
797 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Includes', 'products', 'woocommerce-admin')
|
798 |
+
}, {
|
799 |
+
value: 'excludes',
|
800 |
+
|
801 |
+
/* translators: Sentence fragment, logical, "Excludes" refers to orders excluding a given product(s). Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
802 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Excludes', 'products', 'woocommerce-admin')
|
803 |
+
}],
|
804 |
+
input: {
|
805 |
+
component: 'Search',
|
806 |
+
type: 'products',
|
807 |
+
getLabels: _lib_async_requests__WEBPACK_IMPORTED_MODULE_3__[/* getProductLabels */ "d"]
|
808 |
+
}
|
809 |
+
},
|
810 |
+
variation: {
|
811 |
+
labels: {
|
812 |
+
add: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Variations', 'woocommerce-admin'),
|
813 |
+
placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Search variations', 'woocommerce-admin'),
|
814 |
+
remove: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Remove variations filter', 'woocommerce-admin'),
|
815 |
+
rule: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select a variation filter match', 'woocommerce-admin'),
|
816 |
+
|
817 |
+
/* translators: A sentence describing a Variation filter. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ */
|
818 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('{{title}}Variation{{/title}} {{rule /}} {{filter /}}', 'woocommerce-admin'),
|
819 |
+
filter: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select variation', 'woocommerce-admin')
|
820 |
+
},
|
821 |
+
rules: [{
|
822 |
+
value: 'includes',
|
823 |
+
|
824 |
+
/* translators: Sentence fragment, logical, "Includes" refers to orders including a given variation(s). Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
825 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Includes', 'variations', 'woocommerce-admin')
|
826 |
+
}, {
|
827 |
+
value: 'excludes',
|
828 |
+
|
829 |
+
/* translators: Sentence fragment, logical, "Excludes" refers to orders excluding a given variation(s). Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
830 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Excludes', 'variations', 'woocommerce-admin')
|
831 |
+
}],
|
832 |
+
input: {
|
833 |
+
component: 'Search',
|
834 |
+
type: 'variations',
|
835 |
+
getLabels: _lib_async_requests__WEBPACK_IMPORTED_MODULE_3__[/* getVariationLabels */ "g"]
|
836 |
+
}
|
837 |
+
},
|
838 |
+
coupon: {
|
839 |
+
labels: {
|
840 |
+
add: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Coupon Codes', 'woocommerce-admin'),
|
841 |
+
placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Search coupons', 'woocommerce-admin'),
|
842 |
+
remove: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Remove coupon filter', 'woocommerce-admin'),
|
843 |
+
rule: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select a coupon filter match', 'woocommerce-admin'),
|
844 |
+
|
845 |
+
/* translators: A sentence describing a Coupon filter. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ */
|
846 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('{{title}}Coupon Code{{/title}} {{rule /}} {{filter /}}', 'woocommerce-admin'),
|
847 |
+
filter: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select coupon codes', 'woocommerce-admin')
|
848 |
+
},
|
849 |
+
rules: [{
|
850 |
+
value: 'includes',
|
851 |
+
|
852 |
+
/* translators: Sentence fragment, logical, "Includes" refers to orders including a given coupon code(s). Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
853 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Includes', 'coupon code', 'woocommerce-admin')
|
854 |
+
}, {
|
855 |
+
value: 'excludes',
|
856 |
+
|
857 |
+
/* translators: Sentence fragment, logical, "Excludes" refers to orders excluding a given coupon code(s). Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
858 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Excludes', 'coupon code', 'woocommerce-admin')
|
859 |
+
}],
|
860 |
+
input: {
|
861 |
+
component: 'Search',
|
862 |
+
type: 'coupons',
|
863 |
+
getLabels: _lib_async_requests__WEBPACK_IMPORTED_MODULE_3__[/* getCouponLabels */ "b"]
|
864 |
+
}
|
865 |
+
},
|
866 |
+
customer_type: {
|
867 |
+
labels: {
|
868 |
+
add: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Customer Type', 'woocommerce-admin'),
|
869 |
+
remove: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Remove customer filter', 'woocommerce-admin'),
|
870 |
+
rule: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select a customer filter match', 'woocommerce-admin'),
|
871 |
+
|
872 |
+
/* translators: A sentence describing a Customer filter. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ */
|
873 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('{{title}}Customer is{{/title}} {{filter /}}', 'woocommerce-admin'),
|
874 |
+
filter: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select a customer type', 'woocommerce-admin')
|
875 |
+
},
|
876 |
+
input: {
|
877 |
+
component: 'SelectControl',
|
878 |
+
options: [{
|
879 |
+
value: 'new',
|
880 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('New', 'woocommerce-admin')
|
881 |
+
}, {
|
882 |
+
value: 'returning',
|
883 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Returning', 'woocommerce-admin')
|
884 |
+
}],
|
885 |
+
defaultOption: 'new'
|
886 |
+
}
|
887 |
+
},
|
888 |
+
refunds: {
|
889 |
+
labels: {
|
890 |
+
add: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Refunds', 'woocommerce-admin'),
|
891 |
+
remove: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Remove refunds filter', 'woocommerce-admin'),
|
892 |
+
rule: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select a refund filter match', 'woocommerce-admin'),
|
893 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('{{title}}Refunds{{/title}} {{filter /}}', 'woocommerce-admin'),
|
894 |
+
filter: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select a refund type', 'woocommerce-admin')
|
895 |
+
},
|
896 |
+
input: {
|
897 |
+
component: 'SelectControl',
|
898 |
+
options: [{
|
899 |
+
value: 'all',
|
900 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('All', 'woocommerce-admin')
|
901 |
+
}, {
|
902 |
+
value: 'partial',
|
903 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Partially refunded', 'woocommerce-admin')
|
904 |
+
}, {
|
905 |
+
value: 'full',
|
906 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Fully refunded', 'woocommerce-admin')
|
907 |
+
}, {
|
908 |
+
value: 'none',
|
909 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('None', 'woocommerce-admin')
|
910 |
+
}],
|
911 |
+
defaultOption: 'all'
|
912 |
+
}
|
913 |
+
},
|
914 |
+
tax_rate: {
|
915 |
+
labels: {
|
916 |
+
add: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Tax Rates', 'woocommerce-admin'),
|
917 |
+
placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Search tax rates', 'woocommerce-admin'),
|
918 |
+
remove: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Remove tax rate filter', 'woocommerce-admin'),
|
919 |
+
rule: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select a tax rate filter match', 'woocommerce-admin'),
|
920 |
+
|
921 |
+
/* translators: A sentence describing a tax rate filter. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ */
|
922 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('{{title}}Tax Rate{{/title}} {{rule /}} {{filter /}}', 'woocommerce-admin'),
|
923 |
+
filter: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select tax rates', 'woocommerce-admin')
|
924 |
+
},
|
925 |
+
rules: [{
|
926 |
+
value: 'includes',
|
927 |
+
|
928 |
+
/* translators: Sentence fragment, logical, "Includes" refers to orders including a given tax rate(s). Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
929 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Includes', 'tax rate', 'woocommerce-admin')
|
930 |
+
}, {
|
931 |
+
value: 'excludes',
|
932 |
+
|
933 |
+
/* translators: Sentence fragment, logical, "Excludes" refers to orders excluding a given tax rate(s). Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
934 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Excludes', 'tax rate', 'woocommerce-admin')
|
935 |
+
}],
|
936 |
+
input: {
|
937 |
+
component: 'Search',
|
938 |
+
type: 'taxes',
|
939 |
+
getLabels: _lib_async_requests__WEBPACK_IMPORTED_MODULE_3__[/* getTaxRateLabels */ "f"]
|
940 |
+
}
|
941 |
+
},
|
942 |
+
attribute: {
|
943 |
+
allowMultiple: true,
|
944 |
+
labels: {
|
945 |
+
add: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Attribute', 'woocommerce-admin'),
|
946 |
+
placeholder: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Search attributes', 'woocommerce-admin'),
|
947 |
+
remove: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Remove attribute filter', 'woocommerce-admin'),
|
948 |
+
rule: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select a product attribute filter match', 'woocommerce-admin'),
|
949 |
+
|
950 |
+
/* translators: A sentence describing a Product filter. See screen shot for context: https://cloudup.com/cSsUY9VeCVJ */
|
951 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('{{title}}Attribute{{/title}} {{rule /}} {{filter /}}', 'woocommerce-admin'),
|
952 |
+
filter: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Select attributes', 'woocommerce-admin')
|
953 |
+
},
|
954 |
+
rules: [{
|
955 |
+
value: 'is',
|
956 |
|
957 |
+
/* translators: Sentence fragment, logical, "Is" refers to searching for products matching a chosen attribute. Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
958 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Is', 'product attribute', 'woocommerce-admin')
|
959 |
+
}, {
|
960 |
+
value: 'is_not',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
961 |
|
962 |
+
/* translators: Sentence fragment, logical, "Is Not" refers to searching for products that don\'t match a chosen attribute. Screenshot for context: https://cloudup.com/cSsUY9VeCVJ */
|
963 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["_x"])('Is Not', 'product attribute', 'woocommerce-admin')
|
964 |
+
}],
|
965 |
+
input: {
|
966 |
+
component: 'ProductAttribute'
|
967 |
+
}
|
|
|
|
|
968 |
}
|
969 |
+
}
|
970 |
+
});
|
971 |
+
/*eslint-enable max-len*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
972 |
|
973 |
/***/ })
|
974 |
|
dist/chunks/6.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[6],{507:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var c=n(11);function r(e){var t=Object(c.dispatch)("core/notices").createNotice;e.error_data&&e.errors&&Object.keys(e.errors).length?Object.keys(e.errors).forEach((function(n){t("error",e.errors[n].join(" "))})):e.message&&t(e.code?"error":"success",e.message)}},509:function(e,t,n){"use strict";var c=n(8),r=n.n(c),o=n(44),a=n.n(o),i=n(12),s=n.n(i),l=n(13),m=n.n(l),u=n(14),p=n.n(u),d=n(15),b=n.n(d),h=n(7),_=n.n(h),f=n(0),y=n(2),g=n(20),O=n(11),w=n(28),k=n.n(w),j=n(4),v=n(47),C=n(22);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=_()(e);if(t){var r=_()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return b()(this,n)}}var S=function(e){p()(c,e);var t,n=E(c);function c(e){var t;return s()(this,c),(t=n.call(this,e)).state={isLoadingScripts:!1,isRequestStarted:!1},t}return m()(c,[{key:"componentDidUpdate",value:(t=a()(r.a.mark((function e(t,n){var c,o,a,i,s,l,m,u,p,d;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=this.props,o=c.hasErrors,a=c.isRequesting,i=c.onClose,s=c.onContinue,l=c.createNotice,m=this.state,u=m.isLoadingScripts,m.isRequestStarted){e.next=4;break}return e.abrupt("return");case 4:p=!a&&!u&&(t.isRequesting||n.isLoadingScripts)&&!o,d=!a&&t.isRequesting&&o,p&&(i(),s()),d&&(l("error",Object(y.__)("There was a problem updating your preferences","woocommerce-admin")),i());case 8:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"updateTracking",value:function(e){var t=this,n=e.allowTracking,c=this.props.updateOptions;n&&"function"==typeof window.wcTracks.enable?(this.setState({isLoadingScripts:!0}),window.wcTracks.enable((function(){t._isMounted&&t.setState({isLoadingScripts:!1})}))):n||(window.wcTracks.isEnabled=!1);var r=n?"yes":"no";this.setState({isRequestStarted:!0}),c({woocommerce_allow_tracking:r})}},{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1}},{key:"render",value:function(){var e=this;if(this.props.allowTracking){var t=this.props,n=t.onClose,c=t.onContinue;return n(),c(),null}var r=this.props,o=r.isRequesting,a=r.title,i=void 0===a?Object(y.__)("Build a better WooCommerce","woocommerce-admin"):a,s=r.message,l=void 0===s?k()({mixedString:Object(y.__)("Get improved features and faster fixes by sharing non-sensitive data via {{link}}usage tracking{{/link}} that shows us how WooCommerce is used. No personal data is tracked or stored.","woocommerce-admin"),components:{link:Object(f.createElement)(v.Link,{href:"https://woocommerce.com/usage-tracking",target:"_blank",type:"external"})}}):s,m=r.dismissActionText,u=void 0===m?Object(y.__)("No thanks","woocommerce-admin"):m,p=r.acceptActionText,d=void 0===p?Object(y.__)("Yes, count me in!","woocommerce-admin"):p,b=this.state.isRequestStarted&&o;return Object(f.createElement)(j.Modal,{title:i,isDismissible:this.props.isDismissible,onRequestClose:function(){return e.props.onClose()},className:"woocommerce-usage-modal"},Object(f.createElement)("div",{className:"woocommerce-usage-modal__wrapper"},Object(f.createElement)("div",{className:"woocommerce-usage-modal__message"},l),Object(f.createElement)("div",{className:"woocommerce-usage-modal__actions"},Object(f.createElement)(j.Button,{isSecondary:!0,isBusy:b,onClick:function(){return e.updateTracking({allowTracking:!1})}},u),Object(f.createElement)(j.Button,{isPrimary:!0,isBusy:b,onClick:function(){return e.updateTracking({allowTracking:!0})}},d))))}}]),c}(f.Component);t.a=Object(g.compose)(Object(O.withSelect)((function(e){var t=e(C.OPTIONS_STORE_NAME),n=t.getOption,c=t.getOptionsUpdatingError,r=t.isOptionsUpdating;return{allowTracking:"yes"===n("woocommerce_allow_tracking"),isRequesting:Boolean(r()),hasErrors:Boolean(c())}})),Object(O.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e(C.OPTIONS_STORE_NAME).updateOptions}})))(S)},525:function(e,t,n){"use strict";n.d(t,"b",(function(){return Te})),n.d(t,"a",(function(){return Ae}));var c=n(0),r=n(2),o=n(26),a=n.n(o),i=n(28),s=n.n(i),l=n(25),m=n(47),u=n(22),p=n(24),d=n.n(p),b=n(8),h=n.n(b),_=n(44),f=n.n(_),y=n(12),g=n.n(y),O=n(13),w=n.n(O),k=n(9),j=n.n(k),v=n(14),C=n.n(v),E=n(15),S=n.n(E),P=n(7),x=n.n(P),R=n(5),L=n.n(R),N=n(4),T=n(20),A=n(11);function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=x()(e);if(t){var r=x()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return S()(this,n)}}var q=function(e){C()(n,e);var t=M(n);function n(){var e;g()(this,n);for(var c=arguments.length,o=new Array(c),a=0;a<c;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),L()(j()(e),"getInitialConfigValues",(function(){return{account_name:"",account_number:"",bank_name:"",sort_code:"",iban:"",bic:""}})),L()(j()(e),"validate",(function(e){var t={};return e.account_number||e.iban||(t.account_number=t.iban=Object(r.__)("Please enter an account number or IBAN","woocommerce-admin")),t})),L()(j()(e),"updateSettings",function(){var t=f()(h.a.mark((function t(n){var c,o,a,i;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=e.props,o=c.updateOptions,a=c.createNotice,i=c.markConfigured,t.next=3,o({woocommerce_bacs_settings:{enabled:"yes"},woocommerce_bacs_accounts:[n]});case 3:t.sent.success?(i("bacs"),a("success",Object(r.__)("Direct bank transfer details added successfully","woocommerce-admin"))):a("error",Object(r.__)("There was a problem saving your payment settings","woocommerce-admin"));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return w()(n,[{key:"render",value:function(){var e=this.props.isOptionsRequesting;return Object(c.createElement)(m.Form,{initialValues:this.getInitialConfigValues(),onSubmitCallback:this.updateSettings,validate:this.validate},(function(t){var n=t.getInputProps,o=t.handleSubmit;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(m.H,null,Object(r.__)("Add your bank details","woocommerce-admin")),Object(c.createElement)("p",null,Object(r.__)("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)(m.TextControl,d()({label:Object(r.__)("Account name","woocommerce-admin"),required:!0},n("account_name"))),Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Account number","woocommerce-admin"),required:!0},n("account_number"))),Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Bank name","woocommerce-admin"),required:!0},n("bank_name"))),Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Sort code","woocommerce-admin"),required:!0},n("sort_code"))),Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("IBAN","woocommerce-admin"),required:!0},n("iban"))),Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("BIC / Swift","woocommerce-admin"),required:!0},n("bic")))),Object(c.createElement)(N.Button,{isPrimary:!0,isBusy:e,onClick:o},Object(r.__)("Save","woocommerce-admin")))}))}}]),n}(c.Component),I=Object(T.compose)(Object(A.withSelect)((function(e){return{isOptionsRequesting:(0,e(u.OPTIONS_STORE_NAME).isOptionsUpdating)()}})),Object(A.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e(u.OPTIONS_STORE_NAME).updateOptions}})))(q),U=function(){return Object(c.createElement)("svg",{width:"96",height:"32",viewBox:"0 0 96 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("rect",{width:"32",height:"32",rx:"16",fill:"#8E9196"}),Object(c.createElement)("mask",{id:"bacs0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"8",y:"8",width:"16",height:"16"},Object(c.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.875 12.25L16 8.5L23.125 12.25V13.75H8.875V12.25ZM16 10.195L19.9075 12.25H12.0925L16 10.195ZM10.75 15.25H12.25V20.5H10.75V15.25ZM15.25 20.5V15.25H16.75V20.5H15.25ZM23.125 23.5V22H8.875V23.5H23.125ZM19.75 15.25H21.25V20.5H19.75V15.25Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#bacs0)"},Object(c.createElement)("rect",{x:"7",y:"7",width:"18",height:"18",fill:"white"})),Object(c.createElement)("mask",{id:"bacs1","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"39",y:"10",width:"18",height:"12"},Object(c.createElement)("path",{d:"M39 17L53.17 17L49.59 20.59L51 22L57 16L51 10L49.59 11.41L53.17 15L39 15L39 17Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#bacs1)"},Object(c.createElement)("rect",{x:"60",y:"28",width:"24",height:"24",transform:"rotate(-180 60 28)",fill:"#8E9196"})),Object(c.createElement)("rect",{x:"64",width:"32",height:"32",rx:"16",fill:"#8E9196"}),Object(c.createElement)("mask",{id:"bacs2","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"72",y:"8",width:"16",height:"16"},Object(c.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M72.875 12.25L80 8.5L87.125 12.25V13.75H72.875V12.25ZM80 10.195L83.9075 12.25H76.0925L80 10.195ZM74.75 15.25H76.25V20.5H74.75V15.25ZM79.25 20.5V15.25H80.75V20.5H79.25ZM87.125 23.5V22H72.875V23.5H87.125ZM83.75 15.25H85.25V20.5H83.75V15.25Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#bacs2)"},Object(c.createElement)("rect",{x:"71",y:"7",width:"18",height:"18",fill:"white"})))},D=function(){return Object(c.createElement)("svg",{width:"96",height:"32",viewBox:"0 0 96 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("rect",{width:"32",height:"32",rx:"16",fill:"#8E9196"}),Object(c.createElement)("mask",{id:"cod-mask-0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"7",y:"10",width:"18",height:"12"},Object(c.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 13H19.75V10H9.25C8.425 10 7.75 10.675 7.75 11.5V19.75H9.25C9.25 20.995 10.255 22 11.5 22C12.745 22 13.75 20.995 13.75 19.75H18.25C18.25 20.995 19.255 22 20.5 22C21.745 22 22.75 20.995 22.75 19.75H24.25V16L22 13ZM21.625 14.125L23.095 16H19.75V14.125H21.625ZM10.75 19.75C10.75 20.1625 11.0875 20.5 11.5 20.5C11.9125 20.5 12.25 20.1625 12.25 19.75C12.25 19.3375 11.9125 19 11.5 19C11.0875 19 10.75 19.3375 10.75 19.75ZM13.165 18.25C12.7525 17.7925 12.1675 17.5 11.5 17.5C10.8325 17.5 10.2475 17.7925 9.835 18.25H9.25V11.5H18.25V18.25H13.165ZM19.75 19.75C19.75 20.1625 20.0875 20.5 20.5 20.5C20.9125 20.5 21.25 20.1625 21.25 19.75C21.25 19.3375 20.9125 19 20.5 19C20.0875 19 19.75 19.3375 19.75 19.75Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#cod-mask-0)"},Object(c.createElement)("rect",{x:"7",y:"7",width:"18",height:"18",fill:"white"})),Object(c.createElement)("mask",{id:"cod-mask-1","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"39",y:"10",width:"18",height:"12"},Object(c.createElement)("path",{d:"M39 17L53.17 17L49.59 20.59L51 22L57 16L51 10L49.59 11.41L53.17 15L39 15L39 17Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#cod-mask-1)"},Object(c.createElement)("rect",{x:"60",y:"28",width:"24",height:"24",transform:"rotate(-180 60 28)",fill:"#8E9196"})),Object(c.createElement)("rect",{x:"64",width:"32",height:"32",rx:"16",fill:"#8E9196"}),Object(c.createElement)("mask",{id:"cod-mask-2","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"76",y:"9",width:"8",height:"14"},Object(c.createElement)("path",{d:"M80.2926 15.175C78.5901 14.7325 78.0426 14.275 78.0426 13.5625C78.0426 12.745 78.8001 12.175 80.0676 12.175C81.4026 12.175 81.8976 12.8125 81.9426 13.75H83.6001C83.5476 12.46 82.7601 11.275 81.1926 10.8925V9.25H78.9426V10.87C77.4876 11.185 76.3176 12.13 76.3176 13.5775C76.3176 15.31 77.7501 16.1725 79.8426 16.675C81.7176 17.125 82.0926 17.785 82.0926 18.4825C82.0926 19 81.7251 19.825 80.0676 19.825C78.5226 19.825 77.9151 19.135 77.8326 18.25H76.1826C76.2726 19.8925 77.5026 20.815 78.9426 21.1225V22.75H81.1926V21.1375C82.6551 20.86 83.8176 20.0125 83.8176 18.475C83.8176 16.345 81.9951 15.6175 80.2926 15.175Z",fill:"white"})),Object(c.createElement)("g",{mask:"url(#cod-mask-2)"},Object(c.createElement)("rect",{x:"71",y:"7",width:"18",height:"18",fill:"white"})))},V=function(){return Object(c.createElement)("svg",{width:"100",height:"64",viewBox:"-10 0 120 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.78073 0.5H91.1787C96.3299 0.5 100.5 4.77335 100.5 10.0522V41.8929C100.5 47.1717 96.3299 51.4451 91.1787 51.4451H61.9883L65.9948 61.5L48.3742 51.4451H9.82161C4.67036 51.4451 0.500298 47.1717 0.500298 41.8929V10.0522C0.459415 4.81524 4.62947 0.5 9.78073 0.5Z",fill:"#7F54B3"}),Object(c.createElement)("path",{d:"M5.48791 9.1725C6.06028 8.37648 6.91882 7.95752 8.06354 7.87373C10.1486 7.70615 11.3342 8.71165 11.6204 10.8902C12.8877 19.6464 14.2778 27.0619 15.7495 33.1368L24.7029 15.6663C25.5206 14.0743 26.5426 13.2364 27.7691 13.1526C29.568 13.0269 30.6718 14.2 31.1215 16.6718C32.1436 22.2439 33.4519 26.9781 35.0054 31.0001C36.0684 20.3586 37.8672 12.6917 40.402 7.95753C41.0152 6.78445 41.9146 6.19791 43.1002 6.11412C44.0405 6.03033 44.8991 6.3236 45.6759 6.95203C46.4526 7.58047 46.8615 8.37648 46.9432 9.34008C46.9841 10.0942 46.8615 10.7226 46.5344 11.3511C44.94 14.3676 43.6317 19.4369 42.5688 26.4754C41.5467 33.3044 41.1787 38.6251 41.424 42.4376C41.5058 43.485 41.3423 44.4067 40.9334 45.2027C40.4428 46.1244 39.707 46.6272 38.7666 46.711C37.7037 46.7948 36.5998 46.292 35.5369 45.1608C31.7348 41.1807 28.7094 35.2316 26.5018 27.3133C23.8444 32.6759 21.882 36.6979 20.6146 39.3792C18.2025 44.1134 16.1584 46.5434 14.4413 46.6691C13.3374 46.7529 12.3971 45.7893 11.5795 43.7783C9.49445 38.2899 7.24589 27.6904 4.83379 11.9795C4.71114 10.8902 4.91555 9.92662 5.48791 9.1725Z",fill:"white"}),Object(c.createElement)("path",{d:"M93.3864 15.7499C91.9146 13.1105 89.7478 11.5185 86.8451 10.89C86.0683 10.7225 85.3324 10.6387 84.6374 10.6387C80.7127 10.6387 77.5238 12.7335 75.0299 16.923C72.904 20.4841 71.8411 24.4223 71.8411 28.7376C71.8411 31.9635 72.4952 34.7286 73.8034 37.0329C75.2752 39.6723 77.442 41.2644 80.3447 41.8928C81.1215 42.0604 81.8574 42.1442 82.5524 42.1442C86.518 42.1442 89.7069 40.0494 92.1599 35.8598C94.2858 32.2568 95.3488 28.3186 95.3488 24.0034C95.3488 20.7355 94.6946 18.0123 93.3864 15.7499ZM88.2351 27.355C87.6628 30.1201 86.6407 32.173 85.128 33.5556C83.9424 34.6449 82.8386 35.1057 81.8165 34.8962C80.8353 34.6868 80.0177 33.8069 79.4044 32.173C78.9138 30.8742 78.6685 29.5755 78.6685 28.3605C78.6685 27.3131 78.7503 26.2657 78.9547 25.3021C79.3226 23.5844 80.0177 21.9086 81.1215 20.3166C82.4706 18.2637 83.9015 17.4258 85.3733 17.719C86.3545 17.9285 87.1722 18.8083 87.7854 20.4422C88.276 21.741 88.5213 23.0398 88.5213 24.2547C88.5213 25.344 88.3987 26.3914 88.2351 27.355Z",fill:"white"}),Object(c.createElement)("path",{d:"M67.7528 15.7499C66.281 13.1105 64.0734 11.5185 61.2116 10.89C60.4348 10.7225 59.6989 10.6387 59.0039 10.6387C55.0791 10.6387 51.8903 12.7335 49.3964 16.923C47.2705 20.4841 46.2075 24.4223 46.2075 28.7376C46.2075 31.9635 46.8616 34.7286 48.1699 37.0329C49.6417 39.6723 51.8085 41.2644 54.7112 41.8928C55.488 42.0604 56.2238 42.1442 56.9189 42.1442C60.8845 42.1442 64.0734 40.0494 66.5263 35.8598C68.6523 32.2568 69.7152 28.3186 69.7152 24.0034C69.7152 20.7355 69.0611 18.0123 67.7528 15.7499ZM62.6016 27.355C62.0292 30.1201 61.0071 32.173 59.4945 33.5556C58.3089 34.6449 57.205 35.1057 56.183 34.8962C55.2018 34.6868 54.3841 33.8069 53.7709 32.173C53.2803 30.8742 53.035 29.5755 53.035 28.3605C53.035 27.3131 53.1167 26.2657 53.3212 25.3021C53.6891 23.5844 54.3841 21.9086 55.4879 20.3166C56.8371 18.2637 58.268 17.4258 59.7398 17.719C60.721 17.9285 61.5386 18.8083 62.1519 20.4422C62.6425 21.741 62.8878 23.0398 62.8878 24.2547C62.8878 25.344 62.806 26.3914 62.6016 27.355Z",fill:"white"}))},F=function(){return Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100",height:"24",fill:"#072654",viewBox:"0 0 1896 401"},Object(c.createElement)("path",{fill:"#3395FF",d:"M122.63 105.7l-15.75 57.97 90.15-58.3-58.96 219.98 59.88.05L285.05.48"}),Object(c.createElement)("path",{d:"M25.6 232.92L.8 325.4h122.73l50.22-188.13L25.6 232.92m426.32-81.42c-3 11.15-8.78 19.34-17.4 24.57-8.6 5.22-20.67 7.84-36.25 7.84h-49.5l17.38-64.8h49.5c15.56 0 26.25 2.6 32.05 7.9 5.8 5.3 7.2 13.4 4.22 24.6m51.25-1.4c6.3-23.4 3.7-41.4-7.82-54-11.5-12.5-31.68-18.8-60.48-18.8H324.4l-66.5 248.1h53.67l26.8-100h35.2c7.9 0 14.12 1.3 18.66 3.8 4.55 2.6 7.22 7.1 8.04 13.6l9.58 82.6h57.5l-9.32-77c-1.9-17.2-9.77-27.3-23.6-30.3 17.63-5.1 32.4-13.6 44.3-25.4a92.6 92.6 0 0 0 24.44-42.5m130.46 86.4c-4.5 16.8-11.4 29.5-20.73 38.4-9.34 8.9-20.5 13.3-33.52 13.3-13.26 0-22.25-4.3-27-13-4.76-8.7-4.92-21.3-.5-37.8 4.42-16.5 11.47-29.4 21.17-38.7 9.7-9.3 21.04-13.95 34.06-13.95 13 0 21.9 4.5 26.4 13.43 4.6 8.97 4.7 21.8.2 38.5zm23.52-87.8l-6.72 25.1c-2.9-9-8.53-16.2-16.85-21.6-8.34-5.3-18.66-8-30.97-8-15.1 0-29.6 3.9-43.5 11.7-13.9 7.8-26.1 18.8-36.5 33-10.4 14.2-18 30.3-22.9 48.4-4.8 18.2-5.8 34.1-2.9 47.9 3 13.9 9.3 24.5 19 31.9 9.8 7.5 22.3 11.2 37.6 11.2a82.4 82.4 0 0 0 35.2-7.7 82.11 82.11 0 0 0 28.4-21.2l-7 26.16h51.9L709.3 149h-52zm238.65 0H744.87l-10.55 39.4h87.82l-116.1 100.3-9.92 37h155.8l10.55-39.4h-94.1l117.88-101.8m142.4 52c-4.67 17.4-11.6 30.48-20.75 39-9.15 8.6-20.23 12.9-33.24 12.9-27.2 0-36.14-17.3-26.86-51.9 4.6-17.2 11.56-30.13 20.86-38.84 9.3-8.74 20.57-13.1 33.82-13.1 13 0 21.78 4.33 26.3 13.05 4.52 8.7 4.48 21.67-.13 38.87m30.38-80.83c-11.95-7.44-27.2-11.16-45.8-11.16-18.83 0-36.26 3.7-52.3 11.1a113.09 113.09 0 0 0-41 32.06c-11.3 13.9-19.43 30.2-24.42 48.8-4.9 18.53-5.5 34.8-1.7 48.73 3.8 13.9 11.8 24.6 23.8 32 12.1 7.46 27.5 11.17 46.4 11.17 18.6 0 35.9-3.74 51.8-11.18 15.9-7.48 29.5-18.1 40.8-32.1 11.3-13.94 19.4-30.2 24.4-48.8 5-18.6 5.6-34.84 1.8-48.8-3.8-13.9-11.7-24.6-23.6-32.05m185.1 40.8l13.3-48.1c-4.5-2.3-10.4-3.5-17.8-3.5-11.9 0-23.3 2.94-34.3 8.9-9.46 5.06-17.5 12.2-24.3 21.14l6.9-25.9-15.07.06h-37l-47.7 176.7h52.63l24.75-92.37c3.6-13.43 10.08-24 19.43-31.5 9.3-7.53 20.9-11.3 34.9-11.3 8.6 0 16.6 1.97 24.2 5.9m146.5 41.1c-4.5 16.5-11.3 29.1-20.6 37.8-9.3 8.74-20.5 13.1-33.5 13.1s-21.9-4.4-26.6-13.2c-4.8-8.85-4.9-21.6-.4-38.36 4.5-16.75 11.4-29.6 20.9-38.5 9.5-8.97 20.7-13.45 33.7-13.45 12.8 0 21.4 4.6 26 13.9 4.6 9.3 4.7 22.2.28 38.7m36.8-81.4c-9.75-7.8-22.2-11.7-37.3-11.7-13.23 0-25.84 3-37.8 9.06-11.95 6.05-21.65 14.3-29.1 24.74l.18-1.2 8.83-28.1h-51.4l-13.1 48.9-.4 1.7-54 201.44h52.7l27.2-101.4c2.7 9.02 8.2 16.1 16.6 21.22 8.4 5.1 18.77 7.63 31.1 7.63 15.3 0 29.9-3.7 43.75-11.1 13.9-7.42 25.9-18.1 36.1-31.9 10.2-13.8 17.77-29.8 22.6-47.9 4.9-18.13 5.9-34.3 3.1-48.45-2.85-14.17-9.16-25.14-18.9-32.9m174.65 80.65c-4.5 16.7-11.4 29.5-20.7 38.3-9.3 8.86-20.5 13.27-33.5 13.27-13.3 0-22.3-4.3-27-13-4.8-8.7-4.9-21.3-.5-37.8 4.4-16.5 11.42-29.4 21.12-38.7 9.7-9.3 21.05-13.94 34.07-13.94 13 0 21.8 4.5 26.4 13.4 4.6 8.93 4.63 21.76.15 38.5zm23.5-87.85l-6.73 25.1c-2.9-9.05-8.5-16.25-16.8-21.6-8.4-5.34-18.7-8-31-8-15.1 0-29.68 3.9-43.6 11.7-13.9 7.8-26.1 18.74-36.5 32.9-10.4 14.16-18 30.3-22.9 48.4-4.85 18.17-5.8 34.1-2.9 47.96 2.93 13.8 9.24 24.46 19 31.9 9.74 7.4 22.3 11.14 37.6 11.14 12.3 0 24.05-2.56 35.2-7.7a82.3 82.3 0 0 0 28.33-21.23l-7 26.18h51.9l47.38-176.7h-51.9zm269.87.06l.03-.05h-31.9c-1.02 0-1.92.05-2.85.07h-16.55l-8.5 11.8-2.1 2.8-.9 1.4-67.25 93.68-13.9-109.7h-55.08l27.9 166.7-61.6 85.3h54.9l14.9-21.13c.42-.62.8-1.14 1.3-1.8l17.4-24.7.5-.7 77.93-110.5 65.7-93 .1-.06h-.03z"}))},B=function(){return Object(c.createElement)("svg",{fill:"none",viewBox:"0 0 677 200",width:"100",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("g",{fill:"#000"},Object(c.createElement)("path",{clipRule:"evenodd",d:"m286.342 65.3132c-37.175 0-67.35 30.2415-67.35 67.3438 0 37.101 30.245 67.343 67.35 67.343 37.106 0 67.35-30.242 67.35-67.343 0-37.1023-30.174-67.3438-67.35-67.3438zm0 102.8348c-19.533 0-35.425-15.89-35.425-35.421s15.892-35.4222 35.425-35.4222 35.426 15.8912 35.426 35.4222-15.893 35.421-35.426 35.421z",fillRule:"evenodd"}),Object(c.createElement)("path",{d:"m510.375 42.0021c11.6 0 21.003-9.4025 21.003-21.0011 0-11.59851-9.403-21.001-21.003-21.001-11.599 0-21.003 9.40249-21.003 21.001 0 11.5986 9.404 21.0011 21.003 21.0011z"}),Object(c.createElement)("path",{clipRule:"evenodd",d:"m148.842 65.3833c-1.75-.14-3.431-.21-5.181-.21-16.242 0-31.644 6.6503-42.706 18.4109-11.0617-11.6906-26.394-18.4109-42.4964-18.4109-32.2047 0-58.4586 26.1813-58.4586 58.3827v73.714h31.5047v-72.804c0-13.37 10.9916-25.691 23.9435-27.0211.9101-.07 1.8203-.14 2.6604-.14 14.5621 0 26.4639 11.9001 26.5339 26.4611v73.504h32.2045v-72.944c0-13.3 10.922-25.621 23.944-26.9511.91-.07 1.82-.14 2.66-.14 14.562 0 26.534 11.8301 26.604 26.3211v73.714h32.205v-72.804c0-14.77-5.461-28.9812-15.332-39.9717-9.872-11.0606-23.384-17.8509-38.086-19.111z",fillRule:"evenodd"}),Object(c.createElement)("path",{d:"m403.26 3.15015h-32.205v194.25985h32.205z"}),Object(c.createElement)("path",{d:"m464.869 3.15015h-32.205v194.25985h32.205z"}),Object(c.createElement)("path",{d:"m526.478 68.5334h-32.205v128.8066h32.205z"}),Object(c.createElement)("path",{clipRule:"evenodd",d:"m677 129.646c0-17.08-6.651-33.1812-18.693-45.4318-12.112-12.2506-28.074-19.0409-45.086-19.0409-.28 0-.561 0-.841 0-17.642.21-34.305 7.2103-46.766 19.741-12.462 12.5306-19.463 29.1217-19.673 46.8327-.21 18.06 6.721 35.141 19.533 48.092 12.811 12.951 29.754 20.091 47.817 20.091h.07c23.663 0 45.856-12.671 57.968-33.042l1.54-2.59-26.604-13.09-1.33 2.17c-6.651 10.99-18.202 17.501-31.014 17.501-16.383 0-30.525-10.921-34.866-26.462h97.945zm-65.04-35.2113c14.703 0 27.864 9.6603 32.485 23.3813h-64.899c4.55-13.721 17.712-23.3813 32.414-23.3813z",fillRule:"evenodd"})))},z=function(){return Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 385.61334 192.41333",width:"100"},Object(c.createElement)("g",{transform:"matrix(1.3333333,0,0,-1.3333333,0,192.41333)"},Object(c.createElement)("g",{transform:"scale(0.1)",id:"g12"},Object(c.createElement)("path",{style:{fill:"#90cc23",fillOpacity:1,fillRule:"nonzero",stroke:"none"},d:"m 2507.22,898.414 c -18.79,0 -34.01,15.234 -34,34.024 l 0.05,150.352 h -12.54 c -77.78,0 -106.71,-12.83 -106.71,-83.685 V 833.316 c -0.01,-0.351 -0.05,-0.703 -0.05,-1.054 v -36.34 c -0.02,-1.258 -0.1,-2.43 -0.1,-3.731 V 560.543 c 0,-28.293 -5.45,-50.82 -16.7,-68.32 -21.21,-32.676 -63.2,-47.532 -130.38,-47.618 -67.15,0.086 -109.13,14.93 -130.34,47.579 -11.28,17.507 -16.74,40.046 -16.74,68.359 v 231.648 c 0,1.301 -0.07,2.473 -0.09,3.731 v 36.34 c 0,0.351 -0.04,0.703 -0.05,1.054 v 165.789 c 0,70.855 -28.93,83.685 -106.71,83.685 h -24.49 c -77.79,0 -106.71,-12.83 -106.71,-83.685 V 832.262 656.723 560.543 c 0,-70.547 15.91,-130.281 46.65,-178.434 59.37,-93.3 174.38,-142.988 337.88,-142.988 0.2,0 0.4,0.008 0.6,0.008 0.21,0 0.4,-0.008 0.61,-0.008 163.5,0 278.51,49.688 337.88,142.988 30.74,48.153 46.65,107.887 46.65,178.434 v 96.18 175.539 66.121 l -84.71,0.031"}),Object(c.createElement)("path",{style:{fill:"#90cc23",fillOpacity:1,fillRule:"nonzero",stroke:"none"},d:"m 2866.82,1140.67 -127.94,0.05 c -13.95,0 -25.26,11.32 -25.25,25.27 l 0.04,129.52 c 0.01,13.96 11.33,25.27 25.28,25.27 l 127.93,-0.05 c 13.96,0 25.27,-11.32 25.27,-25.28 l -0.05,-129.52 c 0,-13.95 -11.32,-25.26 -25.28,-25.26"}),Object(c.createElement)("path",{style:{fill:"#90cc23",fillOpacity:1,fillRule:"nonzero",stroke:"none"},d:"m 2696.34,1320.76 -86.89,0.03 c -9.48,0.01 -17.16,7.69 -17.16,17.16 l 0.03,87.97 c 0.01,9.49 7.7,17.16 17.17,17.16 l 86.89,-0.03 c 9.48,0 17.16,-7.69 17.16,-17.17 l -0.03,-87.97 c -0.01,-9.48 -7.69,-17.15 -17.17,-17.15"}),Object(c.createElement)("path",{style:{fill:"#90cc23",fillOpacity:1,fillRule:"nonzero",stroke:"none"},d:"m 496.59,815.961 c 0,-104.07 -26.574,-160.469 -166.75,-160.469 H 114.059 v 268.586 c 0,37.246 13.847,51.094 51.089,51.094 H 329.84 c 105.605,0 166.75,-26.055 166.75,-159.211 z M 329.84,1082.95 H 143.77 C 44.3438,1082.95 0.00390625,1038.6 0.00390625,939.164 V 300.512 C 0.00390625,262.102 12.332,249.77 50.7422,249.77 h 12.5742 c 38.4136,0 50.7426,12.332 50.7426,50.742 V 548.98 H 329.84 c 191.582,0 280.812,84.844 280.812,266.981 0,182.148 -89.23,266.989 -280.812,266.989"}),Object(c.createElement)("path",{style:{fill:"#90cc23",fillOpacity:1,fillRule:"nonzero",stroke:"none"},d:"m 1012.01,536.82 v -87.547 c 0,-71.375 -26.455,-112.695 -161.721,-112.695 -89.359,0 -132.801,32.344 -132.801,98.863 0,72.954 43.578,101.379 155.434,101.379 z M 850.289,899.801 c -73.738,0 -119.949,-9.25 -137.476,-12.754 -31.036,-6.75 -44.012,-15.266 -44.012,-50.559 V 826.43 c 0,-13.828 2.047,-23.407 6.441,-30.145 5.113,-7.851 13.348,-11.836 24.488,-11.836 5.434,0 11.727,0.918 19.243,2.793 17.722,4.434 74.379,13.594 136.347,13.594 111.297,0 156.69,-30.832 156.69,-106.406 V 626.988 H 871.66 c -180.422,0 -264.461,-60.859 -264.461,-191.547 0,-126.761 86.778,-196.57 244.352,-196.57 187.249,0 270.749,63.719 270.749,206.633 V 694.43 c 0,138.191 -88.97,205.371 -272.011,205.371"}),Object(c.createElement)("path",{style:{fill:"#90cc23",fillOpacity:1,fillRule:"nonzero",stroke:"none"},d:"m 1739.43,870.035 c -7.95,9.981 -22.98,11.356 -38.05,11.356 h -11.3 c -37.55,0 -52.28,-11.582 -60.59,-47.606 L 1525.15,400.078 c -13.02,-53.297 -31.32,-63.039 -62.63,-63.039 -38.34,0 -53.69,9.152 -68.97,63.25 l -118.18,433.699 c -9.78,36.328 -24.21,47.403 -61.77,47.403 h -10.06 c -15.16,0 -30.26,-1.395 -38.01,-11.504 -7.76,-10.125 -5.14,-25.235 -1.14,-40.086 L 1283.82,392.34 c 22.4,-83.719 49.03,-153.02 148.53,-153.02 18.57,0 35.75,2.578 50.04,7.399 -30.18,-94.91 -60.88,-136.77 -151.41,-146.071 -18.37,-1.5269 -30.31,-4.1597 -36.96,-13.0777 -6.91,-9.25 -5.34,-22.5 -2.87,-34.332 l 2.49,-11.2188 C 1299.04,16.0781 1308.25,0 1337.37,0 c 3.06,0 6.35,0.160156 9.88,0.460938 C 1482.43,9.30859 1554.86,82.0898 1597.24,251.66 l 144.62,578.453 c 3.43,14.844 5.5,29.95 -2.43,39.922"}),Object(c.createElement)("path",{style:{fill:"#90cc23",fillOpacity:1,fillRule:"nonzero",stroke:"none"},d:"m 2679.57,1140.78 -172.26,0.06 c -18.79,0 -34.02,-15.23 -34.03,-34.02 l -0.01,-24.03 h 11.95 c 77.78,0 106.71,-12.83 106.71,-83.685 V 898.383 l 87.55,-0.028 c 18.79,-0.011 34.02,15.215 34.03,34.004 l 0.06,174.381 c 0,18.79 -15.22,34.03 -34,34.04"}))))},H=n(21);function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=x()(e);if(t){var r=x()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return S()(this,n)}}var K=function(e){C()(i,e);var t,n,o=Y(i);function i(e){var t;return g()(this,i),(t=o.call(this,e)).state={oAuthConnectFailed:!1,connectURL:null,isPending:!1},t.updateSettings=t.updateSettings.bind(j()(t)),t}return w()(i,[{key:"componentDidMount",value:function(){var e=this.state.oAuthConnectFailed,t=this.props.stripeSettings,n=Object(H.getQuery)();if(n["stripe-connect"]&&"1"===n["stripe-connect"]&&(t.publishable_key&&t.secret_key))return void this.completeMethod();e||this.fetchOAuthConnectURL()}},{key:"componentDidUpdate",value:function(e){var t=this.props.activePlugins;!e.activePlugins.includes("woocommerce-gateway-stripe")&&t.includes("woocommerce-gateway-stripe")&&this.fetchOAuthConnectURL()}},{key:"completeMethod",value:function(){var e=this.props,t=e.createNotice,n=e.markConfigured;this.setState({isPending:!1}),t("success",Object(r.__)("Stripe connected successfully.","woocommerce-admin")),n("stripe")}},{key:"fetchOAuthConnectURL",value:(n=f()(h.a.mark((function e(){var t;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.props.activePlugins.includes("woocommerce-gateway-stripe")){e.next=3;break}return e.abrupt("return");case 3:return e.prev=3,this.setState({isPending:!0}),e.next=7,a()({path:u.WCS_NAMESPACE+"/connect/stripe/oauth/init",method:"POST",data:{returnUrl:Object(l.f)("admin.php?page=wc-admin&task=payments&method=stripe&stripe-connect=1")}});case 7:if((t=e.sent)&&t.oauthUrl){e.next=11;break}return this.setState({oAuthConnectFailed:!0,isPending:!1}),e.abrupt("return");case 11:this.setState({connectURL:t.oauthUrl,isPending:!1}),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(3),this.setState({oAuthConnectFailed:!0,isPending:!1});case 17:case"end":return e.stop()}}),e,this,[[3,14]])}))),function(){return n.apply(this,arguments)})},{key:"renderConnectButton",value:function(){var e=this.state.connectURL;return Object(c.createElement)(N.Button,{isPrimary:!0,href:e},Object(r.__)("Connect","woocommerce-admin"))}},{key:"updateSettings",value:(t=f()(h.a.mark((function e(t){var n,c,o,a,i,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=this.props,o=c.updateOptions,a=c.stripeSettings,i=c.createNotice,s=t.publishable_key.match(/^pk_live_/)?"":"test_",e.next=4,o({woocommerce_stripe_settings:W(W({},a),{},(n={},L()(n,s+"publishable_key",t.publishable_key),L()(n,s+"secret_key",t.secret_key),L()(n,"testmode","test_"===s?"yes":"no"),L()(n,"enabled","yes"),n))});case 4:e.sent.success?this.completeMethod():i("error",Object(r.__)("There was a problem saving your payment settings","woocommerce-admin"));case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getInitialConfigValues",value:function(){return{publishable_key:"",secret_key:""}}},{key:"validateManualConfig",value:function(e){var t={};return null===e.publishable_key.match(/^pk_(live|test)_[a-zA-Z0-9_]+/)&&(t.publishable_key=Object(r.__)('Please enter a valid publishable key (starting with "pk_").',"woocommerce-admin")),null===e.secret_key.match(/^[rs]k_(live|test)_[a-zA-Z0-9_]+/)?t.secret_key=Object(r.__)('Please enter a valid secret key (starting with "sk_" or "rk_").',"woocommerce-admin"):e.secret_key.slice(3,7)!==e.publishable_key.slice(3,7)&&(t.secret_key=Object(r.__)("Please enter a secret key in the same mode as the publishable key.","woocommerce-admin")),t}},{key:"renderManualConfig",value:function(){var e=this.props.isOptionsUpdating,t=s()({mixedString:Object(r.__)("Your API details can be obtained from your {{docsLink}}Stripe account{{/docsLink}}. Don’t have a Stripe account? {{registerLink}}Create one.{{/registerLink}}","woocommerce-admin"),components:{docsLink:Object(c.createElement)(m.Link,{href:"https://stripe.com/docs/keys",target:"_blank",type:"external"}),registerLink:Object(c.createElement)(m.Link,{href:"https://dashboard.stripe.com/register",target:"_blank",type:"external"})}});return Object(c.createElement)(m.Form,{initialValues:this.getInitialConfigValues(),onSubmitCallback:this.updateSettings,validate:this.validateManualConfig},(function(n){var o=n.getInputProps,a=n.handleSubmit;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Publishable Key","woocommerce-admin"),required:!0},o("publishable_key"))),Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Secret Key","woocommerce-admin"),required:!0},o("secret_key"))),Object(c.createElement)(N.Button,{isPrimary:!0,isBusy:e,onClick:a},Object(r.__)("Proceed","woocommerce-admin")),Object(c.createElement)("p",null,t))}))}},{key:"renderOauthConfig",value:function(){var e=this,t=s()({mixedString:Object(r.__)('By clicking "Connect," you agree to the {{tosLink}}Terms of Service{{/tosLink}}. Or {{manualConfigLink}}manually enter your Stripe API details{{/manualConfigLink}} instead.',"woocommerce-admin"),components:{tosLink:Object(c.createElement)(m.Link,{href:"https://wordpress.com/tos",target:"_blank",type:"external"}),manualConfigLink:Object(c.createElement)(N.Button,{isLink:!0,onClick:function(){e.setState({connectURL:null})}})}});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",null,this.renderConnectButton()),t)}},{key:"getConnectStep",value:function(){var e=this.state,t=e.connectURL,n=e.isPending,c=e.oAuthConnectFailed,o={key:"connect",label:Object(r.__)("Connect your Stripe account","woocommerce-admin")};return n?o:W(W({},o),{},!c&&t?{description:Object(r.__)("A Stripe account is required to process payments.","woocommerce-admin"),content:this.renderOauthConfig()}:{content:this.renderManualConfig()})}},{key:"render",value:function(){var e=this.props,t=e.installStep,n=e.isOptionsUpdating,r=this.state.isPending;return Object(c.createElement)(m.Stepper,{isVertical:!0,isPending:!t.isComplete||n||r,currentStep:t.isComplete?"connect":"install",steps:[t,this.getConnectStep()]})}}]),i}(c.Component),G=Object(T.compose)(Object(A.withSelect)((function(e){var t=e(u.OPTIONS_STORE_NAME),n=t.getOption,c=t.isOptionsUpdating;return{activePlugins:(0,e(u.PLUGINS_STORE_NAME).getActivePlugins)(),isOptionsUpdating:c(),stripeSettings:n("woocommerce_stripe_settings")||[]}})),Object(A.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e(u.OPTIONS_STORE_NAME).updateOptions}})))(K);function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=x()(e);if(t){var r=x()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return S()(this,n)}}var X=function(e){C()(o,e);var t,n=$(o);function o(e){var t;return g()(this,o),(t=n.call(this,e)).state={isPending:!1},t.connect=t.connect.bind(j()(t)),t}return w()(o,[{key:"componentDidMount",value:function(){var e=this.props,t=e.createNotice,n=e.markConfigured,c=Object(H.getQuery)();c["square-connect"]&&"1"===c["square-connect"]&&(t("success",Object(r.__)("Square connected successfully.","woocommerce-admin")),n("square"))}},{key:"connect",value:(t=f()(h.a.mark((function e(){var t,n,c,o,i,s,l,m;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.createNotice,c=t.hasCbdIndustry,o=t.options,i=t.updateOptions,this.setState({isPending:!0}),i({woocommerce_square_credit_card_settings:J(J({},o.woocommerce_square_credit_card_settings),{},{enabled:"yes"})}),s=Object(r.__)("There was an error connecting to Square. Please try again or skip to connect later in store settings.","woocommerce-admin"),e.prev=4,l=null,c&&(l=window.open("/","_blank")),e.next=9,a()({path:u.WC_ADMIN_NAMESPACE+"/plugins/connect-square",method:"POST"});case 9:if((m=e.sent)&&m.connectUrl){e.next=15;break}return this.setState({isPending:!1}),n("error",s),c&&l.close(),e.abrupt("return");case 15:this.setState({isPending:!0}),this.redirect(m.connectUrl,l),e.next=23;break;case 19:e.prev=19,e.t0=e.catch(4),this.setState({isPending:!1}),n("error",s);case 23:case"end":return e.stop()}}),e,this,[[4,19]])}))),function(){return t.apply(this,arguments)})},{key:"redirect",value:function(e,t){t?(t.location.href=e,window.location=Object(l.f)("admin.php?page=wc-admin")):window.location=e}},{key:"render",value:function(){var e=this.props.installStep,t=this.state.isPending;return Object(c.createElement)(m.Stepper,{isVertical:!0,isPending:!e.isComplete||t,currentStep:e.isComplete?"connect":"install",steps:[e,{key:"connect",label:Object(r.__)("Connect your Square account","woocommerce-admin"),description:Object(r.__)("A Square account is required to process payments. You will be redirected to the Square website to create the connection.","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)(N.Button,{isPrimary:!0,isBusy:t,onClick:this.connect},Object(r.__)("Connect","woocommerce-admin")))}]})}}]),o}(c.Component),ee=Object(T.compose)(Object(A.withSelect)((function(e){var t=e(u.OPTIONS_STORE_NAME),n=t.getOption,c=t.isResolving;return{options:n("woocommerce_square_credit_card_settings"),optionsIsRequesting:c("getOption",["woocommerce_square_credit_card_settings"])}})),Object(A.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e(u.OPTIONS_STORE_NAME).updateOptions}})))(X);function te(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=x()(e);if(t){var r=x()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return S()(this,n)}}var ne=function(e){C()(n,e);var t=te(n);function n(){return g()(this,n),t.apply(this,arguments)}return w()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.createNotice,n=e.markConfigured;Object(H.getQuery)()["wcpay-connection-success"]&&(t("success",Object(r.__)("WooCommerce Payments connected successfully.","woocommerce-admin")),n("wcpay",{"wcpay-connection-success":"1"}))}},{key:"render",value:function(){return null}}]),n}(c.Component),ce=Object(A.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice}}))(ne),re=n(23);function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){L()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=x()(e);if(t){var r=x()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return S()(this,n)}}var se="woocommerce-paypal-payments";function le(e,t,n){try{ppcp_onboarding&&n()}catch(r){var c=document.createElement("script");c.src=e,document.body.append(c),c.onload=function(){n()},window.PayPalCommerceGatewayOnboarding=t}}function me(e){var t=e.connectUrl;return Object(c.useEffect)((function(){ppcp_onboarding&&ppcp_onboarding.reload()}),[]),Object(c.createElement)("a",{className:"button-primary",target:"_blank",rel:"noreferrer",href:t,"data-paypal-onboard-button":"true","data-paypal-button":"true","data-paypal-onboard-complete":"ppcp_onboarding_productionCallback"},Object(r.__)("Connect","woocommerce-admin"))}var ue=function(e){C()(u,e);var t,n,o,i,l=ie(u);function u(e){var t;return g()(this,u),(t=l.call(this,e)).state={autoConnectFailed:!1,connectURL:""},t.enablePaypalPlugin=t.enablePaypalPlugin.bind(j()(t)),t.setCredentials=t.setCredentials.bind(j()(t)),t.validate=t.validate.bind(j()(t)),t}return w()(u,[{key:"componentDidMount",value:function(){var e=this.props.createNotice,t=Object(H.getQuery)();if(t.onboarding)return"complete"!==t.onboarding||t["ppcp-onboarding-error"]?void(t["ppcp-onboarding-error"]&&(this.setState({autoConnectFailed:!0}),e("error",Object(r.__)("There was a problem saving your payment settings through the onboarding, please fill the fields in manually.","woocommerce-admin")))):void this.enablePaypalPlugin();this.fetchOAuthConnectURLAndOnboardingSetup()}},{key:"componentDidUpdate",value:function(e){var t=this.props.activePlugins;!e.activePlugins.includes(se)&&t.includes(se)&&this.fetchOAuthConnectURLAndOnboardingSetup()}},{key:"fetchOAuthConnectURLAndOnboardingSetup",value:(i=f()(h.a.mark((function e(){var t,n,c,o,i=this;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.activePlugins,c=t.createNotice,n.includes(se)){e.next=3;break}return e.abrupt("return");case 3:return this.setState({isPending:!0}),e.prev=4,e.next=7,a()({path:"/wc-paypal/v1/onboarding/get-params",method:"POST",data:{environment:"production",returnUrlArgs:{ppcpobw:"1"}}});case 7:if((o=e.sent)&&o.signupLink){e.next=11;break}return this.setState({autoConnectFailed:!0,isPending:!1}),e.abrupt("return");case 11:le(o.scriptURL,o.scriptData,(function(){i.setState({connectURL:o.signupLink,isPending:!1})})),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(4),e.t0&&e.t0.data&&500===e.t0.data.status&&c("error",Object(r.__)("There was a problem with the Paypal onboarding setup, please fill the fields in manually.","woocommerce-admin")),this.setState({autoConnectFailed:!0,isPending:!1});case 18:case"end":return e.stop()}}),e,this,[[4,14]])}))),function(){return i.apply(this,arguments)})},{key:"enablePaypalPlugin",value:(o=f()(h.a.mark((function e(t){var n,c,o,a,i,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.props,c=n.createNotice,o=n.updateOptions,a=n.markConfigured,i=n.options,s={"woocommerce_ppcp-gateway_settings":{enabled:"yes"}},t||(s["woocommerce-ppcp-settings"]=ae(ae({},i),{},{enabled:!0})),e.next=5,o(s);case 5:e.sent.success?(c("success",Object(r.__)("PayPal connected successfully.","woocommerce-admin")),a("paypal")):c("error",Object(r.__)("There was a problem saving your payment settings.","woocommerce-admin"));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"setCredentials",value:(n=f()(h.a.mark((function e(t){var n,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.props.createNotice,e.prev=1,e.next=4,a()({path:"/wc-paypal/v1/onboarding/set-credentials",method:"POST",data:ae({environment:"production"},t)});case 4:if(!(c=e.sent)||!c.data){e.next=9;break}n("error",Object(r.__)("There was a problem updating the credentials.","woocommerce-admin")),e.next=11;break;case 9:return e.next=11,this.enablePaypalPlugin(!0);case 11:e.next=18;break;case 13:if(e.prev=13,e.t0=e.catch(1),!e.t0||!e.t0.data||404!==e.t0.data.status){e.next=18;break}return e.next=18,this.updateManualSettings(t);case 18:case"end":return e.stop()}}),e,this,[[1,13]])}))),function(e){return n.apply(this,arguments)})},{key:"updateManualSettings",value:(t=f()(h.a.mark((function e(t){var n,c,o,a,i,s,l;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.props,c=n.createNotice,o=n.options,a=n.updateOptions,i=n.markConfigured,s=Object.keys(t).reduce((function(e,n){var c=n+"_production";return ae(ae({},e),{},L()({},c,t[n]))}),{}),l=ae(ae({},o),{},{enabled:!0,sandbox_on:!1,merchant_email:t.merchant_email,merchant_id:t.merchant_id},s),e.next=5,a({"woocommerce-ppcp-settings":l,"woocommerce_ppcp-gateway_settings":{enabled:"yes"}});case 5:e.sent.success?(c("success",Object(r.__)("PayPal connected successfully.","woocommerce-admin")),i("paypal")):c("error",Object(r.__)("There was a problem saving your payment settings.","woocommerce-admin"));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getInitialConfigValues",value:function(){var e=this.props.options;return["merchant_email","merchant_id","client_id","client_secret"].reduce((function(t,n){return ae(ae({},t),{},L()({},n,e&&e[n+"_production"]?e[n+"_production"]:""))}),{})}},{key:"validate",value:function(e){var t={};return e.merchant_email||(t.merchant_email=Object(r.__)("Please enter your Merchant email","woocommerce-admin")),Object(re.isEmail)(e.merchant_email)||(t.merchant_email=Object(r.__)("Please enter a valid email address","woocommerce-admin")),e.merchant_id||(t.merchant_id=Object(r.__)("Please enter your Merchant Id","woocommerce-admin")),e.client_id||(t.client_id=Object(r.__)("Please enter your Client Id","woocommerce-admin")),e.client_secret||(t.client_secret=Object(r.__)("Please enter your Client Secret","woocommerce-admin")),t}},{key:"renderManualConfig",value:function(){var e=this.props.isOptionsUpdating,t=s()({mixedString:Object(r.__)("Your API details can be obtained from your {{docsLink}}Paypal developer account{{/docsLink}}, and your Merchant Id from your {{merchantLink}}Paypal Business account{{/merchantLink}}. Don’t have a Paypal account? {{registerLink}}Create one.{{/registerLink}}","woocommerce-admin"),components:{docsLink:Object(c.createElement)(m.Link,{href:"https://developer.paypal.com/docs/api-basics/manage-apps/#create-or-edit-sandbox-and-live-apps",target:"_blank",type:"external"}),merchantLink:Object(c.createElement)(m.Link,{href:"https://www.paypal.com/ca/smarthelp/article/FAQ3850",target:"_blank",type:"external"}),registerLink:Object(c.createElement)(m.Link,{href:"https://www.paypal.com/us/business",target:"_blank",type:"external"})}});return Object(c.createElement)(m.Form,{initialValues:this.getInitialConfigValues(),onSubmitCallback:this.setCredentials,validate:this.validate},(function(n){var o=n.getInputProps,a=n.handleSubmit;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Email address","woocommerce-admin"),required:!0},o("merchant_email"))),Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Merchant Id","woocommerce-admin"),required:!0},o("merchant_id"))),Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Client Id","woocommerce-admin"),required:!0},o("client_id"))),Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Secret Key","woocommerce-admin"),required:!0},o("client_secret"))),Object(c.createElement)(N.Button,{isPrimary:!0,isBusy:e,onClick:a},Object(r.__)("Proceed","woocommerce-admin")),Object(c.createElement)("p",null,t))}))}},{key:"renderConnectFields",value:function(){var e=this.state,t=e.autoConnectFailed,n=e.connectURL;return!t&&n?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(me,{connectUrl:n}),Object(c.createElement)("p",null,Object(r.__)("You will be redirected to the PayPal website to create the connection.","woocommerce-admin"))):t?this.renderManualConfig():void 0}},{key:"getConnectStep",value:function(){var e=this.props.isRequestingOptions;return{key:"connect",label:Object(r.__)("Connect your PayPal account","woocommerce-admin"),description:Object(r.__)("A PayPal account is required to process payments. Connect your store to your PayPal account.","woocommerce-admin"),content:e?null:this.renderConnectFields()}}},{key:"render",value:function(){var e=this.props,t=e.installStep,n=e.isRequestingOptions,r=e.isOptionsUpdating,o=this.state.isPending;return Object(c.createElement)(m.Stepper,{isVertical:!0,isPending:!t.isComplete||o||n||r,currentStep:t.isComplete?"connect":"install",steps:[t,this.getConnectStep()]})}}]),u}(c.Component);ue.defaultProps={manualConfig:!1};var pe=Object(T.compose)(Object(A.withSelect)((function(e){var t=e(u.OPTIONS_STORE_NAME),n=t.getOption,c=t.isOptionsUpdating,r=t.hasFinishedResolution,o=e(u.PLUGINS_STORE_NAME).getActivePlugins,a=n("woocommerce-ppcp-settings"),i=!r("getOption",["woocommerce-ppcp-settings"]);return{activePlugins:o(),isOptionsUpdating:c(),options:a,isRequestingOptions:i}})),Object(A.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e(u.OPTIONS_STORE_NAME).updateOptions}})))(ue);function de(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=x()(e);if(t){var r=x()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return S()(this,n)}}var be=function(e){C()(n,e);var t=de(n);function n(e){var c;return g()(this,n),(c=t.call(this,e)).continue=c.continue.bind(j()(c)),c}return w()(n,[{key:"continue",value:function(){var e=this.props;(0,e.markConfigured)("checkout"===e.plugin?"klarna_checkout":"klarna_payments")}},{key:"renderConnectStep",value:function(){var e=this.props.plugin,t="checkout"===e?"klarna-checkout":"klarna-payments",n="checkout"===e?"kco":"klarna_payments",o=Object(c.createElement)(m.Link,{href:l.a+"admin.php?page=wc-settings&tab=checkout§ion="+n,target:"_blank",type:"external"}),a=Object(c.createElement)(m.Link,{href:"https://docs.woocommerce.com/document/"+t+"/#section-3",target:"_blank",type:"external"}),i=s()({mixedString:Object(r.__)("Klarna can be configured under your {{link}}store settings{{/link}}. Figure out {{helpLink}}what you need{{/helpLink}}.","woocommerce-admin"),components:{link:o,helpLink:a}});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",null,i),Object(c.createElement)(N.Button,{isPrimary:!0,onClick:this.continue},Object(r.__)("Continue","woocommerce-admin")))}},{key:"render",value:function(){var e=this.props.installStep;return Object(c.createElement)(m.Stepper,{isVertical:!0,isPending:!e.isComplete,currentStep:e.isComplete?"connect":"install",steps:[e,{key:"connect",label:Object(r.__)("Connect your Klarna account","woocommerce-admin"),content:this.renderConnectStep()}]})}}]),n}(c.Component);function he(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=x()(e);if(t){var r=x()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return S()(this,n)}}var _e=function(e){C()(n,e);var t=he(n);function n(){var e;g()(this,n);for(var c=arguments.length,o=new Array(c),a=0;a<c;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),L()(j()(e),"getInitialConfigValues",(function(){return{merchant_id:"",merchant_key:"",pass_phrase:""}})),L()(j()(e),"validate",(function(e){var t={};return e.merchant_id||(t.merchant_id=Object(r.__)("Please enter your merchant ID","woocommerce-admin")),e.merchant_key||(t.merchant_key=Object(r.__)("Please enter your merchant key","woocommerce-admin")),e.pass_phrase||(t.pass_phrase=Object(r.__)("Please enter your passphrase","woocommerce-admin")),t})),L()(j()(e),"updateSettings",function(){var t=f()(h.a.mark((function t(n){var c,o,a,i;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=e.props,o=c.updateOptions,a=c.createNotice,i=c.markConfigured,t.next=3,o({woocommerce_currency:"ZAR",woocommerce_payfast_settings:{merchant_id:n.merchant_id,merchant_key:n.merchant_key,pass_phrase:n.pass_phrase,enabled:"yes"}});case 3:t.sent.success?(i("payfast"),a("success",Object(r.__)("PayFast connected successfully","woocommerce-admin"))):a("error",Object(r.__)("There was a problem saving your payment settings","woocommerce-admin"));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return w()(n,[{key:"renderConnectStep",value:function(){var e=this.props.isOptionsRequesting,t=s()({mixedString:Object(r.__)("Your API details can be obtained from your {{link}}PayFast account{{/link}}","woocommerce-admin"),components:{link:Object(c.createElement)(m.Link,{href:"https://www.payfast.co.za/",target:"_blank",type:"external"})}});return Object(c.createElement)(m.Form,{initialValues:this.getInitialConfigValues(),onSubmitCallback:this.updateSettings,validate:this.validate},(function(n){var o=n.getInputProps,a=n.handleSubmit;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Merchant ID","woocommerce-admin"),required:!0},o("merchant_id"))),Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Merchant Key","woocommerce-admin"),required:!0},o("merchant_key"))),Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Passphrase","woocommerce-admin"),required:!0},o("pass_phrase"))),Object(c.createElement)(N.Button,{isPrimary:!0,isBusy:e,onClick:a},Object(r.__)("Proceed","woocommerce-admin")),Object(c.createElement)("p",null,t))}))}},{key:"render",value:function(){var e=this.props,t=e.installStep,n=e.isOptionsRequesting;return Object(c.createElement)(m.Stepper,{isVertical:!0,isPending:!t.isComplete||n,currentStep:t.isComplete?"connect":"install",steps:[t,{key:"connect",label:Object(r.__)("Connect your PayFast account","woocommerce-admin"),content:this.renderConnectStep()}]})}}]),n}(c.Component),fe=Object(T.compose)(Object(A.withSelect)((function(e){return{isOptionsRequesting:(0,e(u.OPTIONS_STORE_NAME).isOptionsUpdating)()}})),Object(A.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e(u.OPTIONS_STORE_NAME).updateOptions}})))(_e);function ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,c=x()(e);if(t){var r=x()(this).constructor;n=Reflect.construct(c,arguments,r)}else n=c.apply(this,arguments);return S()(this,n)}}var ge=function(e){C()(n,e);var t=ye(n);function n(){var e;g()(this,n);for(var c=arguments.length,o=new Array(c),a=0;a<c;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),L()(j()(e),"getInitialConfigValues",(function(){return{customer_api:"",customer_password:""}})),L()(j()(e),"validate",(function(e){var t={};return e.customer_api||(t.customer_api=Object(r.__)("Please enter your customer API key ","woocommerce-admin")),e.customer_password||(t.customer_password=Object(r.__)("Please enter your customer password","woocommerce-admin")),t})),L()(j()(e),"updateSettings",function(){var t=f()(h.a.mark((function t(n){var c,o,a,i;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=e.props,o=c.updateOptions,a=c.createNotice,i=c.markConfigured,t.next=3,o({woocommerce_eway_settings:{customer_api:n.customer_api,customer_password:n.customer_password,enabled:"yes"}});case 3:t.sent.success?(i("eway"),a("success",Object(r.__)("eWAY connected successfully","woocommerce-admin"))):a("error",Object(r.__)("There was a problem saving your payment settings","woocommerce-admin"));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return w()(n,[{key:"renderConnectStep",value:function(){var e=this.props.isOptionsRequesting,t=s()({mixedString:Object(r.__)("Your API details can be obtained from your {{link}}eWAY account{{/link}}","woocommerce-admin"),components:{link:Object(c.createElement)(m.Link,{href:"https://www.eway.com.au/",target:"_blank",type:"external"})}});return Object(c.createElement)(m.Form,{initialValues:this.getInitialConfigValues(),onSubmitCallback:this.updateSettings,validate:this.validate},(function(n){var o=n.getInputProps,a=n.handleSubmit;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Customer API Key","woocommerce-admin"),required:!0},o("customer_api"))),Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Customer Password","woocommerce-admin"),required:!0},o("customer_password"))),Object(c.createElement)(N.Button,{isPrimary:!0,isBusy:e,onClick:a},Object(r.__)("Proceed","woocommerce-admin")),Object(c.createElement)("p",null,t))}))}},{key:"render",value:function(){var e=this.props,t=e.installStep,n=e.isOptionsRequesting;return Object(c.createElement)(m.Stepper,{isVertical:!0,isPending:!t.isComplete||n,currentStep:t.isComplete?"connect":"install",steps:[t,{key:"connect",label:Object(r.__)("Connect your eWAY account","woocommerce-admin"),content:this.renderConnectStep()}]})}}]),n}(c.Component),Oe=Object(T.compose)(Object(A.withSelect)((function(e){return{isOptionsRequesting:(0,e(u.OPTIONS_STORE_NAME).isOptionsUpdating)()}})),Object(A.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice,updateOptions:e(u.OPTIONS_STORE_NAME).updateOptions}})))(ge),we={key_id:"",key_secret:""},ke=function(e){var t={};return e.key_id||(t.key_id=Object(r.__)("Please enter your Key ID","woocommerce-admin")),e.key_secret||(t.key_secret=Object(r.__)("Please enter your Key Secret","woocommerce-admin")),t},je=function(){var e=f()(h.a.mark((function e(t,n,c,o){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o({woocommerce_razorpay_settings:{key_id:t.key_id,key_secret:t.key_secret,enabled:"yes"}});case 2:e.sent.success?(c("razorpay"),n("success",Object(r.__)("Razorpay connected successfully","woocommerce-admin"))):n("error",Object(r.__)("There was a problem saving your payment settings","woocommerce-admin"));case 4:case"end":return e.stop()}}),e)})));return function(t,n,c,r){return e.apply(this,arguments)}}(),ve=function(e){var t=e.createNotice,n=e.isOptionsRequesting,o=e.markConfigured,a=e.updateOptions,i=s()({mixedString:Object(r.__)("Your key details can be obtained from your {{link}}Razorpay account{{/link}}","woocommerce-admin"),components:{link:Object(c.createElement)(m.Link,{href:"https://dashboard.razorpay.com/#/access/signin",target:"_blank",type:"external"})}});return Object(c.createElement)(m.Form,{initialValues:we,onSubmitCallback:function(e){return je(e,t,o,a)},validate:ke},(function(e){var t=e.getInputProps,o=e.handleSubmit;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Key ID","woocommerce-admin"),required:!0},t("key_id"))),Object(c.createElement)(m.TextControl,d()({label:Object(r.__)("Key Secret","woocommerce-admin"),required:!0},t("key_secret"))),Object(c.createElement)(N.Button,{isPrimary:!0,isBusy:n,onClick:o},Object(r.__)("Proceed","woocommerce-admin")),Object(c.createElement)("p",null,i))}))},Ce=function(e){var t=e.createNotice,n=e.installStep,o=e.isOptionsRequesting,a=e.markConfigured,i=e.updateOptions;return Object(c.createElement)(m.Stepper,{isVertical:!0,isPending:!n.isComplete||o,currentStep:n.isComplete?"connect":"install",steps:[n,{key:"connect",label:Object(r.__)("Connect your Razorpay account","woocommerce-admin"),content:ve({createNotice:t,isOptionsRequesting:o,markConfigured:a,updateOptions:i})}]})},Ee=function(e){var t=e.installStep,n=e.markConfigured,r=Object(A.useSelect)((function(e){return e(u.OPTIONS_STORE_NAME).isOptionsUpdating}))(),o=Object(A.useDispatch)("core/notices").createNotice,a=Object(A.useDispatch)(u.OPTIONS_STORE_NAME).updateOptions;return Object(c.createElement)(Ce,{createNotice:o,installStep:t,isOptionsRequesting:r,markConfigured:n,updateOptions:a})},Se=function(e){var t=e.installStep,n=e.markConfigured;return Object(c.createElement)(m.Stepper,{isVertical:!0,isPending:!t.isComplete,currentStep:t.isComplete?"connect":"install",steps:[t,{key:"connect",label:Object(r.__)("Connect your Mollie account","woocommerce-admin"),content:Object(c.createElement)(Pe,{onFinish:function(){n("mollie")}})}]})},Pe=function(e){var t=e.onFinish,n=Object(c.createElement)(m.Link,{href:"".concat(l.a,"admin.php?page=wc-settings&tab=mollie_settings#mollie-payments-for-woocommerce"),target:"_blank",type:"external"}),o=Object(c.createElement)(m.Link,{href:"https://www.mollie.com/dashboard/signup",target:"_blank",type:"external"}),a=s()({mixedString:Object(r.__)("Create a {{accountLink}}Mollie account{{/accountLink}} and finish the configuration in the {{settingsLink}}Mollie settings.{{/settingsLink}}","woocommerce-admin"),components:{accountLink:o,settingsLink:n}});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",null,a),Object(c.createElement)(N.Button,{isPrimary:!0,onClick:t},Object(r.__)("Continue","woocommerce-admin")))},xe=function(e){var t=e.installStep,n=e.markConfigured;return Object(c.createElement)(m.Stepper,{isVertical:!0,isPending:!t.isComplete,currentStep:t.isComplete?"connect":"install",steps:[t,{key:"connect",label:Object(r.__)("Connect to your PayU account","woocommerce-admin"),content:Object(c.createElement)(Re,{onFinish:function(){n("payubiz")}})}]})},Re=function(e){var t=e.onFinish,n=Object(c.createElement)(m.Link,{href:"".concat(l.a,"admin.php?page=wc-settings&tab=checkout§ion=payubiz"),target:"_blank",type:"external"}),o=Object(c.createElement)(m.Link,{href:"https://onboarding.payu.in/app/account",target:"_blank",type:"external"}),a=s()({mixedString:Object(r.__)("PayU can be configured under your {{settingsLink}}store settings.{{/settingsLink}} Create your PayU account {{accountLink}}here.{{/accountLink}}","woocommerce-admin"),components:{accountLink:o,settingsLink:n}});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("p",null,a),Object(c.createElement)(N.Button,{isPrimary:!0,onClick:t},Object(r.__)("Continue","woocommerce-admin")))},Le=n(527),Ne=n(507);function Te(e,t,n,c){var o=Object(r.__)("There was an error connecting to WooCommerce Payments. Please try again or connect later in store settings.","woocommerce-admin");c(["woocommerce-payments"]).then((function(){a()({path:u.WC_ADMIN_NAMESPACE+"/plugins/connect-wcpay",method:"POST"}).then((function(e){window.location=e.connectUrl})).catch((function(){n("error",o),t()}))})).catch((function(e){Object(Ne.a)(e),t()}))}function Ae(e){var t=e.activePlugins,n=e.countryCode,o=e.createNotice,a=e.installAndActivatePlugins,i=e.onboardingStatus,u=e.options,p=e.profileItems,d=e.paypalOnboardingStatus,b=e.loadingPaypalStatus,h=i.stripeSupportedCountries,_=void 0===h?[]:h,f=i.wcPayIsConnected,y=void 0!==f&&f,g=i.enabledPaymentGateways,O=void 0===g?[]:g,w=(p.industry||[]).some((function(e){return"cbd-other-hemp-derived-products"===e.slug})),k=u.woocommerce_stripe_settings&&("no"===u.woocommerce_stripe_settings.testmode?u.woocommerce_stripe_settings.publishable_key&&u.woocommerce_stripe_settings.secret_key:u.woocommerce_stripe_settings.test_publishable_key&&u.woocommerce_stripe_settings.test_secret_key),j=[{key:"stripe",title:Object(r.__)("Credit cards - powered by Stripe","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("Accept debit and credit cards in 135+ currencies, methods such as Alipay, and one-touch checkout with Apple Pay.","woocommerce-admin")),before:Object(c.createElement)("img",{src:l.e+"images/stripe.png",alt:""}),visible:_.includes(n)&&!w,plugins:["woocommerce-gateway-stripe"],container:Object(c.createElement)(G,null),isConfigured:k,isEnabled:u.woocommerce_stripe_settings&&"yes"===u.woocommerce_stripe_settings.enabled,optionName:"woocommerce_stripe_settings"},{key:"paypal",title:Object(r.__)("PayPal Payments","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("Safe and secure payments using credit cards or your customer's PayPal account.","woocommerce-admin")),before:Object(c.createElement)("img",{src:l.e+"images/paypal.png",alt:""}),visible:!w,plugins:[se],container:Object(c.createElement)(pe,null),isConfigured:d&&d.production&&d.production.onboarded,isEnabled:O.includes("ppcp-gateway"),optionName:"woocommerce_ppcp-gateway_settings",loading:!!t.includes(se)&&b},{key:"klarna_checkout",title:Object(r.__)("Klarna Checkout","woocommerce-admin"),content:Object(r.__)("Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries.","woocommerce-admin"),before:Object(c.createElement)("img",{src:l.e+"images/klarna-black.png",alt:""}),visible:["SE","FI","NO"].includes(n)&&!w,plugins:["klarna-checkout-for-woocommerce"],container:Object(c.createElement)(be,{plugin:"checkout"}),isConfigured:t.includes("klarna-checkout-for-woocommerce"),isEnabled:u.woocommerce_kco_settings&&"yes"===u.woocommerce_kco_settings.enabled,optionName:"woocommerce_kco_settings"},{key:"klarna_payments",title:Object(r.__)("Klarna Payments","woocommerce-admin"),content:Object(r.__)("Choose the payment that you want, pay now, pay later or slice it. No credit card numbers, no passwords, no worries.","woocommerce-admin"),before:Object(c.createElement)("img",{src:l.e+"images/klarna-black.png",alt:""}),visible:["DK","DE","AT","NL","CH","BE","SP","PL","FR","IT","GB"].includes(n)&&!w,plugins:["klarna-payments-for-woocommerce"],container:Object(c.createElement)(be,{plugin:"payments"}),isConfigured:t.includes("klarna-payments-for-woocommerce"),isEnabled:u.woocommerce_klarna_payments_settings&&"yes"===u.woocommerce_klarna_payments_settings.enabled,optionName:"woocommerce_klarna_payments_settings"},{key:"mollie",title:Object(r.__)("Mollie Payments for WooCommerce","woocommerce-admin"),before:Object(c.createElement)(B,null),plugins:["mollie-payments-for-woocommerce"],isConfigured:t.includes("mollie-payments-for-woocommerce"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("Effortless payments by Mollie: Offer global and local payment methods, get onboarded in minutes, and supported in your language.","woocommerce-admin")),visible:["FR","DE","GB","AT","CH","ES","IT","PL","FI","NL","BE"].includes(n),container:Object(c.createElement)(Se,null),isEnabled:u.woocommerce_mollie_payments_settings&&"yes"===u.woocommerce_mollie_payments_settings.enabled,optionName:"woocommerce_mollie_payments_settings"},{key:"square",title:Object(r.__)("Square","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("Securely accept credit and debit cards with one low rate, no surprise fees (custom rates available). Sell online and in store and track sales and inventory in one place.","woocommerce-admin"),w&&Object(c.createElement)("span",{className:"text-style-strong"},Object(r.__)(" Selling CBD products is only supported by Square.","woocommerce-admin"))),before:Object(c.createElement)("img",{src:"".concat(l.e,"images/square-black.png"),alt:""}),visible:w&&["US"].includes(n)||["brick-mortar","brick-mortar-other"].includes(p.selling_venues)&&["US","CA","JP","GB","AU"].includes(n),plugins:["woocommerce-square"],container:Object(c.createElement)(ee,null),isConfigured:u.wc_square_refresh_tokens&&u.wc_square_refresh_tokens.length,isEnabled:u.woocommerce_square_credit_card_settings&&"yes"===u.woocommerce_square_credit_card_settings.enabled,optionName:"woocommerce_square_credit_card_settings",hasCbdIndustry:w},{key:"payfast",title:Object(r.__)("PayFast","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("The PayFast extension for WooCommerce enables you to accept payments by Credit Card and EFT via one of South Africa’s most popular payment gateways. No setup fees or monthly subscription costs.","woocommerce-admin"),Object(c.createElement)("p",null,Object(r.__)("Selecting this extension will configure your store to use South African rands as the selected currency.","woocommerce-admin"))),before:Object(c.createElement)("img",{src:l.e+"images/payfast.png",alt:"PayFast logo"}),visible:["ZA"].includes(n)&&!w,plugins:["woocommerce-payfast-gateway"],container:Object(c.createElement)(fe,null),isConfigured:u.woocommerce_payfast_settings&&u.woocommerce_payfast_settings.merchant_id&&u.woocommerce_payfast_settings.merchant_key&&u.woocommerce_payfast_settings.pass_phrase,isEnabled:u.woocommerce_payfast_settings&&"yes"===u.woocommerce_payfast_settings.enabled,optionName:"woocommerce_payfast_settings"},{key:"eway",title:Object(r.__)("eWAY","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("The eWAY extension for WooCommerce allows you to take credit card payments directly on your store without redirecting your customers to a third party site to make payment.","woocommerce-admin")),before:Object(c.createElement)("img",{src:l.e+"images/eway-logo.jpg",alt:"eWAY logo"}),visible:["AU","NZ"].includes(n)&&!w,plugins:["woocommerce-gateway-eway"],container:Object(c.createElement)(Oe,null),isConfigured:u.woocommerce_eway_settings&&u.woocommerce_eway_settings.customer_api&&u.woocommerce_eway_settings.customer_password,isEnabled:u.woocommerce_eway_settings&&"yes"===u.woocommerce_eway_settings.enabled,optionName:"woocommerce_eway_settings"},{key:"razorpay",title:Object(r.__)("Razorpay","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("The official Razorpay extension for WooCommerce allows you to accept credit cards, debit cards, netbanking, wallet, and UPI payments.","woocommerce-admin")),before:Object(c.createElement)(F,null),visible:"IN"===n&&!w,plugins:["woo-razorpay"],container:Object(c.createElement)(Ee,null),isConfigured:u.woocommerce_razorpay_settings&&u.woocommerce_razorpay_settings.key_id&&u.woocommerce_razorpay_settings.key_secret,isEnabled:u.woocommerce_razorpay_settings&&"yes"===u.woocommerce_razorpay_settings.enabled,optionName:"woocommerce_razorpay_settings"},{key:"payubiz",title:Object(r.__)("PayU for WooCommerce","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("Enable PayU’s exclusive plugin for WooCommerce to start accepting payments in 100+ payment methods available in India including credit cards, debit cards, UPI, & more!","woocommerce-admin")),before:Object(c.createElement)(z,null),visible:"IN"===n&&!w,plugins:["payu-india"],container:Object(c.createElement)(xe,null),isConfigured:t.includes("payu-india"),isEnabled:O.includes("payubiz"),optionName:"woocommerce_payubiz_settings"},{key:"cod",title:Object(r.__)("Cash on delivery","woocommerce-admin"),content:Object(r.__)("Take payments in cash upon delivery.","woocommerce-admin"),before:Object(c.createElement)(D,null),visible:!w,isEnabled:u.woocommerce_cod_settings&&"yes"===u.woocommerce_cod_settings.enabled,optionName:"woocommerce_cod_settings"},{key:"bacs",title:Object(r.__)("Direct bank transfer","woocommerce-admin"),content:Object(r.__)("Take payments via bank transfer.","woocommerce-admin"),before:Object(c.createElement)(U,null),visible:!w,container:Object(c.createElement)(I,null),isConfigured:u.woocommerce_bacs_accounts&&u.woocommerce_bacs_accounts.length,isEnabled:u.woocommerce_bacs_settings&&"yes"===u.woocommerce_bacs_settings.enabled,optionName:"woocommerce_bacs_settings"}];if(window.wcAdminFeatures.wcpay){var v=Object(c.createElement)(m.Link,{href:"https://wordpress.com/tos/",target:"_blank",type:"external"}),C=s()({mixedString:Object(r.__)('By clicking "Set up," you agree to the {{link}}Terms of Service{{/link}}',"woocommerce-admin"),components:{link:v}}),E=Object(c.createElement)(m.Link,{href:"https://docs.woocommerce.com/document/payments/testing/dev-mode/",target:"_blank",type:"external"}),S=s()({mixedString:Object(r.__)("Setting up a store for a client? {{link}}Start here{{/link}}","woocommerce-admin"),components:{link:E}}),P=Object(c.createElement)(m.Link,{href:Object(l.f)("admin.php?page=wc-settings&tab=checkout§ion=woocommerce_payments"),type:"wp-admin"},Object(r.__)("Settings","woocommerce-admin"));j.unshift({key:"wcpay",title:Object(r.__)("WooCommerce Payments","woocommerce-admin"),content:Object(c.createElement)(c.Fragment,null,Object(r.__)("Accept credit card payments the easy way! No setup fees. No monthly fees. Just 2.9% + $0.30 per transaction on U.S. issued cards. ","woocommerce-admin"),y&&P,!y&&Object(c.createElement)("p",null,C),p.setup_client&&Object(c.createElement)("p",null,S),Object(c.createElement)(Le.default,null)),before:Object(c.createElement)(V,null),onClick:function(e,t){return Te(0,t,o,a)},visible:["US","PR"].includes(n)&&!w,plugins:["woocommerce-payments"],container:Object(c.createElement)(ce,null),isConfigured:y,isEnabled:u.woocommerce_woocommerce_payments_settings&&"yes"===u.woocommerce_woocommerce_payments_settings.enabled,optionName:"woocommerce_woocommerce_payments_settings"})}return j.filter((function(e){return e.visible}))}},527:function(e,t,n){"use strict";n.r(t);var c=n(18),r=n.n(c),o=n(0),a=n(2),i=n(21),s=n(28),l=n.n(s),m=n(47),u=n(509);t.default=function(){var e="1"===Object(i.getQuery)()["wcpay-connection-success"],t=Object(o.useState)(e),n=r()(t,2),c=n[0],s=n[1];if(!c)return null;v
|
|