UNPKG

@cgi-learning-hub/ui

Version:

@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features

1,607 lines 258 kB
import * as h from "react"; import { createElement as mn } from "react"; import { P as t } from "./index-B9vkf41S.js"; import { CacheProvider as bn, ThemeContext as gn, css as Xe, keyframes as Qe } from "@emotion/react"; import { jsx as C, jsxs as le } from "react/jsx-runtime"; import { H as I, _ as $o, Q as yn, a0 as hn, t as vn, u as Eo, $ as Tn, I as Ze, T as Be, C as Cn, V as Sn, z as xn, F as D, G as V, Y as Lt, m as dt } from "./generateUtilityClasses-B_xKAflz.js"; import { R as wn, u as yt } from "./index-Ba4TEBpP.js"; import { a as Ao } from "./useTheme-DSA6Ir8k.js"; import { a as Bo } from "./DatePicker-Cd-Aj-F8.js"; import { a as Pn, b as kn } from "./index-CwHv-blH.js"; import { D as On, u as z, s as O, c as _, r as Rn, e as Mn } from "./DefaultPropsProvider-BrmlvPWg.js"; import { m as j } from "./memoTheme-C-PaH-Cy.js"; import { u as B, e as ro } from "./useSlot-BSkdRaZr.js"; import { u as Io } from "./useControlled-nm4pBabJ.js"; import { C as Nn } from "./CustomTreeItem-AecanDDg.js"; import { P as Je } from "./Paper-CZXfHfN_.js"; import { c as ht } from "./chainPropTypes-D9lkm76m.js"; import { B as Le } from "./ButtonBase-C2jRC_V7.js"; import { c as xe } from "./createSimplePaletteValueFilter-B7--0ryQ.js"; import { c as A } from "./capitalize-BHEX83JQ.js"; import { c as Re } from "./createSvgIcon-DFIM5PqN.js"; import { u as $n } from "./useSlotProps-CWTjRiRv.js"; import { T as We, t as so } from "./Typography-Cr-aIusw.js"; import { i as de } from "./integerPropType-BihGt2aU.js"; import { s as En, c as An, g as Bn } from "./composeClasses-BskurlZX.js"; import { u as In } from "./useThemeProps-CAonvyKa.js"; import { u as Dt } from "./useTheme-0AkY41zn.js"; import { m as jn } from "./mergeSlotProps-DVtjofCS.js"; import { T as Ln, g as ao, r as Dn } from "./utils-B_pVp6UZ.js"; import { u as jo } from "./useForkRef-u29GSuCu.js"; import { g as Lo, e as Do } from "./elementAcceptingRef-CZLfau9O.js"; import { d as Vn } from "./debounce-46wSf_lW.js"; import { o as Vo } from "./ownerWindow-niciwP7I.js"; import { e as zn, H as _n } from "./Portal-PkRJuFYN.js"; import { M as Fn } from "./Modal-DtjScKxh.js"; import { g as Un, M as Hn } from "./MenuItem-Cusmy5t2.js"; import { a as Wn } from "./List-CmJ1jCss.js"; import { u as Gn } from "./useTimeout-CrCYVizI.js"; import { a as Rt } from "./useEventCallback-Y2KwRxBw.js"; import { o as xt } from "./ownerDocument-CUrv0DIK.js"; import { G as qn } from "./Grow-CeGwnQpw.js"; import { K as Kn, l as Yn } from "./Tab-Bksf_S4K.js"; import { I as nt } from "./IconButton-DBjiNqOa.js"; import { u as io } from "./useId-CK6Kn3Tn.js"; import { I as Xn } from "./InputBase-D5UJOJBu.js"; import { S as Qn } from "./Select-BxH16ruJ.js"; import { r as Zn } from "./Button-C1mKNW-c.js"; function Jn(e) { if (e.sheet) return e.sheet; for (var o = 0; o < document.styleSheets.length; o++) if (document.styleSheets[o].ownerNode === e) return document.styleSheets[o]; } function er(e) { var o = document.createElement("style"); return o.setAttribute("data-emotion", e.key), e.nonce !== void 0 && o.setAttribute("nonce", e.nonce), o.appendChild(document.createTextNode("")), o.setAttribute("data-s", ""), o; } var zo = /* @__PURE__ */ (function() { function e(n) { var r = this; this._insertTag = function(s) { var i; r.tags.length === 0 ? r.insertionPoint ? i = r.insertionPoint.nextSibling : r.prepend ? i = r.container.firstChild : i = r.before : i = r.tags[r.tags.length - 1].nextSibling, r.container.insertBefore(s, i), r.tags.push(s); }, this.isSpeedy = n.speedy === void 0 ? !0 : n.speedy, this.tags = [], this.ctr = 0, this.nonce = n.nonce, this.key = n.key, this.container = n.container, this.prepend = n.prepend, this.insertionPoint = n.insertionPoint, this.before = null; } var o = e.prototype; return o.hydrate = function(r) { r.forEach(this._insertTag); }, o.insert = function(r) { this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(er(this)); var s = this.tags[this.tags.length - 1]; if (this.isSpeedy) { var i = Jn(s); try { i.insertRule(r, i.cssRules.length); } catch { } } else s.appendChild(document.createTextNode(r)); this.ctr++; }, o.flush = function() { this.tags.forEach(function(r) { var s; return (s = r.parentNode) == null ? void 0 : s.removeChild(r); }), this.tags = [], this.ctr = 0; }, e; })(), se = "-ms-", ut = "-moz-", F = "-webkit-", _o = "comm", Vt = "rule", zt = "decl", tr = "@import", Fo = "@keyframes", or = "@layer", nr = Math.abs, vt = String.fromCharCode, rr = Object.assign; function sr(e, o) { return ne(e, 0) ^ 45 ? (((o << 2 ^ ne(e, 0)) << 2 ^ ne(e, 1)) << 2 ^ ne(e, 2)) << 2 ^ ne(e, 3) : 0; } function Uo(e) { return e.trim(); } function ar(e, o) { return (e = o.exec(e)) ? e[0] : e; } function U(e, o, n) { return e.replace(o, n); } function Mt(e, o) { return e.indexOf(o); } function ne(e, o) { return e.charCodeAt(o) | 0; } function qe(e, o, n) { return e.slice(o, n); } function Ce(e) { return e.length; } function _t(e) { return e.length; } function rt(e, o) { return o.push(e), e; } function ir(e, o) { return e.map(o).join(""); } var Tt = 1, je = 1, Ho = 0, ue = 0, J = 0, De = ""; function Ct(e, o, n, r, s, i, a) { return { value: e, root: o, parent: n, type: r, props: s, children: i, line: Tt, column: je, length: a, return: "" }; } function Ue(e, o) { return rr(Ct("", null, null, "", null, null, 0), e, { length: -e.length }, o); } function cr() { return J; } function lr() { return J = ue > 0 ? ne(De, --ue) : 0, je--, J === 10 && (je = 1, Tt--), J; } function fe() { return J = ue < Ho ? ne(De, ue++) : 0, je++, J === 10 && (je = 1, Tt++), J; } function Se() { return ne(De, ue); } function ct() { return ue; } function et(e, o) { return qe(De, e, o); } function Ke(e) { switch (e) { // \0 \t \n \r \s whitespace token case 0: case 9: case 10: case 13: case 32: return 5; // ! + , / > @ ~ isolate token case 33: case 43: case 44: case 47: case 62: case 64: case 126: // ; { } breakpoint token case 59: case 123: case 125: return 4; // : accompanied token case 58: return 3; // " ' ( [ opening delimit token case 34: case 39: case 40: case 91: return 2; // ) ] closing delimit token case 41: case 93: return 1; } return 0; } function Wo(e) { return Tt = je = 1, Ho = Ce(De = e), ue = 0, []; } function Go(e) { return De = "", e; } function lt(e) { return Uo(et(ue - 1, Nt(e === 91 ? e + 2 : e === 40 ? e + 1 : e))); } function pr(e) { for (; (J = Se()) && J < 33; ) fe(); return Ke(e) > 2 || Ke(J) > 3 ? "" : " "; } function dr(e, o) { for (; --o && fe() && !(J < 48 || J > 102 || J > 57 && J < 65 || J > 70 && J < 97); ) ; return et(e, ct() + (o < 6 && Se() == 32 && fe() == 32)); } function Nt(e) { for (; fe(); ) switch (J) { // ] ) " ' case e: return ue; // " ' case 34: case 39: e !== 34 && e !== 39 && Nt(J); break; // ( case 40: e === 41 && Nt(e); break; // \ case 92: fe(); break; } return ue; } function ur(e, o) { for (; fe() && e + J !== 57; ) if (e + J === 84 && Se() === 47) break; return "/*" + et(o, ue - 1) + "*" + vt(e === 47 ? e : fe()); } function fr(e) { for (; !Ke(Se()); ) fe(); return et(e, ue); } function mr(e) { return Go(pt("", null, null, null, [""], e = Wo(e), 0, [0], e)); } function pt(e, o, n, r, s, i, a, c, l) { for (var u = 0, p = 0, f = a, T = 0, g = 0, y = 0, d = 1, b = 1, m = 1, v = 0, k = "", N = s, R = i, $ = r, x = k; b; ) switch (y = v, v = fe()) { // ( case 40: if (y != 108 && ne(x, f - 1) == 58) { Mt(x += U(lt(v), "&", "&\f"), "&\f") != -1 && (m = -1); break; } // " ' [ case 34: case 39: case 91: x += lt(v); break; // \t \n \r \s case 9: case 10: case 13: case 32: x += pr(y); break; // \ case 92: x += dr(ct() - 1, 7); continue; // / case 47: switch (Se()) { case 42: case 47: rt(br(ur(fe(), ct()), o, n), l); break; default: x += "/"; } break; // { case 123 * d: c[u++] = Ce(x) * m; // } ; \0 case 125 * d: case 59: case 0: switch (v) { // \0 } case 0: case 125: b = 0; // ; case 59 + p: m == -1 && (x = U(x, /\f/g, "")), g > 0 && Ce(x) - f && rt(g > 32 ? lo(x + ";", r, n, f - 1) : lo(U(x, " ", "") + ";", r, n, f - 2), l); break; // @ ; case 59: x += ";"; // { rule/at-rule default: if (rt($ = co(x, o, n, u, p, s, c, k, N = [], R = [], f), i), v === 123) if (p === 0) pt(x, o, $, $, N, i, f, c, R); else switch (T === 99 && ne(x, 3) === 110 ? 100 : T) { // d l m s case 100: case 108: case 109: case 115: pt(e, $, $, r && rt(co(e, $, $, 0, 0, s, c, k, s, N = [], f), R), s, R, f, c, r ? N : R); break; default: pt(x, $, $, $, [""], R, 0, c, R); } } u = p = g = 0, d = m = 1, k = x = "", f = a; break; // : case 58: f = 1 + Ce(x), g = y; default: if (d < 1) { if (v == 123) --d; else if (v == 125 && d++ == 0 && lr() == 125) continue; } switch (x += vt(v), v * d) { // & case 38: m = p > 0 ? 1 : (x += "\f", -1); break; // , case 44: c[u++] = (Ce(x) - 1) * m, m = 1; break; // @ case 64: Se() === 45 && (x += lt(fe())), T = Se(), p = f = Ce(k = x += fr(ct())), v++; break; // - case 45: y === 45 && Ce(x) == 2 && (d = 0); } } return i; } function co(e, o, n, r, s, i, a, c, l, u, p) { for (var f = s - 1, T = s === 0 ? i : [""], g = _t(T), y = 0, d = 0, b = 0; y < r; ++y) for (var m = 0, v = qe(e, f + 1, f = nr(d = a[y])), k = e; m < g; ++m) (k = Uo(d > 0 ? T[m] + " " + v : U(v, /&\f/g, T[m]))) && (l[b++] = k); return Ct(e, o, n, s === 0 ? Vt : c, l, u, p); } function br(e, o, n) { return Ct(e, o, n, _o, vt(cr()), qe(e, 2, -2), 0); } function lo(e, o, n, r) { return Ct(e, o, n, zt, qe(e, 0, r), qe(e, r + 1, -1), r); } function Ie(e, o) { for (var n = "", r = _t(e), s = 0; s < r; s++) n += o(e[s], s, e, o) || ""; return n; } function gr(e, o, n, r) { switch (e.type) { case or: if (e.children.length) break; case tr: case zt: return e.return = e.return || e.value; case _o: return ""; case Fo: return e.return = e.value + "{" + Ie(e.children, r) + "}"; case Vt: e.value = e.props.join(","); } return Ce(n = Ie(e.children, r)) ? e.return = e.value + "{" + n + "}" : ""; } function yr(e) { var o = _t(e); return function(n, r, s, i) { for (var a = "", c = 0; c < o; c++) a += e[c](n, r, s, i) || ""; return a; }; } function hr(e) { return function(o) { o.root || (o = o.return) && e(o); }; } var vr = function(o, n, r) { for (var s = 0, i = 0; s = i, i = Se(), s === 38 && i === 12 && (n[r] = 1), !Ke(i); ) fe(); return et(o, ue); }, Tr = function(o, n) { var r = -1, s = 44; do switch (Ke(s)) { case 0: s === 38 && Se() === 12 && (n[r] = 1), o[r] += vr(ue - 1, n, r); break; case 2: o[r] += lt(s); break; case 4: if (s === 44) { o[++r] = Se() === 58 ? "&\f" : "", n[r] = o[r].length; break; } // fallthrough default: o[r] += vt(s); } while (s = fe()); return o; }, Cr = function(o, n) { return Go(Tr(Wo(o), n)); }, po = /* @__PURE__ */ new WeakMap(), Sr = function(o) { if (!(o.type !== "rule" || !o.parent || // positive .length indicates that this rule contains pseudo // negative .length indicates that this rule has been already prefixed o.length < 1)) { for (var n = o.value, r = o.parent, s = o.column === r.column && o.line === r.line; r.type !== "rule"; ) if (r = r.parent, !r) return; if (!(o.props.length === 1 && n.charCodeAt(0) !== 58 && !po.get(r)) && !s) { po.set(o, !0); for (var i = [], a = Cr(n, i), c = r.props, l = 0, u = 0; l < a.length; l++) for (var p = 0; p < c.length; p++, u++) o.props[u] = i[l] ? a[l].replace(/&\f/g, c[p]) : c[p] + " " + a[l]; } } }, xr = function(o) { if (o.type === "decl") { var n = o.value; // charcode for l n.charCodeAt(0) === 108 && // charcode for b n.charCodeAt(2) === 98 && (o.return = "", o.value = ""); } }; function qo(e, o) { switch (sr(e, o)) { // color-adjust case 5103: return F + "print-" + e + e; // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function) case 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break case 5572: case 6356: case 5844: case 3191: case 6645: case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite, case 6391: case 5879: case 5623: case 6135: case 4599: case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width) case 4215: case 6389: case 5109: case 5365: case 5621: case 3829: return F + e + e; // appearance, user-select, transform, hyphens, text-size-adjust case 5349: case 4246: case 4810: case 6968: case 2756: return F + e + ut + e + se + e + e; // flex, flex-direction case 6828: case 4268: return F + e + se + e + e; // order case 6165: return F + e + se + "flex-" + e + e; // align-items case 5187: return F + e + U(e, /(\w+).+(:[^]+)/, F + "box-$1$2" + se + "flex-$1$2") + e; // align-self case 5443: return F + e + se + "flex-item-" + U(e, /flex-|-self/, "") + e; // align-content case 4675: return F + e + se + "flex-line-pack" + U(e, /align-content|flex-|-self/, "") + e; // flex-shrink case 5548: return F + e + se + U(e, "shrink", "negative") + e; // flex-basis case 5292: return F + e + se + U(e, "basis", "preferred-size") + e; // flex-grow case 6060: return F + "box-" + U(e, "-grow", "") + F + e + se + U(e, "grow", "positive") + e; // transition case 4554: return F + U(e, /([^-])(transform)/g, "$1" + F + "$2") + e; // cursor case 6187: return U(U(U(e, /(zoom-|grab)/, F + "$1"), /(image-set)/, F + "$1"), e, "") + e; // background, background-image case 5495: case 3959: return U(e, /(image-set\([^]*)/, F + "$1$`$1"); // justify-content case 4968: return U(U(e, /(.+:)(flex-)?(.*)/, F + "box-pack:$3" + se + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + F + e + e; // (margin|padding)-inline-(start|end) case 4095: case 3583: case 4068: case 2532: return U(e, /(.+)-inline(.+)/, F + "$1$2") + e; // (min|max)?(width|height|inline-size|block-size) case 8116: case 7059: case 5753: case 5535: case 5445: case 5701: case 4933: case 4677: case 5533: case 5789: case 5021: case 4765: if (Ce(e) - 1 - o > 6) switch (ne(e, o + 1)) { // (m)ax-content, (m)in-content case 109: if (ne(e, o + 4) !== 45) break; // (f)ill-available, (f)it-content case 102: return U(e, /(.+:)(.+)-([^]+)/, "$1" + F + "$2-$3$1" + ut + (ne(e, o + 3) == 108 ? "$3" : "$2-$3")) + e; // (s)tretch case 115: return ~Mt(e, "stretch") ? qo(U(e, "stretch", "fill-available"), o) + e : e; } break; // position: sticky case 4949: if (ne(e, o + 1) !== 115) break; // display: (flex|inline-flex) case 6444: switch (ne(e, Ce(e) - 3 - (~Mt(e, "!important") && 10))) { // stic(k)y case 107: return U(e, ":", ":" + F) + e; // (inline-)?fl(e)x case 101: return U(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + F + (ne(e, 14) === 45 ? "inline-" : "") + "box$3$1" + F + "$2$3$1" + se + "$2box$3") + e; } break; // writing-mode case 5936: switch (ne(e, o + 11)) { // vertical-l(r) case 114: return F + e + se + U(e, /[svh]\w+-[tblr]{2}/, "tb") + e; // vertical-r(l) case 108: return F + e + se + U(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e; // horizontal(-)tb case 45: return F + e + se + U(e, /[svh]\w+-[tblr]{2}/, "lr") + e; } return F + e + se + e + e; } return e; } var wr = function(o, n, r, s) { if (o.length > -1 && !o.return) switch (o.type) { case zt: o.return = qo(o.value, o.length); break; case Fo: return Ie([Ue(o, { value: U(o.value, "@", "@" + F) })], s); case Vt: if (o.length) return ir(o.props, function(i) { switch (ar(i, /(::plac\w+|:read-\w+)/)) { // :read-(only|write) case ":read-only": case ":read-write": return Ie([Ue(o, { props: [U(i, /:(read-\w+)/, ":" + ut + "$1")] })], s); // :placeholder case "::placeholder": return Ie([Ue(o, { props: [U(i, /:(plac\w+)/, ":" + F + "input-$1")] }), Ue(o, { props: [U(i, /:(plac\w+)/, ":" + ut + "$1")] }), Ue(o, { props: [U(i, /:(plac\w+)/, se + "input-$1")] })], s); } return ""; }); } }, Pr = [wr], kr = function(o) { var n = o.key; if (n === "css") { var r = document.querySelectorAll("style[data-emotion]:not([data-s])"); Array.prototype.forEach.call(r, function(d) { var b = d.getAttribute("data-emotion"); b.indexOf(" ") !== -1 && (document.head.appendChild(d), d.setAttribute("data-s", "")); }); } var s = o.stylisPlugins || Pr, i = {}, a, c = []; a = o.container || document.head, Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which // means that the style elements we're looking at are only Emotion 11 server-rendered style elements document.querySelectorAll('style[data-emotion^="' + n + ' "]'), function(d) { for (var b = d.getAttribute("data-emotion").split(" "), m = 1; m < b.length; m++) i[b[m]] = !0; c.push(d); } ); var l, u = [Sr, xr]; { var p, f = [gr, hr(function(d) { p.insert(d); })], T = yr(u.concat(s, f)), g = function(b) { return Ie(mr(b), T); }; l = function(b, m, v, k) { p = v, g(b ? b + "{" + m.styles + "}" : m.styles), k && (y.inserted[m.name] = !0); }; } var y = { key: n, sheet: new zo({ key: n, container: a, nonce: o.nonce, speedy: o.speedy, prepend: o.prepend, insertionPoint: o.insertionPoint }), nonce: o.nonce, inserted: i, registered: {}, insert: l }; return y.sheet.hydrate(c), y; }; const wt = /* @__PURE__ */ new Map(), Or = (e, o) => { const n = kr(e); return n.sheet = new o({ key: n.key, nonce: n.sheet.nonce, container: n.sheet.container, speedy: n.sheet.isSpeedy, prepend: n.sheet.prepend, insertionPoint: n.sheet.insertionPoint }), n; }; let Pe; if (typeof document == "object" && (Pe = document.querySelector('[name="emotion-insertion-point"]'), !Pe)) { Pe = document.createElement("meta"), Pe.setAttribute("name", "emotion-insertion-point"), Pe.setAttribute("content", ""); const e = document.querySelector("head"); e && e.prepend(Pe); } function Rr(e, o) { if (e || o) { class n extends zo { insert(i, a) { return this.key && this.key.endsWith("global") && (this.before = Pe), super.insert(i, a); } } const r = Or({ key: "css", insertionPoint: e ? Pe : void 0 }, n); if (o) { const s = r.insert; r.insert = (...i) => (i[1].styles.match(/^@layer\s+[^{]*$/) || (i[1].styles = `@layer mui {${i[1].styles}}`), s(...i)); } return r; } } function Mr(e) { const { injectFirst: o, enableCssLayer: n, children: r } = e, s = h.useMemo(() => { const i = `${o}-${n}`; if (typeof document == "object" && wt.has(i)) return wt.get(i); const a = Rr(o, n); return wt.set(i, a), a; }, [o, n]); return s ? /* @__PURE__ */ C(bn, { value: s, children: r }) : r; } process.env.NODE_ENV !== "production" && (Mr.propTypes = { /** * Your component tree. */ children: t.node, /** * If `true`, the styles are wrapped in `@layer mui`. * Learn more about [Cascade layers](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/Cascade_layers). */ enableCssLayer: t.bool, /** * By default, the styles are injected last in the <head> element of the page. * As a result, they gain more specificity than any other style sheet. * If you want to override MUI's styles, set this prop. */ injectFirst: t.bool }); const Nr = "exact-prop: ​"; function Ko(e) { return process.env.NODE_ENV === "production" ? e : { ...e, [Nr]: (o) => { const n = Object.keys(o).filter((r) => !e.hasOwnProperty(r)); return n.length > 0 ? new Error(`The following props are not supported: ${n.map((r) => `\`${r}\``).join(", ")}. Please remove them.`) : null; } }; } const Ft = /* @__PURE__ */ h.createContext(null); process.env.NODE_ENV !== "production" && (Ft.displayName = "ThemeContext"); function Ut() { const e = h.useContext(Ft); return process.env.NODE_ENV !== "production" && h.useDebugValue(e), e; } const $r = typeof Symbol == "function" && Symbol.for, Er = $r ? Symbol.for("mui.nested") : "__THEME_NESTED__"; function Ar(e, o) { if (typeof o == "function") { const n = o(e); return process.env.NODE_ENV !== "production" && (n || console.error(["MUI: You should return an object from your theme function, i.e.", "<ThemeProvider theme={() => ({})} />"].join(` `))), n; } return { ...e, ...o }; } function ft(e) { const { children: o, theme: n } = e, r = Ut(); process.env.NODE_ENV !== "production" && r === null && typeof n == "function" && console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:", "<ThemeProvider theme={outerTheme => outerTheme} />", "", "However, no outer theme is present.", "Make sure a theme is already injected higher in the React tree or provide a theme object."].join(` `)); const s = h.useMemo(() => { const i = r === null ? { ...n } : Ar(r, n); return i != null && (i[Er] = r !== null), i; }, [n, r]); return /* @__PURE__ */ C(Ft.Provider, { value: s, children: o }); } process.env.NODE_ENV !== "production" && (ft.propTypes = { /** * Your component tree. */ children: t.node, /** * A theme object. You can provide a function to extend the outer theme. */ theme: t.oneOfType([t.object, t.func]).isRequired }); process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && (ft.propTypes = Ko(ft.propTypes)); let uo = 0; function Br(e) { const [o, n] = h.useState(e), r = e || o; return h.useEffect(() => { o == null && (uo += 1, n(`mui-${uo}`)); }, [o]), r; } const Ir = { ...h }, fo = Ir.useId; function jr(e) { return fo !== void 0 ? fo() : Br(e); } function Lr(e) { const o = Ao(), n = jr() || "", { modularCssLayers: r } = e; let s = "mui.global, mui.components, mui.theme, mui.custom, mui.sx"; return !r || o !== null ? s = "" : typeof r == "string" ? s = r.replace(/mui(?!\.)/g, s) : s = `@layer ${s};`, Bo(() => { var c, l; const i = document.querySelector("head"); if (!i) return; const a = i.firstChild; if (s) { if (a && ((c = a.hasAttribute) != null && c.call(a, "data-mui-layer-order")) && a.getAttribute("data-mui-layer-order") === n) return; const u = document.createElement("style"); u.setAttribute("data-mui-layer-order", n), u.textContent = s, i.prepend(u); } else (l = i.querySelector(`style[data-mui-layer-order="${n}"]`)) == null || l.remove(); }, [s, n]), s ? /* @__PURE__ */ C(Pn, { styles: s }) : null; } const mo = {}; function bo(e, o, n, r = !1) { return h.useMemo(() => { const s = e && o[e] || o; if (typeof n == "function") { const i = n(s), a = e ? { ...o, [e]: i } : i; return r ? () => a : a; } return e ? { ...o, [e]: n } : { ...o, ...n }; }, [e, o, n, r]); } function Ye(e) { const { children: o, theme: n, themeId: r } = e, s = Ao(mo), i = Ut() || mo; process.env.NODE_ENV !== "production" && (s === null && typeof n == "function" || r && s && !s[r] && typeof n == "function") && console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:", "<ThemeProvider theme={outerTheme => outerTheme} />", "", "However, no outer theme is present.", "Make sure a theme is already injected higher in the React tree or provide a theme object."].join(` `)); const a = bo(r, s, n), c = bo(r, i, n, !0), l = (r ? a[r] : a).direction === "rtl", u = Lr(a); return /* @__PURE__ */ C(ft, { theme: c, children: /* @__PURE__ */ C(gn.Provider, { value: a, children: /* @__PURE__ */ C(wn, { value: l, children: /* @__PURE__ */ le(On, { value: r ? a[r].components : a.components, children: [u, o] }) }) }) }); } process.env.NODE_ENV !== "production" && (Ye.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ // └─────────────────────────────────────────────────────────────────────┘ /** * Your component tree. */ children: t.node, /** * A theme object. You can provide a function to extend the outer theme. */ theme: t.oneOfType([t.func, t.object]).isRequired, /** * The design system's unique id for getting the corresponded theme when there are multiple design systems. */ themeId: t.string }); process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && (Ye.propTypes = Ko(Ye.propTypes)); const Ht = "mode", Wt = "color-scheme", Dr = "data-color-scheme"; function Vr(e) { const { defaultMode: o = "system", defaultLightColorScheme: n = "light", defaultDarkColorScheme: r = "dark", modeStorageKey: s = Ht, colorSchemeStorageKey: i = Wt, attribute: a = Dr, colorSchemeNode: c = "document.documentElement", nonce: l } = e || {}; let u = "", p = a; if (a === "class" && (p = ".%s"), a === "data" && (p = "[data-%s]"), p.startsWith(".")) { const T = p.substring(1); u += `${c}.classList.remove('${T}'.replace('%s', light), '${T}'.replace('%s', dark)); ${c}.classList.add('${T}'.replace('%s', colorScheme));`; } const f = p.match(/\[([^[\]]+)\]/); if (f) { const [T, g] = f[1].split("="); g || (u += `${c}.removeAttribute('${T}'.replace('%s', light)); ${c}.removeAttribute('${T}'.replace('%s', dark));`), u += ` ${c}.setAttribute('${T}'.replace('%s', colorScheme), ${g ? `${g}.replace('%s', colorScheme)` : '""'});`; } else u += `${c}.setAttribute('${p}', colorScheme);`; return /* @__PURE__ */ C("script", { suppressHydrationWarning: !0, nonce: typeof window > "u" ? l : "", dangerouslySetInnerHTML: { __html: `(function() { try { let colorScheme = ''; const mode = localStorage.getItem('${s}') || '${o}'; const dark = localStorage.getItem('${i}-dark') || '${r}'; const light = localStorage.getItem('${i}-light') || '${n}'; if (mode === 'system') { // handle system mode const mql = window.matchMedia('(prefers-color-scheme: dark)'); if (mql.matches) { colorScheme = dark } else { colorScheme = light } } if (mode === 'light') { colorScheme = light; } if (mode === 'dark') { colorScheme = dark; } if (colorScheme) { ${u} } } catch(e){}})();` } }, "mui-color-scheme-init"); } function zr() { } const _r = ({ key: e, storageWindow: o }) => (!o && typeof window < "u" && (o = window), { get(n) { if (typeof window > "u") return; if (!o) return n; let r; try { r = o.localStorage.getItem(e); } catch { } return r || n; }, set: (n) => { if (o) try { o.localStorage.setItem(e, n); } catch { } }, subscribe: (n) => { if (!o) return zr; const r = (s) => { const i = s.newValue; s.key === e && n(i); }; return o.addEventListener("storage", r), () => { o.removeEventListener("storage", r); }; } }); function Pt() { } function go(e) { if (typeof window < "u" && typeof window.matchMedia == "function" && e === "system") return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } function Yo(e, o) { if (e.mode === "light" || e.mode === "system" && e.systemMode === "light") return o("light"); if (e.mode === "dark" || e.mode === "system" && e.systemMode === "dark") return o("dark"); } function Fr(e) { return Yo(e, (o) => { if (o === "light") return e.lightColorScheme; if (o === "dark") return e.darkColorScheme; }); } function Ur(e) { const { defaultMode: o = "light", defaultLightColorScheme: n, defaultDarkColorScheme: r, supportedColorSchemes: s = [], modeStorageKey: i = Ht, colorSchemeStorageKey: a = Wt, storageWindow: c = typeof window > "u" ? void 0 : window, storageManager: l = _r, noSsr: u = !1 } = e, p = s.join(","), f = s.length > 1, T = h.useMemo(() => l == null ? void 0 : l({ key: i, storageWindow: c }), [l, i, c]), g = h.useMemo(() => l == null ? void 0 : l({ key: `${a}-light`, storageWindow: c }), [l, a, c]), y = h.useMemo(() => l == null ? void 0 : l({ key: `${a}-dark`, storageWindow: c }), [l, a, c]), [d, b] = h.useState(() => { const P = (T == null ? void 0 : T.get(o)) || o, S = (g == null ? void 0 : g.get(n)) || n, w = (y == null ? void 0 : y.get(r)) || r; return { mode: P, systemMode: go(P), lightColorScheme: S, darkColorScheme: w }; }), [m, v] = h.useState(u || !f); h.useEffect(() => { v(!0); }, []); const k = Fr(d), N = h.useCallback((P) => { b((S) => { if (P === S.mode) return S; const w = P ?? o; return T == null || T.set(w), { ...S, mode: w, systemMode: go(w) }; }); }, [T, o]), R = h.useCallback((P) => { P ? typeof P == "string" ? P && !p.includes(P) ? console.error(`\`${P}\` does not exist in \`theme.colorSchemes\`.`) : b((S) => { const w = { ...S }; return Yo(S, (M) => { M === "light" && (g == null || g.set(P), w.lightColorScheme = P), M === "dark" && (y == null || y.set(P), w.darkColorScheme = P); }), w; }) : b((S) => { const w = { ...S }, M = P.light === null ? n : P.light, L = P.dark === null ? r : P.dark; return M && (p.includes(M) ? (w.lightColorScheme = M, g == null || g.set(M)) : console.error(`\`${M}\` does not exist in \`theme.colorSchemes\`.`)), L && (p.includes(L) ? (w.darkColorScheme = L, y == null || y.set(L)) : console.error(`\`${L}\` does not exist in \`theme.colorSchemes\`.`)), w; }) : b((S) => (g == null || g.set(n), y == null || y.set(r), { ...S, lightColorScheme: n, darkColorScheme: r })); }, [p, g, y, n, r]), $ = h.useCallback((P) => { d.mode === "system" && b((S) => { const w = P != null && P.matches ? "dark" : "light"; return S.systemMode === w ? S : { ...S, systemMode: w }; }); }, [d.mode]), x = h.useRef($); return x.current = $, h.useEffect(() => { if (typeof window.matchMedia != "function" || !f) return; const P = (...w) => x.current(...w), S = window.matchMedia("(prefers-color-scheme: dark)"); return S.addListener(P), P(S), () => { S.removeListener(P); }; }, [f]), h.useEffect(() => { if (f) { const P = (T == null ? void 0 : T.subscribe((M) => { (!M || ["light", "dark", "system"].includes(M)) && N(M || o); })) || Pt, S = (g == null ? void 0 : g.subscribe((M) => { (!M || p.match(M)) && R({ light: M }); })) || Pt, w = (y == null ? void 0 : y.subscribe((M) => { (!M || p.match(M)) && R({ dark: M }); })) || Pt; return () => { P(), S(), w(); }; } }, [R, N, p, o, c, f, T, g, y]), { ...d, mode: m ? d.mode : void 0, systemMode: m ? d.systemMode : void 0, colorScheme: m ? k : void 0, setMode: N, setColorScheme: R }; } const Hr = "*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}"; function Wr(e) { const { themeId: o, /** * This `theme` object needs to follow a certain structure to * be used correctly by the finel `CssVarsProvider`. It should have a * `colorSchemes` key with the light and dark (and any other) palette. * It should also ideally have a vars object created using `prepareCssVars`. */ theme: n = {}, modeStorageKey: r = Ht, colorSchemeStorageKey: s = Wt, disableTransitionOnChange: i = !1, defaultColorScheme: a, resolveTheme: c } = e, l = { allColorSchemes: [], colorScheme: void 0, darkColorScheme: void 0, lightColorScheme: void 0, mode: void 0, setColorScheme: () => { }, setMode: () => { }, systemMode: void 0 }, u = /* @__PURE__ */ h.createContext(void 0); process.env.NODE_ENV !== "production" && (u.displayName = "ColorSchemeContext"); const p = () => h.useContext(u) || l, f = {}, T = {}; function g(m) { var eo, to, oo, no; const { children: v, theme: k, modeStorageKey: N = r, colorSchemeStorageKey: R = s, disableTransitionOnChange: $ = i, storageManager: x, storageWindow: P = typeof window > "u" ? void 0 : window, documentNode: S = typeof document > "u" ? void 0 : document, colorSchemeNode: w = typeof document > "u" ? void 0 : document.documentElement, disableNestedContext: M = !1, disableStyleSheetGeneration: L = !1, defaultMode: W = "system", forceThemeRerender: G = !1, noSsr: q } = m, te = h.useRef(!1), X = Ut(), E = h.useContext(u), H = !!E && !M, ee = h.useMemo(() => k || (typeof n == "function" ? n() : n), [k]), he = ee[o], Y = he || ee, { colorSchemes: Z = f, components: be = T, cssVarPrefix: ae } = Y, Me = Object.keys(Z).filter((re) => !!Z[re]).join(","), ve = h.useMemo(() => Me.split(","), [Me]), Ne = typeof a == "string" ? a : a.light, $e = typeof a == "string" ? a : a.dark, ze = Z[Ne] && Z[$e] ? W : ((to = (eo = Z[Y.defaultColorScheme]) == null ? void 0 : eo.palette) == null ? void 0 : to.mode) || ((oo = Y.palette) == null ? void 0 : oo.mode), { mode: _e, setMode: ie, systemMode: oe, lightColorScheme: pe, darkColorScheme: me, colorScheme: tt, setColorScheme: Qt } = Ur({ supportedColorSchemes: ve, defaultLightColorScheme: Ne, defaultDarkColorScheme: $e, modeStorageKey: N, colorSchemeStorageKey: R, defaultMode: ze, storageManager: x, storageWindow: P, noSsr: q }); let St = _e, ge = tt; H && (St = E.mode, ge = E.colorScheme), process.env.NODE_ENV !== "production" && G && !Y.vars && console.warn(["MUI: The `forceThemeRerender` prop should only be used with CSS theme variables.", "Note that it will slow down the app when changing between modes, so only do this when you cannot find a better solution."].join(` `)); let ot = ge || Y.defaultColorScheme; Y.vars && !G && (ot = Y.defaultColorScheme); const Ee = h.useMemo(() => { var ke; const re = ((ke = Y.generateThemeVars) == null ? void 0 : ke.call(Y)) || Y.vars, Q = { ...Y, components: be, colorSchemes: Z, cssVarPrefix: ae, vars: re }; if (typeof Q.generateSpacing == "function" && (Q.spacing = Q.generateSpacing()), ot) { const Te = Z[ot]; Te && typeof Te == "object" && Object.keys(Te).forEach((ye) => { Te[ye] && typeof Te[ye] == "object" ? Q[ye] = { ...Q[ye], ...Te[ye] } : Q[ye] = Te[ye]; }); } return c ? c(Q) : Q; }, [Y, ot, be, Z, ae]), Fe = Y.colorSchemeSelector; Bo(() => { if (ge && w && Fe && Fe !== "media") { const re = Fe; let Q = Fe; if (re === "class" && (Q = ".%s"), re === "data" && (Q = "[data-%s]"), re != null && re.startsWith("data-") && !re.includes("%s") && (Q = `[${re}="%s"]`), Q.startsWith(".")) w.classList.remove(...ve.map((ke) => Q.substring(1).replace("%s", ke))), w.classList.add(Q.substring(1).replace("%s", ge)); else { const ke = Q.replace("%s", ge).match(/\[([^\]]+)\]/); if (ke) { const [Te, ye] = ke[1].split("="); ye || ve.forEach((fn) => { w.removeAttribute(Te.replace(ge, fn)); }), w.setAttribute(Te, ye ? ye.replace(/"|'/g, "") : ""); } else w.setAttribute(Q, ge); } } }, [ge, Fe, w, ve]), h.useEffect(() => { let re; if ($ && te.current && S) { const Q = S.createElement("style"); Q.appendChild(S.createTextNode(Hr)), S.head.appendChild(Q), window.getComputedStyle(S.body), re = setTimeout(() => { S.head.removeChild(Q); }, 1); } return () => { clearTimeout(re); }; }, [ge, $, S]), h.useEffect(() => (te.current = !0, () => { te.current = !1; }), []); const un = h.useMemo(() => ({ allColorSchemes: ve, colorScheme: ge, darkColorScheme: me, lightColorScheme: pe, mode: St, setColorScheme: Qt, setMode: process.env.NODE_ENV === "production" ? ie : (re) => { Ee.colorSchemeSelector === "media" && console.error(["MUI: The `setMode` function has no effect if `colorSchemeSelector` is `media` (`media` is the default value).", "To toggle the mode manually, please configure `colorSchemeSelector` to use a class or data attribute.", "To learn more, visit https://mui.com/material-ui/customization/css-theme-variables/configuration/#toggling-dark-mode-manually"].join(` `)), ie(re); }, systemMode: oe }), [ve, ge, me, pe, St, Qt, ie, oe, Ee.colorSchemeSelector]); let Zt = !0; (L || Y.cssVariables === !1 || H && (X == null ? void 0 : X.cssVarPrefix) === ae) && (Zt = !1); const Jt = /* @__PURE__ */ le(h.Fragment, { children: [/* @__PURE__ */ C(Ye, { themeId: he ? o : void 0, theme: Ee, children: v }), Zt && /* @__PURE__ */ C(kn, { styles: ((no = Ee.generateStyleSheets) == null ? void 0 : no.call(Ee)) || [] })] }); return H ? Jt : /* @__PURE__ */ C(u.Provider, { value: un, children: Jt }); } process.env.NODE_ENV !== "production" && (g.propTypes = { /** * The component tree. */ children: t.node, /** * The node used to attach the color-scheme attribute */ colorSchemeNode: t.any, /** * localStorage key used to store `colorScheme` */ colorSchemeStorageKey: t.string, /** * The default mode when the storage is empty, * require the theme to have `colorSchemes` with light and dark. */ defaultMode: t.string, /** * If `true`, the provider creates its own context and generate stylesheet as if it is a root `CssVarsProvider`. */ disableNestedContext: t.bool, /** * If `true`, the style sheet won't be generated. * * This is useful for controlling nested CssVarsProvider behavior. */ disableStyleSheetGeneration: t.bool, /** * Disable CSS transitions when switching between modes or color schemes. */ disableTransitionOnChange: t.bool, /** * The document to attach the attribute to. */ documentNode: t.any, /** * If `true`, theme values are recalculated when the mode changes. */ forceThemeRerender: t.bool, /** * The key in the local storage used to store current color scheme. */ modeStorageKey: t.string, /** * If `true`, the mode will be the same value as the storage without an extra rerendering after the hydration. * You should use this option in conjunction with `InitColorSchemeScript` component. */ noSsr: t.bool, /** * The storage manager to be used for storing the mode and color scheme * @default using `window.localStorage` */ storageManager: t.func, /** * The window that attaches the 'storage' event listener. * @default window */ storageWindow: t.any, /** * The calculated theme object that will be passed through context. */ theme: t.object }); const y = typeof a == "string" ? a : a.light, d = typeof a == "string" ? a : a.dark; return { CssVarsProvider: g, useColorScheme: p, getInitColorSchemeScript: (m) => Vr({ colorSchemeStorageKey: s, defaultLightColorScheme: y, defaultDarkColorScheme: d, modeStorageKey: r, ...m }) }; } const Gr = yn(), qr = En("div", { name: "MuiContainer", slot: "Root", overridesResolver: (e, o) => { const { ownerState: n } = e; return [o.root, o[`maxWidth${$o(String(n.maxWidth))}`], n.fixed && o.fixed, n.disableGutters && o.disableGutters]; } }), Kr = (e) => In({ props: e, name: "MuiContainer", defaultTheme: Gr }), Yr = (e, o) => { const n = (l) => Bn(o, l), { classes: r, fixed: s, disableGutters: i, maxWidth: a } = e, c = { root: ["root", a && `maxWidth${$o(String(a))}`, s && "fixed", i && "disableGutters"] }; return An(c, n, r); }; function Xr(e = {}) { const { // This will allow adding custom styled fn (for example for custom sx style function) createStyledComponent: o = qr, useThemeProps: n = Kr, componentName: r = "MuiContainer" } = e, s = o(({ theme: a, ownerState: c }) => ({ width: "100%", marginLeft: "auto", boxSizing: "border-box", marginRight: "auto", ...!c.disableGutters && { paddingLeft: a.spacing(2), paddingRight: a.spacing(2), // @ts-ignore module augmentation fails if custom breakpoints are used [a.breakpoints.up("sm")]: { paddingLeft: a.spacing(3), paddingRight: a.spacing(3) } } }), ({ theme: a, ownerState: c }) => c.fixed && Object.keys(a.breakpoints.values).reduce((l, u) => { const p = u, f = a.breakpoints.values[p]; return f !== 0 && (l[a.breakpoints.up(p)] = { maxWidth: `${f}${a.breakpoints.unit}` }), l; }, {}), ({ theme: a, ownerState: c }) => ({ // @ts-ignore module augmentation fails if custom breakpoints are used ...c.maxWidth === "xs" && { // @ts-ignore module augmentation fails if custom breakpoints are used [a.breakpoints.up("xs")]: { // @ts-ignore module augmentation fails if custom breakpoints are used maxWidth: Math.max(a.breakpoints.values.xs, 444) } }, ...c.maxWidth && // @ts-ignore module augmentation fails if custom breakpoints are used c.maxWidth !== "xs" && { // @ts-ignore module augmentation fails if custom breakpoints are used [a.breakpoints.up(c.maxWidth)]: { // @ts-ignore module augmentation fails if custom breakpoints are used maxWidth: `${a.breakpoints.values[c.maxWidth]}${a.breakpoints.unit}` } } })), i = /* @__PURE__ */ h.forwardRef(function(c, l) { const u = n(c), { className: p, component: f = "div", disableGutters: T = !1, fixed: g = !1, maxWidth: y = "lg", classes: d, ...b } = u, m = { ...u, component: f, disableGutters: T, fixed: g, maxWidth: y }, v = Yr(m, r); return ( // @ts-ignore theme is injected by the styled util /* @__PURE__ */ C(s, { as: f, ownerState: m, className: I(v.root, p), ref: l, ...b }) ); }); return process.env.NODE_ENV !== "production" && (i.propTypes = { children: t.node, classes: t.object, className: t.string, component: t.elementType, disableGutters: t.bool, fixed: t.bool, maxWidth: t.oneOfType([t.oneOf(["xs", "sm", "md", "lg", "xl", !1]), t.string]), sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]) }), i; } function xl(e) { process.env.NODE_ENV !== "production" && console.warn(["MUI: adaptV4Theme() is deprecated.", "Follow the upgrade guide on https://mui.com/r/migration-v4#theme."].join(` `)); const { defaultProps: o = {}, mixins: n = {}, overrides: r = {}, palette: s = {}, props: i = {}, styleOverrides: a = {}, ...c } = e, l = { ...c, components: {} }; Object.keys(o).forEach((d) => { const b = l.components[d] || {}; b.defaultProps = o[d], l.components[d] = b; }), Object.keys(i).forEach((d) => { const b = l.components[d] || {}; b.defaultProps = i[d], l.components[d] = b; }), Object.keys(a).forEach((d) => { const b = l.components[d] || {}; b.styleOverrides = a[d], l.components[d] = b; }), Object.keys(r).forEach((d) => { const b = l.components[d] || {}; b.styleOverrides = r[d], l.components[d] = b; }), l.spacing = hn(e.spacing); const u = vn(e.breakpoints || {}), p = l.spacing; l.mixins = { gutters: (d = {}) => ({ paddingLeft: p(2), paddingRight: p(2), ...d, [u.up("sm")]: { paddingLeft: p(3), paddingRight: p(3), ...d[u.up("sm")] } }), ...n }; const { type: f, mode: T, ...g } = s, y = T || f || "light"; return l.palette = { // theme.palette.text.hint text: { hint: y === "dark" ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.38)" }, mode: y, type: y, ...g }, l; } function wl(e, ...o) { return Eo(Tn({ unstable_strictMode: !0 }, e), ...o); } let yo = !1; function Pl(e) { return yo || (console.warn(["MUI: createStyles from @mui/material/styles is deprecated.", "Please use @mui/styles/createStyles"].join(` `)), yo = !0), e; } function ho(e) { return String(parseFloat(e)).length === String(e).length; } function Xo(e) { return String(e).match(/[\d.\-+]*\s*(.*)/)[1] || ""; } function we(e) { return parseFloat(e); } function Qr(e) { return (o, n) => { const r = Xo(o); if (r === n) return o; let s = we(o); r !== "px" && (r === "em" || r === "rem") && (s = we(o) * we(e)); let i = s; if (n !== "px") if (n === "em") i = s / we(e); else if (n === "rem") i = s / we(e); else return o; return parseFloat(i.toFixed(5)) + n; }; } function Zr({ size: e, grid: o }) { const n = e - e % o, r = n + o; return e - n < r - e ? n : r; } function Jr({ lineHeight: e, pixels: o, htmlFontSize: n }) { return o / (e * n); } function es({ cssProperty: e, min: o, max: n, unit: r = "rem", breakpoints: s = [600, 900, 1200], transform: i = null }) { const a = { [e]: `${o}${r}` }, c = (n - o) / s[s.length - 1]; return s.forEach((l) => { let u = o + c * l; i !== null && (u = i(u)), a[`@media (min-width:${l}px)`] = { [e]: `${Math.round(u * 1e4) / 1e4}${r}` }; }), a; } function kl(e, o = {}) { const { breakpoints: n = ["sm", "md", "lg"], disableAlign: r = !1, factor: s = 2, variants: i = ["h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "caption", "button", "overline"] } = o, a = { ...e }; a.typography = { ...a.typography }; const c = a.typography, l = Qr(c.htmlFontSize), u = n.map((p) => a.breakpoints.values[p]); return i.forEach((p) => { const f = c[p]; if (!f) return; const T = parseFloat(l(f.fontSize, "rem")); if (T <= 1) return; const g = T, y = 1 + (g - 1) / s; let { lineHeight: d } = f; if (!ho(d) && !r) throw new Error(process.env.NODE_ENV !== "production" ? `MUI: Unsupported non-unitless line height with grid alignment. Use unitless line heights instead.` : Ze(6)); ho(d) || (d = parseFloat(l(d, "rem")) / parseFloat(T)); let b = null; r || (b = (m) => Zr({ size: m, grid: Jr({ pixels: 4, lineHeight: d, htmlFontSi