178 lines
5.0 KiB
JavaScript
178 lines
5.0 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: 20293dbce215808d.10cf9e27a9.js
|
|
* Module id: 427574
|
|
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
|
*/
|
|
|
|
const moduleFactory = (e) => {
|
|
"use strict";
|
|
var t = e.i(462214),
|
|
n = e.i(358379),
|
|
r = e.i(948833),
|
|
o = e.i(909243),
|
|
i = e.i(855698);
|
|
e.i(7284);
|
|
var l = e.i(124859),
|
|
a = e.i(754654),
|
|
u = e.i(328316),
|
|
s = e.i(192830),
|
|
c = e.i(899789),
|
|
d = e.i(201774),
|
|
f = e.i(621600);
|
|
let m = (0, n.forwardRef)(
|
|
(
|
|
{
|
|
keepMounted: e,
|
|
opened: m,
|
|
onClose: p,
|
|
id: v,
|
|
transitionProps: g,
|
|
onExitTransitionEnd: h,
|
|
onEnterTransitionEnd: y,
|
|
trapFocus: w,
|
|
closeOnEscape: b,
|
|
returnFocus: x,
|
|
closeOnClickOutside: E,
|
|
withinPortal: S,
|
|
portalProps: C,
|
|
lockScroll: R,
|
|
children: T,
|
|
zIndex: M,
|
|
shadow: A,
|
|
padding: L,
|
|
__vars: P,
|
|
unstyled: N,
|
|
removeScrollProps: k,
|
|
...O
|
|
},
|
|
D,
|
|
) => {
|
|
let {
|
|
_id: I,
|
|
titleMounted: B,
|
|
bodyMounted: j,
|
|
shouldLockScroll: _,
|
|
setTitleMounted: F,
|
|
setBodyMounted: H,
|
|
} = (function ({
|
|
id: e,
|
|
transitionProps: t,
|
|
opened: r,
|
|
trapFocus: o,
|
|
closeOnEscape: i,
|
|
onClose: l,
|
|
returnFocus: a,
|
|
}) {
|
|
let u = (0, s.useId)(e),
|
|
[m, p] = (0, n.useState)(!1),
|
|
[v, g] = (0, n.useState)(!1),
|
|
h = (function ({ opened: e, transitionDuration: t }) {
|
|
let [r, o] = (0, n.useState)(e),
|
|
i = (0, n.useRef)(-1),
|
|
l = (0, f.useReducedMotion)() ? 0 : t;
|
|
return (
|
|
(0, n.useEffect)(
|
|
() => (
|
|
e
|
|
? (o(!0), window.clearTimeout(i.current))
|
|
: 0 === l
|
|
? o(!1)
|
|
: (i.current = window.setTimeout(() => o(!1), l)),
|
|
() => window.clearTimeout(i.current)
|
|
),
|
|
[e, l],
|
|
),
|
|
r
|
|
);
|
|
})({
|
|
opened: r,
|
|
transitionDuration:
|
|
"number" == typeof t?.duration ? t?.duration : 200,
|
|
});
|
|
return (
|
|
(0, c.useWindowEvent)(
|
|
"keydown",
|
|
(e) => {
|
|
"Escape" === e.key &&
|
|
i &&
|
|
!e.isComposing &&
|
|
r &&
|
|
e.target?.getAttribute("data-mantine-stop-propagation") !==
|
|
"true" &&
|
|
l();
|
|
},
|
|
{ capture: !0 },
|
|
),
|
|
(0, d.useFocusReturn)({ opened: r, shouldReturnFocus: o && a }),
|
|
{
|
|
_id: u,
|
|
titleMounted: m,
|
|
bodyMounted: v,
|
|
shouldLockScroll: h,
|
|
setTitleMounted: p,
|
|
setBodyMounted: g,
|
|
}
|
|
);
|
|
})({
|
|
id: v,
|
|
transitionProps: g,
|
|
opened: m,
|
|
trapFocus: w,
|
|
closeOnEscape: b,
|
|
onClose: p,
|
|
returnFocus: x,
|
|
}),
|
|
{ key: W, ...z } = k || {};
|
|
return (0, t.jsx)(a.OptionalPortal, {
|
|
...C,
|
|
withinPortal: S,
|
|
children: (0, t.jsx)(u.ModalBaseProvider, {
|
|
value: {
|
|
opened: m,
|
|
onClose: p,
|
|
closeOnClickOutside: E,
|
|
onExitTransitionEnd: h,
|
|
onEnterTransitionEnd: y,
|
|
transitionProps: { ...g, keepMounted: e },
|
|
getTitleId: () => `${I}-title`,
|
|
getBodyId: () => `${I}-body`,
|
|
titleMounted: B,
|
|
bodyMounted: j,
|
|
setTitleMounted: F,
|
|
setBodyMounted: H,
|
|
trapFocus: w,
|
|
closeOnEscape: b,
|
|
zIndex: M,
|
|
unstyled: N,
|
|
},
|
|
children: (0, t.jsx)(
|
|
r.RemoveScroll,
|
|
{
|
|
enabled: _ && R,
|
|
...z,
|
|
children: (0, t.jsx)(l.Box, {
|
|
ref: D,
|
|
...O,
|
|
__vars: {
|
|
...P,
|
|
"--mb-z-index": (
|
|
M || (0, o.getDefaultZIndex)("modal")
|
|
).toString(),
|
|
"--mb-shadow": (0, i.getShadow)(A),
|
|
"--mb-padding": (0, i.getSpacing)(L),
|
|
},
|
|
children: T,
|
|
}),
|
|
},
|
|
W,
|
|
),
|
|
}),
|
|
});
|
|
},
|
|
);
|
|
(m.displayName = "@mantine/core/ModalBase"),
|
|
e.s(["ModalBase", () => m], 427574);
|
|
};
|
|
|
|
export default moduleFactory;
|