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