digital-rabbit-cl 2.4.11 → 2.4.12
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.
- package/dist/components/CSSReset/CSSReset.d.ts.map +1 -1
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/digital-rabbit-cl.es.js +867 -842
- package/dist/digital-rabbit-cl.umd.js +22 -4
- package/dist/theme/ThemeContext.d.ts +1 -0
- package/dist/theme/ThemeContext.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
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;--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:var(--font-size);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
|
-
import { jsx as
|
|
3
|
-
import N, { createContext as ht, useContext as
|
|
4
|
-
import { createPortal as
|
|
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-mobile: 16px;--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:var(--font-size);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
|
+
import { jsx as _, jsxs as D, Fragment as Fe } from "react/jsx-runtime";
|
|
3
|
+
import N, { createContext as ht, useContext as or, useState as J, useLayoutEffect as Pt, useSyncExternalStore as Hr, useEffect as ne, useCallback as Ce, useRef as Ve, useMemo as We } from "react";
|
|
4
|
+
import { createPortal as lt } from "react-dom";
|
|
5
5
|
const jr = "Button-module__button___2ZuB7", Wr = "Button-module__sizeSmall___DRT8P", Ur = "Button-module__sizeLarge___yeZSH", Be = {
|
|
6
6
|
button: jr,
|
|
7
7
|
sizeSmall: Wr,
|
|
@@ -15,22 +15,22 @@ const jr = "Button-module__button___2ZuB7", Wr = "Button-module__sizeSmall___DRT
|
|
|
15
15
|
outline: n,
|
|
16
16
|
theme: a
|
|
17
17
|
}) => {
|
|
18
|
-
const
|
|
19
|
-
let c,
|
|
20
|
-
n ? (c = "transparent",
|
|
18
|
+
const i = t || a.colors.primary, f = a.buttons.textColor;
|
|
19
|
+
let c, d, y;
|
|
20
|
+
n ? (c = "transparent", d = i, y = i, e && (c = o || i, d = o || i, y = s || f)) : (c = i, d = i, y = f, e && (c = o || i, d = o || i, y = s || f));
|
|
21
21
|
let m = 1;
|
|
22
22
|
return r ? m = 0.3 : e && !o && (m = 0.75), {
|
|
23
23
|
backgroundColor: c,
|
|
24
|
-
borderColor:
|
|
24
|
+
borderColor: d,
|
|
25
25
|
color: y,
|
|
26
26
|
opacity: m
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
function
|
|
29
|
+
function sr(e, r) {
|
|
30
30
|
const t = { ...e };
|
|
31
31
|
return De(e) && De(r) && Object.keys(r).forEach((o) => {
|
|
32
32
|
const s = r[o], n = e[o];
|
|
33
|
-
De(s) && De(n) ? t[o] =
|
|
33
|
+
De(s) && De(n) ? t[o] = sr(
|
|
34
34
|
n,
|
|
35
35
|
s
|
|
36
36
|
) : s !== void 0 && (t[o] = s);
|
|
@@ -69,7 +69,8 @@ const Xe = {
|
|
|
69
69
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
70
70
|
fontWeightHeader: 700,
|
|
71
71
|
size: "22px",
|
|
72
|
-
|
|
72
|
+
sizeMobile: "16px",
|
|
73
|
+
rhythm: "1.45em",
|
|
73
74
|
fontSizeH1: "2.5rem",
|
|
74
75
|
fontSizeH2: "1.75rem",
|
|
75
76
|
fontSizeH3: "1.38316rem",
|
|
@@ -115,10 +116,10 @@ const Xe = {
|
|
|
115
116
|
backdropColor: "rgba(0, 0, 0, 0.5)",
|
|
116
117
|
boxShadow: "0 10px 40px rgba(0, 0, 0, 0.2)"
|
|
117
118
|
}
|
|
118
|
-
},
|
|
119
|
-
const t = e ?
|
|
120
|
-
return /* @__PURE__ */
|
|
121
|
-
}, R = () =>
|
|
119
|
+
}, nr = ht(ct), ia = ({ theme: e, children: r }) => {
|
|
120
|
+
const t = e ? sr(ct, e) : ct;
|
|
121
|
+
return /* @__PURE__ */ _(nr.Provider, { value: t, children: r });
|
|
122
|
+
}, R = () => or(nr), Gr = ({
|
|
122
123
|
// Core styling
|
|
123
124
|
color: e,
|
|
124
125
|
hoverColor: r,
|
|
@@ -129,10 +130,10 @@ const Xe = {
|
|
|
129
130
|
outline: n = !1,
|
|
130
131
|
type: a = "button",
|
|
131
132
|
// Standard React props
|
|
132
|
-
className:
|
|
133
|
+
className: i,
|
|
133
134
|
style: f,
|
|
134
135
|
buttonProps: c = {},
|
|
135
|
-
onClick:
|
|
136
|
+
onClick: d,
|
|
136
137
|
children: y
|
|
137
138
|
}) => {
|
|
138
139
|
const m = R(), [C, b] = J(!1), k = {
|
|
@@ -145,7 +146,7 @@ const Xe = {
|
|
|
145
146
|
outline: n,
|
|
146
147
|
theme: m
|
|
147
148
|
}),
|
|
148
|
-
fontSize:
|
|
149
|
+
fontSize: "1em",
|
|
149
150
|
borderWidth: m.border.width,
|
|
150
151
|
borderRadius: m.border.radius,
|
|
151
152
|
"--button-padding-small": `calc(${m.fonts.rhythm} * ${m.sizes.small.paddingVertical}) calc(${m.fonts.rhythm} * ${m.buttons.paddingHorizontal})`,
|
|
@@ -156,15 +157,15 @@ const Xe = {
|
|
|
156
157
|
Be.button,
|
|
157
158
|
s === "small" ? Be.sizeSmall : Be.sizeLarge,
|
|
158
159
|
n ? Be.outline : "",
|
|
159
|
-
|
|
160
|
+
i
|
|
160
161
|
].filter(Boolean).join(" ");
|
|
161
|
-
return /* @__PURE__ */
|
|
162
|
+
return /* @__PURE__ */ _(
|
|
162
163
|
"button",
|
|
163
164
|
{
|
|
164
165
|
...c,
|
|
165
166
|
className: V,
|
|
166
167
|
disabled: o,
|
|
167
|
-
onClick:
|
|
168
|
+
onClick: d,
|
|
168
169
|
onMouseEnter: () => b(!0),
|
|
169
170
|
onMouseLeave: () => b(!1),
|
|
170
171
|
type: a,
|
|
@@ -173,20 +174,20 @@ const Xe = {
|
|
|
173
174
|
}
|
|
174
175
|
);
|
|
175
176
|
};
|
|
176
|
-
var
|
|
177
|
+
var Bt = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), Zr = new Uint8Array(16);
|
|
177
178
|
function Kr() {
|
|
178
|
-
if (!
|
|
179
|
+
if (!Bt)
|
|
179
180
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
180
|
-
return
|
|
181
|
+
return Bt(Zr);
|
|
181
182
|
}
|
|
182
|
-
var
|
|
183
|
+
var ar = [];
|
|
183
184
|
for (var Re = 0; Re < 256; ++Re)
|
|
184
|
-
|
|
185
|
+
ar[Re] = (Re + 256).toString(16).substr(1);
|
|
185
186
|
function Qr(e, r) {
|
|
186
|
-
var t = 0, o =
|
|
187
|
+
var t = 0, o = ar;
|
|
187
188
|
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("");
|
|
188
189
|
}
|
|
189
|
-
function
|
|
190
|
+
function ir(e, r, t) {
|
|
190
191
|
var o = r && t || 0;
|
|
191
192
|
typeof e == "string" && (r = e === "binary" ? new Array(16) : null, e = null), e = e || {};
|
|
192
193
|
var s = e.random || (e.rng || Kr)();
|
|
@@ -212,7 +213,7 @@ const Xr = "Checkbox-module__container___aV9qz", Jr = "Checkbox-module__svg___kk
|
|
|
212
213
|
cursor: t ? "default" : "pointer",
|
|
213
214
|
opacity: t ? 0.3 : 1
|
|
214
215
|
};
|
|
215
|
-
}, to = "FormLabel-module__label___0M-fo", ro = "FormLabel-module__disabled___ktIFp",
|
|
216
|
+
}, to = "FormLabel-module__label___0M-fo", ro = "FormLabel-module__disabled___ktIFp", Dt = {
|
|
216
217
|
label: to,
|
|
217
218
|
disabled: ro
|
|
218
219
|
}, oo = ({
|
|
@@ -238,10 +239,10 @@ const Xr = "Checkbox-module__container___aV9qz", Jr = "Checkbox-module__svg___kk
|
|
|
238
239
|
className: n,
|
|
239
240
|
style: a,
|
|
240
241
|
// Element-specific props
|
|
241
|
-
labelProps:
|
|
242
|
+
labelProps: i
|
|
242
243
|
}) => {
|
|
243
|
-
const f = R(), c = f.colors.error,
|
|
244
|
-
color:
|
|
244
|
+
const f = R(), c = f.colors.error, d = t ? c : e || f.colors.primary, y = oo({
|
|
245
|
+
color: d,
|
|
245
246
|
disabled: r,
|
|
246
247
|
fontSize: ".85em"
|
|
247
248
|
}), m = {
|
|
@@ -252,9 +253,9 @@ const Xr = "Checkbox-module__container___aV9qz", Jr = "Checkbox-module__svg___kk
|
|
|
252
253
|
cursor: y.cursor,
|
|
253
254
|
...a
|
|
254
255
|
// Top level style prop overrides
|
|
255
|
-
}, C = [
|
|
256
|
-
return /* @__PURE__ */
|
|
257
|
-
},
|
|
256
|
+
}, C = [Dt.label, r ? Dt.disabled : "", n].filter(Boolean).join(" ");
|
|
257
|
+
return /* @__PURE__ */ _("label", { ...i, className: C, htmlFor: o, style: m, children: s });
|
|
258
|
+
}, dt = ({
|
|
258
259
|
// Color props
|
|
259
260
|
color: e,
|
|
260
261
|
checkmarkColor: r,
|
|
@@ -265,26 +266,26 @@ const Xr = "Checkbox-module__container___aV9qz", Jr = "Checkbox-module__svg___kk
|
|
|
265
266
|
error: n = !1,
|
|
266
267
|
// Form props
|
|
267
268
|
name: a,
|
|
268
|
-
id:
|
|
269
|
+
id: i,
|
|
269
270
|
onChange: f,
|
|
270
271
|
label: c,
|
|
271
|
-
labelStyle:
|
|
272
|
+
labelStyle: d,
|
|
272
273
|
// Style overrides
|
|
273
274
|
className: y,
|
|
274
275
|
style: m,
|
|
275
276
|
// Element-specific props
|
|
276
277
|
divProps: C
|
|
277
278
|
}) => {
|
|
278
|
-
const b = R(),
|
|
279
|
+
const b = R(), p = i || ir(), k = b.colors.error, V = n ? k : e || b.colors.primary, g = eo({
|
|
279
280
|
color: V,
|
|
280
281
|
checkmarkColor: r,
|
|
281
282
|
disabled: s,
|
|
282
283
|
inverted: o
|
|
283
|
-
}), F = (
|
|
284
|
-
s || f(
|
|
284
|
+
}), F = (M) => {
|
|
285
|
+
s || f(M);
|
|
285
286
|
}, z = {
|
|
286
287
|
cursor: g.cursor,
|
|
287
|
-
fontSize:
|
|
288
|
+
fontSize: "1em",
|
|
288
289
|
opacity: g.opacity,
|
|
289
290
|
...m
|
|
290
291
|
// Top-level style prop overrides
|
|
@@ -294,19 +295,19 @@ const Xr = "Checkbox-module__container___aV9qz", Jr = "Checkbox-module__svg___kk
|
|
|
294
295
|
fill: o && t ? g.checkboxColor : "transparent",
|
|
295
296
|
strokeWidth: "25",
|
|
296
297
|
stroke: g.checkboxColor
|
|
297
|
-
},
|
|
298
|
+
}, P = {
|
|
298
299
|
stroke: g.checkmarkColor,
|
|
299
300
|
strokeWidth: "15",
|
|
300
301
|
fill: "transparent"
|
|
301
302
|
}, U = [Je.container, y].filter(Boolean).join(" ");
|
|
302
303
|
return /* @__PURE__ */ D("div", { ...C, className: U, style: z, children: [
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ _(
|
|
304
305
|
"input",
|
|
305
306
|
{
|
|
306
|
-
id:
|
|
307
|
+
id: p,
|
|
307
308
|
checked: t,
|
|
308
309
|
disabled: s,
|
|
309
|
-
onChange: (
|
|
310
|
+
onChange: (M) => F({ target: { checked: M.target.checked, name: a, type: "checkbox" } }),
|
|
310
311
|
name: a,
|
|
311
312
|
style: { display: "none" },
|
|
312
313
|
type: "checkbox"
|
|
@@ -321,17 +322,17 @@ const Xr = "Checkbox-module__container___aV9qz", Jr = "Checkbox-module__svg___kk
|
|
|
321
322
|
style: E,
|
|
322
323
|
className: Je.svg,
|
|
323
324
|
children: [
|
|
324
|
-
/* @__PURE__ */
|
|
325
|
-
t && /* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ _("rect", { x: "0", y: "0", height: "100", width: "100", style: B }),
|
|
326
|
+
t && /* @__PURE__ */ _("path", { d: "M 25 45 L 45 65 L 75 30", style: P })
|
|
326
327
|
]
|
|
327
328
|
}
|
|
328
329
|
),
|
|
329
|
-
c && /* @__PURE__ */
|
|
330
|
+
c && /* @__PURE__ */ _(
|
|
330
331
|
_t,
|
|
331
332
|
{
|
|
332
|
-
htmlFor:
|
|
333
|
+
htmlFor: p,
|
|
333
334
|
className: Je.label,
|
|
334
|
-
style: { paddingBottom: 0, ...
|
|
335
|
+
style: { paddingBottom: 0, ...d },
|
|
335
336
|
color: g.checkboxColor,
|
|
336
337
|
disabled: s,
|
|
337
338
|
error: n,
|
|
@@ -339,16 +340,41 @@ const Xr = "Checkbox-module__container___aV9qz", Jr = "Checkbox-module__svg___kk
|
|
|
339
340
|
}
|
|
340
341
|
)
|
|
341
342
|
] });
|
|
342
|
-
},
|
|
343
|
+
}, la = () => {
|
|
343
344
|
const e = R();
|
|
344
|
-
return
|
|
345
|
+
return Pt(() => {
|
|
345
346
|
const r = document.documentElement;
|
|
346
|
-
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.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));
|
|
347
|
+
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.sizeMobile && r.style.setProperty("--font-size-mobile", e.fonts.sizeMobile), 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));
|
|
348
|
+
}, [e]), Pt(() => {
|
|
349
|
+
const r = "dr-cl-responsive-tokens";
|
|
350
|
+
let t = document.getElementById(r);
|
|
351
|
+
return t || (t = document.createElement("style"), t.id = r, document.head.appendChild(t)), t.textContent = `
|
|
352
|
+
@media (max-width: ${e.breakpoints.md}) {
|
|
353
|
+
html {
|
|
354
|
+
font-size: var(--font-size-mobile);
|
|
355
|
+
--model-order-form-layout-direction: column;
|
|
356
|
+
--model-order-form-image-width: 100%;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
@media (max-width: ${e.breakpoints.sm}) {
|
|
361
|
+
html {
|
|
362
|
+
--order-list-card-gap: 0.6em;
|
|
363
|
+
--order-list-card-align-items: flex-start;
|
|
364
|
+
--order-list-card-image-width: 4.5em;
|
|
365
|
+
--order-list-card-image-padding-top: 0.4em;
|
|
366
|
+
--order-list-content-padding: 0.4em 0.75em 0.4em 0;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
`, () => {
|
|
370
|
+
const o = document.getElementById(r);
|
|
371
|
+
o && document.head.removeChild(o);
|
|
372
|
+
};
|
|
347
373
|
}, [e]), null;
|
|
348
374
|
};
|
|
349
375
|
var Ae = (e) => e.type === "checkbox", _e = (e) => e instanceof Date, ee = (e) => e == null;
|
|
350
376
|
const lr = (e) => typeof e == "object";
|
|
351
|
-
var Z = (e) => !ee(e) && !Array.isArray(e) && lr(e) && !_e(e),
|
|
377
|
+
var Z = (e) => !ee(e) && !Array.isArray(e) && lr(e) && !_e(e), cr = (e) => Z(e) && e.target ? Ae(e.target) ? e.target.checked : e.target.value : e, so = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, dr = (e, r) => e.has(so(r)), no = (e) => {
|
|
352
378
|
const r = e.constructor && e.constructor.prototype;
|
|
353
379
|
return Z(r) && r.hasOwnProperty("isPrototypeOf");
|
|
354
380
|
}, pt = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
@@ -376,22 +402,22 @@ var Ue = (e) => /^\w*$/.test(e), W = (e) => e === void 0, gt = (e) => Array.isAr
|
|
|
376
402
|
let o = -1;
|
|
377
403
|
const s = Ue(r) ? [r] : vt(r), n = s.length, a = n - 1;
|
|
378
404
|
for (; ++o < n; ) {
|
|
379
|
-
const
|
|
405
|
+
const i = s[o];
|
|
380
406
|
let f = t;
|
|
381
407
|
if (o !== a) {
|
|
382
|
-
const c = e[
|
|
408
|
+
const c = e[i];
|
|
383
409
|
f = Z(c) || Array.isArray(c) ? c : isNaN(+s[o + 1]) ? {} : [];
|
|
384
410
|
}
|
|
385
|
-
if (
|
|
411
|
+
if (i === "__proto__" || i === "constructor" || i === "prototype")
|
|
386
412
|
return;
|
|
387
|
-
e[
|
|
413
|
+
e[i] = f, e = e[i];
|
|
388
414
|
}
|
|
389
415
|
};
|
|
390
416
|
const Te = {
|
|
391
417
|
BLUR: "blur",
|
|
392
418
|
FOCUS_OUT: "focusout",
|
|
393
419
|
CHANGE: "change"
|
|
394
|
-
},
|
|
420
|
+
}, ie = {
|
|
395
421
|
onBlur: "onBlur",
|
|
396
422
|
onChange: "onChange",
|
|
397
423
|
onSubmit: "onSubmit",
|
|
@@ -408,7 +434,7 @@ const Te = {
|
|
|
408
434
|
}, ur = N.createContext(null);
|
|
409
435
|
ur.displayName = "HookFormContext";
|
|
410
436
|
const bt = () => N.useContext(ur);
|
|
411
|
-
var
|
|
437
|
+
var fr = (e, r, t, o = !0) => {
|
|
412
438
|
const s = {
|
|
413
439
|
defaultValues: r._defaultValues
|
|
414
440
|
};
|
|
@@ -416,14 +442,14 @@ var dr = (e, r, t, o = !0) => {
|
|
|
416
442
|
Object.defineProperty(s, n, {
|
|
417
443
|
get: () => {
|
|
418
444
|
const a = n;
|
|
419
|
-
return r._proxyFormState[a] !==
|
|
445
|
+
return r._proxyFormState[a] !== ie.all && (r._proxyFormState[a] = !o || ie.all), t && (t[a] = !0), e[a];
|
|
420
446
|
}
|
|
421
447
|
});
|
|
422
448
|
return s;
|
|
423
449
|
};
|
|
424
450
|
const St = typeof window < "u" ? N.useLayoutEffect : N.useEffect;
|
|
425
451
|
function ao(e) {
|
|
426
|
-
const r = bt(), { control: t = r.control, disabled: o, name: s, exact: n } = e || {}, [a,
|
|
452
|
+
const r = bt(), { control: t = r.control, disabled: o, name: s, exact: n } = e || {}, [a, i] = N.useState(t._formState), f = N.useRef({
|
|
427
453
|
isDirty: !1,
|
|
428
454
|
isLoading: !1,
|
|
429
455
|
dirtyFields: !1,
|
|
@@ -438,17 +464,17 @@ function ao(e) {
|
|
|
438
464
|
formState: f.current,
|
|
439
465
|
exact: n,
|
|
440
466
|
callback: (c) => {
|
|
441
|
-
!o &&
|
|
467
|
+
!o && i({
|
|
442
468
|
...t._formState,
|
|
443
469
|
...c
|
|
444
470
|
});
|
|
445
471
|
}
|
|
446
472
|
}), [s, o, n]), N.useEffect(() => {
|
|
447
473
|
f.current.isValid && t._setValid(!0);
|
|
448
|
-
}, [t]), N.useMemo(() =>
|
|
474
|
+
}, [t]), N.useMemo(() => fr(a, t, f.current, !1), [a, t]);
|
|
449
475
|
}
|
|
450
|
-
var oe = (e) => typeof e == "string",
|
|
451
|
-
function
|
|
476
|
+
var oe = (e) => typeof e == "string", ut = (e, r, t, o, s) => oe(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), ft = (e) => ee(e) || !lr(e);
|
|
477
|
+
function le(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
452
478
|
if (ft(e) || ft(r))
|
|
453
479
|
return e === r;
|
|
454
480
|
if (_e(e) && _e(r))
|
|
@@ -464,33 +490,33 @@ function ie(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
|
464
490
|
if (!s.includes(n))
|
|
465
491
|
return !1;
|
|
466
492
|
if (n !== "ref") {
|
|
467
|
-
const
|
|
468
|
-
if (_e(a) && _e(
|
|
493
|
+
const i = r[n];
|
|
494
|
+
if (_e(a) && _e(i) || Z(a) && Z(i) || Array.isArray(a) && Array.isArray(i) ? !le(a, i, t) : a !== i)
|
|
469
495
|
return !1;
|
|
470
496
|
}
|
|
471
497
|
}
|
|
472
498
|
return !0;
|
|
473
499
|
}
|
|
474
|
-
function
|
|
475
|
-
const r = bt(), { control: t = r.control, name: o, defaultValue: s, disabled: n, exact: a, compute:
|
|
476
|
-
c.current =
|
|
500
|
+
function io(e) {
|
|
501
|
+
const r = bt(), { control: t = r.control, name: o, defaultValue: s, disabled: n, exact: a, compute: i } = e || {}, f = N.useRef(s), c = N.useRef(i), d = N.useRef(void 0), y = N.useRef(t), m = N.useRef(o);
|
|
502
|
+
c.current = i;
|
|
477
503
|
const [C, b] = N.useState(() => {
|
|
478
504
|
const z = t._getWatch(o, f.current);
|
|
479
505
|
return c.current ? c.current(z) : z;
|
|
480
|
-
}),
|
|
481
|
-
const E =
|
|
506
|
+
}), p = N.useCallback((z) => {
|
|
507
|
+
const E = ut(o, t._names, z || t._formValues, !1, f.current);
|
|
482
508
|
return c.current ? c.current(E) : E;
|
|
483
509
|
}, [t._formValues, t._names, o]), k = N.useCallback((z) => {
|
|
484
510
|
if (!n) {
|
|
485
|
-
const E =
|
|
511
|
+
const E = ut(o, t._names, z || t._formValues, !1, f.current);
|
|
486
512
|
if (c.current) {
|
|
487
513
|
const B = c.current(E);
|
|
488
|
-
|
|
514
|
+
le(B, d.current) || (b(B), d.current = B);
|
|
489
515
|
} else
|
|
490
516
|
b(E);
|
|
491
517
|
}
|
|
492
518
|
}, [t._formValues, t._names, n, o]);
|
|
493
|
-
St(() => ((y.current !== t || !
|
|
519
|
+
St(() => ((y.current !== t || !le(m.current, o)) && (y.current = t, m.current = o, k()), t._subscribe({
|
|
494
520
|
name: o,
|
|
495
521
|
formState: {
|
|
496
522
|
values: !0
|
|
@@ -503,18 +529,18 @@ function lo(e) {
|
|
|
503
529
|
const V = y.current !== t, g = m.current, F = N.useMemo(() => {
|
|
504
530
|
if (n)
|
|
505
531
|
return null;
|
|
506
|
-
const z = !V && !
|
|
507
|
-
return V || z ?
|
|
508
|
-
}, [n, V, o, g,
|
|
532
|
+
const z = !V && !le(g, o);
|
|
533
|
+
return V || z ? p() : null;
|
|
534
|
+
}, [n, V, o, g, p]);
|
|
509
535
|
return F !== null ? F : C;
|
|
510
536
|
}
|
|
511
|
-
function
|
|
512
|
-
const r = bt(), { name: t, disabled: o, control: s = r.control, shouldUnregister: n, defaultValue: a } = e,
|
|
537
|
+
function lo(e) {
|
|
538
|
+
const r = bt(), { name: t, disabled: o, control: s = r.control, shouldUnregister: n, defaultValue: a } = e, i = dr(s._names.array, t), f = N.useMemo(() => w(s._formValues, t, w(s._defaultValues, t, a)), [s, t, a]), c = io({
|
|
513
539
|
control: s,
|
|
514
540
|
name: t,
|
|
515
541
|
defaultValue: f,
|
|
516
542
|
exact: !0
|
|
517
|
-
}),
|
|
543
|
+
}), d = ao({
|
|
518
544
|
control: s,
|
|
519
545
|
name: t,
|
|
520
546
|
exact: !0
|
|
@@ -527,27 +553,27 @@ function io(e) {
|
|
|
527
553
|
const b = N.useMemo(() => Object.defineProperties({}, {
|
|
528
554
|
invalid: {
|
|
529
555
|
enumerable: !0,
|
|
530
|
-
get: () => !!w(
|
|
556
|
+
get: () => !!w(d.errors, t)
|
|
531
557
|
},
|
|
532
558
|
isDirty: {
|
|
533
559
|
enumerable: !0,
|
|
534
|
-
get: () => !!w(
|
|
560
|
+
get: () => !!w(d.dirtyFields, t)
|
|
535
561
|
},
|
|
536
562
|
isTouched: {
|
|
537
563
|
enumerable: !0,
|
|
538
|
-
get: () => !!w(
|
|
564
|
+
get: () => !!w(d.touchedFields, t)
|
|
539
565
|
},
|
|
540
566
|
isValidating: {
|
|
541
567
|
enumerable: !0,
|
|
542
|
-
get: () => !!w(
|
|
568
|
+
get: () => !!w(d.validatingFields, t)
|
|
543
569
|
},
|
|
544
570
|
error: {
|
|
545
571
|
enumerable: !0,
|
|
546
|
-
get: () => w(
|
|
572
|
+
get: () => w(d.errors, t)
|
|
547
573
|
}
|
|
548
|
-
}), [
|
|
574
|
+
}), [d, t]), p = N.useCallback((F) => C.current.onChange({
|
|
549
575
|
target: {
|
|
550
|
-
value:
|
|
576
|
+
value: cr(F),
|
|
551
577
|
name: t
|
|
552
578
|
},
|
|
553
579
|
type: Te.CHANGE
|
|
@@ -568,38 +594,38 @@ function io(e) {
|
|
|
568
594
|
}, [s._fields, t]), g = N.useMemo(() => ({
|
|
569
595
|
name: t,
|
|
570
596
|
value: c,
|
|
571
|
-
...re(o) ||
|
|
572
|
-
onChange:
|
|
597
|
+
...re(o) || d.disabled ? { disabled: d.disabled || o } : {},
|
|
598
|
+
onChange: p,
|
|
573
599
|
onBlur: k,
|
|
574
600
|
ref: V
|
|
575
|
-
}), [t, o,
|
|
601
|
+
}), [t, o, d.disabled, p, k, V, c]);
|
|
576
602
|
return N.useEffect(() => {
|
|
577
603
|
const F = s._options.shouldUnregister || n, z = m.current;
|
|
578
|
-
z && z !== t && !
|
|
604
|
+
z && z !== t && !i && s.unregister(z), s.register(t, {
|
|
579
605
|
...y.current.rules,
|
|
580
606
|
...re(y.current.disabled) ? { disabled: y.current.disabled } : {}
|
|
581
607
|
});
|
|
582
|
-
const E = (B,
|
|
608
|
+
const E = (B, P) => {
|
|
583
609
|
const U = w(s._fields, B);
|
|
584
|
-
U && U._f && (U._f.mount =
|
|
610
|
+
U && U._f && (U._f.mount = P);
|
|
585
611
|
};
|
|
586
612
|
if (E(t, !0), F) {
|
|
587
613
|
const B = X(w(s._options.defaultValues, t, y.current.defaultValue));
|
|
588
614
|
H(s._defaultValues, t, B), W(w(s._formValues, t)) && H(s._formValues, t, B);
|
|
589
615
|
}
|
|
590
|
-
return !
|
|
591
|
-
(
|
|
616
|
+
return !i && s.register(t), m.current = t, () => {
|
|
617
|
+
(i ? F && !s._state.action : F) ? s.unregister(t) : E(t, !1);
|
|
592
618
|
};
|
|
593
|
-
}, [t, s,
|
|
619
|
+
}, [t, s, i, n]), N.useEffect(() => {
|
|
594
620
|
s._setDisabledField({
|
|
595
621
|
disabled: o,
|
|
596
622
|
name: t
|
|
597
623
|
});
|
|
598
624
|
}, [o, t, s]), N.useMemo(() => ({
|
|
599
625
|
field: g,
|
|
600
|
-
formState:
|
|
626
|
+
formState: d,
|
|
601
627
|
fieldState: b
|
|
602
|
-
}), [g,
|
|
628
|
+
}), [g, d, b]);
|
|
603
629
|
}
|
|
604
630
|
var wt = (e, r, t, o, s) => r ? {
|
|
605
631
|
...t[e],
|
|
@@ -607,7 +633,7 @@ var wt = (e, r, t, o, s) => r ? {
|
|
|
607
633
|
...t[e] && t[e].types ? t[e].types : {},
|
|
608
634
|
[o]: s || !0
|
|
609
635
|
}
|
|
610
|
-
} : {}, Ne = (e) => Array.isArray(e) ? e : [e],
|
|
636
|
+
} : {}, Ne = (e) => Array.isArray(e) ? e : [e], Rt = () => {
|
|
611
637
|
let e = [];
|
|
612
638
|
return {
|
|
613
639
|
get observers() {
|
|
@@ -627,13 +653,13 @@ var wt = (e, r, t, o, s) => r ? {
|
|
|
627
653
|
}
|
|
628
654
|
};
|
|
629
655
|
};
|
|
630
|
-
function
|
|
656
|
+
function mr(e, r) {
|
|
631
657
|
const t = {};
|
|
632
658
|
for (const o in e)
|
|
633
659
|
if (e.hasOwnProperty(o)) {
|
|
634
660
|
const s = e[o], n = r[o];
|
|
635
661
|
if (s && Z(s) && n) {
|
|
636
|
-
const a =
|
|
662
|
+
const a = mr(s, n);
|
|
637
663
|
Z(a) && (t[o] = a);
|
|
638
664
|
} else e[o] && (t[o] = n);
|
|
639
665
|
}
|
|
@@ -644,7 +670,7 @@ var Y = (e) => Z(e) && !Object.keys(e).length, kt = (e) => e.type === "file", ce
|
|
|
644
670
|
return !1;
|
|
645
671
|
const r = e ? e.ownerDocument : 0;
|
|
646
672
|
return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement);
|
|
647
|
-
},
|
|
673
|
+
}, yr = (e) => e.type === "select-multiple", xt = (e) => e.type === "radio", co = (e) => xt(e) || Ae(e), Ye = (e) => He(e) && e.isConnected;
|
|
648
674
|
function uo(e, r) {
|
|
649
675
|
const t = r.slice(0, -1).length;
|
|
650
676
|
let o = 0;
|
|
@@ -668,25 +694,25 @@ var mo = (e) => {
|
|
|
668
694
|
return !0;
|
|
669
695
|
return !1;
|
|
670
696
|
};
|
|
671
|
-
function
|
|
697
|
+
function hr(e) {
|
|
672
698
|
return Array.isArray(e) || Z(e) && !mo(e);
|
|
673
699
|
}
|
|
674
700
|
function mt(e, r = {}) {
|
|
675
701
|
for (const t in e)
|
|
676
|
-
|
|
702
|
+
hr(e[t]) ? (r[t] = Array.isArray(e[t]) ? [] : {}, mt(e[t], r[t])) : W(e[t]) || (r[t] = !0);
|
|
677
703
|
return r;
|
|
678
704
|
}
|
|
679
705
|
function ke(e, r, t) {
|
|
680
706
|
t || (t = mt(r));
|
|
681
707
|
for (const o in e)
|
|
682
|
-
|
|
708
|
+
hr(e[o]) ? W(r) || ft(t[o]) ? t[o] = mt(e[o], Array.isArray(e[o]) ? [] : {}) : ke(e[o], ee(r) ? {} : r[o], t[o]) : t[o] = !le(e[o], r[o]);
|
|
683
709
|
return t;
|
|
684
710
|
}
|
|
685
|
-
const
|
|
711
|
+
const Ot = {
|
|
686
712
|
value: !1,
|
|
687
713
|
isValid: !1
|
|
688
|
-
},
|
|
689
|
-
var
|
|
714
|
+
}, It = { value: !0, isValid: !0 };
|
|
715
|
+
var _r = (e) => {
|
|
690
716
|
if (Array.isArray(e)) {
|
|
691
717
|
if (e.length > 1) {
|
|
692
718
|
const r = e.filter((t) => t && t.checked && !t.disabled).map((t) => t.value);
|
|
@@ -694,22 +720,22 @@ var hr = (e) => {
|
|
|
694
720
|
}
|
|
695
721
|
return e[0].checked && !e[0].disabled ? (
|
|
696
722
|
// @ts-expect-error expected to work in the browser
|
|
697
|
-
e[0].attributes && !W(e[0].attributes.value) ? W(e[0].value) || e[0].value === "" ?
|
|
698
|
-
) :
|
|
723
|
+
e[0].attributes && !W(e[0].attributes.value) ? W(e[0].value) || e[0].value === "" ? It : { value: e[0].value, isValid: !0 } : It
|
|
724
|
+
) : Ot;
|
|
699
725
|
}
|
|
700
|
-
return
|
|
701
|
-
},
|
|
702
|
-
const
|
|
726
|
+
return Ot;
|
|
727
|
+
}, pr = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: o }) => W(e) ? e : r ? e === "" ? NaN : e && +e : t && oe(e) ? new Date(e) : o ? o(e) : e;
|
|
728
|
+
const Tt = {
|
|
703
729
|
isValid: !1,
|
|
704
730
|
value: null
|
|
705
731
|
};
|
|
706
|
-
var
|
|
732
|
+
var gr = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? {
|
|
707
733
|
isValid: !0,
|
|
708
734
|
value: t.value
|
|
709
|
-
} : r,
|
|
710
|
-
function
|
|
735
|
+
} : r, Tt) : Tt;
|
|
736
|
+
function Ht(e) {
|
|
711
737
|
const r = e.ref;
|
|
712
|
-
return kt(r) ? r.files : xt(r) ?
|
|
738
|
+
return kt(r) ? r.files : xt(r) ? gr(e.refs).value : yr(r) ? [...r.selectedOptions].map(({ value: t }) => t) : Ae(r) ? _r(e.refs).value : pr(W(r.value) ? e.ref.value : r.value, e);
|
|
713
739
|
}
|
|
714
740
|
var yo = (e, r, t, o) => {
|
|
715
741
|
const s = {};
|
|
@@ -723,33 +749,33 @@ var yo = (e, r, t, o) => {
|
|
|
723
749
|
fields: s,
|
|
724
750
|
shouldUseNativeValidation: o
|
|
725
751
|
};
|
|
726
|
-
}, je = (e) => e instanceof RegExp, ze = (e) => W(e) ? e : je(e) ? e.source : Z(e) ? je(e.value) ? e.value.source : e.value : e,
|
|
727
|
-
isOnSubmit: !e || e ===
|
|
728
|
-
isOnBlur: e ===
|
|
729
|
-
isOnChange: e ===
|
|
730
|
-
isOnAll: e ===
|
|
731
|
-
isOnTouch: e ===
|
|
752
|
+
}, je = (e) => e instanceof RegExp, ze = (e) => W(e) ? e : je(e) ? e.source : Z(e) ? je(e.value) ? e.value.source : e.value : e, jt = (e) => ({
|
|
753
|
+
isOnSubmit: !e || e === ie.onSubmit,
|
|
754
|
+
isOnBlur: e === ie.onBlur,
|
|
755
|
+
isOnChange: e === ie.onChange,
|
|
756
|
+
isOnAll: e === ie.all,
|
|
757
|
+
isOnTouch: e === ie.onTouched
|
|
732
758
|
});
|
|
733
|
-
const
|
|
734
|
-
var ho = (e) => !!e && !!e.validate && !!(ce(e.validate) && e.validate.constructor.name ===
|
|
759
|
+
const Wt = "AsyncFunction";
|
|
760
|
+
var ho = (e) => !!e && !!e.validate && !!(ce(e.validate) && e.validate.constructor.name === Wt || Z(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === Wt)), _o = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Ut = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((o) => e.startsWith(o) && /^\.\w+/.test(e.slice(o.length))));
|
|
735
761
|
const $e = (e, r, t, o) => {
|
|
736
762
|
for (const s of t || Object.keys(e)) {
|
|
737
763
|
const n = w(e, s);
|
|
738
764
|
if (n) {
|
|
739
|
-
const { _f: a, ...
|
|
765
|
+
const { _f: a, ...i } = n;
|
|
740
766
|
if (a) {
|
|
741
767
|
if (a.refs && a.refs[0] && r(a.refs[0], s) && !o)
|
|
742
768
|
return !0;
|
|
743
769
|
if (a.ref && r(a.ref, a.name) && !o)
|
|
744
770
|
return !0;
|
|
745
|
-
if ($e(
|
|
771
|
+
if ($e(i, r))
|
|
746
772
|
break;
|
|
747
|
-
} else if (Z(
|
|
773
|
+
} else if (Z(i) && $e(i, r))
|
|
748
774
|
break;
|
|
749
775
|
}
|
|
750
776
|
}
|
|
751
777
|
};
|
|
752
|
-
function
|
|
778
|
+
function qt(e, r, t) {
|
|
753
779
|
const o = w(e, t);
|
|
754
780
|
if (o || Ue(t))
|
|
755
781
|
return {
|
|
@@ -758,18 +784,18 @@ function Ut(e, r, t) {
|
|
|
758
784
|
};
|
|
759
785
|
const s = t.split(".");
|
|
760
786
|
for (; s.length; ) {
|
|
761
|
-
const n = s.join("."), a = w(r, n),
|
|
787
|
+
const n = s.join("."), a = w(r, n), i = w(e, n);
|
|
762
788
|
if (a && !Array.isArray(a) && t !== n)
|
|
763
789
|
return { name: t };
|
|
764
|
-
if (
|
|
790
|
+
if (i && i.type)
|
|
765
791
|
return {
|
|
766
792
|
name: n,
|
|
767
|
-
error:
|
|
793
|
+
error: i
|
|
768
794
|
};
|
|
769
|
-
if (
|
|
795
|
+
if (i && i.root && i.root.type)
|
|
770
796
|
return {
|
|
771
797
|
name: `${n}.root`,
|
|
772
|
-
error:
|
|
798
|
+
error: i.root
|
|
773
799
|
};
|
|
774
800
|
s.pop();
|
|
775
801
|
}
|
|
@@ -780,12 +806,12 @@ function Ut(e, r, t) {
|
|
|
780
806
|
var po = (e, r, t, o) => {
|
|
781
807
|
t(e);
|
|
782
808
|
const { name: s, ...n } = e;
|
|
783
|
-
return Y(n) || Object.keys(n).length >= Object.keys(r).length || Object.keys(n).find((a) => r[a] === (!o ||
|
|
809
|
+
return Y(n) || Object.keys(n).length >= Object.keys(r).length || Object.keys(n).find((a) => r[a] === (!o || ie.all));
|
|
784
810
|
}, go = (e, r, t) => !e || !r || e === r || Ne(e).some((o) => o && (t ? o === r : o.startsWith(r) || r.startsWith(o))), vo = (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, bo = (e, r) => !gt(w(e, r)).length && G(e, r), So = (e, r, t) => {
|
|
785
811
|
const o = Ne(w(e, t));
|
|
786
812
|
return H(o, "root", r[t]), H(e, t, o), e;
|
|
787
813
|
};
|
|
788
|
-
function
|
|
814
|
+
function Gt(e, r, t = "validate") {
|
|
789
815
|
if (oe(e) || Array.isArray(e) && e.every(oe) || re(e) && !e)
|
|
790
816
|
return {
|
|
791
817
|
type: t,
|
|
@@ -796,24 +822,24 @@ function qt(e, r, t = "validate") {
|
|
|
796
822
|
var be = (e) => Z(e) && !je(e) ? e : {
|
|
797
823
|
value: e,
|
|
798
824
|
message: ""
|
|
799
|
-
},
|
|
800
|
-
const { ref: a, refs:
|
|
801
|
-
if (!V || r.has(
|
|
825
|
+
}, Zt = async (e, r, t, o, s, n) => {
|
|
826
|
+
const { ref: a, refs: i, required: f, maxLength: c, minLength: d, min: y, max: m, pattern: C, validate: b, name: p, valueAsNumber: k, mount: V } = e._f, g = w(t, p);
|
|
827
|
+
if (!V || r.has(p))
|
|
802
828
|
return {};
|
|
803
|
-
const F =
|
|
829
|
+
const F = i ? i[0] : a, z = (L) => {
|
|
804
830
|
s && F.reportValidity && (F.setCustomValidity(re(L) ? "" : L || ""), F.reportValidity());
|
|
805
|
-
}, E = {}, B = xt(a),
|
|
831
|
+
}, E = {}, B = xt(a), P = Ae(a), U = B || P, M = (k || kt(a)) && W(a.value) && W(g) || He(a) && a.value === "" || g === "" || Array.isArray(g) && !g.length, K = wt.bind(null, p, o, E), q = (L, A, O, I = fe.maxLength, Q = fe.minLength) => {
|
|
806
832
|
const te = L ? A : O;
|
|
807
|
-
E[
|
|
833
|
+
E[p] = {
|
|
808
834
|
type: L ? I : Q,
|
|
809
835
|
message: te,
|
|
810
836
|
ref: a,
|
|
811
837
|
...K(L ? I : Q, te)
|
|
812
838
|
};
|
|
813
839
|
};
|
|
814
|
-
if (n ? !Array.isArray(g) || !g.length : f && (!U && (
|
|
840
|
+
if (n ? !Array.isArray(g) || !g.length : f && (!U && (M || ee(g)) || re(g) && !g || P && !_r(i).isValid || B && !gr(i).isValid)) {
|
|
815
841
|
const { value: L, message: A } = oe(f) ? { value: !!f, message: f } : be(f);
|
|
816
|
-
if (L && (E[
|
|
842
|
+
if (L && (E[p] = {
|
|
817
843
|
type: fe.required,
|
|
818
844
|
message: A,
|
|
819
845
|
ref: F,
|
|
@@ -821,27 +847,27 @@ var be = (e) => Z(e) && !je(e) ? e : {
|
|
|
821
847
|
}, !o))
|
|
822
848
|
return z(A), E;
|
|
823
849
|
}
|
|
824
|
-
if (!
|
|
850
|
+
if (!M && (!ee(y) || !ee(m))) {
|
|
825
851
|
let L, A;
|
|
826
852
|
const O = be(m), I = be(y);
|
|
827
853
|
if (!ee(g) && !isNaN(g)) {
|
|
828
854
|
const Q = a.valueAsNumber || g && +g;
|
|
829
855
|
ee(O.value) || (L = Q > O.value), ee(I.value) || (A = Q < I.value);
|
|
830
856
|
} else {
|
|
831
|
-
const Q = a.valueAsDate || new Date(g), te = (
|
|
857
|
+
const Q = a.valueAsDate || new Date(g), te = (Me) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Me), me = a.type == "time", ve = a.type == "week";
|
|
832
858
|
oe(O.value) && g && (L = me ? te(g) > te(O.value) : ve ? g > O.value : Q > new Date(O.value)), oe(I.value) && g && (A = me ? te(g) < te(I.value) : ve ? g < I.value : Q < new Date(I.value));
|
|
833
859
|
}
|
|
834
860
|
if ((L || A) && (q(!!L, O.message, I.message, fe.max, fe.min), !o))
|
|
835
|
-
return z(E[
|
|
861
|
+
return z(E[p].message), E;
|
|
836
862
|
}
|
|
837
|
-
if ((c ||
|
|
838
|
-
const L = be(c), A = be(
|
|
863
|
+
if ((c || d) && !M && (oe(g) || n && Array.isArray(g))) {
|
|
864
|
+
const L = be(c), A = be(d), O = !ee(L.value) && g.length > +L.value, I = !ee(A.value) && g.length < +A.value;
|
|
839
865
|
if ((O || I) && (q(O, L.message, A.message), !o))
|
|
840
|
-
return z(E[
|
|
866
|
+
return z(E[p].message), E;
|
|
841
867
|
}
|
|
842
|
-
if (C && !
|
|
868
|
+
if (C && !M && oe(g)) {
|
|
843
869
|
const { value: L, message: A } = be(C);
|
|
844
|
-
if (je(L) && !g.match(L) && (E[
|
|
870
|
+
if (je(L) && !g.match(L) && (E[p] = {
|
|
845
871
|
type: fe.pattern,
|
|
846
872
|
message: A,
|
|
847
873
|
ref: a,
|
|
@@ -851,8 +877,8 @@ var be = (e) => Z(e) && !je(e) ? e : {
|
|
|
851
877
|
}
|
|
852
878
|
if (b) {
|
|
853
879
|
if (ce(b)) {
|
|
854
|
-
const L = await b(g, t), A =
|
|
855
|
-
if (A && (E[
|
|
880
|
+
const L = await b(g, t), A = Gt(L, F);
|
|
881
|
+
if (A && (E[p] = {
|
|
856
882
|
...A,
|
|
857
883
|
...K(fe.validate, A.message)
|
|
858
884
|
}, !o))
|
|
@@ -862,13 +888,13 @@ var be = (e) => Z(e) && !je(e) ? e : {
|
|
|
862
888
|
for (const A in b) {
|
|
863
889
|
if (!Y(L) && !o)
|
|
864
890
|
break;
|
|
865
|
-
const O =
|
|
891
|
+
const O = Gt(await b[A](g, t), F, A);
|
|
866
892
|
O && (L = {
|
|
867
893
|
...O,
|
|
868
894
|
...K(A, O.message)
|
|
869
|
-
}, z(O.message), o && (E[
|
|
895
|
+
}, z(O.message), o && (E[p] = L));
|
|
870
896
|
}
|
|
871
|
-
if (!Y(L) && (E[
|
|
897
|
+
if (!Y(L) && (E[p] = {
|
|
872
898
|
ref: F,
|
|
873
899
|
...L
|
|
874
900
|
}, !o))
|
|
@@ -878,8 +904,8 @@ var be = (e) => Z(e) && !je(e) ? e : {
|
|
|
878
904
|
return z(!0), E;
|
|
879
905
|
};
|
|
880
906
|
const wo = {
|
|
881
|
-
mode:
|
|
882
|
-
reValidateMode:
|
|
907
|
+
mode: ie.onSubmit,
|
|
908
|
+
reValidateMode: ie.onChange,
|
|
883
909
|
shouldFocusError: !0
|
|
884
910
|
};
|
|
885
911
|
function ko(e = {}) {
|
|
@@ -905,14 +931,14 @@ function ko(e = {}) {
|
|
|
905
931
|
action: !1,
|
|
906
932
|
mount: !1,
|
|
907
933
|
watch: !1
|
|
908
|
-
},
|
|
934
|
+
}, i = {
|
|
909
935
|
mount: /* @__PURE__ */ new Set(),
|
|
910
936
|
disabled: /* @__PURE__ */ new Set(),
|
|
911
937
|
unMount: /* @__PURE__ */ new Set(),
|
|
912
938
|
array: /* @__PURE__ */ new Set(),
|
|
913
939
|
watch: /* @__PURE__ */ new Set()
|
|
914
940
|
}, f, c = 0;
|
|
915
|
-
const
|
|
941
|
+
const d = {
|
|
916
942
|
isDirty: !1,
|
|
917
943
|
dirtyFields: !1,
|
|
918
944
|
validatingFields: !1,
|
|
@@ -922,353 +948,353 @@ function ko(e = {}) {
|
|
|
922
948
|
errors: !1
|
|
923
949
|
};
|
|
924
950
|
let y = {
|
|
925
|
-
...
|
|
951
|
+
...d
|
|
926
952
|
};
|
|
927
953
|
const m = {
|
|
928
|
-
array:
|
|
929
|
-
state:
|
|
930
|
-
}, C = r.criteriaMode ===
|
|
931
|
-
clearTimeout(c), c = setTimeout(
|
|
932
|
-
},
|
|
933
|
-
if (!r.disabled && (
|
|
934
|
-
const
|
|
935
|
-
|
|
936
|
-
isValid:
|
|
954
|
+
array: Rt(),
|
|
955
|
+
state: Rt()
|
|
956
|
+
}, C = r.criteriaMode === ie.all, b = (l) => (u) => {
|
|
957
|
+
clearTimeout(c), c = setTimeout(l, u);
|
|
958
|
+
}, p = async (l) => {
|
|
959
|
+
if (!r.disabled && (d.isValid || y.isValid || l)) {
|
|
960
|
+
const u = r.resolver ? Y((await P()).errors) : await M(o, !0);
|
|
961
|
+
u !== t.isValid && m.state.next({
|
|
962
|
+
isValid: u
|
|
937
963
|
});
|
|
938
964
|
}
|
|
939
|
-
}, k = (
|
|
940
|
-
!r.disabled && (
|
|
941
|
-
h && (
|
|
965
|
+
}, k = (l, u) => {
|
|
966
|
+
!r.disabled && (d.isValidating || d.validatingFields || y.isValidating || y.validatingFields) && ((l || Array.from(i.mount)).forEach((h) => {
|
|
967
|
+
h && (u ? H(t.validatingFields, h, u) : G(t.validatingFields, h));
|
|
942
968
|
}), m.state.next({
|
|
943
969
|
validatingFields: t.validatingFields,
|
|
944
970
|
isValidating: !Y(t.validatingFields)
|
|
945
971
|
}));
|
|
946
|
-
}, V = (
|
|
972
|
+
}, V = (l, u = [], h, x, S = !0, v = !0) => {
|
|
947
973
|
if (x && h && !r.disabled) {
|
|
948
|
-
if (a.action = !0, v && Array.isArray(w(o,
|
|
949
|
-
const $ = h(w(o,
|
|
950
|
-
S && H(o,
|
|
974
|
+
if (a.action = !0, v && Array.isArray(w(o, l))) {
|
|
975
|
+
const $ = h(w(o, l), x.argA, x.argB);
|
|
976
|
+
S && H(o, l, $);
|
|
951
977
|
}
|
|
952
|
-
if (v && Array.isArray(w(t.errors,
|
|
953
|
-
const $ = h(w(t.errors,
|
|
954
|
-
S && H(t.errors,
|
|
978
|
+
if (v && Array.isArray(w(t.errors, l))) {
|
|
979
|
+
const $ = h(w(t.errors, l), x.argA, x.argB);
|
|
980
|
+
S && H(t.errors, l, $), bo(t.errors, l);
|
|
955
981
|
}
|
|
956
|
-
if ((
|
|
957
|
-
const $ = h(w(t.touchedFields,
|
|
958
|
-
S && H(t.touchedFields,
|
|
982
|
+
if ((d.touchedFields || y.touchedFields) && v && Array.isArray(w(t.touchedFields, l))) {
|
|
983
|
+
const $ = h(w(t.touchedFields, l), x.argA, x.argB);
|
|
984
|
+
S && H(t.touchedFields, l, $);
|
|
959
985
|
}
|
|
960
|
-
(
|
|
961
|
-
name:
|
|
962
|
-
isDirty: q(
|
|
986
|
+
(d.dirtyFields || y.dirtyFields) && (t.dirtyFields = ke(s, n)), m.state.next({
|
|
987
|
+
name: l,
|
|
988
|
+
isDirty: q(l, u),
|
|
963
989
|
dirtyFields: t.dirtyFields,
|
|
964
990
|
errors: t.errors,
|
|
965
991
|
isValid: t.isValid
|
|
966
992
|
});
|
|
967
993
|
} else
|
|
968
|
-
H(n,
|
|
969
|
-
}, g = (
|
|
970
|
-
H(t.errors,
|
|
994
|
+
H(n, l, u);
|
|
995
|
+
}, g = (l, u) => {
|
|
996
|
+
H(t.errors, l, u), m.state.next({
|
|
971
997
|
errors: t.errors
|
|
972
998
|
});
|
|
973
|
-
}, F = (
|
|
974
|
-
t.errors =
|
|
999
|
+
}, F = (l) => {
|
|
1000
|
+
t.errors = l, m.state.next({
|
|
975
1001
|
errors: t.errors,
|
|
976
1002
|
isValid: !1
|
|
977
1003
|
});
|
|
978
|
-
}, z = (
|
|
979
|
-
const S = w(o,
|
|
1004
|
+
}, z = (l, u, h, x) => {
|
|
1005
|
+
const S = w(o, l);
|
|
980
1006
|
if (S) {
|
|
981
|
-
const v = w(n,
|
|
982
|
-
W(v) || x && x.defaultChecked ||
|
|
1007
|
+
const v = w(n, l, W(h) ? w(s, l) : h);
|
|
1008
|
+
W(v) || x && x.defaultChecked || u ? H(n, l, u ? v : Ht(S._f)) : O(l, v), a.mount && p();
|
|
983
1009
|
}
|
|
984
|
-
}, E = (
|
|
1010
|
+
}, E = (l, u, h, x, S) => {
|
|
985
1011
|
let v = !1, $ = !1;
|
|
986
1012
|
const T = {
|
|
987
|
-
name:
|
|
1013
|
+
name: l
|
|
988
1014
|
};
|
|
989
1015
|
if (!r.disabled) {
|
|
990
1016
|
if (!h || x) {
|
|
991
|
-
(
|
|
992
|
-
const j =
|
|
993
|
-
$ = !!w(t.dirtyFields,
|
|
1017
|
+
(d.isDirty || y.isDirty) && ($ = t.isDirty, t.isDirty = T.isDirty = q(), v = $ !== T.isDirty);
|
|
1018
|
+
const j = le(w(s, l), u);
|
|
1019
|
+
$ = !!w(t.dirtyFields, l), j ? G(t.dirtyFields, l) : H(t.dirtyFields, l, !0), T.dirtyFields = t.dirtyFields, v = v || (d.dirtyFields || y.dirtyFields) && $ !== !j;
|
|
994
1020
|
}
|
|
995
1021
|
if (h) {
|
|
996
|
-
const j = w(t.touchedFields,
|
|
997
|
-
j || (H(t.touchedFields,
|
|
1022
|
+
const j = w(t.touchedFields, l);
|
|
1023
|
+
j || (H(t.touchedFields, l, h), T.touchedFields = t.touchedFields, v = v || (d.touchedFields || y.touchedFields) && j !== h);
|
|
998
1024
|
}
|
|
999
1025
|
v && S && m.state.next(T);
|
|
1000
1026
|
}
|
|
1001
1027
|
return v ? T : {};
|
|
1002
|
-
}, B = (
|
|
1003
|
-
const S = w(t.errors,
|
|
1004
|
-
if (r.delayError && h ? (f = b(() => g(
|
|
1028
|
+
}, B = (l, u, h, x) => {
|
|
1029
|
+
const S = w(t.errors, l), v = (d.isValid || y.isValid) && re(u) && t.isValid !== u;
|
|
1030
|
+
if (r.delayError && h ? (f = b(() => g(l, h)), f(r.delayError)) : (clearTimeout(c), f = null, h ? H(t.errors, l, h) : G(t.errors, l)), (h ? !le(S, h) : S) || !Y(x) || v) {
|
|
1005
1031
|
const $ = {
|
|
1006
1032
|
...x,
|
|
1007
|
-
...v && re(
|
|
1033
|
+
...v && re(u) ? { isValid: u } : {},
|
|
1008
1034
|
errors: t.errors,
|
|
1009
|
-
name:
|
|
1035
|
+
name: l
|
|
1010
1036
|
};
|
|
1011
1037
|
t = {
|
|
1012
1038
|
...t,
|
|
1013
1039
|
...$
|
|
1014
1040
|
}, m.state.next($);
|
|
1015
1041
|
}
|
|
1016
|
-
},
|
|
1017
|
-
k(
|
|
1018
|
-
const
|
|
1019
|
-
return k(
|
|
1020
|
-
}, U = async (
|
|
1021
|
-
const { errors:
|
|
1022
|
-
if (
|
|
1023
|
-
for (const h of
|
|
1024
|
-
const x = w(
|
|
1042
|
+
}, P = async (l) => {
|
|
1043
|
+
k(l, !0);
|
|
1044
|
+
const u = await r.resolver(n, r.context, yo(l || i.mount, o, r.criteriaMode, r.shouldUseNativeValidation));
|
|
1045
|
+
return k(l), u;
|
|
1046
|
+
}, U = async (l) => {
|
|
1047
|
+
const { errors: u } = await P(l);
|
|
1048
|
+
if (l)
|
|
1049
|
+
for (const h of l) {
|
|
1050
|
+
const x = w(u, h);
|
|
1025
1051
|
x ? H(t.errors, h, x) : G(t.errors, h);
|
|
1026
1052
|
}
|
|
1027
1053
|
else
|
|
1028
|
-
t.errors =
|
|
1029
|
-
return
|
|
1030
|
-
},
|
|
1054
|
+
t.errors = u;
|
|
1055
|
+
return u;
|
|
1056
|
+
}, M = async (l, u, h = {
|
|
1031
1057
|
valid: !0
|
|
1032
1058
|
}) => {
|
|
1033
|
-
for (const x in
|
|
1034
|
-
const S =
|
|
1059
|
+
for (const x in l) {
|
|
1060
|
+
const S = l[x];
|
|
1035
1061
|
if (S) {
|
|
1036
1062
|
const { _f: v, ...$ } = S;
|
|
1037
1063
|
if (v) {
|
|
1038
|
-
const T =
|
|
1039
|
-
j &&
|
|
1040
|
-
const se = await
|
|
1041
|
-
if (j &&
|
|
1064
|
+
const T = i.array.has(v.name), j = S._f && ho(S._f);
|
|
1065
|
+
j && d.validatingFields && k([v.name], !0);
|
|
1066
|
+
const se = await Zt(S, i.disabled, n, C, r.shouldUseNativeValidation && !u, T);
|
|
1067
|
+
if (j && d.validatingFields && k([v.name]), se[v.name] && (h.valid = !1, u))
|
|
1042
1068
|
break;
|
|
1043
|
-
!
|
|
1069
|
+
!u && (w(se, v.name) ? T ? So(t.errors, se, v.name) : H(t.errors, v.name, se[v.name]) : G(t.errors, v.name));
|
|
1044
1070
|
}
|
|
1045
|
-
!Y($) && await
|
|
1071
|
+
!Y($) && await M($, u, h);
|
|
1046
1072
|
}
|
|
1047
1073
|
}
|
|
1048
1074
|
return h.valid;
|
|
1049
1075
|
}, K = () => {
|
|
1050
|
-
for (const
|
|
1051
|
-
const
|
|
1052
|
-
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
}, q = (
|
|
1056
|
-
...a.mount ? n : W(
|
|
1057
|
-
}, h,
|
|
1058
|
-
const x = w(o,
|
|
1059
|
-
let S =
|
|
1076
|
+
for (const l of i.unMount) {
|
|
1077
|
+
const u = w(o, l);
|
|
1078
|
+
u && (u._f.refs ? u._f.refs.every((h) => !Ye(h)) : !Ye(u._f.ref)) && qe(l);
|
|
1079
|
+
}
|
|
1080
|
+
i.unMount = /* @__PURE__ */ new Set();
|
|
1081
|
+
}, q = (l, u) => !r.disabled && (l && u && H(n, l, u), !le(Me(), s)), L = (l, u, h) => ut(l, i, {
|
|
1082
|
+
...a.mount ? n : W(u) ? s : oe(l) ? { [l]: u } : u
|
|
1083
|
+
}, h, u), A = (l) => gt(w(a.mount ? n : s, l, r.shouldUnregister ? w(s, l, []) : [])), O = (l, u, h = {}) => {
|
|
1084
|
+
const x = w(o, l);
|
|
1085
|
+
let S = u;
|
|
1060
1086
|
if (x) {
|
|
1061
1087
|
const v = x._f;
|
|
1062
|
-
v && (!v.disabled && H(n,
|
|
1088
|
+
v && (!v.disabled && H(n, l, pr(u, v)), S = He(v.ref) && ee(u) ? "" : u, yr(v.ref) ? [...v.ref.options].forEach(($) => $.selected = S.includes($.value)) : v.refs ? Ae(v.ref) ? v.refs.forEach(($) => {
|
|
1063
1089
|
(!$.defaultChecked || !$.disabled) && (Array.isArray(S) ? $.checked = !!S.find((T) => T === $.value) : $.checked = S === $.value || !!S);
|
|
1064
1090
|
}) : v.refs.forEach(($) => $.checked = $.value === S) : kt(v.ref) ? v.ref.value = "" : (v.ref.value = S, v.ref.type || m.state.next({
|
|
1065
|
-
name:
|
|
1091
|
+
name: l,
|
|
1066
1092
|
values: X(n)
|
|
1067
1093
|
})));
|
|
1068
1094
|
}
|
|
1069
|
-
(h.shouldDirty || h.shouldTouch) && E(
|
|
1070
|
-
}, I = (
|
|
1071
|
-
for (const x in
|
|
1072
|
-
if (!
|
|
1095
|
+
(h.shouldDirty || h.shouldTouch) && E(l, S, h.shouldTouch, h.shouldDirty, !0), h.shouldValidate && ve(l);
|
|
1096
|
+
}, I = (l, u, h) => {
|
|
1097
|
+
for (const x in u) {
|
|
1098
|
+
if (!u.hasOwnProperty(x))
|
|
1073
1099
|
return;
|
|
1074
|
-
const S =
|
|
1075
|
-
(
|
|
1100
|
+
const S = u[x], v = l + "." + x, $ = w(o, v);
|
|
1101
|
+
(i.array.has(l) || Z(S) || $ && !$._f) && !_e(S) ? I(v, S, h) : O(v, S, h);
|
|
1076
1102
|
}
|
|
1077
|
-
}, Q = (
|
|
1078
|
-
const x = w(o,
|
|
1079
|
-
H(n,
|
|
1080
|
-
name:
|
|
1103
|
+
}, Q = (l, u, h = {}) => {
|
|
1104
|
+
const x = w(o, l), S = i.array.has(l), v = X(u);
|
|
1105
|
+
H(n, l, v), S ? (m.array.next({
|
|
1106
|
+
name: l,
|
|
1081
1107
|
values: X(n)
|
|
1082
|
-
}), (
|
|
1083
|
-
name:
|
|
1108
|
+
}), (d.isDirty || d.dirtyFields || y.isDirty || y.dirtyFields) && h.shouldDirty && m.state.next({
|
|
1109
|
+
name: l,
|
|
1084
1110
|
dirtyFields: ke(s, n),
|
|
1085
|
-
isDirty: q(
|
|
1086
|
-
})) : x && !x._f && !ee(v) ? I(
|
|
1087
|
-
name: a.mount ?
|
|
1111
|
+
isDirty: q(l, v)
|
|
1112
|
+
})) : x && !x._f && !ee(v) ? I(l, v, h) : O(l, v, h), Ut(l, i) && m.state.next({ ...t, name: l }), m.state.next({
|
|
1113
|
+
name: a.mount ? l : void 0,
|
|
1088
1114
|
values: X(n)
|
|
1089
1115
|
});
|
|
1090
|
-
}, te = async (
|
|
1116
|
+
}, te = async (l) => {
|
|
1091
1117
|
a.mount = !0;
|
|
1092
|
-
const
|
|
1093
|
-
let h =
|
|
1118
|
+
const u = l.target;
|
|
1119
|
+
let h = u.name, x = !0;
|
|
1094
1120
|
const S = w(o, h), v = (j) => {
|
|
1095
|
-
x = Number.isNaN(j) || _e(j) && isNaN(j.getTime()) ||
|
|
1096
|
-
}, $ =
|
|
1121
|
+
x = Number.isNaN(j) || _e(j) && isNaN(j.getTime()) || le(j, w(n, h, j));
|
|
1122
|
+
}, $ = jt(r.mode), T = jt(r.reValidateMode);
|
|
1097
1123
|
if (S) {
|
|
1098
1124
|
let j, se;
|
|
1099
|
-
const
|
|
1100
|
-
H(n, h,
|
|
1101
|
-
const Qe = E(h,
|
|
1125
|
+
const Pe = u.type ? Ht(S._f) : cr(l), ye = l.type === Te.BLUR || l.type === Te.FOCUS_OUT, Or = !_o(S._f) && !r.resolver && !w(t.errors, h) && !S._f.deps || vo(ye, w(t.touchedFields, h), t.isSubmitted, T, $), Ke = Ut(h, i, ye);
|
|
1126
|
+
H(n, h, Pe), ye ? (!u || !u.readOnly) && (S._f.onBlur && S._f.onBlur(l), f && f(0)) : S._f.onChange && S._f.onChange(l);
|
|
1127
|
+
const Qe = E(h, Pe, ye), Ir = !Y(Qe) || Ke;
|
|
1102
1128
|
if (!ye && m.state.next({
|
|
1103
1129
|
name: h,
|
|
1104
|
-
type:
|
|
1130
|
+
type: l.type,
|
|
1105
1131
|
values: X(n)
|
|
1106
|
-
}),
|
|
1107
|
-
return (
|
|
1132
|
+
}), Or)
|
|
1133
|
+
return (d.isValid || y.isValid) && (r.mode === "onBlur" ? ye && p() : ye || p()), Ir && m.state.next({ name: h, ...Ke ? {} : Qe });
|
|
1108
1134
|
if (!ye && Ke && m.state.next({ ...t }), r.resolver) {
|
|
1109
|
-
const { errors: At } = await
|
|
1110
|
-
if (v(
|
|
1111
|
-
const
|
|
1112
|
-
j =
|
|
1135
|
+
const { errors: At } = await P([h]);
|
|
1136
|
+
if (v(Pe), x) {
|
|
1137
|
+
const Tr = qt(t.errors, o, h), Mt = qt(At, o, Tr.name || h);
|
|
1138
|
+
j = Mt.error, h = Mt.name, se = Y(At);
|
|
1113
1139
|
}
|
|
1114
1140
|
} else
|
|
1115
|
-
k([h], !0), j = (await
|
|
1141
|
+
k([h], !0), j = (await Zt(S, i.disabled, n, C, r.shouldUseNativeValidation))[h], k([h]), v(Pe), x && (j ? se = !1 : (d.isValid || y.isValid) && (se = await M(o, !0)));
|
|
1116
1142
|
x && (S._f.deps && (!Array.isArray(S._f.deps) || S._f.deps.length > 0) && ve(S._f.deps), B(h, se, j, Qe));
|
|
1117
1143
|
}
|
|
1118
|
-
}, me = (
|
|
1119
|
-
if (w(t.errors,
|
|
1120
|
-
return
|
|
1121
|
-
}, ve = async (
|
|
1144
|
+
}, me = (l, u) => {
|
|
1145
|
+
if (w(t.errors, u) && l.focus)
|
|
1146
|
+
return l.focus(), 1;
|
|
1147
|
+
}, ve = async (l, u = {}) => {
|
|
1122
1148
|
let h, x;
|
|
1123
|
-
const S = Ne(
|
|
1149
|
+
const S = Ne(l);
|
|
1124
1150
|
if (r.resolver) {
|
|
1125
|
-
const v = await U(W(
|
|
1126
|
-
h = Y(v), x =
|
|
1127
|
-
} else
|
|
1151
|
+
const v = await U(W(l) ? l : S);
|
|
1152
|
+
h = Y(v), x = l ? !S.some(($) => w(v, $)) : h;
|
|
1153
|
+
} else l ? (x = (await Promise.all(S.map(async (v) => {
|
|
1128
1154
|
const $ = w(o, v);
|
|
1129
|
-
return await
|
|
1130
|
-
}))).every(Boolean), !(!x && !t.isValid) &&
|
|
1155
|
+
return await M($ && $._f ? { [v]: $ } : $);
|
|
1156
|
+
}))).every(Boolean), !(!x && !t.isValid) && p()) : x = h = await M(o);
|
|
1131
1157
|
return m.state.next({
|
|
1132
|
-
...!oe(
|
|
1133
|
-
...r.resolver || !
|
|
1158
|
+
...!oe(l) || (d.isValid || y.isValid) && h !== t.isValid ? {} : { name: l },
|
|
1159
|
+
...r.resolver || !l ? { isValid: h } : {},
|
|
1134
1160
|
errors: t.errors
|
|
1135
|
-
}),
|
|
1136
|
-
},
|
|
1161
|
+
}), u.shouldFocus && !x && $e(o, me, l ? S : i.mount), x;
|
|
1162
|
+
}, Me = (l, u) => {
|
|
1137
1163
|
let h = {
|
|
1138
1164
|
...a.mount ? n : s
|
|
1139
1165
|
};
|
|
1140
|
-
return
|
|
1141
|
-
}, Ct = (
|
|
1142
|
-
invalid: !!w((
|
|
1143
|
-
isDirty: !!w((
|
|
1144
|
-
error: w((
|
|
1145
|
-
isValidating: !!w(t.validatingFields,
|
|
1146
|
-
isTouched: !!w((
|
|
1147
|
-
}),
|
|
1148
|
-
|
|
1149
|
-
errors:
|
|
1166
|
+
return u && (h = mr(u.dirtyFields ? t.dirtyFields : t.touchedFields, h)), W(l) ? h : oe(l) ? w(h, l) : l.map((x) => w(h, x));
|
|
1167
|
+
}, Ct = (l, u) => ({
|
|
1168
|
+
invalid: !!w((u || t).errors, l),
|
|
1169
|
+
isDirty: !!w((u || t).dirtyFields, l),
|
|
1170
|
+
error: w((u || t).errors, l),
|
|
1171
|
+
isValidating: !!w(t.validatingFields, l),
|
|
1172
|
+
isTouched: !!w((u || t).touchedFields, l)
|
|
1173
|
+
}), Lr = (l) => {
|
|
1174
|
+
l && Ne(l).forEach((u) => G(t.errors, u)), m.state.next({
|
|
1175
|
+
errors: l ? t.errors : {}
|
|
1150
1176
|
});
|
|
1151
|
-
}, Ft = (
|
|
1152
|
-
const x = (w(o,
|
|
1153
|
-
H(t.errors,
|
|
1177
|
+
}, Ft = (l, u, h) => {
|
|
1178
|
+
const x = (w(o, l, { _f: {} })._f || {}).ref, S = w(t.errors, l) || {}, { ref: v, message: $, type: T, ...j } = S;
|
|
1179
|
+
H(t.errors, l, {
|
|
1154
1180
|
...j,
|
|
1155
|
-
...
|
|
1181
|
+
...u,
|
|
1156
1182
|
ref: x
|
|
1157
1183
|
}), m.state.next({
|
|
1158
|
-
name:
|
|
1184
|
+
name: l,
|
|
1159
1185
|
errors: t.errors,
|
|
1160
1186
|
isValid: !1
|
|
1161
1187
|
}), h && h.shouldFocus && x && x.focus && x.focus();
|
|
1162
|
-
},
|
|
1163
|
-
next: (h) => "values" in h &&
|
|
1164
|
-
}) : L(
|
|
1165
|
-
next: (
|
|
1166
|
-
go(
|
|
1188
|
+
}, Ar = (l, u) => ce(l) ? m.state.subscribe({
|
|
1189
|
+
next: (h) => "values" in h && l(L(void 0, u), h)
|
|
1190
|
+
}) : L(l, u, !0), Vt = (l) => m.state.subscribe({
|
|
1191
|
+
next: (u) => {
|
|
1192
|
+
go(l.name, u.name, l.exact) && po(u, l.formState || d, Rr, l.reRenderRoot) && l.callback({
|
|
1167
1193
|
values: { ...n },
|
|
1168
1194
|
...t,
|
|
1169
|
-
...
|
|
1195
|
+
...u,
|
|
1170
1196
|
defaultValues: s
|
|
1171
1197
|
});
|
|
1172
1198
|
}
|
|
1173
|
-
}).unsubscribe,
|
|
1199
|
+
}).unsubscribe, Mr = (l) => (a.mount = !0, y = {
|
|
1174
1200
|
...y,
|
|
1175
|
-
...
|
|
1201
|
+
...l.formState
|
|
1176
1202
|
}, Vt({
|
|
1177
|
-
...
|
|
1203
|
+
...l,
|
|
1178
1204
|
formState: y
|
|
1179
|
-
})), qe = (
|
|
1180
|
-
for (const h of
|
|
1181
|
-
|
|
1205
|
+
})), qe = (l, u = {}) => {
|
|
1206
|
+
for (const h of l ? Ne(l) : i.mount)
|
|
1207
|
+
i.mount.delete(h), i.array.delete(h), u.keepValue || (G(o, h), G(n, h)), !u.keepError && G(t.errors, h), !u.keepDirty && G(t.dirtyFields, h), !u.keepTouched && G(t.touchedFields, h), !u.keepIsValidating && G(t.validatingFields, h), !r.shouldUnregister && !u.keepDefaultValue && G(s, h);
|
|
1182
1208
|
m.state.next({
|
|
1183
1209
|
values: X(n)
|
|
1184
1210
|
}), m.state.next({
|
|
1185
1211
|
...t,
|
|
1186
|
-
...
|
|
1187
|
-
}), !
|
|
1188
|
-
}, zt = ({ disabled:
|
|
1189
|
-
(re(
|
|
1190
|
-
}, Ge = (
|
|
1191
|
-
let h = w(o,
|
|
1192
|
-
const x = re(
|
|
1193
|
-
return H(o,
|
|
1212
|
+
...u.keepDirty ? { isDirty: q() } : {}
|
|
1213
|
+
}), !u.keepIsValid && p();
|
|
1214
|
+
}, zt = ({ disabled: l, name: u }) => {
|
|
1215
|
+
(re(l) && a.mount || l || i.disabled.has(u)) && (l ? i.disabled.add(u) : i.disabled.delete(u));
|
|
1216
|
+
}, Ge = (l, u = {}) => {
|
|
1217
|
+
let h = w(o, l);
|
|
1218
|
+
const x = re(u.disabled) || re(r.disabled);
|
|
1219
|
+
return H(o, l, {
|
|
1194
1220
|
...h || {},
|
|
1195
1221
|
_f: {
|
|
1196
|
-
...h && h._f ? h._f : { ref: { name:
|
|
1197
|
-
name:
|
|
1222
|
+
...h && h._f ? h._f : { ref: { name: l } },
|
|
1223
|
+
name: l,
|
|
1198
1224
|
mount: !0,
|
|
1199
|
-
...
|
|
1225
|
+
...u
|
|
1200
1226
|
}
|
|
1201
|
-
}),
|
|
1202
|
-
disabled: re(
|
|
1203
|
-
name:
|
|
1204
|
-
}) : z(
|
|
1205
|
-
...x ? { disabled:
|
|
1227
|
+
}), i.mount.add(l), h ? zt({
|
|
1228
|
+
disabled: re(u.disabled) ? u.disabled : r.disabled,
|
|
1229
|
+
name: l
|
|
1230
|
+
}) : z(l, !0, u.value), {
|
|
1231
|
+
...x ? { disabled: u.disabled || r.disabled } : {},
|
|
1206
1232
|
...r.progressive ? {
|
|
1207
|
-
required: !!
|
|
1208
|
-
min: ze(
|
|
1209
|
-
max: ze(
|
|
1210
|
-
minLength: ze(
|
|
1211
|
-
maxLength: ze(
|
|
1212
|
-
pattern: ze(
|
|
1233
|
+
required: !!u.required,
|
|
1234
|
+
min: ze(u.min),
|
|
1235
|
+
max: ze(u.max),
|
|
1236
|
+
minLength: ze(u.minLength),
|
|
1237
|
+
maxLength: ze(u.maxLength),
|
|
1238
|
+
pattern: ze(u.pattern)
|
|
1213
1239
|
} : {},
|
|
1214
|
-
name:
|
|
1240
|
+
name: l,
|
|
1215
1241
|
onChange: te,
|
|
1216
1242
|
onBlur: te,
|
|
1217
1243
|
ref: (S) => {
|
|
1218
1244
|
if (S) {
|
|
1219
|
-
Ge(
|
|
1245
|
+
Ge(l, u), h = w(o, l);
|
|
1220
1246
|
const v = W(S.value) && S.querySelectorAll && S.querySelectorAll("input,select,textarea")[0] || S, $ = co(v), T = h._f.refs || [];
|
|
1221
1247
|
if ($ ? T.find((j) => j === v) : v === h._f.ref)
|
|
1222
1248
|
return;
|
|
1223
|
-
H(o,
|
|
1249
|
+
H(o, l, {
|
|
1224
1250
|
_f: {
|
|
1225
1251
|
...h._f,
|
|
1226
1252
|
...$ ? {
|
|
1227
1253
|
refs: [
|
|
1228
1254
|
...T.filter(Ye),
|
|
1229
1255
|
v,
|
|
1230
|
-
...Array.isArray(w(s,
|
|
1256
|
+
...Array.isArray(w(s, l)) ? [{}] : []
|
|
1231
1257
|
],
|
|
1232
|
-
ref: { type: v.type, name:
|
|
1258
|
+
ref: { type: v.type, name: l }
|
|
1233
1259
|
} : { ref: v }
|
|
1234
1260
|
}
|
|
1235
|
-
}), z(
|
|
1261
|
+
}), z(l, !1, void 0, v);
|
|
1236
1262
|
} else
|
|
1237
|
-
h = w(o,
|
|
1263
|
+
h = w(o, l, {}), h._f && (h._f.mount = !1), (r.shouldUnregister || u.shouldUnregister) && !(dr(i.array, l) && a.action) && i.unMount.add(l);
|
|
1238
1264
|
}
|
|
1239
1265
|
};
|
|
1240
|
-
}, Ze = () => r.shouldFocusError && $e(o, me,
|
|
1241
|
-
re(
|
|
1266
|
+
}, Ze = () => r.shouldFocusError && $e(o, me, i.mount), Pr = (l) => {
|
|
1267
|
+
re(l) && (m.state.next({ disabled: l }), $e(o, (u, h) => {
|
|
1242
1268
|
const x = w(o, h);
|
|
1243
|
-
x && (
|
|
1244
|
-
S.disabled = x._f.disabled ||
|
|
1269
|
+
x && (u.disabled = x._f.disabled || l, Array.isArray(x._f.refs) && x._f.refs.forEach((S) => {
|
|
1270
|
+
S.disabled = x._f.disabled || l;
|
|
1245
1271
|
}));
|
|
1246
1272
|
}, 0, !1));
|
|
1247
|
-
}, Et = (
|
|
1273
|
+
}, Et = (l, u) => async (h) => {
|
|
1248
1274
|
let x;
|
|
1249
1275
|
h && (h.preventDefault && h.preventDefault(), h.persist && h.persist());
|
|
1250
1276
|
let S = X(n);
|
|
1251
1277
|
if (m.state.next({
|
|
1252
1278
|
isSubmitting: !0
|
|
1253
1279
|
}), r.resolver) {
|
|
1254
|
-
const { errors: v, values: $ } = await
|
|
1280
|
+
const { errors: v, values: $ } = await P();
|
|
1255
1281
|
t.errors = v, S = X($);
|
|
1256
1282
|
} else
|
|
1257
|
-
await
|
|
1258
|
-
if (
|
|
1259
|
-
for (const v of
|
|
1283
|
+
await M(o);
|
|
1284
|
+
if (i.disabled.size)
|
|
1285
|
+
for (const v of i.disabled)
|
|
1260
1286
|
G(S, v);
|
|
1261
1287
|
if (G(t.errors, "root"), Y(t.errors)) {
|
|
1262
1288
|
m.state.next({
|
|
1263
1289
|
errors: {}
|
|
1264
1290
|
});
|
|
1265
1291
|
try {
|
|
1266
|
-
await
|
|
1292
|
+
await l(S, h);
|
|
1267
1293
|
} catch (v) {
|
|
1268
1294
|
x = v;
|
|
1269
1295
|
}
|
|
1270
1296
|
} else
|
|
1271
|
-
|
|
1297
|
+
u && await u({ ...t.errors }, h), Ze(), setTimeout(Ze);
|
|
1272
1298
|
if (m.state.next({
|
|
1273
1299
|
isSubmitted: !0,
|
|
1274
1300
|
isSubmitting: !1,
|
|
@@ -1277,21 +1303,21 @@ function ko(e = {}) {
|
|
|
1277
1303
|
errors: t.errors
|
|
1278
1304
|
}), x)
|
|
1279
1305
|
throw x;
|
|
1280
|
-
},
|
|
1281
|
-
w(o,
|
|
1282
|
-
}, Nt = (
|
|
1283
|
-
const h =
|
|
1284
|
-
if (
|
|
1285
|
-
if (
|
|
1306
|
+
}, Br = (l, u = {}) => {
|
|
1307
|
+
w(o, l) && (W(u.defaultValue) ? Q(l, X(w(s, l))) : (Q(l, u.defaultValue), H(s, l, X(u.defaultValue))), u.keepTouched || G(t.touchedFields, l), u.keepDirty || (G(t.dirtyFields, l), t.isDirty = u.defaultValue ? q(l, X(w(s, l))) : q()), u.keepError || (G(t.errors, l), d.isValid && p()), m.state.next({ ...t }));
|
|
1308
|
+
}, Nt = (l, u = {}) => {
|
|
1309
|
+
const h = l ? X(l) : s, x = X(h), S = Y(l), v = S ? s : x;
|
|
1310
|
+
if (u.keepDefaultValues || (s = h), !u.keepValues) {
|
|
1311
|
+
if (u.keepDirtyValues) {
|
|
1286
1312
|
const $ = /* @__PURE__ */ new Set([
|
|
1287
|
-
...
|
|
1313
|
+
...i.mount,
|
|
1288
1314
|
...Object.keys(ke(s, n))
|
|
1289
1315
|
]);
|
|
1290
1316
|
for (const T of Array.from($))
|
|
1291
1317
|
w(t.dirtyFields, T) ? H(v, T, w(n, T)) : Q(T, w(v, T));
|
|
1292
1318
|
} else {
|
|
1293
|
-
if (pt && W(
|
|
1294
|
-
for (const $ of
|
|
1319
|
+
if (pt && W(l))
|
|
1320
|
+
for (const $ of i.mount) {
|
|
1295
1321
|
const T = w(o, $);
|
|
1296
1322
|
if (T && T._f) {
|
|
1297
1323
|
const j = Array.isArray(T._f.refs) ? T._f.refs[0] : T._f.ref;
|
|
@@ -1304,47 +1330,47 @@ function ko(e = {}) {
|
|
|
1304
1330
|
}
|
|
1305
1331
|
}
|
|
1306
1332
|
}
|
|
1307
|
-
if (
|
|
1308
|
-
for (const $ of
|
|
1333
|
+
if (u.keepFieldsRef)
|
|
1334
|
+
for (const $ of i.mount)
|
|
1309
1335
|
Q($, w(v, $));
|
|
1310
1336
|
else
|
|
1311
1337
|
o = {};
|
|
1312
1338
|
}
|
|
1313
|
-
n = r.shouldUnregister ?
|
|
1339
|
+
n = r.shouldUnregister ? u.keepDefaultValues ? X(s) : {} : X(v), m.array.next({
|
|
1314
1340
|
values: { ...v }
|
|
1315
1341
|
}), m.state.next({
|
|
1316
1342
|
values: { ...v }
|
|
1317
1343
|
});
|
|
1318
1344
|
}
|
|
1319
|
-
|
|
1320
|
-
mount:
|
|
1345
|
+
i = {
|
|
1346
|
+
mount: u.keepDirtyValues ? i.mount : /* @__PURE__ */ new Set(),
|
|
1321
1347
|
unMount: /* @__PURE__ */ new Set(),
|
|
1322
1348
|
array: /* @__PURE__ */ new Set(),
|
|
1323
1349
|
disabled: /* @__PURE__ */ new Set(),
|
|
1324
1350
|
watch: /* @__PURE__ */ new Set(),
|
|
1325
1351
|
watchAll: !1,
|
|
1326
1352
|
focus: ""
|
|
1327
|
-
}, a.mount = !
|
|
1328
|
-
submitCount:
|
|
1329
|
-
isDirty: S ? !1 :
|
|
1330
|
-
isSubmitted:
|
|
1331
|
-
dirtyFields: S ? {} :
|
|
1332
|
-
touchedFields:
|
|
1333
|
-
errors:
|
|
1334
|
-
isSubmitSuccessful:
|
|
1353
|
+
}, a.mount = !d.isValid || !!u.keepIsValid || !!u.keepDirtyValues || !r.shouldUnregister && !Y(v), a.watch = !!r.shouldUnregister, m.state.next({
|
|
1354
|
+
submitCount: u.keepSubmitCount ? t.submitCount : 0,
|
|
1355
|
+
isDirty: S ? !1 : u.keepDirty ? t.isDirty : !!(u.keepDefaultValues && !le(l, s)),
|
|
1356
|
+
isSubmitted: u.keepIsSubmitted ? t.isSubmitted : !1,
|
|
1357
|
+
dirtyFields: S ? {} : u.keepDirtyValues ? u.keepDefaultValues && n ? ke(s, n) : t.dirtyFields : u.keepDefaultValues && l ? ke(s, l) : u.keepDirty ? t.dirtyFields : {},
|
|
1358
|
+
touchedFields: u.keepTouched ? t.touchedFields : {},
|
|
1359
|
+
errors: u.keepErrors ? t.errors : {},
|
|
1360
|
+
isSubmitSuccessful: u.keepIsSubmitSuccessful ? t.isSubmitSuccessful : !1,
|
|
1335
1361
|
isSubmitting: !1,
|
|
1336
1362
|
defaultValues: s
|
|
1337
1363
|
});
|
|
1338
|
-
}, $t = (
|
|
1339
|
-
const h = w(o,
|
|
1364
|
+
}, $t = (l, u) => Nt(ce(l) ? l(n) : l, u), Dr = (l, u = {}) => {
|
|
1365
|
+
const h = w(o, l), x = h && h._f;
|
|
1340
1366
|
if (x) {
|
|
1341
1367
|
const S = x.refs ? x.refs[0] : x.ref;
|
|
1342
|
-
S.focus && (S.focus(),
|
|
1368
|
+
S.focus && (S.focus(), u.shouldSelect && ce(S.select) && S.select());
|
|
1343
1369
|
}
|
|
1344
|
-
},
|
|
1370
|
+
}, Rr = (l) => {
|
|
1345
1371
|
t = {
|
|
1346
1372
|
...t,
|
|
1347
|
-
...
|
|
1373
|
+
...l
|
|
1348
1374
|
};
|
|
1349
1375
|
}, Lt = {
|
|
1350
1376
|
control: {
|
|
@@ -1354,25 +1380,25 @@ function ko(e = {}) {
|
|
|
1354
1380
|
handleSubmit: Et,
|
|
1355
1381
|
setError: Ft,
|
|
1356
1382
|
_subscribe: Vt,
|
|
1357
|
-
_runSchema:
|
|
1383
|
+
_runSchema: P,
|
|
1358
1384
|
_focusError: Ze,
|
|
1359
1385
|
_getWatch: L,
|
|
1360
1386
|
_getDirty: q,
|
|
1361
|
-
_setValid:
|
|
1387
|
+
_setValid: p,
|
|
1362
1388
|
_setFieldArray: V,
|
|
1363
1389
|
_setDisabledField: zt,
|
|
1364
1390
|
_setErrors: F,
|
|
1365
1391
|
_getFieldArray: A,
|
|
1366
1392
|
_reset: Nt,
|
|
1367
|
-
_resetDefaultValues: () => ce(r.defaultValues) && r.defaultValues().then((
|
|
1368
|
-
$t(
|
|
1393
|
+
_resetDefaultValues: () => ce(r.defaultValues) && r.defaultValues().then((l) => {
|
|
1394
|
+
$t(l, r.resetOptions), m.state.next({
|
|
1369
1395
|
isLoading: !1
|
|
1370
1396
|
});
|
|
1371
1397
|
}),
|
|
1372
1398
|
_removeUnmounted: K,
|
|
1373
1399
|
_disableForm: Pr,
|
|
1374
1400
|
_subjects: m,
|
|
1375
|
-
_proxyFormState:
|
|
1401
|
+
_proxyFormState: d,
|
|
1376
1402
|
get _fields() {
|
|
1377
1403
|
return o;
|
|
1378
1404
|
},
|
|
@@ -1382,17 +1408,17 @@ function ko(e = {}) {
|
|
|
1382
1408
|
get _state() {
|
|
1383
1409
|
return a;
|
|
1384
1410
|
},
|
|
1385
|
-
set _state(
|
|
1386
|
-
a =
|
|
1411
|
+
set _state(l) {
|
|
1412
|
+
a = l;
|
|
1387
1413
|
},
|
|
1388
1414
|
get _defaultValues() {
|
|
1389
1415
|
return s;
|
|
1390
1416
|
},
|
|
1391
1417
|
get _names() {
|
|
1392
|
-
return
|
|
1418
|
+
return i;
|
|
1393
1419
|
},
|
|
1394
|
-
set _names(
|
|
1395
|
-
|
|
1420
|
+
set _names(l) {
|
|
1421
|
+
i = l;
|
|
1396
1422
|
},
|
|
1397
1423
|
get _formState() {
|
|
1398
1424
|
return t;
|
|
@@ -1400,26 +1426,26 @@ function ko(e = {}) {
|
|
|
1400
1426
|
get _options() {
|
|
1401
1427
|
return r;
|
|
1402
1428
|
},
|
|
1403
|
-
set _options(
|
|
1429
|
+
set _options(l) {
|
|
1404
1430
|
r = {
|
|
1405
1431
|
...r,
|
|
1406
|
-
...
|
|
1432
|
+
...l
|
|
1407
1433
|
};
|
|
1408
1434
|
}
|
|
1409
1435
|
},
|
|
1410
|
-
subscribe:
|
|
1436
|
+
subscribe: Mr,
|
|
1411
1437
|
trigger: ve,
|
|
1412
1438
|
register: Ge,
|
|
1413
1439
|
handleSubmit: Et,
|
|
1414
|
-
watch:
|
|
1440
|
+
watch: Ar,
|
|
1415
1441
|
setValue: Q,
|
|
1416
|
-
getValues:
|
|
1442
|
+
getValues: Me,
|
|
1417
1443
|
reset: $t,
|
|
1418
|
-
resetField:
|
|
1419
|
-
clearErrors:
|
|
1444
|
+
resetField: Br,
|
|
1445
|
+
clearErrors: Lr,
|
|
1420
1446
|
unregister: qe,
|
|
1421
1447
|
setError: Ft,
|
|
1422
|
-
setFocus:
|
|
1448
|
+
setFocus: Dr,
|
|
1423
1449
|
getFieldState: Ct
|
|
1424
1450
|
};
|
|
1425
1451
|
return {
|
|
@@ -1452,9 +1478,9 @@ function xo(e = {}) {
|
|
|
1452
1478
|
formState: o
|
|
1453
1479
|
}, e.defaultValues && !ce(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
|
|
1454
1480
|
else {
|
|
1455
|
-
const { formControl: a, ...
|
|
1481
|
+
const { formControl: a, ...i } = ko(e);
|
|
1456
1482
|
r.current = {
|
|
1457
|
-
...
|
|
1483
|
+
...i,
|
|
1458
1484
|
formState: o
|
|
1459
1485
|
};
|
|
1460
1486
|
}
|
|
@@ -1465,8 +1491,8 @@ function xo(e = {}) {
|
|
|
1465
1491
|
callback: () => s({ ...n._formState }),
|
|
1466
1492
|
reRenderRoot: !0
|
|
1467
1493
|
});
|
|
1468
|
-
return s((
|
|
1469
|
-
...
|
|
1494
|
+
return s((i) => ({
|
|
1495
|
+
...i,
|
|
1470
1496
|
isReady: !0
|
|
1471
1497
|
})), n._formState.isReady = !0, a;
|
|
1472
1498
|
}, [n]), N.useEffect(() => n._disableForm(e.disabled), [n, e.disabled]), N.useEffect(() => {
|
|
@@ -1485,15 +1511,15 @@ function xo(e = {}) {
|
|
|
1485
1511
|
});
|
|
1486
1512
|
}
|
|
1487
1513
|
}, [n, o.isDirty]), N.useEffect(() => {
|
|
1488
|
-
e.values && !
|
|
1514
|
+
e.values && !le(e.values, t.current) ? (n._reset(e.values, {
|
|
1489
1515
|
keepFieldsRef: !0,
|
|
1490
1516
|
...n._options.resetOptions
|
|
1491
1517
|
}), t.current = e.values, s((a) => ({ ...a }))) : n._resetDefaultValues();
|
|
1492
1518
|
}, [n, e.values]), N.useEffect(() => {
|
|
1493
1519
|
n._state.mount || (n._setValid(), n._state.mount = !0), n._state.watch && (n._state.watch = !1, n._subjects.state.next({ ...n._formState })), n._removeUnmounted();
|
|
1494
|
-
}), r.current.formState =
|
|
1520
|
+
}), r.current.formState = fr(o, n), r.current;
|
|
1495
1521
|
}
|
|
1496
|
-
const
|
|
1522
|
+
const Kt = (e, r, t) => {
|
|
1497
1523
|
if (e && "reportValidity" in e) {
|
|
1498
1524
|
const o = w(t, r);
|
|
1499
1525
|
e.setCustomValidity(o && o.message || ""), e.reportValidity();
|
|
@@ -1501,9 +1527,9 @@ const Zt = (e, r, t) => {
|
|
|
1501
1527
|
}, yt = (e, r) => {
|
|
1502
1528
|
for (const t in r.fields) {
|
|
1503
1529
|
const o = r.fields[t];
|
|
1504
|
-
o && o.ref && "reportValidity" in o.ref ?
|
|
1530
|
+
o && o.ref && "reportValidity" in o.ref ? Kt(o.ref, t, e) : o && o.refs && o.refs.forEach((s) => Kt(s, t, e));
|
|
1505
1531
|
}
|
|
1506
|
-
},
|
|
1532
|
+
}, Qt = (e, r) => {
|
|
1507
1533
|
r.shouldUseNativeValidation && yt(e, r);
|
|
1508
1534
|
const t = {};
|
|
1509
1535
|
for (const o in e) {
|
|
@@ -1515,39 +1541,39 @@ const Zt = (e, r, t) => {
|
|
|
1515
1541
|
}
|
|
1516
1542
|
return t;
|
|
1517
1543
|
}, Co = (e, r) => {
|
|
1518
|
-
const t =
|
|
1519
|
-
return e.some((o) =>
|
|
1544
|
+
const t = Xt(r);
|
|
1545
|
+
return e.some((o) => Xt(o).match(`^${t}\\.\\d+`));
|
|
1520
1546
|
};
|
|
1521
|
-
function
|
|
1547
|
+
function Xt(e) {
|
|
1522
1548
|
return e.replace(/\]|\[/g, "");
|
|
1523
1549
|
}
|
|
1524
|
-
function
|
|
1525
|
-
function o(
|
|
1550
|
+
function vr(e, r, t) {
|
|
1551
|
+
function o(i, f) {
|
|
1526
1552
|
var c;
|
|
1527
|
-
Object.defineProperty(
|
|
1528
|
-
value:
|
|
1553
|
+
Object.defineProperty(i, "_zod", {
|
|
1554
|
+
value: i._zod ?? {},
|
|
1529
1555
|
enumerable: !1
|
|
1530
|
-
}), (c =
|
|
1531
|
-
for (const
|
|
1532
|
-
|
|
1533
|
-
|
|
1556
|
+
}), (c = i._zod).traits ?? (c.traits = /* @__PURE__ */ new Set()), i._zod.traits.add(e), r(i, f);
|
|
1557
|
+
for (const d in a.prototype)
|
|
1558
|
+
d in i || Object.defineProperty(i, d, { value: a.prototype[d].bind(i) });
|
|
1559
|
+
i._zod.constr = a, i._zod.def = f;
|
|
1534
1560
|
}
|
|
1535
1561
|
const s = (t == null ? void 0 : t.Parent) ?? Object;
|
|
1536
1562
|
class n extends s {
|
|
1537
1563
|
}
|
|
1538
1564
|
Object.defineProperty(n, "name", { value: e });
|
|
1539
|
-
function a(
|
|
1565
|
+
function a(i) {
|
|
1540
1566
|
var f;
|
|
1541
1567
|
const c = t != null && t.Parent ? new n() : this;
|
|
1542
|
-
o(c,
|
|
1543
|
-
for (const
|
|
1544
|
-
|
|
1568
|
+
o(c, i), (f = c._zod).deferred ?? (f.deferred = []);
|
|
1569
|
+
for (const d of c._zod.deferred)
|
|
1570
|
+
d();
|
|
1545
1571
|
return c;
|
|
1546
1572
|
}
|
|
1547
1573
|
return Object.defineProperty(a, "init", { value: o }), Object.defineProperty(a, Symbol.hasInstance, {
|
|
1548
|
-
value: (
|
|
1574
|
+
value: (i) => {
|
|
1549
1575
|
var f, c;
|
|
1550
|
-
return t != null && t.Parent &&
|
|
1576
|
+
return t != null && t.Parent && i instanceof t.Parent ? !0 : (c = (f = i == null ? void 0 : i._zod) == null ? void 0 : f.traits) == null ? void 0 : c.has(e);
|
|
1551
1577
|
}
|
|
1552
1578
|
}), Object.defineProperty(a, "name", { value: e }), a;
|
|
1553
1579
|
}
|
|
@@ -1557,27 +1583,27 @@ class Fo extends Error {
|
|
|
1557
1583
|
}
|
|
1558
1584
|
}
|
|
1559
1585
|
const Vo = {};
|
|
1560
|
-
function
|
|
1586
|
+
function br(e) {
|
|
1561
1587
|
return Vo;
|
|
1562
1588
|
}
|
|
1563
1589
|
function zo(e, r) {
|
|
1564
1590
|
return typeof r == "bigint" ? r.toString() : r;
|
|
1565
1591
|
}
|
|
1566
|
-
const
|
|
1592
|
+
const Sr = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
1567
1593
|
};
|
|
1568
1594
|
function Oe(e) {
|
|
1569
1595
|
return typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
1570
1596
|
}
|
|
1571
|
-
function
|
|
1572
|
-
var s, n, a,
|
|
1597
|
+
function wr(e, r, t) {
|
|
1598
|
+
var s, n, a, i, f, c;
|
|
1573
1599
|
const o = { ...e, path: e.path ?? [] };
|
|
1574
1600
|
if (!e.message) {
|
|
1575
|
-
const
|
|
1576
|
-
o.message =
|
|
1601
|
+
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((i = r == null ? void 0 : r.error) == null ? void 0 : i.call(r, e)) ?? Oe((f = t.customError) == null ? void 0 : f.call(t, e)) ?? Oe((c = t.localeError) == null ? void 0 : c.call(t, e)) ?? "Invalid input";
|
|
1602
|
+
o.message = d;
|
|
1577
1603
|
}
|
|
1578
1604
|
return delete o.inst, delete o.continue, r != null && r.reportInput || delete o.input, o;
|
|
1579
1605
|
}
|
|
1580
|
-
const
|
|
1606
|
+
const kr = (e, r) => {
|
|
1581
1607
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
1582
1608
|
value: e._zod,
|
|
1583
1609
|
enumerable: !1
|
|
@@ -1588,25 +1614,25 @@ const wr = (e, r) => {
|
|
|
1588
1614
|
value: () => e.message,
|
|
1589
1615
|
enumerable: !1
|
|
1590
1616
|
});
|
|
1591
|
-
}, Eo =
|
|
1617
|
+
}, Eo = vr("$ZodError", kr), xr = vr("$ZodError", kr, { Parent: Error }), No = (e) => (r, t, o, s) => {
|
|
1592
1618
|
const n = o ? Object.assign(o, { async: !1 }) : { async: !1 }, a = r._zod.run({ value: t, issues: [] }, n);
|
|
1593
1619
|
if (a instanceof Promise)
|
|
1594
1620
|
throw new Fo();
|
|
1595
1621
|
if (a.issues.length) {
|
|
1596
|
-
const
|
|
1597
|
-
throw
|
|
1622
|
+
const i = new ((s == null ? void 0 : s.Err) ?? e)(a.issues.map((f) => wr(f, n, br())));
|
|
1623
|
+
throw Sr(i, s == null ? void 0 : s.callee), i;
|
|
1598
1624
|
}
|
|
1599
1625
|
return a.value;
|
|
1600
|
-
}, $o = /* @__PURE__ */ No(
|
|
1626
|
+
}, $o = /* @__PURE__ */ No(xr), Lo = (e) => async (r, t, o, s) => {
|
|
1601
1627
|
const n = o ? Object.assign(o, { async: !0 }) : { async: !0 };
|
|
1602
1628
|
let a = r._zod.run({ value: t, issues: [] }, n);
|
|
1603
1629
|
if (a instanceof Promise && (a = await a), a.issues.length) {
|
|
1604
|
-
const
|
|
1605
|
-
throw
|
|
1630
|
+
const i = new ((s == null ? void 0 : s.Err) ?? e)(a.issues.map((f) => wr(f, n, br())));
|
|
1631
|
+
throw Sr(i, s == null ? void 0 : s.callee), i;
|
|
1606
1632
|
}
|
|
1607
1633
|
return a.value;
|
|
1608
|
-
}, Ao = /* @__PURE__ */ Lo(
|
|
1609
|
-
function
|
|
1634
|
+
}, Ao = /* @__PURE__ */ Lo(xr);
|
|
1635
|
+
function Jt(e, r) {
|
|
1610
1636
|
try {
|
|
1611
1637
|
var t = e();
|
|
1612
1638
|
} catch (o) {
|
|
@@ -1614,15 +1640,15 @@ function Xt(e, r) {
|
|
|
1614
1640
|
}
|
|
1615
1641
|
return t && t.then ? t.then(void 0, r) : t;
|
|
1616
1642
|
}
|
|
1617
|
-
function
|
|
1643
|
+
function Mo(e, r) {
|
|
1618
1644
|
for (var t = {}; e.length; ) {
|
|
1619
1645
|
var o = e[0], s = o.code, n = o.message, a = o.path.join(".");
|
|
1620
1646
|
if (!t[a]) if ("unionErrors" in o) {
|
|
1621
|
-
var
|
|
1622
|
-
t[a] = { message:
|
|
1647
|
+
var i = o.unionErrors[0].errors[0];
|
|
1648
|
+
t[a] = { message: i.message, type: i.code };
|
|
1623
1649
|
} else t[a] = { message: n, type: s };
|
|
1624
|
-
if ("unionErrors" in o && o.unionErrors.forEach(function(
|
|
1625
|
-
return
|
|
1650
|
+
if ("unionErrors" in o && o.unionErrors.forEach(function(d) {
|
|
1651
|
+
return d.errors.forEach(function(y) {
|
|
1626
1652
|
return e.push(y);
|
|
1627
1653
|
});
|
|
1628
1654
|
}), r) {
|
|
@@ -1633,15 +1659,15 @@ function Po(e, r) {
|
|
|
1633
1659
|
}
|
|
1634
1660
|
return t;
|
|
1635
1661
|
}
|
|
1636
|
-
function
|
|
1662
|
+
function Po(e, r) {
|
|
1637
1663
|
for (var t = {}; e.length; ) {
|
|
1638
1664
|
var o = e[0], s = o.code, n = o.message, a = o.path.join(".");
|
|
1639
1665
|
if (!t[a]) if (o.code === "invalid_union" && o.errors.length > 0) {
|
|
1640
|
-
var
|
|
1641
|
-
t[a] = { message:
|
|
1666
|
+
var i = o.errors[0][0];
|
|
1667
|
+
t[a] = { message: i.message, type: i.code };
|
|
1642
1668
|
} else t[a] = { message: n, type: s };
|
|
1643
|
-
if (o.code === "invalid_union" && o.errors.forEach(function(
|
|
1644
|
-
return
|
|
1669
|
+
if (o.code === "invalid_union" && o.errors.forEach(function(d) {
|
|
1670
|
+
return d.forEach(function(y) {
|
|
1645
1671
|
return e.push(y);
|
|
1646
1672
|
});
|
|
1647
1673
|
}), r) {
|
|
@@ -1657,14 +1683,14 @@ function Bo(e, r, t) {
|
|
|
1657
1683
|
return "_def" in o && typeof o._def == "object" && "typeName" in o._def;
|
|
1658
1684
|
})(e)) return function(o, s, n) {
|
|
1659
1685
|
try {
|
|
1660
|
-
return Promise.resolve(
|
|
1686
|
+
return Promise.resolve(Jt(function() {
|
|
1661
1687
|
return Promise.resolve(e[t.mode === "sync" ? "parse" : "parseAsync"](o, r)).then(function(a) {
|
|
1662
1688
|
return n.shouldUseNativeValidation && yt({}, n), { errors: {}, values: t.raw ? Object.assign({}, o) : a };
|
|
1663
1689
|
});
|
|
1664
1690
|
}, function(a) {
|
|
1665
|
-
if ((function(
|
|
1666
|
-
return Array.isArray(
|
|
1667
|
-
})(a)) return { values: {}, errors:
|
|
1691
|
+
if ((function(i) {
|
|
1692
|
+
return Array.isArray(i == null ? void 0 : i.issues);
|
|
1693
|
+
})(a)) return { values: {}, errors: Qt(Mo(a.errors, !n.shouldUseNativeValidation && n.criteriaMode === "all"), n) };
|
|
1668
1694
|
throw a;
|
|
1669
1695
|
}));
|
|
1670
1696
|
} catch (a) {
|
|
@@ -1675,14 +1701,14 @@ function Bo(e, r, t) {
|
|
|
1675
1701
|
return "_zod" in o && typeof o._zod == "object";
|
|
1676
1702
|
})(e)) return function(o, s, n) {
|
|
1677
1703
|
try {
|
|
1678
|
-
return Promise.resolve(
|
|
1704
|
+
return Promise.resolve(Jt(function() {
|
|
1679
1705
|
return Promise.resolve((t.mode === "sync" ? $o : Ao)(e, o, r)).then(function(a) {
|
|
1680
1706
|
return n.shouldUseNativeValidation && yt({}, n), { errors: {}, values: t.raw ? Object.assign({}, o) : a };
|
|
1681
1707
|
});
|
|
1682
1708
|
}, function(a) {
|
|
1683
|
-
if ((function(
|
|
1684
|
-
return
|
|
1685
|
-
})(a)) return { values: {}, errors:
|
|
1709
|
+
if ((function(i) {
|
|
1710
|
+
return i instanceof Eo;
|
|
1711
|
+
})(a)) return { values: {}, errors: Qt(Po(a.issues, !n.shouldUseNativeValidation && n.criteriaMode === "all"), n) };
|
|
1686
1712
|
throw a;
|
|
1687
1713
|
}));
|
|
1688
1714
|
} catch (a) {
|
|
@@ -1691,9 +1717,9 @@ function Bo(e, r, t) {
|
|
|
1691
1717
|
};
|
|
1692
1718
|
throw new Error("Invalid input: not a Zod schema");
|
|
1693
1719
|
}
|
|
1694
|
-
const
|
|
1720
|
+
const Cr = N.createContext(null);
|
|
1695
1721
|
function Do() {
|
|
1696
|
-
const e = N.useContext(
|
|
1722
|
+
const e = N.useContext(Cr);
|
|
1697
1723
|
if (!e)
|
|
1698
1724
|
throw new Error("useFormContext must be used within a Form component");
|
|
1699
1725
|
return e;
|
|
@@ -1706,7 +1732,7 @@ function Ro({
|
|
|
1706
1732
|
mode: s = "onSubmit",
|
|
1707
1733
|
reValidateMode: n = "onChange",
|
|
1708
1734
|
className: a,
|
|
1709
|
-
style:
|
|
1735
|
+
style: i,
|
|
1710
1736
|
formProps: f
|
|
1711
1737
|
}) {
|
|
1712
1738
|
const c = xo({
|
|
@@ -1714,8 +1740,8 @@ function Ro({
|
|
|
1714
1740
|
defaultValues: o,
|
|
1715
1741
|
mode: s,
|
|
1716
1742
|
reValidateMode: n
|
|
1717
|
-
}),
|
|
1718
|
-
return /* @__PURE__ */
|
|
1743
|
+
}), d = c.handleSubmit(e);
|
|
1744
|
+
return /* @__PURE__ */ _(Cr.Provider, { value: c, children: /* @__PURE__ */ _("form", { ...f, className: a, style: i, onSubmit: d, children: typeof r == "function" ? r(c) : r }) });
|
|
1719
1745
|
}
|
|
1720
1746
|
const ca = Ro, Oo = "FormError-module__formError___kaUBn", Io = {
|
|
1721
1747
|
formError: Oo
|
|
@@ -1735,8 +1761,8 @@ const ca = Ro, Oo = "FormError-module__formError___kaUBn", Io = {
|
|
|
1735
1761
|
color: e || n.colors.error,
|
|
1736
1762
|
...o
|
|
1737
1763
|
// Top level style prop overrides
|
|
1738
|
-
},
|
|
1739
|
-
return /* @__PURE__ */
|
|
1764
|
+
}, i = [Io.formError, t].filter(Boolean).join(" ");
|
|
1765
|
+
return /* @__PURE__ */ _("div", { ...s, className: i, style: a, role: "alert", "aria-live": "polite", children: r });
|
|
1740
1766
|
}, Ho = "FormGroup-module__formGroup___aVI-B", jo = "FormGroup-module__inputWrapper___429QE", Wo = "FormGroup-module__indented___t61iz", Uo = "FormGroup-module__disabled___W-tJ0", qo = "FormGroup-module__required___mO3xA", Se = {
|
|
1741
1767
|
formGroup: Ho,
|
|
1742
1768
|
inputWrapper: jo,
|
|
@@ -1754,12 +1780,12 @@ const ca = Ro, Oo = "FormError-module__formError___kaUBn", Io = {
|
|
|
1754
1780
|
name: s,
|
|
1755
1781
|
label: n,
|
|
1756
1782
|
errorMessage: a,
|
|
1757
|
-
labelProps:
|
|
1783
|
+
labelProps: i,
|
|
1758
1784
|
// Content
|
|
1759
1785
|
children: f,
|
|
1760
1786
|
// Style overrides
|
|
1761
1787
|
className: c,
|
|
1762
|
-
style:
|
|
1788
|
+
style: d,
|
|
1763
1789
|
// Element-specific props
|
|
1764
1790
|
divProps: y
|
|
1765
1791
|
}) => {
|
|
@@ -1770,8 +1796,8 @@ const ca = Ro, Oo = "FormError-module__formError___kaUBn", Io = {
|
|
|
1770
1796
|
c
|
|
1771
1797
|
].filter(Boolean).join(" "), b = {
|
|
1772
1798
|
"--form-group-margin-bottom": `calc(${m.fonts.rhythm} * 0.35)`,
|
|
1773
|
-
...
|
|
1774
|
-
},
|
|
1799
|
+
...d
|
|
1800
|
+
}, p = N.Children.map(f, (k) => {
|
|
1775
1801
|
if (N.isValidElement(k)) {
|
|
1776
1802
|
const V = {};
|
|
1777
1803
|
if (e && k.props.disabled === void 0 && (V.disabled = !0), r && k.props.error === void 0 && (V.error = !0), s && k.props.id === void 0 && k.type !== N.Fragment && (V.id = s), Object.keys(V).length > 0)
|
|
@@ -1780,15 +1806,15 @@ const ca = Ro, Oo = "FormError-module__formError___kaUBn", Io = {
|
|
|
1780
1806
|
return k;
|
|
1781
1807
|
});
|
|
1782
1808
|
return /* @__PURE__ */ D("div", { ...y, className: C, style: b, children: [
|
|
1783
|
-
n && /* @__PURE__ */ D(_t, { htmlFor: s, disabled: e, error: r, ...
|
|
1809
|
+
n && /* @__PURE__ */ D(_t, { htmlFor: s, disabled: e, error: r, ...i, children: [
|
|
1784
1810
|
n,
|
|
1785
1811
|
t && /* @__PURE__ */ D("span", { className: Se.required, "aria-label": "required", children: [
|
|
1786
1812
|
" ",
|
|
1787
1813
|
"*"
|
|
1788
1814
|
] })
|
|
1789
1815
|
] }),
|
|
1790
|
-
/* @__PURE__ */
|
|
1791
|
-
r && a && /* @__PURE__ */
|
|
1816
|
+
/* @__PURE__ */ _("div", { className: `${Se.inputWrapper} ${o ? Se.indented : ""}`, children: p }),
|
|
1817
|
+
r && a && /* @__PURE__ */ _(To, { children: a })
|
|
1792
1818
|
] });
|
|
1793
1819
|
};
|
|
1794
1820
|
function ge({
|
|
@@ -1799,19 +1825,19 @@ function ge({
|
|
|
1799
1825
|
rules: s,
|
|
1800
1826
|
disabled: n,
|
|
1801
1827
|
className: a,
|
|
1802
|
-
style:
|
|
1828
|
+
style: i,
|
|
1803
1829
|
indent: f,
|
|
1804
1830
|
labelProps: c
|
|
1805
1831
|
}) {
|
|
1806
|
-
const { control:
|
|
1832
|
+
const { control: d } = Do(), {
|
|
1807
1833
|
field: y,
|
|
1808
1834
|
fieldState: { error: m }
|
|
1809
|
-
} =
|
|
1835
|
+
} = lo({
|
|
1810
1836
|
name: e,
|
|
1811
|
-
control:
|
|
1837
|
+
control: d,
|
|
1812
1838
|
rules: s
|
|
1813
1839
|
});
|
|
1814
|
-
return /* @__PURE__ */
|
|
1840
|
+
return /* @__PURE__ */ _(
|
|
1815
1841
|
Go,
|
|
1816
1842
|
{
|
|
1817
1843
|
label: r,
|
|
@@ -1821,7 +1847,7 @@ function ge({
|
|
|
1821
1847
|
disabled: n,
|
|
1822
1848
|
required: t,
|
|
1823
1849
|
className: a,
|
|
1824
|
-
style:
|
|
1850
|
+
style: i,
|
|
1825
1851
|
indent: f,
|
|
1826
1852
|
labelProps: c,
|
|
1827
1853
|
children: o({
|
|
@@ -1862,11 +1888,11 @@ const Zo = "Input-module__input___WjT81", Ko = "Input-module__sizeSmall___NFvsi"
|
|
|
1862
1888
|
id: s,
|
|
1863
1889
|
name: n = "",
|
|
1864
1890
|
placeholder: a,
|
|
1865
|
-
placeholderOpacity:
|
|
1891
|
+
placeholderOpacity: i = 0.3,
|
|
1866
1892
|
type: f = "text",
|
|
1867
1893
|
value: c = "",
|
|
1868
1894
|
// Event handlers
|
|
1869
|
-
onChange:
|
|
1895
|
+
onChange: d,
|
|
1870
1896
|
onBlur: y,
|
|
1871
1897
|
// Standard React props
|
|
1872
1898
|
className: m,
|
|
@@ -1874,18 +1900,17 @@ const Zo = "Input-module__input___WjT81", Ko = "Input-module__sizeSmall___NFvsi"
|
|
|
1874
1900
|
// Element-specific props
|
|
1875
1901
|
inputProps: b
|
|
1876
1902
|
}) => {
|
|
1877
|
-
const
|
|
1903
|
+
const p = R(), k = p.colors.error, V = r ? k : t || p.colors.primary, g = Xo({
|
|
1878
1904
|
color: V,
|
|
1879
1905
|
disabled: e,
|
|
1880
|
-
|
|
1881
|
-
placeholderOpacity: l
|
|
1906
|
+
placeholderOpacity: i
|
|
1882
1907
|
}), F = {
|
|
1883
1908
|
"--placeholder-opacity": g.placeholderOpacity,
|
|
1884
|
-
"--input-padding-small": `calc(${
|
|
1885
|
-
"--input-padding-large": `calc(${
|
|
1909
|
+
"--input-padding-small": `calc(${p.fonts.rhythm} * ${p.sizes.small.paddingVertical}) calc(${p.fonts.rhythm} * ${p.inputs.paddingHorizontal})`,
|
|
1910
|
+
"--input-padding-large": `calc(${p.fonts.rhythm} * ${p.sizes.large.paddingVertical}) calc(${p.fonts.rhythm} * ${p.inputs.paddingHorizontal})`,
|
|
1886
1911
|
borderColor: g.borderColor,
|
|
1887
|
-
borderWidth:
|
|
1888
|
-
borderRadius:
|
|
1912
|
+
borderWidth: p.border.width,
|
|
1913
|
+
borderRadius: p.border.radius,
|
|
1889
1914
|
color: g.color,
|
|
1890
1915
|
fontSize: g.fontSize,
|
|
1891
1916
|
opacity: g.opacity,
|
|
@@ -1896,7 +1921,7 @@ const Zo = "Input-module__input___WjT81", Ko = "Input-module__sizeSmall___NFvsi"
|
|
|
1896
1921
|
o === "small" ? et.sizeSmall : et.sizeLarge,
|
|
1897
1922
|
m
|
|
1898
1923
|
].filter(Boolean).join(" ");
|
|
1899
|
-
return /* @__PURE__ */
|
|
1924
|
+
return /* @__PURE__ */ _(
|
|
1900
1925
|
"input",
|
|
1901
1926
|
{
|
|
1902
1927
|
...b,
|
|
@@ -1904,7 +1929,7 @@ const Zo = "Input-module__input___WjT81", Ko = "Input-module__sizeSmall___NFvsi"
|
|
|
1904
1929
|
disabled: e,
|
|
1905
1930
|
id: s,
|
|
1906
1931
|
name: n,
|
|
1907
|
-
onChange:
|
|
1932
|
+
onChange: d,
|
|
1908
1933
|
onBlur: y,
|
|
1909
1934
|
placeholder: a,
|
|
1910
1935
|
type: f,
|
|
@@ -1913,7 +1938,7 @@ const Zo = "Input-module__input___WjT81", Ko = "Input-module__sizeSmall___NFvsi"
|
|
|
1913
1938
|
}
|
|
1914
1939
|
);
|
|
1915
1940
|
};
|
|
1916
|
-
function
|
|
1941
|
+
function da({
|
|
1917
1942
|
name: e,
|
|
1918
1943
|
label: r,
|
|
1919
1944
|
required: t,
|
|
@@ -1921,9 +1946,9 @@ function ua({
|
|
|
1921
1946
|
disabled: s,
|
|
1922
1947
|
className: n,
|
|
1923
1948
|
style: a,
|
|
1924
|
-
...
|
|
1949
|
+
...i
|
|
1925
1950
|
}) {
|
|
1926
|
-
return /* @__PURE__ */
|
|
1951
|
+
return /* @__PURE__ */ _(
|
|
1927
1952
|
ge,
|
|
1928
1953
|
{
|
|
1929
1954
|
name: e,
|
|
@@ -1933,14 +1958,14 @@ function ua({
|
|
|
1933
1958
|
disabled: s,
|
|
1934
1959
|
className: n,
|
|
1935
1960
|
style: a,
|
|
1936
|
-
children: ({ value: f, onChange: c, onBlur:
|
|
1961
|
+
children: ({ value: f, onChange: c, onBlur: d, name: y, error: m }) => /* @__PURE__ */ _(
|
|
1937
1962
|
Jo,
|
|
1938
1963
|
{
|
|
1939
|
-
...
|
|
1964
|
+
...i,
|
|
1940
1965
|
name: y,
|
|
1941
1966
|
value: f || "",
|
|
1942
1967
|
onChange: (C) => c(C.target.value),
|
|
1943
|
-
onBlur:
|
|
1968
|
+
onBlur: d,
|
|
1944
1969
|
error: m
|
|
1945
1970
|
}
|
|
1946
1971
|
)
|
|
@@ -1972,11 +1997,11 @@ const Yo = "Textarea-module__textarea___Z-y6g", es = "Textarea-module__sizeSmall
|
|
|
1972
1997
|
id: s,
|
|
1973
1998
|
name: n = "",
|
|
1974
1999
|
placeholder: a,
|
|
1975
|
-
placeholderOpacity:
|
|
2000
|
+
placeholderOpacity: i = 0.3,
|
|
1976
2001
|
rows: f = 3,
|
|
1977
2002
|
value: c = "",
|
|
1978
2003
|
// Event handlers
|
|
1979
|
-
onChange:
|
|
2004
|
+
onChange: d,
|
|
1980
2005
|
onBlur: y,
|
|
1981
2006
|
// Standard React props
|
|
1982
2007
|
className: m,
|
|
@@ -1984,19 +2009,19 @@ const Yo = "Textarea-module__textarea___Z-y6g", es = "Textarea-module__sizeSmall
|
|
|
1984
2009
|
// Element-specific props
|
|
1985
2010
|
textareaProps: b
|
|
1986
2011
|
}) => {
|
|
1987
|
-
const
|
|
2012
|
+
const p = R(), k = p.colors.error, V = r ? k : t || p.colors.primary, g = rs({
|
|
1988
2013
|
color: V,
|
|
1989
2014
|
disabled: e,
|
|
1990
|
-
placeholderOpacity:
|
|
2015
|
+
placeholderOpacity: i
|
|
1991
2016
|
}), F = {
|
|
1992
2017
|
"--placeholder-opacity": g.placeholderOpacity,
|
|
1993
|
-
"--textarea-padding-small": `calc(${
|
|
1994
|
-
"--textarea-padding-large": `calc(${
|
|
2018
|
+
"--textarea-padding-small": `calc(${p.fonts.rhythm} * ${p.sizes.small.paddingVertical}) calc(${p.fonts.rhythm} * ${p.inputs.paddingHorizontal})`,
|
|
2019
|
+
"--textarea-padding-large": `calc(${p.fonts.rhythm} * ${p.sizes.large.paddingVertical}) calc(${p.fonts.rhythm} * ${p.inputs.paddingHorizontal})`,
|
|
1995
2020
|
borderColor: g.borderColor,
|
|
1996
|
-
borderWidth:
|
|
1997
|
-
borderRadius:
|
|
2021
|
+
borderWidth: p.border.width,
|
|
2022
|
+
borderRadius: p.border.radius,
|
|
1998
2023
|
color: g.color,
|
|
1999
|
-
fontSize:
|
|
2024
|
+
fontSize: "1em",
|
|
2000
2025
|
opacity: g.opacity,
|
|
2001
2026
|
...C
|
|
2002
2027
|
// Top level style overrides
|
|
@@ -2005,7 +2030,7 @@ const Yo = "Textarea-module__textarea___Z-y6g", es = "Textarea-module__sizeSmall
|
|
|
2005
2030
|
o === "small" ? tt.sizeSmall : tt.sizeLarge,
|
|
2006
2031
|
m
|
|
2007
2032
|
].filter(Boolean).join(" ");
|
|
2008
|
-
return /* @__PURE__ */
|
|
2033
|
+
return /* @__PURE__ */ _(
|
|
2009
2034
|
"textarea",
|
|
2010
2035
|
{
|
|
2011
2036
|
...b,
|
|
@@ -2013,7 +2038,7 @@ const Yo = "Textarea-module__textarea___Z-y6g", es = "Textarea-module__sizeSmall
|
|
|
2013
2038
|
disabled: e,
|
|
2014
2039
|
id: s,
|
|
2015
2040
|
name: n,
|
|
2016
|
-
onChange:
|
|
2041
|
+
onChange: d,
|
|
2017
2042
|
onBlur: y,
|
|
2018
2043
|
placeholder: a,
|
|
2019
2044
|
rows: f,
|
|
@@ -2022,7 +2047,7 @@ const Yo = "Textarea-module__textarea___Z-y6g", es = "Textarea-module__sizeSmall
|
|
|
2022
2047
|
}
|
|
2023
2048
|
);
|
|
2024
2049
|
};
|
|
2025
|
-
function
|
|
2050
|
+
function ua({
|
|
2026
2051
|
name: e,
|
|
2027
2052
|
label: r,
|
|
2028
2053
|
required: t,
|
|
@@ -2030,9 +2055,9 @@ function da({
|
|
|
2030
2055
|
disabled: s,
|
|
2031
2056
|
className: n,
|
|
2032
2057
|
style: a,
|
|
2033
|
-
...
|
|
2058
|
+
...i
|
|
2034
2059
|
}) {
|
|
2035
|
-
return /* @__PURE__ */
|
|
2060
|
+
return /* @__PURE__ */ _(
|
|
2036
2061
|
ge,
|
|
2037
2062
|
{
|
|
2038
2063
|
name: e,
|
|
@@ -2042,14 +2067,14 @@ function da({
|
|
|
2042
2067
|
disabled: s,
|
|
2043
2068
|
className: n,
|
|
2044
2069
|
style: a,
|
|
2045
|
-
children: ({ value: f, onChange: c, onBlur:
|
|
2070
|
+
children: ({ value: f, onChange: c, onBlur: d, name: y, error: m }) => /* @__PURE__ */ _(
|
|
2046
2071
|
os,
|
|
2047
2072
|
{
|
|
2048
|
-
...
|
|
2073
|
+
...i,
|
|
2049
2074
|
name: y,
|
|
2050
2075
|
value: f || "",
|
|
2051
2076
|
onChange: (C) => c(C.target.value),
|
|
2052
|
-
onBlur:
|
|
2077
|
+
onBlur: d,
|
|
2053
2078
|
error: m
|
|
2054
2079
|
}
|
|
2055
2080
|
)
|
|
@@ -2060,7 +2085,7 @@ const ss = "Select-module__select___cjdcr", ns = "Select-module__sizeSmall___i1q
|
|
|
2060
2085
|
select: ss,
|
|
2061
2086
|
sizeSmall: ns,
|
|
2062
2087
|
sizeLarge: as
|
|
2063
|
-
},
|
|
2088
|
+
}, is = ({
|
|
2064
2089
|
color: e = "#000",
|
|
2065
2090
|
disabled: r = !1
|
|
2066
2091
|
}) => ({
|
|
@@ -2087,7 +2112,7 @@ const ss = "Select-module__select___cjdcr", ns = "Select-module__sizeSmall___i1q
|
|
|
2087
2112
|
`.trim();
|
|
2088
2113
|
return `url("data:image/svg+xml,${encodeURIComponent(a)}")`;
|
|
2089
2114
|
})(e)
|
|
2090
|
-
}),
|
|
2115
|
+
}), ls = ({
|
|
2091
2116
|
// State props
|
|
2092
2117
|
disabled: e = !1,
|
|
2093
2118
|
error: r = !1,
|
|
@@ -2099,18 +2124,18 @@ const ss = "Select-module__select___cjdcr", ns = "Select-module__sizeSmall___i1q
|
|
|
2099
2124
|
id: s,
|
|
2100
2125
|
name: n = "",
|
|
2101
2126
|
placeholder: a = "",
|
|
2102
|
-
value:
|
|
2127
|
+
value: i = "",
|
|
2103
2128
|
// Event handlers
|
|
2104
2129
|
onChange: f,
|
|
2105
2130
|
onBlur: c,
|
|
2106
2131
|
// Standard React props
|
|
2107
|
-
children:
|
|
2132
|
+
children: d,
|
|
2108
2133
|
className: y,
|
|
2109
2134
|
style: m,
|
|
2110
2135
|
// Element-specific props
|
|
2111
2136
|
selectProps: C
|
|
2112
2137
|
}) => {
|
|
2113
|
-
const b = R(),
|
|
2138
|
+
const b = R(), p = b.colors.error, k = r ? p : t || b.colors.primary, V = is({
|
|
2114
2139
|
color: k,
|
|
2115
2140
|
disabled: e
|
|
2116
2141
|
}), g = {
|
|
@@ -2126,7 +2151,7 @@ const ss = "Select-module__select___cjdcr", ns = "Select-module__sizeSmall___i1q
|
|
|
2126
2151
|
borderRadius: b.border.radius,
|
|
2127
2152
|
color: V.color,
|
|
2128
2153
|
cursor: V.cursor,
|
|
2129
|
-
fontSize:
|
|
2154
|
+
fontSize: "1em",
|
|
2130
2155
|
opacity: V.opacity,
|
|
2131
2156
|
...m
|
|
2132
2157
|
// Top level style overrides
|
|
@@ -2145,11 +2170,11 @@ const ss = "Select-module__select___cjdcr", ns = "Select-module__sizeSmall___i1q
|
|
|
2145
2170
|
name: n,
|
|
2146
2171
|
onChange: f,
|
|
2147
2172
|
onBlur: c,
|
|
2148
|
-
value:
|
|
2173
|
+
value: i,
|
|
2149
2174
|
style: g,
|
|
2150
2175
|
children: [
|
|
2151
|
-
a !== "" && /* @__PURE__ */
|
|
2152
|
-
|
|
2176
|
+
a !== "" && /* @__PURE__ */ _("option", { disabled: !0, value: "", children: a }),
|
|
2177
|
+
d
|
|
2153
2178
|
]
|
|
2154
2179
|
}
|
|
2155
2180
|
);
|
|
@@ -2162,10 +2187,10 @@ function fa({
|
|
|
2162
2187
|
disabled: s,
|
|
2163
2188
|
className: n,
|
|
2164
2189
|
style: a,
|
|
2165
|
-
children:
|
|
2190
|
+
children: i,
|
|
2166
2191
|
...f
|
|
2167
2192
|
}) {
|
|
2168
|
-
return /* @__PURE__ */
|
|
2193
|
+
return /* @__PURE__ */ _(
|
|
2169
2194
|
ge,
|
|
2170
2195
|
{
|
|
2171
2196
|
name: e,
|
|
@@ -2175,16 +2200,16 @@ function fa({
|
|
|
2175
2200
|
disabled: s,
|
|
2176
2201
|
className: n,
|
|
2177
2202
|
style: a,
|
|
2178
|
-
children: ({ value: c, onChange:
|
|
2179
|
-
|
|
2203
|
+
children: ({ value: c, onChange: d, onBlur: y, name: m, error: C }) => /* @__PURE__ */ _(
|
|
2204
|
+
ls,
|
|
2180
2205
|
{
|
|
2181
2206
|
...f,
|
|
2182
2207
|
name: m,
|
|
2183
2208
|
value: c || "",
|
|
2184
|
-
onChange: (b) =>
|
|
2209
|
+
onChange: (b) => d(b.target.value),
|
|
2185
2210
|
onBlur: y,
|
|
2186
2211
|
error: C,
|
|
2187
|
-
children:
|
|
2212
|
+
children: i
|
|
2188
2213
|
}
|
|
2189
2214
|
)
|
|
2190
2215
|
}
|
|
@@ -2199,7 +2224,7 @@ function ma({
|
|
|
2199
2224
|
style: n,
|
|
2200
2225
|
...a
|
|
2201
2226
|
}) {
|
|
2202
|
-
return /* @__PURE__ */
|
|
2227
|
+
return /* @__PURE__ */ _(
|
|
2203
2228
|
ge,
|
|
2204
2229
|
{
|
|
2205
2230
|
name: e,
|
|
@@ -2208,23 +2233,23 @@ function ma({
|
|
|
2208
2233
|
disabled: o,
|
|
2209
2234
|
className: s,
|
|
2210
2235
|
style: n,
|
|
2211
|
-
children: ({ value:
|
|
2212
|
-
|
|
2236
|
+
children: ({ value: i, onChange: f, name: c, error: d }) => /* @__PURE__ */ _(
|
|
2237
|
+
dt,
|
|
2213
2238
|
{
|
|
2214
2239
|
...a,
|
|
2215
2240
|
name: c,
|
|
2216
|
-
checked: !!
|
|
2241
|
+
checked: !!i,
|
|
2217
2242
|
onChange: (y) => f(y.target.checked),
|
|
2218
|
-
error:
|
|
2243
|
+
error: d
|
|
2219
2244
|
}
|
|
2220
2245
|
)
|
|
2221
2246
|
}
|
|
2222
2247
|
);
|
|
2223
2248
|
}
|
|
2224
|
-
const cs = "Radio-module__container___AQxhk",
|
|
2249
|
+
const cs = "Radio-module__container___AQxhk", ds = "Radio-module__svg___zl5kF", us = "Radio-module__label___vAFIP", ot = {
|
|
2225
2250
|
container: cs,
|
|
2226
|
-
svg:
|
|
2227
|
-
label:
|
|
2251
|
+
svg: ds,
|
|
2252
|
+
label: us
|
|
2228
2253
|
}, fs = ({
|
|
2229
2254
|
color: e = "#000",
|
|
2230
2255
|
disabled: r = !1
|
|
@@ -2232,7 +2257,7 @@ const cs = "Radio-module__container___AQxhk", us = "Radio-module__svg___zl5kF",
|
|
|
2232
2257
|
radioColor: e,
|
|
2233
2258
|
cursor: r ? "default" : "pointer",
|
|
2234
2259
|
opacity: r ? 0.3 : 1
|
|
2235
|
-
}),
|
|
2260
|
+
}), Fr = ({
|
|
2236
2261
|
// Color prop
|
|
2237
2262
|
color: e,
|
|
2238
2263
|
// State props
|
|
@@ -2243,24 +2268,24 @@ const cs = "Radio-module__container___AQxhk", us = "Radio-module__svg___zl5kF",
|
|
|
2243
2268
|
name: s,
|
|
2244
2269
|
id: n,
|
|
2245
2270
|
onChange: a,
|
|
2246
|
-
label:
|
|
2271
|
+
label: i,
|
|
2247
2272
|
labelStyle: f,
|
|
2248
2273
|
// Style overrides
|
|
2249
2274
|
className: c,
|
|
2250
|
-
style:
|
|
2275
|
+
style: d,
|
|
2251
2276
|
// Element-specific props
|
|
2252
2277
|
divProps: y
|
|
2253
2278
|
}) => {
|
|
2254
|
-
const m = R(), C = n ||
|
|
2255
|
-
color:
|
|
2279
|
+
const m = R(), C = n || ir(), b = m.colors.error, p = o ? b : e || m.colors.primary, k = fs({
|
|
2280
|
+
color: p,
|
|
2256
2281
|
disabled: t
|
|
2257
|
-
}), V = (
|
|
2258
|
-
t || a(
|
|
2282
|
+
}), V = (P) => {
|
|
2283
|
+
t || a(P);
|
|
2259
2284
|
}, g = {
|
|
2260
2285
|
cursor: k.cursor,
|
|
2261
|
-
fontSize:
|
|
2286
|
+
fontSize: "1em",
|
|
2262
2287
|
opacity: k.opacity,
|
|
2263
|
-
...
|
|
2288
|
+
...d
|
|
2264
2289
|
// Top level style overrides
|
|
2265
2290
|
}, F = {
|
|
2266
2291
|
width: "1em"
|
|
@@ -2272,14 +2297,14 @@ const cs = "Radio-module__container___AQxhk", us = "Radio-module__svg___zl5kF",
|
|
|
2272
2297
|
fill: k.radioColor
|
|
2273
2298
|
}, B = [ot.container, c].filter(Boolean).join(" ");
|
|
2274
2299
|
return /* @__PURE__ */ D("div", { ...y, className: B, style: g, children: [
|
|
2275
|
-
/* @__PURE__ */
|
|
2300
|
+
/* @__PURE__ */ _(
|
|
2276
2301
|
"input",
|
|
2277
2302
|
{
|
|
2278
2303
|
id: C,
|
|
2279
2304
|
checked: r,
|
|
2280
2305
|
disabled: t,
|
|
2281
2306
|
name: s,
|
|
2282
|
-
onChange: (
|
|
2307
|
+
onChange: (P) => V({ target: { checked: P.target.checked, name: s, type: "radio" } }),
|
|
2283
2308
|
style: { display: "none" },
|
|
2284
2309
|
type: "radio"
|
|
2285
2310
|
}
|
|
@@ -2293,12 +2318,12 @@ const cs = "Radio-module__container___AQxhk", us = "Radio-module__svg___zl5kF",
|
|
|
2293
2318
|
className: ot.svg,
|
|
2294
2319
|
style: F,
|
|
2295
2320
|
children: [
|
|
2296
|
-
/* @__PURE__ */
|
|
2297
|
-
r && /* @__PURE__ */
|
|
2321
|
+
/* @__PURE__ */ _("circle", { cx: "50", cy: "50", r: "42.5", width: "100%", style: z }),
|
|
2322
|
+
r && /* @__PURE__ */ _("circle", { cx: "50", cy: "50", r: "25", style: E })
|
|
2298
2323
|
]
|
|
2299
2324
|
}
|
|
2300
2325
|
),
|
|
2301
|
-
|
|
2326
|
+
i && /* @__PURE__ */ _(
|
|
2302
2327
|
_t,
|
|
2303
2328
|
{
|
|
2304
2329
|
htmlFor: C,
|
|
@@ -2307,7 +2332,7 @@ const cs = "Radio-module__container___AQxhk", us = "Radio-module__svg___zl5kF",
|
|
|
2307
2332
|
color: k.radioColor,
|
|
2308
2333
|
disabled: t,
|
|
2309
2334
|
error: o,
|
|
2310
|
-
children:
|
|
2335
|
+
children: i
|
|
2311
2336
|
}
|
|
2312
2337
|
)
|
|
2313
2338
|
] });
|
|
@@ -2320,10 +2345,10 @@ function ya({
|
|
|
2320
2345
|
disabled: s,
|
|
2321
2346
|
className: n,
|
|
2322
2347
|
style: a,
|
|
2323
|
-
value:
|
|
2348
|
+
value: i,
|
|
2324
2349
|
...f
|
|
2325
2350
|
}) {
|
|
2326
|
-
return /* @__PURE__ */
|
|
2351
|
+
return /* @__PURE__ */ _(
|
|
2327
2352
|
ge,
|
|
2328
2353
|
{
|
|
2329
2354
|
name: e,
|
|
@@ -2332,13 +2357,13 @@ function ya({
|
|
|
2332
2357
|
disabled: s,
|
|
2333
2358
|
className: n,
|
|
2334
2359
|
style: a,
|
|
2335
|
-
children: ({ value: c, onChange:
|
|
2336
|
-
|
|
2360
|
+
children: ({ value: c, onChange: d, name: y, error: m }) => /* @__PURE__ */ _(
|
|
2361
|
+
Fr,
|
|
2337
2362
|
{
|
|
2338
2363
|
...f,
|
|
2339
2364
|
name: y,
|
|
2340
|
-
checked: c ===
|
|
2341
|
-
onChange: () =>
|
|
2365
|
+
checked: c === i,
|
|
2366
|
+
onChange: () => d(i),
|
|
2342
2367
|
error: m,
|
|
2343
2368
|
label: r
|
|
2344
2369
|
}
|
|
@@ -2354,9 +2379,9 @@ function ha({
|
|
|
2354
2379
|
disabled: s,
|
|
2355
2380
|
className: n,
|
|
2356
2381
|
style: a,
|
|
2357
|
-
indent:
|
|
2382
|
+
indent: i = !0
|
|
2358
2383
|
}) {
|
|
2359
|
-
return /* @__PURE__ */
|
|
2384
|
+
return /* @__PURE__ */ _(
|
|
2360
2385
|
ge,
|
|
2361
2386
|
{
|
|
2362
2387
|
name: e,
|
|
@@ -2365,16 +2390,16 @@ function ha({
|
|
|
2365
2390
|
disabled: s,
|
|
2366
2391
|
className: n,
|
|
2367
2392
|
style: a,
|
|
2368
|
-
indent:
|
|
2393
|
+
indent: i,
|
|
2369
2394
|
labelProps: {
|
|
2370
2395
|
style: {
|
|
2371
2396
|
marginBottom: ".25em"
|
|
2372
2397
|
}
|
|
2373
2398
|
},
|
|
2374
|
-
children: ({ value: f, onChange: c, name:
|
|
2375
|
-
|
|
2399
|
+
children: ({ value: f, onChange: c, name: d, error: y }) => /* @__PURE__ */ _(Fe, { children: o.map((m) => /* @__PURE__ */ _(
|
|
2400
|
+
Fr,
|
|
2376
2401
|
{
|
|
2377
|
-
name:
|
|
2402
|
+
name: d,
|
|
2378
2403
|
checked: f === m.value,
|
|
2379
2404
|
onChange: () => c(m.value),
|
|
2380
2405
|
label: m.label,
|
|
@@ -2394,10 +2419,10 @@ function _a({
|
|
|
2394
2419
|
children: s,
|
|
2395
2420
|
disabled: n,
|
|
2396
2421
|
className: a,
|
|
2397
|
-
style:
|
|
2422
|
+
style: i,
|
|
2398
2423
|
indent: f = !0
|
|
2399
2424
|
}) {
|
|
2400
|
-
return /* @__PURE__ */
|
|
2425
|
+
return /* @__PURE__ */ _(
|
|
2401
2426
|
ge,
|
|
2402
2427
|
{
|
|
2403
2428
|
name: e,
|
|
@@ -2405,40 +2430,40 @@ function _a({
|
|
|
2405
2430
|
required: t,
|
|
2406
2431
|
disabled: n,
|
|
2407
2432
|
className: a,
|
|
2408
|
-
style:
|
|
2433
|
+
style: i,
|
|
2409
2434
|
indent: f,
|
|
2410
2435
|
labelProps: {
|
|
2411
2436
|
style: {
|
|
2412
2437
|
marginBottom: ".25em"
|
|
2413
2438
|
}
|
|
2414
2439
|
},
|
|
2415
|
-
children: ({ value: c, onChange:
|
|
2416
|
-
const C = Array.isArray(c) ? c : [], b = (
|
|
2417
|
-
|
|
2440
|
+
children: ({ value: c, onChange: d, name: y, error: m }) => {
|
|
2441
|
+
const C = Array.isArray(c) ? c : [], b = (p, k) => {
|
|
2442
|
+
d(k ? [...C, p] : C.filter((V) => V !== p));
|
|
2418
2443
|
};
|
|
2419
|
-
return /* @__PURE__ */
|
|
2420
|
-
|
|
2444
|
+
return /* @__PURE__ */ _(Fe, { children: o ? o.map((p) => /* @__PURE__ */ _(
|
|
2445
|
+
dt,
|
|
2421
2446
|
{
|
|
2422
2447
|
name: `${y}[]`,
|
|
2423
|
-
checked: C.includes(
|
|
2424
|
-
onChange: (k) => b(
|
|
2425
|
-
label:
|
|
2426
|
-
disabled: n ||
|
|
2448
|
+
checked: C.includes(p.value),
|
|
2449
|
+
onChange: (k) => b(p.value, k.target.checked),
|
|
2450
|
+
label: p.label,
|
|
2451
|
+
disabled: n || p.disabled,
|
|
2427
2452
|
error: m
|
|
2428
2453
|
},
|
|
2429
|
-
|
|
2430
|
-
)) : N.Children.map(s, (
|
|
2431
|
-
if (N.isValidElement(
|
|
2432
|
-
const k =
|
|
2433
|
-
return N.cloneElement(
|
|
2454
|
+
p.value
|
|
2455
|
+
)) : N.Children.map(s, (p) => {
|
|
2456
|
+
if (N.isValidElement(p) && p.type === dt) {
|
|
2457
|
+
const k = p.props.value || p.props.name;
|
|
2458
|
+
return N.cloneElement(p, {
|
|
2434
2459
|
name: `${y}[]`,
|
|
2435
2460
|
checked: C.includes(k),
|
|
2436
2461
|
onChange: (V) => b(k, V.target.checked),
|
|
2437
|
-
error: m ||
|
|
2438
|
-
disabled: n ||
|
|
2462
|
+
error: m || p.props.error,
|
|
2463
|
+
disabled: n || p.props.disabled
|
|
2439
2464
|
});
|
|
2440
2465
|
}
|
|
2441
|
-
return
|
|
2466
|
+
return p;
|
|
2442
2467
|
}) });
|
|
2443
2468
|
}
|
|
2444
2469
|
}
|
|
@@ -2475,7 +2500,7 @@ const ms = "Hamburger-module__hamburger___Tf4-t", ys = "Hamburger-module__line__
|
|
|
2475
2500
|
// Form props
|
|
2476
2501
|
setOpen: a,
|
|
2477
2502
|
// Style overrides
|
|
2478
|
-
className:
|
|
2503
|
+
className: i,
|
|
2479
2504
|
style: f
|
|
2480
2505
|
}) => {
|
|
2481
2506
|
const c = _s({
|
|
@@ -2483,24 +2508,24 @@ const ms = "Hamburger-module__hamburger___Tf4-t", ys = "Hamburger-module__line__
|
|
|
2483
2508
|
color: e,
|
|
2484
2509
|
visible: r,
|
|
2485
2510
|
border: n
|
|
2486
|
-
}),
|
|
2511
|
+
}), d = [Ee.hamburger, s ? Ee.open : "", i].filter(Boolean).join(" ");
|
|
2487
2512
|
return /* @__PURE__ */ D(
|
|
2488
2513
|
"button",
|
|
2489
2514
|
{
|
|
2490
2515
|
ref: o,
|
|
2491
|
-
className:
|
|
2516
|
+
className: d,
|
|
2492
2517
|
onClick: () => a(!s),
|
|
2493
2518
|
style: { ...c, ...f },
|
|
2494
2519
|
"aria-label": "Toggle menu",
|
|
2495
2520
|
"aria-expanded": s,
|
|
2496
2521
|
children: [
|
|
2497
|
-
/* @__PURE__ */
|
|
2498
|
-
/* @__PURE__ */
|
|
2499
|
-
/* @__PURE__ */
|
|
2522
|
+
/* @__PURE__ */ _("div", { className: Ee.line }),
|
|
2523
|
+
/* @__PURE__ */ _("div", { className: Ee.line }),
|
|
2524
|
+
/* @__PURE__ */ _("div", { className: Ee.line })
|
|
2500
2525
|
]
|
|
2501
2526
|
}
|
|
2502
2527
|
);
|
|
2503
|
-
}, gs = "Header-module__header___RUooH", vs = "Header-module__container___t68M9",
|
|
2528
|
+
}, gs = "Header-module__header___RUooH", vs = "Header-module__container___t68M9", Yt = {
|
|
2504
2529
|
header: gs,
|
|
2505
2530
|
container: vs
|
|
2506
2531
|
}, bs = ({
|
|
@@ -2511,10 +2536,10 @@ const ms = "Hamburger-module__hamburger___Tf4-t", ys = "Hamburger-module__line__
|
|
|
2511
2536
|
height: s,
|
|
2512
2537
|
paddingSm: n,
|
|
2513
2538
|
padding: a,
|
|
2514
|
-
margin:
|
|
2539
|
+
margin: i,
|
|
2515
2540
|
gap: f,
|
|
2516
2541
|
backgroundColor: c,
|
|
2517
|
-
color:
|
|
2542
|
+
color: d
|
|
2518
2543
|
} = {}) => {
|
|
2519
2544
|
const y = R();
|
|
2520
2545
|
return {
|
|
@@ -2523,12 +2548,12 @@ const ms = "Hamburger-module__hamburger___Tf4-t", ys = "Hamburger-module__line__
|
|
|
2523
2548
|
"--header-width": o,
|
|
2524
2549
|
"--header-height": s,
|
|
2525
2550
|
"--header-padding": e ? n || y.layout.paddingSm : a || y.layout.padding,
|
|
2526
|
-
"--header-margin":
|
|
2551
|
+
"--header-margin": i,
|
|
2527
2552
|
"--header-gap": f,
|
|
2528
2553
|
backgroundColor: c,
|
|
2529
|
-
color:
|
|
2554
|
+
color: d
|
|
2530
2555
|
};
|
|
2531
|
-
},
|
|
2556
|
+
}, de = (e) => {
|
|
2532
2557
|
const r = typeof window < "u" && typeof window.matchMedia == "function";
|
|
2533
2558
|
return Hr((n) => {
|
|
2534
2559
|
if (!r) return () => {
|
|
@@ -2546,10 +2571,10 @@ const ms = "Hamburger-module__hamburger___Tf4-t", ys = "Hamburger-module__line__
|
|
|
2546
2571
|
width: s,
|
|
2547
2572
|
height: n,
|
|
2548
2573
|
padding: a,
|
|
2549
|
-
paddingSm:
|
|
2574
|
+
paddingSm: i,
|
|
2550
2575
|
margin: f,
|
|
2551
2576
|
gap: c,
|
|
2552
|
-
breakpoint:
|
|
2577
|
+
breakpoint: d,
|
|
2553
2578
|
fixed: y = !1,
|
|
2554
2579
|
// Content
|
|
2555
2580
|
children: m,
|
|
@@ -2557,22 +2582,22 @@ const ms = "Hamburger-module__hamburger___Tf4-t", ys = "Hamburger-module__line__
|
|
|
2557
2582
|
className: C,
|
|
2558
2583
|
style: b,
|
|
2559
2584
|
// Element-specific props
|
|
2560
|
-
headerProps:
|
|
2585
|
+
headerProps: p
|
|
2561
2586
|
}) => {
|
|
2562
|
-
const k = R(), V =
|
|
2587
|
+
const k = R(), V = d || k.breakpoints.sm, { maxWidth: g, unit: F } = Le(V), z = de(`(max-width: ${g}${F})`), E = bs({
|
|
2563
2588
|
isSmallScreen: z,
|
|
2564
2589
|
maxWidth: t,
|
|
2565
2590
|
minWidth: o,
|
|
2566
2591
|
width: s,
|
|
2567
2592
|
height: n,
|
|
2568
|
-
paddingSm:
|
|
2593
|
+
paddingSm: i,
|
|
2569
2594
|
padding: a,
|
|
2570
2595
|
margin: f,
|
|
2571
2596
|
gap: c,
|
|
2572
2597
|
backgroundColor: e,
|
|
2573
2598
|
color: r
|
|
2574
|
-
}), B = [
|
|
2575
|
-
return /* @__PURE__ */
|
|
2599
|
+
}), B = [Yt.container, C].filter(Boolean).join(" "), P = y ? { position: "fixed", top: 0, left: 0, right: 0, zIndex: 1e3 } : {};
|
|
2600
|
+
return /* @__PURE__ */ _("header", { ...p, className: Yt.header, style: P, children: /* @__PURE__ */ _(
|
|
2576
2601
|
"div",
|
|
2577
2602
|
{
|
|
2578
2603
|
className: B,
|
|
@@ -2586,7 +2611,7 @@ const ms = "Hamburger-module__hamburger___Tf4-t", ys = "Hamburger-module__line__
|
|
|
2586
2611
|
navHeader: xs,
|
|
2587
2612
|
compact: Cs,
|
|
2588
2613
|
navDesktop: Fs
|
|
2589
|
-
}, Vs = "Popover-module__triggerWrapper___dZpf6", zs = "Popover-module__popup___JAvrb", Es = "Popover-module__panelOverlay___1xDU5", Ns = "Popover-module__panelOverlayVisible___BgtIQ", $s = "Popover-module__backdrop___e8qHL", Ls = "Popover-module__panel___eUJ2E", As = "Popover-module__panelLeft___9nSLp",
|
|
2614
|
+
}, Vs = "Popover-module__triggerWrapper___dZpf6", zs = "Popover-module__popup___JAvrb", Es = "Popover-module__panelOverlay___1xDU5", Ns = "Popover-module__panelOverlayVisible___BgtIQ", $s = "Popover-module__backdrop___e8qHL", Ls = "Popover-module__panel___eUJ2E", As = "Popover-module__panelLeft___9nSLp", Ms = "Popover-module__panelRight___OrQfl", Ps = "Popover-module__panelOpen___hhvV-", Bs = "Popover-module__panelCloseButton___kALaN", ue = {
|
|
2590
2615
|
triggerWrapper: Vs,
|
|
2591
2616
|
popup: zs,
|
|
2592
2617
|
panelOverlay: Es,
|
|
@@ -2594,8 +2619,8 @@ const ms = "Hamburger-module__hamburger___Tf4-t", ys = "Hamburger-module__line__
|
|
|
2594
2619
|
backdrop: $s,
|
|
2595
2620
|
panel: Ls,
|
|
2596
2621
|
panelLeft: As,
|
|
2597
|
-
panelRight:
|
|
2598
|
-
panelOpen:
|
|
2622
|
+
panelRight: Ms,
|
|
2623
|
+
panelOpen: Ps,
|
|
2599
2624
|
panelCloseButton: Bs
|
|
2600
2625
|
};
|
|
2601
2626
|
function Ds(e, r) {
|
|
@@ -2604,11 +2629,11 @@ function Ds(e, r) {
|
|
|
2604
2629
|
r === "panel" && (e ? o(!0) : n(!1));
|
|
2605
2630
|
}, [e, r]), ne(() => {
|
|
2606
2631
|
if (r !== "panel" || !t || !e) return;
|
|
2607
|
-
let
|
|
2608
|
-
return
|
|
2632
|
+
let i, f;
|
|
2633
|
+
return i = requestAnimationFrame(() => {
|
|
2609
2634
|
f = requestAnimationFrame(() => n(!0));
|
|
2610
2635
|
}), () => {
|
|
2611
|
-
cancelAnimationFrame(
|
|
2636
|
+
cancelAnimationFrame(i), cancelAnimationFrame(f);
|
|
2612
2637
|
};
|
|
2613
2638
|
}, [t, e, r]);
|
|
2614
2639
|
const a = Ce(() => {
|
|
@@ -2619,16 +2644,16 @@ function Ds(e, r) {
|
|
|
2619
2644
|
function Rs(e, r, t, o) {
|
|
2620
2645
|
const [s, n] = J({}), a = Ce(() => {
|
|
2621
2646
|
if (r !== "popup" || !t.current) return;
|
|
2622
|
-
const
|
|
2647
|
+
const i = t.current.getBoundingClientRect(), f = {
|
|
2623
2648
|
position: "fixed",
|
|
2624
|
-
top:
|
|
2649
|
+
top: i.bottom + 4,
|
|
2625
2650
|
zIndex: 999
|
|
2626
2651
|
};
|
|
2627
|
-
n(o === "bottom-start" ? { ...f, left:
|
|
2652
|
+
n(o === "bottom-start" ? { ...f, left: i.left } : o === "bottom" ? {
|
|
2628
2653
|
...f,
|
|
2629
|
-
left:
|
|
2654
|
+
left: i.left + i.width / 2,
|
|
2630
2655
|
transform: "translateX(-50%)"
|
|
2631
|
-
} : { ...f, left:
|
|
2656
|
+
} : { ...f, left: i.right, transform: "translateX(-100%)" });
|
|
2632
2657
|
}, [r, o, t]);
|
|
2633
2658
|
return ne(() => {
|
|
2634
2659
|
e && r === "popup" && a();
|
|
@@ -2639,7 +2664,7 @@ function Rs(e, r, t, o) {
|
|
|
2639
2664
|
};
|
|
2640
2665
|
}, [e, r, a]), { popupPositionStyle: s };
|
|
2641
2666
|
}
|
|
2642
|
-
const
|
|
2667
|
+
const Vr = ({
|
|
2643
2668
|
trigger: e,
|
|
2644
2669
|
children: r,
|
|
2645
2670
|
variant: t = "popup",
|
|
@@ -2647,34 +2672,34 @@ const Fr = ({
|
|
|
2647
2672
|
onOpenChange: s,
|
|
2648
2673
|
placement: n = "bottom-start",
|
|
2649
2674
|
side: a = "left",
|
|
2650
|
-
panelWidth:
|
|
2675
|
+
panelWidth: i = "75%",
|
|
2651
2676
|
backdropColor: f = "rgba(0, 0, 0, 0.5)",
|
|
2652
2677
|
hideCloseButton: c = !1,
|
|
2653
|
-
closeOnBackdropClick:
|
|
2678
|
+
closeOnBackdropClick: d = !0,
|
|
2654
2679
|
className: y,
|
|
2655
2680
|
style: m,
|
|
2656
2681
|
popoverProps: C
|
|
2657
2682
|
}) => {
|
|
2658
|
-
const b = R(),
|
|
2683
|
+
const b = R(), p = o !== void 0, [k, V] = J(!1), g = p ? o : k, F = Ve(null), z = Ve(null), E = Ce(
|
|
2659
2684
|
(I) => {
|
|
2660
|
-
|
|
2685
|
+
p || V(I), s == null || s(I);
|
|
2661
2686
|
},
|
|
2662
|
-
[
|
|
2663
|
-
), B = Ce(() => E(!g), [g, E]),
|
|
2687
|
+
[p, s]
|
|
2688
|
+
), B = Ce(() => E(!g), [g, E]), P = Ce(() => E(!1), [E]), { panelMounted: U, panelVisible: M, handleTransitionEnd: K } = Ds(g, t), { popupPositionStyle: q } = Rs(g, t, F, n);
|
|
2664
2689
|
ne(() => {
|
|
2665
2690
|
if (!g || t !== "popup") return;
|
|
2666
2691
|
const I = (Q) => {
|
|
2667
2692
|
var te, me;
|
|
2668
|
-
(te = z.current) != null && te.contains(Q.target) || (me = F.current) != null && me.contains(Q.target) ||
|
|
2693
|
+
(te = z.current) != null && te.contains(Q.target) || (me = F.current) != null && me.contains(Q.target) || P();
|
|
2669
2694
|
};
|
|
2670
2695
|
return document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
|
|
2671
|
-
}, [g, t,
|
|
2696
|
+
}, [g, t, P]), ne(() => {
|
|
2672
2697
|
if (!g) return;
|
|
2673
2698
|
const I = (Q) => {
|
|
2674
|
-
Q.key === "Escape" &&
|
|
2699
|
+
Q.key === "Escape" && P();
|
|
2675
2700
|
};
|
|
2676
2701
|
return document.addEventListener("keydown", I), () => document.removeEventListener("keydown", I);
|
|
2677
|
-
}, [g,
|
|
2702
|
+
}, [g, P]), ne(() => {
|
|
2678
2703
|
if (!g || t !== "panel") return;
|
|
2679
2704
|
const I = window.scrollY;
|
|
2680
2705
|
return document.body.style.position = "fixed", document.body.style.top = `-${I}px`, document.body.style.width = "100%", () => {
|
|
@@ -2685,8 +2710,8 @@ const Fr = ({
|
|
|
2685
2710
|
// Non-function trigger: wrap in a span that delegates clicks to the trigger element.
|
|
2686
2711
|
// The wrapped element (e.g. <button>) handles its own keyboard accessibility.
|
|
2687
2712
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
2688
|
-
/* @__PURE__ */
|
|
2689
|
-
) : null, A = e ? /* @__PURE__ */
|
|
2713
|
+
/* @__PURE__ */ _("span", { onClick: B, style: { cursor: "pointer", display: "contents" }, children: e })
|
|
2714
|
+
) : null, A = e ? /* @__PURE__ */ _("span", { ref: F, className: ue.triggerWrapper, children: L }) : null;
|
|
2690
2715
|
if (t === "popup") {
|
|
2691
2716
|
const I = {
|
|
2692
2717
|
backgroundColor: b.colors.secondary,
|
|
@@ -2697,12 +2722,12 @@ const Fr = ({
|
|
|
2697
2722
|
};
|
|
2698
2723
|
return /* @__PURE__ */ D(Fe, { children: [
|
|
2699
2724
|
A,
|
|
2700
|
-
g &&
|
|
2701
|
-
/* @__PURE__ */
|
|
2725
|
+
g && lt(
|
|
2726
|
+
/* @__PURE__ */ _(
|
|
2702
2727
|
"div",
|
|
2703
2728
|
{
|
|
2704
2729
|
ref: z,
|
|
2705
|
-
className: [
|
|
2730
|
+
className: [ue.popup, y].filter(Boolean).join(" "),
|
|
2706
2731
|
style: I,
|
|
2707
2732
|
...C,
|
|
2708
2733
|
children: r
|
|
@@ -2713,24 +2738,24 @@ const Fr = ({
|
|
|
2713
2738
|
] });
|
|
2714
2739
|
}
|
|
2715
2740
|
const O = {
|
|
2716
|
-
width:
|
|
2741
|
+
width: i,
|
|
2717
2742
|
backgroundColor: b.colors.secondary,
|
|
2718
2743
|
...m
|
|
2719
2744
|
};
|
|
2720
2745
|
return /* @__PURE__ */ D(Fe, { children: [
|
|
2721
2746
|
A,
|
|
2722
|
-
U &&
|
|
2747
|
+
U && lt(
|
|
2723
2748
|
/* @__PURE__ */ D(
|
|
2724
2749
|
"div",
|
|
2725
2750
|
{
|
|
2726
|
-
className: [
|
|
2751
|
+
className: [ue.panelOverlay, M ? ue.panelOverlayVisible : ""].filter(Boolean).join(" "),
|
|
2727
2752
|
children: [
|
|
2728
|
-
/* @__PURE__ */
|
|
2753
|
+
/* @__PURE__ */ _(
|
|
2729
2754
|
"div",
|
|
2730
2755
|
{
|
|
2731
|
-
className:
|
|
2732
|
-
style: { backgroundColor:
|
|
2733
|
-
onClick:
|
|
2756
|
+
className: ue.backdrop,
|
|
2757
|
+
style: { backgroundColor: M ? f : "transparent" },
|
|
2758
|
+
onClick: d ? P : void 0,
|
|
2734
2759
|
role: "presentation"
|
|
2735
2760
|
}
|
|
2736
2761
|
),
|
|
@@ -2739,9 +2764,9 @@ const Fr = ({
|
|
|
2739
2764
|
{
|
|
2740
2765
|
ref: z,
|
|
2741
2766
|
className: [
|
|
2742
|
-
|
|
2743
|
-
a === "right" ?
|
|
2744
|
-
|
|
2767
|
+
ue.panel,
|
|
2768
|
+
a === "right" ? ue.panelRight : ue.panelLeft,
|
|
2769
|
+
M ? ue.panelOpen : "",
|
|
2745
2770
|
y
|
|
2746
2771
|
].filter(Boolean).join(" "),
|
|
2747
2772
|
style: O,
|
|
@@ -2750,14 +2775,14 @@ const Fr = ({
|
|
|
2750
2775
|
onTransitionEnd: K,
|
|
2751
2776
|
...C,
|
|
2752
2777
|
children: [
|
|
2753
|
-
!c && /* @__PURE__ */
|
|
2778
|
+
!c && /* @__PURE__ */ _(
|
|
2754
2779
|
"button",
|
|
2755
2780
|
{
|
|
2756
|
-
className:
|
|
2757
|
-
onClick:
|
|
2781
|
+
className: ue.panelCloseButton,
|
|
2782
|
+
onClick: P,
|
|
2758
2783
|
"aria-label": "Close panel",
|
|
2759
2784
|
type: "button",
|
|
2760
|
-
children: /* @__PURE__ */
|
|
2785
|
+
children: /* @__PURE__ */ _(
|
|
2761
2786
|
"svg",
|
|
2762
2787
|
{
|
|
2763
2788
|
width: "100%",
|
|
@@ -2766,7 +2791,7 @@ const Fr = ({
|
|
|
2766
2791
|
fill: "none",
|
|
2767
2792
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2768
2793
|
"aria-hidden": "true",
|
|
2769
|
-
children: /* @__PURE__ */
|
|
2794
|
+
children: /* @__PURE__ */ _(
|
|
2770
2795
|
"path",
|
|
2771
2796
|
{
|
|
2772
2797
|
d: "M15 5L5 15M5 5L15 15",
|
|
@@ -2822,15 +2847,15 @@ const Fr = ({
|
|
|
2822
2847
|
mobile: s,
|
|
2823
2848
|
panelWidth: n,
|
|
2824
2849
|
side: a,
|
|
2825
|
-
navClassName:
|
|
2850
|
+
navClassName: i,
|
|
2826
2851
|
cssProps: f,
|
|
2827
2852
|
navProps: c,
|
|
2828
|
-
content:
|
|
2853
|
+
content: d,
|
|
2829
2854
|
onNavClick: y
|
|
2830
2855
|
}) => {
|
|
2831
2856
|
const { backgroundColor: m, ...C } = f;
|
|
2832
|
-
return /* @__PURE__ */
|
|
2833
|
-
|
|
2857
|
+
return /* @__PURE__ */ _(
|
|
2858
|
+
Vr,
|
|
2834
2859
|
{
|
|
2835
2860
|
variant: "panel",
|
|
2836
2861
|
side: a || "right",
|
|
@@ -2838,20 +2863,20 @@ const Fr = ({
|
|
|
2838
2863
|
isOpen: e,
|
|
2839
2864
|
onOpenChange: r,
|
|
2840
2865
|
style: m ? { backgroundColor: m } : void 0,
|
|
2841
|
-
trigger: ({ onClick: b }) => /* @__PURE__ */
|
|
2866
|
+
trigger: ({ onClick: b }) => /* @__PURE__ */ _(
|
|
2842
2867
|
ps,
|
|
2843
2868
|
{
|
|
2844
2869
|
hamburgerRef: t,
|
|
2845
2870
|
visible: !0,
|
|
2846
2871
|
compact: o,
|
|
2847
2872
|
open: !1,
|
|
2848
|
-
setOpen: (
|
|
2873
|
+
setOpen: (p) => b(),
|
|
2849
2874
|
...s == null ? void 0 : s.hamburgerProps
|
|
2850
2875
|
}
|
|
2851
2876
|
),
|
|
2852
|
-
children: /* @__PURE__ */ D("nav", { ...c, className:
|
|
2853
|
-
/* @__PURE__ */
|
|
2854
|
-
typeof
|
|
2877
|
+
children: /* @__PURE__ */ D("nav", { ...c, className: i, style: C, onClickCapture: y, children: [
|
|
2878
|
+
/* @__PURE__ */ _("div", { className: xe.navHeader }),
|
|
2879
|
+
typeof d == "function" ? d({ setOpen: r }) : d
|
|
2855
2880
|
] })
|
|
2856
2881
|
}
|
|
2857
2882
|
);
|
|
@@ -2861,7 +2886,7 @@ const Fr = ({
|
|
|
2861
2886
|
cssProps: t,
|
|
2862
2887
|
navProps: o,
|
|
2863
2888
|
content: s
|
|
2864
|
-
}) => /* @__PURE__ */
|
|
2889
|
+
}) => /* @__PURE__ */ _("nav", { ...o, className: r, style: t, children: typeof s == "function" ? s({ setOpen: e }) : s }), pa = ({
|
|
2865
2890
|
mobile: e,
|
|
2866
2891
|
desktop: r,
|
|
2867
2892
|
breakpoints: t,
|
|
@@ -2869,14 +2894,14 @@ const Fr = ({
|
|
|
2869
2894
|
className: s,
|
|
2870
2895
|
style: n,
|
|
2871
2896
|
navProps: a,
|
|
2872
|
-
disableMobileTreatment:
|
|
2897
|
+
disableMobileTreatment: i = !1
|
|
2873
2898
|
}) => {
|
|
2874
|
-
const [f, c] = J(!1),
|
|
2899
|
+
const [f, c] = J(!1), d = Ve(null), m = { ...R().breakpoints, ...t }, { maxWidth: C, unit: b } = Le(m.md), { maxWidth: p, unit: k } = Le(m.sm), V = de(`(max-width: ${C}${b})`), g = de(`(max-width: ${p}${k})`), F = i ? !1 : V, z = i ? !1 : g, { navStyles: E } = Os({
|
|
2875
2900
|
isMobile: F,
|
|
2876
2901
|
isCompact: z,
|
|
2877
2902
|
mobile: e,
|
|
2878
2903
|
desktop: r
|
|
2879
|
-
}), B = { ...E, ...n },
|
|
2904
|
+
}), B = { ...E, ...n }, P = (K) => {
|
|
2880
2905
|
const q = K.target;
|
|
2881
2906
|
q.closest("[data-navdropdown-trigger]") || q.closest("a, button") && c(!1);
|
|
2882
2907
|
}, U = [
|
|
@@ -2884,13 +2909,13 @@ const Fr = ({
|
|
|
2884
2909
|
xe.navMobile,
|
|
2885
2910
|
z || e != null && e.compact ? xe.compact : "",
|
|
2886
2911
|
s
|
|
2887
|
-
].filter(Boolean).join(" "),
|
|
2888
|
-
return /* @__PURE__ */
|
|
2912
|
+
].filter(Boolean).join(" "), M = [xe.nav, xe.navDesktop, s].filter(Boolean).join(" ");
|
|
2913
|
+
return /* @__PURE__ */ _(Is.Provider, { value: { isMobile: F, setOpen: c }, children: F ? /* @__PURE__ */ _(
|
|
2889
2914
|
Ts,
|
|
2890
2915
|
{
|
|
2891
2916
|
open: f,
|
|
2892
2917
|
setOpen: c,
|
|
2893
|
-
hamburgerRef:
|
|
2918
|
+
hamburgerRef: d,
|
|
2894
2919
|
isCompact: z,
|
|
2895
2920
|
mobile: e,
|
|
2896
2921
|
panelWidth: e == null ? void 0 : e.panelWidth,
|
|
@@ -2899,13 +2924,13 @@ const Fr = ({
|
|
|
2899
2924
|
cssProps: B,
|
|
2900
2925
|
navProps: a,
|
|
2901
2926
|
content: (e == null ? void 0 : e.content) || o,
|
|
2902
|
-
onNavClick:
|
|
2927
|
+
onNavClick: P
|
|
2903
2928
|
}
|
|
2904
|
-
) : /* @__PURE__ */
|
|
2929
|
+
) : /* @__PURE__ */ _(
|
|
2905
2930
|
Hs,
|
|
2906
2931
|
{
|
|
2907
2932
|
setOpen: c,
|
|
2908
|
-
navClassName:
|
|
2933
|
+
navClassName: M,
|
|
2909
2934
|
cssProps: B,
|
|
2910
2935
|
navProps: a,
|
|
2911
2936
|
content: (r == null ? void 0 : r.content) || o
|
|
@@ -2916,7 +2941,7 @@ const Fr = ({
|
|
|
2916
2941
|
chevron: Ws,
|
|
2917
2942
|
chevronOpen: Us
|
|
2918
2943
|
};
|
|
2919
|
-
function
|
|
2944
|
+
function zr({
|
|
2920
2945
|
isActive: e = !1,
|
|
2921
2946
|
hoverOpacity: r = 0.5,
|
|
2922
2947
|
color: t
|
|
@@ -2941,42 +2966,42 @@ const ga = ({
|
|
|
2941
2966
|
panelWidth: s = "75%",
|
|
2942
2967
|
color: n,
|
|
2943
2968
|
hoverOpacity: a,
|
|
2944
|
-
className:
|
|
2969
|
+
className: i,
|
|
2945
2970
|
style: f,
|
|
2946
2971
|
buttonProps: c
|
|
2947
2972
|
}) => {
|
|
2948
|
-
const [
|
|
2973
|
+
const [d, y] = J(!1), {
|
|
2949
2974
|
style: m,
|
|
2950
2975
|
onMouseEnter: C,
|
|
2951
2976
|
onMouseLeave: b
|
|
2952
|
-
} =
|
|
2953
|
-
return /* @__PURE__ */
|
|
2954
|
-
|
|
2977
|
+
} = zr({ isActive: d, color: n, hoverOpacity: a });
|
|
2978
|
+
return /* @__PURE__ */ _(
|
|
2979
|
+
Vr,
|
|
2955
2980
|
{
|
|
2956
2981
|
variant: t,
|
|
2957
2982
|
side: o,
|
|
2958
2983
|
panelWidth: s,
|
|
2959
|
-
isOpen:
|
|
2984
|
+
isOpen: d,
|
|
2960
2985
|
onOpenChange: y,
|
|
2961
|
-
trigger: ({ onClick:
|
|
2986
|
+
trigger: ({ onClick: p }) => /* @__PURE__ */ D(
|
|
2962
2987
|
"button",
|
|
2963
2988
|
{
|
|
2964
2989
|
type: "button",
|
|
2965
|
-
className: [st.trigger,
|
|
2990
|
+
className: [st.trigger, i].filter(Boolean).join(" "),
|
|
2966
2991
|
style: { ...m, ...f },
|
|
2967
2992
|
"data-navdropdown-trigger": !0,
|
|
2968
|
-
onClick:
|
|
2993
|
+
onClick: p,
|
|
2969
2994
|
onMouseEnter: C,
|
|
2970
2995
|
onMouseLeave: b,
|
|
2971
2996
|
...c,
|
|
2972
2997
|
children: [
|
|
2973
2998
|
e,
|
|
2974
|
-
/* @__PURE__ */
|
|
2999
|
+
/* @__PURE__ */ _(
|
|
2975
3000
|
"span",
|
|
2976
3001
|
{
|
|
2977
|
-
className: [st.chevron,
|
|
3002
|
+
className: [st.chevron, d ? st.chevronOpen : ""].filter(Boolean).join(" "),
|
|
2978
3003
|
"aria-hidden": "true",
|
|
2979
|
-
children: /* @__PURE__ */
|
|
3004
|
+
children: /* @__PURE__ */ _(
|
|
2980
3005
|
"svg",
|
|
2981
3006
|
{
|
|
2982
3007
|
width: "12",
|
|
@@ -2984,7 +3009,7 @@ const ga = ({
|
|
|
2984
3009
|
viewBox: "0 0 12 12",
|
|
2985
3010
|
fill: "none",
|
|
2986
3011
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2987
|
-
children: /* @__PURE__ */
|
|
3012
|
+
children: /* @__PURE__ */ _(
|
|
2988
3013
|
"path",
|
|
2989
3014
|
{
|
|
2990
3015
|
d: "M2 4L6 8L10 4",
|
|
@@ -3005,23 +3030,23 @@ const ga = ({
|
|
|
3005
3030
|
}
|
|
3006
3031
|
);
|
|
3007
3032
|
}, va = ({ isActive: e, hoverOpacity: r, color: t, children: o }) => {
|
|
3008
|
-
const { style: s, onMouseEnter: n, onMouseLeave: a } =
|
|
3033
|
+
const { style: s, onMouseEnter: n, onMouseLeave: a } = zr({
|
|
3009
3034
|
isActive: e,
|
|
3010
3035
|
hoverOpacity: r,
|
|
3011
3036
|
color: t
|
|
3012
3037
|
});
|
|
3013
3038
|
return N.cloneElement(o, {
|
|
3014
3039
|
style: { ...s, ...o.props.style },
|
|
3015
|
-
onMouseEnter: (
|
|
3040
|
+
onMouseEnter: (i) => {
|
|
3016
3041
|
var f, c;
|
|
3017
|
-
n(), (c = (f = o.props).onMouseEnter) == null || c.call(f,
|
|
3042
|
+
n(), (c = (f = o.props).onMouseEnter) == null || c.call(f, i);
|
|
3018
3043
|
},
|
|
3019
|
-
onMouseLeave: (
|
|
3044
|
+
onMouseLeave: (i) => {
|
|
3020
3045
|
var f, c;
|
|
3021
|
-
a(), (c = (f = o.props).onMouseLeave) == null || c.call(f,
|
|
3046
|
+
a(), (c = (f = o.props).onMouseLeave) == null || c.call(f, i);
|
|
3022
3047
|
}
|
|
3023
3048
|
});
|
|
3024
|
-
},
|
|
3049
|
+
}, Er = ({
|
|
3025
3050
|
// Color props
|
|
3026
3051
|
color: e,
|
|
3027
3052
|
backgroundColor: r,
|
|
@@ -3033,7 +3058,7 @@ const ga = ({
|
|
|
3033
3058
|
// Element-specific props
|
|
3034
3059
|
divProps: n
|
|
3035
3060
|
}) => {
|
|
3036
|
-
const a = R(),
|
|
3061
|
+
const a = R(), i = e || a.colors.primary, f = r || a.colors.secondary, c = /* @__PURE__ */ _(
|
|
3037
3062
|
"div",
|
|
3038
3063
|
{
|
|
3039
3064
|
...t ? void 0 : n,
|
|
@@ -3047,21 +3072,21 @@ const ga = ({
|
|
|
3047
3072
|
animation: "spin 1s linear infinite",
|
|
3048
3073
|
...t ? {} : s,
|
|
3049
3074
|
// Apply user style (can override fontSize, etc.)
|
|
3050
|
-
border: `0.1em solid ${
|
|
3075
|
+
border: `0.1em solid ${i}`,
|
|
3051
3076
|
// Color borders always take precedence
|
|
3052
3077
|
borderTop: `0.1em solid ${f}`
|
|
3053
3078
|
}
|
|
3054
3079
|
}
|
|
3055
|
-
),
|
|
3080
|
+
), d = /* @__PURE__ */ D(Fe, { children: [
|
|
3056
3081
|
c,
|
|
3057
|
-
/* @__PURE__ */
|
|
3082
|
+
/* @__PURE__ */ _("style", { children: `
|
|
3058
3083
|
@keyframes spin {
|
|
3059
3084
|
0% { transform: rotate(0deg); }
|
|
3060
3085
|
100% { transform: rotate(360deg); }
|
|
3061
3086
|
}
|
|
3062
3087
|
` })
|
|
3063
3088
|
] });
|
|
3064
|
-
return t ? /* @__PURE__ */
|
|
3089
|
+
return t ? /* @__PURE__ */ _(
|
|
3065
3090
|
"div",
|
|
3066
3091
|
{
|
|
3067
3092
|
...n,
|
|
@@ -3075,16 +3100,16 @@ const ga = ({
|
|
|
3075
3100
|
...s
|
|
3076
3101
|
// Top level style prop overrides
|
|
3077
3102
|
},
|
|
3078
|
-
children:
|
|
3103
|
+
children: d
|
|
3079
3104
|
}
|
|
3080
|
-
) :
|
|
3105
|
+
) : d;
|
|
3081
3106
|
}, ba = ({ children: e, loadingComponent: r }) => {
|
|
3082
3107
|
const [t, o] = J(!1);
|
|
3083
3108
|
return ne(() => {
|
|
3084
3109
|
requestAnimationFrame(() => {
|
|
3085
3110
|
o(!0);
|
|
3086
3111
|
});
|
|
3087
|
-
}, []), t ? /* @__PURE__ */
|
|
3112
|
+
}, []), t ? /* @__PURE__ */ _(Fe, { children: e }) : r || /* @__PURE__ */ _(Er, {});
|
|
3088
3113
|
}, qs = "Modal-module__backdrop___GVUh4", Gs = "Modal-module__modal___aD7aP", Zs = "Modal-module__header___ILG9i", Ks = "Modal-module__title___A5OeE", Qs = "Modal-module__closeButton___3LpSf", Xs = "Modal-module__content___dWO-B", Js = "Modal-module__actions___hY6zi", he = {
|
|
3089
3114
|
backdrop: qs,
|
|
3090
3115
|
modal: Gs,
|
|
@@ -3114,7 +3139,7 @@ const ga = ({
|
|
|
3114
3139
|
e === "column" ? nt.vertical : nt.horizontal,
|
|
3115
3140
|
o
|
|
3116
3141
|
].filter(Boolean).join(" ");
|
|
3117
|
-
return /* @__PURE__ */
|
|
3142
|
+
return /* @__PURE__ */ _("div", { ...n, className: a, style: { gap: r, ...s }, children: t });
|
|
3118
3143
|
}, on = ({
|
|
3119
3144
|
isOpen: e,
|
|
3120
3145
|
onClose: r,
|
|
@@ -3123,17 +3148,17 @@ const ga = ({
|
|
|
3123
3148
|
hideCloseButton: s = !1,
|
|
3124
3149
|
closeOnBackdropClick: n = !0,
|
|
3125
3150
|
closeOnEscape: a = !0,
|
|
3126
|
-
actions:
|
|
3151
|
+
actions: i = [],
|
|
3127
3152
|
resolveModal: f,
|
|
3128
3153
|
width: c = "500px",
|
|
3129
|
-
maxWidth:
|
|
3154
|
+
maxWidth: d = "90vw",
|
|
3130
3155
|
backgroundColor: y,
|
|
3131
3156
|
backdropColor: m = "rgba(0, 0, 0, 0.5)",
|
|
3132
3157
|
className: C,
|
|
3133
3158
|
style: b,
|
|
3134
|
-
divProps:
|
|
3159
|
+
divProps: p
|
|
3135
3160
|
}) => {
|
|
3136
|
-
const k = R(), V = Ve(null), g = Ve(null), { maxWidth: F } = Le(k.breakpoints.md), z =
|
|
3161
|
+
const k = R(), V = Ve(null), g = Ve(null), { maxWidth: F } = Le(k.breakpoints.md), z = de(`(max-width: ${F - 1}px)`);
|
|
3137
3162
|
ne(() => {
|
|
3138
3163
|
if (e)
|
|
3139
3164
|
return g.current = document.activeElement, document.body.style.overflow = "hidden", V.current && V.current.focus(), () => {
|
|
@@ -3141,28 +3166,28 @@ const ga = ({
|
|
|
3141
3166
|
};
|
|
3142
3167
|
}, [e]), ne(() => {
|
|
3143
3168
|
if (!e || !a) return;
|
|
3144
|
-
const
|
|
3169
|
+
const M = (K) => {
|
|
3145
3170
|
K.key === "Escape" && r();
|
|
3146
3171
|
};
|
|
3147
|
-
return document.addEventListener("keydown",
|
|
3172
|
+
return document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
|
|
3148
3173
|
}, [e, a, r]);
|
|
3149
|
-
const E = (
|
|
3150
|
-
|
|
3174
|
+
const E = (M) => {
|
|
3175
|
+
M.target === M.currentTarget && n && r();
|
|
3151
3176
|
};
|
|
3152
3177
|
if (!e) return null;
|
|
3153
3178
|
const B = {
|
|
3154
3179
|
width: c,
|
|
3155
|
-
maxWidth:
|
|
3180
|
+
maxWidth: d,
|
|
3156
3181
|
backgroundColor: y || k.colors.secondary,
|
|
3157
3182
|
borderRadius: k.border.radius,
|
|
3158
3183
|
...b
|
|
3159
|
-
},
|
|
3184
|
+
}, P = {
|
|
3160
3185
|
backgroundColor: m
|
|
3161
|
-
}, U = /* @__PURE__ */
|
|
3186
|
+
}, U = /* @__PURE__ */ _(
|
|
3162
3187
|
"div",
|
|
3163
3188
|
{
|
|
3164
3189
|
className: he.backdrop,
|
|
3165
|
-
style:
|
|
3190
|
+
style: P,
|
|
3166
3191
|
onClick: E,
|
|
3167
3192
|
role: "presentation",
|
|
3168
3193
|
children: /* @__PURE__ */ D(
|
|
@@ -3175,18 +3200,18 @@ const ga = ({
|
|
|
3175
3200
|
"aria-modal": "true",
|
|
3176
3201
|
"aria-labelledby": o ? "modal-title" : void 0,
|
|
3177
3202
|
tabIndex: -1,
|
|
3178
|
-
...
|
|
3203
|
+
...p,
|
|
3179
3204
|
children: [
|
|
3180
3205
|
/* @__PURE__ */ D("div", { className: he.header, children: [
|
|
3181
|
-
o && /* @__PURE__ */
|
|
3182
|
-
!s && /* @__PURE__ */
|
|
3206
|
+
o && /* @__PURE__ */ _("h2", { id: "modal-title", className: he.title, children: o }),
|
|
3207
|
+
!s && /* @__PURE__ */ _(
|
|
3183
3208
|
"button",
|
|
3184
3209
|
{
|
|
3185
3210
|
className: he.closeButton,
|
|
3186
3211
|
onClick: r,
|
|
3187
3212
|
"aria-label": "Close modal",
|
|
3188
3213
|
type: "button",
|
|
3189
|
-
children: /* @__PURE__ */
|
|
3214
|
+
children: /* @__PURE__ */ _(
|
|
3190
3215
|
"svg",
|
|
3191
3216
|
{
|
|
3192
3217
|
width: "100%",
|
|
@@ -3195,7 +3220,7 @@ const ga = ({
|
|
|
3195
3220
|
fill: "none",
|
|
3196
3221
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3197
3222
|
"aria-hidden": "true",
|
|
3198
|
-
children: /* @__PURE__ */
|
|
3223
|
+
children: /* @__PURE__ */ _(
|
|
3199
3224
|
"path",
|
|
3200
3225
|
{
|
|
3201
3226
|
d: "M15 5L5 15M5 5L15 15",
|
|
@@ -3210,17 +3235,17 @@ const ga = ({
|
|
|
3210
3235
|
}
|
|
3211
3236
|
)
|
|
3212
3237
|
] }),
|
|
3213
|
-
/* @__PURE__ */
|
|
3214
|
-
|
|
3238
|
+
/* @__PURE__ */ _("div", { className: he.content, children: t }),
|
|
3239
|
+
i.length > 0 && /* @__PURE__ */ _(rn, { direction: z ? "column" : "row", className: he.actions, children: i.map((M, K) => /* @__PURE__ */ _(
|
|
3215
3240
|
Gr,
|
|
3216
3241
|
{
|
|
3217
|
-
color:
|
|
3218
|
-
outline:
|
|
3219
|
-
disabled:
|
|
3242
|
+
color: M.color,
|
|
3243
|
+
outline: M.variant === "outline",
|
|
3244
|
+
disabled: M.disabled,
|
|
3220
3245
|
onClick: () => {
|
|
3221
|
-
|
|
3246
|
+
M.onClick ? M.onClick(f || r) : f ? f(M.value) : r();
|
|
3222
3247
|
},
|
|
3223
|
-
children:
|
|
3248
|
+
children: M.label
|
|
3224
3249
|
},
|
|
3225
3250
|
K
|
|
3226
3251
|
)) })
|
|
@@ -3229,9 +3254,9 @@ const ga = ({
|
|
|
3229
3254
|
)
|
|
3230
3255
|
}
|
|
3231
3256
|
);
|
|
3232
|
-
return
|
|
3233
|
-
},
|
|
3234
|
-
const [r, t] = J(null), o = N.useCallback((c) => new Promise((
|
|
3257
|
+
return lt(U, document.body);
|
|
3258
|
+
}, Nr = ht(null), Sa = ({ children: e }) => {
|
|
3259
|
+
const [r, t] = J(null), o = N.useCallback((c) => new Promise((d, y) => {
|
|
3235
3260
|
const m = Math.random().toString(36).substr(2, 9);
|
|
3236
3261
|
t({
|
|
3237
3262
|
id: m,
|
|
@@ -3239,11 +3264,11 @@ const ga = ({
|
|
|
3239
3264
|
title: c.title,
|
|
3240
3265
|
actions: c.actions,
|
|
3241
3266
|
options: c.options,
|
|
3242
|
-
resolve:
|
|
3267
|
+
resolve: d,
|
|
3243
3268
|
reject: y
|
|
3244
3269
|
});
|
|
3245
3270
|
}), []), s = N.useCallback((c) => {
|
|
3246
|
-
t((
|
|
3271
|
+
t((d) => (d && d.resolve(c), null));
|
|
3247
3272
|
}, []), n = N.useCallback(
|
|
3248
3273
|
(c) => o({
|
|
3249
3274
|
title: c.title || "Confirm",
|
|
@@ -3252,12 +3277,12 @@ const ga = ({
|
|
|
3252
3277
|
{
|
|
3253
3278
|
label: c.cancelLabel || "Cancel",
|
|
3254
3279
|
variant: "outline",
|
|
3255
|
-
onClick: (
|
|
3280
|
+
onClick: (d) => d(!1)
|
|
3256
3281
|
},
|
|
3257
3282
|
{
|
|
3258
3283
|
label: c.confirmLabel || "Confirm",
|
|
3259
3284
|
color: c.confirmColor,
|
|
3260
|
-
onClick: (
|
|
3285
|
+
onClick: (d) => d(!0)
|
|
3261
3286
|
}
|
|
3262
3287
|
],
|
|
3263
3288
|
options: c.options
|
|
@@ -3271,13 +3296,13 @@ const ga = ({
|
|
|
3271
3296
|
{
|
|
3272
3297
|
label: c.okLabel || "OK",
|
|
3273
3298
|
color: c.okColor,
|
|
3274
|
-
onClick: (
|
|
3299
|
+
onClick: (d) => d()
|
|
3275
3300
|
}
|
|
3276
3301
|
],
|
|
3277
3302
|
options: c.options
|
|
3278
3303
|
}),
|
|
3279
3304
|
[o]
|
|
3280
|
-
),
|
|
3305
|
+
), i = N.useCallback(() => {
|
|
3281
3306
|
s();
|
|
3282
3307
|
}, [s]), f = N.useMemo(
|
|
3283
3308
|
() => ({
|
|
@@ -3288,13 +3313,13 @@ const ga = ({
|
|
|
3288
3313
|
}),
|
|
3289
3314
|
[o, s, n, a]
|
|
3290
3315
|
);
|
|
3291
|
-
return /* @__PURE__ */ D(
|
|
3316
|
+
return /* @__PURE__ */ D(Nr.Provider, { value: f, children: [
|
|
3292
3317
|
e,
|
|
3293
|
-
r && /* @__PURE__ */
|
|
3318
|
+
r && /* @__PURE__ */ _(
|
|
3294
3319
|
on,
|
|
3295
3320
|
{
|
|
3296
3321
|
isOpen: !0,
|
|
3297
|
-
onClose:
|
|
3322
|
+
onClose: i,
|
|
3298
3323
|
title: r.title,
|
|
3299
3324
|
actions: r.actions,
|
|
3300
3325
|
resolveModal: s,
|
|
@@ -3304,11 +3329,11 @@ const ga = ({
|
|
|
3304
3329
|
)
|
|
3305
3330
|
] });
|
|
3306
3331
|
}, wa = () => {
|
|
3307
|
-
const e =
|
|
3332
|
+
const e = or(Nr);
|
|
3308
3333
|
if (!e)
|
|
3309
3334
|
throw new Error("useModal must be used within a ModalProvider");
|
|
3310
3335
|
return e;
|
|
3311
|
-
}, sn = "ResponsiveSection-module__section___gBESK", nn = "ResponsiveSection-module__innerDiv___r1bky",
|
|
3336
|
+
}, sn = "ResponsiveSection-module__section___gBESK", nn = "ResponsiveSection-module__innerDiv___r1bky", er = {
|
|
3312
3337
|
section: sn,
|
|
3313
3338
|
innerDiv: nn
|
|
3314
3339
|
}, an = ({
|
|
@@ -3321,10 +3346,10 @@ const ga = ({
|
|
|
3321
3346
|
width: s,
|
|
3322
3347
|
height: n,
|
|
3323
3348
|
padding: a,
|
|
3324
|
-
paddingSm:
|
|
3349
|
+
paddingSm: i,
|
|
3325
3350
|
margin: f,
|
|
3326
3351
|
gap: c,
|
|
3327
|
-
verticalRhythm:
|
|
3352
|
+
verticalRhythm: d = 3,
|
|
3328
3353
|
// Content
|
|
3329
3354
|
children: y,
|
|
3330
3355
|
// Style overrides
|
|
@@ -3333,25 +3358,25 @@ const ga = ({
|
|
|
3333
3358
|
// Element-specific props
|
|
3334
3359
|
sectionProps: b
|
|
3335
3360
|
}) => {
|
|
3336
|
-
const
|
|
3361
|
+
const p = R(), k = de(`(min-width: ${p.breakpoints.sm})`), V = {
|
|
3337
3362
|
backgroundColor: e,
|
|
3338
|
-
color: r ||
|
|
3363
|
+
color: r || p.fonts.color,
|
|
3339
3364
|
margin: f,
|
|
3340
3365
|
...C
|
|
3341
3366
|
// Top level style prop overrides
|
|
3342
|
-
}, g = `calc(${
|
|
3343
|
-
"--max-width": t ||
|
|
3367
|
+
}, g = `calc(${p.fonts.rhythm} * ${d})`, F = k ? a || p.layout.padding : i || p.layout.paddingSm, z = {
|
|
3368
|
+
"--max-width": t || p.layout.maxWidth,
|
|
3344
3369
|
"--min-width": o,
|
|
3345
3370
|
"--width": s,
|
|
3346
3371
|
"--height": n,
|
|
3347
3372
|
"--section-padding": `${g} ${F}`,
|
|
3348
3373
|
"--gap": c
|
|
3349
|
-
}, E = [
|
|
3350
|
-
return /* @__PURE__ */
|
|
3351
|
-
}, ln = "Hero-module__hero___IB2tg", cn = "Hero-module__content___rkkfQ",
|
|
3374
|
+
}, E = [er.section, m].filter(Boolean).join(" ");
|
|
3375
|
+
return /* @__PURE__ */ _("section", { ...b, className: E, style: V, children: /* @__PURE__ */ _("div", { className: er.innerDiv, style: z, children: y }) });
|
|
3376
|
+
}, ln = "Hero-module__hero___IB2tg", cn = "Hero-module__content___rkkfQ", tr = {
|
|
3352
3377
|
hero: ln,
|
|
3353
3378
|
content: cn
|
|
3354
|
-
},
|
|
3379
|
+
}, dn = ({
|
|
3355
3380
|
isMd: e = !1,
|
|
3356
3381
|
isLg: r = !1,
|
|
3357
3382
|
theme: t
|
|
@@ -3376,19 +3401,19 @@ const ga = ({
|
|
|
3376
3401
|
style: s,
|
|
3377
3402
|
...n
|
|
3378
3403
|
}) => {
|
|
3379
|
-
const a = R(),
|
|
3380
|
-
return /* @__PURE__ */
|
|
3404
|
+
const a = R(), i = [tr.hero, o].filter(Boolean).join(" "), f = (r == null ? void 0 : r.md) || a.breakpoints.md, c = (r == null ? void 0 : r.lg) || a.breakpoints.lg, d = de(`(min-width: ${f})`), y = de(`(min-width: ${c})`), m = dn({ isMd: d, isLg: y, theme: a });
|
|
3405
|
+
return /* @__PURE__ */ _(
|
|
3381
3406
|
an,
|
|
3382
3407
|
{
|
|
3383
|
-
className:
|
|
3408
|
+
className: i,
|
|
3384
3409
|
color: e || a.fonts.color,
|
|
3385
3410
|
style: { ...m, ...s },
|
|
3386
3411
|
...n,
|
|
3387
|
-
children: /* @__PURE__ */
|
|
3412
|
+
children: /* @__PURE__ */ _("div", { className: tr.content, children: t })
|
|
3388
3413
|
}
|
|
3389
3414
|
);
|
|
3390
|
-
},
|
|
3391
|
-
footer:
|
|
3415
|
+
}, un = "Footer-module__footer___A76NF", fn = "Footer-module__container___QneNs", rr = {
|
|
3416
|
+
footer: un,
|
|
3392
3417
|
container: fn
|
|
3393
3418
|
}, mn = ({
|
|
3394
3419
|
isSmallScreen: e = !1,
|
|
@@ -3398,10 +3423,10 @@ const ga = ({
|
|
|
3398
3423
|
height: s,
|
|
3399
3424
|
paddingSm: n,
|
|
3400
3425
|
padding: a,
|
|
3401
|
-
margin:
|
|
3426
|
+
margin: i,
|
|
3402
3427
|
gap: f,
|
|
3403
3428
|
backgroundColor: c,
|
|
3404
|
-
color:
|
|
3429
|
+
color: d
|
|
3405
3430
|
} = {}) => {
|
|
3406
3431
|
const y = R();
|
|
3407
3432
|
return {
|
|
@@ -3410,10 +3435,10 @@ const ga = ({
|
|
|
3410
3435
|
width: o,
|
|
3411
3436
|
height: s,
|
|
3412
3437
|
padding: e ? n || y.layout.paddingSm : a || y.layout.padding,
|
|
3413
|
-
margin:
|
|
3438
|
+
margin: i,
|
|
3414
3439
|
gap: f,
|
|
3415
3440
|
backgroundColor: c,
|
|
3416
|
-
color:
|
|
3441
|
+
color: d || y.fonts.color
|
|
3417
3442
|
};
|
|
3418
3443
|
}, yn = ({
|
|
3419
3444
|
// Color props
|
|
@@ -3425,10 +3450,10 @@ const ga = ({
|
|
|
3425
3450
|
width: s,
|
|
3426
3451
|
height: n,
|
|
3427
3452
|
padding: a,
|
|
3428
|
-
paddingSm:
|
|
3453
|
+
paddingSm: i,
|
|
3429
3454
|
margin: f,
|
|
3430
3455
|
gap: c,
|
|
3431
|
-
breakPoint:
|
|
3456
|
+
breakPoint: d,
|
|
3432
3457
|
// Content
|
|
3433
3458
|
children: y,
|
|
3434
3459
|
// Style overrides
|
|
@@ -3437,20 +3462,20 @@ const ga = ({
|
|
|
3437
3462
|
// Element-specific props
|
|
3438
3463
|
footerProps: b
|
|
3439
3464
|
}) => {
|
|
3440
|
-
const
|
|
3465
|
+
const p = R(), k = d || p.breakpoints.sm, { maxWidth: V, unit: g } = Le(k), F = de(`(max-width: ${V}${g})`), z = mn({
|
|
3441
3466
|
isSmallScreen: F,
|
|
3442
3467
|
maxWidth: t,
|
|
3443
3468
|
minWidth: o,
|
|
3444
3469
|
width: s,
|
|
3445
3470
|
height: n,
|
|
3446
|
-
paddingSm:
|
|
3471
|
+
paddingSm: i,
|
|
3447
3472
|
padding: a,
|
|
3448
3473
|
margin: f,
|
|
3449
3474
|
gap: c,
|
|
3450
3475
|
backgroundColor: e,
|
|
3451
3476
|
color: r
|
|
3452
|
-
}), E = [
|
|
3453
|
-
return /* @__PURE__ */
|
|
3477
|
+
}), E = [rr.container, m].filter(Boolean).join(" ");
|
|
3478
|
+
return /* @__PURE__ */ _("footer", { ...b, className: rr.footer, children: /* @__PURE__ */ _("div", { className: E, style: { ...z, ...C }, children: y }) });
|
|
3454
3479
|
}, hn = "FeatureCard-module__card___XQt66", _n = "FeatureCard-module__icon___dXJ92", pn = "FeatureCard-module__title___KxXyA", gn = "FeatureCard-module__content___68xkw", Ie = {
|
|
3455
3480
|
card: hn,
|
|
3456
3481
|
icon: _n,
|
|
@@ -3481,7 +3506,7 @@ const ga = ({
|
|
|
3481
3506
|
// Element-specific props
|
|
3482
3507
|
divProps: a
|
|
3483
3508
|
}) => {
|
|
3484
|
-
const
|
|
3509
|
+
const i = R(), f = [Ie.card, s].filter(Boolean).join(" "), c = e || i.breakpoints.md, d = de(`(min-width: ${c})`), y = vn({ isMd: d, theme: i });
|
|
3485
3510
|
return /* @__PURE__ */ D(
|
|
3486
3511
|
"div",
|
|
3487
3512
|
{
|
|
@@ -3489,9 +3514,9 @@ const ga = ({
|
|
|
3489
3514
|
className: f,
|
|
3490
3515
|
style: { ...y, ...n },
|
|
3491
3516
|
children: [
|
|
3492
|
-
r && /* @__PURE__ */
|
|
3493
|
-
/* @__PURE__ */
|
|
3494
|
-
/* @__PURE__ */
|
|
3517
|
+
r && /* @__PURE__ */ _("div", { className: Ie.icon, children: r }),
|
|
3518
|
+
/* @__PURE__ */ _("h3", { className: Ie.title, children: t }),
|
|
3519
|
+
/* @__PURE__ */ _("div", { className: Ie.content, children: o })
|
|
3495
3520
|
]
|
|
3496
3521
|
}
|
|
3497
3522
|
);
|
|
@@ -3520,12 +3545,12 @@ const ga = ({
|
|
|
3520
3545
|
className: s,
|
|
3521
3546
|
style: n
|
|
3522
3547
|
}) => {
|
|
3523
|
-
const a = R(),
|
|
3524
|
-
...wn({ columns: e, isMd: c, isLg:
|
|
3548
|
+
const a = R(), i = (r == null ? void 0 : r.md) || a.breakpoints.md, f = (r == null ? void 0 : r.lg) || a.breakpoints.lg, c = de(`(min-width: ${i})`), d = de(`(min-width: ${f})`), m = {
|
|
3549
|
+
...wn({ columns: e, isMd: c, isLg: d }),
|
|
3525
3550
|
gap: t,
|
|
3526
3551
|
...n
|
|
3527
3552
|
};
|
|
3528
|
-
return /* @__PURE__ */
|
|
3553
|
+
return /* @__PURE__ */ _("div", { className: [Sn.grid, s].filter(Boolean).join(" "), style: m, children: o });
|
|
3529
3554
|
}, kn = "MediaCard-module__card___9pZ7C", xn = "MediaCard-module__clickable___Rae9n", Cn = "MediaCard-module__vertical___GWtOA", Fn = "MediaCard-module__imageWrapper___HUiag", Vn = "MediaCard-module__horizontal___qlK4y", zn = "MediaCard-module__content___MlqE4", we = {
|
|
3530
3555
|
card: kn,
|
|
3531
3556
|
clickable: xn,
|
|
@@ -3541,17 +3566,17 @@ const ga = ({
|
|
|
3541
3566
|
children: s,
|
|
3542
3567
|
className: n,
|
|
3543
3568
|
style: a,
|
|
3544
|
-
onClick:
|
|
3569
|
+
onClick: i,
|
|
3545
3570
|
actions: f,
|
|
3546
3571
|
divProps: c
|
|
3547
3572
|
}) => {
|
|
3548
|
-
const
|
|
3573
|
+
const d = R(), y = [
|
|
3549
3574
|
we.card,
|
|
3550
3575
|
e === "row" ? we.horizontal : we.vertical,
|
|
3551
|
-
|
|
3576
|
+
i ? we.clickable : void 0,
|
|
3552
3577
|
n
|
|
3553
3578
|
].filter(Boolean).join(" "), m = {
|
|
3554
|
-
borderRadius:
|
|
3579
|
+
borderRadius: d.border.radius,
|
|
3555
3580
|
...o && { backgroundColor: o },
|
|
3556
3581
|
...t && e === "row" && { "--media-card-image-width": t },
|
|
3557
3582
|
...a
|
|
@@ -3562,15 +3587,15 @@ const ga = ({
|
|
|
3562
3587
|
...c,
|
|
3563
3588
|
className: y,
|
|
3564
3589
|
style: m,
|
|
3565
|
-
onClick:
|
|
3566
|
-
onKeyDown:
|
|
3567
|
-
|
|
3590
|
+
onClick: i,
|
|
3591
|
+
onKeyDown: i ? (b) => {
|
|
3592
|
+
i && (b.key === "Enter" || b.key === " ") && (b.preventDefault(), i());
|
|
3568
3593
|
} : void 0,
|
|
3569
|
-
role:
|
|
3570
|
-
tabIndex:
|
|
3594
|
+
role: i ? "button" : void 0,
|
|
3595
|
+
tabIndex: i ? 0 : void 0,
|
|
3571
3596
|
children: [
|
|
3572
|
-
r && /* @__PURE__ */
|
|
3573
|
-
/* @__PURE__ */
|
|
3597
|
+
r && /* @__PURE__ */ _("div", { className: we.imageWrapper, children: r }),
|
|
3598
|
+
/* @__PURE__ */ _("div", { className: we.content, children: s }),
|
|
3574
3599
|
f
|
|
3575
3600
|
]
|
|
3576
3601
|
}
|
|
@@ -3590,29 +3615,29 @@ const ga = ({
|
|
|
3590
3615
|
// Element-specific props
|
|
3591
3616
|
headerProps: n,
|
|
3592
3617
|
footerProps: a,
|
|
3593
|
-
divProps:
|
|
3618
|
+
divProps: i,
|
|
3594
3619
|
mainProps: f
|
|
3595
3620
|
}) => {
|
|
3596
3621
|
const c = [at.layoutContainer, o].filter(Boolean).join(" ");
|
|
3597
|
-
return /* @__PURE__ */ D("div", { ...
|
|
3622
|
+
return /* @__PURE__ */ D("div", { ...i, className: c, style: s, children: [
|
|
3598
3623
|
/* @__PURE__ */ D("div", { className: at.content, children: [
|
|
3599
|
-
e && /* @__PURE__ */
|
|
3600
|
-
/* @__PURE__ */
|
|
3624
|
+
e && /* @__PURE__ */ _(Ss, { ...n, children: e }),
|
|
3625
|
+
/* @__PURE__ */ _("main", { ...f, className: at.main, children: t })
|
|
3601
3626
|
] }),
|
|
3602
|
-
r && /* @__PURE__ */
|
|
3627
|
+
r && /* @__PURE__ */ _(yn, { ...a, children: r })
|
|
3603
3628
|
] });
|
|
3604
|
-
}, Ln = "FileUpload-module__dropzone___jqua0", An = "FileUpload-module__loading___C7PsH",
|
|
3629
|
+
}, Ln = "FileUpload-module__dropzone___jqua0", An = "FileUpload-module__loading___C7PsH", Mn = "FileUpload-module__dragOver___q1zPo", Pn = "FileUpload-module__hiddenInput___RLLPJ", Bn = "FileUpload-module__content___yCP0l", Dn = "FileUpload-module__contentHidden___0Ewoe", Rn = "FileUpload-module__spinnerOverlay___e3Rle", On = "FileUpload-module__label___lbMkx", In = "FileUpload-module__hint___8dXlk", Tn = "FileUpload-module__errorMessage___8HB3n", ae = {
|
|
3605
3630
|
dropzone: Ln,
|
|
3606
3631
|
loading: An,
|
|
3607
|
-
dragOver:
|
|
3608
|
-
hiddenInput:
|
|
3632
|
+
dragOver: Mn,
|
|
3633
|
+
hiddenInput: Pn,
|
|
3609
3634
|
content: Bn,
|
|
3610
3635
|
contentHidden: Dn,
|
|
3611
3636
|
spinnerOverlay: Rn,
|
|
3612
3637
|
label: On,
|
|
3613
3638
|
hint: In,
|
|
3614
3639
|
errorMessage: Tn
|
|
3615
|
-
}, Hn = ({ color: e }) => /* @__PURE__ */
|
|
3640
|
+
}, Hn = ({ color: e }) => /* @__PURE__ */ _(
|
|
3616
3641
|
"svg",
|
|
3617
3642
|
{
|
|
3618
3643
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3621,7 +3646,7 @@ const ga = ({
|
|
|
3621
3646
|
width: "48",
|
|
3622
3647
|
height: "48",
|
|
3623
3648
|
"aria-hidden": !0,
|
|
3624
|
-
children: /* @__PURE__ */
|
|
3649
|
+
children: /* @__PURE__ */ _("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" })
|
|
3625
3650
|
}
|
|
3626
3651
|
), za = ({
|
|
3627
3652
|
onUpload: e,
|
|
@@ -3631,15 +3656,15 @@ const ga = ({
|
|
|
3631
3656
|
error: s,
|
|
3632
3657
|
label: n = "Click or drag & drop a file here",
|
|
3633
3658
|
className: a,
|
|
3634
|
-
style:
|
|
3659
|
+
style: i,
|
|
3635
3660
|
divProps: f,
|
|
3636
3661
|
inputProps: c
|
|
3637
3662
|
}) => {
|
|
3638
|
-
const
|
|
3663
|
+
const d = R(), y = Ve(null), [m, C] = J(!1), [b, p] = J(null), k = s || b, V = k ? d.colors.error : d.colors.primary, g = k ? d.colors.error : d.colors.primary, F = Ce(
|
|
3639
3664
|
(L) => {
|
|
3640
|
-
if (
|
|
3665
|
+
if (p(null), t && L.size > t) {
|
|
3641
3666
|
const A = (t / 1048576).toFixed(1);
|
|
3642
|
-
|
|
3667
|
+
p(`File exceeds maximum size of ${A} MB`);
|
|
3643
3668
|
return;
|
|
3644
3669
|
}
|
|
3645
3670
|
e(L);
|
|
@@ -3655,9 +3680,9 @@ const ga = ({
|
|
|
3655
3680
|
var O;
|
|
3656
3681
|
const A = (O = L.target.files) == null ? void 0 : O[0];
|
|
3657
3682
|
A && F(A), L.target.value = "";
|
|
3658
|
-
},
|
|
3683
|
+
}, P = (L) => {
|
|
3659
3684
|
L.preventDefault(), o || C(!0);
|
|
3660
|
-
}, U = () => C(!1),
|
|
3685
|
+
}, U = () => C(!1), M = (L) => {
|
|
3661
3686
|
var O;
|
|
3662
3687
|
if (L.preventDefault(), C(!1), o) return;
|
|
3663
3688
|
const A = (O = L.dataTransfer.files) == null ? void 0 : O[0];
|
|
@@ -3670,11 +3695,11 @@ const ga = ({
|
|
|
3670
3695
|
].filter(Boolean).join(" "), q = {
|
|
3671
3696
|
"--upload-color": V,
|
|
3672
3697
|
borderColor: V,
|
|
3673
|
-
borderWidth:
|
|
3674
|
-
borderRadius:
|
|
3675
|
-
fontSize:
|
|
3698
|
+
borderWidth: d.border.width,
|
|
3699
|
+
borderRadius: d.border.radius,
|
|
3700
|
+
fontSize: "1em",
|
|
3676
3701
|
color: g,
|
|
3677
|
-
...
|
|
3702
|
+
...i
|
|
3678
3703
|
};
|
|
3679
3704
|
return /* @__PURE__ */ D(
|
|
3680
3705
|
"div",
|
|
@@ -3684,15 +3709,15 @@ const ga = ({
|
|
|
3684
3709
|
style: q,
|
|
3685
3710
|
onClick: z,
|
|
3686
3711
|
onKeyDown: E,
|
|
3687
|
-
onDragOver:
|
|
3712
|
+
onDragOver: P,
|
|
3688
3713
|
onDragLeave: U,
|
|
3689
|
-
onDrop:
|
|
3714
|
+
onDrop: M,
|
|
3690
3715
|
role: "button",
|
|
3691
3716
|
tabIndex: o ? -1 : 0,
|
|
3692
3717
|
"aria-disabled": o,
|
|
3693
3718
|
"aria-label": n,
|
|
3694
3719
|
children: [
|
|
3695
|
-
/* @__PURE__ */
|
|
3720
|
+
/* @__PURE__ */ _(
|
|
3696
3721
|
"input",
|
|
3697
3722
|
{
|
|
3698
3723
|
...c,
|
|
@@ -3706,8 +3731,8 @@ const ga = ({
|
|
|
3706
3731
|
"aria-hidden": !0
|
|
3707
3732
|
}
|
|
3708
3733
|
),
|
|
3709
|
-
o && /* @__PURE__ */
|
|
3710
|
-
|
|
3734
|
+
o && /* @__PURE__ */ _(
|
|
3735
|
+
Er,
|
|
3711
3736
|
{
|
|
3712
3737
|
fullScreen: !1,
|
|
3713
3738
|
className: ae.spinnerOverlay,
|
|
@@ -3720,8 +3745,8 @@ const ga = ({
|
|
|
3720
3745
|
className: [ae.content, o && ae.contentHidden].filter(Boolean).join(" "),
|
|
3721
3746
|
"aria-hidden": o || void 0,
|
|
3722
3747
|
children: [
|
|
3723
|
-
/* @__PURE__ */
|
|
3724
|
-
/* @__PURE__ */
|
|
3748
|
+
/* @__PURE__ */ _(Hn, { color: V }),
|
|
3749
|
+
/* @__PURE__ */ _("span", { className: ae.label, children: n }),
|
|
3725
3750
|
r && /* @__PURE__ */ D("span", { className: ae.hint, children: [
|
|
3726
3751
|
"Accepted: ",
|
|
3727
3752
|
r
|
|
@@ -3731,22 +3756,22 @@ const ga = ({
|
|
|
3731
3756
|
(t / (1024 * 1024)).toFixed(1),
|
|
3732
3757
|
" MB"
|
|
3733
3758
|
] }),
|
|
3734
|
-
k && /* @__PURE__ */
|
|
3759
|
+
k && /* @__PURE__ */ _("span", { className: ae.errorMessage, role: "alert", children: k })
|
|
3735
3760
|
]
|
|
3736
3761
|
}
|
|
3737
3762
|
)
|
|
3738
3763
|
]
|
|
3739
3764
|
}
|
|
3740
3765
|
);
|
|
3741
|
-
}, jn = "Image-module__container___sVJdZ", Wn = "Image-module__img___pKhPw", Un = "Image-module__fallback___wysuM",
|
|
3766
|
+
}, jn = "Image-module__container___sVJdZ", Wn = "Image-module__img___pKhPw", Un = "Image-module__fallback___wysuM", it = {
|
|
3742
3767
|
container: jn,
|
|
3743
3768
|
img: Wn,
|
|
3744
3769
|
fallback: Un
|
|
3745
3770
|
}, qn = "Skeleton-module__skeleton___CB4uF", Gn = {
|
|
3746
3771
|
skeleton: qn
|
|
3747
|
-
},
|
|
3772
|
+
}, $r = ({ className: e, style: r, divProps: t }) => {
|
|
3748
3773
|
const o = R(), s = [Gn.skeleton, e].filter(Boolean).join(" ");
|
|
3749
|
-
return /* @__PURE__ */
|
|
3774
|
+
return /* @__PURE__ */ _(
|
|
3750
3775
|
"div",
|
|
3751
3776
|
{
|
|
3752
3777
|
...t,
|
|
@@ -3764,37 +3789,37 @@ const ga = ({
|
|
|
3764
3789
|
skeletonDelay: s = 150,
|
|
3765
3790
|
fallback: n,
|
|
3766
3791
|
className: a,
|
|
3767
|
-
style:
|
|
3792
|
+
style: i,
|
|
3768
3793
|
imgProps: f
|
|
3769
3794
|
}) => {
|
|
3770
|
-
const c = R(), [
|
|
3795
|
+
const c = R(), [d, y] = J(null), [m, C] = J(null), [b, p] = J(null), k = d === e, V = m === e, g = b === e;
|
|
3771
3796
|
ne(() => {
|
|
3772
3797
|
if (!e) return;
|
|
3773
|
-
const U = setTimeout(() =>
|
|
3798
|
+
const U = setTimeout(() => p(e), s);
|
|
3774
3799
|
return () => clearTimeout(U);
|
|
3775
3800
|
}, [e, s]);
|
|
3776
|
-
const F = o || !!e && !k && !V && g, z = !o && (!e || V), E = !o && !!e && !V, B = [
|
|
3801
|
+
const F = o || !!e && !k && !V && g, z = !o && (!e || V), E = !o && !!e && !V, B = [it.container, a].filter(Boolean).join(" "), P = {
|
|
3777
3802
|
aspectRatio: t,
|
|
3778
3803
|
borderRadius: c.border.radius,
|
|
3779
|
-
...
|
|
3804
|
+
...i
|
|
3780
3805
|
};
|
|
3781
3806
|
return /* @__PURE__ */ D(
|
|
3782
3807
|
"div",
|
|
3783
3808
|
{
|
|
3784
3809
|
className: B,
|
|
3785
|
-
style:
|
|
3810
|
+
style: P,
|
|
3786
3811
|
"aria-label": z ? r || "Image placeholder" : void 0,
|
|
3787
3812
|
"aria-busy": F || void 0,
|
|
3788
3813
|
children: [
|
|
3789
|
-
F && /* @__PURE__ */
|
|
3790
|
-
z && /* @__PURE__ */
|
|
3791
|
-
E && /* @__PURE__ */
|
|
3814
|
+
F && /* @__PURE__ */ _($r, { style: { borderRadius: "inherit", position: "absolute", inset: 0 } }),
|
|
3815
|
+
z && /* @__PURE__ */ _("div", { className: it.fallback, children: n ?? null }),
|
|
3816
|
+
E && /* @__PURE__ */ _(
|
|
3792
3817
|
"img",
|
|
3793
3818
|
{
|
|
3794
3819
|
...f,
|
|
3795
3820
|
src: e,
|
|
3796
3821
|
alt: r,
|
|
3797
|
-
className:
|
|
3822
|
+
className: it.img,
|
|
3798
3823
|
style: { opacity: k ? 1 : 0 },
|
|
3799
3824
|
onLoad: () => e && y(e),
|
|
3800
3825
|
onError: () => e && C(e)
|
|
@@ -3828,9 +3853,9 @@ const ga = ({
|
|
|
3828
3853
|
height: "40%",
|
|
3829
3854
|
"aria-hidden": !0,
|
|
3830
3855
|
children: [
|
|
3831
|
-
/* @__PURE__ */
|
|
3832
|
-
/* @__PURE__ */
|
|
3833
|
-
/* @__PURE__ */
|
|
3856
|
+
/* @__PURE__ */ _("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
3857
|
+
/* @__PURE__ */ _("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
|
|
3858
|
+
/* @__PURE__ */ _("polyline", { points: "21 15 16 10 5 21" })
|
|
3834
3859
|
]
|
|
3835
3860
|
}
|
|
3836
3861
|
), Na = ({
|
|
@@ -3841,18 +3866,18 @@ const ga = ({
|
|
|
3841
3866
|
skeletonDelay: s = 500,
|
|
3842
3867
|
onRemove: n,
|
|
3843
3868
|
removeLabel: a = "Remove",
|
|
3844
|
-
fallback:
|
|
3869
|
+
fallback: i,
|
|
3845
3870
|
className: f,
|
|
3846
3871
|
style: c,
|
|
3847
|
-
imgProps:
|
|
3872
|
+
imgProps: d
|
|
3848
3873
|
}) => {
|
|
3849
|
-
const y = R(), [m, C] = J(null), [b,
|
|
3874
|
+
const y = R(), [m, C] = J(null), [b, p] = J(null), [k, V] = J(null), g = m === e, F = b === e, z = k === e;
|
|
3850
3875
|
ne(() => {
|
|
3851
3876
|
if (!e) return;
|
|
3852
3877
|
const q = setTimeout(() => V(e), s);
|
|
3853
3878
|
return () => clearTimeout(q);
|
|
3854
3879
|
}, [e, s]);
|
|
3855
|
-
const E = o || !!e && !g && !F && z, B = !o && (!e || F),
|
|
3880
|
+
const E = o || !!e && !g && !F && z, B = !o && (!e || F), P = !o && !!e && !F, U = [pe.thumbnail, ta[t], f].filter(Boolean).join(" "), M = {
|
|
3856
3881
|
borderRadius: y.border.radius,
|
|
3857
3882
|
...c
|
|
3858
3883
|
}, K = {
|
|
@@ -3864,25 +3889,25 @@ const ga = ({
|
|
|
3864
3889
|
"div",
|
|
3865
3890
|
{
|
|
3866
3891
|
className: U,
|
|
3867
|
-
style:
|
|
3892
|
+
style: M,
|
|
3868
3893
|
"aria-label": B ? r || "Image placeholder" : void 0,
|
|
3869
3894
|
"aria-busy": E || void 0,
|
|
3870
3895
|
children: [
|
|
3871
|
-
E && /* @__PURE__ */
|
|
3872
|
-
B && (
|
|
3873
|
-
|
|
3896
|
+
E && /* @__PURE__ */ _($r, { style: { borderRadius: "inherit", position: "absolute", inset: 0 } }),
|
|
3897
|
+
B && (i ?? /* @__PURE__ */ _(ra, { color: y.colors.primary })),
|
|
3898
|
+
P && /* @__PURE__ */ _(
|
|
3874
3899
|
"img",
|
|
3875
3900
|
{
|
|
3876
|
-
...
|
|
3901
|
+
...d,
|
|
3877
3902
|
src: e,
|
|
3878
3903
|
alt: r,
|
|
3879
3904
|
className: pe.img,
|
|
3880
3905
|
style: { opacity: g ? 1 : 0 },
|
|
3881
3906
|
onLoad: () => e && C(e),
|
|
3882
|
-
onError: () => e &&
|
|
3907
|
+
onError: () => e && p(e)
|
|
3883
3908
|
}
|
|
3884
3909
|
),
|
|
3885
|
-
n && /* @__PURE__ */
|
|
3910
|
+
n && /* @__PURE__ */ _(
|
|
3886
3911
|
"button",
|
|
3887
3912
|
{
|
|
3888
3913
|
type: "button",
|
|
@@ -3903,8 +3928,8 @@ const ga = ({
|
|
|
3903
3928
|
strokeWidth: y.fonts.fontWeightHeader >= 700 ? 2 : 1.5,
|
|
3904
3929
|
"aria-hidden": !0,
|
|
3905
3930
|
children: [
|
|
3906
|
-
/* @__PURE__ */
|
|
3907
|
-
/* @__PURE__ */
|
|
3931
|
+
/* @__PURE__ */ _("line", { x1: "2", y1: "2", x2: "8", y2: "8" }),
|
|
3932
|
+
/* @__PURE__ */ _("line", { x1: "8", y1: "2", x2: "2", y2: "8" })
|
|
3908
3933
|
]
|
|
3909
3934
|
}
|
|
3910
3935
|
)
|
|
@@ -3916,8 +3941,8 @@ const ga = ({
|
|
|
3916
3941
|
};
|
|
3917
3942
|
export {
|
|
3918
3943
|
Gr as Button,
|
|
3919
|
-
|
|
3920
|
-
|
|
3944
|
+
la as CSSReset,
|
|
3945
|
+
dt as Checkbox,
|
|
3921
3946
|
xa as FeatureCard,
|
|
3922
3947
|
Ca as FeatureGrid,
|
|
3923
3948
|
za as FileUpload,
|
|
@@ -3928,40 +3953,40 @@ export {
|
|
|
3928
3953
|
To as FormError,
|
|
3929
3954
|
ge as FormField,
|
|
3930
3955
|
Go as FormGroup,
|
|
3931
|
-
|
|
3956
|
+
da as FormInput,
|
|
3932
3957
|
_t as FormLabel,
|
|
3933
3958
|
ya as FormRadio,
|
|
3934
3959
|
ha as FormRadioGroup,
|
|
3935
3960
|
fa as FormSelect,
|
|
3936
|
-
|
|
3961
|
+
ua as FormTextarea,
|
|
3937
3962
|
ps as Hamburger,
|
|
3938
3963
|
Ss as Header,
|
|
3939
3964
|
ka as Hero,
|
|
3940
3965
|
Ea as Image,
|
|
3941
3966
|
Na as ImageThumbnail,
|
|
3942
3967
|
Jo as Input,
|
|
3943
|
-
|
|
3968
|
+
Er as LoadingSpinner,
|
|
3944
3969
|
Fa as MediaCard,
|
|
3945
3970
|
on as Modal,
|
|
3946
3971
|
Sa as ModalProvider,
|
|
3947
3972
|
ga as NavDropdown,
|
|
3948
3973
|
va as NavLink,
|
|
3949
3974
|
Va as PageLayout,
|
|
3950
|
-
|
|
3951
|
-
|
|
3975
|
+
Vr as Popover,
|
|
3976
|
+
Fr as Radio,
|
|
3952
3977
|
pa as ResponsiveNav,
|
|
3953
3978
|
Is as ResponsiveNavContext,
|
|
3954
3979
|
an as ResponsiveSection,
|
|
3955
|
-
|
|
3956
|
-
|
|
3980
|
+
ls as Select,
|
|
3981
|
+
$r as Skeleton,
|
|
3957
3982
|
rn as Stack,
|
|
3958
3983
|
ba as StyleLoader,
|
|
3959
3984
|
os as Textarea,
|
|
3960
|
-
|
|
3985
|
+
ia as ThemeProvider,
|
|
3961
3986
|
Le as parseBreakpoint,
|
|
3962
3987
|
Do as useFormContext,
|
|
3963
|
-
|
|
3988
|
+
de as useMediaQuery,
|
|
3964
3989
|
wa as useModal,
|
|
3965
|
-
|
|
3990
|
+
zr as useNavLinkStyles,
|
|
3966
3991
|
R as useTheme
|
|
3967
3992
|
};
|