1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7536],{87536:function(e,t,r){r.d(t,{cI:function(){return Te}});var s=r(67294),a=e=>"checkbox"===e.type,i=e=>e instanceof Date,n=e=>null==e;const o=e=>"object"===typeof e;var l=e=>!n(e)&&!Array.isArray(e)&&o(e)&&!i(e),u=e=>l(e)&&e.target?a(e.target)?e.target.checked:e.target.value:e,d=(e,t)=>t.split(".").some(((t,r,s)=>!isNaN(Number(t))&&e.has(s.slice(0,r).join(".")))),f=e=>{const t=e.constructor&&e.constructor.prototype;return l(t)&&t.hasOwnProperty("isPrototypeOf")},c="undefined"!==typeof window&&"undefined"!==typeof window.HTMLElement&&"undefined"!==typeof document;function y(e){if(e instanceof Date)return new Date(e);const t="undefined"!==typeof FileList&&e instanceof FileList;if(c&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&(!l(e)||!f(e)))return e;const s=r?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(s[a]=y(e[a]));return s}const m="blur",v="focusout",h="submit",p="trigger",g="valid",b="onBlur",V="onChange",_="onSubmit",F="onTouched",A="all",k="max",w="min",x="maxLength",D="minLength",S="pattern",O="required",C="validate",E="form",N="root",T=["__proto__","constructor","prototype"];var j=e=>/^\w*$/.test(e),L=e=>void 0===e,M=e=>e.split(/[.[\]'"]/g).filter(Boolean),U=(e,t,r)=>{if(!t||!l(e))return r;const s=j(t)?[t]:M(t);if(s.some((e=>T.includes(e))))return r;const a=s.reduce(((e,t)=>n(e)?void 0:e[t]),e);return L(a)||a===e?L(e[t])?r:e[t]:a},R=e=>"boolean"===typeof e,B=e=>"function"===typeof e,I=(e,t,r)=>{let s=-1;const a=j(t)?[t]:M(t),i=a.length,n=i-1;for(;++s<i;){const t=a[s];let i=r;if(s!==n){const r=e[t];i=l(r)||Array.isArray(r)?r:isNaN(+a[s+1])?{}:[]}if(T.includes(t))return;e[t]=i,e=e[t]}};const P=s.createContext(null);P.displayName="HookFormControlContext";var q=(e,t,r,s=!0)=>{const a={};for(const i in e)Object.defineProperty(a,i,{get:()=>{const a=i;return t._proxyFormState[a]!==A&&(t._proxyFormState[a]=!s||A),r&&(r[a]=!0),e[a]}});return a};const W=c?s.useLayoutEffect:s.useEffect;var H=e=>"string"===typeof e,$=(e,t,r,s,a)=>H(e)?(s&&t.watch.add(e),U(r,e,a)):Array.isArray(e)?e.map((e=>(s&&t.watch.add(e),U(r,e)))):(s&&(t.watchAll=!0),r),z=e=>n(e)||!o(e);const G=(e,t)=>0===t.length&&!Array.isArray(e)&&!f(e);function J(e,t,r=new WeakMap){if(e===t)return!0;if(z(e)||z(t))return Object.is(e,t);if(i(e)&&i(t))return Object.is(e.getTime(),t.getTime());const s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;if(G(e,s)||G(t,a))return Object.is(e,t);const n=r.get(e);if(n&&n.has(t))return!0;n?n.add(t):r.set(e,new WeakSet([t]));for(const o of s){const s=e[o];if(!(o in t))return!1;if("ref"!==o){const e=t[o];if(i(s)&&i(e)||(l(s)||Array.isArray(s))&&(l(e)||Array.isArray(e))?!J(s,e,r):!Object.is(s,e))return!1}}return!0}const K=s.createContext(null);K.displayName="HookFormContext";var Q=(e,t,r,s,a)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[s]:a||!0}}:{},X=e=>Array.isArray(e)?e.filter(Boolean):[],Y=e=>Array.isArray(e)?e:[e],Z=()=>{let e=[];return{get observers(){return e},next:t=>{for(const r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}};function ee(e,t){const r={};for(const s in e)if(e.hasOwnProperty(s)){const a=e[s],i=t[s];if(a&&l(a)&&i){const e=ee(a,i);l(e)&&(r[s]=e)}else e[s]&&(r[s]=i)}return r}var te=e=>l(e)&&!Object.keys(e).length,re=e=>"file"===e.type,se=e=>{if(!c)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ae=e=>"select-multiple"===e.type,ie=e=>"radio"===e.type,ne=e=>se(e)&&e.isConnected;function oe(e,t){if(H(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const r=Array.isArray(t)?t:j(t)?[t]:M(t),s=1===r.length?e:function(e,t){const r=t.slice(0,-1).length;let s=0;for(;s<r;){if(n(e)){e=void 0;break}e=e[t[s]],s++}return e}(e,r),a=r.length-1,i=r[a];return s&&delete s[i],0!==a&&(l(s)&&te(s)||Array.isArray(s)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!L(e[t]))return!1;return!0}(s))&&oe(e,r.slice(0,-1)),e}function le(e){return Array.isArray(e)||l(e)&&!(e=>{for(const t in e)if(B(e[t]))return!0;return!1})(e)}function ue(e,t={}){for(const r in e){const s=e[r];le(s)?(t[r]=Array.isArray(s)?[]:{},ue(s,t[r])):L(s)||(t[r]=!0)}return t}function de(e){if(!1!==e){if(!0===e)return!0;
1if(Array.isArray(e)){const t=e.map((e=>de(e)));return t.some((e=>void 0!==e))?t:void 0}if(l(e)){const t={};for(const r in e){const s=de(e[r]);L(s)||(t[r]=s)}return Object.keys(t).length?t:void 0}}}function fe(e,t,r){r||(r=ue(t));for(const s in e){const a=e[s];if(le(a))L(t)||z(r[s])?r[s]=ue(a,Array.isArray(a)?[]:{}):fe(a,n(t)?{}:t[s],r[s]);else{const e=t[s];r[s]=!J(a,e)}}return de(r)||{}}const ce={value:!1,isValid:!1},ye={value:!0,isValid:!0};var me=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!L(e[0].attributes.value)?L(e[0].value)||""===e[0].value?ye:{value:e[0].value,isValid:!0}:ye:ce}return ce},ve=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:s})=>L(e)?e:t?""===e?NaN:e?+e:e:r&&H(e)?new Date(e):s?s(e):e;const he={isValid:!1,value:null};var pe=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),he):he;function ge(e){const t=e.ref;return re(t)?t.files:ie(t)?pe(e.refs).value:ae(t)?[...t.selectedOptions].map((({value:e})=>e)):a(t)?me(e.refs).value:ve(L(t.value)?e.ref.value:t.value,e)}var be=e=>e instanceof RegExp,Ve=e=>L(e)?e:be(e)?e.source:l(e)?be(e.value)?e.value.source:e.value:e,_e=e=>({isOnSubmit:!e||e===_,isOnBlur:e===b,isOnChange:e===V,isOnAll:e===A,isOnTouch:e===F});const Fe="AsyncFunction";var Ae=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(`${t}.`))));const ke=(e,t,r,s)=>{for(const a of r||Object.keys(e)){const r=U(e,a);if(r){const{_f:e,...i}=r;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],a)&&!s)return!0;if(e.ref&&t(e.ref,e.name)&&!s)return!0;if(ke(i,t))break}else if(l(i)&&ke(i,t))break}}};function we(e,t,r){const s=U(e,r);if(s||j(r))return{error:s,name:r};const a=r.split(".");for(;a.length;){const s=a.join("."),i=U(t,s),n=U(e,s);if(i&&!Array.isArray(i)&&r!==s)return{name:r};if(n&&n.type)return{name:s,error:n};if(n&&n.root&&n.root.type)return{name:`${s}.root`,error:n.root};a.pop()}return{name:r}}var xe=(e,t,r)=>{const s=U(e,r),a=Array.isArray(s)?s:[];return I(a,N,t[r]),I(e,r,a),e};function De(e,t,r="validate"){if(H(e)||Array.isArray(e)&&e.every(H)||R(e)&&!e)return{type:r,message:H(e)?e:"",ref:t}}var Se=e=>l(e)&&!be(e)?e:{value:e,message:""},Oe=async(e,t,r,s,i,o)=>{const{ref:u,refs:d,required:f,maxLength:c,minLength:y,min:m,max:v,pattern:h,validate:p,name:g,valueAsNumber:b,mount:V}=e._f,_=U(r,g);if(!V||t.has(g))return{};const F=d?d[0]:u,A=e=>{if(i&&F.reportValidity){const t=R(e)?"":e||"";d?d.forEach((e=>e.setCustomValidity(t))):F.setCustomValidity(t),F.reportValidity()}},E={},N=ie(u),T=a(u),j=N||T,M=(b||re(u))&&L(u.value)&&L(_)||se(u)&&""===u.value||""===_||Array.isArray(_)&&!_.length,I=Q.bind(null,g,s,E),P=(e,t,r,s=x,a=D)=>{const i=e?t:r;E[g]={type:e?s:a,message:i,ref:u,...I(e?s:a,i)}};if(o?!Array.isArray(_)||!_.length:f&&(!j&&(M||n(_))||R(_)&&!_||T&&!me(d).isValid||N&&!pe(d).isValid)){const{value:e,message:t}=H(f)?{value:!!f,message:f}:Se(f);if(e&&(E[g]={type:O,message:t,ref:F,...I(O,t)},!s))return A(t),E}if(!M&&(!n(m)||!n(v))){let e,t;const r=Se(v),a=Se(m);if(n(_)||isNaN(_)){const s=u.valueAsDate||new Date(_),i=e=>new Date((new Date).toDateString()+" "+e),n="time"==u.type,o="week"==u.type;H(r.value)&&_&&(e=n?i(_)>i(r.value):o?_>r.value:s>new Date(r.value)),H(a.value)&&_&&(t=n?i(_)<i(a.value):o?_<a.value:s<new Date(a.value))}else{const s=u.valueAsNumber||(_?+_:_);n(r.value)||(e=s>r.value),n(a.value)||(t=s<a.value)}if((e||t)&&(P(!!e,r.message,a.message,k,w),!s))return A(E[g].message),E}if((c||y)&&!M&&(H(_)||o&&Array.isArray(_))){const e=Se(c),t=Se(y),r=!n(e.value)&&_.length>+e.value,a=!n(t.value)&&_.length<+t.value;if((r||a)&&(P(r,e.message,t.message),!s))return A(E[g].message),E}if(h&&!M&&H(_)){const{value:e,message:t}=Se(h);if(be(e)&&!_.match(e)&&(E[g]={type:S,message:t,ref:u,...I(S,t)},!s))return A(t),E}if(p)if(B(p)){const e=De(await p(_,r),F);if(e&&(E[g]={...e,...I(C,e.message)},!s))return A(e.message),E}else if(l(p)){let e={};for(const t in p){if(!te(e)&&!s)break;const a=De(await p[t](_,r),F,t);a&&(e={...a,...I(t,a.message)}
1,A(a.message),s&&(E[g]=e))}if(!te(e)&&(E[g]={ref:F,...e},!s))return E}return A(!0),E};const Ce={mode:_,reValidateMode:V,shouldFocusError:!0},Ee={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function Ne(e={}){let t,r={...Ce,...e},s={...y(Ee),isLoading:B(r.defaultValues),errors:r.errors||{},disabled:r.disabled||!1},o={},f=(l(r.defaultValues)||l(r.values))&&y(r.defaultValues||r.values)||{},b=r.shouldUnregister?{}:y(f),V={action:!1,mount:!1,watch:!1,keepIsValid:!1},_={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},F=0;const k={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},w={...k};let x={...w};const D={array:Z(),state:Z()},S=r.criteriaMode===A,O=async e=>{if(!V.keepIsValid&&!r.disabled&&(w.isValid||x.isValid||e)){let e;r.resolver?(e=te((await G()).errors),T()):e=await Q({fields:o,onlyCheckValid:!0,eventType:g}),e!==s.isValid&&D.state.next({isValid:e})}},T=(e,t)=>{!r.disabled&&(w.isValidating||w.validatingFields||x.isValidating||x.validatingFields)&&((e||Array.from(_.mount)).forEach((e=>{e&&(t?I(s.validatingFields,e,t):oe(s.validatingFields,e))})),D.state.next({validatingFields:s.validatingFields,isValidating:!te(s.validatingFields)}))},P=()=>{s.dirtyFields=fe(f,b)},q=(t,r,a,i)=>{const l=U(o,t);
1if(l){if((e=>{const t=j(e)?[e]:M(e);let r=b,s=f;for(let a=0;a<t.length-1;a++){const e=t[a];if(r=n(r)?r:r[e],s=n(s)?s:s[e],null===r&&null!==s)return!0}return!1})(t))return;const o=L(U(b,t)),u=U(b,t,L(a)?U(f,t):a);if(L(u)||i&&i.defaultChecked||r?I(b,t,r?u:ge(l._f)):de(t,u),V.mount&&!V.action){if(O(),o&&s.isDirty&&(w.isDirty||x.isDirty)){le()||(s.isDirty=!1,D.state.next({...s}))}e.shouldUnregister&&o&&!L(U(b,t))&&Ae(t,_)&&(V.watch=!0)}}},W=(e,t,a,i,n)=>{let o=!1,l=!1;const u={name:e};if(!r.disabled){if(!a||i){(w.isDirty||x.isDirty)&&(l=s.isDirty,s.isDirty=u.isDirty=le(),o=l!==u.isDirty);const r=J(U(f,e),t);l=!!U(s.dirtyFields,e),r!==s.isDirty?s.dirtyFields=fe(f,b):r?oe(s.dirtyFields,e):I(s.dirtyFields,e,!0),u.dirtyFields=s.dirtyFields,o=o||(w.dirtyFields||x.dirtyFields)&&l!==!r}if(a){const t=U(s.touchedFields,e);t||(I(s.touchedFields,e,a),u.touchedFields=s.touchedFields,o=o||(w.touchedFields||x.touchedFields)&&t!==a)}o&&n&&D.state.next(u)}return o?u:{}},z=(e,a,i,n)=>{const o=U(s.errors,e),l=(w.isValid||x.isValid)&&R(a)&&s.isValid!==a;var u;if(r.delayError&&i?(u=()=>((e,t)=>{I(s.errors,e,t),s.errors={...s.errors},D.state.next({errors:s.errors})})(e,i),t=e=>{clearTimeout(F),F=setTimeout(u,e)},t(r.delayError)):(clearTimeout(F),t=null,i?I(s.errors,e,i):oe(s.errors,e),s.errors={...s.errors}),(i?!J(o,i):o)||!te(n)||l){const t={...n,...l&&R(a)?{isValid:a}:{},errors:s.errors,name:e};s={...s,...t},D.state.next(t)}},G=async e=>(T(e,!0),await r.resolver(b,r.context,((e,t,r,s)=>{const a={};for(const i of e){const e=U(t,i);e&&I(a,i,e._f)}return{criteriaMode:r,names:[...e],fields:a,shouldUseNativeValidation:s}})(e||_.mount,o,r.criteriaMode,r.shouldUseNativeValidation))),K=async({name:t,eventType:r})=>{if(e.validate){const a=await e.validate({formValues:b,formState:s,name:t,eventType:r});if(l(a))for(const e in a){const t=a[e];t&&Te(`form.${e}`,{message:H(t.message)?t.message:"",type:t.type||C})}else H(a)||!a?Te(E,{message:a||"",type:C}):Ne(E);return a}return!0},Q=async({fields:t,onlyCheckValid:a,name:i,eventType:n,context:o={valid:!0,runRootValidation:!1}})=>{if(e.validate){o.runRootValidation=!0;if(!(await K({name:i,eventType:n}))&&(o.valid=!1,a))return o.valid}for(const d in t){const i=t[d];if(i){const{_f:t,...f}=i;if(t){const n=_.array.has(t.name),d=i._f&&(!!(u=i._f)&&!!u.validate&&!!(B(u.validate)&&u.validate.constructor.name===Fe||l(u.validate)&&Object.values(u.validate).find((e=>e.constructor.name===Fe)))),f=w.validatingFields||w.isValidating||x.validatingFields||x.isValidating;d&&f&&T([t.name],!0);const c=await Oe(i,_.disabled,b,S,r.shouldUseNativeValidation&&!a,n);if(d&&f&&T([t.name]),c[t.name]&&(o.valid=!1,a))break;if(!a&&(U(c,t.name)?n?xe(s.errors,c,t.name):I(s.errors,t.name,c[t.name]):oe(s.errors,t.name)),e.shouldUseNativeValidation&&c[t.name])break}!te(f)&&await Q({context:o,onlyCheckValid:a,fields:f,name:d,eventType:n})}}var u;return o.valid},le=(e,t)=>!r.disabled&&(e&&t&&I(b,e,t),!J(De(),f)),ue=(e,t,r)=>$(e,_,{...V.mount?b:L(t)?f:H(e)?{[e]:t}:t},r,t),de=(e,t,r={},s=!1)=>{const i=U(o,e);let l=t;if(i){const r=i._f;r&&(!r.disabled&&I(b,e,ve(t,r)),l=se(r.ref)&&n(t)?"":t,ae(r.ref)?[...r.ref.options].forEach((e=>e.selected=l.includes(e.value))):r.refs?a(r.ref)?r.refs.forEach((e=>{e.defaultChecked&&e.disabled||(Array.isArray(l)?e.checked=!!l.find((t=>t===e.value)):e.checked=l===e.value||!!l)})):r.refs.forEach((e=>e.checked=e.value===l)):re(r.ref)?r.ref.value="":(r.ref.value=l,r.ref.type||D.state.next({name:e,values:s?b:y(b)})))}(r.shouldDirty||r.shouldTouch)&&W(e,l,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&be(e)},ce=(e,t,r,s=!1)=>{for(const a in t){if(!t.hasOwnProperty(a))return;const n=t[a],u=e+"."+a,d=U(o,u);(_.array.has(e)||l(n)||d&&!d._f)&&!i(n)?ce(u,n,r,s):de(u,n,r,s)}},ye=(e,t,r,a)=>{const i=U(o,e),l=_.array.has(e),u=a?t:y(t),d=J(U(b,e),u);if(d||I(b,e,u),l)D.array.next({name:e,values:a?b:y(b)}),(w.isDirty||w.dirtyFields||x.isDirty||x.dirtyFields)&&r.shouldDirty&&(P(),D.state.next({name:e,dirtyFields:s.dirtyFields,isDirty:le(e,u)}));else{const t=Array.isArray(u)&&!u.length||te(u);!i||i._f||n(u)||t?de(e,u,r,a):ce(e,u,r,a)}if(!d){const t=Ae(e,_),r=a?b:y(b);D.state.next({...t&&s,name:V.mount||t?e:void 0,values:r})}},me=(e,t,r={})=>ye(e,t,r,!1),he=async a=>{V.mount=!0;const n=a.target;let l=n.name,d=!0;const f=U(o,l),c=e=>{d=Number.isNaN(e)||i(e)&&isNaN(e.getTime())||J(e,U(b,l,e))},h=_e(r.mode),p=_e(r.reValidateMode);if(f){let i,V;const F=n.type?ge(f._f):u(a),A=a.type===m||a.type===v,k=!((g=f._f).mount&&(g.required||g.min||g.max||g.maxLength||g.minLength||g.pattern||g.validate))&&!e.validate&&!r.resolver&&!U(s.errors,l)&&!f._f.deps||((e,t,r,s,a)=>!a.isOnAll&&(!r&&a.isOnTouch?!(t||e):(r?s.isOnBlur:a.isOnBlur)?!e:!(r?s.isOnChange:a.isOnChange)||e))(A,U(s.touchedFields,l),s.isSubmitted,p,h),C=Ae(l,_,A);I(b,l,F),A?n&&n.readOnly||(f._f.onBlur&&f._f.onBlur(a),t&&t(0)):f._f.onChange&&f._f.onChange(a);const E=W(l,F,A),N=!te(E)||C;if(!A&&D.state.next({name:l,type:a.type,values:y(b)}),k)return(w.isValid||x.isValid)&&("onBlur"===r.mode?A&&O():A||O()),N&&D.state.next({name:l,...C?{}:E});if(!r.resolver&&e.validate&&await K({name:l,eventType:a.type}),!A&&C&&D.state.next({...s}),r.resolver){const{errors:e}=await G([l]);if(T([l]),c(F),!d)return void(!te(E)&&D.state.next(E));const t=we(s.errors,o,l),r=we(e,o,t.name||l);i=r.error,l=r.name,V=te(e)}else T([l],!0),i=(await Oe(f,_.disabled,b,S,r.shouldUseNativeValidation))[l],T([l]),c(F),d&&(i?V=!1:(w.isValid||x.isValid)&&(V=await Q({fields:o,onlyCheckValid:!0,name:l,eventType:a.type})));d&&(f._f.deps&&(!Array.isArray(f._f.deps)||f._f.deps.length>0)&&be(f._f.deps),z(l,V,i,E))}var g},pe=(e,t)=>{if(U(s.errors,t)&&e.focus)return e.focus(),1},be=async(e,t={})=>{let a,i;const n=Y(e);if(r.resolver){const t=await(async e=>{const{errors:t}=await G(e);if(T(e),e){for(const r of e){const e=U(t,r);e?_.array.has(r)&&l(e)&&!Object.keys(e).some((e=>!Number.isNaN(Number(e))))?xe(s.errors,{[r]:e},r):I(s.errors,r,e):oe(s.errors,r)}s.errors={...s.errors}}else s.errors=t;return t})(L(e)?e:n);a=te(t),i=e?!n.some((e=>U(t,e))):a}else e?(i=(await Promise.all(n.map((async e=>{const t=U(o,e);return await Q({fields:t&&t._f?{[e]:t}:t,eventType:p})})))).every(Boolean),(i||s.isValid)&&O()):i=a=await Q({fields:o,name:e,eventType:p});return D.state.next({...!H(e)||(w.isValid||x.isValid)&&a!==s.isValid?{}:{name:e},...r.resolver||!e?{isValid:a}:{},errors:s.errors}),t.shouldFocus&&!i&&ke(o,pe,e?n:_.mount),i},De=(e,t)=>
1{let r={...V.mount?b:f};return t&&(r=ee(t.dirtyFields?s.dirtyFields:s.touchedFields,r)),L(e)?r:H(e)?U(r,e):e.map((e=>U(r,e)))},Se=(e,t)=>({invalid:!!U((t||s).errors,e),isDirty:!!U((t||s).dirtyFields,e),error:U((t||s).errors,e),isValidating:!!U(s.validatingFields,e),isTouched:!!U((t||s).touchedFields,e)}),Ne=e=>{const t=e?Y(e):void 0;null===t||void 0===t||t.forEach((e=>oe(s.errors,e))),t?t.forEach((e=>{D.state.next({name:e,errors:s.errors})})):D.state.next({errors:{}})},Te=(e,t,r)=>{const a=(U(o,e,{_f:{}})._f||{}).ref,i=U(s.errors,e)||{},{ref:n,message:l,type:u,...d}=i;I(s.errors,e,{...d,...t,ref:a}),D.state.next({name:e,errors:s.errors,isValid:!1}),r&&r.shouldFocus&&a&&a.focus&&a.focus()},je=e=>D.state.subscribe({next:t=>{if(r=e.name,a=t.name,i=e.exact,(!r||!a||r===a||Y(r).some((e=>e&&(i?e===a:e.startsWith(a)||a.startsWith(e)))))&&((e,t,r,s)=>{r(e);const{name:a,...i}=e;return te(i)||s&&Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find((e=>t[e]===(!s||A)))})(t,e.formState||w,qe,e.reRenderRoot)){const r={...b};e.callback({values:r,...s,...t,defaultValues:f})}var r,a,i}}).unsubscribe,Le=(e,t={})=>{for(const a of e?Y(e):_.mount)_.mount.delete(a),_.array.delete(a),t.keepValue||(oe(o,a),oe(b,a)),!t.keepError&&oe(s.errors,a),!t.keepDirty&&oe(s.dirtyFields,a),!t.keepTouched&&oe(s.touchedFields,a),!t.keepIsValidating&&oe(s.validatingFields,a),!r.shouldUnregister&&!t.keepDefaultValue&&oe(f,a);D.state.next({values:y(b)}),D.state.next({...s,...t.keepDirty?{isDirty:le()}:{}}),!t.keepIsValid&&O()},Me=({disabled:e,name:t})=>{if(R(e)&&V.mount||e||_.disabled.has(t)){const r=_.disabled.has(t)!==!!e;e?_.disabled.add(t):_.disabled.delete(t),r&&V.mount&&!V.action&&O()}},Ue=(e,t={})=>{let s=U(o,e);const i=R(t.disabled)||R(r.disabled),n=!_.registerName.has(e)&&s&&s._f&&!s._f.mount;return I(o,e,{...s||{},_f:{...s&&s._f?s._f:{ref:{name:e}},name:e,mount:!0,...t}}),_.mount.add(e),s&&!n?Me({disabled:R(t.disabled)?t.disabled:r.disabled,name:e}):q(e,!0,t.value),{...i?{disabled:t.disabled||r.disabled}:{},...r.progressive?{required:!!t.required,min:Ve(t.min),max:Ve(t.max),minLength:Ve(t.minLength),maxLength:Ve(t.maxLength),pattern:Ve(t.pattern)}:{},name:e,onChange:he,onBlur:he,ref:i=>{if(i){_.registerName.add(e),Ue(e,t),_.registerName.delete(e),s=U(o,e);const r=L(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,n=(e=>ie(e)||a(e))(r),l=s._f.refs||[];if(n?l.find((e=>e===r)):r===s._f.ref)return;I(o,e,{_f:{...s._f,...n?{refs:[...l.filter(ne),r,...Array.isArray(U(f,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),q(e,!1,void 0,r)}else s=U(o,e,{}),s._f&&(s._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(!d(_.array,e)||!V.action)&&_.unMount.add(e)}}},Re=()=>r.shouldFocusError&&!r.shouldUseNativeValidation&&ke(o,pe,_.mount),Be=(e,t)=>async a=>{let i;a&&(a.preventDefault&&a.preventDefault(),a.persist&&a.persist());let n=y(b);if(D.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await G();T(),s.errors=e,n=y(t)}else await Q({fields:o,eventType:h});if(_.disabled.size)for(const e of _.disabled)oe(n,e);if(oe(s.errors,N),te(s.errors)){D.state.next({errors:{}});try{await e(n,a)}catch(l){i=l}}else t&&await t({...s.errors},a),Re(),setTimeout(Re);if(D.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:te(s.errors)&&!i,submitCount:s.submitCount+1,errors:s.errors}),i)throw i},Ie=(e,t={})=>{const a=e?y(e):f,i=y(a),n=te(e),l=i;if(t.keepDefaultValues||(f=a),!t.keepValues){if(t.keepDirtyValues){const e=new Set([..._.mount,...Object.keys(fe(f,b))]);for(const t of Array.from(e)){const e=U(s.dirtyFields,t),r=U(b,t),a=U(l,t);e&&!L(r)?I(l,t,r):e||L(a)||me(t,a)}}else{if(c&&L(e))for(const e of _.mount){const t=U(o,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(se(e)){const t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(const e of _.mount)me(e,U(l,e));else o={}}if(r.shouldUnregister){if(b=t.keepDefaultValues?y(f):{},t.keepFieldsRef)for(const e of _.mount)I(b,e,U(l,e))}else b=y(l);D.array.next({values:{...l}}),D.state.next({values:{...l}})}_={mount:t.keepDirtyValues?_.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},V.mount=!w.isValid||!!t.keepIsValid||!!t.keepDirtyValues||!r.shouldUnregister&&!te(l),V.watch=!!r.shouldUnregister,V.keepIsValid=!!t.keepIsValid,V.action=!1,t.keepErrors||(s.errors={}),D.state.next({submitCount:t.keepSubmitCount?s.submitCount:0,isDirty:!n&&(t.keepDirty?s.isDirty:t.keepValues?le():!(!t.keepDefaultValues||J(e,f))),isSubmitted:!!t.keepIsSubmitted&&s.isSubmitted,dirtyFields:n?{}:t.keepDirtyValues?t.keepDefaultValues&&b?fe(f,b):s.dirtyFields:t.keepDefaultValues&&e?fe(f,e):t.keepDirty?s.dirtyFields:{},touchedFields:t.keepTouched?s.touchedFields:{},errors:t.keepErrors?s.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&s.isSubmitSuccessful,isSubmitting:!1,defaultValues:f})},Pe=(e,t)=>
1Ie(B(e)?e(b):e,{...r.resetOptions,...t}),qe=e=>{s={...s,...e}},We={control:{register:Ue,unregister:Le,getFieldState:Se,handleSubmit:Be,setError:Te,_subscribe:je,_runSchema:G,_updateIsValidating:T,_focusError:Re,_getWatch:ue,_getDirty:le,_setValid:O,_setFieldArray:(e,t=[],a,i,n=!0,l=!0)=>{if(i&&a&&!r.disabled){if(V.action=!0,l&&Array.isArray(U(o,e))){const t=a(U(o,e),i.argA,i.argB);n&&I(o,e,t)}if(l&&Array.isArray(U(s.errors,e))){const t=a(U(s.errors,e),i.argA,i.argB);n&&I(s.errors,e,t),((e,t)=>{!X(U(e,t)).length&&oe(e,t)})(s.errors,e)}if((w.touchedFields||x.touchedFields)&&l&&Array.isArray(U(s.touchedFields,e))){const t=a(U(s.touchedFields,e),i.argA,i.argB);n&&I(s.touchedFields,e,t)}(w.dirtyFields||x.dirtyFields)&&P(),D.state.next({name:e,isDirty:le(e,t),dirtyFields:s.dirtyFields,errors:s.errors,isValid:s.isValid})}else I(b,e,t)},_setDisabledField:Me,_setErrors:e=>{s.errors=e,D.state.next({errors:s.errors,isValid:!1})},_getFieldArray:e=>X(U(V.mount?b:f,e,r.shouldUnregister?U(f,e,[]):[])),_reset:Ie,_resetDefaultValues:()=>B(r.defaultValues)&&r.defaultValues().then((e=>{Pe(e,r.resetOptions),D.state.next({isLoading:!1})})),_removeUnmounted:()=>{for(const e of _.unMount){const t=U(o,e);t&&(t._f.refs?t._f.refs.every((e=>!ne(e))):!ne(t._f.ref))&&Le(e)}_.unMount=new Set},_disableForm:e=>{R(e)&&(D.state.next({disabled:e}),ke(o,((t,r)=>{const s=U(o,r);s&&(t.disabled=s._f.disabled||e,Array.isArray(s._f.refs)&&s._f.refs.forEach((t=>{t.disabled=s._f.disabled||e})))}),0,!1))},_subjects:D,_proxyFormState:w,get _fields(){return o},get _formValues(){return b},get _state(){return V},set _state(e){V=e},get _defaultValues(){return f},get _names(){return _},set _names(e){_=e},get _formState(){return s},get _options(){return r},set _options(e){r={...r,...e}}},subscribe:e=>(V.mount=!0,x={...x,...e.formState},je({...e,formState:{...k,...e.formState}})),trigger:be,register:Ue,handleSubmit:Be,watch:(e,t)=>B(e)?D.state.subscribe({next:r=>"values"in r&&e(r.values||ue(void 0,t),r)}):ue(e,t,!0),setValue:me,setValues:(e,t={})=>{const r=B(e)?e(b):e;if(!J(b,r)){b={...b,...r};for(const e of _.mount)ye(e,U(r,e),t,!0);D.state.next({...s,name:void 0,type:void 0,values:b}),t.shouldValidate&&O()}},getValues:De,reset:Pe,resetField:(e,t={})=>{U(o,e)&&(L(t.defaultValue)?me(e,y(U(f,e))):(me(e,t.defaultValue),I(f,e,y(t.defaultValue))),t.keepTouched||oe(s.touchedFields,e),t.keepDirty||(oe(s.dirtyFields,e),s.isDirty=t.defaultValue?le(e,y(U(f,e))):le()),t.keepError||(oe(s.errors,e),w.isValid&&O()),D.state.next({...s}))},resetDefaultValues:(e,t={})=>{if(f=y(e),!t.keepDirty){const e=fe(f,b);s.dirtyFields=e,s.isDirty=!te(e)}t.keepIsValid||O(),D.state.next({...s,defaultValues:f})},clearErrors:Ne,unregister:Le,setError:Te,setFocus:(e,t={})=>{const r=U(o,e),s=r&&r._f;if(s){const e=s.refs?s.refs[0]:s.ref;e.focus&&setTimeout((()=>{e.focus(),t.shouldSelect&&B(e.select)&&e.select()}))}},getFieldState:Se};return{...We,formControl:We}}function Te(e={}){const t=s.useRef(void 0),r=s.useRef(void 0),a=s.useRef(e.formControl),[i,n]=s.useState((()=>({...y(Ee),isLoading:B(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:B(e.defaultValues)?void 0:e.defaultValues})));if(!t.current||e.formControl&&a.current!==e.formControl)if(a.current=e.formControl,e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!B(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:r,...s}=Ne(e);t.current={...s,formState:i}}const o=t.current.control;return o._options=e,W((()=>{const e=o._subscribe({formState:o._proxyFormState,callback:()=>n({...o._formState,defaultValues:o._defaultValues}),reRenderRoot:!0});return n((e=>({...e,isReady:!0}))),o._formState.isReady=!0,e}),[o]),s.useEffect((()=>o._disableForm(e.disabled)),[o,e.disabled]),s.useEffect((()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)}),[o,e.mode,e.reValidateMode]),s.useEffect((()=>{e.errors&&(o._setErrors(e.errors),o._focusError())}),[o,e.errors]),s.useEffect((()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})}),[o,e.shouldUnregister]),s.useEffect((()=>
vendor: 642 bytes, line 1
1{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==i.isDirty&&o._subjects.state.next({isDirty:e})}}),[o,i.isDirty]),s.useEffect((()=>{var t;e.values&&!J(e.values,r.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),(null===(t=o._options.resetOptions)||void 0===t?void 0:t.keepIsValid)||o._setValid(),r.current=e.values,n((e=>({...e})))):o._resetDefaultValues()}),[o,e.values]),s.useEffect((()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),t.current.formState=s.useMemo((()=>q(i,o)),[o,i]),t.current}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.