{"version":3,"sources":["../node_modules/rc-field-form/es/FieldContext.js","../node_modules/rc-field-form/es/utils/typeUtil.js","../node_modules/rc-util/es/utils/get.js","../node_modules/rc-util/es/utils/set.js","../node_modules/rc-field-form/es/utils/valueUtil.js","../node_modules/rc-field-form/es/utils/messages.js","../node_modules/rc-field-form/es/utils/validateUtil.js","../node_modules/rc-field-form/es/Field.js","../node_modules/rc-field-form/es/List.js","../node_modules/rc-field-form/es/utils/NameMap.js","../node_modules/rc-field-form/es/useForm.js","../node_modules/rc-field-form/es/utils/asyncUtil.js","../node_modules/rc-field-form/es/FormContext.js","../node_modules/rc-field-form/es/Form.js","../node_modules/rc-field-form/es/index.js","../node_modules/antd/es/modal/locale.js","../node_modules/antd/es/locale-provider/index.js","../node_modules/@ant-design/icons-svg/es/asn/ExclamationCircleFilled.js","../node_modules/@ant-design/icons/es/icons/ExclamationCircleFilled.js","../node_modules/@ant-design/icons-svg/es/asn/CheckCircleFilled.js","../node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js","../node_modules/@ant-design/icons-svg/es/asn/InfoCircleFilled.js","../node_modules/@ant-design/icons/es/icons/InfoCircleFilled.js","../node_modules/antd/es/message/index.js","../node_modules/antd/es/message/hooks/useMessage.js","../node_modules/antd/es/config-provider/index.js","../node_modules/rc-notification/es/useNotification.js","../node_modules/rc-notification/es/Notice.js","../node_modules/rc-notification/es/Notification.js","../node_modules/rc-notification/es/index.js","../node_modules/@babel/runtime/helpers/esm/toArray.js","../../../src/util.js","../../../src/rule/required.js","../../../src/rule/type.js","../../../src/rule/index.js","../../../src/rule/whitespace.js","../../../src/rule/range.js","../../../src/rule/enum.js","../../../src/rule/pattern.js","../../../src/validator/type.js","../../../src/validator/index.js","../../../src/validator/string.js","../../../src/validator/method.js","../../../src/validator/number.js","../../../src/validator/boolean.js","../../../src/validator/regexp.js","../../../src/validator/integer.js","../../../src/validator/float.js","../../../src/validator/array.js","../../../src/validator/object.js","../../../src/validator/enum.js","../../../src/validator/pattern.js","../../../src/validator/date.js","../../../src/validator/required.js","../../../src/validator/any.js","../../../src/messages.js","../../../src/index.js","../node_modules/@ant-design/icons-svg/es/asn/CheckCircleOutlined.js","../node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.js","../node_modules/@ant-design/icons-svg/es/asn/CloseCircleOutlined.js","../node_modules/@ant-design/icons/es/icons/CloseCircleOutlined.js","../node_modules/@ant-design/icons-svg/es/asn/ExclamationCircleOutlined.js","../node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js","../node_modules/@ant-design/icons-svg/es/asn/InfoCircleOutlined.js","../node_modules/@ant-design/icons/es/icons/InfoCircleOutlined.js","../node_modules/antd/es/notification/index.js","../node_modules/antd/es/notification/hooks/useNotification.js","../node_modules/emailjs-com/es/store/store.js","../node_modules/emailjs-com/es/methods/init/init.js","../node_modules/emailjs-com/es/utils/validateParams.js","../node_modules/emailjs-com/es/models/EmailJSResponseStatus.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../node_modules/emailjs-com/es/api/sendPost.js","../node_modules/emailjs-com/es/index.js","../node_modules/emailjs-com/es/methods/send/send.js","../node_modules/emailjs-com/es/methods/sendForm/sendForm.js"],"names":["HOOK_MARK","warningFunc","warning","Context","React","getFieldValue","getFieldsValue","getFieldError","getFieldsError","isFieldsTouched","isFieldTouched","isFieldValidating","isFieldsValidating","resetFields","setFields","setFieldsValue","validateFields","submit","getInternalHooks","dispatch","initEntityValue","registerField","useSubscribe","setInitialValues","setCallbacks","getFields","setValidateMessages","setPreserve","toArray","value","undefined","Array","isArray","get","entity","path","current","i","length","internalSet","paths","removeIfUndefined","clone","_paths","_toArray","restPath","slice","_toConsumableArray","_objectSpread","set","arguments","getNamePath","getValue","store","namePath","setValue","newStore","cloneByNamePathList","namePathList","forEach","containsNamePath","some","matchNamePath","isObject","obj","_typeof","Object","getPrototypeOf","prototype","internalSetValues","values","keys","key","prevValue","recursive","setValues","_len","restValues","_key","reduce","changedNamePath","every","nameUnit","defaultGetValueFromEvent","valuePropName","event","target","move","array","moveIndex","toIndex","item","diff","concat","typeTemplate","defaultValidateMessages","default","required","enum","whitespace","date","format","parse","invalid","types","string","method","object","number","boolean","integer","float","regexp","email","url","hex","len","min","max","range","pattern","mismatch","AsyncValidator","RawAsyncValidator","convertMessages","messages","name","rule","messageVariables","kv","join","replaceFunc","template","additionalKV","replace","str","replaceMessage","fillTemplate","source","ruleName","validateRule","_x","_x2","_x3","_x4","_x5","_validateRule","apply","this","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","options","cloneRule","subRuleField","validator","result","subResults","wrap","_context2","prev","next","type","defaultField","_defineProperty","validateMessages","Promise","resolve","validate","t0","errors","map","_ref2","index","message","console","error","all","subValue","sent","abrupt","stop","validateRules","rules","validateFirst","summaryPromise","filledRules","currentRule","originValidatorFunc","val","callback","hasPromise","promise","args","then","catch","err","_ref","_callee","reject","_context","_x6","_x7","rulePromises","_x9","_finishOnFirstFailed","finishOnFirstFailed","_x8","_finishOnAllFailed","finishOnAllFailed","e","_callee3","_context3","errorsList","_ref3","_callee4","count","_context4","requireUpdate","shouldUpdate","nextValue","info","Field","_React$Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","state","resetCount","cancelRegisterFunc","mounted","touched","dirty","validatePromise","cancelRegister","_this$props","preserve","isListField","_this$props2","_fieldContext$prefixN","fieldContext","prefixName","getRules","_this$props3","_this$props3$rules","refresh","setState","onStoreChange","prevStore","_this$props4","_this$props4$dependen","dependencies","onReset","curValue","namePathMatch","data","validating","reRender","dependency","relatedFields","currentValue","rootPromise","_this$props5","_this$props5$validate","triggerName","filteredRules","filter","validateTrigger","includes","isFieldDirty","getErrors","isList","isPreserve","getMeta","prevValidating","getOnlyChild","children","meta","getControlled","isFunction","childList","toChildrenArray","child","childProps","_this$props6","trigger","getValueFromEvent","normalize","getValueProps","mergedValidateTrigger","_getInternalHooks","mergedGetValueProps","originTriggerFunc","control","newValue","validateTriggerList","originTrigger","_assertThisInitialized","_createClass","_this$props7","forceUpdate","returnChildNode","_this$getOnlyChild","contextType","FieldContext","defaultProps","WrapperField","_ref4","restProps","_objectWithoutProperties","_extends","List","initialValue","context","keyManager","id","parentPrefixName","Provider","_ref3$value","onChange","getNewValue","operations","add","defaultValue","remove","indexSet","Set","size","_","keysIndex","has","valueIndex","from","to","_move","listValue","__","SPLIT","cell","NameMap","kvs","Map","updater","delete","entries","_slicedToArray","cells","split","_cell$match","match","_cell$match2","unit","Number","json","FormStore","forceRootUpdate","formHooked","subscribable","fieldEntities","initialValues","callbacks","lastValidatePromise","getForm","init","getInitialValue","timeoutId","warningUnhooked","process","getFieldEntities","pure","field","getFieldsMap","cache","getFieldEntitiesForNamePathList","nameList","INVALIDATE_NAME_PATH","filterFunc","filteredNameList","_entity$isListField","push","arg0","arg1","isAllFieldsTouched","shortNamePath","fieldNamePath","update","list","isNamePathListTouched","entities","namePathListEntities","testField","resetWithFieldInitialValue","records","requiredFieldEntities","resetWithFields","originValue","skipExist","_requiredFieldEntitie","r","notifyObservers","fields","fieldData","defineProperty","subNamePath","mergedPreserve","action","updateValue","_namePath","mergedInfo","childrenFields","getDependencyChildrenFields","onValuesChange","triggerOnFieldsChange","rootNamePath","dependencies2fields","dependencyNamePath","fillChildren","filedErrors","onFieldsChange","fieldName","provideNameList","promiseList","hasError","results","allPromiseFinish","resultNamePathList","_ref5","returnPromise","errorList","errorFields","outOfDate","onFinish","onFinishFailed","useForm","form","formRef","_React$useState","formStore","FormContext","triggerFormChange","triggerFormFinish","registerForm","unregisterForm","FormProvider","onFormChange","onFormFinish","formContext","formsRef","changedFields","forms","newForms","Form","ref","_ref$component","component","Component","_ref$validateTrigger","_onFieldsChange","_onFinish","_useForm","formInstance","_formInstance$getInte","rest","mountRef","childrenNode","childrenRenderProps","prevFieldsRef","sourceKeys","targetKeys","sourceValue","targetValue","isSimilar","formContextValue","wrapperNode","onSubmit","preventDefault","stopPropagation","_restProps$onReset","RefForm","FieldForm","runtimeLocale","defaultLocale","Modal","changeConfirmLocale","newLocale","ANT_MARK","LocaleProvider","locale","devWarning","_ANT_MARK__","prevProps","LocaleContext","exist","ExclamationCircleFilled","AntdIcon","icon","ExclamationCircleFilledSvg","displayName","CheckCircleFilled","CheckCircleFilledSvg","InfoCircleFilled","InfoCircleFilledSvg","messageInstance","defaultTop","getContainer","maxCount","defaultDuration","localPrefixCls","transitionName","hasTransitionName","rtl","getRCNotificationInstance","customizePrefixCls","prefixCls","_globalConfig","globalConfig","getPrefixCls","getRootPrefixCls","rootPrefixCls","instance","instanceConfig","style","top","RCNotification","newInstance","typeToIcon","success","CloseCircleFilled","loading","LoadingOutlined","getRCNoticeProps","_classNames","duration","IconComponent","messageClass","classNames","className","content","onClose","onClick","getRcNotificationInstance","api","open","closePromise","notice","removeNotice","filled","rejected","config","destroy","messageKey","attachTypeApi","originalApi","toString","isArgsProps","warn","useMessage","innerInstance","proxy","noticeProps","holderCallback","_useRCNotification","useRCNotification","_useRCNotification2","hookNotify","holder","hookApiRef","mergedPrefixCls","ConfigConsumer","globalPrefixCls","PASSED_PROPS","getGlobalPrefixCls","suffixCls","ProviderChildren","_a","_b","csp","autoInsertSpaceInButton","componentSize","direction","space","virtual","dropdownMatchSelectWidth","legacyLocale","parentContext","iconPrefixCls","propName","propValue","memoedConfig","useMemo","prevConfig","currentConfig","prevKeys","currentKeys","memoIconContextValue","childNode","RcFormProvider","IconContext","SizeContextProvider","ConfigContext","ConfigProvider","notification","LocaleReceiver","SizeContext","params","useNotification","notificationInstance","createdRef","_React$useState2","elements","setElements","firstMount","div","noticeEle","Notice","originElements","findIndex","ele","cloneList","_Component","closeTimer","close","clearCloseTimer","noticeKey","startCloseTimer","window","setTimeout","clearTimeout","updateMark","visible","restartCloseTimer","_this2","closable","closeIcon","componentClass","dataOrAriaAttributeProps","acc","substr","node","onMouseEnter","onMouseLeave","tabIndex","ReactDOM","createPortal","seed","now","Date","getUuid","Notification","notices","hookRefs","originNotice","previousState","noticeIndex","v","indexOf","updatedNotices","splice","userPassKey","shift","removeKey","_ref2$notice","noticePropsMap","animation","noticeKeys","_notice$onClose","CSSMotionList","motionName","getTransitionName","onVisibleChanged","changedVisible","motionClassName","motionStyle","_this2$noticePropsMap","left","properties","_ref6","document","createElement","appendChild","body","called","render","unmountComponentAtNode","parentNode","removeChild","_useNotification","arr","formatRegExp","convertFieldsError","f","String","x","JSON","isEmptyValue","isNativeStringType","asyncSerialArray","func","arrLength","original","AsyncValidationError","asyncMap","objArr","option","pending","ret","k","flattenObjArr","firstFields","objArrKeys","objArrLength","total","a","asyncParallelArray","complementError","oe","fullField","deepMerge","util","RegExp","parseInt","isNaN","test","ruleType","custom","num","_pattern","dateObject","any","newMessages","cloned","Schema","descriptor","define","Error","o","oc","series","z","deep","doIt","fieldsSchema","fieldSchema","addFullfield","schema","errs","finalErrors","res","cb","complete","getType","validators","getValidationMethod","messageIndex","CheckCircleOutlined","CheckCircleOutlinedSvg","CloseCircleOutlined","CloseCircleOutlinedSvg","ExclamationCircleOutlined","ExclamationCircleOutlinedSvg","InfoCircleOutlined","InfoCircleOutlinedSvg","defaultGetContainer","defaultCloseIcon","defaultBottom","defaultPrefixCls","defaultPlacement","getPlacementStyle","placement","bottom","right","getNotificationInstance","_args$placement","_args$getContainer","_args$closeIcon","cacheKey","cacheInstance","closeIconToRender","CloseOutlined","notificationClass","durationArg","description","btn","iconNode","autoMarginTag","role","_origin","userID","origin","_userID","validateParams","serviceID","templateID","EmailJSResponseStatus","httpResponse","Constructor","TypeError","status","text","responseText","sendPost","headers","xhr","XMLHttpRequest","addEventListener","responseStatus","setRequestHeader","send","templatePrams","uID","lib_version","user_id","service_id","template_id","template_params","stringify","sendForm","currentForm","querySelector","nodeName","findHTMLForm","formData","FormData","append"],"mappings":"+PAEWA,EAAY,yBAEnBC,EAAc,WAChBC,aAAQ,EAAO,0EAgCFC,EA7BYC,gBAAoB,CAC7CC,cAAeJ,EACfK,eAAgBL,EAChBM,cAAeN,EACfO,eAAgBP,EAChBQ,gB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AGfH,EAAIE,iBAAiB,SAAS,YAAgB,IAAbntB,EAAa,EAAbA,OAC7BkH,EAAO,IAAIslB,EAAsBxsB,OAErCitB,EAAIpQ,KAAK,OAAQ9e,EAAMkuB,QAAUrqB,GAAK,GACtChD,OAAOK,KAAK+tB,GAAS3uB,SAAQ,SAACa,GAC1B+tB,EAAII,iBAAiBnuB,EAAK8tB,EAAQ9tB,OAEtC+tB,EAAIK,KAAKxiB,OCjBF,KACX4G,OACA4b,KCKgB,SAAChB,EAAWC,EAAYgB,EAAerB,GACvD,IAAMsB,EAAMtB,GAAUnuB,EAAMquB,QAC5BC,EAAemB,EAAKlB,EAAWC,GAC/B,IAAM5L,EAAS,CACX8M,YAAa,QACbC,QAASF,EACTG,WAAYrB,EACZsB,YAAarB,EACbsB,gBAAiBN,GAErB,OAAOR,EAAS,uBAAwB3G,KAAK0H,UAAUnN,GAAS,CAC5D,eAAgB,sBDfpBoN,SEiBoB,SAACzB,EAAWC,EAAYtW,EAAMiW,GAClD,IAAMsB,EAAMtB,GAAUnuB,EAAMquB,QACtB4B,EAvBW,SAAC/X,GAClB,IAAI+X,EAOJ,KALIA,EADgB,kBAAT/X,EACOmP,SAAS6I,cAAchY,GAGvBA,IAE2B,SAAzB+X,EAAYE,SAC5B,KAAM,0FAEV,OAAOF,EAYaG,CAAalY,GACjCoW,EAAemB,EAAKlB,EAAWC,GAC/B,IAAM6B,EAAW,IAAIC,SAASL,GAK9B,OAJAI,EAASE,OAAO,cAAe,SAC/BF,EAASE,OAAO,aAAchC,GAC9B8B,EAASE,OAAO,cAAe/B,GAC/B6B,EAASE,OAAO,UAAWd,GACpBT,EAAS,4BAA6BqB","file":"static/js/3.a2549665.chunk.js","sourcesContent":["import * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nexport var HOOK_MARK = 'RC_FORM_INTERNAL_HOOKS'; // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nvar warningFunc = function warningFunc() {\n warning(false, 'Can not find FormContext. Please make sure you wrap Field under Form.');\n};\n\nvar Context = /*#__PURE__*/React.createContext({\n getFieldValue: warningFunc,\n getFieldsValue: warningFunc,\n getFieldError: warningFunc,\n getFieldsError: warningFunc,\n isFieldsTouched: warningFunc,\n isFieldTouched: warningFunc,\n isFieldValidating: warningFunc,\n isFieldsValidating: warningFunc,\n resetFields: warningFunc,\n setFields: warningFunc,\n setFieldsValue: warningFunc,\n validateFields: warningFunc,\n submit: warningFunc,\n getInternalHooks: function getInternalHooks() {\n warningFunc();\n return {\n dispatch: warningFunc,\n initEntityValue: warningFunc,\n registerField: warningFunc,\n useSubscribe: warningFunc,\n setInitialValues: warningFunc,\n setCallbacks: warningFunc,\n getFields: warningFunc,\n setValidateMessages: warningFunc,\n setPreserve: warningFunc\n };\n }\n});\nexport default Context;","export function toArray(value) {\n if (value === undefined || value === null) {\n return [];\n }\n\n return Array.isArray(value) ? value : [value];\n}","export default function get(entity, path) {\n var current = entity;\n\n for (var i = 0; i < path.length; i += 1) {\n if (current === null || current === undefined) {\n return undefined;\n }\n\n current = current[path[i]];\n }\n\n return current;\n}","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _toArray from \"@babel/runtime/helpers/esm/toArray\";\nimport get from './get';\n\nfunction internalSet(entity, paths, value, removeIfUndefined) {\n if (!paths.length) {\n return value;\n }\n\n var _paths = _toArray(paths),\n path = _paths[0],\n restPath = _paths.slice(1);\n\n var clone;\n\n if (!entity && typeof path === 'number') {\n clone = [];\n } else if (Array.isArray(entity)) {\n clone = _toConsumableArray(entity);\n } else {\n clone = _objectSpread({}, entity);\n } // Delete prop if `removeIfUndefined` and value is undefined\n\n\n if (removeIfUndefined && value === undefined && restPath.length === 1) {\n delete clone[path][restPath[0]];\n } else {\n clone[path] = internalSet(clone[path], restPath, value, removeIfUndefined);\n }\n\n return clone;\n}\n\nexport default function set(entity, paths, value) {\n var removeIfUndefined = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n // Do nothing if `removeIfUndefined` and parent object not exist\n if (paths.length && removeIfUndefined && value === undefined && !get(entity, paths.slice(0, -1))) {\n return entity;\n }\n\n return internalSet(entity, paths, value, removeIfUndefined);\n}","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport get from \"rc-util/es/utils/get\";\nimport set from \"rc-util/es/utils/set\";\nimport { toArray } from './typeUtil';\n/**\n * Convert name to internal supported format.\n * This function should keep since we still thinking if need support like `a.b.c` format.\n * 'a' => ['a']\n * 123 => [123]\n * ['a', 123] => ['a', 123]\n */\n\nexport function getNamePath(path) {\n return toArray(path);\n}\nexport function getValue(store, namePath) {\n var value = get(store, namePath);\n return value;\n}\nexport function setValue(store, namePath, value) {\n var removeIfUndefined = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var newStore = set(store, namePath, value, removeIfUndefined);\n return newStore;\n}\nexport function cloneByNamePathList(store, namePathList) {\n var newStore = {};\n namePathList.forEach(function (namePath) {\n var value = getValue(store, namePath);\n newStore = setValue(newStore, namePath, value);\n });\n return newStore;\n}\nexport function containsNamePath(namePathList, namePath) {\n return namePathList && namePathList.some(function (path) {\n return matchNamePath(path, namePath);\n });\n}\n\nfunction isObject(obj) {\n return _typeof(obj) === 'object' && obj !== null && Object.getPrototypeOf(obj) === Object.prototype;\n}\n/**\n * Copy values into store and return a new values object\n * ({ a: 1, b: { c: 2 } }, { a: 4, b: { d: 5 } }) => { a: 4, b: { c: 2, d: 5 } }\n */\n\n\nfunction internalSetValues(store, values) {\n var newStore = Array.isArray(store) ? _toConsumableArray(store) : _objectSpread({}, store);\n\n if (!values) {\n return newStore;\n }\n\n Object.keys(values).forEach(function (key) {\n var prevValue = newStore[key];\n var value = values[key]; // If both are object (but target is not array), we use recursion to set deep value\n\n var recursive = isObject(prevValue) && isObject(value);\n newStore[key] = recursive ? internalSetValues(prevValue, value || {}) : value;\n });\n return newStore;\n}\n\nexport function setValues(store) {\n for (var _len = arguments.length, restValues = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n restValues[_key - 1] = arguments[_key];\n }\n\n return restValues.reduce(function (current, newStore) {\n return internalSetValues(current, newStore);\n }, store);\n}\nexport function matchNamePath(namePath, changedNamePath) {\n if (!namePath || !changedNamePath || namePath.length !== changedNamePath.length) {\n return false;\n }\n\n return namePath.every(function (nameUnit, i) {\n return changedNamePath[i] === nameUnit;\n });\n}\nexport function isSimilar(source, target) {\n if (source === target) {\n return true;\n }\n\n if (!source && target || source && !target) {\n return false;\n }\n\n if (!source || !target || _typeof(source) !== 'object' || _typeof(target) !== 'object') {\n return false;\n }\n\n var sourceKeys = Object.keys(source);\n var targetKeys = Object.keys(target);\n var keys = new Set([].concat(_toConsumableArray(sourceKeys), _toConsumableArray(targetKeys)));\n return _toConsumableArray(keys).every(function (key) {\n var sourceValue = source[key];\n var targetValue = target[key];\n\n if (typeof sourceValue === 'function' && typeof targetValue === 'function') {\n return true;\n }\n\n return sourceValue === targetValue;\n });\n}\nexport function defaultGetValueFromEvent(valuePropName) {\n var event = arguments.length <= 1 ? undefined : arguments[1];\n\n if (event && event.target && valuePropName in event.target) {\n return event.target[valuePropName];\n }\n\n return event;\n}\n/**\n * Moves an array item from one position in an array to another.\n *\n * Note: This is a pure function so a new array will be returned, instead\n * of altering the array argument.\n *\n * @param array Array in which to move an item. (required)\n * @param moveIndex The index of the item to move. (required)\n * @param toIndex The index to move item at moveIndex to. (required)\n */\n\nexport function move(array, moveIndex, toIndex) {\n var length = array.length;\n\n if (moveIndex < 0 || moveIndex >= length || toIndex < 0 || toIndex >= length) {\n return array;\n }\n\n var item = array[moveIndex];\n var diff = moveIndex - toIndex;\n\n if (diff > 0) {\n // move left\n return [].concat(_toConsumableArray(array.slice(0, toIndex)), [item], _toConsumableArray(array.slice(toIndex, moveIndex)), _toConsumableArray(array.slice(moveIndex + 1, length)));\n }\n\n if (diff < 0) {\n // move right\n return [].concat(_toConsumableArray(array.slice(0, moveIndex)), _toConsumableArray(array.slice(moveIndex + 1, toIndex + 1)), [item], _toConsumableArray(array.slice(toIndex + 1, length)));\n }\n\n return array;\n}","var typeTemplate = \"'${name}' is not a valid ${type}\";\nexport var defaultValidateMessages = {\n default: \"Validation error on field '${name}'\",\n required: \"'${name}' is required\",\n enum: \"'${name}' must be one of [${enum}]\",\n whitespace: \"'${name}' cannot be empty\",\n date: {\n format: \"'${name}' is invalid for format date\",\n parse: \"'${name}' could not be parsed as date\",\n invalid: \"'${name}' is invalid date\"\n },\n types: {\n string: typeTemplate,\n method: typeTemplate,\n array: typeTemplate,\n object: typeTemplate,\n number: typeTemplate,\n date: typeTemplate,\n boolean: typeTemplate,\n integer: typeTemplate,\n float: typeTemplate,\n regexp: typeTemplate,\n email: typeTemplate,\n url: typeTemplate,\n hex: typeTemplate\n },\n string: {\n len: \"'${name}' must be exactly ${len} characters\",\n min: \"'${name}' must be at least ${min} characters\",\n max: \"'${name}' cannot be longer than ${max} characters\",\n range: \"'${name}' must be between ${min} and ${max} characters\"\n },\n number: {\n len: \"'${name}' must equal ${len}\",\n min: \"'${name}' cannot be less than ${min}\",\n max: \"'${name}' cannot be greater than ${max}\",\n range: \"'${name}' must be between ${min} and ${max}\"\n },\n array: {\n len: \"'${name}' must be exactly ${len} in length\",\n min: \"'${name}' cannot be less than ${min} in length\",\n max: \"'${name}' cannot be greater than ${max} in length\",\n range: \"'${name}' must be between ${min} and ${max} in length\"\n },\n pattern: {\n mismatch: \"'${name}' does not match pattern ${pattern}\"\n }\n};","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/esm/asyncToGenerator\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport RawAsyncValidator from 'async-validator';\nimport * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nimport { setValues } from './valueUtil';\nimport { defaultValidateMessages } from './messages'; // Remove incorrect original ts define\n\nvar AsyncValidator = RawAsyncValidator;\n/**\n * Replace with template.\n * `I'm ${name}` + { name: 'bamboo' } = I'm bamboo\n */\n\nfunction replaceMessage(template, kv) {\n return template.replace(/\\$\\{\\w+\\}/g, function (str) {\n var key = str.slice(2, -1);\n return kv[key];\n });\n}\n/**\n * We use `async-validator` to validate rules. So have to hot replace the message with validator.\n * { required: '${name} is required' } => { required: () => 'field is required' }\n */\n\n\nfunction convertMessages(messages, name, rule, messageVariables) {\n var kv = _objectSpread(_objectSpread({}, rule), {}, {\n name: name,\n enum: (rule.enum || []).join(', ')\n });\n\n var replaceFunc = function replaceFunc(template, additionalKV) {\n return function () {\n return replaceMessage(template, _objectSpread(_objectSpread({}, kv), additionalKV));\n };\n };\n /* eslint-disable no-param-reassign */\n\n\n function fillTemplate(source) {\n var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n Object.keys(source).forEach(function (ruleName) {\n var value = source[ruleName];\n\n if (typeof value === 'string') {\n target[ruleName] = replaceFunc(value, messageVariables);\n } else if (value && _typeof(value) === 'object') {\n target[ruleName] = {};\n fillTemplate(value, target[ruleName]);\n } else {\n target[ruleName] = value;\n }\n });\n return target;\n }\n /* eslint-enable */\n\n\n return fillTemplate(setValues({}, defaultValidateMessages, messages));\n}\n\nfunction validateRule(_x, _x2, _x3, _x4, _x5) {\n return _validateRule.apply(this, arguments);\n}\n/**\n * We use `async-validator` to validate the value.\n * But only check one value in a time to avoid namePath validate issue.\n */\n\n\nfunction _validateRule() {\n _validateRule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(name, value, rule, options, messageVariables) {\n var cloneRule, subRuleField, validator, messages, result, subResults;\n return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n cloneRule = _objectSpread({}, rule); // We should special handle array validate\n\n subRuleField = null;\n\n if (cloneRule && cloneRule.type === 'array' && cloneRule.defaultField) {\n subRuleField = cloneRule.defaultField;\n delete cloneRule.defaultField;\n }\n\n validator = new AsyncValidator(_defineProperty({}, name, [cloneRule]));\n messages = convertMessages(options.validateMessages, name, cloneRule, messageVariables);\n validator.messages(messages);\n result = [];\n _context2.prev = 7;\n _context2.next = 10;\n return Promise.resolve(validator.validate(_defineProperty({}, name, value), _objectSpread({}, options)));\n\n case 10:\n _context2.next = 15;\n break;\n\n case 12:\n _context2.prev = 12;\n _context2.t0 = _context2[\"catch\"](7);\n\n if (_context2.t0.errors) {\n result = _context2.t0.errors.map(function (_ref2, index) {\n var message = _ref2.message;\n return (// Wrap ReactNode with `key`\n\n /*#__PURE__*/\n React.isValidElement(message) ? /*#__PURE__*/React.cloneElement(message, {\n key: \"error_\".concat(index)\n }) : message\n );\n });\n } else {\n console.error(_context2.t0);\n result = [messages.default()];\n }\n\n case 15:\n if (!(!result.length && subRuleField)) {\n _context2.next = 20;\n break;\n }\n\n _context2.next = 18;\n return Promise.all(value.map(function (subValue, i) {\n return validateRule(\"\".concat(name, \".\").concat(i), subValue, subRuleField, options, messageVariables);\n }));\n\n case 18:\n subResults = _context2.sent;\n return _context2.abrupt(\"return\", subResults.reduce(function (prev, errors) {\n return [].concat(_toConsumableArray(prev), _toConsumableArray(errors));\n }, []));\n\n case 20:\n return _context2.abrupt(\"return\", result);\n\n case 21:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, null, [[7, 12]]);\n }));\n return _validateRule.apply(this, arguments);\n}\n\nexport function validateRules(namePath, value, rules, options, validateFirst, messageVariables) {\n var name = namePath.join('.'); // Fill rule with context\n\n var filledRules = rules.map(function (currentRule) {\n var originValidatorFunc = currentRule.validator;\n\n if (!originValidatorFunc) {\n return currentRule;\n }\n\n return _objectSpread(_objectSpread({}, currentRule), {}, {\n validator: function validator(rule, val, callback) {\n var hasPromise = false; // Wrap callback only accept when promise not provided\n\n var wrappedCallback = function wrappedCallback() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // Wait a tick to make sure return type is a promise\n Promise.resolve().then(function () {\n warning(!hasPromise, 'Your validator function has already return a promise. `callback` will be ignored.');\n\n if (!hasPromise) {\n callback.apply(void 0, args);\n }\n });\n }; // Get promise\n\n\n var promise = originValidatorFunc(rule, val, wrappedCallback);\n hasPromise = promise && typeof promise.then === 'function' && typeof promise.catch === 'function';\n /**\n * 1. Use promise as the first priority.\n * 2. If promise not exist, use callback with warning instead\n */\n\n warning(hasPromise, '`callback` is deprecated. Please return a promise instead.');\n\n if (hasPromise) {\n promise.then(function () {\n callback();\n }).catch(function (err) {\n callback(err || ' ');\n });\n }\n }\n });\n });\n var summaryPromise;\n\n if (validateFirst === true) {\n // >>>>> Validate by serialization\n summaryPromise = new Promise( /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(resolve, reject) {\n var i, errors;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n i = 0;\n\n case 1:\n if (!(i < filledRules.length)) {\n _context.next = 11;\n break;\n }\n\n _context.next = 4;\n return validateRule(name, value, filledRules[i], options, messageVariables);\n\n case 4:\n errors = _context.sent;\n\n if (!errors.length) {\n _context.next = 8;\n break;\n }\n\n reject(errors);\n return _context.abrupt(\"return\");\n\n case 8:\n i += 1;\n _context.next = 1;\n break;\n\n case 11:\n /* eslint-enable */\n resolve([]);\n\n case 12:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n\n return function (_x6, _x7) {\n return _ref.apply(this, arguments);\n };\n }());\n } else {\n // >>>>> Validate by parallel\n var rulePromises = filledRules.map(function (rule) {\n return validateRule(name, value, rule, options, messageVariables);\n });\n summaryPromise = (validateFirst ? finishOnFirstFailed(rulePromises) : finishOnAllFailed(rulePromises)).then(function (errors) {\n if (!errors.length) {\n return [];\n }\n\n return Promise.reject(errors);\n });\n } // Internal catch error to avoid console error log.\n\n\n summaryPromise.catch(function (e) {\n return e;\n });\n return summaryPromise;\n}\n\nfunction finishOnAllFailed(_x8) {\n return _finishOnAllFailed.apply(this, arguments);\n}\n\nfunction _finishOnAllFailed() {\n _finishOnAllFailed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(rulePromises) {\n return _regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n return _context3.abrupt(\"return\", Promise.all(rulePromises).then(function (errorsList) {\n var _ref3;\n\n var errors = (_ref3 = []).concat.apply(_ref3, _toConsumableArray(errorsList));\n\n return errors;\n }));\n\n case 1:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n return _finishOnAllFailed.apply(this, arguments);\n}\n\nfunction finishOnFirstFailed(_x9) {\n return _finishOnFirstFailed.apply(this, arguments);\n}\n\nfunction _finishOnFirstFailed() {\n _finishOnFirstFailed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(rulePromises) {\n var count;\n return _regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n count = 0;\n return _context4.abrupt(\"return\", new Promise(function (resolve) {\n rulePromises.forEach(function (promise) {\n promise.then(function (errors) {\n if (errors.length) {\n resolve(errors);\n }\n\n count += 1;\n\n if (count === rulePromises.length) {\n resolve([]);\n }\n });\n });\n }));\n\n case 2:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4);\n }));\n return _finishOnFirstFailed.apply(this, arguments);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport toChildrenArray from \"rc-util/es/Children/toArray\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport FieldContext, { HOOK_MARK } from './FieldContext';\nimport { toArray } from './utils/typeUtil';\nimport { validateRules } from './utils/validateUtil';\nimport { containsNamePath, defaultGetValueFromEvent, getNamePath, getValue } from './utils/valueUtil';\n\nfunction requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) {\n if (typeof shouldUpdate === 'function') {\n return shouldUpdate(prev, next, 'source' in info ? {\n source: info.source\n } : {});\n }\n\n return prevValue !== nextValue;\n} // We use Class instead of Hooks here since it will cost much code by using Hooks.\n\n\nvar Field = /*#__PURE__*/function (_React$Component) {\n _inherits(Field, _React$Component);\n\n var _super = _createSuper(Field);\n\n // ============================== Subscriptions ==============================\n function Field(props) {\n var _this;\n\n _classCallCheck(this, Field);\n\n _this = _super.call(this, props);\n _this.state = {\n resetCount: 0\n };\n _this.cancelRegisterFunc = null;\n _this.mounted = false;\n /**\n * Follow state should not management in State since it will async update by React.\n * This makes first render of form can not get correct state value.\n */\n\n _this.touched = false;\n /** Mark when touched & validated. Currently only used for `dependencies` */\n\n _this.dirty = false;\n _this.validatePromise = null;\n _this.errors = [];\n\n _this.cancelRegister = function () {\n var _this$props = _this.props,\n preserve = _this$props.preserve,\n isListField = _this$props.isListField,\n name = _this$props.name;\n\n if (_this.cancelRegisterFunc) {\n _this.cancelRegisterFunc(isListField, preserve, getNamePath(name));\n }\n\n _this.cancelRegisterFunc = null;\n }; // ================================== Utils ==================================\n\n\n _this.getNamePath = function () {\n var _this$props2 = _this.props,\n name = _this$props2.name,\n fieldContext = _this$props2.fieldContext;\n var _fieldContext$prefixN = fieldContext.prefixName,\n prefixName = _fieldContext$prefixN === void 0 ? [] : _fieldContext$prefixN;\n return name !== undefined ? [].concat(_toConsumableArray(prefixName), _toConsumableArray(name)) : [];\n };\n\n _this.getRules = function () {\n var _this$props3 = _this.props,\n _this$props3$rules = _this$props3.rules,\n rules = _this$props3$rules === void 0 ? [] : _this$props3$rules,\n fieldContext = _this$props3.fieldContext;\n return rules.map(function (rule) {\n if (typeof rule === 'function') {\n return rule(fieldContext);\n }\n\n return rule;\n });\n };\n\n _this.refresh = function () {\n if (!_this.mounted) return;\n /**\n * Clean up current node.\n */\n\n _this.setState(function (_ref) {\n var resetCount = _ref.resetCount;\n return {\n resetCount: resetCount + 1\n };\n });\n }; // ========================= Field Entity Interfaces =========================\n // Trigger by store update. Check if need update the component\n\n\n _this.onStoreChange = function (prevStore, namePathList, info) {\n var _this$props4 = _this.props,\n shouldUpdate = _this$props4.shouldUpdate,\n _this$props4$dependen = _this$props4.dependencies,\n dependencies = _this$props4$dependen === void 0 ? [] : _this$props4$dependen,\n onReset = _this$props4.onReset;\n var store = info.store;\n\n var namePath = _this.getNamePath();\n\n var prevValue = _this.getValue(prevStore);\n\n var curValue = _this.getValue(store);\n\n var namePathMatch = namePathList && containsNamePath(namePathList, namePath); // `setFieldsValue` is a quick access to update related status\n\n if (info.type === 'valueUpdate' && info.source === 'external' && prevValue !== curValue) {\n _this.touched = true;\n _this.dirty = true;\n _this.validatePromise = null;\n _this.errors = [];\n }\n\n switch (info.type) {\n case 'reset':\n if (!namePathList || namePathMatch) {\n // Clean up state\n _this.touched = false;\n _this.dirty = false;\n _this.validatePromise = null;\n _this.errors = [];\n\n if (onReset) {\n onReset();\n }\n\n _this.refresh();\n\n return;\n }\n\n break;\n\n case 'setField':\n {\n if (namePathMatch) {\n var data = info.data;\n\n if ('touched' in data) {\n _this.touched = data.touched;\n }\n\n if ('validating' in data && !('originRCField' in data)) {\n _this.validatePromise = data.validating ? Promise.resolve([]) : null;\n }\n\n if ('errors' in data) {\n _this.errors = data.errors || [];\n }\n\n _this.dirty = true;\n\n _this.reRender();\n\n return;\n } // Handle update by `setField` with `shouldUpdate`\n\n\n if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n\n return;\n }\n\n break;\n }\n\n case 'dependenciesUpdate':\n {\n /**\n * Trigger when marked `dependencies` updated. Related fields will all update\n */\n var dependencyList = dependencies.map(getNamePath); // No need for `namePathMath` check and `shouldUpdate` check, since `valueUpdate` will be\n // emitted earlier and they will work there\n // If set it may cause unnecessary twice rerendering\n\n if (dependencyList.some(function (dependency) {\n return containsNamePath(info.relatedFields, dependency);\n })) {\n _this.reRender();\n\n return;\n }\n\n break;\n }\n\n default:\n // 1. If `namePath` exists in `namePathList`, means it's related value and should update\n // For example \n // If `namePathList` is [['list']] (List value update), Field should be updated\n // If `namePathList` is [['list', 0]] (Field value update), List shouldn't be updated\n // 2.\n // 2.1 If `dependencies` is set, `name` is not set and `shouldUpdate` is not set,\n // don't use `shouldUpdate`. `dependencies` is view as a shortcut if `shouldUpdate`\n // is not provided\n // 2.2 If `shouldUpdate` provided, use customize logic to update the field\n // else to check if value changed\n if (namePathMatch || (!dependencies.length || namePath.length || shouldUpdate) && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n\n return;\n }\n\n break;\n }\n\n if (shouldUpdate === true) {\n _this.reRender();\n }\n };\n\n _this.validateRules = function (options) {\n // We should fixed namePath & value to avoid developer change then by form function\n var namePath = _this.getNamePath();\n\n var currentValue = _this.getValue(); // Force change to async to avoid rule OOD under renderProps field\n\n\n var rootPromise = Promise.resolve().then(function () {\n if (!_this.mounted) {\n return [];\n }\n\n var _this$props5 = _this.props,\n _this$props5$validate = _this$props5.validateFirst,\n validateFirst = _this$props5$validate === void 0 ? false : _this$props5$validate,\n messageVariables = _this$props5.messageVariables;\n\n var _ref2 = options || {},\n triggerName = _ref2.triggerName;\n\n var filteredRules = _this.getRules();\n\n if (triggerName) {\n filteredRules = filteredRules.filter(function (rule) {\n var validateTrigger = rule.validateTrigger;\n\n if (!validateTrigger) {\n return true;\n }\n\n var triggerList = toArray(validateTrigger);\n return triggerList.includes(triggerName);\n });\n }\n\n var promise = validateRules(namePath, currentValue, filteredRules, options, validateFirst, messageVariables);\n promise.catch(function (e) {\n return e;\n }).then(function () {\n var errors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n if (_this.validatePromise === rootPromise) {\n _this.validatePromise = null;\n _this.errors = errors;\n\n _this.reRender();\n }\n });\n return promise;\n });\n _this.validatePromise = rootPromise;\n _this.dirty = true;\n _this.errors = []; // Force trigger re-render since we need sync renderProps with new meta\n\n _this.reRender();\n\n return rootPromise;\n };\n\n _this.isFieldValidating = function () {\n return !!_this.validatePromise;\n };\n\n _this.isFieldTouched = function () {\n return _this.touched;\n };\n\n _this.isFieldDirty = function () {\n return _this.dirty;\n };\n\n _this.getErrors = function () {\n return _this.errors;\n };\n\n _this.isListField = function () {\n return _this.props.isListField;\n };\n\n _this.isList = function () {\n return _this.props.isList;\n };\n\n _this.isPreserve = function () {\n return _this.props.preserve;\n }; // ============================= Child Component =============================\n\n\n _this.getMeta = function () {\n // Make error & validating in cache to save perf\n _this.prevValidating = _this.isFieldValidating();\n var meta = {\n touched: _this.isFieldTouched(),\n validating: _this.prevValidating,\n errors: _this.errors,\n name: _this.getNamePath()\n };\n return meta;\n }; // Only return validate child node. If invalidate, will do nothing about field.\n\n\n _this.getOnlyChild = function (children) {\n // Support render props\n if (typeof children === 'function') {\n var meta = _this.getMeta();\n\n return _objectSpread(_objectSpread({}, _this.getOnlyChild(children(_this.getControlled(), meta, _this.props.fieldContext))), {}, {\n isFunction: true\n });\n } // Filed element only\n\n\n var childList = toChildrenArray(children);\n\n if (childList.length !== 1 || ! /*#__PURE__*/React.isValidElement(childList[0])) {\n return {\n child: childList,\n isFunction: false\n };\n }\n\n return {\n child: childList[0],\n isFunction: false\n };\n }; // ============================== Field Control ==============================\n\n\n _this.getValue = function (store) {\n var getFieldsValue = _this.props.fieldContext.getFieldsValue;\n\n var namePath = _this.getNamePath();\n\n return getValue(store || getFieldsValue(true), namePath);\n };\n\n _this.getControlled = function () {\n var childProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _this$props6 = _this.props,\n trigger = _this$props6.trigger,\n validateTrigger = _this$props6.validateTrigger,\n getValueFromEvent = _this$props6.getValueFromEvent,\n normalize = _this$props6.normalize,\n valuePropName = _this$props6.valuePropName,\n getValueProps = _this$props6.getValueProps,\n fieldContext = _this$props6.fieldContext;\n var mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : fieldContext.validateTrigger;\n\n var namePath = _this.getNamePath();\n\n var getInternalHooks = fieldContext.getInternalHooks,\n getFieldsValue = fieldContext.getFieldsValue;\n\n var _getInternalHooks = getInternalHooks(HOOK_MARK),\n dispatch = _getInternalHooks.dispatch;\n\n var value = _this.getValue();\n\n var mergedGetValueProps = getValueProps || function (val) {\n return _defineProperty({}, valuePropName, val);\n }; // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n var originTriggerFunc = childProps[trigger];\n\n var control = _objectSpread(_objectSpread({}, childProps), mergedGetValueProps(value)); // Add trigger\n\n\n control[trigger] = function () {\n // Mark as touched\n _this.touched = true;\n _this.dirty = true;\n var newValue;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (getValueFromEvent) {\n newValue = getValueFromEvent.apply(void 0, args);\n } else {\n newValue = defaultGetValueFromEvent.apply(void 0, [valuePropName].concat(args));\n }\n\n if (normalize) {\n newValue = normalize(newValue, value, getFieldsValue(true));\n }\n\n dispatch({\n type: 'updateValue',\n namePath: namePath,\n value: newValue\n });\n\n if (originTriggerFunc) {\n originTriggerFunc.apply(void 0, args);\n }\n }; // Add validateTrigger\n\n\n var validateTriggerList = toArray(mergedValidateTrigger || []);\n validateTriggerList.forEach(function (triggerName) {\n // Wrap additional function of component, so that we can get latest value from store\n var originTrigger = control[triggerName];\n\n control[triggerName] = function () {\n if (originTrigger) {\n originTrigger.apply(void 0, arguments);\n } // Always use latest rules\n\n\n var rules = _this.props.rules;\n\n if (rules && rules.length) {\n // We dispatch validate to root,\n // since it will update related data with other field with same name\n dispatch({\n type: 'validateField',\n namePath: namePath,\n triggerName: triggerName\n });\n }\n };\n });\n return control;\n }; // Register on init\n\n\n if (props.fieldContext) {\n var getInternalHooks = props.fieldContext.getInternalHooks;\n\n var _getInternalHooks2 = getInternalHooks(HOOK_MARK),\n initEntityValue = _getInternalHooks2.initEntityValue;\n\n initEntityValue(_assertThisInitialized(_this));\n }\n\n return _this;\n }\n\n _createClass(Field, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props7 = this.props,\n shouldUpdate = _this$props7.shouldUpdate,\n fieldContext = _this$props7.fieldContext;\n this.mounted = true; // Register on init\n\n if (fieldContext) {\n var getInternalHooks = fieldContext.getInternalHooks;\n\n var _getInternalHooks3 = getInternalHooks(HOOK_MARK),\n registerField = _getInternalHooks3.registerField;\n\n this.cancelRegisterFunc = registerField(this);\n } // One more render for component in case fields not ready\n\n\n if (shouldUpdate === true) {\n this.reRender();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelRegister();\n this.mounted = false;\n }\n }, {\n key: \"reRender\",\n value: function reRender() {\n if (!this.mounted) return;\n this.forceUpdate();\n }\n }, {\n key: \"render\",\n value: function render() {\n var resetCount = this.state.resetCount;\n var children = this.props.children;\n\n var _this$getOnlyChild = this.getOnlyChild(children),\n child = _this$getOnlyChild.child,\n isFunction = _this$getOnlyChild.isFunction; // Not need to `cloneElement` since user can handle this in render function self\n\n\n var returnChildNode;\n\n if (isFunction) {\n returnChildNode = child;\n } else if ( /*#__PURE__*/React.isValidElement(child)) {\n returnChildNode = /*#__PURE__*/React.cloneElement(child, this.getControlled(child.props));\n } else {\n warning(!child, '`children` of Field is not validate ReactElement.');\n returnChildNode = child;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: resetCount\n }, returnChildNode);\n }\n }]);\n\n return Field;\n}(React.Component);\n\nField.contextType = FieldContext;\nField.defaultProps = {\n trigger: 'onChange',\n valuePropName: 'value'\n};\n\nfunction WrapperField(_ref4) {\n var name = _ref4.name,\n restProps = _objectWithoutProperties(_ref4, [\"name\"]);\n\n var fieldContext = React.useContext(FieldContext);\n var namePath = name !== undefined ? getNamePath(name) : undefined;\n var key = 'keep';\n\n if (!restProps.isListField) {\n key = \"_\".concat((namePath || []).join('_'));\n } // Warning if it's a directly list field.\n // We can still support multiple level field preserve.\n\n\n if (process.env.NODE_ENV !== 'production' && restProps.preserve === false && restProps.isListField && namePath.length <= 1) {\n warning(false, '`preserve` should not apply on Form.List fields.');\n }\n\n return /*#__PURE__*/React.createElement(Field, _extends({\n key: key,\n name: namePath\n }, restProps, {\n fieldContext: fieldContext\n }));\n}\n\nexport default WrapperField;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nimport FieldContext from './FieldContext';\nimport Field from './Field';\nimport { move as _move, getNamePath } from './utils/valueUtil';\n\nvar List = function List(_ref) {\n var name = _ref.name,\n initialValue = _ref.initialValue,\n children = _ref.children,\n rules = _ref.rules,\n validateTrigger = _ref.validateTrigger;\n var context = React.useContext(FieldContext);\n var keyRef = React.useRef({\n keys: [],\n id: 0\n });\n var keyManager = keyRef.current; // User should not pass `children` as other type.\n\n if (typeof children !== 'function') {\n warning(false, 'Form.List only accepts function as children.');\n return null;\n }\n\n var parentPrefixName = getNamePath(context.prefixName) || [];\n var prefixName = [].concat(_toConsumableArray(parentPrefixName), _toConsumableArray(getNamePath(name)));\n\n var shouldUpdate = function shouldUpdate(prevValue, nextValue, _ref2) {\n var source = _ref2.source;\n\n if (source === 'internal') {\n return false;\n }\n\n return prevValue !== nextValue;\n };\n\n return /*#__PURE__*/React.createElement(FieldContext.Provider, {\n value: _objectSpread(_objectSpread({}, context), {}, {\n prefixName: prefixName\n })\n }, /*#__PURE__*/React.createElement(Field, {\n name: [],\n shouldUpdate: shouldUpdate,\n rules: rules,\n validateTrigger: validateTrigger,\n initialValue: initialValue,\n isList: true\n }, function (_ref3, meta) {\n var _ref3$value = _ref3.value,\n value = _ref3$value === void 0 ? [] : _ref3$value,\n onChange = _ref3.onChange;\n var getFieldValue = context.getFieldValue;\n\n var getNewValue = function getNewValue() {\n var values = getFieldValue(prefixName || []);\n return values || [];\n };\n /**\n * Always get latest value in case user update fields by `form` api.\n */\n\n\n var operations = {\n add: function add(defaultValue, index) {\n // Mapping keys\n var newValue = getNewValue();\n\n if (index >= 0 && index <= newValue.length) {\n keyManager.keys = [].concat(_toConsumableArray(keyManager.keys.slice(0, index)), [keyManager.id], _toConsumableArray(keyManager.keys.slice(index)));\n onChange([].concat(_toConsumableArray(newValue.slice(0, index)), [defaultValue], _toConsumableArray(newValue.slice(index))));\n } else {\n if (process.env.NODE_ENV !== 'production' && (index < 0 || index > newValue.length)) {\n warning(false, 'The second parameter of the add function should be a valid positive number.');\n }\n\n keyManager.keys = [].concat(_toConsumableArray(keyManager.keys), [keyManager.id]);\n onChange([].concat(_toConsumableArray(newValue), [defaultValue]));\n }\n\n keyManager.id += 1;\n },\n remove: function remove(index) {\n var newValue = getNewValue();\n var indexSet = new Set(Array.isArray(index) ? index : [index]);\n\n if (indexSet.size <= 0) {\n return;\n }\n\n keyManager.keys = keyManager.keys.filter(function (_, keysIndex) {\n return !indexSet.has(keysIndex);\n }); // Trigger store change\n\n onChange(newValue.filter(function (_, valueIndex) {\n return !indexSet.has(valueIndex);\n }));\n },\n move: function move(from, to) {\n if (from === to) {\n return;\n }\n\n var newValue = getNewValue(); // Do not handle out of range\n\n if (from < 0 || from >= newValue.length || to < 0 || to >= newValue.length) {\n return;\n }\n\n keyManager.keys = _move(keyManager.keys, from, to); // Trigger store change\n\n onChange(_move(newValue, from, to));\n }\n };\n var listValue = value || [];\n\n if (!Array.isArray(listValue)) {\n listValue = [];\n\n if (process.env.NODE_ENV !== 'production') {\n warning(false, \"Current value of '\".concat(prefixName.join(' > '), \"' is not an array type.\"));\n }\n }\n\n return children(listValue.map(function (__, index) {\n var key = keyManager.keys[index];\n\n if (key === undefined) {\n keyManager.keys[index] = keyManager.id;\n key = keyManager.keys[index];\n keyManager.id += 1;\n }\n\n return {\n name: index,\n key: key,\n isListField: true\n };\n }), operations, meta);\n }));\n};\n\nexport default List;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nvar SPLIT = '__@field_split__';\n/**\n * Convert name path into string to fast the fetch speed of Map.\n */\n\nfunction normalize(namePath) {\n return namePath.map(function (cell) {\n return \"\".concat(_typeof(cell), \":\").concat(cell);\n }) // Magic split\n .join(SPLIT);\n}\n/**\n * NameMap like a `Map` but accepts `string[]` as key.\n */\n\n\nvar NameMap = /*#__PURE__*/function () {\n function NameMap() {\n _classCallCheck(this, NameMap);\n\n this.kvs = new Map();\n }\n\n _createClass(NameMap, [{\n key: \"set\",\n value: function set(key, value) {\n this.kvs.set(normalize(key), value);\n }\n }, {\n key: \"get\",\n value: function get(key) {\n return this.kvs.get(normalize(key));\n }\n }, {\n key: \"update\",\n value: function update(key, updater) {\n var origin = this.get(key);\n var next = updater(origin);\n\n if (!next) {\n this.delete(key);\n } else {\n this.set(key, next);\n }\n }\n }, {\n key: \"delete\",\n value: function _delete(key) {\n this.kvs.delete(normalize(key));\n } // Since we only use this in test, let simply realize this\n\n }, {\n key: \"map\",\n value: function map(callback) {\n return _toConsumableArray(this.kvs.entries()).map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n\n var cells = key.split(SPLIT);\n return callback({\n key: cells.map(function (cell) {\n var _cell$match = cell.match(/^([^:]*):(.*)$/),\n _cell$match2 = _slicedToArray(_cell$match, 3),\n type = _cell$match2[1],\n unit = _cell$match2[2];\n\n return type === 'number' ? Number(unit) : unit;\n }),\n value: value\n });\n });\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var json = {};\n this.map(function (_ref3) {\n var key = _ref3.key,\n value = _ref3.value;\n json[key.join('.')] = value;\n return null;\n });\n return json;\n }\n }]);\n\n return NameMap;\n}();\n\nexport default NameMap;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nimport { HOOK_MARK } from './FieldContext';\nimport { allPromiseFinish } from './utils/asyncUtil';\nimport NameMap from './utils/NameMap';\nimport { defaultValidateMessages } from './utils/messages';\nimport { cloneByNamePathList, containsNamePath, getNamePath, getValue, matchNamePath, setValue, setValues } from './utils/valueUtil';\nexport var FormStore = function FormStore(forceRootUpdate) {\n var _this = this;\n\n _classCallCheck(this, FormStore);\n\n this.formHooked = false;\n this.subscribable = true;\n this.store = {};\n this.fieldEntities = [];\n this.initialValues = {};\n this.callbacks = {};\n this.validateMessages = null;\n this.preserve = null;\n this.lastValidatePromise = null;\n\n this.getForm = function () {\n return {\n getFieldValue: _this.getFieldValue,\n getFieldsValue: _this.getFieldsValue,\n getFieldError: _this.getFieldError,\n getFieldsError: _this.getFieldsError,\n isFieldsTouched: _this.isFieldsTouched,\n isFieldTouched: _this.isFieldTouched,\n isFieldValidating: _this.isFieldValidating,\n isFieldsValidating: _this.isFieldsValidating,\n resetFields: _this.resetFields,\n setFields: _this.setFields,\n setFieldsValue: _this.setFieldsValue,\n validateFields: _this.validateFields,\n submit: _this.submit,\n getInternalHooks: _this.getInternalHooks\n };\n }; // ======================== Internal Hooks ========================\n\n\n this.getInternalHooks = function (key) {\n if (key === HOOK_MARK) {\n _this.formHooked = true;\n return {\n dispatch: _this.dispatch,\n initEntityValue: _this.initEntityValue,\n registerField: _this.registerField,\n useSubscribe: _this.useSubscribe,\n setInitialValues: _this.setInitialValues,\n setCallbacks: _this.setCallbacks,\n setValidateMessages: _this.setValidateMessages,\n getFields: _this.getFields,\n setPreserve: _this.setPreserve\n };\n }\n\n warning(false, '`getInternalHooks` is internal usage. Should not call directly.');\n return null;\n };\n\n this.useSubscribe = function (subscribable) {\n _this.subscribable = subscribable;\n };\n /**\n * First time `setInitialValues` should update store with initial value\n */\n\n\n this.setInitialValues = function (initialValues, init) {\n _this.initialValues = initialValues || {};\n\n if (init) {\n _this.store = setValues({}, initialValues, _this.store);\n }\n };\n\n this.getInitialValue = function (namePath) {\n return getValue(_this.initialValues, namePath);\n };\n\n this.setCallbacks = function (callbacks) {\n _this.callbacks = callbacks;\n };\n\n this.setValidateMessages = function (validateMessages) {\n _this.validateMessages = validateMessages;\n };\n\n this.setPreserve = function (preserve) {\n _this.preserve = preserve;\n }; // ========================== Dev Warning =========================\n\n\n this.timeoutId = null;\n\n this.warningUnhooked = function () {\n if (process.env.NODE_ENV !== 'production' && !_this.timeoutId && typeof window !== 'undefined') {\n _this.timeoutId = setTimeout(function () {\n _this.timeoutId = null;\n\n if (!_this.formHooked) {\n warning(false, 'Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?');\n }\n });\n }\n }; // ============================ Fields ============================\n\n /**\n * Get registered field entities.\n * @param pure Only return field which has a `name`. Default: false\n */\n\n\n this.getFieldEntities = function () {\n var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (!pure) {\n return _this.fieldEntities;\n }\n\n return _this.fieldEntities.filter(function (field) {\n return field.getNamePath().length;\n });\n };\n\n this.getFieldsMap = function () {\n var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var cache = new NameMap();\n\n _this.getFieldEntities(pure).forEach(function (field) {\n var namePath = field.getNamePath();\n cache.set(namePath, field);\n });\n\n return cache;\n };\n\n this.getFieldEntitiesForNamePathList = function (nameList) {\n if (!nameList) {\n return _this.getFieldEntities(true);\n }\n\n var cache = _this.getFieldsMap(true);\n\n return nameList.map(function (name) {\n var namePath = getNamePath(name);\n return cache.get(namePath) || {\n INVALIDATE_NAME_PATH: getNamePath(name)\n };\n });\n };\n\n this.getFieldsValue = function (nameList, filterFunc) {\n _this.warningUnhooked();\n\n if (nameList === true && !filterFunc) {\n return _this.store;\n }\n\n var fieldEntities = _this.getFieldEntitiesForNamePathList(Array.isArray(nameList) ? nameList : null);\n\n var filteredNameList = [];\n fieldEntities.forEach(function (entity) {\n var _entity$isListField;\n\n var namePath = 'INVALIDATE_NAME_PATH' in entity ? entity.INVALIDATE_NAME_PATH : entity.getNamePath(); // Ignore when it's a list item and not specific the namePath,\n // since parent field is already take in count\n\n if (!nameList && ((_entity$isListField = entity.isListField) === null || _entity$isListField === void 0 ? void 0 : _entity$isListField.call(entity))) {\n return;\n }\n\n if (!filterFunc) {\n filteredNameList.push(namePath);\n } else {\n var meta = 'getMeta' in entity ? entity.getMeta() : null;\n\n if (filterFunc(meta)) {\n filteredNameList.push(namePath);\n }\n }\n });\n return cloneByNamePathList(_this.store, filteredNameList.map(getNamePath));\n };\n\n this.getFieldValue = function (name) {\n _this.warningUnhooked();\n\n var namePath = getNamePath(name);\n return getValue(_this.store, namePath);\n };\n\n this.getFieldsError = function (nameList) {\n _this.warningUnhooked();\n\n var fieldEntities = _this.getFieldEntitiesForNamePathList(nameList);\n\n return fieldEntities.map(function (entity, index) {\n if (entity && !('INVALIDATE_NAME_PATH' in entity)) {\n return {\n name: entity.getNamePath(),\n errors: entity.getErrors()\n };\n }\n\n return {\n name: getNamePath(nameList[index]),\n errors: []\n };\n });\n };\n\n this.getFieldError = function (name) {\n _this.warningUnhooked();\n\n var namePath = getNamePath(name);\n\n var fieldError = _this.getFieldsError([namePath])[0];\n\n return fieldError.errors;\n };\n\n this.isFieldsTouched = function () {\n _this.warningUnhooked();\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var arg0 = args[0],\n arg1 = args[1];\n var namePathList;\n var isAllFieldsTouched = false;\n\n if (args.length === 0) {\n namePathList = null;\n } else if (args.length === 1) {\n if (Array.isArray(arg0)) {\n namePathList = arg0.map(getNamePath);\n isAllFieldsTouched = false;\n } else {\n namePathList = null;\n isAllFieldsTouched = arg0;\n }\n } else {\n namePathList = arg0.map(getNamePath);\n isAllFieldsTouched = arg1;\n }\n\n var fieldEntities = _this.getFieldEntities(true);\n\n var isFieldTouched = function isFieldTouched(field) {\n return field.isFieldTouched();\n }; // ===== Will get fully compare when not config namePathList =====\n\n\n if (!namePathList) {\n return isAllFieldsTouched ? fieldEntities.every(isFieldTouched) : fieldEntities.some(isFieldTouched);\n } // Generate a nest tree for validate\n\n\n var map = new NameMap();\n namePathList.forEach(function (shortNamePath) {\n map.set(shortNamePath, []);\n });\n fieldEntities.forEach(function (field) {\n var fieldNamePath = field.getNamePath(); // Find matched entity and put into list\n\n namePathList.forEach(function (shortNamePath) {\n if (shortNamePath.every(function (nameUnit, i) {\n return fieldNamePath[i] === nameUnit;\n })) {\n map.update(shortNamePath, function (list) {\n return [].concat(_toConsumableArray(list), [field]);\n });\n }\n });\n }); // Check if NameMap value is touched\n\n var isNamePathListTouched = function isNamePathListTouched(entities) {\n return entities.some(isFieldTouched);\n };\n\n var namePathListEntities = map.map(function (_ref) {\n var value = _ref.value;\n return value;\n });\n return isAllFieldsTouched ? namePathListEntities.every(isNamePathListTouched) : namePathListEntities.some(isNamePathListTouched);\n };\n\n this.isFieldTouched = function (name) {\n _this.warningUnhooked();\n\n return _this.isFieldsTouched([name]);\n };\n\n this.isFieldsValidating = function (nameList) {\n _this.warningUnhooked();\n\n var fieldEntities = _this.getFieldEntities();\n\n if (!nameList) {\n return fieldEntities.some(function (testField) {\n return testField.isFieldValidating();\n });\n }\n\n var namePathList = nameList.map(getNamePath);\n return fieldEntities.some(function (testField) {\n var fieldNamePath = testField.getNamePath();\n return containsNamePath(namePathList, fieldNamePath) && testField.isFieldValidating();\n });\n };\n\n this.isFieldValidating = function (name) {\n _this.warningUnhooked();\n\n return _this.isFieldsValidating([name]);\n };\n /**\n * Reset Field with field `initialValue` prop.\n * Can pass `entities` or `namePathList` or just nothing.\n */\n\n\n this.resetWithFieldInitialValue = function () {\n var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Create cache\n var cache = new NameMap();\n\n var fieldEntities = _this.getFieldEntities(true);\n\n fieldEntities.forEach(function (field) {\n var initialValue = field.props.initialValue;\n var namePath = field.getNamePath(); // Record only if has `initialValue`\n\n if (initialValue !== undefined) {\n var records = cache.get(namePath) || new Set();\n records.add({\n entity: field,\n value: initialValue\n });\n cache.set(namePath, records);\n }\n }); // Reset\n\n var resetWithFields = function resetWithFields(entities) {\n entities.forEach(function (field) {\n var initialValue = field.props.initialValue;\n\n if (initialValue !== undefined) {\n var namePath = field.getNamePath();\n\n var formInitialValue = _this.getInitialValue(namePath);\n\n if (formInitialValue !== undefined) {\n // Warning if conflict with form initialValues and do not modify value\n warning(false, \"Form already set 'initialValues' with path '\".concat(namePath.join('.'), \"'. Field can not overwrite it.\"));\n } else {\n var records = cache.get(namePath);\n\n if (records && records.size > 1) {\n // Warning if multiple field set `initialValue`and do not modify value\n warning(false, \"Multiple Field with path '\".concat(namePath.join('.'), \"' set 'initialValue'. Can not decide which one to pick.\"));\n } else if (records) {\n var originValue = _this.getFieldValue(namePath); // Set `initialValue`\n\n\n if (!info.skipExist || originValue === undefined) {\n _this.store = setValue(_this.store, namePath, _toConsumableArray(records)[0].value);\n }\n }\n }\n }\n });\n };\n\n var requiredFieldEntities;\n\n if (info.entities) {\n requiredFieldEntities = info.entities;\n } else if (info.namePathList) {\n requiredFieldEntities = [];\n info.namePathList.forEach(function (namePath) {\n var records = cache.get(namePath);\n\n if (records) {\n var _requiredFieldEntitie;\n\n (_requiredFieldEntitie = requiredFieldEntities).push.apply(_requiredFieldEntitie, _toConsumableArray(_toConsumableArray(records).map(function (r) {\n return r.entity;\n })));\n }\n });\n } else {\n requiredFieldEntities = fieldEntities;\n }\n\n resetWithFields(requiredFieldEntities);\n };\n\n this.resetFields = function (nameList) {\n _this.warningUnhooked();\n\n var prevStore = _this.store;\n\n if (!nameList) {\n _this.store = setValues({}, _this.initialValues);\n\n _this.resetWithFieldInitialValue();\n\n _this.notifyObservers(prevStore, null, {\n type: 'reset'\n });\n\n return;\n } // Reset by `nameList`\n\n\n var namePathList = nameList.map(getNamePath);\n namePathList.forEach(function (namePath) {\n var initialValue = _this.getInitialValue(namePath);\n\n _this.store = setValue(_this.store, namePath, initialValue);\n });\n\n _this.resetWithFieldInitialValue({\n namePathList: namePathList\n });\n\n _this.notifyObservers(prevStore, namePathList, {\n type: 'reset'\n });\n };\n\n this.setFields = function (fields) {\n _this.warningUnhooked();\n\n var prevStore = _this.store;\n fields.forEach(function (fieldData) {\n var name = fieldData.name,\n errors = fieldData.errors,\n data = _objectWithoutProperties(fieldData, [\"name\", \"errors\"]);\n\n var namePath = getNamePath(name); // Value\n\n if ('value' in data) {\n _this.store = setValue(_this.store, namePath, data.value);\n }\n\n _this.notifyObservers(prevStore, [namePath], {\n type: 'setField',\n data: fieldData\n });\n });\n };\n\n this.getFields = function () {\n var entities = _this.getFieldEntities(true);\n\n var fields = entities.map(function (field) {\n var namePath = field.getNamePath();\n var meta = field.getMeta();\n\n var fieldData = _objectSpread(_objectSpread({}, meta), {}, {\n name: namePath,\n value: _this.getFieldValue(namePath)\n });\n\n Object.defineProperty(fieldData, 'originRCField', {\n value: true\n });\n return fieldData;\n });\n return fields;\n }; // =========================== Observer ===========================\n\n /**\n * This only trigger when a field is on constructor to avoid we get initialValue too late\n */\n\n\n this.initEntityValue = function (entity) {\n var initialValue = entity.props.initialValue;\n\n if (initialValue !== undefined) {\n var namePath = entity.getNamePath();\n var prevValue = getValue(_this.store, namePath);\n\n if (prevValue === undefined) {\n _this.store = setValue(_this.store, namePath, initialValue);\n }\n }\n };\n\n this.registerField = function (entity) {\n _this.fieldEntities.push(entity); // Set initial values\n\n\n if (entity.props.initialValue !== undefined) {\n var prevStore = _this.store;\n\n _this.resetWithFieldInitialValue({\n entities: [entity],\n skipExist: true\n });\n\n _this.notifyObservers(prevStore, [entity.getNamePath()], {\n type: 'valueUpdate',\n source: 'internal'\n });\n } // un-register field callback\n\n\n return function (isListField, preserve) {\n var subNamePath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n _this.fieldEntities = _this.fieldEntities.filter(function (item) {\n return item !== entity;\n }); // Clean up store value if not preserve\n\n var mergedPreserve = preserve !== undefined ? preserve : _this.preserve;\n\n if (mergedPreserve === false && (!isListField || subNamePath.length > 1)) {\n var namePath = entity.getNamePath();\n var defaultValue = isListField ? undefined : getValue(_this.initialValues, namePath);\n\n if (namePath.length && _this.getFieldValue(namePath) !== defaultValue && _this.fieldEntities.every(function (field) {\n return (// Only reset when no namePath exist\n !matchNamePath(field.getNamePath(), namePath)\n );\n })) {\n _this.store = setValue(_this.store, namePath, defaultValue, true);\n }\n }\n };\n };\n\n this.dispatch = function (action) {\n switch (action.type) {\n case 'updateValue':\n {\n var namePath = action.namePath,\n value = action.value;\n\n _this.updateValue(namePath, value);\n\n break;\n }\n\n case 'validateField':\n {\n var _namePath = action.namePath,\n triggerName = action.triggerName;\n\n _this.validateFields([_namePath], {\n triggerName: triggerName\n });\n\n break;\n }\n\n default: // Currently we don't have other action. Do nothing.\n\n }\n };\n\n this.notifyObservers = function (prevStore, namePathList, info) {\n if (_this.subscribable) {\n var mergedInfo = _objectSpread(_objectSpread({}, info), {}, {\n store: _this.getFieldsValue(true)\n });\n\n _this.getFieldEntities().forEach(function (_ref2) {\n var onStoreChange = _ref2.onStoreChange;\n onStoreChange(prevStore, namePathList, mergedInfo);\n });\n } else {\n _this.forceRootUpdate();\n }\n };\n\n this.updateValue = function (name, value) {\n var namePath = getNamePath(name);\n var prevStore = _this.store;\n _this.store = setValue(_this.store, namePath, value);\n\n _this.notifyObservers(prevStore, [namePath], {\n type: 'valueUpdate',\n source: 'internal'\n }); // Notify dependencies children with parent update\n // We need delay to trigger validate in case Field is under render props\n\n\n var childrenFields = _this.getDependencyChildrenFields(namePath);\n\n if (childrenFields.length) {\n _this.validateFields(childrenFields);\n }\n\n _this.notifyObservers(prevStore, childrenFields, {\n type: 'dependenciesUpdate',\n relatedFields: [namePath].concat(_toConsumableArray(childrenFields))\n }); // trigger callback function\n\n\n var onValuesChange = _this.callbacks.onValuesChange;\n\n if (onValuesChange) {\n var changedValues = cloneByNamePathList(_this.store, [namePath]);\n onValuesChange(changedValues, _this.getFieldsValue());\n }\n\n _this.triggerOnFieldsChange([namePath].concat(_toConsumableArray(childrenFields)));\n }; // Let all child Field get update.\n\n\n this.setFieldsValue = function (store) {\n _this.warningUnhooked();\n\n var prevStore = _this.store;\n\n if (store) {\n _this.store = setValues(_this.store, store);\n }\n\n _this.notifyObservers(prevStore, null, {\n type: 'valueUpdate',\n source: 'external'\n });\n };\n\n this.getDependencyChildrenFields = function (rootNamePath) {\n var children = new Set();\n var childrenFields = [];\n var dependencies2fields = new NameMap();\n /**\n * Generate maps\n * Can use cache to save perf if user report performance issue with this\n */\n\n _this.getFieldEntities().forEach(function (field) {\n var dependencies = field.props.dependencies;\n (dependencies || []).forEach(function (dependency) {\n var dependencyNamePath = getNamePath(dependency);\n dependencies2fields.update(dependencyNamePath, function () {\n var fields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Set();\n fields.add(field);\n return fields;\n });\n });\n });\n\n var fillChildren = function fillChildren(namePath) {\n var fields = dependencies2fields.get(namePath) || new Set();\n fields.forEach(function (field) {\n if (!children.has(field)) {\n children.add(field);\n var fieldNamePath = field.getNamePath();\n\n if (field.isFieldDirty() && fieldNamePath.length) {\n childrenFields.push(fieldNamePath);\n fillChildren(fieldNamePath);\n }\n }\n });\n };\n\n fillChildren(rootNamePath);\n return childrenFields;\n };\n\n this.triggerOnFieldsChange = function (namePathList, filedErrors) {\n var onFieldsChange = _this.callbacks.onFieldsChange;\n\n if (onFieldsChange) {\n var fields = _this.getFields();\n /**\n * Fill errors since `fields` may be replaced by controlled fields\n */\n\n\n if (filedErrors) {\n var cache = new NameMap();\n filedErrors.forEach(function (_ref3) {\n var name = _ref3.name,\n errors = _ref3.errors;\n cache.set(name, errors);\n });\n fields.forEach(function (field) {\n // eslint-disable-next-line no-param-reassign\n field.errors = cache.get(field.name) || field.errors;\n });\n }\n\n var changedFields = fields.filter(function (_ref4) {\n var fieldName = _ref4.name;\n return containsNamePath(namePathList, fieldName);\n });\n onFieldsChange(changedFields, fields);\n }\n }; // =========================== Validate ===========================\n\n\n this.validateFields = function (nameList, options) {\n _this.warningUnhooked();\n\n var provideNameList = !!nameList;\n var namePathList = provideNameList ? nameList.map(getNamePath) : []; // Collect result in promise list\n\n var promiseList = [];\n\n _this.getFieldEntities(true).forEach(function (field) {\n // Add field if not provide `nameList`\n if (!provideNameList) {\n namePathList.push(field.getNamePath());\n }\n /**\n * Recursive validate if configured.\n * TODO: perf improvement @zombieJ\n */\n\n\n if ((options === null || options === void 0 ? void 0 : options.recursive) && provideNameList) {\n var namePath = field.getNamePath();\n\n if ( // nameList[i] === undefined 说明是以 nameList 开头的\n // ['name'] -> ['name','list']\n namePath.every(function (nameUnit, i) {\n return nameList[i] === nameUnit || nameList[i] === undefined;\n })) {\n namePathList.push(namePath);\n }\n } // Skip if without rule\n\n\n if (!field.props.rules || !field.props.rules.length) {\n return;\n }\n\n var fieldNamePath = field.getNamePath(); // Add field validate rule in to promise list\n\n if (!provideNameList || containsNamePath(namePathList, fieldNamePath)) {\n var promise = field.validateRules(_objectSpread({\n validateMessages: _objectSpread(_objectSpread({}, defaultValidateMessages), _this.validateMessages)\n }, options)); // Wrap promise with field\n\n promiseList.push(promise.then(function () {\n return {\n name: fieldNamePath,\n errors: []\n };\n }).catch(function (errors) {\n return Promise.reject({\n name: fieldNamePath,\n errors: errors\n });\n }));\n }\n });\n\n var summaryPromise = allPromiseFinish(promiseList);\n _this.lastValidatePromise = summaryPromise; // Notify fields with rule that validate has finished and need update\n\n summaryPromise.catch(function (results) {\n return results;\n }).then(function (results) {\n var resultNamePathList = results.map(function (_ref5) {\n var name = _ref5.name;\n return name;\n });\n\n _this.notifyObservers(_this.store, resultNamePathList, {\n type: 'validateFinish'\n });\n\n _this.triggerOnFieldsChange(resultNamePathList, results);\n });\n var returnPromise = summaryPromise.then(function () {\n if (_this.lastValidatePromise === summaryPromise) {\n return Promise.resolve(_this.getFieldsValue(namePathList));\n }\n\n return Promise.reject([]);\n }).catch(function (results) {\n var errorList = results.filter(function (result) {\n return result && result.errors.length;\n });\n return Promise.reject({\n values: _this.getFieldsValue(namePathList),\n errorFields: errorList,\n outOfDate: _this.lastValidatePromise !== summaryPromise\n });\n }); // Do not throw in console\n\n returnPromise.catch(function (e) {\n return e;\n });\n return returnPromise;\n }; // ============================ Submit ============================\n\n\n this.submit = function () {\n _this.warningUnhooked();\n\n _this.validateFields().then(function (values) {\n var onFinish = _this.callbacks.onFinish;\n\n if (onFinish) {\n try {\n onFinish(values);\n } catch (err) {\n // Should print error if user `onFinish` callback failed\n console.error(err);\n }\n }\n }).catch(function (e) {\n var onFinishFailed = _this.callbacks.onFinishFailed;\n\n if (onFinishFailed) {\n onFinishFailed(e);\n }\n });\n };\n\n this.forceRootUpdate = forceRootUpdate;\n};\n\nfunction useForm(form) {\n var formRef = React.useRef();\n\n var _React$useState = React.useState({}),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n forceUpdate = _React$useState2[1];\n\n if (!formRef.current) {\n if (form) {\n formRef.current = form;\n } else {\n // Create a new FormStore if not provided\n var forceReRender = function forceReRender() {\n forceUpdate({});\n };\n\n var formStore = new FormStore(forceReRender);\n formRef.current = formStore.getForm();\n }\n }\n\n return [formRef.current];\n}\n\nexport default useForm;","export function allPromiseFinish(promiseList) {\n var hasError = false;\n var count = promiseList.length;\n var results = [];\n\n if (!promiseList.length) {\n return Promise.resolve([]);\n }\n\n return new Promise(function (resolve, reject) {\n promiseList.forEach(function (promise, index) {\n promise.catch(function (e) {\n hasError = true;\n return e;\n }).then(function (result) {\n count -= 1;\n results[index] = result;\n\n if (count > 0) {\n return;\n }\n\n if (hasError) {\n reject(results);\n }\n\n resolve(results);\n });\n });\n });\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as React from 'react';\nvar FormContext = /*#__PURE__*/React.createContext({\n triggerFormChange: function triggerFormChange() {},\n triggerFormFinish: function triggerFormFinish() {},\n registerForm: function registerForm() {},\n unregisterForm: function unregisterForm() {}\n});\n\nvar FormProvider = function FormProvider(_ref) {\n var validateMessages = _ref.validateMessages,\n onFormChange = _ref.onFormChange,\n onFormFinish = _ref.onFormFinish,\n children = _ref.children;\n var formContext = React.useContext(FormContext);\n var formsRef = React.useRef({});\n return /*#__PURE__*/React.createElement(FormContext.Provider, {\n value: _objectSpread(_objectSpread({}, formContext), {}, {\n validateMessages: _objectSpread(_objectSpread({}, formContext.validateMessages), validateMessages),\n // =========================================================\n // = Global Form Control =\n // =========================================================\n triggerFormChange: function triggerFormChange(name, changedFields) {\n if (onFormChange) {\n onFormChange(name, {\n changedFields: changedFields,\n forms: formsRef.current\n });\n }\n\n formContext.triggerFormChange(name, changedFields);\n },\n triggerFormFinish: function triggerFormFinish(name, values) {\n if (onFormFinish) {\n onFormFinish(name, {\n values: values,\n forms: formsRef.current\n });\n }\n\n formContext.triggerFormFinish(name, values);\n },\n registerForm: function registerForm(name, form) {\n if (name) {\n formsRef.current = _objectSpread(_objectSpread({}, formsRef.current), {}, _defineProperty({}, name, form));\n }\n\n formContext.registerForm(name, form);\n },\n unregisterForm: function unregisterForm(name) {\n var newForms = _objectSpread({}, formsRef.current);\n\n delete newForms[name];\n formsRef.current = newForms;\n formContext.unregisterForm(name);\n }\n })\n }, children);\n};\n\nexport { FormProvider };\nexport default FormContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport useForm from './useForm';\nimport FieldContext, { HOOK_MARK } from './FieldContext';\nimport FormContext from './FormContext';\nimport { isSimilar } from './utils/valueUtil';\n\nvar Form = function Form(_ref, ref) {\n var name = _ref.name,\n initialValues = _ref.initialValues,\n fields = _ref.fields,\n form = _ref.form,\n preserve = _ref.preserve,\n children = _ref.children,\n _ref$component = _ref.component,\n Component = _ref$component === void 0 ? 'form' : _ref$component,\n validateMessages = _ref.validateMessages,\n _ref$validateTrigger = _ref.validateTrigger,\n validateTrigger = _ref$validateTrigger === void 0 ? 'onChange' : _ref$validateTrigger,\n onValuesChange = _ref.onValuesChange,\n _onFieldsChange = _ref.onFieldsChange,\n _onFinish = _ref.onFinish,\n onFinishFailed = _ref.onFinishFailed,\n restProps = _objectWithoutProperties(_ref, [\"name\", \"initialValues\", \"fields\", \"form\", \"preserve\", \"children\", \"component\", \"validateMessages\", \"validateTrigger\", \"onValuesChange\", \"onFieldsChange\", \"onFinish\", \"onFinishFailed\"]);\n\n var formContext = React.useContext(FormContext); // We customize handle event since Context will makes all the consumer re-render:\n // https://reactjs.org/docs/context.html#contextprovider\n\n var _useForm = useForm(form),\n _useForm2 = _slicedToArray(_useForm, 1),\n formInstance = _useForm2[0];\n\n var _formInstance$getInte = formInstance.getInternalHooks(HOOK_MARK),\n useSubscribe = _formInstance$getInte.useSubscribe,\n setInitialValues = _formInstance$getInte.setInitialValues,\n setCallbacks = _formInstance$getInte.setCallbacks,\n setValidateMessages = _formInstance$getInte.setValidateMessages,\n setPreserve = _formInstance$getInte.setPreserve; // Pass ref with form instance\n\n\n React.useImperativeHandle(ref, function () {\n return formInstance;\n }); // Register form into Context\n\n React.useEffect(function () {\n formContext.registerForm(name, formInstance);\n return function () {\n formContext.unregisterForm(name);\n };\n }, [formContext, formInstance, name]); // Pass props to store\n\n setValidateMessages(_objectSpread(_objectSpread({}, formContext.validateMessages), validateMessages));\n setCallbacks({\n onValuesChange: onValuesChange,\n onFieldsChange: function onFieldsChange(changedFields) {\n formContext.triggerFormChange(name, changedFields);\n\n if (_onFieldsChange) {\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n _onFieldsChange.apply(void 0, [changedFields].concat(rest));\n }\n },\n onFinish: function onFinish(values) {\n formContext.triggerFormFinish(name, values);\n\n if (_onFinish) {\n _onFinish(values);\n }\n },\n onFinishFailed: onFinishFailed\n });\n setPreserve(preserve); // Set initial value, init store value when first mount\n\n var mountRef = React.useRef(null);\n setInitialValues(initialValues, !mountRef.current);\n\n if (!mountRef.current) {\n mountRef.current = true;\n } // Prepare children by `children` type\n\n\n var childrenNode = children;\n var childrenRenderProps = typeof children === 'function';\n\n if (childrenRenderProps) {\n var values = formInstance.getFieldsValue(true);\n childrenNode = children(values, formInstance);\n } // Not use subscribe when using render props\n\n\n useSubscribe(!childrenRenderProps); // Listen if fields provided. We use ref to save prev data here to avoid additional render\n\n var prevFieldsRef = React.useRef();\n React.useEffect(function () {\n if (!isSimilar(prevFieldsRef.current || [], fields || [])) {\n formInstance.setFields(fields || []);\n }\n\n prevFieldsRef.current = fields;\n }, [fields, formInstance]);\n var formContextValue = React.useMemo(function () {\n return _objectSpread(_objectSpread({}, formInstance), {}, {\n validateTrigger: validateTrigger\n });\n }, [formInstance, validateTrigger]);\n var wrapperNode = /*#__PURE__*/React.createElement(FieldContext.Provider, {\n value: formContextValue\n }, childrenNode);\n\n if (Component === false) {\n return wrapperNode;\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({}, restProps, {\n onSubmit: function onSubmit(event) {\n event.preventDefault();\n event.stopPropagation();\n formInstance.submit();\n },\n onReset: function onReset(event) {\n var _restProps$onReset;\n\n event.preventDefault();\n formInstance.resetFields();\n (_restProps$onReset = restProps.onReset) === null || _restProps$onReset === void 0 ? void 0 : _restProps$onReset.call(restProps, event);\n }\n }), wrapperNode);\n};\n\nexport default Form;","import * as React from 'react';\nimport Field from './Field';\nimport List from './List';\nimport useForm from './useForm';\nimport FieldForm from './Form';\nimport { FormProvider } from './FormContext';\nvar InternalForm = /*#__PURE__*/React.forwardRef(FieldForm);\nvar RefForm = InternalForm;\nRefForm.FormProvider = FormProvider;\nRefForm.Field = Field;\nRefForm.List = List;\nRefForm.useForm = useForm;\nexport { Field, List, useForm, FormProvider };\nexport default RefForm;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport defaultLocale from '../locale/default';\n\nvar runtimeLocale = _extends({}, defaultLocale.Modal);\n\nexport function changeConfirmLocale(newLocale) {\n if (newLocale) {\n runtimeLocale = _extends(_extends({}, runtimeLocale), newLocale);\n } else {\n runtimeLocale = _extends({}, defaultLocale.Modal);\n }\n}\nexport function getConfirmLocale() {\n return runtimeLocale;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport * as React from 'react';\nimport devWarning from '../_util/devWarning';\nimport { changeConfirmLocale } from '../modal/locale';\nimport LocaleContext from './context';\nexport var ANT_MARK = 'internalMark';\n\nvar LocaleProvider = /*#__PURE__*/function (_React$Component) {\n _inherits(LocaleProvider, _React$Component);\n\n var _super = _createSuper(LocaleProvider);\n\n function LocaleProvider(props) {\n var _this;\n\n _classCallCheck(this, LocaleProvider);\n\n _this = _super.call(this, props);\n changeConfirmLocale(props.locale && props.locale.Modal);\n devWarning(props._ANT_MARK__ === ANT_MARK, 'LocaleProvider', '`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale');\n return _this;\n }\n\n _createClass(LocaleProvider, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n changeConfirmLocale(this.props.locale && this.props.locale.Modal);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var locale = this.props.locale;\n\n if (prevProps.locale !== locale) {\n changeConfirmLocale(locale && locale.Modal);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n changeConfirmLocale();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n locale = _this$props.locale,\n children = _this$props.children;\n return /*#__PURE__*/React.createElement(LocaleContext.Provider, {\n value: _extends(_extends({}, locale), {\n exist: true\n })\n }, children);\n }\n }]);\n\n return LocaleProvider;\n}(React.Component);\n\nexport { LocaleProvider as default };\nLocaleProvider.defaultProps = {\n locale: {}\n};","// This icon file is generated automatically.\nvar ExclamationCircleFilled = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z\" } }] }, \"name\": \"exclamation-circle\", \"theme\": \"filled\" };\nexport default ExclamationCircleFilled;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport ExclamationCircleFilledSvg from \"@ant-design/icons-svg/es/asn/ExclamationCircleFilled\";\nimport AntdIcon from '../components/AntdIcon';\n\nvar ExclamationCircleFilled = function ExclamationCircleFilled(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: ExclamationCircleFilledSvg\n }));\n};\n\nExclamationCircleFilled.displayName = 'ExclamationCircleFilled';\nexport default /*#__PURE__*/React.forwardRef(ExclamationCircleFilled);","// This icon file is generated automatically.\nvar CheckCircleFilled = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z\" } }] }, \"name\": \"check-circle\", \"theme\": \"filled\" };\nexport default CheckCircleFilled;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport CheckCircleFilledSvg from \"@ant-design/icons-svg/es/asn/CheckCircleFilled\";\nimport AntdIcon from '../components/AntdIcon';\n\nvar CheckCircleFilled = function CheckCircleFilled(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: CheckCircleFilledSvg\n }));\n};\n\nCheckCircleFilled.displayName = 'CheckCircleFilled';\nexport default /*#__PURE__*/React.forwardRef(CheckCircleFilled);","// This icon file is generated automatically.\nvar InfoCircleFilled = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z\" } }] }, \"name\": \"info-circle\", \"theme\": \"filled\" };\nexport default InfoCircleFilled;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport InfoCircleFilledSvg from \"@ant-design/icons-svg/es/asn/InfoCircleFilled\";\nimport AntdIcon from '../components/AntdIcon';\n\nvar InfoCircleFilled = function InfoCircleFilled(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: InfoCircleFilledSvg\n }));\n};\n\nInfoCircleFilled.displayName = 'InfoCircleFilled';\nexport default /*#__PURE__*/React.forwardRef(InfoCircleFilled);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport RCNotification from 'rc-notification';\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport ExclamationCircleFilled from \"@ant-design/icons/es/icons/ExclamationCircleFilled\";\nimport CloseCircleFilled from \"@ant-design/icons/es/icons/CloseCircleFilled\";\nimport CheckCircleFilled from \"@ant-design/icons/es/icons/CheckCircleFilled\";\nimport InfoCircleFilled from \"@ant-design/icons/es/icons/InfoCircleFilled\";\nimport createUseMessage from './hooks/useMessage';\nimport { globalConfig } from '../config-provider';\nvar messageInstance;\nvar defaultDuration = 3;\nvar defaultTop;\nvar key = 1;\nvar localPrefixCls = '';\nvar transitionName = 'move-up';\nvar hasTransitionName = false;\nvar getContainer;\nvar maxCount;\nvar rtl = false;\nexport function getKeyThenIncreaseKey() {\n return key++;\n}\n\nfunction setMessageConfig(options) {\n if (options.top !== undefined) {\n defaultTop = options.top;\n messageInstance = null; // delete messageInstance for new defaultTop\n }\n\n if (options.duration !== undefined) {\n defaultDuration = options.duration;\n }\n\n if (options.prefixCls !== undefined) {\n localPrefixCls = options.prefixCls;\n }\n\n if (options.getContainer !== undefined) {\n getContainer = options.getContainer;\n }\n\n if (options.transitionName !== undefined) {\n transitionName = options.transitionName;\n messageInstance = null; // delete messageInstance for new transitionName\n\n hasTransitionName = true;\n }\n\n if (options.maxCount !== undefined) {\n maxCount = options.maxCount;\n messageInstance = null;\n }\n\n if (options.rtl !== undefined) {\n rtl = options.rtl;\n }\n}\n\nfunction getRCNotificationInstance(args, callback) {\n var customizePrefixCls = args.prefixCls;\n\n var _globalConfig = globalConfig(),\n getPrefixCls = _globalConfig.getPrefixCls,\n getRootPrefixCls = _globalConfig.getRootPrefixCls;\n\n var prefixCls = getPrefixCls('message', customizePrefixCls || localPrefixCls);\n var rootPrefixCls = getRootPrefixCls(args.rootPrefixCls, prefixCls);\n\n if (messageInstance) {\n callback({\n prefixCls: prefixCls,\n rootPrefixCls: rootPrefixCls,\n instance: messageInstance\n });\n return;\n }\n\n var instanceConfig = {\n prefixCls: prefixCls,\n transitionName: hasTransitionName ? transitionName : \"\".concat(rootPrefixCls, \"-\").concat(transitionName),\n style: {\n top: defaultTop\n },\n getContainer: getContainer,\n maxCount: maxCount\n };\n RCNotification.newInstance(instanceConfig, function (instance) {\n if (messageInstance) {\n callback({\n prefixCls: prefixCls,\n rootPrefixCls: rootPrefixCls,\n instance: messageInstance\n });\n return;\n }\n\n messageInstance = instance;\n\n if (process.env.NODE_ENV === 'test') {\n messageInstance.config = instanceConfig;\n }\n\n callback({\n prefixCls: prefixCls,\n rootPrefixCls: rootPrefixCls,\n instance: instance\n });\n });\n}\n\nvar typeToIcon = {\n info: InfoCircleFilled,\n success: CheckCircleFilled,\n error: CloseCircleFilled,\n warning: ExclamationCircleFilled,\n loading: LoadingOutlined\n};\n\nfunction getRCNoticeProps(args, prefixCls) {\n var _classNames;\n\n var duration = args.duration !== undefined ? args.duration : defaultDuration;\n var IconComponent = typeToIcon[args.type];\n var messageClass = classNames(\"\".concat(prefixCls, \"-custom-content\"), (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(args.type), args.type), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), rtl === true), _classNames));\n return {\n key: args.key,\n duration: duration,\n style: args.style || {},\n className: args.className,\n content: /*#__PURE__*/React.createElement(\"div\", {\n className: messageClass\n }, args.icon || IconComponent && /*#__PURE__*/React.createElement(IconComponent, null), /*#__PURE__*/React.createElement(\"span\", null, args.content)),\n onClose: args.onClose,\n onClick: args.onClick\n };\n}\n\nfunction notice(args) {\n var target = args.key || key++;\n var closePromise = new Promise(function (resolve) {\n var callback = function callback() {\n if (typeof args.onClose === 'function') {\n args.onClose();\n }\n\n return resolve(true);\n };\n\n getRCNotificationInstance(args, function (_ref) {\n var prefixCls = _ref.prefixCls,\n instance = _ref.instance;\n instance.notice(getRCNoticeProps(_extends(_extends({}, args), {\n key: target,\n onClose: callback\n }), prefixCls));\n });\n });\n\n var result = function result() {\n if (messageInstance) {\n messageInstance.removeNotice(target);\n }\n };\n\n result.then = function (filled, rejected) {\n return closePromise.then(filled, rejected);\n };\n\n result.promise = closePromise;\n return result;\n}\n\nfunction isArgsProps(content) {\n return Object.prototype.toString.call(content) === '[object Object]' && !!content.content;\n}\n\nvar api = {\n open: notice,\n config: setMessageConfig,\n destroy: function destroy(messageKey) {\n if (messageInstance) {\n if (messageKey) {\n var _messageInstance = messageInstance,\n removeNotice = _messageInstance.removeNotice;\n removeNotice(messageKey);\n } else {\n var _messageInstance2 = messageInstance,\n destroy = _messageInstance2.destroy;\n destroy();\n messageInstance = null;\n }\n }\n }\n};\nexport function attachTypeApi(originalApi, type) {\n originalApi[type] = function (content, duration, onClose) {\n if (isArgsProps(content)) {\n return originalApi.open(_extends(_extends({}, content), {\n type: type\n }));\n }\n\n if (typeof duration === 'function') {\n onClose = duration;\n duration = undefined;\n }\n\n return originalApi.open({\n content: content,\n duration: duration,\n type: type,\n onClose: onClose\n });\n };\n}\n['success', 'info', 'warning', 'error', 'loading'].forEach(function (type) {\n return attachTypeApi(api, type);\n});\napi.warn = api.warning;\napi.useMessage = createUseMessage(getRCNotificationInstance, getRCNoticeProps);\n/** @private test Only function. Not work on production */\n\nexport var getInstance = function getInstance() {\n return process.env.NODE_ENV === 'test' ? messageInstance : null;\n};\nexport default api;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport useRCNotification from \"rc-notification/es/useNotification\";\nimport { ConfigConsumer } from '../../config-provider';\nimport { attachTypeApi, getKeyThenIncreaseKey } from '..';\nexport default function createUseMessage(getRcNotificationInstance, getRCNoticeProps) {\n var useMessage = function useMessage() {\n // We can only get content by render\n var getPrefixCls; // We create a proxy to handle delay created instance\n\n var innerInstance = null;\n var proxy = {\n add: function add(noticeProps, holderCallback) {\n innerInstance === null || innerInstance === void 0 ? void 0 : innerInstance.component.add(noticeProps, holderCallback);\n }\n };\n\n var _useRCNotification = useRCNotification(proxy),\n _useRCNotification2 = _slicedToArray(_useRCNotification, 2),\n hookNotify = _useRCNotification2[0],\n holder = _useRCNotification2[1];\n\n function notify(args) {\n var customizePrefixCls = args.prefixCls;\n var mergedPrefixCls = getPrefixCls('message', customizePrefixCls);\n var rootPrefixCls = getPrefixCls();\n var target = args.key || getKeyThenIncreaseKey();\n var closePromise = new Promise(function (resolve) {\n var callback = function callback() {\n if (typeof args.onClose === 'function') {\n args.onClose();\n }\n\n return resolve(true);\n };\n\n getRcNotificationInstance(_extends(_extends({}, args), {\n prefixCls: mergedPrefixCls,\n rootPrefixCls: rootPrefixCls\n }), function (_ref) {\n var prefixCls = _ref.prefixCls,\n instance = _ref.instance;\n innerInstance = instance;\n hookNotify(getRCNoticeProps(_extends(_extends({}, args), {\n key: target,\n onClose: callback\n }), prefixCls));\n });\n });\n\n var result = function result() {\n if (innerInstance) {\n innerInstance.removeNotice(target);\n }\n };\n\n result.then = function (filled, rejected) {\n return closePromise.then(filled, rejected);\n };\n\n result.promise = closePromise;\n return result;\n } // Fill functions\n\n\n var hookApiRef = React.useRef({});\n hookApiRef.current.open = notify;\n ['success', 'info', 'warning', 'error', 'loading'].forEach(function (type) {\n return attachTypeApi(hookApiRef.current, type);\n });\n return [hookApiRef.current, /*#__PURE__*/React.createElement(ConfigConsumer, {\n key: \"holder\"\n }, function (context) {\n getPrefixCls = context.getPrefixCls;\n return holder;\n })];\n };\n\n return useMessage;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport IconContext from \"@ant-design/icons/es/components/Context\";\nimport { FormProvider as RcFormProvider } from 'rc-field-form';\nimport useMemo from \"rc-util/es/hooks/useMemo\";\nimport LocaleProvider, { ANT_MARK } from '../locale-provider';\nimport LocaleReceiver from '../locale-provider/LocaleReceiver';\nimport { ConfigConsumer, ConfigContext } from './context';\nimport SizeContext, { SizeContextProvider } from './SizeContext';\nimport message from '../message';\nimport notification from '../notification';\nimport defaultLocale from '../locale/default';\nexport { ConfigContext, ConfigConsumer };\nexport var configConsumerProps = ['getTargetContainer', 'getPopupContainer', 'rootPrefixCls', 'getPrefixCls', 'renderEmpty', 'csp', 'autoInsertSpaceInButton', 'locale', 'pageHeader']; // These props is used by `useContext` directly in sub component\n\nvar PASSED_PROPS = ['getTargetContainer', 'getPopupContainer', 'renderEmpty', 'pageHeader', 'input', 'form'];\nexport var defaultPrefixCls = 'ant';\nvar globalPrefixCls;\n\nvar setGlobalConfig = function setGlobalConfig(params) {\n if (params.prefixCls !== undefined) {\n globalPrefixCls = params.prefixCls;\n }\n};\n\nfunction getGlobalPrefixCls() {\n return globalPrefixCls || defaultPrefixCls;\n}\n\nexport var globalConfig = function globalConfig() {\n return {\n getPrefixCls: function getPrefixCls(suffixCls, customizePrefixCls) {\n if (customizePrefixCls) return customizePrefixCls;\n return suffixCls ? \"\".concat(getGlobalPrefixCls(), \"-\").concat(suffixCls) : getGlobalPrefixCls();\n },\n getRootPrefixCls: function getRootPrefixCls(rootPrefixCls, customizePrefixCls) {\n // Customize rootPrefixCls is first priority\n if (rootPrefixCls) {\n return rootPrefixCls;\n } // If Global prefixCls provided, use this\n\n\n if (globalPrefixCls) {\n return globalPrefixCls;\n } // [Legacy] If customize prefixCls provided, we cut it to get the prefixCls\n\n\n if (customizePrefixCls && customizePrefixCls.includes('-')) {\n return customizePrefixCls.replace(/^(.*)-[^-]*$/, '$1');\n } // Fallback to default prefixCls\n\n\n return getGlobalPrefixCls();\n }\n };\n};\n\nvar ProviderChildren = function ProviderChildren(props) {\n var _a, _b;\n\n var children = props.children,\n csp = props.csp,\n autoInsertSpaceInButton = props.autoInsertSpaceInButton,\n form = props.form,\n locale = props.locale,\n componentSize = props.componentSize,\n direction = props.direction,\n space = props.space,\n virtual = props.virtual,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n legacyLocale = props.legacyLocale,\n parentContext = props.parentContext,\n iconPrefixCls = props.iconPrefixCls;\n var getPrefixCls = React.useCallback(function (suffixCls, customizePrefixCls) {\n var prefixCls = props.prefixCls;\n if (customizePrefixCls) return customizePrefixCls;\n var mergedPrefixCls = prefixCls || parentContext.getPrefixCls('');\n return suffixCls ? \"\".concat(mergedPrefixCls, \"-\").concat(suffixCls) : mergedPrefixCls;\n }, [parentContext.getPrefixCls, props.prefixCls]);\n\n var config = _extends(_extends({}, parentContext), {\n csp: csp,\n autoInsertSpaceInButton: autoInsertSpaceInButton,\n locale: locale || legacyLocale,\n direction: direction,\n space: space,\n virtual: virtual,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n getPrefixCls: getPrefixCls\n }); // Pass the props used by `useContext` directly with child component.\n // These props should merged into `config`.\n\n\n PASSED_PROPS.forEach(function (propName) {\n var propValue = props[propName];\n\n if (propValue) {\n config[propName] = propValue;\n }\n }); // https://github.com/ant-design/ant-design/issues/27617\n\n var memoedConfig = useMemo(function () {\n return config;\n }, config, function (prevConfig, currentConfig) {\n var prevKeys = Object.keys(prevConfig);\n var currentKeys = Object.keys(currentConfig);\n return prevKeys.length !== currentKeys.length || prevKeys.some(function (key) {\n return prevConfig[key] !== currentConfig[key];\n });\n });\n var memoIconContextValue = React.useMemo(function () {\n return {\n prefixCls: iconPrefixCls,\n csp: csp\n };\n }, [iconPrefixCls]);\n var childNode = children; // Additional Form provider\n\n var validateMessages = {};\n\n if (locale) {\n validateMessages = ((_a = locale.Form) === null || _a === void 0 ? void 0 : _a.defaultValidateMessages) || ((_b = defaultLocale.Form) === null || _b === void 0 ? void 0 : _b.defaultValidateMessages) || {};\n }\n\n if (form && form.validateMessages) {\n validateMessages = _extends(_extends({}, validateMessages), form.validateMessages);\n }\n\n if (Object.keys(validateMessages).length > 0) {\n childNode = /*#__PURE__*/React.createElement(RcFormProvider, {\n validateMessages: validateMessages\n }, children);\n }\n\n if (locale) {\n childNode = /*#__PURE__*/React.createElement(LocaleProvider, {\n locale: locale,\n _ANT_MARK__: ANT_MARK\n }, childNode);\n }\n\n if (iconPrefixCls) {\n childNode = /*#__PURE__*/React.createElement(IconContext.Provider, {\n value: memoIconContextValue\n }, childNode);\n }\n\n if (componentSize) {\n childNode = /*#__PURE__*/React.createElement(SizeContextProvider, {\n size: componentSize\n }, childNode);\n }\n\n return /*#__PURE__*/React.createElement(ConfigContext.Provider, {\n value: memoedConfig\n }, childNode);\n};\n\nvar ConfigProvider = function ConfigProvider(props) {\n React.useEffect(function () {\n if (props.direction) {\n message.config({\n rtl: props.direction === 'rtl'\n });\n notification.config({\n rtl: props.direction === 'rtl'\n });\n }\n }, [props.direction]);\n return /*#__PURE__*/React.createElement(LocaleReceiver, null, function (_, __, legacyLocale) {\n return /*#__PURE__*/React.createElement(ConfigConsumer, null, function (context) {\n return /*#__PURE__*/React.createElement(ProviderChildren, _extends({\n parentContext: context,\n legacyLocale: legacyLocale\n }, props));\n });\n });\n};\n/** @private internal Usage. do not use in your production */\n\n\nConfigProvider.ConfigContext = ConfigContext;\nConfigProvider.SizeContext = SizeContext;\nConfigProvider.config = setGlobalConfig;\nexport default ConfigProvider;","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport Notice from './Notice';\nexport default function useNotification(notificationInstance) {\n var createdRef = React.useRef({});\n\n var _React$useState = React.useState([]),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n elements = _React$useState2[0],\n setElements = _React$useState2[1];\n\n function notify(noticeProps) {\n var firstMount = true;\n notificationInstance.add(noticeProps, function (div, props) {\n var key = props.key;\n\n if (div && (!createdRef.current[key] || firstMount)) {\n var noticeEle = /*#__PURE__*/React.createElement(Notice, _extends({}, props, {\n holder: div\n }));\n createdRef.current[key] = noticeEle;\n setElements(function (originElements) {\n var index = originElements.findIndex(function (ele) {\n return ele.key === props.key;\n });\n\n if (index === -1) {\n return [].concat(_toConsumableArray(originElements), [noticeEle]);\n }\n\n var cloneList = _toConsumableArray(originElements);\n\n cloneList[index] = noticeEle;\n return cloneList;\n });\n }\n\n firstMount = false;\n });\n }\n\n return [notify, /*#__PURE__*/React.createElement(React.Fragment, null, elements)];\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport * as React from 'react';\nimport { Component } from 'react';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\n\nvar Notice = /*#__PURE__*/function (_Component) {\n _inherits(Notice, _Component);\n\n var _super = _createSuper(Notice);\n\n function Notice() {\n var _this;\n\n _classCallCheck(this, Notice);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.closeTimer = null;\n\n _this.close = function (e) {\n if (e) {\n e.stopPropagation();\n }\n\n _this.clearCloseTimer();\n\n var _this$props = _this.props,\n onClose = _this$props.onClose,\n noticeKey = _this$props.noticeKey;\n\n if (onClose) {\n onClose(noticeKey);\n }\n };\n\n _this.startCloseTimer = function () {\n if (_this.props.duration) {\n _this.closeTimer = window.setTimeout(function () {\n _this.close();\n }, _this.props.duration * 1000);\n }\n };\n\n _this.clearCloseTimer = function () {\n if (_this.closeTimer) {\n clearTimeout(_this.closeTimer);\n _this.closeTimer = null;\n }\n };\n\n return _this;\n }\n\n _createClass(Notice, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.startCloseTimer();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.props.duration !== prevProps.duration || this.props.updateMark !== prevProps.updateMark || // Visible again need reset timer\n this.props.visible !== prevProps.visible && this.props.visible) {\n this.restartCloseTimer();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.clearCloseTimer();\n }\n }, {\n key: \"restartCloseTimer\",\n value: function restartCloseTimer() {\n this.clearCloseTimer();\n this.startCloseTimer();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props2 = this.props,\n prefixCls = _this$props2.prefixCls,\n className = _this$props2.className,\n closable = _this$props2.closable,\n closeIcon = _this$props2.closeIcon,\n style = _this$props2.style,\n onClick = _this$props2.onClick,\n children = _this$props2.children,\n holder = _this$props2.holder;\n var componentClass = \"\".concat(prefixCls, \"-notice\");\n var dataOrAriaAttributeProps = Object.keys(this.props).reduce(function (acc, key) {\n if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') {\n acc[key] = _this2.props[key];\n }\n\n return acc;\n }, {});\n var node = /*#__PURE__*/React.createElement(\"div\", _extends({\n className: classNames(componentClass, className, _defineProperty({}, \"\".concat(componentClass, \"-closable\"), closable)),\n style: style,\n onMouseEnter: this.clearCloseTimer,\n onMouseLeave: this.startCloseTimer,\n onClick: onClick\n }, dataOrAriaAttributeProps), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(componentClass, \"-content\")\n }, children), closable ? /*#__PURE__*/React.createElement(\"a\", {\n tabIndex: 0,\n onClick: this.close,\n className: \"\".concat(componentClass, \"-close\")\n }, closeIcon || /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(componentClass, \"-close-x\")\n })) : null);\n\n if (holder) {\n return /*#__PURE__*/ReactDOM.createPortal(node, holder);\n }\n\n return node;\n }\n }]);\n\n return Notice;\n}(Component);\n\nNotice.defaultProps = {\n onClose: function onClose() {},\n duration: 1.5\n};\nexport { Notice as default };","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport * as React from 'react';\nimport { Component } from 'react';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport { CSSMotionList } from 'rc-motion';\nimport Notice from './Notice';\nimport _useNotification from './useNotification';\nvar seed = 0;\nvar now = Date.now();\n\nfunction getUuid() {\n var id = seed;\n seed += 1;\n return \"rcNotification_\".concat(now, \"_\").concat(id);\n}\n\nvar Notification = /*#__PURE__*/function (_Component) {\n _inherits(Notification, _Component);\n\n var _super = _createSuper(Notification);\n\n function Notification() {\n var _this;\n\n _classCallCheck(this, Notification);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.state = {\n notices: []\n };\n _this.hookRefs = new Map();\n\n _this.add = function (originNotice, holderCallback) {\n var key = originNotice.key || getUuid();\n\n var notice = _objectSpread(_objectSpread({}, originNotice), {}, {\n key: key\n });\n\n var maxCount = _this.props.maxCount;\n\n _this.setState(function (previousState) {\n var notices = previousState.notices;\n var noticeIndex = notices.map(function (v) {\n return v.notice.key;\n }).indexOf(key);\n var updatedNotices = notices.concat();\n\n if (noticeIndex !== -1) {\n updatedNotices.splice(noticeIndex, 1, {\n notice: notice,\n holderCallback: holderCallback\n });\n } else {\n if (maxCount && notices.length >= maxCount) {\n // XXX, use key of first item to update new added (let React to move exsiting\n // instead of remove and mount). Same key was used before for both a) external\n // manual control and b) internal react 'key' prop , which is not that good.\n // eslint-disable-next-line no-param-reassign\n // zombieJ: Not know why use `updateKey`. This makes Notice infinite loop in jest.\n // Change to `updateMark` for compare instead.\n // https://github.com/react-component/notification/commit/32299e6be396f94040bfa82517eea940db947ece\n notice.key = updatedNotices[0].notice.key;\n notice.updateMark = getUuid(); // zombieJ: That's why. User may close by key directly.\n // We need record this but not re-render to avoid upper issue\n // https://github.com/react-component/notification/issues/129\n\n notice.userPassKey = key;\n updatedNotices.shift();\n }\n\n updatedNotices.push({\n notice: notice,\n holderCallback: holderCallback\n });\n }\n\n return {\n notices: updatedNotices\n };\n });\n };\n\n _this.remove = function (removeKey) {\n _this.setState(function (_ref) {\n var notices = _ref.notices;\n return {\n notices: notices.filter(function (_ref2) {\n var _ref2$notice = _ref2.notice,\n key = _ref2$notice.key,\n userPassKey = _ref2$notice.userPassKey;\n var mergedKey = userPassKey || key;\n return mergedKey !== removeKey;\n })\n };\n });\n };\n\n _this.noticePropsMap = {};\n return _this;\n }\n\n _createClass(Notification, [{\n key: \"getTransitionName\",\n value: function getTransitionName() {\n var _this$props = this.props,\n prefixCls = _this$props.prefixCls,\n animation = _this$props.animation;\n var transitionName = this.props.transitionName;\n\n if (!transitionName && animation) {\n transitionName = \"\".concat(prefixCls, \"-\").concat(animation);\n }\n\n return transitionName;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var notices = this.state.notices;\n var _this$props2 = this.props,\n prefixCls = _this$props2.prefixCls,\n className = _this$props2.className,\n closeIcon = _this$props2.closeIcon,\n style = _this$props2.style;\n var noticeKeys = [];\n notices.forEach(function (_ref3, index) {\n var notice = _ref3.notice,\n holderCallback = _ref3.holderCallback;\n var updateMark = index === notices.length - 1 ? notice.updateMark : undefined;\n var key = notice.key,\n userPassKey = notice.userPassKey;\n\n var noticeProps = _objectSpread(_objectSpread(_objectSpread({\n prefixCls: prefixCls,\n closeIcon: closeIcon\n }, notice), notice.props), {}, {\n key: key,\n noticeKey: userPassKey || key,\n updateMark: updateMark,\n onClose: function onClose(noticeKey) {\n var _notice$onClose;\n\n _this2.remove(noticeKey);\n\n (_notice$onClose = notice.onClose) === null || _notice$onClose === void 0 ? void 0 : _notice$onClose.call(notice);\n },\n onClick: notice.onClick,\n children: notice.content\n }); // Give to motion\n\n\n noticeKeys.push(key);\n _this2.noticePropsMap[key] = {\n props: noticeProps,\n holderCallback: holderCallback\n };\n });\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(prefixCls, className),\n style: style\n }, /*#__PURE__*/React.createElement(CSSMotionList, {\n keys: noticeKeys,\n motionName: this.getTransitionName(),\n onVisibleChanged: function onVisibleChanged(changedVisible, _ref4) {\n var key = _ref4.key;\n\n if (!changedVisible) {\n delete _this2.noticePropsMap[key];\n }\n }\n }, function (_ref5) {\n var key = _ref5.key,\n motionClassName = _ref5.className,\n motionStyle = _ref5.style,\n visible = _ref5.visible;\n var _this2$noticePropsMap = _this2.noticePropsMap[key],\n noticeProps = _this2$noticePropsMap.props,\n holderCallback = _this2$noticePropsMap.holderCallback;\n\n if (holderCallback) {\n return /*#__PURE__*/React.createElement(\"div\", {\n key: key,\n className: classNames(motionClassName, \"\".concat(prefixCls, \"-hook-holder\")),\n style: _objectSpread({}, motionStyle),\n ref: function ref(div) {\n if (typeof key === 'undefined') {\n return;\n }\n\n if (div) {\n _this2.hookRefs.set(key, div);\n\n holderCallback(div, noticeProps);\n } else {\n _this2.hookRefs.delete(key);\n }\n }\n });\n }\n\n return /*#__PURE__*/React.createElement(Notice, _extends({}, noticeProps, {\n className: classNames(motionClassName, noticeProps === null || noticeProps === void 0 ? void 0 : noticeProps.className),\n style: _objectSpread(_objectSpread({}, motionStyle), noticeProps === null || noticeProps === void 0 ? void 0 : noticeProps.style),\n visible: visible\n }));\n }));\n }\n }]);\n\n return Notification;\n}(Component);\n\nNotification.newInstance = void 0;\nNotification.defaultProps = {\n prefixCls: 'rc-notification',\n animation: 'fade',\n style: {\n top: 65,\n left: '50%'\n }\n};\n\nNotification.newInstance = function newNotificationInstance(properties, callback) {\n var _ref6 = properties || {},\n getContainer = _ref6.getContainer,\n props = _objectWithoutProperties(_ref6, [\"getContainer\"]);\n\n var div = document.createElement('div');\n\n if (getContainer) {\n var root = getContainer();\n root.appendChild(div);\n } else {\n document.body.appendChild(div);\n }\n\n var called = false;\n\n function ref(notification) {\n if (called) {\n return;\n }\n\n called = true;\n callback({\n notice: function notice(noticeProps) {\n notification.add(noticeProps);\n },\n removeNotice: function removeNotice(key) {\n notification.remove(key);\n },\n component: notification,\n destroy: function destroy() {\n ReactDOM.unmountComponentAtNode(div);\n\n if (div.parentNode) {\n div.parentNode.removeChild(div);\n }\n },\n // Hooks\n useNotification: function useNotification() {\n return _useNotification(notification);\n }\n });\n } // Only used for test case usage\n\n\n if (process.env.NODE_ENV === 'test' && properties.TEST_RENDER) {\n properties.TEST_RENDER( /*#__PURE__*/React.createElement(Notification, _extends({}, props, {\n ref: ref\n })));\n return;\n }\n\n ReactDOM.render( /*#__PURE__*/React.createElement(Notification, _extends({}, props, {\n ref: ref\n })), div);\n};\n\nexport default Notification;","import Notification from './Notification';\nexport default Notification;","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}","/* eslint no-console:0 */\n\nconst formatRegExp = /%[sdj%]/g;\n\nexport let warning = () => {};\n\n// don't print warning message when in production env or node runtime\nif (\n typeof process !== 'undefined' &&\n process.env &&\n process.env.NODE_ENV !== 'production' &&\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n) {\n warning = (type, errors) => {\n if (typeof console !== 'undefined' && console.warn) {\n if (errors.every(e => typeof e === 'string')) {\n console.warn(type, errors);\n }\n }\n };\n}\n\nexport function convertFieldsError(errors) {\n if (!errors || !errors.length) return null;\n const fields = {};\n errors.forEach(error => {\n const field = error.field;\n fields[field] = fields[field] || [];\n fields[field].push(error);\n });\n return fields;\n}\n\nexport function format(...args) {\n let i = 1;\n const f = args[0];\n const len = args.length;\n if (typeof f === 'function') {\n return f.apply(null, args.slice(1));\n }\n if (typeof f === 'string') {\n let str = String(f).replace(formatRegExp, x => {\n if (x === '%%') {\n return '%';\n }\n if (i >= len) {\n return x;\n }\n switch (x) {\n case '%s':\n return String(args[i++]);\n case '%d':\n return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n break;\n default:\n return x;\n }\n });\n return str;\n }\n return f;\n}\n\nfunction isNativeStringType(type) {\n return (\n type === 'string' ||\n type === 'url' ||\n type === 'hex' ||\n type === 'email' ||\n type === 'date' ||\n type === 'pattern'\n );\n}\n\nexport function isEmptyValue(value, type) {\n if (value === undefined || value === null) {\n return true;\n }\n if (type === 'array' && Array.isArray(value) && !value.length) {\n return true;\n }\n if (isNativeStringType(type) && typeof value === 'string' && !value) {\n return true;\n }\n return false;\n}\n\nexport function isEmptyObject(obj) {\n return Object.keys(obj).length === 0;\n}\n\nfunction asyncParallelArray(arr, func, callback) {\n const results = [];\n let total = 0;\n const arrLength = arr.length;\n\n function count(errors) {\n results.push.apply(results, errors);\n total++;\n if (total === arrLength) {\n callback(results);\n }\n }\n\n arr.forEach(a => {\n func(a, count);\n });\n}\n\nfunction asyncSerialArray(arr, func, callback) {\n let index = 0;\n const arrLength = arr.length;\n\n function next(errors) {\n if (errors && errors.length) {\n callback(errors);\n return;\n }\n const original = index;\n index = index + 1;\n if (original < arrLength) {\n func(arr[original], next);\n } else {\n callback([]);\n }\n }\n\n next([]);\n}\n\nfunction flattenObjArr(objArr) {\n const ret = [];\n Object.keys(objArr).forEach(k => {\n ret.push.apply(ret, objArr[k]);\n });\n return ret;\n}\n\nexport class AsyncValidationError extends Error {\n constructor(errors, fields) {\n super('Async Validation Error');\n this.errors = errors;\n this.fields = fields;\n }\n}\n\nexport function asyncMap(objArr, option, func, callback) {\n if (option.first) {\n const pending = new Promise((resolve, reject) => {\n const next = errors => {\n callback(errors);\n return errors.length\n ? reject(new AsyncValidationError(errors, convertFieldsError(errors)))\n : resolve();\n };\n const flattenArr = flattenObjArr(objArr);\n asyncSerialArray(flattenArr, func, next);\n });\n pending.catch(e => e);\n return pending;\n }\n let firstFields = option.firstFields || [];\n if (firstFields === true) {\n firstFields = Object.keys(objArr);\n }\n const objArrKeys = Object.keys(objArr);\n const objArrLength = objArrKeys.length;\n let total = 0;\n const results = [];\n const pending = new Promise((resolve, reject) => {\n const next = errors => {\n results.push.apply(results, errors);\n total++;\n if (total === objArrLength) {\n callback(results);\n return results.length\n ? reject(\n new AsyncValidationError(results, convertFieldsError(results)),\n )\n : resolve();\n }\n };\n if (!objArrKeys.length) {\n callback(results);\n resolve();\n }\n objArrKeys.forEach(key => {\n const arr = objArr[key];\n if (firstFields.indexOf(key) !== -1) {\n asyncSerialArray(arr, func, next);\n } else {\n asyncParallelArray(arr, func, next);\n }\n });\n });\n pending.catch(e => e);\n return pending;\n}\n\nexport function complementError(rule) {\n return oe => {\n if (oe && oe.message) {\n oe.field = oe.field || rule.fullField;\n return oe;\n }\n return {\n message: typeof oe === 'function' ? oe() : oe,\n field: oe.field || rule.fullField,\n };\n };\n}\n\nexport function deepMerge(target, source) {\n if (source) {\n for (const s in source) {\n if (source.hasOwnProperty(s)) {\n const value = source[s];\n if (typeof value === 'object' && typeof target[s] === 'object') {\n target[s] = {\n ...target[s],\n ...value,\n };\n } else {\n target[s] = value;\n }\n }\n }\n }\n return target;\n}\n","import * as util from '../util';\n\n/**\n * Rule for validating required fields.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction required(rule, value, source, errors, options, type) {\n if (\n rule.required &&\n (!source.hasOwnProperty(rule.field) ||\n util.isEmptyValue(value, type || rule.type))\n ) {\n errors.push(util.format(options.messages.required, rule.fullField));\n }\n}\n\nexport default required;\n","import * as util from '../util';\nimport required from './required';\n\n/* eslint max-len:0 */\n\nconst pattern = {\n // http://emailregex.com/\n email: /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n url: new RegExp(\n '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\\\S+(?::\\\\S*)?@)?(?:(?:(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}(?:\\\\.(?:[0-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))|(?:(?:[a-z\\\\u00a1-\\\\uffff0-9]+-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]+-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,})))|localhost)(?::\\\\d{2,5})?(?:(/|\\\\?|#)[^\\\\s]*)?$',\n 'i',\n ),\n hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,\n};\n\nconst types = {\n integer(value) {\n return types.number(value) && parseInt(value, 10) === value;\n },\n float(value) {\n return types.number(value) && !types.integer(value);\n },\n array(value) {\n return Array.isArray(value);\n },\n regexp(value) {\n if (value instanceof RegExp) {\n return true;\n }\n try {\n return !!new RegExp(value);\n } catch (e) {\n return false;\n }\n },\n date(value) {\n return (\n typeof value.getTime === 'function' &&\n typeof value.getMonth === 'function' &&\n typeof value.getYear === 'function' &&\n !isNaN(value.getTime())\n );\n },\n number(value) {\n if (isNaN(value)) {\n return false;\n }\n return typeof value === 'number';\n },\n object(value) {\n return typeof value === 'object' && !types.array(value);\n },\n method(value) {\n return typeof value === 'function';\n },\n email(value) {\n return (\n typeof value === 'string' &&\n !!value.match(pattern.email) &&\n value.length < 255\n );\n },\n url(value) {\n return typeof value === 'string' && !!value.match(pattern.url);\n },\n hex(value) {\n return typeof value === 'string' && !!value.match(pattern.hex);\n },\n};\n\n/**\n * Rule for validating the type of a value.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction type(rule, value, source, errors, options) {\n if (rule.required && value === undefined) {\n required(rule, value, source, errors, options);\n return;\n }\n const custom = [\n 'integer',\n 'float',\n 'array',\n 'regexp',\n 'object',\n 'method',\n 'email',\n 'number',\n 'date',\n 'url',\n 'hex',\n ];\n const ruleType = rule.type;\n if (custom.indexOf(ruleType) > -1) {\n if (!types[ruleType](value)) {\n errors.push(\n util.format(\n options.messages.types[ruleType],\n rule.fullField,\n rule.type,\n ),\n );\n }\n // straight typeof check\n } else if (ruleType && typeof value !== rule.type) {\n errors.push(\n util.format(options.messages.types[ruleType], rule.fullField, rule.type),\n );\n }\n}\n\nexport default type;\n","import required from './required';\nimport whitespace from './whitespace';\nimport type from './type';\nimport range from './range';\nimport enumRule from './enum';\nimport pattern from './pattern';\n\nexport default {\n required,\n whitespace,\n type,\n range,\n enum: enumRule,\n pattern,\n};\n","import * as util from '../util';\n\n/**\n * Rule for validating whitespace.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction whitespace(rule, value, source, errors, options) {\n if (/^\\s+$/.test(value) || value === '') {\n errors.push(util.format(options.messages.whitespace, rule.fullField));\n }\n}\n\nexport default whitespace;\n","import * as util from '../util';\n\n/**\n * Rule for validating minimum and maximum allowed values.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction range(rule, value, source, errors, options) {\n const len = typeof rule.len === 'number';\n const min = typeof rule.min === 'number';\n const max = typeof rule.max === 'number';\n // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)\n const spRegexp = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n let val = value;\n let key = null;\n const num = typeof value === 'number';\n const str = typeof value === 'string';\n const arr = Array.isArray(value);\n if (num) {\n key = 'number';\n } else if (str) {\n key = 'string';\n } else if (arr) {\n key = 'array';\n }\n // if the value is not of a supported type for range validation\n // the validation rule rule should use the\n // type property to also test for a particular type\n if (!key) {\n return false;\n }\n if (arr) {\n val = value.length;\n }\n if (str) {\n // 处理码点大于U+010000的文字length属性不准确的bug,如\"𠮷𠮷𠮷\".lenght !== 3\n val = value.replace(spRegexp, '_').length;\n }\n if (len) {\n if (val !== rule.len) {\n errors.push(\n util.format(options.messages[key].len, rule.fullField, rule.len),\n );\n }\n } else if (min && !max && val < rule.min) {\n errors.push(\n util.format(options.messages[key].min, rule.fullField, rule.min),\n );\n } else if (max && !min && val > rule.max) {\n errors.push(\n util.format(options.messages[key].max, rule.fullField, rule.max),\n );\n } else if (min && max && (val < rule.min || val > rule.max)) {\n errors.push(\n util.format(\n options.messages[key].range,\n rule.fullField,\n rule.min,\n rule.max,\n ),\n );\n }\n}\n\nexport default range;\n","import * as util from '../util';\n\nconst ENUM = 'enum';\n\n/**\n * Rule for validating a value exists in an enumerable list.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction enumerable(rule, value, source, errors, options) {\n rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];\n if (rule[ENUM].indexOf(value) === -1) {\n errors.push(\n util.format(\n options.messages[ENUM],\n rule.fullField,\n rule[ENUM].join(', '),\n ),\n );\n }\n}\n\nexport default enumerable;\n","import * as util from '../util';\n\n/**\n * Rule for validating a regular expression pattern.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction pattern(rule, value, source, errors, options) {\n if (rule.pattern) {\n if (rule.pattern instanceof RegExp) {\n // if a RegExp instance is passed, reset `lastIndex` in case its `global`\n // flag is accidentally set to `true`, which in a validation scenario\n // is not necessary and the result might be misleading\n rule.pattern.lastIndex = 0;\n if (!rule.pattern.test(value)) {\n errors.push(\n util.format(\n options.messages.pattern.mismatch,\n rule.fullField,\n value,\n rule.pattern,\n ),\n );\n }\n } else if (typeof rule.pattern === 'string') {\n const _pattern = new RegExp(rule.pattern);\n if (!_pattern.test(value)) {\n errors.push(\n util.format(\n options.messages.pattern.mismatch,\n rule.fullField,\n value,\n rule.pattern,\n ),\n );\n }\n }\n }\n}\n\nexport default pattern;\n","import rules from '../rule/index.js';\nimport { isEmptyValue } from '../util';\n\nfunction type(rule, value, callback, source, options) {\n const ruleType = rule.type;\n const errors = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value, ruleType) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options, ruleType);\n if (!isEmptyValue(value, ruleType)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexport default type;\n","import string from './string';\nimport method from './method';\nimport number from './number';\nimport boolean from './boolean';\nimport regexp from './regexp';\nimport integer from './integer';\nimport float from './float';\nimport array from './array';\nimport object from './object';\nimport enumValidator from './enum';\nimport pattern from './pattern';\nimport date from './date';\nimport required from './required';\nimport type from './type';\nimport any from './any';\n\nexport default {\n string,\n method,\n number,\n boolean,\n regexp,\n integer,\n float,\n array,\n object,\n enum: enumValidator,\n pattern,\n date,\n url: type,\n hex: type,\n email: type,\n required,\n any,\n};\n","import rules from '../rule/index.js';\nimport { isEmptyValue } from '../util';\n\n/**\n * Performs validation for string types.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction string(rule, value, callback, source, options) {\n const errors = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value, 'string') && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options, 'string');\n if (!isEmptyValue(value, 'string')) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n rules.pattern(rule, value, source, errors, options);\n if (rule.whitespace === true) {\n rules.whitespace(rule, value, source, errors, options);\n }\n }\n }\n callback(errors);\n}\n\nexport default string;\n","import rules from '../rule/index.js';\nimport { isEmptyValue } from '../util';\n\n/**\n * Validates a function.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction method(rule, value, callback, source, options) {\n const errors = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexport default method;\n","import rules from '../rule/index.js';\nimport { isEmptyValue } from '../util';\n\n/**\n * Validates a number.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction number(rule, value, callback, source, options) {\n const errors = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (value === '') {\n value = undefined;\n }\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexport default number;\n","import { isEmptyValue } from '../util';\nimport rules from '../rule/index.js';\n\n/**\n * Validates a boolean.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction boolean(rule, value, callback, source, options) {\n const errors = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexport default boolean;\n","import rules from '../rule/index.js';\nimport { isEmptyValue } from '../util';\n\n/**\n * Validates the regular expression type.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction regexp(rule, value, callback, source, options) {\n const errors = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexport default regexp;\n","import rules from '../rule/index.js';\nimport { isEmptyValue } from '../util';\n\n/**\n * Validates a number is an integer.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction integer(rule, value, callback, source, options) {\n const errors = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexport default integer;\n","import rules from '../rule/index.js';\nimport { isEmptyValue } from '../util';\n\n/**\n * Validates a number is a floating point number.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction floatFn(rule, value, callback, source, options) {\n const errors = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexport default floatFn;\n","import rules from '../rule/index';\nimport { isEmptyValue } from '../util';\n/**\n * Validates an array.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction array(rule, value, callback, source, options) {\n const errors = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if ((value === undefined || value === null) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options, 'array');\n if (value !== undefined && value !== null) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexport default array;\n","import rules from '../rule/index.js';\nimport { isEmptyValue } from '../util';\n\n/**\n * Validates an object.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction object(rule, value, callback, source, options) {\n const errors = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexport default object;\n","import rules from '../rule/index.js';\nimport { isEmptyValue } from '../util';\n\nconst ENUM = 'enum';\n\n/**\n * Validates an enumerable list.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction enumerable(rule, value, callback, source, options) {\n const errors = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (value !== undefined) {\n rules[ENUM](rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexport default enumerable;\n","import rules from '../rule/index.js';\nimport { isEmptyValue } from '../util';\n\n/**\n * Validates a regular expression pattern.\n *\n * Performs validation when a rule only contains\n * a pattern property but is not declared as a string type.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction pattern(rule, value, callback, source, options) {\n const errors = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value, 'string') && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (!isEmptyValue(value, 'string')) {\n rules.pattern(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexport default pattern;\n","import rules from '../rule/index.js';\nimport { isEmptyValue } from '../util';\n\nfunction date(rule, value, callback, source, options) {\n // console.log('integer rule called %j', rule);\n const errors = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n // console.log('validate on %s value', value);\n if (validate) {\n if (isEmptyValue(value, 'date') && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n if (!isEmptyValue(value, 'date')) {\n let dateObject;\n\n if (value instanceof Date) {\n dateObject = value;\n } else {\n dateObject = new Date(value);\n }\n\n rules.type(rule, dateObject, source, errors, options);\n if (dateObject) {\n rules.range(rule, dateObject.getTime(), source, errors, options);\n }\n }\n }\n callback(errors);\n}\n\nexport default date;\n","import rules from '../rule/index.js';\n\nfunction required(rule, value, callback, source, options) {\n const errors = [];\n const type = Array.isArray(value) ? 'array' : typeof value;\n rules.required(rule, value, source, errors, options, type);\n callback(errors);\n}\n\nexport default required;\n","import rules from '../rule/index.js';\nimport { isEmptyValue } from '../util';\n\n/**\n * Performs validation for any type.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction any(rule, value, callback, source, options) {\n const errors = [];\n const validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n rules.required(rule, value, source, errors, options);\n }\n callback(errors);\n}\n\nexport default any;\n","export function newMessages() {\n return {\n default: 'Validation error on field %s',\n required: '%s is required',\n enum: '%s must be one of %s',\n whitespace: '%s cannot be empty',\n date: {\n format: '%s date %s is invalid for format %s',\n parse: '%s date could not be parsed, %s is invalid ',\n invalid: '%s date %s is invalid',\n },\n types: {\n string: '%s is not a %s',\n method: '%s is not a %s (function)',\n array: '%s is not an %s',\n object: '%s is not an %s',\n number: '%s is not a %s',\n date: '%s is not a %s',\n boolean: '%s is not a %s',\n integer: '%s is not an %s',\n float: '%s is not a %s',\n regexp: '%s is not a valid %s',\n email: '%s is not a valid %s',\n url: '%s is not a valid %s',\n hex: '%s is not a valid %s',\n },\n string: {\n len: '%s must be exactly %s characters',\n min: '%s must be at least %s characters',\n max: '%s cannot be longer than %s characters',\n range: '%s must be between %s and %s characters',\n },\n number: {\n len: '%s must equal %s',\n min: '%s cannot be less than %s',\n max: '%s cannot be greater than %s',\n range: '%s must be between %s and %s',\n },\n array: {\n len: '%s must be exactly %s in length',\n min: '%s cannot be less than %s in length',\n max: '%s cannot be greater than %s in length',\n range: '%s must be between %s and %s in length',\n },\n pattern: {\n mismatch: '%s value %s does not match pattern %s',\n },\n clone() {\n const cloned = JSON.parse(JSON.stringify(this));\n cloned.clone = this.clone;\n return cloned;\n },\n };\n}\n\nexport const messages = newMessages();\n","import {\n format,\n complementError,\n asyncMap,\n warning,\n deepMerge,\n convertFieldsError,\n} from './util';\nimport validators from './validator/index';\nimport { messages as defaultMessages, newMessages } from './messages';\n\n/**\n * Encapsulates a validation schema.\n *\n * @param descriptor An object declaring validation rules\n * for this schema.\n */\nfunction Schema(descriptor) {\n this.rules = null;\n this._messages = defaultMessages;\n this.define(descriptor);\n}\n\nSchema.prototype = {\n messages(messages) {\n if (messages) {\n this._messages = deepMerge(newMessages(), messages);\n }\n return this._messages;\n },\n define(rules) {\n if (!rules) {\n throw new Error('Cannot configure a schema with no rules');\n }\n if (typeof rules !== 'object' || Array.isArray(rules)) {\n throw new Error('Rules must be an object');\n }\n this.rules = {};\n let z;\n let item;\n for (z in rules) {\n if (rules.hasOwnProperty(z)) {\n item = rules[z];\n this.rules[z] = Array.isArray(item) ? item : [item];\n }\n }\n },\n validate(source_, o = {}, oc = () => {}) {\n let source = source_;\n let options = o;\n let callback = oc;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (!this.rules || Object.keys(this.rules).length === 0) {\n if (callback) {\n callback();\n }\n return Promise.resolve();\n }\n\n function complete(results) {\n let i;\n let errors = [];\n let fields = {};\n\n function add(e) {\n if (Array.isArray(e)) {\n errors = errors.concat(...e);\n } else {\n errors.push(e);\n }\n }\n\n for (i = 0; i < results.length; i++) {\n add(results[i]);\n }\n if (!errors.length) {\n errors = null;\n fields = null;\n } else {\n fields = convertFieldsError(errors);\n }\n callback(errors, fields);\n }\n\n if (options.messages) {\n let messages = this.messages();\n if (messages === defaultMessages) {\n messages = newMessages();\n }\n deepMerge(messages, options.messages);\n options.messages = messages;\n } else {\n options.messages = this.messages();\n }\n let arr;\n let value;\n const series = {};\n const keys = options.keys || Object.keys(this.rules);\n keys.forEach(z => {\n arr = this.rules[z];\n value = source[z];\n arr.forEach(r => {\n let rule = r;\n if (typeof rule.transform === 'function') {\n if (source === source_) {\n source = { ...source };\n }\n value = source[z] = rule.transform(value);\n }\n if (typeof rule === 'function') {\n rule = {\n validator: rule,\n };\n } else {\n rule = { ...rule };\n }\n rule.validator = this.getValidationMethod(rule);\n rule.field = z;\n rule.fullField = rule.fullField || z;\n rule.type = this.getType(rule);\n if (!rule.validator) {\n return;\n }\n series[z] = series[z] || [];\n series[z].push({\n rule,\n value,\n source,\n field: z,\n });\n });\n });\n const errorFields = {};\n return asyncMap(\n series,\n options,\n (data, doIt) => {\n const rule = data.rule;\n let deep =\n (rule.type === 'object' || rule.type === 'array') &&\n (typeof rule.fields === 'object' ||\n typeof rule.defaultField === 'object');\n deep = deep && (rule.required || (!rule.required && data.value));\n rule.field = data.field;\n\n function addFullfield(key, schema) {\n return {\n ...schema,\n fullField: `${rule.fullField}.${key}`,\n };\n }\n\n function cb(e = []) {\n let errors = e;\n if (!Array.isArray(errors)) {\n errors = [errors];\n }\n if (!options.suppressWarning && errors.length) {\n Schema.warning('async-validator:', errors);\n }\n if (errors.length && rule.message !== undefined) {\n errors = [].concat(rule.message);\n }\n\n errors = errors.map(complementError(rule));\n\n if (options.first && errors.length) {\n errorFields[rule.field] = 1;\n return doIt(errors);\n }\n if (!deep) {\n doIt(errors);\n } else {\n // if rule is required but the target object\n // does not exist fail at the rule level and don't\n // go deeper\n if (rule.required && !data.value) {\n if (rule.message !== undefined) {\n errors = [].concat(rule.message).map(complementError(rule));\n } else if (options.error) {\n errors = [\n options.error(\n rule,\n format(options.messages.required, rule.field),\n ),\n ];\n }\n return doIt(errors);\n }\n\n let fieldsSchema = {};\n if (rule.defaultField) {\n for (const k in data.value) {\n if (data.value.hasOwnProperty(k)) {\n fieldsSchema[k] = rule.defaultField;\n }\n }\n }\n fieldsSchema = {\n ...fieldsSchema,\n ...data.rule.fields,\n };\n for (const f in fieldsSchema) {\n if (fieldsSchema.hasOwnProperty(f)) {\n const fieldSchema = Array.isArray(fieldsSchema[f])\n ? fieldsSchema[f]\n : [fieldsSchema[f]];\n fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));\n }\n }\n const schema = new Schema(fieldsSchema);\n schema.messages(options.messages);\n if (data.rule.options) {\n data.rule.options.messages = options.messages;\n data.rule.options.error = options.error;\n }\n schema.validate(data.value, data.rule.options || options, errs => {\n const finalErrors = [];\n if (errors && errors.length) {\n finalErrors.push(...errors);\n }\n if (errs && errs.length) {\n finalErrors.push(...errs);\n }\n doIt(finalErrors.length ? finalErrors : null);\n });\n }\n }\n\n let res;\n if (rule.asyncValidator) {\n res = rule.asyncValidator(rule, data.value, cb, data.source, options);\n } else if (rule.validator) {\n res = rule.validator(rule, data.value, cb, data.source, options);\n if (res === true) {\n cb();\n } else if (res === false) {\n cb(rule.message || `${rule.field} fails`);\n } else if (res instanceof Array) {\n cb(res);\n } else if (res instanceof Error) {\n cb(res.message);\n }\n }\n if (res && res.then) {\n res.then(\n () => cb(),\n e => cb(e),\n );\n }\n },\n results => {\n complete(results);\n },\n );\n },\n getType(rule) {\n if (rule.type === undefined && rule.pattern instanceof RegExp) {\n rule.type = 'pattern';\n }\n if (\n typeof rule.validator !== 'function' &&\n rule.type &&\n !validators.hasOwnProperty(rule.type)\n ) {\n throw new Error(format('Unknown rule type %s', rule.type));\n }\n return rule.type || 'string';\n },\n getValidationMethod(rule) {\n if (typeof rule.validator === 'function') {\n return rule.validator;\n }\n const keys = Object.keys(rule);\n const messageIndex = keys.indexOf('message');\n if (messageIndex !== -1) {\n keys.splice(messageIndex, 1);\n }\n if (keys.length === 1 && keys[0] === 'required') {\n return validators.required;\n }\n return validators[this.getType(rule)] || false;\n },\n};\n\nSchema.register = function register(type, validator) {\n if (typeof validator !== 'function') {\n throw new Error(\n 'Cannot register a validator by type, validator is not a function',\n );\n }\n validators[type] = validator;\n};\n\nSchema.warning = warning;\n\nSchema.messages = defaultMessages;\n\nSchema.validators = validators;\n\nexport default Schema;\n","// This icon file is generated automatically.\nvar CheckCircleOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z\" } }, { \"tag\": \"path\", \"attrs\": { \"d\": \"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z\" } }] }, \"name\": \"check-circle\", \"theme\": \"outlined\" };\nexport default CheckCircleOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport CheckCircleOutlinedSvg from \"@ant-design/icons-svg/es/asn/CheckCircleOutlined\";\nimport AntdIcon from '../components/AntdIcon';\n\nvar CheckCircleOutlined = function CheckCircleOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: CheckCircleOutlinedSvg\n }));\n};\n\nCheckCircleOutlined.displayName = 'CheckCircleOutlined';\nexport default /*#__PURE__*/React.forwardRef(CheckCircleOutlined);","// This icon file is generated automatically.\nvar CloseCircleOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z\" } }, { \"tag\": \"path\", \"attrs\": { \"d\": \"M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z\" } }] }, \"name\": \"close-circle\", \"theme\": \"outlined\" };\nexport default CloseCircleOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport CloseCircleOutlinedSvg from \"@ant-design/icons-svg/es/asn/CloseCircleOutlined\";\nimport AntdIcon from '../components/AntdIcon';\n\nvar CloseCircleOutlined = function CloseCircleOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: CloseCircleOutlinedSvg\n }));\n};\n\nCloseCircleOutlined.displayName = 'CloseCircleOutlined';\nexport default /*#__PURE__*/React.forwardRef(CloseCircleOutlined);","// This icon file is generated automatically.\nvar ExclamationCircleOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z\" } }, { \"tag\": \"path\", \"attrs\": { \"d\": \"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z\" } }] }, \"name\": \"exclamation-circle\", \"theme\": \"outlined\" };\nexport default ExclamationCircleOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport ExclamationCircleOutlinedSvg from \"@ant-design/icons-svg/es/asn/ExclamationCircleOutlined\";\nimport AntdIcon from '../components/AntdIcon';\n\nvar ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: ExclamationCircleOutlinedSvg\n }));\n};\n\nExclamationCircleOutlined.displayName = 'ExclamationCircleOutlined';\nexport default /*#__PURE__*/React.forwardRef(ExclamationCircleOutlined);","// This icon file is generated automatically.\nvar InfoCircleOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z\" } }, { \"tag\": \"path\", \"attrs\": { \"d\": \"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z\" } }] }, \"name\": \"info-circle\", \"theme\": \"outlined\" };\nexport default InfoCircleOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport InfoCircleOutlinedSvg from \"@ant-design/icons-svg/es/asn/InfoCircleOutlined\";\nimport AntdIcon from '../components/AntdIcon';\n\nvar InfoCircleOutlined = function InfoCircleOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: InfoCircleOutlinedSvg\n }));\n};\n\nInfoCircleOutlined.displayName = 'InfoCircleOutlined';\nexport default /*#__PURE__*/React.forwardRef(InfoCircleOutlined);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\n\nvar __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\nimport * as React from 'react';\nimport Notification from 'rc-notification';\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport classNames from 'classnames';\nimport CheckCircleOutlined from \"@ant-design/icons/es/icons/CheckCircleOutlined\";\nimport CloseCircleOutlined from \"@ant-design/icons/es/icons/CloseCircleOutlined\";\nimport ExclamationCircleOutlined from \"@ant-design/icons/es/icons/ExclamationCircleOutlined\";\nimport InfoCircleOutlined from \"@ant-design/icons/es/icons/InfoCircleOutlined\";\nimport createUseNotification from './hooks/useNotification';\nimport { globalConfig } from '../config-provider';\nvar notificationInstance = {};\nvar defaultDuration = 4.5;\nvar defaultTop = 24;\nvar defaultBottom = 24;\nvar defaultPrefixCls = '';\nvar defaultPlacement = 'topRight';\nvar defaultGetContainer;\nvar defaultCloseIcon;\nvar rtl = false;\n\nfunction setNotificationConfig(options) {\n var duration = options.duration,\n placement = options.placement,\n bottom = options.bottom,\n top = options.top,\n getContainer = options.getContainer,\n closeIcon = options.closeIcon,\n prefixCls = options.prefixCls;\n\n if (prefixCls !== undefined) {\n defaultPrefixCls = prefixCls;\n }\n\n if (duration !== undefined) {\n defaultDuration = duration;\n }\n\n if (placement !== undefined) {\n defaultPlacement = placement;\n } else if (options.rtl) {\n defaultPlacement = 'topLeft';\n }\n\n if (bottom !== undefined) {\n defaultBottom = bottom;\n }\n\n if (top !== undefined) {\n defaultTop = top;\n }\n\n if (getContainer !== undefined) {\n defaultGetContainer = getContainer;\n }\n\n if (closeIcon !== undefined) {\n defaultCloseIcon = closeIcon;\n }\n\n if (options.rtl !== undefined) {\n rtl = options.rtl;\n }\n}\n\nfunction getPlacementStyle(placement) {\n var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTop;\n var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom;\n var style;\n\n switch (placement) {\n case 'topLeft':\n style = {\n left: 0,\n top: top,\n bottom: 'auto'\n };\n break;\n\n case 'topRight':\n style = {\n right: 0,\n top: top,\n bottom: 'auto'\n };\n break;\n\n case 'bottomLeft':\n style = {\n left: 0,\n top: 'auto',\n bottom: bottom\n };\n break;\n\n default:\n style = {\n right: 0,\n top: 'auto',\n bottom: bottom\n };\n break;\n }\n\n return style;\n}\n\nfunction getNotificationInstance(args, callback) {\n var _args$placement = args.placement,\n placement = _args$placement === void 0 ? defaultPlacement : _args$placement,\n top = args.top,\n bottom = args.bottom,\n _args$getContainer = args.getContainer,\n getContainer = _args$getContainer === void 0 ? defaultGetContainer : _args$getContainer,\n _args$closeIcon = args.closeIcon,\n closeIcon = _args$closeIcon === void 0 ? defaultCloseIcon : _args$closeIcon,\n customizePrefixCls = args.prefixCls;\n\n var _globalConfig = globalConfig(),\n getPrefixCls = _globalConfig.getPrefixCls;\n\n var prefixCls = getPrefixCls('notification', customizePrefixCls || defaultPrefixCls);\n var cacheKey = \"\".concat(prefixCls, \"-\").concat(placement);\n var cacheInstance = notificationInstance[cacheKey];\n\n if (cacheInstance) {\n Promise.resolve(cacheInstance).then(function (instance) {\n callback({\n prefixCls: \"\".concat(prefixCls, \"-notice\"),\n instance: instance\n });\n });\n return;\n }\n\n var closeIconToRender = /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-close-x\")\n }, closeIcon || /*#__PURE__*/React.createElement(CloseOutlined, {\n className: \"\".concat(prefixCls, \"-close-icon\")\n }));\n var notificationClass = classNames(\"\".concat(prefixCls, \"-\").concat(placement), _defineProperty({}, \"\".concat(prefixCls, \"-rtl\"), rtl === true));\n notificationInstance[cacheKey] = new Promise(function (resolve) {\n Notification.newInstance({\n prefixCls: prefixCls,\n className: notificationClass,\n style: getPlacementStyle(placement, top, bottom),\n getContainer: getContainer,\n closeIcon: closeIconToRender\n }, function (notification) {\n resolve(notification);\n callback({\n prefixCls: \"\".concat(prefixCls, \"-notice\"),\n instance: notification\n });\n });\n });\n}\n\nvar typeToIcon = {\n success: CheckCircleOutlined,\n info: InfoCircleOutlined,\n error: CloseCircleOutlined,\n warning: ExclamationCircleOutlined\n};\n\nfunction getRCNoticeProps(args, prefixCls) {\n var durationArg = args.duration,\n icon = args.icon,\n type = args.type,\n description = args.description,\n message = args.message,\n btn = args.btn,\n onClose = args.onClose,\n onClick = args.onClick,\n key = args.key,\n style = args.style,\n className = args.className;\n var duration = durationArg === undefined ? defaultDuration : durationArg;\n var iconNode = null;\n\n if (icon) {\n iconNode = /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-icon\")\n }, args.icon);\n } else if (type) {\n iconNode = /*#__PURE__*/React.createElement(typeToIcon[type] || null, {\n className: \"\".concat(prefixCls, \"-icon \").concat(prefixCls, \"-icon-\").concat(type)\n });\n }\n\n var autoMarginTag = !description && iconNode ? /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-message-single-line-auto-margin\")\n }) : null;\n return {\n content: /*#__PURE__*/React.createElement(\"div\", {\n className: iconNode ? \"\".concat(prefixCls, \"-with-icon\") : '',\n role: \"alert\"\n }, iconNode, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-message\")\n }, autoMarginTag, message), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-description\")\n }, description), btn ? /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-btn\")\n }, btn) : null),\n duration: duration,\n closable: true,\n onClose: onClose,\n onClick: onClick,\n key: key,\n style: style || {},\n className: classNames(className, _defineProperty({}, \"\".concat(prefixCls, \"-\").concat(type), !!type))\n };\n}\n\nfunction notice(args) {\n getNotificationInstance(args, function (_ref) {\n var prefixCls = _ref.prefixCls,\n instance = _ref.instance;\n instance.notice(getRCNoticeProps(args, prefixCls));\n });\n}\n\nvar api = {\n open: notice,\n close: function close(key) {\n Object.keys(notificationInstance).forEach(function (cacheKey) {\n return Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {\n instance.removeNotice(key);\n });\n });\n },\n config: setNotificationConfig,\n destroy: function destroy() {\n Object.keys(notificationInstance).forEach(function (cacheKey) {\n Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {\n instance.destroy();\n });\n delete notificationInstance[cacheKey]; // lgtm[js/missing-await]\n });\n }\n};\n['success', 'info', 'warning', 'error'].forEach(function (type) {\n api[type] = function (args) {\n return api.open(_extends(_extends({}, args), {\n type: type\n }));\n };\n});\napi.warn = api.warning;\napi.useNotification = createUseNotification(getNotificationInstance, getRCNoticeProps);\n/** @private test Only function. Not work on production */\n\nexport var getInstance = function getInstance(cacheKey) {\n return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n return _context.abrupt(\"return\", process.env.NODE_ENV === 'test' ? notificationInstance[cacheKey] : null);\n\n case 1:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n};\nexport default api;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport useRCNotification from \"rc-notification/es/useNotification\";\nimport { ConfigConsumer } from '../../config-provider';\nexport default function createUseNotification(getNotificationInstance, getRCNoticeProps) {\n var useNotification = function useNotification() {\n // We can only get content by render\n var getPrefixCls; // We create a proxy to handle delay created instance\n\n var innerInstance = null;\n var proxy = {\n add: function add(noticeProps, holderCallback) {\n innerInstance === null || innerInstance === void 0 ? void 0 : innerInstance.component.add(noticeProps, holderCallback);\n }\n };\n\n var _useRCNotification = useRCNotification(proxy),\n _useRCNotification2 = _slicedToArray(_useRCNotification, 2),\n hookNotify = _useRCNotification2[0],\n holder = _useRCNotification2[1];\n\n function notify(args) {\n var customizePrefixCls = args.prefixCls;\n var mergedPrefixCls = getPrefixCls('notification', customizePrefixCls);\n getNotificationInstance(_extends(_extends({}, args), {\n prefixCls: mergedPrefixCls\n }), function (_ref) {\n var prefixCls = _ref.prefixCls,\n instance = _ref.instance;\n innerInstance = instance;\n hookNotify(getRCNoticeProps(args, prefixCls));\n });\n } // Fill functions\n\n\n var hookApiRef = React.useRef({});\n hookApiRef.current.open = notify;\n ['success', 'info', 'warning', 'error'].forEach(function (type) {\n hookApiRef.current[type] = function (args) {\n return hookApiRef.current.open(_extends(_extends({}, args), {\n type: type\n }));\n };\n });\n return [hookApiRef.current, /*#__PURE__*/React.createElement(ConfigConsumer, {\n key: \"holder\"\n }, function (context) {\n getPrefixCls = context.getPrefixCls;\n return holder;\n })];\n };\n\n return useNotification;\n}","export const store = {\n _origin: 'https://api.emailjs.com',\n};\n","import { store } from '../../store/store';\n/**\n * Initiation\n * @param {string} userID - set the EmailJS user ID\n * @param {string} origin - set the EmailJS origin\n */\nexport const init = (userID, origin = 'https://api.emailjs.com') => {\n store._userID = userID;\n store._origin = origin;\n};\n","export const validateParams = (userID, serviceID, templateID) => {\n if (!userID) {\n throw 'The user ID is required. Visit https://dashboard.emailjs.com/admin/integration';\n }\n if (!serviceID) {\n throw 'The service ID is required. Visit https://dashboard.emailjs.com/admin';\n }\n if (!templateID) {\n throw 'The template ID is required. Visit https://dashboard.emailjs.com/admin/templates';\n }\n return true;\n};\n","export class EmailJSResponseStatus {\n constructor(httpResponse) {\n this.status = httpResponse.status;\n this.text = httpResponse.responseText;\n }\n}\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import { EmailJSResponseStatus } from '../models/EmailJSResponseStatus';\nimport { store } from '../store/store';\nexport const sendPost = (url, data, headers = {}) => {\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.addEventListener('load', ({ target }) => {\n const responseStatus = new EmailJSResponseStatus(target);\n if (responseStatus.status === 200 || responseStatus.text === 'OK') {\n resolve(responseStatus);\n }\n else {\n reject(responseStatus);\n }\n });\n xhr.addEventListener('error', ({ target }) => {\n reject(new EmailJSResponseStatus(target));\n });\n xhr.open('POST', store._origin + url, true);\n Object.keys(headers).forEach((key) => {\n xhr.setRequestHeader(key, headers[key]);\n });\n xhr.send(data);\n });\n};\n","import { init } from './methods/init/init';\nimport { send } from './methods/send/send';\nimport { sendForm } from './methods/sendForm/sendForm';\nexport { init, send, sendForm };\nexport default {\n init,\n send,\n sendForm,\n};\n","import { store } from '../../store/store';\nimport { validateParams } from '../../utils/validateParams';\nimport { sendPost } from '../../api/sendPost';\n/**\n * Send a template to the specific EmailJS service\n * @param {string} serviceID - the EmailJS service ID\n * @param {string} templateID - the EmailJS template ID\n * @param {object} templatePrams - the template params, what will be set to the EmailJS template\n * @param {string} userID - the EmailJS user ID\n * @returns {Promise}\n */\nexport const send = (serviceID, templateID, templatePrams, userID) => {\n const uID = userID || store._userID;\n validateParams(uID, serviceID, templateID);\n const params = {\n lib_version: '3.2.0',\n user_id: uID,\n service_id: serviceID,\n template_id: templateID,\n template_params: templatePrams,\n };\n return sendPost('/api/v1.0/email/send', JSON.stringify(params), {\n 'Content-type': 'application/json',\n });\n};\n","import { store } from '../../store/store';\nimport { validateParams } from '../../utils/validateParams';\nimport { sendPost } from '../../api/sendPost';\nconst findHTMLForm = (form) => {\n let currentForm;\n if (typeof form === 'string') {\n currentForm = document.querySelector(form);\n }\n else {\n currentForm = form;\n }\n if (!currentForm || currentForm.nodeName !== 'FORM') {\n throw 'The 3rd parameter is expected to be the HTML form element or the style selector of form';\n }\n return currentForm;\n};\n/**\n * Send a form the specific EmailJS service\n * @param {string} serviceID - the EmailJS service ID\n * @param {string} templateID - the EmailJS template ID\n * @param {string | HTMLFormElement} form - the form element or selector\n * @param {string} userID - the EmailJS user ID\n * @returns {Promise}\n */\nexport const sendForm = (serviceID, templateID, form, userID) => {\n const uID = userID || store._userID;\n const currentForm = findHTMLForm(form);\n validateParams(uID, serviceID, templateID);\n const formData = new FormData(currentForm);\n formData.append('lib_version', '3.2.0');\n formData.append('service_id', serviceID);\n formData.append('template_id', templateID);\n formData.append('user_id', uID);\n return sendPost('/api/v1.0/email/send-form', formData);\n};\n"],"sourceRoot":""}