import {
  require_InputJax
} from "./chunk-UKJN7Z3L.js";
import {
  require_OutputJax,
  require_TeXAtom,
  require_maction,
  require_math,
  require_menclose,
  require_merror,
  require_mfenced,
  require_mfrac,
  require_mglyph,
  require_mi,
  require_mmultiscripts,
  require_mn,
  require_mpadded,
  require_mphantom,
  require_mroot,
  require_mrow,
  require_ms,
  require_mspace,
  require_msqrt,
  require_msubsup,
  require_mtable,
  require_mtd,
  require_mtext,
  require_mtr,
  require_munderover,
  require_semantics
} from "./chunk-HN2BHF2T.js";
import {
  require_MathItem
} from "./chunk-KYGANWBV.js";
import {
  require_Attributes,
  require_Factory,
  require_MmlNode,
  require_mo
} from "./chunk-EAIZ2RYS.js";
import {
  require_mathjax
} from "./chunk-43H6LK2U.js";
import {
  require_Options
} from "./chunk-7TBXX2KH.js";
import {
  require_PrioritizedList
} from "./chunk-VCEPAEYZ.js";
import {
  __commonJS
} from "./chunk-MZHE4QUL.js";

// ../../node_modules/mathjax-full/js/util/LinkedList.js
var require_LinkedList = __commonJS({
  "../../node_modules/mathjax-full/js/util/LinkedList.js"(exports) {
    "use strict";
    var __generator = exports && exports.__generator || function(thisArg, body) {
      var _ = { label: 0, sent: function() {
        if (t[0] & 1) throw t[1];
        return t[1];
      }, trys: [], ops: [] }, f, y, t, g;
      return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
        return this;
      }), g;
      function verb(n) {
        return function(v) {
          return step([n, v]);
        };
      }
      function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
          if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
          if (y = 0, t) op = [op[0] & 2, t.value];
          switch (op[0]) {
            case 0:
            case 1:
              t = op;
              break;
            case 4:
              _.label++;
              return { value: op[1], done: false };
            case 5:
              _.label++;
              y = op[1];
              op = [0];
              continue;
            case 7:
              op = _.ops.pop();
              _.trys.pop();
              continue;
            default:
              if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
                _ = 0;
                continue;
              }
              if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
                _.label = op[1];
                break;
              }
              if (op[0] === 6 && _.label < t[1]) {
                _.label = t[1];
                t = op;
                break;
              }
              if (t && _.label < t[2]) {
                _.label = t[2];
                _.ops.push(op);
                break;
              }
              if (t[2]) _.ops.pop();
              _.trys.pop();
              continue;
          }
          op = body.call(thisArg, _);
        } catch (e) {
          op = [6, e];
          y = 0;
        } finally {
          f = t = 0;
        }
        if (op[0] & 5) throw op[1];
        return { value: op[0] ? op[1] : void 0, done: true };
      }
    };
    var __read = exports && exports.__read || function(o, n) {
      var m = typeof Symbol === "function" && o[Symbol.iterator];
      if (!m) return o;
      var i = m.call(o), r, ar = [], e;
      try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
      } catch (error) {
        e = { error };
      } finally {
        try {
          if (r && !r.done && (m = i["return"])) m.call(i);
        } finally {
          if (e) throw e.error;
        }
      }
      return ar;
    };
    var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
      if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
          if (!ar) ar = Array.prototype.slice.call(from, 0, i);
          ar[i] = from[i];
        }
      }
      return to.concat(ar || Array.prototype.slice.call(from));
    };
    var __values = exports && exports.__values || function(o) {
      var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
      if (m) return m.call(o);
      if (o && typeof o.length === "number") return {
        next: function() {
          if (o && i >= o.length) o = void 0;
          return { value: o && o[i++], done: !o };
        }
      };
      throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
    };
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.LinkedList = exports.ListItem = exports.END = void 0;
    exports.END = /* @__PURE__ */ Symbol();
    var ListItem = /* @__PURE__ */ (function() {
      function ListItem2(data) {
        if (data === void 0) {
          data = null;
        }
        this.next = null;
        this.prev = null;
        this.data = data;
      }
      return ListItem2;
    })();
    exports.ListItem = ListItem;
    var LinkedList = (function() {
      function LinkedList2() {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          args[_i] = arguments[_i];
        }
        this.list = new ListItem(exports.END);
        this.list.next = this.list.prev = this.list;
        this.push.apply(this, __spreadArray([], __read(args), false));
      }
      LinkedList2.prototype.isBefore = function(a, b) {
        return a < b;
      };
      LinkedList2.prototype.push = function() {
        var e_1, _a;
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          args[_i] = arguments[_i];
        }
        try {
          for (var args_1 = __values(args), args_1_1 = args_1.next(); !args_1_1.done; args_1_1 = args_1.next()) {
            var data = args_1_1.value;
            var item = new ListItem(data);
            item.next = this.list;
            item.prev = this.list.prev;
            this.list.prev = item;
            item.prev.next = item;
          }
        } catch (e_1_1) {
          e_1 = { error: e_1_1 };
        } finally {
          try {
            if (args_1_1 && !args_1_1.done && (_a = args_1.return)) _a.call(args_1);
          } finally {
            if (e_1) throw e_1.error;
          }
        }
        return this;
      };
      LinkedList2.prototype.pop = function() {
        var item = this.list.prev;
        if (item.data === exports.END) {
          return null;
        }
        this.list.prev = item.prev;
        item.prev.next = this.list;
        item.next = item.prev = null;
        return item.data;
      };
      LinkedList2.prototype.unshift = function() {
        var e_2, _a;
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          args[_i] = arguments[_i];
        }
        try {
          for (var _b = __values(args.slice(0).reverse()), _c = _b.next(); !_c.done; _c = _b.next()) {
            var data = _c.value;
            var item = new ListItem(data);
            item.next = this.list.next;
            item.prev = this.list;
            this.list.next = item;
            item.next.prev = item;
          }
        } catch (e_2_1) {
          e_2 = { error: e_2_1 };
        } finally {
          try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
          } finally {
            if (e_2) throw e_2.error;
          }
        }
        return this;
      };
      LinkedList2.prototype.shift = function() {
        var item = this.list.next;
        if (item.data === exports.END) {
          return null;
        }
        this.list.next = item.next;
        item.next.prev = this.list;
        item.next = item.prev = null;
        return item.data;
      };
      LinkedList2.prototype.remove = function() {
        var e_3, _a;
        var items = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          items[_i] = arguments[_i];
        }
        var map = /* @__PURE__ */ new Map();
        try {
          for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
            var item_1 = items_1_1.value;
            map.set(item_1, true);
          }
        } catch (e_3_1) {
          e_3 = { error: e_3_1 };
        } finally {
          try {
            if (items_1_1 && !items_1_1.done && (_a = items_1.return)) _a.call(items_1);
          } finally {
            if (e_3) throw e_3.error;
          }
        }
        var item = this.list.next;
        while (item.data !== exports.END) {
          var next = item.next;
          if (map.has(item.data)) {
            item.prev.next = item.next;
            item.next.prev = item.prev;
            item.next = item.prev = null;
          }
          item = next;
        }
      };
      LinkedList2.prototype.clear = function() {
        this.list.next.prev = this.list.prev.next = null;
        this.list.next = this.list.prev = this.list;
        return this;
      };
      LinkedList2.prototype[Symbol.iterator] = function() {
        var current;
        return __generator(this, function(_a) {
          switch (_a.label) {
            case 0:
              current = this.list.next;
              _a.label = 1;
            case 1:
              if (!(current.data !== exports.END)) return [3, 3];
              return [4, current.data];
            case 2:
              _a.sent();
              current = current.next;
              return [3, 1];
            case 3:
              return [2];
          }
        });
      };
      LinkedList2.prototype.reversed = function() {
        var current;
        return __generator(this, function(_a) {
          switch (_a.label) {
            case 0:
              current = this.list.prev;
              _a.label = 1;
            case 1:
              if (!(current.data !== exports.END)) return [3, 3];
              return [4, current.data];
            case 2:
              _a.sent();
              current = current.prev;
              return [3, 1];
            case 3:
              return [2];
          }
        });
      };
      LinkedList2.prototype.insert = function(data, isBefore) {
        if (isBefore === void 0) {
          isBefore = null;
        }
        if (isBefore === null) {
          isBefore = this.isBefore.bind(this);
        }
        var item = new ListItem(data);
        var cur = this.list.next;
        while (cur.data !== exports.END && isBefore(cur.data, item.data)) {
          cur = cur.next;
        }
        item.prev = cur.prev;
        item.next = cur;
        cur.prev.next = cur.prev = item;
        return this;
      };
      LinkedList2.prototype.sort = function(isBefore) {
        var e_4, _a;
        if (isBefore === void 0) {
          isBefore = null;
        }
        if (isBefore === null) {
          isBefore = this.isBefore.bind(this);
        }
        var lists = [];
        try {
          for (var _b = __values(this), _c = _b.next(); !_c.done; _c = _b.next()) {
            var item = _c.value;
            lists.push(new LinkedList2(item));
          }
        } catch (e_4_1) {
          e_4 = { error: e_4_1 };
        } finally {
          try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
          } finally {
            if (e_4) throw e_4.error;
          }
        }
        this.list.next = this.list.prev = this.list;
        while (lists.length > 1) {
          var l1 = lists.shift();
          var l2 = lists.shift();
          l1.merge(l2, isBefore);
          lists.push(l1);
        }
        if (lists.length) {
          this.list = lists[0].list;
        }
        return this;
      };
      LinkedList2.prototype.merge = function(list, isBefore) {
        var _a, _b, _c, _d, _e;
        if (isBefore === void 0) {
          isBefore = null;
        }
        if (isBefore === null) {
          isBefore = this.isBefore.bind(this);
        }
        var lcur = this.list.next;
        var mcur = list.list.next;
        while (lcur.data !== exports.END && mcur.data !== exports.END) {
          if (isBefore(mcur.data, lcur.data)) {
            _a = __read([lcur, mcur], 2), mcur.prev.next = _a[0], lcur.prev.next = _a[1];
            _b = __read([lcur.prev, mcur.prev], 2), mcur.prev = _b[0], lcur.prev = _b[1];
            _c = __read([list.list, this.list], 2), this.list.prev.next = _c[0], list.list.prev.next = _c[1];
            _d = __read([list.list.prev, this.list.prev], 2), this.list.prev = _d[0], list.list.prev = _d[1];
            _e = __read([mcur.next, lcur], 2), lcur = _e[0], mcur = _e[1];
          } else {
            lcur = lcur.next;
          }
        }
        if (mcur.data !== exports.END) {
          this.list.prev.next = list.list.next;
          list.list.next.prev = this.list.prev;
          list.list.prev.next = this.list;
          this.list.prev = list.list.prev;
          list.list.next = list.list.prev = list.list;
        }
        return this;
      };
      return LinkedList2;
    })();
    exports.LinkedList = LinkedList;
  }
});

