@zlooks.cn/password-auth-server 1.0.2 → 1.0.4

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