2297 lines
70 KiB
JavaScript
2297 lines
70 KiB
JavaScript
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([
|
|
"object" == typeof document ? document.currentScript : void 0,
|
|
521527,
|
|
(e) => {
|
|
"use strict";
|
|
var t = e.i(358379);
|
|
e.i(370357);
|
|
var r = e.i(436178);
|
|
function o(e) {
|
|
if (!e) return null;
|
|
try {
|
|
return JSON.parse(e).modelKey ?? null;
|
|
} catch {
|
|
return null;
|
|
}
|
|
}
|
|
function n(e) {
|
|
let { missRemark: t } = (function (e) {
|
|
if (!e) return {};
|
|
try {
|
|
return JSON.parse(e);
|
|
} catch {
|
|
return {};
|
|
}
|
|
})(e.showContent);
|
|
return t
|
|
? { benefit: e, missRemark: t, activityEndTime: e.activityEndTime }
|
|
: null;
|
|
}
|
|
function i(e) {
|
|
return new Date(e.endTime) > new Date();
|
|
}
|
|
function a(e) {
|
|
let a = (0, r.commercialStore)((e) => e.activityBenefitList);
|
|
return (0, t.useMemo)(() => {
|
|
if (!e || !a?.length) return null;
|
|
let t = String(e),
|
|
r = Number(e),
|
|
l = !isNaN(r) && r > 0;
|
|
for (let e of a)
|
|
if (
|
|
i(e) &&
|
|
((l && e.modelVersionId === r) ||
|
|
o(e.targetParams) === t ||
|
|
String(e.targetKey) === t)
|
|
)
|
|
return n(e);
|
|
return null;
|
|
}, [e, a]);
|
|
}
|
|
function l(e) {
|
|
let a = (0, r.commercialStore)((e) => e.activityBenefitList);
|
|
return (0, t.useMemo)(() => {
|
|
let t = new Map();
|
|
if (!e?.length || !a?.length) return t;
|
|
let r = new Set(e);
|
|
for (let e of a) {
|
|
if (!i(e)) continue;
|
|
let a = n(e);
|
|
if (!a) continue;
|
|
let l = o(e.targetParams);
|
|
if (l && r.has(l) && !t.has(l)) {
|
|
t.set(l, a);
|
|
continue;
|
|
}
|
|
let s = String(e.targetKey);
|
|
r.has(s) && !t.has(s) && t.set(s, a);
|
|
}
|
|
return t;
|
|
}, [e, a]);
|
|
}
|
|
e.s([
|
|
"useActivityBenefitMatch",
|
|
() => a,
|
|
"useActivityBenefitMatchMap",
|
|
() => l,
|
|
]);
|
|
},
|
|
948390,
|
|
(e) => {
|
|
"use strict";
|
|
var t = e.i(462214),
|
|
r = e.i(358379);
|
|
function o({ match: e, onUpgrade: o }) {
|
|
let n,
|
|
i = (0, r.useCallback)(
|
|
(t) => {
|
|
t.stopPropagation(), o(e.activityEndTime);
|
|
},
|
|
[e.activityEndTime, o],
|
|
);
|
|
return (0, t.jsxs)("div", {
|
|
className: "flex flex-col gap-[2px]",
|
|
children: [
|
|
(0, t.jsxs)("div", {
|
|
className: "flex items-center gap-2",
|
|
children: [
|
|
(0, t.jsx)("span", {
|
|
className: "text-[12px] text-[#f7f7f7] leading-normal",
|
|
children: e.missRemark,
|
|
}),
|
|
(0, t.jsx)("button", {
|
|
className:
|
|
"shrink-0 h-6 px-2 rounded-lg bg-white text-[#141414] text-[11px] leading-normal cursor-pointer border-none hover:bg-white/80",
|
|
onClick: i,
|
|
children: "升级",
|
|
}),
|
|
],
|
|
}),
|
|
(0, t.jsxs)("span", {
|
|
className: "text-[12px] text-[#a8a8a8] leading-normal",
|
|
children: [
|
|
"活动截止",
|
|
((n = new Date(e.activityEndTime)),
|
|
`${n.getMonth() + 1}月${n.getDate()}日`),
|
|
],
|
|
}),
|
|
],
|
|
});
|
|
}
|
|
e.s([
|
|
"ACTIVITY_BENEFIT_TOOLTIP_OVERLAY_STYLE",
|
|
0,
|
|
{
|
|
backgroundColor: "#141414",
|
|
borderRadius: 8,
|
|
border: "0.5px solid #363636",
|
|
boxShadow: "0px 2px 6px 0px rgba(0,0,0,0.08)",
|
|
padding: 8,
|
|
},
|
|
"ActivityBenefitTooltip",
|
|
() => o,
|
|
]);
|
|
},
|
|
112671,
|
|
(e) => {
|
|
"use strict";
|
|
var t = e.i(358379);
|
|
e.i(370357);
|
|
var r = e.i(185264),
|
|
o = e.i(398470);
|
|
function n(e) {
|
|
if (e.targetParams)
|
|
try {
|
|
let t = JSON.parse(e.targetParams);
|
|
return {
|
|
modelKey: t.modelKey ?? null,
|
|
extraLabel: t.extraLabel ?? null,
|
|
};
|
|
} catch {}
|
|
return { modelKey: null, extraLabel: null };
|
|
}
|
|
function i(e) {
|
|
let i = (0, r.vipInfoStore)((e) => e.userBenefits);
|
|
return (0, t.useMemo)(() => {
|
|
if (!e || !i?.length)
|
|
return { benefitName: null, matchedBenefit: null };
|
|
let t = String(e),
|
|
r = null,
|
|
a = i.find((e) => {
|
|
let { modelKey: o, extraLabel: i } = n(e);
|
|
return o === t ? ((r = i), !0) : String(e.targetKey) === t;
|
|
});
|
|
return a
|
|
? {
|
|
benefitName: (0, o.getBenefitName)(a, r ?? void 0),
|
|
matchedBenefit: a,
|
|
}
|
|
: { benefitName: null, matchedBenefit: null };
|
|
}, [e, i]);
|
|
}
|
|
function a(e) {
|
|
let i = (0, r.vipInfoStore)((e) => e.userBenefits);
|
|
return (0, t.useMemo)(() => {
|
|
let t = new Map();
|
|
if (!e?.length || !i?.length) return t;
|
|
let r = new Set(e);
|
|
for (let e of i) {
|
|
let { modelKey: i, extraLabel: a } = n(e);
|
|
if (i && r.has(i) && !t.has(i)) {
|
|
t.set(i, (0, o.getBenefitName)(e, a ?? void 0));
|
|
continue;
|
|
}
|
|
let l = String(e.targetKey);
|
|
r.has(l) &&
|
|
!t.has(l) &&
|
|
t.set(l, (0, o.getBenefitName)(e, a ?? void 0));
|
|
}
|
|
return t;
|
|
}, [e, i]);
|
|
}
|
|
e.s(["useModelBenefitLabel", () => i, "useModelBenefitMap", () => a]);
|
|
},
|
|
320539,
|
|
(e) => {
|
|
"use strict";
|
|
var t = e.i(462214);
|
|
function r({ label: e, className: r, style: o }) {
|
|
return (0, t.jsx)("span", {
|
|
className: `bg-[#FFC65D] py-px px-2 text-[10px] rounded-full font-[500] text-[#171717] shrink-0 whitespace-nowrap ${r}`,
|
|
style: { ...o },
|
|
children: e,
|
|
});
|
|
}
|
|
e.s(["BenefitLabel", () => r]);
|
|
},
|
|
19408,
|
|
(e) => {
|
|
"use strict";
|
|
e.i(370357);
|
|
var t = e.i(436178),
|
|
r = e.i(185264),
|
|
o = e.i(963527);
|
|
let n = {
|
|
0x47868c88: 1,
|
|
0x47868c8d: 3,
|
|
0x47868c92: 5,
|
|
0x47868c94: 13,
|
|
0x47868c95: 14,
|
|
0x47868d9d: 19,
|
|
0x47868caa: 32,
|
|
0x47868c9d: 33,
|
|
0x47868c9e: 37,
|
|
0x47868d9f: 43,
|
|
0x47868da0: 44,
|
|
0x47868ca0: 45,
|
|
0x47868da1: 58,
|
|
0x47868ca2: 162,
|
|
0x47868ca3: 163,
|
|
0x47868c8a: -138,
|
|
0x47868c8b: -139,
|
|
0x47868ca4: 164,
|
|
10024: 10024,
|
|
},
|
|
i = Object.keys(n);
|
|
function a(e) {
|
|
let {
|
|
response: a,
|
|
defaultMsg: l,
|
|
billingReferer: s,
|
|
modelVersionUuid: u,
|
|
extraVipParams: d,
|
|
} = e;
|
|
if (!a.code) return !1;
|
|
let c = String(a.code),
|
|
f = t.commercialStore
|
|
.getState()
|
|
.commercialConfig?.errorCodeMap?.find((e) => e.errorCode === c);
|
|
if (!i.includes(c) && !f) return !1;
|
|
let p = s ?? f?.billingReferer ?? n[c] ?? 0,
|
|
{ vipInfo: m, teamInfo: h } = r.vipInfoStore.getState(),
|
|
v = !!m?.teamId,
|
|
g = v && !!h?.owner;
|
|
return (
|
|
(0, o.openVipModel)({
|
|
failurePrompt: [f?.title || a.msg || l || ""],
|
|
billingReferer: [p],
|
|
errorCode: c,
|
|
modelVersionUuid: u ?? void 0,
|
|
...(v && !d?.paywall
|
|
? { paywall: g ? "team" : "team-member-restricted" }
|
|
: {}),
|
|
...d,
|
|
}),
|
|
!0
|
|
);
|
|
}
|
|
function l(e) {
|
|
return i.includes(String(e));
|
|
}
|
|
function s(e) {
|
|
return n[String(e)];
|
|
}
|
|
e.s([
|
|
"COMMERCIAL_ERROR_CODES",
|
|
0,
|
|
i,
|
|
"getBaseBillingReferer",
|
|
() => s,
|
|
"handleCommercialError",
|
|
() => a,
|
|
"isCommercialErrorCode",
|
|
() => l,
|
|
]);
|
|
},
|
|
906328,
|
|
404059,
|
|
(e) => {
|
|
"use strict";
|
|
var t = e.i(462214),
|
|
r = e.i(358379),
|
|
o = e.i(403557);
|
|
function n(e, t, r) {
|
|
return void 0 === t && void 0 === r
|
|
? e
|
|
: void 0 !== t && void 0 === r
|
|
? Math.max(e, t)
|
|
: void 0 === t && void 0 !== r
|
|
? Math.min(e, r)
|
|
: Math.min(Math.max(e, t), r);
|
|
}
|
|
e.s(["clamp", () => n], 404059);
|
|
var i = e.i(600354),
|
|
a = e.i(389435),
|
|
l = e.i(855698);
|
|
function s(e, t) {
|
|
return 0 === t.length
|
|
? e
|
|
: t.reduce((t, r) => (Math.abs(r - e) < Math.abs(t - e) ? r : t));
|
|
}
|
|
var u = e.i(938202);
|
|
e.i(7284);
|
|
var d = e.i(620428),
|
|
c = e.i(479324),
|
|
f = e.i(450943),
|
|
p = e.i(593307),
|
|
m = e.i(46978);
|
|
let [h, v] = (0, e.i(559394).createSafeContext)(
|
|
"SliderProvider was not found in tree",
|
|
);
|
|
var g = {
|
|
root: "m_dd36362e",
|
|
label: "m_c9357328",
|
|
thumb: "m_c9a9a60a",
|
|
trackContainer: "m_a8645c2",
|
|
track: "m_c9ade57f",
|
|
bar: "m_38aeed47",
|
|
markWrapper: "m_b7b0423a",
|
|
mark: "m_dd33bc19",
|
|
markLabel: "m_68c77a5b",
|
|
},
|
|
x = e.i(124859);
|
|
let w = (0, r.forwardRef)(
|
|
(
|
|
{
|
|
size: e,
|
|
disabled: r,
|
|
variant: o,
|
|
color: n,
|
|
thumbSize: i,
|
|
radius: a,
|
|
...l
|
|
},
|
|
s,
|
|
) => {
|
|
let { getStyles: u } = v();
|
|
return (0, t.jsx)(x.Box, {
|
|
tabIndex: -1,
|
|
variant: o,
|
|
size: e,
|
|
ref: s,
|
|
...u("root"),
|
|
...l,
|
|
});
|
|
},
|
|
);
|
|
w.displayName = "@mantine/core/SliderRoot";
|
|
var b = e.i(764218);
|
|
let y = (0, r.forwardRef)(
|
|
(
|
|
{
|
|
max: e,
|
|
min: o,
|
|
value: n,
|
|
position: i,
|
|
label: a,
|
|
dragging: l,
|
|
onMouseDown: s,
|
|
onKeyDownCapture: u,
|
|
labelTransitionProps: d,
|
|
labelAlwaysOn: c,
|
|
thumbLabel: f,
|
|
onFocus: p,
|
|
onBlur: m,
|
|
showLabelOnHover: h,
|
|
isHovered: g,
|
|
children: w = null,
|
|
disabled: y,
|
|
},
|
|
P,
|
|
) => {
|
|
let { getStyles: R } = v(),
|
|
[C, S] = (0, r.useState)(!1),
|
|
E = c || l || C || (h && g);
|
|
return (0, t.jsxs)(x.Box, {
|
|
tabIndex: 0,
|
|
role: "slider",
|
|
"aria-label": f,
|
|
"aria-valuemax": e,
|
|
"aria-valuemin": o,
|
|
"aria-valuenow": n,
|
|
ref: P,
|
|
__vars: { "--slider-thumb-offset": `${i}%` },
|
|
...R("thumb", { focusable: !0 }),
|
|
mod: { dragging: l, disabled: y },
|
|
onFocus: (e) => {
|
|
S(!0), "function" == typeof p && p(e);
|
|
},
|
|
onBlur: (e) => {
|
|
S(!1), "function" == typeof m && m(e);
|
|
},
|
|
onTouchStart: s,
|
|
onMouseDown: s,
|
|
onKeyDownCapture: u,
|
|
onClick: (e) => e.stopPropagation(),
|
|
children: [
|
|
w,
|
|
(0, t.jsx)(b.Transition, {
|
|
mounted: null != a && !!E,
|
|
transition: "fade",
|
|
duration: 0,
|
|
...d,
|
|
children: (e) =>
|
|
(0, t.jsx)("div", { ...R("label", { style: e }), children: a }),
|
|
}),
|
|
],
|
|
});
|
|
},
|
|
);
|
|
function P({ value: e, min: t, max: r }) {
|
|
return Math.min(Math.max(((e - t) / (r - t)) * 100, 0), 100);
|
|
}
|
|
function R({
|
|
marks: e,
|
|
min: o,
|
|
max: n,
|
|
disabled: i,
|
|
value: a,
|
|
offset: l,
|
|
inverted: s,
|
|
}) {
|
|
let { getStyles: u } = v();
|
|
if (!e) return null;
|
|
let d = e.map((e, d) =>
|
|
(0, r.createElement)(
|
|
x.Box,
|
|
{
|
|
...u("markWrapper"),
|
|
__vars: {
|
|
"--mark-offset": `${P({ value: e.value, min: o, max: n })}%`,
|
|
},
|
|
key: d,
|
|
},
|
|
(0, t.jsx)(x.Box, {
|
|
...u("mark"),
|
|
mod: {
|
|
filled: (function ({
|
|
mark: e,
|
|
offset: t,
|
|
value: r,
|
|
inverted: o = !1,
|
|
}) {
|
|
return o
|
|
? ("number" == typeof t && e.value <= t) || e.value >= r
|
|
: "number" == typeof t
|
|
? e.value >= t && e.value <= r
|
|
: e.value <= r;
|
|
})({ mark: e, value: a, offset: l, inverted: s }),
|
|
disabled: i,
|
|
},
|
|
}),
|
|
e.label &&
|
|
(0, t.jsx)("div", { ...u("markLabel"), children: e.label }),
|
|
),
|
|
);
|
|
return (0, t.jsx)("div", { children: d });
|
|
}
|
|
function C({
|
|
filled: e,
|
|
children: r,
|
|
offset: o,
|
|
disabled: n,
|
|
marksOffset: i,
|
|
inverted: a,
|
|
containerProps: l,
|
|
...s
|
|
}) {
|
|
let { getStyles: u } = v();
|
|
return (0, t.jsx)(x.Box, {
|
|
...u("trackContainer"),
|
|
mod: { disabled: n },
|
|
...l,
|
|
children: (0, t.jsxs)(x.Box, {
|
|
...u("track"),
|
|
mod: { inverted: a, disabled: n },
|
|
children: [
|
|
(0, t.jsx)(x.Box, {
|
|
mod: { inverted: a, disabled: n },
|
|
__vars: {
|
|
"--slider-bar-width": `calc(${e}% + 2 * var(--slider-size))`,
|
|
"--slider-bar-offset": `calc(${o}% - var(--slider-size))`,
|
|
},
|
|
...u("bar"),
|
|
}),
|
|
r,
|
|
(0, t.jsx)(R, { ...s, offset: i, disabled: n, inverted: a }),
|
|
],
|
|
}),
|
|
});
|
|
}
|
|
function S(e, t) {
|
|
return parseFloat(e.toFixed(t));
|
|
}
|
|
function E(e, t) {
|
|
let r = [...t].sort((e, t) => e.value - t.value).find((t) => t.value > e);
|
|
return r ? r.value : e;
|
|
}
|
|
function T(e, t) {
|
|
let r = [...t].sort((e, t) => t.value - e.value).find((t) => t.value < e);
|
|
return r ? r.value : e;
|
|
}
|
|
function D(e) {
|
|
let t = [...e].sort((e, t) => e.value - t.value);
|
|
return t.length > 0 ? t[0].value : 0;
|
|
}
|
|
function M(e) {
|
|
let t = [...e].sort((e, t) => e.value - t.value);
|
|
return t.length > 0 ? t[t.length - 1].value : 100;
|
|
}
|
|
(y.displayName = "@mantine/core/SliderThumb"),
|
|
(R.displayName = "@mantine/core/SliderMarks"),
|
|
(C.displayName = "@mantine/core/SliderTrack");
|
|
let k = {
|
|
radius: "xl",
|
|
min: 0,
|
|
max: 100,
|
|
step: 1,
|
|
marks: [],
|
|
label: (e) => e,
|
|
labelTransitionProps: { transition: "fade", duration: 0 },
|
|
thumbLabel: "",
|
|
showLabelOnHover: !0,
|
|
scale: (e) => e,
|
|
size: "md",
|
|
},
|
|
j = (0, u.createVarsResolver)(
|
|
(e, { size: t, color: r, thumbSize: o, radius: n }) => ({
|
|
root: {
|
|
"--slider-size": (0, l.getSize)(t, "slider-size"),
|
|
"--slider-color": r ? (0, d.getThemeColor)(r, e) : void 0,
|
|
"--slider-radius": void 0 === n ? void 0 : (0, l.getRadius)(n),
|
|
"--slider-thumb-size":
|
|
void 0 !== o ? (0, a.rem)(o) : "calc(var(--slider-size) * 2)",
|
|
},
|
|
}),
|
|
),
|
|
N = (0, p.factory)((e, a) => {
|
|
let l = (0, c.useProps)("Slider", k, e),
|
|
{
|
|
classNames: u,
|
|
styles: d,
|
|
value: p,
|
|
onChange: v,
|
|
onChangeEnd: x,
|
|
size: b,
|
|
min: R,
|
|
max: N,
|
|
domain: O,
|
|
step: L,
|
|
precision: F,
|
|
defaultValue: B,
|
|
name: I,
|
|
marks: _,
|
|
label: A,
|
|
labelTransitionProps: z,
|
|
labelAlwaysOn: $,
|
|
thumbLabel: V,
|
|
showLabelOnHover: K,
|
|
thumbChildren: U,
|
|
disabled: Y,
|
|
unstyled: H,
|
|
scale: X,
|
|
inverted: G,
|
|
className: W,
|
|
style: Z,
|
|
vars: J,
|
|
hiddenInputProps: q,
|
|
restrictToMarks: Q,
|
|
thumbProps: ee,
|
|
attributes: et,
|
|
...er
|
|
} = l,
|
|
eo = (0, f.useStyles)({
|
|
name: "Slider",
|
|
props: l,
|
|
classes: g,
|
|
classNames: u,
|
|
className: W,
|
|
styles: d,
|
|
style: Z,
|
|
attributes: et,
|
|
vars: J,
|
|
varsResolver: j,
|
|
unstyled: H,
|
|
}),
|
|
{ dir: en } = (0, m.useDirection)(),
|
|
[ei, ea] = (0, r.useState)(!1),
|
|
[el, es] = (0, o.useUncontrolled)({
|
|
value: "number" == typeof p ? n(p, R, N) : p,
|
|
defaultValue: "number" == typeof B ? n(B, R, N) : B,
|
|
finalValue: n(0, R, N),
|
|
onChange: v,
|
|
}),
|
|
eu = (0, r.useRef)(el),
|
|
ed = (0, r.useRef)(x);
|
|
(0, r.useEffect)(() => {
|
|
ed.current = x;
|
|
}, [x]);
|
|
let ec = (0, r.useRef)(null),
|
|
ef = (0, r.useRef)(null),
|
|
[ep, em] = O || [R, N],
|
|
eh = P({ value: el, min: ep, max: em }),
|
|
ev = X(el),
|
|
eg = "function" == typeof A ? A(ev) : A,
|
|
ex =
|
|
F ??
|
|
(function (e) {
|
|
if (!e) return 0;
|
|
let t = e.toString().split(".");
|
|
return t.length > 1 ? t[1].length : 0;
|
|
})(L),
|
|
{ ref: ew, active: eb } = (function (e, t, o = "ltr") {
|
|
let i = (0, r.useRef)(!1),
|
|
a = (0, r.useRef)(!1),
|
|
l = (0, r.useRef)(0),
|
|
[s, u] = (0, r.useState)(!1),
|
|
d = (0, r.useRef)(null);
|
|
return (
|
|
(0, r.useEffect)(() => {
|
|
i.current = !0;
|
|
}, []),
|
|
{
|
|
ref: (0, r.useCallback)(
|
|
(r) => {
|
|
if ((d.current && (d.current(), (d.current = null)), !r))
|
|
return;
|
|
let s = ({ x: t, y: a }) => {
|
|
cancelAnimationFrame(l.current),
|
|
(l.current = requestAnimationFrame(() => {
|
|
if (i.current && r) {
|
|
r.style.userSelect = "none";
|
|
let i = r.getBoundingClientRect();
|
|
if (i.width && i.height) {
|
|
let r = n((t - i.left) / i.width, 0, 1);
|
|
e({
|
|
x: "ltr" === o ? r : 1 - r,
|
|
y: n((a - i.top) / i.height, 0, 1),
|
|
});
|
|
}
|
|
}
|
|
}));
|
|
},
|
|
c = () => {
|
|
!a.current &&
|
|
i.current &&
|
|
((a.current = !0),
|
|
"function" == typeof t?.onScrubStart &&
|
|
t.onScrubStart(),
|
|
u(!0),
|
|
document.addEventListener("mousemove", m),
|
|
document.addEventListener("mouseup", f),
|
|
document.addEventListener("touchmove", v, {
|
|
passive: !1,
|
|
}),
|
|
document.addEventListener("touchend", f));
|
|
},
|
|
f = () => {
|
|
a.current &&
|
|
i.current &&
|
|
((a.current = !1),
|
|
u(!1),
|
|
document.removeEventListener("mousemove", m),
|
|
document.removeEventListener("mouseup", f),
|
|
document.removeEventListener("touchmove", v),
|
|
document.removeEventListener("touchend", f),
|
|
setTimeout(() => {
|
|
"function" == typeof t?.onScrubEnd &&
|
|
t.onScrubEnd();
|
|
}, 0));
|
|
},
|
|
p = (e) => {
|
|
c(), e.preventDefault(), m(e);
|
|
},
|
|
m = (e) => s({ x: e.clientX, y: e.clientY }),
|
|
h = (e) => {
|
|
e.cancelable && e.preventDefault(), c(), v(e);
|
|
},
|
|
v = (e) => {
|
|
e.cancelable && e.preventDefault(),
|
|
s({
|
|
x: e.changedTouches[0].clientX,
|
|
y: e.changedTouches[0].clientY,
|
|
});
|
|
};
|
|
r.addEventListener("mousedown", p),
|
|
r.addEventListener("touchstart", h, { passive: !1 }),
|
|
(d.current = () => {
|
|
r.removeEventListener("mousedown", p),
|
|
r.removeEventListener("touchstart", h);
|
|
});
|
|
},
|
|
[o, e],
|
|
),
|
|
active: s,
|
|
}
|
|
);
|
|
})(
|
|
(0, r.useCallback)(
|
|
({ x: e }) => {
|
|
if (!Y) {
|
|
let t = n(
|
|
(function ({
|
|
value: e,
|
|
containerWidth: t,
|
|
min: r,
|
|
max: o,
|
|
step: n,
|
|
precision: i,
|
|
}) {
|
|
let a =
|
|
(t ? Math.min(Math.max(e, 0), t) / t : e) * (o - r),
|
|
l = Math.max(
|
|
(0 !== a ? Math.round(a / n) * n : 0) + r,
|
|
r,
|
|
);
|
|
return void 0 !== i ? Number(l.toFixed(i)) : l;
|
|
})({ value: e, min: ep, max: em, step: L, precision: ex }),
|
|
R,
|
|
N,
|
|
);
|
|
es(
|
|
Q && _?.length
|
|
? s(
|
|
t,
|
|
_.map((e) => e.value),
|
|
)
|
|
: t,
|
|
),
|
|
(eu.current = t);
|
|
}
|
|
},
|
|
[Y, R, N, ep, em, L, ex, es, _, Q],
|
|
),
|
|
{
|
|
onScrubEnd: (0, r.useCallback)(() => {
|
|
if (!Y && ed.current) {
|
|
let e =
|
|
Q && _?.length
|
|
? s(
|
|
eu.current,
|
|
_.map((e) => e.value),
|
|
)
|
|
: eu.current;
|
|
ed.current(e);
|
|
}
|
|
}, [Y, _, Q]),
|
|
},
|
|
en,
|
|
),
|
|
ey = (0, r.useCallback)(
|
|
(e) => {
|
|
!Y && ed.current && ed.current(e);
|
|
},
|
|
[Y],
|
|
);
|
|
return (0, t.jsx)(h, {
|
|
value: { getStyles: eo },
|
|
children: (0, t.jsxs)(w, {
|
|
...er,
|
|
ref: (0, i.useMergedRef)(a, ec),
|
|
onKeyDownCapture: (e) => {
|
|
if (!Y)
|
|
switch (e.key) {
|
|
case "ArrowUp": {
|
|
if ((e.preventDefault(), ef.current?.focus(), Q && _)) {
|
|
let e = E(el, _);
|
|
es(e), ey(e);
|
|
break;
|
|
}
|
|
let t = S(Math.min(Math.max(el + L, R), N), ex);
|
|
es(t), ey(t);
|
|
break;
|
|
}
|
|
case "ArrowRight": {
|
|
if ((e.preventDefault(), ef.current?.focus(), Q && _)) {
|
|
let e = "rtl" === en ? T(el, _) : E(el, _);
|
|
es(e), ey(e);
|
|
break;
|
|
}
|
|
let t = S(
|
|
Math.min(Math.max("rtl" === en ? el - L : el + L, R), N),
|
|
ex,
|
|
);
|
|
es(t), ey(t);
|
|
break;
|
|
}
|
|
case "ArrowDown": {
|
|
if ((e.preventDefault(), ef.current?.focus(), Q && _)) {
|
|
let e = T(el, _);
|
|
es(e), ey(e);
|
|
break;
|
|
}
|
|
let t = S(Math.min(Math.max(el - L, R), N), ex);
|
|
es(t), ey(t);
|
|
break;
|
|
}
|
|
case "ArrowLeft": {
|
|
if ((e.preventDefault(), ef.current?.focus(), Q && _)) {
|
|
let e = "rtl" === en ? E(el, _) : T(el, _);
|
|
es(e), ey(e);
|
|
break;
|
|
}
|
|
let t = S(
|
|
Math.min(Math.max("rtl" === en ? el + L : el - L, R), N),
|
|
ex,
|
|
);
|
|
es(t), ey(t);
|
|
break;
|
|
}
|
|
case "Home":
|
|
if ((e.preventDefault(), ef.current?.focus(), Q && _)) {
|
|
es(D(_)), ey(D(_));
|
|
break;
|
|
}
|
|
es(R), ey(R);
|
|
break;
|
|
case "End":
|
|
if ((e.preventDefault(), ef.current?.focus(), Q && _)) {
|
|
es(M(_)), ey(M(_));
|
|
break;
|
|
}
|
|
es(N), ey(N);
|
|
}
|
|
},
|
|
onMouseDownCapture: () => ec.current?.focus(),
|
|
size: b,
|
|
disabled: Y,
|
|
children: [
|
|
(0, t.jsx)(C, {
|
|
inverted: G,
|
|
offset: 0,
|
|
filled: eh,
|
|
marks: _,
|
|
min: ep,
|
|
max: em,
|
|
value: ev,
|
|
disabled: Y,
|
|
containerProps: {
|
|
ref: ew,
|
|
onMouseEnter: K ? () => ea(!0) : void 0,
|
|
onMouseLeave: K ? () => ea(!1) : void 0,
|
|
},
|
|
children: (0, t.jsx)(y, {
|
|
max: em,
|
|
min: ep,
|
|
value: ev,
|
|
position: eh,
|
|
dragging: eb,
|
|
label: eg,
|
|
ref: ef,
|
|
labelTransitionProps: z,
|
|
labelAlwaysOn: $,
|
|
thumbLabel: V,
|
|
showLabelOnHover: K,
|
|
isHovered: ei,
|
|
disabled: Y,
|
|
...ee,
|
|
children: U,
|
|
}),
|
|
}),
|
|
(0, t.jsx)("input", { type: "hidden", name: I, value: ev, ...q }),
|
|
],
|
|
}),
|
|
});
|
|
});
|
|
(N.classes = g),
|
|
(N.displayName = "@mantine/core/Slider"),
|
|
e.s(["Slider", () => N], 906328);
|
|
},
|
|
141460,
|
|
(e) => {
|
|
"use strict";
|
|
var t = e.i(358379);
|
|
function r(e) {
|
|
let r = t.default.version;
|
|
return "string" != typeof t.default.version || r.startsWith("18.")
|
|
? e?.ref
|
|
: e?.props?.ref;
|
|
}
|
|
e.s(["getRefProp", () => r]);
|
|
},
|
|
487101,
|
|
(e) => {
|
|
"use strict";
|
|
var t = e.i(462214),
|
|
r = e.i(358379);
|
|
e.i(7284);
|
|
var o = e.i(46978);
|
|
function n(e, t, r, o) {
|
|
return "center" === e || "center" === o
|
|
? { top: t }
|
|
: "end" === e
|
|
? { bottom: r }
|
|
: "start" === e
|
|
? { top: r }
|
|
: {};
|
|
}
|
|
function i(e, t, r, o, n) {
|
|
return "center" === e || "center" === o
|
|
? { left: t }
|
|
: "end" === e
|
|
? { ["ltr" === n ? "right" : "left"]: r }
|
|
: "start" === e
|
|
? { ["ltr" === n ? "left" : "right"]: r }
|
|
: {};
|
|
}
|
|
let a = {
|
|
bottom: "borderTopLeftRadius",
|
|
left: "borderTopRightRadius",
|
|
right: "borderBottomLeftRadius",
|
|
top: "borderBottomRightRadius",
|
|
},
|
|
l = (0, r.forwardRef)(
|
|
(
|
|
{
|
|
position: e,
|
|
arrowSize: r,
|
|
arrowOffset: l,
|
|
arrowRadius: s,
|
|
arrowPosition: u,
|
|
visible: d,
|
|
arrowX: c,
|
|
arrowY: f,
|
|
style: p,
|
|
...m
|
|
},
|
|
h,
|
|
) => {
|
|
let { dir: v } = (0, o.useDirection)();
|
|
return d
|
|
? (0, t.jsx)("div", {
|
|
...m,
|
|
ref: h,
|
|
style: {
|
|
...p,
|
|
...(function ({
|
|
position: e,
|
|
arrowSize: t,
|
|
arrowOffset: r,
|
|
arrowRadius: o,
|
|
arrowPosition: l,
|
|
arrowX: s,
|
|
arrowY: u,
|
|
dir: d,
|
|
}) {
|
|
let [c, f = "center"] = e.split("-"),
|
|
p = {
|
|
width: t,
|
|
height: t,
|
|
transform: "rotate(45deg)",
|
|
position: "absolute",
|
|
[a[c]]: o,
|
|
},
|
|
m = -t / 2;
|
|
return "left" === c
|
|
? {
|
|
...p,
|
|
...n(f, u, r, l),
|
|
right: m,
|
|
borderLeftColor: "transparent",
|
|
borderBottomColor: "transparent",
|
|
clipPath: "polygon(100% 0, 0 0, 100% 100%)",
|
|
}
|
|
: "right" === c
|
|
? {
|
|
...p,
|
|
...n(f, u, r, l),
|
|
left: m,
|
|
borderRightColor: "transparent",
|
|
borderTopColor: "transparent",
|
|
clipPath: "polygon(0 100%, 0 0, 100% 100%)",
|
|
}
|
|
: "top" === c
|
|
? {
|
|
...p,
|
|
...i(f, s, r, l, d),
|
|
bottom: m,
|
|
borderTopColor: "transparent",
|
|
borderLeftColor: "transparent",
|
|
clipPath: "polygon(0 100%, 100% 100%, 100% 0)",
|
|
}
|
|
: "bottom" === c
|
|
? {
|
|
...p,
|
|
...i(f, s, r, l, d),
|
|
top: m,
|
|
borderBottomColor: "transparent",
|
|
borderRightColor: "transparent",
|
|
clipPath: "polygon(0 100%, 0 0, 100% 0)",
|
|
}
|
|
: {};
|
|
})({
|
|
position: e,
|
|
arrowSize: r,
|
|
arrowOffset: l,
|
|
arrowRadius: s,
|
|
arrowPosition: u,
|
|
dir: v,
|
|
arrowX: c,
|
|
arrowY: f,
|
|
}),
|
|
},
|
|
})
|
|
: null;
|
|
},
|
|
);
|
|
(l.displayName = "@mantine/core/FloatingArrow"),
|
|
e.s(["FloatingArrow", () => l], 487101);
|
|
},
|
|
981933,
|
|
(e) => {
|
|
"use strict";
|
|
function t(e, t) {
|
|
if ("rtl" === e && (t.includes("right") || t.includes("left"))) {
|
|
let [e, r] = t.split("-"),
|
|
o = "right" === e ? "left" : "right";
|
|
return void 0 === r ? o : `${o}-${r}`;
|
|
}
|
|
return t;
|
|
}
|
|
e.s(["getFloatingPosition", () => t]);
|
|
},
|
|
510161,
|
|
819151,
|
|
(e) => {
|
|
"use strict";
|
|
var t = e.i(462214),
|
|
r = e.i(358379),
|
|
o = e.i(7284),
|
|
n = e.i(600354),
|
|
i = e.i(909243),
|
|
a = e.i(855698),
|
|
l = e.i(141460),
|
|
s = e.i(142385),
|
|
u = e.i(938202),
|
|
d = e.i(479324),
|
|
c = e.i(450943),
|
|
f = e.i(124859),
|
|
p = e.i(593307),
|
|
m = e.i(46978),
|
|
h = e.i(487101),
|
|
v = e.i(981933),
|
|
g = e.i(754654),
|
|
x = e.i(764218);
|
|
let w = { duration: 100, transition: "fade" };
|
|
function b(e, t) {
|
|
return { ...w, ...t, ...e };
|
|
}
|
|
var y = { tooltip: "m_1b3c8819", arrow: "m_f898399f" },
|
|
P = e.i(620428),
|
|
R = e.i(830744);
|
|
function C(e, t) {
|
|
return Array.isArray(e)
|
|
? [...e].reduce((e, r) => ({ ...e, ...C(r, t) }), {})
|
|
: "function" == typeof e
|
|
? e(t)
|
|
: null == e
|
|
? {}
|
|
: e;
|
|
}
|
|
e.s(["getStyleObject", () => C], 819151);
|
|
var S = e.i(800109),
|
|
E = e.i(520466),
|
|
T = e.i(888659);
|
|
let D = {
|
|
refProp: "ref",
|
|
withinPortal: !0,
|
|
offset: 10,
|
|
position: "right",
|
|
zIndex: (0, i.getDefaultZIndex)("popover"),
|
|
},
|
|
M = (0, u.createVarsResolver)((e, { radius: t, color: r }) => ({
|
|
tooltip: {
|
|
"--tooltip-radius": void 0 === t ? void 0 : (0, a.getRadius)(t),
|
|
"--tooltip-bg": r ? (0, P.getThemeColor)(r, e) : void 0,
|
|
"--tooltip-color": r ? "var(--mantine-color-white)" : void 0,
|
|
},
|
|
})),
|
|
k = (0, p.factory)((e, o) => {
|
|
let i = (0, d.useProps)("TooltipFloating", D, e),
|
|
{
|
|
children: a,
|
|
refProp: u,
|
|
withinPortal: p,
|
|
style: m,
|
|
className: h,
|
|
classNames: v,
|
|
styles: x,
|
|
unstyled: w,
|
|
radius: b,
|
|
color: P,
|
|
label: k,
|
|
offset: j,
|
|
position: N,
|
|
multiline: O,
|
|
zIndex: L,
|
|
disabled: F,
|
|
defaultOpened: B,
|
|
variant: I,
|
|
vars: _,
|
|
portalProps: A,
|
|
attributes: z,
|
|
...$
|
|
} = i,
|
|
V = (0, R.useMantineTheme)(),
|
|
K = (0, c.useStyles)({
|
|
name: "TooltipFloating",
|
|
props: i,
|
|
classes: y,
|
|
className: h,
|
|
style: m,
|
|
classNames: v,
|
|
styles: x,
|
|
unstyled: w,
|
|
attributes: z,
|
|
rootSelector: "tooltip",
|
|
vars: _,
|
|
varsResolver: M,
|
|
}),
|
|
{
|
|
handleMouseMove: U,
|
|
x: Y,
|
|
y: H,
|
|
opened: X,
|
|
boundaryRef: G,
|
|
floating: W,
|
|
setOpened: Z,
|
|
} = (function ({ offset: e, position: t, defaultOpened: o }) {
|
|
let [n, i] = (0, r.useState)(o),
|
|
a = (0, r.useRef)(null),
|
|
{
|
|
x: l,
|
|
y: s,
|
|
elements: u,
|
|
refs: d,
|
|
update: c,
|
|
placement: f,
|
|
} = (0, S.useFloating)({
|
|
placement: t,
|
|
middleware: [
|
|
(0, E.shift)({
|
|
crossAxis: !0,
|
|
padding: 5,
|
|
rootBoundary: "document",
|
|
}),
|
|
],
|
|
}),
|
|
p = f.includes("right") ? e : t.includes("left") ? -1 * e : 0,
|
|
m = f.includes("bottom") ? e : t.includes("top") ? -1 * e : 0,
|
|
h = (0, r.useCallback)(
|
|
({ clientX: e, clientY: t }) => {
|
|
d.setPositionReference({
|
|
getBoundingClientRect: () => ({
|
|
width: 0,
|
|
height: 0,
|
|
x: e,
|
|
y: t,
|
|
left: e + p,
|
|
top: t + m,
|
|
right: e,
|
|
bottom: t,
|
|
}),
|
|
});
|
|
},
|
|
[u.reference],
|
|
);
|
|
return (
|
|
(0, r.useEffect)(() => {
|
|
if (d.floating.current) {
|
|
let e = a.current;
|
|
e.addEventListener("mousemove", h);
|
|
let t = (0, T.getOverflowAncestors)(d.floating.current);
|
|
return (
|
|
t.forEach((e) => {
|
|
e.addEventListener("scroll", c);
|
|
}),
|
|
() => {
|
|
e.removeEventListener("mousemove", h),
|
|
t.forEach((e) => {
|
|
e.removeEventListener("scroll", c);
|
|
});
|
|
}
|
|
);
|
|
}
|
|
}, [u.reference, d.floating.current, c, h, n]),
|
|
{
|
|
handleMouseMove: h,
|
|
x: l,
|
|
y: s,
|
|
opened: n,
|
|
setOpened: i,
|
|
boundaryRef: a,
|
|
floating: d.setFloating,
|
|
}
|
|
);
|
|
})({ offset: j, position: N, defaultOpened: B }),
|
|
J = (0, s.getSingleElementChild)(a);
|
|
if (!J)
|
|
throw Error(
|
|
"[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported",
|
|
);
|
|
let q = (0, n.useMergedRef)(G, (0, l.getRefProp)(J), o),
|
|
Q = J.props;
|
|
return (0, t.jsxs)(t.Fragment, {
|
|
children: [
|
|
(0, t.jsx)(g.OptionalPortal, {
|
|
...A,
|
|
withinPortal: p,
|
|
children: (0, t.jsx)(f.Box, {
|
|
...$,
|
|
...K("tooltip", {
|
|
style: {
|
|
...C(m, V),
|
|
zIndex: L,
|
|
display: !F && X ? "block" : "none",
|
|
top: (H && Math.round(H)) ?? "",
|
|
left: (Y && Math.round(Y)) ?? "",
|
|
},
|
|
}),
|
|
variant: I,
|
|
ref: W,
|
|
mod: { multiline: O },
|
|
children: k,
|
|
}),
|
|
}),
|
|
(0, r.cloneElement)(J, {
|
|
...Q,
|
|
[u]: q,
|
|
onMouseEnter: (e) => {
|
|
Q.onMouseEnter?.(e), U(e), Z(!0);
|
|
},
|
|
onMouseLeave: (e) => {
|
|
Q.onMouseLeave?.(e), Z(!1);
|
|
},
|
|
}),
|
|
],
|
|
});
|
|
});
|
|
(k.classes = y), (k.displayName = "@mantine/core/TooltipFloating");
|
|
let j = (0, r.createContext)(!1),
|
|
N = j.Provider,
|
|
O = { openDelay: 0, closeDelay: 0 };
|
|
function L(e) {
|
|
let {
|
|
openDelay: r,
|
|
closeDelay: o,
|
|
children: n,
|
|
} = (0, d.useProps)("TooltipGroup", O, e);
|
|
return (0, t.jsx)(N, {
|
|
value: !0,
|
|
children: (0, t.jsx)(S.FloatingDelayGroup, {
|
|
delay: { open: r, close: o },
|
|
children: n,
|
|
}),
|
|
});
|
|
}
|
|
(L.displayName = "@mantine/core/TooltipGroup"), (L.extend = (e) => e);
|
|
var F = e.i(641712),
|
|
B = e.i(192830),
|
|
I = e.i(361752);
|
|
let _ = {
|
|
position: "top",
|
|
refProp: "ref",
|
|
withinPortal: !0,
|
|
arrowSize: 4,
|
|
arrowOffset: 5,
|
|
arrowRadius: 0,
|
|
arrowPosition: "side",
|
|
offset: 5,
|
|
transitionProps: { duration: 100, transition: "fade" },
|
|
events: { hover: !0, focus: !1, touch: !1 },
|
|
zIndex: (0, i.getDefaultZIndex)("popover"),
|
|
positionDependencies: [],
|
|
middlewares: { flip: !0, shift: !0, inline: !1 },
|
|
},
|
|
A = (0, u.createVarsResolver)(
|
|
(e, { radius: t, color: r, variant: o, autoContrast: n }) => {
|
|
let i = e.variantColorResolver({
|
|
theme: e,
|
|
color: r || e.primaryColor,
|
|
autoContrast: n,
|
|
variant: o || "filled",
|
|
});
|
|
return {
|
|
tooltip: {
|
|
"--tooltip-radius": void 0 === t ? void 0 : (0, a.getRadius)(t),
|
|
"--tooltip-bg": r ? i.background : void 0,
|
|
"--tooltip-color": r ? i.color : void 0,
|
|
},
|
|
};
|
|
},
|
|
),
|
|
z = (0, p.factory)((e, i) => {
|
|
let a = (0, d.useProps)("Tooltip", _, e),
|
|
{
|
|
children: u,
|
|
position: p,
|
|
refProp: w,
|
|
label: P,
|
|
openDelay: R,
|
|
closeDelay: C,
|
|
onPositionChange: T,
|
|
opened: D,
|
|
defaultOpened: M,
|
|
withinPortal: k,
|
|
radius: N,
|
|
color: O,
|
|
classNames: L,
|
|
styles: z,
|
|
unstyled: $,
|
|
style: V,
|
|
className: K,
|
|
withArrow: U,
|
|
arrowSize: Y,
|
|
arrowOffset: H,
|
|
arrowRadius: X,
|
|
arrowPosition: G,
|
|
offset: W,
|
|
transitionProps: Z,
|
|
multiline: J,
|
|
events: q,
|
|
zIndex: Q,
|
|
disabled: ee,
|
|
positionDependencies: et,
|
|
onClick: er,
|
|
onMouseEnter: eo,
|
|
onMouseLeave: en,
|
|
inline: ei,
|
|
variant: ea,
|
|
keepMounted: el,
|
|
vars: es,
|
|
portalProps: eu,
|
|
mod: ed,
|
|
floatingStrategy: ec,
|
|
middlewares: ef,
|
|
autoContrast: ep,
|
|
attributes: em,
|
|
target: eh,
|
|
...ev
|
|
} = (0, d.useProps)("Tooltip", _, a),
|
|
{ dir: eg } = (0, m.useDirection)(),
|
|
ex = (0, r.useRef)(null),
|
|
ew = (function (e) {
|
|
let t,
|
|
o,
|
|
[n, i] = (0, r.useState)(e.defaultOpened),
|
|
a = "boolean" == typeof e.opened ? e.opened : n,
|
|
l = (0, r.useContext)(j),
|
|
s = (0, B.useId)(),
|
|
u = (0, r.useCallback)(
|
|
(e) => {
|
|
i(e), e && w(s);
|
|
},
|
|
[s],
|
|
),
|
|
{
|
|
x: d,
|
|
y: c,
|
|
context: f,
|
|
refs: p,
|
|
placement: m,
|
|
middlewareData: { arrow: { x: h, y: v } = {} },
|
|
} = (0, S.useFloating)({
|
|
strategy: e.strategy,
|
|
placement: e.position,
|
|
open: a,
|
|
onOpenChange: u,
|
|
middleware:
|
|
((t = (function (e) {
|
|
if (void 0 === e) return { shift: !0, flip: !0 };
|
|
let t = { ...e };
|
|
return (
|
|
void 0 === e.shift && (t.shift = !0),
|
|
void 0 === e.flip && (t.flip = !0),
|
|
t
|
|
);
|
|
})(e.middlewares)),
|
|
(o = [(0, E.offset)(e.offset)]),
|
|
t.shift &&
|
|
o.push(
|
|
(0, E.shift)(
|
|
"boolean" == typeof t.shift
|
|
? { padding: 8 }
|
|
: { padding: 8, ...t.shift },
|
|
),
|
|
),
|
|
t.flip &&
|
|
o.push(
|
|
"boolean" == typeof t.flip
|
|
? (0, E.flip)()
|
|
: (0, E.flip)(t.flip),
|
|
),
|
|
o.push(
|
|
(0, E.arrow)({
|
|
element: e.arrowRef,
|
|
padding: e.arrowOffset,
|
|
}),
|
|
),
|
|
t.inline
|
|
? o.push(
|
|
"boolean" == typeof t.inline
|
|
? (0, E.inline)()
|
|
: (0, E.inline)(t.inline),
|
|
)
|
|
: e.inline && o.push((0, E.inline)()),
|
|
o),
|
|
whileElementsMounted: F.autoUpdate,
|
|
}),
|
|
{
|
|
delay: g,
|
|
currentId: x,
|
|
setCurrentId: w,
|
|
} = (0, S.useDelayGroup)(f, { id: s }),
|
|
{ getReferenceProps: b, getFloatingProps: y } = (0,
|
|
S.useInteractions)([
|
|
(0, S.useHover)(f, {
|
|
enabled: e.events?.hover,
|
|
delay: l ? g : { open: e.openDelay, close: e.closeDelay },
|
|
mouseOnly: !e.events?.touch,
|
|
}),
|
|
(0, S.useFocus)(f, {
|
|
enabled: e.events?.focus,
|
|
visibleOnly: !0,
|
|
}),
|
|
(0, S.useRole)(f, { role: "tooltip" }),
|
|
(0, S.useDismiss)(f, { enabled: void 0 === e.opened }),
|
|
]);
|
|
(0, I.useDidUpdate)(() => {
|
|
e.onPositionChange?.(m);
|
|
}, [m]);
|
|
let P = a && x && x !== s;
|
|
return {
|
|
x: d,
|
|
y: c,
|
|
arrowX: h,
|
|
arrowY: v,
|
|
reference: p.setReference,
|
|
floating: p.setFloating,
|
|
getFloatingProps: y,
|
|
getReferenceProps: b,
|
|
isGroupPhase: P,
|
|
opened: a,
|
|
placement: m,
|
|
};
|
|
})({
|
|
position: (0, v.getFloatingPosition)(eg, p),
|
|
closeDelay: C,
|
|
openDelay: R,
|
|
onPositionChange: T,
|
|
opened: D,
|
|
defaultOpened: M,
|
|
events: q,
|
|
arrowRef: ex,
|
|
arrowOffset: H,
|
|
offset: "number" == typeof W ? W + (U ? Y / 2 : 0) : W,
|
|
positionDependencies: [...et, eh ?? u],
|
|
inline: ei,
|
|
strategy: ec,
|
|
middlewares: ef,
|
|
});
|
|
(0, r.useEffect)(() => {
|
|
let e =
|
|
eh instanceof HTMLElement
|
|
? eh
|
|
: "string" == typeof eh
|
|
? document.querySelector(eh)
|
|
: eh?.current || null;
|
|
e && ew.reference(e);
|
|
}, [eh, ew]);
|
|
let eb = (0, c.useStyles)({
|
|
name: "Tooltip",
|
|
props: a,
|
|
classes: y,
|
|
className: K,
|
|
style: V,
|
|
classNames: L,
|
|
styles: z,
|
|
unstyled: $,
|
|
attributes: em,
|
|
rootSelector: "tooltip",
|
|
vars: es,
|
|
varsResolver: A,
|
|
}),
|
|
ey = (0, s.getSingleElementChild)(u);
|
|
if (!eh && !ey) return null;
|
|
if (eh) {
|
|
let e = b(Z, { duration: 100, transition: "fade" });
|
|
return (0, t.jsx)(t.Fragment, {
|
|
children: (0, t.jsx)(g.OptionalPortal, {
|
|
...eu,
|
|
withinPortal: k,
|
|
children: (0, t.jsx)(x.Transition, {
|
|
...e,
|
|
keepMounted: el,
|
|
mounted: !ee && !!ew.opened,
|
|
duration: ew.isGroupPhase ? 10 : e.duration,
|
|
children: (e) =>
|
|
(0, t.jsxs)(f.Box, {
|
|
...ev,
|
|
"data-fixed": "fixed" === ec || void 0,
|
|
variant: ea,
|
|
mod: [{ multiline: J }, ed],
|
|
...ew.getFloatingProps({
|
|
ref: ew.floating,
|
|
className: eb("tooltip").className,
|
|
style: {
|
|
...eb("tooltip").style,
|
|
...e,
|
|
zIndex: Q,
|
|
top: ew.y ?? 0,
|
|
left: ew.x ?? 0,
|
|
},
|
|
}),
|
|
children: [
|
|
P,
|
|
(0, t.jsx)(h.FloatingArrow, {
|
|
ref: ex,
|
|
arrowX: ew.arrowX,
|
|
arrowY: ew.arrowY,
|
|
visible: U,
|
|
position: ew.placement,
|
|
arrowSize: Y,
|
|
arrowOffset: H,
|
|
arrowRadius: X,
|
|
arrowPosition: G,
|
|
...eb("arrow"),
|
|
}),
|
|
],
|
|
}),
|
|
}),
|
|
}),
|
|
});
|
|
}
|
|
let eP = ey.props,
|
|
eR = (0, n.useMergedRef)(ew.reference, (0, l.getRefProp)(ey), i),
|
|
eC = b(Z, { duration: 100, transition: "fade" });
|
|
return (0, t.jsxs)(t.Fragment, {
|
|
children: [
|
|
(0, t.jsx)(g.OptionalPortal, {
|
|
...eu,
|
|
withinPortal: k,
|
|
children: (0, t.jsx)(x.Transition, {
|
|
...eC,
|
|
keepMounted: el,
|
|
mounted: !ee && !!ew.opened,
|
|
duration: ew.isGroupPhase ? 10 : eC.duration,
|
|
children: (e) =>
|
|
(0, t.jsxs)(f.Box, {
|
|
...ev,
|
|
"data-fixed": "fixed" === ec || void 0,
|
|
variant: ea,
|
|
mod: [{ multiline: J }, ed],
|
|
...ew.getFloatingProps({
|
|
ref: ew.floating,
|
|
className: eb("tooltip").className,
|
|
style: {
|
|
...eb("tooltip").style,
|
|
...e,
|
|
zIndex: Q,
|
|
top: ew.y ?? 0,
|
|
left: ew.x ?? 0,
|
|
},
|
|
}),
|
|
children: [
|
|
P,
|
|
(0, t.jsx)(h.FloatingArrow, {
|
|
ref: ex,
|
|
arrowX: ew.arrowX,
|
|
arrowY: ew.arrowY,
|
|
visible: U,
|
|
position: ew.placement,
|
|
arrowSize: Y,
|
|
arrowOffset: H,
|
|
arrowRadius: X,
|
|
arrowPosition: G,
|
|
...eb("arrow"),
|
|
}),
|
|
],
|
|
}),
|
|
}),
|
|
}),
|
|
(0, r.cloneElement)(
|
|
ey,
|
|
ew.getReferenceProps({
|
|
onClick: er,
|
|
onMouseEnter: eo,
|
|
onMouseLeave: en,
|
|
onMouseMove: a.onMouseMove,
|
|
onPointerDown: a.onPointerDown,
|
|
onPointerEnter: a.onPointerEnter,
|
|
...eP,
|
|
className: (0, o.default)(K, eP.className),
|
|
[w]: eR,
|
|
}),
|
|
),
|
|
],
|
|
});
|
|
});
|
|
(z.classes = y),
|
|
(z.displayName = "@mantine/core/Tooltip"),
|
|
(z.Floating = k),
|
|
(z.Group = L),
|
|
e.s(["Tooltip", () => z], 510161);
|
|
},
|
|
983912,
|
|
(e) => {
|
|
"use strict";
|
|
var t = e.i(358379);
|
|
let r = ["mousedown", "touchstart"];
|
|
function o(e, o, n) {
|
|
let i = (0, t.useRef)(null),
|
|
a = o || r;
|
|
return (
|
|
(0, t.useEffect)(() => {
|
|
let t = (t) => {
|
|
let { target: r } = t ?? {};
|
|
if (Array.isArray(n)) {
|
|
let o = !document.body.contains(r) && r?.tagName !== "HTML";
|
|
n.every((e) => !!e && !t.composedPath().includes(e)) &&
|
|
!o &&
|
|
e(t);
|
|
} else i.current && !i.current.contains(r) && e(t);
|
|
};
|
|
return (
|
|
a.forEach((e) => document.addEventListener(e, t)),
|
|
() => {
|
|
a.forEach((e) => document.removeEventListener(e, t));
|
|
}
|
|
);
|
|
}, [i, e, n]),
|
|
i
|
|
);
|
|
}
|
|
e.s(["useClickOutside", () => o]);
|
|
},
|
|
657102,
|
|
615528,
|
|
668818,
|
|
(e) => {
|
|
"use strict";
|
|
e.i(358379);
|
|
var t = e.i(559394);
|
|
e.i(462214), e.i(7284);
|
|
let [r, o] = (0, t.createSafeContext)(
|
|
"Popover component was not found in the tree",
|
|
);
|
|
e.s(
|
|
["PopoverContextProvider", () => r, "usePopoverContext", () => o],
|
|
657102,
|
|
);
|
|
var n = {
|
|
dropdown: "m_38a85659",
|
|
arrow: "m_a31dc6c1",
|
|
overlay: "m_3d7bc908",
|
|
};
|
|
e.s(["default", () => n], 615528);
|
|
var i = e.i(507945);
|
|
function a(e, t = { active: !0 }) {
|
|
return "function" == typeof e && t.active
|
|
? (r) => {
|
|
"Escape" === r.key && (e(r), t.onTrigger?.());
|
|
}
|
|
: t.onKeyDown || i.noop;
|
|
}
|
|
e.s(["closeOnEscape", () => a], 668818);
|
|
},
|
|
205697,
|
|
(e) => {
|
|
"use strict";
|
|
var t = e.i(462214),
|
|
r = e.i(201774),
|
|
o = e.i(600354),
|
|
n = e.i(389435);
|
|
e.i(358379);
|
|
var i = e.i(668818);
|
|
e.i(7284);
|
|
var a = e.i(479324),
|
|
l = e.i(124859),
|
|
s = e.i(593307),
|
|
u = e.i(487101),
|
|
d = e.i(395089),
|
|
c = e.i(754654),
|
|
f = e.i(764218),
|
|
p = e.i(657102),
|
|
m = e.i(615528);
|
|
let h = (0, s.factory)((e, s) => {
|
|
let m = (0, a.useProps)("PopoverDropdown", null, e),
|
|
{
|
|
className: h,
|
|
style: v,
|
|
vars: g,
|
|
children: x,
|
|
onKeyDownCapture: w,
|
|
variant: b,
|
|
classNames: y,
|
|
styles: P,
|
|
...R
|
|
} = m,
|
|
C = (0, p.usePopoverContext)(),
|
|
S = (0, r.useFocusReturn)({
|
|
opened: C.opened,
|
|
shouldReturnFocus: C.returnFocus,
|
|
}),
|
|
E = C.withRoles
|
|
? {
|
|
"aria-labelledby": C.getTargetId(),
|
|
id: C.getDropdownId(),
|
|
role: "dialog",
|
|
tabIndex: -1,
|
|
}
|
|
: {},
|
|
T = (0, o.useMergedRef)(s, C.floating);
|
|
return C.disabled
|
|
? null
|
|
: (0, t.jsx)(c.OptionalPortal, {
|
|
...C.portalProps,
|
|
withinPortal: C.withinPortal,
|
|
children: (0, t.jsx)(f.Transition, {
|
|
mounted: C.opened,
|
|
...C.transitionProps,
|
|
transition: C.transitionProps?.transition || "fade",
|
|
duration: C.transitionProps?.duration ?? 150,
|
|
keepMounted: C.keepMounted,
|
|
exitDuration:
|
|
"number" == typeof C.transitionProps?.exitDuration
|
|
? C.transitionProps.exitDuration
|
|
: C.transitionProps?.duration,
|
|
children: (e) =>
|
|
(0, t.jsx)(d.FocusTrap, {
|
|
active: C.trapFocus && C.opened,
|
|
innerRef: T,
|
|
children: (0, t.jsxs)(l.Box, {
|
|
...E,
|
|
...R,
|
|
variant: b,
|
|
onKeyDownCapture: (0, i.closeOnEscape)(
|
|
() => {
|
|
C.onClose?.(), C.onDismiss?.();
|
|
},
|
|
{ active: C.closeOnEscape, onTrigger: S, onKeyDown: w },
|
|
),
|
|
"data-position": C.placement,
|
|
"data-fixed": "fixed" === C.floatingStrategy || void 0,
|
|
...C.getStyles("dropdown", {
|
|
className: h,
|
|
props: m,
|
|
classNames: y,
|
|
styles: P,
|
|
style: [
|
|
{
|
|
...e,
|
|
zIndex: C.zIndex,
|
|
top: C.y ?? 0,
|
|
left: C.x ?? 0,
|
|
width:
|
|
"target" === C.width ? void 0 : (0, n.rem)(C.width),
|
|
...(C.referenceHidden ? { display: "none" } : null),
|
|
},
|
|
C.resolvedStyles.dropdown,
|
|
P?.dropdown,
|
|
v,
|
|
],
|
|
}),
|
|
children: [
|
|
x,
|
|
(0, t.jsx)(u.FloatingArrow, {
|
|
ref: C.arrowRef,
|
|
arrowX: C.arrowX,
|
|
arrowY: C.arrowY,
|
|
visible: C.withArrow,
|
|
position: C.placement,
|
|
arrowSize: C.arrowSize,
|
|
arrowRadius: C.arrowRadius,
|
|
arrowOffset: C.arrowOffset,
|
|
arrowPosition: C.arrowPosition,
|
|
...C.getStyles("arrow", {
|
|
props: m,
|
|
classNames: y,
|
|
styles: P,
|
|
}),
|
|
}),
|
|
],
|
|
}),
|
|
}),
|
|
}),
|
|
});
|
|
});
|
|
(h.classes = m.default),
|
|
(h.displayName = "@mantine/core/PopoverDropdown"),
|
|
e.s(["PopoverDropdown", () => h]);
|
|
},
|
|
529833,
|
|
(e) => {
|
|
"use strict";
|
|
var t = e.i(462214),
|
|
r = e.i(358379),
|
|
o = e.i(192830),
|
|
n = e.i(983912),
|
|
i = e.i(909243),
|
|
a = e.i(855698),
|
|
l = e.i(938202),
|
|
s = e.i(7284),
|
|
u = e.i(759455),
|
|
d = e.i(450943),
|
|
c = e.i(978459),
|
|
f = e.i(479324),
|
|
p = e.i(46978),
|
|
m = e.i(981933),
|
|
h = e.i(433923),
|
|
v = e.i(754654),
|
|
g = e.i(764218),
|
|
x = e.i(657102),
|
|
w = e.i(615528),
|
|
b = e.i(205697),
|
|
y = e.i(600354),
|
|
P = e.i(141460),
|
|
R = e.i(142385),
|
|
C = e.i(593307);
|
|
let S = { refProp: "ref", popupType: "dialog" },
|
|
E = (0, C.factory)((e, t) => {
|
|
let {
|
|
children: o,
|
|
refProp: n,
|
|
popupType: i,
|
|
...a
|
|
} = (0, f.useProps)("PopoverTarget", S, e),
|
|
l = (0, R.getSingleElementChild)(o);
|
|
if (!l)
|
|
throw Error(
|
|
"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported",
|
|
);
|
|
let u = (0, x.usePopoverContext)(),
|
|
d = (0, y.useMergedRef)(u.reference, (0, P.getRefProp)(l), t),
|
|
c = u.withRoles
|
|
? {
|
|
"aria-haspopup": i,
|
|
"aria-expanded": u.opened,
|
|
"aria-controls": u.opened ? u.getDropdownId() : void 0,
|
|
id: u.getTargetId(),
|
|
}
|
|
: {},
|
|
p = l.props;
|
|
return (0, r.cloneElement)(l, {
|
|
...a,
|
|
...c,
|
|
...u.targetProps,
|
|
className: (0, s.default)(
|
|
u.targetProps.className,
|
|
a.className,
|
|
p.className,
|
|
),
|
|
[n]: d,
|
|
...(!u.controlled
|
|
? {
|
|
onClick: () => {
|
|
u.onToggle(), p.onClick?.();
|
|
},
|
|
}
|
|
: null),
|
|
});
|
|
});
|
|
E.displayName = "@mantine/core/PopoverTarget";
|
|
var T = e.i(800109),
|
|
D = e.i(641712),
|
|
M = e.i(520466),
|
|
k = e.i(403557),
|
|
j = e.i(361752),
|
|
N = e.i(883787);
|
|
let O = {
|
|
position: "bottom",
|
|
offset: 8,
|
|
positionDependencies: [],
|
|
transitionProps: { transition: "fade", duration: 150 },
|
|
middlewares: { flip: !0, shift: !0, inline: !1 },
|
|
arrowSize: 7,
|
|
arrowOffset: 5,
|
|
arrowRadius: 0,
|
|
arrowPosition: "side",
|
|
closeOnClickOutside: !0,
|
|
withinPortal: !0,
|
|
closeOnEscape: !0,
|
|
trapFocus: !1,
|
|
withRoles: !0,
|
|
returnFocus: !1,
|
|
withOverlay: !1,
|
|
hideDetached: !0,
|
|
clickOutsideEvents: ["mousedown", "touchstart"],
|
|
zIndex: (0, i.getDefaultZIndex)("popover"),
|
|
__staticSelector: "Popover",
|
|
width: "max-content",
|
|
},
|
|
L = (0, l.createVarsResolver)((e, { radius: t, shadow: r }) => ({
|
|
dropdown: {
|
|
"--popover-radius": void 0 === t ? void 0 : (0, a.getRadius)(t),
|
|
"--popover-shadow": (0, a.getShadow)(r),
|
|
},
|
|
}));
|
|
function F(e) {
|
|
let i = (0, f.useProps)("Popover", O, e),
|
|
{
|
|
children: a,
|
|
position: l,
|
|
offset: s,
|
|
onPositionChange: b,
|
|
positionDependencies: y,
|
|
opened: P,
|
|
transitionProps: R,
|
|
onExitTransitionEnd: C,
|
|
onEnterTransitionEnd: S,
|
|
width: E,
|
|
middlewares: F,
|
|
withArrow: B,
|
|
arrowSize: I,
|
|
arrowOffset: _,
|
|
arrowRadius: A,
|
|
arrowPosition: z,
|
|
unstyled: $,
|
|
classNames: V,
|
|
styles: K,
|
|
closeOnClickOutside: U,
|
|
withinPortal: Y,
|
|
portalProps: H,
|
|
closeOnEscape: X,
|
|
clickOutsideEvents: G,
|
|
trapFocus: W,
|
|
onClose: Z,
|
|
onDismiss: J,
|
|
onOpen: q,
|
|
onChange: Q,
|
|
zIndex: ee,
|
|
radius: et,
|
|
shadow: er,
|
|
id: eo,
|
|
defaultOpened: en,
|
|
__staticSelector: ei,
|
|
withRoles: ea,
|
|
disabled: el,
|
|
returnFocus: es,
|
|
variant: eu,
|
|
keepMounted: ed,
|
|
vars: ec,
|
|
floatingStrategy: ef,
|
|
withOverlay: ep,
|
|
overlayProps: em,
|
|
hideDetached: eh,
|
|
attributes: ev,
|
|
preventPositionChangeWhenVisible: eg,
|
|
...ex
|
|
} = i,
|
|
ew = (0, d.useStyles)({
|
|
name: ei,
|
|
props: i,
|
|
classes: w.default,
|
|
classNames: V,
|
|
styles: K,
|
|
unstyled: $,
|
|
attributes: ev,
|
|
rootSelector: "dropdown",
|
|
vars: ec,
|
|
varsResolver: L,
|
|
}),
|
|
{ resolvedStyles: eb } = (0, u.useResolvedStylesApi)({
|
|
classNames: V,
|
|
styles: K,
|
|
props: i,
|
|
}),
|
|
[ey, eP] = (0, r.useState)(P ?? en ?? !1),
|
|
eR = (0, r.useRef)(l),
|
|
eC = (0, r.useRef)(null),
|
|
[eS, eE] = (0, r.useState)(null),
|
|
[eT, eD] = (0, r.useState)(null),
|
|
{ dir: eM } = (0, p.useDirection)(),
|
|
ek = (0, c.useMantineEnv)(),
|
|
ej = (0, o.useId)(eo),
|
|
eN = (function (e) {
|
|
var t;
|
|
let o,
|
|
n,
|
|
i = (0, c.useMantineEnv)(),
|
|
[a, l] = (0, k.useUncontrolled)({
|
|
value: e.opened,
|
|
defaultValue: e.defaultOpened,
|
|
finalValue: !1,
|
|
onChange: e.onChange,
|
|
}),
|
|
s = (0, r.useRef)(a),
|
|
u = (0, T.useFloating)({
|
|
strategy: e.strategy,
|
|
placement: e.preventPositionChangeWhenVisible
|
|
? e.positionRef.current
|
|
: e.position,
|
|
middleware:
|
|
((t = () => u),
|
|
(o = (function (e) {
|
|
if (void 0 === e) return { shift: !0, flip: !0 };
|
|
let t = { ...e };
|
|
return (
|
|
void 0 === e.shift && (t.shift = !0),
|
|
void 0 === e.flip && (t.flip = !0),
|
|
t
|
|
);
|
|
})(e.middlewares)),
|
|
(n = [(0, M.offset)(e.offset), (0, M.hide)()]),
|
|
e.dropdownVisible &&
|
|
"test" !== i &&
|
|
e.preventPositionChangeWhenVisible &&
|
|
(o.flip = !1),
|
|
o.flip &&
|
|
n.push(
|
|
"boolean" == typeof o.flip
|
|
? (0, M.flip)()
|
|
: (0, M.flip)(o.flip),
|
|
),
|
|
o.shift &&
|
|
n.push(
|
|
(0, M.shift)(
|
|
"boolean" == typeof o.shift
|
|
? { limiter: (0, M.limitShift)(), padding: 5 }
|
|
: {
|
|
limiter: (0, M.limitShift)(),
|
|
padding: 5,
|
|
...o.shift,
|
|
},
|
|
),
|
|
),
|
|
o.inline &&
|
|
n.push(
|
|
"boolean" == typeof o.inline
|
|
? (0, M.inline)()
|
|
: (0, M.inline)(o.inline),
|
|
),
|
|
n.push(
|
|
(0, M.arrow)({ element: e.arrowRef, padding: e.arrowOffset }),
|
|
),
|
|
(o.size || "target" === e.width) &&
|
|
n.push(
|
|
(0, M.size)({
|
|
...("boolean" == typeof o.size ? {} : o.size),
|
|
apply({
|
|
rects: r,
|
|
availableWidth: n,
|
|
availableHeight: i,
|
|
...a
|
|
}) {
|
|
let l = t(),
|
|
s = l.refs.floating.current?.style ?? {};
|
|
o.size &&
|
|
("object" == typeof o.size && o.size.apply
|
|
? o.size.apply({
|
|
rects: r,
|
|
availableWidth: n,
|
|
availableHeight: i,
|
|
...a,
|
|
})
|
|
: Object.assign(s, {
|
|
maxWidth: `${n}px`,
|
|
maxHeight: `${i}px`,
|
|
})),
|
|
"target" === e.width &&
|
|
Object.assign(s, {
|
|
width: `${r.reference.width}px`,
|
|
});
|
|
},
|
|
}),
|
|
),
|
|
n),
|
|
whileElementsMounted: e.keepMounted ? void 0 : D.autoUpdate,
|
|
});
|
|
return (
|
|
(0, r.useEffect)(() => {
|
|
if (u.refs.reference.current && u.refs.floating.current && a)
|
|
return (0, D.autoUpdate)(
|
|
u.refs.reference.current,
|
|
u.refs.floating.current,
|
|
u.update,
|
|
);
|
|
}, [a, u.update]),
|
|
(0, j.useDidUpdate)(() => {
|
|
e.onPositionChange?.(u.placement),
|
|
(e.positionRef.current = u.placement);
|
|
}, [u.placement, e.preventPositionChangeWhenVisible]),
|
|
(0, j.useDidUpdate)(() => {
|
|
a !== s.current && (a ? e.onOpen?.() : e.onClose?.()),
|
|
(s.current = a);
|
|
}, [a, e.onClose, e.onOpen]),
|
|
(0, N.useIsomorphicEffect)(() => {
|
|
let t = -1;
|
|
return (
|
|
a && (t = window.setTimeout(() => e.setDropdownVisible(!0), 4)),
|
|
() => {
|
|
window.clearTimeout(t);
|
|
}
|
|
);
|
|
}, [a, e.position]),
|
|
{
|
|
floating: u,
|
|
controlled: "boolean" == typeof e.opened,
|
|
opened: a,
|
|
onClose: () => {
|
|
a && !e.disabled && l(!1);
|
|
},
|
|
onToggle: () => {
|
|
e.disabled || l(!a);
|
|
},
|
|
}
|
|
);
|
|
})({
|
|
middlewares: F,
|
|
width: E,
|
|
position: (0, m.getFloatingPosition)(eM, l),
|
|
offset: "number" == typeof s ? s + (B ? I / 2 : 0) : s,
|
|
arrowRef: eC,
|
|
arrowOffset: _,
|
|
onPositionChange: b,
|
|
positionDependencies: y,
|
|
opened: P,
|
|
defaultOpened: en,
|
|
onChange: Q,
|
|
onOpen: q,
|
|
onClose: Z,
|
|
onDismiss: J,
|
|
strategy: ef,
|
|
dropdownVisible: ey,
|
|
setDropdownVisible: eP,
|
|
positionRef: eR,
|
|
disabled: el,
|
|
preventPositionChangeWhenVisible: eg,
|
|
keepMounted: ed,
|
|
});
|
|
(0, n.useClickOutside)(
|
|
() => {
|
|
U && (eN.onClose(), J?.());
|
|
},
|
|
G,
|
|
[eS, eT],
|
|
);
|
|
let eO = (0, r.useCallback)(
|
|
(e) => {
|
|
eE(e), eN.floating.refs.setReference(e);
|
|
},
|
|
[eN.floating.refs.setReference],
|
|
),
|
|
eL = (0, r.useCallback)(
|
|
(e) => {
|
|
eD(e), eN.floating.refs.setFloating(e);
|
|
},
|
|
[eN.floating.refs.setFloating],
|
|
),
|
|
eF = (0, r.useCallback)(() => {
|
|
R?.onExited?.(), C?.(), eP(!1), eg || (eR.current = l);
|
|
}, [R?.onExited, C, eg, l]),
|
|
eB = (0, r.useCallback)(() => {
|
|
R?.onEntered?.(), S?.();
|
|
}, [R?.onEntered, S]);
|
|
return (0, t.jsxs)(x.PopoverContextProvider, {
|
|
value: {
|
|
returnFocus: es,
|
|
disabled: el,
|
|
controlled: eN.controlled,
|
|
reference: eO,
|
|
floating: eL,
|
|
x: eN.floating.x,
|
|
y: eN.floating.y,
|
|
arrowX: eN.floating?.middlewareData?.arrow?.x,
|
|
arrowY: eN.floating?.middlewareData?.arrow?.y,
|
|
opened: eN.opened,
|
|
arrowRef: eC,
|
|
transitionProps: { ...R, onExited: eF, onEntered: eB },
|
|
width: E,
|
|
withArrow: B,
|
|
arrowSize: I,
|
|
arrowOffset: _,
|
|
arrowRadius: A,
|
|
arrowPosition: z,
|
|
placement: eN.floating.placement,
|
|
trapFocus: W,
|
|
withinPortal: Y,
|
|
portalProps: H,
|
|
zIndex: ee,
|
|
radius: et,
|
|
shadow: er,
|
|
closeOnEscape: X,
|
|
onDismiss: J,
|
|
onClose: eN.onClose,
|
|
onToggle: eN.onToggle,
|
|
getTargetId: () => `${ej}-target`,
|
|
getDropdownId: () => `${ej}-dropdown`,
|
|
withRoles: ea,
|
|
targetProps: ex,
|
|
__staticSelector: ei,
|
|
classNames: V,
|
|
styles: K,
|
|
unstyled: $,
|
|
variant: eu,
|
|
keepMounted: ed,
|
|
getStyles: ew,
|
|
resolvedStyles: eb,
|
|
floatingStrategy: ef,
|
|
referenceHidden:
|
|
!!eh &&
|
|
"test" !== ek &&
|
|
eN.floating.middlewareData.hide?.referenceHidden,
|
|
},
|
|
children: [
|
|
a,
|
|
ep &&
|
|
(0, t.jsx)(g.Transition, {
|
|
transition: "fade",
|
|
mounted: eN.opened,
|
|
duration: R?.duration || 250,
|
|
exitDuration: R?.exitDuration || 250,
|
|
children: (e) =>
|
|
(0, t.jsx)(v.OptionalPortal, {
|
|
withinPortal: Y,
|
|
children: (0, t.jsx)(h.Overlay, {
|
|
...em,
|
|
...ew("overlay", {
|
|
className: em?.className,
|
|
style: [e, em?.style],
|
|
}),
|
|
}),
|
|
}),
|
|
}),
|
|
],
|
|
});
|
|
}
|
|
(F.Target = E),
|
|
(F.Dropdown = b.PopoverDropdown),
|
|
(F.displayName = "@mantine/core/Popover"),
|
|
(F.extend = (e) => e),
|
|
e.s(["Popover", () => F], 529833);
|
|
},
|
|
264589,
|
|
(e) => {
|
|
"use strict";
|
|
function t(e, t) {
|
|
return (r) => {
|
|
e?.(r), t?.(r);
|
|
};
|
|
}
|
|
e.s(["createEventHandler", () => t]);
|
|
},
|
|
398470,
|
|
(e) => {
|
|
"use strict";
|
|
e.i(693602);
|
|
var t = e.i(612735);
|
|
function r(e, t) {
|
|
return (
|
|
!e?.length ||
|
|
(!!t &&
|
|
e.some((e) =>
|
|
Object.entries(e).every(([e, r]) => {
|
|
let o = t[e];
|
|
return "string" == typeof o && "string" == typeof r
|
|
? o.toLowerCase() === r.toLowerCase()
|
|
: o === r;
|
|
}),
|
|
))
|
|
);
|
|
}
|
|
e.s([
|
|
"getBenefitName",
|
|
0,
|
|
(e, r) => {
|
|
let { benefitType: o, benefitValue: n, freeTimes: i } = e,
|
|
{ totalTimes: a, usedTimes: l } = i || {},
|
|
s = r ?? "";
|
|
switch (o) {
|
|
case "powerZero":
|
|
return `${s}免积分`;
|
|
case "powerDiscount":
|
|
case "powerDiscountTimes":
|
|
return `${s}积分${(0, t.formatDiscountNumber)(n)}折`;
|
|
case "freeTimes":
|
|
case "freeRunTimes":
|
|
return `${s}限免${a - (l ?? 0)}次`;
|
|
default:
|
|
return `未知权益:${o}`;
|
|
}
|
|
},
|
|
"matchBenefitRules",
|
|
() => r,
|
|
]);
|
|
},
|
|
]);
|