// ../../node_modules/mathjax-full/js/core/MathList.js
var require_MathList = __commonJS({
  "../../node_modules/mathjax-full/js/core/MathList.js"(exports) {
    "use strict";
    var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        if (typeof b !== "function" && b !== null)
          throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    })();
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.AbstractMathList = void 0;
    var LinkedList_js_1 = require_LinkedList();
    var AbstractMathList = (function(_super) {
      __extends(AbstractMathList2, _super);
      function AbstractMathList2() {
        return _super !== null && _super.apply(this, arguments) || this;
      }
      AbstractMathList2.prototype.isBefore = function(a, b) {
        return a.start.i < b.start.i || a.start.i === b.start.i && a.start.n < b.start.n;
      };
      return AbstractMathList2;
    })(LinkedList_js_1.LinkedList);
    exports.AbstractMathList = AbstractMathList;
  }
});

// ../../node_modules/mathjax-full/js/core/Tree/NodeFactory.js
var require_NodeFactory = __commonJS({
  "../../node_modules/mathjax-full/js/core/Tree/NodeFactory.js"(exports) {
    "use strict";
    var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        if (typeof b !== "function" && b !== null)
          throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    })();
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.AbstractNodeFactory = void 0;
    var Factory_js_1 = require_Factory();
    var AbstractNodeFactory = (function(_super) {
      __extends(AbstractNodeFactory2, _super);
      function AbstractNodeFactory2() {
        return _super !== null && _super.apply(this, arguments) || this;
      }
      AbstractNodeFactory2.prototype.create = function(kind, properties, children) {
        if (properties === void 0) {
          properties = {};
        }
        if (children === void 0) {
          children = [];
        }
        return this.node[kind](properties, children);
      };
      return AbstractNodeFactory2;
    })(Factory_js_1.AbstractFactory);
    exports.AbstractNodeFactory = AbstractNodeFactory;
  }
});

// ../../node_modules/mathjax-full/js/core/MmlTree/MmlNodes/mstyle.js
var require_mstyle = __commonJS({
  "../../node_modules/mathjax-full/js/core/MmlTree/MmlNodes/mstyle.js"(exports) {
    "use strict";
    var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        if (typeof b !== "function" && b !== null)
          throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    })();
    var __assign = exports && exports.__assign || function() {
      __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
          s = arguments[i];
          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
        }
        return t;
      };
      return __assign.apply(this, arguments);
    };
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.MmlMstyle = void 0;
    var MmlNode_js_1 = require_MmlNode();
    var Attributes_js_1 = require_Attributes();
    var MmlMstyle = (function(_super) {
      __extends(MmlMstyle2, _super);
      function MmlMstyle2() {
        return _super !== null && _super.apply(this, arguments) || this;
      }
      Object.defineProperty(MmlMstyle2.prototype, "kind", {
        get: function() {
          return "mstyle";
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(MmlMstyle2.prototype, "notParent", {
        get: function() {
          return this.childNodes[0] && this.childNodes[0].childNodes.length === 1;
        },
        enumerable: false,
        configurable: true
      });
      MmlMstyle2.prototype.setChildInheritedAttributes = function(attributes, display, level, prime) {
        var scriptlevel = this.attributes.getExplicit("scriptlevel");
        if (scriptlevel != null) {
          scriptlevel = scriptlevel.toString();
          if (scriptlevel.match(/^\s*[-+]/)) {
            level += parseInt(scriptlevel);
          } else {
            level = parseInt(scriptlevel);
          }
          prime = false;
        }
        var displaystyle = this.attributes.getExplicit("displaystyle");
        if (displaystyle != null) {
          display = displaystyle === true;
          prime = false;
        }
        var cramped = this.attributes.getExplicit("data-cramped");
        if (cramped != null) {
          prime = cramped;
        }
        attributes = this.addInheritedAttributes(attributes, this.attributes.getAllAttributes());
        this.childNodes[0].setInheritedAttributes(attributes, display, level, prime);
      };
      MmlMstyle2.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlLayoutNode.defaults), { scriptlevel: Attributes_js_1.INHERIT, displaystyle: Attributes_js_1.INHERIT, scriptsizemultiplier: 1 / Math.sqrt(2), scriptminsize: "8px", mathbackground: Attributes_js_1.INHERIT, mathcolor: Attributes_js_1.INHERIT, dir: Attributes_js_1.INHERIT, infixlinebreakstyle: "before" });
      return MmlMstyle2;
    })(MmlNode_js_1.AbstractMmlLayoutNode);
    exports.MmlMstyle = MmlMstyle;
  }
});

// ../../node_modules/mathjax-full/js/core/MmlTree/MmlNodes/maligngroup.js
var require_maligngroup = __commonJS({
  "../../node_modules/mathjax-full/js/core/MmlTree/MmlNodes/maligngroup.js"(exports) {
    "use strict";
    var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        if (typeof b !== "function" && b !== null)
          throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    })();
    var __assign = exports && exports.__assign || function() {
      __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
          s = arguments[i];
          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
        }
        return t;
      };
      return __assign.apply(this, arguments);
    };
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.MmlMaligngroup = void 0;
    var MmlNode_js_1 = require_MmlNode();
    var Attributes_js_1 = require_Attributes();
    var MmlMaligngroup = (function(_super) {
      __extends(MmlMaligngroup2, _super);
      function MmlMaligngroup2() {
        return _super !== null && _super.apply(this, arguments) || this;
      }
      Object.defineProperty(MmlMaligngroup2.prototype, "kind", {
        get: function() {
          return "maligngroup";
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(MmlMaligngroup2.prototype, "isSpacelike", {
        get: function() {
          return true;
        },
        enumerable: false,
        configurable: true
      });
      MmlMaligngroup2.prototype.setChildInheritedAttributes = function(attributes, display, level, prime) {
        attributes = this.addInheritedAttributes(attributes, this.attributes.getAllAttributes());
        _super.prototype.setChildInheritedAttributes.call(this, attributes, display, level, prime);
      };
      MmlMaligngroup2.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlLayoutNode.defaults), { groupalign: Attributes_js_1.INHERIT });
      return MmlMaligngroup2;
    })(MmlNode_js_1.AbstractMmlLayoutNode);
    exports.MmlMaligngroup = MmlMaligngroup;
  }
});

