digital-rabbit-cl 2.4.15 → 2.4.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.Button-module__button___2ZuB7{border-style:solid;cursor:pointer;font-weight:700;line-height:1.25;outline:none}.Button-module__button___2ZuB7:disabled{cursor:default}.Button-module__sizeSmall___DRT8P{padding:var(--button-padding-small)}.Button-module__sizeLarge___yeZSH{padding:var(--button-padding-large)}.Checkbox-module__container___aV9qz{display:flex;align-items:center;line-height:1.2}.Checkbox-module__svg___kkluC{flex-shrink:0}.Checkbox-module__label___cwRtI{font-weight:700;margin-left:.25em;-webkit-user-select:none;user-select:none}.FormLabel-module__label___0M-fo{display:inline-block;font-weight:700;padding-bottom:var(--form-label-padding-bottom)}.FormLabel-module__label___0M-fo.FormLabel-module__disabled___ktIFp{opacity:.5;cursor:not-allowed}.FormLabel-module__label___0M-fo:not(.FormLabel-module__disabled___ktIFp){cursor:default}:root{--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-size: 16px;--font-size-md: 16px;--font-size-sm: 12px;--line-height: 1.5;--font-weight-header: 700;--primary-color: #000;--background-color: #fff;--accent-color: #0066cc;--font-size-h1: 2.5rem;--font-size-h2: 1.75rem;--font-size-h3: 1.38316rem;--font-size-h4: 1rem;--font-size-h5: .85028rem;--font-size-h6: .78405rem;--breakpoint-xs: 350px;--breakpoint-sm: 475px;--breakpoint-md: 769px;--breakpoint-lg: 1025px;--layout-max-width: 1280px;--layout-wrapper-padding-sm: .5rem;--layout-wrapper-padding: 1rem}html{line-height:var(--line-height);-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:var(--font-size);font-family:var(--font-family);box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}body{margin:0;font-family:var(--font-family);font-size:1em;line-height:var(--line-height);color:var(--primary-color);background-color:var(--background-color);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:var(--font-weight-header);overflow-wrap:break-word}h1{font-size:var(--font-size-h1)}h2{font-size:var(--font-size-h2)}h3{font-size:var(--font-size-h3)}h4{font-size:var(--font-size-h4)}h5{font-size:var(--font-size-h5)}h6{font-size:var(--font-size-h6)}hr{box-sizing:content-box;height:0;overflow:visible;border:0;border-top:1px solid rgba(0,0,0,.1);margin:1em 0}pre{font-family:monospace,monospace;font-size:1em;overflow:auto}a{background-color:transparent;text-decoration:none}a:link{color:var(--accent-color)}a:hover{text-decoration:underline}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none;max-width:100%;height:auto;vertical-align:middle}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--line-height);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;cursor:pointer}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto;resize:vertical}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item;cursor:pointer}template,[hidden]{display:none}table{border-collapse:collapse;width:100%}ul,ol{padding-left:1.5em}p{margin-top:0;margin-bottom:1em;overflow-wrap:break-word}.FormError-module__formError___kaUBn{font-size:.875em;margin-top:var(--form-error-margin-top);font-weight:400}.FormGroup-module__formGroup___aVI-B{display:flex;flex-direction:column;margin-bottom:var(--form-group-margin-bottom)}.FormGroup-module__inputWrapper___429QE{display:flex;flex-direction:column;gap:.5em}.FormGroup-module__indented___t61iz{padding-left:.5em}.FormGroup-module__formGroup___aVI-B.FormGroup-module__disabled___W-tJ0{opacity:.6;pointer-events:none}.FormGroup-module__required___mO3xA{color:inherit;margin-left:.125em}.FormGroup-module__errorMessage___SHzl3{font-size:.875em;margin-top:.25rem;font-weight:400}.Input-module__input___WjT81{background-color:transparent;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Input-module__input___WjT81::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Input-module__input___WjT81:disabled{opacity:.3}.Input-module__sizeSmall___NFvsi{padding:var(--input-padding-small)}.Input-module__sizeLarge___4Boj3{padding:var(--input-padding-large)}.Textarea-module__textarea___Z-y6g{background-color:transparent;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Textarea-module__textarea___Z-y6g::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Textarea-module__textarea___Z-y6g:disabled{opacity:.3}.Textarea-module__sizeSmall___HHFEM{padding:var(--textarea-padding-small)}.Textarea-module__sizeLarge___5a3sf{padding:var(--textarea-padding-large)}.Select-module__select___cjdcr{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;background-position:right center;background-repeat:no-repeat;background-size:auto 85%;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Select-module__select___cjdcr:disabled{cursor:default;opacity:.3}.Select-module__select___cjdcr:not(:disabled){cursor:pointer}.Select-module__sizeSmall___i1quj{padding:var(--select-padding-small)}.Select-module__sizeLarge___eBA1T{padding:var(--select-padding-large)}.Radio-module__container___AQxhk{display:flex;align-items:center;line-height:1.25}.Radio-module__svg___zl5kF{flex-shrink:0}.Radio-module__label___vAFIP{font-weight:700;margin-left:.25em;-webkit-user-select:none;user-select:none}.Hamburger-module__hamburger___Tf4-t{background:transparent;border:none;cursor:pointer;display:none;flex-direction:column;justify-content:space-around;height:2em;outline:none;padding:0;position:relative;width:2em;z-index:11}.Hamburger-module__line___gybZM{background:currentColor;border-radius:var(--hamburger-border-radius, 10px);height:12.5%;position:relative;transform-origin:1px;transition:all .3s linear;width:100%}.Hamburger-module__line___gybZM:first-child{transform:rotate(0)}.Hamburger-module__line___gybZM:nth-child(2){opacity:1;transform:translate(0)}.Hamburger-module__line___gybZM:nth-child(3){transform:rotate(0)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:first-child{transform:rotate(45deg)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(2){opacity:0;transform:translate(20px)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(3){transform:rotate(-45deg)}.Header-module__header___RUooH{width:100%}.Header-module__container___t68M9{display:flex;align-items:center;justify-content:space-between;margin:0 auto;font-size:var(--header-font-size);max-width:var(--header-max-width);padding:var(--header-padding);position:relative}.ResponsiveNav-module__nav___xOfv5{display:flex}.ResponsiveNav-module__navMobile___h795P{flex-direction:column;min-height:100%;overflow-x:hidden}.ResponsiveNav-module__navHeader___Me8bB{height:3.5em;flex-shrink:0}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE .ResponsiveNav-module__navHeader___Me8bB{height:3em}.ResponsiveNav-module__navDesktop___9wscZ{align-items:center;flex-direction:row;height:auto}.ResponsiveNav-module__navDesktop___9wscZ>*{margin-left:1.25rem}.Popover-module__triggerWrapper___dZpf6{display:inline-block}.Popover-module__popup___JAvrb{max-height:60vh;min-width:120px;overflow:auto}.Popover-module__panelOverlay___1xDU5{top:0;right:0;bottom:0;left:0;pointer-events:none;position:fixed;z-index:1000}.Popover-module__panelOverlayVisible___BgtIQ{pointer-events:auto}.Popover-module__backdrop___e8qHL{top:0;right:0;bottom:0;left:0;position:absolute;transition:background-color .3s ease}.Popover-module__panel___eUJ2E{bottom:0;overflow-y:auto;padding:1rem;position:absolute;top:0;transition:transform .3s ease-in-out}.Popover-module__panelLeft___9nSLp{left:0;transform:translate(-100%)}.Popover-module__panelRight___OrQfl{right:0;transform:translate(100%)}.Popover-module__panelOpen___hhvV-{transform:translate(0)}.Popover-module__panelCloseButton___kALaN{align-items:center;background:none;border:none;color:inherit;cursor:pointer;display:flex;height:1.5rem;justify-content:center;padding:0;position:absolute;right:1rem;top:1rem;width:1.5rem}.Popover-module__panelCloseButton___kALaN:hover{opacity:.7}.NavDropdown-module__trigger___1PQZp{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;font-family:inherit;font-size:inherit;gap:.375rem;padding:0}.NavDropdown-module__chevron___ZLAV7{align-items:center;display:inline-flex;transition:transform .2s ease}.NavDropdown-module__chevronOpen___9mgjr{transform:rotate(180deg)}.Modal-module__backdrop___GVUh4{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;z-index:1000;padding:1em}.Modal-module__modal___aD7aP{padding:1em;position:relative;display:flex;flex-direction:column;gap:1em;max-height:90vh;box-shadow:0 10px 40px #0003;outline:none}.Modal-module__header___ILG9i{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.Modal-module__title___A5OeE{margin:0;font-size:1.5rem;font-weight:600;flex:1}.Modal-module__closeButton___3LpSf{background:none;border:none;cursor:pointer;padding:0;width:1.75em;height:1.75em;display:flex;align-items:center;justify-content:center;color:inherit;margin-left:auto;opacity:.6;transition:opacity .2s,transform .2s;flex-shrink:0}.Modal-module__closeButton___3LpSf svg{display:block;flex-shrink:0}.Modal-module__content___dWO-B{overflow-y:auto;flex:1}.Modal-module__actions___hY6zi{flex-shrink:0}@media (max-width: calc(var(--breakpoint-md) - 1px)){.Modal-module__backdrop___GVUh4{padding:.5em}.Modal-module__header___ILG9i,.Modal-module__content___dWO-B,.Modal-module__actions___hY6zi{padding:1rem}.Modal-module__title___A5OeE{font-size:1.25em}}.Stack-module__stack___yUU-B{display:flex}.Stack-module__vertical___sKTyQ{flex-direction:column}.Stack-module__horizontal___YsvtV{flex-direction:row;align-items:center}.ResponsiveSection-module__section___gBESK{width:100%;padding:0}.ResponsiveSection-module__innerDiv___r1bky{max-width:var(--max-width);margin:0 auto;padding:var(--section-padding)}.Hero-module__hero___IB2tg{padding:var(--hero-padding, 3rem 0)}.Hero-module__content___rkkfQ h1{font-size:var(--hero-h1-font-size, 2rem);margin-bottom:var(--hero-h1-margin-bottom)}.Hero-module__content___rkkfQ p{font-size:var(--hero-p-font-size, 1.125rem);line-height:1.6}.Footer-module__footer___A76NF{width:100%;margin-top:auto}.Footer-module__container___QneNs{display:flex;align-items:center;justify-content:space-between;margin:0 auto}.FeatureCard-module__card___XQt66{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--feature-card-padding)}.FeatureCard-module__icon___dXJ92{font-size:var(--feature-icon-font-size, 2.5rem);margin-bottom:var(--feature-icon-margin-bottom);color:var(--feature-icon-color, var(--primary-color))}.FeatureCard-module__title___KxXyA{font-size:var(--feature-title-font-size, 1.25rem);font-weight:600;margin-bottom:var(--feature-title-margin-bottom);color:var(--feature-title-color, inherit)}.FeatureCard-module__content___68xkw{font-size:1rem;line-height:1.6;color:var(--feature-content-color, var(--primary-color))}.FeatureGrid-module__grid___6sW6f{display:grid;gap:2rem;grid-template-columns:var(--grid-template-columns, 1fr)}.MediaCard-module__card___9pZ7C{display:flex;overflow:hidden}.MediaCard-module__clickable___Rae9n{cursor:pointer;transition:opacity .15s ease}.MediaCard-module__clickable___Rae9n:hover{opacity:.85}.MediaCard-module__vertical___GWtOA{flex-direction:column}.MediaCard-module__vertical___GWtOA .MediaCard-module__imageWrapper___HUiag{width:100%}.MediaCard-module__horizontal___qlK4y{flex-direction:row;align-items:var(--media-card-align-items, center)}.MediaCard-module__horizontal___qlK4y .MediaCard-module__imageWrapper___HUiag{width:var(--media-card-image-width, 7em);flex-shrink:0;padding-top:var(--media-card-image-padding-top, 0)}.MediaCard-module__content___MlqE4{flex:1;min-width:0}.PageLayout-module__layoutContainer___diLdT{display:flex;flex-direction:column;min-height:100vh}.PageLayout-module__content___h2mBr{flex:1 0 auto;display:flex;flex-direction:column}.PageLayout-module__main___Sw7Pv{flex:1}.FileUpload-module__dropzone___jqua0{border-style:dashed;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:1rem;position:relative;text-align:center;transition:opacity .15s ease,background-color .15s ease;width:100%}.FileUpload-module__dropzone___jqua0:hover:not(.FileUpload-module__loading___C7PsH){background-color:#00000008}.FileUpload-module__dropzone___jqua0:focus-visible{outline:2px solid var(--upload-color, currentColor);outline-offset:2px}.FileUpload-module__dragOver___q1zPo{background-color:#0000000f}.FileUpload-module__loading___C7PsH{cursor:not-allowed;opacity:.6}.FileUpload-module__hiddenInput___RLLPJ{display:none}.FileUpload-module__content___yCP0l{display:flex;flex-direction:column;align-items:center;gap:.35rem}.FileUpload-module__contentHidden___0Ewoe{visibility:hidden}.FileUpload-module__spinnerOverlay___e3Rle{position:absolute}.FileUpload-module__label___lbMkx{font-weight:600}.FileUpload-module__hint___8dXlk{font-size:.85em;opacity:.7}.FileUpload-module__errorMessage___8HB3n{font-size:.85em;font-weight:600;margin-top:.25rem}.Image-module__container___sVJdZ{position:relative;overflow:hidden;width:100%}.Image-module__img___pKhPw{width:100%;height:100%;object-fit:cover;display:block;position:absolute;top:0;right:0;bottom:0;left:0}.Image-module__fallback___wysuM{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center}@keyframes Skeleton-module__pulse___8RWFn{0%,to{opacity:.4}50%{opacity:1}}.Skeleton-module__skeleton___CB4uF{background-color:var(--skeleton-color, color-mix(in srgb, currentColor 20%, transparent));animation:Skeleton-module__pulse___8RWFn 2s ease-in-out infinite;display:block;width:100%;height:100%}.ImageThumbnail-module__thumbnail___-igbe{box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;position:relative}.ImageThumbnail-module__img___Q7Z4V{width:100%;height:100%;object-fit:cover;display:block}.ImageThumbnail-module__sizeXs___TvSHV{width:1.25em;height:1.25em}.ImageThumbnail-module__sizeSmall___2KnCh{width:3em;height:3em}.ImageThumbnail-module__sizeDefault___laoQk{width:4em;height:4em}.ImageThumbnail-module__sizeLarge___iwz3o{width:5em;height:5em}.ImageThumbnail-module__removeButton___Ceh1Q{position:absolute;top:.25rem;right:.25rem;width:1.1rem;height:1.1rem;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;z-index:1;opacity:.6;transition:opacity .15s ease}.ImageThumbnail-module__removeButton___Ceh1Q:hover{opacity:1}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- (function(E,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],u):(E=typeof globalThis<"u"?globalThis:E||self,u(E.DigitalRabbitCL={},E.jsxRuntime,E.React,E.ReactDOM))})(this,(function(E,u,p,je){"use strict";const $e={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeLarge:"Button-module__sizeLarge___yeZSH"},Dr=({isActive:e,disabled:r,color:t,hoverColor:o,hoverTextColor:s,outline:n,theme:a})=>{const l=t||a.colors.primary,y=a.buttons.textColor;let c,d,h;n?(c="transparent",d=l,h=l,e&&(c=o||l,d=o||l,h=s||y)):(c=l,d=l,h=y,e&&(c=o||l,d=o||l,h=s||y));let m=1;return r?m=.3:e&&!o&&(m=.75),{backgroundColor:c,borderColor:d,color:h,opacity:m}};function wt(e,r){const t={...e};return Ee(e)&&Ee(r)&&Object.keys(r).forEach(o=>{const s=r[o],n=e[o];Ee(s)&&Ee(n)?t[o]=wt(n,s):s!==void 0&&(t[o]=s)}),t}function Ee(e){return e&&typeof e=="object"&&!Array.isArray(e)}function pe(e){const r=e.match(/^(\d+(?:\.\d+)?)(px|em|rem)$/);if(!r){const s=parseInt(e,10),n=e.replace(/[0-9.]/g,"")||"px";return{maxWidth:isNaN(s)?768:s-1,unit:n}}const t=parseFloat(r[1]),o=r[2];return{maxWidth:t-1,unit:o}}const We={primary:"#000",secondary:"#FFF",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},Ue={colors:We,fonts:{color:"#000",lineHeight:1.5,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontWeightHeader:700,size:"22px",sizeMd:"18px",sizeSm:"15px",rhythm:"1.45em",fontSizeH1:"2.5rem",fontSizeH2:"1.75rem",fontSizeH3:"1.38316rem",fontSizeH4:"1rem",fontSizeH5:"0.85028rem",fontSizeH6:"0.78405rem"},buttons:{textColor:"#FFF",paddingHorizontal:.35,primary:{textColor:We.secondary}},inputs:{paddingHorizontal:.27},sizes:{small:{paddingVertical:.07},large:{paddingVertical:.17}},border:{radius:"5px",width:"0.15em"},breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",paddingSm:"0.5rem",padding:"1rem"},modal:{backgroundColor:We.secondary,backdropColor:"rgba(0, 0, 0, 0.5)",boxShadow:"0 10px 40px rgba(0, 0, 0, 0.2)"}},Ct=p.createContext(Ue),Or=({theme:e,children:r})=>{const t=e?wt(Ue,e):Ue;return u.jsx(Ct.Provider,{value:t,children:r})},O=()=>p.useContext(Ct),Ft=({color:e,hoverColor:r,hoverTextColor:t,disabled:o=!1,size:s="large",outline:n=!1,type:a="button",className:l,style:y,buttonProps:c={},onClick:d,children:h})=>{const m=O(),[x,S]=p.useState(!1),C={...Dr({isActive:x,disabled:o,color:e,hoverColor:r,hoverTextColor:t,outline:n,theme:m}),fontSize:"1em",borderWidth:m.border.width,borderRadius:m.border.radius,"--button-padding-small":`calc(${m.fonts.rhythm} * ${m.sizes.small.paddingVertical}) calc(${m.fonts.rhythm} * ${m.buttons.paddingHorizontal})`,"--button-padding-large":`calc(${m.fonts.rhythm} * ${m.sizes.large.paddingVertical}) calc(${m.fonts.rhythm} * ${m.buttons.paddingHorizontal})`,...y},V=[$e.button,s==="small"?$e.sizeSmall:$e.sizeLarge,n?$e.outline:"",l].filter(Boolean).join(" ");return u.jsx("button",{...c,className:V,disabled:o,onClick:d,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),type:a,style:C,children:h})};var xt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Ir=new Uint8Array(16);function Tr(){if(!xt)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xt(Ir)}for(var zt=[],Ne=0;Ne<256;++Ne)zt[Ne]=(Ne+256).toString(16).substr(1);function Hr(e,r){var t=0,o=zt;return[o[e[t++]],o[e[t++]],o[e[t++]],o[e[t++]],"-",o[e[t++]],o[e[t++]],"-",o[e[t++]],o[e[t++]],"-",o[e[t++]],o[e[t++]],"-",o[e[t++]],o[e[t++]],o[e[t++]],o[e[t++]],o[e[t++]],o[e[t++]]].join("")}function Vt(e,r,t){var o=r&&t||0;typeof e=="string"&&(r=e==="binary"?new Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||Tr)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,r)for(var n=0;n<16;++n)r[o+n]=s[n];return r||Hr(s)}const qe={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},jr=({color:e="#000",checkmarkColor:r,disabled:t=!1,inverted:o=!1})=>{let s=e;return r?s=r:o&&(s="white"),{checkboxColor:e,checkmarkColor:s,cursor:t?"default":"pointer",opacity:t?.3:1}},$t={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},Wr=({color:e="#000",disabled:r=!1,fontSize:t=".85em"})=>({color:e,fontSize:t,opacity:r?.5:1,cursor:r?"not-allowed":"default"}),Le=({color:e,disabled:r=!1,error:t=!1,htmlFor:o,children:s,className:n,style:a,labelProps:l})=>{const y=O(),c=y.colors.error,d=t?c:e||y.colors.primary,h=Wr({color:d,disabled:r,fontSize:".85em"}),m={"--form-label-padding-bottom":`calc(${y.fonts.rhythm} * 0.17)`,color:h.color,fontSize:h.fontSize,opacity:h.opacity,cursor:h.cursor,...a},x=[$t.label,r?$t.disabled:"",n].filter(Boolean).join(" ");return u.jsx("label",{...l,className:x,htmlFor:o,style:m,children:s})},Me=({color:e,checkmarkColor:r,checked:t=!1,inverted:o=!1,disabled:s=!1,error:n=!1,name:a,id:l,onChange:y,label:c,labelStyle:d,className:h,style:m,divProps:x})=>{const S=O(),g=l||Vt(),C=S.colors.error,V=n?C:e||S.colors.primary,v=jr({color:V,checkmarkColor:r,disabled:s,inverted:o}),z=A=>{s||y(A)},$={cursor:v.cursor,fontSize:"1em",opacity:v.opacity,...m},N={width:"1em"},D={fill:o&&t?v.checkboxColor:"transparent",strokeWidth:"25",stroke:v.checkboxColor},B={stroke:v.checkmarkColor,strokeWidth:"15",fill:"transparent"},q=[qe.container,h].filter(Boolean).join(" ");return u.jsxs("div",{...x,className:q,style:$,children:[u.jsx("input",{id:g,checked:t,disabled:s,onChange:A=>z({target:{checked:A.target.checked,name:a,type:"checkbox"}}),name:a,style:{display:"none"},type:"checkbox"}),u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>z({target:{checked:!t,name:a,type:"checkbox"}}),style:N,className:qe.svg,children:[u.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:D}),t&&u.jsx("path",{d:"M 25 45 L 45 65 L 75 30",style:B})]}),c&&u.jsx(Le,{htmlFor:g,className:qe.label,style:{paddingBottom:0,...d},color:v.checkboxColor,disabled:s,error:n,children:c})]})},Ur=()=>{const e=O();return p.useLayoutEffect(()=>{const r=document.documentElement;e.fonts&&(e.fonts.fontFamily&&r.style.setProperty("--font-family",e.fonts.fontFamily),e.fonts.size&&r.style.setProperty("--font-size",e.fonts.size),e.fonts.sizeMd&&r.style.setProperty("--font-size-md",e.fonts.sizeMd),e.fonts.sizeSm&&r.style.setProperty("--font-size-sm",e.fonts.sizeSm),e.fonts.lineHeight!==void 0&&r.style.setProperty("--line-height",e.fonts.lineHeight.toString()),e.fonts.fontWeightHeader!==void 0&&r.style.setProperty("--font-weight-header",e.fonts.fontWeightHeader.toString()),e.fonts.fontSizeH1&&r.style.setProperty("--font-size-h1",e.fonts.fontSizeH1),e.fonts.fontSizeH2&&r.style.setProperty("--font-size-h2",e.fonts.fontSizeH2),e.fonts.fontSizeH3&&r.style.setProperty("--font-size-h3",e.fonts.fontSizeH3),e.fonts.fontSizeH4&&r.style.setProperty("--font-size-h4",e.fonts.fontSizeH4),e.fonts.fontSizeH5&&r.style.setProperty("--font-size-h5",e.fonts.fontSizeH5),e.fonts.fontSizeH6&&r.style.setProperty("--font-size-h6",e.fonts.fontSizeH6)),e.colors&&(e.colors.primary&&r.style.setProperty("--primary-color",e.colors.primary),e.colors.secondary&&r.style.setProperty("--background-color",e.colors.secondary),e.colors.accent&&r.style.setProperty("--accent-color",e.colors.accent)),e.breakpoints&&(e.breakpoints.xs&&r.style.setProperty("--breakpoint-xs",e.breakpoints.xs),e.breakpoints.sm&&r.style.setProperty("--breakpoint-sm",e.breakpoints.sm),e.breakpoints.md&&r.style.setProperty("--breakpoint-md",e.breakpoints.md),e.breakpoints.lg&&r.style.setProperty("--breakpoint-lg",e.breakpoints.lg)),e.layout&&(e.layout.maxWidth&&r.style.setProperty("--layout-max-width",e.layout.maxWidth),e.layout.paddingSm&&r.style.setProperty("--layout-wrapper-padding-sm",e.layout.paddingSm),e.layout.padding&&r.style.setProperty("--layout-wrapper-padding",e.layout.padding))},[e]),p.useLayoutEffect(()=>{const r="dr-cl-responsive-tokens";let t=document.getElementById(r);return t||(t=document.createElement("style"),t.id=r,document.head.appendChild(t)),t.textContent=`
2
+ (function(E,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],d):(E=typeof globalThis<"u"?globalThis:E||self,d(E.DigitalRabbitCL={},E.jsxRuntime,E.React,E.ReactDOM))})(this,(function(E,d,p,We){"use strict";const $e={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeLarge:"Button-module__sizeLarge___yeZSH"},Or=({isActive:e,disabled:r,color:t,hoverColor:o,hoverTextColor:s,outline:n,theme:a})=>{const l=t||a.colors.primary,y=a.buttons.textColor;let c,u,h;n?(c="transparent",u=l,h=l,e&&(c=o||l,u=o||l,h=s||y)):(c=l,u=l,h=y,e&&(c=o||l,u=o||l,h=s||y));let m=1;return r?m=.3:e&&!o&&(m=.75),{backgroundColor:c,borderColor:u,color:h,opacity:m}};function wt(e,r){const t={...e};return Ee(e)&&Ee(r)&&Object.keys(r).forEach(o=>{const s=r[o],n=e[o];Ee(s)&&Ee(n)?t[o]=wt(n,s):s!==void 0&&(t[o]=s)}),t}function Ee(e){return e&&typeof e=="object"&&!Array.isArray(e)}function pe(e){const r=e.match(/^(\d+(?:\.\d+)?)(px|em|rem)$/);if(!r){const s=parseInt(e,10),n=e.replace(/[0-9.]/g,"")||"px";return{maxWidth:isNaN(s)?768:s-1,unit:n}}const t=parseFloat(r[1]),o=r[2];return{maxWidth:t-1,unit:o}}const Ne={primary:"#000",secondary:"#FFF",secondaryBackground:"#1e1e1f",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},Ue={colors:Ne,fonts:{color:"#000",lineHeight:1.5,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontWeightHeader:700,size:"22px",sizeMd:"18px",sizeSm:"15px",rhythm:"1.45em",fontSizeH1:"2.5rem",fontSizeH2:"1.75rem",fontSizeH3:"1.38316rem",fontSizeH4:"1rem",fontSizeH5:"0.85028rem",fontSizeH6:"0.78405rem"},buttons:{textColor:"#FFF",paddingHorizontal:.35,primary:{textColor:Ne.secondary}},inputs:{paddingHorizontal:.27},sizes:{small:{paddingVertical:.07},large:{paddingVertical:.17}},border:{radius:"5px",width:"0.15em"},breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",paddingSm:"0.5rem",padding:"1rem"},cards:{backgroundColor:Ne.secondaryBackground},modal:{backgroundColor:Ne.secondaryBackground,backdropColor:"rgba(0, 0, 0, 0.5)",boxShadow:"0 10px 40px rgba(0, 0, 0, 0.2)"}},Ct=p.createContext(Ue),Ir=({theme:e,children:r})=>{const t=e?wt(Ue,e):Ue;return d.jsx(Ct.Provider,{value:t,children:r})},O=()=>p.useContext(Ct),Ft=({color:e,hoverColor:r,hoverTextColor:t,disabled:o=!1,size:s="large",outline:n=!1,type:a="button",className:l,style:y,buttonProps:c={},onClick:u,children:h})=>{const m=O(),[x,S]=p.useState(!1),C={...Or({isActive:x,disabled:o,color:e,hoverColor:r,hoverTextColor:t,outline:n,theme:m}),fontSize:"1em",borderWidth:m.border.width,borderRadius:m.border.radius,"--button-padding-small":`calc(${m.fonts.rhythm} * ${m.sizes.small.paddingVertical}) calc(${m.fonts.rhythm} * ${m.buttons.paddingHorizontal})`,"--button-padding-large":`calc(${m.fonts.rhythm} * ${m.sizes.large.paddingVertical}) calc(${m.fonts.rhythm} * ${m.buttons.paddingHorizontal})`,...y},V=[$e.button,s==="small"?$e.sizeSmall:$e.sizeLarge,n?$e.outline:"",l].filter(Boolean).join(" ");return d.jsx("button",{...c,className:V,disabled:o,onClick:u,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),type:a,style:C,children:h})};var xt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Tr=new Uint8Array(16);function Hr(){if(!xt)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xt(Tr)}for(var zt=[],Le=0;Le<256;++Le)zt[Le]=(Le+256).toString(16).substr(1);function jr(e,r){var t=0,o=zt;return[o[e[t++]],o[e[t++]],o[e[t++]],o[e[t++]],"-",o[e[t++]],o[e[t++]],"-",o[e[t++]],o[e[t++]],"-",o[e[t++]],o[e[t++]],"-",o[e[t++]],o[e[t++]],o[e[t++]],o[e[t++]],o[e[t++]],o[e[t++]]].join("")}function Vt(e,r,t){var o=r&&t||0;typeof e=="string"&&(r=e==="binary"?new Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||Hr)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,r)for(var n=0;n<16;++n)r[o+n]=s[n];return r||jr(s)}const qe={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},Wr=({color:e="#000",checkmarkColor:r,disabled:t=!1,inverted:o=!1})=>{let s=e;return r?s=r:o&&(s="white"),{checkboxColor:e,checkmarkColor:s,cursor:t?"default":"pointer",opacity:t?.3:1}},$t={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},Ur=({color:e="#000",disabled:r=!1,fontSize:t=".85em"})=>({color:e,fontSize:t,opacity:r?.5:1,cursor:r?"not-allowed":"default"}),Me=({color:e,disabled:r=!1,error:t=!1,htmlFor:o,children:s,className:n,style:a,labelProps:l})=>{const y=O(),c=y.colors.error,u=t?c:e||y.colors.primary,h=Ur({color:u,disabled:r,fontSize:".85em"}),m={"--form-label-padding-bottom":`calc(${y.fonts.rhythm} * 0.17)`,color:h.color,fontSize:h.fontSize,opacity:h.opacity,cursor:h.cursor,...a},x=[$t.label,r?$t.disabled:"",n].filter(Boolean).join(" ");return d.jsx("label",{...l,className:x,htmlFor:o,style:m,children:s})},Pe=({color:e,checkmarkColor:r,checked:t=!1,inverted:o=!1,disabled:s=!1,error:n=!1,name:a,id:l,onChange:y,label:c,labelStyle:u,className:h,style:m,divProps:x})=>{const S=O(),g=l||Vt(),C=S.colors.error,V=n?C:e||S.colors.primary,v=Wr({color:V,checkmarkColor:r,disabled:s,inverted:o}),z=B=>{s||y(B)},$={cursor:v.cursor,fontSize:"1em",opacity:v.opacity,...m},N={width:"1em"},D={fill:o&&t?v.checkboxColor:"transparent",strokeWidth:"25",stroke:v.checkboxColor},A={stroke:v.checkmarkColor,strokeWidth:"15",fill:"transparent"},q=[qe.container,h].filter(Boolean).join(" ");return d.jsxs("div",{...x,className:q,style:$,children:[d.jsx("input",{id:g,checked:t,disabled:s,onChange:B=>z({target:{checked:B.target.checked,name:a,type:"checkbox"}}),name:a,style:{display:"none"},type:"checkbox"}),d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>z({target:{checked:!t,name:a,type:"checkbox"}}),style:N,className:qe.svg,children:[d.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:D}),t&&d.jsx("path",{d:"M 25 45 L 45 65 L 75 30",style:A})]}),c&&d.jsx(Me,{htmlFor:g,className:qe.label,style:{paddingBottom:0,...u},color:v.checkboxColor,disabled:s,error:n,children:c})]})},qr=()=>{const e=O();return p.useLayoutEffect(()=>{const r=document.documentElement;e.fonts&&(e.fonts.fontFamily&&r.style.setProperty("--font-family",e.fonts.fontFamily),e.fonts.size&&r.style.setProperty("--font-size",e.fonts.size),e.fonts.sizeMd&&r.style.setProperty("--font-size-md",e.fonts.sizeMd),e.fonts.sizeSm&&r.style.setProperty("--font-size-sm",e.fonts.sizeSm),e.fonts.lineHeight!==void 0&&r.style.setProperty("--line-height",e.fonts.lineHeight.toString()),e.fonts.fontWeightHeader!==void 0&&r.style.setProperty("--font-weight-header",e.fonts.fontWeightHeader.toString()),e.fonts.fontSizeH1&&r.style.setProperty("--font-size-h1",e.fonts.fontSizeH1),e.fonts.fontSizeH2&&r.style.setProperty("--font-size-h2",e.fonts.fontSizeH2),e.fonts.fontSizeH3&&r.style.setProperty("--font-size-h3",e.fonts.fontSizeH3),e.fonts.fontSizeH4&&r.style.setProperty("--font-size-h4",e.fonts.fontSizeH4),e.fonts.fontSizeH5&&r.style.setProperty("--font-size-h5",e.fonts.fontSizeH5),e.fonts.fontSizeH6&&r.style.setProperty("--font-size-h6",e.fonts.fontSizeH6)),e.colors&&(e.colors.primary&&r.style.setProperty("--primary-color",e.colors.primary),e.colors.secondary&&r.style.setProperty("--background-color",e.colors.secondary),e.colors.accent&&r.style.setProperty("--accent-color",e.colors.accent)),e.breakpoints&&(e.breakpoints.xs&&r.style.setProperty("--breakpoint-xs",e.breakpoints.xs),e.breakpoints.sm&&r.style.setProperty("--breakpoint-sm",e.breakpoints.sm),e.breakpoints.md&&r.style.setProperty("--breakpoint-md",e.breakpoints.md),e.breakpoints.lg&&r.style.setProperty("--breakpoint-lg",e.breakpoints.lg)),e.layout&&(e.layout.maxWidth&&r.style.setProperty("--layout-max-width",e.layout.maxWidth),e.layout.paddingSm&&r.style.setProperty("--layout-wrapper-padding-sm",e.layout.paddingSm),e.layout.padding&&r.style.setProperty("--layout-wrapper-padding",e.layout.padding))},[e]),p.useLayoutEffect(()=>{const r="dr-cl-responsive-tokens";let t=document.getElementById(r);return t||(t=document.createElement("style"),t.id=r,document.head.appendChild(t)),t.textContent=`
3
3
  @media (max-width: ${e.breakpoints.md}) {
4
4
  html {
5
5
  font-size: var(--font-size-md);
@@ -18,7 +18,7 @@
18
18
  --order-list-content-padding: 0.4em 0.75em 0.4em 0;
19
19
  }
20
20
  }
21
- `,()=>{const o=document.getElementById(r);o&&document.head.removeChild(o)}},[e]),null};var Ce=e=>e.type==="checkbox",me=e=>e instanceof Date,R=e=>e==null;const Et=e=>typeof e=="object";var Z=e=>!R(e)&&!Array.isArray(e)&&Et(e)&&!me(e),Nt=e=>Z(e)&&e.target?Ce(e.target)?e.target.checked:e.target.value:e,qr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Lt=(e,r)=>e.has(qr(r)),Gr=e=>{const r=e.constructor&&e.constructor.prototype;return Z(r)&&r.hasOwnProperty("isPrototypeOf")},Ge=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function K(e){let r;const t=Array.isArray(e),o=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(!(Ge&&(e instanceof Blob||o))&&(t||Z(e)))if(r=t?[]:Object.create(Object.getPrototypeOf(e)),!t&&!Gr(e))r=e;else for(const s in e)e.hasOwnProperty(s)&&(r[s]=K(e[s]));else return e;return r}var Pe=e=>/^\w*$/.test(e),U=e=>e===void 0,Ze=e=>Array.isArray(e)?e.filter(Boolean):[],Qe=e=>Ze(e.replace(/["|']|\]/g,"").split(/\.|\[/)),w=(e,r,t)=>{if(!r||!Z(e))return t;const o=(Pe(r)?[r]:Qe(r)).reduce((s,n)=>R(s)?s:s[n],e);return U(o)||o===e?U(e[r])?t:e[r]:o},ee=e=>typeof e=="boolean",I=(e,r,t)=>{let o=-1;const s=Pe(r)?[r]:Qe(r),n=s.length,a=n-1;for(;++o<n;){const l=s[o];let y=t;if(o!==a){const c=e[l];y=Z(c)||Array.isArray(c)?c:isNaN(+s[o+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=y,e=e[l]}};const Ae={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ne={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},de={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Mt=p.createContext(null);Mt.displayName="HookFormContext";const Ke=()=>p.useContext(Mt);var Pt=(e,r,t,o=!0)=>{const s={defaultValues:r._defaultValues};for(const n in e)Object.defineProperty(s,n,{get:()=>{const a=n;return r._proxyFormState[a]!==ne.all&&(r._proxyFormState[a]=!o||ne.all),t&&(t[a]=!0),e[a]}});return s};const Xe=typeof window<"u"?p.useLayoutEffect:p.useEffect;function Zr(e){const r=Ke(),{control:t=r.control,disabled:o,name:s,exact:n}=e||{},[a,l]=p.useState(t._formState),y=p.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Xe(()=>t._subscribe({name:s,formState:y.current,exact:n,callback:c=>{!o&&l({...t._formState,...c})}}),[s,o,n]),p.useEffect(()=>{y.current.isValid&&t._setValid(!0)},[t]),p.useMemo(()=>Pt(a,t,y.current,!1),[a,t])}var te=e=>typeof e=="string",Je=(e,r,t,o,s)=>te(e)?(o&&r.watch.add(e),w(t,e,s)):Array.isArray(e)?e.map(n=>(o&&r.watch.add(n),w(t,n))):(o&&(r.watchAll=!0),t),Ye=e=>R(e)||!Et(e);function ae(e,r,t=new WeakSet){if(Ye(e)||Ye(r))return e===r;if(me(e)&&me(r))return e.getTime()===r.getTime();const o=Object.keys(e),s=Object.keys(r);if(o.length!==s.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const n of o){const a=e[n];if(!s.includes(n))return!1;if(n!=="ref"){const l=r[n];if(me(a)&&me(l)||Z(a)&&Z(l)||Array.isArray(a)&&Array.isArray(l)?!ae(a,l,t):a!==l)return!1}}return!0}function Qr(e){const r=Ke(),{control:t=r.control,name:o,defaultValue:s,disabled:n,exact:a,compute:l}=e||{},y=p.useRef(s),c=p.useRef(l),d=p.useRef(void 0),h=p.useRef(t),m=p.useRef(o);c.current=l;const[x,S]=p.useState(()=>{const $=t._getWatch(o,y.current);return c.current?c.current($):$}),g=p.useCallback($=>{const N=Je(o,t._names,$||t._formValues,!1,y.current);return c.current?c.current(N):N},[t._formValues,t._names,o]),C=p.useCallback($=>{if(!n){const N=Je(o,t._names,$||t._formValues,!1,y.current);if(c.current){const D=c.current(N);ae(D,d.current)||(S(D),d.current=D)}else S(N)}},[t._formValues,t._names,n,o]);Xe(()=>((h.current!==t||!ae(m.current,o))&&(h.current=t,m.current=o,C()),t._subscribe({name:o,formState:{values:!0},exact:a,callback:$=>{C($.values)}})),[t,a,o,C]),p.useEffect(()=>t._removeUnmounted());const V=h.current!==t,v=m.current,z=p.useMemo(()=>{if(n)return null;const $=!V&&!ae(v,o);return V||$?g():null},[n,V,o,v,g]);return z!==null?z:x}function Kr(e){const r=Ke(),{name:t,disabled:o,control:s=r.control,shouldUnregister:n,defaultValue:a}=e,l=Lt(s._names.array,t),y=p.useMemo(()=>w(s._formValues,t,w(s._defaultValues,t,a)),[s,t,a]),c=Qr({control:s,name:t,defaultValue:y,exact:!0}),d=Zr({control:s,name:t,exact:!0}),h=p.useRef(e),m=p.useRef(void 0),x=p.useRef(s.register(t,{...e.rules,value:c,...ee(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const S=p.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!w(d.errors,t)},isDirty:{enumerable:!0,get:()=>!!w(d.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!w(d.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!w(d.validatingFields,t)},error:{enumerable:!0,get:()=>w(d.errors,t)}}),[d,t]),g=p.useCallback(z=>x.current.onChange({target:{value:Nt(z),name:t},type:Ae.CHANGE}),[t]),C=p.useCallback(()=>x.current.onBlur({target:{value:w(s._formValues,t),name:t},type:Ae.BLUR}),[t,s._formValues]),V=p.useCallback(z=>{const $=w(s._fields,t);$&&z&&($._f.ref={focus:()=>z.focus&&z.focus(),select:()=>z.select&&z.select(),setCustomValidity:N=>z.setCustomValidity(N),reportValidity:()=>z.reportValidity()})},[s._fields,t]),v=p.useMemo(()=>({name:t,value:c,...ee(o)||d.disabled?{disabled:d.disabled||o}:{},onChange:g,onBlur:C,ref:V}),[t,o,d.disabled,g,C,V,c]);return p.useEffect(()=>{const z=s._options.shouldUnregister||n,$=m.current;$&&$!==t&&!l&&s.unregister($),s.register(t,{...h.current.rules,...ee(h.current.disabled)?{disabled:h.current.disabled}:{}});const N=(D,B)=>{const q=w(s._fields,D);q&&q._f&&(q._f.mount=B)};if(N(t,!0),z){const D=K(w(s._options.defaultValues,t,h.current.defaultValue));I(s._defaultValues,t,D),U(w(s._formValues,t))&&I(s._formValues,t,D)}return!l&&s.register(t),m.current=t,()=>{(l?z&&!s._state.action:z)?s.unregister(t):N(t,!1)}},[t,s,l,n]),p.useEffect(()=>{s._setDisabledField({disabled:o,name:t})},[o,t,s]),p.useMemo(()=>({field:v,formState:d,fieldState:S}),[v,d,S])}var Re=(e,r,t,o,s)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[o]:s||!0}}:{},Fe=e=>Array.isArray(e)?e:[e],At=()=>{let e=[];return{get observers(){return e},next:s=>{for(const n of e)n.next&&n.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(n=>n!==s)}}),unsubscribe:()=>{e=[]}}};function Bt(e,r){const t={};for(const o in e)if(e.hasOwnProperty(o)){const s=e[o],n=r[o];if(s&&Z(s)&&n){const a=Bt(s,n);Z(a)&&(t[o]=a)}else e[o]&&(t[o]=n)}return t}var Y=e=>Z(e)&&!Object.keys(e).length,et=e=>e.type==="file",le=e=>typeof e=="function",Be=e=>{if(!Ge)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},Dt=e=>e.type==="select-multiple",tt=e=>e.type==="radio",Xr=e=>tt(e)||Ce(e),rt=e=>Be(e)&&e.isConnected;function Jr(e,r){const t=r.slice(0,-1).length;let o=0;for(;o<t;)e=U(e)?o++:e[r[o++]];return e}function Yr(e){for(const r in e)if(e.hasOwnProperty(r)&&!U(e[r]))return!1;return!0}function Q(e,r){const t=Array.isArray(r)?r:Pe(r)?[r]:Qe(r),o=t.length===1?e:Jr(e,t),s=t.length-1,n=t[s];return o&&delete o[n],s!==0&&(Z(o)&&Y(o)||Array.isArray(o)&&Yr(o))&&Q(e,t.slice(0,-1)),e}var Rr=e=>{for(const r in e)if(le(e[r]))return!0;return!1};function Ot(e){return Array.isArray(e)||Z(e)&&!Rr(e)}function ot(e,r={}){for(const t in e)Ot(e[t])?(r[t]=Array.isArray(e[t])?[]:{},ot(e[t],r[t])):U(e[t])||(r[t]=!0);return r}function ge(e,r,t){t||(t=ot(r));for(const o in e)Ot(e[o])?U(r)||Ye(t[o])?t[o]=ot(e[o],Array.isArray(e[o])?[]:{}):ge(e[o],R(r)?{}:r[o],t[o]):t[o]=!ae(e[o],r[o]);return t}const It={value:!1,isValid:!1},Tt={value:!0,isValid:!0};var Ht=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!U(e[0].attributes.value)?U(e[0].value)||e[0].value===""?Tt:{value:e[0].value,isValid:!0}:Tt:It}return It},jt=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:o})=>U(e)?e:r?e===""?NaN:e&&+e:t&&te(e)?new Date(e):o?o(e):e;const Wt={isValid:!1,value:null};var Ut=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,Wt):Wt;function qt(e){const r=e.ref;return et(r)?r.files:tt(r)?Ut(e.refs).value:Dt(r)?[...r.selectedOptions].map(({value:t})=>t):Ce(r)?Ht(e.refs).value:jt(U(r.value)?e.ref.value:r.value,e)}var eo=(e,r,t,o)=>{const s={};for(const n of e){const a=w(r,n);a&&I(s,n,a._f)}return{criteriaMode:t,names:[...e],fields:s,shouldUseNativeValidation:o}},De=e=>e instanceof RegExp,xe=e=>U(e)?e:De(e)?e.source:Z(e)?De(e.value)?e.value.source:e.value:e,Gt=e=>({isOnSubmit:!e||e===ne.onSubmit,isOnBlur:e===ne.onBlur,isOnChange:e===ne.onChange,isOnAll:e===ne.all,isOnTouch:e===ne.onTouched});const Zt="AsyncFunction";var to=e=>!!e&&!!e.validate&&!!(le(e.validate)&&e.validate.constructor.name===Zt||Z(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===Zt)),ro=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Qt=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(o=>e.startsWith(o)&&/^\.\w+/.test(e.slice(o.length))));const ze=(e,r,t,o)=>{for(const s of t||Object.keys(e)){const n=w(e,s);if(n){const{_f:a,...l}=n;if(a){if(a.refs&&a.refs[0]&&r(a.refs[0],s)&&!o)return!0;if(a.ref&&r(a.ref,a.name)&&!o)return!0;if(ze(l,r))break}else if(Z(l)&&ze(l,r))break}}};function Kt(e,r,t){const o=w(e,t);if(o||Pe(t))return{error:o,name:t};const s=t.split(".");for(;s.length;){const n=s.join("."),a=w(r,n),l=w(e,n);if(a&&!Array.isArray(a)&&t!==n)return{name:t};if(l&&l.type)return{name:n,error:l};if(l&&l.root&&l.root.type)return{name:`${n}.root`,error:l.root};s.pop()}return{name:t}}var oo=(e,r,t,o)=>{t(e);const{name:s,...n}=e;return Y(n)||Object.keys(n).length>=Object.keys(r).length||Object.keys(n).find(a=>r[a]===(!o||ne.all))},so=(e,r,t)=>!e||!r||e===r||Fe(e).some(o=>o&&(t?o===r:o.startsWith(r)||r.startsWith(o))),no=(e,r,t,o,s)=>s.isOnAll?!1:!t&&s.isOnTouch?!(r||e):(t?o.isOnBlur:s.isOnBlur)?!e:(t?o.isOnChange:s.isOnChange)?e:!0,ao=(e,r)=>!Ze(w(e,r)).length&&Q(e,r),lo=(e,r,t)=>{const o=Fe(w(e,t));return I(o,"root",r[t]),I(e,t,o),e};function Xt(e,r,t="validate"){if(te(e)||Array.isArray(e)&&e.every(te)||ee(e)&&!e)return{type:t,message:te(e)?e:"",ref:r}}var ve=e=>Z(e)&&!De(e)?e:{value:e,message:""},Jt=async(e,r,t,o,s,n)=>{const{ref:a,refs:l,required:y,maxLength:c,minLength:d,min:h,max:m,pattern:x,validate:S,name:g,valueAsNumber:C,mount:V}=e._f,v=w(t,g);if(!V||r.has(g))return{};const z=l?l[0]:a,$=M=>{s&&z.reportValidity&&(z.setCustomValidity(ee(M)?"":M||""),z.reportValidity())},N={},D=tt(a),B=Ce(a),q=D||B,A=(C||et(a))&&U(a.value)&&U(v)||Be(a)&&a.value===""||v===""||Array.isArray(v)&&!v.length,X=Re.bind(null,g,o,N),G=(M,P,T,H=de.maxLength,J=de.minLength)=>{const re=M?P:T;N[g]={type:M?H:J,message:re,ref:a,...X(M?H:J,re)}};if(n?!Array.isArray(v)||!v.length:y&&(!q&&(A||R(v))||ee(v)&&!v||B&&!Ht(l).isValid||D&&!Ut(l).isValid)){const{value:M,message:P}=te(y)?{value:!!y,message:y}:ve(y);if(M&&(N[g]={type:de.required,message:P,ref:z,...X(de.required,P)},!o))return $(P),N}if(!A&&(!R(h)||!R(m))){let M,P;const T=ve(m),H=ve(h);if(!R(v)&&!isNaN(v)){const J=a.valueAsNumber||v&&+v;R(T.value)||(M=J>T.value),R(H.value)||(P=J<H.value)}else{const J=a.valueAsDate||new Date(v),re=Te=>new Date(new Date().toDateString()+" "+Te),fe=a.type=="time",we=a.type=="week";te(T.value)&&v&&(M=fe?re(v)>re(T.value):we?v>T.value:J>new Date(T.value)),te(H.value)&&v&&(P=fe?re(v)<re(H.value):we?v<H.value:J<new Date(H.value))}if((M||P)&&(G(!!M,T.message,H.message,de.max,de.min),!o))return $(N[g].message),N}if((c||d)&&!A&&(te(v)||n&&Array.isArray(v))){const M=ve(c),P=ve(d),T=!R(M.value)&&v.length>+M.value,H=!R(P.value)&&v.length<+P.value;if((T||H)&&(G(T,M.message,P.message),!o))return $(N[g].message),N}if(x&&!A&&te(v)){const{value:M,message:P}=ve(x);if(De(M)&&!v.match(M)&&(N[g]={type:de.pattern,message:P,ref:a,...X(de.pattern,P)},!o))return $(P),N}if(S){if(le(S)){const M=await S(v,t),P=Xt(M,z);if(P&&(N[g]={...P,...X(de.validate,P.message)},!o))return $(P.message),N}else if(Z(S)){let M={};for(const P in S){if(!Y(M)&&!o)break;const T=Xt(await S[P](v,t),z,P);T&&(M={...T,...X(P,T.message)},$(T.message),o&&(N[g]=M))}if(!Y(M)&&(N[g]={ref:z,...M},!o))return N}}return $(!0),N};const io={mode:ne.onSubmit,reValidateMode:ne.onChange,shouldFocusError:!0};function co(e={}){let r={...io,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:le(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},o={},s=Z(r.defaultValues)||Z(r.values)?K(r.defaultValues||r.values)||{}:{},n=r.shouldUnregister?{}:K(s),a={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},y,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...d};const m={array:At(),state:At()},x=r.criteriaMode===ne.all,S=i=>f=>{clearTimeout(c),c=setTimeout(i,f)},g=async i=>{if(!r.disabled&&(d.isValid||h.isValid||i)){const f=r.resolver?Y((await B()).errors):await A(o,!0);f!==t.isValid&&m.state.next({isValid:f})}},C=(i,f)=>{!r.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((i||Array.from(l.mount)).forEach(_=>{_&&(f?I(t.validatingFields,_,f):Q(t.validatingFields,_))}),m.state.next({validatingFields:t.validatingFields,isValidating:!Y(t.validatingFields)}))},V=(i,f=[],_,F,k=!0,b=!0)=>{if(F&&_&&!r.disabled){if(a.action=!0,b&&Array.isArray(w(o,i))){const L=_(w(o,i),F.argA,F.argB);k&&I(o,i,L)}if(b&&Array.isArray(w(t.errors,i))){const L=_(w(t.errors,i),F.argA,F.argB);k&&I(t.errors,i,L),ao(t.errors,i)}if((d.touchedFields||h.touchedFields)&&b&&Array.isArray(w(t.touchedFields,i))){const L=_(w(t.touchedFields,i),F.argA,F.argB);k&&I(t.touchedFields,i,L)}(d.dirtyFields||h.dirtyFields)&&(t.dirtyFields=ge(s,n)),m.state.next({name:i,isDirty:G(i,f),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else I(n,i,f)},v=(i,f)=>{I(t.errors,i,f),m.state.next({errors:t.errors})},z=i=>{t.errors=i,m.state.next({errors:t.errors,isValid:!1})},$=(i,f,_,F)=>{const k=w(o,i);if(k){const b=w(n,i,U(_)?w(s,i):_);U(b)||F&&F.defaultChecked||f?I(n,i,f?b:qt(k._f)):T(i,b),a.mount&&g()}},N=(i,f,_,F,k)=>{let b=!1,L=!1;const j={name:i};if(!r.disabled){if(!_||F){(d.isDirty||h.isDirty)&&(L=t.isDirty,t.isDirty=j.isDirty=G(),b=L!==j.isDirty);const W=ae(w(s,i),f);L=!!w(t.dirtyFields,i),W?Q(t.dirtyFields,i):I(t.dirtyFields,i,!0),j.dirtyFields=t.dirtyFields,b=b||(d.dirtyFields||h.dirtyFields)&&L!==!W}if(_){const W=w(t.touchedFields,i);W||(I(t.touchedFields,i,_),j.touchedFields=t.touchedFields,b=b||(d.touchedFields||h.touchedFields)&&W!==_)}b&&k&&m.state.next(j)}return b?j:{}},D=(i,f,_,F)=>{const k=w(t.errors,i),b=(d.isValid||h.isValid)&&ee(f)&&t.isValid!==f;if(r.delayError&&_?(y=S(()=>v(i,_)),y(r.delayError)):(clearTimeout(c),y=null,_?I(t.errors,i,_):Q(t.errors,i)),(_?!ae(k,_):k)||!Y(F)||b){const L={...F,...b&&ee(f)?{isValid:f}:{},errors:t.errors,name:i};t={...t,...L},m.state.next(L)}},B=async i=>{C(i,!0);const f=await r.resolver(n,r.context,eo(i||l.mount,o,r.criteriaMode,r.shouldUseNativeValidation));return C(i),f},q=async i=>{const{errors:f}=await B(i);if(i)for(const _ of i){const F=w(f,_);F?I(t.errors,_,F):Q(t.errors,_)}else t.errors=f;return f},A=async(i,f,_={valid:!0})=>{for(const F in i){const k=i[F];if(k){const{_f:b,...L}=k;if(b){const j=l.array.has(b.name),W=k._f&&to(k._f);W&&d.validatingFields&&C([b.name],!0);const se=await Jt(k,l.disabled,n,x,r.shouldUseNativeValidation&&!f,j);if(W&&d.validatingFields&&C([b.name]),se[b.name]&&(_.valid=!1,f))break;!f&&(w(se,b.name)?j?lo(t.errors,se,b.name):I(t.errors,b.name,se[b.name]):Q(t.errors,b.name))}!Y(L)&&await A(L,f,_)}}return _.valid},X=()=>{for(const i of l.unMount){const f=w(o,i);f&&(f._f.refs?f._f.refs.every(_=>!rt(_)):!rt(f._f.ref))&&gt(i)}l.unMount=new Set},G=(i,f)=>!r.disabled&&(i&&f&&I(n,i,f),!ae(Te(),s)),M=(i,f,_)=>Je(i,l,{...a.mount?n:U(f)?s:te(i)?{[i]:f}:f},_,f),P=i=>Ze(w(a.mount?n:s,i,r.shouldUnregister?w(s,i,[]):[])),T=(i,f,_={})=>{const F=w(o,i);let k=f;if(F){const b=F._f;b&&(!b.disabled&&I(n,i,jt(f,b)),k=Be(b.ref)&&R(f)?"":f,Dt(b.ref)?[...b.ref.options].forEach(L=>L.selected=k.includes(L.value)):b.refs?Ce(b.ref)?b.refs.forEach(L=>{(!L.defaultChecked||!L.disabled)&&(Array.isArray(k)?L.checked=!!k.find(j=>j===L.value):L.checked=k===L.value||!!k)}):b.refs.forEach(L=>L.checked=L.value===k):et(b.ref)?b.ref.value="":(b.ref.value=k,b.ref.type||m.state.next({name:i,values:K(n)})))}(_.shouldDirty||_.shouldTouch)&&N(i,k,_.shouldTouch,_.shouldDirty,!0),_.shouldValidate&&we(i)},H=(i,f,_)=>{for(const F in f){if(!f.hasOwnProperty(F))return;const k=f[F],b=i+"."+F,L=w(o,b);(l.array.has(i)||Z(k)||L&&!L._f)&&!me(k)?H(b,k,_):T(b,k,_)}},J=(i,f,_={})=>{const F=w(o,i),k=l.array.has(i),b=K(f);I(n,i,b),k?(m.array.next({name:i,values:K(n)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&_.shouldDirty&&m.state.next({name:i,dirtyFields:ge(s,n),isDirty:G(i,b)})):F&&!F._f&&!R(b)?H(i,b,_):T(i,b,_),Qt(i,l)&&m.state.next({...t,name:i}),m.state.next({name:a.mount?i:void 0,values:K(n)})},re=async i=>{a.mount=!0;const f=i.target;let _=f.name,F=!0;const k=w(o,_),b=W=>{F=Number.isNaN(W)||me(W)&&isNaN(W.getTime())||ae(W,w(n,_,W))},L=Gt(r.mode),j=Gt(r.reValidateMode);if(k){let W,se;const He=f.type?qt(k._f):Nt(i),ye=i.type===Ae.BLUR||i.type===Ae.FOCUS_OUT,vs=!ro(k._f)&&!r.resolver&&!w(t.errors,_)&&!k._f.deps||no(ye,w(t.touchedFields,_),t.isSubmitted,j,L),St=Qt(_,l,ye);I(n,_,He),ye?(!f||!f.readOnly)&&(k._f.onBlur&&k._f.onBlur(i),y&&y(0)):k._f.onChange&&k._f.onChange(i);const kt=N(_,He,ye),bs=!Y(kt)||St;if(!ye&&m.state.next({name:_,type:i.type,values:K(n)}),vs)return(d.isValid||h.isValid)&&(r.mode==="onBlur"?ye&&g():ye||g()),bs&&m.state.next({name:_,...St?{}:kt});if(!ye&&St&&m.state.next({...t}),r.resolver){const{errors:Ar}=await B([_]);if(b(He),F){const Ss=Kt(t.errors,o,_),Br=Kt(Ar,o,Ss.name||_);W=Br.error,_=Br.name,se=Y(Ar)}}else C([_],!0),W=(await Jt(k,l.disabled,n,x,r.shouldUseNativeValidation))[_],C([_]),b(He),F&&(W?se=!1:(d.isValid||h.isValid)&&(se=await A(o,!0)));F&&(k._f.deps&&(!Array.isArray(k._f.deps)||k._f.deps.length>0)&&we(k._f.deps),D(_,se,W,kt))}},fe=(i,f)=>{if(w(t.errors,f)&&i.focus)return i.focus(),1},we=async(i,f={})=>{let _,F;const k=Fe(i);if(r.resolver){const b=await q(U(i)?i:k);_=Y(b),F=i?!k.some(L=>w(b,L)):_}else i?(F=(await Promise.all(k.map(async b=>{const L=w(o,b);return await A(L&&L._f?{[b]:L}:L)}))).every(Boolean),!(!F&&!t.isValid)&&g()):F=_=await A(o);return m.state.next({...!te(i)||(d.isValid||h.isValid)&&_!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:_}:{},errors:t.errors}),f.shouldFocus&&!F&&ze(o,fe,i?k:l.mount),F},Te=(i,f)=>{let _={...a.mount?n:s};return f&&(_=Bt(f.dirtyFields?t.dirtyFields:t.touchedFields,_)),U(i)?_:te(i)?w(_,i):i.map(F=>w(_,F))},zr=(i,f)=>({invalid:!!w((f||t).errors,i),isDirty:!!w((f||t).dirtyFields,i),error:w((f||t).errors,i),isValidating:!!w(t.validatingFields,i),isTouched:!!w((f||t).touchedFields,i)}),fs=i=>{i&&Fe(i).forEach(f=>Q(t.errors,f)),m.state.next({errors:i?t.errors:{}})},Vr=(i,f,_)=>{const F=(w(o,i,{_f:{}})._f||{}).ref,k=w(t.errors,i)||{},{ref:b,message:L,type:j,...W}=k;I(t.errors,i,{...W,...f,ref:F}),m.state.next({name:i,errors:t.errors,isValid:!1}),_&&_.shouldFocus&&F&&F.focus&&F.focus()},ys=(i,f)=>le(i)?m.state.subscribe({next:_=>"values"in _&&i(M(void 0,f),_)}):M(i,f,!0),$r=i=>m.state.subscribe({next:f=>{so(i.name,f.name,i.exact)&&oo(f,i.formState||d,gs,i.reRenderRoot)&&i.callback({values:{...n},...t,...f,defaultValues:s})}}).unsubscribe,ms=i=>(a.mount=!0,h={...h,...i.formState},$r({...i,formState:h})),gt=(i,f={})=>{for(const _ of i?Fe(i):l.mount)l.mount.delete(_),l.array.delete(_),f.keepValue||(Q(o,_),Q(n,_)),!f.keepError&&Q(t.errors,_),!f.keepDirty&&Q(t.dirtyFields,_),!f.keepTouched&&Q(t.touchedFields,_),!f.keepIsValidating&&Q(t.validatingFields,_),!r.shouldUnregister&&!f.keepDefaultValue&&Q(s,_);m.state.next({values:K(n)}),m.state.next({...t,...f.keepDirty?{isDirty:G()}:{}}),!f.keepIsValid&&g()},Er=({disabled:i,name:f})=>{(ee(i)&&a.mount||i||l.disabled.has(f))&&(i?l.disabled.add(f):l.disabled.delete(f))},vt=(i,f={})=>{let _=w(o,i);const F=ee(f.disabled)||ee(r.disabled);return I(o,i,{..._||{},_f:{..._&&_._f?_._f:{ref:{name:i}},name:i,mount:!0,...f}}),l.mount.add(i),_?Er({disabled:ee(f.disabled)?f.disabled:r.disabled,name:i}):$(i,!0,f.value),{...F?{disabled:f.disabled||r.disabled}:{},...r.progressive?{required:!!f.required,min:xe(f.min),max:xe(f.max),minLength:xe(f.minLength),maxLength:xe(f.maxLength),pattern:xe(f.pattern)}:{},name:i,onChange:re,onBlur:re,ref:k=>{if(k){vt(i,f),_=w(o,i);const b=U(k.value)&&k.querySelectorAll&&k.querySelectorAll("input,select,textarea")[0]||k,L=Xr(b),j=_._f.refs||[];if(L?j.find(W=>W===b):b===_._f.ref)return;I(o,i,{_f:{..._._f,...L?{refs:[...j.filter(rt),b,...Array.isArray(w(s,i))?[{}]:[]],ref:{type:b.type,name:i}}:{ref:b}}}),$(i,!1,void 0,b)}else _=w(o,i,{}),_._f&&(_._f.mount=!1),(r.shouldUnregister||f.shouldUnregister)&&!(Lt(l.array,i)&&a.action)&&l.unMount.add(i)}}},bt=()=>r.shouldFocusError&&ze(o,fe,l.mount),hs=i=>{ee(i)&&(m.state.next({disabled:i}),ze(o,(f,_)=>{const F=w(o,_);F&&(f.disabled=F._f.disabled||i,Array.isArray(F._f.refs)&&F._f.refs.forEach(k=>{k.disabled=F._f.disabled||i}))},0,!1))},Nr=(i,f)=>async _=>{let F;_&&(_.preventDefault&&_.preventDefault(),_.persist&&_.persist());let k=K(n);if(m.state.next({isSubmitting:!0}),r.resolver){const{errors:b,values:L}=await B();t.errors=b,k=K(L)}else await A(o);if(l.disabled.size)for(const b of l.disabled)Q(k,b);if(Q(t.errors,"root"),Y(t.errors)){m.state.next({errors:{}});try{await i(k,_)}catch(b){F=b}}else f&&await f({...t.errors},_),bt(),setTimeout(bt);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Y(t.errors)&&!F,submitCount:t.submitCount+1,errors:t.errors}),F)throw F},_s=(i,f={})=>{w(o,i)&&(U(f.defaultValue)?J(i,K(w(s,i))):(J(i,f.defaultValue),I(s,i,K(f.defaultValue))),f.keepTouched||Q(t.touchedFields,i),f.keepDirty||(Q(t.dirtyFields,i),t.isDirty=f.defaultValue?G(i,K(w(s,i))):G()),f.keepError||(Q(t.errors,i),d.isValid&&g()),m.state.next({...t}))},Lr=(i,f={})=>{const _=i?K(i):s,F=K(_),k=Y(i),b=k?s:F;if(f.keepDefaultValues||(s=_),!f.keepValues){if(f.keepDirtyValues){const L=new Set([...l.mount,...Object.keys(ge(s,n))]);for(const j of Array.from(L))w(t.dirtyFields,j)?I(b,j,w(n,j)):J(j,w(b,j))}else{if(Ge&&U(i))for(const L of l.mount){const j=w(o,L);if(j&&j._f){const W=Array.isArray(j._f.refs)?j._f.refs[0]:j._f.ref;if(Be(W)){const se=W.closest("form");if(se){se.reset();break}}}}if(f.keepFieldsRef)for(const L of l.mount)J(L,w(b,L));else o={}}n=r.shouldUnregister?f.keepDefaultValues?K(s):{}:K(b),m.array.next({values:{...b}}),m.state.next({values:{...b}})}l={mount:f.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!f.keepIsValid||!!f.keepDirtyValues||!r.shouldUnregister&&!Y(b),a.watch=!!r.shouldUnregister,m.state.next({submitCount:f.keepSubmitCount?t.submitCount:0,isDirty:k?!1:f.keepDirty?t.isDirty:!!(f.keepDefaultValues&&!ae(i,s)),isSubmitted:f.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:k?{}:f.keepDirtyValues?f.keepDefaultValues&&n?ge(s,n):t.dirtyFields:f.keepDefaultValues&&i?ge(s,i):f.keepDirty?t.dirtyFields:{},touchedFields:f.keepTouched?t.touchedFields:{},errors:f.keepErrors?t.errors:{},isSubmitSuccessful:f.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:s})},Mr=(i,f)=>Lr(le(i)?i(n):i,f),ps=(i,f={})=>{const _=w(o,i),F=_&&_._f;if(F){const k=F.refs?F.refs[0]:F.ref;k.focus&&(k.focus(),f.shouldSelect&&le(k.select)&&k.select())}},gs=i=>{t={...t,...i}},Pr={control:{register:vt,unregister:gt,getFieldState:zr,handleSubmit:Nr,setError:Vr,_subscribe:$r,_runSchema:B,_focusError:bt,_getWatch:M,_getDirty:G,_setValid:g,_setFieldArray:V,_setDisabledField:Er,_setErrors:z,_getFieldArray:P,_reset:Lr,_resetDefaultValues:()=>le(r.defaultValues)&&r.defaultValues().then(i=>{Mr(i,r.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:X,_disableForm:hs,_subjects:m,_proxyFormState:d,get _fields(){return o},get _formValues(){return n},get _state(){return a},set _state(i){a=i},get _defaultValues(){return s},get _names(){return l},set _names(i){l=i},get _formState(){return t},get _options(){return r},set _options(i){r={...r,...i}}},subscribe:ms,trigger:we,register:vt,handleSubmit:Nr,watch:ys,setValue:J,getValues:Te,reset:Mr,resetField:_s,clearErrors:fs,unregister:gt,setError:Vr,setFocus:ps,getFieldState:zr};return{...Pr,formControl:Pr}}function uo(e={}){const r=p.useRef(void 0),t=p.useRef(void 0),[o,s]=p.useState({isDirty:!1,isValidating:!1,isLoading:le(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:le(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:o},e.defaultValues&&!le(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...l}=co(e);r.current={...l,formState:o}}const n=r.current.control;return n._options=e,Xe(()=>{const a=n._subscribe({formState:n._proxyFormState,callback:()=>s({...n._formState}),reRenderRoot:!0});return s(l=>({...l,isReady:!0})),n._formState.isReady=!0,a},[n]),p.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),p.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),p.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),p.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),p.useEffect(()=>{if(n._proxyFormState.isDirty){const a=n._getDirty();a!==o.isDirty&&n._subjects.state.next({isDirty:a})}},[n,o.isDirty]),p.useEffect(()=>{e.values&&!ae(e.values,t.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),t.current=e.values,s(a=>({...a}))):n._resetDefaultValues()},[n,e.values]),p.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),r.current.formState=Pt(o,n),r.current}const Yt=(e,r,t)=>{if(e&&"reportValidity"in e){const o=w(t,r);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},st=(e,r)=>{for(const t in r.fields){const o=r.fields[t];o&&o.ref&&"reportValidity"in o.ref?Yt(o.ref,t,e):o&&o.refs&&o.refs.forEach(s=>Yt(s,t,e))}},Rt=(e,r)=>{r.shouldUseNativeValidation&&st(e,r);const t={};for(const o in e){const s=w(r.fields,o),n=Object.assign(e[o]||{},{ref:s&&s.ref});if(fo(r.names||Object.keys(e),o)){const a=Object.assign({},w(t,o));I(a,"root",n),I(t,o,a)}else I(t,o,n)}return t},fo=(e,r)=>{const t=er(r);return e.some(o=>er(o).match(`^${t}\\.\\d+`))};function er(e){return e.replace(/\]|\[/g,"")}function tr(e,r,t){function o(l,y){var c;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(c=l._zod).traits??(c.traits=new Set),l._zod.traits.add(e),r(l,y);for(const d in a.prototype)d in l||Object.defineProperty(l,d,{value:a.prototype[d].bind(l)});l._zod.constr=a,l._zod.def=y}const s=(t==null?void 0:t.Parent)??Object;class n extends s{}Object.defineProperty(n,"name",{value:e});function a(l){var y;const c=t!=null&&t.Parent?new n:this;o(c,l),(y=c._zod).deferred??(y.deferred=[]);for(const d of c._zod.deferred)d();return c}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:l=>{var y,c;return t!=null&&t.Parent&&l instanceof t.Parent?!0:(c=(y=l==null?void 0:l._zod)==null?void 0:y.traits)==null?void 0:c.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}class yo extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const mo={};function rr(e){return mo}function ho(e,r){return typeof r=="bigint"?r.toString():r}const or="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Oe(e){return typeof e=="string"?e:e==null?void 0:e.message}function sr(e,r,t){var s,n,a,l,y,c;const o={...e,path:e.path??[]};if(!e.message){const d=Oe((a=(n=(s=e.inst)==null?void 0:s._zod.def)==null?void 0:n.error)==null?void 0:a.call(n,e))??Oe((l=r==null?void 0:r.error)==null?void 0:l.call(r,e))??Oe((y=t.customError)==null?void 0:y.call(t,e))??Oe((c=t.localeError)==null?void 0:c.call(t,e))??"Invalid input";o.message=d}return delete o.inst,delete o.continue,r!=null&&r.reportInput||delete o.input,o}const nr=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,ho,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},_o=tr("$ZodError",nr),ar=tr("$ZodError",nr,{Parent:Error}),po=(e=>(r,t,o,s)=>{const n=o?Object.assign(o,{async:!1}):{async:!1},a=r._zod.run({value:t,issues:[]},n);if(a instanceof Promise)throw new yo;if(a.issues.length){const l=new((s==null?void 0:s.Err)??e)(a.issues.map(y=>sr(y,n,rr())));throw or(l,s==null?void 0:s.callee),l}return a.value})(ar),go=(e=>async(r,t,o,s)=>{const n=o?Object.assign(o,{async:!0}):{async:!0};let a=r._zod.run({value:t,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){const l=new((s==null?void 0:s.Err)??e)(a.issues.map(y=>sr(y,n,rr())));throw or(l,s==null?void 0:s.callee),l}return a.value})(ar);function lr(e,r){try{var t=e()}catch(o){return r(o)}return t&&t.then?t.then(void 0,r):t}function vo(e,r){for(var t={};e.length;){var o=e[0],s=o.code,n=o.message,a=o.path.join(".");if(!t[a])if("unionErrors"in o){var l=o.unionErrors[0].errors[0];t[a]={message:l.message,type:l.code}}else t[a]={message:n,type:s};if("unionErrors"in o&&o.unionErrors.forEach(function(d){return d.errors.forEach(function(h){return e.push(h)})}),r){var y=t[a].types,c=y&&y[o.code];t[a]=Re(a,r,t,s,c?[].concat(c,o.message):o.message)}e.shift()}return t}function bo(e,r){for(var t={};e.length;){var o=e[0],s=o.code,n=o.message,a=o.path.join(".");if(!t[a])if(o.code==="invalid_union"&&o.errors.length>0){var l=o.errors[0][0];t[a]={message:l.message,type:l.code}}else t[a]={message:n,type:s};if(o.code==="invalid_union"&&o.errors.forEach(function(d){return d.forEach(function(h){return e.push(h)})}),r){var y=t[a].types,c=y&&y[o.code];t[a]=Re(a,r,t,s,c?[].concat(c,o.message):o.message)}e.shift()}return t}function So(e,r,t){if(t===void 0&&(t={}),(function(o){return"_def"in o&&typeof o._def=="object"&&"typeName"in o._def})(e))return function(o,s,n){try{return Promise.resolve(lr(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](o,r)).then(function(a){return n.shouldUseNativeValidation&&st({},n),{errors:{},values:t.raw?Object.assign({},o):a}})},function(a){if((function(l){return Array.isArray(l==null?void 0:l.issues)})(a))return{values:{},errors:Rt(vo(a.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw a}))}catch(a){return Promise.reject(a)}};if((function(o){return"_zod"in o&&typeof o._zod=="object"})(e))return function(o,s,n){try{return Promise.resolve(lr(function(){return Promise.resolve((t.mode==="sync"?po:go)(e,o,r)).then(function(a){return n.shouldUseNativeValidation&&st({},n),{errors:{},values:t.raw?Object.assign({},o):a}})},function(a){if((function(l){return l instanceof _o})(a))return{values:{},errors:Rt(bo(a.issues,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}const ir=p.createContext(null);function cr(){const e=p.useContext(ir);if(!e)throw new Error("useFormContext must be used within a Form component");return e}function ko({onSubmit:e,children:r,schema:t,defaultValues:o,mode:s="onSubmit",reValidateMode:n="onChange",className:a,style:l,formProps:y}){const c=uo({resolver:t?So(t):void 0,defaultValues:o,mode:s,reValidateMode:n}),d=c.handleSubmit(e);return u.jsx(ir.Provider,{value:c,children:u.jsx("form",{...y,className:a,style:l,onSubmit:d,children:typeof r=="function"?r(c):r})})}const wo=ko,Co={formError:"FormError-module__formError___kaUBn"},dr=({color:e,children:r,className:t,style:o,divProps:s})=>{const n=O(),a={"--form-error-margin-top":`calc(${n.fonts.rhythm} * 0.17)`,color:e||n.colors.error,...o},l=[Co.formError,t].filter(Boolean).join(" ");return u.jsx("div",{...s,className:l,style:a,role:"alert","aria-live":"polite",children:r})},be={formGroup:"FormGroup-module__formGroup___aVI-B",inputWrapper:"FormGroup-module__inputWrapper___429QE",indented:"FormGroup-module__indented___t61iz",disabled:"FormGroup-module__disabled___W-tJ0",required:"FormGroup-module__required___mO3xA"},ur=({disabled:e=!1,error:r=!1,required:t=!1,indent:o=!1,name:s,label:n,errorMessage:a,labelProps:l,children:y,className:c,style:d,divProps:h})=>{const m=O(),x=[be.formGroup,r?be.error:"",e?be.disabled:"",c].filter(Boolean).join(" "),S={"--form-group-margin-bottom":`calc(${m.fonts.rhythm} * 0.35)`,...d},g=p.Children.map(y,C=>{if(p.isValidElement(C)){const V={};if(e&&C.props.disabled===void 0&&(V.disabled=!0),r&&C.props.error===void 0&&(V.error=!0),s&&C.props.id===void 0&&C.type!==p.Fragment&&(V.id=s),Object.keys(V).length>0)return p.cloneElement(C,V)}return C});return u.jsxs("div",{...h,className:x,style:S,children:[n&&u.jsxs(Le,{htmlFor:s,disabled:e,error:r,...l,children:[n,t&&u.jsxs("span",{className:be.required,"aria-label":"required",children:[" ","*"]})]}),u.jsx("div",{className:`${be.inputWrapper} ${o?be.indented:""}`,children:g}),r&&a&&u.jsx(dr,{children:a})]})};function ue({name:e,label:r,required:t,children:o,rules:s,disabled:n,className:a,style:l,indent:y,labelProps:c}){const{control:d}=cr(),{field:h,fieldState:{error:m}}=Kr({name:e,control:d,rules:s});return u.jsx(ur,{label:r,name:e,error:!!m,errorMessage:m==null?void 0:m.message,disabled:n,required:t,className:a,style:l,indent:y,labelProps:c,children:o({value:h.value,onChange:h.onChange,onBlur:h.onBlur,name:h.name,error:!!m,indent:y})})}const nt={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeLarge:"Input-module__sizeLarge___4Boj3"},Fo=({color:e="#000",disabled:r=!1,fontSize:t="1em",placeholderOpacity:o=.3})=>({borderColor:e,color:e,fontSize:t,opacity:r?.3:1,placeholderOpacity:o}),fr=({disabled:e=!1,error:r=!1,color:t,size:o="large",id:s,name:n="",placeholder:a,placeholderOpacity:l=.3,type:y="text",value:c="",onChange:d,onBlur:h,className:m,style:x,inputProps:S})=>{const g=O(),C=g.colors.error,V=r?C:t||g.colors.primary,v=Fo({color:V,disabled:e,placeholderOpacity:l}),z={"--placeholder-opacity":v.placeholderOpacity,"--input-padding-small":`calc(${g.fonts.rhythm} * ${g.sizes.small.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,"--input-padding-large":`calc(${g.fonts.rhythm} * ${g.sizes.large.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,borderColor:v.borderColor,borderWidth:g.border.width,borderRadius:g.border.radius,color:v.color,fontSize:v.fontSize,opacity:v.opacity,...x},$=[nt.input,o==="small"?nt.sizeSmall:nt.sizeLarge,m].filter(Boolean).join(" ");return u.jsx("input",{...S,className:$,disabled:e,id:s,name:n,onChange:d,onBlur:h,placeholder:a,type:y,value:c,style:z})};function xo({name:e,label:r,required:t,rules:o,disabled:s,className:n,style:a,...l}){return u.jsx(ue,{name:e,label:r,required:t,rules:o,disabled:s,className:n,style:a,children:({value:y,onChange:c,onBlur:d,name:h,error:m})=>u.jsx(fr,{...l,name:h,value:y||"",onChange:x=>c(x.target.value),onBlur:d,error:m})})}const at={textarea:"Textarea-module__textarea___Z-y6g",sizeSmall:"Textarea-module__sizeSmall___HHFEM",sizeLarge:"Textarea-module__sizeLarge___5a3sf"},zo=({color:e="#000",disabled:r=!1,placeholderOpacity:t=.3})=>({color:e,borderColor:e,opacity:r?.3:1,placeholderOpacity:t}),yr=({disabled:e=!1,error:r=!1,color:t,size:o="large",id:s,name:n="",placeholder:a,placeholderOpacity:l=.3,rows:y=3,value:c="",onChange:d,onBlur:h,className:m,style:x,textareaProps:S})=>{const g=O(),C=g.colors.error,V=r?C:t||g.colors.primary,v=zo({color:V,disabled:e,placeholderOpacity:l}),z={"--placeholder-opacity":v.placeholderOpacity,"--textarea-padding-small":`calc(${g.fonts.rhythm} * ${g.sizes.small.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,"--textarea-padding-large":`calc(${g.fonts.rhythm} * ${g.sizes.large.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,borderColor:v.borderColor,borderWidth:g.border.width,borderRadius:g.border.radius,color:v.color,fontSize:"1em",opacity:v.opacity,...x},$=[at.textarea,o==="small"?at.sizeSmall:at.sizeLarge,m].filter(Boolean).join(" ");return u.jsx("textarea",{...S,className:$,disabled:e,id:s,name:n,onChange:d,onBlur:h,placeholder:a,rows:y,value:c,style:z})};function Vo({name:e,label:r,required:t,rules:o,disabled:s,className:n,style:a,...l}){return u.jsx(ue,{name:e,label:r,required:t,rules:o,disabled:s,className:n,style:a,children:({value:y,onChange:c,onBlur:d,name:h,error:m})=>u.jsx(yr,{...l,name:h,value:y||"",onChange:x=>c(x.target.value),onBlur:d,error:m})})}const lt={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeLarge:"Select-module__sizeLarge___eBA1T"},$o=({color:e="#000",disabled:r=!1})=>({color:e,borderColor:e,cursor:r?"default":"pointer",opacity:r?.3:1,backgroundImage:(n=>{const a=`
21
+ `,()=>{const o=document.getElementById(r);o&&document.head.removeChild(o)}},[e]),null};var Ce=e=>e.type==="checkbox",me=e=>e instanceof Date,R=e=>e==null;const Et=e=>typeof e=="object";var Z=e=>!R(e)&&!Array.isArray(e)&&Et(e)&&!me(e),Nt=e=>Z(e)&&e.target?Ce(e.target)?e.target.checked:e.target.value:e,Gr=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Lt=(e,r)=>e.has(Gr(r)),Zr=e=>{const r=e.constructor&&e.constructor.prototype;return Z(r)&&r.hasOwnProperty("isPrototypeOf")},Ge=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function K(e){let r;const t=Array.isArray(e),o=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(!(Ge&&(e instanceof Blob||o))&&(t||Z(e)))if(r=t?[]:Object.create(Object.getPrototypeOf(e)),!t&&!Zr(e))r=e;else for(const s in e)e.hasOwnProperty(s)&&(r[s]=K(e[s]));else return e;return r}var Be=e=>/^\w*$/.test(e),U=e=>e===void 0,Ze=e=>Array.isArray(e)?e.filter(Boolean):[],Qe=e=>Ze(e.replace(/["|']|\]/g,"").split(/\.|\[/)),w=(e,r,t)=>{if(!r||!Z(e))return t;const o=(Be(r)?[r]:Qe(r)).reduce((s,n)=>R(s)?s:s[n],e);return U(o)||o===e?U(e[r])?t:e[r]:o},ee=e=>typeof e=="boolean",I=(e,r,t)=>{let o=-1;const s=Be(r)?[r]:Qe(r),n=s.length,a=n-1;for(;++o<n;){const l=s[o];let y=t;if(o!==a){const c=e[l];y=Z(c)||Array.isArray(c)?c:isNaN(+s[o+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=y,e=e[l]}};const Ae={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ne={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},de={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Mt=p.createContext(null);Mt.displayName="HookFormContext";const Ke=()=>p.useContext(Mt);var Pt=(e,r,t,o=!0)=>{const s={defaultValues:r._defaultValues};for(const n in e)Object.defineProperty(s,n,{get:()=>{const a=n;return r._proxyFormState[a]!==ne.all&&(r._proxyFormState[a]=!o||ne.all),t&&(t[a]=!0),e[a]}});return s};const Xe=typeof window<"u"?p.useLayoutEffect:p.useEffect;function Qr(e){const r=Ke(),{control:t=r.control,disabled:o,name:s,exact:n}=e||{},[a,l]=p.useState(t._formState),y=p.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Xe(()=>t._subscribe({name:s,formState:y.current,exact:n,callback:c=>{!o&&l({...t._formState,...c})}}),[s,o,n]),p.useEffect(()=>{y.current.isValid&&t._setValid(!0)},[t]),p.useMemo(()=>Pt(a,t,y.current,!1),[a,t])}var te=e=>typeof e=="string",Je=(e,r,t,o,s)=>te(e)?(o&&r.watch.add(e),w(t,e,s)):Array.isArray(e)?e.map(n=>(o&&r.watch.add(n),w(t,n))):(o&&(r.watchAll=!0),t),Ye=e=>R(e)||!Et(e);function ae(e,r,t=new WeakSet){if(Ye(e)||Ye(r))return e===r;if(me(e)&&me(r))return e.getTime()===r.getTime();const o=Object.keys(e),s=Object.keys(r);if(o.length!==s.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const n of o){const a=e[n];if(!s.includes(n))return!1;if(n!=="ref"){const l=r[n];if(me(a)&&me(l)||Z(a)&&Z(l)||Array.isArray(a)&&Array.isArray(l)?!ae(a,l,t):a!==l)return!1}}return!0}function Kr(e){const r=Ke(),{control:t=r.control,name:o,defaultValue:s,disabled:n,exact:a,compute:l}=e||{},y=p.useRef(s),c=p.useRef(l),u=p.useRef(void 0),h=p.useRef(t),m=p.useRef(o);c.current=l;const[x,S]=p.useState(()=>{const $=t._getWatch(o,y.current);return c.current?c.current($):$}),g=p.useCallback($=>{const N=Je(o,t._names,$||t._formValues,!1,y.current);return c.current?c.current(N):N},[t._formValues,t._names,o]),C=p.useCallback($=>{if(!n){const N=Je(o,t._names,$||t._formValues,!1,y.current);if(c.current){const D=c.current(N);ae(D,u.current)||(S(D),u.current=D)}else S(N)}},[t._formValues,t._names,n,o]);Xe(()=>((h.current!==t||!ae(m.current,o))&&(h.current=t,m.current=o,C()),t._subscribe({name:o,formState:{values:!0},exact:a,callback:$=>{C($.values)}})),[t,a,o,C]),p.useEffect(()=>t._removeUnmounted());const V=h.current!==t,v=m.current,z=p.useMemo(()=>{if(n)return null;const $=!V&&!ae(v,o);return V||$?g():null},[n,V,o,v,g]);return z!==null?z:x}function Xr(e){const r=Ke(),{name:t,disabled:o,control:s=r.control,shouldUnregister:n,defaultValue:a}=e,l=Lt(s._names.array,t),y=p.useMemo(()=>w(s._formValues,t,w(s._defaultValues,t,a)),[s,t,a]),c=Kr({control:s,name:t,defaultValue:y,exact:!0}),u=Qr({control:s,name:t,exact:!0}),h=p.useRef(e),m=p.useRef(void 0),x=p.useRef(s.register(t,{...e.rules,value:c,...ee(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const S=p.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!w(u.errors,t)},isDirty:{enumerable:!0,get:()=>!!w(u.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!w(u.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!w(u.validatingFields,t)},error:{enumerable:!0,get:()=>w(u.errors,t)}}),[u,t]),g=p.useCallback(z=>x.current.onChange({target:{value:Nt(z),name:t},type:Ae.CHANGE}),[t]),C=p.useCallback(()=>x.current.onBlur({target:{value:w(s._formValues,t),name:t},type:Ae.BLUR}),[t,s._formValues]),V=p.useCallback(z=>{const $=w(s._fields,t);$&&z&&($._f.ref={focus:()=>z.focus&&z.focus(),select:()=>z.select&&z.select(),setCustomValidity:N=>z.setCustomValidity(N),reportValidity:()=>z.reportValidity()})},[s._fields,t]),v=p.useMemo(()=>({name:t,value:c,...ee(o)||u.disabled?{disabled:u.disabled||o}:{},onChange:g,onBlur:C,ref:V}),[t,o,u.disabled,g,C,V,c]);return p.useEffect(()=>{const z=s._options.shouldUnregister||n,$=m.current;$&&$!==t&&!l&&s.unregister($),s.register(t,{...h.current.rules,...ee(h.current.disabled)?{disabled:h.current.disabled}:{}});const N=(D,A)=>{const q=w(s._fields,D);q&&q._f&&(q._f.mount=A)};if(N(t,!0),z){const D=K(w(s._options.defaultValues,t,h.current.defaultValue));I(s._defaultValues,t,D),U(w(s._formValues,t))&&I(s._formValues,t,D)}return!l&&s.register(t),m.current=t,()=>{(l?z&&!s._state.action:z)?s.unregister(t):N(t,!1)}},[t,s,l,n]),p.useEffect(()=>{s._setDisabledField({disabled:o,name:t})},[o,t,s]),p.useMemo(()=>({field:v,formState:u,fieldState:S}),[v,u,S])}var Re=(e,r,t,o,s)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[o]:s||!0}}:{},Fe=e=>Array.isArray(e)?e:[e],Bt=()=>{let e=[];return{get observers(){return e},next:s=>{for(const n of e)n.next&&n.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(n=>n!==s)}}),unsubscribe:()=>{e=[]}}};function At(e,r){const t={};for(const o in e)if(e.hasOwnProperty(o)){const s=e[o],n=r[o];if(s&&Z(s)&&n){const a=At(s,n);Z(a)&&(t[o]=a)}else e[o]&&(t[o]=n)}return t}var Y=e=>Z(e)&&!Object.keys(e).length,et=e=>e.type==="file",le=e=>typeof e=="function",De=e=>{if(!Ge)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},Dt=e=>e.type==="select-multiple",tt=e=>e.type==="radio",Jr=e=>tt(e)||Ce(e),rt=e=>De(e)&&e.isConnected;function Yr(e,r){const t=r.slice(0,-1).length;let o=0;for(;o<t;)e=U(e)?o++:e[r[o++]];return e}function Rr(e){for(const r in e)if(e.hasOwnProperty(r)&&!U(e[r]))return!1;return!0}function Q(e,r){const t=Array.isArray(r)?r:Be(r)?[r]:Qe(r),o=t.length===1?e:Yr(e,t),s=t.length-1,n=t[s];return o&&delete o[n],s!==0&&(Z(o)&&Y(o)||Array.isArray(o)&&Rr(o))&&Q(e,t.slice(0,-1)),e}var eo=e=>{for(const r in e)if(le(e[r]))return!0;return!1};function Ot(e){return Array.isArray(e)||Z(e)&&!eo(e)}function ot(e,r={}){for(const t in e)Ot(e[t])?(r[t]=Array.isArray(e[t])?[]:{},ot(e[t],r[t])):U(e[t])||(r[t]=!0);return r}function ge(e,r,t){t||(t=ot(r));for(const o in e)Ot(e[o])?U(r)||Ye(t[o])?t[o]=ot(e[o],Array.isArray(e[o])?[]:{}):ge(e[o],R(r)?{}:r[o],t[o]):t[o]=!ae(e[o],r[o]);return t}const It={value:!1,isValid:!1},Tt={value:!0,isValid:!0};var Ht=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!U(e[0].attributes.value)?U(e[0].value)||e[0].value===""?Tt:{value:e[0].value,isValid:!0}:Tt:It}return It},jt=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:o})=>U(e)?e:r?e===""?NaN:e&&+e:t&&te(e)?new Date(e):o?o(e):e;const Wt={isValid:!1,value:null};var Ut=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,Wt):Wt;function qt(e){const r=e.ref;return et(r)?r.files:tt(r)?Ut(e.refs).value:Dt(r)?[...r.selectedOptions].map(({value:t})=>t):Ce(r)?Ht(e.refs).value:jt(U(r.value)?e.ref.value:r.value,e)}var to=(e,r,t,o)=>{const s={};for(const n of e){const a=w(r,n);a&&I(s,n,a._f)}return{criteriaMode:t,names:[...e],fields:s,shouldUseNativeValidation:o}},Oe=e=>e instanceof RegExp,xe=e=>U(e)?e:Oe(e)?e.source:Z(e)?Oe(e.value)?e.value.source:e.value:e,Gt=e=>({isOnSubmit:!e||e===ne.onSubmit,isOnBlur:e===ne.onBlur,isOnChange:e===ne.onChange,isOnAll:e===ne.all,isOnTouch:e===ne.onTouched});const Zt="AsyncFunction";var ro=e=>!!e&&!!e.validate&&!!(le(e.validate)&&e.validate.constructor.name===Zt||Z(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===Zt)),oo=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Qt=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(o=>e.startsWith(o)&&/^\.\w+/.test(e.slice(o.length))));const ze=(e,r,t,o)=>{for(const s of t||Object.keys(e)){const n=w(e,s);if(n){const{_f:a,...l}=n;if(a){if(a.refs&&a.refs[0]&&r(a.refs[0],s)&&!o)return!0;if(a.ref&&r(a.ref,a.name)&&!o)return!0;if(ze(l,r))break}else if(Z(l)&&ze(l,r))break}}};function Kt(e,r,t){const o=w(e,t);if(o||Be(t))return{error:o,name:t};const s=t.split(".");for(;s.length;){const n=s.join("."),a=w(r,n),l=w(e,n);if(a&&!Array.isArray(a)&&t!==n)return{name:t};if(l&&l.type)return{name:n,error:l};if(l&&l.root&&l.root.type)return{name:`${n}.root`,error:l.root};s.pop()}return{name:t}}var so=(e,r,t,o)=>{t(e);const{name:s,...n}=e;return Y(n)||Object.keys(n).length>=Object.keys(r).length||Object.keys(n).find(a=>r[a]===(!o||ne.all))},no=(e,r,t)=>!e||!r||e===r||Fe(e).some(o=>o&&(t?o===r:o.startsWith(r)||r.startsWith(o))),ao=(e,r,t,o,s)=>s.isOnAll?!1:!t&&s.isOnTouch?!(r||e):(t?o.isOnBlur:s.isOnBlur)?!e:(t?o.isOnChange:s.isOnChange)?e:!0,lo=(e,r)=>!Ze(w(e,r)).length&&Q(e,r),io=(e,r,t)=>{const o=Fe(w(e,t));return I(o,"root",r[t]),I(e,t,o),e};function Xt(e,r,t="validate"){if(te(e)||Array.isArray(e)&&e.every(te)||ee(e)&&!e)return{type:t,message:te(e)?e:"",ref:r}}var ve=e=>Z(e)&&!Oe(e)?e:{value:e,message:""},Jt=async(e,r,t,o,s,n)=>{const{ref:a,refs:l,required:y,maxLength:c,minLength:u,min:h,max:m,pattern:x,validate:S,name:g,valueAsNumber:C,mount:V}=e._f,v=w(t,g);if(!V||r.has(g))return{};const z=l?l[0]:a,$=M=>{s&&z.reportValidity&&(z.setCustomValidity(ee(M)?"":M||""),z.reportValidity())},N={},D=tt(a),A=Ce(a),q=D||A,B=(C||et(a))&&U(a.value)&&U(v)||De(a)&&a.value===""||v===""||Array.isArray(v)&&!v.length,X=Re.bind(null,g,o,N),G=(M,P,T,H=de.maxLength,J=de.minLength)=>{const re=M?P:T;N[g]={type:M?H:J,message:re,ref:a,...X(M?H:J,re)}};if(n?!Array.isArray(v)||!v.length:y&&(!q&&(B||R(v))||ee(v)&&!v||A&&!Ht(l).isValid||D&&!Ut(l).isValid)){const{value:M,message:P}=te(y)?{value:!!y,message:y}:ve(y);if(M&&(N[g]={type:de.required,message:P,ref:z,...X(de.required,P)},!o))return $(P),N}if(!B&&(!R(h)||!R(m))){let M,P;const T=ve(m),H=ve(h);if(!R(v)&&!isNaN(v)){const J=a.valueAsNumber||v&&+v;R(T.value)||(M=J>T.value),R(H.value)||(P=J<H.value)}else{const J=a.valueAsDate||new Date(v),re=He=>new Date(new Date().toDateString()+" "+He),fe=a.type=="time",we=a.type=="week";te(T.value)&&v&&(M=fe?re(v)>re(T.value):we?v>T.value:J>new Date(T.value)),te(H.value)&&v&&(P=fe?re(v)<re(H.value):we?v<H.value:J<new Date(H.value))}if((M||P)&&(G(!!M,T.message,H.message,de.max,de.min),!o))return $(N[g].message),N}if((c||u)&&!B&&(te(v)||n&&Array.isArray(v))){const M=ve(c),P=ve(u),T=!R(M.value)&&v.length>+M.value,H=!R(P.value)&&v.length<+P.value;if((T||H)&&(G(T,M.message,P.message),!o))return $(N[g].message),N}if(x&&!B&&te(v)){const{value:M,message:P}=ve(x);if(Oe(M)&&!v.match(M)&&(N[g]={type:de.pattern,message:P,ref:a,...X(de.pattern,P)},!o))return $(P),N}if(S){if(le(S)){const M=await S(v,t),P=Xt(M,z);if(P&&(N[g]={...P,...X(de.validate,P.message)},!o))return $(P.message),N}else if(Z(S)){let M={};for(const P in S){if(!Y(M)&&!o)break;const T=Xt(await S[P](v,t),z,P);T&&(M={...T,...X(P,T.message)},$(T.message),o&&(N[g]=M))}if(!Y(M)&&(N[g]={ref:z,...M},!o))return N}}return $(!0),N};const co={mode:ne.onSubmit,reValidateMode:ne.onChange,shouldFocusError:!0};function uo(e={}){let r={...co,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:le(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},o={},s=Z(r.defaultValues)||Z(r.values)?K(r.defaultValues||r.values)||{}:{},n=r.shouldUnregister?{}:K(s),a={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},y,c=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...u};const m={array:Bt(),state:Bt()},x=r.criteriaMode===ne.all,S=i=>f=>{clearTimeout(c),c=setTimeout(i,f)},g=async i=>{if(!r.disabled&&(u.isValid||h.isValid||i)){const f=r.resolver?Y((await A()).errors):await B(o,!0);f!==t.isValid&&m.state.next({isValid:f})}},C=(i,f)=>{!r.disabled&&(u.isValidating||u.validatingFields||h.isValidating||h.validatingFields)&&((i||Array.from(l.mount)).forEach(_=>{_&&(f?I(t.validatingFields,_,f):Q(t.validatingFields,_))}),m.state.next({validatingFields:t.validatingFields,isValidating:!Y(t.validatingFields)}))},V=(i,f=[],_,F,k=!0,b=!0)=>{if(F&&_&&!r.disabled){if(a.action=!0,b&&Array.isArray(w(o,i))){const L=_(w(o,i),F.argA,F.argB);k&&I(o,i,L)}if(b&&Array.isArray(w(t.errors,i))){const L=_(w(t.errors,i),F.argA,F.argB);k&&I(t.errors,i,L),lo(t.errors,i)}if((u.touchedFields||h.touchedFields)&&b&&Array.isArray(w(t.touchedFields,i))){const L=_(w(t.touchedFields,i),F.argA,F.argB);k&&I(t.touchedFields,i,L)}(u.dirtyFields||h.dirtyFields)&&(t.dirtyFields=ge(s,n)),m.state.next({name:i,isDirty:G(i,f),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else I(n,i,f)},v=(i,f)=>{I(t.errors,i,f),m.state.next({errors:t.errors})},z=i=>{t.errors=i,m.state.next({errors:t.errors,isValid:!1})},$=(i,f,_,F)=>{const k=w(o,i);if(k){const b=w(n,i,U(_)?w(s,i):_);U(b)||F&&F.defaultChecked||f?I(n,i,f?b:qt(k._f)):T(i,b),a.mount&&g()}},N=(i,f,_,F,k)=>{let b=!1,L=!1;const j={name:i};if(!r.disabled){if(!_||F){(u.isDirty||h.isDirty)&&(L=t.isDirty,t.isDirty=j.isDirty=G(),b=L!==j.isDirty);const W=ae(w(s,i),f);L=!!w(t.dirtyFields,i),W?Q(t.dirtyFields,i):I(t.dirtyFields,i,!0),j.dirtyFields=t.dirtyFields,b=b||(u.dirtyFields||h.dirtyFields)&&L!==!W}if(_){const W=w(t.touchedFields,i);W||(I(t.touchedFields,i,_),j.touchedFields=t.touchedFields,b=b||(u.touchedFields||h.touchedFields)&&W!==_)}b&&k&&m.state.next(j)}return b?j:{}},D=(i,f,_,F)=>{const k=w(t.errors,i),b=(u.isValid||h.isValid)&&ee(f)&&t.isValid!==f;if(r.delayError&&_?(y=S(()=>v(i,_)),y(r.delayError)):(clearTimeout(c),y=null,_?I(t.errors,i,_):Q(t.errors,i)),(_?!ae(k,_):k)||!Y(F)||b){const L={...F,...b&&ee(f)?{isValid:f}:{},errors:t.errors,name:i};t={...t,...L},m.state.next(L)}},A=async i=>{C(i,!0);const f=await r.resolver(n,r.context,to(i||l.mount,o,r.criteriaMode,r.shouldUseNativeValidation));return C(i),f},q=async i=>{const{errors:f}=await A(i);if(i)for(const _ of i){const F=w(f,_);F?I(t.errors,_,F):Q(t.errors,_)}else t.errors=f;return f},B=async(i,f,_={valid:!0})=>{for(const F in i){const k=i[F];if(k){const{_f:b,...L}=k;if(b){const j=l.array.has(b.name),W=k._f&&ro(k._f);W&&u.validatingFields&&C([b.name],!0);const se=await Jt(k,l.disabled,n,x,r.shouldUseNativeValidation&&!f,j);if(W&&u.validatingFields&&C([b.name]),se[b.name]&&(_.valid=!1,f))break;!f&&(w(se,b.name)?j?io(t.errors,se,b.name):I(t.errors,b.name,se[b.name]):Q(t.errors,b.name))}!Y(L)&&await B(L,f,_)}}return _.valid},X=()=>{for(const i of l.unMount){const f=w(o,i);f&&(f._f.refs?f._f.refs.every(_=>!rt(_)):!rt(f._f.ref))&&gt(i)}l.unMount=new Set},G=(i,f)=>!r.disabled&&(i&&f&&I(n,i,f),!ae(He(),s)),M=(i,f,_)=>Je(i,l,{...a.mount?n:U(f)?s:te(i)?{[i]:f}:f},_,f),P=i=>Ze(w(a.mount?n:s,i,r.shouldUnregister?w(s,i,[]):[])),T=(i,f,_={})=>{const F=w(o,i);let k=f;if(F){const b=F._f;b&&(!b.disabled&&I(n,i,jt(f,b)),k=De(b.ref)&&R(f)?"":f,Dt(b.ref)?[...b.ref.options].forEach(L=>L.selected=k.includes(L.value)):b.refs?Ce(b.ref)?b.refs.forEach(L=>{(!L.defaultChecked||!L.disabled)&&(Array.isArray(k)?L.checked=!!k.find(j=>j===L.value):L.checked=k===L.value||!!k)}):b.refs.forEach(L=>L.checked=L.value===k):et(b.ref)?b.ref.value="":(b.ref.value=k,b.ref.type||m.state.next({name:i,values:K(n)})))}(_.shouldDirty||_.shouldTouch)&&N(i,k,_.shouldTouch,_.shouldDirty,!0),_.shouldValidate&&we(i)},H=(i,f,_)=>{for(const F in f){if(!f.hasOwnProperty(F))return;const k=f[F],b=i+"."+F,L=w(o,b);(l.array.has(i)||Z(k)||L&&!L._f)&&!me(k)?H(b,k,_):T(b,k,_)}},J=(i,f,_={})=>{const F=w(o,i),k=l.array.has(i),b=K(f);I(n,i,b),k?(m.array.next({name:i,values:K(n)}),(u.isDirty||u.dirtyFields||h.isDirty||h.dirtyFields)&&_.shouldDirty&&m.state.next({name:i,dirtyFields:ge(s,n),isDirty:G(i,b)})):F&&!F._f&&!R(b)?H(i,b,_):T(i,b,_),Qt(i,l)&&m.state.next({...t,name:i}),m.state.next({name:a.mount?i:void 0,values:K(n)})},re=async i=>{a.mount=!0;const f=i.target;let _=f.name,F=!0;const k=w(o,_),b=W=>{F=Number.isNaN(W)||me(W)&&isNaN(W.getTime())||ae(W,w(n,_,W))},L=Gt(r.mode),j=Gt(r.reValidateMode);if(k){let W,se;const je=f.type?qt(k._f):Nt(i),ye=i.type===Ae.BLUR||i.type===Ae.FOCUS_OUT,bs=!oo(k._f)&&!r.resolver&&!w(t.errors,_)&&!k._f.deps||ao(ye,w(t.touchedFields,_),t.isSubmitted,j,L),St=Qt(_,l,ye);I(n,_,je),ye?(!f||!f.readOnly)&&(k._f.onBlur&&k._f.onBlur(i),y&&y(0)):k._f.onChange&&k._f.onChange(i);const kt=N(_,je,ye),Ss=!Y(kt)||St;if(!ye&&m.state.next({name:_,type:i.type,values:K(n)}),bs)return(u.isValid||h.isValid)&&(r.mode==="onBlur"?ye&&g():ye||g()),Ss&&m.state.next({name:_,...St?{}:kt});if(!ye&&St&&m.state.next({...t}),r.resolver){const{errors:Ar}=await A([_]);if(b(je),F){const ks=Kt(t.errors,o,_),Dr=Kt(Ar,o,ks.name||_);W=Dr.error,_=Dr.name,se=Y(Ar)}}else C([_],!0),W=(await Jt(k,l.disabled,n,x,r.shouldUseNativeValidation))[_],C([_]),b(je),F&&(W?se=!1:(u.isValid||h.isValid)&&(se=await B(o,!0)));F&&(k._f.deps&&(!Array.isArray(k._f.deps)||k._f.deps.length>0)&&we(k._f.deps),D(_,se,W,kt))}},fe=(i,f)=>{if(w(t.errors,f)&&i.focus)return i.focus(),1},we=async(i,f={})=>{let _,F;const k=Fe(i);if(r.resolver){const b=await q(U(i)?i:k);_=Y(b),F=i?!k.some(L=>w(b,L)):_}else i?(F=(await Promise.all(k.map(async b=>{const L=w(o,b);return await B(L&&L._f?{[b]:L}:L)}))).every(Boolean),!(!F&&!t.isValid)&&g()):F=_=await B(o);return m.state.next({...!te(i)||(u.isValid||h.isValid)&&_!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:_}:{},errors:t.errors}),f.shouldFocus&&!F&&ze(o,fe,i?k:l.mount),F},He=(i,f)=>{let _={...a.mount?n:s};return f&&(_=At(f.dirtyFields?t.dirtyFields:t.touchedFields,_)),U(i)?_:te(i)?w(_,i):i.map(F=>w(_,F))},Vr=(i,f)=>({invalid:!!w((f||t).errors,i),isDirty:!!w((f||t).dirtyFields,i),error:w((f||t).errors,i),isValidating:!!w(t.validatingFields,i),isTouched:!!w((f||t).touchedFields,i)}),ys=i=>{i&&Fe(i).forEach(f=>Q(t.errors,f)),m.state.next({errors:i?t.errors:{}})},$r=(i,f,_)=>{const F=(w(o,i,{_f:{}})._f||{}).ref,k=w(t.errors,i)||{},{ref:b,message:L,type:j,...W}=k;I(t.errors,i,{...W,...f,ref:F}),m.state.next({name:i,errors:t.errors,isValid:!1}),_&&_.shouldFocus&&F&&F.focus&&F.focus()},ms=(i,f)=>le(i)?m.state.subscribe({next:_=>"values"in _&&i(M(void 0,f),_)}):M(i,f,!0),Er=i=>m.state.subscribe({next:f=>{no(i.name,f.name,i.exact)&&so(f,i.formState||u,vs,i.reRenderRoot)&&i.callback({values:{...n},...t,...f,defaultValues:s})}}).unsubscribe,hs=i=>(a.mount=!0,h={...h,...i.formState},Er({...i,formState:h})),gt=(i,f={})=>{for(const _ of i?Fe(i):l.mount)l.mount.delete(_),l.array.delete(_),f.keepValue||(Q(o,_),Q(n,_)),!f.keepError&&Q(t.errors,_),!f.keepDirty&&Q(t.dirtyFields,_),!f.keepTouched&&Q(t.touchedFields,_),!f.keepIsValidating&&Q(t.validatingFields,_),!r.shouldUnregister&&!f.keepDefaultValue&&Q(s,_);m.state.next({values:K(n)}),m.state.next({...t,...f.keepDirty?{isDirty:G()}:{}}),!f.keepIsValid&&g()},Nr=({disabled:i,name:f})=>{(ee(i)&&a.mount||i||l.disabled.has(f))&&(i?l.disabled.add(f):l.disabled.delete(f))},vt=(i,f={})=>{let _=w(o,i);const F=ee(f.disabled)||ee(r.disabled);return I(o,i,{..._||{},_f:{..._&&_._f?_._f:{ref:{name:i}},name:i,mount:!0,...f}}),l.mount.add(i),_?Nr({disabled:ee(f.disabled)?f.disabled:r.disabled,name:i}):$(i,!0,f.value),{...F?{disabled:f.disabled||r.disabled}:{},...r.progressive?{required:!!f.required,min:xe(f.min),max:xe(f.max),minLength:xe(f.minLength),maxLength:xe(f.maxLength),pattern:xe(f.pattern)}:{},name:i,onChange:re,onBlur:re,ref:k=>{if(k){vt(i,f),_=w(o,i);const b=U(k.value)&&k.querySelectorAll&&k.querySelectorAll("input,select,textarea")[0]||k,L=Jr(b),j=_._f.refs||[];if(L?j.find(W=>W===b):b===_._f.ref)return;I(o,i,{_f:{..._._f,...L?{refs:[...j.filter(rt),b,...Array.isArray(w(s,i))?[{}]:[]],ref:{type:b.type,name:i}}:{ref:b}}}),$(i,!1,void 0,b)}else _=w(o,i,{}),_._f&&(_._f.mount=!1),(r.shouldUnregister||f.shouldUnregister)&&!(Lt(l.array,i)&&a.action)&&l.unMount.add(i)}}},bt=()=>r.shouldFocusError&&ze(o,fe,l.mount),_s=i=>{ee(i)&&(m.state.next({disabled:i}),ze(o,(f,_)=>{const F=w(o,_);F&&(f.disabled=F._f.disabled||i,Array.isArray(F._f.refs)&&F._f.refs.forEach(k=>{k.disabled=F._f.disabled||i}))},0,!1))},Lr=(i,f)=>async _=>{let F;_&&(_.preventDefault&&_.preventDefault(),_.persist&&_.persist());let k=K(n);if(m.state.next({isSubmitting:!0}),r.resolver){const{errors:b,values:L}=await A();t.errors=b,k=K(L)}else await B(o);if(l.disabled.size)for(const b of l.disabled)Q(k,b);if(Q(t.errors,"root"),Y(t.errors)){m.state.next({errors:{}});try{await i(k,_)}catch(b){F=b}}else f&&await f({...t.errors},_),bt(),setTimeout(bt);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Y(t.errors)&&!F,submitCount:t.submitCount+1,errors:t.errors}),F)throw F},ps=(i,f={})=>{w(o,i)&&(U(f.defaultValue)?J(i,K(w(s,i))):(J(i,f.defaultValue),I(s,i,K(f.defaultValue))),f.keepTouched||Q(t.touchedFields,i),f.keepDirty||(Q(t.dirtyFields,i),t.isDirty=f.defaultValue?G(i,K(w(s,i))):G()),f.keepError||(Q(t.errors,i),u.isValid&&g()),m.state.next({...t}))},Mr=(i,f={})=>{const _=i?K(i):s,F=K(_),k=Y(i),b=k?s:F;if(f.keepDefaultValues||(s=_),!f.keepValues){if(f.keepDirtyValues){const L=new Set([...l.mount,...Object.keys(ge(s,n))]);for(const j of Array.from(L))w(t.dirtyFields,j)?I(b,j,w(n,j)):J(j,w(b,j))}else{if(Ge&&U(i))for(const L of l.mount){const j=w(o,L);if(j&&j._f){const W=Array.isArray(j._f.refs)?j._f.refs[0]:j._f.ref;if(De(W)){const se=W.closest("form");if(se){se.reset();break}}}}if(f.keepFieldsRef)for(const L of l.mount)J(L,w(b,L));else o={}}n=r.shouldUnregister?f.keepDefaultValues?K(s):{}:K(b),m.array.next({values:{...b}}),m.state.next({values:{...b}})}l={mount:f.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!u.isValid||!!f.keepIsValid||!!f.keepDirtyValues||!r.shouldUnregister&&!Y(b),a.watch=!!r.shouldUnregister,m.state.next({submitCount:f.keepSubmitCount?t.submitCount:0,isDirty:k?!1:f.keepDirty?t.isDirty:!!(f.keepDefaultValues&&!ae(i,s)),isSubmitted:f.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:k?{}:f.keepDirtyValues?f.keepDefaultValues&&n?ge(s,n):t.dirtyFields:f.keepDefaultValues&&i?ge(s,i):f.keepDirty?t.dirtyFields:{},touchedFields:f.keepTouched?t.touchedFields:{},errors:f.keepErrors?t.errors:{},isSubmitSuccessful:f.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:s})},Pr=(i,f)=>Mr(le(i)?i(n):i,f),gs=(i,f={})=>{const _=w(o,i),F=_&&_._f;if(F){const k=F.refs?F.refs[0]:F.ref;k.focus&&(k.focus(),f.shouldSelect&&le(k.select)&&k.select())}},vs=i=>{t={...t,...i}},Br={control:{register:vt,unregister:gt,getFieldState:Vr,handleSubmit:Lr,setError:$r,_subscribe:Er,_runSchema:A,_focusError:bt,_getWatch:M,_getDirty:G,_setValid:g,_setFieldArray:V,_setDisabledField:Nr,_setErrors:z,_getFieldArray:P,_reset:Mr,_resetDefaultValues:()=>le(r.defaultValues)&&r.defaultValues().then(i=>{Pr(i,r.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:X,_disableForm:_s,_subjects:m,_proxyFormState:u,get _fields(){return o},get _formValues(){return n},get _state(){return a},set _state(i){a=i},get _defaultValues(){return s},get _names(){return l},set _names(i){l=i},get _formState(){return t},get _options(){return r},set _options(i){r={...r,...i}}},subscribe:hs,trigger:we,register:vt,handleSubmit:Lr,watch:ms,setValue:J,getValues:He,reset:Pr,resetField:ps,clearErrors:ys,unregister:gt,setError:$r,setFocus:gs,getFieldState:Vr};return{...Br,formControl:Br}}function fo(e={}){const r=p.useRef(void 0),t=p.useRef(void 0),[o,s]=p.useState({isDirty:!1,isValidating:!1,isLoading:le(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:le(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:o},e.defaultValues&&!le(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:a,...l}=uo(e);r.current={...l,formState:o}}const n=r.current.control;return n._options=e,Xe(()=>{const a=n._subscribe({formState:n._proxyFormState,callback:()=>s({...n._formState}),reRenderRoot:!0});return s(l=>({...l,isReady:!0})),n._formState.isReady=!0,a},[n]),p.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),p.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),p.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),p.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),p.useEffect(()=>{if(n._proxyFormState.isDirty){const a=n._getDirty();a!==o.isDirty&&n._subjects.state.next({isDirty:a})}},[n,o.isDirty]),p.useEffect(()=>{e.values&&!ae(e.values,t.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),t.current=e.values,s(a=>({...a}))):n._resetDefaultValues()},[n,e.values]),p.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),r.current.formState=Pt(o,n),r.current}const Yt=(e,r,t)=>{if(e&&"reportValidity"in e){const o=w(t,r);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},st=(e,r)=>{for(const t in r.fields){const o=r.fields[t];o&&o.ref&&"reportValidity"in o.ref?Yt(o.ref,t,e):o&&o.refs&&o.refs.forEach(s=>Yt(s,t,e))}},Rt=(e,r)=>{r.shouldUseNativeValidation&&st(e,r);const t={};for(const o in e){const s=w(r.fields,o),n=Object.assign(e[o]||{},{ref:s&&s.ref});if(yo(r.names||Object.keys(e),o)){const a=Object.assign({},w(t,o));I(a,"root",n),I(t,o,a)}else I(t,o,n)}return t},yo=(e,r)=>{const t=er(r);return e.some(o=>er(o).match(`^${t}\\.\\d+`))};function er(e){return e.replace(/\]|\[/g,"")}function tr(e,r,t){function o(l,y){var c;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(c=l._zod).traits??(c.traits=new Set),l._zod.traits.add(e),r(l,y);for(const u in a.prototype)u in l||Object.defineProperty(l,u,{value:a.prototype[u].bind(l)});l._zod.constr=a,l._zod.def=y}const s=(t==null?void 0:t.Parent)??Object;class n extends s{}Object.defineProperty(n,"name",{value:e});function a(l){var y;const c=t!=null&&t.Parent?new n:this;o(c,l),(y=c._zod).deferred??(y.deferred=[]);for(const u of c._zod.deferred)u();return c}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:l=>{var y,c;return t!=null&&t.Parent&&l instanceof t.Parent?!0:(c=(y=l==null?void 0:l._zod)==null?void 0:y.traits)==null?void 0:c.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}class mo extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const ho={};function rr(e){return ho}function _o(e,r){return typeof r=="bigint"?r.toString():r}const or="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ie(e){return typeof e=="string"?e:e==null?void 0:e.message}function sr(e,r,t){var s,n,a,l,y,c;const o={...e,path:e.path??[]};if(!e.message){const u=Ie((a=(n=(s=e.inst)==null?void 0:s._zod.def)==null?void 0:n.error)==null?void 0:a.call(n,e))??Ie((l=r==null?void 0:r.error)==null?void 0:l.call(r,e))??Ie((y=t.customError)==null?void 0:y.call(t,e))??Ie((c=t.localeError)==null?void 0:c.call(t,e))??"Invalid input";o.message=u}return delete o.inst,delete o.continue,r!=null&&r.reportInput||delete o.input,o}const nr=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,_o,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},po=tr("$ZodError",nr),ar=tr("$ZodError",nr,{Parent:Error}),go=(e=>(r,t,o,s)=>{const n=o?Object.assign(o,{async:!1}):{async:!1},a=r._zod.run({value:t,issues:[]},n);if(a instanceof Promise)throw new mo;if(a.issues.length){const l=new((s==null?void 0:s.Err)??e)(a.issues.map(y=>sr(y,n,rr())));throw or(l,s==null?void 0:s.callee),l}return a.value})(ar),vo=(e=>async(r,t,o,s)=>{const n=o?Object.assign(o,{async:!0}):{async:!0};let a=r._zod.run({value:t,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){const l=new((s==null?void 0:s.Err)??e)(a.issues.map(y=>sr(y,n,rr())));throw or(l,s==null?void 0:s.callee),l}return a.value})(ar);function lr(e,r){try{var t=e()}catch(o){return r(o)}return t&&t.then?t.then(void 0,r):t}function bo(e,r){for(var t={};e.length;){var o=e[0],s=o.code,n=o.message,a=o.path.join(".");if(!t[a])if("unionErrors"in o){var l=o.unionErrors[0].errors[0];t[a]={message:l.message,type:l.code}}else t[a]={message:n,type:s};if("unionErrors"in o&&o.unionErrors.forEach(function(u){return u.errors.forEach(function(h){return e.push(h)})}),r){var y=t[a].types,c=y&&y[o.code];t[a]=Re(a,r,t,s,c?[].concat(c,o.message):o.message)}e.shift()}return t}function So(e,r){for(var t={};e.length;){var o=e[0],s=o.code,n=o.message,a=o.path.join(".");if(!t[a])if(o.code==="invalid_union"&&o.errors.length>0){var l=o.errors[0][0];t[a]={message:l.message,type:l.code}}else t[a]={message:n,type:s};if(o.code==="invalid_union"&&o.errors.forEach(function(u){return u.forEach(function(h){return e.push(h)})}),r){var y=t[a].types,c=y&&y[o.code];t[a]=Re(a,r,t,s,c?[].concat(c,o.message):o.message)}e.shift()}return t}function ko(e,r,t){if(t===void 0&&(t={}),(function(o){return"_def"in o&&typeof o._def=="object"&&"typeName"in o._def})(e))return function(o,s,n){try{return Promise.resolve(lr(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](o,r)).then(function(a){return n.shouldUseNativeValidation&&st({},n),{errors:{},values:t.raw?Object.assign({},o):a}})},function(a){if((function(l){return Array.isArray(l==null?void 0:l.issues)})(a))return{values:{},errors:Rt(bo(a.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw a}))}catch(a){return Promise.reject(a)}};if((function(o){return"_zod"in o&&typeof o._zod=="object"})(e))return function(o,s,n){try{return Promise.resolve(lr(function(){return Promise.resolve((t.mode==="sync"?go:vo)(e,o,r)).then(function(a){return n.shouldUseNativeValidation&&st({},n),{errors:{},values:t.raw?Object.assign({},o):a}})},function(a){if((function(l){return l instanceof po})(a))return{values:{},errors:Rt(So(a.issues,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}const ir=p.createContext(null);function cr(){const e=p.useContext(ir);if(!e)throw new Error("useFormContext must be used within a Form component");return e}function wo({onSubmit:e,children:r,schema:t,defaultValues:o,mode:s="onSubmit",reValidateMode:n="onChange",className:a,style:l,formProps:y}){const c=fo({resolver:t?ko(t):void 0,defaultValues:o,mode:s,reValidateMode:n}),u=c.handleSubmit(e);return d.jsx(ir.Provider,{value:c,children:d.jsx("form",{...y,className:a,style:l,onSubmit:u,children:typeof r=="function"?r(c):r})})}const Co=wo,Fo={formError:"FormError-module__formError___kaUBn"},dr=({color:e,children:r,className:t,style:o,divProps:s})=>{const n=O(),a={"--form-error-margin-top":`calc(${n.fonts.rhythm} * 0.17)`,color:e||n.colors.error,...o},l=[Fo.formError,t].filter(Boolean).join(" ");return d.jsx("div",{...s,className:l,style:a,role:"alert","aria-live":"polite",children:r})},be={formGroup:"FormGroup-module__formGroup___aVI-B",inputWrapper:"FormGroup-module__inputWrapper___429QE",indented:"FormGroup-module__indented___t61iz",disabled:"FormGroup-module__disabled___W-tJ0",required:"FormGroup-module__required___mO3xA"},ur=({disabled:e=!1,error:r=!1,required:t=!1,indent:o=!1,name:s,label:n,errorMessage:a,labelProps:l,children:y,className:c,style:u,divProps:h})=>{const m=O(),x=[be.formGroup,r?be.error:"",e?be.disabled:"",c].filter(Boolean).join(" "),S={"--form-group-margin-bottom":`calc(${m.fonts.rhythm} * 0.35)`,...u},g=p.Children.map(y,C=>{if(p.isValidElement(C)){const V={};if(e&&C.props.disabled===void 0&&(V.disabled=!0),r&&C.props.error===void 0&&(V.error=!0),s&&C.props.id===void 0&&C.type!==p.Fragment&&(V.id=s),Object.keys(V).length>0)return p.cloneElement(C,V)}return C});return d.jsxs("div",{...h,className:x,style:S,children:[n&&d.jsxs(Me,{htmlFor:s,disabled:e,error:r,...l,children:[n,t&&d.jsxs("span",{className:be.required,"aria-label":"required",children:[" ","*"]})]}),d.jsx("div",{className:`${be.inputWrapper} ${o?be.indented:""}`,children:g}),r&&a&&d.jsx(dr,{children:a})]})};function ue({name:e,label:r,required:t,children:o,rules:s,disabled:n,className:a,style:l,indent:y,labelProps:c}){const{control:u}=cr(),{field:h,fieldState:{error:m}}=Xr({name:e,control:u,rules:s});return d.jsx(ur,{label:r,name:e,error:!!m,errorMessage:m==null?void 0:m.message,disabled:n,required:t,className:a,style:l,indent:y,labelProps:c,children:o({value:h.value,onChange:h.onChange,onBlur:h.onBlur,name:h.name,error:!!m,indent:y})})}const nt={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeLarge:"Input-module__sizeLarge___4Boj3"},xo=({color:e="#000",disabled:r=!1,fontSize:t="1em",placeholderOpacity:o=.3})=>({borderColor:e,color:e,fontSize:t,opacity:r?.3:1,placeholderOpacity:o}),fr=({disabled:e=!1,error:r=!1,color:t,size:o="large",id:s,name:n="",placeholder:a,placeholderOpacity:l=.3,type:y="text",value:c="",onChange:u,onBlur:h,className:m,style:x,inputProps:S})=>{const g=O(),C=g.colors.error,V=r?C:t||g.colors.primary,v=xo({color:V,disabled:e,placeholderOpacity:l}),z={"--placeholder-opacity":v.placeholderOpacity,"--input-padding-small":`calc(${g.fonts.rhythm} * ${g.sizes.small.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,"--input-padding-large":`calc(${g.fonts.rhythm} * ${g.sizes.large.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,borderColor:v.borderColor,borderWidth:g.border.width,borderRadius:g.border.radius,color:v.color,fontSize:v.fontSize,opacity:v.opacity,...x},$=[nt.input,o==="small"?nt.sizeSmall:nt.sizeLarge,m].filter(Boolean).join(" ");return d.jsx("input",{...S,className:$,disabled:e,id:s,name:n,onChange:u,onBlur:h,placeholder:a,type:y,value:c,style:z})};function zo({name:e,label:r,required:t,rules:o,disabled:s,className:n,style:a,...l}){return d.jsx(ue,{name:e,label:r,required:t,rules:o,disabled:s,className:n,style:a,children:({value:y,onChange:c,onBlur:u,name:h,error:m})=>d.jsx(fr,{...l,name:h,value:y||"",onChange:x=>c(x.target.value),onBlur:u,error:m})})}const at={textarea:"Textarea-module__textarea___Z-y6g",sizeSmall:"Textarea-module__sizeSmall___HHFEM",sizeLarge:"Textarea-module__sizeLarge___5a3sf"},Vo=({color:e="#000",disabled:r=!1,placeholderOpacity:t=.3})=>({color:e,borderColor:e,opacity:r?.3:1,placeholderOpacity:t}),yr=({disabled:e=!1,error:r=!1,color:t,size:o="large",id:s,name:n="",placeholder:a,placeholderOpacity:l=.3,rows:y=3,value:c="",onChange:u,onBlur:h,className:m,style:x,textareaProps:S})=>{const g=O(),C=g.colors.error,V=r?C:t||g.colors.primary,v=Vo({color:V,disabled:e,placeholderOpacity:l}),z={"--placeholder-opacity":v.placeholderOpacity,"--textarea-padding-small":`calc(${g.fonts.rhythm} * ${g.sizes.small.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,"--textarea-padding-large":`calc(${g.fonts.rhythm} * ${g.sizes.large.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,borderColor:v.borderColor,borderWidth:g.border.width,borderRadius:g.border.radius,color:v.color,fontSize:"1em",opacity:v.opacity,...x},$=[at.textarea,o==="small"?at.sizeSmall:at.sizeLarge,m].filter(Boolean).join(" ");return d.jsx("textarea",{...S,className:$,disabled:e,id:s,name:n,onChange:u,onBlur:h,placeholder:a,rows:y,value:c,style:z})};function $o({name:e,label:r,required:t,rules:o,disabled:s,className:n,style:a,...l}){return d.jsx(ue,{name:e,label:r,required:t,rules:o,disabled:s,className:n,style:a,children:({value:y,onChange:c,onBlur:u,name:h,error:m})=>d.jsx(yr,{...l,name:h,value:y||"",onChange:x=>c(x.target.value),onBlur:u,error:m})})}const lt={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeLarge:"Select-module__sizeLarge___eBA1T"},Eo=({color:e="#000",disabled:r=!1})=>({color:e,borderColor:e,cursor:r?"default":"pointer",opacity:r?.3:1,backgroundImage:(n=>{const a=`
22
22
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
23
23
  <path
24
24
  d="M 30 42.5 L 50 22.5 L 70 42.5"
@@ -33,9 +33,9 @@
33
33
  fill="transparent"
34
34
  />
35
35
  </svg>
36
- `.trim();return`url("data:image/svg+xml,${encodeURIComponent(a)}")`})(e)}),mr=({disabled:e=!1,error:r=!1,color:t,size:o="large",id:s,name:n="",placeholder:a="",value:l="",onChange:y,onBlur:c,children:d,className:h,style:m,selectProps:x})=>{const S=O(),g=S.colors.error,C=r?g:t||S.colors.primary,V=$o({color:C,disabled:e}),v={"--select-padding-small":`calc(${S.fonts.rhythm} * ${S.sizes.small.paddingVertical}) calc(${S.fonts.rhythm} * 1.2) calc(${S.fonts.rhythm} * ${S.sizes.small.paddingVertical}) calc(${S.fonts.rhythm} * ${S.inputs.paddingHorizontal})`,"--select-padding-large":`calc(${S.fonts.rhythm} * ${S.sizes.large.paddingVertical}) calc(${S.fonts.rhythm} * 1.4) calc(${S.fonts.rhythm} * ${S.sizes.large.paddingVertical}) calc(${S.fonts.rhythm} * ${S.inputs.paddingHorizontal})`,backgroundImage:V.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:V.borderColor,borderWidth:S.border.width,borderRadius:S.border.radius,color:V.color,cursor:V.cursor,fontSize:"1em",opacity:V.opacity,...m},z=[lt.select,o==="small"?lt.sizeSmall:lt.sizeLarge,h].filter(Boolean).join(" ");return u.jsxs("select",{...x,className:z,disabled:e,id:s,name:n,onChange:y,onBlur:c,value:l,style:v,children:[a!==""&&u.jsx("option",{disabled:!0,value:"",children:a}),d]})};function Eo({name:e,label:r,required:t,rules:o,disabled:s,className:n,style:a,children:l,...y}){return u.jsx(ue,{name:e,label:r,required:t,rules:o,disabled:s,className:n,style:a,children:({value:c,onChange:d,onBlur:h,name:m,error:x})=>u.jsx(mr,{...y,name:m,value:c||"",onChange:S=>d(S.target.value),onBlur:h,error:x,children:l})})}function No({name:e,required:r,rules:t,disabled:o,className:s,style:n,...a}){return u.jsx(ue,{name:e,required:r,rules:t,disabled:o,className:s,style:n,children:({value:l,onChange:y,name:c,error:d})=>u.jsx(Me,{...a,name:c,checked:!!l,onChange:h=>y(h.target.checked),error:d})})}const it={container:"Radio-module__container___AQxhk",svg:"Radio-module__svg___zl5kF",label:"Radio-module__label___vAFIP"},Lo=({color:e="#000",disabled:r=!1})=>({radioColor:e,cursor:r?"default":"pointer",opacity:r?.3:1}),ct=({color:e,checked:r=!1,disabled:t=!1,error:o=!1,name:s,id:n,onChange:a,label:l,labelStyle:y,className:c,style:d,divProps:h})=>{const m=O(),x=n||Vt(),S=m.colors.error,g=o?S:e||m.colors.primary,C=Lo({color:g,disabled:t}),V=B=>{t||a(B)},v={cursor:C.cursor,fontSize:"1em",opacity:C.opacity,...d},z={width:"1em"},$={fill:"transparent",strokeWidth:"12.5",stroke:C.radioColor},N={fill:C.radioColor},D=[it.container,c].filter(Boolean).join(" ");return u.jsxs("div",{...h,className:D,style:v,children:[u.jsx("input",{id:x,checked:r,disabled:t,name:s,onChange:B=>V({target:{checked:B.target.checked,name:s,type:"radio"}}),style:{display:"none"},type:"radio"}),u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>V({target:{checked:!r,name:s,type:"radio"}}),className:it.svg,style:z,children:[u.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:$}),r&&u.jsx("circle",{cx:"50",cy:"50",r:"25",style:N})]}),l&&u.jsx(Le,{htmlFor:x,className:it.label,style:{paddingBottom:0,...y},color:C.radioColor,disabled:t,error:o,children:l})]})};function Mo({name:e,label:r,required:t,rules:o,disabled:s,className:n,style:a,value:l,...y}){return u.jsx(ue,{name:e,required:t,rules:o,disabled:s,className:n,style:a,children:({value:c,onChange:d,name:h,error:m})=>u.jsx(ct,{...y,name:h,checked:c===l,onChange:()=>d(l),error:m,label:r})})}function Po({name:e,label:r,required:t,options:o,disabled:s,className:n,style:a,indent:l=!0}){return u.jsx(ue,{name:e,label:r,required:t,disabled:s,className:n,style:a,indent:l,labelProps:{style:{marginBottom:".25em"}},children:({value:y,onChange:c,name:d,error:h})=>u.jsx(u.Fragment,{children:o.map(m=>u.jsx(ct,{name:d,checked:y===m.value,onChange:()=>c(m.value),label:m.label,disabled:s||m.disabled,error:h},m.value))})})}function Ao({name:e,label:r,required:t,options:o,children:s,disabled:n,className:a,style:l,indent:y=!0}){return u.jsx(ue,{name:e,label:r,required:t,disabled:n,className:a,style:l,indent:y,labelProps:{style:{marginBottom:".25em"}},children:({value:c,onChange:d,name:h,error:m})=>{const x=Array.isArray(c)?c:[],S=(g,C)=>{d(C?[...x,g]:x.filter(V=>V!==g))};return u.jsx(u.Fragment,{children:o?o.map(g=>u.jsx(Me,{name:`${h}[]`,checked:x.includes(g.value),onChange:C=>S(g.value,C.target.checked),label:g.label,disabled:n||g.disabled,error:m},g.value)):p.Children.map(s,g=>{if(p.isValidElement(g)&&g.type===Me){const C=g.props.value||g.props.name;return p.cloneElement(g,{name:`${h}[]`,checked:x.includes(C),onChange:V=>S(C,V.target.checked),error:m||g.props.error,disabled:n||g.props.disabled})}return g})})}})}const Ve={hamburger:"Hamburger-module__hamburger___Tf4-t",line:"Hamburger-module__line___gybZM",open:"Hamburger-module__open___gRswh"},Bo=({compact:e,color:r,visible:t,border:o})=>{const s=O(),n=e?"1.5em":"2em";return{"--hamburger-border-radius":(o==null?void 0:o.radius)||s.border.radius,color:r||"inherit",display:t?"flex":"none",width:n,height:n}},hr=({color:e,visible:r,compact:t,hamburgerRef:o,open:s=!1,border:n,setOpen:a,className:l,style:y})=>{const c=Bo({compact:t,color:e,visible:r,border:n}),d=[Ve.hamburger,s?Ve.open:"",l].filter(Boolean).join(" ");return u.jsxs("button",{ref:o,className:d,onClick:()=>a(!s),style:{...c,...y},"aria-label":"Toggle menu","aria-expanded":s,children:[u.jsx("div",{className:Ve.line}),u.jsx("div",{className:Ve.line}),u.jsx("div",{className:Ve.line})]})},_r={header:"Header-module__header___RUooH",container:"Header-module__container___t68M9"},Do=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:o,height:s,paddingSm:n,padding:a,margin:l,gap:y,backgroundColor:c,color:d}={})=>{const h=O();return{"--header-max-width":r||h.layout.maxWidth,"--header-min-width":t,"--header-width":o,"--header-height":s,"--header-padding":e?n||h.layout.paddingSm:a||h.layout.padding,"--header-margin":l,"--header-gap":y,backgroundColor:c,color:d}},oe=e=>{const r=typeof window<"u"&&typeof window.matchMedia=="function",t=n=>{if(!r)return()=>{};const a=window.matchMedia(e);return a.addEventListener("change",n),()=>a.removeEventListener("change",n)},o=()=>r?window.matchMedia(e).matches:!1,s=()=>!1;return p.useSyncExternalStore(t,o,s)},pr=({backgroundColor:e,color:r,maxWidth:t,minWidth:o,width:s,height:n,padding:a,paddingSm:l,margin:y,gap:c,breakpoint:d,fixed:h=!1,children:m,className:x,style:S,headerProps:g})=>{const C=O(),V=d||C.breakpoints.sm,{maxWidth:v,unit:z}=pe(V),$=oe(`(max-width: ${v}${z})`),N=Do({isSmallScreen:$,maxWidth:t,minWidth:o,width:s,height:n,paddingSm:l,padding:a,margin:y,gap:c,backgroundColor:e,color:r}),D=[_r.container,x].filter(Boolean).join(" "),B=h?{position:"fixed",top:0,left:0,right:0,zIndex:1e3}:{};return u.jsx("header",{...g,className:_r.header,style:B,children:u.jsx("div",{className:D,style:{...N,...S},children:m})})},Se={nav:"ResponsiveNav-module__nav___xOfv5",navMobile:"ResponsiveNav-module__navMobile___h795P",navHeader:"ResponsiveNav-module__navHeader___Me8bB",compact:"ResponsiveNav-module__compact___UhuAE",navDesktop:"ResponsiveNav-module__navDesktop___9wscZ"},ce={triggerWrapper:"Popover-module__triggerWrapper___dZpf6",popup:"Popover-module__popup___JAvrb",panelOverlay:"Popover-module__panelOverlay___1xDU5",panelOverlayVisible:"Popover-module__panelOverlayVisible___BgtIQ",backdrop:"Popover-module__backdrop___e8qHL",panel:"Popover-module__panel___eUJ2E",panelLeft:"Popover-module__panelLeft___9nSLp",panelRight:"Popover-module__panelRight___OrQfl",panelOpen:"Popover-module__panelOpen___hhvV-",panelCloseButton:"Popover-module__panelCloseButton___kALaN"};function Oo(e,r){const[t,o]=p.useState(!1),[s,n]=p.useState(!1);p.useEffect(()=>{r==="panel"&&(e?o(!0):n(!1))},[e,r]),p.useEffect(()=>{if(r!=="panel"||!t||!e)return;let l,y;return l=requestAnimationFrame(()=>{y=requestAnimationFrame(()=>n(!0))}),()=>{cancelAnimationFrame(l),cancelAnimationFrame(y)}},[t,e,r]);const a=p.useCallback(()=>{s||o(!1)},[s]);return{panelMounted:t,panelVisible:s,handleTransitionEnd:a}}function Io(e,r,t,o){const[s,n]=p.useState({}),a=p.useCallback(()=>{if(r!=="popup"||!t.current)return;const l=t.current.getBoundingClientRect(),y={position:"fixed",top:l.bottom+4,zIndex:999};n(o==="bottom-start"?{...y,left:l.left}:o==="bottom"?{...y,left:l.left+l.width/2,transform:"translateX(-50%)"}:{...y,left:l.right,transform:"translateX(-100%)"})},[r,o,t]);return p.useEffect(()=>{e&&r==="popup"&&a()},[e,r,a]),p.useEffect(()=>{if(!(!e||r!=="popup"))return window.addEventListener("scroll",a,!0),window.addEventListener("resize",a),()=>{window.removeEventListener("scroll",a,!0),window.removeEventListener("resize",a)}},[e,r,a]),{popupPositionStyle:s}}const dt=({trigger:e,children:r,variant:t="popup",isOpen:o,onOpenChange:s,placement:n="bottom-start",side:a="left",panelWidth:l="75%",backdropColor:y="rgba(0, 0, 0, 0.5)",hideCloseButton:c=!1,closeOnBackdropClick:d=!0,className:h,style:m,popoverProps:x})=>{const S=O(),g=o!==void 0,[C,V]=p.useState(!1),v=g?o:C,z=p.useRef(null),$=p.useRef(null),N=p.useCallback(H=>{g||V(H),s==null||s(H)},[g,s]),D=p.useCallback(()=>N(!v),[v,N]),B=p.useCallback(()=>N(!1),[N]),{panelMounted:q,panelVisible:A,handleTransitionEnd:X}=Oo(v,t),{popupPositionStyle:G}=Io(v,t,z,n);p.useEffect(()=>{if(!v||t!=="popup")return;const H=J=>{var re,fe;(re=$.current)!=null&&re.contains(J.target)||(fe=z.current)!=null&&fe.contains(J.target)||B()};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[v,t,B]),p.useEffect(()=>{if(!v)return;const H=J=>{J.key==="Escape"&&B()};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[v,B]),p.useEffect(()=>{if(!v||t!=="panel")return;const H=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${H}px`,document.body.style.width="100%",()=>{document.body.style.position="",document.body.style.top="",document.body.style.width="",window.scrollTo(0,H)}},[v,t]);const M=e?typeof e=="function"?e({onClick:D,isOpen:v}):u.jsx("span",{onClick:D,style:{cursor:"pointer",display:"contents"},children:e}):null,P=e?u.jsx("span",{ref:z,className:ce.triggerWrapper,children:M}):null;if(t==="popup"){const H={backgroundColor:S.colors.secondary,borderRadius:S.border.radius,boxShadow:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06)",...G,...m};return u.jsxs(u.Fragment,{children:[P,v&&je.createPortal(u.jsx("div",{ref:$,className:[ce.popup,h].filter(Boolean).join(" "),style:H,...x,children:r}),document.body)]})}const T={width:l,backgroundColor:S.colors.secondary,...m};return u.jsxs(u.Fragment,{children:[P,q&&je.createPortal(u.jsxs("div",{className:[ce.panelOverlay,A?ce.panelOverlayVisible:""].filter(Boolean).join(" "),children:[u.jsx("div",{className:ce.backdrop,style:{backgroundColor:A?y:"transparent"},onClick:d?B:void 0,role:"presentation"}),u.jsxs("div",{ref:$,className:[ce.panel,a==="right"?ce.panelRight:ce.panelLeft,A?ce.panelOpen:"",h].filter(Boolean).join(" "),style:T,role:"dialog","aria-modal":"true",onTransitionEnd:X,...x,children:[!c&&u.jsx("button",{className:ce.panelCloseButton,onClick:B,"aria-label":"Close panel",type:"button",children:u.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:u.jsx("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),r]})]}),document.body)]})},To=({isMobile:e,isCompact:r,mobile:t,desktop:o})=>{const s=O();return p.useMemo(()=>e?{navStyles:{...(t==null?void 0:t.backgroundColor)&&{backgroundColor:t.backgroundColor},color:(t==null?void 0:t.color)||s.fonts.color,...t==null?void 0:t.style}}:{navStyles:{...(o==null?void 0:o.backgroundColor)&&{backgroundColor:o.backgroundColor},color:(o==null?void 0:o.color)||s.fonts.color,...o==null?void 0:o.style}},[e,r,t,o,s])},gr=p.createContext({isMobile:!1,setOpen:()=>{}}),Ho=({open:e,setOpen:r,hamburgerRef:t,isCompact:o,mobile:s,panelWidth:n,side:a,navClassName:l,cssProps:y,navProps:c,content:d,onNavClick:h})=>{const{backgroundColor:m,...x}=y;return u.jsx(dt,{variant:"panel",side:a||"right",panelWidth:n||"75%",isOpen:e,onOpenChange:r,style:m?{backgroundColor:m}:void 0,trigger:({onClick:S})=>u.jsx(hr,{hamburgerRef:t,visible:!0,compact:o,open:!1,setOpen:g=>S(),...s==null?void 0:s.hamburgerProps}),children:u.jsxs("nav",{...c,className:l,style:x,onClickCapture:h,children:[u.jsx("div",{className:Se.navHeader}),typeof d=="function"?d({setOpen:r}):d]})})},jo=({setOpen:e,navClassName:r,cssProps:t,navProps:o,content:s})=>u.jsx("nav",{...o,className:r,style:t,children:typeof s=="function"?s({setOpen:e}):s}),Wo=({mobile:e,desktop:r,breakpoints:t,children:o,className:s,style:n,navProps:a,disableMobileTreatment:l=!1})=>{const[y,c]=p.useState(!1),d=p.useRef(null),m={...O().breakpoints,...t},{maxWidth:x,unit:S}=pe(m.md),{maxWidth:g,unit:C}=pe(m.sm),V=oe(`(max-width: ${x}${S})`),v=oe(`(max-width: ${g}${C})`),z=l?!1:V,$=l?!1:v,{navStyles:N}=To({isMobile:z,isCompact:$,mobile:e,desktop:r}),D={...N,...n},B=X=>{const G=X.target;G.closest("[data-navdropdown-trigger]")||G.closest("a, button")&&c(!1)},q=[Se.nav,Se.navMobile,$||e!=null&&e.compact?Se.compact:"",s].filter(Boolean).join(" "),A=[Se.nav,Se.navDesktop,s].filter(Boolean).join(" ");return u.jsx(gr.Provider,{value:{isMobile:z,setOpen:c},children:z?u.jsx(Ho,{open:y,setOpen:c,hamburgerRef:d,isCompact:$,mobile:e,panelWidth:e==null?void 0:e.panelWidth,side:e==null?void 0:e.side,navClassName:q,cssProps:D,navProps:a,content:(e==null?void 0:e.content)||o,onNavClick:B}):u.jsx(jo,{setOpen:c,navClassName:A,cssProps:D,navProps:a,content:(r==null?void 0:r.content)||o})})},ut={trigger:"NavDropdown-module__trigger___1PQZp",chevron:"NavDropdown-module__chevron___ZLAV7",chevronOpen:"NavDropdown-module__chevronOpen___9mgjr"};function ft({isActive:e=!1,hoverOpacity:r=.5,color:t}={}){const o=O(),[s,n]=p.useState(!1);return{style:{color:t||o.fonts.color,fontWeight:700,textDecoration:"none",opacity:e||s?r:1},onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1)}}const Uo=({label:e,children:r,dropdownVariant:t="popup",side:o="left",panelWidth:s="75%",color:n,hoverOpacity:a,className:l,style:y,buttonProps:c})=>{const[d,h]=p.useState(!1),{style:m,onMouseEnter:x,onMouseLeave:S}=ft({isActive:d,color:n,hoverOpacity:a});return u.jsx(dt,{variant:t,side:o,panelWidth:s,isOpen:d,onOpenChange:h,trigger:({onClick:g})=>u.jsxs("button",{type:"button",className:[ut.trigger,l].filter(Boolean).join(" "),style:{...m,...y},"data-navdropdown-trigger":!0,onClick:g,onMouseEnter:x,onMouseLeave:S,...c,children:[e,u.jsx("span",{className:[ut.chevron,d?ut.chevronOpen:""].filter(Boolean).join(" "),"aria-hidden":"true",children:u.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M2 4L6 8L10 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),children:r})},qo=({isActive:e,hoverOpacity:r,color:t,children:o})=>{const{style:s,onMouseEnter:n,onMouseLeave:a}=ft({isActive:e,hoverOpacity:r,color:t});return p.cloneElement(o,{style:{...s,...o.props.style},onMouseEnter:l=>{var y,c;n(),(c=(y=o.props).onMouseEnter)==null||c.call(y,l)},onMouseLeave:l=>{var y,c;a(),(c=(y=o.props).onMouseLeave)==null||c.call(y,l)}})},yt=({color:e,backgroundColor:r,fullScreen:t=!0,className:o,style:s,divProps:n})=>{const a=O(),l=e||a.colors.primary,y=r||a.colors.secondary,c=u.jsx("div",{...t?void 0:n,className:t?void 0:o,style:{fontSize:"2.5em",borderRadius:"50%",width:"1em",height:"1em",animation:"spin 1s linear infinite",...t?{}:s,border:`0.1em solid ${l}`,borderTop:`0.1em solid ${y}`}}),d=u.jsxs(u.Fragment,{children:[c,u.jsx("style",{children:`
36
+ `.trim();return`url("data:image/svg+xml,${encodeURIComponent(a)}")`})(e)}),mr=({disabled:e=!1,error:r=!1,color:t,size:o="large",id:s,name:n="",placeholder:a="",value:l="",onChange:y,onBlur:c,children:u,className:h,style:m,selectProps:x})=>{const S=O(),g=S.colors.error,C=r?g:t||S.colors.primary,V=Eo({color:C,disabled:e}),v={"--select-padding-small":`calc(${S.fonts.rhythm} * ${S.sizes.small.paddingVertical}) calc(${S.fonts.rhythm} * 1.2) calc(${S.fonts.rhythm} * ${S.sizes.small.paddingVertical}) calc(${S.fonts.rhythm} * ${S.inputs.paddingHorizontal})`,"--select-padding-large":`calc(${S.fonts.rhythm} * ${S.sizes.large.paddingVertical}) calc(${S.fonts.rhythm} * 1.4) calc(${S.fonts.rhythm} * ${S.sizes.large.paddingVertical}) calc(${S.fonts.rhythm} * ${S.inputs.paddingHorizontal})`,backgroundImage:V.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:V.borderColor,borderWidth:S.border.width,borderRadius:S.border.radius,color:V.color,cursor:V.cursor,fontSize:"1em",opacity:V.opacity,...m},z=[lt.select,o==="small"?lt.sizeSmall:lt.sizeLarge,h].filter(Boolean).join(" ");return d.jsxs("select",{...x,className:z,disabled:e,id:s,name:n,onChange:y,onBlur:c,value:l,style:v,children:[a!==""&&d.jsx("option",{disabled:!0,value:"",children:a}),u]})};function No({name:e,label:r,required:t,rules:o,disabled:s,className:n,style:a,children:l,...y}){return d.jsx(ue,{name:e,label:r,required:t,rules:o,disabled:s,className:n,style:a,children:({value:c,onChange:u,onBlur:h,name:m,error:x})=>d.jsx(mr,{...y,name:m,value:c||"",onChange:S=>u(S.target.value),onBlur:h,error:x,children:l})})}function Lo({name:e,required:r,rules:t,disabled:o,className:s,style:n,...a}){return d.jsx(ue,{name:e,required:r,rules:t,disabled:o,className:s,style:n,children:({value:l,onChange:y,name:c,error:u})=>d.jsx(Pe,{...a,name:c,checked:!!l,onChange:h=>y(h.target.checked),error:u})})}const it={container:"Radio-module__container___AQxhk",svg:"Radio-module__svg___zl5kF",label:"Radio-module__label___vAFIP"},Mo=({color:e="#000",disabled:r=!1})=>({radioColor:e,cursor:r?"default":"pointer",opacity:r?.3:1}),ct=({color:e,checked:r=!1,disabled:t=!1,error:o=!1,name:s,id:n,onChange:a,label:l,labelStyle:y,className:c,style:u,divProps:h})=>{const m=O(),x=n||Vt(),S=m.colors.error,g=o?S:e||m.colors.primary,C=Mo({color:g,disabled:t}),V=A=>{t||a(A)},v={cursor:C.cursor,fontSize:"1em",opacity:C.opacity,...u},z={width:"1em"},$={fill:"transparent",strokeWidth:"12.5",stroke:C.radioColor},N={fill:C.radioColor},D=[it.container,c].filter(Boolean).join(" ");return d.jsxs("div",{...h,className:D,style:v,children:[d.jsx("input",{id:x,checked:r,disabled:t,name:s,onChange:A=>V({target:{checked:A.target.checked,name:s,type:"radio"}}),style:{display:"none"},type:"radio"}),d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>V({target:{checked:!r,name:s,type:"radio"}}),className:it.svg,style:z,children:[d.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:$}),r&&d.jsx("circle",{cx:"50",cy:"50",r:"25",style:N})]}),l&&d.jsx(Me,{htmlFor:x,className:it.label,style:{paddingBottom:0,...y},color:C.radioColor,disabled:t,error:o,children:l})]})};function Po({name:e,label:r,required:t,rules:o,disabled:s,className:n,style:a,value:l,...y}){return d.jsx(ue,{name:e,required:t,rules:o,disabled:s,className:n,style:a,children:({value:c,onChange:u,name:h,error:m})=>d.jsx(ct,{...y,name:h,checked:c===l,onChange:()=>u(l),error:m,label:r})})}function Bo({name:e,label:r,required:t,options:o,disabled:s,className:n,style:a,indent:l=!0}){return d.jsx(ue,{name:e,label:r,required:t,disabled:s,className:n,style:a,indent:l,labelProps:{style:{marginBottom:".25em"}},children:({value:y,onChange:c,name:u,error:h})=>d.jsx(d.Fragment,{children:o.map(m=>d.jsx(ct,{name:u,checked:y===m.value,onChange:()=>c(m.value),label:m.label,disabled:s||m.disabled,error:h},m.value))})})}function Ao({name:e,label:r,required:t,options:o,children:s,disabled:n,className:a,style:l,indent:y=!0}){return d.jsx(ue,{name:e,label:r,required:t,disabled:n,className:a,style:l,indent:y,labelProps:{style:{marginBottom:".25em"}},children:({value:c,onChange:u,name:h,error:m})=>{const x=Array.isArray(c)?c:[],S=(g,C)=>{u(C?[...x,g]:x.filter(V=>V!==g))};return d.jsx(d.Fragment,{children:o?o.map(g=>d.jsx(Pe,{name:`${h}[]`,checked:x.includes(g.value),onChange:C=>S(g.value,C.target.checked),label:g.label,disabled:n||g.disabled,error:m},g.value)):p.Children.map(s,g=>{if(p.isValidElement(g)&&g.type===Pe){const C=g.props.value||g.props.name;return p.cloneElement(g,{name:`${h}[]`,checked:x.includes(C),onChange:V=>S(C,V.target.checked),error:m||g.props.error,disabled:n||g.props.disabled})}return g})})}})}const Ve={hamburger:"Hamburger-module__hamburger___Tf4-t",line:"Hamburger-module__line___gybZM",open:"Hamburger-module__open___gRswh"},Do=({compact:e,color:r,visible:t,border:o})=>{const s=O(),n=e?"1.5em":"2em";return{"--hamburger-border-radius":(o==null?void 0:o.radius)||s.border.radius,color:r||"inherit",display:t?"flex":"none",width:n,height:n}},hr=({color:e,visible:r,compact:t,hamburgerRef:o,open:s=!1,border:n,setOpen:a,className:l,style:y})=>{const c=Do({compact:t,color:e,visible:r,border:n}),u=[Ve.hamburger,s?Ve.open:"",l].filter(Boolean).join(" ");return d.jsxs("button",{ref:o,className:u,onClick:()=>a(!s),style:{...c,...y},"aria-label":"Toggle menu","aria-expanded":s,children:[d.jsx("div",{className:Ve.line}),d.jsx("div",{className:Ve.line}),d.jsx("div",{className:Ve.line})]})},_r={header:"Header-module__header___RUooH",container:"Header-module__container___t68M9"},Oo=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:o,height:s,paddingSm:n,padding:a,margin:l,gap:y,backgroundColor:c,color:u}={})=>{const h=O();return{"--header-max-width":r||h.layout.maxWidth,"--header-min-width":t,"--header-width":o,"--header-height":s,"--header-padding":e?n||h.layout.paddingSm:a||h.layout.padding,"--header-margin":l,"--header-gap":y,backgroundColor:c,color:u}},oe=e=>{const r=typeof window<"u"&&typeof window.matchMedia=="function",t=n=>{if(!r)return()=>{};const a=window.matchMedia(e);return a.addEventListener("change",n),()=>a.removeEventListener("change",n)},o=()=>r?window.matchMedia(e).matches:!1,s=()=>!1;return p.useSyncExternalStore(t,o,s)},pr=({backgroundColor:e,color:r,maxWidth:t,minWidth:o,width:s,height:n,padding:a,paddingSm:l,margin:y,gap:c,breakpoint:u,fixed:h=!1,children:m,className:x,style:S,headerProps:g})=>{const C=O(),V=u||C.breakpoints.sm,{maxWidth:v,unit:z}=pe(V),$=oe(`(max-width: ${v}${z})`),N=Oo({isSmallScreen:$,maxWidth:t,minWidth:o,width:s,height:n,paddingSm:l,padding:a,margin:y,gap:c,backgroundColor:e,color:r}),D=[_r.container,x].filter(Boolean).join(" "),A=h?{position:"fixed",top:0,left:0,right:0,zIndex:1e3}:{};return d.jsx("header",{...g,className:_r.header,style:A,children:d.jsx("div",{className:D,style:{...N,...S},children:m})})},Se={nav:"ResponsiveNav-module__nav___xOfv5",navMobile:"ResponsiveNav-module__navMobile___h795P",navHeader:"ResponsiveNav-module__navHeader___Me8bB",compact:"ResponsiveNav-module__compact___UhuAE",navDesktop:"ResponsiveNav-module__navDesktop___9wscZ"},ce={triggerWrapper:"Popover-module__triggerWrapper___dZpf6",popup:"Popover-module__popup___JAvrb",panelOverlay:"Popover-module__panelOverlay___1xDU5",panelOverlayVisible:"Popover-module__panelOverlayVisible___BgtIQ",backdrop:"Popover-module__backdrop___e8qHL",panel:"Popover-module__panel___eUJ2E",panelLeft:"Popover-module__panelLeft___9nSLp",panelRight:"Popover-module__panelRight___OrQfl",panelOpen:"Popover-module__panelOpen___hhvV-",panelCloseButton:"Popover-module__panelCloseButton___kALaN"};function Io(e,r){const[t,o]=p.useState(!1),[s,n]=p.useState(!1);p.useEffect(()=>{r==="panel"&&(e?o(!0):n(!1))},[e,r]),p.useEffect(()=>{if(r!=="panel"||!t||!e)return;let l,y;return l=requestAnimationFrame(()=>{y=requestAnimationFrame(()=>n(!0))}),()=>{cancelAnimationFrame(l),cancelAnimationFrame(y)}},[t,e,r]);const a=p.useCallback(()=>{s||o(!1)},[s]);return{panelMounted:t,panelVisible:s,handleTransitionEnd:a}}function To(e,r,t,o){const[s,n]=p.useState({}),a=p.useCallback(()=>{if(r!=="popup"||!t.current)return;const l=t.current.getBoundingClientRect(),y={position:"fixed",top:l.bottom+4,zIndex:999};n(o==="bottom-start"?{...y,left:l.left}:o==="bottom"?{...y,left:l.left+l.width/2,transform:"translateX(-50%)"}:{...y,left:l.right,transform:"translateX(-100%)"})},[r,o,t]);return p.useEffect(()=>{e&&r==="popup"&&a()},[e,r,a]),p.useEffect(()=>{if(!(!e||r!=="popup"))return window.addEventListener("scroll",a,!0),window.addEventListener("resize",a),()=>{window.removeEventListener("scroll",a,!0),window.removeEventListener("resize",a)}},[e,r,a]),{popupPositionStyle:s}}const dt=({trigger:e,children:r,variant:t="popup",isOpen:o,onOpenChange:s,placement:n="bottom-start",side:a="left",panelWidth:l="75%",backdropColor:y="rgba(0, 0, 0, 0.5)",hideCloseButton:c=!1,closeOnBackdropClick:u=!0,className:h,style:m,popoverProps:x})=>{const S=O(),g=o!==void 0,[C,V]=p.useState(!1),v=g?o:C,z=p.useRef(null),$=p.useRef(null),N=p.useCallback(H=>{g||V(H),s==null||s(H)},[g,s]),D=p.useCallback(()=>N(!v),[v,N]),A=p.useCallback(()=>N(!1),[N]),{panelMounted:q,panelVisible:B,handleTransitionEnd:X}=Io(v,t),{popupPositionStyle:G}=To(v,t,z,n);p.useEffect(()=>{if(!v||t!=="popup")return;const H=J=>{var re,fe;(re=$.current)!=null&&re.contains(J.target)||(fe=z.current)!=null&&fe.contains(J.target)||A()};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[v,t,A]),p.useEffect(()=>{if(!v)return;const H=J=>{J.key==="Escape"&&A()};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[v,A]),p.useEffect(()=>{if(!v||t!=="panel")return;const H=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${H}px`,document.body.style.width="100%",()=>{document.body.style.position="",document.body.style.top="",document.body.style.width="",window.scrollTo(0,H)}},[v,t]);const M=e?typeof e=="function"?e({onClick:D,isOpen:v}):d.jsx("span",{onClick:D,style:{cursor:"pointer",display:"contents"},children:e}):null,P=e?d.jsx("span",{ref:z,className:ce.triggerWrapper,children:M}):null;if(t==="popup"){const H={backgroundColor:S.colors.secondary,borderRadius:S.border.radius,boxShadow:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06)",...G,...m};return d.jsxs(d.Fragment,{children:[P,v&&We.createPortal(d.jsx("div",{ref:$,className:[ce.popup,h].filter(Boolean).join(" "),style:H,...x,children:r}),document.body)]})}const T={width:l,backgroundColor:S.colors.secondary,...m};return d.jsxs(d.Fragment,{children:[P,q&&We.createPortal(d.jsxs("div",{className:[ce.panelOverlay,B?ce.panelOverlayVisible:""].filter(Boolean).join(" "),children:[d.jsx("div",{className:ce.backdrop,style:{backgroundColor:B?y:"transparent"},onClick:u?A:void 0,role:"presentation"}),d.jsxs("div",{ref:$,className:[ce.panel,a==="right"?ce.panelRight:ce.panelLeft,B?ce.panelOpen:"",h].filter(Boolean).join(" "),style:T,role:"dialog","aria-modal":"true",onTransitionEnd:X,...x,children:[!c&&d.jsx("button",{className:ce.panelCloseButton,onClick:A,"aria-label":"Close panel",type:"button",children:d.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:d.jsx("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),r]})]}),document.body)]})},Ho=({isMobile:e,isCompact:r,mobile:t,desktop:o})=>{const s=O();return p.useMemo(()=>e?{navStyles:{...(t==null?void 0:t.backgroundColor)&&{backgroundColor:t.backgroundColor},color:(t==null?void 0:t.color)||s.fonts.color,...t==null?void 0:t.style}}:{navStyles:{...(o==null?void 0:o.backgroundColor)&&{backgroundColor:o.backgroundColor},color:(o==null?void 0:o.color)||s.fonts.color,...o==null?void 0:o.style}},[e,r,t,o,s])},gr=p.createContext({isMobile:!1,setOpen:()=>{}}),jo=({open:e,setOpen:r,hamburgerRef:t,isCompact:o,mobile:s,panelWidth:n,side:a,navClassName:l,cssProps:y,navProps:c,content:u,onNavClick:h})=>{const{backgroundColor:m,...x}=y;return d.jsx(dt,{variant:"panel",side:a||"right",panelWidth:n||"75%",isOpen:e,onOpenChange:r,style:m?{backgroundColor:m}:void 0,trigger:({onClick:S})=>d.jsx(hr,{hamburgerRef:t,visible:!0,compact:o,open:!1,setOpen:g=>S(),...s==null?void 0:s.hamburgerProps}),children:d.jsxs("nav",{...c,className:l,style:x,onClickCapture:h,children:[d.jsx("div",{className:Se.navHeader}),typeof u=="function"?u({setOpen:r}):u]})})},Wo=({setOpen:e,navClassName:r,cssProps:t,navProps:o,content:s})=>d.jsx("nav",{...o,className:r,style:t,children:typeof s=="function"?s({setOpen:e}):s}),Uo=({mobile:e,desktop:r,breakpoints:t,children:o,className:s,style:n,navProps:a,disableMobileTreatment:l=!1})=>{const[y,c]=p.useState(!1),u=p.useRef(null),m={...O().breakpoints,...t},{maxWidth:x,unit:S}=pe(m.md),{maxWidth:g,unit:C}=pe(m.sm),V=oe(`(max-width: ${x}${S})`),v=oe(`(max-width: ${g}${C})`),z=l?!1:V,$=l?!1:v,{navStyles:N}=Ho({isMobile:z,isCompact:$,mobile:e,desktop:r}),D={...N,...n},A=X=>{const G=X.target;G.closest("[data-navdropdown-trigger]")||G.closest("a, button")&&c(!1)},q=[Se.nav,Se.navMobile,$||e!=null&&e.compact?Se.compact:"",s].filter(Boolean).join(" "),B=[Se.nav,Se.navDesktop,s].filter(Boolean).join(" ");return d.jsx(gr.Provider,{value:{isMobile:z,setOpen:c},children:z?d.jsx(jo,{open:y,setOpen:c,hamburgerRef:u,isCompact:$,mobile:e,panelWidth:e==null?void 0:e.panelWidth,side:e==null?void 0:e.side,navClassName:q,cssProps:D,navProps:a,content:(e==null?void 0:e.content)||o,onNavClick:A}):d.jsx(Wo,{setOpen:c,navClassName:B,cssProps:D,navProps:a,content:(r==null?void 0:r.content)||o})})},ut={trigger:"NavDropdown-module__trigger___1PQZp",chevron:"NavDropdown-module__chevron___ZLAV7",chevronOpen:"NavDropdown-module__chevronOpen___9mgjr"};function ft({isActive:e=!1,hoverOpacity:r=.5,color:t}={}){const o=O(),[s,n]=p.useState(!1);return{style:{color:t||o.fonts.color,fontWeight:700,textDecoration:"none",opacity:e||s?r:1},onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1)}}const qo=({label:e,children:r,dropdownVariant:t="popup",side:o="left",panelWidth:s="75%",color:n,hoverOpacity:a,className:l,style:y,buttonProps:c})=>{const[u,h]=p.useState(!1),{style:m,onMouseEnter:x,onMouseLeave:S}=ft({isActive:u,color:n,hoverOpacity:a});return d.jsx(dt,{variant:t,side:o,panelWidth:s,isOpen:u,onOpenChange:h,trigger:({onClick:g})=>d.jsxs("button",{type:"button",className:[ut.trigger,l].filter(Boolean).join(" "),style:{...m,...y},"data-navdropdown-trigger":!0,onClick:g,onMouseEnter:x,onMouseLeave:S,...c,children:[e,d.jsx("span",{className:[ut.chevron,u?ut.chevronOpen:""].filter(Boolean).join(" "),"aria-hidden":"true",children:d.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d.jsx("path",{d:"M2 4L6 8L10 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),children:r})},Go=({isActive:e,hoverOpacity:r,color:t,children:o})=>{const{style:s,onMouseEnter:n,onMouseLeave:a}=ft({isActive:e,hoverOpacity:r,color:t});return p.cloneElement(o,{style:{...s,...o.props.style},onMouseEnter:l=>{var y,c;n(),(c=(y=o.props).onMouseEnter)==null||c.call(y,l)},onMouseLeave:l=>{var y,c;a(),(c=(y=o.props).onMouseLeave)==null||c.call(y,l)}})},yt=({color:e,backgroundColor:r,fullScreen:t=!0,className:o,style:s,divProps:n})=>{const a=O(),l=e||a.colors.primary,y=r||a.colors.secondary,c=d.jsx("div",{...t?void 0:n,className:t?void 0:o,style:{fontSize:"2.5em",borderRadius:"50%",width:"1em",height:"1em",animation:"spin 1s linear infinite",...t?{}:s,border:`0.1em solid ${l}`,borderTop:`0.1em solid ${y}`}}),u=d.jsxs(d.Fragment,{children:[c,d.jsx("style",{children:`
37
37
  @keyframes spin {
38
38
  0% { transform: rotate(0deg); }
39
39
  100% { transform: rotate(360deg); }
40
40
  }
41
- `})]});return t?u.jsx("div",{...n,className:o,style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100vw",...s},children:d}):d},Go=({children:e,loadingComponent:r})=>{const[t,o]=p.useState(!1);return p.useEffect(()=>{requestAnimationFrame(()=>{o(!0)})},[]),t?u.jsx(u.Fragment,{children:e}):r||u.jsx(yt,{})},he={backdrop:"Modal-module__backdrop___GVUh4",modal:"Modal-module__modal___aD7aP",header:"Modal-module__header___ILG9i",title:"Modal-module__title___A5OeE",closeButton:"Modal-module__closeButton___3LpSf",content:"Modal-module__content___dWO-B",actions:"Modal-module__actions___hY6zi"},mt={stack:"Stack-module__stack___yUU-B",vertical:"Stack-module__vertical___sKTyQ",horizontal:"Stack-module__horizontal___YsvtV"},vr=({direction:e="row",gap:r="0.5em",children:t,className:o,style:s,divProps:n})=>{const a=[mt.stack,e==="column"?mt.vertical:mt.horizontal,o].filter(Boolean).join(" ");return u.jsx("div",{...n,className:a,style:{gap:r,...s},children:t})},br=({isOpen:e,onClose:r,children:t,title:o,hideCloseButton:s=!1,closeOnBackdropClick:n=!0,closeOnEscape:a=!0,actions:l=[],resolveModal:y,width:c="500px",maxWidth:d="90vw",backgroundColor:h,backdropColor:m="rgba(0, 0, 0, 0.5)",className:x,style:S,divProps:g})=>{const C=O(),V=p.useRef(null),v=p.useRef(null),{maxWidth:z}=pe(C.breakpoints.md),$=oe(`(max-width: ${z-1}px)`);p.useEffect(()=>{if(e)return v.current=document.activeElement,document.body.style.overflow="hidden",V.current&&V.current.focus(),()=>{document.body.style.overflow="",v.current&&v.current.focus()}},[e]),p.useEffect(()=>{if(!e||!a)return;const A=X=>{X.key==="Escape"&&r()};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[e,a,r]);const N=A=>{A.target===A.currentTarget&&n&&r()};if(!e)return null;const D={width:c,maxWidth:d,backgroundColor:h||C.colors.secondary,borderRadius:C.border.radius,...S},B={backgroundColor:m},q=u.jsx("div",{className:he.backdrop,style:B,onClick:N,role:"presentation",children:u.jsxs("div",{ref:V,className:[he.modal,x].filter(Boolean).join(" "),style:D,role:"dialog","aria-modal":"true","aria-labelledby":o?"modal-title":void 0,tabIndex:-1,...g,children:[u.jsxs("div",{className:he.header,children:[o&&u.jsx("h2",{id:"modal-title",className:he.title,children:o}),!s&&u.jsx("button",{className:he.closeButton,onClick:r,"aria-label":"Close modal",type:"button",children:u.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:u.jsx("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),u.jsx("div",{className:he.content,children:t}),l.length>0&&u.jsx(vr,{direction:$?"column":"row",className:he.actions,children:l.map((A,X)=>u.jsx(Ft,{color:A.color,outline:A.variant==="outline",disabled:A.disabled,onClick:()=>{A.onClick?A.onClick(y||r):y?y(A.value):r()},children:A.label},X))})]})});return je.createPortal(q,document.body)},Sr=p.createContext(null),Zo=({children:e})=>{const[r,t]=p.useState(null),o=p.useCallback(c=>new Promise((d,h)=>{const m=Math.random().toString(36).substr(2,9);t({id:m,content:c.content,title:c.title,actions:c.actions,options:c.options,resolve:d,reject:h})}),[]),s=p.useCallback(c=>{t(d=>(d&&d.resolve(c),null))},[]),n=p.useCallback(c=>o({title:c.title||"Confirm",content:c.message,actions:[{label:c.cancelLabel||"Cancel",variant:"outline",onClick:d=>d(!1)},{label:c.confirmLabel||"Confirm",color:c.confirmColor,onClick:d=>d(!0)}],options:c.options}),[o]),a=p.useCallback(c=>o({title:c.title||"Alert",content:c.message,actions:[{label:c.okLabel||"OK",color:c.okColor,onClick:d=>d()}],options:c.options}),[o]),l=p.useCallback(()=>{s()},[s]),y=p.useMemo(()=>({show:o,resolve:s,confirm:n,alert:a}),[o,s,n,a]);return u.jsxs(Sr.Provider,{value:y,children:[e,r&&u.jsx(br,{isOpen:!0,onClose:l,title:r.title,actions:r.actions,resolveModal:s,...r.options,children:typeof r.content=="function"?r.content(s):r.content})]})},Qo=()=>{const e=p.useContext(Sr);if(!e)throw new Error("useModal must be used within a ModalProvider");return e},kr={section:"ResponsiveSection-module__section___gBESK",innerDiv:"ResponsiveSection-module__innerDiv___r1bky"},wr=({backgroundColor:e,color:r,maxWidth:t,minWidth:o,width:s,height:n,padding:a,paddingSm:l,margin:y,gap:c,verticalRhythm:d=3,children:h,className:m,style:x,sectionProps:S})=>{const g=O(),C=oe(`(min-width: ${g.breakpoints.sm})`),V={backgroundColor:e,color:r||g.fonts.color,margin:y,...x},v=`calc(${g.fonts.rhythm} * ${d})`,z=C?a||g.layout.padding:l||g.layout.paddingSm,$={"--max-width":t||g.layout.maxWidth,"--min-width":o,"--width":s,"--height":n,"--section-padding":`${v} ${z}`,"--gap":c},N=[kr.section,m].filter(Boolean).join(" ");return u.jsx("section",{...S,className:N,style:V,children:u.jsx("div",{className:kr.innerDiv,style:$,children:h})})},Cr={hero:"Hero-module__hero___IB2tg",content:"Hero-module__content___rkkfQ"},Ko=({isMd:e=!1,isLg:r=!1,theme:t})=>p.useMemo(()=>{const{rhythm:o}=t.fonts;let s=`calc(${o} * 2) 0`,n="2rem",a="1.125rem";return r?(s=`calc(${o} * 4) 0`,n="3.5rem",a="1.5rem"):e&&(s=`calc(${o} * 3.5) 0`,n="3rem",a="1.25rem"),{"--hero-padding":s,"--hero-h1-font-size":n,"--hero-p-font-size":a,"--hero-h1-margin-bottom":`calc(${o} * 0.7)`}},[e,r,t.fonts]),Xo=({color:e,breakpoints:r,children:t,className:o,style:s,...n})=>{const a=O(),l=[Cr.hero,o].filter(Boolean).join(" "),y=(r==null?void 0:r.md)||a.breakpoints.md,c=(r==null?void 0:r.lg)||a.breakpoints.lg,d=oe(`(min-width: ${y})`),h=oe(`(min-width: ${c})`),m=Ko({isMd:d,isLg:h,theme:a});return u.jsx(wr,{className:l,color:e||a.fonts.color,style:{...m,...s},...n,children:u.jsx("div",{className:Cr.content,children:t})})},Fr={footer:"Footer-module__footer___A76NF",container:"Footer-module__container___QneNs"},Jo=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:o,height:s,paddingSm:n,padding:a,margin:l,gap:y,backgroundColor:c,color:d}={})=>{const h=O();return{maxWidth:r||h.layout.maxWidth,minWidth:t,width:o,height:s,padding:e?n||h.layout.paddingSm:a||h.layout.padding,margin:l,gap:y,backgroundColor:c,color:d||h.fonts.color}},xr=({backgroundColor:e,color:r,maxWidth:t,minWidth:o,width:s,height:n,padding:a,paddingSm:l,margin:y,gap:c,breakPoint:d,children:h,className:m,style:x,footerProps:S})=>{const g=O(),C=d||g.breakpoints.sm,{maxWidth:V,unit:v}=pe(C),z=oe(`(max-width: ${V}${v})`),$=Jo({isSmallScreen:z,maxWidth:t,minWidth:o,width:s,height:n,paddingSm:l,padding:a,margin:y,gap:c,backgroundColor:e,color:r}),N=[Fr.container,m].filter(Boolean).join(" ");return u.jsx("footer",{...S,className:Fr.footer,children:u.jsx("div",{className:N,style:{...$,...x},children:h})})},Ie={card:"FeatureCard-module__card___XQt66",icon:"FeatureCard-module__icon___dXJ92",title:"FeatureCard-module__title___KxXyA",content:"FeatureCard-module__content___68xkw"},Yo=({isMd:e=!1,theme:r})=>p.useMemo(()=>{const{rhythm:t}=r.fonts;return{"--feature-icon-font-size":e?"3rem":"2.5rem","--feature-title-font-size":e?"1.5rem":"1.25rem","--feature-card-padding":`calc(${t} * 1)`,"--feature-icon-margin-bottom":`calc(${t} * 0.7)`,"--feature-title-margin-bottom":`calc(${t} * 0.5)`}},[e,r.fonts]),Ro=({breakpoint:e,icon:r,title:t,children:o,className:s,style:n,divProps:a})=>{const l=O(),y=[Ie.card,s].filter(Boolean).join(" "),c=e||l.breakpoints.md,d=oe(`(min-width: ${c})`),h=Yo({isMd:d,theme:l});return u.jsxs("div",{...a,className:y,style:{...h,...n},children:[r&&u.jsx("div",{className:Ie.icon,children:r}),u.jsx("h3",{className:Ie.title,children:t}),u.jsx("div",{className:Ie.content,children:o})]})},es={grid:"FeatureGrid-module__grid___6sW6f"},ts=({columns:e,isMd:r=!1,isLg:t=!1})=>p.useMemo(()=>r?r&&!t&&(e===3||e===4)?{"--grid-template-columns":"repeat(2, 1fr)"}:{"--grid-template-columns":{1:"1fr",2:"repeat(2, 1fr)",3:"repeat(3, 1fr)",4:"repeat(4, 1fr)"}[e]}:{"--grid-template-columns":"1fr"},[e,r,t]),rs=({columns:e=3,breakpoints:r,gap:t,children:o,className:s,style:n})=>{const a=O(),l=(r==null?void 0:r.md)||a.breakpoints.md,y=(r==null?void 0:r.lg)||a.breakpoints.lg,c=oe(`(min-width: ${l})`),d=oe(`(min-width: ${y})`),m={...ts({columns:e,isMd:c,isLg:d}),gap:t,...n};return u.jsx("div",{className:[es.grid,s].filter(Boolean).join(" "),style:m,children:o})},ke={card:"MediaCard-module__card___9pZ7C",clickable:"MediaCard-module__clickable___Rae9n",vertical:"MediaCard-module__vertical___GWtOA",imageWrapper:"MediaCard-module__imageWrapper___HUiag",horizontal:"MediaCard-module__horizontal___qlK4y",content:"MediaCard-module__content___MlqE4"},os=({direction:e="column",imageSlot:r,imageWidth:t,backgroundColor:o,children:s,className:n,style:a,onClick:l,actions:y,divProps:c})=>{const d=O(),h=[ke.card,e==="row"?ke.horizontal:ke.vertical,l?ke.clickable:void 0,n].filter(Boolean).join(" "),m={borderRadius:d.border.radius,...o&&{backgroundColor:o},...t&&e==="row"&&{"--media-card-image-width":t},...a},x=S=>{l&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),l())};return u.jsxs("div",{...c,className:h,style:m,onClick:l,onKeyDown:l?x:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:[r&&u.jsx("div",{className:ke.imageWrapper,children:r}),u.jsx("div",{className:ke.content,children:s}),y]})},ht={layoutContainer:"PageLayout-module__layoutContainer___diLdT",content:"PageLayout-module__content___h2mBr",main:"PageLayout-module__main___Sw7Pv"},ss=({header:e,footer:r,children:t,className:o,style:s,headerProps:n,footerProps:a,divProps:l,mainProps:y})=>{const c=[ht.layoutContainer,o].filter(Boolean).join(" ");return u.jsxs("div",{...l,className:c,style:s,children:[u.jsxs("div",{className:ht.content,children:[e&&u.jsx(pr,{...n,children:e}),u.jsx("main",{...y,className:ht.main,children:t})]}),r&&u.jsx(xr,{...a,children:r})]})},ie={dropzone:"FileUpload-module__dropzone___jqua0",loading:"FileUpload-module__loading___C7PsH",dragOver:"FileUpload-module__dragOver___q1zPo",hiddenInput:"FileUpload-module__hiddenInput___RLLPJ",content:"FileUpload-module__content___yCP0l",contentHidden:"FileUpload-module__contentHidden___0Ewoe",spinnerOverlay:"FileUpload-module__spinnerOverlay___e3Rle",label:"FileUpload-module__label___lbMkx",hint:"FileUpload-module__hint___8dXlk",errorMessage:"FileUpload-module__errorMessage___8HB3n"},ns=({color:e})=>u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:e,width:"48",height:"48","aria-hidden":!0,children:u.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"})}),as=({onUpload:e,accept:r,maxSizeBytes:t,loading:o=!1,error:s,label:n="Click or drag & drop a file here",className:a,style:l,divProps:y,inputProps:c})=>{const d=O(),h=p.useRef(null),[m,x]=p.useState(!1),[S,g]=p.useState(null),C=s||S,V=C?d.colors.error:d.colors.primary,v=C?d.colors.error:d.colors.primary,z=p.useCallback(M=>{if(g(null),t&&M.size>t){const P=(t/1048576).toFixed(1);g(`File exceeds maximum size of ${P} MB`);return}e(M)},[t,e]),$=()=>{var M;o||(M=h.current)==null||M.click()},N=M=>{var P;(M.key==="Enter"||M.key===" ")&&!o&&(M.preventDefault(),(P=h.current)==null||P.click())},D=M=>{var T;const P=(T=M.target.files)==null?void 0:T[0];P&&z(P),M.target.value=""},B=M=>{M.preventDefault(),o||x(!0)},q=()=>x(!1),A=M=>{var T;if(M.preventDefault(),x(!1),o)return;const P=(T=M.dataTransfer.files)==null?void 0:T[0];P&&z(P)},X=[ie.dropzone,m&&ie.dragOver,o&&ie.loading,a].filter(Boolean).join(" "),G={"--upload-color":V,borderColor:V,borderWidth:d.border.width,borderRadius:d.border.radius,fontSize:"1em",color:v,...l};return u.jsxs("div",{...y,className:X,style:G,onClick:$,onKeyDown:N,onDragOver:B,onDragLeave:q,onDrop:A,role:"button",tabIndex:o?-1:0,"aria-disabled":o,"aria-label":n,children:[u.jsx("input",{...c,ref:h,type:"file",accept:r,onChange:D,disabled:o,className:ie.hiddenInput,tabIndex:-1,"aria-hidden":!0}),o&&u.jsx(yt,{fullScreen:!1,className:ie.spinnerOverlay,style:{fontSize:"1.5em"}}),u.jsxs("div",{className:[ie.content,o&&ie.contentHidden].filter(Boolean).join(" "),"aria-hidden":o||void 0,children:[u.jsx(ns,{color:V}),u.jsx("span",{className:ie.label,children:n}),r&&u.jsxs("span",{className:ie.hint,children:["Accepted: ",r]}),t&&u.jsxs("span",{className:ie.hint,children:["Max size: ",(t/(1024*1024)).toFixed(1)," MB"]}),C&&u.jsx("span",{className:ie.errorMessage,role:"alert",children:C})]})]})},_t={container:"Image-module__container___sVJdZ",img:"Image-module__img___pKhPw",fallback:"Image-module__fallback___wysuM"},ls={skeleton:"Skeleton-module__skeleton___CB4uF"},pt=({className:e,style:r,divProps:t})=>{const o=O(),s=[ls.skeleton,e].filter(Boolean).join(" ");return u.jsx("div",{...t,className:s,style:{borderRadius:o.border.radius,...r},"aria-label":"Loading","aria-busy":!0})},is=({src:e,alt:r="",aspectRatio:t="1 / 1",loading:o=!1,skeletonDelay:s=150,fallback:n,className:a,style:l,imgProps:y})=>{const c=O(),[d,h]=p.useState(null),[m,x]=p.useState(null),[S,g]=p.useState(null),C=d===e,V=m===e,v=S===e;p.useEffect(()=>{if(!e)return;const q=setTimeout(()=>g(e),s);return()=>clearTimeout(q)},[e,s]);const z=o||!!e&&!C&&!V&&v,$=!o&&(!e||V),N=!o&&!!e&&!V,D=[_t.container,a].filter(Boolean).join(" "),B={aspectRatio:t,borderRadius:c.border.radius,...l};return u.jsxs("div",{className:D,style:B,"aria-label":$?r||"Image placeholder":void 0,"aria-busy":z||void 0,children:[z&&u.jsx(pt,{style:{borderRadius:"inherit",position:"absolute",inset:0}}),$&&u.jsx("div",{className:_t.fallback,children:n??null}),N&&u.jsx("img",{...y,src:e,alt:r,className:_t.img,style:{opacity:C?1:0},onLoad:()=>e&&h(e),onError:()=>e&&x(e)})]})},_e={thumbnail:"ImageThumbnail-module__thumbnail___-igbe",img:"ImageThumbnail-module__img___Q7Z4V",sizeXs:"ImageThumbnail-module__sizeXs___TvSHV",sizeSmall:"ImageThumbnail-module__sizeSmall___2KnCh",sizeDefault:"ImageThumbnail-module__sizeDefault___laoQk",sizeLarge:"ImageThumbnail-module__sizeLarge___iwz3o",removeButton:"ImageThumbnail-module__removeButton___Ceh1Q"},cs={xs:_e.sizeXs,small:_e.sizeSmall,default:_e.sizeDefault,large:_e.sizeLarge},ds=({color:e})=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"1.5",width:"40%",height:"40%","aria-hidden":!0,children:[u.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),u.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),u.jsx("polyline",{points:"21 15 16 10 5 21"})]}),us=({src:e,alt:r="",size:t="default",loading:o=!1,skeletonDelay:s=500,onRemove:n,removeLabel:a="Remove",fallback:l,className:y,style:c,imgProps:d})=>{const h=O(),[m,x]=p.useState(null),[S,g]=p.useState(null),[C,V]=p.useState(null),v=m===e,z=S===e,$=C===e;p.useEffect(()=>{if(!e)return;const G=setTimeout(()=>V(e),s);return()=>clearTimeout(G)},[e,s]);const N=o||!!e&&!v&&!z&&$,D=!o&&(!e||z),B=!o&&!!e&&!z,q=[_e.thumbnail,cs[t],y].filter(Boolean).join(" "),A={borderRadius:h.border.radius,...c},X={background:h.colors.primary,color:h.buttons.primary.textColor,borderRadius:"50%"};return u.jsxs("div",{className:q,style:A,"aria-label":D?r||"Image placeholder":void 0,"aria-busy":N||void 0,children:[N&&u.jsx(pt,{style:{borderRadius:"inherit",position:"absolute",inset:0}}),D&&(l??u.jsx(ds,{color:h.colors.primary})),B&&u.jsx("img",{...d,src:e,alt:r,className:_e.img,style:{opacity:v?1:0},onLoad:()=>e&&x(e),onError:()=>e&&g(e)}),n&&u.jsx("button",{type:"button",className:_e.removeButton,style:X,onClick:G=>{G.stopPropagation(),n()},"aria-label":a,children:u.jsxs("svg",{viewBox:"0 0 10 10",width:"60%",height:"60%",fill:"none",stroke:"currentColor",strokeWidth:h.fonts.fontWeightHeader>=700?2:1.5,"aria-hidden":!0,children:[u.jsx("line",{x1:"2",y1:"2",x2:"8",y2:"8"}),u.jsx("line",{x1:"8",y1:"2",x2:"2",y2:"8"})]})})]})};E.Button=Ft,E.CSSReset=Ur,E.Checkbox=Me,E.FeatureCard=Ro,E.FeatureGrid=rs,E.FileUpload=as,E.Footer=xr,E.Form=wo,E.FormCheckbox=No,E.FormCheckboxGroup=Ao,E.FormError=dr,E.FormField=ue,E.FormGroup=ur,E.FormInput=xo,E.FormLabel=Le,E.FormRadio=Mo,E.FormRadioGroup=Po,E.FormSelect=Eo,E.FormTextarea=Vo,E.Hamburger=hr,E.Header=pr,E.Hero=Xo,E.Image=is,E.ImageThumbnail=us,E.Input=fr,E.LoadingSpinner=yt,E.MediaCard=os,E.Modal=br,E.ModalProvider=Zo,E.NavDropdown=Uo,E.NavLink=qo,E.PageLayout=ss,E.Popover=dt,E.Radio=ct,E.ResponsiveNav=Wo,E.ResponsiveNavContext=gr,E.ResponsiveSection=wr,E.Select=mr,E.Skeleton=pt,E.Stack=vr,E.StyleLoader=Go,E.Textarea=yr,E.ThemeProvider=Or,E.parseBreakpoint=pe,E.useFormContext=cr,E.useMediaQuery=oe,E.useModal=Qo,E.useNavLinkStyles=ft,E.useTheme=O,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
41
+ `})]});return t?d.jsx("div",{...n,className:o,style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100vw",...s},children:u}):u},Zo=({children:e,loadingComponent:r})=>{const[t,o]=p.useState(!1);return p.useEffect(()=>{requestAnimationFrame(()=>{o(!0)})},[]),t?d.jsx(d.Fragment,{children:e}):r||d.jsx(yt,{})},he={backdrop:"Modal-module__backdrop___GVUh4",modal:"Modal-module__modal___aD7aP",header:"Modal-module__header___ILG9i",title:"Modal-module__title___A5OeE",closeButton:"Modal-module__closeButton___3LpSf",content:"Modal-module__content___dWO-B",actions:"Modal-module__actions___hY6zi"},mt={stack:"Stack-module__stack___yUU-B",vertical:"Stack-module__vertical___sKTyQ",horizontal:"Stack-module__horizontal___YsvtV"},vr=({direction:e="row",gap:r="0.5em",children:t,className:o,style:s,divProps:n})=>{const a=[mt.stack,e==="column"?mt.vertical:mt.horizontal,o].filter(Boolean).join(" ");return d.jsx("div",{...n,className:a,style:{gap:r,...s},children:t})},br=({isOpen:e,onClose:r,children:t,title:o,hideCloseButton:s=!1,closeOnBackdropClick:n=!0,closeOnEscape:a=!0,actions:l=[],resolveModal:y,width:c="500px",maxWidth:u="90vw",backgroundColor:h,backdropColor:m="rgba(0, 0, 0, 0.5)",className:x,style:S,divProps:g})=>{const C=O(),V=p.useRef(null),v=p.useRef(null),{maxWidth:z}=pe(C.breakpoints.md),$=oe(`(max-width: ${z-1}px)`);p.useEffect(()=>{if(e)return v.current=document.activeElement,document.body.style.overflow="hidden",V.current&&V.current.focus(),()=>{document.body.style.overflow="",v.current&&v.current.focus()}},[e]),p.useEffect(()=>{if(!e||!a)return;const B=X=>{X.key==="Escape"&&r()};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[e,a,r]);const N=B=>{B.target===B.currentTarget&&n&&r()};if(!e)return null;const D={width:c,maxWidth:u,backgroundColor:h||C.colors.secondary,borderRadius:C.border.radius,...S},A={backgroundColor:m},q=d.jsx("div",{className:he.backdrop,style:A,onClick:N,role:"presentation",children:d.jsxs("div",{ref:V,className:[he.modal,x].filter(Boolean).join(" "),style:D,role:"dialog","aria-modal":"true","aria-labelledby":o?"modal-title":void 0,tabIndex:-1,...g,children:[d.jsxs("div",{className:he.header,children:[o&&d.jsx("h2",{id:"modal-title",className:he.title,children:o}),!s&&d.jsx("button",{className:he.closeButton,onClick:r,"aria-label":"Close modal",type:"button",children:d.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:d.jsx("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),d.jsx("div",{className:he.content,children:t}),l.length>0&&d.jsx(vr,{direction:$?"column":"row",className:he.actions,children:l.map((B,X)=>d.jsx(Ft,{color:B.color,outline:B.variant==="outline",disabled:B.disabled,onClick:()=>{B.onClick?B.onClick(y||r):y?y(B.value):r()},children:B.label},X))})]})});return We.createPortal(q,document.body)},Sr=p.createContext(null),Qo=({children:e})=>{const[r,t]=p.useState(null),o=p.useCallback(c=>new Promise((u,h)=>{const m=Math.random().toString(36).substr(2,9);t({id:m,content:c.content,title:c.title,actions:c.actions,options:c.options,resolve:u,reject:h})}),[]),s=p.useCallback(c=>{t(u=>(u&&u.resolve(c),null))},[]),n=p.useCallback(c=>o({title:c.title||"Confirm",content:c.message,actions:[{label:c.cancelLabel||"Cancel",variant:"outline",onClick:u=>u(!1)},{label:c.confirmLabel||"Confirm",color:c.confirmColor,onClick:u=>u(!0)}],options:c.options}),[o]),a=p.useCallback(c=>o({title:c.title||"Alert",content:c.message,actions:[{label:c.okLabel||"OK",color:c.okColor,onClick:u=>u()}],options:c.options}),[o]),l=p.useCallback(()=>{s()},[s]),y=p.useMemo(()=>({show:o,resolve:s,confirm:n,alert:a}),[o,s,n,a]);return d.jsxs(Sr.Provider,{value:y,children:[e,r&&d.jsx(br,{isOpen:!0,onClose:l,title:r.title,actions:r.actions,resolveModal:s,...r.options,children:typeof r.content=="function"?r.content(s):r.content})]})},Ko=()=>{const e=p.useContext(Sr);if(!e)throw new Error("useModal must be used within a ModalProvider");return e},kr=({children:e,className:r,style:t,padding:o="0.5em",border:s=!1,backgroundColor:n,divProps:a})=>{const l=O();return d.jsx("div",{...a,className:r,style:{padding:o,borderRadius:l.border.radius,fontSize:"1em",backgroundColor:n??l.cards.backgroundColor,...s&&{borderWidth:l.border.width,borderStyle:"solid",borderColor:l.colors.primary},...t},children:e})},wr={section:"ResponsiveSection-module__section___gBESK",innerDiv:"ResponsiveSection-module__innerDiv___r1bky"},Cr=({backgroundColor:e,color:r,maxWidth:t,minWidth:o,width:s,height:n,padding:a,paddingSm:l,margin:y,gap:c,verticalRhythm:u=3,children:h,className:m,style:x,sectionProps:S})=>{const g=O(),C=oe(`(min-width: ${g.breakpoints.sm})`),V={backgroundColor:e,color:r||g.fonts.color,margin:y,...x},v=`calc(${g.fonts.rhythm} * ${u})`,z=C?a||g.layout.padding:l||g.layout.paddingSm,$={"--max-width":t||g.layout.maxWidth,"--min-width":o,"--width":s,"--height":n,"--section-padding":`${v} ${z}`,"--gap":c},N=[wr.section,m].filter(Boolean).join(" ");return d.jsx("section",{...S,className:N,style:V,children:d.jsx("div",{className:wr.innerDiv,style:$,children:h})})},Fr={hero:"Hero-module__hero___IB2tg",content:"Hero-module__content___rkkfQ"},Xo=({isMd:e=!1,isLg:r=!1,theme:t})=>p.useMemo(()=>{const{rhythm:o}=t.fonts;let s=`calc(${o} * 2) 0`,n="2rem",a="1.125rem";return r?(s=`calc(${o} * 4) 0`,n="3.5rem",a="1.5rem"):e&&(s=`calc(${o} * 3.5) 0`,n="3rem",a="1.25rem"),{"--hero-padding":s,"--hero-h1-font-size":n,"--hero-p-font-size":a,"--hero-h1-margin-bottom":`calc(${o} * 0.7)`}},[e,r,t.fonts]),Jo=({color:e,breakpoints:r,children:t,className:o,style:s,...n})=>{const a=O(),l=[Fr.hero,o].filter(Boolean).join(" "),y=(r==null?void 0:r.md)||a.breakpoints.md,c=(r==null?void 0:r.lg)||a.breakpoints.lg,u=oe(`(min-width: ${y})`),h=oe(`(min-width: ${c})`),m=Xo({isMd:u,isLg:h,theme:a});return d.jsx(Cr,{className:l,color:e||a.fonts.color,style:{...m,...s},...n,children:d.jsx("div",{className:Fr.content,children:t})})},xr={footer:"Footer-module__footer___A76NF",container:"Footer-module__container___QneNs"},Yo=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:o,height:s,paddingSm:n,padding:a,margin:l,gap:y,backgroundColor:c,color:u}={})=>{const h=O();return{maxWidth:r||h.layout.maxWidth,minWidth:t,width:o,height:s,padding:e?n||h.layout.paddingSm:a||h.layout.padding,margin:l,gap:y,backgroundColor:c,color:u||h.fonts.color}},zr=({backgroundColor:e,color:r,maxWidth:t,minWidth:o,width:s,height:n,padding:a,paddingSm:l,margin:y,gap:c,breakPoint:u,children:h,className:m,style:x,footerProps:S})=>{const g=O(),C=u||g.breakpoints.sm,{maxWidth:V,unit:v}=pe(C),z=oe(`(max-width: ${V}${v})`),$=Yo({isSmallScreen:z,maxWidth:t,minWidth:o,width:s,height:n,paddingSm:l,padding:a,margin:y,gap:c,backgroundColor:e,color:r}),N=[xr.container,m].filter(Boolean).join(" ");return d.jsx("footer",{...S,className:xr.footer,children:d.jsx("div",{className:N,style:{...$,...x},children:h})})},Te={card:"FeatureCard-module__card___XQt66",icon:"FeatureCard-module__icon___dXJ92",title:"FeatureCard-module__title___KxXyA",content:"FeatureCard-module__content___68xkw"},Ro=({isMd:e=!1,theme:r})=>p.useMemo(()=>{const{rhythm:t}=r.fonts;return{"--feature-icon-font-size":e?"3rem":"2.5rem","--feature-title-font-size":e?"1.5rem":"1.25rem","--feature-card-padding":`calc(${t} * 1)`,"--feature-icon-margin-bottom":`calc(${t} * 0.7)`,"--feature-title-margin-bottom":`calc(${t} * 0.5)`}},[e,r.fonts]),es=({breakpoint:e,icon:r,title:t,children:o,className:s,style:n,divProps:a})=>{const l=O(),y=[Te.card,s].filter(Boolean).join(" "),c=e||l.breakpoints.md,u=oe(`(min-width: ${c})`),h=Ro({isMd:u,theme:l});return d.jsxs("div",{...a,className:y,style:{...h,...n},children:[r&&d.jsx("div",{className:Te.icon,children:r}),d.jsx("h3",{className:Te.title,children:t}),d.jsx("div",{className:Te.content,children:o})]})},ts={grid:"FeatureGrid-module__grid___6sW6f"},rs=({columns:e,isMd:r=!1,isLg:t=!1})=>p.useMemo(()=>r?r&&!t&&(e===3||e===4)?{"--grid-template-columns":"repeat(2, 1fr)"}:{"--grid-template-columns":{1:"1fr",2:"repeat(2, 1fr)",3:"repeat(3, 1fr)",4:"repeat(4, 1fr)"}[e]}:{"--grid-template-columns":"1fr"},[e,r,t]),os=({columns:e=3,breakpoints:r,gap:t,children:o,className:s,style:n})=>{const a=O(),l=(r==null?void 0:r.md)||a.breakpoints.md,y=(r==null?void 0:r.lg)||a.breakpoints.lg,c=oe(`(min-width: ${l})`),u=oe(`(min-width: ${y})`),m={...rs({columns:e,isMd:c,isLg:u}),gap:t,...n};return d.jsx("div",{className:[ts.grid,s].filter(Boolean).join(" "),style:m,children:o})},ke={card:"MediaCard-module__card___9pZ7C",clickable:"MediaCard-module__clickable___Rae9n",vertical:"MediaCard-module__vertical___GWtOA",imageWrapper:"MediaCard-module__imageWrapper___HUiag",horizontal:"MediaCard-module__horizontal___qlK4y",content:"MediaCard-module__content___MlqE4"},ss=({direction:e="column",imageSlot:r,imageWidth:t,border:o,backgroundColor:s,padding:n="0",children:a,className:l,style:y,onClick:c,actions:u,divProps:h})=>{const m=[ke.card,e==="row"?ke.horizontal:ke.vertical,c?ke.clickable:void 0,l].filter(Boolean).join(" "),x=S=>{c&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),c())};return d.jsxs(kr,{border:o,backgroundColor:s,padding:n,className:m,style:{...t&&e==="row"&&{"--media-card-image-width":t},...y},divProps:{...h,onClick:c,onKeyDown:c?x:void 0,role:c?"button":void 0,tabIndex:c?0:void 0},children:[r&&d.jsx("div",{className:ke.imageWrapper,children:r}),d.jsx("div",{className:ke.content,children:a}),u]})},ht={layoutContainer:"PageLayout-module__layoutContainer___diLdT",content:"PageLayout-module__content___h2mBr",main:"PageLayout-module__main___Sw7Pv"},ns=({header:e,footer:r,children:t,className:o,style:s,headerProps:n,footerProps:a,divProps:l,mainProps:y})=>{const c=[ht.layoutContainer,o].filter(Boolean).join(" ");return d.jsxs("div",{...l,className:c,style:s,children:[d.jsxs("div",{className:ht.content,children:[e&&d.jsx(pr,{...n,children:e}),d.jsx("main",{...y,className:ht.main,children:t})]}),r&&d.jsx(zr,{...a,children:r})]})},ie={dropzone:"FileUpload-module__dropzone___jqua0",loading:"FileUpload-module__loading___C7PsH",dragOver:"FileUpload-module__dragOver___q1zPo",hiddenInput:"FileUpload-module__hiddenInput___RLLPJ",content:"FileUpload-module__content___yCP0l",contentHidden:"FileUpload-module__contentHidden___0Ewoe",spinnerOverlay:"FileUpload-module__spinnerOverlay___e3Rle",label:"FileUpload-module__label___lbMkx",hint:"FileUpload-module__hint___8dXlk",errorMessage:"FileUpload-module__errorMessage___8HB3n"},as=({color:e})=>d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:e,width:"48",height:"48","aria-hidden":!0,children:d.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"})}),ls=({onUpload:e,accept:r,maxSizeBytes:t,loading:o=!1,error:s,label:n="Click or drag & drop a file here",className:a,style:l,divProps:y,inputProps:c})=>{const u=O(),h=p.useRef(null),[m,x]=p.useState(!1),[S,g]=p.useState(null),C=s||S,V=C?u.colors.error:u.colors.primary,v=C?u.colors.error:u.colors.primary,z=p.useCallback(M=>{if(g(null),t&&M.size>t){const P=(t/1048576).toFixed(1);g(`File exceeds maximum size of ${P} MB`);return}e(M)},[t,e]),$=()=>{var M;o||(M=h.current)==null||M.click()},N=M=>{var P;(M.key==="Enter"||M.key===" ")&&!o&&(M.preventDefault(),(P=h.current)==null||P.click())},D=M=>{var T;const P=(T=M.target.files)==null?void 0:T[0];P&&z(P),M.target.value=""},A=M=>{M.preventDefault(),o||x(!0)},q=()=>x(!1),B=M=>{var T;if(M.preventDefault(),x(!1),o)return;const P=(T=M.dataTransfer.files)==null?void 0:T[0];P&&z(P)},X=[ie.dropzone,m&&ie.dragOver,o&&ie.loading,a].filter(Boolean).join(" "),G={"--upload-color":V,borderColor:V,borderWidth:u.border.width,borderRadius:u.border.radius,fontSize:"1em",color:v,...l};return d.jsxs("div",{...y,className:X,style:G,onClick:$,onKeyDown:N,onDragOver:A,onDragLeave:q,onDrop:B,role:"button",tabIndex:o?-1:0,"aria-disabled":o,"aria-label":n,children:[d.jsx("input",{...c,ref:h,type:"file",accept:r,onChange:D,disabled:o,className:ie.hiddenInput,tabIndex:-1,"aria-hidden":!0}),o&&d.jsx(yt,{fullScreen:!1,className:ie.spinnerOverlay,style:{fontSize:"1.5em"}}),d.jsxs("div",{className:[ie.content,o&&ie.contentHidden].filter(Boolean).join(" "),"aria-hidden":o||void 0,children:[d.jsx(as,{color:V}),d.jsx("span",{className:ie.label,children:n}),r&&d.jsxs("span",{className:ie.hint,children:["Accepted: ",r]}),t&&d.jsxs("span",{className:ie.hint,children:["Max size: ",(t/(1024*1024)).toFixed(1)," MB"]}),C&&d.jsx("span",{className:ie.errorMessage,role:"alert",children:C})]})]})},_t={container:"Image-module__container___sVJdZ",img:"Image-module__img___pKhPw",fallback:"Image-module__fallback___wysuM"},is={skeleton:"Skeleton-module__skeleton___CB4uF"},pt=({className:e,style:r,divProps:t})=>{const o=O(),s=[is.skeleton,e].filter(Boolean).join(" ");return d.jsx("div",{...t,className:s,style:{borderRadius:o.border.radius,...r},"aria-label":"Loading","aria-busy":!0})},cs=({src:e,alt:r="",aspectRatio:t="1 / 1",loading:o=!1,skeletonDelay:s=150,fallback:n,className:a,style:l,imgProps:y})=>{const c=O(),[u,h]=p.useState(null),[m,x]=p.useState(null),[S,g]=p.useState(null),C=u===e,V=m===e,v=S===e;p.useEffect(()=>{if(!e)return;const q=setTimeout(()=>g(e),s);return()=>clearTimeout(q)},[e,s]);const z=o||!!e&&!C&&!V&&v,$=!o&&(!e||V),N=!o&&!!e&&!V,D=[_t.container,a].filter(Boolean).join(" "),A={aspectRatio:t,borderRadius:c.border.radius,...l};return d.jsxs("div",{className:D,style:A,"aria-label":$?r||"Image placeholder":void 0,"aria-busy":z||void 0,children:[z&&d.jsx(pt,{style:{borderRadius:"inherit",position:"absolute",inset:0}}),$&&d.jsx("div",{className:_t.fallback,children:n??null}),N&&d.jsx("img",{...y,src:e,alt:r,className:_t.img,style:{opacity:C?1:0},onLoad:()=>e&&h(e),onError:()=>e&&x(e)})]})},_e={thumbnail:"ImageThumbnail-module__thumbnail___-igbe",img:"ImageThumbnail-module__img___Q7Z4V",sizeXs:"ImageThumbnail-module__sizeXs___TvSHV",sizeSmall:"ImageThumbnail-module__sizeSmall___2KnCh",sizeDefault:"ImageThumbnail-module__sizeDefault___laoQk",sizeLarge:"ImageThumbnail-module__sizeLarge___iwz3o",removeButton:"ImageThumbnail-module__removeButton___Ceh1Q"},ds={xs:_e.sizeXs,small:_e.sizeSmall,default:_e.sizeDefault,large:_e.sizeLarge},us=({color:e})=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"1.5",width:"40%",height:"40%","aria-hidden":!0,children:[d.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),d.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),d.jsx("polyline",{points:"21 15 16 10 5 21"})]}),fs=({src:e,alt:r="",size:t="default",loading:o=!1,skeletonDelay:s=500,onRemove:n,removeLabel:a="Remove",fallback:l,className:y,style:c,imgProps:u})=>{const h=O(),[m,x]=p.useState(null),[S,g]=p.useState(null),[C,V]=p.useState(null),v=m===e,z=S===e,$=C===e;p.useEffect(()=>{if(!e)return;const G=setTimeout(()=>V(e),s);return()=>clearTimeout(G)},[e,s]);const N=o||!!e&&!v&&!z&&$,D=!o&&(!e||z),A=!o&&!!e&&!z,q=[_e.thumbnail,ds[t],y].filter(Boolean).join(" "),B={borderRadius:h.border.radius,...c},X={background:h.colors.primary,color:h.buttons.primary.textColor,borderRadius:"50%"};return d.jsxs("div",{className:q,style:B,"aria-label":D?r||"Image placeholder":void 0,"aria-busy":N||void 0,children:[N&&d.jsx(pt,{style:{borderRadius:"inherit",position:"absolute",inset:0}}),D&&(l??d.jsx(us,{color:h.colors.primary})),A&&d.jsx("img",{...u,src:e,alt:r,className:_e.img,style:{opacity:v?1:0},onLoad:()=>e&&x(e),onError:()=>e&&g(e)}),n&&d.jsx("button",{type:"button",className:_e.removeButton,style:X,onClick:G=>{G.stopPropagation(),n()},"aria-label":a,children:d.jsxs("svg",{viewBox:"0 0 10 10",width:"60%",height:"60%",fill:"none",stroke:"currentColor",strokeWidth:h.fonts.fontWeightHeader>=700?2:1.5,"aria-hidden":!0,children:[d.jsx("line",{x1:"2",y1:"2",x2:"8",y2:"8"}),d.jsx("line",{x1:"8",y1:"2",x2:"2",y2:"8"})]})})]})};E.Button=Ft,E.CSSReset=qr,E.Card=kr,E.Checkbox=Pe,E.FeatureCard=es,E.FeatureGrid=os,E.FileUpload=ls,E.Footer=zr,E.Form=Co,E.FormCheckbox=Lo,E.FormCheckboxGroup=Ao,E.FormError=dr,E.FormField=ue,E.FormGroup=ur,E.FormInput=zo,E.FormLabel=Me,E.FormRadio=Po,E.FormRadioGroup=Bo,E.FormSelect=No,E.FormTextarea=$o,E.Hamburger=hr,E.Header=pr,E.Hero=Jo,E.Image=cs,E.ImageThumbnail=fs,E.Input=fr,E.LoadingSpinner=yt,E.MediaCard=ss,E.Modal=br,E.ModalProvider=Qo,E.NavDropdown=qo,E.NavLink=Go,E.PageLayout=ns,E.Popover=dt,E.Radio=ct,E.ResponsiveNav=Uo,E.ResponsiveNavContext=gr,E.ResponsiveSection=Cr,E.Select=mr,E.Skeleton=pt,E.Stack=vr,E.StyleLoader=Zo,E.Textarea=yr,E.ThemeProvider=Ir,E.parseBreakpoint=pe,E.useFormContext=cr,E.useMediaQuery=oe,E.useModal=Ko,E.useNavLinkStyles=ft,E.useTheme=O,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
package/dist/index.d.ts CHANGED
@@ -18,6 +18,8 @@ export { default as Popover } from './components/Popover';
18
18
  export { default as StyleLoader } from './components/StyleLoader';
