@loopstack/loopstack-studio 0.25.0 → 0.25.2

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 (196) hide show
  1. package/dist/components/ai-elements/message.js +2 -2
  2. package/dist/components/ai-elements/reasoning.js +9 -9
  3. package/dist/loopstack-studio.css +1 -1
  4. package/dist/node_modules/@chevrotain/gast/lib/src/helpers.js +2 -5
  5. package/dist/node_modules/@chevrotain/gast/lib/src/model.js +69 -72
  6. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{architecture-7HQA4BMR.js → architecture-YZFGNWBL.js} +2 -2
  7. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-TQ3KTPDO.js → chunk-2KRD3SAO.js} +1 -1
  8. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-4F5CHEZ2.js → chunk-67CJDMHE.js} +1 -1
  9. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-UMXZTB3W.js → chunk-7N4EOEYR.js} +5 -2
  10. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-PL6DKKU2.js → chunk-AA7GKIK3.js} +1 -1
  11. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +23 -0
  12. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-SJTYNZTY.js → chunk-FOC6F5B3.js} +1 -1
  13. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +1197 -0
  14. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-FRFDVMJY.js → chunk-KGLVRYIC.js} +1 -1
  15. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-B2363JML.js → chunk-LIHQZDEY.js} +1 -1
  16. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +29 -0
  17. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{gitGraph-G5XIXVHT.js → gitGraph-7Q5UKJZL.js} +2 -2
  18. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +3 -0
  19. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +3 -0
  20. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +3 -0
  21. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +3 -0
  22. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-SZITEDCU.js +3 -0
  23. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +3 -0
  24. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +3 -0
  25. package/dist/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +27 -17
  26. package/dist/node_modules/@upsetjs/venn.js/build/venn.esm.js +903 -0
  27. package/dist/node_modules/@xyflow/react/dist/esm/index.js +76 -75
  28. package/dist/node_modules/@xyflow/system/dist/esm/index.js +30 -28
  29. package/dist/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +31 -40
  30. package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +23 -26
  31. package/dist/node_modules/chevrotain/lib/src/parse/exceptions_public.js +12 -13
  32. package/dist/node_modules/chevrotain/lib/src/parse/grammar/checks.js +181 -205
  33. package/dist/node_modules/chevrotain/lib/src/parse/grammar/first.js +11 -13
  34. package/dist/node_modules/chevrotain/lib/src/parse/grammar/follow.js +12 -13
  35. package/dist/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +8 -9
  36. package/dist/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +176 -183
  37. package/dist/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +17 -19
  38. package/dist/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +153 -160
  39. package/dist/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +10 -12
  40. package/dist/node_modules/chevrotain/lib/src/parse/grammar/rest.js +36 -38
  41. package/dist/node_modules/chevrotain/lib/src/parse/parser/parser.js +37 -45
  42. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +12 -14
  43. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +80 -86
  44. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +6 -2
  45. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +39 -41
  46. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +7 -8
  47. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +69 -70
  48. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +215 -205
  49. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +76 -76
  50. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +29 -39
  51. package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +252 -274
  52. package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +93 -106
  53. package/dist/node_modules/chevrotain/lib/src/scan/reg_exp.js +61 -61
  54. package/dist/node_modules/chevrotain/lib/src/scan/tokens.js +31 -41
  55. package/dist/node_modules/chevrotain/lib/src/scan/tokens_public.js +15 -18
  56. package/dist/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +226 -226
  57. package/dist/node_modules/chevrotain-allstar/lib/atn.js +17 -17
  58. package/dist/node_modules/cytoscape/dist/cytoscape.esm.js +17 -14
  59. package/dist/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +19 -19
  60. package/dist/node_modules/dagre-d3-es/src/dagre/layout.js +48 -48
  61. package/dist/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +9 -9
  62. package/dist/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +3 -3
  63. package/dist/node_modules/dagre-d3-es/src/dagre/order/index.js +11 -11
  64. package/dist/node_modules/dagre-d3-es/src/dagre/order/init-order.js +4 -4
  65. package/dist/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +4 -4
  66. package/dist/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +8 -8
  67. package/dist/node_modules/dagre-d3-es/src/dagre/order/sort.js +5 -5
  68. package/dist/node_modules/dagre-d3-es/src/dagre/position/bk.js +61 -61
  69. package/dist/node_modules/dagre-d3-es/src/dagre/position/index.js +1 -1
  70. package/dist/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +25 -25
  71. package/dist/node_modules/dagre-d3-es/src/dagre/rank/util.js +8 -8
  72. package/dist/node_modules/dagre-d3-es/src/dagre/util.js +48 -48
  73. package/dist/node_modules/dagre-d3-es/src/graphlib/graph.js +109 -109
  74. package/dist/node_modules/dagre-d3-es/src/graphlib/json.js +17 -17
  75. package/dist/node_modules/dompurify/dist/purify.es.js +67 -67
  76. package/dist/node_modules/katex/dist/katex.js +1256 -1209
  77. package/dist/node_modules/khroma/dist/methods/transparentize.js +3 -0
  78. package/dist/node_modules/lodash-es/_baseClone.js +2 -2
  79. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +6 -6
  80. package/dist/node_modules/lodash-es/_baseToString.js +1 -1
  81. package/dist/node_modules/lodash-es/_baseUniq.js +1 -1
  82. package/dist/node_modules/lodash-es/_createSet.js +1 -1
  83. package/dist/node_modules/lodash-es/_getAllKeys.js +2 -2
  84. package/dist/node_modules/lodash-es/_getAllKeysIn.js +1 -1
  85. package/dist/node_modules/lodash-es/findIndex.js +2 -2
  86. package/dist/node_modules/lodash-es/flatMap.js +1 -1
  87. package/dist/node_modules/lodash-es/forEach.js +1 -1
  88. package/dist/node_modules/lodash-es/max.js +1 -1
  89. package/dist/node_modules/lodash-es/min.js +1 -1
  90. package/dist/node_modules/lodash-es/minBy.js +1 -1
  91. package/dist/node_modules/lodash-es/reduce.js +1 -1
  92. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-Q4EWVU46.js +691 -0
  93. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{blockDiagram-VD42YOAC.js → blockDiagram-DXYQGD6D.js} +183 -157
  94. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{c4Diagram-YG6GDRKO.js → c4Diagram-AHTNJAMY.js} +65 -63
  95. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-336JU56O.js +47 -0
  96. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-EXTU4WIE.js → chunk-426QAEUC.js} +1 -1
  97. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-B4BG7PRW.js → chunk-4TB4RGXK.js} +533 -393
  98. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5FUZZQ4R.js +3638 -0
  99. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-S3R3BYOJ.js → chunk-5PVQY5BW.js} +1 -1
  100. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-HN2XXSSU.js → chunk-BSJP7CBP.js} +20 -14
  101. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-QN33PNHL.js → chunk-EDXVE4YY.js} +1 -1
  102. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ENJZ2VHE.js +568 -0
  103. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICPOFSXX.js +2320 -0
  104. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-DI55MBZ5.js → chunk-OYMX7WX6.js} +35 -21
  105. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U2HBQHQK.js +272 -0
  106. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-ATLVNIR6.js → chunk-X2U36JSP.js} +1 -1
  107. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-MI3HLSF2.js → chunk-XPW4576I.js} +11 -7
  108. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-YZCP3GAM.js +60 -0
  109. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ZZ45TVLE.js +30 -0
  110. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{classDiagram-2ON5EDUG.js → classDiagram-6PBFFD2Q.js} +12 -11
  111. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{classDiagram-v2-WZHVMYZB.js → classDiagram-v2-HSJHXN6E.js} +12 -11
  112. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{dagre-6UL2VRFP.js → dagre-KV5264BT.js} +8 -8
  113. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5BDNPKRD.js +99 -0
  114. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-PSM6KHXK.js → diagram-G4DWMVQ6.js} +20 -23
  115. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-MMDJMWI5.js +211 -0
  116. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-S2PKOQOG.js → diagram-TYMM5635.js} +4 -4
  117. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{erDiagram-Q2GNP2WA.js → erDiagram-SMLLAGMA.js} +486 -386
  118. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{flowDiagram-NV44I4VS.js → flowDiagram-DWJPFMVM.js} +915 -898
  119. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{ganttDiagram-JELNMOA3.js → ganttDiagram-T4ZO3ILL.js} +59 -29
  120. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-UUTBAWPF.js +728 -0
  121. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-42DDH7IO.js +17 -0
  122. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-UXIWVN3A.js +714 -0
  123. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{journeyDiagram-XKPGCS4Q.js → journeyDiagram-VCZTEJTY.js} +32 -32
  124. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{kanban-definition-3W4ZIXB7.js → kanban-definition-6JOO6SKY.js} +13 -9
  125. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{mindmap-definition-VGOIOE7T.js → mindmap-definition-QFDTVHPH.js} +105 -59
  126. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-DEJITSTG.js +117 -0
  127. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{quadrantDiagram-AYHSOK5B.js → quadrantDiagram-34T5L4WZ.js} +1 -1
  128. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{requirementDiagram-UZGBJVZJ.js → requirementDiagram-MS252O5E.js} +49 -19
  129. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{sankeyDiagram-TZEHDZUN.js → sankeyDiagram-XADWPNL6.js} +1 -1
  130. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-FGHM5R23.js +4155 -0
  131. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{stateDiagram-FKZM4ZOC.js → stateDiagram-FHFEXIEX.js} +12 -12
  132. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{stateDiagram-v2-4FDKWEC3.js → stateDiagram-v2-QKLJ7IA2.js} +11 -11
  133. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-GMOUNBTQ.js +1071 -0
  134. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-DHZGUBPP.js +959 -0
  135. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-NUSXRM2D.js +574 -0
  136. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{xychartDiagram-PRI3JC2R.js → xychartDiagram-5P7HB3ND.js} +38 -35
  137. package/dist/node_modules/mermaid/dist/mermaid.core.js +235 -192
  138. package/dist/node_modules/nanoid/url-alphabet/index.js +1 -1
  139. package/dist/node_modules/remend/dist/index.js +333 -264
  140. package/dist/node_modules/streamdown/dist/chunk-BO2N2NFS.js +2498 -0
  141. package/dist/node_modules/streamdown/dist/highlighted-body-OFNGDK62.js +35 -0
  142. package/dist/node_modules/streamdown/dist/index.js +1 -1
  143. package/dist/node_modules/streamdown/dist/mermaid-GHXKKRXX.js +3 -0
  144. package/dist/node_modules/streamdown/node_modules/marked/lib/marked.esm.js +672 -667
  145. package/dist/pages/DashboardPage.js +3 -3
  146. package/package.json +2 -2
  147. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-TCCFYFTB.js +0 -787
  148. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-VBDWY6EO.js +0 -3
  149. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-DYOGHKS2.js +0 -3
  150. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-VRWISCQL.js +0 -3
  151. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-ZZBFDIW7.js +0 -3
  152. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-GDKQZRPO.js +0 -3
  153. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/context_assist.js +0 -16
  154. package/dist/node_modules/lodash-es/_arrayAggregator.js +0 -9
  155. package/dist/node_modules/lodash-es/_arrayEvery.js +0 -6
  156. package/dist/node_modules/lodash-es/_baseAggregator.js +0 -8
  157. package/dist/node_modules/lodash-es/_baseDifference.js +0 -22
  158. package/dist/node_modules/lodash-es/_baseEvery.js +0 -9
  159. package/dist/node_modules/lodash-es/_baseIsRegExp.js +0 -8
  160. package/dist/node_modules/lodash-es/_baseSlice.js +0 -8
  161. package/dist/node_modules/lodash-es/_baseSome.js +0 -9
  162. package/dist/node_modules/lodash-es/_createAggregator.js +0 -12
  163. package/dist/node_modules/lodash-es/assign.js +0 -14
  164. package/dist/node_modules/lodash-es/compact.js +0 -9
  165. package/dist/node_modules/lodash-es/difference.js +0 -8
  166. package/dist/node_modules/lodash-es/drop.js +0 -8
  167. package/dist/node_modules/lodash-es/dropRight.js +0 -8
  168. package/dist/node_modules/lodash-es/every.js +0 -11
  169. package/dist/node_modules/lodash-es/groupBy.js +0 -6
  170. package/dist/node_modules/lodash-es/head.js +0 -5
  171. package/dist/node_modules/lodash-es/includes.js +0 -13
  172. package/dist/node_modules/lodash-es/indexOf.js +0 -11
  173. package/dist/node_modules/lodash-es/isRegExp.js +0 -5
  174. package/dist/node_modules/lodash-es/negate.js +0 -16
  175. package/dist/node_modules/lodash-es/pickBy.js +0 -15
  176. package/dist/node_modules/lodash-es/reject.js +0 -10
  177. package/dist/node_modules/lodash-es/some.js +0 -11
  178. package/dist/node_modules/lodash-es/uniq.js +0 -6
  179. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-VXUJARFQ.js +0 -673
  180. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.js +0 -1547
  181. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-CVBHYZKI.js +0 -10
  182. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-DR5Q36YT.js +0 -135
  183. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JA3XYJ7Z.js +0 -247
  184. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JZLCHNYA.js +0 -3516
  185. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-N4CR4FBY.js +0 -39
  186. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QXUST7PY.js +0 -497
  187. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.js +0 -55
  188. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.js +0 -211
  189. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-V2S2FVAM.js +0 -621
  190. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-HS3SLOUP.js +0 -18
  191. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-ADFJNKIX.js +0 -117
  192. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.js +0 -3560
  193. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-IT6M3QCI.js +0 -833
  194. package/dist/node_modules/streamdown/dist/chunk-RLXIAIE6.js +0 -2189
  195. package/dist/node_modules/streamdown/dist/highlighted-body-B3W2YXNL.js +0 -33
  196. package/dist/node_modules/streamdown/dist/mermaid-3ZIDBTTL.js +0 -3
@@ -1,20 +1,5 @@
1
- var SourceLocation = class e {
2
- constructor(e, t, n) {
3
- this.lexer = void 0, this.start = void 0, this.end = void 0, this.lexer = e, this.start = t, this.end = n;
4
- }
5
- static range(t, n) {
6
- return n ? !t || !t.loc || !n.loc || t.loc.lexer !== n.loc.lexer ? null : new e(t.loc.lexer, t.loc.start, n.loc.end) : t && t.loc;
7
- }
8
- }, Token = class t {
9
- constructor(e, t) {
10
- this.text = void 0, this.loc = void 0, this.noexpand = void 0, this.treatAsRelax = void 0, this.text = e, this.loc = t;
11
- }
12
- range(n, r) {
13
- return new t(r, SourceLocation.range(this, n));
14
- }
15
- }, ParseError = class e {
1
+ var ParseError = class e extends Error {
16
2
  constructor(t, n) {
17
- this.name = void 0, this.position = void 0, this.length = void 0, this.rawMessage = void 0;
18
3
  var r = "KaTeX parse error: " + t, a, o, s = n && n.loc;
19
4
  if (s && s.start <= s.end) {
20
5
  var c = s.lexer.input;
@@ -22,12 +7,9 @@ var SourceLocation = class e {
22
7
  var l = c.slice(a, o).replace(/[^]/g, "$&̲"), u = a > 15 ? "…" + c.slice(a - 15, a) : c.slice(0, a), d = o + 15 < c.length ? c.slice(o, o + 15) + "…" : c.slice(o);
23
8
  r += u + l + d;
24
9
  }
25
- var f = Error(r);
26
- return f.name = "ParseError", f.__proto__ = e.prototype, f.position = a, a != null && o != null && (f.length = o - a), f.rawMessage = t, f;
10
+ super(r), this.name = "ParseError", Object.setPrototypeOf(this, e.prototype), this.position = a, a != null && o != null && (this.length = o - a), this.rawMessage = t;
27
11
  }
28
- };
29
- ParseError.prototype.__proto__ = Error.prototype;
30
- var uppercase = /([A-Z])/g, hyphenate = (e) => e.replace(uppercase, "-$1").toLowerCase(), ESCAPE_LOOKUP = {
12
+ }, uppercase = /([A-Z])/g, hyphenate = (e) => e.replace(uppercase, "-$1").toLowerCase(), ESCAPE_LOOKUP = {
31
13
  "&": "&amp;",
32
14
  ">": "&gt;",
33
15
  "<": "&lt;",
@@ -136,7 +118,7 @@ var uppercase = /([A-Z])/g, hyphenate = (e) => e.replace(uppercase, "-$1").toLow
136
118
  }
137
119
  };
138
120
  function getDefaultValue(e) {
139
- if (e.default) return e.default;
121
+ if ("default" in e) return e.default;
140
122
  var t = e.type, n = Array.isArray(t) ? t[0] : t;
141
123
  if (typeof n != "string") return n.enum[0];
142
124
  switch (n) {
@@ -148,16 +130,17 @@ function getDefaultValue(e) {
148
130
  }
149
131
  var Settings = class {
150
132
  constructor(e) {
151
- for (var t in this.displayMode = void 0, this.output = void 0, this.leqno = void 0, this.fleqn = void 0, this.throwOnError = void 0, this.errorColor = void 0, this.macros = void 0, this.minRuleThickness = void 0, this.colorIsTextColor = void 0, this.strict = void 0, this.trust = void 0, this.maxSize = void 0, this.maxExpand = void 0, this.globalGroup = void 0, e ||= {}, SETTINGS_SCHEMA) if (SETTINGS_SCHEMA.hasOwnProperty(t)) {
152
- var n = SETTINGS_SCHEMA[t];
153
- this[t] = e[t] === void 0 ? getDefaultValue(n) : n.processor ? n.processor(e[t]) : e[t];
133
+ e === void 0 && (e = {}), e ||= {};
134
+ for (var t of Object.keys(SETTINGS_SCHEMA)) {
135
+ var n = SETTINGS_SCHEMA[t], r = e[t];
136
+ this[t] = r === void 0 ? getDefaultValue(n) : n.processor ? n.processor(r) : r;
154
137
  }
155
138
  }
156
- reportNonstrict(e, t, r) {
139
+ reportNonstrict(t, n, r) {
157
140
  var a = this.strict;
158
- if (typeof a == "function" && (a = a(e, t, r)), !(!a || a === "ignore")) {
159
- if (a === !0 || a === "error") throw new ParseError("LaTeX-incompatible input and strict mode is set to 'error': " + (t + " [" + e + "]"), r);
160
- a === "warn" ? typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (t + " [" + e + "]")) : typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + a + "': " + t + " [" + e + "]"));
141
+ if (typeof a == "function" && (a = a(t, n, r)), !(!a || a === "ignore")) {
142
+ if (a === !0 || a === "error") throw new ParseError("LaTeX-incompatible input and strict mode is set to 'error': " + (n + " [" + t + "]"), r);
143
+ a === "warn" ? typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (n + " [" + t + "]")) : typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + a + "': " + n + " [" + t + "]"));
161
144
  }
162
145
  }
163
146
  useStrictBehavior(e, t, n) {
@@ -170,7 +153,7 @@ var Settings = class {
170
153
  return !r || r === "ignore" ? !1 : r === !0 || r === "error" ? !0 : r === "warn" ? (typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (t + " [" + e + "]")), !1) : (typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + r + "': " + t + " [" + e + "]")), !1);
171
154
  }
