%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/node_modules/formik/dist/
Upload File :
Create Path :
Current File : //var/www/html/node_modules/formik/dist/formik.cjs.development.js.map

{"version":3,"file":"formik.cjs.development.js","sources":["../src/utils.ts","../src/FormikContext.tsx","../src/Formik.tsx","../src/Field.tsx","../src/Form.tsx","../src/withFormik.tsx","../src/connect.tsx","../src/FieldArray.tsx","../src/ErrorMessage.tsx","../src/FastField.tsx"],"sourcesContent":["import clone from 'lodash/clone';\nimport toPath from 'lodash/toPath';\nimport * as React from 'react';\n\n// Assertions\n\n/** @private is the value an empty array? */\nexport const isEmptyArray = (value?: any) =>\n  Array.isArray(value) && value.length === 0;\n\n/** @private is the given object a Function? */\nexport const isFunction = (obj: any): obj is Function =>\n  typeof obj === 'function';\n\n/** @private is the given object an Object? */\nexport const isObject = (obj: any): obj is Object =>\n  obj !== null && typeof obj === 'object';\n\n/** @private is the given object an integer? */\nexport const isInteger = (obj: any): boolean =>\n  String(Math.floor(Number(obj))) === obj;\n\n/** @private is the given object a string? */\nexport const isString = (obj: any): obj is string =>\n  Object.prototype.toString.call(obj) === '[object String]';\n\n/** @private is the given object a NaN? */\n// eslint-disable-next-line no-self-compare\nexport const isNaN = (obj: any): boolean => obj !== obj;\n\n/** @private Does a React component have exactly 0 children? */\nexport const isEmptyChildren = (children: any): boolean =>\n  React.Children.count(children) === 0;\n\n/** @private is the given object/value a promise? */\nexport const isPromise = (value: any): value is PromiseLike<any> =>\n  isObject(value) && isFunction(value.then);\n\n/** @private is the given object/value a type of synthetic event? */\nexport const isInputEvent = (value: any): value is React.SyntheticEvent<any> =>\n  value && isObject(value) && isObject(value.target);\n\n/**\n * Same as document.activeElement but wraps in a try-catch block. In IE it is\n * not safe to call document.activeElement if there is nothing focused.\n *\n * The activeElement will be null only if the document or document body is not\n * yet defined.\n *\n * @param {?Document} doc Defaults to current document.\n * @return {Element | null}\n * @see https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/dom/getActiveElement.js\n */\nexport function getActiveElement(doc?: Document): Element | null {\n  doc = doc || (typeof document !== 'undefined' ? document : undefined);\n  if (typeof doc === 'undefined') {\n    return null;\n  }\n  try {\n    return doc.activeElement || doc.body;\n  } catch (e) {\n    return doc.body;\n  }\n}\n\n/**\n * Deeply get a value from an object via its path.\n */\nexport function getIn(\n  obj: any,\n  key: string | string[],\n  def?: any,\n  p: number = 0\n) {\n  const path = toPath(key);\n  while (obj && p < path.length) {\n    obj = obj[path[p++]];\n  }\n  return obj === undefined ? def : obj;\n}\n\n/**\n * Deeply set a value from in object via it's path. If the value at `path`\n * has changed, return a shallow copy of obj with `value` set at `path`.\n * If `value` has not changed, return the original `obj`.\n *\n * Existing objects / arrays along `path` are also shallow copied. Sibling\n * objects along path retain the same internal js reference. Since new\n * objects / arrays are only created along `path`, we can test if anything\n * changed in a nested structure by comparing the object's reference in\n * the old and new object, similar to how russian doll cache invalidation\n * works.\n *\n * In earlier versions of this function, which used cloneDeep, there were\n * issues whereby settings a nested value would mutate the parent\n * instead of creating a new object. `clone` avoids that bug making a\n * shallow copy of the objects along the update path\n * so no object is mutated in place.\n *\n * Before changing this function, please read through the following\n * discussions.\n *\n * @see https://github.com/developit/linkstate\n * @see https://github.com/jaredpalmer/formik/pull/123\n */\nexport function setIn(obj: any, path: string, value: any): any {\n  let res: any = clone(obj); // this keeps inheritance when obj is a class\n  let resVal: any = res;\n  let i = 0;\n  let pathArray = toPath(path);\n\n  for (; i < pathArray.length - 1; i++) {\n    const currentPath: string = pathArray[i];\n    let currentObj: any = getIn(obj, pathArray.slice(0, i + 1));\n\n    if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {\n      resVal = resVal[currentPath] = clone(currentObj);\n    } else {\n      const nextPath: string = pathArray[i + 1];\n      resVal = resVal[currentPath] =\n        isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n    }\n  }\n\n  // Return original object if new value is the same as current\n  if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n    return obj;\n  }\n\n  if (value === undefined) {\n    delete resVal[pathArray[i]];\n  } else {\n    resVal[pathArray[i]] = value;\n  }\n\n  // If the path array has a single element, the loop did not run.\n  // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n  if (i === 0 && value === undefined) {\n    delete res[pathArray[i]];\n  }\n\n  return res;\n}\n\n/**\n * Recursively a set the same value for all keys and arrays nested object, cloning\n * @param object\n * @param value\n * @param visited\n * @param response\n */\nexport function setNestedObjectValues<T>(\n  object: any,\n  value: any,\n  visited: any = new WeakMap(),\n  response: any = {}\n): T {\n  for (let k of Object.keys(object)) {\n    const val = object[k];\n    if (isObject(val)) {\n      if (!visited.get(val)) {\n        visited.set(val, true);\n        // In order to keep array values consistent for both dot path  and\n        // bracket syntax, we need to check if this is an array so that\n        // this will output  { friends: [true] } and not { friends: { \"0\": true } }\n        response[k] = Array.isArray(val) ? [] : {};\n        setNestedObjectValues(val, value, visited, response[k]);\n      }\n    } else {\n      response[k] = value;\n    }\n  }\n\n  return response;\n}\n","import * as React from 'react';\nimport { FormikContextType } from './types';\nimport invariant from 'tiny-warning';\n\nexport const FormikContext = React.createContext<FormikContextType<any>>(\n  undefined as any\n);\nFormikContext.displayName = 'FormikContext';\n\nexport const FormikProvider = FormikContext.Provider;\nexport const FormikConsumer = FormikContext.Consumer;\n\nexport function useFormikContext<Values>() {\n  const formik = React.useContext<FormikContextType<Values>>(FormikContext);\n\n  invariant(\n    !!formik,\n    `Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component.`\n  );\n\n  return formik;\n}\n","import * as React from 'react';\nimport isEqual from 'react-fast-compare';\nimport deepmerge from 'deepmerge';\nimport isPlainObject from 'lodash/isPlainObject';\nimport {\n  FormikConfig,\n  FormikErrors,\n  FormikState,\n  FormikTouched,\n  FormikValues,\n  FormikProps,\n  FieldMetaProps,\n  FieldHelperProps,\n  FieldInputProps,\n  FormikHelpers,\n  FormikHandlers,\n} from './types';\nimport {\n  isFunction,\n  isString,\n  setIn,\n  isEmptyChildren,\n  isPromise,\n  setNestedObjectValues,\n  getActiveElement,\n  getIn,\n  isObject,\n} from './utils';\nimport { FormikProvider } from './FormikContext';\nimport invariant from 'tiny-warning';\n\ntype FormikMessage<Values> =\n  | { type: 'SUBMIT_ATTEMPT' }\n  | { type: 'SUBMIT_FAILURE' }\n  | { type: 'SUBMIT_SUCCESS' }\n  | { type: 'SET_ISVALIDATING'; payload: boolean }\n  | { type: 'SET_ISSUBMITTING'; payload: boolean }\n  | { type: 'SET_VALUES'; payload: Values }\n  | { type: 'SET_FIELD_VALUE'; payload: { field: string; value?: any } }\n  | { type: 'SET_FIELD_TOUCHED'; payload: { field: string; value?: boolean } }\n  | { type: 'SET_FIELD_ERROR'; payload: { field: string; value?: string } }\n  | { type: 'SET_TOUCHED'; payload: FormikTouched<Values> }\n  | { type: 'SET_ERRORS'; payload: FormikErrors<Values> }\n  | { type: 'SET_STATUS'; payload: any }\n  | {\n      type: 'SET_FORMIK_STATE';\n      payload: (s: FormikState<Values>) => FormikState<Values>;\n    }\n  | {\n      type: 'RESET_FORM';\n      payload: FormikState<Values>;\n    };\n\n// State reducer\nfunction formikReducer<Values>(\n  state: FormikState<Values>,\n  msg: FormikMessage<Values>\n) {\n  switch (msg.type) {\n    case 'SET_VALUES':\n      return { ...state, values: msg.payload };\n    case 'SET_TOUCHED':\n      return { ...state, touched: msg.payload };\n    case 'SET_ERRORS':\n      if (isEqual(state.errors, msg.payload)) {\n        return state;\n      }\n\n      return { ...state, errors: msg.payload };\n    case 'SET_STATUS':\n      return { ...state, status: msg.payload };\n    case 'SET_ISSUBMITTING':\n      return { ...state, isSubmitting: msg.payload };\n    case 'SET_ISVALIDATING':\n      return { ...state, isValidating: msg.payload };\n    case 'SET_FIELD_VALUE':\n      return {\n        ...state,\n        values: setIn(state.values, msg.payload.field, msg.payload.value),\n      };\n    case 'SET_FIELD_TOUCHED':\n      return {\n        ...state,\n        touched: setIn(state.touched, msg.payload.field, msg.payload.value),\n      };\n    case 'SET_FIELD_ERROR':\n      return {\n        ...state,\n        errors: setIn(state.errors, msg.payload.field, msg.payload.value),\n      };\n    case 'RESET_FORM':\n      return { ...state, ...msg.payload };\n    case 'SET_FORMIK_STATE':\n      return msg.payload(state);\n    case 'SUBMIT_ATTEMPT':\n      return {\n        ...state,\n        touched: setNestedObjectValues<FormikTouched<Values>>(\n          state.values,\n          true\n        ),\n        isSubmitting: true,\n        submitCount: state.submitCount + 1,\n      };\n    case 'SUBMIT_FAILURE':\n      return {\n        ...state,\n        isSubmitting: false,\n      };\n    case 'SUBMIT_SUCCESS':\n      return {\n        ...state,\n        isSubmitting: false,\n      };\n    default:\n      return state;\n  }\n}\n\n// Initial empty states // objects\nconst emptyErrors: FormikErrors<unknown> = {};\nconst emptyTouched: FormikTouched<unknown> = {};\n\n// This is an object that contains a map of all registered fields\n// and their validate functions\ninterface FieldRegistry {\n  [field: string]: {\n    validate: (value: any) => string | Promise<string> | undefined;\n  };\n}\n\nexport function useFormik<Values extends FormikValues = FormikValues>({\n  validateOnChange = true,\n  validateOnBlur = true,\n  validateOnMount = false,\n  isInitialValid,\n  enableReinitialize = false,\n  onSubmit,\n  ...rest\n}: FormikConfig<Values>) {\n  const props = {\n    validateOnChange,\n    validateOnBlur,\n    validateOnMount,\n    onSubmit,\n    ...rest,\n  };\n  const initialValues = React.useRef(props.initialValues);\n  const initialErrors = React.useRef(props.initialErrors || emptyErrors);\n  const initialTouched = React.useRef(props.initialTouched || emptyTouched);\n  const initialStatus = React.useRef(props.initialStatus);\n  const isMounted = React.useRef<boolean>(false);\n  const fieldRegistry = React.useRef<FieldRegistry>({});\n  if (__DEV__) {\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    React.useEffect(() => {\n      invariant(\n        typeof isInitialValid === 'undefined',\n        'isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead.'\n      );\n      // eslint-disable-next-line\n    }, []);\n  }\n\n  React.useEffect(() => {\n    isMounted.current = true;\n\n    return () => {\n      isMounted.current = false;\n    };\n  }, []);\n\n  const [state, dispatch] = React.useReducer<\n    React.Reducer<FormikState<Values>, FormikMessage<Values>>\n  >(formikReducer, {\n    values: props.initialValues,\n    errors: props.initialErrors || emptyErrors,\n    touched: props.initialTouched || emptyTouched,\n    status: props.initialStatus,\n    isSubmitting: false,\n    isValidating: false,\n    submitCount: 0,\n  });\n\n  const runValidateHandler = React.useCallback(\n    (values: Values, field?: string): Promise<FormikErrors<Values>> => {\n      return new Promise((resolve, reject) => {\n        const maybePromisedErrors = (props.validate as any)(values, field);\n        if (maybePromisedErrors == null) {\n          // use loose null check here on purpose\n          resolve(emptyErrors);\n        } else if (isPromise(maybePromisedErrors)) {\n          (maybePromisedErrors as Promise<any>).then(\n            errors => {\n              resolve(errors || emptyErrors);\n            },\n            actualException => {\n              if (process.env.NODE_ENV !== 'production') {\n                console.warn(\n                  `Warning: An unhandled error was caught during validation in <Formik validate />`,\n                  actualException\n                );\n              }\n\n              reject(actualException);\n            }\n          );\n        } else {\n          resolve(maybePromisedErrors);\n        }\n      });\n    },\n    [props.validate]\n  );\n\n  /**\n   * Run validation against a Yup schema and optionally run a function if successful\n   */\n  const runValidationSchema = React.useCallback(\n    (values: Values, field?: string): Promise<FormikErrors<Values>> => {\n      const validationSchema = props.validationSchema;\n      const schema = isFunction(validationSchema)\n        ? validationSchema(field)\n        : validationSchema;\n      const promise =\n        field && schema.validateAt\n          ? schema.validateAt(field, values)\n          : validateYupSchema(values, schema);\n      return new Promise((resolve, reject) => {\n        promise.then(\n          () => {\n            resolve(emptyErrors);\n          },\n          (err: any) => {\n            // Yup will throw a validation error if validation fails. We catch those and\n            // resolve them into Formik errors. We can sniff if something is a Yup error\n            // by checking error.name.\n            // @see https://github.com/jquense/yup#validationerrorerrors-string--arraystring-value-any-path-string\n            if (err.name === 'ValidationError') {\n              resolve(yupToFormErrors(err));\n            } else {\n              // We throw any other errors\n              if (process.env.NODE_ENV !== 'production') {\n                console.warn(\n                  `Warning: An unhandled error was caught during validation in <Formik validationSchema />`,\n                  err\n                );\n              }\n\n              reject(err);\n            }\n          }\n        );\n      });\n    },\n    [props.validationSchema]\n  );\n\n  const runSingleFieldLevelValidation = React.useCallback(\n    (field: string, value: void | string): Promise<string> => {\n      return new Promise(resolve =>\n        resolve(fieldRegistry.current[field].validate(value) as string)\n      );\n    },\n    []\n  );\n\n  const runFieldLevelValidations = React.useCallback(\n    (values: Values): Promise<FormikErrors<Values>> => {\n      const fieldKeysWithValidation: string[] = Object.keys(\n        fieldRegistry.current\n      ).filter(f => isFunction(fieldRegistry.current[f].validate));\n\n      // Construct an array with all of the field validation functions\n      const fieldValidations: Promise<string>[] =\n        fieldKeysWithValidation.length > 0\n          ? fieldKeysWithValidation.map(f =>\n              runSingleFieldLevelValidation(f, getIn(values, f))\n            )\n          : [Promise.resolve('DO_NOT_DELETE_YOU_WILL_BE_FIRED')]; // use special case ;)\n\n      return Promise.all(fieldValidations).then((fieldErrorsList: string[]) =>\n        fieldErrorsList.reduce((prev, curr, index) => {\n          if (curr === 'DO_NOT_DELETE_YOU_WILL_BE_FIRED') {\n            return prev;\n          }\n          if (curr) {\n            prev = setIn(prev, fieldKeysWithValidation[index], curr);\n          }\n          return prev;\n        }, {})\n      );\n    },\n    [runSingleFieldLevelValidation]\n  );\n\n  // Run all validations and return the result\n  const runAllValidations = React.useCallback(\n    (values: Values) => {\n      return Promise.all([\n        runFieldLevelValidations(values),\n        props.validationSchema ? runValidationSchema(values) : {},\n        props.validate ? runValidateHandler(values) : {},\n      ]).then(([fieldErrors, schemaErrors, validateErrors]) => {\n        const combinedErrors = deepmerge.all<FormikErrors<Values>>(\n          [fieldErrors, schemaErrors, validateErrors],\n          { arrayMerge }\n        );\n        return combinedErrors;\n      });\n    },\n    [\n      props.validate,\n      props.validationSchema,\n      runFieldLevelValidations,\n      runValidateHandler,\n      runValidationSchema,\n    ]\n  );\n\n  // Run all validations methods and update state accordingly\n  const validateFormWithHighPriority = useEventCallback(\n    (values: Values = state.values) => {\n      dispatch({ type: 'SET_ISVALIDATING', payload: true });\n      return runAllValidations(values).then(combinedErrors => {\n        if (!!isMounted.current) {\n          dispatch({ type: 'SET_ISVALIDATING', payload: false });\n          dispatch({ type: 'SET_ERRORS', payload: combinedErrors });\n        }\n        return combinedErrors;\n      });\n    }\n  );\n\n  React.useEffect(() => {\n    if (\n      validateOnMount &&\n      isMounted.current === true &&\n      isEqual(initialValues.current, props.initialValues)\n    ) {\n      validateFormWithHighPriority(initialValues.current);\n    }\n  }, [validateOnMount, validateFormWithHighPriority]);\n\n  const resetForm = React.useCallback(\n    (nextState?: Partial<FormikState<Values>>) => {\n      const values =\n        nextState && nextState.values\n          ? nextState.values\n          : initialValues.current;\n      const errors =\n        nextState && nextState.errors\n          ? nextState.errors\n          : initialErrors.current\n          ? initialErrors.current\n          : props.initialErrors || {};\n      const touched =\n        nextState && nextState.touched\n          ? nextState.touched\n          : initialTouched.current\n          ? initialTouched.current\n          : props.initialTouched || {};\n      const status =\n        nextState && nextState.status\n          ? nextState.status\n          : initialStatus.current\n          ? initialStatus.current\n          : props.initialStatus;\n      initialValues.current = values;\n      initialErrors.current = errors;\n      initialTouched.current = touched;\n      initialStatus.current = status;\n\n      const dispatchFn = () => {\n        dispatch({\n          type: 'RESET_FORM',\n          payload: {\n            isSubmitting: !!nextState && !!nextState.isSubmitting,\n            errors,\n            touched,\n            status,\n            values,\n            isValidating: !!nextState && !!nextState.isValidating,\n            submitCount:\n              !!nextState &&\n              !!nextState.submitCount &&\n              typeof nextState.submitCount === 'number'\n                ? nextState.submitCount\n                : 0,\n          },\n        });\n      };\n\n      if (props.onReset) {\n        const maybePromisedOnReset = (props.onReset as any)(\n          state.values,\n          imperativeMethods\n        );\n\n        if (isPromise(maybePromisedOnReset)) {\n          (maybePromisedOnReset as Promise<any>).then(dispatchFn);\n        } else {\n          dispatchFn();\n        }\n      } else {\n        dispatchFn();\n      }\n    },\n    [props.initialErrors, props.initialStatus, props.initialTouched]\n  );\n\n  React.useEffect(() => {\n    if (\n      isMounted.current === true &&\n      !isEqual(initialValues.current, props.initialValues)\n    ) {\n      if (enableReinitialize) {\n        initialValues.current = props.initialValues;\n        resetForm();\n      }\n\n      if (validateOnMount) {\n        validateFormWithHighPriority(initialValues.current);\n      }\n    }\n  }, [\n    enableReinitialize,\n    props.initialValues,\n    resetForm,\n    validateOnMount,\n    validateFormWithHighPriority,\n  ]);\n\n  React.useEffect(() => {\n    if (\n      enableReinitialize &&\n      isMounted.current === true &&\n      !isEqual(initialErrors.current, props.initialErrors)\n    ) {\n      initialErrors.current = props.initialErrors || emptyErrors;\n      dispatch({\n        type: 'SET_ERRORS',\n        payload: props.initialErrors || emptyErrors,\n      });\n    }\n  }, [enableReinitialize, props.initialErrors]);\n\n  React.useEffect(() => {\n    if (\n      enableReinitialize &&\n      isMounted.current === true &&\n      !isEqual(initialTouched.current, props.initialTouched)\n    ) {\n      initialTouched.current = props.initialTouched || emptyTouched;\n      dispatch({\n        type: 'SET_TOUCHED',\n        payload: props.initialTouched || emptyTouched,\n      });\n    }\n  }, [enableReinitialize, props.initialTouched]);\n\n  React.useEffect(() => {\n    if (\n      enableReinitialize &&\n      isMounted.current === true &&\n      !isEqual(initialStatus.current, props.initialStatus)\n    ) {\n      initialStatus.current = props.initialStatus;\n      dispatch({\n        type: 'SET_STATUS',\n        payload: props.initialStatus,\n      });\n    }\n  }, [enableReinitialize, props.initialStatus, props.initialTouched]);\n\n  const validateField = useEventCallback((name: string) => {\n    // This will efficiently validate a single field by avoiding state\n    // changes if the validation function is synchronous. It's different from\n    // what is called when using validateForm.\n\n    if (\n      fieldRegistry.current[name] &&\n      isFunction(fieldRegistry.current[name].validate)\n    ) {\n      const value = getIn(state.values, name);\n      const maybePromise = fieldRegistry.current[name].validate(value);\n      if (isPromise(maybePromise)) {\n        // Only flip isValidating if the function is async.\n        dispatch({ type: 'SET_ISVALIDATING', payload: true });\n        return maybePromise\n          .then((x: any) => x)\n          .then((error: string) => {\n            dispatch({\n              type: 'SET_FIELD_ERROR',\n              payload: { field: name, value: error },\n            });\n            dispatch({ type: 'SET_ISVALIDATING', payload: false });\n          });\n      } else {\n        dispatch({\n          type: 'SET_FIELD_ERROR',\n          payload: {\n            field: name,\n            value: maybePromise as string | undefined,\n          },\n        });\n        return Promise.resolve(maybePromise as string | undefined);\n      }\n    } else if (props.validationSchema) {\n      dispatch({ type: 'SET_ISVALIDATING', payload: true });\n      return runValidationSchema(state.values, name)\n        .then((x: any) => x)\n        .then((error: any) => {\n          dispatch({\n            type: 'SET_FIELD_ERROR',\n            payload: { field: name, value: error[name] },\n          });\n          dispatch({ type: 'SET_ISVALIDATING', payload: false });\n        });\n    }\n\n    return Promise.resolve();\n  });\n\n  const registerField = React.useCallback((name: string, { validate }: any) => {\n    fieldRegistry.current[name] = {\n      validate,\n    };\n  }, []);\n\n  const unregisterField = React.useCallback((name: string) => {\n    delete fieldRegistry.current[name];\n  }, []);\n\n  const setTouched = useEventCallback(\n    (touched: FormikTouched<Values>, shouldValidate?: boolean) => {\n      dispatch({ type: 'SET_TOUCHED', payload: touched });\n      const willValidate =\n        shouldValidate === undefined ? validateOnBlur : shouldValidate;\n      return willValidate\n        ? validateFormWithHighPriority(state.values)\n        : Promise.resolve();\n    }\n  );\n\n  const setErrors = React.useCallback((errors: FormikErrors<Values>) => {\n    dispatch({ type: 'SET_ERRORS', payload: errors });\n  }, []);\n\n  const setValues = useEventCallback(\n    (values: React.SetStateAction<Values>, shouldValidate?: boolean) => {\n      const resolvedValues = isFunction(values) ? values(state.values) : values;\n\n      dispatch({ type: 'SET_VALUES', payload: resolvedValues });\n      const willValidate =\n        shouldValidate === undefined ? validateOnChange : shouldValidate;\n      return willValidate\n        ? validateFormWithHighPriority(resolvedValues)\n        : Promise.resolve();\n    }\n  );\n\n  const setFieldError = React.useCallback(\n    (field: string, value: string | undefined) => {\n      dispatch({\n        type: 'SET_FIELD_ERROR',\n        payload: { field, value },\n      });\n    },\n    []\n  );\n\n  const setFieldValue = useEventCallback(\n    (field: string, value: any, shouldValidate?: boolean) => {\n      dispatch({\n        type: 'SET_FIELD_VALUE',\n        payload: {\n          field,\n          value,\n        },\n      });\n      const willValidate =\n        shouldValidate === undefined ? validateOnChange : shouldValidate;\n      return willValidate\n        ? validateFormWithHighPriority(setIn(state.values, field, value))\n        : Promise.resolve();\n    }\n  );\n\n  const executeChange = React.useCallback(\n    (eventOrTextValue: string | React.ChangeEvent<any>, maybePath?: string) => {\n      // By default, assume that the first argument is a string. This allows us to use\n      // handleChange with React Native and React Native Web's onChangeText prop which\n      // provides just the value of the input.\n      let field = maybePath;\n      let val = eventOrTextValue;\n      let parsed;\n      // If the first argument is not a string though, it has to be a synthetic React Event (or a fake one),\n      // so we handle like we would a normal HTML change event.\n      if (!isString(eventOrTextValue)) {\n        // If we can, persist the event\n        // @see https://reactjs.org/docs/events.html#event-pooling\n        if ((eventOrTextValue as any).persist) {\n          (eventOrTextValue as React.ChangeEvent<any>).persist();\n        }\n        const target = eventOrTextValue.target\n          ? (eventOrTextValue as React.ChangeEvent<any>).target\n          : (eventOrTextValue as React.ChangeEvent<any>).currentTarget;\n\n        const {\n          type,\n          name,\n          id,\n          value,\n          checked,\n          outerHTML,\n          options,\n          multiple,\n        } = target;\n\n        field = maybePath ? maybePath : name ? name : id;\n        if (!field && __DEV__) {\n          warnAboutMissingIdentifier({\n            htmlContent: outerHTML,\n            documentationAnchorLink: 'handlechange-e-reactchangeeventany--void',\n            handlerName: 'handleChange',\n          });\n        }\n        val = /number|range/.test(type)\n          ? ((parsed = parseFloat(value)), isNaN(parsed) ? '' : parsed)\n          : /checkbox/.test(type) // checkboxes\n          ? getValueForCheckbox(getIn(state.values, field!), checked, value)\n          : options && multiple // <select multiple>\n          ? getSelectedValues(options)\n          : value;\n      }\n\n      if (field) {\n        // Set form fields by name\n        setFieldValue(field, val);\n      }\n    },\n    [setFieldValue, state.values]\n  );\n\n  const handleChange = useEventCallback<FormikHandlers['handleChange']>(\n    (\n      eventOrPath: string | React.ChangeEvent<any>\n    ): void | ((eventOrTextValue: string | React.ChangeEvent<any>) => void) => {\n      if (isString(eventOrPath)) {\n        return event => executeChange(event, eventOrPath);\n      } else {\n        executeChange(eventOrPath);\n      }\n    }\n  );\n\n  const setFieldTouched = useEventCallback(\n    (field: string, touched: boolean = true, shouldValidate?: boolean) => {\n      dispatch({\n        type: 'SET_FIELD_TOUCHED',\n        payload: {\n          field,\n          value: touched,\n        },\n      });\n      const willValidate =\n        shouldValidate === undefined ? validateOnBlur : shouldValidate;\n      return willValidate\n        ? validateFormWithHighPriority(state.values)\n        : Promise.resolve();\n    }\n  );\n\n  const executeBlur = React.useCallback(\n    (e: any, path?: string) => {\n      if (e.persist) {\n        e.persist();\n      }\n      const { name, id, outerHTML } = e.target;\n      const field = path ? path : name ? name : id;\n\n      if (!field && __DEV__) {\n        warnAboutMissingIdentifier({\n          htmlContent: outerHTML,\n          documentationAnchorLink: 'handleblur-e-any--void',\n          handlerName: 'handleBlur',\n        });\n      }\n\n      setFieldTouched(field, true);\n    },\n    [setFieldTouched]\n  );\n\n  const handleBlur = useEventCallback<FormikHandlers['handleBlur']>(\n    (eventOrString: any): void | ((e: any) => void) => {\n      if (isString(eventOrString)) {\n        return event => executeBlur(event, eventOrString);\n      } else {\n        executeBlur(eventOrString);\n      }\n    }\n  );\n\n  const setFormikState = React.useCallback(\n    (\n      stateOrCb:\n        | FormikState<Values>\n        | ((state: FormikState<Values>) => FormikState<Values>)\n    ): void => {\n      if (isFunction(stateOrCb)) {\n        dispatch({ type: 'SET_FORMIK_STATE', payload: stateOrCb });\n      } else {\n        dispatch({ type: 'SET_FORMIK_STATE', payload: () => stateOrCb });\n      }\n    },\n    []\n  );\n\n  const setStatus = React.useCallback((status: any) => {\n    dispatch({ type: 'SET_STATUS', payload: status });\n  }, []);\n\n  const setSubmitting = React.useCallback((isSubmitting: boolean) => {\n    dispatch({ type: 'SET_ISSUBMITTING', payload: isSubmitting });\n  }, []);\n\n  const submitForm = useEventCallback(() => {\n    dispatch({ type: 'SUBMIT_ATTEMPT' });\n    return validateFormWithHighPriority().then(\n      (combinedErrors: FormikErrors<Values>) => {\n        // In case an error was thrown and passed to the resolved Promise,\n        // `combinedErrors` can be an instance of an Error. We need to check\n        // that and abort the submit.\n        // If we don't do that, calling `Object.keys(new Error())` yields an\n        // empty array, which causes the validation to pass and the form\n        // to be submitted.\n\n        const isInstanceOfError = combinedErrors instanceof Error;\n        const isActuallyValid =\n          !isInstanceOfError && Object.keys(combinedErrors).length === 0;\n        if (isActuallyValid) {\n          // Proceed with submit...\n          //\n          // To respect sync submit fns, we can't simply wrap executeSubmit in a promise and\n          // _always_ dispatch SUBMIT_SUCCESS because isSubmitting would then always be false.\n          // This would be fine in simple cases, but make it impossible to disable submit\n          // buttons where people use callbacks or promises as side effects (which is basically\n          // all of v1 Formik code). Instead, recall that we are inside of a promise chain already,\n          //  so we can try/catch executeSubmit(), if it returns undefined, then just bail.\n          // If there are errors, throw em. Otherwise, wrap executeSubmit in a promise and handle\n          // cleanup of isSubmitting on behalf of the consumer.\n          let promiseOrUndefined;\n          try {\n            promiseOrUndefined = executeSubmit();\n            // Bail if it's sync, consumer is responsible for cleaning up\n            // via setSubmitting(false)\n            if (promiseOrUndefined === undefined) {\n              return;\n            }\n          } catch (error) {\n            throw error;\n          }\n\n          return Promise.resolve(promiseOrUndefined)\n            .then(result => {\n              if (!!isMounted.current) {\n                dispatch({ type: 'SUBMIT_SUCCESS' });\n              }\n              return result;\n            })\n            .catch(_errors => {\n              if (!!isMounted.current) {\n                dispatch({ type: 'SUBMIT_FAILURE' });\n                // This is a legit error rejected by the onSubmit fn\n                // so we don't want to break the promise chain\n                throw _errors;\n              }\n            });\n        } else if (!!isMounted.current) {\n          // ^^^ Make sure Formik is still mounted before updating state\n          dispatch({ type: 'SUBMIT_FAILURE' });\n          // throw combinedErrors;\n          if (isInstanceOfError) {\n            throw combinedErrors;\n          }\n        }\n        return;\n      }\n    );\n  });\n\n  const handleSubmit = useEventCallback(\n    (e?: React.FormEvent<HTMLFormElement>) => {\n      if (e && e.preventDefault && isFunction(e.preventDefault)) {\n        e.preventDefault();\n      }\n\n      if (e && e.stopPropagation && isFunction(e.stopPropagation)) {\n        e.stopPropagation();\n      }\n\n      // Warn if form submission is triggered by a <button> without a\n      // specified `type` attribute during development. This mitigates\n      // a common gotcha in forms with both reset and submit buttons,\n      // where the dev forgets to add type=\"button\" to the reset button.\n      if (__DEV__ && typeof document !== 'undefined') {\n        // Safely get the active element (works with IE)\n        const activeElement = getActiveElement();\n        if (\n          activeElement !== null &&\n          activeElement instanceof HTMLButtonElement\n        ) {\n          invariant(\n            activeElement.attributes &&\n              activeElement.attributes.getNamedItem('type'),\n            '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\"`.'\n          );\n        }\n      }\n\n      submitForm().catch(reason => {\n        console.warn(\n          `Warning: An unhandled error was caught from submitForm()`,\n          reason\n        );\n      });\n    }\n  );\n\n  const imperativeMethods: FormikHelpers<Values> = {\n    resetForm,\n    validateForm: validateFormWithHighPriority,\n    validateField,\n    setErrors,\n    setFieldError,\n    setFieldTouched,\n    setFieldValue,\n    setStatus,\n    setSubmitting,\n    setTouched,\n    setValues,\n    setFormikState,\n    submitForm,\n  };\n\n  const executeSubmit = useEventCallback(() => {\n    return onSubmit(state.values, imperativeMethods);\n  });\n\n  const handleReset = useEventCallback(e => {\n    if (e && e.preventDefault && isFunction(e.preventDefault)) {\n      e.preventDefault();\n    }\n\n    if (e && e.stopPropagation && isFunction(e.stopPropagation)) {\n      e.stopPropagation();\n    }\n\n    resetForm();\n  });\n\n  const getFieldMeta = React.useCallback(\n    (name: string): FieldMetaProps<any> => {\n      return {\n        value: getIn(state.values, name),\n        error: getIn(state.errors, name),\n        touched: !!getIn(state.touched, name),\n        initialValue: getIn(initialValues.current, name),\n        initialTouched: !!getIn(initialTouched.current, name),\n        initialError: getIn(initialErrors.current, name),\n      };\n    },\n    [state.errors, state.touched, state.values]\n  );\n\n  const getFieldHelpers = React.useCallback(\n    (name: string): FieldHelperProps<any> => {\n      return {\n        setValue: (value: any, shouldValidate?: boolean) =>\n          setFieldValue(name, value, shouldValidate),\n        setTouched: (value: boolean, shouldValidate?: boolean) =>\n          setFieldTouched(name, value, shouldValidate),\n        setError: (value: any) => setFieldError(name, value),\n      };\n    },\n    [setFieldValue, setFieldTouched, setFieldError]\n  );\n\n  const getFieldProps = React.useCallback(\n    (nameOrOptions): FieldInputProps<any> => {\n      const isAnObject = isObject(nameOrOptions);\n      const name = isAnObject ? nameOrOptions.name : nameOrOptions;\n      const valueState = getIn(state.values, name);\n\n      const field: FieldInputProps<any> = {\n        name,\n        value: valueState,\n        onChange: handleChange,\n        onBlur: handleBlur,\n      };\n      if (isAnObject) {\n        const {\n          type,\n          value: valueProp, // value is special for checkboxes\n          as: is,\n          multiple,\n        } = nameOrOptions;\n\n        if (type === 'checkbox') {\n          if (valueProp === undefined) {\n            field.checked = !!valueState;\n          } else {\n            field.checked = !!(\n              Array.isArray(valueState) && ~valueState.indexOf(valueProp)\n            );\n            field.value = valueProp;\n          }\n        } else if (type === 'radio') {\n          field.checked = valueState === valueProp;\n          field.value = valueProp;\n        } else if (is === 'select' && multiple) {\n          field.value = field.value || [];\n          field.multiple = true;\n        }\n      }\n      return field;\n    },\n    [handleBlur, handleChange, state.values]\n  );\n\n  const dirty = React.useMemo(\n    () => !isEqual(initialValues.current, state.values),\n    [initialValues.current, state.values]\n  );\n\n  const isValid = React.useMemo(\n    () =>\n      typeof isInitialValid !== 'undefined'\n        ? dirty\n          ? state.errors && Object.keys(state.errors).length === 0\n          : isInitialValid !== false && isFunction(isInitialValid)\n          ? (isInitialValid as (props: FormikConfig<Values>) => boolean)(props)\n          : (isInitialValid as boolean)\n        : state.errors && Object.keys(state.errors).length === 0,\n    [isInitialValid, dirty, state.errors, props]\n  );\n\n  const ctx = {\n    ...state,\n    initialValues: initialValues.current,\n    initialErrors: initialErrors.current,\n    initialTouched: initialTouched.current,\n    initialStatus: initialStatus.current,\n    handleBlur,\n    handleChange,\n    handleReset,\n    handleSubmit,\n    resetForm,\n    setErrors,\n    setFormikState,\n    setFieldTouched,\n    setFieldValue,\n    setFieldError,\n    setStatus,\n    setSubmitting,\n    setTouched,\n    setValues,\n    submitForm,\n    validateForm: validateFormWithHighPriority,\n    validateField,\n    isValid,\n    dirty,\n    unregisterField,\n    registerField,\n    getFieldProps,\n    getFieldMeta,\n    getFieldHelpers,\n    validateOnBlur,\n    validateOnChange,\n    validateOnMount,\n  };\n\n  return ctx;\n}\n\nexport function Formik<\n  Values extends FormikValues = FormikValues,\n  ExtraProps = {}\n>(props: FormikConfig<Values> & ExtraProps) {\n  const formikbag = useFormik<Values>(props);\n  const { component, children, render, innerRef } = props;\n\n  // This allows folks to pass a ref to <Formik />\n  React.useImperativeHandle(innerRef, () => formikbag);\n\n  if (__DEV__) {\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    React.useEffect(() => {\n      invariant(\n        !props.render,\n        `<Formik 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 <Formik render={(props) => ...} /> with <Formik>{(props) => ...}</Formik>`\n      );\n      // eslint-disable-next-line\n    }, []);\n  }\n  return (\n    <FormikProvider value={formikbag}>\n      {component\n        ? React.createElement(component as any, formikbag)\n        : render\n        ? render(formikbag)\n        : children // children come last, always called\n        ? isFunction(children)\n          ? (children as (bag: FormikProps<Values>) => React.ReactNode)(\n              formikbag as FormikProps<Values>\n            )\n          : !isEmptyChildren(children)\n          ? React.Children.only(children)\n          : null\n        : null}\n    </FormikProvider>\n  );\n}\n\nfunction warnAboutMissingIdentifier({\n  htmlContent,\n  documentationAnchorLink,\n  handlerName,\n}: {\n  htmlContent: string;\n  documentationAnchorLink: string;\n  handlerName: string;\n}) {\n  console.warn(\n    `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://formik.org/docs/api/formik#${documentationAnchorLink}\n  `\n  );\n}\n\n/**\n * Transform Yup ValidationError to a more usable object\n */\nexport function yupToFormErrors<Values>(yupError: any): FormikErrors<Values> {\n  let errors: FormikErrors<Values> = {};\n  if (yupError.inner) {\n    if (yupError.inner.length === 0) {\n      return setIn(errors, yupError.path, yupError.message);\n    }\n    for (let err of yupError.inner) {\n      if (!getIn(errors, err.path)) {\n        errors = setIn(errors, err.path, err.message);\n      }\n    }\n  }\n  return errors;\n}\n\n/**\n * Validate a yup schema.\n */\nexport function validateYupSchema<T extends FormikValues>(\n  values: T,\n  schema: any,\n  sync: boolean = false,\n  context: any = {}\n): Promise<Partial<T>> {\n  const validateData: FormikValues = prepareDataForValidation(values);\n  return schema[sync ? 'validateSync' : 'validate'](validateData, {\n    abortEarly: false,\n    context: context,\n  });\n}\n\n/**\n * Recursively prepare values.\n */\nexport function prepareDataForValidation<T extends FormikValues>(\n  values: T\n): FormikValues {\n  let data: FormikValues = Array.isArray(values) ? [] : {};\n  for (let k in values) {\n    if (Object.prototype.hasOwnProperty.call(values, k)) {\n      const key = String(k);\n      if (Array.isArray(values[key]) === true) {\n        data[key] = values[key].map((value: any) => {\n          if (Array.isArray(value) === true || isPlainObject(value)) {\n            return prepareDataForValidation(value);\n          } else {\n            return value !== '' ? value : undefined;\n          }\n        });\n      } else if (isPlainObject(values[key])) {\n        data[key] = prepareDataForValidation(values[key]);\n      } else {\n        data[key] = values[key] !== '' ? values[key] : undefined;\n      }\n    }\n  }\n  return data;\n}\n\n/**\n * deepmerge array merging algorithm\n * https://github.com/KyleAMathews/deepmerge#combine-array\n */\nfunction arrayMerge(target: any[], source: any[], options: any): any[] {\n  const destination = target.slice();\n\n  source.forEach(function merge(e: any, i: number) {\n    if (typeof destination[i] === 'undefined') {\n      const cloneRequested = options.clone !== false;\n      const shouldClone = cloneRequested && options.isMergeableObject(e);\n      destination[i] = shouldClone\n        ? deepmerge(Array.isArray(e) ? [] : {}, e, options)\n        : e;\n    } else if (options.isMergeableObject(e)) {\n      destination[i] = deepmerge(target[i], e, options);\n    } else if (target.indexOf(e) === -1) {\n      destination.push(e);\n    }\n  });\n  return destination;\n}\n\n/** Return multi select values based on an array of options */\nfunction getSelectedValues(options: any[]) {\n  return Array.from(options)\n    .filter(el => el.selected)\n    .map(el => el.value);\n}\n\n/** Return the next value for a checkbox */\nfunction getValueForCheckbox(\n  currentValue: string | any[],\n  checked: boolean,\n  valueProp: any\n) {\n  // If the current value was a boolean, return a boolean\n  if (typeof currentValue === 'boolean') {\n    return Boolean(checked);\n  }\n\n  // If the currentValue was not a boolean we want to return an array\n  let currentArrayOfValues = [];\n  let isValueInArray = false;\n  let index = -1;\n\n  if (!Array.isArray(currentValue)) {\n    // eslint-disable-next-line eqeqeq\n    if (!valueProp || valueProp == 'true' || valueProp == 'false') {\n      return Boolean(checked);\n    }\n  } else {\n    // If the current value is already an array, use it\n    currentArrayOfValues = currentValue;\n    index = currentValue.indexOf(valueProp);\n    isValueInArray = index >= 0;\n  }\n\n  // If the checkbox was checked and the value is not already present in the aray we want to add the new value to the array of values\n  if (checked && valueProp && !isValueInArray) {\n    return currentArrayOfValues.concat(valueProp);\n  }\n\n  // If the checkbox was unchecked and the value is not in the array, simply return the already existing array of values\n  if (!isValueInArray) {\n    return currentArrayOfValues;\n  }\n\n  // If the checkbox was unchecked and the value is in the array, remove the value and return the array\n  return currentArrayOfValues\n    .slice(0, index)\n    .concat(currentArrayOfValues.slice(index + 1));\n}\n\n// React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser.\n// @see https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\nconst useIsomorphicLayoutEffect =\n  typeof window !== 'undefined' &&\n  typeof window.document !== 'undefined' &&\n  typeof window.document.createElement !== 'undefined'\n    ? React.useLayoutEffect\n    : React.useEffect;\n\nfunction useEventCallback<T extends (...args: any[]) => any>(fn: T): T {\n  const ref: any = React.useRef(fn);\n\n  // we copy a ref to the callback scoped to the current state/props on each render\n  useIsomorphicLayoutEffect(() => {\n    ref.current = fn;\n  });\n\n  return React.useCallback(\n    (...args: any[]) => ref.current.apply(void 0, args),\n    []\n  ) as T;\n}\n","import * as React from 'react';\nimport {\n  FormikProps,\n  GenericFieldHTMLAttributes,\n  FieldMetaProps,\n  FieldHelperProps,\n  FieldInputProps,\n  FieldValidator,\n} from './types';\nimport { useFormikContext } from './FormikContext';\nimport { isFunction, isEmptyChildren, isObject } from './utils';\nimport invariant from 'tiny-warning';\n\nexport interface FieldProps<V = any, FormValues = any> {\n  field: FieldInputProps<V>;\n  form: FormikProps<FormValues>; // if ppl want to restrict this for a given form, let them.\n  meta: FieldMetaProps<V>;\n}\n\nexport interface FieldConfig<V = any> {\n  /**\n   * Field component to render. Can either be a string like 'select' or a component.\n   */\n  component?:\n    | string\n    | React.ComponentType<FieldProps<V>>\n    | React.ComponentType\n    | React.ForwardRefExoticComponent<any>;\n\n  /**\n   * Component to render. Can either be a string e.g. 'select', 'input', or 'textarea', or a component.\n   */\n  as?:\n    | React.ComponentType<FieldProps<V>['field']>\n    | string\n    | React.ComponentType\n    | React.ForwardRefExoticComponent<any>;\n\n  /**\n   * Render prop (works like React router's <Route render={props =>} />)\n   * @deprecated\n   */\n  render?: (props: FieldProps<V>) => React.ReactNode;\n\n  /**\n   * Children render function <Field name>{props => ...}</Field>)\n   */\n  children?: ((props: FieldProps<V>) => React.ReactNode) | React.ReactNode;\n\n  /**\n   * Validate a single field value independently\n   */\n  validate?: FieldValidator;\n\n  /**\n   * Field name\n   */\n  name: string;\n\n  /** HTML input type */\n  type?: string;\n\n  /** Field value */\n  value?: any;\n\n  /** Inner ref */\n  innerRef?: (instance: any) => void;\n}\n\nexport type FieldAttributes<T> = GenericFieldHTMLAttributes &\n  FieldConfig<T> &\n  T & { name: string };\n\nexport type FieldHookConfig<T> = GenericFieldHTMLAttributes & FieldConfig<T>;\n\nexport function useField<Val = any>(\n  propsOrFieldName: string | FieldHookConfig<Val>\n): [FieldInputProps<Val>, FieldMetaProps<Val>, FieldHelperProps<Val>] {\n  const formik = useFormikContext();\n  const {\n    getFieldProps,\n    getFieldMeta,\n    getFieldHelpers,\n    registerField,\n    unregisterField,\n  } = formik;\n\n  const isAnObject = isObject(propsOrFieldName);\n\n  // Normalize propsOrFieldName to FieldHookConfig<Val>\n  const props: FieldHookConfig<Val> = isAnObject\n    ? (propsOrFieldName as FieldHookConfig<Val>)\n    : { name: propsOrFieldName as string };\n\n  const { name: fieldName, validate: validateFn } = props;\n\n  React.useEffect(() => {\n    if (fieldName) {\n      registerField(fieldName, {\n        validate: validateFn,\n      });\n    }\n    return () => {\n      if (fieldName) {\n        unregisterField(fieldName);\n      }\n    };\n  }, [registerField, unregisterField, fieldName, validateFn]);\n\n  if (__DEV__) {\n    invariant(\n      formik,\n      'useField() / <Field /> must be used underneath a <Formik> component or withFormik() higher order component'\n    );\n  }\n\n  invariant(\n    fieldName,\n    'Invalid field name. Either pass `useField` a string or an object containing a `name` key.'\n  );\n\n  return [\n    getFieldProps(props),\n    getFieldMeta(fieldName),\n    getFieldHelpers(fieldName),\n  ];\n}\n\nexport function Field({\n  validate,\n  name,\n  render,\n  children,\n  as: is, // `as` is reserved in typescript lol\n  component,\n  ...props\n}: FieldAttributes<any>) {\n  const {\n    validate: _validate,\n    validationSchema: _validationSchema,\n\n    ...formik\n  } = useFormikContext();\n\n  if (__DEV__) {\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    React.useEffect(() => {\n      invariant(\n        !render,\n        `<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>`\n      );\n\n      invariant(\n        !(is && children && isFunction(children)),\n        'You should not use <Field as> and <Field children> as a function in the same <Field> component; <Field as> will be ignored.'\n      );\n\n      invariant(\n        !(component && children && isFunction(children)),\n        'You should not use <Field component> and <Field children> as a function in the same <Field> component; <Field component> will be ignored.'\n      );\n\n      invariant(\n        !(render && children && !isEmptyChildren(children)),\n        'You should not use <Field render> and <Field children> in the same <Field> component; <Field children> will be ignored'\n      );\n      // eslint-disable-next-line\n    }, []);\n  }\n\n  // Register field and field-level validation with parent <Formik>\n  const { registerField, unregisterField } = formik;\n  React.useEffect(() => {\n    registerField(name, {\n      validate: validate,\n    });\n    return () => {\n      unregisterField(name);\n    };\n  }, [registerField, unregisterField, name, validate]);\n  const field = formik.getFieldProps({ name, ...props });\n  const meta = formik.getFieldMeta(name);\n  const legacyBag = { field, form: formik };\n\n  if (render) {\n    return render({ ...legacyBag, meta });\n  }\n\n  if (isFunction(children)) {\n    return children({ ...legacyBag, meta });\n  }\n\n  if (component) {\n    // This behavior is backwards compat with earlier Formik 0.9 to 1.x\n    if (typeof component === 'string') {\n      const { innerRef, ...rest } = props;\n      return React.createElement(\n        component,\n        { ref: innerRef, ...field, ...rest },\n        children\n      );\n    }\n    // We don't pass `meta` for backwards compat\n    return React.createElement(\n      component,\n      { field, form: formik, ...props },\n      children\n    );\n  }\n\n  // default to input here so we can check for both `as` and `children` above\n  const asElement = is || 'input';\n\n  if (typeof asElement === 'string') {\n    const { innerRef, ...rest } = props;\n    return React.createElement(\n      asElement,\n      { ref: innerRef, ...field, ...rest },\n      children\n    );\n  }\n\n  return React.createElement(asElement, { ...field, ...props }, children);\n}\n","import * as React from 'react';\nimport { useFormikContext } from './FormikContext';\n\nexport type FormikFormProps = Pick<\n  React.FormHTMLAttributes<HTMLFormElement>,\n  Exclude<\n    keyof React.FormHTMLAttributes<HTMLFormElement>,\n    'onReset' | 'onSubmit'\n  >\n>;\n\ntype FormProps = React.ComponentPropsWithoutRef<'form'>;\n\n// @todo tests\nexport const Form = React.forwardRef<HTMLFormElement, FormProps>(\n  (props: FormikFormProps, ref) => {\n    // iOS needs an \"action\" attribute for nice input: https://stackoverflow.com/a/39485162/406725\n    // We default the action to \"#\" in case the preventDefault fails (just updates the URL hash)\n    const { action, ...rest } = props;\n    const _action = action ?? '#';\n    const { handleReset, handleSubmit } = useFormikContext();\n    return (\n      <form\n        onSubmit={handleSubmit}\n        ref={ref}\n        onReset={handleReset}\n        action={_action}\n        {...rest}\n      />\n    );\n  }\n);\n\nForm.displayName = 'Form';\n","import hoistNonReactStatics from 'hoist-non-react-statics';\nimport * as React from 'react';\nimport { Formik } from './Formik';\nimport {\n  FormikHelpers,\n  FormikProps,\n  FormikSharedConfig,\n  FormikValues,\n  FormikTouched,\n  FormikErrors,\n} from './types';\nimport { isFunction } from './utils';\n\n/**\n * State, handlers, and helpers injected as props into the wrapped form component.\n * Used with withFormik()\n *\n * @deprecated  Use `OuterProps & FormikProps<Values>` instead.\n */\nexport type InjectedFormikProps<Props, Values> = Props & FormikProps<Values>;\n\n/**\n * Formik helpers + { props }\n */\nexport type FormikBag<P, V> = { props: P } & FormikHelpers<V>;\n\n/**\n * withFormik() configuration options. Backwards compatible.\n */\nexport interface WithFormikConfig<\n  Props,\n  Values extends FormikValues = FormikValues,\n  DeprecatedPayload = Values\n> extends FormikSharedConfig<Props> {\n  /**\n   * Set the display name of the component. Useful for React DevTools.\n   */\n  displayName?: string;\n\n  /**\n   * Submission handler\n   */\n  handleSubmit: (values: Values, formikBag: FormikBag<Props, Values>) => void;\n\n  /**\n   * Map props to the form values\n   */\n  mapPropsToValues?: (props: Props) => Values;\n\n  /**\n   * Map props to the form status\n   */\n  mapPropsToStatus?: (props: Props) => any;\n\n  /**\n   * Map props to the form touched state\n   */\n  mapPropsToTouched?: (props: Props) => FormikTouched<Values>;\n\n  /**\n   * Map props to the form errors state\n   */\n  mapPropsToErrors?: (props: Props) => FormikErrors<Values>;\n\n  /**\n   * @deprecated in 0.9.0 (but needed to break TS types)\n   */\n  mapValuesToPayload?: (values: Values) => DeprecatedPayload;\n\n  /**\n   * A Yup Schema or a function that returns a Yup schema\n   */\n  validationSchema?: any | ((props: Props) => any);\n\n  /**\n   * Validation function. Must return an error object or promise that\n   * throws an error object where that object keys map to corresponding value.\n   */\n  validate?: (values: Values, props: Props) => void | object | Promise<any>;\n}\n\nexport type CompositeComponent<P> =\n  | React.ComponentClass<P>\n  | React.StatelessComponent<P>;\n\nexport interface ComponentDecorator<TOwnProps, TMergedProps> {\n  (component: CompositeComponent<TMergedProps>): React.ComponentType<TOwnProps>;\n}\n\nexport interface InferableComponentDecorator<TOwnProps> {\n  <T extends CompositeComponent<TOwnProps>>(component: T): T;\n}\n\n/**\n * A public higher-order component to access the imperative API\n */\nexport function withFormik<\n  OuterProps extends object,\n  Values extends FormikValues,\n  Payload = Values\n>({\n  mapPropsToValues = (vanillaProps: OuterProps): Values => {\n    let val: Values = {} as Values;\n    for (let k in vanillaProps) {\n      if (\n        vanillaProps.hasOwnProperty(k) &&\n        typeof vanillaProps[k] !== 'function'\n      ) {\n        // @todo TypeScript fix\n        (val as any)[k] = vanillaProps[k];\n      }\n    }\n    return val as Values;\n  },\n  ...config\n}: WithFormikConfig<OuterProps, Values, Payload>): ComponentDecorator<\n  OuterProps,\n  OuterProps & FormikProps<Values>\n> {\n  return function createFormik(\n    Component: CompositeComponent<OuterProps & FormikProps<Values>>\n  ): React.ComponentClass<OuterProps> {\n    const componentDisplayName =\n      Component.displayName ||\n      Component.name ||\n      (Component.constructor && Component.constructor.name) ||\n      'Component';\n    /**\n     * We need to use closures here for to provide the wrapped component's props to\n     * the respective withFormik config methods.\n     */\n    class C extends React.Component<OuterProps, {}> {\n      static displayName = `WithFormik(${componentDisplayName})`;\n\n      validate = (values: Values): void | object | Promise<any> => {\n        return config.validate!(values, this.props);\n      };\n\n      validationSchema = () => {\n        return isFunction(config.validationSchema)\n          ? config.validationSchema!(this.props)\n          : config.validationSchema;\n      };\n\n      handleSubmit = (values: Values, actions: FormikHelpers<Values>) => {\n        return config.handleSubmit(values, {\n          ...actions,\n          props: this.props,\n        });\n      };\n\n      /**\n       * Just avoiding a render callback for perf here\n       */\n      renderFormComponent = (formikProps: FormikProps<Values>) => {\n        return <Component {...this.props} {...formikProps} />;\n      };\n\n      render() {\n        const { children, ...props } = this.props as any;\n        return (\n          <Formik\n            {...props}\n            {...config}\n            validate={config.validate && this.validate}\n            validationSchema={config.validationSchema && this.validationSchema}\n            initialValues={mapPropsToValues(this.props)}\n            initialStatus={\n              config.mapPropsToStatus && config.mapPropsToStatus(this.props)\n            }\n            initialErrors={\n              config.mapPropsToErrors && config.mapPropsToErrors(this.props)\n            }\n            initialTouched={\n              config.mapPropsToTouched && config.mapPropsToTouched(this.props)\n            }\n            onSubmit={this.handleSubmit as any}\n            children={this.renderFormComponent}\n          />\n        );\n      }\n    }\n\n    return hoistNonReactStatics(\n      C,\n      Component as React.ComponentClass<OuterProps & FormikProps<Values>> // cast type to ComponentClass (even if SFC)\n    ) as React.ComponentClass<OuterProps>;\n  };\n}\n","import * as React from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\n\nimport { FormikContextType } from './types';\nimport { FormikConsumer } from './FormikContext';\nimport invariant from 'tiny-warning';\n\n/**\n * Connect any component to Formik context, and inject as a prop called `formik`;\n * @param Comp React Component\n */\nexport function connect<OuterProps, Values = {}>(\n  Comp: React.ComponentType<OuterProps & { formik: FormikContextType<Values> }>\n) {\n  const C: React.FC<OuterProps> = (props: OuterProps) => (\n    <FormikConsumer>\n      {formik => {\n        invariant(\n          !!formik,\n          `Formik context is undefined, please verify you are rendering <Form>, <Field>, <FastField>, <FieldArray>, or your custom context-using component as a child of a <Formik> component. Component name: ${Comp.name}`\n        );\n        return <Comp {...props} formik={formik} />;\n      }}\n    </FormikConsumer>\n  );\n  const componentDisplayName =\n    Comp.displayName ||\n    Comp.name ||\n    (Comp.constructor && Comp.constructor.name) ||\n    'Component';\n\n  // Assign Comp to C.WrappedComponent so we can access the inner component in tests\n  // For example, <Field.WrappedComponent /> gets us <FieldInner/>\n  (C as React.FC<OuterProps> & {\n    WrappedComponent: React.ReactNode;\n  }).WrappedComponent = Comp;\n\n  C.displayName = `FormikConnect(${componentDisplayName})`;\n\n  return hoistNonReactStatics(\n    C,\n    Comp as React.ComponentClass<\n      OuterProps & { formik: FormikContextType<Values> }\n    > // cast type to ComponentClass (even if SFC)\n  ) as React.ComponentType<OuterProps>;\n}\n","import * as React from 'react';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { connect } from './connect';\nimport {\n  FormikContextType,\n  FormikState,\n  SharedRenderProps,\n  FormikProps,\n} from './types';\nimport {\n  getIn,\n  isEmptyChildren,\n  isFunction,\n  setIn,\n  isEmptyArray,\n} from './utils';\nimport isEqual from 'react-fast-compare';\n\nexport type FieldArrayRenderProps = ArrayHelpers & {\n  form: FormikProps<any>;\n  name: string;\n};\n\nexport type FieldArrayConfig = {\n  /** Really the path to the array field to be updated */\n  name: string;\n  /** Should field array validate the form AFTER array updates/changes? */\n  validateOnChange?: boolean;\n} & SharedRenderProps<FieldArrayRenderProps>;\nexport interface ArrayHelpers {\n  /** Imperatively add a value to the end of an array */\n  push: (obj: any) => void;\n  /** Curried fn to add a value to the end of an array */\n  handlePush: (obj: any) => () => void;\n  /** Imperatively swap two values in an array */\n  swap: (indexA: number, indexB: number) => void;\n  /** Curried fn to swap two values in an array */\n  handleSwap: (indexA: number, indexB: number) => () => void;\n  /** Imperatively move an element in an array to another index */\n  move: (from: number, to: number) => void;\n  /** Imperatively move an element in an array to another index */\n  handleMove: (from: number, to: number) => () => void;\n  /** Imperatively insert an element at a given index into the array */\n  insert: (index: number, value: any) => void;\n  /** Curried fn to insert an element at a given index into the array */\n  handleInsert: (index: number, value: any) => () => void;\n  /** Imperatively replace a value at an index of an array  */\n  replace: (index: number, value: any) => void;\n  /** Curried fn to replace an element at a given index into the array */\n  handleReplace: (index: number, value: any) => () => void;\n  /** Imperatively add an element to the beginning of an array and return its length */\n  unshift: (value: any) => number;\n  /** Curried fn to add an element to the beginning of an array */\n  handleUnshift: (value: any) => () => void;\n  /** Curried fn to remove an element at an index of an array */\n  handleRemove: (index: number) => () => void;\n  /** Curried fn to remove a value from the end of the array */\n  handlePop: () => () => void;\n  /** Imperatively remove and element at an index of an array */\n  remove<T>(index: number): T | undefined;\n  /** Imperatively remove and return value from the end of the array */\n  pop<T>(): T | undefined;\n}\n\n/**\n * Some array helpers!\n */\nexport const move = (array: any[], from: number, to: number) => {\n  const copy = copyArrayLike(array);\n  const value = copy[from];\n  copy.splice(from, 1);\n  copy.splice(to, 0, value);\n  return copy;\n};\n\nexport const swap = (\n  arrayLike: ArrayLike<any>,\n  indexA: number,\n  indexB: number\n) => {\n  const copy = copyArrayLike(arrayLike);\n  const a = copy[indexA];\n  copy[indexA] = copy[indexB];\n  copy[indexB] = a;\n  return copy;\n};\n\nexport const insert = (\n  arrayLike: ArrayLike<any>,\n  index: number,\n  value: any\n) => {\n  const copy = copyArrayLike(arrayLike);\n  copy.splice(index, 0, value);\n  return copy;\n};\n\nexport const replace = (\n  arrayLike: ArrayLike<any>,\n  index: number,\n  value: any\n) => {\n  const copy = copyArrayLike(arrayLike);\n  copy[index] = value;\n  return copy;\n};\n\nconst copyArrayLike = (arrayLike: ArrayLike<any>) => {\n  if (!arrayLike) {\n    return [];\n  } else if (Array.isArray(arrayLike)) {\n    return [...arrayLike];\n  } else {\n    const maxIndex = Object.keys(arrayLike)\n      .map(key => parseInt(key))\n      .reduce((max, el) => (el > max ? el : max), 0);\n    return Array.from({ ...arrayLike, length: maxIndex + 1 });\n  }\n};\n\nclass FieldArrayInner<Values = {}> extends React.Component<\n  FieldArrayConfig & { formik: FormikContextType<Values> },\n  {}\n> {\n  static defaultProps = {\n    validateOnChange: true,\n  };\n\n  constructor(props: FieldArrayConfig & { formik: FormikContextType<Values> }) {\n    super(props);\n    // We need TypeScript generics on these, so we'll bind them in the constructor\n    // @todo Fix TS 3.2.1\n    this.remove = this.remove.bind(this) as any;\n    this.pop = this.pop.bind(this) as any;\n  }\n\n  componentDidUpdate(\n    prevProps: FieldArrayConfig & { formik: FormikContextType<Values> }\n  ) {\n    if (\n      this.props.validateOnChange &&\n      this.props.formik.validateOnChange &&\n      !isEqual(\n        getIn(prevProps.formik.values, prevProps.name),\n        getIn(this.props.formik.values, this.props.name)\n      )\n    ) {\n      this.props.formik.validateForm(this.props.formik.values);\n    }\n  }\n\n  updateArrayField = (\n    fn: Function,\n    alterTouched: boolean | Function,\n    alterErrors: boolean | Function\n  ) => {\n    const {\n      name,\n\n      formik: { setFormikState },\n    } = this.props;\n    setFormikState((prevState: FormikState<any>) => {\n      let updateErrors = typeof alterErrors === 'function' ? alterErrors : fn;\n      let updateTouched =\n        typeof alterTouched === 'function' ? alterTouched : fn;\n\n      // values fn should be executed before updateErrors and updateTouched,\n      // otherwise it causes an error with unshift.\n      let values = setIn(\n        prevState.values,\n        name,\n        fn(getIn(prevState.values, name))\n      );\n\n      let fieldError = alterErrors\n        ? updateErrors(getIn(prevState.errors, name))\n        : undefined;\n      let fieldTouched = alterTouched\n        ? updateTouched(getIn(prevState.touched, name))\n        : undefined;\n\n      if (isEmptyArray(fieldError)) {\n        fieldError = undefined;\n      }\n      if (isEmptyArray(fieldTouched)) {\n        fieldTouched = undefined;\n      }\n\n      return {\n        ...prevState,\n        values,\n        errors: alterErrors\n          ? setIn(prevState.errors, name, fieldError)\n          : prevState.errors,\n        touched: alterTouched\n          ? setIn(prevState.touched, name, fieldTouched)\n          : prevState.touched,\n      };\n    });\n  };\n\n  push = (value: any) =>\n    this.updateArrayField(\n      (arrayLike: ArrayLike<any>) => [\n        ...copyArrayLike(arrayLike),\n        cloneDeep(value),\n      ],\n      false,\n      false\n    );\n\n  handlePush = (value: any) => () => this.push(value);\n\n  swap = (indexA: number, indexB: number) =>\n    this.updateArrayField(\n      (array: any[]) => swap(array, indexA, indexB),\n      true,\n      true\n    );\n\n  handleSwap = (indexA: number, indexB: number) => () =>\n    this.swap(indexA, indexB);\n\n  move = (from: number, to: number) =>\n    this.updateArrayField((array: any[]) => move(array, from, to), true, true);\n\n  handleMove = (from: number, to: number) => () => this.move(from, to);\n\n  insert = (index: number, value: any) =>\n    this.updateArrayField(\n      (array: any[]) => insert(array, index, value),\n      (array: any[]) => insert(array, index, null),\n      (array: any[]) => insert(array, index, null)\n    );\n\n  handleInsert = (index: number, value: any) => () => this.insert(index, value);\n\n  replace = (index: number, value: any) =>\n    this.updateArrayField(\n      (array: any[]) => replace(array, index, value),\n      false,\n      false\n    );\n\n  handleReplace = (index: number, value: any) => () =>\n    this.replace(index, value);\n\n  unshift = (value: any) => {\n    let length = -1;\n    this.updateArrayField(\n      (array: any[]) => {\n        const arr = array ? [value, ...array] : [value];\n        if (length < 0) {\n          length = arr.length;\n        }\n        return arr;\n      },\n      (array: any[]) => {\n        const arr = array ? [null, ...array] : [null];\n        if (length < 0) {\n          length = arr.length;\n        }\n        return arr;\n      },\n      (array: any[]) => {\n        const arr = array ? [null, ...array] : [null];\n        if (length < 0) {\n          length = arr.length;\n        }\n        return arr;\n      }\n    );\n    return length;\n  };\n\n  handleUnshift = (value: any) => () => this.unshift(value);\n\n  remove<T>(index: number): T {\n    // We need to make sure we also remove relevant pieces of `touched` and `errors`\n    let result: any;\n    this.updateArrayField(\n      // so this gets call 3 times\n      (array?: any[]) => {\n        const copy = array ? copyArrayLike(array) : [];\n        if (!result) {\n          result = copy[index];\n        }\n        if (isFunction(copy.splice)) {\n          copy.splice(index, 1);\n        }\n        return copy;\n      },\n      true,\n      true\n    );\n\n    return result as T;\n  }\n\n  handleRemove = (index: number) => () => this.remove<any>(index);\n\n  pop<T>(): T {\n    // Remove relevant pieces of `touched` and `errors` too!\n    let result: any;\n    this.updateArrayField(\n      // so this gets call 3 times\n      (array: any[]) => {\n        const tmp = array;\n        if (!result) {\n          result = tmp && tmp.pop && tmp.pop();\n        }\n        return tmp;\n      },\n      true,\n      true\n    );\n\n    return result as T;\n  }\n\n  handlePop = () => () => this.pop<any>();\n\n  render() {\n    const arrayHelpers: ArrayHelpers = {\n      push: this.push,\n      pop: this.pop,\n      swap: this.swap,\n      move: this.move,\n      insert: this.insert,\n      replace: this.replace,\n      unshift: this.unshift,\n      remove: this.remove,\n      handlePush: this.handlePush,\n      handlePop: this.handlePop,\n      handleSwap: this.handleSwap,\n      handleMove: this.handleMove,\n      handleInsert: this.handleInsert,\n      handleReplace: this.handleReplace,\n      handleUnshift: this.handleUnshift,\n      handleRemove: this.handleRemove,\n    };\n\n    const {\n      component,\n      render,\n      children,\n      name,\n      formik: {\n        validate: _validate,\n        validationSchema: _validationSchema,\n        ...restOfFormik\n      },\n    } = this.props;\n\n    const props: FieldArrayRenderProps = {\n      ...arrayHelpers,\n      form: restOfFormik,\n      name,\n    };\n\n    return component\n      ? React.createElement(component as any, props)\n      : render\n      ? (render as any)(props)\n      : children // children come last, always called\n      ? typeof children === 'function'\n        ? (children as any)(props)\n        : !isEmptyChildren(children)\n        ? React.Children.only(children)\n        : null\n      : null;\n  }\n}\n\nexport const FieldArray = connect<FieldArrayConfig, any>(FieldArrayInner);\n","import * as React from 'react';\nimport { FormikContextType } from './types';\nimport { getIn, isFunction } from './utils';\nimport { connect } from './connect';\n\nexport interface ErrorMessageProps {\n  name: string;\n  className?: string;\n  component?: string | React.ComponentType;\n  children?: (errorMessage: string) => React.ReactNode;\n  render?: (errorMessage: string) => React.ReactNode;\n}\n\nclass ErrorMessageImpl extends React.Component<\n  ErrorMessageProps & { formik: FormikContextType<any> }\n> {\n  shouldComponentUpdate(\n    props: ErrorMessageProps & { formik: FormikContextType<any> }\n  ) {\n    if (\n      getIn(this.props.formik.errors, this.props.name) !==\n        getIn(props.formik.errors, this.props.name) ||\n      getIn(this.props.formik.touched, this.props.name) !==\n        getIn(props.formik.touched, this.props.name) ||\n      Object.keys(this.props).length !== Object.keys(props).length\n    ) {\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  render() {\n    let { component, formik, render, children, name, ...rest } = this.props;\n\n    const touch = getIn(formik.touched, name);\n    const error = getIn(formik.errors, name);\n\n    return !!touch && !!error\n      ? render\n        ? isFunction(render)\n          ? render(error)\n          : null\n        : children\n        ? isFunction(children)\n          ? children(error)\n          : null\n        : component\n        ? React.createElement(component, rest as any, error)\n        : error\n      : null;\n  }\n}\n\nexport const ErrorMessage = connect<\n  ErrorMessageProps,\n  ErrorMessageProps & { formik: FormikContextType<any> }\n>(ErrorMessageImpl);\n","import * as React from 'react';\n\nimport {\n  FormikProps,\n  GenericFieldHTMLAttributes,\n  FormikContextType,\n  FieldMetaProps,\n  FieldInputProps,\n} from './types';\nimport invariant from 'tiny-warning';\nimport { getIn, isEmptyChildren, isFunction } from './utils';\nimport { FieldConfig } from './Field';\nimport { connect } from './connect';\n\ntype $FixMe = any;\n\nexport interface FastFieldProps<V = any> {\n  field: FieldInputProps<V>;\n  meta: FieldMetaProps<V>;\n  form: FormikProps<V>; // if ppl want to restrict this for a given form, let them.\n}\n\nexport type FastFieldConfig<T> = FieldConfig & {\n  /** Override FastField's default shouldComponentUpdate */\n  shouldUpdate?: (\n    nextProps: T & GenericFieldHTMLAttributes,\n    props: {}\n  ) => boolean;\n};\n\nexport type FastFieldAttributes<T> = GenericFieldHTMLAttributes &\n  FastFieldConfig<T> &\n  T;\n\ntype FastFieldInnerProps<Values = {}, Props = {}> = FastFieldAttributes<\n  Props\n> & { formik: FormikContextType<Values> };\n\n/**\n * Custom Field component for quickly hooking into Formik\n * context and wiring up forms.\n */\nclass FastFieldInner<Values = {}, Props = {}> extends React.Component<\n  FastFieldInnerProps<Values, Props>,\n  {}\n> {\n  constructor(props: FastFieldInnerProps<Values, Props>) {\n    super(props);\n    const { render, children, component, as: is, name } = props;\n    invariant(\n      !render,\n      `<FastField render> has been deprecated. Please use a child callback function instead: <FastField name={${name}}>{props => ...}</FastField> instead.`\n    );\n    invariant(\n      !(component && render),\n      'You should not use <FastField component> and <FastField render> in the same <FastField> component; <FastField component> will be ignored'\n    );\n\n    invariant(\n      !(is && children && isFunction(children)),\n      'You should not use <FastField as> and <FastField children> as a function in the same <FastField> component; <FastField as> will be ignored.'\n    );\n\n    invariant(\n      !(component && children && isFunction(children)),\n      'You should not use <FastField component> and <FastField children> as a function in the same <FastField> component; <FastField component> will be ignored.'\n    );\n\n    invariant(\n      !(render && children && !isEmptyChildren(children)),\n      'You should not use <FastField render> and <FastField children> in the same <FastField> component; <FastField children> will be ignored'\n    );\n  }\n\n  shouldComponentUpdate(props: FastFieldInnerProps<Values, Props>) {\n    if (this.props.shouldUpdate) {\n      return this.props.shouldUpdate(props, this.props);\n    } else if (\n      props.name !== this.props.name ||\n      getIn(props.formik.values, this.props.name) !==\n        getIn(this.props.formik.values, this.props.name) ||\n      getIn(props.formik.errors, this.props.name) !==\n        getIn(this.props.formik.errors, this.props.name) ||\n      getIn(props.formik.touched, this.props.name) !==\n        getIn(this.props.formik.touched, this.props.name) ||\n      Object.keys(this.props).length !== Object.keys(props).length ||\n      props.formik.isSubmitting !== this.props.formik.isSubmitting\n    ) {\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  componentDidMount() {\n    // Register the Field with the parent Formik. Parent will cycle through\n    // registered Field's validate fns right prior to submit\n    this.props.formik.registerField(this.props.name, {\n      validate: this.props.validate,\n    });\n  }\n\n  componentDidUpdate(prevProps: FastFieldAttributes<Props>) {\n    if (this.props.name !== prevProps.name) {\n      this.props.formik.unregisterField(prevProps.name);\n      this.props.formik.registerField(this.props.name, {\n        validate: this.props.validate,\n      });\n    }\n\n    if (this.props.validate !== prevProps.validate) {\n      this.props.formik.registerField(this.props.name, {\n        validate: this.props.validate,\n      });\n    }\n  }\n\n  componentWillUnmount() {\n    this.props.formik.unregisterField(this.props.name);\n  }\n\n  render() {\n    const {\n      validate,\n      name,\n      render,\n      as: is,\n      children,\n      component,\n      shouldUpdate,\n      formik,\n      ...props\n    } = this.props as FastFieldInnerProps<Values, Props>;\n\n    const {\n      validate: _validate,\n      validationSchema: _validationSchema,\n      ...restOfFormik\n    } = formik;\n    const field = formik.getFieldProps({ name, ...props });\n    const meta = {\n      value: getIn(formik.values, name),\n      error: getIn(formik.errors, name),\n      touched: !!getIn(formik.touched, name),\n      initialValue: getIn(formik.initialValues, name),\n      initialTouched: !!getIn(formik.initialTouched, name),\n      initialError: getIn(formik.initialErrors, name),\n    };\n\n    const bag = { field, meta, form: restOfFormik };\n\n    if (render) {\n      return (render as any)(bag);\n    }\n\n    if (isFunction(children)) {\n      return (children as (props: FastFieldProps<any>) => React.ReactNode)(bag);\n    }\n\n    if (component) {\n      // This behavior is backwards compat with earlier Formik 0.9 to 1.x\n      if (typeof component === 'string') {\n        const { innerRef, ...rest } = props;\n        return React.createElement(\n          component,\n          { ref: innerRef, ...field, ...(rest as $FixMe) },\n          children\n        );\n      }\n      // We don't pass `meta` for backwards compat\n      return React.createElement(\n        component as React.ComponentClass<$FixMe>,\n        { field, form: formik, ...props },\n        children\n      );\n    }\n\n    // default to input here so we can check for both `as` and `children` above\n    const asElement = is || 'input';\n\n    if (typeof asElement === 'string') {\n      const { innerRef, ...rest } = props;\n      return React.createElement(\n        asElement,\n        { ref: innerRef, ...field, ...(rest as $FixMe) },\n        children\n      );\n    }\n\n    return React.createElement(\n      asElement as React.ComponentClass,\n      { ...field, ...props },\n      children\n    );\n  }\n}\n\nexport const FastField = connect<FastFieldAttributes<any>, any>(FastFieldInner);\n"],"names":["isEmptyArray","value","Array","isArray","length","isFunction","obj","isObject","isInteger","String","Math","floor","Number","isString","Object","prototype","toString","call","isNaN","isEmptyChildren","children","React","count","isPromise","then","isInputEvent","target","getActiveElement","doc","document","undefined","activeElement","body","e","getIn","key","def","p","path","toPath","setIn","res","clone","resVal","i","pathArray","currentPath","currentObj","slice","nextPath","setNestedObjectValues","object","visited","response","WeakMap","keys","k","val","get","set","FormikContext","displayName","FormikProvider","Provider","FormikConsumer","Consumer","useFormikContext","formik","invariant","formikReducer","state","msg","type","values","payload","touched","isEqual","errors","status","isSubmitting","isValidating","field","submitCount","emptyErrors","emptyTouched","useFormik","validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit","rest","props","initialValues","initialErrors","initialTouched","initialStatus","isMounted","fieldRegistry","current","dispatch","runValidateHandler","Promise","resolve","reject","maybePromisedErrors","validate","actualException","console","warn","runValidationSchema","validationSchema","schema","promise","validateAt","validateYupSchema","err","name","yupToFormErrors","runSingleFieldLevelValidation","runFieldLevelValidations","fieldKeysWithValidation","filter","f","fieldValidations","map","all","fieldErrorsList","reduce","prev","curr","index","runAllValidations","fieldErrors","schemaErrors","validateErrors","combinedErrors","deepmerge","arrayMerge","validateFormWithHighPriority","useEventCallback","resetForm","nextState","dispatchFn","onReset","maybePromisedOnReset","imperativeMethods","validateField","maybePromise","x","error","registerField","unregisterField","setTouched","shouldValidate","willValidate","setErrors","setValues","resolvedValues","setFieldError","setFieldValue","executeChange","eventOrTextValue","maybePath","parsed","persist","currentTarget","id","checked","outerHTML","options","multiple","warnAboutMissingIdentifier","htmlContent","documentationAnchorLink","handlerName","test","parseFloat","getValueForCheckbox","getSelectedValues","handleChange","eventOrPath","event","setFieldTouched","executeBlur","handleBlur","eventOrString","setFormikState","stateOrCb","setStatus","setSubmitting","submitForm","isInstanceOfError","Error","isActuallyValid","promiseOrUndefined","executeSubmit","result","_errors","handleSubmit","preventDefault","stopPropagation","HTMLButtonElement","attributes","getNamedItem","reason","validateForm","handleReset","getFieldMeta","initialValue","initialError","getFieldHelpers","setValue","setError","getFieldProps","nameOrOptions","isAnObject","valueState","onChange","onBlur","valueProp","is","as","indexOf","dirty","isValid","ctx","Formik","formikbag","component","render","innerRef","only","yupError","inner","message","sync","context","validateData","prepareDataForValidation","abortEarly","data","hasOwnProperty","isPlainObject","source","destination","forEach","merge","cloneRequested","shouldClone","isMergeableObject","push","from","el","selected","currentValue","Boolean","currentArrayOfValues","isValueInArray","concat","useIsomorphicLayoutEffect","window","createElement","fn","ref","args","apply","useField","propsOrFieldName","fieldName","validateFn","Field","_validate","meta","legacyBag","form","asElement","Form","action","_action","withFormik","mapPropsToValues","vanillaProps","config","createFormik","Component","componentDisplayName","constructor","C","actions","formikProps","mapPropsToStatus","mapPropsToErrors","mapPropsToTouched","renderFormComponent","hoistNonReactStatics","connect","Comp","WrappedComponent","move","array","to","copy","copyArrayLike","splice","swap","arrayLike","indexA","indexB","a","insert","replace","maxIndex","parseInt","max","FieldArrayInner","alterTouched","alterErrors","prevState","updateErrors","updateTouched","fieldError","fieldTouched","updateArrayField","cloneDeep","arr","unshift","remove","pop","bind","componentDidUpdate","prevProps","tmp","arrayHelpers","handlePush","handlePop","handleSwap","handleMove","handleInsert","handleReplace","handleUnshift","handleRemove","restOfFormik","FieldArray","ErrorMessageImpl","shouldComponentUpdate","touch","ErrorMessage","FastFieldInner","shouldUpdate","componentDidMount","componentWillUnmount","bag","FastField"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;IACaA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD;AAAA,SAC1BC,KAAK,CAACC,OAAN,CAAcF,KAAd,KAAwBA,KAAK,CAACG,MAAN,KAAiB,CADf;AAAA;AAG5B;;IACaC,UAAU,GAAG,SAAbA,UAAa,CAACC,GAAD;AAAA,SACxB,OAAOA,GAAP,KAAe,UADS;AAAA;AAG1B;;IACaC,QAAQ,GAAG,SAAXA,QAAW,CAACD,GAAD;AAAA,SACtBA,GAAG,KAAK,IAAR,IAAgB,OAAOA,GAAP,KAAe,QADT;AAAA;AAGxB;;IACaE,SAAS,GAAG,SAAZA,SAAY,CAACF,GAAD;AAAA,SACvBG,MAAM,CAACC,IAAI,CAACC,KAAL,CAAWC,MAAM,CAACN,GAAD,CAAjB,CAAD,CAAN,KAAoCA,GADb;AAAA;AAGzB;;IACaO,QAAQ,GAAG,SAAXA,QAAW,CAACP,GAAD;AAAA,SACtBQ,MAAM,CAACC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BX,GAA/B,MAAwC,iBADlB;AAAA;AAGxB;AACA;;IACaY,OAAK,GAAG,SAARA,KAAQ,CAACZ,GAAD;AAAA,SAAuBA,GAAG,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