fansunited-widgets-cdn 0.0.84 → 0.0.86-RC1

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.
Files changed (75) hide show
  1. package/chunks/Alert-CuOsmojH.js +149 -0
  2. package/chunks/AspectRatio-D3Sgxj7p.js +125 -0
  3. package/chunks/Avatar-BTsEKfhc.js +186 -0
  4. package/chunks/Button-BV7YIFkS.js +858 -0
  5. package/chunks/Card-DRIT0wtY.js +129 -0
  6. package/chunks/CardContent-CD-WZh1l.js +60 -0
  7. package/chunks/ChevronRight-BrCKlr3T.js +11 -0
  8. package/chunks/Chip-6HLNTHMI.js +281 -0
  9. package/chunks/ClassicQuizWrapper-t04e9_6c.js +4883 -0
  10. package/chunks/CollectLeadForm-DtmR2Vuf-B_3JkHJC.js +1560 -0
  11. package/chunks/CollectLeadWrapper-CVAVswua.js +1294 -0
  12. package/chunks/DialogActions-C5kAgHal.js +45 -0
  13. package/chunks/DialogContent-MIXff4nd.js +60 -0
  14. package/chunks/EitherOrById-CAo8gPjm.js +1496 -0
  15. package/chunks/EitherOrPreviewWrapper-DFi2bviS.js +47 -0
  16. package/chunks/Error-DhQL89pn-BwTV1meb.js +418 -0
  17. package/chunks/EventGameWrapper-BxyLL3eA.js +7633 -0
  18. package/chunks/Grid-Dpv_ZL23.js +279 -0
  19. package/chunks/IconButton-Lt9Xks7c.js +207 -0
  20. package/chunks/Link-DLuj1USf.js +228 -0
  21. package/chunks/List-DLPlZGTP.js +397 -0
  22. package/chunks/ListItemDecorator-CE2eQLip.js +1882 -0
  23. package/chunks/MatchPredictionContainer-Ct6gXvLw.js +751 -0
  24. package/chunks/MatchQuizWrapper-Fu6RfWVn.js +11046 -0
  25. package/chunks/ModalDialog-Ci3hulZA.js +619 -0
  26. package/chunks/NotFoundSkeleton-BYJTzYJR-Be3R34nS.js +2764 -0
  27. package/chunks/OverlayLeadAfterCollection-DnqztPJ5-CpELr0AC.js +896 -0
  28. package/chunks/OverlayScoreStateSkeleton-C9FUhcnd-DMFELrvA.js +146 -0
  29. package/chunks/PersonalityQuizWrapper-MpUK4n3Y.js +34374 -0
  30. package/chunks/PlayerOfTheMatch-D4vuR7pz.js +1406 -0
  31. package/chunks/PollWrapper-CzKj8xxE.js +4198 -0
  32. package/chunks/Portal-BWqqFvVm-TuHZWjxn.js +12717 -0
  33. package/chunks/Portal-DA1mxzSo.js +41 -0
  34. package/chunks/PreviewQuizById-WWS_LyJR.js +4864 -0
  35. package/chunks/Select-p_cHpLhi.js +3418 -0
  36. package/chunks/Sheet-BaCzogZK.js +167 -0
  37. package/chunks/Snackbar-DHxnbCA3.js +358 -0
  38. package/chunks/Stack-Dgf2LXN0.js +117 -0
  39. package/chunks/Tabs-CSu_cWNi.js +784 -0
  40. package/chunks/TeamNextMatchPrediction-C7HilNqW.js +6 -0
  41. package/chunks/Tutorial-DFNZxmAx.js +427 -0
  42. package/chunks/createLucideIcon-B6NxpYkb.js +79 -0
  43. package/chunks/createSvgIcon-7h7XC877.js +119 -0
  44. package/chunks/createSvgIcon-DVA0KIUd.js +2490 -0
  45. package/chunks/dataAttributeParser-CF9vxaVN.js +28 -0
  46. package/chunks/default-quiz-bg-CTzaADn7.js +4 -0
  47. package/chunks/getReactElementRef-BD-S8A24.js +25 -0
  48. package/chunks/index-24AwmTVJ.js +85 -0
  49. package/chunks/index-3vJS8JzK.js +63 -0
  50. package/chunks/index-BSD7mvEU.js +57 -0
  51. package/chunks/index-BU6iona7.js +57 -0
  52. package/chunks/index-BqCHiyI6.js +59 -0
  53. package/chunks/index-C5qRf4TV.js +20 -0
  54. package/chunks/index-C9MpfjqV.js +35 -0
  55. package/chunks/index-CMmQs5A5.js +56 -0
  56. package/chunks/index-CicEY2Jv.js +5 -0
  57. package/chunks/index-DNeawo0R.js +17 -0
  58. package/chunks/index-DePIySlY.js +29 -0
  59. package/chunks/index-DoRYU_1L.js +41 -0
  60. package/chunks/index-DvgG9XJj.js +20 -0
  61. package/chunks/index-QpZE-92Y.js +33 -0
  62. package/chunks/index-rgFj976B.js +17 -0
  63. package/chunks/index-tzsdMoo-.js +16 -0
  64. package/chunks/index.es-CHqz6mjo.js +6162 -0
  65. package/chunks/init-BEkECL0v.js +32 -0
  66. package/chunks/main-XP7dqk6g.js +39843 -0
  67. package/chunks/resolveProps-BfYZubfk.js +37 -0
  68. package/chunks/users-D_xgC4iQ.js +16 -0
  69. package/chunks/variantColorInheritance-DI3wUohX.js +28 -0
  70. package/fu-widgets-loader.es.js +76 -0
  71. package/fu-widgets-loader.js +1 -0
  72. package/fu-widgets.es.js +4 -0
  73. package/fu-widgets.iife.js +621 -682
  74. package/manifest.json +84 -0
  75. package/package.json +9 -2