172
155
  isTrusted(e) {
173
- if (e.url && !e.protocol) {
156
+ if ("url" in e && e.url && !e.protocol) {
174
157
  var t = protocolFromUrl(e.url);
175
158
  if (t == null) return !1;
176
159
  e.protocol = t;
@@ -179,7 +162,7 @@ var Settings = class {
179
162
  }
180
163
  }, Style = class {
181
164
  constructor(e, t, n) {
182
- this.id = void 0, this.size = void 0, this.cramped = void 0, this.id = e, this.size = t, this.cramped = n;
165
+ this.id = e, this.size = t, this.cramped = n;
183
166
  }
184
167
  sup() {
185
168
  return styles[sup[this.id]];
@@ -317,7 +300,7 @@ function supportedCodepoint(e) {
317
300
  for (var t = 0; t < allBlocks.length; t += 2) if (e >= allBlocks[t] && e <= allBlocks[t + 1]) return !0;
318
301
  return !1;
319
302
  }
320
- var hLinePad = 80, sqrtMain = function(e, t) {
303
+ var doubleBrushStroke = (e) => e + " " + e, hLinePad = 80, sqrtMain = function(e, t) {
321
304
  return "M95," + (622 + e + t) + "\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl" + e / 2.075 + " -" + e + "\nc5.3,-9.3,12,-14,20,-14\nH400000v" + (40 + e) + "H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM" + (834 + e) + " " + t + "h400000v" + (40 + e) + "h-400000z";
322
305
  }, sqrtSize1 = function(e, t) {
323
306
  return "M263," + (601 + e + t) + "c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl" + e / 2.084 + " -" + e + "\nc4.7,-7.3,11,-11,19,-11\nH40000v" + (40 + e) + "H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM" + (1001 + e) + " " + t + "h400000v" + (40 + e) + "h-400000z";
@@ -357,15 +340,15 @@ var hLinePad = 80, sqrtMain = function(e, t) {
357
340
  return r;
358
341
  }, innerPath = function(e, t) {
359
342
  switch (e) {
360
- case "⎜": return "M291 0 H417 V" + t + " H291z M291 0 H417 V" + t + " H291z";
361
- case "∣": return "M145 0 H188 V" + t + " H145z M145 0 H188 V" + t + " H145z";
362
- case "∥": return "M145 0 H188 V" + t + " H145z M145 0 H188 V" + t + " H145z" + ("M367 0 H410 V" + t + " H367z M367 0 H410 V" + t + " H367z");
363
- case "⎟": return "M457 0 H583 V" + t + " H457z M457 0 H583 V" + t + " H457z";
364
- case "⎢": return "M319 0 H403 V" + t + " H319z M319 0 H403 V" + t + " H319z";
365
- case "⎥": return "M263 0 H347 V" + t + " H263z M263 0 H347 V" + t + " H263z";
366
- case "⎪": return "M384 0 H504 V" + t + " H384z M384 0 H504 V" + t + " H384z";
367
- case "⏐": return "M312 0 H355 V" + t + " H312z M312 0 H355 V" + t + " H312z";
368
- case "‖": return "M257 0 H300 V" + t + " H257z M257 0 H300 V" + t + " H257z" + ("M478 0 H521 V" + t + " H478z M478 0 H521 V" + t + " H478z");
343
+ case "⎜": return doubleBrushStroke("M291 0 H417 V" + t + " H291z");
344
+ case "∣": return doubleBrushStroke("M145 0 H188 V" + t + " H145z");
345
+ case "∥": return doubleBrushStroke("M145 0 H188 V" + t + " H145z") + doubleBrushStroke("M367 0 H410 V" + t + " H367z");
346
+ case "⎟": return doubleBrushStroke("M457 0 H583 V" + t + " H457z");
347
+ case "⎢": return doubleBrushStroke("M319 0 H403 V" + t + " H319z");
348
+ case "⎥": return doubleBrushStroke("M263 0 H347 V" + t + " H263z");
349
+ case "⎪": return doubleBrushStroke("M384 0 H504 V" + t + " H384z");
350
+ case "⏐": return doubleBrushStroke("M312 0 H355 V" + t + " H312z");
351
+ case "‖": return doubleBrushStroke("M257 0 H300 V" + t + " H257z") + doubleBrushStroke("M478 0 H521 V" + t + " H478z");
369
352
  default: return "";
370
353
  }
371
354
  }, path = {
@@ -381,10 +364,12 @@ var hLinePad = 80, sqrtMain = function(e, t) {
381
364
  leftharpoondown: "M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",
382
365
  leftharpoondownplus: "M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",
383
366
  lefthook: "M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",
384
- leftlinesegment: "M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",
385
- leftmapsto: "M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",
367
+ leftlinesegment: doubleBrushStroke("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),
368
+ leftbracketunder: doubleBrushStroke("M0 0 h120 V290 H399995 v120 H0z"),
369
+ leftbracketover: doubleBrushStroke("M0 440 h120 V150 H399995 v-120 H0z"),
370
+ leftmapsto: doubleBrushStroke("M40 281 V448H0V74H40V241H400000v40z"),
386
371
  leftToFrom: "M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",
387
- longequal: "M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",
372
+ longequal: doubleBrushStroke("M0 50 h400000 v40H0z m0 194h40000v40H0z"),
388
373
  midbrace: "M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",
389
374
  midbraceunder: "M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",
390
375
  oiintSize1: "M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",
@@ -401,7 +386,9 @@ var hLinePad = 80, sqrtMain = function(e, t) {
401
386
  rightharpoondown: "M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",
402
387
  rightharpoondownplus: "M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",
403
388
  righthook: "M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",
404
- rightlinesegment: "M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",
389
+ rightlinesegment: doubleBrushStroke("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),
390
+ rightbracketunder: doubleBrushStroke("M399995 0 h-120 V290 H0 v120 H400000z"),
391
+ rightbracketover: doubleBrushStroke("M399995 440 h-120 V150 H0 v-120 H399995z"),
405
392
  rightToFrom: "M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",
406
393
  twoheadleftarrow: "M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",
407
394
  twoheadrightarrow: "M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",
@@ -440,7 +427,7 @@ var hLinePad = 80, sqrtMain = function(e, t) {
440
427
  }
441
428
  }, DocumentFragment = class {
442
429
  constructor(e) {
443
- this.children = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.children = e, this.classes = [], this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = {};
430
+ this.children = e, this.classes = [], this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = {};
444
431
  }
445
432
  hasClass(e) {
446
433
  return this.classes.includes(e);
@@ -456,7 +443,199 @@ var hLinePad = 80, sqrtMain = function(e, t) {
456
443
  toText() {
457
444
  return this.children.map((e) => e.toText()).join("");
458
445
  }
459
- }, fontMetricsData = {
446
+ }, ptPerUnit = {
447
+ pt: 1,
448
+ mm: 7227 / 2540,
449
+ cm: 7227 / 254,
450
+ in: 72.27,
451
+ bp: 803 / 800,
452
+ pc: 12,
453
+ dd: 1238 / 1157,
454
+ cc: 14856 / 1157,
455
+ nd: 685 / 642,
456
+ nc: 1370 / 107,
457
+ sp: 1 / 65536,
458
+ px: 803 / 800
459
+ }, relativeUnit = {
460
+ ex: !0,
461
+ em: !0,
462
+ mu: !0
463
+ }, validUnit = function(e) {
464
+ return typeof e != "string" && (e = e.unit), e in ptPerUnit || e in relativeUnit || e === "ex";
465
+ }, calculateSize = function(t, n) {
466
+ var r;
467
+ if (t.unit in ptPerUnit) r = ptPerUnit[t.unit] / n.fontMetrics().ptPerEm / n.sizeMultiplier;
468
+ else if (t.unit === "mu") r = n.fontMetrics().cssEmPerMu;
469
+ else {
470
+ var a = n.style.isTight() ? n.havingStyle(n.style.text()) : n;
471
+ if (t.unit === "ex") r = a.fontMetrics().xHeight;
472
+ else if (t.unit === "em") r = a.fontMetrics().quad;
473
+ else throw new ParseError("Invalid unit: '" + t.unit + "'");
474
+ a !== n && (r *= a.sizeMultiplier / n.sizeMultiplier);
475
+ }
476
+ return Math.min(t.number * r, n.maxSize);
477
+ }, makeEm = function(e) {
478
+ return +e.toFixed(4) + "em";
479
+ }, createClass = function(e) {
480
+ return e.filter((e) => e).join(" ");
481
+ }, initNode = function(e, t, n) {
482
+ if (this.classes = e || [], this.attributes = {}, this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = n || {}, t) {
483
+ t.style.isTight() && this.classes.push("mtight");
484
+ var r = t.getColor();
485
+ r && (this.style.color = r);
486
+ }
487
+ }, toNode = function(e) {
488
+ var t = document.createElement(e);
489
+ t.className = createClass(this.classes);
490
+ for (var n of Object.keys(this.style)) t.style[n] = this.style[n];
491
+ for (var r of Object.keys(this.attributes)) t.setAttribute(r, this.attributes[r]);
492
+ for (var a = 0; a < this.children.length; a++) t.appendChild(this.children[a].toNode());
493
+ return t;
494
+ }, invalidAttributeNameRegex = /[\s"'>/=\x00-\x1f]/, toMarkup = function(t) {
495
+ var r = "<" + t;
496
+ this.classes.length && (r += " class=\"" + escape(createClass(this.classes)) + "\"");
497
+ var a = "";
498
+ for (var s of Object.keys(this.style)) a += hyphenate(s) + ":" + this.style[s] + ";";
499
+ a && (r += " style=\"" + escape(a) + "\"");
500
+ for (var c of Object.keys(this.attributes)) {
501
+ if (invalidAttributeNameRegex.test(c)) throw new ParseError("Invalid attribute name '" + c + "'");
502
+ r += " " + c + "=\"" + escape(this.attributes[c]) + "\"";
503
+ }
504
+ r += ">";
505
+ for (var l = 0; l < this.children.length; l++) r += this.children[l].toMarkup();
506
+ return r += "</" + t + ">", r;
507
+ }, Span = class {
508
+ constructor(e, t, n, r) {
509
+ initNode.call(this, e, n, r), this.children = t || [];
510
+ }
511
+ setAttribute(e, t) {
512
+ this.attributes[e] = t;
513
+ }
514
+ hasClass(e) {
515
+ return this.classes.includes(e);
516
+ }
517
+ toNode() {
518
+ return toNode.call(this, "span");
519
+ }
520
+ toMarkup() {
521
+ return toMarkup.call(this, "span");
522
+ }
523
+ }, Anchor = class {
524
+ constructor(e, t, n, r) {
525
+ initNode.call(this, t, r), this.children = n || [], this.setAttribute("href", e);
526
+ }
527
+ setAttribute(e, t) {
528
+ this.attributes[e] = t;
529
+ }
530
+ hasClass(e) {
531
+ return this.classes.includes(e);
532
+ }
533
+ toNode() {
534
+ return toNode.call(this, "a");
535
+ }
536
+ toMarkup() {
537
+ return toMarkup.call(this, "a");
538
+ }
539
+ }, Img = class {
540
+ constructor(e, t, n) {
541
+ this.alt = t, this.src = e, this.classes = ["mord"], this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = n;
542
+ }
543
+ hasClass(e) {
544
+ return this.classes.includes(e);
545
+ }
546
+ toNode() {
547
+ var e = document.createElement("img");
548
+ e.src = this.src, e.alt = this.alt, e.className = "mord";
549
+ for (var t of Object.keys(this.style)) e.style[t] = this.style[t];
550
+ return e;
551
+ }
552
+ toMarkup() {
553
+ var e = "<img src=\"" + escape(this.src) + "\"" + (" alt=\"" + escape(this.alt) + "\""), t = "";
554
+ for (var r of Object.keys(this.style)) t += hyphenate(r) + ":" + this.style[r] + ";";
555
+ return t && (e += " style=\"" + escape(t) + "\""), e += "'/>", e;
556
+ }
557
+ }, iCombinations = {
558
+ î: "ı̂",
559
+ ï: "ı̈",
560
+ í: "ı́",
561
+ ì: "ı̀"
562
+ }, SymbolNode = class {
563
+ constructor(e, t, n, r, a, o, s, c) {
564
+ this.text = e, this.height = t || 0, this.depth = n || 0, this.italic = r || 0, this.skew = a || 0, this.width = o || 0, this.classes = s || [], this.style = c || {}, this.maxFontSize = 0;
565
+ var l = scriptFromCodepoint(this.text.charCodeAt(0));
566
+ l && this.classes.push(l + "_fallback"), /[îïíì]/.test(this.text) && (this.text = iCombinations[this.text]);
567
+ }
568
+ hasClass(e) {
569
+ return this.classes.includes(e);
570
+ }
571
+ toNode() {
572
+ var e = document.createTextNode(this.text), t = null;
573
+ this.italic > 0 && (t = document.createElement("span"), t.style.marginRight = makeEm(this.italic)), this.classes.length > 0 && (t ||= document.createElement("span"), t.className = createClass(this.classes));
574
+ for (var n of Object.keys(this.style)) t ||= document.createElement("span"), t.style[n] = this.style[n];
575
+ return t ? (t.appendChild(e), t) : e;
576
+ }
577
+ toMarkup() {
578
+ var e = !1, t = "<span";
579
+ this.classes.length && (e = !0, t += " class=\"", t += escape(createClass(this.classes)), t += "\"");
580
+ var r = "";
581
+ this.italic > 0 && (r += "margin-right:" + makeEm(this.italic) + ";");
582
+ for (var a of Object.keys(this.style)) r += hyphenate(a) + ":" + this.style[a] + ";";
583
+ r && (e = !0, t += " style=\"" + escape(r) + "\"");
584
+ var s = escape(this.text);
585
+ return e ? (t += ">", t += s, t += "</span>", t) : s;
586
+ }
587
+ }, SvgNode = class {
588
+ constructor(e, t) {
589
+ this.children = e || [], this.attributes = t || {};
590
+ }
591
+ toNode() {
592
+ var e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
593
+ for (var t of Object.keys(this.attributes)) e.setAttribute(t, this.attributes[t]);
594
+ for (var n = 0; n < this.children.length; n++) e.appendChild(this.children[n].toNode());
595
+ return e;
596
+ }
597
+ toMarkup() {
598
+ var e = "<svg xmlns=\"http://www.w3.org/2000/svg\"";
599
+ for (var t of Object.keys(this.attributes)) e += " " + t + "=\"" + escape(this.attributes[t]) + "\"";
600
+ e += ">";
601
+ for (var n = 0; n < this.children.length; n++) e += this.children[n].toMarkup();
602
+ return e += "</svg>", e;
603
+ }
604
+ }, PathNode = class {
605
+ constructor(e, t) {
606
+ this.pathName = e, this.alternate = t;
607
+ }
608
+ toNode() {
609
+ var e = document.createElementNS("http://www.w3.org/2000/svg", "path");
610
+ return this.alternate ? e.setAttribute("d", this.alternate) : e.setAttribute("d", path[this.pathName]), e;
611
+ }
612
+ toMarkup() {
613
+ return this.alternate ? "<path d=\"" + escape(this.alternate) + "\"/>" : "<path d=\"" + escape(path[this.pathName]) + "\"/>";
614
+ }
615
+ }, LineNode = class {
616
+ constructor(e) {
617
+ this.attributes = e || {};
618
+ }
619
+ toNode() {
620
+ var e = document.createElementNS("http://www.w3.org/2000/svg", "line");
621
+ for (var t of Object.keys(this.attributes)) e.setAttribute(t, this.attributes[t]);
622
+ return e;
623
+ }
624
+ toMarkup() {
625
+ var e = "<line";
626
+ for (var t of Object.keys(this.attributes)) e += " " + t + "=\"" + escape(this.attributes[t]) + "\"";
627
+ return e += "/>", e;
628
+ }
629
+ };
630
+ function assertSymbolDomNode(e) {
631
+ if (e instanceof SymbolNode) return e;
632
+ throw Error("Expected symbolNode but got " + String(e) + ".");
633
+ }
634
+ function assertSpan(e) {
635
+ if (e instanceof Span) return e;
636
+ throw Error("Expected span<HtmlDomNode> but got " + String(e) + ".");
637
+ }
638
+ var hasHtmlDomChildren = (e) => e instanceof Span || e instanceof Anchor || e instanceof DocumentFragment, fontMetricsData = {
460
639
  "AMS-Regular": {
461
640
  32: [
462
641
  0,
@@ -15025,470 +15204,100 @@ function getGlobalMetrics(e) {
15025
15204
  }
15026
15205
  return fontMetricsBySizeIndex[t];
15027
15206
  }
15028
- var sizeStyleMap = [
15207
+ var ATOMS = {
15208
+ bin: 1,
15209
+ close: 1,
15210
+ inner: 1,
15211
+ open: 1,
15212
+ punct: 1,
15213
+ rel: 1
15214
+ }, NON_ATOMS = {
15215
+ "accent-token": 1,
15216
+ mathord: 1,
15217
+ "op-token": 1,
15218
+ spacing: 1,
15219
+ textord: 1
15220
+ }, symbols = {
15221
+ math: {},
15222
+ text: {}
15223
+ };
15224
+ function defineSymbol(e, t, n, r, a, o) {
15225
+ symbols[e][a] = {
15226
+ font: t,
15227
+ group: n,
15228
+ replace: r
15229
+ }, o && r && (symbols[e][r] = symbols[e][a]);
15230
+ }
15231
+ var math = "math", text = "text", main = "main", ams = "ams", accent = "accent-token", bin = "bin", close = "close", inner = "inner", mathord = "mathord", op = "op-token", open = "open", punct = "punct", rel = "rel", spacing = "spacing", textord = "textord";
15232
+ defineSymbol(math, main, rel, "≡", "\\equiv", !0), defineSymbol(math, main, rel, "≺", "\\prec", !0), defineSymbol(math, main, rel, "≻", "\\succ", !0), defineSymbol(math, main, rel, "∼", "\\sim", !0), defineSymbol(math, main, rel, "⊥", "\\perp"), defineSymbol(math, main, rel, "⪯", "\\preceq", !0), defineSymbol(math, main, rel, "⪰", "\\succeq", !0), defineSymbol(math, main, rel, "≃", "\\simeq", !0), defineSymbol(math, main, rel, "∣", "\\mid", !0), defineSymbol(math, main, rel, "≪", "\\ll", !0), defineSymbol(math, main, rel, "≫", "\\gg", !0), defineSymbol(math, main, rel, "≍", "\\asymp", !0), defineSymbol(math, main, rel, "∥", "\\parallel"), defineSymbol(math, main, rel, "⋈", "\\bowtie", !0), defineSymbol(math, main, rel, "⌣", "\\smile", !0), defineSymbol(math, main, rel, "⊑", "\\sqsubseteq", !0), defineSymbol(math, main, rel, "⊒", "\\sqsupseteq", !0), defineSymbol(math, main, rel, "≐", "\\doteq", !0), defineSymbol(math, main, rel, "⌢", "\\frown", !0), defineSymbol(math, main, rel, "∋", "\\ni", !0), defineSymbol(math, main, rel, "∝", "\\propto", !0), defineSymbol(math, main, rel, "⊢", "\\vdash", !0), defineSymbol(math, main, rel, "⊣", "\\dashv", !0), defineSymbol(math, main, rel, "∋", "\\owns"), defineSymbol(math, main, punct, ".", "\\ldotp"), defineSymbol(math, main, punct, "⋅", "\\cdotp"), defineSymbol(math, main, punct, "⋅", "·"), defineSymbol(text, main, textord, "⋅", "·"), defineSymbol(math, main, textord, "#", "\\#"), defineSymbol(text, main, textord, "#", "\\#"), defineSymbol(math, main, textord, "&", "\\&"), defineSymbol(text, main, textord, "&", "\\&"), defineSymbol(math, main, textord, "ℵ", "\\aleph", !0), defineSymbol(math, main, textord, "∀", "\\forall", !0), defineSymbol(math, main, textord, "ℏ", "\\hbar", !0), defineSymbol(math, main, textord, "∃", "\\exists", !0), defineSymbol(math, main, textord, "∇", "\\nabla", !0), defineSymbol(math, main, textord, "♭", "\\flat", !0), defineSymbol(math, main, textord, "ℓ", "\\ell", !0), defineSymbol(math, main, textord, "♮", "\\natural", !0), defineSymbol(math, main, textord, "♣", "\\clubsuit", !0), defineSymbol(math, main, textord, "℘", "\\wp", !0), defineSymbol(math, main, textord, "♯", "\\sharp", !0), defineSymbol(math, main, textord, "♢", "\\diamondsuit", !0), defineSymbol(math, main, textord, "ℜ", "\\Re", !0), defineSymbol(math, main, textord, "♡", "\\heartsuit", !0), defineSymbol(math, main, textord, "ℑ", "\\Im", !0), defineSymbol(math, main, textord, "♠", "\\spadesuit", !0), defineSymbol(math, main, textord, "§", "\\S", !0), defineSymbol(text, main, textord, "§", "\\S"), defineSymbol(math, main, textord, "¶", "\\P", !0), defineSymbol(text, main, textord, "¶", "\\P"), defineSymbol(math, main, textord, "†", "\\dag"), defineSymbol(text, main, textord, "†", "\\dag"), defineSymbol(text, main, textord, "†", "\\textdagger"), defineSymbol(math, main, textord, "‡", "\\ddag"), defineSymbol(text, main, textord, "‡", "\\ddag"), defineSymbol(text, main, textord, "‡", "\\textdaggerdbl"), defineSymbol(math, main, close, "⎱", "\\rmoustache", !0), defineSymbol(math, main, open, "⎰", "\\lmoustache", !0), defineSymbol(math, main, close, "⟯", "\\rgroup", !0), defineSymbol(math, main, open, "⟮", "\\lgroup", !0), defineSymbol(math, main, bin, "∓", "\\mp", !0), defineSymbol(math, main, bin, "⊖", "\\ominus", !0), defineSymbol(math, main, bin, "⊎", "\\uplus", !0), defineSymbol(math, main, bin, "⊓", "\\sqcap", !0), defineSymbol(math, main, bin, "∗", "\\ast"), defineSymbol(math, main, bin, "⊔", "\\sqcup", !0), defineSymbol(math, main, bin, "◯", "\\bigcirc", !0), defineSymbol(math, main, bin, "∙", "\\bullet", !0), defineSymbol(math, main, bin, "‡", "\\ddagger"), defineSymbol(math, main, bin, "≀", "\\wr", !0), defineSymbol(math, main, bin, "⨿", "\\amalg"), defineSymbol(math, main, bin, "&", "\\And"), defineSymbol(math, main, rel, "⟵", "\\longleftarrow", !0), defineSymbol(math, main, rel, "⇐", "\\Leftarrow", !0), defineSymbol(math, main, rel, "⟸", "\\Longleftarrow", !0), defineSymbol(math, main, rel, "⟶", "\\longrightarrow", !0), defineSymbol(math, main, rel, "⇒", "\\Rightarrow", !0), defineSymbol(math, main, rel, "⟹", "\\Longrightarrow", !0), defineSymbol(math, main, rel, "↔", "\\leftrightarrow", !0), defineSymbol(math, main, rel, "⟷", "\\longleftrightarrow", !0), defineSymbol(math, main, rel, "⇔", "\\Leftrightarrow", !0), defineSymbol(math, main, rel, "⟺", "\\Longleftrightarrow", !0), defineSymbol(math, main, rel, "↦", "\\mapsto", !0), defineSymbol(math, main, rel, "⟼", "\\longmapsto", !0), defineSymbol(math, main, rel, "↗", "\\nearrow", !0), defineSymbol(math, main, rel, "↩", "\\hookleftarrow", !0), defineSymbol(math, main, rel, "↪", "\\hookrightarrow", !0), defineSymbol(math, main, rel, "↘", "\\searrow", !0), defineSymbol(math, main, rel, "↼", "\\leftharpoonup", !0), defineSymbol(math, main, rel, "⇀", "\\rightharpoonup", !0), defineSymbol(math, main, rel, "↙", "\\swarrow", !0), defineSymbol(math, main, rel, "↽", "\\leftharpoondown", !0), defineSymbol(math, main, rel, "⇁", "\\rightharpoondown", !0), defineSymbol(math, main, rel, "↖", "\\nwarrow", !0), defineSymbol(math, main, rel, "⇌", "\\rightleftharpoons", !0), defineSymbol(math, ams, rel, "≮", "\\nless", !0), defineSymbol(math, ams, rel, "", "\\@nleqslant"), defineSymbol(math, ams, rel, "", "\\@nleqq"), defineSymbol(math, ams, rel, "⪇", "\\lneq", !0), defineSymbol(math, ams, rel, "≨", "\\lneqq", !0), defineSymbol(math, ams, rel, "", "\\@lvertneqq"), defineSymbol(math, ams, rel, "⋦", "\\lnsim", !0), defineSymbol(math, ams, rel, "⪉", "\\lnapprox", !0), defineSymbol(math, ams, rel, "⊀", "\\nprec", !0), defineSymbol(math, ams, rel, "⋠", "\\npreceq", !0), defineSymbol(math, ams, rel, "⋨", "\\precnsim", !0), defineSymbol(math, ams, rel, "⪹", "\\precnapprox", !0), defineSymbol(math, ams, rel, "≁", "\\nsim", !0), defineSymbol(math, ams, rel, "", "\\@nshortmid"), defineSymbol(math, ams, rel, "∤", "\\nmid", !0), defineSymbol(math, ams, rel, "⊬", "\\nvdash", !0), defineSymbol(math, ams, rel, "⊭", "\\nvDash", !0), defineSymbol(math, ams, rel, "⋪", "\\ntriangleleft"), defineSymbol(math, ams, rel, "⋬", "\\ntrianglelefteq", !0), defineSymbol(math, ams, rel, "⊊", "\\subsetneq", !0), defineSymbol(math, ams, rel, "", "\\@varsubsetneq"), defineSymbol(math, ams, rel, "⫋", "\\subsetneqq", !0), defineSymbol(math, ams, rel, "", "\\@varsubsetneqq"), defineSymbol(math, ams, rel, "≯", "\\ngtr", !0), defineSymbol(math, ams, rel, "", "\\@ngeqslant"), defineSymbol(math, ams, rel, "", "\\@ngeqq"), defineSymbol(math, ams, rel, "⪈", "\\gneq", !0), defineSymbol(math, ams, rel, "≩", "\\gneqq", !0), defineSymbol(math, ams, rel, "", "\\@gvertneqq"), defineSymbol(math, ams, rel, "⋧", "\\gnsim", !0), defineSymbol(math, ams, rel, "⪊", "\\gnapprox", !0), defineSymbol(math, ams, rel, "⊁", "\\nsucc", !0), defineSymbol(math, ams, rel, "⋡", "\\nsucceq", !0), defineSymbol(math, ams, rel, "⋩", "\\succnsim", !0), defineSymbol(math, ams, rel, "⪺", "\\succnapprox", !0), defineSymbol(math, ams, rel, "≆", "\\ncong", !0), defineSymbol(math, ams, rel, "", "\\@nshortparallel"), defineSymbol(math, ams, rel, "∦", "\\nparallel", !0), defineSymbol(math, ams, rel, "⊯", "\\nVDash", !0), defineSymbol(math, ams, rel, "⋫", "\\ntriangleright"), defineSymbol(math, ams, rel, "⋭", "\\ntrianglerighteq", !0), defineSymbol(math, ams, rel, "", "\\@nsupseteqq"), defineSymbol(math, ams, rel, "⊋", "\\supsetneq", !0), defineSymbol(math, ams, rel, "", "\\@varsupsetneq"), defineSymbol(math, ams, rel, "⫌", "\\supsetneqq", !0), defineSymbol(math, ams, rel, "", "\\@varsupsetneqq"), defineSymbol(math, ams, rel, "⊮", "\\nVdash", !0), defineSymbol(math, ams, rel, "⪵", "\\precneqq", !0), defineSymbol(math, ams, rel, "⪶", "\\succneqq", !0), defineSymbol(math, ams, rel, "", "\\@nsubseteqq"), defineSymbol(math, ams, bin, "⊴", "\\unlhd"), defineSymbol(math, ams, bin, "⊵", "\\unrhd"), defineSymbol(math, ams, rel, "↚", "\\nleftarrow", !0), defineSymbol(math, ams, rel, "↛", "\\nrightarrow", !0), defineSymbol(math, ams, rel, "⇍", "\\nLeftarrow", !0), defineSymbol(math, ams, rel, "⇏", "\\nRightarrow", !0), defineSymbol(math, ams, rel, "↮", "\\nleftrightarrow", !0), defineSymbol(math, ams, rel, "⇎", "\\nLeftrightarrow", !0), defineSymbol(math, ams, rel, "△", "\\vartriangle"), defineSymbol(math, ams, textord, "ℏ", "\\hslash"), defineSymbol(math, ams, textord, "▽", "\\triangledown"), defineSymbol(math, ams, textord, "◊", "\\lozenge"), defineSymbol(math, ams, textord, "Ⓢ", "\\circledS"), defineSymbol(math, ams, textord, "®", "\\circledR"), defineSymbol(text, ams, textord, "®", "\\circledR"), defineSymbol(math, ams, textord, "∡", "\\measuredangle", !0), defineSymbol(math, ams, textord, "∄", "\\nexists"), defineSymbol(math, ams, textord, "℧", "\\mho"), defineSymbol(math, ams, textord, "Ⅎ", "\\Finv", !0), defineSymbol(math, ams, textord, "⅁", "\\Game", !0), defineSymbol(math, ams, textord, "‵", "\\backprime"), defineSymbol(math, ams, textord, "▲", "\\blacktriangle"), defineSymbol(math, ams, textord, "▼", "\\blacktriangledown"), defineSymbol(math, ams, textord, "■", "\\blacksquare"), defineSymbol(math, ams, textord, "⧫", "\\blacklozenge"), defineSymbol(math, ams, textord, "★", "\\bigstar"), defineSymbol(math, ams, textord, "∢", "\\sphericalangle", !0), defineSymbol(math, ams, textord, "∁", "\\complement", !0), defineSymbol(math, ams, textord, "ð", "\\eth", !0), defineSymbol(text, main, textord, "ð", "ð"), defineSymbol(math, ams, textord, "╱", "\\diagup"), defineSymbol(math, ams, textord, "╲", "\\diagdown"), defineSymbol(math, ams, textord, "□", "\\square"), defineSymbol(math, ams, textord, "□", "\\Box"), defineSymbol(math, ams, textord, "◊", "\\Diamond"), defineSymbol(math, ams, textord, "¥", "\\yen", !0), defineSymbol(text, ams, textord, "¥", "\\yen", !0), defineSymbol(math, ams, textord, "✓", "\\checkmark", !0), defineSymbol(text, ams, textord, "✓", "\\checkmark"), defineSymbol(math, ams, textord, "ℶ", "\\beth", !0), defineSymbol(math, ams, textord, "ℸ", "\\daleth", !0), defineSymbol(math, ams, textord, "ℷ", "\\gimel", !0), defineSymbol(math, ams, textord, "ϝ", "\\digamma", !0), defineSymbol(math, ams, textord, "ϰ", "\\varkappa"), defineSymbol(math, ams, open, "┌", "\\@ulcorner", !0), defineSymbol(math, ams, close, "┐", "\\@urcorner", !0), defineSymbol(math, ams, open, "└", "\\@llcorner", !0), defineSymbol(math, ams, close, "┘", "\\@lrcorner", !0), defineSymbol(math, ams, rel, "≦", "\\leqq", !0), defineSymbol(math, ams, rel, "⩽", "\\leqslant", !0), defineSymbol(math, ams, rel, "⪕", "\\eqslantless", !0), defineSymbol(math, ams, rel, "≲", "\\lesssim", !0), defineSymbol(math, ams, rel, "⪅", "\\lessapprox", !0), defineSymbol(math, ams, rel, "≊", "\\approxeq", !0), defineSymbol(math, ams, bin, "⋖", "\\lessdot"), defineSymbol(math, ams, rel, "⋘", "\\lll", !0), defineSymbol(math, ams, rel, "≶", "\\lessgtr", !0), defineSymbol(math, ams, rel, "⋚", "\\lesseqgtr", !0), defineSymbol(math, ams, rel, "⪋", "\\lesseqqgtr", !0), defineSymbol(math, ams, rel, "≑", "\\doteqdot"), defineSymbol(math, ams, rel, "≓", "\\risingdotseq", !0), defineSymbol(math, ams, rel, "≒", "\\fallingdotseq", !0), defineSymbol(math, ams, rel, "∽", "\\backsim", !0), defineSymbol(math, ams, rel, "⋍", "\\backsimeq", !0), defineSymbol(math, ams, rel, "⫅", "\\subseteqq", !0), defineSymbol(math, ams, rel, "⋐", "\\Subset", !0), defineSymbol(math, ams, rel, "⊏", "\\sqsubset", !0), defineSymbol(math, ams, rel, "≼", "\\preccurlyeq", !0), defineSymbol(math, ams, rel, "⋞", "\\curlyeqprec", !0), defineSymbol(math, ams, rel, "≾", "\\precsim", !0), defineSymbol(math, ams, rel, "⪷", "\\precapprox", !0), defineSymbol(math, ams, rel, "⊲", "\\vartriangleleft"), defineSymbol(math, ams, rel, "⊴", "\\trianglelefteq"), defineSymbol(math, ams, rel, "⊨", "\\vDash", !0), defineSymbol(math, ams, rel, "⊪", "\\Vvdash", !0), defineSymbol(math, ams, rel, "⌣", "\\smallsmile"), defineSymbol(math, ams, rel, "⌢", "\\smallfrown"), defineSymbol(math, ams, rel, "≏", "\\bumpeq", !0), defineSymbol(math, ams, rel, "≎", "\\Bumpeq", !0), defineSymbol(math, ams, rel, "≧", "\\geqq", !0), defineSymbol(math, ams, rel, "⩾", "\\geqslant", !0), defineSymbol(math, ams, rel, "⪖", "\\eqslantgtr", !0), defineSymbol(math, ams, rel, "≳", "\\gtrsim", !0), defineSymbol(math, ams, rel, "⪆", "\\gtrapprox", !0), defineSymbol(math, ams, bin, "⋗", "\\gtrdot"), defineSymbol(math, ams, rel, "⋙", "\\ggg", !0), defineSymbol(math, ams, rel, "≷", "\\gtrless", !0), defineSymbol(math, ams, rel, "⋛", "\\gtreqless", !0), defineSymbol(math, ams, rel, "⪌", "\\gtreqqless", !0), defineSymbol(math, ams, rel, "≖", "\\eqcirc", !0), defineSymbol(math, ams, rel, "≗", "\\circeq", !0), defineSymbol(math, ams, rel, "≜", "\\triangleq", !0), defineSymbol(math, ams, rel, "∼", "\\thicksim"), defineSymbol(math, ams, rel, "≈", "\\thickapprox"), defineSymbol(math, ams, rel, "⫆", "\\supseteqq", !0), defineSymbol(math, ams, rel, "⋑", "\\Supset", !0), defineSymbol(math, ams, rel, "⊐", "\\sqsupset", !0), defineSymbol(math, ams, rel, "≽", "\\succcurlyeq", !0), defineSymbol(math, ams, rel, "⋟", "\\curlyeqsucc", !0), defineSymbol(math, ams, rel, "≿", "\\succsim", !0), defineSymbol(math, ams, rel, "⪸", "\\succapprox", !0), defineSymbol(math, ams, rel, "⊳", "\\vartriangleright"), defineSymbol(math, ams, rel, "⊵", "\\trianglerighteq"), defineSymbol(math, ams, rel, "⊩", "\\Vdash", !0), defineSymbol(math, ams, rel, "∣", "\\shortmid"), defineSymbol(math, ams, rel, "∥", "\\shortparallel"), defineSymbol(math, ams, rel, "≬", "\\between", !0), defineSymbol(math, ams, rel, "⋔", "\\pitchfork", !0), defineSymbol(math, ams, rel, "∝", "\\varpropto"), defineSymbol(math, ams, rel, "◀", "\\blacktriangleleft"), defineSymbol(math, ams, rel, "∴", "\\therefore", !0), defineSymbol(math, ams, rel, "∍", "\\backepsilon"), defineSymbol(math, ams, rel, "▶", "\\blacktriangleright"), defineSymbol(math, ams, rel, "∵", "\\because", !0), defineSymbol(math, ams, rel, "⋘", "\\llless"), defineSymbol(math, ams, rel, "⋙", "\\gggtr"), defineSymbol(math, ams, bin, "⊲", "\\lhd"), defineSymbol(math, ams, bin, "⊳", "\\rhd"), defineSymbol(math, ams, rel, "≂", "\\eqsim", !0), defineSymbol(math, main, rel, "⋈", "\\Join"), defineSymbol(math, ams, rel, "≑", "\\Doteq", !0), defineSymbol(math, ams, bin, "∔", "\\dotplus", !0), defineSymbol(math, ams, bin, "∖", "\\smallsetminus"), defineSymbol(math, ams, bin, "⋒", "\\Cap", !0), defineSymbol(math, ams, bin, "⋓", "\\Cup", !0), defineSymbol(math, ams, bin, "⩞", "\\doublebarwedge", !0), defineSymbol(math, ams, bin, "⊟", "\\boxminus", !0), defineSymbol(math, ams, bin, "⊞", "\\boxplus", !0), defineSymbol(math, ams, bin, "⋇", "\\divideontimes", !0), defineSymbol(math, ams, bin, "⋉", "\\ltimes", !0), defineSymbol(math, ams, bin, "⋊", "\\rtimes", !0), defineSymbol(math, ams, bin, "⋋", "\\leftthreetimes", !0), defineSymbol(math, ams, bin, "⋌", "\\rightthreetimes", !0), defineSymbol(math, ams, bin, "⋏", "\\curlywedge", !0), defineSymbol(math, ams, bin, "⋎", "\\curlyvee", !0), defineSymbol(math, ams, bin, "⊝", "\\circleddash", !0), defineSymbol(math, ams, bin, "⊛", "\\circledast", !0), defineSymbol(math, ams, bin, "⋅", "\\centerdot"), defineSymbol(math, ams, bin, "⊺", "\\intercal", !0), defineSymbol(math, ams, bin, "⋒", "\\doublecap"), defineSymbol(math, ams, bin, "⋓", "\\doublecup"), defineSymbol(math, ams, bin, "⊠", "\\boxtimes", !0), defineSymbol(math, ams, rel, "⇢", "\\dashrightarrow", !0), defineSymbol(math, ams, rel, "⇠", "\\dashleftarrow", !0), defineSymbol(math, ams, rel, "⇇", "\\leftleftarrows", !0), defineSymbol(math, ams, rel, "⇆", "\\leftrightarrows", !0), defineSymbol(math, ams, rel, "⇚", "\\Lleftarrow", !0), defineSymbol(math, ams, rel, "↞", "\\twoheadleftarrow", !0), defineSymbol(math, ams, rel, "↢", "\\leftarrowtail", !0), defineSymbol(math, ams, rel, "↫", "\\looparrowleft", !0), defineSymbol(math, ams, rel, "⇋", "\\leftrightharpoons", !0), defineSymbol(math, ams, rel, "↶", "\\curvearrowleft", !0), defineSymbol(math, ams, rel, "↺", "\\circlearrowleft", !0), defineSymbol(math, ams, rel, "↰", "\\Lsh", !0), defineSymbol(math, ams, rel, "⇈", "\\upuparrows", !0), defineSymbol(math, ams, rel, "↿", "\\upharpoonleft", !0), defineSymbol(math, ams, rel, "⇃", "\\downharpoonleft", !0), defineSymbol(math, main, rel, "⊶", "\\origof", !0), defineSymbol(math, main, rel, "⊷", "\\imageof", !0), defineSymbol(math, ams, rel, "⊸", "\\multimap", !0), defineSymbol(math, ams, rel, "↭", "\\leftrightsquigarrow", !0), defineSymbol(math, ams, rel, "⇉", "\\rightrightarrows", !0), defineSymbol(math, ams, rel, "⇄", "\\rightleftarrows", !0), defineSymbol(math, ams, rel, "↠", "\\twoheadrightarrow", !0), defineSymbol(math, ams, rel, "↣", "\\rightarrowtail", !0), defineSymbol(math, ams, rel, "↬", "\\looparrowright", !0), defineSymbol(math, ams, rel, "↷", "\\curvearrowright", !0), defineSymbol(math, ams, rel, "↻", "\\circlearrowright", !0), defineSymbol(math, ams, rel, "↱", "\\Rsh", !0), defineSymbol(math, ams, rel, "⇊", "\\downdownarrows", !0), defineSymbol(math, ams, rel, "↾", "\\upharpoonright", !0), defineSymbol(math, ams, rel, "⇂", "\\downharpoonright", !0), defineSymbol(math, ams, rel, "⇝", "\\rightsquigarrow", !0), defineSymbol(math, ams, rel, "⇝", "\\leadsto"), defineSymbol(math, ams, rel, "⇛", "\\Rrightarrow", !0), defineSymbol(math, ams, rel, "↾", "\\restriction"), defineSymbol(math, main, textord, "‘", "`"), defineSymbol(math, main, textord, "$", "\\$"), defineSymbol(text, main, textord, "$", "\\$"), defineSymbol(text, main, textord, "$", "\\textdollar"), defineSymbol(math, main, textord, "%", "\\%"), defineSymbol(text, main, textord, "%", "\\%"), defineSymbol(math, main, textord, "_", "\\_"), defineSymbol(text, main, textord, "_", "\\_"), defineSymbol(text, main, textord, "_", "\\textunderscore"), defineSymbol(math, main, textord, "∠", "\\angle", !0), defineSymbol(math, main, textord, "∞", "\\infty", !0), defineSymbol(math, main, textord, "′", "\\prime"), defineSymbol(math, main, textord, "△", "\\triangle"), defineSymbol(math, main, textord, "Γ", "\\Gamma", !0), defineSymbol(math, main, textord, "Δ", "\\Delta", !0), defineSymbol(math, main, textord, "Θ", "\\Theta", !0), defineSymbol(math, main, textord, "Λ", "\\Lambda", !0), defineSymbol(math, main, textord, "Ξ", "\\Xi", !0), defineSymbol(math, main, textord, "Π", "\\Pi", !0), defineSymbol(math, main, textord, "Σ", "\\Sigma", !0), defineSymbol(math, main, textord, "Υ", "\\Upsilon", !0), defineSymbol(math, main, textord, "Φ", "\\Phi", !0), defineSymbol(math, main, textord, "Ψ", "\\Psi", !0), defineSymbol(math, main, textord, "Ω", "\\Omega", !0), defineSymbol(math, main, textord, "A", "Α"), defineSymbol(math, main, textord, "B", "Β"), defineSymbol(math, main, textord, "E", "Ε"), defineSymbol(math, main, textord, "Z", "Ζ"), defineSymbol(math, main, textord, "H", "Η"), defineSymbol(math, main, textord, "I", "Ι"), defineSymbol(math, main, textord, "K", "Κ"), defineSymbol(math, main, textord, "M", "Μ"), defineSymbol(math, main, textord, "N", "Ν"), defineSymbol(math, main, textord, "O", "Ο"), defineSymbol(math, main, textord, "P", "Ρ"), defineSymbol(math, main, textord, "T", "Τ"), defineSymbol(math, main, textord, "X", "Χ"), defineSymbol(math, main, textord, "¬", "\\neg", !0), defineSymbol(math, main, textord, "¬", "\\lnot"), defineSymbol(math, main, textord, "⊤", "\\top"), defineSymbol(math, main, textord, "⊥", "\\bot"), defineSymbol(math, main, textord, "∅", "\\emptyset"), defineSymbol(math, ams, textord, "∅", "\\varnothing"), defineSymbol(math, main, mathord, "α", "\\alpha", !0), defineSymbol(math, main, mathord, "β", "\\beta", !0), defineSymbol(math, main, mathord, "γ", "\\gamma", !0), defineSymbol(math, main, mathord, "δ", "\\delta", !0), defineSymbol(math, main, mathord, "ϵ", "\\epsilon", !0), defineSymbol(math, main, mathord, "ζ", "\\zeta", !0), defineSymbol(math, main, mathord, "η", "\\eta", !0), defineSymbol(math, main, mathord, "θ", "\\theta", !0), defineSymbol(math, main, mathord, "ι", "\\iota", !0), defineSymbol(math, main, mathord, "κ", "\\kappa", !0), defineSymbol(math, main, mathord, "λ", "\\lambda", !0), defineSymbol(math, main, mathord, "μ", "\\mu", !0), defineSymbol(math, main, mathord, "ν", "\\nu", !0), defineSymbol(math, main, mathord, "ξ", "\\xi", !0), defineSymbol(math, main, mathord, "ο", "\\omicron", !0), defineSymbol(math, main, mathord, "π", "\\pi", !0), defineSymbol(math, main, mathord, "ρ", "\\rho", !0), defineSymbol(math, main, mathord, "σ", "\\sigma", !0), defineSymbol(math, main, mathord, "τ", "\\tau", !0), defineSymbol(math, main, mathord, "υ", "\\upsilon", !0), defineSymbol(math, main, mathord, "ϕ", "\\phi", !0), defineSymbol(math, main, mathord, "χ", "\\chi", !0), defineSymbol(math, main, mathord, "ψ", "\\psi", !0), defineSymbol(math, main, mathord, "ω", "\\omega", !0), defineSymbol(math, main, mathord, "ε", "\\varepsilon", !0), defineSymbol(math, main, mathord, "ϑ", "\\vartheta", !0), defineSymbol(math, main, mathord, "ϖ", "\\varpi", !0), defineSymbol(math, main, mathord, "ϱ", "\\varrho", !0), defineSymbol(math, main, mathord, "ς", "\\varsigma", !0), defineSymbol(math, main, mathord, "φ", "\\varphi", !0), defineSymbol(math, main, bin, "∗", "*", !0), defineSymbol(math, main, bin, "+", "+"), defineSymbol(math, main, bin, "−", "-", !0), defineSymbol(math, main, bin, "⋅", "\\cdot", !0), defineSymbol(math, main, bin, "∘", "\\circ", !0), defineSymbol(math, main, bin, "÷", "\\div", !0), defineSymbol(math, main, bin, "±", "\\pm", !0), defineSymbol(math, main, bin, "×", "\\times", !0), defineSymbol(math, main, bin, "∩", "\\cap", !0), defineSymbol(math, main, bin, "∪", "\\cup", !0), defineSymbol(math, main, bin, "∖", "\\setminus", !0), defineSymbol(math, main, bin, "∧", "\\land"), defineSymbol(math, main, bin, "∨", "\\lor"), defineSymbol(math, main, bin, "∧", "\\wedge", !0), defineSymbol(math, main, bin, "∨", "\\vee", !0), defineSymbol(math, main, textord, "√", "\\surd"), defineSymbol(math, main, open, "⟨", "\\langle", !0), defineSymbol(math, main, open, "∣", "\\lvert"), defineSymbol(math, main, open, "∥", "\\lVert"), defineSymbol(math, main, close, "?", "?"), defineSymbol(math, main, close, "!", "!"), defineSymbol(math, main, close, "⟩", "\\rangle", !0), defineSymbol(math, main, close, "∣", "\\rvert"), defineSymbol(math, main, close, "∥", "\\rVert"), defineSymbol(math, main, rel, "=", "="), defineSymbol(math, main, rel, ":", ":"), defineSymbol(math, main, rel, "≈", "\\approx", !0), defineSymbol(math, main, rel, "≅", "\\cong", !0), defineSymbol(math, main, rel, "≥", "\\ge"), defineSymbol(math, main, rel, "≥", "\\geq", !0), defineSymbol(math, main, rel, "←", "\\gets"), defineSymbol(math, main, rel, ">", "\\gt", !0), defineSymbol(math, main, rel, "∈", "\\in", !0), defineSymbol(math, main, rel, "", "\\@not"), defineSymbol(math, main, rel, "⊂", "\\subset", !0), defineSymbol(math, main, rel, "⊃", "\\supset", !0), defineSymbol(math, main, rel, "⊆", "\\subseteq", !0), defineSymbol(math, main, rel, "⊇", "\\supseteq", !0), defineSymbol(math, ams, rel, "⊈", "\\nsubseteq", !0), defineSymbol(math, ams, rel, "⊉", "\\nsupseteq", !0), defineSymbol(math, main, rel, "⊨", "\\models"), defineSymbol(math, main, rel, "←", "\\leftarrow", !0), defineSymbol(math, main, rel, "≤", "\\le"), defineSymbol(math, main, rel, "≤", "\\leq", !0), defineSymbol(math, main, rel, "<", "\\lt", !0), defineSymbol(math, main, rel, "→", "\\rightarrow", !0), defineSymbol(math, main, rel, "→", "\\to"), defineSymbol(math, ams, rel, "≱", "\\ngeq", !0), defineSymbol(math, ams, rel, "≰", "\\nleq", !0), defineSymbol(math, main, spacing, "\xA0", "\\ "), defineSymbol(math, main, spacing, "\xA0", "\\space"), defineSymbol(math, main, spacing, "\xA0", "\\nobreakspace"), defineSymbol(text, main, spacing, "\xA0", "\\ "), defineSymbol(text, main, spacing, "\xA0", " "), defineSymbol(text, main, spacing, "\xA0", "\\space"), defineSymbol(text, main, spacing, "\xA0", "\\nobreakspace"), defineSymbol(math, main, spacing, null, "\\nobreak"), defineSymbol(math, main, spacing, null, "\\allowbreak"), defineSymbol(math, main, punct, ",", ","), defineSymbol(math, main, punct, ";", ";"), defineSymbol(math, ams, bin, "⊼", "\\barwedge", !0), defineSymbol(math, ams, bin, "⊻", "\\veebar", !0), defineSymbol(math, main, bin, "⊙", "\\odot", !0), defineSymbol(math, main, bin, "⊕", "\\oplus", !0), defineSymbol(math, main, bin, "⊗", "\\otimes", !0), defineSymbol(math, main, textord, "∂", "\\partial", !0), defineSymbol(math, main, bin, "⊘", "\\oslash", !0), defineSymbol(math, ams, bin, "⊚", "\\circledcirc", !0), defineSymbol(math, ams, bin, "⊡", "\\boxdot", !0), defineSymbol(math, main, bin, "△", "\\bigtriangleup"), defineSymbol(math, main, bin, "▽", "\\bigtriangledown"), defineSymbol(math, main, bin, "†", "\\dagger"), defineSymbol(math, main, bin, "⋄", "\\diamond"), defineSymbol(math, main, bin, "⋆", "\\star"), defineSymbol(math, main, bin, "◃", "\\triangleleft"), defineSymbol(math, main, bin, "▹", "\\triangleright"), defineSymbol(math, main, open, "{", "\\{"), defineSymbol(text, main, textord, "{", "\\{"), defineSymbol(text, main, textord, "{", "\\textbraceleft"), defineSymbol(math, main, close, "}", "\\}"), defineSymbol(text, main, textord, "}", "\\}"), defineSymbol(text, main, textord, "}", "\\textbraceright"), defineSymbol(math, main, open, "{", "\\lbrace"), defineSymbol(math, main, close, "}", "\\rbrace"), defineSymbol(math, main, open, "[", "\\lbrack", !0), defineSymbol(text, main, textord, "[", "\\lbrack", !0), defineSymbol(math, main, close, "]", "\\rbrack", !0), defineSymbol(text, main, textord, "]", "\\rbrack", !0), defineSymbol(math, main, open, "(", "\\lparen", !0), defineSymbol(math, main, close, ")", "\\rparen", !0), defineSymbol(text, main, textord, "<", "\\textless", !0), defineSymbol(text, main, textord, ">", "\\textgreater", !0), defineSymbol(math, main, open, "⌊", "\\lfloor", !0), defineSymbol(math, main, close, "⌋", "\\rfloor", !0), defineSymbol(math, main, open, "⌈", "\\lceil", !0), defineSymbol(math, main, close, "⌉", "\\rceil", !0), defineSymbol(math, main, textord, "\\", "\\backslash"), defineSymbol(math, main, textord, "∣", "|"), defineSymbol(math, main, textord, "∣", "\\vert"), defineSymbol(text, main, textord, "|", "\\textbar", !0), defineSymbol(math, main, textord, "∥", "\\|"), defineSymbol(math, main, textord, "∥", "\\Vert"), defineSymbol(text, main, textord, "∥", "\\textbardbl"), defineSymbol(text, main, textord, "~", "\\textasciitilde"), defineSymbol(text, main, textord, "\\", "\\textbackslash"), defineSymbol(text, main, textord, "^", "\\textasciicircum"), defineSymbol(math, main, rel, "↑", "\\uparrow", !0), defineSymbol(math, main, rel, "⇑", "\\Uparrow", !0), defineSymbol(math, main, rel, "↓", "\\downarrow", !0), defineSymbol(math, main, rel, "⇓", "\\Downarrow", !0), defineSymbol(math, main, rel, "↕", "\\updownarrow", !0), defineSymbol(math, main, rel, "⇕", "\\Updownarrow", !0), defineSymbol(math, main, op, "∐", "\\coprod"), defineSymbol(math, main, op, "⋁", "\\bigvee"), defineSymbol(math, main, op, "⋀", "\\bigwedge"), defineSymbol(math, main, op, "⨄", "\\biguplus"), defineSymbol(math, main, op, "⋂", "\\bigcap"), defineSymbol(math, main, op, "⋃", "\\bigcup"), defineSymbol(math, main, op, "∫", "\\int"), defineSymbol(math, main, op, "∫", "\\intop"), defineSymbol(math, main, op, "∬", "\\iint"), defineSymbol(math, main, op, "∭", "\\iiint"), defineSymbol(math, main, op, "∏", "\\prod"), defineSymbol(math, main, op, "∑", "\\sum"), defineSymbol(math, main, op, "⨂", "\\bigotimes"), defineSymbol(math, main, op, "⨁", "\\bigoplus"), defineSymbol(math, main, op, "⨀", "\\bigodot"), defineSymbol(math, main, op, "∮", "\\oint"), defineSymbol(math, main, op, "∯", "\\oiint"), defineSymbol(math, main, op, "∰", "\\oiiint"), defineSymbol(math, main, op, "⨆", "\\bigsqcup"), defineSymbol(math, main, op, "∫", "\\smallint"), defineSymbol(text, main, inner, "…", "\\textellipsis"), defineSymbol(math, main, inner, "…", "\\mathellipsis"), defineSymbol(text, main, inner, "…", "\\ldots", !0), defineSymbol(math, main, inner, "…", "\\ldots", !0), defineSymbol(math, main, inner, "⋯", "\\@cdots", !0), defineSymbol(math, main, inner, "⋱", "\\ddots", !0), defineSymbol(math, main, textord, "⋮", "\\varvdots"), defineSymbol(text, main, textord, "⋮", "\\varvdots"), defineSymbol(math, main, accent, "ˊ", "\\acute"), defineSymbol(math, main, accent, "ˋ", "\\grave"), defineSymbol(math, main, accent, "¨", "\\ddot"), defineSymbol(math, main, accent, "~", "\\tilde"), defineSymbol(math, main, accent, "ˉ", "\\bar"), defineSymbol(math, main, accent, "˘", "\\breve"), defineSymbol(math, main, accent, "ˇ", "\\check"), defineSymbol(math, main, accent, "^", "\\hat"), defineSymbol(math, main, accent, "⃗", "\\vec"), defineSymbol(math, main, accent, "˙", "\\dot"), defineSymbol(math, main, accent, "˚", "\\mathring"), defineSymbol(math, main, mathord, "", "\\@imath"), defineSymbol(math, main, mathord, "", "\\@jmath"), defineSymbol(math, main, textord, "ı", "ı"), defineSymbol(math, main, textord, "ȷ", "ȷ"), defineSymbol(text, main, textord, "ı", "\\i", !0), defineSymbol(text, main, textord, "ȷ", "\\j", !0), defineSymbol(text, main, textord, "ß", "\\ss", !0), defineSymbol(text, main, textord, "æ", "\\ae", !0), defineSymbol(text, main, textord, "œ", "\\oe", !0), defineSymbol(text, main, textord, "ø", "\\o", !0), defineSymbol(text, main, textord, "Æ", "\\AE", !0), defineSymbol(text, main, textord, "Œ", "\\OE", !0), defineSymbol(text, main, textord, "Ø", "\\O", !0), defineSymbol(text, main, accent, "ˊ", "\\'"), defineSymbol(text, main, accent, "ˋ", "\\`"), defineSymbol(text, main, accent, "ˆ", "\\^"), defineSymbol(text, main, accent, "˜", "\\~"), defineSymbol(text, main, accent, "ˉ", "\\="), defineSymbol(text, main, accent, "˘", "\\u"), defineSymbol(text, main, accent, "˙", "\\."), defineSymbol(text, main, accent, "¸", "\\c"), defineSymbol(text, main, accent, "˚", "\\r"), defineSymbol(text, main, accent, "ˇ", "\\v"), defineSymbol(text, main, accent, "¨", "\\\""), defineSymbol(text, main, accent, "˝", "\\H"), defineSymbol(text, main, accent, "◯", "\\textcircled");
15233
+ var ligatures = {
15234
+ "--": !0,
15235
+ "---": !0,
15236
+ "``": !0,
15237
+ "''": !0
15238
+ };
15239
+ defineSymbol(text, main, textord, "–", "--", !0), defineSymbol(text, main, textord, "–", "\\textendash"), defineSymbol(text, main, textord, "—", "---", !0), defineSymbol(text, main, textord, "—", "\\textemdash"), defineSymbol(text, main, textord, "‘", "`", !0), defineSymbol(text, main, textord, "‘", "\\textquoteleft"), defineSymbol(text, main, textord, "’", "'", !0), defineSymbol(text, main, textord, "’", "\\textquoteright"), defineSymbol(text, main, textord, "“", "``", !0), defineSymbol(text, main, textord, "“", "\\textquotedblleft"), defineSymbol(text, main, textord, "”", "''", !0), defineSymbol(text, main, textord, "”", "\\textquotedblright"), defineSymbol(math, main, textord, "°", "\\degree", !0), defineSymbol(text, main, textord, "°", "\\degree"), defineSymbol(text, main, textord, "°", "\\textdegree", !0), defineSymbol(math, main, textord, "£", "\\pounds"), defineSymbol(math, main, textord, "£", "\\mathsterling", !0), defineSymbol(text, main, textord, "£", "\\pounds"), defineSymbol(text, main, textord, "£", "\\textsterling", !0), defineSymbol(math, ams, textord, "✠", "\\maltese"), defineSymbol(text, ams, textord, "✠", "\\maltese");
15240
+ for (var mathTextSymbols = "0123456789/@.\"", i = 0; i < mathTextSymbols.length; i++) {
15241
+ var ch = mathTextSymbols.charAt(i);
15242
+ defineSymbol(math, main, textord, ch, ch);
15243
+ }
15244
+ for (var textSymbols = "0123456789!@*()-=+\";:?/.,", _i = 0; _i < textSymbols.length; _i++) {
15245
+ var _ch = textSymbols.charAt(_i);
15246
+ defineSymbol(text, main, textord, _ch, _ch);
15247
+ }
15248
+ for (var letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", _i2 = 0; _i2 < letters.length; _i2++) {
15249
+ var _ch2 = letters.charAt(_i2);
15250
+ defineSymbol(math, main, mathord, _ch2, _ch2), defineSymbol(text, main, textord, _ch2, _ch2);
15251
+ }
15252
+ defineSymbol(math, ams, textord, "C", "ℂ"), defineSymbol(text, ams, textord, "C", "ℂ"), defineSymbol(math, ams, textord, "H", "ℍ"), defineSymbol(text, ams, textord, "H", "ℍ"), defineSymbol(math, ams, textord, "N", "ℕ"), defineSymbol(text, ams, textord, "N", "ℕ"), defineSymbol(math, ams, textord, "P", "ℙ"), defineSymbol(text, ams, textord, "P", "ℙ"), defineSymbol(math, ams, textord, "Q", "ℚ"), defineSymbol(text, ams, textord, "Q", "ℚ"), defineSymbol(math, ams, textord, "R", "ℝ"), defineSymbol(text, ams, textord, "R", "ℝ"), defineSymbol(math, ams, textord, "Z", "ℤ"), defineSymbol(text, ams, textord, "Z", "ℤ"), defineSymbol(math, main, mathord, "h", "ℎ"), defineSymbol(text, main, mathord, "h", "ℎ");
15253
+ for (var wideChar = "", _i3 = 0; _i3 < letters.length; _i3++) {
15254
+ var _ch3 = letters.charAt(_i3);
15255
+ wideChar = String.fromCharCode(55349, 56320 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56372 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56424 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56580 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56684 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56736 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56788 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56840 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56944 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), _i3 < 26 && (wideChar = String.fromCharCode(55349, 56632 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56476 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar));
15256
+ }
15257
+ wideChar = String.fromCharCode(55349, 56668), defineSymbol(math, main, mathord, "k", wideChar), defineSymbol(text, main, textord, "k", wideChar);
15258
+ for (var _i4 = 0; _i4 < 10; _i4++) {
15259
+ var _ch4 = _i4.toString();
15260
+ wideChar = String.fromCharCode(55349, 57294 + _i4), defineSymbol(math, main, mathord, _ch4, wideChar), defineSymbol(text, main, textord, _ch4, wideChar), wideChar = String.fromCharCode(55349, 57314 + _i4), defineSymbol(math, main, mathord, _ch4, wideChar), defineSymbol(text, main, textord, _ch4, wideChar), wideChar = String.fromCharCode(55349, 57324 + _i4), defineSymbol(math, main, mathord, _ch4, wideChar), defineSymbol(text, main, textord, _ch4, wideChar), wideChar = String.fromCharCode(55349, 57334 + _i4), defineSymbol(math, main, mathord, _ch4, wideChar), defineSymbol(text, main, textord, _ch4, wideChar);
15261
+ }
15262
+ for (var extraLatin = "ÐÞþ", _i5 = 0; _i5 < extraLatin.length; _i5++) {
15263
+ var _ch5 = extraLatin.charAt(_i5);
15264
+ defineSymbol(math, main, mathord, _ch5, _ch5), defineSymbol(text, main, textord, _ch5, _ch5);
15265
+ }
15266
+ var wideLatinLetterData = [
15029
15267
  [
15030
- 1,
15031
- 1,
15032
- 1
15268
+ "mathbf",
15269
+ "textbf",
15270
+ "Main-Bold"
15033
15271
  ],
15034
15272
  [
15035
- 2,
15036
- 1,
15037
- 1
15273
+ "mathbf",
15274
+ "textbf",
15275
+ "Main-Bold"
15038
15276
  ],
15039
15277
  [
15040
- 3,
15041
- 1,
15042
- 1
15278
+ "mathnormal",
15279
+ "textit",
15280
+ "Math-Italic"
15043
15281
  ],
15044
15282
  [
15045
- 4,
15046
- 2,
15047
- 1
15283
+ "mathnormal",
15284
+ "textit",
15285
+ "Math-Italic"
15048
15286
  ],
15049
15287
  [
15050
- 5,
15051
- 2,
15052
- 1
15288
+ "boldsymbol",
15289
+ "boldsymbol",
15290
+ "Main-BoldItalic"
15053
15291
  ],
15054
15292
  [
15055
- 6,
15056
- 3,
15057
- 1
15293
+ "boldsymbol",
15294
+ "boldsymbol",
15295
+ "Main-BoldItalic"
15058
15296
  ],
15059
15297
  [
15060
- 7,
15061
- 4,
15062
- 2
15063
- ],
15064
- [
15065
- 8,
15066
- 6,
15067
- 3
15068
- ],
15069
- [
15070
- 9,
15071
- 7,
15072
- 6
15073
- ],
15074
- [
15075
- 10,
15076
- 8,
15077
- 7
15078
- ],
15079
- [
15080
- 11,
15081
- 10,
15082
- 9
15083
- ]
15084
- ], sizeMultipliers = [
15085
- .5,
15086
- .6,
15087
- .7,
15088
- .8,
15089
- .9,
15090
- 1,
15091
- 1.2,
15092
- 1.44,
15093
- 1.728,
15094
- 2.074,
15095
- 2.488
15096
- ], sizeAtStyle = function(e, t) {
15097
- return t.size < 2 ? e : sizeStyleMap[e - 1][t.size - 1];
15098
- }, Options = class e {
15099
- constructor(t) {
15100
- this.style = void 0, this.color = void 0, this.size = void 0, this.textSize = void 0, this.phantom = void 0, this.font = void 0, this.fontFamily = void 0, this.fontWeight = void 0, this.fontShape = void 0, this.sizeMultiplier = void 0, this.maxSize = void 0, this.minRuleThickness = void 0, this._fontMetrics = void 0, this.style = t.style, this.color = t.color, this.size = t.size || e.BASESIZE, this.textSize = t.textSize || this.size, this.phantom = !!t.phantom, this.font = t.font || "", this.fontFamily = t.fontFamily || "", this.fontWeight = t.fontWeight || "", this.fontShape = t.fontShape || "", this.sizeMultiplier = sizeMultipliers[this.size - 1], this.maxSize = t.maxSize, this.minRuleThickness = t.minRuleThickness, this._fontMetrics = void 0;
15101
- }
15102
- extend(t) {
15103
- var n = {
15104
- style: this.style,
15105
- size: this.size,
15106
- textSize: this.textSize,
15107
- color: this.color,
15108
- phantom: this.phantom,
15109
- font: this.font,
15110
- fontFamily: this.fontFamily,
15111
- fontWeight: this.fontWeight,
15112
- fontShape: this.fontShape,
15113
- maxSize: this.maxSize,
15114
- minRuleThickness: this.minRuleThickness
15115
- };
15116
- for (var r in t) t.hasOwnProperty(r) && (n[r] = t[r]);
15117
- return new e(n);
15118
- }
15119
- havingStyle(e) {
15120
- return this.style === e ? this : this.extend({
15121
- style: e,
15122
- size: sizeAtStyle(this.textSize, e)
15123
- });
15124
- }
15125
- havingCrampedStyle() {
15126
- return this.havingStyle(this.style.cramp());
15127
- }
15128
- havingSize(e) {
15129
- return this.size === e && this.textSize === e ? this : this.extend({
15130
- style: this.style.text(),
15131
- size: e,
15132
- textSize: e,
15133
- sizeMultiplier: sizeMultipliers[e - 1]
15134
- });
15135
- }
15136
- havingBaseStyle(t) {
15137
- t ||= this.style.text();
15138
- var n = sizeAtStyle(e.BASESIZE, t);
15139
- return this.size === n && this.textSize === e.BASESIZE && this.style === t ? this : this.extend({
15140
- style: t,
15141
- size: n
15142
- });
15143
- }
15144
- havingBaseSizing() {
15145
- var e;
15146
- switch (this.style.id) {
15147
- case 4:
15148
- case 5:
15149
- e = 3;
15150
- break;
15151
- case 6:
15152
- case 7:
15153
- e = 1;
15154
- break;
15155
- default: e = 6;
15156
- }
15157
- return this.extend({
15158
- style: this.style.text(),
15159
- size: e
15160
- });
15161
- }
15162
- withColor(e) {
15163
- return this.extend({ color: e });
15164
- }
15165
- withPhantom() {
15166
- return this.extend({ phantom: !0 });
15167
- }
15168
- withFont(e) {
15169
- return this.extend({ font: e });
15170
- }
15171
- withTextFontFamily(e) {
15172
- return this.extend({
15173
- fontFamily: e,
15174
- font: ""
15175
- });
15176
- }
15177
- withTextFontWeight(e) {
15178
- return this.extend({
15179
- fontWeight: e,
15180
- font: ""
15181
- });
15182
- }
15183
- withTextFontShape(e) {
15184
- return this.extend({
15185
- fontShape: e,
15186
- font: ""
15187
- });
15188
- }
15189
- sizingClasses(e) {
15190
- return e.size === this.size ? [] : [
15191
- "sizing",
15192
- "reset-size" + e.size,
15193
- "size" + this.size
15194
- ];
15195
- }
15196
- baseSizingClasses() {
15197
- return this.size === e.BASESIZE ? [] : [
15198
- "sizing",
15199
- "reset-size" + this.size,
15200
- "size" + e.BASESIZE
15201
- ];
15202
- }
15203
- fontMetrics() {
15204
- return this._fontMetrics ||= getGlobalMetrics(this.size), this._fontMetrics;
15205
- }
15206
- getColor() {
15207
- return this.phantom ? "transparent" : this.color;
15208
- }
15209
- };
15210
- Options.BASESIZE = 6;
15211
- var ptPerUnit = {
15212
- pt: 1,
15213
- mm: 7227 / 2540,
15214
- cm: 7227 / 254,
15215
- in: 72.27,
15216
- bp: 803 / 800,
15217
- pc: 12,
15218
- dd: 1238 / 1157,
15219
- cc: 14856 / 1157,
15220
- nd: 685 / 642,
15221
- nc: 1370 / 107,
15222
- sp: 1 / 65536,
15223
- px: 803 / 800
15224
- }, relativeUnit = {
15225
- ex: !0,
15226
- em: !0,
15227
- mu: !0
15228
- }, validUnit = function(e) {
15229
- return typeof e != "string" && (e = e.unit), e in ptPerUnit || e in relativeUnit || e === "ex";
15230
- }, calculateSize = function(e, t) {
15231
- var r;
15232
- if (e.unit in ptPerUnit) r = ptPerUnit[e.unit] / t.fontMetrics().ptPerEm / t.sizeMultiplier;
15233
- else if (e.unit === "mu") r = t.fontMetrics().cssEmPerMu;
15234
- else {
15235
- var a = t.style.isTight() ? t.havingStyle(t.style.text()) : t;
15236
- if (e.unit === "ex") r = a.fontMetrics().xHeight;
15237
- else if (e.unit === "em") r = a.fontMetrics().quad;
15238
- else throw new ParseError("Invalid unit: '" + e.unit + "'");
15239
- a !== t && (r *= a.sizeMultiplier / t.sizeMultiplier);
15240
- }
15241
- return Math.min(e.number * r, t.maxSize);
15242
- }, makeEm = function(e) {
15243
- return +e.toFixed(4) + "em";
15244
- }, createClass = function(e) {
15245
- return e.filter((e) => e).join(" ");
15246
- }, initNode = function(e, t, n) {
15247
- if (this.classes = e || [], this.attributes = {}, this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = n || {}, t) {
15248
- t.style.isTight() && this.classes.push("mtight");
15249
- var r = t.getColor();
15250
- r && (this.style.color = r);
15251
- }
15252
- }, toNode = function(e) {
15253
- var t = document.createElement(e);
15254
- for (var n in t.className = createClass(this.classes), this.style) this.style.hasOwnProperty(n) && (t.style[n] = this.style[n]);
15255
- for (var r in this.attributes) this.attributes.hasOwnProperty(r) && t.setAttribute(r, this.attributes[r]);
15256
- for (var a = 0; a < this.children.length; a++) t.appendChild(this.children[a].toNode());
15257
- return t;
15258
- }, invalidAttributeNameRegex = /[\s"'>/=\x00-\x1f]/, toMarkup = function(e) {
15259
- var t = "<" + e;
15260
- this.classes.length && (t += " class=\"" + escape(createClass(this.classes)) + "\"");
15261
- var r = "";
15262
- for (var o in this.style) this.style.hasOwnProperty(o) && (r += hyphenate(o) + ":" + this.style[o] + ";");
15263
- for (var s in r && (t += " style=\"" + escape(r) + "\""), this.attributes) if (this.attributes.hasOwnProperty(s)) {
15264
- if (invalidAttributeNameRegex.test(s)) throw new ParseError("Invalid attribute name '" + s + "'");
15265
- t += " " + s + "=\"" + escape(this.attributes[s]) + "\"";
15266
- }
15267
- t += ">";
15268
- for (var l = 0; l < this.children.length; l++) t += this.children[l].toMarkup();
15269
- return t += "</" + e + ">", t;
15270
- }, Span = class {
15271
- constructor(e, t, n, r) {
15272
- this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.width = void 0, this.maxFontSize = void 0, this.style = void 0, initNode.call(this, e, n, r), this.children = t || [];
15273
- }
15274
- setAttribute(e, t) {
15275
- this.attributes[e] = t;
15276
- }
15277
- hasClass(e) {
15278
- return this.classes.includes(e);
15279
- }
15280
- toNode() {
15281
- return toNode.call(this, "span");
15282
- }
15283
- toMarkup() {
15284
- return toMarkup.call(this, "span");
15285
- }
15286
- }, Anchor = class {
15287
- constructor(e, t, n, r) {
15288
- this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, initNode.call(this, t, r), this.children = n || [], this.setAttribute("href", e);
15289
- }
15290
- setAttribute(e, t) {
15291
- this.attributes[e] = t;
15292
- }
15293
- hasClass(e) {
15294
- return this.classes.includes(e);
15295
- }
15296
- toNode() {
15297
- return toNode.call(this, "a");
15298
- }
15299
- toMarkup() {
15300
- return toMarkup.call(this, "a");
15301
- }
15302
- }, Img = class {
15303
- constructor(e, t, n) {
15304
- this.src = void 0, this.alt = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.alt = t, this.src = e, this.classes = ["mord"], this.style = n;
15305
- }
15306
- hasClass(e) {
15307
- return this.classes.includes(e);
15308
- }
15309
- toNode() {
15310
- var e = document.createElement("img");
15311
- for (var t in e.src = this.src, e.alt = this.alt, e.className = "mord", this.style) this.style.hasOwnProperty(t) && (e.style[t] = this.style[t]);
15312
- return e;
15313
- }
15314
- toMarkup() {
15315
- var e = "<img src=\"" + escape(this.src) + "\"" + (" alt=\"" + escape(this.alt) + "\""), t = "";
15316
- for (var n in this.style) this.style.hasOwnProperty(n) && (t += hyphenate(n) + ":" + this.style[n] + ";");
15317
- return t && (e += " style=\"" + escape(t) + "\""), e += "'/>", e;
15318
- }
15319
- }, iCombinations = {
15320
- î: "ı̂",
15321
- ï: "ı̈",
15322
- í: "ı́",
15323
- ì: "ı̀"
15324
- }, SymbolNode = class {
15325
- constructor(e, t, n, r, a, o, s, c) {
15326
- this.text = void 0, this.height = void 0, this.depth = void 0, this.italic = void 0, this.skew = void 0, this.width = void 0, this.maxFontSize = void 0, this.classes = void 0, this.style = void 0, this.text = e, this.height = t || 0, this.depth = n || 0, this.italic = r || 0, this.skew = a || 0, this.width = o || 0, this.classes = s || [], this.style = c || {}, this.maxFontSize = 0;
15327
- var l = scriptFromCodepoint(this.text.charCodeAt(0));
15328
- l && this.classes.push(l + "_fallback"), /[îïíì]/.test(this.text) && (this.text = iCombinations[this.text]);
15329
- }
15330
- hasClass(e) {
15331
- return this.classes.includes(e);
15332
- }
15333
- toNode() {
15334
- var e = document.createTextNode(this.text), t = null;
15335
- for (var n in this.italic > 0 && (t = document.createElement("span"), t.style.marginRight = makeEm(this.italic)), this.classes.length > 0 && (t ||= document.createElement("span"), t.className = createClass(this.classes)), this.style) this.style.hasOwnProperty(n) && (t ||= document.createElement("span"), t.style[n] = this.style[n]);
15336
- return t ? (t.appendChild(e), t) : e;
15337
- }
15338
- toMarkup() {
15339
- var e = !1, t = "<span";
15340
- this.classes.length && (e = !0, t += " class=\"", t += escape(createClass(this.classes)), t += "\"");
15341
- var n = "";
15342
- for (var r in this.italic > 0 && (n += "margin-right:" + this.italic + "em;"), this.style) this.style.hasOwnProperty(r) && (n += hyphenate(r) + ":" + this.style[r] + ";");
15343
- n && (e = !0, t += " style=\"" + escape(n) + "\"");
15344
- var o = escape(this.text);
15345
- return e ? (t += ">", t += o, t += "</span>", t) : o;
15346
- }
15347
- }, SvgNode = class {
15348
- constructor(e, t) {
15349
- this.children = void 0, this.attributes = void 0, this.children = e || [], this.attributes = t || {};
15350
- }
15351
- toNode() {
15352
- var e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
15353
- for (var t in this.attributes) Object.prototype.hasOwnProperty.call(this.attributes, t) && e.setAttribute(t, this.attributes[t]);
15354
- for (var n = 0; n < this.children.length; n++) e.appendChild(this.children[n].toNode());
15355
- return e;
15356
- }
15357
- toMarkup() {
15358
- var e = "<svg xmlns=\"http://www.w3.org/2000/svg\"";
15359
- for (var t in this.attributes) Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + "=\"" + escape(this.attributes[t]) + "\"");
15360
- e += ">";
15361
- for (var n = 0; n < this.children.length; n++) e += this.children[n].toMarkup();
15362
- return e += "</svg>", e;
15363
- }
15364
- }, PathNode = class {
15365
- constructor(e, t) {
15366
- this.pathName = void 0, this.alternate = void 0, this.pathName = e, this.alternate = t;
15367
- }
15368
- toNode() {
15369
- var e = document.createElementNS("http://www.w3.org/2000/svg", "path");
15370
- return this.alternate ? e.setAttribute("d", this.alternate) : e.setAttribute("d", path[this.pathName]), e;
15371
- }
15372
- toMarkup() {
15373
- return this.alternate ? "<path d=\"" + escape(this.alternate) + "\"/>" : "<path d=\"" + escape(path[this.pathName]) + "\"/>";
15374
- }
15375
- }, LineNode = class {
15376
- constructor(e) {
15377
- this.attributes = void 0, this.attributes = e || {};
15378
- }
15379
- toNode() {
15380
- var e = document.createElementNS("http://www.w3.org/2000/svg", "line");
15381
- for (var t in this.attributes) Object.prototype.hasOwnProperty.call(this.attributes, t) && e.setAttribute(t, this.attributes[t]);
15382
- return e;
15383
- }
15384
- toMarkup() {
15385
- var e = "<line";
15386
- for (var t in this.attributes) Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + "=\"" + escape(this.attributes[t]) + "\"");
15387
- return e += "/>", e;
15388
- }
15389
- };
15390
- function assertSymbolDomNode(e) {
15391
- if (e instanceof SymbolNode) return e;
15392
- throw Error("Expected symbolNode but got " + String(e) + ".");
15393
- }
15394
- function assertSpan(e) {
15395
- if (e instanceof Span) return e;
15396
- throw Error("Expected span<HtmlDomNode> but got " + String(e) + ".");
15397
- }
15398
- var ATOMS = {
15399
- bin: 1,
15400
- close: 1,
15401
- inner: 1,
15402
- open: 1,
15403
- punct: 1,
15404
- rel: 1
15405
- }, NON_ATOMS = {
15406
- "accent-token": 1,
15407
- mathord: 1,
15408
- "op-token": 1,
15409
- spacing: 1,
15410
- textord: 1
15411
- }, symbols = {
15412
- math: {},
15413
- text: {}
15414
- };
15415
- function defineSymbol(e, t, n, r, a, o) {
15416
- symbols[e][a] = {
15417
- font: t,
15418
- group: n,
15419
- replace: r
15420
- }, o && r && (symbols[e][r] = symbols[e][a]);
15421
- }
15422
- var math = "math", text = "text", main = "main", ams = "ams", accent = "accent-token", bin = "bin", close = "close", inner = "inner", mathord = "mathord", op = "op-token", open = "open", punct = "punct", rel = "rel", spacing = "spacing", textord = "textord";
15423
- defineSymbol(math, main, rel, "≡", "\\equiv", !0), defineSymbol(math, main, rel, "≺", "\\prec", !0), defineSymbol(math, main, rel, "≻", "\\succ", !0), defineSymbol(math, main, rel, "∼", "\\sim", !0), defineSymbol(math, main, rel, "⊥", "\\perp"), defineSymbol(math, main, rel, "⪯", "\\preceq", !0), defineSymbol(math, main, rel, "⪰", "\\succeq", !0), defineSymbol(math, main, rel, "≃", "\\simeq", !0), defineSymbol(math, main, rel, "∣", "\\mid", !0), defineSymbol(math, main, rel, "≪", "\\ll", !0), defineSymbol(math, main, rel, "≫", "\\gg", !0), defineSymbol(math, main, rel, "≍", "\\asymp", !0), defineSymbol(math, main, rel, "∥", "\\parallel"), defineSymbol(math, main, rel, "⋈", "\\bowtie", !0), defineSymbol(math, main, rel, "⌣", "\\smile", !0), defineSymbol(math, main, rel, "⊑", "\\sqsubseteq", !0), defineSymbol(math, main, rel, "⊒", "\\sqsupseteq", !0), defineSymbol(math, main, rel, "≐", "\\doteq", !0), defineSymbol(math, main, rel, "⌢", "\\frown", !0), defineSymbol(math, main, rel, "∋", "\\ni", !0), defineSymbol(math, main, rel, "∝", "\\propto", !0), defineSymbol(math, main, rel, "⊢", "\\vdash", !0), defineSymbol(math, main, rel, "⊣", "\\dashv", !0), defineSymbol(math, main, rel, "∋", "\\owns"), defineSymbol(math, main, punct, ".", "\\ldotp"), defineSymbol(math, main, punct, "⋅", "\\cdotp"), defineSymbol(math, main, textord, "#", "\\#"), defineSymbol(text, main, textord, "#", "\\#"), defineSymbol(math, main, textord, "&", "\\&"), defineSymbol(text, main, textord, "&", "\\&"), defineSymbol(math, main, textord, "ℵ", "\\aleph", !0), defineSymbol(math, main, textord, "∀", "\\forall", !0), defineSymbol(math, main, textord, "ℏ", "\\hbar", !0), defineSymbol(math, main, textord, "∃", "\\exists", !0), defineSymbol(math, main, textord, "∇", "\\nabla", !0), defineSymbol(math, main, textord, "♭", "\\flat", !0), defineSymbol(math, main, textord, "ℓ", "\\ell", !0), defineSymbol(math, main, textord, "♮", "\\natural", !0), defineSymbol(math, main, textord, "♣", "\\clubsuit", !0), defineSymbol(math, main, textord, "℘", "\\wp", !0), defineSymbol(math, main, textord, "♯", "\\sharp", !0), defineSymbol(math, main, textord, "♢", "\\diamondsuit", !0), defineSymbol(math, main, textord, "ℜ", "\\Re", !0), defineSymbol(math, main, textord, "♡", "\\heartsuit", !0), defineSymbol(math, main, textord, "ℑ", "\\Im", !0), defineSymbol(math, main, textord, "♠", "\\spadesuit", !0), defineSymbol(math, main, textord, "§", "\\S", !0), defineSymbol(text, main, textord, "§", "\\S"), defineSymbol(math, main, textord, "¶", "\\P", !0), defineSymbol(text, main, textord, "¶", "\\P"), defineSymbol(math, main, textord, "†", "\\dag"), defineSymbol(text, main, textord, "†", "\\dag"), defineSymbol(text, main, textord, "†", "\\textdagger"), defineSymbol(math, main, textord, "‡", "\\ddag"), defineSymbol(text, main, textord, "‡", "\\ddag"), defineSymbol(text, main, textord, "‡", "\\textdaggerdbl"), defineSymbol(math, main, close, "⎱", "\\rmoustache", !0), defineSymbol(math, main, open, "⎰", "\\lmoustache", !0), defineSymbol(math, main, close, "⟯", "\\rgroup", !0), defineSymbol(math, main, open, "⟮", "\\lgroup", !0), defineSymbol(math, main, bin, "∓", "\\mp", !0), defineSymbol(math, main, bin, "⊖", "\\ominus", !0), defineSymbol(math, main, bin, "⊎", "\\uplus", !0), defineSymbol(math, main, bin, "⊓", "\\sqcap", !0), defineSymbol(math, main, bin, "∗", "\\ast"), defineSymbol(math, main, bin, "⊔", "\\sqcup", !0), defineSymbol(math, main, bin, "◯", "\\bigcirc", !0), defineSymbol(math, main, bin, "∙", "\\bullet", !0), defineSymbol(math, main, bin, "‡", "\\ddagger"), defineSymbol(math, main, bin, "≀", "\\wr", !0), defineSymbol(math, main, bin, "⨿", "\\amalg"), defineSymbol(math, main, bin, "&", "\\And"), defineSymbol(math, main, rel, "⟵", "\\longleftarrow", !0), defineSymbol(math, main, rel, "⇐", "\\Leftarrow", !0), defineSymbol(math, main, rel, "⟸", "\\Longleftarrow", !0), defineSymbol(math, main, rel, "⟶", "\\longrightarrow", !0), defineSymbol(math, main, rel, "⇒", "\\Rightarrow", !0), defineSymbol(math, main, rel, "⟹", "\\Longrightarrow", !0), defineSymbol(math, main, rel, "↔", "\\leftrightarrow", !0), defineSymbol(math, main, rel, "⟷", "\\longleftrightarrow", !0), defineSymbol(math, main, rel, "⇔", "\\Leftrightarrow", !0), defineSymbol(math, main, rel, "⟺", "\\Longleftrightarrow", !0), defineSymbol(math, main, rel, "↦", "\\mapsto", !0), defineSymbol(math, main, rel, "⟼", "\\longmapsto", !0), defineSymbol(math, main, rel, "↗", "\\nearrow", !0), defineSymbol(math, main, rel, "↩", "\\hookleftarrow", !0), defineSymbol(math, main, rel, "↪", "\\hookrightarrow", !0), defineSymbol(math, main, rel, "↘", "\\searrow", !0), defineSymbol(math, main, rel, "↼", "\\leftharpoonup", !0), defineSymbol(math, main, rel, "⇀", "\\rightharpoonup", !0), defineSymbol(math, main, rel, "↙", "\\swarrow", !0), defineSymbol(math, main, rel, "↽", "\\leftharpoondown", !0), defineSymbol(math, main, rel, "⇁", "\\rightharpoondown", !0), defineSymbol(math, main, rel, "↖", "\\nwarrow", !0), defineSymbol(math, main, rel, "⇌", "\\rightleftharpoons", !0), defineSymbol(math, ams, rel, "≮", "\\nless", !0), defineSymbol(math, ams, rel, "", "\\@nleqslant"), defineSymbol(math, ams, rel, "", "\\@nleqq"), defineSymbol(math, ams, rel, "⪇", "\\lneq", !0), defineSymbol(math, ams, rel, "≨", "\\lneqq", !0), defineSymbol(math, ams, rel, "", "\\@lvertneqq"), defineSymbol(math, ams, rel, "⋦", "\\lnsim", !0), defineSymbol(math, ams, rel, "⪉", "\\lnapprox", !0), defineSymbol(math, ams, rel, "⊀", "\\nprec", !0), defineSymbol(math, ams, rel, "⋠", "\\npreceq", !0), defineSymbol(math, ams, rel, "⋨", "\\precnsim", !0), defineSymbol(math, ams, rel, "⪹", "\\precnapprox", !0), defineSymbol(math, ams, rel, "≁", "\\nsim", !0), defineSymbol(math, ams, rel, "", "\\@nshortmid"), defineSymbol(math, ams, rel, "∤", "\\nmid", !0), defineSymbol(math, ams, rel, "⊬", "\\nvdash", !0), defineSymbol(math, ams, rel, "⊭", "\\nvDash", !0), defineSymbol(math, ams, rel, "⋪", "\\ntriangleleft"), defineSymbol(math, ams, rel, "⋬", "\\ntrianglelefteq", !0), defineSymbol(math, ams, rel, "⊊", "\\subsetneq", !0), defineSymbol(math, ams, rel, "", "\\@varsubsetneq"), defineSymbol(math, ams, rel, "⫋", "\\subsetneqq", !0), defineSymbol(math, ams, rel, "", "\\@varsubsetneqq"), defineSymbol(math, ams, rel, "≯", "\\ngtr", !0), defineSymbol(math, ams, rel, "", "\\@ngeqslant"), defineSymbol(math, ams, rel, "", "\\@ngeqq"), defineSymbol(math, ams, rel, "⪈", "\\gneq", !0), defineSymbol(math, ams, rel, "≩", "\\gneqq", !0), defineSymbol(math, ams, rel, "", "\\@gvertneqq"), defineSymbol(math, ams, rel, "⋧", "\\gnsim", !0), defineSymbol(math, ams, rel, "⪊", "\\gnapprox", !0), defineSymbol(math, ams, rel, "⊁", "\\nsucc", !0), defineSymbol(math, ams, rel, "⋡", "\\nsucceq", !0), defineSymbol(math, ams, rel, "⋩", "\\succnsim", !0), defineSymbol(math, ams, rel, "⪺", "\\succnapprox", !0), defineSymbol(math, ams, rel, "≆", "\\ncong", !0), defineSymbol(math, ams, rel, "", "\\@nshortparallel"), defineSymbol(math, ams, rel, "∦", "\\nparallel", !0), defineSymbol(math, ams, rel, "⊯", "\\nVDash", !0), defineSymbol(math, ams, rel, "⋫", "\\ntriangleright"), defineSymbol(math, ams, rel, "⋭", "\\ntrianglerighteq", !0), defineSymbol(math, ams, rel, "", "\\@nsupseteqq"), defineSymbol(math, ams, rel, "⊋", "\\supsetneq", !0), defineSymbol(math, ams, rel, "", "\\@varsupsetneq"), defineSymbol(math, ams, rel, "⫌", "\\supsetneqq", !0), defineSymbol(math, ams, rel, "", "\\@varsupsetneqq"), defineSymbol(math, ams, rel, "⊮", "\\nVdash", !0), defineSymbol(math, ams, rel, "⪵", "\\precneqq", !0), defineSymbol(math, ams, rel, "⪶", "\\succneqq", !0), defineSymbol(math, ams, rel, "", "\\@nsubseteqq"), defineSymbol(math, ams, bin, "⊴", "\\unlhd"), defineSymbol(math, ams, bin, "⊵", "\\unrhd"), defineSymbol(math, ams, rel, "↚", "\\nleftarrow", !0), defineSymbol(math, ams, rel, "↛", "\\nrightarrow", !0), defineSymbol(math, ams, rel, "⇍", "\\nLeftarrow", !0), defineSymbol(math, ams, rel, "⇏", "\\nRightarrow", !0), defineSymbol(math, ams, rel, "↮", "\\nleftrightarrow", !0), defineSymbol(math, ams, rel, "⇎", "\\nLeftrightarrow", !0), defineSymbol(math, ams, rel, "△", "\\vartriangle"), defineSymbol(math, ams, textord, "ℏ", "\\hslash"), defineSymbol(math, ams, textord, "▽", "\\triangledown"), defineSymbol(math, ams, textord, "◊", "\\lozenge"), defineSymbol(math, ams, textord, "Ⓢ", "\\circledS"), defineSymbol(math, ams, textord, "®", "\\circledR"), defineSymbol(text, ams, textord, "®", "\\circledR"), defineSymbol(math, ams, textord, "∡", "\\measuredangle", !0), defineSymbol(math, ams, textord, "∄", "\\nexists"), defineSymbol(math, ams, textord, "℧", "\\mho"), defineSymbol(math, ams, textord, "Ⅎ", "\\Finv", !0), defineSymbol(math, ams, textord, "⅁", "\\Game", !0), defineSymbol(math, ams, textord, "‵", "\\backprime"), defineSymbol(math, ams, textord, "▲", "\\blacktriangle"), defineSymbol(math, ams, textord, "▼", "\\blacktriangledown"), defineSymbol(math, ams, textord, "■", "\\blacksquare"), defineSymbol(math, ams, textord, "⧫", "\\blacklozenge"), defineSymbol(math, ams, textord, "★", "\\bigstar"), defineSymbol(math, ams, textord, "∢", "\\sphericalangle", !0), defineSymbol(math, ams, textord, "∁", "\\complement", !0), defineSymbol(math, ams, textord, "ð", "\\eth", !0), defineSymbol(text, main, textord, "ð", "ð"), defineSymbol(math, ams, textord, "╱", "\\diagup"), defineSymbol(math, ams, textord, "╲", "\\diagdown"), defineSymbol(math, ams, textord, "□", "\\square"), defineSymbol(math, ams, textord, "□", "\\Box"), defineSymbol(math, ams, textord, "◊", "\\Diamond"), defineSymbol(math, ams, textord, "¥", "\\yen", !0), defineSymbol(text, ams, textord, "¥", "\\yen", !0), defineSymbol(math, ams, textord, "✓", "\\checkmark", !0), defineSymbol(text, ams, textord, "✓", "\\checkmark"), defineSymbol(math, ams, textord, "ℶ", "\\beth", !0), defineSymbol(math, ams, textord, "ℸ", "\\daleth", !0), defineSymbol(math, ams, textord, "ℷ", "\\gimel", !0), defineSymbol(math, ams, textord, "ϝ", "\\digamma", !0), defineSymbol(math, ams, textord, "ϰ", "\\varkappa"), defineSymbol(math, ams, open, "┌", "\\@ulcorner", !0), defineSymbol(math, ams, close, "┐", "\\@urcorner", !0), defineSymbol(math, ams, open, "└", "\\@llcorner", !0), defineSymbol(math, ams, close, "┘", "\\@lrcorner", !0), defineSymbol(math, ams, rel, "≦", "\\leqq", !0), defineSymbol(math, ams, rel, "⩽", "\\leqslant", !0), defineSymbol(math, ams, rel, "⪕", "\\eqslantless", !0), defineSymbol(math, ams, rel, "≲", "\\lesssim", !0), defineSymbol(math, ams, rel, "⪅", "\\lessapprox", !0), defineSymbol(math, ams, rel, "≊", "\\approxeq", !0), defineSymbol(math, ams, bin, "⋖", "\\lessdot"), defineSymbol(math, ams, rel, "⋘", "\\lll", !0), defineSymbol(math, ams, rel, "≶", "\\lessgtr", !0), defineSymbol(math, ams, rel, "⋚", "\\lesseqgtr", !0), defineSymbol(math, ams, rel, "⪋", "\\lesseqqgtr", !0), defineSymbol(math, ams, rel, "≑", "\\doteqdot"), defineSymbol(math, ams, rel, "≓", "\\risingdotseq", !0), defineSymbol(math, ams, rel, "≒", "\\fallingdotseq", !0), defineSymbol(math, ams, rel, "∽", "\\backsim", !0), defineSymbol(math, ams, rel, "⋍", "\\backsimeq", !0), defineSymbol(math, ams, rel, "⫅", "\\subseteqq", !0), defineSymbol(math, ams, rel, "⋐", "\\Subset", !0), defineSymbol(math, ams, rel, "⊏", "\\sqsubset", !0), defineSymbol(math, ams, rel, "≼", "\\preccurlyeq", !0), defineSymbol(math, ams, rel, "⋞", "\\curlyeqprec", !0), defineSymbol(math, ams, rel, "≾", "\\precsim", !0), defineSymbol(math, ams, rel, "⪷", "\\precapprox", !0), defineSymbol(math, ams, rel, "⊲", "\\vartriangleleft"), defineSymbol(math, ams, rel, "⊴", "\\trianglelefteq"), defineSymbol(math, ams, rel, "⊨", "\\vDash", !0), defineSymbol(math, ams, rel, "⊪", "\\Vvdash", !0), defineSymbol(math, ams, rel, "⌣", "\\smallsmile"), defineSymbol(math, ams, rel, "⌢", "\\smallfrown"), defineSymbol(math, ams, rel, "≏", "\\bumpeq", !0), defineSymbol(math, ams, rel, "≎", "\\Bumpeq", !0), defineSymbol(math, ams, rel, "≧", "\\geqq", !0), defineSymbol(math, ams, rel, "⩾", "\\geqslant", !0), defineSymbol(math, ams, rel, "⪖", "\\eqslantgtr", !0), defineSymbol(math, ams, rel, "≳", "\\gtrsim", !0), defineSymbol(math, ams, rel, "⪆", "\\gtrapprox", !0), defineSymbol(math, ams, bin, "⋗", "\\gtrdot"), defineSymbol(math, ams, rel, "⋙", "\\ggg", !0), defineSymbol(math, ams, rel, "≷", "\\gtrless", !0), defineSymbol(math, ams, rel, "⋛", "\\gtreqless", !0), defineSymbol(math, ams, rel, "⪌", "\\gtreqqless", !0), defineSymbol(math, ams, rel, "≖", "\\eqcirc", !0), defineSymbol(math, ams, rel, "≗", "\\circeq", !0), defineSymbol(math, ams, rel, "≜", "\\triangleq", !0), defineSymbol(math, ams, rel, "∼", "\\thicksim"), defineSymbol(math, ams, rel, "≈", "\\thickapprox"), defineSymbol(math, ams, rel, "⫆", "\\supseteqq", !0), defineSymbol(math, ams, rel, "⋑", "\\Supset", !0), defineSymbol(math, ams, rel, "⊐", "\\sqsupset", !0), defineSymbol(math, ams, rel, "≽", "\\succcurlyeq", !0), defineSymbol(math, ams, rel, "⋟", "\\curlyeqsucc", !0), defineSymbol(math, ams, rel, "≿", "\\succsim", !0), defineSymbol(math, ams, rel, "⪸", "\\succapprox", !0), defineSymbol(math, ams, rel, "⊳", "\\vartriangleright"), defineSymbol(math, ams, rel, "⊵", "\\trianglerighteq"), defineSymbol(math, ams, rel, "⊩", "\\Vdash", !0), defineSymbol(math, ams, rel, "∣", "\\shortmid"), defineSymbol(math, ams, rel, "∥", "\\shortparallel"), defineSymbol(math, ams, rel, "≬", "\\between", !0), defineSymbol(math, ams, rel, "⋔", "\\pitchfork", !0), defineSymbol(math, ams, rel, "∝", "\\varpropto"), defineSymbol(math, ams, rel, "◀", "\\blacktriangleleft"), defineSymbol(math, ams, rel, "∴", "\\therefore", !0), defineSymbol(math, ams, rel, "∍", "\\backepsilon"), defineSymbol(math, ams, rel, "▶", "\\blacktriangleright"), defineSymbol(math, ams, rel, "∵", "\\because", !0), defineSymbol(math, ams, rel, "⋘", "\\llless"), defineSymbol(math, ams, rel, "⋙", "\\gggtr"), defineSymbol(math, ams, bin, "⊲", "\\lhd"), defineSymbol(math, ams, bin, "⊳", "\\rhd"), defineSymbol(math, ams, rel, "≂", "\\eqsim", !0), defineSymbol(math, main, rel, "⋈", "\\Join"), defineSymbol(math, ams, rel, "≑", "\\Doteq", !0), defineSymbol(math, ams, bin, "∔", "\\dotplus", !0), defineSymbol(math, ams, bin, "∖", "\\smallsetminus"), defineSymbol(math, ams, bin, "⋒", "\\Cap", !0), defineSymbol(math, ams, bin, "⋓", "\\Cup", !0), defineSymbol(math, ams, bin, "⩞", "\\doublebarwedge", !0), defineSymbol(math, ams, bin, "⊟", "\\boxminus", !0), defineSymbol(math, ams, bin, "⊞", "\\boxplus", !0), defineSymbol(math, ams, bin, "⋇", "\\divideontimes", !0), defineSymbol(math, ams, bin, "⋉", "\\ltimes", !0), defineSymbol(math, ams, bin, "⋊", "\\rtimes", !0), defineSymbol(math, ams, bin, "⋋", "\\leftthreetimes", !0), defineSymbol(math, ams, bin, "⋌", "\\rightthreetimes", !0), defineSymbol(math, ams, bin, "⋏", "\\curlywedge", !0), defineSymbol(math, ams, bin, "⋎", "\\curlyvee", !0), defineSymbol(math, ams, bin, "⊝", "\\circleddash", !0), defineSymbol(math, ams, bin, "⊛", "\\circledast", !0), defineSymbol(math, ams, bin, "⋅", "\\centerdot"), defineSymbol(math, ams, bin, "⊺", "\\intercal", !0), defineSymbol(math, ams, bin, "⋒", "\\doublecap"), defineSymbol(math, ams, bin, "⋓", "\\doublecup"), defineSymbol(math, ams, bin, "⊠", "\\boxtimes", !0), defineSymbol(math, ams, rel, "⇢", "\\dashrightarrow", !0), defineSymbol(math, ams, rel, "⇠", "\\dashleftarrow", !0), defineSymbol(math, ams, rel, "⇇", "\\leftleftarrows", !0), defineSymbol(math, ams, rel, "⇆", "\\leftrightarrows", !0), defineSymbol(math, ams, rel, "⇚", "\\Lleftarrow", !0), defineSymbol(math, ams, rel, "↞", "\\twoheadleftarrow", !0), defineSymbol(math, ams, rel, "↢", "\\leftarrowtail", !0), defineSymbol(math, ams, rel, "↫", "\\looparrowleft", !0), defineSymbol(math, ams, rel, "⇋", "\\leftrightharpoons", !0), defineSymbol(math, ams, rel, "↶", "\\curvearrowleft", !0), defineSymbol(math, ams, rel, "↺", "\\circlearrowleft", !0), defineSymbol(math, ams, rel, "↰", "\\Lsh", !0), defineSymbol(math, ams, rel, "⇈", "\\upuparrows", !0), defineSymbol(math, ams, rel, "↿", "\\upharpoonleft", !0), defineSymbol(math, ams, rel, "⇃", "\\downharpoonleft", !0), defineSymbol(math, main, rel, "⊶", "\\origof", !0), defineSymbol(math, main, rel, "⊷", "\\imageof", !0), defineSymbol(math, ams, rel, "⊸", "\\multimap", !0), defineSymbol(math, ams, rel, "↭", "\\leftrightsquigarrow", !0), defineSymbol(math, ams, rel, "⇉", "\\rightrightarrows", !0), defineSymbol(math, ams, rel, "⇄", "\\rightleftarrows", !0), defineSymbol(math, ams, rel, "↠", "\\twoheadrightarrow", !0), defineSymbol(math, ams, rel, "↣", "\\rightarrowtail", !0), defineSymbol(math, ams, rel, "↬", "\\looparrowright", !0), defineSymbol(math, ams, rel, "↷", "\\curvearrowright", !0), defineSymbol(math, ams, rel, "↻", "\\circlearrowright", !0), defineSymbol(math, ams, rel, "↱", "\\Rsh", !0), defineSymbol(math, ams, rel, "⇊", "\\downdownarrows", !0), defineSymbol(math, ams, rel, "↾", "\\upharpoonright", !0), defineSymbol(math, ams, rel, "⇂", "\\downharpoonright", !0), defineSymbol(math, ams, rel, "⇝", "\\rightsquigarrow", !0), defineSymbol(math, ams, rel, "⇝", "\\leadsto"), defineSymbol(math, ams, rel, "⇛", "\\Rrightarrow", !0), defineSymbol(math, ams, rel, "↾", "\\restriction"), defineSymbol(math, main, textord, "‘", "`"), defineSymbol(math, main, textord, "$", "\\$"), defineSymbol(text, main, textord, "$", "\\$"), defineSymbol(text, main, textord, "$", "\\textdollar"), defineSymbol(math, main, textord, "%", "\\%"), defineSymbol(text, main, textord, "%", "\\%"), defineSymbol(math, main, textord, "_", "\\_"), defineSymbol(text, main, textord, "_", "\\_"), defineSymbol(text, main, textord, "_", "\\textunderscore"), defineSymbol(math, main, textord, "∠", "\\angle", !0), defineSymbol(math, main, textord, "∞", "\\infty", !0), defineSymbol(math, main, textord, "′", "\\prime"), defineSymbol(math, main, textord, "△", "\\triangle"), defineSymbol(math, main, textord, "Γ", "\\Gamma", !0), defineSymbol(math, main, textord, "Δ", "\\Delta", !0), defineSymbol(math, main, textord, "Θ", "\\Theta", !0), defineSymbol(math, main, textord, "Λ", "\\Lambda", !0), defineSymbol(math, main, textord, "Ξ", "\\Xi", !0), defineSymbol(math, main, textord, "Π", "\\Pi", !0), defineSymbol(math, main, textord, "Σ", "\\Sigma", !0), defineSymbol(math, main, textord, "Υ", "\\Upsilon", !0), defineSymbol(math, main, textord, "Φ", "\\Phi", !0), defineSymbol(math, main, textord, "Ψ", "\\Psi", !0), defineSymbol(math, main, textord, "Ω", "\\Omega", !0), defineSymbol(math, main, textord, "A", "Α"), defineSymbol(math, main, textord, "B", "Β"), defineSymbol(math, main, textord, "E", "Ε"), defineSymbol(math, main, textord, "Z", "Ζ"), defineSymbol(math, main, textord, "H", "Η"), defineSymbol(math, main, textord, "I", "Ι"), defineSymbol(math, main, textord, "K", "Κ"), defineSymbol(math, main, textord, "M", "Μ"), defineSymbol(math, main, textord, "N", "Ν"), defineSymbol(math, main, textord, "O", "Ο"), defineSymbol(math, main, textord, "P", "Ρ"), defineSymbol(math, main, textord, "T", "Τ"), defineSymbol(math, main, textord, "X", "Χ"), defineSymbol(math, main, textord, "¬", "\\neg", !0), defineSymbol(math, main, textord, "¬", "\\lnot"), defineSymbol(math, main, textord, "⊤", "\\top"), defineSymbol(math, main, textord, "⊥", "\\bot"), defineSymbol(math, main, textord, "∅", "\\emptyset"), defineSymbol(math, ams, textord, "∅", "\\varnothing"), defineSymbol(math, main, mathord, "α", "\\alpha", !0), defineSymbol(math, main, mathord, "β", "\\beta", !0), defineSymbol(math, main, mathord, "γ", "\\gamma", !0), defineSymbol(math, main, mathord, "δ", "\\delta", !0), defineSymbol(math, main, mathord, "ϵ", "\\epsilon", !0), defineSymbol(math, main, mathord, "ζ", "\\zeta", !0), defineSymbol(math, main, mathord, "η", "\\eta", !0), defineSymbol(math, main, mathord, "θ", "\\theta", !0), defineSymbol(math, main, mathord, "ι", "\\iota", !0), defineSymbol(math, main, mathord, "κ", "\\kappa", !0), defineSymbol(math, main, mathord, "λ", "\\lambda", !0), defineSymbol(math, main, mathord, "μ", "\\mu", !0), defineSymbol(math, main, mathord, "ν", "\\nu", !0), defineSymbol(math, main, mathord, "ξ", "\\xi", !0), defineSymbol(math, main, mathord, "ο", "\\omicron", !0), defineSymbol(math, main, mathord, "π", "\\pi", !0), defineSymbol(math, main, mathord, "ρ", "\\rho", !0), defineSymbol(math, main, mathord, "σ", "\\sigma", !0), defineSymbol(math, main, mathord, "τ", "\\tau", !0), defineSymbol(math, main, mathord, "υ", "\\upsilon", !0), defineSymbol(math, main, mathord, "ϕ", "\\phi", !0), defineSymbol(math, main, mathord, "χ", "\\chi", !0), defineSymbol(math, main, mathord, "ψ", "\\psi", !0), defineSymbol(math, main, mathord, "ω", "\\omega", !0), defineSymbol(math, main, mathord, "ε", "\\varepsilon", !0), defineSymbol(math, main, mathord, "ϑ", "\\vartheta", !0), defineSymbol(math, main, mathord, "ϖ", "\\varpi", !0), defineSymbol(math, main, mathord, "ϱ", "\\varrho", !0), defineSymbol(math, main, mathord, "ς", "\\varsigma", !0), defineSymbol(math, main, mathord, "φ", "\\varphi", !0), defineSymbol(math, main, bin, "∗", "*", !0), defineSymbol(math, main, bin, "+", "+"), defineSymbol(math, main, bin, "−", "-", !0), defineSymbol(math, main, bin, "⋅", "\\cdot", !0), defineSymbol(math, main, bin, "∘", "\\circ", !0), defineSymbol(math, main, bin, "÷", "\\div", !0), defineSymbol(math, main, bin, "±", "\\pm", !0), defineSymbol(math, main, bin, "×", "\\times", !0), defineSymbol(math, main, bin, "∩", "\\cap", !0), defineSymbol(math, main, bin, "∪", "\\cup", !0), defineSymbol(math, main, bin, "∖", "\\setminus", !0), defineSymbol(math, main, bin, "∧", "\\land"), defineSymbol(math, main, bin, "∨", "\\lor"), defineSymbol(math, main, bin, "∧", "\\wedge", !0), defineSymbol(math, main, bin, "∨", "\\vee", !0), defineSymbol(math, main, textord, "√", "\\surd"), defineSymbol(math, main, open, "⟨", "\\langle", !0), defineSymbol(math, main, open, "∣", "\\lvert"), defineSymbol(math, main, open, "∥", "\\lVert"), defineSymbol(math, main, close, "?", "?"), defineSymbol(math, main, close, "!", "!"), defineSymbol(math, main, close, "⟩", "\\rangle", !0), defineSymbol(math, main, close, "∣", "\\rvert"), defineSymbol(math, main, close, "∥", "\\rVert"), defineSymbol(math, main, rel, "=", "="), defineSymbol(math, main, rel, ":", ":"), defineSymbol(math, main, rel, "≈", "\\approx", !0), defineSymbol(math, main, rel, "≅", "\\cong", !0), defineSymbol(math, main, rel, "≥", "\\ge"), defineSymbol(math, main, rel, "≥", "\\geq", !0), defineSymbol(math, main, rel, "←", "\\gets"), defineSymbol(math, main, rel, ">", "\\gt", !0), defineSymbol(math, main, rel, "∈", "\\in", !0), defineSymbol(math, main, rel, "", "\\@not"), defineSymbol(math, main, rel, "⊂", "\\subset", !0), defineSymbol(math, main, rel, "⊃", "\\supset", !0), defineSymbol(math, main, rel, "⊆", "\\subseteq", !0), defineSymbol(math, main, rel, "⊇", "\\supseteq", !0), defineSymbol(math, ams, rel, "⊈", "\\nsubseteq", !0), defineSymbol(math, ams, rel, "⊉", "\\nsupseteq", !0), defineSymbol(math, main, rel, "⊨", "\\models"), defineSymbol(math, main, rel, "←", "\\leftarrow", !0), defineSymbol(math, main, rel, "≤", "\\le"), defineSymbol(math, main, rel, "≤", "\\leq", !0), defineSymbol(math, main, rel, "<", "\\lt", !0), defineSymbol(math, main, rel, "→", "\\rightarrow", !0), defineSymbol(math, main, rel, "→", "\\to"), defineSymbol(math, ams, rel, "≱", "\\ngeq", !0), defineSymbol(math, ams, rel, "≰", "\\nleq", !0), defineSymbol(math, main, spacing, "\xA0", "\\ "), defineSymbol(math, main, spacing, "\xA0", "\\space"), defineSymbol(math, main, spacing, "\xA0", "\\nobreakspace"), defineSymbol(text, main, spacing, "\xA0", "\\ "), defineSymbol(text, main, spacing, "\xA0", " "), defineSymbol(text, main, spacing, "\xA0", "\\space"), defineSymbol(text, main, spacing, "\xA0", "\\nobreakspace"), defineSymbol(math, main, spacing, null, "\\nobreak"), defineSymbol(math, main, spacing, null, "\\allowbreak"), defineSymbol(math, main, punct, ",", ","), defineSymbol(math, main, punct, ";", ";"), defineSymbol(math, ams, bin, "⊼", "\\barwedge", !0), defineSymbol(math, ams, bin, "⊻", "\\veebar", !0), defineSymbol(math, main, bin, "⊙", "\\odot", !0), defineSymbol(math, main, bin, "⊕", "\\oplus", !0), defineSymbol(math, main, bin, "⊗", "\\otimes", !0), defineSymbol(math, main, textord, "∂", "\\partial", !0), defineSymbol(math, main, bin, "⊘", "\\oslash", !0), defineSymbol(math, ams, bin, "⊚", "\\circledcirc", !0), defineSymbol(math, ams, bin, "⊡", "\\boxdot", !0), defineSymbol(math, main, bin, "△", "\\bigtriangleup"), defineSymbol(math, main, bin, "▽", "\\bigtriangledown"), defineSymbol(math, main, bin, "†", "\\dagger"), defineSymbol(math, main, bin, "⋄", "\\diamond"), defineSymbol(math, main, bin, "⋆", "\\star"), defineSymbol(math, main, bin, "◃", "\\triangleleft"), defineSymbol(math, main, bin, "▹", "\\triangleright"), defineSymbol(math, main, open, "{", "\\{"), defineSymbol(text, main, textord, "{", "\\{"), defineSymbol(text, main, textord, "{", "\\textbraceleft"), defineSymbol(math, main, close, "}", "\\}"), defineSymbol(text, main, textord, "}", "\\}"), defineSymbol(text, main, textord, "}", "\\textbraceright"), defineSymbol(math, main, open, "{", "\\lbrace"), defineSymbol(math, main, close, "}", "\\rbrace"), defineSymbol(math, main, open, "[", "\\lbrack", !0), defineSymbol(text, main, textord, "[", "\\lbrack", !0), defineSymbol(math, main, close, "]", "\\rbrack", !0), defineSymbol(text, main, textord, "]", "\\rbrack", !0), defineSymbol(math, main, open, "(", "\\lparen", !0), defineSymbol(math, main, close, ")", "\\rparen", !0), defineSymbol(text, main, textord, "<", "\\textless", !0), defineSymbol(text, main, textord, ">", "\\textgreater", !0), defineSymbol(math, main, open, "⌊", "\\lfloor", !0), defineSymbol(math, main, close, "⌋", "\\rfloor", !0), defineSymbol(math, main, open, "⌈", "\\lceil", !0), defineSymbol(math, main, close, "⌉", "\\rceil", !0), defineSymbol(math, main, textord, "\\", "\\backslash"), defineSymbol(math, main, textord, "∣", "|"), defineSymbol(math, main, textord, "∣", "\\vert"), defineSymbol(text, main, textord, "|", "\\textbar", !0), defineSymbol(math, main, textord, "∥", "\\|"), defineSymbol(math, main, textord, "∥", "\\Vert"), defineSymbol(text, main, textord, "∥", "\\textbardbl"), defineSymbol(text, main, textord, "~", "\\textasciitilde"), defineSymbol(text, main, textord, "\\", "\\textbackslash"), defineSymbol(text, main, textord, "^", "\\textasciicircum"), defineSymbol(math, main, rel, "↑", "\\uparrow", !0), defineSymbol(math, main, rel, "⇑", "\\Uparrow", !0), defineSymbol(math, main, rel, "↓", "\\downarrow", !0), defineSymbol(math, main, rel, "⇓", "\\Downarrow", !0), defineSymbol(math, main, rel, "↕", "\\updownarrow", !0), defineSymbol(math, main, rel, "⇕", "\\Updownarrow", !0), defineSymbol(math, main, op, "∐", "\\coprod"), defineSymbol(math, main, op, "⋁", "\\bigvee"), defineSymbol(math, main, op, "⋀", "\\bigwedge"), defineSymbol(math, main, op, "⨄", "\\biguplus"), defineSymbol(math, main, op, "⋂", "\\bigcap"), defineSymbol(math, main, op, "⋃", "\\bigcup"), defineSymbol(math, main, op, "∫", "\\int"), defineSymbol(math, main, op, "∫", "\\intop"), defineSymbol(math, main, op, "∬", "\\iint"), defineSymbol(math, main, op, "∭", "\\iiint"), defineSymbol(math, main, op, "∏", "\\prod"), defineSymbol(math, main, op, "∑", "\\sum"), defineSymbol(math, main, op, "⨂", "\\bigotimes"), defineSymbol(math, main, op, "⨁", "\\bigoplus"), defineSymbol(math, main, op, "⨀", "\\bigodot"), defineSymbol(math, main, op, "∮", "\\oint"), defineSymbol(math, main, op, "∯", "\\oiint"), defineSymbol(math, main, op, "∰", "\\oiiint"), defineSymbol(math, main, op, "⨆", "\\bigsqcup"), defineSymbol(math, main, op, "∫", "\\smallint"), defineSymbol(text, main, inner, "…", "\\textellipsis"), defineSymbol(math, main, inner, "…", "\\mathellipsis"), defineSymbol(text, main, inner, "…", "\\ldots", !0), defineSymbol(math, main, inner, "…", "\\ldots", !0), defineSymbol(math, main, inner, "⋯", "\\@cdots", !0), defineSymbol(math, main, inner, "⋱", "\\ddots", !0), defineSymbol(math, main, textord, "⋮", "\\varvdots"), defineSymbol(text, main, textord, "⋮", "\\varvdots"), defineSymbol(math, main, accent, "ˊ", "\\acute"), defineSymbol(math, main, accent, "ˋ", "\\grave"), defineSymbol(math, main, accent, "¨", "\\ddot"), defineSymbol(math, main, accent, "~", "\\tilde"), defineSymbol(math, main, accent, "ˉ", "\\bar"), defineSymbol(math, main, accent, "˘", "\\breve"), defineSymbol(math, main, accent, "ˇ", "\\check"), defineSymbol(math, main, accent, "^", "\\hat"), defineSymbol(math, main, accent, "⃗", "\\vec"), defineSymbol(math, main, accent, "˙", "\\dot"), defineSymbol(math, main, accent, "˚", "\\mathring"), defineSymbol(math, main, mathord, "", "\\@imath"), defineSymbol(math, main, mathord, "", "\\@jmath"), defineSymbol(math, main, textord, "ı", "ı"), defineSymbol(math, main, textord, "ȷ", "ȷ"), defineSymbol(text, main, textord, "ı", "\\i", !0), defineSymbol(text, main, textord, "ȷ", "\\j", !0), defineSymbol(text, main, textord, "ß", "\\ss", !0), defineSymbol(text, main, textord, "æ", "\\ae", !0), defineSymbol(text, main, textord, "œ", "\\oe", !0), defineSymbol(text, main, textord, "ø", "\\o", !0), defineSymbol(text, main, textord, "Æ", "\\AE", !0), defineSymbol(text, main, textord, "Œ", "\\OE", !0), defineSymbol(text, main, textord, "Ø", "\\O", !0), defineSymbol(text, main, accent, "ˊ", "\\'"), defineSymbol(text, main, accent, "ˋ", "\\`"), defineSymbol(text, main, accent, "ˆ", "\\^"), defineSymbol(text, main, accent, "˜", "\\~"), defineSymbol(text, main, accent, "ˉ", "\\="), defineSymbol(text, main, accent, "˘", "\\u"), defineSymbol(text, main, accent, "˙", "\\."), defineSymbol(text, main, accent, "¸", "\\c"), defineSymbol(text, main, accent, "˚", "\\r"), defineSymbol(text, main, accent, "ˇ", "\\v"), defineSymbol(text, main, accent, "¨", "\\\""), defineSymbol(text, main, accent, "˝", "\\H"), defineSymbol(text, main, accent, "◯", "\\textcircled");
15424
- var ligatures = {
15425
- "--": !0,
15426
- "---": !0,
15427
- "``": !0,
15428
- "''": !0
15429
- };
15430
- defineSymbol(text, main, textord, "–", "--", !0), defineSymbol(text, main, textord, "–", "\\textendash"), defineSymbol(text, main, textord, "—", "---", !0), defineSymbol(text, main, textord, "—", "\\textemdash"), defineSymbol(text, main, textord, "‘", "`", !0), defineSymbol(text, main, textord, "‘", "\\textquoteleft"), defineSymbol(text, main, textord, "’", "'", !0), defineSymbol(text, main, textord, "’", "\\textquoteright"), defineSymbol(text, main, textord, "“", "``", !0), defineSymbol(text, main, textord, "“", "\\textquotedblleft"), defineSymbol(text, main, textord, "”", "''", !0), defineSymbol(text, main, textord, "”", "\\textquotedblright"), defineSymbol(math, main, textord, "°", "\\degree", !0), defineSymbol(text, main, textord, "°", "\\degree"), defineSymbol(text, main, textord, "°", "\\textdegree", !0), defineSymbol(math, main, textord, "£", "\\pounds"), defineSymbol(math, main, textord, "£", "\\mathsterling", !0), defineSymbol(text, main, textord, "£", "\\pounds"), defineSymbol(text, main, textord, "£", "\\textsterling", !0), defineSymbol(math, ams, textord, "✠", "\\maltese"), defineSymbol(text, ams, textord, "✠", "\\maltese");
15431
- for (var mathTextSymbols = "0123456789/@.\"", i = 0; i < mathTextSymbols.length; i++) {
15432
- var ch = mathTextSymbols.charAt(i);
15433
- defineSymbol(math, main, textord, ch, ch);
15434
- }
15435
- for (var textSymbols = "0123456789!@*()-=+\";:?/.,", _i = 0; _i < textSymbols.length; _i++) {
15436
- var _ch = textSymbols.charAt(_i);
15437
- defineSymbol(text, main, textord, _ch, _ch);
15438
- }
15439
- for (var letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", _i2 = 0; _i2 < letters.length; _i2++) {
15440
- var _ch2 = letters.charAt(_i2);
15441
- defineSymbol(math, main, mathord, _ch2, _ch2), defineSymbol(text, main, textord, _ch2, _ch2);
15442
- }
15443
- defineSymbol(math, ams, textord, "C", "ℂ"), defineSymbol(text, ams, textord, "C", "ℂ"), defineSymbol(math, ams, textord, "H", "ℍ"), defineSymbol(text, ams, textord, "H", "ℍ"), defineSymbol(math, ams, textord, "N", "ℕ"), defineSymbol(text, ams, textord, "N", "ℕ"), defineSymbol(math, ams, textord, "P", "ℙ"), defineSymbol(text, ams, textord, "P", "ℙ"), defineSymbol(math, ams, textord, "Q", "ℚ"), defineSymbol(text, ams, textord, "Q", "ℚ"), defineSymbol(math, ams, textord, "R", "ℝ"), defineSymbol(text, ams, textord, "R", "ℝ"), defineSymbol(math, ams, textord, "Z", "ℤ"), defineSymbol(text, ams, textord, "Z", "ℤ"), defineSymbol(math, main, mathord, "h", "ℎ"), defineSymbol(text, main, mathord, "h", "ℎ");
15444
- for (var wideChar = "", _i3 = 0; _i3 < letters.length; _i3++) {
15445
- var _ch3 = letters.charAt(_i3);
15446
- wideChar = String.fromCharCode(55349, 56320 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56372 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56424 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56580 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56684 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56736 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56788 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56840 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56944 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), _i3 < 26 && (wideChar = String.fromCharCode(55349, 56632 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar), wideChar = String.fromCharCode(55349, 56476 + _i3), defineSymbol(math, main, mathord, _ch3, wideChar), defineSymbol(text, main, textord, _ch3, wideChar));
15447
- }
15448
- wideChar = String.fromCharCode(55349, 56668), defineSymbol(math, main, mathord, "k", wideChar), defineSymbol(text, main, textord, "k", wideChar);
15449
- for (var _i4 = 0; _i4 < 10; _i4++) {
15450
- var _ch4 = _i4.toString();
15451
- wideChar = String.fromCharCode(55349, 57294 + _i4), defineSymbol(math, main, mathord, _ch4, wideChar), defineSymbol(text, main, textord, _ch4, wideChar), wideChar = String.fromCharCode(55349, 57314 + _i4), defineSymbol(math, main, mathord, _ch4, wideChar), defineSymbol(text, main, textord, _ch4, wideChar), wideChar = String.fromCharCode(55349, 57324 + _i4), defineSymbol(math, main, mathord, _ch4, wideChar), defineSymbol(text, main, textord, _ch4, wideChar), wideChar = String.fromCharCode(55349, 57334 + _i4), defineSymbol(math, main, mathord, _ch4, wideChar), defineSymbol(text, main, textord, _ch4, wideChar);
15452
- }
15453
- for (var extraLatin = "ÐÞþ", _i5 = 0; _i5 < extraLatin.length; _i5++) {
15454
- var _ch5 = extraLatin.charAt(_i5);
15455
- defineSymbol(math, main, mathord, _ch5, _ch5), defineSymbol(text, main, textord, _ch5, _ch5);
15456
- }
15457
- var wideLatinLetterData = [
15458
- [
15459
- "mathbf",
15460
- "textbf",
15461
- "Main-Bold"
15462
- ],
15463
- [
15464
- "mathbf",
15465
- "textbf",
15466
- "Main-Bold"
15467
- ],
15468
- [
15469
- "mathnormal",
15470
- "textit",
15471
- "Math-Italic"
15472
- ],
15473
- [
15474
- "mathnormal",
15475
- "textit",
15476
- "Math-Italic"
15477
- ],
15478
- [
15479
- "boldsymbol",
15480
- "boldsymbol",
15481
- "Main-BoldItalic"
15482
- ],
15483
- [
15484
- "boldsymbol",
15485
- "boldsymbol",
15486
- "Main-BoldItalic"
15487
- ],
15488
- [
15489
- "mathscr",
15490
- "textscr",
15491
- "Script-Regular"
15298
+ "mathscr",
15299
+ "textscr",
15300
+ "Script-Regular"
15492
15301
  ],
15493
15302
  [
15494
15303
  "",
@@ -15611,8 +15420,8 @@ var wideLatinLetterData = [
15611
15420
  "texttt",
15612
15421
  "Typewriter-Regular"
15613
15422
  ]
15614
- ], wideCharacterFont = function(e, t) {
15615
- var r = e.charCodeAt(0), a = e.charCodeAt(1), o = (r - 55296) * 1024 + (a - 56320) + 65536, s = t === "math" ? 0 : 1;
15423
+ ], wideCharacterFont = (t, n) => {
15424
+ var r = t.charCodeAt(0), a = t.charCodeAt(1), o = (r - 55296) * 1024 + (a - 56320) + 65536, s = n === "math" ? 0 : 1;
15616
15425
  if (119808 <= o && o < 120484) {
15617
15426
  var c = Math.floor((o - 119808) / 26);
15618
15427
  return [wideLatinLetterData[c][2], wideLatinLetterData[c][s]];
@@ -15621,9 +15430,13 @@ var wideLatinLetterData = [
15621
15430
  return [wideNumeralData[l][2], wideNumeralData[l][s]];
15622
15431
  } else if (o === 120485 || o === 120486) return [wideLatinLetterData[0][2], wideLatinLetterData[0][s]];
15623
15432
  else if (120486 < o && o < 120782) return ["", ""];
15624
- else throw new ParseError("Unsupported character: " + e);
15433
+ else throw new ParseError("Unsupported character: " + t);
15625
15434
  }, lookupSymbol = function(e, t, n) {
15626
- return symbols[n][e] && symbols[n][e].replace && (e = symbols[n][e].replace), {
15435
+ if (symbols[n][e]) {
15436
+ var r = symbols[n][e].replace;
15437
+ r && (e = r);
15438
+ }
15439
+ return {
15627
15440
  value: e,
15628
15441
  metrics: getCharacterMetrics(e, t, n)
15629
15442
  };
@@ -15684,8 +15497,8 @@ var wideLatinLetterData = [
15684
15497
  var n = e.classes[0];
15685
15498
  if (n === "mbin" || n === "mord") return !1;
15686
15499
  }
15687
- for (var r in e.style) if (e.style.hasOwnProperty(r) && e.style[r] !== t.style[r]) return !1;
15688
- for (var a in t.style) if (t.style.hasOwnProperty(a) && e.style[a] !== t.style[a]) return !1;
15500
+ for (var r of Object.keys(e.style)) if (e.style[r] !== t.style[r]) return !1;
15501
+ for (var a of Object.keys(t.style)) if (e.style[a] !== t.style[a]) return !1;
15689
15502
  return !0;
15690
15503
  }, tryCombineChars = (e) => {
15691
15504
  for (var t = 0; t < e.length - 1; t++) {
@@ -16027,59 +15840,59 @@ var normalizeArgument = function(e) {
16027
15840
  u.type === "sizing" ? l = t.havingSize(u.size) : u.type === "styling" && (l = t.havingStyle(styleMap$1[u.style]));
16028
15841
  }
16029
15842
  var d = makeSpan([r[0] || "leftmost"], [], t), f = makeSpan([r[1] || "rightmost"], [], t), p = n === "root";
16030
- return traverseNonSpaceNodes(a, (e, t) => {
15843
+ return _traverseNonSpaceNodes(a, (e, t) => {
16031
15844
  var n = t.classes[0], r = e.classes[0];
16032
15845
  n === "mbin" && binRightCanceller.has(r) ? t.classes[0] = "mord" : r === "mbin" && binLeftCanceller.has(n) && (e.classes[0] = "mord");
16033
- }, { node: d }, f, p), traverseNonSpaceNodes(a, (e, t) => {
16034
- var n = getTypeOfDomTree(t), r = getTypeOfDomTree(e), a = n && r ? e.hasClass("mtight") ? tightSpacings[n][r] : spacings[n][r] : null;
15846
+ }, { node: d }, f, p), _traverseNonSpaceNodes(a, (e, t) => {
15847
+ var n = getTypeOfDomTree(t), r = getTypeOfDomTree(e), a = n && r ? e.hasClass("mtight") ? tightSpacings[n]?.[r] : spacings[n]?.[r] : null;
16035
15848
  if (a) return makeGlue(a, l);
16036
15849
  }, { node: d }, f, p), a;
16037
- }, traverseNonSpaceNodes = function e(t, n, r, a, o) {
16038
- a && t.push(a);
16039
- for (var s = 0; s < t.length; s++) {
16040
- var c = t[s], l = checkPartialGroup(c);
16041
- if (l) {
16042
- e(l.children, n, r, null, o);
15850
+ }, _traverseNonSpaceNodes = function(e, t, n, r, a) {
15851
+ r && e.push(r);
15852
+ for (var o = 0; o < e.length; o++) {
15853
+ var s = e[o], c = checkPartialGroup(s);
15854
+ if (c) {
15855
+ _traverseNonSpaceNodes(c.children, t, n, null, a);
16043
15856
  continue;
16044
15857
  }
16045
- var u = !c.hasClass("mspace");
16046
- if (u) {
16047
- var d = n(c, r.node);
16048
- d && (r.insertAfter ? r.insertAfter(d) : (t.unshift(d), s++));
15858
+ var l = !s.hasClass("mspace");
15859
+ if (l) {
15860
+ var u = t(s, n.node);
15861
+ u && (n.insertAfter ? n.insertAfter(u) : (e.unshift(u), o++));
16049
15862
  }
16050
- u ? r.node = c : o && c.hasClass("newline") && (r.node = makeSpan(["leftmost"])), r.insertAfter = ((e) => (n) => {
16051
- t.splice(e + 1, 0, n), s++;
16052
- })(s);
15863
+ l ? n.node = s : a && s.hasClass("newline") && (n.node = makeSpan(["leftmost"])), n.insertAfter = ((t) => (n) => {
15864
+ e.splice(t + 1, 0, n), o++;
15865
+ })(o);
16053
15866
  }
16054
- a && t.pop();
15867
+ r && e.pop();
16055
15868
  }, checkPartialGroup = function(e) {
16056
15869
  return e instanceof DocumentFragment || e instanceof Anchor || e instanceof Span && e.hasClass("enclosing") ? e : null;
16057
- }, getOutermostNode = function e(t, n) {
16058
- var r = checkPartialGroup(t);
16059
- if (r) {
16060
- var a = r.children;
16061
- if (a.length) {
16062
- if (n === "right") return e(a[a.length - 1], "right");
16063
- if (n === "left") return e(a[0], "left");
15870
+ }, _getOutermostNode = function(e, t) {
15871
+ var n = checkPartialGroup(e);
15872
+ if (n) {
15873
+ var r = n.children;
15874
+ if (r.length) {
15875
+ if (t === "right") return _getOutermostNode(r[r.length - 1], "right");
15876
+ if (t === "left") return _getOutermostNode(r[0], "left");
16064
15877
  }
16065
15878
  }
16066
- return t;
15879
+ return e;
16067
15880
  }, getTypeOfDomTree = function(e, t) {
16068
- return e ? (t && (e = getOutermostNode(e, t)), DomEnum[e.classes[0]] || null) : null;
15881
+ return e ? (t && (e = _getOutermostNode(e, t)), DomEnum[e.classes[0]] || null) : null;
16069
15882
  }, makeNullDelimiter = function(e, t) {
16070
15883
  var n = ["nulldelimiter"].concat(e.baseSizingClasses());
16071
15884
  return makeSpan(t.concat(n));
16072
- }, buildGroup$1 = function(e, t, r) {
16073
- if (!e) return makeSpan();
16074
- if (_htmlGroupBuilders[e.type]) {
16075
- var a = _htmlGroupBuilders[e.type](e, t);
16076
- if (r && t.size !== r.size) {
16077
- a = makeSpan(t.sizingClasses(r), [a], t);
16078
- var o = t.sizeMultiplier / r.sizeMultiplier;
15885
+ }, buildGroup$1 = function(t, n, r) {
15886
+ if (!t) return makeSpan();
15887
+ if (_htmlGroupBuilders[t.type]) {
15888
+ var a = _htmlGroupBuilders[t.type](t, n);
15889
+ if (r && n.size !== r.size) {
15890
+ a = makeSpan(n.sizingClasses(r), [a], n);
15891
+ var o = n.sizeMultiplier / r.sizeMultiplier;
16079
15892
  a.height *= o, a.depth *= o;
16080
15893
  }
16081
15894
  return a;
16082
- } else throw new ParseError("Got group of unknown type: '" + e.type + "'");
15895
+ } else throw new ParseError("Got group of unknown type: '" + t.type + "'");
16083
15896
  };
16084
15897
  function buildHTMLUnbreakable(e, t) {
16085
15898
  var n = makeSpan(["base"], e, t), r = makeSpan(["strut"]);
@@ -16096,7 +15909,7 @@ function buildHTML(e, t) {
16096
15909
  } else r[c].hasClass("newline") && (s.pop(), s.length > 0 && (o.push(buildHTMLUnbreakable(s, t)), s = []), o.push(r[c]));
16097
15910
  s.length > 0 && o.push(buildHTMLUnbreakable(s, t));
16098
15911
  var u;
16099
- n ? (u = buildHTMLUnbreakable(buildExpression$1(n, t, !0)), u.classes = ["tag"], o.push(u)) : a && o.push(a);
15912
+ n ? (u = buildHTMLUnbreakable(buildExpression$1(n, t, !0), t), u.classes = ["tag"], o.push(u)) : a && o.push(a);
16100
15913
  var d = makeSpan(["katex-html"], o);
16101
15914
  if (d.setAttribute("aria-hidden", "true"), u) {
16102
15915
  var f = u.children[0];
@@ -16109,7 +15922,7 @@ function newDocumentFragment(e) {
16109
15922
  }
16110
15923
  var MathNode = class {
16111
15924
  constructor(e, t, n) {
16112
- this.type = void 0, this.attributes = void 0, this.children = void 0, this.classes = void 0, this.type = e, this.attributes = {}, this.children = t || [], this.classes = n || [];
15925
+ this.type = e, this.attributes = {}, this.children = t || [], this.classes = n || [];
16113
15926
  }
16114
15927
  setAttribute(e, t) {
16115
15928
  this.attributes[e] = t;
@@ -16139,7 +15952,7 @@ var MathNode = class {
16139
15952
  }
16140
15953
  }, TextNode = class {
16141
15954
  constructor(e) {
16142
- this.text = void 0, this.text = e;
15955
+ this.text = e;
16143
15956
  }
16144
15957
  toNode() {
16145
15958
  return document.createTextNode(this.text);
@@ -16150,104 +15963,289 @@ var MathNode = class {
16150
15963
  toText() {
16151
15964
  return this.text;
16152
15965
  }
16153
- }, SpaceNode = class {
16154
- constructor(e) {
16155
- this.width = void 0, this.character = void 0, this.width = e, e >= .05555 && e <= .05556 ? this.character = " " : e >= .1666 && e <= .1667 ? this.character = " " : e >= .2222 && e <= .2223 ? this.character = " " : e >= .2777 && e <= .2778 ? this.character = "  " : e >= -.05556 && e <= -.05555 ? this.character = " ⁣" : e >= -.1667 && e <= -.1666 ? this.character = " ⁣" : e >= -.2223 && e <= -.2222 ? this.character = " ⁣" : e >= -.2778 && e <= -.2777 ? this.character = " ⁣" : this.character = null;
15966
+ }, SpaceNode = class {
15967
+ constructor(e) {
15968
+ this.width = e, e >= .05555 && e <= .05556 ? this.character = " " : e >= .1666 && e <= .1667 ? this.character = " " : e >= .2222 && e <= .2223 ? this.character = " " : e >= .2777 && e <= .2778 ? this.character = "  " : e >= -.05556 && e <= -.05555 ? this.character = " ⁣" : e >= -.1667 && e <= -.1666 ? this.character = " ⁣" : e >= -.2223 && e <= -.2222 ? this.character = " ⁣" : e >= -.2778 && e <= -.2777 ? this.character = " ⁣" : this.character = null;
15969
+ }
15970
+ toNode() {
15971
+ if (this.character) return document.createTextNode(this.character);
15972
+ var e = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mspace");
15973
+ return e.setAttribute("width", makeEm(this.width)), e;
15974
+ }
15975
+ toMarkup() {
15976
+ return this.character ? "<mtext>" + this.character + "</mtext>" : "<mspace width=\"" + makeEm(this.width) + "\"/>";
15977
+ }
15978
+ toText() {
15979
+ return this.character ? this.character : " ";
15980
+ }
15981
+ }, noVariantSymbols = new Set(["\\imath", "\\jmath"]), rowLikeTypes = new Set(["mrow", "mtable"]), makeText = function(e, t, n) {
15982
+ return symbols[t][e] && symbols[t][e].replace && e.charCodeAt(0) !== 55349 && !(ligatures.hasOwnProperty(e) && n && (n.fontFamily && n.fontFamily.slice(4, 6) === "tt" || n.font && n.font.slice(4, 6) === "tt")) && (e = symbols[t][e].replace), new TextNode(e);
15983
+ }, makeRow = function(e) {
15984
+ return e.length === 1 ? e[0] : new MathNode("mrow", e);
15985
+ }, getVariant = function(e, t) {
15986
+ if (t.fontFamily === "texttt") return "monospace";
15987
+ if (t.fontFamily === "textsf") return t.fontShape === "textit" && t.fontWeight === "textbf" ? "sans-serif-bold-italic" : t.fontShape === "textit" ? "sans-serif-italic" : t.fontWeight === "textbf" ? "bold-sans-serif" : "sans-serif";
15988
+ if (t.fontShape === "textit" && t.fontWeight === "textbf") return "bold-italic";
15989
+ if (t.fontShape === "textit") return "italic";
15990
+ if (t.fontWeight === "textbf") return "bold";
15991
+ var n = t.font;
15992
+ if (!n || n === "mathnormal") return null;
15993
+ var r = e.mode;
15994
+ if (n === "mathit") return "italic";
15995
+ if (n === "boldsymbol") return e.type === "textord" ? "bold" : "bold-italic";
15996
+ if (n === "mathbf") return "bold";
15997
+ if (n === "mathbb") return "double-struck";
15998
+ if (n === "mathsfit") return "sans-serif-italic";
15999
+ if (n === "mathfrak") return "fraktur";
16000
+ if (n === "mathscr" || n === "mathcal") return "script";
16001
+ if (n === "mathsf") return "sans-serif";
16002
+ if (n === "mathtt") return "monospace";
16003
+ var a = e.text;
16004
+ if (noVariantSymbols.has(a)) return null;
16005
+ if (symbols[r][a]) {
16006
+ var o = symbols[r][a].replace;
16007
+ o && (a = o);
16008
+ }
16009
+ var s = fontMap[n].fontName;
16010
+ return getCharacterMetrics(a, s, r) ? fontMap[n].variant : null;
16011
+ };
16012
+ function isNumberPunctuation(e) {
16013
+ if (!e) return !1;
16014
+ if (e.type === "mi" && e.children.length === 1) {
16015
+ var t = e.children[0];
16016
+ return t instanceof TextNode && t.text === ".";
16017
+ } else if (e.type === "mo" && e.children.length === 1 && e.getAttribute("separator") === "true" && e.getAttribute("lspace") === "0em" && e.getAttribute("rspace") === "0em") {
16018
+ var n = e.children[0];
16019
+ return n instanceof TextNode && n.text === ",";
16020
+ } else return !1;
16021
+ }
16022
+ var buildExpression = function(e, t, n) {
16023
+ if (e.length === 1) {
16024
+ var r = buildGroup(e[0], t);
16025
+ return n && r instanceof MathNode && r.type === "mo" && (r.setAttribute("lspace", "0em"), r.setAttribute("rspace", "0em")), [r];
16026
+ }
16027
+ for (var a = [], o, s = 0; s < e.length; s++) {
16028
+ var c = buildGroup(e[s], t);
16029
+ if (c instanceof MathNode && o instanceof MathNode) {
16030
+ if (c.type === "mtext" && o.type === "mtext" && c.getAttribute("mathvariant") === o.getAttribute("mathvariant")) {
16031
+ o.children.push(...c.children);
16032
+ continue;
16033
+ } else if (c.type === "mn" && o.type === "mn") {
16034
+ o.children.push(...c.children);
16035
+ continue;
16036
+ } else if (isNumberPunctuation(c) && o.type === "mn") {
16037
+ o.children.push(...c.children);
16038
+ continue;
16039
+ } else if (c.type === "mn" && isNumberPunctuation(o)) c.children = [...o.children, ...c.children], a.pop();
16040
+ else if ((c.type === "msup" || c.type === "msub") && c.children.length >= 1 && (o.type === "mn" || isNumberPunctuation(o))) {
16041
+ var l = c.children[0];
16042
+ l instanceof MathNode && l.type === "mn" && (l.children = [...o.children, ...l.children], a.pop());
16043
+ } else if (o.type === "mi" && o.children.length === 1) {
16044
+ var u = o.children[0];
16045
+ if (u instanceof TextNode && u.text === "̸" && (c.type === "mo" || c.type === "mi" || c.type === "mn")) {
16046
+ var d = c.children[0];
16047
+ d instanceof TextNode && d.text.length > 0 && (d.text = d.text.slice(0, 1) + "̸" + d.text.slice(1), a.pop());
16048
+ }
16049
+ }
16050
+ }
16051
+ a.push(c), o = c;
16052
+ }
16053
+ return a;
16054
+ }, buildExpressionRow = function(e, t, n) {
16055
+ return makeRow(buildExpression(e, t, n));
16056
+ }, buildGroup = function(t, n) {
16057
+ if (!t) return new MathNode("mrow");
16058
+ if (_mathmlGroupBuilders[t.type]) return _mathmlGroupBuilders[t.type](t, n);
16059
+ throw new ParseError("Got group of unknown type: '" + t.type + "'");
16060
+ };
16061
+ function buildMathML(e, t, n, r, a) {
16062
+ var o = buildExpression(e, n), s = o.length === 1 && o[0] instanceof MathNode && rowLikeTypes.has(o[0].type) ? o[0] : new MathNode("mrow", o), c = new MathNode("annotation", [new TextNode(t)]);
16063
+ c.setAttribute("encoding", "application/x-tex");
16064
+ var l = new MathNode("math", [new MathNode("semantics", [s, c])]);
16065
+ return l.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML"), r && l.setAttribute("display", "block"), makeSpan([a ? "katex" : "katex-mathml"], [l]);
16066
+ }
16067
+ var sizeStyleMap = [
16068
+ [
16069
+ 1,
16070
+ 1,
16071
+ 1
16072
+ ],
16073
+ [
16074
+ 2,
16075
+ 1,
16076
+ 1
16077
+ ],
16078
+ [
16079
+ 3,
16080
+ 1,
16081
+ 1
16082
+ ],
16083
+ [
16084
+ 4,
16085
+ 2,
16086
+ 1
16087
+ ],
16088
+ [
16089
+ 5,
16090
+ 2,
16091
+ 1
16092
+ ],
16093
+ [
16094
+ 6,
16095
+ 3,
16096
+ 1
16097
+ ],
16098
+ [
16099
+ 7,
16100
+ 4,
16101
+ 2
16102
+ ],
16103
+ [
16104
+ 8,
16105
+ 6,
16106
+ 3
16107
+ ],
16108
+ [
16109
+ 9,
16110
+ 7,
16111
+ 6
16112
+ ],
16113
+ [
16114
+ 10,
16115
+ 8,
16116
+ 7
16117
+ ],
16118
+ [
16119
+ 11,
16120
+ 10,
16121
+ 9
16122
+ ]
16123
+ ], sizeMultipliers = [
16124
+ .5,
16125
+ .6,
16126
+ .7,
16127
+ .8,
16128
+ .9,
16129
+ 1,
16130
+ 1.2,
16131
+ 1.44,
16132
+ 1.728,
16133
+ 2.074,
16134
+ 2.488
16135
+ ], sizeAtStyle = function(e, t) {
16136
+ return t.size < 2 ? e : sizeStyleMap[e - 1][t.size - 1];
16137
+ }, Options = class e {
16138
+ constructor(t) {
16139
+ this.style = t.style, this.color = t.color, this.size = t.size || e.BASESIZE, this.textSize = t.textSize || this.size, this.phantom = !!t.phantom, this.font = t.font || "", this.fontFamily = t.fontFamily || "", this.fontWeight = t.fontWeight || "", this.fontShape = t.fontShape || "", this.sizeMultiplier = sizeMultipliers[this.size - 1], this.maxSize = t.maxSize, this.minRuleThickness = t.minRuleThickness, this._fontMetrics = void 0;
16140
+ }
16141
+ extend(t) {
16142
+ var n = {
16143
+ style: this.style,
16144
+ size: this.size,
16145
+ textSize: this.textSize,
16146
+ color: this.color,
16147
+ phantom: this.phantom,
16148
+ font: this.font,
16149
+ fontFamily: this.fontFamily,
16150
+ fontWeight: this.fontWeight,
16151
+ fontShape: this.fontShape,
16152
+ maxSize: this.maxSize,
16153
+ minRuleThickness: this.minRuleThickness
16154
+ };
16155
+ return Object.assign(n, t), new e(n);
16156
+ }
16157
+ havingStyle(e) {
16158
+ return this.style === e ? this : this.extend({
16159
+ style: e,
16160
+ size: sizeAtStyle(this.textSize, e)
16161
+ });
16162
+ }
16163
+ havingCrampedStyle() {
16164
+ return this.havingStyle(this.style.cramp());
16165
+ }
16166
+ havingSize(e) {
16167
+ return this.size === e && this.textSize === e ? this : this.extend({
16168
+ style: this.style.text(),
16169
+ size: e,
16170
+ textSize: e,
16171
+ sizeMultiplier: sizeMultipliers[e - 1]
16172
+ });
16173
+ }
16174
+ havingBaseStyle(t) {
16175
+ t ||= this.style.text();
16176
+ var n = sizeAtStyle(e.BASESIZE, t);
16177
+ return this.size === n && this.textSize === e.BASESIZE && this.style === t ? this : this.extend({
16178
+ style: t,
16179
+ size: n
16180
+ });
16181
+ }
16182
+ havingBaseSizing() {
16183
+ var e;
16184
+ switch (this.style.id) {
16185
+ case 4:
16186
+ case 5:
16187
+ e = 3;
16188
+ break;
16189
+ case 6:
16190
+ case 7:
16191
+ e = 1;
16192
+ break;
16193
+ default: e = 6;
16194
+ }
16195
+ return this.extend({
16196
+ style: this.style.text(),
16197
+ size: e
16198
+ });
16199
+ }
16200
+ withColor(e) {
16201
+ return this.extend({ color: e });
16202
+ }
16203
+ withPhantom() {
16204
+ return this.extend({ phantom: !0 });
16205
+ }
16206
+ withFont(e) {
16207
+ return this.extend({ font: e });
16208
+ }
16209
+ withTextFontFamily(e) {
16210
+ return this.extend({
16211
+ fontFamily: e,
16212
+ font: ""
16213
+ });
16214
+ }
16215
+ withTextFontWeight(e) {
16216
+ return this.extend({
16217
+ fontWeight: e,
16218
+ font: ""
16219
+ });
16156
16220
  }
16157
- toNode() {
16158
- if (this.character) return document.createTextNode(this.character);
16159
- var e = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mspace");
16160
- return e.setAttribute("width", makeEm(this.width)), e;
16221
+ withTextFontShape(e) {
16222
+ return this.extend({
16223
+ fontShape: e,
16224
+ font: ""
16225
+ });
16161
16226
  }
16162
- toMarkup() {
16163
- return this.character ? "<mtext>" + this.character + "</mtext>" : "<mspace width=\"" + makeEm(this.width) + "\"/>";
16227
+ sizingClasses(e) {
16228
+ return e.size === this.size ? [] : [
16229
+ "sizing",
16230
+ "reset-size" + e.size,
16231
+ "size" + this.size
16232
+ ];
16164
16233
  }
16165
- toText() {
16166
- return this.character ? this.character : " ";
16234
+ baseSizingClasses() {
16235
+ return this.size === e.BASESIZE ? [] : [
16236
+ "sizing",
16237
+ "reset-size" + this.size,
16238
+ "size" + e.BASESIZE
16239
+ ];
16167
16240
  }
16168
- }, noVariantSymbols = new Set(["\\imath", "\\jmath"]), rowLikeTypes = new Set(["mrow", "mtable"]), makeText = function(e, t, n) {
16169
- return symbols[t][e] && symbols[t][e].replace && e.charCodeAt(0) !== 55349 && !(ligatures.hasOwnProperty(e) && n && (n.fontFamily && n.fontFamily.slice(4, 6) === "tt" || n.font && n.font.slice(4, 6) === "tt")) && (e = symbols[t][e].replace), new TextNode(e);
16170
- }, makeRow = function(e) {
16171
- return e.length === 1 ? e[0] : new MathNode("mrow", e);
16172
- }, getVariant = function(e, t) {
16173
- if (t.fontFamily === "texttt") return "monospace";
16174
- if (t.fontFamily === "textsf") return t.fontShape === "textit" && t.fontWeight === "textbf" ? "sans-serif-bold-italic" : t.fontShape === "textit" ? "sans-serif-italic" : t.fontWeight === "textbf" ? "bold-sans-serif" : "sans-serif";
16175
- if (t.fontShape === "textit" && t.fontWeight === "textbf") return "bold-italic";
16176
- if (t.fontShape === "textit") return "italic";
16177
- if (t.fontWeight === "textbf") return "bold";
16178
- var n = t.font;
16179
- if (!n || n === "mathnormal") return null;
16180
- var r = e.mode;
16181
- if (n === "mathit") return "italic";
16182
- if (n === "boldsymbol") return e.type === "textord" ? "bold" : "bold-italic";
16183
- if (n === "mathbf") return "bold";
16184
- if (n === "mathbb") return "double-struck";
16185
- if (n === "mathsfit") return "sans-serif-italic";
16186
- if (n === "mathfrak") return "fraktur";
16187
- if (n === "mathscr" || n === "mathcal") return "script";
16188
- if (n === "mathsf") return "sans-serif";
16189
- if (n === "mathtt") return "monospace";
16190
- var a = e.text;
16191
- if (noVariantSymbols.has(a)) return null;
16192
- symbols[r][a] && symbols[r][a].replace && (a = symbols[r][a].replace);
16193
- var o = fontMap[n].fontName;
16194
- return getCharacterMetrics(a, o, r) ? fontMap[n].variant : null;
16195
- };
16196
- function isNumberPunctuation(e) {
16197
- if (!e) return !1;
16198
- if (e.type === "mi" && e.children.length === 1) {
16199
- var t = e.children[0];
16200
- return t instanceof TextNode && t.text === ".";
16201
- } else if (e.type === "mo" && e.children.length === 1 && e.getAttribute("separator") === "true" && e.getAttribute("lspace") === "0em" && e.getAttribute("rspace") === "0em") {
16202
- var n = e.children[0];
16203
- return n instanceof TextNode && n.text === ",";
16204
- } else return !1;
16205
- }
16206
- var buildExpression = function(e, t, n) {
16207
- if (e.length === 1) {
16208
- var r = buildGroup(e[0], t);
16209
- return n && r instanceof MathNode && r.type === "mo" && (r.setAttribute("lspace", "0em"), r.setAttribute("rspace", "0em")), [r];
16241
+ fontMetrics() {
16242
+ return this._fontMetrics ||= getGlobalMetrics(this.size), this._fontMetrics;
16210
16243
  }
16211
- for (var a = [], o, s = 0; s < e.length; s++) {
16212
- var c = buildGroup(e[s], t);
16213
- if (c instanceof MathNode && o instanceof MathNode) {
16214
- if (c.type === "mtext" && o.type === "mtext" && c.getAttribute("mathvariant") === o.getAttribute("mathvariant")) {
16215
- o.children.push(...c.children);
16216
- continue;
16217
- } else if (c.type === "mn" && o.type === "mn") {
16218
- o.children.push(...c.children);
16219
- continue;
16220
- } else if (isNumberPunctuation(c) && o.type === "mn") {
16221
- o.children.push(...c.children);
16222
- continue;
16223
- } else if (c.type === "mn" && isNumberPunctuation(o)) c.children = [...o.children, ...c.children], a.pop();
16224
- else if ((c.type === "msup" || c.type === "msub") && c.children.length >= 1 && (o.type === "mn" || isNumberPunctuation(o))) {
16225
- var l = c.children[0];
16226
- l instanceof MathNode && l.type === "mn" && (l.children = [...o.children, ...l.children], a.pop());
16227
- } else if (o.type === "mi" && o.children.length === 1) {
16228
- var u = o.children[0];
16229
- if (u instanceof TextNode && u.text === "̸" && (c.type === "mo" || c.type === "mi" || c.type === "mn")) {
16230
- var d = c.children[0];
16231
- d instanceof TextNode && d.text.length > 0 && (d.text = d.text.slice(0, 1) + "̸" + d.text.slice(1), a.pop());
16232
- }
16233
- }
16234
- }
16235
- a.push(c), o = c;
16244
+ getColor() {
16245
+ return this.phantom ? "transparent" : this.color;
16236
16246
  }
16237
- return a;
16238
- }, buildExpressionRow = function(e, t, n) {
16239
- return makeRow(buildExpression(e, t, n));
16240
- }, buildGroup = function(e, t) {
16241
- if (!e) return new MathNode("mrow");
16242
- if (_mathmlGroupBuilders[e.type]) return _mathmlGroupBuilders[e.type](e, t);
16243
- throw new ParseError("Got group of unknown type: '" + e.type + "'");
16244
16247
  };
16245
- function buildMathML(e, t, n, r, a) {
16246
- var o = buildExpression(e, n), s = o.length === 1 && o[0] instanceof MathNode && rowLikeTypes.has(o[0].type) ? o[0] : new MathNode("mrow", o), c = new MathNode("annotation", [new TextNode(t)]);
16247
- c.setAttribute("encoding", "application/x-tex");
16248
- var l = new MathNode("math", [new MathNode("semantics", [s, c])]);
16249
- return l.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML"), r && l.setAttribute("display", "block"), makeSpan([a ? "katex" : "katex-mathml"], [l]);
16250
- }
16248
+ Options.BASESIZE = 6;
16251
16249
  var optionsFromSettings = function(e) {
16252
16250
  return new Options({
16253
16251
  style: e.displayMode ? Style$1.DISPLAY : Style$1.TEXT,
@@ -16278,6 +16276,8 @@ var optionsFromSettings = function(e) {
16278
16276
  xrightarrow: "→",
16279
16277
  underbrace: "⏟",
16280
16278
  overbrace: "⏞",
16279
+ underbracket: "⎵",
16280
+ overbracket: "⎴",
16281
16281
  overgroup: "⏠",
16282
16282
  undergroup: "⏡",
16283
16283
  overleftrightarrow: "↔",
@@ -16506,6 +16506,16 @@ var optionsFromSettings = function(e) {
16506
16506
  .888,
16507
16507
  522
16508
16508
  ],
16509
+ overbracket: [
16510
+ ["leftbracketover", "rightbracketover"],
16511
+ 1.6,
16512
+ 440
16513
+ ],
16514
+ underbracket: [
16515
+ ["leftbracketunder", "rightbracketunder"],
16516
+ 1.6,
16517
+ 410
16518
+ ],
16509
16519
  overgroup: [
16510
16520
  ["leftgroup", "rightgroup"],
16511
16521
  .888,
@@ -16690,20 +16700,23 @@ function assertSymbolNodeType(e) {
16690
16700
  function checkSymbolNodeType(e) {
16691
16701
  return e && (e.type === "atom" || NON_ATOMS.hasOwnProperty(e.type)) ? e : null;
16692
16702
  }
16693
- var htmlBuilder$a = (e, t) => {
16703
+ var getBaseSymbol = (e) => {
16704
+ if (e instanceof SymbolNode) return e;
16705
+ if (hasHtmlDomChildren(e) && e.children.length === 1) return getBaseSymbol(e.children[0]);
16706
+ }, htmlBuilder$a = (e, t) => {
16694
16707
  var n, r, a;
16695
16708
  e && e.type === "supsub" ? (r = assertNodeType(e.base, "accent"), n = r.base, e.base = n, a = assertSpan(buildGroup$1(e, t)), e.base = r) : (r = assertNodeType(e, "accent"), n = r.base);
16696
16709
  var o = buildGroup$1(n, t.havingCrampedStyle()), s = r.isShifty && isCharacterBox(n), c = 0;
16697
- s && (c = assertSymbolDomNode(buildGroup$1(getBaseElem(n), t.havingCrampedStyle())).skew);
16698
- var u = r.label === "\\c", f = u ? o.height + o.depth : Math.min(o.height, t.fontMetrics().xHeight), p;
16699
- if (r.isStretchy) p = stretchySvg(r, t), p = makeVList({
16710
+ s && (c = getBaseSymbol(o)?.skew ?? 0);
16711
+ var u = r.label === "\\c", d = u ? o.height + o.depth : Math.min(o.height, t.fontMetrics().xHeight), f;
16712
+ if (r.isStretchy) f = stretchySvg(r, t), f = makeVList({
16700
16713
  positionType: "firstBaseline",
16701
16714
  children: [{
16702
16715
  type: "elem",
16703
16716
  elem: o
16704
16717
  }, {
16705
16718
  type: "elem",
16706
- elem: p,
16719
+ elem: f,
16707
16720
  wrapperClasses: ["svg-align"],
16708
16721
  wrapperStyle: c > 0 ? {
16709
16722
  width: "calc(100% - " + makeEm(2 * c) + ")",
@@ -16712,15 +16725,16 @@ var htmlBuilder$a = (e, t) => {
16712
16725
  }]
16713
16726
  });
16714
16727
  else {
16715
- var m, h;
16716
- r.label === "\\vec" ? (m = staticSvg("vec", t), h = svgData.vec[1]) : (m = makeOrd({
16728
+ var p, m;
16729
+ r.label === "\\vec" ? (p = staticSvg("vec", t), m = svgData.vec[1]) : (p = makeOrd({
16730
+ type: "textord",
16717
16731
  mode: r.mode,
16718
16732
  text: r.label
16719
- }, t, "textord"), m = assertSymbolDomNode(m), m.italic = 0, h = m.width, u && (f += m.depth)), p = makeSpan(["accent-body"], [m]);
16720
- var g = r.label === "\\textcircled";
16721
- g && (p.classes.push("accent-full"), f = o.height);
16722
- var _ = c;
16723
- g || (_ -= h / 2), p.style.left = makeEm(_), r.label === "\\textcircled" && (p.style.top = ".2em"), p = makeVList({
16733
+ }, t, "textord"), p = assertSymbolDomNode(p), p.italic = 0, m = p.width, u && (d += p.depth)), f = makeSpan(["accent-body"], [p]);
16734
+ var h = r.label === "\\textcircled";
16735
+ h && (f.classes.push("accent-full"), d = o.height);
16736
+ var g = c;
16737
+ h || (g -= m / 2), f.style.left = makeEm(g), r.label === "\\textcircled" && (f.style.top = ".2em"), f = makeVList({
16724
16738
  positionType: "firstBaseline",
16725
16739
  children: [
16726
16740
  {
@@ -16729,17 +16743,17 @@ var htmlBuilder$a = (e, t) => {
16729
16743
  },
16730
16744
  {
16731
16745
  type: "kern",
16732
- size: -f
16746
+ size: -d
16733
16747
  },
16734
16748
  {
16735
16749
  type: "elem",
16736
- elem: p
16750
+ elem: f
16737
16751
  }
16738
16752
  ]
16739
16753
  });
16740
16754
  }
16741
- var v = makeSpan(["mord", "accent"], [p], t);
16742
- return a ? (a.children[0] = v, a.height = Math.max(v.height, a.height), a.classes[0] = "mord", a) : v;
16755
+ var _ = makeSpan(["mord", "accent"], [f], t);
16756
+ return a ? (a.children[0] = _, a.height = Math.max(_.height, a.height), a.classes[0] = "mord", a) : _;
16743
16757
  }, mathmlBuilder$9 = (e, t) => {
16744
16758
  var n = e.isStretchy ? stretchyMathML(e.label) : new MathNode("mo", [makeText(e.label, e.mode)]), r = new MathNode("mover", [buildGroup(e.base, t), n]);
16745
16759
  return r.setAttribute("accent", "true"), r;
@@ -17057,7 +17071,7 @@ defineFunction({
17057
17071
  symbol: !1,
17058
17072
  suppressBaseShift: r !== "\\stackrel",
17059
17073
  body: ordargument(a)
17060
- }, l = {
17074
+ }, u = {
17061
17075
  type: "supsub",
17062
17076
  mode: o.mode,
17063
17077
  base: c,
@@ -17068,8 +17082,8 @@ defineFunction({
17068
17082
  type: "mclass",
17069
17083
  mode: n.mode,
17070
17084
  mclass: s,
17071
- body: [l],
17072
- isCharacterBox: isCharacterBox(l)
17085
+ body: [u],
17086
+ isCharacterBox: isCharacterBox(u)
17073
17087
  };
17074
17088
  },
17075
17089
  htmlBuilder: htmlBuilder$9,
@@ -17148,19 +17162,19 @@ function cdArrow(e, t, n) {
17148
17162
  };
17149
17163
  }
17150
17164
  }
17151
- function parseCD(e) {
17152
- var t = [];
17153
- for (e.gullet.beginGroup(), e.gullet.macros.set("\\cr", "\\\\\\relax"), e.gullet.beginGroup();;) {
17154
- t.push(e.parseExpression(!1, "\\\\")), e.gullet.endGroup(), e.gullet.beginGroup();
17155
- var r = e.fetch().text;
17156
- if (r === "&" || r === "\\\\") e.consume();
17165
+ function parseCD(t) {
17166
+ var n = [];
17167
+ for (t.gullet.beginGroup(), t.gullet.macros.set("\\cr", "\\\\\\relax"), t.gullet.beginGroup();;) {
17168
+ n.push(t.parseExpression(!1, "\\\\")), t.gullet.endGroup(), t.gullet.beginGroup();
17169
+ var r = t.fetch().text;
17170
+ if (r === "&" || r === "\\\\") t.consume();
17157
17171
  else if (r === "\\end") {
17158
- t[t.length - 1].length === 0 && t.pop();
17172
+ n[n.length - 1].length === 0 && n.pop();
17159
17173
  break;
17160
- } else throw new ParseError("Expected \\\\ or \\cr or \\end", e.nextToken);
17174
+ } else throw new ParseError("Expected \\\\ or \\cr or \\end", t.nextToken);
17161
17175
  }
17162
- for (var a = [], o = [a], s = 0; s < t.length; s++) {
17163
- for (var c = t[s], l = newCell(), u = 0; u < c.length; u++) if (!isStartOfArrow(c[u])) l.body.push(c[u]);
17176
+ for (var a = [], o = [a], s = 0; s < n.length; s++) {
17177
+ for (var c = n[s], l = newCell(), u = 0; u < c.length; u++) if (!isStartOfArrow(c[u])) l.body.push(c[u]);
17164
17178
  else {
17165
17179
  a.push(l), u += 1;
17166
17180
  var d = assertSymbolNodeType(c[u]).text, f = [, ,];
@@ -17186,7 +17200,7 @@ function parseCD(e) {
17186
17200
  else throw new ParseError("Expected one of \"<>AV=|.\" after @", c[u]);
17187
17201
  var g = {
17188
17202
  type: "styling",
17189
- body: [cdArrow(d, f, e)],
17203
+ body: [cdArrow(d, f, t)],
17190
17204
  mode: "math",
17191
17205
  style: "display"
17192
17206
  };
@@ -17194,7 +17208,7 @@ function parseCD(e) {
17194
17208
  }
17195
17209
  s % 2 == 0 ? a.push(l) : a.shift(), a = [], o.push(a);
17196
17210
  }
17197
- return e.gullet.endGroup(), e.gullet.endGroup(), {
17211
+ return t.gullet.endGroup(), t.gullet.endGroup(), {
17198
17212
  type: "array",
17199
17213
  mode: "math",
17200
17214
  body: o,
@@ -17258,8 +17272,8 @@ defineFunction({
17258
17272
  numArgs: 1,
17259
17273
  allowedInText: !0
17260
17274
  },
17261
- handler(e, t) {
17262
- for (var { parser: r } = e, a = assertNodeType(t[0], "ordgroup").body, o = "", s = 0; s < a.length; s++) {
17275
+ handler(t, n) {
17276
+ for (var { parser: r } = t, a = assertNodeType(n[0], "ordgroup").body, o = "", s = 0; s < a.length; s++) {
17263
17277
  var c = assertNodeType(a[s], "textord");
17264
17278
  o += c.text;
17265
17279
  }
@@ -17353,10 +17367,10 @@ var globalMap = {
17353
17367
  "\\xdef": "\\xdef",
17354
17368
  "\\let": "\\\\globallet",
17355
17369
  "\\futurelet": "\\\\globalfuture"
17356
- }, checkControlSequence = (e) => {
17357
- var t = e.text;
17358
- if (/^(?:[\\{}$&#^_]|EOF)$/.test(t)) throw new ParseError("Expected a control sequence", e);
17359
- return t;
17370
+ }, checkControlSequence = (t) => {
17371
+ var n = t.text;
17372
+ if (/^(?:[\\{}$&#^_]|EOF)$/.test(n)) throw new ParseError("Expected a control sequence", t);
17373
+ return n;
17360
17374
  }, getRHS = (e) => {
17361
17375
  var t = e.gullet.popToken();
17362
17376
  return t.text === "=" && (t = e.gullet.popToken(), t.text === " " && (t = e.gullet.popToken())), t;
@@ -17379,11 +17393,11 @@ defineFunction({
17379
17393
  numArgs: 0,
17380
17394
  allowedInText: !0
17381
17395
  },
17382
- handler(e) {
17383
- var { parser: t, funcName: r } = e;
17384
- t.consumeSpaces();
17385
- var a = t.fetch();
17386
- if (globalMap[a.text]) return (r === "\\global" || r === "\\\\globallong") && (a.text = globalMap[a.text]), assertNodeType(t.parseFunction(), "internal");
17396
+ handler(t) {
17397
+ var { parser: n, funcName: r } = t;
17398
+ n.consumeSpaces();
17399
+ var a = n.fetch();
17400
+ if (globalMap[a.text]) return (r === "\\global" || r === "\\\\globallong") && (a.text = globalMap[a.text]), assertNodeType(n.parseFunction(), "internal");
17387
17401
  throw new ParseError("Invalid token after macro prefix", a);
17388
17402
  }
17389
17403
  }), defineFunction({
@@ -17399,27 +17413,27 @@ defineFunction({
17399
17413
  allowedInText: !0,
17400
17414
  primitive: !0
17401
17415
  },
17402
- handler(e) {
17403
- var { parser: t, funcName: r } = e, a = t.gullet.popToken(), o = a.text;
17416
+ handler(t) {
17417
+ var { parser: n, funcName: r } = t, a = n.gullet.popToken(), o = a.text;
17404
17418
  if (/^(?:[\\{}$&#^_]|EOF)$/.test(o)) throw new ParseError("Expected a control sequence", a);
17405
- for (var s = 0, c, l = [[]]; t.gullet.future().text !== "{";) if (a = t.gullet.popToken(), a.text === "#") {
17406
- if (t.gullet.future().text === "{") {
17407
- c = t.gullet.future(), l[s].push("{");
17419
+ for (var s = 0, c, l = [[]]; n.gullet.future().text !== "{";) if (a = n.gullet.popToken(), a.text === "#") {
17420
+ if (n.gullet.future().text === "{") {
17421
+ c = n.gullet.future(), l[s].push("{");
17408
17422
  break;
17409
17423
  }
17410
- if (a = t.gullet.popToken(), !/^[1-9]$/.test(a.text)) throw new ParseError("Invalid argument number \"" + a.text + "\"");
17424
+ if (a = n.gullet.popToken(), !/^[1-9]$/.test(a.text)) throw new ParseError("Invalid argument number \"" + a.text + "\"");
17411
17425
  if (parseInt(a.text) !== s + 1) throw new ParseError("Argument number \"" + a.text + "\" out of order");
17412
17426
  s++, l.push([]);
17413
17427
  } else if (a.text === "EOF") throw new ParseError("Expected a macro definition");
17414
17428
  else l[s].push(a.text);
17415
- var { tokens: u } = t.gullet.consumeArg();
17416
- return c && u.unshift(c), (r === "\\edef" || r === "\\xdef") && (u = t.gullet.expandTokens(u), u.reverse()), t.gullet.macros.set(o, {
17429
+ var { tokens: u } = n.gullet.consumeArg();
17430
+ return c && u.unshift(c), (r === "\\edef" || r === "\\xdef") && (u = n.gullet.expandTokens(u), u.reverse()), n.gullet.macros.set(o, {
17417
17431
  tokens: u,
17418
17432
  numArgs: s,
17419
17433
  delimiters: l
17420
17434
  }, r === globalMap[r]), {
17421
17435
  type: "internal",
17422
- mode: t.mode
17436
+ mode: n.mode
17423
17437
  };
17424
17438
  }
17425
17439
  }), defineFunction({
@@ -17515,7 +17529,7 @@ var getMetrics = function(e, t, n) {
17515
17529
  n && (O *= r.sizeMultiplier);
17516
17530
  var k = E / 2 - O, A = [];
17517
17531
  if (d.length > 0) {
17518
- var j = E - h - y, M = Math.round(E * 1e3), N = tallDelim(d, Math.round(j * 1e3)), P = new PathNode(d, N), F = (f / 1e3).toFixed(3) + "em", I = (M / 1e3).toFixed(3) + "em", L = makeSvgSpan([], [new SvgNode([P], {
17532
+ var j = E - h - y, M = Math.round(E * 1e3), N = tallDelim(d, Math.round(j * 1e3)), P = new PathNode(d, N), F = makeEm(f / 1e3), I = makeEm(M / 1e3), L = makeSvgSpan([], [new SvgNode([P], {
17519
17533
  width: F,
17520
17534
  height: I,
17521
17535
  viewBox: "0 0 " + f + " " + M
@@ -17614,10 +17628,10 @@ var getMetrics = function(e, t, n) {
17614
17628
  1.8,
17615
17629
  2.4,
17616
17630
  3
17617
- ], makeSizedDelim = function(e, t, r, a, o) {
17618
- if (e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle"), stackLargeDelimiters.has(e) || stackNeverDelimiters.has(e)) return makeLargeDelim(e, t, !1, r, a, o);
17619
- if (stackAlwaysDelimiters.has(e)) return makeStackedDelim(e, sizeToMaxHeight[t], !1, r, a, o);
17620
- throw new ParseError("Illegal delimiter: '" + e + "'");
17631
+ ], makeSizedDelim = function(t, n, r, a, o) {
17632
+ if (t === "<" || t === "\\lt" || t === "⟨" ? t = "\\langle" : (t === ">" || t === "\\gt" || t === "⟩") && (t = "\\rangle"), stackLargeDelimiters.has(t) || stackNeverDelimiters.has(t)) return makeLargeDelim(t, n, !1, r, a, o);
17633
+ if (stackAlwaysDelimiters.has(t)) return makeStackedDelim(t, sizeToMaxHeight[n], !1, r, a, o);
17634
+ throw new ParseError("Illegal delimiter: '" + t + "'");
17621
17635
  }, stackNeverDelimiterSequence = [
17622
17636
  {
17623
17637
  type: "small",
@@ -17695,15 +17709,18 @@ var getMetrics = function(e, t, n) {
17695
17709
  if (e.type === "small") return "Main-Regular";
17696
17710
  if (e.type === "large") return "Size" + e.size + "-Regular";
17697
17711
  if (e.type === "stack") return "Size4-Regular";
17698
- throw Error("Add support for delim type '" + e.type + "' here.");
17712
+ var t = e.type;
17713
+ throw Error("Add support for delim type '" + t + "' here.");
17699
17714
  }, traverseSequence = function(e, t, n, r) {
17700
- for (var a = Math.min(2, 3 - r.style.size); a < n.length && n[a].type !== "stack"; a++) {
17701
- var o = getMetrics(e, delimTypeToFont(n[a]), "math"), s = o.height + o.depth;
17702
- if (n[a].type === "small") {
17703
- var c = r.havingBaseStyle(n[a].style);
17704
- s *= c.sizeMultiplier;
17715
+ for (var a = Math.min(2, 3 - r.style.size); a < n.length; a++) {
17716
+ var o = n[a];
17717
+ if (o.type === "stack") break;
17718
+ var s = getMetrics(e, delimTypeToFont(o), "math"), c = s.height + s.depth;
17719
+ if (o.type === "small") {
17720
+ var l = r.havingBaseStyle(o.style);
17721
+ c *= l.sizeMultiplier;
17705
17722
  }
17706
- if (s > t) return n[a];
17723
+ if (c > t) return o;
17707
17724
  }
17708
17725
  return n[n.length - 1];
17709
17726
  }, makeCustomSizedDelim = function(e, t, n, r, a, o) {
@@ -17779,10 +17796,10 @@ var getMetrics = function(e, t, n) {
17779
17796
  size: 4
17780
17797
  }
17781
17798
  }, delimiters = new Set(/* @__PURE__ */ "(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.".split(","));
17782
- function checkDelimiter(e, t) {
17783
- var r = checkSymbolNodeType(e);
17799
+ function checkDelimiter(t, n) {
17800
+ var r = checkSymbolNodeType(t);
17784
17801
  if (r && delimiters.has(r.text)) return r;
17785
- throw r ? new ParseError("Invalid delimiter '" + r.text + "' after '" + t.funcName + "'", e) : new ParseError("Invalid delimiter type '" + e.type + "'", e);
17802
+ throw r ? new ParseError("Invalid delimiter '" + r.text + "' after '" + n.funcName + "'", t) : new ParseError("Invalid delimiter type '" + t.type + "'", t);
17786
17803
  }
17787
17804
  defineFunction({
17788
17805
  type: "delimsizing",
@@ -17838,13 +17855,13 @@ defineFunction({
17838
17855
  numArgs: 1,
17839
17856
  primitive: !0
17840
17857
  },
17841
- handler: (e, t) => {
17842
- var r = e.parser.gullet.macros.get("\\current@color");
17858
+ handler: (t, n) => {
17859
+ var r = t.parser.gullet.macros.get("\\current@color");
17843
17860
  if (r && typeof r != "string") throw new ParseError("\\current@color set to non-string in \\right");
17844
17861
  return {
17845
17862
  type: "leftright-right",
17846
- mode: e.parser.mode,
17847
- delim: checkDelimiter(t[0], e).text,
17863
+ mode: t.parser.mode,
17864
+ delim: checkDelimiter(n[0], t).text,
17848
17865
  color: r
17849
17866
  };
17850
17867
  }
@@ -17907,12 +17924,12 @@ defineFunction({
17907
17924
  numArgs: 1,
17908
17925
  primitive: !0
17909
17926
  },
17910
- handler: (e, t) => {
17911
- var r = checkDelimiter(t[0], e);
17912
- if (!e.parser.leftrightDepth) throw new ParseError("\\middle without preceding \\left", r);
17927
+ handler: (t, n) => {
17928
+ var r = checkDelimiter(n[0], t);
17929
+ if (!t.parser.leftrightDepth) throw new ParseError("\\middle without preceding \\left", r);
17913
17930
  return {
17914
17931
  type: "middle",
17915
- mode: e.parser.mode,
17932
+ mode: t.parser.mode,
17916
17933
  delim: r.text
17917
17934
  };
17918
17935
  },
@@ -17938,23 +17955,23 @@ var htmlBuilder$7 = (e, t) => {
17938
17955
  var n = wrapFragment(buildGroup$1(e.body, t), t), r = e.label.slice(1), a = t.sizeMultiplier, o, s = 0, c = isCharacterBox(e.body);
17939
17956
  if (r === "sout") o = makeSpan(["stretchy", "sout"]), o.height = t.fontMetrics().defaultRuleThickness / a, s = -.5 * t.fontMetrics().xHeight;
17940
17957
  else if (r === "phase") {
17941
- var l = calculateSize({
17958
+ var u = calculateSize({
17942
17959
  number: .6,
17943
17960
  unit: "pt"
17944
- }, t), u = calculateSize({
17961
+ }, t), d = calculateSize({
17945
17962
  number: .35,
17946
17963
  unit: "ex"
17947
17964
  }, t), f = t.havingBaseSizing();
17948
17965
  a /= f.sizeMultiplier;
17949
- var p = n.height + n.depth + l + u;
17950
- n.style.paddingLeft = makeEm(p / 2 + l);
17966
+ var p = n.height + n.depth + u + d;
17967
+ n.style.paddingLeft = makeEm(p / 2 + u);
17951
17968
  var m = Math.floor(1e3 * p * a);
17952
17969
  o = makeSvgSpan(["hide-tail"], [new SvgNode([new PathNode("phase", phasePath(m))], {
17953
17970
  width: "400em",
17954
17971
  height: makeEm(m / 1e3),
17955
17972
  viewBox: "0 0 400000 " + m,
17956
17973
  preserveAspectRatio: "xMinYMin slice"
17957
- })], t), o.style.height = makeEm(p), s = n.depth + l + u;
17974
+ })], t), o.style.height = makeEm(p), s = n.depth + u + d;
17958
17975
  } else {
17959
17976
  /cancel/.test(r) ? c || n.classes.push("cancel-pad") : r === "angl" ? n.classes.push("anglpad") : n.classes.push("boxpad");
17960
17977
  var h = 0, g = 0, _ = 0;
@@ -18015,7 +18032,7 @@ var htmlBuilder$7 = (e, t) => {
18015
18032
  case "\\colorbox":
18016
18033
  if (n = t.fontMetrics().fboxsep * t.fontMetrics().ptPerEm, r.setAttribute("width", "+" + 2 * n + "pt"), r.setAttribute("height", "+" + 2 * n + "pt"), r.setAttribute("lspace", n + "pt"), r.setAttribute("voffset", n + "pt"), e.label === "\\fcolorbox") {
18017
18034
  var a = Math.max(t.fontMetrics().fboxrule, t.minRuleThickness);
18018
- r.setAttribute("style", "border: " + a + "em solid " + String(e.borderColor));
18035
+ r.setAttribute("style", "border: " + makeEm(a) + " solid " + e.borderColor);
18019
18036
  }
18020
18037
  break;
18021
18038
  case "\\xcancel":
@@ -18092,7 +18109,6 @@ defineFunction({
18092
18109
  "\\cancel",
18093
18110
  "\\bcancel",
18094
18111
  "\\xcancel",
18095
- "\\sout",
18096
18112
  "\\phase"
18097
18113
  ],
18098
18114
  props: { numArgs: 1 },
@@ -18107,6 +18123,26 @@ defineFunction({
18107
18123
  },
18108
18124
  htmlBuilder: htmlBuilder$7,
18109
18125
  mathmlBuilder: mathmlBuilder$6
18126
+ }), defineFunction({
18127
+ type: "enclose",
18128
+ names: ["\\sout"],
18129
+ props: {
18130
+ numArgs: 1,
18131
+ allowedInText: !0
18132
+ },
18133
+ handler(e, t) {
18134
+ var { parser: n, funcName: r } = e;
18135
+ n.mode === "math" && n.settings.reportNonstrict("mathVsSout", "LaTeX's \\sout works only in text mode");
18136
+ var a = t[0];
18137
+ return {
18138
+ type: "enclose",
18139
+ mode: n.mode,
18140
+ label: r,
18141
+ body: a
18142
+ };
18143
+ },
18144
+ htmlBuilder: htmlBuilder$7,
18145
+ mathmlBuilder: mathmlBuilder$6
18110
18146
  }), defineFunction({
18111
18147
  type: "enclose",
18112
18148
  names: ["\\angl"],
@@ -18140,6 +18176,21 @@ var _macros = {};
18140
18176
  function defineMacro(e, t) {
18141
18177
  _macros[e] = t;
18142
18178
  }
18179
+ var SourceLocation = class e {
18180
+ constructor(e, t, n) {
18181
+ this.lexer = e, this.start = t, this.end = n;
18182
+ }
18183
+ static range(t, n) {
18184
+ return n ? !t || !t.loc || !n.loc || t.loc.lexer !== n.loc.lexer ? null : new e(t.loc.lexer, t.loc.start, n.loc.end) : t && t.loc;
18185
+ }
18186
+ }, Token = class e {
18187
+ constructor(e, t) {
18188
+ this.text = e, this.loc = t;
18189
+ }
18190
+ range(t, n) {
18191
+ return new e(n, SourceLocation.range(this, t));
18192
+ }
18193
+ };
18143
18194
  function getHLines(e) {
18144
18195
  var t = [];
18145
18196
  e.consumeSpaces();
@@ -18147,119 +18198,122 @@ function getHLines(e) {
18147
18198
  for (n === "\\relax" && (e.consume(), e.consumeSpaces(), n = e.fetch().text); n === "\\hline" || n === "\\hdashline";) e.consume(), t.push(n === "\\hdashline"), e.consumeSpaces(), n = e.fetch().text;
18148
18199
  return t;
18149
18200
  }
18150
- var validateAmsEnvironmentContext = (e) => {
18151
- if (!e.parser.settings.displayMode) throw new ParseError("{" + e.envName + "} can be used only in display mode.");
18201
+ var validateAmsEnvironmentContext = (t) => {
18202
+ if (!t.parser.settings.displayMode) throw new ParseError("{" + t.envName + "} can be used only in display mode.");
18152
18203
  }, gatherEnvironments = new Set(["gather", "gather*"]);
18153
18204
  function getAutoTag(e) {
18154
18205
  if (!e.includes("ed")) return !e.includes("*");
18155
18206
  }
18156
- function parseArray(e, r, a) {
18157
- var { hskipBeforeAndAfter: o, addJot: s, cols: c, arraystretch: l, colSeparationType: u, autoTag: d, singleRow: f, emptySingleRow: p, maxNumCols: m, leqno: h } = r;
18158
- if (e.gullet.beginGroup(), f || e.gullet.macros.set("\\cr", "\\\\\\relax"), !l) {
18159
- var g = e.gullet.expandMacroAsText("\\arraystretch");
18160
- if (g == null) l = 1;
18161
- else if (l = parseFloat(g), !l || l < 0) throw new ParseError("Invalid \\arraystretch: " + g);
18162
- }
18163
- e.gullet.beginGroup();
18164
- var _ = [], v = [_], y = [], b = [], x = d == null ? void 0 : [];
18165
- function C() {
18166
- d && e.gullet.macros.set("\\@eqnsw", "1", !0);
18207
+ function parseArray(t, n, r) {
18208
+ var { hskipBeforeAndAfter: a, addJot: o, cols: s, arraystretch: c, colSeparationType: l, autoTag: u, singleRow: d, emptySingleRow: f, maxNumCols: p, leqno: m } = n;
18209
+ if (t.gullet.beginGroup(), d || t.gullet.macros.set("\\cr", "\\\\\\relax"), !c) {
18210
+ var h = t.gullet.expandMacroAsText("\\arraystretch");
18211
+ if (h == null) c = 1;
18212
+ else if (c = parseFloat(h), !c || c < 0) throw new ParseError("Invalid \\arraystretch: " + h);
18213
+ }
18214
+ t.gullet.beginGroup();
18215
+ var g = [], _ = [g], v = [], y = [], b = u == null ? void 0 : [];
18216
+ function x() {
18217
+ u && t.gullet.macros.set("\\@eqnsw", "1", !0);
18167
18218
  }
18168
- function w() {
18169
- x && (e.gullet.macros.get("\\df@tag") ? (x.push(e.subparse([new Token("\\df@tag")])), e.gullet.macros.set("\\df@tag", void 0, !0)) : x.push(!!d && e.gullet.macros.get("\\@eqnsw") === "1"));
18219
+ function C() {
18220
+ b && (t.gullet.macros.get("\\df@tag") ? (b.push(t.subparse([new Token("\\df@tag")])), t.gullet.macros.set("\\df@tag", void 0, !0)) : b.push(!!u && t.gullet.macros.get("\\@eqnsw") === "1"));
18170
18221
  }
18171
- for (C(), b.push(getHLines(e));;) {
18172
- var E = e.parseExpression(!1, f ? "\\end" : "\\\\");
18173
- e.gullet.endGroup(), e.gullet.beginGroup(), E = {
18222
+ for (x(), y.push(getHLines(t));;) {
18223
+ var w = t.parseExpression(!1, d ? "\\end" : "\\\\");
18224
+ t.gullet.endGroup(), t.gullet.beginGroup();
18225
+ var E = {
18174
18226
  type: "ordgroup",
18175
- mode: e.mode,
18176
- body: E
18177
- }, a && (E = {
18227
+ mode: t.mode,
18228
+ body: w
18229
+ };
18230
+ r && (E = {
18178
18231
  type: "styling",
18179
- mode: e.mode,
18180
- style: a,
18232
+ mode: t.mode,
18233
+ style: r,
18181
18234
  body: [E]
18182
- }), _.push(E);
18183
- var O = e.fetch().text;
18235
+ }), g.push(E);
18236
+ var O = t.fetch().text;
18184
18237
  if (O === "&") {
18185
- if (m && _.length === m) {
18186
- if (f || u) throw new ParseError("Too many tab characters: &", e.nextToken);
18187
- e.settings.reportNonstrict("textEnv", "Too few columns specified in the {array} column argument.");
18238
+ if (p && g.length === p) {
18239
+ if (d || l) throw new ParseError("Too many tab characters: &", t.nextToken);
18240
+ t.settings.reportNonstrict("textEnv", "Too few columns specified in the {array} column argument.");
18188
18241
  }
18189
- e.consume();
18242
+ t.consume();
18190
18243
  } else if (O === "\\end") {
18191
- w(), _.length === 1 && E.type === "styling" && E.body[0].body.length === 0 && (v.length > 1 || !p) && v.pop(), b.length < v.length + 1 && b.push([]);
18244
+ C(), g.length === 1 && E.type === "styling" && E.body.length === 1 && E.body[0].type === "ordgroup" && E.body[0].body.length === 0 && (_.length > 1 || !f) && _.pop(), y.length < _.length + 1 && y.push([]);
18192
18245
  break;
18193
18246
  } else if (O === "\\\\") {
18194
- e.consume();
18247
+ t.consume();
18195
18248
  var k = void 0;
18196
- e.gullet.future().text !== " " && (k = e.parseSizeGroup(!0)), y.push(k ? k.value : null), w(), b.push(getHLines(e)), _ = [], v.push(_), C();
18197
- } else throw new ParseError("Expected & or \\\\ or \\cr or \\end", e.nextToken);
18249
+ t.gullet.future().text !== " " && (k = t.parseSizeGroup(!0)), v.push(k ? k.value : null), C(), y.push(getHLines(t)), g = [], _.push(g), x();
18250
+ } else throw new ParseError("Expected & or \\\\ or \\cr or \\end", t.nextToken);
18198
18251
  }
18199
- return e.gullet.endGroup(), e.gullet.endGroup(), {
18252
+ return t.gullet.endGroup(), t.gullet.endGroup(), {
18200
18253
  type: "array",
18201
- mode: e.mode,
18202
- addJot: s,
18203
- arraystretch: l,
18204
- body: v,
18205
- cols: c,
18206
- rowGaps: y,
18207
- hskipBeforeAndAfter: o,
18208
- hLinesBeforeRow: b,
18209
- colSeparationType: u,
18210
- tags: x,
18211
- leqno: h
18254
+ mode: t.mode,
18255
+ addJot: o,
18256
+ arraystretch: c,
18257
+ body: _,
18258
+ cols: s,
18259
+ rowGaps: v,
18260
+ hskipBeforeAndAfter: a,
18261
+ hLinesBeforeRow: y,
18262
+ colSeparationType: l,
18263
+ tags: b,
18264
+ leqno: m
18212
18265
  };
18213
18266
  }
18214
18267
  function dCellStyle(e) {
18215
18268
  return e.slice(0, 1) === "d" ? "display" : "text";
18216
18269
  }
18217
- var htmlBuilder$6 = function(e, t) {
18218
- var r, a, o = e.body.length, s = e.hLinesBeforeRow, c = 0, l = Array(o), u = [], d = Math.max(t.fontMetrics().arrayRuleWidth, t.minRuleThickness), f = 1 / t.fontMetrics().ptPerEm, p = 5 * f;
18219
- e.colSeparationType && e.colSeparationType === "small" && (p = .2778 * (t.havingStyle(Style$1.SCRIPT).sizeMultiplier / t.sizeMultiplier));
18220
- var m = e.colSeparationType === "CD" ? calculateSize({
18270
+ var htmlBuilder$6 = function(t, n) {
18271
+ var r, a, o = t.body.length, s = t.hLinesBeforeRow, c = 0, l = Array(o), u = [], d = Math.max(n.fontMetrics().arrayRuleWidth, n.minRuleThickness), f = 1 / n.fontMetrics().ptPerEm, p = 5 * f;
18272
+ t.colSeparationType && t.colSeparationType === "small" && (p = .2778 * (n.havingStyle(Style$1.SCRIPT).sizeMultiplier / n.sizeMultiplier));
18273
+ var m = t.colSeparationType === "CD" ? calculateSize({
18221
18274
  number: 3,
18222
18275
  unit: "ex"
18223
- }, t) : 12 * f, h = 3 * f, g = e.arraystretch * m, _ = .7 * g, v = .3 * g, y = 0;
18276
+ }, n) : 12 * f, h = 3 * f, g = t.arraystretch * m, _ = .7 * g, v = .3 * g, y = 0;
18224
18277
  function b(e) {
18225
18278
  for (var t = 0; t < e.length; ++t) t > 0 && (y += .25), u.push({
18226
18279
  pos: y,
18227
18280
  isDashed: e[t]
18228
18281
  });
18229
18282
  }
18230
- for (b(s[0]), r = 0; r < e.body.length; ++r) {
18231
- var x = e.body[r], C = _, w = v;
18283
+ for (b(s[0]), r = 0; r < t.body.length; ++r) {
18284
+ var x = t.body[r], C = _, w = v;
18232
18285
  c < x.length && (c = x.length);
18233
18286
  var E = Array(x.length);
18234
18287
  for (a = 0; a < x.length; ++a) {
18235
- var O = buildGroup$1(x[a], t);
18288
+ var O = buildGroup$1(x[a], n);
18236
18289
  w < O.depth && (w = O.depth), C < O.height && (C = O.height), E[a] = O;
18237
18290
  }
18238
- var k = e.rowGaps[r], A = 0;
18239
- k && (A = calculateSize(k, t), A > 0 && (A += v, w < A && (w = A), A = 0)), e.addJot && (w += h), E.height = C, E.depth = w, y += C, E.pos = y, y += w + A, l[r] = E, b(s[r + 1]);
18291
+ var k = t.rowGaps[r], A = 0;
18292
+ k && (A = calculateSize(k, n), A > 0 && (A += v, w < A && (w = A), A = 0)), t.addJot && r < t.body.length - 1 && (w += h), E.height = C, E.depth = w, y += C, E.pos = y, y += w + A, l[r] = E, b(s[r + 1]);
18240
18293
  }
18241
- var j = y / 2 + t.fontMetrics().axisHeight, M = e.cols || [], N = [], P, F, I = [];
18242
- if (e.tags && e.tags.some((e) => e)) for (r = 0; r < o; ++r) {
18243
- var L = l[r], R = L.pos - j, z = e.tags[r], B = void 0;
18244
- B = z === !0 ? makeSpan(["eqn-num"], [], t) : z === !1 ? makeSpan([], [], t) : makeSpan([], buildExpression$1(z, t, !0), t), B.depth = L.depth, B.height = L.height, I.push({
18294
+ var j = y / 2 + n.fontMetrics().axisHeight, M = t.cols || [], N = [], P, F, I = [];
18295
+ if (t.tags && t.tags.some((e) => e)) for (r = 0; r < o; ++r) {
18296
+ var L = l[r], R = L.pos - j, z = t.tags[r], B = void 0;
18297
+ B = z === !0 ? makeSpan(["eqn-num"], [], n) : z === !1 ? makeSpan([], [], n) : makeSpan([], buildExpression$1(z, n, !0), n), B.depth = L.depth, B.height = L.height, I.push({
18245
18298
  type: "elem",
18246
18299
  elem: B,
18247
18300
  shift: R
18248
18301
  });
18249
18302
  }
18250
18303
  for (a = 0, F = 0; a < c || F < M.length; ++a, ++F) {
18251
- for (var V = M[F] || {}, H = !0; V.type === "separator";) {
18252
- if (H || (P = makeSpan(["arraycolsep"], []), P.style.width = makeEm(t.fontMetrics().doubleRuleSep), N.push(P)), V.separator === "|" || V.separator === ":") {
18253
- var U = V.separator === "|" ? "solid" : "dashed", W = makeSpan(["vertical-separator"], [], t);
18254
- W.style.height = makeEm(y), W.style.borderRightWidth = makeEm(d), W.style.borderRightStyle = U, W.style.margin = "0 " + makeEm(-d / 2);
18304
+ for (var V = M[F], H = !0; (U = V)?.type === "separator";) {
18305
+ var U;
18306
+ if (H || (P = makeSpan(["arraycolsep"], []), P.style.width = makeEm(n.fontMetrics().doubleRuleSep), N.push(P)), V.separator === "|" || V.separator === ":") {
18307
+ var ia = V.separator === "|" ? "solid" : "dashed", W = makeSpan(["vertical-separator"], [], n);
18308
+ W.style.height = makeEm(y), W.style.borderRightWidth = makeEm(d), W.style.borderRightStyle = ia, W.style.margin = "0 " + makeEm(-d / 2);
18255
18309
  var G = y - j;
18256
18310
  G && (W.style.verticalAlign = makeEm(-G)), N.push(W);
18257
18311
  } else throw new ParseError("Invalid separator type: " + V.separator);
18258
- F++, V = M[F] || {}, H = !1;
18312
+ F++, V = M[F], H = !1;
18259
18313
  }
18260
18314
  if (!(a >= c)) {
18261
18315
  var K = void 0;
18262
- (a > 0 || e.hskipBeforeAndAfter) && (K = V.pregap ?? p, K !== 0 && (P = makeSpan(["arraycolsep"], []), P.style.width = makeEm(K), N.push(P)));
18316
+ (a > 0 || t.hskipBeforeAndAfter) && (K = V?.pregap ?? p, K !== 0 && (P = makeSpan(["arraycolsep"], []), P.style.width = makeEm(K), N.push(P)));
18263
18317
  var q = [];
18264
18318
  for (r = 0; r < o; ++r) {
18265
18319
  var J = l[r], Y = J[a];
@@ -18272,40 +18326,42 @@ var htmlBuilder$6 = function(e, t) {
18272
18326
  });
18273
18327
  }
18274
18328
  }
18275
- q = makeVList({
18329
+ var oa = makeVList({
18276
18330
  positionType: "individualShift",
18277
18331
  children: q
18278
- }), q = makeSpan(["col-align-" + (V.align || "c")], [q]), N.push(q), (a < c - 1 || e.hskipBeforeAndAfter) && (K = V.postgap ?? p, K !== 0 && (P = makeSpan(["arraycolsep"], []), P.style.width = makeEm(K), N.push(P)));
18332
+ }), sa = makeSpan(["col-align-" + (V?.align || "c")], [oa]);
18333
+ N.push(sa), (a < c - 1 || t.hskipBeforeAndAfter) && (K = V?.postgap ?? p, K !== 0 && (P = makeSpan(["arraycolsep"], []), P.style.width = makeEm(K), N.push(P)));
18279
18334
  }
18280
18335
  }
18281
- if (l = makeSpan(["mtable"], N), u.length > 0) {
18282
- for (var oa = makeLineSpan("hline", t, d), sa = makeLineSpan("hdashline", t, d), X = [{
18336
+ var X = makeSpan(["mtable"], N);
18337
+ if (u.length > 0) {
18338
+ for (var ca = makeLineSpan("hline", n, d), la = makeLineSpan("hdashline", n, d), Z = [{
18283
18339
  type: "elem",
18284
- elem: l,
18340
+ elem: X,
18285
18341
  shift: 0
18286
18342
  }]; u.length > 0;) {
18287
- var Z = u.pop(), Q = Z.pos - j;
18288
- Z.isDashed ? X.push({
18343
+ var Q = u.pop(), $ = Q.pos - j;
18344
+ Q.isDashed ? Z.push({
18289
18345
  type: "elem",
18290
- elem: sa,
18291
- shift: Q
18292
- }) : X.push({
18346
+ elem: la,
18347
+ shift: $
18348
+ }) : Z.push({
18293
18349
  type: "elem",
18294
- elem: oa,
18295
- shift: Q
18350
+ elem: ca,
18351
+ shift: $
18296
18352
  });
18297
18353
  }
18298
- l = makeVList({
18354
+ X = makeVList({
18299
18355
  positionType: "individualShift",
18300
- children: X
18356
+ children: Z
18301
18357
  });
18302
18358
  }
18303
- if (I.length === 0) return makeSpan(["mord"], [l], t);
18304
- var $ = makeVList({
18359
+ if (I.length === 0) return makeSpan(["mord"], [X], n);
18360
+ var ua = makeSpan(["tag"], [makeVList({
18305
18361
  positionType: "individualShift",
18306
18362
  children: I
18307
- });
18308
- return $ = makeSpan(["tag"], [$], t), makeFragment([l, $]);
18363
+ })], n);
18364
+ return makeFragment([X, ua]);
18309
18365
  }, alignMap = {
18310
18366
  c: "center ",
18311
18367
  l: "left ",
@@ -18321,46 +18377,49 @@ var htmlBuilder$6 = function(e, t) {
18321
18377
  if (e.cols && e.cols.length > 0) {
18322
18378
  var m = e.cols, h = "", g = !1, _ = 0, v = m.length;
18323
18379
  m[0].type === "separator" && (f += "top ", _ = 1), m[m.length - 1].type === "separator" && (f += "bottom ", --v);
18324
- for (var y = _; y < v; y++) m[y].type === "align" ? (p += alignMap[m[y].align], g && (h += "none "), g = !0) : m[y].type === "separator" && (g &&= (h += m[y].separator === "|" ? "solid " : "dashed ", !1));
18380
+ for (var y = _; y < v; y++) {
18381
+ var b = m[y];
18382
+ b.type === "align" ? (p += alignMap[b.align], g && (h += "none "), g = !0) : b.type === "separator" && (g &&= (h += b.separator === "|" ? "solid " : "dashed ", !1));
18383
+ }
18325
18384
  u.setAttribute("columnalign", p.trim()), /[sd]/.test(h) && u.setAttribute("columnlines", h.trim());
18326
18385
  }
18327
18386
  if (e.colSeparationType === "align") {
18328
- for (var b = e.cols || [], x = "", C = 1; C < b.length; C++) x += C % 2 ? "0em " : "1em ";
18329
- u.setAttribute("columnspacing", x.trim());
18387
+ for (var x = e.cols || [], C = "", w = 1; w < x.length; w++) C += w % 2 ? "0em " : "1em ";
18388
+ u.setAttribute("columnspacing", C.trim());
18330
18389
  } else e.colSeparationType === "alignat" || e.colSeparationType === "gather" ? u.setAttribute("columnspacing", "0em") : e.colSeparationType === "small" ? u.setAttribute("columnspacing", "0.2778em") : e.colSeparationType === "CD" ? u.setAttribute("columnspacing", "0.5em") : u.setAttribute("columnspacing", "1em");
18331
- var w = "", E = e.hLinesBeforeRow;
18332
- f += E[0].length > 0 ? "left " : "", f += E[E.length - 1].length > 0 ? "right " : "";
18333
- for (var O = 1; O < E.length - 1; O++) w += E[O].length === 0 ? "none " : E[O][0] ? "dashed " : "solid ";
18334
- return /[sd]/.test(w) && u.setAttribute("rowlines", w.trim()), f !== "" && (u = new MathNode("menclose", [u]), u.setAttribute("notation", f.trim())), e.arraystretch && e.arraystretch < 1 && (u = new MathNode("mstyle", [u]), u.setAttribute("scriptlevel", "1")), u;
18335
- }, alignedHandler = function(e, t) {
18336
- e.envName.includes("ed") || validateAmsEnvironmentContext(e);
18337
- var r = [], a = e.envName.includes("at") ? "alignat" : "align", o = e.envName === "split", s = parseArray(e.parser, {
18390
+ var E = "", O = e.hLinesBeforeRow;
18391
+ f += O[0].length > 0 ? "left " : "", f += O[O.length - 1].length > 0 ? "right " : "";
18392
+ for (var k = 1; k < O.length - 1; k++) E += O[k].length === 0 ? "none " : O[k][0] ? "dashed " : "solid ";
18393
+ return /[sd]/.test(E) && u.setAttribute("rowlines", E.trim()), f !== "" && (u = new MathNode("menclose", [u]), u.setAttribute("notation", f.trim())), e.arraystretch && e.arraystretch < 1 && (u = new MathNode("mstyle", [u]), u.setAttribute("scriptlevel", "1")), u;
18394
+ }, alignedHandler = function(t, n) {
18395
+ t.envName.includes("ed") || validateAmsEnvironmentContext(t);
18396
+ var r = [], a = t.envName.includes("at") ? "alignat" : "align", o = t.envName === "split", s = parseArray(t.parser, {
18338
18397
  cols: r,
18339
18398
  addJot: !0,
18340
- autoTag: o ? void 0 : getAutoTag(e.envName),
18399
+ autoTag: o ? void 0 : getAutoTag(t.envName),
18341
18400
  emptySingleRow: !0,
18342
18401
  colSeparationType: a,
18343
18402
  maxNumCols: o ? 2 : void 0,
18344
- leqno: e.parser.settings.leqno
18345
- }, "display"), c, l = 0, u = {
18403
+ leqno: t.parser.settings.leqno
18404
+ }, "display"), c = 0, l = 0, u = {
18346
18405
  type: "ordgroup",
18347
- mode: e.mode,
18406
+ mode: t.mode,
18348
18407
  body: []
18349
18408
  };
18350
- if (t[0] && t[0].type === "ordgroup") {
18351
- for (var d = "", f = 0; f < t[0].body.length; f++) {
18352
- var p = assertNodeType(t[0].body[f], "textord");
18409
+ if (n[0] && n[0].type === "ordgroup") {
18410
+ for (var d = "", f = 0; f < n[0].body.length; f++) {
18411
+ var p = assertNodeType(n[0].body[f], "textord");
18353
18412
  d += p.text;
18354
18413
  }
18355
18414
  c = Number(d), l = c * 2;
18356
18415
  }
18357
18416
  var m = !l;
18358
- s.body.forEach(function(e) {
18359
- for (var t = 1; t < e.length; t += 2) assertNodeType(assertNodeType(e[t], "styling").body[0], "ordgroup").body.unshift(u);
18360
- if (m) l < e.length && (l = e.length);
18417
+ s.body.forEach(function(t) {
18418
+ for (var n = 1; n < t.length; n += 2) assertNodeType(assertNodeType(t[n], "styling").body[0], "ordgroup").body.unshift(u);
18419
+ if (m) l < t.length && (l = t.length);
18361
18420
  else {
18362
- var r = e.length / 2;
18363
- if (c < r) throw new ParseError("Too many math in a row: " + ("expected " + c + ", but got " + r), e[0]);
18421
+ var r = t.length / 2;
18422
+ if (c < r) throw new ParseError("Too many math in a row: " + ("expected " + c + ", but got " + r), t[0]);
18364
18423
  }
18365
18424
  });
18366
18425
  for (var h = 0; h < l; ++h) {
@@ -18378,28 +18437,28 @@ defineEnvironment({
18378
18437
  type: "array",
18379
18438
  names: ["array", "darray"],
18380
18439
  props: { numArgs: 1 },
18381
- handler(e, t) {
18382
- var r = (checkSymbolNodeType(t[0]) ? [t[0]] : assertNodeType(t[0], "ordgroup").body).map(function(e) {
18383
- var t = assertSymbolNodeType(e).text;
18384
- if ("lcr".includes(t)) return {
18440
+ handler(t, n) {
18441
+ var r = (checkSymbolNodeType(n[0]) ? [n[0]] : assertNodeType(n[0], "ordgroup").body).map(function(t) {
18442
+ var n = assertSymbolNodeType(t).text;
18443
+ if ("lcr".includes(n)) return {
18385
18444
  type: "align",
18386
- align: t
18445
+ align: n
18387
18446
  };
18388
- if (t === "|") return {
18447
+ if (n === "|") return {
18389
18448
  type: "separator",
18390
18449
  separator: "|"
18391
18450
  };
18392
- if (t === ":") return {
18451
+ if (n === ":") return {
18393
18452
  type: "separator",
18394
18453
  separator: ":"
18395
18454
  };
18396
- throw new ParseError("Unknown column alignment: " + t, e);
18455
+ throw new ParseError("Unknown column alignment: " + n, t);
18397
18456
  }), a = {
18398
18457
  cols: r,
18399
18458
  hskipBeforeAndAfter: !0,
18400
18459
  maxNumCols: r.length
18401
18460
  };
18402
- return parseArray(e.parser, a, dCellStyle(e.envName));
18461
+ return parseArray(t.parser, a, dCellStyle(t.envName));
18403
18462
  },
18404
18463
  htmlBuilder: htmlBuilder$6,
18405
18464
  mathmlBuilder: mathmlBuilder$5
@@ -18420,23 +18479,23 @@ defineEnvironment({
18420
18479
  "Vmatrix*"
18421
18480
  ],
18422
18481
  props: { numArgs: 0 },
18423
- handler(e) {
18424
- var t = {
18482
+ handler(t) {
18483
+ var n = {
18425
18484
  matrix: null,
18426
18485
  pmatrix: ["(", ")"],
18427
18486
  bmatrix: ["[", "]"],
18428
18487
  Bmatrix: ["\\{", "\\}"],
18429
18488
  vmatrix: ["|", "|"],
18430
18489
  Vmatrix: ["\\Vert", "\\Vert"]
18431
- }[e.envName.replace("*", "")], r = "c", a = {
18490
+ }[t.envName.replace("*", "")], r = "c", a = {
18432
18491
  hskipBeforeAndAfter: !1,
18433
18492
  cols: [{
18434
18493
  type: "align",
18435
18494
  align: r
18436
18495
  }]
18437
18496
  };
18438
- if (e.envName.charAt(e.envName.length - 1) === "*") {
18439
- var o = e.parser;
18497
+ if (t.envName.charAt(t.envName.length - 1) === "*") {
18498
+ var o = t.parser;
18440
18499
  if (o.consumeSpaces(), o.fetch().text === "[") {
18441
18500
  if (o.consume(), o.consumeSpaces(), r = o.fetch().text, !"lcr".includes(r)) throw new ParseError("Expected l or c or r", o.nextToken);
18442
18501
  o.consume(), o.consumeSpaces(), o.expect("]"), o.consume(), a.cols = [{
@@ -18445,16 +18504,16 @@ defineEnvironment({
18445
18504
  }];
18446
18505
  }
18447
18506
  }
18448
- var s = parseArray(e.parser, a, dCellStyle(e.envName)), c = Math.max(0, ...s.body.map((e) => e.length));
18507
+ var s = parseArray(t.parser, a, dCellStyle(t.envName)), c = Math.max(0, ...s.body.map((e) => e.length));
18449
18508
  return s.cols = Array(c).fill({
18450
18509
  type: "align",
18451
18510
  align: r
18452
- }), t ? {
18511
+ }), n ? {
18453
18512
  type: "leftright",
18454
- mode: e.mode,
18513
+ mode: t.mode,
18455
18514
  body: [s],
18456
- left: t[0],
18457
- right: t[1],
18515
+ left: n[0],
18516
+ right: n[1],
18458
18517
  rightColor: void 0
18459
18518
  } : s;
18460
18519
  },
@@ -18474,23 +18533,23 @@ defineEnvironment({
18474
18533
  type: "array",
18475
18534
  names: ["subarray"],
18476
18535
  props: { numArgs: 1 },
18477
- handler(e, t) {
18478
- var r = (checkSymbolNodeType(t[0]) ? [t[0]] : assertNodeType(t[0], "ordgroup").body).map(function(e) {
18479
- var t = assertSymbolNodeType(e).text;
18480
- if ("lc".includes(t)) return {
18536
+ handler(t, n) {
18537
+ var r = (checkSymbolNodeType(n[0]) ? [n[0]] : assertNodeType(n[0], "ordgroup").body).map(function(t) {
18538
+ var n = assertSymbolNodeType(t).text;
18539
+ if ("lc".includes(n)) return {
18481
18540
  type: "align",
18482
- align: t
18541
+ align: n
18483
18542
  };
18484
- throw new ParseError("Unknown column alignment: " + t, e);
18543
+ throw new ParseError("Unknown column alignment: " + n, t);
18485
18544
  });
18486
18545
  if (r.length > 1) throw new ParseError("{subarray} can contain only one column");
18487
18546
  var a = {
18488
18547
  cols: r,
18489
18548
  hskipBeforeAndAfter: !1,
18490
18549
  arraystretch: .5
18491
- };
18492
- if (a = parseArray(e.parser, a, "script"), a.body.length > 0 && a.body[0].length > 1) throw new ParseError("{subarray} can contain only one column");
18493
- return a;
18550
+ }, o = parseArray(t.parser, a, "script");
18551
+ if (o.body.length > 0 && o.body[0].length > 1) throw new ParseError("{subarray} can contain only one column");
18552
+ return o;
18494
18553
  },
18495
18554
  htmlBuilder: htmlBuilder$6,
18496
18555
  mathmlBuilder: mathmlBuilder$5
@@ -18611,8 +18670,8 @@ defineEnvironment({
18611
18670
  allowedInText: !0,
18612
18671
  allowedInMath: !0
18613
18672
  },
18614
- handler(e, t) {
18615
- throw new ParseError(e.funcName + " valid only within array environment");
18673
+ handler(t, n) {
18674
+ throw new ParseError(t.funcName + " valid only within array environment");
18616
18675
  }
18617
18676
  });
18618
18677
  var environments = _environments;
@@ -18623,8 +18682,8 @@ defineFunction({
18623
18682
  numArgs: 1,
18624
18683
  argTypes: ["text"]
18625
18684
  },
18626
- handler(e, t) {
18627
- var { parser: r, funcName: a } = e, o = t[0];
18685
+ handler(t, n) {
18686
+ var { parser: r, funcName: a } = t, o = n[0];
18628
18687
  if (o.type !== "ordgroup") throw new ParseError("Invalid environment name", o);
18629
18688
  for (var s = "", c = 0; c < o.body.length; ++c) s += assertNodeType(o.body[c], "textord").text;
18630
18689
  if (a === "\\begin") {
@@ -19054,7 +19113,7 @@ var htmlBuilder$3 = (e, t) => {
19054
19113
  }
19055
19114
  ]
19056
19115
  }), c.children[0].children[0].children[0].classes.push("svg-align")), r) {
19057
- var l = makeSpan(["mord", a.isOver ? "mover" : "munder"], [c], t);
19116
+ var l = makeSpan(["minner", a.isOver ? "mover" : "munder"], [c], t);
19058
19117
  c = a.isOver ? makeVList({
19059
19118
  positionType: "firstBaseline",
19060
19119
  children: [
@@ -19090,11 +19149,16 @@ var htmlBuilder$3 = (e, t) => {
19090
19149
  ]
19091
19150
  });
19092
19151
  }
19093
- return makeSpan(["mord", a.isOver ? "mover" : "munder"], [c], t);
19152
+ return makeSpan(["minner", a.isOver ? "mover" : "munder"], [c], t);
19094
19153
  };
19095
19154
  defineFunction({
19096
19155
  type: "horizBrace",
19097
- names: ["\\overbrace", "\\underbrace"],
19156
+ names: [
19157
+ "\\overbrace",
19158
+ "\\underbrace",
19159
+ "\\overbracket",
19160
+ "\\underbracket"
19161
+ ],
19098
19162
  props: { numArgs: 1 },
19099
19163
  handler(e, t) {
19100
19164
  var { parser: n, funcName: r } = e;
@@ -19102,7 +19166,7 @@ defineFunction({
19102
19166
  type: "horizBrace",
19103
19167
  mode: n.mode,
19104
19168
  label: r,
19105
- isOver: /^\\over/.test(r),
19169
+ isOver: r.includes("\\over"),
19106
19170
  base: t[0]
19107
19171
  };
19108
19172
  },
@@ -19210,8 +19274,8 @@ defineFunction({
19210
19274
  argTypes: ["raw", "original"],
19211
19275
  allowedInText: !0
19212
19276
  },
19213
- handler: (e, t) => {
19214
- var { parser: r, funcName: a, token: o } = e, s = assertNodeType(t[0], "raw").string, c = t[1];
19277
+ handler: (t, n) => {
19278
+ var { parser: r, funcName: a, token: o } = t, s = assertNodeType(n[0], "raw").string, c = n[1];
19215
19279
  r.settings.strict && r.settings.reportNonstrict("htmlExtension", "HTML extension is disabled on strict mode");
19216
19280
  var l, u = {};
19217
19281
  switch (a) {
@@ -19282,16 +19346,16 @@ defineFunction({
19282
19346
  htmlBuilder: (e, t) => makeFragment(buildExpression$1(e.html, t, !1)),
19283
19347
  mathmlBuilder: (e, t) => buildExpressionRow(e.mathml, t)
19284
19348
  });
19285
- var sizeData = function(e) {
19286
- if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e)) return {
19287
- number: +e,
19349
+ var sizeData = function(t) {
19350
+ if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t)) return {
19351
+ number: +t,
19288
19352
  unit: "bp"
19289
19353
  };
19290
- var t = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);
19291
- if (!t) throw new ParseError("Invalid size: '" + e + "' in \\includegraphics");
19354
+ var n = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);
19355
+ if (!n) throw new ParseError("Invalid size: '" + t + "' in \\includegraphics");
19292
19356
  var r = {
19293
- number: +(t[1] + t[2]),
19294
- unit: t[3]
19357
+ number: +(n[1] + n[2]),
19358
+ unit: n[3]
19295
19359
  };
19296
19360
  if (!validUnit(r)) throw new ParseError("Invalid unit: '" + r.unit + "' in \\includegraphics.");
19297
19361
  return r;
@@ -19305,8 +19369,8 @@ defineFunction({
19305
19369
  argTypes: ["raw", "url"],
19306
19370
  allowedInText: !1
19307
19371
  },
19308
- handler: (e, t, r) => {
19309
- var { parser: a } = e, o = {
19372
+ handler: (t, n, r) => {
19373
+ var { parser: a } = t, o = {
19310
19374
  number: 0,
19311
19375
  unit: "em"
19312
19376
  }, s = {
@@ -19337,7 +19401,7 @@ defineFunction({
19337
19401
  }
19338
19402
  }
19339
19403
  }
19340
- var m = assertNodeType(t[0], "url").url;
19404
+ var m = assertNodeType(n[0], "url").url;
19341
19405
  return l === "" && (l = m, l = l.replace(/^.*[\\/]/, ""), l = l.substring(0, l.lastIndexOf("."))), a.settings.isTrusted({
19342
19406
  command: "\\includegraphics",
19343
19407
  url: m
@@ -19464,8 +19528,8 @@ defineFunction({
19464
19528
  allowedInText: !0,
19465
19529
  allowedInMath: !1
19466
19530
  },
19467
- handler(e, t) {
19468
- throw new ParseError("Mismatched " + e.funcName);
19531
+ handler(t, n) {
19532
+ throw new ParseError("Mismatched " + t.funcName);
19469
19533
  }
19470
19534
  });
19471
19535
  var chooseMathStyle = (e, t) => {
@@ -19500,25 +19564,25 @@ defineFunction({
19500
19564
  });
19501
19565
  var assembleSupSub = (e, t, n, r, a, o, s) => {
19502
19566
  e = makeSpan([], [e]);
19503
- var c = n && isCharacterBox(n), l, u;
19567
+ var c = n && isCharacterBox(n), u, d;
19504
19568
  if (t) {
19505
19569
  var f = buildGroup$1(t, r.havingStyle(a.sup()), r);
19506
- u = {
19570
+ d = {
19507
19571
  elem: f,
19508
19572
  kern: Math.max(r.fontMetrics().bigOpSpacing1, r.fontMetrics().bigOpSpacing3 - f.depth)
19509
19573
  };
19510
19574
  }
19511
19575
  if (n) {
19512
19576
  var p = buildGroup$1(n, r.havingStyle(a.sub()), r);
19513
- l = {
19577
+ u = {
19514
19578
  elem: p,
19515
19579
  kern: Math.max(r.fontMetrics().bigOpSpacing2, r.fontMetrics().bigOpSpacing4 - p.height)
19516
19580
  };
19517
19581
  }
19518
19582
  var m;
19519
- if (u && l) m = makeVList({
19583
+ if (d && u) m = makeVList({
19520
19584
  positionType: "bottom",
19521
- positionData: r.fontMetrics().bigOpSpacing5 + l.elem.height + l.elem.depth + l.kern + e.depth + s,
19585
+ positionData: r.fontMetrics().bigOpSpacing5 + u.elem.height + u.elem.depth + u.kern + e.depth + s,
19522
19586
  children: [
19523
19587
  {
19524
19588
  type: "kern",
@@ -19526,12 +19590,12 @@ var assembleSupSub = (e, t, n, r, a, o, s) => {
19526
19590
  },
19527
19591
  {
19528
19592
  type: "elem",
19529
- elem: l.elem,
19593
+ elem: u.elem,
19530
19594
  marginLeft: makeEm(-o)
19531
19595
  },
19532
19596
  {
19533
19597
  type: "kern",
19534
- size: l.kern
19598
+ size: u.kern
19535
19599
  },
19536
19600
  {
19537
19601
  type: "elem",
@@ -19539,11 +19603,11 @@ var assembleSupSub = (e, t, n, r, a, o, s) => {
19539
19603
  },
19540
19604
  {
19541
19605
  type: "kern",
19542
- size: u.kern
19606
+ size: d.kern
19543
19607
  },
19544
19608
  {
19545
19609
  type: "elem",
19546
- elem: u.elem,
19610
+ elem: d.elem,
19547
19611
  marginLeft: makeEm(o)
19548
19612
  },
19549
19613
  {
@@ -19552,7 +19616,7 @@ var assembleSupSub = (e, t, n, r, a, o, s) => {
19552
19616
  }
19553
19617
  ]
19554
19618
  });
19555
- else if (l) m = makeVList({
19619
+ else if (u) m = makeVList({
19556
19620
  positionType: "top",
19557
19621
  positionData: e.height - s,
19558
19622
  children: [
@@ -19562,12 +19626,12 @@ var assembleSupSub = (e, t, n, r, a, o, s) => {
19562
19626
  },
19563
19627
  {
19564
19628
  type: "elem",
19565
- elem: l.elem,
19629
+ elem: u.elem,
19566
19630
  marginLeft: makeEm(-o)
19567
19631
  },
19568
19632
  {
19569
19633
  type: "kern",
19570
- size: l.kern
19634
+ size: u.kern
19571
19635
  },
19572
19636
  {
19573
19637
  type: "elem",
@@ -19575,7 +19639,7 @@ var assembleSupSub = (e, t, n, r, a, o, s) => {
19575
19639
  }
19576
19640
  ]
19577
19641
  });
19578
- else if (u) m = makeVList({
19642
+ else if (d) m = makeVList({
19579
19643
  positionType: "bottom",
19580
19644
  positionData: e.depth + s,
19581
19645
  children: [
@@ -19585,11 +19649,11 @@ var assembleSupSub = (e, t, n, r, a, o, s) => {
19585
19649
  },
19586
19650
  {
19587
19651
  type: "kern",
19588
- size: u.kern
19652
+ size: d.kern
19589
19653
  },
19590
19654
  {
19591
19655
  type: "elem",
19592
- elem: u.elem,
19656
+ elem: d.elem,
19593
19657
  marginLeft: makeEm(o)
19594
19658
  },
19595
19659
  {
@@ -19600,7 +19664,7 @@ var assembleSupSub = (e, t, n, r, a, o, s) => {
19600
19664
  });
19601
19665
  else return e;
19602
19666
  var h = [m];
19603
- if (l && o !== 0 && !c) {
19667
+ if (u && o !== 0 && !c) {
19604
19668
  var g = makeSpan(["mspace"], [], r);
19605
19669
  g.style.marginRight = makeEm(o), h.unshift(g);
19606
19670
  }
@@ -19640,7 +19704,7 @@ var assembleSupSub = (e, t, n, r, a, o, s) => {
19640
19704
  l = makeSpan(["mop"], h, t);
19641
19705
  }
19642
19706
  var _ = 0, v = 0;
19643
- return (l instanceof SymbolNode || o.name === "\\oiint" || o.name === "\\oiiint") && !o.suppressBaseShift && (_ = (l.height - l.depth) / 2 - t.fontMetrics().axisHeight, v = l.italic), a ? assembleSupSub(l, n, r, t, s, v, _) : (_ && (l.style.position = "relative", l.style.top = makeEm(_)), l);
19707
+ return (l instanceof SymbolNode || o.name === "\\oiint" || o.name === "\\oiiint") && !o.suppressBaseShift && (_ = (l.height - l.depth) / 2 - t.fontMetrics().axisHeight, v = l.italic || 0), a ? assembleSupSub(l, n, r, t, s, v, _) : (_ && (l.style.position = "relative", l.style.top = makeEm(_)), l);
19644
19708
  }, mathmlBuilder$1 = (e, t) => {
19645
19709
  var n;
19646
19710
  if (e.symbol) n = new MathNode("mo", [makeText(e.name, e.mode)]), noSuccessor.has(e.name) && n.setAttribute("largeop", "false");
@@ -19794,7 +19858,7 @@ var htmlBuilder$1 = (e, t) => {
19794
19858
  var s;
19795
19859
  if (o.body.length > 0) {
19796
19860
  for (var c = buildExpression$1(o.body.map((e) => {
19797
- var t = e.text;
19861
+ var t = "text" in e ? e.text : void 0;
19798
19862
  return typeof t == "string" ? {
19799
19863
  type: "textord",
19800
19864
  mode: e.mode,
@@ -19830,7 +19894,6 @@ defineFunction({
19830
19894
  if (!(o instanceof SpaceNode)) if (o instanceof MathNode) switch (o.type) {
19831
19895
  case "mi":
19832
19896
  case "mn":
19833
- case "ms":
19834
19897
  case "mspace":
19835
19898
  case "mtext": break;
19836
19899
  case "mo":
@@ -19914,37 +19977,7 @@ defineFunction({
19914
19977
  },
19915
19978
  htmlBuilder: (e, t) => makeFragment(buildExpression$1(e.body, t.withPhantom(), !1)),
19916
19979
  mathmlBuilder: (e, t) => new MathNode("mphantom", buildExpression(e.body, t))
19917
- }), defineFunction({
19918
- type: "hphantom",
19919
- names: ["\\hphantom"],
19920
- props: {
19921
- numArgs: 1,
19922
- allowedInText: !0
19923
- },
19924
- handler: (e, t) => {
19925
- var { parser: n } = e, r = t[0];
19926
- return {
19927
- type: "hphantom",
19928
- mode: n.mode,
19929
- body: r
19930
- };
19931
- },
19932
- htmlBuilder: (e, t) => {
19933
- var n = makeSpan([], [buildGroup$1(e.body, t.withPhantom())]);
19934
- if (n.height = 0, n.depth = 0, n.children) for (var r = 0; r < n.children.length; r++) n.children[r].height = 0, n.children[r].depth = 0;
19935
- return n = makeVList({
19936
- positionType: "firstBaseline",
19937
- children: [{
19938
- type: "elem",
19939
- elem: n
19940
- }]
19941
- }), makeSpan(["mord"], [n], t);
19942
- },
19943
- mathmlBuilder: (e, t) => {
19944
- var n = new MathNode("mpadded", [new MathNode("mphantom", buildExpression(ordargument(e.body), t))]);
19945
- return n.setAttribute("height", "0px"), n.setAttribute("depth", "0px"), n;
19946
- }
19947
- }), defineFunction({
19980
+ }), defineMacro("\\hphantom", "\\smash{\\phantom{#1}}"), defineFunction({
19948
19981
  type: "vphantom",
19949
19982
  names: ["\\vphantom"],
19950
19983
  props: {
@@ -20100,18 +20133,21 @@ defineFunction({
20100
20133
  },
20101
20134
  handler: (e, t, n) => {
20102
20135
  var { parser: r } = e, a = !1, o = !1, s = n[0] && assertNodeType(n[0], "ordgroup");
20103
- if (s) for (var c = "", l = 0; l < s.body.length; ++l) if (c = s.body[l].text, c === "t") a = !0;
20104
- else if (c === "b") o = !0;
20105
- else {
20106
- a = !1, o = !1;
20107
- break;
20136
+ if (s) for (var c = "", l = 0; l < s.body.length; ++l) {
20137
+ var u = s.body[l];
20138
+ if (c = assertSymbolNodeType(u).text, c === "t") a = !0;
20139
+ else if (c === "b") o = !0;
20140
+ else {
20141
+ a = !1, o = !1;
20142
+ break;
20143
+ }
20108
20144
  }
20109
20145
  else a = !0, o = !0;
20110
- var u = t[0];
20146
+ var d = t[0];
20111
20147
  return {
20112
20148
  type: "smash",
20113
20149
  mode: r.mode,
20114
- body: u,
20150
+ body: d,
20115
20151
  smashHeight: a,
20116
20152
  smashDepth: o
20117
20153
  };
@@ -20119,8 +20155,8 @@ defineFunction({
20119
20155
  htmlBuilder: (e, t) => {
20120
20156
  var n = makeSpan([], [buildGroup$1(e.body, t)]);
20121
20157
  if (!e.smashHeight && !e.smashDepth) return n;
20122
- if (e.smashHeight && (n.height = 0, n.children)) for (var r = 0; r < n.children.length; r++) n.children[r].height = 0;
20123
- if (e.smashDepth && (n.depth = 0, n.children)) for (var a = 0; a < n.children.length; a++) n.children[a].depth = 0;
20158
+ if (e.smashHeight && (n.height = 0), e.smashDepth && (n.depth = 0), e.smashHeight && e.smashDepth) return makeSpan(["mord", "smash"], [n], t);
20159
+ if (n.children) for (var r = 0; r < n.children.length; r++) e.smashHeight && (n.children[r].height = 0), e.smashDepth && (n.children[r].depth = 0);
20124
20160
  return makeSpan(["mord"], [makeVList({
20125
20161
  positionType: "firstBaseline",
20126
20162
  children: [{
@@ -20248,34 +20284,34 @@ defineFunctionBuilders({
20248
20284
  htmlBuilder(e, t) {
20249
20285
  var n = htmlBuilderDelegate(e, t);
20250
20286
  if (n) return n(e, t);
20251
- var { base: r, sup: a, sub: o } = e, s = buildGroup$1(r, t), c, l, u = t.fontMetrics(), f = 0, p = 0, m = r && isCharacterBox(r);
20287
+ var { base: r, sup: a, sub: o } = e, s = buildGroup$1(r, t), c, u, d = t.fontMetrics(), f = 0, p = 0, m = r && isCharacterBox(r);
20252
20288
  if (a) {
20253
20289
  var h = t.havingStyle(t.style.sup());
20254
20290
  c = buildGroup$1(a, h, t), m || (f = s.height - h.fontMetrics().supDrop * h.sizeMultiplier / t.sizeMultiplier);
20255
20291
  }
20256
20292
  if (o) {
20257
20293
  var g = t.havingStyle(t.style.sub());
20258
- l = buildGroup$1(o, g, t), m || (p = s.depth + g.fontMetrics().subDrop * g.sizeMultiplier / t.sizeMultiplier);
20294
+ u = buildGroup$1(o, g, t), m || (p = s.depth + g.fontMetrics().subDrop * g.sizeMultiplier / t.sizeMultiplier);
20259
20295
  }
20260
- var _ = t.style === Style$1.DISPLAY ? u.sup1 : t.style.cramped ? u.sup3 : u.sup2, v = t.sizeMultiplier, y = makeEm(.5 / u.ptPerEm / v), b = null;
20261
- if (l) {
20296
+ var _ = t.style === Style$1.DISPLAY ? d.sup1 : t.style.cramped ? d.sup3 : d.sup2, v = t.sizeMultiplier, y = makeEm(.5 / d.ptPerEm / v), b = null;
20297
+ if (u) {
20262
20298
  var x = e.base && e.base.type === "op" && e.base.name && (e.base.name === "\\oiint" || e.base.name === "\\oiiint");
20263
20299
  (s instanceof SymbolNode || x) && (b = makeEm(-s.italic));
20264
20300
  }
20265
20301
  var C;
20266
- if (c && l) {
20267
- f = Math.max(f, _, c.depth + .25 * u.xHeight), p = Math.max(p, u.sub2);
20268
- var w = 4 * u.defaultRuleThickness;
20269
- if (f - c.depth - (l.height - p) < w) {
20270
- p = w - (f - c.depth) + l.height;
20271
- var E = .8 * u.xHeight - (f - c.depth);
20302
+ if (c && u) {
20303
+ f = Math.max(f, _, c.depth + .25 * d.xHeight), p = Math.max(p, d.sub2);
20304
+ var w = 4 * d.defaultRuleThickness;
20305
+ if (f - c.depth - (u.height - p) < w) {
20306
+ p = w - (f - c.depth) + u.height;
20307
+ var E = .8 * d.xHeight - (f - c.depth);
20272
20308
  E > 0 && (f += E, p -= E);
20273
20309
  }
20274
20310
  C = makeVList({
20275
20311
  positionType: "individualShift",
20276
20312
  children: [{
20277
20313
  type: "elem",
20278
- elem: l,
20314
+ elem: u,
20279
20315
  shift: p,
20280
20316
  marginRight: y,
20281
20317
  marginLeft: b
@@ -20286,17 +20322,17 @@ defineFunctionBuilders({
20286
20322
  marginRight: y
20287
20323
  }]
20288
20324
  });
20289
- } else if (l) p = Math.max(p, u.sub1, l.height - .8 * u.xHeight), C = makeVList({
20325
+ } else if (u) p = Math.max(p, d.sub1, u.height - .8 * d.xHeight), C = makeVList({
20290
20326
  positionType: "shift",
20291
20327
  positionData: p,
20292
20328
  children: [{
20293
20329
  type: "elem",
20294
- elem: l,
20330
+ elem: u,
20295
20331
  marginLeft: b,
20296
20332
  marginRight: y
20297
20333
  }]
20298
20334
  });
20299
- else if (c) f = Math.max(f, _, c.depth + .25 * u.xHeight), C = makeVList({
20335
+ else if (c) f = Math.max(f, _, c.depth + .25 * d.xHeight), C = makeVList({
20300
20336
  positionType: "shift",
20301
20337
  positionData: -f,
20302
20338
  children: [{
@@ -20378,21 +20414,21 @@ var cssSpace = {
20378
20414
  };
20379
20415
  defineFunctionBuilders({
20380
20416
  type: "spacing",
20381
- htmlBuilder(e, t) {
20382
- if (regularSpace.hasOwnProperty(e.text)) {
20383
- var r = regularSpace[e.text].className || "";
20384
- if (e.mode === "text") {
20385
- var a = makeOrd(e, t, "textord");
20417
+ htmlBuilder(t, n) {
20418
+ if (regularSpace.hasOwnProperty(t.text)) {
20419
+ var r = regularSpace[t.text].className || "";
20420
+ if (t.mode === "text") {
20421
+ var a = makeOrd(t, n, "textord");
20386
20422
  return a.classes.push(r), a;
20387
- } else return makeSpan(["mspace", r], [mathsym(e.text, e.mode, t)], t);
20388
- } else if (cssSpace.hasOwnProperty(e.text)) return makeSpan(["mspace", cssSpace[e.text]], [], t);
20389
- else throw new ParseError("Unknown type of space \"" + e.text + "\"");
20423
+ } else return makeSpan(["mspace", r], [mathsym(t.text, t.mode, n)], n);
20424
+ } else if (cssSpace.hasOwnProperty(t.text)) return makeSpan(["mspace", cssSpace[t.text]], [], n);
20425
+ else throw new ParseError("Unknown type of space \"" + t.text + "\"");
20390
20426
  },
20391
- mathmlBuilder(e, t) {
20427
+ mathmlBuilder(t, n) {
20392
20428
  var r;
20393
- if (regularSpace.hasOwnProperty(e.text)) r = new MathNode("mtext", [new TextNode("\xA0")]);
20394
- else if (cssSpace.hasOwnProperty(e.text)) return new MathNode("mspace");
20395
- else throw new ParseError("Unknown type of space \"" + e.text + "\"");
20429
+ if (regularSpace.hasOwnProperty(t.text)) r = new MathNode("mtext", [new TextNode("\xA0")]);
20430
+ else if (cssSpace.hasOwnProperty(t.text)) return new MathNode("mspace");
20431
+ else throw new ParseError("Unknown type of space \"" + t.text + "\"");
20396
20432
  return r;
20397
20433
  }
20398
20434
  });
@@ -20544,7 +20580,7 @@ defineFunction({
20544
20580
  });
20545
20581
  },
20546
20582
  mathmlBuilder(e, t) {
20547
- return new MathNode("mpadded", [buildGroup(e.body, t)], ["vcenter"]);
20583
+ return new MathNode("mrow", [new MathNode("mpadded", [buildGroup(e.body, t)], ["vcenter"])]);
20548
20584
  }
20549
20585
  }), defineFunction({
20550
20586
  type: "verb",
@@ -20553,7 +20589,7 @@ defineFunction({
20553
20589
  numArgs: 0,
20554
20590
  allowedInText: !0
20555
20591
  },
20556
- handler(e, t, r) {
20592
+ handler(t, n, r) {
20557
20593
  throw new ParseError("\\verb ended by end of line instead of matching delimiter");
20558
20594
  },
20559
20595
  htmlBuilder(e, t) {
@@ -20570,7 +20606,7 @@ defineFunction({
20570
20606
  });
20571
20607
  var makeVerb = (e) => e.body.replace(/ /g, e.star ? "␣" : "\xA0"), functions = _functions, spaceRegexString = "[ \r\n ]", controlWordRegexString = "\\\\[a-zA-Z@]+", controlSymbolRegexString = "\\\\[^\ud800-\udfff]", controlWordWhitespaceRegexString = "(" + controlWordRegexString + ")" + spaceRegexString + "*", controlSpaceRegexString = "\\\\(\n|[ \r ]+\n?)[ \r ]*", combiningDiacriticalMarkString = "[̀-ͯ]", combiningDiacriticalMarksEndRegex = /* @__PURE__ */ RegExp(combiningDiacriticalMarkString + "+$"), tokenRegexString = "(" + spaceRegexString + "+)|" + (controlSpaceRegexString + "|") + "([!-\\[\\]-‧‪-퟿豈-￿]" + (combiningDiacriticalMarkString + "*") + "|[\ud800-\udbff][\udc00-\udfff]" + (combiningDiacriticalMarkString + "*") + "|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5" + ("|" + controlWordWhitespaceRegexString) + ("|" + controlSymbolRegexString + ")"), Lexer = class {
20572
20608
  constructor(e, t) {
20573
- this.input = void 0, this.settings = void 0, this.tokenRegex = void 0, this.catcodes = void 0, this.input = e, this.settings = t, this.tokenRegex = new RegExp(tokenRegexString, "g"), this.catcodes = {
20609
+ this.input = e, this.settings = t, this.tokenRegex = new RegExp(tokenRegexString, "g"), this.catcodes = {
20574
20610
  "%": 14,
20575
20611
  "~": 13
20576
20612
  };
@@ -20579,28 +20615,28 @@ var makeVerb = (e) => e.body.replace(/ /g, e.star ? "␣" : "\xA0"), functions =
20579
20615
  this.catcodes[e] = t;
20580
20616
  }
20581
20617
  lex() {
20582
- var r = this.input, a = this.tokenRegex.lastIndex;
20583
- if (a === r.length) return new Token("EOF", new SourceLocation(this, a, a));
20584
- var o = this.tokenRegex.exec(r);
20585
- if (o === null || o.index !== a) throw new ParseError("Unexpected character: '" + r[a] + "'", new Token(r[a], new SourceLocation(this, a, a + 1)));
20586
- var s = o[6] || o[3] || (o[2] ? "\\ " : " ");
20587
- if (this.catcodes[s] === 14) {
20588
- var c = r.indexOf("\n", this.tokenRegex.lastIndex);
20589
- return c === -1 ? (this.tokenRegex.lastIndex = r.length, this.settings.reportNonstrict("commentAtEnd", "% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")) : this.tokenRegex.lastIndex = c + 1, this.lex();
20618
+ var t = this.input, n = this.tokenRegex.lastIndex;
20619
+ if (n === t.length) return new Token("EOF", new SourceLocation(this, n, n));
20620
+ var r = this.tokenRegex.exec(t);
20621
+ if (r === null || r.index !== n) throw new ParseError("Unexpected character: '" + t[n] + "'", new Token(t[n], new SourceLocation(this, n, n + 1)));
20622
+ var a = r[6] || r[3] || (r[2] ? "\\ " : " ");
20623
+ if (this.catcodes[a] === 14) {
20624
+ var o = t.indexOf("\n", this.tokenRegex.lastIndex);
20625
+ return o === -1 ? (this.tokenRegex.lastIndex = t.length, this.settings.reportNonstrict("commentAtEnd", "% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")) : this.tokenRegex.lastIndex = o + 1, this.lex();
20590
20626
  }
20591
- return new Token(s, new SourceLocation(this, a, this.tokenRegex.lastIndex));
20627
+ return new Token(a, new SourceLocation(this, n, this.tokenRegex.lastIndex));
20592
20628
  }
20593
20629
  }, Namespace = class {
20594
20630
  constructor(e, t) {
20595
- e === void 0 && (e = {}), t === void 0 && (t = {}), this.current = void 0, this.builtins = void 0, this.undefStack = void 0, this.current = t, this.builtins = e, this.undefStack = [];
20631
+ e === void 0 && (e = {}), t === void 0 && (t = {}), this.current = t, this.builtins = e, this.undefStack = [];
20596
20632
  }
20597
20633
  beginGroup() {
20598
20634
  this.undefStack.push({});
20599
20635
  }
20600
20636
  endGroup() {
20601
20637
  if (this.undefStack.length === 0) throw new ParseError("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");
20602
- var e = this.undefStack.pop();
20603
- for (var t in e) e.hasOwnProperty(t) && (e[t] == null ? delete this.current[t] : this.current[t] = e[t]);
20638
+ var t = this.undefStack.pop();
20639
+ for (var n in t) t.hasOwnProperty(n) && (t[n] == null ? delete this.current[n] : this.current[n] = t[n]);
20604
20640
  }
20605
20641
  endGroups() {
20606
20642
  for (; this.undefStack.length > 0;) this.endGroup();
@@ -20689,33 +20725,33 @@ var digitToNumber = {
20689
20725
  f: 15,
20690
20726
  F: 15
20691
20727
  };
20692
- defineMacro("\\char", function(e) {
20693
- var t = e.popToken(), r, a = "";
20694
- if (t.text === "'") r = 8, t = e.popToken();
20695
- else if (t.text === "\"") r = 16, t = e.popToken();
20696
- else if (t.text === "`") if (t = e.popToken(), t.text[0] === "\\") a = t.text.charCodeAt(1);
20697
- else if (t.text === "EOF") throw new ParseError("\\char` missing argument");
20698
- else a = t.text.charCodeAt(0);
20728
+ defineMacro("\\char", function(t) {
20729
+ var n = t.popToken(), r, a = 0;
20730
+ if (n.text === "'") r = 8, n = t.popToken();
20731
+ else if (n.text === "\"") r = 16, n = t.popToken();
20732
+ else if (n.text === "`") if (n = t.popToken(), n.text[0] === "\\") a = n.text.charCodeAt(1);
20733
+ else if (n.text === "EOF") throw new ParseError("\\char` missing argument");
20734
+ else a = n.text.charCodeAt(0);
20699
20735
  else r = 10;
20700
20736
  if (r) {
20701
- if (a = digitToNumber[t.text], a == null || a >= r) throw new ParseError("Invalid base-" + r + " digit " + t.text);
20702
- for (var o; (o = digitToNumber[e.future().text]) != null && o < r;) a *= r, a += o, e.popToken();
20737
+ if (a = digitToNumber[n.text], a == null || a >= r) throw new ParseError("Invalid base-" + r + " digit " + n.text);
20738
+ for (var o; (o = digitToNumber[t.future().text]) != null && o < r;) a *= r, a += o, t.popToken();
20703
20739
  }
20704
20740
  return "\\@char{" + a + "}";
20705
20741
  });
20706
- var newcommand = (e, t, r, a) => {
20707
- var o = e.consumeArg().tokens;
20742
+ var newcommand = (t, n, r, a) => {
20743
+ var o = t.consumeArg().tokens;
20708
20744
  if (o.length !== 1) throw new ParseError("\\newcommand's first argument must be a macro name");
20709
- var s = o[0].text, c = e.isDefined(s);
20710
- if (c && !t) throw new ParseError("\\newcommand{" + s + "} attempting to redefine " + (s + "; use \\renewcommand"));
20745
+ var s = o[0].text, c = t.isDefined(s);
20746
+ if (c && !n) throw new ParseError("\\newcommand{" + s + "} attempting to redefine " + (s + "; use \\renewcommand"));
20711
20747
  if (!c && !r) throw new ParseError("\\renewcommand{" + s + "} when command " + s + " does not yet exist; use \\newcommand");
20712
20748
  var l = 0;
20713
- if (o = e.consumeArg().tokens, o.length === 1 && o[0].text === "[") {
20714
- for (var u = "", d = e.expandNextToken(); d.text !== "]" && d.text !== "EOF";) u += d.text, d = e.expandNextToken();
20749
+ if (o = t.consumeArg().tokens, o.length === 1 && o[0].text === "[") {
20750
+ for (var u = "", d = t.expandNextToken(); d.text !== "]" && d.text !== "EOF";) u += d.text, d = t.expandNextToken();
20715
20751
  if (!u.match(/^\s*[0-9]+\s*$/)) throw new ParseError("Invalid number of arguments: " + u);
20716
- l = parseInt(u), o = e.consumeArg().tokens;
20752
+ l = parseInt(u), o = t.consumeArg().tokens;
20717
20753
  }
20718
- return c && a || e.macros.set(s, {
20754
+ return c && a || t.macros.set(s, {
20719
20755
  tokens: o,
20720
20756
  numArgs: l
20721
20757
  }), "";
@@ -20729,7 +20765,7 @@ defineMacro("\\newcommand", (e) => newcommand(e, !1, !0, !1)), defineMacro("\\re
20729
20765
  }), defineMacro("\\show", (e) => {
20730
20766
  var t = e.popToken(), n = t.text;
20731
20767
  return console.log(t, e.macros.get(n), functions[n], symbols.math[n], symbols.text[n]), "";
20732
- }), defineMacro("\\bgroup", "{"), defineMacro("\\egroup", "}"), defineMacro("~", "\\nobreakspace"), defineMacro("\\lq", "`"), defineMacro("\\rq", "'"), defineMacro("\\aa", "\\r a"), defineMacro("\\AA", "\\r A"), defineMacro("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}"), defineMacro("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"), defineMacro("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"), defineMacro("ℬ", "\\mathscr{B}"), defineMacro("ℰ", "\\mathscr{E}"), defineMacro("ℱ", "\\mathscr{F}"), defineMacro("ℋ", "\\mathscr{H}"), defineMacro("ℐ", "\\mathscr{I}"), defineMacro("ℒ", "\\mathscr{L}"), defineMacro("ℳ", "\\mathscr{M}"), defineMacro("ℛ", "\\mathscr{R}"), defineMacro("ℭ", "\\mathfrak{C}"), defineMacro("ℌ", "\\mathfrak{H}"), defineMacro("ℨ", "\\mathfrak{Z}"), defineMacro("\\Bbbk", "\\Bbb{k}"), defineMacro("·", "\\cdotp"), defineMacro("\\llap", "\\mathllap{\\textrm{#1}}"), defineMacro("\\rlap", "\\mathrlap{\\textrm{#1}}"), defineMacro("\\clap", "\\mathclap{\\textrm{#1}}"), defineMacro("\\mathstrut", "\\vphantom{(}"), defineMacro("\\underbar", "\\underline{\\text{#1}}"), defineMacro("\\not", "\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char\"338}"), defineMacro("\\neq", "\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"), defineMacro("\\ne", "\\neq"), defineMacro("≠", "\\neq"), defineMacro("\\notin", "\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"), defineMacro("∉", "\\notin"), defineMacro("≘", "\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"), defineMacro("≙", "\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"), defineMacro("≚", "\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"), defineMacro("≛", "\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"), defineMacro("≝", "\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"), defineMacro("≞", "\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"), defineMacro("≟", "\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"), defineMacro("⟂", "\\perp"), defineMacro("‼", "\\mathclose{!\\mkern-0.8mu!}"), defineMacro("∌", "\\notni"), defineMacro("⌜", "\\ulcorner"), defineMacro("⌝", "\\urcorner"), defineMacro("⌞", "\\llcorner"), defineMacro("⌟", "\\lrcorner"), defineMacro("©", "\\copyright"), defineMacro("®", "\\textregistered"), defineMacro("️", "\\textregistered"), defineMacro("\\ulcorner", "\\html@mathml{\\@ulcorner}{\\mathop{\\char\"231c}}"), defineMacro("\\urcorner", "\\html@mathml{\\@urcorner}{\\mathop{\\char\"231d}}"), defineMacro("\\llcorner", "\\html@mathml{\\@llcorner}{\\mathop{\\char\"231e}}"), defineMacro("\\lrcorner", "\\html@mathml{\\@lrcorner}{\\mathop{\\char\"231f}}"), defineMacro("\\vdots", "{\\varvdots\\rule{0pt}{15pt}}"), defineMacro("⋮", "\\vdots"), defineMacro("\\varGamma", "\\mathit{\\Gamma}"), defineMacro("\\varDelta", "\\mathit{\\Delta}"), defineMacro("\\varTheta", "\\mathit{\\Theta}"), defineMacro("\\varLambda", "\\mathit{\\Lambda}"), defineMacro("\\varXi", "\\mathit{\\Xi}"), defineMacro("\\varPi", "\\mathit{\\Pi}"), defineMacro("\\varSigma", "\\mathit{\\Sigma}"), defineMacro("\\varUpsilon", "\\mathit{\\Upsilon}"), defineMacro("\\varPhi", "\\mathit{\\Phi}"), defineMacro("\\varPsi", "\\mathit{\\Psi}"), defineMacro("\\varOmega", "\\mathit{\\Omega}"), defineMacro("\\substack", "\\begin{subarray}{c}#1\\end{subarray}"), defineMacro("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"), defineMacro("\\boxed", "\\fbox{$\\displaystyle{#1}$}"), defineMacro("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;"), defineMacro("\\implies", "\\DOTSB\\;\\Longrightarrow\\;"), defineMacro("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;"), defineMacro("\\dddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"), defineMacro("\\ddddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");
20768
+ }), defineMacro("\\bgroup", "{"), defineMacro("\\egroup", "}"), defineMacro("~", "\\nobreakspace"), defineMacro("\\lq", "`"), defineMacro("\\rq", "'"), defineMacro("\\aa", "\\r a"), defineMacro("\\AA", "\\r A"), defineMacro("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}"), defineMacro("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"), defineMacro("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"), defineMacro("ℬ", "\\mathscr{B}"), defineMacro("ℰ", "\\mathscr{E}"), defineMacro("ℱ", "\\mathscr{F}"), defineMacro("ℋ", "\\mathscr{H}"), defineMacro("ℐ", "\\mathscr{I}"), defineMacro("ℒ", "\\mathscr{L}"), defineMacro("ℳ", "\\mathscr{M}"), defineMacro("ℛ", "\\mathscr{R}"), defineMacro("ℭ", "\\mathfrak{C}"), defineMacro("ℌ", "\\mathfrak{H}"), defineMacro("ℨ", "\\mathfrak{Z}"), defineMacro("\\Bbbk", "\\Bbb{k}"), defineMacro("\\llap", "\\mathllap{\\textrm{#1}}"), defineMacro("\\rlap", "\\mathrlap{\\textrm{#1}}"), defineMacro("\\clap", "\\mathclap{\\textrm{#1}}"), defineMacro("\\mathstrut", "\\vphantom{(}"), defineMacro("\\underbar", "\\underline{\\text{#1}}"), defineMacro("\\not", "\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char\"338}"), defineMacro("\\neq", "\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"), defineMacro("\\ne", "\\neq"), defineMacro("≠", "\\neq"), defineMacro("\\notin", "\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"), defineMacro("∉", "\\notin"), defineMacro("≘", "\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"), defineMacro("≙", "\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"), defineMacro("≚", "\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"), defineMacro("≛", "\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"), defineMacro("≝", "\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"), defineMacro("≞", "\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"), defineMacro("≟", "\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"), defineMacro("⟂", "\\perp"), defineMacro("‼", "\\mathclose{!\\mkern-0.8mu!}"), defineMacro("∌", "\\notni"), defineMacro("⌜", "\\ulcorner"), defineMacro("⌝", "\\urcorner"), defineMacro("⌞", "\\llcorner"), defineMacro("⌟", "\\lrcorner"), defineMacro("©", "\\copyright"), defineMacro("®", "\\textregistered"), defineMacro("\\ulcorner", "\\html@mathml{\\@ulcorner}{\\mathop{\\char\"231c}}"), defineMacro("\\urcorner", "\\html@mathml{\\@urcorner}{\\mathop{\\char\"231d}}"), defineMacro("\\llcorner", "\\html@mathml{\\@llcorner}{\\mathop{\\char\"231e}}"), defineMacro("\\lrcorner", "\\html@mathml{\\@lrcorner}{\\mathop{\\char\"231f}}"), defineMacro("\\vdots", "{\\varvdots\\rule{0pt}{15pt}}"), defineMacro("⋮", "\\vdots"), defineMacro("\\varGamma", "\\mathit{\\Gamma}"), defineMacro("\\varDelta", "\\mathit{\\Delta}"), defineMacro("\\varTheta", "\\mathit{\\Theta}"), defineMacro("\\varLambda", "\\mathit{\\Lambda}"), defineMacro("\\varXi", "\\mathit{\\Xi}"), defineMacro("\\varPi", "\\mathit{\\Pi}"), defineMacro("\\varSigma", "\\mathit{\\Sigma}"), defineMacro("\\varUpsilon", "\\mathit{\\Upsilon}"), defineMacro("\\varPhi", "\\mathit{\\Phi}"), defineMacro("\\varPsi", "\\mathit{\\Psi}"), defineMacro("\\varOmega", "\\mathit{\\Omega}"), defineMacro("\\substack", "\\begin{subarray}{c}#1\\end{subarray}"), defineMacro("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"), defineMacro("\\boxed", "\\fbox{$\\displaystyle{#1}$}"), defineMacro("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;"), defineMacro("\\implies", "\\DOTSB\\;\\Longrightarrow\\;"), defineMacro("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;"), defineMacro("\\dddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"), defineMacro("\\ddddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");
20733
20769
  var dotsByToken = {
20734
20770
  ",": "\\dotsc",
20735
20771
  "\\not": "\\dotsb",
@@ -20811,8 +20847,8 @@ defineMacro("\\dotso", function(e) {
20811
20847
  return t in spaceAfterDots && t !== "," ? "\\ldots\\," : "\\ldots";
20812
20848
  }), defineMacro("\\cdots", function(e) {
20813
20849
  return e.future().text in spaceAfterDots ? "\\@cdots\\," : "\\@cdots";
20814
- }), defineMacro("\\dotsb", "\\cdots"), defineMacro("\\dotsm", "\\cdots"), defineMacro("\\dotsi", "\\!\\cdots"), defineMacro("\\dotsx", "\\ldots\\,"), defineMacro("\\DOTSI", "\\relax"), defineMacro("\\DOTSB", "\\relax"), defineMacro("\\DOTSX", "\\relax"), defineMacro("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"), defineMacro("\\,", "\\tmspace+{3mu}{.1667em}"), defineMacro("\\thinspace", "\\,"), defineMacro("\\>", "\\mskip{4mu}"), defineMacro("\\:", "\\tmspace+{4mu}{.2222em}"), defineMacro("\\medspace", "\\:"), defineMacro("\\;", "\\tmspace+{5mu}{.2777em}"), defineMacro("\\thickspace", "\\;"), defineMacro("\\!", "\\tmspace-{3mu}{.1667em}"), defineMacro("\\negthinspace", "\\!"), defineMacro("\\negmedspace", "\\tmspace-{4mu}{.2222em}"), defineMacro("\\negthickspace", "\\tmspace-{5mu}{.277em}"), defineMacro("\\enspace", "\\kern.5em "), defineMacro("\\enskip", "\\hskip.5em\\relax"), defineMacro("\\quad", "\\hskip1em\\relax"), defineMacro("\\qquad", "\\hskip2em\\relax"), defineMacro("\\tag", "\\@ifstar\\tag@literal\\tag@paren"), defineMacro("\\tag@paren", "\\tag@literal{({#1})}"), defineMacro("\\tag@literal", (e) => {
20815
- if (e.macros.get("\\df@tag")) throw new ParseError("Multiple \\tag");
20850
+ }), defineMacro("\\dotsb", "\\cdots"), defineMacro("\\dotsm", "\\cdots"), defineMacro("\\dotsi", "\\!\\cdots"), defineMacro("\\dotsx", "\\ldots\\,"), defineMacro("\\DOTSI", "\\relax"), defineMacro("\\DOTSB", "\\relax"), defineMacro("\\DOTSX", "\\relax"), defineMacro("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"), defineMacro("\\,", "\\tmspace+{3mu}{.1667em}"), defineMacro("\\thinspace", "\\,"), defineMacro("\\>", "\\mskip{4mu}"), defineMacro("\\:", "\\tmspace+{4mu}{.2222em}"), defineMacro("\\medspace", "\\:"), defineMacro("\\;", "\\tmspace+{5mu}{.2777em}"), defineMacro("\\thickspace", "\\;"), defineMacro("\\!", "\\tmspace-{3mu}{.1667em}"), defineMacro("\\negthinspace", "\\!"), defineMacro("\\negmedspace", "\\tmspace-{4mu}{.2222em}"), defineMacro("\\negthickspace", "\\tmspace-{5mu}{.277em}"), defineMacro("\\enspace", "\\kern.5em "), defineMacro("\\enskip", "\\hskip.5em\\relax"), defineMacro("\\quad", "\\hskip1em\\relax"), defineMacro("\\qquad", "\\hskip2em\\relax"), defineMacro("\\tag", "\\@ifstar\\tag@literal\\tag@paren"), defineMacro("\\tag@paren", "\\tag@literal{({#1})}"), defineMacro("\\tag@literal", (t) => {
20851
+ if (t.macros.get("\\df@tag")) throw new ParseError("Multiple \\tag");
20816
20852
  return "\\gdef\\df@tag{\\text{#1}}";
20817
20853
  }), defineMacro("\\bmod", "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"), defineMacro("\\pod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"), defineMacro("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}"), defineMacro("\\mod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"), defineMacro("\\newline", "\\\\\\relax"), defineMacro("\\TeX", "\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");
20818
20854
  var latexRaiseA = makeEm(fontMetricsData["Main-Regular"][84][1] - .7 * fontMetricsData["Main-Regular"][65][1]);
@@ -20847,7 +20883,7 @@ var implicitCommands = {
20847
20883
  "\\nolimits": !0
20848
20884
  }, MacroExpander = class {
20849
20885
  constructor(e, t, n) {
20850
- this.settings = void 0, this.expansionCount = void 0, this.lexer = void 0, this.macros = void 0, this.stack = void 0, this.mode = void 0, this.settings = t, this.expansionCount = 0, this.feed(e), this.macros = new Namespace(macros, t.macros), this.mode = n, this.stack = [];
20886
+ this.settings = t, this.expansionCount = 0, this.feed(e), this.macros = new Namespace(macros, t.macros), this.mode = n, this.stack = [];
20851
20887
  }
20852
20888
  feed(e) {
20853
20889
  this.lexer = new Lexer(e, this.settings);
@@ -20876,58 +20912,58 @@ var implicitCommands = {
20876
20912
  pushTokens(e) {
20877
20913
  this.stack.push(...e);
20878
20914
  }
20879
- scanArgument(n) {
20880
- var r, a, o;
20881
- if (n) {
20915
+ scanArgument(e) {
20916
+ var t, n, r;
20917
+ if (e) {
20882
20918
  if (this.consumeSpaces(), this.future().text !== "[") return null;
20883
- r = this.popToken(), {tokens: o, end: a} = this.consumeArg(["]"]);
20884
- } else ({tokens: o, start: r, end: a} = this.consumeArg());
20885
- return this.pushToken(new Token("EOF", a.loc)), this.pushTokens(o), new Token("", SourceLocation.range(r, a));
20919
+ t = this.popToken(), {tokens: r, end: n} = this.consumeArg(["]"]);
20920
+ } else ({tokens: r, start: t, end: n} = this.consumeArg());
20921
+ return this.pushToken(new Token("EOF", n.loc)), this.pushTokens(r), new Token("", SourceLocation.range(t, n));
20886
20922
  }
20887
20923
  consumeSpaces() {
20888
20924
  for (; this.future().text === " ";) this.stack.pop();
20889
20925
  }
20890
- consumeArg(e) {
20891
- var t = [], r = e && e.length > 0;
20926
+ consumeArg(t) {
20927
+ var n = [], r = t && t.length > 0;
20892
20928
  r || this.consumeSpaces();
20893
20929
  var a = this.future(), o, s = 0, c = 0;
20894
20930
  do {
20895
- if (o = this.popToken(), t.push(o), o.text === "{") ++s;
20931
+ if (o = this.popToken(), n.push(o), o.text === "{") ++s;
20896
20932
  else if (o.text === "}") {
20897
20933
  if (--s, s === -1) throw new ParseError("Extra }", o);
20898
- } else if (o.text === "EOF") throw new ParseError("Unexpected end of input in a macro argument, expected '" + (e && r ? e[c] : "}") + "'", o);
20899
- if (e && r) if ((s === 0 || s === 1 && e[c] === "{") && o.text === e[c]) {
20900
- if (++c, c === e.length) {
20901
- t.splice(-c, c);
20934
+ } else if (o.text === "EOF") throw new ParseError("Unexpected end of input in a macro argument, expected '" + (t && r ? t[c] : "}") + "'", o);
20935
+ if (t && r) if ((s === 0 || s === 1 && t[c] === "{") && o.text === t[c]) {
20936
+ if (++c, c === t.length) {
20937
+ n.splice(-c, c);
20902
20938
  break;
20903
20939
  }
20904
20940
  } else c = 0;
20905
20941
  } while (s !== 0 || r);
20906
- return a.text === "{" && t[t.length - 1].text === "}" && (t.pop(), t.shift()), t.reverse(), {
20907
- tokens: t,
20942
+ return a.text === "{" && n[n.length - 1].text === "}" && (n.pop(), n.shift()), n.reverse(), {
20943
+ tokens: n,
20908
20944
  start: a,
20909
20945
  end: o
20910
20946
  };
20911
20947
  }
20912
- consumeArgs(e, t) {
20913
- if (t) {
20914
- if (t.length !== e + 1) throw new ParseError("The length of delimiters doesn't match the number of args!");
20915
- for (var r = t[0], a = 0; a < r.length; a++) {
20948
+ consumeArgs(t, n) {
20949
+ if (n) {
20950
+ if (n.length !== t + 1) throw new ParseError("The length of delimiters doesn't match the number of args!");
20951
+ for (var r = n[0], a = 0; a < r.length; a++) {
20916
20952
  var o = this.popToken();
20917
20953
  if (r[a] !== o.text) throw new ParseError("Use of the macro doesn't match its definition", o);
20918
20954
  }
20919
20955
  }
20920
- for (var s = [], c = 0; c < e; c++) s.push(this.consumeArg(t && t[c + 1]).tokens);
20956
+ for (var s = [], c = 0; c < t; c++) s.push(this.consumeArg(n && n[c + 1]).tokens);
20921
20957
  return s;
20922
20958
  }
20923
- countExpansion(e) {
20924
- if (this.expansionCount += e, this.expansionCount > this.settings.maxExpand) throw new ParseError("Too many expansions: infinite loop or need to increase maxExpand setting");
20959
+ countExpansion(t) {
20960
+ if (this.expansionCount += t, this.expansionCount > this.settings.maxExpand) throw new ParseError("Too many expansions: infinite loop or need to increase maxExpand setting");
20925
20961
  }
20926
- expandOnce(e) {
20927
- var t = this.popToken(), r = t.text, a = t.noexpand ? null : this._getExpansion(r);
20928
- if (a == null || e && a.unexpandable) {
20929
- if (e && a == null && r[0] === "\\" && !this.isDefined(r)) throw new ParseError("Undefined control sequence: " + r);
20930
- return this.pushToken(t), !1;
20962
+ expandOnce(t) {
20963
+ var n = this.popToken(), r = n.text, a = n.noexpand ? null : this._getExpansion(r);
20964
+ if (a == null || t && a.unexpandable) {
20965
+ if (t && a == null && r[0] === "\\" && !this.isDefined(r)) throw new ParseError("Undefined control sequence: " + r);
20966
+ return this.pushToken(n), !1;
20931
20967
  }
20932
20968
  this.countExpansion(1);
20933
20969
  var o = a.tokens, s = this.consumeArgs(a.numArgs, a.delimiters);
@@ -20953,7 +20989,6 @@ var implicitCommands = {
20953
20989
  var e = this.stack.pop();
20954
20990
  return e.treatAsRelax && (e.text = "\\relax"), e;
20955
20991
  }
20956
- throw Error();
20957
20992
  }
20958
20993
  expandMacro(e) {
20959
20994
  return this.macros.has(e) ? this.expandTokens([new Token(e)]) : void 0;
@@ -21487,13 +21522,13 @@ var implicitCommands = {
21487
21522
  Ῠ: "Ῠ",
21488
21523
  Ώ: "Ώ",
21489
21524
  Ὼ: "Ὼ"
21490
- }, Parser = class r {
21525
+ }, Parser = class t {
21491
21526
  constructor(e, t) {
21492
- this.mode = void 0, this.gullet = void 0, this.settings = void 0, this.leftrightDepth = void 0, this.nextToken = void 0, this.mode = "math", this.gullet = new MacroExpander(e, t, this.mode), this.settings = t, this.leftrightDepth = 0;
21527
+ this.mode = "math", this.gullet = new MacroExpander(e, t, this.mode), this.settings = t, this.leftrightDepth = 0, this.nextToken = null;
21493
21528
  }
21494
- expect(e, t) {
21495
- if (t === void 0 && (t = !0), this.fetch().text !== e) throw new ParseError("Expected '" + e + "', got '" + this.fetch().text + "'", this.fetch());
21496
- t && this.consume();
21529
+ expect(t, n) {
21530
+ if (n === void 0 && (n = !0), this.fetch().text !== t) throw new ParseError("Expected '" + t + "', got '" + this.fetch().text + "'", this.fetch());
21531
+ n && this.consume();
21497
21532
  }
21498
21533
  consume() {
21499
21534
  this.nextToken = null;
@@ -21514,54 +21549,57 @@ var implicitCommands = {
21514
21549
  }
21515
21550
  }
21516
21551
  subparse(e) {
21517
- var n = this.nextToken;
21552
+ var t = this.nextToken;
21518
21553
  this.consume(), this.gullet.pushToken(new Token("}")), this.gullet.pushTokens(e);
21519
- var r = this.parseExpression(!1);
21520
- return this.expect("}"), this.nextToken = n, r;
21554
+ var n = this.parseExpression(!1);
21555
+ return this.expect("}"), this.nextToken = t, n;
21521
21556
  }
21522
- parseExpression(e, t) {
21523
- for (var n = [];;) {
21557
+ parseExpression(e, n) {
21558
+ for (var r = [];;) {
21524
21559
  this.mode === "math" && this.consumeSpaces();
21525
21560
  var a = this.fetch();
21526
- if (r.endOfExpression.has(a.text) || t && a.text === t || e && functions[a.text] && functions[a.text].infix) break;
21527
- var o = this.parseAtom(t);
21561
+ if (t.endOfExpression.has(a.text) || n && a.text === n || e && functions[a.text] && functions[a.text].infix) break;
21562
+ var o = this.parseAtom(n);
21528
21563
  if (o) {
21529
21564
  if (o.type === "internal") continue;
21530
21565
  } else break;
21531
- n.push(o);
21566
+ r.push(o);
21532
21567
  }
21533
- return this.mode === "text" && this.formLigatures(n), this.handleInfixNodes(n);
21534
- }
21535
- handleInfixNodes(e) {
21536
- for (var t = -1, r, a = 0; a < e.length; a++) if (e[a].type === "infix") {
21537
- if (t !== -1) throw new ParseError("only one infix operator per group", e[a].token);
21538
- t = a, r = e[a].replaceWith;
21568
+ return this.mode === "text" && this.formLigatures(r), this.handleInfixNodes(r);
21569
+ }
21570
+ handleInfixNodes(t) {
21571
+ for (var n = -1, r, a = 0; a < t.length; a++) {
21572
+ var o = t[a];
21573
+ if (o.type === "infix") {
21574
+ if (n !== -1) throw new ParseError("only one infix operator per group", o.token);
21575
+ n = a, r = o.replaceWith;
21576
+ }
21539
21577
  }
21540
- if (t !== -1 && r) {
21541
- var o, s, c = e.slice(0, t), l = e.slice(t + 1);
21542
- return o = c.length === 1 && c[0].type === "ordgroup" ? c[0] : {
21578
+ if (n !== -1 && r) {
21579
+ var s, c, l = t.slice(0, n), u = t.slice(n + 1);
21580
+ return s = l.length === 1 && l[0].type === "ordgroup" ? l[0] : {
21543
21581
  type: "ordgroup",
21544
21582
  mode: this.mode,
21545
- body: c
21546
- }, s = l.length === 1 && l[0].type === "ordgroup" ? l[0] : {
21583
+ body: l
21584
+ }, c = u.length === 1 && u[0].type === "ordgroup" ? u[0] : {
21547
21585
  type: "ordgroup",
21548
21586
  mode: this.mode,
21549
- body: l
21587
+ body: u
21550
21588
  }, [r === "\\\\abovefrac" ? this.callFunction(r, [
21551
- o,
21552
- e[t],
21553
- s
21554
- ], []) : this.callFunction(r, [o, s], [])];
21555
- } else return e;
21556
- }
21557
- handleSupSubscript(e) {
21558
- var t = this.fetch(), r = t.text;
21589
+ s,
21590
+ t[n],
21591
+ c
21592
+ ], []) : this.callFunction(r, [s, c], [])];
21593
+ } else return t;
21594
+ }
21595
+ handleSupSubscript(t) {
21596
+ var n = this.fetch(), r = n.text;
21559
21597
  this.consume(), this.consumeSpaces();
21560
21598
  var a;
21561
21599
  do
21562
- a = this.parseGroup(e);
21600
+ a = this.parseGroup(t);
21563
21601
  while (a?.type === "internal");
21564
- if (!a) throw new ParseError("Expected group after '" + r + "'", t);
21602
+ if (!a) throw new ParseError("Expected group after '" + r + "'", n);
21565
21603
  return a;
21566
21604
  }
21567
21605
  formatUnsupportedCmd(e) {
@@ -21582,92 +21620,92 @@ var implicitCommands = {
21582
21620
  body: [r]
21583
21621
  };
21584
21622
  }
21585
- parseAtom(e) {
21586
- var r = this.parseGroup("atom", e);
21587
- if (r?.type === "internal" || this.mode === "text") return r;
21588
- for (var a, o;;) {
21623
+ parseAtom(t) {
21624
+ var n = this.parseGroup("atom", t);
21625
+ if (n?.type === "internal" || this.mode === "text") return n;
21626
+ for (var r, a;;) {
21589
21627
  this.consumeSpaces();
21590
- var s = this.fetch();
21591
- if (s.text === "\\limits" || s.text === "\\nolimits") {
21592
- if (r && r.type === "op") r.limits = s.text === "\\limits", r.alwaysHandleSupSub = !0;
21593
- else if (r && r.type === "operatorname") r.alwaysHandleSupSub && (r.limits = s.text === "\\limits");
21594
- else throw new ParseError("Limit controls must follow a math operator", s);
21628
+ var o = this.fetch();
21629
+ if (o.text === "\\limits" || o.text === "\\nolimits") {
21630
+ if (n && n.type === "op") n.limits = o.text === "\\limits", n.alwaysHandleSupSub = !0;
21631
+ else if (n && n.type === "operatorname") n.alwaysHandleSupSub && (n.limits = o.text === "\\limits");
21632
+ else throw new ParseError("Limit controls must follow a math operator", o);
21595
21633
  this.consume();
21596
- } else if (s.text === "^") {
21597
- if (a) throw new ParseError("Double superscript", s);
21598
- a = this.handleSupSubscript("superscript");
21599
- } else if (s.text === "_") {
21600
- if (o) throw new ParseError("Double subscript", s);
21601
- o = this.handleSupSubscript("subscript");
21602
- } else if (s.text === "'") {
21603
- if (a) throw new ParseError("Double superscript", s);
21604
- var c = {
21634
+ } else if (o.text === "^") {
21635
+ if (r) throw new ParseError("Double superscript", o);
21636
+ r = this.handleSupSubscript("superscript");
21637
+ } else if (o.text === "_") {
21638
+ if (a) throw new ParseError("Double subscript", o);
21639
+ a = this.handleSupSubscript("subscript");
21640
+ } else if (o.text === "'") {
21641
+ if (r) throw new ParseError("Double superscript", o);
21642
+ var s = {
21605
21643
  type: "textord",
21606
21644
  mode: this.mode,
21607
21645
  text: "\\prime"
21608
- }, l = [c];
21609
- for (this.consume(); this.fetch().text === "'";) l.push(c), this.consume();
21610
- this.fetch().text === "^" && l.push(this.handleSupSubscript("superscript")), a = {
21646
+ }, c = [s];
21647
+ for (this.consume(); this.fetch().text === "'";) c.push(s), this.consume();
21648
+ this.fetch().text === "^" && c.push(this.handleSupSubscript("superscript")), r = {
21611
21649
  type: "ordgroup",
21612
21650
  mode: this.mode,
21613
- body: l
21651
+ body: c
21614
21652
  };
21615
- } else if (uSubsAndSups[s.text]) {
21616
- var u = unicodeSubRegEx.test(s.text), d = [];
21617
- for (d.push(new Token(uSubsAndSups[s.text])), this.consume();;) {
21618
- var f = this.fetch().text;
21619
- if (!uSubsAndSups[f] || unicodeSubRegEx.test(f) !== u) break;
21620
- d.unshift(new Token(uSubsAndSups[f])), this.consume();
21653
+ } else if (uSubsAndSups[o.text]) {
21654
+ var l = unicodeSubRegEx.test(o.text), u = [];
21655
+ for (u.push(new Token(uSubsAndSups[o.text])), this.consume();;) {
21656
+ var d = this.fetch().text;
21657
+ if (!uSubsAndSups[d] || unicodeSubRegEx.test(d) !== l) break;
21658
+ u.unshift(new Token(uSubsAndSups[d])), this.consume();
21621
21659
  }
21622
- var p = this.subparse(d);
21623
- u ? o = {
21660
+ var f = this.subparse(u);
21661
+ l ? a = {
21624
21662
  type: "ordgroup",
21625
21663
  mode: "math",
21626
- body: p
21627
- } : a = {
21664
+ body: f
21665
+ } : r = {
21628
21666
  type: "ordgroup",
21629
21667
  mode: "math",
21630
- body: p
21668
+ body: f
21631
21669
  };
21632
21670
  } else break;
21633
21671
  }
21634
- return a || o ? {
21672
+ return r || a ? {
21635
21673
  type: "supsub",
21636
21674
  mode: this.mode,
21637
- base: r,
21638
- sup: a,
21639
- sub: o
21640
- } : r;
21675
+ base: n,
21676
+ sup: r,
21677
+ sub: a
21678
+ } : n;
21641
21679
  }
21642
- parseFunction(e, t) {
21680
+ parseFunction(t, n) {
21643
21681
  var r = this.fetch(), a = r.text, o = functions[a];
21644
21682
  if (!o) return null;
21645
- if (this.consume(), t && t !== "atom" && !o.allowedInArgument) throw new ParseError("Got function '" + a + "' with no arguments" + (t ? " as " + t : ""), r);
21683
+ if (this.consume(), n && n !== "atom" && !o.allowedInArgument) throw new ParseError("Got function '" + a + "' with no arguments" + (n ? " as " + n : ""), r);
21646
21684
  if (this.mode === "text" && !o.allowedInText) throw new ParseError("Can't use function '" + a + "' in text mode", r);
21647
21685
  if (this.mode === "math" && o.allowedInMath === !1) throw new ParseError("Can't use function '" + a + "' in math mode", r);
21648
21686
  var { args: s, optArgs: c } = this.parseArguments(a, o);
21649
- return this.callFunction(a, s, c, r, e);
21687
+ return this.callFunction(a, s, c, r, t);
21650
21688
  }
21651
- callFunction(e, t, r, a, o) {
21689
+ callFunction(t, n, r, a, o) {
21652
21690
  var s = {
21653
- funcName: e,
21691
+ funcName: t,
21654
21692
  parser: this,
21655
21693
  token: a,
21656
21694
  breakOnTokenText: o
21657
- }, c = functions[e];
21658
- if (c && c.handler) return c.handler(s, t, r);
21659
- throw new ParseError("No function handler for " + e);
21695
+ }, c = functions[t];
21696
+ if (c && c.handler) return c.handler(s, n, r);
21697
+ throw new ParseError("No function handler for " + t);
21660
21698
  }
21661
- parseArguments(e, t) {
21662
- var r = t.numArgs + t.numOptionalArgs;
21699
+ parseArguments(t, n) {
21700
+ var r = n.numArgs + n.numOptionalArgs;
21663
21701
  if (r === 0) return {
21664
21702
  args: [],
21665
21703
  optArgs: []
21666
21704
  };
21667
21705
  for (var a = [], o = [], s = 0; s < r; s++) {
21668
- var c = t.argTypes && t.argTypes[s], l = s < t.numOptionalArgs;
21669
- (t.primitive && c == null || t.type === "sqrt" && s === 1 && o[0] == null) && (c = "primitive");
21670
- var u = this.parseGroupOfType("argument to '" + e + "'", c, l);
21706
+ var c = n.argTypes && n.argTypes[s], l = s < n.numOptionalArgs;
21707
+ ("primitive" in n && n.primitive && c == null || n.type === "sqrt" && s === 1 && o[0] == null) && (c = "primitive");
21708
+ var u = this.parseGroupOfType("argument to '" + t + "'", c, l);
21671
21709
  if (l) o.push(u);
21672
21710
  else if (u != null) a.push(u);
21673
21711
  else throw new ParseError("Null argument, please report this as a bug");
@@ -21677,13 +21715,13 @@ var implicitCommands = {
21677
21715
  optArgs: o
21678
21716
  };
21679
21717
  }
21680
- parseGroupOfType(e, t, r) {
21681
- switch (t) {
21718
+ parseGroupOfType(t, n, r) {
21719
+ switch (n) {
21682
21720
  case "color": return this.parseColorGroup(r);
21683
21721
  case "size": return this.parseSizeGroup(r);
21684
21722
  case "url": return this.parseUrlGroup(r);
21685
21723
  case "math":
21686
- case "text": return this.parseArgumentGroup(r, t);
21724
+ case "text": return this.parseArgumentGroup(r, n);
21687
21725
  case "hbox":
21688
21726
  var a = this.parseArgumentGroup(r, "text");
21689
21727
  return a == null ? null : {
@@ -21701,13 +21739,13 @@ var implicitCommands = {
21701
21739
  };
21702
21740
  case "primitive":
21703
21741
  if (r) throw new ParseError("A primitive argument cannot be optional");
21704
- var s = this.parseGroup(e);
21705
- if (s == null) throw new ParseError("Expected group as " + e, this.fetch());
21742
+ var s = this.parseGroup(t);
21743
+ if (s == null) throw new ParseError("Expected group as " + t, this.fetch());
21706
21744
  return s;
21707
21745
  case "original":
21708
21746
  case null:
21709
21747
  case void 0: return this.parseArgumentGroup(r);
21710
- default: throw new ParseError("Unknown group type as " + e, this.fetch());
21748
+ default: throw new ParseError("Unknown group type as " + t, this.fetch());
21711
21749
  }
21712
21750
  }
21713
21751
  consumeSpaces() {
@@ -21719,16 +21757,16 @@ var implicitCommands = {
21719
21757
  for (var r = "", a; (a = this.fetch()).text !== "EOF";) r += a.text, this.consume();
21720
21758
  return this.consume(), n.text = r, n;
21721
21759
  }
21722
- parseRegexGroup(e, t) {
21723
- for (var r = this.fetch(), a = r, o = "", s; (s = this.fetch()).text !== "EOF" && e.test(o + s.text);) a = s, o += a.text, this.consume();
21724
- if (o === "") throw new ParseError("Invalid " + t + ": '" + r.text + "'", r);
21760
+ parseRegexGroup(t, n) {
21761
+ for (var r = this.fetch(), a = r, o = "", s; (s = this.fetch()).text !== "EOF" && t.test(o + s.text);) a = s, o += a.text, this.consume();
21762
+ if (o === "") throw new ParseError("Invalid " + n + ": '" + r.text + "'", r);
21725
21763
  return r.range(a, o);
21726
21764
  }
21727
- parseColorGroup(e) {
21728
- var t = this.parseStringGroup("color", e);
21729
- if (t == null) return null;
21730
- var r = /^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);
21731
- if (!r) throw new ParseError("Invalid color: '" + t.text + "'", t);
21765
+ parseColorGroup(t) {
21766
+ var n = this.parseStringGroup("color", t);
21767
+ if (n == null) return null;
21768
+ var r = /^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(n.text);
21769
+ if (!r) throw new ParseError("Invalid color: '" + n.text + "'", n);
21732
21770
  var a = r[0];
21733
21771
  return /^[0-9a-f]{6}$/i.test(a) && (a = "#" + a), {
21734
21772
  type: "color-token",
@@ -21736,17 +21774,17 @@ var implicitCommands = {
21736
21774
  color: a
21737
21775
  };
21738
21776
  }
21739
- parseSizeGroup(e) {
21740
- var t, r = !1;
21741
- if (this.gullet.consumeSpaces(), t = !e && this.gullet.future().text !== "{" ? this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size") : this.parseStringGroup("size", e), !t) return null;
21742
- !e && t.text.length === 0 && (t.text = "0pt", r = !0);
21743
- var a = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);
21744
- if (!a) throw new ParseError("Invalid size: '" + t.text + "'", t);
21777
+ parseSizeGroup(t) {
21778
+ var n, r = !1;
21779
+ if (this.gullet.consumeSpaces(), n = !t && this.gullet.future().text !== "{" ? this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size") : this.parseStringGroup("size", t), !n) return null;
21780
+ !t && n.text.length === 0 && (n.text = "0pt", r = !0);
21781
+ var a = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);
21782
+ if (!a) throw new ParseError("Invalid size: '" + n.text + "'", n);
21745
21783
  var o = {
21746
21784
  number: +(a[1] + a[2]),
21747
21785
  unit: a[3]
21748
21786
  };
21749
- if (!validUnit(o)) throw new ParseError("Invalid unit: '" + o.unit + "'", t);
21787
+ if (!validUnit(o)) throw new ParseError("Invalid unit: '" + o.unit + "'", n);
21750
21788
  return {
21751
21789
  type: "size",
21752
21790
  mode: this.mode,
@@ -21780,106 +21818,115 @@ var implicitCommands = {
21780
21818
  };
21781
21819
  return t && this.switchMode(r), o;
21782
21820
  }
21783
- parseGroup(t, r) {
21784
- var a = this.fetch(), o = a.text, s;
21785
- if (o === "{" || o === "\\begingroup") {
21821
+ parseGroup(t, n) {
21822
+ var r = this.fetch(), a = r.text, o;
21823
+ if (a === "{" || a === "\\begingroup") {
21786
21824
  this.consume();
21787
- var c = o === "{" ? "}" : "\\endgroup";
21825
+ var s = a === "{" ? "}" : "\\endgroup";
21788
21826
  this.gullet.beginGroup();
21789
- var l = this.parseExpression(!1, c), u = this.fetch();
21790
- this.expect(c), this.gullet.endGroup(), s = {
21827
+ var c = this.parseExpression(!1, s), l = this.fetch();
21828
+ this.expect(s), this.gullet.endGroup(), o = {
21791
21829
  type: "ordgroup",
21792
21830
  mode: this.mode,
21793
- loc: SourceLocation.range(a, u),
21794
- body: l,
21795
- semisimple: o === "\\begingroup" || void 0
21831
+ loc: SourceLocation.range(r, l),
21832
+ body: c,
21833
+ semisimple: a === "\\begingroup" || void 0
21796
21834
  };
21797
- } else if (s = this.parseFunction(r, t) || this.parseSymbol(), s == null && o[0] === "\\" && !implicitCommands.hasOwnProperty(o)) {
21798
- if (this.settings.throwOnError) throw new ParseError("Undefined control sequence: " + o, a);
21799
- s = this.formatUnsupportedCmd(o), this.consume();
21835
+ } else if (o = this.parseFunction(n, t) || this.parseSymbol(), o == null && a[0] === "\\" && !implicitCommands.hasOwnProperty(a)) {
21836
+ if (this.settings.throwOnError) throw new ParseError("Undefined control sequence: " + a, r);
21837
+ o = this.formatUnsupportedCmd(a), this.consume();
21800
21838
  }
21801
- return s;
21802
- }
21803
- formLigatures(t) {
21804
- for (var n = t.length - 1, r = 0; r < n; ++r) {
21805
- var a = t[r], o = a.text;
21806
- o === "-" && t[r + 1].text === "-" && (r + 1 < n && t[r + 2].text === "-" ? (t.splice(r, 3, {
21807
- type: "textord",
21808
- mode: "text",
21809
- loc: SourceLocation.range(a, t[r + 2]),
21810
- text: "---"
21811
- }), n -= 2) : (t.splice(r, 2, {
21812
- type: "textord",
21813
- mode: "text",
21814
- loc: SourceLocation.range(a, t[r + 1]),
21815
- text: "--"
21816
- }), --n)), (o === "'" || o === "`") && t[r + 1].text === o && (t.splice(r, 2, {
21817
- type: "textord",
21818
- mode: "text",
21819
- loc: SourceLocation.range(a, t[r + 1]),
21820
- text: o + o
21821
- }), --n);
21839
+ return o;
21840
+ }
21841
+ formLigatures(e) {
21842
+ for (var t = e.length - 1, n = 0; n < t; ++n) {
21843
+ var r = e[n];
21844
+ if (r.type === "textord") {
21845
+ var a = r.text, o = e[n + 1];
21846
+ if (!(!o || o.type !== "textord")) {
21847
+ if (a === "-" && o.text === "-") {
21848
+ var s = e[n + 2];
21849
+ n + 1 < t && s && s.type === "textord" && s.text === "-" ? (e.splice(n, 3, {
21850
+ type: "textord",
21851
+ mode: "text",
21852
+ loc: SourceLocation.range(r, s),
21853
+ text: "---"
21854
+ }), t -= 2) : (e.splice(n, 2, {
21855
+ type: "textord",
21856
+ mode: "text",
21857
+ loc: SourceLocation.range(r, o),
21858
+ text: "--"
21859
+ }), --t);
21860
+ }
21861
+ (a === "'" || a === "`") && o.text === a && (e.splice(n, 2, {
21862
+ type: "textord",
21863
+ mode: "text",
21864
+ loc: SourceLocation.range(r, o),
21865
+ text: a + a
21866
+ }), --t);
21867
+ }
21868
+ }
21822
21869
  }
21823
21870
  }
21824
21871
  parseSymbol() {
21825
- var t = this.fetch(), r = t.text;
21826
- if (/^\\verb[^a-zA-Z]/.test(r)) {
21872
+ var t = this.fetch(), n = t.text;
21873
+ if (/^\\verb[^a-zA-Z]/.test(n)) {
21827
21874
  this.consume();
21828
- var a = r.slice(5), o = a.charAt(0) === "*";
21829
- if (o && (a = a.slice(1)), a.length < 2 || a.charAt(0) !== a.slice(-1)) throw new ParseError("\\verb assertion failed --\n please report what input caused this bug");
21830
- return a = a.slice(1, -1), {
21875
+ var r = n.slice(5), a = r.charAt(0) === "*";
21876
+ if (a && (r = r.slice(1)), r.length < 2 || r.charAt(0) !== r.slice(-1)) throw new ParseError("\\verb assertion failed --\n please report what input caused this bug");
21877
+ return r = r.slice(1, -1), {
21831
21878
  type: "verb",
21832
21879
  mode: "text",
21833
- body: a,
21834
- star: o
21880
+ body: r,
21881
+ star: a
21835
21882
  };
21836
21883
  }
21837
- unicodeSymbols.hasOwnProperty(r[0]) && !symbols[this.mode][r[0]] && (this.settings.strict && this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", "Accented Unicode text character \"" + r[0] + "\" used in math mode", t), r = unicodeSymbols[r[0]] + r.slice(1));
21838
- var s = combiningDiacriticalMarksEndRegex.exec(r);
21839
- s && (r = r.substring(0, s.index), r === "i" ? r = "ı" : r === "j" && (r = "ȷ"));
21840
- var c;
21841
- if (symbols[this.mode][r]) {
21842
- this.settings.strict && this.mode === "math" && extraLatin.includes(r) && this.settings.reportNonstrict("unicodeTextInMathMode", "Latin-1/Unicode text character \"" + r[0] + "\" used in math mode", t);
21843
- var l = symbols[this.mode][r].group, u = SourceLocation.range(t), d;
21844
- if (ATOMS.hasOwnProperty(l)) {
21845
- var f = l;
21846
- d = {
21884
+ unicodeSymbols.hasOwnProperty(n[0]) && !symbols[this.mode][n[0]] && (this.settings.strict && this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", "Accented Unicode text character \"" + n[0] + "\" used in math mode", t), n = unicodeSymbols[n[0]] + n.slice(1));
21885
+ var o = combiningDiacriticalMarksEndRegex.exec(n);
21886
+ o && (n = n.substring(0, o.index), n === "i" ? n = "ı" : n === "j" && (n = "ȷ"));
21887
+ var s;
21888
+ if (symbols[this.mode][n]) {
21889
+ this.settings.strict && this.mode === "math" && extraLatin.includes(n) && this.settings.reportNonstrict("unicodeTextInMathMode", "Latin-1/Unicode text character \"" + n[0] + "\" used in math mode", t);
21890
+ var c = symbols[this.mode][n].group, l = SourceLocation.range(t), u;
21891
+ if (ATOMS.hasOwnProperty(c)) {
21892
+ var d = c;
21893
+ u = {
21847
21894
  type: "atom",
21848
21895
  mode: this.mode,
21849
- family: f,
21850
- loc: u,
21851
- text: r
21896
+ family: d,
21897
+ loc: l,
21898
+ text: n
21852
21899
  };
21853
- } else d = {
21854
- type: l,
21900
+ } else u = {
21901
+ type: c,
21855
21902
  mode: this.mode,
21856
- loc: u,
21857
- text: r
21903
+ loc: l,
21904
+ text: n
21858
21905
  };
21859
- c = d;
21860
- } else if (r.charCodeAt(0) >= 128) this.settings.strict && (supportedCodepoint(r.charCodeAt(0)) ? this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", "Unicode text character \"" + r[0] + "\" used in math mode", t) : this.settings.reportNonstrict("unknownSymbol", "Unrecognized Unicode character \"" + r[0] + "\"" + (" (" + r.charCodeAt(0) + ")"), t)), c = {
21906
+ s = u;
21907
+ } else if (n.charCodeAt(0) >= 128) this.settings.strict && (supportedCodepoint(n.charCodeAt(0)) ? this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", "Unicode text character \"" + n[0] + "\" used in math mode", t) : this.settings.reportNonstrict("unknownSymbol", "Unrecognized Unicode character \"" + n[0] + "\"" + (" (" + n.charCodeAt(0) + ")"), t)), s = {
21861
21908
  type: "textord",
21862
21909
  mode: "text",
21863
21910
  loc: SourceLocation.range(t),
21864
- text: r
21911
+ text: n
21865
21912
  };
21866
21913
  else return null;
21867
- if (this.consume(), s) for (var p = 0; p < s[0].length; p++) {
21868
- var m = s[0][p];
21869
- if (!unicodeAccents[m]) throw new ParseError("Unknown accent ' " + m + "'", t);
21870
- var h = unicodeAccents[m][this.mode] || unicodeAccents[m].text;
21871
- if (!h) throw new ParseError("Accent " + m + " unsupported in " + this.mode + " mode", t);
21872
- c = {
21914
+ if (this.consume(), o) for (var f = 0; f < o[0].length; f++) {
21915
+ var p = o[0][f];
21916
+ if (!unicodeAccents[p]) throw new ParseError("Unknown accent ' " + p + "'", t);
21917
+ var m = unicodeAccents[p][this.mode] || unicodeAccents[p].text;
21918
+ if (!m) throw new ParseError("Accent " + p + " unsupported in " + this.mode + " mode", t);
21919
+ s = {
21873
21920
  type: "accent",
21874
21921
  mode: this.mode,
21875
21922
  loc: SourceLocation.range(t),
21876
- label: h,
21923
+ label: m,
21877
21924
  isStretchy: !1,
21878
21925
  isShifty: !0,
21879
- base: c
21926
+ base: s
21880
21927
  };
21881
21928
  }
21882
- return c;
21929
+ return s;
21883
21930
  }
21884
21931
  };
21885
21932
  Parser.endOfExpression = new Set([
@@ -21889,21 +21936,21 @@ Parser.endOfExpression = new Set([
21889
21936
  "\\right",
21890
21937
  "&"
21891
21938
  ]);
21892
- var parseTree = function(e, r) {
21893
- if (!(typeof e == "string" || e instanceof String)) throw TypeError("KaTeX can only parse string typed expression");
21894
- var a = new Parser(e, r);
21895
- delete a.gullet.macros.current["\\df@tag"];
21896
- var o = a.parse();
21897
- if (delete a.gullet.macros.current["\\current@color"], delete a.gullet.macros.current["\\color"], a.gullet.macros.get("\\df@tag")) {
21898
- if (!r.displayMode) throw new ParseError("\\tag works only in display equations");
21899
- o = [{
21939
+ var parseTree = function(t, n) {
21940
+ if (!(typeof t == "string" || t instanceof String)) throw TypeError("KaTeX can only parse string typed expression");
21941
+ var r = new Parser(t, n);
21942
+ delete r.gullet.macros.current["\\df@tag"];
21943
+ var a = r.parse();
21944
+ if (delete r.gullet.macros.current["\\current@color"], delete r.gullet.macros.current["\\color"], r.gullet.macros.get("\\df@tag")) {
21945
+ if (!n.displayMode) throw new ParseError("\\tag works only in display equations");
21946
+ a = [{
21900
21947
  type: "tag",
21901
21948
  mode: "text",
21902
- body: o,
21903
- tag: a.subparse([new Token("\\df@tag")])
21949
+ body: a,
21950
+ tag: r.subparse([new Token("\\df@tag")])
21904
21951
  }];
21905
21952
  }
21906
- return o;
21953
+ return a;
21907
21954
  }, render = function(e, t, n) {
21908
21955
  t.textContent = "";
21909
21956
  var r = renderToDomTree(e, n).toNode();
@@ -21916,10 +21963,10 @@ var renderToString = function(e, t) {
21916
21963
  return renderToDomTree(e, t).toMarkup();
21917
21964
  }, generateParseTree = function(e, t) {
21918
21965
  return parseTree(e, new Settings(t));
21919
- }, renderError = function(e, t, r) {
21920
- if (r.throwOnError || !(e instanceof ParseError)) throw e;
21921
- var a = makeSpan(["katex-error"], [new SymbolNode(t)]);
21922
- return a.setAttribute("title", e.toString()), a.setAttribute("style", "color:" + r.errorColor), a;
21966
+ }, renderError = function(t, n, r) {
21967
+ if (r.throwOnError || !(t instanceof ParseError)) throw t;
21968
+ var a = makeSpan(["katex-error"], [new SymbolNode(n)]);
21969
+ return a.setAttribute("title", t.toString()), a.setAttribute("style", "color:" + r.errorColor), a;
21923
21970
  }, renderToDomTree = function(e, t) {
21924
21971
  var n = new Settings(t);
21925
21972
  try {
@@ -21928,7 +21975,7 @@ var renderToString = function(e, t) {
21928
21975
  return renderError(t, e, n);
21929
21976
  }
21930
21977
  }, katex = {
21931
- version: "0.16.33",
21978
+ version: "0.16.45",
21932
21979
  render,
21933
21980
  renderToString,
21934
21981
  ParseError,