// ../../node_modules/mathjax-full/js/core/MmlTree/MmlNodes/malignmark.js
var require_malignmark = __commonJS({
  "../../node_modules/mathjax-full/js/core/MmlTree/MmlNodes/malignmark.js"(exports) {
    "use strict";
    var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        if (typeof b !== "function" && b !== null)
          throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    })();
    var __assign = exports && exports.__assign || function() {
      __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
          s = arguments[i];
          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
        }
        return t;
      };
      return __assign.apply(this, arguments);
    };
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.MmlMalignmark = void 0;
    var MmlNode_js_1 = require_MmlNode();
    var MmlMalignmark = (function(_super) {
      __extends(MmlMalignmark2, _super);
      function MmlMalignmark2() {
        return _super !== null && _super.apply(this, arguments) || this;
      }
      Object.defineProperty(MmlMalignmark2.prototype, "kind", {
        get: function() {
          return "malignmark";
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(MmlMalignmark2.prototype, "arity", {
        get: function() {
          return 0;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(MmlMalignmark2.prototype, "isSpacelike", {
        get: function() {
          return true;
        },
        enumerable: false,
        configurable: true
      });
      MmlMalignmark2.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlNode.defaults), { edge: "left" });
      return MmlMalignmark2;
    })(MmlNode_js_1.AbstractMmlNode);
    exports.MmlMalignmark = MmlMalignmark;
  }
});

// ../../node_modules/mathjax-full/js/core/MmlTree/MmlNodes/mathchoice.js
var require_mathchoice = __commonJS({
  "../../node_modules/mathjax-full/js/core/MmlTree/MmlNodes/mathchoice.js"(exports) {
    "use strict";
    var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        if (typeof b !== "function" && b !== null)
          throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    })();
    var __assign = exports && exports.__assign || function() {
      __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
          s = arguments[i];
          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
        }
        return t;
      };
      return __assign.apply(this, arguments);
    };
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.MathChoice = void 0;
    var MmlNode_js_1 = require_MmlNode();
    var MathChoice = (function(_super) {
      __extends(MathChoice2, _super);
      function MathChoice2() {
        return _super !== null && _super.apply(this, arguments) || this;
      }
      Object.defineProperty(MathChoice2.prototype, "kind", {
        get: function() {
          return "MathChoice";
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(MathChoice2.prototype, "arity", {
        get: function() {
          return 4;
        },
        enumerable: false,
        configurable: true
      });
      Object.defineProperty(MathChoice2.prototype, "notParent", {
        get: function() {
          return true;
        },
        enumerable: false,
        configurable: true
      });
      MathChoice2.prototype.setInheritedAttributes = function(attributes, display, level, prime) {
        var selection = display ? 0 : Math.max(0, Math.min(level, 2)) + 1;
        var child = this.childNodes[selection] || this.factory.create("mrow");
        this.parent.replaceChild(child, this);
        child.setInheritedAttributes(attributes, display, level, prime);
      };
      MathChoice2.defaults = __assign({}, MmlNode_js_1.AbstractMmlBaseNode.defaults);
      return MathChoice2;
    })(MmlNode_js_1.AbstractMmlBaseNode);
    exports.MathChoice = MathChoice;
  }
});

// ../../node_modules/mathjax-full/js/core/MmlTree/MML.js
var require_MML = __commonJS({
  "../../node_modules/mathjax-full/js/core/MmlTree/MML.js"(exports) {
    "use strict";
    var _a;
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.MML = void 0;
    var MmlNode_js_1 = require_MmlNode();
    var math_js_1 = require_math();
    var mi_js_1 = require_mi();
    var mn_js_1 = require_mn();
    var mo_js_1 = require_mo();
    var mtext_js_1 = require_mtext();
    var mspace_js_1 = require_mspace();
    var ms_js_1 = require_ms();
    var mrow_js_1 = require_mrow();
    var mfrac_js_1 = require_mfrac();
    var msqrt_js_1 = require_msqrt();
    var mroot_js_1 = require_mroot();
    var mstyle_js_1 = require_mstyle();
    var merror_js_1 = require_merror();
    var mpadded_js_1 = require_mpadded();
    var mphantom_js_1 = require_mphantom();
    var mfenced_js_1 = require_mfenced();
    var menclose_js_1 = require_menclose();
    var maction_js_1 = require_maction();
    var msubsup_js_1 = require_msubsup();
    var munderover_js_1 = require_munderover();
    var mmultiscripts_js_1 = require_mmultiscripts();
    var mtable_js_1 = require_mtable();
    var mtr_js_1 = require_mtr();
    var mtd_js_1 = require_mtd();
    var maligngroup_js_1 = require_maligngroup();
    var malignmark_js_1 = require_malignmark();
    var mglyph_js_1 = require_mglyph();
    var semantics_js_1 = require_semantics();
    var TeXAtom_js_1 = require_TeXAtom();
    var mathchoice_js_1 = require_mathchoice();
    exports.MML = (_a = {}, _a[math_js_1.MmlMath.prototype.kind] = math_js_1.MmlMath, _a[mi_js_1.MmlMi.prototype.kind] = mi_js_1.MmlMi, _a[mn_js_1.MmlMn.prototype.kind] = mn_js_1.MmlMn, _a[mo_js_1.MmlMo.prototype.kind] = mo_js_1.MmlMo, _a[mtext_js_1.MmlMtext.prototype.kind] = mtext_js_1.MmlMtext, _a[mspace_js_1.MmlMspace.prototype.kind] = mspace_js_1.MmlMspace, _a[ms_js_1.MmlMs.prototype.kind] = ms_js_1.MmlMs, _a[mrow_js_1.MmlMrow.prototype.kind] = mrow_js_1.MmlMrow, _a[mrow_js_1.MmlInferredMrow.prototype.kind] = mrow_js_1.MmlInferredMrow, _a[mfrac_js_1.MmlMfrac.prototype.kind] = mfrac_js_1.MmlMfrac, _a[msqrt_js_1.MmlMsqrt.prototype.kind] = msqrt_js_1.MmlMsqrt, _a[mroot_js_1.MmlMroot.prototype.kind] = mroot_js_1.MmlMroot, _a[mstyle_js_1.MmlMstyle.prototype.kind] = mstyle_js_1.MmlMstyle, _a[merror_js_1.MmlMerror.prototype.kind] = merror_js_1.MmlMerror, _a[mpadded_js_1.MmlMpadded.prototype.kind] = mpadded_js_1.MmlMpadded, _a[mphantom_js_1.MmlMphantom.prototype.kind] = mphantom_js_1.MmlMphantom, _a[mfenced_js_1.MmlMfenced.prototype.kind] = mfenced_js_1.MmlMfenced, _a[menclose_js_1.MmlMenclose.prototype.kind] = menclose_js_1.MmlMenclose, _a[maction_js_1.MmlMaction.prototype.kind] = maction_js_1.MmlMaction, _a[msubsup_js_1.MmlMsub.prototype.kind] = msubsup_js_1.MmlMsub, _a[msubsup_js_1.MmlMsup.prototype.kind] = msubsup_js_1.MmlMsup, _a[msubsup_js_1.MmlMsubsup.prototype.kind] = msubsup_js_1.MmlMsubsup, _a[munderover_js_1.MmlMunder.prototype.kind] = munderover_js_1.MmlMunder, _a[munderover_js_1.MmlMover.prototype.kind] = munderover_js_1.MmlMover, _a[munderover_js_1.MmlMunderover.prototype.kind] = munderover_js_1.MmlMunderover, _a[mmultiscripts_js_1.MmlMmultiscripts.prototype.kind] = mmultiscripts_js_1.MmlMmultiscripts, _a[mmultiscripts_js_1.MmlMprescripts.prototype.kind] = mmultiscripts_js_1.MmlMprescripts, _a[mmultiscripts_js_1.MmlNone.prototype.kind] = mmultiscripts_js_1.MmlNone, _a[mtable_js_1.MmlMtable.prototype.kind] = mtable_js_1.MmlMtable, _a[mtr_js_1.MmlMlabeledtr.prototype.kind] = mtr_js_1.MmlMlabeledtr, _a[mtr_js_1.MmlMtr.prototype.kind] = mtr_js_1.MmlMtr, _a[mtd_js_1.MmlMtd.prototype.kind] = mtd_js_1.MmlMtd, _a[maligngroup_js_1.MmlMaligngroup.prototype.kind] = maligngroup_js_1.MmlMaligngroup, _a[malignmark_js_1.MmlMalignmark.prototype.kind] = malignmark_js_1.MmlMalignmark, _a[mglyph_js_1.MmlMglyph.prototype.kind] = mglyph_js_1.MmlMglyph, _a[semantics_js_1.MmlSemantics.prototype.kind] = semantics_js_1.MmlSemantics, _a[semantics_js_1.MmlAnnotation.prototype.kind] = semantics_js_1.MmlAnnotation, _a[semantics_js_1.MmlAnnotationXML.prototype.kind] = semantics_js_1.MmlAnnotationXML, _a[TeXAtom_js_1.TeXAtom.prototype.kind] = TeXAtom_js_1.TeXAtom, _a[mathchoice_js_1.MathChoice.prototype.kind] = mathchoice_js_1.MathChoice, _a[MmlNode_js_1.TextNode.prototype.kind] = MmlNode_js_1.TextNode, _a[MmlNode_js_1.XMLNode.prototype.kind] = MmlNode_js_1.XMLNode, _a);
  }
});

// ../../node_modules/mathjax-full/js/core/MmlTree/MmlFactory.js
var require_MmlFactory = __commonJS({
  "../../node_modules/mathjax-full/js/core/MmlTree/MmlFactory.js"(exports) {
    "use strict";
    var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        if (typeof b !== "function" && b !== null)
          throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    })();
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.MmlFactory = void 0;
    var NodeFactory_js_1 = require_NodeFactory();
    var MML_js_1 = require_MML();
    var MmlFactory = (function(_super) {
      __extends(MmlFactory2, _super);
      function MmlFactory2() {
        return _super !== null && _super.apply(this, arguments) || this;
      }
      Object.defineProperty(MmlFactory2.prototype, "MML", {
        get: function() {
          return this.node;
        },
        enumerable: false,
        configurable: true
      });
      MmlFactory2.defaultNodes = MML_js_1.MML;
      return MmlFactory2;
    })(NodeFactory_js_1.AbstractNodeFactory);
    exports.MmlFactory = MmlFactory;
  }
});

