mongodb-chatbot-ui
Version:
UI React components for the MongoDB Chatbot Framework
1,689 lines (1,685 loc) • 301 kB
JavaScript
import Y, { useRef as ff, useEffect as pf } from "react";
import { l as mf } from "./index8.js";
import { M as ml, c as vl, Y as vf, Z as bf, a0 as De, a1 as yf, a2 as Vs, a3 as gf, a4 as tr, a5 as ae, a6 as Gs, a7 as _r, a8 as Ys, a9 as hf, a as Ks, aa as Xs, ab as Rf, F as f, h as de, b as X, m as h, ac as Ef, i as _f, k as kl, L as Io, l as Mr, A as Bo, d as Js, o as ze, ad as Qs } from "./index2.js";
import { p as fe, a as Cf, c as Nl, g as wf } from "./jsx-runtime.js";
import { r as Cr, p as Zs, i as Pf, a as xf, o as qf } from "./index3.js";
var ao = ml.slower, he = function() {
var e, r;
if (typeof window < "u") {
var t = { setRippleListener: !1, registeredRippleElements: /* @__PURE__ */ new WeakMap() };
return (r = (e = window).__LEAFYGREEN_UTILS__) !== null && r !== void 0 || (e.__LEAFYGREEN_UTILS__ = { modules: {} }), window.__LEAFYGREEN_UTILS__.modules["@leafygreen-ui/ripple"] = t, window.__LEAFYGREEN_UTILS__.modules["@leafygreen-ui/ripple"];
}
}();
function Sf(e) {
he != null && he.registeredRippleElements.has(e.target) && function(r) {
var t = r.target, a = he == null ? void 0 : he.registeredRippleElements.get(t);
if (!(!t || !a)) {
var n = a.backgroundColor, o = t.getBoundingClientRect(), l = document.createElement("span");
l.className = "lg-ui-ripple", l.style.height = l.style.width = Math.max(o.width, o.height) + "px", t.appendChild(l);
var u = r.pageY - o.top - l.offsetHeight / 2 - document.body.scrollTop, i = r.pageX - o.left - l.offsetWidth / 2 - document.body.scrollLeft;
l.style.top = u + "px", l.style.left = i + "px", l.style.background = n, setTimeout(function() {
l.remove();
}, 750);
}
}(e);
}
function Of(e, r) {
if (he) {
if (he.registeredRippleElements.set(e, r), !he.setRippleListener) {
document.addEventListener("click", Sf, { passive: !0 });
var t = document.createElement("style");
t.innerHTML = Tf, document.head.append(t), he.setRippleListener = !0;
}
return function() {
he.registeredRippleElements.delete(e);
};
}
}
var Tf = `
@-webkit-keyframes lg-ui-ripple {
from {
opacity:1;
}
to {
transform: scale(2);
transition: opacity `.concat(ao, `ms;
opacity: 0;
}
}
@-moz-keyframes lg-ui-ripple {
from {
opacity:1;
}
to {
transform: scale(2);
transition: opacity `).concat(ao, `ms;
opacity: 0;
}
}
@keyframes lg-ui-ripple {
from {
opacity:1;
}
to {
transform: scale(2);
transition: opacity `).concat(ao, `ms;
opacity: 0;
}
}
.lg-ui-ripple {
position: absolute;
border-radius: 100%;
transform: scale(0.2);
opacity: 0;
pointer-events: none;
// Ensures that text is shown above ripple effect
z-index: -1;
-webkit-animation: lg-ui-ripple .75s ease-out;
-moz-animation: lg-ui-ripple .75s ease-out;
animation: lg-ui-ripple .75s ease-out;
}
@media (prefers-reduced-motion: reduce) {
.lg-ui-ripple {
animation: none;
transform: none;
}
}
`), Le = {}, bl = { exports: {} };
bl.exports;
(function(e) {
const t = (o = 0) => (l) => `\x1B[${38 + o};5;${l}m`, a = (o = 0) => (l, u, i) => `\x1B[${38 + o};2;${l};${u};${i}m`;
function n() {
const o = /* @__PURE__ */ new Map(), l = {
modifier: {
reset: [0, 0],
// 21 isn't widely supported and 22 does the same thing
bold: [1, 22],
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
overline: [53, 55],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29]
},
color: {
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
// Bright color
blackBright: [90, 39],
redBright: [91, 39],
greenBright: [92, 39],
yellowBright: [93, 39],
blueBright: [94, 39],
magentaBright: [95, 39],
cyanBright: [96, 39],
whiteBright: [97, 39]
},
bgColor: {
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
// Bright color
bgBlackBright: [100, 49],
bgRedBright: [101, 49],
bgGreenBright: [102, 49],
bgYellowBright: [103, 49],
bgBlueBright: [104, 49],
bgMagentaBright: [105, 49],
bgCyanBright: [106, 49],
bgWhiteBright: [107, 49]
}
};
l.color.gray = l.color.blackBright, l.bgColor.bgGray = l.bgColor.bgBlackBright, l.color.grey = l.color.blackBright, l.bgColor.bgGrey = l.bgColor.bgBlackBright;
for (const [u, i] of Object.entries(l)) {
for (const [s, p] of Object.entries(i))
l[s] = {
open: `\x1B[${p[0]}m`,
close: `\x1B[${p[1]}m`
}, i[s] = l[s], o.set(p[0], p[1]);
Object.defineProperty(l, u, {
value: i,
enumerable: !1
});
}
return Object.defineProperty(l, "codes", {
value: o,
enumerable: !1
}), l.color.close = "\x1B[39m", l.bgColor.close = "\x1B[49m", l.color.ansi256 = t(), l.color.ansi16m = a(), l.bgColor.ansi256 = t(10), l.bgColor.ansi16m = a(10), Object.defineProperties(l, {
rgbToAnsi256: {
value: (u, i, s) => u === i && i === s ? u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(i / 255 * 5) + Math.round(s / 255 * 5),
enumerable: !1
},
hexToRgb: {
value: (u) => {
const i = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(u.toString(16));
if (!i)
return [0, 0, 0];
let { colorString: s } = i.groups;
s.length === 3 && (s = s.split("").map((d) => d + d).join(""));
const p = Number.parseInt(s, 16);
return [
p >> 16 & 255,
p >> 8 & 255,
p & 255
];
},
enumerable: !1
},
hexToAnsi256: {
value: (u) => l.rgbToAnsi256(...l.hexToRgb(u)),
enumerable: !1
}
}), l;
}
Object.defineProperty(e, "exports", {
enumerable: !0,
get: n
});
})(bl);
var ec = bl.exports, _e = {};
Object.defineProperty(_e, "__esModule", {
value: !0
});
_e.printIteratorEntries = Mf;
_e.printIteratorValues = Af;
_e.printListItems = If;
_e.printObjectProperties = Bf;
const $f = (e, r) => {
const t = Object.keys(e).sort(r);
return Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(e).forEach((a) => {
Object.getOwnPropertyDescriptor(e, a).enumerable && t.push(a);
}), t;
};
function Mf(e, r, t, a, n, o, l = ": ") {
let u = "", i = e.next();
if (!i.done) {
u += r.spacingOuter;
const s = t + r.indent;
for (; !i.done; ) {
const p = o(
i.value[0],
r,
s,
a,
n
), d = o(
i.value[1],
r,
s,
a,
n
);
u += s + p + l + d, i = e.next(), i.done ? r.min || (u += ",") : u += "," + r.spacingInner;
}
u += r.spacingOuter + t;
}
return u;
}
function Af(e, r, t, a, n, o) {
let l = "", u = e.next();
if (!u.done) {
l += r.spacingOuter;
const i = t + r.indent;
for (; !u.done; )
l += i + o(u.value, r, i, a, n), u = e.next(), u.done ? r.min || (l += ",") : l += "," + r.spacingInner;
l += r.spacingOuter + t;
}
return l;
}
function If(e, r, t, a, n, o) {
let l = "";
if (e.length) {
l += r.spacingOuter;
const u = t + r.indent;
for (let i = 0; i < e.length; i++)
l += u, i in e && (l += o(e[i], r, u, a, n)), i < e.length - 1 ? l += "," + r.spacingInner : r.min || (l += ",");
l += r.spacingOuter + t;
}
return l;
}
function Bf(e, r, t, a, n, o) {
let l = "";
const u = $f(e, r.compareKeys);
if (u.length) {
l += r.spacingOuter;
const i = t + r.indent;
for (let s = 0; s < u.length; s++) {
const p = u[s], d = o(p, r, i, a, n), v = o(e[p], r, i, a, n);
l += i + d + ": " + v, s < u.length - 1 ? l += "," + r.spacingInner : r.min || (l += ",");
}
l += r.spacingOuter + t;
}
return l;
}
var $e = {};
Object.defineProperty($e, "__esModule", {
value: !0
});
$e.test = $e.serialize = $e.default = void 0;
var Ll = _e, zr = function() {
return typeof globalThis < "u" ? globalThis : typeof zr < "u" ? zr : typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")();
}(), no = zr["jest-symbol-do-not-touch"] || zr.Symbol;
const kf = typeof no == "function" && no.for ? no.for("jest.asymmetricMatcher") : 1267621, Ar = " ", rc = (e, r, t, a, n, o) => {
const l = e.toString();
return l === "ArrayContaining" || l === "ArrayNotContaining" ? ++a > r.maxDepth ? "[" + l + "]" : l + Ar + "[" + (0, Ll.printListItems)(
e.sample,
r,
t,
a,
n,
o
) + "]" : l === "ObjectContaining" || l === "ObjectNotContaining" ? ++a > r.maxDepth ? "[" + l + "]" : l + Ar + "{" + (0, Ll.printObjectProperties)(
e.sample,
r,
t,
a,
n,
o
) + "}" : l === "StringMatching" || l === "StringNotMatching" || l === "StringContaining" || l === "StringNotContaining" ? l + Ar + o(e.sample, r, t, a, n) : e.toAsymmetricMatcher();
};
$e.serialize = rc;
const tc = (e) => e && e.$$typeof === kf;
$e.test = tc;
const Nf = {
serialize: rc,
test: tc
};
var Lf = Nf;
$e.default = Lf;
var Me = {}, Df = ({ onlyFirst: e = !1 } = {}) => {
const r = [
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
].join("|");
return new RegExp(r, e ? void 0 : "g");
};
Object.defineProperty(Me, "__esModule", {
value: !0
});
Me.test = Me.serialize = Me.default = void 0;
var ac = nc(Df), D = nc(ec);
function nc(e) {
return e && e.__esModule ? e : { default: e };
}
const jf = (e) => e.replace((0, ac.default)(), (r) => {
switch (r) {
case D.default.red.close:
case D.default.green.close:
case D.default.cyan.close:
case D.default.gray.close:
case D.default.white.close:
case D.default.yellow.close:
case D.default.bgRed.close:
case D.default.bgGreen.close:
case D.default.bgYellow.close:
case D.default.inverse.close:
case D.default.dim.close:
case D.default.bold.close:
case D.default.reset.open:
case D.default.reset.close:
return "</>";
case D.default.red.open:
return "<red>";
case D.default.green.open:
return "<green>";
case D.default.cyan.open:
return "<cyan>";
case D.default.gray.open:
return "<gray>";
case D.default.white.open:
return "<white>";
case D.default.yellow.open:
return "<yellow>";
case D.default.bgRed.open:
return "<bgRed>";
case D.default.bgGreen.open:
return "<bgGreen>";
case D.default.bgYellow.open:
return "<bgYellow>";
case D.default.inverse.open:
return "<inverse>";
case D.default.dim.open:
return "<dim>";
case D.default.bold.open:
return "<bold>";
default:
return "";
}
}), oc = (e) => typeof e == "string" && !!e.match((0, ac.default)());
Me.test = oc;
const lc = (e, r, t, a, n, o) => o(jf(e), r, t, a, n);
Me.serialize = lc;
const Ff = {
serialize: lc,
test: oc
};
var Hf = Ff;
Me.default = Hf;
var Ae = {};
Object.defineProperty(Ae, "__esModule", {
value: !0
});
Ae.test = Ae.serialize = Ae.default = void 0;
var Dl = _e;
const Uf = " ", ic = ["DOMStringMap", "NamedNodeMap"], zf = /^(HTML\w*Collection|NodeList)$/, Wf = (e) => ic.indexOf(e) !== -1 || zf.test(e), uc = (e) => e && e.constructor && !!e.constructor.name && Wf(e.constructor.name);
Ae.test = uc;
const Vf = (e) => e.constructor.name === "NamedNodeMap", sc = (e, r, t, a, n, o) => {
const l = e.constructor.name;
return ++a > r.maxDepth ? "[" + l + "]" : (r.min ? "" : l + Uf) + (ic.indexOf(l) !== -1 ? "{" + (0, Dl.printObjectProperties)(
Vf(e) ? Array.from(e).reduce((u, i) => (u[i.name] = i.value, u), {}) : { ...e },
r,
t,
a,
n,
o
) + "}" : "[" + (0, Dl.printListItems)(
Array.from(e),
r,
t,
a,
n,
o
) + "]");
};
Ae.serialize = sc;
const Gf = {
serialize: sc,
test: uc
};
var Yf = Gf;
Ae.default = Yf;
var Ie = {}, K = {}, yl = {};
Object.defineProperty(yl, "__esModule", {
value: !0
});
yl.default = Kf;
function Kf(e) {
return e.replace(/</g, "<").replace(/>/g, ">");
}
Object.defineProperty(K, "__esModule", {
value: !0
});
K.printText = K.printProps = K.printElementAsLeaf = K.printElement = K.printComment = K.printChildren = void 0;
var cc = Xf(yl);
function Xf(e) {
return e && e.__esModule ? e : { default: e };
}
const Jf = (e, r, t, a, n, o, l) => {
const u = a + t.indent, i = t.colors;
return e.map((s) => {
const p = r[s];
let d = l(p, t, u, n, o);
return typeof p != "string" && (d.indexOf(`
`) !== -1 && (d = t.spacingOuter + u + d + t.spacingOuter + a), d = "{" + d + "}"), t.spacingInner + a + i.prop.open + s + i.prop.close + "=" + i.value.open + d + i.value.close;
}).join("");
};
K.printProps = Jf;
const Qf = (e, r, t, a, n, o) => e.map(
(l) => r.spacingOuter + t + (typeof l == "string" ? dc(l, r) : o(l, r, t, a, n))
).join("");
K.printChildren = Qf;
const dc = (e, r) => {
const t = r.colors.content;
return t.open + (0, cc.default)(e) + t.close;
};
K.printText = dc;
const Zf = (e, r) => {
const t = r.colors.comment;
return t.open + "<!--" + (0, cc.default)(e) + "-->" + t.close;
};
K.printComment = Zf;
const ep = (e, r, t, a, n) => {
const o = a.colors.tag;
return o.open + "<" + e + (r && o.close + r + a.spacingOuter + n + o.open) + (t ? ">" + o.close + t + a.spacingOuter + n + o.open + "</" + e : (r && !a.min ? "" : " ") + "/") + ">" + o.close;
};
K.printElement = ep;
const rp = (e, r) => {
const t = r.colors.tag;
return t.open + "<" + e + t.close + " …" + t.open + " />" + t.close;
};
K.printElementAsLeaf = rp;
Object.defineProperty(Ie, "__esModule", {
value: !0
});
Ie.test = Ie.serialize = Ie.default = void 0;
var Ye = K;
const tp = 1, fc = 3, pc = 8, mc = 11, ap = /^((HTML|SVG)\w*)?Element$/, np = (e) => {
try {
return typeof e.hasAttribute == "function" && e.hasAttribute("is");
} catch {
return !1;
}
}, op = (e) => {
const r = e.constructor.name, { nodeType: t, tagName: a } = e, n = typeof a == "string" && a.includes("-") || np(e);
return t === tp && (ap.test(r) || n) || t === fc && r === "Text" || t === pc && r === "Comment" || t === mc && r === "DocumentFragment";
}, vc = (e) => {
var r;
return (e == null || (r = e.constructor) === null || r === void 0 ? void 0 : r.name) && op(e);
};
Ie.test = vc;
function lp(e) {
return e.nodeType === fc;
}
function ip(e) {
return e.nodeType === pc;
}
function oo(e) {
return e.nodeType === mc;
}
const bc = (e, r, t, a, n, o) => {
if (lp(e))
return (0, Ye.printText)(e.data, r);
if (ip(e))
return (0, Ye.printComment)(e.data, r);
const l = oo(e) ? "DocumentFragment" : e.tagName.toLowerCase();
return ++a > r.maxDepth ? (0, Ye.printElementAsLeaf)(l, r) : (0, Ye.printElement)(
l,
(0, Ye.printProps)(
oo(e) ? [] : Array.from(e.attributes).map((u) => u.name).sort(),
oo(e) ? {} : Array.from(e.attributes).reduce((u, i) => (u[i.name] = i.value, u), {}),
r,
t + r.indent,
a,
n,
o
),
(0, Ye.printChildren)(
Array.prototype.slice.call(e.childNodes || e.children),
r,
t + r.indent,
a,
n,
o
),
r,
t
);
};
Ie.serialize = bc;
const up = {
serialize: bc,
test: vc
};
var sp = up;
Ie.default = sp;
var Be = {};
Object.defineProperty(Be, "__esModule", {
value: !0
});
Be.test = Be.serialize = Be.default = void 0;
var vr = _e;
const cp = "@@__IMMUTABLE_ITERABLE__@@", dp = "@@__IMMUTABLE_LIST__@@", fp = "@@__IMMUTABLE_KEYED__@@", pp = "@@__IMMUTABLE_MAP__@@", jl = "@@__IMMUTABLE_ORDERED__@@", mp = "@@__IMMUTABLE_RECORD__@@", vp = "@@__IMMUTABLE_SEQ__@@", bp = "@@__IMMUTABLE_SET__@@", yp = "@@__IMMUTABLE_STACK__@@", Ze = (e) => "Immutable." + e, st = (e) => "[" + e + "]", br = " ", Fl = "…", gp = (e, r, t, a, n, o, l) => ++a > r.maxDepth ? st(Ze(l)) : Ze(l) + br + "{" + (0, vr.printIteratorEntries)(
e.entries(),
r,
t,
a,
n,
o
) + "}";
function hp(e) {
let r = 0;
return {
next() {
if (r < e._keys.length) {
const t = e._keys[r++];
return {
done: !1,
value: [t, e.get(t)]
};
}
return {
done: !0,
value: void 0
};
}
};
}
const Rp = (e, r, t, a, n, o) => {
const l = Ze(e._name || "Record");
return ++a > r.maxDepth ? st(l) : l + br + "{" + (0, vr.printIteratorEntries)(
hp(e),
r,
t,
a,
n,
o
) + "}";
}, Ep = (e, r, t, a, n, o) => {
const l = Ze("Seq");
return ++a > r.maxDepth ? st(l) : e[fp] ? l + br + "{" + // from Immutable collection of entries or from ECMAScript object
(e._iter || e._object ? (0, vr.printIteratorEntries)(
e.entries(),
r,
t,
a,
n,
o
) : Fl) + "}" : l + br + "[" + (e._iter || // from Immutable collection of values
e._array || // from ECMAScript array
e._collection || // from ECMAScript collection in immutable v4
e._iterable ? (0, vr.printIteratorValues)(
e.values(),
r,
t,
a,
n,
o
) : Fl) + "]";
}, lo = (e, r, t, a, n, o, l) => ++a > r.maxDepth ? st(Ze(l)) : Ze(l) + br + "[" + (0, vr.printIteratorValues)(
e.values(),
r,
t,
a,
n,
o
) + "]", yc = (e, r, t, a, n, o) => e[pp] ? gp(
e,
r,
t,
a,
n,
o,
e[jl] ? "OrderedMap" : "Map"
) : e[dp] ? lo(
e,
r,
t,
a,
n,
o,
"List"
) : e[bp] ? lo(
e,
r,
t,
a,
n,
o,
e[jl] ? "OrderedSet" : "Set"
) : e[yp] ? lo(
e,
r,
t,
a,
n,
o,
"Stack"
) : e[vp] ? Ep(e, r, t, a, n, o) : Rp(e, r, t, a, n, o);
Be.serialize = yc;
const gc = (e) => e && (e[cp] === !0 || e[mp] === !0);
Be.test = gc;
const _p = {
serialize: yc,
test: gc
};
var Cp = _p;
Be.default = Cp;
var ke = {}, ko = { exports: {} }, B = {};
/** @license React v17.0.2
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Hl;
function wp() {
if (Hl)
return B;
Hl = 1;
var e = 60103, r = 60106, t = 60107, a = 60108, n = 60114, o = 60109, l = 60110, u = 60112, i = 60113, s = 60120, p = 60115, d = 60116, v = 60121, P = 60122, $ = 60117, S = 60129, M = 60131;
if (typeof Symbol == "function" && Symbol.for) {
var c = Symbol.for;
e = c("react.element"), r = c("react.portal"), t = c("react.fragment"), a = c("react.strict_mode"), n = c("react.profiler"), o = c("react.provider"), l = c("react.context"), u = c("react.forward_ref"), i = c("react.suspense"), s = c("react.suspense_list"), p = c("react.memo"), d = c("react.lazy"), v = c("react.block"), P = c("react.server.block"), $ = c("react.fundamental"), S = c("react.debug_trace_mode"), M = c("react.legacy_hidden");
}
function C(_) {
if (typeof _ == "object" && _ !== null) {
var A = _.$$typeof;
switch (A) {
case e:
switch (_ = _.type, _) {
case t:
case n:
case a:
case i:
case s:
return _;
default:
switch (_ = _ && _.$$typeof, _) {
case l:
case u:
case d:
case p:
case o:
return _;
default:
return A;
}
}
case r:
return A;
}
}
}
var x = o, w = e, O = u, m = t, y = d, E = p, N = r, W = n, H = a, V = i;
return B.ContextConsumer = l, B.ContextProvider = x, B.Element = w, B.ForwardRef = O, B.Fragment = m, B.Lazy = y, B.Memo = E, B.Portal = N, B.Profiler = W, B.StrictMode = H, B.Suspense = V, B.isAsyncMode = function() {
return !1;
}, B.isConcurrentMode = function() {
return !1;
}, B.isContextConsumer = function(_) {
return C(_) === l;
}, B.isContextProvider = function(_) {
return C(_) === o;
}, B.isElement = function(_) {
return typeof _ == "object" && _ !== null && _.$$typeof === e;
}, B.isForwardRef = function(_) {
return C(_) === u;
}, B.isFragment = function(_) {
return C(_) === t;
}, B.isLazy = function(_) {
return C(_) === d;
}, B.isMemo = function(_) {
return C(_) === p;
}, B.isPortal = function(_) {
return C(_) === r;
}, B.isProfiler = function(_) {
return C(_) === n;
}, B.isStrictMode = function(_) {
return C(_) === a;
}, B.isSuspense = function(_) {
return C(_) === i;
}, B.isValidElementType = function(_) {
return typeof _ == "string" || typeof _ == "function" || _ === t || _ === n || _ === S || _ === a || _ === i || _ === s || _ === M || typeof _ == "object" && _ !== null && (_.$$typeof === d || _.$$typeof === p || _.$$typeof === o || _.$$typeof === l || _.$$typeof === u || _.$$typeof === $ || _.$$typeof === v || _[0] === P);
}, B.typeOf = C, B;
}
var k = {}, Ul;
function Pp() {
return Ul || (Ul = 1, fe.env.NODE_ENV !== "production" && function() {
var e = 60103, r = 60106, t = 60107, a = 60108, n = 60114, o = 60109, l = 60110, u = 60112, i = 60113, s = 60120, p = 60115, d = 60116, v = 60121, P = 60122, $ = 60117, S = 60129, M = 60131;
if (typeof Symbol == "function" && Symbol.for) {
var c = Symbol.for;
e = c("react.element"), r = c("react.portal"), t = c("react.fragment"), a = c("react.strict_mode"), n = c("react.profiler"), o = c("react.provider"), l = c("react.context"), u = c("react.forward_ref"), i = c("react.suspense"), s = c("react.suspense_list"), p = c("react.memo"), d = c("react.lazy"), v = c("react.block"), P = c("react.server.block"), $ = c("react.fundamental"), c("react.scope"), c("react.opaque.id"), S = c("react.debug_trace_mode"), c("react.offscreen"), M = c("react.legacy_hidden");
}
var C = !1;
function x(T) {
return !!(typeof T == "string" || typeof T == "function" || T === t || T === n || T === S || T === a || T === i || T === s || T === M || C || typeof T == "object" && T !== null && (T.$$typeof === d || T.$$typeof === p || T.$$typeof === o || T.$$typeof === l || T.$$typeof === u || T.$$typeof === $ || T.$$typeof === v || T[0] === P));
}
function w(T) {
if (typeof T == "object" && T !== null) {
var to = T.$$typeof;
switch (to) {
case e:
var $r = T.type;
switch ($r) {
case t:
case n:
case a:
case i:
case s:
return $r;
default:
var Bl = $r && $r.$$typeof;
switch (Bl) {
case l:
case u:
case d:
case p:
case o:
return Bl;
default:
return to;
}
}
case r:
return to;
}
}
}
var O = l, m = o, y = e, E = u, N = t, W = d, H = p, V = r, _ = n, A = a, U = i, z = !1, ee = !1;
function be(T) {
return z || (z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
}
function or(T) {
return ee || (ee = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
}
function Tr(T) {
return w(T) === l;
}
function lr(T) {
return w(T) === o;
}
function Qn(T) {
return typeof T == "object" && T !== null && T.$$typeof === e;
}
function Zn(T) {
return w(T) === u;
}
function eo(T) {
return w(T) === t;
}
function ro(T) {
return w(T) === d;
}
function lf(T) {
return w(T) === p;
}
function uf(T) {
return w(T) === r;
}
function sf(T) {
return w(T) === n;
}
function cf(T) {
return w(T) === a;
}
function df(T) {
return w(T) === i;
}
k.ContextConsumer = O, k.ContextProvider = m, k.Element = y, k.ForwardRef = E, k.Fragment = N, k.Lazy = W, k.Memo = H, k.Portal = V, k.Profiler = _, k.StrictMode = A, k.Suspense = U, k.isAsyncMode = be, k.isConcurrentMode = or, k.isContextConsumer = Tr, k.isContextProvider = lr, k.isElement = Qn, k.isForwardRef = Zn, k.isFragment = eo, k.isLazy = ro, k.isMemo = lf, k.isPortal = uf, k.isProfiler = sf, k.isStrictMode = cf, k.isSuspense = df, k.isValidElementType = x, k.typeOf = w;
}()), k;
}
fe.env.NODE_ENV === "production" ? ko.exports = wp() : ko.exports = Pp();
var xp = ko.exports;
Object.defineProperty(ke, "__esModule", {
value: !0
});
ke.test = ke.serialize = ke.default = void 0;
var Ue = qp(xp), Ir = K;
function hc(e) {
if (typeof WeakMap != "function")
return null;
var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
return (hc = function(a) {
return a ? t : r;
})(e);
}
function qp(e, r) {
if (!r && e && e.__esModule)
return e;
if (e === null || typeof e != "object" && typeof e != "function")
return { default: e };
var t = hc(r);
if (t && t.has(e))
return t.get(e);
var a = {}, n = Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var o in e)
if (o !== "default" && Object.prototype.hasOwnProperty.call(e, o)) {
var l = n ? Object.getOwnPropertyDescriptor(e, o) : null;
l && (l.get || l.set) ? Object.defineProperty(a, o, l) : a[o] = e[o];
}
return a.default = e, t && t.set(e, a), a;
}
const Rc = (e, r = []) => (Array.isArray(e) ? e.forEach((t) => {
Rc(t, r);
}) : e != null && e !== !1 && r.push(e), r), zl = (e) => {
const r = e.type;
if (typeof r == "string")
return r;
if (typeof r == "function")
return r.displayName || r.name || "Unknown";
if (Ue.isFragment(e))
return "React.Fragment";
if (Ue.isSuspense(e))
return "React.Suspense";
if (typeof r == "object" && r !== null) {
if (Ue.isContextProvider(e))
return "Context.Provider";
if (Ue.isContextConsumer(e))
return "Context.Consumer";
if (Ue.isForwardRef(e)) {
if (r.displayName)
return r.displayName;
const t = r.render.displayName || r.render.name || "";
return t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef";
}
if (Ue.isMemo(e)) {
const t = r.displayName || r.type.displayName || r.type.name || "";
return t !== "" ? "Memo(" + t + ")" : "Memo";
}
}
return "UNDEFINED";
}, Sp = (e) => {
const { props: r } = e;
return Object.keys(r).filter((t) => t !== "children" && r[t] !== void 0).sort();
}, Ec = (e, r, t, a, n, o) => ++a > r.maxDepth ? (0, Ir.printElementAsLeaf)(zl(e), r) : (0, Ir.printElement)(
zl(e),
(0, Ir.printProps)(
Sp(e),
e.props,
r,
t + r.indent,
a,
n,
o
),
(0, Ir.printChildren)(
Rc(e.props.children),
r,
t + r.indent,
a,
n,
o
),
r,
t
);
ke.serialize = Ec;
const _c = (e) => e != null && Ue.isElement(e);
ke.test = _c;
const Op = {
serialize: Ec,
test: _c
};
var Tp = Op;
ke.default = Tp;
var Ne = {};
Object.defineProperty(Ne, "__esModule", {
value: !0
});
Ne.test = Ne.serialize = Ne.default = void 0;
var Br = K, Wr = function() {
return typeof globalThis < "u" ? globalThis : typeof Wr < "u" ? Wr : typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")();
}(), io = Wr["jest-symbol-do-not-touch"] || Wr.Symbol;
const $p = typeof io == "function" && io.for ? io.for("react.test.json") : 245830487, Mp = (e) => {
const { props: r } = e;
return r ? Object.keys(r).filter((t) => r[t] !== void 0).sort() : [];
}, Cc = (e, r, t, a, n, o) => ++a > r.maxDepth ? (0, Br.printElementAsLeaf)(e.type, r) : (0, Br.printElement)(
e.type,
e.props ? (0, Br.printProps)(
Mp(e),
e.props,
r,
t + r.indent,
a,
n,
o
) : "",
e.children ? (0, Br.printChildren)(
e.children,
r,
t + r.indent,
a,
n,
o
) : "",
r,
t
);
Ne.serialize = Cc;
const wc = (e) => e && e.$$typeof === $p;
Ne.test = wc;
const Ap = {
serialize: Cc,
test: wc
};
var Ip = Ap;
Ne.default = Ip;
Object.defineProperty(Le, "__esModule", {
value: !0
});
Le.default = Le.DEFAULT_OPTIONS = void 0;
var Bp = Le.format = kc, Pc = Le.plugins = void 0, kp = je(ec), ir = _e, Np = je(
$e
), Lp = je(Me), Dp = je(Ae), jp = je(Ie), Fp = je(Be), Hp = je(ke), Up = je(
Ne
);
function je(e) {
return e && e.__esModule ? e : { default: e };
}
const xc = Object.prototype.toString, zp = Date.prototype.toISOString, Wp = Error.prototype.toString, Wl = RegExp.prototype.toString, uo = (e) => typeof e.constructor == "function" && e.constructor.name || "Object", Vp = (e) => typeof window < "u" && e === window, Gp = /^Symbol\((.*)\)(.*)$/, Yp = /\n/gi;
class qc extends Error {
constructor(r, t) {
super(r), this.stack = t, this.name = this.constructor.name;
}
}
function Kp(e) {
return e === "[object Array]" || e === "[object ArrayBuffer]" || e === "[object DataView]" || e === "[object Float32Array]" || e === "[object Float64Array]" || e === "[object Int8Array]" || e === "[object Int16Array]" || e === "[object Int32Array]" || e === "[object Uint8Array]" || e === "[object Uint8ClampedArray]" || e === "[object Uint16Array]" || e === "[object Uint32Array]";
}
function Xp(e) {
return Object.is(e, -0) ? "-0" : String(e);
}
function Jp(e) {
return `${e}n`;
}
function Vl(e, r) {
return r ? "[Function " + (e.name || "anonymous") + "]" : "[Function]";
}
function Gl(e) {
return String(e).replace(Gp, "Symbol($1)");
}
function Yl(e) {
return "[" + Wp.call(e) + "]";
}
function Sc(e, r, t, a) {
if (e === !0 || e === !1)
return "" + e;
if (e === void 0)
return "undefined";
if (e === null)
return "null";
const n = typeof e;
if (n === "number")
return Xp(e);
if (n === "bigint")
return Jp(e);
if (n === "string")
return a ? '"' + e.replace(/"|\\/g, "\\$&") + '"' : '"' + e + '"';
if (n === "function")
return Vl(e, r);
if (n === "symbol")
return Gl(e);
const o = xc.call(e);
return o === "[object WeakMap]" ? "WeakMap {}" : o === "[object WeakSet]" ? "WeakSet {}" : o === "[object Function]" || o === "[object GeneratorFunction]" ? Vl(e, r) : o === "[object Symbol]" ? Gl(e) : o === "[object Date]" ? isNaN(+e) ? "Date { NaN }" : zp.call(e) : o === "[object Error]" ? Yl(e) : o === "[object RegExp]" ? t ? Wl.call(e).replace(/[\\^$*+?.()|[\]{}]/g, "\\$&") : Wl.call(e) : e instanceof Error ? Yl(e) : null;
}
function Oc(e, r, t, a, n, o) {
if (n.indexOf(e) !== -1)
return "[Circular]";
n = n.slice(), n.push(e);
const l = ++a > r.maxDepth, u = r.min;
if (r.callToJSON && !l && e.toJSON && typeof e.toJSON == "function" && !o)
return xe(e.toJSON(), r, t, a, n, !0);
const i = xc.call(e);
return i === "[object Arguments]" ? l ? "[Arguments]" : (u ? "" : "Arguments ") + "[" + (0, ir.printListItems)(
e,
r,
t,
a,
n,
xe
) + "]" : Kp(i) ? l ? "[" + e.constructor.name + "]" : (u || !r.printBasicPrototype && e.constructor.name === "Array" ? "" : e.constructor.name + " ") + "[" + (0, ir.printListItems)(
e,
r,
t,
a,
n,
xe
) + "]" : i === "[object Map]" ? l ? "[Map]" : "Map {" + (0, ir.printIteratorEntries)(
e.entries(),
r,
t,
a,
n,
xe,
" => "
) + "}" : i === "[object Set]" ? l ? "[Set]" : "Set {" + (0, ir.printIteratorValues)(
e.values(),
r,
t,
a,
n,
xe
) + "}" : l || Vp(e) ? "[" + uo(e) + "]" : (u || !r.printBasicPrototype && uo(e) === "Object" ? "" : uo(e) + " ") + "{" + (0, ir.printObjectProperties)(
e,
r,
t,
a,
n,
xe
) + "}";
}
function Qp(e) {
return e.serialize != null;
}
function Tc(e, r, t, a, n, o) {
let l;
try {
l = Qp(e) ? e.serialize(r, t, a, n, o, xe) : e.print(
r,
(u) => xe(u, t, a, n, o),
(u) => {
const i = a + t.indent;
return i + u.replace(Yp, `
` + i);
},
{
edgeSpacing: t.spacingOuter,
min: t.min,
spacing: t.spacingInner
},
t.colors
);
} catch (u) {
throw new qc(u.message, u.stack);
}
if (typeof l != "string")
throw new Error(
`pretty-format: Plugin must return type "string" but instead returned "${typeof l}".`
);
return l;
}
function $c(e, r) {
for (let t = 0; t < e.length; t++)
try {
if (e[t].test(r))
return e[t];
} catch (a) {
throw new qc(a.message, a.stack);
}
return null;
}
function xe(e, r, t, a, n, o) {
const l = $c(r.plugins, e);
if (l !== null)
return Tc(l, e, r, t, a, n);
const u = Sc(
e,
r.printFunctionName,
r.escapeRegex,
r.escapeString
);
return u !== null ? u : Oc(
e,
r,
t,
a,
n,
o
);
}
const gl = {
comment: "gray",
content: "reset",
prop: "yellow",
tag: "cyan",
value: "green"
}, Mc = Object.keys(gl), ue = {
callToJSON: !0,
compareKeys: void 0,
escapeRegex: !1,
escapeString: !0,
highlight: !1,
indent: 2,
maxDepth: 1 / 0,
min: !1,
plugins: [],
printBasicPrototype: !0,
printFunctionName: !0,
theme: gl
};
Le.DEFAULT_OPTIONS = ue;
function Zp(e) {
if (Object.keys(e).forEach((r) => {
if (!ue.hasOwnProperty(r))
throw new Error(`pretty-format: Unknown option "${r}".`);
}), e.min && e.indent !== void 0 && e.indent !== 0)
throw new Error(
'pretty-format: Options "min" and "indent" cannot be used together.'
);
if (e.theme !== void 0) {
if (e.theme === null)
throw new Error('pretty-format: Option "theme" must not be null.');
if (typeof e.theme != "object")
throw new Error(
`pretty-format: Option "theme" must be of type "object" but instead received "${typeof e.theme}".`
);
}
}
const em = (e) => Mc.reduce((r, t) => {
const a = e.theme && e.theme[t] !== void 0 ? e.theme[t] : gl[t], n = a && kp.default[a];
if (n && typeof n.close == "string" && typeof n.open == "string")
r[t] = n;
else
throw new Error(
`pretty-format: Option "theme" has a key "${t}" whose value "${a}" is undefined in ansi-styles.`
);
return r;
}, /* @__PURE__ */ Object.create(null)), rm = () => Mc.reduce((e, r) => (e[r] = {
close: "",
open: ""
}, e), /* @__PURE__ */ Object.create(null)), Ac = (e) => e && e.printFunctionName !== void 0 ? e.printFunctionName : ue.printFunctionName, Ic = (e) => e && e.escapeRegex !== void 0 ? e.escapeRegex : ue.escapeRegex, Bc = (e) => e && e.escapeString !== void 0 ? e.escapeString : ue.escapeString, Kl = (e) => {
var r;
return {
callToJSON: e && e.callToJSON !== void 0 ? e.callToJSON : ue.callToJSON,
colors: e && e.highlight ? em(e) : rm(),
compareKeys: e && typeof e.compareKeys == "function" ? e.compareKeys : ue.compareKeys,
escapeRegex: Ic(e),
escapeString: Bc(e),
indent: e && e.min ? "" : tm(
e && e.indent !== void 0 ? e.indent : ue.indent
),
maxDepth: e && e.maxDepth !== void 0 ? e.maxDepth : ue.maxDepth,
min: e && e.min !== void 0 ? e.min : ue.min,
plugins: e && e.plugins !== void 0 ? e.plugins : ue.plugins,
printBasicPrototype: (r = e == null ? void 0 : e.printBasicPrototype) !== null && r !== void 0 ? r : !0,
printFunctionName: Ac(e),
spacingInner: e && e.min ? " " : `
`,
spacingOuter: e && e.min ? "" : `
`
};
};
function tm(e) {
return new Array(e + 1).join(" ");
}
function kc(e, r) {
if (r && (Zp(r), r.plugins)) {
const a = $c(r.plugins, e);
if (a !== null)
return Tc(a, e, Kl(r), "", 0, []);
}
const t = Sc(
e,
Ac(r),
Ic(r),
Bc(r)
);
return t !== null ? t : Oc(e, Kl(r), "", 0, []);
}
const am = {
AsymmetricMatcher: Np.default,
ConvertAnsi: Lp.default,
DOMCollection: Dp.default,
DOMElement: jp.default,
Immutable: Fp.default,
ReactElement: Hp.default,
ReactTestComponent: Up.default
};
Pc = Le.plugins = am;
var nm = kc;
Le.default = nm;
var om = Object.prototype.toString;
function Xl(e) {
return typeof e == "function" || om.call(e) === "[object Function]";
}
function lm(e) {
var r = Number(e);
return isNaN(r) ? 0 : r === 0 || !isFinite(r) ? r : (r > 0 ? 1 : -1) * Math.floor(Math.abs(r));
}
var im = Math.pow(2, 53) - 1;
function um(e) {
var r = lm(e);
return Math.min(Math.max(r, 0), im);
}
function se(e, r) {
var t = Array, a = Object(e);
if (e == null)
throw new TypeError("Array.from requires an array-like object - not null or undefined");
if (typeof r < "u" && !Xl(r))
throw new TypeError("Array.from: when provided, the second argument must be a function");
for (var n = um(a.length), o = Xl(t) ? Object(new t(n)) : new Array(n), l = 0, u; l < n; )
u = a[l], r ? o[l] = r(u, l) : o[l] = u, l += 1;
return o.length = n, o;
}
function yr(e) {
"@babel/helpers - typeof";
return yr = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
return typeof r;
} : function(r) {
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
}, yr(e);
}
function sm(e, r) {
if (!(e instanceof r))
throw new TypeError("Cannot call a class as a function");
}
function Jl(e, r) {
for (var t = 0; t < r.length; t++) {
var a = r[t];
a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, Nc(a.key), a);
}
}
function cm(e, r, t) {
return r && Jl(e.prototype, r), t && Jl(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
}
function dm(e, r, t) {
return r = Nc(r), r in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;
}
function Nc(e) {
var r = fm(e, "string");
return yr(r) === "symbol" ? r : String(r);
}
function fm(e, r) {
if (yr(e) !== "object" || e === null)
return e;
var t = e[Symbol.toPrimitive];
if (t !== void 0) {
var a = t.call(e, r || "default");
if (yr(a) !== "object")
return a;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (r === "string" ? String : Number)(e);
}
var pm = /* @__PURE__ */ function() {
function e() {
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
sm(this, e), dm(this, "items", void 0), this.items = r;
}
return cm(e, [{
key: "add",
value: function(t) {
return this.has(t) === !1 && this.items.push(t), this;
}
}, {
key: "clear",
value: function() {
this.items = [];
}
}, {
key: "delete",
value: function(t) {
var a = this.items.length;
return this.items = this.items.filter(function(n) {
return n !== t;
}), a !== this.items.length;
}
}, {
key: "forEach",
value: function(t) {
var a = this;
this.items.forEach(function(n) {
t(n, n, a);
});
}
}, {
key: "has",
value: function(t) {
return this.items.indexOf(t) !== -1;
}
}, {
key: "size",
get: function() {
return this.items.length;
}
}]), e;
}();
const mm = typeof Set > "u" ? Set : pm;
function J(e) {
var r;
return (
// eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName
(r = e.localName) !== null && r !== void 0 ? r : (
// eslint-disable-next-line no-restricted-properties -- required for the fallback
e.tagName.toLowerCase()
)
);
}
var vm = {
article: "article",
aside: "complementary",
button: "button",
datalist: "listbox",
dd: "definition",
details: "group",
dialog: "dialog",
dt: "term",
fieldset: "group",
figure: "figure",
// WARNING: Only with an accessible name
form: "form",
footer: "contentinfo",
h1: "heading",
h2: "heading",
h3: "heading",
h4: "heading",
h5: "heading",
h6: "heading",
header: "banner",
hr: "separator",
html: "document",
legend: "legend",
li: "listitem",
math: "math",
main: "main",
menu: "list",
nav: "navigation",
ol: "list",
optgroup: "group",
// WARNING: Only in certain context
option: "option",
output: "status",
progress: "progressbar",
// WARNING: Only with an accessible name
section: "region",
summary: "button",
table: "table",
tbody: "rowgroup",
textarea: "textbox",
tfoot: "rowgroup",
// WARNING: Only in certain context
td: "cell",
th: "columnheader",
thead: "rowgroup",
tr: "row",
ul: "list"
}, bm = {
caption: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
code: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
deletion: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
emphasis: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
generic: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby", "aria-roledescription"]),
insertion: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
paragraph: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
presentation: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
strong: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
subscript: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
superscript: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"])
};
function ym(e, r) {
return [
"aria-atomic",
"aria-busy",
"aria-controls",
"aria-current",
"aria-describedby",
"aria-details",
// "disabled",
"aria-dropeffect",
// "errormessage",
"aria-flowto",
"aria-grabbed",
// "haspopup",
"aria-hidden",
// "invalid",
"aria-keyshortcuts",
"aria-label",
"aria-labelledby",
"aria-live",
"aria-owns",
"aria-relevant",
"aria-roledescription"
].some(function(t) {
var a;
return e.hasAttribute(t) && !((a = bm[r]) !== null && a !== void 0 && a.has(t));
});
}
function Lc(e, r) {
return ym(e, r);
}
function gm(e) {
var r = Rm(e);
if (r === null || r === "presentation") {
var t = hm(e);
if (r !== "presentation" || Lc(e, t || ""))
return t;
}
return r;
}
function hm(e) {
var r = vm[J(e)];
if (r !== void 0)
return r;
switch (J(e)) {
case "a":
case "area":
case "link":
if (e.hasAttribute("href"))
return "link";
break;
case "img":
return e.getAttribute("alt") === "" && !Lc(e, "img") ? "presentation" : "img";
case "input": {
var t = e, a = t.type;
switch (a) {
case "button":
case "image":
case "reset":
case "submit":
return "button";
case "checkbox":
case "radio":
return a;
case "range":
return "slider";
case "email":
case "tel":
case "text":
case "url":
return e.hasAttribute("list") ? "combobox" : "textbox";
case "search":
return e.hasAttribute("list") ? "combobox" : "searchbox";
case "number":
return "spinbutton";
default:
return null;
}
}
case "select":
return e.hasAttribute("multiple") || e.size > 1 ? "listbox" : "combobox";
}
return null;
}
function Rm(e) {
var r = e.getAttribute("role");
if (r !== null) {
var t = r.trim().split(" ")[0];
if (t.length > 0)
return t;
}
return null;
}
function F(e) {
return e !== null && e.nodeType === e.ELEMENT_NODE;
}
function Dc(e) {
return F(e) && J(e) === "caption";
}
function jr(e) {
return F(e) && J(e) === "input";
}
function Em(e) {
return F(e) && J(e) === "optgroup";
}
function _m(e) {
return F(e) && J(e) === "select";
}
function Cm(e) {
return F(e) && J(e) === "table";
}
function wm(e) {
return F(e) && J(e) === "textarea";
}
function Pm(e) {
var r = e.ownerDocument === null ? e : e.ownerDocument, t = r.defaultView;
if (t === null)
throw new TypeError("no window available");
return t;
}
function xm(e) {
return F(e) && J(e) === "fieldset";
}
function qm(e) {
return F(e) && J(e) === "legend";
}
function Sm(e) {
return F(e) && J(e) === "slot";
}
function Om(e) {
return F(e) && e.ownerSVGElement !== void 0;
}
function Tm(e) {
return F(e) && J(e) === "svg";
}
function $m(e) {
return Om(e) && J(e) === "title";
}
function Vr(e, r) {
if (F(e) && e.hasAttribute(r)) {
var t = e.getAttribute(r).split(" "), a = e.getRootNode ? e.getRootNode() : e.ownerDocument;
return t.map(function(n) {
return a.getElementById(n);
}).filter(
function(n) {
return n !== null;
}
// TODO: why does this not narrow?
);
}
return [];
}
function Re(e, r) {
return F(e) ? r.indexOf(gm(e)) !== -1 : !1;
}
function Mm(e) {
return e.trim().replace(/\s\s+/g, " ");
}
function Am(e, r) {
if (!F(e))
return !1;
if (e.hasAttribute("hidden") || e.getAttribute("aria-hidden") === "true")
return !0;
var t = r(e);
return t.getPropertyValue("display") === "none" || t.getPropertyValue("visibility") === "hidden";
}
function Im(e) {
return Re(e, ["button", "combobox", "listbox", "textbox"]) || jc(e, "range");
}
function jc(e, r) {
if (!F(e))
return !1;
switch (r) {
case "range":
return Re(e, ["meter", "progressbar", "scrollbar", "slider", "spinbutton"]);
default:
throw new TypeError("No knowledge about abstract role '".concat(r, "'. This is likely a bug :("));
}
}
function Ql(e, r) {
var t = se(e.querySelectorAll(r));
return Vr(e, "aria-owns").forEach(function(a) {
t.push.apply(t, se(a.querySelectorAll(r)));
}), t;
}
function Bm(e) {
return _m(e) ? e.selectedOptions || Ql(e, "[selected]") : Ql(e, '[aria-selected="true"]');
}
function km(e) {
return Re(e, ["none", "presentation"]);
}
function Nm(e) {
return Dc(e);
}
function Lm(e) {
return Re(e, ["button", "cell", "checkbox", "columnheader", "gridcell", "heading", "label", "legend", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "row", "rowheader", "switch", "tab", "tooltip", "treeitem"]);
}
function Dm(e) {
return !1;
}
function jm(e) {
return jr(e) || wm(e) ? e.value : e.textContent || "";
}
function Zl(e) {
var r = e.getPropertyValue("content");
return /^["'].*["']$/.test(r) ? r.slice(1, -1) : "";
}
function Fc(e) {
var r = J(e);
return r === "button" || r === "input" && e.getAttribute("type") !== "hidden" || r === "meter" || r === "output" || r === "progress" || r === "select" || r === "textarea";
}
function Hc(e) {
if (Fc(e))
return e;
var r = null;
return e.childNodes.forEach(function(t) {
if (r === null && F(t)) {
var a = Hc(t);
a !== null && (r = a);
}
}), r;
}
function Fm(e) {
if (e.control !== void 0)
return e.control;
var r = e.getAttribute("for");
return r !== null ? e.ownerDocument.getElementById(r) : Hc(e);
}
function Hm(e) {
var r = e.labels;
if (r === null)
return r;
if (r !== void 0)
return se(r);
if (!Fc(e))
return null;
var t = e.ownerDocument;
return se(t.querySelectorAll("label")).filter(function(a) {
return Fm(a) === e;
});
}
function Um(e) {
var r = e.assignedNodes();
return r.length === 0 ? se(e.childNodes) : r;
}
function Uc(e) {
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = new mm(), a = Pm(e), n = r.compute, o = n === void 0 ? "name" : n, l = r.computedStyleSupportsPseudoElements, u = l === void 0 ? r.getComputedStyle !== void 0 : l, i = r.getComputedStyle, s = i === void 0 ? a.getComputedStyle.bind(a) : i, p = r.hidden, d = p === void 0 ? !1 : p;
function v(c, C) {
var x = "";
if (F(c) && u) {
var w = s(c, "::before"), O = Zl(w);
x = "".concat(O, " ").concat(x);
}
var m = Sm(c) ? Um(c) : se(c.childNodes).concat(Vr(c, "aria-owns"));
if (m.forEach(function(N) {
var W = M(N, {
isEmbeddedInLabel: C.isEmbeddedInLabel,
isReferenced: !1,
recursion: !0
}), H = F(N) ? s(N).getPropertyValue("display") : "inline", V = H !== "inline" ? " " : "";
x += "".concat(V).concat(W).concat(V);
}), F(c) && u) {
var y = s(c, "::after"), E = Zl(y);
x = "".concat(x, " ").concat(E);
}
return x.trim();
}
function P(c, C) {
var x = c.getAttributeNode(C);
return x !== null && !t.has(x) && x.value.trim() !== "" ? (t.add(x), x.value) : null;
}
function $(c) {
return F(c) ? P(c, "title") : null;
}
function S(c) {
if (!F(c))
return null;
if (xm(c)) {
t.add(c);
for (var C = se(c.childNodes), x = 0; x < C.length; x += 1) {
var w = C[x];
if (qm(w))
return M(w, {
isEmbeddedInLabel: !1,
isReferenced: !1,
recursion: !1
});
}
} else if (Cm(c)) {
t.add(c);
for (var O = se(c.childNodes), m = 0; m < O.length; m += 1) {
var y = O[m];
if (Dc(y))
return M(y, {
isEmbeddedInLabel: !1,
isReferenced: !1,
recursion: !1
});
}
} else if (Tm(c)) {
t.add(c);
for (var E = se(c.childNodes), N = 0; N < E.length; N += 1) {
var W = E[N];
if ($m(W))
return W.textContent;
}
return null;
} else if (J(c) === "img" || J(c) === "area") {
var H = P(c, "alt");
if (H !== null)
return H;
} else if (Em(c)) {
var V = P(c, "label");
if (V !== null)
retur