"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3958],{63606:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(67294),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},c=r(42135),u=function(e,t){return n.createElement(c.Z,Object.assign({},e,{ref:t,icon:s}))};u.displayName="CheckOutlined";var i=n.forwardRef(u)},64298:function(e,t,r){var n;r.d(t,{Qr:function(){return xe},cI:function(){return Se}});var s=r(67294),c=e=>void 0===e,u=e=>null===e||c(e),i=e=>Array.isArray(e);const a=e=>"object"===typeof e;var o=e=>!u(e)&&!i(e)&&a(e),l=e=>o(e)&&e.nodeType===Node.ELEMENT_NODE;const f={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit"},d="value",g="undefined",m="blur",h="change",v="input",b="max",p="min",O="maxLength",y="minLength",j="pattern",w="required",E="validate",S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,R=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,k=/\\(\\)?/g;var B=e=>!i(e)&&(V.test(e)||!S.test(e)),C=e=>{const t=[];return e.replace(R,((e,r,n,s)=>{t.push(n?s.replace(k,"$1"):r||e)})),t};function N(e,t,r){let n=-1;const s=B(t)?[t]:C(t),c=s.length,u=c-1;for(;++nObject.entries(e).reduce(((e,[t,r])=>B(t)?Object.assign(Object.assign({},e),{[t]:r}):(N(e,t,r),e)),{}),x=(e,t,r)=>{const n=t.split(/[,[\].]+?/).filter(Boolean).reduce(((e,t)=>u(e)?e:e[t]),e);return c(n)||n===e?e[t]||r:n},F=(e,t)=>{l(e)&&e.removeEventListener&&(e.removeEventListener(v,t),e.removeEventListener(h,t),e.removeEventListener(m,t))},M=e=>!!e&&"radio"===e.type,$=e=>!!e&&"checkbox"===e.type;function P(e){return!e||e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE&&P(e.parentNode)}var W=e=>o(e)&&!Object.keys(e).length;function A(e){return i(e)?e:C(e)}function D(e,t){return 1==t.length?e:function(e,t){const r=B(t)?[t]:A(t),n=t.length;let s=0;for(;ss?0:s+t),(r=r>s?s:r)<0&&(r+=s),s=t>r?0:r-t;const c=Array(s);for(;++n{!function(e,t){const r=B(t)?[t]:A(t),n=D(e,r),s=r[r.length-1],c=!(null!=n)||delete n[s];let u;for(let a=0;a0&&(u=e);++no(e)&&!W(e))).length&&delete u[r]),u=t}}}(e,t)})),e}const T={isValid:!1,value:""};var _=e=>i(e)?e.reduce(((e,{ref:{checked:t,value:r}})=>t?{isValid:!0,value:r}:e),T):T,H=e=>!!e&&"file"===e.type,I=e=>!!e&&"select-multiple"===e.type,q=e=>""===e;const Z={value:!1,isValid:!1},Q={value:!0,isValid:!0};var U=e=>{if(i(e)){if(e.length>1){const t=e.filter((({ref:{checked:e}})=>e)).map((({ref:{value:e}})=>e));return{value:t,isValid:!!t.length}}const{checked:t,value:r,attributes:n}=e[0].ref;return t?n&&!c(n.value)?c(r)||q(r)?Q:{value:r,isValid:!0}:Q:Z}return Z};function G(e,t){const{name:r,value:n}=t,s=e[r];return H(t)?t.files:M(t)?s?_(s.options).value:"":I(t)?(c=t.options,[...c].filter((({selected:e})=>e)).map((({value:e})=>e))):$(t)?!!s&&U(s.options).value:n;var c}var J=e=>"string"===typeof e,K=(e,t)=>{const r={},n=J(t),s=i(t),u=t&&t.nest;for(const i in e)(c(t)||u||n&&i.startsWith(t)||s&&t.find((e=>i.startsWith(e))))&&(r[i]=G(e,e[i].ref));return r},X=(e,{type:t,types:r,message:n})=>o(e)&&e.type===t&&e.message===n&&((e={},t={})=>Object.entries(e).reduce(((e,[r,n])=>!!e&&t[r]&&t[r]===n),!0))(e.types,r);var Y=e=>e instanceof RegExp,ee=e=>{const t=o(e)&&!Y(e);return{value:t?e.value:e,message:t?e.message:""}},te=e=>"function"===typeof e,re=e=>"boolean"===typeof e;function ne(e,t,r="validate"){const n=J(e);if(n||re(e)&&!e){return{type:r,message:n?e:"",ref:t}}}var se=(e,t,r,n,s)=>{if(!t)return{};const c=r[e];return Object.assign(Object.assign({},c),{types:Object.assign(Object.assign({},c&&c.types?c.types:{}),{[n]:s||!0})})},ce=async(e,t,{ref:r,ref:{type:n,value:s,name:c},options:i,required:a,maxLength:l,minLength:f,min:d,max:g,pattern:m,validate:h})=>{const v=e.current,S={},V=M(r),R=$(r),k=V||R,B=q(s),C=se.bind(null,c,t,S),N=(e,n,s,u=O,i=y)=>{const a=e?n:s;if(S[c]=Object.assign({type:e?u:i,message:a,ref:r},C(e?u:i,a)),!t)return S};if(a&&(!V&&!R&&(B||u(s))||re(s)&&!s||R&&!U(i).isValid||V&&!_(i).isValid)){const{value:e,message:n}=J(a)?{value:!!a,message:a}:ee(a);if(e&&(S[c]=Object.assign({type:w,message:n,ref:k?v[c].options[0].ref:r},C(w,n)),!t))return S}if(!u(d)||!u(g)){let e,c;const{value:i,message:a}=ee(g),{value:o,message:l}=ee(d);if("number"===n||!n&&!isNaN(s)){const t=r.valueAsNumber||parseFloat(s);u(i)||(e=t>i),u(o)||(c=tnew Date(i)),J(o)&&(c=te,a=f&&u{r.reduce((async(u,[i,a],o)=>{if(!W(await u)&&!t||!te(a))return s(u);let l;const f=ne(await a(e),n,i);return f?(l=Object.assign(Object.assign({},f),C(i,f.message)),t&&(S[c]=l)):l=u,r.length-1===o?s(l):l}),{})}));if(!W(s)&&(S[c]=Object.assign({ref:n},s),!t))return S}}return S};const ue=(e,t)=>i(e.inner)?e.inner.reduce(((e,{path:r,message:n,type:s})=>Object.assign(Object.assign({},e),e[r]&&t?{[r]:se(r,t,e,s,n)}:{[r]:e[r]||Object.assign({message:n,type:s},t?{types:{[s]:n||!0}}:{})})),{}):{[e.path]:{message:e.message,type:e.type}};async function ie(e,t,r,n,s){if(n)return n(r,s);try{return{values:await e.validate(r,{abortEarly:!1,context:s}),errors:{}}}catch(c){return{values:{},errors:L(ue(c,t))}}}var ae=(e,t,r)=>c(e[t])?x(e,t,r):e[t];function oe(e){return e.reduce(((e,t)=>e.concat(i(t)?oe(t):t)),[])}var le=e=>u(e)||!a(e);const fe=(e,t)=>{const r=(t,r,n)=>{const s=n?`${e}.${r}`:`${e}[${r}]`;return le(t)?s:fe(s,t)};return i(t)?t.map(((e,t)=>r(e,t))):Object.entries(t).map((([e,t])=>r(t,e,!0)))};var de=(e,t)=>oe(fe(e,t)),ge=(e,t,r,n,s)=>{let u;return r.add(t),W(e)?u=s||void 0:c(e[t])?(u=x(L(e),t),i(s)&&i(u)&&u.length!==s.length&&(u=s),c(u)||de(t,u).forEach((e=>r.add(e)))):(u=e[t],r.add(t)),c(u)?o(n)?ae(n,t):n:u},me=({hasError:e,isBlurEvent:t,isOnSubmit:r,isReValidateOnSubmit:n,isOnBlur:s,isReValidateOnBlur:c,isSubmitted:u})=>r&&n||r&&!u||s&&!t&&!e||c&&!t&&e||n&&u,he=(e,t)=>{const r=L(K(e));return t?x(r,t,r):r};function ve(e,t){let r=!1;if(!i(e)||!i(t)||e.length!==t.length)return!0;for(let n=0;ne.startsWith(`${t}[`);var pe=(e,t)=>[...e].reduce(((e,r)=>!!be(t,r)||e),!1);var Oe=e=>({isOnSubmit:!e||e===f.onSubmit,isOnBlur:e===f.onBlur,isOnChange:e===f.onChange});const{useRef:ye,useState:je,useCallback:we,useEffect:Ee}=n||(n=r.t(s,2));function Se({mode:e=f.onSubmit,reValidateMode:t=f.onChange,validationSchema:r,validationResolver:n,validationContext:s,defaultValues:a={},submitFocusError:d=!0,validateCriteriaMode:b}={}){const p=ye({}),O="all"===b,y=ye({}),j=ye({}),w=ye({}),E=ye(new Set),S=ye(new Set),V=ye(new Set),R=ye(new Set),k=ye(!0),C=ye({}),A=ye(a),D=ye(!1),T=ye(!1),_=ye(!1),Z=ye(!1),Q=ye(0),U=ye(!1),Y=ye(),ee=ye({}),ne=ye(s),se=ye(new Set),[,ue]=je(),{isOnBlur:oe,isOnSubmit:fe}=ye(Oe(e)).current,de=typeof window===g,be=!(!r&&!n),Se=typeof document!==g&&!de&&!c(window.HTMLElement),Ve=Se&&"Proxy"in window,Re=ye({dirty:!Ve,dirtyFields:!Ve,isSubmitted:fe,submitCount:!Ve,touched:!Ve,isSubmitting:!Ve,isValid:!Ve}),{isOnBlur:ke,isOnSubmit:Be}=ye(Oe(t)).current,Ce=we((()=>{D.current||ue({})}),[]),Ne=we(((e,t,r,n)=>{let s=r||function({errors:e,name:t,error:r,validFields:n,fieldsWithValidation:s}){const c=W(r),u=W(e),i=x(r,t),a=x(e,t);return!(c&&n.has(t)||a&&a.isManual)&&(!!(u!==c||!u&&!a||c&&s.has(t)&&!n.has(t))||i&&!X(a,i))}({errors:y.current,error:t,name:e,validFields:R.current,fieldsWithValidation:V.current});if(W(t)?((V.current.has(e)||be)&&(R.current.add(e),s=s||x(y.current,e)),y.current=z(y.current,[e])):(R.current.delete(e),s=s||!x(y.current,e),N(y.current,e,t[e])),s&&!n)return Ce(),!0}),[Ce,be]),Le=we(((e,t)=>{const r=e.ref,n=e.options,{type:s}=r,c=Se&&l(r)&&u(t)?"":t;var i;return M(r)&&n?n.forEach((({ref:e})=>e.checked=e.value===c)):H(r)?q(c)||(i=c,typeof FileList!==g&&i instanceof FileList)?r.files=c:r.value=c:I(r)?[...r.options].forEach((e=>e.selected=c.includes(e.value))):$(r)&&n?n.length>1?n.forEach((({ref:e})=>e.checked=c.includes(e.value))):n[0].ref.checked=!!c:r.value=c,!!s}),[Se]),xe=e=>{if(!p.current[e]||!Re.current.dirty&&!Re.current.dirtyFields)return!1;const t=pe(se.current,e),r=S.current.size;let n=C.current[e]!==G(p.current,p.current[e].ref);if(t){const t=e.substring(0,e.indexOf("["));n=ve(he(p.current,t),x(A.current,t))}const s=(t?Z.current:S.current.has(e))!==n;return n?S.current.add(e):S.current.delete(e),Z.current=t?n:!!S.current.size,Re.current.dirty?s:r!==S.current.size},Fe=we((e=>{if(xe(e)||!x(j.current,e)&&Re.current.touched)return!!N(j.current,e,!0)}),[]),Me=we(((e,t,r)=>{const n=i(t);for(const s in t){const c=`${r||e}${n?`[${s}]`:`.${s}`}`;o(t[s])&&Me(e,t[s],c);const u=p.current[c];u&&(Le(u,t[s]),Fe(c))}}),[Le,Fe]),$e=we(((e,t)=>{const r=p.current[e];if(r){Le(r,t);const n=Fe(e);if(re(n))return n}else le(t)||Me(e,t)}),[Fe,Le,Me]),Pe=we((async(e,t)=>{const r=p.current[e];if(!r)return!1;const n=await ce(p,O,r);return Ne(e,n,!1,t),W(n)}),[Ne,O]),We=we((async e=>{const{errors:t}=await ie(r,O,he(p.current),n,ne.current),s=k.current;return k.current=W(t),i(e)?(e.forEach((e=>{const r=x(t,e);r?N(y.current,e,r):z(y.current,[e])})),Ce()):Ne(e,x(t,e)?{[e]:x(t,e)}:{},s!==k.current),W(y.current)}),[Ce,Ne,O,n,r]),Ae=we((async e=>{const t=e||Object.keys(p.current);if(be)return We(t);if(i(t)){const e=await Promise.all(t.map((async e=>await Pe(e,!0))));return Ce(),e.every(Boolean)}return await Pe(t)}),[We,Pe,Ce,be]),De=e=>{const t=(e.match(/\w+/)||[])[0];return T.current||E.current.has(e)||E.current.has(t)&&!B(e)&&se.current.has(t)};function ze(e,t,r){let n=!1;const s=i(e);(s?e:[e]).forEach((e=>{const r=J(e);n=!(!$e(r?e:Object.keys(e)[0],r?t:Object.values(e)[0])&&!s)||De(e)})),(n||s)&&Ce(),(r||s&&t)&&Ae(s?void 0:e)}Y.current=Y.current?Y.current:async({type:e,target:t})=>{const s=t?t.name:"",c=p.current,u=y.current,i=c[s],a=x(u,s);let o;if(!i)return;const l=e===m,f=me({hasError:!!a,isBlurEvent:l,isOnSubmit:fe,isReValidateOnSubmit:Be,isOnBlur:oe,isReValidateOnBlur:ke,isSubmitted:_.current}),d=xe(s);let g=De(s)||d;if(l&&!x(j.current,s)&&Re.current.touched&&(N(j.current,s,!0),g=!0),f)return g&&Ce();if(be){const{errors:e}=await ie(r,O,he(c),n,ne.current),t=k.current;k.current=W(e),o=x(e,s)?{[s]:x(e,s)}:{},t!==k.current&&(g=!0)}else o=await ce(p,O,i);!Ne(s,o)&&g&&Ce()};const Te=we(((e={})=>{const t=W(A.current)?K(p.current):A.current;ie(r,O,L(Object.assign(Object.assign({},t),e)),n,ne.current).then((({errors:e})=>{const t=k.current;k.current=W(e),t!==k.current&&Ce()}))}),[Ce,O,n]),_e=(e,t)=>{!c(Y.current)&&e&&function(e,t,r,n){if(!r)return;const{ref:s,ref:{name:c,type:u},mutationWatcher:a}=r;if(!u)return void delete e[c];const o=e[c];if((M(s)||$(s))&&o){const{options:r}=o;i(r)&&r.length?(r.forEach((({ref:e,mutationWatcher:s},c)=>{(e&&P(e)||n)&&(F(e,t),s&&s.disconnect(),z(r,[`[${c}]`]))})),r&&!r.filter(Boolean).length&&delete e[c]):delete e[c]}else(P(s)||n)&&(F(s,t),a&&a.disconnect(),delete e[c])}(p.current,Y.current,e,t)},He=we(((e,t)=>{if(!e||e&&pe(se.current,e.ref.name)&&!t)return;_e(e,t);const{name:r}=e.ref;y.current=z(y.current,[r]),j.current=z(j.current,[r]),C.current=z(C.current,[r]),[S,V,R,E].forEach((e=>e.current.delete(r))),(Re.current.isValid||Re.current.touched)&&(Ce(),be&&Te())}),[Ce,be,Te]);const Ie=({name:e,type:t,types:r,message:n,preventRender:s})=>{const c=p.current[e];X(y.current[e],{type:t,message:n,types:r})||(N(y.current,e,{type:t,types:r,message:n,ref:c?c.ref:{},isManual:!0}),s||Ce())};function qe(e){W(p.current)||(i(e)?e:[e]).forEach((e=>He(p.current[e],!0)))}function Ze(e,t={}){if(!e.name)return console.warn("Missing name @",e);const{name:r,type:n,value:s}=e,u=Object.assign({ref:e},t),a=p.current,o=M(e)||$(e);let f,d=a[r],g=!0,b=!1;if(o?d&&i(d.options)&&d.options.find((({ref:e})=>s===e.value)):d)return void(a[r]=Object.assign(Object.assign({},d),t));if(n){const s=function(e,t){const r=new MutationObserver((()=>{P(e)&&(r.disconnect(),t())}));return r.observe(window.document,{childList:!0,subtree:!0}),r}(e,(()=>He(u)));d=o?Object.assign({options:[...d&&d.options||[],{ref:e,mutationWatcher:s}],ref:{type:n,name:r}},t):Object.assign(Object.assign({},u),{mutationWatcher:s})}else d=u;if(a[r]=d,W(A.current)||(f=ae(A.current,r),g=c(f),b=pe(se.current,r),g||b||Le(d,f)),be&&!b&&Re.current.isValid?Te():W(t)||(V.current.add(r),!fe&&Re.current.isValid&&ce(p,O,d).then((e=>{const t=k.current;W(e)?R.current.add(r):k.current=!1,t!==k.current&&Ce()}))),C.current[r]||b&&g||(C.current[r]=g?G(a,d.ref):f),!n)return;!function({field:e,handleChange:t,isRadioOrCheckbox:r}){const{ref:n}=e;l(n)&&n.addEventListener&&t&&(n.addEventListener(r?h:v,t),n.addEventListener(m,t))}({field:o&&d.options?d.options[d.options.length-1]:d,isRadioOrCheckbox:o,handleChange:Y.current})}function Qe(e,t){if(!de)if(J(e))Ze({name:e},t);else{if(!o(e)||!("name"in e))return t=>t&&Ze(t,e);Ze(e,t)}}const Ue=we((e=>async t=>{let s,c;t&&(t.preventDefault(),t.persist());const u=p.current;Re.current.isSubmitting&&(U.current=!0,Ce());try{if(be){c=K(u);const{errors:e,values:t}=await ie(r,O,L(c),n,ne.current);y.current=e,s=e,c=t}else{const{errors:e,values:t}=await Object.values(u).reduce((async(e,t)=>{if(!t)return e;const r=await e,{ref:n,ref:{name:s}}=t;if(!u[s])return Promise.resolve(r);const c=await ce(p,O,t);return c[s]?(N(r.errors,s,c[s]),R.current.delete(s),Promise.resolve(r)):(V.current.has(s)&&R.current.add(s),r.values[s]=G(u,n),Promise.resolve(r))}),Promise.resolve({errors:{},values:{}}));s=e,c=t}W(s)?(y.current={},await e(L(c),t)):(d&&Se&&((e,t)=>{for(const r in e)if(x(t,r)){const t=e[r];if(t){if(l(t.ref)&&t.ref.focus){t.ref.focus();break}if(t.options){t.options[0].ref.focus();break}}}})(u,s),y.current=s)}finally{_.current=!0,U.current=!1,Q.current=Q.current+1,Ce()}}),[Se,Ce,be,d,O,n,r]),Ge=e=>{const t=K(p.current),r=W(t)?A.current:t;return e&&e.nest?L(r):r};Ee((()=>()=>{D.current=!0,p.current&&Object.values(p.current).forEach((e=>He(e,!0)))}),[He]),be||(k.current=R.current.size>=V.current.size&&W(y.current));const Je={dirty:Z.current,dirtyFields:S.current,isSubmitted:_.current,submitCount:Q.current,touched:j.current,isSubmitting:U.current,isValid:fe?_.current&&W(y.current):k.current};return{watch:function(e,t){const r=c(t)?c(A.current)?{}:A.current:t,n=K(p.current,e),s=E.current;if(J(e))return ge(n,e,s,r,se.current.has(e)?w.current[e]:void 0);if(i(e))return e.reduce(((e,t)=>{let c;return c=W(p.current)&&o(r)?ae(r,t):ge(n,t,s,r),Object.assign(Object.assign({},e),{[t]:c})}),{});T.current=!0;const u=!W(n)&&n||t||A.current;return e&&e.nest?L(u):u},control:Object.assign(Object.assign({register:Qe,unregister:qe,removeFieldEventListener:_e,getValues:Ge,setValue:ze,reRender:Ce,triggerValidation:Ae},be?{validateSchemaIsValid:Te}:{}),{formState:Je,mode:{isOnBlur:oe,isOnSubmit:fe},reValidateMode:{isReValidateOnBlur:ke,isReValidateOnSubmit:Be},errorsRef:y,touchedFieldsRef:j,fieldsRef:p,resetFieldArrayFunctionRef:ee,validFieldsRef:R,fieldsWithValidationRef:V,watchFieldArrayRef:w,fieldArrayNamesRef:se,isDirtyRef:Z,readFormStateRef:Re,defaultValuesRef:A}),handleSubmit:Ue,setValue:we(ze,[Ce,$e,Ae]),triggerValidation:Ae,getValues:we(Ge,[]),reset:we((e=>{if(Se)for(const r of Object.values(p.current))if(r&&l(r.ref)&&r.ref.closest)try{r.ref.closest("form").reset();break}catch(t){}e&&(A.current=e),Object.values(ee.current).forEach((e=>te(e)&&e())),y.current={},p.current={},j.current={},R.current=new Set,V.current=new Set,C.current={},E.current=new Set,S.current=new Set,T.current=!1,_.current=!1,Z.current=!1,k.current=!0,Q.current=0,Ce()}),[]),register:we(Qe,[A.current,C.current,w.current]),unregister:we(qe,[]),clearError:we((function(e){c(e)?y.current={}:z(y.current,i(e)?e:[e]),Ce()}),[]),setError:we((function(e,t="",r){J(e)?Ie(Object.assign({name:e},o(t)?{types:t,type:""}:{type:t,message:r})):i(e)&&(e.forEach((e=>Ie(Object.assign(Object.assign({},e),{preventRender:!0})))),Ce())}),[]),errors:y.current,formState:Ve?new Proxy(Je,{get:(e,t)=>t in e?(Re.current[t]=!0,e[t]):{}}):Je}}function Ve(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s{var{name:t,rules:r,as:n,onBlur:u,onChange:i,onChangeName:a=f.onChange,onBlurName:l=f.onBlur,valueName:g,defaultValue:m,control:h}=e,v=Ve(e,["name","rules","as","onBlur","onChange","onChangeName","onBlurName","valueName","defaultValue","control"]);const b=ke(),{defaultValuesRef:p,setValue:O,register:y,unregister:j,errorsRef:w,removeFieldEventListener:E,triggerValidation:S,mode:{isOnSubmit:V,isOnBlur:R},reValidateMode:{isReValidateOnBlur:k,isReValidateOnSubmit:B},formState:{isSubmitted:C},fieldsRef:N,fieldArrayNamesRef:L}=h||b.control,[F,M]=(0,s.useState)(c(m)?x(p.current,t):m),$=(0,s.useRef)(F),P=re(F),W=()=>!me({hasError:!!x(w.current,t),isOnBlur:R,isOnSubmit:V,isReValidateOnBlur:k,isReValidateOnSubmit:B,isSubmitted:C}),A=e=>{const t=((e,t)=>le(e)||!o(e.target)||o(e.target)&&!e.type?e:t||c(e.target.value)?e.target.checked:e.target.value)(e,P);return M(t),$.current=t,t},D=()=>{pe(L.current,t)&&N.current[t]&&E(N.current[t],!0),y(Object.defineProperty({name:t},d,{set(e){M(e),$.current=e},get:()=>$.current}),Object.assign({},r))};(0,s.useEffect)((()=>{N.current[t]||(D(),M(c(m)?x(p.current,t):m))})),(0,s.useEffect)((()=>(D(),()=>{pe(L.current,t)||j(t)})),[t]);const z=R||k,T=Object.assign(Object.assign(Object.assign(Object.assign({name:t},v),i?{[a]:(_=i,(...e)=>O(t,A(_(e)),W()))}:{[a]:e=>{const r=A(e);O(t,r,W())}}),u||z?{[l]:(...e)=>{u&&u(e),z&&S(t)}}:{}),{[g||(P?"checked":d)]:F});var _;return(0,s.isValidElement)(n)?(0,s.cloneElement)(n,T):(0,s.createElement)(n,T)}}}]);