@@ -0,0 +1,619 @@
1
+ import { r as i, Z as X, j as P, w as M, a5 as ne, F as Z, G as Q, v as ee, _ as te, x as U, y as L, D as oe, a0 as _, E as re, z as j } from "./main-XP7dqk6g.js";
2
+ import { g as ae, o as A, u as J } from "./getReactElementRef-BD-S8A24.js";
3
+ import { o as K, P as se } from "./Portal-DA1mxzSo.js";
4
+ import { S as ie } from "./Card-DRIT0wtY.js";
5
+ import { i as le } from "./Button-BV7YIFkS.js";
6
+ function V(...e) {
7
+ return e.reduce((t, n) => n == null ? t : function(...a) {
8
+ t.apply(this, a), n.apply(this, a);
9
+ }, () => {
10
+ });
11
+ }
12
+ function de(e) {
13
+ const t = e.documentElement.clientWidth;
14
+ return Math.abs(window.innerWidth - t);
15
+ }
16
+ const ce = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
17
+ function ue(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 fe(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 n = t(`[name="${e.name}"]:checked`);
26
+ return n || (n = t(`[name="${e.name}"]`)), n !== e;
27
+ }
28
+ function pe(e) {
29
+ return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" || fe(e));
30
+ }
31
+ function ge(e) {
32
+ const t = [], n = [];
33
+ return Array.from(e.querySelectorAll(ce)).forEach((o, a) => {
34
+ const r = ue(o);
35
+ r === -1 || !pe(o) || (r === 0 ? t.push(o) : n.push({
36
+ documentOrder: a,
37
+ tabIndex: r,
38
+ node: o
39
+ }));
40
+ }), n.sort((o, a) => o.tabIndex === a.tabIndex ? o.documentOrder - a.documentOrder : o.tabIndex - a.tabIndex).map((o) => o.node).concat(t);
41
+ }
42
+ function me() {
43
+ return !0;
44
+ }
45
+ function he(e) {
46
+ const {
47
+ children: t,
48
+ disableAutoFocus: n = !1,
49
+ disableEnforceFocus: o = !1,
50
+ disableRestoreFocus: a = !1,
51
+ getTabbable: r = ge,
52
+ isEnabled: s = me,
53
+ open: d
54
+ } = e, u = i.useRef(!1), h = i.useRef(null), p = i.useRef(null), b = i.useRef(null), R = i.useRef(null), v = i.useRef(!1), c = i.useRef(null), I = X(ae(t), c), S = i.useRef(null);
55
+ i.useEffect(() => {
56
+ !d || !c.current || (v.current = !n);
57
+ }, [n, d]), i.useEffect(() => {
58
+ if (!d || !c.current)
59
+ return;
60
+ const l = A(c.current);
61
+ return c.current.contains(l.activeElement) || (c.current.hasAttribute("tabIndex") || c.current.setAttribute("tabIndex", "-1"), v.current && c.current.focus()), () => {
62
+ a || (b.current && b.current.focus && (u.current = !0, b.current.focus()), b.current = null);
63
+ };
64
+ }, [d]), i.useEffect(() => {
65
+ if (!d || !c.current)
66
+ return;
67
+ const l = A(c.current), x = (E) => {
68
+ S.current = E, !(o || !s() || E.key !== "Tab") && l.activeElement === c.current && E.shiftKey && (u.current = !0, p.current && p.current.focus());
69
+ }, y = () => {
70
+ const E = c.current;
71
+ if (E === null)
72
+ return;
73
+ if (!l.hasFocus() || !s() || u.current) {
74
+ u.current = !1;
75
+ return;
76
+ }
77
+ if (E.contains(l.activeElement) || o && l.activeElement !== h.current && l.activeElement !== p.current)
78
+ return;
79
+ if (l.activeElement !== R.current)
80
+ R.current = null;
81
+ else if (R.current !== null)
82
+ return;
83
+ if (!v.current)
84
+ return;
85
+ let C = [];
86
+ if ((l.activeElement === h.current || l.activeElement === p.current) && (C = r(c.current)), C.length > 0) {
87
+ var F, m;
88
+ const O = !!((F = S.current) != null && F.shiftKey && ((m = S.current) == null ? void 0 : m.key) === "Tab"), T = C[0], W = C[C.length - 1];
89
+ typeof T != "string" && typeof W != "string" && (O ? W.focus() : T.focus());
90
+ } else
91
+ E.focus();
92
+ };
93
+ l.addEventListener("focusin", y), l.addEventListener("keydown", x, !0);
94
+ const k = setInterval(() => {
95
+ l.activeElement && l.activeElement.tagName === "BODY" && y();
96
+ }, 50);
97
+ return () => {
98
+ clearInterval(k), l.removeEventListener("focusin", y), l.removeEventListener("keydown", x, !0);
99
+ };
100
+ }, [n, o, a, s, d, r]);
101
+ const N = (l) => {
102
+ b.current === null && (b.current = l.relatedTarget), v.current = !0, R.current = l.target;
103
+ const x = t.props.onFocus;
104
+ x && x(l);
105
+ }, D = (l) => {
106
+ b.current === null && (b.current = l.relatedTarget), v.current = !0;
107
+ };
108
+ return /* @__PURE__ */ P.jsxs(i.Fragment, {
109
+ children: [/* @__PURE__ */ P.jsx("div", {
110
+ tabIndex: d ? 0 : -1,
111
+ onFocus: D,
112
+ ref: h,
113
+ "data-testid": "sentinelStart"
114
+ }), /* @__PURE__ */ i.cloneElement(t, {
115
+ ref: I,
116
+ onFocus: N
117
+ }), /* @__PURE__ */ P.jsx("div", {
118
+ tabIndex: d ? 0 : -1,
119
+ onFocus: D,
120
+ ref: p,
121
+ "data-testid": "sentinelEnd"
122
+ })]
123
+ });
124
+ }
125
+ function be(e) {
126
+ const t = A(e);
127
+ return t.body === e ? K(e).innerWidth > t.documentElement.clientWidth : e.scrollHeight > e.clientHeight;
128
+ }
129
+ function $(e, t) {
130
+ t ? e.setAttribute("aria-hidden", "true") : e.removeAttribute("aria-hidden");
131
+ }
132
+ function Y(e) {
133
+ return parseInt(K(e).getComputedStyle(e).paddingRight, 10) || 0;
134
+ }
135
+ function ve(e) {
136
+ const n = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].indexOf(e.tagName) !== -1, o = e.tagName === "INPUT" && e.getAttribute("type") === "hidden";
137
+ return n || o;
138
+ }
139
+ function q(e, t, n, o, a) {
140
+ const r = [t, n, ...o];
141
+ [].forEach.call(e.children, (s) => {
142
+ const d = r.indexOf(s) === -1, u = !ve(s);
143
+ d && u && $(s, a);
144
+ });
145
+ }
146
+ function B(e, t) {
147
+ let n = -1;
148
+ return e.some((o, a) => t(o) ? (n = a, !0) : !1), n;
149
+ }
150
+ function xe(e, t) {
151
+ const n = [], o = e.container;
152
+ if (!t.disableScrollLock) {
153
+ if (be(o)) {
154
+ const s = de(A(o));
155
+ n.push({
156
+ value: o.style.paddingRight,
157
+ property: "padding-right",
158
+ el: o
159
+ }), o.style.paddingRight = `${Y(o) + s}px`;
160
+ const d = A(o).querySelectorAll(".mui-fixed");
161
+ [].forEach.call(d, (u) => {
162
+ n.push({
163
+ value: u.style.paddingRight,
164
+ property: "padding-right",
165
+ el: u
166
+ }), u.style.paddingRight = `${Y(u) + s}px`;
167
+ });
168
+ }
169
+ let r;
170
+ if (o.parentNode instanceof DocumentFragment)
171
+ r = A(o).body;
172
+ else {
173
+ const s = o.parentElement, d = K(o);
174
+ r = (s == null ? void 0 : s.nodeName) === "HTML" && d.getComputedStyle(s).overflowY === "scroll" ? s : o;
175
+ }
176
+ n.push({
177
+ value: r.style.overflow,
178
+ property: "overflow",
179
+ el: r
180
+ }, {
181
+ value: r.style.overflowX,
182
+ property: "overflow-x",
183
+ el: r
184
+ }, {
185
+ value: r.style.overflowY,
186
+ property: "overflow-y",
187
+ el: r
188
+ }), r.style.overflow = "hidden";
189
+ }
190
+ return () => {
191
+ n.forEach(({
192
+ value: r,
193
+ el: s,
194
+ property: d
195
+ }) => {
196
+ r ? s.style.setProperty(d, r) : s.style.removeProperty(d);
197
+ });
198
+ };
199
+ }
200
+ function ye(e) {
201
+ const t = [];
202
+ return [].forEach.call(e.children, (n) => {
203
+ n.getAttribute("aria-hidden") === "true" && t.push(n);
204
+ }), t;
205
+ }
206
+ class Ee {
207
+ constructor() {
208
+ this.containers = void 0, this.modals = void 0, this.modals = [], this.containers = [];
209
+ }
210
+ add(t, n) {
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 && $(t.modalRef, !1);
215
+ const a = ye(n);
216
+ q(n, t.mount, t.modalRef, a, !0);
217
+ const r = B(this.containers, (s) => s.container === n);
218
+ return r !== -1 ? (this.containers[r].modals.push(t), o) : (this.containers.push({
219
+ modals: [t],
220
+ container: n,
221
+ restore: null,
222
+ hiddenSiblings: a
223
+ }), o);
224
+ }
225
+ mount(t, n) {
226
+ const o = B(this.containers, (r) => r.modals.indexOf(t) !== -1), a = this.containers[o];
227
+ a.restore || (a.restore = xe(a, n));
228
+ }
229
+ remove(t, n = !0) {
230
+ const o = this.modals.indexOf(t);
231
+ if (o === -1)
232
+ return o;
233
+ const a = B(this.containers, (s) => s.modals.indexOf(t) !== -1), r = this.containers[a];
234
+ if (r.modals.splice(r.modals.indexOf(t), 1), this.modals.splice(o, 1), r.modals.length === 0)
235
+ r.restore && r.restore(), t.modalRef && $(t.modalRef, n), q(r.container, t.mount, t.modalRef, r.hiddenSiblings, !1), this.containers.splice(a, 1);
236
+ else {
237
+ const s = r.modals[r.modals.length - 1];
238
+ s.modalRef && $(s.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 Me(e) {
247
+ return typeof e == "function" ? e() : e;
248
+ }
249
+ function Re(e) {
250
+ return e ? e.props.hasOwnProperty("in") : !1;
251
+ }
252
+ const Ce = new Ee();
253
+ function Te(e) {
254
+ const {
255
+ container: t,
256
+ disableEscapeKeyDown: n = !1,
257
+ disableScrollLock: o = !1,
258
+ // @ts-ignore internal logic - Base UI supports the manager as a prop too
259
+ manager: a = Ce,
260
+ closeAfterTransition: r = !1,
261
+ onTransitionEnter: s,
262
+ onTransitionExited: d,
263
+ children: u,
264
+ onClose: h,
265
+ open: p,
266
+ rootRef: b
267
+ } = e, R = i.useRef({}), v = i.useRef(null), c = i.useRef(null), I = X(c, b), [S, N] = i.useState(!p), D = Re(u);
268
+ let l = !0;
269
+ (e["aria-hidden"] === "false" || e["aria-hidden"] === !1) && (l = !1);
270
+ const x = () => A(v.current), y = () => (R.current.modalRef = c.current, R.current.mount = v.current, R.current), k = () => {
271
+ a.mount(y(), {
272
+ disableScrollLock: o
273
+ }), c.current && (c.current.scrollTop = 0);
274
+ }, E = J(() => {
275
+ const g = Me(t) || x().body;
276
+ a.add(y(), g), c.current && k();
277
+ }), C = i.useCallback(() => a.isTopModal(y()), [a]), F = J((g) => {
278
+ v.current = g, g && (p && C() ? k() : c.current && $(c.current, l));
279
+ }), m = i.useCallback(() => {
280
+ a.remove(y(), l);
281
+ }, [l, a]);
282
+ i.useEffect(() => () => {
283
+ m();
284
+ }, [m]), i.useEffect(() => {
285
+ p ? E() : (!D || !r) && m();
286
+ }, [p, m, D, r, E]);
287
+ const O = (g) => (f) => {
288
+ var w;
289
+ (w = g.onKeyDown) == null || w.call(g, f), !(f.key !== "Escape" || f.which === 229 || // Wait until IME is settled.
290
+ !C()) && (n || (f.stopPropagation(), h && h(f, "escapeKeyDown")));
291
+ }, T = (g) => (f) => {
292
+ var w;
293
+ (w = g.onClick) == null || w.call(g, f), f.target === f.currentTarget && h && h(f, "backdropClick");
294
+ };
295
+ return {
296
+ getRootProps: (g = {}) => {
297
+ const f = ne(e);
298
+ delete f.onTransitionEnter, delete f.onTransitionExited;
299
+ const w = M({}, f, g);
300
+ return M({
301
+ role: "presentation"
302
+ }, w, {
303
+ onKeyDown: O(w),
304
+ ref: I
305
+ });
306
+ },
307
+ getBackdropProps: (g = {}) => {
308
+ const f = g;
309
+ return M({
310
+ "aria-hidden": !0
311
+ }, f, {
312
+ onClick: T(f),
313
+ open: p
314
+ });
315
+ },
316
+ getTransitionProps: () => {
317
+ const g = () => {
318
+ N(!1), s && s();
319
+ }, f = () => {
320
+ N(!0), d && d(), r && m();
321
+ };
322
+ return {
323
+ onEnter: V(g, u == null ? void 0 : u.props.onEnter),
324
+ onExited: V(f, u == null ? void 0 : u.props.onExited)
325
+ };
326
+ },
327
+ rootRef: I,
328
+ portalRef: F,
329
+ isTopModal: C,
330
+ exited: S,
331
+ hasTransition: D
332
+ };
333
+ }
334
+ function De(e) {
335
+ return Z("MuiModalDialog", e);
336
+ }
337
+ const _e = Q("MuiModalDialog", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "sizeSm", "sizeMd", "sizeLg", "layoutCenter", "layoutFullscreen"]), Pe = /* @__PURE__ */ i.createContext(void 0), ke = /* @__PURE__ */ i.createContext(void 0);
338
+ function Ie(e) {
339
+ return Z("MuiModal", e);
340
+ }
341
+ Q("MuiModal", ["root", "hidden", "backdrop"]);
342
+ const Se = /* @__PURE__ */ i.createContext(void 0), Oe = ["children", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onClose", "onKeyDown", "open", "component", "slots", "slotProps"], Ne = (e) => {
343
+ const {
344
+ open: t
345
+ } = e;
346
+ return oe({
347
+ root: ["root", !t && "hidden"],
348
+ backdrop: ["backdrop"]
349
+ }, Ie, {});
350
+ }, Fe = L("div")(({
351
+ ownerState: e,
352
+ theme: t
353
+ }) => M({
354
+ "--unstable_popup-zIndex": `calc(${t.vars.zIndex.modal} + 1)`,
355
+ '& ~ [role="listbox"]': {
356
+ // target all the listbox (Autocomplete, Menu, Select, etc.) that uses portal
357
+ "--unstable_popup-zIndex": `calc(${t.vars.zIndex.modal} + 1)`
358
+ },
359
+ position: "fixed",
360
+ zIndex: t.vars.zIndex.modal,
361
+ right: 0,
362
+ bottom: 0,
363
+ top: 0,
364
+ left: 0
365
+ }, !e.open && {
366
+ visibility: "hidden"
367
+ })), We = L(Fe, {
368
+ name: "JoyModal",
369
+ slot: "Root",
370
+ overridesResolver: (e, t) => t.root
371
+ })({}), we = L("div")(({
372
+ theme: e
373
+ }) => ({
374
+ zIndex: -1,
375
+ position: "fixed",
376
+ right: 0,
377
+ bottom: 0,
378
+ top: 0,
379
+ left: 0,
380
+ backgroundColor: e.vars.palette.background.backdrop,
381
+ WebkitTapHighlightColor: "transparent",
382
+ backdropFilter: "blur(8px)"
383
+ })), ze = L(we, {
384
+ name: "JoyModal",
385
+ slot: "Backdrop",
386
+ overridesResolver: (e, t) => t.backdrop
387
+ })({}), Je = /* @__PURE__ */ i.forwardRef(function(t, n) {
388
+ const o = ee({
389
+ props: t,
390
+ name: "JoyModal"
391
+ }), {
392
+ children: a,
393
+ container: r,
394
+ disableAutoFocus: s = !1,
395
+ disableEnforceFocus: d = !1,
396
+ disableEscapeKeyDown: u = !1,
397
+ disablePortal: h = !1,
398
+ disableRestoreFocus: p = !1,
399
+ disableScrollLock: b = !1,
400
+ hideBackdrop: R = !1,
401
+ keepMounted: v = !1,
402
+ onClose: c,
403
+ open: I,
404
+ component: S,
405
+ slots: N = {},
406
+ slotProps: D = {}
407
+ } = o, l = te(o, Oe), x = M({}, o, {
408
+ disableAutoFocus: s,
409
+ disableEnforceFocus: d,
410
+ disableEscapeKeyDown: u,
411
+ disablePortal: h,
412
+ disableRestoreFocus: p,
413
+ disableScrollLock: b,
414
+ hideBackdrop: R,
415
+ keepMounted: v
416
+ }), {
417
+ getRootProps: y,
418
+ getBackdropProps: k,
419
+ rootRef: E,
420
+ portalRef: C,
421
+ isTopModal: F
422
+ } = Te(M({}, x, {
423
+ rootRef: n
424
+ })), m = Ne(x), O = M({}, l, {
425
+ component: S,
426
+ slots: N,
427
+ slotProps: D
428
+ }), [T, W] = U("root", {
429
+ ref: E,
430
+ className: m.root,
431
+ elementType: We,
432
+ externalForwardedProps: O,
433
+ getSlotProps: y,
434
+ ownerState: x
435
+ }), [H, z] = U("backdrop", {
436
+ className: m.backdrop,
437
+ elementType: ze,
438
+ externalForwardedProps: O,
439
+ getSlotProps: k,
440
+ ownerState: x
441
+ });
442
+ return !v && !I ? null : /* @__PURE__ */ P.jsx(Se.Provider, {
443
+ value: c,
444
+ children: /* @__PURE__ */ P.jsx(se, {
445
+ ref: C,
446
+ container: r,
447
+ disablePortal: h,
448
+ children: /* @__PURE__ */ P.jsxs(T, M({}, W, {
449
+ children: [R ? null : /* @__PURE__ */ P.jsx(H, M({}, z)), /* @__PURE__ */ P.jsx(he, {
450
+ disableEnforceFocus: d,
451
+ disableAutoFocus: s,
452
+ disableRestoreFocus: p,
453
+ isEnabled: F,
454
+ open: I,
455
+ children: i.Children.only(a) && /* @__PURE__ */ i.cloneElement(a, M({}, a.props.tabIndex === void 0 && {
456
+ tabIndex: -1
457
+ }))
458
+ })]
459
+ }))
460
+ })
461
+ });
462
+ }), Ae = ["className", "children", "invertedColors", "orientation", "color", "component", "variant", "size", "layout", "maxWidth", "minWidth", "slots", "slotProps"], He = (e) => {
463
+ const {
464
+ variant: t,
465
+ color: n,
466
+ size: o,
467
+ layout: a
468
+ } = e, r = {
469
+ root: ["root", t && `variant${j(t)}`, n && `color${j(n)}`, o && `size${j(o)}`, a && `layout${j(a)}`]
470
+ };
471
+ return oe(r, De, {});
472
+ };
473
+ function G(e, t) {
474
+ var n, o;
475
+ return t && (n = e.breakpoints) != null && n.values[t] ? `${(o = e.breakpoints) == null ? void 0 : o.values[t]}px` : t;
476
+ }
477
+ const $e = L(ie, {
478
+ name: "JoyModalDialog",
479
+ slot: "Root",
480
+ overridesResolver: (e, t) => t.root
481
+ })(({
482
+ theme: e,
483
+ ownerState: t
484
+ }) => M({
485
+ "--ModalDialog-minWidth": typeof t.minWidth == "number" ? `${t.minWidth}px` : G(e, t.minWidth),
486
+ "--ModalDialog-maxWidth": typeof t.maxWidth == "number" ? `${t.maxWidth}px` : G(e, t.maxWidth),
487
+ "--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))"
488
+ }, t.variant === "solid" && {
489
+ "--DialogContent-color": "currentColor"
490
+ }, t.size === "sm" && {
491
+ "--Card-padding": "1rem",
492
+ "--ModalDialog-titleOffset": e.spacing(0.25),
493
+ "--ModalDialog-descriptionOffset": e.spacing(0.25),
494
+ "--ModalClose-inset": "0.375rem"
495
+ }, t.size === "md" && {
496
+ "--Card-padding": "1.25rem",
497
+ "--ModalDialog-titleOffset": e.spacing(0.25),
498
+ "--ModalDialog-descriptionOffset": e.spacing(0.75),
499
+ "--ModalClose-inset": "0.5rem"
500
+ }, t.size === "lg" && {
501
+ "--Card-padding": "1.5rem",
502
+ "--ModalDialog-titleOffset": e.spacing(0.5),
503
+ "--ModalDialog-descriptionOffset": e.spacing(1),
504
+ "--ModalClose-inset": "0.625rem"
505
+ }, {
506
+ boxSizing: "border-box",
507
+ boxShadow: e.shadow.md,
508
+ minWidth: "min(calc(100vw - 2 * var(--Card-padding)), var(--ModalDialog-minWidth, 300px))",
509
+ outline: 0,
510
+ position: "absolute"
511
+ }, t.layout === "fullscreen" && {
512
+ top: 0,
513
+ left: 0,
514
+ right: 0,
515
+ bottom: 0,
516
+ border: 0,
517
+ borderRadius: 0
518
+ }, t.layout === "center" && {
519
+ top: "50%",
520
+ left: "50%",
521
+ transform: "translate(-50%, -50%)",
522
+ maxWidth: "min(calc(100vw - 2 * var(--Card-padding)), var(--ModalDialog-maxWidth, 100vw))",
523
+ maxHeight: "calc(100% - 2 * var(--Card-padding))"
524
+ }, {
525
+ [`& [id="${t["aria-labelledby"]}"]`]: {
526
+ "--Typography-margin": "calc(-1 * var(--ModalDialog-titleOffset)) 0 var(--ModalDialog-gap) 0",
527
+ "--Typography-fontSize": "1.125em",
528
+ [`& + [id="${t["aria-describedby"]}"]`]: {
529
+ "--unstable_ModalDialog-descriptionOffset": "calc(-1 * var(--ModalDialog-descriptionOffset))"
530
+ }
531
+ },
532
+ [`& [id="${t["aria-describedby"]}"]`]: {
533
+ "--Typography-fontSize": "1em",
534
+ "--Typography-margin": "var(--unstable_ModalDialog-descriptionOffset, var(--ModalDialog-gap)) 0 0 0",
535
+ "&:not(:last-child)": {
536
+ // create spacing between description and the next element.
537
+ "--Typography-margin": "var(--unstable_ModalDialog-descriptionOffset, var(--ModalDialog-gap)) 0 var(--ModalDialog-gap) 0"
538
+ }
539
+ }
540
+ })), Ve = /* @__PURE__ */ i.forwardRef(function(t, n) {
541
+ const o = ee({
542
+ props: t,
543
+ name: "JoyModalDialog"
544
+ }), {
545
+ className: a,
546
+ children: r,
547
+ invertedColors: s = !1,
548
+ orientation: d = "vertical",
549
+ color: u = "neutral",
550
+ component: h = "div",
551
+ variant: p = "outlined",
552
+ size: b = "md",
553
+ layout: R = "center",
554
+ maxWidth: v,
555
+ minWidth: c,
556
+ slots: I = {},
557
+ slotProps: S = {}
558
+ } = o, N = te(o, Ae), D = M({}, o, {
559
+ color: u,
560
+ component: h,
561
+ maxWidth: v,
562
+ minWidth: c,
563
+ layout: R,
564
+ size: b,
565
+ variant: p,
566
+ invertedColors: s
567
+ }), l = He(D), x = M({}, N, {
568
+ component: h,
569
+ slots: I,
570
+ slotProps: S
571
+ }), y = _(), k = _(), E = i.useMemo(() => ({
572
+ variant: p,
573
+ color: u,
574
+ labelledBy: y,
575
+ describedBy: k
576
+ }), [u, p, y, k]), [C, F] = U("root", {
577
+ ref: n,
578
+ className: re(l.root, a),
579
+ elementType: $e,
580
+ externalForwardedProps: x,
581
+ ownerState: D,
582
+ additionalProps: {
583
+ as: h,
584
+ role: "dialog",
585
+ "aria-modal": "true",
586
+ "aria-labelledby": y,
587
+ "aria-describedby": k
588
+ }
589
+ });
590
+ return /* @__PURE__ */ P.jsx(ke.Provider, {
591
+ value: b,
592
+ children: /* @__PURE__ */ P.jsx(Pe.Provider, {
593
+ value: E,
594
+ children: /* @__PURE__ */ P.jsx(C, M({}, F, {
595
+ children: i.Children.map(r, (m, O) => {
596
+ if (!/* @__PURE__ */ i.isValidElement(m))
597
+ return m;
598
+ const T = {};
599
+ if (le(m, ["Divider"])) {
600
+ var W, H;
601
+ const z = m.props;
602
+ T.inset = (W = z == null ? void 0 : z.inset) != null ? W : "context";
603
+ const g = d === "vertical" ? "horizontal" : "vertical";
604
+ T.orientation = (H = z == null ? void 0 : z.orientation) != null ? H : g;
605
+ }
606
+ return O === 0 && (T["data-first-child"] = ""), O === i.Children.count(r) - 1 && (T["data-last-child"] = ""), /* @__PURE__ */ i.cloneElement(m, T);
607
+ })
608
+ }))
609
+ })
610
+ });
611
+ });
612
+ export {
613
+ Se as C,
614
+ Je as M,
615
+ Ve as a,
616
+ ke as b,
617
+ Pe as c,
618
+ _e as m
619
+ };