katex 0.16.9 → 0.16.10

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.
@@ -100,7 +100,7 @@ var __webpack_exports__ = {};
100
100
  // included in the build.
101
101
  // $FlowIgnore: we import the types directly anyways
102
102
 
103
- var stringMap = {
103
+ const stringMap = {
104
104
  "(": "left parenthesis",
105
105
  ")": "right parenthesis",
106
106
  "[": "open bracket",
@@ -173,22 +173,22 @@ var stringMap = {
173
173
  "\\hat": "hat",
174
174
  "\\acute": "acute"
175
175
  };
176
- var powerMap = {
176
+ const powerMap = {
177
177
  "prime": "prime",
178
178
  "degree": "degrees",
179
179
  "circle": "degrees",
180
180
  "2": "squared",
181
181
  "3": "cubed"
182
182
  };
183
- var openMap = {
183
+ const openMap = {
184
184
  "|": "open vertical bar",
185
185
  ".": ""
186
186
  };
187
- var closeMap = {
187
+ const closeMap = {
188
188
  "|": "close vertical bar",
189
189
  ".": ""
190
190
  };
191
- var binMap = {
191
+ const binMap = {
192
192
  "+": "plus",
193
193
  "-": "minus",
194
194
  "\\pm": "plus minus",
@@ -200,7 +200,7 @@ var binMap = {
200
200
  "\\circ": "circle",
201
201
  "\\bullet": "bullet"
202
202
  };
203
- var relMap = {
203
+ const relMap = {
204
204
  "=": "equals",
205
205
  "\\approx": "approximately equals",
206
206
  "≠": "does not equal",
@@ -216,7 +216,7 @@ var relMap = {
216
216
  "\\Rightarrow": "right arrow",
217
217
  ":": "colon"
218
218
  };
219
- var accentUnderMap = {
219
+ const accentUnderMap = {
220
220
  "\\underleftarrow": "left arrow",
221
221
  "\\underrightarrow": "right arrow",
222
222
  "\\underleftrightarrow": "left-right arrow",
@@ -225,12 +225,12 @@ var accentUnderMap = {
225
225
  "\\utilde": "tilde"
226
226
  };
227
227
 
228
- var buildString = function buildString(str, type, a11yStrings) {
228
+ const buildString = (str, type, a11yStrings) => {
229
229
  if (!str) {
230
230
  return;
231
231
  }
232
232
 
233
- var ret;
233
+ let ret;
234
234
 
235
235
  if (type === "open") {
236
236
  ret = str in openMap ? openMap[str] : stringMap[str] || str;
@@ -258,18 +258,18 @@ var buildString = function buildString(str, type, a11yStrings) {
258
258
  }
259
259
  };
260
260
 
261
- var buildRegion = function buildRegion(a11yStrings, callback) {
262
- var regionStrings = [];
261
+ const buildRegion = (a11yStrings, callback) => {
262
+ const regionStrings = [];
263
263
  a11yStrings.push(regionStrings);
264
264
  callback(regionStrings);
265
265
  };
266
266
 
267
- var handleObject = function handleObject(tree, a11yStrings, atomType) {
267
+ const handleObject = (tree, a11yStrings, atomType) => {
268
268
  // Everything else is assumed to be an object...
269
269
  switch (tree.type) {
270
270
  case "accent":
271
271
  {
272
- buildRegion(a11yStrings, function (a11yStrings) {
272
+ buildRegion(a11yStrings, a11yStrings => {
273
273
  buildA11yStrings(tree.base, a11yStrings, atomType);
274
274
  a11yStrings.push("with");
275
275
  buildString(tree.label, "normal", a11yStrings);
@@ -280,7 +280,7 @@ var handleObject = function handleObject(tree, a11yStrings, atomType) {
280
280
 
281
281
  case "accentUnder":
282
282
  {
283
- buildRegion(a11yStrings, function (a11yStrings) {
283
+ buildRegion(a11yStrings, a11yStrings => {
284
284
  buildA11yStrings(tree.base, a11yStrings, atomType);
285
285
  a11yStrings.push("with");
286
286
  buildString(accentUnderMap[tree.label], "normal", a11yStrings);
@@ -297,7 +297,9 @@ var handleObject = function handleObject(tree, a11yStrings, atomType) {
297
297
 
298
298
  case "atom":
299
299
  {
300
- var text = tree.text;
300
+ const {
301
+ text
302
+ } = tree;
301
303
 
302
304
  switch (tree.family) {
303
305
  case "bin":
@@ -349,8 +351,8 @@ var handleObject = function handleObject(tree, a11yStrings, atomType) {
349
351
 
350
352
  case "color":
351
353
  {
352
- var color = tree.color.replace(/katex-/, "");
353
- buildRegion(a11yStrings, function (regionStrings) {
354
+ const color = tree.color.replace(/katex-/, "");
355
+ buildRegion(a11yStrings, regionStrings => {
354
356
  regionStrings.push("start color " + color);
355
357
  buildA11yStrings(tree.body, regionStrings, atomType);
356
358
  regionStrings.push("end color " + color);
@@ -376,10 +378,12 @@ var handleObject = function handleObject(tree, a11yStrings, atomType) {
376
378
 
377
379
  case "genfrac":
378
380
  {
379
- buildRegion(a11yStrings, function (regionStrings) {
381
+ buildRegion(a11yStrings, regionStrings => {
380
382
  // genfrac can have unbalanced delimiters
381
- var leftDelim = tree.leftDelim,
382
- rightDelim = tree.rightDelim; // NOTE: Not sure if this is a safe assumption
383
+ const {
384
+ leftDelim,
385
+ rightDelim
386
+ } = tree; // NOTE: Not sure if this is a safe assumption
383
387
  // hasBarLine true -> fraction, false -> binomial
384
388
 
385
389
  if (tree.hasBarLine) {
@@ -418,7 +422,7 @@ var handleObject = function handleObject(tree, a11yStrings, atomType) {
418
422
 
419
423
  case "leftright":
420
424
  {
421
- buildRegion(a11yStrings, function (regionStrings) {
425
+ buildRegion(a11yStrings, regionStrings => {
422
426
  buildString(tree.left, "open", regionStrings);
423
427
  buildA11yStrings(tree.body, regionStrings, atomType);
424
428
  buildString(tree.right, "close", regionStrings);
@@ -446,8 +450,10 @@ var handleObject = function handleObject(tree, a11yStrings, atomType) {
446
450
 
447
451
  case "op":
448
452
  {
449
- var body = tree.body,
450
- name = tree.name;
453
+ const {
454
+ body,
455
+ name
456
+ } = tree;
451
457
 
452
458
  if (body) {
453
459
  buildA11yStrings(body, a11yStrings, atomType);
@@ -526,12 +532,14 @@ var handleObject = function handleObject(tree, a11yStrings, atomType) {
526
532
 
527
533
  case "sqrt":
528
534
  {
529
- buildRegion(a11yStrings, function (regionStrings) {
530
- var body = tree.body,
531
- index = tree.index;
535
+ buildRegion(a11yStrings, regionStrings => {
536
+ const {
537
+ body,
538
+ index
539
+ } = tree;
532
540
 
533
541
  if (index) {
534
- var indexString = flatten(buildA11yStrings(index, [], atomType)).join(",");
542
+ const indexString = flatten(buildA11yStrings(index, [], atomType)).join(",");
535
543
 
536
544
  if (indexString === "3") {
537
545
  regionStrings.push("cube root of");
@@ -556,10 +564,12 @@ var handleObject = function handleObject(tree, a11yStrings, atomType) {
556
564
 
557
565
  case "supsub":
558
566
  {
559
- var base = tree.base,
560
- sub = tree.sub,
561
- sup = tree.sup;
562
- var isLog = false;
567
+ const {
568
+ base,
569
+ sub,
570
+ sup
571
+ } = tree;
572
+ let isLog = false;
563
573
 
564
574
  if (base) {
565
575
  buildA11yStrings(base, a11yStrings, atomType);
@@ -567,7 +577,7 @@ var handleObject = function handleObject(tree, a11yStrings, atomType) {
567
577
  }
568
578
 
569
579
  if (sub) {
570
- var regionName = isLog ? "base" : "subscript";
580
+ const regionName = isLog ? "base" : "subscript";
571
581
  buildRegion(a11yStrings, function (regionStrings) {
572
582
  regionStrings.push("start " + regionName);
573
583
  buildA11yStrings(sub, regionStrings, atomType);
@@ -577,7 +587,7 @@ var handleObject = function handleObject(tree, a11yStrings, atomType) {
577
587
 
578
588
  if (sup) {
579
589
  buildRegion(a11yStrings, function (regionStrings) {
580
- var supString = flatten(buildA11yStrings(sup, [], atomType)).join(",");
590
+ const supString = flatten(buildA11yStrings(sup, [], atomType)).join(",");
581
591
 
582
592
  if (supString in powerMap) {
583
593
  regionStrings.push(powerMap[supString]);
@@ -792,10 +802,9 @@ var handleObject = function handleObject(tree, a11yStrings, atomType) {
792
802
  {
793
803
  // \neq and \ne are macros so we let "htmlmathml" render the mathmal
794
804
  // side of things and extract the text from that.
795
- var _atomType = tree.mclass.slice(1); // $FlowFixMe: drop the leading "m" from the values in mclass
805
+ const atomType = tree.mclass.slice(1); // $FlowFixMe: drop the leading "m" from the values in mclass
796
806
 
797
-
798
- buildA11yStrings(tree.body, a11yStrings, _atomType);
807
+ buildA11yStrings(tree.body, a11yStrings, atomType);
799
808
  break;
800
809
  }
801
810
 
@@ -837,13 +846,13 @@ var handleObject = function handleObject(tree, a11yStrings, atomType) {
837
846
  }
838
847
  };
839
848
 
840
- var buildA11yStrings = function buildA11yStrings(tree, a11yStrings, atomType) {
849
+ const buildA11yStrings = function (tree, a11yStrings, atomType) {
841
850
  if (a11yStrings === void 0) {
842
851
  a11yStrings = [];
843
852
  }
844
853
 
845
854
  if (tree instanceof Array) {
846
- for (var i = 0; i < tree.length; i++) {
855
+ for (let i = 0; i < tree.length; i++) {
847
856
  buildA11yStrings(tree[i], a11yStrings, atomType);
848
857
  }
849
858
  } else {
@@ -853,8 +862,8 @@ var buildA11yStrings = function buildA11yStrings(tree, a11yStrings, atomType) {
853
862
  return a11yStrings;
854
863
  };
855
864
 
856
- var flatten = function flatten(array) {
857
- var result = [];
865
+ const flatten = function (array) {
866
+ let result = [];
858
867
  array.forEach(function (item) {
859
868
  if (item instanceof Array) {
860
869
  result = result.concat(flatten(item));
@@ -865,10 +874,10 @@ var flatten = function flatten(array) {
865
874
  return result;
866
875
  };
867
876
 
868
- var renderA11yString = function renderA11yString(text, settings) {
869
- var tree = katex__WEBPACK_IMPORTED_MODULE_0___default().__parse(text, settings);
877
+ const renderA11yString = function (text, settings) {
878
+ const tree = katex__WEBPACK_IMPORTED_MODULE_0___default().__parse(text, settings);
870
879
 
871
- var a11yStrings = buildA11yStrings(tree, [], "normal");
880
+ const a11yStrings = buildA11yStrings(tree, [], "normal");
872
881
  return flatten(a11yStrings).join(", ");
873
882
  };
874
883
 
@@ -1 +1 @@
1
- !function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("katex"));else if("function"==typeof define&&define.amd)define(["katex"],r);else{var a="object"==typeof exports?r(require("katex")):r(e.katex);for(var t in a)("object"==typeof exports?exports:e)[t]=a[t]}}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var r={771:function(r){r.exports=e}},a={};function t(e){var o=a[e];if(void 0!==o)return o.exports;var n=a[e]={exports:{}};return r[e](n,n.exports,t),n.exports}t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,{a:r}),r},t.d=function(e,r){for(var a in r)t.o(r,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:r[a]})},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)};var o,n,s,i,l,c,u,p,d,h,b,m,f,w,g={};return o=t(771),n=t.n(o),s={"(":"left parenthesis",")":"right parenthesis","[":"open bracket","]":"close bracket","\\{":"left brace","\\}":"right brace","\\lvert":"open vertical bar","\\rvert":"close vertical bar","|":"vertical bar","\\uparrow":"up arrow","\\Uparrow":"up arrow","\\downarrow":"down arrow","\\Downarrow":"down arrow","\\updownarrow":"up down arrow","\\leftarrow":"left arrow","\\Leftarrow":"left arrow","\\rightarrow":"right arrow","\\Rightarrow":"right arrow","\\langle":"open angle","\\rangle":"close angle","\\lfloor":"open floor","\\rfloor":"close floor","\\int":"integral","\\intop":"integral","\\lim":"limit","\\ln":"natural log","\\log":"log","\\sin":"sine","\\cos":"cosine","\\tan":"tangent","\\cot":"cotangent","\\sum":"sum","/":"slash",",":"comma",".":"point","-":"negative","+":"plus","~":"tilde",":":"colon","?":"question mark","'":"apostrophe","\\%":"percent"," ":"space","\\ ":"space","\\$":"dollar sign","\\angle":"angle","\\degree":"degree","\\circ":"circle","\\vec":"vector","\\triangle":"triangle","\\pi":"pi","\\prime":"prime","\\infty":"infinity","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\omega":"omega","\\theta":"theta","\\sigma":"sigma","\\lambda":"lambda","\\tau":"tau","\\Delta":"delta","\\delta":"delta","\\mu":"mu","\\rho":"rho","\\nabla":"del","\\ell":"ell","\\ldots":"dots","\\hat":"hat","\\acute":"acute"},i={prime:"prime",degree:"degrees",circle:"degrees",2:"squared",3:"cubed"},l={"|":"open vertical bar",".":""},c={"|":"close vertical bar",".":""},u={"+":"plus","-":"minus","\\pm":"plus minus","\\cdot":"dot","*":"times","/":"divided by","\\times":"times","\\div":"divided by","\\circ":"circle","\\bullet":"bullet"},p={"=":"equals","\\approx":"approximately equals","\u2260":"does not equal","\\geq":"is greater than or equal to","\\ge":"is greater than or equal to","\\leq":"is less than or equal to","\\le":"is less than or equal to",">":"is greater than","<":"is less than","\\leftarrow":"left arrow","\\Leftarrow":"left arrow","\\rightarrow":"right arrow","\\Rightarrow":"right arrow",":":"colon"},d={"\\underleftarrow":"left arrow","\\underrightarrow":"right arrow","\\underleftrightarrow":"left-right arrow","\\undergroup":"group","\\underlinesegment":"line segment","\\utilde":"tilde"},h=function(e,r,a){var t;e&&(/^\d+$/.test(t="open"===r?e in l?l[e]:s[e]||e:"close"===r?e in c?c[e]:s[e]||e:"bin"===r?u[e]||e:"rel"===r?p[e]||e:s[e]||e)&&a.length>0&&/^\d+$/.test(a[a.length-1])?a[a.length-1]+=t:t&&a.push(t))},b=function(e,r){var a=[];e.push(a),r(a)},m=function(e,r,a){switch(e.type){case"accent":b(r,(function(r){f(e.base,r,a),r.push("with"),h(e.label,"normal",r),r.push("on top")}));break;case"accentUnder":b(r,(function(r){f(e.base,r,a),r.push("with"),h(d[e.label],"normal",r),r.push("underneath")}));break;case"accent-token":case"color-token":case"kern":case"leftright-right":case"size":case"infix":case"internal":break;case"atom":var t=e.text;switch(e.family){case"bin":h(t,"bin",r);break;case"close":h(t,"close",r);break;case"inner":h(e.text,"inner",r);break;case"open":h(t,"open",r);break;case"punct":h(t,"punct",r);break;case"rel":h(t,"rel",r);break;default:throw e.family,new Error('"'+e.family+'" is not a valid atom type')}break;case"color":var o=e.color.replace(/katex-/,"");b(r,(function(r){r.push("start color "+o),f(e.body,r,a),r.push("end color "+o)}));break;case"delimsizing":e.delim&&"."!==e.delim&&h(e.delim,"normal",r);break;case"genfrac":b(r,(function(r){var t=e.leftDelim,o=e.rightDelim;e.hasBarLine?(r.push("start fraction"),t&&h(t,"open",r),f(e.numer,r,a),r.push("divided by"),f(e.denom,r,a),o&&h(o,"close",r),r.push("end fraction")):(r.push("start binomial"),t&&h(t,"open",r),f(e.numer,r,a),r.push("over"),f(e.denom,r,a),o&&h(o,"close",r),r.push("end binomial"))}));break;case"hbox":case"lap":case"ordgroup":case"raisebox":case"sizing":case"styling":case"smash":case"vcenter":case"operatorname":case"font":case"html":f(e.body,r,a);break;case"leftright":b(r,(function(r){h(e.left,"open",r),f(e.body,r,a),h(e.right,"close",r)}));break;case"mathord":h(e.text,"normal",r);break;case"op":var n=e.body,s=e.name;n?f(n,r,a):s&&h(s,"normal",r);break;case"op-token":case"textord":h(e.text,a,r);break;case"overline":b(r,(function(r){r.push("start overline"),f(e.body,r,a),r.push("end overline")}));break;case"pmb":r.push("bold");break;case"phantom":r.push("empty space");break;case"rule":r.push("rectangle");break;case"spacing":r.push("space");break;case"sqrt":b(r,(function(r){var t=e.body,o=e.index;if(o)return"3"===w(f(o,[],a)).join(",")?(r.push("cube root of"),f(t,r,a),void r.push("end cube root")):(r.push("root"),r.push("start index"),f(o,r,a),void r.push("end index"));r.push("square root of"),f(t,r,a),r.push("end square root")}));break;case"supsub":var l=e.base,c=e.sub,u=e.sup,p=!1;if(l&&(f(l,r,a),p="op"===l.type&&"\\log"===l.name),c){var m=p?"base":"subscript";b(r,(function(e){e.push("start "+m),f(c,e,a),e.push("end "+m)}))}u&&b(r,(function(e){var r=w(f(u,[],a)).join(",");r in i?e.push(i[r]):(e.push("start superscript"),f(u,e,a),e.push("end superscript"))}));break;case"text":if("\\textbf"===e.font){b(r,(function(r){r.push("start bold text"),f(e.body,r,a),r.push("end bold text")}));break}b(r,(function(r){r.push("start text"),f(e.body,r,a),r.push("end text")}));break;case"enclose":if(/cancel/.test(e.label)){b(r,(function(r){r.push("start cancel"),f(e.body,r,a),r.push("end cancel")}));break}if(/box/.test(e.label)){b(r,(function(r){r.push("start box"),f(e.body,r,a),r.push("end box")}));break}if(/sout/.test(e.label)){b(r,(function(r){r.push("start strikeout"),f(e.body,r,a),r.push("end strikeout")}));break}if(/phase/.test(e.label)){b(r,(function(r){r.push("start phase angle"),f(e.body,r,a),r.push("end phase angle")}));break}throw new Error("KaTeX-a11y: enclose node with "+e.label+" not supported yet");case"vphantom":throw new Error("KaTeX-a11y: vphantom not implemented yet");case"hphantom":throw new Error("KaTeX-a11y: hphantom not implemented yet");case"array":throw new Error("KaTeX-a11y: array not implemented yet");case"raw":throw new Error("KaTeX-a11y: raw not implemented yet");case"url":throw new Error("KaTeX-a11y: url not implemented yet");case"tag":throw new Error("KaTeX-a11y: tag not implemented yet");case"verb":h("start verbatim","normal",r),h(e.body,"normal",r),h("end verbatim","normal",r);break;case"environment":throw new Error("KaTeX-a11y: environment not implemented yet");case"horizBrace":h("start "+e.label.slice(1),"normal",r),f(e.base,r,a),h("end "+e.label.slice(1),"normal",r);break;case"includegraphics":throw new Error("KaTeX-a11y: includegraphics not implemented yet");case"href":throw new Error("KaTeX-a11y: href not implemented yet");case"cr":throw new Error("KaTeX-a11y: cr not implemented yet");case"underline":b(r,(function(r){r.push("start underline"),f(e.body,r,a),r.push("end underline")}));break;case"xArrow":throw new Error("KaTeX-a11y: xArrow not implemented yet");case"cdlabel":throw new Error("KaTeX-a11y: cdlabel not implemented yet");case"cdlabelparent":throw new Error("KaTeX-a11y: cdlabelparent not implemented yet");case"mclass":var g=e.mclass.slice(1);f(e.body,r,g);break;case"mathchoice":f(e.text,r,a);break;case"htmlmathml":f(e.mathml,r,a);break;case"middle":h(e.delim,a,r);break;default:throw e.type,new Error("KaTeX a11y un-recognized type: "+e.type)}},f=function e(r,a,t){if(void 0===a&&(a=[]),r instanceof Array)for(var o=0;o<r.length;o++)e(r[o],a,t);else m(r,a,t);return a},w=function e(r){var a=[];return r.forEach((function(r){r instanceof Array?a=a.concat(e(r)):a.push(r)})),a},g.default=function(e,r){var a=n().__parse(e,r),t=f(a,[],"normal");return w(t).join(", ")},g=g.default}()}));
1
+ !function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("katex"));else if("function"==typeof define&&define.amd)define(["katex"],r);else{var t="object"==typeof exports?r(require("katex")):r(e.katex);for(var a in t)("object"==typeof exports?exports:e)[a]=t[a]}}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var r={771:function(r){r.exports=e}},t={};function a(e){var o=t[e];if(void 0!==o)return o.exports;var n=t[e]={exports:{}};return r[e](n,n.exports,a),n.exports}a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,{a:r}),r},a.d=function(e,r){for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)};var o={};return function(){var e=a(771),r=a.n(e);const t={"(":"left parenthesis",")":"right parenthesis","[":"open bracket","]":"close bracket","\\{":"left brace","\\}":"right brace","\\lvert":"open vertical bar","\\rvert":"close vertical bar","|":"vertical bar","\\uparrow":"up arrow","\\Uparrow":"up arrow","\\downarrow":"down arrow","\\Downarrow":"down arrow","\\updownarrow":"up down arrow","\\leftarrow":"left arrow","\\Leftarrow":"left arrow","\\rightarrow":"right arrow","\\Rightarrow":"right arrow","\\langle":"open angle","\\rangle":"close angle","\\lfloor":"open floor","\\rfloor":"close floor","\\int":"integral","\\intop":"integral","\\lim":"limit","\\ln":"natural log","\\log":"log","\\sin":"sine","\\cos":"cosine","\\tan":"tangent","\\cot":"cotangent","\\sum":"sum","/":"slash",",":"comma",".":"point","-":"negative","+":"plus","~":"tilde",":":"colon","?":"question mark","'":"apostrophe","\\%":"percent"," ":"space","\\ ":"space","\\$":"dollar sign","\\angle":"angle","\\degree":"degree","\\circ":"circle","\\vec":"vector","\\triangle":"triangle","\\pi":"pi","\\prime":"prime","\\infty":"infinity","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\omega":"omega","\\theta":"theta","\\sigma":"sigma","\\lambda":"lambda","\\tau":"tau","\\Delta":"delta","\\delta":"delta","\\mu":"mu","\\rho":"rho","\\nabla":"del","\\ell":"ell","\\ldots":"dots","\\hat":"hat","\\acute":"acute"},n={prime:"prime",degree:"degrees",circle:"degrees",2:"squared",3:"cubed"},s={"|":"open vertical bar",".":""},l={"|":"close vertical bar",".":""},i={"+":"plus","-":"minus","\\pm":"plus minus","\\cdot":"dot","*":"times","/":"divided by","\\times":"times","\\div":"divided by","\\circ":"circle","\\bullet":"bullet"},c={"=":"equals","\\approx":"approximately equals","\u2260":"does not equal","\\geq":"is greater than or equal to","\\ge":"is greater than or equal to","\\leq":"is less than or equal to","\\le":"is less than or equal to",">":"is greater than","<":"is less than","\\leftarrow":"left arrow","\\Leftarrow":"left arrow","\\rightarrow":"right arrow","\\Rightarrow":"right arrow",":":"colon"},u={"\\underleftarrow":"left arrow","\\underrightarrow":"right arrow","\\underleftrightarrow":"left-right arrow","\\undergroup":"group","\\underlinesegment":"line segment","\\utilde":"tilde"},p=(e,r,a)=>{if(!e)return;let o;o="open"===r?e in s?s[e]:t[e]||e:"close"===r?e in l?l[e]:t[e]||e:"bin"===r?i[e]||e:"rel"===r?c[e]||e:t[e]||e,/^\d+$/.test(o)&&a.length>0&&/^\d+$/.test(a[a.length-1])?a[a.length-1]+=o:o&&a.push(o)},d=(e,r)=>{const t=[];e.push(t),r(t)},h=function(e,r,t){if(void 0===r&&(r=[]),e instanceof Array)for(let a=0;a<e.length;a++)h(e[a],r,t);else((e,r,t)=>{switch(e.type){case"accent":d(r,(r=>{h(e.base,r,t),r.push("with"),p(e.label,"normal",r),r.push("on top")}));break;case"accentUnder":d(r,(r=>{h(e.base,r,t),r.push("with"),p(u[e.label],"normal",r),r.push("underneath")}));break;case"accent-token":case"color-token":case"kern":case"leftright-right":case"size":case"infix":case"internal":break;case"atom":{const{text:t}=e;switch(e.family){case"bin":p(t,"bin",r);break;case"close":p(t,"close",r);break;case"inner":p(e.text,"inner",r);break;case"open":p(t,"open",r);break;case"punct":p(t,"punct",r);break;case"rel":p(t,"rel",r);break;default:throw e.family,new Error('"'+e.family+'" is not a valid atom type')}break}case"color":{const a=e.color.replace(/katex-/,"");d(r,(r=>{r.push("start color "+a),h(e.body,r,t),r.push("end color "+a)}));break}case"delimsizing":e.delim&&"."!==e.delim&&p(e.delim,"normal",r);break;case"genfrac":d(r,(r=>{const{leftDelim:a,rightDelim:o}=e;e.hasBarLine?(r.push("start fraction"),a&&p(a,"open",r),h(e.numer,r,t),r.push("divided by"),h(e.denom,r,t),o&&p(o,"close",r),r.push("end fraction")):(r.push("start binomial"),a&&p(a,"open",r),h(e.numer,r,t),r.push("over"),h(e.denom,r,t),o&&p(o,"close",r),r.push("end binomial"))}));break;case"hbox":case"lap":case"ordgroup":case"raisebox":case"sizing":case"styling":case"smash":case"vcenter":case"operatorname":case"font":case"html":h(e.body,r,t);break;case"leftright":d(r,(r=>{p(e.left,"open",r),h(e.body,r,t),p(e.right,"close",r)}));break;case"mathord":p(e.text,"normal",r);break;case"op":{const{body:a,name:o}=e;a?h(a,r,t):o&&p(o,"normal",r);break}case"op-token":case"textord":p(e.text,t,r);break;case"overline":d(r,(function(r){r.push("start overline"),h(e.body,r,t),r.push("end overline")}));break;case"pmb":r.push("bold");break;case"phantom":r.push("empty space");break;case"rule":r.push("rectangle");break;case"spacing":r.push("space");break;case"sqrt":d(r,(r=>{const{body:a,index:o}=e;if(o)return"3"===b(h(o,[],t)).join(",")?(r.push("cube root of"),h(a,r,t),void r.push("end cube root")):(r.push("root"),r.push("start index"),h(o,r,t),void r.push("end index"));r.push("square root of"),h(a,r,t),r.push("end square root")}));break;case"supsub":{const{base:a,sub:o,sup:s}=e;let l=!1;if(a&&(h(a,r,t),l="op"===a.type&&"\\log"===a.name),o){const e=l?"base":"subscript";d(r,(function(r){r.push("start "+e),h(o,r,t),r.push("end "+e)}))}s&&d(r,(function(e){const r=b(h(s,[],t)).join(",");r in n?e.push(n[r]):(e.push("start superscript"),h(s,e,t),e.push("end superscript"))}));break}case"text":if("\\textbf"===e.font){d(r,(function(r){r.push("start bold text"),h(e.body,r,t),r.push("end bold text")}));break}d(r,(function(r){r.push("start text"),h(e.body,r,t),r.push("end text")}));break;case"enclose":if(/cancel/.test(e.label)){d(r,(function(r){r.push("start cancel"),h(e.body,r,t),r.push("end cancel")}));break}if(/box/.test(e.label)){d(r,(function(r){r.push("start box"),h(e.body,r,t),r.push("end box")}));break}if(/sout/.test(e.label)){d(r,(function(r){r.push("start strikeout"),h(e.body,r,t),r.push("end strikeout")}));break}if(/phase/.test(e.label)){d(r,(function(r){r.push("start phase angle"),h(e.body,r,t),r.push("end phase angle")}));break}throw new Error("KaTeX-a11y: enclose node with "+e.label+" not supported yet");case"vphantom":throw new Error("KaTeX-a11y: vphantom not implemented yet");case"hphantom":throw new Error("KaTeX-a11y: hphantom not implemented yet");case"array":throw new Error("KaTeX-a11y: array not implemented yet");case"raw":throw new Error("KaTeX-a11y: raw not implemented yet");case"url":throw new Error("KaTeX-a11y: url not implemented yet");case"tag":throw new Error("KaTeX-a11y: tag not implemented yet");case"verb":p("start verbatim","normal",r),p(e.body,"normal",r),p("end verbatim","normal",r);break;case"environment":throw new Error("KaTeX-a11y: environment not implemented yet");case"horizBrace":p("start "+e.label.slice(1),"normal",r),h(e.base,r,t),p("end "+e.label.slice(1),"normal",r);break;case"includegraphics":throw new Error("KaTeX-a11y: includegraphics not implemented yet");case"href":throw new Error("KaTeX-a11y: href not implemented yet");case"cr":throw new Error("KaTeX-a11y: cr not implemented yet");case"underline":d(r,(function(r){r.push("start underline"),h(e.body,r,t),r.push("end underline")}));break;case"xArrow":throw new Error("KaTeX-a11y: xArrow not implemented yet");case"cdlabel":throw new Error("KaTeX-a11y: cdlabel not implemented yet");case"cdlabelparent":throw new Error("KaTeX-a11y: cdlabelparent not implemented yet");case"mclass":{const t=e.mclass.slice(1);h(e.body,r,t);break}case"mathchoice":h(e.text,r,t);break;case"htmlmathml":h(e.mathml,r,t);break;case"middle":p(e.delim,t,r);break;default:throw e.type,new Error("KaTeX a11y un-recognized type: "+e.type)}})(e,r,t);return r},b=function(e){let r=[];return e.forEach((function(e){e instanceof Array?r=r.concat(b(e)):r.push(e)})),r};o.default=function(e,t){const a=r().__parse(e,t),o=h(a,[],"normal");return b(o).join(", ")}}(),o=o.default}()}));
package/dist/katex.css CHANGED
@@ -132,7 +132,7 @@
132
132
  border-color: currentColor;
133
133
  }
134
134
  .katex .katex-version::after {
135
- content: "0.16.9";
135
+ content: "0.16.10";
136
136
  }
137
137
  .katex .katex-mathml {
138
138
  /* Accessibility hack to only show to screen readers