// ../../node_modules/mathjax-full/js/util/BitField.js
var require_BitField = __commonJS({
  "../../node_modules/mathjax-full/js/util/BitField.js"(exports) {
    "use strict";
    var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        if (typeof b !== "function" && b !== null)
          throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    })();
    var __values = exports && exports.__values || function(o) {
      var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
      if (m) return m.call(o);
      if (o && typeof o.length === "number") return {
        next: function() {
          if (o && i >= o.length) o = void 0;
          return { value: o && o[i++], done: !o };
        }
      };
      throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
    };
    var __read = exports && exports.__read || function(o, n) {
      var m = typeof Symbol === "function" && o[Symbol.iterator];
      if (!m) return o;
      var i = m.call(o), r, ar = [], e;
      try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
      } catch (error) {
        e = { error };
      } finally {
        try {
          if (r && !r.done && (m = i["return"])) m.call(i);
        } finally {
          if (e) throw e.error;
        }
      }
      return ar;
    };
    var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
      if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
          if (!ar) ar = Array.prototype.slice.call(from, 0, i);
          ar[i] = from[i];
        }
      }
      return to.concat(ar || Array.prototype.slice.call(from));
    };
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.BitFieldClass = exports.BitField = void 0;
    var BitField = (function() {
      function BitField2() {
        this.bits = 0;
      }
      BitField2.allocate = function() {
        var e_1, _a;
        var names = [];
        for (var _i = 0; _i < arguments.length; _i++) {
          names[_i] = arguments[_i];
        }
        try {
          for (var names_1 = __values(names), names_1_1 = names_1.next(); !names_1_1.done; names_1_1 = names_1.next()) {
            var name_1 = names_1_1.value;
            if (this.has(name_1)) {
              throw new Error("Bit already allocated for " + name_1);
            }
            if (this.next === BitField2.MAXBIT) {
              throw new Error("Maximum number of bits already allocated");
            }
            this.names.set(name_1, this.next);
            this.next <<= 1;
          }
        } catch (e_1_1) {
          e_1 = { error: e_1_1 };
        } finally {
          try {
            if (names_1_1 && !names_1_1.done && (_a = names_1.return)) _a.call(names_1);
          } finally {
            if (e_1) throw e_1.error;
          }
        }
      };
      BitField2.has = function(name) {
        return this.names.has(name);
      };
      BitField2.prototype.set = function(name) {
        this.bits |= this.getBit(name);
      };
      BitField2.prototype.clear = function(name) {
        this.bits &= ~this.getBit(name);
      };
      BitField2.prototype.isSet = function(name) {
        return !!(this.bits & this.getBit(name));
      };
      BitField2.prototype.reset = function() {
        this.bits = 0;
      };
      BitField2.prototype.getBit = function(name) {
        var bit = this.constructor.names.get(name);
        if (!bit) {
          throw new Error("Unknown bit-field name: " + name);
        }
        return bit;
      };
      BitField2.MAXBIT = 1 << 31;
      BitField2.next = 1;
      BitField2.names = /* @__PURE__ */ new Map();
      return BitField2;
    })();
    exports.BitField = BitField;
    function BitFieldClass() {
      var names = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        names[_i] = arguments[_i];
      }
      var Bits = (function(_super) {
        __extends(Bits2, _super);
        function Bits2() {
          return _super !== null && _super.apply(this, arguments) || this;
        }
        return Bits2;
      })(BitField);
      Bits.allocate.apply(Bits, __spreadArray([], __read(names), false));
      return Bits;
    }
    exports.BitFieldClass = BitFieldClass;
  }
});

