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

formik

Package Overview
Dependencies
Maintainers
1
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formik - npm Package Compare versions

Comparing version 2.0.1-alpha.1 to 2.0.1-alpha.2

20

dist/formik.cjs.development.js

@@ -13,3 +13,3 @@ 'use strict';

var toPath = _interopDefault(require('lodash/toPath'));
var warning = _interopDefault(require('tiny-warning'));
var invariant = _interopDefault(require('tiny-warning'));
var hoistNonReactStatics = _interopDefault(require('hoist-non-react-statics'));

@@ -317,3 +317,3 @@

activeElement instanceof HTMLButtonElement) {
warning(activeElement.attributes &&
invariant(activeElement.attributes &&
activeElement.attributes.getNamedItem('type'), 'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.');

@@ -612,3 +612,3 @@ }

var htmlContent = _a.htmlContent, documentationAnchorLink = _a.documentationAnchorLink, handlerName = _a.handlerName;
console.warn("Warning: Formik called `" + handlerName + "`, but you forgot to pass an `id` or `name` attribute to your input:\n " + htmlContent + "\n Formik cannot determine which value to update. For more info see https://github.com/jaredpalmer/formik#" + documentationAnchorLink + "\n ");
console.warn("invariant: Formik called `" + handlerName + "`, but you forgot to pass an `id` or `name` attribute to your input:\n " + htmlContent + "\n Formik cannot determine which value to update. For more info see https://github.com/jaredpalmer/formik#" + documentationAnchorLink + "\n ");
}

@@ -665,3 +665,3 @@ function yupToFormErrors(yupError) {

var formik = useFormikContext();
warning(formik, 'useField() / <Field /> must be used underneath a <Formik> component or withFormik() higher order component');
invariant(formik, 'useField() / <Field /> must be used underneath a <Formik> component or withFormik() higher order component');
return formik.getFieldProps(name, type);

@@ -672,8 +672,10 @@ }

