From d2f77d38134d42a76293871b216e1df3f9a864be Mon Sep 17 00:00:00 2001 From: Jason Godson Date: Wed, 9 Nov 2022 23:17:54 -0700 Subject: [PATCH] Release new version --- docs/bundle.js | 4 ++-- package.json | 2 +- src/components/ChangeLogContent.js | 4 +++- src/versions.js | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/bundle.js b/docs/bundle.js index ff89382..eb383b3 100644 --- a/docs/bundle.js +++ b/docs/bundle.js @@ -18,7 +18,7 @@ var a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Arr object-assign (c) Sindre Sorhus @license MIT -*/var a=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(e){a[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,o,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;cp))return!1;var h=u.get(e),f=u.get(t);if(h&&f)return h==t&&f==e;var g=-1,v=!0,b=n&l?new a:void 0;for(u.set(e,t),u.set(t,e);++g-1&&e%1==0&&e<=n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.INVALID_ACTION="INVALID_ACTION",e.INVALID_ACTION_TYPE="INVALID_ACTION_TYPE",e.INVALID_OPTIONS="INVALID_OPTIONS",e.INVALID_PAYLOAD="INVALID_PAYLOAD",e.UNEXPECTED_ACTION="UNEXPECTED_ACTION",e.PERSISTENCE="PERSISTENCE",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK="NETWORK",e.PERMISSION="PERMISSION"}(t.Action||(t.Action={})),function(e){e.INVALID_ACTION="APP::ERROR::INVALID_ACTION",e.INVALID_ACTION_TYPE="APP::ERROR::INVALID_ACTION_TYPE",e.INVALID_PAYLOAD="APP::ERROR::INVALID_PAYLOAD",e.INVALID_OPTIONS="APP::ERROR::INVALID_OPTIONS",e.UNEXPECTED_ACTION="APP::ERROR::UNEXPECTED_ACTION",e.PERSISTENCE="APP::ERROR::PERSISTENCE",e.UNSUPPORTED_OPERATION="APP::ERROR::UNSUPPORTED_OPERATION",e.NETWORK="APP::ERROR::NETWORK",e.PERMISSION="APP::ERROR::PERMISSION"}(t.ActionType||(t.ActionType={})),function(e){e.INVALID_CONFIG="APP::ERROR::INVALID_CONFIG",e.MISSING_CONFIG="APP::APP_ERROR::MISSING_CONFIG",e.MISSING_APP_BRIDGE_MIDDLEWARE="APP::APP_ERROR::MISSING_APP_BRIDGE_MIDDLEWARE",e.WINDOW_UNDEFINED="APP::APP_ERROR::WINDOW_UNDEFINED",e.MISSING_LOCAL_ORIGIN="APP::APP_ERROR::MISSING_LOCAL_ORIGIN"}(t.AppActionType||(t.AppActionType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.CLICK="CLICK",e.UPDATE="UPDATE"}(t.Action||(t.Action={})),function(e){e.CLICK="APP::BUTTON::CLICK",e.UPDATE="APP::BUTTON::UPDATE"}(t.ActionType||(t.ActionType={})),function(e){e.Print="print"}(t.Icon||(t.Icon={})),function(e){e.Danger="danger"}(t.Style||(t.Style={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.UPDATE="UPDATE"}(t.Action||(t.Action={})),function(e){e.UPDATE="APP::BUTTONGROUP::UPDATE"}(t.ActionType||(t.ActionType={}))},function(e,t,n){"use strict";function a(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),a(n(221)),a(n(91))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.FETCH="APP::CART::FETCH",e.UPDATE="APP::CART::UPDATE",e.SET_CUSTOMER="APP::CART::SET_CUSTOMER",e.REMOVE_CUSTOMER="APP::CART::REMOVE_CUSTOMER",e.ADD_CUSTOMER_ADDRESS="APP::CART::ADD_CUSTOMER_ADDRESS",e.UPDATE_CUSTOMER_ADDRESS="APP::CART::UPDATE_CUSTOMER_ADDRESS",e.SET_DISCOUNT="APP::CART::SET_DISCOUNT",e.REMOVE_DISCOUNT="APP::CART::REMOVE_DISCOUNT",e.SET_PROPERTIES="APP::CART::SET_PROPERTIES",e.REMOVE_PROPERTIES="APP::CART::REMOVE_PROPERTIES",e.CLEAR="APP::CART::CLEAR",e.ADD_LINE_ITEM="APP::CART::ADD_LINE_ITEM",e.UPDATE_LINE_ITEM="APP::CART::UPDATE_LINE_ITEM",e.REMOVE_LINE_ITEM="APP::CART::REMOVE_LINE_ITEM",e.SET_LINE_ITEM_DISCOUNT="APP::CART::SET_LINE_ITEM_DISCOUNT",e.REMOVE_LINE_ITEM_DISCOUNT="APP::CART::REMOVE_LINE_ITEM_DISCOUNT",e.SET_LINE_ITEM_PROPERTIES="APP::CART::SET_LINE_ITEM_PROPERTIES",e.REMOVE_LINE_ITEM_PROPERTIES="APP::CART::REMOVE_LINE_ITEM_PROPERTIES"}(t.ActionType||(t.ActionType={})),function(e){e.FETCH="FETCH",e.UPDATE="UPDATE",e.SET_CUSTOMER="SET_CUSTOMER",e.REMOVE_CUSTOMER="REMOVE_CUSTOMER",e.ADD_CUSTOMER_ADDRESS="ADD_CUSTOMER_ADDRESS",e.UPDATE_CUSTOMER_ADDRESS="UPDATE_CUSTOMER_ADDRESS",e.SET_DISCOUNT="SET_DISCOUNT",e.REMOVE_DISCOUNT="REMOVE_DISCOUNT",e.SET_PROPERTIES="SET_PROPERTIES",e.REMOVE_PROPERTIES="REMOVE_PROPERTIES",e.CLEAR="CLEAR",e.ADD_LINE_ITEM="ADD_LINE_ITEM",e.UPDATE_LINE_ITEM="UPDATE_LINE_ITEM",e.REMOVE_LINE_ITEM="REMOVE_LINE_ITEM",e.SET_LINE_ITEM_DISCOUNT="SET_LINE_ITEM_DISCOUNT",e.REMOVE_LINE_ITEM_DISCOUNT="REMOVE_LINE_ITEM_DISCOUNT",e.SET_LINE_ITEM_PROPERTIES="SET_LINE_ITEM_PROPERTIES",e.REMOVE_LINE_ITEM_PROPERTIES="REMOVE_LINE_ITEM_PROPERTIES"}(t.Action||(t.Action={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.UPDATE="APP::FEATURES::UPDATE",e.REQUEST="APP::FEATURES::REQUEST",e.REQUEST_UPDATE="APP::FEATURES::REQUEST::UPDATE"}(t.ActionType||(t.ActionType={})),function(e){e.UPDATE="UPDATE",e.REQUEST="REQUEST",e.REQUEST_UPDATE="REQUEST::UPDATE"}(t.Action||(t.Action={}))},function(e,t,n){"use strict";var a,r=this&&this.__extends||(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(9),l=n(10);!function(e){e.ENTER="ENTER",e.EXIT="EXIT"}(t.Action||(t.Action={})),function(e){e.ENTER="APP::FULLSCREEN::ENTER",e.EXIT="APP::FULLSCREEN::EXIT"}(i=t.ActionType||(t.ActionType={}));var c=function(e){function t(t){return e.call(this,t,l.Group.Fullscreen,l.Group.Fullscreen)||this}return r(t,e),Object.defineProperty(t.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!0,configurable:!0}),t.prototype.dispatch=function(e){return this.app.dispatch(o.actionWrapper({group:this.group,type:i[e],payload:this.payload})),this},t}(o.ActionSet);t.Fullscreen=c,t.create=function(e){return new c(e)}},function(e,t,n){"use strict";function a(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),a(n(227)),a(n(95))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.START="APP::LOADING::START",e.STOP="APP::LOADING::STOP"}(t.ActionType||(t.ActionType={})),function(e){e.START="START",e.STOP="STOP"}(t.Action||(t.Action={}))},function(e,t,n){"use strict";function a(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),a(n(97)),a(n(67))},function(e,t,n){"use strict";var a,r=this&&this.__extends||(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,a=arguments.length;n=0||(r[n]=e[n]);return r}(t,["children"]);if(delete a.in,delete a.mountOnEnter,delete a.unmountOnExit,delete a.appear,delete a.enter,delete a.exit,delete a.timeout,delete a.addEndListener,delete a.onEnter,delete a.onEntering,delete a.onEntered,delete a.onExit,delete a.onExiting,delete a.onExited,"function"==typeof n)return n(e,a);var i=r.default.Children.only(n);return r.default.cloneElement(i,a)},a}(r.default.Component);function m(){}p.contextTypes={transitionGroup:a.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:m,onEntering:m,onEntered:m,onExit:m,onExiting:m,onExited:m},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var h=(0,o.polyfill)(p);t.default=h},function(e,t,n){"use strict";function a(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,a=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,a)}finally{this.props=n,this.state=a}}function o(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,o=null,l=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==o||null!==l){var c=e.displayName||e.name,s="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+c+" uses "+s+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==o?"\n "+o:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=a,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var a=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,a)}}return e}n.r(t),n.d(t,"polyfill",function(){return o}),a.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var a;(a=n(8))&&a.__esModule;t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a=l(n(8)),r=l(n(0)),i=n(113),o=n(267);function l(e){return e&&e.__esModule?e:{default:e}}function c(){return(c=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,["component","childFactory"]),i=u(this.state.children).map(n);return delete a.appear,delete a.enter,delete a.exit,null===t?i:r.default.createElement(t,a,i)},a}(r.default.Component);d.childContextTypes={transitionGroup:a.default.object.isRequired},d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,i.polyfill)(d);t.default=p,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={currentVersion:"0.31.1",minimumVersion:"0.1.0"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,r=function(){function e(e,t){for(var n=0;n0?a:n)(e)}},function(e,t,n){var a=n(303)("keys"),r=n(305);e.exports=function(e){return a[e]||(a[e]=r(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var a=n(122);e.exports=function(e){return Object(a(e))}},function(e,t,n){e.exports=n(307)},function(e,t,n){"use strict";function a(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",function(){return a})},function(e,t,n){e.exports=n(313)},function(e,t,n){e.exports=n(321)},function(e,t,n){e.exports=n(133)},function(e,t,n){"use strict";var a=p(n(0)),r=n(16),i=p(n(20)),o=p(n(268)),l=p(n(270)),c=p(n(116)),s=p(n(117)),u=p(n(271)),d=p(n(273));function p(e){return e&&e.__esModule?e:{default:e}}n(337);var m=(0,o.default)({apiKey:"b5c7553f622953ed2e930932c74bd43d",notifyReleaseStages:["production"],appVersion:c.default.currentVersion});m.use(l.default,a.default);var h=m.getPlugin("react");i.default.render(a.default.createElement(r.AppProvider,null,a.default.createElement(h,{FallbackComponent:u.default},a.default.createElement(s.default,null),a.default.createElement(d.default,null))),document.getElementById("root"))},function(e,t,n){"use strict"; +*/var a=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(e){a[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,o,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;cp))return!1;var h=u.get(e),f=u.get(t);if(h&&f)return h==t&&f==e;var g=-1,v=!0,b=n&l?new a:void 0;for(u.set(e,t),u.set(t,e);++g-1&&e%1==0&&e<=n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.INVALID_ACTION="INVALID_ACTION",e.INVALID_ACTION_TYPE="INVALID_ACTION_TYPE",e.INVALID_OPTIONS="INVALID_OPTIONS",e.INVALID_PAYLOAD="INVALID_PAYLOAD",e.UNEXPECTED_ACTION="UNEXPECTED_ACTION",e.PERSISTENCE="PERSISTENCE",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK="NETWORK",e.PERMISSION="PERMISSION"}(t.Action||(t.Action={})),function(e){e.INVALID_ACTION="APP::ERROR::INVALID_ACTION",e.INVALID_ACTION_TYPE="APP::ERROR::INVALID_ACTION_TYPE",e.INVALID_PAYLOAD="APP::ERROR::INVALID_PAYLOAD",e.INVALID_OPTIONS="APP::ERROR::INVALID_OPTIONS",e.UNEXPECTED_ACTION="APP::ERROR::UNEXPECTED_ACTION",e.PERSISTENCE="APP::ERROR::PERSISTENCE",e.UNSUPPORTED_OPERATION="APP::ERROR::UNSUPPORTED_OPERATION",e.NETWORK="APP::ERROR::NETWORK",e.PERMISSION="APP::ERROR::PERMISSION"}(t.ActionType||(t.ActionType={})),function(e){e.INVALID_CONFIG="APP::ERROR::INVALID_CONFIG",e.MISSING_CONFIG="APP::APP_ERROR::MISSING_CONFIG",e.MISSING_APP_BRIDGE_MIDDLEWARE="APP::APP_ERROR::MISSING_APP_BRIDGE_MIDDLEWARE",e.WINDOW_UNDEFINED="APP::APP_ERROR::WINDOW_UNDEFINED",e.MISSING_LOCAL_ORIGIN="APP::APP_ERROR::MISSING_LOCAL_ORIGIN"}(t.AppActionType||(t.AppActionType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.CLICK="CLICK",e.UPDATE="UPDATE"}(t.Action||(t.Action={})),function(e){e.CLICK="APP::BUTTON::CLICK",e.UPDATE="APP::BUTTON::UPDATE"}(t.ActionType||(t.ActionType={})),function(e){e.Print="print"}(t.Icon||(t.Icon={})),function(e){e.Danger="danger"}(t.Style||(t.Style={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.UPDATE="UPDATE"}(t.Action||(t.Action={})),function(e){e.UPDATE="APP::BUTTONGROUP::UPDATE"}(t.ActionType||(t.ActionType={}))},function(e,t,n){"use strict";function a(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),a(n(221)),a(n(91))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.FETCH="APP::CART::FETCH",e.UPDATE="APP::CART::UPDATE",e.SET_CUSTOMER="APP::CART::SET_CUSTOMER",e.REMOVE_CUSTOMER="APP::CART::REMOVE_CUSTOMER",e.ADD_CUSTOMER_ADDRESS="APP::CART::ADD_CUSTOMER_ADDRESS",e.UPDATE_CUSTOMER_ADDRESS="APP::CART::UPDATE_CUSTOMER_ADDRESS",e.SET_DISCOUNT="APP::CART::SET_DISCOUNT",e.REMOVE_DISCOUNT="APP::CART::REMOVE_DISCOUNT",e.SET_PROPERTIES="APP::CART::SET_PROPERTIES",e.REMOVE_PROPERTIES="APP::CART::REMOVE_PROPERTIES",e.CLEAR="APP::CART::CLEAR",e.ADD_LINE_ITEM="APP::CART::ADD_LINE_ITEM",e.UPDATE_LINE_ITEM="APP::CART::UPDATE_LINE_ITEM",e.REMOVE_LINE_ITEM="APP::CART::REMOVE_LINE_ITEM",e.SET_LINE_ITEM_DISCOUNT="APP::CART::SET_LINE_ITEM_DISCOUNT",e.REMOVE_LINE_ITEM_DISCOUNT="APP::CART::REMOVE_LINE_ITEM_DISCOUNT",e.SET_LINE_ITEM_PROPERTIES="APP::CART::SET_LINE_ITEM_PROPERTIES",e.REMOVE_LINE_ITEM_PROPERTIES="APP::CART::REMOVE_LINE_ITEM_PROPERTIES"}(t.ActionType||(t.ActionType={})),function(e){e.FETCH="FETCH",e.UPDATE="UPDATE",e.SET_CUSTOMER="SET_CUSTOMER",e.REMOVE_CUSTOMER="REMOVE_CUSTOMER",e.ADD_CUSTOMER_ADDRESS="ADD_CUSTOMER_ADDRESS",e.UPDATE_CUSTOMER_ADDRESS="UPDATE_CUSTOMER_ADDRESS",e.SET_DISCOUNT="SET_DISCOUNT",e.REMOVE_DISCOUNT="REMOVE_DISCOUNT",e.SET_PROPERTIES="SET_PROPERTIES",e.REMOVE_PROPERTIES="REMOVE_PROPERTIES",e.CLEAR="CLEAR",e.ADD_LINE_ITEM="ADD_LINE_ITEM",e.UPDATE_LINE_ITEM="UPDATE_LINE_ITEM",e.REMOVE_LINE_ITEM="REMOVE_LINE_ITEM",e.SET_LINE_ITEM_DISCOUNT="SET_LINE_ITEM_DISCOUNT",e.REMOVE_LINE_ITEM_DISCOUNT="REMOVE_LINE_ITEM_DISCOUNT",e.SET_LINE_ITEM_PROPERTIES="SET_LINE_ITEM_PROPERTIES",e.REMOVE_LINE_ITEM_PROPERTIES="REMOVE_LINE_ITEM_PROPERTIES"}(t.Action||(t.Action={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.UPDATE="APP::FEATURES::UPDATE",e.REQUEST="APP::FEATURES::REQUEST",e.REQUEST_UPDATE="APP::FEATURES::REQUEST::UPDATE"}(t.ActionType||(t.ActionType={})),function(e){e.UPDATE="UPDATE",e.REQUEST="REQUEST",e.REQUEST_UPDATE="REQUEST::UPDATE"}(t.Action||(t.Action={}))},function(e,t,n){"use strict";var a,r=this&&this.__extends||(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(9),l=n(10);!function(e){e.ENTER="ENTER",e.EXIT="EXIT"}(t.Action||(t.Action={})),function(e){e.ENTER="APP::FULLSCREEN::ENTER",e.EXIT="APP::FULLSCREEN::EXIT"}(i=t.ActionType||(t.ActionType={}));var c=function(e){function t(t){return e.call(this,t,l.Group.Fullscreen,l.Group.Fullscreen)||this}return r(t,e),Object.defineProperty(t.prototype,"payload",{get:function(){return{id:this.id}},enumerable:!0,configurable:!0}),t.prototype.dispatch=function(e){return this.app.dispatch(o.actionWrapper({group:this.group,type:i[e],payload:this.payload})),this},t}(o.ActionSet);t.Fullscreen=c,t.create=function(e){return new c(e)}},function(e,t,n){"use strict";function a(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),a(n(227)),a(n(95))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.START="APP::LOADING::START",e.STOP="APP::LOADING::STOP"}(t.ActionType||(t.ActionType={})),function(e){e.START="START",e.STOP="STOP"}(t.Action||(t.Action={}))},function(e,t,n){"use strict";function a(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),a(n(97)),a(n(67))},function(e,t,n){"use strict";var a,r=this&&this.__extends||(a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,a=arguments.length;n=0||(r[n]=e[n]);return r}(t,["children"]);if(delete a.in,delete a.mountOnEnter,delete a.unmountOnExit,delete a.appear,delete a.enter,delete a.exit,delete a.timeout,delete a.addEndListener,delete a.onEnter,delete a.onEntering,delete a.onEntered,delete a.onExit,delete a.onExiting,delete a.onExited,"function"==typeof n)return n(e,a);var i=r.default.Children.only(n);return r.default.cloneElement(i,a)},a}(r.default.Component);function m(){}p.contextTypes={transitionGroup:a.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:m,onEntering:m,onEntered:m,onExit:m,onExiting:m,onExited:m},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var h=(0,o.polyfill)(p);t.default=h},function(e,t,n){"use strict";function a(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,a=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,a)}finally{this.props=n,this.state=a}}function o(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,o=null,l=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==o||null!==l){var c=e.displayName||e.name,s="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+c+" uses "+s+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==o?"\n "+o:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=a,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var a=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,a)}}return e}n.r(t),n.d(t,"polyfill",function(){return o}),a.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;var a;(a=n(8))&&a.__esModule;t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var a=l(n(8)),r=l(n(0)),i=n(113),o=n(267);function l(e){return e&&e.__esModule?e:{default:e}}function c(){return(c=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,["component","childFactory"]),i=u(this.state.children).map(n);return delete a.appear,delete a.enter,delete a.exit,null===t?i:r.default.createElement(t,a,i)},a}(r.default.Component);d.childContextTypes={transitionGroup:a.default.object.isRequired},d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,i.polyfill)(d);t.default=p,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={currentVersion:"0.32.0",minimumVersion:"0.1.0"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,r=function(){function e(e,t){for(var n=0;n0?a:n)(e)}},function(e,t,n){var a=n(303)("keys"),r=n(305);e.exports=function(e){return a[e]||(a[e]=r(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var a=n(122);e.exports=function(e){return Object(a(e))}},function(e,t,n){e.exports=n(307)},function(e,t,n){"use strict";function a(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",function(){return a})},function(e,t,n){e.exports=n(313)},function(e,t,n){e.exports=n(321)},function(e,t,n){e.exports=n(133)},function(e,t,n){"use strict";var a=p(n(0)),r=n(16),i=p(n(20)),o=p(n(268)),l=p(n(270)),c=p(n(116)),s=p(n(117)),u=p(n(271)),d=p(n(273));function p(e){return e&&e.__esModule?e:{default:e}}n(337);var m=(0,o.default)({apiKey:"b5c7553f622953ed2e930932c74bd43d",notifyReleaseStages:["production"],appVersion:c.default.currentVersion});m.use(l.default,a.default);var h=m.getPlugin("react");i.default.render(a.default.createElement(r.AppProvider,null,a.default.createElement(h,{FallbackComponent:u.default},a.default.createElement(s.default,null),a.default.createElement(d.default,null))),document.getElementById("root"))},function(e,t,n){"use strict"; /** @license React v16.8.6 * react.production.min.js * @@ -62,4 +62,4 @@ Object.defineProperty(t,"__esModule",{value:!0});var n=null,a=!1,r=3,i=-1,o=-1,l * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&Symbol.for,r=a?Symbol.for("react.element"):60103,i=a?Symbol.for("react.portal"):60106,o=a?Symbol.for("react.fragment"):60107,l=a?Symbol.for("react.strict_mode"):60108,c=a?Symbol.for("react.profiler"):60114,s=a?Symbol.for("react.provider"):60109,u=a?Symbol.for("react.context"):60110,d=a?Symbol.for("react.async_mode"):60111,p=a?Symbol.for("react.concurrent_mode"):60111,m=a?Symbol.for("react.forward_ref"):60112,h=a?Symbol.for("react.suspense"):60113,f=a?Symbol.for("react.memo"):60115,g=a?Symbol.for("react.lazy"):60116;function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case p:case o:case c:case l:case h:return e;default:switch(e=e&&e.$$typeof){case u:case m:case s:return e;default:return t}}case g:case f:case i:return t}}}function b(e){return v(e)===p}t.typeOf=v,t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=u,t.ContextProvider=s,t.Element=r,t.ForwardRef=m,t.Fragment=o,t.Lazy=g,t.Memo=f,t.Portal=i,t.Profiler=c,t.StrictMode=l,t.Suspense=h,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===p||e===c||e===l||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===s||e.$$typeof===u||e.$$typeof===m)},t.isAsyncMode=function(e){return b(e)||v(e)===d},t.isConcurrentMode=b,t.isContextConsumer=function(e){return v(e)===u},t.isContextProvider=function(e){return v(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return v(e)===m},t.isFragment=function(e){return v(e)===o},t.isLazy=function(e){return v(e)===g},t.isMemo=function(e){return v(e)===f},t.isPortal=function(e){return v(e)===i},t.isProfiler=function(e){return v(e)===c},t.isStrictMode=function(e){return v(e)===l},t.isSuspense=function(e){return v(e)===h}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var a=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};a.get||a.set?Object.defineProperty(t,n,a):t[n]=e[n]}t.default=e}(n(8));var a=l(n(262)),r=l(n(265)),i=l(n(0)),o=l(n(112));n(114);function l(e){return e&&e.__esModule?e:{default:e}}function c(){return(c=Object.assign||function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,["children","in"]),o=a.default.Children.toArray(t),l=o[0],c=o[1];return delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,a.default.createElement(i.default,r,n?a.default.cloneElement(l,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):a.default.cloneElement(c,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},o}(a.default.Component);l.propTypes={};var c=l;t.default=c,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=r,t.mergeChildMappings=i,t.getInitialChildMapping=function(e,t){return r(e.children,function(n){return(0,a.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:o(n,"appear",e),enter:o(n,"enter",e),exit:o(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var l=r(e.children),c=i(t,l);return Object.keys(c).forEach(function(r){var i=c[r];if((0,a.isValidElement)(i)){var s=r in t,u=r in l,d=t[r],p=(0,a.isValidElement)(d)&&!d.props.in;!u||s&&!p?u||!s||p?u&&s&&(0,a.isValidElement)(d)&&(c[r]=(0,a.cloneElement)(i,{onExited:n.bind(null,i),in:d.props.in,exit:o(i,"exit",e),enter:o(i,"enter",e)})):c[r]=(0,a.cloneElement)(i,{in:!1}):c[r]=(0,a.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:o(i,"exit",e),enter:o(i,"enter",e)})}}),c};var a=n(0);function r(e,t){var n=Object.create(null);return e&&a.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,a.isValidElement)(e)?t(e):e}(e)}),n}function i(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var a,r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var l={};for(var c in t){if(r[c])for(a=0;a=e&&n<=t}},stringWithLength:function(e){return"string"==typeof e&&!!e.length}},o={},l=r.filter,c=r.reduce,s=r.keys,u=r.isArray,d=r.includes,p=i.intRange,m=i.stringWithLength;function h(){return(h=Object.assign||function(e){for(var t=1;t-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),a=this.extractLocation(n.pop()),r=n.join(" ")||void 0,i=["eval",""].indexOf(a[0])>-1?void 0:a[0];return new e({functionName:r,fileName:i,lineNumber:a[1],columnNumber:a[2],source:t})},this)},parseFFOrSafari:function(t){var n=t.stack.split("\n").filter(function(e){return!e.match(a)},this);return n.map(function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new e({functionName:t});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,a=t.match(n),r=a&&a[1]?a[1]:void 0,i=this.extractLocation(t.replace(n,""));return new e({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:t})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,a=t.message.split("\n"),r=[],i=2,o=a.length;i/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(n=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var l=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new e({functionName:o,args:l,fileName:r[0],lineNumber:r[1],columnNumber:r[2],source:t})},this)}}});var x=E,L=function(e){return!(!e||!e.stack&&!e.stacktrace&&!e["opera#sourceloc"]||"string"!=typeof(e.stack||e.stacktrace||e["opera#sourceloc"])||e.stack===e.name+": "+e.message)},w={};function I(){return(I=Object.assign||function(e){for(var t=1;t-1&&!t.file&&!t.method&&(t.file="global code"),t},T=function(e){return/^global code$/i.test(e)?"global code":e},O=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},z=function(e,t){return"string"==typeof e&&e?e:t};D.getStacktrace=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),L(e)?x.parse(e).slice(t):C(w.backtrace(),function(e){return-1===(e.functionName||"").indexOf("StackGenerator$$")}).slice(1+n)},D.ensureReport=function(e,t,n){if(void 0===t&&(t=0),void 0===n&&(n=0),e.__isBugsnagReport)return e;try{var a=D.getStacktrace(e,t,1+n);return new D(e.name,e.message,a)}catch(t){return new D(e.name,e.message,[])}};var k=D,B=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},H="object"==typeof window?window:self,R=0;for(var U in H)Object.hasOwnProperty.call(H,U)&&R++;var V=navigator.mimeTypes?navigator.mimeTypes.length:0,F=B((V+navigator.userAgent.length).toString(36)+R.toString(36),4),Y=function(){return F},Q=0,W=4,G=36,q=Math.pow(G,W);function Z(){return B((Math.random()*q<<0).toString(G),W)}function K(){var e=(new Date).getTime().toString(G),t=B((Q=Q1?t-1:0),a=1;athis.config.maxBreadcrumbs&&(this.breadcrumbs=this.breadcrumbs.slice(this.breadcrumbs.length-this.config.maxBreadcrumbs)),this}},t.notify=function(e,t,n){var a=this;if(void 0===t&&(t={}),void 0===n&&(n=function(){}),!this._configured)throw new Error("client not configured");var r=_(this),i=ie(e,t,this._logger),o=i.err,l=i.errorFramesToSkip,c=i._opts;if(c&&(t=c),!o){var s=ce("nothing");this._logger.warn("Usage error. "+s),o=new Error("Bugsnag usage error. "+s)}"object"==typeof t&&null!==t||(t={});var u=k.ensureReport(o,l,1);if(u.app=ee({},{releaseStage:r},u.app,this.app),u.context=u.context||t.context||this.context||void 0,u.device=ee({},u.device,this.device,t.device),u.request=ee({},u.request,this.request,t.request),u.user=ee({},u.user,this.user,t.user),u.metaData=ee({},u.metaData,this.metaData,t.metaData),u.breadcrumbs=this.breadcrumbs.slice(0),this._session&&(this._session.trackError(u),u.session=this._session),void 0!==t.severity&&(u.severity=t.severity,u._handledState.severityReason={type:"userSpecifiedSeverity"}),ae(this.config.notifyReleaseStages)&&!ne(this.config.notifyReleaseStages,r))return this._logger.warn("Report not sent due to releaseStage/notifyReleaseStages configuration"),!1;var d=u.severity,p=[].concat(t.beforeSend).concat(this.config.beforeSend),m=function(e){a._logger.error("Error occurred in beforeSend callback, continuing anyway…"),a._logger.error(e)};!function(e,t,n){var a=e.length,r=0,i=function(){if(r>=a)return n(null,!1);t(e[r],function(e,t){return e?n(e,!1):!0===t?n(null,!0):(r++,void i())})};i()}(p,function(e,t){return function(n,a){if("function"!=typeof n)return a(null,!1);try{if(2!==n.length){var r=n(e);return r&&"function"==typeof r.then?r.then(function(t){return setTimeout(function(){return a(null,A(e,t))},0)},function(e){setTimeout(function(){return t(e),a(null,!1)})}):a(null,A(e,r))}n(e,function(n,r){if(n)return t(n),a(null,!1);a(null,A(e,r))})}catch(e){t(e),a(null,!1)}}}(u,m),function(e,t){if(e&&m(e),t)return a._logger.debug("Report not sent due to beforeSend callback"),!1;a.config.autoBreadcrumbs&&a.leaveBreadcrumb(u.errorClass,{errorClass:u.errorClass,errorMessage:u.errorMessage,severity:u.severity,stacktrace:u.stacktrace},"error"),d!==u.severity&&(u._handledState.severityReason={type:"userCallbackSetSeverity"}),a._delivery.sendReport(a._logger,a.config,{apiKey:u.apiKey||a.config.apiKey,notifier:a.notifier,events:[u]},function(e){return n(e,u)})})},e}(),ie=function(e,t,n){var a,r,i=0;switch(typeof e){case"string":if("string"==typeof t){var o=ce("string/string");n.warn("Usage error. "+o),a=new Error("Bugsnag usage error. "+o),r={metaData:{notifier:{notifyArgs:[e,t]}}}}else a=new Error(String(e)),i+=2;break;case"number":case"boolean":a=new Error(String(e));break;case"function":var l=ce("function");n.warn("Usage error. "+l),a=new Error("Bugsnag usage error. "+l);break;case"object":if(null!==e&&(j(e)||e.__isBugsnagReport))a=e;else if(null!==e&&oe(e))(a=new Error(e.message||e.errorMessage)).name=e.name||e.errorClass,i+=2;else{var c=ce("unsupported object");n.warn("Usage error. "+c),a=new Error("Bugsnag usage error. "+c)}}return{err:a,errorFramesToSkip:i,_opts:r}},oe=function(e){return!("string"!=typeof e.name&&"string"!=typeof e.errorClass||"string"!=typeof e.message&&"string"!=typeof e.errorMessage)},le=function(e){return"Bugsnag configuration error\n"+te(e,function(e){return'"'+e.key+'" '+e.message+" \n got "+se(e.value)}).join("\n\n")},ce=function(e){return"notify() expected error/opts parameters, got "+e},se=function(e){return"object"==typeof e?JSON.stringify(e):String(e)},ue=re,de=function(e,t,n,a){var r=a&&a.filterKeys?a.filterKeys:[],i=a&&a.filterPaths?a.filterPaths:[];return JSON.stringify(function(e,t,n){var a=[],r=0;return function e(i,o){function l(){return o.length>he&&r>me}if(r++,o.length>pe)return fe;if(l())return fe;if(null===i||"object"!=typeof i)return i;if(function(e,t){for(var n=0,a=e.length;n1e6&&(delete e.events[0].metaData,e.events[0].metaData={notifier:"WARNING!\nSerialized payload was "+n.length/1e6+"MB (limit = 1MB)\nmetaData was removed"},(n=de(e,null,null,{filterPaths:_e,filterKeys:t})).length>1e6))throw new Error("payload exceeded 1MB limit");return n},ye.session=function(e,t){var n=de(e,null,null,{filterPaths:je,filterKeys:t});if(n.length>1e6)throw new Error("payload exceeded 1MB limit");return n};var Ae={},Se=r.isoDate;Ae=function(e){return void 0===e&&(e=window),{sendReport:function(t,n,a,r){void 0===r&&(r=function(){});var i=Ee(n,"notify","4",e),o=new e.XDomainRequest;o.onload=function(){r(null)},o.open("POST",i),setTimeout(function(){try{o.send(ye.report(a,n.filters))}catch(e){t.error(e),r(e)}},0)},sendSession:function(t,n,a,r){void 0===r&&(r=function(){});var i=Ee(n,"sessions","1",e),o=new e.XDomainRequest;o.onload=function(){r(null)},o.open("POST",i),setTimeout(function(){try{o.send(ye.session(a,n.filters))}catch(e){t.error(e),r(e)}},0)}}};var Ee=function(e,t,n,a){return xe(e.endpoints[t],a.location.protocol)+"?apiKey="+encodeURIComponent(e.apiKey)+"&payloadVersion="+n+"&sentAt="+encodeURIComponent(Se())},xe=Ae._matchPageProtocol=function(e,t){return"http:"===t?e.replace(/^https:/,"http:"):e},Le=r.isoDate,we={init:function(e,t){void 0===t&&(t=window),e.config.beforeSend.unshift(function(e){e.context||(e.context=t.location.pathname)})}};function Ie(){return(Ie=Object.assign||function(e){for(var t=1;t/,Je=/<\/script>.*$/,Xe=(qe={init:function(e,t,n){void 0===t&&(t=document),void 0===n&&(n=window);var a="",r=!1,i=function(){return t.documentElement.outerHTML},o=n.location.href;a=i();var l=t.onreadystatechange;t.onreadystatechange=function(){"interactive"===t.readyState&&(a=i(),r=!0),"function"==typeof l&&l.apply(this,arguments)},e.config.beforeSend.unshift(function(e){var t=e.stacktrace[0];if(!t||!t.file||!t.lineNumber)return t;if(t.file.replace(/#.*$/,"")!==o.replace(/#.*$/,""))return t;r&&a||(a=i());var n=["\x3c!-- DOC START --\x3e"].concat(a.split("\n")),l=Xe(n,t.lineNumber-1),c=l.script,s=l.start,u=Ze(c,function(e,n,a){return Math.abs(s+a+1-t.lineNumber)>10?e:(e[""+(s+a+1)]=n,e)},{});t.code=u,e.updateMetaData("script",{content:c.join("\n")})})}}).extractScriptContent=function(e,t){for(var n=t;n0&&!Ke.test(e[n]);)n--;var r=n,i=e.slice(r,a+1);return i[0]=i[0].replace(Ke,""),i[i.length-1]=i[i.length-1].replace(Je,""),{script:i,start:r}},$e={init:function(e,t){if(void 0===t&&(t=window),"addEventListener"in t){var n=!1===e.config.interactionBreadcrumbsEnabled,a=!1===e.config.autoBreadcrumbs&&!0!==e.config.interactionBreadcrumbsEnabled;n||a||t.addEventListener("click",function(n){var a,r;try{a=et(n.target),r=function e(t,n){var a=[t.tagName];if(t.id&&a.push("#"+t.id),t.className&&t.className.length&&a.push("."+t.className.split(" ").join(".")),!n.document.querySelectorAll||!Array.prototype.indexOf)return a.join("");try{if(1===n.document.querySelectorAll(a.join("")).length)return a.join("")}catch(e){return a.join("")}if(t.parentNode.childNodes.length>1){var r=Array.prototype.indexOf.call(t.parentNode.childNodes,t)+1;a.push(":nth-child("+r+")")}return 1===n.document.querySelectorAll(a.join("")).length?a.join(""):t.parentNode?e(t.parentNode,n)+" > "+a.join(""):a.join("")}(n.target,t)}catch(t){a="[hidden]",r="[hidden]",e._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/y94fq5zm")}e.leaveBreadcrumb("UI click",{targetText:a,targetSelector:r},"user")},!0)}},configSchema:{interactionBreadcrumbsEnabled:{defaultValue:function(){},validate:function(e){return!0===e||!1===e||void 0===e},message:"should be true|false"}}},et=function(e){var t,n,a=e.textContent||e.innerText||"";return a||"submit"!==e.type&&"button"!==e.type||(a=e.value),a=a.replace(/^\s+|\s+$/g,""),n=140,(t=a)&&t.length<=n?t:t.slice(0,n-"(...)".length)+"(...)"},tt={init:function(e,t){if(void 0===t&&(t=window),"addEventListener"in t){var n=!1===e.config.navigationBreadcrumbsEnabled,a=!1===e.config.autoBreadcrumbs&&!0!==e.config.navigationBreadcrumbsEnabled;if(!n&&!a){var r=function(t){return function(){return e.leaveBreadcrumb(t,{},"navigation")}};t.addEventListener("pagehide",r("Page hidden"),!0),t.addEventListener("pageshow",r("Page shown"),!0),t.addEventListener("load",r("Page loaded"),!0),t.document.addEventListener("DOMContentLoaded",r("DOMContentLoaded"),!0),t.addEventListener("load",function(){return t.addEventListener("popstate",r("Navigated back"),!0)}),t.addEventListener("hashchange",function(n){var a=n.oldURL?{from:nt(n.oldURL,t),to:nt(n.newURL,t),state:rt(t)}:{to:nt(t.location.href,t)};e.leaveBreadcrumb("Hash changed",a,"navigation")},!0),t.history.replaceState&&at(e,t.history,"replaceState",t),t.history.pushState&&at(e,t.history,"pushState",t),e.leaveBreadcrumb("Bugsnag loaded",{},"navigation")}}},configSchema:{navigationBreadcrumbsEnabled:{defaultValue:function(){},validate:function(e){return!0===e||!1===e||void 0===e},message:"should be true|false"}}},nt=function(e,t){var n=t.document.createElement("A");return n.href=e,""+n.pathname+n.search+n.hash},at=function(e,t,n,a){var r=t[n];t[n]=function(i,o,l){e.leaveBreadcrumb("History "+n,function(e,t,n,a){var r=nt(e.location.href,e);return{title:n,state:t,prevState:rt(e),to:a||r,from:r}}(a,i,o,l),"navigation"),"function"==typeof e.refresh&&e.refresh(),e.session&&e.startSession(),r.apply(t,[i,o].concat(void 0!==l?l:[]))},t[n]._restore=function(){t[n]=r}},rt=function(e){try{return e.history.state}catch(e){}},it={},ot="request",lt="BS~~U",ct="BS~~M",st=r.includes,ut=function(){return[Qe.config.endpoints.notify,Qe.config.endpoints.sessions]};it.init=function(e,t){void 0===t&&(t=window);var n=!1===e.config.networkBreadcrumbsEnabled,a=!1===e.config.autoBreadcrumbs&&!0!==e.config.networkBreadcrumbsEnabled;n||a||(Qe=e,We=t,dt(),ht())},it.configSchema={networkBreadcrumbsEnabled:{defaultValue:function(){},validate:function(e){return!0===e||!1===e||void 0===e},message:"should be true|false"}};var dt=function(){if("addEventListener"in We.XMLHttpRequest.prototype){var e=We.XMLHttpRequest.prototype.open;We.XMLHttpRequest.prototype.open=function(t,n){this[lt]=n,this[ct]=t,this["BS~~S"]&&(this.removeEventListener("load",pt),this.removeEventListener("error",mt)),this.addEventListener("load",pt),this.addEventListener("error",mt),this["BS~~S"]=!0,e.apply(this,arguments)}}};function pt(){if(!st(ut(),this[lt])){var e={status:this.status,request:this[ct]+" "+this[lt]};this.status>=400?Qe.leaveBreadcrumb("XMLHttpRequest failed",e,ot):Qe.leaveBreadcrumb("XMLHttpRequest succeeded",e,ot)}}function mt(){st(ut(),this[lt])||Qe.leaveBreadcrumb("XMLHttpRequest error",{request:this[ct]+" "+this[lt]},ot)}var ht=function(){if("fetch"in We){var e=We.fetch;We.fetch=function(){for(var t=arguments.length,n=new Array(t),a=0;a=400?Qe.leaveBreadcrumb("fetch() failed",a,ot):Qe.leaveBreadcrumb("fetch() succeeded",a,ot)},gt=function(e,t){Qe.leaveBreadcrumb("fetch() error",{request:e+" "+t},ot)},vt=i.intRange,bt={init:function(e){var t=0;e.config.beforeSend.push(function(n){if(t>=e.config.maxEvents)return n.ignore();t++}),e.refresh=function(){t=0}},configSchema:{maxEvents:{defaultValue:function(){return 10},message:"should be a positive integer ≤100",validate:function(e){return vt(1,100)(e)}}}},Mt={};function yt(){return(yt=Object.assign||function(e){for(var t=1;t0||this.state.showForm)&&!confirm("Changing the script type will clear your current campaigns. Are you sure?"))return;gtag("event","typeChange");var t=JSON.parse(JSON.stringify(this.defaultState));t.scriptType=e,t.availableCampaigns=this.getCampaigns(e),this.setState(t)}},{key:"reset",value:function(){gtag("event","resetButtonClick"),confirm("Are you sure you want to clear your work and start over?")&&(gtag("event","reset"),this.setState(JSON.parse(JSON.stringify(this.defaultState))))}},{key:"getCampaigns",value:function(e){switch(e){case"line_item":return M.default.campaigns;case"shipping":return y.default.campaigns;case"payment":return _.default.campaigns;default:console.warn("Invalid type")}}},{key:"updateCurrentCampaign",value:function(e){var t=this.state;t.currentCampaign=this.getCampaignInfo(e),this.setState(t)}},{key:"getCampaignInfo",value:function(e){return this.state.availableCampaigns.filter(function(t){return t.value===e})[0]}},{key:"getCampaignById",value:function(e){return this.state.campaigns.filter(function(t){return t.id===e})[0]}},{key:"editCampaign",value:function(e){gtag("event","editButtonClick");var t=this.state;t.showForm=!0;var n=this.getCampaignById(e);t.currentCampaign=this.getCampaignInfo(n.name),t.editCampaignInfo=n,t.output="",this.setState(t)}},{key:"duplicateCampaign",value:function(e){gtag("event","duplicateButtonClick");var t=JSON.parse(JSON.stringify(this.getCampaignById(e)));t.id=null,this.addCampaign(t)}},{key:"toggleCampaignActive",value:function(e){var t=this.state,n=(0,S.findIndexOf)(t.campaigns,function(t){return t.id===e});t.campaigns[n].active=!this.state.campaigns[n].active,this.state.editCampaignInfo&&t.editCampaignInfo.id===e&&(t.editCampaignInfo.active=t.campaigns[n].active),t.output="",this.setState(t),this.prepareAndExportTo("localStorage")}},{key:"handleSort",value:function(e,t){var n;if(e!==t){var a=this.state,r=a.campaigns.splice(e,1);(n=a.campaigns).splice.apply(n,[t,0].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:0;if(gtag("event","generateButtonClick"),this.state.showForm)alert("Save or discard changes to the current campaign first.");else{var t=this.state,n="# GENERATED BY THE SHOPIFY SCRIPT CREATOR APP\n",a=this.generateCampaignsOutput();if(e>0)a=n+(0,v.minifyRuby)(a,{level:e}).result;else a=n+a,t.savedCount=0;t.showForm=!1,t.output=a,t.currentCount=a.length,this.setState(t)}}},{key:"generateCampaignsOutput",value:function(){var e=this,t=null,n=[],a={};switch(this.IL=0,this.state.scriptType){case"line_item":Object.assign(a,j.default.classes,M.default.classes),t=M.default.defaultCode;break;case"shipping":Object.assign(a,j.default.classes,y.default.classes),t=y.default.defaultCode;break;case"payment":Object.assign(a,j.default.classes,_.default.classes),t=_.default.defaultCode;break;default:throw Error("Invalid script type")}var r=this.state.campaigns.filter(function(e){return!0===e.active||void 0===e.active}).map(function(t){e.IL++;var r=e.generateCode(t,n,a);return e.IL--,r}).join(",\n");r=r.substring(r.length,0);var i=function(e,t){var n="";return t.forEach(function(t){if(!e[t])throw Error("Missing class "+t);n+=e[t]+"\n"}),n}(a,n);return i=i.substring(1),i+=t.replace("|",r)}},{key:"generateCode",value:function(e,t,n){var r=this;if(!e.skip){var i={1:" ",2:" ",3:" ",4:" ",5:" "};l(e.name,n),e.dependants&&e.dependants.forEach(function(e){return l(e,n)});var o=e.inputs.map(function(e,o){if(e.inputs){r.IL++;var c=r.generateCode(e,t,n);return r.IL--,c}return"object"===(void 0===e?"undefined":a(e))&&"none"!==e.name?(l(e.name,n),""+i[r.IL+1]+e.name+".new()"):"object"===(void 0===e?"undefined":a(e))&&"none"===e.name?i[r.IL+1]+"nil":""+i[r.IL+1]+e}).join(",\n");return""+i[this.IL]+e.name+".new(\n"+o+"\n"+i[this.IL]+")"}function l(e,n){var a=void 0;if(!n[e])throw Error("Missing class "+e);(a=n[e].split("\n")[1]).indexOf("<")>-1&&(a=a.split("<")[1].trim(),-1===t.indexOf(a)&&t.push(a)),-1===t.indexOf(e)&&t.push(e)}}},{key:"download",value:function(e,t,n){e=JSON.stringify(e);var a=new Blob([e],{type:n});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(a,t);else{var r=document.createElement("a"),i=URL.createObjectURL(a);r.href=i,r.download=t,document.body.appendChild(r),r.click(),setTimeout(function(){document.body.removeChild(r),window.URL.revokeObjectURL(i)},10)}}},{key:"uploadFile",value:function(){var e=this;if(gtag("event","importButtonClick"),!window.FileReader)return alert("Sorry, your browser does not support importing files."),!1;var t=document.querySelector("#FileImport");t||((t=document.createElement("input")).type="file",t.id="FileImport",t.style.display="none",document.body.appendChild(t),t.addEventListener("change",function(t){gtag("event","importAttempt"),e.readFile(t.target,function(n){e.loadImportedData(n)&&(e.prepareAndExportTo("localStorage"),gtag("event","importSuccess")),document.body.removeChild(t.target)})})),t.click()}},{key:"loadImportedData",value:function(e){if(e&&e.campaigns.length>0){var t=JSON.parse(JSON.stringify(this.defaultState));"line_item"!==e.type&&(t.scriptType=e.type,t.availableCampaigns=this.getCampaigns(e.type));var n=e.campaigns;n.reverse().forEach(function(e){e.id&&t.campaigns.unshift(e)});var a=n.sort(function(e,t){return t.id-e.id})[0].id+1;return t.currentId=a,this.setState(t),!0}return!1}},{key:"saveDataToStorage",value:function(e){e?localStorage.setItem("lastState",JSON.stringify(e)):localStorage.removeItem("lastState")}},{key:"readFile",value:function(e,t){var n=this,a=new FileReader;if(e.files.length){var r=e.files[0];a.readAsText(r),a.addEventListener("load",function(e){var a=n.processFile(e.target.result);t(a)})}}},{key:"processFile",value:function(e,t){var n=null;if(e&&(t||e.length))try{if((n=JSON.parse(e)).version.indexOf("ShopifyScriptCreatorFile")<0)throw Error;var a=n.version.split("ShopifyScriptCreatorFile-V")[1].split("-")[0];if((0,S.meetsMinimumVersion)(a,this.minimumVersion)){if(!n.type||!n.campaigns)throw Error;return n}t?(alert("The current saved data appears to be from an older version of Shopify Script Creator and will not work with the current version. This data will be cleared from storage."),this.saveDataToStorage(null)):alert("This file appears to be from an older version of Shopify Script Creator and will not work with the current version")}catch(e){alert("File does not appear to be a valid script creator file")}else alert("File does not appear to be a valid script creator file");return null}},{key:"prepareAndExportTo",value:function(e){var t="SSC-V"+this.version+"-script-"+parseInt(1e8*Math.random())+".txt",n=this.state.campaigns.filter(function(e){return!e.skip}),a={version:"ShopifyScriptCreatorFile-V"+this.version,type:this.state.scriptType,campaigns:n};switch(e){case"file":gtag("event","export"),this.download(a,t,"text/plain");break;case"localStorage":this.saveDataToStorage(a);break;default:return a}}},{key:"setMinification",value:function(e){this.generateScript(e)}},{key:"render",value:function(){var e=this,t={content:"Generate script",onAction:this.generateScript},n={content:"Reset",destructive:!0,onAction:this.reset},a={content:"Leave feedback",icon:c.ChatMajorMonotone,external:!0,plain:!0,url:"https://docs.google.com/forms/d/e/1FAIpQLSdBHeVvdU92fc8vsqRuvx5uWuYQFsW8U3Co5HDIusH8YEH_VA/viewform"},r=[{content:"Export campaigns",onAction:function(){return e.prepareAndExportTo("file")},icon:c.ExportMinor},{content:"Import campaigns",onAction:this.uploadFile,icon:c.ImportMinor}];return o.default.createElement(l.Page,{title:"Shopify Script Creator",secondaryActions:r,primaryAction:a},this.state.modal.isOpen&&o.default.createElement(u.default,{title:this.state.modal.title,content:this.state.modal.content,inputs:this.state.modal.inputs,isOpen:this.state.modal.isOpen,onClose:this.state.modal.onClose,actions:this.state.modal.actions}),o.default.createElement(s.default,{currentVersion:this.version}),o.default.createElement(l.Layout,null,o.default.createElement(l.Layout.Section,null,o.default.createElement(d.default,{changeType:this.typeChange,currentType:this.state.scriptType}),this.state.showForm&&o.default.createElement(p.default,{currentCampaign:this.state.currentCampaign,availableCampaigns:this.state.availableCampaigns,updateCurrentCampaign:this.updateCurrentCampaign,addCampaign:this.addCampaign,showForm:this.showForm,existingInfo:this.state.editCampaignInfo,openModal:this.openModal}),this.state.output&&o.default.createElement(h.default,{output:this.state.output,setMinification:this.setMinification,currentCount:this.state.currentCount,maxCount:this.state.maxCount}),!this.state.showForm&&!this.state.output&&(0===e.state.campaigns.length?o.default.createElement(l.EmptyState,{heading:"Add your campaigns to generate a script",action:{content:"Add campaign",onAction:function(){return e.showForm(!0)}}},o.default.createElement("p",null,"Select a script type, add some campaigns and then click ",o.default.createElement("strong",null,"Generate script")," to generate script code to paste into the Script Editor app. Try adding a campaign first.")):o.default.createElement(l.EmptyState,{heading:"Your script is ready to go! You can also add additional campaigns.",action:{content:"Generate script",onAction:e.generateScript},secondaryAction:{content:"Add another campaign",onAction:function(){return e.showForm(!0)}}},o.default.createElement("p",null,"Add more campaigns to your script, or generate your script code now.")))),o.default.createElement(l.Layout.Section,{secondary:!0},o.default.createElement(m.default,{campaigns:this.state.campaigns,editCampaign:this.editCampaign,toggleActive:this.toggleCampaignActive,removeCampaign:this.removeCampaign,duplicateCampaign:this.duplicateCampaign,handleSort:this.handleSort,showForm:this.showForm,isEditing:!!this.state.editCampaignInfo}))),o.default.createElement(l.PageActions,{primaryAction:t,secondaryActions:n}),o.default.createElement(f.default,null))}}]),t}();t.default=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return a.default.createElement("div",{className:"version-box"},a.default.createElement("a",{href:"https://github.com/jgodson/shopify-script-creator/releases",target:"_blank",rel:"noopener noreferrer"},"Version ",e.currentVersion))};var a=r(n(0));r(n(275));function r(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var a=n(276);"string"==typeof a&&(a=[[e.i,a,""]]);var r={hmr:!0,transform:void 0};n(27)(a,r);a.locals&&(e.exports=a.locals)},function(e,t,n){(e.exports=n(26)(!1)).push([e.i,".version-box {\n position: absolute;\n font-family: monospace;\n font-size: 14px;\n width: 70px;\n background: #47C1BF;\n top: 5px;\n right: 5px;\n text-align: center;\n border-radius: 3px;\n}\n\n.version-box a, .version-box a:focus, .version-box a:visited {\n color: inherit;\n}\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,a=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:a+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n0){for(var n=this.state,a=t,r=0;r0,n=this.props.actions&&this.props.actions.length>0,a=this.state.isEditing,c=t?(a?"Edit":"Add")+" "+this.props.title.toLowerCase():this.props.title;return i.default.createElement(r.Fragment,null,i.default.createElement("div",{className:"Modal__Backdrop",onClick:function(){return e.props.onClose(!1)}}),i.default.createElement("div",{className:"Modal"},i.default.createElement(o.Card,null,i.default.createElement(o.Card.Section,null,i.default.createElement(o.Stack,{alignment:"trailing",distribution:"equalSpacing"},i.default.createElement(o.Heading,null,c),i.default.createElement(o.Button,{plain:!0,icon:l.MobileCancelMajorMonotone,onClick:function(){return e.props.onClose(!1)}}))),i.default.createElement("form",{onSubmit:this.handleSubmit},i.default.createElement(o.Card.Section,null,i.default.createElement("div",{className:"Modal__Content"},this.props.content,t&&i.default.createElement(o.FormLayout,null,this.props.inputs.map(this.generateInput)))),n&&i.default.createElement(o.Card.Section,null,i.default.createElement(o.Stack,{distribution:"trailing"},this.props.actions.map(function(t,n){return i.default.createElement(o.Button,{key:"modalActions-"+n,primary:t.primary,destructive:t.destructive,submit:t.submit,onClick:"close"===t.onClick?function(){return e.props.onClose(!1)}:t.onClick},t.content)})))))))}}]),t}();t.default=s},function(e,t,n){var a=n(280);"string"==typeof a&&(a=[[e.i,a,""]]);var r={hmr:!0,transform:void 0};n(27)(a,r);a.locals&&(e.exports=a.locals)},function(e,t,n){(e.exports=n(26)(!1)).push([e.i,".Modal__Backdrop {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.7);\n z-index: 1000;\n}\n\n.Modal {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n min-width: 320px;\n max-width: 500px;\n min-height: 200px;\n max-height: 100%;\n overflow: auto;\n width: 60%;\n z-index: 1001;\n}\n\n@media screen and (min-height: 400px) and (min-width: 400px) {\n .Modal {\n max-height: 90%;\n }\n}\n",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,r=function(){function e(e,t){for(var n=0;n-1?(0,d.splitAndCapitalize)("_",e):(0,d.capitalize)(e),options:c.options||c,description:c.description,name:p},h=t===n.mainCampaignName;a.push(n.inputGenerator(m,h)),t&&(n.inputMap[t]?n.inputMap[t].push(p):n.inputMap[t]=[p])}),a}},{key:"inputGenerator",value:function(e,t){var n=this,a=[{content:"Cancel",onClick:"close"},{content:"Save",submit:!0,primary:!0}],r={text:{generate:function(e){return l.default.createElement(c.TextField,{label:e.label,key:e.name,name:e.name,helpText:e.description,value:n.state.inputs[e.type][e.name],onChange:function(t){return n.handleInputChange(t,e.type,e.name)}})}},boolean:{generate:function(e){return l.default.createElement(c.Checkbox,{label:e.label,key:e.name,name:e.name,helpText:e.description,checked:void 0!==n.state.inputs[e.type][e.name]&&n.state.inputs[e.type][e.name],onChange:function(t){return n.handleInputChange(t,e.type,e.name)}})}},number:{generate:function(e){return l.default.createElement(c.TextField,{label:e.label,key:e.name,name:e.name,min:0,type:"number",helpText:e.description,value:n.state.inputs[e.type][e.name],onChange:function(t){return n.handleInputChange(Math.abs(t),e.type,e.name)}})}},select:{generate:function(e){n.defaults[e.name]=e.options[0].value;var t=l.default.createElement(c.TextStyle,{variation:"subdued"},e.description);return l.default.createElement("div",{key:e.name,className:"select-wrapper"},l.default.createElement(c.Select,{label:e.label,options:e.options,name:e.name,value:n.state.inputs[e.type][e.name],onChange:function(t){return n.handleInputChange(t,e.type,e.name)}}),t)}},array:{generate:function(e){var t=!!n.state.inputs[e.type][e.name],r=t?n.state.inputs[e.type][e.name].split(",").map(function(e){return e.trim()}):"";return l.default.createElement("div",{className:"TagContainer",key:e.name},l.default.createElement(c.Stack,{vertical:!0},l.default.createElement(c.Stack,{alignment:"leading"},l.default.createElement(c.Stack.Item,{fill:!0},e.label),l.default.createElement(c.Stack.Item,null,l.default.createElement(c.Button,{plain:!0,icon:s.CirclePlusMajorMonotone,onClick:function(){n.props.openModal({title:e.label,inputs:[{name:e.name,label:(0,d.splitAndCapitalize)("_",e.label),type:"text",value:"",description:"Add several at once by separating each with a comma"}],onClose:function(t){return n.handleModalReturn(t,e)},actions:a})}},"Add more"))),t?l.default.createElement(c.Stack,{spacing:"extraTight"},r.map(function(t,a){return l.default.createElement(c.Tag,{key:"Tag_"+a,onRemove:function(t){t.preventDefault(),r.splice(a,1),n.handleInputChange(r.join(","),e.type,e.name)}},t)})):l.default.createElement(c.Button,{plain:!0,fullWidth:!0,onClick:function(){n.props.openModal({title:e.label,inputs:[{name:e.name,label:(0,d.splitAndCapitalize)("_",e.label),type:"text",value:"",description:"Add several at once by separating each with a comma"}],onClose:function(t){return n.handleModalReturn(t,e)},actions:a})}},"Add ",e.label.toLowerCase()),l.default.createElement(c.TextStyle,{variation:"subdued"},e.description)))}},object:{generate:function(e){var t=!!n.state.inputs[e.type][e.name],r=t?n.state.inputs[e.type][e.name].split("\n"):"";return l.default.createElement(c.Stack,{vertical:!0,key:e.name},l.default.createElement(c.Stack,{alignment:"center"},l.default.createElement(c.Stack.Item,{fill:!0},e.label),l.default.createElement(c.Stack.Item,null,l.default.createElement(c.Button,{plain:!0,icon:s.CirclePlusMajorMonotone,onClick:function(){n.props.openModal({title:e.label,inputs:n.generateModalInputs(e),onClose:function(t){return n.handleModalReturn(t,e)},actions:a})}},"Add new"))),t?l.default.createElement(u.default,{headers:n.generateModalInputs(e).map(function(e){return e.label}),items:r.map(function(t,i){return{values:t.split(":"),onEdit:function(){n.props.openModal({title:e.label,inputs:n.generateModalInputs(e,r[i]),onClose:function(t){return n.handleModalReturn(t,e,i)},actions:a})},onRemove:function(){r.splice(i,1),n.handleInputChange(r.join("\n"),e.type,e.name)}}})}):l.default.createElement(c.Button,{plain:!0,fullWidth:!0,onClick:function(){n.props.openModal({title:e.label,inputs:n.generateModalInputs(e),onClose:function(t){return n.handleModalReturn(t,e)},actions:a})}},"Add ",e.label.toLowerCase()),l.default.createElement(c.TextStyle,{variation:"subdued"},e.description))}},objectArray:{generate:function(e){return r.object.generate(e)}},campaignSelect:{generate:function(e){var t=n.state.inputs[e.type][e.name]||"none";t&&"string"!=typeof t&&(t=t.name);var a=null;"none"===t&&(a=e.options.filter(function(e){return e.value===t})[0].description,n.inputMap[e.name]="none");var r="none"===t?l.default.createElement(c.TextStyle,{variation:"subdued"},l.default.createElement("strong",null,"What it does: "),a):null,i=null;if(t&&"none"!==t){var o=e.options.filter(function(e){return e.value===t})[0];r=l.default.createElement(c.TextStyle,{variation:"subdued"},l.default.createElement("strong",null,"What it does: "),o.description),o.inputs&&(i=n.generateAdditionalInputs(o,e.name))}var s=JSON.parse(JSON.stringify(e.options));return Object.keys(s).forEach(function(e){return delete s[e].newLineEachInput}),l.default.createElement(c.Card.Section,{key:e.name,title:e.label},l.default.createElement("div",{className:"select-wrapper"},l.default.createElement(c.Select,{options:s,name:e.name,value:t,onChange:function(t){return n.handleInputChange(t,e.type,e.name)}}),r),i)}}};return t&&"campaignSelect"!==e.type?l.default.createElement(c.Card.Section,{key:e.name},r[e.type].generate(e)):r[e.type].generate(e)}},{key:"generateModalInputs",value:function(e,t){var n=[],r=e.options.inputFormat,i=null;t&&(i=t.split(":").map(function(e){return e.trim()}));for(var o=r.match(/{(\w+\??):(\w+):([\w\s'.(),]+):?([\w\s|,]+)?}/),l=0;o;){var c=!1,s=[o[1],o[2],o[3],o[4]],u=s[0],p=s[1],m=s[2],h=s[3];h?(h=h.split(",").map(function(e){var t=e.split("|"),n=a(t,2);return{value:n[0],label:n[1]}}),t=i?i[l]:h[0].value):t=i?i[l]:"";var f=u.indexOf("?");f>-1&&(c=!0,u=u.substring(0,f));var g={name:u,optional:c,label:(0,d.splitAndCapitalize)("_",u),type:p,value:t,options:h,description:m};n.push(g),o=(r=r.replace(o[0],"")).match(/{(\w+\??):(\w+):([\w\s'.(),]+):?([\w\s|,]+)?}/),l++}return n}},{key:"handleModalReturn",value:function(e,t,n){if(e){var a=this.state.inputs[t.type][t.name];if("array"===t.type)a?a+=","+e.join(""):a=e.join("");else{for(var r=t.options.inputFormat,i=0;i0&&void 0!==arguments[0]?arguments[0]:props,t=e.headers,n=e.items;return a.default.createElement("div",{className:"CardList"},a.default.createElement("table",null,a.default.createElement("thead",null,a.default.createElement("tr",null,t.map(function(e,t){return a.default.createElement("th",{key:"Card__Header_"+t},a.default.createElement(r.TextStyle,{variation:"strong"},e))}))),a.default.createElement("tbody",null,n.map(function(e,t){return a.default.createElement("tr",{key:"Item_"+t},e.values.map(function(e,n){return a.default.createElement("td",{key:"Item_"+t+"_"+n},a.default.createElement(r.TextStyle,{variation:"subdued"},e))}),a.default.createElement("td",null,a.default.createElement("div",{className:"CardList-buttons"},a.default.createElement(r.Button,{plain:!0,icon:i.EmbedMinor,onClick:e.onEdit}),a.default.createElement(r.Button,{plain:!0,icon:i.DeleteMinor,onClick:e.onRemove}))))}))))};var a=o(n(0)),r=n(16),i=n(2);o(n(284));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var a=n(285);"string"==typeof a&&(a=[[e.i,a,""]]);var r={hmr:!0,transform:void 0};n(27)(a,r);a.locals&&(e.exports=a.locals)},function(e,t,n){(e.exports=n(26)(!1)).push([e.i,".CardList table {\n display: block;\n overflow-x: auto;\n border-collapse: collapse;\n text-align: center;\n}\n\n.CardList table * {\n width: 95%;\n}\n\n.CardList thead th {\n padding-bottom: 1rem;\n}\n\n.CardList tbody tr td {\n padding: 0.5rem;\n border-top: 1px solid #dfe3e8;\n border-bottom: 1px solid #dfe3e8;\n min-width: 100px;\n}\n\n.CardList td:first-child, .CardList th:first-child {\n text-align: left;\n max-width: 30%;\n}\n\n.CardList-buttons {\n display: flex;\n}\n",""])},function(e,t,n){var a=n(287);"string"==typeof a&&(a=[[e.i,a,""]]);var r={hmr:!0,transform:void 0};n(27)(a,r);a.locals&&(e.exports=a.locals)},function(e,t,n){(e.exports=n(26)(!1)).push([e.i,".select-wrapper + .input-container {\n margin-top: 17px;\n}\n\n.select-wrapper span {\n display: block;\n margin-top: 0.4rem;\n}\n\n.input-container {\n margin-top: 10px;\n}\n\n.input-container__single-line {\n margin-top: 30px;\n}\n\nform {\n border-top: 1px solid #dfe3e8;\n}\n\n.TagContainer .Polaris-Stack--spacingExtraTight {\n margin-top: -1.3em;\n}\n\n.TagContainer .Polaris-TextStyle--variationSubdued {\n position: relative;\n top: -8px;\n}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t-1});r=r&&r.map(function(e){if(!e.inputs)return["",""];var t=e.inputs.findIndex(function(e){return"string"==typeof e&&e.indexOf('"')>-1});return[e.name.search(/(reject|exclude)/i)>-1?"Rejection message":"Discount message",e.inputs[t].replace(/"/g,"").trim()]});var i=e.label||(0,u.splitCamelCase)(e.name),d=o.default.createElement("button",{className:"active-toggle",onClick:this.toggleActive(e.id)},!1===e.active?o.default.createElement(l.Badge,null,"Inactive"):o.default.createElement(l.Badge,{status:"success"},"Active"));return o.default.createElement(s.Draggable,{key:"campaign-"+e.id,draggableId:"CampaignList-"+e.id,index:t},function(t){return o.default.createElement("div",a({className:"draggable",ref:t.innerRef},t.draggableProps,t.dragHandleProps),o.default.createElement(l.Card.Section,null,o.default.createElement(l.Subheading,null,i),o.default.createElement(l.TextContainer,{spacing:"tight"},o.default.createElement(l.Stack,{distribution:"equalSpacing",alignment:"center"},d,o.default.createElement(l.Button,{plain:!0,icon:c.DuplicateMinor,onClick:function(){return n.props.duplicateCampaign(e.id)}},"Duplicate")),r&&r.map(function(t,n){return""!==t[1]&&o.default.createElement("div",{key:"campaign-"+e.id+"-message-"+n,className:"campaign-info"},o.default.createElement(l.TextStyle,null,t[0]+": "),o.default.createElement(l.TextStyle,{variation:"subdued"},t[1]))}),o.default.createElement(l.Stack,{distribution:"trailing"},o.default.createElement(l.Button,{size:"slim",destructive:!0,icon:c.DeleteMajorMonotone,onClick:function(){return n.props.removeCampaign(e.id)}},"Remove"),o.default.createElement(l.Button,{size:"slim",icon:c.EditMajorMonotone,onClick:function(){return n.props.editCampaign(e.id)}},"Edit")))))})}},{key:"render",value:function(){var e=this;return o.default.createElement(l.Card,null,o.default.createElement(l.Card.Section,null,o.default.createElement(l.Stack,{distribution:"equalSpacing"},o.default.createElement(l.Heading,null,"Campaigns"),o.default.createElement(l.Button,{size:"slim",icon:c.AddNoteMajorMonotone,primary:!0,onClick:this.createNew},"Create new"))),o.default.createElement(s.DragDropContext,{onDragEnd:this.onDrop},o.default.createElement(s.Droppable,{droppableId:"CampaignList"},function(t){return o.default.createElement("div",a({ref:t.innerRef},t.droppableProps),e.props.campaigns.map(function(t,n){return e.renderCardSection(t,n)}),t.placeholder)})))}}]),t}();t.default=p},function(e,t,n){n(290),e.exports=n(22).Object.assign},function(e,t,n){var a=n(32);a(a.S+a.F,"Object",{assign:n(297)})},function(e,t,n){var a=n(292);e.exports=function(e,t,n){if(a(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,a){return e.call(t,n,a)};case 3:return function(n,a,r){return e.call(t,n,a,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var a=n(118),r=n(296);e.exports=n(33)?function(e,t,n){return a.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=!n(33)&&!n(50)(function(){return 7!=Object.defineProperty(n(119)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var a=n(49);e.exports=function(e,t){if(!a(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!a(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!a(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!a(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var a=n(33),r=n(51),i=n(306),o=n(126),l=n(127),c=n(121),s=Object.assign;e.exports=!s||n(50)(function(){var e={},t={},n=Symbol(),a="abcdefghijklmnopqrst";return e[n]=7,a.split("").forEach(function(e){t[e]=e}),7!=s({},e)[n]||Object.keys(s({},t)).join("")!=a})?function(e,t){for(var n=l(e),s=arguments.length,u=1,d=i.f,p=o.f;s>u;)for(var m,h=c(arguments[u++]),f=d?r(h).concat(d(h)):r(h),g=f.length,v=0;g>v;)m=f[v++],a&&!p.call(h,m)||(n[m]=h[m]);return n}:s},function(e,t,n){var a=n(120),r=n(72),i=n(300)(!1),o=n(124)("IE_PROTO");e.exports=function(e,t){var n,l=r(e),c=0,s=[];for(n in l)n!=o&&a(l,n)&&s.push(n);for(;t.length>c;)a(l,n=t[c++])&&(~i(s,n)||s.push(n));return s}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var a=n(72),r=n(301),i=n(302);e.exports=function(e){return function(t,n,o){var l,c=a(t),s=r(c.length),u=i(o,s);if(e&&n!=n){for(;s>u;)if((l=c[u++])!=l)return!0}else for(;s>u;u++)if((e||u in c)&&c[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var a=n(123),r=Math.min;e.exports=function(e){return e>0?r(a(e),9007199254740991):0}},function(e,t,n){var a=n(123),r=Math.max,i=Math.min;e.exports=function(e,t){return(e=a(e))<0?r(e+t,0):i(e,t)}},function(e,t,n){var a=n(22),r=n(48),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:a.version,mode:n(304)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports=!0},function(e,t){var n=0,a=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+a).toString(36))}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){n(308);var a=n(22).Object;e.exports=function(e,t){return a.create(e,t)}},function(e,t,n){var a=n(32);a(a.S,"Object",{create:n(309)})},function(e,t,n){var a=n(71),r=n(310),i=n(125),o=n(124)("IE_PROTO"),l=function(){},c=function(){var e,t=n(119)("iframe"),a=i.length;for(t.style.display="none",n(311).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("