(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7751],{64893:function(me,z,e){"use strict";e.d(z,{G:function(){return P}});var p=e(96156),W=e(28481),n=e(28991),R=e(81253),S=e(85893),Y=["colon","dependencies","extra","getValueFromEvent","getValueProps","hasFeedback","help","htmlFor","initialValue","noStyle","label","labelAlign","labelCol","name","preserve","normalize","required","rules","shouldUpdate","trigger","validateFirst","validateStatus","validateTrigger","valuePropName","wrapperCol","hidden","addonBefore","addonAfter"];function B(M){var g={};return Y.forEach(function(y){M[y]!==void 0&&(g[y]=M[y])}),g}var K=e(51812),C=e(26369),d=e(60249),b=e(94184),T=e.n(b),k=e(48526),s=e(80334),r=e(67294),a=e(30939),G=e(82785),q=e(97462),ee=e(66758),V=e(2514),Q=["valueType","customLightMode","lightFilterLabelFormatter","valuePropName","ignoreWidth","defaultProps"],N=["label","tooltip","placeholder","width","bordered","messageVariables","ignoreFormItem","transform","convertValue","readonly","allowClear","colSize","getFormItemProps","getFieldProps","filedConfig","cacheForSwr","proFieldProps"],ae=Symbol("ProFormComponent"),$={xs:104,s:216,sm:216,m:328,md:328,l:440,lg:440,xl:552},D=["switch","radioButton","radio","rate"];function P(M,g){M.displayName="ProFormComponent";var y=function(t){var o=(0,n.Z)((0,n.Z)({},t==null?void 0:t.filedConfig),g)||{},v=o.valueType,l=o.customLightMode,c=o.lightFilterLabelFormatter,O=o.valuePropName,Z=O===void 0?"value":O,_=o.ignoreWidth,L=o.defaultProps,A=(0,R.Z)(o,Q),i=(0,n.Z)((0,n.Z)({},L),t),h=i.label,de=i.tooltip,ue=i.placeholder,j=i.width,Ce=i.bordered,fe=i.messageVariables,ie=i.ignoreFormItem,he=i.transform,pe=i.convertValue,oe=i.readonly,ce=i.allowClear,Ze=i.colSize,w=i.getFormItemProps,ne=i.getFieldProps,De=i.filedConfig,Pe=i.cacheForSwr,I=i.proFieldProps,u=(0,R.Z)(i,N),E=v||u.valueType,ve=(0,r.useMemo)(function(){return _||D.includes(E)},[_,E]),Fe=(0,r.useState)(),Me=(0,W.Z)(Fe,2),Ee=Me[1],ge=(0,r.useState)(),ye=(0,W.Z)(ge,2),Oe=ye[0],se=ye[1],F=r.useContext(ee.Z),X=(0,r.useMemo)(function(){return{formItemProps:w==null?void 0:w(),fieldProps:ne==null?void 0:ne()}},[ne,w,u.dependenciesValues,Oe]),m=(0,r.useMemo)(function(){var f=(0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)({},ie?(0,K.Z)({value:u.value}):{}),{},{placeholder:ue,disabled:t.disabled},F.fieldProps),X.fieldProps),u.fieldProps);return f.style=(0,K.Z)(f==null?void 0:f.style),f},[ie,u.value,u.fieldProps,ue,t.disabled,F.fieldProps,X.fieldProps]),xe=B(u),Se=(0,r.useMemo)(function(){return(0,n.Z)((0,n.Z)((0,n.Z)((0,n.Z)({},F.formItemProps),xe),X.formItemProps),u.formItemProps)},[X.formItemProps,F.formItemProps,u.formItemProps,xe]),U=(0,r.useMemo)(function(){return(0,n.Z)((0,n.Z)({messageVariables:fe},A),Se)},[A,Se,fe]);(0,s.ET)(!u.defaultValue,"\u8BF7\u4E0D\u8981\u5728 Form \u4E2D\u4F7F\u7528 defaultXXX\u3002\u5982\u679C\u9700\u8981\u9ED8\u8BA4\u503C\u8BF7\u4F7F\u7528 initialValues \u548C initialValue\u3002");var Be=(0,r.useContext)(k.zb),Ie=Be.prefixName,Te=(0,r.useMemo)(function(){var f,x=U==null?void 0:U.name;Array.isArray(x)&&(x=x.join("_")),Array.isArray(Ie)&&x&&(x="".concat(Ie.join("."),".").concat(x));var te=x&&"form-".concat((f=F.formKey)!==null&&f!==void 0?f:"","-field-").concat(x);return te},[(0,a.P)(U==null?void 0:U.name),Ie,F.formKey]),Ue=(0,C.Z)(u),Ne=(0,r.useCallback)(function(){var f;w||ne?se([]):u.renderFormItem&&Ee([]);for(var x=arguments.length,te=new Array(x),le=0;le