fansunited-widgets-cdn 0.0.86-RC4 → 0.0.86-RC5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/{Alert-DuMXT9be.js → Alert-B6o66mYo.js} +39 -39
- package/chunks/{CardContent-COgjZl3_.js → CardContent-NCZhfGcZ.js} +16 -16
- package/chunks/{Snackbar-DJz-WddP.js → ChevronRight-1pLZ7T0v.js} +100 -94
- package/chunks/{ClassicQuizWrapper-C7svf4eh.js → ClassicQuizWrapper-n2epPO4k.js} +201 -205
- package/chunks/CollectLeadForm-C_3plJtn-Dr8J3eDw.js +3918 -0
- package/chunks/{CollectLeadWrapper-DACvBsa_.js → CollectLeadWrapper-CCtTZAxL.js} +55 -56
- package/chunks/EitherOrById-ClGwMK0b.js +6820 -0
- package/chunks/EitherOrPreviewWrapper-BYiKyYwi.js +46 -0
- package/chunks/Error-BurPfBJw-DWYn31sK.js +1119 -0
- package/chunks/{EventGameWrapper-DmjaKr3I.js → EventGameWrapper-BphusLTk.js} +208 -219
- package/chunks/{Grid-BbegUe2J.js → Grid-yjqNNhEx.js} +32 -32
- package/chunks/{IconButton-zh1RLwcE.js → IconButton-D7onwgY0.js} +22 -22
- package/chunks/{List-CA3L6bUS.js → List-8Vy9IZiv.js} +26 -29
- package/chunks/{MatchPredictionContainer-CmHKsJ_z.js → MatchPredictionContainer-BGytBwLo.js} +52 -54
- package/chunks/{MatchQuizWrapper-BxHHl4a5.js → MatchQuizWrapper-BGjldBpF.js} +73 -85
- package/chunks/{OverlayLeadAfterCollection-DnqztPJ5-CJnicIes.js → OverlayLeadAfterCollection-Bjh1xAB5-DgVOuSX5.js} +104 -105
- package/chunks/{OverlayScoreStateSkeleton-C9FUhcnd-CZ7cct30.js → OverlayScoreStateSkeleton-Cha5KeNi-fyZTu-l5.js} +18 -19
- package/chunks/{PersonalityQuizWrapper-B-Rkzvc0.js → PersonalityQuizWrapper-BgLFw5tM.js} +3 -3
- package/chunks/{PlayerOfTheMatch-CzGMT1jr.js → PlayerOfTheMatch-CImBLG3T.js} +1008 -609
- package/chunks/{PollWrapper-Cdl3AbXE.js → PollWrapper-QpIKCCVF.js} +30 -34
- package/chunks/Portal-DegkUXpU-ByGP9zS1.js +19236 -0
- package/chunks/{PreviewQuizById-CPiwewW_.js → PreviewQuizById-Ba6yhxKV.js} +11 -14
- package/chunks/Sheet-U5EnSrgg.js +282 -0
- package/chunks/{Stack-BBjT-MoB.js → Stack-DbDi7kPO.js} +30 -30
- package/chunks/Tabs-leN3Fb8D--YMyy3EM.js +783 -0
- package/chunks/{TeamNextMatchPrediction-BOOGeVEv.js → TeamNextMatchPrediction-9VSQOCcC.js} +2 -2
- package/chunks/Tutorial-CRJLOovs.js +1072 -0
- package/chunks/createLucideIcon-CMWOQsDL.js +381 -0
- package/chunks/{createSvgIcon-cOpRx8M1.js → createSvgIcon-D9D4a1R9.js} +412 -390
- package/chunks/default-quiz-bg-ADjjIfPj.js +126 -0
- package/chunks/{index-CNAE4RYY.js → index-0ADq_9jd.js} +1 -1
- package/chunks/{index-D9kNvflO.js → index-B74jHeYm.js} +2 -2
- package/chunks/{index-Dr-yGqo_.js → index-BfVvJg5R.js} +1 -1
- package/chunks/{index-D3wDyWq_.js → index-BycLbIYY.js} +1 -1
- package/chunks/{index-BKyd0MUt.js → index-C6KAc5B_.js} +1 -1
- package/chunks/{index-BkU2GDR4.js → index-CHV6tlpH.js} +5 -5
- package/chunks/{index-Uv42o9aR.js → index-CILd3yUc.js} +1 -1
- package/chunks/index-CJqcqbHq.js +5 -0
- package/chunks/{index-DrlzgjUf.js → index-CK2RXrJm.js} +1 -1
- package/chunks/{index-DFXrZaoM.js → index-CPTAlr_t.js} +1 -1
- package/chunks/{index-D1SEUyHT.js → index-CiB_Gqim.js} +1 -1
- package/chunks/{index-CNukXTLi.js → index-CvGJXa6l.js} +1 -1
- package/chunks/{index-CpFMxpj1.js → index-CviTG4Nv.js} +1 -1
- package/chunks/index-DUQ2LFod-Cw45tHim.js +4510 -0
- package/chunks/{index-DbZ10tsY.js → index-Da0AXb_O.js} +1 -1
- package/chunks/{index-CiI_vSMR.js → index-DwR4J2nN.js} +1 -1
- package/chunks/{index-CMhbRdLz.js → index-UwW9niUj.js} +1 -1
- package/chunks/index.es-wHqA4PHm.js +11480 -0
- package/chunks/{init-DYY4CJtu.js → init-C-gCorsh.js} +1 -1
- package/chunks/{main-NO9IQFuY.js → main-Bh6iw92_.js} +94 -110
- package/chunks/{Button-DJj0KOh3.js → resolveProps-Bgg0H6c2.js} +471 -313
- package/chunks/{users-C-6eqEb6.js → users-CXdzg3DM.js} +1 -1
- package/fu-widgets.es.js +2 -2
- package/fu-widgets.iife.js +310 -257
- package/manifest.json +56 -72
- package/package.json +1 -1
- package/chunks/AspectRatio-CKWgGwn-.js +0 -125
- package/chunks/Avatar-Cv70g9HX.js +0 -186
- package/chunks/Card-BDn3dk3E.js +0 -129
- package/chunks/ChevronRight-BwGivLSL.js +0 -11
- package/chunks/Chip-BkY7Uww3.js +0 -281
- package/chunks/CollectLeadForm-DtmR2Vuf-DvAoHDnn.js +0 -1560
- package/chunks/DialogActions-CuXgjeCi.js +0 -45
- package/chunks/DialogContent-CyQJ8yz-.js +0 -60
- package/chunks/EitherOrById-B8v0nJmv.js +0 -1496
- package/chunks/EitherOrPreviewWrapper-C9O6TEVe.js +0 -47
- package/chunks/Error-DhQL89pn-DD0O1kEt.js +0 -418
- package/chunks/Link-Cw8ci6QQ.js +0 -228
- package/chunks/ListItemDecorator-DwvO_ty1.js +0 -1882
- package/chunks/ModalDialog-DLPhSR9-.js +0 -619
- package/chunks/NotFoundSkeleton-BYJTzYJR-JURKfNZv.js +0 -2764
- package/chunks/Portal-BWqqFvVm-pvatNKfM.js +0 -12717
- package/chunks/Portal-BsATdUrC.js +0 -41
- package/chunks/Select-Cewujqtd.js +0 -3418
- package/chunks/Sheet-B8wNvQTa.js +0 -167
- package/chunks/Tabs-BP1RMTCA.js +0 -784
- package/chunks/Tutorial-B1LWDD9l.js +0 -427
- package/chunks/createLucideIcon-nPUeaUEe.js +0 -79
- package/chunks/createSvgIcon-DhITitgm.js +0 -119
- package/chunks/default-quiz-bg-CTzaADn7.js +0 -4
- package/chunks/getReactElementRef-66jU_By9.js +0 -25
- package/chunks/index-BPH9IX2Q.js +0 -5
- package/chunks/index.es-BZbN3xaq.js +0 -6162
- package/chunks/resolveProps-BfYZubfk.js +0 -37
- package/chunks/variantColorInheritance-DVZ9CGcB.js +0 -28
|
@@ -0,0 +1,1072 @@
|
|
|
1
|
+
import { r as i, m as q, j as l, U as re, W as ne, _ as v, v as xe, g as Q, d as X, e as Z, f as ee, h as V, s as A, w as ge, k as te, V as ae, i as L, x as J, u as ve, B as ye } from "./main-Bh6iw92_.js";
|
|
2
|
+
import { d as Ce, A as Ee } from "./default-quiz-bg-ADjjIfPj.js";
|
|
3
|
+
import { o as W, g as be, u as se, c as K } from "./createSvgIcon-D9D4a1R9.js";
|
|
4
|
+
import { S as ie } from "./Stack-DbDi7kPO.js";
|
|
5
|
+
import { i as Re, S as Me, C as le, B as U, T as _ } from "./resolveProps-Bgg0H6c2.js";
|
|
6
|
+
import { C as Te } from "./CardContent-NCZhfGcZ.js";
|
|
7
|
+
import { r as Se } from "./index-CJqcqbHq.js";
|
|
8
|
+
import { G as de } from "./Grid-yjqNNhEx.js";
|
|
9
|
+
function ce(...t) {
|
|
10
|
+
return t.reduce((e, r) => r == null ? e : function(...s) {
|
|
11
|
+
e.apply(this, s), r.apply(this, s);
|
|
12
|
+
}, () => {
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function oe(t) {
|
|
16
|
+
return W(t).defaultView || window;
|
|
17
|
+
}
|
|
18
|
+
function ke(t) {
|
|
19
|
+
const e = t.documentElement.clientWidth;
|
|
20
|
+
return Math.abs(window.innerWidth - e);
|
|
21
|
+
}
|
|
22
|
+
const Ie = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
|
|
23
|
+
function we(t) {
|
|
24
|
+
const e = parseInt(t.getAttribute("tabindex") || "", 10);
|
|
25
|
+
return Number.isNaN(e) ? t.contentEditable === "true" || (t.nodeName === "AUDIO" || t.nodeName === "VIDEO" || t.nodeName === "DETAILS") && t.getAttribute("tabindex") === null ? 0 : t.tabIndex : e;
|
|
26
|
+
}
|
|
27
|
+
function Pe(t) {
|
|
28
|
+
if (t.tagName !== "INPUT" || t.type !== "radio" || !t.name)
|
|
29
|
+
return !1;
|
|
30
|
+
const e = (o) => t.ownerDocument.querySelector(`input[type="radio"]${o}`);
|
|
31
|
+
let r = e(`[name="${t.name}"]:checked`);
|
|
32
|
+
return r || (r = e(`[name="${t.name}"]`)), r !== t;
|
|
33
|
+
}
|
|
34
|
+
function je(t) {
|
|
35
|
+
return !(t.disabled || t.tagName === "INPUT" && t.type === "hidden" || Pe(t));
|
|
36
|
+
}
|
|
37
|
+
function De(t) {
|
|
38
|
+
const e = [], r = [];
|
|
39
|
+
return Array.from(t.querySelectorAll(Ie)).forEach((o, s) => {
|
|
40
|
+
const n = we(o);
|
|
41
|
+
n === -1 || !je(o) || (n === 0 ? e.push(o) : r.push({
|
|
42
|
+
documentOrder: s,
|
|
43
|
+
tabIndex: n,
|
|
44
|
+
node: o
|
|
45
|
+
}));
|
|
46
|
+
}), r.sort((o, s) => o.tabIndex === s.tabIndex ? o.documentOrder - s.documentOrder : o.tabIndex - s.tabIndex).map((o) => o.node).concat(e);
|
|
47
|
+
}
|
|
48
|
+
function Oe() {
|
|
49
|
+
return !0;
|
|
50
|
+
}
|
|
51
|
+
function ze(t) {
|
|
52
|
+
const {
|
|
53
|
+
children: e,
|
|
54
|
+
disableAutoFocus: r = !1,
|
|
55
|
+
disableEnforceFocus: o = !1,
|
|
56
|
+
disableRestoreFocus: s = !1,
|
|
57
|
+
getTabbable: n = De,
|
|
58
|
+
isEnabled: a = Oe,
|
|
59
|
+
open: d
|
|
60
|
+
} = t, c = i.useRef(!1), m = i.useRef(null), f = i.useRef(null), h = i.useRef(null), C = i.useRef(null), y = i.useRef(!1), p = i.useRef(null), T = q(be(e), p), I = i.useRef(null);
|
|
61
|
+
i.useEffect(() => {
|
|
62
|
+
!d || !p.current || (y.current = !r);
|
|
63
|
+
}, [r, d]), i.useEffect(() => {
|
|
64
|
+
if (!d || !p.current)
|
|
65
|
+
return;
|
|
66
|
+
const u = W(p.current);
|
|
67
|
+
return p.current.contains(u.activeElement) || (p.current.hasAttribute("tabIndex") || p.current.setAttribute("tabIndex", "-1"), y.current && p.current.focus()), () => {
|
|
68
|
+
s || (h.current && h.current.focus && (c.current = !0, h.current.focus()), h.current = null);
|
|
69
|
+
};
|
|
70
|
+
}, [d]), i.useEffect(() => {
|
|
71
|
+
if (!d || !p.current)
|
|
72
|
+
return;
|
|
73
|
+
const u = W(p.current), E = (M) => {
|
|
74
|
+
I.current = M, !(o || !a() || M.key !== "Tab") && u.activeElement === p.current && M.shiftKey && (c.current = !0, f.current && f.current.focus());
|
|
75
|
+
}, R = () => {
|
|
76
|
+
const M = p.current;
|
|
77
|
+
if (M === null)
|
|
78
|
+
return;
|
|
79
|
+
if (!u.hasFocus() || !a() || c.current) {
|
|
80
|
+
c.current = !1;
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (M.contains(u.activeElement) || o && u.activeElement !== m.current && u.activeElement !== f.current)
|
|
84
|
+
return;
|
|
85
|
+
if (u.activeElement !== C.current)
|
|
86
|
+
C.current = null;
|
|
87
|
+
else if (C.current !== null)
|
|
88
|
+
return;
|
|
89
|
+
if (!y.current)
|
|
90
|
+
return;
|
|
91
|
+
let S = [];
|
|
92
|
+
if ((u.activeElement === m.current || u.activeElement === f.current) && (S = n(p.current)), S.length > 0) {
|
|
93
|
+
var O, x;
|
|
94
|
+
const j = !!((O = I.current) != null && O.shiftKey && ((x = I.current) == null ? void 0 : x.key) === "Tab"), k = S[0], z = S[S.length - 1];
|
|
95
|
+
typeof k != "string" && typeof z != "string" && (j ? z.focus() : k.focus());
|
|
96
|
+
} else
|
|
97
|
+
M.focus();
|
|
98
|
+
};
|
|
99
|
+
u.addEventListener("focusin", R), u.addEventListener("keydown", E, !0);
|
|
100
|
+
const P = setInterval(() => {
|
|
101
|
+
u.activeElement && u.activeElement.tagName === "BODY" && R();
|
|
102
|
+
}, 50);
|
|
103
|
+
return () => {
|
|
104
|
+
clearInterval(P), u.removeEventListener("focusin", R), u.removeEventListener("keydown", E, !0);
|
|
105
|
+
};
|
|
106
|
+
}, [r, o, s, a, d, n]);
|
|
107
|
+
const D = (u) => {
|
|
108
|
+
h.current === null && (h.current = u.relatedTarget), y.current = !0, C.current = u.target;
|
|
109
|
+
const E = e.props.onFocus;
|
|
110
|
+
E && E(u);
|
|
111
|
+
}, w = (u) => {
|
|
112
|
+
h.current === null && (h.current = u.relatedTarget), y.current = !0;
|
|
113
|
+
};
|
|
114
|
+
return /* @__PURE__ */ l.jsxs(i.Fragment, {
|
|
115
|
+
children: [/* @__PURE__ */ l.jsx("div", {
|
|
116
|
+
tabIndex: d ? 0 : -1,
|
|
117
|
+
onFocus: w,
|
|
118
|
+
ref: m,
|
|
119
|
+
"data-testid": "sentinelStart"
|
|
120
|
+
}), /* @__PURE__ */ i.cloneElement(e, {
|
|
121
|
+
ref: T,
|
|
122
|
+
onFocus: D
|
|
123
|
+
}), /* @__PURE__ */ l.jsx("div", {
|
|
124
|
+
tabIndex: d ? 0 : -1,
|
|
125
|
+
onFocus: w,
|
|
126
|
+
ref: f,
|
|
127
|
+
"data-testid": "sentinelEnd"
|
|
128
|
+
})]
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function Ne(t) {
|
|
132
|
+
return typeof t == "function" ? t() : t;
|
|
133
|
+
}
|
|
134
|
+
const We = /* @__PURE__ */ i.forwardRef(function(e, r) {
|
|
135
|
+
const {
|
|
136
|
+
children: o,
|
|
137
|
+
container: s,
|
|
138
|
+
disablePortal: n = !1
|
|
139
|
+
} = e, [a, d] = i.useState(null), c = q(/* @__PURE__ */ i.isValidElement(o) ? be(o) : null, r);
|
|
140
|
+
if (re(() => {
|
|
141
|
+
n || d(Ne(s) || document.body);
|
|
142
|
+
}, [s, n]), re(() => {
|
|
143
|
+
if (a && !n)
|
|
144
|
+
return ne(r, a), () => {
|
|
145
|
+
ne(r, null);
|
|
146
|
+
};
|
|
147
|
+
}, [r, a, n]), n) {
|
|
148
|
+
if (/* @__PURE__ */ i.isValidElement(o)) {
|
|
149
|
+
const m = {
|
|
150
|
+
ref: c
|
|
151
|
+
};
|
|
152
|
+
return /* @__PURE__ */ i.cloneElement(o, m);
|
|
153
|
+
}
|
|
154
|
+
return /* @__PURE__ */ l.jsx(i.Fragment, {
|
|
155
|
+
children: o
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return /* @__PURE__ */ l.jsx(i.Fragment, {
|
|
159
|
+
children: a && /* @__PURE__ */ Se.createPortal(o, a)
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
function Fe(t) {
|
|
163
|
+
const e = W(t);
|
|
164
|
+
return e.body === t ? oe(t).innerWidth > e.documentElement.clientWidth : t.scrollHeight > t.clientHeight;
|
|
165
|
+
}
|
|
166
|
+
function H(t, e) {
|
|
167
|
+
e ? t.setAttribute("aria-hidden", "true") : t.removeAttribute("aria-hidden");
|
|
168
|
+
}
|
|
169
|
+
function ue(t) {
|
|
170
|
+
return parseInt(oe(t).getComputedStyle(t).paddingRight, 10) || 0;
|
|
171
|
+
}
|
|
172
|
+
function Ae(t) {
|
|
173
|
+
const r = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].indexOf(t.tagName) !== -1, o = t.tagName === "INPUT" && t.getAttribute("type") === "hidden";
|
|
174
|
+
return r || o;
|
|
175
|
+
}
|
|
176
|
+
function pe(t, e, r, o, s) {
|
|
177
|
+
const n = [e, r, ...o];
|
|
178
|
+
[].forEach.call(t.children, (a) => {
|
|
179
|
+
const d = n.indexOf(a) === -1, c = !Ae(a);
|
|
180
|
+
d && c && H(a, s);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
function Y(t, e) {
|
|
184
|
+
let r = -1;
|
|
185
|
+
return t.some((o, s) => e(o) ? (r = s, !0) : !1), r;
|
|
186
|
+
}
|
|
187
|
+
function $e(t, e) {
|
|
188
|
+
const r = [], o = t.container;
|
|
189
|
+
if (!e.disableScrollLock) {
|
|
190
|
+
if (Fe(o)) {
|
|
191
|
+
const a = ke(W(o));
|
|
192
|
+
r.push({
|
|
193
|
+
value: o.style.paddingRight,
|
|
194
|
+
property: "padding-right",
|
|
195
|
+
el: o
|
|
196
|
+
}), o.style.paddingRight = `${ue(o) + a}px`;
|
|
197
|
+
const d = W(o).querySelectorAll(".mui-fixed");
|
|
198
|
+
[].forEach.call(d, (c) => {
|
|
199
|
+
r.push({
|
|
200
|
+
value: c.style.paddingRight,
|
|
201
|
+
property: "padding-right",
|
|
202
|
+
el: c
|
|
203
|
+
}), c.style.paddingRight = `${ue(c) + a}px`;
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
let n;
|
|
207
|
+
if (o.parentNode instanceof DocumentFragment)
|
|
208
|
+
n = W(o).body;
|
|
209
|
+
else {
|
|
210
|
+
const a = o.parentElement, d = oe(o);
|
|
211
|
+
n = (a == null ? void 0 : a.nodeName) === "HTML" && d.getComputedStyle(a).overflowY === "scroll" ? a : o;
|
|
212
|
+
}
|
|
213
|
+
r.push({
|
|
214
|
+
value: n.style.overflow,
|
|
215
|
+
property: "overflow",
|
|
216
|
+
el: n
|
|
217
|
+
}, {
|
|
218
|
+
value: n.style.overflowX,
|
|
219
|
+
property: "overflow-x",
|
|
220
|
+
el: n
|
|
221
|
+
}, {
|
|
222
|
+
value: n.style.overflowY,
|
|
223
|
+
property: "overflow-y",
|
|
224
|
+
el: n
|
|
225
|
+
}), n.style.overflow = "hidden";
|
|
226
|
+
}
|
|
227
|
+
return () => {
|
|
228
|
+
r.forEach(({
|
|
229
|
+
value: n,
|
|
230
|
+
el: a,
|
|
231
|
+
property: d
|
|
232
|
+
}) => {
|
|
233
|
+
n ? a.style.setProperty(d, n) : a.style.removeProperty(d);
|
|
234
|
+
});
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
function Be(t) {
|
|
238
|
+
const e = [];
|
|
239
|
+
return [].forEach.call(t.children, (r) => {
|
|
240
|
+
r.getAttribute("aria-hidden") === "true" && e.push(r);
|
|
241
|
+
}), e;
|
|
242
|
+
}
|
|
243
|
+
class He {
|
|
244
|
+
constructor() {
|
|
245
|
+
this.containers = void 0, this.modals = void 0, this.modals = [], this.containers = [];
|
|
246
|
+
}
|
|
247
|
+
add(e, r) {
|
|
248
|
+
let o = this.modals.indexOf(e);
|
|
249
|
+
if (o !== -1)
|
|
250
|
+
return o;
|
|
251
|
+
o = this.modals.length, this.modals.push(e), e.modalRef && H(e.modalRef, !1);
|
|
252
|
+
const s = Be(r);
|
|
253
|
+
pe(r, e.mount, e.modalRef, s, !0);
|
|
254
|
+
const n = Y(this.containers, (a) => a.container === r);
|
|
255
|
+
return n !== -1 ? (this.containers[n].modals.push(e), o) : (this.containers.push({
|
|
256
|
+
modals: [e],
|
|
257
|
+
container: r,
|
|
258
|
+
restore: null,
|
|
259
|
+
hiddenSiblings: s
|
|
260
|
+
}), o);
|
|
261
|
+
}
|
|
262
|
+
mount(e, r) {
|
|
263
|
+
const o = Y(this.containers, (n) => n.modals.indexOf(e) !== -1), s = this.containers[o];
|
|
264
|
+
s.restore || (s.restore = $e(s, r));
|
|
265
|
+
}
|
|
266
|
+
remove(e, r = !0) {
|
|
267
|
+
const o = this.modals.indexOf(e);
|
|
268
|
+
if (o === -1)
|
|
269
|
+
return o;
|
|
270
|
+
const s = Y(this.containers, (a) => a.modals.indexOf(e) !== -1), n = this.containers[s];
|
|
271
|
+
if (n.modals.splice(n.modals.indexOf(e), 1), this.modals.splice(o, 1), n.modals.length === 0)
|
|
272
|
+
n.restore && n.restore(), e.modalRef && H(e.modalRef, r), pe(n.container, e.mount, e.modalRef, n.hiddenSiblings, !1), this.containers.splice(s, 1);
|
|
273
|
+
else {
|
|
274
|
+
const a = n.modals[n.modals.length - 1];
|
|
275
|
+
a.modalRef && H(a.modalRef, !1);
|
|
276
|
+
}
|
|
277
|
+
return o;
|
|
278
|
+
}
|
|
279
|
+
isTopModal(e) {
|
|
280
|
+
return this.modals.length > 0 && this.modals[this.modals.length - 1] === e;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
function Le(t) {
|
|
284
|
+
return typeof t == "function" ? t() : t;
|
|
285
|
+
}
|
|
286
|
+
function Ue(t) {
|
|
287
|
+
return t ? t.props.hasOwnProperty("in") : !1;
|
|
288
|
+
}
|
|
289
|
+
const Ve = new He();
|
|
290
|
+
function Ke(t) {
|
|
291
|
+
const {
|
|
292
|
+
container: e,
|
|
293
|
+
disableEscapeKeyDown: r = !1,
|
|
294
|
+
disableScrollLock: o = !1,
|
|
295
|
+
// @ts-ignore internal logic - Base UI supports the manager as a prop too
|
|
296
|
+
manager: s = Ve,
|
|
297
|
+
closeAfterTransition: n = !1,
|
|
298
|
+
onTransitionEnter: a,
|
|
299
|
+
onTransitionExited: d,
|
|
300
|
+
children: c,
|
|
301
|
+
onClose: m,
|
|
302
|
+
open: f,
|
|
303
|
+
rootRef: h
|
|
304
|
+
} = t, C = i.useRef({}), y = i.useRef(null), p = i.useRef(null), T = q(p, h), [I, D] = i.useState(!f), w = Ue(c);
|
|
305
|
+
let u = !0;
|
|
306
|
+
(t["aria-hidden"] === "false" || t["aria-hidden"] === !1) && (u = !1);
|
|
307
|
+
const E = () => W(y.current), R = () => (C.current.modalRef = p.current, C.current.mount = y.current, C.current), P = () => {
|
|
308
|
+
s.mount(R(), {
|
|
309
|
+
disableScrollLock: o
|
|
310
|
+
}), p.current && (p.current.scrollTop = 0);
|
|
311
|
+
}, M = se(() => {
|
|
312
|
+
const b = Le(e) || E().body;
|
|
313
|
+
s.add(R(), b), p.current && P();
|
|
314
|
+
}), S = i.useCallback(() => s.isTopModal(R()), [s]), O = se((b) => {
|
|
315
|
+
y.current = b, b && (f && S() ? P() : p.current && H(p.current, u));
|
|
316
|
+
}), x = i.useCallback(() => {
|
|
317
|
+
s.remove(R(), u);
|
|
318
|
+
}, [u, s]);
|
|
319
|
+
i.useEffect(() => () => {
|
|
320
|
+
x();
|
|
321
|
+
}, [x]), i.useEffect(() => {
|
|
322
|
+
f ? M() : (!w || !n) && x();
|
|
323
|
+
}, [f, x, w, n, M]);
|
|
324
|
+
const j = (b) => (g) => {
|
|
325
|
+
var N;
|
|
326
|
+
(N = b.onKeyDown) == null || N.call(b, g), !(g.key !== "Escape" || g.which === 229 || // Wait until IME is settled.
|
|
327
|
+
!S()) && (r || (g.stopPropagation(), m && m(g, "escapeKeyDown")));
|
|
328
|
+
}, k = (b) => (g) => {
|
|
329
|
+
var N;
|
|
330
|
+
(N = b.onClick) == null || N.call(b, g), g.target === g.currentTarget && m && m(g, "backdropClick");
|
|
331
|
+
};
|
|
332
|
+
return {
|
|
333
|
+
getRootProps: (b = {}) => {
|
|
334
|
+
const g = xe(t);
|
|
335
|
+
delete g.onTransitionEnter, delete g.onTransitionExited;
|
|
336
|
+
const N = v({}, g, b);
|
|
337
|
+
return v({
|
|
338
|
+
role: "presentation"
|
|
339
|
+
}, N, {
|
|
340
|
+
onKeyDown: j(N),
|
|
341
|
+
ref: T
|
|
342
|
+
});
|
|
343
|
+
},
|
|
344
|
+
getBackdropProps: (b = {}) => {
|
|
345
|
+
const g = b;
|
|
346
|
+
return v({
|
|
347
|
+
"aria-hidden": !0
|
|
348
|
+
}, g, {
|
|
349
|
+
onClick: k(g),
|
|
350
|
+
open: f
|
|
351
|
+
});
|
|
352
|
+
},
|
|
353
|
+
getTransitionProps: () => {
|
|
354
|
+
const b = () => {
|
|
355
|
+
D(!1), a && a();
|
|
356
|
+
}, g = () => {
|
|
357
|
+
D(!0), d && d(), n && x();
|
|
358
|
+
};
|
|
359
|
+
return {
|
|
360
|
+
onEnter: ce(b, c == null ? void 0 : c.props.onEnter),
|
|
361
|
+
onExited: ce(g, c == null ? void 0 : c.props.onExited)
|
|
362
|
+
};
|
|
363
|
+
},
|
|
364
|
+
rootRef: T,
|
|
365
|
+
portalRef: O,
|
|
366
|
+
isTopModal: S,
|
|
367
|
+
exited: I,
|
|
368
|
+
hasTransition: w
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
function _e(t) {
|
|
372
|
+
return Q("MuiCardCover", t);
|
|
373
|
+
}
|
|
374
|
+
X("MuiCardCover", ["root"]);
|
|
375
|
+
const Ye = ["className", "component", "children", "slots", "slotProps"], Ge = () => te({
|
|
376
|
+
root: ["root"]
|
|
377
|
+
}, _e, {}), Je = A("div", {
|
|
378
|
+
name: "JoyCardCover",
|
|
379
|
+
slot: "Root",
|
|
380
|
+
overridesResolver: (t, e) => e.root
|
|
381
|
+
})({
|
|
382
|
+
position: "absolute",
|
|
383
|
+
zIndex: 0,
|
|
384
|
+
top: 0,
|
|
385
|
+
left: 0,
|
|
386
|
+
right: 0,
|
|
387
|
+
bottom: 0,
|
|
388
|
+
borderRadius: "var(--CardCover-radius)",
|
|
389
|
+
// use data-attribute instead of :first-child to support zero config SSR (emotion)
|
|
390
|
+
// use nested selector for integrating with nextjs image `fill` layout (spans are inserted on top of the img)
|
|
391
|
+
"& [data-first-child]": {
|
|
392
|
+
display: "flex",
|
|
393
|
+
justifyContent: "center",
|
|
394
|
+
alignItems: "center",
|
|
395
|
+
width: "100%",
|
|
396
|
+
height: "100%",
|
|
397
|
+
objectFit: "cover",
|
|
398
|
+
boxSizing: "border-box",
|
|
399
|
+
borderRadius: "var(--CardCover-radius)",
|
|
400
|
+
margin: 0,
|
|
401
|
+
padding: 0,
|
|
402
|
+
"& > img": {
|
|
403
|
+
// support art-direction that uses <picture><img /></picture>
|
|
404
|
+
width: "100%",
|
|
405
|
+
height: "100%",
|
|
406
|
+
objectFit: "cover"
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}), fe = /* @__PURE__ */ i.forwardRef(function(e, r) {
|
|
410
|
+
const o = Z({
|
|
411
|
+
props: e,
|
|
412
|
+
name: "JoyCardCover"
|
|
413
|
+
}), {
|
|
414
|
+
className: s,
|
|
415
|
+
component: n = "div",
|
|
416
|
+
children: a,
|
|
417
|
+
slots: d = {},
|
|
418
|
+
slotProps: c = {}
|
|
419
|
+
} = o, m = ee(o, Ye), f = v({}, o, {
|
|
420
|
+
component: n
|
|
421
|
+
}), h = Ge(), C = v({}, m, {
|
|
422
|
+
component: n,
|
|
423
|
+
slots: d,
|
|
424
|
+
slotProps: c
|
|
425
|
+
}), [y, p] = V("root", {
|
|
426
|
+
ref: r,
|
|
427
|
+
className: ge(h.root, s),
|
|
428
|
+
elementType: Je,
|
|
429
|
+
externalForwardedProps: C,
|
|
430
|
+
ownerState: f
|
|
431
|
+
});
|
|
432
|
+
return /* @__PURE__ */ l.jsx(y, v({}, p, {
|
|
433
|
+
children: i.Children.map(a, (T, I) => I === 0 && /* @__PURE__ */ i.isValidElement(T) ? /* @__PURE__ */ i.cloneElement(T, {
|
|
434
|
+
"data-first-child": ""
|
|
435
|
+
}) : T)
|
|
436
|
+
}));
|
|
437
|
+
});
|
|
438
|
+
function qe(t) {
|
|
439
|
+
return Q("MuiModalDialog", t);
|
|
440
|
+
}
|
|
441
|
+
const Tt = X("MuiModalDialog", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "sizeSm", "sizeMd", "sizeLg", "layoutCenter", "layoutFullscreen"]), Qe = /* @__PURE__ */ i.createContext(void 0), Xe = /* @__PURE__ */ i.createContext(void 0);
|
|
442
|
+
function Ze(t) {
|
|
443
|
+
return Q("MuiModal", t);
|
|
444
|
+
}
|
|
445
|
+
X("MuiModal", ["root", "hidden", "backdrop"]);
|
|
446
|
+
const et = /* @__PURE__ */ i.createContext(void 0), tt = ["children", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onClose", "onKeyDown", "open", "component", "slots", "slotProps"], ot = (t) => {
|
|
447
|
+
const {
|
|
448
|
+
open: e
|
|
449
|
+
} = t;
|
|
450
|
+
return te({
|
|
451
|
+
root: ["root", !e && "hidden"],
|
|
452
|
+
backdrop: ["backdrop"]
|
|
453
|
+
}, Ze, {});
|
|
454
|
+
}, rt = A("div")(({
|
|
455
|
+
ownerState: t,
|
|
456
|
+
theme: e
|
|
457
|
+
}) => v({
|
|
458
|
+
"--unstable_popup-zIndex": `calc(${e.vars.zIndex.modal} + 1)`,
|
|
459
|
+
'& ~ [role="listbox"]': {
|
|
460
|
+
// target all the listbox (Autocomplete, Menu, Select, etc.) that uses portal
|
|
461
|
+
"--unstable_popup-zIndex": `calc(${e.vars.zIndex.modal} + 1)`
|
|
462
|
+
},
|
|
463
|
+
position: "fixed",
|
|
464
|
+
zIndex: e.vars.zIndex.modal,
|
|
465
|
+
right: 0,
|
|
466
|
+
bottom: 0,
|
|
467
|
+
top: 0,
|
|
468
|
+
left: 0
|
|
469
|
+
}, !t.open && {
|
|
470
|
+
visibility: "hidden"
|
|
471
|
+
})), nt = A(rt, {
|
|
472
|
+
name: "JoyModal",
|
|
473
|
+
slot: "Root",
|
|
474
|
+
overridesResolver: (t, e) => e.root
|
|
475
|
+
})({}), at = A("div")(({
|
|
476
|
+
theme: t
|
|
477
|
+
}) => ({
|
|
478
|
+
zIndex: -1,
|
|
479
|
+
position: "fixed",
|
|
480
|
+
right: 0,
|
|
481
|
+
bottom: 0,
|
|
482
|
+
top: 0,
|
|
483
|
+
left: 0,
|
|
484
|
+
backgroundColor: t.vars.palette.background.backdrop,
|
|
485
|
+
WebkitTapHighlightColor: "transparent",
|
|
486
|
+
backdropFilter: "blur(8px)"
|
|
487
|
+
})), st = A(at, {
|
|
488
|
+
name: "JoyModal",
|
|
489
|
+
slot: "Backdrop",
|
|
490
|
+
overridesResolver: (t, e) => e.backdrop
|
|
491
|
+
})({}), it = /* @__PURE__ */ i.forwardRef(function(e, r) {
|
|
492
|
+
const o = Z({
|
|
493
|
+
props: e,
|
|
494
|
+
name: "JoyModal"
|
|
495
|
+
}), {
|
|
496
|
+
children: s,
|
|
497
|
+
container: n,
|
|
498
|
+
disableAutoFocus: a = !1,
|
|
499
|
+
disableEnforceFocus: d = !1,
|
|
500
|
+
disableEscapeKeyDown: c = !1,
|
|
501
|
+
disablePortal: m = !1,
|
|
502
|
+
disableRestoreFocus: f = !1,
|
|
503
|
+
disableScrollLock: h = !1,
|
|
504
|
+
hideBackdrop: C = !1,
|
|
505
|
+
keepMounted: y = !1,
|
|
506
|
+
onClose: p,
|
|
507
|
+
open: T,
|
|
508
|
+
component: I,
|
|
509
|
+
slots: D = {},
|
|
510
|
+
slotProps: w = {}
|
|
511
|
+
} = o, u = ee(o, tt), E = v({}, o, {
|
|
512
|
+
disableAutoFocus: a,
|
|
513
|
+
disableEnforceFocus: d,
|
|
514
|
+
disableEscapeKeyDown: c,
|
|
515
|
+
disablePortal: m,
|
|
516
|
+
disableRestoreFocus: f,
|
|
517
|
+
disableScrollLock: h,
|
|
518
|
+
hideBackdrop: C,
|
|
519
|
+
keepMounted: y
|
|
520
|
+
}), {
|
|
521
|
+
getRootProps: R,
|
|
522
|
+
getBackdropProps: P,
|
|
523
|
+
rootRef: M,
|
|
524
|
+
portalRef: S,
|
|
525
|
+
isTopModal: O
|
|
526
|
+
} = Ke(v({}, E, {
|
|
527
|
+
rootRef: r
|
|
528
|
+
})), x = ot(E), j = v({}, u, {
|
|
529
|
+
component: I,
|
|
530
|
+
slots: D,
|
|
531
|
+
slotProps: w
|
|
532
|
+
}), [k, z] = V("root", {
|
|
533
|
+
ref: M,
|
|
534
|
+
className: x.root,
|
|
535
|
+
elementType: nt,
|
|
536
|
+
externalForwardedProps: j,
|
|
537
|
+
getSlotProps: R,
|
|
538
|
+
ownerState: E
|
|
539
|
+
}), [$, F] = V("backdrop", {
|
|
540
|
+
className: x.backdrop,
|
|
541
|
+
elementType: st,
|
|
542
|
+
externalForwardedProps: j,
|
|
543
|
+
getSlotProps: P,
|
|
544
|
+
ownerState: E
|
|
545
|
+
});
|
|
546
|
+
return !y && !T ? null : /* @__PURE__ */ l.jsx(et.Provider, {
|
|
547
|
+
value: p,
|
|
548
|
+
children: /* @__PURE__ */ l.jsx(We, {
|
|
549
|
+
ref: S,
|
|
550
|
+
container: n,
|
|
551
|
+
disablePortal: m,
|
|
552
|
+
children: /* @__PURE__ */ l.jsxs(k, v({}, z, {
|
|
553
|
+
children: [C ? null : /* @__PURE__ */ l.jsx($, v({}, F)), /* @__PURE__ */ l.jsx(ze, {
|
|
554
|
+
disableEnforceFocus: d,
|
|
555
|
+
disableAutoFocus: a,
|
|
556
|
+
disableRestoreFocus: f,
|
|
557
|
+
isEnabled: O,
|
|
558
|
+
open: T,
|
|
559
|
+
children: i.Children.only(s) && /* @__PURE__ */ i.cloneElement(s, v({}, s.props.tabIndex === void 0 && {
|
|
560
|
+
tabIndex: -1
|
|
561
|
+
}))
|
|
562
|
+
})]
|
|
563
|
+
}))
|
|
564
|
+
})
|
|
565
|
+
});
|
|
566
|
+
}), lt = ["className", "children", "invertedColors", "orientation", "color", "component", "variant", "size", "layout", "maxWidth", "minWidth", "slots", "slotProps"], dt = (t) => {
|
|
567
|
+
const {
|
|
568
|
+
variant: e,
|
|
569
|
+
color: r,
|
|
570
|
+
size: o,
|
|
571
|
+
layout: s
|
|
572
|
+
} = t, n = {
|
|
573
|
+
root: ["root", e && `variant${L(e)}`, r && `color${L(r)}`, o && `size${L(o)}`, s && `layout${L(s)}`]
|
|
574
|
+
};
|
|
575
|
+
return te(n, qe, {});
|
|
576
|
+
};
|
|
577
|
+
function me(t, e) {
|
|
578
|
+
var r, o;
|
|
579
|
+
return e && (r = t.breakpoints) != null && r.values[e] ? `${(o = t.breakpoints) == null ? void 0 : o.values[e]}px` : e;
|
|
580
|
+
}
|
|
581
|
+
const ct = A(Me, {
|
|
582
|
+
name: "JoyModalDialog",
|
|
583
|
+
slot: "Root",
|
|
584
|
+
overridesResolver: (t, e) => e.root
|
|
585
|
+
})(({
|
|
586
|
+
theme: t,
|
|
587
|
+
ownerState: e
|
|
588
|
+
}) => v({
|
|
589
|
+
"--ModalDialog-minWidth": typeof e.minWidth == "number" ? `${e.minWidth}px` : me(t, e.minWidth),
|
|
590
|
+
"--ModalDialog-maxWidth": typeof e.maxWidth == "number" ? `${e.maxWidth}px` : me(t, e.maxWidth),
|
|
591
|
+
"--ModalClose-radius": "max((var(--Card-radius) - var(--variant-borderWidth, 0px)) - var(--ModalClose-inset), min(var(--ModalClose-inset) / 2, (var(--Card-radius) - var(--variant-borderWidth, 0px)) / 2))"
|
|
592
|
+
}, e.variant === "solid" && {
|
|
593
|
+
"--DialogContent-color": "currentColor"
|
|
594
|
+
}, e.size === "sm" && {
|
|
595
|
+
"--Card-padding": "1rem",
|
|
596
|
+
"--ModalDialog-titleOffset": t.spacing(0.25),
|
|
597
|
+
"--ModalDialog-descriptionOffset": t.spacing(0.25),
|
|
598
|
+
"--ModalClose-inset": "0.375rem"
|
|
599
|
+
}, e.size === "md" && {
|
|
600
|
+
"--Card-padding": "1.25rem",
|
|
601
|
+
"--ModalDialog-titleOffset": t.spacing(0.25),
|
|
602
|
+
"--ModalDialog-descriptionOffset": t.spacing(0.75),
|
|
603
|
+
"--ModalClose-inset": "0.5rem"
|
|
604
|
+
}, e.size === "lg" && {
|
|
605
|
+
"--Card-padding": "1.5rem",
|
|
606
|
+
"--ModalDialog-titleOffset": t.spacing(0.5),
|
|
607
|
+
"--ModalDialog-descriptionOffset": t.spacing(1),
|
|
608
|
+
"--ModalClose-inset": "0.625rem"
|
|
609
|
+
}, {
|
|
610
|
+
boxSizing: "border-box",
|
|
611
|
+
boxShadow: t.shadow.md,
|
|
612
|
+
minWidth: "min(calc(100vw - 2 * var(--Card-padding)), var(--ModalDialog-minWidth, 300px))",
|
|
613
|
+
outline: 0,
|
|
614
|
+
position: "absolute"
|
|
615
|
+
}, e.layout === "fullscreen" && {
|
|
616
|
+
top: 0,
|
|
617
|
+
left: 0,
|
|
618
|
+
right: 0,
|
|
619
|
+
bottom: 0,
|
|
620
|
+
border: 0,
|
|
621
|
+
borderRadius: 0
|
|
622
|
+
}, e.layout === "center" && {
|
|
623
|
+
top: "50%",
|
|
624
|
+
left: "50%",
|
|
625
|
+
transform: "translate(-50%, -50%)",
|
|
626
|
+
maxWidth: "min(calc(100vw - 2 * var(--Card-padding)), var(--ModalDialog-maxWidth, 100vw))",
|
|
627
|
+
maxHeight: "calc(100% - 2 * var(--Card-padding))"
|
|
628
|
+
}, {
|
|
629
|
+
[`& [id="${e["aria-labelledby"]}"]`]: {
|
|
630
|
+
"--Typography-margin": "calc(-1 * var(--ModalDialog-titleOffset)) 0 var(--ModalDialog-gap) 0",
|
|
631
|
+
"--Typography-fontSize": "1.125em",
|
|
632
|
+
[`& + [id="${e["aria-describedby"]}"]`]: {
|
|
633
|
+
"--unstable_ModalDialog-descriptionOffset": "calc(-1 * var(--ModalDialog-descriptionOffset))"
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
[`& [id="${e["aria-describedby"]}"]`]: {
|
|
637
|
+
"--Typography-fontSize": "1em",
|
|
638
|
+
"--Typography-margin": "var(--unstable_ModalDialog-descriptionOffset, var(--ModalDialog-gap)) 0 0 0",
|
|
639
|
+
"&:not(:last-child)": {
|
|
640
|
+
// create spacing between description and the next element.
|
|
641
|
+
"--Typography-margin": "var(--unstable_ModalDialog-descriptionOffset, var(--ModalDialog-gap)) 0 var(--ModalDialog-gap) 0"
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
})), ut = /* @__PURE__ */ i.forwardRef(function(e, r) {
|
|
645
|
+
const o = Z({
|
|
646
|
+
props: e,
|
|
647
|
+
name: "JoyModalDialog"
|
|
648
|
+
}), {
|
|
649
|
+
className: s,
|
|
650
|
+
children: n,
|
|
651
|
+
invertedColors: a = !1,
|
|
652
|
+
orientation: d = "vertical",
|
|
653
|
+
color: c = "neutral",
|
|
654
|
+
component: m = "div",
|
|
655
|
+
variant: f = "outlined",
|
|
656
|
+
size: h = "md",
|
|
657
|
+
layout: C = "center",
|
|
658
|
+
maxWidth: y,
|
|
659
|
+
minWidth: p,
|
|
660
|
+
slots: T = {},
|
|
661
|
+
slotProps: I = {}
|
|
662
|
+
} = o, D = ee(o, lt), w = v({}, o, {
|
|
663
|
+
color: c,
|
|
664
|
+
component: m,
|
|
665
|
+
maxWidth: y,
|
|
666
|
+
minWidth: p,
|
|
667
|
+
layout: C,
|
|
668
|
+
size: h,
|
|
669
|
+
variant: f,
|
|
670
|
+
invertedColors: a
|
|
671
|
+
}), u = dt(w), E = v({}, D, {
|
|
672
|
+
component: m,
|
|
673
|
+
slots: T,
|
|
674
|
+
slotProps: I
|
|
675
|
+
}), R = ae(), P = ae(), M = i.useMemo(() => ({
|
|
676
|
+
variant: f,
|
|
677
|
+
color: c,
|
|
678
|
+
labelledBy: R,
|
|
679
|
+
describedBy: P
|
|
680
|
+
}), [c, f, R, P]), [S, O] = V("root", {
|
|
681
|
+
ref: r,
|
|
682
|
+
className: ge(u.root, s),
|
|
683
|
+
elementType: ct,
|
|
684
|
+
externalForwardedProps: E,
|
|
685
|
+
ownerState: w,
|
|
686
|
+
additionalProps: {
|
|
687
|
+
as: m,
|
|
688
|
+
role: "dialog",
|
|
689
|
+
"aria-modal": "true",
|
|
690
|
+
"aria-labelledby": R,
|
|
691
|
+
"aria-describedby": P
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
return /* @__PURE__ */ l.jsx(Xe.Provider, {
|
|
695
|
+
value: h,
|
|
696
|
+
children: /* @__PURE__ */ l.jsx(Qe.Provider, {
|
|
697
|
+
value: M,
|
|
698
|
+
children: /* @__PURE__ */ l.jsx(S, v({}, O, {
|
|
699
|
+
children: i.Children.map(n, (x, j) => {
|
|
700
|
+
if (!/* @__PURE__ */ i.isValidElement(x))
|
|
701
|
+
return x;
|
|
702
|
+
const k = {};
|
|
703
|
+
if (Re(x, ["Divider"])) {
|
|
704
|
+
var z, $;
|
|
705
|
+
const F = x.props;
|
|
706
|
+
k.inset = (z = F == null ? void 0 : F.inset) != null ? z : "context";
|
|
707
|
+
const b = d === "vertical" ? "horizontal" : "vertical";
|
|
708
|
+
k.orientation = ($ = F == null ? void 0 : F.orientation) != null ? $ : b;
|
|
709
|
+
}
|
|
710
|
+
return j === 0 && (k["data-first-child"] = ""), j === i.Children.count(n) - 1 && (k["data-last-child"] = ""), /* @__PURE__ */ i.cloneElement(x, k);
|
|
711
|
+
})
|
|
712
|
+
}))
|
|
713
|
+
})
|
|
714
|
+
});
|
|
715
|
+
}), pt = K(/* @__PURE__ */ l.jsx("path", {
|
|
716
|
+
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"
|
|
717
|
+
}), "Info"), St = {
|
|
718
|
+
LOADING: "loading",
|
|
719
|
+
TUTORIAL: "tutorial",
|
|
720
|
+
PLAYING: "playing",
|
|
721
|
+
RESULTS: "results"
|
|
722
|
+
}, ft = K(/* @__PURE__ */ l.jsx("path", {
|
|
723
|
+
d: "m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z"
|
|
724
|
+
}), "Favorite"), mt = J`
|
|
725
|
+
0% {
|
|
726
|
+
opacity: 1;
|
|
727
|
+
transform: translateY(0);
|
|
728
|
+
}
|
|
729
|
+
100% {
|
|
730
|
+
opacity: 0;
|
|
731
|
+
transform: translateY(-20px);
|
|
732
|
+
}
|
|
733
|
+
`, kt = {
|
|
734
|
+
pointsAdded: {
|
|
735
|
+
position: "absolute",
|
|
736
|
+
top: -20,
|
|
737
|
+
right: 0,
|
|
738
|
+
color: "primary.500",
|
|
739
|
+
animation: `${mt} 1s ease-out forwards`
|
|
740
|
+
},
|
|
741
|
+
optionWrapper: {
|
|
742
|
+
position: "relative",
|
|
743
|
+
flex: 1,
|
|
744
|
+
transition: "transform 0.2s"
|
|
745
|
+
},
|
|
746
|
+
dividerWrapper: {
|
|
747
|
+
width: { xs: "100%", sm: "40px" },
|
|
748
|
+
my: { xs: 2, sm: 0 }
|
|
749
|
+
},
|
|
750
|
+
dividerButton: {
|
|
751
|
+
borderRadius: "50%",
|
|
752
|
+
bgcolor: "background.surface",
|
|
753
|
+
boxShadow: "sm",
|
|
754
|
+
width: "30px",
|
|
755
|
+
height: "30px",
|
|
756
|
+
"&:hover": { bgcolor: "background.level1" }
|
|
757
|
+
},
|
|
758
|
+
dividerText: {
|
|
759
|
+
fontWeight: "lg",
|
|
760
|
+
color: "text.secondary",
|
|
761
|
+
display: { xs: "none", sm: "block" },
|
|
762
|
+
textTransform: "uppercase",
|
|
763
|
+
fontSize: "0.675em !important"
|
|
764
|
+
},
|
|
765
|
+
timerProgressWrapper: {
|
|
766
|
+
position: "relative",
|
|
767
|
+
width: "100%",
|
|
768
|
+
height: 8,
|
|
769
|
+
bgcolor: "neutral.200",
|
|
770
|
+
borderRadius: "4px",
|
|
771
|
+
overflow: "hidden"
|
|
772
|
+
},
|
|
773
|
+
timerProgress: {
|
|
774
|
+
position: "absolute",
|
|
775
|
+
left: 0,
|
|
776
|
+
top: 0,
|
|
777
|
+
height: "100%",
|
|
778
|
+
transition: "width 1s linear, background-color 0.3s ease",
|
|
779
|
+
borderRadius: "inherit",
|
|
780
|
+
transform: "translateZ(0)"
|
|
781
|
+
}
|
|
782
|
+
}, It = (t, e) => ({
|
|
783
|
+
flex: 1,
|
|
784
|
+
mx: 0.5,
|
|
785
|
+
height: 4,
|
|
786
|
+
bgcolor: e < t ? "primary.500" : "primary.softBg",
|
|
787
|
+
borderRadius: "2px",
|
|
788
|
+
transition: "background-color 0.3s ease"
|
|
789
|
+
}), G = {
|
|
790
|
+
fadeInUp: J`
|
|
791
|
+
from {
|
|
792
|
+
opacity: 0;
|
|
793
|
+
transform: translateY(20px);
|
|
794
|
+
}
|
|
795
|
+
to {
|
|
796
|
+
opacity: 1;
|
|
797
|
+
transform: translateY(0);
|
|
798
|
+
}
|
|
799
|
+
`,
|
|
800
|
+
pulse: J`
|
|
801
|
+
0% {
|
|
802
|
+
transform: scale(1);
|
|
803
|
+
}
|
|
804
|
+
50% {
|
|
805
|
+
transform: scale(1.02);
|
|
806
|
+
}
|
|
807
|
+
100% {
|
|
808
|
+
transform: scale(1);
|
|
809
|
+
}
|
|
810
|
+
`
|
|
811
|
+
}, wt = {
|
|
812
|
+
wrapper: {
|
|
813
|
+
animation: `${G.fadeInUp} 0.6s ease-out`
|
|
814
|
+
},
|
|
815
|
+
mainCard: {
|
|
816
|
+
mb: 3,
|
|
817
|
+
minHeight: "300px",
|
|
818
|
+
position: "relative",
|
|
819
|
+
overflow: "hidden",
|
|
820
|
+
background: (t) => `linear-gradient(135deg, ${t.vars.palette.background.level2} 0%, ${t.vars.palette.background.surface} 100%)`
|
|
821
|
+
},
|
|
822
|
+
fieldPattern: {
|
|
823
|
+
position: "absolute",
|
|
824
|
+
top: 0,
|
|
825
|
+
left: 0,
|
|
826
|
+
right: 0,
|
|
827
|
+
bottom: 0,
|
|
828
|
+
opacity: 0.1,
|
|
829
|
+
pointerEvents: "none",
|
|
830
|
+
background: (t) => `
|
|
831
|
+
linear-gradient(to right, ${t.vars.palette.neutral[400]} 1px, transparent 1px) 0 0 / 50px 100%,
|
|
832
|
+
linear-gradient(${t.vars.palette.neutral[400]} 1px, transparent 1px) 0 0 / 100% 50px
|
|
833
|
+
`
|
|
834
|
+
},
|
|
835
|
+
mainContent: {
|
|
836
|
+
height: "100%",
|
|
837
|
+
position: "relative",
|
|
838
|
+
zIndex: 1,
|
|
839
|
+
p: 2
|
|
840
|
+
},
|
|
841
|
+
scoreSection: {
|
|
842
|
+
color: "primary.500"
|
|
843
|
+
},
|
|
844
|
+
scoreValue: {
|
|
845
|
+
fontSize: "4.5em",
|
|
846
|
+
fontWeight: "bold",
|
|
847
|
+
color: "primary.500",
|
|
848
|
+
animation: `${G.pulse} 2s infinite`,
|
|
849
|
+
textShadow: "0 2px 4px rgba(0,0,0,0.1)"
|
|
850
|
+
},
|
|
851
|
+
statsSection: {
|
|
852
|
+
width: "100%",
|
|
853
|
+
direction: { xs: "column", sm: "row" }
|
|
854
|
+
},
|
|
855
|
+
statsCard: {
|
|
856
|
+
p: 2,
|
|
857
|
+
borderRadius: "lg",
|
|
858
|
+
minWidth: "200px",
|
|
859
|
+
display: "flex",
|
|
860
|
+
flexDirection: "column",
|
|
861
|
+
alignItems: "center",
|
|
862
|
+
gap: 1
|
|
863
|
+
},
|
|
864
|
+
leaderboardCard: {
|
|
865
|
+
mb: 3,
|
|
866
|
+
background: "background.surface",
|
|
867
|
+
borderColor: "divider",
|
|
868
|
+
"&:hover": { borderColor: "divider" }
|
|
869
|
+
},
|
|
870
|
+
rankNumber: {
|
|
871
|
+
width: 20,
|
|
872
|
+
textAlign: "center"
|
|
873
|
+
},
|
|
874
|
+
actionButton: {
|
|
875
|
+
transition: "all 0.2s",
|
|
876
|
+
"&:hover": {
|
|
877
|
+
transform: "translateY(-2px)"
|
|
878
|
+
},
|
|
879
|
+
animation: `${G.fadeInUp} 0.6s ease-out 0.3s backwards`
|
|
880
|
+
},
|
|
881
|
+
getLeaderboardItemStyles: {
|
|
882
|
+
bgcolor: "transparent",
|
|
883
|
+
borderRadius: "sm",
|
|
884
|
+
transition: "all 0.2s",
|
|
885
|
+
"&:hover": {
|
|
886
|
+
bgcolor: (t) => `${t.vars.palette.primary[500]}10`
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
}, Pt = (t) => ({
|
|
890
|
+
fontWeight: "bold",
|
|
891
|
+
color: (e) => t ? e.vars.palette.primary[500] : "inherit"
|
|
892
|
+
}), jt = (t) => (e) => t === 0 ? e.vars.palette.warning[400] : t === 1 ? e.vars.palette.neutral[400] : e.vars.palette.warning[700], he = {
|
|
893
|
+
shadow: {
|
|
894
|
+
background: {
|
|
895
|
+
xs: "linear-gradient(to top, rgba(0,0,0,0.4), rgba(0,0,0,0) 120px), linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0) 180px)",
|
|
896
|
+
md: "linear-gradient(to top, rgba(0,0,0,0.4), rgba(0,0,0,0) 200px), linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0) 300px)"
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
contentWrapper: {
|
|
900
|
+
justifyContent: "flex-end",
|
|
901
|
+
pb: { xs: 3, sm: 4, md: 5 },
|
|
902
|
+
px: { xs: 2, md: 5 },
|
|
903
|
+
width: "100%"
|
|
904
|
+
}
|
|
905
|
+
}, B = {
|
|
906
|
+
iconWrapper: {
|
|
907
|
+
mb: 2,
|
|
908
|
+
display: "flex",
|
|
909
|
+
alignItems: "center",
|
|
910
|
+
justifyContent: "center",
|
|
911
|
+
width: 48,
|
|
912
|
+
height: 48,
|
|
913
|
+
borderRadius: "50%",
|
|
914
|
+
bgcolor: "primary.100",
|
|
915
|
+
color: "primary.500"
|
|
916
|
+
},
|
|
917
|
+
ruleCard: {
|
|
918
|
+
display: "flex",
|
|
919
|
+
flexDirection: "column",
|
|
920
|
+
alignItems: "center",
|
|
921
|
+
p: 3,
|
|
922
|
+
mb: 2,
|
|
923
|
+
textAlign: "center",
|
|
924
|
+
backgroundColor: "background.level1"
|
|
925
|
+
},
|
|
926
|
+
mainButton: {
|
|
927
|
+
px: 10,
|
|
928
|
+
position: "relative",
|
|
929
|
+
transition: "transform 0.2s ease",
|
|
930
|
+
animation: "pulse 2s infinite",
|
|
931
|
+
"@keyframes pulse": {
|
|
932
|
+
"0%": {
|
|
933
|
+
boxShadow: "0 0 0 0 rgba(var(--joy-palette-primary-500), 0.4)",
|
|
934
|
+
transform: "scale(1)"
|
|
935
|
+
},
|
|
936
|
+
"70%": {
|
|
937
|
+
boxShadow: "0 0 0 10px rgba(var(--joy-palette-primary-500), 0)",
|
|
938
|
+
transform: "scale(1.02)"
|
|
939
|
+
},
|
|
940
|
+
"100%": {
|
|
941
|
+
boxShadow: "0 0 0 0 rgba(var(--joy-palette-primary-500), 0)",
|
|
942
|
+
transform: "scale(1)"
|
|
943
|
+
}
|
|
944
|
+
},
|
|
945
|
+
"&:hover": {
|
|
946
|
+
animation: "none",
|
|
947
|
+
transform: "scale(1.05)",
|
|
948
|
+
transition: "transform 0.2s ease"
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
infoButton: {
|
|
952
|
+
position: "absolute",
|
|
953
|
+
top: 8,
|
|
954
|
+
right: 8,
|
|
955
|
+
minWidth: 40,
|
|
956
|
+
p: 1
|
|
957
|
+
}
|
|
958
|
+
}, Dt = {
|
|
959
|
+
wrapper: {
|
|
960
|
+
cursor: "pointer",
|
|
961
|
+
border: "none",
|
|
962
|
+
"&:hover": { border: "none" },
|
|
963
|
+
"&:focus": { border: "none" },
|
|
964
|
+
"&:active": { border: "none" }
|
|
965
|
+
},
|
|
966
|
+
card: {
|
|
967
|
+
position: "absolute",
|
|
968
|
+
width: "100%",
|
|
969
|
+
height: "100%",
|
|
970
|
+
borderRadius: "sm",
|
|
971
|
+
border: "none",
|
|
972
|
+
"--Card-padding": "0px"
|
|
973
|
+
},
|
|
974
|
+
image: {
|
|
975
|
+
width: "100%",
|
|
976
|
+
height: "100%",
|
|
977
|
+
objectFit: "cover"
|
|
978
|
+
},
|
|
979
|
+
overlay: {
|
|
980
|
+
transition: "background 0.3s ease"
|
|
981
|
+
},
|
|
982
|
+
iconWrapper: {
|
|
983
|
+
position: "absolute",
|
|
984
|
+
top: "50%",
|
|
985
|
+
left: "50%",
|
|
986
|
+
transform: "translate(-50%, -50%)",
|
|
987
|
+
display: "flex",
|
|
988
|
+
alignItems: "center",
|
|
989
|
+
justifyContent: "center",
|
|
990
|
+
zIndex: 2
|
|
991
|
+
},
|
|
992
|
+
icon: {
|
|
993
|
+
fontSize: 64,
|
|
994
|
+
width: 64,
|
|
995
|
+
height: 64,
|
|
996
|
+
filter: "drop-shadow(0 2px 4px rgba(0,0,0,0.4))"
|
|
997
|
+
},
|
|
998
|
+
content: {
|
|
999
|
+
justifyContent: "flex-end",
|
|
1000
|
+
p: 2
|
|
1001
|
+
},
|
|
1002
|
+
label: {
|
|
1003
|
+
color: "#fff",
|
|
1004
|
+
textAlign: "center",
|
|
1005
|
+
fontWeight: 700,
|
|
1006
|
+
textShadow: "0 1px 2px rgba(0,0,0,0.4)"
|
|
1007
|
+
}
|
|
1008
|
+
}, ht = K(/* @__PURE__ */ l.jsx("path", {
|
|
1009
|
+
d: "M19 5h-2V3H7v2H5c-1.1 0-2 .9-2 2v1c0 2.55 1.92 4.63 4.39 4.94.63 1.5 1.98 2.63 3.61 2.96V19H7v2h10v-2h-4v-3.1c1.63-.33 2.98-1.46 3.61-2.96C19.08 12.63 21 10.55 21 8V7c0-1.1-.9-2-2-2M5 8V7h2v3.82C5.84 10.4 5 9.3 5 8m14 0c0 1.3-.84 2.4-2 2.82V7h2z"
|
|
1010
|
+
}), "EmojiEvents"), gt = K(/* @__PURE__ */ l.jsx("path", {
|
|
1011
|
+
d: "M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61M13 14h-2V8h2z"
|
|
1012
|
+
}), "Timer"), Ot = ({ onStart: t, game: e, signInCTA: r, showSignInCTA: o }) => {
|
|
1013
|
+
var m;
|
|
1014
|
+
const [s, n] = i.useState(!1), { t: a } = ve(), d = [
|
|
1015
|
+
{
|
|
1016
|
+
icon: /* @__PURE__ */ l.jsx(gt, {}),
|
|
1017
|
+
title: a("eitherOr.tutorial.step1Title"),
|
|
1018
|
+
description: a("eitherOr.tutorial.step1Description", { seconds: (e == null ? void 0 : e.time) ?? 10 })
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
icon: /* @__PURE__ */ l.jsx(ft, {}),
|
|
1022
|
+
title: a("eitherOr.tutorial.step2Title", { lives: (e == null ? void 0 : e.lives) ?? 3 }),
|
|
1023
|
+
description: a("eitherOr.tutorial.step2Description", { lives: (e == null ? void 0 : e.lives) ?? 3 })
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
icon: /* @__PURE__ */ l.jsx(ht, {}),
|
|
1027
|
+
title: a("eitherOr.tutorial.step3Title"),
|
|
1028
|
+
description: a("eitherOr.tutorial.step3Description")
|
|
1029
|
+
}
|
|
1030
|
+
];
|
|
1031
|
+
if (!e) return null;
|
|
1032
|
+
const c = ((m = e == null ? void 0 : e.images) == null ? void 0 : m.main) || Ce;
|
|
1033
|
+
return /* @__PURE__ */ l.jsxs(ie, { spacing: 3, children: [
|
|
1034
|
+
/* @__PURE__ */ l.jsx(Ee, { ratio: 16 / 9, children: /* @__PURE__ */ l.jsxs(le, { sx: { borderColor: "divider", "&:hover": { borderColor: "divider" } }, children: [
|
|
1035
|
+
/* @__PURE__ */ l.jsx(fe, { children: /* @__PURE__ */ l.jsx("img", { src: c, srcSet: `${c} 1x, ${c} 2x`, loading: "lazy", alt: e.title }) }),
|
|
1036
|
+
/* @__PURE__ */ l.jsx(fe, { sx: he.shadow }),
|
|
1037
|
+
/* @__PURE__ */ l.jsxs(Te, { sx: he.contentWrapper, children: [
|
|
1038
|
+
/* @__PURE__ */ l.jsx(U, { size: "sm", variant: "soft", color: "primary", onClick: () => n(!0), sx: B.infoButton, children: /* @__PURE__ */ l.jsx(pt, {}) }),
|
|
1039
|
+
/* @__PURE__ */ l.jsx(ie, { justifyContent: "center", alignItems: "center", spacing: 2, children: o && r ? /* @__PURE__ */ l.jsx(U, { size: "md", variant: "solid", color: "primary", onClick: r.onClick, sx: B.mainButton, children: r.defaultLabel }) : /* @__PURE__ */ l.jsx(U, { size: "md", variant: "solid", color: "primary", onClick: t, sx: B.mainButton, children: a("eitherOr.buttons.start") }) })
|
|
1040
|
+
] })
|
|
1041
|
+
] }) }),
|
|
1042
|
+
/* @__PURE__ */ l.jsx(it, { open: s, onClose: () => n(!1), children: /* @__PURE__ */ l.jsxs(ut, { children: [
|
|
1043
|
+
/* @__PURE__ */ l.jsx(_, { level: "h4", sx: { mb: 3, textAlign: "center" }, children: a("eitherOr.tutorial.howToPlay") }),
|
|
1044
|
+
/* @__PURE__ */ l.jsx(de, { container: !0, spacing: 2, sx: { overflow: "auto" }, children: d.map((f, h) => /* @__PURE__ */ l.jsx(de, { xs: 12, md: 4, children: /* @__PURE__ */ l.jsxs(le, { sx: B.ruleCard, variant: "outlined", children: [
|
|
1045
|
+
/* @__PURE__ */ l.jsx(ye, { sx: B.iconWrapper, children: f.icon }),
|
|
1046
|
+
/* @__PURE__ */ l.jsx(_, { level: "h4", sx: { mb: 1 }, children: f.title }),
|
|
1047
|
+
/* @__PURE__ */ l.jsx(_, { level: "body-sm", children: f.description })
|
|
1048
|
+
] }) }, h)) }),
|
|
1049
|
+
/* @__PURE__ */ l.jsx(U, { size: "lg", variant: "solid", color: "primary", onClick: () => n(!1), sx: { mt: 3, alignSelf: "center" }, children: a("common.close") })
|
|
1050
|
+
] }) })
|
|
1051
|
+
] });
|
|
1052
|
+
};
|
|
1053
|
+
export {
|
|
1054
|
+
fe as C,
|
|
1055
|
+
ft as F,
|
|
1056
|
+
St as G,
|
|
1057
|
+
pt as I,
|
|
1058
|
+
it as M,
|
|
1059
|
+
We as P,
|
|
1060
|
+
Ot as T,
|
|
1061
|
+
ut as a,
|
|
1062
|
+
Qe as b,
|
|
1063
|
+
Xe as c,
|
|
1064
|
+
et as d,
|
|
1065
|
+
Dt as e,
|
|
1066
|
+
kt as f,
|
|
1067
|
+
It as g,
|
|
1068
|
+
wt as h,
|
|
1069
|
+
jt as i,
|
|
1070
|
+
Pt as j,
|
|
1071
|
+
Tt as m
|
|
1072
|
+
};
|