// ../../node_modules/mathjax-full/js/core/MathDocument.js
var require_MathDocument = __commonJS({
  "../../node_modules/mathjax-full/js/core/MathDocument.js"(exports) {
    "use strict";
    var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        if (typeof b !== "function" && b !== null)
          throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    })();
    var __values = exports && exports.__values || function(o) {
      var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
      if (m) return m.call(o);
      if (o && typeof o.length === "number") return {
        next: function() {
          if (o && i >= o.length) o = void 0;
          return { value: o && o[i++], done: !o };
        }
      };
      throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
    };
    var __read = exports && exports.__read || function(o, n) {
      var m = typeof Symbol === "function" && o[Symbol.iterator];
      if (!m) return o;
      var i = m.call(o), r, ar = [], e;
      try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
      } catch (error) {
        e = { error };
      } finally {
        try {
          if (r && !r.done && (m = i["return"])) m.call(i);
        } finally {
          if (e) throw e.error;
        }
      }
      return ar;
    };
    var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
      if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
          if (!ar) ar = Array.prototype.slice.call(from, 0, i);
          ar[i] = from[i];
        }
      }
      return to.concat(ar || Array.prototype.slice.call(from));
    };
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.AbstractMathDocument = exports.resetAllOptions = exports.resetOptions = exports.RenderList = void 0;
    var Options_js_1 = require_Options();
    var InputJax_js_1 = require_InputJax();
    var OutputJax_js_1 = require_OutputJax();
    var MathList_js_1 = require_MathList();
    var MathItem_js_1 = require_MathItem();
    var MmlFactory_js_1 = require_MmlFactory();
    var BitField_js_1 = require_BitField();
    var PrioritizedList_js_1 = require_PrioritizedList();
    var RenderList = (function(_super) {
      __extends(RenderList2, _super);
      function RenderList2() {
        return _super !== null && _super.apply(this, arguments) || this;
      }
      RenderList2.create = function(actions) {
        var e_1, _a;
        var list = new this();
        try {
          for (var _b = __values(Object.keys(actions)), _c = _b.next(); !_c.done; _c = _b.next()) {
            var id = _c.value;
            var _d = __read(this.action(id, actions[id]), 2), action = _d[0], priority = _d[1];
            if (priority) {
              list.add(action, priority);
            }
          }
        } catch (e_1_1) {
          e_1 = { error: e_1_1 };
        } finally {
          try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
          } finally {
            if (e_1) throw e_1.error;
          }
        }
        return list;
      };
      RenderList2.action = function(id, action) {
        var _a, _b, _c, _d;
        var renderDoc, renderMath;
        var convert = true;
        var priority = action[0];
        if (action.length === 1 || typeof action[1] === "boolean") {
          action.length === 2 && (convert = action[1]);
          _a = __read(this.methodActions(id), 2), renderDoc = _a[0], renderMath = _a[1];
        } else if (typeof action[1] === "string") {
          if (typeof action[2] === "string") {
            action.length === 4 && (convert = action[3]);
            var _e = __read(action.slice(1), 2), method1 = _e[0], method2 = _e[1];
            _b = __read(this.methodActions(method1, method2), 2), renderDoc = _b[0], renderMath = _b[1];
          } else {
            action.length === 3 && (convert = action[2]);
            _c = __read(this.methodActions(action[1]), 2), renderDoc = _c[0], renderMath = _c[1];
          }
        } else {
          action.length === 4 && (convert = action[3]);
          _d = __read(action.slice(1), 2), renderDoc = _d[0], renderMath = _d[1];
        }
        return [{ id, renderDoc, renderMath, convert }, priority];
      };
      RenderList2.methodActions = function(method1, method2) {
        if (method2 === void 0) {
          method2 = method1;
        }
        return [
          function(document) {
            method1 && document[method1]();
            return false;
          },
          function(math, document) {
            method2 && math[method2](document);
            return false;
          }
        ];
      };
      RenderList2.prototype.renderDoc = function(document, start) {
        var e_2, _a;
        if (start === void 0) {
          start = MathItem_js_1.STATE.UNPROCESSED;
        }
        try {
          for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) {
            var item = _c.value;
            if (item.priority >= start) {
              if (item.item.renderDoc(document))
                return;
            }
          }
        } catch (e_2_1) {
          e_2 = { error: e_2_1 };
        } finally {
          try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
          } finally {
            if (e_2) throw e_2.error;
          }
        }
      };
      RenderList2.prototype.renderMath = function(math, document, start) {
        var e_3, _a;
        if (start === void 0) {
          start = MathItem_js_1.STATE.UNPROCESSED;
        }
        try {
          for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) {
            var item = _c.value;
            if (item.priority >= start) {
              if (item.item.renderMath(math, document))
                return;
            }
          }
        } catch (e_3_1) {
          e_3 = { error: e_3_1 };
        } finally {
          try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
          } finally {
            if (e_3) throw e_3.error;
          }
        }
      };
      RenderList2.prototype.renderConvert = function(math, document, end) {
        var e_4, _a;
        if (end === void 0) {
          end = MathItem_js_1.STATE.LAST;
        }
        try {
          for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) {
            var item = _c.value;
            if (item.priority > end)
              return;
            if (item.item.convert) {
              if (item.item.renderMath(math, document))
                return;
            }
          }
        } catch (e_4_1) {
          e_4 = { error: e_4_1 };
        } finally {
          try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
          } finally {
            if (e_4) throw e_4.error;
          }
        }
      };
      RenderList2.prototype.findID = function(id) {
        var e_5, _a;
        try {
          for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) {
            var item = _c.value;
            if (item.item.id === id) {
              return item.item;
            }
          }
        } catch (e_5_1) {
          e_5 = { error: e_5_1 };
        } finally {
          try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
          } finally {
            if (e_5) throw e_5.error;
          }
        }
        return null;
      };
      return RenderList2;
    })(PrioritizedList_js_1.PrioritizedList);
    exports.RenderList = RenderList;
    exports.resetOptions = {
      all: false,
      processed: false,
      inputJax: null,
      outputJax: null
    };
    exports.resetAllOptions = {
      all: true,
      processed: true,
      inputJax: [],
      outputJax: []
    };
    var DefaultInputJax = (function(_super) {
      __extends(DefaultInputJax2, _super);
      function DefaultInputJax2() {
        return _super !== null && _super.apply(this, arguments) || this;
      }
      DefaultInputJax2.prototype.compile = function(_math) {
        return null;
      };
      return DefaultInputJax2;
    })(InputJax_js_1.AbstractInputJax);
    var DefaultOutputJax = (function(_super) {
      __extends(DefaultOutputJax2, _super);
      function DefaultOutputJax2() {
        return _super !== null && _super.apply(this, arguments) || this;
      }
      DefaultOutputJax2.prototype.typeset = function(_math, _document) {
        if (_document === void 0) {
          _document = null;
        }
        return null;
      };
      DefaultOutputJax2.prototype.escaped = function(_math, _document) {
        return null;
      };
      return DefaultOutputJax2;
    })(OutputJax_js_1.AbstractOutputJax);
    var DefaultMathList = (function(_super) {
      __extends(DefaultMathList2, _super);
      function DefaultMathList2() {
        return _super !== null && _super.apply(this, arguments) || this;
      }
      return DefaultMathList2;
    })(MathList_js_1.AbstractMathList);
    var DefaultMathItem = (function(_super) {
      __extends(DefaultMathItem2, _super);
      function DefaultMathItem2() {
        return _super !== null && _super.apply(this, arguments) || this;
      }
      return DefaultMathItem2;
    })(MathItem_js_1.AbstractMathItem);
    var AbstractMathDocument = (function() {
      function AbstractMathDocument2(document, adaptor, options) {
        var _this = this;
        var CLASS = this.constructor;
        this.document = document;
        this.options = (0, Options_js_1.userOptions)((0, Options_js_1.defaultOptions)({}, CLASS.OPTIONS), options);
        this.math = new (this.options["MathList"] || DefaultMathList)();
        this.renderActions = RenderList.create(this.options["renderActions"]);
        this.processed = new AbstractMathDocument2.ProcessBits();
        this.outputJax = this.options["OutputJax"] || new DefaultOutputJax();
        var inputJax = this.options["InputJax"] || [new DefaultInputJax()];
        if (!Array.isArray(inputJax)) {
          inputJax = [inputJax];
        }
        this.inputJax = inputJax;
        this.adaptor = adaptor;
        this.outputJax.setAdaptor(adaptor);
        this.inputJax.map(function(jax) {
          return jax.setAdaptor(adaptor);
        });
        this.mmlFactory = this.options["MmlFactory"] || new MmlFactory_js_1.MmlFactory();
        this.inputJax.map(function(jax) {
          return jax.setMmlFactory(_this.mmlFactory);
        });
        this.outputJax.initialize();
        this.inputJax.map(function(jax) {
          return jax.initialize();
        });
      }
      Object.defineProperty(AbstractMathDocument2.prototype, "kind", {
        get: function() {
          return this.constructor.KIND;
        },
        enumerable: false,
        configurable: true
      });
      AbstractMathDocument2.prototype.addRenderAction = function(id) {
        var action = [];
        for (var _i = 1; _i < arguments.length; _i++) {
          action[_i - 1] = arguments[_i];
        }
        var _a = __read(RenderList.action(id, action), 2), fn = _a[0], p = _a[1];
        this.renderActions.add(fn, p);
      };
      AbstractMathDocument2.prototype.removeRenderAction = function(id) {
        var action = this.renderActions.findID(id);
        if (action) {
          this.renderActions.remove(action);
        }
      };
      AbstractMathDocument2.prototype.render = function() {
        this.renderActions.renderDoc(this);
        return this;
      };
      AbstractMathDocument2.prototype.rerender = function(start) {
        if (start === void 0) {
          start = MathItem_js_1.STATE.RERENDER;
        }
        this.state(start - 1);
        this.render();
        return this;
      };
      AbstractMathDocument2.prototype.convert = function(math, options) {
        if (options === void 0) {
          options = {};
        }
        var _a = (0, Options_js_1.userOptions)({
          format: this.inputJax[0].name,
          display: true,
          end: MathItem_js_1.STATE.LAST,
          em: 16,
          ex: 8,
          containerWidth: null,
          lineWidth: 1e6,
          scale: 1,
          family: ""
        }, options), format = _a.format, display = _a.display, end = _a.end, ex = _a.ex, em = _a.em, containerWidth = _a.containerWidth, lineWidth = _a.lineWidth, scale = _a.scale, family = _a.family;
        if (containerWidth === null) {
          containerWidth = 80 * ex;
        }
        var jax = this.inputJax.reduce(function(jax2, ijax) {
          return ijax.name === format ? ijax : jax2;
        }, null);
        var mitem = new this.options.MathItem(math, jax, display);
        mitem.start.node = this.adaptor.body(this.document);
        mitem.setMetrics(em, ex, containerWidth, lineWidth, scale);
        if (this.outputJax.options.mtextInheritFont) {
          mitem.outputData.mtextFamily = family;
        }
        if (this.outputJax.options.merrorInheritFont) {
          mitem.outputData.merrorFamily = family;
        }
        mitem.convert(this, end);
        return mitem.typesetRoot || mitem.root;
      };
      AbstractMathDocument2.prototype.findMath = function(_options) {
        if (_options === void 0) {
          _options = null;
        }
        this.processed.set("findMath");
        return this;
      };
      AbstractMathDocument2.prototype.compile = function() {
        var e_6, _a, e_7, _b;
        if (!this.processed.isSet("compile")) {
          var recompile = [];
          try {
            for (var _c = __values(this.math), _d = _c.next(); !_d.done; _d = _c.next()) {
              var math = _d.value;
              this.compileMath(math);
              if (math.inputData.recompile !== void 0) {
                recompile.push(math);
              }
            }
          } catch (e_6_1) {
            e_6 = { error: e_6_1 };
          } finally {
            try {
              if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
            } finally {
              if (e_6) throw e_6.error;
            }
          }
          try {
            for (var recompile_1 = __values(recompile), recompile_1_1 = recompile_1.next(); !recompile_1_1.done; recompile_1_1 = recompile_1.next()) {
              var math = recompile_1_1.value;
              var data = math.inputData.recompile;
              math.state(data.state);
              math.inputData.recompile = data;
              this.compileMath(math);
            }
          } catch (e_7_1) {
            e_7 = { error: e_7_1 };
          } finally {
            try {
              if (recompile_1_1 && !recompile_1_1.done && (_b = recompile_1.return)) _b.call(recompile_1);
            } finally {
              if (e_7) throw e_7.error;
            }
          }
          this.processed.set("compile");
        }
        return this;
      };
      AbstractMathDocument2.prototype.compileMath = function(math) {
        try {
          math.compile(this);
        } catch (err) {
          if (err.retry || err.restart) {
            throw err;
          }
          this.options["compileError"](this, math, err);
          math.inputData["error"] = err;
        }
      };
      AbstractMathDocument2.prototype.compileError = function(math, err) {
        math.root = this.mmlFactory.create("math", null, [
          this.mmlFactory.create("merror", { "data-mjx-error": err.message, title: err.message }, [
            this.mmlFactory.create("mtext", null, [
              this.mmlFactory.create("text").setText("Math input error")
            ])
          ])
        ]);
        if (math.display) {
          math.root.attributes.set("display", "block");
        }
        math.inputData.error = err.message;
      };
      AbstractMathDocument2.prototype.typeset = function() {
        var e_8, _a;
        if (!this.processed.isSet("typeset")) {
          try {
            for (var _b = __values(this.math), _c = _b.next(); !_c.done; _c = _b.next()) {
              var math = _c.value;
              try {
                math.typeset(this);
              } catch (err) {
                if (err.retry || err.restart) {
                  throw err;
                }
                this.options["typesetError"](this, math, err);
                math.outputData["error"] = err;
              }
            }
          } catch (e_8_1) {
            e_8 = { error: e_8_1 };
          } finally {
            try {
              if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
            } finally {
              if (e_8) throw e_8.error;
            }
          }
          this.processed.set("typeset");
        }
        return this;
      };
      AbstractMathDocument2.prototype.typesetError = function(math, err) {
        math.typesetRoot = this.adaptor.node("mjx-container", {
          class: "MathJax mjx-output-error",
          jax: this.outputJax.name
        }, [
          this.adaptor.node("span", {
            "data-mjx-error": err.message,
            title: err.message,
            style: {
              color: "red",
              "background-color": "yellow",
              "line-height": "normal"
            }
          }, [
            this.adaptor.text("Math output error")
          ])
        ]);
        if (math.display) {
          this.adaptor.setAttributes(math.typesetRoot, {
            style: {
              display: "block",
              margin: "1em 0",
              "text-align": "center"
            }
          });
        }
        math.outputData.error = err.message;
      };
      AbstractMathDocument2.prototype.getMetrics = function() {
        if (!this.processed.isSet("getMetrics")) {
          this.outputJax.getMetrics(this);
          this.processed.set("getMetrics");
        }
        return this;
      };
      AbstractMathDocument2.prototype.updateDocument = function() {
        var e_9, _a;
        if (!this.processed.isSet("updateDocument")) {
          try {
            for (var _b = __values(this.math.reversed()), _c = _b.next(); !_c.done; _c = _b.next()) {
              var math = _c.value;
              math.updateDocument(this);
            }
          } catch (e_9_1) {
            e_9 = { error: e_9_1 };
          } finally {
            try {
              if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
            } finally {
              if (e_9) throw e_9.error;
            }
          }
          this.processed.set("updateDocument");
        }
        return this;
      };
      AbstractMathDocument2.prototype.removeFromDocument = function(_restore) {
        if (_restore === void 0) {
          _restore = false;
        }
        return this;
      };
      AbstractMathDocument2.prototype.state = function(state, restore) {
        var e_10, _a;
        if (restore === void 0) {
          restore = false;
        }
        try {
          for (var _b = __values(this.math), _c = _b.next(); !_c.done; _c = _b.next()) {
            var math = _c.value;
            math.state(state, restore);
          }
        } catch (e_10_1) {
          e_10 = { error: e_10_1 };
        } finally {
          try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
          } finally {
            if (e_10) throw e_10.error;
          }
        }
        if (state < MathItem_js_1.STATE.INSERTED) {
          this.processed.clear("updateDocument");
        }
        if (state < MathItem_js_1.STATE.TYPESET) {
          this.processed.clear("typeset");
          this.processed.clear("getMetrics");
        }
        if (state < MathItem_js_1.STATE.COMPILED) {
          this.processed.clear("compile");
        }
        return this;
      };
      AbstractMathDocument2.prototype.reset = function(options) {
        var _a;
        if (options === void 0) {
          options = { processed: true };
        }
        options = (0, Options_js_1.userOptions)(Object.assign({}, exports.resetOptions), options);
        options.all && Object.assign(options, exports.resetAllOptions);
        options.processed && this.processed.reset();
        options.inputJax && this.inputJax.forEach(function(jax) {
          return jax.reset.apply(jax, __spreadArray([], __read(options.inputJax), false));
        });
        options.outputJax && (_a = this.outputJax).reset.apply(_a, __spreadArray([], __read(options.outputJax), false));
        return this;
      };
      AbstractMathDocument2.prototype.clear = function() {
        this.reset();
        this.math.clear();
        return this;
      };
      AbstractMathDocument2.prototype.concat = function(list) {
        this.math.merge(list);
        return this;
      };
      AbstractMathDocument2.prototype.clearMathItemsWithin = function(containers) {
        var _a;
        var items = this.getMathItemsWithin(containers);
        (_a = this.math).remove.apply(_a, __spreadArray([], __read(items), false));
        return items;
      };
      AbstractMathDocument2.prototype.getMathItemsWithin = function(elements) {
        var e_11, _a, e_12, _b;
        if (!Array.isArray(elements)) {
          elements = [elements];
        }
        var adaptor = this.adaptor;
        var items = [];
        var containers = adaptor.getElements(elements, this.document);
        try {
          ITEMS: for (var _c = __values(this.math), _d = _c.next(); !_d.done; _d = _c.next()) {
            var item = _d.value;
            try {
              for (var containers_1 = (e_12 = void 0, __values(containers)), containers_1_1 = containers_1.next(); !containers_1_1.done; containers_1_1 = containers_1.next()) {
                var container = containers_1_1.value;
                if (item.start.node && adaptor.contains(container, item.start.node)) {
                  items.push(item);
                  continue ITEMS;
                }
              }
            } catch (e_12_1) {
              e_12 = { error: e_12_1 };
            } finally {
              try {
                if (containers_1_1 && !containers_1_1.done && (_b = containers_1.return)) _b.call(containers_1);
              } finally {
                if (e_12) throw e_12.error;
              }
            }
          }
        } catch (e_11_1) {
          e_11 = { error: e_11_1 };
        } finally {
          try {
            if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
          } finally {
            if (e_11) throw e_11.error;
          }
        }
        return items;
      };
      AbstractMathDocument2.KIND = "MathDocument";
      AbstractMathDocument2.OPTIONS = {
        OutputJax: null,
        InputJax: null,
        MmlFactory: null,
        MathList: DefaultMathList,
        MathItem: DefaultMathItem,
        compileError: function(doc, math, err) {
          doc.compileError(math, err);
        },
        typesetError: function(doc, math, err) {
          doc.typesetError(math, err);
        },
        renderActions: (0, Options_js_1.expandable)({
          find: [MathItem_js_1.STATE.FINDMATH, "findMath", "", false],
          compile: [MathItem_js_1.STATE.COMPILED],
          metrics: [MathItem_js_1.STATE.METRICS, "getMetrics", "", false],
          typeset: [MathItem_js_1.STATE.TYPESET],
          update: [MathItem_js_1.STATE.INSERTED, "updateDocument", false]
        })
      };
      AbstractMathDocument2.ProcessBits = (0, BitField_js_1.BitFieldClass)("findMath", "compile", "getMetrics", "typeset", "updateDocument");
      return AbstractMathDocument2;
    })();
    exports.AbstractMathDocument = AbstractMathDocument;
  }
});

