"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[36595],{736595:function(e,n,t){t.d(n,{O:function(){return v}});var a=t(478534),r=t(400414),i=t(436938),l=t(903431),o=t(916227),d=t(919938),u={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},s=t(807204),c=t(652983);function v(e={}){let{isDisabled:n,isReadOnly:t,isRequired:v,isInvalid:p,id:m,onBlur:b,onFocus:h,"aria-describedby":y}=(0,a.K)(e),{defaultChecked:k,isChecked:B,isFocusable:P,onChange:w,isIndeterminate:C,name:E,value:g,tabIndex:x,"aria-label":L,"aria-labelledby":F,"aria-invalid":S,...M}=e,q=function(e,n=[]){let t=Object.assign({},e);for(let e of n)e in t&&delete t[e];return t}(M,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),D=(0,l.W)(w),R=(0,l.W)(b),T=(0,l.W)(h),[I,N]=(0,c.useState)(!1),[_,K]=(0,c.useState)(!1),[O,j]=(0,c.useState)(!1),[G,H]=(0,c.useState)(!1);(0,c.useEffect)(()=>(0,s.BT)(N),[]);let Q=(0,c.useRef)(null),[U,$]=(0,c.useState)(!0),[W,A]=(0,c.useState)(!!k),J=void 0!==B,z=J?B:W,Y=(0,c.useCallback)(e=>{if(t||n){e.preventDefault();return}J||(z?A(e.target.checked):A(!!C||e.target.checked)),null==D||D(e)},[t,n,z,J,C,D]);(0,r.G)(()=>{Q.current&&(Q.current.indeterminate=!!C)},[C]),(0,i.r)(()=>{n&&K(!1)},[n,K]),(0,r.G)(()=>{let e=Q.current;if(!(null==e?void 0:e.form))return;let n=()=>{A(!!k)};return e.form.addEventListener("reset",n),()=>{var t;return null==(t=e.form)?void 0:t.removeEventListener("reset",n)}},[]);let V=n&&!P,X=(0,c.useCallback)(e=>{" "===e.key&&H(!0)},[H]),Z=(0,c.useCallback)(e=>{" "===e.key&&H(!1)},[H]);(0,r.G)(()=>{Q.current&&Q.current.checked!==z&&A(Q.current.checked)},[Q.current]);let ee=(0,c.useCallback)((e={},a=null)=>({...e,ref:a,"data-active":(0,d.PB)(G),"data-hover":(0,d.PB)(O),"data-checked":(0,d.PB)(z),"data-focus":(0,d.PB)(_),"data-focus-visible":(0,d.PB)(_&&I),"data-indeterminate":(0,d.PB)(C),"data-disabled":(0,d.PB)(n),"data-invalid":(0,d.PB)(p),"data-readonly":(0,d.PB)(t),"aria-hidden":!0,onMouseDown:(0,d.v0)(e.onMouseDown,e=>{_&&e.preventDefault(),H(!0)}),onMouseUp:(0,d.v0)(e.onMouseUp,()=>H(!1)),onMouseEnter:(0,d.v0)(e.onMouseEnter,()=>j(!0)),onMouseLeave:(0,d.v0)(e.onMouseLeave,()=>j(!1))}),[G,z,n,_,I,O,C,p,t]),en=(0,c.useCallback)((e={},a=null)=>({...e,ref:a,"data-active":(0,d.PB)(G),"data-hover":(0,d.PB)(O),"data-checked":(0,d.PB)(z),"data-focus":(0,d.PB)(_),"data-focus-visible":(0,d.PB)(_&&I),"data-indeterminate":(0,d.PB)(C),"data-disabled":(0,d.PB)(n),"data-invalid":(0,d.PB)(p),"data-readonly":(0,d.PB)(t)}),[G,z,n,_,I,O,C,p,t]),et=(0,c.useCallback)((e={},t=null)=>({...q,...e,ref:(0,o.lq)(t,e=>{e&&$("LABEL"===e.tagName)}),onClick:(0,d.v0)(e.onClick,()=>{var e;U||(null==(e=Q.current)||e.click(),requestAnimationFrame(()=>{var e;null==(e=Q.current)||e.focus({preventScroll:!0})}))}),"data-disabled":(0,d.PB)(n),"data-checked":(0,d.PB)(z),"data-invalid":(0,d.PB)(p)}),[q,n,z,p,U]),ea=(0,c.useCallback)((e={},a=null)=>({...e,ref:(0,o.lq)(Q,a),type:"checkbox",name:E,value:g,id:m,tabIndex:x,onChange:(0,d.v0)(e.onChange,Y),onBlur:(0,d.v0)(e.onBlur,R,()=>K(!1)),onFocus:(0,d.v0)(e.onFocus,T,()=>K(!0)),onKeyDown:(0,d.v0)(e.onKeyDown,X),onKeyUp:(0,d.v0)(e.onKeyUp,Z),required:v,checked:z,disabled:V,readOnly:t,"aria-label":L,"aria-labelledby":F,"aria-invalid":S?!!S:p,"aria-describedby":y,"aria-disabled":n,style:u}),[E,g,m,Y,R,T,X,Z,v,z,V,t,L,F,S,p,y,n,x]),er=(0,c.useCallback)((e={},t=null)=>({...e,ref:t,onMouseDown:(0,d.v0)(e.onMouseDown,f),"data-disabled":(0,d.PB)(n),"data-checked":(0,d.PB)(z),"data-invalid":(0,d.PB)(p)}),[z,n,p]);return{state:{isInvalid:p,isFocused:_,isChecked:z,isActive:G,isHovered:O,isIndeterminate:C,isDisabled:n,isReadOnly:t,isRequired:v},getRootProps:et,getCheckboxProps:ee,getIndicatorProps:en,getInputProps:ea,getLabelProps:er,htmlProps:q}}function f(e){e.preventDefault(),e.stopPropagation()}},529457:function(e,n,t){t.d(n,{NI:function(){return b},NJ:function(){return m},Q6:function(){return h},e:function(){return f}});var a=t(396248),r=t(916227),i=t(450032),l=t(408232),o=t(93141),d=t(712626),u=t(919938),s=t(652983),c=t(397458),[v,f]=(0,a.k)({name:"FormControlStylesContext",errorMessage:"useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),[p,m]=(0,a.k)({strict:!1,name:"FormControlContext"}),b=(0,i.G)(function(e,n){let t=(0,l.jC)("Form",e),{getRootProps:a,htmlProps:i,...f}=function(e){let{id:n,isRequired:t,isInvalid:a,isDisabled:i,isReadOnly:l,...o}=e,d=(0,s.useId)(),c=n||`field-${d}`,v=`${c}-label`,f=`${c}-feedback`,p=`${c}-helptext`,[m,b]=(0,s.useState)(!1),[h,y]=(0,s.useState)(!1),[k,B]=(0,s.useState)(!1),P=(0,s.useCallback)((e={},n=null)=>({id:p,...e,ref:(0,r.lq)(n,e=>{e&&y(!0)})}),[p]),w=(0,s.useCallback)((e={},n=null)=>({...e,ref:n,"data-focus":(0,u.PB)(k),"data-disabled":(0,u.PB)(i),"data-invalid":(0,u.PB)(a),"data-readonly":(0,u.PB)(l),id:void 0!==e.id?e.id:v,htmlFor:void 0!==e.htmlFor?e.htmlFor:c}),[c,i,k,a,l,v]),C=(0,s.useCallback)((e={},n=null)=>({id:f,...e,ref:(0,r.lq)(n,e=>{e&&b(!0)}),"aria-live":"polite"}),[f]),E=(0,s.useCallback)((e={},n=null)=>({...e,...o,ref:n,role:"group"}),[o]);return{isRequired:!!t,isInvalid:!!a,isReadOnly:!!l,isDisabled:!!i,isFocused:!!k,onFocus:()=>B(!0),onBlur:()=>B(!1),hasFeedbackText:m,setHasFeedbackText:b,hasHelpText:h,setHasHelpText:y,id:c,labelId:v,feedbackId:f,helpTextId:p,htmlProps:o,getHelpTextProps:P,getErrorMessageProps:C,getRootProps:E,getLabelProps:w,getRequiredIndicatorProps:(0,s.useCallback)((e={},n=null)=>({...e,ref:n,role:"presentation","aria-hidden":!0,children:e.children||"*"}),[])}}((0,o.Lr)(e)),m=(0,u.cx)("chakra-form-control",e.className);return(0,c.jsx)(p,{value:f,children:(0,c.jsx)(v,{value:t,children:(0,c.jsx)(d.m.div,{...a({},n),className:m,__css:t.container})})})});b.displayName="FormControl";var h=(0,i.G)(function(e,n){let t=m(),a=f(),r=(0,u.cx)("chakra-form__helper-text",e.className);return(0,c.jsx)(d.m.div,{...null==t?void 0:t.getHelpTextProps(e,n),__css:a.helperText,className:r})});h.displayName="FormHelperText"},478534:function(e,n,t){t.d(n,{K:function(){return l},Y:function(){return i}});var a=t(529457),r=t(919938);function i(e){let{isDisabled:n,isInvalid:t,isReadOnly:a,isRequired:i,...o}=l(e);return{...o,disabled:n,readOnly:a,required:i,"aria-invalid":(0,r.Qm)(t),"aria-required":(0,r.Qm)(i),"aria-readonly":(0,r.Qm)(a)}}function l(e){var n,t,i;let l=(0,a.NJ)(),{id:o,disabled:d,readOnly:u,required:s,isRequired:c,isInvalid:v,isReadOnly:f,isDisabled:p,onFocus:m,onBlur:b,...h}=e,y=e["aria-describedby"]?[e["aria-describedby"]]:[];return(null==l?void 0:l.hasFeedbackText)&&(null==l?void 0:l.isInvalid)&&y.push(l.feedbackId),(null==l?void 0:l.hasHelpText)&&y.push(l.helpTextId),{...h,"aria-describedby":y.join(" ")||void 0,id:null!=o?o:null==l?void 0:l.id,isDisabled:null!=(n=null!=d?d:p)?n:null==l?void 0:l.isDisabled,isReadOnly:null!=(t=null!=u?u:f)?t:null==l?void 0:l.isReadOnly,isRequired:null!=(i=null!=s?s:c)?i:null==l?void 0:l.isRequired,isInvalid:null!=v?v:null==l?void 0:l.isInvalid,onFocus:(0,r.v0)(null==l?void 0:l.onFocus,m),onBlur:(0,r.v0)(null==l?void 0:l.onBlur,b)}}},436938:function(e,n,t){t.d(n,{r:function(){return r}});var a=t(652983);function r(e,n){let t=(0,a.useRef)(!1),r=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(t.current&&r.current)return e();r.current=!0},n),(0,a.useEffect)(()=>(t.current=!0,()=>{t.current=!1}),[])}},807204:function(e,n,t){t.d(n,{BT:function(){return h}});var a=()=>"undefined"!=typeof document,r=!1,i=null,l=!1,o=!1,d=new Set;function u(e,n){d.forEach(t=>t(e,n))}var s="undefined"!=typeof window&&null!=window.navigator&&/^Mac/.test(window.navigator.platform);function c(e){l=!0,e.metaKey||!s&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(i="keyboard",u("keyboard",e))}function v(e){if(i="pointer","mousedown"===e.type||"pointerdown"===e.type){l=!0;let n=e.composedPath?e.composedPath()[0]:e.target,t=!1;try{t=n.matches(":focus-visible")}catch{}t||u("pointer",e)}}function f(e){(0===e.mozInputSource&&e.isTrusted||0===e.detail&&!e.pointerType)&&(l=!0,i="virtual")}function p(e){e.target!==window&&e.target!==document&&(l||o||(i="virtual",u("virtual",e)),l=!1,o=!1)}function m(){l=!1,o=!0}function b(){return"pointer"!==i}function h(e){!function(){if(!a()||r)return;let{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){l=!0,e.apply(this,n)},document.addEventListener("keydown",c,!0),document.addEventListener("keyup",c,!0),document.addEventListener("click",f,!0),window.addEventListener("focus",p,!0),window.addEventListener("blur",m,!1),"undefined"!=typeof PointerEvent?(document.addEventListener("pointerdown",v,!0),document.addEventListener("pointermove",v,!0),document.addEventListener("pointerup",v,!0)):(document.addEventListener("mousedown",v,!0),document.addEventListener("mousemove",v,!0),document.addEventListener("mouseup",v,!0)),r=!0}(),e(b());let n=()=>e(b());return d.add(n),()=>{d.delete(n)}}}}]); //# sourceMappingURL=36595-3515ae4acd08b3ae.js.map