UNPKG

react-redux-with-path

Version:

A version of react-redux designed for cases that want to access sub-tree of the state. and take it as state in mapStateToProps and mapDispatchToProps

1 lines 20 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactReduxWithPath=e(require("react")):t.ReactReduxWithPath=e(t.React)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.connect=e.SubProvider=void 0;var o=r(14),i=n(o),a=r(15),s=n(a);e.SubProvider=i.default,e.connect=s.default},function(t,e,r){function n(t,e){for(var r=t.length;r--;)if(o(t[r][0],e))return r;return-1}var o=r(57);t.exports=n},function(t,e,r){function n(t,e){var r=t.__data__;return o(e)?r["string"==typeof e?"string":"hash"]:r.map}var o=r(42);t.exports=n},function(t,e,r){var n=r(9),o=n(Object,"create");t.exports=o},function(e,r){e.exports=t},function(t,e,r){(function(e){var n=r(32),o=n("object"==typeof e&&e),i=n("object"==typeof self&&self),a=n("object"==typeof this&&this),s=o||i||a||Function("return this")();t.exports=s}).call(e,function(){return this}()||Function("return this")())},function(t,e,r){function n(t){return"symbol"==typeof t||o(t)&&s.call(t)==i}var o=r(13),i="[object Symbol]",a=Object.prototype,s=a.toString;t.exports=n},function(t,e){"use strict";function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){return function(){var r=t.apply(void 0,arguments);return r.path=e,r}}function o(t,e){return Object.keys(t).reduce(function(o,i){return Object.assign(o,r({},i,n(t[i],e))),o},{})}function i(t,e,r){return r?function(){return e(n(t,r).apply(void 0,arguments))}:function(){return e(t.apply(void 0,arguments))}}function a(t,e,r){if("function"==typeof t)return i(t,e,r);if("object"!==(void 0===t?"undefined":s(t))||null===t)throw Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":void 0===t?"undefined":s(t))+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(t),o={},a=0;n.length>a;a++){var u=n[a],c=t[u];"function"==typeof c&&(o[u]=i(c,e,r))}return o}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};e.wrapActionCreatorWithPath=n,e.wrapActionCreatorsWithPath=o,e.bindActionCreator=i,e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(4),o=n.PropTypes.string;e.default=o},function(t,e,r){function n(t,e){var r=i(t,e);return o(r)?r:void 0}var o=r(29),i=r(35);t.exports=n},function(t,e){function r(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(r){}return e}t.exports=r},function(t,e){var r=Array.isArray;t.exports=r},function(t,e){function r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=r},function(t,e){function r(t){return!!t&&"object"==typeof t}t.exports=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;e.length>r;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(4),c=r(8),p=n(c),f=function(t){function e(t,r){o(this,e);var n=i(this,Object.getPrototypeOf(e).call(this,t,r));return n.path=t.path,n}return a(e,t),s(e,[{key:"getChildContext",value:function(){return{path:this.path}}},{key:"render",value:function(){return u.Children.only(this.props.children)}}]),e}(u.Component);e.default=f,f.propTypes={path:p.default,children:u.PropTypes.element.isRequired},f.childContextTypes={path:p.default}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){return t.displayName||t.name||"Component"}function u(t,e){try{return t.apply(e)}catch(r){return S.value=r,S}}function c(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=!!t,h=t||O,v=void 0,b=r||w,_=n.pure,C=void 0===_||_,T=n.withRef,M=void 0!==T&&T,E=C&&b!==w,k=j++;return function(t){function r(t,e){(0,d.default)(t)||(0,m.warning)(e+"() in "+_+" must return a plain object. "+("Instead received "+t+"."))}function n(t,e,n){var o=b(t,e,n);return r(o,"mergeProps"),o}var _="Connect("+s(t)+")",O=function(s){function d(t,e){o(this,d);var r=i(this,Object.getPrototypeOf(d).call(this,t,e));r.version=k,r.store=t.store||e.store,r.path=t.path||e.path,(0,g.default)(r.store,'Could not find "store" in either the context or '+('props of "'+_+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+_+'".'));var n=r.getSubstate();return r.state={storeState:n},r.clearCache(),r}return a(d,s),p(d,[{key:"shouldComponentUpdate",value:function(){return!C||this.haveOwnPropsChanged||this.hasStoreStateChanged}}]),p(d,[{key:"computeStateProps",value:function(t,e){if(!this.finalMapStateToProps)return this.configureFinalMapState(t,e);var n=this.getSubstate(),o=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,e):this.finalMapStateToProps(n);return r(o,"mapStateToProps"),o}},{key:"configureFinalMapState",value:function(t,e){var n=h(this.getSubstate(),e),o="function"==typeof n;return this.finalMapStateToProps=o?n:h,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,o?this.computeStateProps(t,e):(r(n,"mapStateToProps"),n)}},{key:"computeDispatchProps",value:function(t,e){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(t,e);var n=t.dispatch,o=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,e):this.finalMapDispatchToProps(n);return r(o,"mapDispatchToProps"),o}},{key:"configureFinalMapDispatch",value:function(t,n){v="function"==typeof e?e:e?(0,m.wrapActionCreators)(e,this.path):x;var o=v(t.dispatch,n),i="function"==typeof o;return this.finalMapDispatchToProps=i?o:v,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,i?this.computeDispatchProps(t,n):(r(o,"mapDispatchToProps"),o)}},{key:"updateStatePropsIfNeeded",value:function(){var t=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,m.shallowEqual)(t,this.stateProps))&&(this.stateProps=t,!0)}},{key:"updateDispatchPropsIfNeeded",value:function(){var t=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,m.shallowEqual)(t,this.dispatchProps))&&(this.dispatchProps=t,!0)}},{key:"updateMergedPropsIfNeeded",value:function(){var t=n(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&E&&(0,m.shallowEqual)(t,this.mergedProps))&&(this.mergedProps=t,!0)}},{key:"isSubscribed",value:function(){return"function"==typeof this.unsubscribe}},{key:"trySubscribe",value:function(){c&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())}},{key:"tryUnsubscribe",value:function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)}},{key:"componentDidMount",value:function(){this.trySubscribe()}},{key:"componentWillReceiveProps",value:function(t){C&&(0,m.shallowEqual)(t,this.props)||(this.haveOwnPropsChanged=!0)}},{key:"componentWillUnmount",value:function(){this.tryUnsubscribe(),this.clearCache()}},{key:"clearCache",value:function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null}},{key:"handleChange",value:function(){if(this.unsubscribe){var t=this.getSubstate(),e=this.state.storeState;if(!C||e!==t){if(C&&!this.doStatePropsDependOnOwnProps){var r=u(this.updateStatePropsIfNeeded,this);if(!r)return;r===S&&(this.statePropsPrecalculationError=S.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:t})}}}},{key:"getWrappedInstance",value:function(){return(0,g.default)(M,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance}},{key:"getSubstate",value:function(){return this.path?(0,y.default)(this.store.getState(),this.path):this.store.getState()}},{key:"render",value:function(){var e=this.haveOwnPropsChanged,r=this.hasStoreStateChanged,n=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,i=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var a=!0,s=!0;C&&i&&(a=r||e&&this.doStatePropsDependOnOwnProps,s=e&&this.doDispatchPropsDependOnOwnProps);var u=!1,c=!1;n?u=!0:a&&(u=this.updateStatePropsIfNeeded()),s&&(c=this.updateDispatchPropsIfNeeded());var p=!0;return p=!!(u||c||e)&&this.updateMergedPropsIfNeeded(),!p&&i?i:this.renderedElement=M?(0,l.createElement)(t,f({},this.mergedProps,{ref:"wrappedInstance"})):(0,l.createElement)(t,this.mergedProps)}}]),d}(l.Component);return O.displayName=_,O.WrappedComponent=t,O.contextTypes={path:m.pathType,store:m.storeShape},O.propTypes={store:m.storeShape},O.prototype.componentWillUpdate=function(){this.version!==k&&(this.version=k,this.trySubscribe(),this.clearCache())},(0,P.default)(O,t)}}Object.defineProperty(e,"__esModule",{value:!0});var p=function(){function t(t,e){for(var r=0;e.length>r;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),f=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=c;var l=r(4),h=r(60),d=n(h),v=r(58),y=n(v),b=r(21),P=n(b),_=r(22),g=n(_),m=r(16),O=function(t){return{}},x=function(t){return{dispatch:t}},w=function(t,e,r){return f({},r,t,e)},S={value:null},j=0},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.wrapActionCreators=e.warning=e.shallowEqual=e.pathType=e.storeShape=e.wrapActionCreatorsWithPath=e.bindActionCreators=void 0;var o=r(7),i=n(o),a=r(18),s=n(a),u=r(8),c=n(u),p=r(17),f=n(p),l=r(19),h=n(l),d=r(20),v=n(d);e.bindActionCreators=i.default,e.wrapActionCreatorsWithPath=o.wrapActionCreatorsWithPath,e.storeShape=s.default,e.pathType=c.default,e.shallowEqual=f.default,e.warning=h.default,e.wrapActionCreators=v.default},function(t,e){"use strict";function r(t,e){if(t===e)return!0;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=Object.prototype.hasOwnProperty,i=0;r.length>i;i++)if(!o.call(e,r[i])||t[r[i]]!==e[r[i]])return!1;return!0}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(4);e.default=n.PropTypes.shape({subscribe:n.PropTypes.func.isRequired,dispatch:n.PropTypes.func.isRequired,getState:n.PropTypes.func.isRequired})},function(t,e){"use strict";function r(t){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(t);try{throw Error(t)}catch(e){}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){return function(r){return(0,a.default)(t,r,e)}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var i=r(7),a=n(i)},function(t,e){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},o="function"==typeof Object.getOwnPropertySymbols;t.exports=function(t,e,i){if("string"!=typeof e){var a=Object.getOwnPropertyNames(e);o&&(a=a.concat(Object.getOwnPropertySymbols(e)));for(var s=0;a.length>s;++s)if(!(r[a[s]]||n[a[s]]||i&&i[a[s]]))try{t[a[s]]=e[a[s]]}catch(u){}}return t}},function(t,e,r){"use strict";var n=function(t,e,r,n,o,i,a,s){if(void 0===e)throw Error("invariant requires an error message argument");if(!t){var u;if(void 0===e)u=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,i,a,s],p=0;u=Error(e.replace(/%s/g,function(){return c[p++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};t.exports=n},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var o=r(36),i=r(37),a=r(38),s=r(39),u=r(40);n.prototype.clear=o,n.prototype.delete=i,n.prototype.get=a,n.prototype.has=s,n.prototype.set=u,t.exports=n},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var o=r(44),i=r(45),a=r(46),s=r(47),u=r(48);n.prototype.clear=o,n.prototype.delete=i,n.prototype.get=a,n.prototype.has=s,n.prototype.set=u,t.exports=n},function(t,e,r){var n=r(9),o=r(5),i=n(o,"Map");t.exports=i},function(t,e,r){function n(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var o=r(49),i=r(50),a=r(51),s=r(52),u=r(53);n.prototype.clear=o,n.prototype.delete=i,n.prototype.get=a,n.prototype.has=s,n.prototype.set=u,t.exports=n},function(t,e,r){var n=r(5),o=n.Symbol;t.exports=o},function(t,e,r){function n(t,e){e=i(e,t)?[e]:o(e);for(var r=0,n=e.length;null!=t&&n>r;)t=t[a(e[r++])];return r&&r==n?t:void 0}var o=r(31),i=r(41),a=r(55);t.exports=n},function(t,e,r){function n(t){if(!s(t)||a(t))return!1;var e=o(t)||i(t)?d:p;return e.test(u(t))}var o=r(59),i=r(10),a=r(43),s=r(12),u=r(56),c=/[\\^$.*+?()[\]{}|]/g,p=/^\[object .+?Constructor\]$/,f=Object.prototype,l=Function.prototype.toString,h=f.hasOwnProperty,d=RegExp("^"+l.call(h).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},function(t,e,r){function n(t){if("string"==typeof t)return t;if(i(t))return u?u.call(t):"";var e=t+"";return"0"==e&&1/t==-a?"-0":e}var o=r(27),i=r(6),a=1/0,s=o?o.prototype:void 0,u=s?s.toString:void 0;t.exports=n},function(t,e,r){function n(t){return o(t)?t:i(t)}var o=r(11),i=r(54);t.exports=n},function(t,e){function r(t){return t&&t.Object===Object?t:null}t.exports=r},function(t,e,r){var n=r(5),o=n["__core-js_shared__"];t.exports=o},function(t,e){function r(t){return n(Object(t))}var n=Object.getPrototypeOf;t.exports=r},function(t,e){function r(t,e){return null==t?void 0:t[e]}t.exports=r},function(t,e,r){function n(){this.__data__=o?o(null):{}}var o=r(3);t.exports=n},function(t,e){function r(t){return this.has(t)&&delete this.__data__[t]}t.exports=r},function(t,e,r){function n(t){var e=this.__data__;if(o){var r=e[t];return r===i?void 0:r}return s.call(e,t)?e[t]:void 0}var o=r(3),i="__lodash_hash_undefined__",a=Object.prototype,s=a.hasOwnProperty;t.exports=n},function(t,e,r){function n(t){var e=this.__data__;return o?void 0!==e[t]:a.call(e,t)}var o=r(3),i=Object.prototype,a=i.hasOwnProperty;t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__;return r[t]=o&&void 0===e?i:e,this}var o=r(3),i="__lodash_hash_undefined__";t.exports=n},function(t,e,r){function n(t,e){if(o(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!i(t))||(s.test(t)||!a.test(t)||null!=e&&t in Object(e))}var o=r(11),i=r(6),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=n},function(t,e){function r(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}t.exports=r},function(t,e,r){function n(t){return!!i&&i in t}var o=r(33),i=function(){var t=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=n},function(t,e){function r(){this.__data__=[]}t.exports=r},function(t,e,r){function n(t){var e=this.__data__,r=o(e,t);if(0>r)return!1;var n=e.length-1;return r==n?e.pop():a.call(e,r,1),!0}var o=r(1),i=Array.prototype,a=i.splice;t.exports=n},function(t,e,r){function n(t){var e=this.__data__,r=o(e,t);return 0>r?void 0:e[r][1]}var o=r(1);t.exports=n},function(t,e,r){function n(t){return o(this.__data__,t)>-1}var o=r(1);t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__,n=o(r,t);return 0>n?r.push([t,e]):r[n][1]=e,this}var o=r(1);t.exports=n},function(t,e,r){function n(){this.__data__={hash:new o,map:new(a||i),string:new o}}var o=r(23),i=r(24),a=r(25);t.exports=n},function(t,e,r){function n(t){return o(this,t).delete(t)}var o=r(2);t.exports=n},function(t,e,r){function n(t){return o(this,t).get(t)}var o=r(2);t.exports=n},function(t,e,r){function n(t){return o(this,t).has(t)}var o=r(2);t.exports=n},function(t,e,r){function n(t,e){return o(this,t).set(t,e),this}var o=r(2);t.exports=n},function(t,e,r){var n=r(61),o=r(62),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,a=/\\(\\)?/g,s=n(function(t){var e=[];return o(t).replace(i,function(t,r,n,o){e.push(n?o.replace(a,"$1"):r||t)}),e});t.exports=s},function(t,e,r){function n(t){if("string"==typeof t||o(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}var o=r(6),i=1/0;t.exports=n},function(t,e){function r(t){if(null!=t){try{return n.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var n=Function.prototype.toString;t.exports=r},function(t,e){function r(t,e){return t===e||t!==t&&e!==e}t.exports=r},function(t,e,r){function n(t,e,r){var n=null==t?void 0:o(t,e);return void 0===n?r:n}var o=r(28);t.exports=n},function(t,e,r){function n(t){var e=o(t)?u.call(t):"";return e==i||e==a}var o=r(12),i="[object Function]",a="[object GeneratorFunction]",s=Object.prototype,u=s.toString;t.exports=n},function(t,e,r){function n(t){if(!a(t)||l.call(t)!=s||i(t))return!1;var e=o(t);if(null===e)return!0;var r=p.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==f}var o=r(34),i=r(10),a=r(13),s="[object Object]",u=Object.prototype,c=Function.prototype.toString,p=u.hasOwnProperty,f=c.call(Object),l=u.toString;t.exports=n},function(t,e,r){function n(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(i);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(n.Cache||o),r}var o=r(26),i="Expected a function";n.Cache=o,t.exports=n},function(t,e,r){function n(t){return null==t?"":o(t)}var o=r(30);t.exports=n}])});