@gobolt/genesis 0.0.7

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.
Files changed (142) hide show
  1. package/README.md +86 -0
  2. package/dist/AntdIcon-Bsnbyy6g.js +200 -0
  3. package/dist/CheckOutlined-DAynWe12.js +527 -0
  4. package/dist/CloseCircleFilled-ZIY-u-27.js +13 -0
  5. package/dist/Compact-CJBo3f0u.js +185 -0
  6. package/dist/ContextIsolator-CGkdKtc3.js +20 -0
  7. package/dist/ExclamationCircleFilled-BICVVQIg.js +21 -0
  8. package/dist/Form-Cylpi4M4.js +1815 -0
  9. package/dist/Overflow-CP1M4Z0s.js +369 -0
  10. package/dist/SearchOutlined-DuzJkIiQ.js +52 -0
  11. package/dist/TextArea-3MOYYuAQ.js +1680 -0
  12. package/dist/bundle.css +1 -0
  13. package/dist/button-BNV2qdrP.js +1392 -0
  14. package/dist/compact-item-DH13cl8A.js +61 -0
  15. package/dist/components/atoms/button/Button.d.ts +12 -0
  16. package/dist/components/atoms/button/Button.js +27 -0
  17. package/dist/components/atoms/button/__stories__/Button.stories.d.ts +13 -0
  18. package/dist/components/atoms/button/index.d.ts +2 -0
  19. package/dist/components/atoms/button/index.js +4 -0
  20. package/dist/components/atoms/button/styles.d.ts +12 -0
  21. package/dist/components/atoms/button/styles.js +71 -0
  22. package/dist/components/atoms/checkbox/Checkbox.d.ts +10 -0
  23. package/dist/components/atoms/checkbox/Checkbox.js +13 -0
  24. package/dist/components/atoms/checkbox/__stories__/Checkbox.stories.d.ts +8 -0
  25. package/dist/components/atoms/checkbox/__tests__/Checkbox.test.d.ts +1 -0
  26. package/dist/components/atoms/checkbox/__tests__/Checkbox.test.js +18 -0
  27. package/dist/components/atoms/checkbox/index.d.ts +2 -0
  28. package/dist/components/atoms/checkbox/index.js +4 -0
  29. package/dist/components/atoms/checkbox/styles.d.ts +11 -0
  30. package/dist/components/atoms/checkbox/styles.js +582 -0
  31. package/dist/components/atoms/index.d.ts +1 -0
  32. package/dist/components/atoms/index.js +3 -0
  33. package/dist/components/atoms/input/Input.d.ts +11 -0
  34. package/dist/components/atoms/input/Input.js +12 -0
  35. package/dist/components/atoms/input/__stories__/Input.stories.d.ts +10 -0
  36. package/dist/components/atoms/input/__tests__/Input.test.d.ts +1 -0
  37. package/dist/components/atoms/input/__tests__/Input.test.js +28 -0
  38. package/dist/components/atoms/input/index.d.ts +2 -0
  39. package/dist/components/atoms/input/index.js +4 -0
  40. package/dist/components/atoms/input/styles.d.ts +14 -0
  41. package/dist/components/atoms/input/styles.js +415 -0
  42. package/dist/components/atoms/select/Select.d.ts +11 -0
  43. package/dist/components/atoms/select/Select.js +24 -0
  44. package/dist/components/atoms/select/__stories__/Select.stories.d.ts +8 -0
  45. package/dist/components/atoms/select/__tests__/Select.test.d.ts +1 -0
  46. package/dist/components/atoms/select/__tests__/Select.test.js +10735 -0
  47. package/dist/components/atoms/select/index.d.ts +2 -0
  48. package/dist/components/atoms/select/index.js +4 -0
  49. package/dist/components/atoms/select/styles.d.ts +15 -0
  50. package/dist/components/atoms/select/styles.js +3868 -0
  51. package/dist/components/atoms/typography/Typography.d.ts +11 -0
  52. package/dist/components/atoms/typography/Typography.js +44 -0
  53. package/dist/components/atoms/typography/__stories__/Typography.stories.d.ts +12 -0
  54. package/dist/components/atoms/typography/__tests__/Typography.test.d.ts +1 -0
  55. package/dist/components/atoms/typography/__tests__/Typography.test.js +16 -0
  56. package/dist/components/atoms/typography/index.d.ts +2 -0
  57. package/dist/components/atoms/typography/index.js +4 -0
  58. package/dist/components/atoms/typography/styles.d.ts +11 -0
  59. package/dist/components/atoms/typography/styles.js +28 -0
  60. package/dist/components/index.d.js +1 -0
  61. package/dist/components/index.d.ts +14 -0
  62. package/dist/components/index.js +16 -0
  63. package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.d.ts +10 -0
  64. package/dist/components/molecules/error-boundary-fallback/ErrorBoundaryFallback.js +35 -0
  65. package/dist/components/molecules/error-boundary-fallback/__stories__/ErrorBoundaryFallback.stories.d.ts +8 -0
  66. package/dist/components/molecules/error-boundary-fallback/index.d.ts +1 -0
  67. package/dist/components/molecules/error-boundary-fallback/index.js +4 -0
  68. package/dist/components/molecules/error-boundary-fallback/styles.d.ts +1 -0
  69. package/dist/components/molecules/error-boundary-fallback/styles.js +930 -0
  70. package/dist/components/molecules/form/Form.d.ts +15 -0
  71. package/dist/components/molecules/form/Form.js +7 -0
  72. package/dist/components/molecules/form/__stories__/Form.stories.d.ts +7 -0
  73. package/dist/components/molecules/form/__stories__/FormStory.d.ts +1 -0
  74. package/dist/components/molecules/form/__stories__/FormStory.js +90 -0
  75. package/dist/components/molecules/form/index.d.ts +2 -0
  76. package/dist/components/molecules/form/index.js +4 -0
  77. package/dist/constants/index.d.ts +51 -0
  78. package/dist/constants/index.js +54 -0
  79. package/dist/context-CZsFJmh6.js +2093 -0
  80. package/dist/declaration.d.js +1 -0
  81. package/dist/genesis/GenesisThemeBreakdown.d.ts +4 -0
  82. package/dist/genesis/GenesisThemeBreakdown.js +56 -0
  83. package/dist/genesis/GenesisThemeDemo.d.ts +8 -0
  84. package/dist/genesis/GenesisThemeDemo.js +8 -0
  85. package/dist/genesis/GenesisThemeDemo.stories.d.ts +7 -0
  86. package/dist/genesis/styles.d.ts +12 -0
  87. package/dist/genesis/styles.js +4038 -0
  88. package/dist/index-3MWkSVA1.js +96 -0
  89. package/dist/index-BPtFqhcp.js +19110 -0
  90. package/dist/index-BQO27mgE.js +402 -0
  91. package/dist/index-BWys7dkb.js +4462 -0
  92. package/dist/index-C7kFNqp2.js +276 -0
  93. package/dist/index-D1v_7IIx.js +1057 -0
  94. package/dist/index-SAAXFt-P.js +946 -0
  95. package/dist/index-VDH3iLaC.js +884 -0
  96. package/dist/index.d.ts +2 -0
  97. package/dist/index.js +20 -0
  98. package/dist/isVisible-CNQjrJPN.js +366 -0
  99. package/dist/magic-string.es-BkUFmFT4.js +858 -0
  100. package/dist/presetColors-Cl8UP3Nw.js +4 -0
  101. package/dist/providers/GenesisProvider.d.ts +8 -0
  102. package/dist/providers/GenesisProvider.js +7 -0
  103. package/dist/providers/ThemeProvider.d.ts +9 -0
  104. package/dist/providers/ThemeProvider.js +18 -0
  105. package/dist/providers/index.d.ts +2 -0
  106. package/dist/providers/index.js +6 -0
  107. package/dist/reactNode-sKPeiqPL.js +12 -0
  108. package/dist/setup-CMYVZCPF.js +33883 -0
  109. package/dist/styled-components.browser.esm-CZ1XM4o4.js +1144 -0
  110. package/dist/styles/design-tokens/border-tokens/BorderTokenList.d.ts +1 -0
  111. package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +37 -0
  112. package/dist/styles/design-tokens/border-tokens/BorderTokens.stories.d.ts +6 -0
  113. package/dist/styles/design-tokens/color-tokens/ColorTokens.stories.d.ts +7 -0
  114. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.d.ts +3 -0
  115. package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +36 -0
  116. package/dist/styles/design-tokens/sizing-tokens/index.stories.d.ts +7 -0
  117. package/dist/styles/design-tokens/typography/TypographyTokens.stories.d.ts +7 -0
  118. package/dist/styles/design-tokens/variables.d.ts +704 -0
  119. package/dist/styles/design-tokens/variables.js +697 -0
  120. package/dist/styles/global-styles.d.ts +1 -0
  121. package/dist/styles/global-styles.js +35 -0
  122. package/dist/styles/theme/genesis-theme.d.ts +75 -0
  123. package/dist/styles/theme/genesis-theme.js +896 -0
  124. package/dist/styles/theme/genesis-theme.types.d.ts +162 -0
  125. package/dist/styles/theme/genesis-theme.types.js +4 -0
  126. package/dist/styles/theme/global-styles.d.ts +1 -0
  127. package/dist/styles/theme/global-styles.js +35 -0
  128. package/dist/styles/theme/index.d.ts +1 -0
  129. package/dist/styles/theme/index.js +9 -0
  130. package/dist/test/setup.d.ts +5 -0
  131. package/dist/test/setup.js +7 -0
  132. package/dist/useVariants-CEpw6Ww6.js +29 -0
  133. package/dist/utils/getAppointmentColor.d.ts +4 -0
  134. package/dist/utils/getAppointmentColor.js +91 -0
  135. package/dist/utils/isAllEnglishString.d.ts +1 -0
  136. package/dist/utils/isAllEnglishString.js +8 -0
  137. package/dist/utils/isAllEnglishString.test.d.ts +1 -0
  138. package/dist/utils/isAllEnglishString.test.js +8 -0
  139. package/dist/utils/parseAddress.d.ts +3 -0
  140. package/dist/utils/parseAddress.js +19 -0
  141. package/dist/vite-env.d.js +1 -0
  142. package/package.json +115 -0