// ../../node_modules/mathjax-full/js/core/Handler.js
var require_Handler = __commonJS({
  "../../node_modules/mathjax-full/js/core/Handler.js"(exports) {
    "use strict";
    var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        if (typeof b !== "function" && b !== null)
          throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    })();
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.AbstractHandler = void 0;
    var MathDocument_js_1 = require_MathDocument();
    var DefaultMathDocument = (function(_super) {
      __extends(DefaultMathDocument2, _super);
      function DefaultMathDocument2() {
        return _super !== null && _super.apply(this, arguments) || this;
      }
      return DefaultMathDocument2;
    })(MathDocument_js_1.AbstractMathDocument);
    var AbstractHandler = (function() {
      function AbstractHandler2(adaptor, priority) {
        if (priority === void 0) {
          priority = 5;
        }
        this.documentClass = DefaultMathDocument;
        this.adaptor = adaptor;
        this.priority = priority;
      }
      Object.defineProperty(AbstractHandler2.prototype, "name", {
        get: function() {
          return this.constructor.NAME;
        },
        enumerable: false,
        configurable: true
      });
      AbstractHandler2.prototype.handlesDocument = function(_document) {
        return false;
      };
      AbstractHandler2.prototype.create = function(document, options) {
        return new this.documentClass(document, this.adaptor, options);
      };
      AbstractHandler2.NAME = "generic";
      return AbstractHandler2;
    })();
    exports.AbstractHandler = AbstractHandler;
  }
});

// ../../node_modules/mathjax-full/js/handlers/html/HTMLMathItem.js
var require_HTMLMathItem = __commonJS({
  "../../node_modules/mathjax-full/js/handlers/html/HTMLMathItem.js"(exports) {
    "use strict";
    var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        if (typeof b !== "function" && b !== null)
          throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    })();
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.HTMLMathItem = void 0;
    var MathItem_js_1 = require_MathItem();
    var HTMLMathItem = (function(_super) {
      __extends(HTMLMathItem2, _super);
      function HTMLMathItem2(math, jax, display, start, end) {
        if (display === void 0) {
          display = true;
        }
        if (start === void 0) {
          start = { node: null, n: 0, delim: "" };
        }
        if (end === void 0) {
          end = { node: null, n: 0, delim: "" };
        }
        return _super.call(this, math, jax, display, start, end) || this;
      }
      Object.defineProperty(HTMLMathItem2.prototype, "adaptor", {
        get: function() {
          return this.inputJax.adaptor;
        },
        enumerable: false,
        configurable: true
      });
      HTMLMathItem2.prototype.updateDocument = function(_html) {
        if (this.state() < MathItem_js_1.STATE.INSERTED) {
          if (this.inputJax.processStrings) {
            var node = this.start.node;
            if (node === this.end.node) {
              if (this.end.n && this.end.n < this.adaptor.value(this.end.node).length) {
                this.adaptor.split(this.end.node, this.end.n);
              }
              if (this.start.n) {
                node = this.adaptor.split(this.start.node, this.start.n);
              }
              this.adaptor.replace(this.typesetRoot, node);
            } else {
              if (this.start.n) {
                node = this.adaptor.split(node, this.start.n);
              }
              while (node !== this.end.node) {
                var next = this.adaptor.next(node);
                this.adaptor.remove(node);
                node = next;
              }
              this.adaptor.insert(this.typesetRoot, node);
              if (this.end.n < this.adaptor.value(node).length) {
                this.adaptor.split(node, this.end.n);
              }
              this.adaptor.remove(node);
            }
          } else {
            this.adaptor.replace(this.typesetRoot, this.start.node);
          }
          this.start.node = this.end.node = this.typesetRoot;
          this.start.n = this.end.n = 0;
          this.state(MathItem_js_1.STATE.INSERTED);
        }
      };
      HTMLMathItem2.prototype.updateStyleSheet = function(document) {
        document.addStyleSheet();
      };
      HTMLMathItem2.prototype.removeFromDocument = function(restore) {
        if (restore === void 0) {
          restore = false;
        }
        if (this.state() >= MathItem_js_1.STATE.TYPESET) {
          var adaptor = this.adaptor;
          var node = this.start.node;
          var math = adaptor.text("");
          if (restore) {
            var text = this.start.delim + this.math + this.end.delim;
            if (this.inputJax.processStrings) {
              math = adaptor.text(text);
            } else {
              var doc = adaptor.parse(text, "text/html");
              math = adaptor.firstChild(adaptor.body(doc));
            }
          }
          if (adaptor.parent(node)) {
            adaptor.replace(math, node);
          }
          this.start.node = this.end.node = math;
          this.start.n = this.end.n = 0;
        }
      };
      return HTMLMathItem2;
    })(MathItem_js_1.AbstractMathItem);
    exports.HTMLMathItem = HTMLMathItem;
  }
});

