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: fd0220e4d10052af.701bdafa2d.js
* Module id: 145239
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e) => {
"use strict";
var t,
n,
i,
r = e.i(358379);
function a() {
return (a = Object.assign.bind()).apply(null, arguments);
}
function o() {
return (o = Object.assign.bind()).apply(null, arguments);
}
function s() {
return (s = Object.assign.bind()).apply(null, arguments);
}
e.s(
[
"default",
0,
function (e) {
return r.createElement(
"svg",
a(
{
xmlns: "http://www.w3.org/2000/svg",
width: 16,
height: 16,
fill: "none",
viewBox: "0 0 16 16",
},
e,
),
t ||
(t = r.createElement("path", {
fill: "currentColor",
d: "M7.763.664a7.334 7.334 0 1 1-.002 14.668A7.334 7.334 0 0 1 7.763.664M1.659 8.598a6.14 6.14 0 0 0 4.704 5.37 10.36 10.36 0 0 1-1.875-5.37zm9.38 0a10.36 10.36 0 0 1-1.877 5.37 6.14 6.14 0 0 0 4.705-5.37zm-5.35 0a9.16 9.16 0 0 0 2.074 5.23 9.16 9.16 0 0 0 2.073-5.23zm.673-6.57a6.14 6.14 0 0 0-4.703 5.37h2.83a10.36 10.36 0 0 1 1.873-5.37m1.4.14a9.17 9.17 0 0 0-2.073 5.23h4.147a9.16 9.16 0 0 0-2.073-5.23m1.401-.14a10.36 10.36 0 0 1 1.875 5.37h2.83a6.14 6.14 0 0 0-4.705-5.37",
})),
);
},
],
501716,
),
e.s(
[
"default",
0,
function (e) {
return r.createElement(
"svg",
o(
{
xmlns: "http://www.w3.org/2000/svg",
width: 14,
height: 14,
fill: "none",
viewBox: "0 0 14 14",
},
e,
),
n ||
(n = r.createElement("path", {
fill: "currentColor",
d: "M10.12.642a2.276 2.276 0 0 1 0 4.55 2.27 2.27 0 0 1-1.647-.708L5.297 6.338a2.28 2.28 0 0 1 0 1.323l3.178 1.852a2.275 2.275 0 1 1-.531.906L4.767 8.567a2.276 2.276 0 1 1 0-3.136l3.176-1.853A2.275 2.275 0 0 1 10.12.642m0 9.216c-.428 0-.804.22-1.023.553a.5.5 0 0 1-.065.109 1.225 1.225 0 1 0 1.088-.661m-7-4.083a1.224 1.224 0 1 0 0 2.45 1.224 1.224 0 0 0 0-2.45m7-4.083a1.224 1.224 0 1 0 0 2.45 1.224 1.224 0 0 0 0-2.45",
})),
);
},
],
630379,
),
e.s(
[
"default",
0,
function (e) {
return r.createElement(
"svg",
s(
{
xmlns: "http://www.w3.org/2000/svg",
width: 16,
height: 16,
fill: "none",
viewBox: "0 0 16 16",
},
e,
),
i ||
(i = r.createElement("path", {
fill: "currentColor",
d: "M4.189 6.872a.4.4 0 0 1 .565 0l.375.375a.4.4 0 0 1 0 .565l-2.07 2.07a1.996 1.996 0 0 0 2.824 2.824l2.07-2.07a.4.4 0 0 1 .566 0l.375.376a.4.4 0 0 1 0 .565l-2.07 2.07a3.328 3.328 0 0 1-4.706-4.705zm4.707-.94a.4.4 0 0 1 .566 0l.375.376a.4.4 0 0 1 0 .566l-3.199 3.198a.4.4 0 0 1-.565 0l-.376-.375a.4.4 0 0 1 0-.565zm-.189-3.579a3.327 3.327 0 1 1 4.705 4.706l-2.069 2.07a.4.4 0 0 1-.566 0l-.375-.375a.4.4 0 0 1 0-.566l2.069-2.07a1.996 1.996 0 0 0-2.823-2.824l-2.07 2.07a.4.4 0 0 1-.566 0l-.375-.375a.4.4 0 0 1 0-.566z",
})),
);
},
],
771705,
);
var c = e.i(462214),
l = e.i(192830),
u = e.i(855698),
h = e.i(938202);
e.i(7284);
var f = e.i(801727),
d = e.i(620428),
p = e.i(507263),
g = e.i(505681),
b = e.i(479324),
m = e.i(450943),
w = e.i(511859),
v = e.i(124859),
x = e.i(593307),
y = e.i(11010),
_ = {
root: "m_bf2d988c",
inner: "m_26062bec",
input: "m_26063560",
icon: "m_bf295423",
"input--outline": "m_215c4542",
},
S = e.i(403557),
E = e.i(606227);
let M = (0, r.createContext)(null),
T = M.Provider,
k = () => (0, r.useContext)(M),
[C, A] = (0, e.i(209276).createOptionalContext)();
var N = { card: "m_26775b0a" };
let I = { withBorder: !0 },
P = (0, h.createVarsResolver)((e, { radius: t }) => ({
card: { "--card-radius": (0, u.getRadius)(t) },
})),
R = (0, x.factory)((e, t) => {
let n = (0, b.useProps)("CheckboxCard", I, e),
{
classNames: i,
className: r,
style: a,
styles: o,
unstyled: s,
vars: l,
checked: u,
mod: h,
withBorder: f,
value: d,
onClick: p,
defaultChecked: g,
onChange: w,
attributes: v,
...x
} = n,
y = (0, m.useStyles)({
name: "CheckboxCard",
classes: N,
props: n,
className: r,
style: a,
classNames: i,
styles: o,
unstyled: s,
attributes: v,
vars: l,
varsResolver: P,
rootSelector: "card",
}),
_ = k(),
M =
"boolean" == typeof u ? u : _ ? _.value.includes(d || "") : void 0,
[T, A] = (0, S.useUncontrolled)({
value: M,
defaultValue: g,
finalValue: !1,
onChange: w,
});
return (0, c.jsx)(C, {
value: { checked: T },
children: (0, c.jsx)(E.UnstyledButton, {
ref: t,
mod: [{ "with-border": f, checked: T }, h],
...y("card"),
...x,
role: "checkbox",
"aria-checked": T,
onClick: (e) => {
p?.(e), _?.onChange(d || ""), A(!T);
},
}),
});
});
(R.displayName = "@mantine/core/CheckboxCard"), (R.classes = N);
var L = e.i(129128),
D = e.i(525230);
let j = (0, x.factory)((e, t) => {
let {
value: n,
defaultValue: i,
onChange: r,
size: a,
wrapperProps: o,
children: s,
readOnly: l,
disabled: u,
...h
} = (0, b.useProps)("CheckboxGroup", null, e),
[f, d] = (0, S.useUncontrolled)({
value: n,
defaultValue: i,
finalValue: [],
onChange: r,
});
return (0, c.jsx)(T, {
value: {
value: f,
onChange: (e) => {
let t = "string" == typeof e ? e : e.currentTarget.value;
l || d(f.includes(t) ? f.filter((e) => e !== t) : [...f, t]);
},
size: a,
disabled: u,
},
children: (0, c.jsx)(D.Input.Wrapper, {
size: a,
ref: t,
...o,
...h,
labelElement: "div",
__staticSelector: "CheckboxGroup",
children: (0, c.jsx)(L.InputsGroupFieldset, {
role: "group",
children: s,
}),
}),
});
});
(j.classes = D.Input.Wrapper.classes),
(j.displayName = "@mantine/core/CheckboxGroup");
var O = e.i(315383),
F = {
indicator: "m_5e5256ee",
icon: "m_1b1c543a",
"indicator--outline": "m_76e20374",
};
let U = { icon: O.CheckboxIcon, variant: "filled" },
B = (0, h.createVarsResolver)(
(
e,
{
radius: t,
color: n,
size: i,
iconColor: r,
variant: a,
autoContrast: o,
},
) => {
let s = (0, f.parseThemeColor)({
color: n || e.primaryColor,
theme: e,
}),
c =
s.isThemeColor && void 0 === s.shade
? `var(--mantine-color-${s.color}-outline)`
: s.color;
return {
indicator: {
"--checkbox-size": (0, u.getSize)(i, "checkbox-size"),
"--checkbox-radius": void 0 === t ? void 0 : (0, u.getRadius)(t),
"--checkbox-color":
"outline" === a ? c : (0, d.getThemeColor)(n, e),
"--checkbox-icon-color": r
? (0, d.getThemeColor)(r, e)
: (0, g.getAutoContrastValue)(o, e)
? (0, p.getContrastColor)({
color: n,
theme: e,
autoContrast: o,
})
: void 0,
},
};
},
),
H = (0, x.factory)((e, t) => {
let n = (0, b.useProps)("CheckboxIndicator", U, e),
{
classNames: i,
className: r,
style: a,
styles: o,
unstyled: s,
vars: l,
icon: u,
indeterminate: h,
radius: f,
color: d,
iconColor: p,
autoContrast: g,
checked: w,
mod: x,
variant: y,
disabled: _,
attributes: S,
...E
} = n,
M = (0, m.useStyles)({
name: "CheckboxIndicator",
classes: F,
props: n,
className: r,
style: a,
classNames: i,
styles: o,
unstyled: s,
attributes: S,
vars: l,
varsResolver: B,
rootSelector: "indicator",
}),
T = A(),
k =
"boolean" == typeof w || "boolean" == typeof h
? w || h
: T?.checked || !1;
return (0, c.jsx)(v.Box, {
ref: t,
...M("indicator", { variant: y }),
variant: y,
mod: [{ checked: k, disabled: _ }, x],
...E,
children: (0, c.jsx)(u, { indeterminate: h, ...M("icon") }),
});
});
(H.displayName = "@mantine/core/CheckboxIndicator"), (H.classes = F);
let z = { labelPosition: "right", icon: O.CheckboxIcon, variant: "filled" },
G = (0, h.createVarsResolver)(
(
e,
{
radius: t,
color: n,
size: i,
iconColor: r,
variant: a,
autoContrast: o,
},
) => {
let s = (0, f.parseThemeColor)({
color: n || e.primaryColor,
theme: e,
}),
c =
s.isThemeColor && void 0 === s.shade
? `var(--mantine-color-${s.color}-outline)`
: s.color;
return {
root: {
"--checkbox-size": (0, u.getSize)(i, "checkbox-size"),
"--checkbox-radius": void 0 === t ? void 0 : (0, u.getRadius)(t),
"--checkbox-color":
"outline" === a ? c : (0, d.getThemeColor)(n, e),
"--checkbox-icon-color": r
? (0, d.getThemeColor)(r, e)
: (0, g.getAutoContrastValue)(o, e)
? (0, p.getContrastColor)({
color: n,
theme: e,
autoContrast: o,
})
: void 0,
},
};
},
),
$ = (0, x.factory)((e, t) => {
let n = (0, b.useProps)("Checkbox", z, e),
{
classNames: i,
className: a,
style: o,
styles: s,
unstyled: u,
vars: h,
color: f,
label: d,
id: p,
size: g,
radius: x,
wrapperProps: S,
checked: E,
labelPosition: M,
description: T,
error: C,
disabled: A,
variant: N,
indeterminate: I,
icon: P,
rootRef: R,
iconColor: L,
onChange: D,
autoContrast: j,
mod: O,
attributes: F,
...U
} = n,
B = k(),
H = g || B?.size,
$ = (0, m.useStyles)({
name: "Checkbox",
props: n,
classes: _,
className: a,
style: o,
classNames: i,
styles: s,
unstyled: u,
attributes: F,
vars: h,
varsResolver: G,
}),
{ styleProps: V, rest: W } = (0, w.extractStyleProps)(U),
K = (0, l.useId)(p),
q = {
checked: B?.value.includes(W.value) ?? E,
onChange: (e) => {
B?.onChange(e), D?.(e);
},
disabled: B?.disabled ?? A,
},
X = (0, r.useRef)(null),
Y = t || X;
return (
(0, r.useEffect)(() => {
Y &&
"current" in Y &&
Y.current &&
((Y.current.indeterminate = I || !1),
I
? Y.current.setAttribute("data-indeterminate", "true")
: Y.current.removeAttribute("data-indeterminate"));
}, [I, Y]),
(0, c.jsx)(y.InlineInput, {
...$("root"),
__staticSelector: "Checkbox",
__stylesApiProps: n,
id: K,
size: H,
labelPosition: M,
label: d,
description: T,
error: C,
disabled: q.disabled,
classNames: i,
styles: s,
unstyled: u,
"data-checked": q.checked || E || void 0,
variant: N,
ref: R,
mod: O,
...V,
...S,
children: (0, c.jsxs)(v.Box, {
...$("inner"),
mod: { "data-label-position": M },
children: [
(0, c.jsx)(v.Box, {
component: "input",
id: K,
ref: Y,
mod: { error: !!C },
...$("input", { focusable: !0, variant: N }),
...W,
...q,
type: "checkbox",
}),
(0, c.jsx)(P, { indeterminate: I, ...$("icon") }),
],
}),
})
);
});
($.classes = { ..._, ...y.InlineInputClasses }),
($.displayName = "@mantine/core/Checkbox"),
($.Group = j),
($.Indicator = H),
($.Card = R),
e.s(["Checkbox", () => $], 749967);
var V = e.i(511334),
W = e.i(318680),
K = r.useLayoutEffect,
q = function (e) {
var t = r.default.useRef(e);
return (
K(function () {
t.current = e;
}),
t
);
},
X = function (e, t) {
"function" == typeof e ? e(t) : (e.current = t);
},
Y = function (e, t) {
var n = r.default.useRef();
return r.default.useCallback(
function (i) {
(e.current = i),
n.current && X(n.current, null),
(n.current = t),
t && X(t, i);
},
[t],
);
},
J = {
"min-height": "0",
"max-height": "none",
height: "0",
visibility: "hidden",
overflow: "hidden",
position: "absolute",
"z-index": "-1000",
top: "0",
right: "0",
display: "block",
},
Z = function (e) {
Object.keys(J).forEach(function (t) {
e.style.setProperty(t, J[t], "important");
});
},
Q = null,
ee = function (e, t) {
var n = e.scrollHeight;
return "border-box" === t.sizingStyle.boxSizing
? n + t.borderSize
: n - t.paddingSize;
},
et = function () {},
en = [
"borderBottomWidth",
"borderLeftWidth",
"borderRightWidth",
"borderTopWidth",
"boxSizing",
"fontFamily",
"fontSize",
"fontStyle",
"fontWeight",
"letterSpacing",
"lineHeight",
"paddingBottom",
"paddingLeft",
"paddingRight",
"paddingTop",
"tabSize",
"textIndent",
"textRendering",
"textTransform",
"width",
"wordBreak",
"wordSpacing",
"scrollbarGutter",
],
ei = !!document.documentElement.currentStyle,
er = function (e) {
var t = window.getComputedStyle(e);
if (null === t) return null;
var n = en.reduce(function (e, n) {
return (e[n] = t[n]), e;
}, {}),
i = n.boxSizing;
if ("" === i) return null;
ei &&
"border-box" === i &&
(n.width =
parseFloat(n.width) +
parseFloat(n.borderRightWidth) +
parseFloat(n.borderLeftWidth) +
parseFloat(n.paddingRight) +
parseFloat(n.paddingLeft) +
"px");
var r = parseFloat(n.paddingBottom) + parseFloat(n.paddingTop),
a = parseFloat(n.borderBottomWidth) + parseFloat(n.borderTopWidth);
return { sizingStyle: n, paddingSize: r, borderSize: a };
};
function ea(e, t, n) {
var i = q(n);
r.useLayoutEffect(function () {
var n = function (e) {
return i.current(e);
};
if (e)
return (
e.addEventListener(t, n),
function () {
return e.removeEventListener(t, n);
}
);
}, []);
}
var eo = function (e, t) {
ea(document.body, "reset", function (n) {
e.current.form === n.target && t(n);
});
},
es = function (e) {
ea(window, "resize", e);
},
ec = function (e) {
ea(document.fonts, "loadingdone", e);
},
el = [
"cacheMeasurements",
"maxRows",
"minRows",
"onChange",
"onHeightChange",
],
eu = r.forwardRef(function (e, t) {
var n = e.cacheMeasurements,
i = e.maxRows,
a = e.minRows,
o = e.onChange,
s = void 0 === o ? et : o,
c = e.onHeightChange,
l = void 0 === c ? et : c,
u = (0, W.default)(e, el),
h = void 0 !== u.value,
f = r.useRef(null),
d = Y(f, t),
p = r.useRef(0),
g = r.useRef(),
b = function () {
var e = f.current,
t = n && g.current ? g.current : er(e);
if (t) {
g.current = t;
var r,
o,
s,
c,
u,
h,
d,
b,
m,
w,
v,
x =
((r = e.value || e.placeholder || "x"),
void 0 === (o = a) && (o = 1),
void 0 === (s = i) && (s = 1 / 0),
Q ||
((Q = document.createElement("textarea")).setAttribute(
"tabindex",
"-1",
),
Q.setAttribute("aria-hidden", "true"),
Z(Q)),
null === Q.parentNode && document.body.appendChild(Q),
(c = t.paddingSize),
(u = t.borderSize),
(d = (h = t.sizingStyle).boxSizing),
Object.keys(h).forEach(function (e) {
Q.style[e] = h[e];
}),
Z(Q),
(Q.value = r),
(b = ee(Q, t)),
(Q.value = r),
(b = ee(Q, t)),
(Q.value = "x"),
(w = (m = Q.scrollHeight - c) * o),
"border-box" === d && (w = w + c + u),
(b = Math.max(w, b)),
(v = m * s),
"border-box" === d && (v = v + c + u),
[(b = Math.min(v, b)), m]),
y = x[0],
_ = x[1];
p.current !== y &&
((p.current = y),
e.style.setProperty("height", y + "px", "important"),
l(y, { rowHeight: _ }));
}
};
return (
r.useLayoutEffect(b),
eo(f, function () {
if (!h) {
var e = f.current.value;
requestAnimationFrame(function () {
var t = f.current;
t && e !== t.value && b();
});
}
}),
es(b),
ec(b),
r.createElement(
"textarea",
(0, V.default)({}, u, {
onChange: function (e) {
h || b(), s(e);
},
ref: d,
}),
)
);
}),
eh = e.i(290297),
ef = e.i(518366);
let ed = { size: "sm" },
ep = (0, x.factory)((e, t) => {
let {
autosize: n,
maxRows: i,
minRows: r,
__staticSelector: a,
resize: o,
...s
} = (0, b.useProps)("Textarea", ed, e),
l = n && "test" !== (0, eh.getEnv)();
return (0, c.jsx)(ef.InputBase, {
component: l ? eu : "textarea",
ref: t,
...s,
__staticSelector: a || "Textarea",
multiline: !0,
"data-no-overflow": (n && void 0 === i) || void 0,
__vars: { "--input-resize": o },
...(l ? { maxRows: i, minRows: r } : {}),
});
});
(ep.classes = ef.InputBase.classes),
(ep.displayName = "@mantine/core/Textarea"),
e.s(["Textarea", () => ep], 145239);
};
export default moduleFactory;