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