// ../../node_modules/mathjax-full/js/handlers/html/HTMLMathList.js
var require_HTMLMathList = __commonJS({
  "../../node_modules/mathjax-full/js/handlers/html/HTMLMathList.js"(exports) {
    "use strict";
    var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        if (typeof b !== "function" && b !== null)
          throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    })();
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.HTMLMathList = void 0;
    var MathList_js_1 = require_MathList();
    var HTMLMathList = (function(_super) {
      __extends(HTMLMathList2, _super);
      function HTMLMathList2() {
        return _super !== null && _super.apply(this, arguments) || this;
      }
      return HTMLMathList2;
    })(MathList_js_1.AbstractMathList);
    exports.HTMLMathList = HTMLMathList;
  }
});

// ../../node_modules/mathjax-full/js/handlers/html/HTMLDomStrings.js
var require_HTMLDomStrings = __commonJS({
  "../../node_modules/mathjax-full/js/handlers/html/HTMLDomStrings.js"(exports) {
    "use strict";
    var __read = exports && exports.__read || function(o, n) {
      var m = typeof Symbol === "function" && o[Symbol.iterator];
      if (!m) return o;
      var i = m.call(o), r, ar = [], e;
      try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
      } catch (error) {
        e = { error };
      } finally {
        try {
          if (r && !r.done && (m = i["return"])) m.call(i);
        } finally {
          if (e) throw e.error;
        }
      }
      return ar;
    };
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.HTMLDomStrings = void 0;
    var Options_js_1 = require_Options();
    var HTMLDomStrings = (function() {
      function HTMLDomStrings2(options) {
        if (options === void 0) {
          options = null;
        }
        var CLASS = this.constructor;
        this.options = (0, Options_js_1.userOptions)((0, Options_js_1.defaultOptions)({}, CLASS.OPTIONS), options);
        this.init();
        this.getPatterns();
      }
      HTMLDomStrings2.prototype.init = function() {
        this.strings = [];
        this.string = "";
        this.snodes = [];
        this.nodes = [];
        this.stack = [];
      };
      HTMLDomStrings2.prototype.getPatterns = function() {
        var skip = (0, Options_js_1.makeArray)(this.options["skipHtmlTags"]);
        var ignore = (0, Options_js_1.makeArray)(this.options["ignoreHtmlClass"]);
        var process = (0, Options_js_1.makeArray)(this.options["processHtmlClass"]);
        this.skipHtmlTags = new RegExp("^(?:" + skip.join("|") + ")$", "i");
        this.ignoreHtmlClass = new RegExp("(?:^| )(?:" + ignore.join("|") + ")(?: |$)");
        this.processHtmlClass = new RegExp("(?:^| )(?:" + process + ")(?: |$)");
      };
      HTMLDomStrings2.prototype.pushString = function() {
        if (this.string.match(/\S/)) {
          this.strings.push(this.string);
          this.nodes.push(this.snodes);
        }
        this.string = "";
        this.snodes = [];
      };
      HTMLDomStrings2.prototype.extendString = function(node, text) {
        this.snodes.push([node, text.length]);
        this.string += text;
      };
      HTMLDomStrings2.prototype.handleText = function(node, ignore) {
        if (!ignore) {
          this.extendString(node, this.adaptor.value(node));
        }
        return this.adaptor.next(node);
      };
      HTMLDomStrings2.prototype.handleTag = function(node, ignore) {
        if (!ignore) {
          var text = this.options["includeHtmlTags"][this.adaptor.kind(node)];
          this.extendString(node, text);
        }
        return this.adaptor.next(node);
      };
      HTMLDomStrings2.prototype.handleContainer = function(node, ignore) {
        this.pushString();
        var cname = this.adaptor.getAttribute(node, "class") || "";
        var tname = this.adaptor.kind(node) || "";
        var process = this.processHtmlClass.exec(cname);
        var next = node;
        if (this.adaptor.firstChild(node) && !this.adaptor.getAttribute(node, "data-MJX") && (process || !this.skipHtmlTags.exec(tname))) {
          if (this.adaptor.next(node)) {
            this.stack.push([this.adaptor.next(node), ignore]);
          }
          next = this.adaptor.firstChild(node);
          ignore = (ignore || this.ignoreHtmlClass.exec(cname)) && !process;
        } else {
          next = this.adaptor.next(node);
        }
        return [next, ignore];
      };
      HTMLDomStrings2.prototype.handleOther = function(node, _ignore) {
        this.pushString();
        return this.adaptor.next(node);
      };
      HTMLDomStrings2.prototype.find = function(node) {
        var _a, _b;
        this.init();
        var stop = this.adaptor.next(node);
        var ignore = false;
        var include = this.options["includeHtmlTags"];
        while (node && node !== stop) {
          var kind = this.adaptor.kind(node);
          if (kind === "#text") {
            node = this.handleText(node, ignore);
          } else if (include.hasOwnProperty(kind)) {
            node = this.handleTag(node, ignore);
          } else if (kind) {
            _a = __read(this.handleContainer(node, ignore), 2), node = _a[0], ignore = _a[1];
          } else {
            node = this.handleOther(node, ignore);
          }
          if (!node && this.stack.length) {
            this.pushString();
            _b = __read(this.stack.pop(), 2), node = _b[0], ignore = _b[1];
          }
        }
        this.pushString();
        var result = [this.strings, this.nodes];
        this.init();
        return result;
      };
      HTMLDomStrings2.OPTIONS = {
        skipHtmlTags: ["script", "noscript", "style", "textarea", "pre", "code", "annotation", "annotation-xml"],
        includeHtmlTags: { br: "\n", wbr: "", "#comment": "" },
        ignoreHtmlClass: "mathjax_ignore",
        processHtmlClass: "mathjax_process"
      };
      return HTMLDomStrings2;
    })();
    exports.HTMLDomStrings = HTMLDomStrings;
  }
});

