manim-web 0.3.18 → 0.3.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/README.md +26 -40
  2. package/dist/AllPackages-B0GtkYjD.js +7912 -0
  3. package/dist/AllPackages-BIAELuhU.js +7912 -0
  4. package/dist/BaseConfiguration-CDf44lxS.js +4402 -0
  5. package/dist/BaseConfiguration-Chcqjv9L.js +4402 -0
  6. package/dist/Entities-B_gwJfrn.js +458 -0
  7. package/dist/Entities-CmJkmuw_.js +458 -0
  8. package/dist/GifExporter-C9lP34Iu.js +338 -0
  9. package/dist/GifExporter-DBak5Vk7.js +338 -0
  10. package/dist/InputJax-C5sGfjJ8.js +43 -0
  11. package/dist/InputJax-Jb4hSThK.js +43 -0
  12. package/dist/MathItem-BmK41eqe.js +77 -0
  13. package/dist/MathItem-C_mZyaeT.js +77 -0
  14. package/dist/Options-Ch1vGsgd.js +188 -0
  15. package/dist/Options-V6ag48Dv.js +188 -0
  16. package/dist/PrioritizedList-DkoCmqPk.js +36 -0
  17. package/dist/PrioritizedList-eKTii0tW.js +36 -0
  18. package/dist/Styles-De4BjKiV.js +411 -0
  19. package/dist/Styles-DgoiBrzf.js +411 -0
  20. package/dist/TeXAtom-DT2wCvcU.js +2025 -0
  21. package/dist/TeXAtom-JogI0lus.js +2025 -0
  22. package/dist/VideoExporter-Bdtz_pWv.js +102 -0
  23. package/dist/VideoExporter-Vjfsnv1h.js +102 -0
  24. package/dist/animation/creation/Create.d.ts +1 -1
  25. package/dist/animation/movement/Rotate.d.ts +2 -0
  26. package/dist/animation/movement/Rotate.d.ts.map +1 -1
  27. package/dist/animation/movement/Scale.d.ts +2 -0
  28. package/dist/animation/movement/Scale.d.ts.map +1 -1
  29. package/dist/animation/transform/ApplyTransforms.d.ts +1 -2
  30. package/dist/animation/transform/ApplyTransforms.d.ts.map +1 -1
  31. package/dist/animation/transform/MovementTransforms.d.ts +8 -0
  32. package/dist/animation/transform/MovementTransforms.d.ts.map +1 -1
  33. package/dist/animation/transform/Transform.d.ts +3 -0
  34. package/dist/animation/transform/Transform.d.ts.map +1 -1
  35. package/dist/animation/utility/index.d.ts +2 -0
  36. package/dist/animation/utility/index.d.ts.map +1 -1
  37. package/dist/chunk-3e0lkp8x.js +23 -0
  38. package/dist/constants/fontRender.d.ts +19 -0
  39. package/dist/constants/fontRender.d.ts.map +1 -0
  40. package/dist/constants/index.d.ts.map +1 -1
  41. package/dist/core/Camera.d.ts +19 -6
  42. package/dist/core/Camera.d.ts.map +1 -1
  43. package/dist/core/CameraFrame.d.ts +0 -2
  44. package/dist/core/CameraFrame.d.ts.map +1 -1
  45. package/dist/core/Group.d.ts +2 -2
  46. package/dist/core/Group.d.ts.map +1 -1
  47. package/dist/core/Mobject.d.ts +26 -6
  48. package/dist/core/Mobject.d.ts.map +1 -1
  49. package/dist/core/MobjectState.d.ts +23 -2
  50. package/dist/core/MobjectState.d.ts.map +1 -1
  51. package/dist/core/MobjectTraversal.d.ts +25 -0
  52. package/dist/core/MobjectTraversal.d.ts.map +1 -0
  53. package/dist/core/Scene.d.ts +7 -1
  54. package/dist/core/Scene.d.ts.map +1 -1
  55. package/dist/core/ThreeDScene.d.ts +19 -0
  56. package/dist/core/ThreeDScene.d.ts.map +1 -1
  57. package/dist/core/VGroup.d.ts +1 -1
  58. package/dist/core/VGroup.d.ts.map +1 -1
  59. package/dist/core/VMobject.d.ts +20 -1
  60. package/dist/core/VMobject.d.ts.map +1 -1
  61. package/dist/core/VMobjectGeometry.d.ts +2 -1
  62. package/dist/core/VMobjectGeometry.d.ts.map +1 -1
  63. package/dist/html-53__O8r2.js +1587 -0
  64. package/dist/html-DfHFh5II.js +1587 -0
  65. package/dist/index.d.ts +1 -1
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +4 -579
  68. package/dist/integrations/react.js +144 -735
  69. package/dist/integrations/vue.js +109 -735
  70. package/dist/interaction/Draggable.d.ts.map +1 -1
  71. package/dist/interaction/OrbitControls.d.ts +2 -0
  72. package/dist/interaction/OrbitControls.d.ts.map +1 -1
  73. package/dist/lengths-3epoqRj7.js +65 -0
  74. package/dist/lengths-B-bX9Tfk.js +65 -0
  75. package/dist/liteAdaptor-BxFvlO-q.js +828 -0
  76. package/dist/liteAdaptor-CsOIKw2g.js +828 -0
  77. package/dist/manim-web.browser.js +72994 -83815
  78. package/dist/mathjax-Bkrmftxh.js +102 -0
  79. package/dist/mathjax-DBrTNl9C.js +102 -0
  80. package/dist/mo-AzagC5AD.js +3271 -0
  81. package/dist/mo-I_6dyJsk.js +3271 -0
  82. package/dist/mobjects/geometry/AngleShapes.d.ts +16 -0
  83. package/dist/mobjects/geometry/AngleShapes.d.ts.map +1 -1
  84. package/dist/mobjects/geometry/DashedLine.d.ts +2 -2
  85. package/dist/mobjects/geometry/DashedLine.d.ts.map +1 -1
  86. package/dist/mobjects/graphing/Axes.d.ts +2 -2
  87. package/dist/mobjects/graphing/Axes.d.ts.map +1 -1
  88. package/dist/mobjects/graphing/ComplexPlane.d.ts +4 -1
  89. package/dist/mobjects/graphing/ComplexPlane.d.ts.map +1 -1
  90. package/dist/mobjects/matrix/Matrix.d.ts +2 -2
  91. package/dist/mobjects/matrix/Matrix.d.ts.map +1 -1
  92. package/dist/mobjects/point/PGroup.d.ts +1 -1
  93. package/dist/mobjects/point/PGroup.d.ts.map +1 -1
  94. package/dist/mobjects/point/PMobject.d.ts +1 -1
  95. package/dist/mobjects/point/PMobject.d.ts.map +1 -1
  96. package/dist/mobjects/svg/Brace.d.ts +3 -3
  97. package/dist/mobjects/svg/Brace.d.ts.map +1 -1
  98. package/dist/mobjects/table/Table.d.ts +4 -4
  99. package/dist/mobjects/table/Table.d.ts.map +1 -1
  100. package/dist/mobjects/text/MathJaxRenderer.d.ts +4 -2
  101. package/dist/mobjects/text/MathJaxRenderer.d.ts.map +1 -1
  102. package/dist/mobjects/text/MathTex.d.ts +68 -202
  103. package/dist/mobjects/text/MathTex.d.ts.map +1 -1
  104. package/dist/mobjects/text/MathTexImage.d.ts +258 -0
  105. package/dist/mobjects/text/MathTexImage.d.ts.map +1 -0
  106. package/dist/mobjects/text/MathTexParts.d.ts +10 -10
  107. package/dist/mobjects/text/MathTexParts.d.ts.map +1 -1
  108. package/dist/mobjects/text/Tex.d.ts +2 -7
  109. package/dist/mobjects/text/Tex.d.ts.map +1 -1
  110. package/dist/mobjects/text/Text.d.ts +2 -2
  111. package/dist/mobjects/text/Text.d.ts.map +1 -1
  112. package/dist/mobjects/text/Variable.d.ts +5 -5
  113. package/dist/mobjects/text/Variable.d.ts.map +1 -1
  114. package/dist/mobjects/text/index.d.ts +2 -2
  115. package/dist/mobjects/text/index.d.ts.map +1 -1
  116. package/dist/mobjects/text/katexStyles.d.ts.map +1 -1
  117. package/dist/mobjects/text/svgPathParser.d.ts.map +1 -1
  118. package/dist/mobjects/three-d/ThreeDAxes.d.ts +113 -9
  119. package/dist/mobjects/three-d/ThreeDAxes.d.ts.map +1 -1
  120. package/dist/player/Player.d.ts +8 -2
  121. package/dist/player/Player.d.ts.map +1 -1
  122. package/dist/player/PlayerController.d.ts +2 -0
  123. package/dist/player/PlayerController.d.ts.map +1 -1
  124. package/dist/player/PlayerUI.d.ts +5 -0
  125. package/dist/player/PlayerUI.d.ts.map +1 -1
  126. package/dist/src-Db7QTr4S.js +60248 -0
  127. package/dist/svg-CoGQ_sAt.js +23880 -0
  128. package/dist/svg-DiIG93Lr.js +23880 -0
  129. package/dist/tex-ChPKMfdv.js +401 -0
  130. package/dist/tex-hYZcjadW.js +401 -0
  131. package/dist/utils/math.d.ts +45 -0
  132. package/dist/utils/math.d.ts.map +1 -1
  133. package/package.json +6 -4
  134. package/dist/featureFlags-H97tY2Rw.js +0 -59814
  135. package/dist/mobjects/text/MathTexSVG.d.ts +0 -102
  136. package/dist/mobjects/text/MathTexSVG.d.ts.map +0 -1
