From 2d154195ab17fc53cadf528332e01d6da9ed4b99 Mon Sep 17 00:00:00 2001 From: Chris Fregly Date: Fri, 22 Dec 2023 09:41:46 -0800 Subject: [PATCH] add game options --- dist/index.mjs | 8453 +++++++++++++------------- dist/index.umd.js | 88 +- dist/style.css | 2 +- package-lock.json | 16 +- package.json | 2 +- src/api/API.js | 7 +- src/components/HomePage/HomePage.jsx | 22 +- src/example/App.jsx | 29 +- 8 files changed, 4334 insertions(+), 4285 deletions(-) diff --git a/dist/index.mjs b/dist/index.mjs index 4808978..36b31fc 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -1,9 +1,9 @@ -import Re, { useEffect as bt, useState as it, forwardRef as ba, useCallback as Xt, useRef as To } from "react"; -import { useNavigate as $t, useParams as ka } from "react-router-dom"; +import Oe, { useEffect as pt, useState as ft, forwardRef as xa, useCallback as Xt, useRef as Ao } from "react"; +import { useNavigate as $t, useParams as wa } from "react-router-dom"; function Bt(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } -var tr = { exports: {} }, Rt = {}; +var er = { exports: {} }, Ot = {}; /** * @license React * react-jsx-runtime.production.min.js @@ -14,22 +14,22 @@ var tr = { exports: {} }, Rt = {}; * LICENSE file in the root directory of this source tree. */ var ei; -function xa() { +function va() { if (ei) - return Rt; + return Ot; ei = 1; - var e = Re, n = Symbol.for("react.element"), t = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 }; - function l(a, s, u) { - var c, f = {}, m = null, p = null; - u !== void 0 && (m = "" + u), s.key !== void 0 && (m = "" + s.key), s.ref !== void 0 && (p = s.ref); - for (c in s) - r.call(s, c) && !o.hasOwnProperty(c) && (f[c] = s[c]); + var e = Oe, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 }; + function l(a, s, c) { + var f, u = {}, d = null, p = null; + c !== void 0 && (d = "" + c), s.key !== void 0 && (d = "" + s.key), s.ref !== void 0 && (p = s.ref); + for (f in s) + r.call(s, f) && !o.hasOwnProperty(f) && (u[f] = s[f]); if (a && a.defaultProps) - for (c in s = a.defaultProps, s) - f[c] === void 0 && (f[c] = s[c]); - return { $$typeof: n, type: a, key: m, ref: p, props: f, _owner: i.current }; + for (f in s = a.defaultProps, s) + u[f] === void 0 && (u[f] = s[f]); + return { $$typeof: t, type: a, key: d, ref: p, props: u, _owner: i.current }; } - return Rt.Fragment = t, Rt.jsx = l, Rt.jsxs = l, Rt; + return Ot.Fragment = n, Ot.jsx = l, Ot.jsxs = l, Ot; } var Ft = {}; /** @@ -42,47 +42,47 @@ var Ft = {}; * LICENSE file in the root directory of this source tree. */ var ti; -function wa() { +function Ea() { return ti || (ti = 1, process.env.NODE_ENV !== "production" && function() { - var e = Re, n = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), a = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), d = Symbol.iterator, g = "@@iterator"; + var e = Oe, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), a = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), m = Symbol.iterator, g = "@@iterator"; function b(k) { if (k === null || typeof k != "object") return null; - var O = d && k[d] || k[g]; - return typeof O == "function" ? O : null; + var R = m && k[m] || k[g]; + return typeof R == "function" ? R : null; } var x = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - function P(k) { + function A(k) { { - for (var O = arguments.length, L = new Array(O > 1 ? O - 1 : 0), X = 1; X < O; X++) + for (var R = arguments.length, L = new Array(R > 1 ? R - 1 : 0), X = 1; X < R; X++) L[X - 1] = arguments[X]; - T("error", k, L); + C("error", k, L); } } - function T(k, O, L) { + function C(k, R, L) { { var X = x.ReactDebugCurrentFrame, fe = X.getStackAddendum(); - fe !== "" && (O += "%s", L = L.concat([fe])); + fe !== "" && (R += "%s", L = L.concat([fe])); var be = L.map(function(ae) { return String(ae); }); - be.unshift("Warning: " + O), Function.prototype.apply.call(console[k], console, be); + be.unshift("Warning: " + R), Function.prototype.apply.call(console[k], console, be); } } var j = !1, E = !1, w = !1, N = !1, U = !1, te; te = Symbol.for("react.module.reference"); function v(k) { - return !!(typeof k == "string" || typeof k == "function" || k === r || k === o || U || k === i || k === u || k === c || N || k === p || j || E || w || typeof k == "object" && k !== null && (k.$$typeof === m || k.$$typeof === f || k.$$typeof === l || k.$$typeof === a || k.$$typeof === s || // This needs to include all possible module reference object + return !!(typeof k == "string" || typeof k == "function" || k === r || k === o || U || k === i || k === c || k === f || N || k === p || j || E || w || typeof k == "object" && k !== null && (k.$$typeof === d || k.$$typeof === u || k.$$typeof === l || k.$$typeof === a || k.$$typeof === s || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. k.$$typeof === te || k.getModuleId !== void 0)); } - function _(k, O, L) { + function _(k, R, L) { var X = k.displayName; if (X) return X; - var fe = O.displayName || O.name || ""; + var fe = R.displayName || R.name || ""; return fe !== "" ? L + "(" + fe + ")" : L; } function z(k) { @@ -91,38 +91,38 @@ function wa() { function Q(k) { if (k == null) return null; - if (typeof k.tag == "number" && P("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof k == "function") + if (typeof k.tag == "number" && A("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof k == "function") return k.displayName || k.name || null; if (typeof k == "string") return k; switch (k) { case r: return "Fragment"; - case t: + case n: return "Portal"; case o: return "Profiler"; case i: return "StrictMode"; - case u: - return "Suspense"; case c: + return "Suspense"; + case f: return "SuspenseList"; } if (typeof k == "object") switch (k.$$typeof) { case a: - var O = k; - return z(O) + ".Consumer"; + var R = k; + return z(R) + ".Consumer"; case l: var L = k; return z(L._context) + ".Provider"; case s: return _(k, k.render, "ForwardRef"); - case f: + case u: var X = k.displayName || null; return X !== null ? X : Q(k.type) || "Memo"; - case m: { + case d: { var fe = k, be = fe._payload, ae = fe._init; try { return Q(ae(be)); @@ -192,11 +192,11 @@ function wa() { }) }); } - G < 0 && P("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + G < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var M = x.ReactCurrentDispatcher, W; - function Y(k, O, L) { + function Y(k, R, L) { { if (W === void 0) try { @@ -214,7 +214,7 @@ function wa() { var Ee = typeof WeakMap == "function" ? WeakMap : Map; K = new Ee(); } - function D(k, O) { + function D(k, R) { if (!k || re) return ""; { @@ -229,7 +229,7 @@ function wa() { var be; be = M.current, M.current = null, B(); try { - if (O) { + if (R) { var ae = function() { throw Error(); }; @@ -263,14 +263,14 @@ function wa() { } catch (Qe) { if (Qe && X && typeof Qe.stack == "string") { for (var le = Qe.stack.split(` -`), Oe = X.stack.split(` -`), Se = le.length - 1, Ce = Oe.length - 1; Se >= 1 && Ce >= 0 && le[Se] !== Oe[Ce]; ) +`), Re = X.stack.split(` +`), Se = le.length - 1, Ce = Re.length - 1; Se >= 1 && Ce >= 0 && le[Se] !== Re[Ce]; ) Ce--; for (; Se >= 1 && Ce >= 0; Se--, Ce--) - if (le[Se] !== Oe[Ce]) { + if (le[Se] !== Re[Ce]) { if (Se !== 1 || Ce !== 1) do - if (Se--, Ce--, Ce < 0 || le[Se] !== Oe[Ce]) { + if (Se--, Ce--, Ce < 0 || le[Se] !== Re[Ce]) { var Me = ` ` + le[Se].replace(" at new ", " at "); return k.displayName && Me.includes("") && (Me = Me.replace("", k.displayName)), typeof k == "function" && K.set(k, Me), Me; @@ -282,17 +282,17 @@ function wa() { } finally { re = !1, M.current = be, ne(), Error.prepareStackTrace = fe; } - var mt = k ? k.displayName || k.name : "", Zr = mt ? Y(mt) : ""; + var gt = k ? k.displayName || k.name : "", Zr = gt ? Y(gt) : ""; return typeof k == "function" && K.set(k, Zr), Zr; } - function Pe(k, O, L) { + function Pe(k, R, L) { return D(k, !1); } function $(k) { - var O = k.prototype; - return !!(O && O.isReactComponent); + var R = k.prototype; + return !!(R && R.isReactComponent); } - function _e(k, O, L) { + function _e(k, R, L) { if (k == null) return ""; if (typeof k == "function") @@ -300,21 +300,21 @@ function wa() { if (typeof k == "string") return Y(k); switch (k) { - case u: - return Y("Suspense"); case c: + return Y("Suspense"); + case f: return Y("SuspenseList"); } if (typeof k == "object") switch (k.$$typeof) { case s: return Pe(k.render); - case f: - return _e(k.type, O, L); - case m: { + case u: + return _e(k.type, R, L); + case d: { var X = k, fe = X._payload, be = X._init; try { - return _e(be(fe), O, L); + return _e(be(fe), R, L); } catch { } } @@ -322,14 +322,14 @@ function wa() { return ""; } var Ne = Object.prototype.hasOwnProperty, tt = {}, At = x.ReactDebugCurrentFrame; - function ht(k) { + function dt(k) { if (k) { - var O = k._owner, L = _e(k.type, k._source, O ? O.type : null); + var R = k._owner, L = _e(k.type, k._source, R ? R.type : null); At.setExtraStackFrame(L); } else At.setExtraStackFrame(null); } - function Yt(k, O, L, X, fe) { + function Yt(k, R, L, X, fe) { { var be = Function.call.bind(Ne); for (var ae in k) @@ -337,14 +337,14 @@ function wa() { var le = void 0; try { if (typeof k[ae] != "function") { - var Oe = Error((X || "React class") + ": " + L + " type `" + ae + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof k[ae] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); - throw Oe.name = "Invariant Violation", Oe; + var Re = Error((X || "React class") + ": " + L + " type `" + ae + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof k[ae] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); + throw Re.name = "Invariant Violation", Re; } - le = k[ae](O, ae, X, L, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); + le = k[ae](R, ae, X, L, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (Se) { le = Se; } - le && !(le instanceof Error) && (ht(fe), P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", X || "React class", L, ae, typeof le), ht(null)), le instanceof Error && !(le.message in tt) && (tt[le.message] = !0, ht(fe), P("Failed %s type: %s", L, le.message), ht(null)); + le && !(le instanceof Error) && (dt(fe), A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", X || "React class", L, ae, typeof le), dt(null)), le instanceof Error && !(le.message in tt) && (tt[le.message] = !0, dt(fe), A("Failed %s type: %s", L, le.message), dt(null)); } } } @@ -352,13 +352,13 @@ function wa() { function Pt(k) { return Gt(k); } - function Cn(k) { + function Sn(k) { { - var O = typeof Symbol == "function" && Symbol.toStringTag, L = O && k[Symbol.toStringTag] || k.constructor.name || "Object"; + var R = typeof Symbol == "function" && Symbol.toStringTag, L = R && k[Symbol.toStringTag] || k.constructor.name || "Object"; return L; } } - function Tn(k) { + function Cn(k) { try { return Jt(k), !1; } catch { @@ -369,8 +369,8 @@ function wa() { return "" + k; } function Kt(k) { - if (Tn(k)) - return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Cn(k)), Jt(k); + if (Cn(k)) + return A("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Sn(k)), Jt(k); } var S = x.ReactCurrentOwner, F = { key: !0, @@ -381,30 +381,30 @@ function wa() { ce = {}; function je(k) { if (Ne.call(k, "ref")) { - var O = Object.getOwnPropertyDescriptor(k, "ref").get; - if (O && O.isReactWarning) + var R = Object.getOwnPropertyDescriptor(k, "ref").get; + if (R && R.isReactWarning) return !1; } return k.ref !== void 0; } - function We(k) { + function Ve(k) { if (Ne.call(k, "key")) { - var O = Object.getOwnPropertyDescriptor(k, "key").get; - if (O && O.isReactWarning) + var R = Object.getOwnPropertyDescriptor(k, "key").get; + if (R && R.isReactWarning) return !1; } return k.key !== void 0; } - function He(k, O) { - if (typeof k.ref == "string" && S.current && O && S.current.stateNode !== O) { + function He(k, R) { + if (typeof k.ref == "string" && S.current && R && S.current.stateNode !== R) { var L = Q(S.current.type); - ce[L] || (P('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Q(S.current.type), k.ref), ce[L] = !0); + ce[L] || (A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Q(S.current.type), k.ref), ce[L] = !0); } } - function at(k, O) { + function lt(k, R) { { var L = function() { - V || (V = !0, P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", O)); + V || (V = !0, A("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", R)); }; L.isReactWarning = !0, Object.defineProperty(k, "key", { get: L, @@ -412,10 +412,10 @@ function wa() { }); } } - function st(k, O) { + function at(k, R) { { var L = function() { - ue || (ue = !0, P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", O)); + ue || (ue = !0, A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", R)); }; L.isReactWarning = !0, Object.defineProperty(k, "ref", { get: L, @@ -423,13 +423,13 @@ function wa() { }); } } - var ve = function(k, O, L, X, fe, be, ae) { + var ve = function(k, R, L, X, fe, be, ae) { var le = { // This tag allows us to uniquely identify this as a React Element - $$typeof: n, + $$typeof: t, // Built-in properties that belong on the element type: k, - key: O, + key: R, ref: L, props: ae, // Record the component responsible for creating this element. @@ -452,36 +452,36 @@ function wa() { value: fe }), Object.freeze && (Object.freeze(le.props), Object.freeze(le)), le; }; - function Ot(k, O, L, X, fe) { + function Rt(k, R, L, X, fe) { { - var be, ae = {}, le = null, Oe = null; - L !== void 0 && (Kt(L), le = "" + L), We(O) && (Kt(O.key), le = "" + O.key), je(O) && (Oe = O.ref, He(O, fe)); - for (be in O) - Ne.call(O, be) && !F.hasOwnProperty(be) && (ae[be] = O[be]); + var be, ae = {}, le = null, Re = null; + L !== void 0 && (Kt(L), le = "" + L), Ve(R) && (Kt(R.key), le = "" + R.key), je(R) && (Re = R.ref, He(R, fe)); + for (be in R) + Ne.call(R, be) && !F.hasOwnProperty(be) && (ae[be] = R[be]); if (k && k.defaultProps) { var Se = k.defaultProps; for (be in Se) ae[be] === void 0 && (ae[be] = Se[be]); } - if (le || Oe) { + if (le || Re) { var Ce = typeof k == "function" ? k.displayName || k.name || "Unknown" : k; - le && at(ae, Ce), Oe && st(ae, Ce); + le && lt(ae, Ce), Re && at(ae, Ce); } - return ve(k, le, Oe, fe, X, S.current, ae); + return ve(k, le, Re, fe, X, S.current, ae); } } var De = x.ReactCurrentOwner, Yr = x.ReactDebugCurrentFrame; - function dt(k) { + function mt(k) { if (k) { - var O = k._owner, L = _e(k.type, k._source, O ? O.type : null); + var R = k._owner, L = _e(k.type, k._source, R ? R.type : null); Yr.setExtraStackFrame(L); } else Yr.setExtraStackFrame(null); } - var An; - An = !1; - function Pn(k) { - return typeof k == "object" && k !== null && k.$$typeof === n; + var Tn; + Tn = !1; + function An(k) { + return typeof k == "object" && k !== null && k.$$typeof === t; } function Gr() { { @@ -495,390 +495,390 @@ Check the render method of \`` + k + "`."; return ""; } } - function ca(k) { + function pa(k) { { if (k !== void 0) { - var O = k.fileName.replace(/^.*[\\\/]/, ""), L = k.lineNumber; + var R = k.fileName.replace(/^.*[\\\/]/, ""), L = k.lineNumber; return ` -Check your code at ` + O + ":" + L + "."; +Check your code at ` + R + ":" + L + "."; } return ""; } } var Jr = {}; - function fa(k) { + function ha(k) { { - var O = Gr(); - if (!O) { + var R = Gr(); + if (!R) { var L = typeof k == "string" ? k : k.displayName || k.name; - L && (O = ` + L && (R = ` Check the top-level render call using <` + L + ">."); } - return O; + return R; } } - function Kr(k, O) { + function Kr(k, R) { { if (!k._store || k._store.validated || k.key != null) return; k._store.validated = !0; - var L = fa(O); + var L = ha(R); if (Jr[L]) return; Jr[L] = !0; var X = ""; - k && k._owner && k._owner !== De.current && (X = " It was passed a child from " + Q(k._owner.type) + "."), dt(k), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', L, X), dt(null); + k && k._owner && k._owner !== De.current && (X = " It was passed a child from " + Q(k._owner.type) + "."), mt(k), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', L, X), mt(null); } } - function Xr(k, O) { + function Xr(k, R) { { if (typeof k != "object") return; if (Pt(k)) for (var L = 0; L < k.length; L++) { var X = k[L]; - Pn(X) && Kr(X, O); + An(X) && Kr(X, R); } - else if (Pn(k)) + else if (An(k)) k._store && (k._store.validated = !0); else if (k) { var fe = b(k); if (typeof fe == "function" && fe !== k.entries) for (var be = fe.call(k), ae; !(ae = be.next()).done; ) - Pn(ae.value) && Kr(ae.value, O); + An(ae.value) && Kr(ae.value, R); } } } - function pa(k) { + function da(k) { { - var O = k.type; - if (O == null || typeof O == "string") + var R = k.type; + if (R == null || typeof R == "string") return; var L; - if (typeof O == "function") - L = O.propTypes; - else if (typeof O == "object" && (O.$$typeof === s || // Note: Memo only checks outer props here. + if (typeof R == "function") + L = R.propTypes; + else if (typeof R == "object" && (R.$$typeof === s || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. - O.$$typeof === f)) - L = O.propTypes; + R.$$typeof === u)) + L = R.propTypes; else return; if (L) { - var X = Q(O); + var X = Q(R); Yt(L, k.props, "prop", X, k); - } else if (O.PropTypes !== void 0 && !An) { - An = !0; - var fe = Q(O); - P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", fe || "Unknown"); + } else if (R.PropTypes !== void 0 && !Tn) { + Tn = !0; + var fe = Q(R); + A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", fe || "Unknown"); } - typeof O.getDefaultProps == "function" && !O.getDefaultProps.isReactClassApproved && P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + typeof R.getDefaultProps == "function" && !R.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } - function ha(k) { + function ma(k) { { - for (var O = Object.keys(k.props), L = 0; L < O.length; L++) { - var X = O[L]; + for (var R = Object.keys(k.props), L = 0; L < R.length; L++) { + var X = R[L]; if (X !== "children" && X !== "key") { - dt(k), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", X), dt(null); + mt(k), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", X), mt(null); break; } } - k.ref !== null && (dt(k), P("Invalid attribute `ref` supplied to `React.Fragment`."), dt(null)); + k.ref !== null && (mt(k), A("Invalid attribute `ref` supplied to `React.Fragment`."), mt(null)); } } - function Qr(k, O, L, X, fe, be) { + function Qr(k, R, L, X, fe, be) { { var ae = v(k); if (!ae) { var le = ""; (k === void 0 || typeof k == "object" && k !== null && Object.keys(k).length === 0) && (le += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); - var Oe = ca(fe); - Oe ? le += Oe : le += Gr(); + var Re = pa(fe); + Re ? le += Re : le += Gr(); var Se; - k === null ? Se = "null" : Pt(k) ? Se = "array" : k !== void 0 && k.$$typeof === n ? (Se = "<" + (Q(k.type) || "Unknown") + " />", le = " Did you accidentally export a JSX literal instead of a component?") : Se = typeof k, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Se, le); + k === null ? Se = "null" : Pt(k) ? Se = "array" : k !== void 0 && k.$$typeof === t ? (Se = "<" + (Q(k.type) || "Unknown") + " />", le = " Did you accidentally export a JSX literal instead of a component?") : Se = typeof k, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Se, le); } - var Ce = Ot(k, O, L, fe, be); + var Ce = Rt(k, R, L, fe, be); if (Ce == null) return Ce; if (ae) { - var Me = O.children; + var Me = R.children; if (Me !== void 0) if (X) if (Pt(Me)) { - for (var mt = 0; mt < Me.length; mt++) - Xr(Me[mt], k); + for (var gt = 0; gt < Me.length; gt++) + Xr(Me[gt], k); Object.freeze && Object.freeze(Me); } else - P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); + A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); else Xr(Me, k); } - return k === r ? ha(Ce) : pa(Ce), Ce; + return k === r ? ma(Ce) : da(Ce), Ce; } } - function da(k, O, L) { - return Qr(k, O, L, !0); + function ga(k, R, L) { + return Qr(k, R, L, !0); } - function ma(k, O, L) { - return Qr(k, O, L, !1); + function ya(k, R, L) { + return Qr(k, R, L, !1); } - var ga = ma, ya = da; - Ft.Fragment = r, Ft.jsx = ga, Ft.jsxs = ya; + var ba = ya, ka = ga; + Ft.Fragment = r, Ft.jsx = ba, Ft.jsxs = ka; }()), Ft; } -process.env.NODE_ENV === "production" ? tr.exports = xa() : tr.exports = wa(); -var C = tr.exports; -const gt = ({ href: e, title: n, className: t }) => /* @__PURE__ */ C.jsx("a", { className: `${t} text-zinc-300 hover:text-zinc-100 transition ease-in-out`, href: e, target: "_blank", rel: "noreferrer", children: n }); -function hn() { - return /* @__PURE__ */ C.jsxs("div", { className: "flex flex-col items-center w-full font-light text-sm", children: [ - /* @__PURE__ */ C.jsxs("div", { className: "flex", children: [ - /* @__PURE__ */ C.jsx(gt, { href: "mailto:hello@quibbble.com", title: "Contact" }), - /* @__PURE__ */ C.jsx("p", { className: "mx-2 md:mx-4", children: "/" }), - /* @__PURE__ */ C.jsx(gt, { href: "https://www.buymeacoffee.com/quibbble", title: "Support" }), - /* @__PURE__ */ C.jsx("p", { className: "mx-2 md:mx-4", children: "/" }), - /* @__PURE__ */ C.jsx(gt, { href: "https://discord.gg/VKvjutuhUp", title: "Discord" }), - /* @__PURE__ */ C.jsx("p", { className: "mx-2 md:mx-4", children: "/" }), - /* @__PURE__ */ C.jsx(gt, { href: "https://github.com/quibbble", title: "Github" }), - /* @__PURE__ */ C.jsx("p", { className: "mx-2 md:mx-4", children: "/" }), - /* @__PURE__ */ C.jsx(gt, { href: "https://status.quibbble.com", title: "Status" }) +process.env.NODE_ENV === "production" ? er.exports = va() : er.exports = Ea(); +var T = er.exports; +const yt = ({ href: e, title: t, className: n }) => /* @__PURE__ */ T.jsx("a", { className: `${n} text-zinc-300 hover:text-zinc-100 transition ease-in-out`, href: e, target: "_blank", rel: "noreferrer", children: t }); +function pn() { + return /* @__PURE__ */ T.jsxs("div", { className: "flex flex-col items-center w-full font-light text-sm", children: [ + /* @__PURE__ */ T.jsxs("div", { className: "flex", children: [ + /* @__PURE__ */ T.jsx(yt, { href: "mailto:hello@quibbble.com", title: "Contact" }), + /* @__PURE__ */ T.jsx("p", { className: "mx-2 md:mx-4", children: "/" }), + /* @__PURE__ */ T.jsx(yt, { href: "https://www.buymeacoffee.com/quibbble", title: "Support" }), + /* @__PURE__ */ T.jsx("p", { className: "mx-2 md:mx-4", children: "/" }), + /* @__PURE__ */ T.jsx(yt, { href: "https://discord.gg/VKvjutuhUp", title: "Discord" }), + /* @__PURE__ */ T.jsx("p", { className: "mx-2 md:mx-4", children: "/" }), + /* @__PURE__ */ T.jsx(yt, { href: "https://github.com/quibbble", title: "Github" }), + /* @__PURE__ */ T.jsx("p", { className: "mx-2 md:mx-4", children: "/" }), + /* @__PURE__ */ T.jsx(yt, { href: "https://status.quibbble.com", title: "Status" }) ] }), - /* @__PURE__ */ C.jsxs("p", { className: "mt-4 text-zinc-300 flex", children: [ + /* @__PURE__ */ T.jsxs("p", { className: "mt-4 text-zinc-300 flex", children: [ "Made with ♥ by ", - /* @__PURE__ */ C.jsx(gt, { className: "underline", href: "https://chrisfregly.com", title: " Chris Fregly" }) + /* @__PURE__ */ T.jsx(yt, { className: "underline", href: "https://chrisfregly.com", title: " Chris Fregly" }) ] }) ] }); } -function Ao(e, n) { +function Po(e, t) { return function() { - return e.apply(n, arguments); + return e.apply(t, arguments); }; } -const { toString: va } = Object.prototype, { getPrototypeOf: wr } = Object, dn = ((e) => (n) => { - const t = va.call(n); - return e[t] || (e[t] = t.slice(8, -1).toLowerCase()); -})(/* @__PURE__ */ Object.create(null)), Ke = (e) => (e = e.toLowerCase(), (n) => dn(n) === e), mn = (e) => (n) => typeof n === e, { isArray: Et } = Array, Lt = mn("undefined"); -function Ea(e) { +const { toString: Sa } = Object.prototype, { getPrototypeOf: wr } = Object, hn = ((e) => (t) => { + const n = Sa.call(t); + return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); +})(/* @__PURE__ */ Object.create(null)), Ke = (e) => (e = e.toLowerCase(), (t) => hn(t) === e), dn = (e) => (t) => typeof t === e, { isArray: Et } = Array, Lt = dn("undefined"); +function Ca(e) { return e !== null && !Lt(e) && e.constructor !== null && !Lt(e.constructor) && Be(e.constructor.isBuffer) && e.constructor.isBuffer(e); } -const Po = Ke("ArrayBuffer"); -function Sa(e) { - let n; - return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? n = ArrayBuffer.isView(e) : n = e && e.buffer && Po(e.buffer), n; +const Ro = Ke("ArrayBuffer"); +function Ta(e) { + let t; + return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ro(e.buffer), t; } -const Ca = mn("string"), Be = mn("function"), Oo = mn("number"), gn = (e) => e !== null && typeof e == "object", Ta = (e) => e === !0 || e === !1, rn = (e) => { - if (dn(e) !== "object") +const Aa = dn("string"), Be = dn("function"), Oo = dn("number"), mn = (e) => e !== null && typeof e == "object", Pa = (e) => e === !0 || e === !1, rn = (e) => { + if (hn(e) !== "object") return !1; - const n = wr(e); - return (n === null || n === Object.prototype || Object.getPrototypeOf(n) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); -}, Aa = Ke("Date"), Pa = Ke("File"), Oa = Ke("Blob"), Ra = Ke("FileList"), Fa = (e) => gn(e) && Be(e.pipe), Ia = (e) => { - let n; - return e && (typeof FormData == "function" && e instanceof FormData || Be(e.append) && ((n = dn(e)) === "formdata" || // detect form-data instance - n === "object" && Be(e.toString) && e.toString() === "[object FormData]")); -}, _a = Ke("URLSearchParams"), ja = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); -function Ut(e, n, { allOwnKeys: t = !1 } = {}) { + const t = wr(e); + return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); +}, Ra = Ke("Date"), Oa = Ke("File"), Fa = Ke("Blob"), Ia = Ke("FileList"), _a = (e) => mn(e) && Be(e.pipe), ja = (e) => { + let t; + return e && (typeof FormData == "function" && e instanceof FormData || Be(e.append) && ((t = hn(e)) === "formdata" || // detect form-data instance + t === "object" && Be(e.toString) && e.toString() === "[object FormData]")); +}, Da = Ke("URLSearchParams"), za = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); +function Ut(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let r, i; if (typeof e != "object" && (e = [e]), Et(e)) for (r = 0, i = e.length; r < i; r++) - n.call(null, e[r], r, e); + t.call(null, e[r], r, e); else { - const o = t ? Object.getOwnPropertyNames(e) : Object.keys(e), l = o.length; + const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), l = o.length; let a; for (r = 0; r < l; r++) - a = o[r], n.call(null, e[a], a, e); + a = o[r], t.call(null, e[a], a, e); } } -function Ro(e, n) { - n = n.toLowerCase(); - const t = Object.keys(e); - let r = t.length, i; +function Fo(e, t) { + t = t.toLowerCase(); + const n = Object.keys(e); + let r = n.length, i; for (; r-- > 0; ) - if (i = t[r], n === i.toLowerCase()) + if (i = n[r], t === i.toLowerCase()) return i; return null; } -const Fo = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Io = (e) => !Lt(e) && e !== Fo; -function nr() { - const { caseless: e } = Io(this) && this || {}, n = {}, t = (r, i) => { - const o = e && Ro(n, i) || i; - rn(n[o]) && rn(r) ? n[o] = nr(n[o], r) : rn(r) ? n[o] = nr({}, r) : Et(r) ? n[o] = r.slice() : n[o] = r; +const Io = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), _o = (e) => !Lt(e) && e !== Io; +function tr() { + const { caseless: e } = _o(this) && this || {}, t = {}, n = (r, i) => { + const o = e && Fo(t, i) || i; + rn(t[o]) && rn(r) ? t[o] = tr(t[o], r) : rn(r) ? t[o] = tr({}, r) : Et(r) ? t[o] = r.slice() : t[o] = r; }; for (let r = 0, i = arguments.length; r < i; r++) - arguments[r] && Ut(arguments[r], t); - return n; + arguments[r] && Ut(arguments[r], n); + return t; } -const Da = (e, n, t, { allOwnKeys: r } = {}) => (Ut(n, (i, o) => { - t && Be(i) ? e[o] = Ao(i, t) : e[o] = i; -}, { allOwnKeys: r }), e), za = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), La = (e, n, t, r) => { - e.prototype = Object.create(n.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", { - value: n.prototype - }), t && Object.assign(e.prototype, t); -}, Na = (e, n, t, r) => { +const La = (e, t, n, { allOwnKeys: r } = {}) => (Ut(t, (i, o) => { + n && Be(i) ? e[o] = Po(i, n) : e[o] = i; +}, { allOwnKeys: r }), e), Na = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ma = (e, t, n, r) => { + e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", { + value: t.prototype + }), n && Object.assign(e.prototype, n); +}, $a = (e, t, n, r) => { let i, o, l; const a = {}; - if (n = n || {}, e == null) - return n; + if (t = t || {}, e == null) + return t; do { for (i = Object.getOwnPropertyNames(e), o = i.length; o-- > 0; ) - l = i[o], (!r || r(l, e, n)) && !a[l] && (n[l] = e[l], a[l] = !0); - e = t !== !1 && wr(e); - } while (e && (!t || t(e, n)) && e !== Object.prototype); - return n; -}, Ma = (e, n, t) => { - e = String(e), (t === void 0 || t > e.length) && (t = e.length), t -= n.length; - const r = e.indexOf(n, t); - return r !== -1 && r === t; -}, $a = (e) => { + l = i[o], (!r || r(l, e, t)) && !a[l] && (t[l] = e[l], a[l] = !0); + e = n !== !1 && wr(e); + } while (e && (!n || n(e, t)) && e !== Object.prototype); + return t; +}, Ba = (e, t, n) => { + e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length; + const r = e.indexOf(t, n); + return r !== -1 && r === n; +}, Ua = (e) => { if (!e) return null; if (Et(e)) return e; - let n = e.length; - if (!Oo(n)) + let t = e.length; + if (!Oo(t)) return null; - const t = new Array(n); - for (; n-- > 0; ) - t[n] = e[n]; - return t; -}, Ba = ((e) => (n) => e && n instanceof e)(typeof Uint8Array < "u" && wr(Uint8Array)), Ua = (e, n) => { + const n = new Array(t); + for (; t-- > 0; ) + n[t] = e[t]; + return n; +}, qa = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && wr(Uint8Array)), Ha = (e, t) => { const r = (e && e[Symbol.iterator]).call(e); let i; for (; (i = r.next()) && !i.done; ) { const o = i.value; - n.call(e, o[0], o[1]); + t.call(e, o[0], o[1]); } -}, qa = (e, n) => { - let t; +}, Va = (e, t) => { + let n; const r = []; - for (; (t = e.exec(n)) !== null; ) - r.push(t); + for (; (n = e.exec(t)) !== null; ) + r.push(n); return r; -}, Ha = Ke("HTMLFormElement"), Va = (e) => e.toLowerCase().replace( +}, Wa = Ke("HTMLFormElement"), Ya = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, - function(t, r, i) { + function(n, r, i) { return r.toUpperCase() + i; } -), ni = (({ hasOwnProperty: e }) => (n, t) => e.call(n, t))(Object.prototype), Wa = Ke("RegExp"), _o = (e, n) => { - const t = Object.getOwnPropertyDescriptors(e), r = {}; - Ut(t, (i, o) => { +), ni = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ga = Ke("RegExp"), jo = (e, t) => { + const n = Object.getOwnPropertyDescriptors(e), r = {}; + Ut(n, (i, o) => { let l; - (l = n(i, o, e)) !== !1 && (r[o] = l || i); + (l = t(i, o, e)) !== !1 && (r[o] = l || i); }), Object.defineProperties(e, r); -}, Ya = (e) => { - _o(e, (n, t) => { - if (Be(e) && ["arguments", "caller", "callee"].indexOf(t) !== -1) +}, Ja = (e) => { + jo(e, (t, n) => { + if (Be(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; - const r = e[t]; + const r = e[n]; if (Be(r)) { - if (n.enumerable = !1, "writable" in n) { - n.writable = !1; + if (t.enumerable = !1, "writable" in t) { + t.writable = !1; return; } - n.set || (n.set = () => { - throw Error("Can not rewrite read-only method '" + t + "'"); + t.set || (t.set = () => { + throw Error("Can not rewrite read-only method '" + n + "'"); }); } }); -}, Ga = (e, n) => { - const t = {}, r = (i) => { +}, Ka = (e, t) => { + const n = {}, r = (i) => { i.forEach((o) => { - t[o] = !0; + n[o] = !0; }); }; - return Et(e) ? r(e) : r(String(e).split(n)), t; -}, Ja = () => { -}, Ka = (e, n) => (e = +e, Number.isFinite(e) ? e : n), On = "abcdefghijklmnopqrstuvwxyz", ri = "0123456789", jo = { + return Et(e) ? r(e) : r(String(e).split(t)), n; +}, Xa = () => { +}, Qa = (e, t) => (e = +e, Number.isFinite(e) ? e : t), Pn = "abcdefghijklmnopqrstuvwxyz", ri = "0123456789", Do = { DIGIT: ri, - ALPHA: On, - ALPHA_DIGIT: On + On.toUpperCase() + ri -}, Xa = (e = 16, n = jo.ALPHA_DIGIT) => { - let t = ""; - const { length: r } = n; + ALPHA: Pn, + ALPHA_DIGIT: Pn + Pn.toUpperCase() + ri +}, Za = (e = 16, t = Do.ALPHA_DIGIT) => { + let n = ""; + const { length: r } = t; for (; e--; ) - t += n[Math.random() * r | 0]; - return t; + n += t[Math.random() * r | 0]; + return n; }; -function Qa(e) { +function es(e) { return !!(e && Be(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]); } -const Za = (e) => { - const n = new Array(10), t = (r, i) => { - if (gn(r)) { - if (n.indexOf(r) >= 0) +const ts = (e) => { + const t = new Array(10), n = (r, i) => { + if (mn(r)) { + if (t.indexOf(r) >= 0) return; if (!("toJSON" in r)) { - n[i] = r; + t[i] = r; const o = Et(r) ? [] : {}; return Ut(r, (l, a) => { - const s = t(l, i + 1); + const s = n(l, i + 1); !Lt(s) && (o[a] = s); - }), n[i] = void 0, o; + }), t[i] = void 0, o; } } return r; }; - return t(e, 0); -}, es = Ke("AsyncFunction"), ts = (e) => e && (gn(e) || Be(e)) && Be(e.then) && Be(e.catch), A = { + return n(e, 0); +}, ns = Ke("AsyncFunction"), rs = (e) => e && (mn(e) || Be(e)) && Be(e.then) && Be(e.catch), P = { isArray: Et, - isArrayBuffer: Po, - isBuffer: Ea, - isFormData: Ia, - isArrayBufferView: Sa, - isString: Ca, + isArrayBuffer: Ro, + isBuffer: Ca, + isFormData: ja, + isArrayBufferView: Ta, + isString: Aa, isNumber: Oo, - isBoolean: Ta, - isObject: gn, + isBoolean: Pa, + isObject: mn, isPlainObject: rn, isUndefined: Lt, - isDate: Aa, - isFile: Pa, - isBlob: Oa, - isRegExp: Wa, + isDate: Ra, + isFile: Oa, + isBlob: Fa, + isRegExp: Ga, isFunction: Be, - isStream: Fa, - isURLSearchParams: _a, - isTypedArray: Ba, - isFileList: Ra, + isStream: _a, + isURLSearchParams: Da, + isTypedArray: qa, + isFileList: Ia, forEach: Ut, - merge: nr, - extend: Da, - trim: ja, - stripBOM: za, - inherits: La, - toFlatObject: Na, - kindOf: dn, + merge: tr, + extend: La, + trim: za, + stripBOM: Na, + inherits: Ma, + toFlatObject: $a, + kindOf: hn, kindOfTest: Ke, - endsWith: Ma, - toArray: $a, - forEachEntry: Ua, - matchAll: qa, - isHTMLForm: Ha, + endsWith: Ba, + toArray: Ua, + forEachEntry: Ha, + matchAll: Va, + isHTMLForm: Wa, hasOwnProperty: ni, hasOwnProp: ni, // an alias to avoid ESLint no-prototype-builtins detection - reduceDescriptors: _o, - freezeMethods: Ya, - toObjectSet: Ga, - toCamelCase: Va, - noop: Ja, - toFiniteNumber: Ka, - findKey: Ro, - global: Fo, - isContextDefined: Io, - ALPHABET: jo, - generateString: Xa, - isSpecCompliantForm: Qa, - toJSONObject: Za, - isAsyncFn: es, - isThenable: ts + reduceDescriptors: jo, + freezeMethods: Ja, + toObjectSet: Ka, + toCamelCase: Ya, + noop: Xa, + toFiniteNumber: Qa, + findKey: Fo, + global: Io, + isContextDefined: _o, + ALPHABET: Do, + generateString: Za, + isSpecCompliantForm: es, + toJSONObject: ts, + isAsyncFn: ns, + isThenable: rs }; -function se(e, n, t, r, i) { - Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", n && (this.code = n), t && (this.config = t), r && (this.request = r), i && (this.response = i); +function se(e, t, n, r, i) { + Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), i && (this.response = i); } -A.inherits(se, Error, { +P.inherits(se, Error, { toJSON: function() { return { // Standard @@ -893,13 +893,13 @@ A.inherits(se, Error, { columnNumber: this.columnNumber, stack: this.stack, // Axios - config: A.toJSONObject(this.config), + config: P.toJSONObject(this.config), code: this.code, status: this.response && this.response.status ? this.response.status : null }; } }); -const Do = se.prototype, zo = {}; +const zo = se.prototype, Lo = {}; [ "ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", @@ -915,98 +915,98 @@ const Do = se.prototype, zo = {}; "ERR_INVALID_URL" // eslint-disable-next-line func-names ].forEach((e) => { - zo[e] = { value: e }; + Lo[e] = { value: e }; }); -Object.defineProperties(se, zo); -Object.defineProperty(Do, "isAxiosError", { value: !0 }); -se.from = (e, n, t, r, i, o) => { - const l = Object.create(Do); - return A.toFlatObject(e, l, function(s) { +Object.defineProperties(se, Lo); +Object.defineProperty(zo, "isAxiosError", { value: !0 }); +se.from = (e, t, n, r, i, o) => { + const l = Object.create(zo); + return P.toFlatObject(e, l, function(s) { return s !== Error.prototype; - }, (a) => a !== "isAxiosError"), se.call(l, e.message, n, t, r, i), l.cause = e, l.name = e.name, o && Object.assign(l, o), l; + }, (a) => a !== "isAxiosError"), se.call(l, e.message, t, n, r, i), l.cause = e, l.name = e.name, o && Object.assign(l, o), l; }; -const ns = null; -function rr(e) { - return A.isPlainObject(e) || A.isArray(e); +const is = null; +function nr(e) { + return P.isPlainObject(e) || P.isArray(e); } -function Lo(e) { - return A.endsWith(e, "[]") ? e.slice(0, -2) : e; +function No(e) { + return P.endsWith(e, "[]") ? e.slice(0, -2) : e; } -function ii(e, n, t) { - return e ? e.concat(n).map(function(i, o) { - return i = Lo(i), !t && o ? "[" + i + "]" : i; - }).join(t ? "." : "") : n; +function ii(e, t, n) { + return e ? e.concat(t).map(function(i, o) { + return i = No(i), !n && o ? "[" + i + "]" : i; + }).join(n ? "." : "") : t; } -function rs(e) { - return A.isArray(e) && !e.some(rr); +function os(e) { + return P.isArray(e) && !e.some(nr); } -const is = A.toFlatObject(A, {}, null, function(n) { - return /^is[A-Z]/.test(n); +const ls = P.toFlatObject(P, {}, null, function(t) { + return /^is[A-Z]/.test(t); }); -function yn(e, n, t) { - if (!A.isObject(e)) +function gn(e, t, n) { + if (!P.isObject(e)) throw new TypeError("target must be an object"); - n = n || new FormData(), t = A.toFlatObject(t, { + t = t || new FormData(), n = P.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(g, b) { - return !A.isUndefined(b[g]); + return !P.isUndefined(b[g]); }); - const r = t.metaTokens, i = t.visitor || c, o = t.dots, l = t.indexes, s = (t.Blob || typeof Blob < "u" && Blob) && A.isSpecCompliantForm(n); - if (!A.isFunction(i)) + const r = n.metaTokens, i = n.visitor || f, o = n.dots, l = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && P.isSpecCompliantForm(t); + if (!P.isFunction(i)) throw new TypeError("visitor must be a function"); - function u(d) { - if (d === null) + function c(m) { + if (m === null) return ""; - if (A.isDate(d)) - return d.toISOString(); - if (!s && A.isBlob(d)) + if (P.isDate(m)) + return m.toISOString(); + if (!s && P.isBlob(m)) throw new se("Blob is not supported. Use a Buffer instead."); - return A.isArrayBuffer(d) || A.isTypedArray(d) ? s && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d; - } - function c(d, g, b) { - let x = d; - if (d && !b && typeof d == "object") { - if (A.endsWith(g, "{}")) - g = r ? g : g.slice(0, -2), d = JSON.stringify(d); - else if (A.isArray(d) && rs(d) || (A.isFileList(d) || A.endsWith(g, "[]")) && (x = A.toArray(d))) - return g = Lo(g), x.forEach(function(T, j) { - !(A.isUndefined(T) || T === null) && n.append( + return P.isArrayBuffer(m) || P.isTypedArray(m) ? s && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m; + } + function f(m, g, b) { + let x = m; + if (m && !b && typeof m == "object") { + if (P.endsWith(g, "{}")) + g = r ? g : g.slice(0, -2), m = JSON.stringify(m); + else if (P.isArray(m) && os(m) || (P.isFileList(m) || P.endsWith(g, "[]")) && (x = P.toArray(m))) + return g = No(g), x.forEach(function(C, j) { + !(P.isUndefined(C) || C === null) && t.append( // eslint-disable-next-line no-nested-ternary l === !0 ? ii([g], j, o) : l === null ? g : g + "[]", - u(T) + c(C) ); }), !1; } - return rr(d) ? !0 : (n.append(ii(b, g, o), u(d)), !1); + return nr(m) ? !0 : (t.append(ii(b, g, o), c(m)), !1); } - const f = [], m = Object.assign(is, { - defaultVisitor: c, - convertValue: u, - isVisitable: rr + const u = [], d = Object.assign(ls, { + defaultVisitor: f, + convertValue: c, + isVisitable: nr }); - function p(d, g) { - if (!A.isUndefined(d)) { - if (f.indexOf(d) !== -1) + function p(m, g) { + if (!P.isUndefined(m)) { + if (u.indexOf(m) !== -1) throw Error("Circular reference detected in " + g.join(".")); - f.push(d), A.forEach(d, function(x, P) { - (!(A.isUndefined(x) || x === null) && i.call( - n, + u.push(m), P.forEach(m, function(x, A) { + (!(P.isUndefined(x) || x === null) && i.call( + t, x, - A.isString(P) ? P.trim() : P, + P.isString(A) ? A.trim() : A, g, - m - )) === !0 && p(x, g ? g.concat(P) : [P]); - }), f.pop(); + d + )) === !0 && p(x, g ? g.concat(A) : [A]); + }), u.pop(); } } - if (!A.isObject(e)) + if (!P.isObject(e)) throw new TypeError("data must be an object"); - return p(e), n; + return p(e), t; } function oi(e) { - const n = { + const t = { "!": "%21", "'": "%27", "(": "%28", @@ -1016,39 +1016,39 @@ function oi(e) { "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) { - return n[r]; + return t[r]; }); } -function vr(e, n) { - this._pairs = [], e && yn(e, this, n); +function vr(e, t) { + this._pairs = [], e && gn(e, this, t); } -const No = vr.prototype; -No.append = function(n, t) { - this._pairs.push([n, t]); +const Mo = vr.prototype; +Mo.append = function(t, n) { + this._pairs.push([t, n]); }; -No.toString = function(n) { - const t = n ? function(r) { - return n.call(this, r, oi); +Mo.toString = function(t) { + const n = t ? function(r) { + return t.call(this, r, oi); } : oi; return this._pairs.map(function(i) { - return t(i[0]) + "=" + t(i[1]); + return n(i[0]) + "=" + n(i[1]); }, "").join("&"); }; -function os(e) { +function as(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } -function Mo(e, n, t) { - if (!n) +function $o(e, t, n) { + if (!t) return e; - const r = t && t.encode || os, i = t && t.serialize; + const r = n && n.encode || as, i = n && n.serialize; let o; - if (i ? o = i(n, t) : o = A.isURLSearchParams(n) ? n.toString() : new vr(n, t).toString(r), o) { + if (i ? o = i(t, n) : o = P.isURLSearchParams(t) ? t.toString() : new vr(t, n).toString(r), o) { const l = e.indexOf("#"); l !== -1 && (e = e.slice(0, l)), e += (e.indexOf("?") === -1 ? "?" : "&") + o; } return e; } -class ls { +class ss { constructor() { this.handlers = []; } @@ -1060,10 +1060,10 @@ class ls { * * @return {Number} An ID used to remove interceptor later */ - use(n, t, r) { + use(t, n, r) { return this.handlers.push({ - fulfilled: n, - rejected: t, + fulfilled: t, + rejected: n, synchronous: r ? r.synchronous : !1, runWhen: r ? r.runWhen : null }), this.handlers.length - 1; @@ -1075,8 +1075,8 @@ class ls { * * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise */ - eject(n) { - this.handlers[n] && (this.handlers[n] = null); + eject(t) { + this.handlers[t] && (this.handlers[t] = null); } /** * Clear all interceptors from the stack @@ -1096,114 +1096,117 @@ class ls { * * @returns {void} */ - forEach(n) { - A.forEach(this.handlers, function(r) { - r !== null && n(r); + forEach(t) { + P.forEach(this.handlers, function(r) { + r !== null && t(r); }); } } -const li = ls, $o = { +const li = ss, Bo = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 -}, as = typeof URLSearchParams < "u" ? URLSearchParams : vr, ss = typeof FormData < "u" ? FormData : null, us = typeof Blob < "u" ? Blob : null, cs = (() => { - let e; - return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u"; -})(), fs = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef -self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), Ve = { +}, us = typeof URLSearchParams < "u" ? URLSearchParams : vr, cs = typeof FormData < "u" ? FormData : null, fs = typeof Blob < "u" ? Blob : null, ps = { isBrowser: !0, classes: { - URLSearchParams: as, - FormData: ss, - Blob: us + URLSearchParams: us, + FormData: cs, + Blob: fs }, - isStandardBrowserEnv: cs, - isStandardBrowserWebWorkerEnv: fs, protocols: ["http", "https", "file", "blob", "url", "data"] +}, Uo = typeof window < "u" && typeof document < "u", hs = ((e) => Uo && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), ds = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef +self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), ms = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + hasBrowserEnv: Uo, + hasStandardBrowserEnv: hs, + hasStandardBrowserWebWorkerEnv: ds +}, Symbol.toStringTag, { value: "Module" })), Ge = { + ...ms, + ...ps }; -function ps(e, n) { - return yn(e, new Ve.classes.URLSearchParams(), Object.assign({ - visitor: function(t, r, i, o) { - return Ve.isNode && A.isBuffer(t) ? (this.append(r, t.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments); +function gs(e, t) { + return gn(e, new Ge.classes.URLSearchParams(), Object.assign({ + visitor: function(n, r, i, o) { + return Ge.isNode && P.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments); } - }, n)); + }, t)); } -function hs(e) { - return A.matchAll(/\w+|\[(\w*)]/g, e).map((n) => n[0] === "[]" ? "" : n[1] || n[0]); +function ys(e) { + return P.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } -function ds(e) { - const n = {}, t = Object.keys(e); +function bs(e) { + const t = {}, n = Object.keys(e); let r; - const i = t.length; + const i = n.length; let o; for (r = 0; r < i; r++) - o = t[r], n[o] = e[o]; - return n; + o = n[r], t[o] = e[o]; + return t; } -function Bo(e) { - function n(t, r, i, o) { - let l = t[o++]; - const a = Number.isFinite(+l), s = o >= t.length; - return l = !l && A.isArray(i) ? i.length : l, s ? (A.hasOwnProp(i, l) ? i[l] = [i[l], r] : i[l] = r, !a) : ((!i[l] || !A.isObject(i[l])) && (i[l] = []), n(t, r, i[l], o) && A.isArray(i[l]) && (i[l] = ds(i[l])), !a); +function qo(e) { + function t(n, r, i, o) { + let l = n[o++]; + const a = Number.isFinite(+l), s = o >= n.length; + return l = !l && P.isArray(i) ? i.length : l, s ? (P.hasOwnProp(i, l) ? i[l] = [i[l], r] : i[l] = r, !a) : ((!i[l] || !P.isObject(i[l])) && (i[l] = []), t(n, r, i[l], o) && P.isArray(i[l]) && (i[l] = bs(i[l])), !a); } - if (A.isFormData(e) && A.isFunction(e.entries)) { - const t = {}; - return A.forEachEntry(e, (r, i) => { - n(hs(r), i, t, 0); - }), t; + if (P.isFormData(e) && P.isFunction(e.entries)) { + const n = {}; + return P.forEachEntry(e, (r, i) => { + t(ys(r), i, n, 0); + }), n; } return null; } -function ms(e, n, t) { - if (A.isString(e)) +function ks(e, t, n) { + if (P.isString(e)) try { - return (n || JSON.parse)(e), A.trim(e); + return (t || JSON.parse)(e), P.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } - return (t || JSON.stringify)(e); + return (n || JSON.stringify)(e); } const Er = { - transitional: $o, - adapter: Ve.isNode ? "http" : "xhr", - transformRequest: [function(n, t) { - const r = t.getContentType() || "", i = r.indexOf("application/json") > -1, o = A.isObject(n); - if (o && A.isHTMLForm(n) && (n = new FormData(n)), A.isFormData(n)) - return i && i ? JSON.stringify(Bo(n)) : n; - if (A.isArrayBuffer(n) || A.isBuffer(n) || A.isStream(n) || A.isFile(n) || A.isBlob(n)) - return n; - if (A.isArrayBufferView(n)) - return n.buffer; - if (A.isURLSearchParams(n)) - return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), n.toString(); + transitional: Bo, + adapter: ["xhr", "http"], + transformRequest: [function(t, n) { + const r = n.getContentType() || "", i = r.indexOf("application/json") > -1, o = P.isObject(t); + if (o && P.isHTMLForm(t) && (t = new FormData(t)), P.isFormData(t)) + return i && i ? JSON.stringify(qo(t)) : t; + if (P.isArrayBuffer(t) || P.isBuffer(t) || P.isStream(t) || P.isFile(t) || P.isBlob(t)) + return t; + if (P.isArrayBufferView(t)) + return t.buffer; + if (P.isURLSearchParams(t)) + return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString(); let a; if (o) { if (r.indexOf("application/x-www-form-urlencoded") > -1) - return ps(n, this.formSerializer).toString(); - if ((a = A.isFileList(n)) || r.indexOf("multipart/form-data") > -1) { + return gs(t, this.formSerializer).toString(); + if ((a = P.isFileList(t)) || r.indexOf("multipart/form-data") > -1) { const s = this.env && this.env.FormData; - return yn( - a ? { "files[]": n } : n, + return gn( + a ? { "files[]": t } : t, s && new s(), this.formSerializer ); } } - return o || i ? (t.setContentType("application/json", !1), ms(n)) : n; + return o || i ? (n.setContentType("application/json", !1), ks(t)) : t; }], - transformResponse: [function(n) { - const t = this.transitional || Er.transitional, r = t && t.forcedJSONParsing, i = this.responseType === "json"; - if (n && A.isString(n) && (r && !this.responseType || i)) { - const l = !(t && t.silentJSONParsing) && i; + transformResponse: [function(t) { + const n = this.transitional || Er.transitional, r = n && n.forcedJSONParsing, i = this.responseType === "json"; + if (t && P.isString(t) && (r && !this.responseType || i)) { + const l = !(n && n.silentJSONParsing) && i; try { - return JSON.parse(n); + return JSON.parse(t); } catch (a) { if (l) throw a.name === "SyntaxError" ? se.from(a, se.ERR_BAD_RESPONSE, this, null, this.response) : a; } } - return n; + return t; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a @@ -1215,11 +1218,11 @@ const Er = { maxContentLength: -1, maxBodyLength: -1, env: { - FormData: Ve.classes.FormData, - Blob: Ve.classes.Blob + FormData: Ge.classes.FormData, + Blob: Ge.classes.Blob }, - validateStatus: function(n) { - return n >= 200 && n < 300; + validateStatus: function(t) { + return t >= 200 && t < 300; }, headers: { common: { @@ -1228,10 +1231,10 @@ const Er = { } } }; -A.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { +P.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { Er.headers[e] = {}; }); -const Sr = Er, gs = A.toObjectSet([ +const Sr = Er, xs = P.toObjectSet([ "age", "authorization", "content-length", @@ -1249,260 +1252,256 @@ const Sr = Er, gs = A.toObjectSet([ "referer", "retry-after", "user-agent" -]), ys = (e) => { - const n = {}; - let t, r, i; +]), ws = (e) => { + const t = {}; + let n, r, i; return e && e.split(` `).forEach(function(l) { - i = l.indexOf(":"), t = l.substring(0, i).trim().toLowerCase(), r = l.substring(i + 1).trim(), !(!t || n[t] && gs[t]) && (t === "set-cookie" ? n[t] ? n[t].push(r) : n[t] = [r] : n[t] = n[t] ? n[t] + ", " + r : r); - }), n; + i = l.indexOf(":"), n = l.substring(0, i).trim().toLowerCase(), r = l.substring(i + 1).trim(), !(!n || t[n] && xs[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); + }), t; }, ai = Symbol("internals"); function It(e) { return e && String(e).trim().toLowerCase(); } function on(e) { - return e === !1 || e == null ? e : A.isArray(e) ? e.map(on) : String(e); + return e === !1 || e == null ? e : P.isArray(e) ? e.map(on) : String(e); } -function bs(e) { - const n = /* @__PURE__ */ Object.create(null), t = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; +function vs(e) { + const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let r; - for (; r = t.exec(e); ) - n[r[1]] = r[2]; - return n; + for (; r = n.exec(e); ) + t[r[1]] = r[2]; + return t; } -const ks = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); -function Rn(e, n, t, r, i) { - if (A.isFunction(r)) - return r.call(this, n, t); - if (i && (n = t), !!A.isString(n)) { - if (A.isString(r)) - return n.indexOf(r) !== -1; - if (A.isRegExp(r)) - return r.test(n); +const Es = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); +function Rn(e, t, n, r, i) { + if (P.isFunction(r)) + return r.call(this, t, n); + if (i && (t = n), !!P.isString(t)) { + if (P.isString(r)) + return t.indexOf(r) !== -1; + if (P.isRegExp(r)) + return r.test(t); } } -function xs(e) { - return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (n, t, r) => t.toUpperCase() + r); +function Ss(e) { + return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } -function ws(e, n) { - const t = A.toCamelCase(" " + n); +function Cs(e, t) { + const n = P.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { - Object.defineProperty(e, r + t, { + Object.defineProperty(e, r + n, { value: function(i, o, l) { - return this[r].call(this, n, i, o, l); + return this[r].call(this, t, i, o, l); }, configurable: !0 }); }); } -class bn { - constructor(n) { - n && this.set(n); +class yn { + constructor(t) { + t && this.set(t); } - set(n, t, r) { + set(t, n, r) { const i = this; - function o(a, s, u) { - const c = It(s); - if (!c) + function o(a, s, c) { + const f = It(s); + if (!f) throw new Error("header name must be a non-empty string"); - const f = A.findKey(i, c); - (!f || i[f] === void 0 || u === !0 || u === void 0 && i[f] !== !1) && (i[f || s] = on(a)); + const u = P.findKey(i, f); + (!u || i[u] === void 0 || c === !0 || c === void 0 && i[u] !== !1) && (i[u || s] = on(a)); } - const l = (a, s) => A.forEach(a, (u, c) => o(u, c, s)); - return A.isPlainObject(n) || n instanceof this.constructor ? l(n, t) : A.isString(n) && (n = n.trim()) && !ks(n) ? l(ys(n), t) : n != null && o(t, n, r), this; + const l = (a, s) => P.forEach(a, (c, f) => o(c, f, s)); + return P.isPlainObject(t) || t instanceof this.constructor ? l(t, n) : P.isString(t) && (t = t.trim()) && !Es(t) ? l(ws(t), n) : t != null && o(n, t, r), this; } - get(n, t) { - if (n = It(n), n) { - const r = A.findKey(this, n); + get(t, n) { + if (t = It(t), t) { + const r = P.findKey(this, t); if (r) { const i = this[r]; - if (!t) + if (!n) return i; - if (t === !0) - return bs(i); - if (A.isFunction(t)) - return t.call(this, i, r); - if (A.isRegExp(t)) - return t.exec(i); + if (n === !0) + return vs(i); + if (P.isFunction(n)) + return n.call(this, i, r); + if (P.isRegExp(n)) + return n.exec(i); throw new TypeError("parser must be boolean|regexp|function"); } } } - has(n, t) { - if (n = It(n), n) { - const r = A.findKey(this, n); - return !!(r && this[r] !== void 0 && (!t || Rn(this, this[r], r, t))); + has(t, n) { + if (t = It(t), t) { + const r = P.findKey(this, t); + return !!(r && this[r] !== void 0 && (!n || Rn(this, this[r], r, n))); } return !1; } - delete(n, t) { + delete(t, n) { const r = this; let i = !1; function o(l) { if (l = It(l), l) { - const a = A.findKey(r, l); - a && (!t || Rn(r, r[a], a, t)) && (delete r[a], i = !0); + const a = P.findKey(r, l); + a && (!n || Rn(r, r[a], a, n)) && (delete r[a], i = !0); } } - return A.isArray(n) ? n.forEach(o) : o(n), i; + return P.isArray(t) ? t.forEach(o) : o(t), i; } - clear(n) { - const t = Object.keys(this); - let r = t.length, i = !1; + clear(t) { + const n = Object.keys(this); + let r = n.length, i = !1; for (; r--; ) { - const o = t[r]; - (!n || Rn(this, this[o], o, n, !0)) && (delete this[o], i = !0); + const o = n[r]; + (!t || Rn(this, this[o], o, t, !0)) && (delete this[o], i = !0); } return i; } - normalize(n) { - const t = this, r = {}; - return A.forEach(this, (i, o) => { - const l = A.findKey(r, o); + normalize(t) { + const n = this, r = {}; + return P.forEach(this, (i, o) => { + const l = P.findKey(r, o); if (l) { - t[l] = on(i), delete t[o]; + n[l] = on(i), delete n[o]; return; } - const a = n ? xs(o) : String(o).trim(); - a !== o && delete t[o], t[a] = on(i), r[a] = !0; + const a = t ? Ss(o) : String(o).trim(); + a !== o && delete n[o], n[a] = on(i), r[a] = !0; }), this; } - concat(...n) { - return this.constructor.concat(this, ...n); + concat(...t) { + return this.constructor.concat(this, ...t); } - toJSON(n) { - const t = /* @__PURE__ */ Object.create(null); - return A.forEach(this, (r, i) => { - r != null && r !== !1 && (t[i] = n && A.isArray(r) ? r.join(", ") : r); - }), t; + toJSON(t) { + const n = /* @__PURE__ */ Object.create(null); + return P.forEach(this, (r, i) => { + r != null && r !== !1 && (n[i] = t && P.isArray(r) ? r.join(", ") : r); + }), n; } [Symbol.iterator]() { return Object.entries(this.toJSON())[Symbol.iterator](); } toString() { - return Object.entries(this.toJSON()).map(([n, t]) => n + ": " + t).join(` + return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(` `); } get [Symbol.toStringTag]() { return "AxiosHeaders"; } - static from(n) { - return n instanceof this ? n : new this(n); + static from(t) { + return t instanceof this ? t : new this(t); } - static concat(n, ...t) { - const r = new this(n); - return t.forEach((i) => r.set(i)), r; + static concat(t, ...n) { + const r = new this(t); + return n.forEach((i) => r.set(i)), r; } - static accessor(n) { + static accessor(t) { const r = (this[ai] = this[ai] = { accessors: {} }).accessors, i = this.prototype; function o(l) { const a = It(l); - r[a] || (ws(i, l), r[a] = !0); + r[a] || (Cs(i, l), r[a] = !0); } - return A.isArray(n) ? n.forEach(o) : o(n), this; + return P.isArray(t) ? t.forEach(o) : o(t), this; } } -bn.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); -A.reduceDescriptors(bn.prototype, ({ value: e }, n) => { - let t = n[0].toUpperCase() + n.slice(1); +yn.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); +P.reduceDescriptors(yn.prototype, ({ value: e }, t) => { + let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { - this[t] = r; + this[n] = r; } }; }); -A.freezeMethods(bn); -const Ze = bn; -function Fn(e, n) { - const t = this || Sr, r = n || t, i = Ze.from(r.headers); +P.freezeMethods(yn); +const Ze = yn; +function On(e, t) { + const n = this || Sr, r = t || n, i = Ze.from(r.headers); let o = r.data; - return A.forEach(e, function(a) { - o = a.call(t, o, i.normalize(), n ? n.status : void 0); + return P.forEach(e, function(a) { + o = a.call(n, o, i.normalize(), t ? t.status : void 0); }), i.normalize(), o; } -function Uo(e) { +function Ho(e) { return !!(e && e.__CANCEL__); } -function qt(e, n, t) { - se.call(this, e ?? "canceled", se.ERR_CANCELED, n, t), this.name = "CanceledError"; +function qt(e, t, n) { + se.call(this, e ?? "canceled", se.ERR_CANCELED, t, n), this.name = "CanceledError"; } -A.inherits(qt, se, { +P.inherits(qt, se, { __CANCEL__: !0 }); -function vs(e, n, t) { - const r = t.config.validateStatus; - !t.status || !r || r(t.status) ? e(t) : n(new se( - "Request failed with status code " + t.status, - [se.ERR_BAD_REQUEST, se.ERR_BAD_RESPONSE][Math.floor(t.status / 100) - 4], - t.config, - t.request, - t +function Ts(e, t, n) { + const r = n.config.validateStatus; + !n.status || !r || r(n.status) ? e(n) : t(new se( + "Request failed with status code " + n.status, + [se.ERR_BAD_REQUEST, se.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], + n.config, + n.request, + n )); } -const Es = Ve.isStandardBrowserEnv ? ( +const As = Ge.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie - function() { - return { - write: function(t, r, i, o, l, a) { - const s = []; - s.push(t + "=" + encodeURIComponent(r)), A.isNumber(i) && s.push("expires=" + new Date(i).toGMTString()), A.isString(o) && s.push("path=" + o), A.isString(l) && s.push("domain=" + l), a === !0 && s.push("secure"), document.cookie = s.join("; "); - }, - read: function(t) { - const r = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)")); - return r ? decodeURIComponent(r[3]) : null; - }, - remove: function(t) { - this.write(t, "", Date.now() - 864e5); - } - }; - }() + { + write(e, t, n, r, i, o) { + const l = [e + "=" + encodeURIComponent(t)]; + P.isNumber(n) && l.push("expires=" + new Date(n).toGMTString()), P.isString(r) && l.push("path=" + r), P.isString(i) && l.push("domain=" + i), o === !0 && l.push("secure"), document.cookie = l.join("; "); + }, + read(e) { + const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")); + return t ? decodeURIComponent(t[3]) : null; + }, + remove(e) { + this.write(e, "", Date.now() - 864e5); + } + } ) : ( - // Non standard browser env (web workers, react-native) lack needed support. - function() { - return { - write: function() { - }, - read: function() { - return null; - }, - remove: function() { - } - }; - }() + // Non-standard browser env (web workers, react-native) lack needed support. + { + write() { + }, + read() { + return null; + }, + remove() { + } + } ); -function Ss(e) { +function Ps(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } -function Cs(e, n) { - return n ? e.replace(/\/+$/, "") + "/" + n.replace(/^\/+/, "") : e; +function Rs(e, t) { + return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e; } -function qo(e, n) { - return e && !Ss(n) ? Cs(e, n) : n; +function Vo(e, t) { + return e && !Ps(t) ? Rs(e, t) : t; } -const Ts = Ve.isStandardBrowserEnv ? ( +const Os = Ge.hasStandardBrowserEnv ? ( // Standard browser envs have full support of the APIs needed to test // whether the request URL is of the same origin as current location. function() { - const n = /(msie|trident)/i.test(navigator.userAgent), t = document.createElement("a"); + const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a"); let r; function i(o) { let l = o; - return n && (t.setAttribute("href", l), l = t.href), t.setAttribute("href", l), { - href: t.href, - protocol: t.protocol ? t.protocol.replace(/:$/, "") : "", - host: t.host, - search: t.search ? t.search.replace(/^\?/, "") : "", - hash: t.hash ? t.hash.replace(/^#/, "") : "", - hostname: t.hostname, - port: t.port, - pathname: t.pathname.charAt(0) === "/" ? t.pathname : "/" + t.pathname + return t && (n.setAttribute("href", l), l = n.href), n.setAttribute("href", l), { + href: n.href, + protocol: n.protocol ? n.protocol.replace(/:$/, "") : "", + host: n.host, + search: n.search ? n.search.replace(/^\?/, "") : "", + hash: n.hash ? n.hash.replace(/^#/, "") : "", + hostname: n.hostname, + port: n.port, + pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname }; } return r = i(window.location.href), function(l) { - const a = A.isString(l) ? i(l) : l; + const a = P.isString(l) ? i(l) : l; return a.protocol === r.protocol && a.host === r.host; }; }() @@ -1514,195 +1513,214 @@ const Ts = Ve.isStandardBrowserEnv ? ( }; }() ); -function As(e) { - const n = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); - return n && n[1] || ""; +function Fs(e) { + const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); + return t && t[1] || ""; } -function Ps(e, n) { +function Is(e, t) { e = e || 10; - const t = new Array(e), r = new Array(e); + const n = new Array(e), r = new Array(e); let i = 0, o = 0, l; - return n = n !== void 0 ? n : 1e3, function(s) { - const u = Date.now(), c = r[o]; - l || (l = u), t[i] = s, r[i] = u; - let f = o, m = 0; - for (; f !== i; ) - m += t[f++], f = f % e; - if (i = (i + 1) % e, i === o && (o = (o + 1) % e), u - l < n) + return t = t !== void 0 ? t : 1e3, function(s) { + const c = Date.now(), f = r[o]; + l || (l = c), n[i] = s, r[i] = c; + let u = o, d = 0; + for (; u !== i; ) + d += n[u++], u = u % e; + if (i = (i + 1) % e, i === o && (o = (o + 1) % e), c - l < t) return; - const p = c && u - c; - return p ? Math.round(m * 1e3 / p) : void 0; + const p = f && c - f; + return p ? Math.round(d * 1e3 / p) : void 0; }; } -function si(e, n) { - let t = 0; - const r = Ps(50, 250); +function si(e, t) { + let n = 0; + const r = Is(50, 250); return (i) => { - const o = i.loaded, l = i.lengthComputable ? i.total : void 0, a = o - t, s = r(a), u = o <= l; - t = o; - const c = { + const o = i.loaded, l = i.lengthComputable ? i.total : void 0, a = o - n, s = r(a), c = o <= l; + n = o; + const f = { loaded: o, total: l, progress: l ? o / l : void 0, bytes: a, rate: s || void 0, - estimated: s && l && u ? (l - o) / s : void 0, + estimated: s && l && c ? (l - o) / s : void 0, event: i }; - c[n ? "download" : "upload"] = !0, e(c); + f[t ? "download" : "upload"] = !0, e(f); }; } -const Os = typeof XMLHttpRequest < "u", Rs = Os && function(e) { - return new Promise(function(t, r) { +const _s = typeof XMLHttpRequest < "u", js = _s && function(e) { + return new Promise(function(n, r) { let i = e.data; - const o = Ze.from(e.headers).normalize(), l = e.responseType; - let a; - function s() { - e.cancelToken && e.cancelToken.unsubscribe(a), e.signal && e.signal.removeEventListener("abort", a); + const o = Ze.from(e.headers).normalize(); + let { responseType: l, withXSRFToken: a } = e, s; + function c() { + e.cancelToken && e.cancelToken.unsubscribe(s), e.signal && e.signal.removeEventListener("abort", s); + } + let f; + if (P.isFormData(i)) { + if (Ge.hasStandardBrowserEnv || Ge.hasStandardBrowserWebWorkerEnv) + o.setContentType(!1); + else if ((f = o.getContentType()) !== !1) { + const [g, ...b] = f ? f.split(";").map((x) => x.trim()).filter(Boolean) : []; + o.setContentType([g || "multipart/form-data", ...b].join("; ")); + } } - A.isFormData(i) && (Ve.isStandardBrowserEnv || Ve.isStandardBrowserWebWorkerEnv ? o.setContentType(!1) : o.setContentType("multipart/form-data;", !1)); let u = new XMLHttpRequest(); if (e.auth) { - const p = e.auth.username || "", d = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : ""; - o.set("Authorization", "Basic " + btoa(p + ":" + d)); + const g = e.auth.username || "", b = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : ""; + o.set("Authorization", "Basic " + btoa(g + ":" + b)); } - const c = qo(e.baseURL, e.url); - u.open(e.method.toUpperCase(), Mo(c, e.params, e.paramsSerializer), !0), u.timeout = e.timeout; - function f() { + const d = Vo(e.baseURL, e.url); + u.open(e.method.toUpperCase(), $o(d, e.params, e.paramsSerializer), !0), u.timeout = e.timeout; + function p() { if (!u) return; - const p = Ze.from( + const g = Ze.from( "getAllResponseHeaders" in u && u.getAllResponseHeaders() - ), g = { + ), x = { data: !l || l === "text" || l === "json" ? u.responseText : u.response, status: u.status, statusText: u.statusText, - headers: p, + headers: g, config: e, request: u }; - vs(function(x) { - t(x), s(); - }, function(x) { - r(x), s(); - }, g), u = null; - } - if ("onloadend" in u ? u.onloadend = f : u.onreadystatechange = function() { - !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(f); + Ts(function(C) { + n(C), c(); + }, function(C) { + r(C), c(); + }, x), u = null; + } + if ("onloadend" in u ? u.onloadend = p : u.onreadystatechange = function() { + !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(p); }, u.onabort = function() { u && (r(new se("Request aborted", se.ECONNABORTED, e, u)), u = null); }, u.onerror = function() { r(new se("Network Error", se.ERR_NETWORK, e, u)), u = null; }, u.ontimeout = function() { - let d = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded"; - const g = e.transitional || $o; - e.timeoutErrorMessage && (d = e.timeoutErrorMessage), r(new se( - d, - g.clarifyTimeoutError ? se.ETIMEDOUT : se.ECONNABORTED, + let b = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded"; + const x = e.transitional || Bo; + e.timeoutErrorMessage && (b = e.timeoutErrorMessage), r(new se( + b, + x.clarifyTimeoutError ? se.ETIMEDOUT : se.ECONNABORTED, e, u )), u = null; - }, Ve.isStandardBrowserEnv) { - const p = (e.withCredentials || Ts(c)) && e.xsrfCookieName && Es.read(e.xsrfCookieName); - p && o.set(e.xsrfHeaderName, p); - } - i === void 0 && o.setContentType(null), "setRequestHeader" in u && A.forEach(o.toJSON(), function(d, g) { - u.setRequestHeader(g, d); - }), A.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), l && l !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", si(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", si(e.onUploadProgress)), (e.cancelToken || e.signal) && (a = (p) => { - u && (r(!p || p.type ? new qt(null, e, u) : p), u.abort(), u = null); - }, e.cancelToken && e.cancelToken.subscribe(a), e.signal && (e.signal.aborted ? a() : e.signal.addEventListener("abort", a))); - const m = As(c); - if (m && Ve.protocols.indexOf(m) === -1) { + }, Ge.hasStandardBrowserEnv && (a && P.isFunction(a) && (a = a(e)), a || a !== !1 && Os(d))) { + const g = e.xsrfHeaderName && e.xsrfCookieName && As.read(e.xsrfCookieName); + g && o.set(e.xsrfHeaderName, g); + } + i === void 0 && o.setContentType(null), "setRequestHeader" in u && P.forEach(o.toJSON(), function(b, x) { + u.setRequestHeader(x, b); + }), P.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), l && l !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", si(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", si(e.onUploadProgress)), (e.cancelToken || e.signal) && (s = (g) => { + u && (r(!g || g.type ? new qt(null, e, u) : g), u.abort(), u = null); + }, e.cancelToken && e.cancelToken.subscribe(s), e.signal && (e.signal.aborted ? s() : e.signal.addEventListener("abort", s))); + const m = Fs(d); + if (m && Ge.protocols.indexOf(m) === -1) { r(new se("Unsupported protocol " + m + ":", se.ERR_BAD_REQUEST, e)); return; } u.send(i || null); }); -}, ln = { - http: ns, - xhr: Rs +}, rr = { + http: is, + xhr: js }; -A.forEach(ln, (e, n) => { +P.forEach(rr, (e, t) => { if (e) { try { - Object.defineProperty(e, "name", { value: n }); + Object.defineProperty(e, "name", { value: t }); } catch { } - Object.defineProperty(e, "adapterName", { value: n }); + Object.defineProperty(e, "adapterName", { value: t }); } }); -const Ho = { +const ui = (e) => `- ${e}`, Ds = (e) => P.isFunction(e) || e === null || e === !1, Wo = { getAdapter: (e) => { - e = A.isArray(e) ? e : [e]; - const { length: n } = e; - let t, r; - for (let i = 0; i < n && (t = e[i], !(r = A.isString(t) ? ln[t.toLowerCase()] : t)); i++) - ; - if (!r) - throw r === !1 ? new se( - `Adapter ${t} is not supported by the environment`, + e = P.isArray(e) ? e : [e]; + const { length: t } = e; + let n, r; + const i = {}; + for (let o = 0; o < t; o++) { + n = e[o]; + let l; + if (r = n, !Ds(n) && (r = rr[(l = String(n)).toLowerCase()], r === void 0)) + throw new se(`Unknown adapter '${l}'`); + if (r) + break; + i[l || "#" + o] = r; + } + if (!r) { + const o = Object.entries(i).map( + ([a, s]) => `adapter ${a} ` + (s === !1 ? "is not supported by the environment" : "is not available in the build") + ); + let l = t ? o.length > 1 ? `since : +` + o.map(ui).join(` +`) : " " + ui(o[0]) : "as no adapter specified"; + throw new se( + "There is no suitable adapter to dispatch the request " + l, "ERR_NOT_SUPPORT" - ) : new Error( - A.hasOwnProp(ln, t) ? `Adapter '${t}' is not available in the build` : `Unknown adapter '${t}'` ); - if (!A.isFunction(r)) - throw new TypeError("adapter is not a function"); + } return r; }, - adapters: ln + adapters: rr }; -function In(e) { +function Fn(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new qt(null, e); } -function ui(e) { - return In(e), e.headers = Ze.from(e.headers), e.data = Fn.call( +function ci(e) { + return Fn(e), e.headers = Ze.from(e.headers), e.data = On.call( e, e.transformRequest - ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ho.getAdapter(e.adapter || Sr.adapter)(e).then(function(r) { - return In(e), r.data = Fn.call( + ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Wo.getAdapter(e.adapter || Sr.adapter)(e).then(function(r) { + return Fn(e), r.data = On.call( e, e.transformResponse, r ), r.headers = Ze.from(r.headers), r; }, function(r) { - return Uo(r) || (In(e), r && r.response && (r.response.data = Fn.call( + return Ho(r) || (Fn(e), r && r.response && (r.response.data = On.call( e, e.transformResponse, r.response ), r.response.headers = Ze.from(r.response.headers))), Promise.reject(r); }); } -const ci = (e) => e instanceof Ze ? e.toJSON() : e; -function wt(e, n) { - n = n || {}; - const t = {}; - function r(u, c, f) { - return A.isPlainObject(u) && A.isPlainObject(c) ? A.merge.call({ caseless: f }, u, c) : A.isPlainObject(c) ? A.merge({}, c) : A.isArray(c) ? c.slice() : c; +const fi = (e) => e instanceof Ze ? e.toJSON() : e; +function wt(e, t) { + t = t || {}; + const n = {}; + function r(c, f, u) { + return P.isPlainObject(c) && P.isPlainObject(f) ? P.merge.call({ caseless: u }, c, f) : P.isPlainObject(f) ? P.merge({}, f) : P.isArray(f) ? f.slice() : f; } - function i(u, c, f) { - if (A.isUndefined(c)) { - if (!A.isUndefined(u)) - return r(void 0, u, f); + function i(c, f, u) { + if (P.isUndefined(f)) { + if (!P.isUndefined(c)) + return r(void 0, c, u); } else - return r(u, c, f); + return r(c, f, u); } - function o(u, c) { - if (!A.isUndefined(c)) - return r(void 0, c); + function o(c, f) { + if (!P.isUndefined(f)) + return r(void 0, f); } - function l(u, c) { - if (A.isUndefined(c)) { - if (!A.isUndefined(u)) - return r(void 0, u); + function l(c, f) { + if (P.isUndefined(f)) { + if (!P.isUndefined(c)) + return r(void 0, c); } else - return r(void 0, c); + return r(void 0, f); } - function a(u, c, f) { - if (f in n) - return r(u, c); - if (f in e) - return r(void 0, u); + function a(c, f, u) { + if (u in t) + return r(c, f); + if (u in e) + return r(void 0, c); } const s = { url: o, @@ -1715,6 +1733,7 @@ function wt(e, n) { timeout: l, timeoutMessage: l, withCredentials: l, + withXSRFToken: l, adapter: l, responseType: l, xsrfCookieName: l, @@ -1732,62 +1751,62 @@ function wt(e, n) { socketPath: l, responseEncoding: l, validateStatus: a, - headers: (u, c) => i(ci(u), ci(c), !0) + headers: (c, f) => i(fi(c), fi(f), !0) }; - return A.forEach(Object.keys(Object.assign({}, e, n)), function(c) { - const f = s[c] || i, m = f(e[c], n[c], c); - A.isUndefined(m) && f !== a || (t[c] = m); - }), t; + return P.forEach(Object.keys(Object.assign({}, e, t)), function(f) { + const u = s[f] || i, d = u(e[f], t[f], f); + P.isUndefined(d) && u !== a || (n[f] = d); + }), n; } -const Vo = "1.5.0", Cr = {}; -["object", "boolean", "number", "function", "string", "symbol"].forEach((e, n) => { +const Yo = "1.6.2", Cr = {}; +["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { Cr[e] = function(r) { - return typeof r === e || "a" + (n < 1 ? "n " : " ") + e; + return typeof r === e || "a" + (t < 1 ? "n " : " ") + e; }; }); -const fi = {}; -Cr.transitional = function(n, t, r) { +const pi = {}; +Cr.transitional = function(t, n, r) { function i(o, l) { - return "[Axios v" + Vo + "] Transitional option '" + o + "'" + l + (r ? ". " + r : ""); + return "[Axios v" + Yo + "] Transitional option '" + o + "'" + l + (r ? ". " + r : ""); } return (o, l, a) => { - if (n === !1) + if (t === !1) throw new se( - i(l, " has been removed" + (t ? " in " + t : "")), + i(l, " has been removed" + (n ? " in " + n : "")), se.ERR_DEPRECATED ); - return t && !fi[l] && (fi[l] = !0, console.warn( + return n && !pi[l] && (pi[l] = !0, console.warn( i( l, - " has been deprecated since v" + t + " and will be removed in the near future" + " has been deprecated since v" + n + " and will be removed in the near future" ) - )), n ? n(o, l, a) : !0; + )), t ? t(o, l, a) : !0; }; }; -function Fs(e, n, t) { +function zs(e, t, n) { if (typeof e != "object") throw new se("options must be an object", se.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let i = r.length; for (; i-- > 0; ) { - const o = r[i], l = n[o]; + const o = r[i], l = t[o]; if (l) { const a = e[o], s = a === void 0 || l(a, o, e); if (s !== !0) throw new se("option " + o + " must be " + s, se.ERR_BAD_OPTION_VALUE); continue; } - if (t !== !0) + if (n !== !0) throw new se("Unknown option " + o, se.ERR_BAD_OPTION); } } const ir = { - assertOptions: Fs, + assertOptions: zs, validators: Cr }, nt = ir.validators; -class cn { - constructor(n) { - this.defaults = n, this.interceptors = { +class un { + constructor(t) { + this.defaults = t, this.interceptors = { request: new li(), response: new li() }; @@ -1800,85 +1819,85 @@ class cn { * * @returns {Promise} The Promise to be fulfilled */ - request(n, t) { - typeof n == "string" ? (t = t || {}, t.url = n) : t = n || {}, t = wt(this.defaults, t); - const { transitional: r, paramsSerializer: i, headers: o } = t; + request(t, n) { + typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = wt(this.defaults, n); + const { transitional: r, paramsSerializer: i, headers: o } = n; r !== void 0 && ir.assertOptions(r, { silentJSONParsing: nt.transitional(nt.boolean), forcedJSONParsing: nt.transitional(nt.boolean), clarifyTimeoutError: nt.transitional(nt.boolean) - }, !1), i != null && (A.isFunction(i) ? t.paramsSerializer = { + }, !1), i != null && (P.isFunction(i) ? n.paramsSerializer = { serialize: i } : ir.assertOptions(i, { encode: nt.function, serialize: nt.function - }, !0)), t.method = (t.method || this.defaults.method || "get").toLowerCase(); - let l = o && A.merge( + }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase(); + let l = o && P.merge( o.common, - o[t.method] + o[n.method] ); - o && A.forEach( + o && P.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], - (d) => { - delete o[d]; + (m) => { + delete o[m]; } - ), t.headers = Ze.concat(l, o); + ), n.headers = Ze.concat(l, o); const a = []; let s = !0; this.interceptors.request.forEach(function(g) { - typeof g.runWhen == "function" && g.runWhen(t) === !1 || (s = s && g.synchronous, a.unshift(g.fulfilled, g.rejected)); + typeof g.runWhen == "function" && g.runWhen(n) === !1 || (s = s && g.synchronous, a.unshift(g.fulfilled, g.rejected)); }); - const u = []; + const c = []; this.interceptors.response.forEach(function(g) { - u.push(g.fulfilled, g.rejected); + c.push(g.fulfilled, g.rejected); }); - let c, f = 0, m; + let f, u = 0, d; if (!s) { - const d = [ui.bind(this), void 0]; - for (d.unshift.apply(d, a), d.push.apply(d, u), m = d.length, c = Promise.resolve(t); f < m; ) - c = c.then(d[f++], d[f++]); - return c; - } - m = a.length; - let p = t; - for (f = 0; f < m; ) { - const d = a[f++], g = a[f++]; + const m = [ci.bind(this), void 0]; + for (m.unshift.apply(m, a), m.push.apply(m, c), d = m.length, f = Promise.resolve(n); u < d; ) + f = f.then(m[u++], m[u++]); + return f; + } + d = a.length; + let p = n; + for (u = 0; u < d; ) { + const m = a[u++], g = a[u++]; try { - p = d(p); + p = m(p); } catch (b) { g.call(this, b); break; } } try { - c = ui.call(this, p); - } catch (d) { - return Promise.reject(d); + f = ci.call(this, p); + } catch (m) { + return Promise.reject(m); } - for (f = 0, m = u.length; f < m; ) - c = c.then(u[f++], u[f++]); - return c; + for (u = 0, d = c.length; u < d; ) + f = f.then(c[u++], c[u++]); + return f; } - getUri(n) { - n = wt(this.defaults, n); - const t = qo(n.baseURL, n.url); - return Mo(t, n.params, n.paramsSerializer); + getUri(t) { + t = wt(this.defaults, t); + const n = Vo(t.baseURL, t.url); + return $o(n, t.params, t.paramsSerializer); } } -A.forEach(["delete", "get", "head", "options"], function(n) { - cn.prototype[n] = function(t, r) { +P.forEach(["delete", "get", "head", "options"], function(t) { + un.prototype[t] = function(n, r) { return this.request(wt(r || {}, { - method: n, - url: t, + method: t, + url: n, data: (r || {}).data })); }; }); -A.forEach(["post", "put", "patch"], function(n) { - function t(r) { +P.forEach(["post", "put", "patch"], function(t) { + function n(r) { return function(o, l, a) { return this.request(wt(a || {}, { - method: n, + method: t, headers: r ? { "Content-Type": "multipart/form-data" } : {}, @@ -1887,16 +1906,16 @@ A.forEach(["post", "put", "patch"], function(n) { })); }; } - cn.prototype[n] = t(), cn.prototype[n + "Form"] = t(!0); + un.prototype[t] = n(), un.prototype[t + "Form"] = n(!0); }); -const an = cn; +const ln = un; class Tr { - constructor(n) { - if (typeof n != "function") + constructor(t) { + if (typeof t != "function") throw new TypeError("executor must be a function."); - let t; + let n; this.promise = new Promise(function(o) { - t = o; + n = o; }); const r = this; this.promise.then((i) => { @@ -1914,8 +1933,8 @@ class Tr { return l.cancel = function() { r.unsubscribe(o); }, l; - }, n(function(o, l, a) { - r.reason || (r.reason = new qt(o, l, a), t(r.reason)); + }, t(function(o, l, a) { + r.reason || (r.reason = new qt(o, l, a), n(r.reason)); }); } /** @@ -1928,44 +1947,44 @@ class Tr { /** * Subscribe to the cancel signal */ - subscribe(n) { + subscribe(t) { if (this.reason) { - n(this.reason); + t(this.reason); return; } - this._listeners ? this._listeners.push(n) : this._listeners = [n]; + this._listeners ? this._listeners.push(t) : this._listeners = [t]; } /** * Unsubscribe from the cancel signal */ - unsubscribe(n) { + unsubscribe(t) { if (!this._listeners) return; - const t = this._listeners.indexOf(n); - t !== -1 && this._listeners.splice(t, 1); + const n = this._listeners.indexOf(t); + n !== -1 && this._listeners.splice(n, 1); } /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ static source() { - let n; + let t; return { token: new Tr(function(i) { - n = i; + t = i; }), - cancel: n + cancel: t }; } } -const Is = Tr; -function _s(e) { - return function(t) { - return e.apply(null, t); +const Ls = Tr; +function Ns(e) { + return function(n) { + return e.apply(null, n); }; } -function js(e) { - return A.isObject(e) && e.isAxiosError === !0; +function Ms(e) { + return P.isObject(e) && e.isAxiosError === !0; } const or = { Continue: 100, @@ -2032,39 +2051,39 @@ const or = { NotExtended: 510, NetworkAuthenticationRequired: 511 }; -Object.entries(or).forEach(([e, n]) => { - or[n] = e; +Object.entries(or).forEach(([e, t]) => { + or[t] = e; }); -const Ds = or; -function Wo(e) { - const n = new an(e), t = Ao(an.prototype.request, n); - return A.extend(t, an.prototype, n, { allOwnKeys: !0 }), A.extend(t, n, null, { allOwnKeys: !0 }), t.create = function(i) { - return Wo(wt(e, i)); - }, t; -} -const Ae = Wo(Sr); -Ae.Axios = an; +const $s = or; +function Go(e) { + const t = new ln(e), n = Po(ln.prototype.request, t); + return P.extend(n, ln.prototype, t, { allOwnKeys: !0 }), P.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(i) { + return Go(wt(e, i)); + }, n; +} +const Ae = Go(Sr); +Ae.Axios = ln; Ae.CanceledError = qt; -Ae.CancelToken = Is; -Ae.isCancel = Uo; -Ae.VERSION = Vo; -Ae.toFormData = yn; +Ae.CancelToken = Ls; +Ae.isCancel = Ho; +Ae.VERSION = Yo; +Ae.toFormData = gn; Ae.AxiosError = se; Ae.Cancel = Ae.CanceledError; -Ae.all = function(n) { - return Promise.all(n); +Ae.all = function(t) { + return Promise.all(t); }; -Ae.spread = _s; -Ae.isAxiosError = js; +Ae.spread = Ns; +Ae.isAxiosError = Ms; Ae.mergeConfig = wt; Ae.AxiosHeaders = Ze; -Ae.formToJSON = (e) => Bo(A.isHTMLForm(e) ? new FormData(e) : e); -Ae.getAdapter = Ho.getAdapter; -Ae.HttpStatusCode = Ds; +Ae.formToJSON = (e) => qo(P.isHTMLForm(e) ? new FormData(e) : e); +Ae.getAdapter = Wo.getAdapter; +Ae.HttpStatusCode = $s; Ae.default = Ae; -const kn = Ae; -kn.defaults.withCredentials = !0; -const zs = async (e, n, t, r, i) => { +const bn = Ae; +bn.defaults.withCredentials = !0; +const Bs = async (e, t, n, r, i) => { let o = { method: "POST", url: `${e}/game/create`, @@ -2072,57 +2091,54 @@ const zs = async (e, n, t, r, i) => { "Content-Type": "application/json" }, data: JSON.stringify({ - GameKey: n, - GameID: t.toLowerCase(), + GameKey: t, + GameID: n.toLowerCase(), Teams: r, TurnLength: null, - MoreOptions: { - Seed: Date.now(), - Variant: i - } + MoreOptions: i }) }; - return kn(o).catch((l) => l.response).then((l) => l.status); -}, Ls = async (e, n, t) => { + return bn(o).catch((l) => l.response).then((l) => l.status); +}, Us = async (e, t, n) => { let r = { method: "GET", - url: `${e}/game/snapshot?GameKey=${n}&GameID=${t.toLowerCase()}` + url: `${e}/game/snapshot?GameKey=${t}&GameID=${n.toLowerCase()}` }; - return kn(r).catch((i) => i.response); -}, Yo = async (e) => { - let n = { + return bn(r).catch((i) => i.response); +}, Jo = async (e) => { + let t = { method: "GET", url: `${e}/health` }; - return kn(n).catch((t) => t.response); + return bn(t).catch((n) => n.response); }; -function mg({ config: e }) { - const n = $t(); - return bt(() => { - const t = async () => { - let i = await Yo(e.host); +function xg({ config: e }) { + const t = $t(); + return pt(() => { + const n = async () => { + let i = await Jo(e.host); if (i && i.status === 200) { let o = sessionStorage.getItem("gameID"); - n(o ? `/${o}` : "/"); + t(o ? `/${o}` : "/"); } }; - t(); + n(); const r = setInterval(async () => { - t(); + n(); }, 1e4); return () => clearInterval(r); - }, [n]), /* @__PURE__ */ C.jsxs("div", { className: "flex flex-col items-center my-8 md:my-12", children: [ - /* @__PURE__ */ C.jsxs("div", { className: "w-full flex flex-col items-center mt-48", children: [ - /* @__PURE__ */ C.jsx("p", { className: "font-black text-4xl italic", children: "We'll be right back!" }), - /* @__PURE__ */ C.jsxs("p", { className: "mb-1 font-thin", children: [ - /* @__PURE__ */ C.jsx("span", { className: `text-3xl font-black font-['${e.font}'] text-${e.color} mr-1`, children: e.key }), + }, [t]), /* @__PURE__ */ T.jsxs("div", { className: "flex flex-col items-center my-8 md:my-12", children: [ + /* @__PURE__ */ T.jsxs("div", { className: "w-full flex flex-col items-center mt-48", children: [ + /* @__PURE__ */ T.jsx("p", { className: "font-black text-4xl italic", children: "We'll be right back!" }), + /* @__PURE__ */ T.jsxs("p", { className: "mb-1 font-thin", children: [ + /* @__PURE__ */ T.jsx("span", { className: `text-3xl font-black font-['${e.font}'] text-${e.color} mr-1`, children: e.key }), " is down for maintenance" ] }) ] }), - /* @__PURE__ */ C.jsx("div", { className: "absolute bottom-8 md:bottom-12", children: /* @__PURE__ */ C.jsx(hn, {}) }) + /* @__PURE__ */ T.jsx("div", { className: "absolute bottom-8 md:bottom-12", children: /* @__PURE__ */ T.jsx(pn, {}) }) ] }); } -const pi = [ +const hi = [ "able", "about", "above", @@ -3118,7 +3134,7 @@ const pi = [ "zesty", "zippy", "zonal" -], hi = [ +], di = [ "ace", "ache", "acid", @@ -5989,7 +6005,7 @@ const pi = [ "site", "shock", "sent" -], _n = { +], In = { 0: "zero", 1: "one", 2: "two", @@ -6001,171 +6017,174 @@ const pi = [ 8: "eight", 9: "nine" }; -function gg({ config: e }) { - const n = $t(), [t, r] = it(`${pi[Math.floor(Math.random() * pi.length)]}-${hi[Math.floor(Math.random() * hi.length)]}-${Math.floor(Math.random() * (99 - 0 + 1) + 0)}`), [i, o] = it(e.minTeams), [l, a] = it(e.variants.length > 0 ? e.variants[0] : null); - bt(() => { +function wg(e) { + const { config: t, options: n, setOptions: r, children: i } = e, o = $t(), [l, a] = ft(`${hi[Math.floor(Math.random() * hi.length)]}-${di[Math.floor(Math.random() * di.length)]}-${Math.floor(Math.random() * (99 - 0 + 1) + 0)}`), [s, c] = ft(t.minTeams); + pt(() => { + console.log(n); + }, [n]), pt(() => { const u = async () => { - let f = await Yo(e.host); - (!f || f.status !== 200) && n("/status/down"); + let p = await Jo(t.host); + (!p || p.status !== 200) && o("/status/down"); }; u(); - const c = setInterval(async () => { + const d = setInterval(async () => { u(); }, 1e4); - return () => clearInterval(c); - }, [n]); - async function s(u) { + return () => clearInterval(d); + }, [o]); + async function f(u) { u.preventDefault(); - let c = await zs(e.host, e.key, t, i, l); - (c === 201 || c === 400) && n(`/${t}`); + let d = await Bs(t.host, t.key, l, s, n); + (d === 201 || d === 400) && o(`/${l}`); } - return /* @__PURE__ */ C.jsx("div", { children: /* @__PURE__ */ C.jsxs("div", { className: "flex flex-col items-center m-8 md:m-12", children: [ - /* @__PURE__ */ C.jsx("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ C.jsxs("div", { className: "flex flex-col items-center fade-in", children: [ - /* @__PURE__ */ C.jsx("div", { className: ` text-5xl font-black font-['${e.font}'] text-${e.color} mb-1 cursor-pointer`, children: /* @__PURE__ */ C.jsx("a", { href: `${window.location.protocol}//${window.location.host}`, children: e.key }) }), - /* @__PURE__ */ C.jsxs("div", { className: "font-thin mb-3", children: [ + return /* @__PURE__ */ T.jsx("div", { children: /* @__PURE__ */ T.jsxs("div", { className: "flex flex-col items-center m-8 md:m-12", children: [ + /* @__PURE__ */ T.jsx("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ T.jsxs("div", { className: "flex flex-col items-center fade-in", children: [ + /* @__PURE__ */ T.jsx("div", { className: ` text-5xl font-black font-['${t.font}'] text-${t.color} mb-1 cursor-pointer`, children: /* @__PURE__ */ T.jsx("a", { href: `${window.location.protocol}//${window.location.host}`, children: t.key }) }), + /* @__PURE__ */ T.jsxs("div", { className: "font-thin mb-3", children: [ "Play ", - e.minTeams === e.maxTeams ? `${_n[e.minTeams]}` : `${_n[e.minTeams]} to ${_n[e.maxTeams]}`, + t.minTeams === t.maxTeams ? `${In[t.minTeams]}` : `${In[t.minTeams]} to ${In[t.maxTeams]}`, " player ", - e.key, + t.key, " online against friends. To create a game or join an existing one, enter a game ID and click 'Go'." ] }), - /* @__PURE__ */ C.jsxs("form", { className: "w-full flex mb-3", onSubmit: s, children: [ - /* @__PURE__ */ C.jsx("input", { className: "w-10/12 p-2 text-zinc-100 bg-zinc-800 rounded-none border border-zinc-100 text-3xl font-medium box-border focus:outline-dashed outline-blue-500 outline-2", autoFocus: !0, type: "text", value: t, onChange: (u) => r(u.target.value) }), - /* @__PURE__ */ C.jsx("button", { className: "w-2/12 font-bold grow-0 bg-blue-500", children: "Go" }) + /* @__PURE__ */ T.jsxs("form", { className: "w-full flex mb-3", onSubmit: f, children: [ + /* @__PURE__ */ T.jsx("input", { className: "w-10/12 p-2 text-zinc-100 bg-zinc-800 rounded-none border border-zinc-100 text-3xl font-medium box-border focus:outline-dashed outline-blue-500 outline-2", autoFocus: !0, type: "text", value: l, onChange: (u) => a(u.target.value) }), + /* @__PURE__ */ T.jsx("button", { className: "w-2/12 font-bold grow-0 bg-blue-500", children: "Go" }) ] }), - /* @__PURE__ */ C.jsxs("div", { className: "flex w-full justify-between flex-wrap", children: [ - /* @__PURE__ */ C.jsxs("div", { className: "flex order-2 md:order-1", children: [ - /* @__PURE__ */ C.jsx("button", { onClick: () => n("/rules"), title: "how to play", className: "mr-3 md:mr-2 p-2 first-line:p-2 bg-blue-500 italic text-xs font-bold", children: "game rules" }), - /* @__PURE__ */ C.jsxs("a", { className: "italic text-xs py-1 px-2 border-blue-500 border border-dashed text-blue-500", href: "https://quibbble.com", target: "_blank", children: [ + /* @__PURE__ */ T.jsxs("div", { className: "flex w-full justify-between flex-wrap gap-2", children: [ + /* @__PURE__ */ T.jsxs("div", { className: "flex order-2 md:order-1", children: [ + /* @__PURE__ */ T.jsx("button", { onClick: () => o("/rules"), title: "how to play", className: "mr-3 md:mr-2 p-2 first-line:p-2 bg-blue-500 italic text-xs font-bold", children: "game rules" }), + /* @__PURE__ */ T.jsxs("a", { className: "italic text-xs py-1 px-2 border-blue-500 border border-dashed text-blue-500", href: "https://quibbble.com", target: "_blank", children: [ "more ", - /* @__PURE__ */ C.jsx("span", { className: "text-zinc-100 font-['lobster'] text-sm not-italic", children: "quibbble" }), + /* @__PURE__ */ T.jsx("span", { className: "text-zinc-100 font-['lobster'] text-sm not-italic", children: "quibbble" }), " games" ] }) ] }), - /* @__PURE__ */ C.jsxs("div", { className: "flex items-center order-1 md:order-2 mb-3 md:mb-0", children: [ - l ? /* @__PURE__ */ C.jsxs(C.Fragment, { children: [ - /* @__PURE__ */ C.jsx("div", { className: "mr-1 font-black text-blue-500", children: "VARIANT" }), - /* @__PURE__ */ C.jsx("select", { className: "mr-1 bg-zinc-800 text-xs h-6 border font-bold border-zinc-100 focus:outline-none", id: "players", onChange: (u) => a(u.target.value.replace(/\s/g, "")), children: e.variants.map((u) => /* @__PURE__ */ C.jsx("option", { value: u, children: u }, u)) }) + /* @__PURE__ */ T.jsxs("div", { className: "overflow-scroll flex flex-warp items-center order-1 md:order-2 mb-3 md:mb-0", children: [ + n.Variant ? /* @__PURE__ */ T.jsxs(T.Fragment, { children: [ + /* @__PURE__ */ T.jsx("div", { className: "mr-1 font-black text-blue-500", children: "VARIANT" }), + /* @__PURE__ */ T.jsx("select", { className: "px-2 mr-1 bg-zinc-800 text-xs h-6 border font-bold border-zinc-100 focus:outline-none", id: "players", onChange: (u) => r((d) => ({ ...d, Variant: u.target.value.replace(/\s/g, "") })), children: t.variants.map((u) => /* @__PURE__ */ T.jsx("option", { value: u, children: u }, u)) }) ] }) : null, - e.minTeams !== e.maxTeams ? /* @__PURE__ */ C.jsxs(C.Fragment, { children: [ - /* @__PURE__ */ C.jsx("div", { className: "mx-1 font-black text-blue-500", children: "PLAYERS" }), - /* @__PURE__ */ C.jsx("select", { className: "bg-zinc-800 text-xs h-6 border font-bold border-zinc-100 focus:outline-none", id: "players", onChange: (u) => o(parseInt(u.target.value)), children: Array(e.maxTeams - e.minTeams + 1).fill().map((u, c) => e.minTeams + c).map((u) => /* @__PURE__ */ C.jsx("option", { value: u, children: u }, u)) }) - ] }) : null + t.minTeams !== t.maxTeams ? /* @__PURE__ */ T.jsxs(T.Fragment, { children: [ + /* @__PURE__ */ T.jsx("div", { className: "mx-1 font-black text-blue-500", children: "PLAYERS" }), + /* @__PURE__ */ T.jsx("select", { className: "px-2 bg-zinc-800 text-xs h-6 border font-bold border-zinc-100 focus:outline-none", id: "players", onChange: (u) => c(parseInt(u.target.value)), children: Array(t.maxTeams - t.minTeams + 1).fill().map((u, d) => t.minTeams + d).map((u) => /* @__PURE__ */ T.jsx("option", { value: u, children: u }, u)) }) + ] }) : null, + i ] }) ] }) ] }) }), - /* @__PURE__ */ C.jsx("div", { className: "absolute bottom-8 md:bottom-12", children: /* @__PURE__ */ C.jsx(hn, {}) }) + /* @__PURE__ */ T.jsx("div", { className: "absolute bottom-8 md:bottom-12", children: /* @__PURE__ */ T.jsx(pn, {}) }) ] }) }); } -var Go = { +var Ko = { color: void 0, size: void 0, className: void 0, style: void 0, attr: void 0 -}, di = Re.createContext && Re.createContext(Go), ot = globalThis && globalThis.__assign || function() { - return ot = Object.assign || function(e) { - for (var n, t = 1, r = arguments.length; t < r; t++) { - n = arguments[t]; - for (var i in n) - Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]); +}, mi = Oe.createContext && Oe.createContext(Ko), it = globalThis && globalThis.__assign || function() { + return it = Object.assign || function(e) { + for (var t, n = 1, r = arguments.length; n < r; n++) { + t = arguments[n]; + for (var i in t) + Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]); } return e; - }, ot.apply(this, arguments); -}, Ns = globalThis && globalThis.__rest || function(e, n) { - var t = {}; + }, it.apply(this, arguments); +}, qs = globalThis && globalThis.__rest || function(e, t) { + var n = {}; for (var r in e) - Object.prototype.hasOwnProperty.call(e, r) && n.indexOf(r) < 0 && (t[r] = e[r]); + Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]); if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) - n.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (t[r[i]] = e[r[i]]); - return t; + t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]); + return n; }; -function Jo(e) { - return e && e.map(function(n, t) { - return Re.createElement(n.tag, ot({ - key: t - }, n.attr), Jo(n.child)); +function Xo(e) { + return e && e.map(function(t, n) { + return Oe.createElement(t.tag, it({ + key: n + }, t.attr), Xo(t.child)); }); } function St(e) { - return function(n) { - return Re.createElement(Ms, ot({ - attr: ot({}, e.attr) - }, n), Jo(e.child)); + return function(t) { + return Oe.createElement(Hs, it({ + attr: it({}, e.attr) + }, t), Xo(e.child)); }; } -function Ms(e) { - var n = function(t) { - var r = e.attr, i = e.size, o = e.title, l = Ns(e, ["attr", "size", "title"]), a = i || t.size || "1em", s; - return t.className && (s = t.className), e.className && (s = (s ? s + " " : "") + e.className), Re.createElement("svg", ot({ +function Hs(e) { + var t = function(n) { + var r = e.attr, i = e.size, o = e.title, l = qs(e, ["attr", "size", "title"]), a = i || n.size || "1em", s; + return n.className && (s = n.className), e.className && (s = (s ? s + " " : "") + e.className), Oe.createElement("svg", it({ stroke: "currentColor", fill: "currentColor", strokeWidth: "0" - }, t.attr, r, l, { + }, n.attr, r, l, { className: s, - style: ot(ot({ - color: e.color || t.color - }, t.style), e.style), + style: it(it({ + color: e.color || n.color + }, n.style), e.style), height: a, width: a, xmlns: "http://www.w3.org/2000/svg" - }), o && Re.createElement("title", null, o), e.children); + }), o && Oe.createElement("title", null, o), e.children); }; - return di !== void 0 ? Re.createElement(di.Consumer, null, function(t) { - return n(t); - }) : n(Go); + return mi !== void 0 ? Oe.createElement(mi.Consumer, null, function(n) { + return t(n); + }) : t(Ko); } -function $s(e) { +function Vs(e) { return St({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z" } }] })(e); } -function Bs(e) { +function Ws(e) { return St({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 388c-72.597 0-132-59.405-132-132 0-72.601 59.403-132 132-132 36.3 0 69.299 15.4 92.406 39.601L278 234h154V80l-51.698 51.702C348.406 99.798 304.406 80 256 80c-96.797 0-176 79.203-176 176s78.094 176 176 176c81.045 0 148.287-54.134 169.401-128H378.85c-18.745 49.561-67.138 84-122.85 84z" } }] })(e); } -function Us(e) { +function Ys(e) { return St({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 440l-28.12-32.11c-22.48-25.65-43.33-45.45-72.08-58.7-26.61-12.26-60-18.65-104.27-19.84V432L48 252 259.53 72v103.21c72.88 3 127.18 27.08 161.56 71.75C449.56 284 464 335.19 464 399.26z" } }] })(e); } -function qs(e) { +function Gs(e) { return St({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M480 304.13v-32h-80V215.2c29.42-27.95 32-64.76 32-103.2V96h-32v16c0 28-1.86 48.15-9.9 63.84C368 128 324.32 112 256 112c-39.8 0-75.19 7.06-100.43 24.32-14.9 10.19-25.2 24.91-32.7 39.72C114 160.57 112 140.82 112 112V96H80v16c0 37.44 2.59 73.36 32 101.2v58.93H32v32l80-.13c0 19 3.7 53.09 10.39 69.69C96.6 396.76 80 422.31 80 464v16h32v-16c0-27.66 9.1-44.71 26.17-61.32C160 448 177 464 240 464V176h32v288c65 0 80-16 101.83-61.32C390.9 419.29 400 436.35 400 464v16h32v-16c0-41.68-16.6-67.23-42.39-90.31C396.3 357.09 400 323 400 304z" } }, { tag: "path", attr: { d: "M256 32c-48.06 0-96 0-96 84 26.12-14 59.35-20 96-20 24.09 0 46.09 2.65 65.39 8 10.75 3 24.66 8.71 30.61 12 0-84-47.94-84-96-84z" } }] })(e); } -function Hs(e) { +function Js(e) { return St({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM80,208H48V48H80Zm96-56H112a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H112a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z" } }] })(e); } -function Vs(e) { +function Ks(e) { return St({ tag: "svg", attr: { version: "1.1", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M6.879 9.934c-0.208 0-0.416-0.079-0.575-0.238-1.486-1.486-1.486-3.905 0-5.392l3-3c0.72-0.72 1.678-1.117 2.696-1.117s1.976 0.397 2.696 1.117c1.486 1.487 1.486 3.905 0 5.392l-1.371 1.371c-0.317 0.317-0.832 0.317-1.149 0s-0.317-0.832 0-1.149l1.371-1.371c0.853-0.853 0.853-2.241 0-3.094-0.413-0.413-0.963-0.641-1.547-0.641s-1.134 0.228-1.547 0.641l-3 3c-0.853 0.853-0.853 2.241 0 3.094 0.317 0.317 0.317 0.832 0 1.149-0.159 0.159-0.367 0.238-0.575 0.238z" } }, { tag: "path", attr: { d: "M4 15.813c-1.018 0-1.976-0.397-2.696-1.117-1.486-1.486-1.486-3.905 0-5.392l1.371-1.371c0.317-0.317 0.832-0.317 1.149 0s0.317 0.832 0 1.149l-1.371 1.371c-0.853 0.853-0.853 2.241 0 3.094 0.413 0.413 0.962 0.641 1.547 0.641s1.134-0.228 1.547-0.641l3-3c0.853-0.853 0.853-2.241 0-3.094-0.317-0.317-0.317-0.832 0-1.149s0.832-0.317 1.149 0c1.486 1.486 1.486 3.905 0 5.392l-3 3c-0.72 0.72-1.678 1.117-2.696 1.117z" } }] })(e); } -function Ws({ isConn: e }) { - const [n, t] = it(0); - return bt(() => { - e ? setTimeout(() => t((r) => r - 1), 1500) : t(0); - }, [e, t]), /* @__PURE__ */ C.jsxs("div", { className: `flex items-center ${e ? "cursor-pointer" : ""}`, children: [ - n ? null : /* @__PURE__ */ C.jsx("div", { className: "px-1", children: e ? "connected" : "connecting" }), - /* @__PURE__ */ C.jsx("div", { onClick: () => { - e && (t(0), setTimeout(() => t(n - 1), 1500)); - }, className: `rounded-full w-2 h-2 ${e ? "bg-green-500" : "bg-orange-500"}`, children: e ? null : /* @__PURE__ */ C.jsx("div", { className: "rounded-full w-2 h-2 bg-orange-500 animate-ping" }) }) +function Xs({ isConn: e }) { + const [t, n] = ft(0); + return pt(() => { + e ? setTimeout(() => n((r) => r - 1), 1500) : n(0); + }, [e, n]), /* @__PURE__ */ T.jsxs("div", { className: `flex items-center ${e ? "cursor-pointer" : ""}`, children: [ + t ? null : /* @__PURE__ */ T.jsx("div", { className: "px-1", children: e ? "connected" : "connecting" }), + /* @__PURE__ */ T.jsx("div", { onClick: () => { + e && (n(0), setTimeout(() => n(t - 1), 1500)); + }, className: `rounded-full w-2 h-2 ${e ? "bg-green-500" : "bg-orange-500"}`, children: e ? null : /* @__PURE__ */ T.jsx("div", { className: "rounded-full w-2 h-2 bg-orange-500 animate-ping" }) }) ] }); } -const yg = ba((e, n) => { +const vg = xa((e, t) => { const { - config: t, + config: n, ws: r, game: i, setGame: o, network: l, setNetwork: a, chat: s, - setChat: u, - connected: c, - setConnected: f, - error: m, + setChat: c, + connected: f, + setConnected: u, + error: d, setError: p, - debug: d, + debug: m, children: g } = e; - d && (i && console.log("game: ", i), l && console.log("network: ", l), s && console.log("chat: ", s), c && console.log("connected: ", c), m && console.log("error: ", m)); - const { gameID: b } = ka(), x = $t(), P = c && l && c[l.Name] ? c[l.Name] : null; - P && localStorage.setItem(b, P); - const T = Xt((q) => { + m && (i && console.log("game: ", i), l && console.log("network: ", l), s && console.log("chat: ", s), f && console.log("connected: ", f), d && console.log("error: ", d)); + const { gameID: b } = wa(), x = $t(), A = f && l && f[l.Name] ? f[l.Name] : null; + A && localStorage.setItem(b, A); + const C = Xt((q) => { r.current && r.current.send(JSON.stringify({ ActionType: "SetTeam", MoreDetails: { Team: q } })); }, [r]); Xt(() => { @@ -6177,13 +6196,13 @@ const yg = ba((e, n) => { const q = i && i.MoreData && i.MoreData.Variant ? i.MoreData.Variant : ""; r.current.send(JSON.stringify({ ActionType: "Reset", MoreDetails: { MoreOptions: { Seed: Date.now(), Variant: q } } })); }, [i, r]), E = Xt(() => { - r.current && (i && c && l && i.Actions && i.Actions.length > 0 && i.Actions[i.Actions.length - 1].Team !== c[l.Name] || r.current.send(JSON.stringify({ ActionType: "Undo" }))); - }, [r]), [w, N] = it(!1), U = async (q, oe) => { + r.current && (i && f && l && i.Actions && i.Actions.length > 0 && i.Actions[i.Actions.length - 1].Team !== f[l.Name] || r.current.send(JSON.stringify({ ActionType: "Undo" }))); + }, [r]), [w, N] = ft(!1), U = async (q, oe) => { if (q <= 0) { x("/"); return; } - let we = await Ls(t.host, t.key, b); + let we = await Us(n.host, n.key, b); if (!we) { oe && sessionStorage.setItem("gameID", b), x("/status/down"); return; @@ -6192,38 +6211,38 @@ const yg = ba((e, n) => { x("/"); return; } - r.current = new WebSocket(`${t.websocket}/game/join?GameKey=${t.key}&GameID=${b.toLowerCase()}`), r.current.onopen = () => { + r.current = new WebSocket(`${n.websocket}/game/join?GameKey=${n.key}&GameID=${b.toLowerCase()}`), r.current.onopen = () => { N(!0); let ye = localStorage.getItem(b); - ye && T(ye); + ye && C(ye); }, r.current.onclose = (ye) => { N(!1), ye.code != 1e3 && setTimeout(function() { U(q - 1, !0); }, 1e3 + (3 - q) * 500); }, r.current.onmessage = async (ye) => { let h = JSON.parse(ye.data); - h.Type === "Game" ? o(h.Payload) : h.Type === "Network" ? a(h.Payload) : h.Type === "Chat" ? u((I) => I.concat([h.Payload])) : h.Type === "Connected" ? f(h.Payload) : h.Type === "Error" && p(h.Payload); + h.Type === "Game" ? o(h.Payload) : h.Type === "Network" ? a(h.Payload) : h.Type === "Chat" ? c((I) => I.concat([h.Payload])) : h.Type === "Connected" ? u(h.Payload) : h.Type === "Error" && p(h.Payload); }, r.current.onerror = (ye) => { console.error("Socket encountered error: ", ye.message); }; }; - bt(() => (U(3, !1), (q) => { + pt(() => (U(3, !1), (q) => { var oe; return (oe = r.current) == null ? void 0 : oe.close(1e3); }), []); - const [te, v] = it(!0); - bt(() => { + const [te, v] = ft(!0); + pt(() => { const q = () => v(!te); return window.addEventListener("resize", q), (oe) => window.removeEventListener("resize", q); }); - const [_, z] = it(0); - bt(() => { + const [_, z] = ft(0); + pt(() => { _ > 0 && setTimeout(() => z(_ - 1), 1e3); }, [_]); - const [Q, Z] = it(!1), G = () => /* @__PURE__ */ C.jsx("div", { className: "z-50 absolute h-[95%] w-full flex items-center justify-center fade-in", children: /* @__PURE__ */ C.jsxs("div", { className: "bg-zinc-900 p-8 rounded-md", children: [ - /* @__PURE__ */ C.jsx("p", { className: "mb-4", children: "Are you sure you want to reset the game?" }), - /* @__PURE__ */ C.jsxs("div", { className: "flex justify-between", children: [ - /* @__PURE__ */ C.jsx( + const [Q, Z] = ft(!1), G = () => /* @__PURE__ */ T.jsx("div", { className: "z-50 absolute h-[95%] w-full flex items-center justify-center fade-in", children: /* @__PURE__ */ T.jsxs("div", { className: "bg-zinc-900 p-8 rounded-md", children: [ + /* @__PURE__ */ T.jsx("p", { className: "mb-4", children: "Are you sure you want to reset the game?" }), + /* @__PURE__ */ T.jsxs("div", { className: "flex justify-between", children: [ + /* @__PURE__ */ T.jsx( "button", { className: "px-2 py-1 bg-blue-500 text-sm font-bold", @@ -6231,7 +6250,7 @@ const yg = ba((e, n) => { children: "cancel" } ), - /* @__PURE__ */ C.jsx( + /* @__PURE__ */ T.jsx( "button", { className: "px-2 py-1 bg-red-500 text-sm font-bold", @@ -6243,83 +6262,83 @@ const yg = ba((e, n) => { ) ] }) ] }) }); - return /* @__PURE__ */ C.jsxs("div", { className: "min-h-screen flex flex-col items-center p-2 md:p-4 fade-in", children: [ - Q ? /* @__PURE__ */ C.jsx(G, {}) : null, - /* @__PURE__ */ C.jsxs("div", { ref: n, className: `h-full w-full ${t.gamePageMaxWidth ? t.gamePageMaxWidth : "max-w-xl"} flex flex-col items-center grow`, children: [ - /* @__PURE__ */ C.jsxs("div", { className: "flex justify-between items-center relative w-full mb-1 justfy-self-start font-thin text-sm", children: [ - /* @__PURE__ */ C.jsxs("div", { children: [ - /* @__PURE__ */ C.jsxs("div", { className: "flex items-center cursor-pointer", onClick: () => { + return /* @__PURE__ */ T.jsxs("div", { className: "min-h-screen flex flex-col items-center p-2 md:p-4 fade-in", children: [ + Q ? /* @__PURE__ */ T.jsx(G, {}) : null, + /* @__PURE__ */ T.jsxs("div", { ref: t, className: `h-full w-full ${n.gamePageMaxWidth ? n.gamePageMaxWidth : "max-w-xl"} flex flex-col items-center grow`, children: [ + /* @__PURE__ */ T.jsxs("div", { className: "flex justify-between items-center relative w-full mb-1 justfy-self-start font-thin text-sm", children: [ + /* @__PURE__ */ T.jsxs("div", { children: [ + /* @__PURE__ */ T.jsxs("div", { className: "flex items-center cursor-pointer", onClick: () => { z(1), navigator.clipboard.writeText(`${window.location.protocol}//${window.location.host}/${b}`); }, children: [ - /* @__PURE__ */ C.jsx(Vs, { className: "mr-1" }), - /* @__PURE__ */ C.jsx("span", { className: "underline", children: `${window.location.protocol}//${window.location.host}/${b}` }) + /* @__PURE__ */ T.jsx(Ks, { className: "mr-1" }), + /* @__PURE__ */ T.jsx("span", { className: "underline", children: `${window.location.protocol}//${window.location.host}/${b}` }) ] }), - _ > 0 ? /* @__PURE__ */ C.jsxs("div", { className: "absolute mt-2 w-6/12 flex justify-center", children: [ - /* @__PURE__ */ C.jsx("div", { className: "absolute top-[-12px] w-6 overflow-hidden inline-block", children: /* @__PURE__ */ C.jsx("div", { className: " h-4 w-4 bg-zinc-600 rotate-45 transform origin-bottom-left" }) }), - /* @__PURE__ */ C.jsx("div", { className: "font-bold text-xs text-center bg-zinc-600 px-2 py-1", children: "copied!" }) + _ > 0 ? /* @__PURE__ */ T.jsxs("div", { className: "absolute mt-2 w-6/12 flex justify-center", children: [ + /* @__PURE__ */ T.jsx("div", { className: "absolute top-[-12px] w-6 overflow-hidden inline-block", children: /* @__PURE__ */ T.jsx("div", { className: " h-4 w-4 bg-zinc-600 rotate-45 transform origin-bottom-left" }) }), + /* @__PURE__ */ T.jsx("div", { className: "font-bold text-xs text-center bg-zinc-600 px-2 py-1", children: "copied!" }) ] }) : null ] }), - /* @__PURE__ */ C.jsx("div", { className: "px-1", children: /* @__PURE__ */ C.jsx(Ws, { isConn: w }) }) + /* @__PURE__ */ T.jsx("div", { className: "px-1", children: /* @__PURE__ */ T.jsx(Xs, { isConn: w }) }) ] }), - /* @__PURE__ */ C.jsx("hr", { className: "w-full mb-2" }), - /* @__PURE__ */ C.jsxs("div", { className: "flex w-full justify-between items-center mb-4", children: [ - /* @__PURE__ */ C.jsx("div", { className: "flex", children: i && i.Teams ? i.Teams.map((q) => /* @__PURE__ */ C.jsx( + /* @__PURE__ */ T.jsx("hr", { className: "w-full mb-2" }), + /* @__PURE__ */ T.jsxs("div", { className: "flex w-full justify-between items-center mb-4", children: [ + /* @__PURE__ */ T.jsx("div", { className: "flex", children: i && i.Teams ? i.Teams.map((q) => /* @__PURE__ */ T.jsx( "div", { - className: `text-xs flex items-center justify-center font-bold cursor-pointer mr-1 w-6 h-6 rounded-full border-4 border-${q}-500 ${P === q ? `bg-${P}-500 pointer-events-none` : ""}`, - onClick: () => T(q), + className: `text-xs flex items-center justify-center font-bold cursor-pointer mr-1 w-6 h-6 rounded-full border-4 border-${q}-500 ${A === q ? `bg-${A}-500 pointer-events-none` : ""}`, + onClick: () => C(q), children: i && i.MoreData && i.MoreData.Points ? i.MoreData.Points[q] : "" }, q )) : null }), - /* @__PURE__ */ C.jsx("div", { className: `font-extrabold ${i && c && l && c[l.Name] && i.Winners.length === 0 ? `text-${i.Turn}-500` : "text-zinc-100"} ${i && l && c && c[l.Name] === i.Turn && i.Winners.length === 0 ? "animate-pulse" : ""}`, children: i && c && l && c[l.Name] ? i.Message : /* @__PURE__ */ C.jsxs("div", { className: "flex items-center animate-pulse", children: [ - /* @__PURE__ */ C.jsx($s, { className: "mr-1" }), - /* @__PURE__ */ C.jsx("div", { children: "select a team" }) + /* @__PURE__ */ T.jsx("div", { className: `font-extrabold ${i && f && l && f[l.Name] && i.Winners.length === 0 ? `text-${i.Turn}-500` : "text-zinc-100"} ${i && l && f && f[l.Name] === i.Turn && i.Winners.length === 0 ? "animate-pulse" : ""}`, children: i && f && l && f[l.Name] ? i.Message : /* @__PURE__ */ T.jsxs("div", { className: "flex items-center animate-pulse", children: [ + /* @__PURE__ */ T.jsx(Vs, { className: "mr-1" }), + /* @__PURE__ */ T.jsx("div", { children: "select a team" }) ] }) }) ] }), - /* @__PURE__ */ C.jsx("div", { className: "p-4 h-full w-full flex flex-col justify-center items-center grow", children: g }), - /* @__PURE__ */ C.jsx("hr", { className: "w-full mt-4 mb-2" }), - /* @__PURE__ */ C.jsxs("div", { className: "w-full flex justify-between items-center", children: [ - /* @__PURE__ */ C.jsx("div", { className: `leading-4 text-2xl font-black text-${t.color} cursor-pointer`, children: /* @__PURE__ */ C.jsxs("button", { onClick: () => { + /* @__PURE__ */ T.jsx("div", { className: "p-4 h-full w-full flex flex-col justify-center items-center grow", children: g }), + /* @__PURE__ */ T.jsx("hr", { className: "w-full mt-4 mb-2" }), + /* @__PURE__ */ T.jsxs("div", { className: "w-full flex justify-between items-center", children: [ + /* @__PURE__ */ T.jsx("div", { className: `leading-4 text-2xl font-black text-${n.color} cursor-pointer`, children: /* @__PURE__ */ T.jsxs("button", { onClick: () => { sessionStorage.setItem("gameID", ""), x("/"); }, children: [ - /* @__PURE__ */ C.jsx("span", { className: `font-['${t.font}']`, children: t.key }), - /* @__PURE__ */ C.jsx("span", { className: "ml-1 text-[0.5rem] md:text-xs text-zinc-100", children: i && i.MoreData && i.MoreData.Variant ? i.MoreData.Variant : "" }) + /* @__PURE__ */ T.jsx("span", { className: `font-['${n.font}']`, children: n.key }), + /* @__PURE__ */ T.jsx("span", { className: "ml-1 text-[0.5rem] md:text-xs text-zinc-100", children: i && i.MoreData && i.MoreData.Variant ? i.MoreData.Variant : "" }) ] }) }), - /* @__PURE__ */ C.jsxs("div", { className: "flex", children: [ - /* @__PURE__ */ C.jsx("button", { onClick: () => E(), title: "undo move", className: `p-2 ${i && c && l && i.Actions && i.Actions.length > 0 && i.Actions[i.Actions.length - 1].Team === c[l.Name] ? "bg-amber-500" : "bg-zinc-700 text-zinc-500 cursor-default"} mr-3 md:mr-2 rounded-full`, children: /* @__PURE__ */ C.jsx(Us, {}) }), - /* @__PURE__ */ C.jsx("button", { onClick: () => Z(!0), title: "reset game", className: `p-2 ${i && i.Winners.length > 0 ? "bg-blue-500" : "bg-zinc-500"} mr-3 md:mr-2 rounded-full`, children: /* @__PURE__ */ C.jsx(Bs, {}) }), - /* @__PURE__ */ C.jsx("button", { onClick: () => { + /* @__PURE__ */ T.jsxs("div", { className: "flex", children: [ + /* @__PURE__ */ T.jsx("button", { onClick: () => E(), title: "undo move", className: `p-2 ${i && f && l && i.Actions && i.Actions.length > 0 && i.Actions[i.Actions.length - 1].Team === f[l.Name] ? "bg-amber-500" : "bg-zinc-700 text-zinc-500 cursor-default"} mr-3 md:mr-2 rounded-full`, children: /* @__PURE__ */ T.jsx(Ys, {}) }), + /* @__PURE__ */ T.jsx("button", { onClick: () => Z(!0), title: "reset game", className: `p-2 ${i && i.Winners.length > 0 ? "bg-blue-500" : "bg-zinc-500"} mr-3 md:mr-2 rounded-full`, children: /* @__PURE__ */ T.jsx(Ws, {}) }), + /* @__PURE__ */ T.jsx("button", { onClick: () => { sessionStorage.setItem("gameID", b), x("/bugs"); - }, title: "find a bug?", className: "block md:hidden p-2 bg-zinc-500 mr-3 md:mr-2 rounded-full", children: /* @__PURE__ */ C.jsx(qs, {}) }), - /* @__PURE__ */ C.jsx("button", { onClick: () => { + }, title: "find a bug?", className: "block md:hidden p-2 bg-zinc-500 mr-3 md:mr-2 rounded-full", children: /* @__PURE__ */ T.jsx(Gs, {}) }), + /* @__PURE__ */ T.jsx("button", { onClick: () => { sessionStorage.setItem("gameID", b), x("/bugs"); }, title: "find a bug?", className: "hidden md:block mr-3 md:mr-2 p-2 bg-zinc-500 italic text-xs font-bold", children: "find a bug?" }), - /* @__PURE__ */ C.jsx("button", { onClick: () => { + /* @__PURE__ */ T.jsx("button", { onClick: () => { sessionStorage.setItem("gameID", b), x("/rules"); - }, title: "game rules", className: "block md:hidden p-2 bg-blue-500 rounded-full", children: /* @__PURE__ */ C.jsx(Hs, {}) }), - /* @__PURE__ */ C.jsx("button", { onClick: () => { + }, title: "game rules", className: "block md:hidden p-2 bg-blue-500 rounded-full", children: /* @__PURE__ */ T.jsx(Js, {}) }), + /* @__PURE__ */ T.jsx("button", { onClick: () => { sessionStorage.setItem("gameID", b), x("/rules"); }, title: "game rules", className: "hidden md:block p-2 bg-blue-500 italic text-xs font-bold", children: "game rules" }) ] }) ] }) ] }) ] }); -}), mi = ["http", "https", "mailto", "tel"]; -function Ys(e) { - const n = (e || "").trim(), t = n.charAt(0); - if (t === "#" || t === "/") - return n; - const r = n.indexOf(":"); +}), gi = ["http", "https", "mailto", "tel"]; +function Qs(e) { + const t = (e || "").trim(), n = t.charAt(0); + if (n === "#" || n === "/") + return t; + const r = t.indexOf(":"); if (r === -1) - return n; + return t; let i = -1; - for (; ++i < mi.length; ) { - const o = mi[i]; - if (r === o.length && n.slice(0, o.length).toLowerCase() === o) - return n; + for (; ++i < gi.length; ) { + const o = gi[i]; + if (r === o.length && t.slice(0, o.length).toLowerCase() === o) + return t; } - return i = n.indexOf("?"), i !== -1 && r > i || (i = n.indexOf("#"), i !== -1 && r > i) ? n : "javascript:void(0)"; + return i = t.indexOf("?"), i !== -1 && r > i || (i = t.indexOf("#"), i !== -1 && r > i) ? t : "javascript:void(0)"; } /*! * Determine if an object is a Buffer @@ -6327,20 +6346,20 @@ function Ys(e) { * @author Feross Aboukhadijeh * @license MIT */ -var Gs = function(n) { - return n != null && n.constructor != null && typeof n.constructor.isBuffer == "function" && n.constructor.isBuffer(n); +var Zs = function(t) { + return t != null && t.constructor != null && typeof t.constructor.isBuffer == "function" && t.constructor.isBuffer(t); }; -const Ko = /* @__PURE__ */ Bt(Gs); +const Qo = /* @__PURE__ */ Bt(Zs); function Dt(e) { - return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? gi(e.position) : "start" in e || "end" in e ? gi(e) : "line" in e || "column" in e ? lr(e) : ""; + return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? yi(e.position) : "start" in e || "end" in e ? yi(e) : "line" in e || "column" in e ? lr(e) : ""; } function lr(e) { - return yi(e && e.line) + ":" + yi(e && e.column); + return bi(e && e.line) + ":" + bi(e && e.column); } -function gi(e) { +function yi(e) { return lr(e && e.start) + "-" + lr(e && e.end); } -function yi(e) { +function bi(e) { return e && typeof e == "number" ? e : 1; } class Ue extends Error { @@ -6362,7 +6381,7 @@ class Ue extends Error { * Instance of `VFileMessage`. */ // To do: next major: expose `undefined` everywhere instead of `null`. - constructor(n, t, r) { + constructor(t, n, r) { const i = [null, null]; let o = { // @ts-expect-error: we always follows the structure of `position`. @@ -6370,11 +6389,11 @@ class Ue extends Error { // @ts-expect-error: " end: { line: null, column: null } }; - if (super(), typeof t == "string" && (r = t, t = void 0), typeof r == "string") { + if (super(), typeof n == "string" && (r = n, n = void 0), typeof r == "string") { const l = r.indexOf(":"); l === -1 ? i[1] = r : (i[0] = r.slice(0, l), i[1] = r.slice(l + 1)); } - t && ("type" in t || "position" in t ? t.position && (o = t.position) : "start" in t || "end" in t ? o = t : ("line" in t || "column" in t) && (o.start = t)), this.name = Dt(t) || "1:1", this.message = typeof n == "object" ? n.message : n, this.stack = "", typeof n == "object" && n.stack && (this.stack = n.stack), this.reason = this.message, this.fatal, this.line = o.start.line, this.column = o.start.column, this.position = o, this.source = i[0], this.ruleId = i[1], this.file, this.actual, this.expected, this.url, this.note; + n && ("type" in n || "position" in n ? n.position && (o = n.position) : "start" in n || "end" in n ? o = n : ("line" in n || "column" in n) && (o.start = n)), this.name = Dt(n) || "1:1", this.message = typeof t == "object" ? t.message : t, this.stack = "", typeof t == "object" && t.stack && (this.stack = t.stack), this.reason = this.message, this.fatal, this.line = o.start.line, this.column = o.start.column, this.position = o, this.source = i[0], this.ruleId = i[1], this.file, this.actual, this.expected, this.url, this.note; } } Ue.prototype.file = ""; @@ -6388,82 +6407,82 @@ Ue.prototype.line = null; Ue.prototype.source = null; Ue.prototype.ruleId = null; Ue.prototype.position = null; -const Ye = { basename: Js, dirname: Ks, extname: Xs, join: Qs, sep: "/" }; -function Js(e, n) { - if (n !== void 0 && typeof n != "string") +const We = { basename: eu, dirname: tu, extname: nu, join: ru, sep: "/" }; +function eu(e, t) { + if (t !== void 0 && typeof t != "string") throw new TypeError('"ext" argument must be a string'); Ht(e); - let t = 0, r = -1, i = e.length, o; - if (n === void 0 || n.length === 0 || n.length > e.length) { + let n = 0, r = -1, i = e.length, o; + if (t === void 0 || t.length === 0 || t.length > e.length) { for (; i--; ) if (e.charCodeAt(i) === 47) { if (o) { - t = i + 1; + n = i + 1; break; } } else r < 0 && (o = !0, r = i + 1); - return r < 0 ? "" : e.slice(t, r); + return r < 0 ? "" : e.slice(n, r); } - if (n === e) + if (t === e) return ""; - let l = -1, a = n.length - 1; + let l = -1, a = t.length - 1; for (; i--; ) if (e.charCodeAt(i) === 47) { if (o) { - t = i + 1; + n = i + 1; break; } } else - l < 0 && (o = !0, l = i + 1), a > -1 && (e.charCodeAt(i) === n.charCodeAt(a--) ? a < 0 && (r = i) : (a = -1, r = l)); - return t === r ? r = l : r < 0 && (r = e.length), e.slice(t, r); + l < 0 && (o = !0, l = i + 1), a > -1 && (e.charCodeAt(i) === t.charCodeAt(a--) ? a < 0 && (r = i) : (a = -1, r = l)); + return n === r ? r = l : r < 0 && (r = e.length), e.slice(n, r); } -function Ks(e) { +function tu(e) { if (Ht(e), e.length === 0) return "."; - let n = -1, t = e.length, r; - for (; --t; ) - if (e.charCodeAt(t) === 47) { + let t = -1, n = e.length, r; + for (; --n; ) + if (e.charCodeAt(n) === 47) { if (r) { - n = t; + t = n; break; } } else r || (r = !0); - return n < 0 ? e.charCodeAt(0) === 47 ? "/" : "." : n === 1 && e.charCodeAt(0) === 47 ? "//" : e.slice(0, n); + return t < 0 ? e.charCodeAt(0) === 47 ? "/" : "." : t === 1 && e.charCodeAt(0) === 47 ? "//" : e.slice(0, t); } -function Xs(e) { +function nu(e) { Ht(e); - let n = e.length, t = -1, r = 0, i = -1, o = 0, l; - for (; n--; ) { - const a = e.charCodeAt(n); + let t = e.length, n = -1, r = 0, i = -1, o = 0, l; + for (; t--; ) { + const a = e.charCodeAt(t); if (a === 47) { if (l) { - r = n + 1; + r = t + 1; break; } continue; } - t < 0 && (l = !0, t = n + 1), a === 46 ? i < 0 ? i = n : o !== 1 && (o = 1) : i > -1 && (o = -1); + n < 0 && (l = !0, n = t + 1), a === 46 ? i < 0 ? i = t : o !== 1 && (o = 1) : i > -1 && (o = -1); } - return i < 0 || t < 0 || // We saw a non-dot character immediately before the dot. + return i < 0 || n < 0 || // We saw a non-dot character immediately before the dot. o === 0 || // The (right-most) trimmed path component is exactly `..`. - o === 1 && i === t - 1 && i === r + 1 ? "" : e.slice(i, t); + o === 1 && i === n - 1 && i === r + 1 ? "" : e.slice(i, n); } -function Qs(...e) { - let n = -1, t; - for (; ++n < e.length; ) - Ht(e[n]), e[n] && (t = t === void 0 ? e[n] : t + "/" + e[n]); - return t === void 0 ? "." : Zs(t); +function ru(...e) { + let t = -1, n; + for (; ++t < e.length; ) + Ht(e[t]), e[t] && (n = n === void 0 ? e[t] : n + "/" + e[t]); + return n === void 0 ? "." : iu(n); } -function Zs(e) { +function iu(e) { Ht(e); - const n = e.charCodeAt(0) === 47; - let t = eu(e, !n); - return t.length === 0 && !n && (t = "."), t.length > 0 && e.charCodeAt(e.length - 1) === 47 && (t += "/"), n ? "/" + t : t; + const t = e.charCodeAt(0) === 47; + let n = ou(e, !t); + return n.length === 0 && !t && (n = "."), n.length > 0 && e.charCodeAt(e.length - 1) === 47 && (n += "/"), t ? "/" + n : n; } -function eu(e, n) { - let t = "", r = 0, i = -1, o = 0, l = -1, a, s; +function ou(e, t) { + let n = "", r = 0, i = -1, o = 0, l = -1, a, s; for (; ++l <= e.length; ) { if (l < e.length) a = e.charCodeAt(l); @@ -6475,25 +6494,25 @@ function eu(e, n) { if (a === 47) { if (!(i === l - 1 || o === 1)) if (i !== l - 1 && o === 2) { - if (t.length < 2 || r !== 2 || t.charCodeAt(t.length - 1) !== 46 || t.charCodeAt(t.length - 2) !== 46) { - if (t.length > 2) { - if (s = t.lastIndexOf("/"), s !== t.length - 1) { - s < 0 ? (t = "", r = 0) : (t = t.slice(0, s), r = t.length - 1 - t.lastIndexOf("/")), i = l, o = 0; + if (n.length < 2 || r !== 2 || n.charCodeAt(n.length - 1) !== 46 || n.charCodeAt(n.length - 2) !== 46) { + if (n.length > 2) { + if (s = n.lastIndexOf("/"), s !== n.length - 1) { + s < 0 ? (n = "", r = 0) : (n = n.slice(0, s), r = n.length - 1 - n.lastIndexOf("/")), i = l, o = 0; continue; } - } else if (t.length > 0) { - t = "", r = 0, i = l, o = 0; + } else if (n.length > 0) { + n = "", r = 0, i = l, o = 0; continue; } } - n && (t = t.length > 0 ? t + "/.." : "..", r = 2); + t && (n = n.length > 0 ? n + "/.." : "..", r = 2); } else - t.length > 0 ? t += "/" + e.slice(i + 1, l) : t = e.slice(i + 1, l), r = l - i - 1; + n.length > 0 ? n += "/" + e.slice(i + 1, l) : n = e.slice(i + 1, l), r = l - i - 1; i = l, o = 0; } else a === 46 && o > -1 ? o++ : o = -1; } - return t; + return n; } function Ht(e) { if (typeof e != "string") @@ -6501,8 +6520,8 @@ function Ht(e) { "Path must be a string. Received " + JSON.stringify(e) ); } -const tu = { cwd: nu }; -function nu() { +const lu = { cwd: au }; +function au() { return "/"; } function ar(e) { @@ -6510,33 +6529,33 @@ function ar(e) { e.href && // @ts-expect-error: indexable. e.origin; } -function ru(e) { +function su(e) { if (typeof e == "string") e = new URL(e); else if (!ar(e)) { - const n = new TypeError( + const t = new TypeError( 'The "path" argument must be of type string or an instance of URL. Received `' + e + "`" ); - throw n.code = "ERR_INVALID_ARG_TYPE", n; + throw t.code = "ERR_INVALID_ARG_TYPE", t; } if (e.protocol !== "file:") { - const n = new TypeError("The URL must be of scheme file"); - throw n.code = "ERR_INVALID_URL_SCHEME", n; + const t = new TypeError("The URL must be of scheme file"); + throw t.code = "ERR_INVALID_URL_SCHEME", t; } - return iu(e); + return uu(e); } -function iu(e) { +function uu(e) { if (e.hostname !== "") { const r = new TypeError( 'File URL host must be "localhost" or empty on darwin' ); throw r.code = "ERR_INVALID_FILE_URL_HOST", r; } - const n = e.pathname; - let t = -1; - for (; ++t < n.length; ) - if (n.charCodeAt(t) === 37 && n.charCodeAt(t + 1) === 50) { - const r = n.charCodeAt(t + 2); + const t = e.pathname; + let n = -1; + for (; ++n < t.length; ) + if (t.charCodeAt(n) === 37 && t.charCodeAt(n + 1) === 50) { + const r = t.charCodeAt(n + 2); if (r === 70 || r === 102) { const i = new TypeError( "File URL path must not include encoded / characters" @@ -6544,10 +6563,10 @@ function iu(e) { throw i.code = "ERR_INVALID_FILE_URL_PATH", i; } } - return decodeURIComponent(n); + return decodeURIComponent(t); } -const jn = ["history", "path", "basename", "stem", "extname", "dirname"]; -class Xo { +const _n = ["history", "path", "basename", "stem", "extname", "dirname"]; +class Zo { /** * Create a new virtual file. * @@ -6570,17 +6589,17 @@ class Xo { * @returns * New instance. */ - constructor(n) { - let t; - n ? typeof n == "string" || ou(n) ? t = { value: n } : ar(n) ? t = { path: n } : t = n : t = {}, this.data = {}, this.messages = [], this.history = [], this.cwd = tu.cwd(), this.value, this.stored, this.result, this.map; + constructor(t) { + let n; + t ? typeof t == "string" || cu(t) ? n = { value: t } : ar(t) ? n = { path: t } : n = t : n = {}, this.data = {}, this.messages = [], this.history = [], this.cwd = lu.cwd(), this.value, this.stored, this.result, this.map; let r = -1; - for (; ++r < jn.length; ) { - const o = jn[r]; - o in t && t[o] !== void 0 && t[o] !== null && (this[o] = o === "history" ? [...t[o]] : t[o]); + for (; ++r < _n.length; ) { + const o = _n[r]; + o in n && n[o] !== void 0 && n[o] !== null && (this[o] = o === "history" ? [...n[o]] : n[o]); } let i; - for (i in t) - jn.includes(i) || (this[i] = t[i]); + for (i in n) + _n.includes(i) || (this[i] = n[i]); } /** * Get the full path (example: `'~/index.min.js'`). @@ -6599,28 +6618,28 @@ class Xo { * * @param {string | URL} path */ - set path(n) { - ar(n) && (n = ru(n)), zn(n, "path"), this.path !== n && this.history.push(n); + set path(t) { + ar(t) && (t = su(t)), Dn(t, "path"), this.path !== t && this.history.push(t); } /** * Get the parent path (example: `'~'`). */ get dirname() { - return typeof this.path == "string" ? Ye.dirname(this.path) : void 0; + return typeof this.path == "string" ? We.dirname(this.path) : void 0; } /** * Set the parent path (example: `'~'`). * * Cannot be set if there’s no `path` yet. */ - set dirname(n) { - bi(this.basename, "dirname"), this.path = Ye.join(n || "", this.basename); + set dirname(t) { + ki(this.basename, "dirname"), this.path = We.join(t || "", this.basename); } /** * Get the basename (including extname) (example: `'index.min.js'`). */ get basename() { - return typeof this.path == "string" ? Ye.basename(this.path) : void 0; + return typeof this.path == "string" ? We.basename(this.path) : void 0; } /** * Set basename (including extname) (`'index.min.js'`). @@ -6629,14 +6648,14 @@ class Xo { * on windows). * Cannot be nullified (use `file.path = file.dirname` instead). */ - set basename(n) { - zn(n, "basename"), Dn(n, "basename"), this.path = Ye.join(this.dirname || "", n); + set basename(t) { + Dn(t, "basename"), jn(t, "basename"), this.path = We.join(this.dirname || "", t); } /** * Get the extname (including dot) (example: `'.js'`). */ get extname() { - return typeof this.path == "string" ? Ye.extname(this.path) : void 0; + return typeof this.path == "string" ? We.extname(this.path) : void 0; } /** * Set the extname (including dot) (example: `'.js'`). @@ -6645,20 +6664,20 @@ class Xo { * on windows). * Cannot be set if there’s no `path` yet. */ - set extname(n) { - if (Dn(n, "extname"), bi(this.dirname, "extname"), n) { - if (n.charCodeAt(0) !== 46) + set extname(t) { + if (jn(t, "extname"), ki(this.dirname, "extname"), t) { + if (t.charCodeAt(0) !== 46) throw new Error("`extname` must start with `.`"); - if (n.includes(".", 1)) + if (t.includes(".", 1)) throw new Error("`extname` cannot contain multiple dots"); } - this.path = Ye.join(this.dirname, this.stem + (n || "")); + this.path = We.join(this.dirname, this.stem + (t || "")); } /** * Get the stem (basename w/o extname) (example: `'index.min'`). */ get stem() { - return typeof this.path == "string" ? Ye.basename(this.path, this.extname) : void 0; + return typeof this.path == "string" ? We.basename(this.path, this.extname) : void 0; } /** * Set the stem (basename w/o extname) (example: `'index.min'`). @@ -6667,8 +6686,8 @@ class Xo { * on windows). * Cannot be nullified (use `file.path = file.dirname` instead). */ - set stem(n) { - zn(n, "stem"), Dn(n, "stem"), this.path = Ye.join(this.dirname || "", n + (this.extname || "")); + set stem(t) { + Dn(t, "stem"), jn(t, "stem"), this.path = We.join(this.dirname || "", t + (this.extname || "")); } /** * Serialize the file. @@ -6679,8 +6698,8 @@ class Xo { * @returns {string} * Serialized file. */ - toString(n) { - return (this.value || "").toString(n || void 0); + toString(t) { + return (this.value || "").toString(t || void 0); } /** * Create a warning message associated with the file. @@ -6698,8 +6717,8 @@ class Xo { * @returns {VFileMessage} * Message. */ - message(n, t, r) { - const i = new Ue(n, t, r); + message(t, n, r) { + const i = new Ue(t, n, r); return this.path && (i.name = this.path + ":" + i.name, i.file = this.path), i.fatal = !1, this.messages.push(i), i; } /** @@ -6718,8 +6737,8 @@ class Xo { * @returns {VFileMessage} * Message. */ - info(n, t, r) { - const i = this.message(n, t, r); + info(t, n, r) { + const i = this.message(t, n, r); return i.fatal = null, i; } /** @@ -6742,93 +6761,93 @@ class Xo { * @throws {VFileMessage} * Message. */ - fail(n, t, r) { - const i = this.message(n, t, r); + fail(t, n, r) { + const i = this.message(t, n, r); throw i.fatal = !0, i; } } -function Dn(e, n) { - if (e && e.includes(Ye.sep)) +function jn(e, t) { + if (e && e.includes(We.sep)) throw new Error( - "`" + n + "` cannot be a path: did not expect `" + Ye.sep + "`" + "`" + t + "` cannot be a path: did not expect `" + We.sep + "`" ); } -function zn(e, n) { +function Dn(e, t) { if (!e) - throw new Error("`" + n + "` cannot be empty"); + throw new Error("`" + t + "` cannot be empty"); } -function bi(e, n) { +function ki(e, t) { if (!e) - throw new Error("Setting `" + n + "` requires `path` to be set too"); + throw new Error("Setting `" + t + "` requires `path` to be set too"); } -function ou(e) { - return Ko(e); +function cu(e) { + return Qo(e); } -function ki(e) { +function xi(e) { if (e) throw e; } -var sn = Object.prototype.hasOwnProperty, Qo = Object.prototype.toString, xi = Object.defineProperty, wi = Object.getOwnPropertyDescriptor, vi = function(n) { - return typeof Array.isArray == "function" ? Array.isArray(n) : Qo.call(n) === "[object Array]"; -}, Ei = function(n) { - if (!n || Qo.call(n) !== "[object Object]") +var an = Object.prototype.hasOwnProperty, el = Object.prototype.toString, wi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, Ei = function(t) { + return typeof Array.isArray == "function" ? Array.isArray(t) : el.call(t) === "[object Array]"; +}, Si = function(t) { + if (!t || el.call(t) !== "[object Object]") return !1; - var t = sn.call(n, "constructor"), r = n.constructor && n.constructor.prototype && sn.call(n.constructor.prototype, "isPrototypeOf"); - if (n.constructor && !t && !r) + var n = an.call(t, "constructor"), r = t.constructor && t.constructor.prototype && an.call(t.constructor.prototype, "isPrototypeOf"); + if (t.constructor && !n && !r) return !1; var i; - for (i in n) + for (i in t) ; - return typeof i > "u" || sn.call(n, i); -}, Si = function(n, t) { - xi && t.name === "__proto__" ? xi(n, t.name, { + return typeof i > "u" || an.call(t, i); +}, Ci = function(t, n) { + wi && n.name === "__proto__" ? wi(t, n.name, { enumerable: !0, configurable: !0, - value: t.newValue, + value: n.newValue, writable: !0 - }) : n[t.name] = t.newValue; -}, Ci = function(n, t) { - if (t === "__proto__") - if (sn.call(n, t)) { - if (wi) - return wi(n, t).value; + }) : t[n.name] = n.newValue; +}, Ti = function(t, n) { + if (n === "__proto__") + if (an.call(t, n)) { + if (vi) + return vi(t, n).value; } else return; - return n[t]; -}, lu = function e() { - var n, t, r, i, o, l, a = arguments[0], s = 1, u = arguments.length, c = !1; - for (typeof a == "boolean" && (c = a, a = arguments[1] || {}, s = 2), (a == null || typeof a != "object" && typeof a != "function") && (a = {}); s < u; ++s) - if (n = arguments[s], n != null) - for (t in n) - r = Ci(a, t), i = Ci(n, t), a !== i && (c && i && (Ei(i) || (o = vi(i))) ? (o ? (o = !1, l = r && vi(r) ? r : []) : l = r && Ei(r) ? r : {}, Si(a, { name: t, newValue: e(c, l, i) })) : typeof i < "u" && Si(a, { name: t, newValue: i })); + return t[n]; +}, fu = function e() { + var t, n, r, i, o, l, a = arguments[0], s = 1, c = arguments.length, f = !1; + for (typeof a == "boolean" && (f = a, a = arguments[1] || {}, s = 2), (a == null || typeof a != "object" && typeof a != "function") && (a = {}); s < c; ++s) + if (t = arguments[s], t != null) + for (n in t) + r = Ti(a, n), i = Ti(t, n), a !== i && (f && i && (Si(i) || (o = Ei(i))) ? (o ? (o = !1, l = r && Ei(r) ? r : []) : l = r && Si(r) ? r : {}, Ci(a, { name: n, newValue: e(f, l, i) })) : typeof i < "u" && Ci(a, { name: n, newValue: i })); return a; }; -const Ti = /* @__PURE__ */ Bt(lu); +const Ai = /* @__PURE__ */ Bt(fu); function sr(e) { if (typeof e != "object" || e === null) return !1; - const n = Object.getPrototypeOf(e); - return (n === null || n === Object.prototype || Object.getPrototypeOf(n) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); + const t = Object.getPrototypeOf(e); + return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); } -function au() { - const e = [], n = { run: t, use: r }; - return n; - function t(...i) { +function pu() { + const e = [], t = { run: n, use: r }; + return t; + function n(...i) { let o = -1; const l = i.pop(); if (typeof l != "function") throw new TypeError("Expected function as last argument, not " + l); a(null, ...i); - function a(s, ...u) { - const c = e[++o]; - let f = -1; + function a(s, ...c) { + const f = e[++o]; + let u = -1; if (s) { l(s); return; } - for (; ++f < i.length; ) - (u[f] === null || u[f] === void 0) && (u[f] = i[f]); - i = u, c ? su(c, a)(...u) : l(null, ...u); + for (; ++u < i.length; ) + (c[u] === null || c[u] === void 0) && (c[u] = i[u]); + i = c, f ? hu(f, a)(...c) : l(null, ...c); } } function r(i) { @@ -6836,11 +6855,11 @@ function au() { throw new TypeError( "Expected `middelware` to be a function, not " + i ); - return e.push(i), n; + return e.push(i), t; } } -function su(e, n) { - let t; +function hu(e, t) { + let n; return r; function r(...l) { const a = e.length > l.length; @@ -6848,44 +6867,44 @@ function su(e, n) { a && l.push(i); try { s = e.apply(this, l); - } catch (u) { - const c = ( + } catch (c) { + const f = ( /** @type {Error} */ - u + c ); - if (a && t) - throw c; - return i(c); + if (a && n) + throw f; + return i(f); } a || (s instanceof Promise ? s.then(o, i) : s instanceof Error ? i(s) : o(s)); } function i(l, ...a) { - t || (t = !0, n(l, ...a)); + n || (n = !0, t(l, ...a)); } function o(l) { i(null, l); } } -const uu = el().freeze(), Zo = {}.hasOwnProperty; -function el() { - const e = au(), n = []; - let t = {}, r, i = -1; - return o.data = l, o.Parser = void 0, o.Compiler = void 0, o.freeze = a, o.attachers = n, o.use = s, o.parse = u, o.stringify = c, o.run = f, o.runSync = m, o.process = p, o.processSync = d, o; +const du = nl().freeze(), tl = {}.hasOwnProperty; +function nl() { + const e = pu(), t = []; + let n = {}, r, i = -1; + return o.data = l, o.Parser = void 0, o.Compiler = void 0, o.freeze = a, o.attachers = t, o.use = s, o.parse = c, o.stringify = f, o.run = u, o.runSync = d, o.process = p, o.processSync = m, o; function o() { - const g = el(); + const g = nl(); let b = -1; - for (; ++b < n.length; ) - g.use(...n[b]); - return g.data(Ti(!0, {}, t)), g; + for (; ++b < t.length; ) + g.use(...t[b]); + return g.data(Ai(!0, {}, n)), g; } function l(g, b) { - return typeof g == "string" ? arguments.length === 2 ? (Mn("data", r), t[g] = b, o) : Zo.call(t, g) && t[g] || null : g ? (Mn("data", r), t = g, o) : t; + return typeof g == "string" ? arguments.length === 2 ? (Nn("data", r), n[g] = b, o) : tl.call(n, g) && n[g] || null : g ? (Nn("data", r), n = g, o) : n; } function a() { if (r) return o; - for (; ++i < n.length; ) { - const [g, ...b] = n[i]; + for (; ++i < t.length; ) { + const [g, ...b] = t[i]; if (b[0] === !1) continue; b[0] === !0 && (b[0] = void 0); @@ -6896,15 +6915,15 @@ function el() { } function s(g, ...b) { let x; - if (Mn("use", r), g != null) + if (Nn("use", r), g != null) if (typeof g == "function") E(g, ...b); else if (typeof g == "object") - Array.isArray(g) ? j(g) : T(g); + Array.isArray(g) ? j(g) : C(g); else throw new TypeError("Expected usable value, not `" + g + "`"); - return x && (t.settings = Object.assign(t.settings || {}, x)), o; - function P(w) { + return x && (n.settings = Object.assign(n.settings || {}, x)), o; + function A(w) { if (typeof w == "function") E(w); else if (typeof w == "object") @@ -6912,11 +6931,11 @@ function el() { const [N, ...U] = w; E(N, ...U); } else - T(w); + C(w); else throw new TypeError("Expected usable value, not `" + w + "`"); } - function T(w) { + function C(w) { j(w.plugins), w.settings && (x = Object.assign(x || {}, w.settings)); } function j(w) { @@ -6925,183 +6944,183 @@ function el() { if (Array.isArray(w)) for (; ++N < w.length; ) { const U = w[N]; - P(U); + A(U); } else throw new TypeError("Expected a list of plugins, not `" + w + "`"); } function E(w, N) { let U = -1, te; - for (; ++U < n.length; ) - if (n[U][0] === w) { - te = n[U]; + for (; ++U < t.length; ) + if (t[U][0] === w) { + te = t[U]; break; } - te ? (sr(te[1]) && sr(N) && (N = Ti(!0, te[1], N)), te[1] = N) : n.push([...arguments]); + te ? (sr(te[1]) && sr(N) && (N = Ai(!0, te[1], N)), te[1] = N) : t.push([...arguments]); } } - function u(g) { + function c(g) { o.freeze(); const b = _t(g), x = o.Parser; - return Ln("parse", x), Ai(x, "parse") ? new x(String(b), b).parse() : x(String(b), b); + return zn("parse", x), Pi(x, "parse") ? new x(String(b), b).parse() : x(String(b), b); } - function c(g, b) { + function f(g, b) { o.freeze(); - const x = _t(b), P = o.Compiler; - return Nn("stringify", P), Pi(g), Ai(P, "compile") ? new P(g, x).compile() : P(g, x); - } - function f(g, b, x) { - if (Pi(g), o.freeze(), !x && typeof b == "function" && (x = b, b = void 0), !x) - return new Promise(P); - P(null, x); - function P(T, j) { + const x = _t(b), A = o.Compiler; + return Ln("stringify", A), Ri(g), Pi(A, "compile") ? new A(g, x).compile() : A(g, x); + } + function u(g, b, x) { + if (Ri(g), o.freeze(), !x && typeof b == "function" && (x = b, b = void 0), !x) + return new Promise(A); + A(null, x); + function A(C, j) { e.run(g, _t(b), E); function E(w, N, U) { - N = N || g, w ? j(w) : T ? T(N) : x(null, N, U); + N = N || g, w ? j(w) : C ? C(N) : x(null, N, U); } } } - function m(g, b) { - let x, P; - return o.run(g, b, T), Oi("runSync", "run", P), x; - function T(j, E) { - ki(j), x = E, P = !0; + function d(g, b) { + let x, A; + return o.run(g, b, C), Oi("runSync", "run", A), x; + function C(j, E) { + xi(j), x = E, A = !0; } } function p(g, b) { - if (o.freeze(), Ln("process", o.Parser), Nn("process", o.Compiler), !b) + if (o.freeze(), zn("process", o.Parser), Ln("process", o.Compiler), !b) return new Promise(x); x(null, b); - function x(P, T) { + function x(A, C) { const j = _t(g); o.run(o.parse(j), j, (w, N, U) => { if (w || !N || !U) E(w); else { const te = o.stringify(N, U); - te == null || (pu(te) ? U.value = te : U.result = te), E(w, U); + te == null || (yu(te) ? U.value = te : U.result = te), E(w, U); } }); function E(w, N) { - w || !N ? T(w) : P ? P(N) : b(null, N); + w || !N ? C(w) : A ? A(N) : b(null, N); } } } - function d(g) { + function m(g) { let b; - o.freeze(), Ln("processSync", o.Parser), Nn("processSync", o.Compiler); + o.freeze(), zn("processSync", o.Parser), Ln("processSync", o.Compiler); const x = _t(g); - return o.process(x, P), Oi("processSync", "process", b), x; - function P(T) { - b = !0, ki(T); + return o.process(x, A), Oi("processSync", "process", b), x; + function A(C) { + b = !0, xi(C); } } } -function Ai(e, n) { +function Pi(e, t) { return typeof e == "function" && // Prototypes do exist. // type-coverage:ignore-next-line e.prototype && // A function with keys in its prototype is probably a constructor. // Classes’ prototype methods are not enumerable, so we check if some value // exists in the prototype. // type-coverage:ignore-next-line - (cu(e.prototype) || n in e.prototype); + (mu(e.prototype) || t in e.prototype); } -function cu(e) { - let n; - for (n in e) - if (Zo.call(e, n)) +function mu(e) { + let t; + for (t in e) + if (tl.call(e, t)) return !0; return !1; } -function Ln(e, n) { - if (typeof n != "function") +function zn(e, t) { + if (typeof t != "function") throw new TypeError("Cannot `" + e + "` without `Parser`"); } -function Nn(e, n) { - if (typeof n != "function") +function Ln(e, t) { + if (typeof t != "function") throw new TypeError("Cannot `" + e + "` without `Compiler`"); } -function Mn(e, n) { - if (n) +function Nn(e, t) { + if (t) throw new Error( "Cannot call `" + e + "` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`." ); } -function Pi(e) { +function Ri(e) { if (!sr(e) || typeof e.type != "string") throw new TypeError("Expected node, got `" + e + "`"); } -function Oi(e, n, t) { - if (!t) +function Oi(e, t, n) { + if (!n) throw new Error( - "`" + e + "` finished async. Use `" + n + "` instead" + "`" + e + "` finished async. Use `" + t + "` instead" ); } function _t(e) { - return fu(e) ? e : new Xo(e); + return gu(e) ? e : new Zo(e); } -function fu(e) { +function gu(e) { return !!(e && typeof e == "object" && "message" in e && "messages" in e); } -function pu(e) { - return typeof e == "string" || Ko(e); +function yu(e) { + return typeof e == "string" || Qo(e); } -const hu = {}; -function du(e, n) { - const t = n || hu, r = typeof t.includeImageAlt == "boolean" ? t.includeImageAlt : !0, i = typeof t.includeHtml == "boolean" ? t.includeHtml : !0; - return tl(e, r, i); +const bu = {}; +function ku(e, t) { + const n = t || bu, r = typeof n.includeImageAlt == "boolean" ? n.includeImageAlt : !0, i = typeof n.includeHtml == "boolean" ? n.includeHtml : !0; + return rl(e, r, i); } -function tl(e, n, t) { - if (mu(e)) { +function rl(e, t, n) { + if (xu(e)) { if ("value" in e) - return e.type === "html" && !t ? "" : e.value; - if (n && "alt" in e && e.alt) + return e.type === "html" && !n ? "" : e.value; + if (t && "alt" in e && e.alt) return e.alt; if ("children" in e) - return Ri(e.children, n, t); + return Fi(e.children, t, n); } - return Array.isArray(e) ? Ri(e, n, t) : ""; + return Array.isArray(e) ? Fi(e, t, n) : ""; } -function Ri(e, n, t) { +function Fi(e, t, n) { const r = []; let i = -1; for (; ++i < e.length; ) - r[i] = tl(e[i], n, t); + r[i] = rl(e[i], t, n); return r.join(""); } -function mu(e) { +function xu(e) { return !!(e && typeof e == "object"); } -function Je(e, n, t, r) { +function Je(e, t, n, r) { const i = e.length; let o = 0, l; - if (n < 0 ? n = -n > i ? 0 : i + n : n = n > i ? i : n, t = t > 0 ? t : 0, r.length < 1e4) - l = Array.from(r), l.unshift(n, t), e.splice(...l); + if (t < 0 ? t = -t > i ? 0 : i + t : t = t > i ? i : t, n = n > 0 ? n : 0, r.length < 1e4) + l = Array.from(r), l.unshift(t, n), e.splice(...l); else - for (t && e.splice(n, t); o < r.length; ) - l = r.slice(o, o + 1e4), l.unshift(n, 0), e.splice(...l), o += 1e4, n += 1e4; + for (n && e.splice(t, n); o < r.length; ) + l = r.slice(o, o + 1e4), l.unshift(t, 0), e.splice(...l), o += 1e4, t += 1e4; } -function $e(e, n) { - return e.length > 0 ? (Je(e, e.length, 0, n), e) : n; +function $e(e, t) { + return e.length > 0 ? (Je(e, e.length, 0, t), e) : t; } -const Fi = {}.hasOwnProperty; -function gu(e) { - const n = {}; - let t = -1; - for (; ++t < e.length; ) - yu(n, e[t]); - return n; +const Ii = {}.hasOwnProperty; +function wu(e) { + const t = {}; + let n = -1; + for (; ++n < e.length; ) + vu(t, e[n]); + return t; } -function yu(e, n) { - let t; - for (t in n) { - const i = (Fi.call(e, t) ? e[t] : void 0) || (e[t] = {}), o = n[t]; +function vu(e, t) { + let n; + for (n in t) { + const i = (Ii.call(e, n) ? e[n] : void 0) || (e[n] = {}), o = t[n]; let l; if (o) for (l in o) { - Fi.call(i, l) || (i[l] = []); + Ii.call(i, l) || (i[l] = []); const a = o[l]; - bu( + Eu( // @ts-expect-error Looks like a list. i[l], Array.isArray(a) ? a : a ? [a] : [] @@ -7109,14 +7128,14 @@ function yu(e, n) { } } } -function bu(e, n) { - let t = -1; +function Eu(e, t) { + let n = -1; const r = []; - for (; ++t < n.length; ) - (n[t].add === "after" ? e : r).push(n[t]); + for (; ++n < t.length; ) + (t[n].add === "after" ? e : r).push(t[n]); Je(e, 0, 0, r); } -const ku = /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/, Ge = lt(/[A-Za-z]/), Le = lt(/[\dA-Za-z]/), xu = lt(/[#-'*+\--9=?A-Z^-~]/); +const Su = /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/, Ye = ot(/[A-Za-z]/), Le = ot(/[\dA-Za-z]/), Cu = ot(/[#-'*+\--9=?A-Z^-~]/); function ur(e) { return ( // Special whitespace codes (which have negative values), C0 and Control @@ -7124,7 +7143,7 @@ function ur(e) { e !== null && (e < 32 || e === 127) ); } -const cr = lt(/\d/), wu = lt(/[\dA-Fa-f]/), vu = lt(/[!-/:-@[-`{-~]/); +const cr = ot(/\d/), Tu = ot(/[\dA-Fa-f]/), Au = ot(/[!-/:-@[-`{-~]/); function J(e) { return e !== null && e < -2; } @@ -7134,41 +7153,41 @@ function Ie(e) { function pe(e) { return e === -2 || e === -1 || e === 32; } -const Eu = lt(ku), Su = lt(/\s/); -function lt(e) { - return n; - function n(t) { - return t !== null && e.test(String.fromCharCode(t)); +const Pu = ot(Su), Ru = ot(/\s/); +function ot(e) { + return t; + function t(n) { + return n !== null && e.test(String.fromCharCode(n)); } } -function xe(e, n, t, r) { +function xe(e, t, n, r) { const i = r ? r - 1 : Number.POSITIVE_INFINITY; let o = 0; return l; function l(s) { - return pe(s) ? (e.enter(t), a(s)) : n(s); + return pe(s) ? (e.enter(n), a(s)) : t(s); } function a(s) { - return pe(s) && o++ < i ? (e.consume(s), a) : (e.exit(t), n(s)); + return pe(s) && o++ < i ? (e.consume(s), a) : (e.exit(n), t(s)); } } -const Cu = { - tokenize: Tu +const Ou = { + tokenize: Fu }; -function Tu(e) { - const n = e.attempt( +function Fu(e) { + const t = e.attempt( this.parser.constructs.contentInitial, r, i ); - let t; - return n; + let n; + return t; function r(a) { if (a === null) { e.consume(a); return; } - return e.enter("lineEnding"), e.consume(a), e.exit("lineEnding"), xe(e, n, "linePrefix"); + return e.enter("lineEnding"), e.consume(a), e.exit("lineEnding"), xe(e, t, "linePrefix"); } function i(a) { return e.enter("paragraph"), o(a); @@ -7176,9 +7195,9 @@ function Tu(e) { function o(a) { const s = e.enter("chunkText", { contentType: "text", - previous: t + previous: n }); - return t && (t.next = s), t = s, l(a); + return n && (n.next = s), n = s, l(a); } function l(a) { if (a === null) { @@ -7188,100 +7207,100 @@ function Tu(e) { return J(a) ? (e.consume(a), e.exit("chunkText"), o) : (e.consume(a), l); } } -const Au = { - tokenize: Pu -}, Ii = { - tokenize: Ou +const Iu = { + tokenize: _u +}, _i = { + tokenize: ju }; -function Pu(e) { - const n = this, t = []; +function _u(e) { + const t = this, n = []; let r = 0, i, o, l; return a; - function a(T) { - if (r < t.length) { - const j = t[r]; - return n.containerState = j[1], e.attempt( + function a(C) { + if (r < n.length) { + const j = n[r]; + return t.containerState = j[1], e.attempt( j[0].continuation, s, - u - )(T); + c + )(C); } - return u(T); + return c(C); } - function s(T) { - if (r++, n.containerState._closeFlow) { - n.containerState._closeFlow = void 0, i && P(); - const j = n.events.length; + function s(C) { + if (r++, t.containerState._closeFlow) { + t.containerState._closeFlow = void 0, i && A(); + const j = t.events.length; let E = j, w; for (; E--; ) - if (n.events[E][0] === "exit" && n.events[E][1].type === "chunkFlow") { - w = n.events[E][1].end; + if (t.events[E][0] === "exit" && t.events[E][1].type === "chunkFlow") { + w = t.events[E][1].end; break; } x(r); let N = j; - for (; N < n.events.length; ) - n.events[N][1].end = Object.assign({}, w), N++; + for (; N < t.events.length; ) + t.events[N][1].end = Object.assign({}, w), N++; return Je( - n.events, + t.events, E + 1, 0, - n.events.slice(j) - ), n.events.length = N, u(T); + t.events.slice(j) + ), t.events.length = N, c(C); } - return a(T); + return a(C); } - function u(T) { - if (r === t.length) { + function c(C) { + if (r === n.length) { if (!i) - return m(T); + return d(C); if (i.currentConstruct && i.currentConstruct.concrete) - return d(T); - n.interrupt = !!(i.currentConstruct && !i._gfmTableDynamicInterruptHack); + return m(C); + t.interrupt = !!(i.currentConstruct && !i._gfmTableDynamicInterruptHack); } - return n.containerState = {}, e.check( - Ii, - c, - f - )(T); + return t.containerState = {}, e.check( + _i, + f, + u + )(C); } - function c(T) { - return i && P(), x(r), m(T); + function f(C) { + return i && A(), x(r), d(C); } - function f(T) { - return n.parser.lazy[n.now().line] = r !== t.length, l = n.now().offset, d(T); + function u(C) { + return t.parser.lazy[t.now().line] = r !== n.length, l = t.now().offset, m(C); } - function m(T) { - return n.containerState = {}, e.attempt( - Ii, + function d(C) { + return t.containerState = {}, e.attempt( + _i, p, - d - )(T); + m + )(C); } - function p(T) { - return r++, t.push([n.currentConstruct, n.containerState]), m(T); + function p(C) { + return r++, n.push([t.currentConstruct, t.containerState]), d(C); } - function d(T) { - if (T === null) { - i && P(), x(0), e.consume(T); + function m(C) { + if (C === null) { + i && A(), x(0), e.consume(C); return; } - return i = i || n.parser.flow(n.now()), e.enter("chunkFlow", { + return i = i || t.parser.flow(t.now()), e.enter("chunkFlow", { contentType: "flow", previous: o, _tokenizer: i - }), g(T); + }), g(C); } - function g(T) { - if (T === null) { - b(e.exit("chunkFlow"), !0), x(0), e.consume(T); + function g(C) { + if (C === null) { + b(e.exit("chunkFlow"), !0), x(0), e.consume(C); return; } - return J(T) ? (e.consume(T), b(e.exit("chunkFlow")), r = 0, n.interrupt = void 0, a) : (e.consume(T), g); + return J(C) ? (e.consume(C), b(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, a) : (e.consume(C), g); } - function b(T, j) { - const E = n.sliceStream(T); - if (j && E.push(null), T.previous = o, o && (o.next = T), o = T, i.defineSkip(T.start), i.write(E), n.parser.lazy[T.start.line]) { + function b(C, j) { + const E = t.sliceStream(C); + if (j && E.push(null), C.previous = o, o && (o.next = C), o = C, i.defineSkip(C.start), i.write(E), t.parser.lazy[C.start.line]) { let w = i.events.length; for (; w--; ) if ( @@ -7291,126 +7310,126 @@ function Pu(e) { i.events[w][1].end.offset > l) ) return; - const N = n.events.length; + const N = t.events.length; let U = N, te, v; for (; U--; ) - if (n.events[U][0] === "exit" && n.events[U][1].type === "chunkFlow") { + if (t.events[U][0] === "exit" && t.events[U][1].type === "chunkFlow") { if (te) { - v = n.events[U][1].end; + v = t.events[U][1].end; break; } te = !0; } - for (x(r), w = N; w < n.events.length; ) - n.events[w][1].end = Object.assign({}, v), w++; + for (x(r), w = N; w < t.events.length; ) + t.events[w][1].end = Object.assign({}, v), w++; Je( - n.events, + t.events, U + 1, 0, - n.events.slice(N) - ), n.events.length = w; + t.events.slice(N) + ), t.events.length = w; } } - function x(T) { - let j = t.length; - for (; j-- > T; ) { - const E = t[j]; - n.containerState = E[1], E[0].exit.call(n, e); + function x(C) { + let j = n.length; + for (; j-- > C; ) { + const E = n[j]; + t.containerState = E[1], E[0].exit.call(t, e); } - t.length = T; + n.length = C; } - function P() { - i.write([null]), o = void 0, i = void 0, n.containerState._closeFlow = void 0; + function A() { + i.write([null]), o = void 0, i = void 0, t.containerState._closeFlow = void 0; } } -function Ou(e, n, t) { +function ju(e, t, n) { return xe( e, - e.attempt(this.parser.constructs.document, n, t), + e.attempt(this.parser.constructs.document, t, n), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 ); } -function _i(e) { - if (e === null || Ie(e) || Su(e)) +function ji(e) { + if (e === null || Ie(e) || Ru(e)) return 1; - if (Eu(e)) + if (Pu(e)) return 2; } -function Ar(e, n, t) { +function Ar(e, t, n) { const r = []; let i = -1; for (; ++i < e.length; ) { const o = e[i].resolveAll; - o && !r.includes(o) && (n = o(n, t), r.push(o)); + o && !r.includes(o) && (t = o(t, n), r.push(o)); } - return n; + return t; } const fr = { name: "attention", - tokenize: Fu, - resolveAll: Ru + tokenize: zu, + resolveAll: Du }; -function Ru(e, n) { - let t = -1, r, i, o, l, a, s, u, c; - for (; ++t < e.length; ) - if (e[t][0] === "enter" && e[t][1].type === "attentionSequence" && e[t][1]._close) { - for (r = t; r--; ) +function Du(e, t) { + let n = -1, r, i, o, l, a, s, c, f; + for (; ++n < e.length; ) + if (e[n][0] === "enter" && e[n][1].type === "attentionSequence" && e[n][1]._close) { + for (r = n; r--; ) if (e[r][0] === "exit" && e[r][1].type === "attentionSequence" && e[r][1]._open && // If the markers are the same: - n.sliceSerialize(e[r][1]).charCodeAt(0) === n.sliceSerialize(e[t][1]).charCodeAt(0)) { - if ((e[r][1]._close || e[t][1]._open) && (e[t][1].end.offset - e[t][1].start.offset) % 3 && !((e[r][1].end.offset - e[r][1].start.offset + e[t][1].end.offset - e[t][1].start.offset) % 3)) + t.sliceSerialize(e[r][1]).charCodeAt(0) === t.sliceSerialize(e[n][1]).charCodeAt(0)) { + if ((e[r][1]._close || e[n][1]._open) && (e[n][1].end.offset - e[n][1].start.offset) % 3 && !((e[r][1].end.offset - e[r][1].start.offset + e[n][1].end.offset - e[n][1].start.offset) % 3)) continue; - s = e[r][1].end.offset - e[r][1].start.offset > 1 && e[t][1].end.offset - e[t][1].start.offset > 1 ? 2 : 1; - const f = Object.assign({}, e[r][1].end), m = Object.assign({}, e[t][1].start); - ji(f, -s), ji(m, s), l = { + s = e[r][1].end.offset - e[r][1].start.offset > 1 && e[n][1].end.offset - e[n][1].start.offset > 1 ? 2 : 1; + const u = Object.assign({}, e[r][1].end), d = Object.assign({}, e[n][1].start); + Di(u, -s), Di(d, s), l = { type: s > 1 ? "strongSequence" : "emphasisSequence", - start: f, + start: u, end: Object.assign({}, e[r][1].end) }, a = { type: s > 1 ? "strongSequence" : "emphasisSequence", - start: Object.assign({}, e[t][1].start), - end: m + start: Object.assign({}, e[n][1].start), + end: d }, o = { type: s > 1 ? "strongText" : "emphasisText", start: Object.assign({}, e[r][1].end), - end: Object.assign({}, e[t][1].start) + end: Object.assign({}, e[n][1].start) }, i = { type: s > 1 ? "strong" : "emphasis", start: Object.assign({}, l.start), end: Object.assign({}, a.end) - }, e[r][1].end = Object.assign({}, l.start), e[t][1].start = Object.assign({}, a.end), u = [], e[r][1].end.offset - e[r][1].start.offset && (u = $e(u, [ - ["enter", e[r][1], n], - ["exit", e[r][1], n] - ])), u = $e(u, [ - ["enter", i, n], - ["enter", l, n], - ["exit", l, n], - ["enter", o, n] - ]), u = $e( - u, + }, e[r][1].end = Object.assign({}, l.start), e[n][1].start = Object.assign({}, a.end), c = [], e[r][1].end.offset - e[r][1].start.offset && (c = $e(c, [ + ["enter", e[r][1], t], + ["exit", e[r][1], t] + ])), c = $e(c, [ + ["enter", i, t], + ["enter", l, t], + ["exit", l, t], + ["enter", o, t] + ]), c = $e( + c, Ar( - n.parser.constructs.insideSpan.null, - e.slice(r + 1, t), - n + t.parser.constructs.insideSpan.null, + e.slice(r + 1, n), + t ) - ), u = $e(u, [ - ["exit", o, n], - ["enter", a, n], - ["exit", a, n], - ["exit", i, n] - ]), e[t][1].end.offset - e[t][1].start.offset ? (c = 2, u = $e(u, [ - ["enter", e[t][1], n], - ["exit", e[t][1], n] - ])) : c = 0, Je(e, r - 1, t - r + 3, u), t = r + u.length - c - 2; + ), c = $e(c, [ + ["exit", o, t], + ["enter", a, t], + ["exit", a, t], + ["exit", i, t] + ]), e[n][1].end.offset - e[n][1].start.offset ? (f = 2, c = $e(c, [ + ["enter", e[n][1], t], + ["exit", e[n][1], t] + ])) : f = 0, Je(e, r - 1, n - r + 3, c), n = r + c.length - f - 2; break; } } - for (t = -1; ++t < e.length; ) - e[t][1].type === "attentionSequence" && (e[t][1].type = "data"); + for (n = -1; ++n < e.length; ) + e[n][1].type === "attentionSequence" && (e[n][1].type = "data"); return e; } -function Fu(e, n) { - const t = this.parser.constructs.attentionMarkers.null, r = this.previous, i = _i(r); +function zu(e, t) { + const n = this.parser.constructs.attentionMarkers.null, r = this.previous, i = ji(r); let o; return l; function l(s) { @@ -7419,74 +7438,74 @@ function Fu(e, n) { function a(s) { if (s === o) return e.consume(s), a; - const u = e.exit("attentionSequence"), c = _i(s), f = !c || c === 2 && i || t.includes(s), m = !i || i === 2 && c || t.includes(r); - return u._open = !!(o === 42 ? f : f && (i || !m)), u._close = !!(o === 42 ? m : m && (c || !f)), n(s); + const c = e.exit("attentionSequence"), f = ji(s), u = !f || f === 2 && i || n.includes(s), d = !i || i === 2 && f || n.includes(r); + return c._open = !!(o === 42 ? u : u && (i || !d)), c._close = !!(o === 42 ? d : d && (f || !u)), t(s); } } -function ji(e, n) { - e.column += n, e.offset += n, e._bufferIndex += n; +function Di(e, t) { + e.column += t, e.offset += t, e._bufferIndex += t; } -const Iu = { +const Lu = { name: "autolink", - tokenize: _u + tokenize: Nu }; -function _u(e, n, t) { +function Nu(e, t, n) { let r = 0; return i; function i(p) { return e.enter("autolink"), e.enter("autolinkMarker"), e.consume(p), e.exit("autolinkMarker"), e.enter("autolinkProtocol"), o; } function o(p) { - return Ge(p) ? (e.consume(p), l) : u(p); + return Ye(p) ? (e.consume(p), l) : c(p); } function l(p) { - return p === 43 || p === 45 || p === 46 || Le(p) ? (r = 1, a(p)) : u(p); + return p === 43 || p === 45 || p === 46 || Le(p) ? (r = 1, a(p)) : c(p); } function a(p) { - return p === 58 ? (e.consume(p), r = 0, s) : (p === 43 || p === 45 || p === 46 || Le(p)) && r++ < 32 ? (e.consume(p), a) : (r = 0, u(p)); + return p === 58 ? (e.consume(p), r = 0, s) : (p === 43 || p === 45 || p === 46 || Le(p)) && r++ < 32 ? (e.consume(p), a) : (r = 0, c(p)); } function s(p) { - return p === 62 ? (e.exit("autolinkProtocol"), e.enter("autolinkMarker"), e.consume(p), e.exit("autolinkMarker"), e.exit("autolink"), n) : p === null || p === 32 || p === 60 || ur(p) ? t(p) : (e.consume(p), s); - } - function u(p) { - return p === 64 ? (e.consume(p), c) : xu(p) ? (e.consume(p), u) : t(p); + return p === 62 ? (e.exit("autolinkProtocol"), e.enter("autolinkMarker"), e.consume(p), e.exit("autolinkMarker"), e.exit("autolink"), t) : p === null || p === 32 || p === 60 || ur(p) ? n(p) : (e.consume(p), s); } function c(p) { - return Le(p) ? f(p) : t(p); + return p === 64 ? (e.consume(p), f) : Cu(p) ? (e.consume(p), c) : n(p); } function f(p) { - return p === 46 ? (e.consume(p), r = 0, c) : p === 62 ? (e.exit("autolinkProtocol").type = "autolinkEmail", e.enter("autolinkMarker"), e.consume(p), e.exit("autolinkMarker"), e.exit("autolink"), n) : m(p); + return Le(p) ? u(p) : n(p); + } + function u(p) { + return p === 46 ? (e.consume(p), r = 0, f) : p === 62 ? (e.exit("autolinkProtocol").type = "autolinkEmail", e.enter("autolinkMarker"), e.consume(p), e.exit("autolinkMarker"), e.exit("autolink"), t) : d(p); } - function m(p) { + function d(p) { if ((p === 45 || Le(p)) && r++ < 63) { - const d = p === 45 ? m : f; - return e.consume(p), d; + const m = p === 45 ? d : u; + return e.consume(p), m; } - return t(p); + return n(p); } } -const xn = { - tokenize: ju, +const kn = { + tokenize: Mu, partial: !0 }; -function ju(e, n, t) { +function Mu(e, t, n) { return r; function r(o) { return pe(o) ? xe(e, i, "linePrefix")(o) : i(o); } function i(o) { - return o === null || J(o) ? n(o) : t(o); + return o === null || J(o) ? t(o) : n(o); } } -const nl = { +const il = { name: "blockQuote", - tokenize: Du, + tokenize: $u, continuation: { - tokenize: zu + tokenize: Bu }, - exit: Lu + exit: Uu }; -function Du(e, n, t) { +function $u(e, t, n) { const r = this; return i; function i(l) { @@ -7496,13 +7515,13 @@ function Du(e, n, t) { _container: !0 }), a.open = !0), e.enter("blockQuotePrefix"), e.enter("blockQuoteMarker"), e.consume(l), e.exit("blockQuoteMarker"), o; } - return t(l); + return n(l); } function o(l) { - return pe(l) ? (e.enter("blockQuotePrefixWhitespace"), e.consume(l), e.exit("blockQuotePrefixWhitespace"), e.exit("blockQuotePrefix"), n) : (e.exit("blockQuotePrefix"), n(l)); + return pe(l) ? (e.enter("blockQuotePrefixWhitespace"), e.consume(l), e.exit("blockQuotePrefixWhitespace"), e.exit("blockQuotePrefix"), t) : (e.exit("blockQuotePrefix"), t(l)); } } -function zu(e, n, t) { +function Bu(e, t, n) { const r = this; return i; function i(l) { @@ -7514,66 +7533,66 @@ function zu(e, n, t) { )(l) : o(l); } function o(l) { - return e.attempt(nl, n, t)(l); + return e.attempt(il, t, n)(l); } } -function Lu(e) { +function Uu(e) { e.exit("blockQuote"); } -const rl = { +const ol = { name: "characterEscape", - tokenize: Nu + tokenize: qu }; -function Nu(e, n, t) { +function qu(e, t, n) { return r; function r(o) { return e.enter("characterEscape"), e.enter("escapeMarker"), e.consume(o), e.exit("escapeMarker"), i; } function i(o) { - return vu(o) ? (e.enter("characterEscapeValue"), e.consume(o), e.exit("characterEscapeValue"), e.exit("characterEscape"), n) : t(o); + return Au(o) ? (e.enter("characterEscapeValue"), e.consume(o), e.exit("characterEscapeValue"), e.exit("characterEscape"), t) : n(o); } } -const Di = document.createElement("i"); +const zi = document.createElement("i"); function Pr(e) { - const n = "&" + e + ";"; - Di.innerHTML = n; - const t = Di.textContent; - return t.charCodeAt(t.length - 1) === 59 && e !== "semi" || t === n ? !1 : t; + const t = "&" + e + ";"; + zi.innerHTML = t; + const n = zi.textContent; + return n.charCodeAt(n.length - 1) === 59 && e !== "semi" || n === t ? !1 : n; } -const il = { +const ll = { name: "characterReference", - tokenize: Mu + tokenize: Hu }; -function Mu(e, n, t) { +function Hu(e, t, n) { const r = this; let i = 0, o, l; return a; - function a(f) { - return e.enter("characterReference"), e.enter("characterReferenceMarker"), e.consume(f), e.exit("characterReferenceMarker"), s; + function a(u) { + return e.enter("characterReference"), e.enter("characterReferenceMarker"), e.consume(u), e.exit("characterReferenceMarker"), s; } - function s(f) { - return f === 35 ? (e.enter("characterReferenceMarkerNumeric"), e.consume(f), e.exit("characterReferenceMarkerNumeric"), u) : (e.enter("characterReferenceValue"), o = 31, l = Le, c(f)); + function s(u) { + return u === 35 ? (e.enter("characterReferenceMarkerNumeric"), e.consume(u), e.exit("characterReferenceMarkerNumeric"), c) : (e.enter("characterReferenceValue"), o = 31, l = Le, f(u)); } - function u(f) { - return f === 88 || f === 120 ? (e.enter("characterReferenceMarkerHexadecimal"), e.consume(f), e.exit("characterReferenceMarkerHexadecimal"), e.enter("characterReferenceValue"), o = 6, l = wu, c) : (e.enter("characterReferenceValue"), o = 7, l = cr, c(f)); + function c(u) { + return u === 88 || u === 120 ? (e.enter("characterReferenceMarkerHexadecimal"), e.consume(u), e.exit("characterReferenceMarkerHexadecimal"), e.enter("characterReferenceValue"), o = 6, l = Tu, f) : (e.enter("characterReferenceValue"), o = 7, l = cr, f(u)); } - function c(f) { - if (f === 59 && i) { - const m = e.exit("characterReferenceValue"); - return l === Le && !Pr(r.sliceSerialize(m)) ? t(f) : (e.enter("characterReferenceMarker"), e.consume(f), e.exit("characterReferenceMarker"), e.exit("characterReference"), n); + function f(u) { + if (u === 59 && i) { + const d = e.exit("characterReferenceValue"); + return l === Le && !Pr(r.sliceSerialize(d)) ? n(u) : (e.enter("characterReferenceMarker"), e.consume(u), e.exit("characterReferenceMarker"), e.exit("characterReference"), t); } - return l(f) && i++ < o ? (e.consume(f), c) : t(f); + return l(u) && i++ < o ? (e.consume(u), f) : n(u); } } -const zi = { - tokenize: Bu, +const Li = { + tokenize: Wu, partial: !0 -}, Li = { +}, Ni = { name: "codeFenced", - tokenize: $u, + tokenize: Vu, concrete: !0 }; -function $u(e, n, t) { +function Vu(e, t, n) { const r = this, i = { tokenize: E, partial: !0 @@ -7581,30 +7600,30 @@ function $u(e, n, t) { let o = 0, l = 0, a; return s; function s(w) { - return u(w); - } - function u(w) { - const N = r.events[r.events.length - 1]; - return o = N && N[1].type === "linePrefix" ? N[2].sliceSerialize(N[1], !0).length : 0, a = w, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), c(w); + return c(w); } function c(w) { - return w === a ? (l++, e.consume(w), c) : l < 3 ? t(w) : (e.exit("codeFencedFenceSequence"), pe(w) ? xe(e, f, "whitespace")(w) : f(w)); + const N = r.events[r.events.length - 1]; + return o = N && N[1].type === "linePrefix" ? N[2].sliceSerialize(N[1], !0).length : 0, a = w, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), f(w); } function f(w) { - return w === null || J(w) ? (e.exit("codeFencedFence"), r.interrupt ? n(w) : e.check(zi, g, j)(w)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", { + return w === a ? (l++, e.consume(w), f) : l < 3 ? n(w) : (e.exit("codeFencedFenceSequence"), pe(w) ? xe(e, u, "whitespace")(w) : u(w)); + } + function u(w) { + return w === null || J(w) ? (e.exit("codeFencedFence"), r.interrupt ? t(w) : e.check(Li, g, j)(w)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", { contentType: "string" - }), m(w)); + }), d(w)); } - function m(w) { - return w === null || J(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), f(w)) : pe(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), xe(e, p, "whitespace")(w)) : w === 96 && w === a ? t(w) : (e.consume(w), m); + function d(w) { + return w === null || J(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), u(w)) : pe(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), xe(e, p, "whitespace")(w)) : w === 96 && w === a ? n(w) : (e.consume(w), d); } function p(w) { - return w === null || J(w) ? f(w) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", { + return w === null || J(w) ? u(w) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", { contentType: "string" - }), d(w)); + }), m(w)); } - function d(w) { - return w === null || J(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), f(w)) : w === 96 && w === a ? t(w) : (e.consume(w), d); + function m(w) { + return w === null || J(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), u(w)) : w === 96 && w === a ? n(w) : (e.consume(w), m); } function g(w) { return e.attempt(i, j, b)(w); @@ -7615,19 +7634,19 @@ function $u(e, n, t) { function x(w) { return o > 0 && pe(w) ? xe( e, - P, + A, "linePrefix", o + 1 - )(w) : P(w); + )(w) : A(w); } - function P(w) { - return w === null || J(w) ? e.check(zi, g, j)(w) : (e.enter("codeFlowValue"), T(w)); + function A(w) { + return w === null || J(w) ? e.check(Li, g, j)(w) : (e.enter("codeFlowValue"), C(w)); } - function T(w) { - return w === null || J(w) ? (e.exit("codeFlowValue"), P(w)) : (e.consume(w), T); + function C(w) { + return w === null || J(w) ? (e.exit("codeFlowValue"), A(w)) : (e.consume(w), C); } function j(w) { - return e.exit("codeFenced"), n(w); + return e.exit("codeFenced"), t(w); } function E(w, N, U) { let te = 0; @@ -7654,172 +7673,172 @@ function $u(e, n, t) { } } } -function Bu(e, n, t) { +function Wu(e, t, n) { const r = this; return i; function i(l) { - return l === null ? t(l) : (e.enter("lineEnding"), e.consume(l), e.exit("lineEnding"), o); + return l === null ? n(l) : (e.enter("lineEnding"), e.consume(l), e.exit("lineEnding"), o); } function o(l) { - return r.parser.lazy[r.now().line] ? t(l) : n(l); + return r.parser.lazy[r.now().line] ? n(l) : t(l); } } -const $n = { +const Mn = { name: "codeIndented", - tokenize: qu -}, Uu = { - tokenize: Hu, + tokenize: Gu +}, Yu = { + tokenize: Ju, partial: !0 }; -function qu(e, n, t) { +function Gu(e, t, n) { const r = this; return i; - function i(u) { - return e.enter("codeIndented"), xe(e, o, "linePrefix", 4 + 1)(u); + function i(c) { + return e.enter("codeIndented"), xe(e, o, "linePrefix", 4 + 1)(c); } - function o(u) { - const c = r.events[r.events.length - 1]; - return c && c[1].type === "linePrefix" && c[2].sliceSerialize(c[1], !0).length >= 4 ? l(u) : t(u); + function o(c) { + const f = r.events[r.events.length - 1]; + return f && f[1].type === "linePrefix" && f[2].sliceSerialize(f[1], !0).length >= 4 ? l(c) : n(c); } - function l(u) { - return u === null ? s(u) : J(u) ? e.attempt(Uu, l, s)(u) : (e.enter("codeFlowValue"), a(u)); + function l(c) { + return c === null ? s(c) : J(c) ? e.attempt(Yu, l, s)(c) : (e.enter("codeFlowValue"), a(c)); } - function a(u) { - return u === null || J(u) ? (e.exit("codeFlowValue"), l(u)) : (e.consume(u), a); + function a(c) { + return c === null || J(c) ? (e.exit("codeFlowValue"), l(c)) : (e.consume(c), a); } - function s(u) { - return e.exit("codeIndented"), n(u); + function s(c) { + return e.exit("codeIndented"), t(c); } } -function Hu(e, n, t) { +function Ju(e, t, n) { const r = this; return i; function i(l) { - return r.parser.lazy[r.now().line] ? t(l) : J(l) ? (e.enter("lineEnding"), e.consume(l), e.exit("lineEnding"), i) : xe(e, o, "linePrefix", 4 + 1)(l); + return r.parser.lazy[r.now().line] ? n(l) : J(l) ? (e.enter("lineEnding"), e.consume(l), e.exit("lineEnding"), i) : xe(e, o, "linePrefix", 4 + 1)(l); } function o(l) { const a = r.events[r.events.length - 1]; - return a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? n(l) : J(l) ? i(l) : t(l); + return a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? t(l) : J(l) ? i(l) : n(l); } } -const Vu = { +const Ku = { name: "codeText", - tokenize: Gu, - resolve: Wu, - previous: Yu + tokenize: Zu, + resolve: Xu, + previous: Qu }; -function Wu(e) { - let n = e.length - 4, t = 3, r, i; - if ((e[t][1].type === "lineEnding" || e[t][1].type === "space") && (e[n][1].type === "lineEnding" || e[n][1].type === "space")) { - for (r = t; ++r < n; ) +function Xu(e) { + let t = e.length - 4, n = 3, r, i; + if ((e[n][1].type === "lineEnding" || e[n][1].type === "space") && (e[t][1].type === "lineEnding" || e[t][1].type === "space")) { + for (r = n; ++r < t; ) if (e[r][1].type === "codeTextData") { - e[t][1].type = "codeTextPadding", e[n][1].type = "codeTextPadding", t += 2, n -= 2; + e[n][1].type = "codeTextPadding", e[t][1].type = "codeTextPadding", n += 2, t -= 2; break; } } - for (r = t - 1, n++; ++r <= n; ) - i === void 0 ? r !== n && e[r][1].type !== "lineEnding" && (i = r) : (r === n || e[r][1].type === "lineEnding") && (e[i][1].type = "codeTextData", r !== i + 2 && (e[i][1].end = e[r - 1][1].end, e.splice(i + 2, r - i - 2), n -= r - i - 2, r = i + 2), i = void 0); + for (r = n - 1, t++; ++r <= t; ) + i === void 0 ? r !== t && e[r][1].type !== "lineEnding" && (i = r) : (r === t || e[r][1].type === "lineEnding") && (e[i][1].type = "codeTextData", r !== i + 2 && (e[i][1].end = e[r - 1][1].end, e.splice(i + 2, r - i - 2), t -= r - i - 2, r = i + 2), i = void 0); return e; } -function Yu(e) { +function Qu(e) { return e !== 96 || this.events[this.events.length - 1][1].type === "characterEscape"; } -function Gu(e, n, t) { +function Zu(e, t, n) { let r = 0, i, o; return l; - function l(f) { - return e.enter("codeText"), e.enter("codeTextSequence"), a(f); + function l(u) { + return e.enter("codeText"), e.enter("codeTextSequence"), a(u); } - function a(f) { - return f === 96 ? (e.consume(f), r++, a) : (e.exit("codeTextSequence"), s(f)); + function a(u) { + return u === 96 ? (e.consume(u), r++, a) : (e.exit("codeTextSequence"), s(u)); } - function s(f) { - return f === null ? t(f) : f === 32 ? (e.enter("space"), e.consume(f), e.exit("space"), s) : f === 96 ? (o = e.enter("codeTextSequence"), i = 0, c(f)) : J(f) ? (e.enter("lineEnding"), e.consume(f), e.exit("lineEnding"), s) : (e.enter("codeTextData"), u(f)); + function s(u) { + return u === null ? n(u) : u === 32 ? (e.enter("space"), e.consume(u), e.exit("space"), s) : u === 96 ? (o = e.enter("codeTextSequence"), i = 0, f(u)) : J(u) ? (e.enter("lineEnding"), e.consume(u), e.exit("lineEnding"), s) : (e.enter("codeTextData"), c(u)); } - function u(f) { - return f === null || f === 32 || f === 96 || J(f) ? (e.exit("codeTextData"), s(f)) : (e.consume(f), u); + function c(u) { + return u === null || u === 32 || u === 96 || J(u) ? (e.exit("codeTextData"), s(u)) : (e.consume(u), c); } - function c(f) { - return f === 96 ? (e.consume(f), i++, c) : i === r ? (e.exit("codeTextSequence"), e.exit("codeText"), n(f)) : (o.type = "codeTextData", u(f)); + function f(u) { + return u === 96 ? (e.consume(u), i++, f) : i === r ? (e.exit("codeTextSequence"), e.exit("codeText"), t(u)) : (o.type = "codeTextData", c(u)); } } -function ol(e) { - const n = {}; - let t = -1, r, i, o, l, a, s, u; - for (; ++t < e.length; ) { - for (; t in n; ) - t = n[t]; - if (r = e[t], t && r[1].type === "chunkFlow" && e[t - 1][1].type === "listItemPrefix" && (s = r[1]._tokenizer.events, o = 0, o < s.length && s[o][1].type === "lineEndingBlank" && (o += 2), o < s.length && s[o][1].type === "content")) +function al(e) { + const t = {}; + let n = -1, r, i, o, l, a, s, c; + for (; ++n < e.length; ) { + for (; n in t; ) + n = t[n]; + if (r = e[n], n && r[1].type === "chunkFlow" && e[n - 1][1].type === "listItemPrefix" && (s = r[1]._tokenizer.events, o = 0, o < s.length && s[o][1].type === "lineEndingBlank" && (o += 2), o < s.length && s[o][1].type === "content")) for (; ++o < s.length && s[o][1].type !== "content"; ) s[o][1].type === "chunkText" && (s[o][1]._isInFirstContentOfListItem = !0, o++); if (r[0] === "enter") - r[1].contentType && (Object.assign(n, Ju(e, t)), t = n[t], u = !0); + r[1].contentType && (Object.assign(t, ec(e, n)), n = t[n], c = !0); else if (r[1]._container) { - for (o = t, i = void 0; o-- && (l = e[o], l[1].type === "lineEnding" || l[1].type === "lineEndingBlank"); ) + for (o = n, i = void 0; o-- && (l = e[o], l[1].type === "lineEnding" || l[1].type === "lineEndingBlank"); ) l[0] === "enter" && (i && (e[i][1].type = "lineEndingBlank"), l[1].type = "lineEnding", i = o); - i && (r[1].end = Object.assign({}, e[i][1].start), a = e.slice(i, t), a.unshift(r), Je(e, i, t - i + 1, a)); + i && (r[1].end = Object.assign({}, e[i][1].start), a = e.slice(i, n), a.unshift(r), Je(e, i, n - i + 1, a)); } } - return !u; + return !c; } -function Ju(e, n) { - const t = e[n][1], r = e[n][2]; - let i = n - 1; - const o = [], l = t._tokenizer || r.parser[t.contentType](t.start), a = l.events, s = [], u = {}; - let c, f, m = -1, p = t, d = 0, g = 0; +function ec(e, t) { + const n = e[t][1], r = e[t][2]; + let i = t - 1; + const o = [], l = n._tokenizer || r.parser[n.contentType](n.start), a = l.events, s = [], c = {}; + let f, u, d = -1, p = n, m = 0, g = 0; const b = [g]; for (; p; ) { for (; e[++i][1] !== p; ) ; - o.push(i), p._tokenizer || (c = r.sliceStream(p), p.next || c.push(null), f && l.defineSkip(p.start), p._isInFirstContentOfListItem && (l._gfmTasklistFirstContentOfListItem = !0), l.write(c), p._isInFirstContentOfListItem && (l._gfmTasklistFirstContentOfListItem = void 0)), f = p, p = p.next; + o.push(i), p._tokenizer || (f = r.sliceStream(p), p.next || f.push(null), u && l.defineSkip(p.start), p._isInFirstContentOfListItem && (l._gfmTasklistFirstContentOfListItem = !0), l.write(f), p._isInFirstContentOfListItem && (l._gfmTasklistFirstContentOfListItem = void 0)), u = p, p = p.next; } - for (p = t; ++m < a.length; ) + for (p = n; ++d < a.length; ) // Find a void token that includes a break. - a[m][0] === "exit" && a[m - 1][0] === "enter" && a[m][1].type === a[m - 1][1].type && a[m][1].start.line !== a[m][1].end.line && (g = m + 1, b.push(g), p._tokenizer = void 0, p.previous = void 0, p = p.next); - for (l.events = [], p ? (p._tokenizer = void 0, p.previous = void 0) : b.pop(), m = b.length; m--; ) { - const x = a.slice(b[m], b[m + 1]), P = o.pop(); - s.unshift([P, P + x.length - 1]), Je(e, P, 2, x); + a[d][0] === "exit" && a[d - 1][0] === "enter" && a[d][1].type === a[d - 1][1].type && a[d][1].start.line !== a[d][1].end.line && (g = d + 1, b.push(g), p._tokenizer = void 0, p.previous = void 0, p = p.next); + for (l.events = [], p ? (p._tokenizer = void 0, p.previous = void 0) : b.pop(), d = b.length; d--; ) { + const x = a.slice(b[d], b[d + 1]), A = o.pop(); + s.unshift([A, A + x.length - 1]), Je(e, A, 2, x); } - for (m = -1; ++m < s.length; ) - u[d + s[m][0]] = d + s[m][1], d += s[m][1] - s[m][0] - 1; - return u; + for (d = -1; ++d < s.length; ) + c[m + s[d][0]] = m + s[d][1], m += s[d][1] - s[d][0] - 1; + return c; } -const Ku = { - tokenize: Zu, - resolve: Qu -}, Xu = { - tokenize: ec, +const tc = { + tokenize: ic, + resolve: rc +}, nc = { + tokenize: oc, partial: !0 }; -function Qu(e) { - return ol(e), e; +function rc(e) { + return al(e), e; } -function Zu(e, n) { - let t; +function ic(e, t) { + let n; return r; function r(a) { - return e.enter("content"), t = e.enter("chunkContent", { + return e.enter("content"), n = e.enter("chunkContent", { contentType: "content" }), i(a); } function i(a) { return a === null ? o(a) : J(a) ? e.check( - Xu, + nc, l, o )(a) : (e.consume(a), i); } function o(a) { - return e.exit("chunkContent"), e.exit("content"), n(a); + return e.exit("chunkContent"), e.exit("content"), t(a); } function l(a) { - return e.consume(a), e.exit("chunkContent"), t.next = e.enter("chunkContent", { + return e.consume(a), e.exit("chunkContent"), n.next = e.enter("chunkContent", { contentType: "content", - previous: t - }), t = t.next, i; + previous: n + }), n = n.next, i; } } -function ec(e, n, t) { +function oc(e, t, n) { const r = this; return i; function i(l) { @@ -7827,105 +7846,105 @@ function ec(e, n, t) { } function o(l) { if (l === null || J(l)) - return t(l); + return n(l); const a = r.events[r.events.length - 1]; - return !r.parser.constructs.disable.null.includes("codeIndented") && a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? n(l) : e.interrupt(r.parser.constructs.flow, t, n)(l); + return !r.parser.constructs.disable.null.includes("codeIndented") && a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? t(l) : e.interrupt(r.parser.constructs.flow, n, t)(l); } } -function ll(e, n, t, r, i, o, l, a, s) { - const u = s || Number.POSITIVE_INFINITY; - let c = 0; - return f; - function f(x) { - return x === 60 ? (e.enter(r), e.enter(i), e.enter(o), e.consume(x), e.exit(o), m) : x === null || x === 32 || x === 41 || ur(x) ? t(x) : (e.enter(r), e.enter(l), e.enter(a), e.enter("chunkString", { +function sl(e, t, n, r, i, o, l, a, s) { + const c = s || Number.POSITIVE_INFINITY; + let f = 0; + return u; + function u(x) { + return x === 60 ? (e.enter(r), e.enter(i), e.enter(o), e.consume(x), e.exit(o), d) : x === null || x === 32 || x === 41 || ur(x) ? n(x) : (e.enter(r), e.enter(l), e.enter(a), e.enter("chunkString", { contentType: "string" }), g(x)); } - function m(x) { - return x === 62 ? (e.enter(o), e.consume(x), e.exit(o), e.exit(i), e.exit(r), n) : (e.enter(a), e.enter("chunkString", { + function d(x) { + return x === 62 ? (e.enter(o), e.consume(x), e.exit(o), e.exit(i), e.exit(r), t) : (e.enter(a), e.enter("chunkString", { contentType: "string" }), p(x)); } function p(x) { - return x === 62 ? (e.exit("chunkString"), e.exit(a), m(x)) : x === null || x === 60 || J(x) ? t(x) : (e.consume(x), x === 92 ? d : p); + return x === 62 ? (e.exit("chunkString"), e.exit(a), d(x)) : x === null || x === 60 || J(x) ? n(x) : (e.consume(x), x === 92 ? m : p); } - function d(x) { + function m(x) { return x === 60 || x === 62 || x === 92 ? (e.consume(x), p) : p(x); } function g(x) { - return !c && (x === null || x === 41 || Ie(x)) ? (e.exit("chunkString"), e.exit(a), e.exit(l), e.exit(r), n(x)) : c < u && x === 40 ? (e.consume(x), c++, g) : x === 41 ? (e.consume(x), c--, g) : x === null || x === 32 || x === 40 || ur(x) ? t(x) : (e.consume(x), x === 92 ? b : g); + return !f && (x === null || x === 41 || Ie(x)) ? (e.exit("chunkString"), e.exit(a), e.exit(l), e.exit(r), t(x)) : f < c && x === 40 ? (e.consume(x), f++, g) : x === 41 ? (e.consume(x), f--, g) : x === null || x === 32 || x === 40 || ur(x) ? n(x) : (e.consume(x), x === 92 ? b : g); } function b(x) { return x === 40 || x === 41 || x === 92 ? (e.consume(x), g) : g(x); } } -function al(e, n, t, r, i, o) { +function ul(e, t, n, r, i, o) { const l = this; let a = 0, s; - return u; - function u(p) { - return e.enter(r), e.enter(i), e.consume(p), e.exit(i), e.enter(o), c; - } + return c; function c(p) { + return e.enter(r), e.enter(i), e.consume(p), e.exit(i), e.enter(o), f; + } + function f(p) { return a > 999 || p === null || p === 91 || p === 93 && !s || // To do: remove in the future once we’ve switched from // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`, // which doesn’t need this. // Hidden footnotes hook. /* c8 ignore next 3 */ - p === 94 && !a && "_hiddenFootnoteSupport" in l.parser.constructs ? t(p) : p === 93 ? (e.exit(o), e.enter(i), e.consume(p), e.exit(i), e.exit(r), n) : J(p) ? (e.enter("lineEnding"), e.consume(p), e.exit("lineEnding"), c) : (e.enter("chunkString", { + p === 94 && !a && "_hiddenFootnoteSupport" in l.parser.constructs ? n(p) : p === 93 ? (e.exit(o), e.enter(i), e.consume(p), e.exit(i), e.exit(r), t) : J(p) ? (e.enter("lineEnding"), e.consume(p), e.exit("lineEnding"), f) : (e.enter("chunkString", { contentType: "string" - }), f(p)); + }), u(p)); } - function f(p) { - return p === null || p === 91 || p === 93 || J(p) || a++ > 999 ? (e.exit("chunkString"), c(p)) : (e.consume(p), s || (s = !pe(p)), p === 92 ? m : f); + function u(p) { + return p === null || p === 91 || p === 93 || J(p) || a++ > 999 ? (e.exit("chunkString"), f(p)) : (e.consume(p), s || (s = !pe(p)), p === 92 ? d : u); } - function m(p) { - return p === 91 || p === 92 || p === 93 ? (e.consume(p), a++, f) : f(p); + function d(p) { + return p === 91 || p === 92 || p === 93 ? (e.consume(p), a++, u) : u(p); } } -function sl(e, n, t, r, i, o) { +function cl(e, t, n, r, i, o) { let l; return a; - function a(m) { - return m === 34 || m === 39 || m === 40 ? (e.enter(r), e.enter(i), e.consume(m), e.exit(i), l = m === 40 ? 41 : m, s) : t(m); + function a(d) { + return d === 34 || d === 39 || d === 40 ? (e.enter(r), e.enter(i), e.consume(d), e.exit(i), l = d === 40 ? 41 : d, s) : n(d); } - function s(m) { - return m === l ? (e.enter(i), e.consume(m), e.exit(i), e.exit(r), n) : (e.enter(o), u(m)); + function s(d) { + return d === l ? (e.enter(i), e.consume(d), e.exit(i), e.exit(r), t) : (e.enter(o), c(d)); } - function u(m) { - return m === l ? (e.exit(o), s(l)) : m === null ? t(m) : J(m) ? (e.enter("lineEnding"), e.consume(m), e.exit("lineEnding"), xe(e, u, "linePrefix")) : (e.enter("chunkString", { + function c(d) { + return d === l ? (e.exit(o), s(l)) : d === null ? n(d) : J(d) ? (e.enter("lineEnding"), e.consume(d), e.exit("lineEnding"), xe(e, c, "linePrefix")) : (e.enter("chunkString", { contentType: "string" - }), c(m)); + }), f(d)); } - function c(m) { - return m === l || m === null || J(m) ? (e.exit("chunkString"), u(m)) : (e.consume(m), m === 92 ? f : c); + function f(d) { + return d === l || d === null || J(d) ? (e.exit("chunkString"), c(d)) : (e.consume(d), d === 92 ? u : f); } - function f(m) { - return m === l || m === 92 ? (e.consume(m), c) : c(m); + function u(d) { + return d === l || d === 92 ? (e.consume(d), f) : f(d); } } -function zt(e, n) { - let t; +function zt(e, t) { + let n; return r; function r(i) { - return J(i) ? (e.enter("lineEnding"), e.consume(i), e.exit("lineEnding"), t = !0, r) : pe(i) ? xe( + return J(i) ? (e.enter("lineEnding"), e.consume(i), e.exit("lineEnding"), n = !0, r) : pe(i) ? xe( e, r, - t ? "linePrefix" : "lineSuffix" - )(i) : n(i); + n ? "linePrefix" : "lineSuffix" + )(i) : t(i); } } function kt(e) { return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase(); } -const tc = { +const lc = { name: "definition", - tokenize: rc -}, nc = { - tokenize: ic, + tokenize: sc +}, ac = { + tokenize: uc, partial: !0 }; -function rc(e, n, t) { +function sc(e, t, n) { const r = this; let i; return o; @@ -7933,12 +7952,12 @@ function rc(e, n, t) { return e.enter("definition"), l(p); } function l(p) { - return al.call( + return ul.call( r, e, a, // Note: we don’t need to reset the way `markdown-rs` does. - t, + n, "definitionLabel", "definitionLabelMarker", "definitionLabelString" @@ -7947,17 +7966,17 @@ function rc(e, n, t) { function a(p) { return i = kt( r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1) - ), p === 58 ? (e.enter("definitionMarker"), e.consume(p), e.exit("definitionMarker"), s) : t(p); + ), p === 58 ? (e.enter("definitionMarker"), e.consume(p), e.exit("definitionMarker"), s) : n(p); } function s(p) { - return Ie(p) ? zt(e, u)(p) : u(p); + return Ie(p) ? zt(e, c)(p) : c(p); } - function u(p) { - return ll( + function c(p) { + return sl( e, - c, + f, // Note: we don’t need to reset the way `markdown-rs` does. - t, + n, "definitionDestination", "definitionDestinationLiteral", "definitionDestinationLiteralMarker", @@ -7965,26 +7984,26 @@ function rc(e, n, t) { "definitionDestinationString" )(p); } - function c(p) { - return e.attempt(nc, f, f)(p); - } function f(p) { - return pe(p) ? xe(e, m, "whitespace")(p) : m(p); + return e.attempt(ac, u, u)(p); + } + function u(p) { + return pe(p) ? xe(e, d, "whitespace")(p) : d(p); } - function m(p) { - return p === null || J(p) ? (e.exit("definition"), r.parser.defined.push(i), n(p)) : t(p); + function d(p) { + return p === null || J(p) ? (e.exit("definition"), r.parser.defined.push(i), t(p)) : n(p); } } -function ic(e, n, t) { +function uc(e, t, n) { return r; function r(a) { - return Ie(a) ? zt(e, i)(a) : t(a); + return Ie(a) ? zt(e, i)(a) : n(a); } function i(a) { - return sl( + return cl( e, o, - t, + n, "definitionTitle", "definitionTitleMarker", "definitionTitleString" @@ -7994,68 +8013,68 @@ function ic(e, n, t) { return pe(a) ? xe(e, l, "whitespace")(a) : l(a); } function l(a) { - return a === null || J(a) ? n(a) : t(a); + return a === null || J(a) ? t(a) : n(a); } } -const oc = { +const cc = { name: "hardBreakEscape", - tokenize: lc + tokenize: fc }; -function lc(e, n, t) { +function fc(e, t, n) { return r; function r(o) { return e.enter("hardBreakEscape"), e.consume(o), i; } function i(o) { - return J(o) ? (e.exit("hardBreakEscape"), n(o)) : t(o); + return J(o) ? (e.exit("hardBreakEscape"), t(o)) : n(o); } } -const ac = { +const pc = { name: "headingAtx", - tokenize: uc, - resolve: sc + tokenize: dc, + resolve: hc }; -function sc(e, n) { - let t = e.length - 2, r = 3, i, o; - return e[r][1].type === "whitespace" && (r += 2), t - 2 > r && e[t][1].type === "whitespace" && (t -= 2), e[t][1].type === "atxHeadingSequence" && (r === t - 1 || t - 4 > r && e[t - 2][1].type === "whitespace") && (t -= r + 1 === t ? 2 : 4), t > r && (i = { +function hc(e, t) { + let n = e.length - 2, r = 3, i, o; + return e[r][1].type === "whitespace" && (r += 2), n - 2 > r && e[n][1].type === "whitespace" && (n -= 2), e[n][1].type === "atxHeadingSequence" && (r === n - 1 || n - 4 > r && e[n - 2][1].type === "whitespace") && (n -= r + 1 === n ? 2 : 4), n > r && (i = { type: "atxHeadingText", start: e[r][1].start, - end: e[t][1].end + end: e[n][1].end }, o = { type: "chunkText", start: e[r][1].start, - end: e[t][1].end, + end: e[n][1].end, contentType: "text" - }, Je(e, r, t - r + 1, [ - ["enter", i, n], - ["enter", o, n], - ["exit", o, n], - ["exit", i, n] + }, Je(e, r, n - r + 1, [ + ["enter", i, t], + ["enter", o, t], + ["exit", o, t], + ["exit", i, t] ])), e; } -function uc(e, n, t) { +function dc(e, t, n) { let r = 0; return i; - function i(c) { - return e.enter("atxHeading"), o(c); + function i(f) { + return e.enter("atxHeading"), o(f); } - function o(c) { - return e.enter("atxHeadingSequence"), l(c); + function o(f) { + return e.enter("atxHeadingSequence"), l(f); } - function l(c) { - return c === 35 && r++ < 6 ? (e.consume(c), l) : c === null || Ie(c) ? (e.exit("atxHeadingSequence"), a(c)) : t(c); + function l(f) { + return f === 35 && r++ < 6 ? (e.consume(f), l) : f === null || Ie(f) ? (e.exit("atxHeadingSequence"), a(f)) : n(f); } - function a(c) { - return c === 35 ? (e.enter("atxHeadingSequence"), s(c)) : c === null || J(c) ? (e.exit("atxHeading"), n(c)) : pe(c) ? xe(e, a, "whitespace")(c) : (e.enter("atxHeadingText"), u(c)); + function a(f) { + return f === 35 ? (e.enter("atxHeadingSequence"), s(f)) : f === null || J(f) ? (e.exit("atxHeading"), t(f)) : pe(f) ? xe(e, a, "whitespace")(f) : (e.enter("atxHeadingText"), c(f)); } - function s(c) { - return c === 35 ? (e.consume(c), s) : (e.exit("atxHeadingSequence"), a(c)); + function s(f) { + return f === 35 ? (e.consume(f), s) : (e.exit("atxHeadingSequence"), a(f)); } - function u(c) { - return c === null || c === 35 || Ie(c) ? (e.exit("atxHeadingText"), a(c)) : (e.consume(c), u); + function c(f) { + return f === null || f === 35 || Ie(f) ? (e.exit("atxHeadingText"), a(f)) : (e.consume(f), c); } } -const cc = [ +const mc = [ "address", "article", "aside", @@ -8118,100 +8137,100 @@ const cc = [ "tr", "track", "ul" -], Ni = ["pre", "script", "style", "textarea"], fc = { +], Mi = ["pre", "script", "style", "textarea"], gc = { name: "htmlFlow", - tokenize: mc, - resolveTo: dc, + tokenize: xc, + resolveTo: kc, concrete: !0 -}, pc = { - tokenize: yc, +}, yc = { + tokenize: vc, partial: !0 -}, hc = { - tokenize: gc, +}, bc = { + tokenize: wc, partial: !0 }; -function dc(e) { - let n = e.length; - for (; n-- && !(e[n][0] === "enter" && e[n][1].type === "htmlFlow"); ) +function kc(e) { + let t = e.length; + for (; t-- && !(e[t][0] === "enter" && e[t][1].type === "htmlFlow"); ) ; - return n > 1 && e[n - 2][1].type === "linePrefix" && (e[n][1].start = e[n - 2][1].start, e[n + 1][1].start = e[n - 2][1].start, e.splice(n - 2, 2)), e; + return t > 1 && e[t - 2][1].type === "linePrefix" && (e[t][1].start = e[t - 2][1].start, e[t + 1][1].start = e[t - 2][1].start, e.splice(t - 2, 2)), e; } -function mc(e, n, t) { +function xc(e, t, n) { const r = this; let i, o, l, a, s; - return u; - function u(y) { - return c(y); - } + return c; function c(y) { - return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(y), f; + return f(y); } function f(y) { - return y === 33 ? (e.consume(y), m) : y === 47 ? (e.consume(y), o = !0, g) : y === 63 ? (e.consume(y), i = 3, r.interrupt ? n : h) : Ge(y) ? (e.consume(y), l = String.fromCharCode(y), b) : t(y); + return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(y), u; } - function m(y) { - return y === 45 ? (e.consume(y), i = 2, p) : y === 91 ? (e.consume(y), i = 5, a = 0, d) : Ge(y) ? (e.consume(y), i = 4, r.interrupt ? n : h) : t(y); + function u(y) { + return y === 33 ? (e.consume(y), d) : y === 47 ? (e.consume(y), o = !0, g) : y === 63 ? (e.consume(y), i = 3, r.interrupt ? t : h) : Ye(y) ? (e.consume(y), l = String.fromCharCode(y), b) : n(y); + } + function d(y) { + return y === 45 ? (e.consume(y), i = 2, p) : y === 91 ? (e.consume(y), i = 5, a = 0, m) : Ye(y) ? (e.consume(y), i = 4, r.interrupt ? t : h) : n(y); } function p(y) { - return y === 45 ? (e.consume(y), r.interrupt ? n : h) : t(y); + return y === 45 ? (e.consume(y), r.interrupt ? t : h) : n(y); } - function d(y) { + function m(y) { const B = "CDATA["; - return y === B.charCodeAt(a++) ? (e.consume(y), a === B.length ? r.interrupt ? n : z : d) : t(y); + return y === B.charCodeAt(a++) ? (e.consume(y), a === B.length ? r.interrupt ? t : z : m) : n(y); } function g(y) { - return Ge(y) ? (e.consume(y), l = String.fromCharCode(y), b) : t(y); + return Ye(y) ? (e.consume(y), l = String.fromCharCode(y), b) : n(y); } function b(y) { if (y === null || y === 47 || y === 62 || Ie(y)) { const B = y === 47, ne = l.toLowerCase(); - return !B && !o && Ni.includes(ne) ? (i = 1, r.interrupt ? n(y) : z(y)) : cc.includes(l.toLowerCase()) ? (i = 6, B ? (e.consume(y), x) : r.interrupt ? n(y) : z(y)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? t(y) : o ? P(y) : T(y)); + return !B && !o && Mi.includes(ne) ? (i = 1, r.interrupt ? t(y) : z(y)) : mc.includes(l.toLowerCase()) ? (i = 6, B ? (e.consume(y), x) : r.interrupt ? t(y) : z(y)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(y) : o ? A(y) : C(y)); } - return y === 45 || Le(y) ? (e.consume(y), l += String.fromCharCode(y), b) : t(y); + return y === 45 || Le(y) ? (e.consume(y), l += String.fromCharCode(y), b) : n(y); } function x(y) { - return y === 62 ? (e.consume(y), r.interrupt ? n : z) : t(y); + return y === 62 ? (e.consume(y), r.interrupt ? t : z) : n(y); } - function P(y) { - return pe(y) ? (e.consume(y), P) : v(y); + function A(y) { + return pe(y) ? (e.consume(y), A) : v(y); } - function T(y) { - return y === 47 ? (e.consume(y), v) : y === 58 || y === 95 || Ge(y) ? (e.consume(y), j) : pe(y) ? (e.consume(y), T) : v(y); + function C(y) { + return y === 47 ? (e.consume(y), v) : y === 58 || y === 95 || Ye(y) ? (e.consume(y), j) : pe(y) ? (e.consume(y), C) : v(y); } function j(y) { return y === 45 || y === 46 || y === 58 || y === 95 || Le(y) ? (e.consume(y), j) : E(y); } function E(y) { - return y === 61 ? (e.consume(y), w) : pe(y) ? (e.consume(y), E) : T(y); + return y === 61 ? (e.consume(y), w) : pe(y) ? (e.consume(y), E) : C(y); } function w(y) { - return y === null || y === 60 || y === 61 || y === 62 || y === 96 ? t(y) : y === 34 || y === 39 ? (e.consume(y), s = y, N) : pe(y) ? (e.consume(y), w) : U(y); + return y === null || y === 60 || y === 61 || y === 62 || y === 96 ? n(y) : y === 34 || y === 39 ? (e.consume(y), s = y, N) : pe(y) ? (e.consume(y), w) : U(y); } function N(y) { - return y === s ? (e.consume(y), s = null, te) : y === null || J(y) ? t(y) : (e.consume(y), N); + return y === s ? (e.consume(y), s = null, te) : y === null || J(y) ? n(y) : (e.consume(y), N); } function U(y) { return y === null || y === 34 || y === 39 || y === 47 || y === 60 || y === 61 || y === 62 || y === 96 || Ie(y) ? E(y) : (e.consume(y), U); } function te(y) { - return y === 47 || y === 62 || pe(y) ? T(y) : t(y); + return y === 47 || y === 62 || pe(y) ? C(y) : n(y); } function v(y) { - return y === 62 ? (e.consume(y), _) : t(y); + return y === 62 ? (e.consume(y), _) : n(y); } function _(y) { - return y === null || J(y) ? z(y) : pe(y) ? (e.consume(y), _) : t(y); + return y === null || J(y) ? z(y) : pe(y) ? (e.consume(y), _) : n(y); } function z(y) { return y === 45 && i === 2 ? (e.consume(y), q) : y === 60 && i === 1 ? (e.consume(y), oe) : y === 62 && i === 4 ? (e.consume(y), I) : y === 63 && i === 3 ? (e.consume(y), h) : y === 93 && i === 5 ? (e.consume(y), ye) : J(y) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check( - pc, + yc, H, Q )(y)) : y === null || J(y) ? (e.exit("htmlFlowData"), Q(y)) : (e.consume(y), z); } function Q(y) { return e.check( - hc, + bc, Z, H )(y); @@ -8231,9 +8250,9 @@ function mc(e, n, t) { function we(y) { if (y === 62) { const B = l.toLowerCase(); - return Ni.includes(B) ? (e.consume(y), I) : z(y); + return Mi.includes(B) ? (e.consume(y), I) : z(y); } - return Ge(y) && l.length < 8 ? (e.consume(y), l += String.fromCharCode(y), we) : z(y); + return Ye(y) && l.length < 8 ? (e.consume(y), l += String.fromCharCode(y), we) : z(y); } function ye(y) { return y === 93 ? (e.consume(y), h) : z(y); @@ -8245,30 +8264,30 @@ function mc(e, n, t) { return y === null || J(y) ? (e.exit("htmlFlowData"), H(y)) : (e.consume(y), I); } function H(y) { - return e.exit("htmlFlow"), n(y); + return e.exit("htmlFlow"), t(y); } } -function gc(e, n, t) { +function wc(e, t, n) { const r = this; return i; function i(l) { - return J(l) ? (e.enter("lineEnding"), e.consume(l), e.exit("lineEnding"), o) : t(l); + return J(l) ? (e.enter("lineEnding"), e.consume(l), e.exit("lineEnding"), o) : n(l); } function o(l) { - return r.parser.lazy[r.now().line] ? t(l) : n(l); + return r.parser.lazy[r.now().line] ? n(l) : t(l); } } -function yc(e, n, t) { +function vc(e, t, n) { return r; function r(i) { - return e.enter("lineEnding"), e.consume(i), e.exit("lineEnding"), e.attempt(xn, n, t); + return e.enter("lineEnding"), e.consume(i), e.exit("lineEnding"), e.attempt(kn, t, n); } } -const bc = { +const Ec = { name: "htmlText", - tokenize: kc + tokenize: Sc }; -function kc(e, n, t) { +function Sc(e, t, n) { const r = this; let i, o, l; return a; @@ -8276,29 +8295,29 @@ function kc(e, n, t) { return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(h), s; } function s(h) { - return h === 33 ? (e.consume(h), u) : h === 47 ? (e.consume(h), E) : h === 63 ? (e.consume(h), T) : Ge(h) ? (e.consume(h), U) : t(h); - } - function u(h) { - return h === 45 ? (e.consume(h), c) : h === 91 ? (e.consume(h), o = 0, d) : Ge(h) ? (e.consume(h), P) : t(h); + return h === 33 ? (e.consume(h), c) : h === 47 ? (e.consume(h), E) : h === 63 ? (e.consume(h), C) : Ye(h) ? (e.consume(h), U) : n(h); } function c(h) { - return h === 45 ? (e.consume(h), p) : t(h); + return h === 45 ? (e.consume(h), f) : h === 91 ? (e.consume(h), o = 0, m) : Ye(h) ? (e.consume(h), A) : n(h); } function f(h) { - return h === null ? t(h) : h === 45 ? (e.consume(h), m) : J(h) ? (l = f, oe(h)) : (e.consume(h), f); + return h === 45 ? (e.consume(h), p) : n(h); } - function m(h) { - return h === 45 ? (e.consume(h), p) : f(h); + function u(h) { + return h === null ? n(h) : h === 45 ? (e.consume(h), d) : J(h) ? (l = u, oe(h)) : (e.consume(h), u); + } + function d(h) { + return h === 45 ? (e.consume(h), p) : u(h); } function p(h) { - return h === 62 ? q(h) : h === 45 ? m(h) : f(h); + return h === 62 ? q(h) : h === 45 ? d(h) : u(h); } - function d(h) { + function m(h) { const I = "CDATA["; - return h === I.charCodeAt(o++) ? (e.consume(h), o === I.length ? g : d) : t(h); + return h === I.charCodeAt(o++) ? (e.consume(h), o === I.length ? g : m) : n(h); } function g(h) { - return h === null ? t(h) : h === 93 ? (e.consume(h), b) : J(h) ? (l = g, oe(h)) : (e.consume(h), g); + return h === null ? n(h) : h === 93 ? (e.consume(h), b) : J(h) ? (l = g, oe(h)) : (e.consume(h), g); } function b(h) { return h === 93 ? (e.consume(h), x) : g(h); @@ -8306,17 +8325,17 @@ function kc(e, n, t) { function x(h) { return h === 62 ? q(h) : h === 93 ? (e.consume(h), x) : g(h); } - function P(h) { - return h === null || h === 62 ? q(h) : J(h) ? (l = P, oe(h)) : (e.consume(h), P); + function A(h) { + return h === null || h === 62 ? q(h) : J(h) ? (l = A, oe(h)) : (e.consume(h), A); } - function T(h) { - return h === null ? t(h) : h === 63 ? (e.consume(h), j) : J(h) ? (l = T, oe(h)) : (e.consume(h), T); + function C(h) { + return h === null ? n(h) : h === 63 ? (e.consume(h), j) : J(h) ? (l = C, oe(h)) : (e.consume(h), C); } function j(h) { - return h === 62 ? q(h) : T(h); + return h === 62 ? q(h) : C(h); } function E(h) { - return Ge(h) ? (e.consume(h), w) : t(h); + return Ye(h) ? (e.consume(h), w) : n(h); } function w(h) { return h === 45 || Le(h) ? (e.consume(h), w) : N(h); @@ -8325,10 +8344,10 @@ function kc(e, n, t) { return J(h) ? (l = N, oe(h)) : pe(h) ? (e.consume(h), N) : q(h); } function U(h) { - return h === 45 || Le(h) ? (e.consume(h), U) : h === 47 || h === 62 || Ie(h) ? te(h) : t(h); + return h === 45 || Le(h) ? (e.consume(h), U) : h === 47 || h === 62 || Ie(h) ? te(h) : n(h); } function te(h) { - return h === 47 ? (e.consume(h), q) : h === 58 || h === 95 || Ge(h) ? (e.consume(h), v) : J(h) ? (l = te, oe(h)) : pe(h) ? (e.consume(h), te) : q(h); + return h === 47 ? (e.consume(h), q) : h === 58 || h === 95 || Ye(h) ? (e.consume(h), v) : J(h) ? (l = te, oe(h)) : pe(h) ? (e.consume(h), te) : q(h); } function v(h) { return h === 45 || h === 46 || h === 58 || h === 95 || Le(h) ? (e.consume(h), v) : _(h); @@ -8337,19 +8356,19 @@ function kc(e, n, t) { return h === 61 ? (e.consume(h), z) : J(h) ? (l = _, oe(h)) : pe(h) ? (e.consume(h), _) : te(h); } function z(h) { - return h === null || h === 60 || h === 61 || h === 62 || h === 96 ? t(h) : h === 34 || h === 39 ? (e.consume(h), i = h, Q) : J(h) ? (l = z, oe(h)) : pe(h) ? (e.consume(h), z) : (e.consume(h), Z); + return h === null || h === 60 || h === 61 || h === 62 || h === 96 ? n(h) : h === 34 || h === 39 ? (e.consume(h), i = h, Q) : J(h) ? (l = z, oe(h)) : pe(h) ? (e.consume(h), z) : (e.consume(h), Z); } function Q(h) { - return h === i ? (e.consume(h), i = void 0, G) : h === null ? t(h) : J(h) ? (l = Q, oe(h)) : (e.consume(h), Q); + return h === i ? (e.consume(h), i = void 0, G) : h === null ? n(h) : J(h) ? (l = Q, oe(h)) : (e.consume(h), Q); } function Z(h) { - return h === null || h === 34 || h === 39 || h === 60 || h === 61 || h === 96 ? t(h) : h === 47 || h === 62 || Ie(h) ? te(h) : (e.consume(h), Z); + return h === null || h === 34 || h === 39 || h === 60 || h === 61 || h === 96 ? n(h) : h === 47 || h === 62 || Ie(h) ? te(h) : (e.consume(h), Z); } function G(h) { - return h === 47 || h === 62 || Ie(h) ? te(h) : t(h); + return h === 47 || h === 62 || Ie(h) ? te(h) : n(h); } function q(h) { - return h === 62 ? (e.consume(h), e.exit("htmlTextData"), e.exit("htmlText"), n) : t(h); + return h === 62 ? (e.consume(h), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(h); } function oe(h) { return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(h), e.exit("lineEnding"), we; @@ -8366,71 +8385,71 @@ function kc(e, n, t) { return e.enter("htmlTextData"), l(h); } } -const Or = { +const Rr = { name: "labelEnd", - tokenize: Cc, - resolveTo: Sc, - resolveAll: Ec -}, xc = { - tokenize: Tc -}, wc = { - tokenize: Ac -}, vc = { - tokenize: Pc + tokenize: Oc, + resolveTo: Rc, + resolveAll: Pc +}, Cc = { + tokenize: Fc +}, Tc = { + tokenize: Ic +}, Ac = { + tokenize: _c }; -function Ec(e) { - let n = -1; - for (; ++n < e.length; ) { - const t = e[n][1]; - (t.type === "labelImage" || t.type === "labelLink" || t.type === "labelEnd") && (e.splice(n + 1, t.type === "labelImage" ? 4 : 2), t.type = "data", n++); +function Pc(e) { + let t = -1; + for (; ++t < e.length; ) { + const n = e[t][1]; + (n.type === "labelImage" || n.type === "labelLink" || n.type === "labelEnd") && (e.splice(t + 1, n.type === "labelImage" ? 4 : 2), n.type = "data", t++); } return e; } -function Sc(e, n) { - let t = e.length, r = 0, i, o, l, a; - for (; t--; ) - if (i = e[t][1], o) { +function Rc(e, t) { + let n = e.length, r = 0, i, o, l, a; + for (; n--; ) + if (i = e[n][1], o) { if (i.type === "link" || i.type === "labelLink" && i._inactive) break; - e[t][0] === "enter" && i.type === "labelLink" && (i._inactive = !0); + e[n][0] === "enter" && i.type === "labelLink" && (i._inactive = !0); } else if (l) { - if (e[t][0] === "enter" && (i.type === "labelImage" || i.type === "labelLink") && !i._balanced && (o = t, i.type !== "labelLink")) { + if (e[n][0] === "enter" && (i.type === "labelImage" || i.type === "labelLink") && !i._balanced && (o = n, i.type !== "labelLink")) { r = 2; break; } } else - i.type === "labelEnd" && (l = t); + i.type === "labelEnd" && (l = n); const s = { type: e[o][1].type === "labelLink" ? "link" : "image", start: Object.assign({}, e[o][1].start), end: Object.assign({}, e[e.length - 1][1].end) - }, u = { + }, c = { type: "label", start: Object.assign({}, e[o][1].start), end: Object.assign({}, e[l][1].end) - }, c = { + }, f = { type: "labelText", start: Object.assign({}, e[o + r + 2][1].end), end: Object.assign({}, e[l - 2][1].start) }; return a = [ - ["enter", s, n], - ["enter", u, n] - ], a = $e(a, e.slice(o + 1, o + r + 3)), a = $e(a, [["enter", c, n]]), a = $e( + ["enter", s, t], + ["enter", c, t] + ], a = $e(a, e.slice(o + 1, o + r + 3)), a = $e(a, [["enter", f, t]]), a = $e( a, Ar( - n.parser.constructs.insideSpan.null, + t.parser.constructs.insideSpan.null, e.slice(o + r + 4, l - 3), - n + t ) ), a = $e(a, [ - ["exit", c, n], + ["exit", f, t], e[l - 2], e[l - 1], - ["exit", u, n] - ]), a = $e(a, e.slice(l + 1)), a = $e(a, [["exit", s, n]]), Je(e, o, e.length, a), e; + ["exit", c, t] + ]), a = $e(a, e.slice(l + 1)), a = $e(a, [["exit", s, t]]), Je(e, o, e.length, a), e; } -function Cc(e, n, t) { +function Oc(e, t, n) { const r = this; let i = r.events.length, o, l; for (; i--; ) @@ -8439,51 +8458,51 @@ function Cc(e, n, t) { break; } return a; - function a(m) { - return o ? o._inactive ? f(m) : (l = r.parser.defined.includes( + function a(d) { + return o ? o._inactive ? u(d) : (l = r.parser.defined.includes( kt( r.sliceSerialize({ start: o.end, end: r.now() }) ) - ), e.enter("labelEnd"), e.enter("labelMarker"), e.consume(m), e.exit("labelMarker"), e.exit("labelEnd"), s) : t(m); + ), e.enter("labelEnd"), e.enter("labelMarker"), e.consume(d), e.exit("labelMarker"), e.exit("labelEnd"), s) : n(d); } - function s(m) { - return m === 40 ? e.attempt( - xc, - c, - l ? c : f - )(m) : m === 91 ? e.attempt( - wc, - c, - l ? u : f - )(m) : l ? c(m) : f(m); + function s(d) { + return d === 40 ? e.attempt( + Cc, + f, + l ? f : u + )(d) : d === 91 ? e.attempt( + Tc, + f, + l ? c : u + )(d) : l ? f(d) : u(d); } - function u(m) { + function c(d) { return e.attempt( - vc, - c, - f - )(m); + Ac, + f, + u + )(d); } - function c(m) { - return n(m); + function f(d) { + return t(d); } - function f(m) { - return o._balanced = !0, t(m); + function u(d) { + return o._balanced = !0, n(d); } } -function Tc(e, n, t) { +function Fc(e, t, n) { return r; - function r(f) { - return e.enter("resource"), e.enter("resourceMarker"), e.consume(f), e.exit("resourceMarker"), i; + function r(u) { + return e.enter("resource"), e.enter("resourceMarker"), e.consume(u), e.exit("resourceMarker"), i; } - function i(f) { - return Ie(f) ? zt(e, o)(f) : o(f); + function i(u) { + return Ie(u) ? zt(e, o)(u) : o(u); } - function o(f) { - return f === 41 ? c(f) : ll( + function o(u) { + return u === 41 ? f(u) : sl( e, l, a, @@ -8493,36 +8512,36 @@ function Tc(e, n, t) { "resourceDestinationRaw", "resourceDestinationString", 32 - )(f); + )(u); } - function l(f) { - return Ie(f) ? zt(e, s)(f) : c(f); + function l(u) { + return Ie(u) ? zt(e, s)(u) : f(u); } - function a(f) { - return t(f); + function a(u) { + return n(u); } - function s(f) { - return f === 34 || f === 39 || f === 40 ? sl( + function s(u) { + return u === 34 || u === 39 || u === 40 ? cl( e, - u, - t, + c, + n, "resourceTitle", "resourceTitleMarker", "resourceTitleString" - )(f) : c(f); + )(u) : f(u); } - function u(f) { - return Ie(f) ? zt(e, c)(f) : c(f); + function c(u) { + return Ie(u) ? zt(e, f)(u) : f(u); } - function c(f) { - return f === 41 ? (e.enter("resourceMarker"), e.consume(f), e.exit("resourceMarker"), e.exit("resource"), n) : t(f); + function f(u) { + return u === 41 ? (e.enter("resourceMarker"), e.consume(u), e.exit("resourceMarker"), e.exit("resource"), t) : n(u); } } -function Ac(e, n, t) { +function Ic(e, t, n) { const r = this; return i; function i(a) { - return al.call( + return ul.call( r, e, o, @@ -8537,163 +8556,163 @@ function Ac(e, n, t) { kt( r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1) ) - ) ? n(a) : t(a); + ) ? t(a) : n(a); } function l(a) { - return t(a); + return n(a); } } -function Pc(e, n, t) { +function _c(e, t, n) { return r; function r(o) { return e.enter("reference"), e.enter("referenceMarker"), e.consume(o), e.exit("referenceMarker"), i; } function i(o) { - return o === 93 ? (e.enter("referenceMarker"), e.consume(o), e.exit("referenceMarker"), e.exit("reference"), n) : t(o); + return o === 93 ? (e.enter("referenceMarker"), e.consume(o), e.exit("referenceMarker"), e.exit("reference"), t) : n(o); } } -const Oc = { +const jc = { name: "labelStartImage", - tokenize: Rc, - resolveAll: Or.resolveAll + tokenize: Dc, + resolveAll: Rr.resolveAll }; -function Rc(e, n, t) { +function Dc(e, t, n) { const r = this; return i; function i(a) { return e.enter("labelImage"), e.enter("labelImageMarker"), e.consume(a), e.exit("labelImageMarker"), o; } function o(a) { - return a === 91 ? (e.enter("labelMarker"), e.consume(a), e.exit("labelMarker"), e.exit("labelImage"), l) : t(a); + return a === 91 ? (e.enter("labelMarker"), e.consume(a), e.exit("labelMarker"), e.exit("labelImage"), l) : n(a); } function l(a) { - return a === 94 && "_hiddenFootnoteSupport" in r.parser.constructs ? t(a) : n(a); + return a === 94 && "_hiddenFootnoteSupport" in r.parser.constructs ? n(a) : t(a); } } -const Fc = { +const zc = { name: "labelStartLink", - tokenize: Ic, - resolveAll: Or.resolveAll + tokenize: Lc, + resolveAll: Rr.resolveAll }; -function Ic(e, n, t) { +function Lc(e, t, n) { const r = this; return i; function i(l) { return e.enter("labelLink"), e.enter("labelMarker"), e.consume(l), e.exit("labelMarker"), e.exit("labelLink"), o; } function o(l) { - return l === 94 && "_hiddenFootnoteSupport" in r.parser.constructs ? t(l) : n(l); + return l === 94 && "_hiddenFootnoteSupport" in r.parser.constructs ? n(l) : t(l); } } -const Bn = { +const $n = { name: "lineEnding", - tokenize: _c + tokenize: Nc }; -function _c(e, n) { - return t; - function t(r) { - return e.enter("lineEnding"), e.consume(r), e.exit("lineEnding"), xe(e, n, "linePrefix"); +function Nc(e, t) { + return n; + function n(r) { + return e.enter("lineEnding"), e.consume(r), e.exit("lineEnding"), xe(e, t, "linePrefix"); } } -const un = { +const sn = { name: "thematicBreak", - tokenize: jc + tokenize: Mc }; -function jc(e, n, t) { +function Mc(e, t, n) { let r = 0, i; return o; - function o(u) { - return e.enter("thematicBreak"), l(u); + function o(c) { + return e.enter("thematicBreak"), l(c); } - function l(u) { - return i = u, a(u); + function l(c) { + return i = c, a(c); } - function a(u) { - return u === i ? (e.enter("thematicBreakSequence"), s(u)) : r >= 3 && (u === null || J(u)) ? (e.exit("thematicBreak"), n(u)) : t(u); + function a(c) { + return c === i ? (e.enter("thematicBreakSequence"), s(c)) : r >= 3 && (c === null || J(c)) ? (e.exit("thematicBreak"), t(c)) : n(c); } - function s(u) { - return u === i ? (e.consume(u), r++, s) : (e.exit("thematicBreakSequence"), pe(u) ? xe(e, a, "whitespace")(u) : a(u)); + function s(c) { + return c === i ? (e.consume(c), r++, s) : (e.exit("thematicBreakSequence"), pe(c) ? xe(e, a, "whitespace")(c) : a(c)); } } const Fe = { name: "list", - tokenize: Lc, + tokenize: Uc, continuation: { - tokenize: Nc + tokenize: qc }, - exit: $c -}, Dc = { - tokenize: Bc, + exit: Vc +}, $c = { + tokenize: Wc, partial: !0 -}, zc = { - tokenize: Mc, +}, Bc = { + tokenize: Hc, partial: !0 }; -function Lc(e, n, t) { +function Uc(e, t, n) { const r = this, i = r.events[r.events.length - 1]; let o = i && i[1].type === "linePrefix" ? i[2].sliceSerialize(i[1], !0).length : 0, l = 0; return a; function a(p) { - const d = r.containerState.type || (p === 42 || p === 43 || p === 45 ? "listUnordered" : "listOrdered"); - if (d === "listUnordered" ? !r.containerState.marker || p === r.containerState.marker : cr(p)) { - if (r.containerState.type || (r.containerState.type = d, e.enter(d, { + const m = r.containerState.type || (p === 42 || p === 43 || p === 45 ? "listUnordered" : "listOrdered"); + if (m === "listUnordered" ? !r.containerState.marker || p === r.containerState.marker : cr(p)) { + if (r.containerState.type || (r.containerState.type = m, e.enter(m, { _container: !0 - })), d === "listUnordered") - return e.enter("listItemPrefix"), p === 42 || p === 45 ? e.check(un, t, u)(p) : u(p); + })), m === "listUnordered") + return e.enter("listItemPrefix"), p === 42 || p === 45 ? e.check(sn, n, c)(p) : c(p); if (!r.interrupt || p === 49) return e.enter("listItemPrefix"), e.enter("listItemValue"), s(p); } - return t(p); + return n(p); } function s(p) { - return cr(p) && ++l < 10 ? (e.consume(p), s) : (!r.interrupt || l < 2) && (r.containerState.marker ? p === r.containerState.marker : p === 41 || p === 46) ? (e.exit("listItemValue"), u(p)) : t(p); + return cr(p) && ++l < 10 ? (e.consume(p), s) : (!r.interrupt || l < 2) && (r.containerState.marker ? p === r.containerState.marker : p === 41 || p === 46) ? (e.exit("listItemValue"), c(p)) : n(p); } - function u(p) { + function c(p) { return e.enter("listItemMarker"), e.consume(p), e.exit("listItemMarker"), r.containerState.marker = r.containerState.marker || p, e.check( - xn, + kn, // Can’t be empty when interrupting. - r.interrupt ? t : c, + r.interrupt ? n : f, e.attempt( - Dc, - m, - f + $c, + d, + u ) ); } - function c(p) { - return r.containerState.initialBlankLine = !0, o++, m(p); - } function f(p) { - return pe(p) ? (e.enter("listItemPrefixWhitespace"), e.consume(p), e.exit("listItemPrefixWhitespace"), m) : t(p); + return r.containerState.initialBlankLine = !0, o++, d(p); } - function m(p) { - return r.containerState.size = o + r.sliceSerialize(e.exit("listItemPrefix"), !0).length, n(p); + function u(p) { + return pe(p) ? (e.enter("listItemPrefixWhitespace"), e.consume(p), e.exit("listItemPrefixWhitespace"), d) : n(p); + } + function d(p) { + return r.containerState.size = o + r.sliceSerialize(e.exit("listItemPrefix"), !0).length, t(p); } } -function Nc(e, n, t) { +function qc(e, t, n) { const r = this; - return r.containerState._closeFlow = void 0, e.check(xn, i, o); + return r.containerState._closeFlow = void 0, e.check(kn, i, o); function i(a) { return r.containerState.furtherBlankLines = r.containerState.furtherBlankLines || r.containerState.initialBlankLine, xe( e, - n, + t, "listItemIndent", r.containerState.size + 1 )(a); } function o(a) { - return r.containerState.furtherBlankLines || !pe(a) ? (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, l(a)) : (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, e.attempt(zc, n, l)(a)); + return r.containerState.furtherBlankLines || !pe(a) ? (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, l(a)) : (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, e.attempt(Bc, t, l)(a)); } function l(a) { return r.containerState._closeFlow = !0, r.interrupt = void 0, xe( e, - e.attempt(Fe, n, t), + e.attempt(Fe, t, n), "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4 )(a); } } -function Mc(e, n, t) { +function Hc(e, t, n) { const r = this; return xe( e, @@ -8703,13 +8722,13 @@ function Mc(e, n, t) { ); function i(o) { const l = r.events[r.events.length - 1]; - return l && l[1].type === "listItemIndent" && l[2].sliceSerialize(l[1], !0).length === r.containerState.size ? n(o) : t(o); + return l && l[1].type === "listItemIndent" && l[2].sliceSerialize(l[1], !0).length === r.containerState.size ? t(o) : n(o); } } -function $c(e) { +function Vc(e) { e.exit(this.containerState.type); } -function Bc(e, n, t) { +function Wc(e, t, n) { const r = this; return xe( e, @@ -8719,62 +8738,62 @@ function Bc(e, n, t) { ); function i(o) { const l = r.events[r.events.length - 1]; - return !pe(o) && l && l[1].type === "listItemPrefixWhitespace" ? n(o) : t(o); + return !pe(o) && l && l[1].type === "listItemPrefixWhitespace" ? t(o) : n(o); } } -const Mi = { +const $i = { name: "setextUnderline", - tokenize: qc, - resolveTo: Uc + tokenize: Gc, + resolveTo: Yc }; -function Uc(e, n) { - let t = e.length, r, i, o; - for (; t--; ) - if (e[t][0] === "enter") { - if (e[t][1].type === "content") { - r = t; +function Yc(e, t) { + let n = e.length, r, i, o; + for (; n--; ) + if (e[n][0] === "enter") { + if (e[n][1].type === "content") { + r = n; break; } - e[t][1].type === "paragraph" && (i = t); + e[n][1].type === "paragraph" && (i = n); } else - e[t][1].type === "content" && e.splice(t, 1), !o && e[t][1].type === "definition" && (o = t); + e[n][1].type === "content" && e.splice(n, 1), !o && e[n][1].type === "definition" && (o = n); const l = { type: "setextHeading", start: Object.assign({}, e[i][1].start), end: Object.assign({}, e[e.length - 1][1].end) }; - return e[i][1].type = "setextHeadingText", o ? (e.splice(i, 0, ["enter", l, n]), e.splice(o + 1, 0, ["exit", e[r][1], n]), e[r][1].end = Object.assign({}, e[o][1].end)) : e[r][1] = l, e.push(["exit", l, n]), e; + return e[i][1].type = "setextHeadingText", o ? (e.splice(i, 0, ["enter", l, t]), e.splice(o + 1, 0, ["exit", e[r][1], t]), e[r][1].end = Object.assign({}, e[o][1].end)) : e[r][1] = l, e.push(["exit", l, t]), e; } -function qc(e, n, t) { +function Gc(e, t, n) { const r = this; let i; return o; - function o(u) { - let c = r.events.length, f; - for (; c--; ) - if (r.events[c][1].type !== "lineEnding" && r.events[c][1].type !== "linePrefix" && r.events[c][1].type !== "content") { - f = r.events[c][1].type === "paragraph"; + function o(c) { + let f = r.events.length, u; + for (; f--; ) + if (r.events[f][1].type !== "lineEnding" && r.events[f][1].type !== "linePrefix" && r.events[f][1].type !== "content") { + u = r.events[f][1].type === "paragraph"; break; } - return !r.parser.lazy[r.now().line] && (r.interrupt || f) ? (e.enter("setextHeadingLine"), i = u, l(u)) : t(u); + return !r.parser.lazy[r.now().line] && (r.interrupt || u) ? (e.enter("setextHeadingLine"), i = c, l(c)) : n(c); } - function l(u) { - return e.enter("setextHeadingLineSequence"), a(u); + function l(c) { + return e.enter("setextHeadingLineSequence"), a(c); } - function a(u) { - return u === i ? (e.consume(u), a) : (e.exit("setextHeadingLineSequence"), pe(u) ? xe(e, s, "lineSuffix")(u) : s(u)); + function a(c) { + return c === i ? (e.consume(c), a) : (e.exit("setextHeadingLineSequence"), pe(c) ? xe(e, s, "lineSuffix")(c) : s(c)); } - function s(u) { - return u === null || J(u) ? (e.exit("setextHeadingLine"), n(u)) : t(u); + function s(c) { + return c === null || J(c) ? (e.exit("setextHeadingLine"), t(c)) : n(c); } } -const Hc = { - tokenize: Vc +const Jc = { + tokenize: Kc }; -function Vc(e) { - const n = this, t = e.attempt( +function Kc(e) { + const t = this, n = e.attempt( // Try to parse a blank line. - xn, + kn, r, // Try to parse initial flow (essentially, only code). e.attempt( @@ -8785,62 +8804,62 @@ function Vc(e) { e.attempt( this.parser.constructs.flow, i, - e.attempt(Ku, i) + e.attempt(tc, i) ), "linePrefix" ) ) ); - return t; + return n; function r(o) { if (o === null) { e.consume(o); return; } - return e.enter("lineEndingBlank"), e.consume(o), e.exit("lineEndingBlank"), n.currentConstruct = void 0, t; + return e.enter("lineEndingBlank"), e.consume(o), e.exit("lineEndingBlank"), t.currentConstruct = void 0, n; } function i(o) { if (o === null) { e.consume(o); return; } - return e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"), n.currentConstruct = void 0, t; + return e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"), t.currentConstruct = void 0, n; } } -const Wc = { - resolveAll: cl() -}, Yc = ul("string"), Gc = ul("text"); -function ul(e) { +const Xc = { + resolveAll: pl() +}, Qc = fl("string"), Zc = fl("text"); +function fl(e) { return { - tokenize: n, - resolveAll: cl( - e === "text" ? Jc : void 0 + tokenize: t, + resolveAll: pl( + e === "text" ? ef : void 0 ) }; - function n(t) { - const r = this, i = this.parser.constructs[e], o = t.attempt(i, l, a); + function t(n) { + const r = this, i = this.parser.constructs[e], o = n.attempt(i, l, a); return l; - function l(c) { - return u(c) ? o(c) : a(c); + function l(f) { + return c(f) ? o(f) : a(f); } - function a(c) { - if (c === null) { - t.consume(c); + function a(f) { + if (f === null) { + n.consume(f); return; } - return t.enter("data"), t.consume(c), s; + return n.enter("data"), n.consume(f), s; } - function s(c) { - return u(c) ? (t.exit("data"), o(c)) : (t.consume(c), s); + function s(f) { + return c(f) ? (n.exit("data"), o(f)) : (n.consume(f), s); } - function u(c) { - if (c === null) + function c(f) { + if (f === null) return !0; - const f = i[c]; - let m = -1; - if (f) - for (; ++m < f.length; ) { - const p = f[m]; + const u = i[f]; + let d = -1; + if (u) + for (; ++d < u.length; ) { + const p = u[d]; if (!p.previous || p.previous.call(r, r.previous)) return !0; } @@ -8848,39 +8867,39 @@ function ul(e) { } } } -function cl(e) { - return n; - function n(t, r) { +function pl(e) { + return t; + function t(n, r) { let i = -1, o; - for (; ++i <= t.length; ) - o === void 0 ? t[i] && t[i][1].type === "data" && (o = i, i++) : (!t[i] || t[i][1].type !== "data") && (i !== o + 2 && (t[o][1].end = t[i - 1][1].end, t.splice(o + 2, i - o - 2), i = o + 2), o = void 0); - return e ? e(t, r) : t; + for (; ++i <= n.length; ) + o === void 0 ? n[i] && n[i][1].type === "data" && (o = i, i++) : (!n[i] || n[i][1].type !== "data") && (i !== o + 2 && (n[o][1].end = n[i - 1][1].end, n.splice(o + 2, i - o - 2), i = o + 2), o = void 0); + return e ? e(n, r) : n; } } -function Jc(e, n) { - let t = 0; - for (; ++t <= e.length; ) - if ((t === e.length || e[t][1].type === "lineEnding") && e[t - 1][1].type === "data") { - const r = e[t - 1][1], i = n.sliceStream(r); +function ef(e, t) { + let n = 0; + for (; ++n <= e.length; ) + if ((n === e.length || e[n][1].type === "lineEnding") && e[n - 1][1].type === "data") { + const r = e[n - 1][1], i = t.sliceStream(r); let o = i.length, l = -1, a = 0, s; for (; o--; ) { - const u = i[o]; - if (typeof u == "string") { - for (l = u.length; u.charCodeAt(l - 1) === 32; ) + const c = i[o]; + if (typeof c == "string") { + for (l = c.length; c.charCodeAt(l - 1) === 32; ) a++, l--; if (l) break; l = -1; - } else if (u === -2) + } else if (c === -2) s = !0, a++; - else if (u !== -1) { + else if (c !== -1) { o++; break; } } if (a) { - const u = { - type: t === e.length || s || a < 2 ? "lineSuffix" : "hardBreakTrailing", + const c = { + type: n === e.length || s || a < 2 ? "lineSuffix" : "hardBreakTrailing", start: { line: r.end.line, column: r.end.column - a, @@ -8890,20 +8909,20 @@ function Jc(e, n) { }, end: Object.assign({}, r.end) }; - r.end = Object.assign({}, u.start), r.start.offset === r.end.offset ? Object.assign(r, u) : (e.splice( - t, + r.end = Object.assign({}, c.start), r.start.offset === r.end.offset ? Object.assign(r, c) : (e.splice( + n, 0, - ["enter", u, n], - ["exit", u, n] - ), t += 2); + ["enter", c, t], + ["exit", c, t] + ), n += 2); } - t++; + n++; } return e; } -function Kc(e, n, t) { +function tf(e, t, n) { let r = Object.assign( - t ? Object.assign({}, t) : { + n ? Object.assign({}, n) : { line: 1, column: 1, offset: 0 @@ -8916,38 +8935,38 @@ function Kc(e, n, t) { const i = {}, o = []; let l = [], a = []; const s = { - consume: P, - enter: T, + consume: A, + enter: C, exit: j, attempt: N(E), check: N(w), interrupt: N(w, { interrupt: !0 }) - }, u = { + }, c = { previous: null, code: null, containerState: {}, events: [], parser: e, sliceStream: p, - sliceSerialize: m, - now: d, + sliceSerialize: d, + now: m, defineSkip: g, - write: f + write: u }; - let c = n.tokenize.call(u, s); - return n.resolveAll && o.push(n), u; - function f(_) { - return l = $e(l, _), b(), l[l.length - 1] !== null ? [] : (U(n, 0), u.events = Ar(o, u.events, u), u.events); + let f = t.tokenize.call(c, s); + return t.resolveAll && o.push(t), c; + function u(_) { + return l = $e(l, _), b(), l[l.length - 1] !== null ? [] : (U(t, 0), c.events = Ar(o, c.events, c), c.events); } - function m(_, z) { - return Qc(p(_), z); + function d(_, z) { + return rf(p(_), z); } function p(_) { - return Xc(l, _); + return nf(l, _); } - function d() { + function m() { const { line: _, column: z, offset: Q, _index: Z, _bufferIndex: G } = r; return { line: _, @@ -8972,18 +8991,18 @@ function Kc(e, n, t) { } } function x(_) { - c = c(_); + f = f(_); } - function P(_) { - J(_) ? (r.line++, r.column = 1, r.offset += _ === -3 ? 2 : 1, v()) : _ !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === l[r._index].length && (r._bufferIndex = -1, r._index++)), u.previous = _; + function A(_) { + J(_) ? (r.line++, r.column = 1, r.offset += _ === -3 ? 2 : 1, v()) : _ !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === l[r._index].length && (r._bufferIndex = -1, r._index++)), c.previous = _; } - function T(_, z) { + function C(_, z) { const Q = z || {}; - return Q.type = _, Q.start = d(), u.events.push(["enter", Q, u]), a.push(Q), Q; + return Q.type = _, Q.start = m(), c.events.push(["enter", Q, c]), a.push(Q), Q; } function j(_) { const z = a.pop(); - return z.end = d(), u.events.push(["exit", z, u]), z; + return z.end = m(), c.events.push(["exit", z, c]), z; } function E(_, z) { U(_, z.from); @@ -9017,11 +9036,11 @@ function Kc(e, n, t) { function y(M) { return W; function W(Y) { - return h = te(), ye = M, M.partial || (u.currentConstruct = M), M.name && u.parser.constructs.disable.null.includes(M.name) ? ne() : M.tokenize.call( + return h = te(), ye = M, M.partial || (c.currentConstruct = M), M.name && c.parser.constructs.disable.null.includes(M.name) ? ne() : M.tokenize.call( // If we do have fields, create an object w/ `context` as its // prototype. // This allows a “live binding”, which is needed for `interrupt`. - z ? Object.assign(Object.create(u), z) : u, + z ? Object.assign(Object.create(c), z) : c, s, B, ne @@ -9038,33 +9057,33 @@ function Kc(e, n, t) { } function U(_, z) { _.resolveAll && !o.includes(_) && o.push(_), _.resolve && Je( - u.events, + c.events, z, - u.events.length - z, - _.resolve(u.events.slice(z), u) - ), _.resolveTo && (u.events = _.resolveTo(u.events, u)); + c.events.length - z, + _.resolve(c.events.slice(z), c) + ), _.resolveTo && (c.events = _.resolveTo(c.events, c)); } function te() { - const _ = d(), z = u.previous, Q = u.currentConstruct, Z = u.events.length, G = Array.from(a); + const _ = m(), z = c.previous, Q = c.currentConstruct, Z = c.events.length, G = Array.from(a); return { restore: q, from: Z }; function q() { - r = _, u.previous = z, u.currentConstruct = Q, u.events.length = Z, a = G, v(); + r = _, c.previous = z, c.currentConstruct = Q, c.events.length = Z, a = G, v(); } } function v() { r.line in i && r.column < 2 && (r.column = i[r.line], r.offset += i[r.line] - 1); } } -function Xc(e, n) { - const t = n.start._index, r = n.start._bufferIndex, i = n.end._index, o = n.end._bufferIndex; +function nf(e, t) { + const n = t.start._index, r = t.start._bufferIndex, i = t.end._index, o = t.end._bufferIndex; let l; - if (t === i) - l = [e[t].slice(r, o)]; + if (n === i) + l = [e[n].slice(r, o)]; else { - if (l = e.slice(t, i), r > -1) { + if (l = e.slice(n, i), r > -1) { const a = l[0]; typeof a == "string" ? l[0] = a.slice(r) : l.shift(); } @@ -9072,12 +9091,12 @@ function Xc(e, n) { } return l; } -function Qc(e, n) { - let t = -1; +function rf(e, t) { + let n = -1; const r = []; let i; - for (; ++t < e.length; ) { - const o = e[t]; + for (; ++n < e.length; ) { + const o = e[n]; let l; if (typeof o == "string") l = o; @@ -9098,11 +9117,11 @@ function Qc(e, n) { break; } case -2: { - l = n ? " " : " "; + l = t ? " " : " "; break; } case -1: { - if (!n && i) + if (!t && i) continue; l = " "; break; @@ -9114,7 +9133,7 @@ function Qc(e, n) { } return r.join(""); } -const Zc = { +const of = { 42: Fe, 43: Fe, 45: Fe, @@ -9128,100 +9147,100 @@ const Zc = { 55: Fe, 56: Fe, 57: Fe, - 62: nl -}, ef = { - 91: tc -}, tf = { - [-2]: $n, - [-1]: $n, - 32: $n -}, nf = { - 35: ac, - 42: un, - 45: [Mi, un], - 60: fc, - 61: Mi, - 95: un, - 96: Li, - 126: Li -}, rf = { - 38: il, - 92: rl -}, of = { - [-5]: Bn, - [-4]: Bn, - [-3]: Bn, - 33: Oc, - 38: il, - 42: fr, - 60: [Iu, bc], - 91: Fc, - 92: [oc, rl], - 93: Or, - 95: fr, - 96: Vu + 62: il }, lf = { - null: [fr, Wc] + 91: lc }, af = { - null: [42, 95] + [-2]: Mn, + [-1]: Mn, + 32: Mn }, sf = { + 35: pc, + 42: sn, + 45: [$i, sn], + 60: gc, + 61: $i, + 95: sn, + 96: Ni, + 126: Ni +}, uf = { + 38: ll, + 92: ol +}, cf = { + [-5]: $n, + [-4]: $n, + [-3]: $n, + 33: jc, + 38: ll, + 42: fr, + 60: [Lu, Ec], + 91: zc, + 92: [cc, ol], + 93: Rr, + 95: fr, + 96: Ku +}, ff = { + null: [fr, Xc] +}, pf = { + null: [42, 95] +}, hf = { null: [] -}, uf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ +}, df = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, - attentionMarkers: af, - contentInitial: ef, - disable: sf, - document: Zc, - flow: nf, - flowInitial: tf, - insideSpan: lf, - string: rf, - text: of + attentionMarkers: pf, + contentInitial: lf, + disable: hf, + document: of, + flow: sf, + flowInitial: af, + insideSpan: ff, + string: uf, + text: cf }, Symbol.toStringTag, { value: "Module" })); -function cf(e) { - const t = ( +function mf(e) { + const n = ( /** @type {FullNormalizedExtension} */ - gu([uf, ...(e || {}).extensions || []]) + wu([df, ...(e || {}).extensions || []]) ), r = { defined: [], lazy: {}, - constructs: t, - content: i(Cu), - document: i(Au), - flow: i(Hc), - string: i(Yc), - text: i(Gc) + constructs: n, + content: i(Ou), + document: i(Iu), + flow: i(Jc), + string: i(Qc), + text: i(Zc) }; return r; function i(o) { return l; function l(a) { - return Kc(r, o, a); + return tf(r, o, a); } } } -const $i = /[\0\t\n\r]/g; -function ff() { - let e = 1, n = "", t = !0, r; +const Bi = /[\0\t\n\r]/g; +function gf() { + let e = 1, t = "", n = !0, r; return i; function i(o, l, a) { const s = []; - let u, c, f, m, p; - for (o = n + o.toString(l), f = 0, n = "", t && (o.charCodeAt(0) === 65279 && f++, t = void 0); f < o.length; ) { - if ($i.lastIndex = f, u = $i.exec(o), m = u && u.index !== void 0 ? u.index : o.length, p = o.charCodeAt(m), !u) { - n = o.slice(f); + let c, f, u, d, p; + for (o = t + o.toString(l), u = 0, t = "", n && (o.charCodeAt(0) === 65279 && u++, n = void 0); u < o.length; ) { + if (Bi.lastIndex = u, c = Bi.exec(o), d = c && c.index !== void 0 ? c.index : o.length, p = o.charCodeAt(d), !c) { + t = o.slice(u); break; } - if (p === 10 && f === m && r) + if (p === 10 && u === d && r) s.push(-3), r = void 0; else - switch (r && (s.push(-5), r = void 0), f < m && (s.push(o.slice(f, m)), e += m - f), p) { + switch (r && (s.push(-5), r = void 0), u < d && (s.push(o.slice(u, d)), e += d - u), p) { case 0: { s.push(65533), e++; break; } case 9: { - for (c = Math.ceil(e / 4) * 4, s.push(-2); e++ < c; ) + for (f = Math.ceil(e / 4) * 4, s.push(-2); e++ < f; ) s.push(-1); break; } @@ -9232,41 +9251,41 @@ function ff() { default: r = !0, e = 1; } - f = m + 1; + u = d + 1; } - return a && (r && s.push(-5), n && s.push(n), s.push(null)), s; + return a && (r && s.push(-5), t && s.push(t), s.push(null)), s; } } -function pf(e) { - for (; !ol(e); ) +function yf(e) { + for (; !al(e); ) ; return e; } -function fl(e, n) { - const t = Number.parseInt(e, n); +function hl(e, t) { + const n = Number.parseInt(e, t); return ( // C0 except for HT, LF, FF, CR, space. - t < 9 || t === 11 || t > 13 && t < 32 || // Control character (DEL) of C0, and C1 controls. - t > 126 && t < 160 || // Lone high surrogates and low surrogates. - t > 55295 && t < 57344 || // Noncharacters. - t > 64975 && t < 65008 || (t & 65535) === 65535 || (t & 65535) === 65534 || // Out of range - t > 1114111 ? "�" : String.fromCharCode(t) + n < 9 || n === 11 || n > 13 && n < 32 || // Control character (DEL) of C0, and C1 controls. + n > 126 && n < 160 || // Lone high surrogates and low surrogates. + n > 55295 && n < 57344 || // Noncharacters. + n > 64975 && n < 65008 || (n & 65535) === 65535 || (n & 65535) === 65534 || // Out of range + n > 1114111 ? "�" : String.fromCharCode(n) ); } -const hf = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi; -function df(e) { - return e.replace(hf, mf); +const bf = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi; +function kf(e) { + return e.replace(bf, xf); } -function mf(e, n, t) { - if (n) - return n; - if (t.charCodeAt(0) === 35) { - const i = t.charCodeAt(1), o = i === 120 || i === 88; - return fl(t.slice(o ? 2 : 1), o ? 16 : 10); +function xf(e, t, n) { + if (t) + return t; + if (n.charCodeAt(0) === 35) { + const i = n.charCodeAt(1), o = i === 120 || i === 88; + return hl(n.slice(o ? 2 : 1), o ? 16 : 10); } - return Pr(t) || e; + return Pr(n) || e; } -const pl = {}.hasOwnProperty, gf = ( +const dl = {}.hasOwnProperty, wf = ( /** * @type {( * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) & @@ -9279,16 +9298,16 @@ const pl = {}.hasOwnProperty, gf = ( * @param {Options | null | undefined} [options] * @returns {Root} */ - function(e, n, t) { - return typeof n != "string" && (t = n, n = void 0), yf(t)( - pf( - cf(t).document().write(ff()(e, n, !0)) + function(e, t, n) { + return typeof t != "string" && (n = t, t = void 0), vf(n)( + yf( + mf(n).document().write(gf()(e, t, !0)) ) ); } ); -function yf(e) { - const n = { +function vf(e) { + const t = { transforms: [], canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"], enter: { @@ -9318,75 +9337,75 @@ function yf(e) { htmlFlowData: _, htmlText: a(At, s), htmlTextData: _, - image: a(ht), + image: a(dt), label: s, link: a(Yt), listItem: a(Pt), - listItemValue: d, + listItemValue: m, listOrdered: a(Gt, p), listUnordered: a(Gt), - paragraph: a(Cn), + paragraph: a(Sn), reference: ne, referenceString: s, resourceDestinationString: s, resourceTitleString: s, setextHeading: a(Ne), - strong: a(Tn), + strong: a(Cn), thematicBreak: a(Kt) }, exit: { - atxHeading: c(), + atxHeading: f(), atxHeadingSequence: N, - autolink: c(), + autolink: f(), autolinkEmail: K, autolinkProtocol: re, - blockQuote: c(), + blockQuote: f(), characterEscapeValue: z, characterReferenceMarkerHexadecimal: W, characterReferenceMarkerNumeric: W, characterReferenceValue: Y, - codeFenced: c(P), + codeFenced: f(A), codeFencedFence: x, codeFencedFenceInfo: g, codeFencedFenceMeta: b, codeFlowValue: z, - codeIndented: c(T), - codeText: c(oe), + codeIndented: f(C), + codeText: f(oe), codeTextData: z, data: z, - definition: c(), + definition: f(), definitionDestinationString: w, definitionLabelString: j, definitionTitleString: E, - emphasis: c(), - hardBreakEscape: c(Z), - hardBreakTrailing: c(Z), - htmlFlow: c(G), + emphasis: f(), + hardBreakEscape: f(Z), + hardBreakTrailing: f(Z), + htmlFlow: f(G), htmlFlowData: z, - htmlText: c(q), + htmlText: f(q), htmlTextData: z, - image: c(ye), + image: f(ye), label: I, labelText: h, lineEnding: Q, - link: c(we), - listItem: c(), - listOrdered: c(), - listUnordered: c(), - paragraph: c(), + link: f(we), + listItem: f(), + listOrdered: f(), + listUnordered: f(), + paragraph: f(), referenceString: M, resourceDestinationString: H, resourceTitleString: y, resource: B, - setextHeading: c(v), + setextHeading: f(v), setextHeadingLineSequence: te, setextHeadingText: U, - strong: c(), - thematicBreak: c() + strong: f(), + thematicBreak: f() } }; - hl(n, (e || {}).mdastExtensions || []); - const t = {}; + ml(t, (e || {}).mdastExtensions || []); + const n = {}; return r; function r(S) { let F = { @@ -9396,11 +9415,11 @@ function yf(e) { const V = { stack: [F], tokenStack: [], - config: n, - enter: u, - exit: f, + config: t, + enter: c, + exit: u, buffer: s, - resume: m, + resume: d, setData: o, getData: l }, ue = []; @@ -9414,8 +9433,8 @@ function yf(e) { ce = i(S, je, ce); } for (ce = -1; ++ce < S.length; ) { - const je = n[S[ce][0]]; - pl.call(je, S[ce][1].type) && je[S[ce][1].type].call( + const je = t[S[ce][0]]; + dl.call(je, S[ce][1].type) && je[S[ce][1].type].call( Object.assign( { sliceSerialize: S[ce][2].sliceSerialize @@ -9427,7 +9446,7 @@ function yf(e) { } if (V.tokenStack.length > 0) { const je = V.tokenStack[V.tokenStack.length - 1]; - (je[1] || Bi).call(V, void 0, je[0]); + (je[1] || Ui).call(V, void 0, je[0]); } for (F.position = { start: rt( @@ -9444,52 +9463,52 @@ function yf(e) { offset: 0 } ) - }, ce = -1; ++ce < n.transforms.length; ) - F = n.transforms[ce](F) || F; + }, ce = -1; ++ce < t.transforms.length; ) + F = t.transforms[ce](F) || F; return F; } function i(S, F, V) { - let ue = F - 1, ce = -1, je = !1, We, He, at, st; + let ue = F - 1, ce = -1, je = !1, Ve, He, lt, at; for (; ++ue <= V; ) { const ve = S[ue]; - if (ve[1].type === "listUnordered" || ve[1].type === "listOrdered" || ve[1].type === "blockQuote" ? (ve[0] === "enter" ? ce++ : ce--, st = void 0) : ve[1].type === "lineEndingBlank" ? ve[0] === "enter" && (We && !st && !ce && !at && (at = ue), st = void 0) : ve[1].type === "linePrefix" || ve[1].type === "listItemValue" || ve[1].type === "listItemMarker" || ve[1].type === "listItemPrefix" || ve[1].type === "listItemPrefixWhitespace" || (st = void 0), !ce && ve[0] === "enter" && ve[1].type === "listItemPrefix" || ce === -1 && ve[0] === "exit" && (ve[1].type === "listUnordered" || ve[1].type === "listOrdered")) { - if (We) { - let Ot = ue; - for (He = void 0; Ot--; ) { - const De = S[Ot]; + if (ve[1].type === "listUnordered" || ve[1].type === "listOrdered" || ve[1].type === "blockQuote" ? (ve[0] === "enter" ? ce++ : ce--, at = void 0) : ve[1].type === "lineEndingBlank" ? ve[0] === "enter" && (Ve && !at && !ce && !lt && (lt = ue), at = void 0) : ve[1].type === "linePrefix" || ve[1].type === "listItemValue" || ve[1].type === "listItemMarker" || ve[1].type === "listItemPrefix" || ve[1].type === "listItemPrefixWhitespace" || (at = void 0), !ce && ve[0] === "enter" && ve[1].type === "listItemPrefix" || ce === -1 && ve[0] === "exit" && (ve[1].type === "listUnordered" || ve[1].type === "listOrdered")) { + if (Ve) { + let Rt = ue; + for (He = void 0; Rt--; ) { + const De = S[Rt]; if (De[1].type === "lineEnding" || De[1].type === "lineEndingBlank") { if (De[0] === "exit") continue; - He && (S[He][1].type = "lineEndingBlank", je = !0), De[1].type = "lineEnding", He = Ot; + He && (S[He][1].type = "lineEndingBlank", je = !0), De[1].type = "lineEnding", He = Rt; } else if (!(De[1].type === "linePrefix" || De[1].type === "blockQuotePrefix" || De[1].type === "blockQuotePrefixWhitespace" || De[1].type === "blockQuoteMarker" || De[1].type === "listItemIndent")) break; } - at && (!He || at < He) && (We._spread = !0), We.end = Object.assign( + lt && (!He || lt < He) && (Ve._spread = !0), Ve.end = Object.assign( {}, He ? S[He][1].start : ve[1].end - ), S.splice(He || ue, 0, ["exit", We, ve[2]]), ue++, V++; + ), S.splice(He || ue, 0, ["exit", Ve, ve[2]]), ue++, V++; } - ve[1].type === "listItemPrefix" && (We = { + ve[1].type === "listItemPrefix" && (Ve = { type: "listItem", _spread: !1, start: Object.assign({}, ve[1].start), // @ts-expect-error: we’ll add `end` in a second. end: void 0 - }, S.splice(ue, 0, ["enter", We, ve[2]]), ue++, V++, at = void 0, st = !0); + }, S.splice(ue, 0, ["enter", Ve, ve[2]]), ue++, V++, lt = void 0, at = !0); } } return S[F][1]._spread = je, V; } function o(S, F) { - t[S] = F; + n[S] = F; } function l(S) { - return t[S]; + return n[S]; } function a(S, F) { return V; function V(ue) { - u.call(this, S(ue), ue), F && F.call(this, ue); + c.call(this, S(ue), ue), F && F.call(this, ue); } } function s() { @@ -9498,21 +9517,21 @@ function yf(e) { children: [] }); } - function u(S, F, V) { + function c(S, F, V) { return this.stack[this.stack.length - 1].children.push(S), this.stack.push(S), this.tokenStack.push([F, V]), S.position = { start: rt(F.start) }, S; } - function c(S) { + function f(S) { return F; function F(V) { - S && S.call(this, V), f.call(this, V); + S && S.call(this, V), u.call(this, V); } } - function f(S, F) { + function u(S, F) { const V = this.stack.pop(), ue = this.tokenStack.pop(); if (ue) - ue[0].type !== S.type && (F ? F.call(this, S, ue[0]) : (ue[1] || Bi).call(this, S, ue[0])); + ue[0].type !== S.type && (F ? F.call(this, S, ue[0]) : (ue[1] || Ui).call(this, S, ue[0])); else throw new Error( "Cannot close `" + S.type + "` (" + Dt({ @@ -9522,13 +9541,13 @@ function yf(e) { ); return V.position.end = rt(S.end), V; } - function m() { - return du(this.stack.pop()); + function d() { + return ku(this.stack.pop()); } function p() { o("expectingFirstListItemValue", !0); } - function d(S) { + function m(S) { if (l("expectingFirstListItemValue")) { const F = this.stack[this.stack.length - 2]; F.start = Number.parseInt(this.sliceSerialize(S), 10), o("expectingFirstListItemValue"); @@ -9545,11 +9564,11 @@ function yf(e) { function x() { l("flowCodeInside") || (this.buffer(), o("flowCodeInside", !0)); } - function P() { + function A() { const S = this.resume(), F = this.stack[this.stack.length - 1]; F.value = S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), o("flowCodeInside"); } - function T() { + function C() { const S = this.resume(), F = this.stack[this.stack.length - 1]; F.value = S.replace(/(\r?\n|\r)$/g, ""); } @@ -9602,7 +9621,7 @@ function yf(e) { V.position.end = rt(S.end), o("atHardBreak"); return; } - !l("setextHeadingSlurpLineEnding") && n.canContainEols.includes(F.type) && (_.call(this, S), z.call(this, S)); + !l("setextHeadingSlurpLineEnding") && t.canContainEols.includes(F.type) && (_.call(this, S), z.call(this, S)); } function Z() { o("atHardBreak", !0); @@ -9639,7 +9658,7 @@ function yf(e) { } function h(S) { const F = this.sliceSerialize(S), V = this.stack[this.stack.length - 2]; - V.label = df(F), V.identifier = kt(F).toLowerCase(); + V.label = kf(F), V.identifier = kt(F).toLowerCase(); } function I() { const S = this.stack[this.stack.length - 1], F = this.resume(), V = this.stack[this.stack.length - 1]; @@ -9675,7 +9694,7 @@ function yf(e) { function Y(S) { const F = this.sliceSerialize(S), V = l("characterReferenceType"); let ue; - V ? (ue = fl( + V ? (ue = hl( F, V === "characterReferenceMarkerNumeric" ? 10 : 16 ), o("characterReferenceType")) : ue = Pr(F); @@ -9745,7 +9764,7 @@ function yf(e) { value: "" }; } - function ht() { + function dt() { return { type: "image", title: null, @@ -9778,13 +9797,13 @@ function yf(e) { children: [] }; } - function Cn() { + function Sn() { return { type: "paragraph", children: [] }; } - function Tn() { + function Cn() { return { type: "strong", children: [] @@ -9809,53 +9828,53 @@ function rt(e) { offset: e.offset }; } -function hl(e, n) { - let t = -1; - for (; ++t < n.length; ) { - const r = n[t]; - Array.isArray(r) ? hl(e, r) : bf(e, r); +function ml(e, t) { + let n = -1; + for (; ++n < t.length; ) { + const r = t[n]; + Array.isArray(r) ? ml(e, r) : Ef(e, r); } } -function bf(e, n) { - let t; - for (t in n) - if (pl.call(n, t)) { - if (t === "canContainEols") { - const r = n[t]; - r && e[t].push(...r); - } else if (t === "transforms") { - const r = n[t]; - r && e[t].push(...r); - } else if (t === "enter" || t === "exit") { - const r = n[t]; - r && Object.assign(e[t], r); +function Ef(e, t) { + let n; + for (n in t) + if (dl.call(t, n)) { + if (n === "canContainEols") { + const r = t[n]; + r && e[n].push(...r); + } else if (n === "transforms") { + const r = t[n]; + r && e[n].push(...r); + } else if (n === "enter" || n === "exit") { + const r = t[n]; + r && Object.assign(e[n], r); } } } -function Bi(e, n) { +function Ui(e, t) { throw e ? new Error( "Cannot close `" + e.type + "` (" + Dt({ start: e.start, end: e.end - }) + "): a different token (`" + n.type + "`, " + Dt({ - start: n.start, - end: n.end + }) + "): a different token (`" + t.type + "`, " + Dt({ + start: t.start, + end: t.end }) + ") is open" ) : new Error( - "Cannot close document, a token (`" + n.type + "`, " + Dt({ - start: n.start, - end: n.end + "Cannot close document, a token (`" + t.type + "`, " + Dt({ + start: t.start, + end: t.end }) + ") is still open" ); } -function kf(e) { - Object.assign(this, { Parser: (t) => { +function Sf(e) { + Object.assign(this, { Parser: (n) => { const r = ( /** @type {Options} */ this.data("settings") ); - return gf( - t, + return wf( + n, Object.assign({}, r, e, { // Note: these options are not in the readme. // The goal is for them to be set by plugins on `data` instead of being @@ -9866,74 +9885,74 @@ function kf(e) { ); } }); } -function xf(e, n) { - const t = { +function Cf(e, t) { + const n = { type: "element", tagName: "blockquote", properties: {}, - children: e.wrap(e.all(n), !0) + children: e.wrap(e.all(t), !0) }; - return e.patch(n, t), e.applyData(n, t); + return e.patch(t, n), e.applyData(t, n); } -function wf(e, n) { - const t = { type: "element", tagName: "br", properties: {}, children: [] }; - return e.patch(n, t), [e.applyData(n, t), { type: "text", value: ` +function Tf(e, t) { + const n = { type: "element", tagName: "br", properties: {}, children: [] }; + return e.patch(t, n), [e.applyData(t, n), { type: "text", value: ` ` }]; } -function vf(e, n) { - const t = n.value ? n.value + ` -` : "", r = n.lang ? n.lang.match(/^[^ \t]+(?=[ \t]|$)/) : null, i = {}; +function Af(e, t) { + const n = t.value ? t.value + ` +` : "", r = t.lang ? t.lang.match(/^[^ \t]+(?=[ \t]|$)/) : null, i = {}; r && (i.className = ["language-" + r]); let o = { type: "element", tagName: "code", properties: i, - children: [{ type: "text", value: t }] + children: [{ type: "text", value: n }] }; - return n.meta && (o.data = { meta: n.meta }), e.patch(n, o), o = e.applyData(n, o), o = { type: "element", tagName: "pre", properties: {}, children: [o] }, e.patch(n, o), o; + return t.meta && (o.data = { meta: t.meta }), e.patch(t, o), o = e.applyData(t, o), o = { type: "element", tagName: "pre", properties: {}, children: [o] }, e.patch(t, o), o; } -function Ef(e, n) { - const t = { +function Pf(e, t) { + const n = { type: "element", tagName: "del", properties: {}, - children: e.all(n) + children: e.all(t) }; - return e.patch(n, t), e.applyData(n, t); + return e.patch(t, n), e.applyData(t, n); } -function Sf(e, n) { - const t = { +function Rf(e, t) { + const n = { type: "element", tagName: "em", properties: {}, - children: e.all(n) + children: e.all(t) }; - return e.patch(n, t), e.applyData(n, t); + return e.patch(t, n), e.applyData(t, n); } function Ct(e) { - const n = []; - let t = -1, r = 0, i = 0; - for (; ++t < e.length; ) { - const o = e.charCodeAt(t); + const t = []; + let n = -1, r = 0, i = 0; + for (; ++n < e.length; ) { + const o = e.charCodeAt(n); let l = ""; - if (o === 37 && Le(e.charCodeAt(t + 1)) && Le(e.charCodeAt(t + 2))) + if (o === 37 && Le(e.charCodeAt(n + 1)) && Le(e.charCodeAt(n + 2))) i = 2; else if (o < 128) /[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o)) || (l = String.fromCharCode(o)); else if (o > 55295 && o < 57344) { - const a = e.charCodeAt(t + 1); + const a = e.charCodeAt(n + 1); o < 56320 && a > 56319 && a < 57344 ? (l = String.fromCharCode(o, a), i = 1) : l = "�"; } else l = String.fromCharCode(o); - l && (n.push(e.slice(r, t), encodeURIComponent(l)), r = t + i + 1, l = ""), i && (t += i, i = 0); + l && (t.push(e.slice(r, n), encodeURIComponent(l)), r = n + i + 1, l = ""), i && (n += i, i = 0); } - return n.join("") + e.slice(r); + return t.join("") + e.slice(r); } -function dl(e, n) { - const t = String(n.identifier).toUpperCase(), r = Ct(t.toLowerCase()), i = e.footnoteOrder.indexOf(t); +function gl(e, t) { + const n = String(t.identifier).toUpperCase(), r = Ct(n.toLowerCase()), i = e.footnoteOrder.indexOf(n); let o; - i === -1 ? (e.footnoteOrder.push(t), e.footnoteCounts[t] = 1, o = e.footnoteOrder.length) : (e.footnoteCounts[t]++, o = i + 1); - const l = e.footnoteCounts[t], a = { + i === -1 ? (e.footnoteOrder.push(n), e.footnoteCounts[n] = 1, o = e.footnoteOrder.length) : (e.footnoteCounts[n]++, o = i + 1); + const l = e.footnoteCounts[n], a = { type: "element", tagName: "a", properties: { @@ -9944,196 +9963,196 @@ function dl(e, n) { }, children: [{ type: "text", value: String(o) }] }; - e.patch(n, a); + e.patch(t, a); const s = { type: "element", tagName: "sup", properties: {}, children: [a] }; - return e.patch(n, s), e.applyData(n, s); + return e.patch(t, s), e.applyData(t, s); } -function Cf(e, n) { - const t = e.footnoteById; +function Of(e, t) { + const n = e.footnoteById; let r = 1; - for (; r in t; ) + for (; r in n; ) r++; const i = String(r); - return t[i] = { + return n[i] = { type: "footnoteDefinition", identifier: i, - children: [{ type: "paragraph", children: n.children }], - position: n.position - }, dl(e, { + children: [{ type: "paragraph", children: t.children }], + position: t.position + }, gl(e, { type: "footnoteReference", identifier: i, - position: n.position + position: t.position }); } -function Tf(e, n) { - const t = { +function Ff(e, t) { + const n = { type: "element", - tagName: "h" + n.depth, + tagName: "h" + t.depth, properties: {}, - children: e.all(n) + children: e.all(t) }; - return e.patch(n, t), e.applyData(n, t); + return e.patch(t, n), e.applyData(t, n); } -function Af(e, n) { +function If(e, t) { if (e.dangerous) { - const t = { type: "raw", value: n.value }; - return e.patch(n, t), e.applyData(n, t); + const n = { type: "raw", value: t.value }; + return e.patch(t, n), e.applyData(t, n); } return null; } -function ml(e, n) { - const t = n.referenceType; +function yl(e, t) { + const n = t.referenceType; let r = "]"; - if (t === "collapsed" ? r += "[]" : t === "full" && (r += "[" + (n.label || n.identifier) + "]"), n.type === "imageReference") - return { type: "text", value: "![" + n.alt + r }; - const i = e.all(n), o = i[0]; + if (n === "collapsed" ? r += "[]" : n === "full" && (r += "[" + (t.label || t.identifier) + "]"), t.type === "imageReference") + return { type: "text", value: "![" + t.alt + r }; + const i = e.all(t), o = i[0]; o && o.type === "text" ? o.value = "[" + o.value : i.unshift({ type: "text", value: "[" }); const l = i[i.length - 1]; return l && l.type === "text" ? l.value += r : i.push({ type: "text", value: r }), i; } -function Pf(e, n) { - const t = e.definition(n.identifier); - if (!t) - return ml(e, n); - const r = { src: Ct(t.url || ""), alt: n.alt }; - t.title !== null && t.title !== void 0 && (r.title = t.title); +function _f(e, t) { + const n = e.definition(t.identifier); + if (!n) + return yl(e, t); + const r = { src: Ct(n.url || ""), alt: t.alt }; + n.title !== null && n.title !== void 0 && (r.title = n.title); const i = { type: "element", tagName: "img", properties: r, children: [] }; - return e.patch(n, i), e.applyData(n, i); + return e.patch(t, i), e.applyData(t, i); } -function Of(e, n) { - const t = { src: Ct(n.url) }; - n.alt !== null && n.alt !== void 0 && (t.alt = n.alt), n.title !== null && n.title !== void 0 && (t.title = n.title); - const r = { type: "element", tagName: "img", properties: t, children: [] }; - return e.patch(n, r), e.applyData(n, r); +function jf(e, t) { + const n = { src: Ct(t.url) }; + t.alt !== null && t.alt !== void 0 && (n.alt = t.alt), t.title !== null && t.title !== void 0 && (n.title = t.title); + const r = { type: "element", tagName: "img", properties: n, children: [] }; + return e.patch(t, r), e.applyData(t, r); } -function Rf(e, n) { - const t = { type: "text", value: n.value.replace(/\r?\n|\r/g, " ") }; - e.patch(n, t); +function Df(e, t) { + const n = { type: "text", value: t.value.replace(/\r?\n|\r/g, " ") }; + e.patch(t, n); const r = { type: "element", tagName: "code", properties: {}, - children: [t] + children: [n] }; - return e.patch(n, r), e.applyData(n, r); + return e.patch(t, r), e.applyData(t, r); } -function Ff(e, n) { - const t = e.definition(n.identifier); - if (!t) - return ml(e, n); - const r = { href: Ct(t.url || "") }; - t.title !== null && t.title !== void 0 && (r.title = t.title); +function zf(e, t) { + const n = e.definition(t.identifier); + if (!n) + return yl(e, t); + const r = { href: Ct(n.url || "") }; + n.title !== null && n.title !== void 0 && (r.title = n.title); const i = { type: "element", tagName: "a", properties: r, - children: e.all(n) + children: e.all(t) }; - return e.patch(n, i), e.applyData(n, i); + return e.patch(t, i), e.applyData(t, i); } -function If(e, n) { - const t = { href: Ct(n.url) }; - n.title !== null && n.title !== void 0 && (t.title = n.title); +function Lf(e, t) { + const n = { href: Ct(t.url) }; + t.title !== null && t.title !== void 0 && (n.title = t.title); const r = { type: "element", tagName: "a", - properties: t, - children: e.all(n) + properties: n, + children: e.all(t) }; - return e.patch(n, r), e.applyData(n, r); -} -function _f(e, n, t) { - const r = e.all(n), i = t ? jf(t) : gl(n), o = {}, l = []; - if (typeof n.checked == "boolean") { - const c = r[0]; - let f; - c && c.type === "element" && c.tagName === "p" ? f = c : (f = { type: "element", tagName: "p", properties: {}, children: [] }, r.unshift(f)), f.children.length > 0 && f.children.unshift({ type: "text", value: " " }), f.children.unshift({ + return e.patch(t, r), e.applyData(t, r); +} +function Nf(e, t, n) { + const r = e.all(t), i = n ? Mf(n) : bl(t), o = {}, l = []; + if (typeof t.checked == "boolean") { + const f = r[0]; + let u; + f && f.type === "element" && f.tagName === "p" ? u = f : (u = { type: "element", tagName: "p", properties: {}, children: [] }, r.unshift(u)), u.children.length > 0 && u.children.unshift({ type: "text", value: " " }), u.children.unshift({ type: "element", tagName: "input", - properties: { type: "checkbox", checked: n.checked, disabled: !0 }, + properties: { type: "checkbox", checked: t.checked, disabled: !0 }, children: [] }), o.className = ["task-list-item"]; } let a = -1; for (; ++a < r.length; ) { - const c = r[a]; - (i || a !== 0 || c.type !== "element" || c.tagName !== "p") && l.push({ type: "text", value: ` -` }), c.type === "element" && c.tagName === "p" && !i ? l.push(...c.children) : l.push(c); + const f = r[a]; + (i || a !== 0 || f.type !== "element" || f.tagName !== "p") && l.push({ type: "text", value: ` +` }), f.type === "element" && f.tagName === "p" && !i ? l.push(...f.children) : l.push(f); } const s = r[r.length - 1]; s && (i || s.type !== "element" || s.tagName !== "p") && l.push({ type: "text", value: ` ` }); - const u = { type: "element", tagName: "li", properties: o, children: l }; - return e.patch(n, u), e.applyData(n, u); + const c = { type: "element", tagName: "li", properties: o, children: l }; + return e.patch(t, c), e.applyData(t, c); } -function jf(e) { - let n = !1; +function Mf(e) { + let t = !1; if (e.type === "list") { - n = e.spread || !1; - const t = e.children; + t = e.spread || !1; + const n = e.children; let r = -1; - for (; !n && ++r < t.length; ) - n = gl(t[r]); + for (; !t && ++r < n.length; ) + t = bl(n[r]); } - return n; + return t; } -function gl(e) { - const n = e.spread; - return n ?? e.children.length > 1; +function bl(e) { + const t = e.spread; + return t ?? e.children.length > 1; } -function Df(e, n) { - const t = {}, r = e.all(n); +function $f(e, t) { + const n = {}, r = e.all(t); let i = -1; - for (typeof n.start == "number" && n.start !== 1 && (t.start = n.start); ++i < r.length; ) { + for (typeof t.start == "number" && t.start !== 1 && (n.start = t.start); ++i < r.length; ) { const l = r[i]; if (l.type === "element" && l.tagName === "li" && l.properties && Array.isArray(l.properties.className) && l.properties.className.includes("task-list-item")) { - t.className = ["contains-task-list"]; + n.className = ["contains-task-list"]; break; } } const o = { type: "element", - tagName: n.ordered ? "ol" : "ul", - properties: t, + tagName: t.ordered ? "ol" : "ul", + properties: n, children: e.wrap(r, !0) }; - return e.patch(n, o), e.applyData(n, o); + return e.patch(t, o), e.applyData(t, o); } -function zf(e, n) { - const t = { +function Bf(e, t) { + const n = { type: "element", tagName: "p", properties: {}, - children: e.all(n) + children: e.all(t) }; - return e.patch(n, t), e.applyData(n, t); + return e.patch(t, n), e.applyData(t, n); } -function Lf(e, n) { - const t = { type: "root", children: e.wrap(e.all(n)) }; - return e.patch(n, t), e.applyData(n, t); +function Uf(e, t) { + const n = { type: "root", children: e.wrap(e.all(t)) }; + return e.patch(t, n), e.applyData(t, n); } -function Nf(e, n) { - const t = { +function qf(e, t) { + const n = { type: "element", tagName: "strong", properties: {}, - children: e.all(n) + children: e.all(t) }; - return e.patch(n, t), e.applyData(n, t); + return e.patch(t, n), e.applyData(t, n); } -const Rr = yl("start"), Fr = yl("end"); -function Mf(e) { - return { start: Rr(e), end: Fr(e) }; +const Or = kl("start"), Fr = kl("end"); +function Hf(e) { + return { start: Or(e), end: Fr(e) }; } -function yl(e) { - return n; - function n(t) { - const r = t && t.position && t.position[e] || {}; +function kl(e) { + return t; + function t(n) { + const r = n && n.position && n.position[e] || {}; return { // @ts-expect-error: in practice, null is allowed. line: r.line || null, @@ -10144,8 +10163,8 @@ function yl(e) { }; } } -function $f(e, n) { - const t = e.all(n), r = t.shift(), i = []; +function Vf(e, t) { + const n = e.all(t), r = n.shift(), i = []; if (r) { const l = { type: "element", @@ -10153,15 +10172,15 @@ function $f(e, n) { properties: {}, children: e.wrap([r], !0) }; - e.patch(n.children[0], l), i.push(l); + e.patch(t.children[0], l), i.push(l); } - if (t.length > 0) { + if (n.length > 0) { const l = { type: "element", tagName: "tbody", properties: {}, - children: e.wrap(t, !0) - }, a = Rr(n.children[1]), s = Fr(n.children[n.children.length - 1]); + children: e.wrap(n, !0) + }, a = Or(t.children[1]), s = Fr(t.children[t.children.length - 1]); a.line && s.line && (l.position = { start: a, end: s }), i.push(l); } const o = { @@ -10170,100 +10189,100 @@ function $f(e, n) { properties: {}, children: e.wrap(i, !0) }; - return e.patch(n, o), e.applyData(n, o); + return e.patch(t, o), e.applyData(t, o); } -function Bf(e, n, t) { - const r = t ? t.children : void 0, o = (r ? r.indexOf(n) : 1) === 0 ? "th" : "td", l = t && t.type === "table" ? t.align : void 0, a = l ? l.length : n.children.length; +function Wf(e, t, n) { + const r = n ? n.children : void 0, o = (r ? r.indexOf(t) : 1) === 0 ? "th" : "td", l = n && n.type === "table" ? n.align : void 0, a = l ? l.length : t.children.length; let s = -1; - const u = []; + const c = []; for (; ++s < a; ) { - const f = n.children[s], m = {}, p = l ? l[s] : void 0; - p && (m.align = p); - let d = { type: "element", tagName: o, properties: m, children: [] }; - f && (d.children = e.all(f), e.patch(f, d), d = e.applyData(n, d)), u.push(d); + const u = t.children[s], d = {}, p = l ? l[s] : void 0; + p && (d.align = p); + let m = { type: "element", tagName: o, properties: d, children: [] }; + u && (m.children = e.all(u), e.patch(u, m), m = e.applyData(t, m)), c.push(m); } - const c = { + const f = { type: "element", tagName: "tr", properties: {}, - children: e.wrap(u, !0) + children: e.wrap(c, !0) }; - return e.patch(n, c), e.applyData(n, c); + return e.patch(t, f), e.applyData(t, f); } -function Uf(e, n) { - const t = { +function Yf(e, t) { + const n = { type: "element", tagName: "td", // Assume body cell. properties: {}, - children: e.all(n) + children: e.all(t) }; - return e.patch(n, t), e.applyData(n, t); + return e.patch(t, n), e.applyData(t, n); } -const Ui = 9, qi = 32; -function qf(e) { - const n = String(e), t = /\r?\n|\r/g; - let r = t.exec(n), i = 0; +const qi = 9, Hi = 32; +function Gf(e) { + const t = String(e), n = /\r?\n|\r/g; + let r = n.exec(t), i = 0; const o = []; for (; r; ) o.push( - Hi(n.slice(i, r.index), i > 0, !0), + Vi(t.slice(i, r.index), i > 0, !0), r[0] - ), i = r.index + r[0].length, r = t.exec(n); - return o.push(Hi(n.slice(i), i > 0, !1)), o.join(""); + ), i = r.index + r[0].length, r = n.exec(t); + return o.push(Vi(t.slice(i), i > 0, !1)), o.join(""); } -function Hi(e, n, t) { +function Vi(e, t, n) { let r = 0, i = e.length; - if (n) { + if (t) { let o = e.codePointAt(r); - for (; o === Ui || o === qi; ) + for (; o === qi || o === Hi; ) r++, o = e.codePointAt(r); } - if (t) { + if (n) { let o = e.codePointAt(i - 1); - for (; o === Ui || o === qi; ) + for (; o === qi || o === Hi; ) i--, o = e.codePointAt(i - 1); } return i > r ? e.slice(r, i) : ""; } -function Hf(e, n) { - const t = { type: "text", value: qf(String(n.value)) }; - return e.patch(n, t), e.applyData(n, t); +function Jf(e, t) { + const n = { type: "text", value: Gf(String(t.value)) }; + return e.patch(t, n), e.applyData(t, n); } -function Vf(e, n) { - const t = { +function Kf(e, t) { + const n = { type: "element", tagName: "hr", properties: {}, children: [] }; - return e.patch(n, t), e.applyData(n, t); -} -const Wf = { - blockquote: xf, - break: wf, - code: vf, - delete: Ef, - emphasis: Sf, - footnoteReference: dl, - footnote: Cf, - heading: Tf, - html: Af, - imageReference: Pf, - image: Of, - inlineCode: Rf, - linkReference: Ff, - link: If, - listItem: _f, - list: Df, - paragraph: zf, - root: Lf, - strong: Nf, - table: $f, - tableCell: Uf, - tableRow: Bf, - text: Hf, - thematicBreak: Vf, + return e.patch(t, n), e.applyData(t, n); +} +const Xf = { + blockquote: Cf, + break: Tf, + code: Af, + delete: Pf, + emphasis: Rf, + footnoteReference: gl, + footnote: Of, + heading: Ff, + html: If, + imageReference: _f, + image: jf, + inlineCode: Df, + linkReference: zf, + link: Lf, + listItem: Nf, + list: $f, + paragraph: Bf, + root: Uf, + strong: qf, + table: Vf, + tableCell: Yf, + tableRow: Wf, + text: Jf, + thematicBreak: Kf, toml: Qt, yaml: Qt, definition: Qt, @@ -10272,7 +10291,7 @@ const Wf = { function Qt() { return null; } -const bl = ( +const xl = ( /** * @type {( * ((test: PredicateTest) => AssertPredicate) & @@ -10285,56 +10304,56 @@ const bl = ( */ function(e) { if (e == null) - return Kf; + return tp; if (typeof e == "string") - return Jf(e); + return ep(e); if (typeof e == "object") - return Array.isArray(e) ? Yf(e) : Gf(e); + return Array.isArray(e) ? Qf(e) : Zf(e); if (typeof e == "function") - return wn(e); + return xn(e); throw new Error("Expected function, string, or object as test"); } ); -function Yf(e) { - const n = []; - let t = -1; - for (; ++t < e.length; ) - n[t] = bl(e[t]); - return wn(r); +function Qf(e) { + const t = []; + let n = -1; + for (; ++n < e.length; ) + t[n] = xl(e[n]); + return xn(r); function r(...i) { let o = -1; - for (; ++o < n.length; ) - if (n[o].call(this, ...i)) + for (; ++o < t.length; ) + if (t[o].call(this, ...i)) return !0; return !1; } } -function Gf(e) { - return wn(n); - function n(t) { +function Zf(e) { + return xn(t); + function t(n) { let r; for (r in e) - if (t[r] !== e[r]) + if (n[r] !== e[r]) return !1; return !0; } } -function Jf(e) { - return wn(n); - function n(t) { - return t && t.type === e; +function ep(e) { + return xn(t); + function t(n) { + return n && n.type === e; } } -function wn(e) { - return n; - function n(t, ...r) { - return !!(t && typeof t == "object" && "type" in t && e.call(this, t, ...r)); +function xn(e) { + return t; + function t(n, ...r) { + return !!(n && typeof n == "object" && "type" in n && e.call(this, n, ...r)); } } -function Kf() { +function tp() { return !0; } -const Xf = !0, Vi = !1, Qf = "skip", Zf = ( +const np = !0, Wi = !1, rp = "skip", ip = ( /** * @type {( * ((tree: Tree, test: Check, visitor: BuildVisitor, reverse?: boolean | null | undefined) => void) & @@ -10348,42 +10367,42 @@ const Xf = !0, Vi = !1, Qf = "skip", Zf = ( * @param {boolean | null | undefined} [reverse] * @returns {void} */ - function(e, n, t, r) { - typeof n == "function" && typeof t != "function" && (r = t, t = n, n = null); - const i = bl(n), o = r ? -1 : 1; + function(e, t, n, r) { + typeof t == "function" && typeof n != "function" && (r = n, n = t, t = null); + const i = xl(t), o = r ? -1 : 1; l(e, void 0, [])(); - function l(a, s, u) { - const c = a && typeof a == "object" ? a : {}; - if (typeof c.type == "string") { - const m = ( + function l(a, s, c) { + const f = a && typeof a == "object" ? a : {}; + if (typeof f.type == "string") { + const d = ( // `hast` - typeof c.tagName == "string" ? c.tagName : ( + typeof f.tagName == "string" ? f.tagName : ( // `xast` - typeof c.name == "string" ? c.name : void 0 + typeof f.name == "string" ? f.name : void 0 ) ); - Object.defineProperty(f, "name", { - value: "node (" + (a.type + (m ? "<" + m + ">" : "")) + ")" + Object.defineProperty(u, "name", { + value: "node (" + (a.type + (d ? "<" + d + ">" : "")) + ")" }); } - return f; - function f() { - let m = [], p, d, g; - if ((!n || i(a, s, u[u.length - 1] || null)) && (m = ep(t(a, u)), m[0] === Vi)) - return m; - if (a.children && m[0] !== Qf) - for (d = (r ? a.children.length : -1) + o, g = u.concat(a); d > -1 && d < a.children.length; ) { - if (p = l(a.children[d], d, g)(), p[0] === Vi) + return u; + function u() { + let d = [], p, m, g; + if ((!t || i(a, s, c[c.length - 1] || null)) && (d = op(n(a, c)), d[0] === Wi)) + return d; + if (a.children && d[0] !== rp) + for (m = (r ? a.children.length : -1) + o, g = c.concat(a); m > -1 && m < a.children.length; ) { + if (p = l(a.children[m], m, g)(), p[0] === Wi) return p; - d = typeof p[1] == "number" ? p[1] : d + o; + m = typeof p[1] == "number" ? p[1] : m + o; } - return m; + return d; } } } ); -function ep(e) { - return Array.isArray(e) ? e : typeof e == "number" ? [Xf, e] : [e]; +function op(e) { + return Array.isArray(e) ? e : typeof e == "number" ? [np, e] : [e]; } const Ir = ( /** @@ -10399,11 +10418,11 @@ const Ir = ( * @param {boolean | null | undefined} [reverse] * @returns {void} */ - function(e, n, t, r) { - typeof n == "function" && typeof t != "function" && (r = t, t = n, n = null), Zf(e, n, i, r); + function(e, t, n, r) { + typeof t == "function" && typeof n != "function" && (r = n, n = t, t = null), ip(e, t, i, r); function i(o, l) { const a = l[l.length - 1]; - return t( + return n( o, a ? a.children.indexOf(o) : null, a @@ -10411,137 +10430,137 @@ const Ir = ( } } ); -function tp(e) { +function lp(e) { return !e || !e.position || !e.position.start || !e.position.start.line || !e.position.start.column || !e.position.end || !e.position.end.line || !e.position.end.column; } -const Wi = {}.hasOwnProperty; -function np(e) { - const n = /* @__PURE__ */ Object.create(null); +const Yi = {}.hasOwnProperty; +function ap(e) { + const t = /* @__PURE__ */ Object.create(null); if (!e || !e.type) throw new Error("mdast-util-definitions expected node"); return Ir(e, "definition", (r) => { - const i = Yi(r.identifier); - i && !Wi.call(n, i) && (n[i] = r); - }), t; - function t(r) { - const i = Yi(r); - return i && Wi.call(n, i) ? n[i] : null; + const i = Gi(r.identifier); + i && !Yi.call(t, i) && (t[i] = r); + }), n; + function n(r) { + const i = Gi(r); + return i && Yi.call(t, i) ? t[i] : null; } } -function Yi(e) { +function Gi(e) { return String(e || "").toUpperCase(); } -const fn = {}.hasOwnProperty; -function rp(e, n) { - const t = n || {}, r = t.allowDangerousHtml || !1, i = {}; - return l.dangerous = r, l.clobberPrefix = t.clobberPrefix === void 0 || t.clobberPrefix === null ? "user-content-" : t.clobberPrefix, l.footnoteLabel = t.footnoteLabel || "Footnotes", l.footnoteLabelTagName = t.footnoteLabelTagName || "h2", l.footnoteLabelProperties = t.footnoteLabelProperties || { +const cn = {}.hasOwnProperty; +function sp(e, t) { + const n = t || {}, r = n.allowDangerousHtml || !1, i = {}; + return l.dangerous = r, l.clobberPrefix = n.clobberPrefix === void 0 || n.clobberPrefix === null ? "user-content-" : n.clobberPrefix, l.footnoteLabel = n.footnoteLabel || "Footnotes", l.footnoteLabelTagName = n.footnoteLabelTagName || "h2", l.footnoteLabelProperties = n.footnoteLabelProperties || { className: ["sr-only"] - }, l.footnoteBackLabel = t.footnoteBackLabel || "Back to content", l.unknownHandler = t.unknownHandler, l.passThrough = t.passThrough, l.handlers = { ...Wf, ...t.handlers }, l.definition = np(e), l.footnoteById = i, l.footnoteOrder = [], l.footnoteCounts = {}, l.patch = ip, l.applyData = op, l.one = a, l.all = s, l.wrap = ap, l.augment = o, Ir(e, "footnoteDefinition", (u) => { - const c = String(u.identifier).toUpperCase(); - fn.call(i, c) || (i[c] = u); + }, l.footnoteBackLabel = n.footnoteBackLabel || "Back to content", l.unknownHandler = n.unknownHandler, l.passThrough = n.passThrough, l.handlers = { ...Xf, ...n.handlers }, l.definition = ap(e), l.footnoteById = i, l.footnoteOrder = [], l.footnoteCounts = {}, l.patch = up, l.applyData = cp, l.one = a, l.all = s, l.wrap = pp, l.augment = o, Ir(e, "footnoteDefinition", (c) => { + const f = String(c.identifier).toUpperCase(); + cn.call(i, f) || (i[f] = c); }), l; - function o(u, c) { - if (u && "data" in u && u.data) { - const f = u.data; - f.hName && (c.type !== "element" && (c = { + function o(c, f) { + if (c && "data" in c && c.data) { + const u = c.data; + u.hName && (f.type !== "element" && (f = { type: "element", tagName: "", properties: {}, children: [] - }), c.tagName = f.hName), c.type === "element" && f.hProperties && (c.properties = { ...c.properties, ...f.hProperties }), "children" in c && c.children && f.hChildren && (c.children = f.hChildren); + }), f.tagName = u.hName), f.type === "element" && u.hProperties && (f.properties = { ...f.properties, ...u.hProperties }), "children" in f && f.children && u.hChildren && (f.children = u.hChildren); } - if (u) { - const f = "type" in u ? u : { position: u }; - tp(f) || (c.position = { start: Rr(f), end: Fr(f) }); + if (c) { + const u = "type" in c ? c : { position: c }; + lp(u) || (f.position = { start: Or(u), end: Fr(u) }); } - return c; + return f; } - function l(u, c, f, m) { - return Array.isArray(f) && (m = f, f = {}), o(u, { + function l(c, f, u, d) { + return Array.isArray(u) && (d = u, u = {}), o(c, { type: "element", - tagName: c, - properties: f || {}, - children: m || [] + tagName: f, + properties: u || {}, + children: d || [] }); } - function a(u, c) { - return kl(l, u, c); + function a(c, f) { + return wl(l, c, f); } - function s(u) { - return _r(l, u); + function s(c) { + return _r(l, c); } } -function ip(e, n) { - e.position && (n.position = Mf(e)); +function up(e, t) { + e.position && (t.position = Hf(e)); } -function op(e, n) { - let t = n; +function cp(e, t) { + let n = t; if (e && e.data) { const r = e.data.hName, i = e.data.hChildren, o = e.data.hProperties; - typeof r == "string" && (t.type === "element" ? t.tagName = r : t = { + typeof r == "string" && (n.type === "element" ? n.tagName = r : n = { type: "element", tagName: r, properties: {}, children: [] - }), t.type === "element" && o && (t.properties = { ...t.properties, ...o }), "children" in t && t.children && i !== null && i !== void 0 && (t.children = i); + }), n.type === "element" && o && (n.properties = { ...n.properties, ...o }), "children" in n && n.children && i !== null && i !== void 0 && (n.children = i); } - return t; + return n; } -function kl(e, n, t) { - const r = n && n.type; +function wl(e, t, n) { + const r = t && t.type; if (!r) - throw new Error("Expected node, got `" + n + "`"); - return fn.call(e.handlers, r) ? e.handlers[r](e, n, t) : e.passThrough && e.passThrough.includes(r) ? "children" in n ? { ...n, children: _r(e, n) } : n : e.unknownHandler ? e.unknownHandler(e, n, t) : lp(e, n); + throw new Error("Expected node, got `" + t + "`"); + return cn.call(e.handlers, r) ? e.handlers[r](e, t, n) : e.passThrough && e.passThrough.includes(r) ? "children" in t ? { ...t, children: _r(e, t) } : t : e.unknownHandler ? e.unknownHandler(e, t, n) : fp(e, t); } -function _r(e, n) { - const t = []; - if ("children" in n) { - const r = n.children; +function _r(e, t) { + const n = []; + if ("children" in t) { + const r = t.children; let i = -1; for (; ++i < r.length; ) { - const o = kl(e, r[i], n); + const o = wl(e, r[i], t); if (o) { if (i && r[i - 1].type === "break" && (!Array.isArray(o) && o.type === "text" && (o.value = o.value.replace(/^\s+/, "")), !Array.isArray(o) && o.type === "element")) { const l = o.children[0]; l && l.type === "text" && (l.value = l.value.replace(/^\s+/, "")); } - Array.isArray(o) ? t.push(...o) : t.push(o); + Array.isArray(o) ? n.push(...o) : n.push(o); } } } - return t; + return n; } -function lp(e, n) { - const t = n.data || {}, r = "value" in n && !(fn.call(t, "hProperties") || fn.call(t, "hChildren")) ? { type: "text", value: n.value } : { +function fp(e, t) { + const n = t.data || {}, r = "value" in t && !(cn.call(n, "hProperties") || cn.call(n, "hChildren")) ? { type: "text", value: t.value } : { type: "element", tagName: "div", properties: {}, - children: _r(e, n) + children: _r(e, t) }; - return e.patch(n, r), e.applyData(n, r); + return e.patch(t, r), e.applyData(t, r); } -function ap(e, n) { - const t = []; +function pp(e, t) { + const n = []; let r = -1; - for (n && t.push({ type: "text", value: ` + for (t && n.push({ type: "text", value: ` ` }); ++r < e.length; ) - r && t.push({ type: "text", value: ` -` }), t.push(e[r]); - return n && e.length > 0 && t.push({ type: "text", value: ` -` }), t; + r && n.push({ type: "text", value: ` +` }), n.push(e[r]); + return t && e.length > 0 && n.push({ type: "text", value: ` +` }), n; } -function sp(e) { - const n = []; - let t = -1; - for (; ++t < e.footnoteOrder.length; ) { - const r = e.footnoteById[e.footnoteOrder[t]]; +function hp(e) { + const t = []; + let n = -1; + for (; ++n < e.footnoteOrder.length; ) { + const r = e.footnoteById[e.footnoteOrder[n]]; if (!r) continue; const i = e.all(r), o = String(r.identifier).toUpperCase(), l = Ct(o.toLowerCase()); let a = 0; const s = []; for (; ++a <= e.footnoteCounts[o]; ) { - const f = { + const u = { type: "element", tagName: "a", properties: { @@ -10552,27 +10571,27 @@ function sp(e) { }, children: [{ type: "text", value: "↩" }] }; - a > 1 && f.children.push({ + a > 1 && u.children.push({ type: "element", tagName: "sup", children: [{ type: "text", value: String(a) }] - }), s.length > 0 && s.push({ type: "text", value: " " }), s.push(f); + }), s.length > 0 && s.push({ type: "text", value: " " }), s.push(u); } - const u = i[i.length - 1]; - if (u && u.type === "element" && u.tagName === "p") { - const f = u.children[u.children.length - 1]; - f && f.type === "text" ? f.value += " " : u.children.push({ type: "text", value: " " }), u.children.push(...s); + const c = i[i.length - 1]; + if (c && c.type === "element" && c.tagName === "p") { + const u = c.children[c.children.length - 1]; + u && u.type === "text" ? u.value += " " : c.children.push({ type: "text", value: " " }), c.children.push(...s); } else i.push(...s); - const c = { + const f = { type: "element", tagName: "li", properties: { id: e.clobberPrefix + "fn-" + l }, children: e.wrap(i, !0) }; - e.patch(r, c), n.push(c); + e.patch(r, f), t.push(f); } - if (n.length !== 0) + if (t.length !== 0) return { type: "element", tagName: "section", @@ -10594,33 +10613,33 @@ function sp(e) { type: "element", tagName: "ol", properties: {}, - children: e.wrap(n, !0) + children: e.wrap(t, !0) }, { type: "text", value: ` ` } ] }; } -function xl(e, n) { - const t = rp(e, n), r = t.one(e, null), i = sp(t); +function vl(e, t) { + const n = sp(e, t), r = n.one(e, null), i = hp(n); return i && r.children.push({ type: "text", value: ` ` }, i), Array.isArray(r) ? { type: "root", children: r } : r; } -const up = ( +const dp = ( /** @type {(import('unified').Plugin<[Processor, Options?]|[null|undefined, Options?]|[Options]|[], MdastRoot>)} */ - function(e, n) { - return e && "run" in e ? fp(e, n) : pp(e || n); + function(e, t) { + return e && "run" in e ? gp(e, t) : yp(e || t); } -), cp = up; -function fp(e, n) { - return (t, r, i) => { - e.run(xl(t, n), r, (o) => { +), mp = dp; +function gp(e, t) { + return (n, r, i) => { + e.run(vl(n, t), r, (o) => { i(o); }); }; } -function pp(e) { - return (n) => xl(n, e); +function yp(e) { + return (t) => vl(t, e); } var pr = { exports: {} }, Zt = { exports: {} }, he = {}; /** @license React v16.13.1 @@ -10631,30 +10650,30 @@ var pr = { exports: {} }, Zt = { exports: {} }, he = {}; * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -var Gi; -function hp() { - if (Gi) +var Ji; +function bp() { + if (Ji) return he; - Gi = 1; - var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, a = e ? Symbol.for("react.context") : 60110, s = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, c = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120, p = e ? Symbol.for("react.memo") : 60115, d = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, b = e ? Symbol.for("react.fundamental") : 60117, x = e ? Symbol.for("react.responder") : 60118, P = e ? Symbol.for("react.scope") : 60119; - function T(E) { + Ji = 1; + var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, a = e ? Symbol.for("react.context") : 60110, s = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, u = e ? Symbol.for("react.suspense") : 60113, d = e ? Symbol.for("react.suspense_list") : 60120, p = e ? Symbol.for("react.memo") : 60115, m = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, b = e ? Symbol.for("react.fundamental") : 60117, x = e ? Symbol.for("react.responder") : 60118, A = e ? Symbol.for("react.scope") : 60119; + function C(E) { if (typeof E == "object" && E !== null) { var w = E.$$typeof; switch (w) { - case n: + case t: switch (E = E.type, E) { case s: - case u: + case c: case r: case o: case i: - case f: + case u: return E; default: switch (E = E && E.$$typeof, E) { case a: - case c: - case d: + case f: + case m: case p: case l: return E; @@ -10662,41 +10681,41 @@ function hp() { return w; } } - case t: + case n: return w; } } } function j(E) { - return T(E) === u; + return C(E) === c; } - return he.AsyncMode = s, he.ConcurrentMode = u, he.ContextConsumer = a, he.ContextProvider = l, he.Element = n, he.ForwardRef = c, he.Fragment = r, he.Lazy = d, he.Memo = p, he.Portal = t, he.Profiler = o, he.StrictMode = i, he.Suspense = f, he.isAsyncMode = function(E) { - return j(E) || T(E) === s; + return he.AsyncMode = s, he.ConcurrentMode = c, he.ContextConsumer = a, he.ContextProvider = l, he.Element = t, he.ForwardRef = f, he.Fragment = r, he.Lazy = m, he.Memo = p, he.Portal = n, he.Profiler = o, he.StrictMode = i, he.Suspense = u, he.isAsyncMode = function(E) { + return j(E) || C(E) === s; }, he.isConcurrentMode = j, he.isContextConsumer = function(E) { - return T(E) === a; + return C(E) === a; }, he.isContextProvider = function(E) { - return T(E) === l; + return C(E) === l; }, he.isElement = function(E) { - return typeof E == "object" && E !== null && E.$$typeof === n; + return typeof E == "object" && E !== null && E.$$typeof === t; }, he.isForwardRef = function(E) { - return T(E) === c; + return C(E) === f; }, he.isFragment = function(E) { - return T(E) === r; + return C(E) === r; }, he.isLazy = function(E) { - return T(E) === d; + return C(E) === m; }, he.isMemo = function(E) { - return T(E) === p; + return C(E) === p; }, he.isPortal = function(E) { - return T(E) === t; + return C(E) === n; }, he.isProfiler = function(E) { - return T(E) === o; + return C(E) === o; }, he.isStrictMode = function(E) { - return T(E) === i; + return C(E) === i; }, he.isSuspense = function(E) { - return T(E) === f; + return C(E) === u; }, he.isValidElementType = function(E) { - return typeof E == "string" || typeof E == "function" || E === r || E === u || E === o || E === i || E === f || E === m || typeof E == "object" && E !== null && (E.$$typeof === d || E.$$typeof === p || E.$$typeof === l || E.$$typeof === a || E.$$typeof === c || E.$$typeof === b || E.$$typeof === x || E.$$typeof === P || E.$$typeof === g); - }, he.typeOf = T, he; + return typeof E == "string" || typeof E == "function" || E === r || E === c || E === o || E === i || E === u || E === d || typeof E == "object" && E !== null && (E.$$typeof === m || E.$$typeof === p || E.$$typeof === l || E.$$typeof === a || E.$$typeof === f || E.$$typeof === b || E.$$typeof === x || E.$$typeof === A || E.$$typeof === g); + }, he.typeOf = C, he; } var de = {}; /** @license React v16.13.1 @@ -10707,34 +10726,34 @@ var de = {}; * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -var Ji; -function dp() { - return Ji || (Ji = 1, process.env.NODE_ENV !== "production" && function() { - var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, a = e ? Symbol.for("react.context") : 60110, s = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, c = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120, p = e ? Symbol.for("react.memo") : 60115, d = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, b = e ? Symbol.for("react.fundamental") : 60117, x = e ? Symbol.for("react.responder") : 60118, P = e ? Symbol.for("react.scope") : 60119; - function T(D) { +var Ki; +function kp() { + return Ki || (Ki = 1, process.env.NODE_ENV !== "production" && function() { + var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, a = e ? Symbol.for("react.context") : 60110, s = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, u = e ? Symbol.for("react.suspense") : 60113, d = e ? Symbol.for("react.suspense_list") : 60120, p = e ? Symbol.for("react.memo") : 60115, m = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, b = e ? Symbol.for("react.fundamental") : 60117, x = e ? Symbol.for("react.responder") : 60118, A = e ? Symbol.for("react.scope") : 60119; + function C(D) { return typeof D == "string" || typeof D == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. - D === r || D === u || D === o || D === i || D === f || D === m || typeof D == "object" && D !== null && (D.$$typeof === d || D.$$typeof === p || D.$$typeof === l || D.$$typeof === a || D.$$typeof === c || D.$$typeof === b || D.$$typeof === x || D.$$typeof === P || D.$$typeof === g); + D === r || D === c || D === o || D === i || D === u || D === d || typeof D == "object" && D !== null && (D.$$typeof === m || D.$$typeof === p || D.$$typeof === l || D.$$typeof === a || D.$$typeof === f || D.$$typeof === b || D.$$typeof === x || D.$$typeof === A || D.$$typeof === g); } function j(D) { if (typeof D == "object" && D !== null) { var Pe = D.$$typeof; switch (Pe) { - case n: + case t: var $ = D.type; switch ($) { case s: - case u: + case c: case r: case o: case i: - case f: + case u: return $; default: var _e = $ && $.$$typeof; switch (_e) { case a: - case c: - case d: + case f: + case m: case p: case l: return _e; @@ -10742,17 +10761,17 @@ function dp() { return Pe; } } - case t: + case n: return Pe; } } } - var E = s, w = u, N = a, U = l, te = n, v = c, _ = r, z = d, Q = p, Z = t, G = o, q = i, oe = f, we = !1; + var E = s, w = c, N = a, U = l, te = t, v = f, _ = r, z = m, Q = p, Z = n, G = o, q = i, oe = u, we = !1; function ye(D) { return we || (we = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), h(D) || j(D) === s; } function h(D) { - return j(D) === u; + return j(D) === c; } function I(D) { return j(D) === a; @@ -10761,22 +10780,22 @@ function dp() { return j(D) === l; } function y(D) { - return typeof D == "object" && D !== null && D.$$typeof === n; + return typeof D == "object" && D !== null && D.$$typeof === t; } function B(D) { - return j(D) === c; + return j(D) === f; } function ne(D) { return j(D) === r; } function M(D) { - return j(D) === d; + return j(D) === m; } function W(D) { return j(D) === p; } function Y(D) { - return j(D) === t; + return j(D) === n; } function re(D) { return j(D) === o; @@ -10785,26 +10804,26 @@ function dp() { return j(D) === i; } function Ee(D) { - return j(D) === f; + return j(D) === u; } - de.AsyncMode = E, de.ConcurrentMode = w, de.ContextConsumer = N, de.ContextProvider = U, de.Element = te, de.ForwardRef = v, de.Fragment = _, de.Lazy = z, de.Memo = Q, de.Portal = Z, de.Profiler = G, de.StrictMode = q, de.Suspense = oe, de.isAsyncMode = ye, de.isConcurrentMode = h, de.isContextConsumer = I, de.isContextProvider = H, de.isElement = y, de.isForwardRef = B, de.isFragment = ne, de.isLazy = M, de.isMemo = W, de.isPortal = Y, de.isProfiler = re, de.isStrictMode = K, de.isSuspense = Ee, de.isValidElementType = T, de.typeOf = j; + de.AsyncMode = E, de.ConcurrentMode = w, de.ContextConsumer = N, de.ContextProvider = U, de.Element = te, de.ForwardRef = v, de.Fragment = _, de.Lazy = z, de.Memo = Q, de.Portal = Z, de.Profiler = G, de.StrictMode = q, de.Suspense = oe, de.isAsyncMode = ye, de.isConcurrentMode = h, de.isContextConsumer = I, de.isContextProvider = H, de.isElement = y, de.isForwardRef = B, de.isFragment = ne, de.isLazy = M, de.isMemo = W, de.isPortal = Y, de.isProfiler = re, de.isStrictMode = K, de.isSuspense = Ee, de.isValidElementType = C, de.typeOf = j; }()), de; } -var Ki; -function wl() { - return Ki || (Ki = 1, process.env.NODE_ENV === "production" ? Zt.exports = hp() : Zt.exports = dp()), Zt.exports; +var Xi; +function El() { + return Xi || (Xi = 1, process.env.NODE_ENV === "production" ? Zt.exports = bp() : Zt.exports = kp()), Zt.exports; } /* object-assign (c) Sindre Sorhus @license MIT */ -var Un, Xi; -function mp() { - if (Xi) - return Un; - Xi = 1; - var e = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable; +var Bn, Qi; +function xp() { + if (Qi) + return Bn; + Qi = 1; + var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable; function r(o) { if (o == null) throw new TypeError("Object.assign cannot be called with null or undefined"); @@ -10819,54 +10838,54 @@ function mp() { return !1; for (var l = {}, a = 0; a < 10; a++) l["_" + String.fromCharCode(a)] = a; - var s = Object.getOwnPropertyNames(l).map(function(c) { - return l[c]; + var s = Object.getOwnPropertyNames(l).map(function(f) { + return l[f]; }); if (s.join("") !== "0123456789") return !1; - var u = {}; - return "abcdefghijklmnopqrst".split("").forEach(function(c) { - u[c] = c; - }), Object.keys(Object.assign({}, u)).join("") === "abcdefghijklmnopqrst"; + var c = {}; + return "abcdefghijklmnopqrst".split("").forEach(function(f) { + c[f] = f; + }), Object.keys(Object.assign({}, c)).join("") === "abcdefghijklmnopqrst"; } catch { return !1; } } - return Un = i() ? Object.assign : function(o, l) { - for (var a, s = r(o), u, c = 1; c < arguments.length; c++) { - a = Object(arguments[c]); - for (var f in a) - n.call(a, f) && (s[f] = a[f]); + return Bn = i() ? Object.assign : function(o, l) { + for (var a, s = r(o), c, f = 1; f < arguments.length; f++) { + a = Object(arguments[f]); + for (var u in a) + t.call(a, u) && (s[u] = a[u]); if (e) { - u = e(a); - for (var m = 0; m < u.length; m++) - t.call(a, u[m]) && (s[u[m]] = a[u[m]]); + c = e(a); + for (var d = 0; d < c.length; d++) + n.call(a, c[d]) && (s[c[d]] = a[c[d]]); } } return s; - }, Un; + }, Bn; } -var qn, Qi; +var Un, Zi; function jr() { - if (Qi) - return qn; - Qi = 1; + if (Zi) + return Un; + Zi = 1; var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; - return qn = e, qn; + return Un = e, Un; } -var Hn, Zi; -function vl() { - return Zi || (Zi = 1, Hn = Function.call.bind(Object.prototype.hasOwnProperty)), Hn; +var qn, eo; +function Sl() { + return eo || (eo = 1, qn = Function.call.bind(Object.prototype.hasOwnProperty)), qn; } -var Vn, eo; -function gp() { - if (eo) - return Vn; - eo = 1; +var Hn, to; +function wp() { + if (to) + return Hn; + to = 1; var e = function() { }; if (process.env.NODE_ENV !== "production") { - var n = jr(), t = {}, r = vl(); + var t = jr(), n = {}, r = Sl(); e = function(o) { var l = "Warning: " + o; typeof console < "u" && console.error(l); @@ -10876,44 +10895,44 @@ function gp() { } }; } - function i(o, l, a, s, u) { + function i(o, l, a, s, c) { if (process.env.NODE_ENV !== "production") { - for (var c in o) - if (r(o, c)) { - var f; + for (var f in o) + if (r(o, f)) { + var u; try { - if (typeof o[c] != "function") { - var m = Error( - (s || "React class") + ": " + a + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." + if (typeof o[f] != "function") { + var d = Error( + (s || "React class") + ": " + a + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." ); - throw m.name = "Invariant Violation", m; + throw d.name = "Invariant Violation", d; } - f = o[c](l, c, s, a, null, n); - } catch (d) { - f = d; + u = o[f](l, f, s, a, null, t); + } catch (m) { + u = m; } - if (f && !(f instanceof Error) && e( - (s || "React class") + ": type specification of " + a + " `" + c + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof f + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." - ), f instanceof Error && !(f.message in t)) { - t[f.message] = !0; - var p = u ? u() : ""; + if (u && !(u instanceof Error) && e( + (s || "React class") + ": type specification of " + a + " `" + f + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." + ), u instanceof Error && !(u.message in n)) { + n[u.message] = !0; + var p = c ? c() : ""; e( - "Failed " + a + " type: " + f.message + (p ?? "") + "Failed " + a + " type: " + u.message + (p ?? "") ); } } } } return i.resetWarningCache = function() { - process.env.NODE_ENV !== "production" && (t = {}); - }, Vn = i, Vn; + process.env.NODE_ENV !== "production" && (n = {}); + }, Hn = i, Hn; } -var Wn, to; -function yp() { - if (to) - return Wn; - to = 1; - var e = wl(), n = mp(), t = jr(), r = vl(), i = gp(), o = function() { +var Vn, no; +function vp() { + if (no) + return Vn; + no = 1; + var e = El(), t = xp(), n = jr(), r = Sl(), i = wp(), o = function() { }; process.env.NODE_ENV !== "production" && (o = function(a) { var s = "Warning: " + a; @@ -10926,14 +10945,14 @@ function yp() { function l() { return null; } - return Wn = function(a, s) { - var u = typeof Symbol == "function" && Symbol.iterator, c = "@@iterator"; - function f(h) { - var I = h && (u && h[u] || h[c]); + return Vn = function(a, s) { + var c = typeof Symbol == "function" && Symbol.iterator, f = "@@iterator"; + function u(h) { + var I = h && (c && h[c] || h[f]); if (typeof I == "function") return I; } - var m = "<>", p = { + var d = "<>", p = { array: x("array"), bigint: x("bigint"), bool: x("boolean"), @@ -10942,8 +10961,8 @@ function yp() { object: x("object"), string: x("string"), symbol: x("symbol"), - any: P(), - arrayOf: T, + any: A(), + arrayOf: C, element: j(), elementType: E(), instanceOf: w, @@ -10954,7 +10973,7 @@ function yp() { shape: z, exact: Q }; - function d(h, I) { + function m(h, I) { return h === I ? h !== 0 || 1 / h === 1 / I : h !== h && I !== I; } function g(h, I) { @@ -10965,7 +10984,7 @@ function yp() { if (process.env.NODE_ENV !== "production") var I = {}, H = 0; function y(ne, M, W, Y, re, K, Ee) { - if (Y = Y || m, K = K || W, Ee !== t) { + if (Y = Y || d, K = K || W, Ee !== n) { if (s) { var D = new Error( "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types" @@ -10998,10 +11017,10 @@ function yp() { } return b(I); } - function P() { + function A() { return b(l); } - function T(h) { + function C(h) { function I(H, y, B, ne, M) { if (typeof h != "function") return new g("Property `" + M + "` of component `" + B + "` has invalid PropType notation inside arrayOf."); @@ -11011,7 +11030,7 @@ function yp() { return new g("Invalid " + ne + " `" + M + "` of type " + ("`" + Y + "` supplied to `" + B + "`, expected an array.")); } for (var re = 0; re < W.length; re++) { - var K = h(W, re, B, ne, M + "[" + re + "]", t); + var K = h(W, re, B, ne, M + "[" + re + "]", n); if (K instanceof Error) return K; } @@ -11044,7 +11063,7 @@ function yp() { function w(h) { function I(H, y, B, ne, M) { if (!(H[y] instanceof h)) { - var W = h.name || m, Y = ye(H[y]); + var W = h.name || d, Y = ye(H[y]); return new g("Invalid " + ne + " `" + M + "` of type " + ("`" + Y + "` supplied to `" + B + "`, expected ") + ("instance of `" + W + "`.")); } return null; @@ -11058,7 +11077,7 @@ function yp() { ) : o("Invalid argument supplied to oneOf, expected an array.")), l; function I(H, y, B, ne, M) { for (var W = H[y], Y = 0; Y < h.length; Y++) - if (d(W, h[Y])) + if (m(W, h[Y])) return null; var re = JSON.stringify(h, function(Ee, D) { var Pe = oe(D); @@ -11077,7 +11096,7 @@ function yp() { return new g("Invalid " + ne + " `" + M + "` of type " + ("`" + Y + "` supplied to `" + B + "`, expected an object.")); for (var re in W) if (r(W, re)) { - var K = h(W, re, B, ne, M + "." + re, t); + var K = h(W, re, B, ne, M + "." + re, n); if (K instanceof Error) return K; } @@ -11097,7 +11116,7 @@ function yp() { } function y(B, ne, M, W, Y) { for (var re = [], K = 0; K < h.length; K++) { - var Ee = h[K], D = Ee(B, ne, M, W, Y, t); + var Ee = h[K], D = Ee(B, ne, M, W, Y, n); if (D == null) return null; D.data && r(D.data, "expectedType") && re.push(D.data.expectedType); @@ -11127,7 +11146,7 @@ function yp() { var K = h[re]; if (typeof K != "function") return _(B, ne, M, re, oe(K)); - var Ee = K(W, re, B, ne, M + "." + re, t); + var Ee = K(W, re, B, ne, M + "." + re, n); if (Ee) return Ee; } @@ -11140,7 +11159,7 @@ function yp() { var W = H[y], Y = q(W); if (Y !== "object") return new g("Invalid " + ne + " `" + M + "` of type `" + Y + "` " + ("supplied to `" + B + "`, expected `object`.")); - var re = n({}, H[y], h); + var re = t({}, H[y], h); for (var K in re) { var Ee = h[K]; if (r(h, K) && typeof Ee != "function") @@ -11150,7 +11169,7 @@ function yp() { "Invalid " + ne + " `" + M + "` key `" + K + "` supplied to `" + B + "`.\nBad object: " + JSON.stringify(H[y], null, " ") + ` Valid keys: ` + JSON.stringify(Object.keys(h), null, " ") ); - var D = Ee(W, K, B, ne, M + "." + K, t); + var D = Ee(W, K, B, ne, M + "." + K, n); if (D) return D; } @@ -11171,7 +11190,7 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ") return h.every(Z); if (h === null || a(h)) return !0; - var I = f(h); + var I = u(h); if (I) { var H = I.call(h), y; if (I !== h.entries) { @@ -11225,28 +11244,28 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ") } } function ye(h) { - return !h.constructor || !h.constructor.name ? m : h.constructor.name; + return !h.constructor || !h.constructor.name ? d : h.constructor.name; } return p.checkPropTypes = i, p.resetWarningCache = i.resetWarningCache, p.PropTypes = p, p; - }, Wn; + }, Vn; } -var Yn, no; -function bp() { - if (no) - return Yn; - no = 1; +var Wn, ro; +function Ep() { + if (ro) + return Wn; + ro = 1; var e = jr(); - function n() { - } function t() { } - return t.resetWarningCache = n, Yn = function() { - function r(l, a, s, u, c, f) { - if (f !== e) { - var m = new Error( + function n() { + } + return n.resetWarningCache = t, Wn = function() { + function r(l, a, s, c, f, u) { + if (u !== e) { + var d = new Error( "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types" ); - throw m.name = "Invariant Violation", m; + throw d.name = "Invariant Violation", d; } } r.isRequired = r; @@ -11273,19 +11292,19 @@ function bp() { oneOfType: i, shape: i, exact: i, - checkPropTypes: t, - resetWarningCache: n + checkPropTypes: n, + resetWarningCache: t }; return o.PropTypes = o, o; - }, Yn; + }, Wn; } if (process.env.NODE_ENV !== "production") { - var kp = wl(), xp = !0; - pr.exports = yp()(kp.isElement, xp); + var Sp = El(), Cp = !0; + pr.exports = vp()(Sp.isElement, Cp); } else - pr.exports = bp()(); -var wp = pr.exports; -const ee = /* @__PURE__ */ Bt(wp); + pr.exports = Ep()(); +var Tp = pr.exports; +const ee = /* @__PURE__ */ Bt(Tp); class Vt { /** * @constructor @@ -11293,19 +11312,19 @@ class Vt { * @param {Normal} normal * @param {string} [space] */ - constructor(n, t, r) { - this.property = n, this.normal = t, r && (this.space = r); + constructor(t, n, r) { + this.property = t, this.normal = n, r && (this.space = r); } } Vt.prototype.property = {}; Vt.prototype.normal = {}; Vt.prototype.space = null; -function El(e, n) { - const t = {}, r = {}; +function Cl(e, t) { + const n = {}, r = {}; let i = -1; for (; ++i < e.length; ) - Object.assign(t, e[i].property), Object.assign(r, e[i].normal); - return new Vt(t, r, n); + Object.assign(n, e[i].property), Object.assign(r, e[i].normal); + return new Vt(n, r, t); } function hr(e) { return e.toLowerCase(); @@ -11316,8 +11335,8 @@ class qe { * @param {string} property * @param {string} attribute */ - constructor(n, t) { - this.property = n, this.attribute = t; + constructor(t, n) { + this.property = t, this.attribute = n; } } qe.prototype.space = null; @@ -11330,10 +11349,10 @@ qe.prototype.spaceSeparated = !1; qe.prototype.commaOrSpaceSeparated = !1; qe.prototype.mustUseProperty = !1; qe.prototype.defined = !1; -let vp = 0; -const ie = pt(), Te = pt(), Sl = pt(), R = pt(), ke = pt(), xt = pt(), ze = pt(); -function pt() { - return 2 ** ++vp; +let Ap = 0; +const ie = ht(), Te = ht(), Tl = ht(), O = ht(), ke = ht(), xt = ht(), ze = ht(); +function ht() { + return 2 ** ++Ap; } const dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, @@ -11341,10 +11360,10 @@ const dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ booleanish: Te, commaOrSpaceSeparated: ze, commaSeparated: xt, - number: R, - overloadedBoolean: Sl, + number: O, + overloadedBoolean: Tl, spaceSeparated: ke -}, Symbol.toStringTag, { value: "Module" })), Gn = Object.keys(dr); +}, Symbol.toStringTag, { value: "Module" })), Yn = Object.keys(dr); class Dr extends qe { /** * @constructor @@ -11353,39 +11372,39 @@ class Dr extends qe { * @param {number|null} [mask] * @param {string} [space] */ - constructor(n, t, r, i) { + constructor(t, n, r, i) { let o = -1; - if (super(n, t), ro(this, "space", i), typeof r == "number") - for (; ++o < Gn.length; ) { - const l = Gn[o]; - ro(this, Gn[o], (r & dr[l]) === dr[l]); + if (super(t, n), io(this, "space", i), typeof r == "number") + for (; ++o < Yn.length; ) { + const l = Yn[o]; + io(this, Yn[o], (r & dr[l]) === dr[l]); } } } Dr.prototype.defined = !0; -function ro(e, n, t) { - t && (e[n] = t); +function io(e, t, n) { + n && (e[t] = n); } -const Ep = {}.hasOwnProperty; +const Pp = {}.hasOwnProperty; function Tt(e) { - const n = {}, t = {}; + const t = {}, n = {}; let r; for (r in e.properties) - if (Ep.call(e.properties, r)) { + if (Pp.call(e.properties, r)) { const i = e.properties[r], o = new Dr( r, e.transform(e.attributes || {}, r), i, e.space ); - e.mustUseProperty && e.mustUseProperty.includes(r) && (o.mustUseProperty = !0), n[r] = o, t[hr(r)] = r, t[hr(o.attribute)] = r; + e.mustUseProperty && e.mustUseProperty.includes(r) && (o.mustUseProperty = !0), t[r] = o, n[hr(r)] = r, n[hr(o.attribute)] = r; } - return new Vt(n, t, e.space); + return new Vt(t, n, e.space); } -const Cl = Tt({ +const Al = Tt({ space: "xlink", - transform(e, n) { - return "xlink:" + n.slice(5).toLowerCase(); + transform(e, t) { + return "xlink:" + t.slice(5).toLowerCase(); }, properties: { xLinkActuate: null, @@ -11396,27 +11415,27 @@ const Cl = Tt({ xLinkTitle: null, xLinkType: null } -}), Tl = Tt({ +}), Pl = Tt({ space: "xml", - transform(e, n) { - return "xml:" + n.slice(3).toLowerCase(); + transform(e, t) { + return "xml:" + t.slice(3).toLowerCase(); }, properties: { xmlLang: null, xmlBase: null, xmlSpace: null } }); -function Al(e, n) { - return n in e ? e[n] : n; +function Rl(e, t) { + return t in e ? e[t] : t; } -function Pl(e, n) { - return Al(e, n.toLowerCase()); +function Ol(e, t) { + return Rl(e, t.toLowerCase()); } -const Ol = Tt({ +const Fl = Tt({ space: "xmlns", attributes: { xmlnsxlink: "xmlns:xlink" }, - transform: Pl, + transform: Ol, properties: { xmlns: null, xmlnsXLink: null } -}), Rl = Tt({ - transform(e, n) { - return n === "role" ? n : "aria-" + n.slice(4).toLowerCase(); +}), Il = Tt({ + transform(e, t) { + return t === "role" ? t : "aria-" + t.slice(4).toLowerCase(); }, properties: { ariaActiveDescendant: null, @@ -11424,9 +11443,9 @@ const Ol = Tt({ ariaAutoComplete: null, ariaBusy: Te, ariaChecked: Te, - ariaColCount: R, - ariaColIndex: R, - ariaColSpan: R, + ariaColCount: O, + ariaColIndex: O, + ariaColSpan: O, ariaControls: ke, ariaCurrent: null, ariaDescribedBy: ke, @@ -11443,7 +11462,7 @@ const Ol = Tt({ ariaKeyShortcuts: null, ariaLabel: null, ariaLabelledBy: ke, - ariaLevel: R, + ariaLevel: O, ariaLive: null, ariaModal: Te, ariaMultiLine: Te, @@ -11451,25 +11470,25 @@ const Ol = Tt({ ariaOrientation: null, ariaOwns: ke, ariaPlaceholder: null, - ariaPosInSet: R, + ariaPosInSet: O, ariaPressed: Te, ariaReadOnly: Te, ariaRelevant: null, ariaRequired: Te, ariaRoleDescription: ke, - ariaRowCount: R, - ariaRowIndex: R, - ariaRowSpan: R, + ariaRowCount: O, + ariaRowIndex: O, + ariaRowSpan: O, ariaSelected: Te, - ariaSetSize: R, + ariaSetSize: O, ariaSort: null, - ariaValueMax: R, - ariaValueMin: R, - ariaValueNow: R, + ariaValueMax: O, + ariaValueMin: O, + ariaValueNow: O, ariaValueText: null, role: null } -}), Sp = Tt({ +}), Rp = Tt({ space: "html", attributes: { acceptcharset: "accept-charset", @@ -11477,7 +11496,7 @@ const Ol = Tt({ htmlfor: "for", httpequiv: "http-equiv" }, - transform: Pl, + transform: Ol, mustUseProperty: ["checked", "multiple", "muted", "selected"], properties: { // Standard Properties. @@ -11503,13 +11522,13 @@ const Ol = Tt({ checked: ie, cite: null, className: ke, - cols: R, + cols: O, colSpan: null, content: null, contentEditable: Te, controls: ie, controlsList: ke, - coords: R | xt, + coords: O | xt, crossOrigin: null, data: null, dateTime: null, @@ -11519,7 +11538,7 @@ const Ol = Tt({ dir: null, dirName: null, disabled: ie, - download: Sl, + download: Tl, draggable: Te, encType: null, enterKeyHint: null, @@ -11531,9 +11550,9 @@ const Ol = Tt({ formNoValidate: ie, formTarget: null, headers: ke, - height: R, + height: O, hidden: ie, - high: R, + high: O, href: null, hrefLang: null, htmlFor: ke, @@ -11558,14 +11577,14 @@ const Ol = Tt({ list: null, loading: null, loop: ie, - low: R, + low: O, manifest: null, max: null, - maxLength: R, + maxLength: O, media: null, method: null, min: null, - minLength: R, + minLength: O, multiple: ie, muted: ie, name: null, @@ -11660,7 +11679,7 @@ const Ol = Tt({ onWaiting: null, onWheel: null, open: ie, - optimum: R, + optimum: O, pattern: null, ping: ke, placeholder: null, @@ -11675,27 +11694,27 @@ const Ol = Tt({ rel: ke, required: ie, reversed: ie, - rows: R, - rowSpan: R, + rows: O, + rowSpan: O, sandbox: ke, scope: null, scoped: ie, seamless: ie, selected: ie, shape: null, - size: R, + size: O, sizes: null, slot: null, - span: R, + span: O, spellCheck: Te, src: null, srcDoc: null, srcLang: null, srcSet: null, - start: R, + start: O, step: null, style: null, - tabIndex: R, + tabIndex: O, target: null, title: null, translate: null, @@ -11703,7 +11722,7 @@ const Ol = Tt({ typeMustMatch: ie, useMap: null, value: Te, - width: R, + width: O, wrap: null, // Legacy. // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis @@ -11719,11 +11738,11 @@ const Ol = Tt({ // ``. Use CSS `background-image` instead bgColor: null, // `` and table elements. Use CSS `background-color` instead - border: R, + border: O, // ``. Use CSS `border-width` instead, borderColor: null, // `
`. Use CSS `border-color` instead, - bottomMargin: R, + bottomMargin: O, // `` cellPadding: null, // `
` @@ -11757,9 +11776,9 @@ const Ol = Tt({ // `
` frameBorder: null, // `