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