@zlooks.cn/password-auth-server 1.1.7 → 1.1.8

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 (20) hide show
  1. package/.hile-rsc/build-mvatymx1-25d8b6c0/client-browser/chunks/chunk-3XS5CUKE.js +252 -0
  2. package/.hile-rsc/build-mvatymx1-25d8b6c0/client-browser/src-plugin-page-frame-07c4de56a6-GLDPP7WQ.css +1 -0
  3. package/.hile-rsc/build-mvatymx1-25d8b6c0/client-browser/src-plugin-page-frame-07c4de56a6-NNLB6KOI.js +16 -0
  4. package/.hile-rsc/build-mvatymx1-25d8b6c0/client-browser/src-plugin-password-form-3bd63d69e5-HJ5W2OPR.js +6 -0
  5. package/.hile-rsc/build-mvatymx1-25d8b6c0/client-browser/src-plugin-password-form-3bd63d69e5-XRKUN4RP.css +1 -0
  6. package/.hile-rsc/build-mvatymx1-25d8b6c0/client-ssr/chunks/chunk-PN3C7DWD.js +123 -0
  7. package/.hile-rsc/build-mvatymx1-25d8b6c0/client-ssr/src-plugin-page-frame-07c4de56a6-VK2OTNLD.js +146 -0
  8. package/.hile-rsc/build-mvatymx1-25d8b6c0/client-ssr/src-plugin-password-form-3bd63d69e5-K3D6TQTX.js +352 -0
  9. package/.hile-rsc/{build-mv634mou-8e8c1ca3 → build-mvatymx1-25d8b6c0}/plugin.json +35 -35
  10. package/.hile-rsc/{build-mv634mou-8e8c1ca3 → build-mvatymx1-25d8b6c0}/server-rsc/index.js +4 -4
  11. package/package.json +5 -5
  12. package/.hile-rsc/build-mv634mou-8e8c1ca3/client-browser/chunks/chunk-UYTFSLNG.js +0 -42775
  13. package/.hile-rsc/build-mv634mou-8e8c1ca3/client-browser/src-plugin-page-frame-07c4de56a6-25BOCBWI.js +0 -2304
  14. package/.hile-rsc/build-mv634mou-8e8c1ca3/client-browser/src-plugin-page-frame-07c4de56a6-3F24AYCH.css +0 -170
  15. package/.hile-rsc/build-mv634mou-8e8c1ca3/client-browser/src-plugin-password-form-3bd63d69e5-GJ25JW7M.js +0 -4768
  16. package/.hile-rsc/build-mv634mou-8e8c1ca3/client-browser/src-plugin-password-form-3bd63d69e5-TRYMJX4F.css +0 -195
  17. package/.hile-rsc/build-mv634mou-8e8c1ca3/client-ssr/chunks/chunk-A2AYEE2Z.js +0 -36628
  18. package/.hile-rsc/build-mv634mou-8e8c1ca3/client-ssr/src-plugin-page-frame-07c4de56a6-WXFM6XOG.js +0 -15601
  19. package/.hile-rsc/build-mv634mou-8e8c1ca3/client-ssr/src-plugin-password-form-3bd63d69e5-ZZ55VGCF.js +0 -120668
  20. /package/.hile-rsc/{build-mv634mou-8e8c1ca3 → build-mvatymx1-25d8b6c0}/styles/4b3193c4f2b317ffed425ccf401342a4bdd6ccfd5f9c42def3315e776f166975.css +0 -0
