manim-web 0.3.22 → 0.3.24

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 (291) hide show
  1. package/dist/{svg-DNS5Hwhk.js → MathJaxBundle-xSidSV0E.js} +18687 -7373
  2. package/dist/animation/Animation.d.ts.map +1 -1
  3. package/dist/animation/AnimationGroup.d.ts.map +1 -1
  4. package/dist/animation/MasterTimeline.d.ts.map +1 -1
  5. package/dist/animation/Timeline.d.ts.map +1 -1
  6. package/dist/animation/changing/index.d.ts +2 -2
  7. package/dist/animation/changing/index.d.ts.map +1 -1
  8. package/dist/animation/creation/Create.d.ts.map +1 -1
  9. package/dist/animation/growing/index.d.ts +8 -5
  10. package/dist/animation/growing/index.d.ts.map +1 -1
  11. package/dist/animation/movement/Homotopy.d.ts +37 -7
  12. package/dist/animation/movement/Homotopy.d.ts.map +1 -1
  13. package/dist/animation/movement/MoveAlongPath.d.ts.map +1 -1
  14. package/dist/animation/speed/index.d.ts.map +1 -1
  15. package/dist/animation/transform/ApplyPointwiseFunction.d.ts.map +1 -1
  16. package/dist/animation/transform/ApplyPointwiseFunctionToCenter.d.ts.map +1 -1
  17. package/dist/animation/transform/ApplyTransforms.d.ts.map +1 -1
  18. package/dist/animation/transform/MorphStrategy.d.ts +23 -0
  19. package/dist/animation/transform/MorphStrategy.d.ts.map +1 -1
  20. package/dist/animation/transform/PointCloudMorphStrategy.d.ts +18 -0
  21. package/dist/animation/transform/PointCloudMorphStrategy.d.ts.map +1 -0
  22. package/dist/animation/transform/PointMorphStrategy.d.ts +26 -0
  23. package/dist/animation/transform/PointMorphStrategy.d.ts.map +1 -1
  24. package/dist/animation/transform/Transform.d.ts +2 -0
  25. package/dist/animation/transform/Transform.d.ts.map +1 -1
  26. package/dist/animation/transform/TransformMatching.d.ts.map +1 -1
  27. package/dist/animation/utility/index.d.ts +6 -2
  28. package/dist/animation/utility/index.d.ts.map +1 -1
  29. package/dist/core/Camera.d.ts +3 -0
  30. package/dist/core/Camera.d.ts.map +1 -1
  31. package/dist/core/Camera2DFrame.d.ts +1 -1
  32. package/dist/core/Camera2DFrame.d.ts.map +1 -1
  33. package/dist/core/CameraExtensions.d.ts.map +1 -1
  34. package/dist/core/CameraFrame.d.ts.map +1 -1
  35. package/dist/core/Group.d.ts +13 -33
  36. package/dist/core/Group.d.ts.map +1 -1
  37. package/dist/core/InteractiveScene.d.ts.map +1 -1
  38. package/dist/core/Lighting.d.ts.map +1 -1
  39. package/dist/core/Mobject.d.ts +230 -21
  40. package/dist/core/Mobject.d.ts.map +1 -1
  41. package/dist/core/MobjectPositioning.d.ts +1 -6
  42. package/dist/core/MobjectPositioning.d.ts.map +1 -1
  43. package/dist/core/MobjectState.d.ts.map +1 -1
  44. package/dist/core/MobjectTraversal.d.ts +3 -0
  45. package/dist/core/MobjectTraversal.d.ts.map +1 -1
  46. package/dist/core/MobjectTypes.d.ts +8 -0
  47. package/dist/core/MobjectTypes.d.ts.map +1 -1
  48. package/dist/core/PointBounds.d.ts +39 -0
  49. package/dist/core/PointBounds.d.ts.map +1 -0
  50. package/dist/core/Renderer.d.ts.map +1 -1
  51. package/dist/core/Scene.d.ts +36 -1
  52. package/dist/core/Scene.d.ts.map +1 -1
  53. package/dist/core/TexturedMobject.d.ts +12 -0
  54. package/dist/core/TexturedMobject.d.ts.map +1 -1
  55. package/dist/core/ThreeDScene.d.ts +33 -0
  56. package/dist/core/ThreeDScene.d.ts.map +1 -1
  57. package/dist/core/VDict.d.ts +1 -9
  58. package/dist/core/VDict.d.ts.map +1 -1
  59. package/dist/core/VGroup.d.ts +54 -30
  60. package/dist/core/VGroup.d.ts.map +1 -1
  61. package/dist/core/VMobject.d.ts +93 -32
  62. package/dist/core/VMobject.d.ts.map +1 -1
  63. package/dist/core/VMobjectCurveUtils.d.ts +1 -1
  64. package/dist/core/VMobjectCurveUtils.d.ts.map +1 -1
  65. package/dist/core/VMobjectGeometry.d.ts.map +1 -1
  66. package/dist/core/VMobjectStrokeGeometry.d.ts.map +1 -1
  67. package/dist/core/VMobjectTransformAlignment.d.ts.map +1 -1
  68. package/dist/core/ZoomedScene.d.ts +2 -1
  69. package/dist/core/ZoomedScene.d.ts.map +1 -1
  70. package/dist/export/GifExporter.d.ts.map +1 -1
  71. package/dist/export/VideoExporter.d.ts.map +1 -1
  72. package/dist/index.d.ts +2 -1
  73. package/dist/index.d.ts.map +1 -1
  74. package/dist/index.js +2 -2
  75. package/dist/integrations/react.js +16 -16
  76. package/dist/integrations/vue.js +15 -15
  77. package/dist/interaction/Draggable.d.ts +12 -0
  78. package/dist/interaction/Draggable.d.ts.map +1 -1
  79. package/dist/interaction/OrbitControls.d.ts.map +1 -1
  80. package/dist/manim-web.browser.js +15620 -10180
  81. package/dist/mobjects/fractals/MandelbrotSet.d.ts +2 -1
  82. package/dist/mobjects/fractals/MandelbrotSet.d.ts.map +1 -1
  83. package/dist/mobjects/fractals/NewtonFractal.d.ts +2 -1
  84. package/dist/mobjects/fractals/NewtonFractal.d.ts.map +1 -1
  85. package/dist/mobjects/frame/index.d.ts +3 -12
  86. package/dist/mobjects/frame/index.d.ts.map +1 -1
  87. package/dist/mobjects/geometry/AngleShapes.d.ts +4 -4
  88. package/dist/mobjects/geometry/AngleShapes.d.ts.map +1 -1
  89. package/dist/mobjects/geometry/AnnularSector.d.ts +4 -74
  90. package/dist/mobjects/geometry/AnnularSector.d.ts.map +1 -1
  91. package/dist/mobjects/geometry/Annulus.d.ts +1 -62
  92. package/dist/mobjects/geometry/Annulus.d.ts.map +1 -1
  93. package/dist/mobjects/geometry/Arc.d.ts +3 -1
  94. package/dist/mobjects/geometry/Arc.d.ts.map +1 -1
  95. package/dist/mobjects/geometry/ArcBetweenPoints.d.ts +1 -1
  96. package/dist/mobjects/geometry/ArcBetweenPoints.d.ts.map +1 -1
  97. package/dist/mobjects/geometry/ArcPolygon.d.ts +1 -1
  98. package/dist/mobjects/geometry/ArcPolygon.d.ts.map +1 -1
  99. package/dist/mobjects/geometry/Arrow.d.ts +130 -23
  100. package/dist/mobjects/geometry/Arrow.d.ts.map +1 -1
  101. package/dist/mobjects/geometry/ArrowTips.d.ts +7 -7
  102. package/dist/mobjects/geometry/ArrowTips.d.ts.map +1 -1
  103. package/dist/mobjects/geometry/BooleanOperations.d.ts.map +1 -1
  104. package/dist/mobjects/geometry/Circle.d.ts +20 -23
  105. package/dist/mobjects/geometry/Circle.d.ts.map +1 -1
  106. package/dist/mobjects/geometry/CubicBezier.d.ts +1 -1
  107. package/dist/mobjects/geometry/CubicBezier.d.ts.map +1 -1
  108. package/dist/mobjects/geometry/CurvedArrow.d.ts +1 -1
  109. package/dist/mobjects/geometry/CurvedArrow.d.ts.map +1 -1
  110. package/dist/mobjects/geometry/CurvedDoubleArrow.d.ts +1 -1
  111. package/dist/mobjects/geometry/CurvedDoubleArrow.d.ts.map +1 -1
  112. package/dist/mobjects/geometry/DashedLine.d.ts +3 -2
  113. package/dist/mobjects/geometry/DashedLine.d.ts.map +1 -1
  114. package/dist/mobjects/geometry/DashedVMobject.d.ts +3 -2
  115. package/dist/mobjects/geometry/DashedVMobject.d.ts.map +1 -1
  116. package/dist/mobjects/geometry/Dot.d.ts +4 -15
  117. package/dist/mobjects/geometry/Dot.d.ts.map +1 -1
  118. package/dist/mobjects/geometry/Ellipse.d.ts +3 -47
  119. package/dist/mobjects/geometry/Ellipse.d.ts.map +1 -1
  120. package/dist/mobjects/geometry/LabeledGeometry.d.ts +5 -5
  121. package/dist/mobjects/geometry/LabeledGeometry.d.ts.map +1 -1
  122. package/dist/mobjects/geometry/Line.d.ts +15 -9
  123. package/dist/mobjects/geometry/Line.d.ts.map +1 -1
  124. package/dist/mobjects/geometry/Polygon.d.ts +1 -1
  125. package/dist/mobjects/geometry/Polygon.d.ts.map +1 -1
  126. package/dist/mobjects/geometry/PolygonExtensions.d.ts +11 -67
  127. package/dist/mobjects/geometry/PolygonExtensions.d.ts.map +1 -1
  128. package/dist/mobjects/geometry/Polygram.d.ts +1 -1
  129. package/dist/mobjects/geometry/Polygram.d.ts.map +1 -1
  130. package/dist/mobjects/geometry/Rectangle.d.ts +4 -5
  131. package/dist/mobjects/geometry/Rectangle.d.ts.map +1 -1
  132. package/dist/mobjects/geometry/Sector.d.ts +5 -69
  133. package/dist/mobjects/geometry/Sector.d.ts.map +1 -1
  134. package/dist/mobjects/geometry/ShapeMatchers.d.ts +6 -5
  135. package/dist/mobjects/geometry/ShapeMatchers.d.ts.map +1 -1
  136. package/dist/mobjects/geometry/TangentialArc.d.ts +1 -1
  137. package/dist/mobjects/geometry/TangentialArc.d.ts.map +1 -1
  138. package/dist/mobjects/geometry/segment.d.ts +24 -0
  139. package/dist/mobjects/geometry/segment.d.ts.map +1 -0
  140. package/dist/mobjects/graph/DiGraph.d.ts +1 -4
  141. package/dist/mobjects/graph/DiGraph.d.ts.map +1 -1
  142. package/dist/mobjects/graph/GenericGraph.d.ts +2 -1
  143. package/dist/mobjects/graph/GenericGraph.d.ts.map +1 -1
  144. package/dist/mobjects/graph/Graph.d.ts +1 -4
  145. package/dist/mobjects/graph/Graph.d.ts.map +1 -1
  146. package/dist/mobjects/graph/layoutAlgorithms.d.ts.map +1 -1
  147. package/dist/mobjects/graphing/Axes.d.ts +1 -4
  148. package/dist/mobjects/graphing/Axes.d.ts.map +1 -1
  149. package/dist/mobjects/graphing/BarChart.d.ts +1 -4
  150. package/dist/mobjects/graphing/BarChart.d.ts.map +1 -1
  151. package/dist/mobjects/graphing/ComplexPlane.d.ts +2 -8
  152. package/dist/mobjects/graphing/ComplexPlane.d.ts.map +1 -1
  153. package/dist/mobjects/graphing/FunctionGraph.d.ts +1 -4
  154. package/dist/mobjects/graphing/FunctionGraph.d.ts.map +1 -1
  155. package/dist/mobjects/graphing/ImplicitFunction.d.ts +1 -4
  156. package/dist/mobjects/graphing/ImplicitFunction.d.ts.map +1 -1
  157. package/dist/mobjects/graphing/NumberLine.d.ts +2 -8
  158. package/dist/mobjects/graphing/NumberLine.d.ts.map +1 -1
  159. package/dist/mobjects/graphing/NumberPlane.d.ts +1 -4
  160. package/dist/mobjects/graphing/NumberPlane.d.ts.map +1 -1
  161. package/dist/mobjects/graphing/ParametricFunction.d.ts +1 -4
  162. package/dist/mobjects/graphing/ParametricFunction.d.ts.map +1 -1
  163. package/dist/mobjects/graphing/Vector.d.ts +1 -4
  164. package/dist/mobjects/graphing/Vector.d.ts.map +1 -1
  165. package/dist/mobjects/graphing/VectorField.d.ts +3 -12
  166. package/dist/mobjects/graphing/VectorField.d.ts.map +1 -1
  167. package/dist/mobjects/image/index.d.ts +6 -4
  168. package/dist/mobjects/image/index.d.ts.map +1 -1
  169. package/dist/mobjects/matrix/Matrix.d.ts +4 -16
  170. package/dist/mobjects/matrix/Matrix.d.ts.map +1 -1
  171. package/dist/mobjects/point/Mobject1D.d.ts +1 -4
  172. package/dist/mobjects/point/Mobject1D.d.ts.map +1 -1
  173. package/dist/mobjects/point/Mobject2D.d.ts +1 -1
  174. package/dist/mobjects/point/Mobject2D.d.ts.map +1 -1
  175. package/dist/mobjects/point/PGroup.d.ts +2 -4
  176. package/dist/mobjects/point/PGroup.d.ts.map +1 -1
  177. package/dist/mobjects/point/PMobject.d.ts +45 -15
  178. package/dist/mobjects/point/PMobject.d.ts.map +1 -1
  179. package/dist/mobjects/point/PointCloudDot.d.ts +1 -4
  180. package/dist/mobjects/point/PointCloudDot.d.ts.map +1 -1
  181. package/dist/mobjects/point/PointMobject.d.ts +13 -17
  182. package/dist/mobjects/point/PointMobject.d.ts.map +1 -1
  183. package/dist/mobjects/probability/DiceFace.d.ts +1 -5
  184. package/dist/mobjects/probability/DiceFace.d.ts.map +1 -1
  185. package/dist/mobjects/probability/SampleSpace.d.ts +1 -5
  186. package/dist/mobjects/probability/SampleSpace.d.ts.map +1 -1
  187. package/dist/mobjects/svg/Brace.d.ts +5 -20
  188. package/dist/mobjects/svg/Brace.d.ts.map +1 -1
  189. package/dist/mobjects/svg/SVGMobject.d.ts +2 -2
  190. package/dist/mobjects/svg/SVGMobject.d.ts.map +1 -1
  191. package/dist/mobjects/table/Table.d.ts +1 -5
  192. package/dist/mobjects/table/Table.d.ts.map +1 -1
  193. package/dist/mobjects/text/Code.d.ts +1 -4
  194. package/dist/mobjects/text/Code.d.ts.map +1 -1
  195. package/dist/mobjects/text/CodeHighlighting.d.ts.map +1 -1
  196. package/dist/mobjects/text/CodeLanguageData.d.ts.map +1 -1
  197. package/dist/mobjects/text/DecimalNumber.d.ts +2 -8
  198. package/dist/mobjects/text/DecimalNumber.d.ts.map +1 -1
  199. package/dist/mobjects/text/GlyphVMobject.d.ts +1 -1
  200. package/dist/mobjects/text/GlyphVMobject.d.ts.map +1 -1
  201. package/dist/mobjects/text/MarkupText.d.ts +1 -1
  202. package/dist/mobjects/text/MarkupText.d.ts.map +1 -1
  203. package/dist/mobjects/text/MathJaxBundle.d.ts +7 -0
  204. package/dist/mobjects/text/MathJaxBundle.d.ts.map +1 -0
  205. package/dist/mobjects/text/MathJaxRenderer.d.ts +9 -0
  206. package/dist/mobjects/text/MathJaxRenderer.d.ts.map +1 -1
  207. package/dist/mobjects/text/MathTex.d.ts +8 -4
  208. package/dist/mobjects/text/MathTex.d.ts.map +1 -1
  209. package/dist/mobjects/text/MathTexImage.d.ts +19 -4
  210. package/dist/mobjects/text/MathTexImage.d.ts.map +1 -1
  211. package/dist/mobjects/text/Paragraph.d.ts +1 -1
  212. package/dist/mobjects/text/Paragraph.d.ts.map +1 -1
  213. package/dist/mobjects/text/Tex.d.ts +2 -5
  214. package/dist/mobjects/text/Tex.d.ts.map +1 -1
  215. package/dist/mobjects/text/Text.d.ts +17 -1
  216. package/dist/mobjects/text/Text.d.ts.map +1 -1
  217. package/dist/mobjects/text/TextExtensions.d.ts +3 -12
  218. package/dist/mobjects/text/TextExtensions.d.ts.map +1 -1
  219. package/dist/mobjects/text/Variable.d.ts +2 -4
  220. package/dist/mobjects/text/Variable.d.ts.map +1 -1
  221. package/dist/mobjects/text/katexStyles.d.ts.map +1 -1
  222. package/dist/mobjects/text/svgPathParser.d.ts.map +1 -1
  223. package/dist/mobjects/three-d/Arrow3D.d.ts +4 -3
  224. package/dist/mobjects/three-d/Arrow3D.d.ts.map +1 -1
  225. package/dist/mobjects/three-d/ConvexHull3D.d.ts +4 -3
  226. package/dist/mobjects/three-d/ConvexHull3D.d.ts.map +1 -1
  227. package/dist/mobjects/three-d/Cube.d.ts +6 -11
  228. package/dist/mobjects/three-d/Cube.d.ts.map +1 -1
  229. package/dist/mobjects/three-d/Cylinder.d.ts +5 -10
  230. package/dist/mobjects/three-d/Cylinder.d.ts.map +1 -1
  231. package/dist/mobjects/three-d/Line3D.d.ts +4 -3
  232. package/dist/mobjects/three-d/Line3D.d.ts.map +1 -1
  233. package/dist/mobjects/three-d/Mobject3D.d.ts +19 -0
  234. package/dist/mobjects/three-d/Mobject3D.d.ts.map +1 -0
  235. package/dist/mobjects/three-d/ParametricSurface.d.ts +1 -1
  236. package/dist/mobjects/three-d/ParametricSurface.d.ts.map +1 -1
  237. package/dist/mobjects/three-d/Polyhedra.d.ts +7 -6
  238. package/dist/mobjects/three-d/Polyhedra.d.ts.map +1 -1
  239. package/dist/mobjects/three-d/Sphere.d.ts +4 -6
  240. package/dist/mobjects/three-d/Sphere.d.ts.map +1 -1
  241. package/dist/mobjects/three-d/Surface3D.d.ts +41 -4
  242. package/dist/mobjects/three-d/Surface3D.d.ts.map +1 -1
  243. package/dist/mobjects/three-d/TexturedSurface.d.ts +4 -3
  244. package/dist/mobjects/three-d/TexturedSurface.d.ts.map +1 -1
  245. package/dist/mobjects/three-d/ThreeDAxes.d.ts +1 -1
  246. package/dist/mobjects/three-d/ThreeDAxes.d.ts.map +1 -1
  247. package/dist/mobjects/three-d/ThreeDExtensions.d.ts +7 -15
  248. package/dist/mobjects/three-d/ThreeDExtensions.d.ts.map +1 -1
  249. package/dist/mobjects/three-d/Torus.d.ts +4 -6
  250. package/dist/mobjects/three-d/Torus.d.ts.map +1 -1
  251. package/dist/mobjects/three-d/index.d.ts +1 -0
  252. package/dist/mobjects/three-d/index.d.ts.map +1 -1
  253. package/dist/mobjects/value-tracker/ValueTracker.d.ts +4 -2
  254. package/dist/mobjects/value-tracker/ValueTracker.d.ts.map +1 -1
  255. package/dist/player/Player.d.ts.map +1 -1
  256. package/dist/player/PlayerUI.d.ts.map +1 -1
  257. package/dist/{src-BlTk3Bta.js → src-Cc3xTIkV.js} +5888 -5309
  258. package/dist/utils/logger.d.ts.map +1 -1
  259. package/package.json +8 -5
  260. package/dist/AmsConfiguration-OUoC_kJ0.js +0 -847
  261. package/dist/AmsConfiguration-tdje_HlF.js +0 -847
  262. package/dist/ConfigMacrosConfiguration-4OaQYvlr.js +0 -46
  263. package/dist/ConfigMacrosConfiguration-DM3-S5M8.js +0 -46
  264. package/dist/Entities-Dw6381dl.js +0 -429
  265. package/dist/Entities-bJKKDYjE.js +0 -429
  266. package/dist/Factory-Ba6Nqb3M.js +0 -107
  267. package/dist/HtmlNode-1mFtYQ9G.js +0 -981
  268. package/dist/HtmlNode-CQqo5we-.js +0 -981
  269. package/dist/InputJax-D5R2pqUk.js +0 -41
  270. package/dist/InputJax-jNvwWU5P.js +0 -41
  271. package/dist/NewcommandConfiguration-BN_OlLcO.js +0 -32
  272. package/dist/NewcommandConfiguration-DZ3mSCpD.js +0 -32
  273. package/dist/NewcommandMethods-D5bueYYE.js +0 -187
  274. package/dist/NewcommandMethods-DTf_dan5.js +0 -187
  275. package/dist/Options-DMK2wYar.js +0 -63
  276. package/dist/ParseMethods-Deqa7kJ6.js +0 -2636
  277. package/dist/ParseMethods-Dt5bYDSZ.js +0 -2636
  278. package/dist/Styles-BILrGVps.js +0 -293
  279. package/dist/Styles-DQSruwWe.js +0 -293
  280. package/dist/html-Bza5WY1y.js +0 -829
  281. package/dist/html-bhzMuE8p.js +0 -829
  282. package/dist/lengths-D2zTYMUu.js +0 -54
  283. package/dist/liteAdaptor-BkxB5CGC.js +0 -616
  284. package/dist/liteAdaptor-LMKuWwg1.js +0 -616
  285. package/dist/mathjax-CPQWkQEv.js +0 -121
  286. package/dist/mathjax-b-GTdZgw.js +0 -121
  287. package/dist/mo-D4wFHS6V.js +0 -2675
  288. package/dist/mo-hAX79Dzl.js +0 -2675
  289. package/dist/svg-DVUoAdmC.js +0 -28713
  290. package/dist/tex-BQCLd0dF.js +0 -1427
  291. package/dist/tex-Cd_bTYKG.js +0 -1427
