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

260 lines
8.7 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: 7e519410fdb8d8cd.424e721e83.js
* Module id: 6783
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e) => {
"use strict";
var t = { root: "m_4addd315", control: "m_326d024a", dots: "m_4ad7767d" };
e.s(["default", () => t], 38020);
var i = e.i(462214),
a = e.i(358379);
e.i(7284);
var r = e.i(479324),
n = e.i(593307),
o = e.i(606227);
let [s, l] = (0, e.i(559394).createSafeContext)(
"Pagination.Root component was not found in tree",
);
e.s(
["PaginationProvider", () => s, "usePaginationContext", () => l],
51357,
);
let d = { withPadding: !0 },
u = (0, n.factory)((e, t) => {
let {
classNames: a,
className: n,
style: s,
styles: u,
vars: c,
active: h,
disabled: m,
withPadding: p,
mod: v,
...b
} = (0, r.useProps)("PaginationControl", d, e),
g = l(),
f = m || g.disabled;
return (0, i.jsx)(o.UnstyledButton, {
ref: t,
disabled: f,
mod: [{ active: h, disabled: f, "with-padding": p }, v],
...g.getStyles("control", {
className: n,
style: s,
classNames: a,
styles: u,
active: !f,
}),
...b,
});
});
(u.classes = t),
(u.displayName = "@mantine/core/PaginationControl"),
e.s(["PaginationControl", () => u], 601763);
var c = e.i(124859);
function h({ style: e, children: t, path: a, ...r }) {
return (0, i.jsx)("svg", {
viewBox: "0 0 16 16",
xmlns: "http://www.w3.org/2000/svg",
style: {
width: "calc(var(--pagination-control-size) / 1.8)",
height: "calc(var(--pagination-control-size) / 1.8)",
...e,
},
...r,
children: (0, i.jsx)("path", { d: a, fill: "currentColor" }),
});
}
let m = {
icon: (e) =>
(0, i.jsx)(h, {
...e,
path: "M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z",
}),
},
p = (0, n.factory)((e, t) => {
let {
classNames: a,
className: n,
style: o,
styles: s,
vars: d,
icon: u,
...h
} = (0, r.useProps)("PaginationDots", m, e),
p = l();
return (0, i.jsx)(c.Box, {
ref: t,
...p.getStyles("dots", {
className: n,
style: o,
styles: s,
classNames: a,
}),
...h,
children: (0, i.jsx)(u, {
style: {
width: "calc(var(--pagination-control-size) / 1.8)",
height: "calc(var(--pagination-control-size) / 1.8)",
},
}),
});
});
(p.classes = t),
(p.displayName = "@mantine/core/PaginationDots"),
e.s(["PaginationDots", () => p], 706336);
var v = e.i(963291);
function b({ icon: e, name: t, action: n, type: o }) {
let s = { icon: e },
d = (0, a.forwardRef)((e, a) => {
let { icon: d, ...c } = (0, r.useProps)(t, s, e),
h = l(),
m = "next" === o ? h.active === h.total : 1 === h.active;
return (0, i.jsx)(u, {
disabled: h.disabled || m,
ref: a,
onClick: h[n],
withPadding: !1,
...c,
children: (0, i.jsx)(d, {
className: "mantine-rotate-rtl",
style: {
width: "calc(var(--pagination-control-size) / 1.8)",
height: "calc(var(--pagination-control-size) / 1.8)",
},
}),
});
});
return (
(d.displayName = `@mantine/core/${t}`),
(0, v.createPolymorphicComponent)(d)
);
}
let g = b({
icon: (e) =>
(0, i.jsx)(h, {
...e,
path: "M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z",
}),
name: "PaginationNext",
action: "onNext",
type: "next",
}),
f = b({
icon: (e) =>
(0, i.jsx)(h, {
...e,
path: "M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z",
}),
name: "PaginationPrevious",
action: "onPrevious",
type: "previous",
}),
E = b({
icon: (e) =>
(0, i.jsx)(h, {
...e,
path: "M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",
}),
name: "PaginationFirst",
action: "onFirst",
type: "previous",
}),
w = b({
icon: (e) =>
(0, i.jsx)(h, {
...e,
path: "M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",
}),
name: "PaginationLast",
action: "onLast",
type: "next",
});
function y({ dotsIcon: e }) {
let t = l(),
a = t.range.map((a, r) =>
"dots" === a
? (0, i.jsx)(p, { icon: e }, r)
: (0, i.jsx)(
u,
{
active: a === t.active,
"aria-current": a === t.active ? "page" : void 0,
onClick: () => t.onChange(a),
disabled: t.disabled,
...t.getItemProps?.(a),
children: t.getItemProps?.(a)?.children ?? a,
},
r,
),
);
return (0, i.jsx)(i.Fragment, { children: a });
}
e.s(
[
"PaginationFirst",
() => E,
"PaginationLast",
() => w,
"PaginationNext",
() => g,
"PaginationPrevious",
() => f,
],
718883,
),
(y.displayName = "@mantine/core/PaginationItems"),
e.s(["PaginationItems", () => y], 709046);
var x = e.i(403557);
function A(e, t) {
return Array.from({ length: t - e + 1 }, (t, i) => i + e);
}
let k = "dots";
function I({
total: e,
siblings: t = 1,
boundaries: i = 1,
page: r,
initialPage: n = 1,
onChange: o,
}) {
let s = Math.max(Math.trunc(e), 0),
[l, d] = (0, x.useUncontrolled)({
value: r,
onChange: o,
defaultValue: n,
finalValue: n,
}),
u = (e) => {
e <= 0 ? d(1) : e > s ? d(s) : d(e);
};
return {
range: (0, a.useMemo)(() => {
if (2 * t + 3 + 2 * i >= s) return A(1, s);
let e = Math.max(l - t, i),
a = Math.min(l + t, s - i),
r = e > i + 2,
n = a < s - (i + 1);
if (!r && n) return [...A(1, 2 * t + i + 2), k, ...A(s - (i - 1), s)];
if (r && !n) {
let e = i + 1 + 2 * t;
return [...A(1, i), k, ...A(s - e, s)];
}
return [...A(1, i), k, ...A(e, a), k, ...A(s - i + 1, s)];
}, [s, t, l]),
active: l,
setPage: u,
next: () => u(l + 1),
previous: () => u(l - 1),
first: () => u(1),
last: () => u(s),
};
}
e.s(["usePagination", () => I], 6783);
};
export default moduleFactory;