@@ -1,4768 +0,0 @@
1
- "use client";
2
- import {
3
- AntdIconLight_default,
4
- App_default,
5
- Button_default,
6
- CSSMotionList_default,
7
- CheckCircleFilled_default,
8
- CloseCircleFilled_default,
9
- Compact_default,
10
- ConfigContext,
11
- DisabledContextProvider,
12
- DisabledContext_default,
13
- ExclamationCircleFilled_default,
14
- FieldContext_default,
15
- Field_default,
16
- FormContext,
17
- FormItemInputContext,
18
- FormItemPrefixContext,
19
- FormProvider,
20
- Fragment,
21
- Input_default,
22
- ListContext_default,
23
- List_default,
24
- LoadingOutlined_default,
25
- NoFormStyle,
26
- NoStyleItemContext,
27
- RscLink,
28
- SizeContext_default,
29
- TextArea_default,
30
- VariantContext,
31
- __commonJS,
32
- __toESM,
33
- _toConsumableArray,
34
- browserApiPath,
35
- browserApiResponseSchema,
36
- cloneElement,
37
- clsx,
38
- collapse_default,
39
- composeRef,
40
- createContext,
41
- createElement,
42
- devUseWarning,
43
- en_US_default,
44
- es_default,
45
- es_default3 as es_default2,
46
- external_exports,
47
- fallbackProp,
48
- forwardRef,
49
- genCssVar,
50
- genFocusOutline,
51
- genFocusStyle,
52
- genStyleHooks,
53
- genSubStyleComponent,
54
- get,
55
- getDOM,
56
- getMergedStatus,
57
- getNodeRef,
58
- initComponentToken,
59
- initInputToken,
60
- isBrowserApiFailure,
61
- isFunction,
62
- isNonNullable,
63
- isNumber,
64
- isPlainObject,
65
- isReactRenderable,
66
- isString,
67
- isValidElement,
68
- isVisible_default,
69
- jsx,
70
- jsxs,
71
- memo,
72
- merge,
73
- motion_default,
74
- omit,
75
- pickAttrs,
76
- raf_default,
77
- resetComponent,
78
- responsiveArray,
79
- responsiveArrayReversed,
80
- set,
81
- space_default,
82
- style_default,
83
- supportRef,
84
- textEllipsis,
85
- toArray,
86
- tooltip_default,
87
- unit,
88
- useApp_default,
89
- useBreakpoint_default,
90
- useCSSVarCls_default,
91
- useColStyle,
92
- useCompactItemContext,
93
- useComponentConfig,
94
- useContext,
95
- useControlledState,
96
- useDelayState,
97
- useDevWarning,
98
- useEffect,
99
- useEvent_default,
100
- useForm_default,
101
- useId_default,
102
- useImperativeHandle,
103
- useLayoutEffect_default,
104
- useLocale_default,
105
- useMemo,
106
- useMergeSemantic,
107
- useOrientation,
108
- useRef,
109
- useRemovePasswordTimeout,
110
- useRequest,
111
- useRowStyle,
112
- useRscNavigation,
113
- useSemanticRootStyle,
114
- useSize_default,
115
- useState,
116
- useState_default,
117
- useVariants_default,
118
- useWatch_default,
119
- validateMessagesContext_default,
120
- version,
121
- warning_default,
122
- zoomIn
123
- } from "./chunks/chunk-UYTFSLNG.js";
124
-
125
- // ../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/SearchOutlined.js
126
- var require_SearchOutlined = __commonJS({
127
- "../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/SearchOutlined.js"(exports) {
128
- "use strict";
129
- Object.defineProperty(exports, "__esModule", { value: true });
130
- var SearchOutlined2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z" } }] }, "name": "search", "theme": "outlined" };
131
- exports.default = SearchOutlined2;
132
- }
133
- });
134
-
135
- // ../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/QuestionCircleOutlined.js
136
- var require_QuestionCircleOutlined = __commonJS({
137
- "../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/QuestionCircleOutlined.js"(exports) {
138
- "use strict";
139
- Object.defineProperty(exports, "__esModule", { value: true });
140
- var QuestionCircleOutlined2 = { "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" };
141
- exports.default = QuestionCircleOutlined2;
142
- }
143
- });
144
-
145
- // ../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/EyeInvisibleOutlined.js
146
- var require_EyeInvisibleOutlined = __commonJS({
147
- "../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/EyeInvisibleOutlined.js"(exports) {
148
- "use strict";
149
- Object.defineProperty(exports, "__esModule", { value: true });
150
- var EyeInvisibleOutlined2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { "tag": "path", "attrs": { "d": "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, "name": "eye-invisible", "theme": "outlined" };
151
- exports.default = EyeInvisibleOutlined2;
152
- }
153
- });
154
-
155
- // ../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/EyeOutlined.js
156
- var require_EyeOutlined = __commonJS({
157
- "../../node_modules/.pnpm/@ant-design+icons-svg@4.5.0/node_modules/@ant-design/icons-svg/lib/asn/EyeOutlined.js"(exports) {
158
- "use strict";
159
- Object.defineProperty(exports, "__esModule", { value: true });
160
- var EyeOutlined2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "eye", "theme": "outlined" };
161
- exports.default = EyeOutlined2;
162
- }
163
- });
164
-
165
- // ../event-bus/dist/index.js
166
- var EVENT_PROTOCOL = "zlooks.event";
167
- var EVENT_PROTOCOL_VERSION = 1;
168
- var eventType = external_exports.string().max(256).regex(/^[a-z][a-z0-9]*(?:\.[a-z][a-z0-9-]*)+\.v[1-9][0-9]*$/);
169
- var serviceNamespace = external_exports.string().max(256).regex(/^[a-z][a-z0-9]*(?:\.[a-z][a-z0-9]*)+$/);
170
- var aggregateType = external_exports.string().regex(/^[a-z][a-z0-9-]{0,63}$/);
171
- var aggregateId = external_exports.string().trim().min(1).max(256);
172
- var providerId = external_exports.string().max(128).regex(/^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/);
173
- var contractPackage = external_exports.string().max(128).regex(/^@zlooks\.cn\/[a-z0-9]+(?:-[a-z0-9]+)*$/);
174
- var exportName = external_exports.string().max(128).regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/);
175
- var title = external_exports.string().trim().min(1).max(120);
176
- var description = external_exports.string().trim().min(1).max(1e3);
177
- var jsonValueSchema = external_exports.json();
178
- var eventEnvelopeSchema = external_exports.strictObject({
179
- protocol: external_exports.literal(EVENT_PROTOCOL),
180
- protocolVersion: external_exports.literal(EVENT_PROTOCOL_VERSION),
181
- eventId: external_exports.uuid(),
182
- type: eventType,
183
- producer: serviceNamespace,
184
- aggregate: external_exports.strictObject({
185
- type: aggregateType,
186
- id: aggregateId
187
- }).readonly(),
188
- occurredAt: external_exports.iso.datetime({ offset: true }),
189
- data: jsonValueSchema
190
- }).readonly();
191
- function parseDomainEvent(input) {
192
- const envelope = eventEnvelopeSchema.parse(input);
193
- return Object.freeze({
194
- ...envelope,
195
- aggregate: Object.freeze({ ...envelope.aggregate })
196
- });
197
- }
198
- function defineEvent(type, dataSchema5, options) {
199
- const parsedType = eventType.parse(type);
200
- const producer = serviceNamespace.parse(options.producer);
201
- const parsedAggregateType = aggregateType.parse(options.aggregateType);
202
- const selectAggregateId = options.aggregateId;
203
- if (typeof selectAggregateId !== "function")
204
- throw new TypeError("Event aggregateId must be a function");
205
- return Object.freeze({
206
- type: parsedType,
207
- producer,
208
- aggregateType: parsedAggregateType,
209
- dataSchema: dataSchema5,
210
- parse(value) {
211
- const envelope = parseDomainEvent(value);
212
- if (envelope.type !== parsedType) {
213
- throw new TypeError(`Expected event type ${parsedType}`);
214
- }
215
- if (envelope.producer !== producer) {
216
- throw new TypeError(`Expected event producer ${producer}`);
217
- }
218
- const data = dataSchema5.parse(envelope.data);
219
- jsonValueSchema.parse(data);
220
- const expectedAggregateId = aggregateId.parse(selectAggregateId(data));
221
- if (envelope.aggregate.type !== parsedAggregateType || envelope.aggregate.id !== expectedAggregateId) {
222
- throw new TypeError(`${parsedType} aggregate does not identify its event data`);
223
- }
224
- return Object.freeze({
225
- ...envelope,
226
- type: parsedType,
227
- aggregate: Object.freeze({ ...envelope.aggregate }),
228
- data
229
- });
230
- }
231
- });
232
- }
233
- function defineEventCatalog(input) {
234
- const parsedProviderId = providerId.parse(input.providerId);
235
- const parsedDisplayName = title.parse(input.displayName);
236
- const parsedContractPackage = contractPackage.parse(input.contractPackage);
237
- if (input.events.length === 0 || input.events.length > 256) {
238
- throw new TypeError("Event catalog must contain between 1 and 256 events");
239
- }
240
- const producer = input.events[0].definition.producer;
241
- const eventTypes = /* @__PURE__ */ new Set();
242
- const consumerExports = /* @__PURE__ */ new Set();
243
- const events = input.events.map((entry) => {
244
- if (entry.definition.producer !== producer) {
245
- throw new TypeError("Event catalog definitions must have one producer");
246
- }
247
- if (eventTypes.has(entry.definition.type)) {
248
- throw new TypeError("Event catalog event types must be unique");
249
- }
250
- const parsedConsumerExport = exportName.parse(entry.consumerExport);
251
- if (consumerExports.has(parsedConsumerExport)) {
252
- throw new TypeError("Event catalog Consumer exports must be unique");
253
- }
254
- eventTypes.add(entry.definition.type);
255
- consumerExports.add(parsedConsumerExport);
256
- const dataSchema5 = immutableJson(external_exports.toJSONSchema(entry.definition.dataSchema, {
257
- target: "draft-2020-12",
258
- unrepresentable: "any",
259
- io: "input"
260
- }));
261
- if (!isJsonObject(dataSchema5))
262
- throw new TypeError("Event data schema must serialize to a JSON object");
263
- return Object.freeze({
264
- type: entry.definition.type,
265
- title: title.parse(entry.title),
266
- description: description.parse(entry.description),
267
- producer,
268
- aggregateType: entry.definition.aggregateType,
269
- consumer: Object.freeze({
270
- packageName: parsedContractPackage,
271
- exportName: parsedConsumerExport
272
- }),
273
- dataSchema: dataSchema5
274
- });
275
- });
276
- return Object.freeze({
277
- protocol: "zlooks.event-catalog",
278
- protocolVersion: 1,
279
- providerId: parsedProviderId,
280
- displayName: parsedDisplayName,
281
- producer,
282
- contractPackage: parsedContractPackage,
283
- count: events.length,
284
- delivery: Object.freeze({ guarantee: "at-least-once", deduplicateBy: "eventId" }),
285
- events: Object.freeze(events)
286
- });
287
- }
288
- function immutableJson(value) {
289
- if (value === null || typeof value === "string" || typeof value === "boolean")
290
- return value;
291
- if (typeof value === "number" && Number.isFinite(value))
292
- return value;
293
- if (Array.isArray(value))
294
- return Object.freeze(value.map(immutableJson));
295
- if (isRecord(value)) {
296
- return Object.freeze(Object.fromEntries(Object.entries(value).filter(([, item]) => item !== void 0).map(([key, item]) => [key, immutableJson(item)])));
297
- }
298
- throw new TypeError("Event JSON Schema contains a non-JSON value");
299
- }
300
- function isJsonObject(value) {
301
- return value !== null && typeof value === "object" && !Array.isArray(value);
302
- }
303
- function isRecord(value) {
304
- return value !== null && typeof value === "object" && !Array.isArray(value);
305
- }
306
-
307
- // ../user-shared/dist/identity.js
308
- var USER_SERVICE_NAMESPACE = "cn.zlooks.user.server";
309
-
310
- // ../user-shared/dist/events/snapshots.js
311
- var userSessionRevocationReasonSchema = external_exports.enum([
312
- "logout",
313
- "user-request",
314
- "family-limit",
315
- "credential-recovery"
316
- ]);
317
- var displayNameSchema = external_exports.string().refine((value) => value === value.trim().normalize("NFKC"), "Display name must be normalized").refine((value) => Array.from(value).length >= 1 && Array.from(value).length <= 160, "Display name must contain 1 to 160 Unicode code points");
318
- var bioSchema = external_exports.string().refine((value) => value === value.trim().normalize("NFKC"), "Bio must be normalized").refine((value) => Array.from(value).length >= 1 && Array.from(value).length <= 500, "Bio must contain 1 to 500 Unicode code points");
319
- var httpUrlSchema = external_exports.url().max(2048).refine((value) => {
320
- const protocol = new URL(value).protocol;
321
- return protocol === "http:" || protocol === "https:";
322
- }, "URL must use HTTP or HTTPS").refine((value) => value === new URL(value).toString(), "URL must be canonical");
323
- var emailSchema = external_exports.email().max(320).refine((value) => value === value.toLocaleLowerCase("en-US"), "Email must be lowercase");
324
- var userEventSnapshotSchema = external_exports.strictObject({
325
- id: external_exports.uuid(),
326
- displayName: displayNameSchema.nullable(),
327
- avatar: httpUrlSchema.nullable(),
328
- homepage: httpUrlSchema.nullable(),
329
- bio: bioSchema.nullable(),
330
- email: emailSchema.nullable(),
331
- emailVerified: external_exports.boolean(),
332
- status: external_exports.enum(["active", "disabled", "deleted"]),
333
- createdAt: external_exports.iso.datetime({ offset: true }),
334
- updatedAt: external_exports.iso.datetime({ offset: true }),
335
- version: external_exports.number().int().positive()
336
- }).superRefine((user, context) => {
337
- if (user.emailVerified && user.email === null) {
338
- context.addIssue({
339
- code: "custom",
340
- message: "A verified user snapshot must include its email",
341
- path: ["email"]
342
- });
343
- }
344
- if (Date.parse(user.updatedAt) < Date.parse(user.createdAt)) {
345
- context.addIssue({
346
- code: "custom",
347
- message: "User updated time must not precede creation time",
348
- path: ["updatedAt"]
349
- });
350
- }
351
- }).readonly();
352
- var userSessionFamilyEventSnapshotSchema = external_exports.strictObject({
353
- id: external_exports.uuid(),
354
- userId: external_exports.uuid(),
355
- createdAt: external_exports.iso.datetime({ offset: true }),
356
- expiresAt: external_exports.iso.datetime({ offset: true }),
357
- lastSeenAt: external_exports.iso.datetime({ offset: true }),
358
- revokedAt: external_exports.iso.datetime({ offset: true }).nullable(),
359
- revokeReason: userSessionRevocationReasonSchema.nullable()
360
- }).superRefine((session, context) => {
361
- const createdAt = Date.parse(session.createdAt);
362
- if (session.revokedAt === null !== (session.revokeReason === null)) {
363
- context.addIssue({
364
- code: "custom",
365
- message: "Session revocation time and reason must be present together",
366
- path: ["revokedAt"]
367
- });
368
- }
369
- if (Date.parse(session.expiresAt) <= createdAt) {
370
- context.addIssue({
371
- code: "custom",
372
- message: "Session expiry must follow creation time",
373
- path: ["expiresAt"]
374
- });
375
- }
376
- const lastSeenAt = Date.parse(session.lastSeenAt);
377
- if (lastSeenAt < createdAt || lastSeenAt > Date.parse(session.expiresAt)) {
378
- context.addIssue({
379
- code: "custom",
380
- message: "Session last-seen time must fall within its lifetime",
381
- path: ["lastSeenAt"]
382
- });
383
- }
384
- if (session.revokedAt !== null && Date.parse(session.revokedAt) < createdAt) {
385
- context.addIssue({
386
- code: "custom",
387
- message: "Session revoked time must not precede creation time",
388
- path: ["revokedAt"]
389
- });
390
- }
391
- }).readonly();
392
-
393
- // ../user-shared/dist/events/definition.js
394
- function defineUserEvent(type, aggregateType2, dataSchema5, aggregateId2) {
395
- return defineEvent(type, dataSchema5, {
396
- producer: USER_SERVICE_NAMESPACE,
397
- aggregateType: aggregateType2,
398
- aggregateId: aggregateId2
399
- });
400
- }
401
-
402
- // ../user-shared/dist/events/user-registered.js
403
- var USER_REGISTERED_EVENT_TYPE = "cn.zlooks.user.registered.v1";
404
- var userRegisteredDataSchema = external_exports.strictObject({
405
- user: userEventSnapshotSchema
406
- }).refine((data) => data.user.status === "active", {
407
- message: "A registered user snapshot must be active",
408
- path: ["user", "status"]
409
- }).readonly();
410
- var userRegisteredEvent = defineUserEvent(USER_REGISTERED_EVENT_TYPE, "user", userRegisteredDataSchema, (data) => data.user.id);
411
-
412
- // ../user-shared/dist/events/user-email-verified.js
413
- var USER_EMAIL_VERIFIED_EVENT_TYPE = "cn.zlooks.user.email-verified.v1";
414
- var dataSchema = external_exports.strictObject({ user: userEventSnapshotSchema }).refine((data) => data.user.email !== null && data.user.emailVerified, {
415
- message: "An email-verified event must contain a verified email snapshot",
416
- path: ["user", "emailVerified"]
417
- }).readonly();
418
- var userEmailVerifiedEvent = defineUserEvent(USER_EMAIL_VERIFIED_EVENT_TYPE, "user", dataSchema, (data) => data.user.id);
419
-
420
- // ../user-shared/dist/events/user-profile-updated.js
421
- var USER_PROFILE_UPDATED_EVENT_TYPE = "cn.zlooks.user.profile-updated.v1";
422
- var userProfileFieldSchema = external_exports.enum(["displayName", "avatar", "homepage", "bio"]);
423
- var dataSchema2 = external_exports.strictObject({
424
- user: userEventSnapshotSchema,
425
- changedFields: external_exports.array(userProfileFieldSchema).min(1).max(4).refine((fields) => new Set(fields).size === fields.length, "Profile fields must be unique").readonly()
426
- }).readonly();
427
- var userProfileUpdatedEvent = defineUserEvent(USER_PROFILE_UPDATED_EVENT_TYPE, "user", dataSchema2, (data) => data.user.id);
428
-
429
- // ../user-shared/dist/events/user-session-created.js
430
- var USER_SESSION_CREATED_EVENT_TYPE = "cn.zlooks.user.session-created.v1";
431
- var dataSchema3 = external_exports.strictObject({
432
- user: userEventSnapshotSchema,
433
- sessionFamily: userSessionFamilyEventSnapshotSchema,
434
- intent: external_exports.enum(["login", "registration", "recovery"])
435
- }).superRefine((data, context) => {
436
- if (data.sessionFamily.userId !== data.user.id) {
437
- context.addIssue({
438
- code: "custom",
439
- message: "Session and user snapshots must identify the same user",
440
- path: ["sessionFamily", "userId"]
441
- });
442
- }
443
- if (data.sessionFamily.revokedAt !== null) {
444
- context.addIssue({
445
- code: "custom",
446
- message: "A created session snapshot must be active",
447
- path: ["sessionFamily", "revokedAt"]
448
- });
449
- }
450
- if (data.user.status !== "active") {
451
- context.addIssue({
452
- code: "custom",
453
- message: "A session-created event must contain an active user snapshot",
454
- path: ["user", "status"]
455
- });
456
- }
457
- }).readonly();
458
- var userSessionCreatedEvent = defineUserEvent(USER_SESSION_CREATED_EVENT_TYPE, "session-family", dataSchema3, (data) => data.sessionFamily.id);
459
-
460
- // ../user-shared/dist/events/user-session-revoked.js
461
- var USER_SESSION_REVOKED_EVENT_TYPE = "cn.zlooks.user.session-revoked.v1";
462
- var dataSchema4 = external_exports.strictObject({
463
- user: userEventSnapshotSchema,
464
- sessionFamily: userSessionFamilyEventSnapshotSchema
465
- }).superRefine((data, context) => {
466
- if (data.sessionFamily.userId !== data.user.id) {
467
- context.addIssue({
468
- code: "custom",
469
- message: "Session and user snapshots must identify the same user",
470
- path: ["sessionFamily", "userId"]
471
- });
472
- }
473
- if (data.sessionFamily.revokedAt === null) {
474
- context.addIssue({
475
- code: "custom",
476
- message: "A revoked session snapshot must include its revocation",
477
- path: ["sessionFamily", "revokedAt"]
478
- });
479
- }
480
- }).readonly();
481
- var userSessionRevokedEvent = defineUserEvent(USER_SESSION_REVOKED_EVENT_TYPE, "session-family", dataSchema4, (data) => data.sessionFamily.id);
482
-
483
- // ../user-shared/dist/events/catalog.js
484
- var USER_EVENT_CATALOG = defineEventCatalog({
485
- providerId: "user",
486
- displayName: "\u7528\u6237\u670D\u52A1\u4E8B\u4EF6",
487
- contractPackage: "@zlooks.cn/user-shared",
488
- events: [
489
- {
490
- definition: userRegisteredEvent,
491
- title: "\u7528\u6237\u5DF2\u6CE8\u518C",
492
- description: "\u7528\u6237\u8D26\u6237\u5DF2\u7ECF\u5B8C\u6210\u6301\u4E45\u5316\u521B\u5EFA\u5E76\u5904\u4E8E\u53EF\u7528\u72B6\u6001\u3002",
493
- consumerExport: "consumeUserRegisteredEvent"
494
- },
495
- {
496
- definition: userEmailVerifiedEvent,
497
- title: "\u7528\u6237\u90AE\u7BB1\u5DF2\u9A8C\u8BC1",
498
- description: "\u7528\u6237\u90AE\u7BB1\u4ECE\u672A\u9A8C\u8BC1\u72B6\u6001\u771F\u5B9E\u8F6C\u6362\u4E3A\u5DF2\u9A8C\u8BC1\u72B6\u6001\u3002",
499
- consumerExport: "consumeUserEmailVerifiedEvent"
500
- },
501
- {
502
- definition: userProfileUpdatedEvent,
503
- title: "\u7528\u6237\u8D44\u6599\u5DF2\u66F4\u65B0",
504
- description: "\u7528\u6237\u516C\u5F00\u8D44\u6599\u5B57\u6BB5\u53D1\u751F\u771F\u5B9E\u53D8\u5316\u5E76\u643A\u5E26\u53D8\u66F4\u540E\u7684\u5B8C\u6574\u5B89\u5168\u5FEB\u7167\u3002",
505
- consumerExport: "consumeUserProfileUpdatedEvent"
506
- },
507
- {
508
- definition: userSessionCreatedEvent,
509
- title: "\u7528\u6237\u4F1A\u8BDD\u65CF\u5DF2\u521B\u5EFA",
510
- description: "\u767B\u5F55\u3001\u6CE8\u518C\u6216\u6062\u590D\u6D41\u7A0B\u5DF2\u7ECF\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u6D3B\u52A8\u4F1A\u8BDD\u65CF\u3002",
511
- consumerExport: "consumeUserSessionCreatedEvent"
512
- },
513
- {
514
- definition: userSessionRevokedEvent,
515
- title: "\u7528\u6237\u4F1A\u8BDD\u65CF\u5DF2\u64A4\u9500",
516
- description: "\u7528\u6237\u4F1A\u8BDD\u65CF\u4ECE\u6D3B\u52A8\u72B6\u6001\u771F\u5B9E\u8F6C\u6362\u4E3A\u5DF2\u64A4\u9500\u72B6\u6001\u3002",
517
- consumerExport: "consumeUserSessionRevokedEvent"
518
- }
519
- ]
520
- });
521
-
522
- // ../user-shared/dist/index.js
523
- var USER_CREDENTIAL_LIFECYCLE_PROTOCOL = "zlooks.user.credential-lifecycle";
524
- var USER_CREDENTIAL_LIFECYCLE_EVENT_TYPE = "cn.zlooks.password.credential-lifecycle.v1";
525
- var USER_ACCOUNT_HREF = "/user.account/account";
526
- var USER_BROWSER_AUTH_METHODS_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/auth/methods");
527
- var USER_BROWSER_AUTH_TRANSACTIONS_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/auth/transactions");
528
- var USER_BROWSER_LOGOUT_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/auth/logout");
529
- var USER_BROWSER_SESSION_REFRESH_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/auth/session/refresh");
530
- var USER_BROWSER_USER_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/user");
531
- var USER_BROWSER_USER_SESSIONS_PATH = browserApiPath(USER_SERVICE_NAMESPACE, "/api/user/sessions");
532
- var USER_BROWSER_API_ERROR_CODES = Object.freeze({
533
- crossOriginRejected: 1001,
534
- requestRejected: 1002,
535
- authenticationRequired: 1003,
536
- sessionExpired: 1004,
537
- authenticationDenied: 1005,
538
- authenticationPending: 1006,
539
- routeNotFound: 1007,
540
- accountNotFound: 1008,
541
- accountAlreadyExists: 1009,
542
- invalidVerificationCode: 1010,
543
- verificationRateLimited: 1011,
544
- emailDeliveryFailed: 1012,
545
- serviceUnavailable: 1013
546
- });
547
- var absolutePath = external_exports.string().min(1).max(2048).regex(/^\/(?!\/)[^?#]*$/);
548
- var userShellViewSchema = external_exports.discriminatedUnion("status", [
549
- external_exports.strictObject({
550
- status: external_exports.literal("anonymous"),
551
- loginMethods: external_exports.array(external_exports.strictObject({
552
- id: external_exports.string().min(1).max(128),
553
- label: external_exports.string().min(1).max(80),
554
- href: absolutePath
555
- })).max(64)
556
- }),
557
- external_exports.strictObject({
558
- status: external_exports.literal("authenticated"),
559
- user: external_exports.strictObject({
560
- label: external_exports.string().min(1).max(160),
561
- secondary: external_exports.string().min(1).max(320).optional(),
562
- avatarText: external_exports.string().min(1).max(8),
563
- avatarUrl: external_exports.url({ protocol: /^https?$/ }).max(2048).optional()
564
- }),
565
- accountHref: absolutePath,
566
- logoutHref: absolutePath
567
- })
568
- ]).readonly();
569
- var sessionCookieSchema = external_exports.discriminatedUnion("action", [
570
- external_exports.strictObject({
571
- action: external_exports.literal("set"),
572
- value: external_exports.string().min(1).max(4096),
573
- expiresAt: external_exports.iso.datetime({ offset: true })
574
- }),
575
- external_exports.strictObject({ action: external_exports.literal("clear") })
576
- ]);
577
- var userSessionTokenSchema = external_exports.string().min(1).max(4096);
578
- var userSessionFamilyIdSchema = external_exports.string().trim().min(1).max(128);
579
- var authenticationMethodSchema = external_exports.strictObject({
580
- id: external_exports.string().regex(/^[a-z][a-z0-9._-]{0,127}$/),
581
- label: external_exports.string().trim().min(1).max(80),
582
- capabilities: external_exports.strictObject({
583
- login: external_exports.boolean(),
584
- registration: external_exports.boolean()
585
- }),
586
- rsc: external_exports.strictObject({
587
- pluginId: external_exports.string().regex(/^[a-z][a-z0-9._-]{0,127}$/),
588
- slots: external_exports.strictObject({
589
- login: absolutePath.optional(),
590
- registration: absolutePath.optional()
591
- })
592
- })
593
- }).readonly();
594
- var userEmptyRequestSchema = external_exports.strictObject({}).readonly();
595
- var userAuthenticationCatalogResponseSchema = external_exports.strictObject({
596
- methods: external_exports.array(authenticationMethodSchema).max(64).readonly()
597
- }).readonly();
598
- var userAuthenticationBeginRequestSchema = external_exports.strictObject({
599
- methodId: external_exports.string().regex(/^[a-z][a-z0-9._-]{0,127}$/),
600
- intent: external_exports.enum(["login", "registration", "linking", "reauthentication", "recovery"]),
601
- loginHint: external_exports.string().trim().min(1).max(320).optional(),
602
- requestContext: external_exports.strictObject({ clientKey: external_exports.string().min(16).max(128) })
603
- }).readonly();
604
- var userAuthenticationBeginResponseSchema = external_exports.discriminatedUnion("status", [
605
- external_exports.strictObject({
606
- status: external_exports.literal("input-required"),
607
- transactionId: external_exports.uuid(),
608
- methodId: external_exports.string().regex(/^[a-z][a-z0-9._-]{0,127}$/)
609
- }),
610
- external_exports.strictObject({
611
- status: external_exports.literal("redirect-required"),
612
- transactionId: external_exports.uuid(),
613
- methodId: external_exports.string().regex(/^[a-z][a-z0-9._-]{0,127}$/),
614
- redirectUrl: external_exports.url().max(4096)
615
- }),
616
- external_exports.strictObject({
617
- status: external_exports.literal("pending"),
618
- transactionId: external_exports.uuid(),
619
- methodId: external_exports.string().regex(/^[a-z][a-z0-9._-]{0,127}$/),
620
- retryAfterMs: external_exports.number().int().min(250).max(6e4)
621
- })
622
- ]).readonly();
623
- var userAuthenticationCompleteRequestSchema = external_exports.strictObject({
624
- input: external_exports.unknown()
625
- }).readonly();
626
- var userAuthenticationCompletionResponseSchema = external_exports.discriminatedUnion("status", [
627
- external_exports.strictObject({
628
- status: external_exports.literal("verified"),
629
- session: external_exports.strictObject({ token: userSessionTokenSchema, expiresAt: external_exports.iso.datetime({ offset: true }) }),
630
- user: external_exports.unknown()
631
- }),
632
- external_exports.strictObject({ status: external_exports.literal("denied"), code: external_exports.string().min(1).max(128) }),
633
- external_exports.strictObject({
634
- status: external_exports.literal("pending"),
635
- retryAfterMs: external_exports.number().int().min(250).max(6e4)
636
- })
637
- ]).readonly();
638
- var userAccountSchema = external_exports.strictObject({
639
- id: external_exports.string().min(1).max(128),
640
- displayName: external_exports.string().min(1).max(160).optional(),
641
- avatar: external_exports.url({ protocol: /^https?$/ }).max(2048).optional(),
642
- homepage: external_exports.url({ protocol: /^https?$/ }).max(2048).optional(),
643
- bio: external_exports.string().max(500).optional(),
644
- email: external_exports.email().max(320).optional(),
645
- emailVerified: external_exports.boolean()
646
- }).readonly();
647
- var userAccountReadResponseSchema = external_exports.strictObject({ user: userAccountSchema }).readonly();
648
- var userAccountUpdateRequestSchema = external_exports.strictObject({ input: external_exports.unknown() }).readonly();
649
- var userSessionSchema = external_exports.strictObject({
650
- id: external_exports.string().min(1).max(128),
651
- createdAt: external_exports.iso.datetime(),
652
- lastSeenAt: external_exports.iso.datetime(),
653
- expiresAt: external_exports.iso.datetime(),
654
- revoked: external_exports.boolean()
655
- }).readonly();
656
- var userAccountSessionsResponseSchema = external_exports.strictObject({
657
- sessions: external_exports.array(userSessionSchema).max(100).readonly()
658
- }).readonly();
659
- var userSessionRevokeResponseSchema = external_exports.strictObject({ revoked: external_exports.boolean() }).readonly();
660
- var userLogoutResponseSchema = external_exports.strictObject({ revoked: external_exports.boolean() }).readonly();
661
- var userRefreshSessionResponseSchema = external_exports.strictObject({
662
- session: external_exports.strictObject({
663
- token: userSessionTokenSchema,
664
- expiresAt: external_exports.iso.datetime({ offset: true }),
665
- user: userAccountSchema
666
- })
667
- }).readonly();
668
- var userEventCatalogResponseSchema = external_exports.strictObject({
669
- protocol: external_exports.literal("zlooks.event-catalog"),
670
- protocolVersion: external_exports.literal(1),
671
- providerId: external_exports.literal("user"),
672
- displayName: external_exports.string().min(1).max(160),
673
- producer: external_exports.literal(USER_SERVICE_NAMESPACE),
674
- contractPackage: external_exports.literal("@zlooks.cn/user-shared"),
675
- count: external_exports.literal(5),
676
- delivery: external_exports.strictObject({
677
- guarantee: external_exports.literal("at-least-once"),
678
- deduplicateBy: external_exports.literal("eventId")
679
- }),
680
- events: external_exports.array(external_exports.strictObject({
681
- type: external_exports.string().min(1).max(256),
682
- title: external_exports.string().min(1).max(160),
683
- description: external_exports.string().min(1).max(1e3),
684
- producer: external_exports.literal(USER_SERVICE_NAMESPACE),
685
- aggregateType: external_exports.string().min(1).max(128),
686
- consumer: external_exports.strictObject({
687
- packageName: external_exports.literal("@zlooks.cn/user-shared"),
688
- exportName: external_exports.string().min(1).max(128)
689
- }),
690
- dataSchema: external_exports.record(external_exports.string(), external_exports.unknown())
691
- })).length(5).readonly()
692
- }).readonly();
693
- var userCurrentUserRequestSchema = external_exports.strictObject({}).readonly();
694
- var userPublicProfileSchema = external_exports.strictObject({
695
- id: external_exports.uuid(),
696
- displayName: external_exports.string().trim().min(1).max(160).nullable(),
697
- avatar: external_exports.url({ protocol: /^https?$/ }).max(2048).nullable(),
698
- homepage: external_exports.url({ protocol: /^https?$/ }).max(2048).nullable().optional(),
699
- bio: external_exports.string().trim().min(1).max(500).nullable().optional()
700
- }).readonly();
701
- var userCurrentUserSchema = userPublicProfileSchema;
702
- var userCurrentUserResponseSchema = external_exports.discriminatedUnion("authenticated", [
703
- external_exports.strictObject({ authenticated: external_exports.literal(false) }),
704
- external_exports.strictObject({
705
- authenticated: external_exports.literal(true),
706
- user: userCurrentUserSchema
707
- })
708
- ]).readonly();
709
- var userPublicProfilesRequestSchema = external_exports.strictObject({
710
- userIds: external_exports.array(external_exports.uuid()).min(1).max(100).refine((userIds) => new Set(userIds).size === userIds.length, { message: "User IDs must be unique" }).readonly()
711
- }).readonly();
712
- var userPublicProfilesResponseSchema = external_exports.strictObject({
713
- users: external_exports.array(userPublicProfileSchema).max(100).refine((users) => new Set(users.map((user) => user.id)).size === users.length, {
714
- message: "Public user profiles must be unique"
715
- }).readonly()
716
- }).readonly();
717
- var userBrowserApiRequestSchema = external_exports.strictObject({
718
- method: external_exports.enum(["GET", "POST", "PATCH"]),
719
- path: absolutePath,
720
- origin: external_exports.string().max(2048).optional(),
721
- clientKey: external_exports.string().regex(/^[a-f0-9]{64}$/),
722
- body: external_exports.unknown().optional()
723
- }).readonly();
724
- var userBrowserApiResponseSchema = external_exports.strictObject({
725
- status: external_exports.number().int().min(200).max(599).refine((status) => status < 300 || status >= 400),
726
- body: browserApiResponseSchema,
727
- sessionCookie: sessionCookieSchema.optional()
728
- }).superRefine((response, context) => {
729
- const httpSucceeded = response.status >= 200 && response.status < 300;
730
- if (httpSucceeded === !isBrowserApiFailure(response.body))
731
- return;
732
- context.addIssue({
733
- code: "custom",
734
- message: "HTTP status and browser API response code disagree",
735
- path: ["body", "code"]
736
- });
737
- }).readonly();
738
- var userCredentialLifecycleEventSchema = external_exports.strictObject({
739
- protocol: external_exports.literal(USER_CREDENTIAL_LIFECYCLE_PROTOCOL),
740
- kind: external_exports.enum(["registration", "recovery"]),
741
- authenticationTransactionId: external_exports.uuid(),
742
- extensionId: external_exports.string().regex(/^[a-z][a-z0-9._-]{0,127}$/),
743
- methodId: external_exports.string().regex(/^[a-z][a-z0-9._-]{0,127}$/),
744
- subject: external_exports.string().trim().min(1).max(512),
745
- email: external_exports.email().max(320),
746
- occurredAt: external_exports.iso.datetime({ offset: true })
747
- }).readonly();
748
- var userCredentialLifecycleDomainEvent = defineEvent(USER_CREDENTIAL_LIFECYCLE_EVENT_TYPE, userCredentialLifecycleEventSchema, {
749
- producer: "cn.zlooks.password.auth.server",
750
- aggregateType: "credential",
751
- aggregateId: ({ subject }) => subject
752
- });
753
- var userCredentialLifecycleResponseSchema = external_exports.strictObject({
754
- acknowledged: external_exports.literal(true)
755
- }).readonly();
756
- function userBrowserTransactionCompletePath(transactionId) {
757
- return `${USER_BROWSER_AUTH_TRANSACTIONS_PATH}/${encodeURIComponent(external_exports.string().trim().min(1).max(128).parse(transactionId))}/complete`;
758
- }
759
-
760
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/_util/getReactMajorVersionCanDelMe.js
761
- function getReactMajorVersion() {
762
- const majorVersion = Number.parseInt(version.split(".")[0], 10);
763
- return majorVersion;
764
- }
765
-
766
- // ../../node_modules/.pnpm/compute-scroll-into-view@3.1.1/node_modules/compute-scroll-into-view/dist/index.js
767
- var t = (t2) => "object" == typeof t2 && null != t2 && 1 === t2.nodeType;
768
- var e = (t2, e3) => (!e3 || "hidden" !== t2) && ("visible" !== t2 && "clip" !== t2);
769
- var n = (t2, n2) => {
770
- if (t2.clientHeight < t2.scrollHeight || t2.clientWidth < t2.scrollWidth) {
771
- const o3 = getComputedStyle(t2, null);
772
- return e(o3.overflowY, n2) || e(o3.overflowX, n2) || ((t3) => {
773
- const e3 = ((t4) => {
774
- if (!t4.ownerDocument || !t4.ownerDocument.defaultView) return null;
775
- try {
776
- return t4.ownerDocument.defaultView.frameElement;
777
- } catch (t5) {
778
- return null;
779
- }
780
- })(t3);
781
- return !!e3 && (e3.clientHeight < t3.scrollHeight || e3.clientWidth < t3.scrollWidth);
782
- })(t2);
783
- }
784
- return false;
785
- };
786
- var o = (t2, e3, n2, o3, l2, r2, i, s) => r2 < t2 && i > e3 || r2 > t2 && i < e3 ? 0 : r2 <= t2 && s <= n2 || i >= e3 && s >= n2 ? r2 - t2 - o3 : i > e3 && s < n2 || r2 < t2 && s > n2 ? i - e3 + l2 : 0;
787
- var l = (t2) => {
788
- const e3 = t2.parentElement;
789
- return null == e3 ? t2.getRootNode().host || null : e3;
790
- };
791
- var r = (e3, r2) => {
792
- var i, s, d, h;
793
- if ("undefined" == typeof document) return [];
794
- const { scrollMode: c, block: f, inline: u, boundary: a, skipOverflowHiddenElements: g } = r2, p = "function" == typeof a ? a : (t2) => t2 !== a;
795
- if (!t(e3)) throw new TypeError("Invalid target");
796
- const m = document.scrollingElement || document.documentElement, w = [];
797
- let W = e3;
798
- for (; t(W) && p(W); ) {
799
- if (W = l(W), W === m) {
800
- w.push(W);
801
- break;
802
- }
803
- null != W && W === document.body && n(W) && !n(document.documentElement) || null != W && n(W, g) && w.push(W);
804
- }
805
- const b = null != (s = null == (i = window.visualViewport) ? void 0 : i.width) ? s : innerWidth, H = null != (h = null == (d = window.visualViewport) ? void 0 : d.height) ? h : innerHeight, { scrollX: y, scrollY: M } = window, { height: v, width: E, top: x, right: C, bottom: I, left: R } = e3.getBoundingClientRect(), { top: T, right: B, bottom: F, left: V } = ((t2) => {
806
- const e4 = window.getComputedStyle(t2);
807
- return { top: parseFloat(e4.scrollMarginTop) || 0, right: parseFloat(e4.scrollMarginRight) || 0, bottom: parseFloat(e4.scrollMarginBottom) || 0, left: parseFloat(e4.scrollMarginLeft) || 0 };
808
- })(e3);
809
- let k = "start" === f || "nearest" === f ? x - T : "end" === f ? I + F : x + v / 2 - T + F, D = "center" === u ? R + E / 2 - V + B : "end" === u ? C + B : R - V;
810
- const L = [];
811
- for (let t2 = 0; t2 < w.length; t2++) {
812
- const e4 = w[t2], { height: l2, width: r3, top: i2, right: s2, bottom: d2, left: h2 } = e4.getBoundingClientRect();
813
- if ("if-needed" === c && x >= 0 && R >= 0 && I <= H && C <= b && (e4 === m && !n(e4) || x >= i2 && I <= d2 && R >= h2 && C <= s2)) return L;
814
- const a2 = getComputedStyle(e4), g2 = parseInt(a2.borderLeftWidth, 10), p2 = parseInt(a2.borderTopWidth, 10), W2 = parseInt(a2.borderRightWidth, 10), T2 = parseInt(a2.borderBottomWidth, 10);
815
- let B2 = 0, F2 = 0;
816
- const V2 = "offsetWidth" in e4 ? e4.offsetWidth - e4.clientWidth - g2 - W2 : 0, S = "offsetHeight" in e4 ? e4.offsetHeight - e4.clientHeight - p2 - T2 : 0, X = "offsetWidth" in e4 ? 0 === e4.offsetWidth ? 0 : r3 / e4.offsetWidth : 0, Y = "offsetHeight" in e4 ? 0 === e4.offsetHeight ? 0 : l2 / e4.offsetHeight : 0;
817
- if (m === e4) B2 = "start" === f ? k : "end" === f ? k - H : "nearest" === f ? o(M, M + H, H, p2, T2, M + k, M + k + v, v) : k - H / 2, F2 = "start" === u ? D : "center" === u ? D - b / 2 : "end" === u ? D - b : o(y, y + b, b, g2, W2, y + D, y + D + E, E), B2 = Math.max(0, B2 + M), F2 = Math.max(0, F2 + y);
818
- else {
819
- B2 = "start" === f ? k - i2 - p2 : "end" === f ? k - d2 + T2 + S : "nearest" === f ? o(i2, d2, l2, p2, T2 + S, k, k + v, v) : k - (i2 + l2 / 2) + S / 2, F2 = "start" === u ? D - h2 - g2 : "center" === u ? D - (h2 + r3 / 2) + V2 / 2 : "end" === u ? D - s2 + W2 + V2 : o(h2, s2, r3, g2, W2 + V2, D, D + E, E);
820
- const { scrollLeft: t3, scrollTop: n2 } = e4;
821
- B2 = 0 === Y ? 0 : Math.max(0, Math.min(n2 + B2 / Y, e4.scrollHeight - l2 / Y + S)), F2 = 0 === X ? 0 : Math.max(0, Math.min(t3 + F2 / X, e4.scrollWidth - r3 / X + V2)), k += n2 - B2, D += t3 - F2;
822
- }
823
- L.push({ el: e4, top: B2, left: F2 });
824
- }
825
- return L;
826
- };
827
-
828
- // ../../node_modules/.pnpm/scroll-into-view-if-needed@3.1.0/node_modules/scroll-into-view-if-needed/dist/index.js
829
- var o2 = (t2) => false === t2 ? { block: "end", inline: "nearest" } : ((t3) => t3 === Object(t3) && 0 !== Object.keys(t3).length)(t2) ? t2 : { block: "start", inline: "nearest" };
830
- function e2(e3, r2) {
831
- if (!e3.isConnected || !((t2) => {
832
- let o3 = t2;
833
- for (; o3 && o3.parentNode; ) {
834
- if (o3.parentNode === document) return true;
835
- o3 = o3.parentNode instanceof ShadowRoot ? o3.parentNode.host : o3.parentNode;
836
- }
837
- return false;
838
- })(e3)) return;
839
- const n2 = ((t2) => {
840
- const o3 = window.getComputedStyle(t2);
841
- return { top: parseFloat(o3.scrollMarginTop) || 0, right: parseFloat(o3.scrollMarginRight) || 0, bottom: parseFloat(o3.scrollMarginBottom) || 0, left: parseFloat(o3.scrollMarginLeft) || 0 };
842
- })(e3);
843
- if (((t2) => "object" == typeof t2 && "function" == typeof t2.behavior)(r2)) return r2.behavior(r(e3, r2));
844
- const l2 = "boolean" == typeof r2 || null == r2 ? void 0 : r2.behavior;
845
- for (const { el: a, top: i, left: s } of r(e3, o2(r2))) {
846
- const t2 = i - n2.top + n2.bottom, o3 = s - n2.left + n2.right;
847
- a.scroll({ top: t2, left: o3, behavior: l2 });
848
- }
849
- }
850
-
851
- // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
852
- function _extends() {
853
- return _extends = Object.assign ? Object.assign.bind() : function(n2) {
854
- for (var e3 = 1; e3 < arguments.length; e3++) {
855
- var t2 = arguments[e3];
856
- for (var r2 in t2) ({}).hasOwnProperty.call(t2, r2) && (n2[r2] = t2[r2]);
857
- }
858
- return n2;
859
- }, _extends.apply(null, arguments);
860
- }
861
-
862
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/app/index.js
863
- var App = App_default;
864
- App.useApp = useApp_default;
865
- var app_default = App;
866
-
867
- // ../../node_modules/.pnpm/@ant-design+icons@6.3.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@ant-design/icons/es/icons/SearchOutlined.js
868
- var import_SearchOutlined = __toESM(require_SearchOutlined());
869
- function _extends2() {
870
- _extends2 = Object.assign ? Object.assign.bind() : function(target) {
871
- for (var i = 1; i < arguments.length; i++) {
872
- var source = arguments[i];
873
- for (var key in source) {
874
- if (Object.prototype.hasOwnProperty.call(source, key)) {
875
- target[key] = source[key];
876
- }
877
- }
878
- }
879
- return target;
880
- };
881
- return _extends2.apply(this, arguments);
882
- }
883
- var SearchOutlined = (props, ref) => /* @__PURE__ */ createElement(AntdIconLight_default, _extends2({}, props, {
884
- ref,
885
- icon: import_SearchOutlined.default
886
- }));
887
- var RefIcon = /* @__PURE__ */ forwardRef(SearchOutlined);
888
- if (true) {
889
- RefIcon.displayName = "SearchOutlined";
890
- }
891
- var SearchOutlined_default = RefIcon;
892
-
893
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/button/index.js
894
- var button_default = Button_default;
895
-
896
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/util.js
897
- var formItemNameBlackList = ["parentNode"];
898
- var defaultItemNamePrefixCls = "form_item";
899
- function toArray2(candidate) {
900
- if (candidate === void 0 || candidate === false) {
901
- return [];
902
- }
903
- return Array.isArray(candidate) ? candidate : [candidate];
904
- }
905
- function getFieldId(namePath, formName) {
906
- if (!namePath.length) {
907
- return void 0;
908
- }
909
- const mergedId = namePath.join("_");
910
- if (formName) {
911
- return `${formName}_${mergedId}`;
912
- }
913
- const isIllegalName = formItemNameBlackList.includes(mergedId);
914
- return isIllegalName ? `${defaultItemNamePrefixCls}_${mergedId}` : mergedId;
915
- }
916
- function getStatus(errors, warnings, meta, defaultValidateStatus, hasFeedback, validateStatus) {
917
- let status = defaultValidateStatus;
918
- if (validateStatus !== void 0) {
919
- status = validateStatus;
920
- } else if (meta.validating) {
921
- status = "validating";
922
- } else if (errors.length) {
923
- status = "error";
924
- } else if (warnings.length) {
925
- status = "warning";
926
- } else if (meta.touched || hasFeedback && meta.validated) {
927
- status = "success";
928
- }
929
- return status;
930
- }
931
-
932
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/hooks/useForm.js
933
- function toNamePathStr(name) {
934
- const namePath = toArray2(name);
935
- return namePath.join("_");
936
- }
937
- function getFieldDOMNode(name, wrapForm) {
938
- const field = wrapForm.getFieldInstance(name);
939
- const fieldDom = getDOM(field);
940
- if (fieldDom) {
941
- return fieldDom;
942
- }
943
- const fieldId = getFieldId(toArray2(name), wrapForm.__INTERNAL__.name);
944
- if (fieldId) {
945
- return document.getElementById(fieldId);
946
- }
947
- }
948
- function useForm(form) {
949
- const [rcForm] = useForm_default();
950
- const itemsRef = useRef({});
951
- const wrapForm = useMemo(() => form ?? {
952
- ...rcForm,
953
- __INTERNAL__: {
954
- itemRef: (name) => (node) => {
955
- const namePathStr = toNamePathStr(name);
956
- if (node) {
957
- itemsRef.current[namePathStr] = node;
958
- } else {
959
- delete itemsRef.current[namePathStr];
960
- }
961
- }
962
- },
963
- scrollToField: (name, options = {}) => {
964
- const {
965
- focus,
966
- ...restOpt
967
- } = options;
968
- const node = getFieldDOMNode(name, wrapForm);
969
- if (node) {
970
- e2(node, {
971
- scrollMode: "if-needed",
972
- block: "nearest",
973
- ...restOpt
974
- });
975
- if (focus) {
976
- wrapForm.focusField(name);
977
- }
978
- }
979
- },
980
- focusField: (name) => {
981
- const itemRef = wrapForm.getFieldInstance(name);
982
- if (isFunction(itemRef?.focus)) {
983
- itemRef.focus();
984
- } else {
985
- getFieldDOMNode(name, wrapForm)?.focus?.();
986
- }
987
- },
988
- getFieldInstance: (name) => {
989
- const namePathStr = toNamePathStr(name);
990
- return itemsRef.current[namePathStr];
991
- }
992
- }, [form, rcForm]);
993
- return [wrapForm];
994
- }
995
-
996
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/grid/RowContext.js
997
- var RowContext = /* @__PURE__ */ createContext({});
998
- var RowContext_default = RowContext;
999
-
1000
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/grid/col.js
1001
- function parseFlex(flex) {
1002
- if (flex === "auto") {
1003
- return "1 1 auto";
1004
- }
1005
- if (isNumber(flex)) {
1006
- return `${flex} ${flex} auto`;
1007
- }
1008
- if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) {
1009
- return `0 0 ${flex}`;
1010
- }
1011
- return flex;
1012
- }
1013
- var Col = /* @__PURE__ */ forwardRef((props, ref) => {
1014
- const {
1015
- getPrefixCls,
1016
- direction
1017
- } = useContext(ConfigContext);
1018
- const {
1019
- gutter,
1020
- wrap
1021
- } = useContext(RowContext_default);
1022
- const {
1023
- prefixCls: customizePrefixCls,
1024
- span,
1025
- order,
1026
- offset,
1027
- push,
1028
- pull,
1029
- className,
1030
- children,
1031
- flex,
1032
- style,
1033
- ...others
1034
- } = props;
1035
- const prefixCls = getPrefixCls("col", customizePrefixCls);
1036
- const rootPrefixCls = getPrefixCls();
1037
- const [hashId, cssVarCls] = useColStyle(prefixCls);
1038
- const [varName] = genCssVar(rootPrefixCls, "col");
1039
- const sizeStyle = {};
1040
- let sizeClassObj = {};
1041
- responsiveArrayReversed.forEach((size) => {
1042
- let sizeProps = {};
1043
- const propSize = props[size];
1044
- if (isNumber(propSize)) {
1045
- sizeProps.span = propSize;
1046
- } else if (isPlainObject(propSize)) {
1047
- sizeProps = propSize || {};
1048
- }
1049
- delete others[size];
1050
- sizeClassObj = {
1051
- ...sizeClassObj,
1052
- [`${prefixCls}-${size}-${sizeProps.span}`]: isNonNullable(sizeProps.span),
1053
- [`${prefixCls}-${size}-order-${sizeProps.order}`]: sizeProps.order || sizeProps.order === 0,
1054
- [`${prefixCls}-${size}-offset-${sizeProps.offset}`]: sizeProps.offset || sizeProps.offset === 0,
1055
- [`${prefixCls}-${size}-push-${sizeProps.push}`]: sizeProps.push || sizeProps.push === 0,
1056
- [`${prefixCls}-${size}-pull-${sizeProps.pull}`]: sizeProps.pull || sizeProps.pull === 0,
1057
- [`${prefixCls}-rtl`]: direction === "rtl"
1058
- };
1059
- if (sizeProps.flex || sizeProps.flex === 0) {
1060
- sizeClassObj[`${prefixCls}-${size}-flex`] = true;
1061
- sizeStyle[varName(`${size}-flex`)] = parseFlex(sizeProps.flex);
1062
- }
1063
- });
1064
- const classes = clsx(prefixCls, {
1065
- [`${prefixCls}-${span}`]: span !== void 0,
1066
- [`${prefixCls}-order-${order}`]: order,
1067
- [`${prefixCls}-offset-${offset}`]: offset,
1068
- [`${prefixCls}-push-${push}`]: push,
1069
- [`${prefixCls}-pull-${pull}`]: pull
1070
- }, className, sizeClassObj, hashId, cssVarCls);
1071
- const mergedStyle = {};
1072
- if (gutter?.[0]) {
1073
- const horizontalGutter = isNumber(gutter[0]) ? `${gutter[0] / 2}px` : `calc(${gutter[0]} / 2)`;
1074
- mergedStyle.paddingInline = horizontalGutter;
1075
- }
1076
- if (flex || flex === 0) {
1077
- mergedStyle.flex = parseFlex(flex);
1078
- if (wrap === false && !mergedStyle.minWidth) {
1079
- mergedStyle.minWidth = 0;
1080
- }
1081
- }
1082
- return /* @__PURE__ */ createElement("div", {
1083
- ...others,
1084
- style: {
1085
- ...mergedStyle,
1086
- ...style,
1087
- ...sizeStyle
1088
- },
1089
- className: classes,
1090
- ref
1091
- }, children);
1092
- });
1093
- if (true) {
1094
- Col.displayName = "Col";
1095
- }
1096
- var col_default = Col;
1097
-
1098
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/grid/hooks/useGutter.js
1099
- function useGutter(gutter, screens) {
1100
- const results = [void 0, void 0];
1101
- const normalizedGutter = Array.isArray(gutter) ? gutter : [gutter, void 0];
1102
- const mergedScreens = screens || {
1103
- xs: true,
1104
- sm: true,
1105
- md: true,
1106
- lg: true,
1107
- xl: true,
1108
- xxl: true,
1109
- xxxl: true
1110
- };
1111
- normalizedGutter.forEach((g, index) => {
1112
- if (isPlainObject(g)) {
1113
- for (let i = 0; i < responsiveArray.length; i++) {
1114
- const breakpoint = responsiveArray[i];
1115
- if (mergedScreens[breakpoint] && g[breakpoint] !== void 0) {
1116
- results[index] = g[breakpoint];
1117
- break;
1118
- }
1119
- }
1120
- } else {
1121
- results[index] = g;
1122
- }
1123
- });
1124
- return results;
1125
- }
1126
-
1127
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/grid/row.js
1128
- var useMergedPropByScreen = (oriProp, screen) => {
1129
- const [prop, setProp] = useState(() => isString(oriProp) ? oriProp : "");
1130
- const calcMergedAlignOrJustify = () => {
1131
- if (isString(oriProp)) {
1132
- setProp(oriProp);
1133
- }
1134
- if (!isPlainObject(oriProp)) {
1135
- return;
1136
- }
1137
- for (let i = 0; i < responsiveArray.length; i++) {
1138
- const breakpoint = responsiveArray[i];
1139
- if (!screen || !screen[breakpoint]) {
1140
- continue;
1141
- }
1142
- const curVal = oriProp[breakpoint];
1143
- if (curVal !== void 0) {
1144
- setProp(curVal);
1145
- return;
1146
- }
1147
- }
1148
- };
1149
- useEffect(() => {
1150
- calcMergedAlignOrJustify();
1151
- }, [JSON.stringify(oriProp), screen]);
1152
- return prop;
1153
- };
1154
- var Row = /* @__PURE__ */ forwardRef((props, ref) => {
1155
- const {
1156
- prefixCls: customizePrefixCls,
1157
- justify,
1158
- align,
1159
- className,
1160
- style,
1161
- children,
1162
- gutter = 0,
1163
- wrap,
1164
- ...others
1165
- } = props;
1166
- const {
1167
- getPrefixCls,
1168
- direction
1169
- } = useContext(ConfigContext);
1170
- const screens = useBreakpoint_default(true, null);
1171
- const mergedAlign = useMergedPropByScreen(align, screens);
1172
- const mergedJustify = useMergedPropByScreen(justify, screens);
1173
- const prefixCls = getPrefixCls("row", customizePrefixCls);
1174
- const [hashId, cssVarCls] = useRowStyle(prefixCls);
1175
- const gutters = useGutter(gutter, screens);
1176
- const classes = clsx(prefixCls, {
1177
- [`${prefixCls}-no-wrap`]: wrap === false,
1178
- [`${prefixCls}-${mergedJustify}`]: mergedJustify,
1179
- [`${prefixCls}-${mergedAlign}`]: mergedAlign,
1180
- [`${prefixCls}-rtl`]: direction === "rtl"
1181
- }, className, hashId, cssVarCls);
1182
- const rowStyle = {};
1183
- if (gutters?.[0]) {
1184
- const horizontalGutter = isNumber(gutters[0]) ? `${gutters[0] / -2}px` : `calc(${gutters[0]} / -2)`;
1185
- rowStyle.marginInline = horizontalGutter;
1186
- }
1187
- const [gutterH, gutterV] = gutters;
1188
- rowStyle.rowGap = gutterV;
1189
- const rowContext = useMemo(() => ({
1190
- gutter: [gutterH, gutterV],
1191
- wrap
1192
- }), [gutterH, gutterV, wrap]);
1193
- return /* @__PURE__ */ createElement(RowContext_default.Provider, {
1194
- value: rowContext
1195
- }, /* @__PURE__ */ createElement("div", {
1196
- ...others,
1197
- className: classes,
1198
- style: {
1199
- ...rowStyle,
1200
- ...style
1201
- },
1202
- ref
1203
- }, children));
1204
- });
1205
- if (true) {
1206
- Row.displayName = "Row";
1207
- }
1208
- var row_default = Row;
1209
-
1210
- // ../../node_modules/.pnpm/@rc-component+segmented@1.3.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@rc-component/segmented/es/MotionThumb.js
1211
- var calcThumbStyle = (targetElement, vertical) => {
1212
- if (!targetElement) return null;
1213
- const style = {
1214
- left: targetElement.offsetLeft,
1215
- right: targetElement.parentElement.clientWidth - targetElement.clientWidth - targetElement.offsetLeft,
1216
- width: targetElement.clientWidth,
1217
- top: targetElement.offsetTop,
1218
- bottom: targetElement.parentElement.clientHeight - targetElement.clientHeight - targetElement.offsetTop,
1219
- height: targetElement.clientHeight
1220
- };
1221
- if (vertical) {
1222
- return {
1223
- left: 0,
1224
- right: 0,
1225
- width: 0,
1226
- top: style.top,
1227
- bottom: style.bottom,
1228
- height: style.height
1229
- };
1230
- }
1231
- return {
1232
- left: style.left,
1233
- right: style.right,
1234
- width: style.width,
1235
- top: 0,
1236
- bottom: 0,
1237
- height: 0
1238
- };
1239
- };
1240
- var toPX = (value) => value !== void 0 ? `${value}px` : void 0;
1241
- function MotionThumb(props) {
1242
- const {
1243
- prefixCls,
1244
- containerRef,
1245
- value,
1246
- getValueIndex,
1247
- motionName,
1248
- onMotionStart,
1249
- onMotionEnd,
1250
- direction,
1251
- vertical = false
1252
- } = props;
1253
- const thumbRef = useRef(null);
1254
- const [prevValue, setPrevValue] = useState(value);
1255
- const findValueElement = (val) => {
1256
- const index = getValueIndex(val);
1257
- const ele = containerRef.current?.querySelectorAll(`.${prefixCls}-item`)[index];
1258
- return ele?.offsetParent && ele;
1259
- };
1260
- const [prevStyle, setPrevStyle] = useState(null);
1261
- const [nextStyle, setNextStyle] = useState(null);
1262
- useLayoutEffect_default(() => {
1263
- if (prevValue !== value) {
1264
- const prev = findValueElement(prevValue);
1265
- const next = findValueElement(value);
1266
- const calcPrevStyle = calcThumbStyle(prev, vertical);
1267
- const calcNextStyle = calcThumbStyle(next, vertical);
1268
- setPrevValue(value);
1269
- setPrevStyle(calcPrevStyle);
1270
- setNextStyle(calcNextStyle);
1271
- if (prev && next) {
1272
- onMotionStart();
1273
- } else {
1274
- onMotionEnd();
1275
- }
1276
- }
1277
- }, [value]);
1278
- const thumbStart = useMemo(() => {
1279
- if (vertical) {
1280
- return toPX(prevStyle?.top ?? 0);
1281
- }
1282
- if (direction === "rtl") {
1283
- return toPX(-prevStyle?.right);
1284
- }
1285
- return toPX(prevStyle?.left);
1286
- }, [vertical, direction, prevStyle]);
1287
- const thumbActive = useMemo(() => {
1288
- if (vertical) {
1289
- return toPX(nextStyle?.top ?? 0);
1290
- }
1291
- if (direction === "rtl") {
1292
- return toPX(-nextStyle?.right);
1293
- }
1294
- return toPX(nextStyle?.left);
1295
- }, [vertical, direction, nextStyle]);
1296
- const onAppearStart = () => {
1297
- if (vertical) {
1298
- return {
1299
- transform: "translateY(var(--thumb-start-top))",
1300
- height: "var(--thumb-start-height)"
1301
- };
1302
- }
1303
- return {
1304
- transform: "translateX(var(--thumb-start-left))",
1305
- width: "var(--thumb-start-width)"
1306
- };
1307
- };
1308
- const onAppearActive = () => {
1309
- if (vertical) {
1310
- return {
1311
- transform: "translateY(var(--thumb-active-top))",
1312
- height: "var(--thumb-active-height)"
1313
- };
1314
- }
1315
- return {
1316
- transform: "translateX(var(--thumb-active-left))",
1317
- width: "var(--thumb-active-width)"
1318
- };
1319
- };
1320
- const onVisibleChanged = () => {
1321
- setPrevStyle(null);
1322
- setNextStyle(null);
1323
- onMotionEnd();
1324
- };
1325
- if (!prevStyle || !nextStyle) {
1326
- return null;
1327
- }
1328
- return /* @__PURE__ */ createElement(es_default, {
1329
- visible: true,
1330
- motionName,
1331
- motionAppear: true,
1332
- onAppearStart,
1333
- onAppearActive,
1334
- onVisibleChanged
1335
- }, ({
1336
- className: motionClassName,
1337
- style: motionStyle
1338
- }, ref) => {
1339
- const mergedStyle = {
1340
- ...motionStyle,
1341
- "--thumb-start-left": thumbStart,
1342
- "--thumb-start-width": toPX(prevStyle?.width),
1343
- "--thumb-active-left": thumbActive,
1344
- "--thumb-active-width": toPX(nextStyle?.width),
1345
- "--thumb-start-top": thumbStart,
1346
- "--thumb-start-height": toPX(prevStyle?.height),
1347
- "--thumb-active-top": thumbActive,
1348
- "--thumb-active-height": toPX(nextStyle?.height)
1349
- };
1350
- const motionProps = {
1351
- ref: composeRef(thumbRef, ref),
1352
- style: mergedStyle,
1353
- className: clsx(`${prefixCls}-thumb`, motionClassName)
1354
- };
1355
- if (false) {
1356
- motionProps["data-test-style"] = JSON.stringify(mergedStyle);
1357
- }
1358
- return /* @__PURE__ */ createElement("div", motionProps);
1359
- });
1360
- }
1361
-
1362
- // ../../node_modules/.pnpm/@rc-component+segmented@1.3.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@rc-component/segmented/es/index.js
1363
- function getValidTitle(option) {
1364
- if (typeof option.title !== "undefined") {
1365
- return option.title;
1366
- }
1367
- if (typeof option.label !== "object") {
1368
- return option.label?.toString();
1369
- }
1370
- }
1371
- function normalizeOptions(options) {
1372
- return options.map((option) => {
1373
- if (typeof option === "object" && option !== null) {
1374
- const validTitle = getValidTitle(option);
1375
- return {
1376
- ...option,
1377
- title: validTitle
1378
- };
1379
- }
1380
- return {
1381
- label: option?.toString(),
1382
- title: option?.toString(),
1383
- value: option
1384
- };
1385
- });
1386
- }
1387
- var InternalSegmentedOption = ({
1388
- prefixCls,
1389
- className,
1390
- style,
1391
- styles,
1392
- classNames: segmentedClassNames,
1393
- data,
1394
- disabled,
1395
- checked,
1396
- label,
1397
- title: title2,
1398
- value,
1399
- name,
1400
- onChange,
1401
- onFocus,
1402
- onBlur,
1403
- onKeyDown,
1404
- onKeyUp,
1405
- onMouseDown,
1406
- itemRender = (node) => node
1407
- }) => {
1408
- const handleChange = (event) => {
1409
- if (disabled) {
1410
- return;
1411
- }
1412
- onChange(event, value);
1413
- };
1414
- const itemContent = /* @__PURE__ */ createElement("label", {
1415
- className: clsx(className, {
1416
- [`${prefixCls}-item-disabled`]: disabled
1417
- }),
1418
- style,
1419
- onMouseDown
1420
- }, /* @__PURE__ */ createElement("input", {
1421
- name,
1422
- className: `${prefixCls}-item-input`,
1423
- type: "radio",
1424
- disabled,
1425
- checked,
1426
- onChange: handleChange,
1427
- onFocus,
1428
- onBlur,
1429
- onKeyDown,
1430
- onKeyUp
1431
- }), /* @__PURE__ */ createElement("div", {
1432
- className: clsx(`${prefixCls}-item-label`, segmentedClassNames?.label),
1433
- title: title2,
1434
- style: styles?.label
1435
- }, label));
1436
- return itemRender(itemContent, {
1437
- item: data
1438
- });
1439
- };
1440
- var Segmented = /* @__PURE__ */ forwardRef((props, ref) => {
1441
- const {
1442
- prefixCls = "rc-segmented",
1443
- direction,
1444
- vertical,
1445
- options = [],
1446
- disabled,
1447
- defaultValue,
1448
- value,
1449
- name,
1450
- onChange,
1451
- className = "",
1452
- style,
1453
- styles,
1454
- classNames: segmentedClassNames,
1455
- motionName = "thumb-motion",
1456
- itemRender,
1457
- ...restProps
1458
- } = props;
1459
- const containerRef = useRef(null);
1460
- const mergedRef = useMemo(() => composeRef(containerRef, ref), [containerRef, ref]);
1461
- const segmentedOptions = useMemo(() => {
1462
- return normalizeOptions(options);
1463
- }, [options]);
1464
- const [rawValue, setRawValue] = useControlledState(defaultValue ?? segmentedOptions[0]?.value, value);
1465
- const [thumbShow, setThumbShow] = useState(false);
1466
- const handleChange = (event, val) => {
1467
- setRawValue(val);
1468
- onChange?.(val);
1469
- };
1470
- const divProps = omit(restProps, ["children"]);
1471
- const [isKeyboard, setIsKeyboard] = useState(false);
1472
- const [isFocused, setIsFocused] = useState(false);
1473
- const handleFocus = () => {
1474
- setIsFocused(true);
1475
- };
1476
- const handleBlur = () => {
1477
- setIsFocused(false);
1478
- };
1479
- const handleMouseDown = () => {
1480
- setIsKeyboard(false);
1481
- };
1482
- const handleKeyUp = (event) => {
1483
- if (event.key === "Tab") {
1484
- setIsKeyboard(true);
1485
- }
1486
- };
1487
- const onOffset = (offset) => {
1488
- const currentIndex = segmentedOptions.findIndex((option) => option.value === rawValue);
1489
- const total = segmentedOptions.length;
1490
- const nextIndex = (currentIndex + offset + total) % total;
1491
- const nextOption = segmentedOptions[nextIndex];
1492
- if (nextOption) {
1493
- setRawValue(nextOption.value);
1494
- onChange?.(nextOption.value);
1495
- }
1496
- };
1497
- const handleKeyDown = (event) => {
1498
- switch (event.key) {
1499
- case "ArrowLeft":
1500
- case "ArrowUp":
1501
- onOffset(-1);
1502
- break;
1503
- case "ArrowRight":
1504
- case "ArrowDown":
1505
- onOffset(1);
1506
- break;
1507
- }
1508
- };
1509
- const renderOption = (segmentedOption) => {
1510
- const {
1511
- value: optionValue,
1512
- disabled: optionDisabled
1513
- } = segmentedOption;
1514
- return /* @__PURE__ */ createElement(InternalSegmentedOption, _extends({}, segmentedOption, {
1515
- name,
1516
- data: segmentedOption,
1517
- itemRender,
1518
- key: optionValue,
1519
- prefixCls,
1520
- className: clsx(segmentedOption.className, `${prefixCls}-item`, segmentedClassNames?.item, {
1521
- [`${prefixCls}-item-selected`]: optionValue === rawValue && !thumbShow,
1522
- [`${prefixCls}-item-focused`]: isFocused && isKeyboard && optionValue === rawValue
1523
- }),
1524
- style: styles?.item,
1525
- classNames: segmentedClassNames,
1526
- styles,
1527
- checked: optionValue === rawValue,
1528
- onChange: handleChange,
1529
- onFocus: handleFocus,
1530
- onBlur: handleBlur,
1531
- onKeyDown: handleKeyDown,
1532
- onKeyUp: handleKeyUp,
1533
- onMouseDown: handleMouseDown,
1534
- disabled: !!disabled || !!optionDisabled
1535
- }));
1536
- };
1537
- return /* @__PURE__ */ createElement("div", _extends({
1538
- role: "radiogroup",
1539
- "aria-label": "segmented control",
1540
- tabIndex: disabled ? void 0 : 0,
1541
- "aria-orientation": vertical ? "vertical" : "horizontal",
1542
- style
1543
- }, divProps, {
1544
- className: clsx(prefixCls, {
1545
- [`${prefixCls}-rtl`]: direction === "rtl",
1546
- [`${prefixCls}-disabled`]: disabled,
1547
- [`${prefixCls}-vertical`]: vertical
1548
- }, className),
1549
- ref: mergedRef
1550
- }), /* @__PURE__ */ createElement("div", {
1551
- className: `${prefixCls}-group`
1552
- }, /* @__PURE__ */ createElement(MotionThumb, {
1553
- vertical,
1554
- prefixCls,
1555
- value: rawValue,
1556
- containerRef,
1557
- motionName: `${prefixCls}-${motionName}`,
1558
- direction,
1559
- getValueIndex: (val) => segmentedOptions.findIndex((n2) => n2.value === val),
1560
- onMotionStart: () => {
1561
- setThumbShow(true);
1562
- },
1563
- onMotionEnd: () => {
1564
- setThumbShow(false);
1565
- }
1566
- }), segmentedOptions.map(renderOption)));
1567
- });
1568
- if (true) {
1569
- Segmented.displayName = "Segmented";
1570
- }
1571
- var TypedSegmented = Segmented;
1572
- var es_default3 = TypedSegmented;
1573
-
1574
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/segmented/style/index.js
1575
- function getItemDisabledStyle(cls, token) {
1576
- return {
1577
- [`${cls}, ${cls}:hover, ${cls}:focus`]: {
1578
- color: token.colorTextDisabled,
1579
- cursor: "not-allowed"
1580
- }
1581
- };
1582
- }
1583
- var getItemSelectedStyle = (token) => {
1584
- return {
1585
- background: token.itemSelectedBg,
1586
- boxShadow: token.boxShadowTertiary
1587
- };
1588
- };
1589
- var segmentedTextEllipsisCss = {
1590
- overflow: "hidden",
1591
- // handle text ellipsis
1592
- ...textEllipsis
1593
- };
1594
- var genSegmentedStyle = (token) => {
1595
- const {
1596
- componentCls,
1597
- motionDurationSlow,
1598
- motionEaseInOut,
1599
- motionDurationMid
1600
- } = token;
1601
- const labelHeight = token.calc(token.controlHeight).sub(token.calc(token.trackPadding).mul(2)).equal();
1602
- const labelHeightLG = token.calc(token.controlHeightLG).sub(token.calc(token.trackPadding).mul(2)).equal();
1603
- const labelHeightSM = token.calc(token.controlHeightSM).sub(token.calc(token.trackPadding).mul(2)).equal();
1604
- return {
1605
- [componentCls]: {
1606
- ...resetComponent(token),
1607
- display: "inline-block",
1608
- padding: token.trackPadding,
1609
- color: token.itemColor,
1610
- background: token.trackBg,
1611
- borderRadius: token.borderRadius,
1612
- transition: `all ${motionDurationMid}`,
1613
- ...genFocusStyle(token),
1614
- [`${componentCls}-group`]: {
1615
- position: "relative",
1616
- display: "flex",
1617
- alignItems: "stretch",
1618
- justifyItems: "flex-start",
1619
- flexDirection: "row",
1620
- width: "100%"
1621
- },
1622
- // RTL styles
1623
- [`&${componentCls}-rtl`]: {
1624
- direction: "rtl"
1625
- },
1626
- [`&${componentCls}-vertical`]: {
1627
- [`${componentCls}-group`]: {
1628
- flexDirection: "column"
1629
- },
1630
- [`${componentCls}-thumb`]: {
1631
- width: "100%",
1632
- height: 0,
1633
- padding: `0 ${unit(token.paddingXXS)}`
1634
- }
1635
- },
1636
- // block styles
1637
- [`&${componentCls}-block`]: {
1638
- display: "flex"
1639
- },
1640
- [`&${componentCls}-block ${componentCls}-item`]: {
1641
- flex: 1,
1642
- minWidth: 0
1643
- },
1644
- // item styles
1645
- [`${componentCls}-item`]: {
1646
- position: "relative",
1647
- textAlign: "center",
1648
- cursor: "pointer",
1649
- transition: `color ${motionDurationMid}`,
1650
- borderRadius: token.borderRadiusSM,
1651
- // Fix Safari render bug
1652
- // https://github.com/ant-design/ant-design/issues/45250
1653
- transform: "translateZ(0)",
1654
- "&-selected": {
1655
- ...getItemSelectedStyle(token),
1656
- color: token.itemSelectedColor
1657
- },
1658
- "&-focused": genFocusOutline(token),
1659
- "&::after": {
1660
- content: '""',
1661
- position: "absolute",
1662
- zIndex: -1,
1663
- width: "100%",
1664
- height: "100%",
1665
- top: 0,
1666
- insetInlineStart: 0,
1667
- borderRadius: "inherit",
1668
- opacity: 0,
1669
- // This is mandatory to make it not clickable or hoverable
1670
- // Ref: https://github.com/ant-design/ant-design/issues/40888
1671
- pointerEvents: "none",
1672
- transition: ["opacity", "background-color"].map((prop) => `${prop} ${motionDurationMid}`).join(", ")
1673
- },
1674
- [`&:not(${componentCls}-item-selected):not(${componentCls}-item-disabled)`]: {
1675
- "&:hover, &:active": {
1676
- color: token.itemHoverColor
1677
- },
1678
- "&:hover::after": {
1679
- opacity: 1,
1680
- backgroundColor: token.itemHoverBg
1681
- },
1682
- "&:active::after": {
1683
- opacity: 1,
1684
- backgroundColor: token.itemActiveBg
1685
- }
1686
- },
1687
- "&-label": {
1688
- minHeight: labelHeight,
1689
- lineHeight: unit(labelHeight),
1690
- padding: `0 ${unit(token.segmentedPaddingHorizontal)}`,
1691
- ...segmentedTextEllipsisCss
1692
- },
1693
- // syntactic sugar to add `icon` for Segmented Item
1694
- "&-icon + *": {
1695
- marginInlineStart: token.calc(token.marginSM).div(2).equal()
1696
- },
1697
- // Icons from third-party libraries render as a bare `<svg>` inside the icon wrapper,
1698
- // which the `.anticon` reset never reaches. An `<svg>` has no baseline of its own, so it
1699
- // is aligned by its bottom margin edge (CSS 2.1 §10.8.1) and rides above the label.
1700
- // `display: inline-block` keeps it an atomic inline box so `vertical-align` still applies
1701
- // even under a CSS reset that forces `svg { display: block }` (e.g. Tailwind Preflight),
1702
- // which would otherwise drop the icon onto its own line. `vertical-align: middle` centres its
1703
- // margin box on the x-height line; `margin-block-end` then lifts it by half its own value onto
1704
- // the cap-height centre (capHeight − xHeight ≈ 0.2em across typical fonts), keeping it centred
1705
- // at any icon size.
1706
- // Only matches a bare `<svg>`: an `.anticon` keeps its `<svg>` one level deeper.
1707
- "&-icon > svg": {
1708
- display: "inline-block",
1709
- verticalAlign: "middle",
1710
- marginBlockEnd: "0.2em"
1711
- },
1712
- "&-input": {
1713
- position: "absolute",
1714
- insetBlockStart: 0,
1715
- insetInlineStart: 0,
1716
- width: 0,
1717
- height: 0,
1718
- opacity: 0,
1719
- pointerEvents: "none"
1720
- }
1721
- },
1722
- // thumb styles
1723
- [`${componentCls}-thumb`]: {
1724
- ...getItemSelectedStyle(token),
1725
- position: "absolute",
1726
- insetBlockStart: 0,
1727
- insetInlineStart: 0,
1728
- width: 0,
1729
- height: "100%",
1730
- padding: `${unit(token.paddingXXS)} 0`,
1731
- borderRadius: token.borderRadiusSM,
1732
- [`& ~ ${componentCls}-item:not(${componentCls}-item-selected):not(${componentCls}-item-disabled)::after`]: {
1733
- backgroundColor: "transparent"
1734
- }
1735
- },
1736
- // size styles
1737
- [`&${componentCls}-lg`]: {
1738
- borderRadius: token.borderRadiusLG,
1739
- [`${componentCls}-item-label`]: {
1740
- minHeight: labelHeightLG,
1741
- lineHeight: unit(labelHeightLG),
1742
- padding: `0 ${unit(token.segmentedPaddingHorizontal)}`,
1743
- fontSize: token.fontSizeLG
1744
- },
1745
- [`${componentCls}-item, ${componentCls}-thumb`]: {
1746
- borderRadius: token.borderRadius
1747
- }
1748
- },
1749
- [`&${componentCls}-sm`]: {
1750
- borderRadius: token.borderRadiusSM,
1751
- [`${componentCls}-item-label`]: {
1752
- minHeight: labelHeightSM,
1753
- lineHeight: unit(labelHeightSM),
1754
- padding: `0 ${unit(token.segmentedPaddingHorizontalSM)}`
1755
- },
1756
- [`${componentCls}-item, ${componentCls}-thumb`]: {
1757
- borderRadius: token.borderRadiusXS
1758
- }
1759
- },
1760
- // disabled styles
1761
- ...getItemDisabledStyle(`&-disabled ${componentCls}-item`, token),
1762
- ...getItemDisabledStyle(`${componentCls}-item-disabled`, token),
1763
- // transition effect when `appear-active`
1764
- [`${componentCls}-thumb-motion-appear-active`]: {
1765
- willChange: "transform, width",
1766
- transition: [`transform`, `width`].map((prop) => `${prop} ${motionDurationSlow} ${motionEaseInOut}`).join(", ")
1767
- },
1768
- [`&${componentCls}-shape-round`]: {
1769
- borderRadius: 9999,
1770
- [`${componentCls}-item, ${componentCls}-thumb`]: {
1771
- borderRadius: 9999
1772
- }
1773
- }
1774
- }
1775
- };
1776
- };
1777
- var prepareComponentToken = (token) => {
1778
- const {
1779
- colorTextLabel,
1780
- colorText,
1781
- colorFillSecondary,
1782
- colorBgElevated,
1783
- colorFill,
1784
- lineWidthBold,
1785
- colorBgLayout
1786
- } = token;
1787
- return {
1788
- trackPadding: lineWidthBold,
1789
- trackBg: colorBgLayout,
1790
- itemColor: colorTextLabel,
1791
- itemHoverColor: colorText,
1792
- itemHoverBg: colorFillSecondary,
1793
- itemSelectedBg: colorBgElevated,
1794
- itemActiveBg: colorFill,
1795
- itemSelectedColor: colorText
1796
- };
1797
- };
1798
- var style_default2 = genStyleHooks("Segmented", (token) => {
1799
- const {
1800
- lineWidth,
1801
- calc
1802
- } = token;
1803
- const segmentedToken = merge(token, {
1804
- segmentedPaddingHorizontal: calc(token.controlPaddingHorizontal).sub(lineWidth).equal(),
1805
- segmentedPaddingHorizontalSM: calc(token.controlPaddingHorizontalSM).sub(lineWidth).equal()
1806
- });
1807
- return genSegmentedStyle(segmentedToken);
1808
- }, prepareComponentToken);
1809
-
1810
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/segmented/index.js
1811
- function isSegmentedLabeledOptionWithIcon(option) {
1812
- return isPlainObject(option) && !!option?.icon;
1813
- }
1814
- var InternalSegmented = /* @__PURE__ */ forwardRef((props, ref) => {
1815
- const defaultName = useId_default();
1816
- const {
1817
- prefixCls: customizePrefixCls,
1818
- className,
1819
- rootClassName,
1820
- block,
1821
- options = [],
1822
- size: customSize,
1823
- style,
1824
- vertical,
1825
- orientation,
1826
- shape = "default",
1827
- name = defaultName,
1828
- styles,
1829
- classNames,
1830
- ...restProps
1831
- } = props;
1832
- const {
1833
- getPrefixCls,
1834
- direction,
1835
- className: contextClassName,
1836
- style: contextStyle,
1837
- classNames: contextClassNames,
1838
- styles: contextStyles
1839
- } = useComponentConfig("segmented");
1840
- const mergedProps = {
1841
- ...props,
1842
- options,
1843
- size: customSize,
1844
- shape
1845
- };
1846
- const contextStyleRoot = useSemanticRootStyle(contextStyle);
1847
- const styleRoot = useSemanticRootStyle(style);
1848
- const [mergedClassNames, mergedStyles] = useMergeSemantic([contextClassNames, classNames], [contextStyles, contextStyleRoot, styles, styleRoot], {
1849
- props: mergedProps
1850
- });
1851
- const prefixCls = getPrefixCls("segmented", customizePrefixCls);
1852
- const [hashId, cssVarCls] = style_default2(prefixCls);
1853
- const mergedSize = useSize_default(customSize);
1854
- const extendedOptions = useMemo(() => options.map((option) => {
1855
- if (isSegmentedLabeledOptionWithIcon(option)) {
1856
- const {
1857
- icon,
1858
- label,
1859
- ...restOption
1860
- } = option;
1861
- return {
1862
- ...restOption,
1863
- label: /* @__PURE__ */ createElement(Fragment, null, /* @__PURE__ */ createElement("span", {
1864
- className: clsx(`${prefixCls}-item-icon`, mergedClassNames.icon),
1865
- style: mergedStyles.icon
1866
- }, icon), label && /* @__PURE__ */ createElement("span", null, label))
1867
- };
1868
- }
1869
- return option;
1870
- }), [options, prefixCls, mergedClassNames.icon, mergedStyles.icon]);
1871
- const [, mergedVertical] = useOrientation(orientation, vertical);
1872
- const cls = clsx(className, rootClassName, contextClassName, mergedClassNames.root, {
1873
- [`${prefixCls}-block`]: block,
1874
- [`${prefixCls}-sm`]: mergedSize === "small",
1875
- [`${prefixCls}-lg`]: mergedSize === "large",
1876
- [`${prefixCls}-vertical`]: mergedVertical,
1877
- [`${prefixCls}-shape-${shape}`]: shape === "round"
1878
- }, hashId, cssVarCls);
1879
- const itemRender = (node, {
1880
- item
1881
- }) => {
1882
- if (!item.tooltip) {
1883
- return node;
1884
- }
1885
- const tooltipProps = isPlainObject(item.tooltip) ? item.tooltip : {
1886
- title: item.tooltip
1887
- };
1888
- return /* @__PURE__ */ createElement(tooltip_default, {
1889
- ...tooltipProps
1890
- }, node);
1891
- };
1892
- return /* @__PURE__ */ createElement(es_default3, {
1893
- ...restProps,
1894
- name,
1895
- className: cls,
1896
- style: mergedStyles.root,
1897
- classNames: mergedClassNames,
1898
- styles: mergedStyles,
1899
- itemRender,
1900
- options: extendedOptions,
1901
- ref,
1902
- prefixCls,
1903
- direction,
1904
- vertical: mergedVertical
1905
- });
1906
- });
1907
- var Segmented2 = InternalSegmented;
1908
- if (true) {
1909
- Segmented2.displayName = "Segmented";
1910
- }
1911
- var segmented_default = Segmented2;
1912
-
1913
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/_util/convertToTooltipProps.js
1914
- var convertToTooltipProps = (tooltip, context) => {
1915
- if (!isReactRenderable(tooltip)) {
1916
- return null;
1917
- }
1918
- if (isPlainObject(tooltip) && !/* @__PURE__ */ isValidElement(tooltip)) {
1919
- return {
1920
- ...context,
1921
- ...tooltip
1922
- };
1923
- }
1924
- return {
1925
- ...context,
1926
- title: tooltip
1927
- };
1928
- };
1929
- var convertToTooltipProps_default = convertToTooltipProps;
1930
-
1931
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/hooks/useDebounce.js
1932
- function useDebounce(value) {
1933
- const [cacheValue, setCacheValue] = useDelayState(value);
1934
- useEffect(() => {
1935
- setCacheValue(value, {
1936
- ms: value.length ? 0 : 10
1937
- });
1938
- }, [value]);
1939
- return cacheValue;
1940
- }
1941
-
1942
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/style/explain.js
1943
- var genFormValidateMotionStyle = (token) => {
1944
- const {
1945
- componentCls,
1946
- motionDurationFast,
1947
- motionEaseInOut
1948
- } = token;
1949
- const helpCls = `${componentCls}-show-help`;
1950
- const helpItemCls = `${componentCls}-show-help-item`;
1951
- return {
1952
- [helpCls]: {
1953
- // Explain holder
1954
- transition: `opacity ${motionDurationFast} ${motionEaseInOut}`,
1955
- "&-appear, &-enter": {
1956
- opacity: 0,
1957
- "&-active": {
1958
- opacity: 1
1959
- }
1960
- },
1961
- "&-leave": {
1962
- opacity: 1,
1963
- "&-active": {
1964
- opacity: 0
1965
- }
1966
- },
1967
- // Explain
1968
- [helpItemCls]: {
1969
- overflow: "hidden",
1970
- transition: `${["height", "opacity", "transform"].map((prop) => `${prop} ${motionDurationFast} ${motionEaseInOut}`).join(", ")} !important`,
1971
- [`&${helpItemCls}-appear, &${helpItemCls}-enter`]: {
1972
- transform: `translateY(-5px)`,
1973
- opacity: 0,
1974
- "&-active": {
1975
- transform: "translateY(0)",
1976
- opacity: 1
1977
- }
1978
- },
1979
- [`&${helpItemCls}-leave-active`]: {
1980
- transform: `translateY(-5px)`
1981
- }
1982
- }
1983
- }
1984
- };
1985
- };
1986
- var explain_default = genFormValidateMotionStyle;
1987
-
1988
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/style/index.js
1989
- var resetForm = (token) => ({
1990
- legend: {
1991
- display: "block",
1992
- width: "100%",
1993
- marginBottom: token.marginLG,
1994
- padding: 0,
1995
- color: token.colorTextDescription,
1996
- fontSize: token.fontSizeLG,
1997
- lineHeight: "inherit",
1998
- border: 0,
1999
- borderBottom: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorder}`
2000
- },
2001
- 'input[type="search"]': {
2002
- boxSizing: "border-box"
2003
- },
2004
- // Position radios and checkboxes better
2005
- 'input[type="radio"], input[type="checkbox"]': {
2006
- lineHeight: "normal"
2007
- },
2008
- 'input[type="file"]': {
2009
- display: "block"
2010
- },
2011
- // Make range inputs behave like textual form controls
2012
- 'input[type="range"]': {
2013
- display: "block",
2014
- width: "100%"
2015
- },
2016
- // Make multiple select elements height not fixed
2017
- "select[multiple], select[size]": {
2018
- height: "auto"
2019
- },
2020
- // Focus for file, radio, and checkbox
2021
- "input[type='file']:focus, input[type='radio']:focus, input[type='checkbox']:focus": {
2022
- outline: 0,
2023
- boxShadow: `0 0 0 ${unit(token.controlOutlineWidth)} ${token.controlOutline}`
2024
- },
2025
- // Adjust output element
2026
- output: {
2027
- display: "block",
2028
- paddingTop: 15,
2029
- color: token.colorText,
2030
- fontSize: token.fontSize,
2031
- lineHeight: token.lineHeight
2032
- }
2033
- });
2034
- var genFormSize = (token, height) => {
2035
- const {
2036
- formItemCls
2037
- } = token;
2038
- return {
2039
- [formItemCls]: {
2040
- [`${formItemCls}-label > label`]: {
2041
- height
2042
- },
2043
- [`${formItemCls}-control-input`]: {
2044
- minHeight: height
2045
- }
2046
- }
2047
- };
2048
- };
2049
- var genFormStyle = (token) => {
2050
- const {
2051
- componentCls
2052
- } = token;
2053
- return {
2054
- [componentCls]: {
2055
- ...resetComponent(token),
2056
- ...resetForm(token),
2057
- [`${componentCls}-text`]: {
2058
- display: "inline-block",
2059
- paddingInlineEnd: token.paddingSM
2060
- },
2061
- // ================================================================
2062
- // = Size =
2063
- // ================================================================
2064
- "&-small": {
2065
- ...genFormSize(token, token.controlHeightSM)
2066
- },
2067
- "&-large": {
2068
- ...genFormSize(token, token.controlHeightLG)
2069
- }
2070
- }
2071
- };
2072
- };
2073
- var genFormItemStyle = (token) => {
2074
- const {
2075
- formItemCls,
2076
- iconCls,
2077
- rootPrefixCls,
2078
- antCls,
2079
- labelRequiredMarkColor,
2080
- labelColor,
2081
- labelFontSize,
2082
- labelHeight,
2083
- labelColonMarginInlineStart,
2084
- labelColonMarginInlineEnd,
2085
- itemMarginBottom
2086
- } = token;
2087
- const [varName] = genCssVar(antCls, "grid");
2088
- return {
2089
- [formItemCls]: {
2090
- ...resetComponent(token),
2091
- marginBottom: itemMarginBottom,
2092
- verticalAlign: "top",
2093
- "&-with-help": {
2094
- transition: "none"
2095
- },
2096
- [`&-hidden,
2097
- &-hidden${antCls}-row`]: {
2098
- // https://github.com/ant-design/ant-design/issues/26141
2099
- display: "none"
2100
- },
2101
- // ==============================================================
2102
- // = Label =
2103
- // ==============================================================
2104
- [`${formItemCls}-label`]: {
2105
- flexGrow: 0,
2106
- overflow: "hidden",
2107
- whiteSpace: "nowrap",
2108
- textAlign: "end",
2109
- verticalAlign: "middle",
2110
- "&-left": {
2111
- textAlign: "start"
2112
- },
2113
- "&-wrap": {
2114
- overflow: "unset",
2115
- lineHeight: token.lineHeight,
2116
- whiteSpace: "unset",
2117
- "> label": {
2118
- verticalAlign: "middle",
2119
- textWrap: "balance"
2120
- }
2121
- },
2122
- "> label": {
2123
- position: "relative",
2124
- display: "inline-flex",
2125
- alignItems: "center",
2126
- maxWidth: "100%",
2127
- height: labelHeight,
2128
- color: labelColor,
2129
- fontSize: labelFontSize,
2130
- [`> ${iconCls}`]: {
2131
- fontSize: token.fontSize,
2132
- verticalAlign: "top"
2133
- },
2134
- [`&${formItemCls}-required`]: {
2135
- "&::before": {
2136
- display: "inline-block",
2137
- marginInlineEnd: token.marginXXS,
2138
- color: labelRequiredMarkColor,
2139
- fontSize: token.fontSize,
2140
- fontFamily: "sans-serif",
2141
- lineHeight: 1,
2142
- content: '"*"'
2143
- },
2144
- [`&${formItemCls}-required-mark-hidden, &${formItemCls}-required-mark-optional`]: {
2145
- "&::before": {
2146
- display: "none"
2147
- }
2148
- }
2149
- },
2150
- // Optional mark
2151
- [`${formItemCls}-optional`]: {
2152
- display: "inline-block",
2153
- marginInlineStart: token.marginXXS,
2154
- color: token.colorTextDescription,
2155
- [`&${formItemCls}-required-mark-hidden`]: {
2156
- display: "none"
2157
- }
2158
- },
2159
- // Optional mark
2160
- [`${formItemCls}-tooltip`]: {
2161
- color: token.colorTextDescription,
2162
- cursor: "help",
2163
- writingMode: "horizontal-tb",
2164
- marginInlineStart: token.marginXXS
2165
- },
2166
- "&::after": {
2167
- content: '":"',
2168
- position: "relative",
2169
- marginBlock: 0,
2170
- marginInlineStart: labelColonMarginInlineStart,
2171
- marginInlineEnd: labelColonMarginInlineEnd
2172
- },
2173
- [`&${formItemCls}-no-colon::after`]: {
2174
- content: '"\\a0"'
2175
- }
2176
- }
2177
- },
2178
- // ==============================================================
2179
- // = Input =
2180
- // ==============================================================
2181
- [`${formItemCls}-control`]: {
2182
- [varName("display")]: "flex",
2183
- flexDirection: "column",
2184
- flexGrow: 1,
2185
- [`&:first-child:not([class^="'${rootPrefixCls}-col-'"]):not([class*="' ${rootPrefixCls}-col-'"])`]: {
2186
- width: "100%"
2187
- },
2188
- "&-input": {
2189
- position: "relative",
2190
- display: "flex",
2191
- alignItems: "center",
2192
- minHeight: token.controlHeight,
2193
- "&-content": {
2194
- flex: "auto",
2195
- maxWidth: "100%",
2196
- // Fix https://github.com/ant-design/ant-design/issues/54042
2197
- // Remove impact of whitespaces
2198
- [`&:has(> ${antCls}-switch:only-child, > ${antCls}-rate:only-child)`]: {
2199
- display: "flex",
2200
- alignItems: "center"
2201
- }
2202
- }
2203
- }
2204
- },
2205
- // ==============================================================
2206
- // = Explain =
2207
- // ==============================================================
2208
- [formItemCls]: {
2209
- "&-additional": {
2210
- display: "flex",
2211
- flexDirection: "column"
2212
- },
2213
- "&-explain, &-extra": {
2214
- clear: "both",
2215
- color: token.colorTextDescription,
2216
- fontSize: token.fontSize,
2217
- lineHeight: token.lineHeight
2218
- },
2219
- "&-explain-connected": {
2220
- width: "100%"
2221
- },
2222
- "&-extra": {
2223
- minHeight: token.controlHeightSM,
2224
- transition: `color ${token.motionDurationMid} ${token.motionEaseOut}`
2225
- // sync input color transition
2226
- },
2227
- "&-explain": {
2228
- "&-error": {
2229
- color: token.colorError
2230
- },
2231
- "&-warning": {
2232
- color: token.colorWarning
2233
- }
2234
- }
2235
- },
2236
- [`&-with-help ${formItemCls}-explain`]: {
2237
- height: "auto",
2238
- opacity: 1
2239
- },
2240
- // ==============================================================
2241
- // = Feedback Icon =
2242
- // ==============================================================
2243
- [`${formItemCls}-feedback-icon`]: {
2244
- fontSize: token.fontSize,
2245
- textAlign: "center",
2246
- visibility: "visible",
2247
- animationName: zoomIn,
2248
- animationDuration: token.motionDurationMid,
2249
- animationTimingFunction: token.motionEaseOutBack,
2250
- pointerEvents: "none",
2251
- "&-success": {
2252
- color: token.colorSuccess
2253
- },
2254
- "&-error": {
2255
- color: token.colorError
2256
- },
2257
- "&-warning": {
2258
- color: token.colorWarning
2259
- },
2260
- "&-validating": {
2261
- color: token.colorPrimary
2262
- }
2263
- }
2264
- }
2265
- };
2266
- };
2267
- var makeVerticalLayoutLabelBase = (token) => ({
2268
- padding: token.verticalLabelPadding,
2269
- whiteSpace: "initial",
2270
- textAlign: "start",
2271
- "> label": {
2272
- margin: 0,
2273
- "&::after": {
2274
- // https://github.com/ant-design/ant-design/issues/43538
2275
- visibility: "hidden"
2276
- }
2277
- }
2278
- });
2279
- var makeVerticalLayoutLabel = (token) => ({
2280
- ...makeVerticalLayoutLabelBase(token),
2281
- margin: token.verticalLabelMargin
2282
- });
2283
- var makeVerticalLayoutLabelWithOffset = (token) => {
2284
- const [formVarName] = genCssVar(token.antCls, "form");
2285
- return {
2286
- ...makeVerticalLayoutLabelBase(token),
2287
- [formVarName("item-label-margin")]: token.verticalLabelMargin
2288
- };
2289
- };
2290
- var genHorizontalStyle = (token) => {
2291
- const {
2292
- antCls,
2293
- formItemCls
2294
- } = token;
2295
- return {
2296
- [`${formItemCls}-horizontal`]: {
2297
- [`${formItemCls}-label`]: {
2298
- flexGrow: 0
2299
- },
2300
- [`${formItemCls}-control`]: {
2301
- flex: "1 1 0",
2302
- // https://github.com/ant-design/ant-design/issues/32777
2303
- // https://github.com/ant-design/ant-design/issues/33773
2304
- minWidth: 0
2305
- },
2306
- // Do not change this to `ant-col-24`! `-24` match all the responsive rules
2307
- // https://github.com/ant-design/ant-design/issues/32980
2308
- // https://github.com/ant-design/ant-design/issues/34903
2309
- // https://github.com/ant-design/ant-design/issues/44538
2310
- [`${formItemCls}-label[class$='-24'], ${formItemCls}-label[class*='-24 ']`]: {
2311
- [`& + ${formItemCls}-control`]: {
2312
- minWidth: "unset"
2313
- }
2314
- },
2315
- [`> ${formItemCls}-row > ${antCls}-col-24${formItemCls}-label,
2316
- > ${formItemCls}-row > ${antCls}-col-xl-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
2317
- }
2318
- };
2319
- };
2320
- var genInlineStyle = (token) => {
2321
- const {
2322
- componentCls,
2323
- formItemCls,
2324
- inlineItemMarginBottom
2325
- } = token;
2326
- return {
2327
- [`${componentCls}-inline`]: {
2328
- display: "flex",
2329
- flexWrap: "wrap",
2330
- [`${formItemCls}-inline`]: {
2331
- flex: "none",
2332
- marginInlineEnd: token.margin,
2333
- marginBottom: inlineItemMarginBottom,
2334
- "&-row": {
2335
- flexWrap: "nowrap"
2336
- },
2337
- [`> ${formItemCls}-label,
2338
- > ${formItemCls}-control`]: {
2339
- display: "inline-block",
2340
- verticalAlign: "top"
2341
- },
2342
- [`> ${formItemCls}-label`]: {
2343
- flex: "none"
2344
- },
2345
- [`${componentCls}-text`]: {
2346
- display: "inline-block"
2347
- },
2348
- [`${formItemCls}-has-feedback`]: {
2349
- display: "inline-block"
2350
- }
2351
- }
2352
- }
2353
- };
2354
- };
2355
- var makeVerticalLayout = (token) => {
2356
- const {
2357
- componentCls,
2358
- formItemCls,
2359
- rootPrefixCls
2360
- } = token;
2361
- return {
2362
- [`${formItemCls}:not(${formItemCls}-vertical) > ${formItemCls}-row > ${formItemCls}-label`]: makeVerticalLayoutLabel(token),
2363
- // ref: https://github.com/ant-design/ant-design/issues/45122
2364
- [`${componentCls}:not(${componentCls}-inline)`]: {
2365
- [formItemCls]: {
2366
- flexWrap: "wrap",
2367
- [`${formItemCls}-label, ${formItemCls}-control`]: {
2368
- // When developer pass `xs: { span }`,
2369
- // It should follow the `xs` screen config
2370
- // ref: https://github.com/ant-design/ant-design/issues/44386
2371
- [`&:not([class*=" ${rootPrefixCls}-col-xs"])`]: {
2372
- flex: "0 0 100%",
2373
- maxWidth: "100%"
2374
- }
2375
- }
2376
- }
2377
- }
2378
- };
2379
- };
2380
- var genVerticalStyle = (token) => {
2381
- const {
2382
- componentCls,
2383
- formItemCls,
2384
- antCls,
2385
- verticalLabelHeight
2386
- } = token;
2387
- const [formVarName, formVarRef] = genCssVar(antCls, "form");
2388
- return {
2389
- [formItemCls]: {
2390
- [formVarName("item-label-margin")]: "initial"
2391
- },
2392
- [`${formItemCls}-label`]: {
2393
- margin: formVarRef("item-label-margin")
2394
- },
2395
- [`${formItemCls}-vertical`]: {
2396
- [`${formItemCls}-row`]: {
2397
- flexDirection: "column"
2398
- },
2399
- [`${formItemCls}-label > label`]: {
2400
- height: verticalLabelHeight
2401
- },
2402
- [`${formItemCls}-control`]: {
2403
- width: "100%"
2404
- },
2405
- [`> ${formItemCls}-row > ${formItemCls}-label,
2406
- > ${formItemCls}-row > ${antCls}-col-24${formItemCls}-label,
2407
- > ${formItemCls}-row > ${antCls}-col-xl-24${formItemCls}-label`]: makeVerticalLayoutLabelWithOffset(token)
2408
- },
2409
- [`@media (max-width: ${unit(token.screenXSMax)})`]: [makeVerticalLayout(token), {
2410
- [componentCls]: {
2411
- [`${formItemCls}:not(${formItemCls}-horizontal):not(${formItemCls}-vertical)`]: {
2412
- [`> ${formItemCls}-row > ${antCls}-col-xs-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
2413
- }
2414
- }
2415
- }],
2416
- [`@media (max-width: ${unit(token.screenSMMax)})`]: {
2417
- [componentCls]: {
2418
- [`${formItemCls}:not(${formItemCls}-horizontal):not(${formItemCls}-vertical)`]: {
2419
- [`> ${formItemCls}-row > ${antCls}-col-sm-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
2420
- }
2421
- }
2422
- },
2423
- [`@media (max-width: ${unit(token.screenMDMax)})`]: {
2424
- [componentCls]: {
2425
- [`${formItemCls}:not(${formItemCls}-horizontal):not(${formItemCls}-vertical)`]: {
2426
- [`> ${formItemCls}-row > ${antCls}-col-md-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
2427
- }
2428
- }
2429
- },
2430
- [`@media (max-width: ${unit(token.screenLGMax)})`]: {
2431
- [componentCls]: {
2432
- [`${formItemCls}:not(${formItemCls}-horizontal):not(${formItemCls}-vertical)`]: {
2433
- [`> ${formItemCls}-row > ${antCls}-col-lg-24${formItemCls}-label`]: makeVerticalLayoutLabel(token)
2434
- }
2435
- }
2436
- }
2437
- };
2438
- };
2439
- var prepareComponentToken2 = (token) => ({
2440
- labelRequiredMarkColor: token.colorError,
2441
- labelColor: token.colorTextHeading,
2442
- labelFontSize: token.fontSize,
2443
- labelHeight: token.controlHeight,
2444
- verticalLabelHeight: token.labelHeight ?? "auto",
2445
- labelColonMarginInlineStart: token.marginXXS / 2,
2446
- labelColonMarginInlineEnd: token.marginXS,
2447
- itemMarginBottom: token.marginLG,
2448
- verticalLabelPadding: `0 0 ${token.paddingXS}px`,
2449
- verticalLabelMargin: 0,
2450
- inlineItemMarginBottom: 0
2451
- });
2452
- var prepareToken = (token, rootPrefixCls) => {
2453
- const formToken = merge(token, {
2454
- formItemCls: `${token.componentCls}-item`,
2455
- rootPrefixCls
2456
- });
2457
- return formToken;
2458
- };
2459
- var style_default3 = genStyleHooks("Form", (token, {
2460
- rootPrefixCls
2461
- }) => {
2462
- const formToken = prepareToken(token, rootPrefixCls);
2463
- return [genFormStyle(formToken), genFormItemStyle(formToken), explain_default(formToken), genHorizontalStyle(formToken), genInlineStyle(formToken), genVerticalStyle(formToken), collapse_default(formToken), zoomIn];
2464
- }, prepareComponentToken2, {
2465
- // Let From style before the Grid
2466
- // ref https://github.com/ant-design/ant-design/issues/44386
2467
- order: -1e3
2468
- });
2469
-
2470
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/ErrorList.js
2471
- var EMPTY_LIST = [];
2472
- function toErrorEntity(error, prefix, errorStatus, index = 0) {
2473
- return {
2474
- key: typeof error === "string" ? error : `${prefix}-${index}`,
2475
- error,
2476
- errorStatus
2477
- };
2478
- }
2479
- var ErrorList = ({
2480
- help,
2481
- helpStatus,
2482
- errors = EMPTY_LIST,
2483
- warnings = EMPTY_LIST,
2484
- className: rootClassName,
2485
- fieldId,
2486
- onVisibleChanged
2487
- }) => {
2488
- const {
2489
- prefixCls
2490
- } = useContext(FormItemPrefixContext);
2491
- const {
2492
- classNames: contextClassNames,
2493
- styles: contextStyles
2494
- } = useContext(FormContext);
2495
- const baseClassName = `${prefixCls}-item-explain`;
2496
- const rootCls = useCSSVarCls_default(prefixCls);
2497
- const [hashId, cssVarCls] = style_default3(prefixCls, rootCls);
2498
- const collapseMotion = useMemo(() => motion_default(prefixCls), [prefixCls]);
2499
- const debounceErrors = useDebounce(errors);
2500
- const debounceWarnings = useDebounce(warnings);
2501
- const hasHelp = isNonNullable(help);
2502
- const fullKeyList = useMemo(() => {
2503
- if (hasHelp) {
2504
- return [toErrorEntity(help, "help", helpStatus)];
2505
- }
2506
- return [].concat(_toConsumableArray(debounceErrors.map((error, index) => toErrorEntity(error, "error", "error", index))), _toConsumableArray(debounceWarnings.map((warning, index) => toErrorEntity(warning, "warning", "warning", index))));
2507
- }, [help, helpStatus, hasHelp, debounceErrors, debounceWarnings]);
2508
- const filledKeyFullKeyList = useMemo(() => {
2509
- const keysCount = {};
2510
- fullKeyList.forEach(({
2511
- key
2512
- }) => {
2513
- keysCount[key] = (keysCount[key] || 0) + 1;
2514
- });
2515
- return fullKeyList.map((entity, index) => ({
2516
- ...entity,
2517
- key: keysCount[entity.key] > 1 ? `${entity.key}-fallback-${index}` : entity.key
2518
- }));
2519
- }, [fullKeyList]);
2520
- const helpProps = {};
2521
- if (fieldId) {
2522
- helpProps.id = `${fieldId}_help`;
2523
- }
2524
- return /* @__PURE__ */ createElement(es_default, {
2525
- motionDeadline: collapseMotion.motionDeadline,
2526
- motionName: `${prefixCls}-show-help`,
2527
- visible: !!filledKeyFullKeyList.length,
2528
- onVisibleChanged
2529
- }, (holderProps) => {
2530
- const {
2531
- className: holderClassName,
2532
- style: holderStyle
2533
- } = holderProps;
2534
- return /* @__PURE__ */ createElement("div", {
2535
- ...helpProps,
2536
- className: clsx(baseClassName, holderClassName, contextClassNames?.help, cssVarCls, rootCls, rootClassName, hashId),
2537
- style: {
2538
- ...contextStyles?.help,
2539
- ...holderStyle
2540
- }
2541
- }, /* @__PURE__ */ createElement(CSSMotionList_default, {
2542
- keys: filledKeyFullKeyList,
2543
- ...motion_default(prefixCls),
2544
- motionName: `${prefixCls}-show-help-item`,
2545
- component: false
2546
- }, (itemProps) => {
2547
- const {
2548
- key,
2549
- error,
2550
- errorStatus,
2551
- className: itemClassName,
2552
- style: itemStyle
2553
- } = itemProps;
2554
- return /* @__PURE__ */ createElement("div", {
2555
- key,
2556
- className: clsx(itemClassName, contextClassNames?.helpItem, {
2557
- [`${baseClassName}-${errorStatus}`]: errorStatus
2558
- }),
2559
- style: {
2560
- ...contextStyles?.helpItem,
2561
- ...itemStyle
2562
- }
2563
- }, error);
2564
- }));
2565
- });
2566
- };
2567
- var ErrorList_default = ErrorList;
2568
-
2569
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/hooks/useFormWarning.js
2570
- var names = {};
2571
- function useFormWarning({
2572
- name
2573
- }) {
2574
- const warning = useDevWarning("Form");
2575
- useEffect(() => {
2576
- if (name) {
2577
- names[name] = (names[name] || 0) + 1;
2578
- true ? warning(names[name] <= 1, "usage", "There exist multiple Form with same `name`.") : void 0;
2579
- return () => {
2580
- names[name] -= 1;
2581
- };
2582
- }
2583
- }, [name]);
2584
- }
2585
-
2586
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/Form.js
2587
- var InternalForm = (props, ref) => {
2588
- const contextDisabled = useContext(DisabledContext_default);
2589
- const {
2590
- getPrefixCls,
2591
- direction,
2592
- requiredMark: contextRequiredMark,
2593
- colon: contextColon,
2594
- scrollToFirstError: contextScrollToFirstError,
2595
- className: contextClassName,
2596
- style: contextStyle,
2597
- styles: contextStyles,
2598
- classNames: contextClassNames,
2599
- tooltip: contextTooltip,
2600
- labelAlign: contextLabelAlign,
2601
- labelWrap: contextLabelWrap
2602
- } = useComponentConfig("form");
2603
- const {
2604
- prefixCls: customizePrefixCls,
2605
- className,
2606
- rootClassName,
2607
- size,
2608
- disabled = contextDisabled,
2609
- form,
2610
- colon,
2611
- labelAlign,
2612
- labelWrap,
2613
- labelCol,
2614
- wrapperCol,
2615
- layout = "horizontal",
2616
- scrollToFirstError,
2617
- requiredMark,
2618
- onFinishFailed,
2619
- name,
2620
- style,
2621
- feedbackIcons,
2622
- variant,
2623
- classNames,
2624
- styles,
2625
- tooltip,
2626
- ...restFormProps
2627
- } = props;
2628
- const mergedSize = useSize_default(size);
2629
- const contextValidateMessages = useContext(validateMessagesContext_default);
2630
- if (true) {
2631
- useFormWarning(props);
2632
- }
2633
- const mergedRequiredMark = useMemo(() => {
2634
- if (requiredMark !== void 0) {
2635
- return requiredMark;
2636
- }
2637
- if (contextRequiredMark !== void 0) {
2638
- return contextRequiredMark;
2639
- }
2640
- return true;
2641
- }, [requiredMark, contextRequiredMark]);
2642
- const mergedColon = colon ?? contextColon;
2643
- const mergedLabelAlign = labelAlign ?? contextLabelAlign;
2644
- const mergedLabelWrap = labelWrap ?? contextLabelWrap;
2645
- const mergedTooltip = {
2646
- ...contextTooltip,
2647
- ...tooltip
2648
- };
2649
- const prefixCls = getPrefixCls("form", customizePrefixCls);
2650
- const rootCls = useCSSVarCls_default(prefixCls);
2651
- const [hashId, cssVarCls] = style_default3(prefixCls, rootCls);
2652
- const mergedProps = {
2653
- ...props,
2654
- size: mergedSize,
2655
- disabled,
2656
- layout,
2657
- colon: mergedColon,
2658
- requiredMark: mergedRequiredMark,
2659
- labelAlign: mergedLabelAlign,
2660
- labelWrap: mergedLabelWrap
2661
- };
2662
- const contextStyleRoot = useSemanticRootStyle(contextStyle);
2663
- const styleRoot = useSemanticRootStyle(style);
2664
- const [mergedClassNames, mergedStyles] = useMergeSemantic([contextClassNames, classNames], [contextStyles, contextStyleRoot, styles, styleRoot], {
2665
- props: mergedProps
2666
- });
2667
- const formClassName = clsx(prefixCls, `${prefixCls}-${layout}`, {
2668
- [`${prefixCls}-hide-required-mark`]: mergedRequiredMark === false,
2669
- // todo: remove in next major version
2670
- [`${prefixCls}-rtl`]: direction === "rtl",
2671
- [`${prefixCls}-large`]: mergedSize === "large",
2672
- [`${prefixCls}-small`]: mergedSize === "small"
2673
- }, cssVarCls, rootCls, hashId, contextClassName, className, rootClassName, mergedClassNames.root);
2674
- const [wrapForm] = useForm(form);
2675
- const {
2676
- __INTERNAL__
2677
- } = wrapForm;
2678
- __INTERNAL__.name = name;
2679
- const formContextValue = useMemo(() => ({
2680
- name,
2681
- labelAlign: mergedLabelAlign,
2682
- labelCol,
2683
- labelWrap: mergedLabelWrap,
2684
- wrapperCol,
2685
- layout,
2686
- colon: mergedColon,
2687
- requiredMark: mergedRequiredMark,
2688
- itemRef: __INTERNAL__.itemRef,
2689
- form: wrapForm,
2690
- feedbackIcons,
2691
- tooltip: mergedTooltip,
2692
- classNames: mergedClassNames,
2693
- styles: mergedStyles
2694
- }), [name, mergedLabelAlign, mergedLabelWrap, labelCol, wrapperCol, layout, mergedColon, mergedRequiredMark, wrapForm, feedbackIcons, mergedClassNames, mergedStyles, mergedTooltip]);
2695
- const nativeElementRef = useRef(null);
2696
- useImperativeHandle(ref, () => ({
2697
- ...wrapForm,
2698
- nativeElement: nativeElementRef.current?.nativeElement
2699
- }));
2700
- const scrollToField = (options, fieldName) => {
2701
- if (options) {
2702
- let defaultScrollToFirstError = {
2703
- block: "nearest"
2704
- };
2705
- if (isPlainObject(options)) {
2706
- defaultScrollToFirstError = {
2707
- ...defaultScrollToFirstError,
2708
- ...options
2709
- };
2710
- }
2711
- wrapForm.scrollToField(fieldName, defaultScrollToFirstError);
2712
- }
2713
- };
2714
- const onInternalFinishFailed = (errorInfo) => {
2715
- onFinishFailed?.(errorInfo);
2716
- if (errorInfo.errorFields.length) {
2717
- const fieldName = errorInfo.errorFields[0].name;
2718
- if (scrollToFirstError !== void 0) {
2719
- scrollToField(scrollToFirstError, fieldName);
2720
- return;
2721
- }
2722
- if (contextScrollToFirstError !== void 0) {
2723
- scrollToField(contextScrollToFirstError, fieldName);
2724
- }
2725
- }
2726
- };
2727
- return /* @__PURE__ */ createElement(VariantContext.Provider, {
2728
- value: variant
2729
- }, /* @__PURE__ */ createElement(DisabledContextProvider, {
2730
- disabled
2731
- }, /* @__PURE__ */ createElement(SizeContext_default.Provider, {
2732
- value: mergedSize
2733
- }, /* @__PURE__ */ createElement(FormProvider, {
2734
- // This is not list in API, we pass with spread
2735
- validateMessages: contextValidateMessages
2736
- }, /* @__PURE__ */ createElement(FormContext.Provider, {
2737
- value: formContextValue
2738
- }, /* @__PURE__ */ createElement(NoFormStyle, {
2739
- status: true
2740
- }, /* @__PURE__ */ createElement(es_default2, {
2741
- id: name,
2742
- ...restFormProps,
2743
- name,
2744
- onFinishFailed: onInternalFinishFailed,
2745
- form: wrapForm,
2746
- ref: nativeElementRef,
2747
- style: mergedStyles?.root,
2748
- className: formClassName
2749
- })))))));
2750
- };
2751
- var Form = /* @__PURE__ */ forwardRef(InternalForm);
2752
- if (true) {
2753
- Form.displayName = "Form";
2754
- }
2755
- var Form_default = Form;
2756
-
2757
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/hooks/useChildren.js
2758
- var useChildren = (children) => {
2759
- if (isFunction(children)) {
2760
- return children;
2761
- }
2762
- const childList = toArray(children);
2763
- return childList.length <= 1 ? childList[0] : childList;
2764
- };
2765
- var useChildren_default = useChildren;
2766
-
2767
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/hooks/useFormItemStatus.js
2768
- var useFormItemStatus = () => {
2769
- const {
2770
- status,
2771
- errors = [],
2772
- warnings = []
2773
- } = useContext(FormItemInputContext);
2774
- if (true) {
2775
- const warning = useDevWarning("Form.Item");
2776
- true ? warning(status !== void 0, "usage", "Form.Item.useStatus should be used under Form.Item component. For more information: https://u.ant.design/form-item-usestatus") : void 0;
2777
- }
2778
- return {
2779
- status,
2780
- errors,
2781
- warnings
2782
- };
2783
- };
2784
- useFormItemStatus.Context = FormItemInputContext;
2785
- var useFormItemStatus_default = useFormItemStatus;
2786
-
2787
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/hooks/useFrameState.js
2788
- function useFrameState(defaultValue) {
2789
- const [value, setValue] = useState(defaultValue);
2790
- const frameRef = useRef(null);
2791
- const batchRef = useRef([]);
2792
- const destroyRef = useRef(false);
2793
- useEffect(() => {
2794
- destroyRef.current = false;
2795
- return () => {
2796
- destroyRef.current = true;
2797
- raf_default.cancel(frameRef.current);
2798
- frameRef.current = null;
2799
- };
2800
- }, []);
2801
- function setFrameValue(updater) {
2802
- if (destroyRef.current) {
2803
- return;
2804
- }
2805
- if (frameRef.current === null) {
2806
- batchRef.current = [];
2807
- frameRef.current = raf_default(() => {
2808
- frameRef.current = null;
2809
- setValue((prevValue) => {
2810
- let current = prevValue;
2811
- batchRef.current.forEach((func) => {
2812
- current = func(current);
2813
- });
2814
- return current;
2815
- });
2816
- });
2817
- }
2818
- batchRef.current.push(updater);
2819
- }
2820
- return [value, setFrameValue];
2821
- }
2822
-
2823
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/hooks/useItemRef.js
2824
- var useItemRef = () => {
2825
- const {
2826
- itemRef
2827
- } = useContext(FormContext);
2828
- const cacheRef = useRef({});
2829
- const getRef = (name, children) => {
2830
- const childrenRef = children && isPlainObject(children) && getNodeRef(children);
2831
- const nameStr = name.join("_");
2832
- if (cacheRef.current.name !== nameStr || cacheRef.current.originRef !== childrenRef) {
2833
- cacheRef.current.name = nameStr;
2834
- cacheRef.current.originRef = childrenRef;
2835
- cacheRef.current.ref = composeRef(itemRef(name), childrenRef);
2836
- }
2837
- return cacheRef.current.ref;
2838
- };
2839
- return getRef;
2840
- };
2841
- var useItemRef_default = useItemRef;
2842
-
2843
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/style/fallbackCmp.js
2844
- var genFallbackStyle = (token) => {
2845
- const {
2846
- formItemCls
2847
- } = token;
2848
- return {
2849
- "@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)": {
2850
- // Fallback for IE, safe to remove we not support it anymore
2851
- [`${formItemCls}-control`]: {
2852
- display: "flex"
2853
- }
2854
- }
2855
- };
2856
- };
2857
- var fallbackCmp_default = genSubStyleComponent(["Form", "item-item"], (token, {
2858
- rootPrefixCls
2859
- }) => {
2860
- const formToken = prepareToken(token, rootPrefixCls);
2861
- return genFallbackStyle(formToken);
2862
- });
2863
-
2864
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/FormItemInput.js
2865
- var GRID_MAX = 24;
2866
- var FormItemInput = (props) => {
2867
- const {
2868
- prefixCls,
2869
- status,
2870
- labelCol,
2871
- wrapperCol,
2872
- children,
2873
- errors,
2874
- warnings,
2875
- _internalItemRender: formItemRender,
2876
- extra,
2877
- help,
2878
- fieldId,
2879
- marginBottom,
2880
- onErrorVisibleChanged,
2881
- label
2882
- } = props;
2883
- const baseClassName = `${prefixCls}-item`;
2884
- const formContext = useContext(FormContext);
2885
- const {
2886
- classNames: contextClassNames,
2887
- styles: contextStyles
2888
- } = formContext;
2889
- const mergedWrapperCol = useMemo(() => {
2890
- let mergedWrapper = {
2891
- ...wrapperCol || formContext.wrapperCol || {}
2892
- };
2893
- if (label === null && !labelCol && !wrapperCol && formContext.labelCol) {
2894
- const list = [void 0].concat(_toConsumableArray(responsiveArrayReversed));
2895
- list.forEach((size) => {
2896
- const _size = size ? [size] : [];
2897
- const formLabel = get(formContext.labelCol, _size);
2898
- const formLabelObj = isPlainObject(formLabel) ? formLabel : {};
2899
- const wrapper = get(mergedWrapper, _size);
2900
- const wrapperObj = isPlainObject(wrapper) ? wrapper : {};
2901
- if ("span" in formLabelObj && !("offset" in wrapperObj) && formLabelObj.span < GRID_MAX) {
2902
- mergedWrapper = set(mergedWrapper, [].concat(_size, ["offset"]), formLabelObj.span);
2903
- }
2904
- });
2905
- }
2906
- return mergedWrapper;
2907
- }, [wrapperCol, formContext.wrapperCol, formContext.labelCol, label, labelCol]);
2908
- const className = clsx(`${baseClassName}-control`, mergedWrapperCol.className);
2909
- const subFormContext = useMemo(() => {
2910
- const {
2911
- labelCol: _labelCol,
2912
- wrapperCol: _wrapperCol,
2913
- ...rest
2914
- } = formContext;
2915
- return rest;
2916
- }, [formContext]);
2917
- const extraRef = useRef(null);
2918
- const [extraHeight, setExtraHeight] = useState(0);
2919
- useLayoutEffect_default(() => {
2920
- if (extra && extraRef.current) {
2921
- setExtraHeight(extraRef.current.clientHeight);
2922
- } else {
2923
- setExtraHeight(0);
2924
- }
2925
- }, [extra]);
2926
- const inputDom = /* @__PURE__ */ createElement("div", {
2927
- className: `${baseClassName}-control-input`
2928
- }, /* @__PURE__ */ createElement("div", {
2929
- className: clsx(`${baseClassName}-control-input-content`, contextClassNames?.content),
2930
- style: contextStyles?.content
2931
- }, children));
2932
- const formItemContext = useMemo(() => ({
2933
- prefixCls,
2934
- status
2935
- }), [prefixCls, status]);
2936
- const errorListDom = marginBottom !== null || errors.length || warnings.length ? /* @__PURE__ */ createElement(FormItemPrefixContext.Provider, {
2937
- value: formItemContext
2938
- }, /* @__PURE__ */ createElement(ErrorList_default, {
2939
- fieldId,
2940
- errors,
2941
- warnings,
2942
- help,
2943
- helpStatus: status,
2944
- className: `${baseClassName}-explain-connected`,
2945
- onVisibleChanged: onErrorVisibleChanged
2946
- })) : null;
2947
- const extraProps = {};
2948
- if (fieldId) {
2949
- extraProps.id = `${fieldId}_extra`;
2950
- }
2951
- const extraDom = extra ? /* @__PURE__ */ createElement("div", {
2952
- ...extraProps,
2953
- className: clsx(`${baseClassName}-extra`, contextClassNames?.extra),
2954
- style: contextStyles?.extra,
2955
- ref: extraRef
2956
- }, extra) : null;
2957
- const additionalDom = errorListDom || extraDom ? /* @__PURE__ */ createElement("div", {
2958
- className: `${baseClassName}-additional`,
2959
- style: marginBottom ? {
2960
- minHeight: marginBottom + extraHeight
2961
- } : {}
2962
- }, errorListDom, extraDom) : null;
2963
- const dom = formItemRender && formItemRender.mark === "pro_table_render" && formItemRender.render ? formItemRender.render(props, {
2964
- input: inputDom,
2965
- errorList: errorListDom,
2966
- extra: extraDom
2967
- }) : /* @__PURE__ */ createElement(Fragment, null, inputDom, additionalDom);
2968
- return /* @__PURE__ */ createElement(FormContext.Provider, {
2969
- value: subFormContext
2970
- }, /* @__PURE__ */ createElement(col_default, {
2971
- ...mergedWrapperCol,
2972
- className
2973
- }, dom), /* @__PURE__ */ createElement(fallbackCmp_default, {
2974
- prefixCls
2975
- }));
2976
- };
2977
- var FormItemInput_default = FormItemInput;
2978
-
2979
- // ../../node_modules/.pnpm/@ant-design+icons@6.3.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js
2980
- var import_QuestionCircleOutlined = __toESM(require_QuestionCircleOutlined());
2981
- function _extends3() {
2982
- _extends3 = Object.assign ? Object.assign.bind() : function(target) {
2983
- for (var i = 1; i < arguments.length; i++) {
2984
- var source = arguments[i];
2985
- for (var key in source) {
2986
- if (Object.prototype.hasOwnProperty.call(source, key)) {
2987
- target[key] = source[key];
2988
- }
2989
- }
2990
- }
2991
- return target;
2992
- };
2993
- return _extends3.apply(this, arguments);
2994
- }
2995
- var QuestionCircleOutlined = (props, ref) => /* @__PURE__ */ createElement(AntdIconLight_default, _extends3({}, props, {
2996
- ref,
2997
- icon: import_QuestionCircleOutlined.default
2998
- }));
2999
- var RefIcon2 = /* @__PURE__ */ forwardRef(QuestionCircleOutlined);
3000
- if (true) {
3001
- RefIcon2.displayName = "QuestionCircleOutlined";
3002
- }
3003
- var QuestionCircleOutlined_default = RefIcon2;
3004
-
3005
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/FormItemLabel.js
3006
- var FormItemLabel = ({
3007
- prefixCls,
3008
- label,
3009
- htmlFor,
3010
- labelCol,
3011
- labelAlign,
3012
- colon,
3013
- required,
3014
- requiredMark,
3015
- tooltip,
3016
- vertical
3017
- }) => {
3018
- const [formLocale] = useLocale_default("Form");
3019
- const {
3020
- labelAlign: contextLabelAlign,
3021
- labelCol: contextLabelCol,
3022
- labelWrap,
3023
- colon: contextColon,
3024
- classNames: contextClassNames,
3025
- styles: contextStyles,
3026
- tooltip: contextTooltip
3027
- } = useContext(FormContext);
3028
- if (!label) {
3029
- return null;
3030
- }
3031
- const mergedLabelCol = labelCol || contextLabelCol || {};
3032
- const mergedLabelAlign = labelAlign || contextLabelAlign;
3033
- const labelClsBasic = `${prefixCls}-item-label`;
3034
- const labelColClassName = clsx(labelClsBasic, mergedLabelAlign === "left" && `${labelClsBasic}-left`, mergedLabelCol.className, {
3035
- [`${labelClsBasic}-wrap`]: !!labelWrap
3036
- });
3037
- let labelChildren = label;
3038
- const computedColon = colon === true || contextColon !== false && colon !== false;
3039
- const haveColon = computedColon && !vertical;
3040
- if (haveColon && typeof label === "string" && label.trim()) {
3041
- labelChildren = label.replace(/[:|:]\s*$/, "");
3042
- }
3043
- const tooltipProps = convertToTooltipProps_default(tooltip, contextTooltip);
3044
- if (tooltipProps) {
3045
- const tooltipNode = /* @__PURE__ */ createElement(tooltip_default, {
3046
- ...tooltipProps
3047
- }, /* @__PURE__ */ createElement("span", {
3048
- className: `${prefixCls}-item-tooltip`,
3049
- onClick: (e3) => {
3050
- e3.preventDefault();
3051
- },
3052
- tabIndex: -1
3053
- }, tooltipProps.icon || tooltipProps.children || /* @__PURE__ */ createElement(QuestionCircleOutlined_default, null)));
3054
- labelChildren = /* @__PURE__ */ createElement(Fragment, null, labelChildren, tooltipNode);
3055
- }
3056
- const isOptionalMark = requiredMark === "optional";
3057
- const isRenderMark = isFunction(requiredMark);
3058
- const hideRequiredMark = requiredMark === false;
3059
- if (isRenderMark) {
3060
- labelChildren = requiredMark(labelChildren, {
3061
- required: !!required
3062
- });
3063
- } else if (isOptionalMark && !required) {
3064
- labelChildren = /* @__PURE__ */ createElement(Fragment, null, labelChildren, /* @__PURE__ */ createElement("span", {
3065
- className: `${prefixCls}-item-optional`
3066
- }, formLocale?.optional || en_US_default.Form?.optional));
3067
- }
3068
- let markType;
3069
- if (hideRequiredMark) {
3070
- markType = "hidden";
3071
- } else if (isOptionalMark || isRenderMark) {
3072
- markType = "optional";
3073
- }
3074
- const labelClassName = clsx(contextClassNames?.label, {
3075
- [`${prefixCls}-item-required`]: required,
3076
- [`${prefixCls}-item-required-mark-${markType}`]: markType,
3077
- [`${prefixCls}-item-no-colon`]: !computedColon
3078
- });
3079
- return /* @__PURE__ */ createElement(col_default, {
3080
- ...mergedLabelCol,
3081
- className: labelColClassName
3082
- }, /* @__PURE__ */ createElement("label", {
3083
- htmlFor,
3084
- className: labelClassName,
3085
- style: contextStyles?.label,
3086
- title: typeof label === "string" ? label : void 0
3087
- }, labelChildren));
3088
- };
3089
- var FormItemLabel_default = FormItemLabel;
3090
-
3091
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/FormItem/StatusProvider.js
3092
- var iconMap = {
3093
- success: CheckCircleFilled_default,
3094
- warning: ExclamationCircleFilled_default,
3095
- error: CloseCircleFilled_default,
3096
- validating: LoadingOutlined_default
3097
- };
3098
- function StatusProvider({
3099
- children,
3100
- errors,
3101
- warnings,
3102
- hasFeedback,
3103
- validateStatus,
3104
- prefixCls,
3105
- meta,
3106
- noStyle,
3107
- name
3108
- }) {
3109
- const itemPrefixCls = `${prefixCls}-item`;
3110
- const {
3111
- feedbackIcons
3112
- } = useContext(FormContext);
3113
- const mergedValidateStatus = getStatus(errors, warnings, meta, null, !!hasFeedback, validateStatus);
3114
- const {
3115
- isFormItemInput: parentIsFormItemInput,
3116
- status: parentStatus,
3117
- hasFeedback: parentHasFeedback,
3118
- feedbackIcon: parentFeedbackIcon,
3119
- name: parentName
3120
- } = useContext(FormItemInputContext);
3121
- const formItemStatusContext = useMemo(() => {
3122
- let feedbackIcon;
3123
- if (hasFeedback) {
3124
- const customIcons = hasFeedback !== true && hasFeedback.icons || feedbackIcons;
3125
- const customIconNode = mergedValidateStatus && customIcons?.({
3126
- status: mergedValidateStatus,
3127
- errors,
3128
- warnings
3129
- })?.[mergedValidateStatus];
3130
- const IconNode = mergedValidateStatus ? iconMap[mergedValidateStatus] : null;
3131
- feedbackIcon = customIconNode !== false && IconNode ? /* @__PURE__ */ createElement("span", {
3132
- className: clsx(`${itemPrefixCls}-feedback-icon`, `${itemPrefixCls}-feedback-icon-${mergedValidateStatus}`)
3133
- }, customIconNode || /* @__PURE__ */ createElement(IconNode, null)) : null;
3134
- }
3135
- const context = {
3136
- status: mergedValidateStatus || "",
3137
- errors,
3138
- warnings,
3139
- hasFeedback: !!hasFeedback,
3140
- feedbackIcon,
3141
- isFormItemInput: true,
3142
- name
3143
- };
3144
- if (noStyle) {
3145
- context.status = (mergedValidateStatus ?? parentStatus) || "";
3146
- context.isFormItemInput = parentIsFormItemInput;
3147
- context.hasFeedback = !!(hasFeedback ?? parentHasFeedback);
3148
- context.feedbackIcon = hasFeedback !== void 0 ? context.feedbackIcon : parentFeedbackIcon;
3149
- context.name = name ?? parentName;
3150
- }
3151
- return context;
3152
- }, [mergedValidateStatus, errors, warnings, hasFeedback, feedbackIcons, noStyle, name, parentIsFormItemInput, parentStatus, itemPrefixCls, parentHasFeedback, parentFeedbackIcon, parentName]);
3153
- return /* @__PURE__ */ createElement(FormItemInputContext.Provider, {
3154
- value: formItemStatusContext
3155
- }, children);
3156
- }
3157
- var StatusProvider_default = StatusProvider;
3158
-
3159
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/FormItem/ItemHolder.js
3160
- function ItemHolder(props) {
3161
- const {
3162
- prefixCls,
3163
- className,
3164
- rootClassName,
3165
- style,
3166
- help,
3167
- errors,
3168
- warnings,
3169
- validateStatus,
3170
- meta,
3171
- hasFeedback,
3172
- hidden,
3173
- children,
3174
- fieldId,
3175
- required,
3176
- isRequired,
3177
- onSubItemMetaChange,
3178
- layout: propsLayout,
3179
- name,
3180
- ...restProps
3181
- } = props;
3182
- const itemPrefixCls = `${prefixCls}-item`;
3183
- const {
3184
- requiredMark,
3185
- layout: formLayout
3186
- } = useContext(FormContext);
3187
- const layout = propsLayout || formLayout;
3188
- const vertical = layout === "vertical";
3189
- const itemRef = useRef(null);
3190
- const debounceErrors = useDebounce(errors);
3191
- const debounceWarnings = useDebounce(warnings);
3192
- const hasHelp = isNonNullable(help);
3193
- const hasError = !!(hasHelp || debounceErrors.length || debounceWarnings.length);
3194
- const isOnScreen = !!itemRef.current && isVisible_default(itemRef.current);
3195
- const [marginBottom, setMarginBottom] = useState(null);
3196
- useLayoutEffect_default(() => {
3197
- if (hasError && itemRef.current) {
3198
- const itemStyle = getComputedStyle(itemRef.current);
3199
- setMarginBottom(Number.parseInt(itemStyle.marginBottom, 10));
3200
- }
3201
- }, [hasError, isOnScreen]);
3202
- const onErrorVisibleChanged = (nextVisible) => {
3203
- if (!nextVisible && !hasError) {
3204
- setMarginBottom(null);
3205
- }
3206
- };
3207
- const getValidateState = (isDebounce = false) => {
3208
- const _errors = isDebounce ? debounceErrors : meta.errors;
3209
- const _warnings = isDebounce ? debounceWarnings : meta.warnings;
3210
- return getStatus(_errors, _warnings, meta, "", !!hasFeedback, validateStatus);
3211
- };
3212
- const mergedValidateStatus = getValidateState();
3213
- const itemClassName = clsx(itemPrefixCls, className, rootClassName, {
3214
- [`${itemPrefixCls}-with-help`]: hasHelp || debounceErrors.length || debounceWarnings.length,
3215
- // Status
3216
- [`${itemPrefixCls}-has-feedback`]: mergedValidateStatus && hasFeedback,
3217
- [`${itemPrefixCls}-has-success`]: mergedValidateStatus === "success",
3218
- [`${itemPrefixCls}-has-warning`]: mergedValidateStatus === "warning",
3219
- [`${itemPrefixCls}-has-error`]: mergedValidateStatus === "error",
3220
- [`${itemPrefixCls}-is-validating`]: mergedValidateStatus === "validating",
3221
- [`${itemPrefixCls}-hidden`]: hidden,
3222
- // Layout
3223
- [`${itemPrefixCls}-${layout}`]: layout
3224
- });
3225
- return /* @__PURE__ */ createElement("div", {
3226
- className: itemClassName,
3227
- style,
3228
- ref: itemRef
3229
- }, /* @__PURE__ */ createElement(row_default, {
3230
- className: `${itemPrefixCls}-row`,
3231
- ...omit(restProps, [
3232
- "_internalItemRender",
3233
- "colon",
3234
- "dependencies",
3235
- "extra",
3236
- "fieldKey",
3237
- "getValueFromEvent",
3238
- "getValueProps",
3239
- "htmlFor",
3240
- "id",
3241
- // It is deprecated because `htmlFor` is its replacement.
3242
- "initialValue",
3243
- "isListField",
3244
- "label",
3245
- "labelAlign",
3246
- "labelCol",
3247
- "labelWrap",
3248
- "messageVariables",
3249
- "name",
3250
- "normalize",
3251
- "noStyle",
3252
- "preserve",
3253
- "requiredMark",
3254
- "rules",
3255
- "shouldUpdate",
3256
- "trigger",
3257
- "tooltip",
3258
- "validateFirst",
3259
- "validateTrigger",
3260
- "valuePropName",
3261
- "wrapperCol",
3262
- "validateDebounce"
3263
- ])
3264
- }, /* @__PURE__ */ createElement(FormItemLabel_default, {
3265
- htmlFor: fieldId,
3266
- ...props,
3267
- requiredMark,
3268
- required: required ?? isRequired,
3269
- prefixCls,
3270
- vertical
3271
- }), /* @__PURE__ */ createElement(FormItemInput_default, {
3272
- ...props,
3273
- ...meta,
3274
- errors: debounceErrors,
3275
- warnings: debounceWarnings,
3276
- prefixCls,
3277
- status: mergedValidateStatus,
3278
- help,
3279
- marginBottom,
3280
- onErrorVisibleChanged
3281
- }, /* @__PURE__ */ createElement(NoStyleItemContext.Provider, {
3282
- value: onSubItemMetaChange
3283
- }, /* @__PURE__ */ createElement(StatusProvider_default, {
3284
- prefixCls,
3285
- meta,
3286
- errors: meta.errors,
3287
- warnings: meta.warnings,
3288
- hasFeedback,
3289
- // Already calculated
3290
- validateStatus: mergedValidateStatus,
3291
- name
3292
- }, children)))), !!marginBottom && /* @__PURE__ */ createElement("div", {
3293
- className: `${itemPrefixCls}-margin-offset`,
3294
- style: {
3295
- marginBottom: -marginBottom
3296
- }
3297
- }));
3298
- }
3299
-
3300
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/FormItem/index.js
3301
- var NAME_SPLIT = "__SPLIT__";
3302
- function isSimilarControl(a, b) {
3303
- const keysA = Object.keys(a);
3304
- const keysB = Object.keys(b);
3305
- return keysA.length === keysB.length && keysA.every((key) => {
3306
- const propValueA = a[key];
3307
- const propValueB = b[key];
3308
- return propValueA === propValueB || isFunction(propValueA) || isFunction(propValueB);
3309
- });
3310
- }
3311
- var MemoInput = /* @__PURE__ */ memo((props) => props.children, (prev, next) => isSimilarControl(prev.control, next.control) && prev.update === next.update && prev.childProps.length === next.childProps.length && prev.childProps.every((value, index) => value === next.childProps[index]));
3312
- function genEmptyMeta() {
3313
- return {
3314
- errors: [],
3315
- warnings: [],
3316
- touched: false,
3317
- validating: false,
3318
- name: [],
3319
- validated: false
3320
- };
3321
- }
3322
- function InternalFormItem(props) {
3323
- const {
3324
- name,
3325
- noStyle,
3326
- className,
3327
- dependencies,
3328
- prefixCls: customizePrefixCls,
3329
- shouldUpdate,
3330
- rules,
3331
- children,
3332
- required,
3333
- label,
3334
- messageVariables,
3335
- trigger = "onChange",
3336
- validateTrigger,
3337
- hidden,
3338
- help,
3339
- layout
3340
- } = props;
3341
- const {
3342
- getPrefixCls
3343
- } = useContext(ConfigContext);
3344
- const {
3345
- name: formName
3346
- } = useContext(FormContext);
3347
- const mergedChildren = useChildren_default(children);
3348
- const isRenderProps = isFunction(mergedChildren);
3349
- const notifyParentMetaChange = useContext(NoStyleItemContext);
3350
- const {
3351
- validateTrigger: contextValidateTrigger
3352
- } = useContext(FieldContext_default);
3353
- const mergedValidateTrigger = isNonNullable(validateTrigger) ? validateTrigger : contextValidateTrigger;
3354
- const hasName = isNonNullable(name);
3355
- const prefixCls = getPrefixCls("form", customizePrefixCls);
3356
- const rootCls = useCSSVarCls_default(prefixCls);
3357
- const [hashId, cssVarCls] = style_default3(prefixCls, rootCls);
3358
- const warning = useDevWarning("Form.Item");
3359
- if (true) {
3360
- true ? warning(name !== null, "usage", "`null` is passed as `name` property") : void 0;
3361
- }
3362
- const listContext = useContext(ListContext_default);
3363
- const fieldKeyPathRef = useRef(null);
3364
- const [subFieldErrors, setSubFieldErrors] = useFrameState({});
3365
- const [meta, setMeta] = useState_default(() => genEmptyMeta());
3366
- const onMetaChange = (nextMeta) => {
3367
- const keyInfo = listContext?.getKey(nextMeta.name);
3368
- setMeta(nextMeta.destroy ? genEmptyMeta() : nextMeta, true);
3369
- if (noStyle && help !== false && notifyParentMetaChange) {
3370
- let namePath = nextMeta.name;
3371
- if (!nextMeta.destroy) {
3372
- if (keyInfo !== void 0) {
3373
- const [fieldKey, restPath] = keyInfo;
3374
- namePath = [fieldKey].concat(_toConsumableArray(restPath));
3375
- fieldKeyPathRef.current = namePath;
3376
- }
3377
- } else {
3378
- namePath = fieldKeyPathRef.current || namePath;
3379
- }
3380
- notifyParentMetaChange(nextMeta, namePath);
3381
- }
3382
- };
3383
- const onSubItemMetaChange = (subMeta, uniqueKeys) => {
3384
- setSubFieldErrors((prevSubFieldErrors) => {
3385
- const clone = {
3386
- ...prevSubFieldErrors
3387
- };
3388
- const mergedNamePath = [].concat(_toConsumableArray(subMeta.name.slice(0, -1)), _toConsumableArray(uniqueKeys));
3389
- const mergedNameKey = mergedNamePath.join(NAME_SPLIT);
3390
- if (subMeta.destroy) {
3391
- delete clone[mergedNameKey];
3392
- } else {
3393
- clone[mergedNameKey] = subMeta;
3394
- }
3395
- return clone;
3396
- });
3397
- };
3398
- const [mergedErrors, mergedWarnings] = useMemo(() => {
3399
- const errorList = _toConsumableArray(meta.errors);
3400
- const warningList = _toConsumableArray(meta.warnings);
3401
- Object.values(subFieldErrors).forEach((subFieldError) => {
3402
- errorList.push.apply(errorList, _toConsumableArray(subFieldError.errors || []));
3403
- warningList.push.apply(warningList, _toConsumableArray(subFieldError.warnings || []));
3404
- });
3405
- return [errorList, warningList];
3406
- }, [subFieldErrors, meta.errors, meta.warnings]);
3407
- const getItemRef = useItemRef_default();
3408
- function renderLayout(baseChildren, fieldId, isRequired) {
3409
- if (noStyle && !hidden) {
3410
- return /* @__PURE__ */ createElement(StatusProvider_default, {
3411
- prefixCls,
3412
- hasFeedback: props.hasFeedback,
3413
- validateStatus: props.validateStatus,
3414
- meta,
3415
- errors: mergedErrors,
3416
- warnings: mergedWarnings,
3417
- noStyle: true,
3418
- name
3419
- }, baseChildren);
3420
- }
3421
- return /* @__PURE__ */ createElement(ItemHolder, {
3422
- key: "row",
3423
- ...props,
3424
- className: clsx(className, cssVarCls, rootCls, hashId),
3425
- prefixCls,
3426
- fieldId,
3427
- isRequired,
3428
- errors: mergedErrors,
3429
- warnings: mergedWarnings,
3430
- meta,
3431
- onSubItemMetaChange,
3432
- layout,
3433
- name
3434
- }, baseChildren);
3435
- }
3436
- if (!hasName && !isRenderProps && !dependencies) {
3437
- return renderLayout(mergedChildren);
3438
- }
3439
- let variables = {};
3440
- if (typeof label === "string") {
3441
- variables.label = label;
3442
- } else if (name) {
3443
- variables.label = String(name);
3444
- }
3445
- if (messageVariables) {
3446
- variables = {
3447
- ...variables,
3448
- ...messageVariables
3449
- };
3450
- }
3451
- return /* @__PURE__ */ createElement(Field_default, {
3452
- ...props,
3453
- messageVariables: variables,
3454
- trigger,
3455
- validateTrigger: mergedValidateTrigger,
3456
- onMetaChange
3457
- }, (control, renderMeta, context) => {
3458
- const mergedName = toArray2(name).length && renderMeta ? renderMeta.name : [];
3459
- const fieldId = getFieldId(mergedName, formName);
3460
- const isRequired = required !== void 0 ? required : rules?.some((rule) => {
3461
- if (isPlainObject(rule) && rule.required && !rule.warningOnly) {
3462
- return true;
3463
- }
3464
- if (isFunction(rule)) {
3465
- const ruleEntity = rule(context);
3466
- return ruleEntity?.required && !ruleEntity?.warningOnly;
3467
- }
3468
- return false;
3469
- });
3470
- const mergedControl = {
3471
- ...control
3472
- };
3473
- let childNode = null;
3474
- true ? warning(!(shouldUpdate && dependencies), "usage", "`shouldUpdate` and `dependencies` shouldn't be used together. See https://u.ant.design/form-deps.") : void 0;
3475
- if (Array.isArray(mergedChildren) && hasName) {
3476
- true ? warning(false, "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.") : void 0;
3477
- childNode = mergedChildren;
3478
- } else if (isRenderProps && (!(shouldUpdate || dependencies) || hasName)) {
3479
- true ? warning(!!(shouldUpdate || dependencies), "usage", "A `Form.Item` with a render function must have either `shouldUpdate` or `dependencies`.") : void 0;
3480
- true ? warning(!hasName, "usage", "A `Form.Item` with a render function cannot be a field, and thus cannot have a `name` prop.") : void 0;
3481
- } else if (dependencies && !isRenderProps && !hasName) {
3482
- true ? warning(false, "usage", "Must set `name` or use a render function when `dependencies` is set.") : void 0;
3483
- } else if (/* @__PURE__ */ isValidElement(mergedChildren)) {
3484
- true ? warning(mergedChildren.props.defaultValue === void 0, "usage", "`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.") : void 0;
3485
- const childProps = {
3486
- ...mergedChildren.props,
3487
- ...mergedControl
3488
- };
3489
- if (!childProps.id) {
3490
- childProps.id = fieldId;
3491
- }
3492
- if (help || mergedErrors.length > 0 || mergedWarnings.length > 0 || props.extra) {
3493
- const describedbyArr = [];
3494
- if (help || mergedErrors.length > 0) {
3495
- describedbyArr.push(`${fieldId}_help`);
3496
- }
3497
- if (props.extra) {
3498
- describedbyArr.push(`${fieldId}_extra`);
3499
- }
3500
- childProps["aria-describedby"] = describedbyArr.join(" ");
3501
- }
3502
- if (mergedErrors.length > 0) {
3503
- childProps["aria-invalid"] = "true";
3504
- }
3505
- if (isRequired) {
3506
- childProps["aria-required"] = "true";
3507
- }
3508
- if (supportRef(mergedChildren)) {
3509
- childProps.ref = getItemRef(mergedName, mergedChildren);
3510
- }
3511
- const triggers = new Set([].concat(_toConsumableArray(toArray2(trigger)), _toConsumableArray(toArray2(mergedValidateTrigger))));
3512
- triggers.forEach((eventName) => {
3513
- childProps[eventName] = (...args) => {
3514
- mergedControl[eventName]?.(...args);
3515
- mergedChildren.props[eventName]?.(...args);
3516
- };
3517
- });
3518
- const watchingChildProps = [childProps["aria-required"], childProps["aria-invalid"], childProps["aria-describedby"]];
3519
- childNode = /* @__PURE__ */ createElement(MemoInput, {
3520
- control: mergedControl,
3521
- update: mergedChildren,
3522
- childProps: watchingChildProps
3523
- }, cloneElement(mergedChildren, childProps));
3524
- } else if (isRenderProps && (shouldUpdate || dependencies) && !hasName) {
3525
- childNode = mergedChildren(context);
3526
- } else {
3527
- true ? warning(!mergedName.length || !!noStyle, "usage", "`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead.") : void 0;
3528
- childNode = mergedChildren;
3529
- }
3530
- return renderLayout(childNode, fieldId, isRequired);
3531
- });
3532
- }
3533
- var FormItem = InternalFormItem;
3534
- FormItem.useStatus = useFormItemStatus_default;
3535
- var FormItem_default = FormItem;
3536
-
3537
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/FormList.js
3538
- var FormList = ({
3539
- prefixCls: customizePrefixCls,
3540
- children,
3541
- ...props
3542
- }) => {
3543
- if (true) {
3544
- const warning = useDevWarning("Form.List");
3545
- true ? warning(isNumber(props.name) || (Array.isArray(props.name) ? !!props.name.length : !!props.name), "usage", "Miss `name` prop.") : void 0;
3546
- }
3547
- const {
3548
- getPrefixCls
3549
- } = useContext(ConfigContext);
3550
- const prefixCls = getPrefixCls("form", customizePrefixCls);
3551
- const contextValue = useMemo(() => ({
3552
- prefixCls,
3553
- status: "error"
3554
- }), [prefixCls]);
3555
- return /* @__PURE__ */ createElement(List_default, {
3556
- ...props
3557
- }, (fields, operation, meta) => /* @__PURE__ */ createElement(FormItemPrefixContext.Provider, {
3558
- value: contextValue
3559
- }, children(fields.map((field) => ({
3560
- ...field,
3561
- fieldKey: field.key
3562
- })), operation, {
3563
- errors: meta.errors,
3564
- warnings: meta.warnings
3565
- })));
3566
- };
3567
- var FormList_default = FormList;
3568
-
3569
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/hooks/useFormInstance.js
3570
- function useFormInstance() {
3571
- const {
3572
- form
3573
- } = useContext(FormContext);
3574
- return form;
3575
- }
3576
-
3577
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/form/index.js
3578
- var Form2 = Form_default;
3579
- Form2.Item = FormItem_default;
3580
- Form2.List = FormList_default;
3581
- Form2.ErrorList = ErrorList_default;
3582
- Form2.useForm = useForm;
3583
- Form2.useFormInstance = useFormInstance;
3584
- Form2.useWatch = useWatch_default;
3585
- Form2.Provider = FormProvider;
3586
- var form_default = Form2;
3587
-
3588
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/input/Group.js
3589
- var Group = (props) => {
3590
- const {
3591
- getPrefixCls,
3592
- direction
3593
- } = useContext(ConfigContext);
3594
- const {
3595
- prefixCls: customizePrefixCls,
3596
- className
3597
- } = props;
3598
- const prefixCls = getPrefixCls("input-group", customizePrefixCls);
3599
- const inputPrefixCls = getPrefixCls("input");
3600
- const [hashId, cssVarCls] = style_default(inputPrefixCls);
3601
- const cls = clsx(prefixCls, cssVarCls, {
3602
- [`${prefixCls}-lg`]: props.size === "large",
3603
- [`${prefixCls}-sm`]: props.size === "small",
3604
- [`${prefixCls}-compact`]: props.compact,
3605
- [`${prefixCls}-rtl`]: direction === "rtl"
3606
- }, hashId, className);
3607
- const formItemContext = useContext(FormItemInputContext);
3608
- const groupFormItemContext = useMemo(() => ({
3609
- ...formItemContext,
3610
- isFormItemInput: false
3611
- }), [formItemContext]);
3612
- if (true) {
3613
- const warning = devUseWarning("Input.Group");
3614
- warning.deprecated(false, "Input.Group", "Space.Compact");
3615
- }
3616
- return /* @__PURE__ */ createElement(FormItemInputContext.Provider, {
3617
- value: groupFormItemContext
3618
- }, /* @__PURE__ */ createElement(space_default.Compact, {
3619
- className: cls,
3620
- style: props.style,
3621
- onMouseEnter: props.onMouseEnter,
3622
- onMouseLeave: props.onMouseLeave,
3623
- onFocus: props.onFocus,
3624
- onBlur: props.onBlur
3625
- }, props.children));
3626
- };
3627
- var Group_default = Group;
3628
-
3629
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/input/style/otp.js
3630
- var genOTPStyle = (token) => {
3631
- const {
3632
- componentCls,
3633
- paddingXS
3634
- } = token;
3635
- return {
3636
- [componentCls]: {
3637
- display: "inline-flex",
3638
- alignItems: "center",
3639
- flexWrap: "nowrap",
3640
- columnGap: paddingXS,
3641
- [`${componentCls}-input-wrapper`]: {
3642
- position: "relative",
3643
- [`${componentCls}-mask-icon`]: {
3644
- position: "absolute",
3645
- zIndex: "1",
3646
- top: "50%",
3647
- right: "50%",
3648
- transform: "translate(50%, -50%)",
3649
- pointerEvents: "none"
3650
- },
3651
- [`${componentCls}-mask-input`]: {
3652
- color: "transparent",
3653
- caretColor: token.colorText,
3654
- "&::selection": {
3655
- color: "transparent"
3656
- }
3657
- },
3658
- [`${componentCls}-mask-input[type=number]::-webkit-inner-spin-button`]: {
3659
- "-webkit-appearance": "none",
3660
- margin: 0
3661
- },
3662
- [`${componentCls}-mask-input[type=number]`]: {
3663
- "-moz-appearance": "textfield"
3664
- }
3665
- },
3666
- "&-rtl": {
3667
- direction: "rtl"
3668
- },
3669
- [`${componentCls}-input`]: {
3670
- textAlign: "center",
3671
- paddingInline: token.paddingXXS
3672
- },
3673
- // ================= Size =================
3674
- [`&${componentCls}-sm ${componentCls}-input`]: {
3675
- paddingInline: token.calc(token.paddingXXS).div(2).equal()
3676
- },
3677
- [`&${componentCls}-lg ${componentCls}-input`]: {
3678
- paddingInline: token.paddingXS
3679
- }
3680
- }
3681
- };
3682
- };
3683
- var otp_default = genStyleHooks(["Input", "OTP"], (token) => {
3684
- const inputToken = merge(token, initInputToken(token));
3685
- return genOTPStyle(inputToken);
3686
- }, initComponentToken);
3687
-
3688
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/input/OTP/OTPInput.js
3689
- var DEFAULT_MASK_VALUE = "\u2022";
3690
- var OTPInput = /* @__PURE__ */ forwardRef((props, ref) => {
3691
- const {
3692
- className,
3693
- value,
3694
- onChange,
3695
- onActiveChange,
3696
- index,
3697
- mask,
3698
- onFocus,
3699
- type,
3700
- ...restProps
3701
- } = props;
3702
- const {
3703
- getPrefixCls
3704
- } = useContext(ConfigContext);
3705
- const prefixCls = getPrefixCls("otp");
3706
- const maskValue = typeof mask === "string" ? mask : DEFAULT_MASK_VALUE;
3707
- const inputRef = useRef(null);
3708
- useImperativeHandle(ref, () => inputRef.current);
3709
- const onInternalChange = (e3) => {
3710
- onChange(index, e3.target.value);
3711
- };
3712
- const syncSelection = () => {
3713
- raf_default(() => {
3714
- const inputEle = inputRef.current?.input;
3715
- if (document.activeElement === inputEle && inputEle) {
3716
- inputEle.select();
3717
- }
3718
- });
3719
- };
3720
- const onInternalFocus = (e3) => {
3721
- onFocus?.(e3);
3722
- syncSelection();
3723
- };
3724
- const onInternalKeyDown = (event) => {
3725
- const {
3726
- key,
3727
- ctrlKey,
3728
- metaKey
3729
- } = event;
3730
- if (key === "ArrowLeft") {
3731
- onActiveChange(index - 1);
3732
- } else if (key === "ArrowRight") {
3733
- onActiveChange(index + 1);
3734
- } else if (key === "z" && (ctrlKey || metaKey)) {
3735
- event.preventDefault();
3736
- } else if (key === "Backspace" && !value) {
3737
- onActiveChange(index - 1);
3738
- }
3739
- syncSelection();
3740
- };
3741
- return /* @__PURE__ */ createElement("span", {
3742
- className: `${prefixCls}-input-wrapper`,
3743
- role: "presentation"
3744
- }, mask && value !== "" && value !== void 0 && /* @__PURE__ */ createElement("span", {
3745
- className: `${prefixCls}-mask-icon`,
3746
- "aria-hidden": "true"
3747
- }, maskValue), /* @__PURE__ */ createElement(Input_default, {
3748
- "aria-label": `OTP Input ${index + 1}`,
3749
- ...restProps,
3750
- type: type ?? (mask ? "password" : "text"),
3751
- ref: inputRef,
3752
- value,
3753
- onInput: onInternalChange,
3754
- onFocus: onInternalFocus,
3755
- onKeyDown: onInternalKeyDown,
3756
- onMouseDown: syncSelection,
3757
- onMouseUp: syncSelection,
3758
- className: clsx(className, {
3759
- [`${prefixCls}-mask-input`]: mask
3760
- })
3761
- }));
3762
- });
3763
- var OTPInput_default = OTPInput;
3764
-
3765
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/input/OTP/index.js
3766
- function strToArr(str) {
3767
- return (str || "").split("");
3768
- }
3769
- var Separator = (props) => {
3770
- const {
3771
- index,
3772
- prefixCls,
3773
- separator,
3774
- className: semanticClassName,
3775
- style: semanticStyle
3776
- } = props;
3777
- const separatorNode = isFunction(separator) ? separator(index) : separator;
3778
- if (!separatorNode) {
3779
- return null;
3780
- }
3781
- return /* @__PURE__ */ createElement("span", {
3782
- className: clsx(`${prefixCls}-separator`, semanticClassName),
3783
- style: semanticStyle
3784
- }, separatorNode);
3785
- };
3786
- var OTP = /* @__PURE__ */ forwardRef((props, ref) => {
3787
- const {
3788
- prefixCls: customizePrefixCls,
3789
- length = 6,
3790
- size: customSize,
3791
- defaultValue,
3792
- value,
3793
- onChange,
3794
- formatter,
3795
- separator,
3796
- variant: customizeVariant,
3797
- disabled,
3798
- status: customStatus,
3799
- autoFocus,
3800
- mask,
3801
- type,
3802
- autoComplete,
3803
- onInput,
3804
- onFocus,
3805
- inputMode,
3806
- classNames,
3807
- styles,
3808
- className,
3809
- style,
3810
- ...restProps
3811
- } = props;
3812
- if (true) {
3813
- const warning = devUseWarning("Input.OTP");
3814
- true ? warning(!(typeof mask === "string" && mask.length > 1), "usage", "`mask` prop should be a single character.") : void 0;
3815
- }
3816
- const {
3817
- classNames: contextClassNames,
3818
- styles: contextStyles,
3819
- getPrefixCls,
3820
- direction,
3821
- style: contextStyle,
3822
- className: contextClassName
3823
- } = useComponentConfig("otp");
3824
- const prefixCls = getPrefixCls("otp", customizePrefixCls);
3825
- const [variant] = useVariants_default("otp", customizeVariant, void 0, "input");
3826
- const mergedProps = {
3827
- ...props,
3828
- length,
3829
- variant
3830
- };
3831
- const contextStyleRoot = useSemanticRootStyle(contextStyle);
3832
- const styleRoot = useSemanticRootStyle(style);
3833
- const [mergedClassNames, mergedStyles] = useMergeSemantic([contextClassNames, classNames], [contextStyles, contextStyleRoot, styles, styleRoot], {
3834
- props: mergedProps
3835
- });
3836
- const domAttrs = pickAttrs(restProps, {
3837
- aria: true,
3838
- data: true,
3839
- attr: true
3840
- });
3841
- const [hashId, cssVarCls] = otp_default(prefixCls);
3842
- const mergedSize = useSize_default((ctx) => customSize ?? ctx);
3843
- const formContext = useContext(FormItemInputContext);
3844
- const mergedStatus = getMergedStatus(formContext.status, customStatus);
3845
- const proxyFormContext = useMemo(() => ({
3846
- ...formContext,
3847
- status: mergedStatus,
3848
- hasFeedback: false,
3849
- feedbackIcon: null
3850
- }), [formContext, mergedStatus]);
3851
- const containerRef = useRef(null);
3852
- const inputsRef = useRef({});
3853
- useImperativeHandle(ref, () => ({
3854
- focus: () => {
3855
- inputsRef.current[0]?.focus();
3856
- },
3857
- blur: () => {
3858
- for (let i = 0; i < length; i += 1) {
3859
- inputsRef.current[i]?.blur();
3860
- }
3861
- },
3862
- nativeElement: containerRef.current
3863
- }));
3864
- const internalFormatter = (txt) => formatter ? formatter(txt) : txt;
3865
- const [valueCells, setValueCells] = useState(() => strToArr(internalFormatter(defaultValue || "")));
3866
- useEffect(() => {
3867
- if (value !== void 0) {
3868
- setValueCells(strToArr(value));
3869
- }
3870
- }, [value]);
3871
- const triggerValueCellsChange = useEvent_default((nextValueCells) => {
3872
- setValueCells(nextValueCells);
3873
- if (onInput) {
3874
- onInput(nextValueCells);
3875
- }
3876
- if (onChange && nextValueCells.length === length && nextValueCells.every((c) => c) && nextValueCells.some((c, index) => valueCells[index] !== c)) {
3877
- onChange(nextValueCells.join(""));
3878
- }
3879
- });
3880
- const patchValue = useEvent_default((index, txt) => {
3881
- let nextCells = _toConsumableArray(valueCells);
3882
- for (let i = 0; i < index; i += 1) {
3883
- if (!nextCells[i]) {
3884
- nextCells[i] = "";
3885
- }
3886
- }
3887
- if (txt.length <= 1) {
3888
- nextCells[index] = txt;
3889
- } else {
3890
- nextCells = nextCells.slice(0, index).concat(strToArr(txt));
3891
- }
3892
- nextCells = nextCells.slice(0, length);
3893
- for (let i = nextCells.length - 1; i >= 0; i -= 1) {
3894
- if (nextCells[i]) {
3895
- break;
3896
- }
3897
- nextCells.pop();
3898
- }
3899
- const formattedValue = internalFormatter(nextCells.map((c) => c || " ").join(""));
3900
- nextCells = strToArr(formattedValue).map((c, i) => {
3901
- if (c === " " && !nextCells[i]) {
3902
- return nextCells[i];
3903
- }
3904
- return c;
3905
- });
3906
- return nextCells;
3907
- });
3908
- const onInputChange = (index, txt) => {
3909
- const nextCells = patchValue(index, txt);
3910
- const nextIndex = Math.min(index + txt.length, length - 1);
3911
- if (nextIndex !== index && nextCells[index] !== void 0) {
3912
- inputsRef.current[nextIndex]?.focus();
3913
- }
3914
- triggerValueCellsChange(nextCells);
3915
- };
3916
- const onInputActiveChange = (nextIndex) => {
3917
- inputsRef.current[nextIndex]?.focus();
3918
- };
3919
- const onInputFocus = (event, index) => {
3920
- for (let i = 0; i < index; i += 1) {
3921
- if (!inputsRef.current[i]?.input?.value) {
3922
- inputsRef.current[i]?.focus();
3923
- break;
3924
- }
3925
- }
3926
- onFocus?.(event);
3927
- };
3928
- const inputSharedProps = {
3929
- variant,
3930
- disabled,
3931
- status: mergedStatus,
3932
- mask,
3933
- type,
3934
- inputMode,
3935
- autoComplete
3936
- };
3937
- return /* @__PURE__ */ createElement("div", {
3938
- ...domAttrs,
3939
- ref: containerRef,
3940
- className: clsx(className, prefixCls, {
3941
- [`${prefixCls}-sm`]: mergedSize === "small",
3942
- [`${prefixCls}-lg`]: mergedSize === "large",
3943
- [`${prefixCls}-rtl`]: direction === "rtl"
3944
- }, cssVarCls, hashId, contextClassName, mergedClassNames.root),
3945
- style: mergedStyles.root,
3946
- role: "group"
3947
- }, /* @__PURE__ */ createElement(FormItemInputContext.Provider, {
3948
- value: proxyFormContext
3949
- }, Array.from({
3950
- length
3951
- }).map((_, index) => {
3952
- const key = `otp-${index}`;
3953
- const singleValue = valueCells[index] || "";
3954
- return /* @__PURE__ */ createElement(Fragment, {
3955
- key
3956
- }, /* @__PURE__ */ createElement(OTPInput_default, {
3957
- ref: (inputEle) => {
3958
- inputsRef.current[index] = inputEle;
3959
- },
3960
- index,
3961
- size: mergedSize,
3962
- htmlSize: 1,
3963
- className: clsx(mergedClassNames.input, `${prefixCls}-input`),
3964
- style: mergedStyles.input,
3965
- onChange: onInputChange,
3966
- value: singleValue,
3967
- onActiveChange: onInputActiveChange,
3968
- autoFocus: index === 0 && autoFocus,
3969
- onFocus: (event) => onInputFocus(event, index),
3970
- ...inputSharedProps
3971
- }), index < length - 1 && /* @__PURE__ */ createElement(Separator, {
3972
- separator,
3973
- index,
3974
- prefixCls,
3975
- className: clsx(mergedClassNames.separator),
3976
- style: mergedStyles.separator
3977
- }));
3978
- })));
3979
- });
3980
- var OTP_default = OTP;
3981
-
3982
- // ../../node_modules/.pnpm/@ant-design+icons@6.3.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@ant-design/icons/es/icons/EyeInvisibleOutlined.js
3983
- var import_EyeInvisibleOutlined = __toESM(require_EyeInvisibleOutlined());
3984
- function _extends4() {
3985
- _extends4 = Object.assign ? Object.assign.bind() : function(target) {
3986
- for (var i = 1; i < arguments.length; i++) {
3987
- var source = arguments[i];
3988
- for (var key in source) {
3989
- if (Object.prototype.hasOwnProperty.call(source, key)) {
3990
- target[key] = source[key];
3991
- }
3992
- }
3993
- }
3994
- return target;
3995
- };
3996
- return _extends4.apply(this, arguments);
3997
- }
3998
- var EyeInvisibleOutlined = (props, ref) => /* @__PURE__ */ createElement(AntdIconLight_default, _extends4({}, props, {
3999
- ref,
4000
- icon: import_EyeInvisibleOutlined.default
4001
- }));
4002
- var RefIcon3 = /* @__PURE__ */ forwardRef(EyeInvisibleOutlined);
4003
- if (true) {
4004
- RefIcon3.displayName = "EyeInvisibleOutlined";
4005
- }
4006
- var EyeInvisibleOutlined_default = RefIcon3;
4007
-
4008
- // ../../node_modules/.pnpm/@ant-design+icons@6.3.2_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@ant-design/icons/es/icons/EyeOutlined.js
4009
- var import_EyeOutlined = __toESM(require_EyeOutlined());
4010
- function _extends5() {
4011
- _extends5 = Object.assign ? Object.assign.bind() : function(target) {
4012
- for (var i = 1; i < arguments.length; i++) {
4013
- var source = arguments[i];
4014
- for (var key in source) {
4015
- if (Object.prototype.hasOwnProperty.call(source, key)) {
4016
- target[key] = source[key];
4017
- }
4018
- }
4019
- }
4020
- return target;
4021
- };
4022
- return _extends5.apply(this, arguments);
4023
- }
4024
- var EyeOutlined = (props, ref) => /* @__PURE__ */ createElement(AntdIconLight_default, _extends5({}, props, {
4025
- ref,
4026
- icon: import_EyeOutlined.default
4027
- }));
4028
- var RefIcon4 = /* @__PURE__ */ forwardRef(EyeOutlined);
4029
- if (true) {
4030
- RefIcon4.displayName = "EyeOutlined";
4031
- }
4032
- var EyeOutlined_default = RefIcon4;
4033
-
4034
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/input/Password.js
4035
- var defaultIconRender = (visible) => visible ? /* @__PURE__ */ createElement(EyeOutlined_default, null) : /* @__PURE__ */ createElement(EyeInvisibleOutlined_default, null);
4036
- var actionMap = {
4037
- click: "onClick",
4038
- hover: "onMouseOver"
4039
- };
4040
- var Password = /* @__PURE__ */ forwardRef((props, ref) => {
4041
- const {
4042
- disabled: customDisabled,
4043
- action = "click",
4044
- visibilityToggle = true,
4045
- iconRender,
4046
- prefixCls: customizePrefixCls,
4047
- inputPrefixCls: customizeInputPrefixCls,
4048
- suffix,
4049
- className,
4050
- style,
4051
- classNames,
4052
- styles,
4053
- variant: customizeVariant,
4054
- ...restProps
4055
- } = props;
4056
- const {
4057
- getPrefixCls,
4058
- className: contextClassName,
4059
- style: contextStyle,
4060
- classNames: contextClassNames,
4061
- styles: contextStyles,
4062
- iconRender: contextIconRender
4063
- } = useComponentConfig("inputPassword");
4064
- const [variant] = useVariants_default("inputPassword", customizeVariant, props.bordered, "input");
4065
- const [locale] = useLocale_default("global");
4066
- const disabled = useContext(DisabledContext_default);
4067
- const mergedDisabled = customDisabled ?? disabled;
4068
- const mergedProps = {
4069
- ...props,
4070
- disabled: mergedDisabled,
4071
- variant
4072
- };
4073
- const contextStyleRoot = useSemanticRootStyle(contextStyle);
4074
- const styleRoot = useSemanticRootStyle(style);
4075
- const [mergedClassNames, mergedStyles] = useMergeSemantic([contextClassNames, classNames], [contextStyles, contextStyleRoot, styles, styleRoot], {
4076
- props: mergedProps
4077
- });
4078
- const visibilityControlled = isPlainObject(visibilityToggle) && visibilityToggle.visible !== void 0;
4079
- const [visible, setVisible] = useState(() => visibilityControlled ? visibilityToggle.visible : false);
4080
- const inputRef = useRef(null);
4081
- useEffect(() => {
4082
- if (visibilityControlled) {
4083
- setVisible(visibilityToggle.visible);
4084
- }
4085
- }, [visibilityControlled, visibilityToggle]);
4086
- const removePasswordTimeout = useRemovePasswordTimeout(inputRef);
4087
- const onVisibleChange = () => {
4088
- if (mergedDisabled) {
4089
- return;
4090
- }
4091
- if (visible) {
4092
- removePasswordTimeout();
4093
- }
4094
- const nextVisible = !visible;
4095
- setVisible(nextVisible);
4096
- if (isPlainObject(visibilityToggle)) {
4097
- visibilityToggle.onVisibleChange?.(nextVisible);
4098
- }
4099
- };
4100
- const getIcon = (prefixCls2) => {
4101
- const iconTrigger = actionMap[action] || "";
4102
- const iconRenderer = iconRender || contextIconRender || defaultIconRender;
4103
- const icon = iconRenderer(visible);
4104
- const iconTabIndex = isPlainObject(visibilityToggle) ? visibilityToggle.tabIndex : void 0;
4105
- return /* @__PURE__ */ createElement("span", {
4106
- key: "passwordIcon",
4107
- role: "button",
4108
- tabIndex: mergedDisabled ? -1 : iconTabIndex ?? 0,
4109
- className: `${prefixCls2}-icon`,
4110
- "aria-disabled": mergedDisabled,
4111
- "aria-pressed": visible,
4112
- "aria-label": visible ? locale.hide : locale.show,
4113
- onMouseDown: (e3) => {
4114
- e3.preventDefault();
4115
- },
4116
- onMouseUp: (e3) => {
4117
- e3.preventDefault();
4118
- },
4119
- onKeyDown: (e3) => {
4120
- if (e3.key === "Enter" || e3.key === " ") {
4121
- e3.preventDefault();
4122
- onVisibleChange();
4123
- }
4124
- },
4125
- [iconTrigger]: onVisibleChange
4126
- }, icon);
4127
- };
4128
- const inputPrefixCls = getPrefixCls("input", customizeInputPrefixCls);
4129
- const prefixCls = getPrefixCls("input-password", customizePrefixCls);
4130
- const suffixIcon = visibilityToggle && getIcon(prefixCls);
4131
- const inputClassName = clsx(prefixCls, contextClassName, className, {
4132
- [`${prefixCls}-${props.size}`]: !!props.size
4133
- });
4134
- const inputProps = {
4135
- ...restProps,
4136
- type: visible ? "text" : "password",
4137
- prefixCls: inputPrefixCls,
4138
- suffix: /* @__PURE__ */ createElement(Fragment, null, suffixIcon, suffix),
4139
- disabled: mergedDisabled,
4140
- className: inputClassName,
4141
- classNames: mergedClassNames,
4142
- styles: mergedStyles,
4143
- variant
4144
- };
4145
- return /* @__PURE__ */ createElement(Input_default, {
4146
- ref: composeRef(ref, inputRef),
4147
- ...inputProps
4148
- });
4149
- });
4150
- if (true) {
4151
- Password.displayName = "Input.Password";
4152
- }
4153
- var Password_default = Password;
4154
-
4155
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/input/style/search.js
4156
- var genSearchStyle = (token) => {
4157
- const {
4158
- componentCls,
4159
- antCls,
4160
- calc,
4161
- max
4162
- } = token;
4163
- const btnCls = `${componentCls}-btn`;
4164
- const [varName, varRef] = genCssVar(antCls, "input-search");
4165
- const inputFontSizeSM = token.inputFontSizeSM ?? token.fontSize;
4166
- const smallButtonHeight = max(token.controlHeightSM, calc(inputFontSizeSM).mul(token.lineHeight).add(calc(token.paddingBlockSM).mul(2)).add(calc(token.lineWidth).mul(2)).equal());
4167
- return {
4168
- [componentCls]: {
4169
- [varName("btn-height")]: unit(token.controlHeight),
4170
- width: "100%",
4171
- // =========================== Button ===========================
4172
- [btnCls]: {
4173
- height: varRef("btn-height"),
4174
- "&:focus-visible": {
4175
- zIndex: 5
4176
- },
4177
- [`&${antCls}-btn-icon-only`]: {
4178
- width: varRef("btn-height")
4179
- },
4180
- "&-filled": {
4181
- background: token.colorFillTertiary,
4182
- "&:not(:disabled)": {
4183
- "&:hover": {
4184
- background: token.colorFillSecondary
4185
- },
4186
- "&:active": {
4187
- background: token.colorFill
4188
- }
4189
- }
4190
- }
4191
- },
4192
- [`&${componentCls}-large`]: {
4193
- [varName("btn-height")]: unit(token.controlHeightLG)
4194
- },
4195
- [`&${componentCls}-small`]: {
4196
- [varName("btn-height")]: unit(token.controlHeightSM)
4197
- },
4198
- [`&${componentCls}-small ${btnCls}`]: {
4199
- minHeight: smallButtonHeight,
4200
- [`&${token.antCls}-btn-icon-only`]: {
4201
- minWidth: smallButtonHeight
4202
- }
4203
- }
4204
- }
4205
- };
4206
- };
4207
- var search_default = genStyleHooks(["Input", "Search"], (token) => {
4208
- const inputToken = merge(token, initInputToken(token));
4209
- return genSearchStyle(inputToken);
4210
- }, initComponentToken);
4211
-
4212
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/input/Search.js
4213
- var Search = /* @__PURE__ */ forwardRef((props, ref) => {
4214
- const {
4215
- prefixCls: customizePrefixCls,
4216
- inputPrefixCls: customizeInputPrefixCls,
4217
- className,
4218
- size: customizeSize,
4219
- style,
4220
- enterButton = false,
4221
- searchIcon: customizeSearchIcon,
4222
- addonAfter,
4223
- loading,
4224
- disabled,
4225
- onSearch: customOnSearch,
4226
- onChange: customOnChange,
4227
- onCompositionStart,
4228
- onCompositionEnd,
4229
- variant: customizeVariant,
4230
- onPressEnter: customOnPressEnter,
4231
- classNames,
4232
- styles,
4233
- hidden,
4234
- ...restProps
4235
- } = props;
4236
- const {
4237
- direction,
4238
- getPrefixCls,
4239
- className: contextClassName,
4240
- style: contextStyle,
4241
- classNames: contextClassNames,
4242
- styles: contextStyles,
4243
- searchIcon: contextSearchIcon
4244
- } = useComponentConfig("inputSearch");
4245
- const contextDisabled = useContext(DisabledContext_default);
4246
- const mergedDisabled = disabled ?? contextDisabled;
4247
- const [mergedVariant, , isVariantConfigured] = useVariants_default("inputSearch", customizeVariant, props.bordered);
4248
- const variant = isVariantConfigured ? mergedVariant : void 0;
4249
- const [inputVariant] = useVariants_default("inputSearch", customizeVariant, props.bordered, "input");
4250
- const mergedProps = {
4251
- ...props,
4252
- enterButton,
4253
- variant
4254
- };
4255
- const contextStyleRoot = useSemanticRootStyle(contextStyle);
4256
- const styleRoot = useSemanticRootStyle(style);
4257
- const [mergedClassNames, mergedStyles] = useMergeSemantic([contextClassNames, classNames], [contextStyles, contextStyleRoot, styles, styleRoot], {
4258
- props: mergedProps
4259
- }, {
4260
- button: {
4261
- _default: "root"
4262
- }
4263
- });
4264
- const composedRef = useRef(false);
4265
- const prefixCls = getPrefixCls("input-search", customizePrefixCls);
4266
- const inputPrefixCls = getPrefixCls("input", customizeInputPrefixCls);
4267
- const [hashId, cssVarCls] = search_default(prefixCls);
4268
- const {
4269
- compactSize
4270
- } = useCompactItemContext(prefixCls, direction);
4271
- const size = useSize_default((ctx) => customizeSize ?? compactSize ?? ctx);
4272
- const inputRef = useRef(null);
4273
- const onChange = (e3) => {
4274
- if (e3?.target && e3.type === "click" && customOnSearch) {
4275
- customOnSearch(e3.target.value, e3, {
4276
- source: "clear"
4277
- });
4278
- }
4279
- customOnChange?.(e3);
4280
- };
4281
- const onMouseDown = (e3) => {
4282
- if (document.activeElement === inputRef.current?.input) {
4283
- e3.preventDefault();
4284
- }
4285
- };
4286
- const onSearch = (e3) => {
4287
- if (customOnSearch) {
4288
- customOnSearch(inputRef.current?.input?.value, e3, {
4289
- source: "input"
4290
- });
4291
- }
4292
- };
4293
- const onPressEnter = (e3) => {
4294
- if (composedRef.current || loading) {
4295
- return;
4296
- }
4297
- customOnPressEnter?.(e3);
4298
- onSearch(e3);
4299
- };
4300
- const searchIcon = typeof enterButton === "boolean" ? fallbackProp(customizeSearchIcon, contextSearchIcon, /* @__PURE__ */ createElement(SearchOutlined_default, null)) : null;
4301
- const btnPrefixCls = `${prefixCls}-btn`;
4302
- const btnClassName = clsx(btnPrefixCls, {
4303
- [`${btnPrefixCls}-${variant}`]: variant
4304
- });
4305
- let button;
4306
- const enterButtonAsElement = enterButton || {};
4307
- const isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true;
4308
- if (isAntdButton || enterButtonAsElement.type === "button") {
4309
- const enterButtonProps = enterButtonAsElement.props;
4310
- button = cloneElement(enterButtonAsElement, {
4311
- disabled: mergedDisabled || enterButtonProps.disabled || !isAntdButton && loading,
4312
- onMouseDown,
4313
- onClick: (e3) => {
4314
- enterButtonAsElement?.props?.onClick?.(e3);
4315
- onSearch(e3);
4316
- },
4317
- key: "enterButton",
4318
- ...isAntdButton ? {
4319
- className: clsx(btnClassName, enterButtonProps.className),
4320
- loading: loading || enterButtonProps.loading,
4321
- size
4322
- } : {}
4323
- });
4324
- } else {
4325
- button = /* @__PURE__ */ createElement(Button_default, {
4326
- classNames: mergedClassNames.button,
4327
- styles: mergedStyles.button,
4328
- className: btnClassName,
4329
- color: enterButton ? "primary" : "default",
4330
- size,
4331
- disabled,
4332
- key: "enterButton",
4333
- onMouseDown,
4334
- onClick: onSearch,
4335
- loading,
4336
- icon: searchIcon,
4337
- variant: variant === "borderless" || variant === "filled" || variant === "underlined" ? "text" : enterButton ? "solid" : void 0
4338
- }, enterButton);
4339
- }
4340
- if (addonAfter) {
4341
- button = [button, cloneElement(addonAfter, {
4342
- key: "addonAfter"
4343
- })];
4344
- }
4345
- const mergedClassName = clsx(prefixCls, cssVarCls, {
4346
- [`${prefixCls}-rtl`]: direction === "rtl",
4347
- [`${prefixCls}-${size}`]: !!size,
4348
- [`${prefixCls}-with-button`]: !!enterButton
4349
- }, className, contextClassName, hashId, mergedClassNames.root);
4350
- const handleOnCompositionStart = (e3) => {
4351
- composedRef.current = true;
4352
- onCompositionStart?.(e3);
4353
- };
4354
- const handleOnCompositionEnd = (e3) => {
4355
- composedRef.current = false;
4356
- onCompositionEnd?.(e3);
4357
- };
4358
- const rootProps = pickAttrs(restProps, {
4359
- data: true
4360
- });
4361
- const inputProps = omit({
4362
- ...restProps,
4363
- classNames: omit(mergedClassNames, ["button", "root"]),
4364
- styles: omit(mergedStyles, ["button", "root"]),
4365
- prefixCls: inputPrefixCls,
4366
- type: "search",
4367
- size,
4368
- variant: inputVariant,
4369
- onPressEnter,
4370
- onCompositionStart: handleOnCompositionStart,
4371
- onCompositionEnd: handleOnCompositionEnd,
4372
- onChange,
4373
- disabled
4374
- }, Object.keys(rootProps));
4375
- return /* @__PURE__ */ createElement(Compact_default, {
4376
- className: mergedClassName,
4377
- style: mergedStyles.root,
4378
- ...rootProps,
4379
- hidden
4380
- }, /* @__PURE__ */ createElement(Input_default, {
4381
- ref: composeRef(inputRef, ref),
4382
- ...inputProps
4383
- }), button);
4384
- });
4385
- if (true) {
4386
- Search.displayName = "Search";
4387
- }
4388
- var Search_default = Search;
4389
-
4390
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/input/index.js
4391
- var Input = Input_default;
4392
- Input.Group = Group_default;
4393
- Input.Search = Search_default;
4394
- Input.TextArea = TextArea_default;
4395
- Input.Password = Password_default;
4396
- Input.OTP = OTP_default;
4397
- var input_default = Input;
4398
-
4399
- // ../../node_modules/.pnpm/antd@6.6.1_luxon@3.7.2_moment@2.30.1_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/antd/es/index.js
4400
- if (true) {
4401
- const majorVersion = getReactMajorVersion();
4402
- true ? warning_default(majorVersion >= 18, "version", `antd v6 no longer supports React versions below 18. Please upgrade to React 18 or higher.`) : void 0;
4403
- }
4404
-
4405
- // src/service-identity.ts
4406
- var PASSWORD_AUTH_METHOD_ID = "password";
4407
- var PASSWORD_AUTH_PLUGIN_ID = "auth.password";
4408
- var PASSWORD_AUTH_LOGIN_ROUTE = "/login";
4409
- var PASSWORD_AUTH_REGISTRATION_ROUTE = "/register";
4410
- var PASSWORD_AUTH_RECOVERY_ROUTE = "/recovery";
4411
- var PASSWORD_AUTH_LOGIN_HREF = `/${PASSWORD_AUTH_PLUGIN_ID}${PASSWORD_AUTH_LOGIN_ROUTE}`;
4412
- var PASSWORD_AUTH_REGISTRATION_HREF = `/${PASSWORD_AUTH_PLUGIN_ID}${PASSWORD_AUTH_REGISTRATION_ROUTE}`;
4413
- var PASSWORD_AUTH_RECOVERY_HREF = `/${PASSWORD_AUTH_PLUGIN_ID}${PASSWORD_AUTH_RECOVERY_ROUTE}`;
4414
-
4415
- // src/plugin/auth-response.ts
4416
- function parseAuthenticationCompletion(input) {
4417
- if (input === null || typeof input !== "object" || Array.isArray(input)) {
4418
- throw new Error("\u8BA4\u8BC1\u54CD\u5E94\u65E0\u6548");
4419
- }
4420
- const response = input;
4421
- if (response.status === "verified") return { status: "verified" };
4422
- if (response.status === "denied") throw new Error("\u8BA4\u8BC1\u4FE1\u606F\u65E0\u6548\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u8BD5");
4423
- if (response.status === "pending") throw new Error("\u8BA4\u8BC1\u4ECD\u5728\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");
4424
- throw new Error("\u8BA4\u8BC1\u54CD\u5E94\u65E0\u6548");
4425
- }
4426
- function parseAuthenticationChallenge(input) {
4427
- if (input === null || typeof input !== "object" || Array.isArray(input)) {
4428
- throw new Error("\u9A8C\u8BC1\u7801\u54CD\u5E94\u65E0\u6548");
4429
- }
4430
- const response = input;
4431
- if (response.status !== "pending" || !Number.isSafeInteger(response.retryAfterMs) || response.retryAfterMs <= 0 || response.retryAfterMs > 6e4) {
4432
- throw new Error("\u9A8C\u8BC1\u7801\u54CD\u5E94\u65E0\u6548");
4433
- }
4434
- return { retryAfterMs: response.retryAfterMs };
4435
- }
4436
-
4437
- // src/plugin/password-form.module.css
4438
- var password_form_default = {
4439
- authShell: "password_form_authShell",
4440
- introduction: "password_form_introduction",
4441
- eyebrow: "password_form_eyebrow",
4442
- introductionTitle: "password_form_introductionTitle",
4443
- introductionCopy: "password_form_introductionCopy",
4444
- formRegion: "password_form_formRegion",
4445
- formBody: "password_form_formBody",
4446
- formNote: "password_form_formNote",
4447
- codeRow: "password_form_codeRow",
4448
- changeEmail: "password_form_changeEmail",
4449
- alternate: "password_form_alternate",
4450
- alternateLinks: "password_form_alternateLinks"
4451
- };
4452
-
4453
- // src/plugin/password-form.tsx
4454
- function PasswordForm(props) {
4455
- const [form] = form_default.useForm();
4456
- const { message } = app_default.useApp();
4457
- const request = useRequest();
4458
- const navigation = useRscNavigation();
4459
- const [transactionId, setTransactionId] = useState(props.transactionId);
4460
- const [mode, setMode] = useState("password");
4461
- const [codeSent, setCodeSent] = useState(false);
4462
- const [countdown, setCountdown] = useState(0);
4463
- const [submitting, setSubmitting] = useState(false);
4464
- const [sending, setSending] = useState(false);
4465
- const pendingSend = useRef(void 0);
4466
- const usesCode = props.intent !== "login" || mode === "code";
4467
- const needsPassword = props.intent !== "login" || mode === "password";
4468
- useEffect(() => {
4469
- if (countdown <= 0) return;
4470
- const timer = window.setInterval(() => setCountdown((value) => Math.max(0, value - 1)), 1e3);
4471
- return () => window.clearInterval(timer);
4472
- }, [countdown]);
4473
- async function ensureTransaction() {
4474
- if (transactionId) return transactionId;
4475
- const created = await beginTransaction(request, props.intent);
4476
- setTransactionId(created);
4477
- return created;
4478
- }
4479
- async function sendCode() {
4480
- try {
4481
- const { email } = await form.validateFields(["email"]);
4482
- setSending(true);
4483
- const currentTransactionId = await ensureTransaction();
4484
- const requestId = pendingSend.current?.email === email ? pendingSend.current.requestId : crypto.randomUUID();
4485
- pendingSend.current = { email, requestId };
4486
- const challenge = await request(
4487
- userBrowserTransactionCompletePath(currentTransactionId),
4488
- {
4489
- method: "POST",
4490
- headers: { "content-type": "application/json" },
4491
- credentials: "same-origin",
4492
- body: JSON.stringify({ input: { action: "send-code", email, requestId } })
4493
- },
4494
- { errorMessage: "\u9A8C\u8BC1\u7801\u53D1\u9001\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5", parse: parseAuthenticationChallenge }
4495
- );
4496
- setCodeSent(true);
4497
- setCountdown(Math.ceil(challenge.retryAfterMs / 1e3));
4498
- pendingSend.current = void 0;
4499
- void message.success("\u9A8C\u8BC1\u7801\u5DF2\u53D1\u9001");
4500
- } catch {
4501
- } finally {
4502
- setSending(false);
4503
- }
4504
- }
4505
- async function submit(values) {
4506
- setSubmitting(true);
4507
- try {
4508
- const currentTransactionId = await ensureTransaction();
4509
- const input = usesCode ? {
4510
- action: "verify-code",
4511
- email: values.email,
4512
- code: values.code,
4513
- ...needsPassword ? { password: values.password } : {}
4514
- } : { action: "password-login", email: values.email, password: values.password };
4515
- await request(
4516
- userBrowserTransactionCompletePath(currentTransactionId),
4517
- {
4518
- method: "POST",
4519
- headers: { "content-type": "application/json" },
4520
- credentials: "same-origin",
4521
- body: JSON.stringify({ input })
4522
- },
4523
- { errorMessage: "\u6CA1\u6709\u5B8C\u6210\uFF0C\u8BF7\u68C0\u67E5\u8F93\u5165\u540E\u91CD\u8BD5", parse: parseAuthenticationCompletion }
4524
- );
4525
- if (props.intent === "registration") {
4526
- navigation.replace(USER_ACCOUNT_HREF);
4527
- return;
4528
- }
4529
- navigation.replace("/");
4530
- } catch {
4531
- } finally {
4532
- setSubmitting(false);
4533
- }
4534
- }
4535
- const copy = pageCopy(props.intent);
4536
- return /* @__PURE__ */ jsxs(
4537
- "section",
4538
- {
4539
- "aria-labelledby": "password-auth-title",
4540
- className: password_form_default.authShell,
4541
- "data-auth-method": "password",
4542
- "data-flat-auth-layout": true,
4543
- children: [
4544
- /* @__PURE__ */ jsxs("div", { className: password_form_default.introduction, children: [
4545
- /* @__PURE__ */ jsx("p", { className: password_form_default.eyebrow, children: copy.step }),
4546
- /* @__PURE__ */ jsx("h1", { className: password_form_default.introductionTitle, id: "password-auth-title", children: copy.title }),
4547
- /* @__PURE__ */ jsx("p", { className: password_form_default.introductionCopy, children: copy.introduction }),
4548
- /* @__PURE__ */ jsx(AlternateLinks, { intent: props.intent })
4549
- ] }),
4550
- /* @__PURE__ */ jsxs("div", { className: password_form_default.formRegion, children: [
4551
- /* @__PURE__ */ jsx("div", { className: password_form_default.formBody, children: /* @__PURE__ */ jsxs(
4552
- form_default,
4553
- {
4554
- form,
4555
- layout: "vertical",
4556
- requiredMark: false,
4557
- scrollToFirstError: { focus: true },
4558
- validateTrigger: "onBlur",
4559
- onFinish: submit,
4560
- children: [
4561
- props.intent === "login" ? /* @__PURE__ */ jsx(form_default.Item, { children: /* @__PURE__ */ jsx(
4562
- segmented_default,
4563
- {
4564
- "aria-label": "\u9009\u62E9\u767B\u5F55\u65B9\u5F0F",
4565
- block: true,
4566
- options: [
4567
- { label: "\u5BC6\u7801\u767B\u5F55", value: "password" },
4568
- { label: "\u9A8C\u8BC1\u7801\u767B\u5F55", value: "code" }
4569
- ],
4570
- size: "large",
4571
- value: mode,
4572
- onChange: (value) => {
4573
- setMode(value);
4574
- setCodeSent(false);
4575
- setCountdown(0);
4576
- setTransactionId(props.transactionId);
4577
- pendingSend.current = void 0;
4578
- form.resetFields(["code"]);
4579
- }
4580
- }
4581
- ) }) : null,
4582
- /* @__PURE__ */ jsx(form_default.Item, { label: "\u90AE\u7BB1", name: "email", rules: emailRules, children: /* @__PURE__ */ jsx(
4583
- input_default,
4584
- {
4585
- autoComplete: "username",
4586
- disabled: codeSent,
4587
- inputMode: "email",
4588
- maxLength: 320,
4589
- placeholder: "name@example.com",
4590
- size: "large",
4591
- type: "email"
4592
- }
4593
- ) }),
4594
- codeSent ? /* @__PURE__ */ jsx(
4595
- button_default,
4596
- {
4597
- className: password_form_default.changeEmail,
4598
- disabled: sending || submitting,
4599
- type: "link",
4600
- onClick: () => {
4601
- setCodeSent(false);
4602
- setCountdown(0);
4603
- setTransactionId(void 0);
4604
- pendingSend.current = void 0;
4605
- form.resetFields(["code"]);
4606
- window.requestAnimationFrame(() => form.focusField("email"));
4607
- },
4608
- children: "\u4FEE\u6539\u90AE\u7BB1"
4609
- }
4610
- ) : null,
4611
- usesCode ? /* @__PURE__ */ jsx(form_default.Item, { label: "\u9A8C\u8BC1\u7801", required: true, children: /* @__PURE__ */ jsxs("div", { className: password_form_default.codeRow, children: [
4612
- /* @__PURE__ */ jsx(
4613
- form_default.Item,
4614
- {
4615
- noStyle: true,
4616
- name: "code",
4617
- rules: [
4618
- { required: true, message: "\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801" },
4619
- { len: 6, message: "\u9A8C\u8BC1\u7801\u5E94\u4E3A 6 \u4F4D\u6570\u5B57" },
4620
- { pattern: /^\d{6}$/, message: "\u9A8C\u8BC1\u7801\u5E94\u4E3A 6 \u4F4D\u6570\u5B57" }
4621
- ],
4622
- children: /* @__PURE__ */ jsx(
4623
- input_default,
4624
- {
4625
- "aria-label": "\u9A8C\u8BC1\u7801",
4626
- autoComplete: "one-time-code",
4627
- inputMode: "numeric",
4628
- maxLength: 6,
4629
- placeholder: "6 \u4F4D\u9A8C\u8BC1\u7801",
4630
- size: "large"
4631
- }
4632
- )
4633
- }
4634
- ),
4635
- /* @__PURE__ */ jsx(button_default, { disabled: countdown > 0 || submitting, loading: sending, onClick: sendCode, size: "large", children: countdown > 0 ? `${countdown} \u79D2\u540E\u91CD\u53D1` : codeSent ? "\u91CD\u65B0\u53D1\u9001" : "\u53D1\u9001\u9A8C\u8BC1\u7801" })
4636
- ] }) }) : null,
4637
- needsPassword ? /* @__PURE__ */ jsx(
4638
- form_default.Item,
4639
- {
4640
- extra: props.intent !== "login" ? "\u81F3\u5C11 12 \u4E2A\u5B57\u7B26\uFF0C\u5EFA\u8BAE\u4F7F\u7528\u5BC6\u7801\u7BA1\u7406\u5668\u751F\u6210\u5E76\u4FDD\u5B58\u3002" : void 0,
4641
- label: props.intent === "recovery" ? "\u65B0\u5BC6\u7801" : "\u5BC6\u7801",
4642
- name: "password",
4643
- rules: passwordRules(props.intent !== "login"),
4644
- children: /* @__PURE__ */ jsx(
4645
- input_default.Password,
4646
- {
4647
- autoComplete: props.intent === "login" ? "current-password" : "new-password",
4648
- maxLength: 128,
4649
- placeholder: props.intent === "login" ? "\u8F93\u5165\u5BC6\u7801" : "\u521B\u5EFA\u4E00\u4E2A\u5B89\u5168\u5BC6\u7801",
4650
- size: "large"
4651
- }
4652
- )
4653
- }
4654
- ) : null,
4655
- /* @__PURE__ */ jsx(
4656
- button_default,
4657
- {
4658
- block: true,
4659
- htmlType: "submit",
4660
- loading: submitting,
4661
- size: "large",
4662
- type: "primary",
4663
- disabled: sending || usesCode && !codeSent,
4664
- children: copy.submit
4665
- }
4666
- )
4667
- ]
4668
- }
4669
- ) }),
4670
- /* @__PURE__ */ jsxs("aside", { className: password_form_default.formNote, children: [
4671
- /* @__PURE__ */ jsx("p", { children: copy.description }),
4672
- /* @__PURE__ */ jsx("span", { children: "\u4F60\u7684\u767B\u5F55\u4FE1\u606F\u53EA\u7528\u4E8E\u8BC6\u522B\u8D26\u6237\u3002" })
4673
- ] })
4674
- ] })
4675
- ]
4676
- }
4677
- );
4678
- }
4679
- function AlternateLinks({ intent }) {
4680
- if (intent === "registration")
4681
- return /* @__PURE__ */ jsxs("p", { className: password_form_default.alternate, children: [
4682
- "\u5DF2\u7ECF\u6709\u8D26\u53F7\uFF1F",
4683
- /* @__PURE__ */ jsx(RscLink, { href: PASSWORD_AUTH_LOGIN_HREF, children: "\u8FD4\u56DE\u767B\u5F55" })
4684
- ] });
4685
- if (intent === "recovery")
4686
- return /* @__PURE__ */ jsxs("p", { className: password_form_default.alternate, children: [
4687
- "\u60F3\u8D77\u5BC6\u7801\u4E86\uFF1F",
4688
- /* @__PURE__ */ jsx(RscLink, { href: PASSWORD_AUTH_LOGIN_HREF, children: "\u8FD4\u56DE\u767B\u5F55" })
4689
- ] });
4690
- return /* @__PURE__ */ jsxs("div", { className: password_form_default.alternateLinks, children: [
4691
- /* @__PURE__ */ jsxs("p", { children: [
4692
- /* @__PURE__ */ jsx("span", { children: "\u8FD8\u6CA1\u6709\u8D26\u6237\uFF1F" }),
4693
- /* @__PURE__ */ jsx(RscLink, { href: PASSWORD_AUTH_REGISTRATION_HREF, children: "\u521B\u5EFA\u8D26\u6237" })
4694
- ] }),
4695
- /* @__PURE__ */ jsxs("p", { children: [
4696
- /* @__PURE__ */ jsx("span", { children: "\u5FD8\u8BB0\u5BC6\u7801\uFF1F" }),
4697
- /* @__PURE__ */ jsx(RscLink, { href: PASSWORD_AUTH_RECOVERY_HREF, children: "\u627E\u56DE\u5BC6\u7801" })
4698
- ] })
4699
- ] });
4700
- }
4701
- async function beginTransaction(request, intent) {
4702
- return request(
4703
- USER_BROWSER_AUTH_TRANSACTIONS_PATH,
4704
- {
4705
- method: "POST",
4706
- headers: { "content-type": "application/json" },
4707
- credentials: "same-origin",
4708
- body: JSON.stringify({ methodId: PASSWORD_AUTH_METHOD_ID, intent })
4709
- },
4710
- { errorMessage: "\u6682\u65F6\u65E0\u6CD5\u7EE7\u7EED\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5", parse: parseTransactionId }
4711
- );
4712
- }
4713
- function parseTransactionId(data) {
4714
- if (data === null || typeof data !== "object" || Array.isArray(data)) throw new Error("Invalid transaction response");
4715
- const transactionId = data.transactionId;
4716
- if (typeof transactionId !== "string" || !UUID.test(transactionId)) {
4717
- throw new Error("Invalid transaction response");
4718
- }
4719
- return transactionId;
4720
- }
4721
- var emailRules = [
4722
- { required: true, message: "\u8BF7\u8F93\u5165\u90AE\u7BB1", whitespace: true },
4723
- { type: "email", message: "\u8BF7\u8F93\u5165\u6709\u6548\u7684\u90AE\u7BB1\u5730\u5740" },
4724
- { max: 320, message: "\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u8D85\u8FC7 320 \u4E2A\u5B57\u7B26" }
4725
- ];
4726
- function passwordRules(requireMinimum) {
4727
- return [
4728
- { required: true, message: "\u8BF7\u8F93\u5165\u5BC6\u7801" },
4729
- ...requireMinimum ? [
4730
- {
4731
- validator: async (_rule, value) => {
4732
- if (!value) return;
4733
- if (Array.from(value).length < 12) throw new Error("\u5BC6\u7801\u81F3\u5C11\u9700\u8981 12 \u4E2A\u5B57\u7B26");
4734
- if (new TextEncoder().encode(value).byteLength > 128) throw new Error("\u5BC6\u7801\u8FC7\u957F\uFF0C\u8BF7\u7F29\u77ED\u540E\u91CD\u8BD5");
4735
- }
4736
- }
4737
- ] : [{ max: 128, message: "\u5BC6\u7801\u4E0D\u80FD\u8D85\u8FC7 128 \u4E2A\u5B57\u7B26" }]
4738
- ];
4739
- }
4740
- var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
4741
- function pageCopy(intent) {
4742
- if (intent === "registration")
4743
- return {
4744
- introduction: "\u9A8C\u8BC1\u90AE\u7BB1\u5E76\u521B\u5EFA\u8D26\u53F7\u540E\uFF0C\u53EF\u4EE5\u7EE7\u7EED\u5B8C\u5584\u8D44\u6599\uFF0C\u6574\u7406\u5C5E\u4E8E\u4F60\u7684\u8BB0\u5F55\u3002",
4745
- step: "ACCOUNT / REGISTER",
4746
- title: "\u521B\u5EFA\u8D26\u6237",
4747
- description: "\u4F7F\u7528\u90AE\u7BB1\u9A8C\u8BC1\u7801\u548C\u5BC6\u7801\u521B\u5EFA\u8D26\u53F7\u3002",
4748
- submit: "\u521B\u5EFA\u8D26\u53F7"
4749
- };
4750
- if (intent === "recovery")
4751
- return {
4752
- introduction: "\u9A8C\u8BC1\u6CE8\u518C\u90AE\u7BB1\u540E\u8BBE\u7F6E\u65B0\u5BC6\u7801\uFF0C\u65E7\u8BBE\u5907\u4E0A\u7684\u767B\u5F55\u4F1A\u81EA\u52A8\u9000\u51FA\u3002",
4753
- step: "ACCOUNT / RECOVERY",
4754
- title: "\u627E\u56DE\u5BC6\u7801",
4755
- description: "\u9A8C\u8BC1\u7801\u53EA\u4F1A\u53D1\u9001\u5230\u5DF2\u7ECF\u6CE8\u518C\u7684\u90AE\u7BB1\u3002",
4756
- submit: "\u66F4\u65B0\u5BC6\u7801\u5E76\u767B\u5F55"
4757
- };
4758
- return {
4759
- introduction: "\u767B\u5F55\u540E\u53EF\u4EE5\u7BA1\u7406\u4E2A\u4EBA\u8D44\u6599\u4E0E\u767B\u5F55\u4F1A\u8BDD\u3002",
4760
- step: "ACCOUNT / SIGN IN",
4761
- title: "\u767B\u5F55\u8D26\u6237",
4762
- description: "\u4F7F\u7528\u5BC6\u7801\u6216\u90AE\u7BB1\u9A8C\u8BC1\u7801\u767B\u5F55\u4F60\u7684\u8D26\u6237\u3002",
4763
- submit: "\u767B\u5F55"
4764
- };
4765
- }
4766
- export {
4767
- PasswordForm as default
4768
- };