var _c = useFormikContext(), _validate = _c.validate, _validationSchema = _c.validationSchema, formik = tslib_1.__rest(_c, ["validate", "validationSchema"]);
warning(!!render, "<Field render> has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, \n replace \n <Field name=\"" + name + "\" render={({field, form}) => ...} />\n with\n <Field name=\"" + name + "\">{({field, form, meta}) => ...}</Field>\n ");
warning(!!component, '<Field component> has been deprecated and will be removed in future versions of Formik. Use <Formik as> instead. Note that with the `as` prop, all props are passed directly through and not grouped in `field` object key.');
warning(!!is && !!children && isFunction(children), 'You should not use <Field as> and <Field children> as a function in the same <Field> component; <Field as> will be ignored.');
warning(!!component && children && isFunction(children), 'You should not use <Field as> and <Field children> as a function in the same <Field> component; <Field as> will be ignored.');
warning(!!render && !!children && !isEmptyChildren(children), 'You should not use <Field render> and <Field children> in the same <Field> component; <Field children> will be ignored');
React.useEffect(function () {
invariant(!render, "<Field render> has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, replace <Field name=\"" + name + "\" render={({field, form}) => ...} /> with <Field name=\"" + name + "\">{({field, form, meta}) => ...}</Field>");
invariant(!component, '<Field component> has been deprecated and will be removed in future versions of Formik. Use <Formik as> instead. Note that with the `as` prop, all props are passed directly through and not grouped in `field` object key.');
invariant(!(is && children && isFunction(children)), 'You should not use <Field as> and <Field children> as a function in the same <Field> component; <Field as> will be ignored.');
invariant(!(component && children && isFunction(children)), 'You should not use <Field component> and <Field children> as a function in the same <Field> component; <Field component> will be ignored.');
invariant(!(render && children && !isEmptyChildren(children)), 'You should not use <Field render> and <Field children> in the same <Field> component; <Field children> will be ignored');
}, []);
React.useEffect(function () {
formik.registerField(name, {

@@ -680,0 +682,0 @@ validate: validate,

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

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),t=require("react"),r=e(require("react-fast-compare")),i=e(require("deepmerge")),a=e(require("lodash/cloneDeep")),o=e(require("lodash/toPath")),u=e(require("tiny-warning")),s=e(require("hoist-non-react-statics"));function l(e,n,t,r){void 0===r&&(r=0);for(var i=o(n);e&&r<i.length;)e=e[i[r++]];return void 0===e?t:e}function c(e,t,r){for(var i={},u=i,s=0,c=o(t);s<c.length-1;s++){var d=c[s],p=l(e,c.slice(0,s+1));if(u[d])u=u[d];else if(p)u=u[d]=a(p);else{var f=c[s+1];u=u[d]=h(f)&&Number(f)>=0?[]:{}}}if((0===s?e:u)[c[s]]===r)return e;void 0===r?delete u[c[s]]:u[c[s]]=r;var v=n.__assign({},e,i);return 0===s&&void 0===r&&delete v[c[s]],v}function d(e,n,t,r){void 0===t&&(t=new WeakMap),void 0===r&&(r={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],u=e[o];f(u)?t.get(u)||(t.set(u,!0),r[o]=Array.isArray(u)?[]:{},d(u,n,t,r[o])):r[o]=n}return r}var p=function(e){return"function"==typeof e},f=function(e){return null!==e&&"object"==typeof e},h=function(e){return String(Math.floor(Number(e)))===e},v=function(e){return"[object String]"===Object.prototype.toString.call(e)},m=function(e){return 0===t.Children.count(e)},_=function(e){return f(e)&&p(e.then)};function y(e){var n=!1;return[new Promise(function(t,r){e.then(function(e){return n?r({isCanceled:!0}):t(e)},function(e){return r(n?{isCanceled:!0}:e)})}),function(){n=!0}]}var S=t.createContext({}),E=S.Provider,g=S.Consumer;function F(){return t.useContext(S)}function T(e,t){switch(t.type){case"SET_VALUES":return n.__assign({},e,{values:t.payload});case"SET_TOUCHED":return n.__assign({},e,{touched:t.payload});case"SET_ERRORS":return n.__assign({},e,{errors:t.payload});case"SET_STATUS":return n.__assign({},e,{status:t.payload});case"SET_ISSUBMITTING":return n.__assign({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return n.__assign({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return n.__assign({},e,{values:c(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return n.__assign({},e,{touched:c(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return n.__assign({},e,{errors:c(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":case"SET_FORMIK_STATE":return n.__assign({},e,t.payload);case"SUBMIT_ATTEMPT":return n.__assign({},e,{touched:d(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return n.__assign({},e,{isSubmitting:!1});default:return e}}function b(e){var a=e.validateOnChange,o=void 0===a||a,u=e.validateOnBlur,s=void 0===u||u,d=e.isInitialValid,f=void 0!==d&&d,h=e.enableReinitialize,m=void 0!==h&&h,S=n.__rest(e,["validateOnChange","validateOnBlur","isInitialValid","enableReinitialize"]),E=n.__assign({validateOnChange:o,validateOnBlur:s,isInitialValid:f},S),g=t.useRef(E.initialValues),F=t.useRef(!1),b=t.useRef({}),I=t.useReducer(T,{values:E.initialValues,errors:{},touched:{},isSubmitting:!1,isValidating:!1,submitCount:0}),x=I[0],A=I[1],k=t.useCallback(function(){var e=y(W(x.values)),n=e[1];return e[0].then(function(e){return e}).catch(function(e){return e}),n},[x.values]);t.useEffect(function(){if(o&&!x.isSubmitting&&F.current)return k()},[x.values]),t.useEffect(function(){if(s&&!x.isSubmitting&&F.current)return k()},[x.touched]),t.useEffect(function(){m&&F.current&&!r(g.current,E.initialValues)&&(g.current=E.initialValues,D(E.initialValues))},[E.initialValues]),t.useEffect(function(){return F.current=!0,function(){F.current=!1}},[]);var P={resetForm:D,submitForm:Q,validateForm:W,validateField:q,setErrors:M,setFieldError:N,setFieldTouched:B,setFieldValue:j,setStatus:z,setSubmitting:J,setTouched:L,setValues:w,setFormikState:K};function V(e){if(v(e))return function(t){return n(t,e)};function n(e,n){e.persist&&e.persist();var t=e.target,r=t.name,i=n||(r||t.id);A({type:"SET_FIELD_TOUCHED",payload:{field:i,value:!0}})}n(e)}function U(e){if(v(e))return function(t){return n(t,e)};function n(e,n){var t,r=n,i=e;if(!v(e)){e.persist&&e.persist();var a=e.target,o=a.type,u=a.name,s=a.value,l=a.checked;r=n||(u||a.id),i=/number|range/.test(o)?(t=parseFloat(s),isNaN(t)?"":t):/checkbox/.test(o)?l:s}r&&A({type:"SET_FIELD_VALUE",payload:{field:r,value:i}})}n(e)}function D(e){var n=e||(null!==g.current?g.current:E.initialValues);g.current=n,A({type:"RESET_FORM",payload:{isSubmitting:!1,errors:{},touched:{},status:void 0,values:n,isValidating:!1,submitCount:0}})}function L(e){A({type:"SET_TOUCHED",payload:e})}function M(e){A({type:"SET_ERRORS",payload:e})}function w(e){A({type:"SET_VALUES",payload:e})}function N(e,n){A({type:"SET_FIELD_ERROR",payload:{field:e,value:n}})}function j(e,n){A({type:"SET_FIELD_VALUE",payload:{field:e,value:n}})}function B(e,n){void 0===n&&(n=!0),A({type:"SET_FIELD_TOUCHED",payload:{field:e,value:n}})}function q(e){if(null!==b.current&&b.current[e]&&b.current[e].validate&&p(b.current[e].validate)){var n=l(x.values,e),t=b.current[e].validate(n);return _(t)?(A({type:"SET_ISVALIDATING",payload:!0}),t.then(function(e){return e},function(e){return e}).then(function(n){A({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),A({type:"SET_ISVALIDATING",payload:!1})})):(A({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),Promise.resolve(t))}return Promise.resolve()}function G(e,n){return new Promise(function(t){var r=E.validate(e,n);void 0===r?t({}):_(r)?r.then(function(){t({})},function(e){t(e)}):t(r)})}function Y(e,n){return new Promise(function(t){var r=E.validationSchema,i=p(r)?r(n):r;(n&&i.validateAt?i.validateAt(n,e):O(e,i)).then(function(){t({})},function(e){t(R(e))})})}function H(e){if(null===b.current)return Promise.resolve({});var n=Object.keys(b.current).filter(function(e){return null!==b.current&&b.current[e]&&b.current[e].validate&&p(b.current[e].validate)}),t=n.length>0?n.map(function(n){return t=n,r=l(e,n),new Promise(function(e){return e(b.current[t].validate(r))}).then(function(e){return e},function(e){return e});var t,r}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(t).then(function(e){return e.reduce(function(e,t,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===t?e:(t&&(e=c(e,n[r],t)),e)},{})})}function W(e){return void 0===e&&(e=x.values),E.validationSchema||E.validate||b.current&&Object.keys(b.current).filter(function(e){return!!b.current[e].validate}).length>0?(A({type:"SET_ISVALIDATING",payload:!0}),Promise.all([H(e),E.validationSchema?Y(e):{},E.validate?G(e):{}]).then(function(e){var n=i.all([e[0],e[1],e[2]],{arrayMerge:C});return r(x.errors,n)||A({type:"SET_ERRORS",payload:n}),A({type:"SET_ISVALIDATING",payload:!1}),n})):Promise.resolve({})}function K(e){p(e)?A({type:"SET_FORMIK_STATE",payload:e(x)}):A({type:"SET_FORMIK_STATE",payload:e})}function z(e){A({type:"SET_STATUS",payload:e})}function J(e){A({type:"SET_ISSUBMITTING",payload:e})}function Q(){return A({type:"SUBMIT_ATTEMPT"}),W().then(function(e){0===Object.keys(e).length?Promise.resolve(E.onSubmit(x.values,P)).then(function(){F.current&&A({type:"SUBMIT_SUCCESS"})}).catch(function(e){F.current&&A({type:"SUBMIT_FAILURE"})}):F.current&&A({type:"SUBMIT_FAILURE"})})}function X(e){return{value:l(x.values,e),error:l(x.errors,e),touched:!!l(x.touched,e),initialValue:l(g.current,e)}}var Z=t.useMemo(function(){return!r(g.current,x.values)},[g.current,x.values]),$=t.useMemo(function(){return Z?x.errors&&0===Object.keys(x.errors).length:!1!==f&&p(f)?f(E):f},[x.errors,Z,f]);return n.__assign({},x,{initialValues:g.current||E.initialValues,handleBlur:V,handleChange:U,handleReset:function(){if(E.onReset){var e=E.onReset(x.values,P);_(e)?e.then(D):D()}else D()},handleSubmit:function(e){e&&e.preventDefault&&e.preventDefault(),Q()},resetForm:D,setErrors:M,setFormikState:K,setFieldTouched:B,setFieldValue:j,setFieldError:N,setStatus:z,setSubmitting:J,setTouched:L,setValues:w,submitForm:Q,validateForm:W,validateField:q,isValid:$,dirty:Z,unregisterField:function(e){null!==b.current&&delete b.current[e]},registerField:function(e,n){null!==b.current&&(b.current[e]={validate:n.validate})},getFieldProps:function(e,n){return[{name:e,value:!n||"radio"!==n&&"checkbox"!==n?l(x.values,e):void 0,onChange:U,onBlur:V},X(e)]},validateOnBlur:s,validateOnChange:o})}function I(e){var n=b(e),r=e.component,i=e.children,a=e.render;return t.createElement(E,{value:n},r?t.createElement(r,n):a?a(n):i?p(i)?i(n):m(i)?null:t.Children.only(i):null)}function R(e){var n={};if(0===e.inner.length)return c(n,e.path,e.message);for(var t=0,r=e.inner;t<r.length;t++){var i=r[t];n[i.path]||(n=c(n,i.path,i.message))}return n}function O(e,n,t,r){void 0===t&&(t=!1),void 0===r&&(r={});var i={};for(var a in e)if(e.hasOwnProperty(a)){var o=String(a);i[o]=""!==e[o]?e[o]:void 0}return n[t?"validateSync":"validate"](i,{abortEarly:!1,context:r})}function C(e,n,t){var r=e.slice();return n.forEach(function(n,a){if(void 0===r[a]){var o=!1!==t.clone&&t.isMergeableObject(n);r[a]=o?i(Array.isArray(n)?[]:{},n,t):n}else t.isMergeableObject(n)?r[a]=i(e[a],n,t):-1===e.indexOf(n)&&r.push(n)}),r}function x(e){var r=e.validate,i=e.name,a=e.render,o=e.children,s=e.as,l=void 0===s?"input":s,c=e.component,d=n.__rest(e,["validate","name","render","children","as","component"]),f=F(),h=n.__rest(f,["validate","validationSchema"]);u(!!a,'<Field render> has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, \n replace \n <Field name="'+i+'" render={({field, form}) => ...} />\n with\n <Field name="'+i+'">{({field, form, meta}) => ...}</Field>\n '),u(!!c,"<Field component> has been deprecated and will be removed in future versions of Formik. Use <Formik as> instead. Note that with the `as` prop, all props are passed directly through and not grouped in `field` object key."),u(!!l&&!!o&&p(o),"You should not use <Field as> and <Field children> as a function in the same <Field> component; <Field as> will be ignored."),u(!!c&&o&&p(o),"You should not use <Field as> and <Field children> as a function in the same <Field> component; <Field as> will be ignored."),u(!!a&&!!o&&!m(o),"You should not use <Field render> and <Field children> in the same <Field> component; <Field children> will be ignored"),t.useEffect(function(){return h.registerField(i,{validate:r}),function(){h.unregisterField(i)}},[i,r]);var v=h.getFieldProps(i,d.type),_=v[0],y=v[1],S={field:_,form:h};if(a)return a(S);if(p(o))return o(n.__assign({},S,{meta:y}));if(c){if("string"==typeof c){var E=d.innerRef,g=n.__rest(d,["innerRef"]);return t.createElement(c,n.__assign({ref:E},_,g),o)}return t.createElement(c,n.__assign({field:_,form:h},d),o)}if("string"==typeof l){E=d.innerRef,g=n.__rest(d,["innerRef"]);return t.createElement(l,n.__assign({ref:E},_,g),o)}return t.createElement(l,n.__assign({},_,d),o)}var A=x;function k(e){var r=F();return t.createElement("form",n.__assign({onSubmit:r.handleSubmit,onReset:r.handleReset},e))}function P(e){var r=function(r){return t.createElement(g,null,function(i){return t.createElement(e,n.__assign({},r,{formik:i}))})},i=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return r.WrappedComponent=e,r.displayName="FormikConnect("+i+")",s(r,e)}k.displayName="Form";var V=function(e,n,t){var r=(e||[]).slice(),i=r[n];return r.splice(n,1),r.splice(t,0,i),r},U=function(e,n,t){var r=(e||[]).slice(),i=r[n];return r[n]=r[t],r[t]=i,r},D=function(e,n,t){var r=(e||[]).slice();return r.splice(n,0,t),r},L=function(e,n,t){var r=(e||[]).slice();return r[n]=t,r},M=P(function(e){function r(t){var r=e.call(this,t)||this;return r.updateArrayField=function(e,t,i){var a=r.props,o=a.name,u=a.validateOnChange,s=a.formik,d=s.validateForm;(0,s.setFormikState)(function(r){var a="function"==typeof i?i:e,u="function"==typeof t?t:e;return n.__assign({},r,{values:c(r.values,o,e(l(r.values,o))),errors:i?c(r.errors,o,a(l(r.errors,o))):r.errors,touched:t?c(r.touched,o,u(l(r.touched,o))):r.touched})},function(){u&&d()})},r.push=function(e){return r.updateArrayField(function(n){return(n||[]).concat([a(e)])},!1,!1)},r.handlePush=function(e){return function(){return r.push(e)}},r.swap=function(e,n){return r.updateArrayField(function(t){return U(t,e,n)},!0,!0)},r.handleSwap=function(e,n){return function(){return r.swap(e,n)}},r.move=function(e,n){return r.updateArrayField(function(t){return V(t,e,n)},!0,!0)},r.handleMove=function(e,n){return function(){return r.move(e,n)}},r.insert=function(e,n){return r.updateArrayField(function(t){return D(t,e,n)},function(n){return D(n,e,null)},function(n){return D(n,e,null)})},r.handleInsert=function(e,n){return function(){return r.insert(e,n)}},r.replace=function(e,n){return r.updateArrayField(function(t){return L(t,e,n)},!1,!1)},r.handleReplace=function(e,n){return function(){return r.replace(e,n)}},r.unshift=function(e){var n=-1;return r.updateArrayField(function(t){var r=t?[e].concat(t):[e];return n<0&&(n=r.length),r},function(e){var t=e?[null].concat(e):[null];return n<0&&(n=t.length),t},function(e){var t=e?[null].concat(e):[null];return n<0&&(n=t.length),t}),n},r.handleUnshift=function(e){return function(){return r.unshift(e)}},r.handleRemove=function(e){return function(){return r.remove(e)}},r.handlePop=function(){return function(){return r.pop()}},r.remove=r.remove.bind(r),r.pop=r.pop.bind(r),r}return n.__extends(r,e),r.prototype.remove=function(e){var n;return this.updateArrayField(function(t){var r=t?t.slice():[];return n||(n=r[e]),p(r.splice)&&r.splice(e,1),r},!0,!0),n},r.prototype.pop=function(){var e;return this.updateArrayField(function(n){var t=n;return e||(e=t&&t.pop&&t.pop()),t},!0,!0),e},r.prototype.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},r=this.props,i=r.component,a=r.render,o=r.children,u=r.name,s=r.formik,l=n.__rest(s,["validate","validationSchema"]),c=n.__assign({},e,{form:l,name:u});return i?t.createElement(i,c):a?a(c):o?"function"==typeof o?o(c):m(o)?null:t.Children.only(o):null},r.defaultProps={validateOnChange:!0},r}(t.Component)),w=P(function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(r,e),r.prototype.shouldComponentUpdate=function(e){return l(this.props.formik.errors,this.props.name)!==l(e.formik.errors,this.props.name)||l(this.props.formik.touched,this.props.name)!==l(e.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length},r.prototype.render=function(){var e=this.props,r=e.component,i=e.formik,a=e.render,o=e.children,u=e.name,s=n.__rest(e,["component","formik","render","children","name"]),c=l(i.touched,u),d=l(i.errors,u);return c&&d?a?p(a)?a(d):null:o?p(o)?o(d):null:r?t.createElement(r,s,d):d:null},r}(t.Component));exports.useFormik=b,exports.Formik=I,exports.yupToFormErrors=R,exports.validateYupSchema=O,exports.useField=function(e,n){var t=F();return u(t,"useField() / <Field /> must be used underneath a <Formik> component or withFormik() higher order component"),t.getFieldProps(e,n)},exports.Field=x,exports.FastField=A,exports.Form=k,exports.withFormik=function(e){var r=e.mapPropsToValues,i=void 0===r?function(e){var n={};for(var t in e)e.hasOwnProperty(t)&&"function"!=typeof e[t]&&(n[t]=e[t]);return n}:r,a=n.__rest(e,["mapPropsToValues"]);return function(e){var r=e.displayName||e.name||e.constructor&&e.constructor.name||"Component",o=function(o){function u(){var r=null!==o&&o.apply(this,arguments)||this;return r.validate=function(e){return a.validate(e,r.props)},r.validationSchema=function(){return p(a.validationSchema)?a.validationSchema(r.props):a.validationSchema},r.handleSubmit=function(e,t){return a.handleSubmit(e,n.__assign({},t,{props:r.props}))},r.renderFormComponent=function(i){return t.createElement(e,n.__assign({},r.props,i))},r}return n.__extends(u,o),u.prototype.render=function(){var e=this.props,r=n.__rest(e,["children"]);return t.createElement(I,n.__assign({},r,a,{validate:a.validate&&this.validate,validationSchema:a.validationSchema&&this.validationSchema,initialValues:i(this.props),initialStatus:a.mapPropsToStatus&&a.mapPropsToStatus(this.props),onSubmit:this.handleSubmit,render:this.renderFormComponent}))},u.displayName="WithFormik("+r+")",u}(t.Component);return s(o,e)}},exports.move=V,exports.swap=U,exports.insert=D,exports.replace=L,exports.FieldArray=M,exports.getIn=l,exports.setIn=c,exports.setNestedObjectValues=d,exports.isFunction=p,exports.isObject=f,exports.isInteger=h,exports.isString=v,exports.isNaN=function(e){return e!=e},exports.isEmptyChildren=m,exports.isPromise=_,exports.getActiveElement=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(n){return e.body}},exports.makeCancelable=y,exports.connect=P,exports.ErrorMessage=w,exports.FormikProvider=E,exports.FormikConsumer=g,exports.useFormikContext=F;
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),t=require("react"),r=e(require("react-fast-compare")),i=e(require("deepmerge")),a=e(require("lodash/cloneDeep")),o=e(require("lodash/toPath")),u=e(require("tiny-warning")),s=e(require("hoist-non-react-statics"));function l(e,n,t,r){void 0===r&&(r=0);for(var i=o(n);e&&r<i.length;)e=e[i[r++]];return void 0===e?t:e}function c(e,t,r){for(var i={},u=i,s=0,c=o(t);s<c.length-1;s++){var d=c[s],p=l(e,c.slice(0,s+1));if(u[d])u=u[d];else if(p)u=u[d]=a(p);else{var f=c[s+1];u=u[d]=h(f)&&Number(f)>=0?[]:{}}}if((0===s?e:u)[c[s]]===r)return e;void 0===r?delete u[c[s]]:u[c[s]]=r;var v=n.__assign({},e,i);return 0===s&&void 0===r&&delete v[c[s]],v}function d(e,n,t,r){void 0===t&&(t=new WeakMap),void 0===r&&(r={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],u=e[o];f(u)?t.get(u)||(t.set(u,!0),r[o]=Array.isArray(u)?[]:{},d(u,n,t,r[o])):r[o]=n}return r}var p=function(e){return"function"==typeof e},f=function(e){return null!==e&&"object"==typeof e},h=function(e){return String(Math.floor(Number(e)))===e},v=function(e){return"[object String]"===Object.prototype.toString.call(e)},m=function(e){return 0===t.Children.count(e)},_=function(e){return f(e)&&p(e.then)};function y(e){var n=!1;return[new Promise(function(t,r){e.then(function(e){return n?r({isCanceled:!0}):t(e)},function(e){return r(n?{isCanceled:!0}:e)})}),function(){n=!0}]}var S=t.createContext({}),E=S.Provider,g=S.Consumer;function F(){return t.useContext(S)}function T(e,t){switch(t.type){case"SET_VALUES":return n.__assign({},e,{values:t.payload});case"SET_TOUCHED":return n.__assign({},e,{touched:t.payload});case"SET_ERRORS":return n.__assign({},e,{errors:t.payload});case"SET_STATUS":return n.__assign({},e,{status:t.payload});case"SET_ISSUBMITTING":return n.__assign({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return n.__assign({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return n.__assign({},e,{values:c(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return n.__assign({},e,{touched:c(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return n.__assign({},e,{errors:c(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":case"SET_FORMIK_STATE":return n.__assign({},e,t.payload);case"SUBMIT_ATTEMPT":return n.__assign({},e,{touched:d(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return n.__assign({},e,{isSubmitting:!1});default:return e}}function b(e){var a=e.validateOnChange,o=void 0===a||a,u=e.validateOnBlur,s=void 0===u||u,d=e.isInitialValid,f=void 0!==d&&d,h=e.enableReinitialize,m=void 0!==h&&h,S=n.__rest(e,["validateOnChange","validateOnBlur","isInitialValid","enableReinitialize"]),E=n.__assign({validateOnChange:o,validateOnBlur:s,isInitialValid:f},S),g=t.useRef(E.initialValues),F=t.useRef(!1),b=t.useRef({}),I=t.useReducer(T,{values:E.initialValues,errors:{},touched:{},isSubmitting:!1,isValidating:!1,submitCount:0}),x=I[0],A=I[1],k=t.useCallback(function(){var e=y(W(x.values)),n=e[1];return e[0].then(function(e){return e}).catch(function(e){return e}),n},[x.values]);t.useEffect(function(){if(o&&!x.isSubmitting&&F.current)return k()},[x.values]),t.useEffect(function(){if(s&&!x.isSubmitting&&F.current)return k()},[x.touched]),t.useEffect(function(){m&&F.current&&!r(g.current,E.initialValues)&&(g.current=E.initialValues,D(E.initialValues))},[E.initialValues]),t.useEffect(function(){return F.current=!0,function(){F.current=!1}},[]);var P={resetForm:D,submitForm:Q,validateForm:W,validateField:q,setErrors:M,setFieldError:N,setFieldTouched:B,setFieldValue:j,setStatus:z,setSubmitting:J,setTouched:L,setValues:w,setFormikState:K};function V(e){if(v(e))return function(t){return n(t,e)};function n(e,n){e.persist&&e.persist();var t=e.target,r=t.name,i=n||(r||t.id);A({type:"SET_FIELD_TOUCHED",payload:{field:i,value:!0}})}n(e)}function U(e){if(v(e))return function(t){return n(t,e)};function n(e,n){var t,r=n,i=e;if(!v(e)){e.persist&&e.persist();var a=e.target,o=a.type,u=a.name,s=a.value,l=a.checked;r=n||(u||a.id),i=/number|range/.test(o)?(t=parseFloat(s),isNaN(t)?"":t):/checkbox/.test(o)?l:s}r&&A({type:"SET_FIELD_VALUE",payload:{field:r,value:i}})}n(e)}function D(e){var n=e||(null!==g.current?g.current:E.initialValues);g.current=n,A({type:"RESET_FORM",payload:{isSubmitting:!1,errors:{},touched:{},status:void 0,values:n,isValidating:!1,submitCount:0}})}function L(e){A({type:"SET_TOUCHED",payload:e})}function M(e){A({type:"SET_ERRORS",payload:e})}function w(e){A({type:"SET_VALUES",payload:e})}function N(e,n){A({type:"SET_FIELD_ERROR",payload:{field:e,value:n}})}function j(e,n){A({type:"SET_FIELD_VALUE",payload:{field:e,value:n}})}function B(e,n){void 0===n&&(n=!0),A({type:"SET_FIELD_TOUCHED",payload:{field:e,value:n}})}function q(e){if(null!==b.current&&b.current[e]&&b.current[e].validate&&p(b.current[e].validate)){var n=l(x.values,e),t=b.current[e].validate(n);return _(t)?(A({type:"SET_ISVALIDATING",payload:!0}),t.then(function(e){return e},function(e){return e}).then(function(n){A({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),A({type:"SET_ISVALIDATING",payload:!1})})):(A({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),Promise.resolve(t))}return Promise.resolve()}function G(e,n){return new Promise(function(t){var r=E.validate(e,n);void 0===r?t({}):_(r)?r.then(function(){t({})},function(e){t(e)}):t(r)})}function Y(e,n){return new Promise(function(t){var r=E.validationSchema,i=p(r)?r(n):r;(n&&i.validateAt?i.validateAt(n,e):O(e,i)).then(function(){t({})},function(e){t(R(e))})})}function H(e){if(null===b.current)return Promise.resolve({});var n=Object.keys(b.current).filter(function(e){return null!==b.current&&b.current[e]&&b.current[e].validate&&p(b.current[e].validate)}),t=n.length>0?n.map(function(n){return t=n,r=l(e,n),new Promise(function(e){return e(b.current[t].validate(r))}).then(function(e){return e},function(e){return e});var t,r}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(t).then(function(e){return e.reduce(function(e,t,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===t?e:(t&&(e=c(e,n[r],t)),e)},{})})}function W(e){return void 0===e&&(e=x.values),E.validationSchema||E.validate||b.current&&Object.keys(b.current).filter(function(e){return!!b.current[e].validate}).length>0?(A({type:"SET_ISVALIDATING",payload:!0}),Promise.all([H(e),E.validationSchema?Y(e):{},E.validate?G(e):{}]).then(function(e){var n=i.all([e[0],e[1],e[2]],{arrayMerge:C});return r(x.errors,n)||A({type:"SET_ERRORS",payload:n}),A({type:"SET_ISVALIDATING",payload:!1}),n})):Promise.resolve({})}function K(e){p(e)?A({type:"SET_FORMIK_STATE",payload:e(x)}):A({type:"SET_FORMIK_STATE",payload:e})}function z(e){A({type:"SET_STATUS",payload:e})}function J(e){A({type:"SET_ISSUBMITTING",payload:e})}function Q(){return A({type:"SUBMIT_ATTEMPT"}),W().then(function(e){0===Object.keys(e).length?Promise.resolve(E.onSubmit(x.values,P)).then(function(){F.current&&A({type:"SUBMIT_SUCCESS"})}).catch(function(e){F.current&&A({type:"SUBMIT_FAILURE"})}):F.current&&A({type:"SUBMIT_FAILURE"})})}function X(e){return{value:l(x.values,e),error:l(x.errors,e),touched:!!l(x.touched,e),initialValue:l(g.current,e)}}var Z=t.useMemo(function(){return!r(g.current,x.values)},[g.current,x.values]),$=t.useMemo(function(){return Z?x.errors&&0===Object.keys(x.errors).length:!1!==f&&p(f)?f(E):f},[x.errors,Z,f]);return n.__assign({},x,{initialValues:g.current||E.initialValues,handleBlur:V,handleChange:U,handleReset:function(){if(E.onReset){var e=E.onReset(x.values,P);_(e)?e.then(D):D()}else D()},handleSubmit:function(e){e&&e.preventDefault&&e.preventDefault(),Q()},resetForm:D,setErrors:M,setFormikState:K,setFieldTouched:B,setFieldValue:j,setFieldError:N,setStatus:z,setSubmitting:J,setTouched:L,setValues:w,submitForm:Q,validateForm:W,validateField:q,isValid:$,dirty:Z,unregisterField:function(e){null!==b.current&&delete b.current[e]},registerField:function(e,n){null!==b.current&&(b.current[e]={validate:n.validate})},getFieldProps:function(e,n){return[{name:e,value:!n||"radio"!==n&&"checkbox"!==n?l(x.values,e):void 0,onChange:U,onBlur:V},X(e)]},validateOnBlur:s,validateOnChange:o})}function I(e){var n=b(e),r=e.component,i=e.children,a=e.render;return t.createElement(E,{value:n},r?t.createElement(r,n):a?a(n):i?p(i)?i(n):m(i)?null:t.Children.only(i):null)}function R(e){var n={};if(0===e.inner.length)return c(n,e.path,e.message);for(var t=0,r=e.inner;t<r.length;t++){var i=r[t];n[i.path]||(n=c(n,i.path,i.message))}return n}function O(e,n,t,r){void 0===t&&(t=!1),void 0===r&&(r={});var i={};for(var a in e)if(e.hasOwnProperty(a)){var o=String(a);i[o]=""!==e[o]?e[o]:void 0}return n[t?"validateSync":"validate"](i,{abortEarly:!1,context:r})}function C(e,n,t){var r=e.slice();return n.forEach(function(n,a){if(void 0===r[a]){var o=!1!==t.clone&&t.isMergeableObject(n);r[a]=o?i(Array.isArray(n)?[]:{},n,t):n}else t.isMergeableObject(n)?r[a]=i(e[a],n,t):-1===e.indexOf(n)&&r.push(n)}),r}function x(e){var r=e.validate,i=e.name,a=e.render,o=e.children,s=e.as,l=void 0===s?"input":s,c=e.component,d=n.__rest(e,["validate","name","render","children","as","component"]),f=F(),h=n.__rest(f,["validate","validationSchema"]);t.useEffect(function(){u(!a,'<Field render> has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, replace <Field name="'+i+'" render={({field, form}) => ...} /> with <Field name="'+i+'">{({field, form, meta}) => ...}</Field>'),u(!c,"<Field component> has been deprecated and will be removed in future versions of Formik. Use <Formik as> instead. Note that with the `as` prop, all props are passed directly through and not grouped in `field` object key."),u(!(l&&o&&p(o)),"You should not use <Field as> and <Field children> as a function in the same <Field> component; <Field as> will be ignored."),u(!(c&&o&&p(o)),"You should not use <Field component> and <Field children> as a function in the same <Field> component; <Field component> will be ignored."),u(!(a&&o&&!m(o)),"You should not use <Field render> and <Field children> in the same <Field> component; <Field children> will be ignored")},[]),t.useEffect(function(){return h.registerField(i,{validate:r}),function(){h.unregisterField(i)}},[i,r]);var v=h.getFieldProps(i,d.type),_=v[0],y=v[1],S={field:_,form:h};if(a)return a(S);if(p(o))return o(n.__assign({},S,{meta:y}));if(c){if("string"==typeof c){var E=d.innerRef,g=n.__rest(d,["innerRef"]);return t.createElement(c,n.__assign({ref:E},_,g),o)}return t.createElement(c,n.__assign({field:_,form:h},d),o)}if("string"==typeof l){E=d.innerRef,g=n.__rest(d,["innerRef"]);return t.createElement(l,n.__assign({ref:E},_,g),o)}return t.createElement(l,n.__assign({},_,d),o)}var A=x;function k(e){var r=F();return t.createElement("form",n.__assign({onSubmit:r.handleSubmit,onReset:r.handleReset},e))}function P(e){var r=function(r){return t.createElement(g,null,function(i){return t.createElement(e,n.__assign({},r,{formik:i}))})},i=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return r.WrappedComponent=e,r.displayName="FormikConnect("+i+")",s(r,e)}k.displayName="Form";var V=function(e,n,t){var r=(e||[]).slice(),i=r[n];return r.splice(n,1),r.splice(t,0,i),r},U=function(e,n,t){var r=(e||[]).slice(),i=r[n];return r[n]=r[t],r[t]=i,r},D=function(e,n,t){var r=(e||[]).slice();return r.splice(n,0,t),r},L=function(e,n,t){var r=(e||[]).slice();return r[n]=t,r},M=P(function(e){function r(t){var r=e.call(this,t)||this;return r.updateArrayField=function(e,t,i){var a=r.props,o=a.name,u=a.validateOnChange,s=a.formik,d=s.validateForm;(0,s.setFormikState)(function(r){var a="function"==typeof i?i:e,u="function"==typeof t?t:e;return n.__assign({},r,{values:c(r.values,o,e(l(r.values,o))),errors:i?c(r.errors,o,a(l(r.errors,o))):r.errors,touched:t?c(r.touched,o,u(l(r.touched,o))):r.touched})},function(){u&&d()})},r.push=function(e){return r.updateArrayField(function(n){return(n||[]).concat([a(e)])},!1,!1)},r.handlePush=function(e){return function(){return r.push(e)}},r.swap=function(e,n){return r.updateArrayField(function(t){return U(t,e,n)},!0,!0)},r.handleSwap=function(e,n){return function(){return r.swap(e,n)}},r.move=function(e,n){return r.updateArrayField(function(t){return V(t,e,n)},!0,!0)},r.handleMove=function(e,n){return function(){return r.move(e,n)}},r.insert=function(e,n){return r.updateArrayField(function(t){return D(t,e,n)},function(n){return D(n,e,null)},function(n){return D(n,e,null)})},r.handleInsert=function(e,n){return function(){return r.insert(e,n)}},r.replace=function(e,n){return r.updateArrayField(function(t){return L(t,e,n)},!1,!1)},r.handleReplace=function(e,n){return function(){return r.replace(e,n)}},r.unshift=function(e){var n=-1;return r.updateArrayField(function(t){var r=t?[e].concat(t):[e];return n<0&&(n=r.length),r},function(e){var t=e?[null].concat(e):[null];return n<0&&(n=t.length),t},function(e){var t=e?[null].concat(e):[null];return n<0&&(n=t.length),t}),n},r.handleUnshift=function(e){return function(){return r.unshift(e)}},r.handleRemove=function(e){return function(){return r.remove(e)}},r.handlePop=function(){return function(){return r.pop()}},r.remove=r.remove.bind(r),r.pop=r.pop.bind(r),r}return n.__extends(r,e),r.prototype.remove=function(e){var n;return this.updateArrayField(function(t){var r=t?t.slice():[];return n||(n=r[e]),p(r.splice)&&r.splice(e,1),r},!0,!0),n},r.prototype.pop=function(){var e;return this.updateArrayField(function(n){var t=n;return e||(e=t&&t.pop&&t.pop()),t},!0,!0),e},r.prototype.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},r=this.props,i=r.component,a=r.render,o=r.children,u=r.name,s=r.formik,l=n.__rest(s,["validate","validationSchema"]),c=n.__assign({},e,{form:l,name:u});return i?t.createElement(i,c):a?a(c):o?"function"==typeof o?o(c):m(o)?null:t.Children.only(o):null},r.defaultProps={validateOnChange:!0},r}(t.Component)),w=P(function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(r,e),r.prototype.shouldComponentUpdate=function(e){return l(this.props.formik.errors,this.props.name)!==l(e.formik.errors,this.props.name)||l(this.props.formik.touched,this.props.name)!==l(e.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length},r.prototype.render=function(){var e=this.props,r=e.component,i=e.formik,a=e.render,o=e.children,u=e.name,s=n.__rest(e,["component","formik","render","children","name"]),c=l(i.touched,u),d=l(i.errors,u);return c&&d?a?p(a)?a(d):null:o?p(o)?o(d):null:r?t.createElement(r,s,d):d:null},r}(t.Component));exports.useFormik=b,exports.Formik=I,exports.yupToFormErrors=R,exports.validateYupSchema=O,exports.useField=function(e,n){var t=F();return u(t,"useField() / <Field /> must be used underneath a <Formik> component or withFormik() higher order component"),t.getFieldProps(e,n)},exports.Field=x,exports.FastField=A,exports.Form=k,exports.withFormik=function(e){var r=e.mapPropsToValues,i=void 0===r?function(e){var n={};for(var t in e)e.hasOwnProperty(t)&&"function"!=typeof e[t]&&(n[t]=e[t]);return n}:r,a=n.__rest(e,["mapPropsToValues"]);return function(e){var r=e.displayName||e.name||e.constructor&&e.constructor.name||"Component",o=function(o){function u(){var r=null!==o&&o.apply(this,arguments)||this;return r.validate=function(e){return a.validate(e,r.props)},r.validationSchema=function(){return p(a.validationSchema)?a.validationSchema(r.props):a.validationSchema},r.handleSubmit=function(e,t){return a.handleSubmit(e,n.__assign({},t,{props:r.props}))},r.renderFormComponent=function(i){return t.createElement(e,n.__assign({},r.props,i))},r}return n.__extends(u,o),u.prototype.render=function(){var e=this.props,r=n.__rest(e,["children"]);return t.createElement(I,n.__assign({},r,a,{validate:a.validate&&this.validate,validationSchema:a.validationSchema&&this.validationSchema,initialValues:i(this.props),initialStatus:a.mapPropsToStatus&&a.mapPropsToStatus(this.props),onSubmit:this.handleSubmit,render:this.renderFormComponent}))},u.displayName="WithFormik("+r+")",u}(t.Component);return s(o,e)}},exports.move=V,exports.swap=U,exports.insert=D,exports.replace=L,exports.FieldArray=M,exports.getIn=l,exports.setIn=c,exports.setNestedObjectValues=d,exports.isFunction=p,exports.isObject=f,exports.isInteger=h,exports.isString=v,exports.isNaN=function(e){return e!=e},exports.isEmptyChildren=m,exports.isPromise=_,exports.getActiveElement=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(n){return e.body}},exports.makeCancelable=y,exports.connect=P,exports.ErrorMessage=w,exports.FormikProvider=E,exports.FormikConsumer=g,exports.useFormikContext=F;
//# sourceMappingURL=formik.cjs.production.js.map

@@ -7,3 +7,3 @@ import { __assign, __rest, __extends } from 'tslib';

import toPath from 'lodash-es/toPath';
import warning from 'tiny-warning';
import invariant from 'tiny-warning';
import hoistNonReactStatics from 'hoist-non-react-statics';

@@ -436,3 +436,3 @@

if (activeElement !== null && activeElement instanceof HTMLButtonElement) {
process.env.NODE_ENV !== "production" ? warning(activeElement.attributes && activeElement.attributes.getNamedItem('type'), 'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.') : void 0;
!(activeElement.attributes && activeElement.attributes.getNamedItem('type')) ? process.env.NODE_ENV !== "production" ? invariant(false, 'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.') : invariant(false) : void 0;
}

@@ -794,3 +794,3 @@ }

handlerName = _a.handlerName;
console.warn("Warning: Formik called `" + handlerName + "`, but you forgot to pass an `id` or `name` attribute to your input:\n " + htmlContent + "\n Formik cannot determine which value to update. For more info see https://github.com/jaredpalmer/formik#" + documentationAnchorLink + "\n ");
console.warn("invariant: Formik called `" + handlerName + "`, but you forgot to pass an `id` or `name` attribute to your input:\n " + htmlContent + "\n Formik cannot determine which value to update. For more info see https://github.com/jaredpalmer/formik#" + documentationAnchorLink + "\n ");
}

@@ -857,3 +857,3 @@

var formik = useFormikContext();
process.env.NODE_ENV !== "production" ? warning(formik, 'useField() / <Field /> must be used underneath a <Formik> component or withFormik() higher order component') : void 0;
!formik ? process.env.NODE_ENV !== "production" ? invariant(false, 'useField() / <Field /> must be used underneath a <Formik> component or withFormik() higher order component') : invariant(false) : void 0;
return formik.getFieldProps(name, type);

@@ -876,8 +876,10 @@ }

process.env.NODE_ENV !== "production" ? warning(!!render, "<Field render> has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, \n replace \n <Field name=\"" + name + "\" render={({field, form}) => ...} />\n with\n <Field name=\"" + name + "\">{({field, form, meta}) => ...}</Field>\n ") : void 0;
process.env.NODE_ENV !== "production" ? warning(!!component, '<Field component> has been deprecated and will be removed in future versions of Formik. Use <Formik as> instead. Note that with the `as` prop, all props are passed directly through and not grouped in `field` object key.') : void 0;
process.env.NODE_ENV !== "production" ? warning(!!is && !!children && isFunction(children), 'You should not use <Field as> and <Field children> as a function in the same <Field> component; <Field as> will be ignored.') : void 0;
process.env.NODE_ENV !== "production" ? warning(!!component && children && isFunction(children), 'You should not use <Field as> and <Field children> as a function in the same <Field> component; <Field as> will be ignored.') : void 0;
process.env.NODE_ENV !== "production" ? warning(!!render && !!children && !isEmptyChildren(children), 'You should not use <Field render> and <Field children> in the same <Field> component; <Field children> will be ignored') : void 0;
useEffect(function () {
!!render ? process.env.NODE_ENV !== "production" ? invariant(false, "<Field render> has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, replace <Field name=\"" + name + "\" render={({field, form}) => ...} /> with <Field name=\"" + name + "\">{({field, form, meta}) => ...}</Field>") : invariant(false) : void 0;
!!component ? process.env.NODE_ENV !== "production" ? invariant(false, '<Field component> has been deprecated and will be removed in future versions of Formik. Use <Formik as> instead. Note that with the `as` prop, all props are passed directly through and not grouped in `field` object key.') : invariant(false) : void 0;
!!(is && children && isFunction(children)) ? process.env.NODE_ENV !== "production" ? invariant(false, 'You should not use <Field as> and <Field children> as a function in the same <Field> component; <Field as> will be ignored.') : invariant(false) : void 0;
!!(component && children && isFunction(children)) ? process.env.NODE_ENV !== "production" ? invariant(false, 'You should not use <Field component> and <Field children> as a function in the same <Field> component; <Field component> will be ignored.') : invariant(false) : void 0;
!!(render && children && !isEmptyChildren(children)) ? process.env.NODE_ENV !== "production" ? invariant(false, 'You should not use <Field render> and <Field children> in the same <Field> component; <Field children> will be ignored') : invariant(false) : void 0;
}, []);
useEffect(function () {
formik.registerField(name, {

@@ -884,0 +886,0 @@ validate: validate

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e=e||self).Formik={},e.React)}(this,function(e,t){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function n(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(r[n[o]]=e[n[o]])}return r}var i=Array.isArray,u=Object.keys,c=Object.prototype.hasOwnProperty,l="undefined"!=typeof Element;var s=function(e,t){try{return function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){var n,o,a,s=i(t),f=i(r);if(s&&f){if((o=t.length)!=r.length)return!1;for(n=o;0!=n--;)if(!e(t[n],r[n]))return!1;return!0}if(s!=f)return!1;var p=t instanceof Date,d=r instanceof Date;if(p!=d)return!1;if(p&&d)return t.getTime()==r.getTime();var y=t instanceof RegExp,v=r instanceof RegExp;if(y!=v)return!1;if(y&&v)return t.toString()==r.toString();var h=u(t);if((o=h.length)!==u(r).length)return!1;for(n=o;0!=n--;)if(!c.call(r,h[n]))return!1;if(l&&t instanceof Element&&r instanceof Element)return t===r;for(n=o;0!=n--;)if(!("_owner"===(a=h[n])&&t.$$typeof||e(t[a],r[a])))return!1;return!0}return t!=t&&r!=r}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}},f=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===p}(e)}(e)};var p="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function d(e,t){return!1!==t.clone&&t.isMergeableObject(e)?v(Array.isArray(e)?[]:{},e,t):e}function y(e,t,r){return e.concat(t).map(function(e){return d(e,r)})}function v(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||y,r.isMergeableObject=r.isMergeableObject||f;var n=Array.isArray(t);return n===Array.isArray(e)?n?r.arrayMerge(e,t,r):function(e,t,r){var n={};return r.isMergeableObject(e)&&Object.keys(e).forEach(function(t){n[t]=d(e[t],r)}),Object.keys(t).forEach(function(o){n[o]=r.isMergeableObject(t[o])&&e[o]?v(e[o],t[o],r):d(t[o],r)}),n}(e,t,r):d(t,r)}v.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,r){return v(e,r,t)},{})};var h=v;function b(e,t){return e===t||e!=e&&t!=t}function m(e,t){for(var r=e.length;r--;)if(b(e[r][0],t))return r;return-1}var _=Array.prototype.splice;function j(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}j.prototype.clear=function(){this.__data__=[],this.size=0},j.prototype.delete=function(e){var t=this.__data__,r=m(t,e);return!(r<0||(r==t.length-1?t.pop():_.call(t,r,1),--this.size,0))},j.prototype.get=function(e){var t=this.__data__,r=m(t,e);return r<0?void 0:t[r][1]},j.prototype.has=function(e){return m(this.__data__,e)>-1},j.prototype.set=function(e,t){var r=this.__data__,n=m(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var g="object"==typeof global&&global&&global.Object===Object&&global,S="object"==typeof self&&self&&self.Object===Object&&self,O=g||S||Function("return this")(),E=O.Symbol,A=Object.prototype,T=A.hasOwnProperty,F=A.toString,w=E?E.toStringTag:void 0;var P=Object.prototype.toString;var I="[object Null]",R="[object Undefined]",C=E?E.toStringTag:void 0;function M(e){return null==e?void 0===e?R:I:C&&C in Object(e)?function(e){var t=T.call(e,w),r=e[w];try{e[w]=void 0;var n=!0}catch(e){}var o=F.call(e);return n&&(t?e[w]=r:delete e[w]),o}(e):function(e){return P.call(e)}(e)}function k(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var U="[object AsyncFunction]",x="[object Function]",D="[object GeneratorFunction]",V="[object Proxy]";function $(e){if(!k(e))return!1;var t=M(e);return t==x||t==D||t==U||t==V}var L,N=O["__core-js_shared__"],B=(L=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"";var z=Function.prototype.toString;function W(e){if(null!=e){try{return z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var G=/^\[object .+?Constructor\]$/,H=Function.prototype,q=Object.prototype,K=RegExp("^"+H.toString.call(q.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Y(e){return!(!k(e)||(t=e,B&&B in t))&&($(e)?K:G).test(W(e));var t}function J(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return Y(r)?r:void 0}var Q=J(O,"Map"),X=J(Object,"create");var Z="__lodash_hash_undefined__",ee=Object.prototype.hasOwnProperty;var te=Object.prototype.hasOwnProperty;var re="__lodash_hash_undefined__";function ne(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function oe(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function ae(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ne.prototype.clear=function(){this.__data__=X?X(null):{},this.size=0},ne.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ne.prototype.get=function(e){var t=this.__data__;if(X){var r=t[e];return r===Z?void 0:r}return ee.call(t,e)?t[e]:void 0},ne.prototype.has=function(e){var t=this.__data__;return X?void 0!==t[e]:te.call(t,e)},ne.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=X&&void 0===t?re:t,this},ae.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(Q||j),string:new ne}},ae.prototype.delete=function(e){var t=oe(this,e).delete(e);return this.size-=t?1:0,t},ae.prototype.get=function(e){return oe(this,e).get(e)},ae.prototype.has=function(e){return oe(this,e).has(e)},ae.prototype.set=function(e,t){var r=oe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};var ie=200;function ue(e){var t=this.__data__=new j(e);this.size=t.size}ue.prototype.clear=function(){this.__data__=new j,this.size=0},ue.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ue.prototype.get=function(e){return this.__data__.get(e)},ue.prototype.has=function(e){return this.__data__.has(e)},ue.prototype.set=function(e,t){var r=this.__data__;if(r instanceof j){var n=r.__data__;if(!Q||n.length<ie-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ae(n)}return r.set(e,t),this.size=r.size,this};var ce=function(){try{var e=J(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function le(e,t,r){"__proto__"==t&&ce?ce(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var se=Object.prototype.hasOwnProperty;function fe(e,t,r){var n=e[t];se.call(e,t)&&b(n,r)&&(void 0!==r||t in e)||le(e,t,r)}function pe(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var u=t[a],c=n?n(r[u],e[u],u,r,e):void 0;void 0===c&&(c=e[u]),o?le(r,u,c):fe(r,u,c)}return r}function de(e){return null!=e&&"object"==typeof e}var ye="[object Arguments]";function ve(e){return de(e)&&M(e)==ye}var he=Object.prototype,be=he.hasOwnProperty,me=he.propertyIsEnumerable,_e=ve(function(){return arguments}())?ve:function(e){return de(e)&&be.call(e,"callee")&&!me.call(e,"callee")},je=Array.isArray;var ge="object"==typeof e&&e&&!e.nodeType&&e,Se=ge&&"object"==typeof module&&module&&!module.nodeType&&module,Oe=Se&&Se.exports===ge?O.Buffer:void 0,Ee=(Oe?Oe.isBuffer:void 0)||function(){return!1},Ae=9007199254740991,Te=/^(?:0|[1-9]\d*)$/;function Fe(e,t){var r=typeof e;return!!(t=null==t?Ae:t)&&("number"==r||"symbol"!=r&&Te.test(e))&&e>-1&&e%1==0&&e<t}var we=9007199254740991;function Pe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=we}var Ie={};function Re(e){return function(t){return e(t)}}Ie["[object Float32Array]"]=Ie["[object Float64Array]"]=Ie["[object Int8Array]"]=Ie["[object Int16Array]"]=Ie["[object Int32Array]"]=Ie["[object Uint8Array]"]=Ie["[object Uint8ClampedArray]"]=Ie["[object Uint16Array]"]=Ie["[object Uint32Array]"]=!0,Ie["[object Arguments]"]=Ie["[object Array]"]=Ie["[object ArrayBuffer]"]=Ie["[object Boolean]"]=Ie["[object DataView]"]=Ie["[object Date]"]=Ie["[object Error]"]=Ie["[object Function]"]=Ie["[object Map]"]=Ie["[object Number]"]=Ie["[object Object]"]=Ie["[object RegExp]"]=Ie["[object Set]"]=Ie["[object String]"]=Ie["[object WeakMap]"]=!1;var Ce="object"==typeof e&&e&&!e.nodeType&&e,Me=Ce&&"object"==typeof module&&module&&!module.nodeType&&module,ke=Me&&Me.exports===Ce&&g.process,Ue=function(){try{var e=Me&&Me.require&&Me.require("util").types;return e||ke&&ke.binding&&ke.binding("util")}catch(e){}}(),xe=Ue&&Ue.isTypedArray,De=xe?Re(xe):function(e){return de(e)&&Pe(e.length)&&!!Ie[M(e)]},Ve=Object.prototype.hasOwnProperty;function $e(e,t){var r=je(e),n=!r&&_e(e),o=!r&&!n&&Ee(e),a=!r&&!n&&!o&&De(e),i=r||n||o||a,u=i?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=u.length;for(var l in e)!t&&!Ve.call(e,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Fe(l,c))||u.push(l);return u}var Le=Object.prototype;function Ne(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Le)}function Be(e,t){return function(r){return e(t(r))}}var ze=Be(Object.keys,Object),We=Object.prototype.hasOwnProperty;function Ge(e){return null!=e&&Pe(e.length)&&!$(e)}function He(e){return Ge(e)?$e(e):function(e){if(!Ne(e))return ze(e);var t=[];for(var r in Object(e))We.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}var qe=Object.prototype.hasOwnProperty;function Ke(e){if(!k(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=Ne(e),r=[];for(var n in e)("constructor"!=n||!t&&qe.call(e,n))&&r.push(n);return r}function Ye(e){return Ge(e)?$e(e,!0):Ke(e)}var Je="object"==typeof e&&e&&!e.nodeType&&e,Qe=Je&&"object"==typeof module&&module&&!module.nodeType&&module,Xe=Qe&&Qe.exports===Je?O.Buffer:void 0,Ze=Xe?Xe.allocUnsafe:void 0;function et(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function tt(){return[]}var rt=Object.prototype.propertyIsEnumerable,nt=Object.getOwnPropertySymbols,ot=nt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}(nt(e),function(t){return rt.call(e,t)}))}:tt;function at(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var it=Be(Object.getPrototypeOf,Object),ut=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)at(t,ot(e)),e=it(e);return t}:tt;function ct(e,t,r){var n=t(e);return je(e)?n:at(n,r(e))}function lt(e){return ct(e,He,ot)}function st(e){return ct(e,Ye,ut)}var ft=J(O,"DataView"),pt=J(O,"Promise"),dt=J(O,"Set"),yt=J(O,"WeakMap"),vt=W(ft),ht=W(Q),bt=W(pt),mt=W(dt),_t=W(yt),jt=M;(ft&&"[object DataView]"!=jt(new ft(new ArrayBuffer(1)))||Q&&"[object Map]"!=jt(new Q)||pt&&"[object Promise]"!=jt(pt.resolve())||dt&&"[object Set]"!=jt(new dt)||yt&&"[object WeakMap]"!=jt(new yt))&&(jt=function(e){var t=M(e),r="[object Object]"==t?e.constructor:void 0,n=r?W(r):"";if(n)switch(n){case vt:return"[object DataView]";case ht:return"[object Map]";case bt:return"[object Promise]";case mt:return"[object Set]";case _t:return"[object WeakMap]"}return t});var gt=jt,St=Object.prototype.hasOwnProperty;var Ot=O.Uint8Array;function Et(e){var t=new e.constructor(e.byteLength);return new Ot(t).set(new Ot(e)),t}var At=/\w*$/;var Tt=E?E.prototype:void 0,Ft=Tt?Tt.valueOf:void 0;var wt="[object Boolean]",Pt="[object Date]",It="[object Map]",Rt="[object Number]",Ct="[object RegExp]",Mt="[object Set]",kt="[object String]",Ut="[object Symbol]",xt="[object ArrayBuffer]",Dt="[object DataView]",Vt="[object Float32Array]",$t="[object Float64Array]",Lt="[object Int8Array]",Nt="[object Int16Array]",Bt="[object Int32Array]",zt="[object Uint8Array]",Wt="[object Uint8ClampedArray]",Gt="[object Uint16Array]",Ht="[object Uint32Array]";function qt(e,t,r){var n,o,a,i=e.constructor;switch(t){case xt:return Et(e);case wt:case Pt:return new i(+e);case Dt:return function(e,t){var r=t?Et(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case Vt:case $t:case Lt:case Nt:case Bt:case zt:case Wt:case Gt:case Ht:return function(e,t){var r=t?Et(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,r);case It:return new i;case Rt:case kt:return new i(e);case Ct:return(a=new(o=e).constructor(o.source,At.exec(o))).lastIndex=o.lastIndex,a;case Mt:return new i;case Ut:return n=e,Ft?Object(Ft.call(n)):{}}}var Kt=Object.create,Yt=function(){function e(){}return function(t){if(!k(t))return{};if(Kt)return Kt(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var Jt="[object Map]";var Qt=Ue&&Ue.isMap,Xt=Qt?Re(Qt):function(e){return de(e)&&gt(e)==Jt},Zt="[object Set]";var er=Ue&&Ue.isSet,tr=er?Re(er):function(e){return de(e)&&gt(e)==Zt},rr=1,nr=2,or=4,ar="[object Arguments]",ir="[object Function]",ur="[object GeneratorFunction]",cr="[object Object]",lr={};function sr(e,t,r,n,o,a){var i,u=t&rr,c=t&nr,l=t&or;if(r&&(i=o?r(e,n,o,a):r(e)),void 0!==i)return i;if(!k(e))return e;var s=je(e);if(s){if(i=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&St.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return et(e,i)}else{var f=gt(e),p=f==ir||f==ur;if(Ee(e))return function(e,t){if(t)return e.slice();var r=e.length,n=Ze?Ze(r):new e.constructor(r);return e.copy(n),n}(e,u);if(f==cr||f==ar||p&&!o){if(i=c||p?{}:function(e){return"function"!=typeof e.constructor||Ne(e)?{}:Yt(it(e))}(e),!u)return c?function(e,t){return pe(e,ut(e),t)}(e,function(e,t){return e&&pe(t,Ye(t),e)}(i,e)):function(e,t){return pe(e,ot(e),t)}(e,function(e,t){return e&&pe(t,He(t),e)}(i,e))}else{if(!lr[f])return o?e:{};i=qt(e,f,u)}}a||(a=new ue);var d=a.get(e);if(d)return d;if(a.set(e,i),tr(e))return e.forEach(function(n){i.add(sr(n,t,r,n,e,a))}),i;if(Xt(e))return e.forEach(function(n,o){i.set(o,sr(n,t,r,o,e,a))}),i;var y=l?c?st:lt:c?keysIn:He,v=s?void 0:y(e);return function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););}(v||e,function(n,o){v&&(n=e[o=n]),fe(i,o,sr(n,t,r,o,e,a))}),i}lr[ar]=lr["[object Array]"]=lr["[object ArrayBuffer]"]=lr["[object DataView]"]=lr["[object Boolean]"]=lr["[object Date]"]=lr["[object Float32Array]"]=lr["[object Float64Array]"]=lr["[object Int8Array]"]=lr["[object Int16Array]"]=lr["[object Int32Array]"]=lr["[object Map]"]=lr["[object Number]"]=lr[cr]=lr["[object RegExp]"]=lr["[object Set]"]=lr["[object String]"]=lr["[object Symbol]"]=lr["[object Uint8Array]"]=lr["[object Uint8ClampedArray]"]=lr["[object Uint16Array]"]=lr["[object Uint32Array]"]=!0,lr["[object Error]"]=lr[ir]=lr["[object WeakMap]"]=!1;var fr=1,pr=4;function dr(e){return sr(e,fr|pr)}function yr(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var vr="[object Symbol]";function hr(e){return"symbol"==typeof e||de(e)&&M(e)==vr}var br="Expected a function";function mr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(br);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(mr.Cache||ae),r}mr.Cache=ae;var _r=500;var jr,gr,Sr,Or=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Er=/\\(\\)?/g,Ar=(jr=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Or,function(e,r,n,o){t.push(n?o.replace(Er,"$1"):r||e)}),t},gr=mr(jr,function(e){return Sr.size===_r&&Sr.clear(),e}),Sr=gr.cache,gr),Tr=1/0;function Fr(e){if("string"==typeof e||hr(e))return e;var t=e+"";return"0"==t&&1/e==-Tr?"-0":t}var wr=1/0,Pr=E?E.prototype:void 0,Ir=Pr?Pr.toString:void 0;function Rr(e){if("string"==typeof e)return e;if(je(e))return yr(e,Rr)+"";if(hr(e))return Ir?Ir.call(e):"";var t=e+"";return"0"==t&&1/e==-wr?"-0":t}function Cr(e){return je(e)?yr(e,Fr):hr(e)?[e]:et(Ar(function(e){return null==e?"":Rr(e)}(e)))}function Mr(e,t,r,n){void 0===n&&(n=0);for(var o=Cr(t);e&&n<o.length;)e=e[o[n++]];return void 0===e?r:e}function kr(e,t,r){for(var n={},a=n,i=0,u=Cr(t);i<u.length-1;i++){var c=u[i],l=Mr(e,u.slice(0,i+1));if(a[c])a=a[c];else if(l)a=a[c]=dr(l);else{var s=u[i+1];a=a[c]=Vr(s)&&Number(s)>=0?[]:{}}}if((0===i?e:a)[u[i]]===r)return e;void 0===r?delete a[u[i]]:a[u[i]]=r;var f=o({},e,n);return 0===i&&void 0===r&&delete f[u[i]],f}function Ur(e,t,r,n){void 0===r&&(r=new WeakMap),void 0===n&&(n={});for(var o=0,a=Object.keys(e);o<a.length;o++){var i=a[o],u=e[i];Dr(u)?r.get(u)||(r.set(u,!0),n[i]=Array.isArray(u)?[]:{},Ur(u,t,r,n[i])):n[i]=t}return n}var xr=function(e){return"function"==typeof e},Dr=function(e){return null!==e&&"object"==typeof e},Vr=function(e){return String(Math.floor(Number(e)))===e},$r=function(e){return"[object String]"===Object.prototype.toString.call(e)},Lr=function(e){return 0===t.Children.count(e)},Nr=function(e){return Dr(e)&&xr(e.then)};function Br(e){var t=!1;return[new Promise(function(r,n){e.then(function(e){return t?n({isCanceled:!0}):r(e)},function(e){return n(t?{isCanceled:!0}:e)})}),function(){t=!0}]}var zr=t.createContext({}),Wr=zr.Provider,Gr=zr.Consumer;function Hr(){return t.useContext(zr)}function qr(e,t){switch(t.type){case"SET_VALUES":return o({},e,{values:t.payload});case"SET_TOUCHED":return o({},e,{touched:t.payload});case"SET_ERRORS":return o({},e,{errors:t.payload});case"SET_STATUS":return o({},e,{status:t.payload});case"SET_ISSUBMITTING":return o({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return o({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return o({},e,{values:kr(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return o({},e,{touched:kr(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return o({},e,{errors:kr(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":case"SET_FORMIK_STATE":return o({},e,t.payload);case"SUBMIT_ATTEMPT":return o({},e,{touched:Ur(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return o({},e,{isSubmitting:!1});default:return e}}function Kr(e){var r=e.validateOnChange,n=void 0===r||r,i=e.validateOnBlur,u=void 0===i||i,c=e.isInitialValid,l=void 0!==c&&c,f=e.enableReinitialize,p=void 0!==f&&f,d=a(e,["validateOnChange","validateOnBlur","isInitialValid","enableReinitialize"]),y=o({validateOnChange:n,validateOnBlur:u,isInitialValid:l},d),v=t.useRef(y.initialValues),b=t.useRef(!1),m=t.useRef({}),_=t.useReducer(qr,{values:y.initialValues,errors:{},touched:{},isSubmitting:!1,isValidating:!1,submitCount:0}),j=_[0],g=_[1],S=t.useCallback(function(){var e=Br(D(j.values)),t=e[1];return e[0].then(function(e){return e}).catch(function(e){return e}),t},[j.values]);t.useEffect(function(){if(n&&!j.isSubmitting&&b.current)return S()},[j.values]),t.useEffect(function(){if(u&&!j.isSubmitting&&b.current)return S()},[j.touched]),t.useEffect(function(){p&&b.current&&!s(v.current,y.initialValues)&&(v.current=y.initialValues,T(y.initialValues))},[y.initialValues]),t.useEffect(function(){return b.current=!0,function(){b.current=!1}},[]);var O={resetForm:T,submitForm:N,validateForm:D,validateField:M,setErrors:w,setFieldError:I,setFieldTouched:C,setFieldValue:R,setStatus:$,setSubmitting:L,setTouched:F,setValues:P,setFormikState:V};function E(e){if($r(e))return function(r){return t(r,e)};function t(e,t){e.persist&&e.persist();var r=e.target,n=r.name,o=t||(n||r.id);g({type:"SET_FIELD_TOUCHED",payload:{field:o,value:!0}})}t(e)}function A(e){if($r(e))return function(r){return t(r,e)};function t(e,t){var r,n=t,o=e;if(!$r(e)){e.persist&&e.persist();var a=e.target,i=a.type,u=a.name,c=a.value,l=a.checked;n=t||(u||a.id),o=/number|range/.test(i)?(r=parseFloat(c),isNaN(r)?"":r):/checkbox/.test(i)?l:c}n&&g({type:"SET_FIELD_VALUE",payload:{field:n,value:o}})}t(e)}function T(e){var t=e||(null!==v.current?v.current:y.initialValues);v.current=t,g({type:"RESET_FORM",payload:{isSubmitting:!1,errors:{},touched:{},status:void 0,values:t,isValidating:!1,submitCount:0}})}function F(e){g({type:"SET_TOUCHED",payload:e})}function w(e){g({type:"SET_ERRORS",payload:e})}function P(e){g({type:"SET_VALUES",payload:e})}function I(e,t){g({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}function R(e,t){g({type:"SET_FIELD_VALUE",payload:{field:e,value:t}})}function C(e,t){void 0===t&&(t=!0),g({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}})}function M(e){if(null!==m.current&&m.current[e]&&m.current[e].validate&&xr(m.current[e].validate)){var t=Mr(j.values,e),r=m.current[e].validate(t);return Nr(r)?(g({type:"SET_ISVALIDATING",payload:!0}),r.then(function(e){return e},function(e){return e}).then(function(t){g({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),g({type:"SET_ISVALIDATING",payload:!1})})):(g({type:"SET_FIELD_ERROR",payload:{field:e,value:r}}),Promise.resolve(r))}return Promise.resolve()}function k(e,t){return new Promise(function(r){var n=y.validate(e,t);void 0===n?r({}):Nr(n)?n.then(function(){r({})},function(e){r(e)}):r(n)})}function U(e,t){return new Promise(function(r){var n=y.validationSchema,o=xr(n)?n(t):n;(t&&o.validateAt?o.validateAt(t,e):Qr(e,o)).then(function(){r({})},function(e){r(Jr(e))})})}function x(e){if(null===m.current)return Promise.resolve({});var t=Object.keys(m.current).filter(function(e){return null!==m.current&&m.current[e]&&m.current[e].validate&&xr(m.current[e].validate)}),r=t.length>0?t.map(function(t){return r=t,n=Mr(e,t),new Promise(function(e){return e(m.current[r].validate(n))}).then(function(e){return e},function(e){return e});var r,n}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(r).then(function(e){return e.reduce(function(e,r,n){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===r?e:(r&&(e=kr(e,t[n],r)),e)},{})})}function D(e){return void 0===e&&(e=j.values),y.validationSchema||y.validate||m.current&&Object.keys(m.current).filter(function(e){return!!m.current[e].validate}).length>0?(g({type:"SET_ISVALIDATING",payload:!0}),Promise.all([x(e),y.validationSchema?U(e):{},y.validate?k(e):{}]).then(function(e){var t=h.all([e[0],e[1],e[2]],{arrayMerge:Xr});return s(j.errors,t)||g({type:"SET_ERRORS",payload:t}),g({type:"SET_ISVALIDATING",payload:!1}),t})):Promise.resolve({})}function V(e){xr(e)?g({type:"SET_FORMIK_STATE",payload:e(j)}):g({type:"SET_FORMIK_STATE",payload:e})}function $(e){g({type:"SET_STATUS",payload:e})}function L(e){g({type:"SET_ISSUBMITTING",payload:e})}function N(){return g({type:"SUBMIT_ATTEMPT"}),D().then(function(e){0===Object.keys(e).length?Promise.resolve(y.onSubmit(j.values,O)).then(function(){b.current&&g({type:"SUBMIT_SUCCESS"})}).catch(function(e){b.current&&g({type:"SUBMIT_FAILURE"})}):b.current&&g({type:"SUBMIT_FAILURE"})})}function B(e){return{value:Mr(j.values,e),error:Mr(j.errors,e),touched:!!Mr(j.touched,e),initialValue:Mr(v.current,e)}}var z=t.useMemo(function(){return!s(v.current,j.values)},[v.current,j.values]),W=t.useMemo(function(){return z?j.errors&&0===Object.keys(j.errors).length:!1!==l&&xr(l)?l(y):l},[j.errors,z,l]);return o({},j,{initialValues:v.current||y.initialValues,handleBlur:E,handleChange:A,handleReset:function(){if(y.onReset){var e=y.onReset(j.values,O);Nr(e)?e.then(T):T()}else T()},handleSubmit:function(e){e&&e.preventDefault&&e.preventDefault(),N()},resetForm:T,setErrors:w,setFormikState:V,setFieldTouched:C,setFieldValue:R,setFieldError:I,setStatus:$,setSubmitting:L,setTouched:F,setValues:P,submitForm:N,validateForm:D,validateField:M,isValid:W,dirty:z,unregisterField:function(e){null!==m.current&&delete m.current[e]},registerField:function(e,t){null!==m.current&&(m.current[e]={validate:t.validate})},getFieldProps:function(e,t){return[{name:e,value:!t||"radio"!==t&&"checkbox"!==t?Mr(j.values,e):void 0,onChange:A,onBlur:E},B(e)]},validateOnBlur:u,validateOnChange:n})}function Yr(e){var r=Kr(e),n=e.component,o=e.children,a=e.render;return t.createElement(Wr,{value:r},n?t.createElement(n,r):a?a(r):o?xr(o)?o(r):Lr(o)?null:t.Children.only(o):null)}function Jr(e){var t={};if(0===e.inner.length)return kr(t,e.path,e.message);for(var r=0,n=e.inner;r<n.length;r++){var o=n[r];t[o.path]||(t=kr(t,o.path,o.message))}return t}function Qr(e,t,r,n){void 0===r&&(r=!1),void 0===n&&(n={});var o={};for(var a in e)if(e.hasOwnProperty(a)){var i=String(a);o[i]=""!==e[i]?e[i]:void 0}return t[r?"validateSync":"validate"](o,{abortEarly:!1,context:n})}function Xr(e,t,r){var n=e.slice();return t.forEach(function(t,o){if(void 0===n[o]){var a=!1!==r.clone&&r.isMergeableObject(t);n[o]=a?h(Array.isArray(t)?[]:{},t,r):t}else r.isMergeableObject(t)?n[o]=h(e[o],t,r):-1===e.indexOf(t)&&n.push(t)}),n}function Zr(e){var r=e.validate,n=e.name,i=e.render,u=e.children,c=e.as,l=void 0===c?"input":c,s=e.component,f=a(e,["validate","name","render","children","as","component"]),p=Hr(),d=a(p,["validate","validationSchema"]);t.useEffect(function(){return d.registerField(n,{validate:r}),function(){d.unregisterField(n)}},[n,r]);var y=d.getFieldProps(n,f.type),v=y[0],h=y[1],b={field:v,form:d};if(i)return i(b);if(xr(u))return u(o({},b,{meta:h}));if(s){if("string"==typeof s){var m=f.innerRef,_=a(f,["innerRef"]);return t.createElement(s,o({ref:m},v,_),u)}return t.createElement(s,o({field:v,form:d},f),u)}if("string"==typeof l){m=f.innerRef,_=a(f,["innerRef"]);return t.createElement(l,o({ref:m},v,_),u)}return t.createElement(l,o({},v,f),u)}var en=Zr;function tn(e){var r=Hr();return t.createElement("form",o({onSubmit:r.handleSubmit,onReset:r.handleReset},e))}function rn(e,t){return e(t={exports:{}},t.exports),t.exports}tn.displayName="Form";var nn,on=rn(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,a=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,s=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116;function h(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case s:case f:case a:case u:case i:return e;default:switch(e=e&&e.$$typeof){case l:case p:case c:return e;default:return t}}case o:return t}}}function b(e){return h(e)===f}t.typeOf=h,t.AsyncMode=s,t.ConcurrentMode=f,t.ContextConsumer=l,t.ContextProvider=c,t.Element=n,t.ForwardRef=p,t.Fragment=a,t.Profiler=u,t.Portal=o,t.StrictMode=i,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===u||e===i||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===y||e.$$typeof===c||e.$$typeof===l||e.$$typeof===p)},t.isAsyncMode=function(e){return b(e)||h(e)===s},t.isConcurrentMode=b,t.isContextConsumer=function(e){return h(e)===l},t.isContextProvider=function(e){return h(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return h(e)===p},t.isFragment=function(e){return h(e)===a},t.isProfiler=function(e){return h(e)===u},t.isPortal=function(e){return h(e)===o},t.isStrictMode=function(e){return h(e)===i}});(nn=on)&&nn.__esModule&&Object.prototype.hasOwnProperty.call(nn,"default");var an=rn(function(e){e.exports=on}),un={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},cn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ln={};ln[an.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var sn=Object.defineProperty,fn=Object.getOwnPropertyNames,pn=Object.getOwnPropertySymbols,dn=Object.getOwnPropertyDescriptor,yn=Object.getPrototypeOf,vn=Object.prototype;var hn=function e(t,r,n){if("string"!=typeof r){if(vn){var o=yn(r);o&&o!==vn&&e(t,o,n)}var a=fn(r);pn&&(a=a.concat(pn(r)));for(var i=ln[t.$$typeof]||un,u=ln[r.$$typeof]||un,c=0;c<a.length;++c){var l=a[c];if(!(cn[l]||n&&n[l]||u&&u[l]||i&&i[l])){var s=dn(r,l);try{sn(t,l,s)}catch(e){}}}return t}return t};function bn(e){var r=function(r){return t.createElement(Gr,null,function(n){return t.createElement(e,o({},r,{formik:n}))})},n=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return r.WrappedComponent=e,r.displayName="FormikConnect("+n+")",hn(r,e)}var mn=function(e,t,r){var n=(e||[]).slice(),o=n[t];return n.splice(t,1),n.splice(r,0,o),n},_n=function(e,t,r){var n=(e||[]).slice(),o=n[t];return n[t]=n[r],n[r]=o,n},jn=function(e,t,r){var n=(e||[]).slice();return n.splice(t,0,r),n},gn=function(e,t,r){var n=(e||[]).slice();return n[t]=r,n},Sn=bn(function(e){function r(t){var r=e.call(this,t)||this;return r.updateArrayField=function(e,t,n){var a=r.props,i=a.name,u=a.validateOnChange,c=a.formik,l=c.validateForm;(0,c.setFormikState)(function(r){var a="function"==typeof n?n:e,u="function"==typeof t?t:e;return o({},r,{values:kr(r.values,i,e(Mr(r.values,i))),errors:n?kr(r.errors,i,a(Mr(r.errors,i))):r.errors,touched:t?kr(r.touched,i,u(Mr(r.touched,i))):r.touched})},function(){u&&l()})},r.push=function(e){return r.updateArrayField(function(t){return(t||[]).concat([dr(e)])},!1,!1)},r.handlePush=function(e){return function(){return r.push(e)}},r.swap=function(e,t){return r.updateArrayField(function(r){return _n(r,e,t)},!0,!0)},r.handleSwap=function(e,t){return function(){return r.swap(e,t)}},r.move=function(e,t){return r.updateArrayField(function(r){return mn(r,e,t)},!0,!0)},r.handleMove=function(e,t){return function(){return r.move(e,t)}},r.insert=function(e,t){return r.updateArrayField(function(r){return jn(r,e,t)},function(t){return jn(t,e,null)},function(t){return jn(t,e,null)})},r.handleInsert=function(e,t){return function(){return r.insert(e,t)}},r.replace=function(e,t){return r.updateArrayField(function(r){return gn(r,e,t)},!1,!1)},r.handleReplace=function(e,t){return function(){return r.replace(e,t)}},r.unshift=function(e){var t=-1;return r.updateArrayField(function(r){var n=r?[e].concat(r):[e];return t<0&&(t=n.length),n},function(e){var r=e?[null].concat(e):[null];return t<0&&(t=r.length),r},function(e){var r=e?[null].concat(e):[null];return t<0&&(t=r.length),r}),t},r.handleUnshift=function(e){return function(){return r.unshift(e)}},r.handleRemove=function(e){return function(){return r.remove(e)}},r.handlePop=function(){return function(){return r.pop()}},r.remove=r.remove.bind(r),r.pop=r.pop.bind(r),r}return n(r,e),r.prototype.remove=function(e){var t;return this.updateArrayField(function(r){var n=r?r.slice():[];return t||(t=n[e]),xr(n.splice)&&n.splice(e,1),n},!0,!0),t},r.prototype.pop=function(){var e;return this.updateArrayField(function(t){var r=t;return e||(e=r&&r.pop&&r.pop()),r},!0,!0),e},r.prototype.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},r=this.props,n=r.component,i=r.render,u=r.children,c=r.name,l=r.formik,s=a(l,["validate","validationSchema"]),f=o({},e,{form:s,name:c});return n?t.createElement(n,f):i?i(f):u?"function"==typeof u?u(f):Lr(u)?null:t.Children.only(u):null},r.defaultProps={validateOnChange:!0},r}(t.Component)),On=bn(function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return n(r,e),r.prototype.shouldComponentUpdate=function(e){return Mr(this.props.formik.errors,this.props.name)!==Mr(e.formik.errors,this.props.name)||Mr(this.props.formik.touched,this.props.name)!==Mr(e.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length},r.prototype.render=function(){var e=this.props,r=e.component,n=e.formik,o=e.render,i=e.children,u=e.name,c=a(e,["component","formik","render","children","name"]),l=Mr(n.touched,u),s=Mr(n.errors,u);return l&&s?o?xr(o)?o(s):null:i?xr(i)?i(s):null:r?t.createElement(r,c,s):s:null},r}(t.Component));e.useFormik=Kr,e.Formik=Yr,e.yupToFormErrors=Jr,e.validateYupSchema=Qr,e.useField=function(e,t){return Hr().getFieldProps(e,t)},e.Field=Zr,e.FastField=en,e.Form=tn,e.withFormik=function(e){var r=e.mapPropsToValues,i=void 0===r?function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&"function"!=typeof e[r]&&(t[r]=e[r]);return t}:r,u=a(e,["mapPropsToValues"]);return function(e){var r=e.displayName||e.name||e.constructor&&e.constructor.name||"Component",c=function(c){function l(){var r=null!==c&&c.apply(this,arguments)||this;return r.validate=function(e){return u.validate(e,r.props)},r.validationSchema=function(){return xr(u.validationSchema)?u.validationSchema(r.props):u.validationSchema},r.handleSubmit=function(e,t){return u.handleSubmit(e,o({},t,{props:r.props}))},r.renderFormComponent=function(n){return t.createElement(e,o({},r.props,n))},r}return n(l,c),l.prototype.render=function(){var e=this.props,r=a(e,["children"]);return t.createElement(Yr,o({},r,u,{validate:u.validate&&this.validate,validationSchema:u.validationSchema&&this.validationSchema,initialValues:i(this.props),initialStatus:u.mapPropsToStatus&&u.mapPropsToStatus(this.props),onSubmit:this.handleSubmit,render:this.renderFormComponent}))},l.displayName="WithFormik("+r+")",l}(t.Component);return hn(c,e)}},e.move=mn,e.swap=_n,e.insert=jn,e.replace=gn,e.FieldArray=Sn,e.getIn=Mr,e.setIn=kr,e.setNestedObjectValues=Ur,e.isFunction=xr,e.isObject=Dr,e.isInteger=Vr,e.isString=$r,e.isNaN=function(e){return e!=e},e.isEmptyChildren=Lr,e.isPromise=Nr,e.getActiveElement=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}},e.makeCancelable=Br,e.connect=bn,e.ErrorMessage=On,e.FormikProvider=Wr,e.FormikConsumer=Gr,e.useFormikContext=Hr,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e=e||self).Formik={},e.React)}(this,function(e,t){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function n(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(r[n[o]]=e[n[o]])}return r}var i=Array.isArray,u=Object.keys,c=Object.prototype.hasOwnProperty,l="undefined"!=typeof Element;var s=function(e,t){try{return function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){var n,o,a,s=i(t),f=i(r);if(s&&f){if((o=t.length)!=r.length)return!1;for(n=o;0!=n--;)if(!e(t[n],r[n]))return!1;return!0}if(s!=f)return!1;var p=t instanceof Date,d=r instanceof Date;if(p!=d)return!1;if(p&&d)return t.getTime()==r.getTime();var y=t instanceof RegExp,v=r instanceof RegExp;if(y!=v)return!1;if(y&&v)return t.toString()==r.toString();var h=u(t);if((o=h.length)!==u(r).length)return!1;for(n=o;0!=n--;)if(!c.call(r,h[n]))return!1;if(l&&t instanceof Element&&r instanceof Element)return t===r;for(n=o;0!=n--;)if(!("_owner"===(a=h[n])&&t.$$typeof||e(t[a],r[a])))return!1;return!0}return t!=t&&r!=r}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}},f=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===p}(e)}(e)};var p="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function d(e,t){return!1!==t.clone&&t.isMergeableObject(e)?v(Array.isArray(e)?[]:{},e,t):e}function y(e,t,r){return e.concat(t).map(function(e){return d(e,r)})}function v(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||y,r.isMergeableObject=r.isMergeableObject||f;var n=Array.isArray(t);return n===Array.isArray(e)?n?r.arrayMerge(e,t,r):function(e,t,r){var n={};return r.isMergeableObject(e)&&Object.keys(e).forEach(function(t){n[t]=d(e[t],r)}),Object.keys(t).forEach(function(o){n[o]=r.isMergeableObject(t[o])&&e[o]?v(e[o],t[o],r):d(t[o],r)}),n}(e,t,r):d(t,r)}v.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,r){return v(e,r,t)},{})};var h=v;function b(e,t){return e===t||e!=e&&t!=t}function m(e,t){for(var r=e.length;r--;)if(b(e[r][0],t))return r;return-1}var _=Array.prototype.splice;function j(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}j.prototype.clear=function(){this.__data__=[],this.size=0},j.prototype.delete=function(e){var t=this.__data__,r=m(t,e);return!(r<0||(r==t.length-1?t.pop():_.call(t,r,1),--this.size,0))},j.prototype.get=function(e){var t=this.__data__,r=m(t,e);return r<0?void 0:t[r][1]},j.prototype.has=function(e){return m(this.__data__,e)>-1},j.prototype.set=function(e,t){var r=this.__data__,n=m(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var g="object"==typeof global&&global&&global.Object===Object&&global,S="object"==typeof self&&self&&self.Object===Object&&self,O=g||S||Function("return this")(),E=O.Symbol,A=Object.prototype,T=A.hasOwnProperty,F=A.toString,w=E?E.toStringTag:void 0;var P=Object.prototype.toString;var I="[object Null]",R="[object Undefined]",C=E?E.toStringTag:void 0;function M(e){return null==e?void 0===e?R:I:C&&C in Object(e)?function(e){var t=T.call(e,w),r=e[w];try{e[w]=void 0;var n=!0}catch(e){}var o=F.call(e);return n&&(t?e[w]=r:delete e[w]),o}(e):function(e){return P.call(e)}(e)}function k(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var U="[object AsyncFunction]",x="[object Function]",D="[object GeneratorFunction]",V="[object Proxy]";function $(e){if(!k(e))return!1;var t=M(e);return t==x||t==D||t==U||t==V}var L,N=O["__core-js_shared__"],B=(L=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"";var z=Function.prototype.toString;function W(e){if(null!=e){try{return z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var G=/^\[object .+?Constructor\]$/,H=Function.prototype,q=Object.prototype,K=RegExp("^"+H.toString.call(q.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Y(e){return!(!k(e)||(t=e,B&&B in t))&&($(e)?K:G).test(W(e));var t}function J(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return Y(r)?r:void 0}var Q=J(O,"Map"),X=J(Object,"create");var Z="__lodash_hash_undefined__",ee=Object.prototype.hasOwnProperty;var te=Object.prototype.hasOwnProperty;var re="__lodash_hash_undefined__";function ne(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function oe(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function ae(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ne.prototype.clear=function(){this.__data__=X?X(null):{},this.size=0},ne.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ne.prototype.get=function(e){var t=this.__data__;if(X){var r=t[e];return r===Z?void 0:r}return ee.call(t,e)?t[e]:void 0},ne.prototype.has=function(e){var t=this.__data__;return X?void 0!==t[e]:te.call(t,e)},ne.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=X&&void 0===t?re:t,this},ae.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(Q||j),string:new ne}},ae.prototype.delete=function(e){var t=oe(this,e).delete(e);return this.size-=t?1:0,t},ae.prototype.get=function(e){return oe(this,e).get(e)},ae.prototype.has=function(e){return oe(this,e).has(e)},ae.prototype.set=function(e,t){var r=oe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};var ie=200;function ue(e){var t=this.__data__=new j(e);this.size=t.size}ue.prototype.clear=function(){this.__data__=new j,this.size=0},ue.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ue.prototype.get=function(e){return this.__data__.get(e)},ue.prototype.has=function(e){return this.__data__.has(e)},ue.prototype.set=function(e,t){var r=this.__data__;if(r instanceof j){var n=r.__data__;if(!Q||n.length<ie-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ae(n)}return r.set(e,t),this.size=r.size,this};var ce=function(){try{var e=J(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();function le(e,t,r){"__proto__"==t&&ce?ce(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var se=Object.prototype.hasOwnProperty;function fe(e,t,r){var n=e[t];se.call(e,t)&&b(n,r)&&(void 0!==r||t in e)||le(e,t,r)}function pe(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var u=t[a],c=n?n(r[u],e[u],u,r,e):void 0;void 0===c&&(c=e[u]),o?le(r,u,c):fe(r,u,c)}return r}function de(e){return null!=e&&"object"==typeof e}var ye="[object Arguments]";function ve(e){return de(e)&&M(e)==ye}var he=Object.prototype,be=he.hasOwnProperty,me=he.propertyIsEnumerable,_e=ve(function(){return arguments}())?ve:function(e){return de(e)&&be.call(e,"callee")&&!me.call(e,"callee")},je=Array.isArray;var ge="object"==typeof e&&e&&!e.nodeType&&e,Se=ge&&"object"==typeof module&&module&&!module.nodeType&&module,Oe=Se&&Se.exports===ge?O.Buffer:void 0,Ee=(Oe?Oe.isBuffer:void 0)||function(){return!1},Ae=9007199254740991,Te=/^(?:0|[1-9]\d*)$/;function Fe(e,t){var r=typeof e;return!!(t=null==t?Ae:t)&&("number"==r||"symbol"!=r&&Te.test(e))&&e>-1&&e%1==0&&e<t}var we=9007199254740991;function Pe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=we}var Ie={};function Re(e){return function(t){return e(t)}}Ie["[object Float32Array]"]=Ie["[object Float64Array]"]=Ie["[object Int8Array]"]=Ie["[object Int16Array]"]=Ie["[object Int32Array]"]=Ie["[object Uint8Array]"]=Ie["[object Uint8ClampedArray]"]=Ie["[object Uint16Array]"]=Ie["[object Uint32Array]"]=!0,Ie["[object Arguments]"]=Ie["[object Array]"]=Ie["[object ArrayBuffer]"]=Ie["[object Boolean]"]=Ie["[object DataView]"]=Ie["[object Date]"]=Ie["[object Error]"]=Ie["[object Function]"]=Ie["[object Map]"]=Ie["[object Number]"]=Ie["[object Object]"]=Ie["[object RegExp]"]=Ie["[object Set]"]=Ie["[object String]"]=Ie["[object WeakMap]"]=!1;var Ce="object"==typeof e&&e&&!e.nodeType&&e,Me=Ce&&"object"==typeof module&&module&&!module.nodeType&&module,ke=Me&&Me.exports===Ce&&g.process,Ue=function(){try{var e=Me&&Me.require&&Me.require("util").types;return e||ke&&ke.binding&&ke.binding("util")}catch(e){}}(),xe=Ue&&Ue.isTypedArray,De=xe?Re(xe):function(e){return de(e)&&Pe(e.length)&&!!Ie[M(e)]},Ve=Object.prototype.hasOwnProperty;function $e(e,t){var r=je(e),n=!r&&_e(e),o=!r&&!n&&Ee(e),a=!r&&!n&&!o&&De(e),i=r||n||o||a,u=i?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=u.length;for(var l in e)!t&&!Ve.call(e,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Fe(l,c))||u.push(l);return u}var Le=Object.prototype;function Ne(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Le)}function Be(e,t){return function(r){return e(t(r))}}var ze=Be(Object.keys,Object),We=Object.prototype.hasOwnProperty;function Ge(e){return null!=e&&Pe(e.length)&&!$(e)}function He(e){return Ge(e)?$e(e):function(e){if(!Ne(e))return ze(e);var t=[];for(var r in Object(e))We.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}var qe=Object.prototype.hasOwnProperty;function Ke(e){if(!k(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=Ne(e),r=[];for(var n in e)("constructor"!=n||!t&&qe.call(e,n))&&r.push(n);return r}function Ye(e){return Ge(e)?$e(e,!0):Ke(e)}var Je="object"==typeof e&&e&&!e.nodeType&&e,Qe=Je&&"object"==typeof module&&module&&!module.nodeType&&module,Xe=Qe&&Qe.exports===Je?O.Buffer:void 0,Ze=Xe?Xe.allocUnsafe:void 0;function et(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function tt(){return[]}var rt=Object.prototype.propertyIsEnumerable,nt=Object.getOwnPropertySymbols,ot=nt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}(nt(e),function(t){return rt.call(e,t)}))}:tt;function at(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var it=Be(Object.getPrototypeOf,Object),ut=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)at(t,ot(e)),e=it(e);return t}:tt;function ct(e,t,r){var n=t(e);return je(e)?n:at(n,r(e))}function lt(e){return ct(e,He,ot)}function st(e){return ct(e,Ye,ut)}var ft=J(O,"DataView"),pt=J(O,"Promise"),dt=J(O,"Set"),yt=J(O,"WeakMap"),vt=W(ft),ht=W(Q),bt=W(pt),mt=W(dt),_t=W(yt),jt=M;(ft&&"[object DataView]"!=jt(new ft(new ArrayBuffer(1)))||Q&&"[object Map]"!=jt(new Q)||pt&&"[object Promise]"!=jt(pt.resolve())||dt&&"[object Set]"!=jt(new dt)||yt&&"[object WeakMap]"!=jt(new yt))&&(jt=function(e){var t=M(e),r="[object Object]"==t?e.constructor:void 0,n=r?W(r):"";if(n)switch(n){case vt:return"[object DataView]";case ht:return"[object Map]";case bt:return"[object Promise]";case mt:return"[object Set]";case _t:return"[object WeakMap]"}return t});var gt=jt,St=Object.prototype.hasOwnProperty;var Ot=O.Uint8Array;function Et(e){var t=new e.constructor(e.byteLength);return new Ot(t).set(new Ot(e)),t}var At=/\w*$/;var Tt=E?E.prototype:void 0,Ft=Tt?Tt.valueOf:void 0;var wt="[object Boolean]",Pt="[object Date]",It="[object Map]",Rt="[object Number]",Ct="[object RegExp]",Mt="[object Set]",kt="[object String]",Ut="[object Symbol]",xt="[object ArrayBuffer]",Dt="[object DataView]",Vt="[object Float32Array]",$t="[object Float64Array]",Lt="[object Int8Array]",Nt="[object Int16Array]",Bt="[object Int32Array]",zt="[object Uint8Array]",Wt="[object Uint8ClampedArray]",Gt="[object Uint16Array]",Ht="[object Uint32Array]";function qt(e,t,r){var n,o,a,i=e.constructor;switch(t){case xt:return Et(e);case wt:case Pt:return new i(+e);case Dt:return function(e,t){var r=t?Et(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case Vt:case $t:case Lt:case Nt:case Bt:case zt:case Wt:case Gt:case Ht:return function(e,t){var r=t?Et(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,r);case It:return new i;case Rt:case kt:return new i(e);case Ct:return(a=new(o=e).constructor(o.source,At.exec(o))).lastIndex=o.lastIndex,a;case Mt:return new i;case Ut:return n=e,Ft?Object(Ft.call(n)):{}}}var Kt=Object.create,Yt=function(){function e(){}return function(t){if(!k(t))return{};if(Kt)return Kt(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var Jt="[object Map]";var Qt=Ue&&Ue.isMap,Xt=Qt?Re(Qt):function(e){return de(e)&&gt(e)==Jt},Zt="[object Set]";var er=Ue&&Ue.isSet,tr=er?Re(er):function(e){return de(e)&&gt(e)==Zt},rr=1,nr=2,or=4,ar="[object Arguments]",ir="[object Function]",ur="[object GeneratorFunction]",cr="[object Object]",lr={};function sr(e,t,r,n,o,a){var i,u=t&rr,c=t&nr,l=t&or;if(r&&(i=o?r(e,n,o,a):r(e)),void 0!==i)return i;if(!k(e))return e;var s=je(e);if(s){if(i=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&St.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return et(e,i)}else{var f=gt(e),p=f==ir||f==ur;if(Ee(e))return function(e,t){if(t)return e.slice();var r=e.length,n=Ze?Ze(r):new e.constructor(r);return e.copy(n),n}(e,u);if(f==cr||f==ar||p&&!o){if(i=c||p?{}:function(e){return"function"!=typeof e.constructor||Ne(e)?{}:Yt(it(e))}(e),!u)return c?function(e,t){return pe(e,ut(e),t)}(e,function(e,t){return e&&pe(t,Ye(t),e)}(i,e)):function(e,t){return pe(e,ot(e),t)}(e,function(e,t){return e&&pe(t,He(t),e)}(i,e))}else{if(!lr[f])return o?e:{};i=qt(e,f,u)}}a||(a=new ue);var d=a.get(e);if(d)return d;if(a.set(e,i),tr(e))return e.forEach(function(n){i.add(sr(n,t,r,n,e,a))}),i;if(Xt(e))return e.forEach(function(n,o){i.set(o,sr(n,t,r,o,e,a))}),i;var y=l?c?st:lt:c?keysIn:He,v=s?void 0:y(e);return function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););}(v||e,function(n,o){v&&(n=e[o=n]),fe(i,o,sr(n,t,r,o,e,a))}),i}lr[ar]=lr["[object Array]"]=lr["[object ArrayBuffer]"]=lr["[object DataView]"]=lr["[object Boolean]"]=lr["[object Date]"]=lr["[object Float32Array]"]=lr["[object Float64Array]"]=lr["[object Int8Array]"]=lr["[object Int16Array]"]=lr["[object Int32Array]"]=lr["[object Map]"]=lr["[object Number]"]=lr[cr]=lr["[object RegExp]"]=lr["[object Set]"]=lr["[object String]"]=lr["[object Symbol]"]=lr["[object Uint8Array]"]=lr["[object Uint8ClampedArray]"]=lr["[object Uint16Array]"]=lr["[object Uint32Array]"]=!0,lr["[object Error]"]=lr[ir]=lr["[object WeakMap]"]=!1;var fr=1,pr=4;function dr(e){return sr(e,fr|pr)}function yr(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var vr="[object Symbol]";function hr(e){return"symbol"==typeof e||de(e)&&M(e)==vr}var br="Expected a function";function mr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(br);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(mr.Cache||ae),r}mr.Cache=ae;var _r=500;var jr,gr,Sr,Or=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Er=/\\(\\)?/g,Ar=(jr=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Or,function(e,r,n,o){t.push(n?o.replace(Er,"$1"):r||e)}),t},gr=mr(jr,function(e){return Sr.size===_r&&Sr.clear(),e}),Sr=gr.cache,gr),Tr=1/0;function Fr(e){if("string"==typeof e||hr(e))return e;var t=e+"";return"0"==t&&1/e==-Tr?"-0":t}var wr=1/0,Pr=E?E.prototype:void 0,Ir=Pr?Pr.toString:void 0;function Rr(e){if("string"==typeof e)return e;if(je(e))return yr(e,Rr)+"";if(hr(e))return Ir?Ir.call(e):"";var t=e+"";return"0"==t&&1/e==-wr?"-0":t}function Cr(e){return je(e)?yr(e,Fr):hr(e)?[e]:et(Ar(function(e){return null==e?"":Rr(e)}(e)))}function Mr(e,t,r,n){void 0===n&&(n=0);for(var o=Cr(t);e&&n<o.length;)e=e[o[n++]];return void 0===e?r:e}function kr(e,t,r){for(var n={},a=n,i=0,u=Cr(t);i<u.length-1;i++){var c=u[i],l=Mr(e,u.slice(0,i+1));if(a[c])a=a[c];else if(l)a=a[c]=dr(l);else{var s=u[i+1];a=a[c]=Vr(s)&&Number(s)>=0?[]:{}}}if((0===i?e:a)[u[i]]===r)return e;void 0===r?delete a[u[i]]:a[u[i]]=r;var f=o({},e,n);return 0===i&&void 0===r&&delete f[u[i]],f}function Ur(e,t,r,n){void 0===r&&(r=new WeakMap),void 0===n&&(n={});for(var o=0,a=Object.keys(e);o<a.length;o++){var i=a[o],u=e[i];Dr(u)?r.get(u)||(r.set(u,!0),n[i]=Array.isArray(u)?[]:{},Ur(u,t,r,n[i])):n[i]=t}return n}var xr=function(e){return"function"==typeof e},Dr=function(e){return null!==e&&"object"==typeof e},Vr=function(e){return String(Math.floor(Number(e)))===e},$r=function(e){return"[object String]"===Object.prototype.toString.call(e)},Lr=function(e){return 0===t.Children.count(e)},Nr=function(e){return Dr(e)&&xr(e.then)};function Br(e){var t=!1;return[new Promise(function(r,n){e.then(function(e){return t?n({isCanceled:!0}):r(e)},function(e){return n(t?{isCanceled:!0}:e)})}),function(){t=!0}]}var zr=t.createContext({}),Wr=zr.Provider,Gr=zr.Consumer;function Hr(){return t.useContext(zr)}function qr(e,t){switch(t.type){case"SET_VALUES":return o({},e,{values:t.payload});case"SET_TOUCHED":return o({},e,{touched:t.payload});case"SET_ERRORS":return o({},e,{errors:t.payload});case"SET_STATUS":return o({},e,{status:t.payload});case"SET_ISSUBMITTING":return o({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return o({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return o({},e,{values:kr(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return o({},e,{touched:kr(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return o({},e,{errors:kr(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":case"SET_FORMIK_STATE":return o({},e,t.payload);case"SUBMIT_ATTEMPT":return o({},e,{touched:Ur(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return o({},e,{isSubmitting:!1});default:return e}}function Kr(e){var r=e.validateOnChange,n=void 0===r||r,i=e.validateOnBlur,u=void 0===i||i,c=e.isInitialValid,l=void 0!==c&&c,f=e.enableReinitialize,p=void 0!==f&&f,d=a(e,["validateOnChange","validateOnBlur","isInitialValid","enableReinitialize"]),y=o({validateOnChange:n,validateOnBlur:u,isInitialValid:l},d),v=t.useRef(y.initialValues),b=t.useRef(!1),m=t.useRef({}),_=t.useReducer(qr,{values:y.initialValues,errors:{},touched:{},isSubmitting:!1,isValidating:!1,submitCount:0}),j=_[0],g=_[1],S=t.useCallback(function(){var e=Br(D(j.values)),t=e[1];return e[0].then(function(e){return e}).catch(function(e){return e}),t},[j.values]);t.useEffect(function(){if(n&&!j.isSubmitting&&b.current)return S()},[j.values]),t.useEffect(function(){if(u&&!j.isSubmitting&&b.current)return S()},[j.touched]),t.useEffect(function(){p&&b.current&&!s(v.current,y.initialValues)&&(v.current=y.initialValues,T(y.initialValues))},[y.initialValues]),t.useEffect(function(){return b.current=!0,function(){b.current=!1}},[]);var O={resetForm:T,submitForm:N,validateForm:D,validateField:M,setErrors:w,setFieldError:I,setFieldTouched:C,setFieldValue:R,setStatus:$,setSubmitting:L,setTouched:F,setValues:P,setFormikState:V};function E(e){if($r(e))return function(r){return t(r,e)};function t(e,t){e.persist&&e.persist();var r=e.target,n=r.name,o=t||(n||r.id);g({type:"SET_FIELD_TOUCHED",payload:{field:o,value:!0}})}t(e)}function A(e){if($r(e))return function(r){return t(r,e)};function t(e,t){var r,n=t,o=e;if(!$r(e)){e.persist&&e.persist();var a=e.target,i=a.type,u=a.name,c=a.value,l=a.checked;n=t||(u||a.id),o=/number|range/.test(i)?(r=parseFloat(c),isNaN(r)?"":r):/checkbox/.test(i)?l:c}n&&g({type:"SET_FIELD_VALUE",payload:{field:n,value:o}})}t(e)}function T(e){var t=e||(null!==v.current?v.current:y.initialValues);v.current=t,g({type:"RESET_FORM",payload:{isSubmitting:!1,errors:{},touched:{},status:void 0,values:t,isValidating:!1,submitCount:0}})}function F(e){g({type:"SET_TOUCHED",payload:e})}function w(e){g({type:"SET_ERRORS",payload:e})}function P(e){g({type:"SET_VALUES",payload:e})}function I(e,t){g({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}function R(e,t){g({type:"SET_FIELD_VALUE",payload:{field:e,value:t}})}function C(e,t){void 0===t&&(t=!0),g({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}})}function M(e){if(null!==m.current&&m.current[e]&&m.current[e].validate&&xr(m.current[e].validate)){var t=Mr(j.values,e),r=m.current[e].validate(t);return Nr(r)?(g({type:"SET_ISVALIDATING",payload:!0}),r.then(function(e){return e},function(e){return e}).then(function(t){g({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),g({type:"SET_ISVALIDATING",payload:!1})})):(g({type:"SET_FIELD_ERROR",payload:{field:e,value:r}}),Promise.resolve(r))}return Promise.resolve()}function k(e,t){return new Promise(function(r){var n=y.validate(e,t);void 0===n?r({}):Nr(n)?n.then(function(){r({})},function(e){r(e)}):r(n)})}function U(e,t){return new Promise(function(r){var n=y.validationSchema,o=xr(n)?n(t):n;(t&&o.validateAt?o.validateAt(t,e):Qr(e,o)).then(function(){r({})},function(e){r(Jr(e))})})}function x(e){if(null===m.current)return Promise.resolve({});var t=Object.keys(m.current).filter(function(e){return null!==m.current&&m.current[e]&&m.current[e].validate&&xr(m.current[e].validate)}),r=t.length>0?t.map(function(t){return r=t,n=Mr(e,t),new Promise(function(e){return e(m.current[r].validate(n))}).then(function(e){return e},function(e){return e});var r,n}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(r).then(function(e){return e.reduce(function(e,r,n){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===r?e:(r&&(e=kr(e,t[n],r)),e)},{})})}function D(e){return void 0===e&&(e=j.values),y.validationSchema||y.validate||m.current&&Object.keys(m.current).filter(function(e){return!!m.current[e].validate}).length>0?(g({type:"SET_ISVALIDATING",payload:!0}),Promise.all([x(e),y.validationSchema?U(e):{},y.validate?k(e):{}]).then(function(e){var t=h.all([e[0],e[1],e[2]],{arrayMerge:Xr});return s(j.errors,t)||g({type:"SET_ERRORS",payload:t}),g({type:"SET_ISVALIDATING",payload:!1}),t})):Promise.resolve({})}function V(e){xr(e)?g({type:"SET_FORMIK_STATE",payload:e(j)}):g({type:"SET_FORMIK_STATE",payload:e})}function $(e){g({type:"SET_STATUS",payload:e})}function L(e){g({type:"SET_ISSUBMITTING",payload:e})}function N(){return g({type:"SUBMIT_ATTEMPT"}),D().then(function(e){0===Object.keys(e).length?Promise.resolve(y.onSubmit(j.values,O)).then(function(){b.current&&g({type:"SUBMIT_SUCCESS"})}).catch(function(e){b.current&&g({type:"SUBMIT_FAILURE"})}):b.current&&g({type:"SUBMIT_FAILURE"})})}function B(e){return{value:Mr(j.values,e),error:Mr(j.errors,e),touched:!!Mr(j.touched,e),initialValue:Mr(v.current,e)}}var z=t.useMemo(function(){return!s(v.current,j.values)},[v.current,j.values]),W=t.useMemo(function(){return z?j.errors&&0===Object.keys(j.errors).length:!1!==l&&xr(l)?l(y):l},[j.errors,z,l]);return o({},j,{initialValues:v.current||y.initialValues,handleBlur:E,handleChange:A,handleReset:function(){if(y.onReset){var e=y.onReset(j.values,O);Nr(e)?e.then(T):T()}else T()},handleSubmit:function(e){e&&e.preventDefault&&e.preventDefault(),N()},resetForm:T,setErrors:w,setFormikState:V,setFieldTouched:C,setFieldValue:R,setFieldError:I,setStatus:$,setSubmitting:L,setTouched:F,setValues:P,submitForm:N,validateForm:D,validateField:M,isValid:W,dirty:z,unregisterField:function(e){null!==m.current&&delete m.current[e]},registerField:function(e,t){null!==m.current&&(m.current[e]={validate:t.validate})},getFieldProps:function(e,t){return[{name:e,value:!t||"radio"!==t&&"checkbox"!==t?Mr(j.values,e):void 0,onChange:A,onBlur:E},B(e)]},validateOnBlur:u,validateOnChange:n})}function Yr(e){var r=Kr(e),n=e.component,o=e.children,a=e.render;return t.createElement(Wr,{value:r},n?t.createElement(n,r):a?a(r):o?xr(o)?o(r):Lr(o)?null:t.Children.only(o):null)}function Jr(e){var t={};if(0===e.inner.length)return kr(t,e.path,e.message);for(var r=0,n=e.inner;r<n.length;r++){var o=n[r];t[o.path]||(t=kr(t,o.path,o.message))}return t}function Qr(e,t,r,n){void 0===r&&(r=!1),void 0===n&&(n={});var o={};for(var a in e)if(e.hasOwnProperty(a)){var i=String(a);o[i]=""!==e[i]?e[i]:void 0}return t[r?"validateSync":"validate"](o,{abortEarly:!1,context:n})}function Xr(e,t,r){var n=e.slice();return t.forEach(function(t,o){if(void 0===n[o]){var a=!1!==r.clone&&r.isMergeableObject(t);n[o]=a?h(Array.isArray(t)?[]:{},t,r):t}else r.isMergeableObject(t)?n[o]=h(e[o],t,r):-1===e.indexOf(t)&&n.push(t)}),n}function Zr(e){var r=e.validate,n=e.name,i=e.render,u=e.children,c=e.as,l=void 0===c?"input":c,s=e.component,f=a(e,["validate","name","render","children","as","component"]),p=Hr(),d=a(p,["validate","validationSchema"]);t.useEffect(function(){i&&u&&Lr(u)},[]),t.useEffect(function(){return d.registerField(n,{validate:r}),function(){d.unregisterField(n)}},[n,r]);var y=d.getFieldProps(n,f.type),v=y[0],h=y[1],b={field:v,form:d};if(i)return i(b);if(xr(u))return u(o({},b,{meta:h}));if(s){if("string"==typeof s){var m=f.innerRef,_=a(f,["innerRef"]);return t.createElement(s,o({ref:m},v,_),u)}return t.createElement(s,o({field:v,form:d},f),u)}if("string"==typeof l){m=f.innerRef,_=a(f,["innerRef"]);return t.createElement(l,o({ref:m},v,_),u)}return t.createElement(l,o({},v,f),u)}var en=Zr;function tn(e){var r=Hr();return t.createElement("form",o({onSubmit:r.handleSubmit,onReset:r.handleReset},e))}function rn(e,t){return e(t={exports:{}},t.exports),t.exports}tn.displayName="Form";var nn,on=rn(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,a=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,s=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116;function h(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case s:case f:case a:case u:case i:return e;default:switch(e=e&&e.$$typeof){case l:case p:case c:return e;default:return t}}case o:return t}}}function b(e){return h(e)===f}t.typeOf=h,t.AsyncMode=s,t.ConcurrentMode=f,t.ContextConsumer=l,t.ContextProvider=c,t.Element=n,t.ForwardRef=p,t.Fragment=a,t.Profiler=u,t.Portal=o,t.StrictMode=i,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===f||e===u||e===i||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===y||e.$$typeof===c||e.$$typeof===l||e.$$typeof===p)},t.isAsyncMode=function(e){return b(e)||h(e)===s},t.isConcurrentMode=b,t.isContextConsumer=function(e){return h(e)===l},t.isContextProvider=function(e){return h(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return h(e)===p},t.isFragment=function(e){return h(e)===a},t.isProfiler=function(e){return h(e)===u},t.isPortal=function(e){return h(e)===o},t.isStrictMode=function(e){return h(e)===i}});(nn=on)&&nn.__esModule&&Object.prototype.hasOwnProperty.call(nn,"default");var an=rn(function(e){e.exports=on}),un={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},cn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ln={};ln[an.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var sn=Object.defineProperty,fn=Object.getOwnPropertyNames,pn=Object.getOwnPropertySymbols,dn=Object.getOwnPropertyDescriptor,yn=Object.getPrototypeOf,vn=Object.prototype;var hn=function e(t,r,n){if("string"!=typeof r){if(vn){var o=yn(r);o&&o!==vn&&e(t,o,n)}var a=fn(r);pn&&(a=a.concat(pn(r)));for(var i=ln[t.$$typeof]||un,u=ln[r.$$typeof]||un,c=0;c<a.length;++c){var l=a[c];if(!(cn[l]||n&&n[l]||u&&u[l]||i&&i[l])){var s=dn(r,l);try{sn(t,l,s)}catch(e){}}}return t}return t};function bn(e){var r=function(r){return t.createElement(Gr,null,function(n){return t.createElement(e,o({},r,{formik:n}))})},n=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return r.WrappedComponent=e,r.displayName="FormikConnect("+n+")",hn(r,e)}var mn=function(e,t,r){var n=(e||[]).slice(),o=n[t];return n.splice(t,1),n.splice(r,0,o),n},_n=function(e,t,r){var n=(e||[]).slice(),o=n[t];return n[t]=n[r],n[r]=o,n},jn=function(e,t,r){var n=(e||[]).slice();return n.splice(t,0,r),n},gn=function(e,t,r){var n=(e||[]).slice();return n[t]=r,n},Sn=bn(function(e){function r(t){var r=e.call(this,t)||this;return r.updateArrayField=function(e,t,n){var a=r.props,i=a.name,u=a.validateOnChange,c=a.formik,l=c.validateForm;(0,c.setFormikState)(function(r){var a="function"==typeof n?n:e,u="function"==typeof t?t:e;return o({},r,{values:kr(r.values,i,e(Mr(r.values,i))),errors:n?kr(r.errors,i,a(Mr(r.errors,i))):r.errors,touched:t?kr(r.touched,i,u(Mr(r.touched,i))):r.touched})},function(){u&&l()})},r.push=function(e){return r.updateArrayField(function(t){return(t||[]).concat([dr(e)])},!1,!1)},r.handlePush=function(e){return function(){return r.push(e)}},r.swap=function(e,t){return r.updateArrayField(function(r){return _n(r,e,t)},!0,!0)},r.handleSwap=function(e,t){return function(){return r.swap(e,t)}},r.move=function(e,t){return r.updateArrayField(function(r){return mn(r,e,t)},!0,!0)},r.handleMove=function(e,t){return function(){return r.move(e,t)}},r.insert=function(e,t){return r.updateArrayField(function(r){return jn(r,e,t)},function(t){return jn(t,e,null)},function(t){return jn(t,e,null)})},r.handleInsert=function(e,t){return function(){return r.insert(e,t)}},r.replace=function(e,t){return r.updateArrayField(function(r){return gn(r,e,t)},!1,!1)},r.handleReplace=function(e,t){return function(){return r.replace(e,t)}},r.unshift=function(e){var t=-1;return r.updateArrayField(function(r){var n=r?[e].concat(r):[e];return t<0&&(t=n.length),n},function(e){var r=e?[null].concat(e):[null];return t<0&&(t=r.length),r},function(e){var r=e?[null].concat(e):[null];return t<0&&(t=r.length),r}),t},r.handleUnshift=function(e){return function(){return r.unshift(e)}},r.handleRemove=function(e){return function(){return r.remove(e)}},r.handlePop=function(){return function(){return r.pop()}},r.remove=r.remove.bind(r),r.pop=r.pop.bind(r),r}return n(r,e),r.prototype.remove=function(e){var t;return this.updateArrayField(function(r){var n=r?r.slice():[];return t||(t=n[e]),xr(n.splice)&&n.splice(e,1),n},!0,!0),t},r.prototype.pop=function(){var e;return this.updateArrayField(function(t){var r=t;return e||(e=r&&r.pop&&r.pop()),r},!0,!0),e},r.prototype.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},r=this.props,n=r.component,i=r.render,u=r.children,c=r.name,l=r.formik,s=a(l,["validate","validationSchema"]),f=o({},e,{form:s,name:c});return n?t.createElement(n,f):i?i(f):u?"function"==typeof u?u(f):Lr(u)?null:t.Children.only(u):null},r.defaultProps={validateOnChange:!0},r}(t.Component)),On=bn(function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return n(r,e),r.prototype.shouldComponentUpdate=function(e){return Mr(this.props.formik.errors,this.props.name)!==Mr(e.formik.errors,this.props.name)||Mr(this.props.formik.touched,this.props.name)!==Mr(e.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length},r.prototype.render=function(){var e=this.props,r=e.component,n=e.formik,o=e.render,i=e.children,u=e.name,c=a(e,["component","formik","render","children","name"]),l=Mr(n.touched,u),s=Mr(n.errors,u);return l&&s?o?xr(o)?o(s):null:i?xr(i)?i(s):null:r?t.createElement(r,c,s):s:null},r}(t.Component));e.useFormik=Kr,e.Formik=Yr,e.yupToFormErrors=Jr,e.validateYupSchema=Qr,e.useField=function(e,t){return Hr().getFieldProps(e,t)},e.Field=Zr,e.FastField=en,e.Form=tn,e.withFormik=function(e){var r=e.mapPropsToValues,i=void 0===r?function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&"function"!=typeof e[r]&&(t[r]=e[r]);return t}:r,u=a(e,["mapPropsToValues"]);return function(e){var r=e.displayName||e.name||e.constructor&&e.constructor.name||"Component",c=function(c){function l(){var r=null!==c&&c.apply(this,arguments)||this;return r.validate=function(e){return u.validate(e,r.props)},r.validationSchema=function(){return xr(u.validationSchema)?u.validationSchema(r.props):u.validationSchema},r.handleSubmit=function(e,t){return u.handleSubmit(e,o({},t,{props:r.props}))},r.renderFormComponent=function(n){return t.createElement(e,o({},r.props,n))},r}return n(l,c),l.prototype.render=function(){var e=this.props,r=a(e,["children"]);return t.createElement(Yr,o({},r,u,{validate:u.validate&&this.validate,validationSchema:u.validationSchema&&this.validationSchema,initialValues:i(this.props),initialStatus:u.mapPropsToStatus&&u.mapPropsToStatus(this.props),onSubmit:this.handleSubmit,render:this.renderFormComponent}))},l.displayName="WithFormik("+r+")",l}(t.Component);return hn(c,e)}},e.move=mn,e.swap=_n,e.insert=jn,e.replace=gn,e.FieldArray=Sn,e.getIn=Mr,e.setIn=kr,e.setNestedObjectValues=Ur,e.isFunction=xr,e.isObject=Dr,e.isInteger=Vr,e.isString=$r,e.isNaN=function(e){return e!=e},e.isEmptyChildren=Lr,e.isPromise=Nr,e.getActiveElement=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}},e.makeCancelable=Br,e.connect=bn,e.ErrorMessage=On,e.FormikProvider=Wr,e.FormikConsumer=Gr,e.useFormikContext=Hr,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=formik.umd.production.js.map
{
"name": "formik",
"description": "Forms in React, without tears",
"version": "2.0.1-alpha.1",
"version": "2.0.1-alpha.2",
"license": "MIT",

@@ -6,0 +6,0 @@ "author": "Jared Palmer <jared@palmer.net>",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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