👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

9 lines
27 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8161],{82099:function(it,ge,i){var N=i(50120);ge.Z=N.Z},67190:function(it,ge,i){i.d(ge,{Z:function(){return tn}});var N=i(1788),ke=i(84875),A=i.n(ke),he=i(10091),o=i(50959),Ae=i(58351),S=i(1415);function Me(e){const[t,n]=o.useState(e);return o.useEffect(()=>{const r=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(r)}},[e]),t}var s=i(60076),f=i(6301),P=i(37747),G=i(23148),O=i(90467),g=i(81501),j=e=>{const{componentCls:t}=e,n=`${t}-show-help`,r=`${t}-show-help-item`;return{[n]:{transition:`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:"hidden",transition:`height ${e.motionDurationSlow} ${e.motionEaseInOut},
opacity ${e.motionDurationSlow} ${e.motionEaseInOut},
transform ${e.motionDurationSlow} ${e.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:"translateY(-5px)",opacity:0,["&-active"]:{transform:"translateY(0)",opacity:1}},[`&${r}-leave-active`]:{transform:"translateY(-5px)"}}}}};const Y=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${(0,s.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},label:{fontSize:e.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},[`input[type='file']:focus,
input[type='radio']:focus,
input[type='checkbox']:focus`]:{outline:0,boxShadow:`0 0 0 ${(0,s.bf)(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),Ne=(e,t)=>{const{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},st=e=>{const{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},(0,f.Wf)(e)),Y(e)),{[`${t}-text`]:{display:"inline-block",paddingInlineEnd:e.paddingSM},"&-small":Object.assign({},Ne(e,e.controlHeightSM)),"&-large":Object.assign({},Ne(e,e.controlHeightLG))})}},ct=e=>{const{formItemCls:t,iconCls:n,componentCls:r,rootPrefixCls:l,labelRequiredMarkColor:a,labelColor:d,labelFontSize:b,labelHeight:m,labelColonMarginInlineStart:u,labelColonMarginInlineEnd:v,itemMarginBottom:p}=e;return{[t]:Object.assign(Object.assign({},(0,f.Wf)(e)),{marginBottom:p,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${l}-row`]:{display:"none"},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:e.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:m,color:d,fontSize:b,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:"top"},[`&${t}-required:not(${t}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:e.marginXXS,color:a,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${r}-hide-required-mark &`]:{display:"none"}},[`${t}-optional`]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`${r}-hide-required-mark &`]:{display:"none"}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:u,marginInlineEnd:v},[`&${t}-no-colon::after`]:{content:'"\\a0"'}}},[`${t}-control`]:{["--ant-display"]:"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${l}-col-'"]):not([class*="' ${l}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[t]:{"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:"auto",opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:P.kr,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},_e=e=>{const{componentCls:t,formItemCls:n}=e;return{[`${t}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:"unset"}}}}},Pe=e=>{const{componentCls:t,formItemCls:n}=e;return{[`${t}-inline`]:{display:"flex",flexWrap:"wrap",[n]:{flex:"none",marginInlineEnd:e.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${n}-label,
> ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${t}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},M=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),pe=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:M(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:"wrap",[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},be=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${t}-vertical`]:{[n]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${t}-item-control`]:{width:"100%"}}},[`${t}-vertical ${n}-label,
.${r}-col-24${n}-label,
.${r}-col-xl-24${n}-label`]:M(e),[`@media (max-width: ${(0,s.bf)(e.screenXSMax)})`]:[pe(e),{[t]:{[`.${r}-col-xs-24${n}-label`]:M(e)}}],[`@media (max-width: ${(0,s.bf)(e.screenSMMax)})`]:{[t]:{[`.${r}-col-sm-24${n}-label`]:M(e)}},[`@media (max-width: ${(0,s.bf)(e.screenMDMax)})`]:{[t]:{[`.${r}-col-md-24${n}-label`]:M(e)}},[`@media (max-width: ${(0,s.bf)(e.screenLGMax)})`]:{[t]:{[`.${r}-col-lg-24${n}-label`]:M(e)}}}},ve=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0}),ce=(e,t)=>(0,O.TS)(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t});var re=(0,g.I$)("Form",(e,t)=>{let{rootPrefixCls:n}=t;const r=ce(e,n);return[st(r),ct(r),j(r),_e(r),Pe(r),be(r),(0,G.Z)(r),P.kr]},ve,{order:-1e3}),oe=i(10254);const ye=[];function Ce(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof e=="string"?e:`${t}-${r}`,error:e,errorStatus:n}}var xe=e=>{let{help:t,helpStatus:n,errors:r=ye,warnings:l=ye,className:a,fieldId:d,onVisibleChanged:b}=e;const{prefixCls:m}=o.useContext(S.Rk),u=`${m}-item-explain`,v=(0,oe.Z)(m),[p,Z]=re(m,v),E=(0,o.useMemo)(()=>(0,Ae.Z)(m),[m]),R=Me(r),L=Me(l),W=o.useMemo(()=>t!=null?[Ce(t,"help",n)]:[].concat((0,N.Z)(R.map((c,y)=>Ce(c,"error","error",y))),(0,N.Z)(L.map((c,y)=>Ce(c,"warning","warning",y)))),[t,n,R,L]),F={};return d&&(F.id=`${d}_help`),p(o.createElement(he.ZP,{motionDeadline:E.motionDeadline,motionName:`${m}-show-help`,visible:!!W.length,onVisibleChanged:b},c=>{const{className:y,style:x}=c;return o.createElement("div",Object.assign({},F,{className:A()(u,y,v,a,Z),style:x,role:"alert"}),o.createElement(he.V4,Object.assign({keys:W},(0,Ae.Z)(m),{motionName:`${m}-show-help-item`,component:!1}),C=>{const{key:$,error:H,errorStatus:V,className:U,style:z}=C;return o.createElement("div",{key:$,className:A()(U,{[`${u}-${V}`]:V}),style:z},H)}))}))},J=i(7445),je=i(31594),Be=i(69943),tt=i(81046),B=i(17436),X=i(10886);const Xe=["parentNode"],le="form_item";function h(e){return e===void 0||e===!1?[]:Array.isArray(e)?e:[e]}function $e(e,t){if(!e.length)return;const n=e.join("_");return t?`${t}_${n}`:Xe.includes(n)?`${le}_${n}`:n}function Se(e,t,n,r,l,a){let d=r;return a!==void 0?d=a:n.validating?d="validating":e.length?d="error":t.length?d="warning":(n.touched||l&&n.validated)&&(d="success"),d}function Ie(e){return h(e).join("_")}function Re(e){const[t]=(0,J.cI)(),n=o.useRef({}),r=o.useMemo(()=>e!=null?e:Object.assign(Object.assign({},t),{__INTERNAL__:{itemRef:l=>a=>{const d=Ie(l);a?n.current[d]=a:delete n.current[d]}},scrollToField:function(l){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const d=h(l),b=$e(d,r.__INTERNAL__.name),m=b?document.getElementById(b):null;m&&(0,X.Z)(m,Object.assign({scrollMode:"if-needed",block:"nearest"},a))},getFieldInstance:l=>{const a=Ie(l);return n.current[a]}}),[e,t]);return[r]}var Ke=i(67347),Le=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,r=Object.getOwnPropertySymbols(e);l<r.length;l++)t.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(e,r[l])&&(n[r[l]]=e[r[l]]);return n};const Te=(e,t)=>{const n=o.useContext(Be.Z),{getPrefixCls:r,direction:l,form:a}=o.useContext(je.E_),{prefixCls:d,className:b,rootClassName:m,size:u,disabled:v=n,form:p,colon:Z,labelAlign:E,labelWrap:R,labelCol:L,wrapperCol:W,hideRequiredMark:F,layout:c="horizontal",scrollToFirstError:y,requiredMark:x,onFinishFailed:C,name:$,style:H,feedbackIcons:V}=e,U=Le(e,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),z=(0,B.Z)(u),de=o.useContext(Ke.Z),me=(0,o.useMemo)(()=>x!==void 0?x:a&&a.requiredMark!==void 0?a.requiredMark:!F,[F,x,a]),ie=Z!=null?Z:a==null?void 0:a.colon,w=r("form",d),se=(0,oe.Z)(w),[_,ee]=re(w,se),Qe=A()(w,`${w}-${c}`,{[`${w}-hide-required-mark`]:me===!1,[`${w}-rtl`]:l==="rtl",[`${w}-${z}`]:z},se,ee,a==null?void 0:a.className,b,m),[ue]=Re(p),{__INTERNAL__:rt}=ue;rt.name=$;const Fe=(0,o.useMemo)(()=>({name:$,labelAlign:E,labelCol:L,labelWrap:R,wrapperCol:W,vertical:c==="vertical",colon:ie,requiredMark:me,itemRef:rt.itemRef,form:ue,feedbackIcons:V}),[$,E,L,W,c,ie,me,ue,V]);o.useImperativeHandle(t,()=>ue);const De=(te,ne)=>{if(te){let I={block:"nearest"};typeof te=="object"&&(I=te),ue.scrollToField(ne,I)}},dt=te=>{if(C==null||C(te),te.errorFields.length){const ne=te.errorFields[0].name;if(y!==void 0){De(y,ne);return}a&&a.scrollToFirstError!==void 0&&De(a.scrollToFirstError,ne)}};return _(o.createElement(Be.n,{disabled:v},o.createElement(tt.Z.Provider,{value:z},o.createElement(S.RV,{validateMessages:de},o.createElement(S.q3.Provider,{value:Fe},o.createElement(J.ZP,Object.assign({id:$},U,{name:$,onFinishFailed:dt,form:ue,style:Object.assign(Object.assign({},a==null?void 0:a.style),H),className:Qe})))))))};var Ze=o.forwardRef(Te),Ve=i(42291),Ee=i(12602),Q=i(94914),k=i(27970),We=i(13763);function He(e){if(typeof e=="function")return e;const t=(0,We.Z)(e);return t.length<=1?t[0]:t}const ze=()=>{const{status:e,errors:t=[],warnings:n=[]}=(0,o.useContext)(S.aM);return{status:e,errors:t,warnings:n}};ze.Context=S.aM;var Ye=ze,qe=i(28449);function nt(e){const[t,n]=o.useState(e),r=(0,o.useRef)(null),l=(0,o.useRef)([]),a=(0,o.useRef)(!1);o.useEffect(()=>(a.current=!1,()=>{a.current=!0,qe.Z.cancel(r.current),r.current=null}),[]);function d(b){a.current||(r.current===null&&(l.current=[],r.current=(0,qe.Z)(()=>{r.current=null,n(m=>{let u=m;return l.current.forEach(v=>{u=v(u)}),u})})),l.current.push(b))}return[t,d]}function $t(){const{itemRef:e}=o.useContext(S.q3),t=o.useRef({});function n(r,l){const a=l&&typeof l=="object"&&l.ref,d=r.join("_");return(t.current.name!==d||t.current.originRef!==a)&&(t.current.name=d,t.current.originRef=a,t.current.ref=(0,Ee.sQ)(e(r),a)),t.current.ref}return n}var St=i(95992),It=i(77189),Et=i(87017),Ft=i(72611),gt=i(50120);const wt=e=>{const{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:"flex"}}}};var Ot=(0,g.bk)(["Form","item-item"],(e,t)=>{let{rootPrefixCls:n}=t;const r=ce(e,n);return[wt(r)]}),Mt=e=>{const{prefixCls:t,status:n,wrapperCol:r,children:l,errors:a,warnings:d,_internalItemRender:b,extra:m,help:u,fieldId:v,marginBottom:p,onErrorVisibleChanged:Z}=e,E=`${t}-item`,R=o.useContext(S.q3),L=r||R.wrapperCol||{},W=A()(`${E}-control`,L.className),F=o.useMemo(()=>Object.assign({},R),[R]);delete F.labelCol,delete F.wrapperCol;const c=o.createElement("div",{className:`${E}-control-input`},o.createElement("div",{className:`${E}-control-input-content`},l)),y=o.useMemo(()=>({prefixCls:t,status:n}),[t,n]),x=p!==null||a.length||d.length?o.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},o.createElement(S.Rk.Provider,{value:y},o.createElement(xe,{fieldId:v,errors:a,warnings:d,help:u,helpStatus:n,className:`${E}-explain-connected`,onVisibleChanged:Z})),!!p&&o.createElement("div",{style:{width:0,height:p}})):null,C={};v&&(C.id=`${v}_extra`);const $=m?o.createElement("div",Object.assign({},C,{className:`${E}-extra`}),m):null,H=b&&b.mark==="pro_table_render"&&b.render?b.render(e,{input:c,errorList:x,extra:$}):o.createElement(o.Fragment,null,c,x,$);return o.createElement(S.q3.Provider,{value:F},o.createElement(gt.Z,Object.assign({},L,{className:W}),H),o.createElement(Ot,{prefixCls:t}))},Nt=i(38126),Pt=i(948),jt=i(38782),Rt=function(t,n){return o.createElement(jt.Z,(0,Nt.Z)({},t,{ref:n,icon:Pt.Z}))},Lt=o.forwardRef(Rt),Tt=i(59848),Zt=i(45449),Vt=i(32618),Wt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,r=Object.getOwnPropertySymbols(e);l<r.length;l++)t.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(e,r[l])&&(n[r[l]]=e[r[l]]);return n};function Ht(e){return e?typeof e=="object"&&!o.isValidElement(e)?e:{title:e}:null}var zt=e=>{let{prefixCls:t,label:n,htmlFor:r,labelCol:l,labelAlign:a,colon:d,required:b,requiredMark:m,tooltip:u}=e;var v;const[p]=(0,Zt.Z)("Form"),{vertical:Z,labelAlign:E,labelCol:R,labelWrap:L,colon:W}=o.useContext(S.q3);if(!n)return null;const F=l||R||{},c=a||E,y=`${t}-item-label`,x=A()(y,c==="left"&&`${y}-left`,F.className,{[`${y}-wrap`]:!!L});let C=n;const $=d===!0||W!==!1&&d!==!1;$&&!Z&&typeof n=="string"&&n.trim()!==""&&(C=n.replace(/[:|:]\s*$/,""));const V=Ht(u);if(V){const{icon:me=o.createElement(Lt,null)}=V,ie=Wt(V,["icon"]),w=o.createElement(Vt.Z,Object.assign({},ie),o.cloneElement(me,{className:`${t}-item-tooltip`,title:"",onClick:se=>{se.preventDefault()},tabIndex:null}));C=o.createElement(o.Fragment,null,C,w)}const U=m==="optional",z=typeof m=="function";z?C=m(C,{required:!!b}):U&&!b&&(C=o.createElement(o.Fragment,null,C,o.createElement("span",{className:`${t}-item-optional`,title:""},(p==null?void 0:p.optional)||((v=Tt.Z.Form)===null||v===void 0?void 0:v.optional))));const de=A()({[`${t}-item-required`]:b,[`${t}-item-required-mark-optional`]:U||z,[`${t}-item-no-colon`]:!$});return o.createElement(gt.Z,Object.assign({},F,{className:x}),o.createElement("label",{htmlFor:r,className:de,title:typeof n=="string"?n:""},C))},Dt=i(71349),At=i(67536),Bt=i(39388),Xt=i(58516);const Kt={success:Dt.Z,warning:Bt.Z,error:At.Z,validating:Xt.Z};function ht(e){let{children:t,errors:n,warnings:r,hasFeedback:l,validateStatus:a,prefixCls:d,meta:b,noStyle:m}=e;const u=`${d}-item`,{feedbackIcons:v}=o.useContext(S.q3),p=Se(n,r,b,null,!!l,a),{isFormItemInput:Z,status:E,hasFeedback:R,feedbackIcon:L}=o.useContext(S.aM),W=o.useMemo(()=>{var F;let c;if(l){const x=l!==!0&&l.icons||v,C=p&&((F=x==null?void 0:x({status:p,errors:n,warnings:r}))===null||F===void 0?void 0:F[p]),$=p&&Kt[p];c=C!==!1&&$?o.createElement("span",{className:A()(`${u}-feedback-icon`,`${u}-feedback-icon-${p}`)},C||o.createElement($,null)):null}const y={status:p||"",errors:n,warnings:r,hasFeedback:!!l,feedbackIcon:c,isFormItemInput:!0};return m&&(y.status=(p!=null?p:E)||"",y.isFormItemInput=Z,y.hasFeedback=!!(l!=null?l:R),y.feedbackIcon=l!==void 0?y.feedbackIcon:L),y},[p,l,m,Z,E]);return o.createElement(S.aM.Provider,{value:W},t)}var Gt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,r=Object.getOwnPropertySymbols(e);l<r.length;l++)t.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(e,r[l])&&(n[r[l]]=e[r[l]]);return n};function Yt(e){const{prefixCls:t,className:n,rootClassName:r,style:l,help:a,errors:d,warnings:b,validateStatus:m,meta:u,hasFeedback:v,hidden:p,children:Z,fieldId:E,required:R,isRequired:L,onSubItemMetaChange:W}=e,F=Gt(e,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),c=`${t}-item`,{requiredMark:y}=o.useContext(S.q3),x=o.useRef(null),C=Me(d),$=Me(b),H=a!=null,V=!!(H||d.length||b.length),U=!!x.current&&(0,St.Z)(x.current),[z,de]=o.useState(null);(0,It.Z)(()=>{if(V&&x.current){const _=getComputedStyle(x.current);de(parseInt(_.marginBottom,10))}},[V,U]);const me=_=>{_||de(null)},w=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const ee=_?C:u.errors,Qe=_?$:u.warnings;return Se(ee,Qe,u,"",!!v,m)}(),se=A()(c,n,r,{[`${c}-with-help`]:H||C.length||$.length,[`${c}-has-feedback`]:w&&v,[`${c}-has-success`]:w==="success",[`${c}-has-warning`]:w==="warning",[`${c}-has-error`]:w==="error",[`${c}-is-validating`]:w==="validating",[`${c}-hidden`]:p});return o.createElement("div",{className:se,style:l,ref:x},o.createElement(Ft.Z,Object.assign({className:`${c}-row`},(0,Et.Z)(F,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),o.createElement(zt,Object.assign({htmlFor:E},e,{requiredMark:y,required:R!=null?R:L,prefixCls:t})),o.createElement(Mt,Object.assign({},e,u,{errors:C,warnings:$,prefixCls:t,status:w,help:a,marginBottom:z,onErrorVisibleChanged:me}),o.createElement(S.qI.Provider,{value:W},o.createElement(ht,{prefixCls:t,meta:u,errors:u.errors,warnings:u.warnings,hasFeedback:v,validateStatus:w},Z)))),!!z&&o.createElement("div",{className:`${c}-margin-offset`,style:{marginBottom:-z}}))}const qt="__SPLIT__",ln=null,Qt=o.memo(e=>{let{children:t}=e;return t},(e,t)=>e.value===t.value&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((n,r)=>n===t.childProps[r]));function pt(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Ut(e){const{name:t,noStyle:n,className:r,dependencies:l,prefixCls:a,shouldUpdate:d,rules:b,children:m,required:u,label:v,messageVariables:p,trigger:Z="onChange",validateTrigger:E,hidden:R,help:L}=e,{getPrefixCls:W}=o.useContext(je.E_),{name:F}=o.useContext(S.q3),c=He(m),y=typeof c=="function",x=o.useContext(S.qI),{validateTrigger:C}=o.useContext(J.zb),$=E!==void 0?E:C,H=t!=null,V=W("form",a),U=(0,oe.Z)(V),[z,de]=re(V,U),me=(0,k.ln)("Form.Item"),ie=o.useContext(J.ZM),w=o.useRef(),[se,_]=nt({}),[ee,Qe]=(0,Ve.Z)(()=>pt()),ue=I=>{const K=ie==null?void 0:ie.getKey(I.name);if(Qe(I.destroy?pt():I,!0),n&&L!==!1&&x){let D=I.name;if(I.destroy)D=w.current||D;else if(K!==void 0){const[fe,we]=K;D=[fe].concat((0,N.Z)(we)),w.current=D}x(I,D)}},rt=(I,K)=>{_(D=>{const fe=Object.assign({},D),Ue=[].concat((0,N.Z)(I.name.slice(0,-1)),(0,N.Z)(K)).join(qt);return I.destroy?delete fe[Ue]:fe[Ue]=I,fe})},[Fe,De]=o.useMemo(()=>{const I=(0,N.Z)(ee.errors),K=(0,N.Z)(ee.warnings);return Object.values(se).forEach(D=>{I.push.apply(I,(0,N.Z)(D.errors||[])),K.push.apply(K,(0,N.Z)(D.warnings||[]))}),[I,K]},[se,ee.errors,ee.warnings]),dt=$t();function te(I,K,D){return n&&!R?o.createElement(ht,{prefixCls:V,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:ee,errors:Fe,warnings:De,noStyle:!0},I):o.createElement(Yt,Object.assign({key:"row"},e,{className:A()(r,U,de),prefixCls:V,fieldId:K,isRequired:D,errors:Fe,warnings:De,meta:ee,onSubItemMetaChange:rt}),I)}if(!H&&!y&&!l)return z(te(c));let ne={};return typeof v=="string"?ne.label=v:t&&(ne.label=String(t)),p&&(ne=Object.assign(Object.assign({},ne),p)),z(o.createElement(J.gN,Object.assign({},e,{messageVariables:ne,trigger:Z,validateTrigger:$,onMetaChange:ue}),(I,K,D)=>{const fe=h(t).length&&K?K.name:[],we=$e(fe,F),Ue=u!==void 0?u:!!(b&&b.some(T=>{if(T&&typeof T=="object"&&T.required&&!T.warningOnly)return!0;if(typeof T=="function"){const lt=T(D);return lt&&lt.required&&!lt.warningOnly}return!1})),ot=Object.assign({},I);let Je=null;if(Array.isArray(c)&&H)Je=c;else if(!(y&&(!(d||l)||H))){if(!(l&&!y&&!H))if((0,Q.l$)(c)){const T=Object.assign(Object.assign({},c.props),ot);if(T.id||(T.id=we),L||Fe.length>0||De.length>0||e.extra){const Oe=[];(L||Fe.length>0)&&Oe.push(`${we}_help`),e.extra&&Oe.push(`${we}_extra`),T["aria-describedby"]=Oe.join(" ")}Fe.length>0&&(T["aria-invalid"]="true"),Ue&&(T["aria-required"]="true"),(0,Ee.Yr)(c)&&(T.ref=dt(fe,c)),new Set([].concat((0,N.Z)(h(Z)),(0,N.Z)(h($)))).forEach(Oe=>{T[Oe]=function(){for(var vt,yt,mt,Ct,ut,xt=arguments.length,ft=new Array(xt),at=0;at<xt;at++)ft[at]=arguments[at];(mt=ot[Oe])===null||mt===void 0||(vt=mt).call.apply(vt,[ot].concat(ft)),(ut=(Ct=c.props)[Oe])===null||ut===void 0||(yt=ut).call.apply(yt,[Ct].concat(ft))}});const nn=[T["aria-required"],T["aria-invalid"],T["aria-describedby"]];Je=o.createElement(Qt,{value:ot[e.valuePropName||"value"],update:c,childProps:nn},(0,Q.Tm)(c,T))}else y&&(d||l)&&!H?Je=c(D):Je=c}return te(Je,we,Ue)}))}const bt=Ut;bt.useStatus=Ye;var Jt=bt,kt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,r=Object.getOwnPropertySymbols(e);l<r.length;l++)t.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(e,r[l])&&(n[r[l]]=e[r[l]]);return n},_t=e=>{var{prefixCls:t,children:n}=e,r=kt(e,["prefixCls","children"]);const{getPrefixCls:l}=o.useContext(je.E_),a=l("form",t),d=o.useMemo(()=>({prefixCls:a,status:"error"}),[a]);return o.createElement(J.aV,Object.assign({},r),(b,m,u)=>o.createElement(S.Rk.Provider,{value:d},n(b.map(v=>Object.assign(Object.assign({},v),{fieldKey:v.key})),m,{errors:u.errors,warnings:u.warnings})))};function en(){const{form:e}=(0,o.useContext)(S.q3);return e}const ae=Ze;ae.Item=Jt,ae.List=_t,ae.ErrorList=xe,ae.useForm=Re,ae.useFormInstance=en,ae.useWatch=J.qo,ae.Provider=S.RV,ae.create=()=>{};var tn=ae},23870:function(it,ge,i){var N=i(72611);ge.Z=N.Z},10886:function(it,ge,i){i.d(ge,{Z:function(){return Me}});const N=s=>typeof s=="object"&&s!=null&&s.nodeType===1,ke=(s,f)=>(!f||s!=="hidden")&&s!=="visible"&&s!=="clip",A=(s,f)=>{if(s.clientHeight<s.scrollHeight||s.clientWidth<s.scrollWidth){const P=getComputedStyle(s,null);return ke(P.overflowY,f)||ke(P.overflowX,f)||(G=>{const O=(g=>{if(!g.ownerDocument||!g.ownerDocument.defaultView)return null;try{return g.ownerDocument.defaultView.frameElement}catch(q){return null}})(G);return!!O&&(O.clientHeight<G.scrollHeight||O.clientWidth<G.scrollWidth)})(s)}return!1},he=(s,f,P,G,O,g,q,j)=>g<s&&q>f||g>s&&q<f?0:g<=s&&j<=P||q>=f&&j>=P?g-s-G:q>f&&j<P||g<s&&j>P?q-f+O:0,o=s=>{const f=s.parentElement;return f==null?s.getRootNode().host||null:f},Ae=(s,f)=>{var P,G,O,g;if(typeof document=="undefined")return[];const{scrollMode:q,block:j,inline:Y,boundary:Ne,skipOverflowHiddenElements:st}=f,ct=typeof Ne=="function"?Ne:le=>le!==Ne;if(!N(s))throw new TypeError("Invalid target");const _e=document.scrollingElement||document.documentElement,Pe=[];let M=s;for(;N(M)&&ct(M);){if(M=o(M),M===_e){Pe.push(M);break}M!=null&&M===document.body&&A(M)&&!A(document.documentElement)||M!=null&&A(M,st)&&Pe.push(M)}const pe=(G=(P=window.visualViewport)==null?void 0:P.width)!=null?G:innerWidth,be=(g=(O=window.visualViewport)==null?void 0:O.height)!=null?g:innerHeight,{scrollX:ve,scrollY:ce}=window,{height:re,width:oe,top:ye,right:Ce,bottom:et,left:xe}=s.getBoundingClientRect(),{top:J,right:je,bottom:Be,left:tt}=(le=>{const h=window.getComputedStyle(le);return{top:parseFloat(h.scrollMarginTop)||0,right:parseFloat(h.scrollMarginRight)||0,bottom:parseFloat(h.scrollMarginBottom)||0,left:parseFloat(h.scrollMarginLeft)||0}})(s);let B=j==="start"||j==="nearest"?ye-J:j==="end"?et+Be:ye+re/2-J+Be,X=Y==="center"?xe+oe/2-tt+je:Y==="end"?Ce+je:xe-tt;const Xe=[];for(let le=0;le<Pe.length;le++){const h=Pe[le],{height:$e,width:Se,top:Ie,right:Re,bottom:Ke,left:Le}=h.getBoundingClientRect();if(q==="if-needed"&&ye>=0&&xe>=0&&et<=be&&Ce<=pe&&ye>=Ie&&et<=Ke&&xe>=Le&&Ce<=Re)return Xe;const Te=getComputedStyle(h),Ge=parseInt(Te.borderLeftWidth,10),Ze=parseInt(Te.borderTopWidth,10),Ve=parseInt(Te.borderRightWidth,10),Ee=parseInt(Te.borderBottomWidth,10);let Q=0,k=0;const We="offsetWidth"in h?h.offsetWidth-h.clientWidth-Ge-Ve:0,He="offsetHeight"in h?h.offsetHeight-h.clientHeight-Ze-Ee:0,ze="offsetWidth"in h?h.offsetWidth===0?0:Se/h.offsetWidth:0,Ye="offsetHeight"in h?h.offsetHeight===0?0:$e/h.offsetHeight:0;if(_e===h)Q=j==="start"?B:j==="end"?B-be:j==="nearest"?he(ce,ce+be,be,Ze,Ee,ce+B,ce+B+re,re):B-be/2,k=Y==="start"?X:Y==="center"?X-pe/2:Y==="end"?X-pe:he(ve,ve+pe,pe,Ge,Ve,ve+X,ve+X+oe,oe),Q=Math.max(0,Q+ce),k=Math.max(0,k+ve);else{Q=j==="start"?B-Ie-Ze:j==="end"?B-Ke+Ee+He:j==="nearest"?he(Ie,Ke,$e,Ze,Ee+He,B,B+re,re):B-(Ie+$e/2)+He/2,k=Y==="start"?X-Le-Ge:Y==="center"?X-(Le+Se/2)+We/2:Y==="end"?X-Re+Ve+We:he(Le,Re,Se,Ge,Ve+We,X,X+oe,oe);const{scrollLeft:qe,scrollTop:nt}=h;Q=Ye===0?0:Math.max(0,Math.min(nt+Q/Ye,h.scrollHeight-$e/Ye+He)),k=ze===0?0:Math.max(0,Math.min(qe+k/ze,h.scrollWidth-Se/ze+We)),B+=nt-Q,X+=qe-k}Xe.push({el:h,top:Q,left:k})}return Xe},S=s=>s===!1?{block:"end",inline:"nearest"}:(f=>f===Object(f)&&Object.keys(f).length!==0)(s)?s:{block:"start",inline:"nearest"};function Me(s,f){if(!s.isConnected||!(O=>{let g=O;for(;g&&g.parentNode;){if(g.parentNode===document)return!0;g=g.parentNode instanceof ShadowRoot?g.parentNode.host:g.parentNode}return!1})(s))return;const P=(O=>{const g=window.getComputedStyle(O);return{top:parseFloat(g.scrollMarginTop)||0,right:parseFloat(g.scrollMarginRight)||0,bottom:parseFloat(g.scrollMarginBottom)||0,left:parseFloat(g.scrollMarginLeft)||0}})(s);if((O=>typeof O=="object"&&typeof O.behavior=="function")(f))return f.behavior(Ae(s,f));const G=typeof f=="boolean"||f==null?void 0:f.behavior;for(const{el:O,top:g,left:q}of Ae(s,S(f))){const j=g-P.top+P.bottom,Y=q-P.left+P.right;O.scroll({top:j,left:Y,behavior:G})}}}}]);