@@ -0,0 +1,1587 @@
1
+ import { t as e } from "./chunk-3e0lkp8x.js";
2
+ import { t } from "./Options-Ch1vGsgd.js";
3
+ import { t as n } from "./mathjax-Bkrmftxh.js";
4
+ import { t as r } from "./PrioritizedList-eKTii0tW.js";
5
+ import { a as i, i as a, o, t as s } from "./mo-I_6dyJsk.js";
6
+ import { t as c } from "./InputJax-C5sGfjJ8.js";
7
+ import { C as l, E as u, S as d, T as f, _ as p, a as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, l as S, m as C, n as w, o as T, p as E, r as D, s as O, t as ee, u as te, v as ne, w as re, x as ie, y as ae } from "./TeXAtom-DT2wCvcU.js";
8
+ import { t as k } from "./MathItem-BmK41eqe.js";
9
+ //#region node_modules/mathjax-full/js/util/LinkedList.js
10
+ var A = /* @__PURE__ */ e(((e) => {
11
+ var t = e && e.__generator || function(e, t) {
12
+ var n = {
13
+ label: 0,
14
+ sent: function() {
15
+ if (a[0] & 1) throw a[1];
16
+ return a[1];
17
+ },
18
+ trys: [],
19
+ ops: []
20
+ }, r, i, a, o;
21
+ return o = {
22
+ next: s(0),
23
+ throw: s(1),
24
+ return: s(2)
25
+ }, typeof Symbol == "function" && (o[Symbol.iterator] = function() {
26
+ return this;
27
+ }), o;
28
+ function s(e) {
29
+ return function(t) {
30
+ return c([e, t]);
31
+ };
32
+ }
33
+ function c(o) {
34
+ if (r) throw TypeError("Generator is already executing.");
35
+ for (; n;) try {
36
+ if (r = 1, i && (a = o[0] & 2 ? i.return : o[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, o[1])).done) return a;
37
+ switch (i = 0, a && (o = [o[0] & 2, a.value]), o[0]) {
38
+ case 0:
39
+ case 1:
40
+ a = o;
41
+ break;
42
+ case 4: return n.label++, {
43
+ value: o[1],
44
+ done: !1
45
+ };
46
+ case 5:
47
+ n.label++, i = o[1], o = [0];
48
+ continue;
49
+ case 7:
50
+ o = n.ops.pop(), n.trys.pop();
51
+ continue;
52
+ default:
53
+ if ((a = n.trys, !(a = a.length > 0 && a[a.length - 1])) && (o[0] === 6 || o[0] === 2)) {
54
+ n = 0;
55
+ continue;
56
+ }
57
+ if (o[0] === 3 && (!a || o[1] > a[0] && o[1] < a[3])) {
58
+ n.label = o[1];
59
+ break;
60
+ }
61
+ if (o[0] === 6 && n.label < a[1]) {
62
+ n.label = a[1], a = o;
63
+ break;
64
+ }
65
+ if (a && n.label < a[2]) {
66
+ n.label = a[2], n.ops.push(o);
67
+ break;
68
+ }
69
+ a[2] && n.ops.pop(), n.trys.pop();
70
+ continue;
71
+ }
72
+ o = t.call(e, n);
73
+ } catch (e) {
74
+ o = [6, e], i = 0;
75
+ } finally {
76
+ r = a = 0;
77
+ }
78
+ if (o[0] & 5) throw o[1];
79
+ return {
80
+ value: o[0] ? o[1] : void 0,
81
+ done: !0
82
+ };
83
+ }
84
+ }, n = e && e.__read || function(e, t) {
85
+ var n = typeof Symbol == "function" && e[Symbol.iterator];
86
+ if (!n) return e;
87
+ var r = n.call(e), i, a = [], o;
88
+ try {
89
+ for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
90
+ } catch (e) {
91
+ o = { error: e };
92
+ } finally {
93
+ try {
94
+ i && !i.done && (n = r.return) && n.call(r);
95
+ } finally {
96
+ if (o) throw o.error;
97
+ }
98
+ }
99
+ return a;
100
+ }, r = e && e.__spreadArray || function(e, t, n) {
101
+ if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
102
+ return e.concat(a || Array.prototype.slice.call(t));
103
+ }, i = e && e.__values || function(e) {
104
+ var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
105
+ if (n) return n.call(e);
106
+ if (e && typeof e.length == "number") return { next: function() {
107
+ return e && r >= e.length && (e = void 0), {
108
+ value: e && e[r++],
109
+ done: !e
110
+ };
111
+ } };
112
+ throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
113
+ };
114
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.LinkedList = e.ListItem = e.END = void 0, e.END = Symbol();
115
+ var a = function() {
116
+ function e(e) {
117
+ e === void 0 && (e = null), this.next = null, this.prev = null, this.data = e;
118
+ }
119
+ return e;
120
+ }();
121
+ e.ListItem = a, e.LinkedList = function() {
122
+ function o() {
123
+ var t = [...arguments];
124
+ this.list = new a(e.END), this.list.next = this.list.prev = this.list, this.push.apply(this, r([], n(t), !1));
125
+ }
126
+ return o.prototype.isBefore = function(e, t) {
127
+ return e < t;
128
+ }, o.prototype.push = function() {
129
+ for (var e, t, n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r];
130
+ try {
131
+ for (var o = i(n), s = o.next(); !s.done; s = o.next()) {
132
+ var c = s.value, l = new a(c);
133
+ l.next = this.list, l.prev = this.list.prev, this.list.prev = l, l.prev.next = l;
134
+ }
135
+ } catch (t) {
136
+ e = { error: t };
137
+ } finally {
138
+ try {
139
+ s && !s.done && (t = o.return) && t.call(o);
140
+ } finally {
141
+ if (e) throw e.error;
142
+ }
143
+ }
144
+ return this;
145
+ }, o.prototype.pop = function() {
146
+ var t = this.list.prev;
147
+ return t.data === e.END ? null : (this.list.prev = t.prev, t.prev.next = this.list, t.next = t.prev = null, t.data);
148
+ }, o.prototype.unshift = function() {
149
+ for (var e, t, n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r];
150
+ try {
151
+ for (var o = i(n.slice(0).reverse()), s = o.next(); !s.done; s = o.next()) {
152
+ var c = s.value, l = new a(c);
153
+ l.next = this.list.next, l.prev = this.list, this.list.next = l, l.next.prev = l;
154
+ }
155
+ } catch (t) {
156
+ e = { error: t };
157
+ } finally {
158
+ try {
159
+ s && !s.done && (t = o.return) && t.call(o);
160
+ } finally {
161
+ if (e) throw e.error;
162
+ }
163
+ }
164
+ return this;
165
+ }, o.prototype.shift = function() {
166
+ var t = this.list.next;
167
+ return t.data === e.END ? null : (this.list.next = t.next, t.next.prev = this.list, t.next = t.prev = null, t.data);
168
+ }, o.prototype.remove = function() {
169
+ for (var t, n, r = [], a = 0; a < arguments.length; a++) r[a] = arguments[a];
170
+ var o = /* @__PURE__ */ new Map();
171
+ try {
172
+ for (var s = i(r), c = s.next(); !c.done; c = s.next()) {
173
+ var l = c.value;
174
+ o.set(l, !0);
175
+ }
176
+ } catch (e) {
177
+ t = { error: e };
178
+ } finally {
179
+ try {
180
+ c && !c.done && (n = s.return) && n.call(s);
181
+ } finally {
182
+ if (t) throw t.error;
183
+ }
184
+ }
185
+ for (var u = this.list.next; u.data !== e.END;) {
186
+ var d = u.next;
187
+ o.has(u.data) && (u.prev.next = u.next, u.next.prev = u.prev, u.next = u.prev = null), u = d;
188
+ }
189
+ }, o.prototype.clear = function() {
190
+ return this.list.next.prev = this.list.prev.next = null, this.list.next = this.list.prev = this.list, this;
191
+ }, o.prototype[Symbol.iterator] = function() {
192
+ var n;
193
+ return t(this, function(t) {
194
+ switch (t.label) {
195
+ case 0: n = this.list.next, t.label = 1;
196
+ case 1: return n.data === e.END ? [3, 3] : [4, n.data];
197
+ case 2: return t.sent(), n = n.next, [3, 1];
198
+ case 3: return [2];
199
+ }
200
+ });
201
+ }, o.prototype.reversed = function() {
202
+ var n;
203
+ return t(this, function(t) {
204
+ switch (t.label) {
205
+ case 0: n = this.list.prev, t.label = 1;
206
+ case 1: return n.data === e.END ? [3, 3] : [4, n.data];
207
+ case 2: return t.sent(), n = n.prev, [3, 1];
208
+ case 3: return [2];
209
+ }
210
+ });
211
+ }, o.prototype.insert = function(t, n) {
212
+ n === void 0 && (n = null), n === null && (n = this.isBefore.bind(this));
213
+ for (var r = new a(t), i = this.list.next; i.data !== e.END && n(i.data, r.data);) i = i.next;
214
+ return r.prev = i.prev, r.next = i, i.prev.next = i.prev = r, this;
215
+ }, o.prototype.sort = function(e) {
216
+ var t, n;
217
+ e === void 0 && (e = null), e === null && (e = this.isBefore.bind(this));
218
+ var r = [];
219
+ try {
220
+ for (var a = i(this), s = a.next(); !s.done; s = a.next()) {
221
+ var c = s.value;
222
+ r.push(new o(c));
223
+ }
224
+ } catch (e) {
225
+ t = { error: e };
226
+ } finally {
227
+ try {
228
+ s && !s.done && (n = a.return) && n.call(a);
229
+ } finally {
230
+ if (t) throw t.error;
231
+ }
232
+ }
233
+ for (this.list.next = this.list.prev = this.list; r.length > 1;) {
234
+ var l = r.shift(), u = r.shift();
235
+ l.merge(u, e), r.push(l);
236
+ }
237
+ return r.length && (this.list = r[0].list), this;
238
+ }, o.prototype.merge = function(t, r) {
239
+ var i, a, o, s, c;
240
+ r === void 0 && (r = null), r === null && (r = this.isBefore.bind(this));
241
+ for (var l = this.list.next, u = t.list.next; l.data !== e.END && u.data !== e.END;) r(u.data, l.data) ? (i = n([l, u], 2), u.prev.next = i[0], l.prev.next = i[1], a = n([l.prev, u.prev], 2), u.prev = a[0], l.prev = a[1], o = n([t.list, this.list], 2), this.list.prev.next = o[0], t.list.prev.next = o[1], s = n([t.list.prev, this.list.prev], 2), this.list.prev = s[0], t.list.prev = s[1], c = n([u.next, l], 2), l = c[0], u = c[1]) : l = l.next;
242
+ return u.data !== e.END && (this.list.prev.next = t.list.next, t.list.next.prev = this.list.prev, t.list.prev.next = this.list, this.list.prev = t.list.prev, t.list.next = t.list.prev = t.list), this;
243
+ }, o;
244
+ }();
245
+ })), j = /* @__PURE__ */ e(((e) => {
246
+ var t = e && e.__extends || (function() {
247
+ var e = function(t, n) {
248
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
249
+ e.__proto__ = t;
250
+ } || function(e, t) {
251
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
252
+ }, e(t, n);
253
+ };
254
+ return function(t, n) {
255
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
256
+ e(t, n);
257
+ function r() {
258
+ this.constructor = t;
259
+ }
260
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
261
+ };
262
+ })();
263
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.AbstractMathList = void 0, e.AbstractMathList = function(e) {
264
+ t(n, e);
265
+ function n() {
266
+ return e !== null && e.apply(this, arguments) || this;
267
+ }
268
+ return n.prototype.isBefore = function(e, t) {
269
+ return e.start.i < t.start.i || e.start.i === t.start.i && e.start.n < t.start.n;
270
+ }, n;
271
+ }(A().LinkedList);
272
+ })), M = /* @__PURE__ */ e(((e) => {
273
+ var t = e && e.__extends || (function() {
274
+ var e = function(t, n) {
275
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
276
+ e.__proto__ = t;
277
+ } || function(e, t) {
278
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
279
+ }, e(t, n);
280
+ };
281
+ return function(t, n) {
282
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
283
+ e(t, n);
284
+ function r() {
285
+ this.constructor = t;
286
+ }
287
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
288
+ };
289
+ })();
290
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.AbstractNodeFactory = void 0, e.AbstractNodeFactory = function(e) {
291
+ t(n, e);
292
+ function n() {
293
+ return e !== null && e.apply(this, arguments) || this;
294
+ }
295
+ return n.prototype.create = function(e, t, n) {
296
+ return t === void 0 && (t = {}), n === void 0 && (n = []), this.node[e](t, n);
297
+ }, n;
298
+ }(o().AbstractFactory);
299
+ })), oe = /* @__PURE__ */ e(((e) => {
300
+ var t = e && e.__extends || (function() {
301
+ var e = function(t, n) {
302
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
303
+ e.__proto__ = t;
304
+ } || function(e, t) {
305
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
306
+ }, e(t, n);
307
+ };
308
+ return function(t, n) {
309
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
310
+ e(t, n);
311
+ function r() {
312
+ this.constructor = t;
313
+ }
314
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
315
+ };
316
+ })(), n = e && e.__assign || function() {
317
+ return n = Object.assign || function(e) {
318
+ for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
319
+ return e;
320
+ }, n.apply(this, arguments);
321
+ };
322
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.MmlMstyle = void 0;
323
+ var r = a(), o = i();
324
+ e.MmlMstyle = function(e) {
325
+ t(i, e);
326
+ function i() {
327
+ return e !== null && e.apply(this, arguments) || this;
328
+ }
329
+ return Object.defineProperty(i.prototype, "kind", {
330
+ get: function() {
331
+ return "mstyle";
332
+ },
333
+ enumerable: !1,
334
+ configurable: !0
335
+ }), Object.defineProperty(i.prototype, "notParent", {
336
+ get: function() {
337
+ return this.childNodes[0] && this.childNodes[0].childNodes.length === 1;
338
+ },
339
+ enumerable: !1,
340
+ configurable: !0
341
+ }), i.prototype.setChildInheritedAttributes = function(e, t, n, r) {
342
+ var i = this.attributes.getExplicit("scriptlevel");
343
+ i != null && (i = i.toString(), i.match(/^\s*[-+]/) ? n += parseInt(i) : n = parseInt(i), r = !1);
344
+ var a = this.attributes.getExplicit("displaystyle");
345
+ a != null && (t = a === !0, r = !1);
346
+ var o = this.attributes.getExplicit("data-cramped");
347
+ o != null && (r = o), e = this.addInheritedAttributes(e, this.attributes.getAllAttributes()), this.childNodes[0].setInheritedAttributes(e, t, n, r);
348
+ }, i.defaults = n(n({}, r.AbstractMmlLayoutNode.defaults), {
349
+ scriptlevel: o.INHERIT,
350
+ displaystyle: o.INHERIT,
351
+ scriptsizemultiplier: 1 / Math.sqrt(2),
352
+ scriptminsize: "8px",
353
+ mathbackground: o.INHERIT,
354
+ mathcolor: o.INHERIT,
355
+ dir: o.INHERIT,
356
+ infixlinebreakstyle: "before"
357
+ }), i;
358
+ }(r.AbstractMmlLayoutNode);
359
+ })), se = /* @__PURE__ */ e(((e) => {
360
+ var t = e && e.__extends || (function() {
361
+ var e = function(t, n) {
362
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
363
+ e.__proto__ = t;
364
+ } || function(e, t) {
365
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
366
+ }, e(t, n);
367
+ };
368
+ return function(t, n) {
369
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
370
+ e(t, n);
371
+ function r() {
372
+ this.constructor = t;
373
+ }
374
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
375
+ };
376
+ })(), n = e && e.__assign || function() {
377
+ return n = Object.assign || function(e) {
378
+ for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
379
+ return e;
380
+ }, n.apply(this, arguments);
381
+ };
382
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.MmlMaligngroup = void 0;
383
+ var r = a(), o = i();
384
+ e.MmlMaligngroup = function(e) {
385
+ t(i, e);
386
+ function i() {
387
+ return e !== null && e.apply(this, arguments) || this;
388
+ }
389
+ return Object.defineProperty(i.prototype, "kind", {
390
+ get: function() {
391
+ return "maligngroup";
392
+ },
393
+ enumerable: !1,
394
+ configurable: !0
395
+ }), Object.defineProperty(i.prototype, "isSpacelike", {
396
+ get: function() {
397
+ return !0;
398
+ },
399
+ enumerable: !1,
400
+ configurable: !0
401
+ }), i.prototype.setChildInheritedAttributes = function(t, n, r, i) {
402
+ t = this.addInheritedAttributes(t, this.attributes.getAllAttributes()), e.prototype.setChildInheritedAttributes.call(this, t, n, r, i);
403
+ }, i.defaults = n(n({}, r.AbstractMmlLayoutNode.defaults), { groupalign: o.INHERIT }), i;
404
+ }(r.AbstractMmlLayoutNode);
405
+ })), ce = /* @__PURE__ */ e(((e) => {
406
+ var t = e && e.__extends || (function() {
407
+ var e = function(t, n) {
408
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
409
+ e.__proto__ = t;
410
+ } || function(e, t) {
411
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
412
+ }, e(t, n);
413
+ };
414
+ return function(t, n) {
415
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
416
+ e(t, n);
417
+ function r() {
418
+ this.constructor = t;
419
+ }
420
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
421
+ };
422
+ })(), n = e && e.__assign || function() {
423
+ return n = Object.assign || function(e) {
424
+ for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
425
+ return e;
426
+ }, n.apply(this, arguments);
427
+ };
428
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.MmlMalignmark = void 0;
429
+ var r = a();
430
+ e.MmlMalignmark = function(e) {
431
+ t(i, e);
432
+ function i() {
433
+ return e !== null && e.apply(this, arguments) || this;
434
+ }
435
+ return Object.defineProperty(i.prototype, "kind", {
436
+ get: function() {
437
+ return "malignmark";
438
+ },
439
+ enumerable: !1,
440
+ configurable: !0
441
+ }), Object.defineProperty(i.prototype, "arity", {
442
+ get: function() {
443
+ return 0;
444
+ },
445
+ enumerable: !1,
446
+ configurable: !0
447
+ }), Object.defineProperty(i.prototype, "isSpacelike", {
448
+ get: function() {
449
+ return !0;
450
+ },
451
+ enumerable: !1,
452
+ configurable: !0
453
+ }), i.defaults = n(n({}, r.AbstractMmlNode.defaults), { edge: "left" }), i;
454
+ }(r.AbstractMmlNode);
455
+ })), le = /* @__PURE__ */ e(((e) => {
456
+ var t = e && e.__extends || (function() {
457
+ var e = function(t, n) {
458
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
459
+ e.__proto__ = t;
460
+ } || function(e, t) {
461
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
462
+ }, e(t, n);
463
+ };
464
+ return function(t, n) {
465
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
466
+ e(t, n);
467
+ function r() {
468
+ this.constructor = t;
469
+ }
470
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
471
+ };
472
+ })(), n = e && e.__assign || function() {
473
+ return n = Object.assign || function(e) {
474
+ for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
475
+ return e;
476
+ }, n.apply(this, arguments);
477
+ };
478
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.MathChoice = void 0;
479
+ var r = a();
480
+ e.MathChoice = function(e) {
481
+ t(i, e);
482
+ function i() {
483
+ return e !== null && e.apply(this, arguments) || this;
484
+ }
485
+ return Object.defineProperty(i.prototype, "kind", {
486
+ get: function() {
487
+ return "MathChoice";
488
+ },
489
+ enumerable: !1,
490
+ configurable: !0
491
+ }), Object.defineProperty(i.prototype, "arity", {
492
+ get: function() {
493
+ return 4;
494
+ },
495
+ enumerable: !1,
496
+ configurable: !0
497
+ }), Object.defineProperty(i.prototype, "notParent", {
498
+ get: function() {
499
+ return !0;
500
+ },
501
+ enumerable: !1,
502
+ configurable: !0
503
+ }), i.prototype.setInheritedAttributes = function(e, t, n, r) {
504
+ var i = t ? 0 : Math.max(0, Math.min(n, 2)) + 1, a = this.childNodes[i] || this.factory.create("mrow");
505
+ this.parent.replaceChild(a, this), a.setInheritedAttributes(e, t, n, r);
506
+ }, i.defaults = n({}, r.AbstractMmlBaseNode.defaults), i;
507
+ }(r.AbstractMmlBaseNode);
508
+ })), N = /* @__PURE__ */ e(((e) => {
509
+ var t;
510
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.MML = void 0;
511
+ var n = a(), r = f(), i = re(), o = l(), c = s(), u = d(), k = ie(), A = h(), j = ae(), M = ne(), N = p(), P = y(), F = oe(), I = b(), L = C(), R = E(), z = v(), B = _(), V = te(), H = S(), U = g(), W = O(), G = T(), K = m(), q = x(), J = se(), Y = ce(), X = D(), Z = w(), Q = ee(), $ = le();
512
+ e.MML = (t = {}, t[r.MmlMath.prototype.kind] = r.MmlMath, t[i.MmlMi.prototype.kind] = i.MmlMi, t[o.MmlMn.prototype.kind] = o.MmlMn, t[c.MmlMo.prototype.kind] = c.MmlMo, t[u.MmlMtext.prototype.kind] = u.MmlMtext, t[k.MmlMspace.prototype.kind] = k.MmlMspace, t[A.MmlMs.prototype.kind] = A.MmlMs, t[j.MmlMrow.prototype.kind] = j.MmlMrow, t[j.MmlInferredMrow.prototype.kind] = j.MmlInferredMrow, t[M.MmlMfrac.prototype.kind] = M.MmlMfrac, t[N.MmlMsqrt.prototype.kind] = N.MmlMsqrt, t[P.MmlMroot.prototype.kind] = P.MmlMroot, t[F.MmlMstyle.prototype.kind] = F.MmlMstyle, t[I.MmlMerror.prototype.kind] = I.MmlMerror, t[L.MmlMpadded.prototype.kind] = L.MmlMpadded, t[R.MmlMphantom.prototype.kind] = R.MmlMphantom, t[z.MmlMfenced.prototype.kind] = z.MmlMfenced, t[B.MmlMenclose.prototype.kind] = B.MmlMenclose, t[V.MmlMaction.prototype.kind] = V.MmlMaction, t[H.MmlMsub.prototype.kind] = H.MmlMsub, t[H.MmlMsup.prototype.kind] = H.MmlMsup, t[H.MmlMsubsup.prototype.kind] = H.MmlMsubsup, t[U.MmlMunder.prototype.kind] = U.MmlMunder, t[U.MmlMover.prototype.kind] = U.MmlMover, t[U.MmlMunderover.prototype.kind] = U.MmlMunderover, t[W.MmlMmultiscripts.prototype.kind] = W.MmlMmultiscripts, t[W.MmlMprescripts.prototype.kind] = W.MmlMprescripts, t[W.MmlNone.prototype.kind] = W.MmlNone, t[G.MmlMtable.prototype.kind] = G.MmlMtable, t[K.MmlMlabeledtr.prototype.kind] = K.MmlMlabeledtr, t[K.MmlMtr.prototype.kind] = K.MmlMtr, t[q.MmlMtd.prototype.kind] = q.MmlMtd, t[J.MmlMaligngroup.prototype.kind] = J.MmlMaligngroup, t[Y.MmlMalignmark.prototype.kind] = Y.MmlMalignmark, t[X.MmlMglyph.prototype.kind] = X.MmlMglyph, t[Z.MmlSemantics.prototype.kind] = Z.MmlSemantics, t[Z.MmlAnnotation.prototype.kind] = Z.MmlAnnotation, t[Z.MmlAnnotationXML.prototype.kind] = Z.MmlAnnotationXML, t[Q.TeXAtom.prototype.kind] = Q.TeXAtom, t[$.MathChoice.prototype.kind] = $.MathChoice, t[n.TextNode.prototype.kind] = n.TextNode, t[n.XMLNode.prototype.kind] = n.XMLNode, t);
513
+ })), P = /* @__PURE__ */ e(((e) => {
514
+ var t = e && e.__extends || (function() {
515
+ var e = function(t, n) {
516
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
517
+ e.__proto__ = t;
518
+ } || function(e, t) {
519
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
520
+ }, e(t, n);
521
+ };
522
+ return function(t, n) {
523
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
524
+ e(t, n);
525
+ function r() {
526
+ this.constructor = t;
527
+ }
528
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
529
+ };
530
+ })();
531
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.MmlFactory = void 0;
532
+ var n = M(), r = N();
533
+ e.MmlFactory = function(e) {
534
+ t(n, e);
535
+ function n() {
536
+ return e !== null && e.apply(this, arguments) || this;
537
+ }
538
+ return Object.defineProperty(n.prototype, "MML", {
539
+ get: function() {
540
+ return this.node;
541
+ },
542
+ enumerable: !1,
543
+ configurable: !0
544
+ }), n.defaultNodes = r.MML, n;
545
+ }(n.AbstractNodeFactory);
546
+ })), F = /* @__PURE__ */ e(((e) => {
547
+ var t = e && e.__extends || (function() {
548
+ var e = function(t, n) {
549
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
550
+ e.__proto__ = t;
551
+ } || function(e, t) {
552
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
553
+ }, e(t, n);
554
+ };
555
+ return function(t, n) {
556
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
557
+ e(t, n);
558
+ function r() {
559
+ this.constructor = t;
560
+ }
561
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
562
+ };
563
+ })(), n = e && e.__values || function(e) {
564
+ var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
565
+ if (n) return n.call(e);
566
+ if (e && typeof e.length == "number") return { next: function() {
567
+ return e && r >= e.length && (e = void 0), {
568
+ value: e && e[r++],
569
+ done: !e
570
+ };
571
+ } };
572
+ throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
573
+ }, r = e && e.__read || function(e, t) {
574
+ var n = typeof Symbol == "function" && e[Symbol.iterator];
575
+ if (!n) return e;
576
+ var r = n.call(e), i, a = [], o;
577
+ try {
578
+ for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
579
+ } catch (e) {
580
+ o = { error: e };
581
+ } finally {
582
+ try {
583
+ i && !i.done && (n = r.return) && n.call(r);
584
+ } finally {
585
+ if (o) throw o.error;
586
+ }
587
+ }
588
+ return a;
589
+ }, i = e && e.__spreadArray || function(e, t, n) {
590
+ if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
591
+ return e.concat(a || Array.prototype.slice.call(t));
592
+ };
593
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.BitFieldClass = e.BitField = void 0;
594
+ var a = function() {
595
+ function e() {
596
+ this.bits = 0;
597
+ }
598
+ return e.allocate = function() {
599
+ for (var t, r, i = [], a = 0; a < arguments.length; a++) i[a] = arguments[a];
600
+ try {
601
+ for (var o = n(i), s = o.next(); !s.done; s = o.next()) {
602
+ var c = s.value;
603
+ if (this.has(c)) throw Error("Bit already allocated for " + c);
604
+ if (this.next === e.MAXBIT) throw Error("Maximum number of bits already allocated");
605
+ this.names.set(c, this.next), this.next <<= 1;
606
+ }
607
+ } catch (e) {
608
+ t = { error: e };
609
+ } finally {
610
+ try {
611
+ s && !s.done && (r = o.return) && r.call(o);
612
+ } finally {
613
+ if (t) throw t.error;
614
+ }
615
+ }
616
+ }, e.has = function(e) {
617
+ return this.names.has(e);
618
+ }, e.prototype.set = function(e) {
619
+ this.bits |= this.getBit(e);
620
+ }, e.prototype.clear = function(e) {
621
+ this.bits &= ~this.getBit(e);
622
+ }, e.prototype.isSet = function(e) {
623
+ return !!(this.bits & this.getBit(e));
624
+ }, e.prototype.reset = function() {
625
+ this.bits = 0;
626
+ }, e.prototype.getBit = function(e) {
627
+ var t = this.constructor.names.get(e);
628
+ if (!t) throw Error("Unknown bit-field name: " + e);
629
+ return t;
630
+ }, e.MAXBIT = 1 << 31, e.next = 1, e.names = /* @__PURE__ */ new Map(), e;
631
+ }();
632
+ e.BitField = a;
633
+ function o() {
634
+ var e = [...arguments], n = function(e) {
635
+ t(n, e);
636
+ function n() {
637
+ return e !== null && e.apply(this, arguments) || this;
638
+ }
639
+ return n;
640
+ }(a);
641
+ return n.allocate.apply(n, i([], r(e), !1)), n;
642
+ }
643
+ e.BitFieldClass = o;
644
+ })), I = /* @__PURE__ */ e(((e) => {
645
+ var n = e && e.__extends || (function() {
646
+ var e = function(t, n) {
647
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
648
+ e.__proto__ = t;
649
+ } || function(e, t) {
650
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
651
+ }, e(t, n);
652
+ };
653
+ return function(t, n) {
654
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
655
+ e(t, n);
656
+ function r() {
657
+ this.constructor = t;
658
+ }
659
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
660
+ };
661
+ })(), i = e && e.__values || function(e) {
662
+ var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
663
+ if (n) return n.call(e);
664
+ if (e && typeof e.length == "number") return { next: function() {
665
+ return e && r >= e.length && (e = void 0), {
666
+ value: e && e[r++],
667
+ done: !e
668
+ };
669
+ } };
670
+ throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
671
+ }, a = e && e.__read || function(e, t) {
672
+ var n = typeof Symbol == "function" && e[Symbol.iterator];
673
+ if (!n) return e;
674
+ var r = n.call(e), i, a = [], o;
675
+ try {
676
+ for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
677
+ } catch (e) {
678
+ o = { error: e };
679
+ } finally {
680
+ try {
681
+ i && !i.done && (n = r.return) && n.call(r);
682
+ } finally {
683
+ if (o) throw o.error;
684
+ }
685
+ }
686
+ return a;
687
+ }, o = e && e.__spreadArray || function(e, t, n) {
688
+ if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
689
+ return e.concat(a || Array.prototype.slice.call(t));
690
+ };
691
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.AbstractMathDocument = e.resetAllOptions = e.resetOptions = e.RenderList = void 0;
692
+ var s = t(), l = c(), d = u(), f = j(), p = k(), m = P(), h = F(), g = function(e) {
693
+ n(t, e);
694
+ function t() {
695
+ return e !== null && e.apply(this, arguments) || this;
696
+ }
697
+ return t.create = function(e) {
698
+ var t, n, r = new this();
699
+ try {
700
+ for (var o = i(Object.keys(e)), s = o.next(); !s.done; s = o.next()) {
701
+ var c = s.value, l = a(this.action(c, e[c]), 2), u = l[0], d = l[1];
702
+ d && r.add(u, d);
703
+ }
704
+ } catch (e) {
705
+ t = { error: e };
706
+ } finally {
707
+ try {
708
+ s && !s.done && (n = o.return) && n.call(o);
709
+ } finally {
710
+ if (t) throw t.error;
711
+ }
712
+ }
713
+ return r;
714
+ }, t.action = function(e, t) {
715
+ var n, r, i, o, s, c, l = !0, u = t[0];
716
+ if (t.length === 1 || typeof t[1] == "boolean") t.length === 2 && (l = t[1]), n = a(this.methodActions(e), 2), s = n[0], c = n[1];
717
+ else if (typeof t[1] == "string") if (typeof t[2] == "string") {
718
+ t.length === 4 && (l = t[3]);
719
+ var d = a(t.slice(1), 2), f = d[0], p = d[1];
720
+ r = a(this.methodActions(f, p), 2), s = r[0], c = r[1];
721
+ } else t.length === 3 && (l = t[2]), i = a(this.methodActions(t[1]), 2), s = i[0], c = i[1];
722
+ else t.length === 4 && (l = t[3]), o = a(t.slice(1), 2), s = o[0], c = o[1];
723
+ return [{
724
+ id: e,
725
+ renderDoc: s,
726
+ renderMath: c,
727
+ convert: l
728
+ }, u];
729
+ }, t.methodActions = function(e, t) {
730
+ return t === void 0 && (t = e), [function(t) {
731
+ return e && t[e](), !1;
732
+ }, function(e, n) {
733
+ return t && e[t](n), !1;
734
+ }];
735
+ }, t.prototype.renderDoc = function(e, t) {
736
+ var n, r;
737
+ t === void 0 && (t = p.STATE.UNPROCESSED);
738
+ try {
739
+ for (var a = i(this.items), o = a.next(); !o.done; o = a.next()) {
740
+ var s = o.value;
741
+ if (s.priority >= t && s.item.renderDoc(e)) return;
742
+ }
743
+ } catch (e) {
744
+ n = { error: e };
745
+ } finally {
746
+ try {
747
+ o && !o.done && (r = a.return) && r.call(a);
748
+ } finally {
749
+ if (n) throw n.error;
750
+ }
751
+ }
752
+ }, t.prototype.renderMath = function(e, t, n) {
753
+ var r, a;
754
+ n === void 0 && (n = p.STATE.UNPROCESSED);
755
+ try {
756
+ for (var o = i(this.items), s = o.next(); !s.done; s = o.next()) {
757
+ var c = s.value;
758
+ if (c.priority >= n && c.item.renderMath(e, t)) return;
759
+ }
760
+ } catch (e) {
761
+ r = { error: e };
762
+ } finally {
763
+ try {
764
+ s && !s.done && (a = o.return) && a.call(o);
765
+ } finally {
766
+ if (r) throw r.error;
767
+ }
768
+ }
769
+ }, t.prototype.renderConvert = function(e, t, n) {
770
+ var r, a;
771
+ n === void 0 && (n = p.STATE.LAST);
772
+ try {
773
+ for (var o = i(this.items), s = o.next(); !s.done; s = o.next()) {
774
+ var c = s.value;
775
+ if (c.priority > n || c.item.convert && c.item.renderMath(e, t)) return;
776
+ }
777
+ } catch (e) {
778
+ r = { error: e };
779
+ } finally {
780
+ try {
781
+ s && !s.done && (a = o.return) && a.call(o);
782
+ } finally {
783
+ if (r) throw r.error;
784
+ }
785
+ }
786
+ }, t.prototype.findID = function(e) {
787
+ var t, n;
788
+ try {
789
+ for (var r = i(this.items), a = r.next(); !a.done; a = r.next()) {
790
+ var o = a.value;
791
+ if (o.item.id === e) return o.item;
792
+ }
793
+ } catch (e) {
794
+ t = { error: e };
795
+ } finally {
796
+ try {
797
+ a && !a.done && (n = r.return) && n.call(r);
798
+ } finally {
799
+ if (t) throw t.error;
800
+ }
801
+ }
802
+ return null;
803
+ }, t;
804
+ }(r().PrioritizedList);
805
+ e.RenderList = g, e.resetOptions = {
806
+ all: !1,
807
+ processed: !1,
808
+ inputJax: null,
809
+ outputJax: null
810
+ }, e.resetAllOptions = {
811
+ all: !0,
812
+ processed: !0,
813
+ inputJax: [],
814
+ outputJax: []
815
+ };
816
+ var _ = function(e) {
817
+ n(t, e);
818
+ function t() {
819
+ return e !== null && e.apply(this, arguments) || this;
820
+ }
821
+ return t.prototype.compile = function(e) {
822
+ return null;
823
+ }, t;
824
+ }(l.AbstractInputJax), v = function(e) {
825
+ n(t, e);
826
+ function t() {
827
+ return e !== null && e.apply(this, arguments) || this;
828
+ }
829
+ return t.prototype.typeset = function(e, t) {
830
+ return t === void 0 && (t = null), null;
831
+ }, t.prototype.escaped = function(e, t) {
832
+ return null;
833
+ }, t;
834
+ }(d.AbstractOutputJax), y = function(e) {
835
+ n(t, e);
836
+ function t() {
837
+ return e !== null && e.apply(this, arguments) || this;
838
+ }
839
+ return t;
840
+ }(f.AbstractMathList), b = function(e) {
841
+ n(t, e);
842
+ function t() {
843
+ return e !== null && e.apply(this, arguments) || this;
844
+ }
845
+ return t;
846
+ }(p.AbstractMathItem);
847
+ e.AbstractMathDocument = function() {
848
+ function t(e, n, r) {
849
+ var i = this, a = this.constructor;
850
+ this.document = e, this.options = (0, s.userOptions)((0, s.defaultOptions)({}, a.OPTIONS), r), this.math = new (this.options.MathList || y)(), this.renderActions = g.create(this.options.renderActions), this.processed = new t.ProcessBits(), this.outputJax = this.options.OutputJax || new v();
851
+ var o = this.options.InputJax || [new _()];
852
+ Array.isArray(o) || (o = [o]), this.inputJax = o, this.adaptor = n, this.outputJax.setAdaptor(n), this.inputJax.map(function(e) {
853
+ return e.setAdaptor(n);
854
+ }), this.mmlFactory = this.options.MmlFactory || new m.MmlFactory(), this.inputJax.map(function(e) {
855
+ return e.setMmlFactory(i.mmlFactory);
856
+ }), this.outputJax.initialize(), this.inputJax.map(function(e) {
857
+ return e.initialize();
858
+ });
859
+ }
860
+ return Object.defineProperty(t.prototype, "kind", {
861
+ get: function() {
862
+ return this.constructor.KIND;
863
+ },
864
+ enumerable: !1,
865
+ configurable: !0
866
+ }), t.prototype.addRenderAction = function(e) {
867
+ var t = [...arguments].slice(1), n = a(g.action(e, t), 2), r = n[0], i = n[1];
868
+ this.renderActions.add(r, i);
869
+ }, t.prototype.removeRenderAction = function(e) {
870
+ var t = this.renderActions.findID(e);
871
+ t && this.renderActions.remove(t);
872
+ }, t.prototype.render = function() {
873
+ return this.renderActions.renderDoc(this), this;
874
+ }, t.prototype.rerender = function(e) {
875
+ return e === void 0 && (e = p.STATE.RERENDER), this.state(e - 1), this.render(), this;
876
+ }, t.prototype.convert = function(e, t) {
877
+ t === void 0 && (t = {});
878
+ var n = (0, s.userOptions)({
879
+ format: this.inputJax[0].name,
880
+ display: !0,
881
+ end: p.STATE.LAST,
882
+ em: 16,
883
+ ex: 8,
884
+ containerWidth: null,
885
+ lineWidth: 1e6,
886
+ scale: 1,
887
+ family: ""
888
+ }, t), r = n.format, i = n.display, a = n.end, o = n.ex, c = n.em, l = n.containerWidth, u = n.lineWidth, d = n.scale, f = n.family;
889
+ l === null && (l = 80 * o);
890
+ var m = this.inputJax.reduce(function(e, t) {
891
+ return t.name === r ? t : e;
892
+ }, null), h = new this.options.MathItem(e, m, i);
893
+ return h.start.node = this.adaptor.body(this.document), h.setMetrics(c, o, l, u, d), this.outputJax.options.mtextInheritFont && (h.outputData.mtextFamily = f), this.outputJax.options.merrorInheritFont && (h.outputData.merrorFamily = f), h.convert(this, a), h.typesetRoot || h.root;
894
+ }, t.prototype.findMath = function(e) {
895
+ return e === void 0 && (e = null), this.processed.set("findMath"), this;
896
+ }, t.prototype.compile = function() {
897
+ var e, t, n, r;
898
+ if (!this.processed.isSet("compile")) {
899
+ var a = [];
900
+ try {
901
+ for (var o = i(this.math), s = o.next(); !s.done; s = o.next()) {
902
+ var c = s.value;
903
+ this.compileMath(c), c.inputData.recompile !== void 0 && a.push(c);
904
+ }
905
+ } catch (t) {
906
+ e = { error: t };
907
+ } finally {
908
+ try {
909
+ s && !s.done && (t = o.return) && t.call(o);
910
+ } finally {
911
+ if (e) throw e.error;
912
+ }
913
+ }
914
+ try {
915
+ for (var l = i(a), u = l.next(); !u.done; u = l.next()) {
916
+ var c = u.value, d = c.inputData.recompile;
917
+ c.state(d.state), c.inputData.recompile = d, this.compileMath(c);
918
+ }
919
+ } catch (e) {
920
+ n = { error: e };
921
+ } finally {
922
+ try {
923
+ u && !u.done && (r = l.return) && r.call(l);
924
+ } finally {
925
+ if (n) throw n.error;
926
+ }
927
+ }
928
+ this.processed.set("compile");
929
+ }
930
+ return this;
931
+ }, t.prototype.compileMath = function(e) {
932
+ try {
933
+ e.compile(this);
934
+ } catch (t) {
935
+ if (t.retry || t.restart) throw t;
936
+ this.options.compileError(this, e, t), e.inputData.error = t;
937
+ }
938
+ }, t.prototype.compileError = function(e, t) {
939
+ e.root = this.mmlFactory.create("math", null, [this.mmlFactory.create("merror", {
940
+ "data-mjx-error": t.message,
941
+ title: t.message
942
+ }, [this.mmlFactory.create("mtext", null, [this.mmlFactory.create("text").setText("Math input error")])])]), e.display && e.root.attributes.set("display", "block"), e.inputData.error = t.message;
943
+ }, t.prototype.typeset = function() {
944
+ var e, t;
945
+ if (!this.processed.isSet("typeset")) {
946
+ try {
947
+ for (var n = i(this.math), r = n.next(); !r.done; r = n.next()) {
948
+ var a = r.value;
949
+ try {
950
+ a.typeset(this);
951
+ } catch (e) {
952
+ if (e.retry || e.restart) throw e;
953
+ this.options.typesetError(this, a, e), a.outputData.error = e;
954
+ }
955
+ }
956
+ } catch (t) {
957
+ e = { error: t };
958
+ } finally {
959
+ try {
960
+ r && !r.done && (t = n.return) && t.call(n);
961
+ } finally {
962
+ if (e) throw e.error;
963
+ }
964
+ }
965
+ this.processed.set("typeset");
966
+ }
967
+ return this;
968
+ }, t.prototype.typesetError = function(e, t) {
969
+ e.typesetRoot = this.adaptor.node("mjx-container", {
970
+ class: "MathJax mjx-output-error",
971
+ jax: this.outputJax.name
972
+ }, [this.adaptor.node("span", {
973
+ "data-mjx-error": t.message,
974
+ title: t.message,
975
+ style: {
976
+ color: "red",
977
+ "background-color": "yellow",
978
+ "line-height": "normal"
979
+ }
980
+ }, [this.adaptor.text("Math output error")])]), e.display && this.adaptor.setAttributes(e.typesetRoot, { style: {
981
+ display: "block",
982
+ margin: "1em 0",
983
+ "text-align": "center"
984
+ } }), e.outputData.error = t.message;
985
+ }, t.prototype.getMetrics = function() {
986
+ return this.processed.isSet("getMetrics") || (this.outputJax.getMetrics(this), this.processed.set("getMetrics")), this;
987
+ }, t.prototype.updateDocument = function() {
988
+ var e, t;
989
+ if (!this.processed.isSet("updateDocument")) {
990
+ try {
991
+ for (var n = i(this.math.reversed()), r = n.next(); !r.done; r = n.next()) r.value.updateDocument(this);
992
+ } catch (t) {
993
+ e = { error: t };
994
+ } finally {
995
+ try {
996
+ r && !r.done && (t = n.return) && t.call(n);
997
+ } finally {
998
+ if (e) throw e.error;
999
+ }
1000
+ }
1001
+ this.processed.set("updateDocument");
1002
+ }
1003
+ return this;
1004
+ }, t.prototype.removeFromDocument = function(e) {
1005
+ return e === void 0 && (e = !1), this;
1006
+ }, t.prototype.state = function(e, t) {
1007
+ var n, r;
1008
+ t === void 0 && (t = !1);
1009
+ try {
1010
+ for (var a = i(this.math), o = a.next(); !o.done; o = a.next()) o.value.state(e, t);
1011
+ } catch (e) {
1012
+ n = { error: e };
1013
+ } finally {
1014
+ try {
1015
+ o && !o.done && (r = a.return) && r.call(a);
1016
+ } finally {
1017
+ if (n) throw n.error;
1018
+ }
1019
+ }
1020
+ return e < p.STATE.INSERTED && this.processed.clear("updateDocument"), e < p.STATE.TYPESET && (this.processed.clear("typeset"), this.processed.clear("getMetrics")), e < p.STATE.COMPILED && this.processed.clear("compile"), this;
1021
+ }, t.prototype.reset = function(t) {
1022
+ var n;
1023
+ return t === void 0 && (t = { processed: !0 }), t = (0, s.userOptions)(Object.assign({}, e.resetOptions), t), t.all && Object.assign(t, e.resetAllOptions), t.processed && this.processed.reset(), t.inputJax && this.inputJax.forEach(function(e) {
1024
+ return e.reset.apply(e, o([], a(t.inputJax), !1));
1025
+ }), t.outputJax && (n = this.outputJax).reset.apply(n, o([], a(t.outputJax), !1)), this;
1026
+ }, t.prototype.clear = function() {
1027
+ return this.reset(), this.math.clear(), this;
1028
+ }, t.prototype.concat = function(e) {
1029
+ return this.math.merge(e), this;
1030
+ }, t.prototype.clearMathItemsWithin = function(e) {
1031
+ var t, n = this.getMathItemsWithin(e);
1032
+ return (t = this.math).remove.apply(t, o([], a(n), !1)), n;
1033
+ }, t.prototype.getMathItemsWithin = function(e) {
1034
+ var t, n, r, a;
1035
+ Array.isArray(e) || (e = [e]);
1036
+ var o = this.adaptor, s = [], c = o.getElements(e, this.document);
1037
+ try {
1038
+ ITEMS: for (var l = i(this.math), u = l.next(); !u.done; u = l.next()) {
1039
+ var d = u.value;
1040
+ try {
1041
+ for (var f = (r = void 0, i(c)), p = f.next(); !p.done; p = f.next()) {
1042
+ var m = p.value;
1043
+ if (d.start.node && o.contains(m, d.start.node)) {
1044
+ s.push(d);
1045
+ continue ITEMS;
1046
+ }
1047
+ }
1048
+ } catch (e) {
1049
+ r = { error: e };
1050
+ } finally {
1051
+ try {
1052
+ p && !p.done && (a = f.return) && a.call(f);
1053
+ } finally {
1054
+ if (r) throw r.error;
1055
+ }
1056
+ }
1057
+ }
1058
+ } catch (e) {
1059
+ t = { error: e };
1060
+ } finally {
1061
+ try {
1062
+ u && !u.done && (n = l.return) && n.call(l);
1063
+ } finally {
1064
+ if (t) throw t.error;
1065
+ }
1066
+ }
1067
+ return s;
1068
+ }, t.KIND = "MathDocument", t.OPTIONS = {
1069
+ OutputJax: null,
1070
+ InputJax: null,
1071
+ MmlFactory: null,
1072
+ MathList: y,
1073
+ MathItem: b,
1074
+ compileError: function(e, t, n) {
1075
+ e.compileError(t, n);
1076
+ },
1077
+ typesetError: function(e, t, n) {
1078
+ e.typesetError(t, n);
1079
+ },
1080
+ renderActions: (0, s.expandable)({
1081
+ find: [
1082
+ p.STATE.FINDMATH,
1083
+ "findMath",
1084
+ "",
1085
+ !1
1086
+ ],
1087
+ compile: [p.STATE.COMPILED],
1088
+ metrics: [
1089
+ p.STATE.METRICS,
1090
+ "getMetrics",
1091
+ "",
1092
+ !1
1093
+ ],
1094
+ typeset: [p.STATE.TYPESET],
1095
+ update: [
1096
+ p.STATE.INSERTED,
1097
+ "updateDocument",
1098
+ !1
1099
+ ]
1100
+ })
1101
+ }, t.ProcessBits = (0, h.BitFieldClass)("findMath", "compile", "getMetrics", "typeset", "updateDocument"), t;
1102
+ }();
1103
+ })), L = /* @__PURE__ */ e(((e) => {
1104
+ var t = e && e.__extends || (function() {
1105
+ var e = function(t, n) {
1106
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
1107
+ e.__proto__ = t;
1108
+ } || function(e, t) {
1109
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
1110
+ }, e(t, n);
1111
+ };
1112
+ return function(t, n) {
1113
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
1114
+ e(t, n);
1115
+ function r() {
1116
+ this.constructor = t;
1117
+ }
1118
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
1119
+ };
1120
+ })();
1121
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.AbstractHandler = void 0;
1122
+ var n = function(e) {
1123
+ t(n, e);
1124
+ function n() {
1125
+ return e !== null && e.apply(this, arguments) || this;
1126
+ }
1127
+ return n;
1128
+ }(I().AbstractMathDocument);
1129
+ e.AbstractHandler = function() {
1130
+ function e(e, t) {
1131
+ t === void 0 && (t = 5), this.documentClass = n, this.adaptor = e, this.priority = t;
1132
+ }
1133
+ return Object.defineProperty(e.prototype, "name", {
1134
+ get: function() {
1135
+ return this.constructor.NAME;
1136
+ },
1137
+ enumerable: !1,
1138
+ configurable: !0
1139
+ }), e.prototype.handlesDocument = function(e) {
1140
+ return !1;
1141
+ }, e.prototype.create = function(e, t) {
1142
+ return new this.documentClass(e, this.adaptor, t);
1143
+ }, e.NAME = "generic", e;
1144
+ }();
1145
+ })), R = /* @__PURE__ */ e(((e) => {
1146
+ var t = e && e.__extends || (function() {
1147
+ var e = function(t, n) {
1148
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
1149
+ e.__proto__ = t;
1150
+ } || function(e, t) {
1151
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
1152
+ }, e(t, n);
1153
+ };
1154
+ return function(t, n) {
1155
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
1156
+ e(t, n);
1157
+ function r() {
1158
+ this.constructor = t;
1159
+ }
1160
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
1161
+ };
1162
+ })();
1163
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.HTMLMathItem = void 0;
1164
+ var n = k();
1165
+ e.HTMLMathItem = function(e) {
1166
+ t(r, e);
1167
+ function r(t, n, r, i, a) {
1168
+ return r === void 0 && (r = !0), i === void 0 && (i = {
1169
+ node: null,
1170
+ n: 0,
1171
+ delim: ""
1172
+ }), a === void 0 && (a = {
1173
+ node: null,
1174
+ n: 0,
1175
+ delim: ""
1176
+ }), e.call(this, t, n, r, i, a) || this;
1177
+ }
1178
+ return Object.defineProperty(r.prototype, "adaptor", {
1179
+ get: function() {
1180
+ return this.inputJax.adaptor;
1181
+ },
1182
+ enumerable: !1,
1183
+ configurable: !0
1184
+ }), r.prototype.updateDocument = function(e) {
1185
+ if (this.state() < n.STATE.INSERTED) {
1186
+ if (this.inputJax.processStrings) {
1187
+ var t = this.start.node;
1188
+ if (t === this.end.node) this.end.n && this.end.n < this.adaptor.value(this.end.node).length && this.adaptor.split(this.end.node, this.end.n), this.start.n && (t = this.adaptor.split(this.start.node, this.start.n)), this.adaptor.replace(this.typesetRoot, t);
1189
+ else {
1190
+ for (this.start.n && (t = this.adaptor.split(t, this.start.n)); t !== this.end.node;) {
1191
+ var r = this.adaptor.next(t);
1192
+ this.adaptor.remove(t), t = r;
1193
+ }
1194
+ this.adaptor.insert(this.typesetRoot, t), this.end.n < this.adaptor.value(t).length && this.adaptor.split(t, this.end.n), this.adaptor.remove(t);
1195
+ }
1196
+ } else this.adaptor.replace(this.typesetRoot, this.start.node);
1197
+ this.start.node = this.end.node = this.typesetRoot, this.start.n = this.end.n = 0, this.state(n.STATE.INSERTED);
1198
+ }
1199
+ }, r.prototype.updateStyleSheet = function(e) {
1200
+ e.addStyleSheet();
1201
+ }, r.prototype.removeFromDocument = function(e) {
1202
+ if (e === void 0 && (e = !1), this.state() >= n.STATE.TYPESET) {
1203
+ var t = this.adaptor, r = this.start.node, i = t.text("");
1204
+ if (e) {
1205
+ var a = this.start.delim + this.math + this.end.delim;
1206
+ if (this.inputJax.processStrings) i = t.text(a);
1207
+ else {
1208
+ var o = t.parse(a, "text/html");
1209
+ i = t.firstChild(t.body(o));
1210
+ }
1211
+ }
1212
+ t.parent(r) && t.replace(i, r), this.start.node = this.end.node = i, this.start.n = this.end.n = 0;
1213
+ }
1214
+ }, r;
1215
+ }(n.AbstractMathItem);
1216
+ })), z = /* @__PURE__ */ e(((e) => {
1217
+ var t = e && e.__extends || (function() {
1218
+ var e = function(t, n) {
1219
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
1220
+ e.__proto__ = t;
1221
+ } || function(e, t) {
1222
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
1223
+ }, e(t, n);
1224
+ };
1225
+ return function(t, n) {
1226
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
1227
+ e(t, n);
1228
+ function r() {
1229
+ this.constructor = t;
1230
+ }
1231
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
1232
+ };
1233
+ })();
1234
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.HTMLMathList = void 0, e.HTMLMathList = function(e) {
1235
+ t(n, e);
1236
+ function n() {
1237
+ return e !== null && e.apply(this, arguments) || this;
1238
+ }
1239
+ return n;
1240
+ }(j().AbstractMathList);
1241
+ })), B = /* @__PURE__ */ e(((e) => {
1242
+ var n = e && e.__read || function(e, t) {
1243
+ var n = typeof Symbol == "function" && e[Symbol.iterator];
1244
+ if (!n) return e;
1245
+ var r = n.call(e), i, a = [], o;
1246
+ try {
1247
+ for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
1248
+ } catch (e) {
1249
+ o = { error: e };
1250
+ } finally {
1251
+ try {
1252
+ i && !i.done && (n = r.return) && n.call(r);
1253
+ } finally {
1254
+ if (o) throw o.error;
1255
+ }
1256
+ }
1257
+ return a;
1258
+ };
1259
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.HTMLDomStrings = void 0;
1260
+ var r = t();
1261
+ e.HTMLDomStrings = function() {
1262
+ function e(e) {
1263
+ e === void 0 && (e = null);
1264
+ var t = this.constructor;
1265
+ this.options = (0, r.userOptions)((0, r.defaultOptions)({}, t.OPTIONS), e), this.init(), this.getPatterns();
1266
+ }
1267
+ return e.prototype.init = function() {
1268
+ this.strings = [], this.string = "", this.snodes = [], this.nodes = [], this.stack = [];
1269
+ }, e.prototype.getPatterns = function() {
1270
+ var e = (0, r.makeArray)(this.options.skipHtmlTags), t = (0, r.makeArray)(this.options.ignoreHtmlClass), n = (0, r.makeArray)(this.options.processHtmlClass);
1271
+ this.skipHtmlTags = RegExp("^(?:" + e.join("|") + ")$", "i"), this.ignoreHtmlClass = RegExp("(?:^| )(?:" + t.join("|") + ")(?: |$)"), this.processHtmlClass = RegExp("(?:^| )(?:" + n + ")(?: |$)");
1272
+ }, e.prototype.pushString = function() {
1273
+ this.string.match(/\S/) && (this.strings.push(this.string), this.nodes.push(this.snodes)), this.string = "", this.snodes = [];
1274
+ }, e.prototype.extendString = function(e, t) {
1275
+ this.snodes.push([e, t.length]), this.string += t;
1276
+ }, e.prototype.handleText = function(e, t) {
1277
+ return t || this.extendString(e, this.adaptor.value(e)), this.adaptor.next(e);
1278
+ }, e.prototype.handleTag = function(e, t) {
1279
+ if (!t) {
1280
+ var n = this.options.includeHtmlTags[this.adaptor.kind(e)];
1281
+ this.extendString(e, n);
1282
+ }
1283
+ return this.adaptor.next(e);
1284
+ }, e.prototype.handleContainer = function(e, t) {
1285
+ this.pushString();
1286
+ var n = this.adaptor.getAttribute(e, "class") || "", r = this.adaptor.kind(e) || "", i = this.processHtmlClass.exec(n), a = e;
1287
+ return this.adaptor.firstChild(e) && !this.adaptor.getAttribute(e, "data-MJX") && (i || !this.skipHtmlTags.exec(r)) ? (this.adaptor.next(e) && this.stack.push([this.adaptor.next(e), t]), a = this.adaptor.firstChild(e), t = (t || this.ignoreHtmlClass.exec(n)) && !i) : a = this.adaptor.next(e), [a, t];
1288
+ }, e.prototype.handleOther = function(e, t) {
1289
+ return this.pushString(), this.adaptor.next(e);
1290
+ }, e.prototype.find = function(e) {
1291
+ var t, r;
1292
+ this.init();
1293
+ for (var i = this.adaptor.next(e), a = !1, o = this.options.includeHtmlTags; e && e !== i;) {
1294
+ var s = this.adaptor.kind(e);
1295
+ s === "#text" ? e = this.handleText(e, a) : o.hasOwnProperty(s) ? e = this.handleTag(e, a) : s ? (t = n(this.handleContainer(e, a), 2), e = t[0], a = t[1]) : e = this.handleOther(e, a), !e && this.stack.length && (this.pushString(), r = n(this.stack.pop(), 2), e = r[0], a = r[1]);
1296
+ }
1297
+ this.pushString();
1298
+ var c = [this.strings, this.nodes];
1299
+ return this.init(), c;
1300
+ }, e.OPTIONS = {
1301
+ skipHtmlTags: [
1302
+ "script",
1303
+ "noscript",
1304
+ "style",
1305
+ "textarea",
1306
+ "pre",
1307
+ "code",
1308
+ "annotation",
1309
+ "annotation-xml"
1310
+ ],
1311
+ includeHtmlTags: {
1312
+ br: "\n",
1313
+ wbr: "",
1314
+ "#comment": ""
1315
+ },
1316
+ ignoreHtmlClass: "mathjax_ignore",
1317
+ processHtmlClass: "mathjax_process"
1318
+ }, e;
1319
+ }();
1320
+ })), V = /* @__PURE__ */ e(((e) => {
1321
+ var n = e && e.__extends || (function() {
1322
+ var e = function(t, n) {
1323
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
1324
+ e.__proto__ = t;
1325
+ } || function(e, t) {
1326
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
1327
+ }, e(t, n);
1328
+ };
1329
+ return function(t, n) {
1330
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
1331
+ e(t, n);
1332
+ function r() {
1333
+ this.constructor = t;
1334
+ }
1335
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
1336
+ };
1337
+ })(), r = e && e.__assign || function() {
1338
+ return r = Object.assign || function(e) {
1339
+ for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
1340
+ return e;
1341
+ }, r.apply(this, arguments);
1342
+ }, i = e && e.__read || function(e, t) {
1343
+ var n = typeof Symbol == "function" && e[Symbol.iterator];
1344
+ if (!n) return e;
1345
+ var r = n.call(e), i, a = [], o;
1346
+ try {
1347
+ for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
1348
+ } catch (e) {
1349
+ o = { error: e };
1350
+ } finally {
1351
+ try {
1352
+ i && !i.done && (n = r.return) && n.call(r);
1353
+ } finally {
1354
+ if (o) throw o.error;
1355
+ }
1356
+ }
1357
+ return a;
1358
+ }, a = e && e.__values || function(e) {
1359
+ var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
1360
+ if (n) return n.call(e);
1361
+ if (e && typeof e.length == "number") return { next: function() {
1362
+ return e && r >= e.length && (e = void 0), {
1363
+ value: e && e[r++],
1364
+ done: !e
1365
+ };
1366
+ } };
1367
+ throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
1368
+ };
1369
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.HTMLDocument = void 0;
1370
+ var o = I(), s = t(), c = R(), l = z(), u = B(), d = k();
1371
+ e.HTMLDocument = function(e) {
1372
+ n(t, e);
1373
+ function t(t, n, r) {
1374
+ var a = this, o = i((0, s.separateOptions)(r, u.HTMLDomStrings.OPTIONS), 2), c = o[0], l = o[1];
1375
+ return a = e.call(this, t, n, c) || this, a.domStrings = a.options.DomStrings || new u.HTMLDomStrings(l), a.domStrings.adaptor = n, a.styles = [], a;
1376
+ }
1377
+ return t.prototype.findPosition = function(e, t, n, r) {
1378
+ var o, s, c = this.adaptor;
1379
+ try {
1380
+ for (var l = a(r[e]), u = l.next(); !u.done; u = l.next()) {
1381
+ var d = u.value, f = i(d, 2), p = f[0], m = f[1];
1382
+ if (t <= m && c.kind(p) === "#text") return {
1383
+ node: p,
1384
+ n: Math.max(t, 0),
1385
+ delim: n
1386
+ };
1387
+ t -= m;
1388
+ }
1389
+ } catch (e) {
1390
+ o = { error: e };
1391
+ } finally {
1392
+ try {
1393
+ u && !u.done && (s = l.return) && s.call(l);
1394
+ } finally {
1395
+ if (o) throw o.error;
1396
+ }
1397
+ }
1398
+ return {
1399
+ node: null,
1400
+ n: 0,
1401
+ delim: n
1402
+ };
1403
+ }, t.prototype.mathItem = function(e, t, n) {
1404
+ var r = e.math, i = this.findPosition(e.n, e.start.n, e.open, n), a = this.findPosition(e.n, e.end.n, e.close, n);
1405
+ return new this.options.MathItem(r, t, e.display, i, a);
1406
+ }, t.prototype.findMath = function(e) {
1407
+ var t, n, r, o, c, l, u, d, f;
1408
+ if (!this.processed.isSet("findMath")) {
1409
+ this.adaptor.document = this.document, e = (0, s.userOptions)({ elements: this.options.elements || [this.adaptor.body(this.document)] }, e);
1410
+ try {
1411
+ for (var p = a(this.adaptor.getElements(e.elements, this.document)), m = p.next(); !m.done; m = p.next()) {
1412
+ var h = m.value, g = i([null, null], 2), _ = g[0], v = g[1];
1413
+ try {
1414
+ for (var y = (r = void 0, a(this.inputJax)), b = y.next(); !b.done; b = y.next()) {
1415
+ var x = b.value, S = new this.options.MathList();
1416
+ if (x.processStrings) {
1417
+ _ === null && (c = i(this.domStrings.find(h), 2), _ = c[0], v = c[1]);
1418
+ try {
1419
+ for (var C = (l = void 0, a(x.findMath(_))), w = C.next(); !w.done; w = C.next()) {
1420
+ var T = w.value;
1421
+ S.push(this.mathItem(T, x, v));
1422
+ }
1423
+ } catch (e) {
1424
+ l = { error: e };
1425
+ } finally {
1426
+ try {
1427
+ w && !w.done && (u = C.return) && u.call(C);
1428
+ } finally {
1429
+ if (l) throw l.error;
1430
+ }
1431
+ }
1432
+ } else try {
1433
+ for (var E = (d = void 0, a(x.findMath(h))), D = E.next(); !D.done; D = E.next()) {
1434
+ var T = D.value, O = new this.options.MathItem(T.math, x, T.display, T.start, T.end);
1435
+ S.push(O);
1436
+ }
1437
+ } catch (e) {
1438
+ d = { error: e };
1439
+ } finally {
1440
+ try {
1441
+ D && !D.done && (f = E.return) && f.call(E);
1442
+ } finally {
1443
+ if (d) throw d.error;
1444
+ }
1445
+ }
1446
+ this.math.merge(S);
1447
+ }
1448
+ } catch (e) {
1449
+ r = { error: e };
1450
+ } finally {
1451
+ try {
1452
+ b && !b.done && (o = y.return) && o.call(y);
1453
+ } finally {
1454
+ if (r) throw r.error;
1455
+ }
1456
+ }
1457
+ }
1458
+ } catch (e) {
1459
+ t = { error: e };
1460
+ } finally {
1461
+ try {
1462
+ m && !m.done && (n = p.return) && n.call(p);
1463
+ } finally {
1464
+ if (t) throw t.error;
1465
+ }
1466
+ }
1467
+ this.processed.set("findMath");
1468
+ }
1469
+ return this;
1470
+ }, t.prototype.updateDocument = function() {
1471
+ return this.processed.isSet("updateDocument") || (this.addPageElements(), this.addStyleSheet(), e.prototype.updateDocument.call(this), this.processed.set("updateDocument")), this;
1472
+ }, t.prototype.addPageElements = function() {
1473
+ var e = this.adaptor.body(this.document), t = this.documentPageElements();
1474
+ t && this.adaptor.append(e, t);
1475
+ }, t.prototype.addStyleSheet = function() {
1476
+ var e = this.documentStyleSheet(), t = this.adaptor;
1477
+ if (e && !t.parent(e)) {
1478
+ var n = t.head(this.document), r = this.findSheet(n, t.getAttribute(e, "id"));
1479
+ r ? t.replace(e, r) : t.append(n, e);
1480
+ }
1481
+ }, t.prototype.findSheet = function(e, t) {
1482
+ var n, r;
1483
+ if (t) try {
1484
+ for (var i = a(this.adaptor.tags(e, "style")), o = i.next(); !o.done; o = i.next()) {
1485
+ var s = o.value;
1486
+ if (this.adaptor.getAttribute(s, "id") === t) return s;
1487
+ }
1488
+ } catch (e) {
1489
+ n = { error: e };
1490
+ } finally {
1491
+ try {
1492
+ o && !o.done && (r = i.return) && r.call(i);
1493
+ } finally {
1494
+ if (n) throw n.error;
1495
+ }
1496
+ }
1497
+ return null;
1498
+ }, t.prototype.removeFromDocument = function(e) {
1499
+ var t, n;
1500
+ if (e === void 0 && (e = !1), this.processed.isSet("updateDocument")) try {
1501
+ for (var r = a(this.math), i = r.next(); !i.done; i = r.next()) {
1502
+ var o = i.value;
1503
+ o.state() >= d.STATE.INSERTED && o.state(d.STATE.TYPESET, e);
1504
+ }
1505
+ } catch (e) {
1506
+ t = { error: e };
1507
+ } finally {
1508
+ try {
1509
+ i && !i.done && (n = r.return) && n.call(r);
1510
+ } finally {
1511
+ if (t) throw t.error;
1512
+ }
1513
+ }
1514
+ return this.processed.clear("updateDocument"), this;
1515
+ }, t.prototype.documentStyleSheet = function() {
1516
+ return this.outputJax.styleSheet(this);
1517
+ }, t.prototype.documentPageElements = function() {
1518
+ return this.outputJax.pageElements(this);
1519
+ }, t.prototype.addStyles = function(e) {
1520
+ this.styles.push(e);
1521
+ }, t.prototype.getStyles = function() {
1522
+ return this.styles;
1523
+ }, t.KIND = "HTML", t.OPTIONS = r(r({}, o.AbstractMathDocument.OPTIONS), {
1524
+ renderActions: (0, s.expandable)(r(r({}, o.AbstractMathDocument.OPTIONS.renderActions), { styles: [
1525
+ d.STATE.INSERTED + 1,
1526
+ "",
1527
+ "updateStyleSheet",
1528
+ !1
1529
+ ] })),
1530
+ MathList: l.HTMLMathList,
1531
+ MathItem: c.HTMLMathItem,
1532
+ DomStrings: null
1533
+ }), t;
1534
+ }(o.AbstractMathDocument);
1535
+ })), H = /* @__PURE__ */ e(((e) => {
1536
+ var t = e && e.__extends || (function() {
1537
+ var e = function(t, n) {
1538
+ return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
1539
+ e.__proto__ = t;
1540
+ } || function(e, t) {
1541
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
1542
+ }, e(t, n);
1543
+ };
1544
+ return function(t, n) {
1545
+ if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
1546
+ e(t, n);
1547
+ function r() {
1548
+ this.constructor = t;
1549
+ }
1550
+ t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
1551
+ };
1552
+ })();
1553
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.HTMLHandler = void 0;
1554
+ var n = L(), r = V();
1555
+ e.HTMLHandler = function(e) {
1556
+ t(n, e);
1557
+ function n() {
1558
+ var t = e !== null && e.apply(this, arguments) || this;
1559
+ return t.documentClass = r.HTMLDocument, t;
1560
+ }
1561
+ return n.prototype.handlesDocument = function(e) {
1562
+ var t = this.adaptor;
1563
+ if (typeof e == "string") try {
1564
+ e = t.parse(e, "text/html");
1565
+ } catch {}
1566
+ return e instanceof t.window.Document || e instanceof t.window.HTMLElement || e instanceof t.window.DocumentFragment;
1567
+ }, n.prototype.create = function(t, n) {
1568
+ var r = this.adaptor;
1569
+ if (typeof t == "string") t = r.parse(t, "text/html");
1570
+ else if (t instanceof r.window.HTMLElement || t instanceof r.window.DocumentFragment) {
1571
+ var i = t;
1572
+ t = r.parse("", "text/html"), r.append(r.body(t), i);
1573
+ }
1574
+ return e.prototype.create.call(this, t, n);
1575
+ }, n;
1576
+ }(n.AbstractHandler);
1577
+ })), U = /* @__PURE__ */ e(((e) => {
1578
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.RegisterHTMLHandler = void 0;
1579
+ var t = n(), r = H();
1580
+ function i(e) {
1581
+ var n = new r.HTMLHandler(e);
1582
+ return t.mathjax.handlers.register(n), n;
1583
+ }
1584
+ e.RegisterHTMLHandler = i;
1585
+ }));
1586
+ //#endregion
1587
+ export default U();