Your Name 1912bcd25b
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
chore: sync all remaining local workspace changes
2026-05-08 11:26:57 +08:00

744 lines
22 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: d209710bf7c02a33.1dff92b6be.js
* Module id: 938818
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e) => {
"use strict";
var t = e.i(358379);
e.i(23741);
var r = e.i(624977),
n = e.i(552659),
a = e.i(640404),
i = e.i(54168);
e.i(6177);
var o = e.i(24083),
l = e.i(709809),
l = l,
s = e.i(370051),
u = e.i(634885),
c = e.i(914528),
f = e.i(892388),
d = e.i(504997),
p = e.i(483926),
m = (0, c.default)(function e() {
(0, u.default)(this, e);
}),
h = "CALC_UNIT",
v = RegExp(h, "g");
function g(e) {
return "number" == typeof e ? "".concat(e).concat(h) : e;
}
var b = (function (e) {
(0, d.default)(n, e);
var t = (0, p.default)(n);
function n(e, i) {
(0, u.default)(this, n),
(o = t.call(this)),
(0, a.default)((0, f.default)(o), "result", ""),
(0, a.default)((0, f.default)(o), "unitlessCssVar", void 0),
(0, a.default)((0, f.default)(o), "lowPriority", void 0);
var o,
l = (0, r.default)(e);
return (
(o.unitlessCssVar = i),
e instanceof n
? (o.result = "(".concat(e.result, ")"))
: "number" === l
? (o.result = g(e))
: "string" === l && (o.result = e),
o
);
}
return (
(0, c.default)(n, [
{
key: "add",
value: function (e) {
return (
e instanceof n
? (this.result = ""
.concat(this.result, " + ")
.concat(e.getResult()))
: ("number" == typeof e || "string" == typeof e) &&
(this.result = ""
.concat(this.result, " + ")
.concat(g(e))),
(this.lowPriority = !0),
this
);
},
},
{
key: "sub",
value: function (e) {
return (
e instanceof n
? (this.result = ""
.concat(this.result, " - ")
.concat(e.getResult()))
: ("number" == typeof e || "string" == typeof e) &&
(this.result = ""
.concat(this.result, " - ")
.concat(g(e))),
(this.lowPriority = !0),
this
);
},
},
{
key: "mul",
value: function (e) {
return (
this.lowPriority &&
(this.result = "(".concat(this.result, ")")),
e instanceof n
? (this.result = ""
.concat(this.result, " * ")
.concat(e.getResult(!0)))
: ("number" == typeof e || "string" == typeof e) &&
(this.result = "".concat(this.result, " * ").concat(e)),
(this.lowPriority = !1),
this
);
},
},
{
key: "div",
value: function (e) {
return (
this.lowPriority &&
(this.result = "(".concat(this.result, ")")),
e instanceof n
? (this.result = ""
.concat(this.result, " / ")
.concat(e.getResult(!0)))
: ("number" == typeof e || "string" == typeof e) &&
(this.result = "".concat(this.result, " / ").concat(e)),
(this.lowPriority = !1),
this
);
},
},
{
key: "getResult",
value: function (e) {
return this.lowPriority || e
? "(".concat(this.result, ")")
: this.result;
},
},
{
key: "equal",
value: function (e) {
var t = this,
r = (e || {}).unit,
n = !0;
return ("boolean" == typeof r
? (n = r)
: Array.from(this.unitlessCssVar).some(function (e) {
return t.result.includes(e);
}) && (n = !1),
(this.result = this.result.replace(v, n ? "px" : "")),
void 0 !== this.lowPriority)
? "calc(".concat(this.result, ")")
: this.result;
},
},
]),
n
);
})(m),
y = (function (e) {
(0, d.default)(r, e);
var t = (0, p.default)(r);
function r(e) {
var n;
return (
(0, u.default)(this, r),
(n = t.call(this)),
(0, a.default)((0, f.default)(n), "result", 0),
e instanceof r
? (n.result = e.result)
: "number" == typeof e && (n.result = e),
n
);
}
return (
(0, c.default)(r, [
{
key: "add",
value: function (e) {
return (
e instanceof r
? (this.result += e.result)
: "number" == typeof e && (this.result += e),
this
);
},
},
{
key: "sub",
value: function (e) {
return (
e instanceof r
? (this.result -= e.result)
: "number" == typeof e && (this.result -= e),
this
);
},
},
{
key: "mul",
value: function (e) {
return (
e instanceof r
? (this.result *= e.result)
: "number" == typeof e && (this.result *= e),
this
);
},
},
{
key: "div",
value: function (e) {
return (
e instanceof r
? (this.result /= e.result)
: "number" == typeof e && (this.result /= e),
this
);
},
},
{
key: "equal",
value: function () {
return this.result;
},
},
]),
r
);
})(m);
let x = function (e, t) {
var r = "css" === e ? b : y;
return function (e) {
return new r(e, t);
};
},
w = function (e, t) {
return "".concat(
[
t,
e
.replace(/([A-Z]+)([A-Z][a-z]+)/g, "$1-$2")
.replace(/([a-z])([A-Z])/g, "$1-$2"),
]
.filter(Boolean)
.join("-"),
);
};
e.i(299916);
let k = function (e, t, r, a) {
var o = (0, i.default)({}, t[e]);
null != a &&
a.deprecatedTokens &&
a.deprecatedTokens.forEach(function (e) {
var t = (0, n.default)(e, 2),
r = t[0],
a = t[1];
((null != o && o[r]) || (null != o && o[a])) &&
(null != o[a] || (o[a] = null == o ? void 0 : o[r]));
});
var l = (0, i.default)((0, i.default)({}, r), o);
return (
Object.keys(l).forEach(function (e) {
l[e] === t[e] && delete l[e];
}),
l
);
};
var C = "u" > typeof CSSINJS_STATISTIC,
E = !0;
function j() {
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
if (!C) return Object.assign.apply(Object, [{}].concat(t));
E = !1;
var a = {};
return (
t.forEach(function (e) {
"object" === (0, r.default)(e) &&
Object.keys(e).forEach(function (t) {
Object.defineProperty(a, t, {
configurable: !0,
enumerable: !0,
get: function () {
return e[t];
},
});
});
}),
(E = !0),
a
);
}
var P = {};
function F() {}
let _ = function (e) {
var t,
r = e,
n = F;
return (
C &&
"u" > typeof Proxy &&
((t = new Set()),
(r = new Proxy(e, {
get: function (e, r) {
if (E) {
var n;
null == (n = t) || n.add(r);
}
return e[r];
},
})),
(n = function (e, r) {
var n;
P[e] = {
global: Array.from(t),
component: (0, i.default)(
(0, i.default)({}, null == (n = P[e]) ? void 0 : n.component),
r,
),
};
})),
{ token: r, keys: t, flush: n }
);
};
e.s(["default", 0, _, "merge", () => j], 938818);
let S = function (e, t, r) {
if ("function" == typeof r) {
var n;
return r(j(t, null != (n = t[e]) ? n : {}));
}
return null != r ? r : {};
};
var N = e.i(723378),
O = new ((function () {
function e() {
(0, u.default)(this, e),
(0, a.default)(this, "map", new Map()),
(0, a.default)(this, "objectIDMap", new WeakMap()),
(0, a.default)(this, "nextID", 0),
(0, a.default)(this, "lastAccessBeat", new Map()),
(0, a.default)(this, "accessBeat", 0);
}
return (
(0, c.default)(e, [
{
key: "set",
value: function (e, t) {
this.clear();
var r = this.getCompositeKey(e);
this.map.set(r, t), this.lastAccessBeat.set(r, Date.now());
},
},
{
key: "get",
value: function (e) {
var t = this.getCompositeKey(e),
r = this.map.get(t);
return (
this.lastAccessBeat.set(t, Date.now()),
(this.accessBeat += 1),
r
);
},
},
{
key: "getCompositeKey",
value: function (e) {
var t = this;
return e
.map(function (e) {
return e && "object" === (0, r.default)(e)
? "obj_".concat(t.getObjectID(e))
: "".concat((0, r.default)(e), "_").concat(e);
})
.join("|");
},
},
{
key: "getObjectID",
value: function (e) {
if (this.objectIDMap.has(e)) return this.objectIDMap.get(e);
var t = this.nextID;
return this.objectIDMap.set(e, t), (this.nextID += 1), t;
},
},
{
key: "clear",
value: function () {
var e = this;
if (this.accessBeat > 1e4) {
var t = Date.now();
this.lastAccessBeat.forEach(function (r, n) {
t - r > 6e5 &&
(e.map.delete(n), e.lastAccessBeat.delete(n));
}),
(this.accessBeat = 0);
}
},
},
]),
e
);
})())();
let A = function () {
return {};
};
var M = e.i(556957),
T = e.i(817856),
$ = e.i(194432);
let {
genStyleHooks: I,
genComponentStyleHook: R,
genSubStyleComponent: D,
} = (function (e) {
var u = e.useCSP,
c = void 0 === u ? A : u,
f = e.useToken,
d = e.usePrefix,
p = e.getResetStyles,
m = e.getCommonStyle,
h = e.getCompUnitless;
function v(a, l, u) {
var h =
arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {},
v = Array.isArray(a) ? a : [a, a],
g = (0, n.default)(v, 1)[0],
b = v.join("-"),
y = e.layer || { name: "antd" };
return function (e) {
var n,
a,
v =
arguments.length > 1 && void 0 !== arguments[1]
? arguments[1]
: e,
C = f(),
E = C.theme,
P = C.realToken,
F = C.hashId,
A = C.token,
M = C.cssVar,
T = d(),
$ = T.rootPrefixCls,
I = T.iconPrefixCls,
R = c(),
D = M ? "css" : "js",
V =
((n = function () {
var e = new Set();
return (
M &&
Object.keys(h.unitless || {}).forEach(function (t) {
e.add((0, o.token2CSSVar)(t, M.prefix)),
e.add((0, o.token2CSSVar)(t, w(g, M.prefix)));
}),
x(D, e)
);
}),
(a = [D, g, null == M ? void 0 : M.prefix]),
t.default.useMemo(function () {
var e = O.get(a);
if (e) return e;
var t = n();
return O.set(a, t), t;
}, a)),
L =
"js" === D
? { max: Math.max, min: Math.min }
: {
max: function () {
for (
var e = arguments.length, t = Array(e), r = 0;
r < e;
r++
)
t[r] = arguments[r];
return "max(".concat(
t
.map(function (e) {
return (0, N.unit)(e);
})
.join(","),
")",
);
},
min: function () {
for (
var e = arguments.length, t = Array(e), r = 0;
r < e;
r++
)
t[r] = arguments[r];
return "min(".concat(
t
.map(function (e) {
return (0, N.unit)(e);
})
.join(","),
")",
);
},
},
B = L.max,
z = L.min,
U = {
theme: E,
token: A,
hashId: F,
nonce: function () {
return R.nonce;
},
clientOnly: h.clientOnly,
layer: y,
order: h.order || -999,
};
return (
"function" == typeof p &&
(0, s.useStyleRegister)(
(0, i.default)(
(0, i.default)({}, U),
{},
{ clientOnly: !1, path: ["Shared", $] },
),
function () {
return p(A, {
prefix: { rootPrefixCls: $, iconPrefixCls: I },
csp: R,
});
},
),
[
(0, s.useStyleRegister)(
(0, i.default)((0, i.default)({}, U), {}, { path: [b, e, I] }),
function () {
if (!1 === h.injectStyle) return [];
var t = _(A),
n = t.token,
a = t.flush,
i = S(g, P, u),
s = ".".concat(e),
c = k(g, P, i, { deprecatedTokens: h.deprecatedTokens });
M &&
i &&
"object" === (0, r.default)(i) &&
Object.keys(i).forEach(function (e) {
i[e] = "var(".concat(
(0, o.token2CSSVar)(e, w(g, M.prefix)),
")",
);
});
var f = j(
n,
{
componentCls: s,
prefixCls: e,
iconCls: ".".concat(I),
antCls: ".".concat($),
calc: V,
max: B,
min: z,
},
M ? i : c,
),
d = l(f, {
hashId: F,
prefixCls: e,
rootPrefixCls: $,
iconPrefixCls: I,
});
a(g, c);
var p =
"function" == typeof m ? m(f, e, v, h.resetFont) : null;
return [!1 === h.resetStyle ? null : p, d];
},
),
F,
]
);
};
}
return {
genStyleHooks: function (e, r, o, s) {
var u,
c,
d,
p,
m,
g,
b,
y,
x,
w = Array.isArray(e) ? e[0] : e;
function C(e) {
return ""
.concat(String(w))
.concat(e.slice(0, 1).toUpperCase())
.concat(e.slice(1));
}
var E = (null == s ? void 0 : s.unitless) || {},
j = "function" == typeof h ? h(e) : {},
P = (0, i.default)(
(0, i.default)({}, j),
{},
(0, a.default)({}, C("zIndexPopup"), !0),
);
Object.keys(E).forEach(function (e) {
P[C(e)] = E[e];
});
var F = (0, i.default)(
(0, i.default)({}, s),
{},
{ unitless: P, prefixToken: C },
),
_ = v(e, r, o, F),
N =
((u = w),
(c = o),
(p = (d = F).unitless),
(g = void 0 === (m = d.injectStyle) || m),
(b = d.prefixToken),
(y = d.ignore),
(x = function (e) {
var t = e.rootCls,
r = e.cssVar,
n = void 0 === r ? {} : r,
a = f().realToken;
return (
(0, l.default)(
{
path: [u],
prefix: n.prefix,
key: n.key,
unitless: p,
ignore: y,
token: a,
scope: t,
},
function () {
var e = S(u, a, c),
t = k(u, a, e, {
deprecatedTokens:
null == d ? void 0 : d.deprecatedTokens,
});
return (
Object.keys(e).forEach(function (e) {
(t[b(e)] = t[e]), delete t[e];
}),
t
);
},
),
null
);
}),
function (e) {
var r = f().cssVar;
return [
function (n) {
return g && r
? t.default.createElement(
t.default.Fragment,
null,
t.default.createElement(x, {
rootCls: e,
cssVar: r,
component: u,
}),
n,
)
: n;
},
null == r ? void 0 : r.key,
];
});
return function (e) {
var t =
arguments.length > 1 && void 0 !== arguments[1]
? arguments[1]
: e,
r = _(e, t),
a = (0, n.default)(r, 2)[1],
i = N(t),
o = (0, n.default)(i, 2);
return [o[0], a, o[1]];
};
},
genSubStyleComponent: function (e, t, r) {
var n =
arguments.length > 3 && void 0 !== arguments[3]
? arguments[3]
: {},
a = v(e, t, r, (0, i.default)({ resetStyle: !1, order: -998 }, n));
return function (e) {
var t = e.prefixCls,
r = e.rootCls,
n = void 0 === r ? t : r;
return a(t, n), null;
};
},
genComponentStyleHook: v,
};
})({
usePrefix: () => {
let { getPrefixCls: e, iconPrefixCls: r } = (0, t.useContext)(
M.ConfigContext,
);
return { rootPrefixCls: e(), iconPrefixCls: r };
},
useToken: () => {
let [e, t, r, n, a] = (0, $.default)();
return { theme: e, realToken: t, hashId: r, token: n, cssVar: a };
},
useCSP: () => {
let { csp: e } = (0, t.useContext)(M.ConfigContext);
return null != e ? e : {};
},
getResetStyles: (e, t) => {
var r;
let n = (0, T.genLinkStyle)(e);
return [
n,
{ "&": n },
(0, T.genIconStyle)(
null != (r = null == t ? void 0 : t.prefix.iconPrefixCls)
? r
: M.defaultIconPrefixCls,
),
];
},
getCommonStyle: T.genCommonStyle,
getCompUnitless: () => $.unitless,
});
e.s(
[
"genComponentStyleHook",
0,
R,
"genStyleHooks",
0,
I,
"genSubStyleComponent",
0,
D,
],
117394,
);
};
export default moduleFactory;