fansunited-widgets-cdn 0.0.86-RC3 → 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-CuOsmojH.js → Alert-B6o66mYo.js} +39 -39
- package/chunks/{CardContent-CD-WZh1l.js → CardContent-NCZhfGcZ.js} +16 -16
- package/chunks/{Snackbar-DHxnbCA3.js → ChevronRight-1pLZ7T0v.js} +100 -94
- package/chunks/{ClassicQuizWrapper-t04e9_6c.js → ClassicQuizWrapper-n2epPO4k.js} +201 -205
- package/chunks/CollectLeadForm-C_3plJtn-Dr8J3eDw.js +3918 -0
- package/chunks/{CollectLeadWrapper-CVAVswua.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-BxyLL3eA.js → EventGameWrapper-BphusLTk.js} +208 -219
- package/chunks/{Grid-Dpv_ZL23.js → Grid-yjqNNhEx.js} +32 -32
- package/chunks/{IconButton-Lt9Xks7c.js → IconButton-D7onwgY0.js} +22 -22
- package/chunks/{List-DLPlZGTP.js → List-8Vy9IZiv.js} +26 -29
- package/chunks/{MatchPredictionContainer-Ct6gXvLw.js → MatchPredictionContainer-BGytBwLo.js} +52 -54
- package/chunks/{MatchQuizWrapper-Fu6RfWVn.js → MatchQuizWrapper-BGjldBpF.js} +73 -85
- package/chunks/{OverlayLeadAfterCollection-DnqztPJ5-CpELr0AC.js → OverlayLeadAfterCollection-Bjh1xAB5-DgVOuSX5.js} +104 -105
- package/chunks/{OverlayScoreStateSkeleton-C9FUhcnd-DMFELrvA.js → OverlayScoreStateSkeleton-Cha5KeNi-fyZTu-l5.js} +18 -19
- package/chunks/{PersonalityQuizWrapper-MpUK4n3Y.js → PersonalityQuizWrapper-BgLFw5tM.js} +3 -3
- package/chunks/{PlayerOfTheMatch-D4vuR7pz.js → PlayerOfTheMatch-CImBLG3T.js} +1008 -609
- package/chunks/{PollWrapper-CzKj8xxE.js → PollWrapper-QpIKCCVF.js} +30 -34
- package/chunks/Portal-DegkUXpU-ByGP9zS1.js +19236 -0
- package/chunks/{PreviewQuizById-WWS_LyJR.js → PreviewQuizById-Ba6yhxKV.js} +11 -14
- package/chunks/Sheet-U5EnSrgg.js +282 -0
- package/chunks/{Stack-Dgf2LXN0.js → Stack-DbDi7kPO.js} +30 -30
- package/chunks/Tabs-leN3Fb8D--YMyy3EM.js +783 -0
- package/chunks/{TeamNextMatchPrediction-C7HilNqW.js → TeamNextMatchPrediction-9VSQOCcC.js} +2 -2
- package/chunks/Tutorial-CRJLOovs.js +1072 -0
- package/chunks/createLucideIcon-CMWOQsDL.js +381 -0
- package/chunks/{createSvgIcon-DVA0KIUd.js → createSvgIcon-D9D4a1R9.js} +412 -390
- package/chunks/default-quiz-bg-ADjjIfPj.js +126 -0
- package/chunks/{index-C9MpfjqV.js → index-0ADq_9jd.js} +1 -1
- package/chunks/{index-DePIySlY.js → index-B74jHeYm.js} +2 -2
- package/chunks/{index-tzsdMoo-.js → index-BfVvJg5R.js} +1 -1
- package/chunks/{index-BqCHiyI6.js → index-BycLbIYY.js} +1 -1
- package/chunks/{index-DvgG9XJj.js → index-C6KAc5B_.js} +1 -1
- package/chunks/{index-24AwmTVJ.js → index-CHV6tlpH.js} +5 -5
- package/chunks/{index-C5qRf4TV.js → index-CILd3yUc.js} +1 -1
- package/chunks/index-CJqcqbHq.js +5 -0
- package/chunks/{index-CMmQs5A5.js → index-CK2RXrJm.js} +1 -1
- package/chunks/{index-BU6iona7.js → index-CPTAlr_t.js} +1 -1
- package/chunks/{index-DNeawo0R.js → index-CiB_Gqim.js} +1 -1
- package/chunks/{index-QpZE-92Y.js → index-CvGJXa6l.js} +1 -1
- package/chunks/{index-BSD7mvEU.js → index-CviTG4Nv.js} +1 -1
- package/chunks/index-DUQ2LFod-Cw45tHim.js +4510 -0
- package/chunks/{index-rgFj976B.js → index-Da0AXb_O.js} +1 -1
- package/chunks/{index-DoRYU_1L.js → index-DwR4J2nN.js} +1 -1
- package/chunks/{index-3vJS8JzK.js → index-UwW9niUj.js} +1 -1
- package/chunks/index.es-wHqA4PHm.js +11480 -0
- package/chunks/{init-BEkECL0v.js → init-C-gCorsh.js} +1 -1
- package/chunks/{main-XP7dqk6g.js → main-Bh6iw92_.js} +548 -564
- package/chunks/{Button-BV7YIFkS.js → resolveProps-Bgg0H6c2.js} +471 -313
- package/chunks/{users-D_xgC4iQ.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-D3Sgxj7p.js +0 -125
- package/chunks/Avatar-BTsEKfhc.js +0 -186
- package/chunks/Card-DRIT0wtY.js +0 -129
- package/chunks/ChevronRight-BrCKlr3T.js +0 -11
- package/chunks/Chip-6HLNTHMI.js +0 -281
- package/chunks/CollectLeadForm-DtmR2Vuf-B_3JkHJC.js +0 -1560
- package/chunks/DialogActions-C5kAgHal.js +0 -45
- package/chunks/DialogContent-MIXff4nd.js +0 -60
- package/chunks/EitherOrById-CAo8gPjm.js +0 -1496
- package/chunks/EitherOrPreviewWrapper-DFi2bviS.js +0 -47
- package/chunks/Error-DhQL89pn-BwTV1meb.js +0 -418
- package/chunks/Link-DLuj1USf.js +0 -228
- package/chunks/ListItemDecorator-CE2eQLip.js +0 -1882
- package/chunks/ModalDialog-Ci3hulZA.js +0 -619
- package/chunks/NotFoundSkeleton-BYJTzYJR-Be3R34nS.js +0 -2764
- package/chunks/Portal-BWqqFvVm-TuHZWjxn.js +0 -12717
- package/chunks/Portal-DA1mxzSo.js +0 -41
- package/chunks/Select-p_cHpLhi.js +0 -3418
- package/chunks/Sheet-BaCzogZK.js +0 -167
- package/chunks/Tabs-CSu_cWNi.js +0 -784
- package/chunks/Tutorial-DFNZxmAx.js +0 -427
- package/chunks/createLucideIcon-B6NxpYkb.js +0 -79
- package/chunks/createSvgIcon-7h7XC877.js +0 -119
- package/chunks/default-quiz-bg-CTzaADn7.js +0 -4
- package/chunks/getReactElementRef-BD-S8A24.js +0 -25
- package/chunks/index-CicEY2Jv.js +0 -5
- package/chunks/index.es-CHqz6mjo.js +0 -6162
- package/chunks/resolveProps-BfYZubfk.js +0 -37
- package/chunks/variantColorInheritance-DI3wUohX.js +0 -28
|
@@ -0,0 +1,4510 @@
|
|
|
1
|
+
import { j as n, r as D } from "./main-Bh6iw92_.js";
|
|
2
|
+
import { C as m, b0 as oi, A as H, N as ie, F as Y, b as w, R as ce, D as de, J as tt, V as Q, c as re, e as ni, a as ue, Q as _e, i as W, s as it, M as ri, _ as At, f as ot, d as nt, G as wt, E as Lt, T as pe, z as ai, l as si, S as Le, v as Se, x as Ee, P as V, K as ae, U, aJ as Ne, af as li, y as Qe, ag as je, aG as ci, a3 as ve, Z as Nt, a8 as di, b1 as ui, av as hi, a1 as Te, ad as q, b2 as pi, aL as le, aK as fi, a4 as oe, ap as Re, aw as mi, aN as gi, aO as xi, aC as rt, b3 as Pt, b4 as Mt } from "./Portal-DegkUXpU-ByGP9zS1.js";
|
|
3
|
+
var yi = Object.defineProperty, bi = (e, t, i) => t in e ? yi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, r = (e, t, i) => bi(e, typeof t != "symbol" ? t + "" : t, i);
|
|
4
|
+
const vi = Pt(Mt.element);
|
|
5
|
+
vi.isRequired = Pt(Mt.element.isRequired);
|
|
6
|
+
function bt(...e) {
|
|
7
|
+
return e.reduce((t, i) => i == null ? t : function(...o) {
|
|
8
|
+
t.apply(this, o), i.apply(this, o);
|
|
9
|
+
}, () => {
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function Ci(e) {
|
|
13
|
+
const t = e.documentElement.clientWidth;
|
|
14
|
+
return Math.abs(window.innerWidth - t);
|
|
15
|
+
}
|
|
16
|
+
const _i = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
|
|
17
|
+
function Si(e) {
|
|
18
|
+
const t = parseInt(e.getAttribute("tabindex") || "", 10);
|
|
19
|
+
return Number.isNaN(t) ? e.contentEditable === "true" || (e.nodeName === "AUDIO" || e.nodeName === "VIDEO" || e.nodeName === "DETAILS") && e.getAttribute("tabindex") === null ? 0 : e.tabIndex : t;
|
|
20
|
+
}
|
|
21
|
+
function Ei(e) {
|
|
22
|
+
if (e.tagName !== "INPUT" || e.type !== "radio" || !e.name)
|
|
23
|
+
return !1;
|
|
24
|
+
const t = (o) => e.ownerDocument.querySelector(`input[type="radio"]${o}`);
|
|
25
|
+
let i = t(`[name="${e.name}"]:checked`);
|
|
26
|
+
return i || (i = t(`[name="${e.name}"]`)), i !== e;
|
|
27
|
+
}
|
|
28
|
+
function Ti(e) {
|
|
29
|
+
return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" || Ei(e));
|
|
30
|
+
}
|
|
31
|
+
function Ri(e) {
|
|
32
|
+
const t = [], i = [];
|
|
33
|
+
return Array.from(e.querySelectorAll(_i)).forEach((o, a) => {
|
|
34
|
+
const s = Si(o);
|
|
35
|
+
s === -1 || !Ti(o) || (s === 0 ? t.push(o) : i.push({
|
|
36
|
+
documentOrder: a,
|
|
37
|
+
tabIndex: s,
|
|
38
|
+
node: o
|
|
39
|
+
}));
|
|
40
|
+
}), i.sort((o, a) => o.tabIndex === a.tabIndex ? o.documentOrder - a.documentOrder : o.tabIndex - a.tabIndex).map((o) => o.node).concat(t);
|
|
41
|
+
}
|
|
42
|
+
function Ii() {
|
|
43
|
+
return !0;
|
|
44
|
+
}
|
|
45
|
+
function Oi(e) {
|
|
46
|
+
const {
|
|
47
|
+
children: t,
|
|
48
|
+
disableAutoFocus: i = !1,
|
|
49
|
+
disableEnforceFocus: o = !1,
|
|
50
|
+
disableRestoreFocus: a = !1,
|
|
51
|
+
getTabbable: s = Ri,
|
|
52
|
+
isEnabled: p = Ii,
|
|
53
|
+
open: d
|
|
54
|
+
} = e, b = D.useRef(!1), c = D.useRef(null), f = D.useRef(null), x = D.useRef(null), v = D.useRef(null), g = D.useRef(!1), y = D.useRef(null), R = ve(t.ref, y), O = D.useRef(null);
|
|
55
|
+
D.useEffect(() => {
|
|
56
|
+
!d || !y.current || (g.current = !i);
|
|
57
|
+
}, [i, d]), D.useEffect(() => {
|
|
58
|
+
if (!d || !y.current)
|
|
59
|
+
return;
|
|
60
|
+
const S = le(y.current);
|
|
61
|
+
return y.current.contains(S.activeElement) || (y.current.hasAttribute("tabIndex") || y.current.setAttribute("tabIndex", "-1"), g.current && y.current.focus()), () => {
|
|
62
|
+
a || (x.current && x.current.focus && (b.current = !0, x.current.focus()), x.current = null);
|
|
63
|
+
};
|
|
64
|
+
}, [d]), D.useEffect(() => {
|
|
65
|
+
if (!d || !y.current)
|
|
66
|
+
return;
|
|
67
|
+
const S = le(y.current), I = (h) => {
|
|
68
|
+
O.current = h, !(o || !p() || h.key !== "Tab") && S.activeElement === y.current && h.shiftKey && (b.current = !0, f.current && f.current.focus());
|
|
69
|
+
}, L = () => {
|
|
70
|
+
const h = y.current;
|
|
71
|
+
if (h === null)
|
|
72
|
+
return;
|
|
73
|
+
if (!S.hasFocus() || !p() || b.current) {
|
|
74
|
+
b.current = !1;
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (h.contains(S.activeElement) || o && S.activeElement !== c.current && S.activeElement !== f.current)
|
|
78
|
+
return;
|
|
79
|
+
if (S.activeElement !== v.current)
|
|
80
|
+
v.current = null;
|
|
81
|
+
else if (v.current !== null)
|
|
82
|
+
return;
|
|
83
|
+
if (!g.current)
|
|
84
|
+
return;
|
|
85
|
+
let u = [];
|
|
86
|
+
if ((S.activeElement === c.current || S.activeElement === f.current) && (u = s(y.current)), u.length > 0) {
|
|
87
|
+
var _, C;
|
|
88
|
+
const E = !!((_ = O.current) != null && _.shiftKey && ((C = O.current) == null ? void 0 : C.key) === "Tab"), N = u[0], P = u[u.length - 1];
|
|
89
|
+
typeof N != "string" && typeof P != "string" && (E ? P.focus() : N.focus());
|
|
90
|
+
} else
|
|
91
|
+
h.focus();
|
|
92
|
+
};
|
|
93
|
+
S.addEventListener("focusin", L), S.addEventListener("keydown", I, !0);
|
|
94
|
+
const l = setInterval(() => {
|
|
95
|
+
S.activeElement && S.activeElement.tagName === "BODY" && L();
|
|
96
|
+
}, 50);
|
|
97
|
+
return () => {
|
|
98
|
+
clearInterval(l), S.removeEventListener("focusin", L), S.removeEventListener("keydown", I, !0);
|
|
99
|
+
};
|
|
100
|
+
}, [i, o, a, p, d, s]);
|
|
101
|
+
const A = (S) => {
|
|
102
|
+
x.current === null && (x.current = S.relatedTarget), g.current = !0, v.current = S.target;
|
|
103
|
+
const I = t.props.onFocus;
|
|
104
|
+
I && I(S);
|
|
105
|
+
}, T = (S) => {
|
|
106
|
+
x.current === null && (x.current = S.relatedTarget), g.current = !0;
|
|
107
|
+
};
|
|
108
|
+
return /* @__PURE__ */ n.jsxs(D.Fragment, {
|
|
109
|
+
children: [/* @__PURE__ */ n.jsx("div", {
|
|
110
|
+
tabIndex: d ? 0 : -1,
|
|
111
|
+
onFocus: T,
|
|
112
|
+
ref: c,
|
|
113
|
+
"data-testid": "sentinelStart"
|
|
114
|
+
}), /* @__PURE__ */ D.cloneElement(t, {
|
|
115
|
+
ref: R,
|
|
116
|
+
onFocus: A
|
|
117
|
+
}), /* @__PURE__ */ n.jsx("div", {
|
|
118
|
+
tabIndex: d ? 0 : -1,
|
|
119
|
+
onFocus: T,
|
|
120
|
+
ref: f,
|
|
121
|
+
"data-testid": "sentinelEnd"
|
|
122
|
+
})]
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function Di(e) {
|
|
126
|
+
const t = le(e);
|
|
127
|
+
return t.body === e ? rt(e).innerWidth > t.documentElement.clientWidth : e.scrollHeight > e.clientHeight;
|
|
128
|
+
}
|
|
129
|
+
function Ce(e, t) {
|
|
130
|
+
t ? e.setAttribute("aria-hidden", "true") : e.removeAttribute("aria-hidden");
|
|
131
|
+
}
|
|
132
|
+
function vt(e) {
|
|
133
|
+
return parseInt(rt(e).getComputedStyle(e).paddingRight, 10) || 0;
|
|
134
|
+
}
|
|
135
|
+
function Ai(e) {
|
|
136
|
+
const t = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].indexOf(e.tagName) !== -1, i = e.tagName === "INPUT" && e.getAttribute("type") === "hidden";
|
|
137
|
+
return t || i;
|
|
138
|
+
}
|
|
139
|
+
function Ct(e, t, i, o, a) {
|
|
140
|
+
const s = [t, i, ...o];
|
|
141
|
+
[].forEach.call(e.children, (p) => {
|
|
142
|
+
const d = s.indexOf(p) === -1, b = !Ai(p);
|
|
143
|
+
d && b && Ce(p, a);
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
function Ye(e, t) {
|
|
147
|
+
let i = -1;
|
|
148
|
+
return e.some((o, a) => t(o) ? (i = a, !0) : !1), i;
|
|
149
|
+
}
|
|
150
|
+
function wi(e, t) {
|
|
151
|
+
const i = [], o = e.container;
|
|
152
|
+
if (!t.disableScrollLock) {
|
|
153
|
+
if (Di(o)) {
|
|
154
|
+
const s = Ci(le(o));
|
|
155
|
+
i.push({
|
|
156
|
+
value: o.style.paddingRight,
|
|
157
|
+
property: "padding-right",
|
|
158
|
+
el: o
|
|
159
|
+
}), o.style.paddingRight = `${vt(o) + s}px`;
|
|
160
|
+
const p = le(o).querySelectorAll(".mui-fixed");
|
|
161
|
+
[].forEach.call(p, (d) => {
|
|
162
|
+
i.push({
|
|
163
|
+
value: d.style.paddingRight,
|
|
164
|
+
property: "padding-right",
|
|
165
|
+
el: d
|
|
166
|
+
}), d.style.paddingRight = `${vt(d) + s}px`;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
let a;
|
|
170
|
+
if (o.parentNode instanceof DocumentFragment)
|
|
171
|
+
a = le(o).body;
|
|
172
|
+
else {
|
|
173
|
+
const s = o.parentElement, p = rt(o);
|
|
174
|
+
a = (s == null ? void 0 : s.nodeName) === "HTML" && p.getComputedStyle(s).overflowY === "scroll" ? s : o;
|
|
175
|
+
}
|
|
176
|
+
i.push({
|
|
177
|
+
value: a.style.overflow,
|
|
178
|
+
property: "overflow",
|
|
179
|
+
el: a
|
|
180
|
+
}, {
|
|
181
|
+
value: a.style.overflowX,
|
|
182
|
+
property: "overflow-x",
|
|
183
|
+
el: a
|
|
184
|
+
}, {
|
|
185
|
+
value: a.style.overflowY,
|
|
186
|
+
property: "overflow-y",
|
|
187
|
+
el: a
|
|
188
|
+
}), a.style.overflow = "hidden";
|
|
189
|
+
}
|
|
190
|
+
return () => {
|
|
191
|
+
i.forEach(({
|
|
192
|
+
value: a,
|
|
193
|
+
el: s,
|
|
194
|
+
property: p
|
|
195
|
+
}) => {
|
|
196
|
+
a ? s.style.setProperty(p, a) : s.style.removeProperty(p);
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function Li(e) {
|
|
201
|
+
const t = [];
|
|
202
|
+
return [].forEach.call(e.children, (i) => {
|
|
203
|
+
i.getAttribute("aria-hidden") === "true" && t.push(i);
|
|
204
|
+
}), t;
|
|
205
|
+
}
|
|
206
|
+
class Ni {
|
|
207
|
+
constructor() {
|
|
208
|
+
this.containers = void 0, this.modals = void 0, this.modals = [], this.containers = [];
|
|
209
|
+
}
|
|
210
|
+
add(t, i) {
|
|
211
|
+
let o = this.modals.indexOf(t);
|
|
212
|
+
if (o !== -1)
|
|
213
|
+
return o;
|
|
214
|
+
o = this.modals.length, this.modals.push(t), t.modalRef && Ce(t.modalRef, !1);
|
|
215
|
+
const a = Li(i);
|
|
216
|
+
Ct(i, t.mount, t.modalRef, a, !0);
|
|
217
|
+
const s = Ye(this.containers, (p) => p.container === i);
|
|
218
|
+
return s !== -1 ? (this.containers[s].modals.push(t), o) : (this.containers.push({
|
|
219
|
+
modals: [t],
|
|
220
|
+
container: i,
|
|
221
|
+
restore: null,
|
|
222
|
+
hiddenSiblings: a
|
|
223
|
+
}), o);
|
|
224
|
+
}
|
|
225
|
+
mount(t, i) {
|
|
226
|
+
const o = Ye(this.containers, (s) => s.modals.indexOf(t) !== -1), a = this.containers[o];
|
|
227
|
+
a.restore || (a.restore = wi(a, i));
|
|
228
|
+
}
|
|
229
|
+
remove(t, i = !0) {
|
|
230
|
+
const o = this.modals.indexOf(t);
|
|
231
|
+
if (o === -1)
|
|
232
|
+
return o;
|
|
233
|
+
const a = Ye(this.containers, (p) => p.modals.indexOf(t) !== -1), s = this.containers[a];
|
|
234
|
+
if (s.modals.splice(s.modals.indexOf(t), 1), this.modals.splice(o, 1), s.modals.length === 0)
|
|
235
|
+
s.restore && s.restore(), t.modalRef && Ce(t.modalRef, i), Ct(s.container, t.mount, t.modalRef, s.hiddenSiblings, !1), this.containers.splice(a, 1);
|
|
236
|
+
else {
|
|
237
|
+
const p = s.modals[s.modals.length - 1];
|
|
238
|
+
p.modalRef && Ce(p.modalRef, !1);
|
|
239
|
+
}
|
|
240
|
+
return o;
|
|
241
|
+
}
|
|
242
|
+
isTopModal(t) {
|
|
243
|
+
return this.modals.length > 0 && this.modals[this.modals.length - 1] === t;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
function Pi(e) {
|
|
247
|
+
return typeof e == "function" ? e() : e;
|
|
248
|
+
}
|
|
249
|
+
function Mi(e) {
|
|
250
|
+
return e ? e.props.hasOwnProperty("in") : !1;
|
|
251
|
+
}
|
|
252
|
+
const ji = new Ni();
|
|
253
|
+
function ki(e) {
|
|
254
|
+
const {
|
|
255
|
+
container: t,
|
|
256
|
+
disableEscapeKeyDown: i = !1,
|
|
257
|
+
disableScrollLock: o = !1,
|
|
258
|
+
// @ts-ignore internal logic - Base UI supports the manager as a prop too
|
|
259
|
+
manager: a = ji,
|
|
260
|
+
closeAfterTransition: s = !1,
|
|
261
|
+
onTransitionEnter: p,
|
|
262
|
+
onTransitionExited: d,
|
|
263
|
+
children: b,
|
|
264
|
+
onClose: c,
|
|
265
|
+
open: f,
|
|
266
|
+
rootRef: x
|
|
267
|
+
} = e, v = D.useRef({}), g = D.useRef(null), y = D.useRef(null), R = ve(y, x), [O, A] = D.useState(!f), T = Mi(b);
|
|
268
|
+
let S = !0;
|
|
269
|
+
(e["aria-hidden"] === "false" || e["aria-hidden"] === !1) && (S = !1);
|
|
270
|
+
const I = () => le(g.current), L = () => (v.current.modalRef = y.current, v.current.mount = g.current, v.current), l = () => {
|
|
271
|
+
a.mount(L(), {
|
|
272
|
+
disableScrollLock: o
|
|
273
|
+
}), y.current && (y.current.scrollTop = 0);
|
|
274
|
+
}, h = je(() => {
|
|
275
|
+
const P = Pi(t) || I().body;
|
|
276
|
+
a.add(L(), P), y.current && l();
|
|
277
|
+
}), u = D.useCallback(() => a.isTopModal(L()), [a]), _ = je((P) => {
|
|
278
|
+
g.current = P, P && (f && u() ? l() : y.current && Ce(y.current, S));
|
|
279
|
+
}), C = D.useCallback(() => {
|
|
280
|
+
a.remove(L(), S);
|
|
281
|
+
}, [S, a]);
|
|
282
|
+
D.useEffect(() => () => {
|
|
283
|
+
C();
|
|
284
|
+
}, [C]), D.useEffect(() => {
|
|
285
|
+
f ? h() : (!T || !s) && C();
|
|
286
|
+
}, [f, C, T, s, h]);
|
|
287
|
+
const E = (P) => (M) => {
|
|
288
|
+
var F;
|
|
289
|
+
(F = P.onKeyDown) == null || F.call(P, M), !(M.key !== "Escape" || M.which === 229 || // Wait until IME is settled.
|
|
290
|
+
!u()) && (i || (M.stopPropagation(), c && c(M, "escapeKeyDown")));
|
|
291
|
+
}, N = (P) => (M) => {
|
|
292
|
+
var F;
|
|
293
|
+
(F = P.onClick) == null || F.call(P, M), M.target === M.currentTarget && c && c(M, "backdropClick");
|
|
294
|
+
};
|
|
295
|
+
return {
|
|
296
|
+
getRootProps: (P = {}) => {
|
|
297
|
+
const M = fi(e);
|
|
298
|
+
delete M.onTransitionEnter, delete M.onTransitionExited;
|
|
299
|
+
const F = V({}, M, P);
|
|
300
|
+
return V({
|
|
301
|
+
role: "presentation"
|
|
302
|
+
}, F, {
|
|
303
|
+
onKeyDown: E(F),
|
|
304
|
+
ref: R
|
|
305
|
+
});
|
|
306
|
+
},
|
|
307
|
+
getBackdropProps: (P = {}) => {
|
|
308
|
+
const M = P;
|
|
309
|
+
return V({
|
|
310
|
+
"aria-hidden": !0
|
|
311
|
+
}, M, {
|
|
312
|
+
onClick: N(M),
|
|
313
|
+
open: f
|
|
314
|
+
});
|
|
315
|
+
},
|
|
316
|
+
getTransitionProps: () => {
|
|
317
|
+
const P = () => {
|
|
318
|
+
A(!1), p && p();
|
|
319
|
+
}, M = () => {
|
|
320
|
+
A(!0), d && d(), s && C();
|
|
321
|
+
};
|
|
322
|
+
return {
|
|
323
|
+
onEnter: bt(P, b == null ? void 0 : b.props.onEnter),
|
|
324
|
+
onExited: bt(M, b == null ? void 0 : b.props.onExited)
|
|
325
|
+
};
|
|
326
|
+
},
|
|
327
|
+
rootRef: R,
|
|
328
|
+
portalRef: _,
|
|
329
|
+
isTopModal: u,
|
|
330
|
+
exited: O,
|
|
331
|
+
hasTransition: T
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
function Fi(e) {
|
|
335
|
+
return Re("MuiAspectRatio", e);
|
|
336
|
+
}
|
|
337
|
+
oe("MuiAspectRatio", ["root", "content", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid"]);
|
|
338
|
+
const Vi = ["children", "ratio", "minHeight", "maxHeight", "objectFit", "color", "variant", "component", "flex", "slots", "slotProps"], Hi = (e) => {
|
|
339
|
+
const {
|
|
340
|
+
variant: t,
|
|
341
|
+
color: i
|
|
342
|
+
} = e, o = {
|
|
343
|
+
root: ["root"],
|
|
344
|
+
content: ["content", t && `variant${q(t)}`, i && `color${q(i)}`]
|
|
345
|
+
};
|
|
346
|
+
return Te(o, Fi, {});
|
|
347
|
+
}, zi = U("div", {
|
|
348
|
+
name: "JoyAspectRatio",
|
|
349
|
+
slot: "Root",
|
|
350
|
+
overridesResolver: (e, t) => t.root
|
|
351
|
+
})(({
|
|
352
|
+
ownerState: e,
|
|
353
|
+
theme: t
|
|
354
|
+
}) => {
|
|
355
|
+
const i = typeof e.minHeight == "number" ? `${e.minHeight}px` : e.minHeight, o = typeof e.maxHeight == "number" ? `${e.maxHeight}px` : e.maxHeight;
|
|
356
|
+
return {
|
|
357
|
+
// a context variable for any child component
|
|
358
|
+
"--AspectRatio-paddingBottom": `clamp(var(--AspectRatio-minHeight), calc(100% / (${e.ratio})), var(--AspectRatio-maxHeight))`,
|
|
359
|
+
"--AspectRatio-maxHeight": o || "9999px",
|
|
360
|
+
"--AspectRatio-minHeight": i || "0px",
|
|
361
|
+
"--Icon-color": e.color !== "neutral" || e.variant === "solid" ? "currentColor" : t.vars.palette.text.icon,
|
|
362
|
+
borderRadius: "var(--AspectRatio-radius)",
|
|
363
|
+
display: e.flex ? "flex" : "block",
|
|
364
|
+
flex: e.flex ? 1 : "initial",
|
|
365
|
+
flexDirection: "column",
|
|
366
|
+
margin: "var(--AspectRatio-margin)"
|
|
367
|
+
};
|
|
368
|
+
}), Gi = U("div", {
|
|
369
|
+
name: "JoyAspectRatio",
|
|
370
|
+
slot: "Content",
|
|
371
|
+
overridesResolver: (e, t) => t.content
|
|
372
|
+
})(({
|
|
373
|
+
theme: e,
|
|
374
|
+
ownerState: t
|
|
375
|
+
}) => {
|
|
376
|
+
var i;
|
|
377
|
+
return V({
|
|
378
|
+
flex: 1,
|
|
379
|
+
position: "relative",
|
|
380
|
+
borderRadius: "inherit",
|
|
381
|
+
height: 0,
|
|
382
|
+
paddingBottom: "calc(var(--AspectRatio-paddingBottom) - 2 * var(--variant-borderWidth, 0px))",
|
|
383
|
+
overflow: "hidden",
|
|
384
|
+
transition: "inherit",
|
|
385
|
+
// makes it easy to add transition to the content
|
|
386
|
+
// use data-attribute instead of :first-child to support zero config SSR (emotion)
|
|
387
|
+
// use nested selector for integrating with nextjs image `fill` layout (spans are inserted on top of the img)
|
|
388
|
+
"& [data-first-child]": {
|
|
389
|
+
display: "flex",
|
|
390
|
+
justifyContent: "center",
|
|
391
|
+
alignItems: "center",
|
|
392
|
+
boxSizing: "border-box",
|
|
393
|
+
position: "absolute",
|
|
394
|
+
width: "100%",
|
|
395
|
+
height: "100%",
|
|
396
|
+
objectFit: t.objectFit,
|
|
397
|
+
margin: 0,
|
|
398
|
+
padding: 0,
|
|
399
|
+
"& > img": {
|
|
400
|
+
// support art-direction that uses <picture><img /></picture>
|
|
401
|
+
width: "100%",
|
|
402
|
+
height: "100%",
|
|
403
|
+
objectFit: t.objectFit
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}, e.typography["body-md"], (i = e.variants[t.variant]) == null ? void 0 : i[t.color]);
|
|
407
|
+
}), Ze = /* @__PURE__ */ D.forwardRef(function(e, t) {
|
|
408
|
+
const i = Se({
|
|
409
|
+
props: e,
|
|
410
|
+
name: "JoyAspectRatio"
|
|
411
|
+
}), {
|
|
412
|
+
children: o,
|
|
413
|
+
ratio: a = "16 / 9",
|
|
414
|
+
minHeight: s,
|
|
415
|
+
maxHeight: p,
|
|
416
|
+
objectFit: d = "cover",
|
|
417
|
+
color: b = "neutral",
|
|
418
|
+
variant: c = "soft",
|
|
419
|
+
component: f,
|
|
420
|
+
flex: x = !1,
|
|
421
|
+
slots: v = {},
|
|
422
|
+
slotProps: g = {}
|
|
423
|
+
} = i, y = Ee(i, Vi), R = V({}, i, {
|
|
424
|
+
flex: x,
|
|
425
|
+
minHeight: s,
|
|
426
|
+
maxHeight: p,
|
|
427
|
+
objectFit: d,
|
|
428
|
+
ratio: a,
|
|
429
|
+
color: b,
|
|
430
|
+
variant: c
|
|
431
|
+
}), O = Hi(R), A = V({}, y, {
|
|
432
|
+
component: f,
|
|
433
|
+
slots: v,
|
|
434
|
+
slotProps: g
|
|
435
|
+
}), [T, S] = ae("root", {
|
|
436
|
+
ref: t,
|
|
437
|
+
className: O.root,
|
|
438
|
+
elementType: zi,
|
|
439
|
+
externalForwardedProps: A,
|
|
440
|
+
ownerState: R
|
|
441
|
+
}), [I, L] = ae("content", {
|
|
442
|
+
className: O.content,
|
|
443
|
+
elementType: Gi,
|
|
444
|
+
externalForwardedProps: A,
|
|
445
|
+
ownerState: R
|
|
446
|
+
});
|
|
447
|
+
return /* @__PURE__ */ n.jsx(T, V({}, S, {
|
|
448
|
+
children: /* @__PURE__ */ n.jsx(I, V({}, L, {
|
|
449
|
+
children: D.Children.map(o, (l, h) => h === 0 && /* @__PURE__ */ D.isValidElement(l) ? /* @__PURE__ */ D.cloneElement(l, {
|
|
450
|
+
"data-first-child": ""
|
|
451
|
+
}) : l)
|
|
452
|
+
}))
|
|
453
|
+
}));
|
|
454
|
+
}), Sn = oe("MuiCard", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "sizeSm", "sizeMd", "sizeLg", "horizontal", "vertical"]), jt = U("div")(({
|
|
455
|
+
theme: e,
|
|
456
|
+
ownerState: t
|
|
457
|
+
}) => {
|
|
458
|
+
var i;
|
|
459
|
+
const {
|
|
460
|
+
p: o,
|
|
461
|
+
padding: a,
|
|
462
|
+
borderRadius: s
|
|
463
|
+
} = mi({
|
|
464
|
+
theme: e,
|
|
465
|
+
ownerState: t
|
|
466
|
+
}, ["p", "padding", "borderRadius"]);
|
|
467
|
+
return [V({
|
|
468
|
+
"--Icon-color": t.color !== "neutral" || t.variant === "solid" ? "currentColor" : e.vars.palette.text.icon,
|
|
469
|
+
// a context variable for any child component
|
|
470
|
+
"--Card-childRadius": "max((var(--Card-radius) - var(--variant-borderWidth, 0px)) - var(--Card-padding), min(var(--Card-padding) / 2, (var(--Card-radius) - var(--variant-borderWidth, 0px)) / 2))",
|
|
471
|
+
// AspectRatio integration
|
|
472
|
+
"--AspectRatio-radius": "var(--Card-childRadius)",
|
|
473
|
+
// Link integration
|
|
474
|
+
"--unstable_actionMargin": "calc(-1 * var(--variant-borderWidth, 0px))",
|
|
475
|
+
// Link, Radio, Checkbox integration
|
|
476
|
+
"--unstable_actionRadius": "var(--Card-radius)",
|
|
477
|
+
// CardCover integration
|
|
478
|
+
"--CardCover-radius": "calc(var(--Card-radius) - var(--variant-borderWidth, 0px))",
|
|
479
|
+
// CardOverflow integration
|
|
480
|
+
"--CardOverflow-offset": "calc(-1 * var(--Card-padding))",
|
|
481
|
+
"--CardOverflow-radius": "calc(var(--Card-radius) - var(--variant-borderWidth, 0px))",
|
|
482
|
+
// Divider integration
|
|
483
|
+
"--Divider-inset": "calc(-1 * var(--Card-padding))"
|
|
484
|
+
}, t.size === "sm" && {
|
|
485
|
+
"--Card-radius": e.vars.radius.sm,
|
|
486
|
+
"--Card-padding": "0.625rem",
|
|
487
|
+
gap: "0.5rem"
|
|
488
|
+
}, t.size === "md" && {
|
|
489
|
+
"--Card-radius": e.vars.radius.md,
|
|
490
|
+
"--Card-padding": "1rem",
|
|
491
|
+
gap: "0.75rem 1rem"
|
|
492
|
+
}, t.size === "lg" && {
|
|
493
|
+
"--Card-radius": e.vars.radius.lg,
|
|
494
|
+
"--Card-padding": "1.5rem",
|
|
495
|
+
gap: "1rem 1.5rem"
|
|
496
|
+
}, {
|
|
497
|
+
padding: "var(--Card-padding)",
|
|
498
|
+
borderRadius: "var(--Card-radius)",
|
|
499
|
+
backgroundColor: e.vars.palette.background.surface,
|
|
500
|
+
position: "relative",
|
|
501
|
+
display: "flex",
|
|
502
|
+
flexDirection: t.orientation === "horizontal" ? "row" : "column"
|
|
503
|
+
}, e.typography[`body-${t.size}`], t.variant === "solid" && t.color && t.invertedColors && gi(t.color)(e), t.variant === "soft" && t.color && t.invertedColors && xi(t.color)(e), (i = e.variants[t.variant]) == null ? void 0 : i[t.color]), o !== void 0 && {
|
|
504
|
+
"--Card-padding": o
|
|
505
|
+
}, a !== void 0 && {
|
|
506
|
+
"--Card-padding": a
|
|
507
|
+
}, s !== void 0 && {
|
|
508
|
+
"--Card-radius": s
|
|
509
|
+
}];
|
|
510
|
+
});
|
|
511
|
+
U(jt, {
|
|
512
|
+
name: "JoyCard",
|
|
513
|
+
slot: "Root",
|
|
514
|
+
overridesResolver: (e, t) => t.root
|
|
515
|
+
})({});
|
|
516
|
+
const Wi = oe("MuiCardOverflow", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid"]);
|
|
517
|
+
oe("MuiCardContent", ["root"]);
|
|
518
|
+
const kt = U("div")(({
|
|
519
|
+
ownerState: e
|
|
520
|
+
}) => ({
|
|
521
|
+
display: "flex",
|
|
522
|
+
flexDirection: e.orientation === "horizontal" ? "row" : "column",
|
|
523
|
+
flex: 9999,
|
|
524
|
+
// fill the available space in the Card and also shrink if needed
|
|
525
|
+
zIndex: 1,
|
|
526
|
+
columnGap: "var(--Card-padding)",
|
|
527
|
+
rowGap: "max(2px, calc(0.1875 * var(--Card-padding)))",
|
|
528
|
+
padding: "var(--unstable_padding)",
|
|
529
|
+
[`.${Wi.root} > &`]: {
|
|
530
|
+
"--unstable_padding": "calc(var(--Card-padding) * 0.75) 0px"
|
|
531
|
+
}
|
|
532
|
+
}));
|
|
533
|
+
U(kt, {
|
|
534
|
+
name: "JoyCardContent",
|
|
535
|
+
slot: "Root",
|
|
536
|
+
overridesResolver: (e, t) => t.root
|
|
537
|
+
})({});
|
|
538
|
+
function Bi(e) {
|
|
539
|
+
return Re("MuiModalDialog", e);
|
|
540
|
+
}
|
|
541
|
+
const Ui = oe("MuiModalDialog", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "sizeSm", "sizeMd", "sizeLg", "layoutCenter", "layoutFullscreen"]);
|
|
542
|
+
function Yi(e) {
|
|
543
|
+
return Re("MuiDialogContent", e);
|
|
544
|
+
}
|
|
545
|
+
oe("MuiDialogContent", ["root"]);
|
|
546
|
+
const Ft = /* @__PURE__ */ D.createContext(void 0), $i = oe("MuiDialogTitle", ["root", "h1", "h2", "h3", "h4", "title-lg", "title-md", "title-sm", "body-lg", "body-md", "body-sm", "body-xs", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid"]), Ki = ["component", "children", "orientation", "slots", "slotProps"], Xi = () => Te({
|
|
547
|
+
root: ["root"]
|
|
548
|
+
}, Yi, {}), Ji = U(kt, {
|
|
549
|
+
name: "JoyDialogContent",
|
|
550
|
+
slot: "Root",
|
|
551
|
+
overridesResolver: (e, t) => t.root
|
|
552
|
+
})(({
|
|
553
|
+
theme: e
|
|
554
|
+
}) => ({
|
|
555
|
+
color: `var(--DialogContent-color, ${e.vars.palette.text.tertiary})`,
|
|
556
|
+
overflow: "auto",
|
|
557
|
+
margin: "var(--unstable_DialogContent-margin)",
|
|
558
|
+
[`.${Ui.root} > .${$i.root} + &`]: {
|
|
559
|
+
"--unstable_DialogContent-margin": "-0.375em 0 0 0"
|
|
560
|
+
}
|
|
561
|
+
})), qi = /* @__PURE__ */ D.forwardRef(function(e, t) {
|
|
562
|
+
const i = Se({
|
|
563
|
+
props: e,
|
|
564
|
+
name: "JoyDialogContent"
|
|
565
|
+
}), o = D.useContext(Ft), {
|
|
566
|
+
component: a = "div",
|
|
567
|
+
children: s,
|
|
568
|
+
orientation: p = "vertical",
|
|
569
|
+
slots: d = {},
|
|
570
|
+
slotProps: b = {}
|
|
571
|
+
} = i, c = Ee(i, Ki), f = V({}, c, {
|
|
572
|
+
component: a,
|
|
573
|
+
slots: d,
|
|
574
|
+
slotProps: b
|
|
575
|
+
}), x = V({}, i, {
|
|
576
|
+
component: a,
|
|
577
|
+
orientation: p
|
|
578
|
+
}), v = Xi(), [g, y] = ae("root", {
|
|
579
|
+
ref: t,
|
|
580
|
+
className: v.root,
|
|
581
|
+
elementType: Ji,
|
|
582
|
+
externalForwardedProps: f,
|
|
583
|
+
ownerState: x,
|
|
584
|
+
additionalProps: {
|
|
585
|
+
id: o == null ? void 0 : o.describedBy
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
return /* @__PURE__ */ n.jsx(g, V({}, y, {
|
|
589
|
+
children: s
|
|
590
|
+
}));
|
|
591
|
+
}), Qi = /* @__PURE__ */ D.createContext(void 0);
|
|
592
|
+
function Zi(e) {
|
|
593
|
+
return Re("MuiModal", e);
|
|
594
|
+
}
|
|
595
|
+
oe("MuiModal", ["root", "hidden", "backdrop"]);
|
|
596
|
+
const eo = /* @__PURE__ */ D.createContext(void 0), to = ["children", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onClose", "onKeyDown", "open", "component", "slots", "slotProps"], io = (e) => {
|
|
597
|
+
const {
|
|
598
|
+
open: t
|
|
599
|
+
} = e;
|
|
600
|
+
return Te({
|
|
601
|
+
root: ["root", !t && "hidden"],
|
|
602
|
+
backdrop: ["backdrop"]
|
|
603
|
+
}, Zi, {});
|
|
604
|
+
}, oo = U("div")(({
|
|
605
|
+
ownerState: e,
|
|
606
|
+
theme: t
|
|
607
|
+
}) => V({
|
|
608
|
+
"--unstable_popup-zIndex": `calc(${t.vars.zIndex.modal} + 1)`,
|
|
609
|
+
'& ~ [role="listbox"]': {
|
|
610
|
+
// target all the listbox (Autocomplete, Menu, Select, etc.) that uses portal
|
|
611
|
+
"--unstable_popup-zIndex": `calc(${t.vars.zIndex.modal} + 1)`
|
|
612
|
+
},
|
|
613
|
+
position: "fixed",
|
|
614
|
+
zIndex: t.vars.zIndex.modal,
|
|
615
|
+
right: 0,
|
|
616
|
+
bottom: 0,
|
|
617
|
+
top: 0,
|
|
618
|
+
left: 0
|
|
619
|
+
}, !e.open && {
|
|
620
|
+
visibility: "hidden"
|
|
621
|
+
})), no = U(oo, {
|
|
622
|
+
name: "JoyModal",
|
|
623
|
+
slot: "Root",
|
|
624
|
+
overridesResolver: (e, t) => t.root
|
|
625
|
+
})({}), ro = U("div")(({
|
|
626
|
+
theme: e
|
|
627
|
+
}) => ({
|
|
628
|
+
zIndex: -1,
|
|
629
|
+
position: "fixed",
|
|
630
|
+
right: 0,
|
|
631
|
+
bottom: 0,
|
|
632
|
+
top: 0,
|
|
633
|
+
left: 0,
|
|
634
|
+
backgroundColor: e.vars.palette.background.backdrop,
|
|
635
|
+
WebkitTapHighlightColor: "transparent",
|
|
636
|
+
backdropFilter: "blur(8px)"
|
|
637
|
+
})), ao = U(ro, {
|
|
638
|
+
name: "JoyModal",
|
|
639
|
+
slot: "Backdrop",
|
|
640
|
+
overridesResolver: (e, t) => t.backdrop
|
|
641
|
+
})({}), so = /* @__PURE__ */ D.forwardRef(function(e, t) {
|
|
642
|
+
const i = Se({
|
|
643
|
+
props: e,
|
|
644
|
+
name: "JoyModal"
|
|
645
|
+
}), {
|
|
646
|
+
children: o,
|
|
647
|
+
container: a,
|
|
648
|
+
disableAutoFocus: s = !1,
|
|
649
|
+
disableEnforceFocus: p = !1,
|
|
650
|
+
disableEscapeKeyDown: d = !1,
|
|
651
|
+
disablePortal: b = !1,
|
|
652
|
+
disableRestoreFocus: c = !1,
|
|
653
|
+
disableScrollLock: f = !1,
|
|
654
|
+
hideBackdrop: x = !1,
|
|
655
|
+
keepMounted: v = !1,
|
|
656
|
+
onClose: g,
|
|
657
|
+
open: y,
|
|
658
|
+
component: R,
|
|
659
|
+
slots: O = {},
|
|
660
|
+
slotProps: A = {}
|
|
661
|
+
} = i, T = Ee(i, to), S = V({}, i, {
|
|
662
|
+
disableAutoFocus: s,
|
|
663
|
+
disableEnforceFocus: p,
|
|
664
|
+
disableEscapeKeyDown: d,
|
|
665
|
+
disablePortal: b,
|
|
666
|
+
disableRestoreFocus: c,
|
|
667
|
+
disableScrollLock: f,
|
|
668
|
+
hideBackdrop: x,
|
|
669
|
+
keepMounted: v
|
|
670
|
+
}), {
|
|
671
|
+
getRootProps: I,
|
|
672
|
+
getBackdropProps: L,
|
|
673
|
+
rootRef: l,
|
|
674
|
+
portalRef: h,
|
|
675
|
+
isTopModal: u
|
|
676
|
+
} = ki(V({}, S, {
|
|
677
|
+
rootRef: t
|
|
678
|
+
})), _ = io(S), C = V({}, T, {
|
|
679
|
+
component: R,
|
|
680
|
+
slots: O,
|
|
681
|
+
slotProps: A
|
|
682
|
+
}), [E, N] = ae("root", {
|
|
683
|
+
ref: l,
|
|
684
|
+
className: _.root,
|
|
685
|
+
elementType: no,
|
|
686
|
+
externalForwardedProps: C,
|
|
687
|
+
getSlotProps: I,
|
|
688
|
+
ownerState: S
|
|
689
|
+
}), [P, M] = ae("backdrop", {
|
|
690
|
+
className: _.backdrop,
|
|
691
|
+
elementType: ao,
|
|
692
|
+
externalForwardedProps: C,
|
|
693
|
+
getSlotProps: L,
|
|
694
|
+
ownerState: S
|
|
695
|
+
});
|
|
696
|
+
return !v && !y ? null : /* @__PURE__ */ n.jsx(eo.Provider, {
|
|
697
|
+
value: g,
|
|
698
|
+
children: /* @__PURE__ */ n.jsx(ui, {
|
|
699
|
+
ref: h,
|
|
700
|
+
container: a,
|
|
701
|
+
disablePortal: b,
|
|
702
|
+
children: /* @__PURE__ */ n.jsxs(E, V({}, N, {
|
|
703
|
+
children: [x ? null : /* @__PURE__ */ n.jsx(P, V({}, M)), /* @__PURE__ */ n.jsx(Oi, {
|
|
704
|
+
disableEnforceFocus: p,
|
|
705
|
+
disableAutoFocus: s,
|
|
706
|
+
disableRestoreFocus: c,
|
|
707
|
+
isEnabled: u,
|
|
708
|
+
open: y,
|
|
709
|
+
children: D.Children.only(o) && /* @__PURE__ */ D.cloneElement(o, V({}, o.props.tabIndex === void 0 && {
|
|
710
|
+
tabIndex: -1
|
|
711
|
+
}))
|
|
712
|
+
})]
|
|
713
|
+
}))
|
|
714
|
+
})
|
|
715
|
+
});
|
|
716
|
+
}), lo = ["className", "children", "invertedColors", "orientation", "color", "component", "variant", "size", "layout", "maxWidth", "minWidth", "slots", "slotProps"], co = (e) => {
|
|
717
|
+
const {
|
|
718
|
+
variant: t,
|
|
719
|
+
color: i,
|
|
720
|
+
size: o,
|
|
721
|
+
layout: a
|
|
722
|
+
} = e, s = {
|
|
723
|
+
root: ["root", t && `variant${q(t)}`, i && `color${q(i)}`, o && `size${q(o)}`, a && `layout${q(a)}`]
|
|
724
|
+
};
|
|
725
|
+
return Te(s, Bi, {});
|
|
726
|
+
};
|
|
727
|
+
function _t(e, t) {
|
|
728
|
+
var i, o;
|
|
729
|
+
return t && (i = e.breakpoints) != null && i.values[t] ? `${(o = e.breakpoints) == null ? void 0 : o.values[t]}px` : t;
|
|
730
|
+
}
|
|
731
|
+
const uo = U(jt, {
|
|
732
|
+
name: "JoyModalDialog",
|
|
733
|
+
slot: "Root",
|
|
734
|
+
overridesResolver: (e, t) => t.root
|
|
735
|
+
})(({
|
|
736
|
+
theme: e,
|
|
737
|
+
ownerState: t
|
|
738
|
+
}) => V({
|
|
739
|
+
"--ModalDialog-minWidth": typeof t.minWidth == "number" ? `${t.minWidth}px` : _t(e, t.minWidth),
|
|
740
|
+
"--ModalDialog-maxWidth": typeof t.maxWidth == "number" ? `${t.maxWidth}px` : _t(e, t.maxWidth),
|
|
741
|
+
"--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))"
|
|
742
|
+
}, t.variant === "solid" && {
|
|
743
|
+
"--DialogContent-color": "currentColor"
|
|
744
|
+
}, t.size === "sm" && {
|
|
745
|
+
"--Card-padding": "1rem",
|
|
746
|
+
"--ModalDialog-titleOffset": e.spacing(0.25),
|
|
747
|
+
"--ModalDialog-descriptionOffset": e.spacing(0.25),
|
|
748
|
+
"--ModalClose-inset": "0.375rem"
|
|
749
|
+
}, t.size === "md" && {
|
|
750
|
+
"--Card-padding": "1.25rem",
|
|
751
|
+
"--ModalDialog-titleOffset": e.spacing(0.25),
|
|
752
|
+
"--ModalDialog-descriptionOffset": e.spacing(0.75),
|
|
753
|
+
"--ModalClose-inset": "0.5rem"
|
|
754
|
+
}, t.size === "lg" && {
|
|
755
|
+
"--Card-padding": "1.5rem",
|
|
756
|
+
"--ModalDialog-titleOffset": e.spacing(0.5),
|
|
757
|
+
"--ModalDialog-descriptionOffset": e.spacing(1),
|
|
758
|
+
"--ModalClose-inset": "0.625rem"
|
|
759
|
+
}, {
|
|
760
|
+
boxSizing: "border-box",
|
|
761
|
+
boxShadow: e.shadow.md,
|
|
762
|
+
minWidth: "min(calc(100vw - 2 * var(--Card-padding)), var(--ModalDialog-minWidth, 300px))",
|
|
763
|
+
outline: 0,
|
|
764
|
+
position: "absolute"
|
|
765
|
+
}, t.layout === "fullscreen" && {
|
|
766
|
+
top: 0,
|
|
767
|
+
left: 0,
|
|
768
|
+
right: 0,
|
|
769
|
+
bottom: 0,
|
|
770
|
+
border: 0,
|
|
771
|
+
borderRadius: 0
|
|
772
|
+
}, t.layout === "center" && {
|
|
773
|
+
top: "50%",
|
|
774
|
+
left: "50%",
|
|
775
|
+
transform: "translate(-50%, -50%)",
|
|
776
|
+
maxWidth: "min(calc(100vw - 2 * var(--Card-padding)), var(--ModalDialog-maxWidth, 100vw))",
|
|
777
|
+
maxHeight: "calc(100% - 2 * var(--Card-padding))"
|
|
778
|
+
}, {
|
|
779
|
+
[`& [id="${t["aria-labelledby"]}"]`]: {
|
|
780
|
+
"--Typography-margin": "calc(-1 * var(--ModalDialog-titleOffset)) 0 var(--ModalDialog-gap) 0",
|
|
781
|
+
"--Typography-fontSize": "1.125em",
|
|
782
|
+
[`& + [id="${t["aria-describedby"]}"]`]: {
|
|
783
|
+
"--unstable_ModalDialog-descriptionOffset": "calc(-1 * var(--ModalDialog-descriptionOffset))"
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
[`& [id="${t["aria-describedby"]}"]`]: {
|
|
787
|
+
"--Typography-fontSize": "1em",
|
|
788
|
+
"--Typography-margin": "var(--unstable_ModalDialog-descriptionOffset, var(--ModalDialog-gap)) 0 0 0",
|
|
789
|
+
"&:not(:last-child)": {
|
|
790
|
+
// create spacing between description and the next element.
|
|
791
|
+
"--Typography-margin": "var(--unstable_ModalDialog-descriptionOffset, var(--ModalDialog-gap)) 0 var(--ModalDialog-gap) 0"
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
})), ho = /* @__PURE__ */ D.forwardRef(function(e, t) {
|
|
795
|
+
const i = Se({
|
|
796
|
+
props: e,
|
|
797
|
+
name: "JoyModalDialog"
|
|
798
|
+
}), {
|
|
799
|
+
className: o,
|
|
800
|
+
children: a,
|
|
801
|
+
invertedColors: s = !1,
|
|
802
|
+
orientation: p = "vertical",
|
|
803
|
+
color: d = "neutral",
|
|
804
|
+
component: b = "div",
|
|
805
|
+
variant: c = "outlined",
|
|
806
|
+
size: f = "md",
|
|
807
|
+
layout: x = "center",
|
|
808
|
+
maxWidth: v,
|
|
809
|
+
minWidth: g,
|
|
810
|
+
slots: y = {},
|
|
811
|
+
slotProps: R = {}
|
|
812
|
+
} = i, O = Ee(i, lo), A = V({}, i, {
|
|
813
|
+
color: d,
|
|
814
|
+
component: b,
|
|
815
|
+
maxWidth: v,
|
|
816
|
+
minWidth: g,
|
|
817
|
+
layout: x,
|
|
818
|
+
size: f,
|
|
819
|
+
variant: c,
|
|
820
|
+
invertedColors: s
|
|
821
|
+
}), T = co(A), S = V({}, O, {
|
|
822
|
+
component: b,
|
|
823
|
+
slots: y,
|
|
824
|
+
slotProps: R
|
|
825
|
+
}), I = Qe(), L = Qe(), l = D.useMemo(() => ({
|
|
826
|
+
variant: c,
|
|
827
|
+
color: d,
|
|
828
|
+
labelledBy: I,
|
|
829
|
+
describedBy: L
|
|
830
|
+
}), [d, c, I, L]), [h, u] = ae("root", {
|
|
831
|
+
ref: t,
|
|
832
|
+
className: Nt(T.root, o),
|
|
833
|
+
elementType: uo,
|
|
834
|
+
externalForwardedProps: S,
|
|
835
|
+
ownerState: A,
|
|
836
|
+
additionalProps: {
|
|
837
|
+
as: b,
|
|
838
|
+
role: "dialog",
|
|
839
|
+
"aria-modal": "true",
|
|
840
|
+
"aria-labelledby": I,
|
|
841
|
+
"aria-describedby": L
|
|
842
|
+
}
|
|
843
|
+
});
|
|
844
|
+
return /* @__PURE__ */ n.jsx(Qi.Provider, {
|
|
845
|
+
value: f,
|
|
846
|
+
children: /* @__PURE__ */ n.jsx(Ft.Provider, {
|
|
847
|
+
value: l,
|
|
848
|
+
children: /* @__PURE__ */ n.jsx(h, V({}, u, {
|
|
849
|
+
children: D.Children.map(a, (_, C) => {
|
|
850
|
+
if (!/* @__PURE__ */ D.isValidElement(_))
|
|
851
|
+
return _;
|
|
852
|
+
const E = {};
|
|
853
|
+
if (hi(_, ["Divider"])) {
|
|
854
|
+
E.inset = "inset" in _.props ? _.props.inset : "context";
|
|
855
|
+
const N = p === "vertical" ? "horizontal" : "vertical";
|
|
856
|
+
E.orientation = "orientation" in _.props ? _.props.orientation : N;
|
|
857
|
+
}
|
|
858
|
+
return C === 0 && (E["data-first-child"] = ""), C === D.Children.count(a) - 1 && (E["data-last-child"] = ""), /* @__PURE__ */ D.cloneElement(_, E);
|
|
859
|
+
})
|
|
860
|
+
}))
|
|
861
|
+
})
|
|
862
|
+
});
|
|
863
|
+
});
|
|
864
|
+
function po(e) {
|
|
865
|
+
return Re("MuiTooltip", e);
|
|
866
|
+
}
|
|
867
|
+
oe("MuiTooltip", ["root", "tooltipArrow", "arrow", "touch", "placementLeft", "placementRight", "placementTop", "placementBottom", "colorPrimary", "colorDanger", "colorNeutral", "colorSuccess", "colorWarning", "colorContext", "sizeSm", "sizeMd", "sizeLg", "variantPlain", "variantOutlined", "variantSoft", "variantSolid"]);
|
|
868
|
+
const fo = ["children", "className", "component", "arrow", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "disablePortal", "direction", "keepMounted", "modifiers", "placement", "title", "color", "variant", "size", "slots", "slotProps"], mo = (e) => {
|
|
869
|
+
const {
|
|
870
|
+
arrow: t,
|
|
871
|
+
variant: i,
|
|
872
|
+
color: o,
|
|
873
|
+
size: a,
|
|
874
|
+
placement: s,
|
|
875
|
+
touch: p
|
|
876
|
+
} = e, d = {
|
|
877
|
+
root: ["root", t && "tooltipArrow", p && "touch", a && `size${q(a)}`, o && `color${q(o)}`, i && `variant${q(i)}`, `tooltipPlacement${q(s.split("-")[0])}`],
|
|
878
|
+
arrow: ["arrow"]
|
|
879
|
+
};
|
|
880
|
+
return Te(d, po, {});
|
|
881
|
+
}, go = U("div", {
|
|
882
|
+
name: "JoyTooltip",
|
|
883
|
+
slot: "Root",
|
|
884
|
+
overridesResolver: (e, t) => t.root
|
|
885
|
+
})(({
|
|
886
|
+
ownerState: e,
|
|
887
|
+
theme: t
|
|
888
|
+
}) => {
|
|
889
|
+
var i, o, a;
|
|
890
|
+
const s = (i = t.variants[e.variant]) == null ? void 0 : i[e.color];
|
|
891
|
+
return V({}, e.size === "sm" && {
|
|
892
|
+
"--Icon-fontSize": t.vars.fontSize.md,
|
|
893
|
+
"--Tooltip-arrowSize": "8px",
|
|
894
|
+
padding: t.spacing(0.25, 0.625)
|
|
895
|
+
}, e.size === "md" && {
|
|
896
|
+
"--Icon-fontSize": t.vars.fontSize.lg,
|
|
897
|
+
"--Tooltip-arrowSize": "10px",
|
|
898
|
+
padding: t.spacing(0.5, 0.75)
|
|
899
|
+
}, e.size === "lg" && {
|
|
900
|
+
"--Icon-fontSize": t.vars.fontSize.xl,
|
|
901
|
+
"--Tooltip-arrowSize": "12px",
|
|
902
|
+
padding: t.spacing(0.75, 1)
|
|
903
|
+
}, {
|
|
904
|
+
zIndex: t.vars.zIndex.tooltip,
|
|
905
|
+
borderRadius: t.vars.radius.sm,
|
|
906
|
+
boxShadow: t.shadow.sm,
|
|
907
|
+
wordWrap: "break-word",
|
|
908
|
+
position: "relative"
|
|
909
|
+
}, e.disableInteractive && {
|
|
910
|
+
pointerEvents: "none"
|
|
911
|
+
}, t.typography[`body-${{
|
|
912
|
+
sm: "xs",
|
|
913
|
+
md: "sm",
|
|
914
|
+
lg: "md"
|
|
915
|
+
}[e.size]}`], s, !s.backgroundColor && {
|
|
916
|
+
backgroundColor: t.vars.palette.background.surface
|
|
917
|
+
}, {
|
|
918
|
+
"&::before": {
|
|
919
|
+
// acts as a invisible connector between the element and the tooltip
|
|
920
|
+
// so that the cursor can move to the tooltip without losing focus.
|
|
921
|
+
content: '""',
|
|
922
|
+
display: "block",
|
|
923
|
+
position: "absolute",
|
|
924
|
+
width: (o = e.placement) != null && o.match(/(top|bottom)/) ? "100%" : (
|
|
925
|
+
// 10px equals the default offset popper config
|
|
926
|
+
"calc(10px + var(--variant-borderWidth, 0px))"
|
|
927
|
+
),
|
|
928
|
+
height: (a = e.placement) != null && a.match(/(top|bottom)/) ? "calc(10px + var(--variant-borderWidth, 0px))" : "100%"
|
|
929
|
+
},
|
|
930
|
+
'&[data-popper-placement*="bottom"]::before': {
|
|
931
|
+
top: 0,
|
|
932
|
+
left: 0,
|
|
933
|
+
transform: "translateY(-100%)"
|
|
934
|
+
},
|
|
935
|
+
'&[data-popper-placement*="left"]::before': {
|
|
936
|
+
top: 0,
|
|
937
|
+
right: 0,
|
|
938
|
+
transform: "translateX(100%)"
|
|
939
|
+
},
|
|
940
|
+
'&[data-popper-placement*="right"]::before': {
|
|
941
|
+
top: 0,
|
|
942
|
+
left: 0,
|
|
943
|
+
transform: "translateX(-100%)"
|
|
944
|
+
},
|
|
945
|
+
'&[data-popper-placement*="top"]::before': {
|
|
946
|
+
bottom: 0,
|
|
947
|
+
left: 0,
|
|
948
|
+
transform: "translateY(100%)"
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
}), xo = U("span", {
|
|
952
|
+
name: "JoyTooltip",
|
|
953
|
+
slot: "Arrow",
|
|
954
|
+
overridesResolver: (e, t) => t.arrow
|
|
955
|
+
})(({
|
|
956
|
+
theme: e,
|
|
957
|
+
ownerState: t
|
|
958
|
+
}) => {
|
|
959
|
+
var i, o, a;
|
|
960
|
+
const s = (i = e.variants[t.variant]) == null ? void 0 : i[t.color];
|
|
961
|
+
return {
|
|
962
|
+
"--unstable_Tooltip-arrowRotation": 0,
|
|
963
|
+
width: "var(--Tooltip-arrowSize)",
|
|
964
|
+
height: "var(--Tooltip-arrowSize)",
|
|
965
|
+
boxSizing: "border-box",
|
|
966
|
+
// use pseudo element because Popper controls the `transform` property of the arrow.
|
|
967
|
+
"&::before": {
|
|
968
|
+
content: '""',
|
|
969
|
+
display: "block",
|
|
970
|
+
position: "absolute",
|
|
971
|
+
width: 0,
|
|
972
|
+
height: 0,
|
|
973
|
+
border: "calc(var(--Tooltip-arrowSize) / 2) solid",
|
|
974
|
+
borderLeftColor: "transparent",
|
|
975
|
+
borderBottomColor: "transparent",
|
|
976
|
+
borderTopColor: (o = s == null ? void 0 : s.backgroundColor) != null ? o : e.vars.palette.background.surface,
|
|
977
|
+
borderRightColor: (a = s == null ? void 0 : s.backgroundColor) != null ? a : e.vars.palette.background.surface,
|
|
978
|
+
borderRadius: "0px 2px 0px 0px",
|
|
979
|
+
boxShadow: `var(--variant-borderWidth, 0px) calc(-1 * var(--variant-borderWidth, 0px)) 0px 0px ${s.borderColor}`,
|
|
980
|
+
transformOrigin: "center center",
|
|
981
|
+
transform: "rotate(calc(-45deg + 90deg * var(--unstable_Tooltip-arrowRotation)))"
|
|
982
|
+
},
|
|
983
|
+
'[data-popper-placement*="bottom"] &': {
|
|
984
|
+
top: "calc(0.5px + var(--Tooltip-arrowSize) * -1 / 2)"
|
|
985
|
+
// 0.5px is for perfect overlap with the Tooltip
|
|
986
|
+
},
|
|
987
|
+
'[data-popper-placement*="top"] &': {
|
|
988
|
+
"--unstable_Tooltip-arrowRotation": 2,
|
|
989
|
+
bottom: "calc(0.5px + var(--Tooltip-arrowSize) * -1 / 2)"
|
|
990
|
+
},
|
|
991
|
+
'[data-popper-placement*="left"] &': {
|
|
992
|
+
"--unstable_Tooltip-arrowRotation": 1,
|
|
993
|
+
right: "calc(0.5px + var(--Tooltip-arrowSize) * -1 / 2)"
|
|
994
|
+
},
|
|
995
|
+
'[data-popper-placement*="right"] &': {
|
|
996
|
+
"--unstable_Tooltip-arrowRotation": 3,
|
|
997
|
+
left: "calc(0.5px + var(--Tooltip-arrowSize) * -1 / 2)"
|
|
998
|
+
}
|
|
999
|
+
};
|
|
1000
|
+
});
|
|
1001
|
+
let Pe = !1;
|
|
1002
|
+
const St = new pi();
|
|
1003
|
+
let xe = {
|
|
1004
|
+
x: 0,
|
|
1005
|
+
y: 0
|
|
1006
|
+
};
|
|
1007
|
+
function Et(e, t) {
|
|
1008
|
+
return (i) => {
|
|
1009
|
+
t && t(i), e(i);
|
|
1010
|
+
};
|
|
1011
|
+
}
|
|
1012
|
+
function Tt(e, t) {
|
|
1013
|
+
return (i, ...o) => {
|
|
1014
|
+
t && t(i, ...o), e(i, ...o);
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
const $e = /* @__PURE__ */ D.forwardRef(function(e, t) {
|
|
1018
|
+
var i;
|
|
1019
|
+
const o = Se({
|
|
1020
|
+
props: e,
|
|
1021
|
+
name: "JoyTooltip"
|
|
1022
|
+
}), {
|
|
1023
|
+
children: a,
|
|
1024
|
+
className: s,
|
|
1025
|
+
component: p,
|
|
1026
|
+
arrow: d = !1,
|
|
1027
|
+
describeChild: b = !1,
|
|
1028
|
+
disableFocusListener: c = !1,
|
|
1029
|
+
disableHoverListener: f = !1,
|
|
1030
|
+
disableInteractive: x = !1,
|
|
1031
|
+
disableTouchListener: v = !1,
|
|
1032
|
+
enterDelay: g = 100,
|
|
1033
|
+
enterNextDelay: y = 0,
|
|
1034
|
+
enterTouchDelay: R = 700,
|
|
1035
|
+
followCursor: O = !1,
|
|
1036
|
+
id: A,
|
|
1037
|
+
leaveDelay: T = 0,
|
|
1038
|
+
leaveTouchDelay: S = 1500,
|
|
1039
|
+
onClose: I,
|
|
1040
|
+
onOpen: L,
|
|
1041
|
+
open: l,
|
|
1042
|
+
disablePortal: h,
|
|
1043
|
+
direction: u,
|
|
1044
|
+
keepMounted: _,
|
|
1045
|
+
modifiers: C,
|
|
1046
|
+
placement: E = "bottom",
|
|
1047
|
+
title: N,
|
|
1048
|
+
color: P = "neutral",
|
|
1049
|
+
variant: M = "solid",
|
|
1050
|
+
size: F = "md",
|
|
1051
|
+
slots: se = {},
|
|
1052
|
+
slotProps: Z = {}
|
|
1053
|
+
} = o, $ = Ee(o, fo), [G, K] = D.useState(), [ne, zt] = D.useState(null), Ie = D.useRef(!1), Ve = x || O, lt = Ne(), He = Ne(), Oe = Ne(), ct = Ne(), [Gt, dt] = li({
|
|
1054
|
+
controlled: l,
|
|
1055
|
+
default: !1,
|
|
1056
|
+
name: "Tooltip",
|
|
1057
|
+
state: "open"
|
|
1058
|
+
});
|
|
1059
|
+
let ee = Gt;
|
|
1060
|
+
const ze = Qe(A), fe = D.useRef(), De = je(() => {
|
|
1061
|
+
fe.current !== void 0 && (document.body.style.WebkitUserSelect = fe.current, fe.current = void 0), ct.clear();
|
|
1062
|
+
});
|
|
1063
|
+
D.useEffect(() => De, [De]);
|
|
1064
|
+
const ut = (k) => {
|
|
1065
|
+
St.clear(), Pe = !0, dt(!0), L && !ee && L(k);
|
|
1066
|
+
}, Ae = je((k) => {
|
|
1067
|
+
St.start(800 + T, () => {
|
|
1068
|
+
Pe = !1;
|
|
1069
|
+
}), dt(!1), I && ee && I(k), lt.start(150, () => {
|
|
1070
|
+
Ie.current = !1;
|
|
1071
|
+
});
|
|
1072
|
+
}), we = (k) => {
|
|
1073
|
+
Ie.current && k.type !== "touchstart" || (G && G.removeAttribute("title"), He.clear(), Oe.clear(), g || Pe && y ? He.start(Pe ? y : g, () => {
|
|
1074
|
+
ut(k);
|
|
1075
|
+
}) : ut(k));
|
|
1076
|
+
}, Ge = (k) => {
|
|
1077
|
+
He.clear(), Oe.start(T, () => {
|
|
1078
|
+
Ae(k);
|
|
1079
|
+
});
|
|
1080
|
+
}, {
|
|
1081
|
+
isFocusVisibleRef: ht,
|
|
1082
|
+
onBlur: Wt,
|
|
1083
|
+
onFocus: Bt,
|
|
1084
|
+
ref: Ut
|
|
1085
|
+
} = ci(), [, pt] = D.useState(!1), ft = (k) => {
|
|
1086
|
+
Wt(k), ht.current === !1 && (pt(!1), Ge(k));
|
|
1087
|
+
}, mt = (k) => {
|
|
1088
|
+
G || K(k.currentTarget), Bt(k), ht.current === !0 && (pt(!0), we(k));
|
|
1089
|
+
}, gt = (k) => {
|
|
1090
|
+
Ie.current = !0;
|
|
1091
|
+
const te = a.props;
|
|
1092
|
+
te.onTouchStart && te.onTouchStart(k);
|
|
1093
|
+
}, Yt = (k) => {
|
|
1094
|
+
gt(k), Oe.clear(), lt.clear(), De(), fe.current = document.body.style.WebkitUserSelect, document.body.style.WebkitUserSelect = "none", ct.start(R, () => {
|
|
1095
|
+
document.body.style.WebkitUserSelect = fe.current, we(k);
|
|
1096
|
+
});
|
|
1097
|
+
}, $t = (k) => {
|
|
1098
|
+
a.props.onTouchEnd && a.props.onTouchEnd(k), De(), Oe.start(S, () => {
|
|
1099
|
+
Ae(k);
|
|
1100
|
+
});
|
|
1101
|
+
};
|
|
1102
|
+
D.useEffect(() => {
|
|
1103
|
+
if (!ee)
|
|
1104
|
+
return;
|
|
1105
|
+
function k(te) {
|
|
1106
|
+
(te.key === "Escape" || te.key === "Esc") && Ae(te);
|
|
1107
|
+
}
|
|
1108
|
+
return document.addEventListener("keydown", k), () => {
|
|
1109
|
+
document.removeEventListener("keydown", k);
|
|
1110
|
+
};
|
|
1111
|
+
}, [Ae, ee]);
|
|
1112
|
+
const Kt = ve(K, t), Xt = ve(Ut, Kt), Jt = ve(a.ref, Xt);
|
|
1113
|
+
typeof N != "number" && !N && (ee = !1);
|
|
1114
|
+
const We = D.useRef(null), qt = (k) => {
|
|
1115
|
+
const te = a.props;
|
|
1116
|
+
te.onMouseMove && te.onMouseMove(k), xe = {
|
|
1117
|
+
x: k.clientX,
|
|
1118
|
+
y: k.clientY
|
|
1119
|
+
}, We.current && We.current.update();
|
|
1120
|
+
}, me = {}, Be = typeof N == "string";
|
|
1121
|
+
b ? (me.title = !ee && Be && !f ? N : null, me["aria-describedby"] = ee ? ze : null) : (me["aria-label"] = Be ? N : null, me["aria-labelledby"] = ee && !Be ? ze : null);
|
|
1122
|
+
const X = V({}, me, $, {
|
|
1123
|
+
component: p
|
|
1124
|
+
}, a.props, {
|
|
1125
|
+
className: Nt(s, a.props.className),
|
|
1126
|
+
onTouchStart: gt,
|
|
1127
|
+
ref: Jt
|
|
1128
|
+
}, O ? {
|
|
1129
|
+
onMouseMove: qt
|
|
1130
|
+
} : {}), ge = {};
|
|
1131
|
+
v || (X.onTouchStart = Yt, X.onTouchEnd = $t), f || (X.onMouseOver = Et(we, X.onMouseOver), X.onMouseLeave = Et(Ge, X.onMouseLeave), Ve || (ge.onMouseOver = we, ge.onMouseLeave = Ge)), c || (X.onFocus = Tt(mt, X.onFocus), X.onBlur = Tt(ft, X.onBlur), Ve || (ge.onFocus = mt, ge.onBlur = ft));
|
|
1132
|
+
const Ue = V({}, o, {
|
|
1133
|
+
arrow: d,
|
|
1134
|
+
disableInteractive: Ve,
|
|
1135
|
+
placement: E,
|
|
1136
|
+
touch: Ie.current,
|
|
1137
|
+
color: P,
|
|
1138
|
+
variant: M,
|
|
1139
|
+
size: F
|
|
1140
|
+
}), xt = mo(Ue), yt = V({}, $, {
|
|
1141
|
+
component: p,
|
|
1142
|
+
slots: se,
|
|
1143
|
+
slotProps: Z
|
|
1144
|
+
}), Qt = D.useMemo(() => [{
|
|
1145
|
+
name: "arrow",
|
|
1146
|
+
enabled: !!ne,
|
|
1147
|
+
options: {
|
|
1148
|
+
element: ne,
|
|
1149
|
+
// https://popper.js.org/docs/v2/modifiers/arrow/#padding
|
|
1150
|
+
// make the arrow looks nice with the Tooltip's border radius
|
|
1151
|
+
padding: 6
|
|
1152
|
+
}
|
|
1153
|
+
}, {
|
|
1154
|
+
name: "offset",
|
|
1155
|
+
options: {
|
|
1156
|
+
offset: [0, 10]
|
|
1157
|
+
}
|
|
1158
|
+
}, ...C || []], [ne, C]), [Zt, ei] = ae("root", {
|
|
1159
|
+
additionalProps: V({
|
|
1160
|
+
id: ze,
|
|
1161
|
+
popperRef: We,
|
|
1162
|
+
placement: E,
|
|
1163
|
+
anchorEl: O ? {
|
|
1164
|
+
getBoundingClientRect: () => ({
|
|
1165
|
+
top: xe.y,
|
|
1166
|
+
left: xe.x,
|
|
1167
|
+
right: xe.x,
|
|
1168
|
+
bottom: xe.y,
|
|
1169
|
+
width: 0,
|
|
1170
|
+
height: 0
|
|
1171
|
+
})
|
|
1172
|
+
} : G,
|
|
1173
|
+
open: G ? ee : !1,
|
|
1174
|
+
disablePortal: h,
|
|
1175
|
+
keepMounted: _,
|
|
1176
|
+
direction: u,
|
|
1177
|
+
modifiers: Qt
|
|
1178
|
+
}, ge),
|
|
1179
|
+
ref: null,
|
|
1180
|
+
className: xt.root,
|
|
1181
|
+
elementType: go,
|
|
1182
|
+
externalForwardedProps: yt,
|
|
1183
|
+
ownerState: Ue
|
|
1184
|
+
}), [ti, ii] = ae("arrow", {
|
|
1185
|
+
ref: zt,
|
|
1186
|
+
className: xt.arrow,
|
|
1187
|
+
elementType: xo,
|
|
1188
|
+
externalForwardedProps: yt,
|
|
1189
|
+
ownerState: Ue
|
|
1190
|
+
});
|
|
1191
|
+
return /* @__PURE__ */ n.jsxs(D.Fragment, {
|
|
1192
|
+
children: [/* @__PURE__ */ D.isValidElement(a) && /* @__PURE__ */ D.cloneElement(a, X), /* @__PURE__ */ n.jsxs(Zt, V({}, ei, !((i = o.slots) != null && i.root) && {
|
|
1193
|
+
as: di,
|
|
1194
|
+
slots: {
|
|
1195
|
+
root: p || "div"
|
|
1196
|
+
}
|
|
1197
|
+
}, {
|
|
1198
|
+
children: [N, d ? /* @__PURE__ */ n.jsx(ti, V({}, ii)) : null]
|
|
1199
|
+
}))]
|
|
1200
|
+
});
|
|
1201
|
+
}), En = ({ my: e }) => /* @__PURE__ */ n.jsx(
|
|
1202
|
+
m,
|
|
1203
|
+
{
|
|
1204
|
+
sx: {
|
|
1205
|
+
display: "flex",
|
|
1206
|
+
justifyContent: "center",
|
|
1207
|
+
alignItems: "center",
|
|
1208
|
+
width: "100%",
|
|
1209
|
+
height: "100%",
|
|
1210
|
+
my: e
|
|
1211
|
+
},
|
|
1212
|
+
children: /* @__PURE__ */ n.jsx(
|
|
1213
|
+
oi,
|
|
1214
|
+
{
|
|
1215
|
+
slotProps: {
|
|
1216
|
+
track: {
|
|
1217
|
+
sx: {
|
|
1218
|
+
stroke: H().palette.neutral.softBg
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1221
|
+
progress: {
|
|
1222
|
+
sx: {
|
|
1223
|
+
stroke: H().palette.neutral.solidBg
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
)
|
|
1229
|
+
}
|
|
1230
|
+
), Tn = ({
|
|
1231
|
+
additionalCTA: e,
|
|
1232
|
+
buttonStyle: t,
|
|
1233
|
+
buttonContentStyle: i,
|
|
1234
|
+
textStyle: o
|
|
1235
|
+
}) => {
|
|
1236
|
+
const { t: a } = _e();
|
|
1237
|
+
return e ? e.component ? e.component : e.onClick ? /* @__PURE__ */ n.jsx(pe, { sx: t, onClick: e.onClick, children: e.defaultLabel && /* @__PURE__ */ n.jsx(m, { sx: i, children: /* @__PURE__ */ n.jsx(w, { sx: o, children: e.defaultLabel }) }) }) : e.url ? /* @__PURE__ */ n.jsx(
|
|
1238
|
+
pe,
|
|
1239
|
+
{
|
|
1240
|
+
component: "a",
|
|
1241
|
+
href: e.url,
|
|
1242
|
+
target: e.target || "_self",
|
|
1243
|
+
sx: t,
|
|
1244
|
+
children: /* @__PURE__ */ n.jsx(w, { sx: o, children: e.defaultLabel || a("common.additional") })
|
|
1245
|
+
}
|
|
1246
|
+
) : null : null;
|
|
1247
|
+
}, Ke = ot(/* @__PURE__ */ n.jsx("path", {
|
|
1248
|
+
d: "M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"
|
|
1249
|
+
}), "InfoOutlined"), yo = ot(/* @__PURE__ */ n.jsx("path", {
|
|
1250
|
+
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
1251
|
+
}), "Close"), B = ({
|
|
1252
|
+
rules: e,
|
|
1253
|
+
rulesDisplay: t,
|
|
1254
|
+
isOverlayVariant: i = !1
|
|
1255
|
+
}) => {
|
|
1256
|
+
const { t: o } = _e(), { shadowRootElement: a } = ai(si), s = H(), p = re(), d = Y(), b = ie(), c = de(), [f, x] = D.useState(!1);
|
|
1257
|
+
if (!e)
|
|
1258
|
+
return null;
|
|
1259
|
+
if (t != null && t.component)
|
|
1260
|
+
return t.component;
|
|
1261
|
+
if (((t == null ? void 0 : t.type) || "modal") === "link" && t != null && t.url) {
|
|
1262
|
+
const v = t.target || "_blank", g = {
|
|
1263
|
+
backgroundColor: "transparent",
|
|
1264
|
+
color: i ? s.palette.neutral.plainColor : s.textSecondary,
|
|
1265
|
+
border: "none",
|
|
1266
|
+
borderRadius: "50%",
|
|
1267
|
+
width: "2em",
|
|
1268
|
+
height: "2em",
|
|
1269
|
+
minHeight: "2em",
|
|
1270
|
+
minWidth: "2em",
|
|
1271
|
+
padding: 0,
|
|
1272
|
+
display: "flex",
|
|
1273
|
+
alignItems: "center",
|
|
1274
|
+
justifyContent: "center",
|
|
1275
|
+
cursor: "pointer",
|
|
1276
|
+
transition: "all 0.2s ease-in-out",
|
|
1277
|
+
"&: hover": {
|
|
1278
|
+
backgroundColor: "transparent",
|
|
1279
|
+
transform: "scale(1.05)"
|
|
1280
|
+
},
|
|
1281
|
+
"&:focus-visible": {
|
|
1282
|
+
outline: "none"
|
|
1283
|
+
},
|
|
1284
|
+
"& svg": {
|
|
1285
|
+
fontSize: "1.25em"
|
|
1286
|
+
}
|
|
1287
|
+
};
|
|
1288
|
+
return typeof window > "u" ? /* @__PURE__ */ n.jsx(
|
|
1289
|
+
$e,
|
|
1290
|
+
{
|
|
1291
|
+
title: o("common.rules.info"),
|
|
1292
|
+
placement: "right",
|
|
1293
|
+
variant: "soft",
|
|
1294
|
+
disablePortal: !0,
|
|
1295
|
+
children: /* @__PURE__ */ n.jsx(
|
|
1296
|
+
Le,
|
|
1297
|
+
{
|
|
1298
|
+
component: "a",
|
|
1299
|
+
href: t.url,
|
|
1300
|
+
target: v,
|
|
1301
|
+
rel: "noopener noreferrer",
|
|
1302
|
+
sx: g,
|
|
1303
|
+
"aria-label": o("common.rules.info"),
|
|
1304
|
+
children: /* @__PURE__ */ n.jsx(Ke, {})
|
|
1305
|
+
}
|
|
1306
|
+
)
|
|
1307
|
+
}
|
|
1308
|
+
) : /* @__PURE__ */ n.jsx(
|
|
1309
|
+
$e,
|
|
1310
|
+
{
|
|
1311
|
+
title: o("common.rules.info"),
|
|
1312
|
+
placement: "right",
|
|
1313
|
+
variant: "soft",
|
|
1314
|
+
disablePortal: !0,
|
|
1315
|
+
children: /* @__PURE__ */ n.jsx(
|
|
1316
|
+
Le,
|
|
1317
|
+
{
|
|
1318
|
+
onClick: (y) => {
|
|
1319
|
+
y.stopPropagation(), window.open(t.url, v, "noopener,noreferrer");
|
|
1320
|
+
},
|
|
1321
|
+
sx: g,
|
|
1322
|
+
"aria-label": o("common.rules.info"),
|
|
1323
|
+
children: /* @__PURE__ */ n.jsx(Ke, {})
|
|
1324
|
+
}
|
|
1325
|
+
)
|
|
1326
|
+
}
|
|
1327
|
+
);
|
|
1328
|
+
}
|
|
1329
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1330
|
+
/* @__PURE__ */ n.jsx(
|
|
1331
|
+
$e,
|
|
1332
|
+
{
|
|
1333
|
+
title: o("common.rules.info"),
|
|
1334
|
+
placement: "right",
|
|
1335
|
+
variant: "soft",
|
|
1336
|
+
disablePortal: !0,
|
|
1337
|
+
children: /* @__PURE__ */ n.jsx(
|
|
1338
|
+
Le,
|
|
1339
|
+
{
|
|
1340
|
+
onClick: (v) => {
|
|
1341
|
+
v.stopPropagation(), x(!0);
|
|
1342
|
+
},
|
|
1343
|
+
sx: {
|
|
1344
|
+
backgroundColor: "transparent",
|
|
1345
|
+
color: s.palette.neutral[500],
|
|
1346
|
+
border: "none",
|
|
1347
|
+
borderRadius: "50%",
|
|
1348
|
+
width: "2em",
|
|
1349
|
+
height: "2em",
|
|
1350
|
+
minHeight: "2em",
|
|
1351
|
+
minWidth: "2em",
|
|
1352
|
+
padding: 0,
|
|
1353
|
+
display: "flex",
|
|
1354
|
+
alignItems: "center",
|
|
1355
|
+
justifyContent: "center",
|
|
1356
|
+
cursor: "pointer",
|
|
1357
|
+
transition: "all 0.2s ease-in-out",
|
|
1358
|
+
"&:hover": {
|
|
1359
|
+
backgroundColor: "transparent",
|
|
1360
|
+
color: s.palette.neutral[500],
|
|
1361
|
+
transform: "scale(1.05)"
|
|
1362
|
+
},
|
|
1363
|
+
"&:focus-visible": {
|
|
1364
|
+
outline: "none"
|
|
1365
|
+
},
|
|
1366
|
+
"& svg": {
|
|
1367
|
+
fontSize: "1.25em"
|
|
1368
|
+
}
|
|
1369
|
+
},
|
|
1370
|
+
"aria-label": o("common.rules.info"),
|
|
1371
|
+
children: /* @__PURE__ */ n.jsx(Ke, {})
|
|
1372
|
+
}
|
|
1373
|
+
)
|
|
1374
|
+
}
|
|
1375
|
+
),
|
|
1376
|
+
/* @__PURE__ */ n.jsx(
|
|
1377
|
+
so,
|
|
1378
|
+
{
|
|
1379
|
+
open: f,
|
|
1380
|
+
onClose: () => x(!1),
|
|
1381
|
+
container: a,
|
|
1382
|
+
sx: { zIndex: 1300 },
|
|
1383
|
+
children: /* @__PURE__ */ n.jsxs(
|
|
1384
|
+
ho,
|
|
1385
|
+
{
|
|
1386
|
+
sx: {
|
|
1387
|
+
width: "100%",
|
|
1388
|
+
maxWidth: c ? "90vw" : "600px",
|
|
1389
|
+
maxHeight: c ? "90vh" : "80vh",
|
|
1390
|
+
p: c ? 2 : 3,
|
|
1391
|
+
borderRadius: p.md,
|
|
1392
|
+
backgroundColor: s.surface
|
|
1393
|
+
},
|
|
1394
|
+
children: [
|
|
1395
|
+
/* @__PURE__ */ n.jsx(
|
|
1396
|
+
Le,
|
|
1397
|
+
{
|
|
1398
|
+
onClick: (v) => {
|
|
1399
|
+
v.stopPropagation(), x(!1);
|
|
1400
|
+
},
|
|
1401
|
+
sx: {
|
|
1402
|
+
position: "absolute",
|
|
1403
|
+
top: b.sm,
|
|
1404
|
+
right: b.sm,
|
|
1405
|
+
backgroundColor: "transparent",
|
|
1406
|
+
color: s.textSecondary,
|
|
1407
|
+
border: "none",
|
|
1408
|
+
borderRadius: "50%",
|
|
1409
|
+
width: "2em",
|
|
1410
|
+
height: "2em",
|
|
1411
|
+
minHeight: "2em",
|
|
1412
|
+
minWidth: "2em",
|
|
1413
|
+
padding: 0,
|
|
1414
|
+
display: "flex",
|
|
1415
|
+
alignItems: "center",
|
|
1416
|
+
justifyContent: "center",
|
|
1417
|
+
cursor: "pointer",
|
|
1418
|
+
transition: "all 0.2s ease-in-out",
|
|
1419
|
+
zIndex: 1e3,
|
|
1420
|
+
"&:hover": {
|
|
1421
|
+
backgroundColor: `${s.textSecondary}15`,
|
|
1422
|
+
color: s.textPrimary,
|
|
1423
|
+
transform: "scale(1.05)"
|
|
1424
|
+
},
|
|
1425
|
+
"&:focus-visible": {
|
|
1426
|
+
outline: "none"
|
|
1427
|
+
},
|
|
1428
|
+
"& svg": {
|
|
1429
|
+
fontSize: "1.25em"
|
|
1430
|
+
}
|
|
1431
|
+
},
|
|
1432
|
+
children: /* @__PURE__ */ n.jsx(yo, {})
|
|
1433
|
+
}
|
|
1434
|
+
),
|
|
1435
|
+
/* @__PURE__ */ n.jsxs(
|
|
1436
|
+
qi,
|
|
1437
|
+
{
|
|
1438
|
+
sx: {
|
|
1439
|
+
display: "flex",
|
|
1440
|
+
flexDirection: "column",
|
|
1441
|
+
gap: b.md
|
|
1442
|
+
},
|
|
1443
|
+
children: [
|
|
1444
|
+
/* @__PURE__ */ n.jsx(
|
|
1445
|
+
w,
|
|
1446
|
+
{
|
|
1447
|
+
sx: {
|
|
1448
|
+
fontFamily: d.primary,
|
|
1449
|
+
fontWeight: 600,
|
|
1450
|
+
fontSize: "1.25em",
|
|
1451
|
+
lineHeight: 1.2,
|
|
1452
|
+
color: s.textPrimary,
|
|
1453
|
+
textAlign: "center",
|
|
1454
|
+
marginBottom: b.sm
|
|
1455
|
+
},
|
|
1456
|
+
children: o("common.rules.title")
|
|
1457
|
+
}
|
|
1458
|
+
),
|
|
1459
|
+
/* @__PURE__ */ n.jsx(
|
|
1460
|
+
m,
|
|
1461
|
+
{
|
|
1462
|
+
sx: {
|
|
1463
|
+
fontFamily: d.secondary,
|
|
1464
|
+
fontSize: "1em",
|
|
1465
|
+
lineHeight: 1.5,
|
|
1466
|
+
color: s.textSecondary,
|
|
1467
|
+
overflow: "auto",
|
|
1468
|
+
// Custom scrollbar styling for dark theme
|
|
1469
|
+
"&::-webkit-scrollbar": {
|
|
1470
|
+
width: "8px"
|
|
1471
|
+
},
|
|
1472
|
+
"&::-webkit-scrollbar-track": {
|
|
1473
|
+
backgroundColor: "transparent"
|
|
1474
|
+
},
|
|
1475
|
+
"&::-webkit-scrollbar-thumb": {
|
|
1476
|
+
backgroundColor: s.secondaryContainer,
|
|
1477
|
+
borderRadius: "4px",
|
|
1478
|
+
"&:hover": {
|
|
1479
|
+
backgroundColor: s.textSecondary
|
|
1480
|
+
}
|
|
1481
|
+
},
|
|
1482
|
+
// Firefox scrollbar styling
|
|
1483
|
+
scrollbarWidth: "thin",
|
|
1484
|
+
scrollbarColor: `${s.secondaryContainer} transparent`,
|
|
1485
|
+
"& p": {
|
|
1486
|
+
marginBottom: b.sm
|
|
1487
|
+
},
|
|
1488
|
+
"& ul, & ol": {
|
|
1489
|
+
marginLeft: b.md,
|
|
1490
|
+
marginBottom: b.sm
|
|
1491
|
+
},
|
|
1492
|
+
"& li": {
|
|
1493
|
+
marginBottom: b.xs
|
|
1494
|
+
},
|
|
1495
|
+
"& h1, & h2, & h3, & h4, & h5, & h6": {
|
|
1496
|
+
fontFamily: d.primary,
|
|
1497
|
+
color: s.textPrimary,
|
|
1498
|
+
marginTop: b.md,
|
|
1499
|
+
marginBottom: b.sm
|
|
1500
|
+
}
|
|
1501
|
+
},
|
|
1502
|
+
dangerouslySetInnerHTML: { __html: e }
|
|
1503
|
+
}
|
|
1504
|
+
),
|
|
1505
|
+
/* @__PURE__ */ n.jsx(
|
|
1506
|
+
pe,
|
|
1507
|
+
{
|
|
1508
|
+
variant: "outlined",
|
|
1509
|
+
onClick: (v) => {
|
|
1510
|
+
v.stopPropagation(), x(!1);
|
|
1511
|
+
},
|
|
1512
|
+
sx: {
|
|
1513
|
+
marginTop: b.md,
|
|
1514
|
+
borderColor: s.textPrimary,
|
|
1515
|
+
color: s.textPrimary,
|
|
1516
|
+
fontFamily: d.secondary,
|
|
1517
|
+
fontSize: "0.875em",
|
|
1518
|
+
borderRadius: p.sm,
|
|
1519
|
+
"&:hover": {
|
|
1520
|
+
borderColor: s.textPrimary,
|
|
1521
|
+
color: s.textPrimary,
|
|
1522
|
+
backgroundColor: s.surfaceVariant
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1525
|
+
children: o("common.rules.close")
|
|
1526
|
+
}
|
|
1527
|
+
)
|
|
1528
|
+
]
|
|
1529
|
+
}
|
|
1530
|
+
)
|
|
1531
|
+
]
|
|
1532
|
+
}
|
|
1533
|
+
)
|
|
1534
|
+
}
|
|
1535
|
+
)
|
|
1536
|
+
] });
|
|
1537
|
+
}, bo = (e) => {
|
|
1538
|
+
var t, i, o;
|
|
1539
|
+
return {
|
|
1540
|
+
// Mobile headline with image background
|
|
1541
|
+
mobileHeadlineWithImage: {
|
|
1542
|
+
display: e.isMobile ? "flex" : "none",
|
|
1543
|
+
flexDirection: "column",
|
|
1544
|
+
justifyContent: "space-between",
|
|
1545
|
+
gap: "10px",
|
|
1546
|
+
backgroundImage: `url(${e.finalImage})`,
|
|
1547
|
+
backgroundSize: "cover",
|
|
1548
|
+
backgroundPosition: "center",
|
|
1549
|
+
borderTopLeftRadius: "5px",
|
|
1550
|
+
borderTopRightRadius: "5px",
|
|
1551
|
+
position: "relative",
|
|
1552
|
+
minHeight: "210px",
|
|
1553
|
+
overflow: "hidden",
|
|
1554
|
+
height: "auto",
|
|
1555
|
+
"&::before": {
|
|
1556
|
+
content: '""',
|
|
1557
|
+
position: "absolute",
|
|
1558
|
+
width: "100%",
|
|
1559
|
+
height: "100%",
|
|
1560
|
+
background: e.imageBackgroundGradient,
|
|
1561
|
+
borderTopLeftRadius: "5px",
|
|
1562
|
+
borderTopRightRadius: "5px"
|
|
1563
|
+
}
|
|
1564
|
+
},
|
|
1565
|
+
// Mobile headline content
|
|
1566
|
+
mobileHeadlineContent: {
|
|
1567
|
+
zIndex: 1,
|
|
1568
|
+
height: "100%",
|
|
1569
|
+
p: e.spacingScale.xl,
|
|
1570
|
+
gap: e.spacingScale["2xl"],
|
|
1571
|
+
display: "flex",
|
|
1572
|
+
flexDirection: "column",
|
|
1573
|
+
justifyContent: "space-between"
|
|
1574
|
+
},
|
|
1575
|
+
// Mobile headline without image
|
|
1576
|
+
mobileHeadlineWithoutImage: {
|
|
1577
|
+
display: e.isMobile ? "flex" : "none",
|
|
1578
|
+
flexDirection: "column",
|
|
1579
|
+
justifyContent: "space-between",
|
|
1580
|
+
p: e.isMobile ? e.spacingScale.sm : e.spacingScale.md,
|
|
1581
|
+
gap: e.spacingScale["2xl"]
|
|
1582
|
+
},
|
|
1583
|
+
// Headline typography (mobile with image)
|
|
1584
|
+
headlineTypographyMobileImage: {
|
|
1585
|
+
fontWeight: 500,
|
|
1586
|
+
lineHeight: "166%",
|
|
1587
|
+
letterSpacing: "1px",
|
|
1588
|
+
fontSize: "0.75em",
|
|
1589
|
+
color: ((t = e.brandingColors) == null ? void 0 : t.secondaryColor) || e.darkTextColor,
|
|
1590
|
+
opacity: "70%",
|
|
1591
|
+
textTransform: "uppercase",
|
|
1592
|
+
fontFamily: e.fontFamilySecondary,
|
|
1593
|
+
textAlign: "center"
|
|
1594
|
+
},
|
|
1595
|
+
// Headline typography (mobile without image & desktop)
|
|
1596
|
+
headlineTypography: {
|
|
1597
|
+
fontWeight: 500,
|
|
1598
|
+
lineHeight: "166%",
|
|
1599
|
+
letterSpacing: "1px",
|
|
1600
|
+
textTransform: "uppercase",
|
|
1601
|
+
fontSize: "0.75em",
|
|
1602
|
+
color: e.secondaryColor,
|
|
1603
|
+
opacity: e.opacity,
|
|
1604
|
+
fontFamily: e.fontFamilySecondary,
|
|
1605
|
+
textAlign: e.isMobile ? "center" : "left"
|
|
1606
|
+
},
|
|
1607
|
+
// Headline typography (desktop centered)
|
|
1608
|
+
headlineTypographyDesktop: {
|
|
1609
|
+
fontWeight: 500,
|
|
1610
|
+
lineHeight: "166%",
|
|
1611
|
+
letterSpacing: "1px",
|
|
1612
|
+
textTransform: "uppercase",
|
|
1613
|
+
fontSize: "0.75em",
|
|
1614
|
+
color: e.secondaryColor,
|
|
1615
|
+
opacity: e.opacity,
|
|
1616
|
+
fontFamily: e.fontFamilySecondary
|
|
1617
|
+
},
|
|
1618
|
+
// Content container
|
|
1619
|
+
contentContainer: {
|
|
1620
|
+
display: "flex",
|
|
1621
|
+
flexDirection: "column",
|
|
1622
|
+
gap: e.spacingScale["3xs"]
|
|
1623
|
+
},
|
|
1624
|
+
// Title typography (mobile with image)
|
|
1625
|
+
titleTypographyMobileImage: {
|
|
1626
|
+
fontWeight: 700,
|
|
1627
|
+
lineHeight: "133%",
|
|
1628
|
+
fontSize: "1.5em",
|
|
1629
|
+
letterSpacing: "0.15px",
|
|
1630
|
+
color: ((i = e.brandingColors) == null ? void 0 : i.contentColor) || e.darkTextColor,
|
|
1631
|
+
fontFamily: e.fontFamilyPrimary,
|
|
1632
|
+
textAlign: "center"
|
|
1633
|
+
},
|
|
1634
|
+
// Title typography (mobile without image & desktop responsive)
|
|
1635
|
+
titleTypography: {
|
|
1636
|
+
fontWeight: 700,
|
|
1637
|
+
lineHeight: "133%",
|
|
1638
|
+
letterSpacing: "0px",
|
|
1639
|
+
fontSize: "1.5em",
|
|
1640
|
+
color: e.textColor,
|
|
1641
|
+
fontFamily: e.fontFamilyPrimary,
|
|
1642
|
+
textAlign: e.isMobile ? "center" : "left"
|
|
1643
|
+
},
|
|
1644
|
+
// Title typography (desktop centered)
|
|
1645
|
+
titleTypographyDesktop: {
|
|
1646
|
+
fontWeight: 700,
|
|
1647
|
+
lineHeight: "133%",
|
|
1648
|
+
letterSpacing: "0px",
|
|
1649
|
+
fontSize: "1.5em",
|
|
1650
|
+
color: e.textColor,
|
|
1651
|
+
fontFamily: e.fontFamilyPrimary
|
|
1652
|
+
},
|
|
1653
|
+
// Description typography (mobile with image)
|
|
1654
|
+
descriptionTypographyMobileImage: {
|
|
1655
|
+
fontWeight: 400,
|
|
1656
|
+
lineHeight: "140%",
|
|
1657
|
+
fontSize: "1.25em",
|
|
1658
|
+
letterSpacing: "0.15px",
|
|
1659
|
+
color: ((o = e.brandingColors) == null ? void 0 : o.secondaryColor) || e.darkTextColor,
|
|
1660
|
+
opacity: "70%",
|
|
1661
|
+
fontFamily: e.fontFamilyPrimary,
|
|
1662
|
+
textAlign: "center"
|
|
1663
|
+
},
|
|
1664
|
+
// Description typography (mobile without image & desktop responsive)
|
|
1665
|
+
descriptionTypography: {
|
|
1666
|
+
fontWeight: 400,
|
|
1667
|
+
lineHeight: "140%",
|
|
1668
|
+
letterSpacing: "0.15px",
|
|
1669
|
+
fontSize: "1.25em",
|
|
1670
|
+
color: e.secondaryColor,
|
|
1671
|
+
opacity: e.opacity,
|
|
1672
|
+
fontFamily: e.fontFamilyPrimary,
|
|
1673
|
+
textAlign: e.isMobile ? "center" : "left"
|
|
1674
|
+
},
|
|
1675
|
+
// Description typography (desktop centered)
|
|
1676
|
+
descriptionTypographyDesktop: {
|
|
1677
|
+
fontWeight: 400,
|
|
1678
|
+
lineHeight: "140%",
|
|
1679
|
+
letterSpacing: "0.15px",
|
|
1680
|
+
fontSize: "1.25em",
|
|
1681
|
+
color: e.secondaryColor,
|
|
1682
|
+
opacity: e.opacity,
|
|
1683
|
+
fontFamily: e.fontFamilyPrimary
|
|
1684
|
+
},
|
|
1685
|
+
// Image container (left position)
|
|
1686
|
+
imageContainerLeft: {
|
|
1687
|
+
display: e.isMobile ? "none" : "block",
|
|
1688
|
+
flex: "0.3",
|
|
1689
|
+
overflow: "hidden",
|
|
1690
|
+
height: "auto",
|
|
1691
|
+
position: "relative",
|
|
1692
|
+
minHeight: "auto",
|
|
1693
|
+
backgroundImage: `url(${e.finalImage})`,
|
|
1694
|
+
backgroundSize: "cover",
|
|
1695
|
+
backgroundPosition: "center center",
|
|
1696
|
+
backgroundRepeat: "no-repeat",
|
|
1697
|
+
alignItems: "center",
|
|
1698
|
+
justifyContent: "center"
|
|
1699
|
+
},
|
|
1700
|
+
// Image container (right position)
|
|
1701
|
+
imageContainerRight: {
|
|
1702
|
+
display: e.isMobile ? "none" : "block",
|
|
1703
|
+
flex: "0.3",
|
|
1704
|
+
overflow: "hidden",
|
|
1705
|
+
height: "auto",
|
|
1706
|
+
position: "relative",
|
|
1707
|
+
minHeight: "auto",
|
|
1708
|
+
backgroundImage: `url(${e.finalImage})`,
|
|
1709
|
+
backgroundSize: "cover",
|
|
1710
|
+
backgroundPosition: "center center",
|
|
1711
|
+
backgroundRepeat: "no-repeat",
|
|
1712
|
+
alignItems: "center",
|
|
1713
|
+
justifyContent: "center"
|
|
1714
|
+
},
|
|
1715
|
+
// Image safe area (placeholder for image space)
|
|
1716
|
+
imageSafeArea: {
|
|
1717
|
+
width: "100%",
|
|
1718
|
+
height: "100%"
|
|
1719
|
+
},
|
|
1720
|
+
// Main content area
|
|
1721
|
+
mainContentArea: {
|
|
1722
|
+
flex: e.isMobile ? "1" : e.finalImage ? "0.7" : "1",
|
|
1723
|
+
display: "flex",
|
|
1724
|
+
flexDirection: "column",
|
|
1725
|
+
px: e.isMobile ? e.spacingScale.sm : e.spacingScale.md,
|
|
1726
|
+
pt: e.spacingScale.lg,
|
|
1727
|
+
pb: e.isMobile ? e.spacingScale.sm : e.spacingScale.md,
|
|
1728
|
+
gap: e.spacingScale.md
|
|
1729
|
+
},
|
|
1730
|
+
// Desktop headline container
|
|
1731
|
+
desktopHeadlineContainer: {
|
|
1732
|
+
display: e.isMobile ? "none" : "flex",
|
|
1733
|
+
flexDirection: "column",
|
|
1734
|
+
justifyContent: "space-between",
|
|
1735
|
+
gap: e.spacingScale["2xl"],
|
|
1736
|
+
textAlign: "center"
|
|
1737
|
+
},
|
|
1738
|
+
// Aspect ratio container (for embed code)
|
|
1739
|
+
aspectRatioContainer: {
|
|
1740
|
+
borderRadius: e.borderRadius.md,
|
|
1741
|
+
overflow: "hidden"
|
|
1742
|
+
}
|
|
1743
|
+
};
|
|
1744
|
+
}, Rn = ({
|
|
1745
|
+
entity: e,
|
|
1746
|
+
headline: t,
|
|
1747
|
+
finalImage: i,
|
|
1748
|
+
imagePosition: o = "left",
|
|
1749
|
+
children: a,
|
|
1750
|
+
embedCodeContainerRef: s,
|
|
1751
|
+
hasEmbedCode: p = !1,
|
|
1752
|
+
filterScreenContent: d,
|
|
1753
|
+
rulesDisplay: b
|
|
1754
|
+
}) => {
|
|
1755
|
+
var c, f;
|
|
1756
|
+
const x = de(), v = ce(), g = ie(), y = Y().primary, R = Y().secondary, O = re(), A = ((c = e.branding) == null ? void 0 : c.colors) || null, T = ((f = e.branding) == null ? void 0 : f.urls) || null, S = (A == null ? void 0 : A.contentColor) || H().textColor, I = (A == null ? void 0 : A.secondaryColor) || H().textColor, L = (A == null ? void 0 : A.backgroundColor) || H().surfaceVariant, l = "60%", h = ue(
|
|
1757
|
+
Q.STANDARD
|
|
1758
|
+
), u = bo({
|
|
1759
|
+
finalImage: i,
|
|
1760
|
+
spacingScale: g,
|
|
1761
|
+
borderRadius: O,
|
|
1762
|
+
fontFamilyPrimary: y,
|
|
1763
|
+
fontFamilySecondary: R,
|
|
1764
|
+
textColor: S,
|
|
1765
|
+
secondaryColor: I,
|
|
1766
|
+
bgcolor: nt(L || ""),
|
|
1767
|
+
opacity: l,
|
|
1768
|
+
brandingColors: A,
|
|
1769
|
+
darkTextColor: v.colorSchemes.dark.textColor,
|
|
1770
|
+
imageBackgroundGradient: h,
|
|
1771
|
+
isMobile: x
|
|
1772
|
+
}), _ = wt(
|
|
1773
|
+
T == null ? void 0 : T.primaryUrl,
|
|
1774
|
+
T == null ? void 0 : T.secondaryUrl,
|
|
1775
|
+
"image"
|
|
1776
|
+
), C = () => {
|
|
1777
|
+
_ && window.open(_, "_blank", "noopener,noreferrer");
|
|
1778
|
+
}, E = (M, F) => _ ? typeof window > "u" ? /* @__PURE__ */ n.jsx(
|
|
1779
|
+
m,
|
|
1780
|
+
{
|
|
1781
|
+
component: "a",
|
|
1782
|
+
href: _,
|
|
1783
|
+
target: "_blank",
|
|
1784
|
+
rel: "noopener noreferrer",
|
|
1785
|
+
sx: {
|
|
1786
|
+
...F,
|
|
1787
|
+
cursor: "pointer",
|
|
1788
|
+
textDecoration: "none"
|
|
1789
|
+
},
|
|
1790
|
+
children: M
|
|
1791
|
+
}
|
|
1792
|
+
) : /* @__PURE__ */ n.jsx(
|
|
1793
|
+
m,
|
|
1794
|
+
{
|
|
1795
|
+
sx: {
|
|
1796
|
+
...F,
|
|
1797
|
+
cursor: "pointer"
|
|
1798
|
+
},
|
|
1799
|
+
onClick: C,
|
|
1800
|
+
children: M
|
|
1801
|
+
}
|
|
1802
|
+
) : /* @__PURE__ */ n.jsx(m, { sx: F, children: M }), N = () => p && s ? /* @__PURE__ */ n.jsxs(m, { sx: u.mobileHeadlineWithoutImage, children: [
|
|
1803
|
+
/* @__PURE__ */ n.jsxs(m, { children: [
|
|
1804
|
+
/* @__PURE__ */ n.jsxs(
|
|
1805
|
+
m,
|
|
1806
|
+
{
|
|
1807
|
+
sx: {
|
|
1808
|
+
display: "flex",
|
|
1809
|
+
alignItems: "center",
|
|
1810
|
+
justifyContent: "center",
|
|
1811
|
+
gap: g["3xs"]
|
|
1812
|
+
},
|
|
1813
|
+
children: [
|
|
1814
|
+
/* @__PURE__ */ n.jsx(w, { level: "body-sm", sx: u.headlineTypography, children: t }),
|
|
1815
|
+
/* @__PURE__ */ n.jsx(
|
|
1816
|
+
B,
|
|
1817
|
+
{
|
|
1818
|
+
rules: e.rules || "",
|
|
1819
|
+
rulesDisplay: b,
|
|
1820
|
+
isOverlayVariant: !1
|
|
1821
|
+
}
|
|
1822
|
+
)
|
|
1823
|
+
]
|
|
1824
|
+
}
|
|
1825
|
+
),
|
|
1826
|
+
/* @__PURE__ */ n.jsxs(m, { sx: u.contentContainer, children: [
|
|
1827
|
+
/* @__PURE__ */ n.jsx(w, { level: "h4", sx: u.titleTypography, children: e.title }),
|
|
1828
|
+
/* @__PURE__ */ n.jsx(w, { sx: u.descriptionTypography, children: W(e.description) })
|
|
1829
|
+
] })
|
|
1830
|
+
] }),
|
|
1831
|
+
/* @__PURE__ */ n.jsx(Ze, { ratio: "16/9", sx: u.aspectRatioContainer, children: /* @__PURE__ */ n.jsx(m, { ref: s }) })
|
|
1832
|
+
] }) : i ? E(
|
|
1833
|
+
/* @__PURE__ */ n.jsxs(m, { sx: u.mobileHeadlineContent, children: [
|
|
1834
|
+
/* @__PURE__ */ n.jsxs(m, { children: [
|
|
1835
|
+
/* @__PURE__ */ n.jsxs(
|
|
1836
|
+
m,
|
|
1837
|
+
{
|
|
1838
|
+
sx: {
|
|
1839
|
+
display: "flex",
|
|
1840
|
+
alignItems: "center",
|
|
1841
|
+
justifyContent: "center",
|
|
1842
|
+
gap: g["3xs"]
|
|
1843
|
+
},
|
|
1844
|
+
children: [
|
|
1845
|
+
/* @__PURE__ */ n.jsx(
|
|
1846
|
+
w,
|
|
1847
|
+
{
|
|
1848
|
+
level: "body-sm",
|
|
1849
|
+
sx: u.headlineTypographyMobileImage,
|
|
1850
|
+
children: t
|
|
1851
|
+
}
|
|
1852
|
+
),
|
|
1853
|
+
/* @__PURE__ */ n.jsx(
|
|
1854
|
+
B,
|
|
1855
|
+
{
|
|
1856
|
+
rules: e.rules || "",
|
|
1857
|
+
rulesDisplay: b,
|
|
1858
|
+
isOverlayVariant: !1
|
|
1859
|
+
}
|
|
1860
|
+
)
|
|
1861
|
+
]
|
|
1862
|
+
}
|
|
1863
|
+
),
|
|
1864
|
+
/* @__PURE__ */ n.jsxs(m, { sx: u.contentContainer, children: [
|
|
1865
|
+
/* @__PURE__ */ n.jsx(w, { sx: u.titleTypographyMobileImage, children: e.title }),
|
|
1866
|
+
/* @__PURE__ */ n.jsx(w, { sx: u.descriptionTypographyMobileImage, children: W(e.description) })
|
|
1867
|
+
] })
|
|
1868
|
+
] }),
|
|
1869
|
+
d && /* @__PURE__ */ n.jsx(m, { children: d })
|
|
1870
|
+
] }),
|
|
1871
|
+
u.mobileHeadlineWithImage
|
|
1872
|
+
) : /* @__PURE__ */ n.jsxs(m, { sx: u.mobileHeadlineWithoutImage, children: [
|
|
1873
|
+
/* @__PURE__ */ n.jsxs(m, { children: [
|
|
1874
|
+
/* @__PURE__ */ n.jsxs(
|
|
1875
|
+
m,
|
|
1876
|
+
{
|
|
1877
|
+
sx: {
|
|
1878
|
+
display: "flex",
|
|
1879
|
+
alignItems: "center",
|
|
1880
|
+
justifyContent: "center",
|
|
1881
|
+
gap: g["3xs"]
|
|
1882
|
+
},
|
|
1883
|
+
children: [
|
|
1884
|
+
/* @__PURE__ */ n.jsx(w, { level: "body-sm", sx: u.headlineTypography, children: t }),
|
|
1885
|
+
/* @__PURE__ */ n.jsx(
|
|
1886
|
+
B,
|
|
1887
|
+
{
|
|
1888
|
+
rules: e.rules || "",
|
|
1889
|
+
rulesDisplay: b,
|
|
1890
|
+
isOverlayVariant: !1
|
|
1891
|
+
}
|
|
1892
|
+
)
|
|
1893
|
+
]
|
|
1894
|
+
}
|
|
1895
|
+
),
|
|
1896
|
+
/* @__PURE__ */ n.jsxs(m, { sx: u.contentContainer, children: [
|
|
1897
|
+
/* @__PURE__ */ n.jsx(w, { level: "h4", sx: u.titleTypography, children: e.title }),
|
|
1898
|
+
/* @__PURE__ */ n.jsx(w, { sx: u.descriptionTypography, children: W(e.description) })
|
|
1899
|
+
] })
|
|
1900
|
+
] }),
|
|
1901
|
+
d && /* @__PURE__ */ n.jsx(m, { children: d })
|
|
1902
|
+
] }), P = !(x && d);
|
|
1903
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1904
|
+
x && N(),
|
|
1905
|
+
o === "left" && i ? E(
|
|
1906
|
+
/* @__PURE__ */ n.jsx(m, { sx: u.imageSafeArea }),
|
|
1907
|
+
u.imageContainerLeft
|
|
1908
|
+
) : null,
|
|
1909
|
+
P && /* @__PURE__ */ n.jsxs(m, { sx: u.mainContentArea, children: [
|
|
1910
|
+
!x && /* @__PURE__ */ n.jsx(m, { children: /* @__PURE__ */ n.jsxs(m, { sx: u.desktopHeadlineContainer, children: [
|
|
1911
|
+
/* @__PURE__ */ n.jsxs(
|
|
1912
|
+
m,
|
|
1913
|
+
{
|
|
1914
|
+
sx: {
|
|
1915
|
+
display: "flex",
|
|
1916
|
+
flexDirection: "column",
|
|
1917
|
+
alignItems: "center"
|
|
1918
|
+
},
|
|
1919
|
+
children: [
|
|
1920
|
+
/* @__PURE__ */ n.jsxs(
|
|
1921
|
+
m,
|
|
1922
|
+
{
|
|
1923
|
+
sx: {
|
|
1924
|
+
display: "flex",
|
|
1925
|
+
alignItems: "center",
|
|
1926
|
+
justifyContent: "center",
|
|
1927
|
+
gap: g["3xs"]
|
|
1928
|
+
},
|
|
1929
|
+
children: [
|
|
1930
|
+
/* @__PURE__ */ n.jsx(
|
|
1931
|
+
w,
|
|
1932
|
+
{
|
|
1933
|
+
level: "body-sm",
|
|
1934
|
+
sx: u.headlineTypographyDesktop,
|
|
1935
|
+
children: t
|
|
1936
|
+
}
|
|
1937
|
+
),
|
|
1938
|
+
/* @__PURE__ */ n.jsx(
|
|
1939
|
+
B,
|
|
1940
|
+
{
|
|
1941
|
+
rules: e.rules || "",
|
|
1942
|
+
rulesDisplay: b,
|
|
1943
|
+
isOverlayVariant: !1
|
|
1944
|
+
}
|
|
1945
|
+
)
|
|
1946
|
+
]
|
|
1947
|
+
}
|
|
1948
|
+
),
|
|
1949
|
+
/* @__PURE__ */ n.jsxs(m, { sx: u.contentContainer, children: [
|
|
1950
|
+
/* @__PURE__ */ n.jsx(w, { level: "h4", sx: u.titleTypographyDesktop, children: e.title }),
|
|
1951
|
+
/* @__PURE__ */ n.jsx(w, { sx: u.descriptionTypographyDesktop, children: W(e.description) })
|
|
1952
|
+
] })
|
|
1953
|
+
]
|
|
1954
|
+
}
|
|
1955
|
+
),
|
|
1956
|
+
p && s ? /* @__PURE__ */ n.jsx(m, { sx: { px: g.md }, children: /* @__PURE__ */ n.jsx(Ze, { ratio: "16/9", sx: u.aspectRatioContainer, children: /* @__PURE__ */ n.jsx(m, { ref: s }) }) }) : d ? /* @__PURE__ */ n.jsx(m, { children: d }) : /* @__PURE__ */ n.jsx(n.Fragment, {})
|
|
1957
|
+
] }) }),
|
|
1958
|
+
a
|
|
1959
|
+
] }),
|
|
1960
|
+
o === "right" && i ? E(
|
|
1961
|
+
/* @__PURE__ */ n.jsx(m, { sx: u.imageSafeArea }),
|
|
1962
|
+
u.imageContainerRight
|
|
1963
|
+
) : null
|
|
1964
|
+
] });
|
|
1965
|
+
}, vo = (e) => {
|
|
1966
|
+
var t, i, o, a;
|
|
1967
|
+
return {
|
|
1968
|
+
// Main headline section with background image
|
|
1969
|
+
headlineSection: {
|
|
1970
|
+
display: "flex",
|
|
1971
|
+
flexDirection: "column",
|
|
1972
|
+
justifyContent: "space-between",
|
|
1973
|
+
gap: "10px",
|
|
1974
|
+
flex: e.isMobile ? "1" : "0 0 50%",
|
|
1975
|
+
width: e.isMobile ? "100%" : "50%",
|
|
1976
|
+
minWidth: e.isMobile ? "100%" : "50%",
|
|
1977
|
+
maxWidth: e.isMobile ? "100%" : "50%",
|
|
1978
|
+
backgroundImage: e.finalImage ? `url(${e.finalImage})` : "none",
|
|
1979
|
+
backgroundSize: "cover",
|
|
1980
|
+
backgroundPosition: "center",
|
|
1981
|
+
borderTopLeftRadius: e.borderRadius.md,
|
|
1982
|
+
borderTopRightRadius: e.isMobile ? e.borderRadius.md : 0,
|
|
1983
|
+
borderBottomLeftRadius: e.isMobile ? 0 : e.borderRadius.md,
|
|
1984
|
+
overflow: "hidden",
|
|
1985
|
+
height: "auto",
|
|
1986
|
+
position: "relative",
|
|
1987
|
+
minHeight: e.isMobile ? "210px" : "430px",
|
|
1988
|
+
"&::before": e.finalImage ? {
|
|
1989
|
+
content: '""',
|
|
1990
|
+
position: "absolute",
|
|
1991
|
+
width: "100%",
|
|
1992
|
+
height: "100%",
|
|
1993
|
+
background: e.imageBackgroundGradient,
|
|
1994
|
+
borderTopLeftRadius: "5px",
|
|
1995
|
+
borderTopRightRadius: "5px"
|
|
1996
|
+
} : {}
|
|
1997
|
+
},
|
|
1998
|
+
// Headline section without image
|
|
1999
|
+
headlineSectionNoImage: {
|
|
2000
|
+
display: "flex",
|
|
2001
|
+
flexDirection: "column",
|
|
2002
|
+
justifyContent: "space-between",
|
|
2003
|
+
gap: "10px",
|
|
2004
|
+
flex: e.isMobile ? "1" : "0 0 50%",
|
|
2005
|
+
width: e.isMobile ? "100%" : "50%",
|
|
2006
|
+
minWidth: e.isMobile ? "100%" : "50%",
|
|
2007
|
+
maxWidth: e.isMobile ? "100%" : "50%",
|
|
2008
|
+
borderTopLeftRadius: e.borderRadius.md,
|
|
2009
|
+
borderTopRightRadius: e.isMobile ? e.borderRadius.md : 0,
|
|
2010
|
+
borderBottomLeftRadius: e.isMobile ? 0 : e.borderRadius.md,
|
|
2011
|
+
overflow: "hidden",
|
|
2012
|
+
height: "auto",
|
|
2013
|
+
position: "relative",
|
|
2014
|
+
minHeight: e.isMobile ? "210px" : "430px",
|
|
2015
|
+
backgroundColor: ((t = e.brandingColors) == null ? void 0 : t.backgroundColor) || e.textColor + "10"
|
|
2016
|
+
},
|
|
2017
|
+
// Embed code headline section (for poll-vote and classic-quiz-play)
|
|
2018
|
+
embedCodeHeadlineSection: {
|
|
2019
|
+
display: "flex",
|
|
2020
|
+
flexDirection: "column",
|
|
2021
|
+
justifyContent: "space-between",
|
|
2022
|
+
gap: "10px",
|
|
2023
|
+
flex: e.isMobile ? "1" : "0 0 50%",
|
|
2024
|
+
width: e.isMobile ? "100%" : "50%",
|
|
2025
|
+
minWidth: e.isMobile ? "100%" : "50%",
|
|
2026
|
+
maxWidth: e.isMobile ? "100%" : "50%",
|
|
2027
|
+
borderTopLeftRadius: e.borderRadius.md,
|
|
2028
|
+
borderTopRightRadius: e.isMobile ? e.borderRadius.md : 0,
|
|
2029
|
+
borderBottomLeftRadius: e.isMobile ? 0 : e.borderRadius.md,
|
|
2030
|
+
overflow: "hidden",
|
|
2031
|
+
height: "auto",
|
|
2032
|
+
position: "relative",
|
|
2033
|
+
minHeight: e.isMobile ? "210px" : "430px"
|
|
2034
|
+
},
|
|
2035
|
+
// AspectRatio container for embed code
|
|
2036
|
+
aspectRatioContainer: {
|
|
2037
|
+
borderRadius: 0,
|
|
2038
|
+
width: "100%",
|
|
2039
|
+
height: "100%"
|
|
2040
|
+
},
|
|
2041
|
+
// Headline content wrapper
|
|
2042
|
+
headlineContent: {
|
|
2043
|
+
zIndex: 1,
|
|
2044
|
+
height: "100%",
|
|
2045
|
+
p: e.spacingScale.xl,
|
|
2046
|
+
gap: e.spacingScale.xl,
|
|
2047
|
+
display: "flex",
|
|
2048
|
+
flexDirection: "column",
|
|
2049
|
+
justifyContent: "space-between"
|
|
2050
|
+
},
|
|
2051
|
+
// Embed code headline content (shown in question area when embed code is present)
|
|
2052
|
+
embedCodeHeadlineContent: {
|
|
2053
|
+
px: e.spacingScale.lg,
|
|
2054
|
+
pt: e.spacingScale.lg,
|
|
2055
|
+
display: "flex",
|
|
2056
|
+
flexDirection: "column",
|
|
2057
|
+
gap: e.spacingScale.md
|
|
2058
|
+
},
|
|
2059
|
+
// Headline typography (with image background)
|
|
2060
|
+
headlineText: {
|
|
2061
|
+
fontWeight: 500,
|
|
2062
|
+
lineHeight: "166%",
|
|
2063
|
+
letterSpacing: "1px",
|
|
2064
|
+
fontSize: "0.75em",
|
|
2065
|
+
color: ((i = e.brandingColors) == null ? void 0 : i.secondaryColor) || e.darkTextColor,
|
|
2066
|
+
opacity: "70%",
|
|
2067
|
+
textTransform: "uppercase",
|
|
2068
|
+
fontFamily: e.fontFamilySecondary,
|
|
2069
|
+
textAlign: e.isMobile ? "center" : "left"
|
|
2070
|
+
},
|
|
2071
|
+
// Headline typography (without image background)
|
|
2072
|
+
headlineTextNoImage: {
|
|
2073
|
+
fontWeight: 500,
|
|
2074
|
+
lineHeight: "166%",
|
|
2075
|
+
letterSpacing: "1px",
|
|
2076
|
+
fontSize: "0.75em",
|
|
2077
|
+
color: e.secondaryColor,
|
|
2078
|
+
opacity: "70%",
|
|
2079
|
+
textTransform: "uppercase",
|
|
2080
|
+
fontFamily: e.fontFamilySecondary,
|
|
2081
|
+
textAlign: e.isMobile ? "center" : "left"
|
|
2082
|
+
},
|
|
2083
|
+
// Content container
|
|
2084
|
+
contentContainer: {
|
|
2085
|
+
display: "flex",
|
|
2086
|
+
flexDirection: "column",
|
|
2087
|
+
gap: e.spacingScale["3xs"]
|
|
2088
|
+
},
|
|
2089
|
+
// Title typography (with image background)
|
|
2090
|
+
titleText: {
|
|
2091
|
+
fontWeight: 700,
|
|
2092
|
+
lineHeight: "133%",
|
|
2093
|
+
fontSize: "1.5em",
|
|
2094
|
+
letterSpacing: "0.15px",
|
|
2095
|
+
color: ((o = e.brandingColors) == null ? void 0 : o.contentColor) || e.darkTextColor,
|
|
2096
|
+
fontFamily: e.fontFamilyPrimary,
|
|
2097
|
+
textAlign: e.isMobile ? "center" : "left"
|
|
2098
|
+
},
|
|
2099
|
+
// Title typography (without image background)
|
|
2100
|
+
titleTextNoImage: {
|
|
2101
|
+
fontWeight: 700,
|
|
2102
|
+
lineHeight: "133%",
|
|
2103
|
+
fontSize: "1.5em",
|
|
2104
|
+
letterSpacing: "0.15px",
|
|
2105
|
+
color: e.textColor,
|
|
2106
|
+
fontFamily: e.fontFamilyPrimary,
|
|
2107
|
+
textAlign: e.isMobile ? "center" : "left"
|
|
2108
|
+
},
|
|
2109
|
+
// Description typography (with image background)
|
|
2110
|
+
descriptionText: {
|
|
2111
|
+
fontWeight: 400,
|
|
2112
|
+
lineHeight: "140%",
|
|
2113
|
+
fontSize: "1.25em",
|
|
2114
|
+
letterSpacing: "0.15px",
|
|
2115
|
+
color: ((a = e.brandingColors) == null ? void 0 : a.secondaryColor) || e.darkTextColor,
|
|
2116
|
+
opacity: "70%",
|
|
2117
|
+
fontFamily: e.fontFamilyPrimary,
|
|
2118
|
+
textAlign: e.isMobile ? "center" : "left"
|
|
2119
|
+
},
|
|
2120
|
+
// Description typography (without image background)
|
|
2121
|
+
descriptionTextNoImage: {
|
|
2122
|
+
fontWeight: 400,
|
|
2123
|
+
lineHeight: "140%",
|
|
2124
|
+
fontSize: "1.25em",
|
|
2125
|
+
letterSpacing: "0.15px",
|
|
2126
|
+
color: e.secondaryColor,
|
|
2127
|
+
opacity: "70%",
|
|
2128
|
+
fontFamily: e.fontFamilyPrimary,
|
|
2129
|
+
textAlign: e.isMobile ? "center" : "left"
|
|
2130
|
+
},
|
|
2131
|
+
// Question area / content section
|
|
2132
|
+
questionArea: {
|
|
2133
|
+
flex: e.isMobile ? "1" : "0 0 50%",
|
|
2134
|
+
width: e.isMobile ? "100%" : "50%",
|
|
2135
|
+
minWidth: e.isMobile ? "100%" : "50%",
|
|
2136
|
+
maxWidth: e.isMobile ? "100%" : "50%",
|
|
2137
|
+
display: "flex",
|
|
2138
|
+
flexDirection: "column",
|
|
2139
|
+
justifyContent: "center"
|
|
2140
|
+
}
|
|
2141
|
+
};
|
|
2142
|
+
}, In = ({
|
|
2143
|
+
entity: e,
|
|
2144
|
+
headline: t,
|
|
2145
|
+
finalImage: i,
|
|
2146
|
+
children: o,
|
|
2147
|
+
embedCodeContainerRef: a,
|
|
2148
|
+
hasEmbedCode: s = !1,
|
|
2149
|
+
brandingLogo: p,
|
|
2150
|
+
renderPresentedBy: d,
|
|
2151
|
+
rulesDisplay: b
|
|
2152
|
+
}) => {
|
|
2153
|
+
var c, f;
|
|
2154
|
+
const x = de(), v = Lt(), g = e.type === "poll" || e.type === "match-quiz" ? v : x, y = ce(), R = ie(), O = Y().primary, A = Y().secondary, T = re(), S = ((c = e.branding) == null ? void 0 : c.colors) || null, I = ((f = e.branding) == null ? void 0 : f.urls) || null, L = (S == null ? void 0 : S.contentColor) || H().textColor, l = (S == null ? void 0 : S.secondaryColor) || H().textColor, h = (S == null ? void 0 : S.backgroundColor) || H().surfaceVariant, u = y.colorSchemes.dark.textColor, _ = ue(
|
|
2155
|
+
Q.SPLIT
|
|
2156
|
+
), C = vo({
|
|
2157
|
+
finalImage: i,
|
|
2158
|
+
spacingScale: R,
|
|
2159
|
+
borderRadius: T,
|
|
2160
|
+
fontFamilyPrimary: O,
|
|
2161
|
+
fontFamilySecondary: A,
|
|
2162
|
+
secondaryColor: l,
|
|
2163
|
+
bgcolor: nt(h || ""),
|
|
2164
|
+
textColor: L,
|
|
2165
|
+
brandingColors: S,
|
|
2166
|
+
darkTextColor: u,
|
|
2167
|
+
imageBackgroundGradient: _,
|
|
2168
|
+
isMobile: g
|
|
2169
|
+
}), E = wt(
|
|
2170
|
+
I == null ? void 0 : I.primaryUrl,
|
|
2171
|
+
I == null ? void 0 : I.secondaryUrl,
|
|
2172
|
+
"image"
|
|
2173
|
+
), N = () => {
|
|
2174
|
+
E && window.open(E, "_blank", "noopener,noreferrer");
|
|
2175
|
+
}, P = (M, F) => E ? typeof window > "u" ? /* @__PURE__ */ n.jsx(
|
|
2176
|
+
m,
|
|
2177
|
+
{
|
|
2178
|
+
component: "a",
|
|
2179
|
+
href: E,
|
|
2180
|
+
target: "_blank",
|
|
2181
|
+
rel: "noopener noreferrer",
|
|
2182
|
+
sx: {
|
|
2183
|
+
...F,
|
|
2184
|
+
cursor: "pointer",
|
|
2185
|
+
textDecoration: "none"
|
|
2186
|
+
},
|
|
2187
|
+
children: M
|
|
2188
|
+
}
|
|
2189
|
+
) : /* @__PURE__ */ n.jsx(
|
|
2190
|
+
m,
|
|
2191
|
+
{
|
|
2192
|
+
sx: {
|
|
2193
|
+
...F,
|
|
2194
|
+
cursor: "pointer"
|
|
2195
|
+
},
|
|
2196
|
+
onClick: N,
|
|
2197
|
+
children: M
|
|
2198
|
+
}
|
|
2199
|
+
) : /* @__PURE__ */ n.jsx(m, { sx: F, children: M });
|
|
2200
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2201
|
+
s && a ? /* @__PURE__ */ n.jsx(m, { sx: C.embedCodeHeadlineSection, children: /* @__PURE__ */ n.jsx(
|
|
2202
|
+
Ze,
|
|
2203
|
+
{
|
|
2204
|
+
ratio: "16/9",
|
|
2205
|
+
sx: C.aspectRatioContainer,
|
|
2206
|
+
slotProps: { content: { sx: { height: "100%" } } },
|
|
2207
|
+
children: /* @__PURE__ */ n.jsx(m, { ref: a })
|
|
2208
|
+
}
|
|
2209
|
+
) }) : i ? P(
|
|
2210
|
+
/* @__PURE__ */ n.jsxs(m, { sx: C.headlineContent, children: [
|
|
2211
|
+
/* @__PURE__ */ n.jsxs(m, { children: [
|
|
2212
|
+
/* @__PURE__ */ n.jsxs(
|
|
2213
|
+
m,
|
|
2214
|
+
{
|
|
2215
|
+
sx: {
|
|
2216
|
+
display: "flex",
|
|
2217
|
+
alignItems: "center",
|
|
2218
|
+
justifyContent: g ? "center" : "flex-start",
|
|
2219
|
+
gap: R["3xs"]
|
|
2220
|
+
},
|
|
2221
|
+
children: [
|
|
2222
|
+
/* @__PURE__ */ n.jsx(w, { sx: C.headlineText, children: t }),
|
|
2223
|
+
/* @__PURE__ */ n.jsx(B, { rulesDisplay: b, rules: e.rules || "" })
|
|
2224
|
+
]
|
|
2225
|
+
}
|
|
2226
|
+
),
|
|
2227
|
+
/* @__PURE__ */ n.jsxs(m, { sx: C.contentContainer, children: [
|
|
2228
|
+
/* @__PURE__ */ n.jsx(w, { sx: C.titleText, children: e.title }),
|
|
2229
|
+
/* @__PURE__ */ n.jsx(w, { sx: C.descriptionText, children: W(e.description) })
|
|
2230
|
+
] })
|
|
2231
|
+
] }),
|
|
2232
|
+
p && !g && d && /* @__PURE__ */ n.jsx(m, { children: d((S == null ? void 0 : S.contentColor) || u) })
|
|
2233
|
+
] }),
|
|
2234
|
+
C.headlineSection
|
|
2235
|
+
) : /* @__PURE__ */ n.jsx(m, { sx: C.headlineSectionNoImage, children: /* @__PURE__ */ n.jsxs(m, { sx: C.headlineContent, children: [
|
|
2236
|
+
/* @__PURE__ */ n.jsxs(m, { children: [
|
|
2237
|
+
/* @__PURE__ */ n.jsxs(
|
|
2238
|
+
m,
|
|
2239
|
+
{
|
|
2240
|
+
sx: {
|
|
2241
|
+
display: "flex",
|
|
2242
|
+
alignItems: "center",
|
|
2243
|
+
justifyContent: g ? "center" : "flex-start",
|
|
2244
|
+
gap: R["3xs"]
|
|
2245
|
+
},
|
|
2246
|
+
children: [
|
|
2247
|
+
/* @__PURE__ */ n.jsx(w, { sx: C.headlineTextNoImage, children: t }),
|
|
2248
|
+
/* @__PURE__ */ n.jsx(B, { rulesDisplay: b, rules: e.rules || "" })
|
|
2249
|
+
]
|
|
2250
|
+
}
|
|
2251
|
+
),
|
|
2252
|
+
/* @__PURE__ */ n.jsxs(m, { sx: C.contentContainer, children: [
|
|
2253
|
+
/* @__PURE__ */ n.jsx(w, { sx: C.titleTextNoImage, children: e.title }),
|
|
2254
|
+
/* @__PURE__ */ n.jsx(w, { sx: C.descriptionTextNoImage, children: W(e.description) })
|
|
2255
|
+
] })
|
|
2256
|
+
] }),
|
|
2257
|
+
p && !g && d && /* @__PURE__ */ n.jsx(m, { children: d(L) })
|
|
2258
|
+
] }) }),
|
|
2259
|
+
/* @__PURE__ */ n.jsxs(m, { sx: C.questionArea, children: [
|
|
2260
|
+
s && a && /* @__PURE__ */ n.jsx(m, { sx: C.embedCodeHeadlineContent, children: /* @__PURE__ */ n.jsxs(m, { children: [
|
|
2261
|
+
/* @__PURE__ */ n.jsxs(
|
|
2262
|
+
m,
|
|
2263
|
+
{
|
|
2264
|
+
sx: {
|
|
2265
|
+
display: "flex",
|
|
2266
|
+
alignItems: "center",
|
|
2267
|
+
justifyContent: "center",
|
|
2268
|
+
gap: R["3xs"]
|
|
2269
|
+
},
|
|
2270
|
+
children: [
|
|
2271
|
+
/* @__PURE__ */ n.jsx(
|
|
2272
|
+
w,
|
|
2273
|
+
{
|
|
2274
|
+
sx: {
|
|
2275
|
+
...C.headlineTextNoImage,
|
|
2276
|
+
textAlign: "center"
|
|
2277
|
+
},
|
|
2278
|
+
children: t
|
|
2279
|
+
}
|
|
2280
|
+
),
|
|
2281
|
+
/* @__PURE__ */ n.jsx(B, { rulesDisplay: b, rules: e.rules || "" })
|
|
2282
|
+
]
|
|
2283
|
+
}
|
|
2284
|
+
),
|
|
2285
|
+
/* @__PURE__ */ n.jsxs(m, { sx: C.contentContainer, children: [
|
|
2286
|
+
/* @__PURE__ */ n.jsx(
|
|
2287
|
+
w,
|
|
2288
|
+
{
|
|
2289
|
+
sx: {
|
|
2290
|
+
...C.titleTextNoImage,
|
|
2291
|
+
textAlign: "center"
|
|
2292
|
+
},
|
|
2293
|
+
children: e.title
|
|
2294
|
+
}
|
|
2295
|
+
),
|
|
2296
|
+
/* @__PURE__ */ n.jsx(
|
|
2297
|
+
w,
|
|
2298
|
+
{
|
|
2299
|
+
sx: {
|
|
2300
|
+
...C.descriptionTextNoImage,
|
|
2301
|
+
textAlign: "center"
|
|
2302
|
+
},
|
|
2303
|
+
children: W(e.description)
|
|
2304
|
+
}
|
|
2305
|
+
)
|
|
2306
|
+
] })
|
|
2307
|
+
] }) }),
|
|
2308
|
+
o
|
|
2309
|
+
] })
|
|
2310
|
+
] });
|
|
2311
|
+
}, Co = (e) => {
|
|
2312
|
+
var t;
|
|
2313
|
+
return {
|
|
2314
|
+
// Main container with background overlay
|
|
2315
|
+
mainContainer: {
|
|
2316
|
+
display: "flex",
|
|
2317
|
+
flexDirection: "column",
|
|
2318
|
+
justifyContent: "space-between",
|
|
2319
|
+
gap: "40px",
|
|
2320
|
+
p: e.spacingScale.xl,
|
|
2321
|
+
boxShadow: "md",
|
|
2322
|
+
border: (t = e.brandingColors) != null && t.borderColor ? `${e.borderSize} solid ${e.brandingColors.borderColor}` : "none",
|
|
2323
|
+
overflow: "hidden",
|
|
2324
|
+
backgroundImage: e.backgroundImage,
|
|
2325
|
+
backgroundPosition: "center",
|
|
2326
|
+
backgroundSize: "cover",
|
|
2327
|
+
position: "relative",
|
|
2328
|
+
borderRadius: e.mdBorderRadius,
|
|
2329
|
+
minHeight: "250px",
|
|
2330
|
+
"&::before": {
|
|
2331
|
+
content: '""',
|
|
2332
|
+
position: "absolute",
|
|
2333
|
+
background: e.imageBackgroundGradient,
|
|
2334
|
+
top: 0,
|
|
2335
|
+
left: 0,
|
|
2336
|
+
right: 0,
|
|
2337
|
+
bottom: 0,
|
|
2338
|
+
borderRadius: "inherit",
|
|
2339
|
+
zIndex: 0
|
|
2340
|
+
}
|
|
2341
|
+
},
|
|
2342
|
+
// Headline section wrapper
|
|
2343
|
+
headlineSection: {
|
|
2344
|
+
display: "flex",
|
|
2345
|
+
justifyContent: "space-between",
|
|
2346
|
+
flex: "1 0 0",
|
|
2347
|
+
alignSelf: "stretch"
|
|
2348
|
+
},
|
|
2349
|
+
// Headline content container
|
|
2350
|
+
headlineContent: {
|
|
2351
|
+
display: "flex",
|
|
2352
|
+
flexDirection: "column",
|
|
2353
|
+
alignItems: "flex-start",
|
|
2354
|
+
flex: "1 0 0",
|
|
2355
|
+
gap: "16px"
|
|
2356
|
+
},
|
|
2357
|
+
// Headline content with z-index
|
|
2358
|
+
headlineContentInner: {
|
|
2359
|
+
zIndex: 10
|
|
2360
|
+
},
|
|
2361
|
+
// Headline typography
|
|
2362
|
+
headlineText: {
|
|
2363
|
+
fontWeight: 500,
|
|
2364
|
+
lineHeight: "166%",
|
|
2365
|
+
letterSpacing: "1px",
|
|
2366
|
+
textAlign: { xs: "center", md: "left" },
|
|
2367
|
+
color: e.secondaryColor,
|
|
2368
|
+
opacity: "70%",
|
|
2369
|
+
textTransform: "uppercase",
|
|
2370
|
+
fontFamily: e.fontFamilySecondary,
|
|
2371
|
+
fontSize: "0.75em"
|
|
2372
|
+
},
|
|
2373
|
+
// Content container
|
|
2374
|
+
contentContainer: {
|
|
2375
|
+
display: "flex",
|
|
2376
|
+
flexDirection: "column",
|
|
2377
|
+
gap: e.spacingScale["3xs"]
|
|
2378
|
+
},
|
|
2379
|
+
// Title typography
|
|
2380
|
+
titleText: {
|
|
2381
|
+
fontWeight: 700,
|
|
2382
|
+
lineHeight: "133%",
|
|
2383
|
+
letterSpacing: "0px",
|
|
2384
|
+
textAlign: { xs: "center", md: "left" },
|
|
2385
|
+
fontSize: "1.5em",
|
|
2386
|
+
color: e.darkTextColor,
|
|
2387
|
+
fontFamily: e.fontFamilyPrimary
|
|
2388
|
+
},
|
|
2389
|
+
// Description typography
|
|
2390
|
+
descriptionText: {
|
|
2391
|
+
fontWeight: 400,
|
|
2392
|
+
lineHeight: "140%",
|
|
2393
|
+
letterSpacing: "0.15px",
|
|
2394
|
+
fontSize: "1.25em",
|
|
2395
|
+
textAlign: { xs: "center", md: "left" },
|
|
2396
|
+
color: e.secondaryColor,
|
|
2397
|
+
opacity: "70%",
|
|
2398
|
+
fontFamily: e.fontFamilyPrimary
|
|
2399
|
+
},
|
|
2400
|
+
// Main content section
|
|
2401
|
+
mainContentSection: {
|
|
2402
|
+
display: "flex",
|
|
2403
|
+
flexDirection: "column",
|
|
2404
|
+
gap: "24px"
|
|
2405
|
+
}
|
|
2406
|
+
};
|
|
2407
|
+
}, On = ({
|
|
2408
|
+
entity: e,
|
|
2409
|
+
headline: t,
|
|
2410
|
+
finalImage: i,
|
|
2411
|
+
children: o,
|
|
2412
|
+
rulesDisplay: a
|
|
2413
|
+
}) => {
|
|
2414
|
+
var s, p;
|
|
2415
|
+
const d = ce(), b = ie(), c = ue(
|
|
2416
|
+
Q.OVERLAY
|
|
2417
|
+
), f = ((s = e.branding) == null ? void 0 : s.colors) || null, x = (f == null ? void 0 : f.contentColor) || d.colorSchemes.dark.textColor, v = d.customFontFamily.dark.primary, g = d.customFontFamily.dark.secondary, y = d.customRadius.dark.md, R = (p = d.border) == null ? void 0 : p.dark.size, O = d.colorSchemes.dark.textColor, A = At(i), T = Co({
|
|
2418
|
+
spacingScale: b,
|
|
2419
|
+
brandingColors: f,
|
|
2420
|
+
secondaryColor: x,
|
|
2421
|
+
fontFamilyPrimary: v,
|
|
2422
|
+
fontFamilySecondary: g,
|
|
2423
|
+
mdBorderRadius: y,
|
|
2424
|
+
borderSize: R,
|
|
2425
|
+
backgroundImage: A,
|
|
2426
|
+
darkTextColor: O,
|
|
2427
|
+
imageBackgroundGradient: c
|
|
2428
|
+
});
|
|
2429
|
+
return /* @__PURE__ */ n.jsxs(m, { sx: T.mainContainer, children: [
|
|
2430
|
+
/* @__PURE__ */ n.jsx(m, { children: /* @__PURE__ */ n.jsx(m, { sx: T.headlineSection, children: /* @__PURE__ */ n.jsx(m, { sx: T.headlineContent, children: /* @__PURE__ */ n.jsxs(m, { sx: T.headlineContentInner, children: [
|
|
2431
|
+
/* @__PURE__ */ n.jsxs(
|
|
2432
|
+
m,
|
|
2433
|
+
{
|
|
2434
|
+
sx: {
|
|
2435
|
+
display: "flex",
|
|
2436
|
+
alignItems: "center",
|
|
2437
|
+
gap: b["3xs"]
|
|
2438
|
+
},
|
|
2439
|
+
children: [
|
|
2440
|
+
/* @__PURE__ */ n.jsx(w, { level: "body-sm", sx: T.headlineText, children: t }),
|
|
2441
|
+
/* @__PURE__ */ n.jsx(
|
|
2442
|
+
B,
|
|
2443
|
+
{
|
|
2444
|
+
rulesDisplay: a,
|
|
2445
|
+
isOverlayVariant: !0,
|
|
2446
|
+
rules: e.rules || ""
|
|
2447
|
+
}
|
|
2448
|
+
)
|
|
2449
|
+
]
|
|
2450
|
+
}
|
|
2451
|
+
),
|
|
2452
|
+
/* @__PURE__ */ n.jsxs(m, { sx: T.contentContainer, children: [
|
|
2453
|
+
/* @__PURE__ */ n.jsx(w, { level: "h4", sx: T.titleText, children: e.title }),
|
|
2454
|
+
e.description && /* @__PURE__ */ n.jsx(w, { level: "body-lg", sx: T.descriptionText, children: W(e.description) })
|
|
2455
|
+
] })
|
|
2456
|
+
] }) }) }) }),
|
|
2457
|
+
/* @__PURE__ */ n.jsx(m, { sx: T.mainContentSection, children: o })
|
|
2458
|
+
] });
|
|
2459
|
+
}, _o = (e) => {
|
|
2460
|
+
var t, i, o;
|
|
2461
|
+
return {
|
|
2462
|
+
// Wrapper container for the entire split layout
|
|
2463
|
+
wrapper: {
|
|
2464
|
+
display: "flex",
|
|
2465
|
+
flexDirection: e.isMobile || e.isLarge && !e.alwaysShowImage || e.alwaysShowImage && e.isLarge ? "column" : "row",
|
|
2466
|
+
width: "100%"
|
|
2467
|
+
},
|
|
2468
|
+
// Desktop image section with background image and overlay
|
|
2469
|
+
desktopImageSection: {
|
|
2470
|
+
display: e.isLarge && !e.alwaysShowImage ? "none" : "flex",
|
|
2471
|
+
flexDirection: "column",
|
|
2472
|
+
justifyContent: "space-between",
|
|
2473
|
+
gap: "10px",
|
|
2474
|
+
flex: e.isMobile || e.isLarge && e.alwaysShowImage ? "1" : "0 0 50%",
|
|
2475
|
+
width: e.isMobile || e.isLarge && e.alwaysShowImage ? "100%" : "50%",
|
|
2476
|
+
minWidth: e.isMobile || e.isLarge && e.alwaysShowImage ? "100%" : "50%",
|
|
2477
|
+
maxWidth: e.isMobile || e.isLarge && e.alwaysShowImage ? "100%" : "50%",
|
|
2478
|
+
backgroundImage: `url(${e.finalImage})`,
|
|
2479
|
+
backgroundSize: "cover",
|
|
2480
|
+
backgroundPosition: "center",
|
|
2481
|
+
borderTopLeftRadius: e.isTabulated ? 0 : e.borderRadius.md,
|
|
2482
|
+
borderTopRightRadius: e.isMobile || e.isLarge && e.alwaysShowImage ? e.isTabulated ? 0 : e.borderRadius.md : 0,
|
|
2483
|
+
borderBottomLeftRadius: e.isMobile || e.isLarge && e.alwaysShowImage ? 0 : e.borderRadius.md,
|
|
2484
|
+
overflow: "hidden",
|
|
2485
|
+
height: "auto",
|
|
2486
|
+
position: "relative",
|
|
2487
|
+
minHeight: e.isMobile || e.isLarge && e.alwaysShowImage ? "210px" : "430px",
|
|
2488
|
+
maxHeight: e.isMobile || e.isLarge && e.alwaysShowImage ? "auto" : "100%",
|
|
2489
|
+
"&::before": {
|
|
2490
|
+
content: '""',
|
|
2491
|
+
position: "absolute",
|
|
2492
|
+
width: "100%",
|
|
2493
|
+
height: "100%",
|
|
2494
|
+
background: e.imageBackgroundGradient,
|
|
2495
|
+
borderTopLeftRadius: "5px",
|
|
2496
|
+
borderTopRightRadius: "5px"
|
|
2497
|
+
}
|
|
2498
|
+
},
|
|
2499
|
+
// Image section content wrapper
|
|
2500
|
+
imageSectionContent: {
|
|
2501
|
+
zIndex: 1,
|
|
2502
|
+
height: "100%",
|
|
2503
|
+
p: e.spacingScale.xl,
|
|
2504
|
+
display: "flex",
|
|
2505
|
+
flexDirection: "column",
|
|
2506
|
+
justifyContent: "space-between",
|
|
2507
|
+
gap: e.spacingScale.xl
|
|
2508
|
+
},
|
|
2509
|
+
// Headline text
|
|
2510
|
+
headlineText: {
|
|
2511
|
+
fontWeight: 500,
|
|
2512
|
+
lineHeight: "166%",
|
|
2513
|
+
letterSpacing: "1px",
|
|
2514
|
+
fontSize: "0.75em",
|
|
2515
|
+
color: ((t = e.brandingColors) == null ? void 0 : t.secondaryColor) || e.darkTextColor,
|
|
2516
|
+
opacity: "70%",
|
|
2517
|
+
textTransform: "uppercase",
|
|
2518
|
+
fontFamily: e.fontFamilySecondary,
|
|
2519
|
+
textAlign: e.isLarge ? "center" : "left"
|
|
2520
|
+
},
|
|
2521
|
+
// Content container (title + description)
|
|
2522
|
+
contentContainer: {
|
|
2523
|
+
display: "flex",
|
|
2524
|
+
flexDirection: "column",
|
|
2525
|
+
gap: e.spacingScale["3xs"]
|
|
2526
|
+
},
|
|
2527
|
+
// Title text
|
|
2528
|
+
titleText: {
|
|
2529
|
+
fontWeight: 700,
|
|
2530
|
+
lineHeight: "133%",
|
|
2531
|
+
fontSize: "1.5em",
|
|
2532
|
+
letterSpacing: "0.15px",
|
|
2533
|
+
color: ((i = e.brandingColors) == null ? void 0 : i.contentColor) || e.darkTextColor,
|
|
2534
|
+
fontFamily: e.fontFamilyPrimary,
|
|
2535
|
+
textAlign: e.isLarge ? "center" : "left"
|
|
2536
|
+
},
|
|
2537
|
+
// Description text
|
|
2538
|
+
descriptionText: {
|
|
2539
|
+
fontWeight: 500,
|
|
2540
|
+
lineHeight: "140%",
|
|
2541
|
+
fontSize: "1.25em",
|
|
2542
|
+
letterSpacing: "0.15px",
|
|
2543
|
+
color: ((o = e.brandingColors) == null ? void 0 : o.secondaryColor) || e.darkTextColor,
|
|
2544
|
+
opacity: "70%",
|
|
2545
|
+
fontFamily: e.fontFamilyPrimary,
|
|
2546
|
+
textAlign: e.isLarge ? "center" : "left"
|
|
2547
|
+
},
|
|
2548
|
+
// Presented by desktop container
|
|
2549
|
+
presentedByDesktop: {
|
|
2550
|
+
display: "block"
|
|
2551
|
+
},
|
|
2552
|
+
// Question/Content area (right side on desktop, below image on mobile)
|
|
2553
|
+
questionArea: {
|
|
2554
|
+
flex: e.isMobile || e.isLarge && !e.alwaysShowImage || e.alwaysShowImage && e.isLarge ? "1" : "0 0 50%",
|
|
2555
|
+
width: e.isMobile || e.isLarge && !e.alwaysShowImage || e.alwaysShowImage && e.isLarge ? "100%" : "50%",
|
|
2556
|
+
minWidth: e.isMobile || e.isLarge && !e.alwaysShowImage || e.alwaysShowImage && e.isLarge ? "100%" : "50%",
|
|
2557
|
+
maxWidth: e.isMobile || e.isLarge && !e.alwaysShowImage || e.alwaysShowImage && e.isLarge ? "100%" : "50%",
|
|
2558
|
+
display: "flex",
|
|
2559
|
+
flexDirection: "column"
|
|
2560
|
+
}
|
|
2561
|
+
};
|
|
2562
|
+
}, Dn = ({
|
|
2563
|
+
entity: e,
|
|
2564
|
+
headline: t,
|
|
2565
|
+
finalImage: i,
|
|
2566
|
+
brandingContent: o,
|
|
2567
|
+
children: a,
|
|
2568
|
+
isTabulated: s = !1,
|
|
2569
|
+
alwaysShowImage: p = !1,
|
|
2570
|
+
rulesDisplay: d
|
|
2571
|
+
}) => {
|
|
2572
|
+
var b;
|
|
2573
|
+
const c = de(), f = Lt(), x = ce(), v = ie(), g = Y().primary, y = Y().secondary, R = re(), O = ue(
|
|
2574
|
+
Q.SPLIT
|
|
2575
|
+
), A = ((b = e.branding) == null ? void 0 : b.colors) || null, T = _o({
|
|
2576
|
+
finalImage: i,
|
|
2577
|
+
spacingScale: v,
|
|
2578
|
+
borderRadius: R,
|
|
2579
|
+
fontFamilyPrimary: g,
|
|
2580
|
+
fontFamilySecondary: y,
|
|
2581
|
+
brandingColors: A,
|
|
2582
|
+
darkTextColor: x.colorSchemes.dark.textColor,
|
|
2583
|
+
imageBackgroundGradient: O,
|
|
2584
|
+
isMobile: c,
|
|
2585
|
+
isLarge: f,
|
|
2586
|
+
isTabulated: s,
|
|
2587
|
+
alwaysShowImage: p
|
|
2588
|
+
});
|
|
2589
|
+
return /* @__PURE__ */ n.jsxs(m, { sx: T.wrapper, children: [
|
|
2590
|
+
/* @__PURE__ */ n.jsx(m, { sx: T.desktopImageSection, children: /* @__PURE__ */ n.jsxs(m, { sx: T.imageSectionContent, children: [
|
|
2591
|
+
/* @__PURE__ */ n.jsxs(m, { children: [
|
|
2592
|
+
/* @__PURE__ */ n.jsxs(
|
|
2593
|
+
m,
|
|
2594
|
+
{
|
|
2595
|
+
sx: {
|
|
2596
|
+
display: "flex",
|
|
2597
|
+
alignItems: "center",
|
|
2598
|
+
gap: v["3xs"]
|
|
2599
|
+
},
|
|
2600
|
+
children: [
|
|
2601
|
+
/* @__PURE__ */ n.jsx(w, { level: "body-sm", sx: T.headlineText, children: t }),
|
|
2602
|
+
/* @__PURE__ */ n.jsx(B, { rulesDisplay: d, rules: e.rules || "" })
|
|
2603
|
+
]
|
|
2604
|
+
}
|
|
2605
|
+
),
|
|
2606
|
+
/* @__PURE__ */ n.jsxs(m, { sx: T.contentContainer, children: [
|
|
2607
|
+
/* @__PURE__ */ n.jsx(w, { level: "body-lg", sx: T.titleText, children: e.title }),
|
|
2608
|
+
/* @__PURE__ */ n.jsx(w, { level: "body-md", sx: T.descriptionText, children: W(e.description) })
|
|
2609
|
+
] })
|
|
2610
|
+
] }),
|
|
2611
|
+
/* @__PURE__ */ n.jsx(m, { sx: T.presentedByDesktop, children: o })
|
|
2612
|
+
] }) }),
|
|
2613
|
+
/* @__PURE__ */ n.jsx(m, { sx: T.questionArea, children: a })
|
|
2614
|
+
] });
|
|
2615
|
+
}, So = (e) => {
|
|
2616
|
+
var t, i, o;
|
|
2617
|
+
return {
|
|
2618
|
+
// Mobile headline with image background
|
|
2619
|
+
mobileHeadlineWithImage: {
|
|
2620
|
+
display: e.isMobile ? "flex" : "none",
|
|
2621
|
+
flexDirection: "column",
|
|
2622
|
+
justifyContent: "space-between",
|
|
2623
|
+
gap: "10px",
|
|
2624
|
+
backgroundImage: `url(${e.finalImage})`,
|
|
2625
|
+
backgroundSize: "cover",
|
|
2626
|
+
backgroundPosition: "center",
|
|
2627
|
+
borderTopLeftRadius: "5px",
|
|
2628
|
+
borderTopRightRadius: "5px",
|
|
2629
|
+
position: "relative",
|
|
2630
|
+
minHeight: "210px",
|
|
2631
|
+
overflow: "hidden",
|
|
2632
|
+
height: "auto",
|
|
2633
|
+
"&::before": {
|
|
2634
|
+
content: '""',
|
|
2635
|
+
position: "absolute",
|
|
2636
|
+
width: "100%",
|
|
2637
|
+
height: "100%",
|
|
2638
|
+
background: e.imageBackgroundGradient,
|
|
2639
|
+
borderTopLeftRadius: "5px",
|
|
2640
|
+
borderTopRightRadius: "5px"
|
|
2641
|
+
}
|
|
2642
|
+
},
|
|
2643
|
+
// Content inside mobile headline with image
|
|
2644
|
+
mobileHeadlineContent: {
|
|
2645
|
+
zIndex: 1,
|
|
2646
|
+
height: "100%",
|
|
2647
|
+
p: e.spacingScale.xl,
|
|
2648
|
+
gap: e.spacingScale["2xl"],
|
|
2649
|
+
display: "flex",
|
|
2650
|
+
flexDirection: "column",
|
|
2651
|
+
justifyContent: "space-between"
|
|
2652
|
+
},
|
|
2653
|
+
// Mobile headline without image
|
|
2654
|
+
mobileHeadlineWithoutImage: {
|
|
2655
|
+
display: e.isMobile ? "flex" : "none",
|
|
2656
|
+
flex: "0.5",
|
|
2657
|
+
flexDirection: "column",
|
|
2658
|
+
justifyContent: "space-between",
|
|
2659
|
+
p: e.spacingScale.lg,
|
|
2660
|
+
gap: e.spacingScale["2xl"]
|
|
2661
|
+
},
|
|
2662
|
+
// Headline typography (mobile with image)
|
|
2663
|
+
headlineTypographyMobileImage: {
|
|
2664
|
+
fontWeight: 500,
|
|
2665
|
+
lineHeight: "166%",
|
|
2666
|
+
letterSpacing: "1px",
|
|
2667
|
+
fontSize: "0.75em",
|
|
2668
|
+
color: ((t = e.brandingColors) == null ? void 0 : t.secondaryColor) || e.darkTextColor,
|
|
2669
|
+
opacity: "70%",
|
|
2670
|
+
textTransform: "uppercase",
|
|
2671
|
+
fontFamily: e.fontFamilySecondary,
|
|
2672
|
+
textAlign: "center"
|
|
2673
|
+
},
|
|
2674
|
+
// Headline typography (mobile without image & desktop)
|
|
2675
|
+
headlineTypography: {
|
|
2676
|
+
fontWeight: 500,
|
|
2677
|
+
lineHeight: "166%",
|
|
2678
|
+
letterSpacing: "1px",
|
|
2679
|
+
textTransform: "uppercase",
|
|
2680
|
+
fontSize: "0.75em",
|
|
2681
|
+
color: e.secondaryColor,
|
|
2682
|
+
opacity: e.opacity,
|
|
2683
|
+
fontFamily: e.fontFamilySecondary,
|
|
2684
|
+
textAlign: "center"
|
|
2685
|
+
},
|
|
2686
|
+
// Title typography (mobile with image)
|
|
2687
|
+
titleTypographyMobileImage: {
|
|
2688
|
+
fontWeight: 700,
|
|
2689
|
+
lineHeight: "133%",
|
|
2690
|
+
fontSize: "1.5em",
|
|
2691
|
+
letterSpacing: "0.15px",
|
|
2692
|
+
color: ((i = e.brandingColors) == null ? void 0 : i.contentColor) || e.darkTextColor,
|
|
2693
|
+
fontFamily: e.fontFamilyPrimary,
|
|
2694
|
+
textAlign: "center"
|
|
2695
|
+
},
|
|
2696
|
+
// Title typography (mobile without image & desktop)
|
|
2697
|
+
titleTypography: {
|
|
2698
|
+
fontWeight: 700,
|
|
2699
|
+
lineHeight: "133%",
|
|
2700
|
+
letterSpacing: "0px",
|
|
2701
|
+
fontSize: "1.5em",
|
|
2702
|
+
color: e.textColor,
|
|
2703
|
+
fontFamily: e.fontFamilyPrimary,
|
|
2704
|
+
textAlign: e.isMobile ? "center" : "left"
|
|
2705
|
+
},
|
|
2706
|
+
// Description typography (mobile with image)
|
|
2707
|
+
descriptionTypographyMobileImage: {
|
|
2708
|
+
fontWeight: 400,
|
|
2709
|
+
lineHeight: "140%",
|
|
2710
|
+
fontSize: "1.25em",
|
|
2711
|
+
letterSpacing: "0.15px",
|
|
2712
|
+
color: ((o = e.brandingColors) == null ? void 0 : o.secondaryColor) || e.darkTextColor,
|
|
2713
|
+
opacity: "70%",
|
|
2714
|
+
fontFamily: e.fontFamilyPrimary,
|
|
2715
|
+
textAlign: "center"
|
|
2716
|
+
},
|
|
2717
|
+
// Description typography (mobile without image & desktop)
|
|
2718
|
+
descriptionTypography: {
|
|
2719
|
+
fontWeight: 400,
|
|
2720
|
+
lineHeight: "140%",
|
|
2721
|
+
letterSpacing: "0.15px",
|
|
2722
|
+
fontSize: "1.25em",
|
|
2723
|
+
color: e.secondaryColor,
|
|
2724
|
+
opacity: e.opacity,
|
|
2725
|
+
fontFamily: e.fontFamilyPrimary,
|
|
2726
|
+
textAlign: e.isMobile ? "center" : "left"
|
|
2727
|
+
},
|
|
2728
|
+
// Desktop title typography (centered)
|
|
2729
|
+
titleTypographyDesktop: {
|
|
2730
|
+
fontWeight: 700,
|
|
2731
|
+
lineHeight: "133%",
|
|
2732
|
+
letterSpacing: "0px",
|
|
2733
|
+
fontSize: "1.5em",
|
|
2734
|
+
color: e.textColor,
|
|
2735
|
+
fontFamily: e.fontFamilyPrimary
|
|
2736
|
+
},
|
|
2737
|
+
// Desktop description typography (centered)
|
|
2738
|
+
descriptionTypographyDesktop: {
|
|
2739
|
+
fontWeight: 400,
|
|
2740
|
+
lineHeight: "140%",
|
|
2741
|
+
letterSpacing: "0.15px",
|
|
2742
|
+
fontSize: "1.25em",
|
|
2743
|
+
color: e.secondaryColor,
|
|
2744
|
+
opacity: e.opacity,
|
|
2745
|
+
fontFamily: e.fontFamilyPrimary
|
|
2746
|
+
},
|
|
2747
|
+
// Image container (left position)
|
|
2748
|
+
imageContainerLeft: {
|
|
2749
|
+
display: e.isMobile ? "none" : "block",
|
|
2750
|
+
flex: "0.3",
|
|
2751
|
+
borderTopLeftRadius: e.borderRadius.md,
|
|
2752
|
+
borderBottomLeftRadius: e.borderRadius.md,
|
|
2753
|
+
overflow: "hidden",
|
|
2754
|
+
height: "auto",
|
|
2755
|
+
position: "relative"
|
|
2756
|
+
},
|
|
2757
|
+
// Image container (right position)
|
|
2758
|
+
imageContainerRight: {
|
|
2759
|
+
display: e.isMobile ? "none" : "block",
|
|
2760
|
+
flex: "0.3",
|
|
2761
|
+
borderTopRightRadius: "5px",
|
|
2762
|
+
borderBottomRightRadius: "5px",
|
|
2763
|
+
overflow: "hidden",
|
|
2764
|
+
height: "auto",
|
|
2765
|
+
position: "relative"
|
|
2766
|
+
},
|
|
2767
|
+
// Main content area
|
|
2768
|
+
mainContentArea: {
|
|
2769
|
+
flex: e.isMobile ? "1" : e.finalImage ? "0.7" : "1",
|
|
2770
|
+
// display: props.isMobile ? "block" : "flex",
|
|
2771
|
+
display: "flex",
|
|
2772
|
+
flexDirection: "column",
|
|
2773
|
+
p: e.spacingScale.md,
|
|
2774
|
+
gap: e.isMobile ? e.spacingScale.md : e.spacingScale.lg
|
|
2775
|
+
},
|
|
2776
|
+
// Desktop headline container
|
|
2777
|
+
desktopHeadlineContainer: {
|
|
2778
|
+
display: e.isMobile ? "none" : "flex",
|
|
2779
|
+
flexDirection: "column",
|
|
2780
|
+
justifyContent: "space-between",
|
|
2781
|
+
gap: e.spacingScale["2xl"],
|
|
2782
|
+
textAlign: "center"
|
|
2783
|
+
},
|
|
2784
|
+
// Content container
|
|
2785
|
+
contentContainer: {
|
|
2786
|
+
display: "flex",
|
|
2787
|
+
flexDirection: "column",
|
|
2788
|
+
gap: e.spacingScale["3xs"]
|
|
2789
|
+
},
|
|
2790
|
+
// Question area
|
|
2791
|
+
questionArea: {
|
|
2792
|
+
display: "flex",
|
|
2793
|
+
flexDirection: "column",
|
|
2794
|
+
px: e.spacingScale.md
|
|
2795
|
+
},
|
|
2796
|
+
// Question container
|
|
2797
|
+
questionContainer: {
|
|
2798
|
+
display: "flex",
|
|
2799
|
+
flexDirection: "column",
|
|
2800
|
+
gap: e.isMobile ? e.spacingScale.md : e.spacingScale.lg
|
|
2801
|
+
},
|
|
2802
|
+
// Alert container
|
|
2803
|
+
alertContainer: {
|
|
2804
|
+
// py: props.spacingScale.md,
|
|
2805
|
+
display: "flex",
|
|
2806
|
+
flexDirection: "column",
|
|
2807
|
+
backdropFilter: "blur(4px)"
|
|
2808
|
+
},
|
|
2809
|
+
image: {
|
|
2810
|
+
width: "100%",
|
|
2811
|
+
height: "100%",
|
|
2812
|
+
objectFit: "cover"
|
|
2813
|
+
},
|
|
2814
|
+
// CTA container
|
|
2815
|
+
ctaContainer: {
|
|
2816
|
+
display: "flex",
|
|
2817
|
+
flexDirection: "column",
|
|
2818
|
+
alignItems: "center"
|
|
2819
|
+
},
|
|
2820
|
+
// CTA content wrapper
|
|
2821
|
+
ctaContentWrapper: {
|
|
2822
|
+
display: "flex",
|
|
2823
|
+
flexDirection: "column",
|
|
2824
|
+
justifyContent: "center",
|
|
2825
|
+
alignItems: "center",
|
|
2826
|
+
gap: e.spacingScale.lg
|
|
2827
|
+
},
|
|
2828
|
+
// Buttons container
|
|
2829
|
+
buttonsContainer: {
|
|
2830
|
+
display: "flex",
|
|
2831
|
+
flexDirection: e.isMobile ? "column" : "row",
|
|
2832
|
+
gap: e.spacingScale.md
|
|
2833
|
+
},
|
|
2834
|
+
// Try again button
|
|
2835
|
+
tryAgainButton: {
|
|
2836
|
+
display: "flex",
|
|
2837
|
+
py: e.spacingScale.xs,
|
|
2838
|
+
px: "16px",
|
|
2839
|
+
flexDirection: "column",
|
|
2840
|
+
justifyContent: "center",
|
|
2841
|
+
alignItems: "center",
|
|
2842
|
+
gap: "8px",
|
|
2843
|
+
borderRadius: e.borderRadius.xl,
|
|
2844
|
+
border: e.borderSize + " solid " + e.primaryColor,
|
|
2845
|
+
bgcolor: e.buttonBgColor,
|
|
2846
|
+
"&:hover": {
|
|
2847
|
+
bgcolor: e.onSurfaceColor,
|
|
2848
|
+
borderColor: e.primaryColor
|
|
2849
|
+
},
|
|
2850
|
+
fontSize: "0.8125em"
|
|
2851
|
+
},
|
|
2852
|
+
// Try again button content
|
|
2853
|
+
tryAgainButtonContent: {
|
|
2854
|
+
display: "flex",
|
|
2855
|
+
justifyContent: "center",
|
|
2856
|
+
alignItems: "center",
|
|
2857
|
+
gap: "8px",
|
|
2858
|
+
alignSelf: "stretch"
|
|
2859
|
+
},
|
|
2860
|
+
// Try again icon
|
|
2861
|
+
tryAgainIcon: {
|
|
2862
|
+
display: "flex",
|
|
2863
|
+
width: "16px",
|
|
2864
|
+
height: "16px",
|
|
2865
|
+
justifyContent: "flex-end",
|
|
2866
|
+
alignItems: "center",
|
|
2867
|
+
color: e.textPrimary
|
|
2868
|
+
},
|
|
2869
|
+
// Try again text
|
|
2870
|
+
tryAgainText: {
|
|
2871
|
+
color: e.textPrimary,
|
|
2872
|
+
textAlign: "center",
|
|
2873
|
+
fontFamily: e.fontFamilyPrimary,
|
|
2874
|
+
fontSize: "0.8125em",
|
|
2875
|
+
fontStyle: "normal",
|
|
2876
|
+
fontWeight: 500,
|
|
2877
|
+
lineHeight: "22px",
|
|
2878
|
+
letterSpacing: "0.46px",
|
|
2879
|
+
textTransform: "uppercase"
|
|
2880
|
+
},
|
|
2881
|
+
// Presented by container
|
|
2882
|
+
presentedByContainer: {
|
|
2883
|
+
px: e.spacingScale.md
|
|
2884
|
+
}
|
|
2885
|
+
};
|
|
2886
|
+
}, at = ot(/* @__PURE__ */ n.jsx("path", {
|
|
2887
|
+
d: "M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"
|
|
2888
|
+
}), "Replay"), An = (e) => {
|
|
2889
|
+
var t;
|
|
2890
|
+
const i = ((t = e.entity.branding) == null ? void 0 : t.colors) || null, o = ce(), a = de(), s = tt(
|
|
2891
|
+
{
|
|
2892
|
+
images: e.entity.images || null,
|
|
2893
|
+
imagePlaceholder: e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : ""
|
|
2894
|
+
},
|
|
2895
|
+
Q.STANDARD
|
|
2896
|
+
), p = ie(), d = Y().primary, b = Y().secondary, c = re(), f = (i == null ? void 0 : i.contentColor) || H().textColor, x = H().textPrimary, v = (i == null ? void 0 : i.primaryColor) || H().palette.primary.plainColor, g = (i == null ? void 0 : i.secondaryColor) || H().textColor, y = ni().size, R = H().surface, O = H().onSurface, A = ue(
|
|
2897
|
+
Q.STANDARD
|
|
2898
|
+
), { t: T } = _e(), S = e.imagePosition || "left", I = "60%", L = e.isApiError ? T("common.error.title") : T("common.authentication.accessRequired"), l = e.isApiError ? e.apiErrorMessage || T("common.error.message") : T("common.authentication.invalidOrMissingAuth"), h = So({
|
|
2899
|
+
finalImage: s,
|
|
2900
|
+
spacingScale: p,
|
|
2901
|
+
borderRadius: c,
|
|
2902
|
+
fontFamilyPrimary: d,
|
|
2903
|
+
fontFamilySecondary: b,
|
|
2904
|
+
textColor: f,
|
|
2905
|
+
secondaryColor: g,
|
|
2906
|
+
brandingColors: i,
|
|
2907
|
+
darkTextColor: o.colorSchemes.dark.textColor,
|
|
2908
|
+
opacity: I,
|
|
2909
|
+
imageBackgroundGradient: A,
|
|
2910
|
+
textPrimary: x,
|
|
2911
|
+
primaryColor: v,
|
|
2912
|
+
borderSize: y,
|
|
2913
|
+
buttonBgColor: R,
|
|
2914
|
+
onSurfaceColor: O,
|
|
2915
|
+
isMobile: a
|
|
2916
|
+
}), u = () => e.isApiError ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2917
|
+
/* @__PURE__ */ n.jsx(m, { sx: h.ctaContainer, children: /* @__PURE__ */ n.jsx(m, { sx: h.ctaContentWrapper, children: /* @__PURE__ */ n.jsx(m, { sx: h.buttonsContainer, children: /* @__PURE__ */ n.jsx(pe, { sx: h.tryAgainButton, onClick: e.toggleTryAgain, children: /* @__PURE__ */ n.jsxs(m, { sx: h.tryAgainButtonContent, children: [
|
|
2918
|
+
/* @__PURE__ */ n.jsx(at, { sx: h.tryAgainIcon }),
|
|
2919
|
+
/* @__PURE__ */ n.jsx(w, { sx: h.tryAgainText, children: e.tryAgainButtonText })
|
|
2920
|
+
] }) }) }) }) }),
|
|
2921
|
+
/* @__PURE__ */ n.jsx(m, { sx: h.presentedByContainer, children: e.renderPresentedBy(f) })
|
|
2922
|
+
] }) : /* @__PURE__ */ n.jsx(n.Fragment, {});
|
|
2923
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2924
|
+
s ? /* @__PURE__ */ n.jsx(m, { sx: h.mobileHeadlineWithImage, children: /* @__PURE__ */ n.jsx(m, { sx: h.mobileHeadlineContent, children: /* @__PURE__ */ n.jsxs(m, { children: [
|
|
2925
|
+
/* @__PURE__ */ n.jsxs(m, { sx: { display: "flex", alignItems: "center", gap: p["3xs"] }, children: [
|
|
2926
|
+
/* @__PURE__ */ n.jsx(
|
|
2927
|
+
w,
|
|
2928
|
+
{
|
|
2929
|
+
level: "body-sm",
|
|
2930
|
+
sx: h.headlineTypographyMobileImage,
|
|
2931
|
+
children: e.headline
|
|
2932
|
+
}
|
|
2933
|
+
),
|
|
2934
|
+
/* @__PURE__ */ n.jsx(
|
|
2935
|
+
B,
|
|
2936
|
+
{
|
|
2937
|
+
rulesDisplay: e.rulesDisplay,
|
|
2938
|
+
rules: e.entity.rules || ""
|
|
2939
|
+
}
|
|
2940
|
+
)
|
|
2941
|
+
] }),
|
|
2942
|
+
/* @__PURE__ */ n.jsxs(m, { sx: h.contentContainer, children: [
|
|
2943
|
+
/* @__PURE__ */ n.jsx(
|
|
2944
|
+
w,
|
|
2945
|
+
{
|
|
2946
|
+
level: "body-lg",
|
|
2947
|
+
sx: h.titleTypographyMobileImage,
|
|
2948
|
+
children: e.entity.title
|
|
2949
|
+
}
|
|
2950
|
+
),
|
|
2951
|
+
/* @__PURE__ */ n.jsx(
|
|
2952
|
+
w,
|
|
2953
|
+
{
|
|
2954
|
+
level: "body-md",
|
|
2955
|
+
sx: h.descriptionTypographyMobileImage,
|
|
2956
|
+
children: W(e.entity.description)
|
|
2957
|
+
}
|
|
2958
|
+
)
|
|
2959
|
+
] })
|
|
2960
|
+
] }) }) }) : /* @__PURE__ */ n.jsx(m, { sx: h.mobileHeadlineWithoutImage, children: /* @__PURE__ */ n.jsxs(m, { children: [
|
|
2961
|
+
/* @__PURE__ */ n.jsxs(m, { sx: { display: "flex", alignItems: "center", gap: p["3xs"] }, children: [
|
|
2962
|
+
/* @__PURE__ */ n.jsx(w, { level: "body-sm", sx: h.headlineTypography, children: e.headline }),
|
|
2963
|
+
/* @__PURE__ */ n.jsx(
|
|
2964
|
+
B,
|
|
2965
|
+
{
|
|
2966
|
+
rulesDisplay: e.rulesDisplay,
|
|
2967
|
+
rules: e.entity.rules || ""
|
|
2968
|
+
}
|
|
2969
|
+
)
|
|
2970
|
+
] }),
|
|
2971
|
+
/* @__PURE__ */ n.jsxs(m, { sx: h.contentContainer, children: [
|
|
2972
|
+
/* @__PURE__ */ n.jsx(w, { level: "h4", sx: h.titleTypography, children: e.entity.title }),
|
|
2973
|
+
/* @__PURE__ */ n.jsx(w, { level: "body-md", sx: h.descriptionTypography, children: W(e.entity.description) })
|
|
2974
|
+
] })
|
|
2975
|
+
] }) }),
|
|
2976
|
+
s && S === "left" && /* @__PURE__ */ n.jsx(m, { sx: h.imageContainerLeft, children: /* @__PURE__ */ n.jsx(
|
|
2977
|
+
"img",
|
|
2978
|
+
{
|
|
2979
|
+
src: s,
|
|
2980
|
+
alt: "illustration",
|
|
2981
|
+
style: h.image
|
|
2982
|
+
}
|
|
2983
|
+
) }),
|
|
2984
|
+
/* @__PURE__ */ n.jsxs(m, { sx: h.mainContentArea, children: [
|
|
2985
|
+
/* @__PURE__ */ n.jsx(m, { sx: { px: p.md }, children: /* @__PURE__ */ n.jsx(m, { sx: h.desktopHeadlineContainer, children: /* @__PURE__ */ n.jsxs(
|
|
2986
|
+
m,
|
|
2987
|
+
{
|
|
2988
|
+
sx: {
|
|
2989
|
+
display: "flex",
|
|
2990
|
+
flexDirection: "column",
|
|
2991
|
+
alignItems: "center"
|
|
2992
|
+
},
|
|
2993
|
+
children: [
|
|
2994
|
+
/* @__PURE__ */ n.jsxs(m, { sx: { display: "flex", alignItems: "center", gap: p["3xs"] }, children: [
|
|
2995
|
+
/* @__PURE__ */ n.jsx(w, { level: "body-sm", sx: h.headlineTypography, children: e.headline }),
|
|
2996
|
+
/* @__PURE__ */ n.jsx(
|
|
2997
|
+
B,
|
|
2998
|
+
{
|
|
2999
|
+
rulesDisplay: e.rulesDisplay,
|
|
3000
|
+
rules: e.entity.rules || ""
|
|
3001
|
+
}
|
|
3002
|
+
)
|
|
3003
|
+
] }),
|
|
3004
|
+
/* @__PURE__ */ n.jsxs(m, { sx: h.contentContainer, children: [
|
|
3005
|
+
/* @__PURE__ */ n.jsx(w, { level: "h4", sx: h.titleTypographyDesktop, children: e.entity.title }),
|
|
3006
|
+
/* @__PURE__ */ n.jsx(
|
|
3007
|
+
w,
|
|
3008
|
+
{
|
|
3009
|
+
level: "body-md",
|
|
3010
|
+
sx: h.descriptionTypographyDesktop,
|
|
3011
|
+
children: W(e.entity.description)
|
|
3012
|
+
}
|
|
3013
|
+
)
|
|
3014
|
+
] })
|
|
3015
|
+
]
|
|
3016
|
+
}
|
|
3017
|
+
) }) }),
|
|
3018
|
+
/* @__PURE__ */ n.jsx(m, { sx: h.questionArea, children: /* @__PURE__ */ n.jsxs(m, { sx: h.questionContainer, children: [
|
|
3019
|
+
/* @__PURE__ */ n.jsx(m, { sx: h.alertContainer, children: /* @__PURE__ */ n.jsx(
|
|
3020
|
+
it,
|
|
3021
|
+
{
|
|
3022
|
+
variant: "error",
|
|
3023
|
+
title: L,
|
|
3024
|
+
message: l
|
|
3025
|
+
}
|
|
3026
|
+
) }),
|
|
3027
|
+
e.isApiError ? /* @__PURE__ */ n.jsx(n.Fragment, {}) : e.renderPresentedBy(f)
|
|
3028
|
+
] }) }),
|
|
3029
|
+
u()
|
|
3030
|
+
] }),
|
|
3031
|
+
s && S === "right" && /* @__PURE__ */ n.jsx(m, { sx: h.imageContainerRight, children: /* @__PURE__ */ n.jsx(
|
|
3032
|
+
"img",
|
|
3033
|
+
{
|
|
3034
|
+
src: s,
|
|
3035
|
+
alt: "illustration",
|
|
3036
|
+
style: h.image
|
|
3037
|
+
}
|
|
3038
|
+
) })
|
|
3039
|
+
] });
|
|
3040
|
+
}, Eo = (e) => {
|
|
3041
|
+
var t, i, o;
|
|
3042
|
+
return {
|
|
3043
|
+
// Main headline section with background image
|
|
3044
|
+
headlineSection: {
|
|
3045
|
+
display: "flex",
|
|
3046
|
+
flexDirection: "column",
|
|
3047
|
+
justifyContent: "space-between",
|
|
3048
|
+
gap: "10px",
|
|
3049
|
+
flex: "0.5",
|
|
3050
|
+
backgroundImage: `url(${e.finalImage})`,
|
|
3051
|
+
backgroundSize: "cover",
|
|
3052
|
+
backgroundPosition: "center",
|
|
3053
|
+
borderTopLeftRadius: e.mdBorderRadius,
|
|
3054
|
+
borderTopRightRadius: e.isMobile ? e.mdBorderRadius : 0,
|
|
3055
|
+
borderBottomLeftRadius: e.isMobile ? 0 : e.mdBorderRadius,
|
|
3056
|
+
overflow: "hidden",
|
|
3057
|
+
height: "auto",
|
|
3058
|
+
position: "relative",
|
|
3059
|
+
minHeight: e.isMobile ? "210px" : "430px",
|
|
3060
|
+
"&::before": {
|
|
3061
|
+
content: '""',
|
|
3062
|
+
position: "absolute",
|
|
3063
|
+
width: "100%",
|
|
3064
|
+
height: "100%",
|
|
3065
|
+
background: e.imageBackgroundGradient,
|
|
3066
|
+
borderTopLeftRadius: "5px",
|
|
3067
|
+
borderTopRightRadius: "5px"
|
|
3068
|
+
}
|
|
3069
|
+
},
|
|
3070
|
+
// Headline content wrapper
|
|
3071
|
+
headlineContent: {
|
|
3072
|
+
zIndex: 1,
|
|
3073
|
+
height: "100%",
|
|
3074
|
+
p: e.spacingScale.xl,
|
|
3075
|
+
gap: e.spacingScale.xl,
|
|
3076
|
+
display: "flex",
|
|
3077
|
+
flexDirection: "column",
|
|
3078
|
+
justifyContent: "space-between"
|
|
3079
|
+
},
|
|
3080
|
+
// Headline text
|
|
3081
|
+
headlineText: {
|
|
3082
|
+
fontWeight: 500,
|
|
3083
|
+
lineHeight: "166%",
|
|
3084
|
+
letterSpacing: "1px",
|
|
3085
|
+
fontSize: "0.75em",
|
|
3086
|
+
color: ((t = e.brandingColors) == null ? void 0 : t.secondaryColor) || e.darkTextColor,
|
|
3087
|
+
opacity: "70%",
|
|
3088
|
+
textTransform: "uppercase",
|
|
3089
|
+
fontFamily: e.fontFamilySecondary,
|
|
3090
|
+
textAlign: e.isMobile ? "center" : "left"
|
|
3091
|
+
},
|
|
3092
|
+
// Content container
|
|
3093
|
+
contentContainer: {
|
|
3094
|
+
display: "flex",
|
|
3095
|
+
flexDirection: "column",
|
|
3096
|
+
gap: e.spacingScale["3xs"]
|
|
3097
|
+
},
|
|
3098
|
+
// Title text
|
|
3099
|
+
titleText: {
|
|
3100
|
+
fontWeight: 700,
|
|
3101
|
+
lineHeight: "133%",
|
|
3102
|
+
fontSize: "1.5em",
|
|
3103
|
+
letterSpacing: "0.15px",
|
|
3104
|
+
color: ((i = e.brandingColors) == null ? void 0 : i.contentColor) || e.darkTextColor,
|
|
3105
|
+
fontFamily: e.fontFamilyPrimary,
|
|
3106
|
+
textAlign: e.isMobile ? "center" : "left"
|
|
3107
|
+
},
|
|
3108
|
+
// Description text
|
|
3109
|
+
descriptionText: {
|
|
3110
|
+
fontWeight: 400,
|
|
3111
|
+
lineHeight: "140%",
|
|
3112
|
+
fontSize: "1.25em",
|
|
3113
|
+
letterSpacing: "0.15px",
|
|
3114
|
+
color: ((o = e.brandingColors) == null ? void 0 : o.secondaryColor) || e.darkTextColor,
|
|
3115
|
+
opacity: "70%",
|
|
3116
|
+
fontFamily: e.fontFamilyPrimary,
|
|
3117
|
+
textAlign: e.isMobile ? "center" : "left"
|
|
3118
|
+
},
|
|
3119
|
+
// Presented by desktop container
|
|
3120
|
+
presentedByDesktop: {
|
|
3121
|
+
display: e.isMobile ? "none" : "block"
|
|
3122
|
+
},
|
|
3123
|
+
// Question area (error section)
|
|
3124
|
+
questionArea: {
|
|
3125
|
+
flex: "0.5",
|
|
3126
|
+
display: "flex",
|
|
3127
|
+
flexDirection: "column",
|
|
3128
|
+
justifyContent: "center",
|
|
3129
|
+
gap: e.spacingScale.md,
|
|
3130
|
+
p: e.spacingScale.lg
|
|
3131
|
+
},
|
|
3132
|
+
// Presented by mobile container
|
|
3133
|
+
presentedByMobile: {
|
|
3134
|
+
display: e.isMobile ? "block" : "none"
|
|
3135
|
+
},
|
|
3136
|
+
// CTA container
|
|
3137
|
+
ctaContainer: {
|
|
3138
|
+
display: "flex",
|
|
3139
|
+
flexDirection: "column",
|
|
3140
|
+
alignItems: "center"
|
|
3141
|
+
},
|
|
3142
|
+
// CTA content wrapper
|
|
3143
|
+
ctaContentWrapper: {
|
|
3144
|
+
display: "flex",
|
|
3145
|
+
flexDirection: "column",
|
|
3146
|
+
justifyContent: "center",
|
|
3147
|
+
alignItems: "center",
|
|
3148
|
+
gap: e.spacingScale.lg
|
|
3149
|
+
},
|
|
3150
|
+
// Buttons container
|
|
3151
|
+
buttonsContainer: {
|
|
3152
|
+
display: "flex",
|
|
3153
|
+
flexDirection: "column",
|
|
3154
|
+
gap: "16px"
|
|
3155
|
+
},
|
|
3156
|
+
// Try again button
|
|
3157
|
+
tryAgainButton: {
|
|
3158
|
+
display: "flex",
|
|
3159
|
+
py: e.spacingScale.xs,
|
|
3160
|
+
px: "16px",
|
|
3161
|
+
flexDirection: "column",
|
|
3162
|
+
justifyContent: "center",
|
|
3163
|
+
alignItems: "center",
|
|
3164
|
+
gap: "8px",
|
|
3165
|
+
borderRadius: e.borderRadius.xl,
|
|
3166
|
+
color: e.textPrimary,
|
|
3167
|
+
bgcolor: e.surfaceColor,
|
|
3168
|
+
"&:hover": {
|
|
3169
|
+
bgcolor: e.onSurfaceColor
|
|
3170
|
+
},
|
|
3171
|
+
fontSize: "0.9375em"
|
|
3172
|
+
},
|
|
3173
|
+
// Try again button content
|
|
3174
|
+
tryAgainButtonContent: {
|
|
3175
|
+
display: "flex",
|
|
3176
|
+
justifyContent: "center",
|
|
3177
|
+
alignItems: "center",
|
|
3178
|
+
gap: "8px",
|
|
3179
|
+
alignSelf: "stretch"
|
|
3180
|
+
},
|
|
3181
|
+
// Try again icon
|
|
3182
|
+
tryAgainIcon: {
|
|
3183
|
+
display: "flex",
|
|
3184
|
+
width: "16px",
|
|
3185
|
+
height: "16px",
|
|
3186
|
+
justifyContent: "flex-end",
|
|
3187
|
+
alignItems: "center",
|
|
3188
|
+
color: e.textPrimary
|
|
3189
|
+
},
|
|
3190
|
+
// Try again text
|
|
3191
|
+
tryAgainText: {
|
|
3192
|
+
color: e.textPrimary,
|
|
3193
|
+
textAlign: "center",
|
|
3194
|
+
fontFamily: e.fontFamilyPrimary,
|
|
3195
|
+
fontSize: "0.8125em",
|
|
3196
|
+
fontStyle: "normal",
|
|
3197
|
+
fontWeight: 500,
|
|
3198
|
+
lineHeight: "22px",
|
|
3199
|
+
letterSpacing: "0.46px",
|
|
3200
|
+
textTransform: "uppercase"
|
|
3201
|
+
}
|
|
3202
|
+
};
|
|
3203
|
+
}, wn = (e) => {
|
|
3204
|
+
var t;
|
|
3205
|
+
const i = ce(), o = de(), a = ((t = e.entity.branding) == null ? void 0 : t.colors) || null, s = tt(
|
|
3206
|
+
{
|
|
3207
|
+
images: e.entity.images || null,
|
|
3208
|
+
imagePlaceholder: e.defaultImagePlaceholderUrl || ""
|
|
3209
|
+
},
|
|
3210
|
+
Q.SPLIT
|
|
3211
|
+
), { t: p } = _e(), d = H().textPrimary, b = H().surface, c = H().onSurface, f = (a == null ? void 0 : a.backgroundColor) || H().surfaceVariant, x = re(), v = Y().secondary, g = Y().primary, y = re().md, R = H().textColor, O = ie(), A = ue(
|
|
3212
|
+
Q.SPLIT
|
|
3213
|
+
), T = e.isApiError ? p("common.error.title") : p("common.authentication.accessRequired"), S = e.isApiError ? e.apiErrorMessage || p("common.error.message") : p("common.authentication.invalidOrMissingAuth"), I = Eo({
|
|
3214
|
+
finalImage: s,
|
|
3215
|
+
spacingScale: O,
|
|
3216
|
+
borderRadius: re(),
|
|
3217
|
+
fontFamilyPrimary: g,
|
|
3218
|
+
fontFamilySecondary: v,
|
|
3219
|
+
mdBorderRadius: y,
|
|
3220
|
+
brandingColors: a,
|
|
3221
|
+
darkTextColor: i.colorSchemes.dark.textColor,
|
|
3222
|
+
imageBackgroundGradient: A,
|
|
3223
|
+
textPrimary: d,
|
|
3224
|
+
surfaceColor: b,
|
|
3225
|
+
onSurfaceColor: c,
|
|
3226
|
+
isMobile: o
|
|
3227
|
+
}), L = () => e.isApiError ? /* @__PURE__ */ n.jsx(
|
|
3228
|
+
m,
|
|
3229
|
+
{
|
|
3230
|
+
sx: {
|
|
3231
|
+
p: O.lg,
|
|
3232
|
+
gap: O.lg,
|
|
3233
|
+
display: "flex",
|
|
3234
|
+
flexDirection: "column",
|
|
3235
|
+
backdropFilter: "blur(4px)",
|
|
3236
|
+
bgcolor: `rgba(${f ? nt(f || "").replace(/[^\d,]/g, "") : ""}, 0.5)`,
|
|
3237
|
+
borderRadius: x.sm
|
|
3238
|
+
},
|
|
3239
|
+
children: /* @__PURE__ */ n.jsx(m, { sx: I.ctaContainer, children: /* @__PURE__ */ n.jsx(m, { sx: I.ctaContentWrapper, children: /* @__PURE__ */ n.jsx(m, { sx: I.buttonsContainer, children: /* @__PURE__ */ n.jsx(pe, { sx: I.tryAgainButton, onClick: e.toggleTryAgain, children: /* @__PURE__ */ n.jsxs(m, { sx: I.tryAgainButtonContent, children: [
|
|
3240
|
+
/* @__PURE__ */ n.jsx(at, { sx: I.tryAgainIcon }),
|
|
3241
|
+
/* @__PURE__ */ n.jsx(w, { sx: I.tryAgainText, children: e.tryAgainButtonText })
|
|
3242
|
+
] }) }) }) }) })
|
|
3243
|
+
}
|
|
3244
|
+
) : /* @__PURE__ */ n.jsx(n.Fragment, {});
|
|
3245
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3246
|
+
/* @__PURE__ */ n.jsx(m, { sx: I.headlineSection, children: /* @__PURE__ */ n.jsxs(m, { sx: I.headlineContent, children: [
|
|
3247
|
+
/* @__PURE__ */ n.jsxs(m, { children: [
|
|
3248
|
+
/* @__PURE__ */ n.jsxs(m, { sx: { display: "flex", alignItems: "center", gap: O["3xs"] }, children: [
|
|
3249
|
+
/* @__PURE__ */ n.jsx(w, { level: "body-sm", sx: I.headlineText, children: e.headline }),
|
|
3250
|
+
/* @__PURE__ */ n.jsx(
|
|
3251
|
+
B,
|
|
3252
|
+
{
|
|
3253
|
+
rulesDisplay: e.rulesDisplay,
|
|
3254
|
+
rules: e.entity.rules || ""
|
|
3255
|
+
}
|
|
3256
|
+
)
|
|
3257
|
+
] }),
|
|
3258
|
+
/* @__PURE__ */ n.jsxs(m, { sx: I.contentContainer, children: [
|
|
3259
|
+
/* @__PURE__ */ n.jsx(w, { level: "body-lg", sx: I.titleText, children: e.entity.title }),
|
|
3260
|
+
/* @__PURE__ */ n.jsx(w, { level: "body-md", sx: I.descriptionText, children: W(e.entity.description) })
|
|
3261
|
+
] })
|
|
3262
|
+
] }),
|
|
3263
|
+
/* @__PURE__ */ n.jsx(m, { sx: I.presentedByDesktop, children: e.renderPresentedBy(
|
|
3264
|
+
(a == null ? void 0 : a.contentColor) || i.colorSchemes.dark.textColor
|
|
3265
|
+
) })
|
|
3266
|
+
] }) }),
|
|
3267
|
+
/* @__PURE__ */ n.jsxs(m, { sx: I.questionArea, children: [
|
|
3268
|
+
/* @__PURE__ */ n.jsx(
|
|
3269
|
+
it,
|
|
3270
|
+
{
|
|
3271
|
+
variant: "error",
|
|
3272
|
+
title: T,
|
|
3273
|
+
message: S
|
|
3274
|
+
}
|
|
3275
|
+
),
|
|
3276
|
+
L(),
|
|
3277
|
+
/* @__PURE__ */ n.jsx(m, { sx: I.presentedByMobile, children: e.renderPresentedBy((a == null ? void 0 : a.contentColor) || R) })
|
|
3278
|
+
] })
|
|
3279
|
+
] });
|
|
3280
|
+
}, To = (e) => {
|
|
3281
|
+
var t;
|
|
3282
|
+
return {
|
|
3283
|
+
// Main container with background overlay
|
|
3284
|
+
mainContainer: {
|
|
3285
|
+
display: "flex",
|
|
3286
|
+
flexDirection: "column",
|
|
3287
|
+
justifyContent: "space-between",
|
|
3288
|
+
gap: "40px",
|
|
3289
|
+
p: e.spacingScale.xl,
|
|
3290
|
+
boxShadow: "md",
|
|
3291
|
+
border: (t = e.brandingColors) != null && t.borderColor ? `${e.borderSize} solid ${e.brandingColors.borderColor}` : "none",
|
|
3292
|
+
overflow: "hidden",
|
|
3293
|
+
backgroundImage: e.backgroundImage,
|
|
3294
|
+
backgroundSize: "cover",
|
|
3295
|
+
backgroundPosition: "center",
|
|
3296
|
+
position: "relative",
|
|
3297
|
+
borderRadius: e.borderRadius.md,
|
|
3298
|
+
minHeight: "250px",
|
|
3299
|
+
"&::before": {
|
|
3300
|
+
content: '""',
|
|
3301
|
+
position: "absolute",
|
|
3302
|
+
background: e.imageBackgroundGradient,
|
|
3303
|
+
top: 0,
|
|
3304
|
+
left: 0,
|
|
3305
|
+
right: 0,
|
|
3306
|
+
bottom: 0,
|
|
3307
|
+
borderRadius: "inherit",
|
|
3308
|
+
zIndex: 0
|
|
3309
|
+
}
|
|
3310
|
+
},
|
|
3311
|
+
// Headline section wrapper
|
|
3312
|
+
headlineSection: {
|
|
3313
|
+
display: "flex",
|
|
3314
|
+
justifyContent: "space-between",
|
|
3315
|
+
flex: "1 0 0",
|
|
3316
|
+
alignSelf: "stretch"
|
|
3317
|
+
},
|
|
3318
|
+
// Headline content container
|
|
3319
|
+
headlineContent: {
|
|
3320
|
+
display: "flex",
|
|
3321
|
+
flexDirection: "column",
|
|
3322
|
+
alignItems: "flex-start",
|
|
3323
|
+
flex: "1 0 0",
|
|
3324
|
+
gap: "16px"
|
|
3325
|
+
},
|
|
3326
|
+
// Headline content with z-index
|
|
3327
|
+
headlineContentInner: {
|
|
3328
|
+
zIndex: 10
|
|
3329
|
+
},
|
|
3330
|
+
// Headline typography
|
|
3331
|
+
headlineText: {
|
|
3332
|
+
fontWeight: 500,
|
|
3333
|
+
lineHeight: "166%",
|
|
3334
|
+
letterSpacing: "1px",
|
|
3335
|
+
textAlign: e.isMobile ? "center" : "left",
|
|
3336
|
+
color: e.secondaryColor,
|
|
3337
|
+
opacity: "70%",
|
|
3338
|
+
textTransform: "uppercase",
|
|
3339
|
+
fontFamily: e.fontFamilySecondary,
|
|
3340
|
+
fontSize: "0.75em"
|
|
3341
|
+
},
|
|
3342
|
+
// Content container
|
|
3343
|
+
contentContainer: {
|
|
3344
|
+
display: "flex",
|
|
3345
|
+
flexDirection: "column",
|
|
3346
|
+
gap: e.spacingScale["3xs"]
|
|
3347
|
+
},
|
|
3348
|
+
// Title typography
|
|
3349
|
+
titleText: {
|
|
3350
|
+
fontWeight: 700,
|
|
3351
|
+
lineHeight: "133%",
|
|
3352
|
+
letterSpacing: "0px",
|
|
3353
|
+
textAlign: e.isMobile ? "center" : "left",
|
|
3354
|
+
fontSize: "1.5em",
|
|
3355
|
+
color: e.darkTextColor,
|
|
3356
|
+
fontFamily: e.fontFamilyPrimary
|
|
3357
|
+
},
|
|
3358
|
+
// Description typography
|
|
3359
|
+
descriptionText: {
|
|
3360
|
+
fontWeight: 400,
|
|
3361
|
+
lineHeight: "140%",
|
|
3362
|
+
letterSpacing: "0.15px",
|
|
3363
|
+
fontSize: "1.25em",
|
|
3364
|
+
textAlign: e.isMobile ? "center" : "left",
|
|
3365
|
+
color: e.secondaryColor,
|
|
3366
|
+
opacity: "70%",
|
|
3367
|
+
fontFamily: e.fontFamilyPrimary
|
|
3368
|
+
},
|
|
3369
|
+
// Bottom section container
|
|
3370
|
+
bottomSection: {
|
|
3371
|
+
display: "flex",
|
|
3372
|
+
flexDirection: "column",
|
|
3373
|
+
gap: "24px",
|
|
3374
|
+
zIndex: 1
|
|
3375
|
+
},
|
|
3376
|
+
// Footer container
|
|
3377
|
+
footerContainer: {
|
|
3378
|
+
display: "flex",
|
|
3379
|
+
alignItems: "center",
|
|
3380
|
+
justifyContent: "space-between",
|
|
3381
|
+
flexDirection: e.isMobile ? "column-reverse" : "row",
|
|
3382
|
+
gap: e.spacingScale.md
|
|
3383
|
+
},
|
|
3384
|
+
ctaSection: {
|
|
3385
|
+
borderRadius: e.borderRadius.md,
|
|
3386
|
+
py: e.spacingScale.md,
|
|
3387
|
+
display: "flex",
|
|
3388
|
+
flexDirection: "column",
|
|
3389
|
+
alignItems: "center",
|
|
3390
|
+
alignSelf: "stretch",
|
|
3391
|
+
gap: e.spacingScale.md,
|
|
3392
|
+
backdropFilter: "blur(4px)",
|
|
3393
|
+
position: "relative",
|
|
3394
|
+
"&::before": {
|
|
3395
|
+
content: '""',
|
|
3396
|
+
position: "absolute",
|
|
3397
|
+
top: 0,
|
|
3398
|
+
left: 0,
|
|
3399
|
+
right: 0,
|
|
3400
|
+
bottom: 0,
|
|
3401
|
+
backgroundColor: e.contentBgColor,
|
|
3402
|
+
opacity: 0.25,
|
|
3403
|
+
borderRadius: "inherit",
|
|
3404
|
+
zIndex: 0,
|
|
3405
|
+
backdropFilter: "blur(4px)"
|
|
3406
|
+
},
|
|
3407
|
+
"& > *": {
|
|
3408
|
+
position: "relative",
|
|
3409
|
+
zIndex: 1
|
|
3410
|
+
}
|
|
3411
|
+
},
|
|
3412
|
+
// Buttons container
|
|
3413
|
+
buttonsContainer: {
|
|
3414
|
+
display: "flex",
|
|
3415
|
+
flexDirection: "column",
|
|
3416
|
+
gap: e.spacingScale.md
|
|
3417
|
+
},
|
|
3418
|
+
// Try again button
|
|
3419
|
+
tryAgainButton: {
|
|
3420
|
+
display: "flex",
|
|
3421
|
+
minHeight: "48px",
|
|
3422
|
+
py: "12px",
|
|
3423
|
+
pr: "24px",
|
|
3424
|
+
pl: "16px",
|
|
3425
|
+
flexDirection: "column",
|
|
3426
|
+
justifyContent: "center",
|
|
3427
|
+
alignItems: "center",
|
|
3428
|
+
gap: "8px",
|
|
3429
|
+
borderRadius: e.borderRadius.xl,
|
|
3430
|
+
bgcolor: e.onSurfaceColor,
|
|
3431
|
+
"&:hover": {
|
|
3432
|
+
bgcolor: e.surfaceVariantColor
|
|
3433
|
+
},
|
|
3434
|
+
fontSize: "0.9375em"
|
|
3435
|
+
},
|
|
3436
|
+
// Try again button content
|
|
3437
|
+
tryAgainButtonContent: {
|
|
3438
|
+
display: "flex",
|
|
3439
|
+
justifyContent: "center",
|
|
3440
|
+
alignItems: "center",
|
|
3441
|
+
gap: "8px",
|
|
3442
|
+
alignSelf: "stretch"
|
|
3443
|
+
},
|
|
3444
|
+
// Try again icon
|
|
3445
|
+
tryAgainIcon: {
|
|
3446
|
+
display: "flex",
|
|
3447
|
+
width: "24px",
|
|
3448
|
+
height: "24px",
|
|
3449
|
+
justifyContent: "center",
|
|
3450
|
+
alignItems: "center",
|
|
3451
|
+
color: e.textPrimary
|
|
3452
|
+
},
|
|
3453
|
+
// Try again text
|
|
3454
|
+
tryAgainText: {
|
|
3455
|
+
color: e.textPrimary,
|
|
3456
|
+
textAlign: "center",
|
|
3457
|
+
fontFamily: e.fontFamilyPrimary,
|
|
3458
|
+
fontSize: "0.9375em",
|
|
3459
|
+
fontStyle: "normal",
|
|
3460
|
+
fontWeight: 500,
|
|
3461
|
+
lineHeight: "24px",
|
|
3462
|
+
letterSpacing: "0.46px",
|
|
3463
|
+
textTransform: "uppercase"
|
|
3464
|
+
}
|
|
3465
|
+
};
|
|
3466
|
+
}, Ln = (e) => {
|
|
3467
|
+
const t = ie(), i = ce(), o = de(), { t: a } = _e(), s = ue(
|
|
3468
|
+
Q.OVERLAY
|
|
3469
|
+
), { brandingImage: p, brandingColors: d, brandingLogo: b } = ri(e.entity.branding || null), c = p || tt(
|
|
3470
|
+
{
|
|
3471
|
+
images: e.entity.images || null,
|
|
3472
|
+
imagePlaceholder: e.defaultImagePlaceholderUrl || ""
|
|
3473
|
+
},
|
|
3474
|
+
Q.OVERLAY
|
|
3475
|
+
), f = At(c), x = (d == null ? void 0 : d.contentColor) || i.colorSchemes.dark.textColor, v = i.customFontFamily.dark.primary, g = i.customFontFamily.dark.secondary, y = i.customRadius.dark, R = i.border.dark.size, O = (d == null ? void 0 : d.backgroundColor) || i.colorSchemes.dark.surfaceVariant, A = i.colorSchemes.dark.onSurface, T = i.colorSchemes.dark.surfaceVariant, S = i.colorSchemes.dark.textPrimary, I = e.isApiError ? a("common.error.title") : a("common.authentication.accessRequired"), L = e.isApiError ? e.apiErrorMessage || a("common.error.message") : a("common.authentication.invalidOrMissingAuth"), l = To({
|
|
3476
|
+
spacingScale: t,
|
|
3477
|
+
brandingColors: d,
|
|
3478
|
+
secondaryColor: x,
|
|
3479
|
+
fontFamilyPrimary: v,
|
|
3480
|
+
fontFamilySecondary: g,
|
|
3481
|
+
borderRadius: y,
|
|
3482
|
+
borderSize: R,
|
|
3483
|
+
darkTextColor: i.colorSchemes.dark.textColor,
|
|
3484
|
+
backgroundImage: f,
|
|
3485
|
+
imageBackgroundGradient: s,
|
|
3486
|
+
contentBgColor: O,
|
|
3487
|
+
onSurfaceColor: A,
|
|
3488
|
+
surfaceVariantColor: T,
|
|
3489
|
+
textPrimary: S,
|
|
3490
|
+
isMobile: o
|
|
3491
|
+
}), h = () => e.isApiError ? /* @__PURE__ */ n.jsx(m, { sx: l.ctaSection, children: /* @__PURE__ */ n.jsx(m, { sx: l.buttonsContainer, children: /* @__PURE__ */ n.jsx(pe, { sx: l.tryAgainButton, onClick: e.toggleTryAgain, children: /* @__PURE__ */ n.jsxs(m, { sx: l.tryAgainButtonContent, children: [
|
|
3492
|
+
/* @__PURE__ */ n.jsx(at, { sx: l.tryAgainIcon }),
|
|
3493
|
+
/* @__PURE__ */ n.jsx(w, { sx: l.tryAgainText, children: e.tryAgainButtonText })
|
|
3494
|
+
] }) }) }) }) : /* @__PURE__ */ n.jsx(n.Fragment, {});
|
|
3495
|
+
return /* @__PURE__ */ n.jsxs(m, { sx: l.mainContainer, children: [
|
|
3496
|
+
/* @__PURE__ */ n.jsx(m, { children: /* @__PURE__ */ n.jsx(m, { sx: l.headlineSection, children: /* @__PURE__ */ n.jsx(m, { sx: l.headlineContent, children: /* @__PURE__ */ n.jsxs(m, { sx: l.headlineContentInner, children: [
|
|
3497
|
+
/* @__PURE__ */ n.jsxs(m, { sx: { display: "flex", alignItems: "center", gap: t["3xs"] }, children: [
|
|
3498
|
+
/* @__PURE__ */ n.jsx(w, { level: "body-sm", sx: l.headlineText, children: e.headline }),
|
|
3499
|
+
/* @__PURE__ */ n.jsx(
|
|
3500
|
+
B,
|
|
3501
|
+
{
|
|
3502
|
+
rulesDisplay: e.rulesDisplay,
|
|
3503
|
+
isOverlayVariant: !0,
|
|
3504
|
+
rules: e.entity.rules || ""
|
|
3505
|
+
}
|
|
3506
|
+
)
|
|
3507
|
+
] }),
|
|
3508
|
+
/* @__PURE__ */ n.jsxs(m, { sx: l.contentContainer, children: [
|
|
3509
|
+
/* @__PURE__ */ n.jsx(w, { level: "h4", sx: l.titleText, children: e.entity.title }),
|
|
3510
|
+
/* @__PURE__ */ n.jsx(w, { level: "body-lg", sx: l.descriptionText, children: W(e.entity.description) })
|
|
3511
|
+
] })
|
|
3512
|
+
] }) }) }) }),
|
|
3513
|
+
/* @__PURE__ */ n.jsxs(m, { sx: l.bottomSection, children: [
|
|
3514
|
+
/* @__PURE__ */ n.jsx(
|
|
3515
|
+
it,
|
|
3516
|
+
{
|
|
3517
|
+
variant: "error",
|
|
3518
|
+
title: I,
|
|
3519
|
+
message: L
|
|
3520
|
+
}
|
|
3521
|
+
),
|
|
3522
|
+
h(),
|
|
3523
|
+
b ? /* @__PURE__ */ n.jsx(m, { sx: l.footerContainer, children: e.renderPresentedBy(i.colorSchemes.dark.textColor) }) : /* @__PURE__ */ n.jsx(n.Fragment, {})
|
|
3524
|
+
] })
|
|
3525
|
+
] });
|
|
3526
|
+
}, Nn = ({
|
|
3527
|
+
notFoundTitle: e,
|
|
3528
|
+
notFoundMessage: t
|
|
3529
|
+
}) => {
|
|
3530
|
+
var i, o;
|
|
3531
|
+
const a = (o = (i = H().palette) == null ? void 0 : i.danger) == null ? void 0 : o.plainColor, s = H().textSecondary, p = ie(), d = Y().primary, b = Y().secondary;
|
|
3532
|
+
return /* @__PURE__ */ n.jsxs(
|
|
3533
|
+
m,
|
|
3534
|
+
{
|
|
3535
|
+
sx: {
|
|
3536
|
+
display: "flex",
|
|
3537
|
+
flexDirection: "column",
|
|
3538
|
+
justifyContent: "center",
|
|
3539
|
+
alignItems: "center",
|
|
3540
|
+
width: "100%",
|
|
3541
|
+
minHeight: "300px",
|
|
3542
|
+
padding: "32px 24px",
|
|
3543
|
+
textAlign: "center"
|
|
3544
|
+
},
|
|
3545
|
+
children: [
|
|
3546
|
+
/* @__PURE__ */ n.jsx(
|
|
3547
|
+
m,
|
|
3548
|
+
{
|
|
3549
|
+
sx: {
|
|
3550
|
+
width: "80px",
|
|
3551
|
+
height: "80px",
|
|
3552
|
+
borderRadius: "50%",
|
|
3553
|
+
backgroundColor: `${a}15`,
|
|
3554
|
+
// 15% opacity
|
|
3555
|
+
display: "flex",
|
|
3556
|
+
alignItems: "center",
|
|
3557
|
+
justifyContent: "center",
|
|
3558
|
+
marginBottom: "24px"
|
|
3559
|
+
},
|
|
3560
|
+
children: /* @__PURE__ */ n.jsx(
|
|
3561
|
+
m,
|
|
3562
|
+
{
|
|
3563
|
+
sx: {
|
|
3564
|
+
fontSize: "32px",
|
|
3565
|
+
color: a,
|
|
3566
|
+
fontWeight: "bold",
|
|
3567
|
+
fontFamily: d
|
|
3568
|
+
},
|
|
3569
|
+
children: "?"
|
|
3570
|
+
}
|
|
3571
|
+
)
|
|
3572
|
+
}
|
|
3573
|
+
),
|
|
3574
|
+
/* @__PURE__ */ n.jsx(
|
|
3575
|
+
w,
|
|
3576
|
+
{
|
|
3577
|
+
level: "h4",
|
|
3578
|
+
sx: {
|
|
3579
|
+
color: a,
|
|
3580
|
+
marginBottom: p.xs,
|
|
3581
|
+
fontWeight: "600",
|
|
3582
|
+
fontFamily: d
|
|
3583
|
+
},
|
|
3584
|
+
children: e
|
|
3585
|
+
}
|
|
3586
|
+
),
|
|
3587
|
+
/* @__PURE__ */ n.jsx(
|
|
3588
|
+
w,
|
|
3589
|
+
{
|
|
3590
|
+
level: "body-md",
|
|
3591
|
+
sx: {
|
|
3592
|
+
color: s,
|
|
3593
|
+
lineHeight: 1.5,
|
|
3594
|
+
fontFamily: b
|
|
3595
|
+
},
|
|
3596
|
+
children: t
|
|
3597
|
+
}
|
|
3598
|
+
)
|
|
3599
|
+
]
|
|
3600
|
+
}
|
|
3601
|
+
);
|
|
3602
|
+
};
|
|
3603
|
+
var Ro = Object.create, ke = Object.defineProperty, Io = Object.getOwnPropertyDescriptor, Oo = Object.getOwnPropertyNames, Do = Object.getPrototypeOf, Ao = Object.prototype.hasOwnProperty, wo = (e, t, i) => t in e ? ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, Lo = (e, t) => () => (e && (t = e(e = 0)), t), Fe = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), No = (e, t) => {
|
|
3604
|
+
for (var i in t) ke(e, i, { get: t[i], enumerable: !0 });
|
|
3605
|
+
}, Po = (e, t, i, o) => {
|
|
3606
|
+
if (t && typeof t == "object" || typeof t == "function") for (let a of Oo(t)) !Ao.call(e, a) && a !== i && ke(e, a, { get: () => t[a], enumerable: !(o = Io(t, a)) || o.enumerable });
|
|
3607
|
+
return e;
|
|
3608
|
+
}, Mo = (e, t, i) => (i = e != null ? Ro(Do(e)) : {}, Po(!e || !e.__esModule ? ke(i, "default", { value: e, enumerable: !0 }) : i, e)), J = (e, t, i) => (wo(e, typeof t != "symbol" ? t + "" : t, i), i), Vt = {};
|
|
3609
|
+
No(Vt, { default: () => Ht });
|
|
3610
|
+
var Rt, Ht, jo = Lo(() => {
|
|
3611
|
+
Rt = { getItem: async () => null, setItem: async () => null, removeItem: async () => null, clear: async () => null, getAllKeys: async () => [], multiGet: async () => [], multiSet: async () => null, multiRemove: async () => null, mergeItem: async () => null, multiMerge: async () => null }, Ht = Rt;
|
|
3612
|
+
}), ko = Fe((e, t) => {
|
|
3613
|
+
var i = (function() {
|
|
3614
|
+
function o(g, y) {
|
|
3615
|
+
return y != null && g instanceof y;
|
|
3616
|
+
}
|
|
3617
|
+
var a;
|
|
3618
|
+
try {
|
|
3619
|
+
a = Map;
|
|
3620
|
+
} catch {
|
|
3621
|
+
a = function() {
|
|
3622
|
+
};
|
|
3623
|
+
}
|
|
3624
|
+
var s;
|
|
3625
|
+
try {
|
|
3626
|
+
s = Set;
|
|
3627
|
+
} catch {
|
|
3628
|
+
s = function() {
|
|
3629
|
+
};
|
|
3630
|
+
}
|
|
3631
|
+
var p;
|
|
3632
|
+
try {
|
|
3633
|
+
p = Promise;
|
|
3634
|
+
} catch {
|
|
3635
|
+
p = function() {
|
|
3636
|
+
};
|
|
3637
|
+
}
|
|
3638
|
+
function d(g, y, R, O, A) {
|
|
3639
|
+
typeof y == "object" && (R = y.depth, O = y.prototype, A = y.includeNonEnumerable, y = y.circular);
|
|
3640
|
+
var T = [], S = [], I = typeof Buffer < "u";
|
|
3641
|
+
typeof y > "u" && (y = !0), typeof R > "u" && (R = 1 / 0);
|
|
3642
|
+
function L(l, h) {
|
|
3643
|
+
if (l === null) return null;
|
|
3644
|
+
if (h === 0) return l;
|
|
3645
|
+
var u, _;
|
|
3646
|
+
if (typeof l != "object") return l;
|
|
3647
|
+
if (o(l, a)) u = new a();
|
|
3648
|
+
else if (o(l, s)) u = new s();
|
|
3649
|
+
else if (o(l, p)) u = new p(function($, G) {
|
|
3650
|
+
l.then(function(K) {
|
|
3651
|
+
$(L(K, h - 1));
|
|
3652
|
+
}, function(K) {
|
|
3653
|
+
G(L(K, h - 1));
|
|
3654
|
+
});
|
|
3655
|
+
});
|
|
3656
|
+
else if (d.__isArray(l)) u = [];
|
|
3657
|
+
else if (d.__isRegExp(l)) u = new RegExp(l.source, v(l)), l.lastIndex && (u.lastIndex = l.lastIndex);
|
|
3658
|
+
else if (d.__isDate(l)) u = new Date(l.getTime());
|
|
3659
|
+
else {
|
|
3660
|
+
if (I && Buffer.isBuffer(l)) return Buffer.allocUnsafe ? u = Buffer.allocUnsafe(l.length) : u = new Buffer(l.length), l.copy(u), u;
|
|
3661
|
+
o(l, Error) ? u = Object.create(l) : typeof O > "u" ? (_ = Object.getPrototypeOf(l), u = Object.create(_)) : (u = Object.create(O), _ = O);
|
|
3662
|
+
}
|
|
3663
|
+
if (y) {
|
|
3664
|
+
var C = T.indexOf(l);
|
|
3665
|
+
if (C != -1) return S[C];
|
|
3666
|
+
T.push(l), S.push(u);
|
|
3667
|
+
}
|
|
3668
|
+
o(l, a) && l.forEach(function($, G) {
|
|
3669
|
+
var K = L(G, h - 1), ne = L($, h - 1);
|
|
3670
|
+
u.set(K, ne);
|
|
3671
|
+
}), o(l, s) && l.forEach(function($) {
|
|
3672
|
+
var G = L($, h - 1);
|
|
3673
|
+
u.add(G);
|
|
3674
|
+
});
|
|
3675
|
+
for (var E in l) {
|
|
3676
|
+
var N;
|
|
3677
|
+
_ && (N = Object.getOwnPropertyDescriptor(_, E)), !(N && N.set == null) && (u[E] = L(l[E], h - 1));
|
|
3678
|
+
}
|
|
3679
|
+
if (Object.getOwnPropertySymbols) for (var P = Object.getOwnPropertySymbols(l), E = 0; E < P.length; E++) {
|
|
3680
|
+
var M = P[E], F = Object.getOwnPropertyDescriptor(l, M);
|
|
3681
|
+
F && !F.enumerable && !A || (u[M] = L(l[M], h - 1), F.enumerable || Object.defineProperty(u, M, { enumerable: !1 }));
|
|
3682
|
+
}
|
|
3683
|
+
if (A) for (var se = Object.getOwnPropertyNames(l), E = 0; E < se.length; E++) {
|
|
3684
|
+
var Z = se[E], F = Object.getOwnPropertyDescriptor(l, Z);
|
|
3685
|
+
F && F.enumerable || (u[Z] = L(l[Z], h - 1), Object.defineProperty(u, Z, { enumerable: !1 }));
|
|
3686
|
+
}
|
|
3687
|
+
return u;
|
|
3688
|
+
}
|
|
3689
|
+
return L(g, R);
|
|
3690
|
+
}
|
|
3691
|
+
d.clonePrototype = function(g) {
|
|
3692
|
+
if (g === null) return null;
|
|
3693
|
+
var y = function() {
|
|
3694
|
+
};
|
|
3695
|
+
return y.prototype = g, new y();
|
|
3696
|
+
};
|
|
3697
|
+
function b(g) {
|
|
3698
|
+
return Object.prototype.toString.call(g);
|
|
3699
|
+
}
|
|
3700
|
+
d.__objToStr = b;
|
|
3701
|
+
function c(g) {
|
|
3702
|
+
return typeof g == "object" && b(g) === "[object Date]";
|
|
3703
|
+
}
|
|
3704
|
+
d.__isDate = c;
|
|
3705
|
+
function f(g) {
|
|
3706
|
+
return typeof g == "object" && b(g) === "[object Array]";
|
|
3707
|
+
}
|
|
3708
|
+
d.__isArray = f;
|
|
3709
|
+
function x(g) {
|
|
3710
|
+
return typeof g == "object" && b(g) === "[object RegExp]";
|
|
3711
|
+
}
|
|
3712
|
+
d.__isRegExp = x;
|
|
3713
|
+
function v(g) {
|
|
3714
|
+
var y = "";
|
|
3715
|
+
return g.global && (y += "g"), g.ignoreCase && (y += "i"), g.multiline && (y += "m"), y;
|
|
3716
|
+
}
|
|
3717
|
+
return d.__getRegExpFlags = v, d;
|
|
3718
|
+
})();
|
|
3719
|
+
typeof t == "object" && t.exports && (t.exports = i);
|
|
3720
|
+
}), Fo = Fe((e, t) => {
|
|
3721
|
+
var i = typeof Reflect == "object" ? Reflect : null, o = i && typeof i.apply == "function" ? i.apply : function(l, h, u) {
|
|
3722
|
+
return Function.prototype.apply.call(l, h, u);
|
|
3723
|
+
}, a;
|
|
3724
|
+
i && typeof i.ownKeys == "function" ? a = i.ownKeys : Object.getOwnPropertySymbols ? a = function(l) {
|
|
3725
|
+
return Object.getOwnPropertyNames(l).concat(Object.getOwnPropertySymbols(l));
|
|
3726
|
+
} : a = function(l) {
|
|
3727
|
+
return Object.getOwnPropertyNames(l);
|
|
3728
|
+
};
|
|
3729
|
+
function s(l) {
|
|
3730
|
+
console && console.warn && console.warn(l);
|
|
3731
|
+
}
|
|
3732
|
+
var p = Number.isNaN || function(l) {
|
|
3733
|
+
return l !== l;
|
|
3734
|
+
};
|
|
3735
|
+
function d() {
|
|
3736
|
+
d.init.call(this);
|
|
3737
|
+
}
|
|
3738
|
+
t.exports = d, t.exports.once = S, d.EventEmitter = d, d.prototype._events = void 0, d.prototype._eventsCount = 0, d.prototype._maxListeners = void 0;
|
|
3739
|
+
var b = 10;
|
|
3740
|
+
function c(l) {
|
|
3741
|
+
if (typeof l != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof l);
|
|
3742
|
+
}
|
|
3743
|
+
Object.defineProperty(d, "defaultMaxListeners", { enumerable: !0, get: function() {
|
|
3744
|
+
return b;
|
|
3745
|
+
}, set: function(l) {
|
|
3746
|
+
if (typeof l != "number" || l < 0 || p(l)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + l + ".");
|
|
3747
|
+
b = l;
|
|
3748
|
+
} }), d.init = function() {
|
|
3749
|
+
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
3750
|
+
}, d.prototype.setMaxListeners = function(l) {
|
|
3751
|
+
if (typeof l != "number" || l < 0 || p(l)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + l + ".");
|
|
3752
|
+
return this._maxListeners = l, this;
|
|
3753
|
+
};
|
|
3754
|
+
function f(l) {
|
|
3755
|
+
return l._maxListeners === void 0 ? d.defaultMaxListeners : l._maxListeners;
|
|
3756
|
+
}
|
|
3757
|
+
d.prototype.getMaxListeners = function() {
|
|
3758
|
+
return f(this);
|
|
3759
|
+
}, d.prototype.emit = function(l) {
|
|
3760
|
+
for (var h = [], u = 1; u < arguments.length; u++) h.push(arguments[u]);
|
|
3761
|
+
var _ = l === "error", C = this._events;
|
|
3762
|
+
if (C !== void 0) _ = _ && C.error === void 0;
|
|
3763
|
+
else if (!_) return !1;
|
|
3764
|
+
if (_) {
|
|
3765
|
+
var E;
|
|
3766
|
+
if (h.length > 0 && (E = h[0]), E instanceof Error) throw E;
|
|
3767
|
+
var N = new Error("Unhandled error." + (E ? " (" + E.message + ")" : ""));
|
|
3768
|
+
throw N.context = E, N;
|
|
3769
|
+
}
|
|
3770
|
+
var P = C[l];
|
|
3771
|
+
if (P === void 0) return !1;
|
|
3772
|
+
if (typeof P == "function") o(P, this, h);
|
|
3773
|
+
else for (var M = P.length, F = O(P, M), u = 0; u < M; ++u) o(F[u], this, h);
|
|
3774
|
+
return !0;
|
|
3775
|
+
};
|
|
3776
|
+
function x(l, h, u, _) {
|
|
3777
|
+
var C, E, N;
|
|
3778
|
+
if (c(u), E = l._events, E === void 0 ? (E = l._events = /* @__PURE__ */ Object.create(null), l._eventsCount = 0) : (E.newListener !== void 0 && (l.emit("newListener", h, u.listener ? u.listener : u), E = l._events), N = E[h]), N === void 0) N = E[h] = u, ++l._eventsCount;
|
|
3779
|
+
else if (typeof N == "function" ? N = E[h] = _ ? [u, N] : [N, u] : _ ? N.unshift(u) : N.push(u), C = f(l), C > 0 && N.length > C && !N.warned) {
|
|
3780
|
+
N.warned = !0;
|
|
3781
|
+
var P = new Error("Possible EventEmitter memory leak detected. " + N.length + " " + String(h) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3782
|
+
P.name = "MaxListenersExceededWarning", P.emitter = l, P.type = h, P.count = N.length, s(P);
|
|
3783
|
+
}
|
|
3784
|
+
return l;
|
|
3785
|
+
}
|
|
3786
|
+
d.prototype.addListener = function(l, h) {
|
|
3787
|
+
return x(this, l, h, !1);
|
|
3788
|
+
}, d.prototype.on = d.prototype.addListener, d.prototype.prependListener = function(l, h) {
|
|
3789
|
+
return x(this, l, h, !0);
|
|
3790
|
+
};
|
|
3791
|
+
function v() {
|
|
3792
|
+
if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
3793
|
+
}
|
|
3794
|
+
function g(l, h, u) {
|
|
3795
|
+
var _ = { fired: !1, wrapFn: void 0, target: l, type: h, listener: u }, C = v.bind(_);
|
|
3796
|
+
return C.listener = u, _.wrapFn = C, C;
|
|
3797
|
+
}
|
|
3798
|
+
d.prototype.once = function(l, h) {
|
|
3799
|
+
return c(h), this.on(l, g(this, l, h)), this;
|
|
3800
|
+
}, d.prototype.prependOnceListener = function(l, h) {
|
|
3801
|
+
return c(h), this.prependListener(l, g(this, l, h)), this;
|
|
3802
|
+
}, d.prototype.removeListener = function(l, h) {
|
|
3803
|
+
var u, _, C, E, N;
|
|
3804
|
+
if (c(h), _ = this._events, _ === void 0) return this;
|
|
3805
|
+
if (u = _[l], u === void 0) return this;
|
|
3806
|
+
if (u === h || u.listener === h) --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete _[l], _.removeListener && this.emit("removeListener", l, u.listener || h));
|
|
3807
|
+
else if (typeof u != "function") {
|
|
3808
|
+
for (C = -1, E = u.length - 1; E >= 0; E--) if (u[E] === h || u[E].listener === h) {
|
|
3809
|
+
N = u[E].listener, C = E;
|
|
3810
|
+
break;
|
|
3811
|
+
}
|
|
3812
|
+
if (C < 0) return this;
|
|
3813
|
+
C === 0 ? u.shift() : A(u, C), u.length === 1 && (_[l] = u[0]), _.removeListener !== void 0 && this.emit("removeListener", l, N || h);
|
|
3814
|
+
}
|
|
3815
|
+
return this;
|
|
3816
|
+
}, d.prototype.off = d.prototype.removeListener, d.prototype.removeAllListeners = function(l) {
|
|
3817
|
+
var h, u, _;
|
|
3818
|
+
if (u = this._events, u === void 0) return this;
|
|
3819
|
+
if (u.removeListener === void 0) return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : u[l] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete u[l]), this;
|
|
3820
|
+
if (arguments.length === 0) {
|
|
3821
|
+
var C = Object.keys(u), E;
|
|
3822
|
+
for (_ = 0; _ < C.length; ++_) E = C[_], E !== "removeListener" && this.removeAllListeners(E);
|
|
3823
|
+
return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
|
|
3824
|
+
}
|
|
3825
|
+
if (h = u[l], typeof h == "function") this.removeListener(l, h);
|
|
3826
|
+
else if (h !== void 0) for (_ = h.length - 1; _ >= 0; _--) this.removeListener(l, h[_]);
|
|
3827
|
+
return this;
|
|
3828
|
+
};
|
|
3829
|
+
function y(l, h, u) {
|
|
3830
|
+
var _ = l._events;
|
|
3831
|
+
if (_ === void 0) return [];
|
|
3832
|
+
var C = _[h];
|
|
3833
|
+
return C === void 0 ? [] : typeof C == "function" ? u ? [C.listener || C] : [C] : u ? T(C) : O(C, C.length);
|
|
3834
|
+
}
|
|
3835
|
+
d.prototype.listeners = function(l) {
|
|
3836
|
+
return y(this, l, !0);
|
|
3837
|
+
}, d.prototype.rawListeners = function(l) {
|
|
3838
|
+
return y(this, l, !1);
|
|
3839
|
+
}, d.listenerCount = function(l, h) {
|
|
3840
|
+
return typeof l.listenerCount == "function" ? l.listenerCount(h) : R.call(l, h);
|
|
3841
|
+
}, d.prototype.listenerCount = R;
|
|
3842
|
+
function R(l) {
|
|
3843
|
+
var h = this._events;
|
|
3844
|
+
if (h !== void 0) {
|
|
3845
|
+
var u = h[l];
|
|
3846
|
+
if (typeof u == "function") return 1;
|
|
3847
|
+
if (u !== void 0) return u.length;
|
|
3848
|
+
}
|
|
3849
|
+
return 0;
|
|
3850
|
+
}
|
|
3851
|
+
d.prototype.eventNames = function() {
|
|
3852
|
+
return this._eventsCount > 0 ? a(this._events) : [];
|
|
3853
|
+
};
|
|
3854
|
+
function O(l, h) {
|
|
3855
|
+
for (var u = new Array(h), _ = 0; _ < h; ++_) u[_] = l[_];
|
|
3856
|
+
return u;
|
|
3857
|
+
}
|
|
3858
|
+
function A(l, h) {
|
|
3859
|
+
for (; h + 1 < l.length; h++) l[h] = l[h + 1];
|
|
3860
|
+
l.pop();
|
|
3861
|
+
}
|
|
3862
|
+
function T(l) {
|
|
3863
|
+
for (var h = new Array(l.length), u = 0; u < h.length; ++u) h[u] = l[u].listener || l[u];
|
|
3864
|
+
return h;
|
|
3865
|
+
}
|
|
3866
|
+
function S(l, h) {
|
|
3867
|
+
return new Promise(function(u, _) {
|
|
3868
|
+
function C(N) {
|
|
3869
|
+
l.removeListener(h, E), _(N);
|
|
3870
|
+
}
|
|
3871
|
+
function E() {
|
|
3872
|
+
typeof l.removeListener == "function" && l.removeListener("error", C), u([].slice.call(arguments));
|
|
3873
|
+
}
|
|
3874
|
+
L(l, h, E, { once: !0 }), h !== "error" && I(l, C, { once: !0 });
|
|
3875
|
+
});
|
|
3876
|
+
}
|
|
3877
|
+
function I(l, h, u) {
|
|
3878
|
+
typeof l.on == "function" && L(l, "error", h, u);
|
|
3879
|
+
}
|
|
3880
|
+
function L(l, h, u, _) {
|
|
3881
|
+
if (typeof l.on == "function") _.once ? l.once(h, u) : l.on(h, u);
|
|
3882
|
+
else if (typeof l.addEventListener == "function") l.addEventListener(h, function C(E) {
|
|
3883
|
+
_.once && l.removeEventListener(h, C), u(E);
|
|
3884
|
+
});
|
|
3885
|
+
else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof l);
|
|
3886
|
+
}
|
|
3887
|
+
}), Vo = Fe((e, t) => {
|
|
3888
|
+
(function() {
|
|
3889
|
+
var i, o, a = [].splice, s = function(d, b) {
|
|
3890
|
+
if (!(d instanceof b)) throw new Error("Bound instance method accessed before binding");
|
|
3891
|
+
}, p = [].indexOf;
|
|
3892
|
+
o = ko(), i = Fo().EventEmitter, t.exports = (function() {
|
|
3893
|
+
class d extends i {
|
|
3894
|
+
constructor(c = {}) {
|
|
3895
|
+
super(), this.get = this.get.bind(this), this.mget = this.mget.bind(this), this.set = this.set.bind(this), this.mset = this.mset.bind(this), this.del = this.del.bind(this), this.take = this.take.bind(this), this.ttl = this.ttl.bind(this), this.getTtl = this.getTtl.bind(this), this.keys = this.keys.bind(this), this.has = this.has.bind(this), this.getStats = this.getStats.bind(this), this.flushAll = this.flushAll.bind(this), this.flushStats = this.flushStats.bind(this), this.close = this.close.bind(this), this._checkData = this._checkData.bind(this), this._check = this._check.bind(this), this._isInvalidKey = this._isInvalidKey.bind(this), this._wrap = this._wrap.bind(this), this._getValLength = this._getValLength.bind(this), this._error = this._error.bind(this), this._initErrors = this._initErrors.bind(this), this.options = c, this._initErrors(), this.data = {}, this.options = Object.assign({ forceString: !1, objectValueSize: 80, promiseValueSize: 80, arrayValueSize: 40, stdTTL: 0, checkperiod: 600, useClones: !0, deleteOnExpire: !0, enableLegacyCallbacks: !1, maxKeys: -1 }, this.options), this.options.enableLegacyCallbacks && (console.warn("WARNING! node-cache legacy callback support will drop in v6.x"), ["get", "mget", "set", "del", "ttl", "getTtl", "keys", "has"].forEach((f) => {
|
|
3896
|
+
var x;
|
|
3897
|
+
x = this[f], this[f] = function(...v) {
|
|
3898
|
+
var g, y, R, O;
|
|
3899
|
+
if (R = v, [...v] = R, [g] = a.call(v, -1), typeof g == "function") try {
|
|
3900
|
+
O = x(...v), g(null, O);
|
|
3901
|
+
} catch (A) {
|
|
3902
|
+
y = A, g(y);
|
|
3903
|
+
}
|
|
3904
|
+
else return x(...v, g);
|
|
3905
|
+
};
|
|
3906
|
+
})), this.stats = { hits: 0, misses: 0, keys: 0, ksize: 0, vsize: 0 }, this.validKeyTypes = ["string", "number"], this._checkData();
|
|
3907
|
+
}
|
|
3908
|
+
get(c) {
|
|
3909
|
+
var f, x;
|
|
3910
|
+
if (s(this, d), (x = this._isInvalidKey(c)) != null) throw x;
|
|
3911
|
+
if (this.data[c] != null && this._check(c, this.data[c])) return this.stats.hits++, f = this._unwrap(this.data[c]), f;
|
|
3912
|
+
this.stats.misses++;
|
|
3913
|
+
}
|
|
3914
|
+
mget(c) {
|
|
3915
|
+
var f, x, v, g, y, R;
|
|
3916
|
+
if (s(this, d), !Array.isArray(c)) throw f = this._error("EKEYSTYPE"), f;
|
|
3917
|
+
for (R = {}, v = 0, y = c.length; v < y; v++) {
|
|
3918
|
+
if (g = c[v], (x = this._isInvalidKey(g)) != null) throw x;
|
|
3919
|
+
this.data[g] != null && this._check(g, this.data[g]) ? (this.stats.hits++, R[g] = this._unwrap(this.data[g])) : this.stats.misses++;
|
|
3920
|
+
}
|
|
3921
|
+
return R;
|
|
3922
|
+
}
|
|
3923
|
+
set(c, f, x) {
|
|
3924
|
+
var v, g, y;
|
|
3925
|
+
if (s(this, d), this.options.maxKeys > -1 && this.stats.keys >= this.options.maxKeys) throw v = this._error("ECACHEFULL"), v;
|
|
3926
|
+
if (this.options.forceString, x == null && (x = this.options.stdTTL), (g = this._isInvalidKey(c)) != null) throw g;
|
|
3927
|
+
return y = !1, this.data[c] && (y = !0, this.stats.vsize -= this._getValLength(this._unwrap(this.data[c], !1))), this.data[c] = this._wrap(f, x), this.stats.vsize += this._getValLength(f), y || (this.stats.ksize += this._getKeyLength(c), this.stats.keys++), this.emit("set", c, f), !0;
|
|
3928
|
+
}
|
|
3929
|
+
mset(c) {
|
|
3930
|
+
var f, x, v, g, y, R, O, A, T, S;
|
|
3931
|
+
if (s(this, d), this.options.maxKeys > -1 && this.stats.keys + c.length >= this.options.maxKeys) throw f = this._error("ECACHEFULL"), f;
|
|
3932
|
+
for (v = 0, O = c.length; v < O; v++) {
|
|
3933
|
+
if (R = c[v], { key: y, val: S, ttl: T } = R, T && typeof T != "number") throw f = this._error("ETTLTYPE"), f;
|
|
3934
|
+
if ((x = this._isInvalidKey(y)) != null) throw x;
|
|
3935
|
+
}
|
|
3936
|
+
for (g = 0, A = c.length; g < A; g++) R = c[g], { key: y, val: S, ttl: T } = R, this.set(y, S, T);
|
|
3937
|
+
return !0;
|
|
3938
|
+
}
|
|
3939
|
+
del(c) {
|
|
3940
|
+
var f, x, v, g, y, R;
|
|
3941
|
+
for (s(this, d), Array.isArray(c) || (c = [c]), f = 0, v = 0, y = c.length; v < y; v++) {
|
|
3942
|
+
if (g = c[v], (x = this._isInvalidKey(g)) != null) throw x;
|
|
3943
|
+
this.data[g] != null && (this.stats.vsize -= this._getValLength(this._unwrap(this.data[g], !1)), this.stats.ksize -= this._getKeyLength(g), this.stats.keys--, f++, R = this.data[g], delete this.data[g], this.emit("del", g, R.v));
|
|
3944
|
+
}
|
|
3945
|
+
return f;
|
|
3946
|
+
}
|
|
3947
|
+
take(c) {
|
|
3948
|
+
var f;
|
|
3949
|
+
return s(this, d), f = this.get(c), f != null && this.del(c), f;
|
|
3950
|
+
}
|
|
3951
|
+
ttl(c, f) {
|
|
3952
|
+
var x;
|
|
3953
|
+
if (s(this, d), f || (f = this.options.stdTTL), !c) return !1;
|
|
3954
|
+
if ((x = this._isInvalidKey(c)) != null) throw x;
|
|
3955
|
+
return this.data[c] != null && this._check(c, this.data[c]) ? (f >= 0 ? this.data[c] = this._wrap(this.data[c].v, f, !1) : this.del(c), !0) : !1;
|
|
3956
|
+
}
|
|
3957
|
+
getTtl(c) {
|
|
3958
|
+
var f, x;
|
|
3959
|
+
if (s(this, d), !!c) {
|
|
3960
|
+
if ((x = this._isInvalidKey(c)) != null) throw x;
|
|
3961
|
+
if (this.data[c] != null && this._check(c, this.data[c])) return f = this.data[c].t, f;
|
|
3962
|
+
}
|
|
3963
|
+
}
|
|
3964
|
+
keys() {
|
|
3965
|
+
var c;
|
|
3966
|
+
return s(this, d), c = Object.keys(this.data), c;
|
|
3967
|
+
}
|
|
3968
|
+
has(c) {
|
|
3969
|
+
var f;
|
|
3970
|
+
return s(this, d), f = this.data[c] != null && this._check(c, this.data[c]), f;
|
|
3971
|
+
}
|
|
3972
|
+
getStats() {
|
|
3973
|
+
return s(this, d), this.stats;
|
|
3974
|
+
}
|
|
3975
|
+
flushAll(c = !0) {
|
|
3976
|
+
s(this, d), this.data = {}, this.stats = { hits: 0, misses: 0, keys: 0, ksize: 0, vsize: 0 }, this._killCheckPeriod(), this._checkData(c), this.emit("flush");
|
|
3977
|
+
}
|
|
3978
|
+
flushStats() {
|
|
3979
|
+
s(this, d), this.stats = { hits: 0, misses: 0, keys: 0, ksize: 0, vsize: 0 }, this.emit("flush_stats");
|
|
3980
|
+
}
|
|
3981
|
+
close() {
|
|
3982
|
+
s(this, d), this._killCheckPeriod();
|
|
3983
|
+
}
|
|
3984
|
+
_checkData(c = !0) {
|
|
3985
|
+
var f, x, v;
|
|
3986
|
+
s(this, d), x = this.data;
|
|
3987
|
+
for (f in x) v = x[f], this._check(f, v);
|
|
3988
|
+
c && this.options.checkperiod > 0 && (this.checkTimeout = setTimeout(this._checkData, this.options.checkperiod * 1e3, c), this.checkTimeout != null && this.checkTimeout.unref != null && this.checkTimeout.unref());
|
|
3989
|
+
}
|
|
3990
|
+
_killCheckPeriod() {
|
|
3991
|
+
if (this.checkTimeout != null) return clearTimeout(this.checkTimeout);
|
|
3992
|
+
}
|
|
3993
|
+
_check(c, f) {
|
|
3994
|
+
var x;
|
|
3995
|
+
return s(this, d), x = !0, f.t !== 0 && f.t < Date.now() && (this.options.deleteOnExpire && (x = !1, this.del(c)), this.emit("expired", c, this._unwrap(f))), x;
|
|
3996
|
+
}
|
|
3997
|
+
_isInvalidKey(c) {
|
|
3998
|
+
var f;
|
|
3999
|
+
if (s(this, d), f = typeof c, p.call(this.validKeyTypes, f) < 0) return this._error("EKEYTYPE", { type: typeof c });
|
|
4000
|
+
}
|
|
4001
|
+
_wrap(c, f, x = !0) {
|
|
4002
|
+
var v, g, y;
|
|
4003
|
+
return s(this, d), this.options.useClones || (x = !1), g = Date.now(), v = 0, y = 1e3, f === 0 ? v = 0 : f ? v = g + f * y : this.options.stdTTL === 0 ? v = this.options.stdTTL : v = g + this.options.stdTTL * y, { t: v, v: x ? o(c) : c };
|
|
4004
|
+
}
|
|
4005
|
+
_unwrap(c, f = !0) {
|
|
4006
|
+
return this.options.useClones || (f = !1), c.v != null ? f ? o(c.v) : c.v : null;
|
|
4007
|
+
}
|
|
4008
|
+
_getKeyLength(c) {
|
|
4009
|
+
return c.toString().length;
|
|
4010
|
+
}
|
|
4011
|
+
_getValLength(c) {
|
|
4012
|
+
return s(this, d), typeof c == "string" ? c.length : this.options.forceString ? JSON.stringify(c).length : Array.isArray(c) ? this.options.arrayValueSize * c.length : typeof c == "number" ? 8 : typeof (c == null ? void 0 : c.then) == "function" ? this.options.promiseValueSize : typeof Buffer < "u" && Buffer !== null && Buffer.isBuffer(c) ? c.length : c != null && typeof c == "object" ? this.options.objectValueSize * Object.keys(c).length : typeof c == "boolean" ? 8 : 0;
|
|
4013
|
+
}
|
|
4014
|
+
_error(c, f = {}) {
|
|
4015
|
+
var x;
|
|
4016
|
+
return s(this, d), x = new Error(), x.name = c, x.errorcode = c, x.message = this.ERRORS[c] != null ? this.ERRORS[c](f) : "-", x.data = f, x;
|
|
4017
|
+
}
|
|
4018
|
+
_initErrors() {
|
|
4019
|
+
var c, f, x;
|
|
4020
|
+
s(this, d), this.ERRORS = {}, x = this._ERRORS;
|
|
4021
|
+
for (f in x) c = x[f], this.ERRORS[f] = this.createErrorMessage(c);
|
|
4022
|
+
}
|
|
4023
|
+
createErrorMessage(c) {
|
|
4024
|
+
return function(f) {
|
|
4025
|
+
return c.replace("__key", f.type);
|
|
4026
|
+
};
|
|
4027
|
+
}
|
|
4028
|
+
}
|
|
4029
|
+
return d.prototype._ERRORS = { ENOTFOUND: "Key `__key` not found", ECACHEFULL: "Cache max keys amount exceeded", EKEYTYPE: "The key argument has to be of type `string` or `number`. Found: `__key`", EKEYSTYPE: "The keys argument has to be an array.", ETTLTYPE: "The ttl argument has to be a number." }, d;
|
|
4030
|
+
}).call(this);
|
|
4031
|
+
}).call(e);
|
|
4032
|
+
}), Ho = Fe((e, t) => {
|
|
4033
|
+
(function() {
|
|
4034
|
+
var i;
|
|
4035
|
+
i = t.exports = Vo(), i.version = "5.1.2";
|
|
4036
|
+
}).call(e);
|
|
4037
|
+
}), zo = ((e) => (e.EN = "en", e.BG = "bg", e.RO = "ro", e.EL = "el", e.SK = "sk", e.PT = "pt", e.SR = "sr", e.HU = "hu", e.SV = "sv", e.ES = "es", e.FR = "fr", e.NL = "nl", e.DE = "de", e.IT = "it", e.AR = "ar", e))(zo || {}), Go = ((e) => (e.DEV = "dev", e.PROD = "prod", e.STAGING = "staging", e.WATG = "watg", e.YOLO = "yolo", e.CSKA = "cska", e))(Go || {}), Wo = ((e) => (e.NATIVE = "native", e.ENETPULSE = "enetpulse", e.SPORTRADAR = "sportradar", e.SPORTAL_365 = "sportal365", e.API_FOOTBALL = "api_football", e))(Wo || {}), Bo = ((e) => (e.DEFAULT = "default", e.STANDARD = "standard", e))(Bo || {}), Uo = ((e) => (e.FT_1X2 = "FT_1X2", e.HT_1X2 = "HT_1X2", e.BOTH_TEAMS_SCORE = "BOTH_TEAMS_SCORE", e.DOUBLE_CHANCE = "DOUBLE_CHANCE", e.HT_FT = "HT_FT", e.PLAYER_SCORE = "PLAYER_SCORE", e.PLAYER_YELLOW_CARD = "PLAYER_YELLOW_CARD", e.PLAYER_RED_CARD = "PLAYER_RED_CARD", e.RED_CARD_MATCH = "RED_CARD_MATCH", e.PENALTY_MATCH = "PENALTY_MATCH", e.PLAYER_SCORE_FIRST_GOAL = "PLAYER_SCORE_FIRST_GOAL", e.CORNERS_MATCH = "CORNERS_MATCH", e.CORRECT_SCORE = "CORRECT_SCORE", e.CORRECT_SCORE_ADVANCED = "CORRECT_SCORE_ADVANCED", e.CORRECT_SCORE_HT = "CORRECT_SCORE_HT", e.PLAYER_SCORE_HATTRICK = "PLAYER_SCORE_HATTRICK", e.PLAYER_SCORE_TWICE = "PLAYER_SCORE_TWICE", e.OVER_GOALS_0_5 = "OVER_GOALS_0_5", e.OVER_GOALS_1_5 = "OVER_GOALS_1_5", e.OVER_GOALS_2_5 = "OVER_GOALS_2_5", e.OVER_GOALS_3_5 = "OVER_GOALS_3_5", e.OVER_GOALS_4_5 = "OVER_GOALS_4_5", e.OVER_GOALS_5_5 = "OVER_GOALS_5_5", e.OVER_GOALS_6_5 = "OVER_GOALS_6_5", e.OVER_CORNERS_6_5 = "OVER_CORNERS_6_5", e.OVER_CORNERS_7_5 = "OVER_CORNERS_7_5", e.OVER_CORNERS_8_5 = "OVER_CORNERS_8_5", e.OVER_CORNERS_9_5 = "OVER_CORNERS_9_5", e.OVER_CORNERS_10_5 = "OVER_CORNERS_10_5", e.OVER_CORNERS_11_5 = "OVER_CORNERS_11_5", e.OVER_CORNERS_12_5 = "OVER_CORNERS_12_5", e.OVER_CORNERS_13_5 = "OVER_CORNERS_13_5", e))(Uo || {});
|
|
4038
|
+
function It(e) {
|
|
4039
|
+
this.message = e;
|
|
4040
|
+
}
|
|
4041
|
+
It.prototype = new Error(), It.prototype.name = "InvalidCharacterError";
|
|
4042
|
+
typeof window < "u" && window.atob && window.atob.bind(window);
|
|
4043
|
+
function Ot(e) {
|
|
4044
|
+
this.message = e;
|
|
4045
|
+
}
|
|
4046
|
+
Ot.prototype = new Error(), Ot.prototype.name = "InvalidTokenError";
|
|
4047
|
+
var Yo = ((e) => (e[e.BAD_METHOD_CALL = 400] = "BAD_METHOD_CALL", e[e.UNAUTHORIZED = 401] = "UNAUTHORIZED", e[e.NOT_FOUND = 404] = "NOT_FOUND", e[e.PRECONDITION_FAILED = 412] = "PRECONDITION_FAILED", e))(Yo || {}), $o = ((e) => (e.INVALID_TEMPLATE = "INVALID_TEMPLATE", e.INVALID_PREDICTION = "INVALID_PREDICTION", e.INVALID_MARKET = "INVALID_MARKET", e.INVALID_FIELD = "INVALID_FIELD", e.INVALID_TYPE = "INVALID_TYPE", e.EXCEEDED_LENGTH = "EXCEEDED_LENGTH", e.INVALID_TOKEN = "invalid_token", e.UNAUTHORIZED = "unauthorized", e.INVALID_FILTERS = "invalid_filters", e.INVALID_AVATAR = "invalid_avatar", e.INVALID_METHOD_CALL = "invalid_method_call", e.INVALID_LIMIT = "invalid_limit", e.INVALID_TEMPLATE_GROUP_ID = "invalid_template_group_id", e.INVALID_TEMPLATE_GROUP_FILTERS = "invalid_template_group_filters", e.INVALID_PAGE_NUMBER = "invalid_page_number", e.INVALID_DISCUSSION_IDS = "invalid_discussion_ids", e.ID_MAPPING_NOT_FOUND = "id_mapping_not_found", e.INVALID_COMPETITION_ID = "invalid_competition_id", e.INVALID_TEAM_ID = "invalid_team_id", e.INVALID_IDS = "invalid_ids", e.INVALID_INPUT_PROVIDER = "invalid_input_provider", e.INVALID_OUTPUT_PROVIDER = "invalid_output_provider", e.INVALID_MATCH_SUMMARY = "invalid_match_summary", e.INVALID_MATCH_SUMMARY_PREDICTIONS = "invalid_match_summary_predictions", e.INVALID_MATCH_SUMMARY_PREDICTIONS_KEYS = "invalid_match_summary_predictions_keys", e.ENTITY_IDS_NOT_FOUND = "entity_ids_not_found", e.MATCH_IDS_NOT_FOUND = "match_ids_not_found", e.INVALID_MATCH_IDS = "invalid_match_ids", e.ODD_CLIENT_CONFIGURATION_NOT_FOUND = "odd_client_configuration_not_found", e))($o || {}), z = { native: "id", sportradar: "sportradar_id", sportal365: "sportal365_id", enetpulse: "enetpulse_id", api_football: "api_football_id" };
|
|
4048
|
+
(/* @__PURE__ */ new Map()).set("FT_1X2", "fullTimeOneXTwo").set("HT_1X2", "halfTimeOneXTwo").set("BOTH_TEAMS_SCORE", "bothTeamsScore").set("DOUBLE_CHANCE", "doubleChance").set("HT_FT", "halfTimeFullTime").set("PLAYER_SCORE", "playerScore").set("PLAYER_YELLOW_CARD", "playerYellowCard").set("PLAYER_RED_CARD", "playerRedCard").set("RED_CARD_MATCH", "redCardMatch").set("PENALTY_MATCH", "penaltyMatch").set("PLAYER_SCORE_FIRST_GOAL", "playerScoreFirstGoal").set("CORNERS_MATCH", "cornersMatch").set("CORRECT_SCORE", "correctScore").set("CORRECT_SCORE_ADVANCED", "correctScoreAdvanced").set("CORRECT_SCORE_HT", "correctScoreHalfTime").set("PLAYER_SCORE_HATTRICK", "playerScoreHattrick").set("PLAYER_SCORE_TWICE", "playerScoreTwice").set("OVER_GOALS_0_5", "overZeroPointFiveGoals").set("OVER_GOALS_1_5", "overOnePointFiveGoals").set("OVER_GOALS_2_5", "overTwoPointFiveGoals").set("OVER_GOALS_3_5", "overThreePointFiveGoals").set("OVER_GOALS_4_5", "overFourPointFiveGoals").set("OVER_GOALS_5_5", "overFivePointFiveGoals").set("OVER_GOALS_6_5", "overSixPointFiveGoals").set("OVER_CORNERS_6_5", "overSixPointFiveCorners").set("OVER_CORNERS_7_5", "overSevenPointFiveCorners").set("OVER_CORNERS_8_5", "overEightPointFiveCorners").set("OVER_CORNERS_9_5", "overNinePointFiveCorners").set("OVER_CORNERS_10_5", "overTenPointFiveCorners").set("OVER_CORNERS_11_5", "overElevenPointFiveCorners").set("OVER_CORNERS_12_5", "overTwelvePointFiveCorners").set("OVER_CORNERS_13_5", "overThirteenPointFiveCorners");
|
|
4049
|
+
var Ko = ((e) => (e.INVALID_MATCH_ID = "Match id is invalid!", e.INVALID_PLAYER_ID = "Player id is invalid!", e.QUERY_PARAM_MATCH_IDS_EXCEEDED = "Maximum matchIds in PredictionFilters should be 10 or less.", e.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED = "Maximum limit for filtering games is 50 or less.", e.INVALID_FIXTURES_FIELD = "Fixtures field is invalid. For more information please visit our documentation", e.INVALID_TOKEN = "Invalid JWT token is provided", e.EXPIRED_TOKEN = "The provided JWT token is expired", e.ENTITIES_NEEDED = "At least one of footballCompetitions, footballTeams or footballPlayers properties should be provided for filters.", e.ENTITIES_FOLLOWS_FILTERS_EXCEEDED = "Maximum length per entity should be 24 or less.", e.INVALID_TYPE = "You have provided invalid type. The valid type is ", e.INVALID_VALUE = "You have provided invalid value. The valid value is ", e.INVALID_AVATAR = "Invalid URL syntax for avatar image.", e.INVALID_GET_PROFILES_METHOD_CALL = "The method 'getByIds' from Profile namespace is not called correctly. You need to provide 'profileIds' OR 'search' parameters to the method, but you can't use both of them or neither of them.", e.INVALID_LIMIT = "Invalid limit. The maximum limit is: ", e.INVALID_LIMIT_TYPE = "Invalid limit type. The proper type is number.", e.FILTER_COMBINATION_ERROR = "You need to use both 'entityIds' and 'entityType' filters together", e.INVALID_ENTITY_TYPE = "Invalid 'entityType' filter. Please use one of the following valid options: competition, team, or player", e.INVALID_TEMPLATE_GROUP_ID = "There is no group in this template with the provided groupId", e.INVALID_TEMPLATE_GROUP_FILTERS = "The provided template group has no filters", e.INVALID_PAGE_NUMBER = "Invalid page number provided. Use number between 1 and max number of pages.", e.INVALID_DISCUSSION_IDS = "Invalid discussion ids argument. Please provide at least one discussion id in an array", e.EXCEEDED_DISCUSSION_IDS = "Maximum number of discussion ids exceeded. The maximum number of discussion ids is 50. You can use 'getPostsCountExtended' method for more than 50 discussion ids.", e.EXCEEDED_EXTENDED_DISCUSSION_IDS = "Maximum number of discussion ids exceeded. The maximum number of discussion ids is: ", e.ID_MAPPING_NOT_FOUND = "No ID mappings are available for the provided ID. ID argument: ", e.INVALID_PARAM = "Invalid parameter provided. Please check the following parameter: ", e.INVALID_COMPETITION_ID = "Invalid competition ID provided. Please provide a valid competition ID.", e.INVALID_TEAM_ID = "Invalid team ID provided. Please provide a valid team ID.", e.INVALID_OR_EMPTY_IDS = "Invalid or empty IDs provided. Please provide at least one ID.", e.INVALID_PROVIDER = "Invalid provider. The valid providers are: 'native', 'enetpulse', 'sportal365', 'sportradar' and 'api_football'.", e.INVALID_OUTPUT_PROVIDER = "Invalid output provider. The output can not be the same as the input provider.", e.MATCH_SUMMARY_REQUIRED = "Match summary is required.", e.MATCH_SUMMARY_PREDICTIONS_REQUIRED = "Predictions in match summary are required.", e.INVALID_MATCH_SUMMARY_PREDICTIONS_KEYS = "Keys in predictions in match summary are invalid. The valid ones are: ", e.INVALID_COLLECT_LEAD_METHOD_CALL = "The method 'collectLead' from Profile namespace is not called correctly. You need to provide 'requestBody' parameter to the method.", e.REQUIRED_FIXTURES_FIELD = "Fixtures field is required and should contain at least one fixtures object. For more information please visit our documentation", e.INVALID_TIEBREAKER_FIELD = "Tiebreaker field is invalid. It should contain statTotal key with integer value. For more information please visit our documentation", e.ENTITY_IDS_NOT_FOUND = "Some of the sport entity IDs were not found for the provided id schema", e.MATCH_IDS_NOT_FOUND = "Some of the match IDs were not found for the provided id schema", e.INVALID_STANDING_PREDICTION_ARGUMENT = "The prediction argument is invalid. For more information please visit our documentation", e.INVALID_MAP_PLAYERS_ROLES_KEYS = "The keys in the players roles map are not part of the valid keys. The valid keys are: ", e.INVALID_MAP_PLAYERS_ROLES_VALUES = "The values in the map are not valid. The valid ones are: ", e.INVALID_MATCH_IDS = "Match IDs are invalid!", e.MISSING_ODD_CLIENT_CONFIGURATION = "Odds namespace requires oddClient configuration to be set", e.INVALID_COLLECT_CONSENTS_METHOD_CALL = "The method 'collectConsents' from Profile namespace is not called correctly. You need to provide 'consents' parameter to the method.", e))(Ko || {}), Xo = ((e) => (e.LIKE = "like", e.DISLIKE = "dislike", e.PAGE_VIEW = "page_view", e.CONTENT_CONSUMED = "content_consumed", e.SHARE = "share", e.COMMENT = "comment", e.CLICK_AD = "click_ad", e.PREDICTION_MADE = "prediction_made", e.CONVERT = "convert", e.MANAGE_INTERESTS = "manage_interests", e.GAME_PARTICIPATION = "game_participation", e.ARTICLE_CONSUMED = "article_consumed", e.VIDEO_CONSUMED = "video_consumed", e.SHORT_VIDEO_CONSUMED = "short_video_consumed", e.LONG_VIDEO_CONSUMED = "long_video_consumed", e.AUDIO_CONSUMED = "audio_consumed", e.GALLERY_CONSUMED = "gallery_consumed", e.IMAGE_CONSUMED = "image_consumed", e.POLL_PARTICIPATION = "poll_participation", e))(Xo || {}), Xe = "FansUnited", Me = { football: { ids: [], countries: [], competitions: [], expirations: { ids: 0 } }, profile: { info: {}, statistics: {}, badges: null, countries: [], expirations: { profile: 0, statistics: 0, badges: 0 } }, client: { features: {}, expirations: { features: 0 } } }, ye = class {
|
|
4050
|
+
constructor(e) {
|
|
4051
|
+
r(this, "idSchema", ""), r(this, "storageInstance", null), r(this, "expirationProfileTimeout", 600), r(this, "expirationBadgesTimeout", 3600), r(this, "expirationClientFeaturesTimeout", 14400), r(this, "expirationFootballIdsTimeout", 604800), r(this, "clearData", async () => {
|
|
4052
|
+
await this.setData(Me);
|
|
4053
|
+
}), r(this, "getCompetitions", async (t) => {
|
|
4054
|
+
let i = await this.getData();
|
|
4055
|
+
return t ? t.competitionSearchFilter(i.football.competitions) : i.football.competitions;
|
|
4056
|
+
}), r(this, "setCompetitions", async (t) => {
|
|
4057
|
+
let i = await this.getData(), o = [...i.football.competitions];
|
|
4058
|
+
o.push(...t), i.football.competitions = this.makeCompetitionsUnique(o), await this.setData(i);
|
|
4059
|
+
}), r(this, "getCompetitionsLength", async () => (await this.getData()).football.competitions.length), r(this, "getEntityById", async (t = "", i = "") => (await this.getData()).football.ids.find((o) => {
|
|
4060
|
+
let a = z[this.idSchema];
|
|
4061
|
+
return o && `${o[a]}` === i && o.resource === t;
|
|
4062
|
+
})), r(this, "getEntity", async (t, i, o) => {
|
|
4063
|
+
let a = await this.getData();
|
|
4064
|
+
return Array.isArray(t) ? a.football.ids.filter((s) => {
|
|
4065
|
+
let p = z[o];
|
|
4066
|
+
return s && t.includes(`${s[p]}`) && s.resource === i;
|
|
4067
|
+
}) : a.football.ids.find((s) => {
|
|
4068
|
+
let p = z[o];
|
|
4069
|
+
return s && `${s[p]}` === t && s.resource === i;
|
|
4070
|
+
});
|
|
4071
|
+
}), r(this, "checkForExistingIdObjs", async (t, i) => {
|
|
4072
|
+
let o = z[i], a = {};
|
|
4073
|
+
for (let s of Object.keys(t)) {
|
|
4074
|
+
let p = t[s], d = (await this.getEntity(p, s, i)).map((c) => c[o]), b = t[s].filter((c) => !d.includes(c));
|
|
4075
|
+
a[s] = p.map((c) => b.includes(c) ? { id: c, exists: !1 } : { id: c, exists: !0 });
|
|
4076
|
+
}
|
|
4077
|
+
return a;
|
|
4078
|
+
}), r(this, "getIdsByType", async (t, i, o) => {
|
|
4079
|
+
let a = await this.getData(), s = z[o], p = z[i], d = {};
|
|
4080
|
+
return Object.keys(t).forEach((b) => {
|
|
4081
|
+
let c = t[b], f = [];
|
|
4082
|
+
a.football.ids.forEach((x) => {
|
|
4083
|
+
c.forEach((v, g) => {
|
|
4084
|
+
v === x[p] && b === x.resource && (f[g] = x[s]);
|
|
4085
|
+
});
|
|
4086
|
+
}), d[b] = f;
|
|
4087
|
+
}), d;
|
|
4088
|
+
}), r(this, "addIdMapping", async (t) => {
|
|
4089
|
+
let i = await this.getData();
|
|
4090
|
+
i.football.ids.push(t), await this.setData(i);
|
|
4091
|
+
}), r(this, "addIdMappings", async (t) => {
|
|
4092
|
+
let i = await this.getData(), o = i.football.ids;
|
|
4093
|
+
o = [...o, ...t], i.football.ids = o, await this.setData(i);
|
|
4094
|
+
}), r(this, "addTopIdMappings", async (t) => {
|
|
4095
|
+
let i = await this.getData();
|
|
4096
|
+
if (i.football.ids.length) {
|
|
4097
|
+
let o = JSON.parse(JSON.stringify(i.football.ids));
|
|
4098
|
+
o = o.filter((a) => a.resource !== "match"), t = t.filter((a) => a.resource === "match"), o = [...o, ...t], i.football.ids = o;
|
|
4099
|
+
} else i.football.ids = t;
|
|
4100
|
+
i.football.expirations.ids = Math.floor(Date.now() / 1e3) + this.expirationFootballIdsTimeout, await this.setData(i);
|
|
4101
|
+
}), r(this, "setOwnProfile", async (t) => {
|
|
4102
|
+
let i = await this.getData();
|
|
4103
|
+
i.profile.info = t, i.profile.expirations.profile = Math.floor(Date.now() / 1e3) + this.expirationProfileTimeout, await this.setData(i);
|
|
4104
|
+
}), r(this, "getOwnProfile", async () => (await this.getData()).profile.info), r(this, "getProfileCountries", async () => (await this.getData()).profile.countries), r(this, "setProfileCountries", async (t) => {
|
|
4105
|
+
let i = await this.getData();
|
|
4106
|
+
i.profile.countries = t, await this.setData(i);
|
|
4107
|
+
}), r(this, "getProfileStats", async () => (await this.getData()).profile.statistics), r(this, "setProfileStats", async (t) => {
|
|
4108
|
+
let i = await this.getData();
|
|
4109
|
+
i.profile.statistics = t, i.profile.expirations.statistics = Math.floor(Date.now() / 1e3) + this.expirationProfileTimeout, await this.setData(i);
|
|
4110
|
+
}), r(this, "getProfileBadges", async () => (await this.getData()).profile.badges), r(this, "setProfileBadges", async (t) => {
|
|
4111
|
+
let i = await this.getData();
|
|
4112
|
+
i.profile.badges = t, i.profile.expirations.badges = Math.floor(Date.now() / 1e3) + this.expirationBadgesTimeout, await this.setData(i);
|
|
4113
|
+
}), r(this, "getFootballCountries", async () => (await this.getData()).football.countries), r(this, "setFootballCountries", async (t) => {
|
|
4114
|
+
let i = await this.getData();
|
|
4115
|
+
i.football.countries = t, await this.setData(i);
|
|
4116
|
+
}), r(this, "getClientFeatures", async () => (await this.getData()).client.features), r(this, "setClientFeatures", async (t) => {
|
|
4117
|
+
let i = await this.getData(), o = JSON.parse(JSON.stringify(t));
|
|
4118
|
+
i.client.expirations.features = Math.floor(Date.now() / 1e3) + this.expirationClientFeaturesTimeout, i.client.features = o, await this.setData(i);
|
|
4119
|
+
}), r(this, "deleteClientFeatures", async () => {
|
|
4120
|
+
let t = await this.getData(), i = JSON.parse(JSON.stringify(t));
|
|
4121
|
+
i.client = { features: {}, expirations: { features: 0 } }, await this.setData(i);
|
|
4122
|
+
}), r(this, "getExpiration", async (t, i) => {
|
|
4123
|
+
await this.initialNewSchema(t, "expirations");
|
|
4124
|
+
let o = await this.getData();
|
|
4125
|
+
switch (i) {
|
|
4126
|
+
case "profile":
|
|
4127
|
+
return o.profile.expirations.profile;
|
|
4128
|
+
case "statistics":
|
|
4129
|
+
return o.profile.expirations.statistics;
|
|
4130
|
+
case "badges":
|
|
4131
|
+
return o.profile.expirations.badges;
|
|
4132
|
+
case "features":
|
|
4133
|
+
return o.client.expirations.features;
|
|
4134
|
+
case "ids":
|
|
4135
|
+
return o.football.expirations.ids;
|
|
4136
|
+
}
|
|
4137
|
+
}), r(this, "makeCompetitionsUnique", (t) => {
|
|
4138
|
+
let i = /* @__PURE__ */ new Set();
|
|
4139
|
+
return t.filter((o) => {
|
|
4140
|
+
let a = !i.has(o.id);
|
|
4141
|
+
return i.add(o.id), a;
|
|
4142
|
+
});
|
|
4143
|
+
}), r(this, "initialNewSchema", async (t, i) => {
|
|
4144
|
+
let o = await this.getData();
|
|
4145
|
+
(!o || !o[t] || !o[t][i]) && await this.setData(Me);
|
|
4146
|
+
}), this.idSchema = e, this.getStorageInstance();
|
|
4147
|
+
}
|
|
4148
|
+
static getInstance(e) {
|
|
4149
|
+
return ye.instance || (ye.instance = new ye(e)), ye.instance;
|
|
4150
|
+
}
|
|
4151
|
+
async getStorageInstance() {
|
|
4152
|
+
try {
|
|
4153
|
+
let e = await Promise.resolve().then(() => (jo(), Vt));
|
|
4154
|
+
this.storageInstance = e.default;
|
|
4155
|
+
} catch (e) {
|
|
4156
|
+
console.error(e);
|
|
4157
|
+
}
|
|
4158
|
+
}
|
|
4159
|
+
async getData() {
|
|
4160
|
+
try {
|
|
4161
|
+
let e = await this.storageInstance.getItem(Xe);
|
|
4162
|
+
return e ? JSON.parse(e) : (await this.storageInstance.setItem(Xe, JSON.stringify(Me)), Me);
|
|
4163
|
+
} catch (e) {
|
|
4164
|
+
throw console.error("AsyncStorage error:", e), e;
|
|
4165
|
+
}
|
|
4166
|
+
}
|
|
4167
|
+
async setData(e) {
|
|
4168
|
+
await this.storageInstance.setItem(Xe, JSON.stringify(e));
|
|
4169
|
+
}
|
|
4170
|
+
}, Jo = ye;
|
|
4171
|
+
J(Jo, "instance");
|
|
4172
|
+
var Je = "FansUnited", qe = { football: { ids: [], countries: [], competitions: [], expirations: { ids: 0 } }, profile: { info: {}, statistics: {}, badges: null, countries: [], expirations: { profile: 0, statistics: 0, badges: 0 } }, client: { features: {}, expirations: { features: 0 } } }, be = class {
|
|
4173
|
+
constructor(e) {
|
|
4174
|
+
r(this, "idSchema", ""), r(this, "expirationProfileTimeout", 600), r(this, "expirationBadgesTimeout", 3600), r(this, "expirationClientFeaturesTimeout", 14400), r(this, "expirationFootballIdsTimeout", 604800), r(this, "clearData", async () => {
|
|
4175
|
+
this.setData(qe);
|
|
4176
|
+
}), r(this, "getEntityById", async (t = "", i = "") => this.getData().football.ids.find((o) => {
|
|
4177
|
+
let a = z[this.idSchema];
|
|
4178
|
+
return o && `${o[a]}` === i && o.resource === t;
|
|
4179
|
+
})), r(this, "getEntity", (t, i, o) => Array.isArray(t) ? this.getData().football.ids.filter((a) => {
|
|
4180
|
+
let s = z[o];
|
|
4181
|
+
return a && t.includes(`${a[s]}`) && a.resource === i;
|
|
4182
|
+
}) : this.getData().football.ids.find((a) => {
|
|
4183
|
+
let s = z[o];
|
|
4184
|
+
return a && `${a[s]}` === t && a.resource === i;
|
|
4185
|
+
})), r(this, "getEntityByNativeId", (t = "", i = "") => this.getData().football.ids.find((o) => o && `${o.id}` === i && o.resource === t)), r(this, "checkForExistingIdObjs", async (t, i) => {
|
|
4186
|
+
let o = z[i], a = {};
|
|
4187
|
+
return Object.keys(t).forEach((s) => {
|
|
4188
|
+
let p = t[s], d = this.getEntity(p, s, i).map((c) => c[o]), b = t[s].filter((c) => !d.includes(c));
|
|
4189
|
+
a[s] = p.map((c) => b.includes(c) ? { id: c, exists: !1 } : { id: c, exists: !0 });
|
|
4190
|
+
}), a;
|
|
4191
|
+
}), r(this, "getIdsByType", async (t, i, o) => {
|
|
4192
|
+
let a = z[o], s = z[i], p = {};
|
|
4193
|
+
return Object.keys(t).forEach((d) => {
|
|
4194
|
+
let b = t[d], c = [];
|
|
4195
|
+
this.getData().football.ids.forEach((f) => {
|
|
4196
|
+
b.forEach((x, v) => {
|
|
4197
|
+
x === f[s] && d === f.resource && (c[v] = f[a]);
|
|
4198
|
+
});
|
|
4199
|
+
}), p[d] = c;
|
|
4200
|
+
}), p;
|
|
4201
|
+
}), r(this, "addIdMapping", (t) => {
|
|
4202
|
+
let i = this.getData();
|
|
4203
|
+
i.football.ids.push(t), this.setData(i);
|
|
4204
|
+
}), r(this, "addIdMappings", async (t) => {
|
|
4205
|
+
let i = this.getData(), o = i.football.ids;
|
|
4206
|
+
o = [...o, ...t], i.football.ids = o, this.setData(i);
|
|
4207
|
+
}), r(this, "addTopIdMappings", async (t) => {
|
|
4208
|
+
let i = this.getData();
|
|
4209
|
+
if (i.football.ids.length) {
|
|
4210
|
+
let o = JSON.parse(JSON.stringify(i.football.ids));
|
|
4211
|
+
o = o.filter((a) => a.resource !== "match"), t = t.filter((a) => a.resource === "match"), o = [...o, ...t], i.football.ids = o;
|
|
4212
|
+
} else i.football.ids = t;
|
|
4213
|
+
i.football.expirations.ids = Math.floor(Date.now() / 1e3) + this.expirationFootballIdsTimeout, this.setData(i);
|
|
4214
|
+
}), r(this, "setOwnProfile", async (t) => {
|
|
4215
|
+
let i = this.getData();
|
|
4216
|
+
i.profile.info = t, i.profile.expirations.profile = Math.floor(Date.now() / 1e3) + this.expirationProfileTimeout, this.setData(i);
|
|
4217
|
+
}), r(this, "getOwnProfile", () => this.getData().profile.info), r(this, "getProfileCountries", () => this.getData().profile.countries), r(this, "setProfileCountries", async (t) => {
|
|
4218
|
+
let i = this.getData();
|
|
4219
|
+
i.profile.countries = t, this.setData(i);
|
|
4220
|
+
}), r(this, "getProfileStats", () => this.getData().profile.statistics), r(this, "setProfileStats", async (t) => {
|
|
4221
|
+
let i = this.getData();
|
|
4222
|
+
i.profile.statistics = t, i.profile.expirations.statistics = Math.floor(Date.now() / 1e3) + this.expirationProfileTimeout, this.setData(i);
|
|
4223
|
+
}), r(this, "getProfileBadges", () => this.getData().profile.badges), r(this, "setProfileBadges", async (t) => {
|
|
4224
|
+
let i = this.getData();
|
|
4225
|
+
i.profile.badges = t, i.profile.expirations.badges = Math.floor(Date.now() / 1e3) + this.expirationBadgesTimeout, this.setData(i);
|
|
4226
|
+
}), r(this, "getFootballCountries", () => this.getData().football.countries), r(this, "setFootballCountries", async (t) => {
|
|
4227
|
+
let i = this.getData();
|
|
4228
|
+
i.football.countries = t, this.setData(i);
|
|
4229
|
+
}), r(this, "getCompetitions", (t) => {
|
|
4230
|
+
let i = this.getData();
|
|
4231
|
+
return t ? t.competitionSearchFilter(i.football.competitions) : i.football.competitions;
|
|
4232
|
+
}), r(this, "setCompetitions", async (t) => {
|
|
4233
|
+
let i = this.getData(), o = [...i.football.competitions];
|
|
4234
|
+
o.push(...t), i.football.competitions = this.makeCompetitionsUnique(o), this.setData(i);
|
|
4235
|
+
}), r(this, "getCompetitionsLength", async () => {
|
|
4236
|
+
let { football: t } = this.getData();
|
|
4237
|
+
return t.competitions.length;
|
|
4238
|
+
}), r(this, "getClientFeatures", () => this.getData().client.features), r(this, "setClientFeatures", async (t) => {
|
|
4239
|
+
let i = this.getData(), o = JSON.parse(JSON.stringify(t));
|
|
4240
|
+
i.client.expirations.features = Math.floor(Date.now() / 1e3) + this.expirationClientFeaturesTimeout, i.client.features = o, this.setData(i);
|
|
4241
|
+
}), r(this, "deleteClientFeatures", async () => {
|
|
4242
|
+
let t = this.getData(), i = JSON.parse(JSON.stringify(t));
|
|
4243
|
+
i.client = { features: {}, expirations: { features: 0 } }, this.setData(i);
|
|
4244
|
+
}), r(this, "getExpiration", async (t, i) => {
|
|
4245
|
+
this.initialNewSchema(t, "expirations");
|
|
4246
|
+
let o = this.getData();
|
|
4247
|
+
switch (i) {
|
|
4248
|
+
case "profile":
|
|
4249
|
+
return o.profile.expirations.profile;
|
|
4250
|
+
case "statistics":
|
|
4251
|
+
return o.profile.expirations.statistics;
|
|
4252
|
+
case "badges":
|
|
4253
|
+
return o.profile.expirations.badges;
|
|
4254
|
+
case "features":
|
|
4255
|
+
return o.client.expirations.features;
|
|
4256
|
+
case "ids":
|
|
4257
|
+
return o.football.expirations.ids;
|
|
4258
|
+
}
|
|
4259
|
+
}), r(this, "makeCompetitionsUnique", (t) => {
|
|
4260
|
+
let i = /* @__PURE__ */ new Set();
|
|
4261
|
+
return t.filter((o) => {
|
|
4262
|
+
let a = !i.has(o.id);
|
|
4263
|
+
return i.add(o.id), a;
|
|
4264
|
+
});
|
|
4265
|
+
}), r(this, "getData", () => (localStorage.getItem(Je) || this.setData(qe), JSON.parse(localStorage.getItem(Je)))), r(this, "setData", (t) => {
|
|
4266
|
+
localStorage.setItem(Je, JSON.stringify(t));
|
|
4267
|
+
}), r(this, "initialNewSchema", (t, i) => {
|
|
4268
|
+
let o = this.getData();
|
|
4269
|
+
(!o || !o[t] || !o[t][i]) && this.setData(qe);
|
|
4270
|
+
}), this.idSchema = e;
|
|
4271
|
+
}
|
|
4272
|
+
static getInstance(e) {
|
|
4273
|
+
return be.instance || (be.instance = new be(e)), be.instance;
|
|
4274
|
+
}
|
|
4275
|
+
}, qo = be;
|
|
4276
|
+
J(qo, "instance");
|
|
4277
|
+
var Qo = Mo(Ho()), j = class {
|
|
4278
|
+
constructor(e) {
|
|
4279
|
+
r(this, "profileTTL", 600), r(this, "clientTTL", 14400), r(this, "profileBadgesTTL", 3600), r(this, "idMappingsExpiration", 0), r(this, "idSchema", ""), r(this, "clearData", async () => j.nodeCache.flushAll()), r(this, "getEntityById", async (t, i) => {
|
|
4280
|
+
let o = j.nodeCache.get("ids");
|
|
4281
|
+
return o ? o.find((a) => {
|
|
4282
|
+
let s = z[this.idSchema];
|
|
4283
|
+
return a && `${a[s]}` === i && a.resource === t;
|
|
4284
|
+
}) : null;
|
|
4285
|
+
}), r(this, "getEntity", async (t, i, o) => {
|
|
4286
|
+
let a = j.nodeCache.get("ids");
|
|
4287
|
+
return a ? Array.isArray(t) ? [] : null : Array.isArray(t) ? a.filter((s) => {
|
|
4288
|
+
let p = z[o];
|
|
4289
|
+
return s && t.includes(`${s[p]}`) && s.resource === i;
|
|
4290
|
+
}) : a.find((s) => {
|
|
4291
|
+
let p = z[o];
|
|
4292
|
+
return s && `${s[p]}` === t && s.resource === i;
|
|
4293
|
+
});
|
|
4294
|
+
}), r(this, "checkForExistingIdObjs", async (t, i) => {
|
|
4295
|
+
let o = z[i], a = {};
|
|
4296
|
+
for (let s of Object.keys(t)) {
|
|
4297
|
+
let p = t[s], d = (await this.getEntity(p, s, i)).map((c) => c[o]), b = t[s].filter((c) => !d.includes(c));
|
|
4298
|
+
a[s] = p.map((c) => b.includes(c) ? { id: c, exists: !1 } : { id: c, exists: !0 });
|
|
4299
|
+
}
|
|
4300
|
+
return a;
|
|
4301
|
+
}), r(this, "getIdsByType", async (t, i, o) => {
|
|
4302
|
+
let a = z[o], s = z[i], p = j.nodeCache.get("ids"), d = {};
|
|
4303
|
+
return p ? (Object.keys(t).forEach((b) => {
|
|
4304
|
+
let c = t[b], f = [];
|
|
4305
|
+
p.forEach((x) => {
|
|
4306
|
+
c.forEach((v, g) => {
|
|
4307
|
+
v === x[s] && b === x.resource && (f[g] = x[a]);
|
|
4308
|
+
});
|
|
4309
|
+
}), d[b] = f;
|
|
4310
|
+
}), d) : null;
|
|
4311
|
+
}), r(this, "addIdMapping", async (t) => {
|
|
4312
|
+
let i = j.nodeCache.get("ids");
|
|
4313
|
+
i.push(t), j.nodeCache.set("ids", i);
|
|
4314
|
+
}), r(this, "addIdMappings", async (t) => {
|
|
4315
|
+
let i = j.nodeCache.get("ids");
|
|
4316
|
+
i = [...i, ...t], j.nodeCache.set("ids", i);
|
|
4317
|
+
}), r(this, "addTopIdMappings", async (t) => {
|
|
4318
|
+
let i = j.nodeCache.get("ids"), o = 604800;
|
|
4319
|
+
if (i) {
|
|
4320
|
+
let a = JSON.parse(JSON.stringify(i));
|
|
4321
|
+
a = a.filter((s) => s.resource !== "match"), t = t.filter((s) => s.resource === "match"), a = [...a, ...t], j.nodeCache.set("ids", a);
|
|
4322
|
+
} else j.nodeCache.set("ids", t);
|
|
4323
|
+
this.idMappingsExpiration = Math.floor(Date.now() / 1e3) + o;
|
|
4324
|
+
}), r(this, "setOwnProfile", async (t) => {
|
|
4325
|
+
j.nodeCache.set("profile", t, this.profileTTL);
|
|
4326
|
+
}), r(this, "getOwnProfile", async () => j.nodeCache.get("profile")), r(this, "getProfileCountries", async () => j.nodeCache.get("profile_countries")), r(this, "setProfileCountries", async (t) => {
|
|
4327
|
+
j.nodeCache.set("profile_countries", t);
|
|
4328
|
+
}), r(this, "getProfileStats", async () => j.nodeCache.get("profile_stats")), r(this, "setProfileStats", async (t) => {
|
|
4329
|
+
j.nodeCache.set("profile_stats", t, this.profileTTL);
|
|
4330
|
+
}), r(this, "getProfileBadges", async () => j.nodeCache.get("profile_badges")), r(this, "setProfileBadges", async (t) => {
|
|
4331
|
+
j.nodeCache.set("profile_badges", t, this.profileBadgesTTL);
|
|
4332
|
+
}), r(this, "getFootballCountries", async () => j.nodeCache.get("football_countries")), r(this, "setFootballCountries", async (t) => {
|
|
4333
|
+
j.nodeCache.set("football_countries", t);
|
|
4334
|
+
}), r(this, "getCompetitions", async (t) => {
|
|
4335
|
+
let i = j.nodeCache.get("football_competitions");
|
|
4336
|
+
return i ? t ? t.competitionSearchFilter(i) : i : null;
|
|
4337
|
+
}), r(this, "setCompetitions", async (t) => {
|
|
4338
|
+
j.nodeCache.set("football_competitions", t);
|
|
4339
|
+
}), r(this, "getCompetitionsLength", async () => {
|
|
4340
|
+
let t = j.nodeCache.get("football_competitions");
|
|
4341
|
+
return t ? t.length : 0;
|
|
4342
|
+
}), r(this, "getClientFeatures", async () => j.nodeCache.get("client")), r(this, "setClientFeatures", async (t) => {
|
|
4343
|
+
j.nodeCache.set("client", t, this.clientTTL);
|
|
4344
|
+
}), r(this, "deleteClientFeatures", async () => {
|
|
4345
|
+
j.nodeCache.del("client");
|
|
4346
|
+
}), r(this, "getExpiration", async (t, i) => {
|
|
4347
|
+
let o = this.getKeyFromExpirationType(i);
|
|
4348
|
+
return o === "ids" ? this.idMappingsExpiration : j.nodeCache.getTtl(o);
|
|
4349
|
+
}), r(this, "getKeyFromExpirationType", (t) => {
|
|
4350
|
+
switch (t) {
|
|
4351
|
+
case "profile":
|
|
4352
|
+
return "profile";
|
|
4353
|
+
case "statistics":
|
|
4354
|
+
return "profile_stats";
|
|
4355
|
+
case "badges":
|
|
4356
|
+
return "profile_badges";
|
|
4357
|
+
case "features":
|
|
4358
|
+
return "client";
|
|
4359
|
+
case "ids":
|
|
4360
|
+
return "ids";
|
|
4361
|
+
}
|
|
4362
|
+
});
|
|
4363
|
+
}
|
|
4364
|
+
static getInstance(e) {
|
|
4365
|
+
return j.instance || (j.instance = new j(e), j.nodeCache.options.useClones = !1), j.instance;
|
|
4366
|
+
}
|
|
4367
|
+
}, Dt = j;
|
|
4368
|
+
J(Dt, "instance"), J(Dt, "nodeCache", new Qo.default());
|
|
4369
|
+
var Zo = ((e) => (e.ACTIVE = "ACTIVE", e.WON = "WON", e.LOST = "LOST", e.PARTIALLY_WON = "PARTIALLY_WON", e.CANCELED = "CANCELED", e))(Zo || {}), en = ((e) => (e.ACTIVE = "ACTIVE", e.WON = "WON", e.LOST = "LOST", e.PARTIALLY_WON = "PARTIALLY_WON", e.CANCELED = "CANCELED", e))(en || {}), Pn = class {
|
|
4370
|
+
constructor() {
|
|
4371
|
+
r(this, "id", null), r(this, "title", null), r(this, "description", null), r(this, "images", null), r(this, "rules", null), r(this, "customFields", null), r(this, "type", "EVENT"), r(this, "status", null), r(this, "related", []), r(this, "tiebreaker", null), r(this, "predictionsCutoff", null), r(this, "fixtures", []), r(this, "createdAt", null), r(this, "updatedAt", null);
|
|
4372
|
+
}
|
|
4373
|
+
}, tn = ((e) => (e.BOOLEAN = "BOOLEAN", e.NUMBER = "NUMBER", e.ENUM = "ENUM", e.FREE_INPUT = "FREE_INPUT", e))(tn || {}), on = ((e) => (e.PARTICIPANT_ONE = "PARTICIPANT_ONE", e.PARTICIPANT_TWO = "PARTICIPANT_TWO", e.DRAW = "DRAW", e))(on || {}), nn = ((e) => (e.OPEN = "OPEN", e.LIVE = "LIVE", e.PENDING = "PENDING", e.CANCELED = "CANCELED", e.CLOSED = "CLOSED", e.SETTLED = "SETTLED", e))(nn || {}), Mn = class {
|
|
4374
|
+
constructor() {
|
|
4375
|
+
r(this, "fixtures", []), r(this, "tiebreaker");
|
|
4376
|
+
}
|
|
4377
|
+
}, st = class {
|
|
4378
|
+
constructor() {
|
|
4379
|
+
r(this, "main", null), r(this, "cover", null), r(this, "mobile", null);
|
|
4380
|
+
}
|
|
4381
|
+
}, rn = class {
|
|
4382
|
+
constructor() {
|
|
4383
|
+
r(this, "timeTiebreaker", !1);
|
|
4384
|
+
}
|
|
4385
|
+
}, an = class {
|
|
4386
|
+
constructor() {
|
|
4387
|
+
r(this, "id", null), r(this, "title", null), r(this, "alternativeTitle", null), r(this, "description", null), r(this, "type", null), r(this, "images", new st()), r(this, "participationCount", null), r(this, "questionsCount", null), r(this, "status", null), r(this, "language", null), r(this, "authRequirement", null), r(this, "flags", null), r(this, "customFields", null), r(this, "labels", null), r(this, "branding", null), r(this, "related", []), r(this, "time", null), r(this, "points", null), r(this, "scored", !1), r(this, "maxAttempts", null), r(this, "averageScore", null), r(this, "perfectScore", null), r(this, "adContent", null), r(this, "context", null), r(this, "createdAt", null), r(this, "updatedAt", null);
|
|
4388
|
+
}
|
|
4389
|
+
}, jn = class extends an {
|
|
4390
|
+
constructor() {
|
|
4391
|
+
super(...arguments), r(this, "rules", null), r(this, "questions", []);
|
|
4392
|
+
}
|
|
4393
|
+
}, kn = class {
|
|
4394
|
+
constructor() {
|
|
4395
|
+
r(this, "classicQuizId", null), r(this, "classicQuizModel", null), r(this, "correct", null), r(this, "classicQuizQuestions", null), r(this, "personalBest", null), r(this, "points", null), r(this, "answers", []), r(this, "attempts", 0);
|
|
4396
|
+
}
|
|
4397
|
+
}, sn = ((e) => (e.PRE_EVENT = "PRE_EVENT", e.LIVE = "LIVE", e.ALL = "ALL", e))(sn || {}), ln = ((e) => (e.ORDINARY_TIME = "ORDINARY_TIME", e.FULL_TIME = "FULL_TIME", e))(ln || {}), cn = ((e) => (e.DECIMAL = "DECIMAL", e.MONEYLINE = "MONEYLINE", e.FRACTIONAL = "FRACTIONAL", e))(cn || {}), dn = ((e) => (e.FT_1X2 = "FT_1X2", e.DOUBLE_CHANCE = "DOUBLE_CHANCE", e.HT_FT = "HT_FT", e.BOTH_TEAMS_SCORE = "BOTH_TEAMS_SCORE", e.CORRECT_SCORE = "CORRECT_SCORE", e.PLAYER_SCORE_FIRST_GOAL = "PLAYER_SCORE_FIRST_GOAL", e.PLAYER_SCORE = "PLAYER_SCORE", e.PLAYER_RED_CARD = "PLAYER_RED_CARD", e.PLAYER_YELLOW_CARD = "PLAYER_YELLOW_CARD", e.OVER_GOALS_0_5 = "OVER_GOALS_0_5", e.OVER_GOALS_1_5 = "OVER_GOALS_1_5", e.OVER_GOALS_2_5 = "OVER_GOALS_2_5", e.OVER_GOALS_3_5 = "OVER_GOALS_3_5", e.OVER_GOALS_4_5 = "OVER_GOALS_4_5", e.OVER_GOALS_5_5 = "OVER_GOALS_5_5", e))(dn || {}), Fn = class {
|
|
4398
|
+
constructor() {
|
|
4399
|
+
r(this, "gameInstanceId", null), r(this, "fixtures", null);
|
|
4400
|
+
}
|
|
4401
|
+
}, un = ((e) => (e.ACTIVE = "ACTIVE", e.WON = "WON", e.LOST = "LOST", e.PARTIALLY_WON = "PARTIALLY_WON", e.CANCELED = "CANCELED", e))(un || {}), hn = class {
|
|
4402
|
+
constructor() {
|
|
4403
|
+
r(this, "id", null), r(this, "title", null), r(this, "description", null), r(this, "type", null), r(this, "status", null), r(this, "authRequirement", null), r(this, "scheduleOpenAt", null), r(this, "predictionsCutoff", null), r(this, "fixtures", []), r(this, "tiebreaker", new rn()), r(this, "participantsCount", 0), r(this, "related", []), r(this, "excludedProfileIds", null), r(this, "rules", null), r(this, "labels", null), r(this, "customFields", null), r(this, "branding", null), r(this, "flags", null), r(this, "images", new st()), r(this, "createdAt", null), r(this, "updatedAt", null);
|
|
4404
|
+
}
|
|
4405
|
+
}, Vn = class extends hn {
|
|
4406
|
+
constructor() {
|
|
4407
|
+
super(...arguments), r(this, "adContent", null);
|
|
4408
|
+
}
|
|
4409
|
+
}, pn = class {
|
|
4410
|
+
constructor() {
|
|
4411
|
+
r(this, "id", null), r(this, "title", null), r(this, "alternativeTitle", null), r(this, "description", null), r(this, "type", null), r(this, "images", new st()), r(this, "status", null), r(this, "language", null), r(this, "authRequirement", null), r(this, "totalVotes", null), r(this, "flags", []), r(this, "customFields", null), r(this, "branding", null), r(this, "embedCode", null), r(this, "labels", null), r(this, "adContent", null), r(this, "context", null), r(this, "options", []), r(this, "related", []), r(this, "preferencesEnabled", !1), r(this, "multipleChoice", !1), r(this, "maxMultipleChoiceOptions", null), r(this, "participationCount", 0), r(this, "maxAttempts", 0), r(this, "externalActivity", null), r(this, "createdAt", null), r(this, "updatedAt", null);
|
|
4412
|
+
}
|
|
4413
|
+
}, Hn = class extends pn {
|
|
4414
|
+
constructor() {
|
|
4415
|
+
super(...arguments), r(this, "rules", null);
|
|
4416
|
+
}
|
|
4417
|
+
}, fn = class {
|
|
4418
|
+
constructor() {
|
|
4419
|
+
r(this, "id", null), r(this, "pollId", null), r(this, "optionId", null), r(this, "optionIds", []), r(this, "userId", null), r(this, "createdAt", null);
|
|
4420
|
+
}
|
|
4421
|
+
}, zn = class extends fn {
|
|
4422
|
+
constructor() {
|
|
4423
|
+
super(...arguments), r(this, "previousVotes", []), r(this, "attempts", null);
|
|
4424
|
+
}
|
|
4425
|
+
}, mn = ((e) => (e.LIKE = "like", e.DISLIKE = "dislike", e.SHARE = "share", e.COMMENT = "comment", e.PREDICTION_MADE = "prediction_made", e))(mn || {}), gn = ((e) => (e.CORRECT = "CORRECT", e.INCORRECT = "INCORRECT", e.PARTIALLY_CORRECT = "PARTIALLY_CORRECT", e.NOT_VERIFIED = "NOT_VERIFIED", e))(gn || {}), xn = ((e) => (e.ONE = "1", e.X = "x", e.TWO = "2", e))(xn || {}), yn = ((e) => (e.ONE_X = "1x", e.X_TWO = "x2", e.ONE_TWO = "12", e))(yn || {}), bn = ((e) => (e.ONE_ONE = "1/1", e.ONE_X = "1/x", e.ONE_TWO = "1/2", e.X_ONE = "x/1", e.X_X = "x/x", e.X_TWO = "x/2", e.TWO_ONE = "2/1", e.TWO_X = "2/x", e.TWO_TWO = "2/2", e))(bn || {}), vn = ((e) => (e.NONE = "none", e.FINISHED = "finished", e.CANCELLED = "cancelled", e.POSTPONED = "postponed", e.NOT_STARTED = "not_started", e.FIRST_HALF = "1st_half", e.SECOND_HALF = "2nd_half", e.FINISHED_AFTER_AWARDED_WIN = "finished_after_awarded_win", e.TO_FINISH = "to_finish", e.FINISHED_AET = "finished_aet", e.HALFTIME = "halftime", e.FINISHED_AP = "finished_ap", e.INTERRUPTED = "interrupted", e.KICK_OFF_DELAYED = "kick_off_delayed", e.ABANDONED = "abandoned", e.WAITING_FOR_PENALTY = "waiting_for_penalty", e.PENALTY = "penalty", e.PAUSE = "pause", e.EXTRA_TIME_1ST_HALF = "extra_time_1st_half", e.EXTRA_TIME_END_OF_1ST_HALF = "extra_time_end_of_1st_half", e.EXTRA_TIME_2ND_HALF = "extra_time_2nd_half", e.WAITING_FOR_EXTRA_TIME = "waiting_for_extra_time", e.NO_INFO_YET = "no_info_yet", e.AWAITING_INFO = "awaiting_info", e.FINISHED_ASG = "finished_asg", e))(vn || {}), et = class {
|
|
4426
|
+
constructor() {
|
|
4427
|
+
}
|
|
4428
|
+
static createMatchMarketsResultsModel(e, t) {
|
|
4429
|
+
var i, o, a, s, p, d, b, c, f, x, v, g, y, R, O, A, T, S, I, L, l, h, u, _, C, E, N, P, M, F, se, Z, $, G, K, ne;
|
|
4430
|
+
return { FT_1X2: this.createOneXTwoResult(e.scores, "full_time"), HT_1X2: this.createOneXTwoResult(e.scores, "half_time"), BOTH_TEAMS_SCORE: e.scores.ftScore.homeGoals > 0 && e.scores.ftScore.awayGoals > 0, DOUBLE_CHANCE: this.createDoubleChanceResult(e.scores), HT_FT: this.createHalfTimeFullTimeResult(e.scores), RED_CARD_MATCH: this.createMarketResultByCriteria(e, "red_card"), PENALTY_MATCH: this.createMarketResultByCriteria(e, "penalty"), CORNERS_MATCH: isNaN(((o = (i = e.stats) == null ? void 0 : i.corners) == null ? void 0 : o.homeTeam) + ((s = (a = e.stats) == null ? void 0 : a.corners) == null ? void 0 : s.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam, PLAYER_YELLOW_CARD: this.createPlayersMarketsResults(e, t, "yellow_card"), PLAYER_RED_CARD: this.createPlayersMarketsResults(e, t, "red_card"), PLAYER_SCORE_FIRST_GOAL: this.createPlayersMarketsResults(e, t, "first_goal"), PLAYER_SCORE: this.createPlayersMarketsResults(e, t, "one_goal"), PLAYER_SCORE_TWICE: this.createPlayersMarketsResults(e, t, "two_goals"), PLAYER_SCORE_HATTRICK: this.createPlayersMarketsResults(e, t, "hattrick"), CORRECT_SCORE: { homeGoals: e.scores.ftScore.homeGoals, awayGoals: e.scores.ftScore.awayGoals }, CORRECT_SCORE_ADVANCED: { homeGoals: e.scores.ftScore.homeGoals, awayGoals: e.scores.ftScore.awayGoals }, CORRECT_SCORE_HT: { homeGoals: e.scores.htScore.homeGoals, awayGoals: e.scores.htScore.awayGoals }, OVER_GOALS_0_5: e.scores.ftScore.homeGoals + e.scores.ftScore.awayGoals > 0, OVER_GOALS_1_5: e.scores.ftScore.homeGoals + e.scores.ftScore.awayGoals > 1, OVER_GOALS_2_5: e.scores.ftScore.homeGoals + e.scores.ftScore.awayGoals > 2, OVER_GOALS_3_5: e.scores.ftScore.homeGoals + e.scores.ftScore.awayGoals > 3, OVER_GOALS_4_5: e.scores.ftScore.homeGoals + e.scores.ftScore.awayGoals > 4, OVER_GOALS_5_5: e.scores.ftScore.homeGoals + e.scores.ftScore.awayGoals > 5, OVER_GOALS_6_5: e.scores.ftScore.homeGoals + e.scores.ftScore.awayGoals > 6, OVER_CORNERS_6_5: isNaN(((d = (p = e.stats) == null ? void 0 : p.corners) == null ? void 0 : d.homeTeam) + ((c = (b = e.stats) == null ? void 0 : b.corners) == null ? void 0 : c.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 6, OVER_CORNERS_7_5: isNaN(((x = (f = e.stats) == null ? void 0 : f.corners) == null ? void 0 : x.homeTeam) + ((g = (v = e.stats) == null ? void 0 : v.corners) == null ? void 0 : g.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 7, OVER_CORNERS_8_5: isNaN(((R = (y = e.stats) == null ? void 0 : y.corners) == null ? void 0 : R.homeTeam) + ((A = (O = e.stats) == null ? void 0 : O.corners) == null ? void 0 : A.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 8, OVER_CORNERS_9_5: isNaN(((S = (T = e.stats) == null ? void 0 : T.corners) == null ? void 0 : S.homeTeam) + ((L = (I = e.stats) == null ? void 0 : I.corners) == null ? void 0 : L.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 9, OVER_CORNERS_10_5: isNaN(((h = (l = e.stats) == null ? void 0 : l.corners) == null ? void 0 : h.homeTeam) + ((_ = (u = e.stats) == null ? void 0 : u.corners) == null ? void 0 : _.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 10, OVER_CORNERS_11_5: isNaN(((E = (C = e.stats) == null ? void 0 : C.corners) == null ? void 0 : E.homeTeam) + ((P = (N = e.stats) == null ? void 0 : N.corners) == null ? void 0 : P.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 11, OVER_CORNERS_12_5: isNaN(((F = (M = e.stats) == null ? void 0 : M.corners) == null ? void 0 : F.homeTeam) + ((Z = (se = e.stats) == null ? void 0 : se.corners) == null ? void 0 : Z.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 12, OVER_CORNERS_13_5: isNaN(((G = ($ = e.stats) == null ? void 0 : $.corners) == null ? void 0 : G.homeTeam) + ((ne = (K = e.stats) == null ? void 0 : K.corners) == null ? void 0 : ne.awayTeam)) ? null : e.stats.corners.homeTeam + e.stats.corners.awayTeam > 13 };
|
|
4431
|
+
}
|
|
4432
|
+
}, he = et;
|
|
4433
|
+
J(he, "createOneXTwoResult", (e, t) => {
|
|
4434
|
+
var i, o, a, s;
|
|
4435
|
+
return t === "full_time" ? e.ftScore.homeGoals > e.ftScore.awayGoals ? "1" : e.ftScore.homeGoals === e.ftScore.awayGoals ? "x" : "2" : ((i = e == null ? void 0 : e.htScore) == null ? void 0 : i.homeGoals) > ((o = e == null ? void 0 : e.htScore) == null ? void 0 : o.awayGoals) ? "1" : ((a = e == null ? void 0 : e.htScore) == null ? void 0 : a.homeGoals) === ((s = e == null ? void 0 : e.htScore) == null ? void 0 : s.awayGoals) ? "x" : "2";
|
|
4436
|
+
}), J(he, "createDoubleChanceResult", (e) => {
|
|
4437
|
+
var t, i, o, a;
|
|
4438
|
+
return ((t = e == null ? void 0 : e.ftScore) == null ? void 0 : t.homeGoals) > ((i = e == null ? void 0 : e.ftScore) == null ? void 0 : i.awayGoals) ? ["1x", "12"] : ((o = e == null ? void 0 : e.ftScore) == null ? void 0 : o.homeGoals) === ((a = e == null ? void 0 : e.ftScore) == null ? void 0 : a.awayGoals) ? ["1x", "x2"] : ["x2", "12"];
|
|
4439
|
+
}), J(he, "createHalfTimeFullTimeResult", (e) => {
|
|
4440
|
+
var t, i, o, a, s, p, d, b, c, f, x, v, g, y, R, O, A, T, S, I, L, l, h, u;
|
|
4441
|
+
if (((t = e == null ? void 0 : e.htScore) == null ? void 0 : t.homeGoals) > ((i = e == null ? void 0 : e.htScore) == null ? void 0 : i.awayGoals)) {
|
|
4442
|
+
if (((o = e == null ? void 0 : e.ftScore) == null ? void 0 : o.homeGoals) > ((a = e == null ? void 0 : e.ftScore) == null ? void 0 : a.awayGoals)) return "1/1";
|
|
4443
|
+
if (((s = e == null ? void 0 : e.ftScore) == null ? void 0 : s.homeGoals) === ((p = e == null ? void 0 : e.ftScore) == null ? void 0 : p.awayGoals)) return "1/x";
|
|
4444
|
+
if (((d = e == null ? void 0 : e.ftScore) == null ? void 0 : d.homeGoals) < ((b = e == null ? void 0 : e.ftScore) == null ? void 0 : b.awayGoals)) return "1/2";
|
|
4445
|
+
}
|
|
4446
|
+
if (((c = e == null ? void 0 : e.htScore) == null ? void 0 : c.homeGoals) === ((f = e == null ? void 0 : e.htScore) == null ? void 0 : f.awayGoals)) {
|
|
4447
|
+
if (((x = e == null ? void 0 : e.ftScore) == null ? void 0 : x.homeGoals) > ((v = e == null ? void 0 : e.ftScore) == null ? void 0 : v.awayGoals)) return "x/1";
|
|
4448
|
+
if (((g = e == null ? void 0 : e.ftScore) == null ? void 0 : g.homeGoals) === ((y = e == null ? void 0 : e.ftScore) == null ? void 0 : y.awayGoals)) return "x/x";
|
|
4449
|
+
if (((R = e == null ? void 0 : e.ftScore) == null ? void 0 : R.homeGoals) < ((O = e == null ? void 0 : e.ftScore) == null ? void 0 : O.awayGoals)) return "x/2";
|
|
4450
|
+
}
|
|
4451
|
+
if (((A = e == null ? void 0 : e.htScore) == null ? void 0 : A.homeGoals) < ((T = e == null ? void 0 : e.htScore) == null ? void 0 : T.awayGoals)) {
|
|
4452
|
+
if (((S = e == null ? void 0 : e.ftScore) == null ? void 0 : S.homeGoals) > ((I = e == null ? void 0 : e.ftScore) == null ? void 0 : I.awayGoals)) return "2/1";
|
|
4453
|
+
if (((L = e == null ? void 0 : e.ftScore) == null ? void 0 : L.homeGoals) === ((l = e == null ? void 0 : e.ftScore) == null ? void 0 : l.awayGoals)) return "2/x";
|
|
4454
|
+
if (((h = e == null ? void 0 : e.ftScore) == null ? void 0 : h.homeGoals) < ((u = e == null ? void 0 : e.ftScore) == null ? void 0 : u.awayGoals)) return "2/2";
|
|
4455
|
+
}
|
|
4456
|
+
}), J(he, "createMarketResultByCriteria", (e, t) => !e.timeline || !e.timeline.length ? null : t === "red_card" ? e.timeline.filter((i) => Number(i.minute) <= 90).some((i) => i.type === "red_card") : e.timeline.filter((i) => Number(i.minute) <= 90).some((i) => i.type.startsWith(t))), J(he, "createPlayersMarketsResults", (e, t, i) => {
|
|
4457
|
+
if (!e.timeline || !e.timeline.length) return i === "first_goal" ? null : [];
|
|
4458
|
+
if (i === "first_goal") {
|
|
4459
|
+
let p = e.timeline.find((d) => d.type === "goal" || d.type === "penalty_goal" || d.type === "own_goal") || null;
|
|
4460
|
+
if (p) {
|
|
4461
|
+
let d = t[p.player.id];
|
|
4462
|
+
return { playerId: p.type === "goal" || p.type === "penalty_goal" ? p.player.id : "OWN_GOAL", playerModel: d };
|
|
4463
|
+
}
|
|
4464
|
+
return null;
|
|
4465
|
+
}
|
|
4466
|
+
if (i === "yellow_card" || i === "red_card") return et.transformPlayerMarketResult(e.timeline.filter((p) => Number(p.minute) <= 90).filter((p) => p.type === i).map((p) => t[p.player.id]));
|
|
4467
|
+
let o = /* @__PURE__ */ new Map(), a = i === "one_goal" ? 1 : i === "two_goals" ? 2 : 3, s = [];
|
|
4468
|
+
return e.timeline.filter((p) => Number(p.minute) <= 90).filter((p) => p.type === "goal" || p.type === "penalty_goal").forEach((p) => {
|
|
4469
|
+
let d = t[p.player.id];
|
|
4470
|
+
if (o.has(p.player.id)) {
|
|
4471
|
+
let b = o.get(p.player.id);
|
|
4472
|
+
b.push(d), o.set(p.player.id, b);
|
|
4473
|
+
} else o.set(p.player.id, [d]);
|
|
4474
|
+
}), o.forEach((p) => {
|
|
4475
|
+
p.length >= a && s.push(p[0]);
|
|
4476
|
+
}), et.transformPlayerMarketResult(s);
|
|
4477
|
+
}), J(he, "transformPlayerMarketResult", (e) => e.map((t) => ({ playerId: t.id, playerModel: t })));
|
|
4478
|
+
(/* @__PURE__ */ new Map()).set("minutesPlayed", "Minutes Played").set("cleanSheets", "Clean Sheets").set("concededGoals", "Goals Conceded").set("saves", "Saves").set("penaltySaved", "Penalties Saved").set("penaltyCommitted", "Penalties Committed").set("yellowCards", "Yellow Cards").set("redCards", "Red Cards").set("assists", "Assists").set("foulsCommitted", "Fouls Committed").set("ownGoals", "Own Goals").set("goals", "Goals").set("tackles", "Tackles").set("shotsOn", "Shots On Target").set("penaltyGoals", "Penalty Goals").set("penaltyWon", "Penalty Won").set("penaltyMissed", "Penalty Missed").set("penaltySaved", "Penalty Saved").set("penaltyReceived", "Penalty Received").set("shots", "Shots").set("shotsBlocked", "Shots Blocked").set("offsides", "Offsides").set("foulsWon", "Fouls Won").set("tacklesBlocks", "Tackles Blocks").set("tacklesInterceptions", "Tackles Interceptions").set("caughtBall", "Caught Ball").set("passes", "Passes").set("crosses", "Crosses").set("interceptions", "Interceptions").set("keyPasses", "Key Passes").set("passesAccuracy", "Passes Accuracy").set("duels", "Duels").set("duelsWon", "Duels Won").set("dribblesAttempts", "Dribbles Attempts").set("dribblesSuccess", "Dribbles Success").set("dribblesPast", "Dribbles Past");
|
|
4479
|
+
export {
|
|
4480
|
+
In as $,
|
|
4481
|
+
Sn as B,
|
|
4482
|
+
tn as C,
|
|
4483
|
+
yo as F,
|
|
4484
|
+
$e as H,
|
|
4485
|
+
wn as J,
|
|
4486
|
+
On as K,
|
|
4487
|
+
Ln as Q,
|
|
4488
|
+
Tn as U,
|
|
4489
|
+
Dn as X,
|
|
4490
|
+
Rn as Y,
|
|
4491
|
+
Nn as Z,
|
|
4492
|
+
Vn as a,
|
|
4493
|
+
B as b,
|
|
4494
|
+
so as c,
|
|
4495
|
+
Uo as d,
|
|
4496
|
+
ho as e,
|
|
4497
|
+
qi as f,
|
|
4498
|
+
at as g,
|
|
4499
|
+
Pn as h,
|
|
4500
|
+
Fn as i,
|
|
4501
|
+
En as j,
|
|
4502
|
+
Wi as k,
|
|
4503
|
+
kn as n,
|
|
4504
|
+
jn as o,
|
|
4505
|
+
An as q,
|
|
4506
|
+
Hn as r,
|
|
4507
|
+
zn as s,
|
|
4508
|
+
Mn as t,
|
|
4509
|
+
Ze as z
|
|
4510
|
+
};
|