19
19
  export { default as LoadingSpinner } from './components/LoadingSpinner';
20
20
  export { default as Modal, ModalProvider, useModal } from './components/Modal';
21
+ export { default as Card } from './components/Card';
22
+ export type { CardProps } from './components/Card';
21
23
  export { default as Stack } from './components/Stack';
22
24
  export { default as ResponsiveSection } from './components/ResponsiveSection';
23
25
  export { default as Hero } from './components/Hero';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,OAAO,IAAI,IAAI,EACf,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,YAAY,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,kBAAkB,GACnB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,YAAY,EACV,eAAe,EACf,UAAU,EACV,WAAW,EACX,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,oBAAoB,EACpB,WAAW,EACX,YAAY,GACb,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EACV,SAAS,EACT,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,WAAW,EACX,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAChG,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EACV,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,YAAY,EACV,UAAU,EACV,WAAW,EACX,WAAW,EACX,aAAa,EACb,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
@@ -3,6 +3,7 @@ import { DeepPartial } from '../types/utils';
3
3
  export interface ThemeColors {
4
4
  primary: string;
5
5
  secondary: string;
6
+ secondaryBackground: string;
6
7
  accent: string;
7
8
  error: string;
8
9
  success: string;
@@ -57,6 +58,9 @@ export interface ThemeBorder {
57
58
  radius: string;
58
59
  width: string;
59
60
  }
61
+ export interface ThemeCard {
62
+ backgroundColor: string;
63
+ }
60
64
  export interface ThemeModal {
61
65
  backgroundColor: string;
62
66
  backdropColor: string;
@@ -71,6 +75,7 @@ export interface Theme {
71
75
  border: ThemeBorder;
72
76
  breakpoints: ThemeBreakpoints;
73
77
  layout: ThemeLayout;
78
+ cards: ThemeCard;
74
79
  modal: ThemeModal;
75
80
  }
76
81
  export declare const defaultTheme: Theme;
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;CACnB;AAWD,eAAO,MAAM,YAAY,EAAE,KAyD1B,CAAC;AAEF,QAAA,MAAM,YAAY,sBAAqC,CAAC;AAExD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAGtD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,QAAO,KAE3B,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeContext.tsx"],"names":[],"mappings":"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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "digital-rabbit-cl",
3
- "version": "2.4.15",
3
+ "version": "2.4.16",
4
4
  "dependencies": {
5
5
  "@hookform/resolvers": "^5.2.2",
6
6
  "react-hook-form": "^7.66.0",