import { g as ci } from "./chunk-CGD3Ka0J.js";
import { c as ke } from "./chunk-vVYLWEJE.js";
function fi(r, e) {
  for (var t = 0; t < e.length; t++) {
    const a = e[t];
    if (typeof a != "string" && !Array.isArray(a)) {
      for (const i in a)
        if (i !== "default" && !(i in r)) {
          const n = Object.getOwnPropertyDescriptor(a, i);
          n && Object.defineProperty(r, i, n.get ? n : {
            enumerable: !0,
            get: () => a[i]
          });
        }
    }
  }
  return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
}
const Ht = (() => {
  if (typeof self > "u") return !1;
  if (!("top" in self && self !== top)) {
    if ("showOpenFilePicker" in self) return "showOpenFilePicker";
  }
  return !1;
})(), mi = Ht ? Promise.resolve().then(() => Ai) : Promise.resolve().then(() => bi);
async function Qs(...r) {
  return (await mi).default(...r);
}
Ht ? Promise.resolve().then(() => wi) : Promise.resolve().then(() => Ii);
const di = Ht ? Promise.resolve().then(() => ki) : Promise.resolve().then(() => Ci);
async function Os(...r) {
  return (await di).default(...r);
}
const pi = async (r) => {
  const e = await r.getFile();
  return e.handle = r, e;
};
var vi = async (r = [{}]) => {
  Array.isArray(r) || (r = [r]);
  const e = [];
  r.forEach((i, n) => {
    e[n] = { description: i.description || "", accept: {} }, i.mimeTypes ? i.mimeTypes.map((o) => {
      e[n].accept[o] = i.extensions || [];
    }) : e[n].accept["*/*"] = i.extensions || [];
  });
  const t = await window.showOpenFilePicker({ id: r[0].id, startIn: r[0].startIn, types: e, multiple: r[0].multiple || !1, excludeAcceptAllOption: r[0].excludeAcceptAllOption || !1 }), a = await Promise.all(t.map(pi));
  return r[0].multiple ? a : a[0];
};
const Ai = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: vi
}, Symbol.toStringTag, { value: "Module" }));
var gi = async (r = [{}]) => (Array.isArray(r) || (r = [r]), new Promise((e, t) => {
  const a = document.createElement("input");
  a.type = "file";
  const i = [...r.map((l) => l.mimeTypes || []), ...r.map((l) => l.extensions || [])].join();
  a.multiple = r[0].multiple || !1, a.accept = i || "";
  const n = (l) => {
    typeof o == "function" && o(), e(l);
  }, o = r[0].legacySetup && r[0].legacySetup(n, () => o(t), a);
  a.addEventListener("change", () => {
    n(a.multiple ? Array.from(a.files) : a.files[0]);
  }), a.click();
}));
const bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: gi
}, Symbol.toStringTag, { value: "Module" }));
function Re(r) {
  function e(t) {
    if (Object(t) !== t) return Promise.reject(new TypeError(t + " is not an object."));
    var a = t.done;
    return Promise.resolve(t.value).then(function(i) {
      return { value: i, done: a };
    });
  }
  return Re = function(t) {
    this.s = t, this.n = t.next;
  }, Re.prototype = { s: null, n: null, next: function() {
    return e(this.n.apply(this.s, arguments));
  }, return: function(t) {
    var a = this.s.return;
    return a === void 0 ? Promise.resolve({ value: t, done: !0 }) : e(a.apply(this.s, arguments));
  }, throw: function(t) {
    var a = this.s.return;
    return a === void 0 ? Promise.reject(t) : e(a.apply(this.s, arguments));
  } }, new Re(r);
}
const Kr = async (r, e, t = r.name, a) => {
  const i = [], n = [];
  var o, l = !1, s = !1;
  try {
    for (var h, c = (function(m) {
      var d, v, b, g = 2;
      for (typeof Symbol < "u" && (v = Symbol.asyncIterator, b = Symbol.iterator); g--; ) {
        if (v && (d = m[v]) != null) return d.call(m);
        if (b && (d = m[b]) != null) return new Re(d.call(m));
        v = "@@asyncIterator", b = "@@iterator";
      }
      throw new TypeError("Object is not async iterable");
    })(r.values()); l = !(h = await c.next()).done; l = !1) {
      const m = h.value, d = `${t}/${m.name}`;
      m.kind === "file" ? n.push(m.getFile().then((v) => (v.directoryHandle = r, v.handle = m, Object.defineProperty(v, "webkitRelativePath", { configurable: !0, enumerable: !0, get: () => d })))) : m.kind !== "directory" || !e || a && a(m) || i.push(Kr(m, e, d, a));
    }
  } catch (m) {
    s = !0, o = m;
  } finally {
    try {
      l && c.return != null && await c.return();
    } finally {
      if (s) throw o;
    }
  }
  return [...(await Promise.all(i)).flat(), ...await Promise.all(n)];
};
var yi = async (r = {}) => {
  r.recursive = r.recursive || !1;
  const e = await window.showDirectoryPicker({ id: r.id, startIn: r.startIn });
  return Kr(e, r.recursive, void 0, r.skipDirectory);
};
const wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: yi
}, Symbol.toStringTag, { value: "Module" }));
var xi = async (r = [{}]) => (Array.isArray(r) || (r = [r]), r[0].recursive = r[0].recursive || !1, new Promise((e, t) => {
  const a = document.createElement("input");
  a.type = "file", a.webkitdirectory = !0;
  const i = (o) => {
    typeof n == "function" && n(), e(o);
  }, n = r[0].legacySetup && r[0].legacySetup(i, () => n(t), a);
  a.addEventListener("change", () => {
    let o = Array.from(a.files);
    r[0].recursive ? r[0].recursive && r[0].skipDirectory && (o = o.filter((l) => l.webkitRelativePath.split("/").every((s) => !r[0].skipDirectory({ name: s, kind: "directory" })))) : o = o.filter((l) => l.webkitRelativePath.split("/").length === 2), i(o);
  }), a.click();
}));
const Ii = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: xi
}, Symbol.toStringTag, { value: "Module" }));
var Bi = async (r, e = [{}], t = null, a = !1, i = null) => {
  Array.isArray(e) || (e = [e]), e[0].fileName = e[0].fileName || "Untitled";
  const n = [];
  let o = null;
  if (r instanceof Blob && r.type ? o = r.type : r.headers && r.headers.get("content-type") && (o = r.headers.get("content-type")), e.forEach((h, c) => {
    n[c] = { description: h.description || "", accept: {} }, h.mimeTypes ? (c === 0 && o && h.mimeTypes.push(o), h.mimeTypes.map((m) => {
      n[c].accept[m] = h.extensions || [];
    })) : o && (n[c].accept[o] = h.extensions || []);
  }), t) try {
    await t.getFile();
  } catch (h) {
    if (t = null, a) throw h;
  }
  const l = t || await window.showSaveFilePicker({ suggestedName: e[0].fileName, id: e[0].id, startIn: e[0].startIn, types: n, excludeAcceptAllOption: e[0].excludeAcceptAllOption || !1 });
  !t && i && i();
  const s = await l.createWritable();
  return "stream" in r ? (await r.stream().pipeTo(s), l) : "body" in r ? (await r.body.pipeTo(s), l) : (await s.write(await r), await s.close(), l);
};
const ki = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Bi
}, Symbol.toStringTag, { value: "Module" }));
var _i = async (r, e = {}) => {
  Array.isArray(e) && (e = e[0]);
  const t = document.createElement("a");
  let a = r;
  "body" in r && (a = await (async function(o, l) {
    const s = o.getReader(), h = new ReadableStream({ start: (d) => (async function v() {
      return s.read().then(({ done: b, value: g }) => {
        if (!b) return d.enqueue(g), v();
        d.close();
      });
    })() }), c = new Response(h), m = await c.blob();
    return s.releaseLock(), new Blob([m], { type: l });
  })(r.body, r.headers.get("content-type"))), t.download = e.fileName || "Untitled", t.href = URL.createObjectURL(await a);
  const i = () => {
    typeof n == "function" && n();
  }, n = e.legacySetup && e.legacySetup(i, () => n(reject), t);
  return t.addEventListener("click", () => {
    setTimeout(() => URL.revokeObjectURL(t.href), 3e4), i();
  }), t.click(), null;
};
const Ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: _i
}, Symbol.toStringTag, { value: "Module" }));
var st = { exports: {} };
/*!

pica
https://github.com/nodeca/pica

*/
var mr;
function Si() {
  return mr || (mr = 1, (function(r, e) {
    (function(t) {
      r.exports = t();
    })(function() {
      return (/* @__PURE__ */ (function() {
        function t(a, i, n) {
          function o(h, c) {
            if (!i[h]) {
              if (!a[h]) {
                var m = typeof ke == "function" && ke;
                if (!c && m) return m(h, !0);
                if (l) return l(h, !0);
                var d = new Error("Cannot find module '" + h + "'");
                throw d.code = "MODULE_NOT_FOUND", d;
              }
              var v = i[h] = { exports: {} };
              a[h][0].call(v.exports, function(b) {
                var g = a[h][1][b];
                return o(g || b);
              }, v, v.exports, t, a, i, n);
            }
            return i[h].exports;
          }
          for (var l = typeof ke == "function" && ke, s = 0; s < n.length; s++) o(n[s]);
          return o;
        }
        return t;
      })())({ 1: [function(t, a, i) {
        var n = t("inherits"), o = t("multimath"), l = t("./mm_unsharp_mask"), s = t("./mm_resize");
        function h(c) {
          var m = c || [], d = {
            js: m.indexOf("js") >= 0,
            wasm: m.indexOf("wasm") >= 0
          };
          o.call(this, d), this.features = {
            js: d.js,
            wasm: d.wasm && this.has_wasm()
          }, this.use(l), this.use(s);
        }
        n(h, o), h.prototype.resizeAndUnsharp = function(m, d) {
          var v = this.resize(m, d);
          return m.unsharpAmount && this.unsharp_mask(v, m.toWidth, m.toHeight, m.unsharpAmount, m.unsharpRadius, m.unsharpThreshold), v;
        }, a.exports = h;
      }, { "./mm_resize": 4, "./mm_unsharp_mask": 9, inherits: 19, multimath: 20 }], 2: [function(t, a, i) {
        function n(s) {
          return s < 0 ? 0 : s > 255 ? 255 : s;
        }
        function o(s, h, c, m, d, v) {
          var b, g, w, B, M, _, z, D, R, O, F, Q = 0, H = 0;
          for (R = 0; R < m; R++) {
            for (M = 0, O = 0; O < d; O++) {
              for (_ = v[M++], z = v[M++], D = Q + _ * 4 | 0, b = g = w = B = 0; z > 0; z--)
                F = v[M++], B = B + F * s[D + 3] | 0, w = w + F * s[D + 2] | 0, g = g + F * s[D + 1] | 0, b = b + F * s[D] | 0, D = D + 4 | 0;
              h[H + 3] = n(
                B + 8192 >> 14
                /*FIXED_FRAC_BITS*/
              ), h[H + 2] = n(
                w + 8192 >> 14
                /*FIXED_FRAC_BITS*/
              ), h[H + 1] = n(
                g + 8192 >> 14
                /*FIXED_FRAC_BITS*/
              ), h[H] = n(
                b + 8192 >> 14
                /*FIXED_FRAC_BITS*/
              ), H = H + m * 4 | 0;
            }
            H = (R + 1) * 4 | 0, Q = (R + 1) * c * 4 | 0;
          }
        }
        function l(s, h, c, m, d, v) {
          var b, g, w, B, M, _, z, D, R, O, F, Q = 0, H = 0;
          for (R = 0; R < m; R++) {
            for (M = 0, O = 0; O < d; O++) {
              for (_ = v[M++], z = v[M++], D = Q + _ * 4 | 0, b = g = w = B = 0; z > 0; z--)
                F = v[M++], B = B + F * s[D + 3] | 0, w = w + F * s[D + 2] | 0, g = g + F * s[D + 1] | 0, b = b + F * s[D] | 0, D = D + 4 | 0;
              h[H + 3] = n(
                B + 8192 >> 14
                /*FIXED_FRAC_BITS*/
              ), h[H + 2] = n(
                w + 8192 >> 14
                /*FIXED_FRAC_BITS*/
              ), h[H + 1] = n(
                g + 8192 >> 14
                /*FIXED_FRAC_BITS*/
              ), h[H] = n(
                b + 8192 >> 14
                /*FIXED_FRAC_BITS*/
              ), H = H + m * 4 | 0;
            }
            H = (R + 1) * 4 | 0, Q = (R + 1) * c * 4 | 0;
          }
        }
        a.exports = {
          convolveHorizontally: o,
          convolveVertically: l
        };
      }, {}], 3: [function(t, a, i) {
        a.exports = "AGFzbQEAAAAADAZkeWxpbmsAAAAAAAEXA2AAAGAGf39/f39/AGAHf39/f39/fwACDwEDZW52Bm1lbW9yeQIAAAMEAwABAgYGAX8AQQALB1cFEV9fd2FzbV9jYWxsX2N0b3JzAAAIY29udm9sdmUAAQpjb252b2x2ZUhWAAIMX19kc29faGFuZGxlAwAYX193YXNtX2FwcGx5X2RhdGFfcmVsb2NzAAAK7AMDAwABC8YDAQ9/AkAgA0UNACAERQ0AA0AgDCENQQAhE0EAIQcDQCAHQQJqIQYCfyAHQQF0IAVqIgcuAQIiFEUEQEGAwAAhCEGAwAAhCUGAwAAhCkGAwAAhCyAGDAELIBIgBy4BAGohCEEAIQsgFCEHQQAhDiAGIQlBACEPQQAhEANAIAUgCUEBdGouAQAiESAAIAhBAnRqKAIAIgpBGHZsIBBqIRAgCkH/AXEgEWwgC2ohCyAKQRB2Qf8BcSARbCAPaiEPIApBCHZB/wFxIBFsIA5qIQ4gCEEBaiEIIAlBAWohCSAHQQFrIgcNAAsgC0GAQGshCCAOQYBAayEJIA9BgEBrIQogEEGAQGshCyAGIBRqCyEHIAEgDUECdGogCUEOdSIGQf8BIAZB/wFIGyIGQQAgBkEAShtBCHRBgP4DcSAKQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EQdEGAgPwHcSALQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EYdHJyIAhBDnUiBkH/ASAGQf8BSBsiBkEAIAZBAEobcjYCACADIA1qIQ0gE0EBaiITIARHDQALIAxBAWoiDCACbCESIAMgDEcNAAsLCx4AQQAgAiADIAQgBSAAEAEgAkEAIAQgBSAGIAEQAQs=";
      }, {}], 4: [function(t, a, i) {
        a.exports = {
          name: "resize",
          fn: t("./resize"),
          wasm_fn: t("./resize_wasm"),
          wasm_src: t("./convolve_wasm_base64")
        };
      }, { "./convolve_wasm_base64": 3, "./resize": 5, "./resize_wasm": 8 }], 5: [function(t, a, i) {
        var n = t("./resize_filter_gen"), o = t("./convolve").convolveHorizontally, l = t("./convolve").convolveVertically;
        function s(h, c, m) {
          for (var d = 3, v = c * m * 4 | 0; d < v; )
            h[d] = 255, d = d + 4 | 0;
        }
        a.exports = function(c) {
          var m = c.src, d = c.width, v = c.height, b = c.toWidth, g = c.toHeight, w = c.scaleX || c.toWidth / c.width, B = c.scaleY || c.toHeight / c.height, M = c.offsetX || 0, _ = c.offsetY || 0, z = c.dest || new Uint8Array(b * g * 4), D = typeof c.quality > "u" ? 3 : c.quality, R = c.alpha || !1, O = n(D, d, b, w, M), F = n(D, v, g, B, _), Q = new Uint8Array(b * v * 4);
          return o(m, Q, d, v, b, O), l(Q, z, v, b, g, F), R || s(z, b, g), z;
        };
      }, { "./convolve": 2, "./resize_filter_gen": 6 }], 6: [function(t, a, i) {
        var n = t("./resize_filter_info"), o = 14;
        function l(s) {
          return Math.round(s * ((1 << o) - 1));
        }
        a.exports = function(h, c, m, d, v) {
          var b = n[h].filter, g = 1 / d, w = Math.min(1, d), B = n[h].win / w, M, _, z, D, R, O, F, Q, H, L, K, t0, Z, y, C, k, E, T = Math.floor((B + 1) * 2), Y = new Int16Array((T + 2) * m), q = 0, j = !Y.subarray || !Y.set;
          for (M = 0; M < m; M++) {
            for (_ = (M + 0.5) * g + v, z = Math.max(0, Math.floor(_ - B)), D = Math.min(c - 1, Math.ceil(_ + B)), R = D - z + 1, O = new Float32Array(R), F = new Int16Array(R), Q = 0, H = z, L = 0; H <= D; H++, L++)
              K = b((H + 0.5 - _) * w), Q += K, O[L] = K;
            for (t0 = 0, L = 0; L < O.length; L++)
              Z = O[L] / Q, t0 += Z, F[L] = l(Z);
            for (F[m >> 1] += l(1 - t0), y = 0; y < F.length && F[y] === 0; )
              y++;
            if (y < F.length) {
              for (C = F.length - 1; C > 0 && F[C] === 0; )
                C--;
              if (k = z + y, E = C - y + 1, Y[q++] = k, Y[q++] = E, !j)
                Y.set(F.subarray(y, C + 1), q), q += E;
              else
                for (L = y; L <= C; L++)
                  Y[q++] = F[L];
            } else
              Y[q++] = 0, Y[q++] = 0;
          }
          return Y;
        };
      }, { "./resize_filter_info": 7 }], 7: [function(t, a, i) {
        a.exports = [{
          // Nearest neibor (Box)
          win: 0.5,
          filter: function(o) {
            return o >= -0.5 && o < 0.5 ? 1 : 0;
          }
        }, {
          // Hamming
          win: 1,
          filter: function(o) {
            if (o <= -1 || o >= 1)
              return 0;
            if (o > -11920929e-14 && o < 11920929e-14)
              return 1;
            var l = o * Math.PI;
            return Math.sin(l) / l * (0.54 + 0.46 * Math.cos(l / 1));
          }
        }, {
          // Lanczos, win = 2
          win: 2,
          filter: function(o) {
            if (o <= -2 || o >= 2)
              return 0;
            if (o > -11920929e-14 && o < 11920929e-14)
              return 1;
            var l = o * Math.PI;
            return Math.sin(l) / l * Math.sin(l / 2) / (l / 2);
          }
        }, {
          // Lanczos, win = 3
          win: 3,
          filter: function(o) {
            if (o <= -3 || o >= 3)
              return 0;
            if (o > -11920929e-14 && o < 11920929e-14)
              return 1;
            var l = o * Math.PI;
            return Math.sin(l) / l * Math.sin(l / 3) / (l / 3);
          }
        }];
      }, {}], 8: [function(t, a, i) {
        var n = t("./resize_filter_gen");
        function o(c, m, d) {
          for (var v = 3, b = m * d * 4 | 0; v < b; )
            c[v] = 255, v = v + 4 | 0;
        }
        function l(c) {
          return new Uint8Array(c.buffer, 0, c.byteLength);
        }
        var s = !0;
        try {
          s = new Uint32Array(new Uint8Array([1, 0, 0, 0]).buffer)[0] === 1;
        } catch {
        }
        function h(c, m, d) {
          if (s) {
            m.set(l(c), d);
            return;
          }
          for (var v = d, b = 0; b < c.length; b++) {
            var g = c[b];
            m[v++] = g & 255, m[v++] = g >> 8 & 255;
          }
        }
        a.exports = function(m) {
          var d = m.src, v = m.width, b = m.height, g = m.toWidth, w = m.toHeight, B = m.scaleX || m.toWidth / m.width, M = m.scaleY || m.toHeight / m.height, _ = m.offsetX || 0, z = m.offsetY || 0, D = m.dest || new Uint8Array(g * w * 4), R = typeof m.quality > "u" ? 3 : m.quality, O = m.alpha || !1, F = n(R, v, g, B, _), Q = n(R, b, w, M, z), H = 0, L = this.__align(H + Math.max(d.byteLength, D.byteLength)), K = this.__align(L + b * g * 4), t0 = this.__align(K + F.byteLength), Z = t0 + Q.byteLength, y = this.__instance("resize", Z), C = new Uint8Array(this.__memory.buffer), k = new Uint32Array(this.__memory.buffer), E = new Uint32Array(d.buffer);
          k.set(E), h(F, C, K), h(Q, C, t0);
          var T = y.exports.convolveHV || y.exports._convolveHV;
          T(K, t0, L, v, b, g, w);
          var Y = new Uint32Array(D.buffer);
          return Y.set(new Uint32Array(this.__memory.buffer, 0, w * g)), O || o(D, g, w), D;
        };
      }, { "./resize_filter_gen": 6 }], 9: [function(t, a, i) {
        a.exports = {
          name: "unsharp_mask",
          fn: t("./unsharp_mask"),
          wasm_fn: t("./unsharp_mask_wasm"),
          wasm_src: t("./unsharp_mask_wasm_base64")
        };
      }, { "./unsharp_mask": 10, "./unsharp_mask_wasm": 11, "./unsharp_mask_wasm_base64": 12 }], 10: [function(t, a, i) {
        var n = t("glur/mono16");
        function o(l, s, h) {
          for (var c = s * h, m = new Uint16Array(c), d, v, b, g, w = 0; w < c; w++)
            d = l[4 * w], v = l[4 * w + 1], b = l[4 * w + 2], g = d >= v && d >= b ? d : v >= b && v >= d ? v : b, m[w] = g << 8;
          return m;
        }
        a.exports = function(s, h, c, m, d, v) {
          var b, g, w, B, M;
          if (!(m === 0 || d < 0.5)) {
            d > 2 && (d = 2);
            var _ = o(s, h, c), z = new Uint16Array(_);
            n(z, h, c, d);
            for (var D = m / 100 * 4096 + 0.5 | 0, R = v << 8, O = h * c, F = 0; F < O; F++)
              b = _[F], B = b - z[F], Math.abs(B) >= R && (g = b + (D * B + 2048 >> 12), g = g > 65280 ? 65280 : g, g = g < 0 ? 0 : g, b = b !== 0 ? b : 1, w = (g << 12) / b | 0, M = F * 4, s[M] = s[M] * w + 2048 >> 12, s[M + 1] = s[M + 1] * w + 2048 >> 12, s[M + 2] = s[M + 2] * w + 2048 >> 12);
          }
        };
      }, { "glur/mono16": 18 }], 11: [function(t, a, i) {
        a.exports = function(o, l, s, h, c, m) {
          if (!(h === 0 || c < 0.5)) {
            c > 2 && (c = 2);
            var d = l * s, v = d * 4, b = d * 2, g = d * 2, w = Math.max(l, s) * 4, B = 32, M = 0, _ = v, z = _ + b, D = z + g, R = D + g, O = R + w, F = this.__instance("unsharp_mask", v + b + g * 2 + w + B, {
              exp: Math.exp
            }), Q = new Uint32Array(o.buffer), H = new Uint32Array(this.__memory.buffer);
            H.set(Q);
            var L = F.exports.hsv_v16 || F.exports._hsv_v16;
            L(M, _, l, s), L = F.exports.blurMono16 || F.exports._blurMono16, L(_, z, D, R, O, l, s, c), L = F.exports.unsharp || F.exports._unsharp, L(M, M, _, z, l, s, h, m), Q.set(new Uint32Array(this.__memory.buffer, 0, d));
          }
        };
      }, {}], 12: [function(t, a, i) {
        a.exports = "AGFzbQEAAAAADAZkeWxpbmsAAAAAAAE0B2AAAGAEf39/fwBgBn9/f39/fwBgCH9/f39/f39/AGAIf39/f39/f30AYAJ9fwBgAXwBfAIZAgNlbnYDZXhwAAYDZW52Bm1lbW9yeQIAAAMHBgAFAgQBAwYGAX8AQQALB4oBCBFfX3dhc21fY2FsbF9jdG9ycwABFl9fYnVpbGRfZ2F1c3NpYW5fY29lZnMAAg5fX2dhdXNzMTZfbGluZQADCmJsdXJNb25vMTYABAdoc3ZfdjE2AAUHdW5zaGFycAAGDF9fZHNvX2hhbmRsZQMAGF9fd2FzbV9hcHBseV9kYXRhX3JlbG9jcwABCsUMBgMAAQvWAQEHfCABRNuGukOCGvs/IAC7oyICRAAAAAAAAADAohAAIgW2jDgCFCABIAKaEAAiAyADoCIGtjgCECABRAAAAAAAAPA/IAOhIgQgBKIgAyACIAKgokQAAAAAAADwP6AgBaGjIgS2OAIAIAEgBSAEmqIiB7Y4AgwgASADIAJEAAAAAAAA8D+gIASioiIItjgCCCABIAMgAkQAAAAAAADwv6AgBKKiIgK2OAIEIAEgByAIoCAFRAAAAAAAAPA/IAahoCIDo7Y4AhwgASAEIAKgIAOjtjgCGAuGBQMGfwl8An0gAyoCDCEVIAMqAgghFiADKgIUuyERIAMqAhC7IRACQCAEQQFrIghBAEgiCQRAIAIhByAAIQYMAQsgAiAALwEAuCIPIAMqAhi7oiIMIBGiIg0gDCAQoiAPIAMqAgS7IhOiIhQgAyoCALsiEiAPoqCgoCIOtjgCACACQQRqIQcgAEECaiEGIAhFDQAgCEEBIAhBAUgbIgpBf3MhCwJ/IAQgCmtBAXFFBEAgDiENIAgMAQsgAiANIA4gEKIgFCASIAAvAQK4Ig+ioKCgIg22OAIEIAJBCGohByAAQQRqIQYgDiEMIARBAmsLIQIgC0EAIARrRg0AA0AgByAMIBGiIA0gEKIgDyAToiASIAYvAQC4Ig6ioKCgIgy2OAIAIAcgDSARoiAMIBCiIA4gE6IgEiAGLwECuCIPoqCgoCINtjgCBCAHQQhqIQcgBkEEaiEGIAJBAkohACACQQJrIQIgAA0ACwsCQCAJDQAgASAFIAhsQQF0aiIAAn8gBkECay8BACICuCINIBW7IhKiIA0gFrsiE6KgIA0gAyoCHLuiIgwgEKKgIAwgEaKgIg8gB0EEayIHKgIAu6AiDkQAAAAAAADwQWMgDkQAAAAAAAAAAGZxBEAgDqsMAQtBAAs7AQAgCEUNACAGQQRrIQZBACAFa0EBdCEBA0ACfyANIBKiIAJB//8DcbgiDSAToqAgDyIOIBCioCAMIBGioCIPIAdBBGsiByoCALugIgxEAAAAAAAA8EFjIAxEAAAAAAAAAABmcQRAIAyrDAELQQALIQMgBi8BACECIAAgAWoiACADOwEAIAZBAmshBiAIQQFKIQMgDiEMIAhBAWshCCADDQALCwvRAgIBfwd8AkAgB0MAAAAAWw0AIARE24a6Q4Ia+z8gB0MAAAA/l7ujIglEAAAAAAAAAMCiEAAiDLaMOAIUIAQgCZoQACIKIAqgIg22OAIQIAREAAAAAAAA8D8gCqEiCyALoiAKIAkgCaCiRAAAAAAAAPA/oCAMoaMiC7Y4AgAgBCAMIAuaoiIOtjgCDCAEIAogCUQAAAAAAADwP6AgC6KiIg+2OAIIIAQgCiAJRAAAAAAAAPC/oCALoqIiCbY4AgQgBCAOIA+gIAxEAAAAAAAA8D8gDaGgIgqjtjgCHCAEIAsgCaAgCqO2OAIYIAYEQANAIAAgBSAIbEEBdGogAiAIQQF0aiADIAQgBSAGEAMgCEEBaiIIIAZHDQALCyAFRQ0AQQAhCANAIAIgBiAIbEEBdGogASAIQQF0aiADIAQgBiAFEAMgCEEBaiIIIAVHDQALCwtxAQN/IAIgA2wiBQRAA0AgASAAKAIAIgRBEHZB/wFxIgIgAiAEQQh2Qf8BcSIDIAMgBEH/AXEiBEkbIAIgA0sbIgYgBiAEIAIgBEsbIAMgBEsbQQh0OwEAIAFBAmohASAAQQRqIQAgBUEBayIFDQALCwuZAgIDfwF8IAQgBWwhBAJ/IAazQwAAgEWUQwAAyEKVu0QAAAAAAADgP6AiC5lEAAAAAAAA4EFjBEAgC6oMAQtBgICAgHgLIQUgBARAIAdBCHQhCUEAIQYDQCAJIAIgBkEBdCIHai8BACIBIAMgB2ovAQBrIgcgB0EfdSIIaiAIc00EQCAAIAZBAnQiCGoiCiAFIAdsQYAQakEMdSABaiIHQYD+AyAHQYD+A0gbIgdBACAHQQBKG0EMdCABQQEgARtuIgEgCi0AAGxBgBBqQQx2OgAAIAAgCEEBcmoiByABIActAABsQYAQakEMdjoAACAAIAhBAnJqIgcgASAHLQAAbEGAEGpBDHY6AAALIAZBAWoiBiAERw0ACwsL";
      }, {}], 13: [function(t, a, i) {
        var n = 100;
        function o(l, s) {
          this.create = l, this.available = [], this.acquired = {}, this.lastId = 1, this.timeoutId = 0, this.idle = s || 2e3;
        }
        o.prototype.acquire = function() {
          var l = this, s;
          return this.available.length !== 0 ? s = this.available.pop() : (s = this.create(), s.id = this.lastId++, s.release = function() {
            return l.release(s);
          }), this.acquired[s.id] = s, s;
        }, o.prototype.release = function(l) {
          var s = this;
          delete this.acquired[l.id], l.lastUsed = Date.now(), this.available.push(l), this.timeoutId === 0 && (this.timeoutId = setTimeout(function() {
            return s.gc();
          }, n));
        }, o.prototype.gc = function() {
          var l = this, s = Date.now();
          this.available = this.available.filter(function(h) {
            return s - h.lastUsed > l.idle ? (h.destroy(), !1) : !0;
          }), this.available.length !== 0 ? this.timeoutId = setTimeout(function() {
            return l.gc();
          }, n) : this.timeoutId = 0;
        }, a.exports = o;
      }, {}], 14: [function(t, a, i) {
        var n = 2;
        a.exports = function(l, s, h, c, m, d) {
          var v = h / l, b = c / s, g = (2 * d + n + 1) / m;
          if (g > 0.5) return [[h, c]];
          var w = Math.ceil(Math.log(Math.min(v, b)) / Math.log(g));
          if (w <= 1) return [[h, c]];
          for (var B = [], M = 0; M < w; M++) {
            var _ = Math.round(Math.pow(Math.pow(l, w - M - 1) * Math.pow(h, M + 1), 1 / w)), z = Math.round(Math.pow(Math.pow(s, w - M - 1) * Math.pow(c, M + 1), 1 / w));
            B.push([_, z]);
          }
          return B;
        };
      }, {}], 15: [function(t, a, i) {
        var n = 1e-5;
        function o(s) {
          var h = Math.round(s);
          return Math.abs(s - h) < n ? h : Math.floor(s);
        }
        function l(s) {
          var h = Math.round(s);
          return Math.abs(s - h) < n ? h : Math.ceil(s);
        }
        a.exports = function(h) {
          var c = h.toWidth / h.width, m = h.toHeight / h.height, d = o(h.srcTileSize * c) - 2 * h.destTileBorder, v = o(h.srcTileSize * m) - 2 * h.destTileBorder;
          if (d < 1 || v < 1)
            throw new Error("Internal error in pica: target tile width/height is too small.");
          var b, g, w, B, M, _, z = [], D;
          for (B = 0; B < h.toHeight; B += v)
            for (w = 0; w < h.toWidth; w += d)
              b = w - h.destTileBorder, b < 0 && (b = 0), M = w + d + h.destTileBorder - b, b + M >= h.toWidth && (M = h.toWidth - b), g = B - h.destTileBorder, g < 0 && (g = 0), _ = B + v + h.destTileBorder - g, g + _ >= h.toHeight && (_ = h.toHeight - g), D = {
                toX: b,
                toY: g,
                toWidth: M,
                toHeight: _,
                toInnerX: w,
                toInnerY: B,
                toInnerWidth: d,
                toInnerHeight: v,
                offsetX: b / c - o(b / c),
                offsetY: g / m - o(g / m),
                scaleX: c,
                scaleY: m,
                x: o(b / c),
                y: o(g / m),
                width: l(M / c),
                height: l(_ / m)
              }, z.push(D);
          return z;
        };
      }, {}], 16: [function(t, a, i) {
        function n(o) {
          return Object.prototype.toString.call(o);
        }
        a.exports.isCanvas = function(l) {
          var s = n(l);
          return s === "[object HTMLCanvasElement]" || s === "[object OffscreenCanvas]" || s === "[object Canvas]";
        }, a.exports.isImage = function(l) {
          return n(l) === "[object HTMLImageElement]";
        }, a.exports.isImageBitmap = function(l) {
          return n(l) === "[object ImageBitmap]";
        }, a.exports.limiter = function(l) {
          var s = 0, h = [];
          function c() {
            s < l && h.length && (s++, h.shift()());
          }
          return function(d) {
            return new Promise(function(v, b) {
              h.push(function() {
                d().then(function(g) {
                  v(g), s--, c();
                }, function(g) {
                  b(g), s--, c();
                });
              }), c();
            });
          };
        }, a.exports.cib_quality_name = function(l) {
          switch (l) {
            case 0:
              return "pixelated";
            case 1:
              return "low";
            case 2:
              return "medium";
          }
          return "high";
        }, a.exports.cib_support = function(l) {
          return Promise.resolve().then(function() {
            if (typeof createImageBitmap > "u")
              return !1;
            var s = l(100, 100);
            return createImageBitmap(s, 0, 0, 100, 100, {
              resizeWidth: 10,
              resizeHeight: 10,
              resizeQuality: "high"
            }).then(function(h) {
              var c = h.width === 10;
              return h.close(), s = null, c;
            });
          }).catch(function() {
            return !1;
          });
        }, a.exports.worker_offscreen_canvas_support = function() {
          return new Promise(function(l, s) {
            if (typeof OffscreenCanvas > "u") {
              l(!1);
              return;
            }
            function h(d) {
              if (typeof createImageBitmap > "u") {
                d.postMessage(!1);
                return;
              }
              Promise.resolve().then(function() {
                var v = new OffscreenCanvas(10, 10), b = v.getContext("2d");
                return b.rect(0, 0, 1, 1), createImageBitmap(v, 0, 0, 1, 1);
              }).then(function() {
                return d.postMessage(!0);
              }, function() {
                return d.postMessage(!1);
              });
            }
            var c = btoa("(".concat(h.toString(), ")(self);")), m = new Worker("data:text/javascript;base64,".concat(c));
            m.onmessage = function(d) {
              return l(d.data);
            }, m.onerror = s;
          }).then(function(l) {
            return l;
          }, function() {
            return !1;
          });
        }, a.exports.can_use_canvas = function(l) {
          var s = !1;
          try {
            var h = l(2, 1), c = h.getContext("2d"), m = c.createImageData(2, 1);
            m.data[0] = 12, m.data[1] = 23, m.data[2] = 34, m.data[3] = 255, m.data[4] = 45, m.data[5] = 56, m.data[6] = 67, m.data[7] = 255, c.putImageData(m, 0, 0), m = null, m = c.getImageData(0, 0, 2, 1), m.data[0] === 12 && m.data[1] === 23 && m.data[2] === 34 && m.data[3] === 255 && m.data[4] === 45 && m.data[5] === 56 && m.data[6] === 67 && m.data[7] === 255 && (s = !0);
          } catch {
          }
          return s;
        }, a.exports.cib_can_use_region = function() {
          return new Promise(function(l) {
            if (typeof createImageBitmap > "u") {
              l(!1);
              return;
            }
            var s = new Image();
            s.src = "data:image/jpeg;base64,/9j/4QBiRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAYAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAAAAABIAAAAAQAAAEgAAAAB/9sAQwAEAwMEAwMEBAMEBQQEBQYKBwYGBgYNCQoICg8NEBAPDQ8OERMYFBESFxIODxUcFRcZGRsbGxAUHR8dGh8YGhsa/9sAQwEEBQUGBQYMBwcMGhEPERoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoa/8IAEQgAAQACAwERAAIRAQMRAf/EABQAAQAAAAAAAAAAAAAAAAAAAAf/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAF/P//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAQUCf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Bf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Bf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEABj8Cf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8hf//aAAwDAQACAAMAAAAQH//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8Qf//Z", s.onload = function() {
              createImageBitmap(s, 0, 0, s.width, s.height).then(function(h) {
                h.width === s.width && h.height === s.height ? l(!0) : l(!1);
              }, function() {
                return l(!1);
              });
            }, s.onerror = function() {
              return l(!1);
            };
          });
        };
      }, {}], 17: [function(t, a, i) {
        a.exports = function() {
          var n = t("./mathlib"), o;
          onmessage = function(s) {
            var h = s.data.opts;
            if (!h.src && h.srcBitmap) {
              var c = new OffscreenCanvas(h.width, h.height), m = c.getContext("2d", {
                alpha: !!h.alpha
              });
              m.drawImage(h.srcBitmap, 0, 0), h.src = m.getImageData(0, 0, h.width, h.height).data, c.width = c.height = 0, c = null, h.srcBitmap.close(), h.srcBitmap = null;
            }
            o || (o = new n(s.data.features));
            var d = o.resizeAndUnsharp(h);
            postMessage({
              data: d
            }, [d.buffer]);
          };
        };
      }, { "./mathlib": 1 }], 18: [function(t, a, i) {
        var n, o, l, s, h, c, m, d;
        function v(w) {
          w < 0.5 && (w = 0.5);
          var B = Math.exp(0.726 * 0.726) / w, M = Math.exp(-B), _ = Math.exp(-2 * B), z = (1 - M) * (1 - M) / (1 + 2 * B * M - _);
          return n = z, o = z * (B - 1) * M, l = z * (B + 1) * M, s = -z * _, h = 2 * M, c = -_, m = (n + o) / (1 - h - c), d = (l + s) / (1 - h - c), new Float32Array([n, o, l, s, h, c, m, d]);
        }
        function b(w, B, M, _, z, D) {
          var R, O, F, Q, H, L, K, t0, Z, y, C, k, E, T;
          for (Z = 0; Z < D; Z++) {
            for (L = Z * z, K = Z, t0 = 0, R = w[L], H = R * _[6], Q = H, C = _[0], k = _[1], E = _[4], T = _[5], y = 0; y < z; y++)
              O = w[L], F = O * C + R * k + Q * E + H * T, H = Q, Q = F, R = O, M[t0] = Q, t0++, L++;
            for (L--, t0--, K += D * (z - 1), R = w[L], H = R * _[7], Q = H, O = R, C = _[2], k = _[3], y = z - 1; y >= 0; y--)
              F = O * C + R * k + Q * E + H * T, H = Q, Q = F, R = O, O = w[L], B[K] = M[t0] + Q, L--, t0--, K -= D;
          }
        }
        function g(w, B, M, _) {
          if (_) {
            var z = new Uint16Array(w.length), D = new Float32Array(Math.max(B, M)), R = v(_);
            b(w, z, D, R, B, M), b(z, w, D, R, M, B);
          }
        }
        a.exports = g;
      }, {}], 19: [function(t, a, i) {
        typeof Object.create == "function" ? a.exports = function(o, l) {
          l && (o.super_ = l, o.prototype = Object.create(l.prototype, {
            constructor: {
              value: o,
              enumerable: !1,
              writable: !0,
              configurable: !0
            }
          }));
        } : a.exports = function(o, l) {
          if (l) {
            o.super_ = l;
            var s = function() {
            };
            s.prototype = l.prototype, o.prototype = new s(), o.prototype.constructor = o;
          }
        };
      }, {}], 20: [function(t, a, i) {
        var n = t("object-assign"), o = t("./lib/base64decode"), l = t("./lib/wa_detect"), s = {
          js: !0,
          wasm: !0
        };
        function h(c) {
          if (!(this instanceof h)) return new h(c);
          var m = n({}, s, c || {});
          if (this.options = m, this.__cache = {}, this.__init_promise = null, this.__modules = m.modules || {}, this.__memory = null, this.__wasm = {}, this.__isLE = new Uint32Array(new Uint8Array([1, 0, 0, 0]).buffer)[0] === 1, !this.options.js && !this.options.wasm)
            throw new Error('mathlib: at least "js" or "wasm" should be enabled');
        }
        h.prototype.has_wasm = l, h.prototype.use = function(c) {
          return this.__modules[c.name] = c, this.options.wasm && this.has_wasm() && c.wasm_fn ? this[c.name] = c.wasm_fn : this[c.name] = c.fn, this;
        }, h.prototype.init = function() {
          if (this.__init_promise) return this.__init_promise;
          if (!this.options.js && this.options.wasm && !this.has_wasm())
            return Promise.reject(new Error(`mathlib: only "wasm" was enabled, but it's not supported`));
          var c = this;
          return this.__init_promise = Promise.all(Object.keys(c.__modules).map(function(m) {
            var d = c.__modules[m];
            return !c.options.wasm || !c.has_wasm() || !d.wasm_fn || c.__wasm[m] ? null : WebAssembly.compile(c.__base64decode(d.wasm_src)).then(function(v) {
              c.__wasm[m] = v;
            });
          })).then(function() {
            return c;
          }), this.__init_promise;
        }, h.prototype.__base64decode = o, h.prototype.__reallocate = function(m) {
          if (!this.__memory)
            return this.__memory = new WebAssembly.Memory({
              initial: Math.ceil(m / (64 * 1024))
            }), this.__memory;
          var d = this.__memory.buffer.byteLength;
          return d < m && this.__memory.grow(Math.ceil((m - d) / (64 * 1024))), this.__memory;
        }, h.prototype.__instance = function(m, d, v) {
          if (d && this.__reallocate(d), !this.__wasm[m]) {
            var b = this.__modules[m];
            this.__wasm[m] = new WebAssembly.Module(this.__base64decode(b.wasm_src));
          }
          if (!this.__cache[m]) {
            var g = {
              memoryBase: 0,
              memory: this.__memory,
              tableBase: 0,
              table: new WebAssembly.Table({ initial: 0, element: "anyfunc" })
            };
            this.__cache[m] = new WebAssembly.Instance(this.__wasm[m], {
              env: n(g, v || {})
            });
          }
          return this.__cache[m];
        }, h.prototype.__align = function(m, d) {
          d = d || 8;
          var v = m % d;
          return m + (v ? d - v : 0);
        }, a.exports = h;
      }, { "./lib/base64decode": 21, "./lib/wa_detect": 22, "object-assign": 23 }], 21: [function(t, a, i) {
        var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
        a.exports = function(l) {
          for (var s = l.replace(/[\r\n=]/g, ""), h = s.length, c = new Uint8Array(h * 3 >> 2), m = 0, d = 0, v = 0; v < h; v++)
            v % 4 === 0 && v && (c[d++] = m >> 16 & 255, c[d++] = m >> 8 & 255, c[d++] = m & 255), m = m << 6 | n.indexOf(s.charAt(v));
          var b = h % 4 * 6;
          return b === 0 ? (c[d++] = m >> 16 & 255, c[d++] = m >> 8 & 255, c[d++] = m & 255) : b === 18 ? (c[d++] = m >> 10 & 255, c[d++] = m >> 2 & 255) : b === 12 && (c[d++] = m >> 4 & 255), c;
        };
      }, {}], 22: [function(t, a, i) {
        var n;
        a.exports = function() {
          if (typeof n < "u" || (n = !1, typeof WebAssembly > "u")) return n;
          try {
            var l = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 6, 1, 96, 1, 127, 1, 127, 3, 2, 1, 0, 5, 3, 1, 0, 1, 7, 8, 1, 4, 116, 101, 115, 116, 0, 0, 10, 16, 1, 14, 0, 32, 0, 65, 1, 54, 2, 0, 32, 0, 40, 2, 0, 11]), s = new WebAssembly.Module(l), h = new WebAssembly.Instance(s, {});
            return h.exports.test(4) !== 0 && (n = !0), n;
          } catch {
          }
          return n;
        };
      }, {}], 23: [function(t, a, i) {
        var n = Object.getOwnPropertySymbols, o = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable;
        function s(c) {
          if (c == null)
            throw new TypeError("Object.assign cannot be called with null or undefined");
          return Object(c);
        }
        function h() {
          try {
            if (!Object.assign)
              return !1;
            var c = new String("abc");
            if (c[5] = "de", Object.getOwnPropertyNames(c)[0] === "5")
              return !1;
            for (var m = {}, d = 0; d < 10; d++)
              m["_" + String.fromCharCode(d)] = d;
            var v = Object.getOwnPropertyNames(m).map(function(g) {
              return m[g];
            });
            if (v.join("") !== "0123456789")
              return !1;
            var b = {};
            return "abcdefghijklmnopqrst".split("").forEach(function(g) {
              b[g] = g;
            }), Object.keys(Object.assign({}, b)).join("") === "abcdefghijklmnopqrst";
          } catch {
            return !1;
          }
        }
        a.exports = h() ? Object.assign : function(c, m) {
          for (var d, v = s(c), b, g = 1; g < arguments.length; g++) {
            d = Object(arguments[g]);
            for (var w in d)
              o.call(d, w) && (v[w] = d[w]);
            if (n) {
              b = n(d);
              for (var B = 0; B < b.length; B++)
                l.call(d, b[B]) && (v[b[B]] = d[b[B]]);
            }
          }
          return v;
        };
      }, {}], 24: [function(t, a, i) {
        var n = arguments[3], o = arguments[4], l = arguments[5], s = JSON.stringify;
        a.exports = function(h, c) {
          for (var m, d = Object.keys(l), v = 0, b = d.length; v < b; v++) {
            var g = d[v], w = l[g].exports;
            if (w === h || w && w.default === h) {
              m = g;
              break;
            }
          }
          if (!m) {
            m = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);
            for (var B = {}, v = 0, b = d.length; v < b; v++) {
              var g = d[v];
              B[g] = g;
            }
            o[m] = [
              "function(require,module,exports){" + h + "(self); }",
              B
            ];
          }
          var M = Math.floor(Math.pow(16, 8) * Math.random()).toString(16), _ = {};
          _[m] = m, o[M] = [
            "function(require,module,exports){var f = require(" + s(m) + ");(f.default ? f.default : f)(self);}",
            _
          ];
          var z = {};
          D(M);
          function D(L) {
            z[L] = !0;
            for (var K in o[L][1]) {
              var t0 = o[L][1][K];
              z[t0] || D(t0);
            }
          }
          var R = "(" + n + ")({" + Object.keys(z).map(function(L) {
            return s(L) + ":[" + o[L][0] + "," + s(o[L][1]) + "]";
          }).join(",") + "},{},[" + s(M) + "])", O = window.URL || window.webkitURL || window.mozURL || window.msURL, F = new Blob([R], { type: "text/javascript" });
          if (c && c.bare)
            return F;
          var Q = O.createObjectURL(F), H = new Worker(Q);
          return H.objectURL = Q, H;
        };
      }, {}], "/index.js": [function(t, a, i) {
        function n(y, C) {
          return c(y) || h(y, C) || l(y, C) || o();
        }
        function o() {
          throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
        }
        function l(y, C) {
          if (y) {
            if (typeof y == "string") return s(y, C);
            var k = Object.prototype.toString.call(y).slice(8, -1);
            if (k === "Object" && y.constructor && (k = y.constructor.name), k === "Map" || k === "Set") return Array.from(y);
            if (k === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k)) return s(y, C);
          }
        }
        function s(y, C) {
          (C == null || C > y.length) && (C = y.length);
          for (var k = 0, E = new Array(C); k < C; k++)
            E[k] = y[k];
          return E;
        }
        function h(y, C) {
          var k = y == null ? null : typeof Symbol < "u" && y[Symbol.iterator] || y["@@iterator"];
          if (k != null) {
            var E = [], T = !0, Y = !1, q, j;
            try {
              for (k = k.call(y); !(T = (q = k.next()).done) && (E.push(q.value), !(C && E.length === C)); T = !0)
                ;
            } catch (V) {
              Y = !0, j = V;
            } finally {
              try {
                !T && k.return != null && k.return();
              } finally {
                if (Y) throw j;
              }
            }
            return E;
          }
        }
        function c(y) {
          if (Array.isArray(y)) return y;
        }
        var m = t("object-assign"), d = t("webworkify"), v = t("./lib/mathlib"), b = t("./lib/pool"), g = t("./lib/utils"), w = t("./lib/worker"), B = t("./lib/stepper"), M = t("./lib/tiler"), _ = {}, z = !1;
        try {
          typeof navigator < "u" && navigator.userAgent && (z = navigator.userAgent.indexOf("Safari") >= 0);
        } catch {
        }
        var D = 1;
        typeof navigator < "u" && (D = Math.min(navigator.hardwareConcurrency || 1, 4));
        var R = {
          tile: 1024,
          concurrency: D,
          features: ["js", "wasm", "ww"],
          idle: 2e3,
          createCanvas: function(C, k) {
            var E = document.createElement("canvas");
            return E.width = C, E.height = k, E;
          }
        }, O = {
          quality: 3,
          alpha: !1,
          unsharpAmount: 0,
          unsharpRadius: 0,
          unsharpThreshold: 0
        }, F = !1, Q = !1, H = !1, L = !1, K = !1;
        function t0() {
          return {
            value: d(w),
            destroy: function() {
              if (this.value.terminate(), typeof window < "u") {
                var C = window.URL || window.webkitURL || window.mozURL || window.msURL;
                C && C.revokeObjectURL && this.value.objectURL && C.revokeObjectURL(this.value.objectURL);
              }
            }
          };
        }
        function Z(y) {
          if (!(this instanceof Z)) return new Z(y);
          this.options = m({}, R, y || {});
          var C = "lk_".concat(this.options.concurrency);
          this.__limit = _[C] || g.limiter(this.options.concurrency), _[C] || (_[C] = this.__limit), this.features = {
            js: !1,
            // pure JS implementation, can be disabled for testing
            wasm: !1,
            // webassembly implementation for heavy functions
            cib: !1,
            // resize via createImageBitmap (only FF at this moment)
            ww: !1
            // webworkers
          }, this.__workersPool = null, this.__requested_features = [], this.__mathlib = null;
        }
        Z.prototype.init = function() {
          var y = this;
          if (this.__initPromise) return this.__initPromise;
          if (typeof ImageData < "u" && typeof Uint8ClampedArray < "u")
            try {
              new ImageData(new Uint8ClampedArray(400), 10, 10), F = !0;
            } catch {
            }
          typeof ImageBitmap < "u" && (ImageBitmap.prototype && ImageBitmap.prototype.close ? Q = !0 : this.debug("ImageBitmap does not support .close(), disabled"));
          var C = this.options.features.slice();
          if (C.indexOf("all") >= 0 && (C = ["cib", "wasm", "js", "ww"]), this.__requested_features = C, this.__mathlib = new v(C), C.indexOf("ww") >= 0 && typeof window < "u" && "Worker" in window)
            try {
              var k = t("webworkify")(function() {
              });
              k.terminate(), this.features.ww = !0;
              var E = "wp_".concat(JSON.stringify(this.options));
              _[E] ? this.__workersPool = _[E] : (this.__workersPool = new b(t0, this.options.idle), _[E] = this.__workersPool);
            } catch {
            }
          var T = this.__mathlib.init().then(function(V) {
            m(y.features, V.features);
          }), Y;
          Q ? Y = g.cib_support(this.options.createCanvas).then(function(V) {
            if (y.features.cib && C.indexOf("cib") < 0) {
              y.debug("createImageBitmap() resize supported, but disabled by config");
              return;
            }
            C.indexOf("cib") >= 0 && (y.features.cib = V);
          }) : Y = Promise.resolve(!1), H = g.can_use_canvas(this.options.createCanvas);
          var q;
          Q && F && C.indexOf("ww") !== -1 ? q = g.worker_offscreen_canvas_support() : q = Promise.resolve(!1), q = q.then(function(V) {
            L = V;
          });
          var j = g.cib_can_use_region().then(function(V) {
            K = V;
          });
          return this.__initPromise = Promise.all([T, Y, q, j]).then(function() {
            return y;
          }), this.__initPromise;
        }, Z.prototype.__invokeResize = function(y, C) {
          var k = this;
          return C.__mathCache = C.__mathCache || {}, Promise.resolve().then(function() {
            return k.features.ww ? new Promise(function(E, T) {
              var Y = k.__workersPool.acquire();
              C.cancelToken && C.cancelToken.catch(function(j) {
                return T(j);
              }), Y.value.onmessage = function(j) {
                Y.release(), j.data.err ? T(j.data.err) : E(j.data);
              };
              var q = [];
              y.src && q.push(y.src.buffer), y.srcBitmap && q.push(y.srcBitmap), Y.value.postMessage({
                opts: y,
                features: k.__requested_features,
                preload: {
                  wasm_nodule: k.__mathlib.__
                }
              }, q);
            }) : {
              data: k.__mathlib.resizeAndUnsharp(y, C.__mathCache)
            };
          });
        }, Z.prototype.__extractTileData = function(y, C, k, E, T) {
          if (this.features.ww && L && // createImageBitmap doesn't work for images (Image, ImageBitmap) with Exif orientation in Chrome,
          // can use canvas because canvas doesn't have orientation;
          // see https://bugs.chromium.org/p/chromium/issues/detail?id=1220671
          (g.isCanvas(C) || K))
            return this.debug("Create tile for OffscreenCanvas"), createImageBitmap(E.srcImageBitmap || C, y.x, y.y, y.width, y.height).then(function(j) {
              return T.srcBitmap = j, T;
            });
          if (g.isCanvas(C))
            return E.srcCtx || (E.srcCtx = C.getContext("2d", {
              alpha: !!k.alpha
            })), this.debug("Get tile pixel data"), T.src = E.srcCtx.getImageData(y.x, y.y, y.width, y.height).data, T;
          this.debug("Draw tile imageBitmap/image to temporary canvas");
          var Y = this.options.createCanvas(y.width, y.height), q = Y.getContext("2d", {
            alpha: !!k.alpha
          });
          return q.globalCompositeOperation = "copy", q.drawImage(E.srcImageBitmap || C, y.x, y.y, y.width, y.height, 0, 0, y.width, y.height), this.debug("Get tile pixel data"), T.src = q.getImageData(0, 0, y.width, y.height).data, Y.width = Y.height = 0, T;
        }, Z.prototype.__landTileData = function(y, C, k) {
          var E;
          if (this.debug("Convert raw rgba tile result to ImageData"), C.bitmap)
            return k.toCtx.drawImage(C.bitmap, y.toX, y.toY), null;
          if (F)
            E = new ImageData(new Uint8ClampedArray(C.data), y.toWidth, y.toHeight);
          else if (E = k.toCtx.createImageData(y.toWidth, y.toHeight), E.data.set)
            E.data.set(C.data);
          else
            for (var T = E.data.length - 1; T >= 0; T--)
              E.data[T] = C.data[T];
          return this.debug("Draw tile"), z ? k.toCtx.putImageData(E, y.toX, y.toY, y.toInnerX - y.toX, y.toInnerY - y.toY, y.toInnerWidth + 1e-5, y.toInnerHeight + 1e-5) : k.toCtx.putImageData(E, y.toX, y.toY, y.toInnerX - y.toX, y.toInnerY - y.toY, y.toInnerWidth, y.toInnerHeight), null;
        }, Z.prototype.__tileAndResize = function(y, C, k) {
          var E = this, T = {
            srcCtx: null,
            srcImageBitmap: null,
            isImageBitmapReused: !1,
            toCtx: null
          }, Y = function(j) {
            return E.__limit(function() {
              if (k.canceled) return k.cancelToken;
              var V = {
                width: j.width,
                height: j.height,
                toWidth: j.toWidth,
                toHeight: j.toHeight,
                scaleX: j.scaleX,
                scaleY: j.scaleY,
                offsetX: j.offsetX,
                offsetY: j.offsetY,
                quality: k.quality,
                alpha: k.alpha,
                unsharpAmount: k.unsharpAmount,
                unsharpRadius: k.unsharpRadius,
                unsharpThreshold: k.unsharpThreshold
              };
              return E.debug("Invoke resize math"), Promise.resolve(V).then(function(a0) {
                return E.__extractTileData(j, y, k, T, a0);
              }).then(function(a0) {
                return E.debug("Invoke resize math"), E.__invokeResize(a0, k);
              }).then(function(a0) {
                return k.canceled ? k.cancelToken : (T.srcImageData = null, E.__landTileData(j, a0, T));
              });
            });
          };
          return Promise.resolve().then(function() {
            if (T.toCtx = C.getContext("2d", {
              alpha: !!k.alpha
            }), g.isCanvas(y)) return null;
            if (g.isImageBitmap(y))
              return T.srcImageBitmap = y, T.isImageBitmapReused = !0, null;
            if (g.isImage(y))
              return Q ? (E.debug("Decode image via createImageBitmap"), createImageBitmap(y).then(function(q) {
                T.srcImageBitmap = q;
              }).catch(function(q) {
                return null;
              })) : null;
            throw new Error('Pica: ".from" should be Image, Canvas or ImageBitmap');
          }).then(function() {
            if (k.canceled) return k.cancelToken;
            E.debug("Calculate tiles");
            var q = M({
              width: k.width,
              height: k.height,
              srcTileSize: E.options.tile,
              toWidth: k.toWidth,
              toHeight: k.toHeight,
              destTileBorder: k.__destTileBorder
            }), j = q.map(function(a0) {
              return Y(a0);
            });
            function V(a0) {
              a0.srcImageBitmap && (a0.isImageBitmapReused || a0.srcImageBitmap.close(), a0.srcImageBitmap = null);
            }
            return E.debug("Process tiles"), Promise.all(j).then(function() {
              return E.debug("Finished!"), V(T), C;
            }, function(a0) {
              throw V(T), a0;
            });
          });
        }, Z.prototype.__processStages = function(y, C, k, E) {
          var T = this;
          if (E.canceled) return E.cancelToken;
          var Y = y.shift(), q = n(Y, 2), j = q[0], V = q[1], a0 = y.length === 0;
          E = m({}, E, {
            toWidth: j,
            toHeight: V,
            // only use user-defined quality for the last stage,
            // use simpler (Hamming) filter for the first stages where
            // scale factor is large enough (more than 2-3)
            quality: a0 ? E.quality : Math.min(1, E.quality)
          });
          var g0;
          return a0 || (g0 = this.options.createCanvas(j, V)), this.__tileAndResize(C, a0 ? k : g0, E).then(function() {
            return a0 ? k : (E.width = j, E.height = V, T.__processStages(y, g0, k, E));
          }).then(function(me) {
            return g0 && (g0.width = g0.height = 0), me;
          });
        }, Z.prototype.__resizeViaCreateImageBitmap = function(y, C, k) {
          var E = this, T = C.getContext("2d", {
            alpha: !!k.alpha
          });
          return this.debug("Resize via createImageBitmap()"), createImageBitmap(y, {
            resizeWidth: k.toWidth,
            resizeHeight: k.toHeight,
            resizeQuality: g.cib_quality_name(k.quality)
          }).then(function(Y) {
            if (k.canceled) return k.cancelToken;
            if (!k.unsharpAmount)
              return T.drawImage(Y, 0, 0), Y.close(), T = null, E.debug("Finished!"), C;
            E.debug("Unsharp result");
            var q = E.options.createCanvas(k.toWidth, k.toHeight), j = q.getContext("2d", {
              alpha: !!k.alpha
            });
            j.drawImage(Y, 0, 0), Y.close();
            var V = j.getImageData(0, 0, k.toWidth, k.toHeight);
            return E.__mathlib.unsharp_mask(V.data, k.toWidth, k.toHeight, k.unsharpAmount, k.unsharpRadius, k.unsharpThreshold), T.putImageData(V, 0, 0), q.width = q.height = 0, V = j = q = T = null, E.debug("Finished!"), C;
          });
        }, Z.prototype.resize = function(y, C, k) {
          var E = this;
          this.debug("Start resize...");
          var T = m({}, O);
          if (isNaN(k) ? k && (T = m(T, k)) : T = m(T, {
            quality: k
          }), T.toWidth = C.width, T.toHeight = C.height, T.width = y.naturalWidth || y.width, T.height = y.naturalHeight || y.height, C.width === 0 || C.height === 0)
            return Promise.reject(new Error("Invalid output size: ".concat(C.width, "x").concat(C.height)));
          T.unsharpRadius > 2 && (T.unsharpRadius = 2), T.canceled = !1, T.cancelToken && (T.cancelToken = T.cancelToken.then(function(q) {
            throw T.canceled = !0, q;
          }, function(q) {
            throw T.canceled = !0, q;
          }));
          var Y = 3;
          return T.__destTileBorder = Math.ceil(Math.max(Y, 2.5 * T.unsharpRadius | 0)), this.init().then(function() {
            if (T.canceled) return T.cancelToken;
            if (E.features.cib)
              return E.__resizeViaCreateImageBitmap(y, C, T);
            if (!H) {
              var q = new Error("Pica: cannot use getImageData on canvas, make sure fingerprinting protection isn't enabled");
              throw q.code = "ERR_GET_IMAGE_DATA", q;
            }
            var j = B(T.width, T.height, T.toWidth, T.toHeight, E.options.tile, T.__destTileBorder);
            return E.__processStages(j, y, C, T);
          });
        }, Z.prototype.resizeBuffer = function(y) {
          var C = this, k = m({}, O, y);
          return this.init().then(function() {
            return C.__mathlib.resizeAndUnsharp(k);
          });
        }, Z.prototype.toBlob = function(y, C, k) {
          return C = C || "image/png", new Promise(function(E) {
            if (y.toBlob) {
              y.toBlob(function(V) {
                return E(V);
              }, C, k);
              return;
            }
            if (y.convertToBlob) {
              E(y.convertToBlob({
                type: C,
                quality: k
              }));
              return;
            }
            for (var T = atob(y.toDataURL(C, k).split(",")[1]), Y = T.length, q = new Uint8Array(Y), j = 0; j < Y; j++)
              q[j] = T.charCodeAt(j);
            E(new Blob([q], {
              type: C
            }));
          });
        }, Z.prototype.debug = function() {
        }, a.exports = Z;
      }, { "./lib/mathlib": 1, "./lib/pool": 13, "./lib/stepper": 14, "./lib/tiler": 15, "./lib/utils": 16, "./lib/worker": 17, "object-assign": 23, webworkify: 24 }] }, {}, [])("/index.js");
    });
  })(st)), st.exports;
}
var Jr = Si();
const Mi = /* @__PURE__ */ ci(Jr), qs = /* @__PURE__ */ fi({
  __proto__: null,
  default: Mi
}, [Jr]);
/*! image-blob-reduce 3.0.1 https://github.com/nodeca/image-blob-reduce @license MIT */
var Ei = function(e) {
  for (var t, a = 1; a < arguments.length; a++) {
    t = Object(arguments[a]);
    for (var i in t)
      Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
  }
  return e;
};
function ea(r, e) {
  var t = {};
  return e.forEach(function(a) {
    Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
  }), t;
}
function zi(r) {
  return ea(r, [
    "alpha",
    "unsharpAmount",
    "unsharpRadius",
    "unsharpThreshold",
    "cancelToken"
  ]);
}
var Ti = ea, Di = zi, Lt = {
  assign: Ei,
  pick: Ti,
  pick_pica_resize_options: Di
};
function ta(r) {
  var e = { exports: {} };
  return r(e, e.exports), e.exports;
}
function _e(r) {
  throw new Error('Could not dynamically require "' + r + '". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.');
}
/*!

pica
https://github.com/nodeca/pica

*/
var ra = ta(function(r, e) {
  (function(t) {
    r.exports = t();
  })(function() {
    return (/* @__PURE__ */ (function() {
      function t(a, i, n) {
        function o(h, c) {
          if (!i[h]) {
            if (!a[h]) {
              var m = typeof _e == "function" && _e;
              if (!c && m) return m(h, !0);
              if (l) return l(h, !0);
              var d = new Error("Cannot find module '" + h + "'");
              throw d.code = "MODULE_NOT_FOUND", d;
            }
            var v = i[h] = { exports: {} };
            a[h][0].call(v.exports, function(b) {
              var g = a[h][1][b];
              return o(g || b);
            }, v, v.exports, t, a, i, n);
          }
          return i[h].exports;
        }
        for (var l = typeof _e == "function" && _e, s = 0; s < n.length; s++) o(n[s]);
        return o;
      }
      return t;
    })())({ 1: [function(t, a, i) {
      var n = t("inherits"), o = t("multimath"), l = t("./mm_unsharp_mask"), s = t("./mm_resize");
      function h(c) {
        var m = c || [], d = {
          js: m.indexOf("js") >= 0,
          wasm: m.indexOf("wasm") >= 0
        };
        o.call(this, d), this.features = {
          js: d.js,
          wasm: d.wasm && this.has_wasm()
        }, this.use(l), this.use(s);
      }
      n(h, o), h.prototype.resizeAndUnsharp = function(m, d) {
        var v = this.resize(m, d);
        return m.unsharpAmount && this.unsharp_mask(v, m.toWidth, m.toHeight, m.unsharpAmount, m.unsharpRadius, m.unsharpThreshold), v;
      }, a.exports = h;
    }, { "./mm_resize": 4, "./mm_unsharp_mask": 9, inherits: 19, multimath: 20 }], 2: [function(t, a, i) {
      function n(s) {
        return s < 0 ? 0 : s > 255 ? 255 : s;
      }
      function o(s, h, c, m, d, v) {
        var b, g, w, B, M, _, z, D, R, O, F, Q = 0, H = 0;
        for (R = 0; R < m; R++) {
          for (M = 0, O = 0; O < d; O++) {
            for (_ = v[M++], z = v[M++], D = Q + _ * 4 | 0, b = g = w = B = 0; z > 0; z--)
              F = v[M++], B = B + F * s[D + 3] | 0, w = w + F * s[D + 2] | 0, g = g + F * s[D + 1] | 0, b = b + F * s[D] | 0, D = D + 4 | 0;
            h[H + 3] = n(
              B + 8192 >> 14
              /*FIXED_FRAC_BITS*/
            ), h[H + 2] = n(
              w + 8192 >> 14
              /*FIXED_FRAC_BITS*/
            ), h[H + 1] = n(
              g + 8192 >> 14
              /*FIXED_FRAC_BITS*/
            ), h[H] = n(
              b + 8192 >> 14
              /*FIXED_FRAC_BITS*/
            ), H = H + m * 4 | 0;
          }
          H = (R + 1) * 4 | 0, Q = (R + 1) * c * 4 | 0;
        }
      }
      function l(s, h, c, m, d, v) {
        var b, g, w, B, M, _, z, D, R, O, F, Q = 0, H = 0;
        for (R = 0; R < m; R++) {
          for (M = 0, O = 0; O < d; O++) {
            for (_ = v[M++], z = v[M++], D = Q + _ * 4 | 0, b = g = w = B = 0; z > 0; z--)
              F = v[M++], B = B + F * s[D + 3] | 0, w = w + F * s[D + 2] | 0, g = g + F * s[D + 1] | 0, b = b + F * s[D] | 0, D = D + 4 | 0;
            h[H + 3] = n(
              B + 8192 >> 14
              /*FIXED_FRAC_BITS*/
            ), h[H + 2] = n(
              w + 8192 >> 14
              /*FIXED_FRAC_BITS*/
            ), h[H + 1] = n(
              g + 8192 >> 14
              /*FIXED_FRAC_BITS*/
            ), h[H] = n(
              b + 8192 >> 14
              /*FIXED_FRAC_BITS*/
            ), H = H + m * 4 | 0;
          }
          H = (R + 1) * 4 | 0, Q = (R + 1) * c * 4 | 0;
        }
      }
      a.exports = {
        convolveHorizontally: o,
        convolveVertically: l
      };
    }, {}], 3: [function(t, a, i) {
      a.exports = "AGFzbQEAAAAADAZkeWxpbmsAAAAAAAEXA2AAAGAGf39/f39/AGAHf39/f39/fwACDwEDZW52Bm1lbW9yeQIAAAMEAwABAgYGAX8AQQALB1cFEV9fd2FzbV9jYWxsX2N0b3JzAAAIY29udm9sdmUAAQpjb252b2x2ZUhWAAIMX19kc29faGFuZGxlAwAYX193YXNtX2FwcGx5X2RhdGFfcmVsb2NzAAAK7AMDAwABC8YDAQ9/AkAgA0UNACAERQ0AA0AgDCENQQAhE0EAIQcDQCAHQQJqIQYCfyAHQQF0IAVqIgcuAQIiFEUEQEGAwAAhCEGAwAAhCUGAwAAhCkGAwAAhCyAGDAELIBIgBy4BAGohCEEAIQsgFCEHQQAhDiAGIQlBACEPQQAhEANAIAUgCUEBdGouAQAiESAAIAhBAnRqKAIAIgpBGHZsIBBqIRAgCkH/AXEgEWwgC2ohCyAKQRB2Qf8BcSARbCAPaiEPIApBCHZB/wFxIBFsIA5qIQ4gCEEBaiEIIAlBAWohCSAHQQFrIgcNAAsgC0GAQGshCCAOQYBAayEJIA9BgEBrIQogEEGAQGshCyAGIBRqCyEHIAEgDUECdGogCUEOdSIGQf8BIAZB/wFIGyIGQQAgBkEAShtBCHRBgP4DcSAKQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EQdEGAgPwHcSALQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EYdHJyIAhBDnUiBkH/ASAGQf8BSBsiBkEAIAZBAEobcjYCACADIA1qIQ0gE0EBaiITIARHDQALIAxBAWoiDCACbCESIAMgDEcNAAsLCx4AQQAgAiADIAQgBSAAEAEgAkEAIAQgBSAGIAEQAQs=";
    }, {}], 4: [function(t, a, i) {
      a.exports = {
        name: "resize",
        fn: t("./resize"),
        wasm_fn: t("./resize_wasm"),
        wasm_src: t("./convolve_wasm_base64")
      };
    }, { "./convolve_wasm_base64": 3, "./resize": 5, "./resize_wasm": 8 }], 5: [function(t, a, i) {
      var n = t("./resize_filter_gen"), o = t("./convolve").convolveHorizontally, l = t("./convolve").convolveVertically;
      function s(h, c, m) {
        for (var d = 3, v = c * m * 4 | 0; d < v; )
          h[d] = 255, d = d + 4 | 0;
      }
      a.exports = function(c) {
        var m = c.src, d = c.width, v = c.height, b = c.toWidth, g = c.toHeight, w = c.scaleX || c.toWidth / c.width, B = c.scaleY || c.toHeight / c.height, M = c.offsetX || 0, _ = c.offsetY || 0, z = c.dest || new Uint8Array(b * g * 4), D = typeof c.quality > "u" ? 3 : c.quality, R = c.alpha || !1, O = n(D, d, b, w, M), F = n(D, v, g, B, _), Q = new Uint8Array(b * v * 4);
        return o(m, Q, d, v, b, O), l(Q, z, v, b, g, F), R || s(z, b, g), z;
      };
    }, { "./convolve": 2, "./resize_filter_gen": 6 }], 6: [function(t, a, i) {
      var n = t("./resize_filter_info"), o = 14;
      function l(s) {
        return Math.round(s * ((1 << o) - 1));
      }
      a.exports = function(h, c, m, d, v) {
        var b = n[h].filter, g = 1 / d, w = Math.min(1, d), B = n[h].win / w, M, _, z, D, R, O, F, Q, H, L, K, t0, Z, y, C, k, E, T = Math.floor((B + 1) * 2), Y = new Int16Array((T + 2) * m), q = 0, j = !Y.subarray || !Y.set;
        for (M = 0; M < m; M++) {
          for (_ = (M + 0.5) * g + v, z = Math.max(0, Math.floor(_ - B)), D = Math.min(c - 1, Math.ceil(_ + B)), R = D - z + 1, O = new Float32Array(R), F = new Int16Array(R), Q = 0, H = z, L = 0; H <= D; H++, L++)
            K = b((H + 0.5 - _) * w), Q += K, O[L] = K;
          for (t0 = 0, L = 0; L < O.length; L++)
            Z = O[L] / Q, t0 += Z, F[L] = l(Z);
          for (F[m >> 1] += l(1 - t0), y = 0; y < F.length && F[y] === 0; )
            y++;
          if (y < F.length) {
            for (C = F.length - 1; C > 0 && F[C] === 0; )
              C--;
            if (k = z + y, E = C - y + 1, Y[q++] = k, Y[q++] = E, !j)
              Y.set(F.subarray(y, C + 1), q), q += E;
            else
              for (L = y; L <= C; L++)
                Y[q++] = F[L];
          } else
            Y[q++] = 0, Y[q++] = 0;
        }
        return Y;
      };
    }, { "./resize_filter_info": 7 }], 7: [function(t, a, i) {
      a.exports = [{
        // Nearest neibor (Box)
        win: 0.5,
        filter: function(o) {
          return o >= -0.5 && o < 0.5 ? 1 : 0;
        }
      }, {
        // Hamming
        win: 1,
        filter: function(o) {
          if (o <= -1 || o >= 1)
            return 0;
          if (o > -11920929e-14 && o < 11920929e-14)
            return 1;
          var l = o * Math.PI;
          return Math.sin(l) / l * (0.54 + 0.46 * Math.cos(l / 1));
        }
      }, {
        // Lanczos, win = 2
        win: 2,
        filter: function(o) {
          if (o <= -2 || o >= 2)
            return 0;
          if (o > -11920929e-14 && o < 11920929e-14)
            return 1;
          var l = o * Math.PI;
          return Math.sin(l) / l * Math.sin(l / 2) / (l / 2);
        }
      }, {
        // Lanczos, win = 3
        win: 3,
        filter: function(o) {
          if (o <= -3 || o >= 3)
            return 0;
          if (o > -11920929e-14 && o < 11920929e-14)
            return 1;
          var l = o * Math.PI;
          return Math.sin(l) / l * Math.sin(l / 3) / (l / 3);
        }
      }];
    }, {}], 8: [function(t, a, i) {
      var n = t("./resize_filter_gen");
      function o(c, m, d) {
        for (var v = 3, b = m * d * 4 | 0; v < b; )
          c[v] = 255, v = v + 4 | 0;
      }
      function l(c) {
        return new Uint8Array(c.buffer, 0, c.byteLength);
      }
      var s = !0;
      try {
        s = new Uint32Array(new Uint8Array([1, 0, 0, 0]).buffer)[0] === 1;
      } catch {
      }
      function h(c, m, d) {
        if (s) {
          m.set(l(c), d);
          return;
        }
        for (var v = d, b = 0; b < c.length; b++) {
          var g = c[b];
          m[v++] = g & 255, m[v++] = g >> 8 & 255;
        }
      }
      a.exports = function(m) {
        var d = m.src, v = m.width, b = m.height, g = m.toWidth, w = m.toHeight, B = m.scaleX || m.toWidth / m.width, M = m.scaleY || m.toHeight / m.height, _ = m.offsetX || 0, z = m.offsetY || 0, D = m.dest || new Uint8Array(g * w * 4), R = typeof m.quality > "u" ? 3 : m.quality, O = m.alpha || !1, F = n(R, v, g, B, _), Q = n(R, b, w, M, z), H = 0, L = this.__align(H + Math.max(d.byteLength, D.byteLength)), K = this.__align(L + b * g * 4), t0 = this.__align(K + F.byteLength), Z = t0 + Q.byteLength, y = this.__instance("resize", Z), C = new Uint8Array(this.__memory.buffer), k = new Uint32Array(this.__memory.buffer), E = new Uint32Array(d.buffer);
        k.set(E), h(F, C, K), h(Q, C, t0);
        var T = y.exports.convolveHV || y.exports._convolveHV;
        T(K, t0, L, v, b, g, w);
        var Y = new Uint32Array(D.buffer);
        return Y.set(new Uint32Array(this.__memory.buffer, 0, w * g)), O || o(D, g, w), D;
      };
    }, { "./resize_filter_gen": 6 }], 9: [function(t, a, i) {
      a.exports = {
        name: "unsharp_mask",
        fn: t("./unsharp_mask"),
        wasm_fn: t("./unsharp_mask_wasm"),
        wasm_src: t("./unsharp_mask_wasm_base64")
      };
    }, { "./unsharp_mask": 10, "./unsharp_mask_wasm": 11, "./unsharp_mask_wasm_base64": 12 }], 10: [function(t, a, i) {
      var n = t("glur/mono16");
      function o(l, s, h) {
        for (var c = s * h, m = new Uint16Array(c), d, v, b, g, w = 0; w < c; w++)
          d = l[4 * w], v = l[4 * w + 1], b = l[4 * w + 2], g = d >= v && d >= b ? d : v >= b && v >= d ? v : b, m[w] = g << 8;
        return m;
      }
      a.exports = function(s, h, c, m, d, v) {
        var b, g, w, B, M;
        if (!(m === 0 || d < 0.5)) {
          d > 2 && (d = 2);
          var _ = o(s, h, c), z = new Uint16Array(_);
          n(z, h, c, d);
          for (var D = m / 100 * 4096 + 0.5 | 0, R = v << 8, O = h * c, F = 0; F < O; F++)
            b = _[F], B = b - z[F], Math.abs(B) >= R && (g = b + (D * B + 2048 >> 12), g = g > 65280 ? 65280 : g, g = g < 0 ? 0 : g, b = b !== 0 ? b : 1, w = (g << 12) / b | 0, M = F * 4, s[M] = s[M] * w + 2048 >> 12, s[M + 1] = s[M + 1] * w + 2048 >> 12, s[M + 2] = s[M + 2] * w + 2048 >> 12);
        }
      };
    }, { "glur/mono16": 18 }], 11: [function(t, a, i) {
      a.exports = function(o, l, s, h, c, m) {
        if (!(h === 0 || c < 0.5)) {
          c > 2 && (c = 2);
          var d = l * s, v = d * 4, b = d * 2, g = d * 2, w = Math.max(l, s) * 4, B = 32, M = 0, _ = v, z = _ + b, D = z + g, R = D + g, O = R + w, F = this.__instance("unsharp_mask", v + b + g * 2 + w + B, {
            exp: Math.exp
          }), Q = new Uint32Array(o.buffer), H = new Uint32Array(this.__memory.buffer);
          H.set(Q);
          var L = F.exports.hsv_v16 || F.exports._hsv_v16;
          L(M, _, l, s), L = F.exports.blurMono16 || F.exports._blurMono16, L(_, z, D, R, O, l, s, c), L = F.exports.unsharp || F.exports._unsharp, L(M, M, _, z, l, s, h, m), Q.set(new Uint32Array(this.__memory.buffer, 0, d));
        }
      };
    }, {}], 12: [function(t, a, i) {
      a.exports = "AGFzbQEAAAAADAZkeWxpbmsAAAAAAAE0B2AAAGAEf39/fwBgBn9/f39/fwBgCH9/f39/f39/AGAIf39/f39/f30AYAJ9fwBgAXwBfAIZAgNlbnYDZXhwAAYDZW52Bm1lbW9yeQIAAAMHBgAFAgQBAwYGAX8AQQALB4oBCBFfX3dhc21fY2FsbF9jdG9ycwABFl9fYnVpbGRfZ2F1c3NpYW5fY29lZnMAAg5fX2dhdXNzMTZfbGluZQADCmJsdXJNb25vMTYABAdoc3ZfdjE2AAUHdW5zaGFycAAGDF9fZHNvX2hhbmRsZQMAGF9fd2FzbV9hcHBseV9kYXRhX3JlbG9jcwABCsUMBgMAAQvWAQEHfCABRNuGukOCGvs/IAC7oyICRAAAAAAAAADAohAAIgW2jDgCFCABIAKaEAAiAyADoCIGtjgCECABRAAAAAAAAPA/IAOhIgQgBKIgAyACIAKgokQAAAAAAADwP6AgBaGjIgS2OAIAIAEgBSAEmqIiB7Y4AgwgASADIAJEAAAAAAAA8D+gIASioiIItjgCCCABIAMgAkQAAAAAAADwv6AgBKKiIgK2OAIEIAEgByAIoCAFRAAAAAAAAPA/IAahoCIDo7Y4AhwgASAEIAKgIAOjtjgCGAuGBQMGfwl8An0gAyoCDCEVIAMqAgghFiADKgIUuyERIAMqAhC7IRACQCAEQQFrIghBAEgiCQRAIAIhByAAIQYMAQsgAiAALwEAuCIPIAMqAhi7oiIMIBGiIg0gDCAQoiAPIAMqAgS7IhOiIhQgAyoCALsiEiAPoqCgoCIOtjgCACACQQRqIQcgAEECaiEGIAhFDQAgCEEBIAhBAUgbIgpBf3MhCwJ/IAQgCmtBAXFFBEAgDiENIAgMAQsgAiANIA4gEKIgFCASIAAvAQK4Ig+ioKCgIg22OAIEIAJBCGohByAAQQRqIQYgDiEMIARBAmsLIQIgC0EAIARrRg0AA0AgByAMIBGiIA0gEKIgDyAToiASIAYvAQC4Ig6ioKCgIgy2OAIAIAcgDSARoiAMIBCiIA4gE6IgEiAGLwECuCIPoqCgoCINtjgCBCAHQQhqIQcgBkEEaiEGIAJBAkohACACQQJrIQIgAA0ACwsCQCAJDQAgASAFIAhsQQF0aiIAAn8gBkECay8BACICuCINIBW7IhKiIA0gFrsiE6KgIA0gAyoCHLuiIgwgEKKgIAwgEaKgIg8gB0EEayIHKgIAu6AiDkQAAAAAAADwQWMgDkQAAAAAAAAAAGZxBEAgDqsMAQtBAAs7AQAgCEUNACAGQQRrIQZBACAFa0EBdCEBA0ACfyANIBKiIAJB//8DcbgiDSAToqAgDyIOIBCioCAMIBGioCIPIAdBBGsiByoCALugIgxEAAAAAAAA8EFjIAxEAAAAAAAAAABmcQRAIAyrDAELQQALIQMgBi8BACECIAAgAWoiACADOwEAIAZBAmshBiAIQQFKIQMgDiEMIAhBAWshCCADDQALCwvRAgIBfwd8AkAgB0MAAAAAWw0AIARE24a6Q4Ia+z8gB0MAAAA/l7ujIglEAAAAAAAAAMCiEAAiDLaMOAIUIAQgCZoQACIKIAqgIg22OAIQIAREAAAAAAAA8D8gCqEiCyALoiAKIAkgCaCiRAAAAAAAAPA/oCAMoaMiC7Y4AgAgBCAMIAuaoiIOtjgCDCAEIAogCUQAAAAAAADwP6AgC6KiIg+2OAIIIAQgCiAJRAAAAAAAAPC/oCALoqIiCbY4AgQgBCAOIA+gIAxEAAAAAAAA8D8gDaGgIgqjtjgCHCAEIAsgCaAgCqO2OAIYIAYEQANAIAAgBSAIbEEBdGogAiAIQQF0aiADIAQgBSAGEAMgCEEBaiIIIAZHDQALCyAFRQ0AQQAhCANAIAIgBiAIbEEBdGogASAIQQF0aiADIAQgBiAFEAMgCEEBaiIIIAVHDQALCwtxAQN/IAIgA2wiBQRAA0AgASAAKAIAIgRBEHZB/wFxIgIgAiAEQQh2Qf8BcSIDIAMgBEH/AXEiBEkbIAIgA0sbIgYgBiAEIAIgBEsbIAMgBEsbQQh0OwEAIAFBAmohASAAQQRqIQAgBUEBayIFDQALCwuZAgIDfwF8IAQgBWwhBAJ/IAazQwAAgEWUQwAAyEKVu0QAAAAAAADgP6AiC5lEAAAAAAAA4EFjBEAgC6oMAQtBgICAgHgLIQUgBARAIAdBCHQhCUEAIQYDQCAJIAIgBkEBdCIHai8BACIBIAMgB2ovAQBrIgcgB0EfdSIIaiAIc00EQCAAIAZBAnQiCGoiCiAFIAdsQYAQakEMdSABaiIHQYD+AyAHQYD+A0gbIgdBACAHQQBKG0EMdCABQQEgARtuIgEgCi0AAGxBgBBqQQx2OgAAIAAgCEEBcmoiByABIActAABsQYAQakEMdjoAACAAIAhBAnJqIgcgASAHLQAAbEGAEGpBDHY6AAALIAZBAWoiBiAERw0ACwsL";
    }, {}], 13: [function(t, a, i) {
      var n = 100;
      function o(l, s) {
        this.create = l, this.available = [], this.acquired = {}, this.lastId = 1, this.timeoutId = 0, this.idle = s || 2e3;
      }
      o.prototype.acquire = function() {
        var l = this, s;
        return this.available.length !== 0 ? s = this.available.pop() : (s = this.create(), s.id = this.lastId++, s.release = function() {
          return l.release(s);
        }), this.acquired[s.id] = s, s;
      }, o.prototype.release = function(l) {
        var s = this;
        delete this.acquired[l.id], l.lastUsed = Date.now(), this.available.push(l), this.timeoutId === 0 && (this.timeoutId = setTimeout(function() {
          return s.gc();
        }, n));
      }, o.prototype.gc = function() {
        var l = this, s = Date.now();
        this.available = this.available.filter(function(h) {
          return s - h.lastUsed > l.idle ? (h.destroy(), !1) : !0;
        }), this.available.length !== 0 ? this.timeoutId = setTimeout(function() {
          return l.gc();
        }, n) : this.timeoutId = 0;
      }, a.exports = o;
    }, {}], 14: [function(t, a, i) {
      var n = 2;
      a.exports = function(l, s, h, c, m, d) {
        var v = h / l, b = c / s, g = (2 * d + n + 1) / m;
        if (g > 0.5) return [[h, c]];
        var w = Math.ceil(Math.log(Math.min(v, b)) / Math.log(g));
        if (w <= 1) return [[h, c]];
        for (var B = [], M = 0; M < w; M++) {
          var _ = Math.round(Math.pow(Math.pow(l, w - M - 1) * Math.pow(h, M + 1), 1 / w)), z = Math.round(Math.pow(Math.pow(s, w - M - 1) * Math.pow(c, M + 1), 1 / w));
          B.push([_, z]);
        }
        return B;
      };
    }, {}], 15: [function(t, a, i) {
      var n = 1e-5;
      function o(s) {
        var h = Math.round(s);
        return Math.abs(s - h) < n ? h : Math.floor(s);
      }
      function l(s) {
        var h = Math.round(s);
        return Math.abs(s - h) < n ? h : Math.ceil(s);
      }
      a.exports = function(h) {
        var c = h.toWidth / h.width, m = h.toHeight / h.height, d = o(h.srcTileSize * c) - 2 * h.destTileBorder, v = o(h.srcTileSize * m) - 2 * h.destTileBorder;
        if (d < 1 || v < 1)
          throw new Error("Internal error in pica: target tile width/height is too small.");
        var b, g, w, B, M, _, z = [], D;
        for (B = 0; B < h.toHeight; B += v)
          for (w = 0; w < h.toWidth; w += d)
            b = w - h.destTileBorder, b < 0 && (b = 0), M = w + d + h.destTileBorder - b, b + M >= h.toWidth && (M = h.toWidth - b), g = B - h.destTileBorder, g < 0 && (g = 0), _ = B + v + h.destTileBorder - g, g + _ >= h.toHeight && (_ = h.toHeight - g), D = {
              toX: b,
              toY: g,
              toWidth: M,
              toHeight: _,
              toInnerX: w,
              toInnerY: B,
              toInnerWidth: d,
              toInnerHeight: v,
              offsetX: b / c - o(b / c),
              offsetY: g / m - o(g / m),
              scaleX: c,
              scaleY: m,
              x: o(b / c),
              y: o(g / m),
              width: l(M / c),
              height: l(_ / m)
            }, z.push(D);
        return z;
      };
    }, {}], 16: [function(t, a, i) {
      function n(o) {
        return Object.prototype.toString.call(o);
      }
      a.exports.isCanvas = function(l) {
        var s = n(l);
        return s === "[object HTMLCanvasElement]" || s === "[object OffscreenCanvas]" || s === "[object Canvas]";
      }, a.exports.isImage = function(l) {
        return n(l) === "[object HTMLImageElement]";
      }, a.exports.isImageBitmap = function(l) {
        return n(l) === "[object ImageBitmap]";
      }, a.exports.limiter = function(l) {
        var s = 0, h = [];
        function c() {
          s < l && h.length && (s++, h.shift()());
        }
        return function(d) {
          return new Promise(function(v, b) {
            h.push(function() {
              d().then(function(g) {
                v(g), s--, c();
              }, function(g) {
                b(g), s--, c();
              });
            }), c();
          });
        };
      }, a.exports.cib_quality_name = function(l) {
        switch (l) {
          case 0:
            return "pixelated";
          case 1:
            return "low";
          case 2:
            return "medium";
        }
        return "high";
      }, a.exports.cib_support = function(l) {
        return Promise.resolve().then(function() {
          if (typeof createImageBitmap > "u")
            return !1;
          var s = l(100, 100);
          return createImageBitmap(s, 0, 0, 100, 100, {
            resizeWidth: 10,
            resizeHeight: 10,
            resizeQuality: "high"
          }).then(function(h) {
            var c = h.width === 10;
            return h.close(), s = null, c;
          });
        }).catch(function() {
          return !1;
        });
      }, a.exports.worker_offscreen_canvas_support = function() {
        return new Promise(function(l, s) {
          if (typeof OffscreenCanvas > "u") {
            l(!1);
            return;
          }
          function h(d) {
            if (typeof createImageBitmap > "u") {
              d.postMessage(!1);
              return;
            }
            Promise.resolve().then(function() {
              var v = new OffscreenCanvas(10, 10), b = v.getContext("2d");
              return b.rect(0, 0, 1, 1), createImageBitmap(v, 0, 0, 1, 1);
            }).then(function() {
              return d.postMessage(!0);
            }, function() {
              return d.postMessage(!1);
            });
          }
          var c = btoa("(".concat(h.toString(), ")(self);")), m = new Worker("data:text/javascript;base64,".concat(c));
          m.onmessage = function(d) {
            return l(d.data);
          }, m.onerror = s;
        }).then(function(l) {
          return l;
        }, function() {
          return !1;
        });
      }, a.exports.can_use_canvas = function(l) {
        var s = !1;
        try {
          var h = l(2, 1), c = h.getContext("2d"), m = c.createImageData(2, 1);
          m.data[0] = 12, m.data[1] = 23, m.data[2] = 34, m.data[3] = 255, m.data[4] = 45, m.data[5] = 56, m.data[6] = 67, m.data[7] = 255, c.putImageData(m, 0, 0), m = null, m = c.getImageData(0, 0, 2, 1), m.data[0] === 12 && m.data[1] === 23 && m.data[2] === 34 && m.data[3] === 255 && m.data[4] === 45 && m.data[5] === 56 && m.data[6] === 67 && m.data[7] === 255 && (s = !0);
        } catch {
        }
        return s;
      }, a.exports.cib_can_use_region = function() {
        return new Promise(function(l) {
          if (typeof createImageBitmap > "u") {
            l(!1);
            return;
          }
          var s = new Image();
          s.src = "data:image/jpeg;base64,/9j/4QBiRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAYAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAAAAABIAAAAAQAAAEgAAAAB/9sAQwAEAwMEAwMEBAMEBQQEBQYKBwYGBgYNCQoICg8NEBAPDQ8OERMYFBESFxIODxUcFRcZGRsbGxAUHR8dGh8YGhsa/9sAQwEEBQUGBQYMBwcMGhEPERoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoa/8IAEQgAAQACAwERAAIRAQMRAf/EABQAAQAAAAAAAAAAAAAAAAAAAAf/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAF/P//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAQUCf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Bf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Bf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEABj8Cf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8hf//aAAwDAQACAAMAAAAQH//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8Qf//Z", s.onload = function() {
            createImageBitmap(s, 0, 0, s.width, s.height).then(function(h) {
              h.width === s.width && h.height === s.height ? l(!0) : l(!1);
            }, function() {
              return l(!1);
            });
          }, s.onerror = function() {
            return l(!1);
          };
        });
      };
    }, {}], 17: [function(t, a, i) {
      a.exports = function() {
        var n = t("./mathlib"), o;
        onmessage = function(s) {
          var h = s.data.opts, c = !1;
          if (!h.src && h.srcBitmap) {
            var m = new OffscreenCanvas(h.width, h.height), d = m.getContext("2d", {
              alpha: !!h.alpha
            });
            d.drawImage(h.srcBitmap, 0, 0), h.src = d.getImageData(0, 0, h.width, h.height).data, m.width = m.height = 0, m = null, h.srcBitmap.close(), h.srcBitmap = null, c = !0;
          }
          o || (o = new n(s.data.features));
          var v = o.resizeAndUnsharp(h);
          if (c) {
            var b = new ImageData(new Uint8ClampedArray(v), h.toWidth, h.toHeight), g = new OffscreenCanvas(h.toWidth, h.toHeight), w = g.getContext("2d", {
              alpha: !!h.alpha
            });
            w.putImageData(b, 0, 0), createImageBitmap(g).then(function(B) {
              postMessage({
                bitmap: B
              }, [B]);
            });
          } else
            postMessage({
              data: v
            }, [v.buffer]);
        };
      };
    }, { "./mathlib": 1 }], 18: [function(t, a, i) {
      var n, o, l, s, h, c, m, d;
      function v(w) {
        w < 0.5 && (w = 0.5);
        var B = Math.exp(0.726 * 0.726) / w, M = Math.exp(-B), _ = Math.exp(-2 * B), z = (1 - M) * (1 - M) / (1 + 2 * B * M - _);
        return n = z, o = z * (B - 1) * M, l = z * (B + 1) * M, s = -z * _, h = 2 * M, c = -_, m = (n + o) / (1 - h - c), d = (l + s) / (1 - h - c), new Float32Array([n, o, l, s, h, c, m, d]);
      }
      function b(w, B, M, _, z, D) {
        var R, O, F, Q, H, L, K, t0, Z, y, C, k, E, T;
        for (Z = 0; Z < D; Z++) {
          for (L = Z * z, K = Z, t0 = 0, R = w[L], H = R * _[6], Q = H, C = _[0], k = _[1], E = _[4], T = _[5], y = 0; y < z; y++)
            O = w[L], F = O * C + R * k + Q * E + H * T, H = Q, Q = F, R = O, M[t0] = Q, t0++, L++;
          for (L--, t0--, K += D * (z - 1), R = w[L], H = R * _[7], Q = H, O = R, C = _[2], k = _[3], y = z - 1; y >= 0; y--)
            F = O * C + R * k + Q * E + H * T, H = Q, Q = F, R = O, O = w[L], B[K] = M[t0] + Q, L--, t0--, K -= D;
        }
      }
      function g(w, B, M, _) {
        if (_) {
          var z = new Uint16Array(w.length), D = new Float32Array(Math.max(B, M)), R = v(_);
          b(w, z, D, R, B, M), b(z, w, D, R, M, B);
        }
      }
      a.exports = g;
    }, {}], 19: [function(t, a, i) {
      typeof Object.create == "function" ? a.exports = function(o, l) {
        l && (o.super_ = l, o.prototype = Object.create(l.prototype, {
          constructor: {
            value: o,
            enumerable: !1,
            writable: !0,
            configurable: !0
          }
        }));
      } : a.exports = function(o, l) {
        if (l) {
          o.super_ = l;
          var s = function() {
          };
          s.prototype = l.prototype, o.prototype = new s(), o.prototype.constructor = o;
        }
      };
    }, {}], 20: [function(t, a, i) {
      var n = t("object-assign"), o = t("./lib/base64decode"), l = t("./lib/wa_detect"), s = {
        js: !0,
        wasm: !0
      };
      function h(c) {
        if (!(this instanceof h)) return new h(c);
        var m = n({}, s, c || {});
        if (this.options = m, this.__cache = {}, this.__init_promise = null, this.__modules = m.modules || {}, this.__memory = null, this.__wasm = {}, this.__isLE = new Uint32Array(new Uint8Array([1, 0, 0, 0]).buffer)[0] === 1, !this.options.js && !this.options.wasm)
          throw new Error('mathlib: at least "js" or "wasm" should be enabled');
      }
      h.prototype.has_wasm = l, h.prototype.use = function(c) {
        return this.__modules[c.name] = c, this.options.wasm && this.has_wasm() && c.wasm_fn ? this[c.name] = c.wasm_fn : this[c.name] = c.fn, this;
      }, h.prototype.init = function() {
        if (this.__init_promise) return this.__init_promise;
        if (!this.options.js && this.options.wasm && !this.has_wasm())
          return Promise.reject(new Error(`mathlib: only "wasm" was enabled, but it's not supported`));
        var c = this;
        return this.__init_promise = Promise.all(Object.keys(c.__modules).map(function(m) {
          var d = c.__modules[m];
          return !c.options.wasm || !c.has_wasm() || !d.wasm_fn || c.__wasm[m] ? null : WebAssembly.compile(c.__base64decode(d.wasm_src)).then(function(v) {
            c.__wasm[m] = v;
          });
        })).then(function() {
          return c;
        }), this.__init_promise;
      }, h.prototype.__base64decode = o, h.prototype.__reallocate = function(m) {
        if (!this.__memory)
          return this.__memory = new WebAssembly.Memory({
            initial: Math.ceil(m / (64 * 1024))
          }), this.__memory;
        var d = this.__memory.buffer.byteLength;
        return d < m && this.__memory.grow(Math.ceil((m - d) / (64 * 1024))), this.__memory;
      }, h.prototype.__instance = function(m, d, v) {
        if (d && this.__reallocate(d), !this.__wasm[m]) {
          var b = this.__modules[m];
          this.__wasm[m] = new WebAssembly.Module(this.__base64decode(b.wasm_src));
        }
        if (!this.__cache[m]) {
          var g = {
            memoryBase: 0,
            memory: this.__memory,
            tableBase: 0,
            table: new WebAssembly.Table({ initial: 0, element: "anyfunc" })
          };
          this.__cache[m] = new WebAssembly.Instance(this.__wasm[m], {
            env: n(g, v || {})
          });
        }
        return this.__cache[m];
      }, h.prototype.__align = function(m, d) {
        d = d || 8;
        var v = m % d;
        return m + (v ? d - v : 0);
      }, a.exports = h;
    }, { "./lib/base64decode": 21, "./lib/wa_detect": 22, "object-assign": 23 }], 21: [function(t, a, i) {
      var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
      a.exports = function(l) {
        for (var s = l.replace(/[\r\n=]/g, ""), h = s.length, c = new Uint8Array(h * 3 >> 2), m = 0, d = 0, v = 0; v < h; v++)
          v % 4 === 0 && v && (c[d++] = m >> 16 & 255, c[d++] = m >> 8 & 255, c[d++] = m & 255), m = m << 6 | n.indexOf(s.charAt(v));
        var b = h % 4 * 6;
        return b === 0 ? (c[d++] = m >> 16 & 255, c[d++] = m >> 8 & 255, c[d++] = m & 255) : b === 18 ? (c[d++] = m >> 10 & 255, c[d++] = m >> 2 & 255) : b === 12 && (c[d++] = m >> 4 & 255), c;
      };
    }, {}], 22: [function(t, a, i) {
      var n;
      a.exports = function() {
        if (typeof n < "u" || (n = !1, typeof WebAssembly > "u")) return n;
        try {
          var l = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 6, 1, 96, 1, 127, 1, 127, 3, 2, 1, 0, 5, 3, 1, 0, 1, 7, 8, 1, 4, 116, 101, 115, 116, 0, 0, 10, 16, 1, 14, 0, 32, 0, 65, 1, 54, 2, 0, 32, 0, 40, 2, 0, 11]), s = new WebAssembly.Module(l), h = new WebAssembly.Instance(s, {});
          return h.exports.test(4) !== 0 && (n = !0), n;
        } catch {
        }
        return n;
      };
    }, {}], 23: [function(t, a, i) {
      var n = Object.getOwnPropertySymbols, o = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable;
      function s(c) {
        if (c == null)
          throw new TypeError("Object.assign cannot be called with null or undefined");
        return Object(c);
      }
      function h() {
        try {
          if (!Object.assign)
            return !1;
          var c = new String("abc");
          if (c[5] = "de", Object.getOwnPropertyNames(c)[0] === "5")
            return !1;
          for (var m = {}, d = 0; d < 10; d++)
            m["_" + String.fromCharCode(d)] = d;
          var v = Object.getOwnPropertyNames(m).map(function(g) {
            return m[g];
          });
          if (v.join("") !== "0123456789")
            return !1;
          var b = {};
          return "abcdefghijklmnopqrst".split("").forEach(function(g) {
            b[g] = g;
          }), Object.keys(Object.assign({}, b)).join("") === "abcdefghijklmnopqrst";
        } catch {
          return !1;
        }
      }
      a.exports = h() ? Object.assign : function(c, m) {
        for (var d, v = s(c), b, g = 1; g < arguments.length; g++) {
          d = Object(arguments[g]);
          for (var w in d)
            o.call(d, w) && (v[w] = d[w]);
          if (n) {
            b = n(d);
            for (var B = 0; B < b.length; B++)
              l.call(d, b[B]) && (v[b[B]] = d[b[B]]);
          }
        }
        return v;
      };
    }, {}], 24: [function(t, a, i) {
      var n = arguments[3], o = arguments[4], l = arguments[5], s = JSON.stringify;
      a.exports = function(h, c) {
        for (var m, d = Object.keys(l), v = 0, b = d.length; v < b; v++) {
          var g = d[v], w = l[g].exports;
          if (w === h || w && w.default === h) {
            m = g;
            break;
          }
        }
        if (!m) {
          m = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);
          for (var B = {}, v = 0, b = d.length; v < b; v++) {
            var g = d[v];
            B[g] = g;
          }
          o[m] = [
            "function(require,module,exports){" + h + "(self); }",
            B
          ];
        }
        var M = Math.floor(Math.pow(16, 8) * Math.random()).toString(16), _ = {};
        _[m] = m, o[M] = [
          "function(require,module,exports){var f = require(" + s(m) + ");(f.default ? f.default : f)(self);}",
          _
        ];
        var z = {};
        D(M);
        function D(L) {
          z[L] = !0;
          for (var K in o[L][1]) {
            var t0 = o[L][1][K];
            z[t0] || D(t0);
          }
        }
        var R = "(" + n + ")({" + Object.keys(z).map(function(L) {
          return s(L) + ":[" + o[L][0] + "," + s(o[L][1]) + "]";
        }).join(",") + "},{},[" + s(M) + "])", O = window.URL || window.webkitURL || window.mozURL || window.msURL, F = new Blob([R], { type: "text/javascript" });
        if (c && c.bare)
          return F;
        var Q = O.createObjectURL(F), H = new Worker(Q);
        return H.objectURL = Q, H;
      };
    }, {}], "/index.js": [function(t, a, i) {
      function n(y, C) {
        return c(y) || h(y, C) || l(y, C) || o();
      }
      function o() {
        throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
      }
      function l(y, C) {
        if (y) {
          if (typeof y == "string") return s(y, C);
          var k = Object.prototype.toString.call(y).slice(8, -1);
          if (k === "Object" && y.constructor && (k = y.constructor.name), k === "Map" || k === "Set") return Array.from(y);
          if (k === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k)) return s(y, C);
        }
      }
      function s(y, C) {
        (C == null || C > y.length) && (C = y.length);
        for (var k = 0, E = new Array(C); k < C; k++)
          E[k] = y[k];
        return E;
      }
      function h(y, C) {
        var k = y == null ? null : typeof Symbol < "u" && y[Symbol.iterator] || y["@@iterator"];
        if (k != null) {
          var E = [], T = !0, Y = !1, q, j;
          try {
            for (k = k.call(y); !(T = (q = k.next()).done) && (E.push(q.value), !(C && E.length === C)); T = !0)
              ;
          } catch (V) {
            Y = !0, j = V;
          } finally {
            try {
              !T && k.return != null && k.return();
            } finally {
              if (Y) throw j;
            }
          }
          return E;
        }
      }
      function c(y) {
        if (Array.isArray(y)) return y;
      }
      var m = t("object-assign"), d = t("webworkify"), v = t("./lib/mathlib"), b = t("./lib/pool"), g = t("./lib/utils"), w = t("./lib/worker"), B = t("./lib/stepper"), M = t("./lib/tiler"), _ = {}, z = !1;
      try {
        typeof navigator < "u" && navigator.userAgent && (z = navigator.userAgent.indexOf("Safari") >= 0);
      } catch {
      }
      var D = 1;
      typeof navigator < "u" && (D = Math.min(navigator.hardwareConcurrency || 1, 4));
      var R = {
        tile: 1024,
        concurrency: D,
        features: ["js", "wasm", "ww"],
        idle: 2e3,
        createCanvas: function(C, k) {
          var E = document.createElement("canvas");
          return E.width = C, E.height = k, E;
        }
      }, O = {
        quality: 3,
        alpha: !1,
        unsharpAmount: 0,
        unsharpRadius: 0,
        unsharpThreshold: 0
      }, F = !1, Q = !1, H = !1, L = !1, K = !1;
      function t0() {
        return {
          value: d(w),
          destroy: function() {
            if (this.value.terminate(), typeof window < "u") {
              var C = window.URL || window.webkitURL || window.mozURL || window.msURL;
              C && C.revokeObjectURL && this.value.objectURL && C.revokeObjectURL(this.value.objectURL);
            }
          }
        };
      }
      function Z(y) {
        if (!(this instanceof Z)) return new Z(y);
        this.options = m({}, R, y || {});
        var C = "lk_".concat(this.options.concurrency);
        this.__limit = _[C] || g.limiter(this.options.concurrency), _[C] || (_[C] = this.__limit), this.features = {
          js: !1,
          // pure JS implementation, can be disabled for testing
          wasm: !1,
          // webassembly implementation for heavy functions
          cib: !1,
          // resize via createImageBitmap (only FF at this moment)
          ww: !1
          // webworkers
        }, this.__workersPool = null, this.__requested_features = [], this.__mathlib = null;
      }
      Z.prototype.init = function() {
        var y = this;
        if (this.__initPromise) return this.__initPromise;
        if (typeof ImageData < "u" && typeof Uint8ClampedArray < "u")
          try {
            new ImageData(new Uint8ClampedArray(400), 10, 10), F = !0;
          } catch {
          }
        typeof ImageBitmap < "u" && (ImageBitmap.prototype && ImageBitmap.prototype.close ? Q = !0 : this.debug("ImageBitmap does not support .close(), disabled"));
        var C = this.options.features.slice();
        if (C.indexOf("all") >= 0 && (C = ["cib", "wasm", "js", "ww"]), this.__requested_features = C, this.__mathlib = new v(C), C.indexOf("ww") >= 0 && typeof window < "u" && "Worker" in window)
          try {
            var k = t("webworkify")(function() {
            });
            k.terminate(), this.features.ww = !0;
            var E = "wp_".concat(JSON.stringify(this.options));
            _[E] ? this.__workersPool = _[E] : (this.__workersPool = new b(t0, this.options.idle), _[E] = this.__workersPool);
          } catch {
          }
        var T = this.__mathlib.init().then(function(V) {
          m(y.features, V.features);
        }), Y;
        Q ? Y = g.cib_support(this.options.createCanvas).then(function(V) {
          if (y.features.cib && C.indexOf("cib") < 0) {
            y.debug("createImageBitmap() resize supported, but disabled by config");
            return;
          }
          C.indexOf("cib") >= 0 && (y.features.cib = V);
        }) : Y = Promise.resolve(!1), H = g.can_use_canvas(this.options.createCanvas);
        var q;
        Q && F && C.indexOf("ww") !== -1 ? q = g.worker_offscreen_canvas_support() : q = Promise.resolve(!1), q = q.then(function(V) {
          L = V;
        });
        var j = g.cib_can_use_region().then(function(V) {
          K = V;
        });
        return this.__initPromise = Promise.all([T, Y, q, j]).then(function() {
          return y;
        }), this.__initPromise;
      }, Z.prototype.__invokeResize = function(y, C) {
        var k = this;
        return C.__mathCache = C.__mathCache || {}, Promise.resolve().then(function() {
          return k.features.ww ? new Promise(function(E, T) {
            var Y = k.__workersPool.acquire();
            C.cancelToken && C.cancelToken.catch(function(j) {
              return T(j);
            }), Y.value.onmessage = function(j) {
              Y.release(), j.data.err ? T(j.data.err) : E(j.data);
            };
            var q = [];
            y.src && q.push(y.src.buffer), y.srcBitmap && q.push(y.srcBitmap), Y.value.postMessage({
              opts: y,
              features: k.__requested_features,
              preload: {
                wasm_nodule: k.__mathlib.__
              }
            }, q);
          }) : {
            data: k.__mathlib.resizeAndUnsharp(y, C.__mathCache)
          };
        });
      }, Z.prototype.__extractTileData = function(y, C, k, E, T) {
        if (this.features.ww && L && // createImageBitmap doesn't work for images (Image, ImageBitmap) with Exif orientation in Chrome,
        // can use canvas because canvas doesn't have orientation;
        // see https://bugs.chromium.org/p/chromium/issues/detail?id=1220671
        (g.isCanvas(C) || K))
          return this.debug("Create tile for OffscreenCanvas"), createImageBitmap(E.srcImageBitmap || C, y.x, y.y, y.width, y.height).then(function(j) {
            return T.srcBitmap = j, T;
          });
        if (g.isCanvas(C))
          return E.srcCtx || (E.srcCtx = C.getContext("2d", {
            alpha: !!k.alpha
          })), this.debug("Get tile pixel data"), T.src = E.srcCtx.getImageData(y.x, y.y, y.width, y.height).data, T;
        this.debug("Draw tile imageBitmap/image to temporary canvas");
        var Y = this.options.createCanvas(y.width, y.height), q = Y.getContext("2d", {
          alpha: !!k.alpha
        });
        return q.globalCompositeOperation = "copy", q.drawImage(E.srcImageBitmap || C, y.x, y.y, y.width, y.height, 0, 0, y.width, y.height), this.debug("Get tile pixel data"), T.src = q.getImageData(0, 0, y.width, y.height).data, Y.width = Y.height = 0, T;
      }, Z.prototype.__landTileData = function(y, C, k) {
        var E;
        if (this.debug("Convert raw rgba tile result to ImageData"), C.bitmap)
          return k.toCtx.drawImage(C.bitmap, y.toX, y.toY), null;
        if (F)
          E = new ImageData(new Uint8ClampedArray(C.data), y.toWidth, y.toHeight);
        else if (E = k.toCtx.createImageData(y.toWidth, y.toHeight), E.data.set)
          E.data.set(C.data);
        else
          for (var T = E.data.length - 1; T >= 0; T--)
            E.data[T] = C.data[T];
        return this.debug("Draw tile"), z ? k.toCtx.putImageData(E, y.toX, y.toY, y.toInnerX - y.toX, y.toInnerY - y.toY, y.toInnerWidth + 1e-5, y.toInnerHeight + 1e-5) : k.toCtx.putImageData(E, y.toX, y.toY, y.toInnerX - y.toX, y.toInnerY - y.toY, y.toInnerWidth, y.toInnerHeight), null;
      }, Z.prototype.__tileAndResize = function(y, C, k) {
        var E = this, T = {
          srcCtx: null,
          srcImageBitmap: null,
          isImageBitmapReused: !1,
          toCtx: null
        }, Y = function(j) {
          return E.__limit(function() {
            if (k.canceled) return k.cancelToken;
            var V = {
              width: j.width,
              height: j.height,
              toWidth: j.toWidth,
              toHeight: j.toHeight,
              scaleX: j.scaleX,
              scaleY: j.scaleY,
              offsetX: j.offsetX,
              offsetY: j.offsetY,
              quality: k.quality,
              alpha: k.alpha,
              unsharpAmount: k.unsharpAmount,
              unsharpRadius: k.unsharpRadius,
              unsharpThreshold: k.unsharpThreshold
            };
            return E.debug("Invoke resize math"), Promise.resolve(V).then(function(a0) {
              return E.__extractTileData(j, y, k, T, a0);
            }).then(function(a0) {
              return E.debug("Invoke resize math"), E.__invokeResize(a0, k);
            }).then(function(a0) {
              return k.canceled ? k.cancelToken : (T.srcImageData = null, E.__landTileData(j, a0, T));
            });
          });
        };
        return Promise.resolve().then(function() {
          if (T.toCtx = C.getContext("2d", {
            alpha: !!k.alpha
          }), g.isCanvas(y)) return null;
          if (g.isImageBitmap(y))
            return T.srcImageBitmap = y, T.isImageBitmapReused = !0, null;
          if (g.isImage(y))
            return Q ? (E.debug("Decode image via createImageBitmap"), createImageBitmap(y).then(function(q) {
              T.srcImageBitmap = q;
            }).catch(function(q) {
              return null;
            })) : null;
          throw new Error('Pica: ".from" should be Image, Canvas or ImageBitmap');
        }).then(function() {
          if (k.canceled) return k.cancelToken;
          E.debug("Calculate tiles");
          var q = M({
            width: k.width,
            height: k.height,
            srcTileSize: E.options.tile,
            toWidth: k.toWidth,
            toHeight: k.toHeight,
            destTileBorder: k.__destTileBorder
          }), j = q.map(function(a0) {
            return Y(a0);
          });
          function V(a0) {
            a0.srcImageBitmap && (a0.isImageBitmapReused || a0.srcImageBitmap.close(), a0.srcImageBitmap = null);
          }
          return E.debug("Process tiles"), Promise.all(j).then(function() {
            return E.debug("Finished!"), V(T), C;
          }, function(a0) {
            throw V(T), a0;
          });
        });
      }, Z.prototype.__processStages = function(y, C, k, E) {
        var T = this;
        if (E.canceled) return E.cancelToken;
        var Y = y.shift(), q = n(Y, 2), j = q[0], V = q[1], a0 = y.length === 0;
        E = m({}, E, {
          toWidth: j,
          toHeight: V,
          // only use user-defined quality for the last stage,
          // use simpler (Hamming) filter for the first stages where
          // scale factor is large enough (more than 2-3)
          quality: a0 ? E.quality : Math.min(1, E.quality)
        });
        var g0;
        return a0 || (g0 = this.options.createCanvas(j, V)), this.__tileAndResize(C, a0 ? k : g0, E).then(function() {
          return a0 ? k : (E.width = j, E.height = V, T.__processStages(y, g0, k, E));
        }).then(function(me) {
          return g0 && (g0.width = g0.height = 0), me;
        });
      }, Z.prototype.__resizeViaCreateImageBitmap = function(y, C, k) {
        var E = this, T = C.getContext("2d", {
          alpha: !!k.alpha
        });
        return this.debug("Resize via createImageBitmap()"), createImageBitmap(y, {
          resizeWidth: k.toWidth,
          resizeHeight: k.toHeight,
          resizeQuality: g.cib_quality_name(k.quality)
        }).then(function(Y) {
          if (k.canceled) return k.cancelToken;
          if (!k.unsharpAmount)
            return T.drawImage(Y, 0, 0), Y.close(), T = null, E.debug("Finished!"), C;
          E.debug("Unsharp result");
          var q = E.options.createCanvas(k.toWidth, k.toHeight), j = q.getContext("2d", {
            alpha: !!k.alpha
          });
          j.drawImage(Y, 0, 0), Y.close();
          var V = j.getImageData(0, 0, k.toWidth, k.toHeight);
          return E.__mathlib.unsharp_mask(V.data, k.toWidth, k.toHeight, k.unsharpAmount, k.unsharpRadius, k.unsharpThreshold), T.putImageData(V, 0, 0), q.width = q.height = 0, V = j = q = T = null, E.debug("Finished!"), C;
        });
      }, Z.prototype.resize = function(y, C, k) {
        var E = this;
        this.debug("Start resize...");
        var T = m({}, O);
        if (isNaN(k) ? k && (T = m(T, k)) : T = m(T, {
          quality: k
        }), T.toWidth = C.width, T.toHeight = C.height, T.width = y.naturalWidth || y.width, T.height = y.naturalHeight || y.height, C.width === 0 || C.height === 0)
          return Promise.reject(new Error("Invalid output size: ".concat(C.width, "x").concat(C.height)));
        T.unsharpRadius > 2 && (T.unsharpRadius = 2), T.canceled = !1, T.cancelToken && (T.cancelToken = T.cancelToken.then(function(q) {
          throw T.canceled = !0, q;
        }, function(q) {
          throw T.canceled = !0, q;
        }));
        var Y = 3;
        return T.__destTileBorder = Math.ceil(Math.max(Y, 2.5 * T.unsharpRadius | 0)), this.init().then(function() {
          if (T.canceled) return T.cancelToken;
          if (E.features.cib)
            return E.__resizeViaCreateImageBitmap(y, C, T);
          if (!H) {
            var q = new Error("Pica: cannot use getImageData on canvas, make sure fingerprinting protection isn't enabled");
            throw q.code = "ERR_GET_IMAGE_DATA", q;
          }
          var j = B(T.width, T.height, T.toWidth, T.toHeight, E.options.tile, T.__destTileBorder);
          return E.__processStages(j, y, C, T);
        });
      }, Z.prototype.resizeBuffer = function(y) {
        var C = this, k = m({}, O, y);
        return this.init().then(function() {
          return C.__mathlib.resizeAndUnsharp(k);
        });
      }, Z.prototype.toBlob = function(y, C, k) {
        return C = C || "image/png", new Promise(function(E) {
          if (y.toBlob) {
            y.toBlob(function(V) {
              return E(V);
            }, C, k);
            return;
          }
          if (y.convertToBlob) {
            E(y.convertToBlob({
              type: C,
              quality: k
            }));
            return;
          }
          for (var T = atob(y.toDataURL(C, k).split(",")[1]), Y = T.length, q = new Uint8Array(Y), j = 0; j < Y; j++)
            q[j] = T.charCodeAt(j);
          E(new Blob([q], {
            type: C
          }));
        });
      }, Z.prototype.debug = function() {
      }, a.exports = Z;
    }, { "./lib/mathlib": 1, "./lib/pool": 13, "./lib/stepper": 14, "./lib/tiler": 15, "./lib/utils": 16, "./lib/worker": 17, "object-assign": 23, webworkify: 24 }] }, {}, [])("/index.js");
  });
}), qe = ta(function(r) {
  function e(l, s) {
    var h = new Error(l);
    return h.code = s, h;
  }
  function t(l) {
    for (var s = l.toString(16).toUpperCase(), h = 2 - s.length; h > 0; h--) s = "0" + s;
    return "0x" + s;
  }
  function a(l) {
    try {
      return unescape(encodeURIComponent(l));
    } catch {
      return l;
    }
  }
  function i(l) {
    try {
      return decodeURIComponent(escape(l));
    } catch {
      return l;
    }
  }
  function n(l) {
    return Object.prototype.toString.call(l) === "[object Uint8Array]";
  }
  function o(l, s, h) {
    this.input = l.subarray(s, h), this.start = s;
    var c = String.fromCharCode.apply(null, this.input.subarray(0, 4));
    if (c !== "II*\0" && c !== "MM\0*")
      throw e("invalid TIFF signature", "EBADDATA");
    this.big_endian = c[0] === "M";
  }
  o.prototype.each = function(l) {
    this.aborted = !1;
    var s = this.read_uint32(4);
    for (this.ifds_to_read = [{
      id: 0,
      offset: s
    }]; this.ifds_to_read.length > 0 && !this.aborted; ) {
      var h = this.ifds_to_read.shift();
      h.offset && this.scan_ifd(h.id, h.offset, l);
    }
  }, o.prototype.filter = function(l) {
    var s = {};
    s.ifd0 = { id: 0, entries: [] }, this.each(function(d) {
      l(d) === !1 && !d.is_subifd_link || d.is_subifd_link && d.count !== 1 && d.format !== 4 || (s["ifd" + d.ifd] || (s["ifd" + d.ifd] = { id: d.ifd, entries: [] }), s["ifd" + d.ifd].entries.push(d));
    }), delete s.ifd1;
    var h = 8;
    Object.keys(s).forEach(function(d) {
      h += 2, s[d].entries.forEach(function(v) {
        h += 12 + (v.data_length > 4 ? Math.ceil(v.data_length / 2) * 2 : 0);
      }), h += 4;
    }), this.output = new Uint8Array(h), this.output[0] = this.output[1] = (this.big_endian ? "M" : "I").charCodeAt(0), this.write_uint16(2, 42);
    var c = 8, m = this;
    if (this.write_uint32(4, c), Object.keys(s).forEach(function(d) {
      s[d].written_offset = c;
      var v = c, b = v + 2 + s[d].entries.length * 12 + 4;
      c = b, m.write_uint16(v, s[d].entries.length), s[d].entries.sort(function(w, B) {
        return w.tag - B.tag;
      }).forEach(function(w, B) {
        var M = v + 2 + B * 12;
        m.write_uint16(M, w.tag), m.write_uint16(M + 2, w.format), m.write_uint32(M + 4, w.count), w.is_subifd_link ? s["ifd" + w.tag] && (s["ifd" + w.tag].link_offset = M + 8) : w.data_length <= 4 ? m.output.set(
          m.input.subarray(w.data_offset - m.start, w.data_offset - m.start + 4),
          M + 8
        ) : (m.write_uint32(M + 8, c), m.output.set(
          m.input.subarray(w.data_offset - m.start, w.data_offset - m.start + w.data_length),
          c
        ), c += Math.ceil(w.data_length / 2) * 2);
      });
      var g = s["ifd" + (s[d].id + 1)];
      g && (g.link_offset = b - 4);
    }), Object.keys(s).forEach(function(d) {
      s[d].written_offset && s[d].link_offset && m.write_uint32(s[d].link_offset, s[d].written_offset);
    }), this.output.length !== c) throw e("internal error: incorrect buffer size allocated");
    return this.output;
  }, o.prototype.read_uint16 = function(l) {
    var s = this.input;
    if (l + 2 > s.length) throw e("unexpected EOF", "EBADDATA");
    return this.big_endian ? s[l] * 256 + s[l + 1] : s[l] + s[l + 1] * 256;
  }, o.prototype.read_uint32 = function(l) {
    var s = this.input;
    if (l + 4 > s.length) throw e("unexpected EOF", "EBADDATA");
    return this.big_endian ? s[l] * 16777216 + s[l + 1] * 65536 + s[l + 2] * 256 + s[l + 3] : s[l] + s[l + 1] * 256 + s[l + 2] * 65536 + s[l + 3] * 16777216;
  }, o.prototype.write_uint16 = function(l, s) {
    var h = this.output;
    this.big_endian ? (h[l] = s >>> 8 & 255, h[l + 1] = s & 255) : (h[l] = s & 255, h[l + 1] = s >>> 8 & 255);
  }, o.prototype.write_uint32 = function(l, s) {
    var h = this.output;
    this.big_endian ? (h[l] = s >>> 24 & 255, h[l + 1] = s >>> 16 & 255, h[l + 2] = s >>> 8 & 255, h[l + 3] = s & 255) : (h[l] = s & 255, h[l + 1] = s >>> 8 & 255, h[l + 2] = s >>> 16 & 255, h[l + 3] = s >>> 24 & 255);
  }, o.prototype.is_subifd_link = function(l, s) {
    return l === 0 && s === 34665 || // SubIFD
    l === 0 && s === 34853 || // GPS Info
    l === 34665 && s === 40965;
  }, o.prototype.exif_format_length = function(l) {
    switch (l) {
      case 1:
      // byte
      case 2:
      // ascii
      case 6:
      // sbyte
      case 7:
        return 1;
      case 3:
      // short
      case 8:
        return 2;
      case 4:
      // long
      case 9:
      // slong
      case 11:
        return 4;
      case 5:
      // rational
      case 10:
      // srational
      case 12:
        return 8;
      default:
        return 0;
    }
  }, o.prototype.exif_format_read = function(l, s) {
    var h;
    switch (l) {
      case 1:
      // byte
      case 2:
        return h = this.input[s], h;
      case 6:
        return h = this.input[s], h | (h & 128) * 33554430;
      case 3:
        return h = this.read_uint16(s), h;
      case 8:
        return h = this.read_uint16(s), h | (h & 32768) * 131070;
      case 4:
        return h = this.read_uint32(s), h;
      case 9:
        return h = this.read_uint32(s), h | 0;
      case 5:
      // rational
      case 10:
      // srational
      case 11:
      // float
      case 12:
        return null;
      // not implemented
      case 7:
        return null;
      // blob
      default:
        return null;
    }
  }, o.prototype.scan_ifd = function(l, s, h) {
    var c = this.read_uint16(s);
    s += 2;
    for (var m = 0; m < c; m++) {
      var d = this.read_uint16(s), v = this.read_uint16(s + 2), b = this.read_uint32(s + 4), g = this.exif_format_length(v), w = b * g, B = w <= 4 ? s + 8 : this.read_uint32(s + 8), M = !1;
      if (B + w > this.input.length)
        throw e("unexpected EOF", "EBADDATA");
      for (var _ = [], z = B, D = 0; D < b; D++, z += g) {
        var R = this.exif_format_read(v, z);
        if (R === null) {
          _ = null;
          break;
        }
        _.push(R);
      }
      if (Array.isArray(_) && v === 2) {
        try {
          _ = i(String.fromCharCode.apply(null, _));
        } catch {
          _ = null;
        }
        _ && _[_.length - 1] === "\0" && (_ = _.slice(0, -1));
      }
      this.is_subifd_link(l, d) && Array.isArray(_) && Number.isInteger(_[0]) && _[0] > 0 && (this.ifds_to_read.push({
        id: d,
        offset: _[0]
      }), M = !0);
      var O = {
        is_big_endian: this.big_endian,
        ifd: l,
        tag: d,
        format: v,
        count: b,
        entry_offset: s + this.start,
        data_length: w,
        data_offset: B + this.start,
        value: _,
        is_subifd_link: M
      };
      if (h(O) === !1) {
        this.aborted = !0;
        return;
      }
      s += 12;
    }
    l === 0 && this.ifds_to_read.push({
      id: 1,
      offset: this.read_uint32(s)
    });
  }, r.exports.is_jpeg = function(l) {
    return l.length >= 4 && l[0] === 255 && l[1] === 216 && l[2] === 255;
  }, r.exports.jpeg_segments_each = function(l, s) {
    if (!n(l))
      throw e("Invalid argument (jpeg_bin), Uint8Array expected", "EINVAL");
    if (typeof s != "function")
      throw e("Invalid argument (on_segment), Function expected", "EINVAL");
    if (!r.exports.is_jpeg(l))
      throw e("Unknown file format", "ENOTJPEG");
    for (var h = 0, c = l.length, m = !1; ; ) {
      var d, v;
      if (h + 1 >= c) throw e("Unexpected EOF", "EBADDATA");
      var b = l[h], g = l[h + 1];
      if (b === 255 && g === 255)
        d = 255, v = 1;
      else if (b === 255 && g !== 0) {
        if (d = g, v = 2, !(208 <= d && d <= 217 || d === 1)) {
          if (h + 3 >= c) throw e("Unexpected EOF", "EBADDATA");
          if (v += l[h + 2] * 256 + l[h + 3], v < 2) throw e("Invalid segment length", "EBADDATA");
          if (h + v - 1 >= c) throw e("Unexpected EOF", "EBADDATA");
        }
        m && (d >= 208 && d <= 215 || (m = !1)), d === 218 && (m = !0);
      } else if (m)
        for (var w = h + 1; ; w++) {
          if (w >= c) throw e("Unexpected EOF", "EBADDATA");
          if (l[w] === 255) {
            if (w + 1 >= c) throw e("Unexpected EOF", "EBADDATA");
            if (l[w + 1] !== 0) {
              d = 0, v = w - h;
              break;
            }
          }
        }
      else
        throw e("Unexpected byte at segment start: " + t(b) + " (offset " + t(h) + ")", "EBADDATA");
      if (s({ code: d, offset: h, length: v }) === !1 || d === 217) break;
      h += v;
    }
  }, r.exports.jpeg_segments_filter = function(l, s) {
    if (!n(l))
      throw e("Invalid argument (jpeg_bin), Uint8Array expected", "EINVAL");
    if (typeof s != "function")
      throw e("Invalid argument (on_segment), Function expected", "EINVAL");
    var h = [], c = 0;
    r.exports.jpeg_segments_each(l, function(v) {
      var b = s(v);
      if (n(b))
        h.push({ data: b }), c += b.length;
      else if (Array.isArray(b))
        b.filter(n).forEach(function(w) {
          h.push({ data: w }), c += w.length;
        });
      else if (b !== !1) {
        var g = { start: v.offset, end: v.offset + v.length };
        h.length > 0 && h[h.length - 1].end === g.start ? h[h.length - 1].end = g.end : h.push(g), c += v.length;
      }
    });
    var m = new Uint8Array(c), d = 0;
    return h.forEach(function(v) {
      var b = v.data || l.subarray(v.start, v.end);
      m.set(b, d), d += b.length;
    }), m;
  }, r.exports.jpeg_exif_tags_each = function(l, s) {
    if (!n(l))
      throw e("Invalid argument (jpeg_bin), Uint8Array expected", "EINVAL");
    if (typeof s != "function")
      throw e("Invalid argument (on_exif_entry), Function expected", "EINVAL");
    r.exports.jpeg_segments_each(l, function(h) {
      if (h.code === 218) return !1;
      if (h.code === 225 && h.length >= 10 && l[h.offset + 4] === 69 && l[h.offset + 5] === 120 && l[h.offset + 6] === 105 && l[h.offset + 7] === 102 && l[h.offset + 8] === 0 && l[h.offset + 9] === 0)
        return new o(l, h.offset + 10, h.offset + h.length).each(s), !1;
    });
  }, r.exports.jpeg_exif_tags_filter = function(l, s) {
    if (!n(l))
      throw e("Invalid argument (jpeg_bin), Uint8Array expected", "EINVAL");
    if (typeof s != "function")
      throw e("Invalid argument (on_exif_entry), Function expected", "EINVAL");
    var h = !1;
    return r.exports.jpeg_segments_filter(l, function(c) {
      if (!h && (c.code === 218 && (h = !0), c.code === 225 && c.length >= 10 && l[c.offset + 4] === 69 && l[c.offset + 5] === 120 && l[c.offset + 6] === 105 && l[c.offset + 7] === 102 && l[c.offset + 8] === 0 && l[c.offset + 9] === 0)) {
        var m = new o(l, c.offset + 10, c.offset + c.length).filter(s);
        if (!m) return !1;
        var d = new Uint8Array(10);
        return d.set(l.slice(c.offset, c.offset + 10)), d[2] = m.length + 8 >>> 8 & 255, d[3] = m.length + 8 & 255, h = !0, [d, m];
      }
    });
  }, r.exports.jpeg_add_comment = function(l, s) {
    var h = !1, c = 0;
    return r.exports.jpeg_segments_filter(l, function(m) {
      if (c++, !(c === 1 && m.code === 216) && !(c === 2 && m.code === 224) && !h) {
        s = a(s);
        var d = new Uint8Array(5 + s.length), v = 0;
        return d[v++] = 255, d[v++] = 254, d[v++] = s.length + 3 >>> 8 & 255, d[v++] = s.length + 3 & 255, s.split("").forEach(function(b) {
          d[v++] = b.charCodeAt(0) & 255;
        }), d[v++] = 0, h = !0, [d, l.subarray(m.offset, m.offset + m.length)];
      }
    });
  };
});
function Fi(r) {
  return this._getUint8Array(r.blob).then(function(e) {
    if (r.is_jpeg = qe.is_jpeg(e), !r.is_jpeg) return Promise.resolve(r);
    r.orig_blob = r.blob;
    try {
      var t, a;
      if (qe.jpeg_exif_tags_each(e, function(n) {
        if (n.ifd === 0 && n.tag === 274 && Array.isArray(n.value))
          return r.orientation = n.value[0] || 1, t = n.is_big_endian, a = n.data_offset, !1;
      }), a) {
        var i = t ? new Uint8Array([0, 1]) : new Uint8Array([1, 0]);
        r.blob = new Blob([
          e.slice(0, a),
          i,
          e.slice(a + 2)
        ], { type: "image/jpeg" });
      }
    } catch {
    }
    return r;
  });
}
function Ri(r) {
  if (!r.is_jpeg) return Promise.resolve(r);
  var e = r.orientation - 1;
  if (!e) return Promise.resolve(r);
  var t;
  e & 4 ? t = this.pica.options.createCanvas(r.out_canvas.height, r.out_canvas.width) : t = this.pica.options.createCanvas(r.out_canvas.width, r.out_canvas.height);
  var a = t.getContext("2d");
  return a.save(), e & 1 && a.transform(-1, 0, 0, 1, t.width, 0), e & 2 && a.transform(-1, 0, 0, -1, t.width, t.height), e & 4 && a.transform(0, 1, 1, 0, 0, 0), a.drawImage(r.out_canvas, 0, 0), a.restore(), r.out_canvas.width = r.out_canvas.height = 0, r.out_canvas = t, Promise.resolve(r);
}
function Qi(r) {
  return r.is_jpeg ? Promise.all([
    this._getUint8Array(r.blob),
    this._getUint8Array(r.out_blob)
  ]).then(function(e) {
    var t = e[0], a = e[1];
    if (!qe.is_jpeg(t)) return Promise.resolve(r);
    var i = [];
    return qe.jpeg_segments_each(t, function(n) {
      if (n.code === 218) return !1;
      i.push(n);
    }), i = i.filter(function(n) {
      return n.code === 226 ? !1 : n.code >= 224 && n.code < 240 || n.code === 254;
    }).map(function(n) {
      return t.slice(n.offset, n.offset + n.length);
    }), r.out_blob = new Blob(
      // intentionally omitting expected JFIF segment (offset 2 to 20)
      [a.slice(0, 2)].concat(i).concat([a.slice(20)]),
      { type: "image/jpeg" }
    ), r;
  }) : Promise.resolve(r);
}
function Oi(r) {
  r.before("_blob_to_image", Fi), r.after("_transform", Ri), r.after("_create_blob", Qi);
}
var qi = Oi, Pi = {
  assign: qi
};
function y0(r) {
  if (!(this instanceof y0)) return new y0(r);
  r = r || {}, this.pica = r.pica || ra({}), this.initialized = !1, this.utils = Lt;
}
y0.prototype.use = function(r) {
  var e = [this].concat(Array.prototype.slice.call(arguments, 1));
  return r.apply(r, e), this;
};
y0.prototype.init = function() {
  this.use(Pi.assign);
};
y0.prototype.toBlob = function(r, e) {
  var t = Lt.assign({ max: 1 / 0 }, e), a = {
    blob: r,
    opts: t
  };
  return this.initialized || (this.init(), this.initialized = !0), Promise.resolve(a).then(this._blob_to_image).then(this._calculate_size).then(this._transform).then(this._cleanup).then(this._create_blob).then(function(i) {
    return i.out_canvas.width = i.out_canvas.height = 0, i.out_blob;
  });
};
y0.prototype.toCanvas = function(r, e) {
  var t = Lt.assign({ max: 1 / 0 }, e), a = {
    blob: r,
    opts: t
  };
  return this.initialized || (this.init(), this.initialized = !0), Promise.resolve(a).then(this._blob_to_image).then(this._calculate_size).then(this._transform).then(this._cleanup).then(function(i) {
    return i.out_canvas;
  });
};
y0.prototype.before = function(r, e) {
  if (!this[r]) throw new Error('Method "' + r + '" does not exist');
  if (typeof e != "function") throw new Error('Invalid argument "fn", function expected');
  var t = this[r], a = this;
  return this[r] = function(i) {
    return e.call(a, i).then(function(n) {
      return t.call(a, n);
    });
  }, this;
};
y0.prototype.after = function(r, e) {
  if (!this[r]) throw new Error('Method "' + r + '" does not exist');
  if (typeof e != "function") throw new Error('Invalid argument "fn", function expected');
  var t = this[r], a = this;
  return this[r] = function(i) {
    return t.call(a, i).then(function(n) {
      return e.call(a, n);
    });
  }, this;
};
y0.prototype._blob_to_image = function(r) {
  var e = window.URL || window.webkitURL || window.mozURL || window.msURL;
  return r.image = document.createElement("img"), r.image_url = e.createObjectURL(r.blob), r.image.src = r.image_url, new Promise(function(t, a) {
    r.image.onerror = function() {
      a(new Error("ImageBlobReduce: failed to create Image() from blob"));
    }, r.image.onload = function() {
      t(r);
    };
  });
};
y0.prototype._calculate_size = function(r) {
  var e = r.opts.max / Math.max(r.image.width, r.image.height);
  return e > 1 && (e = 1), r.transform_width = Math.max(Math.round(r.image.width * e), 1), r.transform_height = Math.max(Math.round(r.image.height * e), 1), r.scale_factor = e, Promise.resolve(r);
};
y0.prototype._transform = function(r) {
  r.out_canvas = this.pica.options.createCanvas(r.transform_width, r.transform_height), r.transform_width = null, r.transform_height = null;
  var e = { alpha: r.blob.type === "image/png" };
  return this.utils.assign(e, this.utils.pick_pica_resize_options(r.opts)), this.pica.resize(r.image, r.out_canvas, e).then(function() {
    return r;
  });
};
y0.prototype._cleanup = function(r) {
  r.image.src = "", r.image = null;
  var e = window.URL || window.webkitURL || window.mozURL || window.msURL;
  return e.revokeObjectURL && e.revokeObjectURL(r.image_url), r.image_url = null, Promise.resolve(r);
};
y0.prototype._create_blob = function(r) {
  return this.pica.toBlob(r.out_canvas, r.blob.type).then(function(e) {
    return r.out_blob = e, r;
  });
};
y0.prototype._getUint8Array = function(r) {
  return r.arrayBuffer ? r.arrayBuffer().then(function(e) {
    return new Uint8Array(e);
  }) : new Promise(function(e, t) {
    var a = new FileReader();
    a.readAsArrayBuffer(r), a.onload = function() {
      e(new Uint8Array(a.result));
    }, a.onerror = function() {
      t(new Error("ImageBlobReduce: failed to load data from input blob")), a.abort();
    }, a.onabort = function() {
      t(new Error("ImageBlobReduce: failed to load data from input blob (aborted)"));
    };
  });
};
y0.pica = ra;
var Ni = y0;
const Ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Ni
}, Symbol.toStringTag, { value: "Module" }));
(() => {
  Path2D.prototype.roundRect ??= r, globalThis.CanvasRenderingContext2D && (globalThis.CanvasRenderingContext2D.prototype.roundRect ??= r), globalThis.OffscreenCanvasRenderingContext2D && (globalThis.OffscreenCanvasRenderingContext2D.prototype.roundRect ??= r);
  function r(a, i, n, o, l) {
    if (![a, i, n, o].every((_) => Number.isFinite(_)))
      return;
    l = g(l);
    let s, h, c, m;
    if (l.length === 4)
      s = B(l[0]), h = B(l[1]), c = B(l[2]), m = B(l[3]);
    else if (l.length === 3)
      s = B(l[0]), h = B(l[1]), m = B(l[1]), c = B(l[2]);
    else if (l.length === 2)
      s = B(l[0]), c = B(l[0]), h = B(l[1]), m = B(l[1]);
    else if (l.length === 1)
      s = B(l[0]), h = B(l[0]), c = B(l[0]), m = B(l[0]);
    else
      throw new RangeError(`${e(this)} ${l.length} is not a valid size for radii sequence.`);
    const d = [s, h, c, m], v = d.find(({ x: _, y: z }) => _ < 0 || z < 0);
    if (v?.x < 0 ? v.x : v?.y, d.some(({ x: _, y: z }) => !Number.isFinite(_) || !Number.isFinite(z)))
      return;
    if (v)
      throw new RangeError(`${e(this)} Radius value ${v} is negative.`);
    M(d), n < 0 && o < 0 ? (this.moveTo(a - s.x, i), this.ellipse(a + n + h.x, i - h.y, h.x, h.y, 0, -Math.PI * 1.5, -Math.PI), this.ellipse(a + n + c.x, i + o + c.y, c.x, c.y, 0, -Math.PI, -Math.PI / 2), this.ellipse(a - m.x, i + o + m.y, m.x, m.y, 0, -Math.PI / 2, 0), this.ellipse(a - s.x, i - s.y, s.x, s.y, 0, 0, -Math.PI / 2)) : n < 0 ? (this.moveTo(a - s.x, i), this.ellipse(a + n + h.x, i + h.y, h.x, h.y, 0, -Math.PI / 2, -Math.PI, 1), this.ellipse(a + n + c.x, i + o - c.y, c.x, c.y, 0, -Math.PI, -Math.PI * 1.5, 1), this.ellipse(a - m.x, i + o - m.y, m.x, m.y, 0, Math.PI / 2, 0, 1), this.ellipse(a - s.x, i + s.y, s.x, s.y, 0, 0, -Math.PI / 2, 1)) : o < 0 ? (this.moveTo(a + s.x, i), this.ellipse(a + n - h.x, i - h.y, h.x, h.y, 0, Math.PI / 2, 0, 1), this.ellipse(a + n - c.x, i + o + c.y, c.x, c.y, 0, 0, -Math.PI / 2, 1), this.ellipse(a + m.x, i + o + m.y, m.x, m.y, 0, -Math.PI / 2, -Math.PI, 1), this.ellipse(a + s.x, i - s.y, s.x, s.y, 0, -Math.PI, -Math.PI * 1.5, 1)) : (this.moveTo(a + s.x, i), this.ellipse(a + n - h.x, i + h.y, h.x, h.y, 0, -Math.PI / 2, 0), this.ellipse(a + n - c.x, i + o - c.y, c.x, c.y, 0, 0, Math.PI / 2), this.ellipse(a + m.x, i + o - m.y, m.x, m.y, 0, Math.PI / 2, Math.PI), this.ellipse(a + s.x, i + s.y, s.x, s.y, 0, Math.PI, Math.PI * 1.5)), this.closePath(), this.moveTo(a, i);
    function b(_) {
      const { x: z, y: D, z: R, w: O } = _;
      return { x: z, y: D, z: R, w: O };
    }
    function g(_) {
      const z = typeof _;
      return z === "undefined" || _ === null ? [0] : z === "function" ? [NaN] : z === "object" ? typeof _[Symbol.iterator] == "function" ? [..._].map((D) => {
        const R = typeof D;
        return R === "undefined" || D === null ? 0 : R === "function" ? NaN : R === "object" ? b(D) : w(D);
      }) : [b(_)] : [w(_)];
    }
    function w(_) {
      return +_;
    }
    function B(_) {
      const z = w(_);
      return Number.isFinite(z) ? {
        x: z,
        y: z
      } : Object(_) === _ ? {
        x: w(_.x ?? 0),
        y: w(_.y ?? 0)
      } : {
        x: NaN,
        y: NaN
      };
    }
    function M(_) {
      const [z, D, R, O] = _, F = [
        Math.abs(n) / (z.x + D.x),
        Math.abs(o) / (D.y + R.y),
        Math.abs(n) / (R.x + O.x),
        Math.abs(o) / (z.y + O.y)
      ], Q = Math.min(...F);
      if (Q <= 1)
        for (const H of _)
          H.x *= Q, H.y *= Q;
    }
  }
  function e(a) {
    return `Failed to execute 'roundRect' on '${t(a)}':`;
  }
  function t(a) {
    return Object(a) === a && a instanceof Path2D ? "Path2D" : a instanceof globalThis?.CanvasRenderingContext2D ? "CanvasRenderingContext2D" : a instanceof globalThis?.OffscreenCanvasRenderingContext2D ? "OffscreenCanvasRenderingContext2D" : a?.constructor.name || a;
  }
})();
const Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null
}, Symbol.toStringTag, { value: "Module" }));
class G extends Error {
  // The underlying error message without any context added.
  constructor(e, t) {
    var a = "KaTeX parse error: " + e, i, n, o = t && t.loc;
    if (o && o.start <= o.end) {
      var l = o.lexer.input;
      i = o.start, n = o.end, i === l.length ? a += " at end of input: " : a += " at position " + (i + 1) + ": ";
      var s = l.slice(i, n).replace(/[^]/g, "$&̲"), h;
      i > 15 ? h = "…" + l.slice(i - 15, i) : h = l.slice(0, i);
      var c;
      n + 15 < l.length ? c = l.slice(n, n + 15) + "…" : c = l.slice(n), a += h + s + c;
    }
    super(a), this.name = "ParseError", this.position = void 0, this.length = void 0, this.rawMessage = void 0, Object.setPrototypeOf(this, G.prototype), this.position = i, i != null && n != null && (this.length = n - i), this.rawMessage = e;
  }
}
var Hi = /([A-Z])/g, Li = (r) => r.replace(Hi, "-$1").toLowerCase(), Gi = {
  "&": "&amp;",
  ">": "&gt;",
  "<": "&lt;",
  '"': "&quot;",
  "'": "&#x27;"
}, Ui = /[&><"']/g, b0 = (r) => String(r).replace(Ui, (e) => Gi[e]), Qe = (r) => r.type === "ordgroup" || r.type === "color" ? r.body.length === 1 ? Qe(r.body[0]) : r : r.type === "font" ? Qe(r.body) : r, ji = /* @__PURE__ */ new Set(["mathord", "textord", "atom"]), H0 = (r) => ji.has(Qe(r).type), Yi = (r) => {
  var e = /^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(r);
  return e ? e[2] !== ":" || !/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1]) ? null : e[1].toLowerCase() : "_relative";
}, Pe = {
  displayMode: {
    type: "boolean",
    description: "Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",
    cli: "-d, --display-mode"
  },
  output: {
    type: {
      enum: ["htmlAndMathml", "html", "mathml"]
    },
    description: "Determines the markup language of the output.",
    cli: "-F, --format <type>"
  },
  leqno: {
    type: "boolean",
    description: "Render display math in leqno style (left-justified tags)."
  },
  fleqn: {
    type: "boolean",
    description: "Render display math flush left."
  },
  throwOnError: {
    type: "boolean",
    default: !0,
    cli: "-t, --no-throw-on-error",
    cliDescription: "Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."
  },
  errorColor: {
    type: "string",
    default: "#cc0000",
    cli: "-c, --error-color <color>",
    cliDescription: "A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",
    cliProcessor: (r) => "#" + r
  },
  macros: {
    type: "object",
    cli: "-m, --macro <def>",
    cliDescription: "Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",
    cliDefault: [],
    cliProcessor: (r, e) => (e.push(r), e)
  },
  minRuleThickness: {
    type: "number",
    description: "Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",
    processor: (r) => Math.max(0, r),
    cli: "--min-rule-thickness <size>",
    cliProcessor: parseFloat
  },
  colorIsTextColor: {
    type: "boolean",
    description: "Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",
    cli: "-b, --color-is-text-color"
  },
  strict: {
    type: [{
      enum: ["warn", "ignore", "error"]
    }, "boolean", "function"],
    description: "Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",
    cli: "-S, --strict",
    cliDefault: !1
  },
  trust: {
    type: ["boolean", "function"],
    description: "Trust the input, enabling all HTML features such as \\url.",
    cli: "-T, --trust"
  },
  maxSize: {
    type: "number",
    default: 1 / 0,
    description: "If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",
    processor: (r) => Math.max(0, r),
    cli: "-s, --max-size <n>",
    cliProcessor: parseInt
  },
  maxExpand: {
    type: "number",
    default: 1e3,
    description: "Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",
    processor: (r) => Math.max(0, r),
    cli: "-e, --max-expand <n>",
    cliProcessor: (r) => r === "Infinity" ? 1 / 0 : parseInt(r)
  },
  globalGroup: {
    type: "boolean",
    cli: !1
  }
};
function Wi(r) {
  if (typeof r != "string")
    return r.enum[0];
  switch (r) {
    case "boolean":
      return !1;
    case "string":
      return "";
    case "number":
      return 0;
    case "object":
      return {};
    default:
      throw new Error("Unexpected schema type; settings must declare an explicit default.");
  }
}
function Xi(r) {
  if (r.default !== void 0)
    return r.default;
  var e = Array.isArray(r.type) ? r.type[0] : r.type;
  return Wi(e);
}
function $i(r, e, t, a) {
  var i = t[e];
  r[e] = i !== void 0 ? a.processor ? a.processor(i) : i : Xi(a);
}
class Gt {
  constructor(e) {
    e === void 0 && (e = {}), this.displayMode = void 0, this.output = void 0, this.leqno = void 0, this.fleqn = void 0, this.throwOnError = void 0, this.errorColor = void 0, this.macros = void 0, this.minRuleThickness = void 0, this.colorIsTextColor = void 0, this.strict = void 0, this.trust = void 0, this.maxSize = void 0, this.maxExpand = void 0, this.globalGroup = void 0, e = e || {};
    for (var t of Object.keys(Pe)) {
      var a = Pe[t];
      a && $i(this, t, e, a);
    }
  }
  /**
   * Report nonstrict (non-LaTeX-compatible) input.
   * Can safely not be called if `this.strict` is false in JavaScript.
   */
  reportNonstrict(e, t, a) {
    var i = this.strict;
    if (typeof i == "function" && (i = i(e, t, a)), !(!i || i === "ignore")) {
      if (i === !0 || i === "error")
        throw new G("LaTeX-incompatible input and strict mode is set to 'error': " + (t + " [" + e + "]"), a);
      i === "warn" ? typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (t + " [" + e + "]")) : typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + i + "': " + t + " [" + e + "]"));
    }
  }
  /**
   * Check whether to apply strict (LaTeX-adhering) behavior for unusual
   * input (like `\\`).  Unlike `nonstrict`, will not throw an error;
   * instead, "error" translates to a return value of `true`, while "ignore"
   * translates to a return value of `false`.  May still print a warning:
   * "warn" prints a warning and returns `false`.
   * This is for the second category of `errorCode`s listed in the README.
   */
  useStrictBehavior(e, t, a) {
    var i = this.strict;
    if (typeof i == "function")
      try {
        i = i(e, t, a);
      } catch {
        i = "error";
      }
    return !i || i === "ignore" ? !1 : i === !0 || i === "error" ? !0 : i === "warn" ? (typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (t + " [" + e + "]")), !1) : (typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + i + "': " + t + " [" + e + "]")), !1);
  }
  /**
   * Check whether to test potentially dangerous input, and return
   * `true` (trusted) or `false` (untrusted).  The sole argument `context`
   * should be an object with `command` field specifying the relevant LaTeX
   * command (as a string starting with `\`), and any other arguments, etc.
   * If `context` has a `url` field, a `protocol` field will automatically
   * get added by this function (changing the specified object).
   */
  isTrusted(e) {
    if ("url" in e && e.url && !e.protocol) {
      var t = Yi(e.url);
      if (t == null)
        return !1;
      e.protocol = t;
    }
    var a = typeof this.trust == "function" ? this.trust(e) : this.trust;
    return !!a;
  }
}
class U0 {
  constructor(e, t, a) {
    this.id = void 0, this.size = void 0, this.cramped = void 0, this.id = e, this.size = t, this.cramped = a;
  }
  /**
   * Get the style of a superscript given a base in the current style.
   */
  sup() {
    return T0[Vi[this.id]];
  }
  /**
   * Get the style of a subscript given a base in the current style.
   */
  sub() {
    return T0[Zi[this.id]];
  }
  /**
   * Get the style of a fraction numerator given the fraction in the current
   * style.
   */
  fracNum() {
    return T0[Ki[this.id]];
  }
  /**
   * Get the style of a fraction denominator given the fraction in the current
   * style.
   */
  fracDen() {
    return T0[Ji[this.id]];
  }
  /**
   * Get the cramped version of a style (in particular, cramping a cramped style
   * doesn't change the style).
   */
  cramp() {
    return T0[en[this.id]];
  }
  /**
   * Get a text or display version of this style.
   */
  text() {
    return T0[tn[this.id]];
  }
  /**
   * Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle)
   */
  isTight() {
    return this.size >= 2;
  }
}
var Ut = 0, Ne = 1, ne = 2, P0 = 3, ve = 4, E0 = 5, se = 6, I0 = 7, T0 = [new U0(Ut, 0, !1), new U0(Ne, 0, !0), new U0(ne, 1, !1), new U0(P0, 1, !0), new U0(ve, 2, !1), new U0(E0, 2, !0), new U0(se, 3, !1), new U0(I0, 3, !0)], Vi = [ve, E0, ve, E0, se, I0, se, I0], Zi = [E0, E0, E0, E0, I0, I0, I0, I0], Ki = [ne, P0, ve, E0, se, I0, se, I0], Ji = [P0, P0, E0, E0, I0, I0, I0, I0], en = [Ne, Ne, P0, P0, E0, E0, I0, I0], tn = [Ut, Ne, ne, P0, ne, P0, ne, P0], r0 = {
  DISPLAY: T0[Ut],
  TEXT: T0[ne],
  SCRIPT: T0[ve],
  SCRIPTSCRIPT: T0[se]
}, It = [{
  // Latin characters beyond the Latin-1 characters we have metrics for.
  // Needed for Czech, Hungarian and Turkish text, for example.
  name: "latin",
  blocks: [
    [256, 591],
    // Latin Extended-A and Latin Extended-B
    [768, 879]
    // Combining Diacritical marks
  ]
}, {
  // The Cyrillic script used by Russian and related languages.
  // A Cyrillic subset used to be supported as explicitly defined
  // symbols in symbols.js
  name: "cyrillic",
  blocks: [[1024, 1279]]
}, {
  // Armenian
  name: "armenian",
  blocks: [[1328, 1423]]
}, {
  // The Brahmic scripts of South and Southeast Asia
  // Devanagari (0900–097F)
  // Bengali (0980–09FF)
  // Gurmukhi (0A00–0A7F)
  // Gujarati (0A80–0AFF)
  // Oriya (0B00–0B7F)
  // Tamil (0B80–0BFF)
  // Telugu (0C00–0C7F)
  // Kannada (0C80–0CFF)
  // Malayalam (0D00–0D7F)
  // Sinhala (0D80–0DFF)
  // Thai (0E00–0E7F)
  // Lao (0E80–0EFF)
  // Tibetan (0F00–0FFF)
  // Myanmar (1000–109F)
  name: "brahmic",
  blocks: [[2304, 4255]]
}, {
  name: "georgian",
  blocks: [[4256, 4351]]
}, {
  // Chinese and Japanese.
  // The "k" in cjk is for Korean, but we've separated Korean out
  name: "cjk",
  blocks: [
    [12288, 12543],
    // CJK symbols and punctuation, Hiragana, Katakana
    [19968, 40879],
    // CJK ideograms
    [65280, 65376]
    // Fullwidth punctuation
    // TODO: add halfwidth Katakana and Romanji glyphs
  ]
}, {
  // Korean
  name: "hangul",
  blocks: [[44032, 55215]]
}];
function rn(r) {
  for (var e = 0; e < It.length; e++)
    for (var t = It[e], a = 0; a < t.blocks.length; a++) {
      var i = t.blocks[a];
      if (r >= i[0] && r <= i[1])
        return t.name;
    }
  return null;
}
var Oe = [];
It.forEach((r) => r.blocks.forEach((e) => Oe.push(...e)));
function aa(r) {
  for (var e = 0; e < Oe.length; e += 2)
    if (r >= Oe[e] && r <= Oe[e + 1])
      return !0;
  return !1;
}
var v0 = (r) => r + " " + r, ie = 80, an = function(e, t) {
  return "M95," + (622 + e + t) + `
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l` + e / 2.075 + " -" + e + `
c5.3,-9.3,12,-14,20,-14
H400000v` + (40 + e) + `H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M` + (834 + e) + " " + t + "h400000v" + (40 + e) + "h-400000z";
}, nn = function(e, t) {
  return "M263," + (601 + e + t) + `c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l` + e / 2.084 + " -" + e + `
c4.7,-7.3,11,-11,19,-11
H40000v` + (40 + e) + `H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M` + (1001 + e) + " " + t + "h400000v" + (40 + e) + "h-400000z";
}, sn = function(e, t) {
  return "M983 " + (10 + e + t) + `
l` + e / 3.13 + " -" + e + `
c4,-6.7,10,-10,18,-10 H400000v` + (40 + e) + `
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M` + (1001 + e) + " " + t + "h400000v" + (40 + e) + "h-400000z";
}, ln = function(e, t) {
  return "M424," + (2398 + e + t) + `
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l` + e / 4.223 + " -" + e + `c4,-6.7,10,-10,18,-10 H400000
v` + (40 + e) + `H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M` + (1001 + e) + " " + t + `
h400000v` + (40 + e) + "h-400000z";
}, on = function(e, t) {
  return "M473," + (2713 + e + t) + `
c339.3,-1799.3,509.3,-2700,510,-2702 l` + e / 5.298 + " -" + e + `
c3.3,-7.3,9.3,-11,18,-11 H400000v` + (40 + e) + `H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM` + (1001 + e) + " " + t + "h400000v" + (40 + e) + "H1017.7z";
}, un = function(e) {
  var t = e / 2;
  return "M400000 " + e + " H0 L" + t + " 0 l65 45 L145 " + (e - 80) + " H400000z";
}, hn = function(e, t, a) {
  var i = a - 54 - t - e;
  return "M702 " + (e + t) + "H400000" + (40 + e) + `
H742v` + i + `l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 ` + t + "H400000v" + (40 + e) + "H742z";
}, cn = function(e, t, a) {
  t = 1e3 * t;
  var i = "";
  switch (e) {
    case "sqrtMain":
      i = an(t, ie);
      break;
    case "sqrtSize1":
      i = nn(t, ie);
      break;
    case "sqrtSize2":
      i = sn(t, ie);
      break;
    case "sqrtSize3":
      i = ln(t, ie);
      break;
    case "sqrtSize4":
      i = on(t, ie);
      break;
    case "sqrtTall":
      i = hn(t, ie, a);
  }
  return i;
}, fn = function(e, t) {
  switch (e) {
    case "⎜":
      return v0("M291 0 H417 V" + t + " H291z");
    case "∣":
      return v0("M145 0 H188 V" + t + " H145z");
    case "∥":
      return v0("M145 0 H188 V" + t + " H145z") + v0("M367 0 H410 V" + t + " H367z");
    case "⎟":
      return v0("M457 0 H583 V" + t + " H457z");
    case "⎢":
      return v0("M319 0 H403 V" + t + " H319z");
    case "⎥":
      return v0("M263 0 H347 V" + t + " H263z");
    case "⎪":
      return v0("M384 0 H504 V" + t + " H384z");
    case "⏐":
      return v0("M312 0 H355 V" + t + " H312z");
    case "‖":
      return v0("M257 0 H300 V" + t + " H257z") + v0("M478 0 H521 V" + t + " H478z");
    default:
      return "";
  }
}, dr = {
  // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main
  doubleleftarrow: `M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,
  // doublerightarrow is from glyph U+21D2 in font KaTeX Main
  doublerightarrow: `M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,
  // leftarrow is from glyph U+2190 in font KaTeX Main
  leftarrow: `M400000 241H110l3-3c68.7-52.7 113.7-120
 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
 l-3-3h399890zM100 241v40h399900v-40z`,
  // overbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular
  leftbrace: `M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,
  leftbraceunder: `M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,
  // overgroup is from the MnSymbol package (public domain)
  leftgroup: `M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
 435 0h399565z`,
  leftgroupunder: `M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
 435 219h399565z`,
  // Harpoons are from glyph U+21BD in font KaTeX Main
  leftharpoon: `M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,
  leftharpoonplus: `M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,
  leftharpoondown: `M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,
  leftharpoondownplus: `M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,
  // hook is from glyph U+21A9 in font KaTeX Main
  lefthook: `M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
 71.5 23h399859zM103 281v-40h399897v40z`,
  leftlinesegment: v0("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),
  leftbracketunder: v0("M0 0 h120 V290 H399995 v120 H0z"),
  leftbracketover: v0("M0 440 h120 V150 H399995 v-120 H0z"),
  leftmapsto: v0("M40 281 V448H0V74H40V241H400000v40z"),
  // tofrom is from glyph U+21C4 in font KaTeX AMS Regular
  leftToFrom: `M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,
  longequal: v0("M0 50 h400000 v40H0z m0 194h40000v40H0z"),
  midbrace: `M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,
  midbraceunder: `M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,
  oiintSize1: `M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,
  oiintSize2: `M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,
  oiiintSize1: `M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,
  oiiintSize2: `M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,
  rightarrow: `M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
 151.7 139 205zm0 0v40h399900v-40z`,
  rightbrace: `M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,
  rightbraceunder: `M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,
  rightgroup: `M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
 3-1 3-3v-38c-76-158-257-219-435-219H0z`,
  rightgroupunder: `M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,
  rightharpoon: `M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
 69.2 92 94.5zm0 0v40h399900v-40z`,
  rightharpoonplus: `M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,
  rightharpoondown: `M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,
  rightharpoondownplus: `M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,
  righthook: `M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,
  rightlinesegment: v0("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),
  rightbracketunder: v0("M399995 0 h-120 V290 H0 v120 H400000z"),
  rightbracketover: v0("M399995 440 h-120 V150 H0 v-120 H399995z"),
  rightToFrom: `M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,
  // twoheadleftarrow is from glyph U+219E in font KaTeX AMS Regular
  twoheadleftarrow: `M0 167c68 40
 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,
  twoheadrightarrow: `M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,
  // tilde1 is a modified version of a glyph from the MnSymbol package
  tilde1: `M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,
  // ditto tilde2, tilde3, & tilde4
  tilde2: `M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,
  tilde3: `M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
 -338 0-409-156.573-744-156.573z`,
  tilde4: `M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
 -175.236-744-175.236z`,
  // vec is from glyph U+20D7 in font KaTeX Main
  vec: `M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,
  // widehat1 is a modified version of a glyph from the MnSymbol package
  widehat1: `M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,
  // ditto widehat2, widehat3, & widehat4
  widehat2: `M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
  widehat3: `M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
  widehat4: `M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
  // widecheck paths are all inverted versions of widehat
  widecheck1: `M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,
  widecheck2: `M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
  widecheck3: `M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
  widecheck4: `M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
  // The next ten paths support reaction arrows from the mhchem package.
  // Arrows for \ce{<-->} are offset from xAxis by 0.22ex, per mhchem in LaTeX
  // baraboveleftarrow is mostly from glyph U+2190 in font KaTeX Main
  baraboveleftarrow: `M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,
  // rightarrowabovebar is mostly from glyph U+2192, KaTeX Main
  rightarrowabovebar: `M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,
  // The short left harpoon has 0.5em (i.e. 500 units) kern on the left end.
  // Ref from mhchem.sty: \rlap{\raisebox{-.22ex}{$\kern0.5em
  baraboveshortleftharpoon: `M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,
  rightharpoonaboveshortbar: `M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,
  shortbaraboveleftharpoon: `M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,
  shortrightharpoonabovebar: `M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`
}, mn = function(e, t) {
  switch (e) {
    case "lbrack":
      return "M403 1759 V84 H666 V0 H319 V1759 v" + t + ` v1759 v84 h347 v-84
H403z M403 1759 V0 H319 V1759 v` + t + " v1759 v84 h84z";
    case "rbrack":
      return "M347 1759 V0 H0 V84 H263 V1759 v" + t + ` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v` + t + " v1759 h84z";
    case "vert":
      return "M145 15 v585 v" + t + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -t + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v` + t + " v585 h43z";
    case "doublevert":
      return "M145 15 v585 v" + t + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -t + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v` + t + ` v585 h43z
M367 15 v585 v` + t + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -t + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v` + t + " v585 h43z";
    case "lfloor":
      return "M319 602 V0 H403 V602 v" + t + ` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v` + t + " v1715 H319z";
    case "rfloor":
      return "M319 602 V0 H403 V602 v" + t + ` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v` + t + " v1715 H319z";
    case "lceil":
      return "M403 1759 V84 H666 V0 H319 V1759 v" + t + ` v602 h84z
M403 1759 V0 H319 V1759 v` + t + " v602 h84z";
    case "rceil":
      return "M347 1759 V0 H0 V84 H263 V1759 v" + t + ` v602 h84z
M347 1759 V0 h-84 V1759 v` + t + " v602 h84z";
    case "lparen":
      return `M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,` + (t + 84) + `c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-` + (t + 92) + `c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;
    case "rparen":
      return `M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,` + (t + 9) + `
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-` + (t + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;
    default:
      throw new Error("Unknown stretchy delimiter.");
  }
};
function dn(r) {
  return "toText" in r;
}
class ue {
  // Never used; needed for satisfying interface.
  constructor(e) {
    this.children = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.children = e, this.classes = [], this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = {};
  }
  hasClass(e) {
    return this.classes.includes(e);
  }
  /** Convert the fragment into a node. */
  toNode() {
    for (var e = document.createDocumentFragment(), t = 0; t < this.children.length; t++)
      e.appendChild(this.children[t].toNode());
    return e;
  }
  /** Convert the fragment into HTML markup. */
  toMarkup() {
    for (var e = "", t = 0; t < this.children.length; t++)
      e += this.children[t].toMarkup();
    return e;
  }
  /**
   * Converts the math node into a string, similar to innerText. Applies to
   * MathDomNode's only.
   */
  toText() {
    return this.children.map((e) => {
      if (dn(e))
        return e.toText();
      throw new Error("Expected MathDomNode with toText, got " + e.constructor.name);
    }).join("");
  }
}
var Bt = {
  // https://en.wikibooks.org/wiki/LaTeX/Lengths and
  // https://tex.stackexchange.com/a/8263
  pt: 1,
  // TeX point
  mm: 7227 / 2540,
  // millimeter
  cm: 7227 / 254,
  // centimeter
  in: 72.27,
  // inch
  bp: 803 / 800,
  // big (PostScript) points
  pc: 12,
  // pica
  dd: 1238 / 1157,
  // didot
  cc: 14856 / 1157,
  // cicero (12 didot)
  nd: 685 / 642,
  // new didot
  nc: 1370 / 107,
  // new cicero (12 new didot)
  sp: 1 / 65536,
  // scaled point (TeX's internal smallest unit)
  // https://tex.stackexchange.com/a/41371
  px: 803 / 800
  // \pdfpxdimen defaults to 1 bp in pdfTeX and LuaTeX
}, pn = {
  ex: !0,
  em: !0,
  mu: !0
}, ia = function(e) {
  return typeof e != "string" && (e = e.unit), e in Bt || e in pn || e === "ex";
}, c0 = function(e, t) {
  var a;
  if (e.unit in Bt)
    a = Bt[e.unit] / t.fontMetrics().ptPerEm / t.sizeMultiplier;
  else if (e.unit === "mu")
    a = t.fontMetrics().cssEmPerMu;
  else {
    var i;
    if (t.style.isTight() ? i = t.havingStyle(t.style.text()) : i = t, e.unit === "ex")
      a = i.fontMetrics().xHeight;
    else if (e.unit === "em")
      a = i.fontMetrics().quad;
    else
      throw new G("Invalid unit: '" + e.unit + "'");
    i !== t && (a *= i.sizeMultiplier / t.sizeMultiplier);
  }
  return Math.min(e.number * a, t.maxSize);
}, W = function(e) {
  return +e.toFixed(4) + "em";
}, W0 = function(e) {
  return e.filter((t) => t).join(" ");
}, jt = function(e) {
  var t = "";
  for (var a of Object.keys(e)) {
    var i = e[a];
    i !== void 0 && (t += Li(a) + ":" + i + ";");
  }
  return t;
}, na = function(e, t, a) {
  if (this.classes = e || [], this.attributes = {}, this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = a || {}, t) {
    t.style.isTight() && this.classes.push("mtight");
    var i = t.getColor();
    i && (this.style.color = i);
  }
}, sa = function(e) {
  var t = document.createElement(e);
  t.className = W0(this.classes), Object.assign(t.style, this.style);
  for (var a of Object.keys(this.attributes))
    t.setAttribute(a, this.attributes[a]);
  for (var i = 0; i < this.children.length; i++)
    t.appendChild(this.children[i].toNode());
  return t;
}, vn = /[\s"'>/=\x00-\x1f]/, la = function(e) {
  var t = "<" + e;
  this.classes.length && (t += ' class="' + b0(W0(this.classes)) + '"');
  var a = jt(this.style);
  a && (t += ' style="' + b0(a) + '"');
  for (var i of Object.keys(this.attributes)) {
    if (vn.test(i))
      throw new G("Invalid attribute name '" + i + "'");
    t += " " + i + '="' + b0(this.attributes[i]) + '"';
  }
  t += ">";
  for (var n = 0; n < this.children.length; n++)
    t += this.children[n].toMarkup();
  return t += "</" + e + ">", t;
};
class he {
  constructor(e, t, a, i) {
    this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.width = void 0, this.maxFontSize = void 0, this.style = void 0, this.italic = void 0, na.call(this, e, a, i), this.children = t || [];
  }
  /**
   * Sets an arbitrary attribute on the span. Warning: use this wisely. Not
   * all browsers support attributes the same, and having too many custom
   * attributes is probably bad.
   */
  setAttribute(e, t) {
    this.attributes[e] = t;
  }
  hasClass(e) {
    return this.classes.includes(e);
  }
  toNode() {
    return sa.call(this, "span");
  }
  toMarkup() {
    return la.call(this, "span");
  }
}
class je {
  constructor(e, t, a, i) {
    this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, na.call(this, t, i), this.children = a || [], this.setAttribute("href", e);
  }
  setAttribute(e, t) {
    this.attributes[e] = t;
  }
  hasClass(e) {
    return this.classes.includes(e);
  }
  toNode() {
    return sa.call(this, "a");
  }
  toMarkup() {
    return la.call(this, "a");
  }
}
class An {
  constructor(e, t, a) {
    this.src = void 0, this.alt = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.alt = t, this.src = e, this.classes = ["mord"], this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = a;
  }
  hasClass(e) {
    return this.classes.includes(e);
  }
  toNode() {
    var e = document.createElement("img");
    return e.src = this.src, e.alt = this.alt, e.className = "mord", Object.assign(e.style, this.style), e;
  }
  toMarkup() {
    var e = '<img src="' + b0(this.src) + '"' + (' alt="' + b0(this.alt) + '"'), t = jt(this.style);
    return t && (e += ' style="' + b0(t) + '"'), e += "'/>", e;
  }
}
var gn = {
  î: "ı̂",
  ï: "ı̈",
  í: "ı́",
  // 'ī': '\u0131\u0304', // enable when we add Extended Latin
  ì: "ı̀"
};
class C0 {
  constructor(e, t, a, i, n, o, l, s) {
    this.text = void 0, this.height = void 0, this.depth = void 0, this.italic = void 0, this.skew = void 0, this.width = void 0, this.maxFontSize = void 0, this.classes = void 0, this.style = void 0, this.text = e, this.height = t || 0, this.depth = a || 0, this.italic = i || 0, this.skew = n || 0, this.width = o || 0, this.classes = l || [], this.style = s || {}, this.maxFontSize = 0;
    var h = rn(this.text.charCodeAt(0));
    h && this.classes.push(h + "_fallback"), /[îïíì]/.test(this.text) && (this.text = gn[this.text]);
  }
  hasClass(e) {
    return this.classes.includes(e);
  }
  /**
   * Creates a text node or span from a symbol node. Note that a span is only
   * created if it is needed.
   */
  toNode() {
    var e = document.createTextNode(this.text), t = null;
    return this.italic > 0 && (t = document.createElement("span"), t.style.marginRight = W(this.italic)), this.classes.length > 0 && (t = t || document.createElement("span"), t.className = W0(this.classes)), Object.keys(this.style).length > 0 && (t = t || document.createElement("span"), Object.assign(t.style, this.style)), t ? (t.appendChild(e), t) : e;
  }
  /**
   * Creates markup for a symbol node.
   */
  toMarkup() {
    var e = !1, t = "<span";
    this.classes.length && (e = !0, t += ' class="', t += b0(W0(this.classes)), t += '"');
    var a = "";
    this.italic > 0 && (a += "margin-right:" + W(this.italic) + ";"), a += jt(this.style), a && (e = !0, t += ' style="' + b0(a) + '"');
    var i = b0(this.text);
    return e ? (t += ">", t += i, t += "</span>", t) : i;
  }
}
class N0 {
  constructor(e, t) {
    this.children = void 0, this.attributes = void 0, this.children = e || [], this.attributes = t || {};
  }
  toNode() {
    var e = "http://www.w3.org/2000/svg", t = document.createElementNS(e, "svg");
    for (var a of Object.keys(this.attributes))
      t.setAttribute(a, this.attributes[a]);
    for (var i = 0; i < this.children.length; i++)
      t.appendChild(this.children[i].toNode());
    return t;
  }
  toMarkup() {
    var e = '<svg xmlns="http://www.w3.org/2000/svg"';
    for (var t of Object.keys(this.attributes))
      e += " " + t + '="' + b0(this.attributes[t]) + '"';
    e += ">";
    for (var a = 0; a < this.children.length; a++)
      e += this.children[a].toMarkup();
    return e += "</svg>", e;
  }
}
class X0 {
  constructor(e, t) {
    this.pathName = void 0, this.alternate = void 0, this.pathName = e, this.alternate = t;
  }
  toNode() {
    var e = "http://www.w3.org/2000/svg", t = document.createElementNS(e, "path");
    return this.alternate ? t.setAttribute("d", this.alternate) : t.setAttribute("d", dr[this.pathName]), t;
  }
  toMarkup() {
    return this.alternate ? '<path d="' + b0(this.alternate) + '"/>' : '<path d="' + b0(dr[this.pathName]) + '"/>';
  }
}
class kt {
  constructor(e) {
    this.attributes = void 0, this.attributes = e || {};
  }
  toNode() {
    var e = "http://www.w3.org/2000/svg", t = document.createElementNS(e, "line");
    for (var a of Object.keys(this.attributes))
      t.setAttribute(a, this.attributes[a]);
    return t;
  }
  toMarkup() {
    var e = "<line";
    for (var t of Object.keys(this.attributes))
      e += " " + t + '="' + b0(this.attributes[t]) + '"';
    return e += "/>", e;
  }
}
function bn(r) {
  if (r instanceof C0)
    return r;
  throw new Error("Expected symbolNode but got " + String(r) + ".");
}
function yn(r) {
  if (r instanceof he)
    return r;
  throw new Error("Expected span<HtmlDomNode> but got " + String(r) + ".");
}
var wn = (r) => r instanceof he || r instanceof je || r instanceof ue, D0 = {
  "AMS-Regular": {
    32: [0, 0, 0, 0, 0.25],
    65: [0, 0.68889, 0, 0, 0.72222],
    66: [0, 0.68889, 0, 0, 0.66667],
    67: [0, 0.68889, 0, 0, 0.72222],
    68: [0, 0.68889, 0, 0, 0.72222],
    69: [0, 0.68889, 0, 0, 0.66667],
    70: [0, 0.68889, 0, 0, 0.61111],
    71: [0, 0.68889, 0, 0, 0.77778],
    72: [0, 0.68889, 0, 0, 0.77778],
    73: [0, 0.68889, 0, 0, 0.38889],
    74: [0.16667, 0.68889, 0, 0, 0.5],
    75: [0, 0.68889, 0, 0, 0.77778],
    76: [0, 0.68889, 0, 0, 0.66667],
    77: [0, 0.68889, 0, 0, 0.94445],
    78: [0, 0.68889, 0, 0, 0.72222],
    79: [0.16667, 0.68889, 0, 0, 0.77778],
    80: [0, 0.68889, 0, 0, 0.61111],
    81: [0.16667, 0.68889, 0, 0, 0.77778],
    82: [0, 0.68889, 0, 0, 0.72222],
    83: [0, 0.68889, 0, 0, 0.55556],
    84: [0, 0.68889, 0, 0, 0.66667],
    85: [0, 0.68889, 0, 0, 0.72222],
    86: [0, 0.68889, 0, 0, 0.72222],
    87: [0, 0.68889, 0, 0, 1],
    88: [0, 0.68889, 0, 0, 0.72222],
    89: [0, 0.68889, 0, 0, 0.72222],
    90: [0, 0.68889, 0, 0, 0.66667],
    107: [0, 0.68889, 0, 0, 0.55556],
    160: [0, 0, 0, 0, 0.25],
    165: [0, 0.675, 0.025, 0, 0.75],
    174: [0.15559, 0.69224, 0, 0, 0.94666],
    240: [0, 0.68889, 0, 0, 0.55556],
    295: [0, 0.68889, 0, 0, 0.54028],
    710: [0, 0.825, 0, 0, 2.33334],
    732: [0, 0.9, 0, 0, 2.33334],
    770: [0, 0.825, 0, 0, 2.33334],
    771: [0, 0.9, 0, 0, 2.33334],
    989: [0.08167, 0.58167, 0, 0, 0.77778],
    1008: [0, 0.43056, 0.04028, 0, 0.66667],
    8245: [0, 0.54986, 0, 0, 0.275],
    8463: [0, 0.68889, 0, 0, 0.54028],
    8487: [0, 0.68889, 0, 0, 0.72222],
    8498: [0, 0.68889, 0, 0, 0.55556],
    8502: [0, 0.68889, 0, 0, 0.66667],
    8503: [0, 0.68889, 0, 0, 0.44445],
    8504: [0, 0.68889, 0, 0, 0.66667],
    8513: [0, 0.68889, 0, 0, 0.63889],
    8592: [-0.03598, 0.46402, 0, 0, 0.5],
    8594: [-0.03598, 0.46402, 0, 0, 0.5],
    8602: [-0.13313, 0.36687, 0, 0, 1],
    8603: [-0.13313, 0.36687, 0, 0, 1],
    8606: [0.01354, 0.52239, 0, 0, 1],
    8608: [0.01354, 0.52239, 0, 0, 1],
    8610: [0.01354, 0.52239, 0, 0, 1.11111],
    8611: [0.01354, 0.52239, 0, 0, 1.11111],
    8619: [0, 0.54986, 0, 0, 1],
    8620: [0, 0.54986, 0, 0, 1],
    8621: [-0.13313, 0.37788, 0, 0, 1.38889],
    8622: [-0.13313, 0.36687, 0, 0, 1],
    8624: [0, 0.69224, 0, 0, 0.5],
    8625: [0, 0.69224, 0, 0, 0.5],
    8630: [0, 0.43056, 0, 0, 1],
    8631: [0, 0.43056, 0, 0, 1],
    8634: [0.08198, 0.58198, 0, 0, 0.77778],
    8635: [0.08198, 0.58198, 0, 0, 0.77778],
    8638: [0.19444, 0.69224, 0, 0, 0.41667],
    8639: [0.19444, 0.69224, 0, 0, 0.41667],
    8642: [0.19444, 0.69224, 0, 0, 0.41667],
    8643: [0.19444, 0.69224, 0, 0, 0.41667],
    8644: [0.1808, 0.675, 0, 0, 1],
    8646: [0.1808, 0.675, 0, 0, 1],
    8647: [0.1808, 0.675, 0, 0, 1],
    8648: [0.19444, 0.69224, 0, 0, 0.83334],
    8649: [0.1808, 0.675, 0, 0, 1],
    8650: [0.19444, 0.69224, 0, 0, 0.83334],
    8651: [0.01354, 0.52239, 0, 0, 1],
    8652: [0.01354, 0.52239, 0, 0, 1],
    8653: [-0.13313, 0.36687, 0, 0, 1],
    8654: [-0.13313, 0.36687, 0, 0, 1],
    8655: [-0.13313, 0.36687, 0, 0, 1],
    8666: [0.13667, 0.63667, 0, 0, 1],
    8667: [0.13667, 0.63667, 0, 0, 1],
    8669: [-0.13313, 0.37788, 0, 0, 1],
    8672: [-0.064, 0.437, 0, 0, 1.334],
    8674: [-0.064, 0.437, 0, 0, 1.334],
    8705: [0, 0.825, 0, 0, 0.5],
    8708: [0, 0.68889, 0, 0, 0.55556],
    8709: [0.08167, 0.58167, 0, 0, 0.77778],
    8717: [0, 0.43056, 0, 0, 0.42917],
    8722: [-0.03598, 0.46402, 0, 0, 0.5],
    8724: [0.08198, 0.69224, 0, 0, 0.77778],
    8726: [0.08167, 0.58167, 0, 0, 0.77778],
    8733: [0, 0.69224, 0, 0, 0.77778],
    8736: [0, 0.69224, 0, 0, 0.72222],
    8737: [0, 0.69224, 0, 0, 0.72222],
    8738: [0.03517, 0.52239, 0, 0, 0.72222],
    8739: [0.08167, 0.58167, 0, 0, 0.22222],
    8740: [0.25142, 0.74111, 0, 0, 0.27778],
    8741: [0.08167, 0.58167, 0, 0, 0.38889],
    8742: [0.25142, 0.74111, 0, 0, 0.5],
    8756: [0, 0.69224, 0, 0, 0.66667],
    8757: [0, 0.69224, 0, 0, 0.66667],
    8764: [-0.13313, 0.36687, 0, 0, 0.77778],
    8765: [-0.13313, 0.37788, 0, 0, 0.77778],
    8769: [-0.13313, 0.36687, 0, 0, 0.77778],
    8770: [-0.03625, 0.46375, 0, 0, 0.77778],
    8774: [0.30274, 0.79383, 0, 0, 0.77778],
    8776: [-0.01688, 0.48312, 0, 0, 0.77778],
    8778: [0.08167, 0.58167, 0, 0, 0.77778],
    8782: [0.06062, 0.54986, 0, 0, 0.77778],
    8783: [0.06062, 0.54986, 0, 0, 0.77778],
    8785: [0.08198, 0.58198, 0, 0, 0.77778],
    8786: [0.08198, 0.58198, 0, 0, 0.77778],
    8787: [0.08198, 0.58198, 0, 0, 0.77778],
    8790: [0, 0.69224, 0, 0, 0.77778],
    8791: [0.22958, 0.72958, 0, 0, 0.77778],
    8796: [0.08198, 0.91667, 0, 0, 0.77778],
    8806: [0.25583, 0.75583, 0, 0, 0.77778],
    8807: [0.25583, 0.75583, 0, 0, 0.77778],
    8808: [0.25142, 0.75726, 0, 0, 0.77778],
    8809: [0.25142, 0.75726, 0, 0, 0.77778],
    8812: [0.25583, 0.75583, 0, 0, 0.5],
    8814: [0.20576, 0.70576, 0, 0, 0.77778],
    8815: [0.20576, 0.70576, 0, 0, 0.77778],
    8816: [0.30274, 0.79383, 0, 0, 0.77778],
    8817: [0.30274, 0.79383, 0, 0, 0.77778],
    8818: [0.22958, 0.72958, 0, 0, 0.77778],
    8819: [0.22958, 0.72958, 0, 0, 0.77778],
    8822: [0.1808, 0.675, 0, 0, 0.77778],
    8823: [0.1808, 0.675, 0, 0, 0.77778],
    8828: [0.13667, 0.63667, 0, 0, 0.77778],
    8829: [0.13667, 0.63667, 0, 0, 0.77778],
    8830: [0.22958, 0.72958, 0, 0, 0.77778],
    8831: [0.22958, 0.72958, 0, 0, 0.77778],
    8832: [0.20576, 0.70576, 0, 0, 0.77778],
    8833: [0.20576, 0.70576, 0, 0, 0.77778],
    8840: [0.30274, 0.79383, 0, 0, 0.77778],
    8841: [0.30274, 0.79383, 0, 0, 0.77778],
    8842: [0.13597, 0.63597, 0, 0, 0.77778],
    8843: [0.13597, 0.63597, 0, 0, 0.77778],
    8847: [0.03517, 0.54986, 0, 0, 0.77778],
    8848: [0.03517, 0.54986, 0, 0, 0.77778],
    8858: [0.08198, 0.58198, 0, 0, 0.77778],
    8859: [0.08198, 0.58198, 0, 0, 0.77778],
    8861: [0.08198, 0.58198, 0, 0, 0.77778],
    8862: [0, 0.675, 0, 0, 0.77778],
    8863: [0, 0.675, 0, 0, 0.77778],
    8864: [0, 0.675, 0, 0, 0.77778],
    8865: [0, 0.675, 0, 0, 0.77778],
    8872: [0, 0.69224, 0, 0, 0.61111],
    8873: [0, 0.69224, 0, 0, 0.72222],
    8874: [0, 0.69224, 0, 0, 0.88889],
    8876: [0, 0.68889, 0, 0, 0.61111],
    8877: [0, 0.68889, 0, 0, 0.61111],
    8878: [0, 0.68889, 0, 0, 0.72222],
    8879: [0, 0.68889, 0, 0, 0.72222],
    8882: [0.03517, 0.54986, 0, 0, 0.77778],
    8883: [0.03517, 0.54986, 0, 0, 0.77778],
    8884: [0.13667, 0.63667, 0, 0, 0.77778],
    8885: [0.13667, 0.63667, 0, 0, 0.77778],
    8888: [0, 0.54986, 0, 0, 1.11111],
    8890: [0.19444, 0.43056, 0, 0, 0.55556],
    8891: [0.19444, 0.69224, 0, 0, 0.61111],
    8892: [0.19444, 0.69224, 0, 0, 0.61111],
    8901: [0, 0.54986, 0, 0, 0.27778],
    8903: [0.08167, 0.58167, 0, 0, 0.77778],
    8905: [0.08167, 0.58167, 0, 0, 0.77778],
    8906: [0.08167, 0.58167, 0, 0, 0.77778],
    8907: [0, 0.69224, 0, 0, 0.77778],
    8908: [0, 0.69224, 0, 0, 0.77778],
    8909: [-0.03598, 0.46402, 0, 0, 0.77778],
    8910: [0, 0.54986, 0, 0, 0.76042],
    8911: [0, 0.54986, 0, 0, 0.76042],
    8912: [0.03517, 0.54986, 0, 0, 0.77778],
    8913: [0.03517, 0.54986, 0, 0, 0.77778],
    8914: [0, 0.54986, 0, 0, 0.66667],
    8915: [0, 0.54986, 0, 0, 0.66667],
    8916: [0, 0.69224, 0, 0, 0.66667],
    8918: [0.0391, 0.5391, 0, 0, 0.77778],
    8919: [0.0391, 0.5391, 0, 0, 0.77778],
    8920: [0.03517, 0.54986, 0, 0, 1.33334],
    8921: [0.03517, 0.54986, 0, 0, 1.33334],
    8922: [0.38569, 0.88569, 0, 0, 0.77778],
    8923: [0.38569, 0.88569, 0, 0, 0.77778],
    8926: [0.13667, 0.63667, 0, 0, 0.77778],
    8927: [0.13667, 0.63667, 0, 0, 0.77778],
    8928: [0.30274, 0.79383, 0, 0, 0.77778],
    8929: [0.30274, 0.79383, 0, 0, 0.77778],
    8934: [0.23222, 0.74111, 0, 0, 0.77778],
    8935: [0.23222, 0.74111, 0, 0, 0.77778],
    8936: [0.23222, 0.74111, 0, 0, 0.77778],
    8937: [0.23222, 0.74111, 0, 0, 0.77778],
    8938: [0.20576, 0.70576, 0, 0, 0.77778],
    8939: [0.20576, 0.70576, 0, 0, 0.77778],
    8940: [0.30274, 0.79383, 0, 0, 0.77778],
    8941: [0.30274, 0.79383, 0, 0, 0.77778],
    8994: [0.19444, 0.69224, 0, 0, 0.77778],
    8995: [0.19444, 0.69224, 0, 0, 0.77778],
    9416: [0.15559, 0.69224, 0, 0, 0.90222],
    9484: [0, 0.69224, 0, 0, 0.5],
    9488: [0, 0.69224, 0, 0, 0.5],
    9492: [0, 0.37788, 0, 0, 0.5],
    9496: [0, 0.37788, 0, 0, 0.5],
    9585: [0.19444, 0.68889, 0, 0, 0.88889],
    9586: [0.19444, 0.74111, 0, 0, 0.88889],
    9632: [0, 0.675, 0, 0, 0.77778],
    9633: [0, 0.675, 0, 0, 0.77778],
    9650: [0, 0.54986, 0, 0, 0.72222],
    9651: [0, 0.54986, 0, 0, 0.72222],
    9654: [0.03517, 0.54986, 0, 0, 0.77778],
    9660: [0, 0.54986, 0, 0, 0.72222],
    9661: [0, 0.54986, 0, 0, 0.72222],
    9664: [0.03517, 0.54986, 0, 0, 0.77778],
    9674: [0.11111, 0.69224, 0, 0, 0.66667],
    9733: [0.19444, 0.69224, 0, 0, 0.94445],
    10003: [0, 0.69224, 0, 0, 0.83334],
    10016: [0, 0.69224, 0, 0, 0.83334],
    10731: [0.11111, 0.69224, 0, 0, 0.66667],
    10846: [0.19444, 0.75583, 0, 0, 0.61111],
    10877: [0.13667, 0.63667, 0, 0, 0.77778],
    10878: [0.13667, 0.63667, 0, 0, 0.77778],
    10885: [0.25583, 0.75583, 0, 0, 0.77778],
    10886: [0.25583, 0.75583, 0, 0, 0.77778],
    10887: [0.13597, 0.63597, 0, 0, 0.77778],
    10888: [0.13597, 0.63597, 0, 0, 0.77778],
    10889: [0.26167, 0.75726, 0, 0, 0.77778],
    10890: [0.26167, 0.75726, 0, 0, 0.77778],
    10891: [0.48256, 0.98256, 0, 0, 0.77778],
    10892: [0.48256, 0.98256, 0, 0, 0.77778],
    10901: [0.13667, 0.63667, 0, 0, 0.77778],
    10902: [0.13667, 0.63667, 0, 0, 0.77778],
    10933: [0.25142, 0.75726, 0, 0, 0.77778],
    10934: [0.25142, 0.75726, 0, 0, 0.77778],
    10935: [0.26167, 0.75726, 0, 0, 0.77778],
    10936: [0.26167, 0.75726, 0, 0, 0.77778],
    10937: [0.26167, 0.75726, 0, 0, 0.77778],
    10938: [0.26167, 0.75726, 0, 0, 0.77778],
    10949: [0.25583, 0.75583, 0, 0, 0.77778],
    10950: [0.25583, 0.75583, 0, 0, 0.77778],
    10955: [0.28481, 0.79383, 0, 0, 0.77778],
    10956: [0.28481, 0.79383, 0, 0, 0.77778],
    57350: [0.08167, 0.58167, 0, 0, 0.22222],
    57351: [0.08167, 0.58167, 0, 0, 0.38889],
    57352: [0.08167, 0.58167, 0, 0, 0.77778],
    57353: [0, 0.43056, 0.04028, 0, 0.66667],
    57356: [0.25142, 0.75726, 0, 0, 0.77778],
    57357: [0.25142, 0.75726, 0, 0, 0.77778],
    57358: [0.41951, 0.91951, 0, 0, 0.77778],
    57359: [0.30274, 0.79383, 0, 0, 0.77778],
    57360: [0.30274, 0.79383, 0, 0, 0.77778],
    57361: [0.41951, 0.91951, 0, 0, 0.77778],
    57366: [0.25142, 0.75726, 0, 0, 0.77778],
    57367: [0.25142, 0.75726, 0, 0, 0.77778],
    57368: [0.25142, 0.75726, 0, 0, 0.77778],
    57369: [0.25142, 0.75726, 0, 0, 0.77778],
    57370: [0.13597, 0.63597, 0, 0, 0.77778],
    57371: [0.13597, 0.63597, 0, 0, 0.77778]
  },
  "Caligraphic-Regular": {
    32: [0, 0, 0, 0, 0.25],
    65: [0, 0.68333, 0, 0.19445, 0.79847],
    66: [0, 0.68333, 0.03041, 0.13889, 0.65681],
    67: [0, 0.68333, 0.05834, 0.13889, 0.52653],
    68: [0, 0.68333, 0.02778, 0.08334, 0.77139],
    69: [0, 0.68333, 0.08944, 0.11111, 0.52778],
    70: [0, 0.68333, 0.09931, 0.11111, 0.71875],
    71: [0.09722, 0.68333, 0.0593, 0.11111, 0.59487],
    72: [0, 0.68333, 965e-5, 0.11111, 0.84452],
    73: [0, 0.68333, 0.07382, 0, 0.54452],
    74: [0.09722, 0.68333, 0.18472, 0.16667, 0.67778],
    75: [0, 0.68333, 0.01445, 0.05556, 0.76195],
    76: [0, 0.68333, 0, 0.13889, 0.68972],
    77: [0, 0.68333, 0, 0.13889, 1.2009],
    78: [0, 0.68333, 0.14736, 0.08334, 0.82049],
    79: [0, 0.68333, 0.02778, 0.11111, 0.79611],
    80: [0, 0.68333, 0.08222, 0.08334, 0.69556],
    81: [0.09722, 0.68333, 0, 0.11111, 0.81667],
    82: [0, 0.68333, 0, 0.08334, 0.8475],
    83: [0, 0.68333, 0.075, 0.13889, 0.60556],
    84: [0, 0.68333, 0.25417, 0, 0.54464],
    85: [0, 0.68333, 0.09931, 0.08334, 0.62583],
    86: [0, 0.68333, 0.08222, 0, 0.61278],
    87: [0, 0.68333, 0.08222, 0.08334, 0.98778],
    88: [0, 0.68333, 0.14643, 0.13889, 0.7133],
    89: [0.09722, 0.68333, 0.08222, 0.08334, 0.66834],
    90: [0, 0.68333, 0.07944, 0.13889, 0.72473],
    160: [0, 0, 0, 0, 0.25]
  },
  "Fraktur-Regular": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69141, 0, 0, 0.29574],
    34: [0, 0.69141, 0, 0, 0.21471],
    38: [0, 0.69141, 0, 0, 0.73786],
    39: [0, 0.69141, 0, 0, 0.21201],
    40: [0.24982, 0.74947, 0, 0, 0.38865],
    41: [0.24982, 0.74947, 0, 0, 0.38865],
    42: [0, 0.62119, 0, 0, 0.27764],
    43: [0.08319, 0.58283, 0, 0, 0.75623],
    44: [0, 0.10803, 0, 0, 0.27764],
    45: [0.08319, 0.58283, 0, 0, 0.75623],
    46: [0, 0.10803, 0, 0, 0.27764],
    47: [0.24982, 0.74947, 0, 0, 0.50181],
    48: [0, 0.47534, 0, 0, 0.50181],
    49: [0, 0.47534, 0, 0, 0.50181],
    50: [0, 0.47534, 0, 0, 0.50181],
    51: [0.18906, 0.47534, 0, 0, 0.50181],
    52: [0.18906, 0.47534, 0, 0, 0.50181],
    53: [0.18906, 0.47534, 0, 0, 0.50181],
    54: [0, 0.69141, 0, 0, 0.50181],
    55: [0.18906, 0.47534, 0, 0, 0.50181],
    56: [0, 0.69141, 0, 0, 0.50181],
    57: [0.18906, 0.47534, 0, 0, 0.50181],
    58: [0, 0.47534, 0, 0, 0.21606],
    59: [0.12604, 0.47534, 0, 0, 0.21606],
    61: [-0.13099, 0.36866, 0, 0, 0.75623],
    63: [0, 0.69141, 0, 0, 0.36245],
    65: [0, 0.69141, 0, 0, 0.7176],
    66: [0, 0.69141, 0, 0, 0.88397],
    67: [0, 0.69141, 0, 0, 0.61254],
    68: [0, 0.69141, 0, 0, 0.83158],
    69: [0, 0.69141, 0, 0, 0.66278],
    70: [0.12604, 0.69141, 0, 0, 0.61119],
    71: [0, 0.69141, 0, 0, 0.78539],
    72: [0.06302, 0.69141, 0, 0, 0.7203],
    73: [0, 0.69141, 0, 0, 0.55448],
    74: [0.12604, 0.69141, 0, 0, 0.55231],
    75: [0, 0.69141, 0, 0, 0.66845],
    76: [0, 0.69141, 0, 0, 0.66602],
    77: [0, 0.69141, 0, 0, 1.04953],
    78: [0, 0.69141, 0, 0, 0.83212],
    79: [0, 0.69141, 0, 0, 0.82699],
    80: [0.18906, 0.69141, 0, 0, 0.82753],
    81: [0.03781, 0.69141, 0, 0, 0.82699],
    82: [0, 0.69141, 0, 0, 0.82807],
    83: [0, 0.69141, 0, 0, 0.82861],
    84: [0, 0.69141, 0, 0, 0.66899],
    85: [0, 0.69141, 0, 0, 0.64576],
    86: [0, 0.69141, 0, 0, 0.83131],
    87: [0, 0.69141, 0, 0, 1.04602],
    88: [0, 0.69141, 0, 0, 0.71922],
    89: [0.18906, 0.69141, 0, 0, 0.83293],
    90: [0.12604, 0.69141, 0, 0, 0.60201],
    91: [0.24982, 0.74947, 0, 0, 0.27764],
    93: [0.24982, 0.74947, 0, 0, 0.27764],
    94: [0, 0.69141, 0, 0, 0.49965],
    97: [0, 0.47534, 0, 0, 0.50046],
    98: [0, 0.69141, 0, 0, 0.51315],
    99: [0, 0.47534, 0, 0, 0.38946],
    100: [0, 0.62119, 0, 0, 0.49857],
    101: [0, 0.47534, 0, 0, 0.40053],
    102: [0.18906, 0.69141, 0, 0, 0.32626],
    103: [0.18906, 0.47534, 0, 0, 0.5037],
    104: [0.18906, 0.69141, 0, 0, 0.52126],
    105: [0, 0.69141, 0, 0, 0.27899],
    106: [0, 0.69141, 0, 0, 0.28088],
    107: [0, 0.69141, 0, 0, 0.38946],
    108: [0, 0.69141, 0, 0, 0.27953],
    109: [0, 0.47534, 0, 0, 0.76676],
    110: [0, 0.47534, 0, 0, 0.52666],
    111: [0, 0.47534, 0, 0, 0.48885],
    112: [0.18906, 0.52396, 0, 0, 0.50046],
    113: [0.18906, 0.47534, 0, 0, 0.48912],
    114: [0, 0.47534, 0, 0, 0.38919],
    115: [0, 0.47534, 0, 0, 0.44266],
    116: [0, 0.62119, 0, 0, 0.33301],
    117: [0, 0.47534, 0, 0, 0.5172],
    118: [0, 0.52396, 0, 0, 0.5118],
    119: [0, 0.52396, 0, 0, 0.77351],
    120: [0.18906, 0.47534, 0, 0, 0.38865],
    121: [0.18906, 0.47534, 0, 0, 0.49884],
    122: [0.18906, 0.47534, 0, 0, 0.39054],
    160: [0, 0, 0, 0, 0.25],
    8216: [0, 0.69141, 0, 0, 0.21471],
    8217: [0, 0.69141, 0, 0, 0.21471],
    58112: [0, 0.62119, 0, 0, 0.49749],
    58113: [0, 0.62119, 0, 0, 0.4983],
    58114: [0.18906, 0.69141, 0, 0, 0.33328],
    58115: [0.18906, 0.69141, 0, 0, 0.32923],
    58116: [0.18906, 0.47534, 0, 0, 0.50343],
    58117: [0, 0.69141, 0, 0, 0.33301],
    58118: [0, 0.62119, 0, 0, 0.33409],
    58119: [0, 0.47534, 0, 0, 0.50073]
  },
  "Main-Bold": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69444, 0, 0, 0.35],
    34: [0, 0.69444, 0, 0, 0.60278],
    35: [0.19444, 0.69444, 0, 0, 0.95833],
    36: [0.05556, 0.75, 0, 0, 0.575],
    37: [0.05556, 0.75, 0, 0, 0.95833],
    38: [0, 0.69444, 0, 0, 0.89444],
    39: [0, 0.69444, 0, 0, 0.31944],
    40: [0.25, 0.75, 0, 0, 0.44722],
    41: [0.25, 0.75, 0, 0, 0.44722],
    42: [0, 0.75, 0, 0, 0.575],
    43: [0.13333, 0.63333, 0, 0, 0.89444],
    44: [0.19444, 0.15556, 0, 0, 0.31944],
    45: [0, 0.44444, 0, 0, 0.38333],
    46: [0, 0.15556, 0, 0, 0.31944],
    47: [0.25, 0.75, 0, 0, 0.575],
    48: [0, 0.64444, 0, 0, 0.575],
    49: [0, 0.64444, 0, 0, 0.575],
    50: [0, 0.64444, 0, 0, 0.575],
    51: [0, 0.64444, 0, 0, 0.575],
    52: [0, 0.64444, 0, 0, 0.575],
    53: [0, 0.64444, 0, 0, 0.575],
    54: [0, 0.64444, 0, 0, 0.575],
    55: [0, 0.64444, 0, 0, 0.575],
    56: [0, 0.64444, 0, 0, 0.575],
    57: [0, 0.64444, 0, 0, 0.575],
    58: [0, 0.44444, 0, 0, 0.31944],
    59: [0.19444, 0.44444, 0, 0, 0.31944],
    60: [0.08556, 0.58556, 0, 0, 0.89444],
    61: [-0.10889, 0.39111, 0, 0, 0.89444],
    62: [0.08556, 0.58556, 0, 0, 0.89444],
    63: [0, 0.69444, 0, 0, 0.54305],
    64: [0, 0.69444, 0, 0, 0.89444],
    65: [0, 0.68611, 0, 0, 0.86944],
    66: [0, 0.68611, 0, 0, 0.81805],
    67: [0, 0.68611, 0, 0, 0.83055],
    68: [0, 0.68611, 0, 0, 0.88194],
    69: [0, 0.68611, 0, 0, 0.75555],
    70: [0, 0.68611, 0, 0, 0.72361],
    71: [0, 0.68611, 0, 0, 0.90416],
    72: [0, 0.68611, 0, 0, 0.9],
    73: [0, 0.68611, 0, 0, 0.43611],
    74: [0, 0.68611, 0, 0, 0.59444],
    75: [0, 0.68611, 0, 0, 0.90138],
    76: [0, 0.68611, 0, 0, 0.69166],
    77: [0, 0.68611, 0, 0, 1.09166],
    78: [0, 0.68611, 0, 0, 0.9],
    79: [0, 0.68611, 0, 0, 0.86388],
    80: [0, 0.68611, 0, 0, 0.78611],
    81: [0.19444, 0.68611, 0, 0, 0.86388],
    82: [0, 0.68611, 0, 0, 0.8625],
    83: [0, 0.68611, 0, 0, 0.63889],
    84: [0, 0.68611, 0, 0, 0.8],
    85: [0, 0.68611, 0, 0, 0.88472],
    86: [0, 0.68611, 0.01597, 0, 0.86944],
    87: [0, 0.68611, 0.01597, 0, 1.18888],
    88: [0, 0.68611, 0, 0, 0.86944],
    89: [0, 0.68611, 0.02875, 0, 0.86944],
    90: [0, 0.68611, 0, 0, 0.70277],
    91: [0.25, 0.75, 0, 0, 0.31944],
    92: [0.25, 0.75, 0, 0, 0.575],
    93: [0.25, 0.75, 0, 0, 0.31944],
    94: [0, 0.69444, 0, 0, 0.575],
    95: [0.31, 0.13444, 0.03194, 0, 0.575],
    97: [0, 0.44444, 0, 0, 0.55902],
    98: [0, 0.69444, 0, 0, 0.63889],
    99: [0, 0.44444, 0, 0, 0.51111],
    100: [0, 0.69444, 0, 0, 0.63889],
    101: [0, 0.44444, 0, 0, 0.52708],
    102: [0, 0.69444, 0.10903, 0, 0.35139],
    103: [0.19444, 0.44444, 0.01597, 0, 0.575],
    104: [0, 0.69444, 0, 0, 0.63889],
    105: [0, 0.69444, 0, 0, 0.31944],
    106: [0.19444, 0.69444, 0, 0, 0.35139],
    107: [0, 0.69444, 0, 0, 0.60694],
    108: [0, 0.69444, 0, 0, 0.31944],
    109: [0, 0.44444, 0, 0, 0.95833],
    110: [0, 0.44444, 0, 0, 0.63889],
    111: [0, 0.44444, 0, 0, 0.575],
    112: [0.19444, 0.44444, 0, 0, 0.63889],
    113: [0.19444, 0.44444, 0, 0, 0.60694],
    114: [0, 0.44444, 0, 0, 0.47361],
    115: [0, 0.44444, 0, 0, 0.45361],
    116: [0, 0.63492, 0, 0, 0.44722],
    117: [0, 0.44444, 0, 0, 0.63889],
    118: [0, 0.44444, 0.01597, 0, 0.60694],
    119: [0, 0.44444, 0.01597, 0, 0.83055],
    120: [0, 0.44444, 0, 0, 0.60694],
    121: [0.19444, 0.44444, 0.01597, 0, 0.60694],
    122: [0, 0.44444, 0, 0, 0.51111],
    123: [0.25, 0.75, 0, 0, 0.575],
    124: [0.25, 0.75, 0, 0, 0.31944],
    125: [0.25, 0.75, 0, 0, 0.575],
    126: [0.35, 0.34444, 0, 0, 0.575],
    160: [0, 0, 0, 0, 0.25],
    163: [0, 0.69444, 0, 0, 0.86853],
    168: [0, 0.69444, 0, 0, 0.575],
    172: [0, 0.44444, 0, 0, 0.76666],
    176: [0, 0.69444, 0, 0, 0.86944],
    177: [0.13333, 0.63333, 0, 0, 0.89444],
    184: [0.17014, 0, 0, 0, 0.51111],
    198: [0, 0.68611, 0, 0, 1.04166],
    215: [0.13333, 0.63333, 0, 0, 0.89444],
    216: [0.04861, 0.73472, 0, 0, 0.89444],
    223: [0, 0.69444, 0, 0, 0.59722],
    230: [0, 0.44444, 0, 0, 0.83055],
    247: [0.13333, 0.63333, 0, 0, 0.89444],
    248: [0.09722, 0.54167, 0, 0, 0.575],
    305: [0, 0.44444, 0, 0, 0.31944],
    338: [0, 0.68611, 0, 0, 1.16944],
    339: [0, 0.44444, 0, 0, 0.89444],
    567: [0.19444, 0.44444, 0, 0, 0.35139],
    710: [0, 0.69444, 0, 0, 0.575],
    711: [0, 0.63194, 0, 0, 0.575],
    713: [0, 0.59611, 0, 0, 0.575],
    714: [0, 0.69444, 0, 0, 0.575],
    715: [0, 0.69444, 0, 0, 0.575],
    728: [0, 0.69444, 0, 0, 0.575],
    729: [0, 0.69444, 0, 0, 0.31944],
    730: [0, 0.69444, 0, 0, 0.86944],
    732: [0, 0.69444, 0, 0, 0.575],
    733: [0, 0.69444, 0, 0, 0.575],
    915: [0, 0.68611, 0, 0, 0.69166],
    916: [0, 0.68611, 0, 0, 0.95833],
    920: [0, 0.68611, 0, 0, 0.89444],
    923: [0, 0.68611, 0, 0, 0.80555],
    926: [0, 0.68611, 0, 0, 0.76666],
    928: [0, 0.68611, 0, 0, 0.9],
    931: [0, 0.68611, 0, 0, 0.83055],
    933: [0, 0.68611, 0, 0, 0.89444],
    934: [0, 0.68611, 0, 0, 0.83055],
    936: [0, 0.68611, 0, 0, 0.89444],
    937: [0, 0.68611, 0, 0, 0.83055],
    8211: [0, 0.44444, 0.03194, 0, 0.575],
    8212: [0, 0.44444, 0.03194, 0, 1.14999],
    8216: [0, 0.69444, 0, 0, 0.31944],
    8217: [0, 0.69444, 0, 0, 0.31944],
    8220: [0, 0.69444, 0, 0, 0.60278],
    8221: [0, 0.69444, 0, 0, 0.60278],
    8224: [0.19444, 0.69444, 0, 0, 0.51111],
    8225: [0.19444, 0.69444, 0, 0, 0.51111],
    8242: [0, 0.55556, 0, 0, 0.34444],
    8407: [0, 0.72444, 0.15486, 0, 0.575],
    8463: [0, 0.69444, 0, 0, 0.66759],
    8465: [0, 0.69444, 0, 0, 0.83055],
    8467: [0, 0.69444, 0, 0, 0.47361],
    8472: [0.19444, 0.44444, 0, 0, 0.74027],
    8476: [0, 0.69444, 0, 0, 0.83055],
    8501: [0, 0.69444, 0, 0, 0.70277],
    8592: [-0.10889, 0.39111, 0, 0, 1.14999],
    8593: [0.19444, 0.69444, 0, 0, 0.575],
    8594: [-0.10889, 0.39111, 0, 0, 1.14999],
    8595: [0.19444, 0.69444, 0, 0, 0.575],
    8596: [-0.10889, 0.39111, 0, 0, 1.14999],
    8597: [0.25, 0.75, 0, 0, 0.575],
    8598: [0.19444, 0.69444, 0, 0, 1.14999],
    8599: [0.19444, 0.69444, 0, 0, 1.14999],
    8600: [0.19444, 0.69444, 0, 0, 1.14999],
    8601: [0.19444, 0.69444, 0, 0, 1.14999],
    8636: [-0.10889, 0.39111, 0, 0, 1.14999],
    8637: [-0.10889, 0.39111, 0, 0, 1.14999],
    8640: [-0.10889, 0.39111, 0, 0, 1.14999],
    8641: [-0.10889, 0.39111, 0, 0, 1.14999],
    8656: [-0.10889, 0.39111, 0, 0, 1.14999],
    8657: [0.19444, 0.69444, 0, 0, 0.70277],
    8658: [-0.10889, 0.39111, 0, 0, 1.14999],
    8659: [0.19444, 0.69444, 0, 0, 0.70277],
    8660: [-0.10889, 0.39111, 0, 0, 1.14999],
    8661: [0.25, 0.75, 0, 0, 0.70277],
    8704: [0, 0.69444, 0, 0, 0.63889],
    8706: [0, 0.69444, 0.06389, 0, 0.62847],
    8707: [0, 0.69444, 0, 0, 0.63889],
    8709: [0.05556, 0.75, 0, 0, 0.575],
    8711: [0, 0.68611, 0, 0, 0.95833],
    8712: [0.08556, 0.58556, 0, 0, 0.76666],
    8715: [0.08556, 0.58556, 0, 0, 0.76666],
    8722: [0.13333, 0.63333, 0, 0, 0.89444],
    8723: [0.13333, 0.63333, 0, 0, 0.89444],
    8725: [0.25, 0.75, 0, 0, 0.575],
    8726: [0.25, 0.75, 0, 0, 0.575],
    8727: [-0.02778, 0.47222, 0, 0, 0.575],
    8728: [-0.02639, 0.47361, 0, 0, 0.575],
    8729: [-0.02639, 0.47361, 0, 0, 0.575],
    8730: [0.18, 0.82, 0, 0, 0.95833],
    8733: [0, 0.44444, 0, 0, 0.89444],
    8734: [0, 0.44444, 0, 0, 1.14999],
    8736: [0, 0.69224, 0, 0, 0.72222],
    8739: [0.25, 0.75, 0, 0, 0.31944],
    8741: [0.25, 0.75, 0, 0, 0.575],
    8743: [0, 0.55556, 0, 0, 0.76666],
    8744: [0, 0.55556, 0, 0, 0.76666],
    8745: [0, 0.55556, 0, 0, 0.76666],
    8746: [0, 0.55556, 0, 0, 0.76666],
    8747: [0.19444, 0.69444, 0.12778, 0, 0.56875],
    8764: [-0.10889, 0.39111, 0, 0, 0.89444],
    8768: [0.19444, 0.69444, 0, 0, 0.31944],
    8771: [222e-5, 0.50222, 0, 0, 0.89444],
    8773: [0.027, 0.638, 0, 0, 0.894],
    8776: [0.02444, 0.52444, 0, 0, 0.89444],
    8781: [222e-5, 0.50222, 0, 0, 0.89444],
    8801: [222e-5, 0.50222, 0, 0, 0.89444],
    8804: [0.19667, 0.69667, 0, 0, 0.89444],
    8805: [0.19667, 0.69667, 0, 0, 0.89444],
    8810: [0.08556, 0.58556, 0, 0, 1.14999],
    8811: [0.08556, 0.58556, 0, 0, 1.14999],
    8826: [0.08556, 0.58556, 0, 0, 0.89444],
    8827: [0.08556, 0.58556, 0, 0, 0.89444],
    8834: [0.08556, 0.58556, 0, 0, 0.89444],
    8835: [0.08556, 0.58556, 0, 0, 0.89444],
    8838: [0.19667, 0.69667, 0, 0, 0.89444],
    8839: [0.19667, 0.69667, 0, 0, 0.89444],
    8846: [0, 0.55556, 0, 0, 0.76666],
    8849: [0.19667, 0.69667, 0, 0, 0.89444],
    8850: [0.19667, 0.69667, 0, 0, 0.89444],
    8851: [0, 0.55556, 0, 0, 0.76666],
    8852: [0, 0.55556, 0, 0, 0.76666],
    8853: [0.13333, 0.63333, 0, 0, 0.89444],
    8854: [0.13333, 0.63333, 0, 0, 0.89444],
    8855: [0.13333, 0.63333, 0, 0, 0.89444],
    8856: [0.13333, 0.63333, 0, 0, 0.89444],
    8857: [0.13333, 0.63333, 0, 0, 0.89444],
    8866: [0, 0.69444, 0, 0, 0.70277],
    8867: [0, 0.69444, 0, 0, 0.70277],
    8868: [0, 0.69444, 0, 0, 0.89444],
    8869: [0, 0.69444, 0, 0, 0.89444],
    8900: [-0.02639, 0.47361, 0, 0, 0.575],
    8901: [-0.02639, 0.47361, 0, 0, 0.31944],
    8902: [-0.02778, 0.47222, 0, 0, 0.575],
    8968: [0.25, 0.75, 0, 0, 0.51111],
    8969: [0.25, 0.75, 0, 0, 0.51111],
    8970: [0.25, 0.75, 0, 0, 0.51111],
    8971: [0.25, 0.75, 0, 0, 0.51111],
    8994: [-0.13889, 0.36111, 0, 0, 1.14999],
    8995: [-0.13889, 0.36111, 0, 0, 1.14999],
    9651: [0.19444, 0.69444, 0, 0, 1.02222],
    9657: [-0.02778, 0.47222, 0, 0, 0.575],
    9661: [0.19444, 0.69444, 0, 0, 1.02222],
    9667: [-0.02778, 0.47222, 0, 0, 0.575],
    9711: [0.19444, 0.69444, 0, 0, 1.14999],
    9824: [0.12963, 0.69444, 0, 0, 0.89444],
    9825: [0.12963, 0.69444, 0, 0, 0.89444],
    9826: [0.12963, 0.69444, 0, 0, 0.89444],
    9827: [0.12963, 0.69444, 0, 0, 0.89444],
    9837: [0, 0.75, 0, 0, 0.44722],
    9838: [0.19444, 0.69444, 0, 0, 0.44722],
    9839: [0.19444, 0.69444, 0, 0, 0.44722],
    10216: [0.25, 0.75, 0, 0, 0.44722],
    10217: [0.25, 0.75, 0, 0, 0.44722],
    10815: [0, 0.68611, 0, 0, 0.9],
    10927: [0.19667, 0.69667, 0, 0, 0.89444],
    10928: [0.19667, 0.69667, 0, 0, 0.89444],
    57376: [0.19444, 0.69444, 0, 0, 0]
  },
  "Main-BoldItalic": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69444, 0.11417, 0, 0.38611],
    34: [0, 0.69444, 0.07939, 0, 0.62055],
    35: [0.19444, 0.69444, 0.06833, 0, 0.94444],
    37: [0.05556, 0.75, 0.12861, 0, 0.94444],
    38: [0, 0.69444, 0.08528, 0, 0.88555],
    39: [0, 0.69444, 0.12945, 0, 0.35555],
    40: [0.25, 0.75, 0.15806, 0, 0.47333],
    41: [0.25, 0.75, 0.03306, 0, 0.47333],
    42: [0, 0.75, 0.14333, 0, 0.59111],
    43: [0.10333, 0.60333, 0.03306, 0, 0.88555],
    44: [0.19444, 0.14722, 0, 0, 0.35555],
    45: [0, 0.44444, 0.02611, 0, 0.41444],
    46: [0, 0.14722, 0, 0, 0.35555],
    47: [0.25, 0.75, 0.15806, 0, 0.59111],
    48: [0, 0.64444, 0.13167, 0, 0.59111],
    49: [0, 0.64444, 0.13167, 0, 0.59111],
    50: [0, 0.64444, 0.13167, 0, 0.59111],
    51: [0, 0.64444, 0.13167, 0, 0.59111],
    52: [0.19444, 0.64444, 0.13167, 0, 0.59111],
    53: [0, 0.64444, 0.13167, 0, 0.59111],
    54: [0, 0.64444, 0.13167, 0, 0.59111],
    55: [0.19444, 0.64444, 0.13167, 0, 0.59111],
    56: [0, 0.64444, 0.13167, 0, 0.59111],
    57: [0, 0.64444, 0.13167, 0, 0.59111],
    58: [0, 0.44444, 0.06695, 0, 0.35555],
    59: [0.19444, 0.44444, 0.06695, 0, 0.35555],
    61: [-0.10889, 0.39111, 0.06833, 0, 0.88555],
    63: [0, 0.69444, 0.11472, 0, 0.59111],
    64: [0, 0.69444, 0.09208, 0, 0.88555],
    65: [0, 0.68611, 0, 0, 0.86555],
    66: [0, 0.68611, 0.0992, 0, 0.81666],
    67: [0, 0.68611, 0.14208, 0, 0.82666],
    68: [0, 0.68611, 0.09062, 0, 0.87555],
    69: [0, 0.68611, 0.11431, 0, 0.75666],
    70: [0, 0.68611, 0.12903, 0, 0.72722],
    71: [0, 0.68611, 0.07347, 0, 0.89527],
    72: [0, 0.68611, 0.17208, 0, 0.8961],
    73: [0, 0.68611, 0.15681, 0, 0.47166],
    74: [0, 0.68611, 0.145, 0, 0.61055],
    75: [0, 0.68611, 0.14208, 0, 0.89499],
    76: [0, 0.68611, 0, 0, 0.69777],
    77: [0, 0.68611, 0.17208, 0, 1.07277],
    78: [0, 0.68611, 0.17208, 0, 0.8961],
    79: [0, 0.68611, 0.09062, 0, 0.85499],
    80: [0, 0.68611, 0.0992, 0, 0.78721],
    81: [0.19444, 0.68611, 0.09062, 0, 0.85499],
    82: [0, 0.68611, 0.02559, 0, 0.85944],
    83: [0, 0.68611, 0.11264, 0, 0.64999],
    84: [0, 0.68611, 0.12903, 0, 0.7961],
    85: [0, 0.68611, 0.17208, 0, 0.88083],
    86: [0, 0.68611, 0.18625, 0, 0.86555],
    87: [0, 0.68611, 0.18625, 0, 1.15999],
    88: [0, 0.68611, 0.15681, 0, 0.86555],
    89: [0, 0.68611, 0.19803, 0, 0.86555],
    90: [0, 0.68611, 0.14208, 0, 0.70888],
    91: [0.25, 0.75, 0.1875, 0, 0.35611],
    93: [0.25, 0.75, 0.09972, 0, 0.35611],
    94: [0, 0.69444, 0.06709, 0, 0.59111],
    95: [0.31, 0.13444, 0.09811, 0, 0.59111],
    97: [0, 0.44444, 0.09426, 0, 0.59111],
    98: [0, 0.69444, 0.07861, 0, 0.53222],
    99: [0, 0.44444, 0.05222, 0, 0.53222],
    100: [0, 0.69444, 0.10861, 0, 0.59111],
    101: [0, 0.44444, 0.085, 0, 0.53222],
    102: [0.19444, 0.69444, 0.21778, 0, 0.4],
    103: [0.19444, 0.44444, 0.105, 0, 0.53222],
    104: [0, 0.69444, 0.09426, 0, 0.59111],
    105: [0, 0.69326, 0.11387, 0, 0.35555],
    106: [0.19444, 0.69326, 0.1672, 0, 0.35555],
    107: [0, 0.69444, 0.11111, 0, 0.53222],
    108: [0, 0.69444, 0.10861, 0, 0.29666],
    109: [0, 0.44444, 0.09426, 0, 0.94444],
    110: [0, 0.44444, 0.09426, 0, 0.64999],
    111: [0, 0.44444, 0.07861, 0, 0.59111],
    112: [0.19444, 0.44444, 0.07861, 0, 0.59111],
    113: [0.19444, 0.44444, 0.105, 0, 0.53222],
    114: [0, 0.44444, 0.11111, 0, 0.50167],
    115: [0, 0.44444, 0.08167, 0, 0.48694],
    116: [0, 0.63492, 0.09639, 0, 0.385],
    117: [0, 0.44444, 0.09426, 0, 0.62055],
    118: [0, 0.44444, 0.11111, 0, 0.53222],
    119: [0, 0.44444, 0.11111, 0, 0.76777],
    120: [0, 0.44444, 0.12583, 0, 0.56055],
    121: [0.19444, 0.44444, 0.105, 0, 0.56166],
    122: [0, 0.44444, 0.13889, 0, 0.49055],
    126: [0.35, 0.34444, 0.11472, 0, 0.59111],
    160: [0, 0, 0, 0, 0.25],
    168: [0, 0.69444, 0.11473, 0, 0.59111],
    176: [0, 0.69444, 0, 0, 0.94888],
    184: [0.17014, 0, 0, 0, 0.53222],
    198: [0, 0.68611, 0.11431, 0, 1.02277],
    216: [0.04861, 0.73472, 0.09062, 0, 0.88555],
    223: [0.19444, 0.69444, 0.09736, 0, 0.665],
    230: [0, 0.44444, 0.085, 0, 0.82666],
    248: [0.09722, 0.54167, 0.09458, 0, 0.59111],
    305: [0, 0.44444, 0.09426, 0, 0.35555],
    338: [0, 0.68611, 0.11431, 0, 1.14054],
    339: [0, 0.44444, 0.085, 0, 0.82666],
    567: [0.19444, 0.44444, 0.04611, 0, 0.385],
    710: [0, 0.69444, 0.06709, 0, 0.59111],
    711: [0, 0.63194, 0.08271, 0, 0.59111],
    713: [0, 0.59444, 0.10444, 0, 0.59111],
    714: [0, 0.69444, 0.08528, 0, 0.59111],
    715: [0, 0.69444, 0, 0, 0.59111],
    728: [0, 0.69444, 0.10333, 0, 0.59111],
    729: [0, 0.69444, 0.12945, 0, 0.35555],
    730: [0, 0.69444, 0, 0, 0.94888],
    732: [0, 0.69444, 0.11472, 0, 0.59111],
    733: [0, 0.69444, 0.11472, 0, 0.59111],
    915: [0, 0.68611, 0.12903, 0, 0.69777],
    916: [0, 0.68611, 0, 0, 0.94444],
    920: [0, 0.68611, 0.09062, 0, 0.88555],
    923: [0, 0.68611, 0, 0, 0.80666],
    926: [0, 0.68611, 0.15092, 0, 0.76777],
    928: [0, 0.68611, 0.17208, 0, 0.8961],
    931: [0, 0.68611, 0.11431, 0, 0.82666],
    933: [0, 0.68611, 0.10778, 0, 0.88555],
    934: [0, 0.68611, 0.05632, 0, 0.82666],
    936: [0, 0.68611, 0.10778, 0, 0.88555],
    937: [0, 0.68611, 0.0992, 0, 0.82666],
    8211: [0, 0.44444, 0.09811, 0, 0.59111],
    8212: [0, 0.44444, 0.09811, 0, 1.18221],
    8216: [0, 0.69444, 0.12945, 0, 0.35555],
    8217: [0, 0.69444, 0.12945, 0, 0.35555],
    8220: [0, 0.69444, 0.16772, 0, 0.62055],
    8221: [0, 0.69444, 0.07939, 0, 0.62055]
  },
  "Main-Italic": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69444, 0.12417, 0, 0.30667],
    34: [0, 0.69444, 0.06961, 0, 0.51444],
    35: [0.19444, 0.69444, 0.06616, 0, 0.81777],
    37: [0.05556, 0.75, 0.13639, 0, 0.81777],
    38: [0, 0.69444, 0.09694, 0, 0.76666],
    39: [0, 0.69444, 0.12417, 0, 0.30667],
    40: [0.25, 0.75, 0.16194, 0, 0.40889],
    41: [0.25, 0.75, 0.03694, 0, 0.40889],
    42: [0, 0.75, 0.14917, 0, 0.51111],
    43: [0.05667, 0.56167, 0.03694, 0, 0.76666],
    44: [0.19444, 0.10556, 0, 0, 0.30667],
    45: [0, 0.43056, 0.02826, 0, 0.35778],
    46: [0, 0.10556, 0, 0, 0.30667],
    47: [0.25, 0.75, 0.16194, 0, 0.51111],
    48: [0, 0.64444, 0.13556, 0, 0.51111],
    49: [0, 0.64444, 0.13556, 0, 0.51111],
    50: [0, 0.64444, 0.13556, 0, 0.51111],
    51: [0, 0.64444, 0.13556, 0, 0.51111],
    52: [0.19444, 0.64444, 0.13556, 0, 0.51111],
    53: [0, 0.64444, 0.13556, 0, 0.51111],
    54: [0, 0.64444, 0.13556, 0, 0.51111],
    55: [0.19444, 0.64444, 0.13556, 0, 0.51111],
    56: [0, 0.64444, 0.13556, 0, 0.51111],
    57: [0, 0.64444, 0.13556, 0, 0.51111],
    58: [0, 0.43056, 0.0582, 0, 0.30667],
    59: [0.19444, 0.43056, 0.0582, 0, 0.30667],
    61: [-0.13313, 0.36687, 0.06616, 0, 0.76666],
    63: [0, 0.69444, 0.1225, 0, 0.51111],
    64: [0, 0.69444, 0.09597, 0, 0.76666],
    65: [0, 0.68333, 0, 0, 0.74333],
    66: [0, 0.68333, 0.10257, 0, 0.70389],
    67: [0, 0.68333, 0.14528, 0, 0.71555],
    68: [0, 0.68333, 0.09403, 0, 0.755],
    69: [0, 0.68333, 0.12028, 0, 0.67833],
    70: [0, 0.68333, 0.13305, 0, 0.65277],
    71: [0, 0.68333, 0.08722, 0, 0.77361],
    72: [0, 0.68333, 0.16389, 0, 0.74333],
    73: [0, 0.68333, 0.15806, 0, 0.38555],
    74: [0, 0.68333, 0.14028, 0, 0.525],
    75: [0, 0.68333, 0.14528, 0, 0.76888],
    76: [0, 0.68333, 0, 0, 0.62722],
    77: [0, 0.68333, 0.16389, 0, 0.89666],
    78: [0, 0.68333, 0.16389, 0, 0.74333],
    79: [0, 0.68333, 0.09403, 0, 0.76666],
    80: [0, 0.68333, 0.10257, 0, 0.67833],
    81: [0.19444, 0.68333, 0.09403, 0, 0.76666],
    82: [0, 0.68333, 0.03868, 0, 0.72944],
    83: [0, 0.68333, 0.11972, 0, 0.56222],
    84: [0, 0.68333, 0.13305, 0, 0.71555],
    85: [0, 0.68333, 0.16389, 0, 0.74333],
    86: [0, 0.68333, 0.18361, 0, 0.74333],
    87: [0, 0.68333, 0.18361, 0, 0.99888],
    88: [0, 0.68333, 0.15806, 0, 0.74333],
    89: [0, 0.68333, 0.19383, 0, 0.74333],
    90: [0, 0.68333, 0.14528, 0, 0.61333],
    91: [0.25, 0.75, 0.1875, 0, 0.30667],
    93: [0.25, 0.75, 0.10528, 0, 0.30667],
    94: [0, 0.69444, 0.06646, 0, 0.51111],
    95: [0.31, 0.12056, 0.09208, 0, 0.51111],
    97: [0, 0.43056, 0.07671, 0, 0.51111],
    98: [0, 0.69444, 0.06312, 0, 0.46],
    99: [0, 0.43056, 0.05653, 0, 0.46],
    100: [0, 0.69444, 0.10333, 0, 0.51111],
    101: [0, 0.43056, 0.07514, 0, 0.46],
    102: [0.19444, 0.69444, 0.21194, 0, 0.30667],
    103: [0.19444, 0.43056, 0.08847, 0, 0.46],
    104: [0, 0.69444, 0.07671, 0, 0.51111],
    105: [0, 0.65536, 0.1019, 0, 0.30667],
    106: [0.19444, 0.65536, 0.14467, 0, 0.30667],
    107: [0, 0.69444, 0.10764, 0, 0.46],
    108: [0, 0.69444, 0.10333, 0, 0.25555],
    109: [0, 0.43056, 0.07671, 0, 0.81777],
    110: [0, 0.43056, 0.07671, 0, 0.56222],
    111: [0, 0.43056, 0.06312, 0, 0.51111],
    112: [0.19444, 0.43056, 0.06312, 0, 0.51111],
    113: [0.19444, 0.43056, 0.08847, 0, 0.46],
    114: [0, 0.43056, 0.10764, 0, 0.42166],
    115: [0, 0.43056, 0.08208, 0, 0.40889],
    116: [0, 0.61508, 0.09486, 0, 0.33222],
    117: [0, 0.43056, 0.07671, 0, 0.53666],
    118: [0, 0.43056, 0.10764, 0, 0.46],
    119: [0, 0.43056, 0.10764, 0, 0.66444],
    120: [0, 0.43056, 0.12042, 0, 0.46389],
    121: [0.19444, 0.43056, 0.08847, 0, 0.48555],
    122: [0, 0.43056, 0.12292, 0, 0.40889],
    126: [0.35, 0.31786, 0.11585, 0, 0.51111],
    160: [0, 0, 0, 0, 0.25],
    168: [0, 0.66786, 0.10474, 0, 0.51111],
    176: [0, 0.69444, 0, 0, 0.83129],
    184: [0.17014, 0, 0, 0, 0.46],
    198: [0, 0.68333, 0.12028, 0, 0.88277],
    216: [0.04861, 0.73194, 0.09403, 0, 0.76666],
    223: [0.19444, 0.69444, 0.10514, 0, 0.53666],
    230: [0, 0.43056, 0.07514, 0, 0.71555],
    248: [0.09722, 0.52778, 0.09194, 0, 0.51111],
    338: [0, 0.68333, 0.12028, 0, 0.98499],
    339: [0, 0.43056, 0.07514, 0, 0.71555],
    710: [0, 0.69444, 0.06646, 0, 0.51111],
    711: [0, 0.62847, 0.08295, 0, 0.51111],
    713: [0, 0.56167, 0.10333, 0, 0.51111],
    714: [0, 0.69444, 0.09694, 0, 0.51111],
    715: [0, 0.69444, 0, 0, 0.51111],
    728: [0, 0.69444, 0.10806, 0, 0.51111],
    729: [0, 0.66786, 0.11752, 0, 0.30667],
    730: [0, 0.69444, 0, 0, 0.83129],
    732: [0, 0.66786, 0.11585, 0, 0.51111],
    733: [0, 0.69444, 0.1225, 0, 0.51111],
    915: [0, 0.68333, 0.13305, 0, 0.62722],
    916: [0, 0.68333, 0, 0, 0.81777],
    920: [0, 0.68333, 0.09403, 0, 0.76666],
    923: [0, 0.68333, 0, 0, 0.69222],
    926: [0, 0.68333, 0.15294, 0, 0.66444],
    928: [0, 0.68333, 0.16389, 0, 0.74333],
    931: [0, 0.68333, 0.12028, 0, 0.71555],
    933: [0, 0.68333, 0.11111, 0, 0.76666],
    934: [0, 0.68333, 0.05986, 0, 0.71555],
    936: [0, 0.68333, 0.11111, 0, 0.76666],
    937: [0, 0.68333, 0.10257, 0, 0.71555],
    8211: [0, 0.43056, 0.09208, 0, 0.51111],
    8212: [0, 0.43056, 0.09208, 0, 1.02222],
    8216: [0, 0.69444, 0.12417, 0, 0.30667],
    8217: [0, 0.69444, 0.12417, 0, 0.30667],
    8220: [0, 0.69444, 0.1685, 0, 0.51444],
    8221: [0, 0.69444, 0.06961, 0, 0.51444],
    8463: [0, 0.68889, 0, 0, 0.54028]
  },
  "Main-Regular": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69444, 0, 0, 0.27778],
    34: [0, 0.69444, 0, 0, 0.5],
    35: [0.19444, 0.69444, 0, 0, 0.83334],
    36: [0.05556, 0.75, 0, 0, 0.5],
    37: [0.05556, 0.75, 0, 0, 0.83334],
    38: [0, 0.69444, 0, 0, 0.77778],
    39: [0, 0.69444, 0, 0, 0.27778],
    40: [0.25, 0.75, 0, 0, 0.38889],
    41: [0.25, 0.75, 0, 0, 0.38889],
    42: [0, 0.75, 0, 0, 0.5],
    43: [0.08333, 0.58333, 0, 0, 0.77778],
    44: [0.19444, 0.10556, 0, 0, 0.27778],
    45: [0, 0.43056, 0, 0, 0.33333],
    46: [0, 0.10556, 0, 0, 0.27778],
    47: [0.25, 0.75, 0, 0, 0.5],
    48: [0, 0.64444, 0, 0, 0.5],
    49: [0, 0.64444, 0, 0, 0.5],
    50: [0, 0.64444, 0, 0, 0.5],
    51: [0, 0.64444, 0, 0, 0.5],
    52: [0, 0.64444, 0, 0, 0.5],
    53: [0, 0.64444, 0, 0, 0.5],
    54: [0, 0.64444, 0, 0, 0.5],
    55: [0, 0.64444, 0, 0, 0.5],
    56: [0, 0.64444, 0, 0, 0.5],
    57: [0, 0.64444, 0, 0, 0.5],
    58: [0, 0.43056, 0, 0, 0.27778],
    59: [0.19444, 0.43056, 0, 0, 0.27778],
    60: [0.0391, 0.5391, 0, 0, 0.77778],
    61: [-0.13313, 0.36687, 0, 0, 0.77778],
    62: [0.0391, 0.5391, 0, 0, 0.77778],
    63: [0, 0.69444, 0, 0, 0.47222],
    64: [0, 0.69444, 0, 0, 0.77778],
    65: [0, 0.68333, 0, 0, 0.75],
    66: [0, 0.68333, 0, 0, 0.70834],
    67: [0, 0.68333, 0, 0, 0.72222],
    68: [0, 0.68333, 0, 0, 0.76389],
    69: [0, 0.68333, 0, 0, 0.68056],
    70: [0, 0.68333, 0, 0, 0.65278],
    71: [0, 0.68333, 0, 0, 0.78472],
    72: [0, 0.68333, 0, 0, 0.75],
    73: [0, 0.68333, 0, 0, 0.36111],
    74: [0, 0.68333, 0, 0, 0.51389],
    75: [0, 0.68333, 0, 0, 0.77778],
    76: [0, 0.68333, 0, 0, 0.625],
    77: [0, 0.68333, 0, 0, 0.91667],
    78: [0, 0.68333, 0, 0, 0.75],
    79: [0, 0.68333, 0, 0, 0.77778],
    80: [0, 0.68333, 0, 0, 0.68056],
    81: [0.19444, 0.68333, 0, 0, 0.77778],
    82: [0, 0.68333, 0, 0, 0.73611],
    83: [0, 0.68333, 0, 0, 0.55556],
    84: [0, 0.68333, 0, 0, 0.72222],
    85: [0, 0.68333, 0, 0, 0.75],
    86: [0, 0.68333, 0.01389, 0, 0.75],
    87: [0, 0.68333, 0.01389, 0, 1.02778],
    88: [0, 0.68333, 0, 0, 0.75],
    89: [0, 0.68333, 0.025, 0, 0.75],
    90: [0, 0.68333, 0, 0, 0.61111],
    91: [0.25, 0.75, 0, 0, 0.27778],
    92: [0.25, 0.75, 0, 0, 0.5],
    93: [0.25, 0.75, 0, 0, 0.27778],
    94: [0, 0.69444, 0, 0, 0.5],
    95: [0.31, 0.12056, 0.02778, 0, 0.5],
    97: [0, 0.43056, 0, 0, 0.5],
    98: [0, 0.69444, 0, 0, 0.55556],
    99: [0, 0.43056, 0, 0, 0.44445],
    100: [0, 0.69444, 0, 0, 0.55556],
    101: [0, 0.43056, 0, 0, 0.44445],
    102: [0, 0.69444, 0.07778, 0, 0.30556],
    103: [0.19444, 0.43056, 0.01389, 0, 0.5],
    104: [0, 0.69444, 0, 0, 0.55556],
    105: [0, 0.66786, 0, 0, 0.27778],
    106: [0.19444, 0.66786, 0, 0, 0.30556],
    107: [0, 0.69444, 0, 0, 0.52778],
    108: [0, 0.69444, 0, 0, 0.27778],
    109: [0, 0.43056, 0, 0, 0.83334],
    110: [0, 0.43056, 0, 0, 0.55556],
    111: [0, 0.43056, 0, 0, 0.5],
    112: [0.19444, 0.43056, 0, 0, 0.55556],
    113: [0.19444, 0.43056, 0, 0, 0.52778],
    114: [0, 0.43056, 0, 0, 0.39167],
    115: [0, 0.43056, 0, 0, 0.39445],
    116: [0, 0.61508, 0, 0, 0.38889],
    117: [0, 0.43056, 0, 0, 0.55556],
    118: [0, 0.43056, 0.01389, 0, 0.52778],
    119: [0, 0.43056, 0.01389, 0, 0.72222],
    120: [0, 0.43056, 0, 0, 0.52778],
    121: [0.19444, 0.43056, 0.01389, 0, 0.52778],
    122: [0, 0.43056, 0, 0, 0.44445],
    123: [0.25, 0.75, 0, 0, 0.5],
    124: [0.25, 0.75, 0, 0, 0.27778],
    125: [0.25, 0.75, 0, 0, 0.5],
    126: [0.35, 0.31786, 0, 0, 0.5],
    160: [0, 0, 0, 0, 0.25],
    163: [0, 0.69444, 0, 0, 0.76909],
    167: [0.19444, 0.69444, 0, 0, 0.44445],
    168: [0, 0.66786, 0, 0, 0.5],
    172: [0, 0.43056, 0, 0, 0.66667],
    176: [0, 0.69444, 0, 0, 0.75],
    177: [0.08333, 0.58333, 0, 0, 0.77778],
    182: [0.19444, 0.69444, 0, 0, 0.61111],
    184: [0.17014, 0, 0, 0, 0.44445],
    198: [0, 0.68333, 0, 0, 0.90278],
    215: [0.08333, 0.58333, 0, 0, 0.77778],
    216: [0.04861, 0.73194, 0, 0, 0.77778],
    223: [0, 0.69444, 0, 0, 0.5],
    230: [0, 0.43056, 0, 0, 0.72222],
    247: [0.08333, 0.58333, 0, 0, 0.77778],
    248: [0.09722, 0.52778, 0, 0, 0.5],
    305: [0, 0.43056, 0, 0, 0.27778],
    338: [0, 0.68333, 0, 0, 1.01389],
    339: [0, 0.43056, 0, 0, 0.77778],
    567: [0.19444, 0.43056, 0, 0, 0.30556],
    710: [0, 0.69444, 0, 0, 0.5],
    711: [0, 0.62847, 0, 0, 0.5],
    713: [0, 0.56778, 0, 0, 0.5],
    714: [0, 0.69444, 0, 0, 0.5],
    715: [0, 0.69444, 0, 0, 0.5],
    728: [0, 0.69444, 0, 0, 0.5],
    729: [0, 0.66786, 0, 0, 0.27778],
    730: [0, 0.69444, 0, 0, 0.75],
    732: [0, 0.66786, 0, 0, 0.5],
    733: [0, 0.69444, 0, 0, 0.5],
    915: [0, 0.68333, 0, 0, 0.625],
    916: [0, 0.68333, 0, 0, 0.83334],
    920: [0, 0.68333, 0, 0, 0.77778],
    923: [0, 0.68333, 0, 0, 0.69445],
    926: [0, 0.68333, 0, 0, 0.66667],
    928: [0, 0.68333, 0, 0, 0.75],
    931: [0, 0.68333, 0, 0, 0.72222],
    933: [0, 0.68333, 0, 0, 0.77778],
    934: [0, 0.68333, 0, 0, 0.72222],
    936: [0, 0.68333, 0, 0, 0.77778],
    937: [0, 0.68333, 0, 0, 0.72222],
    8211: [0, 0.43056, 0.02778, 0, 0.5],
    8212: [0, 0.43056, 0.02778, 0, 1],
    8216: [0, 0.69444, 0, 0, 0.27778],
    8217: [0, 0.69444, 0, 0, 0.27778],
    8220: [0, 0.69444, 0, 0, 0.5],
    8221: [0, 0.69444, 0, 0, 0.5],
    8224: [0.19444, 0.69444, 0, 0, 0.44445],
    8225: [0.19444, 0.69444, 0, 0, 0.44445],
    8230: [0, 0.123, 0, 0, 1.172],
    8242: [0, 0.55556, 0, 0, 0.275],
    8407: [0, 0.71444, 0.15382, 0, 0.5],
    8463: [0, 0.68889, 0, 0, 0.54028],
    8465: [0, 0.69444, 0, 0, 0.72222],
    8467: [0, 0.69444, 0, 0.11111, 0.41667],
    8472: [0.19444, 0.43056, 0, 0.11111, 0.63646],
    8476: [0, 0.69444, 0, 0, 0.72222],
    8501: [0, 0.69444, 0, 0, 0.61111],
    8592: [-0.13313, 0.36687, 0, 0, 1],
    8593: [0.19444, 0.69444, 0, 0, 0.5],
    8594: [-0.13313, 0.36687, 0, 0, 1],
    8595: [0.19444, 0.69444, 0, 0, 0.5],
    8596: [-0.13313, 0.36687, 0, 0, 1],
    8597: [0.25, 0.75, 0, 0, 0.5],
    8598: [0.19444, 0.69444, 0, 0, 1],
    8599: [0.19444, 0.69444, 0, 0, 1],
    8600: [0.19444, 0.69444, 0, 0, 1],
    8601: [0.19444, 0.69444, 0, 0, 1],
    8614: [0.011, 0.511, 0, 0, 1],
    8617: [0.011, 0.511, 0, 0, 1.126],
    8618: [0.011, 0.511, 0, 0, 1.126],
    8636: [-0.13313, 0.36687, 0, 0, 1],
    8637: [-0.13313, 0.36687, 0, 0, 1],
    8640: [-0.13313, 0.36687, 0, 0, 1],
    8641: [-0.13313, 0.36687, 0, 0, 1],
    8652: [0.011, 0.671, 0, 0, 1],
    8656: [-0.13313, 0.36687, 0, 0, 1],
    8657: [0.19444, 0.69444, 0, 0, 0.61111],
    8658: [-0.13313, 0.36687, 0, 0, 1],
    8659: [0.19444, 0.69444, 0, 0, 0.61111],
    8660: [-0.13313, 0.36687, 0, 0, 1],
    8661: [0.25, 0.75, 0, 0, 0.61111],
    8704: [0, 0.69444, 0, 0, 0.55556],
    8706: [0, 0.69444, 0.05556, 0.08334, 0.5309],
    8707: [0, 0.69444, 0, 0, 0.55556],
    8709: [0.05556, 0.75, 0, 0, 0.5],
    8711: [0, 0.68333, 0, 0, 0.83334],
    8712: [0.0391, 0.5391, 0, 0, 0.66667],
    8715: [0.0391, 0.5391, 0, 0, 0.66667],
    8722: [0.08333, 0.58333, 0, 0, 0.77778],
    8723: [0.08333, 0.58333, 0, 0, 0.77778],
    8725: [0.25, 0.75, 0, 0, 0.5],
    8726: [0.25, 0.75, 0, 0, 0.5],
    8727: [-0.03472, 0.46528, 0, 0, 0.5],
    8728: [-0.05555, 0.44445, 0, 0, 0.5],
    8729: [-0.05555, 0.44445, 0, 0, 0.5],
    8730: [0.2, 0.8, 0, 0, 0.83334],
    8733: [0, 0.43056, 0, 0, 0.77778],
    8734: [0, 0.43056, 0, 0, 1],
    8736: [0, 0.69224, 0, 0, 0.72222],
    8739: [0.25, 0.75, 0, 0, 0.27778],
    8741: [0.25, 0.75, 0, 0, 0.5],
    8743: [0, 0.55556, 0, 0, 0.66667],
    8744: [0, 0.55556, 0, 0, 0.66667],
    8745: [0, 0.55556, 0, 0, 0.66667],
    8746: [0, 0.55556, 0, 0, 0.66667],
    8747: [0.19444, 0.69444, 0.11111, 0, 0.41667],
    8764: [-0.13313, 0.36687, 0, 0, 0.77778],
    8768: [0.19444, 0.69444, 0, 0, 0.27778],
    8771: [-0.03625, 0.46375, 0, 0, 0.77778],
    8773: [-0.022, 0.589, 0, 0, 0.778],
    8776: [-0.01688, 0.48312, 0, 0, 0.77778],
    8781: [-0.03625, 0.46375, 0, 0, 0.77778],
    8784: [-0.133, 0.673, 0, 0, 0.778],
    8801: [-0.03625, 0.46375, 0, 0, 0.77778],
    8804: [0.13597, 0.63597, 0, 0, 0.77778],
    8805: [0.13597, 0.63597, 0, 0, 0.77778],
    8810: [0.0391, 0.5391, 0, 0, 1],
    8811: [0.0391, 0.5391, 0, 0, 1],
    8826: [0.0391, 0.5391, 0, 0, 0.77778],
    8827: [0.0391, 0.5391, 0, 0, 0.77778],
    8834: [0.0391, 0.5391, 0, 0, 0.77778],
    8835: [0.0391, 0.5391, 0, 0, 0.77778],
    8838: [0.13597, 0.63597, 0, 0, 0.77778],
    8839: [0.13597, 0.63597, 0, 0, 0.77778],
    8846: [0, 0.55556, 0, 0, 0.66667],
    8849: [0.13597, 0.63597, 0, 0, 0.77778],
    8850: [0.13597, 0.63597, 0, 0, 0.77778],
    8851: [0, 0.55556, 0, 0, 0.66667],
    8852: [0, 0.55556, 0, 0, 0.66667],
    8853: [0.08333, 0.58333, 0, 0, 0.77778],
    8854: [0.08333, 0.58333, 0, 0, 0.77778],
    8855: [0.08333, 0.58333, 0, 0, 0.77778],
    8856: [0.08333, 0.58333, 0, 0, 0.77778],
    8857: [0.08333, 0.58333, 0, 0, 0.77778],
    8866: [0, 0.69444, 0, 0, 0.61111],
    8867: [0, 0.69444, 0, 0, 0.61111],
    8868: [0, 0.69444, 0, 0, 0.77778],
    8869: [0, 0.69444, 0, 0, 0.77778],
    8872: [0.249, 0.75, 0, 0, 0.867],
    8900: [-0.05555, 0.44445, 0, 0, 0.5],
    8901: [-0.05555, 0.44445, 0, 0, 0.27778],
    8902: [-0.03472, 0.46528, 0, 0, 0.5],
    8904: [5e-3, 0.505, 0, 0, 0.9],
    8942: [0.03, 0.903, 0, 0, 0.278],
    8943: [-0.19, 0.313, 0, 0, 1.172],
    8945: [-0.1, 0.823, 0, 0, 1.282],
    8968: [0.25, 0.75, 0, 0, 0.44445],
    8969: [0.25, 0.75, 0, 0, 0.44445],
    8970: [0.25, 0.75, 0, 0, 0.44445],
    8971: [0.25, 0.75, 0, 0, 0.44445],
    8994: [-0.14236, 0.35764, 0, 0, 1],
    8995: [-0.14236, 0.35764, 0, 0, 1],
    9136: [0.244, 0.744, 0, 0, 0.412],
    9137: [0.244, 0.745, 0, 0, 0.412],
    9651: [0.19444, 0.69444, 0, 0, 0.88889],
    9657: [-0.03472, 0.46528, 0, 0, 0.5],
    9661: [0.19444, 0.69444, 0, 0, 0.88889],
    9667: [-0.03472, 0.46528, 0, 0, 0.5],
    9711: [0.19444, 0.69444, 0, 0, 1],
    9824: [0.12963, 0.69444, 0, 0, 0.77778],
    9825: [0.12963, 0.69444, 0, 0, 0.77778],
    9826: [0.12963, 0.69444, 0, 0, 0.77778],
    9827: [0.12963, 0.69444, 0, 0, 0.77778],
    9837: [0, 0.75, 0, 0, 0.38889],
    9838: [0.19444, 0.69444, 0, 0, 0.38889],
    9839: [0.19444, 0.69444, 0, 0, 0.38889],
    10216: [0.25, 0.75, 0, 0, 0.38889],
    10217: [0.25, 0.75, 0, 0, 0.38889],
    10222: [0.244, 0.744, 0, 0, 0.412],
    10223: [0.244, 0.745, 0, 0, 0.412],
    10229: [0.011, 0.511, 0, 0, 1.609],
    10230: [0.011, 0.511, 0, 0, 1.638],
    10231: [0.011, 0.511, 0, 0, 1.859],
    10232: [0.024, 0.525, 0, 0, 1.609],
    10233: [0.024, 0.525, 0, 0, 1.638],
    10234: [0.024, 0.525, 0, 0, 1.858],
    10236: [0.011, 0.511, 0, 0, 1.638],
    10815: [0, 0.68333, 0, 0, 0.75],
    10927: [0.13597, 0.63597, 0, 0, 0.77778],
    10928: [0.13597, 0.63597, 0, 0, 0.77778],
    57376: [0.19444, 0.69444, 0, 0, 0]
  },
  "Math-BoldItalic": {
    32: [0, 0, 0, 0, 0.25],
    48: [0, 0.44444, 0, 0, 0.575],
    49: [0, 0.44444, 0, 0, 0.575],
    50: [0, 0.44444, 0, 0, 0.575],
    51: [0.19444, 0.44444, 0, 0, 0.575],
    52: [0.19444, 0.44444, 0, 0, 0.575],
    53: [0.19444, 0.44444, 0, 0, 0.575],
    54: [0, 0.64444, 0, 0, 0.575],
    55: [0.19444, 0.44444, 0, 0, 0.575],
    56: [0, 0.64444, 0, 0, 0.575],
    57: [0.19444, 0.44444, 0, 0, 0.575],
    65: [0, 0.68611, 0, 0, 0.86944],
    66: [0, 0.68611, 0.04835, 0, 0.8664],
    67: [0, 0.68611, 0.06979, 0, 0.81694],
    68: [0, 0.68611, 0.03194, 0, 0.93812],
    69: [0, 0.68611, 0.05451, 0, 0.81007],
    70: [0, 0.68611, 0.15972, 0, 0.68889],
    71: [0, 0.68611, 0, 0, 0.88673],
    72: [0, 0.68611, 0.08229, 0, 0.98229],
    73: [0, 0.68611, 0.07778, 0, 0.51111],
    74: [0, 0.68611, 0.10069, 0, 0.63125],
    75: [0, 0.68611, 0.06979, 0, 0.97118],
    76: [0, 0.68611, 0, 0, 0.75555],
    77: [0, 0.68611, 0.11424, 0, 1.14201],
    78: [0, 0.68611, 0.11424, 0, 0.95034],
    79: [0, 0.68611, 0.03194, 0, 0.83666],
    80: [0, 0.68611, 0.15972, 0, 0.72309],
    81: [0.19444, 0.68611, 0, 0, 0.86861],
    82: [0, 0.68611, 421e-5, 0, 0.87235],
    83: [0, 0.68611, 0.05382, 0, 0.69271],
    84: [0, 0.68611, 0.15972, 0, 0.63663],
    85: [0, 0.68611, 0.11424, 0, 0.80027],
    86: [0, 0.68611, 0.25555, 0, 0.67778],
    87: [0, 0.68611, 0.15972, 0, 1.09305],
    88: [0, 0.68611, 0.07778, 0, 0.94722],
    89: [0, 0.68611, 0.25555, 0, 0.67458],
    90: [0, 0.68611, 0.06979, 0, 0.77257],
    97: [0, 0.44444, 0, 0, 0.63287],
    98: [0, 0.69444, 0, 0, 0.52083],
    99: [0, 0.44444, 0, 0, 0.51342],
    100: [0, 0.69444, 0, 0, 0.60972],
    101: [0, 0.44444, 0, 0, 0.55361],
    102: [0.19444, 0.69444, 0.11042, 0, 0.56806],
    103: [0.19444, 0.44444, 0.03704, 0, 0.5449],
    104: [0, 0.69444, 0, 0, 0.66759],
    105: [0, 0.69326, 0, 0, 0.4048],
    106: [0.19444, 0.69326, 0.0622, 0, 0.47083],
    107: [0, 0.69444, 0.01852, 0, 0.6037],
    108: [0, 0.69444, 88e-4, 0, 0.34815],
    109: [0, 0.44444, 0, 0, 1.0324],
    110: [0, 0.44444, 0, 0, 0.71296],
    111: [0, 0.44444, 0, 0, 0.58472],
    112: [0.19444, 0.44444, 0, 0, 0.60092],
    113: [0.19444, 0.44444, 0.03704, 0, 0.54213],
    114: [0, 0.44444, 0.03194, 0, 0.5287],
    115: [0, 0.44444, 0, 0, 0.53125],
    116: [0, 0.63492, 0, 0, 0.41528],
    117: [0, 0.44444, 0, 0, 0.68102],
    118: [0, 0.44444, 0.03704, 0, 0.56666],
    119: [0, 0.44444, 0.02778, 0, 0.83148],
    120: [0, 0.44444, 0, 0, 0.65903],
    121: [0.19444, 0.44444, 0.03704, 0, 0.59028],
    122: [0, 0.44444, 0.04213, 0, 0.55509],
    160: [0, 0, 0, 0, 0.25],
    915: [0, 0.68611, 0.15972, 0, 0.65694],
    916: [0, 0.68611, 0, 0, 0.95833],
    920: [0, 0.68611, 0.03194, 0, 0.86722],
    923: [0, 0.68611, 0, 0, 0.80555],
    926: [0, 0.68611, 0.07458, 0, 0.84125],
    928: [0, 0.68611, 0.08229, 0, 0.98229],
    931: [0, 0.68611, 0.05451, 0, 0.88507],
    933: [0, 0.68611, 0.15972, 0, 0.67083],
    934: [0, 0.68611, 0, 0, 0.76666],
    936: [0, 0.68611, 0.11653, 0, 0.71402],
    937: [0, 0.68611, 0.04835, 0, 0.8789],
    945: [0, 0.44444, 0, 0, 0.76064],
    946: [0.19444, 0.69444, 0.03403, 0, 0.65972],
    947: [0.19444, 0.44444, 0.06389, 0, 0.59003],
    948: [0, 0.69444, 0.03819, 0, 0.52222],
    949: [0, 0.44444, 0, 0, 0.52882],
    950: [0.19444, 0.69444, 0.06215, 0, 0.50833],
    951: [0.19444, 0.44444, 0.03704, 0, 0.6],
    952: [0, 0.69444, 0.03194, 0, 0.5618],
    953: [0, 0.44444, 0, 0, 0.41204],
    954: [0, 0.44444, 0, 0, 0.66759],
    955: [0, 0.69444, 0, 0, 0.67083],
    956: [0.19444, 0.44444, 0, 0, 0.70787],
    957: [0, 0.44444, 0.06898, 0, 0.57685],
    958: [0.19444, 0.69444, 0.03021, 0, 0.50833],
    959: [0, 0.44444, 0, 0, 0.58472],
    960: [0, 0.44444, 0.03704, 0, 0.68241],
    961: [0.19444, 0.44444, 0, 0, 0.6118],
    962: [0.09722, 0.44444, 0.07917, 0, 0.42361],
    963: [0, 0.44444, 0.03704, 0, 0.68588],
    964: [0, 0.44444, 0.13472, 0, 0.52083],
    965: [0, 0.44444, 0.03704, 0, 0.63055],
    966: [0.19444, 0.44444, 0, 0, 0.74722],
    967: [0.19444, 0.44444, 0, 0, 0.71805],
    968: [0.19444, 0.69444, 0.03704, 0, 0.75833],
    969: [0, 0.44444, 0.03704, 0, 0.71782],
    977: [0, 0.69444, 0, 0, 0.69155],
    981: [0.19444, 0.69444, 0, 0, 0.7125],
    982: [0, 0.44444, 0.03194, 0, 0.975],
    1009: [0.19444, 0.44444, 0, 0, 0.6118],
    1013: [0, 0.44444, 0, 0, 0.48333],
    57649: [0, 0.44444, 0, 0, 0.39352],
    57911: [0.19444, 0.44444, 0, 0, 0.43889]
  },
  "Math-Italic": {
    32: [0, 0, 0, 0, 0.25],
    48: [0, 0.43056, 0, 0, 0.5],
    49: [0, 0.43056, 0, 0, 0.5],
    50: [0, 0.43056, 0, 0, 0.5],
    51: [0.19444, 0.43056, 0, 0, 0.5],
    52: [0.19444, 0.43056, 0, 0, 0.5],
    53: [0.19444, 0.43056, 0, 0, 0.5],
    54: [0, 0.64444, 0, 0, 0.5],
    55: [0.19444, 0.43056, 0, 0, 0.5],
    56: [0, 0.64444, 0, 0, 0.5],
    57: [0.19444, 0.43056, 0, 0, 0.5],
    65: [0, 0.68333, 0, 0.13889, 0.75],
    66: [0, 0.68333, 0.05017, 0.08334, 0.75851],
    67: [0, 0.68333, 0.07153, 0.08334, 0.71472],
    68: [0, 0.68333, 0.02778, 0.05556, 0.82792],
    69: [0, 0.68333, 0.05764, 0.08334, 0.7382],
    70: [0, 0.68333, 0.13889, 0.08334, 0.64306],
    71: [0, 0.68333, 0, 0.08334, 0.78625],
    72: [0, 0.68333, 0.08125, 0.05556, 0.83125],
    73: [0, 0.68333, 0.07847, 0.11111, 0.43958],
    74: [0, 0.68333, 0.09618, 0.16667, 0.55451],
    75: [0, 0.68333, 0.07153, 0.05556, 0.84931],
    76: [0, 0.68333, 0, 0.02778, 0.68056],
    77: [0, 0.68333, 0.10903, 0.08334, 0.97014],
    78: [0, 0.68333, 0.10903, 0.08334, 0.80347],
    79: [0, 0.68333, 0.02778, 0.08334, 0.76278],
    80: [0, 0.68333, 0.13889, 0.08334, 0.64201],
    81: [0.19444, 0.68333, 0, 0.08334, 0.79056],
    82: [0, 0.68333, 773e-5, 0.08334, 0.75929],
    83: [0, 0.68333, 0.05764, 0.08334, 0.6132],
    84: [0, 0.68333, 0.13889, 0.08334, 0.58438],
    85: [0, 0.68333, 0.10903, 0.02778, 0.68278],
    86: [0, 0.68333, 0.22222, 0, 0.58333],
    87: [0, 0.68333, 0.13889, 0, 0.94445],
    88: [0, 0.68333, 0.07847, 0.08334, 0.82847],
    89: [0, 0.68333, 0.22222, 0, 0.58056],
    90: [0, 0.68333, 0.07153, 0.08334, 0.68264],
    97: [0, 0.43056, 0, 0, 0.52859],
    98: [0, 0.69444, 0, 0, 0.42917],
    99: [0, 0.43056, 0, 0.05556, 0.43276],
    100: [0, 0.69444, 0, 0.16667, 0.52049],
    101: [0, 0.43056, 0, 0.05556, 0.46563],
    102: [0.19444, 0.69444, 0.10764, 0.16667, 0.48959],
    103: [0.19444, 0.43056, 0.03588, 0.02778, 0.47697],
    104: [0, 0.69444, 0, 0, 0.57616],
    105: [0, 0.65952, 0, 0, 0.34451],
    106: [0.19444, 0.65952, 0.05724, 0, 0.41181],
    107: [0, 0.69444, 0.03148, 0, 0.5206],
    108: [0, 0.69444, 0.01968, 0.08334, 0.29838],
    109: [0, 0.43056, 0, 0, 0.87801],
    110: [0, 0.43056, 0, 0, 0.60023],
    111: [0, 0.43056, 0, 0.05556, 0.48472],
    112: [0.19444, 0.43056, 0, 0.08334, 0.50313],
    113: [0.19444, 0.43056, 0.03588, 0.08334, 0.44641],
    114: [0, 0.43056, 0.02778, 0.05556, 0.45116],
    115: [0, 0.43056, 0, 0.05556, 0.46875],
    116: [0, 0.61508, 0, 0.08334, 0.36111],
    117: [0, 0.43056, 0, 0.02778, 0.57246],
    118: [0, 0.43056, 0.03588, 0.02778, 0.48472],
    119: [0, 0.43056, 0.02691, 0.08334, 0.71592],
    120: [0, 0.43056, 0, 0.02778, 0.57153],
    121: [0.19444, 0.43056, 0.03588, 0.05556, 0.49028],
    122: [0, 0.43056, 0.04398, 0.05556, 0.46505],
    160: [0, 0, 0, 0, 0.25],
    915: [0, 0.68333, 0.13889, 0.08334, 0.61528],
    916: [0, 0.68333, 0, 0.16667, 0.83334],
    920: [0, 0.68333, 0.02778, 0.08334, 0.76278],
    923: [0, 0.68333, 0, 0.16667, 0.69445],
    926: [0, 0.68333, 0.07569, 0.08334, 0.74236],
    928: [0, 0.68333, 0.08125, 0.05556, 0.83125],
    931: [0, 0.68333, 0.05764, 0.08334, 0.77986],
    933: [0, 0.68333, 0.13889, 0.05556, 0.58333],
    934: [0, 0.68333, 0, 0.08334, 0.66667],
    936: [0, 0.68333, 0.11, 0.05556, 0.61222],
    937: [0, 0.68333, 0.05017, 0.08334, 0.7724],
    945: [0, 0.43056, 37e-4, 0.02778, 0.6397],
    946: [0.19444, 0.69444, 0.05278, 0.08334, 0.56563],
    947: [0.19444, 0.43056, 0.05556, 0, 0.51773],
    948: [0, 0.69444, 0.03785, 0.05556, 0.44444],
    949: [0, 0.43056, 0, 0.08334, 0.46632],
    950: [0.19444, 0.69444, 0.07378, 0.08334, 0.4375],
    951: [0.19444, 0.43056, 0.03588, 0.05556, 0.49653],
    952: [0, 0.69444, 0.02778, 0.08334, 0.46944],
    953: [0, 0.43056, 0, 0.05556, 0.35394],
    954: [0, 0.43056, 0, 0, 0.57616],
    955: [0, 0.69444, 0, 0, 0.58334],
    956: [0.19444, 0.43056, 0, 0.02778, 0.60255],
    957: [0, 0.43056, 0.06366, 0.02778, 0.49398],
    958: [0.19444, 0.69444, 0.04601, 0.11111, 0.4375],
    959: [0, 0.43056, 0, 0.05556, 0.48472],
    960: [0, 0.43056, 0.03588, 0, 0.57003],
    961: [0.19444, 0.43056, 0, 0.08334, 0.51702],
    962: [0.09722, 0.43056, 0.07986, 0.08334, 0.36285],
    963: [0, 0.43056, 0.03588, 0, 0.57141],
    964: [0, 0.43056, 0.1132, 0.02778, 0.43715],
    965: [0, 0.43056, 0.03588, 0.02778, 0.54028],
    966: [0.19444, 0.43056, 0, 0.08334, 0.65417],
    967: [0.19444, 0.43056, 0, 0.05556, 0.62569],
    968: [0.19444, 0.69444, 0.03588, 0.11111, 0.65139],
    969: [0, 0.43056, 0.03588, 0, 0.62245],
    977: [0, 0.69444, 0, 0.08334, 0.59144],
    981: [0.19444, 0.69444, 0, 0.08334, 0.59583],
    982: [0, 0.43056, 0.02778, 0, 0.82813],
    1009: [0.19444, 0.43056, 0, 0.08334, 0.51702],
    1013: [0, 0.43056, 0, 0.05556, 0.4059],
    57649: [0, 0.43056, 0, 0.02778, 0.32246],
    57911: [0.19444, 0.43056, 0, 0.08334, 0.38403]
  },
  "SansSerif-Bold": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69444, 0, 0, 0.36667],
    34: [0, 0.69444, 0, 0, 0.55834],
    35: [0.19444, 0.69444, 0, 0, 0.91667],
    36: [0.05556, 0.75, 0, 0, 0.55],
    37: [0.05556, 0.75, 0, 0, 1.02912],
    38: [0, 0.69444, 0, 0, 0.83056],
    39: [0, 0.69444, 0, 0, 0.30556],
    40: [0.25, 0.75, 0, 0, 0.42778],
    41: [0.25, 0.75, 0, 0, 0.42778],
    42: [0, 0.75, 0, 0, 0.55],
    43: [0.11667, 0.61667, 0, 0, 0.85556],
    44: [0.10556, 0.13056, 0, 0, 0.30556],
    45: [0, 0.45833, 0, 0, 0.36667],
    46: [0, 0.13056, 0, 0, 0.30556],
    47: [0.25, 0.75, 0, 0, 0.55],
    48: [0, 0.69444, 0, 0, 0.55],
    49: [0, 0.69444, 0, 0, 0.55],
    50: [0, 0.69444, 0, 0, 0.55],
    51: [0, 0.69444, 0, 0, 0.55],
    52: [0, 0.69444, 0, 0, 0.55],
    53: [0, 0.69444, 0, 0, 0.55],
    54: [0, 0.69444, 0, 0, 0.55],
    55: [0, 0.69444, 0, 0, 0.55],
    56: [0, 0.69444, 0, 0, 0.55],
    57: [0, 0.69444, 0, 0, 0.55],
    58: [0, 0.45833, 0, 0, 0.30556],
    59: [0.10556, 0.45833, 0, 0, 0.30556],
    61: [-0.09375, 0.40625, 0, 0, 0.85556],
    63: [0, 0.69444, 0, 0, 0.51945],
    64: [0, 0.69444, 0, 0, 0.73334],
    65: [0, 0.69444, 0, 0, 0.73334],
    66: [0, 0.69444, 0, 0, 0.73334],
    67: [0, 0.69444, 0, 0, 0.70278],
    68: [0, 0.69444, 0, 0, 0.79445],
    69: [0, 0.69444, 0, 0, 0.64167],
    70: [0, 0.69444, 0, 0, 0.61111],
    71: [0, 0.69444, 0, 0, 0.73334],
    72: [0, 0.69444, 0, 0, 0.79445],
    73: [0, 0.69444, 0, 0, 0.33056],
    74: [0, 0.69444, 0, 0, 0.51945],
    75: [0, 0.69444, 0, 0, 0.76389],
    76: [0, 0.69444, 0, 0, 0.58056],
    77: [0, 0.69444, 0, 0, 0.97778],
    78: [0, 0.69444, 0, 0, 0.79445],
    79: [0, 0.69444, 0, 0, 0.79445],
    80: [0, 0.69444, 0, 0, 0.70278],
    81: [0.10556, 0.69444, 0, 0, 0.79445],
    82: [0, 0.69444, 0, 0, 0.70278],
    83: [0, 0.69444, 0, 0, 0.61111],
    84: [0, 0.69444, 0, 0, 0.73334],
    85: [0, 0.69444, 0, 0, 0.76389],
    86: [0, 0.69444, 0.01528, 0, 0.73334],
    87: [0, 0.69444, 0.01528, 0, 1.03889],
    88: [0, 0.69444, 0, 0, 0.73334],
    89: [0, 0.69444, 0.0275, 0, 0.73334],
    90: [0, 0.69444, 0, 0, 0.67223],
    91: [0.25, 0.75, 0, 0, 0.34306],
    93: [0.25, 0.75, 0, 0, 0.34306],
    94: [0, 0.69444, 0, 0, 0.55],
    95: [0.35, 0.10833, 0.03056, 0, 0.55],
    97: [0, 0.45833, 0, 0, 0.525],
    98: [0, 0.69444, 0, 0, 0.56111],
    99: [0, 0.45833, 0, 0, 0.48889],
    100: [0, 0.69444, 0, 0, 0.56111],
    101: [0, 0.45833, 0, 0, 0.51111],
    102: [0, 0.69444, 0.07639, 0, 0.33611],
    103: [0.19444, 0.45833, 0.01528, 0, 0.55],
    104: [0, 0.69444, 0, 0, 0.56111],
    105: [0, 0.69444, 0, 0, 0.25556],
    106: [0.19444, 0.69444, 0, 0, 0.28611],
    107: [0, 0.69444, 0, 0, 0.53056],
    108: [0, 0.69444, 0, 0, 0.25556],
    109: [0, 0.45833, 0, 0, 0.86667],
    110: [0, 0.45833, 0, 0, 0.56111],
    111: [0, 0.45833, 0, 0, 0.55],
    112: [0.19444, 0.45833, 0, 0, 0.56111],
    113: [0.19444, 0.45833, 0, 0, 0.56111],
    114: [0, 0.45833, 0.01528, 0, 0.37222],
    115: [0, 0.45833, 0, 0, 0.42167],
    116: [0, 0.58929, 0, 0, 0.40417],
    117: [0, 0.45833, 0, 0, 0.56111],
    118: [0, 0.45833, 0.01528, 0, 0.5],
    119: [0, 0.45833, 0.01528, 0, 0.74445],
    120: [0, 0.45833, 0, 0, 0.5],
    121: [0.19444, 0.45833, 0.01528, 0, 0.5],
    122: [0, 0.45833, 0, 0, 0.47639],
    126: [0.35, 0.34444, 0, 0, 0.55],
    160: [0, 0, 0, 0, 0.25],
    168: [0, 0.69444, 0, 0, 0.55],
    176: [0, 0.69444, 0, 0, 0.73334],
    180: [0, 0.69444, 0, 0, 0.55],
    184: [0.17014, 0, 0, 0, 0.48889],
    305: [0, 0.45833, 0, 0, 0.25556],
    567: [0.19444, 0.45833, 0, 0, 0.28611],
    710: [0, 0.69444, 0, 0, 0.55],
    711: [0, 0.63542, 0, 0, 0.55],
    713: [0, 0.63778, 0, 0, 0.55],
    728: [0, 0.69444, 0, 0, 0.55],
    729: [0, 0.69444, 0, 0, 0.30556],
    730: [0, 0.69444, 0, 0, 0.73334],
    732: [0, 0.69444, 0, 0, 0.55],
    733: [0, 0.69444, 0, 0, 0.55],
    915: [0, 0.69444, 0, 0, 0.58056],
    916: [0, 0.69444, 0, 0, 0.91667],
    920: [0, 0.69444, 0, 0, 0.85556],
    923: [0, 0.69444, 0, 0, 0.67223],
    926: [0, 0.69444, 0, 0, 0.73334],
    928: [0, 0.69444, 0, 0, 0.79445],
    931: [0, 0.69444, 0, 0, 0.79445],
    933: [0, 0.69444, 0, 0, 0.85556],
    934: [0, 0.69444, 0, 0, 0.79445],
    936: [0, 0.69444, 0, 0, 0.85556],
    937: [0, 0.69444, 0, 0, 0.79445],
    8211: [0, 0.45833, 0.03056, 0, 0.55],
    8212: [0, 0.45833, 0.03056, 0, 1.10001],
    8216: [0, 0.69444, 0, 0, 0.30556],
    8217: [0, 0.69444, 0, 0, 0.30556],
    8220: [0, 0.69444, 0, 0, 0.55834],
    8221: [0, 0.69444, 0, 0, 0.55834]
  },
  "SansSerif-Italic": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69444, 0.05733, 0, 0.31945],
    34: [0, 0.69444, 316e-5, 0, 0.5],
    35: [0.19444, 0.69444, 0.05087, 0, 0.83334],
    36: [0.05556, 0.75, 0.11156, 0, 0.5],
    37: [0.05556, 0.75, 0.03126, 0, 0.83334],
    38: [0, 0.69444, 0.03058, 0, 0.75834],
    39: [0, 0.69444, 0.07816, 0, 0.27778],
    40: [0.25, 0.75, 0.13164, 0, 0.38889],
    41: [0.25, 0.75, 0.02536, 0, 0.38889],
    42: [0, 0.75, 0.11775, 0, 0.5],
    43: [0.08333, 0.58333, 0.02536, 0, 0.77778],
    44: [0.125, 0.08333, 0, 0, 0.27778],
    45: [0, 0.44444, 0.01946, 0, 0.33333],
    46: [0, 0.08333, 0, 0, 0.27778],
    47: [0.25, 0.75, 0.13164, 0, 0.5],
    48: [0, 0.65556, 0.11156, 0, 0.5],
    49: [0, 0.65556, 0.11156, 0, 0.5],
    50: [0, 0.65556, 0.11156, 0, 0.5],
    51: [0, 0.65556, 0.11156, 0, 0.5],
    52: [0, 0.65556, 0.11156, 0, 0.5],
    53: [0, 0.65556, 0.11156, 0, 0.5],
    54: [0, 0.65556, 0.11156, 0, 0.5],
    55: [0, 0.65556, 0.11156, 0, 0.5],
    56: [0, 0.65556, 0.11156, 0, 0.5],
    57: [0, 0.65556, 0.11156, 0, 0.5],
    58: [0, 0.44444, 0.02502, 0, 0.27778],
    59: [0.125, 0.44444, 0.02502, 0, 0.27778],
    61: [-0.13, 0.37, 0.05087, 0, 0.77778],
    63: [0, 0.69444, 0.11809, 0, 0.47222],
    64: [0, 0.69444, 0.07555, 0, 0.66667],
    65: [0, 0.69444, 0, 0, 0.66667],
    66: [0, 0.69444, 0.08293, 0, 0.66667],
    67: [0, 0.69444, 0.11983, 0, 0.63889],
    68: [0, 0.69444, 0.07555, 0, 0.72223],
    69: [0, 0.69444, 0.11983, 0, 0.59722],
    70: [0, 0.69444, 0.13372, 0, 0.56945],
    71: [0, 0.69444, 0.11983, 0, 0.66667],
    72: [0, 0.69444, 0.08094, 0, 0.70834],
    73: [0, 0.69444, 0.13372, 0, 0.27778],
    74: [0, 0.69444, 0.08094, 0, 0.47222],
    75: [0, 0.69444, 0.11983, 0, 0.69445],
    76: [0, 0.69444, 0, 0, 0.54167],
    77: [0, 0.69444, 0.08094, 0, 0.875],
    78: [0, 0.69444, 0.08094, 0, 0.70834],
    79: [0, 0.69444, 0.07555, 0, 0.73611],
    80: [0, 0.69444, 0.08293, 0, 0.63889],
    81: [0.125, 0.69444, 0.07555, 0, 0.73611],
    82: [0, 0.69444, 0.08293, 0, 0.64584],
    83: [0, 0.69444, 0.09205, 0, 0.55556],
    84: [0, 0.69444, 0.13372, 0, 0.68056],
    85: [0, 0.69444, 0.08094, 0, 0.6875],
    86: [0, 0.69444, 0.1615, 0, 0.66667],
    87: [0, 0.69444, 0.1615, 0, 0.94445],
    88: [0, 0.69444, 0.13372, 0, 0.66667],
    89: [0, 0.69444, 0.17261, 0, 0.66667],
    90: [0, 0.69444, 0.11983, 0, 0.61111],
    91: [0.25, 0.75, 0.15942, 0, 0.28889],
    93: [0.25, 0.75, 0.08719, 0, 0.28889],
    94: [0, 0.69444, 0.0799, 0, 0.5],
    95: [0.35, 0.09444, 0.08616, 0, 0.5],
    97: [0, 0.44444, 981e-5, 0, 0.48056],
    98: [0, 0.69444, 0.03057, 0, 0.51667],
    99: [0, 0.44444, 0.08336, 0, 0.44445],
    100: [0, 0.69444, 0.09483, 0, 0.51667],
    101: [0, 0.44444, 0.06778, 0, 0.44445],
    102: [0, 0.69444, 0.21705, 0, 0.30556],
    103: [0.19444, 0.44444, 0.10836, 0, 0.5],
    104: [0, 0.69444, 0.01778, 0, 0.51667],
    105: [0, 0.67937, 0.09718, 0, 0.23889],
    106: [0.19444, 0.67937, 0.09162, 0, 0.26667],
    107: [0, 0.69444, 0.08336, 0, 0.48889],
    108: [0, 0.69444, 0.09483, 0, 0.23889],
    109: [0, 0.44444, 0.01778, 0, 0.79445],
    110: [0, 0.44444, 0.01778, 0, 0.51667],
    111: [0, 0.44444, 0.06613, 0, 0.5],
    112: [0.19444, 0.44444, 0.0389, 0, 0.51667],
    113: [0.19444, 0.44444, 0.04169, 0, 0.51667],
    114: [0, 0.44444, 0.10836, 0, 0.34167],
    115: [0, 0.44444, 0.0778, 0, 0.38333],
    116: [0, 0.57143, 0.07225, 0, 0.36111],
    117: [0, 0.44444, 0.04169, 0, 0.51667],
    118: [0, 0.44444, 0.10836, 0, 0.46111],
    119: [0, 0.44444, 0.10836, 0, 0.68334],
    120: [0, 0.44444, 0.09169, 0, 0.46111],
    121: [0.19444, 0.44444, 0.10836, 0, 0.46111],
    122: [0, 0.44444, 0.08752, 0, 0.43472],
    126: [0.35, 0.32659, 0.08826, 0, 0.5],
    160: [0, 0, 0, 0, 0.25],
    168: [0, 0.67937, 0.06385, 0, 0.5],
    176: [0, 0.69444, 0, 0, 0.73752],
    184: [0.17014, 0, 0, 0, 0.44445],
    305: [0, 0.44444, 0.04169, 0, 0.23889],
    567: [0.19444, 0.44444, 0.04169, 0, 0.26667],
    710: [0, 0.69444, 0.0799, 0, 0.5],
    711: [0, 0.63194, 0.08432, 0, 0.5],
    713: [0, 0.60889, 0.08776, 0, 0.5],
    714: [0, 0.69444, 0.09205, 0, 0.5],
    715: [0, 0.69444, 0, 0, 0.5],
    728: [0, 0.69444, 0.09483, 0, 0.5],
    729: [0, 0.67937, 0.07774, 0, 0.27778],
    730: [0, 0.69444, 0, 0, 0.73752],
    732: [0, 0.67659, 0.08826, 0, 0.5],
    733: [0, 0.69444, 0.09205, 0, 0.5],
    915: [0, 0.69444, 0.13372, 0, 0.54167],
    916: [0, 0.69444, 0, 0, 0.83334],
    920: [0, 0.69444, 0.07555, 0, 0.77778],
    923: [0, 0.69444, 0, 0, 0.61111],
    926: [0, 0.69444, 0.12816, 0, 0.66667],
    928: [0, 0.69444, 0.08094, 0, 0.70834],
    931: [0, 0.69444, 0.11983, 0, 0.72222],
    933: [0, 0.69444, 0.09031, 0, 0.77778],
    934: [0, 0.69444, 0.04603, 0, 0.72222],
    936: [0, 0.69444, 0.09031, 0, 0.77778],
    937: [0, 0.69444, 0.08293, 0, 0.72222],
    8211: [0, 0.44444, 0.08616, 0, 0.5],
    8212: [0, 0.44444, 0.08616, 0, 1],
    8216: [0, 0.69444, 0.07816, 0, 0.27778],
    8217: [0, 0.69444, 0.07816, 0, 0.27778],
    8220: [0, 0.69444, 0.14205, 0, 0.5],
    8221: [0, 0.69444, 316e-5, 0, 0.5]
  },
  "SansSerif-Regular": {
    32: [0, 0, 0, 0, 0.25],
    33: [0, 0.69444, 0, 0, 0.31945],
    34: [0, 0.69444, 0, 0, 0.5],
    35: [0.19444, 0.69444, 0, 0, 0.83334],
    36: [0.05556, 0.75, 0, 0, 0.5],
    37: [0.05556, 0.75, 0, 0, 0.83334],
    38: [0, 0.69444, 0, 0, 0.75834],
    39: [0, 0.69444, 0, 0, 0.27778],
    40: [0.25, 0.75, 0, 0, 0.38889],
    41: [0.25, 0.75, 0, 0, 0.38889],
    42: [0, 0.75, 0, 0, 0.5],
    43: [0.08333, 0.58333, 0, 0, 0.77778],
    44: [0.125, 0.08333, 0, 0, 0.27778],
    45: [0, 0.44444, 0, 0, 0.33333],
    46: [0, 0.08333, 0, 0, 0.27778],
    47: [0.25, 0.75, 0, 0, 0.5],
    48: [0, 0.65556, 0, 0, 0.5],
    49: [0, 0.65556, 0, 0, 0.5],
    50: [0, 0.65556, 0, 0, 0.5],
    51: [0, 0.65556, 0, 0, 0.5],
    52: [0, 0.65556, 0, 0, 0.5],
    53: [0, 0.65556, 0, 0, 0.5],
    54: [0, 0.65556, 0, 0, 0.5],
    55: [0, 0.65556, 0, 0, 0.5],
    56: [0, 0.65556, 0, 0, 0.5],
    57: [0, 0.65556, 0, 0, 0.5],
    58: [0, 0.44444, 0, 0, 0.27778],
    59: [0.125, 0.44444, 0, 0, 0.27778],
    61: [-0.13, 0.37, 0, 0, 0.77778],
    63: [0, 0.69444, 0, 0, 0.47222],
    64: [0, 0.69444, 0, 0, 0.66667],
    65: [0, 0.69444, 0, 0, 0.66667],
    66: [0, 0.69444, 0, 0, 0.66667],
    67: [0, 0.69444, 0, 0, 0.63889],
    68: [0, 0.69444, 0, 0, 0.72223],
    69: [0, 0.69444, 0, 0, 0.59722],
    70: [0, 0.69444, 0, 0, 0.56945],
    71: [0, 0.69444, 0, 0, 0.66667],
    72: [0, 0.69444, 0, 0, 0.70834],
    73: [0, 0.69444, 0, 0, 0.27778],
    74: [0, 0.69444, 0, 0, 0.47222],
    75: [0, 0.69444, 0, 0, 0.69445],
    76: [0, 0.69444, 0, 0, 0.54167],
    77: [0, 0.69444, 0, 0, 0.875],
    78: [0, 0.69444, 0, 0, 0.70834],
    79: [0, 0.69444, 0, 0, 0.73611],
    80: [0, 0.69444, 0, 0, 0.63889],
    81: [0.125, 0.69444, 0, 0, 0.73611],
    82: [0, 0.69444, 0, 0, 0.64584],
    83: [0, 0.69444, 0, 0, 0.55556],
    84: [0, 0.69444, 0, 0, 0.68056],
    85: [0, 0.69444, 0, 0, 0.6875],
    86: [0, 0.69444, 0.01389, 0, 0.66667],
    87: [0, 0.69444, 0.01389, 0, 0.94445],
    88: [0, 0.69444, 0, 0, 0.66667],
    89: [0, 0.69444, 0.025, 0, 0.66667],
    90: [0, 0.69444, 0, 0, 0.61111],
    91: [0.25, 0.75, 0, 0, 0.28889],
    93: [0.25, 0.75, 0, 0, 0.28889],
    94: [0, 0.69444, 0, 0, 0.5],
    95: [0.35, 0.09444, 0.02778, 0, 0.5],
    97: [0, 0.44444, 0, 0, 0.48056],
    98: [0, 0.69444, 0, 0, 0.51667],
    99: [0, 0.44444, 0, 0, 0.44445],
    100: [0, 0.69444, 0, 0, 0.51667],
    101: [0, 0.44444, 0, 0, 0.44445],
    102: [0, 0.69444, 0.06944, 0, 0.30556],
    103: [0.19444, 0.44444, 0.01389, 0, 0.5],
    104: [0, 0.69444, 0, 0, 0.51667],
    105: [0, 0.67937, 0, 0, 0.23889],
    106: [0.19444, 0.67937, 0, 0, 0.26667],
    107: [0, 0.69444, 0, 0, 0.48889],
    108: [0, 0.69444, 0, 0, 0.23889],
    109: [0, 0.44444, 0, 0, 0.79445],
    110: [0, 0.44444, 0, 0, 0.51667],
    111: [0, 0.44444, 0, 0, 0.5],
    112: [0.19444, 0.44444, 0, 0, 0.51667],
    113: [0.19444, 0.44444, 0, 0, 0.51667],
    114: [0, 0.44444, 0.01389, 0, 0.34167],
    115: [0, 0.44444, 0, 0, 0.38333],
    116: [0, 0.57143, 0, 0, 0.36111],
    117: [0, 0.44444, 0, 0, 0.51667],
    118: [0, 0.44444, 0.01389, 0, 0.46111],
    119: [0, 0.44444, 0.01389, 0, 0.68334],
    120: [0, 0.44444, 0, 0, 0.46111],
    121: [0.19444, 0.44444, 0.01389, 0, 0.46111],
    122: [0, 0.44444, 0, 0, 0.43472],
    126: [0.35, 0.32659, 0, 0, 0.5],
    160: [0, 0, 0, 0, 0.25],
    168: [0, 0.67937, 0, 0, 0.5],
    176: [0, 0.69444, 0, 0, 0.66667],
    184: [0.17014, 0, 0, 0, 0.44445],
    305: [0, 0.44444, 0, 0, 0.23889],
    567: [0.19444, 0.44444, 0, 0, 0.26667],
    710: [0, 0.69444, 0, 0, 0.5],
    711: [0, 0.63194, 0, 0, 0.5],
    713: [0, 0.60889, 0, 0, 0.5],
    714: [0, 0.69444, 0, 0, 0.5],
    715: [0, 0.69444, 0, 0, 0.5],
    728: [0, 0.69444, 0, 0, 0.5],
    729: [0, 0.67937, 0, 0, 0.27778],
    730: [0, 0.69444, 0, 0, 0.66667],
    732: [0, 0.67659, 0, 0, 0.5],
    733: [0, 0.69444, 0, 0, 0.5],
    915: [0, 0.69444, 0, 0, 0.54167],
    916: [0, 0.69444, 0, 0, 0.83334],
    920: [0, 0.69444, 0, 0, 0.77778],
    923: [0, 0.69444, 0, 0, 0.61111],
    926: [0, 0.69444, 0, 0, 0.66667],
    928: [0, 0.69444, 0, 0, 0.70834],
    931: [0, 0.69444, 0, 0, 0.72222],
    933: [0, 0.69444, 0, 0, 0.77778],
    934: [0, 0.69444, 0, 0, 0.72222],
    936: [0, 0.69444, 0, 0, 0.77778],
    937: [0, 0.69444, 0, 0, 0.72222],
    8211: [0, 0.44444, 0.02778, 0, 0.5],
    8212: [0, 0.44444, 0.02778, 0, 1],
    8216: [0, 0.69444, 0, 0, 0.27778],
    8217: [0, 0.69444, 0, 0, 0.27778],
    8220: [0, 0.69444, 0, 0, 0.5],
    8221: [0, 0.69444, 0, 0, 0.5]
  },
  "Script-Regular": {
    32: [0, 0, 0, 0, 0.25],
    65: [0, 0.7, 0.22925, 0, 0.80253],
    66: [0, 0.7, 0.04087, 0, 0.90757],
    67: [0, 0.7, 0.1689, 0, 0.66619],
    68: [0, 0.7, 0.09371, 0, 0.77443],
    69: [0, 0.7, 0.18583, 0, 0.56162],
    70: [0, 0.7, 0.13634, 0, 0.89544],
    71: [0, 0.7, 0.17322, 0, 0.60961],
    72: [0, 0.7, 0.29694, 0, 0.96919],
    73: [0, 0.7, 0.19189, 0, 0.80907],
    74: [0.27778, 0.7, 0.19189, 0, 1.05159],
    75: [0, 0.7, 0.31259, 0, 0.91364],
    76: [0, 0.7, 0.19189, 0, 0.87373],
    77: [0, 0.7, 0.15981, 0, 1.08031],
    78: [0, 0.7, 0.3525, 0, 0.9015],
    79: [0, 0.7, 0.08078, 0, 0.73787],
    80: [0, 0.7, 0.08078, 0, 1.01262],
    81: [0, 0.7, 0.03305, 0, 0.88282],
    82: [0, 0.7, 0.06259, 0, 0.85],
    83: [0, 0.7, 0.19189, 0, 0.86767],
    84: [0, 0.7, 0.29087, 0, 0.74697],
    85: [0, 0.7, 0.25815, 0, 0.79996],
    86: [0, 0.7, 0.27523, 0, 0.62204],
    87: [0, 0.7, 0.27523, 0, 0.80532],
    88: [0, 0.7, 0.26006, 0, 0.94445],
    89: [0, 0.7, 0.2939, 0, 0.70961],
    90: [0, 0.7, 0.24037, 0, 0.8212],
    160: [0, 0, 0, 0, 0.25]
  },
  "Size1-Regular": {
    32: [0, 0, 0, 0, 0.25],
    40: [0.35001, 0.85, 0, 0, 0.45834],
    41: [0.35001, 0.85, 0, 0, 0.45834],
    47: [0.35001, 0.85, 0, 0, 0.57778],
    91: [0.35001, 0.85, 0, 0, 0.41667],
    92: [0.35001, 0.85, 0, 0, 0.57778],
    93: [0.35001, 0.85, 0, 0, 0.41667],
    123: [0.35001, 0.85, 0, 0, 0.58334],
    125: [0.35001, 0.85, 0, 0, 0.58334],
    160: [0, 0, 0, 0, 0.25],
    710: [0, 0.72222, 0, 0, 0.55556],
    732: [0, 0.72222, 0, 0, 0.55556],
    770: [0, 0.72222, 0, 0, 0.55556],
    771: [0, 0.72222, 0, 0, 0.55556],
    8214: [-99e-5, 0.601, 0, 0, 0.77778],
    8593: [1e-5, 0.6, 0, 0, 0.66667],
    8595: [1e-5, 0.6, 0, 0, 0.66667],
    8657: [1e-5, 0.6, 0, 0, 0.77778],
    8659: [1e-5, 0.6, 0, 0, 0.77778],
    8719: [0.25001, 0.75, 0, 0, 0.94445],
    8720: [0.25001, 0.75, 0, 0, 0.94445],
    8721: [0.25001, 0.75, 0, 0, 1.05556],
    8730: [0.35001, 0.85, 0, 0, 1],
    8739: [-599e-5, 0.606, 0, 0, 0.33333],
    8741: [-599e-5, 0.606, 0, 0, 0.55556],
    8747: [0.30612, 0.805, 0.19445, 0, 0.47222],
    8748: [0.306, 0.805, 0.19445, 0, 0.47222],
    8749: [0.306, 0.805, 0.19445, 0, 0.47222],
    8750: [0.30612, 0.805, 0.19445, 0, 0.47222],
    8896: [0.25001, 0.75, 0, 0, 0.83334],
    8897: [0.25001, 0.75, 0, 0, 0.83334],
    8898: [0.25001, 0.75, 0, 0, 0.83334],
    8899: [0.25001, 0.75, 0, 0, 0.83334],
    8968: [0.35001, 0.85, 0, 0, 0.47222],
    8969: [0.35001, 0.85, 0, 0, 0.47222],
    8970: [0.35001, 0.85, 0, 0, 0.47222],
    8971: [0.35001, 0.85, 0, 0, 0.47222],
    9168: [-99e-5, 0.601, 0, 0, 0.66667],
    10216: [0.35001, 0.85, 0, 0, 0.47222],
    10217: [0.35001, 0.85, 0, 0, 0.47222],
    10752: [0.25001, 0.75, 0, 0, 1.11111],
    10753: [0.25001, 0.75, 0, 0, 1.11111],
    10754: [0.25001, 0.75, 0, 0, 1.11111],
    10756: [0.25001, 0.75, 0, 0, 0.83334],
    10758: [0.25001, 0.75, 0, 0, 0.83334]
  },
  "Size2-Regular": {
    32: [0, 0, 0, 0, 0.25],
    40: [0.65002, 1.15, 0, 0, 0.59722],
    41: [0.65002, 1.15, 0, 0, 0.59722],
    47: [0.65002, 1.15, 0, 0, 0.81111],
    91: [0.65002, 1.15, 0, 0, 0.47222],
    92: [0.65002, 1.15, 0, 0, 0.81111],
    93: [0.65002, 1.15, 0, 0, 0.47222],
    123: [0.65002, 1.15, 0, 0, 0.66667],
    125: [0.65002, 1.15, 0, 0, 0.66667],
    160: [0, 0, 0, 0, 0.25],
    710: [0, 0.75, 0, 0, 1],
    732: [0, 0.75, 0, 0, 1],
    770: [0, 0.75, 0, 0, 1],
    771: [0, 0.75, 0, 0, 1],
    8719: [0.55001, 1.05, 0, 0, 1.27778],
    8720: [0.55001, 1.05, 0, 0, 1.27778],
    8721: [0.55001, 1.05, 0, 0, 1.44445],
    8730: [0.65002, 1.15, 0, 0, 1],
    8747: [0.86225, 1.36, 0.44445, 0, 0.55556],
    8748: [0.862, 1.36, 0.44445, 0, 0.55556],
    8749: [0.862, 1.36, 0.44445, 0, 0.55556],
    8750: [0.86225, 1.36, 0.44445, 0, 0.55556],
    8896: [0.55001, 1.05, 0, 0, 1.11111],
    8897: [0.55001, 1.05, 0, 0, 1.11111],
    8898: [0.55001, 1.05, 0, 0, 1.11111],
    8899: [0.55001, 1.05, 0, 0, 1.11111],
    8968: [0.65002, 1.15, 0, 0, 0.52778],
    8969: [0.65002, 1.15, 0, 0, 0.52778],
    8970: [0.65002, 1.15, 0, 0, 0.52778],
    8971: [0.65002, 1.15, 0, 0, 0.52778],
    10216: [0.65002, 1.15, 0, 0, 0.61111],
    10217: [0.65002, 1.15, 0, 0, 0.61111],
    10752: [0.55001, 1.05, 0, 0, 1.51112],
    10753: [0.55001, 1.05, 0, 0, 1.51112],
    10754: [0.55001, 1.05, 0, 0, 1.51112],
    10756: [0.55001, 1.05, 0, 0, 1.11111],
    10758: [0.55001, 1.05, 0, 0, 1.11111]
  },
  "Size3-Regular": {
    32: [0, 0, 0, 0, 0.25],
    40: [0.95003, 1.45, 0, 0, 0.73611],
    41: [0.95003, 1.45, 0, 0, 0.73611],
    47: [0.95003, 1.45, 0, 0, 1.04445],
    91: [0.95003, 1.45, 0, 0, 0.52778],
    92: [0.95003, 1.45, 0, 0, 1.04445],
    93: [0.95003, 1.45, 0, 0, 0.52778],
    123: [0.95003, 1.45, 0, 0, 0.75],
    125: [0.95003, 1.45, 0, 0, 0.75],
    160: [0, 0, 0, 0, 0.25],
    710: [0, 0.75, 0, 0, 1.44445],
    732: [0, 0.75, 0, 0, 1.44445],
    770: [0, 0.75, 0, 0, 1.44445],
    771: [0, 0.75, 0, 0, 1.44445],
    8730: [0.95003, 1.45, 0, 0, 1],
    8968: [0.95003, 1.45, 0, 0, 0.58334],
    8969: [0.95003, 1.45, 0, 0, 0.58334],
    8970: [0.95003, 1.45, 0, 0, 0.58334],
    8971: [0.95003, 1.45, 0, 0, 0.58334],
    10216: [0.95003, 1.45, 0, 0, 0.75],
    10217: [0.95003, 1.45, 0, 0, 0.75]
  },
  "Size4-Regular": {
    32: [0, 0, 0, 0, 0.25],
    40: [1.25003, 1.75, 0, 0, 0.79167],
    41: [1.25003, 1.75, 0, 0, 0.79167],
    47: [1.25003, 1.75, 0, 0, 1.27778],
    91: [1.25003, 1.75, 0, 0, 0.58334],
    92: [1.25003, 1.75, 0, 0, 1.27778],
    93: [1.25003, 1.75, 0, 0, 0.58334],
    123: [1.25003, 1.75, 0, 0, 0.80556],
    125: [1.25003, 1.75, 0, 0, 0.80556],
    160: [0, 0, 0, 0, 0.25],
    710: [0, 0.825, 0, 0, 1.8889],
    732: [0, 0.825, 0, 0, 1.8889],
    770: [0, 0.825, 0, 0, 1.8889],
    771: [0, 0.825, 0, 0, 1.8889],
    8730: [1.25003, 1.75, 0, 0, 1],
    8968: [1.25003, 1.75, 0, 0, 0.63889],
    8969: [1.25003, 1.75, 0, 0, 0.63889],
    8970: [1.25003, 1.75, 0, 0, 0.63889],
    8971: [1.25003, 1.75, 0, 0, 0.63889],
    9115: [0.64502, 1.155, 0, 0, 0.875],
    9116: [1e-5, 0.6, 0, 0, 0.875],
    9117: [0.64502, 1.155, 0, 0, 0.875],
    9118: [0.64502, 1.155, 0, 0, 0.875],
    9119: [1e-5, 0.6, 0, 0, 0.875],
    9120: [0.64502, 1.155, 0, 0, 0.875],
    9121: [0.64502, 1.155, 0, 0, 0.66667],
    9122: [-99e-5, 0.601, 0, 0, 0.66667],
    9123: [0.64502, 1.155, 0, 0, 0.66667],
    9124: [0.64502, 1.155, 0, 0, 0.66667],
    9125: [-99e-5, 0.601, 0, 0, 0.66667],
    9126: [0.64502, 1.155, 0, 0, 0.66667],
    9127: [1e-5, 0.9, 0, 0, 0.88889],
    9128: [0.65002, 1.15, 0, 0, 0.88889],
    9129: [0.90001, 0, 0, 0, 0.88889],
    9130: [0, 0.3, 0, 0, 0.88889],
    9131: [1e-5, 0.9, 0, 0, 0.88889],
    9132: [0.65002, 1.15, 0, 0, 0.88889],
    9133: [0.90001, 0, 0, 0, 0.88889],
    9143: [0.88502, 0.915, 0, 0, 1.05556],
    10216: [1.25003, 1.75, 0, 0, 0.80556],
    10217: [1.25003, 1.75, 0, 0, 0.80556],
    57344: [-499e-5, 0.605, 0, 0, 1.05556],
    57345: [-499e-5, 0.605, 0, 0, 1.05556],
    57680: [0, 0.12, 0, 0, 0.45],
    57681: [0, 0.12, 0, 0, 0.45],
    57682: [0, 0.12, 0, 0, 0.45],
    57683: [0, 0.12, 0, 0, 0.45]
  },
  "Typewriter-Regular": {
    32: [0, 0, 0, 0, 0.525],
    33: [0, 0.61111, 0, 0, 0.525],
    34: [0, 0.61111, 0, 0, 0.525],
    35: [0, 0.61111, 0, 0, 0.525],
    36: [0.08333, 0.69444, 0, 0, 0.525],
    37: [0.08333, 0.69444, 0, 0, 0.525],
    38: [0, 0.61111, 0, 0, 0.525],
    39: [0, 0.61111, 0, 0, 0.525],
    40: [0.08333, 0.69444, 0, 0, 0.525],
    41: [0.08333, 0.69444, 0, 0, 0.525],
    42: [0, 0.52083, 0, 0, 0.525],
    43: [-0.08056, 0.53055, 0, 0, 0.525],
    44: [0.13889, 0.125, 0, 0, 0.525],
    45: [-0.08056, 0.53055, 0, 0, 0.525],
    46: [0, 0.125, 0, 0, 0.525],
    47: [0.08333, 0.69444, 0, 0, 0.525],
    48: [0, 0.61111, 0, 0, 0.525],
    49: [0, 0.61111, 0, 0, 0.525],
    50: [0, 0.61111, 0, 0, 0.525],
    51: [0, 0.61111, 0, 0, 0.525],
    52: [0, 0.61111, 0, 0, 0.525],
    53: [0, 0.61111, 0, 0, 0.525],
    54: [0, 0.61111, 0, 0, 0.525],
    55: [0, 0.61111, 0, 0, 0.525],
    56: [0, 0.61111, 0, 0, 0.525],
    57: [0, 0.61111, 0, 0, 0.525],
    58: [0, 0.43056, 0, 0, 0.525],
    59: [0.13889, 0.43056, 0, 0, 0.525],
    60: [-0.05556, 0.55556, 0, 0, 0.525],
    61: [-0.19549, 0.41562, 0, 0, 0.525],
    62: [-0.05556, 0.55556, 0, 0, 0.525],
    63: [0, 0.61111, 0, 0, 0.525],
    64: [0, 0.61111, 0, 0, 0.525],
    65: [0, 0.61111, 0, 0, 0.525],
    66: [0, 0.61111, 0, 0, 0.525],
    67: [0, 0.61111, 0, 0, 0.525],
    68: [0, 0.61111, 0, 0, 0.525],
    69: [0, 0.61111, 0, 0, 0.525],
    70: [0, 0.61111, 0, 0, 0.525],
    71: [0, 0.61111, 0, 0, 0.525],
    72: [0, 0.61111, 0, 0, 0.525],
    73: [0, 0.61111, 0, 0, 0.525],
    74: [0, 0.61111, 0, 0, 0.525],
    75: [0, 0.61111, 0, 0, 0.525],
    76: [0, 0.61111, 0, 0, 0.525],
    77: [0, 0.61111, 0, 0, 0.525],
    78: [0, 0.61111, 0, 0, 0.525],
    79: [0, 0.61111, 0, 0, 0.525],
    80: [0, 0.61111, 0, 0, 0.525],
    81: [0.13889, 0.61111, 0, 0, 0.525],
    82: [0, 0.61111, 0, 0, 0.525],
    83: [0, 0.61111, 0, 0, 0.525],
    84: [0, 0.61111, 0, 0, 0.525],
    85: [0, 0.61111, 0, 0, 0.525],
    86: [0, 0.61111, 0, 0, 0.525],
    87: [0, 0.61111, 0, 0, 0.525],
    88: [0, 0.61111, 0, 0, 0.525],
    89: [0, 0.61111, 0, 0, 0.525],
    90: [0, 0.61111, 0, 0, 0.525],
    91: [0.08333, 0.69444, 0, 0, 0.525],
    92: [0.08333, 0.69444, 0, 0, 0.525],
    93: [0.08333, 0.69444, 0, 0, 0.525],
    94: [0, 0.61111, 0, 0, 0.525],
    95: [0.09514, 0, 0, 0, 0.525],
    96: [0, 0.61111, 0, 0, 0.525],
    97: [0, 0.43056, 0, 0, 0.525],
    98: [0, 0.61111, 0, 0, 0.525],
    99: [0, 0.43056, 0, 0, 0.525],
    100: [0, 0.61111, 0, 0, 0.525],
    101: [0, 0.43056, 0, 0, 0.525],
    102: [0, 0.61111, 0, 0, 0.525],
    103: [0.22222, 0.43056, 0, 0, 0.525],
    104: [0, 0.61111, 0, 0, 0.525],
    105: [0, 0.61111, 0, 0, 0.525],
    106: [0.22222, 0.61111, 0, 0, 0.525],
    107: [0, 0.61111, 0, 0, 0.525],
    108: [0, 0.61111, 0, 0, 0.525],
    109: [0, 0.43056, 0, 0, 0.525],
    110: [0, 0.43056, 0, 0, 0.525],
    111: [0, 0.43056, 0, 0, 0.525],
    112: [0.22222, 0.43056, 0, 0, 0.525],
    113: [0.22222, 0.43056, 0, 0, 0.525],
    114: [0, 0.43056, 0, 0, 0.525],
    115: [0, 0.43056, 0, 0, 0.525],
    116: [0, 0.55358, 0, 0, 0.525],
    117: [0, 0.43056, 0, 0, 0.525],
    118: [0, 0.43056, 0, 0, 0.525],
    119: [0, 0.43056, 0, 0, 0.525],
    120: [0, 0.43056, 0, 0, 0.525],
    121: [0.22222, 0.43056, 0, 0, 0.525],
    122: [0, 0.43056, 0, 0, 0.525],
    123: [0.08333, 0.69444, 0, 0, 0.525],
    124: [0.08333, 0.69444, 0, 0, 0.525],
    125: [0.08333, 0.69444, 0, 0, 0.525],
    126: [0, 0.61111, 0, 0, 0.525],
    127: [0, 0.61111, 0, 0, 0.525],
    160: [0, 0, 0, 0, 0.525],
    176: [0, 0.61111, 0, 0, 0.525],
    184: [0.19445, 0, 0, 0, 0.525],
    305: [0, 0.43056, 0, 0, 0.525],
    567: [0.22222, 0.43056, 0, 0, 0.525],
    711: [0, 0.56597, 0, 0, 0.525],
    713: [0, 0.56555, 0, 0, 0.525],
    714: [0, 0.61111, 0, 0, 0.525],
    715: [0, 0.61111, 0, 0, 0.525],
    728: [0, 0.61111, 0, 0, 0.525],
    730: [0, 0.61111, 0, 0, 0.525],
    770: [0, 0.61111, 0, 0, 0.525],
    771: [0, 0.61111, 0, 0, 0.525],
    776: [0, 0.61111, 0, 0, 0.525],
    915: [0, 0.61111, 0, 0, 0.525],
    916: [0, 0.61111, 0, 0, 0.525],
    920: [0, 0.61111, 0, 0, 0.525],
    923: [0, 0.61111, 0, 0, 0.525],
    926: [0, 0.61111, 0, 0, 0.525],
    928: [0, 0.61111, 0, 0, 0.525],
    931: [0, 0.61111, 0, 0, 0.525],
    933: [0, 0.61111, 0, 0, 0.525],
    934: [0, 0.61111, 0, 0, 0.525],
    936: [0, 0.61111, 0, 0, 0.525],
    937: [0, 0.61111, 0, 0, 0.525],
    8216: [0, 0.61111, 0, 0, 0.525],
    8217: [0, 0.61111, 0, 0, 0.525],
    8242: [0, 0.61111, 0, 0, 0.525],
    9251: [0.11111, 0.21944, 0, 0, 0.525]
  }
}, Ce = {
  slant: [0.25, 0.25, 0.25],
  // sigma1
  space: [0, 0, 0],
  // sigma2
  stretch: [0, 0, 0],
  // sigma3
  shrink: [0, 0, 0],
  // sigma4
  xHeight: [0.431, 0.431, 0.431],
  // sigma5
  quad: [1, 1.171, 1.472],
  // sigma6
  extraSpace: [0, 0, 0],
  // sigma7
  num1: [0.677, 0.732, 0.925],
  // sigma8
  num2: [0.394, 0.384, 0.387],
  // sigma9
  num3: [0.444, 0.471, 0.504],
  // sigma10
  denom1: [0.686, 0.752, 1.025],
  // sigma11
  denom2: [0.345, 0.344, 0.532],
  // sigma12
  sup1: [0.413, 0.503, 0.504],
  // sigma13
  sup2: [0.363, 0.431, 0.404],
  // sigma14
  sup3: [0.289, 0.286, 0.294],
  // sigma15
  sub1: [0.15, 0.143, 0.2],
  // sigma16
  sub2: [0.247, 0.286, 0.4],
  // sigma17
  supDrop: [0.386, 0.353, 0.494],
  // sigma18
  subDrop: [0.05, 0.071, 0.1],
  // sigma19
  delim1: [2.39, 1.7, 1.98],
  // sigma20
  delim2: [1.01, 1.157, 1.42],
  // sigma21
  axisHeight: [0.25, 0.25, 0.25],
  // sigma22
  // These font metrics are extracted from TeX by using tftopl on cmex10.tfm;
  // they correspond to the font parameters of the extension fonts (family 3).
  // See the TeXbook, page 441. In AMSTeX, the extension fonts scale; to
  // match cmex7, we'd use cmex7.tfm values for script and scriptscript
  // values.
  defaultRuleThickness: [0.04, 0.049, 0.049],
  // xi8; cmex7: 0.049
  bigOpSpacing1: [0.111, 0.111, 0.111],
  // xi9
  bigOpSpacing2: [0.166, 0.166, 0.166],
  // xi10
  bigOpSpacing3: [0.2, 0.2, 0.2],
  // xi11
  bigOpSpacing4: [0.6, 0.611, 0.611],
  // xi12; cmex7: 0.611
  bigOpSpacing5: [0.1, 0.143, 0.143],
  // xi13; cmex7: 0.143
  // The \sqrt rule width is taken from the height of the surd character.
  // Since we use the same font at all sizes, this thickness doesn't scale.
  sqrtRuleThickness: [0.04, 0.04, 0.04],
  // This value determines how large a pt is, for metrics which are defined
  // in terms of pts.
  // This value is also used in katex.scss; if you change it make sure the
  // values match.
  ptPerEm: [10, 10, 10],
  // The space between adjacent `|` columns in an array definition. From
  // `\showthe\doublerulesep` in LaTeX. Equals 2.0 / ptPerEm.
  doubleRuleSep: [0.2, 0.2, 0.2],
  // The width of separator lines in {array} environments. From
  // `\showthe\arrayrulewidth` in LaTeX. Equals 0.4 / ptPerEm.
  arrayRuleWidth: [0.04, 0.04, 0.04],
  // Two values from LaTeX source2e:
  fboxsep: [0.3, 0.3, 0.3],
  //        3 pt / ptPerEm
  fboxrule: [0.04, 0.04, 0.04]
  // 0.4 pt / ptPerEm
}, pr = {
  // Latin-1
  Å: "A",
  Ð: "D",
  Þ: "o",
  å: "a",
  ð: "d",
  þ: "o",
  // Cyrillic
  А: "A",
  Б: "B",
  В: "B",
  Г: "F",
  Д: "A",
  Е: "E",
  Ж: "K",
  З: "3",
  И: "N",
  Й: "N",
  К: "K",
  Л: "N",
  М: "M",
  Н: "H",
  О: "O",
  П: "N",
  Р: "P",
  С: "C",
  Т: "T",
  У: "y",
  Ф: "O",
  Х: "X",
  Ц: "U",
  Ч: "h",
  Ш: "W",
  Щ: "W",
  Ъ: "B",
  Ы: "X",
  Ь: "B",
  Э: "3",
  Ю: "X",
  Я: "R",
  а: "a",
  б: "b",
  в: "a",
  г: "r",
  д: "y",
  е: "e",
  ж: "m",
  з: "e",
  и: "n",
  й: "n",
  к: "n",
  л: "n",
  м: "m",
  н: "n",
  о: "o",
  п: "n",
  р: "p",
  с: "c",
  т: "o",
  у: "y",
  ф: "b",
  х: "x",
  ц: "n",
  ч: "n",
  ш: "w",
  щ: "w",
  ъ: "a",
  ы: "m",
  ь: "a",
  э: "e",
  ю: "m",
  я: "r"
};
function oa(r, e) {
  D0[r] = e;
}
function Yt(r, e, t) {
  if (!D0[e])
    throw new Error("Font metrics not found for font: " + e + ".");
  var a = r.charCodeAt(0), i = D0[e][a];
  if (!i && r[0] in pr && (a = pr[r[0]].charCodeAt(0), i = D0[e][a]), !i && t === "text" && aa(a) && (i = D0[e][77]), i)
    return {
      depth: i[0],
      height: i[1],
      italic: i[2],
      skew: i[3],
      width: i[4]
    };
}
var lt = {};
function xn(r) {
  var e;
  if (r >= 5 ? e = 0 : r >= 3 ? e = 1 : e = 2, !lt[e]) {
    var t = lt[e] = {
      cssEmPerMu: Ce.quad[e] / 18
    };
    for (var a in Ce)
      Ce.hasOwnProperty(a) && (t[a] = Ce[a][e]);
  }
  return lt[e];
}
var o0 = {
  math: {},
  text: {}
};
function u(r, e, t, a, i, n) {
  o0[r][i] = {
    font: e,
    group: t,
    replace: a
  }, n && a && (o0[r][a] = o0[r][i]);
}
var f = "math", P = "text", p = "main", x = "ams", u0 = "accent-token", $ = "bin", B0 = "close", ce = "inner", J = "mathord", p0 = "op-token", S0 = "open", ge = "punct", I = "rel", L0 = "spacing", S = "textord";
u(f, p, I, "≡", "\\equiv", !0);
u(f, p, I, "≺", "\\prec", !0);
u(f, p, I, "≻", "\\succ", !0);
u(f, p, I, "∼", "\\sim", !0);
u(f, p, I, "⊥", "\\perp");
u(f, p, I, "⪯", "\\preceq", !0);
u(f, p, I, "⪰", "\\succeq", !0);
u(f, p, I, "≃", "\\simeq", !0);
u(f, p, I, "∣", "\\mid", !0);
u(f, p, I, "≪", "\\ll", !0);
u(f, p, I, "≫", "\\gg", !0);
u(f, p, I, "≍", "\\asymp", !0);
u(f, p, I, "∥", "\\parallel");
u(f, p, I, "⋈", "\\bowtie", !0);
u(f, p, I, "⌣", "\\smile", !0);
u(f, p, I, "⊑", "\\sqsubseteq", !0);
u(f, p, I, "⊒", "\\sqsupseteq", !0);
u(f, p, I, "≐", "\\doteq", !0);
u(f, p, I, "⌢", "\\frown", !0);
u(f, p, I, "∋", "\\ni", !0);
u(f, p, I, "∝", "\\propto", !0);
u(f, p, I, "⊢", "\\vdash", !0);
u(f, p, I, "⊣", "\\dashv", !0);
u(f, p, I, "∋", "\\owns");
u(f, p, ge, ".", "\\ldotp");
u(f, p, ge, "⋅", "\\cdotp");
u(f, p, ge, "⋅", "·");
u(P, p, S, "⋅", "·");
u(f, p, S, "#", "\\#");
u(P, p, S, "#", "\\#");
u(f, p, S, "&", "\\&");
u(P, p, S, "&", "\\&");
u(f, p, S, "ℵ", "\\aleph", !0);
u(f, p, S, "∀", "\\forall", !0);
u(f, p, S, "ℏ", "\\hbar", !0);
u(f, p, S, "∃", "\\exists", !0);
u(f, p, S, "∇", "\\nabla", !0);
u(f, p, S, "♭", "\\flat", !0);
u(f, p, S, "ℓ", "\\ell", !0);
u(f, p, S, "♮", "\\natural", !0);
u(f, p, S, "♣", "\\clubsuit", !0);
u(f, p, S, "℘", "\\wp", !0);
u(f, p, S, "♯", "\\sharp", !0);
u(f, p, S, "♢", "\\diamondsuit", !0);
u(f, p, S, "ℜ", "\\Re", !0);
u(f, p, S, "♡", "\\heartsuit", !0);
u(f, p, S, "ℑ", "\\Im", !0);
u(f, p, S, "♠", "\\spadesuit", !0);
u(f, p, S, "§", "\\S", !0);
u(P, p, S, "§", "\\S");
u(f, p, S, "¶", "\\P", !0);
u(P, p, S, "¶", "\\P");
u(f, p, S, "†", "\\dag");
u(P, p, S, "†", "\\dag");
u(P, p, S, "†", "\\textdagger");
u(f, p, S, "‡", "\\ddag");
u(P, p, S, "‡", "\\ddag");
u(P, p, S, "‡", "\\textdaggerdbl");
u(f, p, B0, "⎱", "\\rmoustache", !0);
u(f, p, S0, "⎰", "\\lmoustache", !0);
u(f, p, B0, "⟯", "\\rgroup", !0);
u(f, p, S0, "⟮", "\\lgroup", !0);
u(f, p, $, "∓", "\\mp", !0);
u(f, p, $, "⊖", "\\ominus", !0);
u(f, p, $, "⊎", "\\uplus", !0);
u(f, p, $, "⊓", "\\sqcap", !0);
u(f, p, $, "∗", "\\ast");
u(f, p, $, "⊔", "\\sqcup", !0);
u(f, p, $, "◯", "\\bigcirc", !0);
u(f, p, $, "∙", "\\bullet", !0);
u(f, p, $, "‡", "\\ddagger");
u(f, p, $, "≀", "\\wr", !0);
u(f, p, $, "⨿", "\\amalg");
u(f, p, $, "&", "\\And");
u(f, p, I, "⟵", "\\longleftarrow", !0);
u(f, p, I, "⇐", "\\Leftarrow", !0);
u(f, p, I, "⟸", "\\Longleftarrow", !0);
u(f, p, I, "⟶", "\\longrightarrow", !0);
u(f, p, I, "⇒", "\\Rightarrow", !0);
u(f, p, I, "⟹", "\\Longrightarrow", !0);
u(f, p, I, "↔", "\\leftrightarrow", !0);
u(f, p, I, "⟷", "\\longleftrightarrow", !0);
u(f, p, I, "⇔", "\\Leftrightarrow", !0);
u(f, p, I, "⟺", "\\Longleftrightarrow", !0);
u(f, p, I, "↦", "\\mapsto", !0);
u(f, p, I, "⟼", "\\longmapsto", !0);
u(f, p, I, "↗", "\\nearrow", !0);
u(f, p, I, "↩", "\\hookleftarrow", !0);
u(f, p, I, "↪", "\\hookrightarrow", !0);
u(f, p, I, "↘", "\\searrow", !0);
u(f, p, I, "↼", "\\leftharpoonup", !0);
u(f, p, I, "⇀", "\\rightharpoonup", !0);
u(f, p, I, "↙", "\\swarrow", !0);
u(f, p, I, "↽", "\\leftharpoondown", !0);
u(f, p, I, "⇁", "\\rightharpoondown", !0);
u(f, p, I, "↖", "\\nwarrow", !0);
u(f, p, I, "⇌", "\\rightleftharpoons", !0);
u(f, x, I, "≮", "\\nless", !0);
u(f, x, I, "", "\\@nleqslant");
u(f, x, I, "", "\\@nleqq");
u(f, x, I, "⪇", "\\lneq", !0);
u(f, x, I, "≨", "\\lneqq", !0);
u(f, x, I, "", "\\@lvertneqq");
u(f, x, I, "⋦", "\\lnsim", !0);
u(f, x, I, "⪉", "\\lnapprox", !0);
u(f, x, I, "⊀", "\\nprec", !0);
u(f, x, I, "⋠", "\\npreceq", !0);
u(f, x, I, "⋨", "\\precnsim", !0);
u(f, x, I, "⪹", "\\precnapprox", !0);
u(f, x, I, "≁", "\\nsim", !0);
u(f, x, I, "", "\\@nshortmid");
u(f, x, I, "∤", "\\nmid", !0);
u(f, x, I, "⊬", "\\nvdash", !0);
u(f, x, I, "⊭", "\\nvDash", !0);
u(f, x, I, "⋪", "\\ntriangleleft");
u(f, x, I, "⋬", "\\ntrianglelefteq", !0);
u(f, x, I, "⊊", "\\subsetneq", !0);
u(f, x, I, "", "\\@varsubsetneq");
u(f, x, I, "⫋", "\\subsetneqq", !0);
u(f, x, I, "", "\\@varsubsetneqq");
u(f, x, I, "≯", "\\ngtr", !0);
u(f, x, I, "", "\\@ngeqslant");
u(f, x, I, "", "\\@ngeqq");
u(f, x, I, "⪈", "\\gneq", !0);
u(f, x, I, "≩", "\\gneqq", !0);
u(f, x, I, "", "\\@gvertneqq");
u(f, x, I, "⋧", "\\gnsim", !0);
u(f, x, I, "⪊", "\\gnapprox", !0);
u(f, x, I, "⊁", "\\nsucc", !0);
u(f, x, I, "⋡", "\\nsucceq", !0);
u(f, x, I, "⋩", "\\succnsim", !0);
u(f, x, I, "⪺", "\\succnapprox", !0);
u(f, x, I, "≆", "\\ncong", !0);
u(f, x, I, "", "\\@nshortparallel");
u(f, x, I, "∦", "\\nparallel", !0);
u(f, x, I, "⊯", "\\nVDash", !0);
u(f, x, I, "⋫", "\\ntriangleright");
u(f, x, I, "⋭", "\\ntrianglerighteq", !0);
u(f, x, I, "", "\\@nsupseteqq");
u(f, x, I, "⊋", "\\supsetneq", !0);
u(f, x, I, "", "\\@varsupsetneq");
u(f, x, I, "⫌", "\\supsetneqq", !0);
u(f, x, I, "", "\\@varsupsetneqq");
u(f, x, I, "⊮", "\\nVdash", !0);
u(f, x, I, "⪵", "\\precneqq", !0);
u(f, x, I, "⪶", "\\succneqq", !0);
u(f, x, I, "", "\\@nsubseteqq");
u(f, x, $, "⊴", "\\unlhd");
u(f, x, $, "⊵", "\\unrhd");
u(f, x, I, "↚", "\\nleftarrow", !0);
u(f, x, I, "↛", "\\nrightarrow", !0);
u(f, x, I, "⇍", "\\nLeftarrow", !0);
u(f, x, I, "⇏", "\\nRightarrow", !0);
u(f, x, I, "↮", "\\nleftrightarrow", !0);
u(f, x, I, "⇎", "\\nLeftrightarrow", !0);
u(f, x, I, "△", "\\vartriangle");
u(f, x, S, "ℏ", "\\hslash");
u(f, x, S, "▽", "\\triangledown");
u(f, x, S, "◊", "\\lozenge");
u(f, x, S, "Ⓢ", "\\circledS");
u(f, x, S, "®", "\\circledR");
u(P, x, S, "®", "\\circledR");
u(f, x, S, "∡", "\\measuredangle", !0);
u(f, x, S, "∄", "\\nexists");
u(f, x, S, "℧", "\\mho");
u(f, x, S, "Ⅎ", "\\Finv", !0);
u(f, x, S, "⅁", "\\Game", !0);
u(f, x, S, "‵", "\\backprime");
u(f, x, S, "▲", "\\blacktriangle");
u(f, x, S, "▼", "\\blacktriangledown");
u(f, x, S, "■", "\\blacksquare");
u(f, x, S, "⧫", "\\blacklozenge");
u(f, x, S, "★", "\\bigstar");
u(f, x, S, "∢", "\\sphericalangle", !0);
u(f, x, S, "∁", "\\complement", !0);
u(f, x, S, "ð", "\\eth", !0);
u(P, p, S, "ð", "ð");
u(f, x, S, "╱", "\\diagup");
u(f, x, S, "╲", "\\diagdown");
u(f, x, S, "□", "\\square");
u(f, x, S, "□", "\\Box");
u(f, x, S, "◊", "\\Diamond");
u(f, x, S, "¥", "\\yen", !0);
u(P, x, S, "¥", "\\yen", !0);
u(f, x, S, "✓", "\\checkmark", !0);
u(P, x, S, "✓", "\\checkmark");
u(f, x, S, "ℶ", "\\beth", !0);
u(f, x, S, "ℸ", "\\daleth", !0);
u(f, x, S, "ℷ", "\\gimel", !0);
u(f, x, S, "ϝ", "\\digamma", !0);
u(f, x, S, "ϰ", "\\varkappa");
u(f, x, S0, "┌", "\\@ulcorner", !0);
u(f, x, B0, "┐", "\\@urcorner", !0);
u(f, x, S0, "└", "\\@llcorner", !0);
u(f, x, B0, "┘", "\\@lrcorner", !0);
u(f, x, I, "≦", "\\leqq", !0);
u(f, x, I, "⩽", "\\leqslant", !0);
u(f, x, I, "⪕", "\\eqslantless", !0);
u(f, x, I, "≲", "\\lesssim", !0);
u(f, x, I, "⪅", "\\lessapprox", !0);
u(f, x, I, "≊", "\\approxeq", !0);
u(f, x, $, "⋖", "\\lessdot");
u(f, x, I, "⋘", "\\lll", !0);
u(f, x, I, "≶", "\\lessgtr", !0);
u(f, x, I, "⋚", "\\lesseqgtr", !0);
u(f, x, I, "⪋", "\\lesseqqgtr", !0);
u(f, x, I, "≑", "\\doteqdot");
u(f, x, I, "≓", "\\risingdotseq", !0);
u(f, x, I, "≒", "\\fallingdotseq", !0);
u(f, x, I, "∽", "\\backsim", !0);
u(f, x, I, "⋍", "\\backsimeq", !0);
u(f, x, I, "⫅", "\\subseteqq", !0);
u(f, x, I, "⋐", "\\Subset", !0);
u(f, x, I, "⊏", "\\sqsubset", !0);
u(f, x, I, "≼", "\\preccurlyeq", !0);
u(f, x, I, "⋞", "\\curlyeqprec", !0);
u(f, x, I, "≾", "\\precsim", !0);
u(f, x, I, "⪷", "\\precapprox", !0);
u(f, x, I, "⊲", "\\vartriangleleft");
u(f, x, I, "⊴", "\\trianglelefteq");
u(f, x, I, "⊨", "\\vDash", !0);
u(f, x, I, "⊪", "\\Vvdash", !0);
u(f, x, I, "⌣", "\\smallsmile");
u(f, x, I, "⌢", "\\smallfrown");
u(f, x, I, "≏", "\\bumpeq", !0);
u(f, x, I, "≎", "\\Bumpeq", !0);
u(f, x, I, "≧", "\\geqq", !0);
u(f, x, I, "⩾", "\\geqslant", !0);
u(f, x, I, "⪖", "\\eqslantgtr", !0);
u(f, x, I, "≳", "\\gtrsim", !0);
u(f, x, I, "⪆", "\\gtrapprox", !0);
u(f, x, $, "⋗", "\\gtrdot");
u(f, x, I, "⋙", "\\ggg", !0);
u(f, x, I, "≷", "\\gtrless", !0);
u(f, x, I, "⋛", "\\gtreqless", !0);
u(f, x, I, "⪌", "\\gtreqqless", !0);
u(f, x, I, "≖", "\\eqcirc", !0);
u(f, x, I, "≗", "\\circeq", !0);
u(f, x, I, "≜", "\\triangleq", !0);
u(f, x, I, "∼", "\\thicksim");
u(f, x, I, "≈", "\\thickapprox");
u(f, x, I, "⫆", "\\supseteqq", !0);
u(f, x, I, "⋑", "\\Supset", !0);
u(f, x, I, "⊐", "\\sqsupset", !0);
u(f, x, I, "≽", "\\succcurlyeq", !0);
u(f, x, I, "⋟", "\\curlyeqsucc", !0);
u(f, x, I, "≿", "\\succsim", !0);
u(f, x, I, "⪸", "\\succapprox", !0);
u(f, x, I, "⊳", "\\vartriangleright");
u(f, x, I, "⊵", "\\trianglerighteq");
u(f, x, I, "⊩", "\\Vdash", !0);
u(f, x, I, "∣", "\\shortmid");
u(f, x, I, "∥", "\\shortparallel");
u(f, x, I, "≬", "\\between", !0);
u(f, x, I, "⋔", "\\pitchfork", !0);
u(f, x, I, "∝", "\\varpropto");
u(f, x, I, "◀", "\\blacktriangleleft");
u(f, x, I, "∴", "\\therefore", !0);
u(f, x, I, "∍", "\\backepsilon");
u(f, x, I, "▶", "\\blacktriangleright");
u(f, x, I, "∵", "\\because", !0);
u(f, x, I, "⋘", "\\llless");
u(f, x, I, "⋙", "\\gggtr");
u(f, x, $, "⊲", "\\lhd");
u(f, x, $, "⊳", "\\rhd");
u(f, x, I, "≂", "\\eqsim", !0);
u(f, p, I, "⋈", "\\Join");
u(f, x, I, "≑", "\\Doteq", !0);
u(f, x, $, "∔", "\\dotplus", !0);
u(f, x, $, "∖", "\\smallsetminus");
u(f, x, $, "⋒", "\\Cap", !0);
u(f, x, $, "⋓", "\\Cup", !0);
u(f, x, $, "⩞", "\\doublebarwedge", !0);
u(f, x, $, "⊟", "\\boxminus", !0);
u(f, x, $, "⊞", "\\boxplus", !0);
u(f, x, $, "⋇", "\\divideontimes", !0);
u(f, x, $, "⋉", "\\ltimes", !0);
u(f, x, $, "⋊", "\\rtimes", !0);
u(f, x, $, "⋋", "\\leftthreetimes", !0);
u(f, x, $, "⋌", "\\rightthreetimes", !0);
u(f, x, $, "⋏", "\\curlywedge", !0);
u(f, x, $, "⋎", "\\curlyvee", !0);
u(f, x, $, "⊝", "\\circleddash", !0);
u(f, x, $, "⊛", "\\circledast", !0);
u(f, x, $, "⋅", "\\centerdot");
u(f, x, $, "⊺", "\\intercal", !0);
u(f, x, $, "⋒", "\\doublecap");
u(f, x, $, "⋓", "\\doublecup");
u(f, x, $, "⊠", "\\boxtimes", !0);
u(f, x, I, "⇢", "\\dashrightarrow", !0);
u(f, x, I, "⇠", "\\dashleftarrow", !0);
u(f, x, I, "⇇", "\\leftleftarrows", !0);
u(f, x, I, "⇆", "\\leftrightarrows", !0);
u(f, x, I, "⇚", "\\Lleftarrow", !0);
u(f, x, I, "↞", "\\twoheadleftarrow", !0);
u(f, x, I, "↢", "\\leftarrowtail", !0);
u(f, x, I, "↫", "\\looparrowleft", !0);
u(f, x, I, "⇋", "\\leftrightharpoons", !0);
u(f, x, I, "↶", "\\curvearrowleft", !0);
u(f, x, I, "↺", "\\circlearrowleft", !0);
u(f, x, I, "↰", "\\Lsh", !0);
u(f, x, I, "⇈", "\\upuparrows", !0);
u(f, x, I, "↿", "\\upharpoonleft", !0);
u(f, x, I, "⇃", "\\downharpoonleft", !0);
u(f, p, I, "⊶", "\\origof", !0);
u(f, p, I, "⊷", "\\imageof", !0);
u(f, x, I, "⊸", "\\multimap", !0);
u(f, x, I, "↭", "\\leftrightsquigarrow", !0);
u(f, x, I, "⇉", "\\rightrightarrows", !0);
u(f, x, I, "⇄", "\\rightleftarrows", !0);
u(f, x, I, "↠", "\\twoheadrightarrow", !0);
u(f, x, I, "↣", "\\rightarrowtail", !0);
u(f, x, I, "↬", "\\looparrowright", !0);
u(f, x, I, "↷", "\\curvearrowright", !0);
u(f, x, I, "↻", "\\circlearrowright", !0);
u(f, x, I, "↱", "\\Rsh", !0);
u(f, x, I, "⇊", "\\downdownarrows", !0);
u(f, x, I, "↾", "\\upharpoonright", !0);
u(f, x, I, "⇂", "\\downharpoonright", !0);
u(f, x, I, "⇝", "\\rightsquigarrow", !0);
u(f, x, I, "⇝", "\\leadsto");
u(f, x, I, "⇛", "\\Rrightarrow", !0);
u(f, x, I, "↾", "\\restriction");
u(f, p, S, "‘", "`");
u(f, p, S, "$", "\\$");
u(P, p, S, "$", "\\$");
u(P, p, S, "$", "\\textdollar");
u(f, p, S, "%", "\\%");
u(P, p, S, "%", "\\%");
u(f, p, S, "_", "\\_");
u(P, p, S, "_", "\\_");
u(P, p, S, "_", "\\textunderscore");
u(f, p, S, "∠", "\\angle", !0);
u(f, p, S, "∞", "\\infty", !0);
u(f, p, S, "′", "\\prime");
u(f, p, S, "△", "\\triangle");
u(f, p, S, "Γ", "\\Gamma", !0);
u(f, p, S, "Δ", "\\Delta", !0);
u(f, p, S, "Θ", "\\Theta", !0);
u(f, p, S, "Λ", "\\Lambda", !0);
u(f, p, S, "Ξ", "\\Xi", !0);
u(f, p, S, "Π", "\\Pi", !0);
u(f, p, S, "Σ", "\\Sigma", !0);
u(f, p, S, "Υ", "\\Upsilon", !0);
u(f, p, S, "Φ", "\\Phi", !0);
u(f, p, S, "Ψ", "\\Psi", !0);
u(f, p, S, "Ω", "\\Omega", !0);
u(f, p, S, "A", "Α");
u(f, p, S, "B", "Β");
u(f, p, S, "E", "Ε");
u(f, p, S, "Z", "Ζ");
u(f, p, S, "H", "Η");
u(f, p, S, "I", "Ι");
u(f, p, S, "K", "Κ");
u(f, p, S, "M", "Μ");
u(f, p, S, "N", "Ν");
u(f, p, S, "O", "Ο");
u(f, p, S, "P", "Ρ");
u(f, p, S, "T", "Τ");
u(f, p, S, "X", "Χ");
u(f, p, S, "¬", "\\neg", !0);
u(f, p, S, "¬", "\\lnot");
u(f, p, S, "⊤", "\\top");
u(f, p, S, "⊥", "\\bot");
u(f, p, S, "∅", "\\emptyset");
u(f, x, S, "∅", "\\varnothing");
u(f, p, J, "α", "\\alpha", !0);
u(f, p, J, "β", "\\beta", !0);
u(f, p, J, "γ", "\\gamma", !0);
u(f, p, J, "δ", "\\delta", !0);
u(f, p, J, "ϵ", "\\epsilon", !0);
u(f, p, J, "ζ", "\\zeta", !0);
u(f, p, J, "η", "\\eta", !0);
u(f, p, J, "θ", "\\theta", !0);
u(f, p, J, "ι", "\\iota", !0);
u(f, p, J, "κ", "\\kappa", !0);
u(f, p, J, "λ", "\\lambda", !0);
u(f, p, J, "μ", "\\mu", !0);
u(f, p, J, "ν", "\\nu", !0);
u(f, p, J, "ξ", "\\xi", !0);
u(f, p, J, "ο", "\\omicron", !0);
u(f, p, J, "π", "\\pi", !0);
u(f, p, J, "ρ", "\\rho", !0);
u(f, p, J, "σ", "\\sigma", !0);
u(f, p, J, "τ", "\\tau", !0);
u(f, p, J, "υ", "\\upsilon", !0);
u(f, p, J, "ϕ", "\\phi", !0);
u(f, p, J, "χ", "\\chi", !0);
u(f, p, J, "ψ", "\\psi", !0);
u(f, p, J, "ω", "\\omega", !0);
u(f, p, J, "ε", "\\varepsilon", !0);
u(f, p, J, "ϑ", "\\vartheta", !0);
u(f, p, J, "ϖ", "\\varpi", !0);
u(f, p, J, "ϱ", "\\varrho", !0);
u(f, p, J, "ς", "\\varsigma", !0);
u(f, p, J, "φ", "\\varphi", !0);
u(f, p, $, "∗", "*", !0);
u(f, p, $, "+", "+");
u(f, p, $, "−", "-", !0);
u(f, p, $, "⋅", "\\cdot", !0);
u(f, p, $, "∘", "\\circ", !0);
u(f, p, $, "÷", "\\div", !0);
u(f, p, $, "±", "\\pm", !0);
u(f, p, $, "×", "\\times", !0);
u(f, p, $, "∩", "\\cap", !0);
u(f, p, $, "∪", "\\cup", !0);
u(f, p, $, "∖", "\\setminus", !0);
u(f, p, $, "∧", "\\land");
u(f, p, $, "∨", "\\lor");
u(f, p, $, "∧", "\\wedge", !0);
u(f, p, $, "∨", "\\vee", !0);
u(f, p, S, "√", "\\surd");
u(f, p, S0, "⟨", "\\langle", !0);
u(f, p, S0, "∣", "\\lvert");
u(f, p, S0, "∥", "\\lVert");
u(f, p, B0, "?", "?");
u(f, p, B0, "!", "!");
u(f, p, B0, "⟩", "\\rangle", !0);
u(f, p, B0, "∣", "\\rvert");
u(f, p, B0, "∥", "\\rVert");
u(f, p, I, "=", "=");
u(f, p, I, ":", ":");
u(f, p, I, "≈", "\\approx", !0);
u(f, p, I, "≅", "\\cong", !0);
u(f, p, I, "≥", "\\ge");
u(f, p, I, "≥", "\\geq", !0);
u(f, p, I, "←", "\\gets");
u(f, p, I, ">", "\\gt", !0);
u(f, p, I, "∈", "\\in", !0);
u(f, p, I, "", "\\@not");
u(f, p, I, "⊂", "\\subset", !0);
u(f, p, I, "⊃", "\\supset", !0);
u(f, p, I, "⊆", "\\subseteq", !0);
u(f, p, I, "⊇", "\\supseteq", !0);
u(f, x, I, "⊈", "\\nsubseteq", !0);
u(f, x, I, "⊉", "\\nsupseteq", !0);
u(f, p, I, "⊨", "\\models");
u(f, p, I, "←", "\\leftarrow", !0);
u(f, p, I, "≤", "\\le");
u(f, p, I, "≤", "\\leq", !0);
u(f, p, I, "<", "\\lt", !0);
u(f, p, I, "→", "\\rightarrow", !0);
u(f, p, I, "→", "\\to");
u(f, x, I, "≱", "\\ngeq", !0);
u(f, x, I, "≰", "\\nleq", !0);
u(f, p, L0, " ", "\\ ");
u(f, p, L0, " ", "\\space");
u(f, p, L0, " ", "\\nobreakspace");
u(P, p, L0, " ", "\\ ");
u(P, p, L0, " ", " ");
u(P, p, L0, " ", "\\space");
u(P, p, L0, " ", "\\nobreakspace");
u(f, p, L0, "", "\\nobreak");
u(f, p, L0, "", "\\allowbreak");
u(f, p, ge, ",", ",");
u(f, p, ge, ";", ";");
u(f, x, $, "⊼", "\\barwedge", !0);
u(f, x, $, "⊻", "\\veebar", !0);
u(f, p, $, "⊙", "\\odot", !0);
u(f, p, $, "⊕", "\\oplus", !0);
u(f, p, $, "⊗", "\\otimes", !0);
u(f, p, S, "∂", "\\partial", !0);
u(f, p, $, "⊘", "\\oslash", !0);
u(f, x, $, "⊚", "\\circledcirc", !0);
u(f, x, $, "⊡", "\\boxdot", !0);
u(f, p, $, "△", "\\bigtriangleup");
u(f, p, $, "▽", "\\bigtriangledown");
u(f, p, $, "†", "\\dagger");
u(f, p, $, "⋄", "\\diamond");
u(f, p, $, "⋆", "\\star");
u(f, p, $, "◃", "\\triangleleft");
u(f, p, $, "▹", "\\triangleright");
u(f, p, S0, "{", "\\{");
u(P, p, S, "{", "\\{");
u(P, p, S, "{", "\\textbraceleft");
u(f, p, B0, "}", "\\}");
u(P, p, S, "}", "\\}");
u(P, p, S, "}", "\\textbraceright");
u(f, p, S0, "{", "\\lbrace");
u(f, p, B0, "}", "\\rbrace");
u(f, p, S0, "[", "\\lbrack", !0);
u(P, p, S, "[", "\\lbrack", !0);
u(f, p, B0, "]", "\\rbrack", !0);
u(P, p, S, "]", "\\rbrack", !0);
u(f, p, S0, "(", "\\lparen", !0);
u(f, p, B0, ")", "\\rparen", !0);
u(P, p, S, "<", "\\textless", !0);
u(P, p, S, ">", "\\textgreater", !0);
u(f, p, S0, "⌊", "\\lfloor", !0);
u(f, p, B0, "⌋", "\\rfloor", !0);
u(f, p, S0, "⌈", "\\lceil", !0);
u(f, p, B0, "⌉", "\\rceil", !0);
u(f, p, S, "\\", "\\backslash");
u(f, p, S, "∣", "|");
u(f, p, S, "∣", "\\vert");
u(P, p, S, "|", "\\textbar", !0);
u(f, p, S, "∥", "\\|");
u(f, p, S, "∥", "\\Vert");
u(P, p, S, "∥", "\\textbardbl");
u(P, p, S, "~", "\\textasciitilde");
u(P, p, S, "\\", "\\textbackslash");
u(P, p, S, "^", "\\textasciicircum");
u(f, p, I, "↑", "\\uparrow", !0);
u(f, p, I, "⇑", "\\Uparrow", !0);
u(f, p, I, "↓", "\\downarrow", !0);
u(f, p, I, "⇓", "\\Downarrow", !0);
u(f, p, I, "↕", "\\updownarrow", !0);
u(f, p, I, "⇕", "\\Updownarrow", !0);
u(f, p, p0, "∐", "\\coprod");
u(f, p, p0, "⋁", "\\bigvee");
u(f, p, p0, "⋀", "\\bigwedge");
u(f, p, p0, "⨄", "\\biguplus");
u(f, p, p0, "⋂", "\\bigcap");
u(f, p, p0, "⋃", "\\bigcup");
u(f, p, p0, "∫", "\\int");
u(f, p, p0, "∫", "\\intop");
u(f, p, p0, "∬", "\\iint");
u(f, p, p0, "∭", "\\iiint");
u(f, p, p0, "∏", "\\prod");
u(f, p, p0, "∑", "\\sum");
u(f, p, p0, "⨂", "\\bigotimes");
u(f, p, p0, "⨁", "\\bigoplus");
u(f, p, p0, "⨀", "\\bigodot");
u(f, p, p0, "∮", "\\oint");
u(f, p, p0, "∯", "\\oiint");
u(f, p, p0, "∰", "\\oiiint");
u(f, p, p0, "⨆", "\\bigsqcup");
u(f, p, p0, "∫", "\\smallint");
u(P, p, ce, "…", "\\textellipsis");
u(f, p, ce, "…", "\\mathellipsis");
u(P, p, ce, "…", "\\ldots", !0);
u(f, p, ce, "…", "\\ldots", !0);
u(f, p, ce, "⋯", "\\@cdots", !0);
u(f, p, ce, "⋱", "\\ddots", !0);
u(f, p, S, "⋮", "\\varvdots");
u(P, p, S, "⋮", "\\varvdots");
u(f, p, u0, "ˊ", "\\acute");
u(f, p, u0, "ˋ", "\\grave");
u(f, p, u0, "¨", "\\ddot");
u(f, p, u0, "~", "\\tilde");
u(f, p, u0, "ˉ", "\\bar");
u(f, p, u0, "˘", "\\breve");
u(f, p, u0, "ˇ", "\\check");
u(f, p, u0, "^", "\\hat");
u(f, p, u0, "⃗", "\\vec");
u(f, p, u0, "˙", "\\dot");
u(f, p, u0, "˚", "\\mathring");
u(f, p, J, "", "\\@imath");
u(f, p, J, "", "\\@jmath");
u(f, p, S, "ı", "ı");
u(f, p, S, "ȷ", "ȷ");
u(P, p, S, "ı", "\\i", !0);
u(P, p, S, "ȷ", "\\j", !0);
u(P, p, S, "ß", "\\ss", !0);
u(P, p, S, "æ", "\\ae", !0);
u(P, p, S, "œ", "\\oe", !0);
u(P, p, S, "ø", "\\o", !0);
u(P, p, S, "Æ", "\\AE", !0);
u(P, p, S, "Œ", "\\OE", !0);
u(P, p, S, "Ø", "\\O", !0);
u(P, p, u0, "ˊ", "\\'");
u(P, p, u0, "ˋ", "\\`");
u(P, p, u0, "ˆ", "\\^");
u(P, p, u0, "˜", "\\~");
u(P, p, u0, "ˉ", "\\=");
u(P, p, u0, "˘", "\\u");
u(P, p, u0, "˙", "\\.");
u(P, p, u0, "¸", "\\c");
u(P, p, u0, "˚", "\\r");
u(P, p, u0, "ˇ", "\\v");
u(P, p, u0, "¨", '\\"');
u(P, p, u0, "˝", "\\H");
u(P, p, u0, "◯", "\\textcircled");
var ua = {
  "--": !0,
  "---": !0,
  "``": !0,
  "''": !0
};
u(P, p, S, "–", "--", !0);
u(P, p, S, "–", "\\textendash");
u(P, p, S, "—", "---", !0);
u(P, p, S, "—", "\\textemdash");
u(P, p, S, "‘", "`", !0);
u(P, p, S, "‘", "\\textquoteleft");
u(P, p, S, "’", "'", !0);
u(P, p, S, "’", "\\textquoteright");
u(P, p, S, "“", "``", !0);
u(P, p, S, "“", "\\textquotedblleft");
u(P, p, S, "”", "''", !0);
u(P, p, S, "”", "\\textquotedblright");
u(f, p, S, "°", "\\degree", !0);
u(P, p, S, "°", "\\degree");
u(P, p, S, "°", "\\textdegree", !0);
u(f, p, S, "£", "\\pounds");
u(f, p, S, "£", "\\mathsterling", !0);
u(P, p, S, "£", "\\pounds");
u(P, p, S, "£", "\\textsterling", !0);
u(f, x, S, "✠", "\\maltese");
u(P, x, S, "✠", "\\maltese");
var vr = '0123456789/@."';
for (var ot = 0; ot < vr.length; ot++) {
  var Ar = vr.charAt(ot);
  u(f, p, S, Ar, Ar);
}
var gr = '0123456789!@*()-=+";:?/.,';
for (var ut = 0; ut < gr.length; ut++) {
  var br = gr.charAt(ut);
  u(P, p, S, br, br);
}
var He = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
for (var ht = 0; ht < He.length; ht++) {
  var Se = He.charAt(ht);
  u(f, p, J, Se, Se), u(P, p, S, Se, Se);
}
u(f, x, S, "C", "ℂ");
u(P, x, S, "C", "ℂ");
u(f, x, S, "H", "ℍ");
u(P, x, S, "H", "ℍ");
u(f, x, S, "N", "ℕ");
u(P, x, S, "N", "ℕ");
u(f, x, S, "P", "ℙ");
u(P, x, S, "P", "ℙ");
u(f, x, S, "Q", "ℚ");
u(P, x, S, "Q", "ℚ");
u(f, x, S, "R", "ℝ");
u(P, x, S, "R", "ℝ");
u(f, x, S, "Z", "ℤ");
u(P, x, S, "Z", "ℤ");
u(f, p, J, "h", "ℎ");
u(P, p, J, "h", "ℎ");
var e0;
for (var w0 = 0; w0 < He.length; w0++) {
  var f0 = He.charAt(w0);
  e0 = String.fromCharCode(55349, 56320 + w0), u(f, p, J, f0, e0), u(P, p, S, f0, e0), e0 = String.fromCharCode(55349, 56372 + w0), u(f, p, J, f0, e0), u(P, p, S, f0, e0), e0 = String.fromCharCode(55349, 56424 + w0), u(f, p, J, f0, e0), u(P, p, S, f0, e0), e0 = String.fromCharCode(55349, 56580 + w0), u(f, p, J, f0, e0), u(P, p, S, f0, e0), e0 = String.fromCharCode(55349, 56684 + w0), u(f, p, J, f0, e0), u(P, p, S, f0, e0), e0 = String.fromCharCode(55349, 56736 + w0), u(f, p, J, f0, e0), u(P, p, S, f0, e0), e0 = String.fromCharCode(55349, 56788 + w0), u(f, p, J, f0, e0), u(P, p, S, f0, e0), e0 = String.fromCharCode(55349, 56840 + w0), u(f, p, J, f0, e0), u(P, p, S, f0, e0), e0 = String.fromCharCode(55349, 56944 + w0), u(f, p, J, f0, e0), u(P, p, S, f0, e0), w0 < 26 && (e0 = String.fromCharCode(55349, 56632 + w0), u(f, p, J, f0, e0), u(P, p, S, f0, e0), e0 = String.fromCharCode(55349, 56476 + w0), u(f, p, J, f0, e0), u(P, p, S, f0, e0));
}
e0 = "𝕜";
u(f, p, J, "k", e0);
u(P, p, S, "k", e0);
for (var K0 = 0; K0 < 10; K0++) {
  var j0 = K0.toString();
  e0 = String.fromCharCode(55349, 57294 + K0), u(f, p, J, j0, e0), u(P, p, S, j0, e0), e0 = String.fromCharCode(55349, 57314 + K0), u(f, p, J, j0, e0), u(P, p, S, j0, e0), e0 = String.fromCharCode(55349, 57324 + K0), u(f, p, J, j0, e0), u(P, p, S, j0, e0), e0 = String.fromCharCode(55349, 57334 + K0), u(f, p, J, j0, e0), u(P, p, S, j0, e0);
}
var _t = "ÐÞþ";
for (var ct = 0; ct < _t.length; ct++) {
  var Me = _t.charAt(ct);
  u(f, p, J, Me, Me), u(P, p, S, Me, Me);
}
var Ct = {
  mathClass: "mathbf",
  textClass: "textbf",
  font: "Main-Bold"
}, yr = {
  mathClass: "mathnormal",
  textClass: "textit",
  font: "Math-Italic"
}, wr = {
  mathClass: "boldsymbol",
  textClass: "boldsymbol",
  font: "Main-BoldItalic"
}, In = {
  mathClass: "mathscr",
  textClass: "textscr",
  font: "Script-Regular"
}, ee = {
  mathClass: "",
  textClass: "",
  font: ""
}, xr = {
  mathClass: "mathfrak",
  textClass: "textfrak",
  font: "Fraktur-Regular"
}, Ir = {
  mathClass: "mathbb",
  textClass: "textbb",
  font: "AMS-Regular"
}, Br = {
  mathClass: "mathboldfrak",
  textClass: "textboldfrak",
  font: "Fraktur-Regular"
}, St = {
  mathClass: "mathsf",
  textClass: "textsf",
  font: "SansSerif-Regular"
}, Mt = {
  mathClass: "mathboldsf",
  textClass: "textboldsf",
  font: "SansSerif-Bold"
}, kr = {
  mathClass: "mathitsf",
  textClass: "textitsf",
  font: "SansSerif-Italic"
}, Et = {
  mathClass: "mathtt",
  textClass: "texttt",
  font: "Typewriter-Regular"
}, _r = [
  Ct,
  Ct,
  // A-Z, a-z
  yr,
  yr,
  // A-Z, a-z
  wr,
  wr,
  // A-Z, a-z
  // Map fancy A-Z letters to script, not calligraphic.
  // This aligns with unicode-math and math fonts (except Cambria Math).
  In,
  ee,
  // A-Z script, a-z — no font
  ee,
  ee,
  // A-Z bold script, a-z bold script — no font
  xr,
  xr,
  // A-Z, a-z
  Ir,
  Ir,
  // A-Z double-struck, k double-struck
  // Note that we are using a bold font, but font metrics for regular Fraktur.
  Br,
  Br,
  // A-Z, a-z
  St,
  St,
  // A-Z, a-z
  Mt,
  Mt,
  // A-Z, a-z
  kr,
  kr,
  // A-Z, a-z
  ee,
  ee,
  // A-Z bold italic sans, a-z bold italic sans - no font
  Et,
  Et
  // A-Z, a-z
], Bn = [
  Ct,
  // 0-9
  ee,
  // 0-9 double-struck. No KaTeX font.
  St,
  // 0-9
  Mt,
  // 0-9
  Et
  // 0-9
], kn = (r) => {
  var e = r.charCodeAt(0), t = r.charCodeAt(1), a = (e - 55296) * 1024 + (t - 56320) + 65536;
  if (119808 <= a && a < 120484) {
    var i = Math.floor((a - 119808) / 26);
    return _r[i];
  } else if (120782 <= a && a <= 120831) {
    var n = Math.floor((a - 120782) / 10);
    return Bn[n];
  } else {
    if (a === 120485 || a === 120486)
      return _r[0];
    if (120486 < a && a < 120782)
      return ee;
    throw new G("Unsupported character: " + r);
  }
}, Ye = function(e, t, a) {
  if (o0[a][e]) {
    var i = o0[a][e].replace;
    i && (e = i);
  }
  return {
    value: e,
    metrics: Yt(e, t, a)
  };
}, x0 = function(e, t, a, i, n) {
  var o = Ye(e, t, a), l = o.metrics;
  e = o.value;
  var s;
  if (l) {
    var h = l.italic;
    (a === "text" || i && i.font === "mathit") && (h = 0), s = new C0(e, l.height, l.depth, h, l.skew, l.width, n);
  } else
    typeof console < "u" && console.warn("No character metrics " + ("for '" + e + "' in style '" + t + "' and mode '" + a + "'")), s = new C0(e, 0, 0, 0, 0, 0, n);
  if (i) {
    s.maxFontSize = i.sizeMultiplier, i.style.isTight() && s.classes.push("mtight");
    var c = i.getColor();
    c && (s.style.color = c);
  }
  return s;
}, Wt = function(e, t, a, i) {
  return i === void 0 && (i = []), a.font === "boldsymbol" && Ye(e, "Main-Bold", t).metrics ? x0(e, "Main-Bold", t, a, i.concat(["mathbf"])) : e === "\\" || o0[t][e].font === "main" ? x0(e, "Main-Regular", t, a, i) : x0(e, "AMS-Regular", t, a, i.concat(["amsrm"]));
}, _n = function(e, t, a) {
  return a !== "textord" && Ye(e, "Math-BoldItalic", t).metrics ? {
    fontName: "Math-BoldItalic",
    fontClass: "boldsymbol"
  } : {
    fontName: "Main-Bold",
    fontClass: "mathbf"
  };
}, We = function(e, t, a) {
  var i = e.mode, n = e.text, o = ["mord"], {
    font: l,
    fontFamily: s,
    fontWeight: h,
    fontShape: c
  } = t, m = i === "math" || i === "text" && !!l, d = m ? l : s, v = "", b = "";
  if (n.charCodeAt(0) === 55349) {
    var g = kn(n);
    v = g.font, b = g[i + "Class"];
  }
  if (v)
    return x0(n, v, i, t, o.concat(b));
  if (d) {
    var w, B;
    if (d === "boldsymbol") {
      var M = _n(n, i, a);
      w = M.fontName, B = [M.fontClass];
    } else m ? (w = zt[l].fontName, B = [l]) : (w = Ee(s, h, c), B = [s, h, c]);
    if (Ye(n, w, i).metrics)
      return x0(n, w, i, t, o.concat(B));
    if (ua.hasOwnProperty(n) && w.slice(0, 10) === "Typewriter") {
      for (var _ = [], z = 0; z < n.length; z++)
        _.push(x0(n[z], w, i, t, o.concat(B)));
      return G0(_);
    }
  }
  if (a === "mathord")
    return x0(n, "Math-Italic", i, t, o.concat(["mathnormal"]));
  if (a === "textord") {
    var D = o0[i][n] && o0[i][n].font;
    if (D === "ams") {
      var R = Ee("amsrm", h, c);
      return x0(n, R, i, t, o.concat("amsrm", h, c));
    } else if (D === "main" || !D) {
      var O = Ee("textrm", h, c);
      return x0(n, O, i, t, o.concat(h, c));
    } else {
      var F = Ee(D, h, c);
      return x0(n, F, i, t, o.concat(F, h, c));
    }
  } else
    throw new Error("unexpected type: " + a + " in makeOrd");
}, Cn = (r, e) => {
  if (W0(r.classes) !== W0(e.classes) || r.skew !== e.skew || r.maxFontSize !== e.maxFontSize || r.italic !== 0 && r.hasClass("mathnormal"))
    return !1;
  if (r.classes.length === 1) {
    var t = r.classes[0];
    if (t === "mbin" || t === "mord")
      return !1;
  }
  for (var a of Object.keys(r.style))
    if (r.style[a] !== e.style[a])
      return !1;
  for (var i of Object.keys(e.style))
    if (r.style[i] !== e.style[i])
      return !1;
  return !0;
}, ha = (r) => {
  for (var e = 0; e < r.length - 1; e++) {
    var t = r[e], a = r[e + 1];
    t instanceof C0 && a instanceof C0 && Cn(t, a) && (t.text += a.text, t.height = Math.max(t.height, a.height), t.depth = Math.max(t.depth, a.depth), t.italic = a.italic, r.splice(e + 1, 1), e--);
  }
  return r;
}, Xt = function(e) {
  for (var t = 0, a = 0, i = 0, n = 0; n < e.children.length; n++) {
    var o = e.children[n];
    o.height > t && (t = o.height), o.depth > a && (a = o.depth), o.maxFontSize > i && (i = o.maxFontSize);
  }
  e.height = t, e.depth = a, e.maxFontSize = i;
}, N = function(e, t, a, i) {
  var n = new he(e, t, a, i);
  return Xt(n), n;
}, $0 = (r, e, t, a) => new he(r, e, t, a), le = function(e, t, a) {
  var i = N([e], [], t);
  return i.height = Math.max(a || t.fontMetrics().defaultRuleThickness, t.minRuleThickness), i.style.borderBottomWidth = W(i.height), i.maxFontSize = 1, i;
}, Sn = function(e, t, a, i) {
  var n = new je(e, t, a, i);
  return Xt(n), n;
}, G0 = function(e) {
  var t = new ue(e);
  return Xt(t), t;
}, oe = function(e, t) {
  return e instanceof ue ? N([], [e], t) : e;
}, Mn = function(e) {
  if (e.positionType === "individualShift") {
    for (var t = e.children, a = [t[0]], i = -t[0].shift - t[0].elem.depth, n = i, o = 1; o < t.length; o++) {
      var l = -t[o].shift - n - t[o].elem.depth, s = l - (t[o - 1].elem.height + t[o - 1].elem.depth);
      n = n + l, a.push({
        type: "kern",
        size: s
      }), a.push(t[o]);
    }
    return {
      children: a,
      depth: i
    };
  }
  var h;
  if (e.positionType === "top") {
    for (var c = e.positionData, m = 0; m < e.children.length; m++) {
      var d = e.children[m];
      c -= d.type === "kern" ? d.size : d.elem.height + d.elem.depth;
    }
    h = c;
  } else if (e.positionType === "bottom")
    h = -e.positionData;
  else {
    var v = e.children[0];
    if (v.type !== "elem")
      throw new Error('First child must have type "elem".');
    if (e.positionType === "shift")
      h = -v.elem.depth - e.positionData;
    else if (e.positionType === "firstBaseline")
      h = -v.elem.depth;
    else
      throw new Error("Invalid positionType " + e.positionType + ".");
  }
  return {
    children: e.children,
    depth: h
  };
}, n0 = function(e, t) {
  for (var {
    children: a,
    depth: i
  } = Mn(e), n = 0, o = 0; o < a.length; o++) {
    var l = a[o];
    if (l.type === "elem") {
      var s = l.elem;
      n = Math.max(n, s.maxFontSize, s.height);
    }
  }
  n += 2;
  var h = N(["pstrut"], []);
  h.style.height = W(n);
  for (var c = [], m = i, d = i, v = i, b = 0; b < a.length; b++) {
    var g = a[b];
    if (g.type === "kern")
      v += g.size;
    else {
      var w = g.elem, B = g.wrapperClasses || [], M = g.wrapperStyle || {}, _ = N(B, [h, w], void 0, M);
      _.style.top = W(-n - v - w.depth), g.marginLeft && (_.style.marginLeft = g.marginLeft), g.marginRight && (_.style.marginRight = g.marginRight), c.push(_), v += w.height + w.depth;
    }
    m = Math.min(m, v), d = Math.max(d, v);
  }
  var z = N(["vlist"], c);
  z.style.height = W(d);
  var D;
  if (m < 0) {
    var R = N([], []), O = N(["vlist"], [R]);
    O.style.height = W(-m);
    var F = N(["vlist-s"], [new C0("​")]);
    D = [N(["vlist-r"], [z, F]), N(["vlist-r"], [O])];
  } else
    D = [N(["vlist-r"], [z])];
  var Q = N(["vlist-t"], D);
  return D.length === 2 && Q.classes.push("vlist-t2"), Q.height = d, Q.depth = -m, Q;
}, ca = (r, e) => {
  var t = N(["mspace"], [], e), a = c0(r, e);
  return t.style.marginRight = W(a), t;
}, Ee = (r, e, t) => {
  var a, i;
  switch (r) {
    case "amsrm":
      a = "AMS";
      break;
    case "textrm":
      a = "Main";
      break;
    case "textsf":
      a = "SansSerif";
      break;
    case "texttt":
      a = "Typewriter";
      break;
    default:
      a = r;
  }
  return e === "textbf" && t === "textit" ? i = "BoldItalic" : e === "textbf" ? i = "Bold" : t === "textit" ? i = "Italic" : i = "Regular", a + "-" + i;
}, zt = {
  // styles
  mathbf: {
    variant: "bold",
    fontName: "Main-Bold"
  },
  mathrm: {
    variant: "normal",
    fontName: "Main-Regular"
  },
  textit: {
    variant: "italic",
    fontName: "Main-Italic"
  },
  mathit: {
    variant: "italic",
    fontName: "Main-Italic"
  },
  mathnormal: {
    variant: "italic",
    fontName: "Math-Italic"
  },
  mathsfit: {
    variant: "sans-serif-italic",
    fontName: "SansSerif-Italic"
  },
  // "boldsymbol" is missing because they require the use of multiple fonts:
  // Math-BoldItalic and Main-Bold.  This is handled by a special case in
  // makeOrd which ends up calling boldsymbol.
  // families
  mathbb: {
    variant: "double-struck",
    fontName: "AMS-Regular"
  },
  mathcal: {
    variant: "script",
    fontName: "Caligraphic-Regular"
  },
  mathfrak: {
    variant: "fraktur",
    fontName: "Fraktur-Regular"
  },
  mathscr: {
    variant: "script",
    fontName: "Script-Regular"
  },
  mathsf: {
    variant: "sans-serif",
    fontName: "SansSerif-Regular"
  },
  mathtt: {
    variant: "monospace",
    fontName: "Typewriter-Regular"
  }
}, fa = {
  //   path, width, height
  vec: ["vec", 0.471, 0.714],
  // values from the font glyph
  oiintSize1: ["oiintSize1", 0.957, 0.499],
  // oval to overlay the integrand
  oiintSize2: ["oiintSize2", 1.472, 0.659],
  oiiintSize1: ["oiiintSize1", 1.304, 0.499],
  oiiintSize2: ["oiiintSize2", 1.98, 0.659]
}, ma = function(e, t) {
  var [a, i, n] = fa[e], o = new X0(a), l = new N0([o], {
    width: W(i),
    height: W(n),
    // Override CSS rule `.katex svg { width: 100% }`
    style: "width:" + W(i),
    viewBox: "0 0 " + 1e3 * i + " " + 1e3 * n,
    preserveAspectRatio: "xMinYMin"
  }), s = $0(["overlay"], [l], t);
  return s.height = n, s.style.height = W(n), s.style.width = W(i), s;
}, h0 = {
  number: 3,
  unit: "mu"
}, J0 = {
  number: 4,
  unit: "mu"
}, O0 = {
  number: 5,
  unit: "mu"
}, En = {
  mord: {
    mop: h0,
    mbin: J0,
    mrel: O0,
    minner: h0
  },
  mop: {
    mord: h0,
    mop: h0,
    mrel: O0,
    minner: h0
  },
  mbin: {
    mord: J0,
    mop: J0,
    mopen: J0,
    minner: J0
  },
  mrel: {
    mord: O0,
    mop: O0,
    mopen: O0,
    minner: O0
  },
  mopen: {},
  mclose: {
    mop: h0,
    mbin: J0,
    mrel: O0,
    minner: h0
  },
  mpunct: {
    mord: h0,
    mop: h0,
    mrel: O0,
    mopen: h0,
    mclose: h0,
    mpunct: h0,
    minner: h0
  },
  minner: {
    mord: h0,
    mop: h0,
    mbin: J0,
    mrel: O0,
    mopen: h0,
    mpunct: h0,
    minner: h0
  }
}, zn = {
  mord: {
    mop: h0
  },
  mop: {
    mord: h0,
    mop: h0
  },
  mbin: {},
  mrel: {},
  mopen: {},
  mclose: {
    mop: h0
  },
  mpunct: {},
  minner: {
    mop: h0
  }
}, da = {}, Le = {}, Ge = {};
function X(r) {
  for (var {
    type: e,
    names: t,
    props: a,
    handler: i,
    htmlBuilder: n,
    mathmlBuilder: o
  } = r, l = {
    type: e,
    numArgs: a.numArgs,
    argTypes: a.argTypes,
    allowedInArgument: !!a.allowedInArgument,
    allowedInText: !!a.allowedInText,
    allowedInMath: a.allowedInMath === void 0 ? !0 : a.allowedInMath,
    numOptionalArgs: a.numOptionalArgs || 0,
    infix: !!a.infix,
    primitive: !!a.primitive,
    handler: i
  }, s = 0; s < t.length; ++s)
    da[t[s]] = l;
  e && (n && (Le[e] = n), o && (Ge[e] = o));
}
function te(r) {
  var {
    type: e,
    htmlBuilder: t,
    mathmlBuilder: a
  } = r;
  X({
    type: e,
    names: [],
    props: {
      numArgs: 0
    },
    handler() {
      throw new Error("Should never be called.");
    },
    htmlBuilder: t,
    mathmlBuilder: a
  });
}
var Ue = function(e) {
  return e.type === "ordgroup" && e.body.length === 1 ? e.body[0] : e;
}, m0 = function(e) {
  return e.type === "ordgroup" ? e.body : [e];
}, Tn = /* @__PURE__ */ new Set(["leftmost", "mbin", "mopen", "mrel", "mop", "mpunct"]), Dn = /* @__PURE__ */ new Set(["rightmost", "mrel", "mclose", "mpunct"]), Fn = {
  display: r0.DISPLAY,
  text: r0.TEXT,
  script: r0.SCRIPT,
  scriptscript: r0.SCRIPTSCRIPT
}, Rn = {
  mord: "mord",
  mop: "mop",
  mbin: "mbin",
  mrel: "mrel",
  mopen: "mopen",
  mclose: "mclose",
  mpunct: "mpunct",
  minner: "minner"
}, A0 = function(e, t, a, i) {
  i === void 0 && (i = [null, null]);
  for (var n = [], o = 0; o < e.length; o++) {
    var l = s0(e[o], t);
    if (l instanceof ue) {
      var s = l.children;
      n.push(...s);
    } else
      n.push(l);
  }
  if (ha(n), !a)
    return n;
  var h = t;
  if (e.length === 1) {
    var c = e[0];
    c.type === "sizing" ? h = t.havingSize(c.size) : c.type === "styling" && (h = t.havingStyle(Fn[c.style]));
  }
  var m = N([i[0] || "leftmost"], [], t), d = N([i[1] || "rightmost"], [], t), v = a === "root";
  return Tt(n, (b, g) => {
    var w = g.classes[0], B = b.classes[0];
    w === "mbin" && Dn.has(B) ? g.classes[0] = "mord" : B === "mbin" && Tn.has(w) && (b.classes[0] = "mord");
  }, {
    node: m
  }, d, v), Tt(n, (b, g) => {
    var w, B, M = Ft(g), _ = Ft(b), z = M && _ ? b.hasClass("mtight") ? (w = zn[M]) == null ? void 0 : w[_] : (B = En[M]) == null ? void 0 : B[_] : null;
    if (z)
      return ca(z, h);
  }, {
    node: m
  }, d, v), n;
}, Tt = function(e, t, a, i, n) {
  i && e.push(i);
  for (var o = 0; o < e.length; o++) {
    var l = e[o], s = pa(l);
    if (s) {
      Tt(s.children, t, a, null, n);
      continue;
    }
    var h = !l.hasClass("mspace");
    if (h) {
      var c = t(l, a.node);
      c && (a.insertAfter ? a.insertAfter(c) : (e.unshift(c), o++));
    }
    h ? a.node = l : n && l.hasClass("newline") && (a.node = N(["leftmost"])), a.insertAfter = /* @__PURE__ */ ((m) => (d) => {
      e.splice(m + 1, 0, d), o++;
    })(o);
  }
  i && e.pop();
}, pa = function(e) {
  return e instanceof ue || e instanceof je || e instanceof he && e.hasClass("enclosing") ? e : null;
}, Dt = function(e, t) {
  var a = pa(e);
  if (a) {
    var i = a.children;
    if (i.length) {
      if (t === "right")
        return Dt(i[i.length - 1], "right");
      if (t === "left")
        return Dt(i[0], "left");
    }
  }
  return e;
}, Ft = function(e, t) {
  if (!e)
    return null;
  t && (e = Dt(e, t));
  var a = e.classes[0];
  return Rn[a] || null;
}, Ae = function(e, t) {
  var a = ["nulldelimiter"].concat(e.baseSizingClasses());
  return N(t.concat(a));
}, s0 = function(e, t, a) {
  if (!e)
    return N();
  if (Le[e.type]) {
    var i = Le[e.type](e, t);
    if (a && t.size !== a.size) {
      i = N(t.sizingClasses(a), [i], t);
      var n = t.sizeMultiplier / a.sizeMultiplier;
      i.height *= n, i.depth *= n;
    }
    return i;
  } else
    throw new G("Got group of unknown type: '" + e.type + "'");
};
function ze(r, e) {
  var t = N(["base"], r, e), a = N(["strut"]);
  return a.style.height = W(t.height + t.depth), t.depth && (a.style.verticalAlign = W(-t.depth)), t.children.unshift(a), t;
}
function Rt(r, e) {
  var t = null;
  r.length === 1 && r[0].type === "tag" && (t = r[0].tag, r = r[0].body);
  var a = A0(r, e, "root"), i;
  a.length === 2 && a[1].hasClass("tag") && (i = a.pop());
  for (var n = [], o = [], l = 0; l < a.length; l++)
    if (o.push(a[l]), a[l].hasClass("mbin") || a[l].hasClass("mrel") || a[l].hasClass("allowbreak")) {
      for (var s = !1; l < a.length - 1 && a[l + 1].hasClass("mspace") && !a[l + 1].hasClass("newline"); )
        l++, o.push(a[l]), a[l].hasClass("nobreak") && (s = !0);
      s || (n.push(ze(o, e)), o = []);
    } else a[l].hasClass("newline") && (o.pop(), o.length > 0 && (n.push(ze(o, e)), o = []), n.push(a[l]));
  o.length > 0 && n.push(ze(o, e));
  var h;
  t ? (h = ze(A0(t, e, !0), e), h.classes = ["tag"], n.push(h)) : i && n.push(i);
  var c = N(["katex-html"], n);
  if (c.setAttribute("aria-hidden", "true"), h) {
    var m = h.children[0];
    m.style.height = W(c.height + c.depth), c.depth && (m.style.verticalAlign = W(-c.depth));
  }
  return c;
}
function va(r) {
  return new ue(r);
}
class U {
  constructor(e, t, a) {
    this.type = void 0, this.attributes = void 0, this.children = void 0, this.classes = void 0, this.type = e, this.attributes = {}, this.children = t || [], this.classes = a || [];
  }
  /**
   * Sets an attribute on a MathML node. MathML depends on attributes to convey a
   * semantic content, so this is used heavily.
   */
  setAttribute(e, t) {
    this.attributes[e] = t;
  }
  /**
   * Gets an attribute on a MathML node.
   */
  getAttribute(e) {
    return this.attributes[e];
  }
  /**
   * Converts the math node into a MathML-namespaced DOM element.
   */
  toNode() {
    var e = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type);
    for (var t in this.attributes)
      Object.prototype.hasOwnProperty.call(this.attributes, t) && e.setAttribute(t, this.attributes[t]);
    this.classes.length > 0 && (e.className = W0(this.classes));
    for (var a = 0; a < this.children.length; a++)
      if (this.children[a] instanceof d0 && this.children[a + 1] instanceof d0) {
        for (var i = this.children[a].toText() + this.children[++a].toText(); this.children[a + 1] instanceof d0; )
          i += this.children[++a].toText();
        e.appendChild(new d0(i).toNode());
      } else
        e.appendChild(this.children[a].toNode());
    return e;
  }
  /**
   * Converts the math node into an HTML markup string.
   */
  toMarkup() {
    var e = "<" + this.type;
    for (var t in this.attributes)
      Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="', e += b0(this.attributes[t]), e += '"');
    this.classes.length > 0 && (e += ' class ="' + b0(W0(this.classes)) + '"'), e += ">";
    for (var a = 0; a < this.children.length; a++)
      e += this.children[a].toMarkup();
    return e += "</" + this.type + ">", e;
  }
  /**
   * Converts the math node into a string, similar to innerText, but escaped.
   */
  toText() {
    return this.children.map((e) => e.toText()).join("");
  }
}
class d0 {
  constructor(e) {
    this.text = void 0, this.text = e;
  }
  /**
   * Converts the text node into a DOM text node.
   */
  toNode() {
    return document.createTextNode(this.text);
  }
  /**
   * Converts the text node into escaped HTML markup
   * (representing the text itself).
   */
  toMarkup() {
    return b0(this.toText());
  }
  /**
   * Converts the text node into a string
   * (representing the text itself).
   */
  toText() {
    return this.text;
  }
}
class Aa {
  /**
   * Create a Space node with width given in CSS ems.
   */
  constructor(e) {
    this.width = void 0, this.character = void 0, this.width = e, e >= 0.05555 && e <= 0.05556 ? this.character = " " : e >= 0.1666 && e <= 0.1667 ? this.character = " " : e >= 0.2222 && e <= 0.2223 ? this.character = " " : e >= 0.2777 && e <= 0.2778 ? this.character = "  " : e >= -0.05556 && e <= -0.05555 ? this.character = " ⁣" : e >= -0.1667 && e <= -0.1666 ? this.character = " ⁣" : e >= -0.2223 && e <= -0.2222 ? this.character = " ⁣" : e >= -0.2778 && e <= -0.2777 ? this.character = " ⁣" : this.character = null;
  }
  /**
   * Converts the math node into a MathML-namespaced DOM element.
   */
  toNode() {
    if (this.character)
      return document.createTextNode(this.character);
    var e = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mspace");
    return e.setAttribute("width", W(this.width)), e;
  }
  /**
   * Converts the math node into an HTML markup string.
   */
  toMarkup() {
    return this.character ? "<mtext>" + this.character + "</mtext>" : '<mspace width="' + W(this.width) + '"/>';
  }
  /**
   * Converts the math node into a string, similar to innerText.
   */
  toText() {
    return this.character ? this.character : " ";
  }
}
var Qn = /* @__PURE__ */ new Set(["\\imath", "\\jmath"]), On = /* @__PURE__ */ new Set(["mrow", "mtable"]), z0 = function(e, t, a) {
  return o0[t][e] && o0[t][e].replace && e.charCodeAt(0) !== 55349 && !(ua.hasOwnProperty(e) && a && (a.fontFamily && a.fontFamily.slice(4, 6) === "tt" || a.font && a.font.slice(4, 6) === "tt")) && (e = o0[t][e].replace), new d0(e);
}, $t = function(e) {
  return e.length === 1 ? e[0] : new U("mrow", e);
}, qn = {
  mathit: "italic",
  boldsymbol: (r) => r.type === "textord" ? "bold" : "bold-italic",
  mathbf: "bold",
  mathbb: "double-struck",
  mathsfit: "sans-serif-italic",
  mathfrak: "fraktur",
  mathscr: "script",
  mathcal: "script",
  mathsf: "sans-serif",
  mathtt: "monospace"
}, Vt = (r, e) => {
  if (r.mode === "text") {
    if (e.fontFamily === "texttt")
      return "monospace";
    if (e.fontFamily === "textsf")
      return e.fontShape === "textit" && e.fontWeight === "textbf" ? "sans-serif-bold-italic" : e.fontShape === "textit" ? "sans-serif-italic" : e.fontWeight === "textbf" ? "bold-sans-serif" : "sans-serif";
    if (e.fontShape === "textit" && e.fontWeight === "textbf")
      return "bold-italic";
    if (e.fontShape === "textit")
      return "italic";
    if (e.fontWeight === "textbf")
      return "bold";
  }
  var t = e.font;
  if (!t || t === "mathnormal")
    return null;
  var a = r.mode, i = qn[t];
  if (i)
    return typeof i == "function" ? i(r) : i;
  var n = r.text;
  if (Qn.has(n))
    return null;
  if (o0[a][n]) {
    var o = o0[a][n].replace;
    o && (n = o);
  }
  var l = zt[t].fontName;
  return Yt(n, l, a) ? zt[t].variant : null;
};
function ft(r) {
  if (!r)
    return !1;
  if (r.type === "mi" && r.children.length === 1) {
    var e = r.children[0];
    return e instanceof d0 && e.text === ".";
  } else if (r.type === "mo" && r.children.length === 1 && r.getAttribute("separator") === "true" && r.getAttribute("lspace") === "0em" && r.getAttribute("rspace") === "0em") {
    var t = r.children[0];
    return t instanceof d0 && t.text === ",";
  } else
    return !1;
}
var M0 = function(e, t, a) {
  if (e.length === 1) {
    var i = l0(e[0], t);
    return a && i instanceof U && i.type === "mo" && (i.setAttribute("lspace", "0em"), i.setAttribute("rspace", "0em")), [i];
  }
  for (var n = [], o, l = 0; l < e.length; l++) {
    var s = l0(e[l], t);
    if (s instanceof U && o instanceof U) {
      if (s.type === "mtext" && o.type === "mtext" && s.getAttribute("mathvariant") === o.getAttribute("mathvariant")) {
        o.children.push(...s.children);
        continue;
      } else if (s.type === "mn" && o.type === "mn") {
        o.children.push(...s.children);
        continue;
      } else if (ft(s) && o.type === "mn") {
        o.children.push(...s.children);
        continue;
      } else if (s.type === "mn" && ft(o))
        s.children = [...o.children, ...s.children], n.pop();
      else if ((s.type === "msup" || s.type === "msub") && s.children.length >= 1 && (o.type === "mn" || ft(o))) {
        var h = s.children[0];
        h instanceof U && h.type === "mn" && (h.children = [...o.children, ...h.children], n.pop());
      } else if (o.type === "mi" && o.children.length === 1) {
        var c = o.children[0];
        if (c instanceof d0 && c.text === "̸" && (s.type === "mo" || s.type === "mi" || s.type === "mn")) {
          var m = s.children[0];
          m instanceof d0 && m.text.length > 0 && (m.text = m.text.slice(0, 1) + "̸" + m.text.slice(1), n.pop());
        }
      }
    }
    n.push(s), o = s;
  }
  return n;
}, V0 = function(e, t, a) {
  return $t(M0(e, t, a));
}, l0 = function(e, t) {
  if (!e)
    return new U("mrow");
  if (Ge[e.type])
    return Ge[e.type](e, t);
  throw new G("Got group of unknown type: '" + e.type + "'");
};
function Cr(r, e, t, a, i) {
  var n = M0(r, t), o;
  n.length === 1 && n[0] instanceof U && On.has(n[0].type) ? o = n[0] : o = new U("mrow", n);
  var l = new U("annotation", [new d0(e)]);
  l.setAttribute("encoding", "application/x-tex");
  var s = new U("semantics", [o, l]), h = new U("math", [s]);
  h.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML"), a && h.setAttribute("display", "block");
  var c = i ? "katex" : "katex-mathml";
  return N([c], [h]);
}
var Pn = [
  // Each element contains [textsize, scriptsize, scriptscriptsize].
  // The size mappings are taken from TeX with \normalsize=10pt.
  [1, 1, 1],
  // size1: [5, 5, 5]              \tiny
  [2, 1, 1],
  // size2: [6, 5, 5]
  [3, 1, 1],
  // size3: [7, 5, 5]              \scriptsize
  [4, 2, 1],
  // size4: [8, 6, 5]              \footnotesize
  [5, 2, 1],
  // size5: [9, 6, 5]              \small
  [6, 3, 1],
  // size6: [10, 7, 5]             \normalsize
  [7, 4, 2],
  // size7: [12, 8, 6]             \large
  [8, 6, 3],
  // size8: [14.4, 10, 7]          \Large
  [9, 7, 6],
  // size9: [17.28, 12, 10]        \LARGE
  [10, 8, 7],
  // size10: [20.74, 14.4, 12]     \huge
  [11, 10, 9]
  // size11: [24.88, 20.74, 17.28] \HUGE
], Sr = [
  // fontMetrics.js:getGlobalMetrics also uses size indexes, so if
  // you change size indexes, change that function.
  0.5,
  0.6,
  0.7,
  0.8,
  0.9,
  1,
  1.2,
  1.44,
  1.728,
  2.074,
  2.488
], Mr = function(e, t) {
  return t.size < 2 ? e : Pn[e - 1][t.size - 1];
};
class q0 {
  constructor(e) {
    this.style = void 0, this.color = void 0, this.size = void 0, this.textSize = void 0, this.phantom = void 0, this.font = void 0, this.fontFamily = void 0, this.fontWeight = void 0, this.fontShape = void 0, this.sizeMultiplier = void 0, this.maxSize = void 0, this.minRuleThickness = void 0, this._fontMetrics = void 0, this.style = e.style, this.color = e.color, this.size = e.size || q0.BASESIZE, this.textSize = e.textSize || this.size, this.phantom = !!e.phantom, this.font = e.font || "", this.fontFamily = e.fontFamily || "", this.fontWeight = e.fontWeight || "", this.fontShape = e.fontShape || "", this.sizeMultiplier = Sr[this.size - 1], this.maxSize = e.maxSize, this.minRuleThickness = e.minRuleThickness, this._fontMetrics = void 0;
  }
  /**
   * Returns a new options object with the same properties as "this".  Properties
   * from "extension" will be copied to the new options object.
   */
  extend(e) {
    var t = {
      style: this.style,
      size: this.size,
      textSize: this.textSize,
      color: this.color,
      phantom: this.phantom,
      font: this.font,
      fontFamily: this.fontFamily,
      fontWeight: this.fontWeight,
      fontShape: this.fontShape,
      maxSize: this.maxSize,
      minRuleThickness: this.minRuleThickness
    };
    return Object.assign(t, e), new q0(t);
  }
  /**
   * Return an options object with the given style. If `this.style === style`,
   * returns `this`.
   */
  havingStyle(e) {
    return this.style === e ? this : this.extend({
      style: e,
      size: Mr(this.textSize, e)
    });
  }
  /**
   * Return an options object with a cramped version of the current style. If
   * the current style is cramped, returns `this`.
   */
  havingCrampedStyle() {
    return this.havingStyle(this.style.cramp());
  }
  /**
   * Return an options object with the given size and in at least `\textstyle`.
   * Returns `this` if appropriate.
   */
  havingSize(e) {
    return this.size === e && this.textSize === e ? this : this.extend({
      style: this.style.text(),
      size: e,
      textSize: e,
      sizeMultiplier: Sr[e - 1]
    });
  }
  /**
   * Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted,
   * changes to at least `\textstyle`.
   */
  havingBaseStyle(e) {
    e = e || this.style.text();
    var t = Mr(q0.BASESIZE, e);
    return this.size === t && this.textSize === q0.BASESIZE && this.style === e ? this : this.extend({
      style: e,
      size: t
    });
  }
  /**
   * Remove the effect of sizing changes such as \Huge.
   * Keep the effect of the current style, such as \scriptstyle.
   */
  havingBaseSizing() {
    var e;
    switch (this.style.id) {
      case 4:
      case 5:
        e = 3;
        break;
      case 6:
      case 7:
        e = 1;
        break;
      default:
        e = 6;
    }
    return this.extend({
      style: this.style.text(),
      size: e
    });
  }
  /**
   * Create a new options object with the given color.
   */
  withColor(e) {
    return this.extend({
      color: e
    });
  }
  /**
   * Create a new options object with "phantom" set to true.
   */
  withPhantom() {
    return this.extend({
      phantom: !0
    });
  }
  /**
   * Creates a new options object with the given math font or old text font.
   * @type {[type]}
   */
  withFont(e) {
    return this.extend({
      font: e
    });
  }
  /**
   * Create a new options objects with the given fontFamily.
   */
  withTextFontFamily(e) {
    return this.extend({
      fontFamily: e,
      font: ""
    });
  }
  /**
   * Creates a new options object with the given font weight
   */
  withTextFontWeight(e) {
    return this.extend({
      fontWeight: e,
      font: ""
    });
  }
  /**
   * Creates a new options object with the given font weight
   */
  withTextFontShape(e) {
    return this.extend({
      fontShape: e,
      font: ""
    });
  }
  /**
   * Return the CSS sizing classes required to switch from enclosing options
   * `oldOptions` to `this`. Returns an array of classes.
   */
  sizingClasses(e) {
    return e.size !== this.size ? ["sizing", "reset-size" + e.size, "size" + this.size] : [];
  }
  /**
   * Return the CSS sizing classes required to switch to the base size. Like
   * `this.havingSize(BASESIZE).sizingClasses(this)`.
   */
  baseSizingClasses() {
    return this.size !== q0.BASESIZE ? ["sizing", "reset-size" + this.size, "size" + q0.BASESIZE] : [];
  }
  /**
   * Return the font metrics for this size.
   */
  fontMetrics() {
    return this._fontMetrics || (this._fontMetrics = xn(this.size)), this._fontMetrics;
  }
  /**
   * Gets the CSS color of the current options object
   */
  getColor() {
    return this.phantom ? "transparent" : this.color;
  }
}
q0.BASESIZE = 6;
var ga = function(e) {
  return new q0({
    style: e.displayMode ? r0.DISPLAY : r0.TEXT,
    maxSize: e.maxSize,
    minRuleThickness: e.minRuleThickness
  });
}, ba = function(e, t) {
  if (t.displayMode) {
    var a = ["katex-display"];
    t.leqno && a.push("leqno"), t.fleqn && a.push("fleqn"), e = N(a, [e]);
  }
  return e;
}, Nn = function(e, t, a) {
  var i = ga(a), n;
  if (a.output === "mathml")
    return Cr(e, t, i, a.displayMode, !0);
  if (a.output === "html") {
    var o = Rt(e, i);
    n = N(["katex"], [o]);
  } else {
    var l = Cr(e, t, i, a.displayMode, !1), s = Rt(e, i);
    n = N(["katex"], [l, s]);
  }
  return ba(n, a);
}, Hn = function(e, t, a) {
  var i = ga(a), n = Rt(e, i), o = N(["katex"], [n]);
  return ba(o, a);
}, Ln = {
  widehat: "^",
  widecheck: "ˇ",
  widetilde: "~",
  utilde: "~",
  overleftarrow: "←",
  underleftarrow: "←",
  xleftarrow: "←",
  overrightarrow: "→",
  underrightarrow: "→",
  xrightarrow: "→",
  underbrace: "⏟",
  overbrace: "⏞",
  underbracket: "⎵",
  overbracket: "⎴",
  overgroup: "⏠",
  undergroup: "⏡",
  overleftrightarrow: "↔",
  underleftrightarrow: "↔",
  xleftrightarrow: "↔",
  Overrightarrow: "⇒",
  xRightarrow: "⇒",
  overleftharpoon: "↼",
  xleftharpoonup: "↼",
  overrightharpoon: "⇀",
  xrightharpoonup: "⇀",
  xLeftarrow: "⇐",
  xLeftrightarrow: "⇔",
  xhookleftarrow: "↩",
  xhookrightarrow: "↪",
  xmapsto: "↦",
  xrightharpoondown: "⇁",
  xleftharpoondown: "↽",
  xrightleftharpoons: "⇌",
  xleftrightharpoons: "⇋",
  xtwoheadleftarrow: "↞",
  xtwoheadrightarrow: "↠",
  xlongequal: "=",
  xtofrom: "⇄",
  xrightleftarrows: "⇄",
  xrightequilibrium: "⇌",
  // Not a perfect match.
  xleftequilibrium: "⇋",
  // None better available.
  "\\cdrightarrow": "→",
  "\\cdleftarrow": "←",
  "\\cdlongequal": "="
}, Xe = function(e) {
  var t = new U("mo", [new d0(Ln[e.replace(/^\\/, "")])]);
  return t.setAttribute("stretchy", "true"), t;
}, Gn = {
  //   path(s), minWidth, height, align
  overrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"],
  overleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"],
  underrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"],
  underleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"],
  xrightarrow: [["rightarrow"], 1.469, 522, "xMaxYMin"],
  "\\cdrightarrow": [["rightarrow"], 3, 522, "xMaxYMin"],
  // CD minwwidth2.5pc
  xleftarrow: [["leftarrow"], 1.469, 522, "xMinYMin"],
  "\\cdleftarrow": [["leftarrow"], 3, 522, "xMinYMin"],
  Overrightarrow: [["doublerightarrow"], 0.888, 560, "xMaxYMin"],
  xRightarrow: [["doublerightarrow"], 1.526, 560, "xMaxYMin"],
  xLeftarrow: [["doubleleftarrow"], 1.526, 560, "xMinYMin"],
  overleftharpoon: [["leftharpoon"], 0.888, 522, "xMinYMin"],
  xleftharpoonup: [["leftharpoon"], 0.888, 522, "xMinYMin"],
  xleftharpoondown: [["leftharpoondown"], 0.888, 522, "xMinYMin"],
  overrightharpoon: [["rightharpoon"], 0.888, 522, "xMaxYMin"],
  xrightharpoonup: [["rightharpoon"], 0.888, 522, "xMaxYMin"],
  xrightharpoondown: [["rightharpoondown"], 0.888, 522, "xMaxYMin"],
  xlongequal: [["longequal"], 0.888, 334, "xMinYMin"],
  "\\cdlongequal": [["longequal"], 3, 334, "xMinYMin"],
  xtwoheadleftarrow: [["twoheadleftarrow"], 0.888, 334, "xMinYMin"],
  xtwoheadrightarrow: [["twoheadrightarrow"], 0.888, 334, "xMaxYMin"],
  overleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522],
  overbrace: [["leftbrace", "midbrace", "rightbrace"], 1.6, 548],
  underbrace: [["leftbraceunder", "midbraceunder", "rightbraceunder"], 1.6, 548],
  underleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522],
  xleftrightarrow: [["leftarrow", "rightarrow"], 1.75, 522],
  xLeftrightarrow: [["doubleleftarrow", "doublerightarrow"], 1.75, 560],
  xrightleftharpoons: [["leftharpoondownplus", "rightharpoonplus"], 1.75, 716],
  xleftrightharpoons: [["leftharpoonplus", "rightharpoondownplus"], 1.75, 716],
  xhookleftarrow: [["leftarrow", "righthook"], 1.08, 522],
  xhookrightarrow: [["lefthook", "rightarrow"], 1.08, 522],
  overlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522],
  underlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522],
  overbracket: [["leftbracketover", "rightbracketover"], 1.6, 440],
  underbracket: [["leftbracketunder", "rightbracketunder"], 1.6, 410],
  overgroup: [["leftgroup", "rightgroup"], 0.888, 342],
  undergroup: [["leftgroupunder", "rightgroupunder"], 0.888, 342],
  xmapsto: [["leftmapsto", "rightarrow"], 1.5, 522],
  xtofrom: [["leftToFrom", "rightToFrom"], 1.75, 528],
  // The next three arrows are from the mhchem package.
  // In mhchem.sty, min-length is 2.0em. But these arrows might appear in the
  // document as \xrightarrow or \xrightleftharpoons. Those have
  // min-length = 1.75em, so we set min-length on these next three to match.
  xrightleftarrows: [["baraboveleftarrow", "rightarrowabovebar"], 1.75, 901],
  xrightequilibrium: [["baraboveshortleftharpoon", "rightharpoonaboveshortbar"], 1.75, 716],
  xleftequilibrium: [["shortbaraboveleftharpoon", "shortrightharpoonabovebar"], 1.75, 716]
}, Un = /* @__PURE__ */ new Set(["widehat", "widecheck", "widetilde", "utilde"]), $e = function(e, t) {
  function a() {
    var l = 4e5, s = e.label.slice(1);
    if (Un.has(s) && "base" in e) {
      var h = e.base.type === "ordgroup" ? e.base.body.length : 1, c, m, d;
      if (h > 5)
        s === "widehat" || s === "widecheck" ? (c = 420, l = 2364, d = 0.42, m = s + "4") : (c = 312, l = 2340, d = 0.34, m = "tilde4");
      else {
        var v = [1, 1, 2, 2, 3, 3][h];
        s === "widehat" || s === "widecheck" ? (l = [0, 1062, 2364, 2364, 2364][v], c = [0, 239, 300, 360, 420][v], d = [0, 0.24, 0.3, 0.3, 0.36, 0.42][v], m = s + v) : (l = [0, 600, 1033, 2339, 2340][v], c = [0, 260, 286, 306, 312][v], d = [0, 0.26, 0.286, 0.3, 0.306, 0.34][v], m = "tilde" + v);
      }
      var b = new X0(m), g = new N0([b], {
        width: "100%",
        height: W(d),
        viewBox: "0 0 " + l + " " + c,
        preserveAspectRatio: "none"
      });
      return {
        span: $0([], [g], t),
        minWidth: 0,
        height: d
      };
    } else {
      var w = [], B = Gn[s];
      if (!B)
        throw new Error('No SVG data for "' + s + '".');
      var [M, _, z] = B, D = z / 1e3, R = M.length, O, F;
      if (R === 1) {
        if (B.length !== 4)
          throw new Error('Expected 4-tuple for single-path SVG data "' + s + '".');
        O = ["hide-tail"], F = [B[3]];
      } else if (R === 2)
        O = ["halfarrow-left", "halfarrow-right"], F = ["xMinYMin", "xMaxYMin"];
      else if (R === 3)
        O = ["brace-left", "brace-center", "brace-right"], F = ["xMinYMin", "xMidYMin", "xMaxYMin"];
      else
        throw new Error(`Correct katexImagesData or update code here to support
                    ` + R + " children.");
      for (var Q = 0; Q < R; Q++) {
        var H = new X0(M[Q]), L = new N0([H], {
          width: "400em",
          height: W(D),
          viewBox: "0 0 " + l + " " + z,
          preserveAspectRatio: F[Q] + " slice"
        }), K = $0([O[Q]], [L], t);
        if (R === 1)
          return {
            span: K,
            minWidth: _,
            height: D
          };
        K.style.height = W(D), w.push(K);
      }
      return {
        span: N(["stretchy"], w, t),
        minWidth: _,
        height: D
      };
    }
  }
  var {
    span: i,
    minWidth: n,
    height: o
  } = a();
  return i.height = o, i.style.height = W(o), n > 0 && (i.style.minWidth = W(n)), i;
}, jn = function(e, t, a, i, n) {
  var o, l = e.height + e.depth + a + i;
  if (/fbox|color|angl/.test(t)) {
    if (o = N(["stretchy", t], [], n), t === "fbox") {
      var s = n.color && n.getColor();
      s && (o.style.borderColor = s);
    }
  } else {
    var h = [];
    /^[bx]cancel$/.test(t) && h.push(new kt({
      x1: "0",
      y1: "0",
      x2: "100%",
      y2: "100%",
      "stroke-width": "0.046em"
    })), /^x?cancel$/.test(t) && h.push(new kt({
      x1: "0",
      y1: "100%",
      x2: "100%",
      y2: "0",
      "stroke-width": "0.046em"
    }));
    var c = new N0(h, {
      width: "100%",
      height: W(l)
    });
    o = $0([], [c], n);
  }
  return o.height = l, o.style.height = W(l), o;
}, Yn = {
  bin: 1,
  close: 1,
  inner: 1,
  open: 1,
  punct: 1,
  rel: 1
}, Wn = {
  "accent-token": 1,
  mathord: 1,
  "op-token": 1,
  spacing: 1,
  textord: 1
};
function Xn(r) {
  return r in Yn;
}
function i0(r, e) {
  if (!r || r.type !== e)
    throw new Error("Expected node of type " + e + ", but got " + (r ? "node of type " + r.type : String(r)));
  return r;
}
function Ve(r) {
  var e = Ze(r);
  if (!e)
    throw new Error("Expected node of symbol group type, but got " + (r ? "node of type " + r.type : String(r)));
  return e;
}
function Ze(r) {
  return r && (r.type === "atom" || Wn.hasOwnProperty(r.type)) ? r : null;
}
var ya = (r) => {
  if (r instanceof C0)
    return r;
  if (wn(r) && r.children.length === 1)
    return ya(r.children[0]);
}, Zt = (r, e) => {
  var t, a, i;
  r && r.type === "supsub" ? (a = i0(r.base, "accent"), t = a.base, r.base = t, i = yn(s0(r, e)), r.base = a) : (a = i0(r, "accent"), t = a.base);
  var n = s0(t, e.havingCrampedStyle()), o = a.isShifty && H0(t), l = 0;
  if (o) {
    var s, h;
    l = (s = (h = ya(n)) == null ? void 0 : h.skew) != null ? s : 0;
  }
  var c = a.label === "\\c", m = c ? n.height + n.depth : Math.min(n.height, e.fontMetrics().xHeight), d;
  if (a.isStretchy)
    d = $e(a, e), d = n0({
      positionType: "firstBaseline",
      children: [{
        type: "elem",
        elem: n
      }, {
        type: "elem",
        elem: d,
        wrapperClasses: ["svg-align"],
        wrapperStyle: l > 0 ? {
          width: "calc(100% - " + W(2 * l) + ")",
          marginLeft: W(2 * l)
        } : void 0
      }]
    });
  else {
    var v, b;
    a.label === "\\vec" ? (v = ma("vec", e), b = fa.vec[1]) : (v = We({
      mode: a.mode,
      text: a.label
    }, e, "textord"), v = bn(v), v.italic = 0, b = v.width, c && (m += v.depth)), d = N(["accent-body"], [v]);
    var g = a.label === "\\textcircled";
    g && (d.classes.push("accent-full"), m = n.height);
    var w = l;
    g || (w -= b / 2), d.style.left = W(w), a.label === "\\textcircled" && (d.style.top = ".2em"), d = n0({
      positionType: "firstBaseline",
      children: [{
        type: "elem",
        elem: n
      }, {
        type: "kern",
        size: -m
      }, {
        type: "elem",
        elem: d
      }]
    });
  }
  var B = N(["mord", "accent"], [d], e);
  return i ? (i.children[0] = B, i.height = Math.max(B.height, i.height), i.classes[0] = "mord", i) : B;
}, wa = (r, e) => {
  var t = r.isStretchy ? Xe(r.label) : new U("mo", [z0(r.label, r.mode)]), a = new U("mover", [l0(r.base, e), t]);
  return a.setAttribute("accent", "true"), a;
}, $n = new RegExp(["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring"].map((r) => "\\" + r).join("|"));
X({
  type: "accent",
  names: ["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring", "\\widecheck", "\\widehat", "\\widetilde", "\\overrightarrow", "\\overleftarrow", "\\Overrightarrow", "\\overleftrightarrow", "\\overgroup", "\\overlinesegment", "\\overleftharpoon", "\\overrightharpoon"],
  props: {
    numArgs: 1
  },
  handler: (r, e) => {
    var t = Ue(e[0]), a = !$n.test(r.funcName), i = !a || r.funcName === "\\widehat" || r.funcName === "\\widetilde" || r.funcName === "\\widecheck";
    return {
      type: "accent",
      mode: r.parser.mode,
      label: r.funcName,
      isStretchy: a,
      isShifty: i,
      base: t
    };
  },
  htmlBuilder: Zt,
  mathmlBuilder: wa
});
X({
  type: "accent",
  names: ["\\'", "\\`", "\\^", "\\~", "\\=", "\\u", "\\.", '\\"', "\\c", "\\r", "\\H", "\\v", "\\textcircled"],
  props: {
    numArgs: 1,
    allowedInText: !0,
    allowedInMath: !0,
    // unless in strict mode
    argTypes: ["primitive"]
  },
  handler: (r, e) => {
    var t = e[0], a = r.parser.mode;
    return a === "math" && (r.parser.settings.reportNonstrict("mathVsTextAccents", "LaTeX's accent " + r.funcName + " works only in text mode"), a = "text"), {
      type: "accent",
      mode: a,
      label: r.funcName,
      isStretchy: !1,
      isShifty: !0,
      base: t
    };
  },
  htmlBuilder: Zt,
  mathmlBuilder: wa
});
X({
  type: "accentUnder",
  names: ["\\underleftarrow", "\\underrightarrow", "\\underleftrightarrow", "\\undergroup", "\\underlinesegment", "\\utilde"],
  props: {
    numArgs: 1
  },
  handler: (r, e) => {
    var {
      parser: t,
      funcName: a
    } = r, i = e[0];
    return {
      type: "accentUnder",
      mode: t.mode,
      label: a,
      base: i
    };
  },
  htmlBuilder: (r, e) => {
    var t = s0(r.base, e), a = $e(r, e), i = r.label === "\\utilde" ? 0.12 : 0, n = n0({
      positionType: "top",
      positionData: t.height,
      children: [{
        type: "elem",
        elem: a,
        wrapperClasses: ["svg-align"]
      }, {
        type: "kern",
        size: i
      }, {
        type: "elem",
        elem: t
      }]
    });
    return N(["mord", "accentunder"], [n], e);
  },
  mathmlBuilder: (r, e) => {
    var t = Xe(r.label), a = new U("munder", [l0(r.base, e), t]);
    return a.setAttribute("accentunder", "true"), a;
  }
});
var Te = (r) => {
  var e = new U("mpadded", r ? [r] : []);
  return e.setAttribute("width", "+0.6em"), e.setAttribute("lspace", "0.3em"), e;
};
X({
  type: "xArrow",
  names: [
    "\\xleftarrow",
    "\\xrightarrow",
    "\\xLeftarrow",
    "\\xRightarrow",
    "\\xleftrightarrow",
    "\\xLeftrightarrow",
    "\\xhookleftarrow",
    "\\xhookrightarrow",
    "\\xmapsto",
    "\\xrightharpoondown",
    "\\xrightharpoonup",
    "\\xleftharpoondown",
    "\\xleftharpoonup",
    "\\xrightleftharpoons",
    "\\xleftrightharpoons",
    "\\xlongequal",
    "\\xtwoheadrightarrow",
    "\\xtwoheadleftarrow",
    "\\xtofrom",
    // The next 3 functions are here to support the mhchem extension.
    // Direct use of these functions is discouraged and may break someday.
    "\\xrightleftarrows",
    "\\xrightequilibrium",
    "\\xleftequilibrium",
    // The next 3 functions are here only to support the {CD} environment.
    "\\\\cdrightarrow",
    "\\\\cdleftarrow",
    "\\\\cdlongequal"
  ],
  props: {
    numArgs: 1,
    numOptionalArgs: 1
  },
  handler(r, e, t) {
    var {
      parser: a,
      funcName: i
    } = r;
    return {
      type: "xArrow",
      mode: a.mode,
      label: i,
      body: e[0],
      below: t[0]
    };
  },
  htmlBuilder(r, e) {
    var t = e.style, a = e.havingStyle(t.sup()), i = oe(s0(r.body, a, e), e), n = r.label.slice(0, 2) === "\\x" ? "x" : "cd";
    i.classes.push(n + "-arrow-pad");
    var o;
    r.below && (a = e.havingStyle(t.sub()), o = oe(s0(r.below, a, e), e), o.classes.push(n + "-arrow-pad"));
    var l = $e(r, e), s = -e.fontMetrics().axisHeight + 0.5 * l.height, h = -e.fontMetrics().axisHeight - 0.5 * l.height - 0.111;
    (i.depth > 0.25 || r.label === "\\xleftequilibrium") && (h -= i.depth);
    var c;
    if (o) {
      var m = -e.fontMetrics().axisHeight + o.height + 0.5 * l.height + 0.111;
      c = n0({
        positionType: "individualShift",
        children: [{
          type: "elem",
          elem: i,
          shift: h
        }, {
          type: "elem",
          elem: l,
          shift: s,
          wrapperClasses: ["svg-align"]
        }, {
          type: "elem",
          elem: o,
          shift: m
        }]
      });
    } else
      c = n0({
        positionType: "individualShift",
        children: [{
          type: "elem",
          elem: i,
          shift: h
        }, {
          type: "elem",
          elem: l,
          shift: s,
          wrapperClasses: ["svg-align"]
        }]
      });
    return N(["mrel", "x-arrow"], [c], e);
  },
  mathmlBuilder(r, e) {
    var t = Xe(r.label);
    t.setAttribute("minsize", r.label.charAt(0) === "x" ? "1.75em" : "3.0em");
    var a;
    if (r.body) {
      var i = Te(l0(r.body, e));
      if (r.below) {
        var n = Te(l0(r.below, e));
        a = new U("munderover", [t, n, i]);
      } else
        a = new U("mover", [t, i]);
    } else if (r.below) {
      var o = Te(l0(r.below, e));
      a = new U("munder", [t, o]);
    } else
      a = Te(), a = new U("mover", [t, a]);
    return a;
  }
});
function xa(r, e) {
  var t = A0(r.body, e, !0);
  return N([r.mclass], t, e);
}
function Ia(r, e) {
  var t, a = M0(r.body, e);
  return r.mclass === "minner" ? t = new U("mpadded", a) : r.mclass === "mord" ? r.isCharacterBox ? (t = a[0], t.type = "mi") : t = new U("mi", a) : (r.isCharacterBox ? (t = a[0], t.type = "mo") : t = new U("mo", a), r.mclass === "mbin" ? (t.attributes.lspace = "0.22em", t.attributes.rspace = "0.22em") : r.mclass === "mpunct" ? (t.attributes.lspace = "0em", t.attributes.rspace = "0.17em") : r.mclass === "mopen" || r.mclass === "mclose" ? (t.attributes.lspace = "0em", t.attributes.rspace = "0em") : r.mclass === "minner" && (t.attributes.lspace = "0.0556em", t.attributes.width = "+0.1111em")), t;
}
X({
  type: "mclass",
  names: ["\\mathord", "\\mathbin", "\\mathrel", "\\mathopen", "\\mathclose", "\\mathpunct", "\\mathinner"],
  props: {
    numArgs: 1,
    primitive: !0
  },
  handler(r, e) {
    var {
      parser: t,
      funcName: a
    } = r, i = e[0];
    return {
      type: "mclass",
      mode: t.mode,
      mclass: "m" + a.slice(5),
      // TODO(kevinb): don't prefix with 'm'
      body: m0(i),
      isCharacterBox: H0(i)
    };
  },
  htmlBuilder: xa,
  mathmlBuilder: Ia
});
var Ke = (r) => {
  var e = r.type === "ordgroup" && r.body.length ? r.body[0] : r;
  return e.type === "atom" && (e.family === "bin" || e.family === "rel") ? "m" + e.family : "mord";
};
X({
  type: "mclass",
  names: ["\\@binrel"],
  props: {
    numArgs: 2
  },
  handler(r, e) {
    var {
      parser: t
    } = r;
    return {
      type: "mclass",
      mode: t.mode,
      mclass: Ke(e[0]),
      body: m0(e[1]),
      isCharacterBox: H0(e[1])
    };
  }
});
X({
  type: "mclass",
  names: ["\\stackrel", "\\overset", "\\underset"],
  props: {
    numArgs: 2
  },
  handler(r, e) {
    var {
      parser: t,
      funcName: a
    } = r, i = e[1], n = e[0], o;
    a !== "\\stackrel" ? o = Ke(i) : o = "mrel";
    var l = {
      type: "op",
      mode: i.mode,
      limits: !0,
      alwaysHandleSupSub: !0,
      parentIsSupSub: !1,
      symbol: !1,
      suppressBaseShift: a !== "\\stackrel",
      body: m0(i)
    }, s = {
      type: "supsub",
      mode: n.mode,
      base: l,
      sup: a === "\\underset" ? null : n,
      sub: a === "\\underset" ? n : null
    };
    return {
      type: "mclass",
      mode: t.mode,
      mclass: o,
      body: [s],
      isCharacterBox: H0(s)
    };
  },
  htmlBuilder: xa,
  mathmlBuilder: Ia
});
X({
  type: "pmb",
  names: ["\\pmb"],
  props: {
    numArgs: 1,
    allowedInText: !0
  },
  handler(r, e) {
    var {
      parser: t
    } = r;
    return {
      type: "pmb",
      mode: t.mode,
      mclass: Ke(e[0]),
      body: m0(e[0])
    };
  },
  htmlBuilder(r, e) {
    var t = A0(r.body, e, !0), a = N([r.mclass], t, e);
    return a.style.textShadow = "0.02em 0.01em 0.04px", a;
  },
  mathmlBuilder(r, e) {
    var t = M0(r.body, e), a = new U("mstyle", t);
    return a.setAttribute("style", "text-shadow: 0.02em 0.01em 0.04px"), a;
  }
});
var Vn = {
  ">": "\\\\cdrightarrow",
  "<": "\\\\cdleftarrow",
  "=": "\\\\cdlongequal",
  A: "\\uparrow",
  V: "\\downarrow",
  "|": "\\Vert",
  ".": "no arrow"
}, Er = () => ({
  type: "styling",
  body: [],
  mode: "math",
  style: "display",
  resetFont: !0
}), zr = (r) => r.type === "textord" && r.text === "@", Zn = (r, e) => (r.type === "mathord" || r.type === "atom") && r.text === e;
function Kn(r, e, t) {
  var a = Vn[r];
  switch (a) {
    case "\\\\cdrightarrow":
    case "\\\\cdleftarrow":
      return t.callFunction(a, [e[0]], [e[1]]);
    case "\\uparrow":
    case "\\downarrow": {
      var i = t.callFunction("\\\\cdleft", [e[0]], []), n = {
        type: "atom",
        text: a,
        mode: "math",
        family: "rel"
      }, o = t.callFunction("\\Big", [n], []), l = t.callFunction("\\\\cdright", [e[1]], []), s = {
        type: "ordgroup",
        mode: "math",
        body: [i, o, l]
      };
      return t.callFunction("\\\\cdparent", [s], []);
    }
    case "\\\\cdlongequal":
      return t.callFunction("\\\\cdlongequal", [], []);
    case "\\Vert": {
      var h = {
        type: "textord",
        text: "\\Vert",
        mode: "math"
      };
      return t.callFunction("\\Big", [h], []);
    }
    default:
      return {
        type: "textord",
        text: " ",
        mode: "math"
      };
  }
}
function Jn(r) {
  var e = [];
  for (r.gullet.beginGroup(), r.gullet.macros.set("\\cr", "\\\\\\relax"), r.gullet.beginGroup(); ; ) {
    e.push(r.parseExpression(!1, "\\\\")), r.gullet.endGroup(), r.gullet.beginGroup();
    var t = r.fetch().text;
    if (t === "&" || t === "\\\\")
      r.consume();
    else if (t === "\\end") {
      e[e.length - 1].length === 0 && e.pop();
      break;
    } else
      throw new G("Expected \\\\ or \\cr or \\end", r.nextToken);
  }
  for (var a = [], i = [a], n = 0; n < e.length; n++) {
    for (var o = e[n], l = Er(), s = 0; s < o.length; s++)
      if (!zr(o[s]))
        l.body.push(o[s]);
      else {
        a.push(l), s += 1;
        var h = Ve(o[s]).text, c = new Array(2);
        if (c[0] = {
          type: "ordgroup",
          mode: "math",
          body: []
        }, c[1] = {
          type: "ordgroup",
          mode: "math",
          body: []
        }, !"=|.".includes(h)) if ("<>AV".includes(h))
          for (var m = 0; m < 2; m++) {
            for (var d = !0, v = s + 1; v < o.length; v++) {
              if (Zn(o[v], h)) {
                d = !1, s = v;
                break;
              }
              if (zr(o[v]))
                throw new G("Missing a " + h + " character to complete a CD arrow.", o[v]);
              c[m].body.push(o[v]);
            }
            if (d)
              throw new G("Missing a " + h + " character to complete a CD arrow.", o[s]);
          }
        else
          throw new G('Expected one of "<>AV=|." after @', o[s]);
        var b = Kn(h, c, r), g = {
          type: "styling",
          body: [b],
          mode: "math",
          style: "display",
          // CD is always displaystyle.
          resetFont: !0
        };
        a.push(g), l = Er();
      }
    n % 2 === 0 ? a.push(l) : a.shift(), a = [], i.push(a);
  }
  r.gullet.endGroup(), r.gullet.endGroup();
  var w = new Array(i[0].length).fill({
    type: "align",
    align: "c",
    pregap: 0.25,
    // CD package sets \enskip between columns.
    postgap: 0.25
    // So pre and post each get half an \enskip, i.e. 0.25em.
  });
  return {
    type: "array",
    mode: "math",
    body: i,
    arraystretch: 1,
    addJot: !0,
    rowGaps: [null],
    cols: w,
    colSeparationType: "CD",
    hLinesBeforeRow: new Array(i.length + 1).fill([])
  };
}
X({
  type: "cdlabel",
  names: ["\\\\cdleft", "\\\\cdright"],
  props: {
    numArgs: 1
  },
  handler(r, e) {
    var {
      parser: t,
      funcName: a
    } = r;
    return {
      type: "cdlabel",
      mode: t.mode,
      side: a.slice(4),
      label: e[0]
    };
  },
  htmlBuilder(r, e) {
    var t = e.havingStyle(e.style.sup()), a = oe(s0(r.label, t, e), e);
    return a.classes.push("cd-label-" + r.side), a.style.bottom = W(0.8 - a.depth), a.height = 0, a.depth = 0, a;
  },
  mathmlBuilder(r, e) {
    var t = new U("mrow", [l0(r.label, e)]);
    return t = new U("mpadded", [t]), t.setAttribute("width", "0"), r.side === "left" && t.setAttribute("lspace", "-1width"), t.setAttribute("voffset", "0.7em"), t = new U("mstyle", [t]), t.setAttribute("displaystyle", "false"), t.setAttribute("scriptlevel", "1"), t;
  }
});
X({
  type: "cdlabelparent",
  names: ["\\\\cdparent"],
  props: {
    numArgs: 1
  },
  handler(r, e) {
    var {
      parser: t
    } = r;
    return {
      type: "cdlabelparent",
      mode: t.mode,
      fragment: e[0]
    };
  },
  htmlBuilder(r, e) {
    var t = oe(s0(r.fragment, e), e);
    return t.classes.push("cd-vert-arrow"), t;
  },
  mathmlBuilder(r, e) {
    return new U("mrow", [l0(r.fragment, e)]);
  }
});
X({
  type: "textord",
  names: ["\\@char"],
  props: {
    numArgs: 1,
    allowedInText: !0
  },
  handler(r, e) {
    for (var {
      parser: t
    } = r, a = i0(e[0], "ordgroup"), i = a.body, n = "", o = 0; o < i.length; o++) {
      var l = i0(i[o], "textord");
      n += l.text;
    }
    var s = parseInt(n), h;
    if (isNaN(s))
      throw new G("\\@char has non-numeric argument " + n);
    if (s < 0 || s >= 1114111)
      throw new G("\\@char with invalid code point " + n);
    return s <= 65535 ? h = String.fromCharCode(s) : (s -= 65536, h = String.fromCharCode((s >> 10) + 55296, (s & 1023) + 56320)), {
      type: "textord",
      mode: t.mode,
      text: h
    };
  }
});
var Ba = (r, e) => {
  var t = A0(r.body, e.withColor(r.color), !1);
  return G0(t);
}, ka = (r, e) => {
  var t = M0(r.body, e.withColor(r.color)), a = new U("mstyle", t);
  return a.setAttribute("mathcolor", r.color), a;
};
X({
  type: "color",
  names: ["\\textcolor"],
  props: {
    numArgs: 2,
    allowedInText: !0,
    argTypes: ["color", "original"]
  },
  handler(r, e) {
    var {
      parser: t
    } = r, a = i0(e[0], "color-token").color, i = e[1];
    return {
      type: "color",
      mode: t.mode,
      color: a,
      body: m0(i)
    };
  },
  htmlBuilder: Ba,
  mathmlBuilder: ka
});
X({
  type: "color",
  names: ["\\color"],
  props: {
    numArgs: 1,
    allowedInText: !0,
    argTypes: ["color"]
  },
  handler(r, e) {
    var {
      parser: t,
      breakOnTokenText: a
    } = r, i = i0(e[0], "color-token").color;
    t.gullet.macros.set("\\current@color", i);
    var n = t.parseExpression(!0, a);
    return {
      type: "color",
      mode: t.mode,
      color: i,
      body: n
    };
  },
  htmlBuilder: Ba,
  mathmlBuilder: ka
});
X({
  type: "cr",
  names: ["\\\\"],
  props: {
    numArgs: 0,
    numOptionalArgs: 0,
    allowedInText: !0
  },
  handler(r, e, t) {
    var {
      parser: a
    } = r, i = a.gullet.future().text === "[" ? a.parseSizeGroup(!0) : null, n = !a.settings.displayMode || !a.settings.useStrictBehavior("newLineInDisplayMode", "In LaTeX, \\\\ or \\newline does nothing in display mode");
    return {
      type: "cr",
      mode: a.mode,
      newLine: n,
      size: i && i0(i, "size").value
    };
  },
  // The following builders are called only at the top level,
  // not within tabular/array environments.
  htmlBuilder(r, e) {
    var t = N(["mspace"], [], e);
    return r.newLine && (t.classes.push("newline"), r.size && (t.style.marginTop = W(c0(r.size, e)))), t;
  },
  mathmlBuilder(r, e) {
    var t = new U("mspace");
    return r.newLine && (t.setAttribute("linebreak", "newline"), r.size && t.setAttribute("height", W(c0(r.size, e)))), t;
  }
});
var Qt = {
  "\\global": "\\global",
  "\\long": "\\\\globallong",
  "\\\\globallong": "\\\\globallong",
  "\\def": "\\gdef",
  "\\gdef": "\\gdef",
  "\\edef": "\\xdef",
  "\\xdef": "\\xdef",
  "\\let": "\\\\globallet",
  "\\futurelet": "\\\\globalfuture"
}, _a = (r) => {
  var e = r.text;
  if (/^(?:[\\{}$&#^_]|EOF)$/.test(e))
    throw new G("Expected a control sequence", r);
  return e;
}, es = (r) => {
  var e = r.gullet.popToken();
  return e.text === "=" && (e = r.gullet.popToken(), e.text === " " && (e = r.gullet.popToken())), e;
}, Ca = (r, e, t, a) => {
  var i = r.gullet.macros.get(t.text);
  i == null && (t.noexpand = !0, i = {
    tokens: [t],
    numArgs: 0,
    // reproduce the same behavior in expansion
    unexpandable: !r.gullet.isExpandable(t.text)
  }), r.gullet.macros.set(e, i, a);
};
X({
  type: "internal",
  names: [
    "\\global",
    "\\long",
    "\\\\globallong"
    // can’t be entered directly
  ],
  props: {
    numArgs: 0,
    allowedInText: !0
  },
  handler(r) {
    var {
      parser: e,
      funcName: t
    } = r;
    e.consumeSpaces();
    var a = e.fetch();
    if (Qt[a.text])
      return (t === "\\global" || t === "\\\\globallong") && (a.text = Qt[a.text]), i0(e.parseFunction(), "internal");
    throw new G("Invalid token after macro prefix", a);
  }
});
X({
  type: "internal",
  names: ["\\def", "\\gdef", "\\edef", "\\xdef"],
  props: {
    numArgs: 0,
    allowedInText: !0,
    primitive: !0
  },
  handler(r) {
    var {
      parser: e,
      funcName: t
    } = r, a = e.gullet.popToken(), i = a.text;
    if (/^(?:[\\{}$&#^_]|EOF)$/.test(i))
      throw new G("Expected a control sequence", a);
    for (var n = 0, o, l = [[]]; e.gullet.future().text !== "{"; )
      if (a = e.gullet.popToken(), a.text === "#") {
        if (e.gullet.future().text === "{") {
          o = e.gullet.future(), l[n].push("{");
          break;
        }
        if (a = e.gullet.popToken(), !/^[1-9]$/.test(a.text))
          throw new G('Invalid argument number "' + a.text + '"');
        if (parseInt(a.text) !== n + 1)
          throw new G('Argument number "' + a.text + '" out of order');
        n++, l.push([]);
      } else {
        if (a.text === "EOF")
          throw new G("Expected a macro definition");
        l[n].push(a.text);
      }
    var {
      tokens: s
    } = e.gullet.consumeArg();
    return o && s.unshift(o), (t === "\\edef" || t === "\\xdef") && (s = e.gullet.expandTokens(s), s.reverse()), e.gullet.macros.set(i, {
      tokens: s,
      numArgs: n,
      delimiters: l
    }, t === Qt[t]), {
      type: "internal",
      mode: e.mode
    };
  }
});
X({
  type: "internal",
  names: [
    "\\let",
    "\\\\globallet"
    // can’t be entered directly
  ],
  props: {
    numArgs: 0,
    allowedInText: !0,
    primitive: !0
  },
  handler(r) {
    var {
      parser: e,
      funcName: t
    } = r, a = _a(e.gullet.popToken());
    e.gullet.consumeSpaces();
    var i = es(e);
    return Ca(e, a, i, t === "\\\\globallet"), {
      type: "internal",
      mode: e.mode
    };
  }
});
X({
  type: "internal",
  names: [
    "\\futurelet",
    "\\\\globalfuture"
    // can’t be entered directly
  ],
  props: {
    numArgs: 0,
    allowedInText: !0,
    primitive: !0
  },
  handler(r) {
    var {
      parser: e,
      funcName: t
    } = r, a = _a(e.gullet.popToken()), i = e.gullet.popToken(), n = e.gullet.popToken();
    return Ca(e, a, n, t === "\\\\globalfuture"), e.gullet.pushToken(n), e.gullet.pushToken(i), {
      type: "internal",
      mode: e.mode
    };
  }
});
var de = function(e, t, a) {
  var i = o0.math[e] && o0.math[e].replace, n = Yt(i || e, t, a);
  if (!n)
    throw new Error("Unsupported symbol " + e + " and font size " + t + ".");
  return n;
}, Kt = function(e, t, a, i) {
  var n = a.havingBaseStyle(t), o = N(i.concat(n.sizingClasses(a)), [e], a), l = n.sizeMultiplier / a.sizeMultiplier;
  return o.height *= l, o.depth *= l, o.maxFontSize = n.sizeMultiplier, o;
}, Sa = function(e, t, a) {
  var i = t.havingBaseStyle(a), n = (1 - t.sizeMultiplier / i.sizeMultiplier) * t.fontMetrics().axisHeight;
  e.classes.push("delimcenter"), e.style.top = W(n), e.height -= n, e.depth += n;
}, ts = function(e, t, a, i, n, o) {
  var l = x0(e, "Main-Regular", n, i), s = Kt(l, t, i, o);
  return Sa(s, i, t), s;
}, rs = function(e, t, a, i) {
  return x0(e, "Size" + t + "-Regular", a, i);
}, Ma = function(e, t, a, i, n, o) {
  var l = rs(e, t, n, i), s = Kt(N(["delimsizing", "size" + t], [l], i), r0.TEXT, i, o);
  return a && Sa(s, i, r0.TEXT), s;
}, mt = function(e, t, a) {
  var i;
  t === "Size1-Regular" ? i = "delim-size1" : i = "delim-size4";
  var n = N(["delimsizinginner", i], [N([], [x0(e, t, a)])]);
  return {
    type: "elem",
    elem: n
  };
}, dt = function(e, t, a) {
  var i = D0["Size4-Regular"][e.charCodeAt(0)] ? D0["Size4-Regular"][e.charCodeAt(0)][4] : D0["Size1-Regular"][e.charCodeAt(0)][4], n = new X0("inner", fn(e, Math.round(1e3 * t))), o = new N0([n], {
    width: W(i),
    height: W(t),
    // Override CSS rule `.katex svg { width: 100% }`
    style: "width:" + W(i),
    viewBox: "0 0 " + 1e3 * i + " " + Math.round(1e3 * t),
    preserveAspectRatio: "xMinYMin"
  }), l = $0([], [o], a);
  return l.height = t, l.style.height = W(t), l.style.width = W(i), {
    type: "elem",
    elem: l
  };
}, Ot = 8e-3, De = {
  type: "kern",
  size: -1 * Ot
}, as = /* @__PURE__ */ new Set(["|", "\\lvert", "\\rvert", "\\vert"]), is = /* @__PURE__ */ new Set(["\\|", "\\lVert", "\\rVert", "\\Vert"]), Ea = function(e, t, a, i, n, o) {
  var l, s, h, c, m = "", d = 0;
  l = h = c = e, s = null;
  var v = "Size1-Regular";
  e === "\\uparrow" ? h = c = "⏐" : e === "\\Uparrow" ? h = c = "‖" : e === "\\downarrow" ? l = h = "⏐" : e === "\\Downarrow" ? l = h = "‖" : e === "\\updownarrow" ? (l = "\\uparrow", h = "⏐", c = "\\downarrow") : e === "\\Updownarrow" ? (l = "\\Uparrow", h = "‖", c = "\\Downarrow") : as.has(e) ? (h = "∣", m = "vert", d = 333) : is.has(e) ? (h = "∥", m = "doublevert", d = 556) : e === "[" || e === "\\lbrack" ? (l = "⎡", h = "⎢", c = "⎣", v = "Size4-Regular", m = "lbrack", d = 667) : e === "]" || e === "\\rbrack" ? (l = "⎤", h = "⎥", c = "⎦", v = "Size4-Regular", m = "rbrack", d = 667) : e === "\\lfloor" || e === "⌊" ? (h = l = "⎢", c = "⎣", v = "Size4-Regular", m = "lfloor", d = 667) : e === "\\lceil" || e === "⌈" ? (l = "⎡", h = c = "⎢", v = "Size4-Regular", m = "lceil", d = 667) : e === "\\rfloor" || e === "⌋" ? (h = l = "⎥", c = "⎦", v = "Size4-Regular", m = "rfloor", d = 667) : e === "\\rceil" || e === "⌉" ? (l = "⎤", h = c = "⎥", v = "Size4-Regular", m = "rceil", d = 667) : e === "(" || e === "\\lparen" ? (l = "⎛", h = "⎜", c = "⎝", v = "Size4-Regular", m = "lparen", d = 875) : e === ")" || e === "\\rparen" ? (l = "⎞", h = "⎟", c = "⎠", v = "Size4-Regular", m = "rparen", d = 875) : e === "\\{" || e === "\\lbrace" ? (l = "⎧", s = "⎨", c = "⎩", h = "⎪", v = "Size4-Regular") : e === "\\}" || e === "\\rbrace" ? (l = "⎫", s = "⎬", c = "⎭", h = "⎪", v = "Size4-Regular") : e === "\\lgroup" || e === "⟮" ? (l = "⎧", c = "⎩", h = "⎪", v = "Size4-Regular") : e === "\\rgroup" || e === "⟯" ? (l = "⎫", c = "⎭", h = "⎪", v = "Size4-Regular") : e === "\\lmoustache" || e === "⎰" ? (l = "⎧", c = "⎭", h = "⎪", v = "Size4-Regular") : (e === "\\rmoustache" || e === "⎱") && (l = "⎫", c = "⎩", h = "⎪", v = "Size4-Regular");
  var b = de(l, v, n), g = b.height + b.depth, w = de(h, v, n), B = w.height + w.depth, M = de(c, v, n), _ = M.height + M.depth, z = 0, D = 1;
  if (s !== null) {
    var R = de(s, v, n);
    z = R.height + R.depth, D = 2;
  }
  var O = g + _ + z, F = Math.max(0, Math.ceil((t - O) / (D * B))), Q = O + F * D * B, H = i.fontMetrics().axisHeight;
  a && (H *= i.sizeMultiplier);
  var L = Q / 2 - H, K = [];
  if (m.length > 0) {
    var t0 = Q - g - _, Z = Math.round(Q * 1e3), y = mn(m, Math.round(t0 * 1e3)), C = new X0(m, y), k = W(d / 1e3), E = W(Z / 1e3), T = new N0([C], {
      width: k,
      height: E,
      viewBox: "0 0 " + d + " " + Z
    }), Y = $0([], [T], i);
    Y.height = Z / 1e3, Y.style.width = k, Y.style.height = E, K.push({
      type: "elem",
      elem: Y
    });
  } else {
    if (K.push(mt(c, v, n)), K.push(De), s === null) {
      var q = Q - g - _ + 2 * Ot;
      K.push(dt(h, q, i));
    } else {
      var j = (Q - g - _ - z) / 2 + 2 * Ot;
      K.push(dt(h, j, i)), K.push(De), K.push(mt(s, v, n)), K.push(De), K.push(dt(h, j, i));
    }
    K.push(De), K.push(mt(l, v, n));
  }
  var V = i.havingBaseStyle(r0.TEXT), a0 = n0({
    positionType: "bottom",
    positionData: L,
    children: K
  });
  return Kt(N(["delimsizing", "mult"], [a0], V), r0.TEXT, i, o);
}, pt = 80, vt = 0.08, At = function(e, t, a, i, n) {
  var o = cn(e, i, a), l = new X0(e, o), s = new N0([l], {
    // Note: 1000:1 ratio of viewBox to document em width.
    width: "400em",
    height: W(t),
    viewBox: "0 0 400000 " + a,
    preserveAspectRatio: "xMinYMin slice"
  });
  return $0(["hide-tail"], [s], n);
}, ns = function(e, t) {
  var a = t.havingBaseSizing(), i = Ra("\\surd", e * a.sizeMultiplier, Fa, a), n = a.sizeMultiplier, o = Math.max(0, t.minRuleThickness - t.fontMetrics().sqrtRuleThickness), l, s, h, c, m;
  return i.type === "small" ? (c = 1e3 + 1e3 * o + pt, e < 1 ? n = 1 : e < 1.4 && (n = 0.7), s = (1 + o + vt) / n, h = (1 + o) / n, l = At("sqrtMain", s, c, o, t), l.style.minWidth = "0.853em", m = 0.833 / n) : i.type === "large" ? (c = (1e3 + pt) * pe[i.size], h = (pe[i.size] + o) / n, s = (pe[i.size] + o + vt) / n, l = At("sqrtSize" + i.size, s, c, o, t), l.style.minWidth = "1.02em", m = 1 / n) : (s = e + o + vt, h = e + o, c = Math.floor(1e3 * e + o) + pt, l = At("sqrtTall", s, c, o, t), l.style.minWidth = "0.742em", m = 1.056), l.height = h, l.style.height = W(s), {
    span: l,
    advanceWidth: m,
    // Calculate the actual line width.
    // This actually should depend on the chosen font -- e.g. \boldmath
    // should use the thicker surd symbols from e.g. KaTeX_Main-Bold, and
    // have thicker rules.
    ruleWidth: (t.fontMetrics().sqrtRuleThickness + o) * n
  };
}, za = /* @__PURE__ */ new Set(["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "\\surd"]), ss = /* @__PURE__ */ new Set(["\\uparrow", "\\downarrow", "\\updownarrow", "\\Uparrow", "\\Downarrow", "\\Updownarrow", "|", "\\|", "\\vert", "\\Vert", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱"]), Ta = /* @__PURE__ */ new Set(["<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"]), pe = [0, 1.2, 1.8, 2.4, 3], Da = function(e, t, a, i, n) {
  if (e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle"), za.has(e) || Ta.has(e))
    return Ma(e, t, !1, a, i, n);
  if (ss.has(e))
    return Ea(e, pe[t], !1, a, i, n);
  throw new G("Illegal delimiter: '" + e + "'");
}, ls = [{
  type: "small",
  style: r0.SCRIPTSCRIPT
}, {
  type: "small",
  style: r0.SCRIPT
}, {
  type: "small",
  style: r0.TEXT
}, {
  type: "large",
  size: 1
}, {
  type: "large",
  size: 2
}, {
  type: "large",
  size: 3
}, {
  type: "large",
  size: 4
}], os = [{
  type: "small",
  style: r0.SCRIPTSCRIPT
}, {
  type: "small",
  style: r0.SCRIPT
}, {
  type: "small",
  style: r0.TEXT
}, {
  type: "stack"
}], Fa = [{
  type: "small",
  style: r0.SCRIPTSCRIPT
}, {
  type: "small",
  style: r0.SCRIPT
}, {
  type: "small",
  style: r0.TEXT
}, {
  type: "large",
  size: 1
}, {
  type: "large",
  size: 2
}, {
  type: "large",
  size: 3
}, {
  type: "large",
  size: 4
}, {
  type: "stack"
}], us = function(e) {
  if (e.type === "small")
    return "Main-Regular";
  if (e.type === "large")
    return "Size" + e.size + "-Regular";
  if (e.type === "stack")
    return "Size4-Regular";
  var t = e.type;
  throw new Error("Add support for delim type '" + t + "' here.");
}, Ra = function(e, t, a, i) {
  for (var n = Math.min(2, 3 - i.style.size), o = n; o < a.length; o++) {
    var l = a[o];
    if (l.type === "stack")
      break;
    var s = de(e, us(l), "math"), h = s.height + s.depth;
    if (l.type === "small") {
      var c = i.havingBaseStyle(l.style);
      h *= c.sizeMultiplier;
    }
    if (h > t)
      return l;
  }
  return a[a.length - 1];
}, qt = function(e, t, a, i, n, o) {
  e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle");
  var l;
  Ta.has(e) ? l = ls : za.has(e) ? l = Fa : l = os;
  var s = Ra(e, t, l, i);
  return s.type === "small" ? ts(e, s.style, a, i, n, o) : s.type === "large" ? Ma(e, s.size, a, i, n, o) : Ea(e, t, a, i, n, o);
}, gt = function(e, t, a, i, n, o) {
  var l = i.fontMetrics().axisHeight * i.sizeMultiplier, s = 901, h = 5 / i.fontMetrics().ptPerEm, c = Math.max(t - l, a + l), m = Math.max(
    // In real TeX, calculations are done using integral values which are
    // 65536 per pt, or 655360 per em. So, the division here truncates in
    // TeX but doesn't here, producing different results. If we wanted to
    // exactly match TeX's calculation, we could do
    //   Math.floor(655360 * maxDistFromAxis / 500) *
    //    delimiterFactor / 655360
    // (To see the difference, compare
    //    x^{x^{\left(\rule{0.1em}{0.68em}\right)}}
    // in TeX and KaTeX)
    c / 500 * s,
    2 * c - h
  );
  return qt(e, m, !0, i, n, o);
}, Tr = {
  "\\bigl": {
    mclass: "mopen",
    size: 1
  },
  "\\Bigl": {
    mclass: "mopen",
    size: 2
  },
  "\\biggl": {
    mclass: "mopen",
    size: 3
  },
  "\\Biggl": {
    mclass: "mopen",
    size: 4
  },
  "\\bigr": {
    mclass: "mclose",
    size: 1
  },
  "\\Bigr": {
    mclass: "mclose",
    size: 2
  },
  "\\biggr": {
    mclass: "mclose",
    size: 3
  },
  "\\Biggr": {
    mclass: "mclose",
    size: 4
  },
  "\\bigm": {
    mclass: "mrel",
    size: 1
  },
  "\\Bigm": {
    mclass: "mrel",
    size: 2
  },
  "\\biggm": {
    mclass: "mrel",
    size: 3
  },
  "\\Biggm": {
    mclass: "mrel",
    size: 4
  },
  "\\big": {
    mclass: "mord",
    size: 1
  },
  "\\Big": {
    mclass: "mord",
    size: 2
  },
  "\\bigg": {
    mclass: "mord",
    size: 3
  },
  "\\Bigg": {
    mclass: "mord",
    size: 4
  }
}, hs = /* @__PURE__ */ new Set(["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "<", ">", "\\langle", "⟨", "\\rangle", "⟩", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."]);
function Dr(r) {
  return "isMiddle" in r;
}
function Je(r, e) {
  var t = Ze(r);
  if (t && hs.has(t.text))
    return t;
  throw t ? new G("Invalid delimiter '" + t.text + "' after '" + e.funcName + "'", r) : new G("Invalid delimiter type '" + r.type + "'", r);
}
X({
  type: "delimsizing",
  names: ["\\bigl", "\\Bigl", "\\biggl", "\\Biggl", "\\bigr", "\\Bigr", "\\biggr", "\\Biggr", "\\bigm", "\\Bigm", "\\biggm", "\\Biggm", "\\big", "\\Big", "\\bigg", "\\Bigg"],
  props: {
    numArgs: 1,
    argTypes: ["primitive"]
  },
  handler: (r, e) => {
    var t = Je(e[0], r);
    return {
      type: "delimsizing",
      mode: r.parser.mode,
      size: Tr[r.funcName].size,
      mclass: Tr[r.funcName].mclass,
      delim: t.text
    };
  },
  htmlBuilder: (r, e) => r.delim === "." ? N([r.mclass]) : Da(r.delim, r.size, e, r.mode, [r.mclass]),
  mathmlBuilder: (r) => {
    var e = [];
    r.delim !== "." && e.push(z0(r.delim, r.mode));
    var t = new U("mo", e);
    r.mclass === "mopen" || r.mclass === "mclose" ? t.setAttribute("fence", "true") : t.setAttribute("fence", "false"), t.setAttribute("stretchy", "true");
    var a = W(pe[r.size]);
    return t.setAttribute("minsize", a), t.setAttribute("maxsize", a), t;
  }
});
function Fr(r) {
  if (!r.body)
    throw new Error("Bug: The leftright ParseNode wasn't fully parsed.");
}
X({
  type: "leftright-right",
  names: ["\\right"],
  props: {
    numArgs: 1,
    primitive: !0
  },
  handler: (r, e) => {
    var t = r.parser.gullet.macros.get("\\current@color");
    if (t && typeof t != "string")
      throw new G("\\current@color set to non-string in \\right");
    return {
      type: "leftright-right",
      mode: r.parser.mode,
      delim: Je(e[0], r).text,
      color: t
      // undefined if not set via \color
    };
  }
});
X({
  type: "leftright",
  names: ["\\left"],
  props: {
    numArgs: 1,
    primitive: !0
  },
  handler: (r, e) => {
    var t = Je(e[0], r), a = r.parser;
    ++a.leftrightDepth;
    var i = a.parseExpression(!1);
    --a.leftrightDepth, a.expect("\\right", !1);
    var n = i0(a.parseFunction(), "leftright-right");
    return {
      type: "leftright",
      mode: a.mode,
      body: i,
      left: t.text,
      right: n.delim,
      rightColor: n.color
    };
  },
  htmlBuilder: (r, e) => {
    Fr(r);
    for (var t = A0(r.body, e, !0, ["mopen", "mclose"]), a = 0, i = 0, n = !1, o = 0; o < t.length; o++) {
      var l = t[o];
      Dr(l) ? n = !0 : (a = Math.max(t[o].height, a), i = Math.max(t[o].depth, i));
    }
    a *= e.sizeMultiplier, i *= e.sizeMultiplier;
    var s;
    if (r.left === "." ? s = Ae(e, ["mopen"]) : s = gt(r.left, a, i, e, r.mode, ["mopen"]), t.unshift(s), n)
      for (var h = 1; h < t.length; h++) {
        var c = t[h];
        if (Dr(c)) {
          var m = c.isMiddle;
          t[h] = gt(m.delim, a, i, m.options, r.mode, []);
        }
      }
    var d;
    if (r.right === ".")
      d = Ae(e, ["mclose"]);
    else {
      var v = r.rightColor ? e.withColor(r.rightColor) : e;
      d = gt(r.right, a, i, v, r.mode, ["mclose"]);
    }
    return t.push(d), N(["minner"], t, e);
  },
  mathmlBuilder: (r, e) => {
    Fr(r);
    var t = M0(r.body, e);
    if (r.left !== ".") {
      var a = new U("mo", [z0(r.left, r.mode)]);
      a.setAttribute("fence", "true"), t.unshift(a);
    }
    if (r.right !== ".") {
      var i = new U("mo", [z0(r.right, r.mode)]);
      i.setAttribute("fence", "true"), r.rightColor && i.setAttribute("mathcolor", r.rightColor), t.push(i);
    }
    return $t(t);
  }
});
X({
  type: "middle",
  names: ["\\middle"],
  props: {
    numArgs: 1,
    primitive: !0
  },
  handler: (r, e) => {
    var t = Je(e[0], r);
    if (!r.parser.leftrightDepth)
      throw new G("\\middle without preceding \\left", t);
    return {
      type: "middle",
      mode: r.parser.mode,
      delim: t.text
    };
  },
  htmlBuilder: (r, e) => {
    var t;
    return r.delim === "." ? t = Ae(e, []) : (t = Da(r.delim, 1, e, r.mode, []), t.isMiddle = {
      delim: r.delim,
      options: e
    }), t;
  },
  mathmlBuilder: (r, e) => {
    var t = r.delim === "\\vert" || r.delim === "|" ? z0("|", "text") : z0(r.delim, r.mode), a = new U("mo", [t]);
    return a.setAttribute("fence", "true"), a.setAttribute("lspace", "0.05em"), a.setAttribute("rspace", "0.05em"), a;
  }
});
var et = (r, e) => {
  var t = oe(s0(r.body, e), e), a = r.label.slice(1), i = e.sizeMultiplier, n, o, l = H0(r.body);
  if (a === "sout")
    n = N(["stretchy", "sout"]), n.height = e.fontMetrics().defaultRuleThickness / i, o = -0.5 * e.fontMetrics().xHeight;
  else if (a === "phase") {
    var s = c0({
      number: 0.6,
      unit: "pt"
    }, e), h = c0({
      number: 0.35,
      unit: "ex"
    }, e), c = e.havingBaseSizing();
    i = i / c.sizeMultiplier;
    var m = t.height + t.depth + s + h;
    t.style.paddingLeft = W(m / 2 + s);
    var d = Math.floor(1e3 * m * i), v = un(d), b = new N0([new X0("phase", v)], {
      width: "400em",
      height: W(d / 1e3),
      viewBox: "0 0 400000 " + d,
      preserveAspectRatio: "xMinYMin slice"
    });
    n = $0(["hide-tail"], [b], e), n.style.height = W(m), o = t.depth + s + h;
  } else {
    /cancel/.test(a) ? l || t.classes.push("cancel-pad") : a === "angl" ? t.classes.push("anglpad") : t.classes.push("boxpad");
    var g, w, B = 0;
    /box/.test(a) ? (B = Math.max(
      e.fontMetrics().fboxrule,
      // default
      e.minRuleThickness
    ), g = e.fontMetrics().fboxsep + (a === "colorbox" ? 0 : B), w = g) : a === "angl" ? (B = Math.max(e.fontMetrics().defaultRuleThickness, e.minRuleThickness), g = 4 * B, w = Math.max(0, 0.25 - t.depth)) : (g = l ? 0.2 : 0, w = g), n = jn(t, a, g, w, e), /fbox|boxed|fcolorbox/.test(a) ? (n.style.borderStyle = "solid", n.style.borderWidth = W(B)) : a === "angl" && B !== 0.049 && (n.style.borderTopWidth = W(B), n.style.borderRightWidth = W(B)), o = t.depth + w, r.backgroundColor && (n.style.backgroundColor = r.backgroundColor, r.borderColor && (n.style.borderColor = r.borderColor));
  }
  var M;
  if (r.backgroundColor)
    M = n0({
      positionType: "individualShift",
      children: [
        // Put the color background behind inner;
        {
          type: "elem",
          elem: n,
          shift: o
        },
        {
          type: "elem",
          elem: t,
          shift: 0
        }
      ]
    });
  else {
    var _ = /cancel|phase/.test(a) ? ["svg-align"] : [];
    M = n0({
      positionType: "individualShift",
      children: [
        // Write the \cancel stroke on top of inner.
        {
          type: "elem",
          elem: t,
          shift: 0
        },
        {
          type: "elem",
          elem: n,
          shift: o,
          wrapperClasses: _
        }
      ]
    });
  }
  return /cancel/.test(a) && (M.height = t.height, M.depth = t.depth), /cancel/.test(a) && !l ? N(["mord", "cancel-lap"], [M], e) : N(["mord"], [M], e);
}, tt = (r, e) => {
  var t, a = new U(r.label.includes("colorbox") ? "mpadded" : "menclose", [l0(r.body, e)]);
  switch (r.label) {
    case "\\cancel":
      a.setAttribute("notation", "updiagonalstrike");
      break;
    case "\\bcancel":
      a.setAttribute("notation", "downdiagonalstrike");
      break;
    case "\\phase":
      a.setAttribute("notation", "phasorangle");
      break;
    case "\\sout":
      a.setAttribute("notation", "horizontalstrike");
      break;
    case "\\fbox":
      a.setAttribute("notation", "box");
      break;
    case "\\angl":
      a.setAttribute("notation", "actuarial");
      break;
    case "\\fcolorbox":
    case "\\colorbox":
      if (t = e.fontMetrics().fboxsep * e.fontMetrics().ptPerEm, a.setAttribute("width", "+" + 2 * t + "pt"), a.setAttribute("height", "+" + 2 * t + "pt"), a.setAttribute("lspace", t + "pt"), a.setAttribute("voffset", t + "pt"), r.label === "\\fcolorbox") {
        var i = Math.max(
          e.fontMetrics().fboxrule,
          // default
          e.minRuleThickness
        );
        a.setAttribute("style", "border: " + W(i) + " solid " + r.borderColor);
      }
      break;
    case "\\xcancel":
      a.setAttribute("notation", "updiagonalstrike downdiagonalstrike");
      break;
  }
  return r.backgroundColor && a.setAttribute("mathbackground", r.backgroundColor), a;
};
X({
  type: "enclose",
  names: ["\\colorbox"],
  props: {
    numArgs: 2,
    allowedInText: !0,
    argTypes: ["color", "hbox"]
  },
  handler(r, e, t) {
    var {
      parser: a,
      funcName: i
    } = r, n = i0(e[0], "color-token").color, o = e[1];
    return {
      type: "enclose",
      mode: a.mode,
      label: i,
      backgroundColor: n,
      body: o
    };
  },
  htmlBuilder: et,
  mathmlBuilder: tt
});
X({
  type: "enclose",
  names: ["\\fcolorbox"],
  props: {
    numArgs: 3,
    allowedInText: !0,
    argTypes: ["color", "color", "hbox"]
  },
  handler(r, e, t) {
    var {
      parser: a,
      funcName: i
    } = r, n = i0(e[0], "color-token").color, o = i0(e[1], "color-token").color, l = e[2];
    return {
      type: "enclose",
      mode: a.mode,
      label: i,
      backgroundColor: o,
      borderColor: n,
      body: l
    };
  },
  htmlBuilder: et,
  mathmlBuilder: tt
});
X({
  type: "enclose",
  names: ["\\fbox"],
  props: {
    numArgs: 1,
    argTypes: ["hbox"],
    allowedInText: !0
  },
  handler(r, e) {
    var {
      parser: t
    } = r;
    return {
      type: "enclose",
      mode: t.mode,
      label: "\\fbox",
      body: e[0]
    };
  }
});
X({
  type: "enclose",
  names: ["\\cancel", "\\bcancel", "\\xcancel", "\\phase"],
  props: {
    numArgs: 1
  },
  handler(r, e) {
    var {
      parser: t,
      funcName: a
    } = r, i = e[0];
    return {
      type: "enclose",
      mode: t.mode,
      label: a,
      body: i
    };
  },
  htmlBuilder: et,
  mathmlBuilder: tt
});
X({
  type: "enclose",
  names: ["\\sout"],
  props: {
    numArgs: 1,
    allowedInText: !0
  },
  handler(r, e) {
    var {
      parser: t,
      funcName: a
    } = r;
    t.mode === "math" && t.settings.reportNonstrict("mathVsSout", "LaTeX's \\sout works only in text mode");
    var i = e[0];
    return {
      type: "enclose",
      mode: t.mode,
      label: a,
      body: i
    };
  },
  htmlBuilder: et,
  mathmlBuilder: tt
});
X({
  type: "enclose",
  names: ["\\angl"],
  props: {
    numArgs: 1,
    argTypes: ["hbox"],
    allowedInText: !1
  },
  handler(r, e) {
    var {
      parser: t
    } = r;
    return {
      type: "enclose",
      mode: t.mode,
      label: "\\angl",
      body: e[0]
    };
  }
});
var Qa = {};
function F0(r) {
  for (var {
    type: e,
    names: t,
    props: a,
    handler: i,
    htmlBuilder: n,
    mathmlBuilder: o
  } = r, l = {
    type: e,
    numArgs: a.numArgs || 0,
    allowedInText: !1,
    numOptionalArgs: 0,
    handler: i
  }, s = 0; s < t.length; ++s)
    Qa[t[s]] = l;
  n && (Le[e] = n), o && (Ge[e] = o);
}
var Oa = {};
function A(r, e) {
  Oa[r] = e;
}
class k0 {
  // End offset, zero-based exclusive.
  constructor(e, t, a) {
    this.lexer = void 0, this.start = void 0, this.end = void 0, this.lexer = e, this.start = t, this.end = a;
  }
  /**
   * Merges two `SourceLocation`s from location providers, given they are
   * provided in order of appearance.
   * - Returns the first one's location if only the first is provided.
   * - Returns a merged range of the first and the last if both are provided
   *   and their lexers match.
   * - Otherwise, returns null.
   */
  static range(e, t) {
    return t ? !e || !e.loc || !t.loc || e.loc.lexer !== t.loc.lexer ? null : new k0(e.loc.lexer, e.loc.start, t.loc.end) : e && e.loc;
  }
}
class _0 {
  // used in \noexpand
  constructor(e, t) {
    this.text = void 0, this.loc = void 0, this.noexpand = void 0, this.treatAsRelax = void 0, this.text = e, this.loc = t;
  }
  /**
   * Given a pair of tokens (this and endToken), compute a `Token` encompassing
   * the whole input range enclosed by these two.
   */
  range(e, t) {
    return new _0(t, k0.range(this, e));
  }
}
function Rr(r) {
  var e = [];
  r.consumeSpaces();
  var t = r.fetch().text;
  for (t === "\\relax" && (r.consume(), r.consumeSpaces(), t = r.fetch().text); t === "\\hline" || t === "\\hdashline"; )
    r.consume(), e.push(t === "\\hdashline"), r.consumeSpaces(), t = r.fetch().text;
  return e;
}
var rt = (r) => {
  var e = r.parser.settings;
  if (!e.displayMode)
    throw new G("{" + r.envName + "} can be used only in display mode.");
}, cs = /* @__PURE__ */ new Set(["gather", "gather*"]);
function Jt(r) {
  if (!r.includes("ed"))
    return !r.includes("*");
}
function Z0(r, e, t) {
  var {
    hskipBeforeAndAfter: a,
    addJot: i,
    cols: n,
    arraystretch: o,
    colSeparationType: l,
    autoTag: s,
    singleRow: h,
    emptySingleRow: c,
    maxNumCols: m,
    leqno: d
  } = e;
  if (r.gullet.beginGroup(), h || r.gullet.macros.set("\\cr", "\\\\\\relax"), !o) {
    var v = r.gullet.expandMacroAsText("\\arraystretch");
    if (v == null)
      o = 1;
    else if (o = parseFloat(v), !o || o < 0)
      throw new G("Invalid \\arraystretch: " + v);
  }
  r.gullet.beginGroup();
  var b = [], g = [b], w = [], B = [], M = s != null ? [] : void 0;
  function _() {
    s && r.gullet.macros.set("\\@eqnsw", "1", !0);
  }
  function z() {
    M && (r.gullet.macros.get("\\df@tag") ? (M.push(r.subparse([new _0("\\df@tag")])), r.gullet.macros.set("\\df@tag", void 0, !0)) : M.push(!!s && r.gullet.macros.get("\\@eqnsw") === "1"));
  }
  for (_(), B.push(Rr(r)); ; ) {
    var D = r.parseExpression(!1, h ? "\\end" : "\\\\");
    r.gullet.endGroup(), r.gullet.beginGroup();
    var R = {
      type: "ordgroup",
      mode: r.mode,
      body: D
    };
    t && (R = {
      type: "styling",
      mode: r.mode,
      style: t,
      resetFont: !0,
      body: [R]
    }), b.push(R);
    var O = r.fetch().text;
    if (O === "&") {
      if (m && b.length === m) {
        if (h || l)
          throw new G("Too many tab characters: &", r.nextToken);
        r.settings.reportNonstrict("textEnv", "Too few columns specified in the {array} column argument.");
      }
      r.consume();
    } else if (O === "\\end") {
      z(), b.length === 1 && R.type === "styling" && R.body.length === 1 && R.body[0].type === "ordgroup" && R.body[0].body.length === 0 && (g.length > 1 || !c) && g.pop(), B.length < g.length + 1 && B.push([]);
      break;
    } else if (O === "\\\\") {
      r.consume();
      var F = void 0;
      r.gullet.future().text !== " " && (F = r.parseSizeGroup(!0)), w.push(F ? F.value : null), z(), B.push(Rr(r)), b = [], g.push(b), _();
    } else
      throw new G("Expected & or \\\\ or \\cr or \\end", r.nextToken);
  }
  return r.gullet.endGroup(), r.gullet.endGroup(), {
    type: "array",
    mode: r.mode,
    addJot: i,
    arraystretch: o,
    body: g,
    cols: n,
    rowGaps: w,
    hskipBeforeAndAfter: a,
    hLinesBeforeRow: B,
    colSeparationType: l,
    tags: M,
    leqno: d
  };
}
function er(r) {
  return r.slice(0, 1) === "d" ? "display" : "text";
}
var R0 = function(e, t) {
  var a, i, n = e.body.length, o = e.hLinesBeforeRow, l = 0, s = new Array(n), h = [], c = Math.max(
    // From LaTeX \showthe\arrayrulewidth. Equals 0.04 em.
    t.fontMetrics().arrayRuleWidth,
    t.minRuleThickness
  ), m = 1 / t.fontMetrics().ptPerEm, d = 5 * m;
  if (e.colSeparationType && e.colSeparationType === "small") {
    var v = t.havingStyle(r0.SCRIPT).sizeMultiplier;
    d = 0.2778 * (v / t.sizeMultiplier);
  }
  var b = e.colSeparationType === "CD" ? c0({
    number: 3,
    unit: "ex"
  }, t) : 12 * m, g = 3 * m, w = e.arraystretch * b, B = 0.7 * w, M = 0.3 * w, _ = 0;
  function z(Ie) {
    for (var Be = 0; Be < Ie.length; ++Be)
      Be > 0 && (_ += 0.25), h.push({
        pos: _,
        isDashed: Ie[Be]
      });
  }
  for (z(o[0]), a = 0; a < e.body.length; ++a) {
    var D = e.body[a], R = B, O = M;
    l < D.length && (l = D.length);
    var F = {
      cells: new Array(D.length),
      height: 0,
      depth: 0,
      pos: 0
    };
    for (i = 0; i < D.length; ++i) {
      var Q = s0(D[i], t);
      O < Q.depth && (O = Q.depth), R < Q.height && (R = Q.height), F.cells[i] = Q;
    }
    var H = e.rowGaps[a], L = 0;
    H && (L = c0(H, t), L > 0 && (L += M, O < L && (O = L), L = 0)), e.addJot && a < e.body.length - 1 && (O += g), F.height = R, F.depth = O, _ += R, F.pos = _, _ += O + L, s[a] = F, z(o[a + 1]);
  }
  var K = _ / 2 + t.fontMetrics().axisHeight, t0 = e.cols || [], Z = [], y, C, k = [];
  if (e.tags && e.tags.some((Ie) => Ie))
    for (a = 0; a < n; ++a) {
      var E = s[a], T = E.pos - K, Y = e.tags[a], q = void 0;
      Y === !0 ? q = N(["eqn-num"], [], t) : Y === !1 ? q = N([], [], t) : q = N([], A0(Y, t, !0), t), q.depth = E.depth, q.height = E.height, k.push({
        type: "elem",
        elem: q,
        shift: T
      });
    }
  for (
    i = 0, C = 0;
    // Continue while either there are more columns or more column
    // descriptions, so trailing separators don't get lost.
    i < l || C < t0.length;
    ++i, ++C
  ) {
    for (var j, V = t0[C], a0 = !0; ((g0 = V) == null ? void 0 : g0.type) === "separator"; ) {
      var g0;
      if (a0 || (y = N(["arraycolsep"], []), y.style.width = W(t.fontMetrics().doubleRuleSep), Z.push(y)), V.separator === "|" || V.separator === ":") {
        var me = V.separator === "|" ? "solid" : "dashed", re = N(["vertical-separator"], [], t);
        re.style.height = W(_), re.style.borderRightWidth = W(c), re.style.borderRightStyle = me, re.style.margin = "0 " + W(-c / 2);
        var nr = _ - K;
        nr && (re.style.verticalAlign = W(-nr)), Z.push(re);
      } else
        throw new G("Invalid separator type: " + V.separator);
      C++, V = t0[C], a0 = !1;
    }
    if (!(i >= l)) {
      var ae = void 0;
      if (i > 0 || e.hskipBeforeAndAfter) {
        var sr, lr;
        ae = (sr = (lr = V) == null ? void 0 : lr.pregap) != null ? sr : d, ae !== 0 && (y = N(["arraycolsep"], []), y.style.width = W(ae), Z.push(y));
      }
      var or = [];
      for (a = 0; a < n; ++a) {
        var ye = s[a], we = ye.cells[i];
        if (we) {
          var ii = ye.pos - K;
          we.depth = ye.depth, we.height = ye.height, or.push({
            type: "elem",
            elem: we,
            shift: ii
          });
        }
      }
      var ni = n0({
        positionType: "individualShift",
        children: or
      }), si = N(["col-align-" + (((j = V) == null ? void 0 : j.align) || "c")], [ni]);
      if (Z.push(si), i < l - 1 || e.hskipBeforeAndAfter) {
        var ur, hr;
        ae = (ur = (hr = V) == null ? void 0 : hr.postgap) != null ? ur : d, ae !== 0 && (y = N(["arraycolsep"], []), y.style.width = W(ae), Z.push(y));
      }
    }
  }
  var xe = N(["mtable"], Z);
  if (h.length > 0) {
    for (var li = le("hline", t, c), oi = le("hdashline", t, c), nt = [{
      type: "elem",
      elem: xe,
      shift: 0
    }]; h.length > 0; ) {
      var cr = h.pop(), fr = cr.pos - K;
      cr.isDashed ? nt.push({
        type: "elem",
        elem: oi,
        shift: fr
      }) : nt.push({
        type: "elem",
        elem: li,
        shift: fr
      });
    }
    xe = n0({
      positionType: "individualShift",
      children: nt
    });
  }
  if (k.length === 0)
    return N(["mord"], [xe], t);
  var ui = n0({
    positionType: "individualShift",
    children: k
  }), hi = N(["tag"], [ui], t);
  return G0([xe, hi]);
}, fs = {
  c: "center ",
  l: "left ",
  r: "right "
}, Q0 = function(e, t) {
  for (var a = [], i = new U("mtd", [], ["mtr-glue"]), n = new U("mtd", [], ["mml-eqn-num"]), o = 0; o < e.body.length; o++) {
    for (var l = e.body[o], s = [], h = 0; h < l.length; h++)
      s.push(new U("mtd", [l0(l[h], t)]));
    e.tags && e.tags[o] && (s.unshift(i), s.push(i), e.leqno ? s.unshift(n) : s.push(n)), a.push(new U("mtr", s));
  }
  var c = new U("mtable", a), m = e.arraystretch === 0.5 ? 0.1 : 0.16 + e.arraystretch - 1 + (e.addJot ? 0.09 : 0);
  c.setAttribute("rowspacing", W(m));
  var d = "", v = "";
  if (e.cols && e.cols.length > 0) {
    var b = e.cols, g = "", w = !1, B = 0, M = b.length;
    b[0].type === "separator" && (d += "top ", B = 1), b[b.length - 1].type === "separator" && (d += "bottom ", M -= 1);
    for (var _ = B; _ < M; _++) {
      var z = b[_];
      z.type === "align" ? (v += fs[z.align], w && (g += "none "), w = !0) : z.type === "separator" && w && (g += z.separator === "|" ? "solid " : "dashed ", w = !1);
    }
    c.setAttribute("columnalign", v.trim()), /[sd]/.test(g) && c.setAttribute("columnlines", g.trim());
  }
  if (e.colSeparationType === "align") {
    for (var D = e.cols || [], R = "", O = 1; O < D.length; O++)
      R += O % 2 ? "0em " : "1em ";
    c.setAttribute("columnspacing", R.trim());
  } else e.colSeparationType === "alignat" || e.colSeparationType === "gather" ? c.setAttribute("columnspacing", "0em") : e.colSeparationType === "small" ? c.setAttribute("columnspacing", "0.2778em") : e.colSeparationType === "CD" ? c.setAttribute("columnspacing", "0.5em") : c.setAttribute("columnspacing", "1em");
  var F = "", Q = e.hLinesBeforeRow;
  d += Q[0].length > 0 ? "left " : "", d += Q[Q.length - 1].length > 0 ? "right " : "";
  for (var H = 1; H < Q.length - 1; H++)
    F += Q[H].length === 0 ? "none " : Q[H][0] ? "dashed " : "solid ";
  return /[sd]/.test(F) && c.setAttribute("rowlines", F.trim()), d !== "" && (c = new U("menclose", [c]), c.setAttribute("notation", d.trim())), e.arraystretch && e.arraystretch < 1 && (c = new U("mstyle", [c]), c.setAttribute("scriptlevel", "1")), c;
}, qa = function(e, t) {
  e.envName.includes("ed") || rt(e);
  var a = [], i = e.envName.includes("at") ? "alignat" : "align", n = e.envName === "split", o = Z0(e.parser, {
    cols: a,
    addJot: !0,
    autoTag: n ? void 0 : Jt(e.envName),
    emptySingleRow: !0,
    colSeparationType: i,
    maxNumCols: n ? 2 : void 0,
    leqno: e.parser.settings.leqno
  }, "display"), l = 0, s = 0, h = {
    type: "ordgroup",
    mode: e.mode,
    body: []
  };
  if (t[0] && t[0].type === "ordgroup") {
    for (var c = "", m = 0; m < t[0].body.length; m++) {
      var d = i0(t[0].body[m], "textord");
      c += d.text;
    }
    l = Number(c), s = l * 2;
  }
  var v = !s;
  o.body.forEach(function(B) {
    for (var M = 1; M < B.length; M += 2) {
      var _ = i0(B[M], "styling"), z = i0(_.body[0], "ordgroup");
      z.body.unshift(h);
    }
    if (v)
      s < B.length && (s = B.length);
    else {
      var D = B.length / 2;
      if (l < D)
        throw new G("Too many math in a row: " + ("expected " + l + ", but got " + D), B[0]);
    }
  });
  for (var b = 0; b < s; ++b) {
    var g = "r", w = 0;
    b % 2 === 1 ? g = "l" : b > 0 && v && (w = 1), a[b] = {
      type: "align",
      align: g,
      pregap: w,
      postgap: 0
    };
  }
  return o.colSeparationType = v ? "align" : "alignat", o;
};
F0({
  type: "array",
  names: ["array", "darray"],
  props: {
    numArgs: 1
  },
  handler(r, e) {
    var t = Ze(e[0]), a = t ? [e[0]] : i0(e[0], "ordgroup").body, i = a.map(function(o) {
      var l = Ve(o), s = l.text;
      if ("lcr".includes(s))
        return {
          type: "align",
          align: s
        };
      if (s === "|")
        return {
          type: "separator",
          separator: "|"
        };
      if (s === ":")
        return {
          type: "separator",
          separator: ":"
        };
      throw new G("Unknown column alignment: " + s, o);
    }), n = {
      cols: i,
      hskipBeforeAndAfter: !0,
      // \@preamble in lttab.dtx
      maxNumCols: i.length
    };
    return Z0(r.parser, n, er(r.envName));
  },
  htmlBuilder: R0,
  mathmlBuilder: Q0
});
F0({
  type: "array",
  names: ["matrix", "pmatrix", "bmatrix", "Bmatrix", "vmatrix", "Vmatrix", "matrix*", "pmatrix*", "bmatrix*", "Bmatrix*", "vmatrix*", "Vmatrix*"],
  props: {
    numArgs: 0
  },
  handler(r) {
    var e = {
      matrix: null,
      pmatrix: ["(", ")"],
      bmatrix: ["[", "]"],
      Bmatrix: ["\\{", "\\}"],
      vmatrix: ["|", "|"],
      Vmatrix: ["\\Vert", "\\Vert"]
    }[r.envName.replace("*", "")], t = "c", a = {
      hskipBeforeAndAfter: !1,
      cols: [{
        type: "align",
        align: t
      }]
    };
    if (r.envName.charAt(r.envName.length - 1) === "*") {
      var i = r.parser;
      if (i.consumeSpaces(), i.fetch().text === "[") {
        if (i.consume(), i.consumeSpaces(), t = i.fetch().text, !"lcr".includes(t))
          throw new G("Expected l or c or r", i.nextToken);
        i.consume(), i.consumeSpaces(), i.expect("]"), i.consume(), a.cols = [{
          type: "align",
          align: t
        }];
      }
    }
    var n = Z0(r.parser, a, er(r.envName)), o = Math.max(0, ...n.body.map((l) => l.length));
    return n.cols = new Array(o).fill({
      type: "align",
      align: t
    }), e ? {
      type: "leftright",
      mode: r.mode,
      body: [n],
      left: e[0],
      right: e[1],
      rightColor: void 0
      // \right uninfluenced by \color in array
    } : n;
  },
  htmlBuilder: R0,
  mathmlBuilder: Q0
});
F0({
  type: "array",
  names: ["smallmatrix"],
  props: {
    numArgs: 0
  },
  handler(r) {
    var e = {
      arraystretch: 0.5
    }, t = Z0(r.parser, e, "script");
    return t.colSeparationType = "small", t;
  },
  htmlBuilder: R0,
  mathmlBuilder: Q0
});
F0({
  type: "array",
  names: ["subarray"],
  props: {
    numArgs: 1
  },
  handler(r, e) {
    var t = Ze(e[0]), a = t ? [e[0]] : i0(e[0], "ordgroup").body, i = a.map(function(l) {
      var s = Ve(l), h = s.text;
      if ("lc".includes(h))
        return {
          type: "align",
          align: h
        };
      throw new G("Unknown column alignment: " + h, l);
    });
    if (i.length > 1)
      throw new G("{subarray} can contain only one column");
    var n = {
      cols: i,
      hskipBeforeAndAfter: !1,
      arraystretch: 0.5
    }, o = Z0(r.parser, n, "script");
    if (o.body.length > 0 && o.body[0].length > 1)
      throw new G("{subarray} can contain only one column");
    return o;
  },
  htmlBuilder: R0,
  mathmlBuilder: Q0
});
F0({
  type: "array",
  names: ["cases", "dcases", "rcases", "drcases"],
  props: {
    numArgs: 0
  },
  handler(r) {
    var e = {
      arraystretch: 1.2,
      cols: [{
        type: "align",
        align: "l",
        pregap: 0,
        // TODO(kevinb) get the current style.
        // For now we use the metrics for TEXT style which is what we were
        // doing before.  Before attempting to get the current style we
        // should look at TeX's behavior especially for \over and matrices.
        postgap: 1
        /* 1em quad */
      }, {
        type: "align",
        align: "l",
        pregap: 0,
        postgap: 0
      }]
    }, t = Z0(r.parser, e, er(r.envName));
    return {
      type: "leftright",
      mode: r.mode,
      body: [t],
      left: r.envName.includes("r") ? "." : "\\{",
      right: r.envName.includes("r") ? "\\}" : ".",
      rightColor: void 0
    };
  },
  htmlBuilder: R0,
  mathmlBuilder: Q0
});
F0({
  type: "array",
  names: ["align", "align*", "aligned", "split"],
  props: {
    numArgs: 0
  },
  handler: qa,
  htmlBuilder: R0,
  mathmlBuilder: Q0
});
F0({
  type: "array",
  names: ["gathered", "gather", "gather*"],
  props: {
    numArgs: 0
  },
  handler(r) {
    cs.has(r.envName) && rt(r);
    var e = {
      cols: [{
        type: "align",
        align: "c"
      }],
      addJot: !0,
      colSeparationType: "gather",
      autoTag: Jt(r.envName),
      emptySingleRow: !0,
      leqno: r.parser.settings.leqno
    };
    return Z0(r.parser, e, "display");
  },
  htmlBuilder: R0,
  mathmlBuilder: Q0
});
F0({
  type: "array",
  names: ["alignat", "alignat*", "alignedat"],
  props: {
    numArgs: 1
  },
  handler: qa,
  htmlBuilder: R0,
  mathmlBuilder: Q0
});
F0({
  type: "array",
  names: ["equation", "equation*"],
  props: {
    numArgs: 0
  },
  handler(r) {
    rt(r);
    var e = {
      autoTag: Jt(r.envName),
      emptySingleRow: !0,
      singleRow: !0,
      maxNumCols: 1,
      leqno: r.parser.settings.leqno
    };
    return Z0(r.parser, e, "display");
  },
  htmlBuilder: R0,
  mathmlBuilder: Q0
});
F0({
  type: "array",
  names: ["CD"],
  props: {
    numArgs: 0
  },
  handler(r) {
    return rt(r), Jn(r.parser);
  },
  htmlBuilder: R0,
  mathmlBuilder: Q0
});
A("\\nonumber", "\\gdef\\@eqnsw{0}");
A("\\notag", "\\nonumber");
X({
  type: "text",
  // Doesn't matter what this is.
  names: ["\\hline", "\\hdashline"],
  props: {
    numArgs: 0,
    allowedInText: !0,
    allowedInMath: !0
  },
  handler(r, e) {
    throw new G(r.funcName + " valid only within array environment");
  }
});
var Qr = Qa;
X({
  type: "environment",
  names: ["\\begin", "\\end"],
  props: {
    numArgs: 1,
    argTypes: ["text"]
  },
  handler(r, e) {
    var {
      parser: t,
      funcName: a
    } = r, i = e[0];
    if (i.type !== "ordgroup")
      throw new G("Invalid environment name", i);
    for (var n = "", o = 0; o < i.body.length; ++o)
      n += i0(i.body[o], "textord").text;
    if (a === "\\begin") {
      if (!Qr.hasOwnProperty(n))
        throw new G("No such environment: " + n, i);
      var l = Qr[n], {
        args: s,
        optArgs: h
      } = t.parseArguments("\\begin{" + n + "}", l), c = {
        mode: t.mode,
        envName: n,
        parser: t
      }, m = l.handler(c, s, h);
      t.expect("\\end", !1);
      var d = t.nextToken, v = i0(t.parseFunction(), "environment");
      if (v.name !== n)
        throw new G("Mismatch: \\begin{" + n + "} matched by \\end{" + v.name + "}", d);
      return m;
    }
    return {
      type: "environment",
      mode: t.mode,
      name: n,
      nameGroup: i
    };
  }
});
var Pa = (r, e) => {
  var t = r.font, a = e.withFont(t);
  return s0(r.body, a);
}, Na = (r, e) => {
  var t = r.font, a = e.withFont(t);
  return l0(r.body, a);
}, Or = {
  "\\Bbb": "\\mathbb",
  "\\bold": "\\mathbf",
  "\\frak": "\\mathfrak"
};
X({
  type: "font",
  names: [
    // styles, except \boldsymbol defined below
    "\\mathrm",
    "\\mathit",
    "\\mathbf",
    "\\mathnormal",
    "\\mathsfit",
    // families
    "\\mathbb",
    "\\mathcal",
    "\\mathfrak",
    "\\mathscr",
    "\\mathsf",
    "\\mathtt",
    // aliases, except \bm defined below
    "\\Bbb",
    "\\bold",
    "\\frak"
  ],
  props: {
    numArgs: 1,
    allowedInArgument: !0
  },
  handler: (r, e) => {
    var {
      parser: t,
      funcName: a
    } = r, i = Ue(e[0]), n = a;
    return n in Or && (n = Or[n]), {
      type: "font",
      mode: t.mode,
      font: n.slice(1),
      body: i
    };
  },
  htmlBuilder: Pa,
  mathmlBuilder: Na
});
X({
  type: "mclass",
  names: ["\\boldsymbol", "\\bm"],
  props: {
    numArgs: 1
  },
  handler: (r, e) => {
    var {
      parser: t
    } = r, a = e[0];
    return {
      type: "mclass",
      mode: t.mode,
      mclass: Ke(a),
      body: [{
        type: "font",
        mode: t.mode,
        font: "boldsymbol",
        body: a
      }],
      isCharacterBox: H0(a)
    };
  }
});
X({
  type: "font",
  names: ["\\rm", "\\sf", "\\tt", "\\bf", "\\it", "\\cal"],
  props: {
    numArgs: 0,
    allowedInText: !0
  },
  handler: (r, e) => {
    var {
      parser: t,
      funcName: a,
      breakOnTokenText: i
    } = r, {
      mode: n
    } = t, o = t.parseExpression(!0, i);
    return {
      type: "font",
      mode: n,
      font: "math" + a.slice(1),
      body: {
        type: "ordgroup",
        mode: t.mode,
        body: o
      }
    };
  },
  htmlBuilder: Pa,
  mathmlBuilder: Na
});
var ms = (r, e) => {
  var t = e.style, a = t.fracNum(), i = t.fracDen(), n;
  n = e.havingStyle(a);
  var o = s0(r.numer, n, e);
  if (r.continued) {
    var l = 8.5 / e.fontMetrics().ptPerEm, s = 3.5 / e.fontMetrics().ptPerEm;
    o.height = o.height < l ? l : o.height, o.depth = o.depth < s ? s : o.depth;
  }
  n = e.havingStyle(i);
  var h = s0(r.denom, n, e), c, m, d;
  r.hasBarLine ? (r.barSize ? (m = c0(r.barSize, e), c = le("frac-line", e, m)) : c = le("frac-line", e), m = c.height, d = c.height) : (c = null, m = 0, d = e.fontMetrics().defaultRuleThickness);
  var v, b, g;
  t.size === r0.DISPLAY.size ? (v = e.fontMetrics().num1, m > 0 ? b = 3 * d : b = 7 * d, g = e.fontMetrics().denom1) : (m > 0 ? (v = e.fontMetrics().num2, b = d) : (v = e.fontMetrics().num3, b = 3 * d), g = e.fontMetrics().denom2);
  var w;
  if (c) {
    var M = e.fontMetrics().axisHeight;
    v - o.depth - (M + 0.5 * m) < b && (v += b - (v - o.depth - (M + 0.5 * m))), M - 0.5 * m - (h.height - g) < b && (g += b - (M - 0.5 * m - (h.height - g)));
    var _ = -(M - 0.5 * m);
    w = n0({
      positionType: "individualShift",
      children: [{
        type: "elem",
        elem: h,
        shift: g
      }, {
        type: "elem",
        elem: c,
        shift: _
      }, {
        type: "elem",
        elem: o,
        shift: -v
      }]
    });
  } else {
    var B = v - o.depth - (h.height - g);
    B < b && (v += 0.5 * (b - B), g += 0.5 * (b - B)), w = n0({
      positionType: "individualShift",
      children: [{
        type: "elem",
        elem: h,
        shift: g
      }, {
        type: "elem",
        elem: o,
        shift: -v
      }]
    });
  }
  n = e.havingStyle(t), w.height *= n.sizeMultiplier / e.sizeMultiplier, w.depth *= n.sizeMultiplier / e.sizeMultiplier;
  var z;
  t.size === r0.DISPLAY.size ? z = e.fontMetrics().delim1 : t.size === r0.SCRIPTSCRIPT.size ? z = e.havingStyle(r0.SCRIPT).fontMetrics().delim2 : z = e.fontMetrics().delim2;
  var D, R;
  return r.leftDelim == null ? D = Ae(e, ["mopen"]) : D = qt(r.leftDelim, z, !0, e.havingStyle(t), r.mode, ["mopen"]), r.continued ? R = N([]) : r.rightDelim == null ? R = Ae(e, ["mclose"]) : R = qt(r.rightDelim, z, !0, e.havingStyle(t), r.mode, ["mclose"]), N(["mord"].concat(n.sizingClasses(e)), [D, N(["mfrac"], [w]), R], e);
}, ds = (r, e) => {
  var t = new U("mfrac", [l0(r.numer, e), l0(r.denom, e)]);
  if (!r.hasBarLine)
    t.setAttribute("linethickness", "0px");
  else if (r.barSize) {
    var a = c0(r.barSize, e);
    t.setAttribute("linethickness", W(a));
  }
  if (r.leftDelim != null || r.rightDelim != null) {
    var i = [];
    if (r.leftDelim != null) {
      var n = new U("mo", [new d0(r.leftDelim.replace("\\", ""))]);
      n.setAttribute("fence", "true"), i.push(n);
    }
    if (i.push(t), r.rightDelim != null) {
      var o = new U("mo", [new d0(r.rightDelim.replace("\\", ""))]);
      o.setAttribute("fence", "true"), i.push(o);
    }
    return $t(i);
  }
  return t;
}, Ha = (r, e) => {
  if (!e)
    return r;
  var t = {
    type: "styling",
    mode: r.mode,
    style: e,
    body: [r]
  };
  return t;
};
X({
  type: "genfrac",
  names: [
    "\\cfrac",
    "\\dfrac",
    "\\frac",
    "\\tfrac",
    "\\dbinom",
    "\\binom",
    "\\tbinom",
    "\\\\atopfrac",
    // can’t be entered directly
    "\\\\bracefrac",
    "\\\\brackfrac"
    // ditto
  ],
  props: {
    numArgs: 2,
    allowedInArgument: !0
  },
  handler: (r, e) => {
    var {
      parser: t,
      funcName: a
    } = r, i = e[0], n = e[1], o, l = null, s = null;
    switch (a) {
      case "\\cfrac":
      case "\\dfrac":
      case "\\frac":
      case "\\tfrac":
        o = !0;
        break;
      case "\\\\atopfrac":
        o = !1;
        break;
      case "\\dbinom":
      case "\\binom":
      case "\\tbinom":
        o = !1, l = "(", s = ")";
        break;
      case "\\\\bracefrac":
        o = !1, l = "\\{", s = "\\}";
        break;
      case "\\\\brackfrac":
        o = !1, l = "[", s = "]";
        break;
      default:
        throw new Error("Unrecognized genfrac command");
    }
    var h = a === "\\cfrac", c = null;
    return h || a.startsWith("\\d") ? c = "display" : a.startsWith("\\t") && (c = "text"), Ha({
      type: "genfrac",
      mode: t.mode,
      numer: i,
      denom: n,
      continued: h,
      hasBarLine: o,
      leftDelim: l,
      rightDelim: s,
      barSize: null
    }, c);
  },
  htmlBuilder: ms,
  mathmlBuilder: ds
});
X({
  type: "infix",
  names: ["\\over", "\\choose", "\\atop", "\\brace", "\\brack"],
  props: {
    numArgs: 0,
    infix: !0
  },
  handler(r) {
    var {
      parser: e,
      funcName: t,
      token: a
    } = r, i;
    switch (t) {
      case "\\over":
        i = "\\frac";
        break;
      case "\\choose":
        i = "\\binom";
        break;
      case "\\atop":
        i = "\\\\atopfrac";
        break;
      case "\\brace":
        i = "\\\\bracefrac";
        break;
      case "\\brack":
        i = "\\\\brackfrac";
        break;
      default:
        throw new Error("Unrecognized infix genfrac command");
    }
    return {
      type: "infix",
      mode: e.mode,
      replaceWith: i,
      token: a
    };
  }
});
var qr = ["display", "text", "script", "scriptscript"], Pr = function(e) {
  var t = null;
  return e.length > 0 && (t = e, t = t === "." ? null : t), t;
};
X({
  type: "genfrac",
  names: ["\\genfrac"],
  props: {
    numArgs: 6,
    allowedInArgument: !0,
    argTypes: ["math", "math", "size", "text", "math", "math"]
  },
  handler(r, e) {
    var {
      parser: t
    } = r, a = e[4], i = e[5], n = Ue(e[0]), o = n.type === "atom" && n.family === "open" ? Pr(n.text) : null, l = Ue(e[1]), s = l.type === "atom" && l.family === "close" ? Pr(l.text) : null, h = i0(e[2], "size"), c, m = null;
    h.isBlank ? c = !0 : (m = h.value, c = m.number > 0);
    var d = null, v = e[3];
    if (v.type === "ordgroup") {
      if (v.body.length > 0) {
        var b = i0(v.body[0], "textord");
        d = qr[Number(b.text)];
      }
    } else
      v = i0(v, "textord"), d = qr[Number(v.text)];
    return Ha({
      type: "genfrac",
      mode: t.mode,
      numer: a,
      denom: i,
      continued: !1,
      hasBarLine: c,
      barSize: m,
      leftDelim: o,
      rightDelim: s
    }, d);
  }
});
X({
  type: "infix",
  names: ["\\above"],
  props: {
    numArgs: 1,
    argTypes: ["size"],
    infix: !0
  },
  handler(r, e) {
    var {
      parser: t,
      funcName: a,
      token: i
    } = r;
    return {
      type: "infix",
      mode: t.mode,
      replaceWith: "\\\\abovefrac",
      size: i0(e[0], "size").value,
      token: i
    };
  }
});
X({
  type: "genfrac",
  names: ["\\\\abovefrac"],
  props: {
    numArgs: 3,
    argTypes: ["math", "size", "math"]
  },
  handler: (r, e) => {
    var {
      parser: t,
      funcName: a
    } = r, i = e[0], n = i0(e[1], "infix").size;
    if (!n)
      throw new Error("\\\\abovefrac expected size, but got " + String(n));
    var o = e[2], l = n.number > 0;
    return {
      type: "genfrac",
      mode: t.mode,
      numer: i,
      denom: o,
      continued: !1,
      hasBarLine: l,
      barSize: n,
      leftDelim: null,
      rightDelim: null
    };
  }
});
var La = (r, e) => {
  var t = e.style, a, i;
  r.type === "supsub" ? (a = r.sup ? s0(r.sup, e.havingStyle(t.sup()), e) : s0(r.sub, e.havingStyle(t.sub()), e), i = i0(r.base, "horizBrace")) : i = i0(r, "horizBrace");
  var n = s0(i.base, e.havingBaseStyle(r0.DISPLAY)), o = $e(i, e), l;
  if (i.isOver ? l = n0({
    positionType: "firstBaseline",
    children: [{
      type: "elem",
      elem: n
    }, {
      type: "kern",
      size: 0.1
    }, {
      type: "elem",
      elem: o,
      wrapperClasses: ["svg-align"]
    }]
  }) : l = n0({
    positionType: "bottom",
    positionData: n.depth + 0.1 + o.height,
    children: [{
      type: "elem",
      elem: o,
      wrapperClasses: ["svg-align"]
    }, {
      type: "kern",
      size: 0.1
    }, {
      type: "elem",
      elem: n
    }]
  }), a) {
    var s = N(["minner", i.isOver ? "mover" : "munder"], [l], e);
    i.isOver ? l = n0({
      positionType: "firstBaseline",
      children: [{
        type: "elem",
        elem: s
      }, {
        type: "kern",
        size: 0.2
      }, {
        type: "elem",
        elem: a
      }]
    }) : l = n0({
      positionType: "bottom",
      positionData: s.depth + 0.2 + a.height + a.depth,
      children: [{
        type: "elem",
        elem: a
      }, {
        type: "kern",
        size: 0.2
      }, {
        type: "elem",
        elem: s
      }]
    });
  }
  return N(["minner", i.isOver ? "mover" : "munder"], [l], e);
}, ps = (r, e) => {
  var t = Xe(r.label);
  return new U(r.isOver ? "mover" : "munder", [l0(r.base, e), t]);
};
X({
  type: "horizBrace",
  names: ["\\overbrace", "\\underbrace", "\\overbracket", "\\underbracket"],
  props: {
    numArgs: 1
  },
  handler(r, e) {
    var {
      parser: t,
      funcName: a
    } = r;
    return {
      type: "horizBrace",
      mode: t.mode,
      label: a,
      isOver: a.includes("\\over"),
      base: e[0]
    };
  },
  htmlBuilder: La,
  mathmlBuilder: ps
});
X({
  type: "href",
  names: ["\\href"],
  props: {
    numArgs: 2,
    argTypes: ["url", "original"],
    allowedInText: !0
  },
  handler: (r, e) => {
    var {
      parser: t
    } = r, a = e[1], i = i0(e[0], "url").url;
    return t.settings.isTrusted({
      command: "\\href",
      url: i
    }) ? {
      type: "href",
      mode: t.mode,
      href: i,
      body: m0(a)
    } : t.formatUnsupportedCmd("\\href");
  },
  htmlBuilder: (r, e) => {
    var t = A0(r.body, e, !1);
    return Sn(r.href, [], t, e);
  },
  mathmlBuilder: (r, e) => {
    var t = V0(r.body, e);
    return t instanceof U || (t = new U("mrow", [t])), t.setAttribute("href", r.href), t;
  }
});
X({
  type: "href",
  names: ["\\url"],
  props: {
    numArgs: 1,
    argTypes: ["url"],
    allowedInText: !0
  },
  handler: (r, e) => {
    var {
      parser: t
    } = r, a = i0(e[0], "url").url;
    if (!t.settings.isTrusted({
      command: "\\url",
      url: a
    }))
      return t.formatUnsupportedCmd("\\url");
    for (var i = [], n = 0; n < a.length; n++) {
      var o = a[n];
      o === "~" && (o = "\\textasciitilde"), i.push({
        type: "textord",
        mode: "text",
        text: o
      });
    }
    var l = {
      type: "text",
      mode: t.mode,
      font: "\\texttt",
      body: i
    };
    return {
      type: "href",
      mode: t.mode,
      href: a,
      body: m0(l)
    };
  }
});
X({
  type: "hbox",
  names: ["\\hbox"],
  props: {
    numArgs: 1,
    argTypes: ["text"],
    allowedInText: !0,
    primitive: !0
  },
  handler(r, e) {
    var {
      parser: t
    } = r;
    return {
      type: "hbox",
      mode: t.mode,
      body: m0(e[0])
    };
  },
  htmlBuilder(r, e) {
    var t = A0(r.body, e.withFont(""), !1);
    return G0(t);
  },
  mathmlBuilder(r, e) {
    return new U("mrow", M0(r.body, e.withFont("")));
  }
});
X({
  type: "html",
  names: ["\\htmlClass", "\\htmlId", "\\htmlStyle", "\\htmlData"],
  props: {
    numArgs: 2,
    argTypes: ["raw", "original"],
    allowedInText: !0
  },
  handler: (r, e) => {
    var {
      parser: t,
      funcName: a,
      token: i
    } = r, n = i0(e[0], "raw").string, o = e[1];
    t.settings.strict && t.settings.reportNonstrict("htmlExtension", "HTML extension is disabled on strict mode");
    var l, s = {};
    switch (a) {
      case "\\htmlClass":
        s.class = n, l = {
          command: "\\htmlClass",
          class: n
        };
        break;
      case "\\htmlId":
        s.id = n, l = {
          command: "\\htmlId",
          id: n
        };
        break;
      case "\\htmlStyle":
        s.style = n, l = {
          command: "\\htmlStyle",
          style: n
        };
        break;
      case "\\htmlData": {
        for (var h = n.split(","), c = 0; c < h.length; c++) {
          var m = h[c], d = m.indexOf("=");
          if (d < 0)
            throw new G("\\htmlData key/value '" + m + "' missing equals sign");
          var v = m.slice(0, d), b = m.slice(d + 1);
          s["data-" + v.trim()] = b;
        }
        l = {
          command: "\\htmlData",
          attributes: s
        };
        break;
      }
      default:
        throw new Error("Unrecognized html command");
    }
    return t.settings.isTrusted(l) ? {
      type: "html",
      mode: t.mode,
      attributes: s,
      body: m0(o)
    } : t.formatUnsupportedCmd(a);
  },
  htmlBuilder: (r, e) => {
    var t = A0(r.body, e, !1), a = ["enclosing"];
    r.attributes.class && a.push(...r.attributes.class.trim().split(/\s+/));
    var i = N(a, t, e);
    for (var n in r.attributes)
      n !== "class" && r.attributes.hasOwnProperty(n) && i.setAttribute(n, r.attributes[n]);
    return i;
  },
  mathmlBuilder: (r, e) => V0(r.body, e)
});
X({
  type: "htmlmathml",
  names: ["\\html@mathml"],
  props: {
    numArgs: 2,
    allowedInArgument: !0,
    allowedInText: !0
  },
  handler: (r, e) => {
    var {
      parser: t
    } = r;
    return {
      type: "htmlmathml",
      mode: t.mode,
      html: m0(e[0]),
      mathml: m0(e[1])
    };
  },
  htmlBuilder: (r, e) => {
    var t = A0(r.html, e, !1);
    return G0(t);
  },
  mathmlBuilder: (r, e) => V0(r.mathml, e)
});
var bt = function(e) {
  if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))
    return {
      number: +e,
      unit: "bp"
    };
  var t = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);
  if (!t)
    throw new G("Invalid size: '" + e + "' in \\includegraphics");
  var a = {
    number: +(t[1] + t[2]),
    // sign + magnitude, cast to number
    unit: t[3]
  };
  if (!ia(a))
    throw new G("Invalid unit: '" + a.unit + "' in \\includegraphics.");
  return a;
};
X({
  type: "includegraphics",
  names: ["\\includegraphics"],
  props: {
    numArgs: 1,
    numOptionalArgs: 1,
    argTypes: ["raw", "url"],
    allowedInText: !1
  },
  handler: (r, e, t) => {
    var {
      parser: a
    } = r, i = {
      number: 0,
      unit: "em"
    }, n = {
      number: 0.9,
      unit: "em"
    }, o = {
      number: 0,
      unit: "em"
    }, l = "";
    if (t[0])
      for (var s = i0(t[0], "raw").string, h = s.split(","), c = 0; c < h.length; c++) {
        var m = h[c].split("=");
        if (m.length === 2) {
          var d = m[1].trim();
          switch (m[0].trim()) {
            case "alt":
              l = d;
              break;
            case "width":
              i = bt(d);
              break;
            case "height":
              n = bt(d);
              break;
            case "totalheight":
              o = bt(d);
              break;
            default:
              throw new G("Invalid key: '" + m[0] + "' in \\includegraphics.");
          }
        }
      }
    var v = i0(e[0], "url").url;
    return l === "" && (l = v, l = l.replace(/^.*[\\/]/, ""), l = l.substring(0, l.lastIndexOf("."))), a.settings.isTrusted({
      command: "\\includegraphics",
      url: v
    }) ? {
      type: "includegraphics",
      mode: a.mode,
      alt: l,
      width: i,
      height: n,
      totalheight: o,
      src: v
    } : a.formatUnsupportedCmd("\\includegraphics");
  },
  htmlBuilder: (r, e) => {
    var t = c0(r.height, e), a = 0;
    r.totalheight.number > 0 && (a = c0(r.totalheight, e) - t);
    var i = 0;
    r.width.number > 0 && (i = c0(r.width, e));
    var n = {
      height: W(t + a)
    };
    i > 0 && (n.width = W(i)), a > 0 && (n.verticalAlign = W(-a));
    var o = new An(r.src, r.alt, n);
    return o.height = t, o.depth = a, o;
  },
  mathmlBuilder: (r, e) => {
    var t = new U("mglyph", []);
    t.setAttribute("alt", r.alt);
    var a = c0(r.height, e), i = 0;
    if (r.totalheight.number > 0 && (i = c0(r.totalheight, e) - a, t.setAttribute("valign", W(-i))), t.setAttribute("height", W(a + i)), r.width.number > 0) {
      var n = c0(r.width, e);
      t.setAttribute("width", W(n));
    }
    return t.setAttribute("src", r.src), t;
  }
});
X({
  type: "kern",
  names: ["\\kern", "\\mkern", "\\hskip", "\\mskip"],
  props: {
    numArgs: 1,
    argTypes: ["size"],
    primitive: !0,
    allowedInText: !0
  },
  handler(r, e) {
    var {
      parser: t,
      funcName: a
    } = r, i = i0(e[0], "size");
    if (t.settings.strict) {
      var n = a[1] === "m", o = i.value.unit === "mu";
      n ? (o || t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + a + " supports only mu units, " + ("not " + i.value.unit + " units")), t.mode !== "math" && t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + a + " works only in math mode")) : o && t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + a + " doesn't support mu units");
    }
    return {
      type: "kern",
      mode: t.mode,
      dimension: i.value
    };
  },
  htmlBuilder(r, e) {
    return ca(r.dimension, e);
  },
  mathmlBuilder(r, e) {
    var t = c0(r.dimension, e);
    return new Aa(t);
  }
});
X({
  type: "lap",
  names: ["\\mathllap", "\\mathrlap", "\\mathclap"],
  props: {
    numArgs: 1,
    allowedInText: !0
  },
  handler: (r, e) => {
    var {
      parser: t,
      funcName: a
    } = r, i = e[0];
    return {
      type: "lap",
      mode: t.mode,
      alignment: a.slice(5),
      body: i
    };
  },
  htmlBuilder: (r, e) => {
    var t;
    r.alignment === "clap" ? (t = N([], [s0(r.body, e)]), t = N(["inner"], [t], e)) : t = N(["inner"], [s0(r.body, e)]);
    var a = N(["fix"], []), i = N([r.alignment], [t, a], e), n = N(["strut"]);
    return n.style.height = W(i.height + i.depth), i.depth && (n.style.verticalAlign = W(-i.depth)), i.children.unshift(n), i = N(["thinbox"], [i], e), N(["mord", "vbox"], [i], e);
  },
  mathmlBuilder: (r, e) => {
    var t = new U("mpadded", [l0(r.body, e)]);
    if (r.alignment !== "rlap") {
      var a = r.alignment === "llap" ? "-1" : "-0.5";
      t.setAttribute("lspace", a + "width");
    }
    return t.setAttribute("width", "0px"), t;
  }
});
X({
  type: "styling",
  names: ["\\(", "$"],
  props: {
    numArgs: 0,
    allowedInText: !0,
    allowedInMath: !1
  },
  handler(r, e) {
    var {
      funcName: t,
      parser: a
    } = r, i = a.mode;
    a.switchMode("math");
    var n = t === "\\(" ? "\\)" : "$", o = a.parseExpression(!1, n);
    return a.expect(n), a.switchMode(i), {
      type: "styling",
      mode: a.mode,
      style: "text",
      resetFont: !0,
      body: o
    };
  }
});
X({
  type: "text",
  // Doesn't matter what this is.
  names: ["\\)", "\\]"],
  props: {
    numArgs: 0,
    allowedInText: !0,
    allowedInMath: !1
  },
  handler(r, e) {
    throw new G("Mismatched " + r.funcName);
  }
});
var Nr = (r, e) => {
  switch (e.style.size) {
    case r0.DISPLAY.size:
      return r.display;
    case r0.TEXT.size:
      return r.text;
    case r0.SCRIPT.size:
      return r.script;
    case r0.SCRIPTSCRIPT.size:
      return r.scriptscript;
    default:
      return r.text;
  }
};
X({
  type: "mathchoice",
  names: ["\\mathchoice"],
  props: {
    numArgs: 4,
    primitive: !0
  },
  handler: (r, e) => {
    var {
      parser: t
    } = r;
    return {
      type: "mathchoice",
      mode: t.mode,
      display: m0(e[0]),
      text: m0(e[1]),
      script: m0(e[2]),
      scriptscript: m0(e[3])
    };
  },
  htmlBuilder: (r, e) => {
    var t = Nr(r, e), a = A0(t, e, !1);
    return G0(a);
  },
  mathmlBuilder: (r, e) => {
    var t = Nr(r, e);
    return V0(t, e);
  }
});
var Ga = (r, e, t, a, i, n, o) => {
  r = N([], [r]);
  var l = t && H0(t), s, h;
  if (e) {
    var c = s0(e, a.havingStyle(i.sup()), a);
    h = {
      elem: c,
      kern: Math.max(a.fontMetrics().bigOpSpacing1, a.fontMetrics().bigOpSpacing3 - c.depth)
    };
  }
  if (t) {
    var m = s0(t, a.havingStyle(i.sub()), a);
    s = {
      elem: m,
      kern: Math.max(a.fontMetrics().bigOpSpacing2, a.fontMetrics().bigOpSpacing4 - m.height)
    };
  }
  var d;
  if (h && s) {
    var v = a.fontMetrics().bigOpSpacing5 + s.elem.height + s.elem.depth + s.kern + r.depth + o;
    d = n0({
      positionType: "bottom",
      positionData: v,
      children: [{
        type: "kern",
        size: a.fontMetrics().bigOpSpacing5
      }, {
        type: "elem",
        elem: s.elem,
        marginLeft: W(-n)
      }, {
        type: "kern",
        size: s.kern
      }, {
        type: "elem",
        elem: r
      }, {
        type: "kern",
        size: h.kern
      }, {
        type: "elem",
        elem: h.elem,
        marginLeft: W(n)
      }, {
        type: "kern",
        size: a.fontMetrics().bigOpSpacing5
      }]
    });
  } else if (s) {
    var b = r.height - o;
    d = n0({
      positionType: "top",
      positionData: b,
      children: [{
        type: "kern",
        size: a.fontMetrics().bigOpSpacing5
      }, {
        type: "elem",
        elem: s.elem,
        marginLeft: W(-n)
      }, {
        type: "kern",
        size: s.kern
      }, {
        type: "elem",
        elem: r
      }]
    });
  } else if (h) {
    var g = r.depth + o;
    d = n0({
      positionType: "bottom",
      positionData: g,
      children: [{
        type: "elem",
        elem: r
      }, {
        type: "kern",
        size: h.kern
      }, {
        type: "elem",
        elem: h.elem,
        marginLeft: W(n)
      }, {
        type: "kern",
        size: a.fontMetrics().bigOpSpacing5
      }]
    });
  } else
    return r;
  var w = [d];
  if (s && n !== 0 && !l) {
    var B = N(["mspace"], [], a);
    B.style.marginRight = W(n), w.unshift(B);
  }
  return N(["mop", "op-limits"], w, a);
}, Ua = /* @__PURE__ */ new Set(["\\smallint"]), fe = (r, e) => {
  var t, a, i = !1, n;
  r.type === "supsub" ? (t = r.sup, a = r.sub, n = i0(r.base, "op"), i = !0) : n = i0(r, "op");
  var o = e.style, l = !1;
  o.size === r0.DISPLAY.size && n.symbol && !Ua.has(n.name) && (l = !0);
  var s, h;
  if (n.symbol) {
    var c = l ? "Size2-Regular" : "Size1-Regular", m = "";
    if ((n.name === "\\oiint" || n.name === "\\oiiint") && (m = n.name.slice(1), n.name = m === "oiint" ? "\\iint" : "\\iiint"), s = x0(n.name, c, "math", e, ["mop", "op-symbol", l ? "large-op" : "small-op"]), h = s.italic, m.length > 0) {
      var d = ma(m + "Size" + (l ? "2" : "1"), e);
      s = n0({
        positionType: "individualShift",
        children: [{
          type: "elem",
          elem: s,
          shift: 0
        }, {
          type: "elem",
          elem: d,
          shift: l ? 0.08 : 0
        }]
      }), n.name = "\\" + m, s.classes.unshift("mop"), s.italic = h;
    }
  } else if (n.body) {
    var v = A0(n.body, e, !0);
    v.length === 1 && v[0] instanceof C0 ? (s = v[0], s.classes[0] = "mop") : s = N(["mop"], v, e);
  } else {
    for (var b = [], g = 1; g < n.name.length; g++)
      b.push(Wt(n.name[g], n.mode, e));
    s = N(["mop"], b, e);
  }
  var w = 0, B = 0;
  if ((s instanceof C0 || n.name === "\\oiint" || n.name === "\\oiiint") && !n.suppressBaseShift) {
    var M;
    w = (s.height - s.depth) / 2 - e.fontMetrics().axisHeight, B = (M = s.italic) != null ? M : 0;
  }
  return i ? Ga(s, t, a, e, o, B, w) : (w && (s.style.position = "relative", s.style.top = W(w)), s);
}, be = (r, e) => {
  var t;
  if (r.symbol)
    t = new U("mo", [z0(r.name, r.mode)]), Ua.has(r.name) && t.setAttribute("largeop", "false");
  else if (r.body)
    t = new U("mo", M0(r.body, e));
  else {
    t = new U("mi", [new d0(r.name.slice(1))]);
    var a = new U("mo", [z0("⁡", "text")]);
    r.parentIsSupSub ? t = new U("mrow", [t, a]) : t = va([t, a]);
  }
  return t;
}, vs = {
  "∏": "\\prod",
  "∐": "\\coprod",
  "∑": "\\sum",
  "⋀": "\\bigwedge",
  "⋁": "\\bigvee",
  "⋂": "\\bigcap",
  "⋃": "\\bigcup",
  "⨀": "\\bigodot",
  "⨁": "\\bigoplus",
  "⨂": "\\bigotimes",
  "⨄": "\\biguplus",
  "⨆": "\\bigsqcup"
};
X({
  type: "op",
  names: ["\\coprod", "\\bigvee", "\\bigwedge", "\\biguplus", "\\bigcap", "\\bigcup", "\\intop", "\\prod", "\\sum", "\\bigotimes", "\\bigoplus", "\\bigodot", "\\bigsqcup", "\\smallint", "∏", "∐", "∑", "⋀", "⋁", "⋂", "⋃", "⨀", "⨁", "⨂", "⨄", "⨆"],
  props: {
    numArgs: 0
  },
  handler: (r, e) => {
    var {
      parser: t,
      funcName: a
    } = r, i = a;
    return i.length === 1 && (i = vs[i]), {
      type: "op",
      mode: t.mode,
      limits: !0,
      parentIsSupSub: !1,
      symbol: !0,
      name: i
    };
  },
  htmlBuilder: fe,
  mathmlBuilder: be
});
X({
  type: "op",
  names: ["\\mathop"],
  props: {
    numArgs: 1,
    primitive: !0
  },
  handler: (r, e) => {
    var {
      parser: t
    } = r, a = e[0];
    return {
      type: "op",
      mode: t.mode,
      limits: !1,
      parentIsSupSub: !1,
      symbol: !1,
      body: m0(a)
    };
  },
  htmlBuilder: fe,
  mathmlBuilder: be
});
var As = {
  "∫": "\\int",
  "∬": "\\iint",
  "∭": "\\iiint",
  "∮": "\\oint",
  "∯": "\\oiint",
  "∰": "\\oiiint"
};
X({
  type: "op",
  names: ["\\arcsin", "\\arccos", "\\arctan", "\\arctg", "\\arcctg", "\\arg", "\\ch", "\\cos", "\\cosec", "\\cosh", "\\cot", "\\cotg", "\\coth", "\\csc", "\\ctg", "\\cth", "\\deg", "\\dim", "\\exp", "\\hom", "\\ker", "\\lg", "\\ln", "\\log", "\\sec", "\\sin", "\\sinh", "\\sh", "\\tan", "\\tanh", "\\tg", "\\th"],
  props: {
    numArgs: 0
  },
  handler(r) {
    var {
      parser: e,
      funcName: t
    } = r;
    return {
      type: "op",
      mode: e.mode,
      limits: !1,
      parentIsSupSub: !1,
      symbol: !1,
      name: t
    };
  },
  htmlBuilder: fe,
  mathmlBuilder: be
});
X({
  type: "op",
  names: ["\\det", "\\gcd", "\\inf", "\\lim", "\\max", "\\min", "\\Pr", "\\sup"],
  props: {
    numArgs: 0
  },
  handler(r) {
    var {
      parser: e,
      funcName: t
    } = r;
    return {
      type: "op",
      mode: e.mode,
      limits: !0,
      parentIsSupSub: !1,
      symbol: !1,
      name: t
    };
  },
  htmlBuilder: fe,
  mathmlBuilder: be
});
X({
  type: "op",
  names: ["\\int", "\\iint", "\\iiint", "\\oint", "\\oiint", "\\oiiint", "∫", "∬", "∭", "∮", "∯", "∰"],
  props: {
    numArgs: 0,
    allowedInArgument: !0
  },
  handler(r) {
    var {
      parser: e,
      funcName: t
    } = r, a = t;
    return a.length === 1 && (a = As[a]), {
      type: "op",
      mode: e.mode,
      limits: !1,
      parentIsSupSub: !1,
      symbol: !0,
      name: a
    };
  },
  htmlBuilder: fe,
  mathmlBuilder: be
});
var ja = (r, e) => {
  var t, a, i = !1, n;
  r.type === "supsub" ? (t = r.sup, a = r.sub, n = i0(r.base, "operatorname"), i = !0) : n = i0(r, "operatorname");
  var o;
  if (n.body.length > 0) {
    for (var l = n.body.map((m) => {
      var d = "text" in m ? m.text : void 0;
      return typeof d == "string" ? {
        type: "textord",
        mode: m.mode,
        text: d
      } : m;
    }), s = A0(l, e.withFont("mathrm"), !0), h = 0; h < s.length; h++) {
      var c = s[h];
      c instanceof C0 && (c.text = c.text.replace(/\u2212/, "-").replace(/\u2217/, "*"));
    }
    o = N(["mop"], s, e);
  } else
    o = N(["mop"], [], e);
  return i ? Ga(o, t, a, e, e.style, 0, 0) : o;
}, gs = (r, e) => {
  for (var t = M0(r.body, e.withFont("mathrm")), a = !0, i = 0; i < t.length; i++) {
    var n = t[i];
    if (!(n instanceof Aa)) if (n instanceof U)
      switch (n.type) {
        case "mi":
        case "mn":
        case "mspace":
        case "mtext":
          break;
        // Do nothing yet.
        case "mo": {
          var o = n.children[0];
          n.children.length === 1 && o instanceof d0 ? o.text = o.text.replace(/\u2212/, "-").replace(/\u2217/, "*") : a = !1;
          break;
        }
        default:
          a = !1;
      }
    else
      a = !1;
  }
  if (a) {
    var l = t.map((c) => c.toText()).join("");
    t = [new d0(l)];
  }
  var s = new U("mi", t);
  s.setAttribute("mathvariant", "normal");
  var h = new U("mo", [z0("⁡", "text")]);
  return r.parentIsSupSub ? new U("mrow", [s, h]) : va([s, h]);
};
X({
  type: "operatorname",
  names: ["\\operatorname@", "\\operatornamewithlimits"],
  props: {
    numArgs: 1
  },
  handler: (r, e) => {
    var {
      parser: t,
      funcName: a
    } = r, i = e[0];
    return {
      type: "operatorname",
      mode: t.mode,
      body: m0(i),
      alwaysHandleSupSub: a === "\\operatornamewithlimits",
      limits: !1,
      parentIsSupSub: !1
    };
  },
  htmlBuilder: ja,
  mathmlBuilder: gs
});
A("\\operatorname", "\\@ifstar\\operatornamewithlimits\\operatorname@");
te({
  type: "ordgroup",
  htmlBuilder(r, e) {
    return r.semisimple ? G0(A0(r.body, e, !1)) : N(["mord"], A0(r.body, e, !0), e);
  },
  mathmlBuilder(r, e) {
    return V0(r.body, e, !0);
  }
});
X({
  type: "overline",
  names: ["\\overline"],
  props: {
    numArgs: 1
  },
  handler(r, e) {
    var {
      parser: t
    } = r, a = e[0];
    return {
      type: "overline",
      mode: t.mode,
      body: a
    };
  },
  htmlBuilder(r, e) {
    var t = s0(r.body, e.havingCrampedStyle()), a = le("overline-line", e), i = e.fontMetrics().defaultRuleThickness, n = n0({
      positionType: "firstBaseline",
      children: [{
        type: "elem",
        elem: t
      }, {
        type: "kern",
        size: 3 * i
      }, {
        type: "elem",
        elem: a
      }, {
        type: "kern",
        size: i
      }]
    });
    return N(["mord", "overline"], [n], e);
  },
  mathmlBuilder(r, e) {
    var t = new U("mo", [new d0("‾")]);
    t.setAttribute("stretchy", "true");
    var a = new U("mover", [l0(r.body, e), t]);
    return a.setAttribute("accent", "true"), a;
  }
});
X({
  type: "phantom",
  names: ["\\phantom"],
  props: {
    numArgs: 1,
    allowedInText: !0
  },
  handler: (r, e) => {
    var {
      parser: t
    } = r, a = e[0];
    return {
      type: "phantom",
      mode: t.mode,
      body: m0(a)
    };
  },
  htmlBuilder: (r, e) => {
    var t = A0(r.body, e.withPhantom(), !1);
    return G0(t);
  },
  mathmlBuilder: (r, e) => {
    var t = M0(r.body, e);
    return new U("mphantom", t);
  }
});
A("\\hphantom", "\\smash{\\phantom{#1}}");
X({
  type: "vphantom",
  names: ["\\vphantom"],
  props: {
    numArgs: 1,
    allowedInText: !0
  },
  handler: (r, e) => {
    var {
      parser: t
    } = r, a = e[0];
    return {
      type: "vphantom",
      mode: t.mode,
      body: a
    };
  },
  htmlBuilder: (r, e) => {
    var t = N(["inner"], [s0(r.body, e.withPhantom())]), a = N(["fix"], []);
    return N(["mord", "rlap"], [t, a], e);
  },
  mathmlBuilder: (r, e) => {
    var t = M0(m0(r.body), e), a = new U("mphantom", t), i = new U("mpadded", [a]);
    return i.setAttribute("width", "0px"), i;
  }
});
X({
  type: "raisebox",
  names: ["\\raisebox"],
  props: {
    numArgs: 2,
    argTypes: ["size", "hbox"],
    allowedInText: !0
  },
  handler(r, e) {
    var {
      parser: t
    } = r, a = i0(e[0], "size").value, i = e[1];
    return {
      type: "raisebox",
      mode: t.mode,
      dy: a,
      body: i
    };
  },
  htmlBuilder(r, e) {
    var t = s0(r.body, e), a = c0(r.dy, e);
    return n0({
      positionType: "shift",
      positionData: -a,
      children: [{
        type: "elem",
        elem: t
      }]
    });
  },
  mathmlBuilder(r, e) {
    var t = new U("mpadded", [l0(r.body, e)]), a = r.dy.number + r.dy.unit;
    return t.setAttribute("voffset", a), t;
  }
});
X({
  type: "internal",
  names: ["\\relax"],
  props: {
    numArgs: 0,
    allowedInText: !0,
    allowedInArgument: !0
  },
  handler(r) {
    var {
      parser: e
    } = r;
    return {
      type: "internal",
      mode: e.mode
    };
  }
});
X({
  type: "rule",
  names: ["\\rule"],
  props: {
    numArgs: 2,
    numOptionalArgs: 1,
    allowedInText: !0,
    allowedInMath: !0,
    argTypes: ["size", "size", "size"]
  },
  handler(r, e, t) {
    var {
      parser: a
    } = r, i = t[0], n = i0(e[0], "size"), o = i0(e[1], "size");
    return {
      type: "rule",
      mode: a.mode,
      shift: i && i0(i, "size").value,
      width: n.value,
      height: o.value
    };
  },
  htmlBuilder(r, e) {
    var t = N(["mord", "rule"], [], e), a = c0(r.width, e), i = c0(r.height, e), n = r.shift ? c0(r.shift, e) : 0;
    return t.style.borderRightWidth = W(a), t.style.borderTopWidth = W(i), t.style.bottom = W(n), t.width = a, t.height = i + n, t.depth = -n, t.maxFontSize = i * 1.125 * e.sizeMultiplier, t;
  },
  mathmlBuilder(r, e) {
    var t = c0(r.width, e), a = c0(r.height, e), i = r.shift ? c0(r.shift, e) : 0, n = e.color && e.getColor() || "black", o = new U("mspace");
    o.setAttribute("mathbackground", n), o.setAttribute("width", W(t)), o.setAttribute("height", W(a));
    var l = new U("mpadded", [o]);
    return i >= 0 ? l.setAttribute("height", W(i)) : (l.setAttribute("height", W(i)), l.setAttribute("depth", W(-i))), l.setAttribute("voffset", W(i)), l;
  }
});
function Ya(r, e, t) {
  for (var a = A0(r, e, !1), i = e.sizeMultiplier / t.sizeMultiplier, n = 0; n < a.length; n++) {
    var o = a[n].classes.indexOf("sizing");
    o < 0 ? Array.prototype.push.apply(a[n].classes, e.sizingClasses(t)) : a[n].classes[o + 1] === "reset-size" + e.size && (a[n].classes[o + 1] = "reset-size" + t.size), a[n].height *= i, a[n].depth *= i;
  }
  return G0(a);
}
var Hr = ["\\tiny", "\\sixptsize", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"], bs = (r, e) => {
  var t = e.havingSize(r.size);
  return Ya(r.body, t, e);
};
X({
  type: "sizing",
  names: Hr,
  props: {
    numArgs: 0,
    allowedInText: !0
  },
  handler: (r, e) => {
    var {
      breakOnTokenText: t,
      funcName: a,
      parser: i
    } = r, n = i.parseExpression(!1, t);
    return {
      type: "sizing",
      mode: i.mode,
      // Figure out what size to use based on the list of functions above
      size: Hr.indexOf(a) + 1,
      body: n
    };
  },
  htmlBuilder: bs,
  mathmlBuilder: (r, e) => {
    var t = e.havingSize(r.size), a = M0(r.body, t), i = new U("mstyle", a);
    return i.setAttribute("mathsize", W(t.sizeMultiplier)), i;
  }
});
X({
  type: "smash",
  names: ["\\smash"],
  props: {
    numArgs: 1,
    numOptionalArgs: 1,
    allowedInText: !0
  },
  handler: (r, e, t) => {
    var {
      parser: a
    } = r, i = !1, n = !1, o = t[0] && i0(t[0], "ordgroup");
    if (o)
      for (var l, s = 0; s < o.body.length; ++s) {
        var h = o.body[s];
        if (l = Ve(h).text, l === "t")
          i = !0;
        else if (l === "b")
          n = !0;
        else {
          i = !1, n = !1;
          break;
        }
      }
    else
      i = !0, n = !0;
    var c = e[0];
    return {
      type: "smash",
      mode: a.mode,
      body: c,
      smashHeight: i,
      smashDepth: n
    };
  },
  htmlBuilder: (r, e) => {
    var t = N([], [s0(r.body, e)]);
    if (!r.smashHeight && !r.smashDepth)
      return t;
    if (r.smashHeight && (t.height = 0), r.smashDepth && (t.depth = 0), r.smashHeight && r.smashDepth)
      return N(["mord", "smash"], [t], e);
    if (t.children)
      for (var a = 0; a < t.children.length; a++)
        r.smashHeight && (t.children[a].height = 0), r.smashDepth && (t.children[a].depth = 0);
    var i = n0({
      positionType: "firstBaseline",
      children: [{
        type: "elem",
        elem: t
      }]
    });
    return N(["mord"], [i], e);
  },
  mathmlBuilder: (r, e) => {
    var t = new U("mpadded", [l0(r.body, e)]);
    return r.smashHeight && t.setAttribute("height", "0px"), r.smashDepth && t.setAttribute("depth", "0px"), t;
  }
});
X({
  type: "sqrt",
  names: ["\\sqrt"],
  props: {
    numArgs: 1,
    numOptionalArgs: 1
  },
  handler(r, e, t) {
    var {
      parser: a
    } = r, i = t[0], n = e[0];
    return {
      type: "sqrt",
      mode: a.mode,
      body: n,
      index: i
    };
  },
  htmlBuilder(r, e) {
    var t = s0(r.body, e.havingCrampedStyle());
    t.height === 0 && (t.height = e.fontMetrics().xHeight), t = oe(t, e);
    var a = e.fontMetrics(), i = a.defaultRuleThickness, n = i;
    e.style.id < r0.TEXT.id && (n = e.fontMetrics().xHeight);
    var o = i + n / 4, l = t.height + t.depth + o + i, {
      span: s,
      ruleWidth: h,
      advanceWidth: c
    } = ns(l, e), m = s.height - h;
    m > t.height + t.depth + o && (o = (o + m - t.height - t.depth) / 2);
    var d = s.height - t.height - o - h;
    t.style.paddingLeft = W(c);
    var v = n0({
      positionType: "firstBaseline",
      children: [{
        type: "elem",
        elem: t,
        wrapperClasses: ["svg-align"]
      }, {
        type: "kern",
        size: -(t.height + d)
      }, {
        type: "elem",
        elem: s
      }, {
        type: "kern",
        size: h
      }]
    });
    if (r.index) {
      var b = e.havingStyle(r0.SCRIPTSCRIPT), g = s0(r.index, b, e), w = 0.6 * (v.height - v.depth), B = n0({
        positionType: "shift",
        positionData: -w,
        children: [{
          type: "elem",
          elem: g
        }]
      }), M = N(["root"], [B]);
      return N(["mord", "sqrt"], [M, v], e);
    } else
      return N(["mord", "sqrt"], [v], e);
  },
  mathmlBuilder(r, e) {
    var {
      body: t,
      index: a
    } = r;
    return a ? new U("mroot", [l0(t, e), l0(a, e)]) : new U("msqrt", [l0(t, e)]);
  }
});
var Pt = {
  display: r0.DISPLAY,
  text: r0.TEXT,
  script: r0.SCRIPT,
  scriptscript: r0.SCRIPTSCRIPT
};
function ys(r) {
  return r in Pt;
}
X({
  type: "styling",
  names: ["\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle"],
  props: {
    numArgs: 0,
    allowedInText: !0,
    primitive: !0
  },
  handler(r, e) {
    var {
      breakOnTokenText: t,
      funcName: a,
      parser: i
    } = r, n = i.parseExpression(!0, t), o = a.slice(1, a.length - 5);
    if (!ys(o))
      throw new Error("Unknown style: " + o);
    return {
      type: "styling",
      mode: i.mode,
      // Figure out what style to use by pulling out the style from
      // the function name
      style: o,
      body: n
    };
  },
  htmlBuilder(r, e) {
    var t = Pt[r.style], a = e.havingStyle(t);
    return r.resetFont && (a = a.withFont("")), Ya(r.body, a, e);
  },
  mathmlBuilder(r, e) {
    var t = Pt[r.style], a = e.havingStyle(t);
    r.resetFont && (a = a.withFont(""));
    var i = M0(r.body, a), n = new U("mstyle", i), o = {
      display: ["0", "true"],
      text: ["0", "false"],
      script: ["1", "false"],
      scriptscript: ["2", "false"]
    }, l = o[r.style];
    return n.setAttribute("scriptlevel", l[0]), n.setAttribute("displaystyle", l[1]), n;
  }
});
var ws = function(e, t) {
  var a = e.base;
  if (a)
    if (a.type === "op") {
      var i = a.limits && (t.style.size === r0.DISPLAY.size || a.alwaysHandleSupSub);
      return i ? fe : null;
    } else if (a.type === "operatorname") {
      var n = a.alwaysHandleSupSub && (t.style.size === r0.DISPLAY.size || a.limits);
      return n ? ja : null;
    } else {
      if (a.type === "accent")
        return H0(a.base) ? Zt : null;
      if (a.type === "horizBrace") {
        var o = !e.sub;
        return o === a.isOver ? La : null;
      } else
        return null;
    }
  else return null;
};
te({
  type: "supsub",
  htmlBuilder(r, e) {
    var t = ws(r, e);
    if (t)
      return t(r, e);
    var {
      base: a,
      sup: i,
      sub: n
    } = r, o = s0(a, e), l, s, h = e.fontMetrics(), c = 0, m = 0, d = a && H0(a);
    if (i) {
      var v = e.havingStyle(e.style.sup());
      l = s0(i, v, e), d || (c = o.height - v.fontMetrics().supDrop * v.sizeMultiplier / e.sizeMultiplier);
    }
    if (n) {
      var b = e.havingStyle(e.style.sub());
      s = s0(n, b, e), d || (m = o.depth + b.fontMetrics().subDrop * b.sizeMultiplier / e.sizeMultiplier);
    }
    var g;
    e.style === r0.DISPLAY ? g = h.sup1 : e.style.cramped ? g = h.sup3 : g = h.sup2;
    var w = e.sizeMultiplier, B = W(0.5 / h.ptPerEm / w), M = null;
    if (s) {
      var _ = r.base && r.base.type === "op" && r.base.name && (r.base.name === "\\oiint" || r.base.name === "\\oiiint");
      if (o instanceof C0 || _) {
        var z;
        M = W(-((z = o.italic) != null ? z : 0));
      }
    }
    var D;
    if (l && s) {
      c = Math.max(c, g, l.depth + 0.25 * h.xHeight), m = Math.max(m, h.sub2);
      var R = h.defaultRuleThickness, O = 4 * R;
      if (c - l.depth - (s.height - m) < O) {
        m = O - (c - l.depth) + s.height;
        var F = 0.8 * h.xHeight - (c - l.depth);
        F > 0 && (c += F, m -= F);
      }
      var Q = [{
        type: "elem",
        elem: s,
        shift: m,
        marginRight: B,
        marginLeft: M
      }, {
        type: "elem",
        elem: l,
        shift: -c,
        marginRight: B
      }];
      D = n0({
        positionType: "individualShift",
        children: Q
      });
    } else if (s) {
      m = Math.max(m, h.sub1, s.height - 0.8 * h.xHeight);
      var H = [{
        type: "elem",
        elem: s,
        marginLeft: M,
        marginRight: B
      }];
      D = n0({
        positionType: "shift",
        positionData: m,
        children: H
      });
    } else if (l)
      c = Math.max(c, g, l.depth + 0.25 * h.xHeight), D = n0({
        positionType: "shift",
        positionData: -c,
        children: [{
          type: "elem",
          elem: l,
          marginRight: B
        }]
      });
    else
      throw new Error("supsub must have either sup or sub.");
    var L = Ft(o, "right") || "mord";
    return N([L], [o, N(["msupsub"], [D])], e);
  },
  mathmlBuilder(r, e) {
    var t = !1, a, i;
    r.base && r.base.type === "horizBrace" && (i = !!r.sup, i === r.base.isOver && (t = !0, a = r.base.isOver)), r.base && (r.base.type === "op" || r.base.type === "operatorname") && (r.base.parentIsSupSub = !0);
    var n = [l0(r.base, e)];
    r.sub && n.push(l0(r.sub, e)), r.sup && n.push(l0(r.sup, e));
    var o;
    if (t)
      o = a ? "mover" : "munder";
    else if (r.sub)
      if (r.sup) {
        var h = r.base;
        h && h.type === "op" && h.limits && e.style === r0.DISPLAY || h && h.type === "operatorname" && h.alwaysHandleSupSub && (e.style === r0.DISPLAY || h.limits) ? o = "munderover" : o = "msubsup";
      } else {
        var s = r.base;
        s && s.type === "op" && s.limits && (e.style === r0.DISPLAY || s.alwaysHandleSupSub) || s && s.type === "operatorname" && s.alwaysHandleSupSub && (s.limits || e.style === r0.DISPLAY) ? o = "munder" : o = "msub";
      }
    else {
      var l = r.base;
      l && l.type === "op" && l.limits && (e.style === r0.DISPLAY || l.alwaysHandleSupSub) || l && l.type === "operatorname" && l.alwaysHandleSupSub && (l.limits || e.style === r0.DISPLAY) ? o = "mover" : o = "msup";
    }
    return new U(o, n);
  }
});
te({
  type: "atom",
  htmlBuilder(r, e) {
    return Wt(r.text, r.mode, e, ["m" + r.family]);
  },
  mathmlBuilder(r, e) {
    var t = new U("mo", [z0(r.text, r.mode)]);
    if (r.family === "bin") {
      var a = Vt(r, e);
      a === "bold-italic" && t.setAttribute("mathvariant", a);
    } else r.family === "punct" ? t.setAttribute("separator", "true") : (r.family === "open" || r.family === "close") && t.setAttribute("stretchy", "false");
    return t;
  }
});
var Wa = {
  mi: "italic",
  mn: "normal",
  mtext: "normal"
};
te({
  type: "mathord",
  htmlBuilder(r, e) {
    return We(r, e, "mathord");
  },
  mathmlBuilder(r, e) {
    var t = new U("mi", [z0(r.text, r.mode, e)]), a = Vt(r, e) || "italic";
    return a !== Wa[t.type] && t.setAttribute("mathvariant", a), t;
  }
});
te({
  type: "textord",
  htmlBuilder(r, e) {
    return We(r, e, "textord");
  },
  mathmlBuilder(r, e) {
    var t = z0(r.text, r.mode, e), a = Vt(r, e) || "normal", i;
    return r.mode === "text" ? i = new U("mtext", [t]) : /[0-9]/.test(r.text) ? i = new U("mn", [t]) : r.text === "\\prime" ? i = new U("mo", [t]) : i = new U("mi", [t]), a !== Wa[i.type] && i.setAttribute("mathvariant", a), i;
  }
});
var yt = {
  "\\nobreak": "nobreak",
  "\\allowbreak": "allowbreak"
}, wt = {
  " ": {},
  "\\ ": {},
  "~": {
    className: "nobreak"
  },
  "\\space": {},
  "\\nobreakspace": {
    className: "nobreak"
  }
};
te({
  type: "spacing",
  htmlBuilder(r, e) {
    if (wt.hasOwnProperty(r.text)) {
      var t = wt[r.text].className || "";
      if (r.mode === "text") {
        var a = We(r, e, "textord");
        return a.classes.push(t), a;
      } else
        return N(["mspace", t], [Wt(r.text, r.mode, e)], e);
    } else {
      if (yt.hasOwnProperty(r.text))
        return N(["mspace", yt[r.text]], [], e);
      throw new G('Unknown type of space "' + r.text + '"');
    }
  },
  mathmlBuilder(r, e) {
    var t;
    if (wt.hasOwnProperty(r.text))
      t = new U("mtext", [new d0(" ")]);
    else {
      if (yt.hasOwnProperty(r.text))
        return new U("mspace");
      throw new G('Unknown type of space "' + r.text + '"');
    }
    return t;
  }
});
var Lr = () => {
  var r = new U("mtd", []);
  return r.setAttribute("width", "50%"), r;
};
te({
  type: "tag",
  mathmlBuilder(r, e) {
    var t = new U("mtable", [new U("mtr", [Lr(), new U("mtd", [V0(r.body, e)]), Lr(), new U("mtd", [V0(r.tag, e)])])]);
    return t.setAttribute("width", "100%"), t;
  }
});
var Gr = {
  "\\text": void 0,
  "\\textrm": "textrm",
  "\\textsf": "textsf",
  "\\texttt": "texttt",
  "\\textnormal": "textrm"
}, Ur = {
  "\\textbf": "textbf",
  "\\textmd": "textmd"
}, xs = {
  "\\textit": "textit",
  "\\textup": "textup"
}, jr = (r, e) => {
  var t = r.font;
  if (t) {
    if (Gr[t])
      return e.withTextFontFamily(Gr[t]);
    if (Ur[t])
      return e.withTextFontWeight(Ur[t]);
    if (t === "\\emph")
      return e.fontShape === "textit" ? e.withTextFontShape("textup") : e.withTextFontShape("textit");
  } else return e;
  return e.withTextFontShape(xs[t]);
};
X({
  type: "text",
  names: [
    // Font families
    "\\text",
    "\\textrm",
    "\\textsf",
    "\\texttt",
    "\\textnormal",
    // Font weights
    "\\textbf",
    "\\textmd",
    // Font Shapes
    "\\textit",
    "\\textup",
    "\\emph"
  ],
  props: {
    numArgs: 1,
    argTypes: ["text"],
    allowedInArgument: !0,
    allowedInText: !0
  },
  handler(r, e) {
    var {
      parser: t,
      funcName: a
    } = r, i = e[0];
    return {
      type: "text",
      mode: t.mode,
      body: m0(i),
      font: a
    };
  },
  htmlBuilder(r, e) {
    var t = jr(r, e), a = A0(r.body, t, !0);
    return N(["mord", "text"], a, t);
  },
  mathmlBuilder(r, e) {
    var t = jr(r, e);
    return V0(r.body, t);
  }
});
X({
  type: "underline",
  names: ["\\underline"],
  props: {
    numArgs: 1,
    allowedInText: !0
  },
  handler(r, e) {
    var {
      parser: t
    } = r;
    return {
      type: "underline",
      mode: t.mode,
      body: e[0]
    };
  },
  htmlBuilder(r, e) {
    var t = s0(r.body, e), a = le("underline-line", e), i = e.fontMetrics().defaultRuleThickness, n = n0({
      positionType: "top",
      positionData: t.height,
      children: [{
        type: "kern",
        size: i
      }, {
        type: "elem",
        elem: a
      }, {
        type: "kern",
        size: 3 * i
      }, {
        type: "elem",
        elem: t
      }]
    });
    return N(["mord", "underline"], [n], e);
  },
  mathmlBuilder(r, e) {
    var t = new U("mo", [new d0("‾")]);
    t.setAttribute("stretchy", "true");
    var a = new U("munder", [l0(r.body, e), t]);
    return a.setAttribute("accentunder", "true"), a;
  }
});
X({
  type: "vcenter",
  names: ["\\vcenter"],
  props: {
    numArgs: 1,
    argTypes: ["original"],
    // In LaTeX, \vcenter can act only on a box.
    allowedInText: !1
  },
  handler(r, e) {
    var {
      parser: t
    } = r;
    return {
      type: "vcenter",
      mode: t.mode,
      body: e[0]
    };
  },
  htmlBuilder(r, e) {
    var t = s0(r.body, e), a = e.fontMetrics().axisHeight, i = 0.5 * (t.height - a - (t.depth + a));
    return n0({
      positionType: "shift",
      positionData: i,
      children: [{
        type: "elem",
        elem: t
      }]
    });
  },
  mathmlBuilder(r, e) {
    var t = new U("mpadded", [l0(r.body, e)], ["vcenter"]);
    return new U("mrow", [t]);
  }
});
X({
  type: "verb",
  names: ["\\verb"],
  props: {
    numArgs: 0,
    allowedInText: !0
  },
  handler(r, e, t) {
    throw new G("\\verb ended by end of line instead of matching delimiter");
  },
  htmlBuilder(r, e) {
    for (var t = Yr(r), a = [], i = e.havingStyle(e.style.text()), n = 0; n < t.length; n++) {
      var o = t[n];
      o === "~" && (o = "\\textasciitilde"), a.push(x0(o, "Typewriter-Regular", r.mode, i, ["mord", "texttt"]));
    }
    return N(["mord", "text"].concat(i.sizingClasses(e)), ha(a), i);
  },
  mathmlBuilder(r, e) {
    var t = new d0(Yr(r)), a = new U("mtext", [t]);
    return a.setAttribute("mathvariant", "monospace"), a;
  }
});
var Yr = (r) => r.body.replace(/ /g, r.star ? "␣" : " "), Y0 = da, Xa = `[ \r
	]`, Is = "\\\\[a-zA-Z@]+", Bs = "\\\\[^\uD800-\uDFFF]", ks = "(" + Is + ")" + Xa + "*", _s = `\\\\(
|[ \r	]+
?)[ \r	]*`, Nt = "[̀-ͯ]", Cs = new RegExp(Nt + "+$"), Ss = "(" + Xa + "+)|" + // whitespace
(_s + "|") + // \whitespace
"([!-\\[\\]-‧‪-퟿豈-]" + // single codepoint
(Nt + "*") + // ...plus accents
"|[\uD800-\uDBFF][\uDC00-\uDFFF]" + // surrogate pair
(Nt + "*") + // ...plus accents
"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5" + // \verb unstarred
("|" + ks) + // \macroName + spaces
("|" + Bs + ")");
class Wr {
  constructor(e, t) {
    this.input = void 0, this.settings = void 0, this.tokenRegex = void 0, this.catcodes = void 0, this.input = e, this.settings = t, this.tokenRegex = new RegExp(Ss, "g"), this.catcodes = {
      "%": 14,
      // comment character
      "~": 13
      // active character
    };
  }
  setCatcode(e, t) {
    this.catcodes[e] = t;
  }
  /**
   * This function lexes a single token.
   */
  lex() {
    var e = this.input, t = this.tokenRegex.lastIndex;
    if (t === e.length)
      return new _0("EOF", new k0(this, t, t));
    var a = this.tokenRegex.exec(e);
    if (a === null || a.index !== t)
      throw new G("Unexpected character: '" + e[t] + "'", new _0(e[t], new k0(this, t, t + 1)));
    var i = a[6] || a[3] || (a[2] ? "\\ " : " ");
    if (this.catcodes[i] === 14) {
      var n = e.indexOf(`
`, this.tokenRegex.lastIndex);
      return n === -1 ? (this.tokenRegex.lastIndex = e.length, this.settings.reportNonstrict("commentAtEnd", "% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")) : this.tokenRegex.lastIndex = n + 1, this.lex();
    }
    return new _0(i, new k0(this, t, this.tokenRegex.lastIndex));
  }
}
class Ms {
  /**
   * Both arguments are optional.  The first argument is an object of
   * built-in mappings which never change.  The second argument is an object
   * of initial (global-level) mappings, which will constantly change
   * according to any global/top-level `set`s done.
   */
  constructor(e, t) {
    e === void 0 && (e = {}), t === void 0 && (t = {}), this.current = void 0, this.builtins = void 0, this.undefStack = void 0, this.current = t, this.builtins = e, this.undefStack = [];
  }
  /**
   * Start a new nested group, affecting future local `set`s.
   */
  beginGroup() {
    this.undefStack.push({});
  }
  /**
   * End current nested group, restoring values before the group began.
   */
  endGroup() {
    if (this.undefStack.length === 0)
      throw new G("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");
    var e = this.undefStack.pop();
    for (var t in e)
      e.hasOwnProperty(t) && (e[t] == null ? delete this.current[t] : this.current[t] = e[t]);
  }
  /**
   * Ends all currently nested groups (if any), restoring values before the
   * groups began.  Useful in case of an error in the middle of parsing.
   */
  endGroups() {
    for (; this.undefStack.length > 0; )
      this.endGroup();
  }
  /**
   * Detect whether `name` has a definition.  Equivalent to
   * `get(name) != null`.
   */
  has(e) {
    return this.current.hasOwnProperty(e) || this.builtins.hasOwnProperty(e);
  }
  /**
   * Get the current value of a name, or `undefined` if there is no value.
   *
   * Note: Do not use `if (namespace.get(...))` to detect whether a macro
   * is defined, as the definition may be the empty string which evaluates
   * to `false` in JavaScript.  Use `if (namespace.get(...) != null)` or
   * `if (namespace.has(...))`.
   */
  get(e) {
    return this.current.hasOwnProperty(e) ? this.current[e] : this.builtins[e];
  }
  /**
   * Set the current value of a name, and optionally set it globally too.
   * Local set() sets the current value and (when appropriate) adds an undo
   * operation to the undo stack.  Global set() may change the undo
   * operation at every level, so takes time linear in their number.
   * A value of undefined means to delete existing definitions.
   */
  set(e, t, a) {
    if (a === void 0 && (a = !1), a) {
      for (var i = 0; i < this.undefStack.length; i++)
        delete this.undefStack[i][e];
      this.undefStack.length > 0 && (this.undefStack[this.undefStack.length - 1][e] = t);
    } else {
      var n = this.undefStack[this.undefStack.length - 1];
      n && !n.hasOwnProperty(e) && (n[e] = this.current[e]);
    }
    t == null ? delete this.current[e] : this.current[e] = t;
  }
}
var Es = Oa;
A("\\noexpand", function(r) {
  var e = r.popToken();
  return r.isExpandable(e.text) && (e.noexpand = !0, e.treatAsRelax = !0), {
    tokens: [e],
    numArgs: 0
  };
});
A("\\expandafter", function(r) {
  var e = r.popToken();
  return r.expandOnce(!0), {
    tokens: [e],
    numArgs: 0
  };
});
A("\\@firstoftwo", function(r) {
  var e = r.consumeArgs(2);
  return {
    tokens: e[0],
    numArgs: 0
  };
});
A("\\@secondoftwo", function(r) {
  var e = r.consumeArgs(2);
  return {
    tokens: e[1],
    numArgs: 0
  };
});
A("\\@ifnextchar", function(r) {
  var e = r.consumeArgs(3);
  r.consumeSpaces();
  var t = r.future();
  return e[0].length === 1 && e[0][0].text === t.text ? {
    tokens: e[1],
    numArgs: 0
  } : {
    tokens: e[2],
    numArgs: 0
  };
});
A("\\@ifstar", "\\@ifnextchar *{\\@firstoftwo{#1}}");
A("\\TextOrMath", function(r) {
  var e = r.consumeArgs(2);
  return r.mode === "text" ? {
    tokens: e[0],
    numArgs: 0
  } : {
    tokens: e[1],
    numArgs: 0
  };
});
var Xr = {
  0: 0,
  1: 1,
  2: 2,
  3: 3,
  4: 4,
  5: 5,
  6: 6,
  7: 7,
  8: 8,
  9: 9,
  a: 10,
  A: 10,
  b: 11,
  B: 11,
  c: 12,
  C: 12,
  d: 13,
  D: 13,
  e: 14,
  E: 14,
  f: 15,
  F: 15
};
A("\\char", function(r) {
  var e = r.popToken(), t, a = 0;
  if (e.text === "'")
    t = 8, e = r.popToken();
  else if (e.text === '"')
    t = 16, e = r.popToken();
  else if (e.text === "`")
    if (e = r.popToken(), e.text[0] === "\\")
      a = e.text.charCodeAt(1);
    else {
      if (e.text === "EOF")
        throw new G("\\char` missing argument");
      a = e.text.charCodeAt(0);
    }
  else
    t = 10;
  if (t) {
    if (a = Xr[e.text], a == null || a >= t)
      throw new G("Invalid base-" + t + " digit " + e.text);
    for (var i; (i = Xr[r.future().text]) != null && i < t; )
      a *= t, a += i, r.popToken();
  }
  return "\\@char{" + a + "}";
});
var tr = (r, e, t, a) => {
  var i = r.consumeArg().tokens;
  if (i.length !== 1)
    throw new G("\\newcommand's first argument must be a macro name");
  var n = i[0].text, o = r.isDefined(n);
  if (o && !e)
    throw new G("\\newcommand{" + n + "} attempting to redefine " + (n + "; use \\renewcommand"));
  if (!o && !t)
    throw new G("\\renewcommand{" + n + "} when command " + n + " does not yet exist; use \\newcommand");
  var l = 0;
  if (i = r.consumeArg().tokens, i.length === 1 && i[0].text === "[") {
    for (var s = "", h = r.expandNextToken(); h.text !== "]" && h.text !== "EOF"; )
      s += h.text, h = r.expandNextToken();
    if (!s.match(/^\s*[0-9]+\s*$/))
      throw new G("Invalid number of arguments: " + s);
    l = parseInt(s), i = r.consumeArg().tokens;
  }
  return o && a || r.macros.set(n, {
    tokens: i,
    numArgs: l
  }), "";
};
A("\\newcommand", (r) => tr(r, !1, !0, !1));
A("\\renewcommand", (r) => tr(r, !0, !1, !1));
A("\\providecommand", (r) => tr(r, !0, !0, !0));
A("\\message", (r) => {
  var e = r.consumeArgs(1)[0];
  return console.log(e.reverse().map((t) => t.text).join("")), "";
});
A("\\errmessage", (r) => {
  var e = r.consumeArgs(1)[0];
  return console.error(e.reverse().map((t) => t.text).join("")), "";
});
A("\\show", (r) => {
  var e = r.popToken(), t = e.text;
  return console.log(e, r.macros.get(t), Y0[t], o0.math[t], o0.text[t]), "";
});
A("\\bgroup", "{");
A("\\egroup", "}");
A("~", "\\nobreakspace");
A("\\lq", "`");
A("\\rq", "'");
A("\\aa", "\\r a");
A("\\AA", "\\r A");
A("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}");
A("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");
A("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");
A("ℬ", "\\mathscr{B}");
A("ℰ", "\\mathscr{E}");
A("ℱ", "\\mathscr{F}");
A("ℋ", "\\mathscr{H}");
A("ℐ", "\\mathscr{I}");
A("ℒ", "\\mathscr{L}");
A("ℳ", "\\mathscr{M}");
A("ℛ", "\\mathscr{R}");
A("ℭ", "\\mathfrak{C}");
A("ℌ", "\\mathfrak{H}");
A("ℨ", "\\mathfrak{Z}");
A("\\Bbbk", "\\Bbb{k}");
A("\\llap", "\\mathllap{\\textrm{#1}}");
A("\\rlap", "\\mathrlap{\\textrm{#1}}");
A("\\clap", "\\mathclap{\\textrm{#1}}");
A("\\mathstrut", "\\vphantom{(}");
A("\\underbar", "\\underline{\\text{#1}}");
A("\\not", '\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');
A("\\neq", "\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");
A("\\ne", "\\neq");
A("≠", "\\neq");
A("\\notin", "\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");
A("∉", "\\notin");
A("≘", "\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");
A("≙", "\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");
A("≚", "\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");
A("≛", "\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");
A("≝", "\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");
A("≞", "\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");
A("≟", "\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");
A("⟂", "\\perp");
A("‼", "\\mathclose{!\\mkern-0.8mu!}");
A("∌", "\\notni");
A("⌜", "\\ulcorner");
A("⌝", "\\urcorner");
A("⌞", "\\llcorner");
A("⌟", "\\lrcorner");
A("©", "\\copyright");
A("®", "\\textregistered");
A("\\ulcorner", '\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');
A("\\urcorner", '\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');
A("\\llcorner", '\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');
A("\\lrcorner", '\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');
A("\\vdots", "{\\varvdots\\rule{0pt}{15pt}}");
A("⋮", "\\vdots");
A("\\varGamma", "\\mathit{\\Gamma}");
A("\\varDelta", "\\mathit{\\Delta}");
A("\\varTheta", "\\mathit{\\Theta}");
A("\\varLambda", "\\mathit{\\Lambda}");
A("\\varXi", "\\mathit{\\Xi}");
A("\\varPi", "\\mathit{\\Pi}");
A("\\varSigma", "\\mathit{\\Sigma}");
A("\\varUpsilon", "\\mathit{\\Upsilon}");
A("\\varPhi", "\\mathit{\\Phi}");
A("\\varPsi", "\\mathit{\\Psi}");
A("\\varOmega", "\\mathit{\\Omega}");
A("\\substack", "\\begin{subarray}{c}#1\\end{subarray}");
A("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");
A("\\boxed", "\\fbox{$\\displaystyle{#1}$}");
A("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;");
A("\\implies", "\\DOTSB\\;\\Longrightarrow\\;");
A("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;");
A("\\dddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");
A("\\ddddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");
var $r = {
  ",": "\\dotsc",
  "\\not": "\\dotsb",
  // \keybin@ checks for the following:
  "+": "\\dotsb",
  "=": "\\dotsb",
  "<": "\\dotsb",
  ">": "\\dotsb",
  "-": "\\dotsb",
  "*": "\\dotsb",
  ":": "\\dotsb",
  // Symbols whose definition starts with \DOTSB:
  "\\DOTSB": "\\dotsb",
  "\\coprod": "\\dotsb",
  "\\bigvee": "\\dotsb",
  "\\bigwedge": "\\dotsb",
  "\\biguplus": "\\dotsb",
  "\\bigcap": "\\dotsb",
  "\\bigcup": "\\dotsb",
  "\\prod": "\\dotsb",
  "\\sum": "\\dotsb",
  "\\bigotimes": "\\dotsb",
  "\\bigoplus": "\\dotsb",
  "\\bigodot": "\\dotsb",
  "\\bigsqcup": "\\dotsb",
  "\\And": "\\dotsb",
  "\\longrightarrow": "\\dotsb",
  "\\Longrightarrow": "\\dotsb",
  "\\longleftarrow": "\\dotsb",
  "\\Longleftarrow": "\\dotsb",
  "\\longleftrightarrow": "\\dotsb",
  "\\Longleftrightarrow": "\\dotsb",
  "\\mapsto": "\\dotsb",
  "\\longmapsto": "\\dotsb",
  "\\hookrightarrow": "\\dotsb",
  "\\doteq": "\\dotsb",
  // Symbols whose definition starts with \mathbin:
  "\\mathbin": "\\dotsb",
  // Symbols whose definition starts with \mathrel:
  "\\mathrel": "\\dotsb",
  "\\relbar": "\\dotsb",
  "\\Relbar": "\\dotsb",
  "\\xrightarrow": "\\dotsb",
  "\\xleftarrow": "\\dotsb",
  // Symbols whose definition starts with \DOTSI:
  "\\DOTSI": "\\dotsi",
  "\\int": "\\dotsi",
  "\\oint": "\\dotsi",
  "\\iint": "\\dotsi",
  "\\iiint": "\\dotsi",
  "\\iiiint": "\\dotsi",
  "\\idotsint": "\\dotsi",
  // Symbols whose definition starts with \DOTSX:
  "\\DOTSX": "\\dotsx"
}, zs = /* @__PURE__ */ new Set(["bin", "rel"]);
A("\\dots", function(r) {
  var e = "\\dotso", t = r.expandAfterFuture().text;
  return t in $r ? e = $r[t] : (t.slice(0, 4) === "\\not" || t in o0.math && zs.has(o0.math[t].group)) && (e = "\\dotsb"), e;
});
var rr = {
  // \rightdelim@ checks for the following:
  ")": !0,
  "]": !0,
  "\\rbrack": !0,
  "\\}": !0,
  "\\rbrace": !0,
  "\\rangle": !0,
  "\\rceil": !0,
  "\\rfloor": !0,
  "\\rgroup": !0,
  "\\rmoustache": !0,
  "\\right": !0,
  "\\bigr": !0,
  "\\biggr": !0,
  "\\Bigr": !0,
  "\\Biggr": !0,
  // \extra@ also tests for the following:
  $: !0,
  // \extrap@ checks for the following:
  ";": !0,
  ".": !0,
  ",": !0
};
A("\\dotso", function(r) {
  var e = r.future().text;
  return e in rr ? "\\ldots\\," : "\\ldots";
});
A("\\dotsc", function(r) {
  var e = r.future().text;
  return e in rr && e !== "," ? "\\ldots\\," : "\\ldots";
});
A("\\cdots", function(r) {
  var e = r.future().text;
  return e in rr ? "\\@cdots\\," : "\\@cdots";
});
A("\\dotsb", "\\cdots");
A("\\dotsm", "\\cdots");
A("\\dotsi", "\\!\\cdots");
A("\\dotsx", "\\ldots\\,");
A("\\DOTSI", "\\relax");
A("\\DOTSB", "\\relax");
A("\\DOTSX", "\\relax");
A("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");
A("\\,", "\\tmspace+{3mu}{.1667em}");
A("\\thinspace", "\\,");
A("\\>", "\\mskip{4mu}");
A("\\:", "\\tmspace+{4mu}{.2222em}");
A("\\medspace", "\\:");
A("\\;", "\\tmspace+{5mu}{.2777em}");
A("\\thickspace", "\\;");
A("\\!", "\\tmspace-{3mu}{.1667em}");
A("\\negthinspace", "\\!");
A("\\negmedspace", "\\tmspace-{4mu}{.2222em}");
A("\\negthickspace", "\\tmspace-{5mu}{.277em}");
A("\\enspace", "\\kern.5em ");
A("\\enskip", "\\hskip.5em\\relax");
A("\\quad", "\\hskip1em\\relax");
A("\\qquad", "\\hskip2em\\relax");
A("\\tag", "\\@ifstar\\tag@literal\\tag@paren");
A("\\tag@paren", "\\tag@literal{({#1})}");
A("\\tag@literal", (r) => {
  if (r.macros.get("\\df@tag"))
    throw new G("Multiple \\tag");
  return "\\gdef\\df@tag{\\text{#1}}";
});
A("\\bmod", "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");
A("\\pod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");
A("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}");
A("\\mod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");
A("\\newline", "\\\\\\relax");
A("\\TeX", "\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");
var $a = W(D0["Main-Regular"][84][1] - 0.7 * D0["Main-Regular"][65][1]);
A("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + $a + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}");
A("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + $a + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}");
A("\\hspace", "\\@ifstar\\@hspacer\\@hspace");
A("\\@hspace", "\\hskip #1\\relax");
A("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax");
A("\\ordinarycolon", ":");
A("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}");
A("\\dblcolon", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');
A("\\coloneqq", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');
A("\\Coloneqq", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');
A("\\coloneq", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');
A("\\Coloneq", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');
A("\\eqqcolon", '\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');
A("\\Eqqcolon", '\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');
A("\\eqcolon", '\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');
A("\\Eqcolon", '\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');
A("\\colonapprox", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');
A("\\Colonapprox", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');
A("\\colonsim", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');
A("\\Colonsim", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');
A("∷", "\\dblcolon");
A("∹", "\\eqcolon");
A("≔", "\\coloneqq");
A("≕", "\\eqqcolon");
A("⩴", "\\Coloneqq");
A("\\ratio", "\\vcentcolon");
A("\\coloncolon", "\\dblcolon");
A("\\colonequals", "\\coloneqq");
A("\\coloncolonequals", "\\Coloneqq");
A("\\equalscolon", "\\eqqcolon");
A("\\equalscoloncolon", "\\Eqqcolon");
A("\\colonminus", "\\coloneq");
A("\\coloncolonminus", "\\Coloneq");
A("\\minuscolon", "\\eqcolon");
A("\\minuscoloncolon", "\\Eqcolon");
A("\\coloncolonapprox", "\\Colonapprox");
A("\\coloncolonsim", "\\Colonsim");
A("\\simcolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");
A("\\simcoloncolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");
A("\\approxcolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");
A("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");
A("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");
A("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}");
A("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}");
A("\\injlim", "\\DOTSB\\operatorname*{inj\\,lim}");
A("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}");
A("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}");
A("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}");
A("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}");
A("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}");
A("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{≩}");
A("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{≨}");
A("\\ngeqq", "\\html@mathml{\\@ngeqq}{≱}");
A("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{≱}");
A("\\nleqq", "\\html@mathml{\\@nleqq}{≰}");
A("\\nleqslant", "\\html@mathml{\\@nleqslant}{≰}");
A("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}");
A("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}");
A("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{⊈}");
A("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{⊉}");
A("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}");
A("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}");
A("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}");
A("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}");
A("\\imath", "\\html@mathml{\\@imath}{ı}");
A("\\jmath", "\\html@mathml{\\@jmath}{ȷ}");
A("\\llbracket", "\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");
A("\\rrbracket", "\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");
A("⟦", "\\llbracket");
A("⟧", "\\rrbracket");
A("\\lBrace", "\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");
A("\\rBrace", "\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");
A("⦃", "\\lBrace");
A("⦄", "\\rBrace");
A("\\minuso", "\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");
A("⦵", "\\minuso");
A("\\darr", "\\downarrow");
A("\\dArr", "\\Downarrow");
A("\\Darr", "\\Downarrow");
A("\\lang", "\\langle");
A("\\rang", "\\rangle");
A("\\uarr", "\\uparrow");
A("\\uArr", "\\Uparrow");
A("\\Uarr", "\\Uparrow");
A("\\N", "\\mathbb{N}");
A("\\R", "\\mathbb{R}");
A("\\Z", "\\mathbb{Z}");
A("\\alef", "\\aleph");
A("\\alefsym", "\\aleph");
A("\\Alpha", "\\mathrm{A}");
A("\\Beta", "\\mathrm{B}");
A("\\bull", "\\bullet");
A("\\Chi", "\\mathrm{X}");
A("\\clubs", "\\clubsuit");
A("\\cnums", "\\mathbb{C}");
A("\\Complex", "\\mathbb{C}");
A("\\Dagger", "\\ddagger");
A("\\diamonds", "\\diamondsuit");
A("\\empty", "\\emptyset");
A("\\Epsilon", "\\mathrm{E}");
A("\\Eta", "\\mathrm{H}");
A("\\exist", "\\exists");
A("\\harr", "\\leftrightarrow");
A("\\hArr", "\\Leftrightarrow");
A("\\Harr", "\\Leftrightarrow");
A("\\hearts", "\\heartsuit");
A("\\image", "\\Im");
A("\\infin", "\\infty");
A("\\Iota", "\\mathrm{I}");
A("\\isin", "\\in");
A("\\Kappa", "\\mathrm{K}");
A("\\larr", "\\leftarrow");
A("\\lArr", "\\Leftarrow");
A("\\Larr", "\\Leftarrow");
A("\\lrarr", "\\leftrightarrow");
A("\\lrArr", "\\Leftrightarrow");
A("\\Lrarr", "\\Leftrightarrow");
A("\\Mu", "\\mathrm{M}");
A("\\natnums", "\\mathbb{N}");
A("\\Nu", "\\mathrm{N}");
A("\\Omicron", "\\mathrm{O}");
A("\\plusmn", "\\pm");
A("\\rarr", "\\rightarrow");
A("\\rArr", "\\Rightarrow");
A("\\Rarr", "\\Rightarrow");
A("\\real", "\\Re");
A("\\reals", "\\mathbb{R}");
A("\\Reals", "\\mathbb{R}");
A("\\Rho", "\\mathrm{P}");
A("\\sdot", "\\cdot");
A("\\sect", "\\S");
A("\\spades", "\\spadesuit");
A("\\sub", "\\subset");
A("\\sube", "\\subseteq");
A("\\supe", "\\supseteq");
A("\\Tau", "\\mathrm{T}");
A("\\thetasym", "\\vartheta");
A("\\weierp", "\\wp");
A("\\Zeta", "\\mathrm{Z}");
A("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}");
A("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}");
A("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits");
A("\\bra", "\\mathinner{\\langle{#1}|}");
A("\\ket", "\\mathinner{|{#1}\\rangle}");
A("\\braket", "\\mathinner{\\langle{#1}\\rangle}");
A("\\Bra", "\\left\\langle#1\\right|");
A("\\Ket", "\\left|#1\\right\\rangle");
var Va = (r) => (e) => {
  var t = e.consumeArg().tokens, a = e.consumeArg().tokens, i = e.consumeArg().tokens, n = e.consumeArg().tokens, o = e.macros.get("|"), l = e.macros.get("\\|");
  e.macros.beginGroup();
  var s = (m) => (d) => {
    r && (d.macros.set("|", o), i.length && d.macros.set("\\|", l));
    var v = m;
    if (!m && i.length) {
      var b = d.future();
      b.text === "|" && (d.popToken(), v = !0);
    }
    return {
      tokens: v ? i : a,
      numArgs: 0
    };
  };
  e.macros.set("|", s(!1)), i.length && e.macros.set("\\|", s(!0));
  var h = e.consumeArg().tokens, c = e.expandTokens([
    ...n,
    ...h,
    ...t
    // reversed
  ]);
  return e.macros.endGroup(), {
    tokens: c.reverse(),
    numArgs: 0
  };
};
A("\\bra@ket", Va(!1));
A("\\bra@set", Va(!0));
A("\\Braket", "\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");
A("\\Set", "\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");
A("\\set", "\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");
A("\\angln", "{\\angl n}");
A("\\blue", "\\textcolor{##6495ed}{#1}");
A("\\orange", "\\textcolor{##ffa500}{#1}");
A("\\pink", "\\textcolor{##ff00af}{#1}");
A("\\red", "\\textcolor{##df0030}{#1}");
A("\\green", "\\textcolor{##28ae7b}{#1}");
A("\\gray", "\\textcolor{gray}{#1}");
A("\\purple", "\\textcolor{##9d38bd}{#1}");
A("\\blueA", "\\textcolor{##ccfaff}{#1}");
A("\\blueB", "\\textcolor{##80f6ff}{#1}");
A("\\blueC", "\\textcolor{##63d9ea}{#1}");
A("\\blueD", "\\textcolor{##11accd}{#1}");
A("\\blueE", "\\textcolor{##0c7f99}{#1}");
A("\\tealA", "\\textcolor{##94fff5}{#1}");
A("\\tealB", "\\textcolor{##26edd5}{#1}");
A("\\tealC", "\\textcolor{##01d1c1}{#1}");
A("\\tealD", "\\textcolor{##01a995}{#1}");
A("\\tealE", "\\textcolor{##208170}{#1}");
A("\\greenA", "\\textcolor{##b6ffb0}{#1}");
A("\\greenB", "\\textcolor{##8af281}{#1}");
A("\\greenC", "\\textcolor{##74cf70}{#1}");
A("\\greenD", "\\textcolor{##1fab54}{#1}");
A("\\greenE", "\\textcolor{##0d923f}{#1}");
A("\\goldA", "\\textcolor{##ffd0a9}{#1}");
A("\\goldB", "\\textcolor{##ffbb71}{#1}");
A("\\goldC", "\\textcolor{##ff9c39}{#1}");
A("\\goldD", "\\textcolor{##e07d10}{#1}");
A("\\goldE", "\\textcolor{##a75a05}{#1}");
A("\\redA", "\\textcolor{##fca9a9}{#1}");
A("\\redB", "\\textcolor{##ff8482}{#1}");
A("\\redC", "\\textcolor{##f9685d}{#1}");
A("\\redD", "\\textcolor{##e84d39}{#1}");
A("\\redE", "\\textcolor{##bc2612}{#1}");
A("\\maroonA", "\\textcolor{##ffbde0}{#1}");
A("\\maroonB", "\\textcolor{##ff92c6}{#1}");
A("\\maroonC", "\\textcolor{##ed5fa6}{#1}");
A("\\maroonD", "\\textcolor{##ca337c}{#1}");
A("\\maroonE", "\\textcolor{##9e034e}{#1}");
A("\\purpleA", "\\textcolor{##ddd7ff}{#1}");
A("\\purpleB", "\\textcolor{##c6b9fc}{#1}");
A("\\purpleC", "\\textcolor{##aa87ff}{#1}");
A("\\purpleD", "\\textcolor{##7854ab}{#1}");
A("\\purpleE", "\\textcolor{##543b78}{#1}");
A("\\mintA", "\\textcolor{##f5f9e8}{#1}");
A("\\mintB", "\\textcolor{##edf2df}{#1}");
A("\\mintC", "\\textcolor{##e0e5cc}{#1}");
A("\\grayA", "\\textcolor{##f6f7f7}{#1}");
A("\\grayB", "\\textcolor{##f0f1f2}{#1}");
A("\\grayC", "\\textcolor{##e3e5e6}{#1}");
A("\\grayD", "\\textcolor{##d6d8da}{#1}");
A("\\grayE", "\\textcolor{##babec2}{#1}");
A("\\grayF", "\\textcolor{##888d93}{#1}");
A("\\grayG", "\\textcolor{##626569}{#1}");
A("\\grayH", "\\textcolor{##3b3e40}{#1}");
A("\\grayI", "\\textcolor{##21242c}{#1}");
A("\\kaBlue", "\\textcolor{##314453}{#1}");
A("\\kaGreen", "\\textcolor{##71B307}{#1}");
var Za = {
  "^": !0,
  // Parser.js
  _: !0,
  // Parser.js
  "\\limits": !0,
  // Parser.js
  "\\nolimits": !0
  // Parser.js
};
class Ts {
  constructor(e, t, a) {
    this.settings = void 0, this.expansionCount = void 0, this.lexer = void 0, this.macros = void 0, this.stack = void 0, this.mode = void 0, this.settings = t, this.expansionCount = 0, this.feed(e), this.macros = new Ms(Es, t.macros), this.mode = a, this.stack = [];
  }
  /**
   * Feed a new input string to the same MacroExpander
   * (with existing macros etc.).
   */
  feed(e) {
    this.lexer = new Wr(e, this.settings);
  }
  /**
   * Switches between "text" and "math" modes.
   */
  switchMode(e) {
    this.mode = e;
  }
  /**
   * Start a new group nesting within all namespaces.
   */
  beginGroup() {
    this.macros.beginGroup();
  }
  /**
   * End current group nesting within all namespaces.
   */
  endGroup() {
    this.macros.endGroup();
  }
  /**
   * Ends all currently nested groups (if any), restoring values before the
   * groups began.  Useful in case of an error in the middle of parsing.
   */
  endGroups() {
    this.macros.endGroups();
  }
  /**
   * Returns the topmost token on the stack, without expanding it.
   * Similar in behavior to TeX's `\futurelet`.
   */
  future() {
    return this.stack.length === 0 && this.pushToken(this.lexer.lex()), this.stack[this.stack.length - 1];
  }
  /**
   * Remove and return the next unexpanded token.
   */
  popToken() {
    return this.future(), this.stack.pop();
  }
  /**
   * Add a given token to the token stack.  In particular, this get be used
   * to put back a token returned from one of the other methods.
   */
  pushToken(e) {
    this.stack.push(e);
  }
  /**
   * Append an array of tokens to the token stack.
   */
  pushTokens(e) {
    this.stack.push(...e);
  }
  /**
   * Find an macro argument without expanding tokens and append the array of
   * tokens to the token stack. Uses Token as a container for the result.
   */
  scanArgument(e) {
    var t, a, i;
    if (e) {
      if (this.consumeSpaces(), this.future().text !== "[")
        return null;
      t = this.popToken(), {
        tokens: i,
        end: a
      } = this.consumeArg(["]"]);
    } else
      ({
        tokens: i,
        start: t,
        end: a
      } = this.consumeArg());
    return this.pushToken(new _0("EOF", a.loc)), this.pushTokens(i), new _0("", k0.range(t, a));
  }
  /**
   * Consume all following space tokens, without expansion.
   */
  consumeSpaces() {
    for (; ; ) {
      var e = this.future();
      if (e.text === " ")
        this.stack.pop();
      else
        break;
    }
  }
  /**
   * Consume an argument from the token stream, and return the resulting array
   * of tokens and start/end token.
   */
  consumeArg(e) {
    var t = [], a = e && e.length > 0;
    a || this.consumeSpaces();
    var i = this.future(), n, o = 0, l = 0;
    do {
      if (n = this.popToken(), t.push(n), n.text === "{")
        ++o;
      else if (n.text === "}") {
        if (--o, o === -1)
          throw new G("Extra }", n);
      } else if (n.text === "EOF")
        throw new G("Unexpected end of input in a macro argument, expected '" + (e && a ? e[l] : "}") + "'", n);
      if (e && a)
        if ((o === 0 || o === 1 && e[l] === "{") && n.text === e[l]) {
          if (++l, l === e.length) {
            t.splice(-l, l);
            break;
          }
        } else
          l = 0;
    } while (o !== 0 || a);
    return i.text === "{" && t[t.length - 1].text === "}" && (t.pop(), t.shift()), t.reverse(), {
      tokens: t,
      start: i,
      end: n
    };
  }
  /**
   * Consume the specified number of (delimited) arguments from the token
   * stream and return the resulting array of arguments.
   */
  consumeArgs(e, t) {
    if (t) {
      if (t.length !== e + 1)
        throw new G("The length of delimiters doesn't match the number of args!");
      for (var a = t[0], i = 0; i < a.length; i++) {
        var n = this.popToken();
        if (a[i] !== n.text)
          throw new G("Use of the macro doesn't match its definition", n);
      }
    }
    for (var o = [], l = 0; l < e; l++)
      o.push(this.consumeArg(t && t[l + 1]).tokens);
    return o;
  }
  /**
   * Increment `expansionCount` by the specified amount.
   * Throw an error if it exceeds `maxExpand`.
   */
  countExpansion(e) {
    if (this.expansionCount += e, this.expansionCount > this.settings.maxExpand)
      throw new G("Too many expansions: infinite loop or need to increase maxExpand setting");
  }
  /**
   * Expand the next token only once if possible.
   *
   * If the token is expanded, the resulting tokens will be pushed onto
   * the stack in reverse order, and the number of such tokens will be
   * returned.  This number might be zero or positive.
   *
   * If not, the return value is `false`, and the next token remains at the
   * top of the stack.
   *
   * In either case, the next token will be on the top of the stack,
   * or the stack will be empty (in case of empty expansion
   * and no other tokens).
   *
   * Used to implement `expandAfterFuture` and `expandNextToken`.
   *
   * If expandableOnly, only expandable tokens are expanded and
   * an undefined control sequence results in an error.
   */
  expandOnce(e) {
    var t = this.popToken(), a = t.text, i = t.noexpand ? null : this._getExpansion(a);
    if (i == null || e && i.unexpandable) {
      if (e && i == null && a[0] === "\\" && !this.isDefined(a))
        throw new G("Undefined control sequence: " + a);
      return this.pushToken(t), !1;
    }
    this.countExpansion(1);
    var n = i.tokens, o = this.consumeArgs(i.numArgs, i.delimiters);
    if (i.numArgs) {
      n = n.slice();
      for (var l = n.length - 1; l >= 0; --l) {
        var s = n[l];
        if (s.text === "#") {
          if (l === 0)
            throw new G("Incomplete placeholder at end of macro body", s);
          if (s = n[--l], s.text === "#")
            n.splice(l + 1, 1);
          else if (/^[1-9]$/.test(s.text))
            n.splice(l, 2, ...o[+s.text - 1]);
          else
            throw new G("Not a valid argument number", s);
        }
      }
    }
    return this.pushTokens(n), n.length;
  }
  /**
   * Expand the next token only once (if possible), and return the resulting
   * top token on the stack (without removing anything from the stack).
   * Similar in behavior to TeX's `\expandafter\futurelet`.
   * Equivalent to expandOnce() followed by future().
   */
  expandAfterFuture() {
    return this.expandOnce(), this.future();
  }
  /**
   * Recursively expand first token, then return first non-expandable token.
   */
  expandNextToken() {
    for (; ; )
      if (this.expandOnce() === !1) {
        var e = this.stack.pop();
        return e.treatAsRelax && (e.text = "\\relax"), e;
      }
  }
  /**
   * Fully expand the given macro name and return the resulting list of
   * tokens, or return `undefined` if no such macro is defined.
   */
  expandMacro(e) {
    return this.macros.has(e) ? this.expandTokens([new _0(e)]) : void 0;
  }
  /**
   * Fully expand the given token stream and return the resulting list of
   * tokens.  Note that the input tokens are in reverse order, but the
   * output tokens are in forward order.
   */
  expandTokens(e) {
    var t = [], a = this.stack.length;
    for (this.pushTokens(e); this.stack.length > a; )
      if (this.expandOnce(!0) === !1) {
        var i = this.stack.pop();
        i.treatAsRelax && (i.noexpand = !1, i.treatAsRelax = !1), t.push(i);
      }
    return this.countExpansion(t.length), t;
  }
  /**
   * Fully expand the given macro name and return the result as a string,
   * or return `undefined` if no such macro is defined.
   */
  expandMacroAsText(e) {
    var t = this.expandMacro(e);
    return t && t.map((a) => a.text).join("");
  }
  /**
   * Returns the expanded macro as a reversed array of tokens and a macro
   * argument count.  Or returns `null` if no such macro.
   */
  _getExpansion(e) {
    var t = this.macros.get(e);
    if (t == null)
      return t;
    if (e.length === 1) {
      var a = this.lexer.catcodes[e];
      if (a != null && a !== 13)
        return;
    }
    var i = typeof t == "function" ? t(this) : t;
    if (typeof i == "string") {
      var n = 0;
      if (i.includes("#"))
        for (var o = i.replace(/##/g, ""); o.includes("#" + (n + 1)); )
          ++n;
      for (var l = new Wr(i, this.settings), s = [], h = l.lex(); h.text !== "EOF"; )
        s.push(h), h = l.lex();
      s.reverse();
      var c = {
        tokens: s,
        numArgs: n
      };
      return c;
    }
    return i;
  }
  /**
   * Determine whether a command is currently "defined" (has some
   * functionality), meaning that it's a macro (in the current group),
   * a function, a symbol, or one of the special commands listed in
   * `implicitCommands`.
   */
  isDefined(e) {
    return this.macros.has(e) || Y0.hasOwnProperty(e) || o0.math.hasOwnProperty(e) || o0.text.hasOwnProperty(e) || Za.hasOwnProperty(e);
  }
  /**
   * Determine whether a command is expandable.
   */
  isExpandable(e) {
    var t = this.macros.get(e);
    return t != null ? typeof t == "string" || typeof t == "function" || !t.unexpandable : Y0.hasOwnProperty(e) && !Y0[e].primitive;
  }
}
var Vr = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/, Fe = Object.freeze({
  "₊": "+",
  "₋": "-",
  "₌": "=",
  "₍": "(",
  "₎": ")",
  "₀": "0",
  "₁": "1",
  "₂": "2",
  "₃": "3",
  "₄": "4",
  "₅": "5",
  "₆": "6",
  "₇": "7",
  "₈": "8",
  "₉": "9",
  "ₐ": "a",
  "ₑ": "e",
  "ₕ": "h",
  "ᵢ": "i",
  "ⱼ": "j",
  "ₖ": "k",
  "ₗ": "l",
  "ₘ": "m",
  "ₙ": "n",
  "ₒ": "o",
  "ₚ": "p",
  "ᵣ": "r",
  "ₛ": "s",
  "ₜ": "t",
  "ᵤ": "u",
  "ᵥ": "v",
  "ₓ": "x",
  "ᵦ": "β",
  "ᵧ": "γ",
  "ᵨ": "ρ",
  "ᵩ": "ϕ",
  "ᵪ": "χ",
  "⁺": "+",
  "⁻": "-",
  "⁼": "=",
  "⁽": "(",
  "⁾": ")",
  "⁰": "0",
  "¹": "1",
  "²": "2",
  "³": "3",
  "⁴": "4",
  "⁵": "5",
  "⁶": "6",
  "⁷": "7",
  "⁸": "8",
  "⁹": "9",
  "ᴬ": "A",
  "ᴮ": "B",
  "ᴰ": "D",
  "ᴱ": "E",
  "ᴳ": "G",
  "ᴴ": "H",
  "ᴵ": "I",
  "ᴶ": "J",
  "ᴷ": "K",
  "ᴸ": "L",
  "ᴹ": "M",
  "ᴺ": "N",
  "ᴼ": "O",
  "ᴾ": "P",
  "ᴿ": "R",
  "ᵀ": "T",
  "ᵁ": "U",
  "ⱽ": "V",
  "ᵂ": "W",
  "ᵃ": "a",
  "ᵇ": "b",
  "ᶜ": "c",
  "ᵈ": "d",
  "ᵉ": "e",
  "ᶠ": "f",
  "ᵍ": "g",
  ʰ: "h",
  "ⁱ": "i",
  ʲ: "j",
  "ᵏ": "k",
  ˡ: "l",
  "ᵐ": "m",
  ⁿ: "n",
  "ᵒ": "o",
  "ᵖ": "p",
  ʳ: "r",
  ˢ: "s",
  "ᵗ": "t",
  "ᵘ": "u",
  "ᵛ": "v",
  ʷ: "w",
  ˣ: "x",
  ʸ: "y",
  "ᶻ": "z",
  "ᵝ": "β",
  "ᵞ": "γ",
  "ᵟ": "δ",
  "ᵠ": "ϕ",
  "ᵡ": "χ",
  "ᶿ": "θ"
}), xt = {
  "́": {
    text: "\\'",
    math: "\\acute"
  },
  "̀": {
    text: "\\`",
    math: "\\grave"
  },
  "̈": {
    text: '\\"',
    math: "\\ddot"
  },
  "̃": {
    text: "\\~",
    math: "\\tilde"
  },
  "̄": {
    text: "\\=",
    math: "\\bar"
  },
  "̆": {
    text: "\\u",
    math: "\\breve"
  },
  "̌": {
    text: "\\v",
    math: "\\check"
  },
  "̂": {
    text: "\\^",
    math: "\\hat"
  },
  "̇": {
    text: "\\.",
    math: "\\dot"
  },
  "̊": {
    text: "\\r",
    math: "\\mathring"
  },
  "̋": {
    text: "\\H"
  },
  "̧": {
    text: "\\c"
  }
}, Zr = {
  á: "á",
  à: "à",
  ä: "ä",
  ǟ: "ǟ",
  ã: "ã",
  ā: "ā",
  ă: "ă",
  ắ: "ắ",
  ằ: "ằ",
  ẵ: "ẵ",
  ǎ: "ǎ",
  â: "â",
  ấ: "ấ",
  ầ: "ầ",
  ẫ: "ẫ",
  ȧ: "ȧ",
  ǡ: "ǡ",
  å: "å",
  ǻ: "ǻ",
  ḃ: "ḃ",
  ć: "ć",
  ḉ: "ḉ",
  č: "č",
  ĉ: "ĉ",
  ċ: "ċ",
  ç: "ç",
  ď: "ď",
  ḋ: "ḋ",
  ḑ: "ḑ",
  é: "é",
  è: "è",
  ë: "ë",
  ẽ: "ẽ",
  ē: "ē",
  ḗ: "ḗ",
  ḕ: "ḕ",
  ĕ: "ĕ",
  ḝ: "ḝ",
  ě: "ě",
  ê: "ê",
  ế: "ế",
  ề: "ề",
  ễ: "ễ",
  ė: "ė",
  ȩ: "ȩ",
  ḟ: "ḟ",
  ǵ: "ǵ",
  ḡ: "ḡ",
  ğ: "ğ",
  ǧ: "ǧ",
  ĝ: "ĝ",
  ġ: "ġ",
  ģ: "ģ",
  ḧ: "ḧ",
  ȟ: "ȟ",
  ĥ: "ĥ",
  ḣ: "ḣ",
  ḩ: "ḩ",
  í: "í",
  ì: "ì",
  ï: "ï",
  ḯ: "ḯ",
  ĩ: "ĩ",
  ī: "ī",
  ĭ: "ĭ",
  ǐ: "ǐ",
  î: "î",
  ǰ: "ǰ",
  ĵ: "ĵ",
  ḱ: "ḱ",
  ǩ: "ǩ",
  ķ: "ķ",
  ĺ: "ĺ",
  ľ: "ľ",
  ļ: "ļ",
  ḿ: "ḿ",
  ṁ: "ṁ",
  ń: "ń",
  ǹ: "ǹ",
  ñ: "ñ",
  ň: "ň",
  ṅ: "ṅ",
  ņ: "ņ",
  ó: "ó",
  ò: "ò",
  ö: "ö",
  ȫ: "ȫ",
  õ: "õ",
  ṍ: "ṍ",
  ṏ: "ṏ",
  ȭ: "ȭ",
  ō: "ō",
  ṓ: "ṓ",
  ṑ: "ṑ",
  ŏ: "ŏ",
  ǒ: "ǒ",
  ô: "ô",
  ố: "ố",
  ồ: "ồ",
  ỗ: "ỗ",
  ȯ: "ȯ",
  ȱ: "ȱ",
  ő: "ő",
  ṕ: "ṕ",
  ṗ: "ṗ",
  ŕ: "ŕ",
  ř: "ř",
  ṙ: "ṙ",
  ŗ: "ŗ",
  ś: "ś",
  ṥ: "ṥ",
  š: "š",
  ṧ: "ṧ",
  ŝ: "ŝ",
  ṡ: "ṡ",
  ş: "ş",
  ẗ: "ẗ",
  ť: "ť",
  ṫ: "ṫ",
  ţ: "ţ",
  ú: "ú",
  ù: "ù",
  ü: "ü",
  ǘ: "ǘ",
  ǜ: "ǜ",
  ǖ: "ǖ",
  ǚ: "ǚ",
  ũ: "ũ",
  ṹ: "ṹ",
  ū: "ū",
  ṻ: "ṻ",
  ŭ: "ŭ",
  ǔ: "ǔ",
  û: "û",
  ů: "ů",
  ű: "ű",
  ṽ: "ṽ",
  ẃ: "ẃ",
  ẁ: "ẁ",
  ẅ: "ẅ",
  ŵ: "ŵ",
  ẇ: "ẇ",
  ẘ: "ẘ",
  ẍ: "ẍ",
  ẋ: "ẋ",
  ý: "ý",
  ỳ: "ỳ",
  ÿ: "ÿ",
  ỹ: "ỹ",
  ȳ: "ȳ",
  ŷ: "ŷ",
  ẏ: "ẏ",
  ẙ: "ẙ",
  ź: "ź",
  ž: "ž",
  ẑ: "ẑ",
  ż: "ż",
  Á: "Á",
  À: "À",
  Ä: "Ä",
  Ǟ: "Ǟ",
  Ã: "Ã",
  Ā: "Ā",
  Ă: "Ă",
  Ắ: "Ắ",
  Ằ: "Ằ",
  Ẵ: "Ẵ",
  Ǎ: "Ǎ",
  Â: "Â",
  Ấ: "Ấ",
  Ầ: "Ầ",
  Ẫ: "Ẫ",
  Ȧ: "Ȧ",
  Ǡ: "Ǡ",
  Å: "Å",
  Ǻ: "Ǻ",
  Ḃ: "Ḃ",
  Ć: "Ć",
  Ḉ: "Ḉ",
  Č: "Č",
  Ĉ: "Ĉ",
  Ċ: "Ċ",
  Ç: "Ç",
  Ď: "Ď",
  Ḋ: "Ḋ",
  Ḑ: "Ḑ",
  É: "É",
  È: "È",
  Ë: "Ë",
  Ẽ: "Ẽ",
  Ē: "Ē",
  Ḗ: "Ḗ",
  Ḕ: "Ḕ",
  Ĕ: "Ĕ",
  Ḝ: "Ḝ",
  Ě: "Ě",
  Ê: "Ê",
  Ế: "Ế",
  Ề: "Ề",
  Ễ: "Ễ",
  Ė: "Ė",
  Ȩ: "Ȩ",
  Ḟ: "Ḟ",
  Ǵ: "Ǵ",
  Ḡ: "Ḡ",
  Ğ: "Ğ",
  Ǧ: "Ǧ",
  Ĝ: "Ĝ",
  Ġ: "Ġ",
  Ģ: "Ģ",
  Ḧ: "Ḧ",
  Ȟ: "Ȟ",
  Ĥ: "Ĥ",
  Ḣ: "Ḣ",
  Ḩ: "Ḩ",
  Í: "Í",
  Ì: "Ì",
  Ï: "Ï",
  Ḯ: "Ḯ",
  Ĩ: "Ĩ",
  Ī: "Ī",
  Ĭ: "Ĭ",
  Ǐ: "Ǐ",
  Î: "Î",
  İ: "İ",
  Ĵ: "Ĵ",
  Ḱ: "Ḱ",
  Ǩ: "Ǩ",
  Ķ: "Ķ",
  Ĺ: "Ĺ",
  Ľ: "Ľ",
  Ļ: "Ļ",
  Ḿ: "Ḿ",
  Ṁ: "Ṁ",
  Ń: "Ń",
  Ǹ: "Ǹ",
  Ñ: "Ñ",
  Ň: "Ň",
  Ṅ: "Ṅ",
  Ņ: "Ņ",
  Ó: "Ó",
  Ò: "Ò",
  Ö: "Ö",
  Ȫ: "Ȫ",
  Õ: "Õ",
  Ṍ: "Ṍ",
  Ṏ: "Ṏ",
  Ȭ: "Ȭ",
  Ō: "Ō",
  Ṓ: "Ṓ",
  Ṑ: "Ṑ",
  Ŏ: "Ŏ",
  Ǒ: "Ǒ",
  Ô: "Ô",
  Ố: "Ố",
  Ồ: "Ồ",
  Ỗ: "Ỗ",
  Ȯ: "Ȯ",
  Ȱ: "Ȱ",
  Ő: "Ő",
  Ṕ: "Ṕ",
  Ṗ: "Ṗ",
  Ŕ: "Ŕ",
  Ř: "Ř",
  Ṙ: "Ṙ",
  Ŗ: "Ŗ",
  Ś: "Ś",
  Ṥ: "Ṥ",
  Š: "Š",
  Ṧ: "Ṧ",
  Ŝ: "Ŝ",
  Ṡ: "Ṡ",
  Ş: "Ş",
  Ť: "Ť",
  Ṫ: "Ṫ",
  Ţ: "Ţ",
  Ú: "Ú",
  Ù: "Ù",
  Ü: "Ü",
  Ǘ: "Ǘ",
  Ǜ: "Ǜ",
  Ǖ: "Ǖ",
  Ǚ: "Ǚ",
  Ũ: "Ũ",
  Ṹ: "Ṹ",
  Ū: "Ū",
  Ṻ: "Ṻ",
  Ŭ: "Ŭ",
  Ǔ: "Ǔ",
  Û: "Û",
  Ů: "Ů",
  Ű: "Ű",
  Ṽ: "Ṽ",
  Ẃ: "Ẃ",
  Ẁ: "Ẁ",
  Ẅ: "Ẅ",
  Ŵ: "Ŵ",
  Ẇ: "Ẇ",
  Ẍ: "Ẍ",
  Ẋ: "Ẋ",
  Ý: "Ý",
  Ỳ: "Ỳ",
  Ÿ: "Ÿ",
  Ỹ: "Ỹ",
  Ȳ: "Ȳ",
  Ŷ: "Ŷ",
  Ẏ: "Ẏ",
  Ź: "Ź",
  Ž: "Ž",
  Ẑ: "Ẑ",
  Ż: "Ż",
  ά: "ά",
  ὰ: "ὰ",
  ᾱ: "ᾱ",
  ᾰ: "ᾰ",
  έ: "έ",
  ὲ: "ὲ",
  ή: "ή",
  ὴ: "ὴ",
  ί: "ί",
  ὶ: "ὶ",
  ϊ: "ϊ",
  ΐ: "ΐ",
  ῒ: "ῒ",
  ῑ: "ῑ",
  ῐ: "ῐ",
  ό: "ό",
  ὸ: "ὸ",
  ύ: "ύ",
  ὺ: "ὺ",
  ϋ: "ϋ",
  ΰ: "ΰ",
  ῢ: "ῢ",
  ῡ: "ῡ",
  ῠ: "ῠ",
  ώ: "ώ",
  ὼ: "ὼ",
  Ύ: "Ύ",
  Ὺ: "Ὺ",
  Ϋ: "Ϋ",
  Ῡ: "Ῡ",
  Ῠ: "Ῠ",
  Ώ: "Ώ",
  Ὼ: "Ὼ"
};
class at {
  constructor(e, t) {
    this.mode = void 0, this.gullet = void 0, this.settings = void 0, this.leftrightDepth = void 0, this.nextToken = void 0, this.mode = "math", this.gullet = new Ts(e, t, this.mode), this.settings = t, this.leftrightDepth = 0, this.nextToken = null;
  }
  /**
   * Checks a result to make sure it has the right type, and throws an
   * appropriate error otherwise.
   */
  expect(e, t) {
    if (t === void 0 && (t = !0), this.fetch().text !== e)
      throw new G("Expected '" + e + "', got '" + this.fetch().text + "'", this.fetch());
    t && this.consume();
  }
  /**
   * Discards the current lookahead token, considering it consumed.
   */
  consume() {
    this.nextToken = null;
  }
  /**
   * Return the current lookahead token, or if there isn't one (at the
   * beginning, or if the previous lookahead token was consume()d),
   * fetch the next token as the new lookahead token and return it.
   */
  fetch() {
    return this.nextToken == null && (this.nextToken = this.gullet.expandNextToken()), this.nextToken;
  }
  /**
   * Switches between "text" and "math" modes.
   */
  switchMode(e) {
    this.mode = e, this.gullet.switchMode(e);
  }
  /**
   * Main parsing function, which parses an entire input.
   */
  parse() {
    this.settings.globalGroup || this.gullet.beginGroup(), this.settings.colorIsTextColor && this.gullet.macros.set("\\color", "\\textcolor");
    try {
      var e = this.parseExpression(!1);
      return this.expect("EOF"), this.settings.globalGroup || this.gullet.endGroup(), e;
    } finally {
      this.gullet.endGroups();
    }
  }
  /**
   * Fully parse a separate sequence of tokens as a separate job.
   * Tokens should be specified in reverse order, as in a MacroDefinition.
   */
  subparse(e) {
    var t = this.nextToken;
    this.consume(), this.gullet.pushToken(new _0("}")), this.gullet.pushTokens(e);
    var a = this.parseExpression(!1);
    return this.expect("}"), this.nextToken = t, a;
  }
  /**
   * Parses an "expression", which is a list of atoms.
   *
   * `breakOnInfix`: Should the parsing stop when we hit infix nodes? This
   *                 happens when functions have higher precedence than infix
   *                 nodes in implicit parses.
   *
   * `breakOnTokenText`: The text of the token that the expression should end
   *                     with, or `null` if something else should end the
   *                     expression.
   */
  parseExpression(e, t) {
    for (var a = []; ; ) {
      this.mode === "math" && this.consumeSpaces();
      var i = this.fetch();
      if (at.endOfExpression.has(i.text) || t && i.text === t || e && Y0[i.text] && Y0[i.text].infix)
        break;
      var n = this.parseAtom(t);
      if (n) {
        if (n.type === "internal")
          continue;
      } else break;
      a.push(n);
    }
    return this.mode === "text" && this.formLigatures(a), this.handleInfixNodes(a);
  }
  /**
   * Rewrites infix operators such as \over with corresponding commands such
   * as \frac.
   *
   * There can only be one infix operator per group.  If there's more than one
   * then the expression is ambiguous.  This can be resolved by adding {}.
   */
  handleInfixNodes(e) {
    for (var t = -1, a, i = 0; i < e.length; i++) {
      var n = e[i];
      if (n.type === "infix") {
        if (t !== -1)
          throw new G("only one infix operator per group", n.token);
        t = i, a = n.replaceWith;
      }
    }
    if (t !== -1 && a) {
      var o, l, s = e.slice(0, t), h = e.slice(t + 1);
      s.length === 1 && s[0].type === "ordgroup" ? o = s[0] : o = {
        type: "ordgroup",
        mode: this.mode,
        body: s
      }, h.length === 1 && h[0].type === "ordgroup" ? l = h[0] : l = {
        type: "ordgroup",
        mode: this.mode,
        body: h
      };
      var c;
      return a === "\\\\abovefrac" ? c = this.callFunction(a, [o, e[t], l], []) : c = this.callFunction(a, [o, l], []), [c];
    } else
      return e;
  }
  /**
   * Handle a subscript or superscript with nice errors.
   */
  handleSupSubscript(e) {
    var t = this.fetch(), a = t.text;
    this.consume(), this.consumeSpaces();
    var i;
    do {
      var n;
      i = this.parseGroup(e);
    } while (((n = i) == null ? void 0 : n.type) === "internal");
    if (!i)
      throw new G("Expected group after '" + a + "'", t);
    return i;
  }
  /**
   * Converts the textual input of an unsupported command into a text node
   * contained within a color node whose color is determined by errorColor
   */
  formatUnsupportedCmd(e) {
    for (var t = [], a = 0; a < e.length; a++)
      t.push({
        type: "textord",
        mode: "text",
        text: e[a]
      });
    var i = {
      type: "text",
      mode: this.mode,
      body: t
    }, n = {
      type: "color",
      mode: this.mode,
      color: this.settings.errorColor,
      body: [i]
    };
    return n;
  }
  /**
   * Parses a group with optional super/subscripts.
   */
  parseAtom(e) {
    var t = this.parseGroup("atom", e);
    if (t?.type === "internal" || this.mode === "text")
      return t;
    for (var a, i; ; ) {
      this.consumeSpaces();
      var n = this.fetch();
      if (n.text === "\\limits" || n.text === "\\nolimits") {
        if (t && t.type === "op") {
          var o = n.text === "\\limits";
          t.limits = o, t.alwaysHandleSupSub = !0;
        } else if (t && t.type === "operatorname")
          t.alwaysHandleSupSub && (t.limits = n.text === "\\limits");
        else
          throw new G("Limit controls must follow a math operator", n);
        this.consume();
      } else if (n.text === "^") {
        if (a)
          throw new G("Double superscript", n);
        a = this.handleSupSubscript("superscript");
      } else if (n.text === "_") {
        if (i)
          throw new G("Double subscript", n);
        i = this.handleSupSubscript("subscript");
      } else if (n.text === "'") {
        if (a)
          throw new G("Double superscript", n);
        var l = {
          type: "textord",
          mode: this.mode,
          text: "\\prime"
        }, s = [l];
        for (this.consume(); this.fetch().text === "'"; )
          s.push(l), this.consume();
        this.fetch().text === "^" && s.push(this.handleSupSubscript("superscript")), a = {
          type: "ordgroup",
          mode: this.mode,
          body: s
        };
      } else if (Fe[n.text]) {
        var h = Vr.test(n.text), c = [];
        for (c.push(new _0(Fe[n.text])), this.consume(); ; ) {
          var m = this.fetch().text;
          if (!Fe[m] || Vr.test(m) !== h)
            break;
          c.unshift(new _0(Fe[m])), this.consume();
        }
        var d = this.subparse(c);
        h ? i = {
          type: "ordgroup",
          mode: "math",
          body: d
        } : a = {
          type: "ordgroup",
          mode: "math",
          body: d
        };
      } else
        break;
    }
    return a || i ? {
      type: "supsub",
      mode: this.mode,
      base: t,
      sup: a,
      sub: i
    } : t;
  }
  /**
   * Parses an entire function, including its base and all of its arguments.
   */
  parseFunction(e, t) {
    var a = this.fetch(), i = a.text, n = Y0[i];
    if (!n)
      return null;
    if (this.consume(), t && t !== "atom" && !n.allowedInArgument)
      throw new G("Got function '" + i + "' with no arguments" + (t ? " as " + t : ""), a);
    if (this.mode === "text" && !n.allowedInText)
      throw new G("Can't use function '" + i + "' in text mode", a);
    if (this.mode === "math" && n.allowedInMath === !1)
      throw new G("Can't use function '" + i + "' in math mode", a);
    var {
      args: o,
      optArgs: l
    } = this.parseArguments(i, n);
    return this.callFunction(i, o, l, a, e);
  }
  /**
   * Call a function handler with a suitable context and arguments.
   */
  callFunction(e, t, a, i, n) {
    var o = {
      funcName: e,
      parser: this,
      token: i,
      breakOnTokenText: n
    }, l = Y0[e];
    if (l && l.handler)
      return l.handler(o, t, a);
    throw new G("No function handler for " + e);
  }
  /**
   * Parses the arguments of a function or environment
   */
  parseArguments(e, t) {
    var a = t.numArgs + t.numOptionalArgs;
    if (a === 0)
      return {
        args: [],
        optArgs: []
      };
    for (var i = [], n = [], o = 0; o < a; o++) {
      var l = t.argTypes && t.argTypes[o], s = o < t.numOptionalArgs;
      ("primitive" in t && t.primitive && l == null || // \sqrt expands into primitive if optional argument doesn't exist
      t.type === "sqrt" && o === 1 && n[0] == null) && (l = "primitive");
      var h = this.parseGroupOfType("argument to '" + e + "'", l, s);
      if (s)
        n.push(h);
      else if (h != null)
        i.push(h);
      else
        throw new G("Null argument, please report this as a bug");
    }
    return {
      args: i,
      optArgs: n
    };
  }
  /**
   * Parses a group when the mode is changing.
   */
  parseGroupOfType(e, t, a) {
    switch (t) {
      case "color":
        return this.parseColorGroup(a);
      case "size":
        return this.parseSizeGroup(a);
      case "url":
        return this.parseUrlGroup(a);
      case "math":
      case "text":
        return this.parseArgumentGroup(a, t);
      case "hbox": {
        var i = this.parseArgumentGroup(a, "text");
        return i != null ? {
          type: "styling",
          mode: i.mode,
          body: [i],
          style: "text",
          // simulate \textstyle
          resetFont: !0
        } : null;
      }
      case "raw": {
        var n = this.parseStringGroup("raw", a);
        return n != null ? {
          type: "raw",
          mode: "text",
          string: n.text
        } : null;
      }
      case "primitive": {
        if (a)
          throw new G("A primitive argument cannot be optional");
        var o = this.parseGroup(e);
        if (o == null)
          throw new G("Expected group as " + e, this.fetch());
        return o;
      }
      case "original":
      case null:
      case void 0:
        return this.parseArgumentGroup(a);
      default:
        throw new G("Unknown group type as " + e, this.fetch());
    }
  }
  /**
   * Discard any space tokens, fetching the next non-space token.
   */
  consumeSpaces() {
    for (; this.fetch().text === " "; )
      this.consume();
  }
  /**
   * Parses a group, essentially returning the string formed by the
   * brace-enclosed tokens plus some position information.
   */
  parseStringGroup(e, t) {
    var a = this.gullet.scanArgument(t);
    if (a == null)
      return null;
    for (var i = "", n; (n = this.fetch()).text !== "EOF"; )
      i += n.text, this.consume();
    return this.consume(), a.text = i, a;
  }
  /**
   * Parses a regex-delimited group: the largest sequence of tokens
   * whose concatenated strings match `regex`. Returns the string
   * formed by the tokens plus some position information.
   */
  parseRegexGroup(e, t) {
    for (var a = this.fetch(), i = a, n = "", o; (o = this.fetch()).text !== "EOF" && e.test(n + o.text); )
      i = o, n += i.text, this.consume();
    if (n === "")
      throw new G("Invalid " + t + ": '" + a.text + "'", a);
    return a.range(i, n);
  }
  /**
   * Parses a color description.
   */
  parseColorGroup(e) {
    var t = this.parseStringGroup("color", e);
    if (t == null)
      return null;
    var a = /^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);
    if (!a)
      throw new G("Invalid color: '" + t.text + "'", t);
    var i = a[0];
    return /^[0-9a-f]{6}$/i.test(i) && (i = "#" + i), {
      type: "color-token",
      mode: this.mode,
      color: i
    };
  }
  /**
   * Parses a size specification, consisting of magnitude and unit.
   */
  parseSizeGroup(e) {
    var t, a = !1;
    if (this.gullet.consumeSpaces(), !e && this.gullet.future().text !== "{" ? t = this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size") : t = this.parseStringGroup("size", e), !t)
      return null;
    !e && t.text.length === 0 && (t.text = "0pt", a = !0);
    var i = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);
    if (!i)
      throw new G("Invalid size: '" + t.text + "'", t);
    var n = {
      number: +(i[1] + i[2]),
      // sign + magnitude, cast to number
      unit: i[3]
    };
    if (!ia(n))
      throw new G("Invalid unit: '" + n.unit + "'", t);
    return {
      type: "size",
      mode: this.mode,
      value: n,
      isBlank: a
    };
  }
  /**
   * Parses an URL, checking escaped letters and allowed protocols,
   * and setting the catcode of % as an active character (as in \hyperref).
   */
  parseUrlGroup(e) {
    this.gullet.lexer.setCatcode("%", 13), this.gullet.lexer.setCatcode("~", 12);
    var t = this.parseStringGroup("url", e);
    if (this.gullet.lexer.setCatcode("%", 14), this.gullet.lexer.setCatcode("~", 13), t == null)
      return null;
    var a = t.text.replace(/\\([#$%&~_^{}])/g, "$1");
    return {
      type: "url",
      mode: this.mode,
      url: a
    };
  }
  /**
   * Parses an argument with the mode specified.
   */
  parseArgumentGroup(e, t) {
    var a = this.gullet.scanArgument(e);
    if (a == null)
      return null;
    var i = this.mode;
    t && this.switchMode(t), this.gullet.beginGroup();
    var n = this.parseExpression(!1, "EOF");
    this.expect("EOF"), this.gullet.endGroup();
    var o = {
      type: "ordgroup",
      mode: this.mode,
      loc: a.loc,
      body: n
    };
    return t && this.switchMode(i), o;
  }
  /**
   * Parses an ordinary group, which is either a single nucleus (like "x")
   * or an expression in braces (like "{x+y}") or an implicit group, a group
   * that starts at the current position, and ends right before a higher explicit
   * group ends, or at EOF.
   */
  parseGroup(e, t) {
    var a = this.fetch(), i = a.text, n;
    if (i === "{" || i === "\\begingroup") {
      this.consume();
      var o = i === "{" ? "}" : "\\endgroup";
      this.gullet.beginGroup();
      var l = this.parseExpression(!1, o), s = this.fetch();
      this.expect(o), this.gullet.endGroup(), n = {
        type: "ordgroup",
        mode: this.mode,
        loc: k0.range(a, s),
        body: l,
        // A group formed by \begingroup...\endgroup is a semi-simple group
        // which doesn't affect spacing in math mode, i.e., is transparent.
        // https://tex.stackexchange.com/questions/1930/when-should-one-
        // use-begingroup-instead-of-bgroup
        semisimple: i === "\\begingroup" || void 0
      };
    } else if (n = this.parseFunction(t, e) || this.parseSymbol(), n == null && i[0] === "\\" && !Za.hasOwnProperty(i)) {
      if (this.settings.throwOnError)
        throw new G("Undefined control sequence: " + i, a);
      n = this.formatUnsupportedCmd(i), this.consume();
    }
    return n;
  }
  /**
   * Form ligature-like combinations of characters for text mode.
   * This includes inputs like "--", "---", "``" and "''".
   * The result will simply replace multiple textord nodes with a single
   * character in each value by a single textord node having multiple
   * characters in its value.  The representation is still ASCII source.
   * The group will be modified in place.
   */
  formLigatures(e) {
    for (var t = e.length - 1, a = 0; a < t; ++a) {
      var i = e[a];
      if (i.type === "textord") {
        var n = i.text, o = e[a + 1];
        if (!(!o || o.type !== "textord")) {
          if (n === "-" && o.text === "-") {
            var l = e[a + 2];
            a + 1 < t && l && l.type === "textord" && l.text === "-" ? (e.splice(a, 3, {
              type: "textord",
              mode: "text",
              loc: k0.range(i, l),
              text: "---"
            }), t -= 2) : (e.splice(a, 2, {
              type: "textord",
              mode: "text",
              loc: k0.range(i, o),
              text: "--"
            }), t -= 1);
          }
          (n === "'" || n === "`") && o.text === n && (e.splice(a, 2, {
            type: "textord",
            mode: "text",
            loc: k0.range(i, o),
            text: n + n
          }), t -= 1);
        }
      }
    }
  }
  /**
   * Parse a single symbol out of the string. Here, we handle single character
   * symbols and special functions like \verb.
   */
  parseSymbol() {
    var e = this.fetch(), t = e.text;
    if (/^\\verb[^a-zA-Z]/.test(t)) {
      this.consume();
      var a = t.slice(5), i = a.charAt(0) === "*";
      if (i && (a = a.slice(1)), a.length < 2 || a.charAt(0) !== a.slice(-1))
        throw new G(`\\verb assertion failed --
                    please report what input caused this bug`);
      return a = a.slice(1, -1), {
        type: "verb",
        mode: "text",
        body: a,
        star: i
      };
    }
    Zr.hasOwnProperty(t[0]) && !o0[this.mode][t[0]] && (this.settings.strict && this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", 'Accented Unicode text character "' + t[0] + '" used in math mode', e), t = Zr[t[0]] + t.slice(1));
    var n = Cs.exec(t);
    n && (t = t.substring(0, n.index), t === "i" ? t = "ı" : t === "j" && (t = "ȷ"));
    var o;
    if (o0[this.mode][t]) {
      this.settings.strict && this.mode === "math" && _t.includes(t) && this.settings.reportNonstrict("unicodeTextInMathMode", 'Latin-1/Unicode text character "' + t[0] + '" used in math mode', e);
      var l = o0[this.mode][t].group, s = k0.range(e), h;
      Xn(l) ? h = {
        type: "atom",
        mode: this.mode,
        family: l,
        loc: s,
        text: t
      } : h = {
        type: l,
        mode: this.mode,
        loc: s,
        text: t
      }, o = h;
    } else if (t.charCodeAt(0) >= 128)
      this.settings.strict && (aa(t.charCodeAt(0)) ? this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", 'Unicode text character "' + t[0] + '" used in math mode', e) : this.settings.reportNonstrict("unknownSymbol", 'Unrecognized Unicode character "' + t[0] + '"' + (" (" + t.charCodeAt(0) + ")"), e)), o = {
        type: "textord",
        mode: "text",
        loc: k0.range(e),
        text: t
      };
    else
      return null;
    if (this.consume(), n)
      for (var c = 0; c < n[0].length; c++) {
        var m = n[0][c];
        if (!xt[m])
          throw new G("Unknown accent ' " + m + "'", e);
        var d = xt[m][this.mode] || xt[m].text;
        if (!d)
          throw new G("Accent " + m + " unsupported in " + this.mode + " mode", e);
        o = {
          type: "accent",
          mode: this.mode,
          loc: k0.range(e),
          label: d,
          isStretchy: !1,
          isShifty: !0,
          base: o
        };
      }
    return o;
  }
}
at.endOfExpression = /* @__PURE__ */ new Set(["}", "\\endgroup", "\\end", "\\right", "&"]);
var ar = function(e, t) {
  if (!(typeof e == "string" || e instanceof String))
    throw new TypeError("KaTeX can only parse string typed expression");
  var a = new at(e, t);
  delete a.gullet.macros.current["\\df@tag"];
  var i = a.parse();
  if (delete a.gullet.macros.current["\\current@color"], delete a.gullet.macros.current["\\color"], a.gullet.macros.get("\\df@tag")) {
    if (!t.displayMode)
      throw new G("\\tag works only in display equations");
    i = [{
      type: "tag",
      mode: "text",
      body: i,
      tag: a.subparse([new _0("\\df@tag")])
    }];
  }
  return i;
}, ir = function(e, t, a) {
  t.textContent = "";
  var i = it(e, a).toNode();
  t.appendChild(i);
};
typeof document < "u" && document.compatMode !== "CSS1Compat" && (typeof console < "u" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."), ir = function() {
  throw new G("KaTeX doesn't work in quirks mode.");
});
var Ka = function(e, t) {
  var a = it(e, t).toMarkup();
  return a;
}, Ja = function(e, t) {
  var a = new Gt(t);
  return ar(e, a);
}, ei = function(e, t, a) {
  if (a.throwOnError || !(e instanceof G))
    throw e;
  var i = N(["katex-error"], [new C0(t)]);
  return i.setAttribute("title", e.toString()), i.setAttribute("style", "color:" + a.errorColor), i;
}, it = function(e, t) {
  var a = new Gt(t);
  try {
    var i = ar(e, a);
    return Nn(i, e, a);
  } catch (n) {
    return ei(n, e, a);
  }
}, ti = function(e, t) {
  var a = new Gt(t);
  try {
    var i = ar(e, a);
    return Hn(i, e, a);
  } catch (n) {
    return ei(n, e, a);
  }
}, ri = "0.16.47", ai = {
  Span: he,
  Anchor: je,
  SymbolNode: C0,
  SvgNode: N0,
  PathNode: X0,
  LineNode: kt
}, Ds = {
  /**
   * Current KaTeX version
   */
  version: ri,
  /**
   * Renders the given LaTeX into an HTML+MathML combination, and adds
   * it as a child to the specified DOM node.
   */
  render: ir,
  /**
   * Renders the given LaTeX into an HTML+MathML combination string,
   * for sending to the client.
   */
  renderToString: Ka,
  /**
   * KaTeX error, usually during parsing.
   */
  ParseError: G,
  /**
   * The schema of Settings
   */
  SETTINGS_SCHEMA: Pe,
  /**
   * Parses the given LaTeX into KaTeX's internal parse tree structure,
   * without rendering to HTML or MathML.
   *
   * NOTE: This method is not currently recommended for public use.
   * The internal tree representation is unstable and is very likely
   * to change. Use at your own risk.
   */
  __parse: Ja,
  /**
   * Renders the given LaTeX into an HTML+MathML internal DOM tree
   * representation, without flattening that representation to a string.
   *
   * NOTE: This method is not currently recommended for public use.
   * The internal tree representation is unstable and is very likely
   * to change. Use at your own risk.
   */
  __renderToDomTree: it,
  /**
   * Renders the given LaTeX into an HTML internal DOM tree representation,
   * without MathML and without flattening that representation to a string.
   *
   * NOTE: This method is not currently recommended for public use.
   * The internal tree representation is unstable and is very likely
   * to change. Use at your own risk.
   */
  __renderToHTMLTree: ti,
  /**
   * extends internal font metrics object with a new object
   * each key in the new object represents a font name
  */
  __setFontMetrics: oa,
  /**
   * adds a new symbol to builtin symbols table
   */
  __defineSymbol: u,
  /**
   * adds a new function to builtin function list,
   * which directly produce parse tree elements
   * and have their own html/mathml builders
   */
  __defineFunction: X,
  /**
   * adds a new macro to builtin macro list
   */
  __defineMacro: A,
  /**
   * Expose the dom tree node types, which can be useful for type checking nodes.
   *
   * NOTE: These methods are not currently recommended for public use.
   * The internal tree representation is unstable and is very likely
   * to change. Use at your own risk.
   */
  __domTree: ai
};
const Hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  ParseError: G,
  SETTINGS_SCHEMA: Pe,
  __defineFunction: X,
  __defineMacro: A,
  __defineSymbol: u,
  __domTree: ai,
  __parse: Ja,
  __renderToDomTree: it,
  __renderToHTMLTree: ti,
  __setFontMetrics: oa,
  default: Ds,
  get render() {
    return ir;
  },
  renderToString: Ka,
  version: ri
}, Symbol.toStringTag, { value: "Module" }));
export {
  Ht as e,
  Ps as i,
  Hs as k,
  Qs as n,
  qs as p,
  Ns as r,
  Os as s
};