// ../../node_modules/mathjax-full/js/handlers/html/HTMLDocument.js
var require_HTMLDocument = __commonJS({
  "../../node_modules/mathjax-full/js/handlers/html/HTMLDocument.js"(exports) {
    "use strict";
    var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        if (typeof b !== "function" && b !== null)
          throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    })();
    var __assign = exports && exports.__assign || function() {
      __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
          s = arguments[i];
          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
        }
        return t;
      };
      return __assign.apply(this, arguments);
    };
    var __read = exports && exports.__read || function(o, n) {
      var m = typeof Symbol === "function" && o[Symbol.iterator];
      if (!m) return o;
      var i = m.call(o), r, ar = [], e;
      try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
      } catch (error) {
        e = { error };
      } finally {
        try {
          if (r && !r.done && (m = i["return"])) m.call(i);
        } finally {
          if (e) throw e.error;
        }
      }
      return ar;
    };
    var __values = exports && exports.__values || function(o) {
      var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
      if (m) return m.call(o);
      if (o && typeof o.length === "number") return {
        next: function() {
          if (o && i >= o.length) o = void 0;
          return { value: o && o[i++], done: !o };
        }
      };
      throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
    };
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.HTMLDocument = void 0;
    var MathDocument_js_1 = require_MathDocument();
    var Options_js_1 = require_Options();
    var HTMLMathItem_js_1 = require_HTMLMathItem();
    var HTMLMathList_js_1 = require_HTMLMathList();
    var HTMLDomStrings_js_1 = require_HTMLDomStrings();
    var MathItem_js_1 = require_MathItem();
    var HTMLDocument = (function(_super) {
      __extends(HTMLDocument2, _super);
      function HTMLDocument2(document, adaptor, options) {
        var _this = this;
        var _a = __read((0, Options_js_1.separateOptions)(options, HTMLDomStrings_js_1.HTMLDomStrings.OPTIONS), 2), html = _a[0], dom = _a[1];
        _this = _super.call(this, document, adaptor, html) || this;
        _this.domStrings = _this.options["DomStrings"] || new HTMLDomStrings_js_1.HTMLDomStrings(dom);
        _this.domStrings.adaptor = adaptor;
        _this.styles = [];
        return _this;
      }
      HTMLDocument2.prototype.findPosition = function(N, index, delim, nodes) {
        var e_1, _a;
        var adaptor = this.adaptor;
        try {
          for (var _b = __values(nodes[N]), _c = _b.next(); !_c.done; _c = _b.next()) {
            var list = _c.value;
            var _d = __read(list, 2), node = _d[0], n = _d[1];
            if (index <= n && adaptor.kind(node) === "#text") {
              return { node, n: Math.max(index, 0), delim };
            }
            index -= n;
          }
        } catch (e_1_1) {
          e_1 = { error: e_1_1 };
        } finally {
          try {
            if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
          } finally {
            if (e_1) throw e_1.error;
          }
        }
        return { node: null, n: 0, delim };
      };
      HTMLDocument2.prototype.mathItem = function(item, jax, nodes) {
        var math = item.math;
        var start = this.findPosition(item.n, item.start.n, item.open, nodes);
        var end = this.findPosition(item.n, item.end.n, item.close, nodes);
        return new this.options.MathItem(math, jax, item.display, start, end);
      };
      HTMLDocument2.prototype.findMath = function(options) {
        var e_2, _a, e_3, _b, _c, e_4, _d, e_5, _e;
        if (!this.processed.isSet("findMath")) {
          this.adaptor.document = this.document;
          options = (0, Options_js_1.userOptions)({ elements: this.options.elements || [this.adaptor.body(this.document)] }, options);
          try {
            for (var _f = __values(this.adaptor.getElements(options["elements"], this.document)), _g = _f.next(); !_g.done; _g = _f.next()) {
              var container = _g.value;
              var _h = __read([null, null], 2), strings = _h[0], nodes = _h[1];
              try {
                for (var _j = (e_3 = void 0, __values(this.inputJax)), _k = _j.next(); !_k.done; _k = _j.next()) {
                  var jax = _k.value;
                  var list = new this.options["MathList"]();
                  if (jax.processStrings) {
                    if (strings === null) {
                      _c = __read(this.domStrings.find(container), 2), strings = _c[0], nodes = _c[1];
                    }
                    try {
                      for (var _l = (e_4 = void 0, __values(jax.findMath(strings))), _m = _l.next(); !_m.done; _m = _l.next()) {
                        var math = _m.value;
                        list.push(this.mathItem(math, jax, nodes));
                      }
                    } catch (e_4_1) {
                      e_4 = { error: e_4_1 };
                    } finally {
                      try {
                        if (_m && !_m.done && (_d = _l.return)) _d.call(_l);
                      } finally {
                        if (e_4) throw e_4.error;
                      }
                    }
                  } else {
                    try {
                      for (var _o = (e_5 = void 0, __values(jax.findMath(container))), _p = _o.next(); !_p.done; _p = _o.next()) {
                        var math = _p.value;
                        var item = new this.options.MathItem(math.math, jax, math.display, math.start, math.end);
                        list.push(item);
                      }
                    } catch (e_5_1) {
                      e_5 = { error: e_5_1 };
                    } finally {
                      try {
                        if (_p && !_p.done && (_e = _o.return)) _e.call(_o);
                      } finally {
                        if (e_5) throw e_5.error;
                      }
                    }
                  }
                  this.math.merge(list);
                }
              } catch (e_3_1) {
                e_3 = { error: e_3_1 };
              } finally {
                try {
                  if (_k && !_k.done && (_b = _j.return)) _b.call(_j);
                } finally {
                  if (e_3) throw e_3.error;
                }
              }
            }
          } catch (e_2_1) {
            e_2 = { error: e_2_1 };
          } finally {
            try {
              if (_g && !_g.done && (_a = _f.return)) _a.call(_f);
            } finally {
              if (e_2) throw e_2.error;
            }
          }
          this.processed.set("findMath");
        }
        return this;
      };
      HTMLDocument2.prototype.updateDocument = function() {
        if (!this.processed.isSet("updateDocument")) {
          this.addPageElements();
          this.addStyleSheet();
          _super.prototype.updateDocument.call(this);
          this.processed.set("updateDocument");
        }
        return this;
      };
      HTMLDocument2.prototype.addPageElements = function() {
        var body = this.adaptor.body(this.document);
        var node = this.documentPageElements();
        if (node) {
          this.adaptor.append(body, node);
        }
      };
      HTMLDocument2.prototype.addStyleSheet = function() {
        var sheet = this.documentStyleSheet();
        var adaptor = this.adaptor;
        if (sheet && !adaptor.parent(sheet)) {
          var head = adaptor.head(this.document);
          var styles = this.findSheet(head, adaptor.getAttribute(sheet, "id"));
          if (styles) {
            adaptor.replace(sheet, styles);
          } else {
            adaptor.append(head, sheet);
          }
        }
      };
      HTMLDocument2.prototype.findSheet = function(head, id) {
        var e_6, _a;
        if (id) {
          try {
            for (var _b = __values(this.adaptor.tags(head, "style")), _c = _b.next(); !_c.done; _c = _b.next()) {
              var sheet = _c.value;
              if (this.adaptor.getAttribute(sheet, "id") === id) {
                return sheet;
              }
            }
          } catch (e_6_1) {
            e_6 = { error: e_6_1 };
          } finally {
            try {
              if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
            } finally {
              if (e_6) throw e_6.error;
            }
          }
        }
        return null;
      };
      HTMLDocument2.prototype.removeFromDocument = function(restore) {
        var e_7, _a;
        if (restore === void 0) {
          restore = false;
        }
        if (this.processed.isSet("updateDocument")) {
          try {
            for (var _b = __values(this.math), _c = _b.next(); !_c.done; _c = _b.next()) {
              var math = _c.value;
              if (math.state() >= MathItem_js_1.STATE.INSERTED) {
                math.state(MathItem_js_1.STATE.TYPESET, restore);
              }
            }
          } catch (e_7_1) {
            e_7 = { error: e_7_1 };
          } finally {
            try {
              if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
            } finally {
              if (e_7) throw e_7.error;
            }
          }
        }
        this.processed.clear("updateDocument");
        return this;
      };
      HTMLDocument2.prototype.documentStyleSheet = function() {
        return this.outputJax.styleSheet(this);
      };
      HTMLDocument2.prototype.documentPageElements = function() {
        return this.outputJax.pageElements(this);
      };
      HTMLDocument2.prototype.addStyles = function(styles) {
        this.styles.push(styles);
      };
      HTMLDocument2.prototype.getStyles = function() {
        return this.styles;
      };
      HTMLDocument2.KIND = "HTML";
      HTMLDocument2.OPTIONS = __assign(__assign({}, MathDocument_js_1.AbstractMathDocument.OPTIONS), { renderActions: (0, Options_js_1.expandable)(__assign(__assign({}, MathDocument_js_1.AbstractMathDocument.OPTIONS.renderActions), { styles: [MathItem_js_1.STATE.INSERTED + 1, "", "updateStyleSheet", false] })), MathList: HTMLMathList_js_1.HTMLMathList, MathItem: HTMLMathItem_js_1.HTMLMathItem, DomStrings: null });
      return HTMLDocument2;
    })(MathDocument_js_1.AbstractMathDocument);
    exports.HTMLDocument = HTMLDocument;
  }
});

// ../../node_modules/mathjax-full/js/handlers/html/HTMLHandler.js
var require_HTMLHandler = __commonJS({
  "../../node_modules/mathjax-full/js/handlers/html/HTMLHandler.js"(exports) {
    "use strict";
    var __extends = exports && exports.__extends || /* @__PURE__ */ (function() {
      var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
          d2.__proto__ = b2;
        } || function(d2, b2) {
          for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
        };
        return extendStatics(d, b);
      };
      return function(d, b) {
        if (typeof b !== "function" && b !== null)
          throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() {
          this.constructor = d;
        }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
    })();
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.HTMLHandler = void 0;
    var Handler_js_1 = require_Handler();
    var HTMLDocument_js_1 = require_HTMLDocument();
    var HTMLHandler = (function(_super) {
      __extends(HTMLHandler2, _super);
      function HTMLHandler2() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.documentClass = HTMLDocument_js_1.HTMLDocument;
        return _this;
      }
      HTMLHandler2.prototype.handlesDocument = function(document) {
        var adaptor = this.adaptor;
        if (typeof document === "string") {
          try {
            document = adaptor.parse(document, "text/html");
          } catch (err) {
          }
        }
        if (document instanceof adaptor.window.Document || document instanceof adaptor.window.HTMLElement || document instanceof adaptor.window.DocumentFragment) {
          return true;
        }
        return false;
      };
      HTMLHandler2.prototype.create = function(document, options) {
        var adaptor = this.adaptor;
        if (typeof document === "string") {
          document = adaptor.parse(document, "text/html");
        } else if (document instanceof adaptor.window.HTMLElement || document instanceof adaptor.window.DocumentFragment) {
          var child = document;
          document = adaptor.parse("", "text/html");
          adaptor.append(adaptor.body(document), child);
        }
        return _super.prototype.create.call(this, document, options);
      };
      return HTMLHandler2;
    })(Handler_js_1.AbstractHandler);
    exports.HTMLHandler = HTMLHandler;
  }
});

// ../../node_modules/mathjax-full/js/handlers/html.js
var require_html = __commonJS({
  "../../node_modules/mathjax-full/js/handlers/html.js"(exports) {
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.RegisterHTMLHandler = void 0;
    var mathjax_js_1 = require_mathjax();
    var HTMLHandler_js_1 = require_HTMLHandler();
    function RegisterHTMLHandler(adaptor) {
      var handler = new HTMLHandler_js_1.HTMLHandler(adaptor);
      mathjax_js_1.mathjax.handlers.register(handler);
      return handler;
    }
    exports.RegisterHTMLHandler = RegisterHTMLHandler;
  }
});
export default require_html();