@@ -1,829 +0,0 @@
1
- import { a as e, i as t, n, o as r, t as i } from "./Options-DMK2wYar.js";
2
- import { i as a, o, t as s } from "./mathjax-CPQWkQEv.js";
3
- import { _ as c, b as l, f as u, p as d, t as f, u as p, v as m } from "./mo-hAX79Dzl.js";
4
- import { t as ee } from "./InputJax-D5R2pqUk.js";
5
- import { A as te, C as ne, D as re, E as ie, F as ae, I as oe, L as se, M as ce, N as le, O as ue, P as de, S as h, T as g, _, a as v, b as y, c as b, d as x, f as S, g as C, h as w, i as T, j as E, k as D, l as O, m as k, n as A, o as j, p as M, r as N, s as P, t as F, u as I, v as L, w as R, x as z, y as B } from "./HtmlNode-CQqo5we-.js";
6
- import { i as fe, n as V, r as H, t as pe } from "./Factory-Ba6Nqb3M.js";
7
- //#region node_modules/@mathjax/src/mjs/util/LinkedList.js
8
- var U = Symbol(), W = class {
9
- constructor(e = null) {
10
- this.next = null, this.prev = null, this.data = e;
11
- }
12
- }, me = class e {
13
- constructor(...e) {
14
- this.list = new W(U), this.list.next = this.list.prev = this.list, this.push(...e);
15
- }
16
- isBefore(e, t) {
17
- return e < t;
18
- }
19
- push(...e) {
20
- for (let t of e) {
21
- let e = new W(t);
22
- e.next = this.list, e.prev = this.list.prev, this.list.prev = e, e.prev.next = e;
23
- }
24
- return this;
25
- }
26
- pop() {
27
- let e = this.list.prev;
28
- return e.data === U ? null : (this.list.prev = e.prev, e.prev.next = this.list, e.next = e.prev = null, e.data);
29
- }
30
- unshift(...e) {
31
- for (let t of e.slice(0).reverse()) {
32
- let e = new W(t);
33
- e.next = this.list.next, e.prev = this.list, this.list.next = e, e.next.prev = e;
34
- }
35
- return this;
36
- }
37
- shift() {
38
- let e = this.list.next;
39
- return e.data === U ? null : (this.list.next = e.next, e.next.prev = this.list, e.next = e.prev = null, e.data);
40
- }
41
- remove(...e) {
42
- let t = /* @__PURE__ */ new Map();
43
- for (let n of e) t.set(n, !0);
44
- let n = this.list.next;
45
- for (; n.data !== U;) {
46
- let e = n.next;
47
- t.has(n.data) && (n.prev.next = n.next, n.next.prev = n.prev, n.next = n.prev = null), n = e;
48
- }
49
- return this;
50
- }
51
- clear() {
52
- return this.list.next.prev = this.list.prev.next = null, this.list.next = this.list.prev = this.list, this;
53
- }
54
- *[Symbol.iterator]() {
55
- let e = this.list.next;
56
- for (; e.data !== U;) yield e.data, e = e.next;
57
- }
58
- *reversed() {
59
- let e = this.list.prev;
60
- for (; e.data !== U;) yield e.data, e = e.prev;
61
- }
62
- insert(e, t = null) {
63
- t === null && (t = this.isBefore.bind(this));
64
- let n = new W(e), r = this.list.next;
65
- for (; r.data !== U && t(r.data, n.data);) r = r.next;
66
- return n.prev = r.prev, n.next = r, r.prev.next = r.prev = n, this;
67
- }
68
- sort(t = null) {
69
- t === null && (t = this.isBefore.bind(this));
70
- let n = [];
71
- for (let t of this) n.push(new e(t));
72
- for (this.list.next = this.list.prev = this.list; n.length > 1;) {
73
- let e = n.shift(), r = n.shift();
74
- e.merge(r, t), n.push(e);
75
- }
76
- return n.length && (this.list = n[0].list), this;
77
- }
78
- merge(e, t = null) {
79
- t === null && (t = this.isBefore.bind(this));
80
- let n = this.list.next, r = e.list.next;
81
- for (; n.data !== U && r.data !== U;) t(r.data, n.data) ? ([r.prev.next, n.prev.next] = [n, r], [r.prev, n.prev] = [n.prev, r.prev], [this.list.prev.next, e.list.prev.next] = [e.list, this.list], [this.list.prev, e.list.prev] = [e.list.prev, this.list.prev], [n, r] = [r.next, n]) : n = n.next;
82
- return r.data !== U && (this.list.prev.next = e.list.next, e.list.next.prev = this.list.prev, e.list.prev.next = this.list, this.list.prev = e.list.prev, e.list.next = e.list.prev = e.list), this;
83
- }
84
- }, he = class extends me {
85
- isBefore(e, t) {
86
- return e.start.i < t.start.i || e.start.i === t.start.i && e.start.n < t.start.n;
87
- }
88
- }, ge = class extends pe {
89
- create(e, t = {}, n = []) {
90
- return this.node[e](t, n);
91
- }
92
- }, G = class extends u {
93
- get kind() {
94
- return "mstyle";
95
- }
96
- get notParent() {
97
- return this.childNodes[0] && this.childNodes[0].childNodes.length === 1;
98
- }
99
- setInheritedAttributes(e = {}, t = !1, n = 0, r = !1) {
100
- this.attributes.setInherited("displaystyle", t), this.attributes.setInherited("scriptlevel", n), super.setInheritedAttributes(e, t, n, r);
101
- }
102
- setChildInheritedAttributes(e, t, n, r) {
103
- let i = this.attributes.getExplicit("scriptlevel");
104
- i != null && (i = i.toString(), i.match(/^\s*[-+]/) ? n += parseInt(i) : n = parseInt(i), r = !1);
105
- let a = this.attributes.getExplicit("displaystyle");
106
- a != null && (t = a === !0, r = !1);
107
- let o = this.attributes.getExplicit("data-cramped");
108
- o != null && (r = o), e = this.addInheritedAttributes(e, this.attributes.getAllAttributes()), this.childNodes[0].setInheritedAttributes(e, t, n, r);
109
- }
110
- };
111
- G.defaults = Object.assign(Object.assign({}, u.defaults), {
112
- scriptlevel: l,
113
- displaystyle: l,
114
- scriptsizemultiplier: 1 / Math.sqrt(2),
115
- scriptminsize: ".4em",
116
- mathbackground: l,
117
- mathcolor: l,
118
- dir: l,
119
- infixlinebreakstyle: "before"
120
- });
121
- //#endregion
122
- //#region node_modules/@mathjax/src/mjs/core/MmlTree/MmlNodes/maligngroup.js
123
- var K = class extends u {
124
- get kind() {
125
- return "maligngroup";
126
- }
127
- get isSpacelike() {
128
- return !0;
129
- }
130
- setChildInheritedAttributes(e, t, n, r) {
131
- e = this.addInheritedAttributes(e, this.attributes.getAllAttributes()), super.setChildInheritedAttributes(e, t, n, r);
132
- }
133
- };
134
- K.defaults = Object.assign(Object.assign({}, u.defaults), { groupalign: l });
135
- //#endregion
136
- //#region node_modules/@mathjax/src/mjs/core/MmlTree/MmlNodes/malignmark.js
137
- var q = class extends d {
138
- get kind() {
139
- return "malignmark";
140
- }
141
- get arity() {
142
- return 0;
143
- }
144
- get isSpacelike() {
145
- return !0;
146
- }
147
- };
148
- q.defaults = Object.assign(Object.assign({}, d.defaults), { edge: "left" });
149
- //#endregion
150
- //#region node_modules/@mathjax/src/mjs/core/MmlTree/MmlNodes/mathchoice.js
151
- var J = class extends p {
152
- get kind() {
153
- return "MathChoice";
154
- }
155
- get arity() {
156
- return 4;
157
- }
158
- get notParent() {
159
- return !0;
160
- }
161
- setInheritedAttributes(e, t, n, r) {
162
- let i = t ? 0 : Math.max(0, Math.min(n, 2)) + 1, a = this.childNodes[i] || this.factory.create("mrow");
163
- this.parent.replaceChild(a, this), a.setInheritedAttributes(e, t, n, r);
164
- }
165
- };
166
- J.defaults = Object.assign({}, p.defaults);
167
- //#endregion
168
- //#region node_modules/@mathjax/src/mjs/core/MmlTree/MML.js
169
- var _e = {
170
- [oe.prototype.kind]: oe,
171
- [ae.prototype.kind]: ae,
172
- [de.prototype.kind]: de,
173
- [f.prototype.kind]: f,
174
- [le.prototype.kind]: le,
175
- [ce.prototype.kind]: ce,
176
- [E.prototype.kind]: E,
177
- [te.prototype.kind]: te,
178
- [D.prototype.kind]: D,
179
- [ue.prototype.kind]: ue,
180
- [re.prototype.kind]: re,
181
- [ie.prototype.kind]: ie,
182
- [G.prototype.kind]: G,
183
- [g.prototype.kind]: g,
184
- [R.prototype.kind]: R,
185
- [ne.prototype.kind]: ne,
186
- [h.prototype.kind]: h,
187
- [z.prototype.kind]: z,
188
- [y.prototype.kind]: y,
189
- [_.prototype.kind]: _,
190
- [B.prototype.kind]: B,
191
- [L.prototype.kind]: L,
192
- [w.prototype.kind]: w,
193
- [k.prototype.kind]: k,
194
- [C.prototype.kind]: C,
195
- [x.prototype.kind]: x,
196
- [S.prototype.kind]: S,
197
- [M.prototype.kind]: M,
198
- [I.prototype.kind]: I,
199
- [b.prototype.kind]: b,
200
- [O.prototype.kind]: O,
201
- [P.prototype.kind]: P,
202
- [K.prototype.kind]: K,
203
- [q.prototype.kind]: q,
204
- [j.prototype.kind]: j,
205
- [v.prototype.kind]: v,
206
- [N.prototype.kind]: N,
207
- [T.prototype.kind]: T,
208
- [A.prototype.kind]: A,
209
- [J.prototype.kind]: J,
210
- [c.prototype.kind]: c,
211
- [m.prototype.kind]: m,
212
- [F.prototype.kind]: F
213
- }, ve = class extends ge {
214
- get MML() {
215
- return this.node;
216
- }
217
- };
218
- ve.defaultNodes = _e;
219
- //#endregion
220
- //#region node_modules/@mathjax/src/mjs/util/BitField.js
221
- var Y = class e {
222
- constructor() {
223
- this.bits = 0;
224
- }
225
- static allocate(...t) {
226
- for (let n of t) {
227
- if (this.has(n)) throw Error("Bit already allocated for " + n);
228
- if (this.next === e.MAXBIT) throw Error("Maximum number of bits already allocated");
229
- this.names.set(n, this.next), this.next <<= 1;
230
- }
231
- }
232
- static has(e) {
233
- return this.names.has(e);
234
- }
235
- set(e) {
236
- this.bits |= this.getBit(e);
237
- }
238
- clear(e) {
239
- this.bits &= ~this.getBit(e);
240
- }
241
- isSet(e) {
242
- return !!(this.bits & this.getBit(e));
243
- }
244
- reset() {
245
- this.bits = 0;
246
- }
247
- getBit(e) {
248
- let t = this.constructor.names.get(e);
249
- if (!t) throw Error("Unknown bit-field name: " + e);
250
- return t;
251
- }
252
- };
253
- Y.MAXBIT = 1 << 31, Y.next = 1, Y.names = /* @__PURE__ */ new Map();
254
- function ye(...e) {
255
- let t = class extends Y {};
256
- return t.allocate(...e), t;
257
- }
258
- //#endregion
259
- //#region node_modules/@mathjax/src/mjs/core/MathDocument.js
260
- var X = function(e, t, n, r) {
261
- function i(e) {
262
- return e instanceof n ? e : new n(function(t) {
263
- t(e);
264
- });
265
- }
266
- return new (n ||= Promise)(function(n, a) {
267
- function o(e) {
268
- try {
269
- c(r.next(e));
270
- } catch (e) {
271
- a(e);
272
- }
273
- }
274
- function s(e) {
275
- try {
276
- c(r.throw(e));
277
- } catch (e) {
278
- a(e);
279
- }
280
- }
281
- function c(e) {
282
- e.done ? n(e.value) : i(e.value).then(o, s);
283
- }
284
- c((r = r.apply(e, t || [])).next());
285
- });
286
- }, be = class extends o {
287
- static create(e) {
288
- let t = new this();
289
- for (let n of Object.keys(e)) {
290
- let [r, i] = this.action(n, e[n]);
291
- i && t.add(r, i);
292
- }
293
- return t;
294
- }
295
- static action(e, t) {
296
- let n, r, i = !0, a = t[0];
297
- if (t.length === 1 || typeof t[1] == "boolean") t.length === 2 && (i = t[1]), [n, r] = this.methodActions(e);
298
- else if (typeof t[1] == "string") if (typeof t[2] == "string") {
299
- t.length === 4 && (i = t[3]);
300
- let [e, a] = t.slice(1);
301
- [n, r] = this.methodActions(e, a);
302
- } else t.length === 3 && (i = t[2]), [n, r] = this.methodActions(t[1]);
303
- else t.length === 4 && (i = t[3]), [n, r] = t.slice(1);
304
- return [{
305
- id: e,
306
- renderDoc: n,
307
- renderMath: r,
308
- convert: i
309
- }, a];
310
- }
311
- static methodActions(e, t = e) {
312
- return [(t) => (e && t[e](), !1), (e, n) => (t && e[t](n), !1)];
313
- }
314
- renderDoc(e, t = H.UNPROCESSED) {
315
- for (let n of this.items) if (n.priority >= t && n.item.renderDoc(e)) return;
316
- }
317
- renderMath(e, t, n = H.UNPROCESSED) {
318
- for (let r of this.items) if (r.priority >= n && r.item.renderMath(e, t)) return;
319
- }
320
- renderConvert(e, t, n = H.LAST) {
321
- for (let r of this.items) if (r.priority > n || r.item.convert && r.item.renderMath(e, t)) return;
322
- }
323
- findID(e) {
324
- for (let t of this.items) if (t.item.id === e) return t.item;
325
- return null;
326
- }
327
- }, xe = {
328
- all: !1,
329
- processed: !1,
330
- inputJax: null,
331
- outputJax: null
332
- }, Se = {
333
- all: !0,
334
- processed: !0,
335
- inputJax: [],
336
- outputJax: []
337
- }, Ce = class extends ee {
338
- compile(e) {
339
- return null;
340
- }
341
- }, we = class extends se {
342
- typeset(e, t = null) {
343
- return null;
344
- }
345
- escaped(e, t) {
346
- return null;
347
- }
348
- }, Te = class extends he {}, Ee = class extends V {}, Z = class e {
349
- constructor(t, n, a) {
350
- let o = this.constructor;
351
- this.document = t, this.options = r(i({}, o.OPTIONS), a), this.math = new (this.options.MathList || Te)(), this.renderActions = be.create(this.options.renderActions), this._actionPromises = [], this._readyPromise = Promise.resolve(), this.processed = new e.ProcessBits(), this.outputJax = this.options.OutputJax || new we();
352
- let s = this.options.InputJax || [new Ce()];
353
- Array.isArray(s) || (s = [s]), this.inputJax = s, this.adaptor = n, this.outputJax.setAdaptor(n), this.inputJax.map((e) => e.setAdaptor(n)), this.mmlFactory = this.options.MmlFactory || new ve(), this.inputJax.map((e) => e.setMmlFactory(this.mmlFactory)), this.outputJax.initialize(), this.inputJax.map((e) => e.initialize());
354
- }
355
- get kind() {
356
- return this.constructor.KIND;
357
- }
358
- addRenderAction(e, ...t) {
359
- let [n, r] = be.action(e, t);
360
- this.renderActions.add(n, r);
361
- }
362
- removeRenderAction(e) {
363
- let t = this.renderActions.findID(e);
364
- t && this.renderActions.remove(t);
365
- }
366
- render() {
367
- return this.clearPromises(), this.renderActions.renderDoc(this), this;
368
- }
369
- renderPromise() {
370
- return this.whenReady(() => a(() => X(this, void 0, void 0, function* () {
371
- return this.render(), yield this.actionPromises(), this.clearPromises(), this;
372
- })));
373
- }
374
- rerender(e = H.RERENDER) {
375
- return this.state(e - 1), this.render(), this;
376
- }
377
- rerenderPromise(e = H.RERENDER) {
378
- return this.whenReady(() => a(() => X(this, void 0, void 0, function* () {
379
- return this.rerender(e), yield this.actionPromises(), this.clearPromises(), this;
380
- })));
381
- }
382
- convert(e, t = {}) {
383
- let { format: n, display: i, end: a, ex: o, em: s, containerWidth: c, scale: l, family: u } = r({
384
- format: this.inputJax[0].name,
385
- display: !0,
386
- end: H.LAST,
387
- em: 16,
388
- ex: 8,
389
- containerWidth: null,
390
- scale: 1,
391
- family: ""
392
- }, t);
393
- c === null && (c = 80 * o);
394
- let d = this.inputJax.reduce((e, t) => t.name === n ? t : e, null), f = new this.options.MathItem(e, d, i);
395
- return f.start.node = this.adaptor.body(this.document), f.setMetrics(s, o, c, l), u && this.outputJax.options.mtextInheritFont && (f.outputData.mtextFamily = u), u && this.outputJax.options.merrorInheritFont && (f.outputData.merrorFamily = u), this.clearPromises(), f.convert(this, a), f.typesetRoot || f.root;
396
- }
397
- convertPromise(e, t = {}) {
398
- return this.whenReady(() => a(() => X(this, void 0, void 0, function* () {
399
- let n = this.convert(e, t);
400
- return yield this.actionPromises(), this.clearPromises(), n;
401
- })));
402
- }
403
- whenReady(e) {
404
- return this._readyPromise = this._readyPromise.catch((e) => {}).then(() => {
405
- let t = this._readyPromise;
406
- this._readyPromise = Promise.resolve();
407
- let n = e(), r = this._readyPromise.then(() => n);
408
- return this._readyPromise = t, r;
409
- });
410
- }
411
- actionPromises() {
412
- return Promise.all(this._actionPromises);
413
- }
414
- clearPromises() {
415
- this._actionPromises = [];
416
- }
417
- savePromise(e) {
418
- this._actionPromises.push(e);
419
- }
420
- findMath(e = null) {
421
- return this.processed.set("findMath"), this;
422
- }
423
- compile() {
424
- if (!this.processed.isSet("compile")) {
425
- let e = [];
426
- for (let t of this.math) this.compileMath(t), t.inputData.recompile !== void 0 && e.push(t);
427
- for (let t of e) {
428
- let e = t.inputData.recompile;
429
- t.state(e.state), t.inputData.recompile = e, this.compileMath(t);
430
- }
431
- this.processed.set("compile");
432
- }
433
- return this;
434
- }
435
- compileMath(e) {
436
- try {
437
- e.compile(this);
438
- } catch (t) {
439
- if (t.retry || t.restart) throw t;
440
- this.options.compileError(this, e, t), e.inputData.error = t;
441
- }
442
- }
443
- compileError(e, t) {
444
- e.root = this.mmlFactory.create("math", null, [this.mmlFactory.create("merror", {
445
- "data-mjx-error": t.message,
446
- title: t.message
447
- }, [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;
448
- }
449
- typeset() {
450
- if (!this.processed.isSet("typeset")) {
451
- for (let e of this.math) try {
452
- e.typeset(this);
453
- } catch (t) {
454
- if (t.retry || t.restart) throw t;
455
- this.options.typesetError(this, e, t), e.outputData.error = t;
456
- }
457
- this.processed.set("typeset");
458
- }
459
- return this;
460
- }
461
- typesetError(e, t) {
462
- e.typesetRoot = this.adaptor.node("mjx-container", {
463
- class: "MathJax mjx-output-error",
464
- jax: this.outputJax.name
465
- }, [this.adaptor.node("span", {
466
- "data-mjx-error": t.message,
467
- title: t.message,
468
- style: {
469
- color: "red",
470
- "background-color": "yellow",
471
- "line-height": "normal"
472
- }
473
- }, [this.adaptor.text("Math output error")])]), e.display && this.adaptor.setAttributes(e.typesetRoot, { style: {
474
- display: "block",
475
- margin: "1em 0",
476
- "text-align": "center"
477
- } }), e.outputData.error = t.message;
478
- }
479
- getMetrics() {
480
- return this.processed.isSet("getMetrics") || (this.outputJax.getMetrics(this), this.processed.set("getMetrics")), this;
481
- }
482
- updateDocument() {
483
- if (!this.processed.isSet("updateDocument")) {
484
- for (let e of this.math.reversed()) e.updateDocument(this);
485
- this.processed.set("updateDocument");
486
- }
487
- return this;
488
- }
489
- removeFromDocument(e = !1) {
490
- return this;
491
- }
492
- state(e, t = !1) {
493
- for (let n of this.math) n.state(e, t);
494
- return e < H.INSERTED && this.processed.clear("updateDocument"), e < H.TYPESET && (this.processed.clear("typeset"), this.processed.clear("getMetrics")), e < H.COMPILED && this.processed.clear("compile"), e < H.FINDMATH && this.processed.clear("findMath"), this;
495
- }
496
- reset(e = { processed: !0 }) {
497
- return e = r(Object.assign({}, xe), e), e.all && Object.assign(e, Se), e.processed && this.processed.reset(), e.inputJax && this.inputJax.forEach((t) => t.reset(...e.inputJax)), e.outputJax && this.outputJax.reset(...e.outputJax), this;
498
- }
499
- clear() {
500
- return this.reset(), this.math.clear(), this;
501
- }
502
- done() {
503
- return Promise.resolve();
504
- }
505
- concat(e) {
506
- return this.math.merge(e), this;
507
- }
508
- clearMathItemsWithin(e) {
509
- let t = this.getMathItemsWithin(e);
510
- for (let e of t.slice(0).reverse()) e.clear();
511
- return this.math.remove(...t), t;
512
- }
513
- getMathItemsWithin(e) {
514
- Array.isArray(e) || (e = [e]);
515
- let t = this.adaptor, n = [], r = t.getElements(e, this.document);
516
- ITEMS: for (let e of this.math) for (let i of r) if (e.start.node && t.contains(i, e.start.node)) {
517
- n.push(e);
518
- continue ITEMS;
519
- }
520
- return n;
521
- }
522
- };
523
- Z.KIND = "MathDocument", Z.OPTIONS = {
524
- OutputJax: null,
525
- InputJax: null,
526
- MmlFactory: null,
527
- MathList: Te,
528
- MathItem: Ee,
529
- compileError: (e, t, n) => {
530
- e.compileError(t, n);
531
- },
532
- typesetError: (e, t, n) => {
533
- e.typesetError(t, n);
534
- },
535
- renderActions: n({
536
- find: [
537
- H.FINDMATH,
538
- "findMath",
539
- "",
540
- !1
541
- ],
542
- compile: [H.COMPILED],
543
- metrics: [
544
- H.METRICS,
545
- "getMetrics",
546
- "",
547
- !1
548
- ],
549
- typeset: [H.TYPESET],
550
- update: [
551
- H.INSERTED,
552
- "updateDocument",
553
- !1
554
- ]
555
- })
556
- }, Z.ProcessBits = ye("findMath", "compile", "getMetrics", "typeset", "updateDocument");
557
- //#endregion
558
- //#region node_modules/@mathjax/src/mjs/core/Handler.js
559
- var De = class extends Z {}, Oe = class {
560
- constructor(e, t = 5) {
561
- this.documentClass = De, this.adaptor = e, this.priority = t;
562
- }
563
- get name() {
564
- return this.constructor.NAME;
565
- }
566
- handlesDocument(e) {
567
- return !1;
568
- }
569
- create(e, t) {
570
- return new this.documentClass(e, this.adaptor, t);
571
- }
572
- };
573
- Oe.NAME = "generic";
574
- //#endregion
575
- //#region node_modules/@mathjax/src/mjs/handlers/html/HTMLMathItem.js
576
- var ke = class extends V {
577
- get adaptor() {
578
- return this.inputJax.adaptor;
579
- }
580
- constructor(e, t, n = !0, r = {
581
- node: null,
582
- n: 0,
583
- delim: ""
584
- }, i = {
585
- node: null,
586
- n: 0,
587
- delim: ""
588
- }) {
589
- super(e, t, n, r, i);
590
- }
591
- updateDocument(e) {
592
- if (this.state() < H.INSERTED) {
593
- if (this.inputJax.processStrings) {
594
- let e = this.start.node;
595
- if (e === 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 && (e = this.adaptor.split(this.start.node, this.start.n)), this.adaptor.parent(e) && this.adaptor.replace(this.typesetRoot, e);
596
- else {
597
- for (this.start.n && (e = this.adaptor.split(e, this.start.n)); e !== this.end.node;) {
598
- let t = this.adaptor.next(e);
599
- this.adaptor.remove(e), e = t;
600
- }
601
- this.adaptor.insert(this.typesetRoot, e), this.end.n < this.adaptor.value(e).length && this.adaptor.split(e, this.end.n), this.adaptor.remove(e);
602
- }
603
- } else this.adaptor.replace(this.typesetRoot, this.start.node);
604
- this.start.node = this.end.node = this.typesetRoot, this.start.n = this.end.n = 0, this.state(H.INSERTED);
605
- }
606
- }
607
- updateStyleSheet(e) {
608
- e.addStyleSheet();
609
- }
610
- removeFromDocument(e = !1) {
611
- if (super.removeFromDocument(e), this.state() >= H.TYPESET) {
612
- let t = this.adaptor, n = this.start.node, r = t.text("");
613
- if (e) {
614
- let e = this.start.delim + this.math + this.end.delim;
615
- if (this.inputJax.processStrings) r = t.text(e);
616
- else {
617
- let n = t.parse(e, "text/html");
618
- r = t.firstChild(t.body(n));
619
- }
620
- }
621
- t.parent(n) && t.replace(r, n), this.start.node = this.end.node = r, this.start.n = this.end.n = 0;
622
- }
623
- }
624
- }, Ae = class extends he {}, Q = class {
625
- constructor(e = null) {
626
- let t = this.constructor;
627
- this.options = r(i({}, t.OPTIONS), e), this.init(), this.getPatterns();
628
- }
629
- init() {
630
- this.strings = [], this.string = "", this.snodes = [], this.nodes = [], this.stack = [];
631
- }
632
- getPatterns() {
633
- let e = t(this.options.skipHtmlTags), n = t(this.options.ignoreHtmlClass), r = t(this.options.processHtmlClass);
634
- this.skipHtmlTags = RegExp("^(?:" + e.join("|") + ")$", "i"), this.ignoreHtmlClass = RegExp("(?:^| )(?:" + n.join("|") + ")(?: |$)"), this.processHtmlClass = RegExp("(?:^| )(?:" + r + ")(?: |$)");
635
- }
636
- pushString() {
637
- this.string.match(/\S/) && (this.strings.push(this.string), this.nodes.push(this.snodes)), this.string = "", this.snodes = [];
638
- }
639
- extendString(e, t) {
640
- this.snodes.push([e, t.length]), this.string += t;
641
- }
642
- handleText(e, t) {
643
- return t || this.extendString(e, this.adaptor.value(e)), this.adaptor.next(e);
644
- }
645
- handleTag(e, t) {
646
- if (!t) {
647
- let t = this.options.includeHtmlTags[this.adaptor.kind(e)];
648
- t instanceof Function ? this.extendString(e, t(e, this.adaptor)) : this.extendString(e, t);
649
- }
650
- return this.adaptor.next(e);
651
- }
652
- handleContainer(e, t) {
653
- this.pushString();
654
- let n = this.adaptor.getAttribute(e, "class") || "", r = this.adaptor.kind(e) || "", i = this.processHtmlClass.exec(n), a = e;
655
- 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];
656
- }
657
- handleOther(e, t) {
658
- return this.pushString(), this.adaptor.next(e);
659
- }
660
- find(e) {
661
- this.init();
662
- let t = this.adaptor.next(e), n = !1, r = this.options.includeHtmlTags;
663
- for (; e && e !== t;) {
664
- let t = this.adaptor.kind(e);
665
- t === "#text" ? e = this.handleText(e, n) : Object.hasOwn(r, t) ? e = this.handleTag(e, n) : t ? [e, n] = this.handleContainer(e, n) : e = this.handleOther(e, n), !e && this.stack.length && (this.pushString(), [e, n] = this.stack.pop());
666
- }
667
- this.pushString();
668
- let i = [this.strings, this.nodes];
669
- return this.init(), i;
670
- }
671
- };
672
- //#endregion
673
- //#region node_modules/@mathjax/src/mjs/handlers/html/HTMLDocument.js
674
- Q.OPTIONS = {
675
- skipHtmlTags: [
676
- "script",
677
- "noscript",
678
- "style",
679
- "textarea",
680
- "pre",
681
- "code",
682
- "math",
683
- "select",
684
- "option",
685
- "mjx-container"
686
- ],
687
- includeHtmlTags: n({
688
- br: "\n",
689
- wbr: "",
690
- "#comment": ""
691
- }),
692
- ignoreHtmlClass: "mathjax_ignore",
693
- processHtmlClass: "mathjax_process"
694
- }, fe("STYLES", H.INSERTED + 1);
695
- var $ = class extends Z {
696
- constructor(t, n, r) {
697
- let [i, a] = e(r, Q.OPTIONS);
698
- super(t, n, i), this.domStrings = this.options.DomStrings || new Q(a), this.domStrings.adaptor = n, this.styles = [];
699
- }
700
- findPosition(e, t, n, r) {
701
- let i = this.adaptor, a = 1 / (r[e].length || 1), o = e;
702
- for (let [s, c] of r[e]) {
703
- if (t <= c && i.kind(s) === "#text") return {
704
- i: o,
705
- node: s,
706
- n: Math.max(t, 0),
707
- delim: n
708
- };
709
- t -= c, o += a;
710
- }
711
- return {
712
- node: null,
713
- n: 0,
714
- delim: n
715
- };
716
- }
717
- mathItem(e, t, n) {
718
- let 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);
719
- return new this.options.MathItem(r, t, e.display, i, a);
720
- }
721
- findMath(e) {
722
- if (!this.processed.isSet("findMath")) {
723
- this.adaptor.document = this.document, e = r({ elements: this.options.elements || [this.adaptor.body(this.document)] }, e);
724
- let t = this.adaptor.getElements(e.elements, this.document);
725
- for (let e of this.inputJax) {
726
- let n = e.processStrings ? this.findMathFromStrings(e, t) : this.findMathFromDOM(e, t);
727
- this.math.merge(n);
728
- }
729
- this.processed.set("findMath");
730
- }
731
- return this;
732
- }
733
- findMathFromStrings(e, t) {
734
- let n = [], r = [];
735
- for (let e of t) {
736
- let [t, i] = this.domStrings.find(e);
737
- n.push(...t), r.push(...i);
738
- }
739
- let i = new this.options.MathList();
740
- for (let t of e.findMath(n)) i.push(this.mathItem(t, e, r));
741
- return i;
742
- }
743
- findMathFromDOM(e, t) {
744
- let n = [];
745
- for (let r of t) for (let t of e.findMath(r)) n.push(new this.options.MathItem(t.math, e, t.display, t.start, t.end));
746
- return new this.options.MathList(...n);
747
- }
748
- updateDocument() {
749
- return this.processed.isSet("updateDocument") || (this.addPageElements(), this.addStyleSheet(), super.updateDocument(), this.processed.set("updateDocument")), this;
750
- }
751
- addPageElements() {
752
- let e = this.adaptor, t = e.body(this.document), n = this.documentPageElements();
753
- if (n) {
754
- let r = e.firstChild(t);
755
- r ? e.insert(n, r) : e.append(t, n);
756
- }
757
- }
758
- addStyleSheet() {
759
- let e = this.documentStyleSheet(), t = this.adaptor;
760
- if (e && !t.parent(e)) {
761
- let n = t.head(this.document), r = this.findSheet(n, t.getAttribute(e, "id"));
762
- r ? t.replace(e, r) : t.append(n, e);
763
- }
764
- }
765
- findSheet(e, t) {
766
- if (t) {
767
- for (let n of this.adaptor.tags(e, "style")) if (this.adaptor.getAttribute(n, "id") === t) return n;
768
- }
769
- return null;
770
- }
771
- removeFromDocument(e = !1) {
772
- if (this.processed.isSet("updateDocument")) for (let t of this.math) t.state() >= H.INSERTED && t.state(H.TYPESET, e);
773
- return this.processed.clear("updateDocument"), this;
774
- }
775
- documentStyleSheet() {
776
- return this.outputJax.styleSheet(this);
777
- }
778
- documentPageElements() {
779
- return this.outputJax.pageElements(this);
780
- }
781
- addStyles(e) {
782
- this.styles.push(e), "insertStyles" in this.outputJax && this.outputJax.insertStyles(e);
783
- }
784
- getStyles() {
785
- return this.styles;
786
- }
787
- };
788
- $.KIND = "HTML", $.OPTIONS = Object.assign(Object.assign({}, Z.OPTIONS), {
789
- renderActions: n(Object.assign(Object.assign({}, Z.OPTIONS.renderActions), { styles: [
790
- H.STYLES,
791
- "",
792
- "updateStyleSheet",
793
- !1
794
- ] })),
795
- MathList: Ae,
796
- MathItem: ke,
797
- DomStrings: null
798
- });
799
- //#endregion
800
- //#region node_modules/@mathjax/src/mjs/handlers/html/HTMLHandler.js
801
- var je = class extends Oe {
802
- constructor() {
803
- super(...arguments), this.documentClass = $;
804
- }
805
- handlesDocument(e) {
806
- let t = this.adaptor;
807
- if (typeof e == "string") try {
808
- e = t.parse(e, "text/html");
809
- } catch {}
810
- return e instanceof t.window.Document || e instanceof t.window.HTMLElement || e instanceof t.window.DocumentFragment;
811
- }
812
- create(e, t) {
813
- let n = this.adaptor;
814
- if (typeof e == "string") e = n.parse(e, "text/html");
815
- else if (e instanceof n.window.HTMLElement || e instanceof n.window.DocumentFragment) {
816
- let t = e;
817
- e = n.parse("", "text/html"), n.append(n.body(e), t);
818
- }
819
- return super.create(e, t);
820
- }
821
- };
822
- //#endregion
823
- //#region node_modules/@mathjax/src/mjs/handlers/html.js
824
- function Me(e) {
825
- let t = new je(e);
826
- return s.handlers.register(t), t;
827
- }
828
- //#endregion
829
- export { Me as RegisterHTMLHandler };