Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-form

Package Overview
Dependencies
Maintainers
1
Versions
236
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-form - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

2

dist/redux-form.min.js

@@ -1,1 +0,1 @@

!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.ReduxForm=e(require("react")):t.ReduxForm=e(t.React)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var u=r[n]={exports:{},id:n,loaded:!1};return t[n].call(u.exports,u,u.exports,e),u.loaded=!0,u.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}}e.__esModule=!0;var u=r(12),o=n(u),i=r(21),a=r(13),s=n(a),c=s.default(!1,o.default,i.connect),f=c.blur,l=c.change,d=c.connectReduxForm,p=c.focus,v=c.reducer,h=c.reduxForm,y=c.initialize,m=c.initializeWithKey,g=c.reset,b=c.startAsyncValidation,_=c.startSubmit,O=c.stopAsyncValidation,S=c.stopSubmit,x=c.touch,T=c.untouch;e.blur=f,e.change=l,e.connectReduxForm=d,e.focus=p,e.reducer=v,e.reduxForm=h,e.initialize=y,e.initializeWithKey=m,e.reset=g,e.startAsyncValidation=b,e.startSubmit=_,e.stopAsyncValidation=O,e.stopSubmit=S,e.touch=x,e.untouch=T},function(t,e){"use strict";function r(t,e){return Object.keys(t).reduce(function(r,u){var o;return n({},r,(o={},o[u]=e(t[u],u),o))},{})}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=r,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r="redux-form/BLUR";e.BLUR=r;var n="redux-form/CHANGE";e.CHANGE=n;var u="redux-form/FOCUS";e.FOCUS=u;var o="redux-form/INITIALIZE";e.INITIALIZE=o;var i="redux-form/RESET";e.RESET=i;var a="redux-form/START_ASYNC_VALIDATION";e.START_ASYNC_VALIDATION=a;var s="redux-form/START_SUBMIT";e.START_SUBMIT=s;var c="redux-form/STOP_ASYNC_VALIDATION";e.STOP_ASYNC_VALIDATION=c;var f="redux-form/STOP_SUBMIT";e.STOP_SUBMIT=f;var l="redux-form/TOUCH";e.TOUCH=l;var d="redux-form/UNTOUCH";e.UNTOUCH=d},function(t,e,r){"use strict";function n(t,e){return{type:v.BLUR,field:t,value:e}}function u(t,e){return{type:v.CHANGE,field:t,value:e}}function o(t){return{type:v.FOCUS,field:t}}function i(t){return{type:v.INITIALIZE,data:t}}function a(){return{type:v.RESET}}function s(){return{type:v.START_ASYNC_VALIDATION}}function c(){return{type:v.START_SUBMIT}}function f(t){return{type:v.STOP_ASYNC_VALIDATION,errors:t}}function l(t){return{type:v.STOP_SUBMIT,errors:t}}function d(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return{type:v.TOUCH,fields:e}}function p(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return{type:v.UNTOUCH,fields:e}}e.__esModule=!0,e.blur=n,e.change=u,e.focus=o,e.initialize=i,e.reset=a,e.startAsyncValidation=s,e.startSubmit=c,e.stopAsyncValidation=f,e.stopSubmit=l,e.touch=d,e.untouch=p;var v=r(2)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){return"function"==typeof t?function(){return o({},t.apply(void 0,arguments),e)}:"object"==typeof t?a.default(t,function(t){return u(t,e)}):t}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=u;var i=r(1),a=n(i);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function o(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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){var e=["asyncValidate","handleBlur","handleChange","handleFocus","handleSubmit","onBlur","onChange","onFocus"];return!~e.indexOf(t)}function c(t,e,r){if(t&&t[e]){if(!r)return t[e];if(t[e][r])return t[e][r]}return w.initialState}function f(t){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),u=1;r>u;u++)n[u-1]=arguments[u];return e&&e.preventDefault?(e.preventDefault(),e.stopPropagation(),t.apply(void 0,n)):t.apply(void 0,[e].concat(n))}}function l(t){return!t||Object.keys(t).reduce(function(e,r){return e&&S.default(t[r])},!0)}function d(t,e){function r(e,r){if(void 0!==e||!r)return"object"==typeof e&&e.value?e.value:e;if(!t&&void 0!==r.nativeEvent&&void 0!==r.nativeEvent.text)return r.nativeEvent.text;if(t&&void 0!==r.nativeEvent)return r.nativeEvent.text;if(void 0===r.target)return r;var n=r.target,u=n.type,o=n.value,i=n.checked,a=n.files,s=r.dataTransfer;return"checkbox"===u?i:"file"===u?a||s&&s.files:o}var n=e.Component,u=e.PropTypes;return function(t){var d=v({validate:function(){return{}},touchOnBlur:!0,touchOnChange:!1,readonly:!1,asyncValidate:null,asyncBlurFields:[]},t),h=d.form,m=d.fields,b=d.validate,O=d.readonly,x=d.touchOnBlur,w=d.touchOnChange,A=d.asyncValidate,j=d.asyncBlurFields;if(!m||!m.length)throw new Error('No fields passed to redux-form. Must be passed to connectReduxForm({fields: ["my", "field", "names"]})');var I=function(t){return O?Object.keys(t).reduce(function(e,r){var n;return s(r)?v({},e,(n={},n[r]=t[r],n)):e},{}):t};return function(t){return function(n){function s(){i(this,s),n.apply(this,arguments)}return a(s,n),s.prototype.componentWillMount=function(){var t=this.props,e=t.initialValues,r=t.dispatch,n=t.formName,u=t.formKey;if(e){var o=u?T.default(y,{form:n,key:u}):T.default(y,{form:n}),i=o.initialize;r(i(e))}},s.prototype.render=function(){function n(){p(k(d));var t=A(M,p);if(!t||"function"!=typeof t.then)throw new Error("asyncValidate function passed to reduxForm must return a promise!");return t.then(function(t){return p(D(t)),l(t)},function(t){throw p(D({})),new Error("redux-form: Asynchronous validation failed: "+t)})}var u=this,i=this.props,a=i.formName,s=i.form,d=i.formKey,p=i.dispatch,h=o(i,["formName","form","formKey","dispatch"]);if(!a)throw new Error('No form name given to redux-form. Must be passed to connectReduxForm({form: [form name]}) or as a "formName" prop');var g=c(s,a,d),O=!0,P=!0,M=m.reduce(function(t,e){var r;return v({},t,(r={},r[e]=g[e]?g[e].value:void 0,r))},{}),C=d?T.default(y,{form:a,key:d}):T.default(y,{form:a}),E=C.blur,N=C.change,R=C.focus,U=C.initialize,V=C.reset,k=C.startAsyncValidation,F=C.startSubmit,D=C.stopAsyncValidation,B=C.stopSubmit,z=C.touch,L=C.untouch,H=function(t,e){return function(u){var o=r(e,u),i=T.default(E,{touch:x});if(p(i(t,o)),A&&~j.indexOf(t)){var a,s=b(v({},M,(a={},a[t]=o,a)))[t];s||n()}}},W=function(t){return function(){p(R(t))}},K=function(t,e){return function(n){var u=T.default(N,{touch:w});p(u(t,r(e,n)))}},q=function(t){var e=function(t){return function(e){e&&e.preventDefault&&(e.preventDefault(),e.stopPropagation());var r=function(){var e=t(M);return e&&"function"==typeof e.then?(p(F()),e.then(function(t){return p(B()),t},function(t){return p(B(t)),t})):void 0};return p(z.apply(void 0,m)),O?A?n().then(function(t){return O&&t?r(M):void 0}):r(M):void 0}};if("function"==typeof t)return e(t);var r=u.props.onSubmit;if(!r)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");e(r)(t)},Y=b(M),G=m.reduce(function(t,e){var r,n=g[e]||{},u=_.default(n.value,n.initial),o=Y[e]||n.asyncError||n.submitError,i=S.default(o),a=H(e),s=K(e),c=function(t){t.dataTransfer.setData("value",n.value)},f=function(t){s(t.dataTransfer.getData("value"))},l=W(e);return i||(O=!1),u||(P=!1),v({},t,(r={},r[e]=I({active:g._active===e,checked:"boolean"==typeof n.value?n.value:void 0,dirty:!u,error:o,handleBlur:a,handleChange:s,handleFocus:l,invalid:!i,name:e,onBlur:a,onChange:s,onDrag:c,onDrop:f,onFocus:l,onUpdate:s,pristine:u,touched:n.touched,valid:i,value:n.value,visited:n.visited}),r))},{}),Z=Y._error||g._error;return Z&&(O=!1),e.createElement(t,v({active:g._active,asyncValidating:g._asyncValidating,dirty:!P,error:Z,fields:G,formKey:d,invalid:!O,pristine:P,submitting:g._submitting,valid:O,values:M,asyncValidate:f(n),handleBlur:f(H),handleChange:f(K),handleFocus:W,handleSubmit:f(q),initializeForm:f(function(t){return p(U(t))}),resetForm:f(function(){return p(V())}),touch:f(function(){return p(z.apply(void 0,arguments))}),touchAll:f(function(){return p(z.apply(void 0,m))}),untouch:f(function(){return p(L.apply(void 0,arguments))}),untouchAll:f(function(){return p(L.apply(void 0,m))}),dispatch:p},h))},p(s,null,[{key:"displayName",value:"ReduxForm("+g.default(t)+")",enumerable:!0},{key:"DecoratedComponent",value:t,enumerable:!0},{key:"propTypes",value:{formName:u.string,formKey:u.string,form:u.object,onSubmit:u.func,dispatch:u.func.isRequired,initialValues:u.object},enumerable:!0},{key:"defaultProps",value:{formName:h},enumerable:!0}]),s}(n)}}}e.__esModule=!0;var p=function(){function t(t,e){for(var r=0;r<e.length;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}}(),v=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=d;var h=r(3),y=u(h),m=r(15),g=n(m),b=r(16),_=n(b),O=r(17),S=n(O),x=r(4),T=n(x),w=r(6);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function o(){var t,e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=r.form,o=r.key,i=u(r,["form","key"]);if(!n)return e;if(o){var s,c;return a({},e,(c={},c[n]=a({},e[n],(s={},s[o]=p((e[n]||{})[o],i),s)),c))}return a({},e,(t={},t[n]=p(e[n],i),t))}function i(t){return t.plugin=function(t){var e=this;return i(function(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=e(r,n);return a({},u,f.default(t,function(t,e){return t(u[e]||l,n)}))})},t.normalize=function(t){var e=this;return i(function(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=e(r,n);return a({},u,f.default(t,function(t,e){var n=a({},l,u[e]);return a({},n,f.default(t,function(t,u){return a({},n[u],{value:t(n[u]?n[u].value:void 0,r[e]&&r[e][u]?r[e][u].value:void 0,d(n))})}))}))})},t}e.__esModule=!0;var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s=r(2),c=r(1),f=n(c),l={_active:void 0,_asyncValidating:!1,_error:void 0,_submitting:!1};e.initialState=l;var d=function(t){return Object.keys(t).reduce(function(e,r){var n;return"_"===r[0]?e:a({},e,(n={},n[r]=t[r].value,n))},{})},p=function(){var t,e,r,n=arguments.length<=0||void 0===arguments[0]?l:arguments[0],u=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];switch(u.type){case s.BLUR:return a({},n,(t={},t[u.field]=a({},n[u.field],{value:void 0===u.value?(n[u.field]||{}).value:u.value,touched:!(!u.touch&&!(n[u.field]||{}).touched)}),t._active=void 0,t));case s.CHANGE:return a({},n,(e={},e[u.field]=a({},n[u.field],{value:u.value,touched:!(!u.touch&&!(n[u.field]||{}).touched),asyncError:null,submitError:null}),e._error=void 0,e));case s.FOCUS:return a({},n,(r={},r[u.field]=a({},n[u.field],{visited:!0}),r._active=u.field,r));case s.INITIALIZE:return a({},f.default(u.data,function(t){return{initial:t,value:t}}),{_asyncValidating:!1,_active:void 0,_error:void 0,_submitting:!1});case s.RESET:return a({},f.default(n,function(t,e){return"_"===e[0]?t:{initial:t.initial,value:t.initial}}),{_active:void 0,_asyncValidating:!1,_error:void 0,_submitting:!1});case s.START_ASYNC_VALIDATION:return a({},n,{_asyncValidating:!0});case s.START_SUBMIT:return a({},n,{_submitting:!0});case s.STOP_ASYNC_VALIDATION:return a({},n,f.default(u.errors,function(t,e){return a({},n[e],{asyncError:t})}),{_asyncValidating:!1,_error:u.errors._error});case s.STOP_SUBMIT:return a({},n,u.errors?f.default(u.errors,function(t,e){return a({},n[e],{submitError:t})}):{},{_error:u.errors&&u.errors._error,_submitting:!1});case s.TOUCH:return a({},n,u.fields.reduce(function(t,e){var r;return a({},t,(r={},r[e]=a({},n[e],{touched:!0}),r))},{}));case s.UNTOUCH:return a({},n,u.fields.reduce(function(t,e){var r;return a({},t,(r={},r[e]=a({},n[e],{touched:!1}),r))},{}));default:return n}};e.default=i(o)},function(t,e){"use strict";function r(t){return t.shape({subscribe:t.func.isRequired,dispatch:t.func.isRequired,getState:t.func.isRequired})}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){function r(){return c}function n(t){return f.push(t),function(){var e=f.indexOf(t);f.splice(e,1)}}function u(t){if(!i.default(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,c=s(c,t)}finally{l=!1}return f.slice().forEach(function(t){return t()}),t}function o(t){s=t,u({type:a.INIT})}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var s=t,c=e,f=[],l=!1;return u({type:a.INIT}),{dispatch:u,subscribe:n,getState:r,replaceReducer:o}}e.__esModule=!0,e.default=u;var o=r(10),i=n(o),a={INIT:"@@redux/INIT"};e.ActionTypes=a},function(t,e){"use strict";function r(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return function(t){return e.reduceRight(function(t,e){return e(t)},t)}}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";function r(t){if(!t||"object"!=typeof t)return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&n(r)===n(Object)}e.__esModule=!0,e.default=r;var n=function(t){return Function.prototype.toString.call(t)};t.exports=e.default},function(t,e){"use strict";function r(t,e){return Object.keys(t).reduce(function(r,n){return r[n]=e(t[n],n),r},{})}e.__esModule=!0,e.default=r,t.exports=e.default},function(e,r){e.exports=t},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function u(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,r){return{blur:_,change:O,connectReduxForm:d.default(t,e,r),focus:S,reducer:s.default,initialize:x,initializeWithKey:T,reduxForm:f.default(t,e),reset:w,startAsyncValidation:A,startSubmit:j,stopAsyncValidation:I,stopSubmit:P,touch:M,untouch:C}}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=o;var a=r(6),s=u(a),c=r(5),f=u(c),l=r(14),d=u(l),p=r(1),v=u(p),h=r(4),y=u(h),m=r(3),g=n(m),b=i({},v.default(i({},g,{initializeWithKey:function(t,e){return y.default(g.initialize,{key:t})(e)}}),function(t){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),u=1;r>u;u++)n[u-1]=arguments[u];return y.default(t,{form:e}).apply(void 0,n)}})),_=b.blur,O=b.change,S=b.focus,x=b.initialize,T=b.initializeWithKey,w=b.reset,A=b.startAsyncValidation,j=b.startSubmit,I=b.stopAsyncValidation,P=b.stopSubmit,M=b.touch,C=b.untouch;t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return function(t){return e.reduce(function(t,e){return e(t)},t)}}function o(t,e,r){var n=a.default(t,e),o=r(function(t){return{form:t.form}});return function(){return u(n.apply(void 0,arguments),o)}}e.__esModule=!0,e.default=o;var i=r(5),a=n(i);t.exports=e.default},function(t,e){"use strict";function r(t){return t.displayName||t.name||"Component"}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";function r(t,e){if(t===e)return!0;if(t&&"object"==typeof t){if(!e||"object"!=typeof e)return!1;for(var n=Object.keys(e),u=0;u<n.length;u++){var o=n[u];if(!r(t[o],e[o]))return!1}}else if(t||e)return t===e;return!0}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";function r(t){return Array.isArray(t)?t.reduce(function(t,e){return t&&r(e)},!0):!t}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t){var e=i.default(t),r=s.default(t);return{Provider:e,connect:r}}e.__esModule=!0,e.default=u;var o=r(20),i=n(o),a=r(19),s=n(a);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 i(t){return t.displayName||t.name||"Component"}function a(t){var e=t.Component,r=t.PropTypes,n=l.default(r);return function(r,a,f){function l(t,e){var r=t.getState(),n=j?T(r,e):T(r);return b.default(h.default(n),"`mapStateToProps` must return an object. Instead received %s.",n),n}function d(t,e){var r=t.dispatch,n=I?w(r,e):w(r);return b.default(h.default(n),"`mapDispatchToProps` must return an object. Instead received %s.",n),n}function v(t,e,r){var n=A(t,e,r);return b.default(h.default(n),"`mergeProps` must return an object. Instead received %s.",n),n}var y=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],g=Boolean(r),T=r||_,w=h.default(a)?m.default(a):a||O,A=f||S,j=T.length>1,I=w.length>1,P=y.pure,M=void 0===P?!0:P,C=x++;return function(r){var a=function(e){function a(t,r){u(this,a),e.call(this,t,r),this.version=C,this.store=t.store||r.store,b.default(this.store,'Could not find "store" in either the context or '+('props of "'+this.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+this.constructor.displayName+'".')),this.stateProps=l(this.store,t),this.dispatchProps=d(this.store,t),this.state={storeState:null},this.updateState()}return o(a,e),a.prototype.shouldComponentUpdate=function(t,e){if(!M)return this.updateStateProps(t),this.updateDispatchProps(t),this.updateState(t),!0;var r=e.storeState!==this.state.storeState,n=!p.default(t,this.props),u=!1,o=!1;return(r||n&&j)&&(u=this.updateStateProps(t)),n&&I&&(o=this.updateDispatchProps(t)),n||u||o?(this.updateState(t),!0):!1},s(a,null,[{key:"displayName",value:"Connect("+i(r)+")",enumerable:!0},{key:"WrappedComponent",value:r,enumerable:!0},{key:"contextTypes",value:{store:n},enumerable:!0},{key:"propTypes",value:{store:n},enumerable:!0}]),a.prototype.computeNextState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];return v(this.stateProps,this.dispatchProps,t)},a.prototype.updateStateProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=l(this.store,t);return p.default(e,this.stateProps)?!1:(this.stateProps=e,!0)},a.prototype.updateDispatchProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=d(this.store,t);return p.default(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},a.prototype.updateState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];this.nextState=this.computeNextState(t)},a.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},a.prototype.trySubscribe=function(){g&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},a.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},a.prototype.componentDidMount=function(){this.trySubscribe()},a.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},a.prototype.handleChange=function(){this.unsubscribe&&this.setState({storeState:this.store.getState()})},a.prototype.getWrappedInstance=function(){return this.refs.wrappedInstance},a.prototype.render=function(){return t.createElement(r,c({ref:"wrappedInstance"},this.nextState))},a}(e);return a}}}e.__esModule=!0;var s=function(){function t(t,e){for(var r=0;r<e.length;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}}(),c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=a;var f=r(7),l=n(f),d=r(23),p=n(d),v=r(22),h=n(v),y=r(24),m=n(y),g=r(25),b=n(g),_=function(){return{}},O=function(t){return{dispatch:t}},S=function(t,e,r){return c({},r,t,e)},x=0;t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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 i(t){var e=t.version;if("string"!=typeof e)return!0;var r=e.split("."),n=parseInt(r[0],10),u=parseInt(r[1],10);return 0===n&&13===u}function a(t){function e(){v||p||(v=!0,console.error("With React 0.14 and later versions, you no longer need to wrap <Provider> child into a function."))}function r(){!v&&p&&(v=!0,console.error("With React 0.13, you need to wrap <Provider> child into a function. This restriction will be removed with React 0.14."))}function n(){h||(h=!0,console.error("<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/rackt/react-redux/releases/tag/v2.0.0 for the migration instructions."))}var a=t.Component,c=t.PropTypes,l=t.Children,d=f.default(c),p=i(t),v=!1,h=!1;return function(t){function i(e,r){u(this,i),t.call(this,e,r),this.store=e.store}return o(i,t),i.prototype.getChildContext=function(){return{store:this.store}},s(i,null,[{key:"childContextTypes",value:{store:d.isRequired},enumerable:!0},{key:"propTypes",value:{store:d.isRequired,children:(p?c.func:c.element).isRequired},enumerable:!0}]),i.prototype.componentWillReceiveProps=function(t){var e=this.store,r=t.store;e!==r&&n()},i.prototype.render=function(){var t=this.props.children;return"function"==typeof t?(e(),t=t()):r(),l.only(t)},i}(a)}e.__esModule=!0;var s=function(){function t(t,e){for(var r=0;r<e.length;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}}();e.default=a;var c=r(7),f=n(c);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(12),o=n(u),i=r(18),a=n(i),s=a.default(o.default),c=s.Provider,f=s.connect;e.Provider=c,e.connect=f},function(t,e){"use strict";function r(t){if(!t||"object"!=typeof t)return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&n(r)===n(Object)}e.__esModule=!0,e.default=r;var n=function(t){return Function.prototype.toString.call(t)};t.exports=e.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 u=Object.prototype.hasOwnProperty,o=0;o<r.length;o++)if(!u.call(e,r[o])||t[r[o]]!==e[r[o]])return!1;return!0}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return function(e){return u.bindActionCreators(t,e)}}e.__esModule=!0,e.default=n;var u=r(26);t.exports=e.default},function(t,e,r){"use strict";var n=function(t,e,r,n,u,o,i,a){if(!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,u,o,i,a],f=0;s=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return c[f++]}))}throw s.framesToPop=1,s}};t.exports=n},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(8),o=n(u),i=r(29),a=n(i),s=r(28),c=n(s),f=r(27),l=n(f),d=r(9),p=n(d);e.createStore=o.default,e.combineReducers=a.default,e.bindActionCreators=c.default,e.applyMiddleware=l.default,e.compose=p.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return function(t){return function(r,n){var u=t(r,n),i=u.dispatch,s=[],c={getState:u.getState,dispatch:function(t){return i(t)}};return s=e.map(function(t){return t(c)}),i=a.default.apply(void 0,s)(u.dispatch),o({},u,{dispatch:i})}}}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=u;var i=r(9),a=n(i);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){return function(){return e(t.apply(void 0,arguments))}}function o(t,e){if("function"==typeof t)return u(t,e);if("object"!=typeof t||null===t||void 0===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');return a.default(t,function(t){return u(t,e)})}e.__esModule=!0,e.default=o;var i=r(11),a=n(i);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){var r=e&&e.type,n=r&&'"'+r.toString()+'"'||"an action";return'Reducer "'+t+'" returned undefined handling '+n+". To ignore an action, you must explicitly return the previous state."}function o(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:a.ActionTypes.INIT});if("undefined"==typeof n)throw new Error('Reducer "'+e+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var u="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof r(void 0,{type:u}))throw new Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+a.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function i(t){var e,r=d.default(t,function(t){return"function"==typeof t});try{o(r)}catch(n){e=n}var i=f.default(r,function(){return void 0});return function(t,n){if(void 0===t&&(t=i),e)throw e;var o=f.default(r,function(e,r){var o=e(t[r],n);if("undefined"==typeof o){var i=u(r,n);throw new Error(i)}return o});return o}}e.__esModule=!0,e.default=i;var a=r(8),s=r(10),c=(n(s),r(11)),f=n(c),l=r(30),d=n(l);t.exports=e.default},function(t,e){"use strict";function r(t,e){return Object.keys(t).reduce(function(r,n){return e(t[n])&&(r[n]=t[n]),r},{})}e.__esModule=!0,e.default=r,t.exports=e.default}])});
!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.ReduxForm=e(require("react")):t.ReduxForm=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}}e.__esModule=!0;var o=r(12),u=n(o),i=r(29),a=r(13),s=n(a),c=s.default(!1,u.default,i.connect),f=c.blur,l=c.change,d=c.connectReduxForm,p=c.focus,h=c.reducer,v=c.reduxForm,y=c.initialize,m=c.initializeWithKey,g=c.reset,b=c.startAsyncValidation,_=c.startSubmit,O=c.stopAsyncValidation,x=c.stopSubmit,S=c.touch,T=c.untouch;e.blur=f,e.change=l,e.connectReduxForm=d,e.focus=p,e.reducer=h,e.reduxForm=v,e.initialize=y,e.initializeWithKey=m,e.reset=g,e.startAsyncValidation=b,e.startSubmit=_,e.stopAsyncValidation=O,e.stopSubmit=x,e.touch=S,e.untouch=T},function(t,e){"use strict";function r(t,e){return Object.keys(t).reduce(function(r,o){var u;return n({},r,(u={},u[o]=e(t[o],o),u))},{})}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=r,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r="redux-form/BLUR";e.BLUR=r;var n="redux-form/CHANGE";e.CHANGE=n;var o="redux-form/FOCUS";e.FOCUS=o;var u="redux-form/INITIALIZE";e.INITIALIZE=u;var i="redux-form/RESET";e.RESET=i;var a="redux-form/START_ASYNC_VALIDATION";e.START_ASYNC_VALIDATION=a;var s="redux-form/START_SUBMIT";e.START_SUBMIT=s;var c="redux-form/STOP_ASYNC_VALIDATION";e.STOP_ASYNC_VALIDATION=c;var f="redux-form/STOP_SUBMIT";e.STOP_SUBMIT=f;var l="redux-form/TOUCH";e.TOUCH=l;var d="redux-form/UNTOUCH";e.UNTOUCH=d},function(t,e,r){"use strict";function n(t,e){return{type:h.BLUR,field:t,value:e}}function o(t,e){return{type:h.CHANGE,field:t,value:e}}function u(t){return{type:h.FOCUS,field:t}}function i(t){return{type:h.INITIALIZE,data:t}}function a(){return{type:h.RESET}}function s(){return{type:h.START_ASYNC_VALIDATION}}function c(){return{type:h.START_SUBMIT}}function f(t){return{type:h.STOP_ASYNC_VALIDATION,errors:t}}function l(t){return{type:h.STOP_SUBMIT,errors:t}}function d(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return{type:h.TOUCH,fields:e}}function p(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return{type:h.UNTOUCH,fields:e}}e.__esModule=!0,e.blur=n,e.change=o,e.focus=u,e.initialize=i,e.reset=a,e.startAsyncValidation=s,e.startSubmit=c,e.stopAsyncValidation=f,e.stopSubmit=l,e.touch=d,e.untouch=p;var h=r(2)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){return"function"==typeof t?function(){return u({},t.apply(void 0,arguments),e)}:"object"==typeof t?a.default(t,function(t){return o(t,e)}):t}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=o;var i=r(1),a=n(i);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function u(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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){var e=["asyncValidate","handleBlur","handleChange","handleFocus","handleSubmit","onBlur","onChange","onFocus"];return!~e.indexOf(t)}function c(t){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];return e&&e.preventDefault?(e.preventDefault(),e.stopPropagation(),t.apply(void 0,n)):t.apply(void 0,[e].concat(n))}}function f(t){return!t||Object.keys(t).reduce(function(e,r){return e&&O.default(t[r])},!0)}function l(t,e){function r(e,r){if(void 0!==e||!r)return"object"==typeof e&&e.value?e.value:e;if(!t&&void 0!==r.nativeEvent&&void 0!==r.nativeEvent.text)return r.nativeEvent.text;if(t&&void 0!==r.nativeEvent)return r.nativeEvent.text;if(void 0===r.target)return r;var n=r.target,o=n.type,u=n.value,i=n.checked,a=n.files,s=r.dataTransfer;return"checkbox"===o?i:"file"===o?a||s&&s.files:u}var n=e.Component,o=e.PropTypes;return function(t){var l=p({validate:function(){return{}},touchOnBlur:!0,touchOnChange:!1,readonly:!1,asyncValidate:null,asyncBlurFields:[]},t),h=l.form,y=l.fields,g=l.validate,_=l.readonly,x=l.touchOnBlur,A=l.touchOnChange,w=l.asyncValidate,P=l.asyncBlurFields;if(!y||!y.length)throw new Error('No fields passed to redux-form. Must be passed to connectReduxForm({fields: ["my", "field", "names"]})');var I=function(t){return _?Object.keys(t).reduce(function(e,r){var n;return s(r)?p({},e,(n={},n[r]=t[r],n)):e},{}):t};return function(t){return function(n){function s(){i(this,s),n.apply(this,arguments)}return a(s,n),s.prototype.componentWillMount=function(){var t=this;this.cache=j.default(this,{actions:function(t,e){return e?S.default(v,{form:t,key:e}):S.default(v,{form:t})},handleBlur:function(e,n){return function(o,u){return function(i){var a=r(u,i),s=S.default(e.blur,{touch:x});if(n(s(o,a)),w&&~P.indexOf(o)){var c,f=t.getValues(),l=g(p({},f,(c={},c[o]=a,c)))[o];l||t.runAsyncValidation(e,f)}}}},handleFocus:function(t,e){return function(r){return function(){e(t.focus(r))}}},handleChange:function(t,e){return function(n,o){return function(u){var i=S.default(t.change,{touch:A});e(i(n,r(o,u)))}}},fieldActions:function(t,e,r){return y.reduce(function(n,o){var u,i=t(o),a=e(o),s=r(o);return p({},n,(u={},u[o]=I({handleBlur:i,handleChange:a,handleFocus:s,name:o,onBlur:i,onChange:a,onDrop:function(t){a(t.dataTransfer.getData("value"))},onFocus:s,onUpdate:a}),u))},{})}});var e=this.props,n=e.initialValues,o=e.dispatch;if(n){var u=this.cache.actions.initialize;o(u(n))}},s.prototype.runAsyncValidation=function(t,e){var r=this.props,n=r.dispatch,o=r.formKey;n(t.startAsyncValidation(o));var u=w(e,n);if(!u||"function"!=typeof u.then)throw new Error("asyncValidate function passed to reduxForm must return a promise!");return u.then(function(e){return n(t.stopAsyncValidation(e)),f(e)},function(e){throw n(t.stopAsyncValidation({})),new Error("redux-form: Asynchronous validation failed: "+e)})},s.prototype.getSubForm=function(){var t=this.props,e=t.formName,r=t.form,n=t.formKey;if(r&&r[e]){if(!n)return r[e];if(r[e][n])return r[e][n]}return T.initialState},s.prototype.getValues=function(){var t=this.getSubForm();return y.reduce(function(e,r){var n;return p({},e,(n={},n[r]=t[r]?t[r].value:void 0,n))},{})},s.prototype.componentWillReceiveProps=function(t){this.cache.componentWillReceiveProps(t)},s.prototype.render=function(){var r=this,n=this.props,o=n.formName,i=(n.form,n.formKey),a=n.dispatch,s=u(n,["formName","form","formKey","dispatch"]);if(!o)throw new Error('No form name given to redux-form. Must be passed to connectReduxForm({form: [form name]}) or as a "formName" prop');var f=this.cache,l=f.actions,d=f.values,h=f.fieldActions,v=f.handleBlur,m=f.handleChange,_=f.handleFocus,x=this.getSubForm(),S=!0,T=!0,A=function(t){var e=function(t){return function(e){e&&e.preventDefault&&(e.preventDefault(),e.stopPropagation());var n=function(){var e=t(d);return e&&"function"==typeof e.then?(a(l.startSubmit()),e.then(function(t){return a(l.stopSubmit()),t},function(t){return a(l.stopSubmit(t)),t})):void 0};return a(l.touch.apply(l,y)),S?w?r.runAsyncValidation(l,d).then(function(t){return S&&t?n(d):void 0}):n(d):void 0}};if("function"==typeof t)return e(t);var n=r.props.onSubmit;if(!n)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");e(n)(t)},j=g(d),P=y.reduce(function(t,e){var r,n=x[e]||{},o=b.default(n.value,n.initial),u=j[e]||n.asyncError||n.submitError,i=O.default(u);return i||(S=!1),o||(T=!1),p({},t,(r={},r[e]=I(p({active:x._active===e,checked:"boolean"==typeof n.value?n.value:void 0,dirty:!o,error:u},h[e],{invalid:!i,name:e,onDrag:function(t){return t.dataTransfer.setData("value",n.value)},pristine:o,touched:n.touched,valid:i,value:n.value,visited:n.visited})),r))},{}),M=j._error||x._error;return M&&(S=!1),e.createElement(t,p({active:x._active,asyncValidating:x._asyncValidating,dirty:!T,error:M,fields:P,formKey:i,invalid:!S,pristine:T,submitting:x._submitting,valid:S,values:d,asyncValidate:c(function(){return r.runAsyncValidation(l,d)}),handleBlur:c(v),handleChange:c(m),handleFocus:_,handleSubmit:c(A),initializeForm:c(function(t){return a(l.initialize(t))}),resetForm:c(function(){return a(l.reset())}),touch:c(function(){return a(l.touch.apply(l,arguments))}),touchAll:c(function(){return a(l.touch.apply(l,y))}),untouch:c(function(){return a(l.untouch.apply(l,arguments))}),untouchAll:c(function(){return a(l.untouch.apply(l,y))}),dispatch:a},s))},d(s,null,[{key:"displayName",value:"ReduxForm("+m.default(t)+")",enumerable:!0},{key:"DecoratedComponent",value:t,enumerable:!0},{key:"propTypes",value:{formName:o.string,formKey:o.string,form:o.object,onSubmit:o.func,dispatch:o.func.isRequired,initialValues:o.object},enumerable:!0},{key:"defaultProps",value:{formName:h},enumerable:!0}]),s}(n)}}}e.__esModule=!0;var d=function(){function t(t,e){for(var r=0;r<e.length;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}}(),p=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=l;var h=r(3),v=o(h),y=r(15),m=n(y),g=r(16),b=n(g),_=r(17),O=n(_),x=r(4),S=n(x),T=r(6),A=r(24),j=n(A);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function u(){var t,e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=r.form,u=r.key,i=o(r,["form","key"]);if(!n)return e;if(u){var s,c;return a({},e,(c={},c[n]=a({},e[n],(s={},s[u]=p((e[n]||{})[u],i),s)),c))}return a({},e,(t={},t[n]=p(e[n],i),t))}function i(t){return t.plugin=function(t){var e=this;return i(function(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=e(r,n);return a({},o,f.default(t,function(t,e){return t(o[e]||l,n)}))})},t.normalize=function(t){var e=this;return i(function(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=e(r,n);return a({},o,f.default(t,function(t,e){var n=a({},l,o[e]);return a({},n,f.default(t,function(t,o){return a({},n[o],{value:t(n[o]?n[o].value:void 0,r[e]&&r[e][o]?r[e][o].value:void 0,d(n))})}))}))})},t}e.__esModule=!0;var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s=r(2),c=r(1),f=n(c),l={_active:void 0,_asyncValidating:!1,_error:void 0,_submitting:!1};e.initialState=l;var d=function(t){return Object.keys(t).reduce(function(e,r){var n;return"_"===r[0]?e:a({},e,(n={},n[r]=t[r].value,n))},{})},p=function(){var t,e,r,n=arguments.length<=0||void 0===arguments[0]?l:arguments[0],o=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];switch(o.type){case s.BLUR:return a({},n,(t={},t[o.field]=a({},n[o.field],{value:void 0===o.value?(n[o.field]||{}).value:o.value,touched:!(!o.touch&&!(n[o.field]||{}).touched)}),t._active=void 0,t));case s.CHANGE:return a({},n,(e={},e[o.field]=a({},n[o.field],{value:o.value,touched:!(!o.touch&&!(n[o.field]||{}).touched),asyncError:null,submitError:null}),e._error=void 0,e));case s.FOCUS:return a({},n,(r={},r[o.field]=a({},n[o.field],{visited:!0}),r._active=o.field,r));case s.INITIALIZE:return a({},f.default(o.data,function(t){return{initial:t,value:t}}),{_asyncValidating:!1,_active:void 0,_error:void 0,_submitting:!1});case s.RESET:return a({},f.default(n,function(t,e){return"_"===e[0]?t:{initial:t.initial,value:t.initial}}),{_active:void 0,_asyncValidating:!1,_error:void 0,_submitting:!1});case s.START_ASYNC_VALIDATION:return a({},n,{_asyncValidating:!0});case s.START_SUBMIT:return a({},n,{_submitting:!0});case s.STOP_ASYNC_VALIDATION:return a({},n,f.default(o.errors,function(t,e){return a({},n[e],{asyncError:t})}),{_asyncValidating:!1,_error:o.errors._error});case s.STOP_SUBMIT:return a({},n,o.errors?f.default(o.errors,function(t,e){return a({},n[e],{submitError:t})}):{},{_error:o.errors&&o.errors._error,_submitting:!1});case s.TOUCH:return a({},n,o.fields.reduce(function(t,e){var r;return a({},t,(r={},r[e]=a({},n[e],{touched:!0}),r))},{}));case s.UNTOUCH:return a({},n,o.fields.reduce(function(t,e){var r;return a({},t,(r={},r[e]=a({},n[e],{touched:!1}),r))},{}));default:return n}};e.default=i(u)},function(t,e){"use strict";function r(t){return t.shape({subscribe:t.func.isRequired,dispatch:t.func.isRequired,getState:t.func.isRequired})}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){function r(){return c}function n(t){return f.push(t),function(){var e=f.indexOf(t);f.splice(e,1)}}function o(t){if(!i.default(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,c=s(c,t)}finally{l=!1}return f.slice().forEach(function(t){return t()}),t}function u(t){s=t,o({type:a.INIT})}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var s=t,c=e,f=[],l=!1;return o({type:a.INIT}),{dispatch:o,subscribe:n,getState:r,replaceReducer:u}}e.__esModule=!0,e.default=o;var u=r(10),i=n(u),a={INIT:"@@redux/INIT"};e.ActionTypes=a},function(t,e){"use strict";function r(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return function(t){return e.reduceRight(function(t,e){return e(t)},t)}}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";function r(t){if(!t||"object"!=typeof t)return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&n(r)===n(Object)}e.__esModule=!0,e.default=r;var n=function(t){return Function.prototype.toString.call(t)};t.exports=e.default},function(t,e){"use strict";function r(t,e){return Object.keys(t).reduce(function(r,n){return r[n]=e(t[n],n),r},{})}e.__esModule=!0,e.default=r,t.exports=e.default},function(e,r){e.exports=t},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{"default":t}}function u(t,e,r){return{blur:_,change:O,connectReduxForm:d.default(t,e,r),focus:x,reducer:s.default,initialize:S,initializeWithKey:T,reduxForm:f.default(t,e),reset:A,startAsyncValidation:j,startSubmit:w,stopAsyncValidation:P,stopSubmit:I,touch:M,untouch:E}}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=u;var a=r(6),s=o(a),c=r(5),f=o(c),l=r(14),d=o(l),p=r(1),h=o(p),v=r(4),y=o(v),m=r(3),g=n(m),b=i({},h.default(i({},g,{initializeWithKey:function(t,e){return y.default(g.initialize,{key:t})(e)}}),function(t){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];return y.default(t,{form:e}).apply(void 0,n)}})),_=b.blur,O=b.change,x=b.focus,S=b.initialize,T=b.initializeWithKey,A=b.reset,j=b.startAsyncValidation,w=b.startSubmit,P=b.stopAsyncValidation,I=b.stopSubmit,M=b.touch,E=b.untouch;t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return function(t){return e.reduce(function(t,e){return e(t)},t)}}function u(t,e,r){var n=a.default(t,e),u=r(function(t){return{form:t.form}});return function(){return o(n.apply(void 0,arguments),u)}}e.__esModule=!0,e.default=u;var i=r(5),a=n(i);t.exports=e.default},function(t,e){"use strict";function r(t){return t.displayName||t.name||"Component"}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";function r(t,e){if(t===e)return!0;if(t&&"object"==typeof t){if(!e||"object"!=typeof e)return!1;for(var n=Object.keys(e),o=0;o<n.length;o++){var u=n[o];if(!r(t[u],e[u]))return!1}}else if(t||e)return t===e;return!0}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";function r(t){return Array.isArray(t)?t.reduce(function(t,e){return t&&r(e)},!0):!t}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){function n(t){return null===t||void 0===t}function o(t){return t&&"object"==typeof t&&"number"==typeof t.length?"function"!=typeof t.copy||"function"!=typeof t.slice?!1:t.length>0&&"number"!=typeof t[0]?!1:!0:!1}function u(t,e,r){var u,f;if(n(t)||n(e))return!1;if(t.prototype!==e.prototype)return!1;if(s(t))return s(e)?(t=i.call(t),e=i.call(e),c(t,e,r)):!1;if(o(t)){if(!o(e))return!1;if(t.length!==e.length)return!1;for(u=0;u<t.length;u++)if(t[u]!==e[u])return!1;return!0}try{var l=a(t),d=a(e)}catch(p){return!1}if(l.length!=d.length)return!1;for(l.sort(),d.sort(),u=l.length-1;u>=0;u--)if(l[u]!=d[u])return!1;for(u=l.length-1;u>=0;u--)if(f=l[u],!c(t[f],e[f],r))return!1;return typeof t==typeof e}var i=Array.prototype.slice,a=r(20),s=r(19),c=t.exports=function(t,e,r){return r||(r={}),t===e?!0:t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?r.strict?t===e:t==e:u(t,e,r)}},function(t,e){function r(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function n(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}var o="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();e=t.exports=o?r:n,e.supported=r,e.unsupported=n},function(t,e){function r(t){var e=[];for(var r in t)e.push(r);return e}e=t.exports="function"==typeof Object.keys?Object.keys:r,e.shim=r},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};t.exports=function(t,e){for(var o=Object.getOwnPropertyNames(e),u=0;u<o.length;++u)r[o[u]]||n[o[u]]||(t[o[u]]=e[o[u]]);return t}},function(t,e,r){"use strict";var n=function(t,e,r,n,o,u,i,a){if(!t){var s;if(void 0===e)s=new 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,u,i,a],f=0;s=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return c[f++]}))}throw s.framesToPop=1,s}};t.exports=n},function(t,e){"use strict";function r(t){var e=t.toString().replace(n,""),r=e.slice(e.indexOf("(")+1,e.indexOf(")")).match(o);return r||[]}e.__esModule=!0,e.default=r;var n=/(\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s*=[^,\)]*(('(?:\\'|[^'\r\n])*')|("(?:\\"|[^"\r\n])*"))|(\s*=[^,\)]*))/gm,o=/([^\s,]+)/g;t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(25),u=n(o);e.default=u.default,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var r=[],n={},o={},u=function a(t){Object.keys(n).forEach(function(e){~n[e].props.indexOf(t)&&(delete n[e].value,a(e))})};return Object.keys(e).forEach(function(u){var a=e[u],s=i.default(a);s.forEach(function(t){~r.indexOf(t)||r.push(t)}),n[u]={props:s},Object.defineProperty(o,u,{get:function(){var e=n[u];if(e&&void 0!==e.value)return e.value;var r=s.map(function(e){return t.props[e]||o[e]}),i=a.apply(void 0,r);return n[u]={props:s,value:i},i}})}),o.componentWillReceiveProps=function(e){var n=[];r.forEach(function(r){s.default(t.props[r],e[r])||n.push(r)}),n.forEach(u)},o}e.__esModule=!0,e.default=o;var u=r(23),i=n(u),a=r(18),s=n(a);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t){var e=i.default(t),r=s.default(t);return{Provider:e,connect:r}}e.__esModule=!0,e.default=o;var u=r(28),i=n(u),a=r(27),s=n(a);t.exports=e.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 u(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 i(t){return t.displayName||t.name||"Component"}function a(t){var e=t.Component,r=t.PropTypes,n=f.default(r);return function(r,a,c){function f(t,e){var r=t.getState(),n=w?b(r,e):b(r);return _.default(h.default(n),"`mapStateToProps` must return an object. Instead received %s.",n),n}function l(t,e){var r=t.dispatch,n=P?A(r,e):A(r);return _.default(h.default(n),"`mapDispatchToProps` must return an object. Instead received %s.",n),n}function p(t,e,r){var n=j(t,e,r);return _.default(h.default(n),"`mergeProps` must return an object. Instead received %s.",n),n}var v=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],m=Boolean(r),b=r||O,A=h.default(a)?y.default(a):a||x,j=c||S,w=b.length>1,P=A.length>1,I=v.pure,M=void 0===I?!0:I,E=T++;return function(r){var a=function(e){function n(t,r){o(this,n),e.call(this,t,r),this.version=E,this.store=t.store||r.store,_.default(this.store,'Could not find "store" in either the context or '+('props of "'+this.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+this.constructor.displayName+'".')),this.stateProps=f(this.store,t),this.dispatchProps=l(this.store,t),this.state={storeState:null},this.updateState()}return u(n,e),n.prototype.shouldComponentUpdate=function(t,e){if(!M)return this.updateStateProps(t),this.updateDispatchProps(t),this.updateState(t),!0;var r=e.storeState!==this.state.storeState,n=!d.default(t,this.props),o=!1,u=!1;return(r||n&&w)&&(o=this.updateStateProps(t)),n&&P&&(u=this.updateDispatchProps(t)),n||o||u?(this.updateState(t),!0):!1},n.prototype.computeNextState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];return p(this.stateProps,this.dispatchProps,t)},n.prototype.updateStateProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=f(this.store,t);return d.default(e,this.stateProps)?!1:(this.stateProps=e,!0)},n.prototype.updateDispatchProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=l(this.store,t);return d.default(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},n.prototype.updateState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];this.nextState=this.computeNextState(t)},n.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},n.prototype.trySubscribe=function(){m&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},n.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},n.prototype.componentDidMount=function(){this.trySubscribe()},n.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},n.prototype.handleChange=function(){this.unsubscribe&&this.setState({storeState:this.store.getState()})},n.prototype.getWrappedInstance=function(){return this.refs.wrappedInstance},n.prototype.render=function(){return t.createElement(r,s({ref:"wrappedInstance"},this.nextState))},n}(e);return a.displayName="Connect("+i(r)+")",a.WrappedComponent=r,a.contextTypes={store:n},a.propTypes={store:n},g.default(a,r)}}}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=a;var c=r(7),f=n(c),l=r(31),d=n(l),p=r(30),h=n(p),v=r(32),y=n(v),m=r(21),g=n(m),b=r(22),_=n(b),O=function(){return{}},x=function(t){return{dispatch:t}},S=function(t,e,r){return s({},r,t,e)},T=0;t.exports=e.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 u(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 i(t){var e=t.version;if("string"!=typeof e)return!0;var r=e.split("."),n=parseInt(r[0],10),o=parseInt(r[1],10);return 0===n&&13===o}function a(t){function e(){p||d||(p=!0,console.error("With React 0.14 and later versions, you no longer need to wrap <Provider> child into a function."))}function r(){!p&&d&&(p=!0,console.error("With React 0.13, you need to wrap <Provider> child into a function. This restriction will be removed with React 0.14."))}function n(){h||(h=!0,console.error("<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/rackt/react-redux/releases/tag/v2.0.0 for the migration instructions."))}var a=t.Component,s=t.PropTypes,f=t.Children,l=c.default(s),d=i(t),p=!1,h=!1,v=function(t){function i(e,r){o(this,i),t.call(this,e,r),this.store=e.store}return u(i,t),i.prototype.getChildContext=function(){return{store:this.store}},i.prototype.componentWillReceiveProps=function(t){var e=this.store,r=t.store;e!==r&&n()},i.prototype.render=function(){var t=this.props.children;return"function"==typeof t?(e(),t=t()):r(),f.only(t)},i}(a);return v.childContextTypes={store:l.isRequired},v.propTypes={store:l.isRequired,children:(d?s.func:s.element).isRequired},v}e.__esModule=!0,e.default=a;var s=r(7),c=n(s);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(12),u=n(o),i=r(26),a=n(i),s=a.default(u.default),c=s.Provider,f=s.connect;e.Provider=c,e.connect=f},function(t,e){"use strict";function r(t){if(!t||"object"!=typeof t)return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&n(r)===n(Object)}e.__esModule=!0,e.default=r;var n=function(t){return Function.prototype.toString.call(t)};t.exports=e.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,u=0;u<r.length;u++)if(!o.call(e,r[u])||t[r[u]]!==e[r[u]])return!1;return!0}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return function(e){return o.bindActionCreators(t,e)}}e.__esModule=!0,e.default=n;var o=r(33);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(8),u=n(o),i=r(36),a=n(i),s=r(35),c=n(s),f=r(34),l=n(f),d=r(9),p=n(d);e.createStore=u.default,e.combineReducers=a.default,e.bindActionCreators=c.default,e.applyMiddleware=l.default,e.compose=p.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return function(t){return function(r,n){var o=t(r,n),i=o.dispatch,s=[],c={getState:o.getState,dispatch:function(t){return i(t)}};return s=e.map(function(t){return t(c)}),i=a.default.apply(void 0,s)(o.dispatch),u({},o,{dispatch:i})}}}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=o;var i=r(9),a=n(i);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){return function(){return e(t.apply(void 0,arguments))}}function u(t,e){if("function"==typeof t)return o(t,e);if("object"!=typeof t||null===t||void 0===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');return a.default(t,function(t){return o(t,e)})}e.__esModule=!0,e.default=u;var i=r(11),a=n(i);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var r=e&&e.type,n=r&&'"'+r.toString()+'"'||"an action";return'Reducer "'+t+'" returned undefined handling '+n+". To ignore an action, you must explicitly return the previous state."}function u(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:a.ActionTypes.INIT});if("undefined"==typeof n)throw new Error('Reducer "'+e+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var o="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof r(void 0,{type:o}))throw new Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+a.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function i(t){var e,r=d.default(t,function(t){return"function"==typeof t});try{u(r)}catch(n){e=n}var i=f.default(r,function(){return void 0});return function(t,n){if(void 0===t&&(t=i),e)throw e;var u=f.default(r,function(e,r){var u=e(t[r],n);if("undefined"==typeof u){var i=o(r,n);throw new Error(i)}return u});return u}}e.__esModule=!0,e.default=i;var a=r(8),s=r(10),c=(n(s),r(11)),f=n(c),l=r(37),d=n(l);t.exports=e.default},function(t,e){"use strict";function r(t,e){return Object.keys(t).reduce(function(r,n){return e(t[n])&&(r[n]=t[n]),r},{})}e.__esModule=!0,e.default=r,t.exports=e.default}])});

@@ -43,2 +43,6 @@ 'use strict';

var _reactLazyCache = require('react-lazy-cache');
var _reactLazyCache2 = _interopRequireDefault(_reactLazyCache);
function isReadonly(prop) {

@@ -49,15 +53,2 @@ var writeProps = ['asyncValidate', 'handleBlur', 'handleChange', 'handleFocus', 'handleSubmit', 'onBlur', 'onChange', 'onFocus'];

function getSubForm(form, formName, formKey) {
if (form && form[formName]) {
if (formKey) {
if (form[formName][formKey]) {
return form[formName][formKey];
}
} else {
return form[formName];
}
}
return _reducer.initialState;
}
function silenceEvents(fn) {

@@ -120,3 +111,3 @@ return function (event) {

return function reduxForm(config) {
var _extends6 = _extends({
var _extends7 = _extends({
validate: function validate() {

@@ -132,10 +123,10 @@ return {};

var formName = _extends6.form;
var fields = _extends6.fields;
var syncValidate = _extends6.validate;
var readonly = _extends6.readonly;
var touchOnBlur = _extends6.touchOnBlur;
var touchOnChange = _extends6.touchOnChange;
var asyncValidate = _extends6.asyncValidate;
var asyncBlurFields = _extends6.asyncBlurFields;
var formName = _extends7.form;
var fields = _extends7.fields;
var syncValidate = _extends7.validate;
var readonly = _extends7.readonly;
var touchOnBlur = _extends7.touchOnBlur;
var touchOnChange = _extends7.touchOnChange;
var asyncValidate = _extends7.asyncValidate;
var asyncBlurFields = _extends7.asyncBlurFields;

@@ -165,13 +156,77 @@ if (!fields || !fields.length) {

ReduxForm.prototype.componentWillMount = function componentWillMount() {
var _this = this;
this.cache = _reactLazyCache2['default'](this, {
actions: function actions(formName, formKey) {
return (// eslint-disable-line no-shadow
formKey ? _bindActionData2['default'](formActions, { form: formName, key: formKey }) : _bindActionData2['default'](formActions, { form: formName })
);
},
handleBlur: function handleBlur(actions, dispatch) {
return function (name, value) {
return function (event) {
var fieldValue = getValue(value, event);
var doBlur = _bindActionData2['default'](actions.blur, { touch: touchOnBlur });
dispatch(doBlur(name, fieldValue));
if (asyncValidate && ~asyncBlurFields.indexOf(name)) {
var _extends3;
var values = _this.getValues();
var syncError = syncValidate(_extends({}, values, (_extends3 = {}, _extends3[name] = fieldValue, _extends3)))[name];
// only dispatch async call if all synchronous client-side validation passes for this field
if (!syncError) {
_this.runAsyncValidation(actions, values);
}
}
};
};
},
handleFocus: function handleFocus(actions, dispatch) {
return function (name) {
return function () {
dispatch(actions.focus(name));
};
};
},
handleChange: function handleChange(actions, dispatch) {
return function (name, value) {
return function (event) {
var doChange = _bindActionData2['default'](actions.change, { touch: touchOnChange });
dispatch(doChange(name, getValue(value, event)));
};
};
},
fieldActions: function fieldActions(handleBlur, handleChange, handleFocus) {
return fields.reduce(function (accumulator, name) {
var _extends4;
var fieldBlur = handleBlur(name);
var fieldChange = handleChange(name);
var fieldFocus = handleFocus(name);
return _extends({}, accumulator, (_extends4 = {}, _extends4[name] = filterProps({
handleBlur: fieldBlur,
handleChange: fieldChange,
handleFocus: fieldFocus,
name: name,
onBlur: fieldBlur,
onChange: fieldChange,
onDrop: function onDrop(event) {
fieldChange(event.dataTransfer.getData('value'));
},
onFocus: fieldFocus,
onUpdate: fieldChange // alias to support belle. https://github.com/nikgraf/belle/issues/58
}), _extends4));
}, {});
}
});
var _props = this.props;
var initialValues = _props.initialValues;
var dispatch = _props.dispatch;
var formName = _props.formName;
var formKey = _props.formKey;
// eslint-disable-line no-shadow
if (initialValues) {
var _ref = formKey ? _bindActionData2['default'](formActions, { form: formName, key: formKey }) : _bindActionData2['default'](formActions, { form: formName });
var initialize = this.cache.actions.initialize;
var initialize = _ref.initialize;
dispatch(initialize(initialValues));

@@ -181,87 +236,82 @@ }

ReduxForm.prototype.render = function render() {
var _this = this;
// Read props
ReduxForm.prototype.runAsyncValidation = function runAsyncValidation(actions, values) {
var _props2 = this.props;
var formName = _props2.formName;
var form = _props2.form;
var dispatch = _props2.dispatch;
var formKey = _props2.formKey;
var dispatch = _props2.dispatch;
// eslint-disable-line no-shadow
dispatch(actions.startAsyncValidation(formKey));
var promise = asyncValidate(values, dispatch);
if (!promise || typeof promise.then !== 'function') {
throw new Error('asyncValidate function passed to reduxForm must return a promise!');
}
return promise.then(function (asyncErrors) {
dispatch(actions.stopAsyncValidation(asyncErrors));
return isAsyncValid(asyncErrors);
}, function (err) {
dispatch(actions.stopAsyncValidation({}));
throw new Error('redux-form: Asynchronous validation failed: ' + err);
});
};
var passableProps = _objectWithoutProperties(_props2, ['formName', 'form', 'formKey', 'dispatch']);
ReduxForm.prototype.getSubForm = function getSubForm() {
var _props3 = this.props;
var formName = _props3.formName;
var form = _props3.form;
var formKey = _props3.formKey;
// eslint-disable-line no-shadow
if (!formName) {
throw new Error('No form name given to redux-form. Must be passed to ' + 'connectReduxForm({form: [form name]}) or as a "formName" prop');
if (form && form[formName]) {
if (formKey) {
if (form[formName][formKey]) {
return form[formName][formKey];
}
} else {
return form[formName];
}
}
var subForm = getSubForm(form, formName, formKey);
return _reducer.initialState;
};
// Calculate calculable state
var allValid = true;
var allPristine = true;
var values = fields.reduce(function (accumulator, field) {
var _extends3;
ReduxForm.prototype.getValues = function getValues() {
var subForm = this.getSubForm();
return fields.reduce(function (accumulator, field) {
var _extends5;
return _extends({}, accumulator, (_extends3 = {}, _extends3[field] = subForm[field] ? subForm[field].value : undefined, _extends3));
return _extends({}, accumulator, (_extends5 = {}, _extends5[field] = subForm[field] ? subForm[field].value : undefined, _extends5));
}, {});
};
// Create actions
ReduxForm.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
this.cache.componentWillReceiveProps(nextProps);
};
var _ref2 = formKey ? _bindActionData2['default'](formActions, { form: formName, key: formKey }) : _bindActionData2['default'](formActions, { form: formName });
ReduxForm.prototype.render = function render() {
var _this2 = this;
var blur = _ref2.blur;
var change = _ref2.change;
var focus = _ref2.focus;
var initialize = _ref2.initialize;
var reset = _ref2.reset;
var startAsyncValidation = _ref2.startAsyncValidation;
var startSubmit = _ref2.startSubmit;
var stopAsyncValidation = _ref2.stopAsyncValidation;
var stopSubmit = _ref2.stopSubmit;
var touch = _ref2.touch;
var untouch = _ref2.untouch;
// Read props
var _props4 = this.props;
var formName = _props4.formName;
var form = _props4.form;
var formKey = _props4.formKey;
var dispatch = _props4.dispatch;
function runAsyncValidation() {
dispatch(startAsyncValidation(formKey));
var promise = asyncValidate(values, dispatch);
if (!promise || typeof promise.then !== 'function') {
throw new Error('asyncValidate function passed to reduxForm must return a promise!');
}
return promise.then(function (asyncErrors) {
dispatch(stopAsyncValidation(asyncErrors));
return isAsyncValid(asyncErrors);
}, function (err) {
dispatch(stopAsyncValidation({}));
throw new Error('redux-form: Asynchronous validation failed: ' + err);
});
var passableProps = _objectWithoutProperties(_props4, ['formName', 'form', 'formKey', 'dispatch']);
// eslint-disable-line no-shadow
if (!formName) {
throw new Error('No form name given to redux-form. Must be passed to ' + 'connectReduxForm({form: [form name]}) or as a "formName" prop');
}
var _cache = this.cache;
var actions = _cache.actions;
var values = _cache.values;
var fieldActions = _cache.fieldActions;
var handleBlur = _cache.handleBlur;
var handleChange = _cache.handleChange;
var handleFocus = _cache.handleFocus;
var handleBlur = function handleBlur(name, value) {
return function (event) {
var fieldValue = getValue(value, event);
var doBlur = _bindActionData2['default'](blur, { touch: touchOnBlur });
dispatch(doBlur(name, fieldValue));
if (asyncValidate && ~asyncBlurFields.indexOf(name)) {
var _extends4;
var subForm = this.getSubForm();
var syncError = syncValidate(_extends({}, values, (_extends4 = {}, _extends4[name] = fieldValue, _extends4)))[name];
// only dispatch async call if all synchronous client-side validation passes for this field
if (!syncError) {
runAsyncValidation();
}
}
};
};
var handleFocus = function handleFocus(name) {
return function () {
dispatch(focus(name));
};
};
var handleChange = function handleChange(name, value) {
return function (event) {
var doChange = _bindActionData2['default'](change, { touch: touchOnChange });
dispatch(doChange(name, getValue(value, event)));
};
};
// Calculate calculable state
var allValid = true;
var allPristine = true;
var handleSubmit = function handleSubmit(submitOrEvent) {

@@ -278,8 +328,8 @@ var createEventHandler = function createEventHandler(submit) {

// you're showing real promise, kid!
dispatch(startSubmit());
dispatch(actions.startSubmit());
return result.then(function (submitResult) {
dispatch(stopSubmit());
dispatch(actions.stopSubmit());
return submitResult;
}, function (submitError) {
dispatch(stopSubmit(submitError));
dispatch(actions.stopSubmit(submitError));
return submitError;

@@ -289,6 +339,6 @@ });

};
dispatch(touch.apply(undefined, fields));
dispatch(actions.touch.apply(actions, fields));
if (allValid) {
if (asyncValidate) {
return runAsyncValidation().then(function (asyncValid) {
return _this2.runAsyncValidation(actions, values).then(function (asyncValid) {
if (allValid && asyncValid) {

@@ -306,3 +356,3 @@ return submitWithPromiseCheck(values);

}
var onSubmit = _this.props.onSubmit;
var onSubmit = _this2.props.onSubmit;

@@ -318,3 +368,3 @@ if (!onSubmit) {

var allFields = fields.reduce(function (accumulator, name) {
var _extends5;
var _extends6;

@@ -325,11 +375,2 @@ var field = subForm[name] || {};

var valid = _isValid2['default'](error);
var fieldBlur = handleBlur(name);
var fieldChange = handleChange(name);
var fieldDrag = function fieldDrag(event) {
event.dataTransfer.setData('value', field.value);
};
var fieldDrop = function fieldDrop(event) {
fieldChange(event.dataTransfer.getData('value'));
};
var fieldFocus = handleFocus(name);
if (!valid) {

@@ -341,18 +382,13 @@ allValid = false;

}
return _extends({}, accumulator, (_extends5 = {}, _extends5[name] = filterProps({
return _extends({}, accumulator, (_extends6 = {}, _extends6[name] = filterProps(_extends({
active: subForm._active === name,
checked: typeof field.value === 'boolean' ? field.value : undefined,
dirty: !pristine,
error: error,
handleBlur: fieldBlur,
handleChange: fieldChange,
handleFocus: fieldFocus,
error: error
}, fieldActions[name], {
invalid: !valid,
name: name,
onBlur: fieldBlur,
onChange: fieldChange,
onDrag: fieldDrag,
onDrop: fieldDrop,
onFocus: fieldFocus,
onUpdate: fieldChange, // alias to support belle. https://github.com/nikgraf/belle/issues/58
onDrag: function onDrag(event) {
return event.dataTransfer.setData('value', field.value);
},
pristine: pristine,

@@ -363,3 +399,3 @@ touched: field.touched,

visited: field.visited
}), _extends5));
})), _extends6));
}, {});

@@ -387,3 +423,5 @@ var formError = syncErrors._error || subForm._error;

// Actions:
asyncValidate: silenceEvents(runAsyncValidation),
asyncValidate: silenceEvents(function () {
return _this2.runAsyncValidation(actions, values);
}),
handleBlur: silenceEvents(handleBlur),

@@ -394,18 +432,18 @@ handleChange: silenceEvents(handleChange),

initializeForm: silenceEvents(function (initialValues) {
return dispatch(initialize(initialValues));
return dispatch(actions.initialize(initialValues));
}),
resetForm: silenceEvents(function () {
return dispatch(reset());
return dispatch(actions.reset());
}),
touch: silenceEvents(function () {
return dispatch(touch.apply(undefined, arguments));
return dispatch(actions.touch.apply(actions, arguments));
}),
touchAll: silenceEvents(function () {
return dispatch(touch.apply(undefined, fields));
return dispatch(actions.touch.apply(actions, fields));
}),
untouch: silenceEvents(function () {
return dispatch(untouch.apply(undefined, arguments));
return dispatch(actions.untouch.apply(actions, arguments));
}),
untouchAll: silenceEvents(function () {
return dispatch(untouch.apply(undefined, fields));
return dispatch(actions.untouch.apply(actions, fields));
}),

@@ -412,0 +450,0 @@

{
"name": "redux-form",
"version": "2.1.0",
"version": "2.2.0",
"description": "A higher order component decorator for forms using Redux and React",

@@ -52,2 +52,3 @@ "main": "./lib/index.js",

"dependencies": {
"react-lazy-cache": "^2.1.2",
"react-redux": "3.1.0",

@@ -54,0 +55,0 @@ "redux": "3.0.2"

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc