digital-rabbit-cl 1.1.2 → 1.2.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/Stack/Stack.d.ts +24 -0
- package/dist/components/Stack/Stack.d.ts.map +1 -0
- package/dist/components/Stack/index.d.ts +3 -0
- package/dist/components/Stack/index.d.ts.map +1 -0
- package/dist/digital-rabbit-cl.es.js +639 -622
- package/dist/digital-rabbit-cl.umd.js +5 -5
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.Button-module__button___2ZuB7{border-width:.15em;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:.1em .5em}.Button-module__sizeDefault___iwWOV{padding:.25em .5em}.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:.35em;-webkit-user-select:none;user-select:none}: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}.FormLabel-module__label___0M-fo{display:inline-block;font-weight:700;padding-bottom:.25em}.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}.FormError-module__formError___kaUBn{font-size:.875em;margin-top:.25rem;font-weight:400}.FormGroup-module__formGroup___aVI-B{display:flex;flex-direction:column;margin-bottom:.5em}.FormGroup-module__inputWrapper___429QE{display:flex;flex-direction:column;gap:.5em}.FormGroup-module__formGroup___aVI-B.FormGroup-
|
|
2
|
-
import { jsx as
|
|
3
|
-
import V, { createContext as
|
|
4
|
-
const
|
|
5
|
-
button:
|
|
6
|
-
sizeSmall:
|
|
7
|
-
sizeDefault:
|
|
8
|
-
},
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.Button-module__button___2ZuB7{border-width:.15em;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:.1em .5em}.Button-module__sizeDefault___iwWOV{padding:.25em .5em}.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:.35em;-webkit-user-select:none;user-select:none}: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}.FormLabel-module__label___0M-fo{display:inline-block;font-weight:700;padding-bottom:.25em}.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}.FormError-module__formError___kaUBn{font-size:.875em;margin-top:.25rem;font-weight:400}.FormGroup-module__formGroup___aVI-B{display:flex;flex-direction:column;margin-bottom:.5em}.FormGroup-module__inputWrapper___429QE{display:flex;flex-direction:column;gap:.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-width:.15em;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:.1em .25em}.Input-module__sizeDefault___AxPA0{padding:.25em .5em}.Textarea-module__textarea___Z-y6g{background-color:transparent;border-width:.15em;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:disabled{opacity:.3}.Textarea-module__sizeSmall___HHFEM{padding:.1em .25em}.Textarea-module__sizeDefault___LL2Uc{padding:.25em .5em}.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-width:.15em;border-style:solid;border-radius:0;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:.1em 1.75em .1em .25em}.Select-module__sizeDefault___EiWvW{padding:.25em 2em .25em .5em}.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:.35em;-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:fixed;right:1em;width:2em;z-index:11}.Hamburger-module__line___gybZM{background:currentColor;border-radius:var(--hamburger-border-radius, 10px);height:.25em;position:relative;transform-origin:1px;transition:all .3s linear;width:2em}.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)}.ResponsiveNav-module__nav___xOfv5{display:flex}.ResponsiveNav-module__nav___xOfv5>*,.ResponsiveNav-module__nav___xOfv5>a{color:inherit;font-weight:700;text-decoration:none}.ResponsiveNav-module__navMobile___h795P{background:var(--mobile-nav-background, #0066cc);color:var(--mobile-nav-color, #000);flex-direction:column;font-size:2rem;height:100vh;padding-top:4.25rem;position:fixed;top:0;right:0;text-align:left;text-transform:uppercase;transition:transform .3s ease-in-out;width:100%;z-index:10;transform:translate(100%)}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__open___WDCAf{transform:translate(0)}.ResponsiveNav-module__navMobile___h795P>a{padding:.5rem 3rem;text-align:center;width:100%}.ResponsiveNav-module__navMobile___h795P>a.active,.ResponsiveNav-module__navMobile___h795P>a:hover{background:var(--mobile-nav-active-background, #000);color:var(--mobile-nav-active-color, #0066cc)}.ResponsiveNav-module__navMobile___h795P>button{align-self:center;margin:.75rem 2rem}.ResponsiveNav-module__navMobile___h795P>button:hover{color:var(--mobile-nav-button-hover-text-color, #4381c1)!important}.ResponsiveNav-module__navDesktop___9wscZ{align-items:center;flex-direction:row;height:auto}.ResponsiveNav-module__navDesktop___9wscZ>*{margin-left:1.25rem}.ResponsiveNav-module__navDesktop___9wscZ>a.active,.ResponsiveNav-module__navDesktop___9wscZ>a:hover{opacity:.5}.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}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
+
import { jsx as w, jsxs as ne, Fragment as Ke } from "react/jsx-runtime";
|
|
3
|
+
import V, { createContext as hr, useContext as _r, useState as Je, useLayoutEffect as gr, useMemo as Tt, useSyncExternalStore as pr, useRef as _t, useEffect as je } from "react";
|
|
4
|
+
const vr = "Button-module__button___2ZuB7", br = "Button-module__sizeSmall___DRT8P", Sr = "Button-module__sizeDefault___iwWOV", Ve = {
|
|
5
|
+
button: vr,
|
|
6
|
+
sizeSmall: br,
|
|
7
|
+
sizeDefault: Sr
|
|
8
|
+
}, xr = ({
|
|
9
9
|
isActive: e,
|
|
10
10
|
disabled: r,
|
|
11
11
|
buttonColor: t = "#FFF",
|
|
@@ -30,7 +30,7 @@ const pr = "Button-module__button___2ZuB7", vr = "Button-module__sizeSmall___DRT
|
|
|
30
30
|
error: "#F00",
|
|
31
31
|
success: "#008000",
|
|
32
32
|
warning: "#FFEB3B"
|
|
33
|
-
},
|
|
33
|
+
}, ce = {
|
|
34
34
|
colors: gt,
|
|
35
35
|
fonts: {
|
|
36
36
|
color: "#000",
|
|
@@ -64,38 +64,38 @@ const pr = "Button-module__button___2ZuB7", vr = "Button-module__sizeSmall___DRT
|
|
|
64
64
|
wrapperPaddingSm: "0.5rem",
|
|
65
65
|
wrapperPadding: "1rem"
|
|
66
66
|
}
|
|
67
|
-
},
|
|
67
|
+
}, Lt = hr(ce), co = ({ theme: e = {}, children: r }) => {
|
|
68
68
|
var s;
|
|
69
69
|
const t = {
|
|
70
|
-
...
|
|
70
|
+
...ce,
|
|
71
71
|
...e,
|
|
72
72
|
colors: {
|
|
73
|
-
...
|
|
73
|
+
...ce.colors,
|
|
74
74
|
...e.colors
|
|
75
75
|
},
|
|
76
76
|
fonts: {
|
|
77
|
-
...
|
|
77
|
+
...ce.fonts,
|
|
78
78
|
...e.fonts
|
|
79
79
|
},
|
|
80
80
|
buttons: {
|
|
81
|
-
...
|
|
81
|
+
...ce.buttons,
|
|
82
82
|
...e.buttons,
|
|
83
83
|
primary: {
|
|
84
|
-
...
|
|
84
|
+
...ce.buttons.primary,
|
|
85
85
|
...(s = e.buttons) == null ? void 0 : s.primary
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
breakpoints: {
|
|
89
|
-
...
|
|
89
|
+
...ce.breakpoints,
|
|
90
90
|
...e.breakpoints
|
|
91
91
|
},
|
|
92
92
|
layout: {
|
|
93
|
-
...
|
|
93
|
+
...ce.layout,
|
|
94
94
|
...e.layout
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
return /* @__PURE__ */
|
|
98
|
-
}, q = () =>
|
|
97
|
+
return /* @__PURE__ */ w(Lt.Provider, { value: t, children: r });
|
|
98
|
+
}, q = () => _r(Lt), uo = ({
|
|
99
99
|
color: e,
|
|
100
100
|
hoverColor: r,
|
|
101
101
|
hoverTextColor: t,
|
|
@@ -107,13 +107,13 @@ const pr = "Button-module__button___2ZuB7", vr = "Button-module__sizeSmall___DRT
|
|
|
107
107
|
children: d,
|
|
108
108
|
disabled: h = !1,
|
|
109
109
|
onClick: f,
|
|
110
|
-
fontSize:
|
|
110
|
+
fontSize: _
|
|
111
111
|
}) => {
|
|
112
|
-
const y = q(), [x,
|
|
112
|
+
const y = q(), [x, z] = Je(!1);
|
|
113
113
|
let F;
|
|
114
114
|
s ? F = s : F = e ? y.buttons.textColor : y.buttons.primary.textColor;
|
|
115
115
|
const P = {
|
|
116
|
-
...
|
|
116
|
+
...xr({
|
|
117
117
|
isActive: x,
|
|
118
118
|
disabled: h,
|
|
119
119
|
buttonColor: e || y.colors.primary,
|
|
@@ -122,20 +122,20 @@ const pr = "Button-module__button___2ZuB7", vr = "Button-module__sizeSmall___DRT
|
|
|
122
122
|
hoverTextColor: t,
|
|
123
123
|
outline: n
|
|
124
124
|
}),
|
|
125
|
-
fontSize:
|
|
125
|
+
fontSize: _ || y.fonts.size
|
|
126
126
|
}, b = [
|
|
127
127
|
Ve.button,
|
|
128
128
|
o === "small" ? Ve.sizeSmall : Ve.sizeDefault,
|
|
129
129
|
n ? Ve.outline : ""
|
|
130
130
|
].filter(Boolean).join(" ");
|
|
131
|
-
return /* @__PURE__ */
|
|
131
|
+
return /* @__PURE__ */ w(
|
|
132
132
|
"button",
|
|
133
133
|
{
|
|
134
134
|
className: b,
|
|
135
135
|
disabled: h,
|
|
136
136
|
onClick: f,
|
|
137
|
-
onMouseEnter: () =>
|
|
138
|
-
onMouseLeave: () =>
|
|
137
|
+
onMouseEnter: () => z(!0),
|
|
138
|
+
onMouseLeave: () => z(!1),
|
|
139
139
|
type: a,
|
|
140
140
|
...l,
|
|
141
141
|
style: {
|
|
@@ -146,33 +146,33 @@ const pr = "Button-module__button___2ZuB7", vr = "Button-module__sizeSmall___DRT
|
|
|
146
146
|
}
|
|
147
147
|
);
|
|
148
148
|
};
|
|
149
|
-
var
|
|
150
|
-
function
|
|
151
|
-
if (!
|
|
149
|
+
var pt = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), Fr = new Uint8Array(16);
|
|
150
|
+
function Vr() {
|
|
151
|
+
if (!pt)
|
|
152
152
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
153
|
-
return
|
|
153
|
+
return pt(Fr);
|
|
154
154
|
}
|
|
155
|
-
var
|
|
156
|
-
for (var
|
|
157
|
-
|
|
158
|
-
function
|
|
159
|
-
var t = 0, s =
|
|
155
|
+
var It = [];
|
|
156
|
+
for (var ke = 0; ke < 256; ++ke)
|
|
157
|
+
It[ke] = (ke + 256).toString(16).substr(1);
|
|
158
|
+
function kr(e, r) {
|
|
159
|
+
var t = 0, s = It;
|
|
160
160
|
return [s[e[t++]], s[e[t++]], s[e[t++]], s[e[t++]], "-", s[e[t++]], s[e[t++]], "-", s[e[t++]], s[e[t++]], "-", s[e[t++]], s[e[t++]], "-", s[e[t++]], s[e[t++]], s[e[t++]], s[e[t++]], s[e[t++]], s[e[t++]]].join("");
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Bt(e, r, t) {
|
|
163
163
|
var s = r && t || 0;
|
|
164
164
|
typeof e == "string" && (r = e === "binary" ? new Array(16) : null, e = null), e = e || {};
|
|
165
|
-
var n = e.random || (e.rng ||
|
|
165
|
+
var n = e.random || (e.rng || Vr)();
|
|
166
166
|
if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, r)
|
|
167
167
|
for (var o = 0; o < 16; ++o)
|
|
168
168
|
r[s + o] = n[o];
|
|
169
|
-
return r ||
|
|
169
|
+
return r || kr(n);
|
|
170
170
|
}
|
|
171
|
-
const wr = "Checkbox-module__container___aV9qz",
|
|
171
|
+
const wr = "Checkbox-module__container___aV9qz", Cr = "Checkbox-module__svg___kkluC", Er = "Checkbox-module__label___cwRtI", Te = {
|
|
172
172
|
container: wr,
|
|
173
|
-
svg:
|
|
174
|
-
label:
|
|
175
|
-
},
|
|
173
|
+
svg: Cr,
|
|
174
|
+
label: Er
|
|
175
|
+
}, zr = ({
|
|
176
176
|
color: e = "#000",
|
|
177
177
|
checkmarkColor: r,
|
|
178
178
|
disabled: t = !1,
|
|
@@ -197,23 +197,23 @@ const wr = "Checkbox-module__container___aV9qz", kr = "Checkbox-module__svg___kk
|
|
|
197
197
|
label: d,
|
|
198
198
|
labelStyle: h,
|
|
199
199
|
name: f,
|
|
200
|
-
onChange:
|
|
200
|
+
onChange: _,
|
|
201
201
|
style: y,
|
|
202
202
|
...x
|
|
203
203
|
}) => {
|
|
204
|
-
const
|
|
204
|
+
const z = q(), F = a || Bt(), C = z.colors.error, P = n ? C : t || z.colors.primary, b = zr({
|
|
205
205
|
color: P,
|
|
206
206
|
checkmarkColor: r,
|
|
207
207
|
disabled: s,
|
|
208
208
|
inverted: l
|
|
209
|
-
}),
|
|
210
|
-
s ||
|
|
209
|
+
}), A = (B) => {
|
|
210
|
+
s || _(B);
|
|
211
211
|
}, E = {
|
|
212
212
|
cursor: b.cursor,
|
|
213
|
-
fontSize: o ||
|
|
213
|
+
fontSize: o || z.fonts.size,
|
|
214
214
|
opacity: b.opacity,
|
|
215
215
|
...y
|
|
216
|
-
},
|
|
216
|
+
}, k = {
|
|
217
217
|
width: o || "1rem"
|
|
218
218
|
}, I = {
|
|
219
219
|
color: b.boxColor,
|
|
@@ -222,13 +222,13 @@ const wr = "Checkbox-module__container___aV9qz", kr = "Checkbox-module__svg___kk
|
|
|
222
222
|
...h
|
|
223
223
|
};
|
|
224
224
|
return /* @__PURE__ */ ne("div", { className: Te.container, style: E, ...x, children: [
|
|
225
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ w(
|
|
226
226
|
"input",
|
|
227
227
|
{
|
|
228
228
|
id: F,
|
|
229
229
|
checked: e,
|
|
230
230
|
disabled: s,
|
|
231
|
-
onChange: (B) =>
|
|
231
|
+
onChange: (B) => A({ target: { checked: B.target.checked, name: f, type: "checkbox" } }),
|
|
232
232
|
name: f,
|
|
233
233
|
style: { display: "none" },
|
|
234
234
|
type: "checkbox"
|
|
@@ -239,11 +239,11 @@ const wr = "Checkbox-module__container___aV9qz", kr = "Checkbox-module__svg___kk
|
|
|
239
239
|
{
|
|
240
240
|
xmlns: "http://www.w3.org/2000/svg",
|
|
241
241
|
viewBox: "0 0 100 100",
|
|
242
|
-
onClick: () =>
|
|
243
|
-
style:
|
|
242
|
+
onClick: () => A({ target: { checked: !e, name: f, type: "checkbox" } }),
|
|
243
|
+
style: k,
|
|
244
244
|
className: Te.svg,
|
|
245
245
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ w(
|
|
247
247
|
"rect",
|
|
248
248
|
{
|
|
249
249
|
x: "0",
|
|
@@ -257,7 +257,7 @@ const wr = "Checkbox-module__container___aV9qz", kr = "Checkbox-module__svg___kk
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
),
|
|
260
|
-
e && /* @__PURE__ */
|
|
260
|
+
e && /* @__PURE__ */ w(
|
|
261
261
|
"path",
|
|
262
262
|
{
|
|
263
263
|
d: "M 25 45 L 45 65 L 75 30",
|
|
@@ -269,28 +269,28 @@ const wr = "Checkbox-module__container___aV9qz", kr = "Checkbox-module__svg___kk
|
|
|
269
269
|
]
|
|
270
270
|
}
|
|
271
271
|
),
|
|
272
|
-
d && /* @__PURE__ */
|
|
272
|
+
d && /* @__PURE__ */ w("label", { htmlFor: F, className: Te.label, style: I, children: d })
|
|
273
273
|
] });
|
|
274
|
-
},
|
|
274
|
+
}, fo = () => {
|
|
275
275
|
const e = q();
|
|
276
276
|
return gr(() => {
|
|
277
277
|
const r = document.documentElement;
|
|
278
278
|
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.wrapperPaddingSm && r.style.setProperty("--layout-wrapper-padding-sm", e.layout.wrapperPaddingSm), e.layout.wrapperPadding && r.style.setProperty("--layout-wrapper-padding", e.layout.wrapperPadding));
|
|
279
279
|
}, [e]), null;
|
|
280
280
|
};
|
|
281
|
-
var be = (e) => e.type === "checkbox",
|
|
282
|
-
const
|
|
283
|
-
var U = (e) => !Q(e) && !Array.isArray(e) &&
|
|
281
|
+
var be = (e) => e.type === "checkbox", ue = (e) => e instanceof Date, Q = (e) => e == null;
|
|
282
|
+
const $t = (e) => typeof e == "object";
|
|
283
|
+
var U = (e) => !Q(e) && !Array.isArray(e) && $t(e) && !ue(e), Ut = (e) => U(e) && e.target ? be(e.target) ? e.target.checked : e.target.value : e, Dr = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Ht = (e, r) => e.has(Dr(r)), Pr = (e) => {
|
|
284
284
|
const r = e.constructor && e.constructor.prototype;
|
|
285
285
|
return U(r) && r.hasOwnProperty("isPrototypeOf");
|
|
286
|
-
},
|
|
286
|
+
}, Ye = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
287
287
|
function H(e) {
|
|
288
288
|
let r;
|
|
289
289
|
const t = Array.isArray(e), s = typeof FileList < "u" ? e instanceof FileList : !1;
|
|
290
290
|
if (e instanceof Date)
|
|
291
291
|
r = new Date(e);
|
|
292
|
-
else if (!(
|
|
293
|
-
if (r = t ? [] : Object.create(Object.getPrototypeOf(e)), !t && !
|
|
292
|
+
else if (!(Ye && (e instanceof Blob || s)) && (t || U(e)))
|
|
293
|
+
if (r = t ? [] : Object.create(Object.getPrototypeOf(e)), !t && !Pr(e))
|
|
294
294
|
r = e;
|
|
295
295
|
else
|
|
296
296
|
for (const n in e)
|
|
@@ -299,14 +299,14 @@ function H(e) {
|
|
|
299
299
|
return e;
|
|
300
300
|
return r;
|
|
301
301
|
}
|
|
302
|
-
var De = (e) => /^\w*$/.test(e), T = (e) => e === void 0,
|
|
302
|
+
var De = (e) => /^\w*$/.test(e), T = (e) => e === void 0, Xe = (e) => Array.isArray(e) ? e.filter(Boolean) : [], et = (e) => Xe(e.replace(/["|']|\]/g, "").split(/\.|\[/)), p = (e, r, t) => {
|
|
303
303
|
if (!r || !U(e))
|
|
304
304
|
return t;
|
|
305
|
-
const s = (De(r) ? [r] :
|
|
305
|
+
const s = (De(r) ? [r] : et(r)).reduce((n, o) => Q(n) ? n : n[o], e);
|
|
306
306
|
return T(s) || s === e ? T(e[r]) ? t : e[r] : s;
|
|
307
|
-
},
|
|
307
|
+
}, K = (e) => typeof e == "boolean", N = (e, r, t) => {
|
|
308
308
|
let s = -1;
|
|
309
|
-
const n = De(r) ? [r] :
|
|
309
|
+
const n = De(r) ? [r] : et(r), o = n.length, a = o - 1;
|
|
310
310
|
for (; ++s < o; ) {
|
|
311
311
|
const l = n[s];
|
|
312
312
|
let d = t;
|
|
@@ -337,10 +337,10 @@ const Ee = {
|
|
|
337
337
|
pattern: "pattern",
|
|
338
338
|
required: "required",
|
|
339
339
|
validate: "validate"
|
|
340
|
-
},
|
|
341
|
-
|
|
342
|
-
const
|
|
343
|
-
var
|
|
340
|
+
}, jt = V.createContext(null);
|
|
341
|
+
jt.displayName = "HookFormContext";
|
|
342
|
+
const tt = () => V.useContext(jt);
|
|
343
|
+
var Wt = (e, r, t, s = !0) => {
|
|
344
344
|
const n = {
|
|
345
345
|
defaultValues: r._defaultValues
|
|
346
346
|
};
|
|
@@ -353,9 +353,9 @@ var jt = (e, r, t, s = !0) => {
|
|
|
353
353
|
});
|
|
354
354
|
return n;
|
|
355
355
|
};
|
|
356
|
-
const
|
|
357
|
-
function
|
|
358
|
-
const r =
|
|
356
|
+
const rt = typeof window < "u" ? V.useLayoutEffect : V.useEffect;
|
|
357
|
+
function Rr(e) {
|
|
358
|
+
const r = tt(), { control: t = r.control, disabled: s, name: n, exact: o } = e || {}, [a, l] = V.useState(t._formState), d = V.useRef({
|
|
359
359
|
isDirty: !1,
|
|
360
360
|
isLoading: !1,
|
|
361
361
|
dirtyFields: !1,
|
|
@@ -365,7 +365,7 @@ function Pr(e) {
|
|
|
365
365
|
isValid: !1,
|
|
366
366
|
errors: !1
|
|
367
367
|
});
|
|
368
|
-
return
|
|
368
|
+
return rt(() => t._subscribe({
|
|
369
369
|
name: n,
|
|
370
370
|
formState: d.current,
|
|
371
371
|
exact: o,
|
|
@@ -377,13 +377,13 @@ function Pr(e) {
|
|
|
377
377
|
}
|
|
378
378
|
}), [n, s, o]), V.useEffect(() => {
|
|
379
379
|
d.current.isValid && t._setValid(!0);
|
|
380
|
-
}, [t]), V.useMemo(() =>
|
|
380
|
+
}, [t]), V.useMemo(() => Wt(a, t, d.current, !1), [a, t]);
|
|
381
381
|
}
|
|
382
|
-
var
|
|
382
|
+
var J = (e) => typeof e == "string", We = (e, r, t, s, n) => J(e) ? (s && r.watch.add(e), p(t, e, n)) : Array.isArray(e) ? e.map((o) => (s && r.watch.add(o), p(t, o))) : (s && (r.watchAll = !0), t), qe = (e) => Q(e) || !$t(e);
|
|
383
383
|
function ee(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
384
|
-
if (
|
|
384
|
+
if (qe(e) || qe(r))
|
|
385
385
|
return e === r;
|
|
386
|
-
if (
|
|
386
|
+
if (ue(e) && ue(r))
|
|
387
387
|
return e.getTime() === r.getTime();
|
|
388
388
|
const s = Object.keys(e), n = Object.keys(r);
|
|
389
389
|
if (s.length !== n.length)
|
|
@@ -397,32 +397,32 @@ function ee(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
|
397
397
|
return !1;
|
|
398
398
|
if (o !== "ref") {
|
|
399
399
|
const l = r[o];
|
|
400
|
-
if (
|
|
400
|
+
if (ue(a) && ue(l) || U(a) && U(l) || Array.isArray(a) && Array.isArray(l) ? !ee(a, l, t) : a !== l)
|
|
401
401
|
return !1;
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
return !0;
|
|
405
405
|
}
|
|
406
|
-
function
|
|
407
|
-
const r =
|
|
406
|
+
function Nr(e) {
|
|
407
|
+
const r = tt(), { control: t = r.control, name: s, defaultValue: n, disabled: o, exact: a, compute: l } = e || {}, d = V.useRef(n), h = V.useRef(l), f = V.useRef(void 0), _ = V.useRef(t), y = V.useRef(s);
|
|
408
408
|
h.current = l;
|
|
409
|
-
const [x,
|
|
409
|
+
const [x, z] = V.useState(() => {
|
|
410
410
|
const E = t._getWatch(s, d.current);
|
|
411
411
|
return h.current ? h.current(E) : E;
|
|
412
412
|
}), F = V.useCallback((E) => {
|
|
413
|
-
const
|
|
414
|
-
return h.current ? h.current(
|
|
413
|
+
const k = We(s, t._names, E || t._formValues, !1, d.current);
|
|
414
|
+
return h.current ? h.current(k) : k;
|
|
415
415
|
}, [t._formValues, t._names, s]), C = V.useCallback((E) => {
|
|
416
416
|
if (!o) {
|
|
417
|
-
const
|
|
417
|
+
const k = We(s, t._names, E || t._formValues, !1, d.current);
|
|
418
418
|
if (h.current) {
|
|
419
|
-
const I = h.current(
|
|
420
|
-
ee(I, f.current) || (
|
|
419
|
+
const I = h.current(k);
|
|
420
|
+
ee(I, f.current) || (z(I), f.current = I);
|
|
421
421
|
} else
|
|
422
|
-
|
|
422
|
+
z(k);
|
|
423
423
|
}
|
|
424
424
|
}, [t._formValues, t._names, o, s]);
|
|
425
|
-
|
|
425
|
+
rt(() => ((_.current !== t || !ee(y.current, s)) && (_.current = t, y.current = s, C()), t._subscribe({
|
|
426
426
|
name: s,
|
|
427
427
|
formState: {
|
|
428
428
|
values: !0
|
|
@@ -432,31 +432,31 @@ function Rr(e) {
|
|
|
432
432
|
C(E.values);
|
|
433
433
|
}
|
|
434
434
|
})), [t, a, s, C]), V.useEffect(() => t._removeUnmounted());
|
|
435
|
-
const P =
|
|
435
|
+
const P = _.current !== t, b = y.current, A = V.useMemo(() => {
|
|
436
436
|
if (o)
|
|
437
437
|
return null;
|
|
438
438
|
const E = !P && !ee(b, s);
|
|
439
439
|
return P || E ? F() : null;
|
|
440
440
|
}, [o, P, s, b, F]);
|
|
441
|
-
return
|
|
441
|
+
return A !== null ? A : x;
|
|
442
442
|
}
|
|
443
|
-
function
|
|
444
|
-
const r =
|
|
443
|
+
function Or(e) {
|
|
444
|
+
const r = tt(), { name: t, disabled: s, control: n = r.control, shouldUnregister: o, defaultValue: a } = e, l = Ht(n._names.array, t), d = V.useMemo(() => p(n._formValues, t, p(n._defaultValues, t, a)), [n, t, a]), h = Nr({
|
|
445
445
|
control: n,
|
|
446
446
|
name: t,
|
|
447
447
|
defaultValue: d,
|
|
448
448
|
exact: !0
|
|
449
|
-
}), f =
|
|
449
|
+
}), f = Rr({
|
|
450
450
|
control: n,
|
|
451
451
|
name: t,
|
|
452
452
|
exact: !0
|
|
453
|
-
}),
|
|
453
|
+
}), _ = V.useRef(e), y = V.useRef(void 0), x = V.useRef(n.register(t, {
|
|
454
454
|
...e.rules,
|
|
455
455
|
value: h,
|
|
456
|
-
...
|
|
456
|
+
...K(e.disabled) ? { disabled: e.disabled } : {}
|
|
457
457
|
}));
|
|
458
|
-
|
|
459
|
-
const
|
|
458
|
+
_.current = e;
|
|
459
|
+
const z = V.useMemo(() => Object.defineProperties({}, {
|
|
460
460
|
invalid: {
|
|
461
461
|
enumerable: !0,
|
|
462
462
|
get: () => !!p(f.errors, t)
|
|
@@ -477,9 +477,9 @@ function Nr(e) {
|
|
|
477
477
|
enumerable: !0,
|
|
478
478
|
get: () => p(f.errors, t)
|
|
479
479
|
}
|
|
480
|
-
}), [f, t]), F = V.useCallback((
|
|
480
|
+
}), [f, t]), F = V.useCallback((A) => x.current.onChange({
|
|
481
481
|
target: {
|
|
482
|
-
value:
|
|
482
|
+
value: Ut(A),
|
|
483
483
|
name: t
|
|
484
484
|
},
|
|
485
485
|
type: Ee.CHANGE
|
|
@@ -489,38 +489,38 @@ function Nr(e) {
|
|
|
489
489
|
name: t
|
|
490
490
|
},
|
|
491
491
|
type: Ee.BLUR
|
|
492
|
-
}), [t, n._formValues]), P = V.useCallback((
|
|
492
|
+
}), [t, n._formValues]), P = V.useCallback((A) => {
|
|
493
493
|
const E = p(n._fields, t);
|
|
494
|
-
E &&
|
|
495
|
-
focus: () =>
|
|
496
|
-
select: () =>
|
|
497
|
-
setCustomValidity: (
|
|
498
|
-
reportValidity: () =>
|
|
494
|
+
E && A && (E._f.ref = {
|
|
495
|
+
focus: () => A.focus && A.focus(),
|
|
496
|
+
select: () => A.select && A.select(),
|
|
497
|
+
setCustomValidity: (k) => A.setCustomValidity(k),
|
|
498
|
+
reportValidity: () => A.reportValidity()
|
|
499
499
|
});
|
|
500
500
|
}, [n._fields, t]), b = V.useMemo(() => ({
|
|
501
501
|
name: t,
|
|
502
502
|
value: h,
|
|
503
|
-
...
|
|
503
|
+
...K(s) || f.disabled ? { disabled: f.disabled || s } : {},
|
|
504
504
|
onChange: F,
|
|
505
505
|
onBlur: C,
|
|
506
506
|
ref: P
|
|
507
507
|
}), [t, s, f.disabled, F, C, P, h]);
|
|
508
508
|
return V.useEffect(() => {
|
|
509
|
-
const
|
|
509
|
+
const A = n._options.shouldUnregister || o, E = y.current;
|
|
510
510
|
E && E !== t && !l && n.unregister(E), n.register(t, {
|
|
511
|
-
...
|
|
512
|
-
...
|
|
511
|
+
..._.current.rules,
|
|
512
|
+
...K(_.current.disabled) ? { disabled: _.current.disabled } : {}
|
|
513
513
|
});
|
|
514
|
-
const
|
|
514
|
+
const k = (I, B) => {
|
|
515
515
|
const ie = p(n._fields, I);
|
|
516
516
|
ie && ie._f && (ie._f.mount = B);
|
|
517
517
|
};
|
|
518
|
-
if (
|
|
519
|
-
const I = H(p(n._options.defaultValues, t,
|
|
518
|
+
if (k(t, !0), A) {
|
|
519
|
+
const I = H(p(n._options.defaultValues, t, _.current.defaultValue));
|
|
520
520
|
N(n._defaultValues, t, I), T(p(n._formValues, t)) && N(n._formValues, t, I);
|
|
521
521
|
}
|
|
522
522
|
return !l && n.register(t), y.current = t, () => {
|
|
523
|
-
(l ?
|
|
523
|
+
(l ? A && !n._state.action : A) ? n.unregister(t) : k(t, !1);
|
|
524
524
|
};
|
|
525
525
|
}, [t, n, l, o]), V.useEffect(() => {
|
|
526
526
|
n._setDisabledField({
|
|
@@ -530,16 +530,16 @@ function Nr(e) {
|
|
|
530
530
|
}, [s, t, n]), V.useMemo(() => ({
|
|
531
531
|
field: b,
|
|
532
532
|
formState: f,
|
|
533
|
-
fieldState:
|
|
534
|
-
}), [b, f,
|
|
533
|
+
fieldState: z
|
|
534
|
+
}), [b, f, z]);
|
|
535
535
|
}
|
|
536
|
-
var
|
|
536
|
+
var st = (e, r, t, s, n) => r ? {
|
|
537
537
|
...t[e],
|
|
538
538
|
types: {
|
|
539
539
|
...t[e] && t[e].types ? t[e].types : {},
|
|
540
540
|
[s]: n || !0
|
|
541
541
|
}
|
|
542
|
-
} : {}, pe = (e) => Array.isArray(e) ? e : [e],
|
|
542
|
+
} : {}, pe = (e) => Array.isArray(e) ? e : [e], vt = () => {
|
|
543
543
|
let e = [];
|
|
544
544
|
return {
|
|
545
545
|
get observers() {
|
|
@@ -559,66 +559,66 @@ var rt = (e, r, t, s, n) => r ? {
|
|
|
559
559
|
}
|
|
560
560
|
};
|
|
561
561
|
};
|
|
562
|
-
function
|
|
562
|
+
function qt(e, r) {
|
|
563
563
|
const t = {};
|
|
564
564
|
for (const s in e)
|
|
565
565
|
if (e.hasOwnProperty(s)) {
|
|
566
566
|
const n = e[s], o = r[s];
|
|
567
567
|
if (n && U(n) && o) {
|
|
568
|
-
const a =
|
|
568
|
+
const a = qt(n, o);
|
|
569
569
|
U(a) && (t[s] = a);
|
|
570
570
|
} else e[s] && (t[s] = o);
|
|
571
571
|
}
|
|
572
572
|
return t;
|
|
573
573
|
}
|
|
574
|
-
var W = (e) => U(e) && !Object.keys(e).length,
|
|
575
|
-
if (!
|
|
574
|
+
var W = (e) => U(e) && !Object.keys(e).length, ot = (e) => e.type === "file", te = (e) => typeof e == "function", ze = (e) => {
|
|
575
|
+
if (!Ye)
|
|
576
576
|
return !1;
|
|
577
577
|
const r = e ? e.ownerDocument : 0;
|
|
578
578
|
return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement);
|
|
579
|
-
},
|
|
580
|
-
function
|
|
579
|
+
}, Zt = (e) => e.type === "select-multiple", nt = (e) => e.type === "radio", Mr = (e) => nt(e) || be(e), Le = (e) => ze(e) && e.isConnected;
|
|
580
|
+
function Tr(e, r) {
|
|
581
581
|
const t = r.slice(0, -1).length;
|
|
582
582
|
let s = 0;
|
|
583
583
|
for (; s < t; )
|
|
584
584
|
e = T(e) ? s++ : e[r[s++]];
|
|
585
585
|
return e;
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function Lr(e) {
|
|
588
588
|
for (const r in e)
|
|
589
589
|
if (e.hasOwnProperty(r) && !T(e[r]))
|
|
590
590
|
return !1;
|
|
591
591
|
return !0;
|
|
592
592
|
}
|
|
593
593
|
function $(e, r) {
|
|
594
|
-
const t = Array.isArray(r) ? r : De(r) ? [r] :
|
|
595
|
-
return s && delete s[o], n !== 0 && (U(s) && W(s) || Array.isArray(s) &&
|
|
594
|
+
const t = Array.isArray(r) ? r : De(r) ? [r] : et(r), s = t.length === 1 ? e : Tr(e, t), n = t.length - 1, o = t[n];
|
|
595
|
+
return s && delete s[o], n !== 0 && (U(s) && W(s) || Array.isArray(s) && Lr(s)) && $(e, t.slice(0, -1)), e;
|
|
596
596
|
}
|
|
597
|
-
var
|
|
597
|
+
var Ir = (e) => {
|
|
598
598
|
for (const r in e)
|
|
599
599
|
if (te(e[r]))
|
|
600
600
|
return !0;
|
|
601
601
|
return !1;
|
|
602
602
|
};
|
|
603
603
|
function Gt(e) {
|
|
604
|
-
return Array.isArray(e) || U(e) && !
|
|
604
|
+
return Array.isArray(e) || U(e) && !Ir(e);
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function Ze(e, r = {}) {
|
|
607
607
|
for (const t in e)
|
|
608
|
-
Gt(e[t]) ? (r[t] = Array.isArray(e[t]) ? [] : {},
|
|
608
|
+
Gt(e[t]) ? (r[t] = Array.isArray(e[t]) ? [] : {}, Ze(e[t], r[t])) : T(e[t]) || (r[t] = !0);
|
|
609
609
|
return r;
|
|
610
610
|
}
|
|
611
611
|
function ye(e, r, t) {
|
|
612
|
-
t || (t =
|
|
612
|
+
t || (t = Ze(r));
|
|
613
613
|
for (const s in e)
|
|
614
|
-
Gt(e[s]) ? T(r) ||
|
|
614
|
+
Gt(e[s]) ? T(r) || qe(t[s]) ? t[s] = Ze(e[s], Array.isArray(e[s]) ? [] : {}) : ye(e[s], Q(r) ? {} : r[s], t[s]) : t[s] = !ee(e[s], r[s]);
|
|
615
615
|
return t;
|
|
616
616
|
}
|
|
617
|
-
const
|
|
617
|
+
const bt = {
|
|
618
618
|
value: !1,
|
|
619
619
|
isValid: !1
|
|
620
|
-
},
|
|
621
|
-
var
|
|
620
|
+
}, St = { value: !0, isValid: !0 };
|
|
621
|
+
var Qt = (e) => {
|
|
622
622
|
if (Array.isArray(e)) {
|
|
623
623
|
if (e.length > 1) {
|
|
624
624
|
const r = e.filter((t) => t && t.checked && !t.disabled).map((t) => t.value);
|
|
@@ -626,24 +626,24 @@ var Zt = (e) => {
|
|
|
626
626
|
}
|
|
627
627
|
return e[0].checked && !e[0].disabled ? (
|
|
628
628
|
// @ts-expect-error expected to work in the browser
|
|
629
|
-
e[0].attributes && !T(e[0].attributes.value) ? T(e[0].value) || e[0].value === "" ?
|
|
630
|
-
) :
|
|
629
|
+
e[0].attributes && !T(e[0].attributes.value) ? T(e[0].value) || e[0].value === "" ? St : { value: e[0].value, isValid: !0 } : St
|
|
630
|
+
) : bt;
|
|
631
631
|
}
|
|
632
|
-
return
|
|
633
|
-
},
|
|
634
|
-
const
|
|
632
|
+
return bt;
|
|
633
|
+
}, Kt = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: s }) => T(e) ? e : r ? e === "" ? NaN : e && +e : t && J(e) ? new Date(e) : s ? s(e) : e;
|
|
634
|
+
const xt = {
|
|
635
635
|
isValid: !1,
|
|
636
636
|
value: null
|
|
637
637
|
};
|
|
638
638
|
var Jt = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? {
|
|
639
639
|
isValid: !0,
|
|
640
640
|
value: t.value
|
|
641
|
-
} : r,
|
|
642
|
-
function
|
|
641
|
+
} : r, xt) : xt;
|
|
642
|
+
function Ft(e) {
|
|
643
643
|
const r = e.ref;
|
|
644
|
-
return
|
|
644
|
+
return ot(r) ? r.files : nt(r) ? Jt(e.refs).value : Zt(r) ? [...r.selectedOptions].map(({ value: t }) => t) : be(r) ? Qt(e.refs).value : Kt(T(r.value) ? e.ref.value : r.value, e);
|
|
645
645
|
}
|
|
646
|
-
var
|
|
646
|
+
var Br = (e, r, t, s) => {
|
|
647
647
|
const n = {};
|
|
648
648
|
for (const o of e) {
|
|
649
649
|
const a = p(r, o);
|
|
@@ -655,15 +655,15 @@ var Ir = (e, r, t, s) => {
|
|
|
655
655
|
fields: n,
|
|
656
656
|
shouldUseNativeValidation: s
|
|
657
657
|
};
|
|
658
|
-
},
|
|
658
|
+
}, Ae = (e) => e instanceof RegExp, he = (e) => T(e) ? e : Ae(e) ? e.source : U(e) ? Ae(e.value) ? e.value.source : e.value : e, Vt = (e) => ({
|
|
659
659
|
isOnSubmit: !e || e === X.onSubmit,
|
|
660
660
|
isOnBlur: e === X.onBlur,
|
|
661
661
|
isOnChange: e === X.onChange,
|
|
662
662
|
isOnAll: e === X.all,
|
|
663
663
|
isOnTouch: e === X.onTouched
|
|
664
664
|
});
|
|
665
|
-
const
|
|
666
|
-
var
|
|
665
|
+
const kt = "AsyncFunction";
|
|
666
|
+
var $r = (e) => !!e && !!e.validate && !!(te(e.validate) && e.validate.constructor.name === kt || U(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === kt)), Ur = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), wt = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((s) => e.startsWith(s) && /^\.\w+/.test(e.slice(s.length))));
|
|
667
667
|
const ve = (e, r, t, s) => {
|
|
668
668
|
for (const n of t || Object.keys(e)) {
|
|
669
669
|
const o = p(e, n);
|
|
@@ -681,7 +681,7 @@ const ve = (e, r, t, s) => {
|
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
683
|
};
|
|
684
|
-
function
|
|
684
|
+
function Ct(e, r, t) {
|
|
685
685
|
const s = p(e, t);
|
|
686
686
|
if (s || De(t))
|
|
687
687
|
return {
|
|
@@ -709,112 +709,112 @@ function kt(e, r, t) {
|
|
|
709
709
|
name: t
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
|
-
var
|
|
712
|
+
var Hr = (e, r, t, s) => {
|
|
713
713
|
t(e);
|
|
714
714
|
const { name: n, ...o } = e;
|
|
715
715
|
return W(o) || Object.keys(o).length >= Object.keys(r).length || Object.keys(o).find((a) => r[a] === (!s || X.all));
|
|
716
|
-
},
|
|
716
|
+
}, jr = (e, r, t) => !e || !r || e === r || pe(e).some((s) => s && (t ? s === r : s.startsWith(r) || r.startsWith(s))), Wr = (e, r, t, s, n) => n.isOnAll ? !1 : !t && n.isOnTouch ? !(r || e) : (t ? s.isOnBlur : n.isOnBlur) ? !e : (t ? s.isOnChange : n.isOnChange) ? e : !0, qr = (e, r) => !Xe(p(e, r)).length && $(e, r), Zr = (e, r, t) => {
|
|
717
717
|
const s = pe(p(e, t));
|
|
718
718
|
return N(s, "root", r[t]), N(e, t, s), e;
|
|
719
719
|
};
|
|
720
|
-
function
|
|
721
|
-
if (
|
|
720
|
+
function Et(e, r, t = "validate") {
|
|
721
|
+
if (J(e) || Array.isArray(e) && e.every(J) || K(e) && !e)
|
|
722
722
|
return {
|
|
723
723
|
type: t,
|
|
724
|
-
message:
|
|
724
|
+
message: J(e) ? e : "",
|
|
725
725
|
ref: r
|
|
726
726
|
};
|
|
727
727
|
}
|
|
728
|
-
var fe = (e) => U(e) && !
|
|
728
|
+
var fe = (e) => U(e) && !Ae(e) ? e : {
|
|
729
729
|
value: e,
|
|
730
730
|
message: ""
|
|
731
|
-
},
|
|
732
|
-
const { ref: a, refs: l, required: d, maxLength: h, minLength: f, min:
|
|
731
|
+
}, zt = async (e, r, t, s, n, o) => {
|
|
732
|
+
const { ref: a, refs: l, required: d, maxLength: h, minLength: f, min: _, max: y, pattern: x, validate: z, name: F, valueAsNumber: C, mount: P } = e._f, b = p(t, F);
|
|
733
733
|
if (!P || r.has(F))
|
|
734
734
|
return {};
|
|
735
|
-
const
|
|
736
|
-
n &&
|
|
737
|
-
},
|
|
735
|
+
const A = l ? l[0] : a, E = (D) => {
|
|
736
|
+
n && A.reportValidity && (A.setCustomValidity(K(D) ? "" : D || ""), A.reportValidity());
|
|
737
|
+
}, k = {}, I = nt(a), B = be(a), ie = I || B, Z = (C || ot(a)) && T(a.value) && T(b) || ze(a) && a.value === "" || b === "" || Array.isArray(b) && !b.length, re = st.bind(null, F, s, k), se = (D, O, L, j = ae.maxLength, G = ae.minLength) => {
|
|
738
738
|
const oe = D ? O : L;
|
|
739
|
-
|
|
740
|
-
type: D ? j :
|
|
739
|
+
k[F] = {
|
|
740
|
+
type: D ? j : G,
|
|
741
741
|
message: oe,
|
|
742
742
|
ref: a,
|
|
743
|
-
...re(D ? j :
|
|
743
|
+
...re(D ? j : G, oe)
|
|
744
744
|
};
|
|
745
745
|
};
|
|
746
|
-
if (o ? !Array.isArray(b) || !b.length : d && (!ie && (
|
|
747
|
-
const { value: D, message: O } =
|
|
748
|
-
if (D && (
|
|
746
|
+
if (o ? !Array.isArray(b) || !b.length : d && (!ie && (Z || Q(b)) || K(b) && !b || B && !Qt(l).isValid || I && !Jt(l).isValid)) {
|
|
747
|
+
const { value: D, message: O } = J(d) ? { value: !!d, message: d } : fe(d);
|
|
748
|
+
if (D && (k[F] = {
|
|
749
749
|
type: ae.required,
|
|
750
750
|
message: O,
|
|
751
|
-
ref:
|
|
751
|
+
ref: A,
|
|
752
752
|
...re(ae.required, O)
|
|
753
753
|
}, !s))
|
|
754
|
-
return E(O),
|
|
754
|
+
return E(O), k;
|
|
755
755
|
}
|
|
756
|
-
if (!
|
|
756
|
+
if (!Z && (!Q(_) || !Q(y))) {
|
|
757
757
|
let D, O;
|
|
758
|
-
const L = fe(y), j = fe(
|
|
758
|
+
const L = fe(y), j = fe(_);
|
|
759
759
|
if (!Q(b) && !isNaN(b)) {
|
|
760
|
-
const
|
|
761
|
-
Q(L.value) || (D =
|
|
760
|
+
const G = a.valueAsNumber || b && +b;
|
|
761
|
+
Q(L.value) || (D = G > L.value), Q(j.value) || (O = G < j.value);
|
|
762
762
|
} else {
|
|
763
|
-
const
|
|
764
|
-
|
|
763
|
+
const G = a.valueAsDate || new Date(b), oe = (xe) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + xe), me = a.type == "time", de = a.type == "week";
|
|
764
|
+
J(L.value) && b && (D = me ? oe(b) > oe(L.value) : de ? b > L.value : G > new Date(L.value)), J(j.value) && b && (O = me ? oe(b) < oe(j.value) : de ? b < j.value : G < new Date(j.value));
|
|
765
765
|
}
|
|
766
766
|
if ((D || O) && (se(!!D, L.message, j.message, ae.max, ae.min), !s))
|
|
767
|
-
return E(
|
|
767
|
+
return E(k[F].message), k;
|
|
768
768
|
}
|
|
769
|
-
if ((h || f) && !
|
|
769
|
+
if ((h || f) && !Z && (J(b) || o && Array.isArray(b))) {
|
|
770
770
|
const D = fe(h), O = fe(f), L = !Q(D.value) && b.length > +D.value, j = !Q(O.value) && b.length < +O.value;
|
|
771
771
|
if ((L || j) && (se(L, D.message, O.message), !s))
|
|
772
|
-
return E(
|
|
772
|
+
return E(k[F].message), k;
|
|
773
773
|
}
|
|
774
|
-
if (x && !
|
|
774
|
+
if (x && !Z && J(b)) {
|
|
775
775
|
const { value: D, message: O } = fe(x);
|
|
776
|
-
if (
|
|
776
|
+
if (Ae(D) && !b.match(D) && (k[F] = {
|
|
777
777
|
type: ae.pattern,
|
|
778
778
|
message: O,
|
|
779
779
|
ref: a,
|
|
780
780
|
...re(ae.pattern, O)
|
|
781
781
|
}, !s))
|
|
782
|
-
return E(O),
|
|
782
|
+
return E(O), k;
|
|
783
783
|
}
|
|
784
|
-
if (
|
|
785
|
-
if (te(
|
|
786
|
-
const D = await
|
|
787
|
-
if (O && (
|
|
784
|
+
if (z) {
|
|
785
|
+
if (te(z)) {
|
|
786
|
+
const D = await z(b, t), O = Et(D, A);
|
|
787
|
+
if (O && (k[F] = {
|
|
788
788
|
...O,
|
|
789
789
|
...re(ae.validate, O.message)
|
|
790
790
|
}, !s))
|
|
791
|
-
return E(O.message),
|
|
792
|
-
} else if (U(
|
|
791
|
+
return E(O.message), k;
|
|
792
|
+
} else if (U(z)) {
|
|
793
793
|
let D = {};
|
|
794
|
-
for (const O in
|
|
794
|
+
for (const O in z) {
|
|
795
795
|
if (!W(D) && !s)
|
|
796
796
|
break;
|
|
797
|
-
const L =
|
|
797
|
+
const L = Et(await z[O](b, t), A, O);
|
|
798
798
|
L && (D = {
|
|
799
799
|
...L,
|
|
800
800
|
...re(O, L.message)
|
|
801
|
-
}, E(L.message), s && (
|
|
801
|
+
}, E(L.message), s && (k[F] = D));
|
|
802
802
|
}
|
|
803
|
-
if (!W(D) && (
|
|
804
|
-
ref:
|
|
803
|
+
if (!W(D) && (k[F] = {
|
|
804
|
+
ref: A,
|
|
805
805
|
...D
|
|
806
806
|
}, !s))
|
|
807
|
-
return
|
|
807
|
+
return k;
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
|
-
return E(!0),
|
|
810
|
+
return E(!0), k;
|
|
811
811
|
};
|
|
812
812
|
const Gr = {
|
|
813
813
|
mode: X.onSubmit,
|
|
814
814
|
reValidateMode: X.onChange,
|
|
815
815
|
shouldFocusError: !0
|
|
816
816
|
};
|
|
817
|
-
function
|
|
817
|
+
function Qr(e = {}) {
|
|
818
818
|
let r = {
|
|
819
819
|
...Gr,
|
|
820
820
|
...e
|
|
@@ -853,90 +853,90 @@ function Zr(e = {}) {
|
|
|
853
853
|
isValid: !1,
|
|
854
854
|
errors: !1
|
|
855
855
|
};
|
|
856
|
-
let
|
|
856
|
+
let _ = {
|
|
857
857
|
...f
|
|
858
858
|
};
|
|
859
859
|
const y = {
|
|
860
|
-
array:
|
|
861
|
-
state:
|
|
862
|
-
}, x = r.criteriaMode === X.all,
|
|
863
|
-
clearTimeout(h), h = setTimeout(i,
|
|
860
|
+
array: vt(),
|
|
861
|
+
state: vt()
|
|
862
|
+
}, x = r.criteriaMode === X.all, z = (i) => (c) => {
|
|
863
|
+
clearTimeout(h), h = setTimeout(i, c);
|
|
864
864
|
}, F = async (i) => {
|
|
865
|
-
if (!r.disabled && (f.isValid ||
|
|
866
|
-
const
|
|
867
|
-
|
|
868
|
-
isValid:
|
|
865
|
+
if (!r.disabled && (f.isValid || _.isValid || i)) {
|
|
866
|
+
const c = r.resolver ? W((await B()).errors) : await Z(s, !0);
|
|
867
|
+
c !== t.isValid && y.state.next({
|
|
868
|
+
isValid: c
|
|
869
869
|
});
|
|
870
870
|
}
|
|
871
|
-
}, C = (i,
|
|
872
|
-
!r.disabled && (f.isValidating || f.validatingFields ||
|
|
873
|
-
|
|
871
|
+
}, C = (i, c) => {
|
|
872
|
+
!r.disabled && (f.isValidating || f.validatingFields || _.isValidating || _.validatingFields) && ((i || Array.from(l.mount)).forEach((u) => {
|
|
873
|
+
u && (c ? N(t.validatingFields, u, c) : $(t.validatingFields, u));
|
|
874
874
|
}), y.state.next({
|
|
875
875
|
validatingFields: t.validatingFields,
|
|
876
876
|
isValidating: !W(t.validatingFields)
|
|
877
877
|
}));
|
|
878
|
-
}, P = (i,
|
|
879
|
-
if (v &&
|
|
878
|
+
}, P = (i, c = [], u, v, g = !0, m = !0) => {
|
|
879
|
+
if (v && u && !r.disabled) {
|
|
880
880
|
if (a.action = !0, m && Array.isArray(p(s, i))) {
|
|
881
|
-
const S =
|
|
882
|
-
|
|
881
|
+
const S = u(p(s, i), v.argA, v.argB);
|
|
882
|
+
g && N(s, i, S);
|
|
883
883
|
}
|
|
884
884
|
if (m && Array.isArray(p(t.errors, i))) {
|
|
885
|
-
const S =
|
|
886
|
-
|
|
885
|
+
const S = u(p(t.errors, i), v.argA, v.argB);
|
|
886
|
+
g && N(t.errors, i, S), qr(t.errors, i);
|
|
887
887
|
}
|
|
888
|
-
if ((f.touchedFields ||
|
|
889
|
-
const S =
|
|
890
|
-
|
|
888
|
+
if ((f.touchedFields || _.touchedFields) && m && Array.isArray(p(t.touchedFields, i))) {
|
|
889
|
+
const S = u(p(t.touchedFields, i), v.argA, v.argB);
|
|
890
|
+
g && N(t.touchedFields, i, S);
|
|
891
891
|
}
|
|
892
|
-
(f.dirtyFields ||
|
|
892
|
+
(f.dirtyFields || _.dirtyFields) && (t.dirtyFields = ye(n, o)), y.state.next({
|
|
893
893
|
name: i,
|
|
894
|
-
isDirty: se(i,
|
|
894
|
+
isDirty: se(i, c),
|
|
895
895
|
dirtyFields: t.dirtyFields,
|
|
896
896
|
errors: t.errors,
|
|
897
897
|
isValid: t.isValid
|
|
898
898
|
});
|
|
899
899
|
} else
|
|
900
|
-
N(o, i,
|
|
901
|
-
}, b = (i,
|
|
902
|
-
N(t.errors, i,
|
|
900
|
+
N(o, i, c);
|
|
901
|
+
}, b = (i, c) => {
|
|
902
|
+
N(t.errors, i, c), y.state.next({
|
|
903
903
|
errors: t.errors
|
|
904
904
|
});
|
|
905
|
-
},
|
|
905
|
+
}, A = (i) => {
|
|
906
906
|
t.errors = i, y.state.next({
|
|
907
907
|
errors: t.errors,
|
|
908
908
|
isValid: !1
|
|
909
909
|
});
|
|
910
|
-
}, E = (i,
|
|
911
|
-
const
|
|
912
|
-
if (
|
|
913
|
-
const m = p(o, i, T(
|
|
914
|
-
T(m) || v && v.defaultChecked ||
|
|
910
|
+
}, E = (i, c, u, v) => {
|
|
911
|
+
const g = p(s, i);
|
|
912
|
+
if (g) {
|
|
913
|
+
const m = p(o, i, T(u) ? p(n, i) : u);
|
|
914
|
+
T(m) || v && v.defaultChecked || c ? N(o, i, c ? m : Ft(g._f)) : L(i, m), a.mount && F();
|
|
915
915
|
}
|
|
916
|
-
},
|
|
916
|
+
}, k = (i, c, u, v, g) => {
|
|
917
917
|
let m = !1, S = !1;
|
|
918
918
|
const R = {
|
|
919
919
|
name: i
|
|
920
920
|
};
|
|
921
921
|
if (!r.disabled) {
|
|
922
|
-
if (!
|
|
923
|
-
(f.isDirty ||
|
|
924
|
-
const M = ee(p(n, i),
|
|
925
|
-
S = !!p(t.dirtyFields, i), M ? $(t.dirtyFields, i) : N(t.dirtyFields, i, !0), R.dirtyFields = t.dirtyFields, m = m || (f.dirtyFields ||
|
|
922
|
+
if (!u || v) {
|
|
923
|
+
(f.isDirty || _.isDirty) && (S = t.isDirty, t.isDirty = R.isDirty = se(), m = S !== R.isDirty);
|
|
924
|
+
const M = ee(p(n, i), c);
|
|
925
|
+
S = !!p(t.dirtyFields, i), M ? $(t.dirtyFields, i) : N(t.dirtyFields, i, !0), R.dirtyFields = t.dirtyFields, m = m || (f.dirtyFields || _.dirtyFields) && S !== !M;
|
|
926
926
|
}
|
|
927
|
-
if (
|
|
927
|
+
if (u) {
|
|
928
928
|
const M = p(t.touchedFields, i);
|
|
929
|
-
M || (N(t.touchedFields, i,
|
|
929
|
+
M || (N(t.touchedFields, i, u), R.touchedFields = t.touchedFields, m = m || (f.touchedFields || _.touchedFields) && M !== u);
|
|
930
930
|
}
|
|
931
|
-
m &&
|
|
931
|
+
m && g && y.state.next(R);
|
|
932
932
|
}
|
|
933
933
|
return m ? R : {};
|
|
934
|
-
}, I = (i,
|
|
935
|
-
const
|
|
936
|
-
if (r.delayError &&
|
|
934
|
+
}, I = (i, c, u, v) => {
|
|
935
|
+
const g = p(t.errors, i), m = (f.isValid || _.isValid) && K(c) && t.isValid !== c;
|
|
936
|
+
if (r.delayError && u ? (d = z(() => b(i, u)), d(r.delayError)) : (clearTimeout(h), d = null, u ? N(t.errors, i, u) : $(t.errors, i)), (u ? !ee(g, u) : g) || !W(v) || m) {
|
|
937
937
|
const S = {
|
|
938
938
|
...v,
|
|
939
|
-
...m &&
|
|
939
|
+
...m && K(c) ? { isValid: c } : {},
|
|
940
940
|
errors: t.errors,
|
|
941
941
|
name: i
|
|
942
942
|
};
|
|
@@ -947,214 +947,214 @@ function Zr(e = {}) {
|
|
|
947
947
|
}
|
|
948
948
|
}, B = async (i) => {
|
|
949
949
|
C(i, !0);
|
|
950
|
-
const
|
|
951
|
-
return C(i),
|
|
950
|
+
const c = await r.resolver(o, r.context, Br(i || l.mount, s, r.criteriaMode, r.shouldUseNativeValidation));
|
|
951
|
+
return C(i), c;
|
|
952
952
|
}, ie = async (i) => {
|
|
953
|
-
const { errors:
|
|
953
|
+
const { errors: c } = await B(i);
|
|
954
954
|
if (i)
|
|
955
|
-
for (const
|
|
956
|
-
const v = p(
|
|
957
|
-
v ? N(t.errors,
|
|
955
|
+
for (const u of i) {
|
|
956
|
+
const v = p(c, u);
|
|
957
|
+
v ? N(t.errors, u, v) : $(t.errors, u);
|
|
958
958
|
}
|
|
959
959
|
else
|
|
960
|
-
t.errors =
|
|
961
|
-
return
|
|
962
|
-
},
|
|
960
|
+
t.errors = c;
|
|
961
|
+
return c;
|
|
962
|
+
}, Z = async (i, c, u = {
|
|
963
963
|
valid: !0
|
|
964
964
|
}) => {
|
|
965
965
|
for (const v in i) {
|
|
966
|
-
const
|
|
967
|
-
if (
|
|
968
|
-
const { _f: m, ...S } =
|
|
966
|
+
const g = i[v];
|
|
967
|
+
if (g) {
|
|
968
|
+
const { _f: m, ...S } = g;
|
|
969
969
|
if (m) {
|
|
970
|
-
const R = l.array.has(m.name), M =
|
|
970
|
+
const R = l.array.has(m.name), M = g._f && $r(g._f);
|
|
971
971
|
M && f.validatingFields && C([m.name], !0);
|
|
972
|
-
const Y = await
|
|
973
|
-
if (M && f.validatingFields && C([m.name]), Y[m.name] && (
|
|
972
|
+
const Y = await zt(g, l.disabled, o, x, r.shouldUseNativeValidation && !c, R);
|
|
973
|
+
if (M && f.validatingFields && C([m.name]), Y[m.name] && (u.valid = !1, c))
|
|
974
974
|
break;
|
|
975
|
-
!
|
|
975
|
+
!c && (p(Y, m.name) ? R ? Zr(t.errors, Y, m.name) : N(t.errors, m.name, Y[m.name]) : $(t.errors, m.name));
|
|
976
976
|
}
|
|
977
|
-
!W(S) && await
|
|
977
|
+
!W(S) && await Z(S, c, u);
|
|
978
978
|
}
|
|
979
979
|
}
|
|
980
|
-
return
|
|
980
|
+
return u.valid;
|
|
981
981
|
}, re = () => {
|
|
982
982
|
for (const i of l.unMount) {
|
|
983
|
-
const
|
|
984
|
-
|
|
983
|
+
const c = p(s, i);
|
|
984
|
+
c && (c._f.refs ? c._f.refs.every((u) => !Le(u)) : !Le(c._f.ref)) && Pe(i);
|
|
985
985
|
}
|
|
986
986
|
l.unMount = /* @__PURE__ */ new Set();
|
|
987
|
-
}, se = (i,
|
|
988
|
-
...a.mount ? o : T(
|
|
989
|
-
},
|
|
987
|
+
}, se = (i, c) => !r.disabled && (i && c && N(o, i, c), !ee(xe(), n)), D = (i, c, u) => We(i, l, {
|
|
988
|
+
...a.mount ? o : T(c) ? n : J(i) ? { [i]: c } : c
|
|
989
|
+
}, u, c), O = (i) => Xe(p(a.mount ? o : n, i, r.shouldUnregister ? p(n, i, []) : [])), L = (i, c, u = {}) => {
|
|
990
990
|
const v = p(s, i);
|
|
991
|
-
let
|
|
991
|
+
let g = c;
|
|
992
992
|
if (v) {
|
|
993
993
|
const m = v._f;
|
|
994
|
-
m && (!m.disabled && N(o, i,
|
|
995
|
-
(!S.defaultChecked || !S.disabled) && (Array.isArray(
|
|
996
|
-
}) : m.refs.forEach((S) => S.checked = S.value ===
|
|
994
|
+
m && (!m.disabled && N(o, i, Kt(c, m)), g = ze(m.ref) && Q(c) ? "" : c, Zt(m.ref) ? [...m.ref.options].forEach((S) => S.selected = g.includes(S.value)) : m.refs ? be(m.ref) ? m.refs.forEach((S) => {
|
|
995
|
+
(!S.defaultChecked || !S.disabled) && (Array.isArray(g) ? S.checked = !!g.find((R) => R === S.value) : S.checked = g === S.value || !!g);
|
|
996
|
+
}) : m.refs.forEach((S) => S.checked = S.value === g) : ot(m.ref) ? m.ref.value = "" : (m.ref.value = g, m.ref.type || y.state.next({
|
|
997
997
|
name: i,
|
|
998
998
|
values: H(o)
|
|
999
999
|
})));
|
|
1000
1000
|
}
|
|
1001
|
-
(
|
|
1002
|
-
}, j = (i,
|
|
1003
|
-
for (const v in
|
|
1004
|
-
if (!
|
|
1001
|
+
(u.shouldDirty || u.shouldTouch) && k(i, g, u.shouldTouch, u.shouldDirty, !0), u.shouldValidate && de(i);
|
|
1002
|
+
}, j = (i, c, u) => {
|
|
1003
|
+
for (const v in c) {
|
|
1004
|
+
if (!c.hasOwnProperty(v))
|
|
1005
1005
|
return;
|
|
1006
|
-
const
|
|
1007
|
-
(l.array.has(i) || U(
|
|
1006
|
+
const g = c[v], m = i + "." + v, S = p(s, m);
|
|
1007
|
+
(l.array.has(i) || U(g) || S && !S._f) && !ue(g) ? j(m, g, u) : L(m, g, u);
|
|
1008
1008
|
}
|
|
1009
|
-
},
|
|
1010
|
-
const v = p(s, i),
|
|
1011
|
-
N(o, i, m),
|
|
1009
|
+
}, G = (i, c, u = {}) => {
|
|
1010
|
+
const v = p(s, i), g = l.array.has(i), m = H(c);
|
|
1011
|
+
N(o, i, m), g ? (y.array.next({
|
|
1012
1012
|
name: i,
|
|
1013
1013
|
values: H(o)
|
|
1014
|
-
}), (f.isDirty || f.dirtyFields ||
|
|
1014
|
+
}), (f.isDirty || f.dirtyFields || _.isDirty || _.dirtyFields) && u.shouldDirty && y.state.next({
|
|
1015
1015
|
name: i,
|
|
1016
1016
|
dirtyFields: ye(n, o),
|
|
1017
1017
|
isDirty: se(i, m)
|
|
1018
|
-
})) : v && !v._f && !Q(m) ? j(i, m,
|
|
1018
|
+
})) : v && !v._f && !Q(m) ? j(i, m, u) : L(i, m, u), wt(i, l) && y.state.next({ ...t, name: i }), y.state.next({
|
|
1019
1019
|
name: a.mount ? i : void 0,
|
|
1020
1020
|
values: H(o)
|
|
1021
1021
|
});
|
|
1022
1022
|
}, oe = async (i) => {
|
|
1023
1023
|
a.mount = !0;
|
|
1024
|
-
const
|
|
1025
|
-
let
|
|
1026
|
-
const
|
|
1027
|
-
v = Number.isNaN(M) ||
|
|
1028
|
-
}, S =
|
|
1029
|
-
if (
|
|
1024
|
+
const c = i.target;
|
|
1025
|
+
let u = c.name, v = !0;
|
|
1026
|
+
const g = p(s, u), m = (M) => {
|
|
1027
|
+
v = Number.isNaN(M) || ue(M) && isNaN(M.getTime()) || ee(M, p(o, u, M));
|
|
1028
|
+
}, S = Vt(r.mode), R = Vt(r.reValidateMode);
|
|
1029
|
+
if (g) {
|
|
1030
1030
|
let M, Y;
|
|
1031
|
-
const Fe =
|
|
1032
|
-
N(o,
|
|
1033
|
-
const Me =
|
|
1031
|
+
const Fe = c.type ? Ft(g._f) : Ut(i), le = i.type === Ee.BLUR || i.type === Ee.FOCUS_OUT, fr = !Ur(g._f) && !r.resolver && !p(t.errors, u) && !g._f.deps || Wr(le, p(t.touchedFields, u), t.isSubmitted, R, S), Oe = wt(u, l, le);
|
|
1032
|
+
N(o, u, Fe), le ? (!c || !c.readOnly) && (g._f.onBlur && g._f.onBlur(i), d && d(0)) : g._f.onChange && g._f.onChange(i);
|
|
1033
|
+
const Me = k(u, Fe, le), yr = !W(Me) || Oe;
|
|
1034
1034
|
if (!le && y.state.next({
|
|
1035
|
-
name:
|
|
1035
|
+
name: u,
|
|
1036
1036
|
type: i.type,
|
|
1037
1037
|
values: H(o)
|
|
1038
|
-
}),
|
|
1039
|
-
return (f.isValid ||
|
|
1038
|
+
}), fr)
|
|
1039
|
+
return (f.isValid || _.isValid) && (r.mode === "onBlur" ? le && F() : le || F()), yr && y.state.next({ name: u, ...Oe ? {} : Me });
|
|
1040
1040
|
if (!le && Oe && y.state.next({ ...t }), r.resolver) {
|
|
1041
|
-
const { errors:
|
|
1041
|
+
const { errors: mt } = await B([u]);
|
|
1042
1042
|
if (m(Fe), v) {
|
|
1043
|
-
const
|
|
1044
|
-
M =
|
|
1043
|
+
const mr = Ct(t.errors, s, u), ht = Ct(mt, s, mr.name || u);
|
|
1044
|
+
M = ht.error, u = ht.name, Y = W(mt);
|
|
1045
1045
|
}
|
|
1046
1046
|
} else
|
|
1047
|
-
C([
|
|
1048
|
-
v && (
|
|
1047
|
+
C([u], !0), M = (await zt(g, l.disabled, o, x, r.shouldUseNativeValidation))[u], C([u]), m(Fe), v && (M ? Y = !1 : (f.isValid || _.isValid) && (Y = await Z(s, !0)));
|
|
1048
|
+
v && (g._f.deps && (!Array.isArray(g._f.deps) || g._f.deps.length > 0) && de(g._f.deps), I(u, Y, M, Me));
|
|
1049
1049
|
}
|
|
1050
|
-
}, me = (i,
|
|
1051
|
-
if (p(t.errors,
|
|
1050
|
+
}, me = (i, c) => {
|
|
1051
|
+
if (p(t.errors, c) && i.focus)
|
|
1052
1052
|
return i.focus(), 1;
|
|
1053
|
-
}, de = async (i,
|
|
1054
|
-
let
|
|
1055
|
-
const
|
|
1053
|
+
}, de = async (i, c = {}) => {
|
|
1054
|
+
let u, v;
|
|
1055
|
+
const g = pe(i);
|
|
1056
1056
|
if (r.resolver) {
|
|
1057
|
-
const m = await ie(T(i) ? i :
|
|
1058
|
-
|
|
1059
|
-
} else i ? (v = (await Promise.all(
|
|
1057
|
+
const m = await ie(T(i) ? i : g);
|
|
1058
|
+
u = W(m), v = i ? !g.some((S) => p(m, S)) : u;
|
|
1059
|
+
} else i ? (v = (await Promise.all(g.map(async (m) => {
|
|
1060
1060
|
const S = p(s, m);
|
|
1061
|
-
return await
|
|
1062
|
-
}))).every(Boolean), !(!v && !t.isValid) && F()) : v =
|
|
1061
|
+
return await Z(S && S._f ? { [m]: S } : S);
|
|
1062
|
+
}))).every(Boolean), !(!v && !t.isValid) && F()) : v = u = await Z(s);
|
|
1063
1063
|
return y.state.next({
|
|
1064
|
-
...!
|
|
1065
|
-
...r.resolver || !i ? { isValid:
|
|
1064
|
+
...!J(i) || (f.isValid || _.isValid) && u !== t.isValid ? {} : { name: i },
|
|
1065
|
+
...r.resolver || !i ? { isValid: u } : {},
|
|
1066
1066
|
errors: t.errors
|
|
1067
|
-
}),
|
|
1068
|
-
}, xe = (i,
|
|
1069
|
-
let
|
|
1067
|
+
}), c.shouldFocus && !v && ve(s, me, i ? g : l.mount), v;
|
|
1068
|
+
}, xe = (i, c) => {
|
|
1069
|
+
let u = {
|
|
1070
1070
|
...a.mount ? o : n
|
|
1071
1071
|
};
|
|
1072
|
-
return
|
|
1073
|
-
},
|
|
1074
|
-
invalid: !!p((
|
|
1075
|
-
isDirty: !!p((
|
|
1076
|
-
error: p((
|
|
1072
|
+
return c && (u = qt(c.dirtyFields ? t.dirtyFields : t.touchedFields, u)), T(i) ? u : J(i) ? p(u, i) : i.map((v) => p(u, v));
|
|
1073
|
+
}, it = (i, c) => ({
|
|
1074
|
+
invalid: !!p((c || t).errors, i),
|
|
1075
|
+
isDirty: !!p((c || t).dirtyFields, i),
|
|
1076
|
+
error: p((c || t).errors, i),
|
|
1077
1077
|
isValidating: !!p(t.validatingFields, i),
|
|
1078
|
-
isTouched: !!p((
|
|
1079
|
-
}),
|
|
1080
|
-
i && pe(i).forEach((
|
|
1078
|
+
isTouched: !!p((c || t).touchedFields, i)
|
|
1079
|
+
}), nr = (i) => {
|
|
1080
|
+
i && pe(i).forEach((c) => $(t.errors, c)), y.state.next({
|
|
1081
1081
|
errors: i ? t.errors : {}
|
|
1082
1082
|
});
|
|
1083
|
-
},
|
|
1084
|
-
const v = (p(s, i, { _f: {} })._f || {}).ref,
|
|
1083
|
+
}, at = (i, c, u) => {
|
|
1084
|
+
const v = (p(s, i, { _f: {} })._f || {}).ref, g = p(t.errors, i) || {}, { ref: m, message: S, type: R, ...M } = g;
|
|
1085
1085
|
N(t.errors, i, {
|
|
1086
1086
|
...M,
|
|
1087
|
-
...
|
|
1087
|
+
...c,
|
|
1088
1088
|
ref: v
|
|
1089
1089
|
}), y.state.next({
|
|
1090
1090
|
name: i,
|
|
1091
1091
|
errors: t.errors,
|
|
1092
1092
|
isValid: !1
|
|
1093
|
-
}),
|
|
1094
|
-
},
|
|
1095
|
-
next: (
|
|
1096
|
-
}) : D(i,
|
|
1097
|
-
next: (
|
|
1098
|
-
|
|
1093
|
+
}), u && u.shouldFocus && v && v.focus && v.focus();
|
|
1094
|
+
}, ir = (i, c) => te(i) ? y.state.subscribe({
|
|
1095
|
+
next: (u) => "values" in u && i(D(void 0, c), u)
|
|
1096
|
+
}) : D(i, c, !0), lt = (i) => y.state.subscribe({
|
|
1097
|
+
next: (c) => {
|
|
1098
|
+
jr(i.name, c.name, i.exact) && Hr(c, i.formState || f, dr, i.reRenderRoot) && i.callback({
|
|
1099
1099
|
values: { ...o },
|
|
1100
1100
|
...t,
|
|
1101
|
-
...
|
|
1101
|
+
...c,
|
|
1102
1102
|
defaultValues: n
|
|
1103
1103
|
});
|
|
1104
1104
|
}
|
|
1105
|
-
}).unsubscribe,
|
|
1106
|
-
...
|
|
1105
|
+
}).unsubscribe, ar = (i) => (a.mount = !0, _ = {
|
|
1106
|
+
..._,
|
|
1107
1107
|
...i.formState
|
|
1108
|
-
},
|
|
1108
|
+
}, lt({
|
|
1109
1109
|
...i,
|
|
1110
|
-
formState:
|
|
1111
|
-
})), Pe = (i,
|
|
1112
|
-
for (const
|
|
1113
|
-
l.mount.delete(
|
|
1110
|
+
formState: _
|
|
1111
|
+
})), Pe = (i, c = {}) => {
|
|
1112
|
+
for (const u of i ? pe(i) : l.mount)
|
|
1113
|
+
l.mount.delete(u), l.array.delete(u), c.keepValue || ($(s, u), $(o, u)), !c.keepError && $(t.errors, u), !c.keepDirty && $(t.dirtyFields, u), !c.keepTouched && $(t.touchedFields, u), !c.keepIsValidating && $(t.validatingFields, u), !r.shouldUnregister && !c.keepDefaultValue && $(n, u);
|
|
1114
1114
|
y.state.next({
|
|
1115
1115
|
values: H(o)
|
|
1116
1116
|
}), y.state.next({
|
|
1117
1117
|
...t,
|
|
1118
|
-
...
|
|
1119
|
-
}), !
|
|
1120
|
-
},
|
|
1121
|
-
(
|
|
1122
|
-
}, Re = (i,
|
|
1123
|
-
let
|
|
1124
|
-
const v =
|
|
1118
|
+
...c.keepDirty ? { isDirty: se() } : {}
|
|
1119
|
+
}), !c.keepIsValid && F();
|
|
1120
|
+
}, ct = ({ disabled: i, name: c }) => {
|
|
1121
|
+
(K(i) && a.mount || i || l.disabled.has(c)) && (i ? l.disabled.add(c) : l.disabled.delete(c));
|
|
1122
|
+
}, Re = (i, c = {}) => {
|
|
1123
|
+
let u = p(s, i);
|
|
1124
|
+
const v = K(c.disabled) || K(r.disabled);
|
|
1125
1125
|
return N(s, i, {
|
|
1126
|
-
...
|
|
1126
|
+
...u || {},
|
|
1127
1127
|
_f: {
|
|
1128
|
-
...
|
|
1128
|
+
...u && u._f ? u._f : { ref: { name: i } },
|
|
1129
1129
|
name: i,
|
|
1130
1130
|
mount: !0,
|
|
1131
|
-
...
|
|
1131
|
+
...c
|
|
1132
1132
|
}
|
|
1133
|
-
}), l.mount.add(i),
|
|
1134
|
-
disabled:
|
|
1133
|
+
}), l.mount.add(i), u ? ct({
|
|
1134
|
+
disabled: K(c.disabled) ? c.disabled : r.disabled,
|
|
1135
1135
|
name: i
|
|
1136
|
-
}) : E(i, !0,
|
|
1137
|
-
...v ? { disabled:
|
|
1136
|
+
}) : E(i, !0, c.value), {
|
|
1137
|
+
...v ? { disabled: c.disabled || r.disabled } : {},
|
|
1138
1138
|
...r.progressive ? {
|
|
1139
|
-
required: !!
|
|
1140
|
-
min: he(
|
|
1141
|
-
max: he(
|
|
1142
|
-
minLength: he(
|
|
1143
|
-
maxLength: he(
|
|
1144
|
-
pattern: he(
|
|
1139
|
+
required: !!c.required,
|
|
1140
|
+
min: he(c.min),
|
|
1141
|
+
max: he(c.max),
|
|
1142
|
+
minLength: he(c.minLength),
|
|
1143
|
+
maxLength: he(c.maxLength),
|
|
1144
|
+
pattern: he(c.pattern)
|
|
1145
1145
|
} : {},
|
|
1146
1146
|
name: i,
|
|
1147
1147
|
onChange: oe,
|
|
1148
1148
|
onBlur: oe,
|
|
1149
|
-
ref: (
|
|
1150
|
-
if (
|
|
1151
|
-
Re(i,
|
|
1152
|
-
const m = T(
|
|
1153
|
-
if (S ? R.find((M) => M === m) : m ===
|
|
1149
|
+
ref: (g) => {
|
|
1150
|
+
if (g) {
|
|
1151
|
+
Re(i, c), u = p(s, i);
|
|
1152
|
+
const m = T(g.value) && g.querySelectorAll && g.querySelectorAll("input,select,textarea")[0] || g, S = Mr(m), R = u._f.refs || [];
|
|
1153
|
+
if (S ? R.find((M) => M === m) : m === u._f.ref)
|
|
1154
1154
|
return;
|
|
1155
1155
|
N(s, i, {
|
|
1156
1156
|
_f: {
|
|
1157
|
-
...
|
|
1157
|
+
...u._f,
|
|
1158
1158
|
...S ? {
|
|
1159
1159
|
refs: [
|
|
1160
1160
|
...R.filter(Le),
|
|
@@ -1166,41 +1166,41 @@ function Zr(e = {}) {
|
|
|
1166
1166
|
}
|
|
1167
1167
|
}), E(i, !1, void 0, m);
|
|
1168
1168
|
} else
|
|
1169
|
-
|
|
1169
|
+
u = p(s, i, {}), u._f && (u._f.mount = !1), (r.shouldUnregister || c.shouldUnregister) && !(Ht(l.array, i) && a.action) && l.unMount.add(i);
|
|
1170
1170
|
}
|
|
1171
1171
|
};
|
|
1172
|
-
}, Ne = () => r.shouldFocusError && ve(s, me, l.mount),
|
|
1173
|
-
|
|
1174
|
-
const v = p(s,
|
|
1175
|
-
v && (
|
|
1176
|
-
|
|
1172
|
+
}, Ne = () => r.shouldFocusError && ve(s, me, l.mount), lr = (i) => {
|
|
1173
|
+
K(i) && (y.state.next({ disabled: i }), ve(s, (c, u) => {
|
|
1174
|
+
const v = p(s, u);
|
|
1175
|
+
v && (c.disabled = v._f.disabled || i, Array.isArray(v._f.refs) && v._f.refs.forEach((g) => {
|
|
1176
|
+
g.disabled = v._f.disabled || i;
|
|
1177
1177
|
}));
|
|
1178
1178
|
}, 0, !1));
|
|
1179
|
-
}, ut = (i,
|
|
1179
|
+
}, ut = (i, c) => async (u) => {
|
|
1180
1180
|
let v;
|
|
1181
|
-
|
|
1182
|
-
let
|
|
1181
|
+
u && (u.preventDefault && u.preventDefault(), u.persist && u.persist());
|
|
1182
|
+
let g = H(o);
|
|
1183
1183
|
if (y.state.next({
|
|
1184
1184
|
isSubmitting: !0
|
|
1185
1185
|
}), r.resolver) {
|
|
1186
1186
|
const { errors: m, values: S } = await B();
|
|
1187
|
-
t.errors = m,
|
|
1187
|
+
t.errors = m, g = H(S);
|
|
1188
1188
|
} else
|
|
1189
|
-
await
|
|
1189
|
+
await Z(s);
|
|
1190
1190
|
if (l.disabled.size)
|
|
1191
1191
|
for (const m of l.disabled)
|
|
1192
|
-
$(
|
|
1192
|
+
$(g, m);
|
|
1193
1193
|
if ($(t.errors, "root"), W(t.errors)) {
|
|
1194
1194
|
y.state.next({
|
|
1195
1195
|
errors: {}
|
|
1196
1196
|
});
|
|
1197
1197
|
try {
|
|
1198
|
-
await i(
|
|
1198
|
+
await i(g, u);
|
|
1199
1199
|
} catch (m) {
|
|
1200
1200
|
v = m;
|
|
1201
1201
|
}
|
|
1202
1202
|
} else
|
|
1203
|
-
|
|
1203
|
+
c && await c({ ...t.errors }, u), Ne(), setTimeout(Ne);
|
|
1204
1204
|
if (y.state.next({
|
|
1205
1205
|
isSubmitted: !0,
|
|
1206
1206
|
isSubmitting: !1,
|
|
@@ -1209,25 +1209,25 @@ function Zr(e = {}) {
|
|
|
1209
1209
|
errors: t.errors
|
|
1210
1210
|
}), v)
|
|
1211
1211
|
throw v;
|
|
1212
|
-
},
|
|
1213
|
-
p(s, i) && (T(
|
|
1214
|
-
},
|
|
1215
|
-
const
|
|
1216
|
-
if (
|
|
1217
|
-
if (
|
|
1212
|
+
}, cr = (i, c = {}) => {
|
|
1213
|
+
p(s, i) && (T(c.defaultValue) ? G(i, H(p(n, i))) : (G(i, c.defaultValue), N(n, i, H(c.defaultValue))), c.keepTouched || $(t.touchedFields, i), c.keepDirty || ($(t.dirtyFields, i), t.isDirty = c.defaultValue ? se(i, H(p(n, i))) : se()), c.keepError || ($(t.errors, i), f.isValid && F()), y.state.next({ ...t }));
|
|
1214
|
+
}, dt = (i, c = {}) => {
|
|
1215
|
+
const u = i ? H(i) : n, v = H(u), g = W(i), m = g ? n : v;
|
|
1216
|
+
if (c.keepDefaultValues || (n = u), !c.keepValues) {
|
|
1217
|
+
if (c.keepDirtyValues) {
|
|
1218
1218
|
const S = /* @__PURE__ */ new Set([
|
|
1219
1219
|
...l.mount,
|
|
1220
1220
|
...Object.keys(ye(n, o))
|
|
1221
1221
|
]);
|
|
1222
1222
|
for (const R of Array.from(S))
|
|
1223
|
-
p(t.dirtyFields, R) ? N(m, R, p(o, R)) :
|
|
1223
|
+
p(t.dirtyFields, R) ? N(m, R, p(o, R)) : G(R, p(m, R));
|
|
1224
1224
|
} else {
|
|
1225
|
-
if (
|
|
1225
|
+
if (Ye && T(i))
|
|
1226
1226
|
for (const S of l.mount) {
|
|
1227
1227
|
const R = p(s, S);
|
|
1228
1228
|
if (R && R._f) {
|
|
1229
1229
|
const M = Array.isArray(R._f.refs) ? R._f.refs[0] : R._f.ref;
|
|
1230
|
-
if (
|
|
1230
|
+
if (ze(M)) {
|
|
1231
1231
|
const Y = M.closest("form");
|
|
1232
1232
|
if (Y) {
|
|
1233
1233
|
Y.reset();
|
|
@@ -1236,73 +1236,73 @@ function Zr(e = {}) {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
1239
|
-
if (
|
|
1239
|
+
if (c.keepFieldsRef)
|
|
1240
1240
|
for (const S of l.mount)
|
|
1241
|
-
|
|
1241
|
+
G(S, p(m, S));
|
|
1242
1242
|
else
|
|
1243
1243
|
s = {};
|
|
1244
1244
|
}
|
|
1245
|
-
o = r.shouldUnregister ?
|
|
1245
|
+
o = r.shouldUnregister ? c.keepDefaultValues ? H(n) : {} : H(m), y.array.next({
|
|
1246
1246
|
values: { ...m }
|
|
1247
1247
|
}), y.state.next({
|
|
1248
1248
|
values: { ...m }
|
|
1249
1249
|
});
|
|
1250
1250
|
}
|
|
1251
1251
|
l = {
|
|
1252
|
-
mount:
|
|
1252
|
+
mount: c.keepDirtyValues ? l.mount : /* @__PURE__ */ new Set(),
|
|
1253
1253
|
unMount: /* @__PURE__ */ new Set(),
|
|
1254
1254
|
array: /* @__PURE__ */ new Set(),
|
|
1255
1255
|
disabled: /* @__PURE__ */ new Set(),
|
|
1256
1256
|
watch: /* @__PURE__ */ new Set(),
|
|
1257
1257
|
watchAll: !1,
|
|
1258
1258
|
focus: ""
|
|
1259
|
-
}, a.mount = !f.isValid || !!
|
|
1260
|
-
submitCount:
|
|
1261
|
-
isDirty:
|
|
1262
|
-
isSubmitted:
|
|
1263
|
-
dirtyFields:
|
|
1264
|
-
touchedFields:
|
|
1265
|
-
errors:
|
|
1266
|
-
isSubmitSuccessful:
|
|
1259
|
+
}, a.mount = !f.isValid || !!c.keepIsValid || !!c.keepDirtyValues || !r.shouldUnregister && !W(m), a.watch = !!r.shouldUnregister, y.state.next({
|
|
1260
|
+
submitCount: c.keepSubmitCount ? t.submitCount : 0,
|
|
1261
|
+
isDirty: g ? !1 : c.keepDirty ? t.isDirty : !!(c.keepDefaultValues && !ee(i, n)),
|
|
1262
|
+
isSubmitted: c.keepIsSubmitted ? t.isSubmitted : !1,
|
|
1263
|
+
dirtyFields: g ? {} : c.keepDirtyValues ? c.keepDefaultValues && o ? ye(n, o) : t.dirtyFields : c.keepDefaultValues && i ? ye(n, i) : c.keepDirty ? t.dirtyFields : {},
|
|
1264
|
+
touchedFields: c.keepTouched ? t.touchedFields : {},
|
|
1265
|
+
errors: c.keepErrors ? t.errors : {},
|
|
1266
|
+
isSubmitSuccessful: c.keepIsSubmitSuccessful ? t.isSubmitSuccessful : !1,
|
|
1267
1267
|
isSubmitting: !1,
|
|
1268
1268
|
defaultValues: n
|
|
1269
1269
|
});
|
|
1270
|
-
},
|
|
1271
|
-
const
|
|
1270
|
+
}, ft = (i, c) => dt(te(i) ? i(o) : i, c), ur = (i, c = {}) => {
|
|
1271
|
+
const u = p(s, i), v = u && u._f;
|
|
1272
1272
|
if (v) {
|
|
1273
|
-
const
|
|
1274
|
-
|
|
1273
|
+
const g = v.refs ? v.refs[0] : v.ref;
|
|
1274
|
+
g.focus && (g.focus(), c.shouldSelect && te(g.select) && g.select());
|
|
1275
1275
|
}
|
|
1276
|
-
},
|
|
1276
|
+
}, dr = (i) => {
|
|
1277
1277
|
t = {
|
|
1278
1278
|
...t,
|
|
1279
1279
|
...i
|
|
1280
1280
|
};
|
|
1281
|
-
},
|
|
1281
|
+
}, yt = {
|
|
1282
1282
|
control: {
|
|
1283
1283
|
register: Re,
|
|
1284
1284
|
unregister: Pe,
|
|
1285
|
-
getFieldState:
|
|
1285
|
+
getFieldState: it,
|
|
1286
1286
|
handleSubmit: ut,
|
|
1287
|
-
setError:
|
|
1288
|
-
_subscribe:
|
|
1287
|
+
setError: at,
|
|
1288
|
+
_subscribe: lt,
|
|
1289
1289
|
_runSchema: B,
|
|
1290
1290
|
_focusError: Ne,
|
|
1291
1291
|
_getWatch: D,
|
|
1292
1292
|
_getDirty: se,
|
|
1293
1293
|
_setValid: F,
|
|
1294
1294
|
_setFieldArray: P,
|
|
1295
|
-
_setDisabledField:
|
|
1296
|
-
_setErrors:
|
|
1295
|
+
_setDisabledField: ct,
|
|
1296
|
+
_setErrors: A,
|
|
1297
1297
|
_getFieldArray: O,
|
|
1298
|
-
_reset:
|
|
1298
|
+
_reset: dt,
|
|
1299
1299
|
_resetDefaultValues: () => te(r.defaultValues) && r.defaultValues().then((i) => {
|
|
1300
|
-
|
|
1300
|
+
ft(i, r.resetOptions), y.state.next({
|
|
1301
1301
|
isLoading: !1
|
|
1302
1302
|
});
|
|
1303
1303
|
}),
|
|
1304
1304
|
_removeUnmounted: re,
|
|
1305
|
-
_disableForm:
|
|
1305
|
+
_disableForm: lr,
|
|
1306
1306
|
_subjects: y,
|
|
1307
1307
|
_proxyFormState: f,
|
|
1308
1308
|
get _fields() {
|
|
@@ -1339,27 +1339,27 @@ function Zr(e = {}) {
|
|
|
1339
1339
|
};
|
|
1340
1340
|
}
|
|
1341
1341
|
},
|
|
1342
|
-
subscribe:
|
|
1342
|
+
subscribe: ar,
|
|
1343
1343
|
trigger: de,
|
|
1344
1344
|
register: Re,
|
|
1345
1345
|
handleSubmit: ut,
|
|
1346
|
-
watch:
|
|
1347
|
-
setValue:
|
|
1346
|
+
watch: ir,
|
|
1347
|
+
setValue: G,
|
|
1348
1348
|
getValues: xe,
|
|
1349
|
-
reset:
|
|
1350
|
-
resetField:
|
|
1351
|
-
clearErrors:
|
|
1349
|
+
reset: ft,
|
|
1350
|
+
resetField: cr,
|
|
1351
|
+
clearErrors: nr,
|
|
1352
1352
|
unregister: Pe,
|
|
1353
|
-
setError:
|
|
1353
|
+
setError: at,
|
|
1354
1354
|
setFocus: ur,
|
|
1355
|
-
getFieldState:
|
|
1355
|
+
getFieldState: it
|
|
1356
1356
|
};
|
|
1357
1357
|
return {
|
|
1358
|
-
...
|
|
1359
|
-
formControl:
|
|
1358
|
+
...yt,
|
|
1359
|
+
formControl: yt
|
|
1360
1360
|
};
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function Kr(e = {}) {
|
|
1363
1363
|
const r = V.useRef(void 0), t = V.useRef(void 0), [s, n] = V.useState({
|
|
1364
1364
|
isDirty: !1,
|
|
1365
1365
|
isValidating: !1,
|
|
@@ -1384,14 +1384,14 @@ function Qr(e = {}) {
|
|
|
1384
1384
|
formState: s
|
|
1385
1385
|
}, e.defaultValues && !te(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
|
|
1386
1386
|
else {
|
|
1387
|
-
const { formControl: a, ...l } =
|
|
1387
|
+
const { formControl: a, ...l } = Qr(e);
|
|
1388
1388
|
r.current = {
|
|
1389
1389
|
...l,
|
|
1390
1390
|
formState: s
|
|
1391
1391
|
};
|
|
1392
1392
|
}
|
|
1393
1393
|
const o = r.current.control;
|
|
1394
|
-
return o._options = e,
|
|
1394
|
+
return o._options = e, rt(() => {
|
|
1395
1395
|
const a = o._subscribe({
|
|
1396
1396
|
formState: o._proxyFormState,
|
|
1397
1397
|
callback: () => n({ ...o._formState }),
|
|
@@ -1423,7 +1423,7 @@ function Qr(e = {}) {
|
|
|
1423
1423
|
}), t.current = e.values, n((a) => ({ ...a }))) : o._resetDefaultValues();
|
|
1424
1424
|
}, [o, e.values]), V.useEffect(() => {
|
|
1425
1425
|
o._state.mount || (o._setValid(), o._state.mount = !0), o._state.watch && (o._state.watch = !1, o._subjects.state.next({ ...o._formState })), o._removeUnmounted();
|
|
1426
|
-
}), r.current.formState =
|
|
1426
|
+
}), r.current.formState = Wt(s, o), r.current;
|
|
1427
1427
|
}
|
|
1428
1428
|
const At = (e, r, t) => {
|
|
1429
1429
|
if (e && "reportValidity" in e) {
|
|
@@ -1435,7 +1435,7 @@ const At = (e, r, t) => {
|
|
|
1435
1435
|
const s = r.fields[t];
|
|
1436
1436
|
s && s.ref && "reportValidity" in s.ref ? At(s.ref, t, e) : s && s.refs && s.refs.forEach((n) => At(n, t, e));
|
|
1437
1437
|
}
|
|
1438
|
-
},
|
|
1438
|
+
}, Dt = (e, r) => {
|
|
1439
1439
|
r.shouldUseNativeValidation && Ge(e, r);
|
|
1440
1440
|
const t = {};
|
|
1441
1441
|
for (const s in e) {
|
|
@@ -1447,13 +1447,13 @@ const At = (e, r, t) => {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
return t;
|
|
1449
1449
|
}, Jr = (e, r) => {
|
|
1450
|
-
const t =
|
|
1451
|
-
return e.some((s) =>
|
|
1450
|
+
const t = Pt(r);
|
|
1451
|
+
return e.some((s) => Pt(s).match(`^${t}\\.\\d+`));
|
|
1452
1452
|
};
|
|
1453
|
-
function
|
|
1453
|
+
function Pt(e) {
|
|
1454
1454
|
return e.replace(/\]|\[/g, "");
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1456
|
+
function Yt(e, r, t) {
|
|
1457
1457
|
function s(l, d) {
|
|
1458
1458
|
var h;
|
|
1459
1459
|
Object.defineProperty(l, "_zod", {
|
|
@@ -1483,62 +1483,62 @@ function Kt(e, r, t) {
|
|
|
1483
1483
|
}
|
|
1484
1484
|
}), Object.defineProperty(a, "name", { value: e }), a;
|
|
1485
1485
|
}
|
|
1486
|
-
class
|
|
1486
|
+
class Yr extends Error {
|
|
1487
1487
|
constructor() {
|
|
1488
1488
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
|
-
const
|
|
1492
|
-
function
|
|
1493
|
-
return
|
|
1491
|
+
const Xr = {};
|
|
1492
|
+
function Xt(e) {
|
|
1493
|
+
return Xr;
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function es(e, r) {
|
|
1496
1496
|
return typeof r == "bigint" ? r.toString() : r;
|
|
1497
1497
|
}
|
|
1498
|
-
const
|
|
1498
|
+
const er = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
1499
1499
|
};
|
|
1500
|
-
function
|
|
1500
|
+
function we(e) {
|
|
1501
1501
|
return typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
1502
1502
|
}
|
|
1503
|
-
function
|
|
1503
|
+
function tr(e, r, t) {
|
|
1504
1504
|
var n, o, a, l, d, h;
|
|
1505
1505
|
const s = { ...e, path: e.path ?? [] };
|
|
1506
1506
|
if (!e.message) {
|
|
1507
|
-
const f =
|
|
1507
|
+
const f = we((a = (o = (n = e.inst) == null ? void 0 : n._zod.def) == null ? void 0 : o.error) == null ? void 0 : a.call(o, e)) ?? we((l = r == null ? void 0 : r.error) == null ? void 0 : l.call(r, e)) ?? we((d = t.customError) == null ? void 0 : d.call(t, e)) ?? we((h = t.localeError) == null ? void 0 : h.call(t, e)) ?? "Invalid input";
|
|
1508
1508
|
s.message = f;
|
|
1509
1509
|
}
|
|
1510
1510
|
return delete s.inst, delete s.continue, r != null && r.reportInput || delete s.input, s;
|
|
1511
1511
|
}
|
|
1512
|
-
const
|
|
1512
|
+
const rr = (e, r) => {
|
|
1513
1513
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
1514
1514
|
value: e._zod,
|
|
1515
1515
|
enumerable: !1
|
|
1516
1516
|
}), Object.defineProperty(e, "issues", {
|
|
1517
1517
|
value: r,
|
|
1518
1518
|
enumerable: !1
|
|
1519
|
-
}), e.message = JSON.stringify(r,
|
|
1519
|
+
}), e.message = JSON.stringify(r, es, 2), Object.defineProperty(e, "toString", {
|
|
1520
1520
|
value: () => e.message,
|
|
1521
1521
|
enumerable: !1
|
|
1522
1522
|
});
|
|
1523
|
-
},
|
|
1523
|
+
}, ts = Yt("$ZodError", rr), sr = Yt("$ZodError", rr, { Parent: Error }), rs = (e) => (r, t, s, n) => {
|
|
1524
1524
|
const o = s ? Object.assign(s, { async: !1 }) : { async: !1 }, a = r._zod.run({ value: t, issues: [] }, o);
|
|
1525
1525
|
if (a instanceof Promise)
|
|
1526
|
-
throw new
|
|
1526
|
+
throw new Yr();
|
|
1527
1527
|
if (a.issues.length) {
|
|
1528
|
-
const l = new ((n == null ? void 0 : n.Err) ?? e)(a.issues.map((d) =>
|
|
1529
|
-
throw
|
|
1528
|
+
const l = new ((n == null ? void 0 : n.Err) ?? e)(a.issues.map((d) => tr(d, o, Xt())));
|
|
1529
|
+
throw er(l, n == null ? void 0 : n.callee), l;
|
|
1530
1530
|
}
|
|
1531
1531
|
return a.value;
|
|
1532
|
-
},
|
|
1532
|
+
}, ss = /* @__PURE__ */ rs(sr), os = (e) => async (r, t, s, n) => {
|
|
1533
1533
|
const o = s ? Object.assign(s, { async: !0 }) : { async: !0 };
|
|
1534
1534
|
let a = r._zod.run({ value: t, issues: [] }, o);
|
|
1535
1535
|
if (a instanceof Promise && (a = await a), a.issues.length) {
|
|
1536
|
-
const l = new ((n == null ? void 0 : n.Err) ?? e)(a.issues.map((d) =>
|
|
1537
|
-
throw
|
|
1536
|
+
const l = new ((n == null ? void 0 : n.Err) ?? e)(a.issues.map((d) => tr(d, o, Xt())));
|
|
1537
|
+
throw er(l, n == null ? void 0 : n.callee), l;
|
|
1538
1538
|
}
|
|
1539
1539
|
return a.value;
|
|
1540
|
-
},
|
|
1541
|
-
function
|
|
1540
|
+
}, ns = /* @__PURE__ */ os(sr);
|
|
1541
|
+
function Rt(e, r) {
|
|
1542
1542
|
try {
|
|
1543
1543
|
var t = e();
|
|
1544
1544
|
} catch (s) {
|
|
@@ -1546,7 +1546,7 @@ function Pt(e, r) {
|
|
|
1546
1546
|
}
|
|
1547
1547
|
return t && t.then ? t.then(void 0, r) : t;
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function is(e, r) {
|
|
1550
1550
|
for (var t = {}; e.length; ) {
|
|
1551
1551
|
var s = e[0], n = s.code, o = s.message, a = s.path.join(".");
|
|
1552
1552
|
if (!t[a]) if ("unionErrors" in s) {
|
|
@@ -1554,18 +1554,18 @@ function ns(e, r) {
|
|
|
1554
1554
|
t[a] = { message: l.message, type: l.code };
|
|
1555
1555
|
} else t[a] = { message: o, type: n };
|
|
1556
1556
|
if ("unionErrors" in s && s.unionErrors.forEach(function(f) {
|
|
1557
|
-
return f.errors.forEach(function(
|
|
1558
|
-
return e.push(
|
|
1557
|
+
return f.errors.forEach(function(_) {
|
|
1558
|
+
return e.push(_);
|
|
1559
1559
|
});
|
|
1560
1560
|
}), r) {
|
|
1561
1561
|
var d = t[a].types, h = d && d[s.code];
|
|
1562
|
-
t[a] =
|
|
1562
|
+
t[a] = st(a, r, t, n, h ? [].concat(h, s.message) : s.message);
|
|
1563
1563
|
}
|
|
1564
1564
|
e.shift();
|
|
1565
1565
|
}
|
|
1566
1566
|
return t;
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1568
|
+
function as(e, r) {
|
|
1569
1569
|
for (var t = {}; e.length; ) {
|
|
1570
1570
|
var s = e[0], n = s.code, o = s.message, a = s.path.join(".");
|
|
1571
1571
|
if (!t[a]) if (s.code === "invalid_union" && s.errors.length > 0) {
|
|
@@ -1573,30 +1573,30 @@ function is(e, r) {
|
|
|
1573
1573
|
t[a] = { message: l.message, type: l.code };
|
|
1574
1574
|
} else t[a] = { message: o, type: n };
|
|
1575
1575
|
if (s.code === "invalid_union" && s.errors.forEach(function(f) {
|
|
1576
|
-
return f.forEach(function(
|
|
1577
|
-
return e.push(
|
|
1576
|
+
return f.forEach(function(_) {
|
|
1577
|
+
return e.push(_);
|
|
1578
1578
|
});
|
|
1579
1579
|
}), r) {
|
|
1580
1580
|
var d = t[a].types, h = d && d[s.code];
|
|
1581
|
-
t[a] =
|
|
1581
|
+
t[a] = st(a, r, t, n, h ? [].concat(h, s.message) : s.message);
|
|
1582
1582
|
}
|
|
1583
1583
|
e.shift();
|
|
1584
1584
|
}
|
|
1585
1585
|
return t;
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1587
|
+
function ls(e, r, t) {
|
|
1588
1588
|
if (t === void 0 && (t = {}), (function(s) {
|
|
1589
1589
|
return "_def" in s && typeof s._def == "object" && "typeName" in s._def;
|
|
1590
1590
|
})(e)) return function(s, n, o) {
|
|
1591
1591
|
try {
|
|
1592
|
-
return Promise.resolve(
|
|
1592
|
+
return Promise.resolve(Rt(function() {
|
|
1593
1593
|
return Promise.resolve(e[t.mode === "sync" ? "parse" : "parseAsync"](s, r)).then(function(a) {
|
|
1594
1594
|
return o.shouldUseNativeValidation && Ge({}, o), { errors: {}, values: t.raw ? Object.assign({}, s) : a };
|
|
1595
1595
|
});
|
|
1596
1596
|
}, function(a) {
|
|
1597
1597
|
if ((function(l) {
|
|
1598
1598
|
return Array.isArray(l == null ? void 0 : l.issues);
|
|
1599
|
-
})(a)) return { values: {}, errors:
|
|
1599
|
+
})(a)) return { values: {}, errors: Dt(is(a.errors, !o.shouldUseNativeValidation && o.criteriaMode === "all"), o) };
|
|
1600
1600
|
throw a;
|
|
1601
1601
|
}));
|
|
1602
1602
|
} catch (a) {
|
|
@@ -1607,14 +1607,14 @@ function as(e, r, t) {
|
|
|
1607
1607
|
return "_zod" in s && typeof s._zod == "object";
|
|
1608
1608
|
})(e)) return function(s, n, o) {
|
|
1609
1609
|
try {
|
|
1610
|
-
return Promise.resolve(
|
|
1611
|
-
return Promise.resolve((t.mode === "sync" ?
|
|
1610
|
+
return Promise.resolve(Rt(function() {
|
|
1611
|
+
return Promise.resolve((t.mode === "sync" ? ss : ns)(e, s, r)).then(function(a) {
|
|
1612
1612
|
return o.shouldUseNativeValidation && Ge({}, o), { errors: {}, values: t.raw ? Object.assign({}, s) : a };
|
|
1613
1613
|
});
|
|
1614
1614
|
}, function(a) {
|
|
1615
1615
|
if ((function(l) {
|
|
1616
|
-
return l instanceof
|
|
1617
|
-
})(a)) return { values: {}, errors:
|
|
1616
|
+
return l instanceof ts;
|
|
1617
|
+
})(a)) return { values: {}, errors: Dt(as(a.issues, !o.shouldUseNativeValidation && o.criteriaMode === "all"), o) };
|
|
1618
1618
|
throw a;
|
|
1619
1619
|
}));
|
|
1620
1620
|
} catch (a) {
|
|
@@ -1623,9 +1623,9 @@ function as(e, r, t) {
|
|
|
1623
1623
|
};
|
|
1624
1624
|
throw new Error("Invalid input: not a Zod schema");
|
|
1625
1625
|
}
|
|
1626
|
-
const
|
|
1627
|
-
function
|
|
1628
|
-
const e = V.useContext(
|
|
1626
|
+
const or = V.createContext(null);
|
|
1627
|
+
function cs() {
|
|
1628
|
+
const e = V.useContext(or);
|
|
1629
1629
|
if (!e)
|
|
1630
1630
|
throw new Error("useFormContext must be used within a Form component");
|
|
1631
1631
|
return e;
|
|
@@ -1639,18 +1639,18 @@ function us({
|
|
|
1639
1639
|
reValidateMode: o = "onChange",
|
|
1640
1640
|
...a
|
|
1641
1641
|
}) {
|
|
1642
|
-
const l =
|
|
1643
|
-
resolver: t ?
|
|
1642
|
+
const l = Kr({
|
|
1643
|
+
resolver: t ? ls(t) : void 0,
|
|
1644
1644
|
defaultValues: s,
|
|
1645
1645
|
mode: n,
|
|
1646
1646
|
reValidateMode: o
|
|
1647
1647
|
}), d = l.handleSubmit(e);
|
|
1648
|
-
return /* @__PURE__ */
|
|
1648
|
+
return /* @__PURE__ */ w(or.Provider, { value: l, children: /* @__PURE__ */ w("form", { onSubmit: d, ...a, children: typeof r == "function" ? r(l) : r }) });
|
|
1649
1649
|
}
|
|
1650
|
-
const
|
|
1651
|
-
label:
|
|
1652
|
-
disabled:
|
|
1653
|
-
},
|
|
1650
|
+
const yo = us, ds = "FormLabel-module__label___0M-fo", fs = "FormLabel-module__disabled___ktIFp", Nt = {
|
|
1651
|
+
label: ds,
|
|
1652
|
+
disabled: fs
|
|
1653
|
+
}, ys = ({
|
|
1654
1654
|
color: e = "#000",
|
|
1655
1655
|
disabled: r = !1,
|
|
1656
1656
|
fontSize: t = ".85em"
|
|
@@ -1659,7 +1659,7 @@ const uo = us, cs = "FormLabel-module__label___0M-fo", ds = "FormLabel-module__d
|
|
|
1659
1659
|
fontSize: t,
|
|
1660
1660
|
opacity: r ? 0.5 : 1,
|
|
1661
1661
|
cursor: r ? "not-allowed" : "default"
|
|
1662
|
-
}),
|
|
1662
|
+
}), ms = ({
|
|
1663
1663
|
children: e,
|
|
1664
1664
|
color: r,
|
|
1665
1665
|
disabled: t = !1,
|
|
@@ -1669,21 +1669,21 @@ const uo = us, cs = "FormLabel-module__label___0M-fo", ds = "FormLabel-module__d
|
|
|
1669
1669
|
style: a,
|
|
1670
1670
|
...l
|
|
1671
1671
|
}) => {
|
|
1672
|
-
const d = q(), h = d.colors.error, f = s ? h : r || d.colors.primary,
|
|
1672
|
+
const d = q(), h = d.colors.error, f = s ? h : r || d.colors.primary, _ = ys({
|
|
1673
1673
|
color: f,
|
|
1674
1674
|
disabled: t,
|
|
1675
1675
|
fontSize: n || ".85em"
|
|
1676
1676
|
}), y = {
|
|
1677
|
-
color:
|
|
1678
|
-
fontSize:
|
|
1679
|
-
opacity:
|
|
1680
|
-
cursor:
|
|
1677
|
+
color: _.color,
|
|
1678
|
+
fontSize: _.fontSize,
|
|
1679
|
+
opacity: _.opacity,
|
|
1680
|
+
cursor: _.cursor,
|
|
1681
1681
|
...a
|
|
1682
1682
|
}, x = [
|
|
1683
|
-
|
|
1684
|
-
t ?
|
|
1683
|
+
Nt.label,
|
|
1684
|
+
t ? Nt.disabled : ""
|
|
1685
1685
|
].filter(Boolean).join(" ");
|
|
1686
|
-
return /* @__PURE__ */
|
|
1686
|
+
return /* @__PURE__ */ w(
|
|
1687
1687
|
"label",
|
|
1688
1688
|
{
|
|
1689
1689
|
className: x,
|
|
@@ -1693,8 +1693,8 @@ const uo = us, cs = "FormLabel-module__label___0M-fo", ds = "FormLabel-module__d
|
|
|
1693
1693
|
children: e
|
|
1694
1694
|
}
|
|
1695
1695
|
);
|
|
1696
|
-
},
|
|
1697
|
-
formError:
|
|
1696
|
+
}, hs = "FormError-module__formError___kaUBn", _s = {
|
|
1697
|
+
formError: hs
|
|
1698
1698
|
}, gs = ({
|
|
1699
1699
|
children: e,
|
|
1700
1700
|
className: r,
|
|
@@ -1704,20 +1704,19 @@ const uo = us, cs = "FormLabel-module__label___0M-fo", ds = "FormLabel-module__d
|
|
|
1704
1704
|
color: q().colors.error,
|
|
1705
1705
|
...t
|
|
1706
1706
|
};
|
|
1707
|
-
return /* @__PURE__ */
|
|
1707
|
+
return /* @__PURE__ */ w(
|
|
1708
1708
|
"div",
|
|
1709
1709
|
{
|
|
1710
|
-
className: `${
|
|
1710
|
+
className: `${_s.formError} ${r || ""}`.trim(),
|
|
1711
1711
|
style: n,
|
|
1712
1712
|
role: "alert",
|
|
1713
1713
|
"aria-live": "polite",
|
|
1714
1714
|
children: e
|
|
1715
1715
|
}
|
|
1716
1716
|
);
|
|
1717
|
-
},
|
|
1718
|
-
formGroup:
|
|
1719
|
-
inputWrapper:
|
|
1720
|
-
error: vs,
|
|
1717
|
+
}, ps = "FormGroup-module__formGroup___aVI-B", vs = "FormGroup-module__inputWrapper___429QE", bs = "FormGroup-module__disabled___W-tJ0", Ss = "FormGroup-module__required___mO3xA", _e = {
|
|
1718
|
+
formGroup: ps,
|
|
1719
|
+
inputWrapper: vs,
|
|
1721
1720
|
disabled: bs,
|
|
1722
1721
|
required: Ss
|
|
1723
1722
|
}, xs = ({
|
|
@@ -1733,11 +1732,11 @@ const uo = us, cs = "FormLabel-module__label___0M-fo", ds = "FormLabel-module__d
|
|
|
1733
1732
|
labelProps: h
|
|
1734
1733
|
}) => {
|
|
1735
1734
|
const f = [
|
|
1736
|
-
|
|
1737
|
-
s ?
|
|
1738
|
-
o ?
|
|
1735
|
+
_e.formGroup,
|
|
1736
|
+
s ? _e.error : "",
|
|
1737
|
+
o ? _e.disabled : "",
|
|
1739
1738
|
l
|
|
1740
|
-
].filter(Boolean).join(" "),
|
|
1739
|
+
].filter(Boolean).join(" "), _ = V.Children.map(e, (y) => {
|
|
1741
1740
|
if (V.isValidElement(y)) {
|
|
1742
1741
|
const x = {};
|
|
1743
1742
|
if (o && y.props.disabled === void 0 && (x.disabled = !0), s && y.props.error === void 0 && (x.error = !0), t && y.props.id === void 0 && (x.id = t), Object.keys(x).length > 0)
|
|
@@ -1747,7 +1746,7 @@ const uo = us, cs = "FormLabel-module__label___0M-fo", ds = "FormLabel-module__d
|
|
|
1747
1746
|
});
|
|
1748
1747
|
return /* @__PURE__ */ ne("div", { className: f, style: d, children: [
|
|
1749
1748
|
r && /* @__PURE__ */ ne(
|
|
1750
|
-
|
|
1749
|
+
ms,
|
|
1751
1750
|
{
|
|
1752
1751
|
htmlFor: t,
|
|
1753
1752
|
disabled: o,
|
|
@@ -1755,12 +1754,12 @@ const uo = us, cs = "FormLabel-module__label___0M-fo", ds = "FormLabel-module__d
|
|
|
1755
1754
|
...h,
|
|
1756
1755
|
children: [
|
|
1757
1756
|
r,
|
|
1758
|
-
a && /* @__PURE__ */
|
|
1757
|
+
a && /* @__PURE__ */ w("span", { className: _e.required, "aria-label": "required", children: " *" })
|
|
1759
1758
|
]
|
|
1760
1759
|
}
|
|
1761
1760
|
),
|
|
1762
|
-
/* @__PURE__ */
|
|
1763
|
-
s && n && /* @__PURE__ */
|
|
1761
|
+
/* @__PURE__ */ w("div", { className: _e.inputWrapper, children: _ }),
|
|
1762
|
+
s && n && /* @__PURE__ */ w(gs, { children: n })
|
|
1764
1763
|
] });
|
|
1765
1764
|
};
|
|
1766
1765
|
function Se({
|
|
@@ -1773,21 +1772,21 @@ function Se({
|
|
|
1773
1772
|
className: a,
|
|
1774
1773
|
style: l
|
|
1775
1774
|
}) {
|
|
1776
|
-
const { control: d, formState: h } =
|
|
1775
|
+
const { control: d, formState: h } = cs(), {
|
|
1777
1776
|
field: f,
|
|
1778
|
-
fieldState: { error:
|
|
1779
|
-
} =
|
|
1777
|
+
fieldState: { error: _ }
|
|
1778
|
+
} = Or({
|
|
1780
1779
|
name: e,
|
|
1781
1780
|
control: d,
|
|
1782
1781
|
rules: n
|
|
1783
1782
|
});
|
|
1784
|
-
return /* @__PURE__ */
|
|
1783
|
+
return /* @__PURE__ */ w(
|
|
1785
1784
|
xs,
|
|
1786
1785
|
{
|
|
1787
1786
|
label: r,
|
|
1788
1787
|
name: e,
|
|
1789
|
-
error: !!
|
|
1790
|
-
errorMessage:
|
|
1788
|
+
error: !!_,
|
|
1789
|
+
errorMessage: _ == null ? void 0 : _.message,
|
|
1791
1790
|
disabled: o,
|
|
1792
1791
|
required: t,
|
|
1793
1792
|
className: a,
|
|
@@ -1797,16 +1796,16 @@ function Se({
|
|
|
1797
1796
|
onChange: f.onChange,
|
|
1798
1797
|
onBlur: f.onBlur,
|
|
1799
1798
|
name: f.name,
|
|
1800
|
-
error: !!
|
|
1799
|
+
error: !!_
|
|
1801
1800
|
})
|
|
1802
1801
|
}
|
|
1803
1802
|
);
|
|
1804
1803
|
}
|
|
1805
|
-
const Fs = "Input-module__input___WjT81", Vs = "Input-module__sizeSmall___NFvsi",
|
|
1804
|
+
const Fs = "Input-module__input___WjT81", Vs = "Input-module__sizeSmall___NFvsi", ks = "Input-module__sizeDefault___AxPA0", Ie = {
|
|
1806
1805
|
input: Fs,
|
|
1807
1806
|
sizeSmall: Vs,
|
|
1808
|
-
sizeDefault:
|
|
1809
|
-
},
|
|
1807
|
+
sizeDefault: ks
|
|
1808
|
+
}, ws = ({
|
|
1810
1809
|
color: e = "#000",
|
|
1811
1810
|
disabled: r = !1,
|
|
1812
1811
|
fontSize: t = "1em",
|
|
@@ -1829,10 +1828,10 @@ const Fs = "Input-module__input___WjT81", Vs = "Input-module__sizeSmall___NFvsi"
|
|
|
1829
1828
|
size: d,
|
|
1830
1829
|
style: h,
|
|
1831
1830
|
type: f = "text",
|
|
1832
|
-
value:
|
|
1831
|
+
value: _ = "",
|
|
1833
1832
|
...y
|
|
1834
1833
|
}) => {
|
|
1835
|
-
const x = q(),
|
|
1834
|
+
const x = q(), z = x.colors.error, F = t ? z : e || x.colors.primary, C = ws({
|
|
1836
1835
|
color: F,
|
|
1837
1836
|
disabled: r,
|
|
1838
1837
|
fontSize: s || x.fonts.size,
|
|
@@ -1848,7 +1847,7 @@ const Fs = "Input-module__input___WjT81", Vs = "Input-module__sizeSmall___NFvsi"
|
|
|
1848
1847
|
Ie.input,
|
|
1849
1848
|
d === "small" ? Ie.sizeSmall : Ie.sizeDefault
|
|
1850
1849
|
].filter(Boolean).join(" ");
|
|
1851
|
-
return /* @__PURE__ */
|
|
1850
|
+
return /* @__PURE__ */ w(
|
|
1852
1851
|
"input",
|
|
1853
1852
|
{
|
|
1854
1853
|
className: b,
|
|
@@ -1858,12 +1857,12 @@ const Fs = "Input-module__input___WjT81", Vs = "Input-module__sizeSmall___NFvsi"
|
|
|
1858
1857
|
placeholder: a,
|
|
1859
1858
|
style: P,
|
|
1860
1859
|
type: f,
|
|
1861
|
-
value:
|
|
1860
|
+
value: _,
|
|
1862
1861
|
...y
|
|
1863
1862
|
}
|
|
1864
1863
|
);
|
|
1865
1864
|
};
|
|
1866
|
-
function
|
|
1865
|
+
function mo({
|
|
1867
1866
|
name: e,
|
|
1868
1867
|
label: r,
|
|
1869
1868
|
required: t,
|
|
@@ -1873,7 +1872,7 @@ function co({
|
|
|
1873
1872
|
style: a,
|
|
1874
1873
|
...l
|
|
1875
1874
|
}) {
|
|
1876
|
-
return /* @__PURE__ */
|
|
1875
|
+
return /* @__PURE__ */ w(
|
|
1877
1876
|
Se,
|
|
1878
1877
|
{
|
|
1879
1878
|
name: e,
|
|
@@ -1883,11 +1882,11 @@ function co({
|
|
|
1883
1882
|
disabled: n,
|
|
1884
1883
|
className: o,
|
|
1885
1884
|
style: a,
|
|
1886
|
-
children: ({ value: d, onChange: h, onBlur: f, name:
|
|
1885
|
+
children: ({ value: d, onChange: h, onBlur: f, name: _, error: y }) => /* @__PURE__ */ w(
|
|
1887
1886
|
Cs,
|
|
1888
1887
|
{
|
|
1889
1888
|
...l,
|
|
1890
|
-
name:
|
|
1889
|
+
name: _,
|
|
1891
1890
|
value: d || "",
|
|
1892
1891
|
onChange: (x) => h(x.target.value),
|
|
1893
1892
|
onBlur: f,
|
|
@@ -1897,10 +1896,10 @@ function co({
|
|
|
1897
1896
|
}
|
|
1898
1897
|
);
|
|
1899
1898
|
}
|
|
1900
|
-
const Es = "Textarea-module__textarea___Z-y6g",
|
|
1899
|
+
const Es = "Textarea-module__textarea___Z-y6g", zs = "Textarea-module__sizeSmall___HHFEM", As = "Textarea-module__sizeDefault___LL2Uc", Be = {
|
|
1901
1900
|
textarea: Es,
|
|
1902
|
-
sizeSmall:
|
|
1903
|
-
sizeDefault:
|
|
1901
|
+
sizeSmall: zs,
|
|
1902
|
+
sizeDefault: As
|
|
1904
1903
|
}, Ds = ({
|
|
1905
1904
|
color: e = "#000",
|
|
1906
1905
|
disabled: r = !1,
|
|
@@ -1922,10 +1921,10 @@ const Es = "Textarea-module__textarea___Z-y6g", As = "Textarea-module__sizeSmall
|
|
|
1922
1921
|
rows: d = 3,
|
|
1923
1922
|
size: h,
|
|
1924
1923
|
style: f,
|
|
1925
|
-
value:
|
|
1924
|
+
value: _ = "",
|
|
1926
1925
|
...y
|
|
1927
1926
|
}) => {
|
|
1928
|
-
const x = q(),
|
|
1927
|
+
const x = q(), z = x.colors.error, F = t ? z : e || x.colors.primary, C = Ds({
|
|
1929
1928
|
color: F,
|
|
1930
1929
|
disabled: r,
|
|
1931
1930
|
placeholderOpacity: l
|
|
@@ -1938,8 +1937,8 @@ const Es = "Textarea-module__textarea___Z-y6g", As = "Textarea-module__sizeSmall
|
|
|
1938
1937
|
opacity: ${C.placeholderOpacity};
|
|
1939
1938
|
}
|
|
1940
1939
|
`, document.head.appendChild(E), () => {
|
|
1941
|
-
const
|
|
1942
|
-
|
|
1940
|
+
const k = document.getElementById(P);
|
|
1941
|
+
k && k.remove();
|
|
1943
1942
|
};
|
|
1944
1943
|
}, [P, C.placeholderOpacity]);
|
|
1945
1944
|
const b = {
|
|
@@ -1948,27 +1947,27 @@ const Es = "Textarea-module__textarea___Z-y6g", As = "Textarea-module__sizeSmall
|
|
|
1948
1947
|
fontSize: s || x.fonts.size,
|
|
1949
1948
|
opacity: C.opacity,
|
|
1950
1949
|
...f
|
|
1951
|
-
},
|
|
1950
|
+
}, A = [
|
|
1952
1951
|
Be.textarea,
|
|
1953
1952
|
h === "small" ? Be.sizeSmall : Be.sizeDefault,
|
|
1954
1953
|
P
|
|
1955
1954
|
].filter(Boolean).join(" ");
|
|
1956
|
-
return /* @__PURE__ */
|
|
1955
|
+
return /* @__PURE__ */ w(
|
|
1957
1956
|
"textarea",
|
|
1958
1957
|
{
|
|
1959
|
-
className:
|
|
1958
|
+
className: A,
|
|
1960
1959
|
disabled: r,
|
|
1961
1960
|
name: n,
|
|
1962
1961
|
onChange: o,
|
|
1963
1962
|
placeholder: a,
|
|
1964
1963
|
rows: d,
|
|
1965
1964
|
style: b,
|
|
1966
|
-
value:
|
|
1965
|
+
value: _,
|
|
1967
1966
|
...y
|
|
1968
1967
|
}
|
|
1969
1968
|
);
|
|
1970
1969
|
};
|
|
1971
|
-
function
|
|
1970
|
+
function ho({
|
|
1972
1971
|
name: e,
|
|
1973
1972
|
label: r,
|
|
1974
1973
|
required: t,
|
|
@@ -1978,7 +1977,7 @@ function fo({
|
|
|
1978
1977
|
style: a,
|
|
1979
1978
|
...l
|
|
1980
1979
|
}) {
|
|
1981
|
-
return /* @__PURE__ */
|
|
1980
|
+
return /* @__PURE__ */ w(
|
|
1982
1981
|
Se,
|
|
1983
1982
|
{
|
|
1984
1983
|
name: e,
|
|
@@ -1988,11 +1987,11 @@ function fo({
|
|
|
1988
1987
|
disabled: n,
|
|
1989
1988
|
className: o,
|
|
1990
1989
|
style: a,
|
|
1991
|
-
children: ({ value: d, onChange: h, onBlur: f, name:
|
|
1990
|
+
children: ({ value: d, onChange: h, onBlur: f, name: _, error: y }) => /* @__PURE__ */ w(
|
|
1992
1991
|
Ps,
|
|
1993
1992
|
{
|
|
1994
1993
|
...l,
|
|
1995
|
-
name:
|
|
1994
|
+
name: _,
|
|
1996
1995
|
value: d || "",
|
|
1997
1996
|
onChange: (x) => h(x.target.value),
|
|
1998
1997
|
onBlur: f,
|
|
@@ -2045,10 +2044,10 @@ const Rs = "Select-module__select___cjdcr", Ns = "Select-module__sizeSmall___i1q
|
|
|
2045
2044
|
size: d,
|
|
2046
2045
|
style: h,
|
|
2047
2046
|
value: f = "",
|
|
2048
|
-
...
|
|
2047
|
+
..._
|
|
2049
2048
|
}) => {
|
|
2050
|
-
const y = q(), x = y.colors.error,
|
|
2051
|
-
color:
|
|
2049
|
+
const y = q(), x = y.colors.error, z = s ? x : r || y.colors.primary, F = Ms({
|
|
2050
|
+
color: z,
|
|
2052
2051
|
disabled: t
|
|
2053
2052
|
}), C = {
|
|
2054
2053
|
backgroundImage: F.backgroundImage,
|
|
@@ -2075,15 +2074,15 @@ const Rs = "Select-module__select___cjdcr", Ns = "Select-module__sizeSmall___i1q
|
|
|
2075
2074
|
onChange: a,
|
|
2076
2075
|
style: C,
|
|
2077
2076
|
value: f,
|
|
2078
|
-
...
|
|
2077
|
+
..._,
|
|
2079
2078
|
children: [
|
|
2080
|
-
l !== "" && /* @__PURE__ */
|
|
2079
|
+
l !== "" && /* @__PURE__ */ w("option", { disabled: !0, value: "", children: l }),
|
|
2081
2080
|
e
|
|
2082
2081
|
]
|
|
2083
2082
|
}
|
|
2084
2083
|
);
|
|
2085
2084
|
};
|
|
2086
|
-
function
|
|
2085
|
+
function _o({
|
|
2087
2086
|
name: e,
|
|
2088
2087
|
label: r,
|
|
2089
2088
|
required: t,
|
|
@@ -2094,7 +2093,7 @@ function yo({
|
|
|
2094
2093
|
children: l,
|
|
2095
2094
|
...d
|
|
2096
2095
|
}) {
|
|
2097
|
-
return /* @__PURE__ */
|
|
2096
|
+
return /* @__PURE__ */ w(
|
|
2098
2097
|
Se,
|
|
2099
2098
|
{
|
|
2100
2099
|
name: e,
|
|
@@ -2104,14 +2103,14 @@ function yo({
|
|
|
2104
2103
|
disabled: n,
|
|
2105
2104
|
className: o,
|
|
2106
2105
|
style: a,
|
|
2107
|
-
children: ({ value: h, onChange: f, onBlur:
|
|
2106
|
+
children: ({ value: h, onChange: f, onBlur: _, name: y, error: x }) => /* @__PURE__ */ w(
|
|
2108
2107
|
Ts,
|
|
2109
2108
|
{
|
|
2110
2109
|
...d,
|
|
2111
2110
|
name: y,
|
|
2112
2111
|
value: h || "",
|
|
2113
|
-
onChange: (
|
|
2114
|
-
onBlur:
|
|
2112
|
+
onChange: (z) => f(z.target.value),
|
|
2113
|
+
onBlur: _,
|
|
2115
2114
|
error: x,
|
|
2116
2115
|
children: l
|
|
2117
2116
|
}
|
|
@@ -2119,7 +2118,7 @@ function yo({
|
|
|
2119
2118
|
}
|
|
2120
2119
|
);
|
|
2121
2120
|
}
|
|
2122
|
-
function
|
|
2121
|
+
function go({
|
|
2123
2122
|
name: e,
|
|
2124
2123
|
required: r,
|
|
2125
2124
|
rules: t,
|
|
@@ -2128,7 +2127,7 @@ function mo({
|
|
|
2128
2127
|
style: o,
|
|
2129
2128
|
...a
|
|
2130
2129
|
}) {
|
|
2131
|
-
return /* @__PURE__ */
|
|
2130
|
+
return /* @__PURE__ */ w(
|
|
2132
2131
|
Se,
|
|
2133
2132
|
{
|
|
2134
2133
|
name: e,
|
|
@@ -2137,13 +2136,13 @@ function mo({
|
|
|
2137
2136
|
disabled: s,
|
|
2138
2137
|
className: n,
|
|
2139
2138
|
style: o,
|
|
2140
|
-
children: ({ value: l, onChange: d, name: h, error: f }) => /* @__PURE__ */
|
|
2139
|
+
children: ({ value: l, onChange: d, name: h, error: f }) => /* @__PURE__ */ w(
|
|
2141
2140
|
Ar,
|
|
2142
2141
|
{
|
|
2143
2142
|
...a,
|
|
2144
2143
|
name: h,
|
|
2145
2144
|
checked: !!l,
|
|
2146
|
-
onChange: (
|
|
2145
|
+
onChange: (_) => d(_.target.checked),
|
|
2147
2146
|
error: f
|
|
2148
2147
|
}
|
|
2149
2148
|
)
|
|
@@ -2173,9 +2172,9 @@ const Ls = "Radio-module__container___AQxhk", Is = "Radio-module__svg___zl5kF",
|
|
|
2173
2172
|
name: d,
|
|
2174
2173
|
onChange: h,
|
|
2175
2174
|
style: f,
|
|
2176
|
-
...
|
|
2175
|
+
..._
|
|
2177
2176
|
}) => {
|
|
2178
|
-
const y = q(), x = o ||
|
|
2177
|
+
const y = q(), x = o || Bt(), z = y.colors.error, F = s ? z : r || y.colors.primary, C = $s({
|
|
2179
2178
|
color: F,
|
|
2180
2179
|
disabled: t
|
|
2181
2180
|
}), P = (B) => {
|
|
@@ -2185,13 +2184,13 @@ const Ls = "Radio-module__container___AQxhk", Is = "Radio-module__svg___zl5kF",
|
|
|
2185
2184
|
fontSize: n || y.fonts.size,
|
|
2186
2185
|
opacity: C.opacity,
|
|
2187
2186
|
...f
|
|
2188
|
-
},
|
|
2187
|
+
}, A = {
|
|
2189
2188
|
width: n || y.fonts.size
|
|
2190
2189
|
}, E = {
|
|
2191
2190
|
fill: "transparent",
|
|
2192
2191
|
strokeWidth: "12.5",
|
|
2193
2192
|
stroke: C.radioColor
|
|
2194
|
-
},
|
|
2193
|
+
}, k = {
|
|
2195
2194
|
fill: C.radioColor
|
|
2196
2195
|
}, I = {
|
|
2197
2196
|
color: C.radioColor,
|
|
@@ -2199,8 +2198,8 @@ const Ls = "Radio-module__container___AQxhk", Is = "Radio-module__svg___zl5kF",
|
|
|
2199
2198
|
fontSize: n || y.fonts.size,
|
|
2200
2199
|
...l
|
|
2201
2200
|
};
|
|
2202
|
-
return /* @__PURE__ */ ne("div", { className: Ue.container, style: b, ...
|
|
2203
|
-
/* @__PURE__ */
|
|
2201
|
+
return /* @__PURE__ */ ne("div", { className: Ue.container, style: b, ..._, children: [
|
|
2202
|
+
/* @__PURE__ */ w(
|
|
2204
2203
|
"input",
|
|
2205
2204
|
{
|
|
2206
2205
|
id: x,
|
|
@@ -2219,9 +2218,9 @@ const Ls = "Radio-module__container___AQxhk", Is = "Radio-module__svg___zl5kF",
|
|
|
2219
2218
|
viewBox: "0 0 100 100",
|
|
2220
2219
|
onClick: () => P({ target: { checked: !e, name: d, type: "radio" } }),
|
|
2221
2220
|
className: Ue.svg,
|
|
2222
|
-
style:
|
|
2221
|
+
style: A,
|
|
2223
2222
|
children: [
|
|
2224
|
-
/* @__PURE__ */
|
|
2223
|
+
/* @__PURE__ */ w(
|
|
2225
2224
|
"circle",
|
|
2226
2225
|
{
|
|
2227
2226
|
cx: "50",
|
|
@@ -2231,19 +2230,19 @@ const Ls = "Radio-module__container___AQxhk", Is = "Radio-module__svg___zl5kF",
|
|
|
2231
2230
|
style: E
|
|
2232
2231
|
}
|
|
2233
2232
|
),
|
|
2234
|
-
e && /* @__PURE__ */
|
|
2233
|
+
e && /* @__PURE__ */ w(
|
|
2235
2234
|
"circle",
|
|
2236
2235
|
{
|
|
2237
2236
|
cx: "50",
|
|
2238
2237
|
cy: "50",
|
|
2239
2238
|
r: "25",
|
|
2240
|
-
style:
|
|
2239
|
+
style: k
|
|
2241
2240
|
}
|
|
2242
2241
|
)
|
|
2243
2242
|
]
|
|
2244
2243
|
}
|
|
2245
2244
|
),
|
|
2246
|
-
a && /* @__PURE__ */
|
|
2245
|
+
a && /* @__PURE__ */ w(
|
|
2247
2246
|
"label",
|
|
2248
2247
|
{
|
|
2249
2248
|
htmlFor: x,
|
|
@@ -2254,7 +2253,7 @@ const Ls = "Radio-module__container___AQxhk", Is = "Radio-module__svg___zl5kF",
|
|
|
2254
2253
|
)
|
|
2255
2254
|
] });
|
|
2256
2255
|
};
|
|
2257
|
-
function
|
|
2256
|
+
function po({
|
|
2258
2257
|
name: e,
|
|
2259
2258
|
label: r,
|
|
2260
2259
|
required: t,
|
|
@@ -2265,7 +2264,7 @@ function ho({
|
|
|
2265
2264
|
value: l,
|
|
2266
2265
|
...d
|
|
2267
2266
|
}) {
|
|
2268
|
-
return /* @__PURE__ */
|
|
2267
|
+
return /* @__PURE__ */ w(
|
|
2269
2268
|
Se,
|
|
2270
2269
|
{
|
|
2271
2270
|
name: e,
|
|
@@ -2274,11 +2273,11 @@ function ho({
|
|
|
2274
2273
|
disabled: n,
|
|
2275
2274
|
className: o,
|
|
2276
2275
|
style: a,
|
|
2277
|
-
children: ({ value: h, onChange: f, name:
|
|
2276
|
+
children: ({ value: h, onChange: f, name: _, error: y }) => /* @__PURE__ */ w(
|
|
2278
2277
|
Us,
|
|
2279
2278
|
{
|
|
2280
2279
|
...d,
|
|
2281
|
-
name:
|
|
2280
|
+
name: _,
|
|
2282
2281
|
checked: h === l,
|
|
2283
2282
|
onChange: () => f(l),
|
|
2284
2283
|
error: y,
|
|
@@ -2288,13 +2287,13 @@ function ho({
|
|
|
2288
2287
|
}
|
|
2289
2288
|
);
|
|
2290
2289
|
}
|
|
2291
|
-
const Hs = "Hamburger-module__hamburger___Tf4-t", js = "Hamburger-module__line___gybZM", Ws = "Hamburger-module__open___gRswh",
|
|
2290
|
+
const Hs = "Hamburger-module__hamburger___Tf4-t", js = "Hamburger-module__line___gybZM", Ws = "Hamburger-module__open___gRswh", ge = {
|
|
2292
2291
|
hamburger: Hs,
|
|
2293
2292
|
line: js,
|
|
2294
2293
|
open: Ws
|
|
2295
2294
|
}, qs = ({ compact: e, color: r, visible: t, borderRadius: s }) => {
|
|
2296
2295
|
const n = q();
|
|
2297
|
-
return
|
|
2296
|
+
return Tt(() => {
|
|
2298
2297
|
const o = e ? { right: ".5em" } : {};
|
|
2299
2298
|
return {
|
|
2300
2299
|
"--hamburger-border-radius": s || n.borderRadius || "10px",
|
|
@@ -2303,7 +2302,7 @@ const Hs = "Hamburger-module__hamburger___Tf4-t", js = "Hamburger-module__line__
|
|
|
2303
2302
|
...o
|
|
2304
2303
|
};
|
|
2305
2304
|
}, [r, t, e, s, n.borderRadius]);
|
|
2306
|
-
},
|
|
2305
|
+
}, Zs = ({
|
|
2307
2306
|
visible: e,
|
|
2308
2307
|
compact: r,
|
|
2309
2308
|
color: t,
|
|
@@ -2319,8 +2318,8 @@ const Hs = "Hamburger-module__hamburger___Tf4-t", js = "Hamburger-module__line__
|
|
|
2319
2318
|
visible: e,
|
|
2320
2319
|
borderRadius: l
|
|
2321
2320
|
}), h = [
|
|
2322
|
-
|
|
2323
|
-
n ?
|
|
2321
|
+
ge.hamburger,
|
|
2322
|
+
n ? ge.open : ""
|
|
2324
2323
|
].filter(Boolean).join(" ");
|
|
2325
2324
|
return /* @__PURE__ */ ne(
|
|
2326
2325
|
"button",
|
|
@@ -2333,16 +2332,16 @@ const Hs = "Hamburger-module__hamburger___Tf4-t", js = "Hamburger-module__line__
|
|
|
2333
2332
|
"aria-expanded": n,
|
|
2334
2333
|
...a,
|
|
2335
2334
|
children: [
|
|
2336
|
-
/* @__PURE__ */
|
|
2337
|
-
/* @__PURE__ */
|
|
2338
|
-
/* @__PURE__ */
|
|
2335
|
+
/* @__PURE__ */ w("div", { className: ge.line }),
|
|
2336
|
+
/* @__PURE__ */ w("div", { className: ge.line }),
|
|
2337
|
+
/* @__PURE__ */ w("div", { className: ge.line })
|
|
2339
2338
|
]
|
|
2340
2339
|
}
|
|
2341
2340
|
);
|
|
2342
|
-
},
|
|
2343
|
-
header:
|
|
2341
|
+
}, Gs = "Header-module__header___RUooH", Qs = "Header-module__container___t68M9", Ot = {
|
|
2342
|
+
header: Gs,
|
|
2344
2343
|
container: Qs
|
|
2345
|
-
},
|
|
2344
|
+
}, Ks = ({
|
|
2346
2345
|
isSmallScreen: e = !1,
|
|
2347
2346
|
maxWidth: r,
|
|
2348
2347
|
paddingSm: t,
|
|
@@ -2355,15 +2354,15 @@ const Hs = "Hamburger-module__hamburger___Tf4-t", js = "Hamburger-module__line__
|
|
|
2355
2354
|
"--header-padding": e ? t || o.layout.wrapperPaddingSm : s || o.layout.wrapperPadding,
|
|
2356
2355
|
"--header-font-size": e ? "0.75rem" : n || o.fonts.size
|
|
2357
2356
|
};
|
|
2358
|
-
},
|
|
2357
|
+
}, Qe = (e) => {
|
|
2359
2358
|
const r = typeof window < "u" && typeof window.matchMedia == "function";
|
|
2360
|
-
return
|
|
2359
|
+
return pr((o) => {
|
|
2361
2360
|
if (!r) return () => {
|
|
2362
2361
|
};
|
|
2363
2362
|
const a = window.matchMedia(e);
|
|
2364
2363
|
return a.addEventListener("change", o), () => a.removeEventListener("change", o);
|
|
2365
2364
|
}, () => r ? window.matchMedia(e).matches : !1, () => !1);
|
|
2366
|
-
},
|
|
2365
|
+
}, vo = ({
|
|
2367
2366
|
children: e,
|
|
2368
2367
|
breakPointSm: r,
|
|
2369
2368
|
maxWidth: t,
|
|
@@ -2374,16 +2373,16 @@ const Hs = "Hamburger-module__hamburger___Tf4-t", js = "Hamburger-module__line__
|
|
|
2374
2373
|
headerProps: l = {},
|
|
2375
2374
|
headerRef: d
|
|
2376
2375
|
}) => {
|
|
2377
|
-
const h = q(),
|
|
2378
|
-
isSmallScreen:
|
|
2376
|
+
const h = q(), _ = (r || h.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/), y = _ ? parseInt(_[1], 10) - 1 : 474, x = _ ? _[2] : "px", z = Qe(`(max-width: ${y}${x})`), F = Ks({
|
|
2377
|
+
isSmallScreen: z,
|
|
2379
2378
|
maxWidth: t,
|
|
2380
2379
|
paddingSm: s,
|
|
2381
2380
|
padding: n,
|
|
2382
2381
|
fontSize: o
|
|
2383
2382
|
});
|
|
2384
|
-
return /* @__PURE__ */
|
|
2385
|
-
},
|
|
2386
|
-
nav:
|
|
2383
|
+
return /* @__PURE__ */ w("header", { ref: d, className: Ot.header, ...l, children: /* @__PURE__ */ w("div", { className: Ot.container, style: { ...F, ...a }, children: e }) });
|
|
2384
|
+
}, Js = "ResponsiveNav-module__nav___xOfv5", Ys = "ResponsiveNav-module__navMobile___h795P", Xs = "ResponsiveNav-module__open___WDCAf", eo = "ResponsiveNav-module__navDesktop___9wscZ", Ce = {
|
|
2385
|
+
nav: Js,
|
|
2387
2386
|
navMobile: Ys,
|
|
2388
2387
|
open: Xs,
|
|
2389
2388
|
navDesktop: eo
|
|
@@ -2397,7 +2396,7 @@ const Hs = "Hamburger-module__hamburger___Tf4-t", js = "Hamburger-module__line__
|
|
|
2397
2396
|
mobileButtonHoverColor: a
|
|
2398
2397
|
}) => {
|
|
2399
2398
|
const l = q();
|
|
2400
|
-
return
|
|
2399
|
+
return Tt(() => ({
|
|
2401
2400
|
...e ? {
|
|
2402
2401
|
"--mobile-nav-background": t || l.colors.accent,
|
|
2403
2402
|
"--mobile-nav-color": s || l.colors.primary,
|
|
@@ -2417,11 +2416,11 @@ const Hs = "Hamburger-module__hamburger___Tf4-t", js = "Hamburger-module__line__
|
|
|
2417
2416
|
r
|
|
2418
2417
|
]);
|
|
2419
2418
|
};
|
|
2420
|
-
function
|
|
2419
|
+
function Mt(e) {
|
|
2421
2420
|
const t = parseInt(e) - 1, s = e.replace(/[0-9]/g, "");
|
|
2422
2421
|
return { maxWidth: t, unit: s };
|
|
2423
2422
|
}
|
|
2424
|
-
const
|
|
2423
|
+
const bo = ({
|
|
2425
2424
|
breakPointMd: e,
|
|
2426
2425
|
breakPointSm: r,
|
|
2427
2426
|
children: t,
|
|
@@ -2433,8 +2432,8 @@ const _o = ({
|
|
|
2433
2432
|
style: d,
|
|
2434
2433
|
navProps: h
|
|
2435
2434
|
}) => {
|
|
2436
|
-
const [f,
|
|
2437
|
-
isMobile:
|
|
2435
|
+
const [f, _] = Je(!1), y = _t(null), x = _t(null), z = q(), F = e || z.breakpoints.md, C = r || z.breakpoints.sm, { maxWidth: P, unit: b } = Mt(F), { maxWidth: A, unit: E } = Mt(C), k = Qe(`(max-width: ${P}${b})`), I = Qe(`(max-width: ${A}${E})`), B = to({
|
|
2436
|
+
isMobile: k,
|
|
2438
2437
|
isCompact: I,
|
|
2439
2438
|
mobileBackground: s,
|
|
2440
2439
|
mobileColor: n,
|
|
@@ -2442,40 +2441,40 @@ const _o = ({
|
|
|
2442
2441
|
mobileActiveColor: a,
|
|
2443
2442
|
mobileButtonHoverColor: l
|
|
2444
2443
|
});
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
}, [
|
|
2448
|
-
const
|
|
2449
|
-
!x.current || x.current.contains(re.target) || y.current && y.current.contains(re.target) ||
|
|
2444
|
+
je(() => {
|
|
2445
|
+
k || _(!1);
|
|
2446
|
+
}, [k]), je(() => {
|
|
2447
|
+
const Z = (re) => {
|
|
2448
|
+
!x.current || x.current.contains(re.target) || y.current && y.current.contains(re.target) || _(!1);
|
|
2450
2449
|
};
|
|
2451
|
-
return document.addEventListener("mousedown",
|
|
2452
|
-
document.removeEventListener("mousedown",
|
|
2450
|
+
return document.addEventListener("mousedown", Z), () => {
|
|
2451
|
+
document.removeEventListener("mousedown", Z);
|
|
2453
2452
|
};
|
|
2454
|
-
}, [y, x,
|
|
2453
|
+
}, [y, x, _]);
|
|
2455
2454
|
const ie = [
|
|
2456
2455
|
Ce.nav,
|
|
2457
|
-
|
|
2458
|
-
|
|
2456
|
+
k ? Ce.navMobile : Ce.navDesktop,
|
|
2457
|
+
k && f ? Ce.open : ""
|
|
2459
2458
|
].filter(Boolean).join(" ");
|
|
2460
|
-
return /* @__PURE__ */ ne(
|
|
2461
|
-
/* @__PURE__ */
|
|
2462
|
-
|
|
2459
|
+
return /* @__PURE__ */ ne(Ke, { children: [
|
|
2460
|
+
/* @__PURE__ */ w(
|
|
2461
|
+
Zs,
|
|
2463
2462
|
{
|
|
2464
2463
|
hamburgerRef: y,
|
|
2465
|
-
visible:
|
|
2464
|
+
visible: k,
|
|
2466
2465
|
compact: I,
|
|
2467
2466
|
open: f,
|
|
2468
|
-
setOpen:
|
|
2467
|
+
setOpen: _
|
|
2469
2468
|
}
|
|
2470
2469
|
),
|
|
2471
|
-
/* @__PURE__ */
|
|
2470
|
+
/* @__PURE__ */ w(
|
|
2472
2471
|
"nav",
|
|
2473
2472
|
{
|
|
2474
2473
|
ref: x,
|
|
2475
2474
|
className: ie,
|
|
2476
2475
|
style: { ...B, ...d },
|
|
2477
2476
|
...h,
|
|
2478
|
-
children: typeof t == "function" ? t({ setOpen:
|
|
2477
|
+
children: typeof t == "function" ? t({ setOpen: _ }) : t
|
|
2479
2478
|
}
|
|
2480
2479
|
)
|
|
2481
2480
|
] });
|
|
@@ -2485,8 +2484,8 @@ const _o = ({
|
|
|
2485
2484
|
innerColor: t,
|
|
2486
2485
|
fullScreen: s = !0
|
|
2487
2486
|
}) => {
|
|
2488
|
-
const n = q(), o = r || n.colors.primary, a = t || n.colors.secondary, l = /* @__PURE__ */ ne(
|
|
2489
|
-
/* @__PURE__ */
|
|
2487
|
+
const n = q(), o = r || n.colors.primary, a = t || n.colors.secondary, l = /* @__PURE__ */ ne(Ke, { children: [
|
|
2488
|
+
/* @__PURE__ */ w(
|
|
2490
2489
|
"div",
|
|
2491
2490
|
{
|
|
2492
2491
|
style: {
|
|
@@ -2499,14 +2498,14 @@ const _o = ({
|
|
|
2499
2498
|
}
|
|
2500
2499
|
}
|
|
2501
2500
|
),
|
|
2502
|
-
/* @__PURE__ */
|
|
2501
|
+
/* @__PURE__ */ w("style", { children: `
|
|
2503
2502
|
@keyframes spin {
|
|
2504
2503
|
0% { transform: rotate(0deg); }
|
|
2505
2504
|
100% { transform: rotate(360deg); }
|
|
2506
2505
|
}
|
|
2507
2506
|
` })
|
|
2508
2507
|
] });
|
|
2509
|
-
return s ? /* @__PURE__ */
|
|
2508
|
+
return s ? /* @__PURE__ */ w(
|
|
2510
2509
|
"div",
|
|
2511
2510
|
{
|
|
2512
2511
|
style: {
|
|
@@ -2519,38 +2518,56 @@ const _o = ({
|
|
|
2519
2518
|
children: l
|
|
2520
2519
|
}
|
|
2521
2520
|
) : l;
|
|
2522
|
-
},
|
|
2521
|
+
}, So = ({ children: e, loadingComponent: r }) => {
|
|
2523
2522
|
const [t, s] = Je(!1);
|
|
2524
|
-
return
|
|
2523
|
+
return je(() => {
|
|
2525
2524
|
requestAnimationFrame(() => {
|
|
2526
2525
|
s(!0);
|
|
2527
2526
|
});
|
|
2528
|
-
}, []), t ? /* @__PURE__ */
|
|
2527
|
+
}, []), t ? /* @__PURE__ */ w(Ke, { children: e }) : r || /* @__PURE__ */ w(ro, {});
|
|
2528
|
+
}, so = "Stack-module__stack___yUU-B", oo = "Stack-module__vertical___sKTyQ", no = "Stack-module__horizontal___YsvtV", He = {
|
|
2529
|
+
stack: so,
|
|
2530
|
+
vertical: oo,
|
|
2531
|
+
horizontal: no
|
|
2532
|
+
}, xo = ({
|
|
2533
|
+
children: e,
|
|
2534
|
+
direction: r = "vertical",
|
|
2535
|
+
className: t,
|
|
2536
|
+
style: s,
|
|
2537
|
+
...n
|
|
2538
|
+
}) => {
|
|
2539
|
+
const o = [
|
|
2540
|
+
He.stack,
|
|
2541
|
+
r === "horizontal" ? He.horizontal : He.vertical,
|
|
2542
|
+
t
|
|
2543
|
+
].filter(Boolean).join(" ");
|
|
2544
|
+
return /* @__PURE__ */ w("div", { className: o, style: s, ...n, children: e });
|
|
2529
2545
|
};
|
|
2530
2546
|
export {
|
|
2531
|
-
|
|
2532
|
-
|
|
2547
|
+
uo as Button,
|
|
2548
|
+
fo as CSSReset,
|
|
2533
2549
|
Ar as Checkbox,
|
|
2534
|
-
|
|
2535
|
-
|
|
2550
|
+
yo as Form,
|
|
2551
|
+
go as FormCheckbox,
|
|
2536
2552
|
gs as FormError,
|
|
2537
2553
|
Se as FormField,
|
|
2538
2554
|
xs as FormGroup,
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2555
|
+
mo as FormInput,
|
|
2556
|
+
ms as FormLabel,
|
|
2557
|
+
po as FormRadio,
|
|
2558
|
+
_o as FormSelect,
|
|
2559
|
+
ho as FormTextarea,
|
|
2560
|
+
Zs as Hamburger,
|
|
2561
|
+
vo as Header,
|
|
2546
2562
|
Cs as Input,
|
|
2547
2563
|
ro as LoadingSpinner,
|
|
2548
2564
|
Us as Radio,
|
|
2549
|
-
|
|
2565
|
+
bo as ResponsiveNav,
|
|
2550
2566
|
Ts as Select,
|
|
2551
|
-
|
|
2567
|
+
xo as Stack,
|
|
2568
|
+
So as StyleLoader,
|
|
2552
2569
|
Ps as Textarea,
|
|
2553
|
-
|
|
2554
|
-
|
|
2570
|
+
co as ThemeProvider,
|
|
2571
|
+
cs as useFormContext,
|
|
2555
2572
|
q as useTheme
|
|
2556
2573
|
};
|