@@ -0,0 +1,1815 @@
1
+ import { jsx as Xe } from "react/jsx-runtime";
2
+ import { useBreakpoint as mt } from "./providers/ThemeProvider.js";
3
+ import { m as we, n as ke, z as Q, N as pt, C as ue, c as J, D as Ue, H as K, M as gt, a4 as ht, a5 as bt, A as be, F as yt, a6 as $t, a7 as xt, S as Ct, B as _e, t as vt, G as wt, W as St, a8 as Re, a9 as Et, O as Ke, _ as Ot, Y as It, j as Mt, s as Ft, J as Nt } from "./index-BWys7dkb.js";
4
+ import { a as Se, u as Ee, b as jt, V as _t, c as Ye, d as re, R as Rt, F as ge, e as Qe, C as Vt, L as Pt, W as Dt, f as Lt, g as Tt } from "./context-CZsFJmh6.js";
5
+ import * as i from "react";
6
+ import Wt, { createContext as Ht } from "react";
7
+ import { b as Ve, a as At } from "./index-VDH3iLaC.js";
8
+ import { z as Je, T as zt } from "./index-SAAXFt-P.js";
9
+ import { a as qt, R as Bt } from "./Compact-CJBo3f0u.js";
10
+ import { c as Gt } from "./reactNode-sKPeiqPL.js";
11
+ import { t as Xt, i as kt, o as Ut } from "./isVisible-CNQjrJPN.js";
12
+ import { I as Kt } from "./AntdIcon-Bsnbyy6g.js";
13
+ import { R as Yt, a as Qt } from "./ExclamationCircleFilled-BICVVQIg.js";
14
+ import { R as Jt } from "./CloseCircleFilled-ZIY-u-27.js";
15
+ const Pe = (e) => typeof e == "object" && e != null && e.nodeType === 1, De = (e, t) => (!t || e !== "hidden") && e !== "visible" && e !== "clip", fe = (e, t) => {
16
+ if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
17
+ const r = getComputedStyle(e, null);
18
+ return De(r.overflowY, t) || De(r.overflowX, t) || ((n) => {
19
+ const o = ((s) => {
20
+ if (!s.ownerDocument || !s.ownerDocument.defaultView) return null;
21
+ try {
22
+ return s.ownerDocument.defaultView.frameElement;
23
+ } catch {
24
+ return null;
25
+ }
26
+ })(n);
27
+ return !!o && (o.clientHeight < n.scrollHeight || o.clientWidth < n.scrollWidth);
28
+ })(e);
29
+ }
30
+ return !1;
31
+ }, me = (e, t, r, n, o, s, a, l) => s < e && a > t || s > e && a < t ? 0 : s <= e && l <= r || a >= t && l >= r ? s - e - n : a > t && l < r || s < e && l > r ? a - t + o : 0, Zt = (e) => {
32
+ const t = e.parentElement;
33
+ return t ?? (e.getRootNode().host || null);
34
+ }, Le = (e, t) => {
35
+ var r, n, o, s;
36
+ if (typeof document > "u") return [];
37
+ const { scrollMode: a, block: l, inline: c, boundary: f, skipOverflowHiddenElements: y } = t, $ = typeof f == "function" ? f : (A) => A !== f;
38
+ if (!Pe(e)) throw new TypeError("Invalid target");
39
+ const O = document.scrollingElement || document.documentElement, R = [];
40
+ let S = e;
41
+ for (; Pe(S) && $(S); ) {
42
+ if (S = Zt(S), S === O) {
43
+ R.push(S);
44
+ break;
45
+ }
46
+ S != null && S === document.body && fe(S) && !fe(document.documentElement) || S != null && fe(S, y) && R.push(S);
47
+ }
48
+ const E = (n = (r = window.visualViewport) == null ? void 0 : r.width) != null ? n : innerWidth, I = (s = (o = window.visualViewport) == null ? void 0 : o.height) != null ? s : innerHeight, { scrollX: m, scrollY: N } = window, { height: u, width: h, top: p, right: b, bottom: V, left: v } = e.getBoundingClientRect(), { top: x, right: g, bottom: j, left: H } = ((A) => {
49
+ const d = window.getComputedStyle(A);
50
+ return { top: parseFloat(d.scrollMarginTop) || 0, right: parseFloat(d.scrollMarginRight) || 0, bottom: parseFloat(d.scrollMarginBottom) || 0, left: parseFloat(d.scrollMarginLeft) || 0 };
51
+ })(e);
52
+ let F = l === "start" || l === "nearest" ? p - x : l === "end" ? V + j : p + u / 2 - x + j, C = c === "center" ? v + h / 2 - H + g : c === "end" ? b + g : v - H;
53
+ const P = [];
54
+ for (let A = 0; A < R.length; A++) {
55
+ const d = R[A], { height: z, width: w, top: q, right: T, bottom: G, left: X } = d.getBoundingClientRect();
56
+ if (a === "if-needed" && p >= 0 && v >= 0 && V <= I && b <= E && (d === O && !fe(d) || p >= q && V <= G && v >= X && b <= T)) return P;
57
+ const U = getComputedStyle(d), ee = parseInt(U.borderLeftWidth, 10), te = parseInt(U.borderTopWidth, 10), L = parseInt(U.borderRightWidth, 10), M = parseInt(U.borderBottomWidth, 10);
58
+ let _ = 0, D = 0;
59
+ const B = "offsetWidth" in d ? d.offsetWidth - d.clientWidth - ee - L : 0, k = "offsetHeight" in d ? d.offsetHeight - d.clientHeight - te - M : 0, ne = "offsetWidth" in d ? d.offsetWidth === 0 ? 0 : w / d.offsetWidth : 0, oe = "offsetHeight" in d ? d.offsetHeight === 0 ? 0 : z / d.offsetHeight : 0;
60
+ if (O === d) _ = l === "start" ? F : l === "end" ? F - I : l === "nearest" ? me(N, N + I, I, te, M, N + F, N + F + u, u) : F - I / 2, D = c === "start" ? C : c === "center" ? C - E / 2 : c === "end" ? C - E : me(m, m + E, E, ee, L, m + C, m + C + h, h), _ = Math.max(0, _ + N), D = Math.max(0, D + m);
61
+ else {
62
+ _ = l === "start" ? F - q - te : l === "end" ? F - G + M + k : l === "nearest" ? me(q, G, z, te, M + k, F, F + u, u) : F - (q + z / 2) + k / 2, D = c === "start" ? C - X - ee : c === "center" ? C - (X + w / 2) + B / 2 : c === "end" ? C - T + L + B : me(X, T, w, ee, L + B, C, C + h, h);
63
+ const { scrollLeft: se, scrollTop: W } = d;
64
+ _ = oe === 0 ? 0 : Math.max(0, Math.min(W + _ / oe, d.scrollHeight - z / oe + k)), D = ne === 0 ? 0 : Math.max(0, Math.min(se + D / ne, d.scrollWidth - w / ne + B)), F += W - _, C += se - D;
65
+ }
66
+ P.push({ el: d, top: _, left: D });
67
+ }
68
+ return P;
69
+ }, en = (e) => e === !1 ? { block: "end", inline: "nearest" } : ((t) => t === Object(t) && Object.keys(t).length !== 0)(e) ? e : { block: "start", inline: "nearest" };
70
+ function tn(e, t) {
71
+ if (!e.isConnected || !((o) => {
72
+ let s = o;
73
+ for (; s && s.parentNode; ) {
74
+ if (s.parentNode === document) return !0;
75
+ s = s.parentNode instanceof ShadowRoot ? s.parentNode.host : s.parentNode;
76
+ }
77
+ return !1;
78
+ })(e)) return;
79
+ const r = ((o) => {
80
+ const s = window.getComputedStyle(o);
81
+ return { top: parseFloat(s.scrollMarginTop) || 0, right: parseFloat(s.scrollMarginRight) || 0, bottom: parseFloat(s.scrollMarginBottom) || 0, left: parseFloat(s.scrollMarginLeft) || 0 };
82
+ })(e);
83
+ if (((o) => typeof o == "object" && typeof o.behavior == "function")(t)) return t.behavior(Le(e, t));
84
+ const n = typeof t == "boolean" || t == null ? void 0 : t.behavior;
85
+ for (const { el: o, top: s, left: a } of Le(e, en(t))) {
86
+ const l = s - r.top + r.bottom, c = a - r.left + r.right;
87
+ o.scroll({ top: l, left: c, behavior: n });
88
+ }
89
+ }
90
+ const nn = (e) => ({
91
+ [e.componentCls]: {
92
+ // For common/openAnimation
93
+ [`${e.antCls}-motion-collapse-legacy`]: {
94
+ overflow: "hidden",
95
+ "&-active": {
96
+ transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
97
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
98
+ }
99
+ },
100
+ [`${e.antCls}-motion-collapse`]: {
101
+ overflow: "hidden",
102
+ transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
103
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
104
+ }
105
+ }
106
+ }), rn = (e) => {
107
+ const {
108
+ componentCls: t
109
+ } = e;
110
+ return {
111
+ // Grid system
112
+ [t]: {
113
+ display: "flex",
114
+ flexFlow: "row wrap",
115
+ minWidth: 0,
116
+ "&::before, &::after": {
117
+ display: "flex"
118
+ },
119
+ "&-no-wrap": {
120
+ flexWrap: "nowrap"
121
+ },
122
+ // The origin of the X-axis
123
+ "&-start": {
124
+ justifyContent: "flex-start"
125
+ },
126
+ // The center of the X-axis
127
+ "&-center": {
128
+ justifyContent: "center"
129
+ },
130
+ // The opposite of the X-axis
131
+ "&-end": {
132
+ justifyContent: "flex-end"
133
+ },
134
+ "&-space-between": {
135
+ justifyContent: "space-between"
136
+ },
137
+ "&-space-around": {
138
+ justifyContent: "space-around"
139
+ },
140
+ "&-space-evenly": {
141
+ justifyContent: "space-evenly"
142
+ },
143
+ // Align at the top
144
+ "&-top": {
145
+ alignItems: "flex-start"
146
+ },
147
+ // Align at the center
148
+ "&-middle": {
149
+ alignItems: "center"
150
+ },
151
+ "&-bottom": {
152
+ alignItems: "flex-end"
153
+ }
154
+ }
155
+ };
156
+ }, on = (e) => {
157
+ const {
158
+ componentCls: t
159
+ } = e;
160
+ return {
161
+ // Grid system
162
+ [t]: {
163
+ position: "relative",
164
+ maxWidth: "100%",
165
+ // Prevent columns from collapsing when empty
166
+ minHeight: 1
167
+ }
168
+ };
169
+ }, sn = (e, t) => {
170
+ const {
171
+ prefixCls: r,
172
+ componentCls: n,
173
+ gridColumns: o
174
+ } = e, s = {};
175
+ for (let a = o; a >= 0; a--)
176
+ a === 0 ? (s[`${n}${t}-${a}`] = {
177
+ display: "none"
178
+ }, s[`${n}-push-${a}`] = {
179
+ insetInlineStart: "auto"
180
+ }, s[`${n}-pull-${a}`] = {
181
+ insetInlineEnd: "auto"
182
+ }, s[`${n}${t}-push-${a}`] = {
183
+ insetInlineStart: "auto"
184
+ }, s[`${n}${t}-pull-${a}`] = {
185
+ insetInlineEnd: "auto"
186
+ }, s[`${n}${t}-offset-${a}`] = {
187
+ marginInlineStart: 0
188
+ }, s[`${n}${t}-order-${a}`] = {
189
+ order: 0
190
+ }) : (s[`${n}${t}-${a}`] = [
191
+ // https://github.com/ant-design/ant-design/issues/44456
192
+ // Form set `display: flex` on Col which will override `display: block`.
193
+ // Let's get it from css variable to support override.
194
+ {
195
+ "--ant-display": "block",
196
+ // Fallback to display if variable not support
197
+ display: "block"
198
+ },
199
+ {
200
+ display: "var(--ant-display)",
201
+ flex: `0 0 ${a / o * 100}%`,
202
+ maxWidth: `${a / o * 100}%`
203
+ }
204
+ ], s[`${n}${t}-push-${a}`] = {
205
+ insetInlineStart: `${a / o * 100}%`
206
+ }, s[`${n}${t}-pull-${a}`] = {
207
+ insetInlineEnd: `${a / o * 100}%`
208
+ }, s[`${n}${t}-offset-${a}`] = {
209
+ marginInlineStart: `${a / o * 100}%`
210
+ }, s[`${n}${t}-order-${a}`] = {
211
+ order: a
212
+ });
213
+ return s[`${n}${t}-flex`] = {
214
+ flex: `var(--${r}${t}-flex)`
215
+ }, s;
216
+ }, ve = (e, t) => sn(e, t), an = (e, t, r) => ({
217
+ [`@media (min-width: ${Q(t)})`]: Object.assign({}, ve(e, r))
218
+ }), ln = () => ({}), cn = () => ({}), un = we("Grid", rn, ln), dn = (e) => ({
219
+ xs: e.screenXSMin,
220
+ sm: e.screenSMMin,
221
+ md: e.screenMDMin,
222
+ lg: e.screenLGMin,
223
+ xl: e.screenXLMin,
224
+ xxl: e.screenXXLMin
225
+ }), fn = we("Grid", (e) => {
226
+ const t = ke(e, {
227
+ gridColumns: 24
228
+ // Row is divided into 24 parts in Grid
229
+ }), r = dn(t);
230
+ return delete r.xs, [on(t), ve(t, ""), ve(t, "-xs"), Object.keys(r).map((n) => an(t, r[n], `-${n}`)).reduce((n, o) => Object.assign(Object.assign({}, n), o), {})];
231
+ }, cn), ce = ["xxl", "xl", "lg", "md", "sm", "xs"], mn = (e) => ({
232
+ xs: `(max-width: ${e.screenXSMax}px)`,
233
+ sm: `(min-width: ${e.screenSM}px)`,
234
+ md: `(min-width: ${e.screenMD}px)`,
235
+ lg: `(min-width: ${e.screenLG}px)`,
236
+ xl: `(min-width: ${e.screenXL}px)`,
237
+ xxl: `(min-width: ${e.screenXXL}px)`
238
+ }), pn = (e) => {
239
+ const t = e, r = [].concat(ce).reverse();
240
+ return r.forEach((n, o) => {
241
+ const s = n.toUpperCase(), a = `screen${s}Min`, l = `screen${s}`;
242
+ if (!(t[a] <= t[l]))
243
+ throw new Error(`${a}<=${l} fails : !(${t[a]}<=${t[l]})`);
244
+ if (o < r.length - 1) {
245
+ const c = `screen${s}Max`;
246
+ if (!(t[l] <= t[c]))
247
+ throw new Error(`${l}<=${c} fails : !(${t[l]}<=${t[c]})`);
248
+ const y = `screen${r[o + 1].toUpperCase()}Min`;
249
+ if (!(t[c] <= t[y]))
250
+ throw new Error(`${c}<=${y} fails : !(${t[c]}<=${t[y]})`);
251
+ }
252
+ }), e;
253
+ };
254
+ function gn() {
255
+ const [, e] = pt(), t = mn(pn(e));
256
+ return Wt.useMemo(() => {
257
+ const r = /* @__PURE__ */ new Map();
258
+ let n = -1, o = {};
259
+ return {
260
+ matchHandlers: {},
261
+ dispatch(s) {
262
+ return o = s, r.forEach((a) => a(o)), r.size >= 1;
263
+ },
264
+ subscribe(s) {
265
+ return r.size || this.register(), n += 1, r.set(n, s), s(o), n;
266
+ },
267
+ unsubscribe(s) {
268
+ r.delete(s), r.size || this.unregister();
269
+ },
270
+ unregister() {
271
+ Object.keys(t).forEach((s) => {
272
+ const a = t[s], l = this.matchHandlers[a];
273
+ l == null || l.mql.removeListener(l == null ? void 0 : l.listener);
274
+ }), r.clear();
275
+ },
276
+ register() {
277
+ Object.keys(t).forEach((s) => {
278
+ const a = t[s], l = (f) => {
279
+ let {
280
+ matches: y
281
+ } = f;
282
+ this.dispatch(Object.assign(Object.assign({}, o), {
283
+ [s]: y
284
+ }));
285
+ }, c = window.matchMedia(a);
286
+ c.addListener(l), this.matchHandlers[a] = {
287
+ mql: c,
288
+ listener: l
289
+ }, l(c);
290
+ });
291
+ },
292
+ responsiveMap: t
293
+ };
294
+ }, [e]);
295
+ }
296
+ const Ze = /* @__PURE__ */ Ht({});
297
+ var hn = function(e, t) {
298
+ var r = {};
299
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
300
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
301
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
302
+ return r;
303
+ };
304
+ function Te(e) {
305
+ return typeof e == "number" ? `${e} ${e} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(e) ? `0 0 ${e}` : e;
306
+ }
307
+ const bn = ["xs", "sm", "md", "lg", "xl", "xxl"], Oe = /* @__PURE__ */ i.forwardRef((e, t) => {
308
+ const {
309
+ getPrefixCls: r,
310
+ direction: n
311
+ } = i.useContext(ue), {
312
+ gutter: o,
313
+ wrap: s
314
+ } = i.useContext(Ze), {
315
+ prefixCls: a,
316
+ span: l,
317
+ order: c,
318
+ offset: f,
319
+ push: y,
320
+ pull: $,
321
+ className: O,
322
+ children: R,
323
+ flex: S,
324
+ style: E
325
+ } = e, I = hn(e, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children", "flex", "style"]), m = r("col", a), [N, u, h] = fn(m), p = {};
326
+ let b = {};
327
+ bn.forEach((x) => {
328
+ let g = {};
329
+ const j = e[x];
330
+ typeof j == "number" ? g.span = j : typeof j == "object" && (g = j || {}), delete I[x], b = Object.assign(Object.assign({}, b), {
331
+ [`${m}-${x}-${g.span}`]: g.span !== void 0,
332
+ [`${m}-${x}-order-${g.order}`]: g.order || g.order === 0,
333
+ [`${m}-${x}-offset-${g.offset}`]: g.offset || g.offset === 0,
334
+ [`${m}-${x}-push-${g.push}`]: g.push || g.push === 0,
335
+ [`${m}-${x}-pull-${g.pull}`]: g.pull || g.pull === 0,
336
+ [`${m}-rtl`]: n === "rtl"
337
+ }), g.flex && (b[`${m}-${x}-flex`] = !0, p[`--${m}-${x}-flex`] = Te(g.flex));
338
+ });
339
+ const V = J(m, {
340
+ [`${m}-${l}`]: l !== void 0,
341
+ [`${m}-order-${c}`]: c,
342
+ [`${m}-offset-${f}`]: f,
343
+ [`${m}-push-${y}`]: y,
344
+ [`${m}-pull-${$}`]: $
345
+ }, O, b, u, h), v = {};
346
+ if (o && o[0] > 0) {
347
+ const x = o[0] / 2;
348
+ v.paddingLeft = x, v.paddingRight = x;
349
+ }
350
+ return S && (v.flex = Te(S), s === !1 && !v.minWidth && (v.minWidth = 0)), N(/* @__PURE__ */ i.createElement("div", Object.assign({}, I, {
351
+ style: Object.assign(Object.assign(Object.assign({}, v), E), p),
352
+ className: V,
353
+ ref: t
354
+ }), R));
355
+ });
356
+ process.env.NODE_ENV !== "production" && (Oe.displayName = "Col");
357
+ var yn = function(e, t) {
358
+ var r = {};
359
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
360
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
361
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
362
+ return r;
363
+ };
364
+ function We(e, t) {
365
+ const [r, n] = i.useState(typeof e == "string" ? e : ""), o = () => {
366
+ if (typeof e == "string" && n(e), typeof e == "object")
367
+ for (let s = 0; s < ce.length; s++) {
368
+ const a = ce[s];
369
+ if (!t[a])
370
+ continue;
371
+ const l = e[a];
372
+ if (l !== void 0) {
373
+ n(l);
374
+ return;
375
+ }
376
+ }
377
+ };
378
+ return i.useEffect(() => {
379
+ o();
380
+ }, [JSON.stringify(e), t]), r;
381
+ }
382
+ const et = /* @__PURE__ */ i.forwardRef((e, t) => {
383
+ const {
384
+ prefixCls: r,
385
+ justify: n,
386
+ align: o,
387
+ className: s,
388
+ style: a,
389
+ children: l,
390
+ gutter: c = 0,
391
+ wrap: f
392
+ } = e, y = yn(e, ["prefixCls", "justify", "align", "className", "style", "children", "gutter", "wrap"]), {
393
+ getPrefixCls: $,
394
+ direction: O
395
+ } = i.useContext(ue), [R, S] = i.useState({
396
+ xs: !0,
397
+ sm: !0,
398
+ md: !0,
399
+ lg: !0,
400
+ xl: !0,
401
+ xxl: !0
402
+ }), [E, I] = i.useState({
403
+ xs: !1,
404
+ sm: !1,
405
+ md: !1,
406
+ lg: !1,
407
+ xl: !1,
408
+ xxl: !1
409
+ }), m = We(o, E), N = We(n, E), u = i.useRef(c), h = gn();
410
+ i.useEffect(() => {
411
+ const d = h.subscribe((z) => {
412
+ I(z);
413
+ const w = u.current || 0;
414
+ (!Array.isArray(w) && typeof w == "object" || Array.isArray(w) && (typeof w[0] == "object" || typeof w[1] == "object")) && S(z);
415
+ });
416
+ return () => h.unsubscribe(d);
417
+ }, []);
418
+ const p = () => {
419
+ const d = [void 0, void 0];
420
+ return (Array.isArray(c) ? c : [c, void 0]).forEach((w, q) => {
421
+ if (typeof w == "object")
422
+ for (let T = 0; T < ce.length; T++) {
423
+ const G = ce[T];
424
+ if (R[G] && w[G] !== void 0) {
425
+ d[q] = w[G];
426
+ break;
427
+ }
428
+ }
429
+ else
430
+ d[q] = w;
431
+ }), d;
432
+ }, b = $("row", r), [V, v, x] = un(b), g = p(), j = J(b, {
433
+ [`${b}-no-wrap`]: f === !1,
434
+ [`${b}-${N}`]: N,
435
+ [`${b}-${m}`]: m,
436
+ [`${b}-rtl`]: O === "rtl"
437
+ }, s, v, x), H = {}, F = g[0] != null && g[0] > 0 ? g[0] / -2 : void 0;
438
+ F && (H.marginLeft = F, H.marginRight = F);
439
+ const [C, P] = g;
440
+ H.rowGap = P;
441
+ const A = i.useMemo(() => ({
442
+ gutter: [C, P],
443
+ wrap: f
444
+ }), [C, P, f]);
445
+ return V(/* @__PURE__ */ i.createElement(Ze.Provider, {
446
+ value: A
447
+ }, /* @__PURE__ */ i.createElement("div", Object.assign({}, y, {
448
+ className: j,
449
+ style: Object.assign(Object.assign({}, H), a),
450
+ ref: t
451
+ }), l)));
452
+ });
453
+ process.env.NODE_ENV !== "production" && (et.displayName = "Row");
454
+ function he(e) {
455
+ const [t, r] = i.useState(e);
456
+ return i.useEffect(() => {
457
+ const n = setTimeout(() => {
458
+ r(e);
459
+ }, e.length ? 0 : 10);
460
+ return () => {
461
+ clearTimeout(n);
462
+ };
463
+ }, [e]), t;
464
+ }
465
+ const $n = (e) => {
466
+ const {
467
+ componentCls: t
468
+ } = e, r = `${t}-show-help`, n = `${t}-show-help-item`;
469
+ return {
470
+ [r]: {
471
+ // Explain holder
472
+ transition: `opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,
473
+ "&-appear, &-enter": {
474
+ opacity: 0,
475
+ "&-active": {
476
+ opacity: 1
477
+ }
478
+ },
479
+ "&-leave": {
480
+ opacity: 1,
481
+ "&-active": {
482
+ opacity: 0
483
+ }
484
+ },
485
+ // Explain
486
+ [n]: {
487
+ overflow: "hidden",
488
+ transition: `height ${e.motionDurationFast} ${e.motionEaseInOut},
489
+ opacity ${e.motionDurationFast} ${e.motionEaseInOut},
490
+ transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,
491
+ [`&${n}-appear, &${n}-enter`]: {
492
+ transform: "translateY(-5px)",
493
+ opacity: 0,
494
+ "&-active": {
495
+ transform: "translateY(0)",
496
+ opacity: 1
497
+ }
498
+ },
499
+ [`&${n}-leave-active`]: {
500
+ transform: "translateY(-5px)"
501
+ }
502
+ }
503
+ }
504
+ };
505
+ }, xn = (e) => ({
506
+ legend: {
507
+ display: "block",
508
+ width: "100%",
509
+ marginBottom: e.marginLG,
510
+ padding: 0,
511
+ color: e.colorTextDescription,
512
+ fontSize: e.fontSizeLG,
513
+ lineHeight: "inherit",
514
+ border: 0,
515
+ borderBottom: `${Q(e.lineWidth)} ${e.lineType} ${e.colorBorder}`
516
+ },
517
+ 'input[type="search"]': {
518
+ boxSizing: "border-box"
519
+ },
520
+ // Position radios and checkboxes better
521
+ 'input[type="radio"], input[type="checkbox"]': {
522
+ lineHeight: "normal"
523
+ },
524
+ 'input[type="file"]': {
525
+ display: "block"
526
+ },
527
+ // Make range inputs behave like textual form controls
528
+ 'input[type="range"]': {
529
+ display: "block",
530
+ width: "100%"
531
+ },
532
+ // Make multiple select elements height not fixed
533
+ "select[multiple], select[size]": {
534
+ height: "auto"
535
+ },
536
+ // Focus for file, radio, and checkbox
537
+ "input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus": {
538
+ outline: 0,
539
+ boxShadow: `0 0 0 ${Q(e.controlOutlineWidth)} ${e.controlOutline}`
540
+ },
541
+ // Adjust output element
542
+ output: {
543
+ display: "block",
544
+ paddingTop: 15,
545
+ color: e.colorText,
546
+ fontSize: e.fontSize,
547
+ lineHeight: e.lineHeight
548
+ }
549
+ }), He = (e, t) => {
550
+ const {
551
+ formItemCls: r
552
+ } = e;
553
+ return {
554
+ [r]: {
555
+ [`${r}-label > label`]: {
556
+ height: t
557
+ },
558
+ [`${r}-control-input`]: {
559
+ minHeight: t
560
+ }
561
+ }
562
+ };
563
+ }, Cn = (e) => {
564
+ const {
565
+ componentCls: t
566
+ } = e;
567
+ return {
568
+ [e.componentCls]: Object.assign(Object.assign(Object.assign({}, Ue(e)), xn(e)), {
569
+ [`${t}-text`]: {
570
+ display: "inline-block",
571
+ paddingInlineEnd: e.paddingSM
572
+ },
573
+ // ================================================================
574
+ // = Size =
575
+ // ================================================================
576
+ "&-small": Object.assign({}, He(e, e.controlHeightSM)),
577
+ "&-large": Object.assign({}, He(e, e.controlHeightLG))
578
+ })
579
+ };
580
+ }, vn = (e) => {
581
+ const {
582
+ formItemCls: t,
583
+ iconCls: r,
584
+ componentCls: n,
585
+ rootPrefixCls: o,
586
+ antCls: s,
587
+ labelRequiredMarkColor: a,
588
+ labelColor: l,
589
+ labelFontSize: c,
590
+ labelHeight: f,
591
+ labelColonMarginInlineStart: y,
592
+ labelColonMarginInlineEnd: $,
593
+ itemMarginBottom: O
594
+ } = e;
595
+ return {
596
+ [t]: Object.assign(Object.assign({}, Ue(e)), {
597
+ marginBottom: O,
598
+ verticalAlign: "top",
599
+ "&-with-help": {
600
+ transition: "none"
601
+ },
602
+ [`&-hidden,
603
+ &-hidden${s}-row`]: {
604
+ // https://github.com/ant-design/ant-design/issues/26141
605
+ display: "none"
606
+ },
607
+ "&-has-warning": {
608
+ [`${t}-split`]: {
609
+ color: e.colorError
610
+ }
611
+ },
612
+ "&-has-error": {
613
+ [`${t}-split`]: {
614
+ color: e.colorWarning
615
+ }
616
+ },
617
+ // ==============================================================
618
+ // = Label =
619
+ // ==============================================================
620
+ [`${t}-label`]: {
621
+ flexGrow: 0,
622
+ overflow: "hidden",
623
+ whiteSpace: "nowrap",
624
+ textAlign: "end",
625
+ verticalAlign: "middle",
626
+ "&-left": {
627
+ textAlign: "start"
628
+ },
629
+ "&-wrap": {
630
+ overflow: "unset",
631
+ lineHeight: e.lineHeight,
632
+ whiteSpace: "unset"
633
+ },
634
+ "> label": {
635
+ position: "relative",
636
+ display: "inline-flex",
637
+ alignItems: "center",
638
+ maxWidth: "100%",
639
+ height: f,
640
+ color: l,
641
+ fontSize: c,
642
+ [`> ${r}`]: {
643
+ fontSize: e.fontSize,
644
+ verticalAlign: "top"
645
+ },
646
+ // Required mark
647
+ [`&${t}-required:not(${t}-required-mark-optional)::before`]: {
648
+ display: "inline-block",
649
+ marginInlineEnd: e.marginXXS,
650
+ color: a,
651
+ fontSize: e.fontSize,
652
+ fontFamily: "SimSun, sans-serif",
653
+ lineHeight: 1,
654
+ content: '"*"',
655
+ [`${n}-hide-required-mark &`]: {
656
+ display: "none"
657
+ }
658
+ },
659
+ // Optional mark
660
+ [`${t}-optional`]: {
661
+ display: "inline-block",
662
+ marginInlineStart: e.marginXXS,
663
+ color: e.colorTextDescription,
664
+ [`${n}-hide-required-mark &`]: {
665
+ display: "none"
666
+ }
667
+ },
668
+ // Optional mark
669
+ [`${t}-tooltip`]: {
670
+ color: e.colorTextDescription,
671
+ cursor: "help",
672
+ writingMode: "horizontal-tb",
673
+ marginInlineStart: e.marginXXS
674
+ },
675
+ "&::after": {
676
+ content: '":"',
677
+ position: "relative",
678
+ marginBlock: 0,
679
+ marginInlineStart: y,
680
+ marginInlineEnd: $
681
+ },
682
+ [`&${t}-no-colon::after`]: {
683
+ content: '"\\a0"'
684
+ }
685
+ }
686
+ },
687
+ // ==============================================================
688
+ // = Input =
689
+ // ==============================================================
690
+ [`${t}-control`]: {
691
+ "--ant-display": "flex",
692
+ flexDirection: "column",
693
+ flexGrow: 1,
694
+ [`&:first-child:not([class^="'${o}-col-'"]):not([class*="' ${o}-col-'"])`]: {
695
+ width: "100%"
696
+ },
697
+ "&-input": {
698
+ position: "relative",
699
+ display: "flex",
700
+ alignItems: "center",
701
+ minHeight: e.controlHeight,
702
+ "&-content": {
703
+ flex: "auto",
704
+ maxWidth: "100%"
705
+ }
706
+ }
707
+ },
708
+ // ==============================================================
709
+ // = Explain =
710
+ // ==============================================================
711
+ [t]: {
712
+ "&-additional": {
713
+ display: "flex",
714
+ flexDirection: "column"
715
+ },
716
+ "&-explain, &-extra": {
717
+ clear: "both",
718
+ color: e.colorTextDescription,
719
+ fontSize: e.fontSize,
720
+ lineHeight: e.lineHeight
721
+ },
722
+ "&-explain-connected": {
723
+ width: "100%"
724
+ },
725
+ "&-extra": {
726
+ minHeight: e.controlHeightSM,
727
+ transition: `color ${e.motionDurationMid} ${e.motionEaseOut}`
728
+ // sync input color transition
729
+ },
730
+ "&-explain": {
731
+ "&-error": {
732
+ color: e.colorError
733
+ },
734
+ "&-warning": {
735
+ color: e.colorWarning
736
+ }
737
+ }
738
+ },
739
+ [`&-with-help ${t}-explain`]: {
740
+ height: "auto",
741
+ opacity: 1
742
+ },
743
+ // ==============================================================
744
+ // = Feedback Icon =
745
+ // ==============================================================
746
+ [`${t}-feedback-icon`]: {
747
+ fontSize: e.fontSize,
748
+ textAlign: "center",
749
+ visibility: "visible",
750
+ animationName: Je,
751
+ animationDuration: e.motionDurationMid,
752
+ animationTimingFunction: e.motionEaseOutBack,
753
+ pointerEvents: "none",
754
+ "&-success": {
755
+ color: e.colorSuccess
756
+ },
757
+ "&-error": {
758
+ color: e.colorError
759
+ },
760
+ "&-warning": {
761
+ color: e.colorWarning
762
+ },
763
+ "&-validating": {
764
+ color: e.colorPrimary
765
+ }
766
+ }
767
+ })
768
+ };
769
+ }, Ae = (e, t) => {
770
+ const {
771
+ formItemCls: r
772
+ } = e;
773
+ return {
774
+ [`${t}-horizontal`]: {
775
+ [`${r}-label`]: {
776
+ flexGrow: 0
777
+ },
778
+ [`${r}-control`]: {
779
+ flex: "1 1 0",
780
+ // https://github.com/ant-design/ant-design/issues/32777
781
+ // https://github.com/ant-design/ant-design/issues/33773
782
+ minWidth: 0
783
+ },
784
+ // Do not change this to `ant-col-24`! `-24` match all the responsive rules
785
+ // https://github.com/ant-design/ant-design/issues/32980
786
+ // https://github.com/ant-design/ant-design/issues/34903
787
+ // https://github.com/ant-design/ant-design/issues/44538
788
+ [`${r}-label[class$='-24'], ${r}-label[class*='-24 ']`]: {
789
+ [`& + ${r}-control`]: {
790
+ minWidth: "unset"
791
+ }
792
+ }
793
+ }
794
+ };
795
+ }, wn = (e) => {
796
+ const {
797
+ componentCls: t,
798
+ formItemCls: r,
799
+ inlineItemMarginBottom: n
800
+ } = e;
801
+ return {
802
+ [`${t}-inline`]: {
803
+ display: "flex",
804
+ flexWrap: "wrap",
805
+ [r]: {
806
+ flex: "none",
807
+ marginInlineEnd: e.margin,
808
+ marginBottom: n,
809
+ "&-row": {
810
+ flexWrap: "nowrap"
811
+ },
812
+ [`> ${r}-label,
813
+ > ${r}-control`]: {
814
+ display: "inline-block",
815
+ verticalAlign: "top"
816
+ },
817
+ [`> ${r}-label`]: {
818
+ flex: "none"
819
+ },
820
+ [`${t}-text`]: {
821
+ display: "inline-block"
822
+ },
823
+ [`${r}-has-feedback`]: {
824
+ display: "inline-block"
825
+ }
826
+ }
827
+ }
828
+ };
829
+ }, Y = (e) => ({
830
+ padding: e.verticalLabelPadding,
831
+ margin: e.verticalLabelMargin,
832
+ whiteSpace: "initial",
833
+ textAlign: "start",
834
+ "> label": {
835
+ margin: 0,
836
+ "&::after": {
837
+ // https://github.com/ant-design/ant-design/issues/43538
838
+ visibility: "hidden"
839
+ }
840
+ }
841
+ }), tt = (e) => {
842
+ const {
843
+ componentCls: t,
844
+ formItemCls: r,
845
+ rootPrefixCls: n
846
+ } = e;
847
+ return {
848
+ [`${r} ${r}-label`]: Y(e),
849
+ // ref: https://github.com/ant-design/ant-design/issues/45122
850
+ [`${t}:not(${t}-inline)`]: {
851
+ [r]: {
852
+ flexWrap: "wrap",
853
+ [`${r}-label, ${r}-control`]: {
854
+ // When developer pass `xs: { span }`,
855
+ // It should follow the `xs` screen config
856
+ // ref: https://github.com/ant-design/ant-design/issues/44386
857
+ [`&:not([class*=" ${n}-col-xs"])`]: {
858
+ flex: "0 0 100%",
859
+ maxWidth: "100%"
860
+ }
861
+ }
862
+ }
863
+ }
864
+ };
865
+ }, Sn = (e) => {
866
+ const {
867
+ componentCls: t,
868
+ formItemCls: r,
869
+ antCls: n
870
+ } = e;
871
+ return {
872
+ [`${t}-vertical`]: {
873
+ [`${r}:not(${r}-horizontal)`]: {
874
+ [`${r}-row`]: {
875
+ flexDirection: "column"
876
+ },
877
+ [`${r}-label > label`]: {
878
+ height: "auto"
879
+ },
880
+ [`${r}-control`]: {
881
+ width: "100%"
882
+ },
883
+ [`${r}-label,
884
+ ${n}-col-24${r}-label,
885
+ ${n}-col-xl-24${r}-label`]: Y(e)
886
+ }
887
+ },
888
+ [`@media (max-width: ${Q(e.screenXSMax)})`]: [tt(e), {
889
+ [t]: {
890
+ [`${r}:not(${r}-horizontal)`]: {
891
+ [`${n}-col-xs-24${r}-label`]: Y(e)
892
+ }
893
+ }
894
+ }],
895
+ [`@media (max-width: ${Q(e.screenSMMax)})`]: {
896
+ [t]: {
897
+ [`${r}:not(${r}-horizontal)`]: {
898
+ [`${n}-col-sm-24${r}-label`]: Y(e)
899
+ }
900
+ }
901
+ },
902
+ [`@media (max-width: ${Q(e.screenMDMax)})`]: {
903
+ [t]: {
904
+ [`${r}:not(${r}-horizontal)`]: {
905
+ [`${n}-col-md-24${r}-label`]: Y(e)
906
+ }
907
+ }
908
+ },
909
+ [`@media (max-width: ${Q(e.screenLGMax)})`]: {
910
+ [t]: {
911
+ [`${r}:not(${r}-horizontal)`]: {
912
+ [`${n}-col-lg-24${r}-label`]: Y(e)
913
+ }
914
+ }
915
+ }
916
+ };
917
+ }, En = (e) => {
918
+ const {
919
+ formItemCls: t,
920
+ antCls: r
921
+ } = e;
922
+ return {
923
+ [`${t}-vertical`]: {
924
+ [`${t}-row`]: {
925
+ flexDirection: "column"
926
+ },
927
+ [`${t}-label > label`]: {
928
+ height: "auto"
929
+ },
930
+ [`${t}-control`]: {
931
+ width: "100%"
932
+ }
933
+ },
934
+ [`${t}-vertical ${t}-label,
935
+ ${r}-col-24${t}-label,
936
+ ${r}-col-xl-24${t}-label`]: Y(e),
937
+ [`@media (max-width: ${Q(e.screenXSMax)})`]: [tt(e), {
938
+ [t]: {
939
+ [`${r}-col-xs-24${t}-label`]: Y(e)
940
+ }
941
+ }],
942
+ [`@media (max-width: ${Q(e.screenSMMax)})`]: {
943
+ [t]: {
944
+ [`${r}-col-sm-24${t}-label`]: Y(e)
945
+ }
946
+ },
947
+ [`@media (max-width: ${Q(e.screenMDMax)})`]: {
948
+ [t]: {
949
+ [`${r}-col-md-24${t}-label`]: Y(e)
950
+ }
951
+ },
952
+ [`@media (max-width: ${Q(e.screenLGMax)})`]: {
953
+ [t]: {
954
+ [`${r}-col-lg-24${t}-label`]: Y(e)
955
+ }
956
+ }
957
+ };
958
+ }, On = (e) => ({
959
+ labelRequiredMarkColor: e.colorError,
960
+ labelColor: e.colorTextHeading,
961
+ labelFontSize: e.fontSize,
962
+ labelHeight: e.controlHeight,
963
+ labelColonMarginInlineStart: e.marginXXS / 2,
964
+ labelColonMarginInlineEnd: e.marginXS,
965
+ itemMarginBottom: e.marginLG,
966
+ verticalLabelPadding: `0 0 ${e.paddingXS}px`,
967
+ verticalLabelMargin: 0,
968
+ inlineItemMarginBottom: 0
969
+ }), nt = (e, t) => ke(e, {
970
+ formItemCls: `${e.componentCls}-item`,
971
+ rootPrefixCls: t
972
+ }), Ie = we("Form", (e, t) => {
973
+ let {
974
+ rootPrefixCls: r
975
+ } = t;
976
+ const n = nt(e, r);
977
+ return [Cn(n), vn(n), $n(n), Ae(n, n.componentCls), Ae(n, n.formItemCls), wn(n), Sn(n), En(n), nn(n), Je];
978
+ }, On, {
979
+ // Let From style before the Grid
980
+ // ref https://github.com/ant-design/ant-design/issues/44386
981
+ order: -1e3
982
+ }), ze = [];
983
+ function Ce(e, t, r) {
984
+ let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
985
+ return {
986
+ key: typeof e == "string" ? e : `${t}-${n}`,
987
+ error: e,
988
+ errorStatus: r
989
+ };
990
+ }
991
+ const rt = (e) => {
992
+ let {
993
+ help: t,
994
+ helpStatus: r,
995
+ errors: n = ze,
996
+ warnings: o = ze,
997
+ className: s,
998
+ fieldId: a,
999
+ onVisibleChanged: l
1000
+ } = e;
1001
+ const {
1002
+ prefixCls: c
1003
+ } = i.useContext(Se), f = `${c}-item-explain`, y = Ee(c), [$, O, R] = Ie(c, y), S = i.useMemo(() => Ve(c), [c]), E = he(n), I = he(o), m = i.useMemo(() => t != null ? [Ce(t, "help", r)] : [].concat(K(E.map((h, p) => Ce(h, "error", "error", p))), K(I.map((h, p) => Ce(h, "warning", "warning", p)))), [t, r, E, I]), N = i.useMemo(() => {
1004
+ const h = {};
1005
+ return m.forEach((p) => {
1006
+ let {
1007
+ key: b
1008
+ } = p;
1009
+ h[b] = (h[b] || 0) + 1;
1010
+ }), m.map((p, b) => Object.assign(Object.assign({}, p), {
1011
+ key: h[p.key] > 1 ? `${p.key}-fallback-${b}` : p.key
1012
+ }));
1013
+ }, [m]), u = {};
1014
+ return a && (u.id = `${a}_help`), $(/* @__PURE__ */ i.createElement(gt, {
1015
+ motionDeadline: S.motionDeadline,
1016
+ motionName: `${c}-show-help`,
1017
+ visible: !!N.length,
1018
+ onVisibleChanged: l
1019
+ }, (h) => {
1020
+ const {
1021
+ className: p,
1022
+ style: b
1023
+ } = h;
1024
+ return /* @__PURE__ */ i.createElement("div", Object.assign({}, u, {
1025
+ className: J(f, p, R, y, s, O),
1026
+ style: b,
1027
+ role: "alert"
1028
+ }), /* @__PURE__ */ i.createElement(ht, Object.assign({
1029
+ keys: N
1030
+ }, Ve(c), {
1031
+ motionName: `${c}-show-help-item`,
1032
+ component: !1
1033
+ }), (V) => {
1034
+ const {
1035
+ key: v,
1036
+ error: x,
1037
+ errorStatus: g,
1038
+ className: j,
1039
+ style: H
1040
+ } = V;
1041
+ return /* @__PURE__ */ i.createElement("div", {
1042
+ key: v,
1043
+ className: J(j, {
1044
+ [`${f}-${g}`]: g
1045
+ }),
1046
+ style: H
1047
+ }, x);
1048
+ }));
1049
+ }));
1050
+ }, In = ["parentNode"], Mn = "form_item";
1051
+ function le(e) {
1052
+ return e === void 0 || e === !1 ? [] : Array.isArray(e) ? e : [e];
1053
+ }
1054
+ function ot(e, t) {
1055
+ if (!e.length)
1056
+ return;
1057
+ const r = e.join("_");
1058
+ return t ? `${t}_${r}` : In.includes(r) ? `${Mn}_${r}` : r;
1059
+ }
1060
+ function st(e, t, r, n, o, s) {
1061
+ let a = n;
1062
+ return s !== void 0 ? a = s : r.validating ? a = "validating" : e.length ? a = "error" : t.length ? a = "warning" : (r.touched || o && r.validated) && (a = "success"), a;
1063
+ }
1064
+ function qe(e) {
1065
+ return le(e).join("_");
1066
+ }
1067
+ function Be(e, t) {
1068
+ const r = t.getFieldInstance(e), n = bt(r);
1069
+ if (n)
1070
+ return n;
1071
+ const o = ot(le(e), t.__INTERNAL__.name);
1072
+ if (o)
1073
+ return document.getElementById(o);
1074
+ }
1075
+ function it(e) {
1076
+ const [t] = jt(), r = i.useRef({}), n = i.useMemo(() => e ?? Object.assign(Object.assign({}, t), {
1077
+ __INTERNAL__: {
1078
+ itemRef: (o) => (s) => {
1079
+ const a = qe(o);
1080
+ s ? r.current[a] = s : delete r.current[a];
1081
+ }
1082
+ },
1083
+ scrollToField: function(o) {
1084
+ let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1085
+ const a = Be(o, n);
1086
+ a && tn(a, Object.assign({
1087
+ scrollMode: "if-needed",
1088
+ block: "nearest"
1089
+ }, s));
1090
+ },
1091
+ focusField: (o) => {
1092
+ var s;
1093
+ const a = Be(o, n);
1094
+ a && ((s = a.focus) === null || s === void 0 || s.call(a));
1095
+ },
1096
+ getFieldInstance: (o) => {
1097
+ const s = qe(o);
1098
+ return r.current[s];
1099
+ }
1100
+ }), [e, t]);
1101
+ return [n];
1102
+ }
1103
+ const pe = {};
1104
+ function Fn(e) {
1105
+ let {
1106
+ name: t
1107
+ } = e;
1108
+ const r = be("Form");
1109
+ i.useEffect(() => {
1110
+ if (t)
1111
+ return pe[t] = (pe[t] || 0) + 1, process.env.NODE_ENV !== "production" && r(pe[t] <= 1, "usage", "There exist multiple Form with same `name`."), () => {
1112
+ pe[t] -= 1;
1113
+ };
1114
+ }, [t]);
1115
+ }
1116
+ var Nn = function(e, t) {
1117
+ var r = {};
1118
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
1119
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
1120
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1121
+ return r;
1122
+ };
1123
+ const jn = (e, t) => {
1124
+ const r = i.useContext(yt), {
1125
+ getPrefixCls: n,
1126
+ direction: o,
1127
+ form: s
1128
+ } = i.useContext(ue), {
1129
+ prefixCls: a,
1130
+ className: l,
1131
+ rootClassName: c,
1132
+ size: f,
1133
+ disabled: y = r,
1134
+ form: $,
1135
+ colon: O,
1136
+ labelAlign: R,
1137
+ labelWrap: S,
1138
+ labelCol: E,
1139
+ wrapperCol: I,
1140
+ hideRequiredMark: m,
1141
+ layout: N = "horizontal",
1142
+ scrollToFirstError: u,
1143
+ requiredMark: h,
1144
+ onFinishFailed: p,
1145
+ name: b,
1146
+ style: V,
1147
+ feedbackIcons: v,
1148
+ variant: x
1149
+ } = e, g = Nn(e, ["prefixCls", "className", "rootClassName", "size", "disabled", "form", "colon", "labelAlign", "labelWrap", "labelCol", "wrapperCol", "hideRequiredMark", "layout", "scrollToFirstError", "requiredMark", "onFinishFailed", "name", "style", "feedbackIcons", "variant"]), j = qt(f), H = i.useContext($t);
1150
+ process.env.NODE_ENV !== "production" && Fn(e);
1151
+ const F = i.useMemo(() => h !== void 0 ? h : m ? !1 : s && s.requiredMark !== void 0 ? s.requiredMark : !0, [m, h, s]), C = O ?? (s == null ? void 0 : s.colon), P = n("form", a), A = Ee(P), [d, z, w] = Ie(P, A), q = J(P, `${P}-${N}`, {
1152
+ [`${P}-hide-required-mark`]: F === !1,
1153
+ [`${P}-rtl`]: o === "rtl",
1154
+ [`${P}-${j}`]: j
1155
+ }, w, A, z, s == null ? void 0 : s.className, l, c), [T] = it($), {
1156
+ __INTERNAL__: G
1157
+ } = T;
1158
+ G.name = b;
1159
+ const X = i.useMemo(() => ({
1160
+ name: b,
1161
+ labelAlign: R,
1162
+ labelCol: E,
1163
+ labelWrap: S,
1164
+ wrapperCol: I,
1165
+ vertical: N === "vertical",
1166
+ colon: C,
1167
+ requiredMark: F,
1168
+ itemRef: G.itemRef,
1169
+ form: T,
1170
+ feedbackIcons: v
1171
+ }), [b, R, E, I, N, C, F, T, v]), U = i.useRef(null);
1172
+ i.useImperativeHandle(t, () => {
1173
+ var L;
1174
+ return Object.assign(Object.assign({}, T), {
1175
+ nativeElement: (L = U.current) === null || L === void 0 ? void 0 : L.nativeElement
1176
+ });
1177
+ });
1178
+ const ee = (L, M) => {
1179
+ if (L) {
1180
+ let _ = {
1181
+ block: "nearest"
1182
+ };
1183
+ typeof L == "object" && (_ = Object.assign(Object.assign({}, _), L)), T.scrollToField(M, _), _.focus && T.focusField(M);
1184
+ }
1185
+ }, te = (L) => {
1186
+ if (p == null || p(L), L.errorFields.length) {
1187
+ const M = L.errorFields[0].name;
1188
+ if (u !== void 0) {
1189
+ ee(u, M);
1190
+ return;
1191
+ }
1192
+ s && s.scrollToFirstError !== void 0 && ee(s.scrollToFirstError, M);
1193
+ }
1194
+ };
1195
+ return d(/* @__PURE__ */ i.createElement(_t.Provider, {
1196
+ value: x
1197
+ }, /* @__PURE__ */ i.createElement(xt, {
1198
+ disabled: y
1199
+ }, /* @__PURE__ */ i.createElement(Ct.Provider, {
1200
+ value: j
1201
+ }, /* @__PURE__ */ i.createElement(Ye, {
1202
+ // This is not list in API, we pass with spread
1203
+ validateMessages: H
1204
+ }, /* @__PURE__ */ i.createElement(re.Provider, {
1205
+ value: X
1206
+ }, /* @__PURE__ */ i.createElement(Rt, Object.assign({
1207
+ id: b
1208
+ }, g, {
1209
+ name: b,
1210
+ onFinishFailed: te,
1211
+ form: T,
1212
+ ref: U,
1213
+ style: Object.assign(Object.assign({}, s == null ? void 0 : s.style), V),
1214
+ className: q
1215
+ }))))))));
1216
+ }, at = /* @__PURE__ */ i.forwardRef(jn);
1217
+ process.env.NODE_ENV !== "production" && (at.displayName = "Form");
1218
+ function _n(e) {
1219
+ if (typeof e == "function")
1220
+ return e;
1221
+ const t = Xt(e);
1222
+ return t.length <= 1 ? t[0] : t;
1223
+ }
1224
+ const lt = () => {
1225
+ const {
1226
+ status: e,
1227
+ errors: t = [],
1228
+ warnings: r = []
1229
+ } = i.useContext(ge);
1230
+ if (process.env.NODE_ENV !== "production") {
1231
+ const n = be("Form.Item");
1232
+ process.env.NODE_ENV !== "production" && n(e !== void 0, "usage", "Form.Item.useStatus should be used under Form.Item component. For more information: https://u.ant.design/form-item-usestatus");
1233
+ }
1234
+ return {
1235
+ status: e,
1236
+ errors: t,
1237
+ warnings: r
1238
+ };
1239
+ };
1240
+ lt.Context = ge;
1241
+ function Rn(e) {
1242
+ const [t, r] = i.useState(e), n = i.useRef(null), o = i.useRef([]), s = i.useRef(!1);
1243
+ i.useEffect(() => (s.current = !1, () => {
1244
+ s.current = !0, _e.cancel(n.current), n.current = null;
1245
+ }), []);
1246
+ function a(l) {
1247
+ s.current || (n.current === null && (o.current = [], n.current = _e(() => {
1248
+ n.current = null, r((c) => {
1249
+ let f = c;
1250
+ return o.current.forEach((y) => {
1251
+ f = y(f);
1252
+ }), f;
1253
+ });
1254
+ })), o.current.push(l));
1255
+ }
1256
+ return [t, a];
1257
+ }
1258
+ function Vn() {
1259
+ const {
1260
+ itemRef: e
1261
+ } = i.useContext(re), t = i.useRef({});
1262
+ function r(n, o) {
1263
+ const s = o && typeof o == "object" && vt(o), a = n.join("_");
1264
+ return (t.current.name !== a || t.current.originRef !== s) && (t.current.name = a, t.current.originRef = s, t.current.ref = wt(e(n), s)), t.current.ref;
1265
+ }
1266
+ return r;
1267
+ }
1268
+ const Pn = (e) => {
1269
+ const {
1270
+ formItemCls: t
1271
+ } = e;
1272
+ return {
1273
+ "@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)": {
1274
+ // Fallback for IE, safe to remove we not support it anymore
1275
+ [`${t}-control`]: {
1276
+ display: "flex"
1277
+ }
1278
+ }
1279
+ };
1280
+ }, Dn = St(["Form", "item-item"], (e, t) => {
1281
+ let {
1282
+ rootPrefixCls: r
1283
+ } = t;
1284
+ const n = nt(e, r);
1285
+ return [Pn(n)];
1286
+ });
1287
+ var Ln = function(e, t) {
1288
+ var r = {};
1289
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
1290
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
1291
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1292
+ return r;
1293
+ };
1294
+ const Tn = 24, Wn = (e) => {
1295
+ const {
1296
+ prefixCls: t,
1297
+ status: r,
1298
+ labelCol: n,
1299
+ wrapperCol: o,
1300
+ children: s,
1301
+ errors: a,
1302
+ warnings: l,
1303
+ _internalItemRender: c,
1304
+ extra: f,
1305
+ help: y,
1306
+ fieldId: $,
1307
+ marginBottom: O,
1308
+ onErrorVisibleChanged: R,
1309
+ label: S
1310
+ } = e, E = `${t}-item`, I = i.useContext(re), m = i.useMemo(() => {
1311
+ let C = Object.assign({}, o || I.wrapperCol || {});
1312
+ return S === null && !n && !o && I.labelCol && [void 0, "xs", "sm", "md", "lg", "xl", "xxl"].forEach((A) => {
1313
+ const d = A ? [A] : [], z = Re(I.labelCol, d), w = typeof z == "object" ? z : {}, q = Re(C, d), T = typeof q == "object" ? q : {};
1314
+ "span" in w && !("offset" in T) && w.span < Tn && (C = Et(C, [].concat(d, ["offset"]), w.span));
1315
+ }), C;
1316
+ }, [o, I]), N = J(`${E}-control`, m.className), u = i.useMemo(() => Ln(I, ["labelCol", "wrapperCol"]), [I]), h = i.useRef(null), [p, b] = i.useState(0);
1317
+ Ke(() => {
1318
+ f && h.current ? b(h.current.clientHeight) : b(0);
1319
+ }, [f]);
1320
+ const V = /* @__PURE__ */ i.createElement("div", {
1321
+ className: `${E}-control-input`
1322
+ }, /* @__PURE__ */ i.createElement("div", {
1323
+ className: `${E}-control-input-content`
1324
+ }, s)), v = i.useMemo(() => ({
1325
+ prefixCls: t,
1326
+ status: r
1327
+ }), [t, r]), x = O !== null || a.length || l.length ? /* @__PURE__ */ i.createElement(Se.Provider, {
1328
+ value: v
1329
+ }, /* @__PURE__ */ i.createElement(rt, {
1330
+ fieldId: $,
1331
+ errors: a,
1332
+ warnings: l,
1333
+ help: y,
1334
+ helpStatus: r,
1335
+ className: `${E}-explain-connected`,
1336
+ onVisibleChanged: R
1337
+ })) : null, g = {};
1338
+ $ && (g.id = `${$}_extra`);
1339
+ const j = f ? /* @__PURE__ */ i.createElement("div", Object.assign({}, g, {
1340
+ className: `${E}-extra`,
1341
+ ref: h
1342
+ }), f) : null, H = x || j ? /* @__PURE__ */ i.createElement("div", {
1343
+ className: `${E}-additional`,
1344
+ style: O ? {
1345
+ minHeight: O + p
1346
+ } : {}
1347
+ }, x, j) : null, F = c && c.mark === "pro_table_render" && c.render ? c.render(e, {
1348
+ input: V,
1349
+ errorList: x,
1350
+ extra: j
1351
+ }) : /* @__PURE__ */ i.createElement(i.Fragment, null, V, H);
1352
+ return /* @__PURE__ */ i.createElement(re.Provider, {
1353
+ value: u
1354
+ }, /* @__PURE__ */ i.createElement(Oe, Object.assign({}, m, {
1355
+ className: N
1356
+ }), F), /* @__PURE__ */ i.createElement(Dn, {
1357
+ prefixCls: t
1358
+ }));
1359
+ };
1360
+ var Hn = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z" } }] }, name: "question-circle", theme: "outlined" }, An = function(t, r) {
1361
+ return /* @__PURE__ */ i.createElement(Kt, Ot({}, t, {
1362
+ ref: r,
1363
+ icon: Hn
1364
+ }));
1365
+ }, ct = /* @__PURE__ */ i.forwardRef(An);
1366
+ process.env.NODE_ENV !== "production" && (ct.displayName = "QuestionCircleOutlined");
1367
+ var zn = function(e, t) {
1368
+ var r = {};
1369
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
1370
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
1371
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1372
+ return r;
1373
+ };
1374
+ function qn(e) {
1375
+ return e ? typeof e == "object" && !/* @__PURE__ */ i.isValidElement(e) ? e : {
1376
+ title: e
1377
+ } : null;
1378
+ }
1379
+ const Bn = (e) => {
1380
+ let {
1381
+ prefixCls: t,
1382
+ label: r,
1383
+ htmlFor: n,
1384
+ labelCol: o,
1385
+ labelAlign: s,
1386
+ colon: a,
1387
+ required: l,
1388
+ requiredMark: c,
1389
+ tooltip: f,
1390
+ vertical: y
1391
+ } = e;
1392
+ var $;
1393
+ const [O] = At("Form"), {
1394
+ labelAlign: R,
1395
+ labelCol: S,
1396
+ labelWrap: E,
1397
+ colon: I
1398
+ } = i.useContext(re);
1399
+ if (!r)
1400
+ return null;
1401
+ const m = o || S || {}, N = s || R, u = `${t}-item-label`, h = J(u, N === "left" && `${u}-left`, m.className, {
1402
+ [`${u}-wrap`]: !!E
1403
+ });
1404
+ let p = r;
1405
+ const b = a === !0 || I !== !1 && a !== !1;
1406
+ b && !y && typeof r == "string" && r.trim() && (p = r.replace(/[:|:]\s*$/, ""));
1407
+ const v = qn(f);
1408
+ if (v) {
1409
+ const {
1410
+ icon: H = /* @__PURE__ */ i.createElement(ct, null)
1411
+ } = v, F = zn(v, ["icon"]), C = /* @__PURE__ */ i.createElement(zt, Object.assign({}, F), /* @__PURE__ */ i.cloneElement(H, {
1412
+ className: `${t}-item-tooltip`,
1413
+ title: "",
1414
+ onClick: (P) => {
1415
+ P.preventDefault();
1416
+ },
1417
+ tabIndex: null
1418
+ }));
1419
+ p = /* @__PURE__ */ i.createElement(i.Fragment, null, p, C);
1420
+ }
1421
+ const x = c === "optional", g = typeof c == "function";
1422
+ g ? p = c(p, {
1423
+ required: !!l
1424
+ }) : x && !l && (p = /* @__PURE__ */ i.createElement(i.Fragment, null, p, /* @__PURE__ */ i.createElement("span", {
1425
+ className: `${t}-item-optional`,
1426
+ title: ""
1427
+ }, (O == null ? void 0 : O.optional) || (($ = It.Form) === null || $ === void 0 ? void 0 : $.optional))));
1428
+ const j = J({
1429
+ [`${t}-item-required`]: l,
1430
+ [`${t}-item-required-mark-optional`]: x || g,
1431
+ [`${t}-item-no-colon`]: !b
1432
+ });
1433
+ return /* @__PURE__ */ i.createElement(Oe, Object.assign({}, m, {
1434
+ className: h
1435
+ }), /* @__PURE__ */ i.createElement("label", {
1436
+ htmlFor: n,
1437
+ className: j,
1438
+ title: typeof r == "string" ? r : ""
1439
+ }, p));
1440
+ }, Gn = {
1441
+ success: Yt,
1442
+ warning: Qt,
1443
+ error: Jt,
1444
+ validating: Bt
1445
+ };
1446
+ function ut(e) {
1447
+ let {
1448
+ children: t,
1449
+ errors: r,
1450
+ warnings: n,
1451
+ hasFeedback: o,
1452
+ validateStatus: s,
1453
+ prefixCls: a,
1454
+ meta: l,
1455
+ noStyle: c
1456
+ } = e;
1457
+ const f = `${a}-item`, {
1458
+ feedbackIcons: y
1459
+ } = i.useContext(re), $ = st(r, n, l, null, !!o, s), {
1460
+ isFormItemInput: O,
1461
+ status: R,
1462
+ hasFeedback: S,
1463
+ feedbackIcon: E
1464
+ } = i.useContext(ge), I = i.useMemo(() => {
1465
+ var m;
1466
+ let N;
1467
+ if (o) {
1468
+ const h = o !== !0 && o.icons || y, p = $ && ((m = h == null ? void 0 : h({
1469
+ status: $,
1470
+ errors: r,
1471
+ warnings: n
1472
+ })) === null || m === void 0 ? void 0 : m[$]), b = $ && Gn[$];
1473
+ N = p !== !1 && b ? /* @__PURE__ */ i.createElement("span", {
1474
+ className: J(`${f}-feedback-icon`, `${f}-feedback-icon-${$}`)
1475
+ }, p || /* @__PURE__ */ i.createElement(b, null)) : null;
1476
+ }
1477
+ const u = {
1478
+ status: $ || "",
1479
+ errors: r,
1480
+ warnings: n,
1481
+ hasFeedback: !!o,
1482
+ feedbackIcon: N,
1483
+ isFormItemInput: !0
1484
+ };
1485
+ return c && (u.status = ($ ?? R) || "", u.isFormItemInput = O, u.hasFeedback = !!(o ?? S), u.feedbackIcon = o !== void 0 ? u.feedbackIcon : E), u;
1486
+ }, [$, o, c, O, R]);
1487
+ return /* @__PURE__ */ i.createElement(ge.Provider, {
1488
+ value: I
1489
+ }, t);
1490
+ }
1491
+ var Xn = function(e, t) {
1492
+ var r = {};
1493
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
1494
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
1495
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1496
+ return r;
1497
+ };
1498
+ function kn(e) {
1499
+ const {
1500
+ prefixCls: t,
1501
+ className: r,
1502
+ rootClassName: n,
1503
+ style: o,
1504
+ help: s,
1505
+ errors: a,
1506
+ warnings: l,
1507
+ validateStatus: c,
1508
+ meta: f,
1509
+ hasFeedback: y,
1510
+ hidden: $,
1511
+ children: O,
1512
+ fieldId: R,
1513
+ required: S,
1514
+ isRequired: E,
1515
+ onSubItemMetaChange: I,
1516
+ layout: m
1517
+ } = e, N = Xn(e, ["prefixCls", "className", "rootClassName", "style", "help", "errors", "warnings", "validateStatus", "meta", "hasFeedback", "hidden", "children", "fieldId", "required", "isRequired", "onSubItemMetaChange", "layout"]), u = `${t}-item`, {
1518
+ requiredMark: h,
1519
+ vertical: p
1520
+ } = i.useContext(re), b = p || m === "vertical", V = i.useRef(null), v = he(a), x = he(l), g = s != null, j = !!(g || a.length || l.length), H = !!V.current && kt(V.current), [F, C] = i.useState(null);
1521
+ Ke(() => {
1522
+ if (j && V.current) {
1523
+ const w = getComputedStyle(V.current);
1524
+ C(parseInt(w.marginBottom, 10));
1525
+ }
1526
+ }, [j, H]);
1527
+ const P = (w) => {
1528
+ w || C(null);
1529
+ }, d = function() {
1530
+ let w = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
1531
+ const q = w ? v : f.errors, T = w ? x : f.warnings;
1532
+ return st(q, T, f, "", !!y, c);
1533
+ }(), z = J(u, r, n, {
1534
+ [`${u}-with-help`]: g || v.length || x.length,
1535
+ // Status
1536
+ [`${u}-has-feedback`]: d && y,
1537
+ [`${u}-has-success`]: d === "success",
1538
+ [`${u}-has-warning`]: d === "warning",
1539
+ [`${u}-has-error`]: d === "error",
1540
+ [`${u}-is-validating`]: d === "validating",
1541
+ [`${u}-hidden`]: $,
1542
+ // Layout
1543
+ [`${u}-${m}`]: m
1544
+ });
1545
+ return /* @__PURE__ */ i.createElement("div", {
1546
+ className: z,
1547
+ style: o,
1548
+ ref: V
1549
+ }, /* @__PURE__ */ i.createElement(et, Object.assign({
1550
+ className: `${u}-row`
1551
+ }, Ut(N, [
1552
+ "_internalItemRender",
1553
+ "colon",
1554
+ "dependencies",
1555
+ "extra",
1556
+ "fieldKey",
1557
+ "getValueFromEvent",
1558
+ "getValueProps",
1559
+ "htmlFor",
1560
+ "id",
1561
+ // It is deprecated because `htmlFor` is its replacement.
1562
+ "initialValue",
1563
+ "isListField",
1564
+ "label",
1565
+ "labelAlign",
1566
+ "labelCol",
1567
+ "labelWrap",
1568
+ "messageVariables",
1569
+ "name",
1570
+ "normalize",
1571
+ "noStyle",
1572
+ "preserve",
1573
+ "requiredMark",
1574
+ "rules",
1575
+ "shouldUpdate",
1576
+ "trigger",
1577
+ "tooltip",
1578
+ "validateFirst",
1579
+ "validateTrigger",
1580
+ "valuePropName",
1581
+ "wrapperCol",
1582
+ "validateDebounce"
1583
+ ])), /* @__PURE__ */ i.createElement(Bn, Object.assign({
1584
+ htmlFor: R
1585
+ }, e, {
1586
+ requiredMark: h,
1587
+ required: S ?? E,
1588
+ prefixCls: t,
1589
+ vertical: b
1590
+ })), /* @__PURE__ */ i.createElement(Wn, Object.assign({}, e, f, {
1591
+ errors: v,
1592
+ warnings: x,
1593
+ prefixCls: t,
1594
+ status: d,
1595
+ help: s,
1596
+ marginBottom: F,
1597
+ onErrorVisibleChanged: P
1598
+ }), /* @__PURE__ */ i.createElement(Qe.Provider, {
1599
+ value: I
1600
+ }, /* @__PURE__ */ i.createElement(ut, {
1601
+ prefixCls: t,
1602
+ meta: f,
1603
+ errors: f.errors,
1604
+ warnings: f.warnings,
1605
+ hasFeedback: y,
1606
+ // Already calculated
1607
+ validateStatus: d
1608
+ }, O)))), !!F && /* @__PURE__ */ i.createElement("div", {
1609
+ className: `${u}-margin-offset`,
1610
+ style: {
1611
+ marginBottom: -F
1612
+ }
1613
+ }));
1614
+ }
1615
+ const Un = "__SPLIT__";
1616
+ function Kn(e, t) {
1617
+ const r = Object.keys(e), n = Object.keys(t);
1618
+ return r.length === n.length && r.every((o) => {
1619
+ const s = e[o], a = t[o];
1620
+ return s === a || typeof s == "function" || typeof a == "function";
1621
+ });
1622
+ }
1623
+ const Yn = /* @__PURE__ */ i.memo((e) => {
1624
+ let {
1625
+ children: t
1626
+ } = e;
1627
+ return t;
1628
+ }, (e, t) => Kn(e.control, t.control) && e.update === t.update && e.childProps.length === t.childProps.length && e.childProps.every((r, n) => r === t.childProps[n]));
1629
+ function Ge() {
1630
+ return {
1631
+ errors: [],
1632
+ warnings: [],
1633
+ touched: !1,
1634
+ validating: !1,
1635
+ name: [],
1636
+ validated: !1
1637
+ };
1638
+ }
1639
+ function Qn(e) {
1640
+ const {
1641
+ name: t,
1642
+ noStyle: r,
1643
+ className: n,
1644
+ dependencies: o,
1645
+ prefixCls: s,
1646
+ shouldUpdate: a,
1647
+ rules: l,
1648
+ children: c,
1649
+ required: f,
1650
+ label: y,
1651
+ messageVariables: $,
1652
+ trigger: O = "onChange",
1653
+ validateTrigger: R,
1654
+ hidden: S,
1655
+ help: E,
1656
+ layout: I
1657
+ } = e, {
1658
+ getPrefixCls: m
1659
+ } = i.useContext(ue), {
1660
+ name: N
1661
+ } = i.useContext(re), u = _n(c), h = typeof u == "function", p = i.useContext(Qe), {
1662
+ validateTrigger: b
1663
+ } = i.useContext(Vt), V = R !== void 0 ? R : b, v = t != null, x = m("form", s), g = Ee(x), [j, H, F] = Ie(x, g), C = be("Form.Item");
1664
+ process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && C(t !== null, "usage", "`null` is passed as `name` property");
1665
+ const P = i.useContext(Pt), A = i.useRef(null), [d, z] = Rn({}), [w, q] = Mt(() => Ge()), T = (M) => {
1666
+ const _ = P == null ? void 0 : P.getKey(M.name);
1667
+ if (q(M.destroy ? Ge() : M, !0), r && E !== !1 && p) {
1668
+ let D = M.name;
1669
+ if (M.destroy)
1670
+ D = A.current || D;
1671
+ else if (_ !== void 0) {
1672
+ const [B, k] = _;
1673
+ D = [B].concat(K(k)), A.current = D;
1674
+ }
1675
+ p(M, D);
1676
+ }
1677
+ }, G = (M, _) => {
1678
+ z((D) => {
1679
+ const B = Object.assign({}, D), ne = [].concat(K(M.name.slice(0, -1)), K(_)).join(Un);
1680
+ return M.destroy ? delete B[ne] : B[ne] = M, B;
1681
+ });
1682
+ }, [X, U] = i.useMemo(() => {
1683
+ const M = K(w.errors), _ = K(w.warnings);
1684
+ return Object.values(d).forEach((D) => {
1685
+ M.push.apply(M, K(D.errors || [])), _.push.apply(_, K(D.warnings || []));
1686
+ }), [M, _];
1687
+ }, [d, w.errors, w.warnings]), ee = Vn();
1688
+ function te(M, _, D) {
1689
+ return r && !S ? /* @__PURE__ */ i.createElement(ut, {
1690
+ prefixCls: x,
1691
+ hasFeedback: e.hasFeedback,
1692
+ validateStatus: e.validateStatus,
1693
+ meta: w,
1694
+ errors: X,
1695
+ warnings: U,
1696
+ noStyle: !0
1697
+ }, M) : /* @__PURE__ */ i.createElement(kn, Object.assign({
1698
+ key: "row"
1699
+ }, e, {
1700
+ className: J(n, F, g, H),
1701
+ prefixCls: x,
1702
+ fieldId: _,
1703
+ isRequired: D,
1704
+ errors: X,
1705
+ warnings: U,
1706
+ meta: w,
1707
+ onSubItemMetaChange: G,
1708
+ layout: I
1709
+ }), M);
1710
+ }
1711
+ if (!v && !h && !o)
1712
+ return j(te(u));
1713
+ let L = {};
1714
+ return typeof y == "string" ? L.label = y : t && (L.label = String(t)), $ && (L = Object.assign(Object.assign({}, L), $)), j(/* @__PURE__ */ i.createElement(Dt, Object.assign({}, e, {
1715
+ messageVariables: L,
1716
+ trigger: O,
1717
+ validateTrigger: V,
1718
+ onMetaChange: T
1719
+ }), (M, _, D) => {
1720
+ const B = le(t).length && _ ? _.name : [], k = ot(B, N), ne = f !== void 0 ? f : !!(l != null && l.some((W) => {
1721
+ if (W && typeof W == "object" && W.required && !W.warningOnly)
1722
+ return !0;
1723
+ if (typeof W == "function") {
1724
+ const ie = W(D);
1725
+ return (ie == null ? void 0 : ie.required) && !(ie != null && ie.warningOnly);
1726
+ }
1727
+ return !1;
1728
+ })), oe = Object.assign({}, M);
1729
+ let se = null;
1730
+ if (process.env.NODE_ENV !== "production" && C(!(a && o), "usage", "`shouldUpdate` and `dependencies` shouldn't be used together. See https://u.ant.design/form-deps."), Array.isArray(u) && v)
1731
+ process.env.NODE_ENV !== "production" && C(!1, "usage", "A `Form.Item` with a `name` prop must have a single child element. For information on how to render more complex form items, see https://u.ant.design/complex-form-item."), se = u;
1732
+ else if (h && (!(a || o) || v))
1733
+ process.env.NODE_ENV !== "production" && C(!!(a || o), "usage", "A `Form.Item` with a render function must have either `shouldUpdate` or `dependencies`."), process.env.NODE_ENV !== "production" && C(!v, "usage", "A `Form.Item` with a render function cannot be a field, and thus cannot have a `name` prop.");
1734
+ else if (o && !h && !v)
1735
+ process.env.NODE_ENV !== "production" && C(!1, "usage", "Must set `name` or use a render function when `dependencies` is set.");
1736
+ else if (/* @__PURE__ */ i.isValidElement(u)) {
1737
+ process.env.NODE_ENV !== "production" && C(u.props.defaultValue === void 0, "usage", "`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.");
1738
+ const W = Object.assign(Object.assign({}, u.props), oe);
1739
+ if (W.id || (W.id = k), E || X.length > 0 || U.length > 0 || e.extra) {
1740
+ const ae = [];
1741
+ (E || X.length > 0) && ae.push(`${k}_help`), e.extra && ae.push(`${k}_extra`), W["aria-describedby"] = ae.join(" ");
1742
+ }
1743
+ X.length > 0 && (W["aria-invalid"] = "true"), ne && (W["aria-required"] = "true"), Ft(u) && (W.ref = ee(B, u)), new Set([].concat(K(le(O)), K(le(V)))).forEach((ae) => {
1744
+ W[ae] = function() {
1745
+ for (var Me, Fe, ye, Ne, $e, je = arguments.length, xe = new Array(je), de = 0; de < je; de++)
1746
+ xe[de] = arguments[de];
1747
+ (ye = oe[ae]) === null || ye === void 0 || (Me = ye).call.apply(Me, [oe].concat(xe)), ($e = (Ne = u.props)[ae]) === null || $e === void 0 || (Fe = $e).call.apply(Fe, [Ne].concat(xe));
1748
+ };
1749
+ });
1750
+ const ft = [W["aria-required"], W["aria-invalid"], W["aria-describedby"]];
1751
+ se = /* @__PURE__ */ i.createElement(Yn, {
1752
+ control: oe,
1753
+ update: u,
1754
+ childProps: ft
1755
+ }, Gt(u, W));
1756
+ } else h && (a || o) && !v ? se = u(D) : (process.env.NODE_ENV !== "production" && C(!B.length || !!r, "usage", "`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead."), se = u);
1757
+ return te(se, k, ne);
1758
+ }));
1759
+ }
1760
+ const dt = Qn;
1761
+ dt.useStatus = lt;
1762
+ var Jn = function(e, t) {
1763
+ var r = {};
1764
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
1765
+ if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
1766
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1767
+ return r;
1768
+ };
1769
+ const Zn = (e) => {
1770
+ var {
1771
+ prefixCls: t,
1772
+ children: r
1773
+ } = e, n = Jn(e, ["prefixCls", "children"]);
1774
+ if (process.env.NODE_ENV !== "production") {
1775
+ const l = be("Form.List");
1776
+ process.env.NODE_ENV !== "production" && l(typeof n.name == "number" || (Array.isArray(n.name) ? !!n.name.length : !!n.name), "usage", "Miss `name` prop.");
1777
+ }
1778
+ const {
1779
+ getPrefixCls: o
1780
+ } = i.useContext(ue), s = o("form", t), a = i.useMemo(() => ({
1781
+ prefixCls: s,
1782
+ status: "error"
1783
+ }), [s]);
1784
+ return /* @__PURE__ */ i.createElement(Lt, Object.assign({}, n), (l, c, f) => /* @__PURE__ */ i.createElement(Se.Provider, {
1785
+ value: a
1786
+ }, r(l.map((y) => Object.assign(Object.assign({}, y), {
1787
+ fieldKey: y.key
1788
+ })), c, {
1789
+ errors: f.errors,
1790
+ warnings: f.warnings
1791
+ })));
1792
+ };
1793
+ function er() {
1794
+ const {
1795
+ form: e
1796
+ } = i.useContext(re);
1797
+ return e;
1798
+ }
1799
+ const Z = at;
1800
+ Z.Item = dt;
1801
+ Z.List = Zn;
1802
+ Z.ErrorList = rt;
1803
+ Z.useForm = it;
1804
+ Z.useFormInstance = er;
1805
+ Z.useWatch = Tt;
1806
+ Z.Provider = Ye;
1807
+ Z.create = () => {
1808
+ process.env.NODE_ENV !== "production" && Nt(!1, "Form", "antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.");
1809
+ };
1810
+ const pr = ({ ...e }) => /* @__PURE__ */ Xe(Z.Item, { ...e }), gr = ({ children: e, ...t }) => (mt(), /* @__PURE__ */ Xe(Z, { children: e }));
1811
+ export {
1812
+ gr as F,
1813
+ Z as a,
1814
+ pr as b
1815
+ };