-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathreact-redux-6.0-greg.min.js
2 lines (2 loc) · 12.1 KB
/
react-redux-6.0-greg.min.js
1
2
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("redux")):"function"==typeof define&&define.amd?define(["exports","react","redux"],t):t(e.ReactRedux={},e.React,e.Redux)}(this,function(e,t,r){"use strict";var n="default"in t?t.default:t,o=n.createContext(null),i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},u=function(e,t){var r={};for(var n in e)0>t.indexOf(n)&&Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},p=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},c=o.Provider,f=function(e){function t(r){i(this,t);var n=p(this,e.call(this,r));return n.state={state:r.store.getState(),store:r.store},n.unsubscribe=null,n}return s(t,e),t.prototype.componentDidMount=function(){this.isUnmounted=!1;var e=this.state.store.getState();this.unsubscribe=this.state.store.subscribe(this.triggerUpdateOnStoreStateChange.bind(this)),e!==this.state.state&&this.setState({state:e})},t.prototype.componentWillUnmount=function(){this.isUnmounted=!0,this.unsubscribe&&this.unsubscribe()},t.prototype.componentDidUpdate=function(e){e.store!==this.props.store&&(this.unsubscribe&&this.unsubscribe(),this.unsubscribe=this.props.store.subscribe(this.triggerUpdateOnStoreStateChange.bind(this)),this.setState({state:this.props.store.getState(),store:this.props.store}))},t.prototype.triggerUpdateOnStoreStateChange=function(){this.isUnmounted||this.setState(function(e){var t=e.store.getState();return e.state===t?null:{state:t}})},t.prototype.render=function(){return n.createElement(this.props.context||c,{value:this.state},this.props.children)},t}(t.Component),d={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},l={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},m=Object.defineProperty,v=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,y=Object.getOwnPropertyDescriptor,P=Object.getPrototypeOf,b=P&&P(Object);var g=function e(t,r,n){if("string"!=typeof r){if(b){var o=P(r);o&&o!==b&&e(t,o,n)}var i=v(r);h&&(i=i.concat(h(r)));for(var a=0;i.length>a;++a){var s=i[a];if(!(d[s]||l[s]||n&&n[s])){var u=y(r,s);try{m(t,s,u)}catch(e){}}}return t}return t},O=function(e,t,r,n,o,i,a,s){if(!e){var u;if(void 0===t)u=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[r,n,o,i,a,s],c=0;(u=Error(t.replace(/%s/g,function(){return p[c++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}},w=function(e,t,r){if(null===e!=(null===t))return!1;var n=Array.isArray(e);if(n!==Array.isArray(t))return!1;var o=typeof e;return o===typeof t&&(i=o,"function"!==i&&"object"!==i?r?r(e,t):e===t:n?function(e,t,r){var n=e.length;if(n!==t.length)return!1;if(r){for(var o=0;n>o;o++)if(!r(e[o],t[o]))return!1}else for(var o=0;n>o;o++)if(e[o]!==t[o])return!1;return!0}(e,t,r):function(e,t,r){var n=0,o=0;if(r)for(var i in e){if(e.hasOwnProperty(i)&&!r(e[i],t[i]))return!1;n++}else for(var i in e){if(e.hasOwnProperty(i)&&e[i]!==t[i])return!1;n++}for(var i in t)t.hasOwnProperty(i)&&o++;return n===o}(e,t,r));var i};function C(e,t){return e(t={exports:{}},t.exports),t.exports}var S,x=C(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,p=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.timeout"):60113;function l(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case c:case i:case s:case a:return e;default:switch(e=e&&e.$$typeof){case p:case f:case u:return e;default:return t}}case o:return t}}}t.typeOf=l,t.AsyncMode=c,t.ContextConsumer=p,t.ContextProvider=u,t.Element=n,t.ForwardRef=f,t.Fragment=i,t.Profiler=s,t.Portal=o,t.StrictMode=a,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===c||e===s||e===a||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===u||e.$$typeof===p||e.$$typeof===f)},t.isAsyncMode=function(e){return l(e)===c},t.isContextConsumer=function(e){return l(e)===p},t.isContextProvider=function(e){return l(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return l(e)===f},t.isFragment=function(e){return l(e)===i},t.isProfiler=function(e){return l(e)===s},t.isPortal=function(e){return l(e)===o},t.isStrictMode=function(e){return l(e)===a}});(S=x)&&S.__esModule&&Object.prototype.hasOwnProperty.call(S,"default");var E=C(function(e){e.exports=x}).isValidElementType,j=o.Consumer;function T(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.getDisplayName,c=void 0===o?function(e){return"ConnectAdvanced("+e+")"}:o,f=r.methodName,d=void 0===f?"connectAdvanced":f,l=r.renderCountProp,m=void 0===l?void 0:l,v=r.shouldHandleStateChanges,h=void 0===v||v,y=r.storeKey,P=void 0===y?"store":y,b=r.withRef,C=void 0!==b&&b,S=r.consumer,x=void 0===S?j:S,T=u(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","consumer"]);return O(!C,"withRef is removed. To access the wrapped instance, simply pass in ref"),O("store"===P,"storeKey has been removed and does not do anything. To use a custom redux store for a single component, create a custom React context with React.createContext() and pass the Provider to react-redux's provider and the Consumer to this component as in <Provider context={context.Provider}><ConnectedComponent consumer={context.Consumer} /></Provider>"),function(r){O(E(r),"You must pass a component to the function returned by "+d+". Instead received "+JSON.stringify(r));var o=r.displayName||r.name||"Component",f=c(o),l=function(e){function t(){return i(this,t),p(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e=this.props,t=e.forwardRef,o=u(e,["forwardRef"]);return n.createElement(r,a({},o,{ref:t}))},t}(t.PureComponent),v=a({},T,{getDisplayName:c,methodName:d,renderCountProp:m,shouldHandleStateChanges:h,storeKey:P,withRef:C,displayName:f,wrappedComponentName:o,WrappedComponent:r}),y=function(t){function c(e){i(this,c);var r=p(this,t.call(this,e));return O(!e[P],"Passing redux store in props has been removed and does not do anything. To use a custom redux store for a single component, create a custom React context with React.createContext() and pass the Provider to react-redux's provider and the Consumer to this component as in <Provider context={context.Provider}><"+o+" consumer={context.Consumer} /></Provider>"),r.memoizeDerivedProps=r.makeMemoizer(),r.renderWrappedComponent=r.renderWrappedComponent.bind(r),r.renderCount=0,r}return s(c,t),c.prototype.makeMemoizer=function(){var t=void 0,r=void 0,n=void 0,o=void 0,i=void 0,a=!1;return function(s,u,p){if(a&&(T.pure&&w(t,u)&&r===s))return n;p!==o&&(o=p,i=e(p.dispatch,v)),a=!0,t=u,r=s;var c=i(s,u);return w(n,c)?n:n=c}},c.prototype.renderWrappedComponent=function(e){O(e,'Could not find "store" in either the context of "'+f+'". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to '+f+".");var t,o=e.state,i=e.store,s=this.props,p=s.forwardRef,c=u(s,["forwardRef"]),d=this.memoizeDerivedProps(o,c,i);m&&(d=a({},d,((t={})[m]=this.renderCount++,t)));return T.pure?n.createElement(l,a({},d,{forwardRef:p})):n.createElement(r,a({},d,{ref:p}))},c.prototype.render=function(){return n.createElement(this.props.consumer||x,null,this.renderWrappedComponent)},c}(t.Component);y.WrappedComponent=r,y.displayName=f;var b=n.forwardRef(function(e,t){return n.createElement(y,a({},e,{forwardRef:t}))});return b.displayName=y.displayName,b.WrappedComponent=r,g(b,r)}}var M=Object.prototype.hasOwnProperty;function R(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function q(e,t){if(R(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(var n=0;r.length>n;n++)if(!M.call(t,r[n])||!R(e[r[n]],t[r[n]]))return!1;return!0}function N(e){return function(t,r){var n=e(t,r);function o(){return n}return o.dependsOnOwnProps=!1,o}}function D(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?!!e.dependsOnOwnProps:1!==e.length}function _(e,t){return function(t,r){var n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=D(e);var o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=D(o),o=n(t,r)),o},n}}var $=[function(e){return"function"==typeof e?_(e):void 0},function(e){return e?void 0:N(function(e){return{dispatch:e}})},function(e){return e&&"object"==typeof e?N(function(t){return r.bindActionCreators(e,t)}):void 0}];var A=[function(e){return"function"==typeof e?_(e):void 0},function(e){return e?void 0:N(function(){return{}})}];function F(e,t,r){return a({},r,e,t)}var U=[function(e){return"function"==typeof e?function(e){return function(t,r){var n=r.pure,o=r.areMergedPropsEqual,i=!1,a=void 0;return function(t,r,s){var u=e(t,r,s);return i?n&&o(u,a)||(a=u):(i=!0,a=u),a}}}(e):void 0},function(e){return e?void 0:function(){return F}}];function W(e,t,r,n){return function(o,i){return r(e(o,i),t(n,i),i)}}function H(e,t,r,n,o){var i=o.areStatesEqual,a=o.areOwnPropsEqual,s=o.areStatePropsEqual,u=!1,p=void 0,c=void 0,f=void 0,d=void 0,l=void 0;function m(o,u){var m,v,h=!a(u,c),y=!i(o,p);return p=o,c=u,h&&y?(f=e(p,c),t.dependsOnOwnProps&&(d=t(n,c)),l=r(f,d,c)):h?(e.dependsOnOwnProps&&(f=e(p,c)),t.dependsOnOwnProps&&(d=t(n,c)),l=r(f,d,c)):y?(m=e(p,c),v=!s(m,f),f=m,v&&(l=r(f,d,c)),l):l}return function(o,i){return u?m(o,i):(f=e(p=o,c=i),d=t(n,c),l=r(f,d,c),u=!0,l)}}function k(e,t){var r=t.initMapStateToProps,n=t.initMapDispatchToProps,o=t.initMergeProps,i=u(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=r(e,i),s=n(e,i),p=o(e,i);return(i.pure?H:W)(a,s,p,e,i)}function z(e,t,r){for(var n=t.length-1;n>=0;n--){var o=t[n](e);if(o)return o}return function(t,n){throw Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+n.wrappedComponentName+".")}}function K(e,t){return e===t}var I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.connectHOC,r=void 0===t?T:t,n=e.mapStateToPropsFactories,o=void 0===n?A:n,i=e.mapDispatchToPropsFactories,s=void 0===i?$:i,p=e.mergePropsFactories,c=void 0===p?U:p,f=e.selectorFactory,d=void 0===f?k:f;return function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},p=i.pure,f=void 0===p||p,l=i.areStatesEqual,m=void 0===l?K:l,v=i.areOwnPropsEqual,h=void 0===v?q:v,y=i.areStatePropsEqual,P=void 0===y?q:y,b=i.areMergedPropsEqual,g=void 0===b?q:b,O=u(i,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),w=z(e,o,"mapStateToProps"),C=z(t,s,"mapDispatchToProps"),S=z(n,c,"mergeProps");return r(d,a({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:!!e,initMapStateToProps:w,initMapDispatchToProps:C,initMergeProps:S,pure:f,areStatesEqual:m,areOwnPropsEqual:h,areStatePropsEqual:P,areMergedPropsEqual:g},O))}}();e.Provider=f,e.connectAdvanced=T,e.Context=o,e.connect=I,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=react-redux.min.js.map