Files
ALC27/mathjax/tex-mml-chtml.js
2025-12-22 12:20:15 +08:00

1 line
939 KiB
JavaScript

(()=>{var __webpack_modules__={74:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{f:()=>SystemExternal});var _variables_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(714),_lib_external_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(268);const windowSupported=!("undefined"==typeof window),documentSupported=windowSupported&&!(void 0===window.document),webworker=!("undefined"==typeof DedicatedWorkerGlobalScope),nodeRequire=()=>{try{return eval("require")}catch(t){return t=>null}},SystemExternal={extRequire:t=>"undefined"!=typeof process&&"undefined"!=typeof require?nodeRequire()(t):null,windowSupported,documentSupported,webworker,xmldom:_lib_external_js__WEBPACK_IMPORTED_MODULE_1__.Gb,document:_lib_external_js__WEBPACK_IMPORTED_MODULE_1__.Al,fs:documentSupported||webworker?null:nodeRequire()("fs"),url:_variables_js__WEBPACK_IMPORTED_MODULE_0__.u.url,jsonPath:function(){if(documentSupported||webworker)return _variables_js__WEBPACK_IMPORTED_MODULE_0__.u.url;if(process.env.SRE_JSON_PATH||global.SRE_JSON_PATH)return process.env.SRE_JSON_PATH||global.SRE_JSON_PATH;try{return nodeRequire().resolve("speech-rule-engine").replace(/sre\.js$/,"")+"mathmaps"}catch(t){}try{return nodeRequire().resolve(".").replace(/sre\.js$/,"")+"mathmaps"}catch(t){}return"undefined"!=typeof __dirname?__dirname+(__dirname.match(/lib?$/)?"/mathmaps":"/lib/mathmaps"):process.cwd()+"/lib/mathmaps"}(),xpath:_lib_external_js__WEBPACK_IMPORTED_MODULE_1__.Oe}},159:(t,e,s)=>{"use strict";var i=s(870).freeze;e.XML_ENTITIES=i({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=i({Aacute:"\xc1",aacute:"\xe1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223e",acd:"\u223f",acE:"\u223e\u0333",Acirc:"\xc2",acirc:"\xe2",acute:"\xb4",Acy:"\u0410",acy:"\u0430",AElig:"\xc6",aelig:"\xe6",af:"\u2061",Afr:"\u{1d504}",afr:"\u{1d51e}",Agrave:"\xc0",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03b1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2a3f",AMP:"&",amp:"&",And:"\u2a53",and:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1d538}",aopf:"\u{1d552}",ap:"\u2248",apacir:"\u2a6f",apE:"\u2a70",ape:"\u224a",apid:"\u224b",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224a",Aring:"\xc5",aring:"\xe5",Ascr:"\u{1d49c}",ascr:"\u{1d4b6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224d",Atilde:"\xc3",atilde:"\xe3",Auml:"\xc4",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",Backslash:"\u2216",Barv:"\u2ae7",barvee:"\u22bd",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",Bernoullis:"\u212c",Beta:"\u0392",beta:"\u03b2",beth:"\u2136",between:"\u226c",Bfr:"\u{1d505}",bfr:"\u{1d51f}",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bNot:"\u2aed",bnot:"\u2310",Bopf:"\u{1d539}",bopf:"\u{1d553}",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxbox:"\u29c9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250c",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252c",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxUL:"\u255d",boxUl:"\u255c",boxuL:"\u255b",boxul:"\u2518",boxUR:"\u255a",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256c",boxVh:"\u256b",boxvH:"\u256a",boxvh:"\u253c",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255f",boxvR:"\u255e",boxvr:"\u251c",bprime:"\u2035",Breve:"\u02d8",breve:"\u02d8",brvbar:"\xa6",Bscr:"\u212c",bscr:"\u{1d4b7}",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",Bumpeq:"\u224e",bumpeq:"\u224f",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22d2",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",CapitalDifferentialD:"\u2145",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",Cayleys:"\u212d",ccaps:"\u2a4d",Ccaron:"\u010c",ccaron:"\u010d",Ccedil:"\xc7",ccedil:"\xe7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2a4c",ccupssm:"\u2a50",Cdot:"\u010a",cdot:"\u010b",cedil:"\xb8",Cedilla:"\xb8",cemptyv:"\u29b2",cent:"\xa2",CenterDot:"\xb7",centerdot:"\xb7",Cfr:"\u212d",cfr:"\u{1d520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03a7",chi:"\u03c7",cir:"\u25cb",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",CircleDot:"\u2299",circledR:"\xae",circledS:"\u24c8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29c3",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2a74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",Congruent:"\u2261",Conint:"\u222f",conint:"\u222e",ContourIntegral:"\u222e",Copf:"\u2102",copf:"\u{1d554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xa9",copy:"\xa9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21b5",Cross:"\u2a2f",cross:"\u2717",Cscr:"\u{1d49e}",cscr:"\u{1d4b8}",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",Cup:"\u22d3",cup:"\u222a",cupbrcap:"\u2a48",CupCap:"\u224d",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21a1",dArr:"\u21d3",darr:"\u2193",dash:"\u2010",Dashv:"\u2ae4",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",Dcaron:"\u010e",dcaron:"\u010f",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21ca",DDotrahd:"\u2911",ddotseq:"\u2a77",deg:"\xb0",Del:"\u2207",Delta:"\u0394",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",Dfr:"\u{1d507}",dfr:"\u{1d521}",dHar:"\u2965",dharl:"\u21c3",dharr:"\u21c2",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",diam:"\u22c4",Diamond:"\u22c4",diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",DifferentialD:"\u2146",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",Dopf:"\u{1d53b}",dopf:"\u{1d555}",Dot:"\xa8",dot:"\u02d9",DotDot:"\u20dc",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21d3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",DownTeeArrow:"\u21a7",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",Dscr:"\u{1d49f}",dscr:"\u{1d4b9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29f6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",DZcy:"\u040f",dzcy:"\u045f",dzigrarr:"\u27ff",Eacute:"\xc9",eacute:"\xe9",easter:"\u2a6e",Ecaron:"\u011a",ecaron:"\u011b",ecir:"\u2256",Ecirc:"\xca",ecirc:"\xea",ecolon:"\u2255",Ecy:"\u042d",ecy:"\u044d",eDDot:"\u2a77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1d508}",efr:"\u{1d522}",eg:"\u2a9a",Egrave:"\xc8",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",Element:"\u2208",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25fb",emptyv:"\u2205",EmptyVerySmallSquare:"\u25ab",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014a",eng:"\u014b",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1d53c}",eopf:"\u{1d556}",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",Epsilon:"\u0395",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",Equal:"\u2a75",equals:"=",EqualTilde:"\u2242",equest:"\u225f",Equilibrium:"\u21cc",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212f",esdot:"\u2250",Esim:"\u2a73",esim:"\u2242",Eta:"\u0397",eta:"\u03b7",ETH:"\xd0",eth:"\xf0",Euml:"\xcb",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",Ffr:"\u{1d509}",ffr:"\u{1d523}",filig:"\ufb01",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",Fopf:"\u{1d53d}",fopf:"\u{1d557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22d4",forkv:"\u2ad9",Fouriertrf:"\u2131",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1d4bb}",gacute:"\u01f5",Gamma:"\u0393",gamma:"\u03b3",Gammad:"\u03dc",gammad:"\u03dd",gap:"\u2a86",Gbreve:"\u011e",gbreve:"\u011f",Gcedil:"\u0122",Gcirc:"\u011c",gcirc:"\u011d",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2a8c",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",ges:"\u2a7e",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",Gfr:"\u{1d50a}",gfr:"\u{1d524}",Gg:"\u22d9",gg:"\u226b",ggg:"\u22d9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2aa5",glE:"\u2a92",glj:"\u2aa4",gnap:"\u2a8a",gnapprox:"\u2a8a",gnE:"\u2269",gne:"\u2a88",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",Gopf:"\u{1d53e}",gopf:"\u{1d558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\u{1d4a2}",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",Gt:"\u226b",GT:">",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",hArr:"\u21d4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",Hfr:"\u210c",hfr:"\u{1d525}",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",Hopf:"\u210d",hopf:"\u{1d559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210b",hscr:"\u{1d4bd}",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xcd",iacute:"\xed",ic:"\u2063",Icirc:"\xce",icirc:"\xee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",Ifr:"\u2111",ifr:"\u{1d526}",Igrave:"\xcc",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",Int:"\u222c",int:"\u222b",intcal:"\u22ba",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\u{1d540}",iopf:"\u{1d55a}",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",Iscr:"\u2110",iscr:"\u{1d4be}",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xcf",iuml:"\xef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1d50d}",jfr:"\u{1d527}",jmath:"\u0237",Jopf:"\u{1d541}",jopf:"\u{1d55b}",Jscr:"\u{1d4a5}",jscr:"\u{1d4bf}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\u{1d50e}",kfr:"\u{1d528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\u{1d542}",kopf:"\u{1d55c}",Kscr:"\u{1d4a6}",kscr:"\u{1d4c0}",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",Lang:"\u27ea",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\xab",Larr:"\u219e",lArr:"\u21d0",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",lAtail:"\u291b",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lBarr:"\u290e",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",Leftarrow:"\u21d0",leftarrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\u{1d50f}",lfr:"\u{1d529}",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22d8",ll:"\u226a",llarr:"\u21c7",llcorner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lnE:"\u2268",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftarrow:"\u27f5",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",Lopf:"\u{1d543}",lopf:"\u{1d55d}",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1d4c1}",Lsh:"\u21b0",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226a",LT:"<",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014",mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\u{1d510}",mfr:"\u{1d52a}",mho:"\u2127",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\u{1d544}",mopf:"\u{1d55e}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1d4c2}",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21d7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1d511}",nfr:"\u{1d52b}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",nGg:"\u22d9\u0338",ngsim:"\u2275",nGt:"\u226b\u20d2",ngt:"\u226f",ngtr:"\u226f",nGtv:"\u226b\u0338",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlArr:"\u21cd",nlarr:"\u219a",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21cd",nleftarrow:"\u219a",nLeftrightarrow:"\u21ce",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nLl:"\u22d8\u0338",nlsim:"\u2274",nLt:"\u226a\u20d2",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nLtv:"\u226a\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xa0",Nopf:"\u2115",nopf:"\u{1d55f}",Not:"\u2aec",not:"\xac",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",notin:"\u2209",notindot:"\u22f5\u0338",notinE:"\u22f9\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nRightarrow:"\u21cf",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\u{1d4a9}",nscr:"\u{1d4c3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",Ntilde:"\xd1",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",Nu:"\u039d",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224d\u20d2",nVDash:"\u22af",nVdash:"\u22ae",nvDash:"\u22ad",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvHarr:"\u2904",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwarhk:"\u2923",nwArr:"\u21d6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xd3",oacute:"\xf3",oast:"\u229b",ocir:"\u229a",Ocirc:"\xd4",ocirc:"\xf4",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\u{1d512}",ofr:"\u{1d52c}",ogon:"\u02db",Ograve:"\xd2",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",Omacr:"\u014c",omacr:"\u014d",Omega:"\u03a9",omega:"\u03c9",Omicron:"\u039f",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",Oopf:"\u{1d546}",oopf:"\u{1d560}",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",Or:"\u2a54",or:"\u2228",orarr:"\u21bb",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\u{1d4aa}",oscr:"\u2134",Oslash:"\xd8",oslash:"\xf8",osol:"\u2298",Otilde:"\xd5",otilde:"\xf5",Otimes:"\u2a37",otimes:"\u2297",otimesas:"\u2a36",Ouml:"\xd6",ouml:"\xf6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",par:"\u2225",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\u{1d513}",pfr:"\u{1d52d}",Phi:"\u03a6",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\xb1",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",Poincareplane:"\u210c",pointint:"\u2a15",Popf:"\u2119",popf:"\u{1d561}",pound:"\xa3",Pr:"\u2abb",pr:"\u227a",prap:"\u2ab7",prcue:"\u227c",prE:"\u2ab3",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportion:"\u2237",Proportional:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",Pscr:"\u{1d4ab}",pscr:"\u{1d4c5}",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\u{1d514}",qfr:"\u{1d52e}",qint:"\u2a0c",Qopf:"\u211a",qopf:"\u{1d562}",qprime:"\u2057",Qscr:"\u{1d4ac}",qscr:"\u{1d4c6}",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",QUOT:'"',quot:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",Rang:"\u27eb",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",Rarr:"\u21a0",rArr:"\u21d2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",rAtail:"\u291c",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",RBarr:"\u2910",rBarr:"\u290f",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",Re:"\u211c",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",REG:"\xae",reg:"\xae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",Rfr:"\u211c",rfr:"\u{1d52f}",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u03f1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",Rightarrow:"\u21d2",rightarrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",rightthreetimes:"\u22cc",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",Ropf:"\u211d",ropf:"\u{1d563}",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",Rscr:"\u211b",rscr:"\u{1d4c7}",Rsh:"\u21b1",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",Sc:"\u2abc",sc:"\u227b",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227d",scE:"\u2ab4",sce:"\u2ab0",Scedil:"\u015e",scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",searhk:"\u2925",seArr:"\u21d8",searr:"\u2198",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1d516}",sfr:"\u{1d530}",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",Sopf:"\u{1d54a}",sopf:"\u{1d564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",Square:"\u25a1",square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",Sscr:"\u{1d4ae}",sscr:"\u{1d4c8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",Sub:"\u22d0",sub:"\u2282",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",Subset:"\u22d0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",Sum:"\u2211",sum:"\u2211",sung:"\u266a",Sup:"\u22d1",sup:"\u2283",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",supdot:"\u2abe",supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",Supset:"\u22d1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swArr:"\u21d9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",Tab:"\t",target:"\u2316",Tau:"\u03a4",tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\u{1d517}",tfr:"\u{1d531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\xde",thorn:"\xfe",Tilde:"\u223c",tilde:"\u02dc",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",Topf:"\u{1d54b}",topf:"\u{1d565}",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\u{1d4af}",tscr:"\u{1d4c9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\xda",uacute:"\xfa",Uarr:"\u219f",uArr:"\u21d1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\xdb",ucirc:"\xfb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\u{1d518}",ufr:"\u{1d532}",Ugrave:"\xd9",ugrave:"\xf9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\xa8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1d54c}",uopf:"\u{1d566}",UpArrow:"\u2191",Uparrow:"\u21d1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",Updownarrow:"\u21d5",updownarrow:"\u2195",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",upsi:"\u03c5",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTee:"\u22a5",UpTeeArrow:"\u21a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\u{1d4b0}",uscr:"\u{1d4ca}",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\xdc",uuml:"\xfc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",vArr:"\u21d5",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",Vbar:"\u2aeb",vBar:"\u2ae8",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22ab",Vdash:"\u22a9",vDash:"\u22a8",vdash:"\u22a2",Vdashl:"\u2ae6",Vee:"\u22c1",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\u{1d519}",vfr:"\u{1d533}",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\u{1d54d}",vopf:"\u{1d567}",vprop:"\u221d",vrtri:"\u22b3",Vscr:"\u{1d4b1}",vscr:"\u{1d4cb}",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",Wedge:"\u22c0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1d51a}",wfr:"\u{1d534}",Wopf:"\u{1d54e}",wopf:"\u{1d568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1d4b2}",wscr:"\u{1d4cc}",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",Xfr:"\u{1d51b}",xfr:"\u{1d535}",xhArr:"\u27fa",xharr:"\u27f7",Xi:"\u039e",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",Xopf:"\u{1d54f}",xopf:"\u{1d569}",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",Xscr:"\u{1d4b3}",xscr:"\u{1d4cd}",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\xdd",yacute:"\xfd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\xa5",Yfr:"\u{1d51c}",yfr:"\u{1d536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1d550}",yopf:"\u{1d56a}",Yscr:"\u{1d4b4}",yscr:"\u{1d4ce}",YUcy:"\u042e",yucy:"\u044e",Yuml:"\u0178",yuml:"\xff",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",Zfr:"\u2128",zfr:"\u{1d537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",Zopf:"\u2124",zopf:"\u{1d56b}",Zscr:"\u{1d4b5}",zscr:"\u{1d4cf}",zwj:"\u200d",zwnj:"\u200c"}),e.entityMap=e.HTML_ENTITIES},268:(t,e,s)=>{"use strict";var i,r;s.d(e,{Al:()=>c,Gb:()=>a,Oe:()=>d});var n=s(546),o=s(999);const a=i||(i=s.t(n,2)),c=(new a.DOMImplementation).createDocument("",""),l=(null===(r||(r=s.t(o,2)))||void 0===(r||(r=s.t(o,2)))?void 0:o.install)||window.wgxpath.install,h=function(){const t={document:{},XPathResult:{}};return l(t),t.document.XPathResult=t.XPathResult,t.document}(),d={currentDocument:c,evaluate:h.evaluate,result:h.XPathResult,createNSResolver:h.createNSResolver}},546:(t,e,s)=>{"use strict";var i=s(870);e.assign=i.assign,e.hasDefaultHTMLNamespace=i.hasDefaultHTMLNamespace,e.isHTMLMimeType=i.isHTMLMimeType,e.isValidMimeType=i.isValidMimeType,e.MIME_TYPE=i.MIME_TYPE,e.NAMESPACE=i.NAMESPACE;var r=s(767);e.DOMException=r.DOMException,e.DOMExceptionName=r.DOMExceptionName,e.ExceptionCode=r.ExceptionCode,e.ParseError=r.ParseError;var n=s(786);e.Attr=n.Attr,e.CDATASection=n.CDATASection,e.CharacterData=n.CharacterData,e.Comment=n.Comment,e.Document=n.Document,e.DocumentFragment=n.DocumentFragment,e.DocumentType=n.DocumentType,e.DOMImplementation=n.DOMImplementation,e.Element=n.Element,e.Entity=n.Entity,e.EntityReference=n.EntityReference,e.LiveNodeList=n.LiveNodeList,e.NamedNodeMap=n.NamedNodeMap,e.Node=n.Node,e.NodeList=n.NodeList,e.Notation=n.Notation,e.ProcessingInstruction=n.ProcessingInstruction,e.Text=n.Text,e.XMLSerializer=n.XMLSerializer;var o=s(576);e.DOMParser=o.DOMParser,e.normalizeLineEndings=o.normalizeLineEndings,e.onErrorStopParsing=o.onErrorStopParsing,e.onWarningStopParsing=o.onWarningStopParsing},576:(t,e,s)=>{"use strict";var i=s(870),r=s(786),n=s(767),o=s(159),a=s(802),c=r.DOMImplementation,l=i.hasDefaultHTMLNamespace,h=i.isHTMLMimeType,d=i.isValidMimeType,u=i.MIME_TYPE,p=i.NAMESPACE,m=n.ParseError,f=a.XMLReader;function g(t){return t.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028\u2029]/g,"\n")}function b(t){if(void 0===(t=t||{}).locator&&(t.locator=!0),this.assign=t.assign||i.assign,this.domHandler=t.domHandler||E,this.onError=t.onError||t.errorHandler,t.errorHandler&&"function"!=typeof t.errorHandler)throw new TypeError("errorHandler object is no longer supported, switch to onError!");t.errorHandler&&t.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=t.normalizeLineEndings||g,this.locator=!!t.locator,this.xmlns=this.assign(Object.create(null),t.xmlns)}function E(t){var e=t||{};this.mimeType=e.mimeType||u.XML_APPLICATION,this.defaultNamespace=e.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=e.onError}function N(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}function y(t,e,s){return"string"==typeof t?t.substr(e,s):t.length>=e+s||e?new java.lang.String(t,e,s)+"":t}function x(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}b.prototype.parseFromString=function(t,e){if(!d(e))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+e+'" is not valid.');var s=this.assign(Object.create(null),this.xmlns),r=o.XML_ENTITIES,n=s[""]||null;l(e)?(r=o.HTML_ENTITIES,n=p.HTML):e===u.XML_SVG_IMAGE&&(n=p.SVG),s[""]=n,s.xml=s.xml||p.XML;var a=new this.domHandler({mimeType:e,defaultNamespace:n,onError:this.onError}),c=this.locator?{}:void 0;this.locator&&a.setDocumentLocator(c);var h=new f;return h.errorHandler=a,h.domBuilder=a,!i.isHTMLMimeType(e)&&"string"!=typeof t&&h.errorHandler.fatalError("source is not a string"),h.parse(this.normalizeLineEndings(String(t)),s,r),a.doc.documentElement||h.errorHandler.fatalError("missing root element"),a.doc},E.prototype={startDocument:function(){var t=new c;this.doc=h(this.mimeType)?t.createHTMLDocument(!1):t.createDocument(this.defaultNamespace,"")},startElement:function(t,e,s,i){var r=this.doc,n=r.createElementNS(t,s||e),o=i.length;x(this,n),this.currentElement=n,this.locator&&N(this.locator,n);for(var a=0;a<o;a++){t=i.getURI(a);var c=i.getValue(a),l=(s=i.getQName(a),r.createAttributeNS(t,s));this.locator&&N(i.getLocator(a),l),l.value=l.nodeValue=c,n.setAttributeNode(l)}},endElement:function(t,e,s){this.currentElement=this.currentElement.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var s=this.doc.createProcessingInstruction(t,e);this.locator&&N(this.locator,s),x(this,s)},ignorableWhitespace:function(t,e,s){},characters:function(t,e,s){if(t=y.apply(this,arguments)){if(this.cdata)var i=this.doc.createCDATASection(t);else i=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(t)&&this.doc.appendChild(i),this.locator&&N(this.locator,i)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){t&&(t.lineNumber=0),this.locator=t},comment:function(t,e,s){t=y.apply(this,arguments);var i=this.doc.createComment(t);this.locator&&N(this.locator,i),x(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,s,i){var r=this.doc.implementation;if(r&&r.createDocumentType){var n=r.createDocumentType(t,e,s,i);this.locator&&N(this.locator,n),x(this,n),this.doc.doctype=n}},reportError:function(t,e){if("function"==typeof this.onError)try{this.onError(t,e,this)}catch(s){throw new m("Reporting "+t+' "'+e+'" caused '+s,this.locator)}else console.error("[xmldom "+t+"]\t"+e,function(t){if(t)return"\n@#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}(this.locator))},warning:function(t){this.reportError("warning",t)},error:function(t){this.reportError("error",t)},fatalError:function(t){throw this.reportError("fatalError",t),new m(t,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(t){E.prototype[t]=function(){return null}})),e.__DOMHandler=E,e.DOMParser=b,e.normalizeLineEndings=g,e.onErrorStopParsing=function(t){if("error"===t)throw"onErrorStopParsing"},e.onWarningStopParsing=function(){throw"onWarningStopParsing"}},714:(t,e,s)=>{"use strict";s.d(e,{u:()=>i});class i{static ensureLocale(t,e){return i.LOCALES.get(t)?t:(console.error(`Locale ${t} does not exist! Using ${i.LOCALES.get(e)} instead.`),e)}}i.VERSION="5.0.0-beta.1",i.LOCALES=new Map([["af","Africaans"],["ca","Catalan"],["da","Danish"],["de","German"],["en","English"],["es","Spanish"],["euro","Euro"],["fr","French"],["hi","Hindi"],["it","Italian"],["ko","Korean"],["nb","Bokm\xe5l"],["nn","Nynorsk"],["sv","Swedish"],["nemeth","Nemeth"]]),i.mathjaxVersion="4.0.0",i.url="https://cdn.jsdelivr.net/npm/speech-rule-engine@"+i.VERSION+"/lib/mathmaps"},731:(t,e)=>{"use strict";function s(t){try{"function"!=typeof t&&(t=RegExp);var e=new t("\u{1d306}","u").exec("\u{1d306}");return!!e&&2===e[0].length}catch(t){}return!1}var i=s();function r(t){if("["!==t.source[0])throw new Error(t+" can not be used with chars");return t.source.slice(1,t.source.lastIndexOf("]"))}function n(t,e){if("["!==t.source[0])throw new Error("/"+t.source+"/ can not be used with chars_without");if(!e||"string"!=typeof e)throw new Error(JSON.stringify(e)+" is not a valid search");if(-1===t.source.indexOf(e))throw new Error('"'+e+'" is not is /'+t.source+"/");if("-"===e&&1!==t.source.indexOf(e))throw new Error('"'+e+'" is not at the first postion of /'+t.source+"/");return new RegExp(t.source.replace(e,""),i?"u":"")}function o(t){var e=this;return new RegExp(Array.prototype.slice.call(arguments).map((function(t){var s="string"==typeof t;if(s&&void 0===e&&"|"===t)throw new Error("use regg instead of reg to wrap expressions with `|`!");return s?t:t.source})).join(""),i?"mu":"m")}function a(t){if(0===arguments.length)throw new Error("no parameters provided");return o.apply(a,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var c=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;i&&(c=o("[",r(c),"\\u{10000}-\\u{10FFFF}","]"));var l=/[\x20\x09\x0D\x0A]/,h=r(l),d=o(l,"+"),u=o(l,"*"),p=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;i&&(p=o("[",r(p),"\\u{10000}-\\u{10FFFF}","]"));var m=o("[",r(p),r(/[-.0-9\xB7]/),r(/[\u0300-\u036F\u203F-\u2040]/),"]"),f=o(p,m,"*"),g=o(m,"+"),b=o("&",f,";"),E=a(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),N=a(b,"|",E),y=o("%",f,";"),x=a(o('"',a(/[^%&"]/,"|",y,"|",N),"*",'"'),"|",o("'",a(/[^%&']/,"|",y,"|",N),"*","'")),v=a('"',a(/[^<&"]/,"|",N),"*",'"',"|","'",a(/[^<&']/,"|",N),"*","'"),C=o(n(p,":"),n(m,":"),"*"),T=o(C,a(":",C),"?"),w=o("^",T,"$"),_=o("(",T,")"),k=a(/"[^"]*"|'[^']*'/),A=o(/^<\?/,"(",f,")",a(d,"(",c,"*?)"),"?",/\?>/),L=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,M=a('"',L,'*"',"|","'",n(L,"'"),"*'"),I="\x3c!--",S=o(I,a(n(c,"-"),"|",o("-",n(c,"-"))),"*","--\x3e"),R="#PCDATA",O=a(o(/\(/,u,R,a(u,/\|/,u,T),"*",u,/\)\*/),"|",o(/\(/,u,R,u,/\)/)),D=a("EMPTY","|","ANY","|",O,"|",o(/\([^>]+\)/,/[?*+]?/)),P=o("<!ELEMENT",d,a(T,"|",y),d,a(D,"|",y),u,">"),B=o("NOTATION",d,/\(/,u,f,a(u,/\|/,u,f),"*",u,/\)/),F=o(/\(/,u,g,a(u,/\|/,u,g),"*",u,/\)/),j=a(B,"|",F),U=a(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",j),q=a(/#REQUIRED|#IMPLIED/,"|",a(a("#FIXED",d),"?",v)),H=o("<!ATTLIST",d,f,a(d,f,d,U,d,q),"*",u,">"),W="about:legacy-compat",z=a('"'+W+'"',"|","'"+W+"'"),X="SYSTEM",V="PUBLIC",G=a(a(X,d,k),"|",a(V,d,M,d,k)),J=o("^",a(a(X,d,"(?<SystemLiteralOnly>",k,")"),"|",a(V,d,"(?<PubidLiteral>",M,")",d,"(?<SystemLiteral>",k,")"))),K=a(d,"NDATA",d,f),$="<!ENTITY",Y=o($,d,f,d,a(x,"|",a(G,K,"?")),u,">"),Q=a(x,"|",G),Z=a(Y,"|",o($,d,"%",d,f,d,Q,u,">")),tt=o(V,d,M),et=o("<!NOTATION",d,f,d,a(G,"|",tt),u,">"),st=o(u,"=",u),it=/1[.]\d+/,rt=o(d,"version",st,a("'",it,"'","|",'"',it,'"')),nt=/[A-Za-z][-A-Za-z0-9._]*/,ot=o(/^<\?xml/,rt,a(d,"encoding",st,a('"',nt,'"',"|","'",nt,"'")),"?",a(d,"standalone",st,a("'",a("yes","|","no"),"'","|",'"',a("yes","|","no"),'"')),"?",u,/\?>/),at=o(c,"*?",/\]\]>/),ct=o(/<!\[CDATA\[/,at);e.chars=r,e.chars_without=n,e.detectUnicodeSupport=s,e.reg=o,e.regg=a,e.ABOUT_LEGACY_COMPAT=W,e.ABOUT_LEGACY_COMPAT_SystemLiteral=z,e.AttlistDecl=H,e.CDATA_START="<![CDATA[",e.CDATA_END="]]>",e.CDSect=ct,e.Char=c,e.Comment=S,e.COMMENT_START=I,e.COMMENT_END="--\x3e",e.DOCTYPE_DECL_START="<!DOCTYPE",e.elementdecl=P,e.EntityDecl=Z,e.EntityValue=x,e.ExternalID=G,e.ExternalID_match=J,e.Name=f,e.NotationDecl=et,e.Reference=N,e.PEReference=y,e.PI=A,e.PUBLIC=V,e.PubidLiteral=M,e.QName=T,e.QName_exact=w,e.QName_group=_,e.S=d,e.SChar_s=h,e.S_OPT=u,e.SYSTEM=X,e.SystemLiteral=k,e.UNICODE_REPLACEMENT_CHARACTER="\ufffd",e.UNICODE_SUPPORT=i,e.XMLDecl=ot},767:(t,e,s)=>{"use strict";function i(t,e){t.prototype=Object.create(Error.prototype,{constructor:{value:t},name:{value:t.name,enumerable:!0,writable:e}})}var r=s(870).freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),n=Object.keys(r);function o(t){return"number"==typeof t&&t>=1&&t<=25}function a(t,e){var s;o(t)?(this.name=n[t],this.message=e||""):(this.message=t,this.name="string"==typeof(s=e)&&s.substring(s.length-r.Error.length)===r.Error?e:r.Error),Error.captureStackTrace&&Error.captureStackTrace(this,a)}i(a,!0),Object.defineProperties(a.prototype,{code:{enumerable:!0,get:function(){var t=n.indexOf(this.name);return o(t)?t:0}}});for(var c={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},l=Object.entries(c),h=0;h<l.length;h++){a[l[h][0]]=l[h][1]}function d(t,e){this.message=t,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,d)}i(d),e.DOMException=a,e.DOMExceptionName=r,e.ExceptionCode=c,e.ParseError=d},786:(t,e,s)=>{"use strict";var i=s(870),r=i.find,n=i.hasDefaultHTMLNamespace,o=i.hasOwn,a=i.isHTMLMimeType,c=i.isHTMLRawTextElement,l=i.isHTMLVoidElement,h=i.MIME_TYPE,d=i.NAMESPACE,u=Symbol(),p=s(767),m=p.DOMException,f=p.DOMExceptionName,g=s(731);function b(t){if(t!==u)throw new TypeError("Illegal constructor")}function E(t){return""!==t}function N(t,e){return o(t,e)||(t[e]=!0),t}function y(t){if(!t)return[];var e=function(t){return t?t.split(/[\t\n\f\r ]+/).filter(E):[]}(t);return Object.keys(e.reduce(N,{}))}function x(t){if(!g.QName_exact.test(t))throw new m(m.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+t+'"')}function v(t,e){x(e),t=t||null;var s=null,r=e;if(e.indexOf(":")>=0){var n=e.split(":");s=n[0],r=n[1]}if(null!==s&&null===t)throw new m(m.NAMESPACE_ERR,"prefix is non-null and namespace is null");if("xml"===s&&t!==i.NAMESPACE.XML)throw new m(m.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if(("xmlns"===s||"xmlns"===e)&&t!==i.NAMESPACE.XMLNS)throw new m(m.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(t===i.NAMESPACE.XMLNS&&"xmlns"!==s&&"xmlns"!==e)throw new m(m.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[t,s,r]}function C(t,e){for(var s in t)o(t,s)&&(e[s]=t[s])}function T(t,e){var s=t.prototype;if(!(s instanceof e)){function i(){}i.prototype=e.prototype,C(s,i=new i),t.prototype=s=i}s.constructor!=t&&("function"!=typeof t&&console.error("unknown Class:"+t),s.constructor=t)}var w={},_=w.ELEMENT_NODE=1,k=w.ATTRIBUTE_NODE=2,A=w.TEXT_NODE=3,L=w.CDATA_SECTION_NODE=4,M=w.ENTITY_REFERENCE_NODE=5,I=w.ENTITY_NODE=6,S=w.PROCESSING_INSTRUCTION_NODE=7,R=w.COMMENT_NODE=8,O=w.DOCUMENT_NODE=9,D=w.DOCUMENT_TYPE_NODE=10,P=w.DOCUMENT_FRAGMENT_NODE=11,B=w.NOTATION_NODE=12,F=i.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function j(t,e){if(e.length<t.length)return j(e,t);var s=null;for(var i in t){if(t[i]!==e[i])return s;s=t[i]}return s}function U(t){return t.guid||(t.guid=Math.random()),t.guid}function q(){}function H(t,e){this._node=t,this._refresh=e,W(this)}function W(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var s=t._refresh(t._node);if(Mt(t,"length",s.length),!t.$$length||s.length<t.$$length)for(var i=s.length;i in t;i++)o(t,i)&&delete t[i];C(s,t),t._inc=e}}function z(){}function X(t,e){for(var s=0;s<t.length;){if(t[s]===e)return s;s++}}function V(t,e,s,i){if(i?e[X(e,i)]=s:(e[e.length]=s,e.length++),t){s.ownerElement=t;var r=t.ownerDocument;r&&(i&&Z(r,t,i),function(t,e,s){t&&t._inc++;var i=s.namespaceURI;i===d.XMLNS&&(e._nsMap[s.prefix?s.localName:""]=s.value)}(r,t,s))}}function G(t,e,s){var i=X(e,s);if(i>=0){for(var r=e.length-1;i<=r;)e[i]=e[++i];if(e.length=r,t){var n=t.ownerDocument;n&&Z(n,t,s),s.ownerElement=null}}}function J(){}function K(t){b(t)}function $(t){return("<"==t?"&lt;":">"==t&&"&gt;")||"&"==t&&"&amp;"||'"'==t&&"&quot;"||"&#"+t.charCodeAt()+";"}function Y(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(Y(t,e))return!0}while(t=t.nextSibling)}function Q(t,e){b(t);var s=e||{};this.ownerDocument=this,this.contentType=s.contentType||h.XML_APPLICATION,this.type=a(this.contentType)?"html":"xml"}function Z(t,e,s,i){t&&t._inc++,s.namespaceURI===d.XMLNS&&delete e._nsMap[s.prefix?s.localName:""]}function tt(t,e,s){if(t&&t._inc){t._inc++;var i=e.childNodes;if(s&&!s.nextSibling)i[i.length++]=s;else{for(var r=e.firstChild,n=0;r;)i[n++]=r,r=r.nextSibling;i.length=n,delete i[i.length]}}}function et(t,e){if(t!==e.parentNode)throw new m(m.NOT_FOUND_ERR,"child's parent is not parent");var s=e.previousSibling,i=e.nextSibling;return s?s.nextSibling=i:t.firstChild=i,i?i.previousSibling=s:t.lastChild=s,tt(t.ownerDocument,t),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function st(t){return t&&t.nodeType===K.DOCUMENT_TYPE_NODE}function it(t){return t&&t.nodeType===K.ELEMENT_NODE}function rt(t){return t&&t.nodeType===K.TEXT_NODE}function nt(t,e){var s=t.childNodes||[];if(r(s,it)||st(e))return!1;var i=r(s,st);return!(e&&i&&s.indexOf(i)>s.indexOf(e))}function ot(t,e){var s=t.childNodes||[];if(r(s,(function(t){return it(t)&&t!==e})))return!1;var i=r(s,st);return!(e&&i&&s.indexOf(i)>s.indexOf(e))}function at(t,e,s){if(!function(t){return t&&(t.nodeType===K.DOCUMENT_NODE||t.nodeType===K.DOCUMENT_FRAGMENT_NODE||t.nodeType===K.ELEMENT_NODE)}(t))throw new m(m.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+t.nodeType);if(s&&s.parentNode!==t)throw new m(m.NOT_FOUND_ERR,"child not in parent");if(!function(t){return t&&(t.nodeType===K.CDATA_SECTION_NODE||t.nodeType===K.COMMENT_NODE||t.nodeType===K.DOCUMENT_FRAGMENT_NODE||t.nodeType===K.DOCUMENT_TYPE_NODE||t.nodeType===K.ELEMENT_NODE||t.nodeType===K.PROCESSING_INSTRUCTION_NODE||t.nodeType===K.TEXT_NODE)}(e)||st(e)&&t.nodeType!==K.DOCUMENT_NODE)throw new m(m.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)}function ct(t,e,s){var i=t.childNodes||[],n=e.childNodes||[];if(e.nodeType===K.DOCUMENT_FRAGMENT_NODE){var o=n.filter(it);if(o.length>1||r(n,rt))throw new m(m.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(1===o.length&&!nt(t,s))throw new m(m.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(it(e)&&!nt(t,s))throw new m(m.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(st(e)){if(r(i,st))throw new m(m.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var a=r(i,it);if(s&&i.indexOf(a)<i.indexOf(s))throw new m(m.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!s&&a)throw new m(m.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function lt(t,e,s){var i=t.childNodes||[],n=e.childNodes||[];if(e.nodeType===K.DOCUMENT_FRAGMENT_NODE){var o=n.filter(it);if(o.length>1||r(n,rt))throw new m(m.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(1===o.length&&!ot(t,s))throw new m(m.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(it(e)&&!ot(t,s))throw new m(m.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(st(e)){function c(t){return st(t)&&t!==s}if(r(i,c))throw new m(m.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var a=r(i,it);if(s&&i.indexOf(a)<i.indexOf(s))throw new m(m.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function ht(t,e,s,i){at(t,e,s),t.nodeType===K.DOCUMENT_NODE&&(i||ct)(t,e,s);var r=e.parentNode;if(r&&r.removeChild(e),e.nodeType===P){var n=e.firstChild;if(null==n)return e;var o=e.lastChild}else n=o=e;var a=s?s.previousSibling:t.lastChild;n.previousSibling=a,o.nextSibling=s,a?a.nextSibling=n:t.firstChild=n,null==s?t.lastChild=o:s.previousSibling=o;do{n.parentNode=t}while(n!==o&&(n=n.nextSibling));return tt(t.ownerDocument||t,t,e),e.nodeType==P&&(e.firstChild=e.lastChild=null),e}function dt(t){b(t),this._nsMap=Object.create(null)}function ut(t){b(t),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}function pt(t){b(t)}function mt(t){b(t)}function ft(t){b(t)}function gt(t){b(t)}function bt(t){b(t)}function Et(t){b(t)}function Nt(t){b(t)}function yt(t){b(t)}function xt(t){b(t)}function vt(t){b(t)}function Ct(){}function Tt(t){var e=[],s=this.nodeType===O&&this.documentElement||this,i=s.prefix,r=s.namespaceURI;if(r&&null==i&&null==(i=s.lookupPrefix(r)))var n=[{namespace:r,prefix:null}];return kt(this,e,t,n),e.join("")}function wt(t,e,s){var i=t.prefix||"",r=t.namespaceURI;if(!r)return!1;if("xml"===i&&r===d.XML||r===d.XMLNS)return!1;for(var n=s.length;n--;){var o=s[n];if(o.prefix===i)return o.namespace!==r}return!0}function _t(t,e,s){t.push(" ",e,'="',s.replace(/[<>&"\t\n\r]/g,$),'"')}function kt(t,e,s,i){i||(i=[]);var r="html"===(t.nodeType===O?t:t.ownerDocument).type;if(s){if(!(t=s(t)))return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case _:var n=t.attributes,o=n.length,a=t.firstChild,h=t.tagName,u=h;if(!r&&!t.prefix&&t.namespaceURI){for(var p,m=0;m<n.length;m++)if("xmlns"===n.item(m).name){p=n.item(m).value;break}if(!p)for(var f=i.length-1;f>=0;f--){if(""===(b=i[f]).prefix&&b.namespace===t.namespaceURI){p=b.namespace;break}}if(p!==t.namespaceURI)for(f=i.length-1;f>=0;f--){var b;if((b=i[f]).namespace===t.namespaceURI){b.prefix&&(u=b.prefix+":"+h);break}}}e.push("<",u);for(var E=0;E<o;E++){"xmlns"==(N=n.item(E)).prefix?i.push({prefix:N.localName,namespace:N.value}):"xmlns"==N.nodeName&&i.push({prefix:"",namespace:N.value})}for(E=0;E<o;E++){var N,y,x;if(wt(N=n.item(E),0,i))_t(e,(y=N.prefix||"")?"xmlns:"+y:"xmlns",x=N.namespaceURI),i.push({prefix:y,namespace:x});kt(N,e,s,i)}if(h===u&&wt(t,0,i))_t(e,(y=t.prefix||"")?"xmlns:"+y:"xmlns",x=t.namespaceURI),i.push({prefix:y,namespace:x});var v=!a;if(v&&(r||t.namespaceURI===d.HTML)&&(v=l(h)),v)e.push("/>");else{if(e.push(">"),r&&c(h))for(;a;)a.data?e.push(a.data):kt(a,e,s,i.slice()),a=a.nextSibling;else for(;a;)kt(a,e,s,i.slice()),a=a.nextSibling;e.push("</",u,">")}return;case O:case P:for(a=t.firstChild;a;)kt(a,e,s,i.slice()),a=a.nextSibling;return;case k:return _t(e,t.name,t.value);case A:return e.push(t.data.replace(/[<&>]/g,$));case L:return e.push(g.CDATA_START,t.data,g.CDATA_END);case R:return e.push(g.COMMENT_START,t.data,g.COMMENT_END);case D:var C=t.publicId,T=t.systemId;return e.push(g.DOCTYPE_DECL_START," ",t.name),C?(e.push(" ",g.PUBLIC," ",C),T&&"."!==T&&e.push(" ",T)):T&&"."!==T&&e.push(" ",g.SYSTEM," ",T),t.internalSubset&&e.push(" [",t.internalSubset,"]"),void e.push(">");case S:return e.push("<?",t.target," ",t.data,"?>");case M:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function At(t,e,s){var i;switch(e.nodeType){case _:(i=e.cloneNode(!1)).ownerDocument=t;case P:break;case k:s=!0}if(i||(i=e.cloneNode(!1)),i.ownerDocument=t,i.parentNode=null,s)for(var r=e.firstChild;r;)i.appendChild(At(t,r,s)),r=r.nextSibling;return i}function Lt(t,e,s){var i=new e.constructor(u);for(var r in e)if(o(e,r)){var n=e[r];"object"!=typeof n&&n!=i[r]&&(i[r]=n)}switch(e.childNodes&&(i.childNodes=new q),i.ownerDocument=t,i.nodeType){case _:var a=e.attributes,c=i.attributes=new z,l=a.length;c._ownerElement=i;for(var h=0;h<l;h++)i.setAttributeNode(Lt(t,a.item(h),!0));break;case k:s=!0}if(s)for(var d=e.firstChild;d;)i.appendChild(Lt(t,d,s)),d=d.nextSibling;return i}function Mt(t,e,s){t[e]=s}q.prototype={length:0,item:function(t){return t>=0&&t<this.length?this[t]:null},toString:function(t){for(var e=[],s=0;s<this.length;s++)kt(this[s],e,t);return e.join("")},filter:function(t){return Array.prototype.filter.call(this,t)},indexOf:function(t){return Array.prototype.indexOf.call(this,t)}},q.prototype[Symbol.iterator]=function(){var t=this,e=0;return{next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}},H.prototype.item=function(t){return W(this),this[t]||null},T(H,q),z.prototype={length:0,item:q.prototype.item,getNamedItem:function(t){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase());for(var e=0;e<this.length;){var s=this[e];if(s.nodeName===t)return s;e++}return null},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!==this._ownerElement)throw new m(m.INUSE_ATTRIBUTE_ERR);var s=this.getNamedItemNS(t.namespaceURI,t.localName);return s===t?t:(V(this._ownerElement,this,t,s),s)},setNamedItemNS:function(t){return this.setNamedItem(t)},removeNamedItem:function(t){var e=this.getNamedItem(t);if(!e)throw new m(m.NOT_FOUND_ERR,t);return G(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var s=this.getNamedItemNS(t,e);if(!s)throw new m(m.NOT_FOUND_ERR,t?t+" : "+e:e);return G(this._ownerElement,this,s),s},getNamedItemNS:function(t,e){t||(t=null);for(var s=0;s<this.length;){var i=this[s];if(i.localName===e&&i.namespaceURI===t)return i;s++}return null}},z.prototype[Symbol.iterator]=function(){var t=this,e=0;return{next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}},J.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,s){var i=h.XML_APPLICATION;t===d.HTML?i=h.XML_XHTML_APPLICATION:t===d.SVG&&(i=h.XML_SVG_IMAGE);var r=new Q(u,{contentType:i});if(r.implementation=this,r.childNodes=new q,r.doctype=s||null,s&&r.appendChild(s),e){var n=r.createElementNS(t,e);r.appendChild(n)}return r},createDocumentType:function(t,e,s,i){x(t);var r=new bt(u);return r.name=t,r.nodeName=t,r.publicId=e||"",r.systemId=s||"",r.internalSubset=i||"",r.childNodes=new q,r},createHTMLDocument:function(t){var e=new Q(u,{contentType:h.HTML});if(e.implementation=this,e.childNodes=new q,!1!==t){e.doctype=this.createDocumentType("html"),e.doctype.ownerDocument=e,e.appendChild(e.doctype);var s=e.createElement("html");e.appendChild(s);var i=e.createElement("head");if(s.appendChild(i),"string"==typeof t){var r=e.createElement("title");r.appendChild(e.createTextNode(t)),i.appendChild(r)}s.appendChild(e.createElement("body"))}return e}},K.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var t=this.getRootNode();return t&&t.nodeType===t.DOCUMENT_NODE},contains:function(t){if(!t)return!1;var e=t;do{if(this===e)return!0;e=t.parentNode}while(e);return!1},getRootNode:function(t){var e=this;do{if(!e.parentNode)return e;e=e.parentNode}while(e)},isEqualNode:function(t){if(!t)return!1;if(this.nodeType!==t.nodeType)return!1;switch(this.nodeType){case this.DOCUMENT_TYPE_NODE:if(this.name!==t.name)return!1;if(this.publicId!==t.publicId)return!1;if(this.systemId!==t.systemId)return!1;break;case this.ELEMENT_NODE:if(this.namespaceURI!==t.namespaceURI)return!1;if(this.prefix!==t.prefix)return!1;if(this.localName!==t.localName)return!1;if(this.attributes.length!==t.attributes.length)return!1;for(var e=0;e<this.attributes.length;e++){var s=this.attributes.item(e);if(!s.isEqualNode(t.getAttributeNodeNS(s.namespaceURI,s.localName)))return!1}break;case this.ATTRIBUTE_NODE:if(this.namespaceURI!==t.namespaceURI)return!1;if(this.localName!==t.localName)return!1;if(this.value!==t.value)return!1;break;case this.PROCESSING_INSTRUCTION_NODE:if(this.target!==t.target||this.data!==t.data)return!1;break;case this.TEXT_NODE:case this.COMMENT_NODE:if(this.data!==t.data)return!1}if(this.childNodes.length!==t.childNodes.length)return!1;for(e=0;e<this.childNodes.length;e++)if(!this.childNodes[e].isEqualNode(t.childNodes[e]))return!1;return!0},isSameNode:function(t){return this===t},insertBefore:function(t,e){return ht(this,t,e)},replaceChild:function(t,e){ht(this,t,e,lt),e&&this.removeChild(e)},removeChild:function(t){return et(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(t){return Lt(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var e=t.nextSibling;e&&e.nodeType==A&&t.nodeType==A?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},lookupPrefix:function(t){for(var e=this;e;){var s=e._nsMap;if(s)for(var i in s)if(o(s,i)&&s[i]===t)return i;e=e.nodeType==k?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var s=e._nsMap;if(s&&o(s,t))return s[t];e=e.nodeType==k?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){return null==this.lookupPrefix(t)},compareDocumentPosition:function(t){if(this===t)return 0;var e=t,s=this,i=null,r=null;if(e instanceof ut&&(e=(i=e).ownerElement),s instanceof ut&&(s=(r=s).ownerElement,i&&e&&s===e))for(var n,o=0;n=s.attributes[o];o++){if(n===i)return F.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+F.DOCUMENT_POSITION_PRECEDING;if(n===r)return F.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+F.DOCUMENT_POSITION_FOLLOWING}if(!e||!s||s.ownerDocument!==e.ownerDocument)return F.DOCUMENT_POSITION_DISCONNECTED+F.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(U(s.ownerDocument)>U(e.ownerDocument)?F.DOCUMENT_POSITION_FOLLOWING:F.DOCUMENT_POSITION_PRECEDING);if(r&&e===s)return F.DOCUMENT_POSITION_CONTAINS+F.DOCUMENT_POSITION_PRECEDING;if(i&&e===s)return F.DOCUMENT_POSITION_CONTAINED_BY+F.DOCUMENT_POSITION_FOLLOWING;for(var a=[],c=e.parentNode;c;){if(!r&&c===s)return F.DOCUMENT_POSITION_CONTAINED_BY+F.DOCUMENT_POSITION_FOLLOWING;a.push(c),c=c.parentNode}a.reverse();for(var l=[],h=s.parentNode;h;){if(!i&&h===e)return F.DOCUMENT_POSITION_CONTAINS+F.DOCUMENT_POSITION_PRECEDING;l.push(h),h=h.parentNode}l.reverse();var d=j(a,l);for(var u in d.childNodes){var p=d.childNodes[u];if(p===s)return F.DOCUMENT_POSITION_FOLLOWING;if(p===e)return F.DOCUMENT_POSITION_PRECEDING;if(l.indexOf(p)>=0)return F.DOCUMENT_POSITION_FOLLOWING;if(a.indexOf(p)>=0)return F.DOCUMENT_POSITION_PRECEDING}return 0}},C(w,K),C(w,K.prototype),C(F,K),C(F,K.prototype),Q.prototype={implementation:null,nodeName:"#document",nodeType:O,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType===P){for(var s=t.firstChild;s;){var i=s.nextSibling;this.insertBefore(s,e),s=i}return t}return ht(this,t,e),t.ownerDocument=this,null===this.documentElement&&t.nodeType===_&&(this.documentElement=t),t},removeChild:function(t){var e=et(this,t);return e===this.documentElement&&(this.documentElement=null),e},replaceChild:function(t,e){ht(this,t,e,lt),t.ownerDocument=this,e&&this.removeChild(e),it(t)&&(this.documentElement=t)},importNode:function(t,e){return At(this,t,e)},getElementById:function(t){var e=null;return Y(this.documentElement,(function(s){if(s.nodeType==_&&s.getAttribute("id")==t)return e=s,!0})),e},createElement:function(t){var e=new dt(u);return e.ownerDocument=this,"html"===this.type&&(t=t.toLowerCase()),n(this.contentType)&&(e.namespaceURI=d.HTML),e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new q,(e.attributes=new z)._ownerElement=e,e},createDocumentFragment:function(){var t=new xt(u);return t.ownerDocument=this,t.childNodes=new q,t},createTextNode:function(t){var e=new mt(u);return e.ownerDocument=this,e.childNodes=new q,e.appendData(t),e},createComment:function(t){var e=new ft(u);return e.ownerDocument=this,e.childNodes=new q,e.appendData(t),e},createCDATASection:function(t){var e=new gt(u);return e.ownerDocument=this,e.childNodes=new q,e.appendData(t),e},createProcessingInstruction:function(t,e){var s=new vt(u);return s.ownerDocument=this,s.childNodes=new q,s.nodeName=s.target=t,s.nodeValue=s.data=e,s},createAttribute:function(t){if(!g.QName_exact.test(t))throw new m(m.INVALID_CHARACTER_ERR,'invalid character in name "'+t+'"');return"html"===this.type&&(t=t.toLowerCase()),this._createAttribute(t)},_createAttribute:function(t){var e=new ut(u);return e.ownerDocument=this,e.childNodes=new q,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){if(!g.Name.test(t))throw new m(m.INVALID_CHARACTER_ERR,'not a valid xml name "'+t+'"');if("html"===this.type)throw new m("document is an html document",f.NotSupportedError);var e=new yt(u);return e.ownerDocument=this,e.childNodes=new q,e.nodeName=t,e},createElementNS:function(t,e){var s=v(t,e),i=new dt(u),r=i.attributes=new z;return i.childNodes=new q,i.ownerDocument=this,i.nodeName=e,i.tagName=e,i.namespaceURI=s[0],i.prefix=s[1],i.localName=s[2],r._ownerElement=i,i},createAttributeNS:function(t,e){var s=v(t,e),i=new ut(u);return i.ownerDocument=this,i.childNodes=new q,i.nodeName=e,i.name=e,i.specified=!0,i.namespaceURI=s[0],i.prefix=s[1],i.localName=s[2],i}},T(Q,K),dt.prototype={nodeType:_,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return"html"===this.ownerDocument.type&&this.namespaceURI===d.HTML},hasAttributes:function(){return!(!this.attributes||!this.attributes.length)},hasAttribute:function(t){return!!this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e?e.value:null},getAttributeNode:function(t){return this._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase()),this.attributes.getNamedItem(t)},setAttribute:function(t,e){this._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase());var s=this.getAttributeNode(t);s?s.value=s.nodeValue=""+e:((s=this.ownerDocument._createAttribute(t)).value=s.nodeValue=""+e,this.setAttributeNode(s))},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var s=this.getAttributeNodeNS(t,e);s&&this.removeAttributeNode(s)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var s=this.getAttributeNodeNS(t,e);return s?s.value:null},setAttributeNS:function(t,e,s){var i=v(t,e)[2],r=this.getAttributeNodeNS(t,i);r?r.value=r.nodeValue=""+s:((r=this.ownerDocument.createAttributeNS(t,e)).value=r.nodeValue=""+s,this.setAttributeNode(r))},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByClassName:function(t){var e=y(t);return new H(this,(function(s){var i=[];return e.length>0&&Y(s,(function(r){if(r!==s&&r.nodeType===_){var n=r.getAttribute("class");if(n){var o=t===n;if(!o){var a=y(n);o=e.every((c=a,function(t){return c&&-1!==c.indexOf(t)}))}o&&i.push(r)}}var c})),i}))},getElementsByTagName:function(t){var e="html"===(this.nodeType===O?this:this.ownerDocument).type,s=t.toLowerCase();return new H(this,(function(i){var r=[];return Y(i,(function(n){n!==i&&n.nodeType===_&&(("*"===t||n.getQualifiedName()===(e&&n.namespaceURI===d.HTML?s:t))&&r.push(n))})),r}))},getElementsByTagNameNS:function(t,e){return new H(this,(function(s){var i=[];return Y(s,(function(r){r===s||r.nodeType!==_||"*"!==t&&r.namespaceURI!==t||"*"!==e&&r.localName!=e||i.push(r)})),i}))}},Q.prototype.getElementsByClassName=dt.prototype.getElementsByClassName,Q.prototype.getElementsByTagName=dt.prototype.getElementsByTagName,Q.prototype.getElementsByTagNameNS=dt.prototype.getElementsByTagNameNS,T(dt,K),ut.prototype.nodeType=k,T(ut,K),pt.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,s){s=this.data.substring(0,t)+s+this.data.substring(t+e),this.nodeValue=this.data=s,this.length=s.length}},T(pt,K),mt.prototype={nodeName:"#text",nodeType:A,splitText:function(t){var e=this.data,s=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var i=this.ownerDocument.createTextNode(s);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},T(mt,pt),ft.prototype={nodeName:"#comment",nodeType:R},T(ft,pt),gt.prototype={nodeName:"#cdata-section",nodeType:L},T(gt,mt),bt.prototype.nodeType=D,T(bt,K),Et.prototype.nodeType=B,T(Et,K),Nt.prototype.nodeType=I,T(Nt,K),yt.prototype.nodeType=M,T(yt,K),xt.prototype.nodeName="#document-fragment",xt.prototype.nodeType=P,T(xt,K),vt.prototype.nodeType=S,T(vt,pt),Ct.prototype.serializeToString=function(t,e){return Tt.call(t,e)},K.prototype.toString=Tt;try{if(Object.defineProperty){function It(t){switch(t.nodeType){case _:case P:var e=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&e.push(It(t)),t=t.nextSibling;return e.join("");default:return t.nodeValue}}Object.defineProperty(H.prototype,"length",{get:function(){return W(this),this.$$length}}),Object.defineProperty(K.prototype,"textContent",{get:function(){return It(this)},set:function(t){switch(this.nodeType){case _:case P:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),Mt=function(t,e,s){t["$$"+e]=s}}}catch(St){}e._updateLiveList=W,e.Attr=ut,e.CDATASection=gt,e.CharacterData=pt,e.Comment=ft,e.Document=Q,e.DocumentFragment=xt,e.DocumentType=bt,e.DOMImplementation=J,e.Element=dt,e.Entity=Nt,e.EntityReference=yt,e.LiveNodeList=H,e.NamedNodeMap=z,e.Node=K,e.NodeList=q,e.Notation=Et,e.Text=mt,e.ProcessingInstruction=vt,e.XMLSerializer=Ct},802:(t,e,s)=>{"use strict";var i=s(870),r=s(731),n=s(767),o=i.isHTMLEscapableRawTextElement,a=i.isHTMLMimeType,c=i.isHTMLRawTextElement,l=i.hasOwn,h=i.NAMESPACE,d=n.ParseError,u=n.DOMException;function p(){}p.prototype={parse:function(t,e,s){var n=this.domBuilder;n.startDocument(),N(e,e=Object.create(null)),function(t,e,s,n,o){var c=a(n.mimeType);t.indexOf(r.UNICODE_REPLACEMENT_CHARACTER)>=0&&o.warning("Unicode replacement character detected, source encoding issues?");function h(t){if(t>65535){var e=55296+((t-=65536)>>10),s=56320+(1023&t);return String.fromCharCode(e,s)}return String.fromCharCode(t)}function p(t){var e=";"===t[t.length-1]?t:t+";";if(!c&&e!==t)return o.error("EntityRef: expecting ;"),t;var i=r.Reference.exec(e);if(!i||i[0].length!==e.length)return o.error("entity not matching Reference production: "+t),t;var n=e.slice(1,-1);return l(s,n)?s[n]:"#"===n.charAt(0)?h(parseInt(n.substring(1).replace("x","0x"))):(o.error("entity not found:"+t),t)}function N(e){if(e>M){var s=t.substring(M,e).replace(m,p);_&&k(M),n.characters(s,0,e-M),M=e}}var y=0,T=0,w=/\r\n?|\n|$/g,_=n.locator;function k(e,s){for(;e>=T&&(s=w.exec(t));)y=T,T=s.index+s[0].length,_.lineNumber++;_.columnNumber=e-y+1}var A=[{currentNSMap:e}],L=[],M=0;for(;;){try{var I=t.indexOf("<",M);if(I<0){if(!c&&L.length>0)return o.fatalError("unclosed xml tag(s): "+L.join(", "));if(!t.substring(M).match(/^\s*$/)){var S=n.doc,R=S.createTextNode(t.substring(M));if(S.documentElement)return o.error("Extra content at the end of the document");S.appendChild(R),n.currentElement=R}return}if(I>M){var O=t.substring(M,I);c||0!==L.length||(O=O.replace(new RegExp(r.S_OPT.source,"g"),""))&&o.error("Unexpected content outside root element: '"+O+"'"),N(I)}switch(t.charAt(I+1)){case"/":var D=t.indexOf(">",I+2),P=t.substring(I+2,D>0?D:void 0);if(!P)return o.fatalError("end tag name missing");var B=D>0&&r.reg("^",r.QName_group,r.S_OPT,"$").exec(P);if(!B)return o.fatalError('end tag name contains invalid characters: "'+P+'"');if(!n.currentElement&&!n.doc.documentElement)return;var F=L[L.length-1]||n.currentElement.tagName||n.doc.documentElement.tagName||"";if(F!==B[1]){var j=B[1].toLowerCase();if(!c||F.toLowerCase()!==j)return o.fatalError('Opening and ending tag mismatch: "'+F+'" != "'+P+'"')}var U=A.pop();L.pop();var q=U.localNSMap;if(n.endElement(U.uri,U.localName,F),q)for(var H in q)l(q,H)&&n.endPrefixMapping(H);D++;break;case"?":_&&k(I),D=v(t,I,n,o);break;case"!":_&&k(I),D=x(t,I,n,o,c);break;default:_&&k(I);var W=new C,z=A[A.length-1].currentNSMap,X=(D=g(t,I,W,z,p,o,c),W.length);if(W.closed||(c&&i.isHTMLVoidElement(W.tagName)?W.closed=!0:L.push(W.tagName)),_&&X){for(var V=f(_,{}),G=0;G<X;G++){var J=W[G];k(J.offset),J.locator=f(_,{})}n.locator=V,b(W,n,z)&&A.push(W),n.locator=_}else b(W,n,z)&&A.push(W);c&&!W.closed?D=E(t,D,W.tagName,p,n):D++}}catch(t){if(t instanceof d)throw t;if(t instanceof u)throw new d(t.name+": "+t.message,n.locator,t);o.error("element parse error: "+t),D=-1}D>M?M=D:N(Math.max(I,M)+1)}}(t,e,s,n,this.errorHandler),n.endDocument()}};var m=/&#?\w+;?/g;function f(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function g(t,e,s,i,r,n,o){function a(t,e,i){return l(s.attributeNames,t)?n.fatalError("Attribute "+t+" redefined"):!o&&e.indexOf("<")>=0?n.fatalError("Unescaped '<' not allowed in attributes values"):void s.addValue(t,e.replace(/[\t\n\r]/g," ").replace(m,r),i)}for(var c,h=++e,d=0;;){var u=t.charAt(h);switch(u){case"=":if(1===d)c=t.slice(e,h),d=3;else{if(2!==d)throw new Error("attribute equal must after attrName");d=3}break;case"'":case'"':if(3===d||1===d){if(1===d&&(n.warning('attribute value must after "="'),c=t.slice(e,h)),e=h+1,!((h=t.indexOf(u,e))>0))throw new Error("attribute value no end '"+u+"' match");a(c,p=t.slice(e,h),e-1),d=5}else{if(4!=d)throw new Error('attribute value must after "="');a(c,p=t.slice(e,h),e),n.warning('attribute "'+c+'" missed start quot('+u+")!!"),e=h+1,d=5}break;case"/":switch(d){case 0:s.setTagName(t.slice(e,h));case 5:case 6:case 7:d=7,s.closed=!0;case 4:case 1:break;case 2:s.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return n.error("unexpected end of input"),0==d&&s.setTagName(t.slice(e,h)),h;case">":switch(d){case 0:s.setTagName(t.slice(e,h));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=t.slice(e,h)).slice(-1)&&(s.closed=!0,p=p.slice(0,-1));case 2:2===d&&(p=c),4==d?(n.warning('attribute "'+p+'" missed quot(")!'),a(c,p,e)):(o||n.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),a(p,p,e));break;case 3:if(!o)return n.fatalError("AttValue: ' or \" expected")}return h;case"\x80":u=" ";default:if(u<=" ")switch(d){case 0:s.setTagName(t.slice(e,h)),d=6;break;case 1:c=t.slice(e,h),d=2;break;case 4:var p=t.slice(e,h);n.warning('attribute "'+p+'" missed quot(")!!'),a(c,p,e);case 5:d=6}else switch(d){case 2:o||n.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),a(c,c,e),e=h,d=1;break;case 5:n.warning('attribute space is required"'+c+'"!!');case 6:d=1,e=h;break;case 3:d=4,e=h;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}h++}}function b(t,e,s){for(var i=t.tagName,r=null,n=t.length;n--;){var o=t[n],a=o.qName,c=o.value;if((m=a.indexOf(":"))>0)var d=o.prefix=a.slice(0,m),u=a.slice(m+1),p="xmlns"===d&&u;else u=a,d=null,p="xmlns"===a&&"";o.localName=u,!1!==p&&(null==r&&(r=Object.create(null),N(s,s=Object.create(null))),s[p]=r[p]=c,o.uri=h.XMLNS,e.startPrefixMapping(p,c))}for(n=t.length;n--;)(o=t[n]).prefix&&("xml"===o.prefix&&(o.uri=h.XML),"xmlns"!==o.prefix&&(o.uri=s[o.prefix]));var m;(m=i.indexOf(":"))>0?(d=t.prefix=i.slice(0,m),u=t.localName=i.slice(m+1)):(d=null,u=t.localName=i);var f=t.uri=s[d||""];if(e.startElement(f,u,i,t),!t.closed)return t.currentNSMap=s,t.localNSMap=r,!0;if(e.endElement(f,u,i),r)for(d in r)l(r,d)&&e.endPrefixMapping(d)}function E(t,e,s,i,r){var n=o(s);if(n||c(s)){var a=t.indexOf("</"+s+">",e),l=t.substring(e+1,a);return n&&(l=l.replace(m,i)),r.characters(l,0,l.length),a}return e+1}function N(t,e){for(var s in t)l(t,s)&&(e[s]=t[s])}function y(t,e){var s=e;function i(e){return e=e||0,t.charAt(s+e)}function n(t){s+=t=t||1}function o(){return t.substring(s)}return{char:i,getIndex:function(){return s},getMatch:function(t){var e=r.reg("^",t).exec(o());return e?(n(e[0].length),e[0]):null},getSource:function(){return t},skip:n,skipBlanks:function(){for(var e=0;s<t.length;){var r=i();if(" "!==r&&"\n"!==r&&"\t"!==r&&"\r"!==r)return e;e++,n()}return-1},substringFromIndex:o,substringStartsWith:function(e){return t.substring(s,s+e.length)===e},substringStartsWithCaseInsensitive:function(e){return t.substring(s,s+e.length).toUpperCase()===e.toUpperCase()}}}function x(t,e,s,i,n){var o=y(t,e);switch(n?o.char(2).toUpperCase():o.char(2)){case"-":var a=o.getMatch(r.Comment);return a?(s.comment(a,r.COMMENT_START.length,a.length-r.COMMENT_START.length-r.COMMENT_END.length),o.getIndex()):i.fatalError("comment is not well-formed at position "+o.getIndex());case"[":var c=o.getMatch(r.CDSect);return c?n||s.currentElement?(s.startCDATA(),s.characters(c,r.CDATA_START.length,c.length-r.CDATA_START.length-r.CDATA_END.length),s.endCDATA(),o.getIndex()):i.fatalError("CDATA outside of element"):i.fatalError("Invalid CDATA starting at position "+e);case"D":if(s.doc&&s.doc.documentElement)return i.fatalError("Doctype not allowed inside or after documentElement at position "+o.getIndex());if(n?!o.substringStartsWithCaseInsensitive(r.DOCTYPE_DECL_START):!o.substringStartsWith(r.DOCTYPE_DECL_START))return i.fatalError("Expected "+r.DOCTYPE_DECL_START+" at position "+o.getIndex());if(o.skip(r.DOCTYPE_DECL_START.length),o.skipBlanks()<1)return i.fatalError("Expected whitespace after "+r.DOCTYPE_DECL_START+" at position "+o.getIndex());var l={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(l.name=o.getMatch(r.Name),!l.name)return i.fatalError("doctype name missing or contains unexpected characters at position "+o.getIndex());if(n&&"html"!==l.name.toLowerCase()&&i.warning("Unexpected DOCTYPE in HTML document at position "+o.getIndex()),o.skipBlanks(),o.substringStartsWith(r.PUBLIC)||o.substringStartsWith(r.SYSTEM)){var h=r.ExternalID_match.exec(o.substringFromIndex());if(!h)return i.fatalError("doctype external id is not well-formed at position "+o.getIndex());void 0!==h.groups.SystemLiteralOnly?l.systemId=h.groups.SystemLiteralOnly:(l.systemId=h.groups.SystemLiteral,l.publicId=h.groups.PubidLiteral),o.skip(h[0].length)}else if(n&&o.substringStartsWithCaseInsensitive(r.SYSTEM)){if(o.skip(r.SYSTEM.length),o.skipBlanks()<1)return i.fatalError("Expected whitespace after "+r.SYSTEM+" at position "+o.getIndex());if(l.systemId=o.getMatch(r.ABOUT_LEGACY_COMPAT_SystemLiteral),!l.systemId)return i.fatalError("Expected "+r.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+r.SYSTEM+" at position "+o.getIndex())}return n&&l.systemId&&!r.ABOUT_LEGACY_COMPAT_SystemLiteral.test(l.systemId)&&i.warning("Unexpected doctype.systemId in HTML document at position "+o.getIndex()),n||(o.skipBlanks(),l.internalSubset=function(t,e){function s(t,e){var s=r.PI.exec(t.substringFromIndex());return s?"xml"===s[1].toLowerCase()?e.fatalError("xml declaration is only allowed at the start of the document, but found at position "+t.getIndex()):(t.skip(s[0].length),s[0]):e.fatalError("processing instruction is not well-formed at position "+t.getIndex())}var i=t.getSource();if("["===t.char()){t.skip(1);for(var n=t.getIndex();t.getIndex()<i.length;){if(t.skipBlanks(),"]"===t.char()){var o=i.substring(n,t.getIndex());return t.skip(1),o}var a=null;if("<"===t.char()&&"!"===t.char(1))switch(t.char(2)){case"E":"L"===t.char(3)?a=t.getMatch(r.elementdecl):"N"===t.char(3)&&(a=t.getMatch(r.EntityDecl));break;case"A":a=t.getMatch(r.AttlistDecl);break;case"N":a=t.getMatch(r.NotationDecl);break;case"-":a=t.getMatch(r.Comment)}else if("<"===t.char()&&"?"===t.char(1))a=s(t,e);else{if("%"!==t.char())return e.fatalError("Error detected in Markup declaration");a=t.getMatch(r.PEReference)}if(!a)return e.fatalError("Error in internal subset at position "+t.getIndex())}return e.fatalError("doctype internal subset is not well-formed, missing ]")}}(o,i)),o.skipBlanks(),">"!==o.char()?i.fatalError("doctype not terminated with > at position "+o.getIndex()):(o.skip(1),s.startDTD(l.name,l.publicId,l.systemId,l.internalSubset),s.endDTD(),o.getIndex());default:return i.fatalError('Not well-formed XML starting with "<!" at position '+e)}}function v(t,e,s,i){var n=t.substring(e).match(r.PI);if(!n)return i.fatalError("Invalid processing instruction starting at position "+e);if("xml"===n[1].toLowerCase()){if(e>0)return i.fatalError("processing instruction at position "+e+" is an xml declaration which is only at the start of the document");if(!r.XMLDecl.test(t.substring(e)))return i.fatalError("xml declaration is not well-formed")}return s.processingInstruction(n[1],n[2]),e+n[0].length}function C(){this.attributeNames=Object.create(null)}C.prototype={setTagName:function(t){if(!r.QName_exact.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,s){if(!r.QName_exact.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:s}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},e.XMLReader=p,e.parseUtils=y,e.parseDoctypeCommentOrCData=x},870:(t,e)=>{"use strict";function s(t,e){return void 0===e&&(e=Object),e&&"function"==typeof e.getOwnPropertyDescriptors&&(t=e.create(null,e.getOwnPropertyDescriptors(t))),e&&"function"==typeof e.freeze?e.freeze(t):t}function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var r=s({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});var n=s({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});var o=s({script:!1,style:!1,textarea:!0,title:!0});function a(t){return t===c.HTML}var c=s({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),l=Object.keys(c).map((function(t){return c[t]}));var h=s({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});e.assign=function(t,e){if(null===t||"object"!=typeof t)throw new TypeError("target is not an object");for(var s in e)i(e,s)&&(t[s]=e[s]);return t},e.find=function(t,e,s){if(void 0===s&&(s=Array.prototype),t&&"function"==typeof s.find)return s.find.call(t,e);for(var r=0;r<t.length;r++)if(i(t,r)){var n=t[r];if(e.call(void 0,n,r,t))return n}},e.freeze=s,e.HTML_BOOLEAN_ATTRIBUTES=r,e.HTML_RAW_TEXT_ELEMENTS=o,e.HTML_VOID_ELEMENTS=n,e.hasDefaultHTMLNamespace=function(t){return a(t)||t===c.XML_XHTML_APPLICATION},e.hasOwn=i,e.isHTMLBooleanAttribute=function(t){return i(r,t.toLowerCase())},e.isHTMLRawTextElement=function(t){var e=t.toLowerCase();return i(o,e)&&!o[e]},e.isHTMLEscapableRawTextElement=function(t){var e=t.toLowerCase();return i(o,e)&&o[e]},e.isHTMLMimeType=a,e.isHTMLVoidElement=function(t){return i(n,t.toLowerCase())},e.isValidMimeType=function(t){return l.indexOf(t)>-1},e.MIME_TYPE=c,e.NAMESPACE=h},999:(t,e,s)=>{(function(){"use strict";var e=this;function s(t){return"string"==typeof t}function i(t,e,s){return t.call.apply(t.bind,arguments)}function r(t,e,s){if(!t)throw Error();if(2<arguments.length){var i=Array.prototype.slice.call(arguments,2);return function(){var s=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(s,i),t.apply(e,s)}}return function(){return t.apply(e,arguments)}}function n(t,e,s){return(n=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?i:r).apply(null,arguments)}function o(t){var e=ot;function s(){}s.prototype=e.prototype,t.G=e.prototype,t.prototype=new s,t.prototype.constructor=t,t.F=function(t,s,i){for(var r=Array(arguments.length-2),n=2;n<arguments.length;n++)r[n-2]=arguments[n];return e.prototype[s].apply(t,r)}}var a=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};function c(t,e){return-1!=t.indexOf(e)}function l(t,e){return t<e?-1:t>e?1:0}var h,d=Array.prototype.indexOf?function(t,e,s){return Array.prototype.indexOf.call(t,e,s)}:function(t,e,i){if(i=null==i?0:0>i?Math.max(0,t.length+i):i,s(t))return s(e)&&1==e.length?t.indexOf(e,i):-1;for(;i<t.length;i++)if(i in t&&t[i]===e)return i;return-1},u=Array.prototype.forEach?function(t,e,s){Array.prototype.forEach.call(t,e,s)}:function(t,e,i){for(var r=t.length,n=s(t)?t.split(""):t,o=0;o<r;o++)o in n&&e.call(i,n[o],o,t)},p=Array.prototype.filter?function(t,e,s){return Array.prototype.filter.call(t,e,s)}:function(t,e,i){for(var r=t.length,n=[],o=0,a=s(t)?t.split(""):t,c=0;c<r;c++)if(c in a){var l=a[c];e.call(i,l,c,t)&&(n[o++]=l)}return n},m=Array.prototype.reduce?function(t,e,s,i){return i&&(e=n(e,i)),Array.prototype.reduce.call(t,e,s)}:function(t,e,s,i){var r=s;return u(t,(function(s,n){r=e.call(i,r,s,n,t)})),r},f=Array.prototype.some?function(t,e,s){return Array.prototype.some.call(t,e,s)}:function(t,e,i){for(var r=t.length,n=s(t)?t.split(""):t,o=0;o<r;o++)if(o in n&&e.call(i,n[o],o,t))return!0;return!1};t:{var g=e.navigator;if(g){var b=g.userAgent;if(b){h=b;break t}}h=""}var E,N,y=c(h,"Opera")||c(h,"OPR"),x=c(h,"Trident")||c(h,"MSIE"),v=c(h,"Edge"),C=c(h,"Gecko")&&!(c(h.toLowerCase(),"webkit")&&!c(h,"Edge"))&&!(c(h,"Trident")||c(h,"MSIE"))&&!c(h,"Edge"),T=c(h.toLowerCase(),"webkit")&&!c(h,"Edge");function w(){var t=e.document;return t?t.documentMode:void 0}t:{var _="",k=(N=h,C?/rv\:([^\);]+)(\)|;)/.exec(N):v?/Edge\/([\d\.]+)/.exec(N):x?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(N):T?/WebKit\/(\S+)/.exec(N):y?/(?:Version)[ \/]?(\S+)/.exec(N):void 0);if(k&&(_=k?k[1]:""),x){var A=w();if(null!=A&&A>parseFloat(_)){E=String(A);break t}}E=_}var L={};function M(t){if(!L[t]){for(var e=0,s=a(String(E)).split("."),i=a(String(t)).split("."),r=Math.max(s.length,i.length),n=0;0==e&&n<r;n++){var o=s[n]||"",c=i[n]||"",h=/(\d*)(\D*)/g,d=/(\d*)(\D*)/g;do{var u=h.exec(o)||["","",""],p=d.exec(c)||["","",""];if(0==u[0].length&&0==p[0].length)break;e=l(0==u[1].length?0:parseInt(u[1],10),0==p[1].length?0:parseInt(p[1],10))||l(0==u[2].length,0==p[2].length)||l(u[2],p[2])}while(0==e)}L[t]=0<=e}}var I=e.document,S=I&&x?w()||("CSS1Compat"==I.compatMode?parseInt(E,10):5):void 0,R=x&&!(9<=Number(S)),O=x&&!(8<=Number(S));function D(t,e,s,i){this.a=t,this.nodeName=s,this.nodeValue=i,this.nodeType=2,this.parentNode=this.ownerElement=e}function P(t,e){var s=O&&"href"==e.nodeName?t.getAttribute(e.nodeName,2):e.nodeValue;return new D(e,t,e.nodeName,s)}function B(t){var e=null;if(1==(s=t.nodeType)&&(e=null==(e=null==(e=t.textContent)||null==e?t.innerText:e)||null==e?"":e),"string"!=typeof e)if(R&&"title"==t.nodeName.toLowerCase()&&1==s)e=t.text;else if(9==s||1==s){t=9==s?t.documentElement:t.firstChild;var s=0,i=[];for(e="";t;){do{1!=t.nodeType&&(e+=t.nodeValue),R&&"title"==t.nodeName.toLowerCase()&&(e+=t.text),i[s++]=t}while(t=t.firstChild);for(;s&&!(t=i[--s].nextSibling););}}else e=t.nodeValue;return""+e}function F(t,e,s){if(null===e)return!0;try{if(!t.getAttribute)return!1}catch(t){return!1}return O&&"class"==e&&(e="className"),null==s?!!t.getAttribute(e):t.getAttribute(e,2)==s}function j(t,e,i,r,n){return(R?U:q).call(null,t,e,s(i)?i:null,s(r)?r:null,n||new $)}function U(t,e,s,i,r){if(t instanceof Ot||8==t.b||s&&null===t.b){var n=e.all;if(!n)return r;if("*"!=(t=X(t))&&!(n=e.getElementsByTagName(t)))return r;if(s){for(var o=[],a=0;e=n[a++];)F(e,s,i)&&o.push(e);n=o}for(a=0;e=n[a++];)"*"==t&&"!"==e.tagName||tt(r,e);return r}return z(t,e,s,i,r),r}function q(t,e,s,i,r){return e.getElementsByName&&i&&"name"==s&&!x?(e=e.getElementsByName(i),u(e,(function(e){t.a(e)&&tt(r,e)}))):e.getElementsByClassName&&i&&"class"==s?(e=e.getElementsByClassName(i),u(e,(function(e){e.className==i&&t.a(e)&&tt(r,e)}))):t instanceof wt?z(t,e,s,i,r):e.getElementsByTagName&&(e=e.getElementsByTagName(t.f()),u(e,(function(t){F(t,s,i)&&tt(r,t)}))),r}function H(t,e,s,i,r){var n;if((t instanceof Ot||8==t.b||s&&null===t.b)&&(n=e.childNodes)){var o=X(t);return"*"==o||(n=p(n,(function(t){return t.tagName&&t.tagName.toLowerCase()==o})),n)?(s&&(n=p(n,(function(t){return F(t,s,i)}))),u(n,(function(t){"*"==o&&("!"==t.tagName||"*"==o&&1!=t.nodeType)||tt(r,t)})),r):r}return W(t,e,s,i,r)}function W(t,e,s,i,r){for(e=e.firstChild;e;e=e.nextSibling)F(e,s,i)&&t.a(e)&&tt(r,e);return r}function z(t,e,s,i,r){for(e=e.firstChild;e;e=e.nextSibling)F(e,s,i)&&t.a(e)&&tt(r,e),z(t,e,s,i,r)}function X(t){if(t instanceof wt){if(8==t.b)return"!";if(null===t.b)return"*"}return t.f()}function V(t,e){if(!t||!e)return!1;if(t.contains&&1==e.nodeType)return t==e||t.contains(e);if(void 0!==t.compareDocumentPosition)return t==e||!!(16&t.compareDocumentPosition(e));for(;e&&t!=e;)e=e.parentNode;return e==t}function G(t,s){if(t==s)return 0;if(t.compareDocumentPosition)return 2&t.compareDocumentPosition(s)?1:-1;if(x&&!(9<=Number(S))){if(9==t.nodeType)return-1;if(9==s.nodeType)return 1}if("sourceIndex"in t||t.parentNode&&"sourceIndex"in t.parentNode){var i=1==t.nodeType,r=1==s.nodeType;if(i&&r)return t.sourceIndex-s.sourceIndex;var n=t.parentNode,o=s.parentNode;return n==o?K(t,s):!i&&V(n,s)?-1*J(t,s):!r&&V(o,t)?J(s,t):(i?t.sourceIndex:n.sourceIndex)-(r?s.sourceIndex:o.sourceIndex)}return(i=(r=9==t.nodeType?t:t.ownerDocument||t.document).createRange()).selectNode(t),i.collapse(!0),(r=r.createRange()).selectNode(s),r.collapse(!0),i.compareBoundaryPoints(e.Range.START_TO_END,r)}function J(t,e){var s=t.parentNode;if(s==e)return-1;for(var i=e;i.parentNode!=s;)i=i.parentNode;return K(i,t)}function K(t,e){for(var s=e;s=s.previousSibling;)if(s==t)return-1;return 1}function $(){this.b=this.a=null,this.l=0}function Y(t){this.node=t,this.a=this.b=null}function Q(t,e){if(!t.a)return e;if(!e.a)return t;for(var s=t.a,i=e.a,r=null,n=null,o=0;s&&i;){n=s.node;var a=i.node;n==a||n instanceof D&&a instanceof D&&n.a==a.a?(n=s,s=s.a,i=i.a):0<G(s.node,i.node)?(n=i,i=i.a):(n=s,s=s.a),(n.b=r)?r.a=n:t.a=n,r=n,o++}for(n=s||i;n;)n.b=r,r=r.a=n,o++,n=n.a;return t.b=r,t.l=o,t}function Z(t,e){var s=new Y(e);s.a=t.a,t.b?t.a.b=s:t.a=t.b=s,t.a=s,t.l++}function tt(t,e){var s=new Y(e);s.b=t.b,t.a?t.b.a=s:t.a=t.b=s,t.b=s,t.l++}function et(t){return(t=t.a)?t.node:null}function st(t){return(t=et(t))?B(t):""}function it(t,e){return new rt(t,!!e)}function rt(t,e){this.f=t,this.b=(this.c=e)?t.b:t.a,this.a=null}function nt(t){var e=t.b;if(null==e)return null;var s=t.a=e;return t.b=t.c?e.b:e.a,s.node}function ot(t){this.i=t,this.b=this.g=!1,this.f=null}function at(t){return"\n "+t.toString().split("\n").join("\n ")}function ct(t,e){t.g=e}function lt(t,e){t.b=e}function ht(t,e){var s=t.a(e);return s instanceof $?+st(s):+s}function dt(t,e){var s=t.a(e);return s instanceof $?st(s):""+s}function ut(t,e){var s=t.a(e);return s instanceof $?!!s.l:!!s}function pt(t,e,s){ot.call(this,t.i),this.c=t,this.h=e,this.o=s,this.g=e.g||s.g,this.b=e.b||s.b,this.c==Et&&(s.b||s.g||4==s.i||0==s.i||!e.f?e.b||e.g||4==e.i||0==e.i||!s.f||(this.f={name:s.f.name,s:e}):this.f={name:e.f.name,s})}function mt(t,e,s,i,r){var n;if(e=e.a(i),s=s.a(i),e instanceof $&&s instanceof $){for(i=nt(e=it(e));i;i=nt(e))for(n=nt(r=it(s));n;n=nt(r))if(t(B(i),B(n)))return!0;return!1}if(e instanceof $||s instanceof $){e instanceof $?(r=e,i=s):(r=s,i=e);for(var o=typeof i,a=nt(n=it(r));a;a=nt(n)){switch(o){case"number":a=+B(a);break;case"boolean":a=!!B(a);break;case"string":a=B(a);break;default:throw Error("Illegal primitive type for comparison.")}if(r==e&&t(a,i)||r==s&&t(i,a))return!0}return!1}return r?"boolean"==typeof e||"boolean"==typeof s?t(!!e,!!s):"number"==typeof e||"number"==typeof s?t(+e,+s):t(e,s):t(+e,+s)}function ft(t,e,s,i){this.a=t,this.w=e,this.i=s,this.m=i}!C&&!x||x&&9<=Number(S)||C&&M("1.9.1"),x&&M("9"),o(pt),pt.prototype.a=function(t){return this.c.m(this.h,this.o,t)},pt.prototype.toString=function(){return"Binary Expression: "+this.c+at(this.h)+at(this.o)},ft.prototype.toString=function(){return this.a};var gt={};function bt(t,e,s,i){if(gt.hasOwnProperty(t))throw Error("Binary operator already created: "+t);return t=new ft(t,e,s,i),gt[t.toString()]=t}bt("div",6,1,(function(t,e,s){return ht(t,s)/ht(e,s)})),bt("mod",6,1,(function(t,e,s){return ht(t,s)%ht(e,s)})),bt("*",6,1,(function(t,e,s){return ht(t,s)*ht(e,s)})),bt("+",5,1,(function(t,e,s){return ht(t,s)+ht(e,s)})),bt("-",5,1,(function(t,e,s){return ht(t,s)-ht(e,s)})),bt("<",4,2,(function(t,e,s){return mt((function(t,e){return t<e}),t,e,s)})),bt(">",4,2,(function(t,e,s){return mt((function(t,e){return t>e}),t,e,s)})),bt("<=",4,2,(function(t,e,s){return mt((function(t,e){return t<=e}),t,e,s)})),bt(">=",4,2,(function(t,e,s){return mt((function(t,e){return t>=e}),t,e,s)}));var Et=bt("=",3,2,(function(t,e,s){return mt((function(t,e){return t==e}),t,e,s,!0)}));function Nt(t,e,s){this.a=t,this.b=e||1,this.f=s||1}function yt(t,e){if(e.a.length&&4!=t.i)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");ot.call(this,t.i),this.c=t,this.h=e,this.g=t.g,this.b=t.b}function xt(t,e){if(e.length<t.A)throw Error("Function "+t.j+" expects at least"+t.A+" arguments, "+e.length+" given");if(null!==t.v&&e.length>t.v)throw Error("Function "+t.j+" expects at most "+t.v+" arguments, "+e.length+" given");t.B&&u(e,(function(e,s){if(4!=e.i)throw Error("Argument "+s+" to function "+t.j+" is not of type Nodeset: "+e)})),ot.call(this,t.i),this.h=t,this.c=e,ct(this,t.g||f(e,(function(t){return t.g}))),lt(this,t.D&&!e.length||t.C&&!!e.length||f(e,(function(t){return t.b})))}function vt(t,e,s,i,r,n,o,a,c){this.j=t,this.i=e,this.g=s,this.D=i,this.C=r,this.m=n,this.A=o,this.v=void 0!==a?a:o,this.B=!!c}bt("!=",3,2,(function(t,e,s){return mt((function(t,e){return t!=e}),t,e,s,!0)})),bt("and",2,2,(function(t,e,s){return ut(t,s)&&ut(e,s)})),bt("or",1,2,(function(t,e,s){return ut(t,s)||ut(e,s)})),o(yt),yt.prototype.a=function(t){return t=this.c.a(t),qt(this.h,t)},yt.prototype.toString=function(){return"Filter:"+at(this.c)+at(this.h)},o(xt),xt.prototype.a=function(t){return this.h.m.apply(null,function(t){return Array.prototype.concat.apply(Array.prototype,arguments)}(t,this.c))},xt.prototype.toString=function(){var t="Function: "+this.h;if(this.c.length){var e=m(this.c,(function(t,e){return t+at(e)}),"Arguments:");t=t+at(e)}return t},vt.prototype.toString=function(){return this.j};var Ct={};function Tt(t,e,s,i,r,n,o,a){if(Ct.hasOwnProperty(t))throw Error("Function already created: "+t+".");Ct[t]=new vt(t,e,s,i,!1,r,n,o,a)}function wt(t,e){switch(this.h=t,this.c=void 0!==e?e:null,this.b=null,t){case"comment":this.b=8;break;case"text":this.b=3;break;case"processing-instruction":this.b=7;break;case"node":break;default:throw Error("Unexpected argument")}}function _t(t){return"comment"==t||"text"==t||"processing-instruction"==t||"node"==t}function kt(t){this.b=t,this.a=0}Tt("boolean",2,!1,!1,(function(t,e){return ut(e,t)}),1),Tt("ceiling",1,!1,!1,(function(t,e){return Math.ceil(ht(e,t))}),1),Tt("concat",3,!1,!1,(function(t,e){return m(function(t,e,s){return 2>=arguments.length?Array.prototype.slice.call(t,e):Array.prototype.slice.call(t,e,s)}(arguments,1),(function(e,s){return e+dt(s,t)}),"")}),2,null),Tt("contains",2,!1,!1,(function(t,e,s){return c(dt(e,t),dt(s,t))}),2),Tt("count",1,!1,!1,(function(t,e){return e.a(t).l}),1,1,!0),Tt("false",2,!1,!1,(function(){return!1}),0),Tt("floor",1,!1,!1,(function(t,e){return Math.floor(ht(e,t))}),1),Tt("id",4,!1,!1,(function(t,e){function i(t){if(R){var e=r.all[t];if(e){if(e.nodeType&&t==e.id)return e;if(e.length)return function(t,e){var i;t:{i=t.length;for(var r=s(t)?t.split(""):t,n=0;n<i;n++)if(n in r&&e.call(void 0,r[n],n,t)){i=n;break t}i=-1}return 0>i?null:s(t)?t.charAt(i):t[i]}(e,(function(e){return t==e.id}))}return null}return r.getElementById(t)}var r=9==(n=t.a).nodeType?n:n.ownerDocument,n=dt(e,t).split(/\s+/),o=[];u(n,(function(t){!(t=i(t))||0<=d(o,t)||o.push(t)})),o.sort(G);var a=new $;return u(o,(function(t){tt(a,t)})),a}),1),Tt("lang",2,!1,!1,(function(){return!1}),1),Tt("last",1,!0,!1,(function(t){if(1!=arguments.length)throw Error("Function last expects ()");return t.f}),0),Tt("local-name",3,!1,!0,(function(t,e){var s=e?et(e.a(t)):t.a;return s?s.localName||s.nodeName.toLowerCase():""}),0,1,!0),Tt("name",3,!1,!0,(function(t,e){var s=e?et(e.a(t)):t.a;return s?s.nodeName.toLowerCase():""}),0,1,!0),Tt("namespace-uri",3,!0,!1,(function(){return""}),0,1,!0),Tt("normalize-space",3,!1,!0,(function(t,e){return(e?dt(e,t):B(t.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")}),0,1),Tt("not",2,!1,!1,(function(t,e){return!ut(e,t)}),1),Tt("number",1,!1,!0,(function(t,e){return e?ht(e,t):+B(t.a)}),0,1),Tt("position",1,!0,!1,(function(t){return t.b}),0),Tt("round",1,!1,!1,(function(t,e){return Math.round(ht(e,t))}),1),Tt("starts-with",2,!1,!1,(function(t,e,s){return e=dt(e,t),t=dt(s,t),0==e.lastIndexOf(t,0)}),2),Tt("string",3,!1,!0,(function(t,e){return e?dt(e,t):B(t.a)}),0,1),Tt("string-length",1,!1,!0,(function(t,e){return(e?dt(e,t):B(t.a)).length}),0,1),Tt("substring",3,!1,!1,(function(t,e,s,i){if(s=ht(s,t),isNaN(s)||1/0==s||-1/0==s)return"";if(i=i?ht(i,t):1/0,isNaN(i)||-1/0===i)return"";s=Math.round(s)-1;var r=Math.max(s,0);return t=dt(e,t),1/0==i?t.substring(r):t.substring(r,s+Math.round(i))}),2,3),Tt("substring-after",3,!1,!1,(function(t,e,s){return e=dt(e,t),t=dt(s,t),-1==(s=e.indexOf(t))?"":e.substring(s+t.length)}),2),Tt("substring-before",3,!1,!1,(function(t,e,s){return e=dt(e,t),t=dt(s,t),-1==(t=e.indexOf(t))?"":e.substring(0,t)}),2),Tt("sum",1,!1,!1,(function(t,e){for(var s=it(e.a(t)),i=0,r=nt(s);r;r=nt(s))i+=+B(r);return i}),1,1,!0),Tt("translate",3,!1,!1,(function(t,e,s,i){e=dt(e,t),s=dt(s,t);var r=dt(i,t);for(t={},i=0;i<s.length;i++){var n=s.charAt(i);n in t||(t[n]=r.charAt(i))}for(s="",i=0;i<e.length;i++)s+=(n=e.charAt(i))in t?t[n]:n;return s}),3),Tt("true",2,!1,!1,(function(){return!0}),0),wt.prototype.a=function(t){return null===this.b||this.b==t.nodeType},wt.prototype.f=function(){return this.h},wt.prototype.toString=function(){var t="Kind Test: "+this.h;return null===this.c||(t+=at(this.c)),t};var At=/\$?(?:(?![0-9-\.])(?:\*|[\w-\.]+):)?(?![0-9-\.])(?:\*|[\w-\.]+)|\/\/|\.\.|::|\d+(?:\.\d*)?|\.\d+|"[^"]*"|'[^']*'|[!<>]=|\s+|./g,Lt=/^\s/;function Mt(t,e){return t.b[t.a+(e||0)]}function It(t){return t.b[t.a++]}function St(t){return t.b.length<=t.a}function Rt(t){ot.call(this,3),this.c=t.substring(1,t.length-1)}function Ot(t,e){var s;this.j=t.toLowerCase(),s="*"==this.j?"*":"http://www.w3.org/1999/xhtml",this.c=e?e.toLowerCase():s}function Dt(t,e){if(ot.call(this,t.i),this.h=t,this.c=e,this.g=t.g,this.b=t.b,1==this.c.length){var s=this.c[0];s.u||s.c!=Vt||"*"!=(s=s.o).f()&&(this.f={name:s.f(),s:null})}}function Pt(){ot.call(this,4)}function Bt(){ot.call(this,4)}function Ft(t){return"/"==t||"//"==t}function jt(t){ot.call(this,4),this.c=t,ct(this,f(this.c,(function(t){return t.g}))),lt(this,f(this.c,(function(t){return t.b})))}function Ut(t,e){this.a=t,this.b=!!e}function qt(t,e,s){for(s=s||0;s<t.a.length;s++)for(var i,r=t.a[s],n=it(e),o=e.l,a=0;i=nt(n);a++){var c=t.b?o-a:a+1;if("number"==typeof(i=r.a(new Nt(i,c,o))))c=c==i;else if("string"==typeof i||"boolean"==typeof i)c=!!i;else{if(!(i instanceof $))throw Error("Predicate.evaluate returned an unexpected type.");c=0<i.l}if(!c){if(i=(c=n).f,!(h=c.a))throw Error("Next must be called at least once before remove.");var l=h.b,h=h.a;l?l.a=h:i.a=h,h?h.b=l:i.b=l,i.l--,c.a=null}}return e}function Ht(t,e,s,i){ot.call(this,4),this.c=t,this.o=e,this.h=s||new Ut([]),this.u=!!i,e=0<(e=this.h).a.length?e.a[0].f:null,t.b&&e&&(t=e.name,t=R?t.toLowerCase():t,this.f={name:t,s:e.s});t:{for(t=this.h,e=0;e<t.a.length;e++)if((s=t.a[e]).g||1==s.i||0==s.i){t=!0;break t}t=!1}this.g=t}function Wt(t,e,s,i){this.j=t,this.f=e,this.a=s,this.b=i}o(Rt),Rt.prototype.a=function(){return this.c},Rt.prototype.toString=function(){return"Literal: "+this.c},Ot.prototype.a=function(t){var e=t.nodeType;return(1==e||2==e)&&(e=void 0!==t.localName?t.localName:t.nodeName,("*"==this.j||this.j==e.toLowerCase())&&("*"==this.c||this.c==(t.namespaceURI?t.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")))},Ot.prototype.f=function(){return this.j},Ot.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.j},o(Dt),o(Pt),Pt.prototype.a=function(t){var e=new $;return 9==(t=t.a).nodeType?tt(e,t):tt(e,t.ownerDocument),e},Pt.prototype.toString=function(){return"Root Helper Expression"},o(Bt),Bt.prototype.a=function(t){var e=new $;return tt(e,t.a),e},Bt.prototype.toString=function(){return"Context Helper Expression"},Dt.prototype.a=function(t){var e=this.h.a(t);if(!(e instanceof $))throw Error("Filter expression must evaluate to nodeset.");for(var s=0,i=(t=this.c).length;s<i&&e.l;s++){var r,n=t[s],o=it(e,n.c.a);if(n.g||n.c!=Kt)if(n.g||n.c!=Yt)for(r=nt(o),e=n.a(new Nt(r));null!=(r=nt(o));)e=Q(e,r=n.a(new Nt(r)));else r=nt(o),e=n.a(new Nt(r));else{for(r=nt(o);(e=nt(o))&&(!r.contains||r.contains(e))&&8&e.compareDocumentPosition(r);r=e);e=n.a(new Nt(r))}}return e},Dt.prototype.toString=function(){var t;if(t="Path Expression:"+at(this.h),this.c.length){var e=m(this.c,(function(t,e){return t+at(e)}),"Steps:");t+=at(e)}return t},o(jt),jt.prototype.a=function(t){var e=new $;return u(this.c,(function(s){if(!((s=s.a(t))instanceof $))throw Error("Path expression must evaluate to NodeSet.");e=Q(e,s)})),e},jt.prototype.toString=function(){return m(this.c,(function(t,e){return t+at(e)}),"Union Expression:")},Ut.prototype.toString=function(){return m(this.a,(function(t,e){return t+at(e)}),"Predicates:")},o(Ht),Ht.prototype.a=function(t){var e=t.a,s=null,i=null,r=null,n=0;if((s=this.f)&&(i=s.name,r=s.s?dt(s.s,t):null,n=1),this.u)if(this.g||this.c!=Gt)if(e=nt(t=it(new Ht(Jt,new wt("node")).a(t))))for(s=this.m(e,i,r,n);null!=(e=nt(t));)s=Q(s,this.m(e,i,r,n));else s=new $;else s=j(this.o,e,i,r),s=qt(this.h,s,n);else s=this.m(t.a,i,r,n);return s},Ht.prototype.m=function(t,e,s,i){return t=this.c.f(this.o,t,e,s),qt(this.h,t,i)},Ht.prototype.toString=function(){var t;if(t="Step:"+at("Operator: "+(this.u?"//":"/")),this.c.j&&(t+=at("Axis: "+this.c)),t+=at(this.o),this.h.a.length){var e=m(this.h.a,(function(t,e){return t+at(e)}),"Predicates:");t+=at(e)}return t},Wt.prototype.toString=function(){return this.j};var zt={};function Xt(t,e,s,i){if(zt.hasOwnProperty(t))throw Error("Axis already created: "+t);return e=new Wt(t,e,s,!!i),zt[t]=e}Xt("ancestor",(function(t,e){for(var s=new $,i=e;i=i.parentNode;)t.a(i)&&Z(s,i);return s}),!0),Xt("ancestor-or-self",(function(t,e){var s=new $,i=e;do{t.a(i)&&Z(s,i)}while(i=i.parentNode);return s}),!0);var Vt=Xt("attribute",(function(t,e){var s=new $;if("style"==(n=t.f())&&R&&e.style)return tt(s,new D(e.style,e,"style",e.style.cssText)),s;var i=e.attributes;if(i)if(t instanceof wt&&null===t.b||"*"==n)for(var r,n=0;r=i[n];n++)R?r.nodeValue&&tt(s,P(e,r)):tt(s,r);else(r=i.getNamedItem(n))&&(R?r.nodeValue&&tt(s,P(e,r)):tt(s,r));return s}),!1),Gt=Xt("child",(function(t,e,i,r,n){return(R?H:W).call(null,t,e,s(i)?i:null,s(r)?r:null,n||new $)}),!1,!0);Xt("descendant",j,!1,!0);var Jt=Xt("descendant-or-self",(function(t,e,s,i){var r=new $;return F(e,s,i)&&t.a(e)&&tt(r,e),j(t,e,s,i,r)}),!1,!0),Kt=Xt("following",(function(t,e,s,i){var r=new $;do{for(var n=e;n=n.nextSibling;)F(n,s,i)&&t.a(n)&&tt(r,n),r=j(t,n,s,i,r)}while(e=e.parentNode);return r}),!1,!0);Xt("following-sibling",(function(t,e){for(var s=new $,i=e;i=i.nextSibling;)t.a(i)&&tt(s,i);return s}),!1),Xt("namespace",(function(){return new $}),!1);var $t=Xt("parent",(function(t,e){var s=new $;if(9==e.nodeType)return s;if(2==e.nodeType)return tt(s,e.ownerElement),s;var i=e.parentNode;return t.a(i)&&tt(s,i),s}),!1),Yt=Xt("preceding",(function(t,e,s,i){var r=new $,n=[];do{n.unshift(e)}while(e=e.parentNode);for(var o=1,a=n.length;o<a;o++){var c=[];for(e=n[o];e=e.previousSibling;)c.unshift(e);for(var l=0,h=c.length;l<h;l++)F(e=c[l],s,i)&&t.a(e)&&tt(r,e),r=j(t,e,s,i,r)}return r}),!0,!0);Xt("preceding-sibling",(function(t,e){for(var s=new $,i=e;i=i.previousSibling;)t.a(i)&&Z(s,i);return s}),!0);var Qt=Xt("self",(function(t,e){var s=new $;return t.a(e)&&tt(s,e),s}),!1);function Zt(t){ot.call(this,1),this.c=t,this.g=t.g,this.b=t.b}function te(t){ot.call(this,1),this.c=t}function ee(t,e){this.a=t,this.b=e}function se(t){for(var e,s=[];;){ie(t,"Missing right hand side of binary expression."),e=he(t);var i=It(t.a);if(!i)break;var r=(i=gt[i]||null)&&i.w;if(!r){t.a.a--;break}for(;s.length&&r<=s[s.length-1].w;)e=new pt(s.pop(),s.pop(),e);s.push(e,i)}for(;s.length;)e=new pt(s.pop(),s.pop(),e);return e}function ie(t,e){if(St(t.a))throw Error(e)}function re(t,e){var s=It(t.a);if(s!=e)throw Error("Bad token, expected: "+e+" got: "+s)}function ne(t){if(")"!=(t=It(t.a)))throw Error("Bad token: "+t)}function oe(t){if(2>(t=It(t.a)).length)throw Error("Unclosed literal string");return new Rt(t)}function ae(t){var e,s,i=[];if(Ft(Mt(t.a))){if(e=It(t.a),s=Mt(t.a),"/"==e&&(St(t.a)||"."!=s&&".."!=s&&"@"!=s&&"*"!=s&&!/(?![0-9])[\w]/.test(s)))return new Pt;s=new Pt,ie(t,"Missing next location step."),e=ce(t,e),i.push(e)}else{t:{switch(s=(e=Mt(t.a)).charAt(0)){case"$":throw Error("Variable reference not allowed in HTML XPath");case"(":It(t.a),e=se(t),ie(t,'unclosed "("'),re(t,")");break;case'"':case"'":e=oe(t);break;default:if(isNaN(+e)){if(_t(e)||!/(?![0-9])[\w]/.test(s)||"("!=Mt(t.a,1)){e=null;break t}for(e=It(t.a),e=Ct[e]||null,It(t.a),s=[];")"!=Mt(t.a)&&(ie(t,"Missing function argument list."),s.push(se(t)),","==Mt(t.a));)It(t.a);ie(t,"Unclosed function argument list."),ne(t),e=new xt(e,s)}else e=new te(+It(t.a))}"["==Mt(t.a)&&(e=new yt(e,s=new Ut(le(t))))}if(e){if(!Ft(Mt(t.a)))return e;s=e}else e=ce(t,"/"),s=new Bt,i.push(e)}for(;Ft(Mt(t.a));)e=It(t.a),ie(t,"Missing next location step."),e=ce(t,e),i.push(e);return new Dt(s,i)}function ce(t,e){var s,i,r,n;if("/"!=e&&"//"!=e)throw Error('Step op should be "/" or "//"');if("."==Mt(t.a))return i=new Ht(Qt,new wt("node")),It(t.a),i;if(".."==Mt(t.a))return i=new Ht($t,new wt("node")),It(t.a),i;if("@"==Mt(t.a))n=Vt,It(t.a),ie(t,"Missing attribute name");else if("::"==Mt(t.a,1)){if(!/(?![0-9])[\w]/.test(Mt(t.a).charAt(0)))throw Error("Bad token: "+It(t.a));if(s=It(t.a),!(n=zt[s]||null))throw Error("No axis with name: "+s);It(t.a),ie(t,"Missing node name")}else n=Gt;if(s=Mt(t.a),!/(?![0-9])[\w\*]/.test(s.charAt(0)))throw Error("Bad token: "+It(t.a));if("("==Mt(t.a,1)){if(!_t(s))throw Error("Invalid node type: "+s);if(!_t(s=It(t.a)))throw Error("Invalid type name: "+s);re(t,"("),ie(t,"Bad nodetype");var o=null;'"'!=(r=Mt(t.a).charAt(0))&&"'"!=r||(o=oe(t)),ie(t,"Bad nodetype"),ne(t),s=new wt(s,o)}else if(-1==(r=(s=It(t.a)).indexOf(":")))s=new Ot(s);else{var a;if("*"==(o=s.substring(0,r)))a="*";else if(!(a=t.b(o)))throw Error("Namespace prefix not declared: "+o);s=new Ot(s=s.substr(r+1),a)}return r=new Ut(le(t),n.a),i||new Ht(n,s,r,"//"==e)}function le(t){for(var e=[];"["==Mt(t.a);){It(t.a),ie(t,"Missing predicate expression.");var s=se(t);e.push(s),ie(t,"Unclosed predicate expression."),re(t,"]")}return e}function he(t){if("-"==Mt(t.a))return It(t.a),new Zt(he(t));var e=ae(t);if("|"!=Mt(t.a))t=e;else{for(e=[e];"|"==It(t.a);)ie(t,"Missing next union location path."),e.push(ae(t));t.a.a--,t=new jt(e)}return t}function de(t){switch(t.nodeType){case 1:return function(t,e){var s=Array.prototype.slice.call(arguments,1);return function(){var e=s.slice();return e.push.apply(e,arguments),t.apply(this,e)}}(pe,t);case 9:return de(t.documentElement);case 11:case 10:case 6:case 12:return ue;default:return t.parentNode?de(t.parentNode):ue}}function ue(){return null}function pe(t,e){if(t.prefix==e)return t.namespaceURI||"http://www.w3.org/1999/xhtml";var s=t.getAttributeNode("xmlns:"+e);return s&&s.specified?s.value||null:t.parentNode&&9!=t.parentNode.nodeType?pe(t.parentNode,e):null}function me(t,e){if(!t.length)throw Error("Empty XPath expression.");var s=function(t){t=t.match(At);for(var e=0;e<t.length;e++)Lt.test(t[e])&&t.splice(e,1);return new kt(t)}(t);if(St(s))throw Error("Invalid XPath expression.");e?"function"==function(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var s=Object.prototype.toString.call(t);if("[object Window]"==s)return"object";if("[object Array]"==s||"number"==typeof t.length&&void 0!==t.splice&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==s||void 0!==t.call&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&void 0===t.call)return"object";return e}(e)||(e=n(e.lookupNamespaceURI,e)):e=function(){return null};var i=se(new ee(s,e));if(!St(s))throw Error("Bad token: "+It(s));this.evaluate=function(t,e){return new fe(i.a(new Nt(t)),e)}}function fe(t,e){if(0==e)if(t instanceof $)e=4;else if("string"==typeof t)e=2;else if("number"==typeof t)e=1;else{if("boolean"!=typeof t)throw Error("Unexpected evaluation result.");e=3}if(2!=e&&1!=e&&3!=e&&!(t instanceof $))throw Error("value could not be converted to the specified type");var s;switch(this.resultType=e,e){case 2:this.stringValue=t instanceof $?st(t):""+t;break;case 1:this.numberValue=t instanceof $?+st(t):+t;break;case 3:this.booleanValue=t instanceof $?0<t.l:!!t;break;case 4:case 5:case 6:case 7:var i=it(t);s=[];for(var r=nt(i);r;r=nt(i))s.push(r instanceof D?r.a:r);this.snapshotLength=t.l,this.invalidIteratorState=!1;break;case 8:case 9:i=et(t),this.singleNodeValue=i instanceof D?i.a:i;break;default:throw Error("Unknown XPathResult type.")}var n=0;this.iterateNext=function(){if(4!=e&&5!=e)throw Error("iterateNext called with wrong result type");return n>=s.length?null:s[n++]},this.snapshotItem=function(t){if(6!=e&&7!=e)throw Error("snapshotItem called with wrong result type");return t>=s.length||0>t?null:s[t]}}function ge(t){this.lookupNamespaceURI=de(t)}function be(t,s){var i=t||e,r=i.Document&&i.Document.prototype||i.document;r.evaluate&&!s||(i.XPathResult=fe,r.evaluate=function(t,e,s,i){return new me(t,s).evaluate(e,i)},r.createExpression=function(t,e){return new me(t,e)},r.createNSResolver=function(t){return new ge(t)})}o(Zt),Zt.prototype.a=function(t){return-ht(this.c,t)},Zt.prototype.toString=function(){return"Unary Expression: -"+at(this.c)},o(te),te.prototype.a=function(){return this.c},te.prototype.toString=function(){return"Number: "+this.c},fe.ANY_TYPE=0,fe.NUMBER_TYPE=1,fe.STRING_TYPE=2,fe.BOOLEAN_TYPE=3,fe.UNORDERED_NODE_ITERATOR_TYPE=4,fe.ORDERED_NODE_ITERATOR_TYPE=5,fe.UNORDERED_NODE_SNAPSHOT_TYPE=6,fe.ORDERED_NODE_SNAPSHOT_TYPE=7,fe.ANY_UNORDERED_NODE_TYPE=8,fe.FIRST_ORDERED_NODE_TYPE=9;var Ee,Ne=["wgxpath","install"],ye=e;Ne[0]in ye||!ye.execScript||ye.execScript("var "+Ne[0]);for(;Ne.length&&(Ee=Ne.shift());)Ne.length||void 0===be?ye=ye[Ee]?ye[Ee]:ye[Ee]={}:ye[Ee]=be;t.exports.install=be,t.exports.XPathResultType={ANY_TYPE:0,NUMBER_TYPE:1,STRING_TYPE:2,BOOLEAN_TYPE:3,UNORDERED_NODE_ITERATOR_TYPE:4,ORDERED_NODE_ITERATOR_TYPE:5,UNORDERED_NODE_SNAPSHOT_TYPE:6,ORDERED_NODE_SNAPSHOT_TYPE:7,ANY_UNORDERED_NODE_TYPE:8,FIRST_ORDERED_NODE_TYPE:9}}).call(s.g)}},__webpack_module_cache__={},leafPrototypes,getProto;function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var s=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](s,s.exports,__webpack_require__),s.exports}getProto=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,__webpack_require__.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var s=Object.create(null);__webpack_require__.r(s);var i={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var r=2&e&&t;"object"==typeof r&&!~leafPrototypes.indexOf(r);r=getProto(r))Object.getOwnPropertyNames(r).forEach((e=>i[e]=()=>t[e]));return i.default=()=>t,__webpack_require__.d(s,i),s},__webpack_require__.d=(t,e)=>{for(var s in e)__webpack_require__.o(e,s)&&!__webpack_require__.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};(()=>{"use strict";var t={};__webpack_require__.r(t),__webpack_require__.d(t,{GLOBAL:()=>ii,MathJax:()=>ci,combineConfig:()=>ni,combineDefaults:()=>oi,combineWithMathJax:()=>ai,isObject:()=>ri});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{context:()=>hi,hasWindow:()=>li});var s={};__webpack_require__.r(s),__webpack_require__.d(s,{Package:()=>ui,PackageError:()=>di});var i={};__webpack_require__.r(i),__webpack_require__.d(i,{PrioritizedList:()=>pi});var r={};__webpack_require__.r(r),__webpack_require__.d(r,{FunctionList:()=>mi});var n={};__webpack_require__.r(n),__webpack_require__.d(n,{CONFIG:()=>xi,Loader:()=>Ni,MathJax:()=>yi,PathFilters:()=>bi});var o={};__webpack_require__.r(o),__webpack_require__.d(o,{APPEND:()=>Ti,Expandable:()=>ki,OPTIONS:()=>_i,REMOVE:()=>wi,copy:()=>Ii,defaultOptions:()=>Ri,expandable:()=>Ai,insert:()=>Si,isObject:()=>Ci,keys:()=>Mi,lookup:()=>Fi,makeArray:()=>Li,selectOptions:()=>Di,selectOptionsFromKeys:()=>Pi,separateOptions:()=>Bi,userOptions:()=>Oi});var a={};__webpack_require__.r(a),__webpack_require__.d(a,{CONFIG:()=>Hi,MathJax:()=>qi,Startup:()=>Ui});var c={};__webpack_require__.r(c),__webpack_require__.d(c,{AbstractDOMAdaptor:()=>zi});var l={};__webpack_require__.r(l),__webpack_require__.d(l,{HTMLAdaptor:()=>Vi});var h={};__webpack_require__.r(h),__webpack_require__.d(h,{browserAdaptor:()=>Ji});var d={};__webpack_require__.r(d),__webpack_require__.d(d,{AbstractFindMath:()=>Ki});var u={};__webpack_require__.r(u),__webpack_require__.d(u,{AbstractInputJax:()=>$i});var p={};__webpack_require__.r(p),__webpack_require__.d(p,{AbstractOutputJax:()=>Yi});var m={};__webpack_require__.r(m),__webpack_require__.d(m,{END:()=>Qi,LinkedList:()=>tr,ListItem:()=>Zi});var f={};__webpack_require__.r(f),__webpack_require__.d(f,{AbstractMathList:()=>er});var g={};__webpack_require__.r(g),__webpack_require__.d(g,{AbstractMathItem:()=>ir,STATE:()=>rr,newState:()=>nr,protoItem:()=>sr});var b={};__webpack_require__.r(b),__webpack_require__.d(b,{AbstractFactory:()=>or});var E={};__webpack_require__.r(E),__webpack_require__.d(E,{AbstractNodeFactory:()=>ar});var N={};__webpack_require__.r(N),__webpack_require__.d(N,{Attributes:()=>lr,INHERIT:()=>cr});var y={};__webpack_require__.r(y),__webpack_require__.d(y,{AbstractEmptyNode:()=>dr,AbstractNode:()=>hr});var x={};__webpack_require__.r(x),__webpack_require__.d(x,{AbstractMmlBaseNode:()=>xr,AbstractMmlEmptyNode:()=>vr,AbstractMmlLayoutNode:()=>yr,AbstractMmlNode:()=>Er,AbstractMmlTokenNode:()=>Nr,MATHVARIANTS:()=>gr,TEXCLASS:()=>ur,TEXCLASSNAMES:()=>pr,TextNode:()=>Cr,XMLNode:()=>Tr,indentAttributes:()=>br});var v={};__webpack_require__.r(v),__webpack_require__.d(v,{MmlMath:()=>wr});var C={};__webpack_require__.r(C),__webpack_require__.d(C,{MmlMi:()=>_r});var T={};__webpack_require__.r(T),__webpack_require__.d(T,{MmlMn:()=>kr});var w={};__webpack_require__.r(w),__webpack_require__.d(w,{MMLSPACING:()=>Sr,MO:()=>Lr,OPDEF:()=>Ar,OPTABLE:()=>Rr,RANGES:()=>Mr,getRange:()=>Ir});var _={};__webpack_require__.r(_),__webpack_require__.d(_,{isPercent:()=>Fr,quotePattern:()=>Dr,replaceUnicode:()=>Ur,sortLength:()=>Or,split:()=>jr,toEntity:()=>qr,unicodeChars:()=>Pr,unicodeString:()=>Br});var k={};__webpack_require__.r(k),__webpack_require__.d(k,{MmlMo:()=>Hr});var A={};__webpack_require__.r(A),__webpack_require__.d(A,{MmlMtext:()=>Wr});var L={};__webpack_require__.r(L),__webpack_require__.d(L,{MmlMspace:()=>zr});var M={};__webpack_require__.r(M),__webpack_require__.d(M,{MmlMs:()=>Xr});var I={};__webpack_require__.r(I),__webpack_require__.d(I,{MmlInferredMrow:()=>Gr,MmlMrow:()=>Vr});var S={};__webpack_require__.r(S),__webpack_require__.d(S,{MmlMfrac:()=>Jr});var R={};__webpack_require__.r(R),__webpack_require__.d(R,{MmlMsqrt:()=>Kr});var O={};__webpack_require__.r(O),__webpack_require__.d(O,{MmlMroot:()=>$r});var D={};__webpack_require__.r(D),__webpack_require__.d(D,{MmlMstyle:()=>Yr});var P={};__webpack_require__.r(P),__webpack_require__.d(P,{MmlMerror:()=>Qr});var B={};__webpack_require__.r(B),__webpack_require__.d(B,{MmlMpadded:()=>Zr});var F={};__webpack_require__.r(F),__webpack_require__.d(F,{MmlMphantom:()=>tn});var j={};__webpack_require__.r(j),__webpack_require__.d(j,{MmlMfenced:()=>en});var U={};__webpack_require__.r(U),__webpack_require__.d(U,{MmlMenclose:()=>sn});var q={};__webpack_require__.r(q),__webpack_require__.d(q,{MmlMaction:()=>rn});var H={};__webpack_require__.r(H),__webpack_require__.d(H,{MmlMsub:()=>on,MmlMsubsup:()=>nn,MmlMsup:()=>an});var W={};__webpack_require__.r(W),__webpack_require__.d(W,{MmlMover:()=>hn,MmlMunder:()=>ln,MmlMunderover:()=>cn});var z={};__webpack_require__.r(z),__webpack_require__.d(z,{MmlMmultiscripts:()=>dn,MmlMprescripts:()=>un,MmlNone:()=>pn});var X={};__webpack_require__.r(X),__webpack_require__.d(X,{MmlMtable:()=>mn});var V={};__webpack_require__.r(V),__webpack_require__.d(V,{MmlMlabeledtr:()=>gn,MmlMtr:()=>fn});var G={};__webpack_require__.r(G),__webpack_require__.d(G,{MmlMtd:()=>bn});var J={};__webpack_require__.r(J),__webpack_require__.d(J,{MmlMaligngroup:()=>En});var K={};__webpack_require__.r(K),__webpack_require__.d(K,{MmlMalignmark:()=>Nn});var $={};__webpack_require__.r($),__webpack_require__.d($,{MmlMglyph:()=>yn});var Y={};__webpack_require__.r(Y),__webpack_require__.d(Y,{MmlAnnotation:()=>Cn,MmlAnnotationXML:()=>vn,MmlSemantics:()=>xn});var Q={};__webpack_require__.r(Q),__webpack_require__.d(Q,{TeXAtom:()=>Tn});var Z={};__webpack_require__.r(Z),__webpack_require__.d(Z,{MathChoice:()=>wn});var tt={};__webpack_require__.r(tt),__webpack_require__.d(tt,{HtmlNode:()=>_n});var et={};__webpack_require__.r(et),__webpack_require__.d(et,{MML:()=>kn});var st={};__webpack_require__.r(st),__webpack_require__.d(st,{MmlFactory:()=>An});var it={};__webpack_require__.r(it),__webpack_require__.d(it,{BitField:()=>Ln,BitFieldClass:()=>Mn});var rt={};__webpack_require__.r(rt),__webpack_require__.d(rt,{handleRetriesFor:()=>In,retryAfter:()=>Sn});var nt={};__webpack_require__.r(nt),__webpack_require__.d(nt,{AbstractMathDocument:()=>Un,RenderList:()=>On,resetAllOptions:()=>Pn,resetOptions:()=>Dn});var ot={};__webpack_require__.r(ot),__webpack_require__.d(ot,{AbstractHandler:()=>Hn});var at={};__webpack_require__.r(at),__webpack_require__.d(at,{HandlerList:()=>Wn});var ct={};__webpack_require__.r(ct),__webpack_require__.d(ct,{AbstractVisitor:()=>zn});var lt={};__webpack_require__.r(lt),__webpack_require__.d(lt,{DATAMJX:()=>Xn,MmlVisitor:()=>Vn});var ht={};__webpack_require__.r(ht),__webpack_require__.d(ht,{MathMLVisitor:()=>Gn});var dt={};__webpack_require__.r(dt),__webpack_require__.d(dt,{SerializedMmlVisitor:()=>Jn});var ut={};__webpack_require__.r(ut),__webpack_require__.d(ut,{AbstractWrapper:()=>Kn});var pt={};__webpack_require__.r(pt),__webpack_require__.d(pt,{AbstractWrapperFactory:()=>$n});var mt={};__webpack_require__.r(mt),__webpack_require__.d(mt,{mathjax:()=>Yn});var ft={};__webpack_require__.r(ft),__webpack_require__.d(ft,{HTMLMathItem:()=>Qn});var gt={};__webpack_require__.r(gt),__webpack_require__.d(gt,{HTMLMathList:()=>Zn});var bt={};__webpack_require__.r(bt),__webpack_require__.d(bt,{HTMLDomStrings:()=>to});var Et={};__webpack_require__.r(Et),__webpack_require__.d(Et,{HTMLDocument:()=>eo});var Nt={};__webpack_require__.r(Nt),__webpack_require__.d(Nt,{HTMLHandler:()=>so});var yt={};__webpack_require__.r(yt),__webpack_require__.d(yt,{RegisterHTMLHandler:()=>io});var xt={};__webpack_require__.r(xt),__webpack_require__.d(xt,{asyncLoad:()=>ro});var vt={};__webpack_require__.r(vt),__webpack_require__.d(vt,{BIGDIMEN:()=>no,MATHSPACE:()=>co,RELUNITS:()=>ao,UNITS:()=>oo,em:()=>uo,length2em:()=>lo,percent:()=>ho,px:()=>po});var Ct={};__webpack_require__.r(Ct),__webpack_require__.d(Ct,{BBox:()=>mo});var Tt={};__webpack_require__.r(Tt),__webpack_require__.d(Tt,{add:()=>Eo,entities:()=>go,numeric:()=>vo,options:()=>fo,remove:()=>No,translate:()=>yo});var wt={};__webpack_require__.r(wt),__webpack_require__.d(wt,{StyleJsonSheet:()=>Co});var _t={};__webpack_require__.r(_t),__webpack_require__.d(_t,{Styles:()=>Oo,TRBL:()=>To,WSC:()=>wo});var kt={};__webpack_require__.r(kt),__webpack_require__.d(kt,{max:()=>Po,sum:()=>Do});var At={};__webpack_require__.r(At),__webpack_require__.d(At,{FindTeX:()=>Bo});var Lt={};__webpack_require__.r(Lt),__webpack_require__.d(Lt,{default:()=>jo});var Mt={};__webpack_require__.r(Mt),__webpack_require__.d(Mt,{default:()=>Xo});var It={};__webpack_require__.r(It),__webpack_require__.d(It,{ConfigurationType:()=>Vo,HandlerType:()=>Go});var St={};__webpack_require__.r(St),__webpack_require__.d(St,{UnitUtil:()=>Ko});var Rt={};__webpack_require__.r(Rt),__webpack_require__.d(Rt,{default:()=>$o});var Ot={};__webpack_require__.r(Ot),__webpack_require__.d(Ot,{default:()=>Qo});var Dt={};__webpack_require__.r(Dt),__webpack_require__.d(Dt,{BaseItem:()=>ta,MmlStack:()=>Zo});var Pt={};__webpack_require__.r(Pt),__webpack_require__.d(Pt,{TexConstant:()=>ea});var Bt={};__webpack_require__.r(Bt),__webpack_require__.d(Bt,{default:()=>sa});var Ft={};__webpack_require__.r(Ft),__webpack_require__.d(Ft,{default:()=>na});var jt={};__webpack_require__.r(jt),__webpack_require__.d(jt,{NodeFactory:()=>oa});var Ut={};__webpack_require__.r(Ut),__webpack_require__.d(Ut,{KeyValueDef:()=>aa,KeyValueTypes:()=>ca,ParseUtil:()=>da});var qt={};__webpack_require__.r(qt),__webpack_require__.d(qt,{ColumnParser:()=>ua});var Ht={};__webpack_require__.r(Ht),__webpack_require__.d(Ht,{default:()=>fa});var Wt={};__webpack_require__.r(Wt),__webpack_require__.d(Wt,{AbstractTags:()=>Ea,AllTags:()=>ya,Label:()=>ga,NoTags:()=>Na,TagInfo:()=>ba,TagsFactory:()=>Ca});var zt={};__webpack_require__.r(zt),__webpack_require__.d(zt,{Macro:()=>wa,Token:()=>Ta});var Xt={};__webpack_require__.r(Xt),__webpack_require__.d(Xt,{AbstractParseMap:()=>La,AbstractTokenMap:()=>ka,CharacterMap:()=>Ma,CommandMap:()=>Ra,DelimiterMap:()=>Ia,EnvironmentMap:()=>Oa,MacroMap:()=>Sa,RegExpMap:()=>Aa,parseResult:()=>_a});var Vt={};__webpack_require__.r(Vt),__webpack_require__.d(Vt,{MapHandler:()=>Pa,SubHandler:()=>Ba,SubHandlers:()=>Fa});var Gt={};__webpack_require__.r(Gt),__webpack_require__.d(Gt,{Configuration:()=>ja,ConfigurationHandler:()=>qa,ParserConfiguration:()=>Ha});var Jt={};__webpack_require__.r(Jt),__webpack_require__.d(Jt,{ArrayItem:()=>dc,BeginItem:()=>ec,BreakItem:()=>tc,CellItem:()=>nc,CloseItem:()=>Va,DotsItem:()=>hc,EndItem:()=>sc,EqnArrayItem:()=>uc,EquationItem:()=>mc,FnItem:()=>ac,LeftItem:()=>Ya,Middle:()=>Qa,MmlItem:()=>oc,MstyleItem:()=>pc,NonscriptItem:()=>lc,NotItem:()=>cc,NullItem:()=>Ga,OpenItem:()=>Xa,OverItem:()=>$a,PositionItem:()=>rc,PrimeItem:()=>Ja,RightItem:()=>Za,StartItem:()=>Wa,StopItem:()=>za,StyleItem:()=>ic,SubsupItem:()=>Ka});var Kt={};__webpack_require__.r(Kt),__webpack_require__.d(Kt,{default:()=>xc,splitAlignArray:()=>Ec});var $t={};__webpack_require__.r($t),__webpack_require__.d($t,{default:()=>Tc});var Yt={};__webpack_require__.r(Yt),__webpack_require__.d(Yt,{BaseConfiguration:()=>Mc,BaseTags:()=>Lc,Other:()=>Ac});var Qt={};__webpack_require__.r(Qt),__webpack_require__.d(Qt,{TeX:()=>Ic});var Zt={};__webpack_require__.r(Zt),__webpack_require__.d(Zt,{FlalignItem:()=>Rc,MultlineItem:()=>Sc});var te={};__webpack_require__.r(te),__webpack_require__.d(te,{NewcommandPriority:()=>Dc,NewcommandTables:()=>Oc,NewcommandUtil:()=>Pc});var ee={};__webpack_require__.r(ee),__webpack_require__.d(ee,{AmsMethods:()=>jc});var se={};__webpack_require__.r(se),__webpack_require__.d(se,{BeginEnvItem:()=>Uc});var ie={};__webpack_require__.r(ie),__webpack_require__.d(ie,{default:()=>Hc});var re={};__webpack_require__.r(re),__webpack_require__.d(re,{NewcommandConfig:()=>Wc,NewcommandConfiguration:()=>zc});var ne={};__webpack_require__.r(ne),__webpack_require__.d(ne,{AmsConfiguration:()=>Vc,AmsTags:()=>Xc});var oe={};__webpack_require__.r(oe),__webpack_require__.d(oe,{RequireConfiguration:()=>Zc,RequireLoad:()=>$c,RequireMethods:()=>Yc,options:()=>Qc});var ae={};__webpack_require__.r(ae),__webpack_require__.d(ae,{AutoloadConfiguration:()=>il});var ce={};__webpack_require__.r(ce),__webpack_require__.d(ce,{ConfigMacrosConfiguration:()=>cl});var le={};__webpack_require__.r(le),__webpack_require__.d(le,{NoUndefinedConfiguration:()=>ll});var he={};__webpack_require__.r(he),__webpack_require__.d(he,{TextParser:()=>hl});var de={};__webpack_require__.r(de),__webpack_require__.d(de,{TextMacrosMethods:()=>dl});var ue={};__webpack_require__.r(ue),__webpack_require__.d(ue,{TextBaseConfiguration:()=>pl,TextMacrosConfiguration:()=>fl});var pe={};__webpack_require__.r(pe),__webpack_require__.d(pe,{FindMathML:()=>bl});var me={};__webpack_require__.r(me),__webpack_require__.d(me,{MathMLCompile:()=>El});var fe={};__webpack_require__.r(fe),__webpack_require__.d(fe,{MathML:()=>Nl});var ge={};__webpack_require__.r(ge),__webpack_require__.d(ge,{DIRECTION:()=>yl,H:()=>vl,V:()=>xl});var be={};__webpack_require__.r(be),__webpack_require__.d(be,{DIRECTION:()=>yl,FontData:()=>_l,NOSTRETCH:()=>Tl,mergeOptions:()=>wl});var Ee={};__webpack_require__.r(Ee),__webpack_require__.d(Ee,{LineBBox:()=>kl});var Ne={};__webpack_require__.r(Ne),__webpack_require__.d(Ne,{LinebreakVisitor:()=>Ml,Linebreaks:()=>Ll,NOBREAK:()=>Al});var ye={};__webpack_require__.r(ye),__webpack_require__.d(ye,{CommonOutputJax:()=>Sl,FONTPATH:()=>Il});var xe={};__webpack_require__.r(xe),__webpack_require__.d(xe,{CommonWrapperFactory:()=>Rl});var ve={};__webpack_require__.r(ve),__webpack_require__.d(ve,{CommonWrapper:()=>Fl,SPACE:()=>Bl});var Ce={};__webpack_require__.r(Ce),__webpack_require__.d(Ce,{ChtmlWrapper:()=>Ul,FONTSIZE:()=>jl});var Te={};__webpack_require__.r(Te),__webpack_require__.d(Te,{CommonMathMixin:()=>ql});var we={};__webpack_require__.r(we),__webpack_require__.d(we,{ChtmlMath:()=>Hl});var _e={};__webpack_require__.r(_e),__webpack_require__.d(_e,{CommonMiMixin:()=>Wl});var ke={};__webpack_require__.r(ke),__webpack_require__.d(ke,{ChtmlMi:()=>zl});var Ae={};__webpack_require__.r(Ae),__webpack_require__.d(Ae,{CommonMoMixin:()=>Xl});var Le={};__webpack_require__.r(Le),__webpack_require__.d(Le,{Usage:()=>Vl});var Me={};__webpack_require__.r(Me),__webpack_require__.d(Me,{AddCSS:()=>Jl,ChtmlFontData:()=>Gl,DIRECTION:()=>yl,FontData:()=>_l,NOSTRETCH:()=>Tl,mergeOptions:()=>wl});var Ie={};__webpack_require__.r(Ie),__webpack_require__.d(Ie,{ChtmlMo:()=>Kl});var Se={};__webpack_require__.r(Se),__webpack_require__.d(Se,{CommonMnMixin:()=>$l});var Re={};__webpack_require__.r(Re),__webpack_require__.d(Re,{ChtmlMn:()=>Yl});var Oe={};__webpack_require__.r(Oe),__webpack_require__.d(Oe,{CommonMsMixin:()=>Ql});var De={};__webpack_require__.r(De),__webpack_require__.d(De,{ChtmlMs:()=>Zl});var Pe={};__webpack_require__.r(Pe),__webpack_require__.d(Pe,{CommonMtextMixin:()=>th});var Be={};__webpack_require__.r(Be),__webpack_require__.d(Be,{ChtmlMtext:()=>eh});var Fe={};__webpack_require__.r(Fe),__webpack_require__.d(Fe,{CommonMspaceMixin:()=>sh});var je={};__webpack_require__.r(je),__webpack_require__.d(je,{ChtmlMspace:()=>ih});var Ue={};__webpack_require__.r(Ue),__webpack_require__.d(Ue,{CommonMpaddedMixin:()=>rh});var qe={};__webpack_require__.r(qe),__webpack_require__.d(qe,{ChtmlMpadded:()=>nh});var He={};__webpack_require__.r(He),__webpack_require__.d(He,{ARROWDX:()=>ah,ARROWX:()=>oh,ARROWY:()=>ch,CommonArrow:()=>kh,CommonBorder:()=>Ch,CommonBorder2:()=>Th,CommonDiagonalArrow:()=>_h,CommonDiagonalStrike:()=>wh,PADDING:()=>hh,SOLID:()=>dh,THICKNESS:()=>lh,arrowBBox:()=>vh,arrowBBoxHD:()=>Eh,arrowBBoxW:()=>Nh,arrowDef:()=>yh,arrowHead:()=>bh,diagonalArrowDef:()=>xh,fullBBox:()=>mh,fullBorder:()=>gh,fullPadding:()=>fh,sideIndex:()=>uh,sideNames:()=>ph});var We={};__webpack_require__.r(We),__webpack_require__.d(We,{CommonMencloseMixin:()=>Ah});var ze={};__webpack_require__.r(ze),__webpack_require__.d(ze,{ARROWDX:()=>ah,ARROWX:()=>oh,ARROWY:()=>ch,Arrow:()=>Oh,Border:()=>Mh,Border2:()=>Ih,CommonArrow:()=>kh,CommonBorder:()=>Ch,CommonBorder2:()=>Th,CommonDiagonalArrow:()=>_h,CommonDiagonalStrike:()=>wh,DiagonalArrow:()=>Rh,DiagonalStrike:()=>Sh,PADDING:()=>hh,RenderElement:()=>Lh,SOLID:()=>dh,THICKNESS:()=>lh,arrowBBox:()=>vh,arrowBBoxHD:()=>Eh,arrowBBoxW:()=>Nh,arrowDef:()=>yh,arrowHead:()=>bh,diagonalArrowDef:()=>xh,fullBBox:()=>mh,fullBorder:()=>gh,fullPadding:()=>fh,sideIndex:()=>uh,sideNames:()=>ph});var Xe={};__webpack_require__.r(Xe),__webpack_require__.d(Xe,{ChtmlMenclose:()=>Bh});var Ve={};__webpack_require__.r(Ve),__webpack_require__.d(Ve,{CommonInferredMrowMixin:()=>jh,CommonMrowMixin:()=>Fh});var Ge={};__webpack_require__.r(Ge),__webpack_require__.d(Ge,{ChtmlInferredMrow:()=>qh,ChtmlMrow:()=>Uh});var Je={};__webpack_require__.r(Je),__webpack_require__.d(Je,{CommonMfencedMixin:()=>Hh});var Ke={};__webpack_require__.r(Ke),__webpack_require__.d(Ke,{ChtmlMfenced:()=>Wh});var $e={};__webpack_require__.r($e),__webpack_require__.d($e,{CommonMfracMixin:()=>zh});var Ye={};__webpack_require__.r(Ye),__webpack_require__.d(Ye,{ChtmlMfrac:()=>Xh});var Qe={};__webpack_require__.r(Qe),__webpack_require__.d(Qe,{CommonMsqrtMixin:()=>Vh});var Ze={};__webpack_require__.r(Ze),__webpack_require__.d(Ze,{ChtmlMsqrt:()=>Gh});var ts={};__webpack_require__.r(ts),__webpack_require__.d(ts,{CommonMrootMixin:()=>Jh});var es={};__webpack_require__.r(es),__webpack_require__.d(es,{ChtmlMroot:()=>Kh});var ss={};__webpack_require__.r(ss),__webpack_require__.d(ss,{CommonMsubMixin:()=>$h,CommonMsubsupMixin:()=>Qh,CommonMsupMixin:()=>Yh});var is={};__webpack_require__.r(is),__webpack_require__.d(is,{CommonScriptbaseMixin:()=>Zh});var rs={};__webpack_require__.r(rs),__webpack_require__.d(rs,{ChtmlScriptbase:()=>td});var ns={};__webpack_require__.r(ns),__webpack_require__.d(ns,{ChtmlMsub:()=>ed,ChtmlMsubsup:()=>id,ChtmlMsup:()=>sd});var os={};__webpack_require__.r(os),__webpack_require__.d(os,{CommonMoverMixin:()=>nd,CommonMunderMixin:()=>rd,CommonMunderoverMixin:()=>od});var as={};__webpack_require__.r(as),__webpack_require__.d(as,{ChtmlMover:()=>cd,ChtmlMunder:()=>ad,ChtmlMunderover:()=>ld});var cs={};__webpack_require__.r(cs),__webpack_require__.d(cs,{CommonMmultiscriptsMixin:()=>ud,NextScript:()=>hd,ScriptNames:()=>dd});var ls={};__webpack_require__.r(ls),__webpack_require__.d(ls,{ChtmlMmultiscripts:()=>pd});var hs={};__webpack_require__.r(hs),__webpack_require__.d(hs,{BREAK_BELOW:()=>md,CommonMtableMixin:()=>fd});var ds={};__webpack_require__.r(ds),__webpack_require__.d(ds,{ChtmlMtable:()=>gd});var us={};__webpack_require__.r(us),__webpack_require__.d(us,{CommonMlabeledtrMixin:()=>Ed,CommonMtrMixin:()=>bd});var ps={};__webpack_require__.r(ps),__webpack_require__.d(ps,{ChtmlMlabeledtr:()=>yd,ChtmlMtr:()=>Nd});var ms={};__webpack_require__.r(ms),__webpack_require__.d(ms,{CommonMtdMixin:()=>xd});var fs={};__webpack_require__.r(fs),__webpack_require__.d(fs,{ChtmlMtd:()=>vd});var gs={};__webpack_require__.r(gs),__webpack_require__.d(gs,{CommonMactionMixin:()=>Td,TooltipData:()=>Cd});var bs={};__webpack_require__.r(bs),__webpack_require__.d(bs,{ChtmlMaction:()=>wd});var Es={};__webpack_require__.r(Es),__webpack_require__.d(Es,{CommonMglyphMixin:()=>_d});var Ns={};__webpack_require__.r(Ns),__webpack_require__.d(Ns,{ChtmlMglyph:()=>kd});var ys={};__webpack_require__.r(ys),__webpack_require__.d(ys,{CommonSemanticsMixin:()=>Ad});var xs={};__webpack_require__.r(xs),__webpack_require__.d(xs,{CommonXmlNodeMixin:()=>Ld});var vs={};__webpack_require__.r(vs),__webpack_require__.d(vs,{ChtmlAnnotation:()=>Id,ChtmlAnnotationXML:()=>Rd,ChtmlSemantics:()=>Md,ChtmlXmlNode:()=>Od});var Cs={};__webpack_require__.r(Cs),__webpack_require__.d(Cs,{CommonTeXAtomMixin:()=>Dd});var Ts={};__webpack_require__.r(Ts),__webpack_require__.d(Ts,{ChtmlTeXAtom:()=>Pd});var ws={};__webpack_require__.r(ws),__webpack_require__.d(ws,{CommonTextNodeMixin:()=>Bd});var _s={};__webpack_require__.r(_s),__webpack_require__.d(_s,{ChtmlTextNode:()=>Fd});var ks={};__webpack_require__.r(ks),__webpack_require__.d(ks,{ChtmlHtmlNode:()=>jd});var As={};__webpack_require__.r(As),__webpack_require__.d(As,{ChtmlWrappers:()=>Ud});var Ls={};__webpack_require__.r(Ls),__webpack_require__.d(Ls,{ChtmlWrapperFactory:()=>qd});var Ms={};__webpack_require__.r(Ms),__webpack_require__.d(Ms,{DefaultFont:()=>Gd,fontName:()=>Vd});var Is={};__webpack_require__.r(Is),__webpack_require__.d(Is,{CHTML:()=>Jd});var Ss={};__webpack_require__.r(Ss),__webpack_require__.d(Ss,{AddFontIds:()=>Kd});var Rs={};__webpack_require__.r(Rs),__webpack_require__.d(Rs,{MJContextMenu:()=>Qu});var Os={};__webpack_require__.r(Os),__webpack_require__.d(Os,{addPreference:()=>ob,engineSetup:()=>ib,fromPreference:()=>ab,locales:()=>eb,parseDOM:()=>nb,setupEngine:()=>sb,toEnriched:()=>rb,toPreference:()=>cb});var Ds={};__webpack_require__.r(Ds),__webpack_require__.d(Ds,{clearspeakMenu:()=>bb,localeMenu:()=>Nb});var Ps={};__webpack_require__.r(Ps),__webpack_require__.d(Ps,{copyToClipboard:()=>xb,isMac:()=>yb});var Bs={};__webpack_require__.r(Bs),__webpack_require__.d(Bs,{annotation:()=>wb,copyAnnotations:()=>Cb,showAnnotations:()=>vb});var Fs={};__webpack_require__.r(Fs),__webpack_require__.d(Fs,{RadioCompare:()=>kb});var js={};__webpack_require__.r(js),__webpack_require__.d(js,{MmlVisitor:()=>Ab});var Us={};__webpack_require__.r(Us),__webpack_require__.d(Us,{SelectableInfo:()=>Lb});var qs={};__webpack_require__.r(qs),__webpack_require__.d(qs,{Menu:()=>Sb});var Hs={};__webpack_require__.r(Hs),__webpack_require__.d(Hs,{MenuHandler:()=>Db,MenuMathDocumentMixin:()=>Ob,MenuMathItemMixin:()=>Rb});var Ws={};__webpack_require__.r(Ws),__webpack_require__.d(Ws,{EnrichHandler:()=>jb,EnrichedMathDocumentMixin:()=>Fb,EnrichedMathItemMixin:()=>Bb,enrichVisitor:()=>Pb});var zs={};__webpack_require__.r(zs),__webpack_require__.d(zs,{InPlace:()=>$b,SemAttr:()=>Yb,buildLabel:()=>Gb,buildSpeech:()=>Jb,honk:()=>Kb,ssmlParsing:()=>qb});var Xs={};__webpack_require__.r(Xs),__webpack_require__.d(Xs,{GeneratorPool:()=>Qb});var Vs={};__webpack_require__.r(Vs),__webpack_require__.d(Vs,{WorkerHandler:()=>eE});var Gs={};__webpack_require__.r(Gs),__webpack_require__.d(Gs,{SpeechHandler:()=>aE,SpeechMathDocumentMixin:()=>oE,SpeechMathItemMixin:()=>nE});var Js={};__webpack_require__.r(Js),__webpack_require__.d(Js,{getHighlighter:()=>fE});var Ks={};__webpack_require__.r(Ks),__webpack_require__.d(Ks,{AbstractRegion:()=>bE,DummyRegion:()=>EE,HoverRegion:()=>CE,LiveRegion:()=>xE,SpeechRegion:()=>vE,StringRegion:()=>NE,ToolTip:()=>yE});var $s={};__webpack_require__.r($s),__webpack_require__.d($s,{AbstractExplorer:()=>TE});var Ys={};__webpack_require__.r(Ys),__webpack_require__.d(Ys,{SpeechExplorer:()=>ME,hasModifiers:()=>AE,isContainer:()=>kE});var Qs={};__webpack_require__.r(Qs),__webpack_require__.d(Qs,{AbstractMouseExplorer:()=>IE,ContentHoverer:()=>OE,FlameHoverer:()=>DE,Hoverer:()=>SE,ValueHoverer:()=>RE});var Zs={};__webpack_require__.r(Zs),__webpack_require__.d(Zs,{AbstractTreeExplorer:()=>PE,ContrastPicker:()=>jE,FlameColorer:()=>BE,TreeColorer:()=>FE});var ti={};__webpack_require__.r(ti),__webpack_require__.d(ti,{ExplorerPool:()=>HE,RegionPool:()=>UE});var ei={};__webpack_require__.r(ei),__webpack_require__.d(ei,{ExplorerHandler:()=>VE,ExplorerMathDocumentMixin:()=>XE,ExplorerMathItemMixin:()=>zE,setA11yOption:()=>JE,setA11yOptions:()=>GE});const si="4.0.0",ii="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:{};function ri(t){return"object"==typeof t&&null!==t}function ni(t,e,s=!1){var i;for(const r of Object.keys(e))"__esModule"!==r&&t[r]!==e[r]&&null!==e[r]&&void 0!==e[r]&&(ri(t[r])&&ri(e[r])?ni(t[r],e[r],s||"_"===r):s&&(null===(i=Object.getOwnPropertyDescriptor(t,r))||void 0===i?void 0:i.get)||(t[r]=e[r]));return t}function oi(t,e,s){t[e]||(t[e]={}),t=t[e];for(const e of Object.keys(s))ri(t[e])&&ri(s[e])?oi(t,e,s[e]):null==t[e]&&null!=s[e]&&(t[e]=s[e]);return t}function ai(t){return ni(ci,t)}void 0!==ii.MathJax&&ii.MathJax.constructor==={}.constructor||(ii.MathJax={}),ii.MathJax.version||(ii.MathJax={version:si,_:{},config:ii.MathJax});const ci=ii.MathJax,li="undefined"!=typeof window,hi={window:li?window:null,document:li?window.document:null,os:(()=>{if(li&&window.navigator){const t=window.navigator.appVersion,e=[["Win","Windows"],["Mac","MacOS"],["X11","Unix"],["Linux","Unix"]];for(const[s,i]of e)if(t.includes(s))return i;if(window.navigator.userAgent.includes("Android"))return"Unix"}return"unknown"})()};class di extends Error{constructor(t,e){super(t),this.package=e}}class ui{get canLoad(){return 0===this.dependencyCount&&!this.noLoad&&!this.isLoading&&!this.hasFailed}static loadPromise(t){const e=xi[t]||{},s=e.extraLoads?Ni.load(...e.extraLoads):Promise.resolve(),i=e.checkReady||(()=>Promise.resolve());return s.then((()=>i()))}static resolvePath(t,e=!0){const s={name:t,original:t,addExtension:e};return Ni.pathFilters.execute(s),s.name}static loadAll(){for(const t of this.packages.values())t.canLoad&&t.load()}constructor(t,e=!1){this.isLoaded=!1,this.result={},this.isLoading=!1,this.hasFailed=!1,this.dependents=[],this.dependencies=[],this.dependencyCount=0,this.provided=[],this.name=t,this.noLoad=e,ui.packages.set(t,this),this.promise=this.makePromise(this.makeDependencies())}makeDependencies(){const t=[],e=ui.packages,s=this.noLoad,i=this.name,r=[];Object.hasOwn(xi.dependencies,i)?r.push(...xi.dependencies[i]):"core"!==i&&r.push("core");for(const i of r){const r=e.get(i)||new ui(i,s);this.dependencies.includes(r)||(r.addDependent(this,s),this.dependencies.push(r),r.isLoaded||(this.dependencyCount++,t.push(r.promise)))}return t}makePromise(t){let e=new Promise(((t,e)=>{this.resolve=t,this.reject=e}));const s=xi[this.name]||{};return s.ready&&(e=e.then((t=>s.ready(this.name)))),t.length&&(t.push(e),e=Promise.all(t).then((t=>t.join(", ")))),s.failed&&e.catch((t=>s.failed(new di(t,this.name)))),e}load(){if(!this.isLoaded&&!this.isLoading&&!this.noLoad){this.isLoading=!0;const t=ui.resolvePath(this.name);xi.require?this.loadCustom(t):this.loadScript(t)}}loadCustom(t){try{const e=xi.require(t);e instanceof Promise?e.then((t=>this.result=t)).then((()=>this.checkLoad())).catch((e=>this.failed("Can't load \""+t+'"\n'+e.message.trim()))):(this.result=e,this.checkLoad())}catch(t){this.failed(t.message)}}loadScript(t){const e=hi.document.createElement("script");e.src=t,e.charset="UTF-8",e.onload=t=>this.checkLoad(),e.onerror=e=>this.failed("Can't load \""+t+'"'),hi.document.head.appendChild(e)}loaded(){this.isLoaded=!0,this.isLoading=!1;for(const t of this.dependents)t.requirementSatisfied();for(const t of this.provided)t.loaded();this.resolve(this.name)}failed(t){this.hasFailed=!0,this.isLoading=!1,this.reject(new di(t,this.name))}checkLoad(){ui.loadPromise(this.name).then((()=>this.loaded())).catch((t=>this.failed(t)))}requirementSatisfied(){this.dependencyCount&&(this.dependencyCount--,this.canLoad&&this.load())}provides(t=[]){for(const e of t){let t=ui.packages.get(e);t||(xi.dependencies[e]||(xi.dependencies[e]=[]),xi.dependencies[e].push(e),t=new ui(e,!0),t.isLoading=!0),this.provided.push(t)}}addDependent(t,e){this.dependents.push(t),e||this.checkNoLoad()}checkNoLoad(){if(this.noLoad){this.noLoad=!1;for(const t of this.dependencies)t.checkNoLoad()}}}ui.packages=new Map;class pi{constructor(){this.items=[],this.items=[]}[Symbol.iterator](){let t=0;const e=this.items;return{next:()=>({value:e[t++],done:t>e.length})}}add(t,e=pi.DEFAULTPRIORITY){let s=this.items.length;do{s--}while(s>=0&&e<this.items[s].priority);return this.items.splice(s+1,0,{item:t,priority:e}),t}remove(t){let e=this.items.length;do{e--}while(e>=0&&this.items[e].item!==t);return e>=0&&this.items.splice(e,1),this}}pi.DEFAULTPRIORITY=5;class mi extends pi{constructor(t=null){super(),t&&this.addList(t)}addList(t){for(const e of t)Array.isArray(e)?this.add(e[0],e[1]):this.add(e)}execute(...t){for(const e of this){if(!1===e.item(...t))return!1}return!0}asyncExecute(...t){let e=-1;const s=this.items;return new Promise(((i,r)=>{!function n(){for(;++e<s.length;){const o=s[e].item(...t);if(o instanceof Promise)return void o.then(n).catch((t=>r(t)));if(!1===o)return void i(!1)}i(!0)}()}))}}const fi=ci.config||{};var gi=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};const bi={source:t=>(Object.hasOwn(xi.source,t.name)&&(t.name=xi.source[t.name]),!0),normalize:t=>{const e=t.name;return e.match(/^(?:[a-z]+:\/)?\/|[a-z]:\\|\[/i)||(t.name="[mathjax]/"+e.replace(/^\.\//,"")),!0},prefix:t=>{let e;for(;(e=t.name.match(/^\[([^\]]*)\]/))&&Object.hasOwn(xi.paths,e[1]);)t.name=xi.paths[e[1]]+t.name.substring(e[0].length);return!0},addExtension:t=>(t.addExtension&&!t.name.match(/\.[^/]+$/)&&(t.name+=".js"),!0)},Ei=ci.version,Ni={versions:new Map,nestedLoads:[],ready(...t){0===t.length&&(t=Array.from(ui.packages.keys()));const e=[];for(const s of t){const t=ui.packages.get(s)||new ui(s,!0);e.push(t.promise)}return Promise.all(e)},load(...t){if(0===t.length)return Promise.resolve([]);let e=[];this.nestedLoads.unshift(e);const s=Promise.resolve().then((()=>gi(this,void 0,void 0,(function*(){const s=[];for(const e of t){let t=ui.packages.get(e);t||(t=new ui(e),t.provides(xi.provides[e])),t.checkNoLoad(),s.push(t.promise.then((()=>(xi.versionWarnings&&t.isLoaded&&!Ni.versions.has(ui.resolvePath(e))&&console.warn(`No version information available for component ${e}`),t.result))))}ui.loadAll();const i=yield Promise.all(s);for(;e.length;){const t=Promise.all(e);e=this.nestedLoads[this.nestedLoads.indexOf(e)]=[],yield t}return this.nestedLoads.splice(this.nestedLoads.indexOf(e),1),i}))));return this.nestedLoads.slice(1).forEach((t=>t.push(s))),s},preLoaded(...t){for(const e of t){let t=ui.packages.get(e);t||(t=new ui(e,!0),t.provides(xi.provides[e])),t.loaded()}},addPackageData(t,e){let s=xi[t];s||(s=xi[t]={});for(const[t,i]of Object.entries(e))if(Array.isArray(i)){s[t]||(s[t]=[]);const e=new Set([...s[t],...i]);s[t]=[...e]}else s[t]=i},defaultReady(){void 0!==yi.startup&&yi.config.startup.ready()},getRoot(){if(hi.document){const t=hi.document.currentScript||hi.document.getElementById("MathJax-script");if(t&&t instanceof HTMLScriptElement)return t.src.replace(/\/[^/]*$/,"")}return fi?.loader?.paths?.mathjax||fi?.__dirname||"/"},checkVersion(t,e,s){return this.saveVersion(t),!(!xi.versionWarnings||e===Ei)&&(console.warn(`Component ${t} uses ${e} of MathJax; version in use is ${Ei}`),!0)},saveVersion(t){Ni.versions.set(ui.resolvePath(t),Ei)},pathFilters:new mi};Ni.pathFilters.add(bi.source,0),Ni.pathFilters.add(bi.normalize,10),Ni.pathFilters.add(bi.prefix,20),Ni.pathFilters.add(bi.addExtension,30);const yi=ci;if(void 0===yi.loader){oi(yi.config,"loader",{paths:{mathjax:Ni.getRoot()},source:{},dependencies:{},provides:{},load:[],ready:Ni.defaultReady.bind(Ni),failed:t=>console.log(`MathJax(${t.package||"?"}): ${t.message}`),require:null,pathFilters:[],versionWarnings:!0}),ai({loader:Ni});for(const t of yi.config.loader.pathFilters)Array.isArray(t)?Ni.pathFilters.add(t[0],t[1]):Ni.pathFilters.add(t)}const xi=yi.config.loader,vi={}.constructor;function Ci(t){return"object"==typeof t&&null!==t&&(t.constructor===vi||t.constructor===ki)}const Ti="[+]",wi="[-]",_i={invalidOption:"warn",optionError:(t,e)=>{if("fatal"===_i.invalidOption)throw new Error(t);console.warn("MathJax: "+t)}};class ki{}function Ai(t){return Object.assign(Object.create(ki.prototype),t)}function Li(t){return Array.isArray(t)?t:[t]}function Mi(t){return t?Object.keys(t).concat(Object.getOwnPropertySymbols(t)):[]}function Ii(t){const e={};for(const s of Mi(t)){const i=Object.getOwnPropertyDescriptor(t,s),r=i.value;Array.isArray(r)?i.value=Si([],r,!1):Ci(r)&&(i.value=Ii(r)),i.enumerable&&(e[s]=i)}return Object.defineProperties(t.constructor===ki?Ai({}):{},e)}function Si(t,e,s=!0){for(let i of Mi(e)){if(s&&void 0===t[i]&&t.constructor!==ki){"symbol"==typeof i&&(i=i.toString()),_i.optionError(`Invalid option "${i}" (no default value).`,i);continue}const r=e[i];let n=t[i];if(!Ci(r)||null===n||"object"!=typeof n&&"function"!=typeof n)Array.isArray(r)?(t[i]=[],Si(t[i],r,!1)):Ci(r)?t[i]=Ii(r):t[i]=r;else{const e=Mi(r);Array.isArray(n)&&(1===e.length&&(e[0]===Ti||e[0]===wi)&&Array.isArray(r[e[0]])||2===e.length&&e.sort().join(",")===Ti+","+wi&&Array.isArray(r[Ti])&&Array.isArray(r[wi]))?(r[wi]&&(n=t[i]=n.filter((t=>r[wi].indexOf(t)<0))),r[Ti]&&(t[i]=[...n,...r[Ti]])):Si(n,r,s)}}return t}function Ri(t,...e){return e.forEach((e=>Si(t,e,!1))),t}function Oi(t,...e){return e.forEach((e=>Si(t,e,!0))),t}function Di(t,...e){const s={};for(const i of e)Object.hasOwn(t,i)&&(s[i]=t[i]);return s}function Pi(t,e){return Di(t,...Object.keys(e))}function Bi(t,...e){const s=[];for(const i of e){const e={},r={};for(const s of Object.keys(t||{}))(void 0===i[s]?r:e)[s]=t[s];s.push(e),t=r}return s.unshift(t),s}function Fi(t,e,s=null){return Object.hasOwn(e,t)?e[t]:s}var ji=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};class Ui{static toMML(t){return Ui.visitor.visitTree(t,this.document)}static registerConstructor(t,e){Ui.constructors[t]=e}static useHandler(t,e=!1){Hi.handler&&!e||(Hi.handler=t)}static useAdaptor(t,e=!1){Hi.adaptor&&!e||(Hi.adaptor=t)}static useInput(t,e=!1){Wi&&!e||Hi.input.push(t)}static useOutput(t,e=!1){Hi.output&&!e||(Hi.output=t)}static extendHandler(t,e=10){Ui.extensions.add(t,e)}static defaultReady(){Ui.getComponents(),Ui.makeMethods(),Ui.pagePromise.then((()=>Hi.pageReady())).then((()=>Ui.promiseResolve())).catch((t=>Ui.promiseReject(t)))}static defaultPageReady(){return(Hi.loadAllFontFiles&&Ui.output.font?Ui.output.font.loadDynamicFiles():Promise.resolve()).then((()=>{var t;return null===(t=Ui.document.menu)||void 0===t?void 0:t.loadingPromise})).then(Hi.typeset&&qi.typesetPromise?()=>Ui.typesetPromise(Hi.elements):Promise.resolve()).then((()=>Ui.promiseResolve()))}static typesetPromise(t){return this.hasTypeset=!0,Ui.document.whenReady((()=>ji(this,void 0,void 0,(function*(){Ui.document.options.elements=t,Ui.document.reset(),yield Ui.document.renderPromise()}))))}static getComponents(){Ui.visitor=new qi._.core.MmlTree.SerializedMmlVisitor.SerializedMmlVisitor,Ui.mathjax=qi._.mathjax.mathjax,Ui.input=Ui.getInputJax(),Ui.output=Ui.getOutputJax(),Ui.adaptor=Ui.getAdaptor(),Ui.handler&&Ui.mathjax.handlers.unregister(Ui.handler),Ui.handler=Ui.getHandler(),Ui.handler&&(Ui.mathjax.handlers.register(Ui.handler),Ui.document=Ui.getDocument())}static makeMethods(){Ui.input&&Ui.output&&Ui.makeTypesetMethods();const t=Ui.output?Ui.output.name.toLowerCase():"";for(const e of Ui.input){const s=e.name.toLowerCase();Ui.makeMmlMethods(s,e),Ui.makeResetMethod(s,e),Ui.output&&Ui.makeOutputMethods(s,t,e)}qi.done=()=>Ui.document.done(),qi.whenReady=t=>Ui.document.whenReady(t)}static makeTypesetMethods(){qi.typeset=(t=null)=>{this.hasTypeset=!0,Ui.document.options.elements=t,Ui.document.reset(),Ui.document.render()},qi.typesetPromise=(t=null)=>Ui.typesetPromise(t),qi.typesetClear=(t=null)=>{t?Ui.document.clearMathItemsWithin(t):Ui.document.clear()}}static makeOutputMethods(t,e,s){const i=t+"2"+e;qi[i]=(t,e={})=>(e=Object.assign(Object.assign({},e),{format:s.name}),Ui.document.convert(t,e)),qi[i+"Promise"]=(t,e={})=>(e=Object.assign(Object.assign({},e),{format:s.name}),Ui.document.convertPromise(t,e)),qi[e+"Stylesheet"]=()=>Ui.output.styleSheet(Ui.document),"getMetricsFor"in Ui.output&&(qi.getMetricsFor=(t,e)=>Ui.output.getMetricsFor(t,e))}static makeMmlMethods(t,e){const s=qi._.core.MathItem.STATE;qi[t+"2mml"]=(t,i={})=>(i=Object.assign(Object.assign({},i),{end:s.CONVERT,format:e.name}),Ui.toMML(Ui.document.convert(t,i))),qi[t+"2mmlPromise"]=(t,...i)=>ji(this,[t,...i],void 0,(function*(t,i={}){i=Object.assign(Object.assign({},i),{end:s.CONVERT,format:e.name});const r=yield Ui.document.convertPromise(t,i);return Ui.toMML(r)}))}static makeResetMethod(t,e){qi[t+"Reset"]=(...t)=>e.reset(...t)}static getInputJax(){const t=[];for(const e of Hi.input){const s=Ui.constructors[e];if(!s)throw Error('Input Jax "'+e+'" is not defined (has it been loaded?)');t[e]=new s(qi.config[e]),t.push(t[e])}return t}static getOutputJax(){const t=Hi.output;if(!t)return null;const e=Ui.constructors[t];if(!e)throw Error('Output Jax "'+t+'" is not defined (has it been loaded?)');return new e(qi.config[t])}static getAdaptor(){const t=Hi.adaptor;if(!t||"none"===t)return null;const e=Ui.constructors[t];if(!e)throw Error('DOMAdaptor "'+t+'" is not defined (has it been loaded?)');return e(qi.config[t])}static getHandler(){const t=Hi.handler;if(!t||"none"===t||!Ui.adaptor)return null;const e=Ui.constructors[t];if(!e)throw Error('Handler "'+t+'" is not defined (has it been loaded?)');let s=new e(Ui.adaptor,5);for(const t of Ui.extensions)s=t.item(s);return s}static getDocument(t=null){return Ui.mathjax.document(t||Hi.document,Object.assign(Object.assign({},qi.config.options),{InputJax:Ui.input,OutputJax:Ui.output}))}}Ui.extensions=new pi,Ui.constructors={},Ui.input=[],Ui.output=null,Ui.handler=null,Ui.adaptor=null,Ui.elements=null,Ui.document=null,Ui.promise=new Promise(((t,e)=>{Ui.promiseResolve=t,Ui.promiseReject=e})),Ui.pagePromise=new Promise(((t,e)=>{const s=ii.document;if(s&&s.readyState&&"complete"!==s.readyState&&"interactive"!==s.readyState){const e=()=>t();s.defaultView.addEventListener("load",e,!0),s.defaultView.addEventListener("DOMContentLoaded",e,!0)}else t()})),Ui.hasTypeset=!1,Ui.defaultOptionError=_i.optionError;const qi=ci;void 0===qi._.startup&&(oi(qi.config,"startup",{input:[],output:"",handler:null,adaptor:null,document:hi.document||"",elements:null,typeset:!0,ready:Ui.defaultReady.bind(Ui),pageReady:Ui.defaultPageReady.bind(Ui)}),ai({startup:Ui,options:{}}),qi.config.startup.invalidOption&&(_i.invalidOption=qi.config.startup.invalidOption),qi.config.startup.optionError&&(_i.optionError=qi.config.startup.optionError));const Hi=qi.config.startup,Wi=0!==Hi.input.length;MathJax.loader&&MathJax.loader.checkVersion("startup",si,"startup"),ai({_:{components:{loader:n,package:s,startup:a}}});Ni.preLoaded("loader","startup"),oi(MathJax.config.loader,"dependencies",{"a11y/semantic-enrich":["input/mml","a11y/sre"],"a11y/speech":["a11y/semantic-enrich"],"a11y/complexity":["a11y/semantic-enrich"],"a11y/explorer":["a11y/speech"],"[mml]/mml3":["input/mml"],"[tex]/action":["input/tex-base"],"[tex]/ams":["input/tex-base","[tex]/newcommand"],"[tex]/amscd":["input/tex-base"],"[tex]/autoload":["input/tex-base","[tex]/require"],"[tex]/bbm":["input/tex-base"],"[tex]/bboldx":["input/tex-base","[tex]/textmacros"],"[tex]/bbox":["input/tex-base"],"[tex]/begingroup":["input/tex-base","[tex]/newcommand"],"[tex]/boldsymbol":["input/tex-base"],"[tex]/braket":["input/tex-base"],"[tex]/bussproofs":["input/tex-base"],"[tex]/cancel":["input/tex-base","[tex]/enclose"],"[tex]/cases":["[tex]/empheq"],"[tex]/centernot":["input/tex-base"],"[tex]/color":["input/tex-base"],"[tex]/colortbl":["input/tex-base","[tex]/color"],"[tex]/colorv2":["input/tex-base"],"[tex]/configmacros":["input/tex-base","[tex]/newcommand"],"[tex]/dsfont":["input/tex-base"],"[tex]/empheq":["input/tex-base","[tex]/ams"],"[tex]/enclose":["input/tex-base"],"[tex]/extpfeil":["input/tex-base","[tex]/newcommand","[tex]/ams"],"[tex]/gensymb":["input/tex-base"],"[tex]/html":["input/tex-base"],"[tex]/mathtools":["input/tex-base","[tex]/newcommand","[tex]/ams","[tex]/boldsymbol"],"[tex]/mhchem":["input/tex-base","[tex]/ams"],"[tex]/newcommand":["input/tex-base"],"[tex]/noerrors":["input/tex-base"],"[tex]/noundefined":["input/tex-base"],"[tex]/physics":["input/tex-base"],"[tex]/require":["input/tex-base"],"[tex]/setoptions":["input/tex-base"],"[tex]/tagformat":["input/tex-base"],"[tex]/texhtml":["input/tex-base"],"[tex]/textcomp":["input/tex-base","[tex]/textmacros"],"[tex]/textmacros":["input/tex-base"],"[tex]/unicode":["input/tex-base"],"[tex]/units":["input/tex-base"],"[tex]/upgreek":["input/tex-base"],"[tex]/verb":["input/tex-base"],"ui/menu":["a11y/sre"]}),oi(MathJax.config.loader,"paths",{tex:"[mathjax]/input/tex/extensions",mml:"[mathjax]/input/mml/extensions",sre:"[mathjax]/sre",mathmaps:"[sre]/mathmaps"}),oi(MathJax.config.loader,"provides",{startup:["loader"],"input/tex":["input/tex-base","[tex]/ams","[tex]/newcommand","[tex]/textmacros","[tex]/noundefined","[tex]/require","[tex]/autoload","[tex]/configmacros"]}),oi(MathJax.config.loader,"source",{"[tex]/amsCd":"[tex]/amscd","[tex]/colorV2":"[tex]/colorv2","[tex]/configMacros":"[tex]/configmacros","[tex]/tagFormat":"[tex]/tagformat"});class zi{constructor(t=null){this.canMeasureNodes=!0,this.document=t}node(t,e={},s=[],i){const r=this.create(t,i);this.setAttributes(r,e);for(const t of s)this.append(r,t);return r}setProperty(t,e,s){t[e]=s}getProperty(t,e){return t[e]}setAttributes(t,e){if(e.style&&"string"!=typeof e.style)for(const s of Object.keys(e.style))this.setStyle(t,s.replace(/-([a-z])/g,((t,e)=>e.toUpperCase())),e.style[s]);if(e.properties)for(const s of Object.keys(e.properties))t[s]=e.properties[s];for(const s of Object.keys(e))"style"===s&&"string"!=typeof e.style||"properties"===s||this.setAttribute(t,s,e[s])}replace(t,e){return this.insert(t,e),this.remove(e),e}childNode(t,e){return this.childNodes(t)[e]}allClasses(t){const e=this.getAttribute(t,"class");return e?e.replace(/ +/g," ").replace(/^ /,"").replace(/ $/,"").split(/ /):[]}cssText(t){return"style"===this.kind(t)?this.textContent(t):""}}var Xi=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};class Vi extends zi{constructor(t){super(t.document),this.canMeasureNodes=!0,this.window=t,this.parser=new t.DOMParser}parse(t,e="text/html"){return this.parser.parseFromString(t,e)}create(t,e){return e?this.document.createElementNS(e,t):this.document.createElement(t)}text(t){return this.document.createTextNode(t)}head(t=this.document){return t.head||t}body(t=this.document){return t.body||t}root(t=this.document){return t.documentElement||t}doctype(t=this.document){return t.doctype?`<!DOCTYPE ${t.doctype.name}>`:""}tags(t,e,s=null){const i=s?t.getElementsByTagNameNS(s,e):t.getElementsByTagName(e);return Array.from(i)}getElements(t,e){let s=[];for(const e of t)"string"==typeof e?s=s.concat(Array.from(this.document.querySelectorAll(e))):Array.isArray(e)||e instanceof this.window.NodeList||e instanceof this.window.HTMLCollection?s=s.concat(Array.from(e)):s.push(e);return s}getElement(t,e=this.document){return e.querySelector(t)}contains(t,e){return t.contains(e)}parent(t){return t.parentNode}append(t,e){return t.appendChild(e)}insert(t,e){return this.parent(e).insertBefore(t,e)}remove(t){return this.parent(t).removeChild(t)}replace(t,e){return this.parent(e).replaceChild(t,e)}clone(t,e=!0){return t.cloneNode(e)}split(t,e){return t.splitText(e)}next(t){return t.nextSibling}previous(t){return t.previousSibling}firstChild(t){return t.firstChild}lastChild(t){return t.lastChild}childNodes(t){return Array.from(t.childNodes)}childNode(t,e){return t.childNodes[e]}kind(t){const e=t.nodeType;return 1===e||3===e||8===e?t.nodeName.toLowerCase():""}value(t){return t.nodeValue||""}textContent(t){return t.textContent}innerHTML(t){return t.innerHTML}outerHTML(t){return t.outerHTML}serializeXML(t){return(new this.window.XMLSerializer).serializeToString(t)}setAttribute(t,e,s,i=null){return i?(e=i.replace(/.*\//,"")+":"+e.replace(/^.*:/,""),t.setAttributeNS(i,e,s)):t.setAttribute(e,s)}getAttribute(t,e){return t.getAttribute(e)}removeAttribute(t,e){return t.removeAttribute(e)}hasAttribute(t,e){return t.hasAttribute(e)}allAttributes(t){return Array.from(t.attributes).map((t=>({name:t.name,value:t.value})))}addClass(t,e){t.classList?t.classList.add(e):t.className=(t.className+" "+e).trim()}removeClass(t,e){t.classList?t.classList.remove(e):t.className=t.className.split(/ /).filter((t=>t!==e)).join(" ")}hasClass(t,e){return t.classList?t.classList.contains(e):t.className.split(/ /).includes(e)}setStyle(t,e,s){t.style[e]=s}getStyle(t,e){return t.style[e]}allStyles(t){return t.style.cssText}insertRules(t,e){for(const s of e)try{t.sheet.insertRule(s,t.sheet.cssRules.length)}catch(t){console.warn(`MathJax: can't insert css rule '${s}': ${t.message}`)}}cssText(t){return"style"!==this.kind(t)?"":Array.from(t.sheet.cssRules).map((t=>t.cssText)).join("\n")}fontSize(t){const e=this.window.getComputedStyle(t);return parseFloat(e.fontSize)}fontFamily(t){return this.window.getComputedStyle(t).fontFamily||""}nodeSize(t,e=1,s=!1){if(s&&t.getBBox){const{width:s,height:i}=t.getBBox();return[s/e,i/e]}return[t.offsetWidth/e,t.offsetHeight/e]}nodeBBox(t){const{left:e,right:s,top:i,bottom:r}=t.getBoundingClientRect();return{left:e,right:s,top:i,bottom:r}}createWorker(t,e){return Xi(this,void 0,void 0,(function*(){const{path:s,maps:i,worker:r}=e,n=`${s}/${r}`,o=`\n self.maps = '${Gi(i)}';\n importScripts('${Gi(n)}');\n `,a=URL.createObjectURL(new Blob([o],{type:"text/javascript"})),c=new Worker(a);return c.onmessage=t,URL.revokeObjectURL(a),c}))}}function Gi(t){return[...t].map((t=>("\\"===t||"'"===t?t="\\"+t:(t<" "||t>"~")&&(t=`\\u{${t.codePointAt(0).toString(16)}}`),t))).join("")}function Ji(){return new Vi(window)}class Ki{constructor(t){const e=this.constructor;this.options=Oi(Ri({},e.OPTIONS),t)}}Ki.OPTIONS={};class $i{constructor(t={}){this.adaptor=null,this.mmlFactory=null;const e=this.constructor;this.options=Oi(Ri({},e.OPTIONS),t),this.preFilters=new mi(this.options.preFilters),this.postFilters=new mi(this.options.postFilters)}get name(){return this.constructor.NAME}setAdaptor(t){this.adaptor=t}setMmlFactory(t){this.mmlFactory=t}initialize(){}reset(...t){}get processStrings(){return!0}findMath(t,e){return[]}executeFilters(t,e,s,i){const r={math:e,document:s,data:i};return t.execute(r),r.data}}$i.NAME="generic",$i.OPTIONS={preFilters:[],postFilters:[]};class Yi{constructor(t={}){this.adaptor=null;const e=this.constructor;this.options=Oi(Ri({},e.OPTIONS),t),this.preFilters=new mi(this.options.preFilters),this.postFilters=new mi(this.options.postFilters)}get name(){return this.constructor.NAME}setAdaptor(t){this.adaptor=t}initialize(){}reset(...t){}getMetrics(t){}styleSheet(t){return null}pageElements(t){return null}executeFilters(t,e,s,i){const r={math:e,document:s,data:i};return t.execute(r),r.data}}Yi.NAME="generic",Yi.OPTIONS={preFilters:[],postFilters:[]};const Qi=Symbol();class Zi{constructor(t=null){this.next=null,this.prev=null,this.data=t}}class tr{constructor(...t){this.list=new Zi(Qi),this.list.next=this.list.prev=this.list,this.push(...t)}isBefore(t,e){return t<e}push(...t){for(const e of t){const t=new Zi(e);t.next=this.list,t.prev=this.list.prev,this.list.prev=t,t.prev.next=t}return this}pop(){const t=this.list.prev;return t.data===Qi?null:(this.list.prev=t.prev,t.prev.next=this.list,t.next=t.prev=null,t.data)}unshift(...t){for(const e of t.slice(0).reverse()){const t=new Zi(e);t.next=this.list.next,t.prev=this.list,this.list.next=t,t.next.prev=t}return this}shift(){const t=this.list.next;return t.data===Qi?null:(this.list.next=t.next,t.next.prev=this.list,t.next=t.prev=null,t.data)}remove(...t){const e=new Map;for(const s of t)e.set(s,!0);let s=this.list.next;for(;s.data!==Qi;){const t=s.next;e.has(s.data)&&(s.prev.next=s.next,s.next.prev=s.prev,s.next=s.prev=null),s=t}return this}clear(){return this.list.next.prev=this.list.prev.next=null,this.list.next=this.list.prev=this.list,this}*[Symbol.iterator](){let t=this.list.next;for(;t.data!==Qi;)yield t.data,t=t.next}*reversed(){let t=this.list.prev;for(;t.data!==Qi;)yield t.data,t=t.prev}insert(t,e=null){null===e&&(e=this.isBefore.bind(this));const s=new Zi(t);let i=this.list.next;for(;i.data!==Qi&&e(i.data,s.data);)i=i.next;return s.prev=i.prev,s.next=i,i.prev.next=i.prev=s,this}sort(t=null){null===t&&(t=this.isBefore.bind(this));const e=[];for(const t of this)e.push(new tr(t));for(this.list.next=this.list.prev=this.list;e.length>1;){const s=e.shift(),i=e.shift();s.merge(i,t),e.push(s)}return e.length&&(this.list=e[0].list),this}merge(t,e=null){null===e&&(e=this.isBefore.bind(this));let s=this.list.next,i=t.list.next;for(;s.data!==Qi&&i.data!==Qi;)e(i.data,s.data)?([i.prev.next,s.prev.next]=[s,i],[i.prev,s.prev]=[s.prev,i.prev],[this.list.prev.next,t.list.prev.next]=[t.list,this.list],[this.list.prev,t.list.prev]=[t.list.prev,this.list.prev],[s,i]=[i.next,s]):s=s.next;return i.data!==Qi&&(this.list.prev.next=t.list.next,t.list.next.prev=this.list.prev,t.list.prev.next=this.list,this.list.prev=t.list.prev,t.list.next=t.list.prev=t.list),this}}class er extends tr{isBefore(t,e){return t.start.i<e.start.i||t.start.i===e.start.i&&t.start.n<e.start.n}}function sr(t,e,s,i,r,n,o=null){return{open:t,math:e,close:s,n:i,start:{n:r},end:{n},display:o}}class ir{get isEscaped(){return null===this.display}constructor(t,e,s=!0,i={i:0,n:0,delim:""},r={i:0,n:0,delim:""}){this.root=null,this.typesetRoot=null,this.metrics={},this.inputData={},this.outputData={},this._state=rr.UNPROCESSED,this.math=t,this.inputJax=e,this.display=s,this.start=i,this.end=r,this.root=null,this.typesetRoot=null,this.metrics={},this.inputData={},this.outputData={}}render(t){t.renderActions.renderMath(this,t)}rerender(t,e=rr.RERENDER){this.state()>=e&&this.state(e-1),t.renderActions.renderMath(this,t,e)}convert(t,e=rr.LAST){t.renderActions.renderConvert(this,t,e)}compile(t){this.state()<rr.COMPILED&&(this.root=this.inputJax.compile(this,t),this.state(rr.COMPILED))}typeset(t){this.state()<rr.TYPESET&&(this.typesetRoot=t.outputJax[this.isEscaped?"escaped":"typeset"](this,t),this.state(rr.TYPESET))}updateDocument(t){}removeFromDocument(t=!1){this.clear()}setMetrics(t,e,s,i){this.metrics={em:t,ex:e,containerWidth:s,scale:i}}state(t=null,e=!1){return null!=t&&(t<rr.INSERTED&&this._state>=rr.INSERTED&&this.removeFromDocument(e),t<rr.TYPESET&&this._state>=rr.TYPESET&&(this.outputData={}),t<rr.COMPILED&&this._state>=rr.COMPILED&&(this.inputData={}),this._state=t),this._state}reset(t=!1){this.state(rr.UNPROCESSED,t)}clear(){}}const rr={UNPROCESSED:0,FINDMATH:10,COMPILED:20,CONVERT:100,METRICS:110,RERENDER:125,TYPESET:150,INSERTED:200,LAST:1e4};function nr(t,e){if(t in rr)throw Error("State "+t+" already exists");rr[t]=e}class or{constructor(t=null){this.defaultKind="unknown",this.nodeMap=new Map,this.node={},null===t&&(t=this.constructor.defaultNodes);for(const e of Object.keys(t))this.setNodeClass(e,t[e])}create(t,...e){return(this.node[t]||this.node[this.defaultKind])(...e)}setNodeClass(t,e){this.nodeMap.set(t,e);const s=this.nodeMap.get(t);this.node[t]=(...t)=>new s(this,...t)}getNodeClass(t){return this.nodeMap.get(t)}deleteNodeClass(t){this.nodeMap.delete(t),delete this.node[t]}nodeIsKind(t,e){return t instanceof this.getNodeClass(e)}getKinds(){return Array.from(this.nodeMap.keys())}}or.defaultNodes={};class ar extends or{create(t,e={},s=[]){return this.node[t](e,s)}}const cr="_inherit_";class lr{constructor(t,e){this.global=e,this.defaults=Object.create(e),this.inherited=Object.create(this.defaults),this.attributes=Object.create(this.inherited),Object.assign(this.defaults,t)}set(t,e){this.attributes[t]=e}setList(t){Object.assign(this.attributes,t)}unset(t){delete this.attributes[t]}get(t){let e=this.attributes[t];return e===cr&&(e=this.global[t]),e}getExplicit(t){return this.hasExplicit(t)?this.attributes[t]:void 0}hasExplicit(t){return Object.hasOwn(this.attributes,t)}hasOneOf(t){for(const e of t)if(this.hasExplicit(e))return!0;return!1}getList(...t){const e={};for(const s of t)e[s]=this.get(s);return e}setInherited(t,e){this.inherited[t]=e}getInherited(t){return this.inherited[t]}getDefault(t){return this.defaults[t]}isSet(t){return Object.hasOwn(this.attributes,t)||Object.hasOwn(this.inherited,t)}hasDefault(t){return t in this.defaults}getExplicitNames(){return Object.keys(this.attributes)}getInheritedNames(){return Object.keys(this.inherited)}getDefaultNames(){return Object.keys(this.defaults)}getGlobalNames(){return Object.keys(this.global)}getAllAttributes(){return this.attributes}getAllInherited(){return this.inherited}getAllDefaults(){return this.defaults}getAllGlobals(){return this.global}}class hr{constructor(t,e={},s=[]){this.factory=t,this.parent=null,this.properties={},this.childNodes=[];for(const t of Object.keys(e))this.setProperty(t,e[t]);s.length&&this.setChildren(s)}get kind(){return"unknown"}setProperty(t,e){this.properties[t]=e}getProperty(t){return this.properties[t]}getPropertyNames(){return Object.keys(this.properties)}getAllProperties(){return this.properties}removeProperty(...t){for(const e of t)delete this.properties[e]}isKind(t){return this.factory.nodeIsKind(this,t)}setChildren(t){this.childNodes=[];for(const e of t)this.appendChild(e)}appendChild(t){return this.childNodes.push(t),t.parent=this,t}replaceChild(t,e){const s=this.childIndex(e);return null!==s&&(this.childNodes[s]=t,t.parent=this,e.parent===this&&(e.parent=null)),t}removeChild(t){const e=this.childIndex(t);return null!==e&&(this.childNodes.splice(e,1),t.parent=null),t}childIndex(t){const e=this.childNodes.indexOf(t);return-1===e?null:e}copy(){const t=this.factory.create(this.kind);t.properties=Object.assign({},this.properties);for(const e of this.childNodes||[])e&&t.appendChild(e.copy());return t}findNodes(t){const e=[];return this.walkTree((s=>{s.isKind(t)&&e.push(s)})),e}walkTree(t,e){t(this,e);for(const s of this.childNodes)s&&s.walkTree(t,e);return e}toString(){return this.kind+"("+this.childNodes.join(",")+")"}}class dr extends hr{setChildren(t){}appendChild(t){return t}replaceChild(t,e){return e}childIndex(t){return null}walkTree(t,e){return t(this,e),e}toString(){return this.kind}}const ur={ORD:0,OP:1,BIN:2,REL:3,OPEN:4,CLOSE:5,PUNCT:6,INNER:7,NONE:-1},pr=["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER"],mr=["","thinmathspace","mediummathspace","thickmathspace"],fr=[[0,-1,2,3,0,0,0,1],[-1,-1,0,3,0,0,0,1],[2,2,0,0,2,0,0,2],[3,3,0,0,3,0,0,3],[0,0,0,0,0,0,0,0],[0,-1,2,3,0,0,0,1],[1,1,0,1,1,1,1,1],[1,-1,2,3,1,0,1,1]],gr=new Set(["normal","bold","italic","bold-italic","double-struck","fraktur","bold-fraktur","script","bold-script","sans-serif","bold-sans-serif","sans-serif-italic","sans-serif-bold-italic","monospace","inital","tailed","looped","stretched"]),br=["indentalign","indentalignfirst","indentshift","indentshiftfirst"];class Er extends hr{constructor(t,e={},s=[]){super(t),this.prevClass=null,this.prevLevel=null,this.texclass=null,this.arity<0&&(this.childNodes=[t.create("inferredMrow")],this.childNodes[0].parent=this),this.setChildren(s),this.attributes=new lr(t.getNodeClass(this.kind).defaults,t.getNodeClass("math").defaults),this.attributes.setList(e)}copy(t=!1){const e=this.factory.create(this.kind);if(e.properties=Object.assign({},this.properties),this.attributes){const s=this.attributes.getAllAttributes();for(const i of Object.keys(s))("id"!==i||t)&&e.attributes.set(i,s[i])}if(this.childNodes&&this.childNodes.length){let t=this.childNodes;1===t.length&&t[0].isInferred&&(t=t[0].childNodes);for(const s of t)s?e.appendChild(s.copy()):e.childNodes.push(null)}return e}get texClass(){return this.texclass}set texClass(t){this.texclass=t}get isToken(){return!1}get isEmbellished(){return!1}get isSpacelike(){return!1}get linebreakContainer(){return!1}get linebreakAlign(){return"data-align"}get arity(){return 1/0}get isInferred(){return!1}get Parent(){let t=this.parent;for(;t&&t.notParent;)t=t.Parent;return t}get notParent(){return!1}setChildren(t){return this.arity<0?this.childNodes[0].setChildren(t):super.setChildren(t)}appendChild(t){if(this.arity<0)return this.childNodes[0].appendChild(t),t;if(t.isInferred){if(this.arity===1/0)return t.childNodes.forEach((t=>super.appendChild(t))),t;const e=t;(t=this.factory.create("mrow")).setChildren(e.childNodes),t.attributes=e.attributes;for(const s of e.getPropertyNames())t.setProperty(s,e.getProperty(s))}return super.appendChild(t)}replaceChild(t,e){return this.arity<0?(this.childNodes[0].replaceChild(t,e),t):super.replaceChild(t,e)}core(){return this}coreMO(){return this}coreIndex(){return 0}childPosition(){let t=null,e=this.parent;for(;e&&e.notParent;)t=e,e=e.parent;if(t=t||this,e){let s=0;for(const i of e.childNodes){if(i===t)return s;s++}}return null}setTeXclass(t){return this.getPrevClass(t),null!=this.texClass?this:t}updateTeXclass(t){t&&(this.prevClass=t.prevClass,this.prevLevel=t.prevLevel,t.prevClass=t.prevLevel=null,this.texClass=t.texClass)}getPrevClass(t){t&&(this.prevClass=t.texClass,this.prevLevel=t.attributes.get("scriptlevel"))}texSpacing(){const t=null!=this.prevClass?this.prevClass:ur.NONE,e=this.texClass||ur.ORD;if(t===ur.NONE||e===ur.NONE)return"";const s=fr[t][e];return(this.prevLevel>0||this.attributes.get("scriptlevel")>0)&&s>=0?"":mr[Math.abs(s)]}hasSpacingAttributes(){return this.isEmbellished&&this.coreMO().hasSpacingAttributes()}setInheritedAttributes(t={},e=!1,s=0,i=!1){var r,n,o;const a=this.attributes.getAllDefaults();for(const e of Object.keys(t)){if(Object.hasOwn(a,e)||Object.hasOwn(Er.alwaysInherit,e)){const[s,i]=t[e];(null===(n=null===(r=Er.noInherit[s])||void 0===r?void 0:r[this.kind])||void 0===n?void 0:n[e])||this.attributes.setInherited(e,i)}(null===(o=Er.stopInherit[this.kind])||void 0===o?void 0:o[e])&&delete(t=Object.assign({},t))[e]}void 0===this.attributes.getExplicit("displaystyle")&&this.attributes.setInherited("displaystyle",e);void 0===this.attributes.getExplicit("scriptlevel")&&this.attributes.setInherited("scriptlevel",s),i&&this.setProperty("texprimestyle",i);const c=this.arity;if(c>=0&&c!==1/0&&(1===c&&0===this.childNodes.length||1!==c&&this.childNodes.length!==c))if(c<this.childNodes.length)this.childNodes=this.childNodes.slice(0,c);else for(;this.childNodes.length<c;)this.appendChild(this.factory.create("mrow"));if(this.linebreakContainer&&!this.isEmbellished){const e=this.linebreakAlign;if(e){const s=this.attributes.get(e)||"left";t=this.addInheritedAttributes(t,{indentalign:s,indentshift:"0",indentalignfirst:s,indentshiftfirst:"0",indentalignlast:"indentalign",indentshiftlast:"indentshift"})}}this.setChildInheritedAttributes(t,e,s,i)}setChildInheritedAttributes(t,e,s,i){for(const r of this.childNodes)r.setInheritedAttributes(t,e,s,i)}addInheritedAttributes(t,e){const s=Object.assign({},t);for(const t of Object.keys(e))"displaystyle"!==t&&"scriptlevel"!==t&&"style"!==t&&(s[t]=[this.kind,e[t]]);return s}inheritAttributesFrom(t){const e=t.attributes,s=e.get("displaystyle"),i=e.get("scriptlevel"),r=e.isSet("mathsize")?{mathsize:["math",e.get("mathsize")]}:{},n=t.getProperty("texprimestyle")||!1;this.setInheritedAttributes(r,s,i,n)}verifyTree(t=null){if(null===t)return;this.verifyAttributes(t);const e=this.arity;t.checkArity&&e>=0&&e!==1/0&&(1===e&&0===this.childNodes.length||1!==e&&this.childNodes.length!==e)&&this.mError('Wrong number of children for "'+this.kind+'" node',t,!0),this.verifyChildren(t)}verifyAttributes(t){if(t.checkAttributes){const e=this.attributes,s=[];for(const t of e.getExplicitNames())"data-"===t.substring(0,5)||void 0!==e.getDefault(t)||t.match(/^(?:class|style|id|(?:xlink:)?href)$/)||s.push(t);s.length&&this.mError("Unknown attributes for "+this.kind+" node: "+s.join(", "),t)}if(t.checkMathvariants){const e=this.attributes.getExplicit("mathvariant");!e||gr.has(e)||this.getProperty("ignore-variant")||this.mError(`Invalid mathvariant: ${e}`,t,!0)}}verifyChildren(t){for(const e of this.childNodes)e.verifyTree(t)}mError(t,e,s=!1){if(this.parent&&this.parent.isKind("merror"))return null;const i=this.factory.create("merror");if(i.attributes.set("data-mjx-message",t),e.fullErrors||s){const s=this.factory.create("mtext"),r=this.factory.create("text");r.setText(e.fullErrors?t:this.kind),s.appendChild(r),i.appendChild(s),this.parent.replaceChild(i,this),e.fullErrors||i.attributes.set("title",t)}else this.parent.replaceChild(i,this),i.appendChild(this);return i}}Er.defaults={mathbackground:cr,mathcolor:cr,mathsize:cr,dir:cr},Er.noInherit={mstyle:{mpadded:{width:!0,height:!0,depth:!0,lspace:!0,voffset:!0},mtable:{width:!0,height:!0,depth:!0,align:!0}},maligngroup:{mrow:{groupalign:!0},mtable:{groupalign:!0}},mtr:{msqrt:{"data-vertical-align":!0},mroot:{"data-vertical-align":!0}},mlabeledtr:{msqrt:{"data-vertical-align":!0},mroot:{"data-vertical-align":!0}}},Er.stopInherit={mtd:{columnalign:!0,rowalign:!0,groupalign:!0}},Er.alwaysInherit={scriptminsize:!0,scriptsizemultiplier:!0,infixlinebreakstyle:!0},Er.verifyDefaults={checkArity:!0,checkAttributes:!1,checkMathvariants:!0,fullErrors:!1,fixMmultiscripts:!0,fixMtables:!0};class Nr extends Er{get isToken(){return!0}getText(){let t="";for(const e of this.childNodes)e instanceof Cr?t+=e.getText():"textContent"in e&&(t+=e.textContent());return t}setChildInheritedAttributes(t,e,s,i){for(const r of this.childNodes)r instanceof Er&&r.setInheritedAttributes(t,e,s,i)}walkTree(t,e){t(this,e);for(const s of this.childNodes)s instanceof Er&&s.walkTree(t,e);return e}}Nr.defaults=Object.assign(Object.assign({},Er.defaults),{mathvariant:"normal",mathsize:cr});class yr extends Er{get isSpacelike(){return this.childNodes[0].isSpacelike}get isEmbellished(){return this.childNodes[0].isEmbellished}get arity(){return-1}core(){return this.childNodes[0]}coreMO(){return this.childNodes[0].coreMO()}setTeXclass(t){return t=this.childNodes[0].setTeXclass(t),this.updateTeXclass(this.childNodes[0]),t}}yr.defaults=Er.defaults;class xr extends Er{get isEmbellished(){return this.childNodes[0].isEmbellished}core(){return this.childNodes[0]}coreMO(){return this.childNodes[0].coreMO()}setTeXclass(t){this.getPrevClass(t),this.texClass=ur.ORD;const e=this.childNodes[0];let s=null;e&&(this.isEmbellished||e.isKind("mi")?(s=e.setTeXclass(t),this.updateTeXclass(this.core())):e.setTeXclass(null));for(const t of this.childNodes.slice(1))t&&t.setTeXclass(null);return s||this}}xr.defaults=Er.defaults;class vr extends dr{get isToken(){return!1}get isEmbellished(){return!1}get isSpacelike(){return!1}get linebreakContainer(){return!1}get linebreakAlign(){return""}get arity(){return 0}get isInferred(){return!1}get notParent(){return!1}get Parent(){return this.parent}get texClass(){return ur.NONE}get prevClass(){return ur.NONE}get prevLevel(){return 0}hasSpacingAttributes(){return!1}get attributes(){return null}core(){return this}coreMO(){return this}coreIndex(){return 0}childPosition(){return 0}setTeXclass(t){return t}texSpacing(){return""}setInheritedAttributes(t,e,s,i){}inheritAttributesFrom(t){}verifyTree(t){}mError(t,e,s=!1){return null}}class Cr extends vr{constructor(){super(...arguments),this.text=""}get kind(){return"text"}getText(){return this.text}setText(t){return this.text=t,this}copy(){return this.factory.create(this.kind).setText(this.getText())}toString(){return this.text}}class Tr extends vr{constructor(){super(...arguments),this.xml=null,this.adaptor=null}get kind(){return"XML"}getXML(){return this.xml}setXML(t,e=null){return this.xml=t,this.adaptor=e,this}getSerializedXML(){return this.adaptor.serializeXML(this.xml)}copy(){return this.factory.create(this.kind).setXML(this.adaptor.clone(this.xml))}toString(){return"XML data"}}class wr extends yr{get kind(){return"math"}get linebreakContainer(){return!0}get linebreakAlign(){return""}setChildInheritedAttributes(t,e,s,i){"display"===this.attributes.get("mode")&&this.attributes.setInherited("display","block"),t=this.addInheritedAttributes(t,this.attributes.getAllAttributes()),e=!!this.attributes.get("displaystyle")||!this.attributes.get("displaystyle")&&"block"===this.attributes.get("display"),this.attributes.setInherited("displaystyle",e),s=this.attributes.get("scriptlevel")||this.constructor.defaults.scriptlevel,super.setChildInheritedAttributes(t,e,s,i)}verifyTree(t=null){super.verifyTree(t),this.parent&&this.mError("Improper nesting of math tags",t,!0)}}wr.defaults=Object.assign(Object.assign({},yr.defaults),{mathvariant:"normal",mathsize:"normal",mathcolor:"",mathbackground:"transparent",dir:"ltr",scriptlevel:0,displaystyle:!1,display:"inline",maxwidth:"",overflow:"linebreak",altimg:"","altimg-width":"","altimg-height":"","altimg-valign":"",alttext:"",cdgroup:"",scriptsizemultiplier:1/Math.sqrt(2),scriptminsize:".4em",infixlinebreakstyle:"before",lineleading:"100%",linebreakmultchar:"\u2062",indentshift:"auto",indentalign:"auto",indenttarget:"",indentalignfirst:"indentalign",indentshiftfirst:"indentshift",indentalignlast:"indentalign",indentshiftlast:"indentshift"});class _r extends Nr{constructor(){super(...arguments),this.texclass=ur.ORD}get kind(){return"mi"}setInheritedAttributes(t={},e=!1,s=0,i=!1){super.setInheritedAttributes(t,e,s,i);this.getText().match(_r.singleCharacter)&&!t.mathvariant&&this.attributes.setInherited("mathvariant","italic")}setTeXclass(t){this.getPrevClass(t);const e=this.getText();return e.length>1&&e.match(_r.operatorName)&&"normal"===this.attributes.get("mathvariant")&&void 0===this.getProperty("autoOP")&&void 0===this.getProperty("texClass")&&(this.texClass=ur.OP,this.setProperty("autoOP",!0)),this}}_r.defaults=Object.assign({},Nr.defaults),_r.operatorName=/^[a-z][a-z0-9]*$/i,_r.singleCharacter=/^[\uD800-\uDBFF]?.[\u0300-\u036F\u1AB0-\u1ABE\u1DC0-\u1DFF\u20D0-\u20EF]*$/;class kr extends Nr{constructor(){super(...arguments),this.texclass=ur.ORD}get kind(){return"mn"}}function Ar(t,e,s=ur.BIN,i=null){return[t,e,s,i]}kr.defaults=Object.assign({},Nr.defaults);const Lr={ORD:Ar(0,0,ur.ORD),ORD11:Ar(1,1,ur.ORD),ORD21:Ar(2,1,ur.ORD),ORD02:Ar(0,2,ur.ORD),ORD55:Ar(5,5,ur.ORD),NONE:Ar(0,0,ur.NONE),OP:Ar(1,2,ur.OP,{largeop:!0,movablelimits:!0,symmetric:!0}),OPFIXED:Ar(1,2,ur.OP,{largeop:!0,movablelimits:!0}),INTEGRAL:Ar(0,1,ur.OP,{largeop:!0,symmetric:!0}),INTEGRAL2:Ar(1,2,ur.OP,{largeop:!0,symmetric:!0}),BIN3:Ar(3,3,ur.BIN),BIN4:Ar(4,4,ur.BIN),BIN01:Ar(0,1,ur.BIN),BIN5:Ar(5,5,ur.BIN),TALLBIN:Ar(4,4,ur.BIN,{stretchy:!0}),BINOP:Ar(4,4,ur.BIN,{largeop:!0,movablelimits:!0}),REL:Ar(5,5,ur.REL),REL1:Ar(1,1,ur.REL,{stretchy:!0}),REL4:Ar(4,4,ur.REL),RELSTRETCH:Ar(5,5,ur.REL,{stretchy:!0}),RELACCENT:Ar(5,5,ur.REL,{accent:!0}),WIDEREL:Ar(5,5,ur.REL,{accent:!0,stretchy:!0}),OPEN:Ar(0,0,ur.OPEN,{fence:!0,stretchy:!0,symmetric:!0}),CLOSE:Ar(0,0,ur.CLOSE,{fence:!0,stretchy:!0,symmetric:!0}),INNER:Ar(0,0,ur.INNER),PUNCT:Ar(0,3,ur.PUNCT),ACCENT:Ar(0,0,ur.ORD,{accent:!0}),WIDEACCENT:Ar(0,0,ur.ORD,{accent:!0,stretchy:!0})},Mr=[[32,127,ur.REL,"mo"],[160,191,ur.ORD,"mo"],[192,591,ur.ORD,"mi"],[688,879,ur.ORD,"mo"],[880,6688,ur.ORD,"mi"],[6832,6911,ur.ORD,"mo"],[6912,7615,ur.ORD,"mi"],[7616,7679,ur.ORD,"mo"],[7680,8191,ur.ORD,"mi"],[8192,8303,ur.ORD,"mo"],[8304,8351,ur.ORD,"mo"],[8448,8527,ur.ORD,"mi"],[8528,8591,ur.ORD,"mn"],[8592,8703,ur.REL,"mo"],[8704,8959,ur.BIN,"mo"],[8960,9215,ur.ORD,"mo"],[9312,9471,ur.ORD,"mn"],[9472,10223,ur.ORD,"mo"],[10224,10239,ur.REL,"mo"],[10240,10495,ur.ORD,"mtext"],[10496,10623,ur.REL,"mo"],[10624,10751,ur.ORD,"mo"],[10752,11007,ur.BIN,"mo"],[11008,11055,ur.ORD,"mo"],[11056,11087,ur.REL,"mo"],[11088,11263,ur.ORD,"mo"],[11264,11744,ur.ORD,"mi"],[11776,11903,ur.ORD,"mo"],[11904,12255,ur.ORD,"mi","normal"],[12272,12351,ur.ORD,"mo"],[12352,42143,ur.ORD,"mi","normal"],[42192,43055,ur.ORD,"mi"],[43056,43071,ur.ORD,"mn"],[43072,55295,ur.ORD,"mi"],[63744,64255,ur.ORD,"mi","normal"],[64256,65023,ur.ORD,"mi"],[65024,65135,ur.ORD,"mo"],[65136,65791,ur.ORD,"mi"],[65792,65935,ur.ORD,"mn"],[65936,74751,ur.ORD,"mi","normal"],[74752,74879,ur.ORD,"mn"],[74880,113823,ur.ORD,"mi","normal"],[113824,119391,ur.ORD,"mo"],[119648,119679,ur.ORD,"mn"],[119808,120781,ur.ORD,"mi"],[120782,120831,ur.ORD,"mn"],[122624,129023,ur.ORD,"mo"],[129024,129279,ur.REL,"mo"],[129280,129535,ur.ORD,"mo"],[131072,195103,ur.ORD,"mi","normal"]];function Ir(t){const e=Rr.infix[t]||Rr.prefix[t]||Rr.postfix[t];if(e)return[0,0,e[2],"mo"];const s=t.codePointAt(0);for(const t of Mr)if(s<=t[1]){if(s>=t[0])return t;break}return[0,0,ur.REL,"mo"]}const Sr=[[0,0],[1,2],[3,3],[4,4],[0,0],[0,0],[0,3]],Rr={prefix:{"(":Lr.OPEN,"+":Lr.BIN01,"-":Lr.BIN01,"[":Lr.OPEN,"{":Lr.OPEN,"|":Lr.OPEN,"||":[0,0,ur.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[0,0,ur.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"\xac":Lr.ORD21,"\xb1":Lr.BIN01,"\u2016":[0,0,ur.ORD,{fence:!0,stretchy:!0}],"\u2018":[0,0,ur.OPEN,{fence:!0}],"\u201c":[0,0,ur.OPEN,{fence:!0}],\u2145:Lr.ORD21,\u2146:Ar(2,0,ur.ORD),"\u2200":Lr.ORD21,"\u2202":Lr.ORD21,"\u2203":Lr.ORD21,"\u2204":Lr.ORD21,"\u2207":Lr.ORD21,"\u220f":Lr.OP,"\u2210":Lr.OP,"\u2211":Lr.OP,"\u2212":Lr.BIN01,"\u2213":Lr.BIN01,"\u221a":[1,1,ur.ORD,{stretchy:!0}],"\u221b":Lr.ORD11,"\u221c":Lr.ORD11,"\u2220":Lr.ORD,"\u2221":Lr.ORD,"\u2222":Lr.ORD,"\u222b":Lr.INTEGRAL,"\u222c":Lr.INTEGRAL,"\u222d":Lr.INTEGRAL,"\u222e":Lr.INTEGRAL,"\u222f":Lr.INTEGRAL,"\u2230":Lr.INTEGRAL,"\u2231":Lr.INTEGRAL,"\u2232":Lr.INTEGRAL,"\u2233":Lr.INTEGRAL,"\u22c0":Lr.OP,"\u22c1":Lr.OP,"\u22c2":Lr.OP,"\u22c3":Lr.OP,"\u2308":Lr.OPEN,"\u230a":Lr.OPEN,"\u2329":Lr.OPEN,"\u2772":Lr.OPEN,"\u27e6":Lr.OPEN,"\u27e8":Lr.OPEN,"\u27ea":Lr.OPEN,"\u27ec":Lr.OPEN,"\u27ee":Lr.OPEN,"\u2980":[0,0,ur.ORD,{fence:!0,stretchy:!0}],"\u2983":Lr.OPEN,"\u2985":Lr.OPEN,"\u2987":Lr.OPEN,"\u2989":Lr.OPEN,"\u298b":Lr.OPEN,"\u298d":Lr.OPEN,"\u298f":Lr.OPEN,"\u2991":Lr.OPEN,"\u2993":Lr.OPEN,"\u2995":Lr.OPEN,"\u2997":Lr.OPEN,"\u29fc":Lr.OPEN,"\u2a00":Lr.OP,"\u2a01":Lr.OP,"\u2a02":Lr.OP,"\u2a03":Lr.OP,"\u2a04":Lr.OP,"\u2a05":Lr.OP,"\u2a06":Lr.OP,"\u2a07":Lr.OP,"\u2a08":Lr.OP,"\u2a09":Lr.OP,"\u2a0a":Lr.OP,"\u2a0b":Lr.INTEGRAL2,"\u2a0c":Lr.INTEGRAL,"\u2a0d":Lr.INTEGRAL2,"\u2a0e":Lr.INTEGRAL2,"\u2a0f":Lr.INTEGRAL2,"\u2a10":Lr.OP,"\u2a11":Lr.OP,"\u2a12":Lr.OP,"\u2a13":Lr.OP,"\u2a14":Lr.OP,"\u2a15":Lr.INTEGRAL2,"\u2a16":Lr.INTEGRAL2,"\u2a17":Lr.INTEGRAL2,"\u2a18":Lr.INTEGRAL2,"\u2a19":Lr.INTEGRAL2,"\u2a1a":Lr.INTEGRAL2,"\u2a1b":Lr.INTEGRAL2,"\u2a1c":Lr.INTEGRAL2,"\u2afc":Lr.OP,"\u2aff":Lr.OP},postfix:{"!!":Ar(1,0),"!":[1,0,ur.CLOSE,null],'"':Lr.ACCENT,"&":Lr.ORD,")":Lr.CLOSE,"++":Ar(0,0),"--":Ar(0,0),"..":Ar(0,0),"...":Lr.ORD,"'":Lr.ACCENT,"]":Lr.CLOSE,"^":Lr.WIDEACCENT,_:Lr.WIDEACCENT,"`":Lr.ACCENT,"|":Lr.CLOSE,"}":Lr.CLOSE,"~":Lr.WIDEACCENT,"||":[0,0,ur.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[0,0,ur.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"\xa8":Lr.ACCENT,\u00aa:Lr.ACCENT,"\xaf":Lr.WIDEACCENT,"\xb0":Lr.ORD,"\xb2":Lr.ACCENT,"\xb3":Lr.ACCENT,"\xb4":Lr.ACCENT,"\xb8":Lr.ACCENT,"\xb9":Lr.ACCENT,\u00ba:Lr.ACCENT,\u02c6:Lr.WIDEACCENT,\u02c7:Lr.WIDEACCENT,\u02c9:Lr.WIDEACCENT,\u02ca:Lr.ACCENT,\u02cb:Lr.ACCENT,\u02cd:Lr.WIDEACCENT,"\u02d8":Lr.ACCENT,"\u02d9":Lr.ACCENT,"\u02da":Lr.ACCENT,"\u02dc":Lr.WIDEACCENT,"\u02dd":Lr.ACCENT,"\u02f7":Lr.WIDEACCENT,"\u0302":Lr.WIDEACCENT,"\u0311":Lr.ACCENT,"\u03f6":Lr.REL,"\u2016":[0,0,ur.ORD,{fence:!0,stretchy:!0}],"\u2019":[0,0,ur.CLOSE,{fence:!0}],"\u201a":Lr.ACCENT,"\u201b":Lr.ACCENT,"\u201d":[0,0,ur.CLOSE,{fence:!0}],"\u201e":Lr.ACCENT,"\u201f":Lr.ACCENT,"\u2032":Lr.ORD,"\u2033":Lr.ORD,"\u2034":Lr.ORD,"\u2035":Lr.ORD,"\u2036":Lr.ORD,"\u2037":Lr.ORD,"\u203e":Lr.WIDEACCENT,"\u2057":Lr.ORD,"\u20db":Lr.ACCENT,"\u20dc":Lr.ACCENT,"\u2309":Lr.CLOSE,"\u230b":Lr.CLOSE,"\u232a":Lr.CLOSE,"\u23b4":Lr.WIDEACCENT,"\u23b5":Lr.WIDEACCENT,"\u23dc":Lr.WIDEACCENT,"\u23dd":Lr.WIDEACCENT,"\u23de":Lr.WIDEACCENT,"\u23df":Lr.WIDEACCENT,"\u23e0":Lr.WIDEACCENT,"\u23e1":Lr.WIDEACCENT,"\u25a0":Lr.BIN3,"\u25a1":Lr.BIN3,"\u25aa":Lr.BIN3,"\u25ab":Lr.BIN3,"\u25ad":Lr.BIN3,"\u25ae":Lr.BIN3,"\u25af":Lr.BIN3,"\u25b0":Lr.BIN3,"\u25b1":Lr.BIN3,"\u25b2":Lr.BIN4,"\u25b4":Lr.BIN4,"\u25b6":Lr.BIN4,"\u25b7":Lr.BIN4,"\u25b8":Lr.BIN4,"\u25bc":Lr.BIN4,"\u25be":Lr.BIN4,"\u25c0":Lr.BIN4,"\u25c1":Lr.BIN4,"\u25c2":Lr.BIN4,"\u25c4":Lr.BIN4,"\u25c5":Lr.BIN4,"\u25c6":Lr.BIN4,"\u25c7":Lr.BIN4,"\u25c8":Lr.BIN4,"\u25c9":Lr.BIN4,"\u25cc":Lr.BIN4,"\u25cd":Lr.BIN4,"\u25ce":Lr.BIN4,"\u25cf":Lr.BIN4,"\u25d6":Lr.BIN4,"\u25d7":Lr.BIN4,"\u25e6":Lr.BIN4,"\u266d":Lr.ORD02,"\u266e":Lr.ORD02,"\u266f":Lr.ORD02,"\u2773":Lr.CLOSE,"\u27e7":Lr.CLOSE,"\u27e9":Lr.CLOSE,"\u27eb":Lr.CLOSE,"\u27ed":Lr.CLOSE,"\u27ef":Lr.CLOSE,"\u2980":[0,0,ur.ORD,{fence:!0,stretchy:!0}],"\u2984":Lr.CLOSE,"\u2986":Lr.CLOSE,"\u2988":Lr.CLOSE,"\u298a":Lr.CLOSE,"\u298c":Lr.CLOSE,"\u298e":Lr.CLOSE,"\u2990":Lr.CLOSE,"\u2992":Lr.CLOSE,"\u2994":Lr.CLOSE,"\u2996":Lr.CLOSE,"\u2998":Lr.CLOSE,"\u29fd":Lr.CLOSE},infix:{"!=":Lr.BIN4,"#":Lr.ORD,$:Lr.ORD,"%":[3,3,ur.ORD,null],"&&":Lr.BIN4,"":Lr.ORD,"*":Lr.BIN3,"**":Ar(1,1),"*=":Lr.BIN4,"+":Lr.BIN4,"+=":Lr.BIN4,",":[0,3,ur.PUNCT,{linebreakstyle:"after",separator:!0}],"-":Lr.BIN4,"-=":Lr.BIN4,"->":Lr.BIN5,".":[0,3,ur.PUNCT,{linebreakstyle:"after",separator:!0}],"/":Lr.ORD11,"//":Ar(1,1),"/=":Lr.BIN4,":":[1,2,ur.REL,null],":=":Lr.BIN4,";":[0,3,ur.PUNCT,{linebreakstyle:"after",separator:!0}],"<":Lr.REL,"<=":Lr.BIN5,"<>":Ar(1,1),"=":Lr.REL,"==":Lr.BIN4,">":Lr.REL,">=":Lr.BIN5,"?":[1,1,ur.CLOSE,null],"@":Lr.ORD11,"\\":Lr.ORD,"^":Lr.ORD11,_:Lr.ORD11,"|":[2,2,ur.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"||":[2,2,ur.BIN,{fence:!0,stretchy:!0,symmetric:!0}],"|||":[2,2,ur.ORD,{fence:!0,stretchy:!0,symmetric:!0}],"\xb1":Lr.BIN4,"\xb7":Lr.BIN4,"\xd7":Lr.BIN4,"\xf7":Lr.BIN4,\u02b9:Lr.ORD,"\u0300":Lr.ACCENT,"\u0301":Lr.ACCENT,"\u0303":Lr.WIDEACCENT,"\u0304":Lr.ACCENT,"\u0306":Lr.ACCENT,"\u0307":Lr.ACCENT,"\u0308":Lr.ACCENT,"\u030c":Lr.ACCENT,"\u0332":Lr.WIDEACCENT,"\u0338":Lr.REL4,"\u2015":[0,0,ur.ORD,{stretchy:!0}],"\u2017":[0,0,ur.ORD,{stretchy:!0}],"\u2020":Lr.BIN3,"\u2021":Lr.BIN3,"\u2022":Lr.BIN4,"\u2026":Lr.INNER,"\u2043":Lr.BIN4,"\u2044":Lr.TALLBIN,"\u2061":Lr.NONE,"\u2062":Lr.NONE,"\u2063":[0,0,ur.NONE,{linebreakstyle:"after",separator:!0}],"\u2064":Lr.NONE,"\u20d7":Lr.ACCENT,\u2111:Lr.ORD,\u2113:Lr.ORD,\u2118:Lr.ORD,\u211c:Lr.ORD,"\u2190":Lr.WIDEREL,"\u2191":Lr.RELSTRETCH,"\u2192":Lr.WIDEREL,"\u2193":Lr.RELSTRETCH,"\u2194":Lr.WIDEREL,"\u2195":Lr.RELSTRETCH,"\u2196":Lr.RELSTRETCH,"\u2197":Lr.RELSTRETCH,"\u2198":Lr.RELSTRETCH,"\u2199":Lr.RELSTRETCH,"\u219a":Lr.RELACCENT,"\u219b":Lr.RELACCENT,"\u219c":Lr.WIDEREL,"\u219d":Lr.WIDEREL,"\u219e":Lr.WIDEREL,"\u219f":Lr.WIDEREL,"\u21a0":Lr.WIDEREL,"\u21a1":Lr.RELSTRETCH,"\u21a2":Lr.WIDEREL,"\u21a3":Lr.WIDEREL,"\u21a4":Lr.WIDEREL,"\u21a5":Lr.RELSTRETCH,"\u21a6":Lr.WIDEREL,"\u21a7":Lr.RELSTRETCH,"\u21a8":Lr.RELSTRETCH,"\u21a9":Lr.WIDEREL,"\u21aa":Lr.WIDEREL,"\u21ab":Lr.WIDEREL,"\u21ac":Lr.WIDEREL,"\u21ad":Lr.WIDEREL,"\u21ae":Lr.RELACCENT,"\u21af":Lr.RELSTRETCH,"\u21b0":Lr.RELSTRETCH,"\u21b1":Lr.RELSTRETCH,"\u21b2":Lr.RELSTRETCH,"\u21b3":Lr.RELSTRETCH,"\u21b4":Lr.RELSTRETCH,"\u21b5":Lr.RELSTRETCH,"\u21b6":Lr.RELACCENT,"\u21b7":Lr.RELACCENT,"\u21b8":Lr.REL,"\u21b9":Lr.WIDEREL,"\u21ba":Lr.REL,"\u21bb":Lr.REL,"\u21bc":Lr.WIDEREL,"\u21bd":Lr.WIDEREL,"\u21be":Lr.RELSTRETCH,"\u21bf":Lr.RELSTRETCH,"\u21c0":Lr.WIDEREL,"\u21c1":Lr.WIDEREL,"\u21c2":Lr.RELSTRETCH,"\u21c3":Lr.RELSTRETCH,"\u21c4":Lr.WIDEREL,"\u21c5":Lr.RELSTRETCH,"\u21c6":Lr.WIDEREL,"\u21c7":Lr.WIDEREL,"\u21c8":Lr.RELSTRETCH,"\u21c9":Lr.WIDEREL,"\u21ca":Lr.RELSTRETCH,"\u21cb":Lr.WIDEREL,"\u21cc":Lr.WIDEREL,"\u21cd":Lr.RELACCENT,"\u21ce":Lr.RELACCENT,"\u21cf":Lr.RELACCENT,"\u21d0":Lr.WIDEREL,"\u21d1":Lr.RELSTRETCH,"\u21d2":Lr.WIDEREL,"\u21d3":Lr.RELSTRETCH,"\u21d4":Lr.WIDEREL,"\u21d5":Lr.RELSTRETCH,"\u21d6":Lr.RELSTRETCH,"\u21d7":Lr.RELSTRETCH,"\u21d8":Lr.RELSTRETCH,"\u21d9":Lr.RELSTRETCH,"\u21da":Lr.WIDEREL,"\u21db":Lr.WIDEREL,"\u21dc":Lr.WIDEREL,"\u21dd":Lr.WIDEREL,"\u21de":Lr.REL,"\u21df":Lr.REL,"\u21e0":Lr.WIDEREL,"\u21e1":Lr.RELSTRETCH,"\u21e2":Lr.WIDEREL,"\u21e3":Lr.RELSTRETCH,"\u21e4":Lr.WIDEREL,"\u21e5":Lr.WIDEREL,"\u21e6":Lr.WIDEREL,"\u21e7":Lr.RELSTRETCH,"\u21e8":Lr.WIDEREL,"\u21e9":Lr.RELSTRETCH,"\u21ea":Lr.RELSTRETCH,"\u21eb":Lr.RELSTRETCH,"\u21ec":Lr.RELSTRETCH,"\u21ed":Lr.RELSTRETCH,"\u21ee":Lr.RELSTRETCH,"\u21ef":Lr.RELSTRETCH,"\u21f0":Lr.WIDEREL,"\u21f1":Lr.REL,"\u21f2":Lr.REL,"\u21f3":Lr.RELSTRETCH,"\u21f4":Lr.RELACCENT,"\u21f5":Lr.RELSTRETCH,"\u21f6":Lr.WIDEREL,"\u21f7":Lr.RELACCENT,"\u21f8":Lr.RELACCENT,"\u21f9":Lr.RELACCENT,"\u21fa":Lr.RELACCENT,"\u21fb":Lr.RELACCENT,"\u21fc":Lr.RELACCENT,"\u21fd":Lr.WIDEREL,"\u21fe":Lr.WIDEREL,"\u21ff":Lr.WIDEREL,"\u2201":Ar(1,2,ur.ORD),"\u2205":Lr.ORD,"\u2206":Lr.BIN3,"\u2208":Lr.REL,"\u2209":Lr.REL,"\u220a":Lr.REL,"\u220b":Lr.REL,"\u220c":Lr.REL,"\u220d":Lr.REL,"\u220e":Lr.BIN3,"\u2212":Lr.BIN4,"\u2213":Lr.BIN4,"\u2214":Lr.BIN4,"\u2215":Lr.TALLBIN,"\u2216":Lr.BIN4,"\u2217":Lr.BIN4,"\u2218":Lr.BIN4,"\u2219":Lr.BIN4,"\u221d":Lr.REL,"\u221e":Lr.ORD,"\u221f":Lr.REL,"\u2223":Lr.REL,"\u2224":Lr.REL,"\u2225":Lr.REL,"\u2226":Lr.REL,"\u2227":Lr.BIN4,"\u2228":Lr.BIN4,"\u2229":Lr.BIN4,"\u222a":Lr.BIN4,"\u2234":Lr.REL,"\u2235":Lr.REL,"\u2236":Lr.REL,"\u2237":Lr.REL,"\u2238":Lr.BIN4,"\u2239":Lr.REL,"\u223a":Lr.BIN4,"\u223b":Lr.REL,"\u223c":Lr.REL,"\u223d":Lr.REL,"\u223d\u0331":Lr.BIN3,"\u223e":Lr.REL,"\u223f":Lr.BIN3,"\u2240":Lr.BIN4,"\u2241":Lr.REL,"\u2242":Lr.REL,"\u2242\u0338":Lr.REL,"\u2243":Lr.REL,"\u2244":Lr.REL,"\u2245":Lr.REL,"\u2246":Lr.REL,"\u2247":Lr.REL,"\u2248":Lr.REL,"\u2249":Lr.REL,"\u224a":Lr.REL,"\u224b":Lr.REL,"\u224c":Lr.REL,"\u224d":Lr.REL,"\u224e":Lr.REL,"\u224e\u0338":Lr.REL,"\u224f":Lr.REL,"\u224f\u0338":Lr.REL,"\u2250":Lr.REL,"\u2251":Lr.REL,"\u2252":Lr.REL,"\u2253":Lr.REL,"\u2254":Lr.REL,"\u2255":Lr.REL,"\u2256":Lr.REL,"\u2257":Lr.REL,"\u2258":Lr.REL,"\u2259":Lr.REL,"\u225a":Lr.REL,"\u225b":Lr.REL,"\u225c":Lr.REL,"\u225d":Lr.REL,"\u225e":Lr.REL,"\u225f":Lr.REL,"\u2260":Lr.REL,"\u2261":Lr.REL,"\u2262":Lr.REL,"\u2263":Lr.REL,"\u2264":Lr.REL,"\u2265":Lr.REL,"\u2266":Lr.REL,"\u2266\u0338":Lr.REL,"\u2267":Lr.REL,"\u2268":Lr.REL,"\u2269":Lr.REL,"\u226a":Lr.REL,"\u226a\u0338":Lr.REL,"\u226b":Lr.REL,"\u226b\u0338":Lr.REL,"\u226c":Lr.REL,"\u226d":Lr.REL,"\u226e":Lr.REL,"\u226f":Lr.REL,"\u2270":Lr.REL,"\u2271":Lr.REL,"\u2272":Lr.REL,"\u2273":Lr.REL,"\u2274":Lr.REL,"\u2275":Lr.REL,"\u2276":Lr.REL,"\u2277":Lr.REL,"\u2278":Lr.REL,"\u2279":Lr.REL,"\u227a":Lr.REL,"\u227b":Lr.REL,"\u227c":Lr.REL,"\u227d":Lr.REL,"\u227e":Lr.REL,"\u227f":Lr.REL,"\u227f\u0338":Lr.REL,"\u2280":Lr.REL,"\u2281":Lr.REL,"\u2282":Lr.REL,"\u2282\u20d2":Lr.REL,"\u2283":Lr.REL,"\u2283\u20d2":Lr.REL,"\u2284":Lr.REL,"\u2285":Lr.REL,"\u2286":Lr.REL,"\u2287":Lr.REL,"\u2288":Lr.REL,"\u2289":Lr.REL,"\u228a":Lr.REL,"\u228b":Lr.REL,"\u228c":Lr.BIN4,"\u228d":Lr.BIN4,"\u228e":Lr.BIN4,"\u228f":Lr.REL,"\u228f\u0338":Lr.REL,"\u2290":Lr.REL,"\u2290\u0338":Lr.REL,"\u2291":Lr.REL,"\u2292":Lr.REL,"\u2293":Lr.BIN4,"\u2294":Lr.BIN4,"\u2295":Lr.BIN4,"\u2296":Lr.BIN4,"\u2297":Lr.BIN4,"\u2298":Lr.BIN4,"\u2299":Lr.BIN4,"\u229a":Lr.BIN4,"\u229b":Lr.BIN4,"\u229c":Lr.BIN4,"\u229d":Lr.BIN4,"\u229e":Lr.BIN4,"\u229f":Lr.BIN4,"\u22a0":Lr.BIN4,"\u22a1":Lr.BIN4,"\u22a2":Lr.REL,"\u22a3":Lr.REL,"\u22a4":Lr.ORD55,"\u22a5":Lr.REL,"\u22a6":Lr.REL,"\u22a7":Lr.REL,"\u22a8":Lr.REL,"\u22a9":Lr.REL,"\u22aa":Lr.REL,"\u22ab":Lr.REL,"\u22ac":Lr.REL,"\u22ad":Lr.REL,"\u22ae":Lr.REL,"\u22af":Lr.REL,"\u22b0":Lr.REL,"\u22b1":Lr.REL,"\u22b2":Lr.REL,"\u22b3":Lr.REL,"\u22b4":Lr.REL,"\u22b5":Lr.REL,"\u22b6":Lr.REL,"\u22b7":Lr.REL,"\u22b8":Lr.REL,"\u22b9":Lr.REL,"\u22ba":Lr.BIN4,"\u22bb":Lr.BIN4,"\u22bc":Lr.BIN4,"\u22bd":Lr.BIN4,"\u22be":Lr.BIN3,"\u22bf":Lr.BIN3,"\u22c4":Lr.BIN4,"\u22c5":Lr.BIN4,"\u22c6":Lr.BIN4,"\u22c7":Lr.BIN4,"\u22c8":Lr.REL,"\u22c9":Lr.BIN4,"\u22ca":Lr.BIN4,"\u22cb":Lr.BIN4,"\u22cc":Lr.BIN4,"\u22cd":Lr.REL,"\u22ce":Lr.BIN4,"\u22cf":Lr.BIN4,"\u22d0":Lr.REL,"\u22d1":Lr.REL,"\u22d2":Lr.BIN4,"\u22d3":Lr.BIN4,"\u22d4":Lr.REL,"\u22d5":Lr.REL,"\u22d6":Lr.REL,"\u22d7":Lr.REL,"\u22d8":Lr.REL,"\u22d9":Lr.REL,"\u22da":Lr.REL,"\u22db":Lr.REL,"\u22dc":Lr.REL,"\u22dd":Lr.REL,"\u22de":Lr.REL,"\u22df":Lr.REL,"\u22e0":Lr.REL,"\u22e1":Lr.REL,"\u22e2":Lr.REL,"\u22e3":Lr.REL,"\u22e4":Lr.REL,"\u22e5":Lr.REL,"\u22e6":Lr.REL,"\u22e7":Lr.REL,"\u22e8":Lr.REL,"\u22e9":Lr.REL,"\u22ea":Lr.REL,"\u22eb":Lr.REL,"\u22ec":Lr.REL,"\u22ed":Lr.REL,"\u22ee":Lr.ORD55,"\u22ef":Lr.INNER,"\u22f0":Lr.REL,"\u22f1":[5,5,ur.INNER,null],"\u22f2":Lr.REL,"\u22f3":Lr.REL,"\u22f4":Lr.REL,"\u22f5":Lr.REL,"\u22f6":Lr.REL,"\u22f7":Lr.REL,"\u22f8":Lr.REL,"\u22f9":Lr.REL,"\u22fa":Lr.REL,"\u22fb":Lr.REL,"\u22fc":Lr.REL,"\u22fd":Lr.REL,"\u22fe":Lr.REL,"\u22ff":Lr.REL,"\u2305":Lr.BIN3,"\u2306":Lr.BIN3,"\u2322":Lr.REL4,"\u2323":Lr.REL4,"\u2329":Lr.OPEN,"\u232a":Lr.CLOSE,"\u23aa":Lr.ORD,"\u23af":[0,0,ur.ORD,{stretchy:!0}],"\u23b0":Lr.OPEN,"\u23b1":Lr.CLOSE,"\u2500":Lr.ORD,"\u25b3":Lr.BIN4,"\u25b5":Lr.BIN4,"\u25b9":Lr.BIN4,"\u25bd":Lr.BIN4,"\u25bf":Lr.BIN4,"\u25c3":Lr.BIN4,"\u25ef":Lr.BIN3,"\u2660":Lr.ORD,"\u2661":Lr.ORD,"\u2662":Lr.ORD,"\u2663":Lr.ORD,"\u2758":Lr.REL,"\u27f0":Lr.RELSTRETCH,"\u27f1":Lr.RELSTRETCH,"\u27f5":Lr.WIDEREL,"\u27f6":Lr.WIDEREL,"\u27f7":Lr.WIDEREL,"\u27f8":Lr.WIDEREL,"\u27f9":Lr.WIDEREL,"\u27fa":Lr.WIDEREL,"\u27fb":Lr.WIDEREL,"\u27fc":Lr.WIDEREL,"\u27fd":Lr.WIDEREL,"\u27fe":Lr.WIDEREL,"\u27ff":Lr.WIDEREL,"\u2900":Lr.RELACCENT,"\u2901":Lr.RELACCENT,"\u2902":Lr.RELACCENT,"\u2903":Lr.RELACCENT,"\u2904":Lr.RELACCENT,"\u2905":Lr.RELACCENT,"\u2906":Lr.RELACCENT,"\u2907":Lr.RELACCENT,"\u2908":Lr.REL,"\u2909":Lr.REL,"\u290a":Lr.RELSTRETCH,"\u290b":Lr.RELSTRETCH,"\u290c":Lr.WIDEREL,"\u290d":Lr.WIDEREL,"\u290e":Lr.WIDEREL,"\u290f":Lr.WIDEREL,"\u2910":Lr.WIDEREL,"\u2911":Lr.RELACCENT,"\u2912":Lr.RELSTRETCH,"\u2913":Lr.RELSTRETCH,"\u2914":Lr.RELACCENT,"\u2915":Lr.RELACCENT,"\u2916":Lr.RELACCENT,"\u2917":Lr.RELACCENT,"\u2918":Lr.RELACCENT,"\u2919":Lr.RELACCENT,"\u291a":Lr.RELACCENT,"\u291b":Lr.RELACCENT,"\u291c":Lr.RELACCENT,"\u291d":Lr.RELACCENT,"\u291e":Lr.RELACCENT,"\u291f":Lr.RELACCENT,"\u2920":Lr.RELACCENT,"\u2921":Lr.RELSTRETCH,"\u2922":Lr.RELSTRETCH,"\u2923":Lr.REL,"\u2924":Lr.REL,"\u2925":Lr.REL,"\u2926":Lr.REL,"\u2927":Lr.REL,"\u2928":Lr.REL,"\u2929":Lr.REL,"\u292a":Lr.REL,"\u292b":Lr.REL,"\u292c":Lr.REL,"\u292d":Lr.REL,"\u292e":Lr.REL,"\u292f":Lr.REL,"\u2930":Lr.REL,"\u2931":Lr.REL,"\u2932":Lr.REL,"\u2933":Lr.RELACCENT,"\u2934":Lr.REL,"\u2935":Lr.REL,"\u2936":Lr.REL,"\u2937":Lr.REL,"\u2938":Lr.REL,"\u2939":Lr.REL,"\u293a":Lr.RELACCENT,"\u293b":Lr.RELACCENT,"\u293c":Lr.RELACCENT,"\u293d":Lr.RELACCENT,"\u293e":Lr.REL,"\u293f":Lr.REL,"\u2940":Lr.REL,"\u2941":Lr.REL,"\u2942":Lr.RELACCENT,"\u2943":Lr.RELACCENT,"\u2944":Lr.RELACCENT,"\u2945":Lr.RELACCENT,"\u2946":Lr.RELACCENT,"\u2947":Lr.RELACCENT,"\u2948":Lr.RELACCENT,"\u2949":Lr.REL,"\u294a":Lr.RELACCENT,"\u294b":Lr.RELACCENT,"\u294c":Lr.REL,"\u294d":Lr.REL,"\u294e":Lr.WIDEREL,"\u294f":Lr.RELSTRETCH,"\u2950":Lr.WIDEREL,"\u2951":Lr.RELSTRETCH,"\u2952":Lr.WIDEREL,"\u2953":Lr.WIDEREL,"\u2954":Lr.RELSTRETCH,"\u2955":Lr.RELSTRETCH,"\u2956":Lr.RELSTRETCH,"\u2957":Lr.RELSTRETCH,"\u2958":Lr.RELSTRETCH,"\u2959":Lr.RELSTRETCH,"\u295a":Lr.WIDEREL,"\u295b":Lr.WIDEREL,"\u295c":Lr.RELSTRETCH,"\u295d":Lr.RELSTRETCH,"\u295e":Lr.WIDEREL,"\u295f":Lr.WIDEREL,"\u2960":Lr.RELSTRETCH,"\u2961":Lr.RELSTRETCH,"\u2962":Lr.RELACCENT,"\u2963":Lr.REL,"\u2964":Lr.RELACCENT,"\u2965":Lr.REL,"\u2966":Lr.RELACCENT,"\u2967":Lr.RELACCENT,"\u2968":Lr.RELACCENT,"\u2969":Lr.RELACCENT,"\u296a":Lr.RELACCENT,"\u296b":Lr.RELACCENT,"\u296c":Lr.RELACCENT,"\u296d":Lr.RELACCENT,"\u296e":Lr.RELSTRETCH,"\u296f":Lr.RELSTRETCH,"\u2970":Lr.RELACCENT,"\u2971":Lr.RELACCENT,"\u2972":Lr.RELACCENT,"\u2973":Lr.RELACCENT,"\u2974":Lr.RELACCENT,"\u2975":Lr.RELACCENT,"\u2976":Lr.RELACCENT,"\u2977":Lr.RELACCENT,"\u2978":Lr.RELACCENT,"\u2979":Lr.RELACCENT,"\u297a":Lr.RELACCENT,"\u297b":Lr.RELACCENT,"\u297c":Lr.RELACCENT,"\u297d":Lr.RELACCENT,"\u297e":Lr.REL,"\u297f":Lr.REL,"\u2981":Lr.BIN3,"\u2982":Lr.BIN3,"\u2999":Lr.BIN3,"\u299a":Lr.BIN3,"\u299b":Lr.BIN3,"\u299c":Lr.BIN3,"\u299d":Lr.BIN3,"\u299e":Lr.BIN3,"\u299f":Lr.BIN3,"\u29a0":Lr.BIN3,"\u29a1":Lr.BIN3,"\u29a2":Lr.BIN3,"\u29a3":Lr.BIN3,"\u29a4":Lr.BIN3,"\u29a5":Lr.BIN3,"\u29a6":Lr.BIN3,"\u29a7":Lr.BIN3,"\u29a8":Lr.BIN3,"\u29a9":Lr.BIN3,"\u29aa":Lr.BIN3,"\u29ab":Lr.BIN3,"\u29ac":Lr.BIN3,"\u29ad":Lr.BIN3,"\u29ae":Lr.BIN3,"\u29af":Lr.BIN3,"\u29b0":Lr.BIN3,"\u29b1":Lr.BIN3,"\u29b2":Lr.BIN3,"\u29b3":Lr.BIN3,"\u29b4":Lr.BIN3,"\u29b5":Lr.BIN3,"\u29b6":Lr.BIN4,"\u29b7":Lr.BIN4,"\u29b8":Lr.BIN4,"\u29b9":Lr.BIN4,"\u29ba":Lr.BIN4,"\u29bb":Lr.BIN4,"\u29bc":Lr.BIN4,"\u29bd":Lr.BIN4,"\u29be":Lr.BIN4,"\u29bf":Lr.BIN4,"\u29c0":Lr.REL,"\u29c1":Lr.REL,"\u29c2":Lr.BIN3,"\u29c3":Lr.BIN3,"\u29c4":Lr.BIN4,"\u29c5":Lr.BIN4,"\u29c6":Lr.BIN4,"\u29c7":Lr.BIN4,"\u29c8":Lr.BIN4,"\u29c9":Lr.BIN3,"\u29ca":Lr.BIN3,"\u29cb":Lr.BIN3,"\u29cc":Lr.BIN3,"\u29cd":Lr.BIN3,"\u29ce":Lr.REL,"\u29cf":Lr.REL,"\u29cf\u0338":Lr.REL,"\u29d0":Lr.REL,"\u29d0\u0338":Lr.REL,"\u29d1":Lr.REL,"\u29d2":Lr.REL,"\u29d3":Lr.REL,"\u29d4":Lr.REL,"\u29d5":Lr.REL,"\u29d6":Lr.BIN4,"\u29d7":Lr.BIN4,"\u29d8":Lr.BIN3,"\u29d9":Lr.BIN3,"\u29db":Lr.BIN3,"\u29dc":Lr.BIN3,"\u29dd":Lr.BIN3,"\u29de":Lr.REL,"\u29df":Lr.BIN3,"\u29e0":Lr.BIN3,"\u29e1":Lr.REL,"\u29e2":Lr.BIN4,"\u29e3":Lr.REL,"\u29e4":Lr.REL,"\u29e5":Lr.REL,"\u29e6":Lr.REL,"\u29e7":Lr.BIN3,"\u29e8":Lr.BIN3,"\u29e9":Lr.BIN3,"\u29ea":Lr.BIN3,"\u29eb":Lr.BIN3,"\u29ec":Lr.BIN3,"\u29ed":Lr.BIN3,"\u29ee":Lr.BIN3,"\u29ef":Lr.BIN3,"\u29f0":Lr.BIN3,"\u29f1":Lr.BIN3,"\u29f2":Lr.BIN3,"\u29f3":Lr.BIN3,"\u29f4":Lr.REL,"\u29f5":Lr.BIN4,"\u29f6":Lr.BIN4,"\u29f7":Lr.BIN4,"\u29f8":Lr.BIN3,"\u29f9":Lr.BIN3,"\u29fa":Lr.BIN3,"\u29fb":Lr.BIN3,"\u29fe":Lr.BIN4,"\u29ff":Lr.BIN4,"\u2a1d":Lr.BIN3,"\u2a1e":Lr.BIN3,"\u2a1f":Lr.BIN3,"\u2a20":Lr.BIN3,"\u2a21":Lr.BIN3,"\u2a22":Lr.BIN4,"\u2a23":Lr.BIN4,"\u2a24":Lr.BIN4,"\u2a25":Lr.BIN4,"\u2a26":Lr.BIN4,"\u2a27":Lr.BIN4,"\u2a28":Lr.BIN4,"\u2a29":Lr.BIN4,"\u2a2a":Lr.BIN4,"\u2a2b":Lr.BIN4,"\u2a2c":Lr.BIN4,"\u2a2d":Lr.BIN4,"\u2a2e":Lr.BIN4,"\u2a2f":Lr.BIN4,"\u2a30":Lr.BIN4,"\u2a31":Lr.BIN4,"\u2a32":Lr.BIN4,"\u2a33":Lr.BIN4,"\u2a34":Lr.BIN4,"\u2a35":Lr.BIN4,"\u2a36":Lr.BIN4,"\u2a37":Lr.BIN4,"\u2a38":Lr.BIN4,"\u2a39":Lr.BIN4,"\u2a3a":Lr.BIN4,"\u2a3b":Lr.BIN4,"\u2a3c":Lr.BIN4,"\u2a3d":Lr.BIN4,"\u2a3e":Lr.BIN4,"\u2a3f":Lr.BIN4,"\u2a40":Lr.BIN4,"\u2a41":Lr.BIN4,"\u2a42":Lr.BIN4,"\u2a43":Lr.BIN4,"\u2a44":Lr.BIN4,"\u2a45":Lr.BIN4,"\u2a46":Lr.BIN4,"\u2a47":Lr.BIN4,"\u2a48":Lr.BIN4,"\u2a49":Lr.BIN4,"\u2a4a":Lr.BIN4,"\u2a4b":Lr.BIN4,"\u2a4c":Lr.BIN4,"\u2a4d":Lr.BIN4,"\u2a4e":Lr.BIN4,"\u2a4f":Lr.BIN4,"\u2a50":Lr.BIN4,"\u2a51":Lr.BIN4,"\u2a52":Lr.BIN4,"\u2a53":Lr.BIN4,"\u2a54":Lr.BIN4,"\u2a55":Lr.BIN4,"\u2a56":Lr.BIN4,"\u2a57":Lr.BIN4,"\u2a58":Lr.BIN4,"\u2a59":Lr.REL,"\u2a5a":Lr.BIN4,"\u2a5b":Lr.BIN4,"\u2a5c":Lr.BIN4,"\u2a5d":Lr.BIN4,"\u2a5e":Lr.BIN4,"\u2a5f":Lr.BIN4,"\u2a60":Lr.BIN4,"\u2a61":Lr.BIN4,"\u2a62":Lr.BIN4,"\u2a63":Lr.BIN4,"\u2a64":Lr.BIN4,"\u2a65":Lr.BIN4,"\u2a66":Lr.REL,"\u2a67":Lr.REL,"\u2a68":Lr.REL,"\u2a69":Lr.REL,"\u2a6a":Lr.REL,"\u2a6b":Lr.REL,"\u2a6c":Lr.REL,"\u2a6d":Lr.REL,"\u2a6e":Lr.REL,"\u2a6f":Lr.REL,"\u2a70":Lr.REL,"\u2a71":Lr.BIN4,"\u2a72":Lr.BIN4,"\u2a73":Lr.REL,"\u2a74":Lr.REL,"\u2a75":Lr.REL,"\u2a76":Lr.REL,"\u2a77":Lr.REL,"\u2a78":Lr.REL,"\u2a79":Lr.REL,"\u2a7a":Lr.REL,"\u2a7b":Lr.REL,"\u2a7c":Lr.REL,"\u2a7d":Lr.REL,"\u2a7d\u0338":Lr.REL,"\u2a7e":Lr.REL,"\u2a7e\u0338":Lr.REL,"\u2a7f":Lr.REL,"\u2a80":Lr.REL,"\u2a81":Lr.REL,"\u2a82":Lr.REL,"\u2a83":Lr.REL,"\u2a84":Lr.REL,"\u2a85":Lr.REL,"\u2a86":Lr.REL,"\u2a87":Lr.REL,"\u2a88":Lr.REL,"\u2a89":Lr.REL,"\u2a8a":Lr.REL,"\u2a8b":Lr.REL,"\u2a8c":Lr.REL,"\u2a8d":Lr.REL,"\u2a8e":Lr.REL,"\u2a8f":Lr.REL,"\u2a90":Lr.REL,"\u2a91":Lr.REL,"\u2a92":Lr.REL,"\u2a93":Lr.REL,"\u2a94":Lr.REL,"\u2a95":Lr.REL,"\u2a96":Lr.REL,"\u2a97":Lr.REL,"\u2a98":Lr.REL,"\u2a99":Lr.REL,"\u2a9a":Lr.REL,"\u2a9b":Lr.REL,"\u2a9c":Lr.REL,"\u2a9d":Lr.REL,"\u2a9e":Lr.REL,"\u2a9f":Lr.REL,"\u2aa0":Lr.REL,"\u2aa1":Lr.REL,"\u2aa1\u0338":Lr.REL,"\u2aa2":Lr.REL,"\u2aa2\u0338":Lr.REL,"\u2aa3":Lr.REL,"\u2aa4":Lr.REL,"\u2aa5":Lr.REL,"\u2aa6":Lr.REL,"\u2aa7":Lr.REL,"\u2aa8":Lr.REL,"\u2aa9":Lr.REL,"\u2aaa":Lr.REL,"\u2aab":Lr.REL,"\u2aac":Lr.REL,"\u2aad":Lr.REL,"\u2aae":Lr.REL,"\u2aaf":Lr.REL,"\u2aaf\u0338":Lr.REL,"\u2ab0":Lr.REL,"\u2ab0\u0338":Lr.REL,"\u2ab1":Lr.REL,"\u2ab2":Lr.REL,"\u2ab3":Lr.REL,"\u2ab4":Lr.REL,"\u2ab5":Lr.REL,"\u2ab6":Lr.REL,"\u2ab7":Lr.REL,"\u2ab8":Lr.REL,"\u2ab9":Lr.REL,"\u2aba":Lr.REL,"\u2abb":Lr.REL,"\u2abc":Lr.REL,"\u2abd":Lr.REL,"\u2abe":Lr.REL,"\u2abf":Lr.REL,"\u2ac0":Lr.REL,"\u2ac1":Lr.REL,"\u2ac2":Lr.REL,"\u2ac3":Lr.REL,"\u2ac4":Lr.REL,"\u2ac5":Lr.REL,"\u2ac6":Lr.REL,"\u2ac7":Lr.REL,"\u2ac8":Lr.REL,"\u2ac9":Lr.REL,"\u2aca":Lr.REL,"\u2acb":Lr.REL,"\u2acc":Lr.REL,"\u2acd":Lr.REL,"\u2ace":Lr.REL,"\u2acf":Lr.REL,"\u2ad0":Lr.REL,"\u2ad1":Lr.REL,"\u2ad2":Lr.REL,"\u2ad3":Lr.REL,"\u2ad4":Lr.REL,"\u2ad5":Lr.REL,"\u2ad6":Lr.REL,"\u2ad7":Lr.REL,"\u2ad8":Lr.REL,"\u2ad9":Lr.REL,"\u2ada":Lr.REL,"\u2adb":Lr.REL,"\u2add":Lr.REL,"\u2add\u0338":Lr.REL,"\u2ade":Lr.REL,"\u2adf":Lr.REL,"\u2ae0":Lr.REL,"\u2ae1":Lr.REL,"\u2ae2":Lr.REL,"\u2ae3":Lr.REL,"\u2ae4":Lr.REL,"\u2ae5":Lr.REL,"\u2ae6":Lr.REL,"\u2ae7":Lr.REL,"\u2ae8":Lr.REL,"\u2ae9":Lr.REL,"\u2aea":Lr.REL,"\u2aeb":Lr.REL,"\u2aec":Lr.REL,"\u2aed":Lr.REL,"\u2aee":Lr.REL,"\u2aef":Lr.REL,"\u2af0":Lr.REL,"\u2af1":Lr.REL,"\u2af2":Lr.REL,"\u2af3":Lr.REL,"\u2af4":Lr.BIN4,"\u2af5":Lr.BIN4,"\u2af6":Lr.BIN4,"\u2af7":Lr.REL,"\u2af8":Lr.REL,"\u2af9":Lr.REL,"\u2afa":Lr.REL,"\u2afb":Lr.BIN4,"\u2afd":Lr.BIN4,"\u2afe":Lr.BIN3,"\u2b45":Lr.RELSTRETCH,"\u2b46":Lr.RELSTRETCH,"\u3008":Lr.OPEN,"\u3009":Lr.CLOSE,"\ufe37":Lr.WIDEACCENT,"\ufe38":Lr.WIDEACCENT}};function Or(t,e){return t.length!==e.length?e.length-t.length:t===e?0:t<e?-1:1}function Dr(t){return t.replace(/([\^$(){}.+*?\-|[\]:\\])/g,"\\$1")}function Pr(t){return Array.from(t).map((t=>t.codePointAt(0)))}function Br(t){return String.fromCodePoint(...t)}function Fr(t){return!!t.match(/%\s*$/)}function jr(t){return t.trim().split(/\s+/)}function Ur(t){return t.replace(/\\U(?:([0-9A-Fa-f]{4})|\{\s*([0-9A-Fa-f]{1,6})\s*\})|\\./g,((t,e,s)=>"\\\\"===t?"\\":String.fromCodePoint(parseInt(e||s,16))))}function qr(t){return`&#x${t.codePointAt(0).toString(16).toUpperCase()};`}Rr.infix["^"]=Lr.WIDEREL,Rr.infix._=Lr.WIDEREL,Rr.infix["\u2adc"]=Lr.REL;class Hr extends Nr{constructor(){super(...arguments),this._texClass=null,this.lspace=5/18,this.rspace=5/18}get texClass(){return null===this._texClass?this.getOperatorDef(this.getText())[2]:this._texClass}set texClass(t){this._texClass=t}get kind(){return"mo"}get isEmbellished(){return!0}coreParent(){let t=null,e=this;const s=this.factory.getNodeClass("math");for(;e&&e.isEmbellished&&e.coreMO()===this&&!(e instanceof s);)t=e,e=e.parent;return t||this}coreText(t){if(!t)return"";if(t.isEmbellished)return t.coreMO().getText();for(;((t.isKind("mrow")||t.isKind("TeXAtom")||t.isKind("mstyle")||t.isKind("mphantom"))&&1===t.childNodes.length||t.isKind("munderover"))&&t.childNodes[0];)t=t.childNodes[0];return t.isToken?t.getText():""}hasSpacingAttributes(){return this.attributes.isSet("lspace")||this.attributes.isSet("rspace")}get isAccent(){let t=!1;const e=this.coreParent().parent;if(e){const s=e.isKind("mover")?e.childNodes[e.over].coreMO()?"accent":"":e.isKind("munder")?e.childNodes[e.under].coreMO()?"accentunder":"":e.isKind("munderover")?this===e.childNodes[e.over].coreMO()?"accent":this===e.childNodes[e.under].coreMO()?"accentunder":"":"";if(s){t=void 0!==e.attributes.getExplicit(s)?t:this.attributes.get("accent")}}return t}setTeXclass(t){const{form:e,fence:s}=this.attributes.getList("form","fence");return void 0===this.getProperty("texClass")&&this.hasSpacingAttributes()?null:(s&&this.texClass===ur.REL&&("prefix"===e&&(this.texClass=ur.OPEN),"postfix"===e&&(this.texClass=ur.CLOSE)),this.adjustTeXclass(t))}adjustTeXclass(t){const e=this.texClass;let s=this.prevClass;if(e===ur.NONE)return t;if(t?(!t.getProperty("autoOP")||e!==ur.BIN&&e!==ur.REL||(s=t.texClass=ur.ORD),s=this.prevClass=t.texClass||ur.ORD,this.prevLevel=this.attributes.getInherited("scriptlevel")):s=this.prevClass=ur.NONE,e!==ur.BIN||s!==ur.NONE&&s!==ur.BIN&&s!==ur.OP&&s!==ur.REL&&s!==ur.OPEN&&s!==ur.PUNCT)if(s!==ur.BIN||e!==ur.REL&&e!==ur.CLOSE&&e!==ur.PUNCT){if(e===ur.BIN){let t=null,e=this.parent;for(;e&&e.parent&&e.isEmbellished&&(1===e.childNodes.length||!e.isKind("mrow")&&e.core()===t);)t=e,e=e.parent;t=t||this,e.childNodes[e.childNodes.length-1]===t&&(this.texClass=ur.ORD)}}else t.texClass=this.prevClass=ur.ORD;else this.texClass=ur.ORD;return this}setInheritedAttributes(t={},e=!1,s=0,i=!1){super.setInheritedAttributes(t,e,s,i);const r=this.getText();this.checkOperatorTable(r),this.checkPseudoScripts(r),this.checkPrimes(r),this.checkMathAccent(r)}getOperatorDef(t){const[e,s,i]=this.handleExplicitForm(this.getForms());this.attributes.setInherited("form",e);const r=this.constructor,n=r.OPTABLE,o=n[e][t]||n[s][t]||n[i][t];if(o)return o;this.setProperty("noDictDef",!0);const a=this.attributes.get("movablelimits");if((!!t.match(r.opPattern)||a)&&void 0===this.getProperty("texClass"))return Ar(1,2,ur.OP);const c=Ir(t),[l,h]=r.MMLSPACING[c[2]];return Ar(l,h,c[2])}checkOperatorTable(t){const e=this.getOperatorDef(t);void 0===this.getProperty("texClass")&&(this.texClass=e[2]);for(const t of Object.keys(e[3]||{}))this.attributes.setInherited(t,e[3][t]);this.lspace=((e[0]||-1)+1)/18,this.rspace=((e[1]||-1)+1)/18}getForms(){let t=null,e=this.parent,s=this.Parent;for(;s&&s.isEmbellished;)t=e,e=s.parent,s=s.Parent;if(t=t||this,e&&e.isKind("mrow")&&1!==e.nonSpaceLength()){if(e.firstNonSpace()===t)return["prefix","infix","postfix"];if(e.lastNonSpace()===t)return["postfix","infix","prefix"]}return["infix","prefix","postfix"]}handleExplicitForm(t){if(this.attributes.isSet("form")){const e=this.attributes.get("form");t=[e].concat(t.filter((t=>t!==e)))}return t}checkPseudoScripts(t){const e=this.constructor.pseudoScripts;if(!t.match(e))return;const s=this.coreParent().Parent,i=!s||!(s.isKind("msubsup")&&!s.isKind("msub"));this.setProperty("pseudoscript",i),i&&(this.attributes.setInherited("lspace",0),this.attributes.setInherited("rspace",0))}checkPrimes(t){const e=this.constructor.primes;if(!t.match(e))return;const s=this.constructor.remapPrimes,i=Br(Pr(t).map((t=>s[t])));this.setProperty("primes",i)}checkMathAccent(t){const e=this.Parent;if(void 0!==this.getProperty("mathaccent")||!e||!e.isKind("munderover"))return;const[s,i,r]=e.childNodes;if(s.isEmbellished&&s.coreMO()===this)return;const n=!(!i||!i.isEmbellished||i.coreMO()!==this),o=!(!r||!r.isEmbellished||i.coreMO()!==this);(n||o)&&(this.isMathAccent(t)?this.setProperty("mathaccent",!0):this.isMathAccentWithWidth(t)&&this.setProperty("mathaccent",!1))}isMathAccent(t=this.getText()){const e=this.constructor.mathaccents;return!!t.match(e)}isMathAccentWithWidth(t=this.getText()){const e=this.constructor.mathaccentsWithWidth;return!!t.match(e)}}Hr.defaults=Object.assign(Object.assign({},Nr.defaults),{form:"infix",fence:!1,separator:!1,lspace:"thickmathspace",rspace:"thickmathspace",stretchy:!1,symmetric:!1,maxsize:"infinity",minsize:"0em",largeop:!1,movablelimits:!1,accent:!1,linebreak:"auto",lineleading:"100%",linebreakstyle:"before",indentalign:"auto",indentshift:"0",indenttarget:"",indentalignfirst:"indentalign",indentshiftfirst:"indentshift",indentalignlast:"indentalign",indentshiftlast:"indentshift"}),Hr.MMLSPACING=Sr,Hr.OPTABLE=Rr,Hr.pseudoScripts=new RegExp(["^[\"'*`","\xaa","\xb0","\xb2-\xb4","\xb9","\xba","\u2018-\u201f","\u2032-\u2037\u2057","\u2070\u2071","\u2074-\u207f","\u2080-\u208e","]+$"].join("")),Hr.primes=new RegExp(["^[\"'","\u2018-\u201f","]+$"].join("")),Hr.opPattern=/^[a-zA-Z]{2,}$/,Hr.remapPrimes={34:8243,39:8242,8216:8245,8217:8242,8218:8242,8219:8245,8220:8246,8221:8243,8222:8243,8223:8246},Hr.mathaccents=new RegExp(["^[","\xb4\u0301\u02ca","`\u0300\u02cb","\xa8\u0308","~\u0303\u02dc","\xaf\u0304\u02c9","\u02d8\u0306","\u02c7\u030c","^\u0302\u02c6","\u20d0\u20d1","\u20d6\u20d7\u20e1","\u02d9\u0307","\u02da\u030a","\u20db","\u20dc","]$"].join("")),Hr.mathaccentsWithWidth=new RegExp(["^[","\u2190\u2192\u2194","\u23dc\u23dd","\u23de\u23df","]$"].join(""));class Wr extends Nr{constructor(){super(...arguments),this.texclass=ur.ORD}get kind(){return"mtext"}get isSpacelike(){return!!this.getText().match(/^\s*$/)&&!this.attributes.hasOneOf(Wr.NONSPACELIKE)}}Wr.NONSPACELIKE=["style","mathbackground","background"],Wr.defaults=Object.assign({},Nr.defaults);class zr extends Nr{constructor(){super(...arguments),this.texclass=ur.NONE}setTeXclass(t){return t}get kind(){return"mspace"}get arity(){return 0}get isSpacelike(){return!this.attributes.hasExplicit("linebreak")&&this.canBreak}get hasNewline(){const t=this.attributes.get("linebreak");return this.canBreak&&("newline"===t||"indentingnewline"===t)}get canBreak(){return!this.attributes.hasOneOf(zr.NONSPACELIKE)&&"-"!==String(this.attributes.get("width")).trim().charAt(0)}}zr.NONSPACELIKE=["height","depth","style","mathbackground","background"],zr.defaults=Object.assign(Object.assign({},Nr.defaults),{width:"0em",height:"0ex",depth:"0ex",linebreak:"auto",indentshift:"auto",indentalign:"auto",indenttarget:"",indentalignfirst:"indentalign",indentshiftfirst:"indentshift",indentalignlast:"indentalign",indentshiftlast:"indentshift"});class Xr extends Nr{constructor(){super(...arguments),this.texclass=ur.ORD}get kind(){return"ms"}}Xr.defaults=Object.assign(Object.assign({},Nr.defaults),{lquote:'"',rquote:'"'});class Vr extends Er{constructor(){super(...arguments),this._core=null}get kind(){return"mrow"}get isSpacelike(){for(const t of this.childNodes)if(!t.isSpacelike)return!1;return!0}get isEmbellished(){let t=!1,e=0;for(const s of this.childNodes){if(s)if(s.isEmbellished){if(t)return!1;t=!0,this._core=e}else if(!s.isSpacelike)return!1;e++}return t}core(){return this.isEmbellished&&null!=this._core?this.childNodes[this._core]:this}coreMO(){return this.isEmbellished&&null!=this._core?this.childNodes[this._core].coreMO():this}nonSpaceLength(){let t=0;for(const e of this.childNodes)e&&!e.isSpacelike&&t++;return t}firstNonSpace(){for(const t of this.childNodes)if(t&&!t.isSpacelike)return t;return null}lastNonSpace(){let t=this.childNodes.length;for(;--t>=0;){const e=this.childNodes[t];if(e&&!e.isSpacelike)return e}return null}setTeXclass(t){if(null!=this.getProperty("open")||null!=this.getProperty("close")){this.getPrevClass(t),t=null;for(const e of this.childNodes)t=e.setTeXclass(t);return null==this.texClass&&(this.texClass=ur.INNER),this}for(const e of this.childNodes)t=e.setTeXclass(t);return this.childNodes[0]&&this.updateTeXclass(this.childNodes[0]),t}}Vr.defaults=Object.assign({},Er.defaults);class Gr extends Vr{get kind(){return"inferredMrow"}get isInferred(){return!0}get notParent(){return!0}toString(){return"["+this.childNodes.join(",")+"]"}}Gr.defaults=Vr.defaults;class Jr extends xr{get kind(){return"mfrac"}get arity(){return 2}get linebreakContainer(){return!0}get linebreakAlign(){return""}setTeXclass(t){this.getPrevClass(t);for(const t of this.childNodes)t.setTeXclass(null);return this}setChildInheritedAttributes(t,e,s,i){(!e||s>0)&&s++;const r=this.attributes.get("numalign"),n=this.attributes.get("denomalign"),o=this.addInheritedAttributes(Object.assign({},t),{numalign:r,indentshift:"0",indentalignfirst:r,indentshiftfirst:"0",indentalignlast:"indentalign",indentshiftlast:"indentshift"}),a=this.addInheritedAttributes(Object.assign({},t),{denalign:n,indentshift:"0",indentalignfirst:n,indentshiftfirst:"0",indentalignlast:"indentalign",indentshiftlast:"indentshift"});this.childNodes[0].setInheritedAttributes(o,!1,s,i),this.childNodes[1].setInheritedAttributes(a,!1,s,!0)}}Jr.defaults=Object.assign(Object.assign({},xr.defaults),{linethickness:"medium",numalign:"center",denomalign:"center",bevelled:!1});class Kr extends Er{constructor(){super(...arguments),this.texclass=ur.ORD}get kind(){return"msqrt"}get arity(){return-1}get linebreakContainer(){return!0}setTeXclass(t){return this.getPrevClass(t),this.childNodes[0].setTeXclass(null),this}setChildInheritedAttributes(t,e,s,i){this.childNodes[0].setInheritedAttributes(t,e,s,!0)}}Kr.defaults=Object.assign(Object.assign({},Er.defaults),{"data-vertical-align":"bottom"});class $r extends Er{constructor(){super(...arguments),this.texclass=ur.ORD}get kind(){return"mroot"}get arity(){return 2}get linebreakContainer(){return!0}setTeXclass(t){return this.getPrevClass(t),this.childNodes[0].setTeXclass(null),this.childNodes[1].setTeXclass(null),this}setChildInheritedAttributes(t,e,s,i){this.childNodes[0].setInheritedAttributes(t,e,s,!0),this.childNodes[1].setInheritedAttributes(t,!1,s+2,i)}}$r.defaults=Object.assign(Object.assign({},Er.defaults),{"data-vertical-align":"bottom"});class Yr extends yr{get kind(){return"mstyle"}get notParent(){return this.childNodes[0]&&1===this.childNodes[0].childNodes.length}setInheritedAttributes(t={},e=!1,s=0,i=!1){this.attributes.setInherited("displaystyle",e),this.attributes.setInherited("scriptlevel",s),super.setInheritedAttributes(t,e,s,i)}setChildInheritedAttributes(t,e,s,i){let r=this.attributes.getExplicit("scriptlevel");null!=r&&(r=r.toString(),r.match(/^\s*[-+]/)?s+=parseInt(r):s=parseInt(r),i=!1);const n=this.attributes.getExplicit("displaystyle");null!=n&&(e=!0===n,i=!1);const o=this.attributes.getExplicit("data-cramped");null!=o&&(i=o),t=this.addInheritedAttributes(t,this.attributes.getAllAttributes()),this.childNodes[0].setInheritedAttributes(t,e,s,i)}}Yr.defaults=Object.assign(Object.assign({},yr.defaults),{scriptlevel:cr,displaystyle:cr,scriptsizemultiplier:1/Math.sqrt(2),scriptminsize:".4em",mathbackground:cr,mathcolor:cr,dir:cr,infixlinebreakstyle:"before"});class Qr extends Er{constructor(){super(...arguments),this.texclass=ur.ORD}get kind(){return"merror"}get arity(){return-1}get linebreakContainer(){return!0}}Qr.defaults=Object.assign({},Er.defaults);class Zr extends yr{get kind(){return"mpadded"}get linebreakContainer(){return!0}setTeXclass(t){return this.getProperty("vbox")?(this.getPrevClass(t),this.texClass=ur.ORD,this.childNodes[0].setTeXclass(null),this):super.setTeXclass(t)}}Zr.defaults=Object.assign(Object.assign({},yr.defaults),{width:"",height:"",depth:"",lspace:0,voffset:0});class tn extends yr{constructor(){super(...arguments),this.texclass=ur.ORD}get kind(){return"mphantom"}}tn.defaults=Object.assign({},yr.defaults);class en extends Er{constructor(){super(...arguments),this.texclass=ur.INNER,this.separators=[],this.open=null,this.close=null}get kind(){return"mfenced"}setTeXclass(t){this.getPrevClass(t),this.open&&(t=this.open.setTeXclass(t)),this.childNodes[0]&&(t=this.childNodes[0].setTeXclass(t));for(let e=1,s=this.childNodes.length;e<s;e++)this.separators[e-1]&&(t=this.separators[e-1].setTeXclass(t)),this.childNodes[e]&&(t=this.childNodes[e].setTeXclass(t));return this.close&&(t=this.close.setTeXclass(t)),this.updateTeXclass(this.open),t}setChildInheritedAttributes(t,e,s,i){this.addFakeNodes();for(const r of[this.open,this.close].concat(this.separators))r&&r.setInheritedAttributes(t,e,s,i);super.setChildInheritedAttributes(t,e,s,i)}addFakeNodes(){let{open:t,close:e,separators:s}=this.attributes.getList("open","close","separators");if(t=t.replace(/[ \t\n\r]/g,""),e=e.replace(/[ \t\n\r]/g,""),s=s.replace(/[ \t\n\r]/g,""),t&&(this.open=this.fakeNode(t,{fence:!0,form:"prefix"},ur.OPEN)),s){for(;s.length<this.childNodes.length-1;)s+=s.charAt(s.length-1);let t=0;for(const e of this.childNodes.slice(1))e&&this.separators.push(this.fakeNode(s.charAt(t++)))}e&&(this.close=this.fakeNode(e,{fence:!0,form:"postfix"},ur.CLOSE))}fakeNode(t,e={},s=null){const i=this.factory.create("text").setText(t),r=this.factory.create("mo",e,[i]);return r.texClass=s,r.parent=this,r}}en.defaults=Object.assign(Object.assign({},Er.defaults),{open:"(",close:")",separators:","});class sn extends Er{constructor(){super(...arguments),this.texclass=ur.ORD}get kind(){return"menclose"}get arity(){return-1}get linebreakContainer(){return!0}setTeXclass(t){return t=this.childNodes[0].setTeXclass(t),this.updateTeXclass(this.childNodes[0]),t}}sn.defaults=Object.assign(Object.assign({},Er.defaults),{notation:"longdiv"});class rn extends Er{get kind(){return"maction"}get arity(){return 1}get selected(){const t=this.attributes.get("selection"),e=Math.max(1,Math.min(this.childNodes.length,t))-1;return this.childNodes[e]||this.factory.create("mrow")}get isEmbellished(){return this.selected.isEmbellished}get isSpacelike(){return this.selected.isSpacelike}core(){return this.selected.core()}coreMO(){return this.selected.coreMO()}verifyAttributes(t){super.verifyAttributes(t),"toggle"!==this.attributes.get("actiontype")&&this.attributes.hasExplicit("selection")&&this.attributes.unset("selection")}setTeXclass(t){"tooltip"===this.attributes.get("actiontype")&&this.childNodes[1]&&this.childNodes[1].setTeXclass(null);const e=this.selected;return t=e.setTeXclass(t),this.updateTeXclass(e),t}nextToggleSelection(){let t=Math.max(1,parseInt(this.attributes.get("selection"))+1);t>this.childNodes.length&&(t=1),this.attributes.set("selection",t)}setChildInheritedAttributes(t,e,s,i){var r,n;"tooltip"===this.attributes.get("actiontype").toLowerCase()?(null===(r=this.childNodes[0])||void 0===r||r.setInheritedAttributes(t,e,s,i),null===(n=this.childNodes[1])||void 0===n||n.setInheritedAttributes(t,!1,1,!1)):super.setChildInheritedAttributes(t,e,s,i)}}rn.defaults=Object.assign(Object.assign({},Er.defaults),{actiontype:"toggle",selection:1});class nn extends xr{get kind(){return"msubsup"}get arity(){return 3}get base(){return 0}get sub(){return 1}get sup(){return 2}setChildInheritedAttributes(t,e,s,i){const r=this.childNodes;r[0].setInheritedAttributes(t,e,s,i),r[1].setInheritedAttributes(t,!1,s+1,i||1===this.sub),r[2]&&r[2].setInheritedAttributes(t,!1,s+1,i||2===this.sub)}}nn.defaults=Object.assign(Object.assign({},xr.defaults),{subscriptshift:"",superscriptshift:""});class on extends nn{get kind(){return"msub"}get arity(){return 2}}on.defaults=Object.assign({},nn.defaults);class an extends nn{get kind(){return"msup"}get arity(){return 2}get sup(){return 1}get sub(){return 2}}an.defaults=Object.assign({},nn.defaults);class cn extends xr{get kind(){return"munderover"}get arity(){return 3}get base(){return 0}get under(){return 1}get over(){return 2}get linebreakContainer(){return!0}setChildInheritedAttributes(t,e,s,i){const r=this.childNodes;r[0].setInheritedAttributes(t,e,s,i||!!r[this.over]);const n=!(e||!r[0].coreMO().attributes.get("movablelimits")),o=this.constructor.ACCENTS;r[1].setInheritedAttributes(t,!1,this.getScriptlevel(o[1],n,s),i||1===this.under),this.setInheritedAccent(1,o[1],e,s,i,n),r[2]&&(r[2].setInheritedAttributes(t,!1,this.getScriptlevel(o[2],n,s),i||2===this.under),this.setInheritedAccent(2,o[2],e,s,i,n))}getScriptlevel(t,e,s){return!e&&this.attributes.get(t)||s++,s}setInheritedAccent(t,e,s,i,r,n){const o=this.childNodes[t];if(!this.attributes.hasExplicit(e)&&o.isEmbellished){const t=o.coreMO().attributes.get("accent");this.attributes.setInherited(e,t),t!==this.attributes.getDefault(e)&&o.setInheritedAttributes({},s,this.getScriptlevel(e,n,i),r)}}}cn.defaults=Object.assign(Object.assign({},xr.defaults),{accent:!1,accentunder:!1,align:"center"}),cn.ACCENTS=["","accentunder","accent"];class ln extends cn{get kind(){return"munder"}get arity(){return 2}}ln.defaults=Object.assign({},cn.defaults);class hn extends cn{get kind(){return"mover"}get arity(){return 2}get over(){return 1}get under(){return 2}}hn.defaults=Object.assign({},cn.defaults),hn.ACCENTS=["","accent","accentunder"];class dn extends nn{get kind(){return"mmultiscripts"}get arity(){return 1}setChildInheritedAttributes(t,e,s,i){this.childNodes[0].setInheritedAttributes(t,e,s,i);let r=!1;for(let e=1,n=0;e<this.childNodes.length;e++){const o=this.childNodes[e];if(o.isKind("mprescripts")){if(!r&&(r=!0,e%2==0)){const t=this.factory.create("none");this.childNodes.splice(e,0,t),t.parent=this,e++}}else{const e=i||n%2==0;o.setInheritedAttributes(t,!1,s+1,e),n++}}this.childNodes.length%2==(r?1:0)&&(this.appendChild(this.factory.create("none")),this.childNodes[this.childNodes.length-1].setInheritedAttributes(t,!1,s+1,i))}verifyChildren(t){let e=!1;const s=t.fixMmultiscripts;for(let i=0;i<this.childNodes.length;i++){const r=this.childNodes[i];r.isKind("mprescripts")&&(e?r.mError(r.kind+" can only appear once in "+this.kind,t,!0):(e=!0,i%2!=0||s||this.mError("There must be an equal number of prescripts of each type",t)))}this.childNodes.length%2!=(e?1:0)||s||this.mError("There must be an equal number of scripts of each type",t),super.verifyChildren(t)}}dn.defaults=Object.assign({},nn.defaults);class un extends Er{get kind(){return"mprescripts"}get arity(){return 0}verifyTree(t){super.verifyTree(t),this.parent&&!this.parent.isKind("mmultiscripts")&&this.mError(this.kind+" must be a child of mmultiscripts",t,!0)}}un.defaults=Object.assign({},Er.defaults);class pn extends Er{get kind(){return"none"}get arity(){return 0}verifyTree(t){super.verifyTree(t),this.parent&&!this.parent.isKind("mmultiscripts")&&this.mError(this.kind+" must be a child of mmultiscripts",t,!0)}}pn.defaults=Object.assign({},Er.defaults);class mn extends Er{constructor(){super(...arguments),this.properties={useHeight:!0},this.texclass=ur.ORD}get kind(){return"mtable"}get linebreakContainer(){return!0}get linebreakAlign(){return""}setInheritedAttributes(t,e,s,i){for(const e of br)t[e]&&this.attributes.setInherited(e,t[e][1]),this.attributes.hasExplicit(e)&&this.attributes.unset(e);super.setInheritedAttributes(t,e,s,i)}setChildInheritedAttributes(t,e,s,i){for(const t of this.childNodes)t.isKind("mtr")||this.replaceChild(this.factory.create("mtr"),t).appendChild(t);e=!(!this.attributes.getExplicit("displaystyle")&&!this.attributes.getDefault("displaystyle")),t=this.addInheritedAttributes(t,{columnalign:this.attributes.get("columnalign"),rowalign:"center","data-break-align":this.attributes.get("data-break-align")});const r=this.attributes.getExplicit("data-cramped"),n=jr(this.attributes.get("rowalign"));for(const i of this.childNodes)t.rowalign[1]=n.shift()||t.rowalign[1],i.setInheritedAttributes(t,e,s,!!r)}verifyChildren(t){let e=null;const s=this.factory;for(let i=0;i<this.childNodes.length;i++){const r=this.childNodes[i];if(r.isKind("mtr"))e=null;else{const n=r.isKind("mtd");if(e?(this.removeChild(r),i--):e=this.replaceChild(s.create("mtr"),r),e.appendChild(n?r:s.create("mtd",{},[r])),!t.fixMtables){r.parent.removeChild(r),r.parent=this,n&&e.appendChild(s.create("mtd"));const i=r.mError("Children of "+this.kind+" must be mtr or mlabeledtr",t,n);e.childNodes[e.childNodes.length-1].appendChild(i)}}}super.verifyChildren(t)}setTeXclass(t){this.getPrevClass(t);for(const t of this.childNodes)t.setTeXclass(null);return this}}mn.defaults=Object.assign(Object.assign({},Er.defaults),{align:"axis",rowalign:"baseline",columnalign:"center",groupalign:"{left}",alignmentscope:!0,columnwidth:"auto",width:"auto",rowspacing:"1ex",columnspacing:".8em",rowlines:"none",columnlines:"none",frame:"none",framespacing:"0.4em 0.5ex",equalrows:!1,equalcolumns:!1,displaystyle:!1,side:"right",minlabelspacing:"0.8em","data-break-align":"top"});class fn extends Er{get kind(){return"mtr"}get linebreakContainer(){return!0}get linebreakAlign(){return""}setChildInheritedAttributes(t,e,s,i){for(const t of this.childNodes)t.isKind("mtd")||this.replaceChild(this.factory.create("mtd"),t).appendChild(t);const r=jr(this.attributes.get("columnalign")),n=jr(this.attributes.get("data-break-align"));1===this.arity&&(r.unshift(this.parent.attributes.get("side")),n.unshift("top")),t=this.addInheritedAttributes(t,{rowalign:this.attributes.get("rowalign"),columnalign:"center","data-break-align":"top"});for(const o of this.childNodes)t.columnalign[1]=r.shift()||t.columnalign[1],t["data-vertical-align"]=[this.kind,n.shift()||t["data-break-align"][1]],o.setInheritedAttributes(t,e,s,i)}verifyChildren(t){if(!this.parent||this.parent.isKind("mtable")){for(const e of this.childNodes)if(!e.isKind("mtd")){this.replaceChild(this.factory.create("mtd"),e).appendChild(e),t.fixMtables||e.mError("Children of "+this.kind+" must be mtd",t)}super.verifyChildren(t)}else this.mError(this.kind+" can only be a child of an mtable",t,!0)}setTeXclass(t){this.getPrevClass(t);for(const t of this.childNodes)t.setTeXclass(null);return this}}fn.defaults=Object.assign(Object.assign({},Er.defaults),{rowalign:cr,columnalign:cr,groupalign:cr,"data-break-align":"top"});class gn extends fn{get kind(){return"mlabeledtr"}get arity(){return 1}}class bn extends xr{get kind(){return"mtd"}get arity(){return-1}get linebreakContainer(){return!0}get linebreakAlign(){return"columnalign"}verifyChildren(t){!this.parent||this.parent.isKind("mtr")?super.verifyChildren(t):this.mError(this.kind+" can only be a child of an mtr or mlabeledtr",t,!0)}setTeXclass(t){return this.getPrevClass(t),this.childNodes[0].setTeXclass(null),this}}bn.defaults=Object.assign(Object.assign({},xr.defaults),{rowspan:1,columnspan:1,rowalign:cr,columnalign:cr,groupalign:cr,"data-vertical-align":"top"});class En extends yr{get kind(){return"maligngroup"}get isSpacelike(){return!0}setChildInheritedAttributes(t,e,s,i){t=this.addInheritedAttributes(t,this.attributes.getAllAttributes()),super.setChildInheritedAttributes(t,e,s,i)}}En.defaults=Object.assign(Object.assign({},yr.defaults),{groupalign:cr});class Nn extends Er{get kind(){return"malignmark"}get arity(){return 0}get isSpacelike(){return!0}}Nn.defaults=Object.assign(Object.assign({},Er.defaults),{edge:"left"});class yn extends Nr{constructor(){super(...arguments),this.texclass=ur.ORD}get kind(){return"mglyph"}verifyAttributes(t){const{src:e,fontfamily:s,index:i}=this.attributes.getList("src","fontfamily","index");""!==e||""!==s&&""!==i?super.verifyAttributes(t):this.mError("mglyph must have either src or fontfamily and index attributes",t,!0)}}yn.defaults=Object.assign(Object.assign({},Nr.defaults),{alt:"",src:"",index:"",width:"auto",height:"auto",valign:"0em"});class xn extends xr{get kind(){return"semantics"}get arity(){return 1}get notParent(){return!0}}xn.defaults=Object.assign(Object.assign({},xr.defaults),{definitionUrl:null,encoding:null});class vn extends Er{get kind(){return"annotation-xml"}setChildInheritedAttributes(){}}vn.defaults=Object.assign(Object.assign({},Er.defaults),{definitionUrl:null,encoding:null,cd:"mathmlkeys",name:"",src:null});class Cn extends vn{constructor(){super(...arguments),this.properties={isChars:!0}}get kind(){return"annotation"}}Cn.defaults=Object.assign({},vn.defaults);class Tn extends xr{get kind(){return"TeXAtom"}get arity(){return-1}get notParent(){return!0}constructor(t,e,s){super(t,e,s),this.texclass=ur.ORD,this.setProperty("texClass",this.texClass)}setTeXclass(t){return this.childNodes[0].setTeXclass(null),this.adjustTeXclass(t)}adjustTeXclass(t){return t}}Tn.defaults=Object.assign({},xr.defaults),Tn.prototype.adjustTeXclass=Hr.prototype.adjustTeXclass;class wn extends xr{get kind(){return"MathChoice"}get arity(){return 4}get notParent(){return!0}setInheritedAttributes(t,e,s,i){const r=e?0:Math.max(0,Math.min(s,2))+1,n=this.childNodes[r]||this.factory.create("mrow");this.parent.replaceChild(n,this),n.setInheritedAttributes(t,e,s,i)}}wn.defaults=Object.assign({},xr.defaults);class _n extends Tr{get kind(){return"html"}getHTML(){return this.getXML()}setHTML(t,e=null){try{e.getAttribute(t,"data-mjx-hdw")}catch(s){t=e.node("span",{},[t])}return this.setXML(t,e)}getSerializedHTML(){return this.adaptor.outerHTML(this.xml)}textContent(){return this.adaptor.textContent(this.xml)}toString(){const t=this.adaptor.kind(this.xml);return`HTML=<${t}>...</${t}>`}verifyTree(t){!this.parent||this.parent.isToken||this.mError("HTML can only be a child of a token element",t,!0)}}const kn={[wr.prototype.kind]:wr,[_r.prototype.kind]:_r,[kr.prototype.kind]:kr,[Hr.prototype.kind]:Hr,[Wr.prototype.kind]:Wr,[zr.prototype.kind]:zr,[Xr.prototype.kind]:Xr,[Vr.prototype.kind]:Vr,[Gr.prototype.kind]:Gr,[Jr.prototype.kind]:Jr,[Kr.prototype.kind]:Kr,[$r.prototype.kind]:$r,[Yr.prototype.kind]:Yr,[Qr.prototype.kind]:Qr,[Zr.prototype.kind]:Zr,[tn.prototype.kind]:tn,[en.prototype.kind]:en,[sn.prototype.kind]:sn,[rn.prototype.kind]:rn,[on.prototype.kind]:on,[an.prototype.kind]:an,[nn.prototype.kind]:nn,[ln.prototype.kind]:ln,[hn.prototype.kind]:hn,[cn.prototype.kind]:cn,[dn.prototype.kind]:dn,[un.prototype.kind]:un,[pn.prototype.kind]:pn,[mn.prototype.kind]:mn,[gn.prototype.kind]:gn,[fn.prototype.kind]:fn,[bn.prototype.kind]:bn,[En.prototype.kind]:En,[Nn.prototype.kind]:Nn,[yn.prototype.kind]:yn,[xn.prototype.kind]:xn,[Cn.prototype.kind]:Cn,[vn.prototype.kind]:vn,[Tn.prototype.kind]:Tn,[wn.prototype.kind]:wn,[Cr.prototype.kind]:Cr,[Tr.prototype.kind]:Tr,[_n.prototype.kind]:_n};class An extends ar{get MML(){return this.node}}An.defaultNodes=kn;class Ln{constructor(){this.bits=0}static allocate(...t){for(const e of t){if(this.has(e))throw new Error("Bit already allocated for "+e);if(this.next===Ln.MAXBIT)throw new Error("Maximum number of bits already allocated");this.names.set(e,this.next),this.next<<=1}}static has(t){return this.names.has(t)}set(t){this.bits|=this.getBit(t)}clear(t){this.bits&=~this.getBit(t)}isSet(t){return!!(this.bits&this.getBit(t))}reset(){this.bits=0}getBit(t){const e=this.constructor.names.get(t);if(!e)throw new Error("Unknown bit-field name: "+t);return e}}function Mn(...t){const e=class extends Ln{};return e.allocate(...t),e}function In(t){return new Promise((function e(s,i){const r=t=>{var r;t.retry instanceof Promise?t.retry.then((()=>e(s,i))).catch((t=>i(t))):(null===(r=t.restart)||void 0===r?void 0:r.isCallback)?MathJax.Callback.After((()=>e(s,i)),t.restart):i(t)};try{const e=t();e instanceof Promise?e.then((t=>s(t))).catch((t=>r(t))):s(e)}catch(t){r(t)}}))}function Sn(t){const e=new Error("MathJax retry -- an asynchronous action is required; try using one of the promise-based functions and await its resolution.");throw e.retry=t,e}Ln.MAXBIT=1<<31,Ln.next=1,Ln.names=new Map;var Rn=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};class On extends pi{static create(t){const e=new this;for(const s of Object.keys(t)){const[i,r]=this.action(s,t[s]);r&&e.add(i,r)}return e}static action(t,e){let s,i,r=!0;const n=e[0];if(1===e.length||"boolean"==typeof e[1])2===e.length&&(r=e[1]),[s,i]=this.methodActions(t);else if("string"==typeof e[1])if("string"==typeof e[2]){4===e.length&&(r=e[3]);const[t,n]=e.slice(1);[s,i]=this.methodActions(t,n)}else 3===e.length&&(r=e[2]),[s,i]=this.methodActions(e[1]);else 4===e.length&&(r=e[3]),[s,i]=e.slice(1);return[{id:t,renderDoc:s,renderMath:i,convert:r},n]}static methodActions(t,e=t){return[e=>(t&&e[t](),!1),(t,s)=>(e&&t[e](s),!1)]}renderDoc(t,e=rr.UNPROCESSED){for(const s of this.items)if(s.priority>=e&&s.item.renderDoc(t))return}renderMath(t,e,s=rr.UNPROCESSED){for(const i of this.items)if(i.priority>=s&&i.item.renderMath(t,e))return}renderConvert(t,e,s=rr.LAST){for(const i of this.items){if(i.priority>s)return;if(i.item.convert&&i.item.renderMath(t,e))return}}findID(t){for(const e of this.items)if(e.item.id===t)return e.item;return null}}const Dn={all:!1,processed:!1,inputJax:null,outputJax:null},Pn={all:!0,processed:!0,inputJax:[],outputJax:[]};class Bn extends $i{compile(t){return null}}class Fn extends Yi{typeset(t,e=null){return null}escaped(t,e){return null}}class jn extends er{}class Un{constructor(t,e,s){const i=this.constructor;this.document=t,this.options=Oi(Ri({},i.OPTIONS),s),this.math=new(this.options.MathList||jn),this.renderActions=On.create(this.options.renderActions),this._actionPromises=[],this._readyPromise=Promise.resolve(),this.processed=new Un.ProcessBits,this.outputJax=this.options.OutputJax||new Fn;let r=this.options.InputJax||[new Bn];Array.isArray(r)||(r=[r]),this.inputJax=r,this.adaptor=e,this.outputJax.setAdaptor(e),this.inputJax.map((t=>t.setAdaptor(e))),this.mmlFactory=this.options.MmlFactory||new An,this.inputJax.map((t=>t.setMmlFactory(this.mmlFactory))),this.outputJax.initialize(),this.inputJax.map((t=>t.initialize()))}get kind(){return this.constructor.KIND}addRenderAction(t,...e){const[s,i]=On.action(t,e);this.renderActions.add(s,i)}removeRenderAction(t){const e=this.renderActions.findID(t);e&&this.renderActions.remove(e)}render(){return this.clearPromises(),this.renderActions.renderDoc(this),this}renderPromise(){return this.whenReady((()=>In((()=>Rn(this,void 0,void 0,(function*(){return this.render(),yield this.actionPromises(),this.clearPromises(),this}))))))}rerender(t=rr.RERENDER){return this.state(t-1),this.render(),this}rerenderPromise(t=rr.RERENDER){return this.whenReady((()=>In((()=>Rn(this,void 0,void 0,(function*(){return this.rerender(t),yield this.actionPromises(),this.clearPromises(),this}))))))}convert(t,e={}){let{format:s,display:i,end:r,ex:n,em:o,containerWidth:a,scale:c,family:l}=Oi({format:this.inputJax[0].name,display:!0,end:rr.LAST,em:16,ex:8,containerWidth:null,scale:1,family:""},e);null===a&&(a=80*n);const h=this.inputJax.reduce(((t,e)=>e.name===s?e:t),null),d=new this.options.MathItem(t,h,i);return d.start.node=this.adaptor.body(this.document),d.setMetrics(o,n,a,c),l&&this.outputJax.options.mtextInheritFont&&(d.outputData.mtextFamily=l),l&&this.outputJax.options.merrorInheritFont&&(d.outputData.merrorFamily=l),this.clearPromises(),d.convert(this,r),d.typesetRoot||d.root}convertPromise(t,e={}){return this.whenReady((()=>In((()=>Rn(this,void 0,void 0,(function*(){const s=this.convert(t,e);return yield this.actionPromises(),this.clearPromises(),s}))))))}whenReady(t){return this._readyPromise=this._readyPromise.catch((t=>{})).then((()=>{const e=this._readyPromise;this._readyPromise=Promise.resolve();const s=t(),i=this._readyPromise.then((()=>s));return this._readyPromise=e,i}))}actionPromises(){return Promise.all(this._actionPromises)}clearPromises(){this._actionPromises=[]}savePromise(t){this._actionPromises.push(t)}findMath(t=null){return this.processed.set("findMath"),this}compile(){if(!this.processed.isSet("compile")){const t=[];for(const e of this.math)this.compileMath(e),void 0!==e.inputData.recompile&&t.push(e);for(const e of t){const t=e.inputData.recompile;e.state(t.state),e.inputData.recompile=t,this.compileMath(e)}this.processed.set("compile")}return this}compileMath(t){try{t.compile(this)}catch(e){if(e.retry||e.restart)throw e;this.options.compileError(this,t,e),t.inputData.error=e}}compileError(t,e){t.root=this.mmlFactory.create("math",null,[this.mmlFactory.create("merror",{"data-mjx-error":e.message,title:e.message},[this.mmlFactory.create("mtext",null,[this.mmlFactory.create("text").setText("Math input error")])])]),t.display&&t.root.attributes.set("display","block"),t.inputData.error=e.message}typeset(){if(!this.processed.isSet("typeset")){for(const t of this.math)try{t.typeset(this)}catch(e){if(e.retry||e.restart)throw e;this.options.typesetError(this,t,e),t.outputData.error=e}this.processed.set("typeset")}return this}typesetError(t,e){t.typesetRoot=this.adaptor.node("mjx-container",{class:"MathJax mjx-output-error",jax:this.outputJax.name},[this.adaptor.node("span",{"data-mjx-error":e.message,title:e.message,style:{color:"red","background-color":"yellow","line-height":"normal"}},[this.adaptor.text("Math output error")])]),t.display&&this.adaptor.setAttributes(t.typesetRoot,{style:{display:"block",margin:"1em 0","text-align":"center"}}),t.outputData.error=e.message}getMetrics(){return this.processed.isSet("getMetrics")||(this.outputJax.getMetrics(this),this.processed.set("getMetrics")),this}updateDocument(){if(!this.processed.isSet("updateDocument")){for(const t of this.math.reversed())t.updateDocument(this);this.processed.set("updateDocument")}return this}removeFromDocument(t=!1){return this}state(t,e=!1){for(const s of this.math)s.state(t,e);return t<rr.INSERTED&&this.processed.clear("updateDocument"),t<rr.TYPESET&&(this.processed.clear("typeset"),this.processed.clear("getMetrics")),t<rr.COMPILED&&this.processed.clear("compile"),t<rr.FINDMATH&&this.processed.clear("findMath"),this}reset(t={processed:!0}){return(t=Oi(Object.assign({},Dn),t)).all&&Object.assign(t,Pn),t.processed&&this.processed.reset(),t.inputJax&&this.inputJax.forEach((e=>e.reset(...t.inputJax))),t.outputJax&&this.outputJax.reset(...t.outputJax),this}clear(){return this.reset(),this.math.clear(),this}done(){return Promise.resolve()}concat(t){return this.math.merge(t),this}clearMathItemsWithin(t){const e=this.getMathItemsWithin(t);for(const t of e.slice(0).reverse())t.clear();return this.math.remove(...e),e}getMathItemsWithin(t){Array.isArray(t)||(t=[t]);const e=this.adaptor,s=[],i=e.getElements(t,this.document);t:for(const t of this.math)for(const r of i)if(t.start.node&&e.contains(r,t.start.node)){s.push(t);continue t}return s}}Un.KIND="MathDocument",Un.OPTIONS={OutputJax:null,InputJax:null,MmlFactory:null,MathList:jn,MathItem:class extends ir{},compileError:(t,e,s)=>{t.compileError(e,s)},typesetError:(t,e,s)=>{t.typesetError(e,s)},renderActions:Ai({find:[rr.FINDMATH,"findMath","",!1],compile:[rr.COMPILED],metrics:[rr.METRICS,"getMetrics","",!1],typeset:[rr.TYPESET],update:[rr.INSERTED,"updateDocument",!1]})},Un.ProcessBits=Mn("findMath","compile","getMetrics","typeset","updateDocument");class qn extends Un{}class Hn{constructor(t,e=5){this.documentClass=qn,this.adaptor=t,this.priority=e}get name(){return this.constructor.NAME}handlesDocument(t){return!1}create(t,e){return new this.documentClass(t,this.adaptor,e)}}Hn.NAME="generic";class Wn extends pi{register(t){return this.add(t,t.priority)}unregister(t){this.remove(t)}handlesDocument(t){for(const e of this){const s=e.item;if(s.handlesDocument(t))return s}throw new Error("Can't find handler for document")}document(t,e=null){return this.handlesDocument(t).create(t,e)}}class zn{static methodName(t){return"visit"+(t.charAt(0).toUpperCase()+t.substring(1)).replace(/[^a-z0-9_]/gi,"_")+"Node"}constructor(t){this.nodeHandlers=new Map;for(const e of t.getKinds()){const t=this[zn.methodName(e)];t&&this.nodeHandlers.set(e,t)}}visitTree(t,...e){return this.visitNode(t,...e)}visitNode(t,...e){return(this.nodeHandlers.get(t.kind)||this.visitDefault).call(this,t,...e)}visitDefault(t,...e){if("childNodes"in t)for(const s of t.childNodes)this.visitNode(s,...e)}setNodeHandler(t,e){this.nodeHandlers.set(t,e)}removeNodeHandler(t){this.nodeHandlers.delete(t)}}const Xn="data-mjx-";class Vn extends zn{constructor(t=null){t||(t=new An),super(t)}visitTextNode(t,...e){}visitXMLNode(t,...e){}visitHtmlNode(t,...e){}getKind(t){const e=t.kind;return Fi(e,this.constructor.rename,e)}getAttributeList(t){const e=this.constructor,s=Fi(t.kind,e.defaultAttributes,{}),i=Object.assign({},s,this.getDataAttributes(t),t.attributes.getAllAttributes()),r=e.variants;return Object.hasOwn(i,"mathvariant")&&(Object.hasOwn(r,i.mathvariant)?i.mathvariant=r[i.mathvariant]:t.getProperty("ignore-variant")&&delete i.mathvariant),i}getDataAttributes(t){const e={},s=t.attributes.getExplicit("mathvariant"),i=this.constructor.variants;s&&(t.getProperty("ignore-variant")||Object.hasOwn(i,s))&&this.setDataAttribute(e,"variant",s),t.getProperty("variantForm")&&this.setDataAttribute(e,"alternate","1"),t.getProperty("pseudoscript")&&this.setDataAttribute(e,"pseudoscript","true"),!1===t.getProperty("autoOP")&&this.setDataAttribute(e,"auto-op","false");const r=t.getProperty("vbox");r&&this.setDataAttribute(e,"vbox",r);const n=t.getProperty("scriptalign");n&&this.setDataAttribute(e,"script-align",n);const o=t.getProperty("mathaccent");void 0!==o&&(o&&!t.isMathAccent()||!o&&!t.isMathAccentWithWidth())&&this.setDataAttribute(e,"mathaccent",o.toString());const a=t.getProperty("texClass");if(void 0!==a){let s=!0;if(a===ur.OP&&t.isKind("mi")){const e=t.getText();s=!(e.length>1&&e.match(_r.operatorName))}s&&this.setDataAttribute(e,"texclass",a<0?"NONE":pr[a])}return t.getProperty("smallmatrix")&&this.setDataAttribute(e,"smallmatrix","true"),e}setDataAttribute(t,e,s){t[Xn+e]=s}}Vn.rename={TeXAtom:"mrow"},Vn.variants={"-tex-calligraphic":"script","-tex-bold-calligraphic":"bold-script","-tex-oldstyle":"normal","-tex-bold-oldstyle":"bold","-tex-mathit":"italic"},Vn.defaultAttributes={math:{xmlns:"http://www.w3.org/1998/Math/MathML"}};class Gn extends Vn{constructor(){super(...arguments),this.document=null}visitTree(t,e){this.document=e;const s=e.createElement("top");return this.visitNode(t,s),this.document=null,s.firstChild}visitTextNode(t,e){e.appendChild(this.document.createTextNode(t.getText()))}visitXMLNode(t,e){e.appendChild(t.getXML().cloneNode(!0))}visitHtmlNode(t,e){e.appendChild(t.getHTML().cloneNode(!0))}visitInferredMrowNode(t,e){for(const s of t.childNodes)this.visitNode(s,e)}visitDefault(t,e){const s=this.document.createElement(this.getKind(t));this.addAttributes(t,s);for(const e of t.childNodes)this.visitNode(e,s);e.appendChild(s)}addAttributes(t,e){const s=this.getAttributeList(t);for(const t of Object.keys(s))e.setAttribute(t,s[t].toString())}}class Jn extends Vn{visitTree(t){return this.visitNode(t,"")}visitTextNode(t,e){return this.quoteHTML(t.getText())}visitXMLNode(t,e){return e+t.getSerializedXML()}visitHtmlNode(t,e){return t.getSerializedHTML()}visitInferredMrowNode(t,e){const s=[];for(const i of t.childNodes)s.push(this.visitNode(i,e));return s.join("\n")}visitAnnotationNode(t,e){const s=this.childNodeMml(t,"","");return`${e}<annotation${this.getAttributes(t)}>${s}</annotation>`}visitDefault(t,e){const s=this.getKind(t),[i,r]=t.isToken||0===t.childNodes.length?["",""]:["\n",e],n=this.childNodeMml(t,e+" ",i),o=n.match(/\S/)?i+n+r:"";return`${e}<${s}${this.getAttributes(t)}>${o}</${s}>`}childNodeMml(t,e,s){let i="";for(const r of t.childNodes)i+=this.visitNode(r,e)+s;return i}getAttributes(t){const e=[],s=this.getAttributeList(t);for(const t of Object.keys(s)){const i=String(s[t]);void 0!==i&&e.push(t+'="'+this.quoteHTML(i)+'"')}return e.length?" "+e.join(" "):""}quoteHTML(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/[\uD800-\uDBFF]./g,this.toEntity).replace(/[\u0080-\uD7FF\uE000-\uFFFF]/g,this.toEntity)}toEntity(t){return qr(t)}}class Kn{get kind(){return this.node.kind}constructor(t,e){this.factory=t,this.node=e}wrap(t){return this.factory.wrap(t)}walkTree(t,e){if(t(this,e),"childNodes"in this)for(const s of this.childNodes)s&&s.walkTree(t,e);return e}}class $n extends or{wrap(t,...e){return this.create(t.kind,t,...e)}}const Yn={version:si,context:hi,handlers:new Wn,document:function(t,e){return Yn.handlers.document(t,e)},handleRetriesFor:In,retryAfter:Sn,asyncLoad:null,asyncIsSynchronous:!1};class Qn extends ir{get adaptor(){return this.inputJax.adaptor}constructor(t,e,s=!0,i={node:null,n:0,delim:""},r={node:null,n:0,delim:""}){super(t,e,s,i,r)}updateDocument(t){if(this.state()<rr.INSERTED){if(this.inputJax.processStrings){let t=this.start.node;if(t===this.end.node)this.end.n&&this.end.n<this.adaptor.value(this.end.node).length&&this.adaptor.split(this.end.node,this.end.n),this.start.n&&(t=this.adaptor.split(this.start.node,this.start.n)),this.adaptor.replace(this.typesetRoot,t);else{for(this.start.n&&(t=this.adaptor.split(t,this.start.n));t!==this.end.node;){const e=this.adaptor.next(t);this.adaptor.remove(t),t=e}this.adaptor.insert(this.typesetRoot,t),this.end.n<this.adaptor.value(t).length&&this.adaptor.split(t,this.end.n),this.adaptor.remove(t)}}else this.adaptor.replace(this.typesetRoot,this.start.node);this.start.node=this.end.node=this.typesetRoot,this.start.n=this.end.n=0,this.state(rr.INSERTED)}}updateStyleSheet(t){t.addStyleSheet()}removeFromDocument(t=!1){if(super.removeFromDocument(t),this.state()>=rr.TYPESET){const e=this.adaptor,s=this.start.node;let i=e.text("");if(t){const t=this.start.delim+this.math+this.end.delim;if(this.inputJax.processStrings)i=e.text(t);else{const s=e.parse(t,"text/html");i=e.firstChild(e.body(s))}}e.parent(s)&&e.replace(i,s),this.start.node=this.end.node=i,this.start.n=this.end.n=0}}}class Zn extends er{}class to{constructor(t=null){const e=this.constructor;this.options=Oi(Ri({},e.OPTIONS),t),this.init(),this.getPatterns()}init(){this.strings=[],this.string="",this.snodes=[],this.nodes=[],this.stack=[]}getPatterns(){const t=Li(this.options.skipHtmlTags),e=Li(this.options.ignoreHtmlClass),s=Li(this.options.processHtmlClass);this.skipHtmlTags=new RegExp("^(?:"+t.join("|")+")$","i"),this.ignoreHtmlClass=new RegExp("(?:^| )(?:"+e.join("|")+")(?: |$)"),this.processHtmlClass=new RegExp("(?:^| )(?:"+s+")(?: |$)")}pushString(){this.string.match(/\S/)&&(this.strings.push(this.string),this.nodes.push(this.snodes)),this.string="",this.snodes=[]}extendString(t,e){this.snodes.push([t,e.length]),this.string+=e}handleText(t,e){return e||this.extendString(t,this.adaptor.value(t)),this.adaptor.next(t)}handleTag(t,e){if(!e){const e=this.options.includeHtmlTags[this.adaptor.kind(t)];e instanceof Function?this.extendString(t,e(t,this.adaptor)):this.extendString(t,e)}return this.adaptor.next(t)}handleContainer(t,e){this.pushString();const s=this.adaptor.getAttribute(t,"class")||"",i=this.adaptor.kind(t)||"",r=this.processHtmlClass.exec(s);let n=t;return!this.adaptor.firstChild(t)||this.adaptor.getAttribute(t,"data-MJX")||!r&&this.skipHtmlTags.exec(i)?n=this.adaptor.next(t):(this.adaptor.next(t)&&this.stack.push([this.adaptor.next(t),e]),n=this.adaptor.firstChild(t),e=(e||this.ignoreHtmlClass.exec(s))&&!r),[n,e]}handleOther(t,e){return this.pushString(),this.adaptor.next(t)}find(t){this.init();const e=this.adaptor.next(t);let s=!1;const i=this.options.includeHtmlTags;for(;t&&t!==e;){const e=this.adaptor.kind(t);"#text"===e?t=this.handleText(t,s):Object.hasOwn(i,e)?t=this.handleTag(t,s):e?[t,s]=this.handleContainer(t,s):t=this.handleOther(t,s),!t&&this.stack.length&&(this.pushString(),[t,s]=this.stack.pop())}this.pushString();const r=[this.strings,this.nodes];return this.init(),r}}to.OPTIONS={skipHtmlTags:["script","noscript","style","textarea","pre","code","math","select","option","mjx-container"],includeHtmlTags:Ai({br:"\n",wbr:"","#comment":""}),ignoreHtmlClass:"mathjax_ignore",processHtmlClass:"mathjax_process"},nr("STYLES",rr.INSERTED+1);class eo extends Un{constructor(t,e,s){const[i,r]=Bi(s,to.OPTIONS);super(t,e,i),this.domStrings=this.options.DomStrings||new to(r),this.domStrings.adaptor=e,this.styles=[]}findPosition(t,e,s,i){const r=this.adaptor,n=1/(i[t].length||1);let o=t;for(const[a,c]of i[t]){if(e<=c&&"#text"===r.kind(a))return{i:o,node:a,n:Math.max(e,0),delim:s};e-=c,o+=n}return{node:null,n:0,delim:s}}mathItem(t,e,s){const i=t.math,r=this.findPosition(t.n,t.start.n,t.open,s),n=this.findPosition(t.n,t.end.n,t.close,s);return new this.options.MathItem(i,e,t.display,r,n)}findMath(t){if(!this.processed.isSet("findMath")){this.adaptor.document=this.document,t=Oi({elements:this.options.elements||[this.adaptor.body(this.document)]},t);const e=this.adaptor.getElements(t.elements,this.document);for(const t of this.inputJax){const s=t.processStrings?this.findMathFromStrings(t,e):this.findMathFromDOM(t,e);this.math.merge(s)}this.processed.set("findMath")}return this}findMathFromStrings(t,e){const s=[],i=[];for(const t of e){const[e,r]=this.domStrings.find(t);s.push(...e),i.push(...r)}const r=new this.options.MathList;for(const e of t.findMath(s))r.push(this.mathItem(e,t,i));return r}findMathFromDOM(t,e){const s=[];for(const i of e)for(const e of t.findMath(i))s.push(new this.options.MathItem(e.math,t,e.display,e.start,e.end));return new this.options.MathList(...s)}updateDocument(){return this.processed.isSet("updateDocument")||(this.addPageElements(),this.addStyleSheet(),super.updateDocument(),this.processed.set("updateDocument")),this}addPageElements(){const t=this.adaptor,e=t.body(this.document),s=this.documentPageElements();if(s){const i=t.firstChild(e);i?t.insert(s,i):t.append(e,s)}}addStyleSheet(){const t=this.documentStyleSheet(),e=this.adaptor;if(t&&!e.parent(t)){const s=e.head(this.document),i=this.findSheet(s,e.getAttribute(t,"id"));i?e.replace(t,i):e.append(s,t)}}findSheet(t,e){if(e)for(const s of this.adaptor.tags(t,"style"))if(this.adaptor.getAttribute(s,"id")===e)return s;return null}removeFromDocument(t=!1){if(this.processed.isSet("updateDocument"))for(const e of this.math)e.state()>=rr.INSERTED&&e.state(rr.TYPESET,t);return this.processed.clear("updateDocument"),this}documentStyleSheet(){return this.outputJax.styleSheet(this)}documentPageElements(){return this.outputJax.pageElements(this)}addStyles(t){this.styles.push(t),"insertStyles"in this.outputJax&&this.outputJax.insertStyles(t)}getStyles(){return this.styles}}eo.KIND="HTML",eo.OPTIONS=Object.assign(Object.assign({},Un.OPTIONS),{renderActions:Ai(Object.assign(Object.assign({},Un.OPTIONS.renderActions),{styles:[rr.STYLES,"","updateStyleSheet",!1]})),MathList:Zn,MathItem:Qn,DomStrings:null});class so extends Hn{constructor(){super(...arguments),this.documentClass=eo}handlesDocument(t){const e=this.adaptor;if("string"==typeof t)try{t=e.parse(t,"text/html")}catch(t){}return t instanceof e.window.Document||t instanceof e.window.HTMLElement||t instanceof e.window.DocumentFragment}create(t,e){const s=this.adaptor;if("string"==typeof t)t=s.parse(t,"text/html");else if(t instanceof s.window.HTMLElement||t instanceof s.window.DocumentFragment){const e=t;t=s.parse("","text/html"),s.append(s.body(t),e)}return super.create(t,e)}}function io(t){const e=new so(t);return Yn.handlers.register(e),e}function ro(t){return Yn.asyncLoad?new Promise(((e,s)=>{const i=Yn.asyncLoad(t);i instanceof Promise?i.then((t=>e(t))).catch((t=>s(t))):e(i)})):Promise.reject(`Can't load '${t}': No mathjax.asyncLoad method specified`)}const no=1e6,oo={px:1,in:96,cm:96/2.54,mm:96/25.4},ao={em:1,ex:.431,pt:.1,pc:1.2,mu:1/18},co={veryverythinmathspace:1/18,verythinmathspace:2/18,thinmathspace:3/18,mediummathspace:4/18,thickmathspace:5/18,verythickmathspace:6/18,veryverythickmathspace:7/18,negativeveryverythinmathspace:-1/18,negativeverythinmathspace:-2/18,negativethinmathspace:-3/18,negativemediummathspace:-4/18,negativethickmathspace:-5/18,negativeverythickmathspace:-6/18,negativeveryverythickmathspace:-7/18,thin:.04,medium:.06,thick:.1,normal:1,big:2,small:1/Math.sqrt(2),infinity:no};function lo(t,e=0,s=1,i=16){if("string"!=typeof t&&(t=String(t)),""===t||null==t)return e;if(co[t])return co[t];const r=t.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);if(!r||""===r[0])return e;const n=parseFloat(r[1]||"1"),o=r[2];return Object.hasOwn(oo,o)?n*oo[o]/i/s:Object.hasOwn(ao,o)?n*ao[o]:"%"===o?n/100*e:n*e}function ho(t){return(100*t).toFixed(1).replace(/\.?0+$/,"")+"%"}function uo(t){return Math.abs(t)<.001?"0":t.toFixed(3).replace(/\.?0+$/,"")+"em"}function po(t,e=-no,s=16){return t*=s,e&&t<e&&(t=e),Math.abs(t)<.1?"0":t.toFixed(1).replace(/\.0$/,"")+"px"}class mo{static zero(){return new mo({h:0,d:0,w:0})}static empty(){return new mo}constructor(t={w:0,h:-no,d:-no}){this.w=t.w||0,this.h="h"in t?t.h:-no,this.d="d"in t?t.d:-no,this.L=this.R=this.ic=this.oc=this.sk=this.dx=0,this.scale=this.rscale=1,this.pwidth=""}empty(){return this.w=0,this.h=this.d=-no,this}clean(){this.w===-no&&(this.w=0),this.h===-no&&(this.h=0),this.d===-no&&(this.d=0)}rescale(t){this.w*=t,this.h*=t,this.d*=t}combine(t,e=0,s=0){const i=t.rscale,r=e+i*(t.w+t.L+t.R),n=s+i*t.h,o=i*t.d-s;r>this.w&&(this.w=r),n>this.h&&(this.h=n),o>this.d&&(this.d=o)}append(t){const e=t.rscale;this.w+=e*(t.w+t.L+t.R),e*t.h>this.h&&(this.h=e*t.h),e*t.d>this.d&&(this.d=e*t.d)}updateFrom(t){this.h=t.h,this.d=t.d,this.w=t.w,t.pwidth&&(this.pwidth=t.pwidth)}copy(){const t=new mo;return Object.assign(t,this),t}}mo.fullWidth="100%",mo.boxSides=[["Top",0,"h"],["Right",1,"w"],["Bottom",2,"d"],["Left",3,"w"]];const fo={loadMissingEntities:!0},go={ApplyFunction:"\u2061",Backslash:"\u2216",Because:"\u2235",Breve:"\u02d8",Cap:"\u22d2",CenterDot:"\xb7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",Congruent:"\u2261",ContourIntegral:"\u222e",Coproduct:"\u2210",Cross:"\u2a2f",Cup:"\u22d3",CupCap:"\u224d",Dagger:"\u2021",Del:"\u2207",Delta:"\u0394",Diamond:"\u22c4",DifferentialD:"\u2146",DotEqual:"\u2250",DoubleDot:"\xa8",DoubleRightTee:"\u22a8",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownLeftVector:"\u21bd",DownRightVector:"\u21c1",DownTee:"\u22a4",Downarrow:"\u21d3",Element:"\u2208",EqualTilde:"\u2242",Equilibrium:"\u21cc",Exists:"\u2203",ExponentialE:"\u2147",FilledVerySmallSquare:"\u25aa",ForAll:"\u2200",Gamma:"\u0393",Gg:"\u22d9",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Hacek:"\u02c7",Hat:"^",HumpDownHump:"\u224e",HumpEqual:"\u224f",Im:"\u2111",ImaginaryI:"\u2148",Integral:"\u222b",Intersection:"\u22c2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Lambda:"\u039b",Larr:"\u219e",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",LeftArrowRightArrow:"\u21c6",LeftCeiling:"\u2308",LeftDownVector:"\u21c3",LeftFloor:"\u230a",LeftRightArrow:"\u2194",LeftTee:"\u22a3",LeftTriangle:"\u22b2",LeftTriangleEqual:"\u22b4",LeftUpVector:"\u21bf",LeftVector:"\u21bc",Leftarrow:"\u21d0",Leftrightarrow:"\u21d4",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",Ll:"\u22d8",Lleftarrow:"\u21da",LongLeftArrow:"\u27f5",LongLeftRightArrow:"\u27f7",LongRightArrow:"\u27f6",Longleftarrow:"\u27f8",Longleftrightarrow:"\u27fa",Longrightarrow:"\u27f9",Lsh:"\u21b0",MinusPlus:"\u2213",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotLeftTriangle:"\u22ea",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotPrecedes:"\u2280",NotPrecedesSlantEqual:"\u22e0",NotRightTriangle:"\u22eb",NotRightTriangleEqual:"\u22ed",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsSlantEqual:"\u22e1",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotVerticalBar:"\u2224",Omega:"\u03a9",OverBar:"\u203e",OverBrace:"\u23de",PartialD:"\u2202",Phi:"\u03a6",Pi:"\u03a0",PlusMinus:"\xb1",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",Product:"\u220f",Proportional:"\u221d",Psi:"\u03a8",Rarr:"\u21a0",Re:"\u211c",ReverseEquilibrium:"\u21cb",RightAngleBracket:"\u27e9",RightArrow:"\u2192",RightArrowLeftArrow:"\u21c4",RightCeiling:"\u2309",RightDownVector:"\u21c2",RightFloor:"\u230b",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTriangle:"\u22b3",RightTriangleEqual:"\u22b5",RightUpVector:"\u21be",RightVector:"\u21c0",Rightarrow:"\u21d2",Rrightarrow:"\u21db",Rsh:"\u21b1",Sigma:"\u03a3",SmallCircle:"\u2218",Sqrt:"\u221a",Square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Star:"\u22c6",Subset:"\u22d0",SubsetEqual:"\u2286",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",SuchThat:"\u220b",Sum:"\u2211",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22d1",Therefore:"\u2234",Theta:"\u0398",Tilde:"\u223c",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",UnderBar:"_",UnderBrace:"\u23df",Union:"\u22c3",UnionPlus:"\u228e",UpArrow:"\u2191",UpDownArrow:"\u2195",UpTee:"\u22a5",Uparrow:"\u21d1",Updownarrow:"\u21d5",Upsilon:"\u03a5",Vdash:"\u22a9",Vee:"\u22c1",VerticalBar:"\u2223",VerticalTilde:"\u2240",Vvdash:"\u22aa",Wedge:"\u22c0",Xi:"\u039e",amp:"&",acute:"\xb4",aleph:"\u2135",alpha:"\u03b1",amalg:"\u2a3f",and:"\u2227",ang:"\u2220",angmsd:"\u2221",angsph:"\u2222",ape:"\u224a",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",beta:"\u03b2",beth:"\u2136",between:"\u226c",bigcirc:"\u25ef",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",blacklozenge:"\u29eb",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",bowtie:"\u22c8",boxdl:"\u2510",boxdr:"\u250c",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxul:"\u2518",boxur:"\u2514",bsol:"\\",bull:"\u2022",cap:"\u2229",check:"\u2713",chi:"\u03c7",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledR:"\xae",circledS:"\u24c8",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",clubs:"\u2663",colon:":",comp:"\u2201",ctdot:"\u22ef",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cup:"\u222a",curarr:"\u21b7",curlyvee:"\u22ce",curlywedge:"\u22cf",dagger:"\u2020",daleth:"\u2138",ddarr:"\u21ca",deg:"\xb0",delta:"\u03b4",digamma:"\u03dd",div:"\xf7",divideontimes:"\u22c7",dot:"\u02d9",doteqdot:"\u2251",dotplus:"\u2214",dotsquare:"\u22a1",dtdot:"\u22f1",ecir:"\u2256",efDot:"\u2252",egs:"\u2a96",ell:"\u2113",els:"\u2a95",empty:"\u2205",epsi:"\u03b5",epsiv:"\u03f5",erDot:"\u2253",eta:"\u03b7",eth:"\xf0",flat:"\u266d",fork:"\u22d4",frown:"\u2322",gEl:"\u2a8c",gamma:"\u03b3",gap:"\u2a86",gimel:"\u2137",gnE:"\u2269",gnap:"\u2a8a",gne:"\u2a88",gnsim:"\u22e7",gt:">",gtdot:"\u22d7",harrw:"\u21ad",hbar:"\u210f",hellip:"\u2026",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",imath:"\u0131",infin:"\u221e",intcal:"\u22ba",iota:"\u03b9",jmath:"\u0237",kappa:"\u03ba",kappav:"\u03f0",lEg:"\u2a8b",lambda:"\u03bb",lap:"\u2a85",larrlp:"\u21ab",larrtl:"\u21a2",lbrace:"{",lbrack:"[",le:"\u2264",leftleftarrows:"\u21c7",leftthreetimes:"\u22cb",lessdot:"\u22d6",lmoust:"\u23b0",lnE:"\u2268",lnap:"\u2a89",lne:"\u2a87",lnsim:"\u22e6",longmapsto:"\u27fc",looparrowright:"\u21ac",lowast:"\u2217",loz:"\u25ca",lt:"<",ltimes:"\u22c9",ltri:"\u25c3",macr:"\xaf",malt:"\u2720",mho:"\u2127",mu:"\u03bc",multimap:"\u22b8",nLeftarrow:"\u21cd",nLeftrightarrow:"\u21ce",nRightarrow:"\u21cf",nVDash:"\u22af",nVdash:"\u22ae",natur:"\u266e",nearr:"\u2197",nharr:"\u21ae",nlarr:"\u219a",not:"\xac",nrarr:"\u219b",nu:"\u03bd",nvDash:"\u22ad",nvdash:"\u22ac",nwarr:"\u2196",omega:"\u03c9",omicron:"\u03bf",or:"\u2228",osol:"\u2298",period:".",phi:"\u03c6",phiv:"\u03d5",pi:"\u03c0",piv:"\u03d6",prap:"\u2ab7",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",prime:"\u2032",psi:"\u03c8",quot:'"',rarrtl:"\u21a3",rbrace:"}",rbrack:"]",rho:"\u03c1",rhov:"\u03f1",rightrightarrows:"\u21c9",rightthreetimes:"\u22cc",ring:"\u02da",rmoust:"\u23b1",rtimes:"\u22ca",rtri:"\u25b9",scap:"\u2ab8",scnE:"\u2ab6",scnap:"\u2aba",scnsim:"\u22e9",sdot:"\u22c5",searr:"\u2198",sect:"\xa7",sharp:"\u266f",sigma:"\u03c3",sigmav:"\u03c2",simne:"\u2246",smile:"\u2323",spades:"\u2660",sub:"\u2282",subE:"\u2ac5",subnE:"\u2acb",subne:"\u228a",supE:"\u2ac6",supnE:"\u2acc",supne:"\u228b",swarr:"\u2199",tau:"\u03c4",theta:"\u03b8",thetav:"\u03d1",tilde:"\u02dc",times:"\xd7",triangle:"\u25b5",triangleq:"\u225c",upsi:"\u03c5",upuparrows:"\u21c8",veebar:"\u22bb",vellip:"\u22ee",weierp:"\u2118",xi:"\u03be",yen:"\xa5",zeta:"\u03b6",zigrarr:"\u21dd",nbsp:"\xa0",rsquo:"\u2019",lsquo:"\u2018"},bo={};function Eo(t,e){Object.assign(go,t),bo[e]=!0}function No(t){delete go[t]}function yo(t){return t.replace(/&([a-z][a-z0-9]*|#(?:[0-9]+|x[0-9a-f]+));/gi,xo)}function xo(t,e){if("#"===e.charAt(0))return vo(e.slice(1));if(go[e])return go[e];if(fo.loadMissingEntities){const t=e.match(/^[a-zA-Z](fr|scr|opf)$/)?RegExp.$1:e.charAt(0).toLowerCase();bo[t]||(bo[t]=!0,Sn(ro("./util/entities/"+t+".js")))}return t}function vo(t){const e="x"===t.charAt(0)?parseInt(t.slice(1),16):parseInt(t);return String.fromCodePoint(e)}class Co{get cssText(){return this.getStyleString()}constructor(t=null){this.styles={},this.addStyles(t)}addStyles(t){if(t)for(const e of Object.keys(t))this.styles[e]||(this.styles[e]={}),Object.assign(this.styles[e],t[e])}removeStyles(...t){for(const e of t)delete this.styles[e]}clear(){this.styles={}}getStyleString(){return this.getStyleRules().join("\n\n")}getStyleRules(){const t=Object.keys(this.styles),e=new Array(t.length);let s=0;for(const i of t)e[s++]=i+" {\n"+this.getStyleDefString(this.styles[i])+"\n}";return e}getStyleDefString(t){const e=Object.keys(t),s=new Array(e.length);let i=0;for(const r of e)s[i++]=" "+r+": "+t[r]+";";return s.join("\n")}}const To=["top","right","bottom","left"],wo=["width","style","color"];function _o(t){const e=t.split(/((?:'[^']*'|"[^"]*"|,[\s\n]|[^\s\n])*)/g),s=[];for(;e.length>1;)e.shift(),s.push(e.shift());return s}function ko(t){const e=_o(this.styles[t]);0===e.length&&e.push(""),1===e.length&&e.push(e[0]),2===e.length&&e.push(e[0]),3===e.length&&e.push(e[1]);for(const s of Oo.connect[t].children)this.setStyle(this.childName(t,s),e.shift())}const Ao=/^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,Lo=/^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/;function Mo(t){const e={width:"",style:"",color:""};for(const s of _o(this.styles[t]))s.match(Ao)&&""===e.width?e.width=s:s.match(Lo)&&""===e.style?e.style=s:e.color=s;for(const s of Oo.connect[t].children)this.setStyle(this.childName(t,s),e[s])}function Io(t){const e=[];for(const s of Oo.connect[t].children){const i=this.styles[this.childName(t,s)];i&&e.push(i)}e.length?this.styles[t]=e.join(" "):delete this.styles[t]}const So={style:/^(?:normal|italic|oblique|inherit|initial|unset)$/,variant:new RegExp("^(?:"+["normal|none","inherit|initial|unset","common-ligatures|no-common-ligatures","discretionary-ligatures|no-discretionary-ligatures","historical-ligatures|no-historical-ligatures","contextual|no-contextual","(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)","small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","lining-nums|oldstyle-nums|proportional-nums|tabular-nums","diagonal-fractions|stacked-fractions","ordinal|slashed-zero","jis78|jis83|jis90|jis04|simplified|traditional","full-width|proportional-width","ruby"].join("|")+")$"),weight:/^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,stretch:new RegExp("^(?:"+["normal","(?:(?:ultra|extra|semi)-)?(?:condensed|expanded)","inherit|initial|unset"].join("|")+")$"),size:new RegExp("^(?:"+["xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller","[\\d.]+%|[\\d.]+[a-z]+","inherit|initial|unset"].join("|")+")(?:/(?:normal|[\\d.]+(?:%|[a-z]+)?))?$")};function Ro(t,e){for(const s of Oo.connect[t].children){const i=this.childName(t,s);if(Array.isArray(e[s])){const t=e[s];t.length&&(this.styles[i]=t.join(" "))}else""!==e[s]&&(this.styles[i]=e[s])}}class Oo{constructor(t=""){this.parse(t)}sanitizeValue(t){const e=this.constructor.pattern;if(!t.match(e.sanitize))return t;const s=(t=t.replace(e.value,"$1")).replace(/\\./g,"").replace(/(['"]).*?\1/g,"").replace(/[^'"]/g,"");return s.length&&(t+=s.charAt(0)),t}get cssText(){var t,e;const s=[];for(const i of Object.keys(this.styles)){const r=this.parentName(i),n=i.replace(/.*-/,"");this.styles[r]&&(null===(e=null===(t=Oo.connect[r])||void 0===t?void 0:t.children)||void 0===e?void 0:e.includes(n))||s.push(`${i}: ${this.styles[i]};`)}return s.join(" ")}get styleList(){return Object.assign({},this.styles)}set(t,e){var s,i;for(t=this.normalizeName(t),this.setStyle(t,String(e)),Oo.connect[t]&&!Oo.connect[t].combine&&(this.combineChildren(t),delete this.styles[t]);t.match(/-/);){const e=t;if(t=this.parentName(t),!Oo.connect[e]&&!(null===(i=null===(s=Oo.connect[t])||void 0===s?void 0:s.children)||void 0===i?void 0:i.includes(e.substring(t.length+1))))break;Oo.connect[t].combine.call(this,t)}}get(t){return t=this.normalizeName(t),Object.hasOwn(this.styles,t)?this.styles[t]:""}setStyle(t,e){this.styles[t]=this.sanitizeValue(e),Oo.connect[t]&&Oo.connect[t].children&&Oo.connect[t].split.call(this,t),""===e&&delete this.styles[t]}combineChildren(t){const e=this.parentName(t);for(const s of Oo.connect[t].children){const t=this.childName(e,s);Oo.connect[t].combine.call(this,t)}}parentName(t){const e=t.replace(/-[^-]*$/,"");return t===e?"":e}childName(t,e){return e.match(/-/)?e:(Oo.connect[t]&&!Oo.connect[t].combine&&(e+=t.replace(/.*-/,"-"),t=this.parentName(t)),t+"-"+e)}normalizeName(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))}parse(t=""){const e=this.constructor.pattern;this.styles={};const s=t.replace(/\n/g," ").replace(e.comment,"").split(e.style);for(;s.length>1;){const[t,e,i]=s.splice(0,3);if(t.match(/[^\s\n;]/))return;this.set(e,i)}}}function Do(t){return t.reduce(((t,e)=>t+e),0)}function Po(t){return t.reduce(((t,e)=>Math.max(t,e)),0)}if(Oo.pattern={sanitize:/['";]/,value:/^((:?'(?:\\.|[^'])*(?:'|$)|"(?:\\.|[^"])*(?:"|$)|\n|\\.|[^'";])*?)[\s\n]*(?:;|$).*/,style:/([-a-z]+)[\s\n]*:[\s\n]*((?:'(?:\\.|[^'])*(?:'|$)|"(?:\\.|[^"])*(?:"|$)|\n|\\.|[^'";])*?)[\s\n]*(?:;|$)/g,comment:/\/\*[^]*?\*\//g},Oo.connect={padding:{children:To,split:ko,combine:function(t){const e=Oo.connect[t].children,s=[];for(const i of e){const e=this.styles[t+"-"+i];if(!e)return void delete this.styles[t];s.push(e)}s[3]===s[1]&&(s.pop(),s[2]===s[0]&&(s.pop(),s[1]===s[0]&&s.pop())),this.styles[t]=s.join(" ")}},border:{children:To,split:function(t){for(const e of Oo.connect[t].children)this.setStyle(this.childName(t,e),this.styles[t])},combine:function(t){const e=[...Oo.connect[t].children],s=this.styles[this.childName(t,e.shift())];for(const i of e)if(this.styles[this.childName(t,i)]!==s)return void delete this.styles[t];this.styles[t]=s}},"border-top":{children:wo,split:Mo,combine:Io},"border-right":{children:wo,split:Mo,combine:Io},"border-bottom":{children:wo,split:Mo,combine:Io},"border-left":{children:wo,split:Mo,combine:Io},"border-width":{children:To,split:ko,combine:null},"border-style":{children:To,split:ko,combine:null},"border-color":{children:To,split:ko,combine:null},font:{children:["style","variant","weight","stretch","line-height","size","family"],split:function(t){const e=_o(this.styles[t]),s={style:"",variant:[],weight:"",stretch:"",size:"",family:"","line-height":""};for(const t of e){s.family||(s.family=t);for(const e of Object.keys(So))if((Array.isArray(s[e])||""===s[e])&&t.match(So[e]))if(s.family===t&&(s.family=""),"size"===e){const[i,r]=t.split(/\//);s[e]=i,r&&(s["line-height"]=r)}else""===s.size&&(Array.isArray(s[e])?s[e].push(t):""===s[e]&&(s[e]=t))}Ro.call(this,t,s),delete this.styles[t]},combine:function(t){}}},MathJax.loader&&MathJax.loader.checkVersion("core",si,"core"),ai({_:{adaptors:{HTMLAdaptor:l,browserAdaptor:h},components:{global:t},core:{DOMAdaptor:c,FindMath:d,Handler:ot,HandlerList:at,InputJax:u,MathDocument:nt,MathItem:g,MathList:f,MmlTree:{Attributes:N,MML:et,MathMLVisitor:ht,MmlFactory:st,MmlNode:x,MmlNodes:{HtmlNode:tt,TeXAtom:Q,maction:q,maligngroup:J,malignmark:K,math:v,mathchoice:Z,menclose:U,merror:P,mfenced:j,mfrac:S,mglyph:$,mi:C,mmultiscripts:z,mn:T,mo:k,mpadded:B,mphantom:F,mroot:O,mrow:I,ms:M,mspace:L,msqrt:R,mstyle:D,msubsup:H,mtable:X,mtd:G,mtext:A,mtr:V,munderover:W,semantics:Y},MmlVisitor:lt,OperatorDictionary:w,SerializedMmlVisitor:dt},OutputJax:p,Tree:{Factory:b,Node:y,NodeFactory:E,Visitor:ct,Wrapper:ut,WrapperFactory:pt}},handlers:{html_ts:yt,html:{HTMLDocument:Et,HTMLDomStrings:bt,HTMLHandler:Nt,HTMLMathItem:ft,HTMLMathList:gt}},mathjax:mt,util:{AsyncLoad:xt,BBox:Ct,BitField:it,Entities:Tt,FunctionList:r,LinkedList:m,Options:o,PrioritizedList:i,Retries:rt,StyleJson:wt,Styles:_t,context:e,lengths:vt,numeric:kt,string:_}}}),MathJax.startup&&(MathJax.startup.registerConstructor("HTMLHandler",so),MathJax.startup.registerConstructor("browserAdaptor",Ji),MathJax.startup.useHandler("HTMLHandler"),MathJax.startup.useAdaptor("browserAdaptor")),MathJax.loader){const t=MathJax.config.loader;MathJax._.mathjax.mathjax.asyncLoad=e=>"node:"===e.substring(0,5)?t.require(e):MathJax.loader.load(e).then((t=>t[0]))}class Bo extends Ki{constructor(t){super(t),this.getPatterns()}getPatterns(){const t=this.options,e=[],s=[],i=[];this.end={},this.env=this.sub=0;let r=1;t.inlineMath.forEach((t=>this.addPattern(e,t,!1))),t.displayMath.forEach((t=>this.addPattern(e,t,!0))),e.length&&s.push(e.sort(Or).join("|")),t.processEnvironments&&(s.push("\\\\begin\\s*\\{([^}]*)\\}"),this.env=r,r++),t.processEscapes&&i.push("\\\\([\\\\$])"),t.processRefs&&i.push("(\\\\(?:eq)?ref\\s*\\{[^}]*\\})"),i.length&&(s.push("("+i.join("|")+")"),this.sub=r),this.start=new RegExp(s.join("|"),"g"),this.hasPatterns=s.length>0}addPattern(t,e,s){const[i,r]=e;t.push(Dr(i)),this.end[i]=[r,s,this.endPattern(r)]}endPattern(t,e){return new RegExp((e||Dr(t))+"|\\\\(?:[a-zA-Z]|.)|[{}]","g")}findEnd(t,e,s,i){const[r,n,o]=i,a=o.lastIndex=s.index+s[0].length;let c,l=0;for(;c=o.exec(t);){if((c[1]||c[0])===r&&0===l)return sr(s[0],t.substring(a,c.index),c[0],e,s.index,c.index+c[0].length,n);"{"===c[0]?l++:"}"===c[0]&&l&&l--}return null}findMathInString(t,e,s){let i,r;for(this.start.lastIndex=0;i=this.start.exec(s);){if(void 0!==i[this.env]&&this.env){const t="\\\\end\\s*(\\{"+Dr(i[this.env])+"\\})";r=this.findEnd(s,e,i,["{"+i[this.env]+"}",!0,this.endPattern(null,t)]),r&&(r.math=r.open+r.math+r.close,r.open=r.close="")}else if(void 0!==i[this.sub]&&this.sub){const t=i[this.sub],s=i.index+i[this.sub].length;r=2===t.length?sr("\\",t.substring(1),"",e,i.index,s):sr("",t,"",e,i.index,s,!1)}else r=this.findEnd(s,e,i,this.end[i[0]]);r&&(t.push(r),this.start.lastIndex=r.end.n)}}findMath(t){const e=[];if(this.hasPatterns)for(let s=0,i=t.length;s<i;s++)this.findMathInString(e,s,t[s]);return e}}Bo.OPTIONS={inlineMath:[["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],processEscapes:!0,processEnvironments:!0,processRefs:!0};const Fo={attrs:new Set(["autoOP","fnOP","movesupsub","subsupOK","texprimestyle","useHeight","variantForm","withDelims","mathaccent","open","close"]),createEntity:t=>String.fromCodePoint(parseInt(t,16)),getChildren:t=>t.childNodes,getText:t=>t.getText(),appendChildren(t,e){for(const s of e)t.appendChild(s)},setAttribute(t,e,s){t.attributes.set(e,s)},setProperty(t,e,s){t.setProperty(e,s)},setProperties(t,e){for(const s of Object.keys(e)){const i=e[s];"texClass"===s?(t.texClass=i,t.setProperty(s,i)):"movablelimits"===s?(t.setProperty("movablelimits",i),(t.isKind("mo")||t.isKind("mstyle"))&&t.attributes.set("movablelimits",i)):"inferred"===s||(Fo.attrs.has(s)?t.setProperty(s,i):t.attributes.set(s,i))}},getProperty:(t,e)=>t.getProperty(e),getAttribute:(t,e)=>t.attributes.get(e),removeAttribute(t,e){t.attributes.unset(e)},removeProperties(t,...e){t.removeProperty(...e)},getChildAt:(t,e)=>t.childNodes[e],setChild(t,e,s){t.childNodes[e]=s,s&&(s.parent=t)},copyChildren(t,e){const s=t.childNodes;for(let t=0;t<s.length;t++)this.setChild(e,t,s[t])},copyAttributes(t,e){e.attributes=t.attributes,this.setProperties(e,t.getAllProperties())},isType:(t,e)=>t.isKind(e),isEmbellished:t=>t.isEmbellished,getTexClass:t=>t.texClass,getCoreMO:t=>t.coreMO(),isNode:t=>t instanceof Er||t instanceof vr,isInferred:t=>t.isInferred,getForm(t){if(!t.isKind("mo"))return null;const e=t,s=e.getForms();for(const t of s){const s=this.getOp(e,t);if(s)return s}return null},getOp:(t,e="infix")=>Hr.OPTABLE[e][t.getText()]||null,getMoAttribute(t,e){var s,i;if(!t.attributes.isSet(e))for(const r of["infix","postfix","prefix"]){const n=null===(i=null===(s=this.getOp(t,r))||void 0===s?void 0:s[3])||void 0===i?void 0:i[e];if(void 0!==n)return n}return t.attributes.get(e)}},jo=Fo;function Uo(t,e,s){const i=e.attributes,r=s.attributes;t.forEach((t=>{const e=r.getExplicit(t);null!=e&&i.set(t,e)}))}function qo(t,e){const s=(t,e)=>t.getExplicitNames().filter((s=>s!==e&&("stretchy"!==s||t.getExplicit("stretchy"))&&"data-latex"!==s&&"data-latex-item"!==s)),i=t.attributes,r=e.attributes,n=s(i,"lspace"),o=s(r,"rspace");if(n.length!==o.length)return!1;for(const t of n)if(i.getExplicit(t)!==r.getExplicit(t))return!1;return!0}function Ho(t,e,s){const i=[];for(const r of t.getList("m"+e+s)){const n=r.childNodes;if(n[r[e]]&&n[r[s]])continue;const o=r.parent,a=n[r[e]]?t.nodeFactory.create("node","m"+e,[n[r.base],n[r[e]]]):t.nodeFactory.create("node","m"+s,[n[r.base],n[r[s]]]);jo.copyAttributes(r,a),o.replaceChild(a,r),i.push(r)}t.removeFromList("m"+e+s,i)}function Wo(t,e,s){const i=[];for(const r of t.getList(e)){if(r.attributes.get("displaystyle"))continue;const e=r.childNodes[r.base],n=e.coreMO();if(e.getProperty("movablelimits")&&!n.attributes.hasExplicit("movablelimits")){const e=t.nodeFactory.create("node",s,r.childNodes);jo.copyAttributes(r,e),r.parent.replaceChild(e,r),i.push(r)}}t.removeFromList(e,i)}const zo={cleanStretchy(t){const e=t.data;for(const t of e.getList("fixStretchy"))if(jo.getProperty(t,"fixStretchy")){const s=jo.getForm(t);s&&s[3]&&s[3].stretchy&&jo.setAttribute(t,"stretchy",!1);const i=t.parent;if(!(jo.getTexClass(t)||s&&s[2])){const s=e.nodeFactory.create("node","TeXAtom",[t]);i.replaceChild(s,t),s.inheritAttributesFrom(t)}jo.removeProperties(t,"fixStretchy")}},cleanAttributes(t){t.data.root.walkTree(((t,e)=>{const s=t.attributes,i=new Set((s.get("mjx-keep-attrs")||"").split(/ /));s.unset("mjx-keep-attrs");for(const e of s.getExplicitNames())i.has(e)||s.get(e)!==t.attributes.getInherited(e)||s.unset(e)}),{})},combineRelations(t){const e=[];for(const s of t.data.getList("mo")){if(s.getProperty("relationsCombined")||!s.parent||s.parent&&!jo.isType(s.parent,"mrow")||jo.getTexClass(s)!==ur.REL)continue;let t;const i=s.parent.childNodes,r=i.indexOf(s)+1,n=jo.getProperty(s,"variantForm");for(;r<i.length&&(t=i[r])&&jo.isType(t,"mo")&&jo.getTexClass(t)===ur.REL;){if(n!==jo.getProperty(t,"variantForm")||!qo(s,t)){s.attributes.hasExplicit("rspace")||jo.setAttribute(s,"rspace","0pt"),t.attributes.hasExplicit("lspace")||jo.setAttribute(t,"lspace","0pt");break}jo.appendChildren(s,jo.getChildren(t)),Uo(["stretchy","rspace"],s,t);for(const e of t.getPropertyNames())s.setProperty(e,t.getProperty(e));t.attributes.get("data-latex")&&s.attributes.set("data-latex",s.attributes.get("data-latex")+t.attributes.get("data-latex")),i.splice(r,1),e.push(t),t.parent=null,t.setProperty("relationsCombined",!0),s.setProperty("texClass",ur.REL)}s.attributes.setInherited("form",s.getForms()[0])}t.data.removeFromList("mo",e)},cleanSubSup(t){const e=t.data;e.error||(Ho(e,"sub","sup"),Ho(e,"under","over"))},moveLimits(t){const e=t.data;Wo(e,"munderover","msubsup"),Wo(e,"munder","msub"),Wo(e,"mover","msup")},setInherited(t){t.data.root.setInheritedAttributes({},t.math.display,0,!1)},checkScriptlevel(t){const e=t.data,s=[];for(const t of e.getList("mstyle")){if(1!==t.childNodes[0].childNodes.length)continue;const e=t.attributes;for(const t of["displaystyle","scriptlevel"])e.getExplicit(t)===e.getInherited(t)&&e.unset(t);const i=e.getExplicitNames();if(0===i.filter((t=>"data-latex"!==t.substring(0,10))).length){const r=t.childNodes[0].childNodes[0];i.forEach((t=>r.attributes.set(t,e.get(t)))),t.parent.replaceChild(r,t),s.push(t)}}e.removeFromList("mstyle",s)}},Xo=zo;var Vo,Go;!function(t){t.HANDLER="handler",t.FALLBACK="fallback",t.ITEMS="items",t.TAGS="tags",t.OPTIONS="options",t.NODES="nodes",t.PREPROCESSORS="preprocessors",t.POSTPROCESSORS="postprocessors",t.INIT="init",t.CONFIG="config",t.PRIORITY="priority",t.PARSER="parser"}(Vo||(Vo={})),function(t){t.DELIMITER="delimiter",t.MACRO="macro",t.CHARACTER="character",t.ENVIRONMENT="environment"}(Go||(Go={}));const Jo=7.2;const Ko={UNIT_CASES:new class{constructor(t){this.num="([-+]?([.,]\\d+|\\d+([.,]\\d*)?))",this.unit="",this.dimenEnd=/./,this.dimenRest=/./,this.map=new Map(t),this.updateDimen()}updateDimen(){this.unit=`(${Array.from(this.map.keys()).join("|")})`,this.dimenEnd=RegExp("^\\s*"+this.num+"\\s*"+this.unit+"\\s*$"),this.dimenRest=RegExp("^\\s*"+this.num+"\\s*"+this.unit+" ?")}set(t,e){return this.map.set(t,e),this.updateDimen(),this}get(t){return this.map.get(t)||this.map.get("pt")}delete(t){return!!this.map.delete(t)&&(this.updateDimen(),!0)}}([["em",1],["ex",.43],["pt",.1],["pc",1.2],["px",.1],["in",Jo],["cm",Jo/2.54],["mm",Jo/25.4],["mu",1/18]]),matchDimen(t,e=!1){const s=t.match(e?Ko.UNIT_CASES.dimenRest:Ko.UNIT_CASES.dimenEnd);return s?function([t,e,s]){return"mu"!==e?[t,e,s]:[Ko.em(Ko.UNIT_CASES.get(e)*parseFloat(t)).slice(0,-2),"em",s]}([s[1].replace(/,/,"."),s[4],s[0].length]):[null,null,0]},dimen2em(t){const[e,s]=Ko.matchDimen(t),i=parseFloat(e||"1");return Ko.UNIT_CASES.get(s)*i},em:t=>Math.abs(t)<6e-4?"0em":t.toFixed(3).replace(/\.?0+$/,"")+"em",trimSpaces(t){if("string"!=typeof t)return t;let e=t.trim();return e.match(/\\$/)&&t.match(/ $/)&&(e+=" "),e}};class $o{constructor(t,e,s){this._factory=t,this._env=e,this.global={},this.stack=[],this.global={isInner:s},this.stack=[this._factory.create("start",this.global)],e&&(this.stack[0].env=e),this.env=this.stack[0].env}set env(t){this._env=t}get env(){return this._env}Push(...t){for(const e of t){if(!e)continue;const t=jo.isNode(e)?this._factory.create("mml",e):e;t.global=this.global;const[s,i]=this.stack.length?this.Top().checkItem(t):[null,!0];i&&(s?(this.Pop(),this.Push(...s)):(t.isKind("null")||this.stack.push(t),t.env?(t.copyEnv&&Object.assign(t.env,this.env),this.env=t.env):t.env=this.env))}}Pop(){const t=this.stack.pop();return t.isOpen||delete t.env,this.env=this.stack.length?this.Top().env:{},t}Top(t=1){return this.stack.length<t?null:this.stack[this.stack.length-t]}Prev(t){const e=this.Top();return t?e.First:e.Pop()}get height(){return this.stack.length}toString(){return"stack[\n "+this.stack.join("\n ")+"\n]"}}class Yo{static processString(t,e){const s=t.split(Yo.pattern);for(let t=1,i=s.length;t<i;t+=2){let i=s[t].charAt(0);if(i>="0"&&i<="9")s[t]=e[parseInt(s[t],10)-1],"number"==typeof s[t]&&(s[t]=s[t].toString());else if("{"===i)if(i=s[t].substring(1),i>="0"&&i<="9")s[t]=e[parseInt(s[t].substring(1,s[t].length-1),10)-1],"number"==typeof s[t]&&(s[t]=s[t].toString());else{s[t].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/)&&(s[t]="%"+s[t])}}return s.join("")}constructor(t,e,...s){this.id=t,this.message=Yo.processString(e,s)}}Yo.pattern=/%(\d+|\{\d+\}|\{[a-z]+:%\d+(?:\|(?:%\{\d+\}|%.|[^}])*)+\}|.)/g;const Qo=Yo;class Zo{constructor(t){this._nodes=t,this.startStr="",this.startI=0,this.stopI=0}get nodes(){return this._nodes}Push(...t){this._nodes.push(...t)}Pop(){return this._nodes.pop()}get First(){return this._nodes[this.Size()-1]}set First(t){this._nodes[this.Size()-1]=t}get Last(){return this._nodes[0]}set Last(t){this._nodes[0]=t}Peek(t){return null==t&&(t=1),this._nodes.slice(this.Size()-t)}Size(){return this._nodes.length}Clear(){this._nodes=[]}toMml(t=!0,e){return 1!==this._nodes.length||e?this.create("node",t?"inferredMrow":"mrow",this._nodes,{}):this.First}create(t,...e){return this.factory.configuration.nodeFactory.create(t,...e)}}class ta extends Zo{constructor(t,...e){super(e),this.factory=t,this.global={},this._properties={},this.isOpen&&(this._env={})}get kind(){return"base"}get env(){return this._env}set env(t){this._env=t}get copyEnv(){return!0}getProperty(t){return this._properties[t]}setProperty(t,e){return this._properties[t]=e,this}get isOpen(){return!1}get isClose(){return!1}get isFinal(){return!1}isKind(t){return t===this.kind}checkItem(t){if(t.isKind("over")&&this.isOpen&&(t.setProperty("num",this.toMml(!1)),this.Clear()),t.isKind("cell")&&this.isOpen){if(t.getProperty("linebreak"))return ta.fail;throw new Qo("Misplaced","Misplaced %1",t.getName())}if(t.isClose&&this.getErrors(t.kind)){const[e,s]=this.getErrors(t.kind);throw new Qo(e,s,t.getName())}return t.isFinal?(this.Push(t.First),ta.fail):ta.success}clearEnv(){for(const t of Object.keys(this.env))delete this.env[t]}setProperties(t){return Object.assign(this._properties,t),this}getName(){return this.getProperty("name")}toString(){return this.kind+"["+this.nodes.join("; ")+"]"}getErrors(t){return this.constructor.errors[t]||ta.errors[t]}}ta.fail=[null,!1],ta.success=[null,!0],ta.errors={end:["MissingBeginExtraEnd","Missing \\begin{%1} or extra \\end{%1}"],close:["ExtraCloseMissingOpen","Extra close brace or missing open brace"],right:["MissingLeftExtraRight","Missing \\left or extra \\right"],middle:["ExtraMiddle","Extra \\middle"]};const ea={Variant:{NORMAL:"normal",BOLD:"bold",ITALIC:"italic",BOLDITALIC:"bold-italic",DOUBLESTRUCK:"double-struck",FRAKTUR:"fraktur",BOLDFRAKTUR:"bold-fraktur",SCRIPT:"script",BOLDSCRIPT:"bold-script",SANSSERIF:"sans-serif",BOLDSANSSERIF:"bold-sans-serif",SANSSERIFITALIC:"sans-serif-italic",SANSSERIFBOLDITALIC:"sans-serif-bold-italic",MONOSPACE:"monospace",INITIAL:"inital",TAILED:"tailed",LOOPED:"looped",STRETCHED:"stretched",CALLIGRAPHIC:"-tex-calligraphic",BOLDCALLIGRAPHIC:"-tex-bold-calligraphic",OLDSTYLE:"-tex-oldstyle",BOLDOLDSTYLE:"-tex-bold-oldstyle",MATHITALIC:"-tex-mathit"},Form:{PREFIX:"prefix",INFIX:"infix",POSTFIX:"postfix"},LineBreak:{AUTO:"auto",NEWLINE:"newline",NOBREAK:"nobreak",GOODBREAK:"goodbreak",BADBREAK:"badbreak"},LineBreakStyle:{BEFORE:"before",AFTER:"after",DUPLICATE:"duplicate",INFIXLINBREAKSTYLE:"infixlinebreakstyle"},IndentAlign:{LEFT:"left",CENTER:"center",RIGHT:"right",AUTO:"auto",ID:"id",INDENTALIGN:"indentalign"},IndentShift:{INDENTSHIFT:"indentshift"},LineThickness:{THIN:"thin",MEDIUM:"medium",THICK:"thick"},Notation:{LONGDIV:"longdiv",ACTUARIAL:"actuarial",PHASORANGLE:"phasorangle",RADICAL:"radical",BOX:"box",ROUNDEDBOX:"roundedbox",CIRCLE:"circle",LEFT:"left",RIGHT:"right",TOP:"top",BOTTOM:"bottom",UPDIAGONALSTRIKE:"updiagonalstrike",DOWNDIAGONALSTRIKE:"downdiagonalstrike",VERTICALSTRIKE:"verticalstrike",HORIZONTALSTRIKE:"horizontalstrike",NORTHEASTARROW:"northeastarrow",MADRUWB:"madruwb",UPDIAGONALARROW:"updiagonalarrow"},Align:{TOP:"top",BOTTOM:"bottom",CENTER:"center",BASELINE:"baseline",AXIS:"axis",LEFT:"left",RIGHT:"right"},Lines:{NONE:"none",SOLID:"solid",DASHED:"dashed"},Side:{LEFT:"left",RIGHT:"right",LEFTOVERLAP:"leftoverlap",RIGHTOVERLAP:"rightoverlap"},Width:{AUTO:"auto",FIT:"fit"},Actiontype:{TOGGLE:"toggle",STATUSLINE:"statusline",TOOLTIP:"tooltip",INPUT:"input"},Overflow:{LINBREAK:"linebreak",SCROLL:"scroll",ELIDE:"elide",TRUNCATE:"truncate",SCALE:"scale"},Unit:{EM:"em",EX:"ex",PX:"px",IN:"in",CM:"cm",MM:"mm",PT:"pt",PC:"pc"},Attr:{LATEX:"data-latex",LATEXITEM:"data-latex-item"}};class sa{constructor(t,e,s){this._string=t,this.configuration=s,this.macroCount=0,this.i=0,this.currentCS="",this.saveI=0;const i=Object.hasOwn(e,"isInner"),r=e.isInner;let n;if(delete e.isInner,e){n={};for(const t of Object.keys(e))n[t]=e[t]}this.configuration.pushParser(this),this.stack=new $o(this.itemFactory,n,!i||r),this.Parse(),this.Push(this.itemFactory.create("stop")),this.updateResult(this.string,this.i),this.stack.env=n}get options(){return this.configuration.options}get itemFactory(){return this.configuration.itemFactory}get tags(){return this.configuration.tags}set string(t){this._string=t}get string(){return this._string}parse(t,e){const s=this.saveI;this.saveI=this.i;const i=this.configuration.handlers.get(t).parse(e);return this.updateResult(e[1],s),this.saveI=s,i}lookup(t,e){return this.configuration.handlers.get(t).lookup(e)}contains(t,e){return this.configuration.handlers.get(t).contains(e)}toString(){let t="";for(const e of Array.from(this.configuration.handlers.keys()))t+=e+": "+this.configuration.handlers.get(e)+"\n";return t}Parse(){let t;for(;this.i<this.string.length;)t=this.getCodePoint(),this.i+=t.length,this.parse(Go.CHARACTER,[this,t])}Push(t){t instanceof ta&&(t.startI=this.saveI,t.stopI=this.i,t.startStr=this.string),t instanceof Er&&t.isInferred?this.PushAll(t.childNodes):this.stack.Push(t)}PushAll(t){for(const e of t)this.stack.Push(e)}mml(){if(!this.stack.Top().isKind("mml"))return null;const t=this.stack.Top().First;return this.configuration.popParser(),t.attributes.set(ea.Attr.LATEX,this.string),t}convertDelimiter(t){var e;const s=this.lookup(Go.DELIMITER,t);return null!==(e=null==s?void 0:s.char)&&void 0!==e?e:null}getCodePoint(){const t=this.string.codePointAt(this.i);return void 0===t?"":String.fromCodePoint(t)}nextIsSpace(){return!!this.string.charAt(this.i).match(/\s/)}GetNext(){for(;this.nextIsSpace();)this.i++;return this.getCodePoint()}GetCS(){const t=this.string.slice(this.i).match(/^(([a-z]+) ?|[\uD800-\uDBFF].|.)/i);return t?(this.i+=t[0].length,t[2]||t[1]):(this.i++," ")}GetArgument(t,e=!1){switch(this.GetNext()){case"":if(!e)throw new Qo("MissingArgFor","Missing argument for %1",this.currentCS);return null;case"}":if(!e)throw new Qo("ExtraCloseMissingOpen","Extra close brace or missing open brace");return null;case"\\":return this.i++,"\\"+this.GetCS();case"{":{const t=++this.i;let e=1;for(;this.i<this.string.length;)switch(this.string.charAt(this.i++)){case"\\":this.i++;break;case"{":e++;break;case"}":if(0===--e)return this.string.slice(t,this.i-1)}throw new Qo("MissingCloseBrace","Missing close brace")}}const s=this.getCodePoint();return this.i+=s.length,s}GetBrackets(t,e,s=!1){if("["!==this.GetNext())return e;const i=++this.i;let r=0,n=0;for(;this.i<this.string.length;)switch(this.string.charAt(this.i++)){case"{":r++;break;case"\\":this.i++;break;case"}":if(r--<=0)throw new Qo("ExtraCloseLooking","Extra close brace while looking for %1","']'");break;case"[":0===r&&n++;break;case"]":if(0===r){if(!s||0===n)return this.string.slice(i,this.i-1);n--}}throw new Qo("MissingCloseBracket","Could not find closing ']' for argument to %1",this.currentCS)}GetDelimiter(t,e=!1){let s=this.GetNext();if(this.i+=s.length,this.i<=this.string.length&&("\\"===s?s+=this.GetCS():"{"===s&&e&&(this.i--,s=this.GetArgument(t).trim()),this.contains(Go.DELIMITER,s)))return this.convertDelimiter(s);throw new Qo("MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",this.currentCS)}GetDimen(t){if("{"===this.GetNext()){const e=this.GetArgument(t),[s,i]=Ko.matchDimen(e);if(s)return s+i}else{const t=this.string.slice(this.i),[e,s,i]=Ko.matchDimen(t,!0);if(e)return this.i+=i,e+s}throw new Qo("MissingDimOrUnits","Missing dimension or its units for %1",this.currentCS)}GetUpTo(t,e){for(;this.nextIsSpace();)this.i++;const s=this.i;let i=0;for(;this.i<this.string.length;){const t=this.i;let r=this.GetNext();switch(this.i+=r.length,r){case"\\":r+=this.GetCS();break;case"{":i++;break;case"}":if(0===i)throw new Qo("ExtraCloseLooking","Extra close brace while looking for %1",e);i--}if(0===i&&r===e)return this.string.slice(s,t)}throw new Qo("TokenNotFoundForCommand","Could not find %1 for %2",e,this.currentCS)}ParseArg(t){return new sa(this.GetArgument(t),this.stack.env,this.configuration).mml()}ParseUpTo(t,e){return new sa(this.GetUpTo(t,e),this.stack.env,this.configuration).mml()}GetDelimiterArg(t){const e=Ko.trimSpaces(this.GetArgument(t));if(""===e)return null;if(this.contains(Go.DELIMITER,e))return e;throw new Qo("MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",this.currentCS)}GetStar(){const t="*"===this.GetNext();return t&&this.i++,t}create(t,...e){const s=this.configuration.nodeFactory.create(t,...e);return s.isToken&&s.attributes.hasExplicit("mathvariant")&&"-"===s.attributes.get("mathvariant").charAt(0)&&s.setProperty("ignore-variant",!0),s}updateResult(t,e){const s=this.stack.Prev(!0);if(!s)return;const i=s.attributes.get(ea.Attr.LATEXITEM);if(void 0!==i)return void s.attributes.set(ea.Attr.LATEX,i);let r=(e=e<this.saveI?this.saveI:e)!==this.i?this.string.slice(e,this.i):t;if(r=r.trim(),r)if("\\"===t&&(r="\\"+r),"^"!==s.attributes.get(ea.Attr.LATEX)||"^"===r||"\\^"===r)if("_"!==s.attributes.get(ea.Attr.LATEX)||"_"===r||"\\_"===r)"}"!==r?s.attributes.set(ea.Attr.LATEX,r):this.composeBraces(s);else if(s.childNodes[1]&&("}"===r?this.composeBraces(s.childNodes[1]):s.childNodes[1].attributes.set(ea.Attr.LATEX,r)),s.childNodes[2]){const t=s.childNodes[2].attributes.get(ea.Attr.LATEX);this.composeLatex(s,`^${t}_`,0,1)}else this.composeLatex(s,"_",0,1);else if(s.childNodes[2]&&("}"===r?this.composeBraces(s.childNodes[2]):s.childNodes[2].attributes.set(ea.Attr.LATEX,r)),s.childNodes[1]){const t=s.childNodes[1].attributes.get(ea.Attr.LATEX);this.composeLatex(s,`_${t}^`,0,2)}else this.composeLatex(s,"^",0,2)}composeLatex(t,e,s,i){if(!t.childNodes[s]||!t.childNodes[i])return;const r=(t.childNodes[s].attributes.get(ea.Attr.LATEX)||"")+e+t.childNodes[i].attributes.get(ea.Attr.LATEX);t.attributes.set(ea.Attr.LATEX,r)}composeBraces(t){const e=this.composeBracedContent(t);t.attributes.set(ea.Attr.LATEX,`{${e}}`)}composeBracedContent(t){var e,s;const i=(null===(e=t.childNodes[0])||void 0===e?void 0:e.childNodes)||[];let r="";for(const t of i){const e=(null===(s=null==t?void 0:t.attributes)||void 0===s?void 0:s.get(ea.Attr.LATEX))||"";e&&(r+=r&&r.match(/[a-zA-Z]$/)&&e.match(/^[a-zA-Z]/)?" "+e:e)}return r}}class ia extends ta{}class ra extends or{constructor(){super(...arguments),this.defaultKind="dummy",this.configuration=null}}ra.DefaultStackItems={[ia.prototype.kind]:ia};const na=ra;class oa{constructor(){this.mmlFactory=null,this.factory={node:oa.createNode,token:oa.createToken,text:oa.createText,error:oa.createError}}static createNode(t,e,s=[],i={},r){const n=t.mmlFactory.create(e);return n.setChildren(s),r&&n.appendChild(r),jo.setProperties(n,i),n}static createToken(t,e,s={},i=""){const r=t.create("text",i);return t.create("node",e,[],s,r)}static createText(t,e){return null==e?null:t.mmlFactory.create("text").setText(e)}static createError(t,e){const s=t.create("text",e),i=t.create("node","mtext",[],{},s);return t.create("node","merror",[i],{"data-mjx-error":e})}setMmlFactory(t){this.mmlFactory=t}set(t,e){this.factory[t]=e}setCreators(t){for(const e in t)this.set(e,t[e])}create(t,...e){const s=(this.factory[t]||this.factory.node)(this,e[0],...e.slice(1));return"node"===t&&this.configuration.addNode(e[0],s),s}get(t){return this.factory[t]}}class aa{static oneof(...t){return new this("string",(e=>t.includes(e)),(t=>t))}constructor(t,e,s){this.name=t,this.verify=e,this.convert=s}}const ca={boolean:new aa("boolean",(t=>"true"===t||"false"===t),(t=>"true"===t)),number:new aa("number",(t=>!!t.match(/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[-+]?\d+)?$/)),(t=>parseFloat(t))),integer:new aa("integer",(t=>!!t.match(/^[-+]?\d+$/)),(t=>parseInt(t))),string:new aa("string",(t=>!0),(t=>t)),dimen:new aa("dimen",(t=>null!==Ko.matchDimen(t)[0]),(t=>t))};function la(t,e){if(0===e)return t.replace(/^\s+/,"").replace(/([^\\\s]|^)((?:\\\\)*(?:\\\s)?)?\s+$/,"$1$2");for(;e>0;)t=t.trim().slice(1,-1),e--;return t}function ha(t,e,s=!1,i=!1){const r=t.length;let n=0,o="",a=0,c=0,l=!0;for(;a<r;){const i=t[a++];switch(i){case"\\":o+=i+(t[a++]||""),l=!1;continue;case" ":break;case"{":l&&c++,n++;break;case"}":if(!n)throw new Qo("ExtraCloseMissingOpen","Extra close brace or missing open brace");n--,l=!1;break;default:if(!n&&e.includes(i))return[la(o,s?Math.min(1,c):c),i,t.slice(a)];c>n&&(c=n),l=!1}o+=i}if(n)throw new Qo("ExtraOpenMissingClose","Extra open brace or missing close brace");return i&&c?["","",la(o,1)]:[la(o,s?Math.min(1,c):c),"",t.slice(a)]}const da={cols:(...t)=>t.map((t=>Ko.em(t))).join(" "),fenced(t,e,s,i,r="",n=""){const o=t.nodeFactory,a=o.create("node","mrow",[],{open:e,close:i,texClass:ur.INNER});let c;if(r)c=new sa("\\"+r+"l"+e,t.parser.stack.env,t).mml();else{const t=o.create("text",e);c=o.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:ur.OPEN},t)}if(jo.appendChildren(a,[c,s]),r)c=new sa("\\"+r+"r"+i,t.parser.stack.env,t).mml();else{const t=o.create("text",i);c=o.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:ur.CLOSE},t)}return n&&c.attributes.set("mathcolor",n),jo.appendChildren(a,[c]),a},fixedFence(t,e,s,i){const r=t.nodeFactory.create("node","mrow",[],{open:e,close:i,texClass:ur.ORD});return e&&jo.appendChildren(r,[da.mathPalette(t,e,"l")]),jo.isType(s,"mrow")?jo.appendChildren(r,jo.getChildren(s)):jo.appendChildren(r,[s]),i&&jo.appendChildren(r,[da.mathPalette(t,i,"r")]),r},mathPalette(t,e,s){"{"!==e&&"}"!==e||(e="\\"+e);const i="{\\big"+s+" "+e+"}";return new sa("\\mathchoice"+("{\\bigg"+s+" "+e+"}")+i+i+i,{},t).mml()},fixInitialMO(t,e){for(let s=0,i=e.length;s<i;s++){const i=e[s];if(i&&!jo.isType(i,"mspace")&&(!jo.isType(i,"TeXAtom")||jo.getChildren(i)[0]&&jo.getChildren(jo.getChildren(i)[0]).length)){if(jo.isEmbellished(i)||jo.isType(i,"TeXAtom")&&jo.getTexClass(i)===ur.REL){const s=t.nodeFactory.create("node","mi");e.unshift(s)}break}}},internalMath(t,e,s,i){if(e=e.replace(/ +/g," "),t.configuration.options.internalMath)return t.configuration.options.internalMath(t,e,s,i);const r=i||t.stack.env.font,n=r?{mathvariant:r}:{};let o,a,c=[],l=0,h=0,d="",u=0;if(e.match(/\\?[${}\\]|\\\(|\\(?:eq)?ref\s*\{|\\U/)){for(;l<e.length;)if(o=e.charAt(l++),"$"===o)"$"===d&&0===u?(a=t.create("node","TeXAtom",[new sa(e.slice(h,l-1),{},t.configuration).mml()]),c.push(a),d="",h=l):""===d&&(h<l-1&&c.push(da.internalText(t,e.slice(h,l-1),n)),d="$",h=l);else if("{"===o&&""!==d)u++;else if("}"===o)if("}"===d&&0===u){const s=new sa(e.slice(h,l),{},t.configuration).mml();a=t.create("node","TeXAtom",[s],n),c.push(a),d="",h=l}else""!==d&&u&&u--;else if("\\"===o)if(""===d&&e.substring(l).match(/^(eq)?ref\s*\{/)){const s=RegExp["$&"].length;h<l-1&&c.push(da.internalText(t,e.slice(h,l-1),n)),d="}",h=l-1,l+=s}else if(o=e.charAt(l++),"("===o&&""===d)h<l-2&&c.push(da.internalText(t,e.slice(h,l-2),n)),d=")",h=l;else if(")"===o&&")"===d&&0===u)a=t.create("node","TeXAtom",[new sa(e.slice(h,l-2),{},t.configuration).mml()]),c.push(a),d="",h=l;else if(o.match(/[${}\\]/)&&""===d)l--,e=e.substring(0,l-1)+e.substring(l);else if("U"===o){const t=e.substring(l).match(/^\s*(?:([0-9A-F])|\{\s*([0-9A-F]+)\s*\})/);if(!t)throw new Qo("BadRawUnicode","Argument to %1 must a hexadecimal number with 1 to 6 digits","\\U");const s=String.fromCodePoint(parseInt(t[1]||t[2],16));e=e.substring(0,l-2)+s+e.substring(l+t[0].length),l=l-2+s.length}if(""!==d)throw new Qo("MathNotTerminated","Math mode is not properly terminated")}return h<e.length&&c.push(da.internalText(t,e.slice(h),n)),null!=s?c=[t.create("node","mstyle",c,{displaystyle:!1,scriptlevel:s})]:c.length>1&&(c=[t.create("node","mrow",c)]),c},internalText(t,e,s){e=e.replace(/\n+/g," ").replace(/^ +/,go.nbsp).replace(/ +$/,go.nbsp);const i=t.create("text",e);return t.create("node","mtext",[],s,i)},underOver(t,e,s,i,r){if(da.checkMovableLimits(e),jo.isType(e,"munderover")&&jo.isEmbellished(e)){jo.setProperties(jo.getCoreMO(e),{lspace:0,rspace:0});const s=t.create("node","mo",[],{rspace:0});e=t.create("node","mrow",[s,e])}const n=t.create("node","munderover",[e]);jo.setChild(n,"over"===i?n.over:n.under,s);let o=n;return r&&(o=t.create("node","TeXAtom",[t.create("node","mstyle",[n],{displaystyle:!0,scriptlevel:0})],{texClass:ur.OP,movesupsub:!0})),jo.setProperty(o,"subsupOK",!0),o},checkMovableLimits(t){const e=jo.isType(t,"mo")?jo.getForm(t):null;(jo.getProperty(t,"movablelimits")||e&&e[3]&&e[3].movablelimits)&&jo.setProperties(t,{movablelimits:!1})},setArrayAlign:(t,e,s)=>(s||(e=Ko.trimSpaces(e||"")),"t"===e?t.arraydef.align="baseline 1":"b"===e?t.arraydef.align="baseline -1":"c"===e?t.arraydef.align="axis":e&&(s?(s.string=`[${e}]`+s.string.slice(s.i),s.i=0):t.arraydef.align=e),t),substituteArgs(t,e,s){let i="",r="",n=0;for(;n<s.length;){let o=s.charAt(n++);if("\\"===o)i+=o+s.charAt(n++);else if("#"===o)if(o=s.charAt(n++),"#"===o)i+=o;else{if(!o.match(/[1-9]/)||parseInt(o,10)>e.length)throw new Qo("IllegalMacroParam","Illegal macro parameter reference");r=da.addArgs(t,da.addArgs(t,r,i),e[parseInt(o,10)-1]),i=""}else i+=o}return da.addArgs(t,r,i)},addArgs(t,e,s){if(s.match(/^[a-z]/i)&&e.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)&&(e+=" "),e.length+s.length>t.configuration.options.maxBuffer)throw new Qo("MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?");return e+s},checkMaxMacros(t,e=!0){if(!(++t.macroCount<=t.configuration.options.maxMacros))throw e?new Qo("MaxMacroSub1","MathJax maximum macro substitution count exceeded; is here a recursive macro call?"):new Qo("MaxMacroSub2","MathJax maximum substitution count exceeded; is there a recursive latex environment?")},checkEqnEnv(t,e=!0){const s=t.stack.Top(),i=s.First;if(!(s.getProperty("nestable")&&e&&!i||s.getProperty("nestStart"))&&(!s.isKind("start")||i))throw new Qo("ErroneousNestingEq","Erroneous nesting of equation structures")},copyNode(t,e){const s=t.copy(),i=e.configuration;return s.walkTree((t=>{i.addNode(t.kind,t);const e=(t.getProperty("in-lists")||"").split(/,/);for(const s of e)s&&i.addNode(s,t)})),s},mmlFilterAttribute:(t,e,s)=>s,getFontDef(t){const e=t.stack.env.font;return e?{mathvariant:e}:{}},keyvalOptions(t,e=null,s=!1,i=!1){const r=function(t,e=!1){const s={};let i,r,n,o=t,a=!0;for(;o;)[r,i,o]=ha(o,["=",","],e,a),a=!1,"="===i?([n,i,o]=ha(o,[","],e),n="false"===n||"true"===n?JSON.parse(n):n,s[r]=n):r&&(s[r]=!0);return s}(t,i);if(e)for(const t of Object.keys(r))if(Object.hasOwn(e,t)){if(e[t]instanceof aa){const s=e[t],i=String(r[t]);if(!s.verify(i))throw new Qo("InvalidValue","Value for key '%1' is not of the expected type",t);r[t]=s.convert(i)}}else{if(s)throw new Qo("InvalidOption","Invalid option: %1",t);delete r[t]}return r},isLatinOrGreekChar:t=>!!t.normalize("NFD").match(/[a-zA-Z\u0370-\u03F0]/)};class ua{constructor(){this.columnHandler={l:t=>t.calign[t.j++]="left",c:t=>t.calign[t.j++]="center",r:t=>t.calign[t.j++]="right",p:t=>this.getColumn(t,"top"),m:t=>this.getColumn(t,"middle"),b:t=>this.getColumn(t,"bottom"),w:t=>this.getColumn(t,"top",""),W:t=>this.getColumn(t,"top",""),"|":t=>this.addRule(t,"solid"),":":t=>this.addRule(t,"dashed"),">":t=>t.cstart[t.j]=(t.cstart[t.j]||"")+this.getBraces(t),"<":t=>t.cend[t.j-1]=(t.cend[t.j-1]||"")+this.getBraces(t),"@":t=>this.addAt(t,this.getBraces(t)),"!":t=>this.addBang(t,this.getBraces(t)),"*":t=>this.repeat(t),P:t=>this.macroColumn(t,">{$}p{#1}<{$}",1),M:t=>this.macroColumn(t,">{$}m{#1}<{$}",1),B:t=>this.macroColumn(t,">{$}b{#1}<{$}",1)," ":t=>{}},this.MAXCOLUMNS=1e4}process(t,e,s){const i={parser:t,template:e,i:0,j:0,c:"",cwidth:[],calign:[],cspace:[],clines:[],cstart:s.cstart,cend:s.cend,ralign:s.ralign,cextra:s.cextra};let r=0;for(;i.i<i.template.length;){if(r++>this.MAXCOLUMNS)throw new Qo("MaxColumns","Too many column specifiers (perhaps looping column definitions?)");const t=i.template.codePointAt(i.i),e=i.c=String.fromCodePoint(t);if(i.i+=e.length,!Object.hasOwn(this.columnHandler,e))throw new Qo("BadPreamToken","Illegal pream-token (%1)",e);this.columnHandler[e](i)}this.setColumnAlign(i,s),this.setColumnWidths(i,s),this.setColumnSpacing(i,s),this.setColumnLines(i,s),this.setPadding(i,s)}setColumnAlign(t,e){e.arraydef.columnalign=t.calign.join(" ")}setColumnWidths(t,e){if(!t.cwidth.length)return;const s=[...t.cwidth];s.length<t.calign.length&&s.push("auto"),e.arraydef.columnwidth=s.map((t=>t||"auto")).join(" ")}setColumnSpacing(t,e){if(!t.cspace.length)return;const s=[...t.cspace];s.length<t.calign.length&&s.push("1em"),e.arraydef.columnspacing=s.slice(1).map((t=>t||"1em")).join(" ")}setColumnLines(t,e){if(!t.clines.length)return;const s=[...t.clines];s[0]&&e.frame.push(["left",s[0]]),s.length>t.calign.length?e.frame.push(["right",s.pop()]):s.length<t.calign.length&&s.push("none"),s.length>1&&(e.arraydef.columnlines=s.slice(1).map((t=>t||"none")).join(" "))}setPadding(t,e){if(!t.cextra[0]&&!t.cextra[t.calign.length-1])return;const s=t.calign.length-1,i=t.cspace,r=t.cextra[s]?i[s]:null;e.arraydef["data-array-padding"]=`${i[0]||".5em"} ${r||".5em"}`}getColumn(t,e,s="left"){t.calign[t.j]=s||this.getAlign(t),t.cwidth[t.j]=this.getDimen(t),t.ralign[t.j]=[e,t.cwidth[t.j],t.calign[t.j]],t.j++}getDimen(t){const e=this.getBraces(t);if(!Ko.matchDimen(e)[0])throw new Qo("MissingColumnDimOrUnits","Missing dimension or its units for %1 column declaration",t.c);return e}getAlign(t){return Fi(this.getBraces(t).toLowerCase(),{l:"left",c:"center",r:"right"},"")}getBraces(t){for(;" "===t.template[t.i];)t.i++;if(t.i>=t.template.length)throw new Qo("MissingArgForColumn","Missing argument for %1 column declaration",t.c);if("{"!==t.template[t.i])return t.template[t.i++];const e=++t.i;let s=1;for(;t.i<t.template.length;)switch(t.template.charAt(t.i++)){case"\\":t.i++;break;case"{":s++;break;case"}":if(0===--s)return t.template.slice(e,t.i-1)}throw new Qo("MissingCloseBrace","Missing close brace")}macroColumn(t,e,s){const i=[];for(;s>0&&s--;)i.push(this.getBraces(t));t.template=da.substituteArgs(t.parser,i,e)+t.template.slice(t.i),t.i=0}addRule(t,e){t.clines[t.j]&&this.addAt(t,"\\,"),t.clines[t.j]=e,"0"===t.cspace[t.j]&&(t.cstart[t.j]="\\hspace{.5em}")}addAt(t,e){const{cstart:s,cspace:i,j:r}=t;t.cextra[r]=!0,t.calign[r]="center",t.clines[r]&&(".5em"===i[r]?s[r-1]+="\\hspace{.25em}":i[r]||(t.cend[r-1]=(t.cend[r-1]||"")+"\\hspace{.5em}")),s[r]=e,i[r]="0",i[++t.j]="0"}addBang(t,e){const{cstart:s,cspace:i,j:r}=t;t.cextra[r]=!0,t.calign[r]="center",s[r]=("0"===i[r]&&t.clines[r]?"\\hspace{.25em}":"")+e,i[r]||(i[r]=".5em"),i[++t.j]=".5em"}repeat(t){const e=this.getBraces(t),s=this.getBraces(t),i=parseInt(e);if(String(i)!==e)throw new Qo("ColArgNotNum","First argument to %1 column specifier must be a number","*");t.template=new Array(i).fill(s).join("")+t.template.substring(t.i),t.i=0}}const pa=ea.Variant;class ma{constructor(t,e=[]){this.options={},this.columnParser=new ua,this.packageData=new Map,this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.handlers=t.handlers,this.nodeFactory=new oa,this.nodeFactory.configuration=this,this.nodeFactory.setCreators(t.nodes),this.itemFactory=new na(t.items),this.itemFactory.configuration=this,Ri(this.options,...e),Ri(this.options,t.options),this.mathStyle=ma.getVariant.get(this.options.mathStyle)||ma.getVariant.get("TeX")}pushParser(t){this.parsers.unshift(t)}popParser(){this.parsers.shift()}get parser(){return this.parsers[0]}clear(){this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.tags.resetTag()}addNode(t,e){let s=this.nodeLists[t];if(s||(s=this.nodeLists[t]=[]),s.push(e),e.kind!==t){const s=jo.getProperty(e,"in-lists")||"",i=(s?s.split(/,/):[]).concat(t).join(",");jo.setProperty(e,"in-lists",i)}}getList(t){const e=this.nodeLists[t]||[],s=[];for(const t of e)this.inTree(t)&&s.push(t);return this.nodeLists[t]=s,s}removeFromList(t,e){const s=this.nodeLists[t]||[];for(const t of e){const e=s.indexOf(t);e>=0&&s.splice(e,1)}}inTree(t){for(;t&&t!==this.root;)t=t.parent;return!!t}}ma.getVariant=new Map([["TeX",(t,e)=>e&&t.match(/^[\u0391-\u03A9\u03F4]/)?pa.NORMAL:""],["ISO",t=>pa.ITALIC],["French",t=>t.normalize("NFD").match(/^[a-z]/)?pa.ITALIC:pa.NORMAL],["upright",t=>pa.NORMAL]]);const fa=ma;class ga{constructor(t="???",e=""){this.tag=t,this.id=e}}class ba{constructor(t="",e=!1,s=!1,i=null,r="",n="",o=!1,a=""){this.env=t,this.taggable=e,this.defaultTags=s,this.tag=i,this.tagId=r,this.tagFormat=n,this.noTag=o,this.labelId=a}}class Ea{constructor(){this.counter=0,this.allCounter=0,this.configuration=null,this.ids={},this.allIds={},this.labels={},this.allLabels={},this.redo=!1,this.refUpdate=!1,this.currentTag=new ba,this.history=[],this.stack=[],this.enTag=function(t,e){const s=this.configuration.nodeFactory,i=s.create("node","mtd",[t]),r=s.create("node","mlabeledtr",[e,i]);return s.create("node","mtable",[r],{side:this.configuration.options.tagSide,minlabelspacing:this.configuration.options.tagIndent,displaystyle:!0})}}start(t,e,s){this.currentTag&&this.stack.push(this.currentTag);const i=this.label;this.currentTag=new ba(t,e,s),this.label=i}get env(){return this.currentTag.env}end(){this.history.push(this.currentTag);const t=this.label;this.currentTag=this.stack.pop(),t&&!this.label&&(this.label=t)}tag(t,e){this.currentTag.tag=t,this.currentTag.tagFormat=e?t:this.formatTag(t),this.currentTag.noTag=!1}notag(){this.tag("",!0),this.currentTag.noTag=!0}get noTag(){return this.currentTag.noTag}set label(t){this.currentTag.labelId=t}get label(){return this.currentTag.labelId}formatUrl(t,e){return e+"#"+encodeURIComponent(t)}formatTag(t){return"("+t+")"}formatRef(t){return this.formatTag(t)}formatId(t){return"mjx-eqn:"+t.replace(/\s/g,"_")}formatNumber(t){return t.toString()}autoTag(){null==this.currentTag.tag&&(this.counter++,this.tag(this.formatNumber(this.counter),!1))}clearTag(){this.tag(null,!0),this.currentTag.tagId=""}getTag(t=!1){if(t)return this.autoTag(),this.makeTag();const e=this.currentTag;return e.taggable&&!e.noTag&&(e.defaultTags&&this.autoTag(),e.tag)?this.makeTag():null}resetTag(){this.history=[],this.redo=!1,this.refUpdate=!1,this.clearTag()}reset(t=0){this.resetTag(),this.counter=this.allCounter=t,this.allLabels={},this.allIds={},this.label=""}startEquation(t){this.history=[],this.stack=[],this.clearTag(),this.currentTag=new ba("",void 0,void 0),this.labels={},this.ids={},this.counter=this.allCounter,this.redo=!1;const e=t.inputData.recompile;e&&(this.refUpdate=!0,this.counter=e.counter)}finishEquation(t){this.redo&&(t.inputData.recompile={state:t.state(),counter:this.allCounter}),this.refUpdate||(this.allCounter=this.counter),Object.assign(this.allIds,this.ids),Object.assign(this.allLabels,this.labels)}finalize(t,e){if(!e.display||this.currentTag.env||null==this.currentTag.tag)return t;const s=this.makeTag();return this.enTag(t,s)}makeId(){this.currentTag.tagId=this.formatId(this.configuration.options.useLabelIds&&this.label||this.currentTag.tag)}makeTag(){this.makeId(),this.label&&(this.labels[this.label]=new ga(this.currentTag.tag,this.currentTag.tagId),this.label="");const t=new sa("\\text{"+this.currentTag.tagFormat+"}",{},this.configuration).mml();return this.configuration.nodeFactory.create("node","mtd",[t],{id:this.currentTag.tagId,rowalign:this.configuration.options.tagAlign})}}class Na extends Ea{autoTag(){}getTag(){return this.currentTag.tag?super.getTag():null}}class ya extends Ea{finalize(t,e){if(!e.display||this.history.find((function(t){return t.taggable})))return t;const s=this.getTag(!0);return this.enTag(t,s)}}const xa=new Map([["none",Na],["all",ya]]);let va="none";const Ca={OPTIONS:{tags:va,tagSide:"right",tagIndent:"0.8em",useLabelIds:!0,ignoreDuplicateLabels:!1,tagAlign:"baseline"},add(t,e){xa.set(t,e)},addTags(t){for(const e of Object.keys(t))Ca.add(e,t[e])},create(t){const e=xa.get(t)||xa.get(va);if(!e)throw Error("Unknown tags class");return new e},setDefault(t){va=t},getDefault:()=>Ca.create(va)};class Ta{constructor(t,e,s){this._token=t,this._char=e,this._attributes=s}get token(){return this._token}get char(){return this._char}get attributes(){return this._attributes}}class wa{constructor(t,e,s=[]){this._token=t,this._func=e,this._args=s}get token(){return this._token}get func(){return this._func}get args(){return this._args}}function _a(t){return void 0===t||t}class ka{constructor(t,e){this._name=t,this._parser=e,Pa.register(this)}get name(){return this._name}parserFor(t){return this.contains(t)?this.parser:null}parse([t,e]){const s=this.parserFor(e),i=this.lookup(e);return s&&i?_a(s(t,i)):null}set parser(t){this._parser=t}get parser(){return this._parser}}class Aa extends ka{constructor(t,e,s){super(t,e),this._regExp=s}contains(t){return this._regExp.test(t)}lookup(t){return this.contains(t)?t:null}}class La extends ka{constructor(){super(...arguments),this.map=new Map}lookup(t){return this.map.get(t)}contains(t){return this.map.has(t)}add(t,e){this.map.set(t,e)}remove(t){this.map.delete(t)}}class Ma extends La{constructor(t,e,s){super(t,e);for(const t of Object.keys(s)){const e=s[t],[i,r]="string"==typeof e?[e,null]:e,n=new Ta(t,i,r);this.add(t,n)}}}class Ia extends Ma{parse([t,e]){return super.parse([t,"\\"+e])}}class Sa extends La{constructor(t,e,s={}){super(t,null);const i=t=>"string"==typeof t?s[t]:t;for(const[t,s]of Object.entries(e)){let e,r;Array.isArray(s)?(e=i(s[0]),r=s.slice(1)):(e=i(s),r=[]);const n=new wa(t,e,r);this.add(t,n)}}parserFor(t){const e=this.lookup(t);return e?e.func:null}parse([t,e]){const s=this.lookup(e),i=this.parserFor(e);return s&&i?_a(i(t,s.token,...s.args)):null}}class Ra extends Sa{parse([t,e]){const s=this.lookup(e),i=this.parserFor(e);if(!s||!i)return null;const r=t.currentCS;t.currentCS="\\"+e;const n=i(t,"\\"+s.token,...s.args);return t.currentCS=r,_a(n)}}class Oa extends Sa{constructor(t,e,s,i={}){super(t,s,i),this.parser=e}parse([t,e]){const s=this.lookup(e),i=this.parserFor(e);return s&&i?_a(this.parser(t,s.token,i,s.args)):null}}const Da=new Map,Pa={register(t){Da.set(t.name,t)},getMap:t=>Da.get(t)};class Ba{constructor(){this._configuration=new pi,this._fallback=new mi}add(t,e,s=pi.DEFAULTPRIORITY){for(const e of t.slice().reverse()){const t=Pa.getMap(e);if(!t)return void this.warn(`Configuration '${e}' not found! Omitted.`);this._configuration.add(t,s)}e&&this._fallback.add(e,s)}remove(t,e=null){for(const e of t){const t=this.retrieve(e);t&&this._configuration.remove(t)}e&&this._fallback.remove(e)}parse(t){for(const{item:e}of this._configuration){const s=e.parse(t);if(s===Ba.FALLBACK)break;if(s)return s}const[e,s]=t;Array.from(this._fallback)[0].item(e,s)}lookup(t){const e=this.applicable(t);return e?e.lookup(t):null}contains(t){const e=this.applicable(t);return!(!e||e instanceof Ma&&null===e.lookup(t).char)}toString(){const t=[];for(const{item:e}of this._configuration)t.push(e.name);return t.join(", ")}applicable(t){for(const{item:e}of this._configuration)if(e.contains(t))return e;return null}retrieve(t){for(const{item:e}of this._configuration)if(e.name===t)return e;return null}warn(t){console.log("TexParser Warning: "+t)}}Ba.FALLBACK=Symbol("fallback");class Fa{constructor(){this.map=new Map}add(t,e,s=pi.DEFAULTPRIORITY){for(const i of Object.keys(t)){const r=i;let n=this.get(r);n||(n=new Ba,this.set(r,n)),n.add(t[r],e[r],s)}}remove(t,e){for(const s of Object.keys(t)){const i=this.get(s);i&&i.remove(t[s],e[s])}}set(t,e){this.map.set(t,e)}get(t){return this.map.get(t)}retrieve(t){for(const e of this.map.values()){const s=e.retrieve(t);if(s)return s}return null}keys(){return this.map.keys()}}class ja{static makeProcessor(t,e){return Array.isArray(t)?t:[t,e]}static _create(t,e={}){var s;const i=null!==(s=e.priority)&&void 0!==s?s:pi.DEFAULTPRIORITY,r=e.init?this.makeProcessor(e.init,i):null,n=e.config?this.makeProcessor(e.config,i):null,o=(e.preprocessors||[]).map((t=>this.makeProcessor(t,i))),a=(e.postprocessors||[]).map((t=>this.makeProcessor(t,i))),c=e.parser||"tex";return new ja(t,e[Vo.HANDLER]||{},e[Vo.FALLBACK]||{},e[Vo.ITEMS]||{},e[Vo.TAGS]||{},e[Vo.OPTIONS]||{},e[Vo.NODES]||{},o,a,r,n,i,c)}static create(t,e={}){const s=ja._create(t,e);return qa.set(t,s),s}static local(t={}){return ja._create("",t)}constructor(t,e={},s={},i={},r={},n={},o={},a=[],c=[],l=null,h=null,d,u){this.name=t,this.handler=e,this.fallback=s,this.items=i,this.tags=r,this.options=n,this.nodes=o,this.preprocessors=a,this.postprocessors=c,this.initMethod=l,this.configMethod=h,this.priority=d,this.parser=u,this.handler=Object.assign({[Go.CHARACTER]:[],[Go.DELIMITER]:[],[Go.MACRO]:[],[Go.ENVIRONMENT]:[]},e)}get init(){return this.initMethod?this.initMethod[0]:null}get config(){return this.configMethod?this.configMethod[0]:null}}const Ua=new Map,qa={set(t,e){Ua.set(t,e)},get:t=>Ua.get(t),keys:()=>Ua.keys()};class Ha{constructor(t,e=["tex"]){this.initMethod=new mi,this.configMethod=new mi,this.configurations=new pi,this.parsers=[],this.handlers=new Fa,this.items={},this.tags={},this.options={},this.nodes={},this.parsers=e;for(const e of t.slice().reverse())this.addPackage(e);for(const{item:t,priority:e}of this.configurations)this.append(t,e)}init(){this.initMethod.execute(this)}config(t){this.configMethod.execute(this,t);for(const e of this.configurations)this.addFilters(t,e.item)}addPackage(t){const e="string"==typeof t?t:t[0],s=this.getPackage(e);s&&this.configurations.add(s,"string"==typeof t?s.priority:t[1])}add(t,e,s={}){const i=this.getPackage(t);this.append(i),this.configurations.add(i,i.priority),this.init();const r=e.parseOptions;r.nodeFactory.setCreators(i.nodes);for(const t of Object.keys(i.items))r.itemFactory.setNodeClass(t,i.items[t]);Ca.addTags(i.tags),Ri(r.options,i.options),Oi(r.options,s),this.addFilters(e,i),i.config&&i.config(this,e)}getPackage(t){const e=qa.get(t);if(e&&!this.parsers.includes(e.parser))throw Error(`Package '${t}' doesn't target the proper parser`);return e||this.warn(`Package '${t}' not found. Omitted.`),e}append(t,e){e=e||t.priority,t.initMethod&&this.initMethod.add(t.initMethod[0],t.initMethod[1]),t.configMethod&&this.configMethod.add(t.configMethod[0],t.configMethod[1]),this.handlers.add(t.handler,t.fallback,e),Object.assign(this.items,t.items),Object.assign(this.tags,t.tags),Ri(this.options,t.options),Object.assign(this.nodes,t.nodes)}addFilters(t,e){for(const[s,i]of e.preprocessors)t.preFilters.add(s,i);for(const[s,i]of e.postprocessors)t.postFilters.add(s,i)}warn(t){console.warn("MathJax Warning: "+t)}}class Wa extends ta{constructor(t,e){super(t),this.global=e}get kind(){return"start"}get isOpen(){return!0}checkItem(t){if(t.isKind("stop")){let t=this.toMml();return this.global.isInner||(t=this.factory.configuration.tags.finalize(t,this.env)),[[this.factory.create("mml",t)],!0]}return super.checkItem(t)}}class za extends ta{get kind(){return"stop"}get isClose(){return!0}}class Xa extends ta{get kind(){return"open"}get isOpen(){return!0}checkItem(t){if(t.isKind("close")){const e=this.toMml(),s=this.create("node","TeXAtom",[e]);return fc(s,t),[[this.factory.create("mml",s)],!0]}return super.checkItem(t)}}Xa.errors=Object.assign(Object.create(ta.errors),{stop:["ExtraOpenMissingClose","Extra open brace or missing close brace"]});class Va extends ta{get kind(){return"close"}get isClose(){return!0}}class Ga extends ta{get kind(){return"null"}}class Ja extends ta{get kind(){return"prime"}checkItem(t){const[e,s]=this.Peek(2),i=(jo.isType(e,"msubsup")||jo.isType(e,"msup"))&&!jo.getChildAt(e,e.sup),r=(jo.isType(e,"munderover")||jo.isType(e,"mover"))&&!jo.getChildAt(e,e.over)&&!jo.getProperty(e,"subsupOK");if(!i&&!r){return[[this.create("node",e.getProperty("movesupsub")?"mover":"msup",[e,s]),t],!0]}const n=i?e.sup:e.over;return jo.setChild(e,n,s),[[e,t],!0]}}class Ka extends ta{get kind(){return"subsup"}checkItem(t){if(t.isKind("open")||t.isKind("left"))return ta.success;const e=this.First,s=this.getProperty("position");if(t.isKind("mml")){if(this.getProperty("primes"))if(2!==s)jo.setChild(e,2,this.getProperty("primes"));else{jo.setProperty(this.getProperty("primes"),"variantForm",!0);const e=this.create("node","mrow",[this.getProperty("primes"),t.First]);t.First=e}jo.setChild(e,s,t.First),null!=this.getProperty("movesupsub")&&jo.setProperty(e,"movesupsub",this.getProperty("movesupsub"));return[[this.factory.create("mml",e)],!0]}super.checkItem(t);const i=this.getErrors(["","sub","sup"][s]);throw new Qo(i[0],i[1],...i.splice(2))}}Ka.errors=Object.assign(Object.create(ta.errors),{stop:["MissingScript","Missing superscript or subscript argument"],sup:["MissingOpenForSup","Missing open brace for superscript"],sub:["MissingOpenForSub","Missing open brace for subscript"]});class $a extends ta{constructor(t){super(t),this.setProperty("name","\\over")}get kind(){return"over"}get isClose(){return!0}checkItem(t){if(t.isKind("over"))throw new Qo("AmbiguousUseOf","Ambiguous use of %1",t.getName());if(t.isClose){let e=this.create("node","mfrac",[this.getProperty("num"),this.toMml(!1)]);return null!=this.getProperty("thickness")&&jo.setAttribute(e,"linethickness",this.getProperty("thickness")),(this.getProperty("ldelim")||this.getProperty("rdelim"))&&(jo.setProperty(e,"withDelims",!0),e=da.fixedFence(this.factory.configuration,this.getProperty("ldelim"),e,this.getProperty("rdelim"))),e.attributes.set(ea.Attr.LATEXITEM,this.getProperty("name")),[[this.factory.create("mml",e),t],!0]}return super.checkItem(t)}toString(){return"over["+this.getProperty("num")+" / "+this.nodes.join("; ")+"]"}}class Ya extends ta{constructor(t,e){super(t),this.setProperty("delim",e)}get kind(){return"left"}get isOpen(){return!0}checkItem(t){if(t.isKind("right")){const e=da.fenced(this.factory.configuration,this.getProperty("delim"),this.toMml(),t.getProperty("delim"),"",t.getProperty("color")),s=e.childNodes[0],i=e.childNodes[e.childNodes.length-1],r=this.factory.create("mml",e);return fc(s,this,"\\left"),fc(i,t,"\\right"),r.Peek()[0].attributes.set(ea.Attr.LATEXITEM,"\\left"+t.startStr.slice(this.startI,t.stopI)),[[r],!0]}if(t.isKind("middle")){const e={stretchy:!0};t.getProperty("color")&&(e.mathcolor=t.getProperty("color"));const s=this.create("token","mo",e,t.getProperty("delim"));return fc(s,t,"\\middle"),this.Push(this.create("node","TeXAtom",[],{texClass:ur.CLOSE}),s,this.create("node","TeXAtom",[],{texClass:ur.OPEN})),this.env={},[[this],!0]}return super.checkItem(t)}}Ya.errors=Object.assign(Object.create(ta.errors),{stop:["ExtraLeftMissingRight","Extra \\left or missing \\right"]});class Qa extends ta{constructor(t,e,s){super(t),this.setProperty("delim",e),s&&this.setProperty("color",s)}get kind(){return"middle"}get isClose(){return!0}}class Za extends ta{constructor(t,e,s){super(t),this.setProperty("delim",e),s&&this.setProperty("color",s)}get kind(){return"right"}get isClose(){return!0}}class tc extends ta{get kind(){return"break"}constructor(t,e,s){super(t),this.setProperty("linebreak",e),this.setProperty("insert",s)}checkItem(t){var e,s;const i=this.getProperty("linebreak");if(t.isKind("mml")){const r=t.First;if(r.isKind("mo")){if("after"!==((null===(s=null===(e=jo.getOp(r))||void 0===e?void 0:e[3])||void 0===s?void 0:s.linebreakstyle)||jo.getAttribute(r,"linebreakstyle")))return jo.setAttribute(r,"linebreak",i),[[t],!0];if(!this.getProperty("insert"))return[[t],!0]}}const r=this.create("token","mspace",{linebreak:i});return[[this.factory.create("mml",r),t],!0]}}class ec extends ta{get kind(){return"begin"}get isOpen(){return!0}checkItem(t){if(t.isKind("end")){if(t.getName()!==this.getName())throw new Qo("EnvBadEnd","\\begin{%1} ended with \\end{%2}",this.getName(),t.getName());const e=this.toMml();return fc(e,t),[[this.factory.create("mml",e)],!0]}if(t.isKind("stop"))throw new Qo("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}}class sc extends ta{get kind(){return"end"}get isClose(){return!0}}class ic extends ta{get kind(){return"style"}checkItem(t){if(!t.isClose)return super.checkItem(t);const e=this.create("node","mstyle",this.nodes,this.getProperty("styles"));return[[this.factory.create("mml",e),t],!0]}}class rc extends ta{get kind(){return"position"}checkItem(t){if(t.isClose)throw new Qo("MissingBoxFor","Missing box for %1",this.getName());if(t.isFinal){let e=t.toMml();switch(this.getProperty("move")){case"vertical":return e=this.create("node","mpadded",[e],{height:this.getProperty("dh"),depth:this.getProperty("dd"),voffset:this.getProperty("dh")}),[[this.factory.create("mml",e)],!0];case"horizontal":return[[this.factory.create("mml",this.getProperty("left")),t,this.factory.create("mml",this.getProperty("right"))],!0]}}return super.checkItem(t)}}class nc extends ta{get kind(){return"cell"}get isClose(){return!0}}class oc extends ta{get isFinal(){return!0}get kind(){return"mml"}}class ac extends ta{get kind(){return"fn"}checkItem(t){const e=this.First;if(e){if(t.isOpen)return ta.success;if(!t.isKind("fn")){let s=t.First;if(!t.isKind("mml")||!s)return[[e,t],!0];if(jo.isType(s,"mstyle")&&s.childNodes.length&&jo.isType(s.childNodes[0].childNodes[0],"mspace")||jo.isType(s,"mspace"))return[[e,t],!0];jo.isEmbellished(s)&&(s=jo.getCoreMO(s));const i=jo.getForm(s);if(null!=i&&[0,0,1,1,0,1,1,0,0,0][i[2]])return[[e,t],!0]}return[[e,this.create("token","mo",{texClass:ur.NONE},go.ApplyFunction),t],!0]}return super.checkItem(t)}}class cc extends ta{constructor(){super(...arguments),this.remap=Pa.getMap("not_remap")}get kind(){return"not"}checkItem(t){let e,s,i;if(t.isKind("open")||t.isKind("left"))return ta.success;if(t.isKind("mml")&&(jo.isType(t.First,"mo")||jo.isType(t.First,"mi")||jo.isType(t.First,"mtext"))&&(e=t.First,s=jo.getText(e),1===s.length&&!jo.getProperty(e,"movesupsub")&&1===jo.getChildren(e).length))return this.remap.contains(s)?(i=this.create("text",this.remap.lookup(s).char),jo.setChild(e,0,i)):(i=this.create("text","\u0338"),jo.appendChildren(e,[i])),[[t],!0];i=this.create("text","\u29f8");const r=this.create("node","mtext",[],{},i),n=this.create("node","mpadded",[r],{width:0});return e=this.create("node","TeXAtom",[n],{texClass:ur.REL}),[[e,t],!0]}}class lc extends ta{get kind(){return"nonscript"}checkItem(t){if(t.isKind("mml")&&1===t.Size()){let e=t.First;if(e.isKind("mstyle")&&e.notParent&&(e=jo.getChildren(jo.getChildren(e)[0])[0]),e.isKind("mspace")){if(e!==t.First){const e=this.create("node","mrow",[t.Pop()]);t.Push(e)}this.factory.configuration.addNode("nonscript",t.First)}}return[[t],!0]}}class hc extends ta{get kind(){return"dots"}checkItem(t){if(t.isKind("open")||t.isKind("left"))return ta.success;let e=this.getProperty("ldots");const s=t.First;if(t.isKind("mml")&&jo.isEmbellished(s)){const t=jo.getTexClass(jo.getCoreMO(s));t!==ur.BIN&&t!==ur.REL||(e=this.getProperty("cdots"))}return[[e,t],!0]}}class dc extends ta{constructor(){super(...arguments),this.table=[],this.row=[],this.frame=[],this.hfill=[],this.arraydef={},this.cstart=[],this.cend=[],this.cextra=[],this.atEnd=!1,this.ralign=[],this.breakAlign={cell:"",row:"",table:""},this.templateSubs=0}get kind(){return"array"}get isOpen(){return!0}get copyEnv(){return!1}checkItem(t){if(t.isClose&&!t.isKind("over")){if(t.getProperty("isEntry"))return this.EndEntry(),this.clearEnv(),this.StartEntry(),ta.fail;if(t.getProperty("isCR"))return this.EndEntry(),this.EndRow(),this.clearEnv(),this.StartEntry(),ta.fail;this.EndTable(),this.clearEnv();const e=this.factory.create("mml",this.createMml());if(this.getProperty("requireClose")){if(t.isKind("close"))return[[e],!0];throw new Qo("MissingCloseBrace","Missing close brace")}return[[e,t],!0]}return super.checkItem(t)}createMml(){const t=this.arraydef.scriptlevel;delete this.arraydef.scriptlevel;let e=this.create("node","mtable",this.table,this.arraydef);return t&&e.setProperty("smallmatrix",!0),this.breakAlign.table&&jo.setAttribute(e,"data-break-align",this.breakAlign.table),this.getProperty("arrayPadding")&&(jo.setAttribute(e,"data-frame-styles",""),jo.setAttribute(e,"framespacing",this.getProperty("arrayPadding"))),e=this.handleFrame(e),void 0!==t&&(e=this.create("node","mstyle",[e],{scriptlevel:t})),(this.getProperty("open")||this.getProperty("close"))&&(e=da.fenced(this.factory.configuration,this.getProperty("open"),e,this.getProperty("close"))),e}handleFrame(t){if(!this.frame.length)return t;const e=new Map(this.frame),s=this.frame.reduce(((t,[,e])=>e===t?e:""),this.frame[0][1]);if(s){if(4===this.frame.length)return jo.setAttribute(t,"frame",s),jo.removeAttribute(t,"data-frame-styles"),t;if("solid"===s)return jo.setAttribute(t,"data-frame-styles",""),t=this.create("node","menclose",[t],{notation:Array.from(e.keys()).join(" "),"data-padding":0})}const i=To.map((t=>e.get(t)||"none")).join(" ");return jo.setAttribute(t,"data-frame-styles",i),t}StartEntry(){const t=this.row.length;let e=this.cstart[t],s=this.cend[t];const i=this.ralign[t],r=this.cextra;if(!(e||s||i||r[t]||r[t+1]))return;let[n,o,a,c]=this.getEntry();if(!r[t]||this.atEnd&&!r[t+1]||(e+="&"),"&"!==a&&(c=!!o.trim()||!!(t||a&&"\\end"!==a.substring(0,4)),r[t+1]&&!r[t]&&(s=(s||"")+"&",this.atEnd=!0)),!c&&!n)return;const l=this.parser;if(c&&(e&&(o=da.addArgs(l,e,o)),s&&(o=da.addArgs(l,o,s)),i&&(o="\\text{"+o.trim()+"}"),(e||s||i)&&++this.templateSubs>l.configuration.options.maxTemplateSubtitutions))throw new Qo("MaxTemplateSubs","Maximum template substitutions exceeded; is there an invalid use of \\\\ in the template?");n&&(o=da.addArgs(l,n,o)),l.string=da.addArgs(l,o,l.string),l.i=0}getEntry(){const t=this.parser,e=/^([^]*?)([&{}]|\\\\|\\(?:begin|end)\s*\{array\}|\\cr|\\)/;let s,i=0,r=0,n=t.i;const o=["","","",!1];for(;null!==(s=t.string.slice(n).match(e));)switch(n+=s[0].length,s[2]){case"\\":n++;break;case"{":i++;break;case"}":if(!i)return o;i--;break;case"\\begin{array}":i||r++;break;case"\\end{array}":if(!i&&r){r--;break}default:{if(i||r)continue;n-=s[2].length;let e=t.string.slice(t.i,n).trim();const o=e.match(/^(?:\s*\\(?:h(?:dash)?line|hfil{1,3}|rowcolor\s*\{.*?\}))+/);return o&&(e=e.slice(o[0].length)),t.string=t.string.slice(n),t.i=0,[(null==o?void 0:o[0])||"",e,s[2],!0]}}return o}EndEntry(){const t=this.create("node","mtd",this.nodes);this.hfill.length&&(0===this.hfill[0]&&jo.setAttribute(t,"columnalign","right"),this.hfill[this.hfill.length-1]===this.Size()&&jo.setAttribute(t,"columnalign",jo.getAttribute(t,"columnalign")?"center":"left"));const e=this.ralign[this.row.length];if(e){const[s,i,r]=e,n=this.create("node","mpadded",t.childNodes[0].childNodes,{width:i,"data-overflow":"auto","data-align":r,"data-vertical-align":s});n.setProperty("vbox",s),t.childNodes[0].childNodes=[],t.appendChild(n)}else this.breakAlign.cell&&jo.setAttribute(t,"data-vertical-align",this.breakAlign.cell);this.breakAlign.cell="",this.row.push(t),this.Clear(),this.hfill=[]}EndRow(){let t="mtr";this.getProperty("isNumbered")&&3===this.row.length?(this.row.unshift(this.row.pop()),t="mlabeledtr"):this.getProperty("isLabeled")&&(t="mlabeledtr",this.setProperty("isLabeled",!1));const e=this.create("node",t,this.row);this.breakAlign.row&&(jo.setAttribute(e,"data-break-align",this.breakAlign.row),this.breakAlign.row=""),fc(e,this),this.table.push(e),this.row=[],this.atEnd=!1}EndTable(){(this.Size()||this.row.length)&&(this.EndEntry(),this.EndRow()),this.checkLines()}checkLines(){if(this.arraydef.rowlines){const t=this.arraydef.rowlines.split(/ /);t.length===this.table.length?(this.frame.push(["bottom",t.pop()]),t.length?this.arraydef.rowlines=t.join(" "):delete this.arraydef.rowlines):t.length<this.table.length-1&&(this.arraydef.rowlines+=" none")}if(this.getProperty("rowspacing")){const t=this.arraydef.rowspacing.split(/ /);for(;t.length<this.table.length;)t.push(this.getProperty("rowspacing")+"em");this.arraydef.rowspacing=t.join(" ")}}addRowSpacing(t){if(this.arraydef.rowspacing){const e=this.arraydef.rowspacing.split(/ /);if(!this.getProperty("rowspacing")){const t=Ko.dimen2em(e[0]);this.setProperty("rowspacing",t)}const s=this.getProperty("rowspacing");for(;e.length<this.table.length;)e.push(Ko.em(s));e[this.table.length-1]=Ko.em(Math.max(0,s+Ko.dimen2em(t))),this.arraydef.rowspacing=e.join(" ")}}}class uc extends dc{constructor(t,...e){super(t),this.maxrow=0,this.factory.configuration.tags.start(e[0],e[2],e[1])}get kind(){return"eqnarray"}EndEntry(){const t=this.arraydef.columnalign.split(/ /);"right"!==(this.row.length&&t.length?t[this.row.length%t.length]:"right")&&da.fixInitialMO(this.factory.configuration,this.nodes),super.EndEntry()}EndRow(){this.row.length>this.maxrow&&(this.maxrow=this.row.length);const t=this.factory.configuration.tags.getTag();t&&(this.row=[t].concat(this.row),this.setProperty("isLabeled",!0)),this.factory.configuration.tags.clearTag(),super.EndRow()}EndTable(){super.EndTable(),this.factory.configuration.tags.end(),this.extendArray("columnalign",this.maxrow),this.extendArray("columnwidth",this.maxrow),this.extendArray("columnspacing",this.maxrow-1),this.extendArray("data-break-align",this.maxrow),this.addIndentshift()}extendArray(t,e){if(!this.arraydef[t])return;const s=this.arraydef[t].split(/ /),i=[...s];if(i.length>1){for(;i.length<e;)i.push(...s);this.arraydef[t]=i.slice(0,e).join(" ")}}addIndentshift(){const t=this.arraydef.columnalign.split(/ /);let e="";for(const s of t.keys()){if("left"===t[s]&&s>0){const t="center"===e?".7em":"2em";for(const e of this.table){const i=e.childNodes[e.isKind("mlabeledtr")?s+1:s];if(i){const e=this.create("node","mstyle",i.childNodes[0].childNodes,{indentshift:t});i.childNodes[0].childNodes=[],i.appendChild(e)}}}e=t[s]}}}class pc extends ec{get kind(){return"mstyle"}constructor(t,e,s){super(t),this.attrList=e,this.setProperty("name",s)}checkItem(t){if(t.isKind("end")&&t.getName()===this.getName()){return[[this.create("node","mstyle",[this.toMml()],this.attrList)],!0]}return super.checkItem(t)}}class mc extends ta{constructor(t,...e){super(t),this.factory.configuration.tags.start("equation",!0,e[0])}get kind(){return"equation"}get isOpen(){return!0}checkItem(t){if(t.isKind("end")){const e=this.toMml(),s=this.factory.configuration.tags.getTag();return this.factory.configuration.tags.end(),[[s?this.factory.configuration.tags.enTag(e,s):e,t],!0]}if(t.isKind("stop"))throw new Qo("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}}function fc(t,e,s=""){const i=e.startStr.slice(e.startI,e.stopI);i&&(t.attributes.set(ea.Attr.LATEXITEM,s?s+i:i),t.attributes.set(ea.Attr.LATEX,s?s+i:i))}const gc=1.2/.85,bc={fontfamily:1,fontsize:1,fontweight:1,fontstyle:1,color:1,background:1,id:1,class:1,href:1,style:1};function Ec(t,e=1/0){const s=t.replace(/\s+/g,"").split("").map((t=>{const e={t:"top",b:"bottom",m:"middle",c:"center"}[t];if(!e)throw new Qo("BadBreakAlign","Invalid alignment character: %1",t);return e}));if(s.length>e)throw new Qo("TooManyAligns","Too many alignment characters: %1",t);return 1===e?s[0]:s.join(" ")}function Nc(t,e){const s=t.stack.env,i=s.inRoot;s.inRoot=!0;const r=new sa(e,s,t.configuration);let n=r.mml();const o=r.stack.global;if(o.leftRoot||o.upRoot){const e={};o.leftRoot&&(e.width=o.leftRoot),o.upRoot&&(e.voffset=o.upRoot,e.height=o.upRoot),n=t.create("node","mpadded",[n],e)}return s.inRoot=i,n}const yc={Open(t,e){t.Push(t.itemFactory.create("open"))},Close(t,e){t.Push(t.itemFactory.create("close"))},Bar(t,e){t.Push(t.create("token","mo",{stretchy:!1,texClass:ur.ORD},e))},Tilde(t,e){t.Push(t.create("token","mtext",{},go.nbsp))},Space(t,e){},Superscript(t,e){let s,i;t.GetNext().match(/\d/)&&(t.string=t.string.substring(0,t.i+1)+" "+t.string.substring(t.i+1));const r=t.stack.Top();r.isKind("prime")?([i,s]=r.Peek(2),t.stack.Pop()):(i=t.stack.Prev(),i||(i=t.create("token","mi",{},"")));const n=jo.getProperty(i,"movesupsub");let o=jo.isType(i,"msubsup")?i.sup:i.over;if(jo.isType(i,"msubsup")&&!jo.isType(i,"msup")&&jo.getChildAt(i,i.sup)||jo.isType(i,"munderover")&&!jo.isType(i,"mover")&&jo.getChildAt(i,i.over)&&!jo.getProperty(i,"subsupOK"))throw new Qo("DoubleExponent","Double exponent: use braces to clarify");jo.isType(i,"msubsup")&&!jo.isType(i,"msup")||(n?((!jo.isType(i,"munderover")||jo.isType(i,"mover")||jo.getChildAt(i,i.over))&&(i=t.create("node","munderover",[i],{movesupsub:!0})),o=i.over):(i=t.create("node","msubsup",[i]),o=i.sup)),t.Push(t.itemFactory.create("subsup",i).setProperties({position:o,primes:s,movesupsub:n}))},Subscript(t,e){let s,i;t.GetNext().match(/\d/)&&(t.string=t.string.substring(0,t.i+1)+" "+t.string.substring(t.i+1));const r=t.stack.Top();r.isKind("prime")?([i,s]=r.Peek(2),t.stack.Pop()):(i=t.stack.Prev(),i||(i=t.create("token","mi",{},"")));const n=jo.getProperty(i,"movesupsub");let o=jo.isType(i,"msubsup")?i.sub:i.under;if(jo.isType(i,"msubsup")&&!jo.isType(i,"msup")&&jo.getChildAt(i,i.sub)||jo.isType(i,"munderover")&&!jo.isType(i,"mover")&&jo.getChildAt(i,i.under)&&!jo.getProperty(i,"subsupOK"))throw new Qo("DoubleSubscripts","Double subscripts: use braces to clarify");jo.isType(i,"msubsup")&&!jo.isType(i,"msup")||(n?((!jo.isType(i,"munderover")||jo.isType(i,"mover")||jo.getChildAt(i,i.under))&&(i=t.create("node","munderover",[i],{movesupsub:!0})),o=i.under):(i=t.create("node","msubsup",[i]),o=i.sub)),t.Push(t.itemFactory.create("subsup",i).setProperties({position:o,primes:s,movesupsub:n}))},Prime(t,e){let s=t.stack.Prev();if(s||(s=t.create("token","mi")),jo.isType(s,"msubsup")&&!jo.isType(s,"msup")&&jo.getChildAt(s,s.sup)||jo.isType(s,"munderover")&&!jo.isType(s,"mover")&&jo.getChildAt(s,s.over)&&!jo.getProperty(s,"subsupOK"))throw new Qo("DoubleExponentPrime","Prime causes double exponent: use braces to clarify");let i="";t.i--;do{i+=go.prime,t.i++,e=t.GetNext()}while("'"===e||e===go.rsquo);i=["","\u2032","\u2033","\u2034","\u2057"][i.length]||i;const r=t.create("token","mo",{variantForm:!0},i);t.Push(t.itemFactory.create("prime",s,r))},Comment(t,e){for(;t.i<t.string.length&&"\n"!==t.string.charAt(t.i);)t.i++},Hash(t,e){throw new Qo("CantUseHash1","You can't use 'macro parameter character #' in math mode")},MathFont(t,e,s,i=""){const r=t.GetArgument(e),n=new sa(r,Object.assign(Object.assign({multiLetterIdentifiers:t.options.identifierPattern},t.stack.env),{font:s,italicFont:i,noAutoOP:!0}),t.configuration).mml();t.Push(t.create("node","TeXAtom",[n]))},SetFont(t,e,s){t.stack.env.font=s,t.Push(t.itemFactory.create("null"))},SetStyle(t,e,s,i,r){t.stack.env.style=s,t.stack.env.level=r,t.Push(t.itemFactory.create("style").setProperty("styles",{displaystyle:i,scriptlevel:r}))},SetSize(t,e,s){t.stack.env.size=s,t.Push(t.itemFactory.create("style").setProperty("styles",{mathsize:uo(s)}))},Spacer(t,e,s){const i=t.create("node","mspace",[],{width:uo(s)}),r=t.create("node","mstyle",[i],{scriptlevel:0});t.Push(r)},DiscretionaryTimes(t,e){t.Push(t.create("token","mo",{linebreakmultchar:"\xd7"},"\u2062"))},AllowBreak(t,e){t.Push(t.create("token","mspace"))},Break(t,e){t.Push(t.create("token","mspace",{linebreak:ea.LineBreak.NEWLINE}))},Linebreak(t,e,s){let i=!0;const r=t.stack.Prev(!0);if(r&&r.isKind("mo")){jo.getMoAttribute(r,"linebreakstyle")!==ea.LineBreakStyle.BEFORE&&(r.attributes.set("linebreak",s),i=!1)}t.Push(t.itemFactory.create("break",s,i))},LeftRight(t,e){const s=e.substring(1);t.Push(t.itemFactory.create(s,t.GetDelimiter(e),t.stack.env.color))},NamedFn(t,e,s){s||(s=e.substring(1));const i=t.create("token","mi",{texClass:ur.OP},s);t.Push(t.itemFactory.create("fn",i))},NamedOp(t,e,s){s||(s=e.substring(1)),s=s.replace(/&thinsp;/,"\u2006");const i=t.create("token","mo",{movablelimits:!0,movesupsub:!0,form:ea.Form.PREFIX,texClass:ur.OP},s);t.Push(i)},Limits(t,e,s){let i=t.stack.Prev(!0);if(!i||jo.getTexClass(jo.getCoreMO(i))!==ur.OP&&null==jo.getProperty(i,"movesupsub"))throw new Qo("MisplacedLimits","%1 is allowed only on operators",t.currentCS);const r=t.stack.Top();let n;jo.isType(i,"munderover")&&!s?(n=t.create("node","msubsup"),jo.copyChildren(i,n),i=r.Last=n):jo.isType(i,"msubsup")&&s&&(n=t.create("node","munderover"),jo.copyChildren(i,n),i=r.Last=n),jo.setProperty(i,"movesupsub",!!s),jo.setProperties(jo.getCoreMO(i),{movablelimits:!1}),((jo.isType(i,"mo")?jo.getMoAttribute(i,"movableLimits"):jo.getAttribute(i,"movablelimits"))||jo.getProperty(i,"movablelimits"))&&jo.setProperties(i,{movablelimits:!1})},Over(t,e,s,i){const r=t.itemFactory.create("over").setProperty("name",t.currentCS);s||i?(r.setProperty("ldelim",s),r.setProperty("rdelim",i)):e.match(/withdelims$/)&&(r.setProperty("ldelim",t.GetDelimiter(e)),r.setProperty("rdelim",t.GetDelimiter(e))),e.match(/^\\above/)?r.setProperty("thickness",t.GetDimen(e)):(e.match(/^\\atop/)||s||i)&&r.setProperty("thickness",0),t.Push(r)},Frac(t,e){const s=t.ParseArg(e),i=t.ParseArg(e),r=t.create("node","mfrac",[s,i]);t.Push(r)},Sqrt(t,e){const s=t.GetBrackets(e);let i=t.GetArgument(e);"\\frac"===i&&(i+="{"+t.GetArgument(i)+"}{"+t.GetArgument(i)+"}");let r=new sa(i,t.stack.env,t.configuration).mml();r=s?t.create("node","mroot",[r,Nc(t,s)]):t.create("node","msqrt",[r]),t.Push(r)},Root(t,e){const s=t.GetUpTo(e,"\\of"),i=t.ParseArg(e),r=t.create("node","mroot",[i,Nc(t,s)]);t.Push(r)},MoveRoot(t,e,s){if(!t.stack.env.inRoot)throw new Qo("MisplacedMoveRoot","%1 can appear only within a root",t.currentCS);if(t.stack.global[s])throw new Qo("MultipleMoveRoot","Multiple use of %1",t.currentCS);let i=t.GetArgument(e);if(!i.match(/-?[0-9]+/))throw new Qo("IntegerArg","The argument to %1 must be an integer",t.currentCS);i=parseInt(i,10)/15+"em","-"!==i.substring(0,1)&&(i="+"+i),t.stack.global[s]=i},Accent(t,e,s,i){const r=t.ParseArg(e),n=Object.assign(Object.assign({},da.getFontDef(t)),{accent:!0,mathaccent:void 0===i||i}),o=jo.createEntity(s),a=t.create("token","mo",n,o);jo.setAttribute(a,"stretchy",!!i);const c=jo.isEmbellished(r)?jo.getCoreMO(r):r;(jo.isType(c,"mo")||jo.getProperty(c,"movablelimits"))&&jo.setProperties(c,{movablelimits:!1});const l=t.create("node","munderover");jo.setChild(l,0,r),jo.setChild(l,1,null),jo.setChild(l,2,a);const h=t.create("node","TeXAtom",[l]);t.Push(h)},UnderOver(t,e,s,i){const r=jo.createEntity(s),n=t.create("token","mo",{stretchy:!0,accent:!0},r);r.match(Hr.mathaccentsWithWidth)&&n.setProperty("mathaccent",!1);const o="o"===e.charAt(1)?"over":"under",a=t.ParseArg(e);t.Push(da.underOver(t,a,n,o,i))},Overset(t,e){const s=t.ParseArg(e),i=t.ParseArg(e),r=s.coreMO(),n=r.isKind("mo")&&!0===jo.getMoAttribute(r,"accent");da.checkMovableLimits(i);const o=t.create("node","mover",[i,s],{accent:n});t.Push(o)},Underset(t,e){const s=t.ParseArg(e),i=t.ParseArg(e),r=s.coreMO(),n=r.isKind("mo")&&!0===jo.getMoAttribute(r,"accent");da.checkMovableLimits(i);const o=t.create("node","munder",[i,s],{accentunder:n});t.Push(o)},Overunderset(t,e){const s=t.ParseArg(e),i=t.ParseArg(e),r=t.ParseArg(e),n=s.coreMO(),o=i.coreMO(),a=n.isKind("mo")&&!0===jo.getMoAttribute(n,"accent"),c=o.isKind("mo")&&!0===jo.getMoAttribute(o,"accent");da.checkMovableLimits(r);const l=t.create("node","munderover",[r,i,s],{accent:a,accentunder:c});t.Push(l)},TeXAtom(t,e,s){const i={texClass:s};let r,n;if(s===ur.OP){i.movesupsub=i.movablelimits=!0;const s=t.GetArgument(e),o=s.match(/^\s*\\rm\s+([a-zA-Z0-9 ]+)$/);if(o)i.mathvariant=ea.Variant.NORMAL,n=t.create("token","mi",i,o[1]);else{const e=new sa(s,t.stack.env,t.configuration).mml();n=t.create("node","TeXAtom",[e],i)}r=t.itemFactory.create("fn",n)}else r=t.create("node","TeXAtom",[t.ParseArg(e)],i);t.Push(r)},VBox(t,e,s){const i=new sa(t.GetArgument(e),t.stack.env,t.configuration),r={"data-vertical-align":s,texClass:ur.ORD};i.stack.env.hsize&&(r.width=i.stack.env.hsize,r["data-overflow"]="linebreak");const n=t.create("node","mpadded",[i.mml()],r);n.setProperty("vbox",s),t.Push(n)},Hsize(t,e){"="===t.GetNext()&&t.i++,t.stack.env.hsize=t.GetDimen(e),t.Push(t.itemFactory.create("null"))},ParBox(t,e){const s=t.GetBrackets(e,"c"),i=t.GetDimen(e),r=da.internalMath(t,t.GetArgument(e)),n=Ec(s,1),o=t.create("node","mpadded",r,{width:i,"data-overflow":"linebreak","data-vertical-align":n});o.setProperty("vbox",n),t.Push(o)},BreakAlign(t,e){const s=t.stack.Top();if(!(s instanceof dc))throw new Qo("BreakNotInArray","%1 must be used in an alignment environment",t.currentCS);switch(t.GetArgument(e).trim()){case"c":if(s.First)throw new Qo("BreakFirstInEntry","%1 must be at the beginning of an alignment entry",t.currentCS+"{c}");s.breakAlign.cell=Ec(t.GetArgument(e),1);break;case"r":if(s.row.length||s.First)throw new Qo("BreakFirstInRow","%1 must be at the beginning of an alignment row",t.currentCS+"{r}");s.breakAlign.row=Ec(t.GetArgument(e));break;case"t":if(s.table.length||s.row.length||s.First)throw new Qo("BreakFirstInTable","%1 must be at the beginning of an alignment",t.currentCS+"{t}");s.breakAlign.table=Ec(t.GetArgument(e));break;default:throw new Qo("BreakType","First argument to %1 must be one of c, r, or t",t.currentCS)}},MmlToken(t,e){const s=t.GetArgument(e);let i=t.GetBrackets(e,"").replace(/^\s+/,"");const r=t.GetArgument(e),n={},o=[];let a;try{a=t.create("node",s)}catch(t){a=null}if(!a||!a.isToken)throw new Qo("NotMathMLToken","%1 is not a token element",s);for(;""!==i;){const e=i.match(/^([a-z]+)\s*=\s*('[^']*'|"[^"]*"|[^ ,]*)\s*,?\s*/i);if(!e)throw new Qo("InvalidMathMLAttr","Invalid MathML attribute: %1",i);if(!a.attributes.hasDefault(e[1])&&!bc[e[1]])throw new Qo("UnknownAttrForElement","%1 is not a recognized attribute for %2",e[1],s);let r=da.mmlFilterAttribute(t,e[1],e[2].replace(/^(['"])(.*)\1$/,"$2"));r&&("true"===r.toLowerCase()?r=!0:"false"===r.toLowerCase()&&(r=!1),n[e[1]]=r,o.push(e[1])),i=i.substring(e[0].length)}o.length&&(n["mjx-keep-attrs"]=o.join(" "));const c=t.create("text",Ur(r));a.appendChild(c),jo.setProperties(a,n),t.Push(a)},Strut(t,e){const s=t.create("node","mrow"),i=t.create("node","mpadded",[s],{height:"8.6pt",depth:"3pt",width:0});t.Push(i)},Phantom(t,e,s,i){let r=t.create("node","mphantom",[t.ParseArg(e)]);(s||i)&&(r=t.create("node","mpadded",[r]),i&&(jo.setAttribute(r,"height",0),jo.setAttribute(r,"depth",0)),s&&jo.setAttribute(r,"width",0));const n=t.create("node","TeXAtom",[r]);t.Push(n)},Smash(t,e){const s=Ko.trimSpaces(t.GetBrackets(e,"")),i=t.create("node","mpadded",[t.ParseArg(e)]);switch(s){case"b":jo.setAttribute(i,"depth",0);break;case"t":jo.setAttribute(i,"height",0);break;default:jo.setAttribute(i,"height",0),jo.setAttribute(i,"depth",0)}const r=t.create("node","TeXAtom",[i]);t.Push(r)},Lap(t,e){const s=t.create("node","mpadded",[t.ParseArg(e)],{width:0});"\\llap"===e&&jo.setAttribute(s,"lspace","-1width");const i=t.create("node","TeXAtom",[s]);t.Push(i)},RaiseLower(t,e){let s=t.GetDimen(e);const i=t.itemFactory.create("position").setProperties({name:t.currentCS,move:"vertical"});"-"===s.charAt(0)&&(s=s.slice(1),e="raise"===e.substring(1)?"\\lower":"\\raise"),"\\lower"===e?(i.setProperty("dh","-"+s),i.setProperty("dd","+"+s)):(i.setProperty("dh","+"+s),i.setProperty("dd","-"+s)),t.Push(i)},MoveLeftRight(t,e){let s=t.GetDimen(e),i="-"===s.charAt(0)?s.slice(1):"-"+s;if("\\moveleft"===e){const t=s;s=i,i=t}t.Push(t.itemFactory.create("position").setProperties({name:t.currentCS,move:"horizontal",left:t.create("node","mspace",[],{width:s}),right:t.create("node","mspace",[],{width:i})}))},Hskip(t,e,s=!1){const i=t.create("node","mspace",[],{width:t.GetDimen(e)});s&&jo.setAttribute(i,"linebreak","nobreak"),t.Push(i)},Nonscript(t,e){t.Push(t.itemFactory.create("nonscript"))},Rule(t,e,s){const i={width:t.GetDimen(e),height:t.GetDimen(e),depth:t.GetDimen(e)};"blank"!==s&&(i.mathbackground=t.stack.env.color||"black");const r=t.create("node","mspace",[],i);t.Push(r)},rule(t,e){const s=t.GetBrackets(e),i=t.GetDimen(e),r=t.GetDimen(e);let n=t.create("node","mspace",[],{width:i,height:r,mathbackground:t.stack.env.color||"black"});s&&(n=t.create("node","mpadded",[n],{voffset:s}),s.match(/^-/)?(jo.setAttribute(n,"height",s),jo.setAttribute(n,"depth","+"+s.substring(1))):jo.setAttribute(n,"height","+"+s)),t.Push(n)},MakeBig(t,e,s,i){const r=String(i*=gc).replace(/(\.\d\d\d).+/,"$1")+"em",n=t.GetDelimiter(e,!0),o=t.create("token","mo",{minsize:r,maxsize:r,fence:!0,stretchy:!0,symmetric:!0},n),a=t.create("node","TeXAtom",[o],{texClass:s});t.Push(a)},BuildRel(t,e){const s=t.ParseUpTo(e,"\\over"),i=t.ParseArg(e),r=t.create("node","munderover");jo.setChild(r,0,i),jo.setChild(r,1,null),jo.setChild(r,2,s);const n=t.create("node","TeXAtom",[r],{texClass:ur.REL});t.Push(n)},HBox(t,e,s,i){t.PushAll(da.internalMath(t,t.GetArgument(e),s,i))},FBox(t,e){const s=da.internalMath(t,t.GetArgument(e)),i=t.create("node","menclose",s,{notation:"box"});t.Push(i)},FrameBox(t,e){const s=t.GetBrackets(e),i=t.GetBrackets(e)||"c";let r=da.internalMath(t,t.GetArgument(e));s&&(r=[t.create("node","mpadded",r,{width:s,"data-align":Fi(i,{l:"left",r:"right"},"center")})]);const n=t.create("node","TeXAtom",[t.create("node","menclose",r,{notation:"box"})],{texClass:ur.ORD});t.Push(n)},MakeBox(t,e){const s=t.GetBrackets(e),i=t.GetBrackets(e,"c"),r=t.create("node","mpadded",da.internalMath(t,t.GetArgument(e)));s&&jo.setAttribute(r,"width",s);const n=Fi(i.toLowerCase(),{c:"center",r:"right"},"");n&&jo.setAttribute(r,"data-align",n),i.toLowerCase()!==i&&jo.setAttribute(r,"data-overflow","linebreak"),t.Push(r)},Not(t,e){t.Push(t.itemFactory.create("not"))},Dots(t,e){const s=jo.createEntity("2026"),i=jo.createEntity("22EF"),r=t.create("token","mo",{stretchy:!1},s),n=t.create("token","mo",{stretchy:!1},i);t.Push(t.itemFactory.create("dots").setProperties({ldots:r,cdots:n}))},Matrix(t,e,s,i,r,n,o,a,c,l){const h=t.GetNext();if(""===h)throw new Qo("MissingArgFor","Missing argument for %1",t.currentCS);"{"===h?t.i++:(t.string=h+"}"+t.string.slice(t.i+1),t.i=0);const d=t.itemFactory.create("array").setProperty("requireClose",!0);!s&&r||d.setProperty("arrayPadding",".2em .125em"),d.arraydef={rowspacing:o||"4pt",columnspacing:n||"1em"},c&&d.setProperty("isCases",!0),l&&(d.setProperty("isNumbered",!0),d.arraydef.side=l),(s||i)&&(d.setProperty("open",s),d.setProperty("close",i)),"D"===a&&(d.arraydef.displaystyle=!0),null!=r&&(d.arraydef.columnalign=r),t.Push(d)},Entry(t,e){t.Push(t.itemFactory.create("cell").setProperties({isEntry:!0,name:e}));const s=t.stack.Top(),i=s.getProperty("casesEnv");if(!s.getProperty("isCases")&&!i)return;const r=t.string;let n=0,o=-1,a=t.i,c=r.length;const l=i?new RegExp(`^\\\\end\\s*\\{${i.replace(/\*/,"\\*")}\\}`):null;for(;a<c;){const e=r.charAt(a);if("{"===e)n++,a++;else if("}"===e)0===n?c=0:(n--,0===n&&o<0&&(o=a-t.i),a++);else{if("&"===e&&0===n)throw new Qo("ExtraAlignTab","Extra alignment tab in \\cases text");if("\\"===e){const t=r.substring(a);t.match(/^((\\cr)[^a-zA-Z]|\\\\)/)||l&&t.match(l)?c=0:a+=2}else a++}}const h=r.substring(t.i,a);if(!h.match(/^\s*\\text[^a-zA-Z]/)||o!==h.replace(/\s+$/,"").length-1){const e=da.internalMath(t,Ko.trimSpaces(h),0);t.PushAll(e),t.i=a}},Cr(t,e){t.Push(t.itemFactory.create("cell").setProperties({isCR:!0,name:e}))},CrLaTeX(t,e,s=!1){let i;if(!s&&("*"===t.string.charAt(t.i)&&t.i++,"["===t.string.charAt(t.i))){const s=t.GetBrackets(e,""),[r,n]=Ko.matchDimen(s);if(s&&!r)throw new Qo("BracketMustBeDimension","Bracket argument to %1 must be a dimension",t.currentCS);i=r+n}t.Push(t.itemFactory.create("cell").setProperties({isCR:!0,name:e,linebreak:!0}));const r=t.stack.Top();let n;r instanceof dc?i&&r.addRowSpacing(i):(n=t.create("node","mspace",[],{linebreak:ea.LineBreak.NEWLINE}),i&&jo.setAttribute(n,"data-lineleading",i),t.Push(n))},HLine(t,e,s){null==s&&(s="solid");const i=t.stack.Top();if(!(i instanceof dc)||i.Size())throw new Qo("Misplaced","Misplaced %1",t.currentCS);if(i.table.length){const t=i.arraydef.rowlines?i.arraydef.rowlines.split(/ /):[];for(;t.length<i.table.length;)t.push("none");t[i.table.length-1]=s,i.arraydef.rowlines=t.join(" ")}else i.frame.push(["top",s])},HFill(t,e){const s=t.stack.Top();if(!(s instanceof dc))throw new Qo("UnsupportedHFill","Unsupported use of %1",t.currentCS);s.hfill.push(s.Size())},NewColumnType(t,e){const s=t.GetArgument(e),i=t.GetBrackets(e,"0"),r=t.GetArgument(e);if(1!==s.length)throw new Qo("BadColumnName","Column specifier must be exactly one character: %1",s);if(!i.match(/^\d+$/))throw new Qo("PositiveIntegerArg","Argument to %1 must be a positive integer",i);const n=t.configuration.columnParser;n.columnHandler[s]=t=>n.macroColumn(t,r,parseInt(i)),t.Push(t.itemFactory.create("null"))},BeginEnd(t,e){const s=t.GetArgument(e);if(s.match(/\\/))throw new Qo("InvalidEnv","Invalid environment name '%1'",s);const i=t.configuration.handlers.get(Go.ENVIRONMENT).lookup(s);if(i&&"\\end"===e){if(!i.args[0]){const e=t.itemFactory.create("end").setProperty("name",s);return void t.Push(e)}t.stack.env.closing=s}da.checkMaxMacros(t,!1),t.parse(Go.ENVIRONMENT,[t,s])},Array(t,e,s,i,r,n,o,a,c){r||(r=t.GetArgument("\\begin{"+e.getName()+"}"));const l=t.itemFactory.create("array");return"array"===e.getName()&&l.setProperty("arrayPadding",".5em .125em"),l.parser=t,l.arraydef={columnspacing:n||"1em",rowspacing:o||"4pt"},t.configuration.columnParser.process(t,r,l),s&&l.setProperty("open",t.convertDelimiter(s)),i&&l.setProperty("close",t.convertDelimiter(i)),"'"===(a||"").charAt(1)&&(l.arraydef["data-cramped"]=!0,a=a.charAt(0)),"D"===a?l.arraydef.displaystyle=!0:a&&(l.arraydef.displaystyle=!1),l.arraydef.scriptlevel="S"===a?1:0,c&&(l.arraydef.useHeight=!1),t.Push(e),l.StartEntry(),l},AlignedArray(t,e,s=""){const i=t.GetBrackets("\\begin{"+e.getName()+"}"),r=yc.Array(t,e,null,null,null,null,null,s);return da.setArrayAlign(r,i)},IndentAlign(t,e){const s=`\\begin{${e.getName()}}`,i=t.GetBrackets(s,""),r=t.GetBrackets(s,""),n=t.GetBrackets(s,"");if(i&&!Ko.matchDimen(i)[0]||r&&!Ko.matchDimen(r)[0]||n&&!Ko.matchDimen(n)[0])throw new Qo("BracketMustBeDimension","Bracket argument to %1 must be a dimension",s);const o=t.GetArgument(s);if(o&&!o.match(/^([lcr]{1,3})?$/))throw new Qo("BadAlignment","Alignment must be one to three copies of l, c, or r");const a=[...o].map((t=>({l:"left",c:"center",r:"right"}[t])));1===a.length&&a.push(a[0]);const c={};for(const[t,e]of[["indentshiftfirst",i],["indentshift",r||i],["indentshiftlast",n],["indentalignfirst",a[0]],["indentalign",a[1]],["indentalignlast",a[2]]])e&&(c[t]=e);t.Push(t.itemFactory.create("mstyle",c,e.getName()))},Equation:(t,e,s,i=!0)=>(t.configuration.mathItem.display=i,t.stack.env.display=i,da.checkEqnEnv(t),t.Push(e),t.itemFactory.create("equation",s).setProperty("name",e.getName())),EqnArray(t,e,s,i,r,n,o){const a=e.getName(),c="gather"===a||"gather*"===a;i&&da.checkEqnEnv(t,!c),t.Push(e),r=(r=r.replace(/[^clr]/g,"").split("").join(" ")).replace(/l/g,"left").replace(/r/g,"right").replace(/c/g,"center"),n=Ec(n);const l=t.itemFactory.create("eqnarray",a,s,i,t.stack.global);return l.arraydef={displaystyle:!0,columnalign:r,columnspacing:o||"1em",rowspacing:"3pt","data-break-align":n,side:t.options.tagSide,minlabelspacing:t.options.tagIndent},c&&l.setProperty("nestable",!0),l},HandleNoTag(t,e){t.tags.notag()},HandleLabel(t,e){const s=t.GetArgument(e);if(""!==s&&!t.tags.refUpdate){if(t.tags.label)throw new Qo("MultipleCommand","Multiple %1",t.currentCS);if(t.tags.label=s,(t.tags.allLabels[s]||t.tags.labels[s])&&!t.options.ignoreDuplicateLabels)throw new Qo("MultipleLabel","Label '%1' multiply defined",s);t.tags.labels[s]=new ga}},HandleRef(t,e,s){const i=t.GetArgument(e);let r=t.tags.allLabels[i]||t.tags.labels[i];r||(t.tags.refUpdate||(t.tags.redo=!0),r=new ga);let n=r.tag;s&&(n=t.tags.formatRef(n));const o=t.create("node","mrow",da.internalMath(t,n),{href:t.tags.formatUrl(r.id,t.options.baseURL),class:"MathJax_ref"});t.Push(o)},Macro(t,e,s,i,r){if(i){const n=[];if(null!=r){const s=t.GetBrackets(e);n.push(null==s?r:s)}for(let s=n.length;s<i;s++)n.push(t.GetArgument(e));s=da.substituteArgs(t,n,s)}t.string=da.addArgs(t,s,t.string.slice(t.i)),t.i=0,da.checkMaxMacros(t)},MathChoice(t,e){const s=t.ParseArg(e),i=t.ParseArg(e),r=t.ParseArg(e),n=t.ParseArg(e);t.Push(t.create("node","MathChoice",[s,i,r,n]))}},xc=yc,vc=ea.Variant,Cc={variable(t,e){var s;const i=da.getFontDef(t),r=t.stack.env;if(r.multiLetterIdentifiers&&""!==r.font&&(e=(null===(s=t.string.substring(t.i-1).match(r.multiLetterIdentifiers))||void 0===s?void 0:s[0])||e,t.i+=e.length-1,i.mathvariant===vc.NORMAL&&r.noAutoOP&&e.length>1&&(i.autoOP=!1)),!i.mathvariant&&da.isLatinOrGreekChar(e)){const s=t.configuration.mathStyle(e);s&&(i.mathvariant=s)}const n=t.create("token","mi",i,e);t.Push(n)},digit(t,e){const s=t.configuration.options.numberPattern,i=t.string.slice(t.i-1).match(s),r=da.getFontDef(t);if(!i)return!1;const n=t.create("token","mn",r,i[0].replace(/[{}]/g,""));return t.i+=i[0].length-1,t.Push(n),!0},controlSequence(t,e){const s=t.GetCS();t.parse(Go.MACRO,[t,s])},lcGreek(t,e){const s={mathvariant:t.configuration.mathStyle(e.char)||vc.ITALIC},i=t.create("token","mi",s,e.char);t.Push(i)},ucGreek(t,e){const s={mathvariant:t.stack.env.font||t.configuration.mathStyle(e.char,!0)||vc.NORMAL},i=t.create("token","mi",s,e.char);t.Push(i)},mathchar0mi(t,e){const s=e.attributes||{mathvariant:vc.ITALIC},i=t.create("token","mi",s,e.char);t.Push(i)},mathchar0mo(t,e){const s=e.attributes||{};s.stretchy=!1;const i=t.create("token","mo",s,e.char);jo.setProperty(i,"fixStretchy",!0),t.configuration.addNode("fixStretchy",i),t.Push(i)},mathchar7(t,e){const s=e.attributes||{mathvariant:vc.NORMAL};t.stack.env.font&&(s.mathvariant=t.stack.env.font);const i=t.create("token","mi",s,e.char);t.Push(i)},delimiter(t,e){let s=e.attributes||{};s=Object.assign({fence:!1,stretchy:!1},s);const i=t.create("token","mo",s,e.char);t.Push(i)},environment(t,e,s,i){const r=t.itemFactory.create("begin").setProperty("name",e);t.Push(s(t,r,...i.slice(1)))}},Tc=Cc,wc=uo(co.thickmathspace),_c=ea.Variant;new Aa("letter",Tc.variable,/[a-z]/i),new Aa("digit",Tc.digit,/[0-9.,]/),new Aa("command",Tc.controlSequence,/^\\/),new Sa("special",{"{":xc.Open,"}":xc.Close,"~":xc.Tilde,"^":xc.Superscript,_:xc.Subscript,"|":xc.Bar," ":xc.Space,"\t":xc.Space,"\r":xc.Space,"\n":xc.Space,"'":xc.Prime,"%":xc.Comment,"&":xc.Entry,"#":xc.Hash,"\xa0":xc.Space,"\u2019":xc.Prime}),new Ma("lcGreek",Tc.lcGreek,{alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03f5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03d5",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",varepsilon:"\u03b5",vartheta:"\u03d1",varpi:"\u03d6",varrho:"\u03f1",varsigma:"\u03c2",varphi:"\u03c6"}),new Ma("ucGreek",Tc.ucGreek,{Gamma:"\u0393",Delta:"\u0394",Theta:"\u0398",Lambda:"\u039b",Xi:"\u039e",Pi:"\u03a0",Sigma:"\u03a3",Upsilon:"\u03a5",Phi:"\u03a6",Psi:"\u03a8",Omega:"\u03a9"}),new Ma("mathchar0mi",Tc.mathchar0mi,{AA:"\u212b",S:["\xa7",{mathvariant:_c.NORMAL}],aleph:["\u2135",{mathvariant:_c.NORMAL}],hbar:["\u210f",{variantForm:!0}],imath:"\u0131",jmath:"\u0237",ell:"\u2113",wp:["\u2118",{mathvariant:_c.NORMAL}],Re:["\u211c",{mathvariant:_c.NORMAL}],Im:["\u2111",{mathvariant:_c.NORMAL}],partial:["\u2202",{mathvariant:_c.ITALIC}],infty:["\u221e",{mathvariant:_c.NORMAL}],prime:["\u2032",{variantForm:!0}],emptyset:["\u2205",{mathvariant:_c.NORMAL}],nabla:["\u2207",{mathvariant:_c.NORMAL}],top:["\u22a4",{mathvariant:_c.NORMAL}],bot:["\u22a5",{mathvariant:_c.NORMAL}],angle:["\u2220",{mathvariant:_c.NORMAL}],triangle:["\u25b3",{mathvariant:_c.NORMAL}],backslash:["\\",{mathvariant:_c.NORMAL}],forall:["\u2200",{mathvariant:_c.NORMAL}],exists:["\u2203",{mathvariant:_c.NORMAL}],neg:["\xac",{mathvariant:_c.NORMAL}],lnot:["\xac",{mathvariant:_c.NORMAL}],flat:["\u266d",{mathvariant:_c.NORMAL}],natural:["\u266e",{mathvariant:_c.NORMAL}],sharp:["\u266f",{mathvariant:_c.NORMAL}],clubsuit:["\u2663",{mathvariant:_c.NORMAL}],diamondsuit:["\u2662",{mathvariant:_c.NORMAL}],heartsuit:["\u2661",{mathvariant:_c.NORMAL}],spadesuit:["\u2660",{mathvariant:_c.NORMAL}]}),new Ma("mathchar0mo",Tc.mathchar0mo,{surd:"\u221a",coprod:["\u2210",{movesupsub:!0}],bigvee:["\u22c1",{movesupsub:!0}],bigwedge:["\u22c0",{movesupsub:!0}],biguplus:["\u2a04",{movesupsub:!0}],bigcap:["\u22c2",{movesupsub:!0}],bigcup:["\u22c3",{movesupsub:!0}],int:"\u222b",intop:["\u222b",{movesupsub:!0,movablelimits:!0}],iint:"\u222c",iiint:"\u222d",prod:["\u220f",{movesupsub:!0}],sum:["\u2211",{movesupsub:!0}],bigotimes:["\u2a02",{movesupsub:!0}],bigoplus:["\u2a01",{movesupsub:!0}],bigodot:["\u2a00",{movesupsub:!0}],oint:"\u222e",ointop:["\u222e",{movesupsub:!0,movablelimits:!0}],oiint:"\u222f",oiiint:"\u2230",bigsqcup:["\u2a06",{movesupsub:!0}],smallint:["\u222b",{largeop:!1}],triangleleft:"\u25c3",triangleright:"\u25b9",bigtriangleup:"\u25b3",bigtriangledown:"\u25bd",wedge:"\u2227",land:"\u2227",vee:"\u2228",lor:"\u2228",cap:"\u2229",cup:"\u222a",ddagger:"\u2021",dagger:"\u2020",sqcap:"\u2293",sqcup:"\u2294",uplus:"\u228e",amalg:"\u2a3f",diamond:"\u22c4",bullet:"\u2219",wr:"\u2240",div:"\xf7",odot:["\u2299",{largeop:!1}],oslash:["\u2298",{largeop:!1}],otimes:["\u2297",{largeop:!1}],ominus:["\u2296",{largeop:!1}],oplus:["\u2295",{largeop:!1}],mp:"\u2213",pm:"\xb1",circ:"\u2218",bigcirc:"\u25ef",setminus:"\u2216",cdot:"\u22c5",ast:"\u2217",times:"\xd7",star:"\u22c6",propto:"\u221d",sqsubseteq:"\u2291",sqsupseteq:"\u2292",parallel:"\u2225",mid:"\u2223",dashv:"\u22a3",vdash:"\u22a2",leq:"\u2264",le:"\u2264",geq:"\u2265",ge:"\u2265",lt:"<",gt:">",succ:"\u227b",prec:"\u227a",approx:"\u2248",succeq:"\u2ab0",preceq:"\u2aaf",supset:"\u2283",subset:"\u2282",supseteq:"\u2287",subseteq:"\u2286",in:"\u2208",ni:"\u220b",notin:"\u2209",owns:"\u220b",gg:"\u226b",ll:"\u226a",sim:"\u223c",simeq:"\u2243",perp:"\u27c2",equiv:"\u2261",asymp:"\u224d",smile:"\u2323",frown:"\u2322",ne:"\u2260",neq:"\u2260",cong:"\u2245",doteq:"\u2250",bowtie:"\u22c8",models:"\u22a7",notChar:"\u29f8",Leftrightarrow:"\u21d4",Leftarrow:"\u21d0",Rightarrow:"\u21d2",leftrightarrow:"\u2194",leftarrow:"\u2190",gets:"\u2190",rightarrow:"\u2192",to:["\u2192",{accent:!1}],mapsto:"\u21a6",leftharpoonup:"\u21bc",leftharpoondown:"\u21bd",rightharpoonup:"\u21c0",rightharpoondown:"\u21c1",nearrow:"\u2197",searrow:"\u2198",nwarrow:"\u2196",swarrow:"\u2199",rightleftharpoons:"\u21cc",hookrightarrow:"\u21aa",hookleftarrow:"\u21a9",longleftarrow:"\u27f5",Longleftarrow:"\u27f8",longrightarrow:"\u27f6",Longrightarrow:"\u27f9",Longleftrightarrow:"\u27fa",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",ldots:"\u2026",cdots:"\u22ef",vdots:"\u22ee",ddots:"\u22f1",iddots:"\u22f0",dotsc:"\u2026",dotsb:"\u22ef",dotsm:"\u22ef",dotsi:"\u22ef",dotso:"\u2026",ldotp:[".",{texClass:ur.PUNCT}],cdotp:["\u22c5",{texClass:ur.PUNCT}],colon:[":",{texClass:ur.PUNCT}]}),new Ma("mathchar7",Tc.mathchar7,{_:"_","#":"#",$:"$","%":"%","&":"&",And:"&"}),new Ia("delimiter",Tc.delimiter,{"(":"(",")":")","[":"[","]":"]","<":"\u27e8",">":"\u27e9","\\lt":"\u27e8","\\gt":"\u27e9","/":"/","|":["|",{texClass:ur.ORD}],".":"","\\lmoustache":"\u23b0","\\rmoustache":"\u23b1","\\lgroup":"\u27ee","\\rgroup":"\u27ef","\\arrowvert":"\u23d0","\\Arrowvert":"\u2016","\\bracevert":"\u23aa","\\Vert":["\u2016",{texClass:ur.ORD}],"\\|":["\u2016",{texClass:ur.ORD}],"\\vert":["|",{texClass:ur.ORD}],"\\uparrow":"\u2191","\\downarrow":"\u2193","\\updownarrow":"\u2195","\\Uparrow":"\u21d1","\\Downarrow":"\u21d3","\\Updownarrow":"\u21d5","\\backslash":"\\","\\rangle":"\u27e9","\\langle":"\u27e8","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"\u2309","\\lceil":"\u2308","\\rfloor":"\u230b","\\lfloor":"\u230a","\\lbrack":"[","\\rbrack":"]"}),new Ra("macros",{displaystyle:[xc.SetStyle,"D",!0,0],textstyle:[xc.SetStyle,"T",!1,0],scriptstyle:[xc.SetStyle,"S",!1,1],scriptscriptstyle:[xc.SetStyle,"SS",!1,2],rm:[xc.SetFont,_c.NORMAL],mit:[xc.SetFont,_c.ITALIC],oldstyle:[xc.SetFont,_c.OLDSTYLE],cal:[xc.SetFont,_c.CALLIGRAPHIC],it:[xc.SetFont,_c.MATHITALIC],bf:[xc.SetFont,_c.BOLD],sf:[xc.SetFont,_c.SANSSERIF],tt:[xc.SetFont,_c.MONOSPACE],frak:[xc.MathFont,_c.FRAKTUR],Bbb:[xc.MathFont,_c.DOUBLESTRUCK],mathrm:[xc.MathFont,_c.NORMAL],mathup:[xc.MathFont,_c.NORMAL],mathnormal:[xc.MathFont,""],mathbf:[xc.MathFont,_c.BOLD],mathbfup:[xc.MathFont,_c.BOLD],mathit:[xc.MathFont,_c.MATHITALIC],mathbfit:[xc.MathFont,_c.BOLDITALIC],mathbb:[xc.MathFont,_c.DOUBLESTRUCK],mathfrak:[xc.MathFont,_c.FRAKTUR],mathbffrak:[xc.MathFont,_c.BOLDFRAKTUR],mathscr:[xc.MathFont,_c.SCRIPT],mathbfscr:[xc.MathFont,_c.BOLDSCRIPT],mathsf:[xc.MathFont,_c.SANSSERIF],mathsfup:[xc.MathFont,_c.SANSSERIF],mathbfsf:[xc.MathFont,_c.BOLDSANSSERIF],mathbfsfup:[xc.MathFont,_c.BOLDSANSSERIF],mathsfit:[xc.MathFont,_c.SANSSERIFITALIC],mathbfsfit:[xc.MathFont,_c.SANSSERIFBOLDITALIC],mathtt:[xc.MathFont,_c.MONOSPACE],mathcal:[xc.MathFont,_c.CALLIGRAPHIC],mathbfcal:[xc.MathFont,_c.BOLDCALLIGRAPHIC],symrm:[xc.MathFont,_c.NORMAL],symup:[xc.MathFont,_c.NORMAL],symnormal:[xc.MathFont,""],symbf:[xc.MathFont,_c.BOLD,_c.BOLDITALIC],symbfup:[xc.MathFont,_c.BOLD],symit:[xc.MathFont,_c.ITALIC],symbfit:[xc.MathFont,_c.BOLDITALIC],symbb:[xc.MathFont,_c.DOUBLESTRUCK],symfrak:[xc.MathFont,_c.FRAKTUR],symbffrak:[xc.MathFont,_c.BOLDFRAKTUR],symscr:[xc.MathFont,_c.SCRIPT],symbfscr:[xc.MathFont,_c.BOLDSCRIPT],symsf:[xc.MathFont,_c.SANSSERIF,_c.SANSSERIFITALIC],symsfup:[xc.MathFont,_c.SANSSERIF],symbfsf:[xc.MathFont,_c.BOLDSANSSERIF],symbfsfup:[xc.MathFont,_c.BOLDSANSSERIF],symsfit:[xc.MathFont,_c.SANSSERIFITALIC],symbfsfit:[xc.MathFont,_c.SANSSERIFBOLDITALIC],symtt:[xc.MathFont,_c.MONOSPACE],symcal:[xc.MathFont,_c.CALLIGRAPHIC],symbfcal:[xc.MathFont,_c.BOLDCALLIGRAPHIC],textrm:[xc.HBox,null,_c.NORMAL],textup:[xc.HBox,null,_c.NORMAL],textnormal:[xc.HBox],textit:[xc.HBox,null,_c.ITALIC],textbf:[xc.HBox,null,_c.BOLD],textsf:[xc.HBox,null,_c.SANSSERIF],texttt:[xc.HBox,null,_c.MONOSPACE],tiny:[xc.SetSize,.5],Tiny:[xc.SetSize,.6],scriptsize:[xc.SetSize,.7],small:[xc.SetSize,.85],normalsize:[xc.SetSize,1],large:[xc.SetSize,1.2],Large:[xc.SetSize,1.44],LARGE:[xc.SetSize,1.73],huge:[xc.SetSize,2.07],Huge:[xc.SetSize,2.49],arcsin:xc.NamedFn,arccos:xc.NamedFn,arctan:xc.NamedFn,arg:xc.NamedFn,cos:xc.NamedFn,cosh:xc.NamedFn,cot:xc.NamedFn,coth:xc.NamedFn,csc:xc.NamedFn,deg:xc.NamedFn,det:xc.NamedOp,dim:xc.NamedFn,exp:xc.NamedFn,gcd:xc.NamedOp,hom:xc.NamedFn,inf:xc.NamedOp,ker:xc.NamedFn,lg:xc.NamedFn,lim:xc.NamedOp,liminf:[xc.NamedOp,"lim&thinsp;inf"],limsup:[xc.NamedOp,"lim&thinsp;sup"],ln:xc.NamedFn,log:xc.NamedFn,max:xc.NamedOp,min:xc.NamedOp,Pr:xc.NamedOp,sec:xc.NamedFn,sin:xc.NamedFn,sinh:xc.NamedFn,sup:xc.NamedOp,tan:xc.NamedFn,tanh:xc.NamedFn,limits:[xc.Limits,!0],nolimits:[xc.Limits,!1],overline:[xc.UnderOver,"2015"],underline:[xc.UnderOver,"2015"],overbrace:[xc.UnderOver,"23DE",!0],underbrace:[xc.UnderOver,"23DF",!0],overparen:[xc.UnderOver,"23DC"],underparen:[xc.UnderOver,"23DD"],overrightarrow:[xc.UnderOver,"2192"],underrightarrow:[xc.UnderOver,"2192"],overleftarrow:[xc.UnderOver,"2190"],underleftarrow:[xc.UnderOver,"2190"],overleftrightarrow:[xc.UnderOver,"2194"],underleftrightarrow:[xc.UnderOver,"2194"],overset:xc.Overset,underset:xc.Underset,overunderset:xc.Overunderset,stackrel:[xc.Macro,"\\mathrel{\\mathop{#2}\\limits^{#1}}",2],stackbin:[xc.Macro,"\\mathbin{\\mathop{#2}\\limits^{#1}}",2],over:xc.Over,overwithdelims:xc.Over,atop:xc.Over,atopwithdelims:xc.Over,above:xc.Over,abovewithdelims:xc.Over,brace:[xc.Over,"{","}"],brack:[xc.Over,"[","]"],choose:[xc.Over,"(",")"],frac:xc.Frac,sqrt:xc.Sqrt,root:xc.Root,uproot:[xc.MoveRoot,"upRoot"],leftroot:[xc.MoveRoot,"leftRoot"],left:xc.LeftRight,right:xc.LeftRight,middle:xc.LeftRight,llap:xc.Lap,rlap:xc.Lap,raise:xc.RaiseLower,lower:xc.RaiseLower,moveleft:xc.MoveLeftRight,moveright:xc.MoveLeftRight,",":[xc.Spacer,co.thinmathspace],":":[xc.Spacer,co.mediummathspace],">":[xc.Spacer,co.mediummathspace],";":[xc.Spacer,co.thickmathspace],"!":[xc.Spacer,co.negativethinmathspace],enspace:[xc.Spacer,.5],quad:[xc.Spacer,1],qquad:[xc.Spacer,2],thinspace:[xc.Spacer,co.thinmathspace],negthinspace:[xc.Spacer,co.negativethinmathspace],"*":xc.DiscretionaryTimes,allowbreak:xc.AllowBreak,goodbreak:[xc.Linebreak,ea.LineBreak.GOODBREAK],badbreak:[xc.Linebreak,ea.LineBreak.BADBREAK],nobreak:[xc.Linebreak,ea.LineBreak.NOBREAK],break:xc.Break,hskip:xc.Hskip,hspace:xc.Hskip,kern:[xc.Hskip,!0],mskip:xc.Hskip,mspace:xc.Hskip,mkern:[xc.Hskip,!0],rule:xc.rule,Rule:[xc.Rule],Space:[xc.Rule,"blank"],nonscript:xc.Nonscript,big:[xc.MakeBig,ur.ORD,.85],Big:[xc.MakeBig,ur.ORD,1.15],bigg:[xc.MakeBig,ur.ORD,1.45],Bigg:[xc.MakeBig,ur.ORD,1.75],bigl:[xc.MakeBig,ur.OPEN,.85],Bigl:[xc.MakeBig,ur.OPEN,1.15],biggl:[xc.MakeBig,ur.OPEN,1.45],Biggl:[xc.MakeBig,ur.OPEN,1.75],bigr:[xc.MakeBig,ur.CLOSE,.85],Bigr:[xc.MakeBig,ur.CLOSE,1.15],biggr:[xc.MakeBig,ur.CLOSE,1.45],Biggr:[xc.MakeBig,ur.CLOSE,1.75],bigm:[xc.MakeBig,ur.REL,.85],Bigm:[xc.MakeBig,ur.REL,1.15],biggm:[xc.MakeBig,ur.REL,1.45],Biggm:[xc.MakeBig,ur.REL,1.75],mathord:[xc.TeXAtom,ur.ORD],mathop:[xc.TeXAtom,ur.OP],mathopen:[xc.TeXAtom,ur.OPEN],mathclose:[xc.TeXAtom,ur.CLOSE],mathbin:[xc.TeXAtom,ur.BIN],mathrel:[xc.TeXAtom,ur.REL],mathpunct:[xc.TeXAtom,ur.PUNCT],mathinner:[xc.TeXAtom,ur.INNER],vtop:[xc.VBox,"top"],vcenter:[xc.VBox,"center"],vbox:[xc.VBox,"bottom"],hsize:xc.Hsize,parbox:xc.ParBox,breakAlign:xc.BreakAlign,buildrel:xc.BuildRel,hbox:[xc.HBox,0],text:xc.HBox,mbox:[xc.HBox,0],fbox:xc.FBox,boxed:[xc.Macro,"\\fbox{$\\displaystyle{#1}$}",1],framebox:xc.FrameBox,makebox:xc.MakeBox,strut:xc.Strut,mathstrut:[xc.Macro,"\\vphantom{(}"],phantom:xc.Phantom,vphantom:[xc.Phantom,1,0],hphantom:[xc.Phantom,0,1],smash:xc.Smash,acute:[xc.Accent,"00B4"],grave:[xc.Accent,"0060"],ddot:[xc.Accent,"00A8"],dddot:[xc.Accent,"20DB"],ddddot:[xc.Accent,"20DC"],tilde:[xc.Accent,"007E"],bar:[xc.Accent,"00AF"],breve:[xc.Accent,"02D8"],check:[xc.Accent,"02C7"],hat:[xc.Accent,"005E"],vec:[xc.Accent,"2192",!1],dot:[xc.Accent,"02D9"],widetilde:[xc.Accent,"007E",!0],widehat:[xc.Accent,"005E",!0],matrix:xc.Matrix,array:xc.Matrix,pmatrix:[xc.Matrix,"(",")"],cases:[xc.Matrix,"{","","left left",null,".2em",null,!0],eqalign:[xc.Matrix,null,null,"right left",wc,".5em","D"],displaylines:[xc.Matrix,null,null,"center",null,".5em","D"],cr:xc.Cr,"\\":xc.CrLaTeX,newline:[xc.CrLaTeX,!0],hline:xc.HLine,hdashline:[xc.HLine,"dashed"],eqalignno:[xc.Matrix,null,null,"right left",wc,".5em","D",null,"right"],leqalignno:[xc.Matrix,null,null,"right left",wc,".5em","D",null,"left"],hfill:xc.HFill,hfil:xc.HFill,hfilll:xc.HFill,bmod:[xc.Macro,'\\mmlToken{mo}[lspace="'+wc+'" rspace="'+wc+'"]{mod}'],pmod:[xc.Macro,"\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:[xc.Macro,"\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:[xc.Macro,"\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:[xc.Macro,"\\;\\Longleftrightarrow\\;"],skew:[xc.Macro,"{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],pmb:[xc.Macro,"\\rlap{#1}\\kern1px{#1}",1],TeX:[xc.Macro,"T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:[xc.Macro,"L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"],not:xc.Not,dots:xc.Dots,space:xc.Tilde,"\xa0":xc.Tilde," ":xc.Tilde,begin:xc.BeginEnd,end:xc.BeginEnd,label:xc.HandleLabel,ref:xc.HandleRef,nonumber:xc.HandleNoTag,newcolumntype:xc.NewColumnType,mathchoice:xc.MathChoice,mmlToken:xc.MmlToken}),new Oa("environment",Tc.environment,{displaymath:[xc.Equation,null,!1],math:[xc.Equation,null,!1,!1],array:[xc.AlignedArray],darray:[xc.AlignedArray,null,"D"],equation:[xc.Equation,null,!0],eqnarray:[xc.EqnArray,null,!0,!0,"rcl","bmt",da.cols(0,co.thickmathspace),".5em"],indentalign:[xc.IndentAlign]}),new Ma("not_remap",null,{"\u2190":"\u219a","\u2192":"\u219b","\u2194":"\u21ae","\u21d0":"\u21cd","\u21d2":"\u21cf","\u21d4":"\u21ce","\u2208":"\u2209","\u220b":"\u220c","\u2223":"\u2224","\u2225":"\u2226","\u223c":"\u2241","~":"\u2241","\u2243":"\u2244","\u2245":"\u2247","\u2248":"\u2249","\u224d":"\u226d","=":"\u2260","\u2261":"\u2262","<":"\u226e",">":"\u226f","\u2264":"\u2270","\u2265":"\u2271","\u2272":"\u2274","\u2273":"\u2275","\u2276":"\u2278","\u2277":"\u2279","\u227a":"\u2280","\u227b":"\u2281","\u2282":"\u2284","\u2283":"\u2285","\u2286":"\u2288","\u2287":"\u2289","\u22a2":"\u22ac","\u22a8":"\u22ad","\u22a9":"\u22ae","\u22ab":"\u22af","\u227c":"\u22e0","\u227d":"\u22e1","\u2291":"\u22e2","\u2292":"\u22e3","\u22b2":"\u22ea","\u22b3":"\u22eb","\u22b4":"\u22ec","\u22b5":"\u22ed","\u2203":"\u2204"});const kc=ea.Variant;function Ac(t,e){const s=t.stack.env.font,i=t.stack.env.italicFont,r=s?{mathvariant:s}:{},n=Pa.getMap("remap").lookup(e),o=Ir(e),a=o[3],c=t.create("token",a,r,n?n.char:e),l=da.isLatinOrGreekChar(e)?t.configuration.mathStyle(e,!0)||i:"",h=o[4]||(s&&l===kc.NORMAL?"":l);h&&c.attributes.set("mathvariant",h),"mo"===a&&(jo.setProperty(c,"fixStretchy",!0),t.configuration.addNode("fixStretchy",c)),t.Push(c)}new Ma("remap",null,{"-":"\u2212","*":"\u2217","`":"\u2018"});class Lc extends Ea{}const Mc=ja.create("base",{[Vo.CONFIG]:function(t,e){const s=e.parseOptions.options;s.digits&&(s.numberPattern=s.digits),new Aa("digit",Tc.digit,s.initialDigit),new Aa("letter",Tc.variable,s.initialLetter);t.handlers.get(Go.CHARACTER).add(["letter","digit"],null,4)},[Vo.HANDLER]:{[Go.CHARACTER]:["command","special"],[Go.DELIMITER]:["delimiter"],[Go.MACRO]:["delimiter","macros","lcGreek","ucGreek","mathchar0mi","mathchar0mo","mathchar7"],[Go.ENVIRONMENT]:["environment"]},[Vo.FALLBACK]:{[Go.CHARACTER]:Ac,[Go.MACRO]:function(t,e){throw new Qo("UndefinedControlSequence","Undefined control sequence %1","\\"+e)},[Go.ENVIRONMENT]:function(t,e){throw new Qo("UnknownEnv","Unknown environment '%1'",e)}},[Vo.ITEMS]:{[Wa.prototype.kind]:Wa,[za.prototype.kind]:za,[Xa.prototype.kind]:Xa,[Va.prototype.kind]:Va,[Ga.prototype.kind]:Ga,[Ja.prototype.kind]:Ja,[Ka.prototype.kind]:Ka,[$a.prototype.kind]:$a,[Ya.prototype.kind]:Ya,[Qa.prototype.kind]:Qa,[Za.prototype.kind]:Za,[tc.prototype.kind]:tc,[ec.prototype.kind]:ec,[sc.prototype.kind]:sc,[ic.prototype.kind]:ic,[rc.prototype.kind]:rc,[nc.prototype.kind]:nc,[oc.prototype.kind]:oc,[ac.prototype.kind]:ac,[cc.prototype.kind]:cc,[lc.prototype.kind]:lc,[hc.prototype.kind]:hc,[dc.prototype.kind]:dc,[uc.prototype.kind]:uc,[mc.prototype.kind]:mc,[pc.prototype.kind]:pc},[Vo.OPTIONS]:{maxMacros:1e3,digits:"",numberPattern:/^(?:[0-9]+(?:\{,\}[0-9]{3})*(?:\.[0-9]*)?|\.[0-9]+)/,initialDigit:/[0-9.,]/,identifierPattern:/^[a-zA-Z]+/,initialLetter:/[a-zA-Z]/,baseURL:hi.document&&0!==hi.document.getElementsByTagName("base").length?String(hi.document.location).replace(/#.*$/,""):""},[Vo.TAGS]:{base:Lc},[Vo.POSTPROCESSORS]:[[function({data:t}){for(const e of t.getList("nonscript"))if(e.attributes.get("scriptlevel")>0){const s=e.parent;if(s.childNodes.splice(s.childIndex(e),1),t.removeFromList(e.kind,[e]),e.isKind("mrow")){const s=e.childNodes[0];t.removeFromList("mstyle",[s]),t.removeFromList("mspace",s.childNodes[0].childNodes)}}else e.isKind("mrow")&&(e.parent.replaceChild(e.childNodes[0],e),t.removeFromList("mrow",[e]))},-4]]});class Ic extends $i{static configure(t){const e=new Ha(t,["tex"]);return e.init(),e}static tags(t,e){Ca.addTags(e.tags),Ca.setDefault(t.options.tags),t.tags=Ca.getDefault(),t.tags.configuration=t}constructor(t={}){const[e,s,i]=Bi(t,Ic.OPTIONS,Bo.OPTIONS);super(s),this.findTeX=this.options.FindTeX||new Bo(i);const r=this.options.packages,n=this.configuration=Ic.configure(r),o=this._parseOptions=new fa(n,[this.options,Ca.OPTIONS]);Oi(o.options,e),n.config(this),Ic.tags(o,n),this.postFilters.addList([[Xo.cleanSubSup,-7],[Xo.setInherited,-6],[Xo.checkScriptlevel,-5],[Xo.moveLimits,-4],[Xo.cleanStretchy,-3],[Xo.cleanAttributes,-2],[Xo.combineRelations,-1]])}setMmlFactory(t){super.setMmlFactory(t),this._parseOptions.nodeFactory.setMmlFactory(t)}get parseOptions(){return this._parseOptions}reset(t=0){this.parseOptions.tags.reset(t)}compile(t,e){let s,i;this.parseOptions.clear(),this.parseOptions.mathItem=t,this.executeFilters(this.preFilters,t,e,this.parseOptions),this.latex=t.math,this.parseOptions.tags.startEquation(t);try{i=new sa(this.latex,{display:t.display,isInner:!1},this.parseOptions),s=i.mml()}catch(t){if(!(t instanceof Qo))throw t;this.parseOptions.error=!0,s=this.options.formatError(this,t)}return s=this.parseOptions.nodeFactory.create("node","math",[s]),s.attributes.set(ea.Attr.LATEX,this.latex),t.display&&jo.setAttribute(s,"display","block"),this.parseOptions.tags.finishEquation(t),this.parseOptions.root=s,this.executeFilters(this.postFilters,t,e,this.parseOptions),i&&i.stack.env.hsize&&(jo.setAttribute(s,"maxwidth",i.stack.env.hsize),jo.setAttribute(s,"overflow","linebreak")),this.mathNode=this.parseOptions.root,this.mathNode}findMath(t){return this.findTeX.findMath(t)}formatError(t){const e=t.message.replace(/\n.*/,"");return this.parseOptions.nodeFactory.create("error",e,t.id,this.latex)}}Ic.NAME="TeX",Ic.OPTIONS=Object.assign(Object.assign({},$i.OPTIONS),{FindTeX:null,packages:["base"],maxBuffer:5120,maxTemplateSubtitutions:1e4,mathStyle:"TeX",formatError:(t,e)=>t.formatError(e)});class Sc extends dc{constructor(t,...e){super(t),this.factory.configuration.tags.start("multline",!0,e[0])}get kind(){return"multline"}EndEntry(){this.table.length&&da.fixInitialMO(this.factory.configuration,this.nodes);const t=this.getProperty("shove"),e=this.create("node","mtd",this.nodes,t?{columnalign:t}:{});this.setProperty("shove",null),this.row.push(e),this.Clear()}EndRow(){if(1!==this.row.length)throw new Qo("MultlineRowsOneCol","The rows within the %1 environment must have exactly one column","multline");const t=this.create("node","mtr",this.row);this.table.push(t),this.row=[]}EndTable(){if(super.EndTable(),this.table.length){const t=this.table.length-1;let e=-1;jo.getAttribute(jo.getChildren(this.table[0])[0],"columnalign")||jo.setAttribute(jo.getChildren(this.table[0])[0],"columnalign",ea.Align.LEFT),jo.getAttribute(jo.getChildren(this.table[t])[0],"columnalign")||jo.setAttribute(jo.getChildren(this.table[t])[0],"columnalign",ea.Align.RIGHT);const s=this.factory.configuration.tags.getTag();if(s){e=this.arraydef.side===ea.Align.LEFT?0:this.table.length-1;const t=this.table[e],i=this.create("node","mlabeledtr",[s].concat(jo.getChildren(t)));jo.copyAttributes(t,i),this.table[e]=i}}this.factory.configuration.tags.end()}}class Rc extends uc{get kind(){return"flalign"}constructor(t,e,s,i,r){super(t),this.name=e,this.numbered=s,this.padded=i,this.center=r,this.factory.configuration.tags.start(e,s,s)}EndEntry(){super.EndEntry();const t=this.getProperty("xalignat");if(t&&this.row.length>t)throw new Qo("XalignOverflow","Extra %1 in row of %2","&",this.name)}EndRow(){let t;const e=this.row,s=this.getProperty("xalignat");for(;e.length<s;)e.push(this.create("node","mtd"));for(this.row=[],this.padded&&this.row.push(this.create("node","mtd"));t=e.shift();)this.row.push(t),t=e.shift(),t&&this.row.push(t),(e.length||this.padded)&&this.row.push(this.create("node","mtd"));this.row.length>this.maxrow&&(this.maxrow=this.row.length),super.EndRow();const i=this.table[this.table.length-1];if(this.getProperty("zeroWidthLabel")&&i.isKind("mlabeledtr")){const t=jo.getChildren(i)[0],e=this.factory.configuration.options.tagSide,s=Object.assign({width:0},"right"===e?{lspace:"-1width"}:{}),r=this.create("node","mpadded",jo.getChildren(t),s);t.setChildren([r])}}EndTable(){if(super.EndTable(),this.center&&this.maxrow<=2){delete this.arraydef.width,delete this.global.indentalign}}}var Oc;!function(t){t.NEW_DELIMITER="new-Delimiter",t.NEW_COMMAND="new-Command",t.NEW_ENVIRONMENT="new-Environment"}(Oc||(Oc={}));const Dc=-100,Pc={GetCSname(t,e){if("\\"!==t.GetNext())throw new Qo("MissingCS","%1 must be followed by a control sequence",e);const s=Ko.trimSpaces(t.GetArgument(e)).substring(1);return this.checkProtectedMacros(t,s),s},GetCsNameArgument(t,e){let s=Ko.trimSpaces(t.GetArgument(e));if("\\"===s.charAt(0)&&(s=s.substring(1)),!s.match(/^(.|[a-z]+)$/i))throw new Qo("IllegalControlSequenceName","Illegal control sequence name for %1",e);return this.checkProtectedMacros(t,s),s},GetArgCount(t,e){let s=t.GetBrackets(e);if(s&&(s=Ko.trimSpaces(s),!s.match(/^[0-9]+$/)))throw new Qo("IllegalParamNumber","Illegal number of parameters specified in %1",e);return s},GetTemplate(t,e,s){let i=t.GetNext();const r=[];let n=0,o=t.i;for(;t.i<t.string.length;){if(i=t.GetNext(),"#"===i){if(o!==t.i&&(r[n]=t.string.substring(o,t.i)),i=t.string.charAt(++t.i),!i.match(/^[1-9]$/))throw new Qo("CantUseHash2","Illegal use of # in template for %1",s);if(parseInt(i)!==++n)throw new Qo("SequentialParam","Parameters for %1 must be numbered sequentially",s);o=t.i+1}else if("{"===i)return o!==t.i&&(r[n]=t.string.substring(o,t.i)),r.length>0?[n.toString()].concat(r):n;t.i++}throw new Qo("MissingReplacementString","Missing replacement string for definition of %1",e)},GetParameter(t,e,s){if(null==s)return t.GetArgument(e);let i=t.i,r=0,n=!1;for(;t.i<t.string.length;){const o=t.string.charAt(t.i);if("{"===o)n=t.i===i,t.GetArgument(e),r=t.i-i;else{if(this.MatchParam(t,s))return n&&(i++,r-=2),t.string.substring(i,i+r);if("\\"===o){t.i++,r++,n=!1;const e=t.string.substring(t.i).match(/[a-z]+|./i);e&&(t.i+=e[0].length,r=t.i-i)}else t.i++,r++,n=!1}}throw new Qo("RunawayArgument","Runaway argument for %1?",e)},MatchParam:(t,e)=>t.string.substring(t.i,t.i+e.length)!==e||e.match(/\\[a-z]+$/i)&&t.string.charAt(t.i+e.length).match(/[a-z]/i)?0:(t.i+=e.length,1),checkGlobal:(t,e,s)=>t.stack.env.isGlobal?t.configuration.packageData.get("begingroup").stack.checkGlobal(e,s):s.map((e=>t.configuration.handlers.retrieve(e))),checkProtectedMacros(t,e){var s;if(null===(s=t.options.protectedMacros)||void 0===s?void 0:s.includes(e))throw new Qo("ProtectedMacro","The control sequence %1 can't be redefined",`\\${e}`)},addDelimiter(t,e,s,i){const r=e.substring(1);this.checkProtectedMacros(t,r);const[n,o]=Pc.checkGlobal(t,[r,e],[Oc.NEW_COMMAND,Oc.NEW_DELIMITER]);r!==e&&n.remove(r),o.add(e,new Ta(e,s,i)),delete t.stack.env.isGlobal},addMacro(t,e,s,i,r=""){this.checkProtectedMacros(t,e);const n=Pc.checkGlobal(t,[e],[Oc.NEW_COMMAND])[0];this.undefineDelimiter(t,"\\"+e),n.add(e,new wa(r||e,s,i)),delete t.stack.env.isGlobal},addEnvironment(t,e,s,i){Pc.checkGlobal(t,[e],[Oc.NEW_ENVIRONMENT])[0].add(e,new wa(e,s,i)),delete t.stack.env.isGlobal},undefineMacro(t,e){const s=Pc.checkGlobal(t,[e],[Oc.NEW_COMMAND])[0];s.remove(e),t.configuration.handlers.get(Go.MACRO).applicable(e)&&(s.add(e,new wa(e,(()=>Ba.FALLBACK),[])),this.undefineDelimiter(t,"\\"+e)),delete t.stack.env.isGlobal},undefineDelimiter(t,e){const s=Pc.checkGlobal(t,[e],[Oc.NEW_DELIMITER])[0];s.remove(e),t.configuration.handlers.get(Go.DELIMITER).applicable(e)&&s.add(e,new Ta(e,null,{})),delete t.stack.env.isGlobal}};function Bc(t){if(!t||t.isInferred&&0===t.childNodes.length)return[null,null];if(t.isKind("msubsup")&&Fc(t))return[t,null];const e=jo.getChildAt(t,0);return t.isInferred&&e&&Fc(e)?(t.childNodes.splice(0,1),[e,t]):[null,t]}function Fc(t){const e=t.childNodes[0];return e&&e.isKind("mi")&&""===e.getText()}const jc={AmsEqnArray(t,e,s,i,r,n,o,a){const c=t.GetBrackets("\\begin{"+e.getName()+"}"),l=xc.EqnArray(t,e,s,i,r,n,o,a);return da.setArrayAlign(l,c,t)},AlignAt(t,e,s,i){const r=e.getName();let n,o="",a="";const c=[];i||(n=t.GetBrackets("\\begin{"+r+"}"));const l=t.GetArgument("\\begin{"+r+"}");if(l.match(/[^0-9]/))throw new Qo("PositiveIntegerArg","Argument to %1 must be a positive integer","\\begin{"+r+"}");let h=parseInt(l,10);for(;h>0;)o+="rl",a+="bt",c.push("0em 0em"),h--;const d=c.join(" ");if(i)return jc.EqnArray(t,e,s,i,o,a,d);const u=jc.EqnArray(t,e,s,i,o,a,d);return da.setArrayAlign(u,n,t)},Multline(t,e,s){da.checkEqnEnv(t),t.Push(e);const i=t.options.ams.multlineIndent,r=t.itemFactory.create("multline",s,t.stack);return r.arraydef={displaystyle:!0,rowspacing:".5em",columnspacing:"100%",width:t.options.ams.multlineWidth,side:t.options.tagSide,minlabelspacing:t.options.tagIndent,"data-array-padding":`${i} ${i}`,"data-width-includes-label":!0},r},XalignAt(t,e,s,i){const r=t.GetArgument("\\begin{"+e.getName()+"}");if(r.match(/[^0-9]/))throw new Qo("PositiveIntegerArg","Argument to %1 must be a positive integer","\\begin{"+e.getName()+"}");const n=i?"crl":"rlc",o=i?"mbt":"btm",a=i?"fit auto auto":"auto auto fit",c=jc.FlalignArray(t,e,s,i,!1,n,o,a,!0);return c.setProperty("xalignat",2*parseInt(r)),c},FlalignArray(t,e,s,i,r,n,o,a,c=!1){da.checkEqnEnv(t),t.Push(e),n=n.split("").join(" ").replace(/r/g,"right").replace(/l/g,"left").replace(/c/g,"center"),o=Ec(o);const l=t.itemFactory.create("flalign",e.getName(),s,i,r,t.stack);return l.arraydef={width:"100%",displaystyle:!0,columnalign:n,columnspacing:"0em",columnwidth:a,rowspacing:"3pt","data-break-align":o,side:t.options.tagSide,minlabelspacing:c?"0":t.options.tagIndent,"data-width-includes-label":!0},l.setProperty("zeroWidthLabel",c),l},HandleDeclareOp(t,e){const s=t.GetStar()?"*":"",i=Pc.GetCsNameArgument(t,e),r=t.GetArgument(e);Pc.addMacro(t,i,jc.Macro,[`\\operatorname${s}{${r}}`]),t.Push(t.itemFactory.create("null"))},HandleOperatorName(t,e){const s=t.GetStar(),i=Ko.trimSpaces(t.GetArgument(e));let r=new sa(i,Object.assign(Object.assign({},t.stack.env),{font:ea.Variant.NORMAL,multiLetterIdentifiers:t.options.ams.operatornamePattern,operatorLetters:!0}),t.configuration).mml();if(r.isKind("mi")||(r=t.create("node","TeXAtom",[r])),jo.setProperties(r,{movesupsub:s,movablelimits:!0,texClass:ur.OP}),!s){const e=t.GetNext(),s=t.i;"\\"===e&&++t.i&&"limits"!==t.GetCS()&&(t.i=s)}t.Push(t.itemFactory.create("fn",r))},SideSet(t,e){const[s,i]=Bc(t.ParseArg(e)),[r,n]=Bc(t.ParseArg(e)),o=t.ParseArg(e);let a=o;s&&(i?s.replaceChild(t.create("node","mphantom",[t.create("node","mpadded",[da.copyNode(o,t)],{width:0})]),jo.getChildAt(s,0)):(a=t.create("node","mmultiscripts",[o]),r&&jo.appendChildren(a,[jo.getChildAt(r,1)||t.create("node","none"),jo.getChildAt(r,2)||t.create("node","none")]),jo.setProperty(a,"scriptalign","left"),jo.appendChildren(a,[t.create("node","mprescripts"),jo.getChildAt(s,1)||t.create("node","none"),jo.getChildAt(s,2)||t.create("node","none")]))),r&&a===o&&(r.replaceChild(o,jo.getChildAt(r,0)),a=r);const c=t.create("node","TeXAtom",[],{texClass:ur.OP,movesupsub:!0,movablelimits:!0});i&&(s&&c.appendChild(s),c.appendChild(i)),c.appendChild(a),n&&c.appendChild(n),t.Push(c)},operatorLetter:(t,e)=>!!t.stack.env.operatorLetters&&Tc.variable(t,e),MultiIntegral(t,e,s){let i=t.GetNext();if("\\"===i){const r=t.i;i=t.GetArgument(e),t.i=r,"\\limits"===i&&(s="\\!\\!\\mathop{\\,\\,"+s+"}")}t.string=s+" "+t.string.slice(t.i),t.i=0},xArrow(t,e,s,i,r,n=0){const o={width:"+"+Ko.em((i+r)/18),lspace:Ko.em(i/18)},a=t.GetBrackets(e),c=t.ParseArg(e),l=t.create("node","mspace",[],{depth:".2em"});let h=t.create("token","mo",{stretchy:!0,texClass:ur.REL},String.fromCodePoint(s));n&&h.attributes.set("minsize",Ko.em(n)),h=t.create("node","mstyle",[h],{scriptlevel:0});const d=t.create("node","munderover",[h]);let u=t.create("node","mpadded",[c,l],o);if(jo.setAttribute(u,"voffset","-.2em"),jo.setAttribute(u,"height","-.2em"),jo.setChild(d,d.over,u),a){const e=new sa(a,t.stack.env,t.configuration).mml(),s=t.create("node","mspace",[],{height:".75em"});u=t.create("node","mpadded",[e,s],o),jo.setAttribute(u,"voffset",".15em"),jo.setAttribute(u,"depth","-.15em"),jo.setChild(d,d.under,u)}jo.setProperty(d,"subsupOK",!0),t.Push(d)},HandleShove(t,e,s){const i=t.stack.Top();if("multline"!==i.kind)throw new Qo("CommandOnlyAllowedInEnv","%1 only allowed in %2 environment",t.currentCS,"multline");if(i.Size())throw new Qo("CommandAtTheBeginingOfLine","%1 must come at the beginning of the line",t.currentCS);i.setProperty("shove",s)},CFrac(t,e){let s=Ko.trimSpaces(t.GetBrackets(e,""));const i=t.GetArgument(e),r=t.GetArgument(e),n={l:ea.Align.LEFT,r:ea.Align.RIGHT,"":""},o=new sa("\\strut\\textstyle{"+i+"}",t.stack.env,t.configuration).mml(),a=new sa("\\strut\\textstyle{"+r+"}",t.stack.env,t.configuration).mml(),c=t.create("node","mfrac",[o,a]);if(s=n[s],null==s)throw new Qo("IllegalAlign","Illegal alignment specified in %1",t.currentCS);s&&jo.setProperties(c,{numalign:s,denomalign:s}),t.Push(c)},Genfrac(t,e,s,i,r,n){null==s&&(s=t.GetDelimiterArg(e)),null==i&&(i=t.GetDelimiterArg(e)),null==r&&(r=t.GetArgument(e)),null==n&&(n=Ko.trimSpaces(t.GetArgument(e)));const o=t.ParseArg(e),a=t.ParseArg(e);let c=t.create("node","mfrac",[o,a]);if(""!==r&&jo.setAttribute(c,"linethickness",r),(s||i)&&(jo.setProperty(c,"withDelims",!0),c=da.fixedFence(t.configuration,s,c,i)),""!==n){const e=parseInt(n,10),s=["D","T","S","SS"][e];if(null==s)throw new Qo("BadMathStyleFor","Bad math style for %1",t.currentCS);c=t.create("node","mstyle",[c]),"D"===s?jo.setProperties(c,{displaystyle:!0,scriptlevel:0}):jo.setProperties(c,{displaystyle:!1,scriptlevel:e-1})}t.Push(c)},HandleTag(t,e){if(!t.tags.currentTag.taggable&&t.tags.env)throw new Qo("CommandNotAllowedInEnv","%1 not allowed in %2 environment",t.currentCS,t.tags.env);if(t.tags.currentTag.tag)throw new Qo("MultipleCommand","Multiple %1",t.currentCS);const s=t.GetStar(),i=Ko.trimSpaces(t.GetArgument(e));t.tags.tag(i,s),t.Push(t.itemFactory.create("null"))},HandleNoTag:xc.HandleNoTag,HandleRef:xc.HandleRef,Macro:xc.Macro,Accent:xc.Accent,Tilde:xc.Tilde,Array:xc.Array,Spacer:xc.Spacer,NamedOp:xc.NamedOp,EqnArray:xc.EqnArray,Equation:xc.Equation};new Ma("AMSmath-mathchar0mo",Tc.mathchar0mo,{iiiint:["\u2a0c",{texClass:ur.OP}]}),new Aa("AMSmath-operatorLetter",jc.operatorLetter,/[-*]/i),new Ra("AMSmath-macros",{mathring:[jc.Accent,"02DA"],nobreakspace:jc.Tilde,negmedspace:[jc.Spacer,co.negativemediummathspace],negthickspace:[jc.Spacer,co.negativethickmathspace],idotsint:[jc.MultiIntegral,"\\int\\cdots\\int"],dddot:[jc.Accent,"20DB"],ddddot:[jc.Accent,"20DC"],sideset:jc.SideSet,boxed:[jc.Macro,"\\fbox{$\\displaystyle{#1}$}",1],tag:jc.HandleTag,notag:jc.HandleNoTag,eqref:[jc.HandleRef,!0],substack:[jc.Macro,"\\begin{subarray}{c}#1\\end{subarray}",1],injlim:[jc.NamedOp,"inj&thinsp;lim"],projlim:[jc.NamedOp,"proj&thinsp;lim"],varliminf:[jc.Macro,"\\mathop{\\underline{\\mmlToken{mi}{lim}}}"],varlimsup:[jc.Macro,"\\mathop{\\overline{\\mmlToken{mi}{lim}}}"],varinjlim:[jc.Macro,"\\mathop{\\underrightarrow{\\mmlToken{mi}{lim}}}"],varprojlim:[jc.Macro,"\\mathop{\\underleftarrow{\\mmlToken{mi}{lim}}}"],DeclareMathOperator:jc.HandleDeclareOp,operatorname:jc.HandleOperatorName,genfrac:jc.Genfrac,frac:[jc.Genfrac,"","","",""],tfrac:[jc.Genfrac,"","","","1"],dfrac:[jc.Genfrac,"","","","0"],binom:[jc.Genfrac,"(",")","0",""],tbinom:[jc.Genfrac,"(",")","0","1"],dbinom:[jc.Genfrac,"(",")","0","0"],cfrac:jc.CFrac,shoveleft:[jc.HandleShove,ea.Align.LEFT],shoveright:[jc.HandleShove,ea.Align.RIGHT],xrightarrow:[jc.xArrow,8594,5,10],xleftarrow:[jc.xArrow,8592,10,5]}),new Oa("AMSmath-environment",Tc.environment,{"equation*":[jc.Equation,null,!1],"eqnarray*":[jc.EqnArray,null,!1,!0,"rcl","bmt",da.cols(0,co.thickmathspace),".5em"],align:[jc.EqnArray,null,!0,!0,"rl","bt",da.cols(0,2)],"align*":[jc.EqnArray,null,!1,!0,"rl","bt",da.cols(0,2)],multline:[jc.Multline,null,!0],"multline*":[jc.Multline,null,!1],split:[jc.EqnArray,null,!1,!1,"rl","bt",da.cols(0)],gather:[jc.EqnArray,null,!0,!0,"c","m"],"gather*":[jc.EqnArray,null,!1,!0,"c","m"],alignat:[jc.AlignAt,null,!0,!0],"alignat*":[jc.AlignAt,null,!1,!0],alignedat:[jc.AlignAt,null,!1,!1],aligned:[jc.AmsEqnArray,null,null,null,"rl","bt",da.cols(0,2),".5em","D"],gathered:[jc.AmsEqnArray,null,null,null,"c","m",null,".5em","D"],xalignat:[jc.XalignAt,null,!0,!0],"xalignat*":[jc.XalignAt,null,!1,!0],xxalignat:[jc.XalignAt,null,!1,!1],flalign:[jc.FlalignArray,null,!0,!1,!0,"rlc","btm","auto auto fit"],"flalign*":[jc.FlalignArray,null,!1,!1,!0,"rlc","btm","auto auto fit"],subarray:[jc.Array,null,null,null,null,da.cols(0),"0.1em","S",!0],smallmatrix:[jc.Array,null,null,null,"c",da.cols(1/3),".2em","S",!0],matrix:[jc.Array,null,null,null,"c"],pmatrix:[jc.Array,null,"(",")","c"],bmatrix:[jc.Array,null,"[","]","c"],Bmatrix:[jc.Array,null,"\\{","\\}","c"],vmatrix:[jc.Array,null,"\\vert","\\vert","c"],Vmatrix:[jc.Array,null,"\\Vert","\\Vert","c"],cases:[jc.Array,null,"\\{",".","ll",null,".2em","T"]}),new Ia("AMSmath-delimiter",Tc.delimiter,{"\\lvert":["|",{texClass:ur.OPEN}],"\\rvert":["|",{texClass:ur.CLOSE}],"\\lVert":["\u2016",{texClass:ur.OPEN}],"\\rVert":["\u2016",{texClass:ur.CLOSE}]}),new Ma("AMSsymbols-mathchar0mi",Tc.mathchar0mi,{digamma:"\u03dd",varkappa:"\u03f0",varGamma:["\u0393",{mathvariant:ea.Variant.ITALIC}],varDelta:["\u0394",{mathvariant:ea.Variant.ITALIC}],varTheta:["\u0398",{mathvariant:ea.Variant.ITALIC}],varLambda:["\u039b",{mathvariant:ea.Variant.ITALIC}],varXi:["\u039e",{mathvariant:ea.Variant.ITALIC}],varPi:["\u03a0",{mathvariant:ea.Variant.ITALIC}],varSigma:["\u03a3",{mathvariant:ea.Variant.ITALIC}],varUpsilon:["\u03a5",{mathvariant:ea.Variant.ITALIC}],varPhi:["\u03a6",{mathvariant:ea.Variant.ITALIC}],varPsi:["\u03a8",{mathvariant:ea.Variant.ITALIC}],varOmega:["\u03a9",{mathvariant:ea.Variant.ITALIC}],beth:"\u2136",gimel:"\u2137",daleth:"\u2138",backprime:["\u2035",{variantForm:!0}],hslash:"\u210f",varnothing:["\u2205",{variantForm:!0}],blacktriangle:"\u25b4",triangledown:["\u25bd",{variantForm:!0}],blacktriangledown:"\u25be",square:"\u25fb",Box:"\u25fb",blacksquare:"\u25fc",lozenge:"\u25ca",Diamond:"\u25ca",blacklozenge:"\u29eb",circledS:["\u24c8",{mathvariant:ea.Variant.NORMAL}],bigstar:"\u2605",sphericalangle:"\u2222",measuredangle:"\u2221",nexists:"\u2204",complement:"\u2201",mho:"\u2127",eth:["\xf0",{mathvariant:ea.Variant.NORMAL}],Finv:"\u2132",diagup:"\u2571",Game:"\u2141",diagdown:"\u2572",Bbbk:["k",{mathvariant:ea.Variant.DOUBLESTRUCK}],yen:"\xa5",circledR:"\xae",checkmark:"\u2713",maltese:"\u2720"}),new Ma("AMSsymbols-mathchar0mo",Tc.mathchar0mo,{dotplus:"\u2214",ltimes:"\u22c9",smallsetminus:["\u2216",{variantForm:!0}],rtimes:"\u22ca",Cap:"\u22d2",doublecap:"\u22d2",leftthreetimes:"\u22cb",Cup:"\u22d3",doublecup:"\u22d3",rightthreetimes:"\u22cc",barwedge:"\u22bc",curlywedge:"\u22cf",veebar:"\u22bb",curlyvee:"\u22ce",doublebarwedge:"\u2a5e",boxminus:"\u229f",circleddash:"\u229d",boxtimes:"\u22a0",circledast:"\u229b",boxdot:"\u22a1",circledcirc:"\u229a",boxplus:"\u229e",centerdot:["\u22c5",{variantForm:!0}],divideontimes:"\u22c7",intercal:"\u22ba",leqq:"\u2266",geqq:"\u2267",leqslant:"\u2a7d",geqslant:"\u2a7e",eqslantless:"\u2a95",eqslantgtr:"\u2a96",lesssim:"\u2272",gtrsim:"\u2273",lessapprox:"\u2a85",gtrapprox:"\u2a86",approxeq:"\u224a",lessdot:"\u22d6",gtrdot:"\u22d7",lll:"\u22d8",llless:"\u22d8",ggg:"\u22d9",gggtr:"\u22d9",lessgtr:"\u2276",gtrless:"\u2277",lesseqgtr:"\u22da",gtreqless:"\u22db",lesseqqgtr:"\u2a8b",gtreqqless:"\u2a8c",doteqdot:"\u2251",Doteq:"\u2251",eqcirc:"\u2256",risingdotseq:"\u2253",circeq:"\u2257",fallingdotseq:"\u2252",triangleq:"\u225c",backsim:"\u223d",thicksim:["\u223c",{variantForm:!0}],backsimeq:"\u22cd",thickapprox:["\u2248",{variantForm:!0}],subseteqq:"\u2ac5",supseteqq:"\u2ac6",Subset:"\u22d0",Supset:"\u22d1",sqsubset:"\u228f",sqsupset:"\u2290",preccurlyeq:"\u227c",succcurlyeq:"\u227d",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",precsim:"\u227e",succsim:"\u227f",precapprox:"\u2ab7",succapprox:"\u2ab8",vartriangleleft:"\u22b2",lhd:"\u22b2",vartriangleright:"\u22b3",rhd:"\u22b3",trianglelefteq:"\u22b4",unlhd:"\u22b4",trianglerighteq:"\u22b5",unrhd:"\u22b5",vDash:"\u22a8",Vdash:"\u22a9",Vvdash:"\u22aa",smallsmile:["\u2323",{variantForm:!0}],shortmid:["\u2223",{variantForm:!0}],smallfrown:["\u2322",{variantForm:!0}],shortparallel:["\u2225",{variantForm:!0}],bumpeq:"\u224f",between:"\u226c",Bumpeq:"\u224e",pitchfork:"\u22d4",varpropto:["\u221d",{variantForm:!0}],backepsilon:"\u220d",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",therefore:"\u2234",because:"\u2235",eqsim:"\u2242",vartriangle:["\u25b3",{variantForm:!0}],Join:"\u22c8",nless:"\u226e",ngtr:"\u226f",nleq:"\u2270",ngeq:"\u2271",nleqslant:["\u2a87",{variantForm:!0}],ngeqslant:["\u2a88",{variantForm:!0}],nleqq:["\u2270",{variantForm:!0}],ngeqq:["\u2271",{variantForm:!0}],lneq:"\u2a87",gneq:"\u2a88",lneqq:"\u2268",gneqq:"\u2269",lvertneqq:["\u2268",{variantForm:!0}],gvertneqq:["\u2269",{variantForm:!0}],lnsim:"\u22e6",gnsim:"\u22e7",lnapprox:"\u2a89",gnapprox:"\u2a8a",nprec:"\u2280",nsucc:"\u2281",npreceq:["\u22e0",{variantForm:!0}],nsucceq:["\u22e1",{variantForm:!0}],precneqq:"\u2ab5",succneqq:"\u2ab6",precnsim:"\u22e8",succnsim:"\u22e9",precnapprox:"\u2ab9",succnapprox:"\u2aba",nsim:"\u2241",ncong:"\u2247",nshortmid:["\u2224",{variantForm:!0}],nshortparallel:["\u2226",{variantForm:!0}],nmid:"\u2224",nparallel:"\u2226",nvdash:"\u22ac",nvDash:"\u22ad",nVdash:"\u22ae",nVDash:"\u22af",ntriangleleft:"\u22ea",ntriangleright:"\u22eb",ntrianglelefteq:"\u22ec",ntrianglerighteq:"\u22ed",nsubseteq:"\u2288",nsupseteq:"\u2289",nsubseteqq:["\u2288",{variantForm:!0}],nsupseteqq:["\u2289",{variantForm:!0}],subsetneq:"\u228a",supsetneq:"\u228b",varsubsetneq:["\u228a",{variantForm:!0}],varsupsetneq:["\u228b",{variantForm:!0}],subsetneqq:"\u2acb",supsetneqq:"\u2acc",varsubsetneqq:["\u2acb",{variantForm:!0}],varsupsetneqq:["\u2acc",{variantForm:!0}],leftleftarrows:"\u21c7",rightrightarrows:"\u21c9",leftrightarrows:"\u21c6",rightleftarrows:"\u21c4",Lleftarrow:"\u21da",Rrightarrow:"\u21db",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",leftarrowtail:"\u21a2",rightarrowtail:"\u21a3",looparrowleft:"\u21ab",looparrowright:"\u21ac",leftrightharpoons:"\u21cb",rightleftharpoons:["\u21cc",{variantForm:!0}],curvearrowleft:"\u21b6",curvearrowright:"\u21b7",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",Lsh:"\u21b0",Rsh:"\u21b1",upuparrows:"\u21c8",downdownarrows:"\u21ca",upharpoonleft:"\u21bf",upharpoonright:"\u21be",downharpoonleft:"\u21c3",restriction:"\u21be",multimap:"\u22b8",downharpoonright:"\u21c2",leftrightsquigarrow:"\u21ad",rightsquigarrow:"\u21dd",leadsto:"\u21dd",dashrightarrow:"\u21e2",dashleftarrow:"\u21e0",nleftarrow:"\u219a",nrightarrow:"\u219b",nLeftarrow:"\u21cd",nRightarrow:"\u21cf",nleftrightarrow:"\u21ae",nLeftrightarrow:"\u21ce"}),new Ia("AMSsymbols-delimiter",Tc.delimiter,{"\\ulcorner":"\u231c","\\urcorner":"\u231d","\\llcorner":"\u231e","\\lrcorner":"\u231f"}),new Ra("AMSsymbols-macros",{implies:[jc.Macro,"\\;\\Longrightarrow\\;"],impliedby:[jc.Macro,"\\;\\Longleftarrow\\;"]});class Uc extends ta{get kind(){return"beginEnv"}get isOpen(){return!0}checkItem(t){if(t.isKind("end")){if(t.getName()!==this.getName())throw new Qo("EnvBadEnd","\\begin{%1} ended with \\end{%2}",this.getName(),t.getName());return[[this.factory.create("mml",this.toMml())],!0]}if(t.isKind("stop"))throw new Qo("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}}const qc={NewCommand(t,e){const s=Pc.GetCsNameArgument(t,e),i=Pc.GetArgCount(t,e),r=t.GetBrackets(e),n=t.GetArgument(e);Pc.addMacro(t,s,qc.Macro,[n,i,r]),t.Push(t.itemFactory.create("null"))},NewEnvironment(t,e){const s=Ko.trimSpaces(t.GetArgument(e)),i=Pc.GetArgCount(t,e),r=t.GetBrackets(e),n=t.GetArgument(e),o=t.GetArgument(e);Pc.addEnvironment(t,s,qc.BeginEnv,[!0,n,o,i,r]),t.Push(t.itemFactory.create("null"))},MacroDef(t,e){const s=Pc.GetCSname(t,e),i=Pc.GetTemplate(t,e,"\\"+s),r=t.GetArgument(e);i instanceof Array?Pc.addMacro(t,s,qc.MacroWithTemplate,[r].concat(i)):Pc.addMacro(t,s,qc.Macro,[r,i]),t.Push(t.itemFactory.create("null"))},Let(t,e){const s=Pc.GetCSname(t,e);let i=t.GetNext();"="===i&&(t.i++,i=t.GetNext());const r=t.configuration.handlers;if(t.Push(t.itemFactory.create("null")),"\\"===i){if(s===(e=Pc.GetCSname(t,e)))return;const i=r.get(Go.MACRO).applicable(e);if(i instanceof Sa){const r=i.lookup(e);return void Pc.addMacro(t,s,r.func,r.args,r.token)}if(i instanceof Ma&&!(i instanceof Ia)){const r=i.lookup(e),n=t=>i.parser(t,r);return void Pc.addMacro(t,s,n,[s,r.char])}const n=r.get(Go.DELIMITER).lookup("\\"+e);return n?void Pc.addDelimiter(t,"\\"+s,n.char,n.attributes):(Pc.checkProtectedMacros(t,s),Pc.undefineMacro(t,s),void Pc.undefineDelimiter(t,"\\"+s))}t.i++;const n=r.get(Go.DELIMITER).lookup(i);n?Pc.addDelimiter(t,"\\"+s,n.char,n.attributes):Pc.addMacro(t,s,qc.Macro,[i])},MacroWithTemplate(t,e,s,i,...r){const n=parseInt(i,10);if(r.length){const i=[];if(t.GetNext(),r[0]&&!Pc.MatchParam(t,r[0]))throw new Qo("MismatchUseDef","Use of %1 doesn't match its definition",e);if(n){for(let s=0;s<n;s++)i.push(Pc.GetParameter(t,e,r[s+1]));s=da.substituteArgs(t,i,s)}}t.string=da.addArgs(t,s,t.string.slice(t.i)),t.i=0,da.checkMaxMacros(t)},BeginEnv(t,e,s,i,r,n){const o=e.getName();if(t.stack.env.closing===o){delete t.stack.env.closing;if(t.stack.global.beginEnv&&(t.stack.global.beginEnv--,i)){const e=t.string.slice(t.i);t.string=da.addArgs(t,t.string.substring(0,t.i),i),t.Parse(),t.string=e,t.i=0}return t.itemFactory.create("end").setProperty("name",o)}if(r){const e=[];if(null!=n){const s=t.GetBrackets(`\\begin{${o}}`);e.push(null==s?n:s)}for(let s=e.length;s<r;s++)e.push(t.GetArgument(`\\begin{${o}}`));s=da.substituteArgs(t,e,s),i=da.substituteArgs(t,[],i)}return t.string=da.addArgs(t,s,t.string.slice(t.i)),t.i=0,t.stack.global.beginEnv=(t.stack.global.beginEnv||0)+1,t.itemFactory.create("beginEnv").setProperty("name",o)},Macro:xc.Macro},Hc=qc;function Wc(t,e){e.parseOptions.packageData.has("newcommand")||(e.parseOptions.packageData.set("newcommand",{}),new Ia(Oc.NEW_DELIMITER,Tc.delimiter,{}),new Ra(Oc.NEW_COMMAND,{}),new Oa(Oc.NEW_ENVIRONMENT,Tc.environment,{}),e.parseOptions.handlers.add({[Go.CHARACTER]:[],[Go.DELIMITER]:[Oc.NEW_DELIMITER],[Go.MACRO]:[Oc.NEW_DELIMITER,Oc.NEW_COMMAND],[Go.ENVIRONMENT]:[Oc.NEW_ENVIRONMENT]},{},Dc))}new Ra("Newcommand-macros",{newcommand:Hc.NewCommand,renewcommand:Hc.NewCommand,newenvironment:Hc.NewEnvironment,renewenvironment:Hc.NewEnvironment,def:Hc.MacroDef,let:Hc.Let});const zc=ja.create("newcommand",{[Vo.HANDLER]:{macro:["Newcommand-macros"]},[Vo.ITEMS]:{[Uc.prototype.kind]:Uc},[Vo.OPTIONS]:{maxMacros:1e3,protectedMacros:["begingroupSandbox"]},[Vo.CONFIG]:Wc});class Xc extends Ea{}const Vc=ja.create("ams",{[Vo.HANDLER]:{[Go.CHARACTER]:["AMSmath-operatorLetter"],[Go.DELIMITER]:["AMSsymbols-delimiter","AMSmath-delimiter"],[Go.MACRO]:["AMSsymbols-mathchar0mi","AMSsymbols-mathchar0mo","AMSsymbols-delimiter","AMSsymbols-macros","AMSmath-mathchar0mo","AMSmath-macros","AMSmath-delimiter"],[Go.ENVIRONMENT]:["AMSmath-environment"]},[Vo.ITEMS]:{[Sc.prototype.kind]:Sc,[Rc.prototype.kind]:Rc},[Vo.TAGS]:{ams:Xc},[Vo.OPTIONS]:{multlineWidth:"",ams:{operatornamePattern:/^[-*a-zA-Z]+/,multlineWidth:"100%",multlineIndent:"1em"}},[Vo.CONFIG]:Wc}),Gc=qi.config;function Jc(t,e){const s=t.parseOptions.options.require,i=t.parseOptions.packageData.get("require").required,r=e.substring(s.prefix.length);if(!i.includes(r)){i.push(r);const s=function(t,e=[]){const s=t.parseOptions.options.require.prefix,i=[];for(const r of e)if(r.substring(0,s.length)===s)try{Jc(t,r)}catch(t){if(!t.retry)throw t;i.push(t.retry)}return i.length?Promise.all(i):null}(t,xi.dependencies[e]);s?Yn.retryAfter(s.then((()=>Kc(t,e,r)))):Kc(t,e,r)}}function Kc(t,e,s){const i=qa.get(s);if(i){let r=Gc[e]||{};i.options&&1===Object.keys(i.options).length&&i.options[s]&&(r={[s]:r}),t.configuration.add(s,t,r);const n=t.parseOptions.packageData.get("require").configured;i.preprocessors.length&&!n.has(s)&&(n.set(s,!0),Yn.retryAfter(Promise.resolve()))}}function $c(t,e){var s,i;const r=t.options.require,n=r.allow,o=("["===e.substring(0,1)?"":r.prefix)+e;if(!(Object.hasOwn(n,o)?n[o]:Object.hasOwn(n,e)?n[e]:r.defaultAllow))throw new Qo("BadRequire",'Extension "%1" is not allowed to be loaded',o);const a=ui.packages.get(o);if(a||Yn.retryAfter(Ni.load(o).catch((t=>{}))),a.hasFailed)throw new Qo("RequireFail",'Extension "%1" failed to load',e);const c=null===(s=xi[o])||void 0===s?void 0:s.rendererExtensions,l=null===(i=qi.startup.document)||void 0===i?void 0:i.menu;c&&l&&l.addRequiredExtensions(c),Jc(t.configuration.packageData.get("require").jax,o)}const Yc={Require(t,e){const s=t.GetArgument(e);if(s.match(/[^_a-zA-Z0-9]/)||""===s)throw new Qo("BadPackageName","Argument for %1 is not a valid package name",e);$c(t,s),t.Push(t.itemFactory.create("null"))}},Qc={require:{allow:Ai({base:!1,autoload:!1,configmacros:!1,tagformat:!1,setoptions:!1,texhtml:!1}),defaultAllow:!0,prefix:"tex"}};new Ra("require",{require:Yc.Require});const Zc=ja.create("require",{[Vo.HANDLER]:{[Go.MACRO]:["require"]},[Vo.CONFIG]:function(t,e){e.parseOptions.packageData.set("require",{jax:e,required:[...e.options.packages],configured:new Map});const s=e.parseOptions.options.require,i=s.prefix;if(i.match(/[^_a-zA-Z0-9]/))throw Error("Illegal characters used in \\require prefix");xi.paths[i]||(xi.paths[i]="[mathjax]/input/tex/extensions"),s.prefix="["+i+"]/"},[Vo.OPTIONS]:Qc});function tl(t,e,s,i){if(ui.packages.has(t.options.require.prefix+s)){const r=t.options.autoload[s],[n,o]=2===r.length&&Array.isArray(r[0])?r:[r,[]];for(const t of n)el.remove(t);for(const t of o)sl.remove(t);t.string=(i?e+" ":"\\begin{"+e.slice(1)+"}")+t.string.slice(t.i),t.i=0}$c(t,s)}const el=new Ra("autoload-macros",{}),sl=new Ra("autoload-environments",{}),il=ja.create("autoload",{[Vo.HANDLER]:{[Go.MACRO]:["autoload-macros"],[Go.ENVIRONMENT]:["autoload-environments"]},[Vo.OPTIONS]:{autoload:Ai({action:["toggle","mathtip","texttip"],amscd:[[],["CD"]],bbox:["bbox"],boldsymbol:["boldsymbol"],braket:["bra","ket","braket","set","Bra","Ket","Braket","Set","ketbra","Ketbra"],bussproofs:[[],["prooftree"]],cancel:["cancel","bcancel","xcancel","cancelto"],color:["color","definecolor","textcolor","colorbox","fcolorbox"],enclose:["enclose"],extpfeil:["xtwoheadrightarrow","xtwoheadleftarrow","xmapsto","xlongequal","xtofrom","Newextarrow"],html:["data","href","class","style","cssId"],mhchem:["ce","pu"],newcommand:["newcommand","renewcommand","newenvironment","renewenvironment","def","let"],unicode:["unicode","U","char"],verb:["verb"]})},[Vo.CONFIG]:function(t,e){const s=e.parseOptions,i=s.handlers.get(Go.MACRO),r=s.handlers.get(Go.ENVIRONMENT),n=s.options.autoload;s.packageData.set("autoload",{Autoload:tl});for(const t of Object.keys(n)){const e=n[t],[s,o]=2===e.length&&Array.isArray(e[0])?e:[e,[]];for(const e of s)i.lookup(e)&&"color"!==e||el.add(e,new wa(e,tl,[t,!0]));for(const e of o)r.lookup(e)||sl.add(e,new wa(e,tl,[t,!1]))}s.packageData.get("require")||Zc.config(t,e)},[Vo.INIT]:function(t){t.options.require||Ri(t.options,Zc.options)},[Vo.PRIORITY]:10}),rl="configmacros-map",nl="configmacros-active-map",ol="configmacros-env-map";function al(t,e,s){const i=s.parseOptions.handlers.retrieve(e),r=s.parseOptions.options[t];for(const t of Object.keys(r)){const e="string"==typeof r[t]?[r[t]]:r[t],s=Array.isArray(e[2])?new wa(t,Hc.MacroWithTemplate,e.slice(0,2).concat(e[2])):new wa(t,Hc.Macro,e);i.add(t,s)}}const cl=ja.create("configmacros",{[Vo.INIT]:function(t){new Sa(nl,{}),new Ra(rl,{}),new Oa(ol,Tc.environment,{}),t.append(ja.local({handler:{[Go.CHARACTER]:[nl],[Go.MACRO]:[rl],[Go.ENVIRONMENT]:[ol]},priority:3}))},[Vo.CONFIG]:function(t,e){!function(t){al("active",nl,t)}(e),function(t){al("macros",rl,t)}(e),function(t){const e=t.parseOptions.handlers.retrieve(ol),s=t.parseOptions.options.environments;for(const t of Object.keys(s))e.add(t,new wa(t,Hc.BeginEnv,[!0].concat(s[t])))}(e)},[Vo.ITEMS]:{[Uc.prototype.kind]:Uc},[Vo.OPTIONS]:{active:Ai({}),macros:Ai({}),environments:Ai({})}});const ll=ja.create("noundefined",{[Vo.FALLBACK]:{[Go.MACRO]:function(t,e){const s=t.create("text","\\"+e),i=t.options.noundefined,r={};for(const t of["color","background","size"])i[t]&&(r["math"+t]=i[t]);t.Push(t.create("node","mtext",[],r,s))}},[Vo.OPTIONS]:{noundefined:{color:"red",background:"",size:""}},[Vo.PRIORITY]:3});class hl extends sa{get texParser(){return this.configuration.packageData.get("textmacros").texParser}get tags(){return this.texParser.tags}constructor(t,e,s,i){super(t,e,s),this.level=i}mml(){return this.copyLists(),this.configuration.popParser(),null!=this.level?this.create("node","mstyle",this.nodes,{displaystyle:!1,scriptlevel:this.level}):1===this.nodes.length?this.nodes[0]:this.create("node","mrow",this.nodes)}copyLists(){const t=this.texParser.configuration;for(const[e,s]of Object.entries(this.configuration.nodeLists))for(const i of s)t.addNode(e,i);this.configuration.nodeLists={}}Parse(){this.text="",this.nodes=[],this.envStack=[],super.Parse()}saveText(){if(this.text){const t=this.stack.env.mathvariant,e=da.internalText(this,this.text,t?{mathvariant:t}:{});this.text="",this.Push(e)}}Push(t){if(this.text&&this.saveText(),t instanceof za)return super.Push(t);t instanceof ic?this.stack.env.mathcolor=this.stack.env.color:t instanceof Er&&(this.addAttributes(t),this.nodes.push(t))}PushMath(t){const e=this.stack.env;for(const s of["mathsize","mathcolor"])e[s]&&!t.attributes.hasExplicit(s)&&(t.isToken||t.isKind("mstyle")||(t=this.create("node","mstyle",[t])),jo.setAttribute(t,s,e[s]));t.isInferred&&(t=this.create("node","mrow",t.childNodes)),t.isKind("TeXAtom")||(t=this.create("node","TeXAtom",[t])),this.nodes.push(t)}addAttributes(t){const e=this.stack.env;if(t.isToken)for(const s of["mathsize","mathcolor","mathvariant"])e[s]&&!t.attributes.hasExplicit(s)&&jo.setAttribute(t,s,e[s])}ParseTextArg(t,e){const s=this.GetArgument(t);return e=Object.assign(Object.assign({},this.stack.env),e),new hl(s,e,this.configuration).mml()}ParseArg(t){return new hl(this.GetArgument(t),this.stack.env,this.configuration).mml()}Error(t,e,...s){throw new Qo(t,e,...s)}}const dl={Comment(t,e){for(;t.i<t.string.length&&"\n"!==t.string.charAt(t.i);)t.i++;t.i++},Math(t,e){t.saveText();const s=t.i;let i,r,n=0;for(;r=t.GetNext();)switch(i=t.i++,r){case"\\":")"===t.GetCS()&&(r="\\(");case"$":if(0===n&&e===r){const e=t.texParser.configuration,r=new sa(t.string.substring(s,i),t.stack.env,e).mml();return void t.PushMath(r)}break;case"{":n++;break;case"}":0===n&&t.Error("ExtraCloseMissingOpen","Extra close brace or missing open brace"),n--}t.Error("MathNotTerminated","Math mode is not properly terminated")},MathModeOnly(t,e){t.Error("MathModeOnly","'%1' allowed only in math mode",e)},Misplaced(t,e){t.Error("Misplaced","Misplaced '%1'",e)},OpenBrace(t,e){const s=t.stack.env;t.envStack.push(s),t.stack.env=Object.assign({},s)},CloseBrace(t,e){t.envStack.length?(t.saveText(),t.stack.env=t.envStack.pop()):t.Error("ExtraCloseMissingOpen","Extra close brace or missing open brace")},OpenQuote(t,e){t.string.charAt(t.i)===e?(t.text+="\u201c",t.i++):t.text+="\u2018"},CloseQuote(t,e){t.string.charAt(t.i)===e?(t.text+="\u201d",t.i++):t.text+="\u2019"},Tilde(t,e){t.text+="\xa0"},Space(t,e){t.text+=" ",t.GetNext()},SelfQuote(t,e){t.text+=e.substring(1)},Insert(t,e,s){t.text+=s},Accent(t,e,s){const i=t.ParseArg(e),r=t.create("token","mo",{},s);t.addAttributes(r),t.Push(t.create("node","mover",[i,r]))},Emph(t,e){const s="-tex-mathit"===t.stack.env.mathvariant?"normal":"-tex-mathit";t.Push(t.ParseTextArg(e,{mathvariant:s}))},TextFont(t,e,s){t.saveText(),t.Push(t.ParseTextArg(e,{mathvariant:s}))},SetFont(t,e,s){t.saveText(),t.stack.env.mathvariant=s},SetSize(t,e,s){t.saveText(),t.stack.env.mathsize=s},CheckAutoload(t,e){const s=t.configuration.packageData.get("autoload"),i=t.texParser;e=e.slice(1);const r=i.lookup(Go.MACRO,e);if(!r||s&&r._func===s.Autoload){if(i.parse(Go.MACRO,[i,e]),!r)return;Sn(Promise.resolve())}i.parse(Go.MACRO,[t,e])},Macro:xc.Macro,Spacer:xc.Spacer,Hskip:xc.Hskip,rule:xc.rule,Rule:xc.Rule,HandleRef:xc.HandleRef,UnderOver:xc.UnderOver,Lap:xc.Lap,Phantom:xc.Phantom,Smash:xc.Smash,MmlToken:xc.MmlToken},ul=ea.Variant;new Sa("text-special",{$:dl.Math,"%":dl.Comment,"^":dl.MathModeOnly,_:dl.MathModeOnly,"&":dl.Misplaced,"#":dl.Misplaced,"~":dl.Tilde," ":dl.Space,"\t":dl.Space,"\r":dl.Space,"\n":dl.Space,"\xa0":dl.Tilde,"{":dl.OpenBrace,"}":dl.CloseBrace,"`":dl.OpenQuote,"'":dl.CloseQuote}),new Ra("text-macros",{"(":dl.Math,$:dl.SelfQuote,_:dl.SelfQuote,"%":dl.SelfQuote,"{":dl.SelfQuote,"}":dl.SelfQuote," ":dl.SelfQuote,"&":dl.SelfQuote,"#":dl.SelfQuote,"\\":[dl.Macro,"$\\\\$"],"'":[dl.Accent,"\xb4"],"\u2019":[dl.Accent,"\xb4"],"`":[dl.Accent,"`"],"\u2018":[dl.Accent,"`"],"^":[dl.Accent,"^"],'"':[dl.Accent,"\xa8"],"~":[dl.Accent,"~"],"=":[dl.Accent,"\xaf"],".":[dl.Accent,"\u02d9"],u:[dl.Accent,"\u02d8"],v:[dl.Accent,"\u02c7"],emph:dl.Emph,rm:[dl.SetFont,ul.NORMAL],mit:[dl.SetFont,ul.ITALIC],oldstyle:[dl.SetFont,ul.OLDSTYLE],cal:[dl.SetFont,ul.CALLIGRAPHIC],it:[dl.SetFont,"-tex-mathit"],bf:[dl.SetFont,ul.BOLD],sf:[dl.SetFont,ul.SANSSERIF],tt:[dl.SetFont,ul.MONOSPACE],frak:[dl.TextFont,ul.FRAKTUR],Bbb:[dl.TextFont,ul.DOUBLESTRUCK],tiny:[dl.SetSize,.5],Tiny:[dl.SetSize,.6],scriptsize:[dl.SetSize,.7],small:[dl.SetSize,.85],normalsize:[dl.SetSize,1],large:[dl.SetSize,1.2],Large:[dl.SetSize,1.44],LARGE:[dl.SetSize,1.73],huge:[dl.SetSize,2.07],Huge:[dl.SetSize,2.49],textnormal:[dl.Macro,"{\\rm #1}",1],textup:[dl.Macro,"{\\rm #1}",1],textrm:[dl.Macro,"{\\rm #1}",1],textit:[dl.Macro,"{\\it #1}",1],textbf:[dl.Macro,"{\\bf #1}",1],textsf:[dl.Macro,"{\\sf #1}",1],texttt:[dl.Macro,"{\\tt #1}",1],dagger:[dl.Insert,"\u2020"],ddagger:[dl.Insert,"\u2021"],S:[dl.Insert,"\xa7"],AA:[dl.Insert,"\u212b"],ldots:[dl.Insert,"\u2026"],vdots:[dl.Insert,"\u22ee"],",":[dl.Spacer,co.thinmathspace],":":[dl.Spacer,co.mediummathspace],">":[dl.Spacer,co.mediummathspace],";":[dl.Spacer,co.thickmathspace],"!":[dl.Spacer,co.negativethinmathspace],enspace:[dl.Spacer,.5],quad:[dl.Spacer,1],qquad:[dl.Spacer,2],thinspace:[dl.Spacer,co.thinmathspace],negthinspace:[dl.Spacer,co.negativethinmathspace],hskip:dl.Hskip,hspace:dl.Hskip,kern:dl.Hskip,mskip:dl.Hskip,mspace:dl.Hskip,mkern:dl.Hskip,rule:dl.rule,Rule:[dl.Rule],Space:[dl.Rule,"blank"],color:dl.CheckAutoload,textcolor:dl.CheckAutoload,colorbox:dl.CheckAutoload,fcolorbox:dl.CheckAutoload,href:dl.CheckAutoload,style:dl.CheckAutoload,class:dl.CheckAutoload,data:dl.CheckAutoload,cssId:dl.CheckAutoload,unicode:dl.CheckAutoload,U:dl.CheckAutoload,char:dl.CheckAutoload,ref:[dl.HandleRef,!1],eqref:[dl.HandleRef,!0],underline:[dl.UnderOver,"2015"],llap:dl.Lap,rlap:dl.Lap,phantom:dl.Phantom,vphantom:[dl.Phantom,1,0],hphantom:[dl.Phantom,0,1],smash:dl.Smash,mmlToken:dl.MmlToken});const pl=ja.create("text-base",{[Vo.PARSER]:"text",[Vo.PRIORITY]:1,[Vo.HANDLER]:{[Go.CHARACTER]:["command","text-special"],[Go.MACRO]:["text-macros"]},[Vo.FALLBACK]:{[Go.CHARACTER]:(t,e)=>{t.text+=e},[Go.MACRO]:(t,e)=>{const s=t.texParser,i=s.lookup(Go.MACRO,e);i&&i._func!==dl.Macro&&t.Error("MathMacro","%1 is only supported in math mode","\\"+e),s.parse(Go.MACRO,[t,e])}},[Vo.ITEMS]:{[Wa.prototype.kind]:Wa,[za.prototype.kind]:za,[oc.prototype.kind]:oc,[ic.prototype.kind]:ic}});function ml(t,e,s,i){const r=t.configuration.packageData.get("textmacros");return t instanceof hl||(r.texParser=t),r.parseOptions.clear(),[new hl(e,i?{mathvariant:i}:{},r.parseOptions,s).mml()]}const fl=ja.create("textmacros",{[Vo.PRIORITY]:1,[Vo.CONFIG]:(t,e)=>{const s=new Ha(e.parseOptions.options.textmacros.packages,["tex","text"]);s.init();const i=new fa(s,[]);i.options=e.parseOptions.options,s.config(e),Ca.addTags(s.tags),i.tags=Ca.getDefault(),i.tags.configuration=i,i.packageData=e.parseOptions.packageData,i.packageData.set("textmacros",{textConf:s,parseOptions:i,jax:e,texParser:null}),i.options.internalMath=ml},[Vo.PREPROCESSORS]:[t=>{const e=t.data.packageData.get("textmacros");e.parseOptions.nodeFactory.setMmlFactory(e.jax.mmlFactory)}],[Vo.OPTIONS]:{textmacros:{packages:["text-base"]}}});MathJax.loader&&MathJax.loader.checkVersion("input/tex",si,"input"),ai({_:{input:{tex_ts:Qt,tex:{ColumnParser:qt,Configuration:Gt,FilterUtil:Mt,FindTeX:At,HandlerTypes:It,MapHandler:Vt,NodeFactory:jt,NodeUtil:Lt,ParseMethods:$t,ParseOptions:Ht,ParseUtil:Ut,Stack:Rt,StackItem:Dt,StackItemFactory:Ft,Tags:Wt,TexConstants:Pt,TexError:Ot,TexParser:Bt,Token:zt,TokenMap:Xt,UnitUtil:St,ams:{AmsConfiguration:ne,AmsItems:Zt,AmsMethods:ee},autoload:{AutoloadConfiguration:ae},base:{BaseConfiguration:Yt,BaseItems:Jt,BaseMethods:Kt},configmacros:{ConfigMacrosConfiguration:ce},newcommand:{NewcommandConfiguration:re,NewcommandItems:se,NewcommandMethods:ie,NewcommandUtil:te},noundefined:{NoUndefinedConfiguration:le},require:{RequireConfiguration:oe},textmacros:{TextMacrosConfiguration:ue,TextMacrosMethods:de,TextParser:he}}}}}),Ni.preLoaded("input/tex-base","[tex]/ams","[tex]/newcommand","[tex]/textmacros","[tex]/noundefined","[tex]/require","[tex]/autoload","[tex]/configmacros"),function(t=[],e=!0){if(MathJax.startup){e&&(MathJax.startup.registerConstructor("tex",MathJax._.input.tex_ts.TeX),MathJax.startup.useInput("tex")),MathJax.config.tex||(MathJax.config.tex={});let s=MathJax.config.tex.packages;MathJax.config.tex.packages=t,s&&(Array.isArray(s)&&(s={"[+]":s.filter((e=>!t.includes(e)))}),Si(MathJax.config.tex,{packages:s}))}}(["base","ams","newcommand","textmacros","noundefined","require","autoload","configmacros"]);const gl="http://www.w3.org/1998/Math/MathML";class bl extends Ki{findMath(t){const e=new Set;this.findMathNodes(t,e),this.findMathPrefixed(t,e);const s=this.adaptor.root(this.adaptor.document);return"html"===this.adaptor.kind(s)&&0===e.size&&this.findMathNS(t,e),this.processMath(e)}findMathNodes(t,e){for(const s of this.adaptor.tags(t,"math"))e.add(s)}findMathPrefixed(t,e){const s=this.adaptor.root(this.adaptor.document);for(const i of this.adaptor.allAttributes(s))if("xmlns:"===i.name.substring(0,6)&&i.value===gl){const s=i.name.substring(6);for(const i of this.adaptor.tags(t,s+":math"))e.add(i)}}findMathNS(t,e){for(const s of this.adaptor.tags(t,"math",gl))e.add(s)}processMath(t){const e=this.adaptor,s=[];for(const i of t.values()){if("mjx-assistive-mml"===e.kind(e.parent(i)))continue;const t="block"===e.getAttribute(i,"display")||"display"===e.getAttribute(i,"mode"),r={node:i,n:0,delim:""},n={node:i,n:0,delim:""};s.push({math:e.outerHTML(i),start:r,end:n,display:t})}return s}}bl.OPTIONS={};class El{constructor(t={}){const e=this.constructor;this.options=Oi(Ri({},e.OPTIONS),t)}setMmlFactory(t){this.factory=t}compile(t){const e=this.makeNode(t);return e.verifyTree(this.options.verify),e.setInheritedAttributes({},!1,0,!1),e.walkTree(this.markMrows),e}makeNode(t){const e=this.adaptor;let s=!1;const i=e.kind(t).replace(/^.*:/,"");let r=e.getAttribute(t,"data-mjx-texclass")||"";r&&(r=this.filterAttribute("data-mjx-texclass",r)||"");let n=r&&"mrow"===i?"TeXAtom":i;for(const o of this.filterClassList(e.allClasses(t)))o.match(/^MJX-TeXAtom-/)&&"mrow"===i?(r=o.substring(12),n="TeXAtom"):"MJX-fixedlimits"===o&&(s=!0);return this.factory.getNodeClass(n)?this.createMml(n,t,r,s):this.unknownNode(n,t)}createMml(t,e,s,i){const r=this.factory.create(t);return"TeXAtom"!==t||"OP"!==s||i||(r.setProperty("movesupsub",!0),r.attributes.setInherited("movablelimits",!0)),s&&(r.texClass=ur[s],r.setProperty("texClass",r.texClass)),this.addAttributes(r,e),this.checkClass(r,e),this.addChildren(r,e),r}unknownNode(t,e){return this.factory.getNodeClass("html")&&this.options.allowHtmlInTokenNodes?this.factory.create("html").setHTML(e,this.adaptor):(this.error('Unknown node type "'+t+'"'),null)}addAttributes(t,e){let s=!1;for(const i of this.adaptor.allAttributes(e)){const e=i.name,r=this.filterAttribute(e,i.value);if(null!==r&&"xmlns"!==e)if("data-mjx-"===e.substring(0,9))switch(e.substring(9)){case"alternate":t.setProperty("variantForm",!0);break;case"variant":t.attributes.set("mathvariant",r),t.setProperty("ignore-variant",!0),s=!0;break;case"smallmatrix":t.setProperty("smallmatrix",!0),t.setProperty("useHeight",!1);break;case"mathaccent":t.setProperty("mathaccent","true"===r);break;case"auto-op":t.setProperty("autoOP","true"===r);break;case"script-align":t.setProperty("scriptalign",r);break;case"vbox":t.setProperty("vbox",r);break;default:t.attributes.set(e,r)}else if("class"!==e){const i=r.toLowerCase();"true"===i||"false"===i?t.attributes.set(e,"true"===i):s&&"mathvariant"===e||t.attributes.set(e,r)}}}filterAttribute(t,e){return e}filterClassList(t){return t}addChildren(t,e){if(0===t.arity)return;const s=this.adaptor;for(const i of s.childNodes(e)){const e=s.kind(i);if("#comment"!==e)if("#text"===e)this.addText(t,i);else if(t.isKind("annotation-xml"))t.appendChild(this.factory.create("XML").setXML(i,s));else{const e=t.appendChild(this.makeNode(i));0===e.arity&&s.childNodes(i).length&&!e.isKind("html")&&(this.options.fixMisplacedChildren?this.addChildren(t,i):e.mError("There should not be children for "+e.kind+" nodes",this.options.verify,!0))}}t.isToken&&this.trimSpace(t)}addText(t,e){let s=this.adaptor.value(e);(t.isToken||t.getProperty("isChars"))&&t.arity?(t.isToken&&(s=yo(s),s=this.normalizeSpace(s)),t.appendChild(this.factory.create("text").setText(s))):s.match(/\S/)&&this.error('Unexpected text node "'+s+'"')}checkClass(t,e){const s=[];for(const i of this.filterClassList(this.adaptor.allClasses(e)))"MJX-"===i.substring(0,4)?"MJX-variant"===i?t.setProperty("variantForm",!0):"MJX-TeXAtom"!==i.substring(0,11)&&t.attributes.set("mathvariant",this.fixCalligraphic(i.substring(3))):s.push(i);s.length&&t.attributes.set("class",s.join(" "))}fixCalligraphic(t){return t.replace(/caligraphic/,"calligraphic")}markMrows(t){if(t.isKind("mrow")&&!t.isInferred&&t.childNodes.length>=2){const e=t.childNodes[0],s=t.childNodes[t.childNodes.length-1];e.isKind("mo")&&e.attributes.get("fence")&&e.attributes.get("stretchy")&&s.isKind("mo")&&s.attributes.get("fence")&&s.attributes.get("stretchy")&&(e.childNodes.length&&t.setProperty("open",e.getText()),s.childNodes.length&&t.setProperty("close",s.getText()))}}normalizeSpace(t){return t.replace(/[\t\n\r]/g," ").replace(/ +/g," ")}trimSpace(t){let e=t.childNodes[0];e&&(e.isKind("text")&&e.setText(e.getText().replace(/^ +/,"")),e=t.childNodes[t.childNodes.length-1],e.isKind("text")&&e.setText(e.getText().replace(/ +$/,"")))}error(t){throw new Error(t)}}El.OPTIONS={MmlFactory:null,allowHtmlInTokenNodes:!1,fixMisplacedChildren:!0,verify:Object.assign({},Er.verifyDefaults),translateEntities:!0};class Nl extends $i{constructor(t={}){const[e,s,i]=Bi(t,bl.OPTIONS,El.OPTIONS);super(e),this.findMathML=this.options.FindMathML||new bl(s),this.mathml=this.options.MathMLCompile||new El(i),this.mmlFilters=new mi(this.options.mmlFilters)}setAdaptor(t){super.setAdaptor(t),this.findMathML.adaptor=t,this.mathml.adaptor=t}setMmlFactory(t){super.setMmlFactory(t),this.mathml.setMmlFactory(t)}get processStrings(){return!1}compile(t,e){let s=t.start.node;if(!s||!t.end.node||this.options.forceReparse||"#text"===this.adaptor.kind(s)){let i=this.executeFilters(this.preFilters,t,e,(t.math||"<math></math>").trim());"html"===this.options.parseAs&&(i=`<html><head></head><body>${i}</body></html>`);const r=this.checkForErrors(this.adaptor.parse(i,"text/"+this.options.parseAs)),n=this.adaptor.body(r);1!==this.adaptor.childNodes(n).length&&this.error("MathML must consist of a single element"),s=this.adaptor.remove(this.adaptor.firstChild(n)),"math"!==this.adaptor.kind(s).replace(/^[a-z]+:/,"")&&this.error("MathML must be formed by a <math> element, not <"+this.adaptor.kind(s)+">")}s=this.executeFilters(this.mmlFilters,t,e,s);let i=this.mathml.compile(s);return i=this.executeFilters(this.postFilters,t,e,i),t.display="block"===i.attributes.get("display"),i}checkForErrors(t){const e=this.adaptor.tags(this.adaptor.body(t),"parsererror")[0];return e&&(""===this.adaptor.textContent(e)&&this.error("Error processing MathML"),this.options.parseError.call(this,e)),t}error(t){throw new Error(t)}findMath(t){return this.findMathML.findMath(t)}}Nl.NAME="MathML",Nl.OPTIONS=Ri({parseAs:"html",forceReparse:!1,mmlFilters:[],FindMathML:null,MathMLCompile:null,parseError:function(t){this.error(this.adaptor.textContent(t).replace(/\n.*/g,""))}},$i.OPTIONS),MathJax.loader&&MathJax.loader.checkVersion("input/mml",si,"input"),ai({_:{input:{mathml_ts:fe,mathml:{FindMathML:pe,MathMLCompile:me}}}}),MathJax.loader&&MathJax.loader.pathFilters.add((t=>(t.name=t.name.replace(/\/util\/entities\/.*?\.js/,"/input/mml/entities.js"),!0))),MathJax.startup&&(MathJax.startup.registerConstructor("mml",Nl),MathJax.startup.useInput("mml"));const yl={None:"",Vertical:"v",Horizontal:"h"},xl=yl.Vertical,vl=yl.Horizontal;var Cl=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};const Tl={dir:yl.None};function wl(t,e,s){return s?Ri(t,{[e]:s})[e]:t[e]}class _l{get CLASS(){return this.constructor}static charOptions(t,e){const s=t[e];if(!Array.isArray(s))throw Error(`Character data hasn't been loaded for 0x${e.toString(16).toUpperCase()}`);return 3===s.length&&(s[3]={}),s[3]}static defineDynamicFiles(t,e=""){const s={};return(t||[]).forEach((([t,i,r])=>{s[t]={extension:e,file:t,variants:i,delimiters:r||[],promise:null,failed:!1,setup:e=>{s[t].failed=!0}}})),s}static dynamicSetup(t,e,s,i={},r=null){const n=t?this.dynamicExtensions.get(t):null;(t?n.files:this.dynamicFiles)[e].setup=e=>{Object.keys(s).forEach((t=>e.defineChars(t,s[t]))),e.defineDelimiters(i),t&&this.adjustDelimiters(e.delimiters,Object.keys(i),n.sizeN,n.stretchN),r&&e.addDynamicFontCss(r)}}static adjustDelimiters(t,e,s,i){e.forEach((e=>{const r=t[parseInt(e)];"dir"in r&&(r.variants&&(r.variants=this.adjustArrayIndices(r.variants,s)),r.stretchv&&(r.stretchv=this.adjustArrayIndices(r.stretchv,i)))}))}static adjustArrayIndices(t,e){return t.map((t=>t<0?e-1-t:t))}static addExtension(t,e=""){const s={name:t.name,prefix:e||`[${t.name}-extension]/${this.JAX.toLowerCase()}/dynamic`,files:this.defineDynamicFiles(t.ranges,t.name),sizeN:this.defaultSizeVariants.length,stretchN:this.defaultStretchVariants.length};this.dynamicExtensions.set(t.name,s);for(const[e,s]of[["options","OPTIONS"],["variants","defaultVariants"],["variantSmp","VariantSmp"],["cssFonts","defaultCssFonts"],["accentMap","defaultAccentMap"],["moMap","defaultMoMap"],["mnMap","defaultMnMap"],["parameters","defaultParams"],["chars","defaultChars"],["sizeVariants","defaultSizeVariants"],["stretchVariants","defaultStretchVariants"]])wl(this,s,t[e]);t.delimiters&&(Object.assign(this.defaultDelimiters,t.delimiters),this.adjustDelimiters(this.defaultDelimiters,Object.keys(t.delimiters),s.sizeN,s.stretchN))}constructor(t=null){this.variant={},this.delimiters={},this.cssFontMap={},this.cssFontPrefix="",this.remapChars={},this.skewIcFactor=.75;const e=this.CLASS;this.options=Oi(Ri({},e.OPTIONS),t),this.params=Object.assign({},e.defaultParams),this.sizeVariants=[...e.defaultSizeVariants],this.stretchVariants=[...e.defaultStretchVariants],this.defineCssFonts(e.defaultCssFonts),this.cssFamilyPrefix=e.defaultCssFamilyPrefix,this.createVariants(e.defaultVariants),this.defineDelimiters(e.defaultDelimiters),Object.keys(e.defaultChars).forEach((t=>this.defineChars(t,e.defaultChars[t]))),this.defineRemap("accent",e.defaultAccentMap),this.defineRemap("mo",e.defaultMoMap),this.defineRemap("mn",e.defaultMnMap),this.defineDynamicCharacters(e.dynamicFiles),e.dynamicExtensions.forEach((t=>this.defineDynamicCharacters(t.files)))}setOptions(t){Ri(this.options,t)}addExtension(t,e=""){const s=this.constructor.JAX.toLowerCase(),i={name:t.name,prefix:e||`[${t.name}-extension]/${s}/dynamic`,files:this.CLASS.defineDynamicFiles(t.ranges,e),sizeN:this.sizeVariants.length,stretchN:this.stretchVariants.length};this.CLASS.dynamicExtensions.set(t.name,i),Ri(this.options,t.options||{}),Ri(this.params,t.parameters||{}),wl(this,"sizeVariants",t.sizeVariants),wl(this,"stretchVariants",t.stretchVariants),wl(this.constructor,"VariantSmp",t.variantSmp),this.defineCssFonts(wl({cssFonts:{}},"cssFonts",t.cssFonts)),this.createVariants(wl({variants:[]},"variants",t.variants)),t.delimiters&&(this.defineDelimiters(wl({delimiters:{}},"delimiters",t.delimiters)),this.CLASS.adjustDelimiters(this.delimiters,Object.keys(t.delimiters),i.sizeN,i.stretchN));for(const e of Object.keys(t.chars||{}))this.defineChars(e,t.chars[e]);return this.defineRemap("accent",t.accentMap),this.defineRemap("mo",t.moMap),this.defineRemap("mn",t.mnMap),t.ranges&&this.defineDynamicCharacters(i.files),[]}get styles(){return this._styles}set styles(t){this._styles=t}createVariant(t,e=null,s=null){const i={linked:[],chars:Object.create(e?this.variant[e].chars:{})};this.variant[s]&&(Object.assign(i.chars,this.variant[s].chars),this.variant[s].linked.push(i.chars),i.chars=Object.create(i.chars)),this.remapSmpChars(i.chars,t),this.variant[t]=i}remapSmpChars(t,e){const s=this.CLASS;let i=s.VariantSmp[e];if("string"==typeof i&&(i=s.VariantSmp[i]),!i)return;const r=s.SmpRemap,n=[null,null,s.SmpRemapGreekU,s.SmpRemapGreekL];for(const[e,o,a]of s.SmpRanges){const s=i[e];if(s){for(let e=o;e<=a;e++){if(930===e)continue;const i=s+e-o;t[e]=this.smpChar(r[i]||i)}if(n[e])for(const i of Object.keys(n[e]).map((t=>parseInt(t))))t[i]=this.smpChar(s+n[e][i])}}const o=i[5]||{};for(const e of Object.keys(o))t[e]=this.smpChar(i[5][e])}smpChar(t){return[,,,{smp:t}]}createVariants(t){for(const e of t)this.createVariant(e[0],e[1],e[2])}defineChars(t,e){const s=this.variant[t];Object.assign(s.chars,e);for(const t of s.linked)Object.assign(t,e)}defineCssFonts(t){Object.assign(this.cssFontMap,t);for(const e of Object.keys(t))"unknown"===this.cssFontMap[e][0]&&(this.cssFontMap[e][0]=this.options.unknownFamily)}defineDelimiters(t){Object.assign(this.delimiters,t)}defineRemap(t,e){e&&(Object.hasOwn(this.remapChars,t)||(this.remapChars[t]={}),Object.assign(this.remapChars[t],e))}defineDynamicCharacters(t){for(const e of Object.keys(t)){const s=t[e];for(const t of Object.keys(s.variants))this.defineChars(t,this.flattenRanges(s.variants[t],s));this.defineDelimiters(this.flattenRanges(s.delimiters,s))}}flattenRanges(t,e){const s={};for(const i of t)if(Array.isArray(i))for(let t=i[0];t<=i[1];t++)s[t]=e;else s[i]=e;return s}dynamicFileName(t){const e=t.extension?this.CLASS.dynamicExtensions.get(t.extension).prefix:this.options.dynamicPrefix;return t.file.match(/^(?:[/[]|[a-z]+:\/\/|[a-z]:)/i)?t.file:e+"/"+t.file.replace(/(\.js)?$/,".js")}loadDynamicFile(t){return Cl(this,void 0,void 0,(function*(){return t.failed?Promise.reject(new Error(`dynamic file '${t.file}' failed to load`)):(t.promise||(t.promise=ro(this.dynamicFileName(t)).catch((e=>{t.failed=!0,console.warn(e)}))),t.promise.then((()=>t.setup(this))))}))}loadDynamicFiles(){const t=this.CLASS.dynamicFiles,e=Object.keys(t).map((e=>this.loadDynamicFile(t[e])));for(const t of this.CLASS.dynamicExtensions.values())e.push(...Object.keys(t.files).map((e=>this.loadDynamicFile(t.files[e]))));return Promise.all(e)}loadDynamicFilesSync(){if(!Yn.asyncIsSynchronous)throw Error("MathJax(loadDynamicFilesSync): mathjax.asyncLoad must be specified and synchronous\n Try importing #js/../components/require.mjs and #js/util/asyncLoad/node.js");const t=this.CLASS.dynamicFiles;Object.keys(t).forEach((e=>this.loadDynamicFileSync(t[e])));for(const t of this.CLASS.dynamicExtensions.values())Object.keys(t.files).forEach((e=>this.loadDynamicFileSync(t.files[e])))}loadDynamicFileSync(t){if(!t.promise){t.promise=Promise.resolve();try{Yn.asyncLoad(this.dynamicFileName(t))}catch(e){t.failed=!0,console.warn(e)}t.setup(this)}}addDynamicFontCss(t,e){}getDelimiter(t){const e=this.delimiters[t];return e&&!("dir"in e)?(this.delimiters[t]=null,Sn(this.loadDynamicFile(e)),null):e}getSizeVariant(t,e){const s=this.getDelimiter(t);return s&&s.variants&&(e=s.variants[e]),this.sizeVariants[e]}getStretchVariant(t,e){const s=this.getDelimiter(t);return this.stretchVariants[s.stretchv?s.stretchv[e]:0]}getStretchVariants(t){return[0,1,2,3].map((e=>this.getStretchVariant(t,e)))}getChar(t,e){const s=this.variant[t].chars[e];if(s&&!Array.isArray(s)){const i=this.variant[t];return delete i.chars[e],i.linked.forEach((t=>delete t[e])),Sn(this.loadDynamicFile(s)),null}return s}getVariant(t){return this.variant[t]}getCssFont(t){return this.cssFontMap[t]||["serif",!1,!1]}getFamily(t){return this.cssFamilyPrefix?this.cssFamilyPrefix+", "+t:t}getRemappedChar(t,e){return(this.remapChars[t]||{})[e]}}_l.OPTIONS={unknownFamily:"serif",dynamicPrefix:"."},_l.JAX="common",_l.NAME="",_l.defaultVariants=[["normal"],["bold","normal"],["italic","normal"],["bold-italic","italic","bold"],["double-struck","bold"],["fraktur","normal"],["bold-fraktur","bold","fraktur"],["script","italic"],["bold-script","bold-italic","script"],["sans-serif","normal"],["bold-sans-serif","bold","sans-serif"],["sans-serif-italic","italic","sans-serif"],["sans-serif-bold-italic","bold-italic","bold-sans-serif"],["monospace","normal"],["-smallop","normal"],["-largeop","normal"],["-tex-calligraphic","italic"],["-tex-bold-calligraphic","bold-italic"],["-tex-oldstyle","normal"],["-tex-bold-oldstyle","bold"],["-tex-mathit","italic"],["-tex-variant","normal"]],_l.defaultCssFonts={normal:["unknown",!1,!1],bold:["unknown",!1,!0],italic:["unknown",!0,!1],"bold-italic":["unknown",!0,!0],"double-struck":["unknown",!1,!0],fraktur:["unknown",!1,!1],"bold-fraktur":["unknown",!1,!0],script:["cursive",!1,!1],"bold-script":["cursive",!1,!0],"sans-serif":["sans-serif",!1,!1],"bold-sans-serif":["sans-serif",!1,!0],"sans-serif-italic":["sans-serif",!0,!1],"sans-serif-bold-italic":["sans-serif",!0,!0],monospace:["monospace",!1,!1],"-smallop":["unknown",!1,!1],"-largeop":["unknown",!1,!1],"-tex-calligraphic":["cursive",!0,!1],"-tex-bold-calligraphic":["cursive",!0,!0],"-tex-oldstyle":["unknown",!1,!1],"-tex-bold-oldstyle":["unknown",!1,!0],"-tex-mathit":["unknown",!0,!1],"-tex-variant":["unknown",!1,!1]},_l.defaultCssFamilyPrefix="",_l.VariantSmp={bold:[119808,119834,120488,120514,120782,{988:120778,989:120779}],italic:[119860,119886,120546,120572],"bold-italic":[119912,119938,120604,120630],script:[119964,119990],"bold-script":[120016,120042],fraktur:[120068,120094],"double-struck":[120120,120146,,,120792],"bold-fraktur":[120172,120198],"sans-serif":[120224,120250,,,120802],"bold-sans-serif":[120276,120302,120662,120688,120812],"sans-serif-italic":[120328,120354],"sans-serif-bold-italic":[120380,120406,120720,120746],monospace:[120432,120458,,,120822]},_l.SmpRanges=[[0,65,90],[1,97,122],[2,913,937],[3,945,969],[4,48,57]],_l.SmpRemap={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},_l.SmpRemapGreekU={8711:25,1012:17},_l.SmpRemapGreekL={977:27,981:29,982:31,1008:28,1009:30,1013:26,8706:25},_l.defaultAccentMap={94:"\u02c6",126:"\u02dc",768:"\u02cb",769:"\u02ca",770:"\u02c6",771:"\u02dc",772:"\u02c9",774:"\u02d8",775:"\u02d9",776:"\xa8",778:"\u02da",780:"\u02c7",8594:"\u20d7"},_l.defaultMoMap={45:"\u2212"},_l.defaultMnMap={45:"\u2212"},_l.defaultParams={x_height:.442,quad:1,num1:.676,num2:.394,num3:.444,denom1:.686,denom2:.345,sup1:.413,sup2:.363,sup3:.289,sub1:.15,sub2:.247,sup_drop:.386,sub_drop:.05,delim1:2.39,delim2:1,axis_height:.25,rule_thickness:.06,big_op_spacing1:.111,big_op_spacing2:.167,big_op_spacing3:.2,big_op_spacing4:.6,big_op_spacing5:.1,surd_height:.06,scriptspace:.05,nulldelimiterspace:.12,delimiterfactor:901,delimitershortfall:.3,rule_factor:1.25,min_rule_thickness:1.25,separation_factor:1.75,extra_ic:.033,extender_factor:.333},_l.defaultDelimiters={},_l.defaultChars={},_l.defaultSizeVariants=[],_l.defaultStretchVariants=[],_l.dynamicFiles={},_l.dynamicExtensions=new Map;class kl extends mo{static from(t,e,s=null){const i=new this;return Object.assign(i,t),i.lineLeading=e,s&&(i.indentData=s),i}constructor(t,e=null){super(t),this.indentData=null,this.isFirst=!1,this.originalL=this.L,e&&(this.start=e)}append(t){this.isFirst&&(t.originalL+=t.L,t.L=0),t.indentData&&(this.indentData=t.indentData),this.lineLeading=t.lineLeading,super.append(t),this.isFirst=t.isFirst}copy(){const t=kl.from(this,this.lineLeading);return t.indentData=this.indentData,t.lineLeading=this.lineLeading,t}getIndentData(t){let{indentalign:e,indentshift:s,indentalignfirst:i,indentshiftfirst:r,indentalignlast:n,indentshiftlast:o}=t.attributes.getAllAttributes();"indentalign"===i&&(i=t.attributes.getInherited("indentalign")),"indentshift"===r&&(r=t.attributes.getInherited("indentshift")),"indentalign"===n&&(n=e),"indentshift"===o&&(o=s),this.indentData=[[i,r],[e,s],[n,o]]}copyIndentData(t){return t.indentData.map((([t,e])=>[t,e]))}}const Al=1e6;class Ll extends zn{breakToWidth(t,e){}}class Ml extends Ll{constructor(){super(...arguments),this.PENALTY={newline:t=>0,nobreak:t=>Al,goodbreak:t=>t-200*this.state.depth,badbreak:t=>t+200*this.state.depth,auto:t=>t},this.FACTORS={depth:t=>t+800*this.state.depth,width:t=>t+Math.floor((this.state.width-this.state.w)/this.state.width*2500),tail:t=>t+Math.floor(this.state.width/Math.max(1e-4,this.state.mathLeft-this.state.w)*500),open:(t,e)=>{const s=e.node.prevClass;if(s===ur.BIN||s===ur.REL||s===ur.OP)return t+5e3;const i=this.getPrevious(e);if(i&&("postfix"!==i.attributes.get("form")||"nobreak"===i.attributes.get("linebreak")))return t+5e3;const r=e.node.Parent;if((null==r?void 0:r.isKind("mmultiscripts"))&&e.node===this.getFirstToken(r)){if(!!r.childNodes.filter((t=>t.isKind("mprescripts"))).length)return Al}return t-500},close:(t,e)=>{var s;const i=e.node.Parent;return!(null==i?void 0:i.isKind("msubsup"))||i.isKind("mmultiscripts")&&(null===(s=i.childNodes[1])||void 0===s?void 0:s.isKind("mprescripts"))||e.node!==this.getLastToken(i.childNodes[0])?t+500:Al},space:(t,e)=>{const s=e;if(!s.canBreak)return Al;const i=s.getBBox().w;return i<0?Al:i<1?t:t-100*(i+4)},separator:t=>t+500,fuzz:t=>.99*t},this.TEXCLASS={[ur.BIN]:t=>t-250,[ur.REL]:t=>t-500}}breakToWidth(t,e){const s=this.state;this.state=this.createState(t),this.state.width=e;const i=t.breakCount;for(let s=0;s<=i;s++){(t.lineBBox[s]||t.getLineBBox(s)).w>e&&this.breakLineToWidth(t,s)}for(const[t,e]of this.state.breaks){if(null===e){const e=t.coreMO();e.setBreakStyle(e.node.attributes.get("linebreakstyle")||"before")}else t.setBreakAt(e);t.invalidateBBox()}this.state=s}createState(t){const e=t.getBBox().w;return{breaks:new Set,potential:[],width:0,w:0,prevWidth:0,prevBreak:null,depth:0,mathWidth:e,mathLeft:e}}breakLineToWidth(t,e){const s=this.state;s.potential=[],s.w=0,s.prevWidth=0,s.prevBreak=null,s.depth=0,this.visitNode(t,e)}addWidth(t,e=null){null===e&&(e=t.L+t.w+t.R),e&&(e*=t.rscale,this.state.w+=e,this.state.potential.length&&(this.state.potential[0][4]+=e),this.processBreak())}processBreak(){const t=this.state;for(;t.potential.length&&t.w>this.state.width;){const e=t.potential.pop(),[s,,i,r,n]=e;t.breaks.add(s),t.w=t.potential.reduce(((t,e)=>t+e[4]),r+n),t.prevBreak&&t.prevWidth+i<=t.width?(t.breaks.delete(t.prevBreak[0]),t.prevWidth+=i):t.prevWidth=i+r,t.potential.forEach((t=>t[2]-=i)),t.prevBreak=e,t.mathLeft-=i}}pushBreak(t,e,s,i){var r;const n=this.state;if(!(e>=Al||0===n.w&&0===n.prevWidth)){for(;n.potential.length&&n.potential[0][1]>this.FACTORS.fuzz(e);){const t=n.potential.shift();n.potential.length&&(n.potential[0][4]+=t[4])}n.potential.unshift([[t,i],e,n.w-((null===(r=n.prevBreak)||void 0===r?void 0:r[3])||0),s,0])}}getBorderLR(t){var e;const s=t.styleData;if(!s)return[0,0];const i=(null===(e=null==s?void 0:s.border)||void 0===e?void 0:e.width)||[0,0,0,0],r=(null==s?void 0:s.padding)||[0,0,0,0];return[i[3]+r[3],i[1]+r[1]]}getFirstToken(t){return t.isToken?t:this.getFirstToken(t.childNodes[0])}getLastToken(t){return t.isToken?t:this.getLastToken(t.childNodes[t.childNodes.length-1])}visitNode(t,e){t&&(this.state.depth++,t.node.isEmbellished&&!t.node.isKind("mo")?this.visitEmbellishedOperator(t,e):super.visitNode(t,e),this.state.depth--)}visitDefault(t,e){var s;const i=t.getLineBBox(e);if(t.node.isToken||t.node.linebreakContainer||!(null===(s=t.childNodes)||void 0===s?void 0:s[0]))this.addWidth(i);else{const[s,r]=this.getBorderLR(t);0===e&&this.addWidth(i,i.L+s),this.visitNode(t.childNodes[0],e),e===t.breakCount&&this.addWidth(i,i.R+r)}}visitEmbellishedOperator(t,e){const s=t.coreMO(),i=kl.from(t.getOuterBBox(),t.linebreakOptions.lineleading);i.getIndentData(s.node);const r=s.getBreakStyle(s.node.attributes.get("linebreakstyle")),n=s.processIndent("",i.indentData[1][1],"",i.indentData[0][1],this.state.width)[1],o=this.moPenalty(s);if("before"===r)this.pushBreak(t,o,n-i.L,null),this.addWidth(i);else{this.addWidth(i);const e=("after"===r?0:s.multChar?s.multChar.getBBox().w:i.w)+n;this.pushBreak(t,o,e,null)}}visitMoNode(t,e){const s=t,i=kl.from(s.getOuterBBox(),s.linebreakOptions.lineleading);i.getIndentData(s.node);const r=s.getBreakStyle(s.node.attributes.get("linebreakstyle")),n=s.processIndent("",i.indentData[1][1],"",i.indentData[0][1],this.state.width)[1],o=this.moPenalty(s);if("before"===r)this.pushBreak(t,o,n-i.L,null),this.addWidth(i);else{this.addWidth(i);const e=("after"===r?0:s.multChar?s.multChar.getBBox().w:i.w)+n;this.pushBreak(t,o,e,null)}}moPenalty(t){const{linebreak:e,fence:s,form:i}=t.node.attributes.getList("linebreak","fence","form"),r=this.FACTORS;let n=r.tail(r.width(0));const o=s&&"prefix"===i||t.node.texClass===ur.OPEN,a=s&&"postfix"===i||t.node.texClass===ur.CLOSE;return o&&(n=r.open(n,t),this.state.depth++),a&&(n=r.close(n,t),this.state.depth--),n=(this.TEXCLASS[t.node.texClass]||(t=>t))(n),(this.PENALTY[e]||(t=>t))(r.depth(n))}getPrevious(t){let e=t.node,s=e.parent,i=s.childIndex(e);for(;s&&(s.notParent||s.isKind("mrow"))&&0===i;)e=s,s=e.parent,i=s.childIndex(e);if(!s||!i)return null;const r=s.childNodes[i-1];return r.isEmbellished?r.coreMO():null}visitMspaceNode(t,e){const s=t.getLineBBox(e),i=t;if(i.canBreak){const e=this.mspacePenalty(i);s.getIndentData(t.node);const r=t.processIndent("",s.indentData[1][1],"",s.indentData[0][1],this.state.width)[1];this.pushBreak(t,e,r-s.w,null)}this.addWidth(s)}mspacePenalty(t){const e=t.node.attributes.get("linebreak"),s=this.FACTORS,i=s.space(s.tail(s.width(0)),t);return(this.PENALTY[e]||(t=>t))(s.depth(i))}visitMtextNode(t,e){if(!t.getText().match(/ /))return void this.visitDefault(t,e);const s=t;s.clearBreakPoints();const i=s.textWidth(" "),r=t.getBBox(),[n,o]=this.getBorderLR(t);this.addWidth(r,r.L+n);const a=s.childNodes;for(const e of a.keys()){const n=a[e];if(n.node.isKind("text")){const o=n.node.getText().split(/ /),a=o.pop();for(const n of o.keys())this.addWidth(r,s.textWidth(o[n])),this.pushBreak(t,this.mtextPenalty(),-i,[e,n+1]),this.addWidth(r,i);this.addWidth(r,s.textWidth(a))}else this.addWidth(n.getBBox())}this.addWidth(r,r.R+o)}mtextPenalty(){const t=this.FACTORS;return t.depth(t.tail(t.width(0)))}visitMrowNode(t,e){const s=t.lineBBox[e]||t.getLineBBox(e),[i,r]=s.start||[0,0],[n,o]=s.end||[t.childNodes.length-1,0],[a,c]=this.getBorderLR(t);this.addWidth(s,s.L+a);for(let e=i;e<=n;e++)this.visitNode(t.childNodes[e],e===i?r:e===n?o:0);this.addWidth(s,s.R+c)}visitInferredMrowNode(t,e){this.state.depth--,this.visitMrowNode(t,e),this.state.depth++}visitMfracNode(t,e){const s=t;!s.node.attributes.get("bevelled")&&s.getOuterBBox().w>this.state.width&&(this.breakToWidth(s.childNodes[0],this.state.width),this.breakToWidth(s.childNodes[1],this.state.width)),this.visitDefault(t,e)}visitMsqrtNode(t,e){if(t.getOuterBBox().w>this.state.width){const e=t,s=e.childNodes[e.base];this.breakToWidth(s,this.state.width-e.rootWidth()),e.getStretchedSurd()}this.visitDefault(t,e)}visitMrootNode(t,e){this.visitMsqrtNode(t,e)}visitMsubNode(t,e){this.visitDefault(t,e);const s=t,i=s.getOffset()[0],r=s.scriptChild.getOuterBBox(),[n,o]=this.getBorderLR(t);this.addWidth(s.getLineBBox(e),i+n+r.rscale*r.w+s.font.params.scriptspace+o)}visitMsupNode(t,e){this.visitDefault(t,e);const s=t,i=s.getOffset()[0],r=s.scriptChild.getOuterBBox(),[n,o]=this.getBorderLR(t);this.addWidth(s.getLineBBox(e),i+n+r.rscale*r.w+s.font.params.scriptspace+o)}visitMsubsupNode(t,e){this.visitDefault(t,e);const s=t,i=s.subChild.getOuterBBox(),r=s.supChild.getOuterBBox(),n=s.getAdjustedIc(),o=Math.max(i.rscale*i.w,n+r.rscale*r.w)+s.font.params.scriptspace,[a,c]=this.getBorderLR(t);this.addWidth(t.getLineBBox(e),a+o+c)}visitMmultiscriptsNode(t,e){const s=t,i=s.scriptData;if(i.numPrescripts){const r=Math.max(i.psup.rscale*i.psup.w,i.psub.rscale*i.psub.w);this.addWidth(t.getLineBBox(e),r+s.font.params.scriptspace)}if(this.visitDefault(t,e),i.numScripts){const r=Math.max(i.sup.rscale*i.sup.w,i.sub.rscale*i.sub.w);this.addWidth(t.getLineBBox(e),r+s.font.params.scriptspace)}}visitMfencedNode(t,e){const s=t,i=t.getLineBBox(e),[r,n]=this.getBorderLR(t);0===e&&this.addWidth(i,i.L+r),this.visitNode(s.mrow,e),e===t.breakCount&&this.addWidth(i,i.R+n)}visitMactionNode(t,e){const s=t,i=t.getLineBBox(e),[r,n]=this.getBorderLR(t);0===e&&this.addWidth(i,i.L+r),this.visitNode(s.selected,e),e===t.breakCount&&this.addWidth(i,i.R+n)}}!function(){for(const t of Object.keys(Rr.postfix)){const e=Rr.postfix[t][3];e&&e.fence&&(e.linebreakstyle="after")}Rr.infix["\u2061"]=[...Rr.infix["\u2061"]],Rr.infix["\u2061"][3]={linebreak:"nobreak"}}();const Il="@mathjax/%%FONT%%-font";class Sl extends Yi{get forceInlineBreaks(){return!1}constructor(t={},e=null,s=null){const[i,r]=t.fontData instanceof _l?[t.fontData.constructor,t.fontData]:[t.fontData||s,null],[n,o]=Bi(t,i.OPTIONS);super(n),this.factory=this.options.wrapperFactory||new e,this.factory.jax=this,this.styleJson=this.options.styleJson||new Co,this.font=r||new i(o),this.font.setOptions({mathmlSpacing:this.options.mathmlSpacing}),this.unknownCache=new Map;const a=this.options.linebreaks.LinebreakVisitor||Ml;this.linebreaks=new a(this.factory)}setAdaptor(t){super.setAdaptor(t),"auto"===this.options.htmlHDW&&(this.options.htmlHDW=t.canMeasureNodes?"ignore":"force")}addExtension(t,e=""){return this.font.addExtension(t,e)}typeset(t,e){this.setDocument(e);const s=this.createNode();return this.toDOM(t,s,e),s}createNode(){const t=this.constructor.NAME;return this.html("mjx-container",{class:"MathJax",jax:t})}setScale(t,e){let s=this.getInitialScale()*this.options.scale;if("scale"===e.node.attributes.get("overflow")&&this.math.display){const t=e.getOuterBBox().w,i=this.math.metrics.containerWidth/this.pxPerEm;t>i&&t&&(s*=i/t)}1!==s&&this.adaptor.setStyle(t,"fontSize",ho(s))}getInitialScale(){return this.math.metrics.scale}toDOM(t,e,s=null){var i;this.setDocument(s),this.math=t,this.container=e,this.pxPerEm=t.metrics.ex/this.font.params.x_height,this.executeFilters(this.preFilters,t,s,e),this.nodeMap=new Map,t.root.attributes.getAllInherited().overflow=this.options.displayOverflow;const r=t.root.attributes.get("overflow");this.adaptor.setAttribute(e,"overflow",r);"linebreak"===r&&this.getLinebreakWidth();const n=this.options.linebreaks.inline&&!t.display;let o=!!t.root.getProperty("inlineMarked");!o||n&&this.forceInlineBreaks===t.root.getProperty("inlineForced")||(this.unmarkInlineBreaks(t.root),t.root.removeProperty("inlineMarked"),t.root.removeProperty("inlineForced"),o=!1),n&&!o&&(this.markInlineBreaks(null===(i=t.root.childNodes)||void 0===i?void 0:i[0]),t.root.setProperty("inlineMarked",!0),t.root.setProperty("inlineForced",this.forceInlineBreaks)),t.root.setTeXclass(null);const a=this.factory.wrap(t.root);this.setScale(e,a),this.processMath(a,e),this.nodeMap=null,this.executeFilters(this.postFilters,t,s,e)}getBBox(t,e){this.setDocument(e),this.math=t,t.root.setTeXclass(null),this.nodeMap=new Map;const s=this.factory.wrap(t.root).getOuterBBox();return this.nodeMap=null,s}getLinebreakWidth(){const t=this.math.metrics.containerWidth/this.pxPerEm,e=this.math.root.attributes.get("maxwidth")||this.options.linebreaks.width;this.containerWidth=lo(e,t,1,this.pxPerEm)}markInlineBreaks(t){if(!t)return;const e=this.forceInlineBreaks;let s=!1,i=!1,r="";for(const n of t.childNodes)if(r)i=this.markInlineBreak(i,e,r,t,n),r="",s=!1;else if(n.isEmbellished){if(n===t.childNodes[0])continue;const o=n.coreMO(),a=o.texClass,c=o.attributes.get("linebreak"),l=o.attributes.get("linebreakstyle");(a===ur.BIN||a===ur.REL||a===ur.ORD&&o.hasSpacingAttributes()||"auto"!==c)&&"nobreak"!==c&&("before"===l?s&&"auto"===c||(i=this.markInlineBreak(i,e,c,t,n,o)):r=c),s="newline"===c&&"after"===l}else if(n.isKind("mspace")){const r=n.attributes.get("linebreak");"nobreak"!==r&&n.canBreak&&(i=this.markInlineBreak(i,e,r,t,n)),s="newline"===r}else s=!1,n.isKind("mstyle")&&!n.attributes.get("style")&&!n.attributes.hasExplicit("mathbackground")||n.isKind("semantics")?(this.markInlineBreaks(n.childNodes[0]),n.getProperty("process-breaks")&&(n.setProperty("inline-breaks",!0),n.childNodes[0].setProperty("inline-breaks",!0),t.parent.setProperty("process-breaks","true"))):n.isKind("mrow")&&n.attributes.get("data-semantic-added")&&(this.markInlineBreaks(n),n.getProperty("process-breaks")&&(n.setProperty("inline-breaks",!0),t.parent.setProperty("process-breaks","true")))}markInlineBreak(t,e,s,i,r,n=null){return r.setProperty("breakable",!0),e&&"newline"!==s?(r.setProperty("forcebreak",!0),null==n||n.setProperty("forcebreak",!0)):(r.removeProperty("forcebreak"),null==n||n.removeProperty("forcebreak"),"newline"===s&&r.setProperty("newline",!0)),t||(i.setProperty("process-breaks",!0),i.parent.setProperty("process-breaks",!0),t=!0),t}unmarkInlineBreaks(t){if(t&&(t.removeProperty("forcebreak"),t.removeProperty("breakable"),t.getProperty("process-breaks"))){t.removeProperty("process-breaks");for(const e of t.childNodes)this.unmarkInlineBreaks(e)}}getMetrics(t){this.setDocument(t);const e=this.adaptor,s=this.getMetricMaps(t);for(const i of t.math){const t=e.parent(i.start.node);if(i.state()<rr.METRICS&&t){const e=s[i.display?1:0],{em:r,ex:n,containerWidth:o,scale:a,family:c}=e.get(t);i.setMetrics(r,n,o,a),this.options.mtextInheritFont&&(i.outputData.mtextFamily=c),this.options.merrorInheritFont&&(i.outputData.merrorFamily=c),i.state(rr.METRICS)}}}getMetricsFor(t,e){const s=this.options.mtextInheritFont||this.options.merrorInheritFont,i=this.getTestElement(t,e),r=Object.assign(Object.assign({},this.measureMetrics(i,s)),{display:e});return this.adaptor.remove(i),r}getMetricMaps(t){const e=this.adaptor,s=[new Map,new Map];for(const i of t.math){const t=e.parent(i.start.node);if(t&&i.state()<rr.METRICS){const e=s[i.display?1:0];e.has(t)||e.set(t,this.getTestElement(t,i.display))}}const i=this.options.mtextInheritFont||this.options.merrorInheritFont,r=[new Map,new Map];for(const t of r.keys())for(const e of s[t].keys())r[t].set(e,this.measureMetrics(s[t].get(e),i));for(const t of r.keys())for(const i of s[t].values())e.remove(i);return r}getTestElement(t,e){const s=this.adaptor;if(!this.testInline){this.testInline=this.html("mjx-test",{style:{display:"inline-block",width:"100%","font-style":"normal","font-weight":"normal","font-size":"100%","font-size-adjust":"none","text-indent":0,"text-transform":"none","letter-spacing":"normal","word-spacing":"normal",overflow:"hidden",height:"1px","margin-right":"-1px"}},[this.html("mjx-left-box",{style:{display:"inline-block",width:0,float:"left"}}),this.html("mjx-ex-box",{style:{position:"absolute",overflow:"hidden",width:"1px",height:"60ex"}}),this.html("mjx-right-box",{style:{display:"inline-block",width:0,float:"right"}})]),this.testDisplay=s.clone(this.testInline),s.setStyle(this.testDisplay,"display","table"),s.setStyle(this.testDisplay,"margin-right",""),s.setStyle(s.firstChild(this.testDisplay),"display","none");const t=s.lastChild(this.testDisplay);s.setStyle(t,"display","table-cell"),s.setStyle(t,"width","10000em"),s.setStyle(t,"float","")}return s.append(t,s.clone(e?this.testDisplay:this.testInline))}measureMetrics(t,e){const s=this.adaptor,i=e?s.fontFamily(t):"",r=s.fontSize(t),[n,o]=s.nodeSize(s.childNode(t,1)),a=n?o/60:r*this.options.exFactor;return{em:r,ex:a,containerWidth:n?"table"===s.getStyle(t,"display")?s.nodeSize(s.lastChild(t))[0]-1:s.nodeBBox(s.lastChild(t)).left-s.nodeBBox(s.firstChild(t)).left-2:1e6,scale:Math.max(this.options.minScale,this.options.matchFontHeight?a/this.font.params.x_height/r:1),family:i}}styleSheet(t){if(this.setDocument(t),this.styleJson.clear(),this.styleJson.addStyles(this.constructor.commonStyles),"getStyles"in t)for(const e of t.getStyles())this.styleJson.addStyles(e);this.addWrapperStyles(this.styleJson),this.addFontStyles(this.styleJson);return this.html("style",{id:"MJX-styles"},[this.text("\n"+this.styleJson.cssText+"\n")])}addFontStyles(t){t.addStyles(this.font.styles)}addWrapperStyles(t){for(const e of this.factory.getKinds())this.addClassStyles(this.factory.getNodeClass(e),t)}addClassStyles(t,e){t.addStyles(e,this)}insertStyles(t){}setDocument(t){t&&(this.document=t,this.adaptor.document=t.document)}html(t,e={},s=[],i){return this.adaptor.node(t,e,s,i)}text(t){return this.adaptor.text(t)}fixed(t,e=3){return Math.abs(t)<6e-4?"0":t.toFixed(e).replace(/\.?0+$/,"")}measureText(t,e,s=["",!1,!1]){const i=this.unknownText(t,e);if("-explicitFont"===e){const t=this.cssFontStyles(s);this.adaptor.setAttributes(i,{style:t})}return this.measureTextNodeWithCache(i,t,e,s)}measureTextNodeWithCache(t,e,s,i=["",!1,!1]){"-explicitFont"===s&&(s=[i[0],i[1]?"T":"F",i[2]?"T":"F",""].join("-")),this.unknownCache.has(s)||this.unknownCache.set(s,new Map);const r=this.unknownCache.get(s),n=r.get(e);if(n)return n;const o=this.measureTextNode(t);return r.set(e,o),o}cssFontStyles(t,e={}){const[s,i,r]=t;return e["font-family"]=this.font.getFamily(s),i&&(e["font-style"]="italic"),r&&(e["font-weight"]="bold"),e}getFontData(t){return t||(t=new Oo),[this.font.getFamily(t.get("font-family")),"italic"===t.get("font-style"),"bold"===t.get("font-weight")]}}Sl.NAME="Common",Sl.OPTIONS=Object.assign(Object.assign({},Yi.OPTIONS),{scale:1,minScale:.5,mtextInheritFont:!1,merrorInheritFont:!1,mtextFont:"",merrorFont:"serif",mathmlSpacing:!1,skipAttributes:{},exFactor:.5,displayAlign:"center",displayIndent:"0",displayOverflow:"overflow",linebreaks:{inline:!0,width:"100%",lineleading:.2,LinebreakVisitor:null},font:"",htmlHDW:"auto",wrapperFactory:null,fontData:null,fontPath:Il,styleJson:null}),Sl.commonStyles={'mjx-container[overflow="scroll"][display]':{overflow:"auto clip","min-width":"initial !important"},'mjx-container[overflow="truncate"][display]':{overflow:"hidden clip","min-width":"initial !important"},"mjx-container[display]":{display:"block","text-align":"center","justify-content":"center",margin:"calc(1em - 2px) 0",padding:"2px 0"},'mjx-container[display][width="full"]':{display:"flex"},'mjx-container[justify="left"]':{"text-align":"left","justify-content":"left"},'mjx-container[justify="right"]':{"text-align":"right","justify-content":"right"}};class Rl extends $n{constructor(){super(...arguments),this.jax=null}get Wrappers(){return this.node}}Rl.defaultNodes={};const Ol=2/18,Dl=5/18;function Pl(t,e,s){return e?t?Ol:Dl:t?s<Ol?0:Ol:s}const Bl={[uo(0)]:"0",[uo(2/18)]:"1",[uo(3/18)]:"2",[uo(4/18)]:"3",[uo(5/18)]:"4",[uo(6/18)]:"5"};class Fl extends Kn{static addStyles(t,e){t.addStyles(this.styles)}get jax(){return this.factory.jax}get adaptor(){return this.factory.jax.adaptor}get metrics(){return this.factory.jax.math.metrics}get containerWidth(){return this.jax.containerWidth}get linebreaks(){return this.jax.linebreaks}get linebreakOptions(){return this.jax.options.linebreaks}get fixesPWidth(){return!this.node.notParent&&!this.node.isToken}get breakCount(){if(this._breakCount<0){const t=this.node;this._breakCount=t.isEmbellished?this.coreMO().embellishedBreakCount:t.arity<0&&!t.linebreakContainer&&this.childNodes[0].isStack?this.childNodes[0].breakCount:0}return this._breakCount}breakTop(t,e){return this.node.linebreakContainer||!this.parent?t:this.parent.breakTop(t,this)}constructor(t,e,s=null){super(t,e),this.parent=null,this.dom=null,this.removedStyles=null,this.styles=null,this.styleData=null,this.variant="",this.bboxComputed=!1,this._breakCount=-1,this.lineBBox=[],this.stretch=Tl,this.font=null,this.parent=s,this.font=t.jax.font,this.bbox=mo.zero(),this.getStyles(),this.getStyleData(),this.getVariant(),this.getScale(),this.getSpace(),this.childNodes=e.childNodes.map((t=>{const s=this.wrap(t);return s.bbox.pwidth&&(e.notParent||e.isKind("math"))&&(this.bbox.pwidth=mo.fullWidth),s}))}wrap(t,e=null){const s=this.factory.wrap(t,e||this);return e&&e.childNodes.push(s),this.jax.nodeMap.set(t,s),s}getBBox(t=!0){if(this.bboxComputed)return this.bbox;const e=t?this.bbox:mo.zero();return this.computeBBox(e),this.bboxComputed=t,e}getOuterBBox(t=!0){var e;const s=this.getBBox(t);if(!this.styleData)return s;const i=this.styleData.padding,r=(null===(e=this.styleData.border)||void 0===e?void 0:e.width)||[0,0,0,0],n=s.copy();for(const[,t,e]of mo.boxSides)n[e]+=i[t]+r[t];return n}getUnbrokenHD(){const t=this.breakCount+1;let e=0,s=0;for(let i=0;i<t;i++){const{h:t,d:r}=this.getLineBBox(i);t>e&&(e=t),r>s&&(s=r)}return[e,s]}computeBBox(t,e=!1){t.empty();for(const e of this.childNodes)t.append(e.getOuterBBox());t.clean(),this.fixesPWidth&&this.setChildPWidths(e)&&this.computeBBox(t,!0)}getLineBBox(t){if(!this.lineBBox[t]){const e=this.breakCount;if(e){const s=this.embellishedBBox(t)||this.computeLineBBox(t);this.lineBBox[t]=s,0===t&&(!this.node.isKind("mo")&&this.node.isEmbellished?s.originalL=this.getBBox().L:s.L=this.getBBox().L),t===e&&(s.R=this.getBBox().R)}else{const e=this.getOuterBBox();this.lineBBox[t]=kl.from(e,this.linebreakOptions.lineleading)}}return this.lineBBox[t]}embellishedBBox(t){if(!this.node.isEmbellished||this.node.isKind("mo"))return null;const e=this.coreMO();return e.moLineBBox(t,e.embellishedBreakStyle,this.getOuterBBox())}computeLineBBox(t){return this.getChildLineBBox(this.childNodes[0],t)}getBreakNode(t){var e,s;if(!t.start)return[this,null];const[i,r]=t.start;if(this.node.isEmbellished)return[this,this.coreMO()];const n=(null===(s=null===(e=this.childNodes[0])||void 0===e?void 0:e.node)||void 0===s?void 0:s.isInferred)?this.childNodes[0].childNodes:this.childNodes;return this.node.isToken||!n[i]?[this,null]:n[i].getBreakNode(n[i].getLineBBox(r))}getChildLineBBox(t,e){const s=this.breakCount;let i=t.getLineBBox(e);return(this.styleData||this.bbox.L||this.bbox.R)&&(i=i.copy()),this.addMiddleBorders(i),0===e?(i.L+=this.bbox.L,this.addLeftBorders(i)):e===s&&(i.R+=this.bbox.R,this.addRightBorders(i)),i}addLeftBorders(t){var e;if(!this.styleData)return;const s=this.styleData.border,i=this.styleData.padding;t.w+=((null===(e=null==s?void 0:s.width)||void 0===e?void 0:e[3])||0)+((null==i?void 0:i[3])||0)}addMiddleBorders(t){var e,s;if(!this.styleData)return;const i=this.styleData.border,r=this.styleData.padding;t.h+=((null===(e=null==i?void 0:i.width)||void 0===e?void 0:e[0])||0)+((null==r?void 0:r[0])||0),t.d+=((null===(s=null==i?void 0:i.width)||void 0===s?void 0:s[2])||0)+((null==r?void 0:r[2])||0)}addRightBorders(t){var e;if(!this.styleData)return;const s=this.styleData.border,i=this.styleData.padding;t.w+=((null===(e=null==s?void 0:s.width)||void 0===e?void 0:e[1])||0)+((null==i?void 0:i[1])||0)}setChildPWidths(t,e=null,s=!0){if(t)return!1;s&&(this.bbox.pwidth="");let i=!1;for(const r of this.childNodes){const n=r.getBBox();n.pwidth&&r.setChildPWidths(t,null===e?n.w:e,s)&&(i=!0)}return i}breakToWidth(t){}invalidateBBox(t=!0){(this.bboxComputed||this._breakCount>=0)&&(this.bboxComputed=!1,this.lineBBox=[],this._breakCount=-1,this.parent&&t&&this.parent.invalidateBBox())}copySkewIC(t){var e,s,i;const r=this.childNodes[0];(null===(e=null==r?void 0:r.bbox)||void 0===e?void 0:e.sk)&&(t.sk=r.bbox.sk),(null===(s=null==r?void 0:r.bbox)||void 0===s?void 0:s.dx)&&(t.dx=r.bbox.dx);const n=this.childNodes[this.childNodes.length-1];(null===(i=null==n?void 0:n.bbox)||void 0===i?void 0:i.ic)&&(t.ic=n.bbox.ic,t.w+=t.ic)}getStyles(){const t=this.node.attributes.getExplicit("style");if(!t)return;const e=this.styles=new Oo(t);for(let t=0,s=Fl.removeStyles.length;t<s;t++){const s=Fl.removeStyles[t];e.get(s)&&(this.removedStyles||(this.removedStyles={}),this.removedStyles[s]=e.get(s),e.set(s,""))}}getStyleData(){if(!this.styles)return;const t=Array(4).fill(0),e=Array(4).fill(0),s=Array(4),i=Array(4);let r=!1,n=!1;for(const[o,a]of mo.boxSides){const c="border"+o,l=this.styles.get(c+"Width");l&&(n=!0,e[a]=Math.max(0,this.length2em(l,1)),s[a]=this.styles.get(c+"Style")||"solid",i[a]=this.styles.get(c+"Color"));const h=this.styles.get("padding"+o);h&&(r=!0,t[a]=Math.max(0,this.length2em(h,1)))}this.styleData=r||n?{padding:t,border:n?{width:e,style:s,color:i}:null}:null}getVariant(){if(!this.node.isToken)return;const t=this.node.attributes;let e=t.get("mathvariant");if(t.hasExplicit("mathvariant"))this.font.getVariant(e)||(console.warn(`Invalid variant: ${e}`),e="normal");else{const s=t.getList("fontfamily","fontweight","fontstyle");if(this.removedStyles){const t=this.removedStyles;t.fontFamily&&(s.family=t.fontFamily),t.fontWeight&&(s.weight=t.fontWeight),t.fontStyle&&(s.style=t.fontStyle)}s.fontfamily&&(s.family=s.fontfamily),s.fontweight&&(s.weight=s.fontweight),s.fontstyle&&(s.style=s.fontstyle),s.weight&&s.weight.match(/^\d+$/)&&(s.weight=parseInt(s.weight)>600?"bold":"normal"),s.family?e=this.explicitVariant(s.family,s.weight,s.style):(this.node.getProperty("variantForm")&&(e="-tex-variant"),e=(Fl.BOLDVARIANTS[s.weight]||{})[e]||e,e=(Fl.ITALICVARIANTS[s.style]||{})[e]||e)}this.variant=e}explicitVariant(t,e,s){let i=this.styles;return i||(i=this.styles=new Oo),i.set("fontFamily",t),e&&i.set("fontWeight",e),s&&i.set("fontStyle",s),"-explicitFont"}getScale(){let t=1;const e=this.parent,s=e?e.bbox.scale:1,i=this.node.attributes,r=Math.min(i.get("scriptlevel"),2);let n=i.get("fontsize"),o=this.node.isToken||this.node.isKind("mstyle")?i.get("mathsize"):i.getInherited("mathsize");if(0!==r&&(t=Math.pow(i.get("scriptsizemultiplier"),r)),this.removedStyles&&this.removedStyles.fontSize&&!n&&(n=this.removedStyles.fontSize),n&&!i.hasExplicit("mathsize")&&(o=n),"1"!==o&&(t*=this.length2em(o,1,1)),0!==r){const e=this.length2em(i.get("scriptminsize"),.4,1);t<e&&(t=e)}this.bbox.scale=t,this.bbox.rscale=t/s}getSpace(){const t=this.isTopEmbellished(),e=this.node.hasSpacingAttributes();this.jax.options.mathmlSpacing||e?t&&this.getMathMLSpacing():this.getTeXSpacing(t,e)}getMathMLSpacing(){const t=this.node.coreMO(),e=t.coreParent(),s=e.parent;if(!s||!s.isKind("mrow")||1===s.childNodes.length)return;const i=s.childIndex(e);if(null===i)return;const r=t.getProperty("noDictDef"),n=t.attributes,o=n.get("scriptlevel")>0;if(this.bbox.L=n.isSet("lspace")?Math.max(0,this.length2em(n.get("lspace"))):Pl(o,r,t.lspace),this.bbox.R=n.isSet("rspace")?Math.max(0,this.length2em(n.get("rspace"))):Pl(o,r,t.rspace),!i)return;const a=s.childNodes[i-1];if(!a.isEmbellished)return;const c=this.jax.nodeMap.get(a).getBBox();c.R&&(this.bbox.L=Math.max(0,this.bbox.L-c.R))}getTeXSpacing(t,e){if(!e){const t=this.node.texSpacing();t&&(this.bbox.L=this.length2em(t))}if(t||e){const t=this.node.coreMO().attributes;t.isSet("lspace")&&(this.bbox.L=Math.max(0,this.length2em(t.get("lspace")))),t.isSet("rspace")&&(this.bbox.R=Math.max(0,this.length2em(t.get("rspace"))))}}isTopEmbellished(){return this.node.isEmbellished&&!(this.node.parent&&this.node.parent.isEmbellished)}core(){return this.jax.nodeMap.get(this.node.core())}coreMO(){return this.jax.nodeMap.get(this.node.coreMO())}coreRScale(){let t=this.bbox.rscale,e=this.coreMO();for(;e!==this&&e;)t*=e.bbox.rscale,e=e.parent;return t}getRScale(){let t=1,e=this;for(;e;)t*=e.bbox.rscale,e=e.parent;return t}getText(){let t="";if(this.node.isToken)for(const e of this.node.childNodes)e instanceof Cr&&(t+=e.getText());return t}canStretch(t){if(this.stretch=Tl,this.node.isEmbellished){const e=this.core();e&&e.node!==this.node&&e.canStretch(t)&&(this.stretch=e.stretch)}return this.stretch.dir!==yl.None}getAlignShift(){let{indentalign:t,indentshift:e,indentalignfirst:s,indentshiftfirst:i}=this.node.attributes.getAllAttributes();return"indentalign"!==s&&(t=s),"indentshift"!==i&&(e=i),this.processIndent(t,e)}processIndent(t,e,s="",i="",r=this.metrics.containerWidth){if(!this.jax.math.display)return["left",0];s&&"auto"!==s||(s=this.jax.math.root.getProperty("inlineMarked")?"left":this.jax.options.displayAlign),i&&"auto"!==i||(i=this.jax.math.root.getProperty("inlineMarked")?"0":this.jax.options.displayIndent),"auto"===t&&(t=s),"auto"===e&&(e=i,"right"!==t||e.match(/^\s*0[a-z]*\s*$/)||(e=("-"+e.trim()).replace(/^--/,"")));return[t,this.length2em(e,r)]}getAlignX(t,e,s){return"right"===s?t-(e.w+e.R)*e.rscale:"left"===s?e.L*e.rscale:(t-e.w*e.rscale)/2}getAlignY(t,e,s,i,r){return"top"===r?t-s:"bottom"===r?i-e:"center"===r?(t-s-(e-i))/2:0}getWrapWidth(t){return this.childNodes[t].getBBox().w}getChildAlign(t){return"left"}percent(t){return ho(t)}em(t){return uo(t)}px(t,e=-no){return po(t,e,this.metrics.em)}length2em(t,e=1,s=null){null===s&&(s=this.bbox.scale);const i=this.font.params.rule_thickness,r=Fi(t,{medium:1,thin:2/3,thick:5/3},0);return r?r*i:lo(t,e,s,this.jax.pxPerEm)}unicodeChars(t,e=this.variant){let s=Pr(t);const i=this.font.getVariant(e);if(i&&i.chars){const t=i.chars;s=s.map((e=>{var s,i;return(null===(i=null===(s=t[e])||void 0===s?void 0:s[3])||void 0===i?void 0:i.smp)||e}))}return s}remapChars(t){return t}mmlText(t){return this.node.factory.create("text").setText(t)}mmlNode(t,e={},s=[]){return this.node.factory.create(t,e,s)}createMo(t){const e=this.node.factory,s=e.create("text").setText(t),i=e.create("mo",{stretchy:!0},[s]);i.inheritAttributesFrom(this.node),i.parent=this.node.parent;const r=this.wrap(i);return r.parent=this,r}getVariantChar(t,e){const s=this.font.getChar(t,e)||[0,0,0,{unknown:!0}];return 3===s.length&&(s[3]={}),s}html(t,e={},s=[]){return this.jax.html(t,e,s)}}Fl.kind="unknown",Fl.styles={},Fl.removeStyles=["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","font"],Fl.skipAttributes={fontfamily:!0,fontsize:!0,fontweight:!0,fontstyle:!0,color:!0,background:!0,class:!0,href:!0,style:!0,xmlns:!0},Fl.BOLDVARIANTS={bold:{normal:"bold",italic:"bold-italic",fraktur:"bold-fraktur",script:"bold-script","sans-serif":"bold-sans-serif","sans-serif-italic":"sans-serif-bold-italic"},normal:{bold:"normal","bold-italic":"italic","bold-fraktur":"fraktur","bold-script":"script","bold-sans-serif":"sans-serif","sans-serif-bold-italic":"sans-serif-italic"}},Fl.ITALICVARIANTS={italic:{normal:"italic",bold:"bold-italic","sans-serif":"sans-serif-italic","bold-sans-serif":"sans-serif-bold-italic"},normal:{italic:"normal","bold-italic":"bold","sans-serif-italic":"sans-serif","sans-serif-bold-italic":"bold-sans-serif"}};const jl={"70.7%":"s","70%":"s","50%":"ss","60%":"Tn","85%":"sm","120%":"lg","144%":"Lg","173%":"LG","207%":"hg","249%":"HG"};class Ul extends Fl{toCHTML(t){this.toEmbellishedCHTML(t)||this.addChildren(this.standardChtmlNodes(t))}toEmbellishedCHTML(t){if(t.length<=1||!this.node.isEmbellished)return!1;const e=this.adaptor;t.forEach((t=>e.append(t,this.html("mjx-linestrut"))));const s=this.coreMO().embellishedBreakStyle,i=[];for(const[r,n]of[[t[0],"before"],[t[1],"after"]])s!==n?(this.toCHTML([r]),i.push(this.dom[0]),"after"===n&&e.removeAttribute(this.dom[0],"space")):i.push(this.createChtmlNodes([r])[0]);return this.dom=i,!0}addChildren(t){for(const e of this.childNodes)e.toCHTML(t)}standardChtmlNodes(t){this.markUsed();const e=this.createChtmlNodes(t);return this.handleStyles(),this.handleScale(),this.handleBorders(),this.handleColor(),this.handleSpace(),this.handleAttributes(),this.handlePWidth(),e}markUsed(){this.jax.wrapperUsage.add(this.kind)}createChtmlNodes(t){this.dom=t.map((t=>this.html("mjx-"+this.node.kind))),t=this.handleHref(t);for(const e of t.keys())this.adaptor.append(t[e],this.dom[e]);return this.dom}handleHref(t){const e=this.node.attributes.get("href");return e?t.map((t=>this.adaptor.append(t,this.html("a",{href:e})))):t}handleStyles(){if(!this.styles)return;const t=this.styles.cssText;if(t){const e=this.adaptor;this.dom.forEach((s=>e.setAttribute(s,"style",t)));const s=this.styles.get("font-family");s&&this.dom.forEach((t=>e.setStyle(t,"font-family",this.font.cssFamilyPrefix+", "+s)))}}handleScale(){this.dom.forEach((t=>this.setScale(t,this.bbox.rscale)))}setScale(t,e){const s=Math.abs(e-1)<.001?1:e;if(t&&1!==s){const e=this.percent(s);jl[e]?this.adaptor.setAttribute(t,"size",jl[e]):this.adaptor.setStyle(t,"fontSize",e)}return t}handleSpace(){const t=this.adaptor,e=!!this.node.getProperty("breakable")&&!this.node.getProperty("newline"),s=this.dom.length-1;for(const i of[[this.getLineBBox(0).L,"space","marginLeft",0],[this.getLineBBox(s).R,"rspace","marginRight",s]]){const[s,r,n,o]=i,a=this.em(s);if(e&&"space"===r){const e=t.node("mjx-break",Bl[a]?{size:Bl[a]}:{style:`letter-spacing: ${this.em(s-1)}`},[t.text(" ")]);t.insert(e,this.dom[o])}else s&&(Bl[a]?t.setAttribute(this.dom[o],r,Bl[a]):t.setStyle(this.dom[o],n,a))}}handleBorders(){var t,e;const s=null===(t=this.styleData)||void 0===t?void 0:t.border,i=null===(e=this.styleData)||void 0===e?void 0:e.padding,r=this.dom.length-1;if(!s||!r)return;const n=this.adaptor;for(const t of this.dom.keys()){const e=this.dom[t];t&&(s.width[3]&&n.setStyle(e,"border-left"," none"),i[3]&&n.setStyle(e,"padding-left","0")),t!==r&&(s.width[1]&&n.setStyle(e,"border-right","none"),i[1]&&n.setStyle(e,"padding-right","0"))}}handleColor(){var t;const e=this.adaptor,s=this.node.attributes,i=s.getExplicit("mathcolor")||s.getExplicit("color"),r=s.getExplicit("mathbackground")||s.getExplicit("background")||(null===(t=this.styles)||void 0===t?void 0:t.get("background-color"));i&&this.dom.forEach((t=>e.setStyle(t,"color",i))),r&&this.dom.forEach((t=>e.setStyle(t,"backgroundColor",r)))}handleAttributes(){const t=this.adaptor,e=this.node.attributes,s=e.getAllDefaults(),i=Ul.skipAttributes;for(const r of e.getExplicitNames())if(!1===i[r]||!(r in s)&&!i[r]&&!t.hasAttribute(this.dom[0],r)){const s=e.getExplicit(r);this.dom.forEach((e=>t.setAttribute(e,r,s)))}if(e.get("class")){const s=e.get("class").trim().split(/ +/);for(const e of s)this.dom.forEach((s=>t.addClass(s,e)))}this.node.getProperty("inline-breaks")&&this.dom.forEach((e=>t.setAttribute(e,"inline-breaks","true")))}handlePWidth(){if(this.bbox.pwidth){const t=this.adaptor;this.bbox.pwidth===mo.fullWidth?this.dom.forEach((e=>t.setAttribute(e,"width","full"))):this.dom.forEach((e=>t.setStyle(e,"width",this.bbox.pwidth)))}}setIndent(t,e,s){const i=this.adaptor;if("center"===e||"left"===e){const e=this.getBBox().L;i.setStyle(t,"margin-left",this.em(s+e))}if("center"===e||"right"===e){const e=this.getBBox().R;i.setStyle(t,"margin-right",this.em(-s+e))}}drawBBox(){const{w:t,h:e,d:s,R:i}=this.getOuterBBox(),r=this.html("mjx-box",{style:{opacity:.25,"margin-left":this.em(-t-i)}},[this.html("mjx-box",{style:{height:this.em(e),width:this.em(t),"background-color":"red"}}),this.html("mjx-box",{style:{height:this.em(s),width:this.em(t),"margin-left":this.em(-t),"vertical-align":this.em(-s),"background-color":"green"}})]),n=this.dom[0]||this.parent.dom[0],o=this.adaptor.getAttribute(n,"size");o&&this.adaptor.setAttribute(r,"size",o);const a=this.adaptor.getStyle(n,"fontSize");a&&this.adaptor.setStyle(r,"fontSize",a),this.adaptor.append(this.adaptor.parent(n),r),this.adaptor.setStyle(n,"backgroundColor","#FFEE00")}html(t,e={},s=[]){return this.jax.html(t,e,s)}text(t){return this.jax.text(t)}char(t){return this.font.charSelector(t).substring(1)}}function ql(t){return class extends t{getWrapWidth(t){return this.parent?this.getBBox().w:this.metrics.containerWidth/this.jax.pxPerEm}computeBBox(t,e=!1){super.computeBBox(t,e);const s=this.node.attributes;if(!this.parent&&this.jax.math.display&&"linebreak"===s.get("overflow")){const e=this.containerWidth;t.w>e&&this.childNodes[0].breakToWidth(e),t.updateFrom(this.childNodes[0].getBBox())}}}}Ul.kind="unknown",Ul.autoStyle=!0;const Hl=function(){var t;const e=ql(Ul);return(t=class extends e{handleDisplay(t){const e=this.adaptor,[s,i]=this.getAlignShift();if("center"!==s&&e.setAttribute(t,"justify",s),this.bbox.pwidth===mo.fullWidth){if(e.setAttribute(t,"width","full"),this.jax.table){let{L:r,w:n,R:o}=this.jax.table.getOuterBBox();"right"===s?o=Math.max(o||-i,-i):"left"===s?r=Math.max(r||i,i):"center"===s&&(n+=2*Math.abs(i));const a=this.em(Math.max(0,r+n+o));e.setStyle(t,"min-width",a),e.setStyle(this.jax.table.dom[0],"min-width",a)}}else this.setIndent(this.dom[0],s,i)}handleInline(t){const e=this.adaptor,s=e.getStyle(this.dom[0],"margin-right");s&&(e.setStyle(this.dom[0],"margin-right",""),e.setStyle(t,"margin-right",s),e.setStyle(t,"width","0"))}toCHTML(t){super.toCHTML(t);const e=this.adaptor;"block"===this.node.attributes.get("display")?(e.setAttribute(this.dom[0],"display","true"),e.setAttribute(t[0],"display","true"),this.handleDisplay(t[0])):this.handleInline(t[0]),e.addClass(this.dom[0],`${this.font.cssFontPrefix}-N`)}setChildPWidths(t,e=null,s=!0){return!!this.parent&&super.setChildPWidths(t,e,s)}handleAttributes(){super.handleAttributes();const t=this.adaptor;this.node.getProperty("process-breaks")&&this.dom.forEach((e=>t.setAttribute(e,"breakable","true")))}}).kind=wr.prototype.kind,t.styles={"mjx-math":{"line-height":0,"text-align":"left","text-indent":0,"font-style":"normal","font-weight":"normal","font-size":"100%","font-size-adjust":"none","letter-spacing":"normal","word-wrap":"normal","word-spacing":"normal",direction:"ltr",padding:"1px 0"},'mjx-container[jax="CHTML"][display="true"] mjx-math':{padding:0},"mjx-math[breakable]":{display:"inline"},'mjx-container[jax="CHTML"] mjx-break':{"white-space":"normal","line-height":"0","clip-path":"rect(0 0 0 0)","font-family":"MJX-BRK !important"},'mjx-break[size="0"]':{"letter-spacing":"-0.999em"},'mjx-break[size="1"]':{"letter-spacing":"-0.889em"},'mjx-break[size="2"]':{"letter-spacing":"-0.833em"},'mjx-break[size="3"]':{"letter-spacing":"-0.778em"},'mjx-break[size="4"]':{"letter-spacing":"-0.722em"},'mjx-break[size="5"]':{"letter-spacing":"-0.667em"}},t}();function Wl(t){return class extends t{computeBBox(t,e=!1){super.computeBBox(t),this.copySkewIC(t)}}}const zl=function(){var t;const e=Wl(Ul);return(t=class extends e{}).kind=_r.prototype.kind,t}();function Xl(t){return class extends t{get breakCount(){return this.breakStyle?1:0}get embellishedBreakCount(){return this.embellishedBreakStyle?1:0}get embellishedBreakStyle(){return this.breakStyle||this.getBreakStyle()}protoBBox(t){const e=this.stretch.dir!==yl.None;e&&null===this.size&&this.getStretchedVariant([0]),e&&this.size<0||(super.computeBBox(t),0!==t.w||!this.node.attributes.hasExplicit("fence")||""!==this.node.getText()||this.node.texClass!==ur.OPEN&&this.node.texClass!==ur.CLOSE||this.jax.options.mathmlSpacing||(t.R=this.font.params.nulldelimiterspace),this.copySkewIC(t))}getAccentOffset(){const t=mo.empty();return this.protoBBox(t),-t.w/2}getCenterOffset(t=null){return t||(t=mo.empty(),super.computeBBox(t)),(t.h+t.d)/2+this.font.params.axis_height-t.h}getStretchedVariant(t,e=!1){if(this.stretch.dir!==yl.None){let s=this.getWH(t);const i=this.getSize("minsize",0),r=this.getSize("maxsize",1/0),n=this.node.getProperty("mathaccent");s=Math.max(i,Math.min(r,s));const o=this.font.params.delimiterfactor/1e3,a=this.font.params.delimitershortfall,c=i||e?s:n?Math.min(s/o,s+a):Math.max(s*o,s-a),l=this.stretch,h=l.c||this.getText().codePointAt(0);let d=0;if(l.sizes)for(const t of l.sizes){if(t>=c)return n&&d&&d--,void this.setDelimSize(h,d);d++}l.stretch?(this.size=-1,this.invalidateBBox(),this.getStretchBBox(t,this.checkExtendedHeight(s,l),l)):this.setDelimSize(h,d-1)}}setDelimSize(t,e){const s=this.stretch;this.variant=this.font.getSizeVariant(t,e),this.size=e;const i=s.schar&&s.schar[Math.min(e,s.schar.length-1)]||t;this.stretch=Object.assign(Object.assign({},s),{c:i}),this.childNodes[0].invalidateBBox()}getSize(t,e){const s=this.node.attributes;return s.isSet(t)&&(e=this.length2em(s.get(t),1,1)),e}getWH(t){if(0===t.length)return 0;if(1===t.length)return t[0];const[e,s]=t,i=this.font.params.axis_height;return this.node.attributes.get("symmetric")?2*Math.max(e-i,s+i):e+s}getStretchBBox(t,e,s){Object.hasOwn(s,"min")&&s.min>e&&(e=s.min);let[i,r,n]=s.HDW;if(this.stretch.dir===yl.Vertical)[i,r]=this.getBaseline(t,e,s);else if(n=e,this.stretch.hd&&!this.jax.options.mathmlSpacing){const t=this.font.params.extender_factor;i=i*(1-t)+this.stretch.hd[0]*t,r=r*(1-t)+this.stretch.hd[1]*t}this.bbox.h=i,this.bbox.d=r,this.bbox.w=n}getBaseline(t,e,s){const i=2===t.length&&t[0]+t[1]===e,r=this.node.attributes.get("symmetric"),[n,o]=i?t:[e,0];let[a,c]=[n+o,0];if(r){const t=this.font.params.axis_height;i&&(a=2*Math.max(n-t,o+t)),c=a/2-t}else if(i)c=o;else{const[t,e]=s.HDW||[.75,.25];c=e*(a/(t+e))}return[a-c,c]}checkExtendedHeight(t,e){if(e.fullExt){const[s,i]=e.fullExt;t=i+Math.ceil(Math.max(0,t-i)/s)*s}return t}setBreakStyle(t=""){if(this.breakStyle=this.node.parent.isEmbellished&&!t?"":this.getBreakStyle(t),this.breakCount&&this.multChar){const t=this.parent.node.childIndex(this.node),e=this.parent.node.childNodes[t+1];e&&e.setTeXclass(this.multChar.node)}}getBreakStyle(t=""){const e=this.node.attributes;let s=t||("newline"===e.get("linebreak")||this.node.getProperty("forcebreak")?e.get("linebreakstyle"):"");return"infixlinebreakstyle"===s&&(s=e.get(s)),s}getMultChar(){const t=this.node.attributes.get("linebreakmultchar");t&&"\u2062"===this.getText()&&"\u2062"!==t&&(this.multChar=this.createMo(t))}constructor(t,e,s=null){super(t,e,s),this.size=null,this.isAccent=this.node.isAccent,this.getMultChar(),this.setBreakStyle()}computeBBox(t,e=!1){if(this.protoBBox(t),this.node.attributes.get("symmetric")&&this.stretch.dir!==yl.Horizontal){const e=this.getCenterOffset(t);t.h+=e,t.d-=e}this.node.getProperty("mathaccent")&&(this.stretch.dir===yl.None||this.size>=0)&&(t.w=0)}computeLineBBox(t){return this.moLineBBox(t,this.breakStyle)}moLineBBox(t,e,s=null){const i=this.node.attributes.get("lineleading"),r=this.length2em(i,this.linebreakOptions.lineleading);if(0===t&&"before"===e){const t=kl.from(mo.zero(),r);return t.originalL=this.bbox.L,this.bbox.L=0,t}let n=kl.from(s||this.getOuterBBox(),r);return 1===t&&("after"===e?(n.w=n.h=n.d=0,n.isFirst=!0,this.bbox.R=0):"duplicate"===e?n.L=0:this.multChar&&(n=kl.from(this.multChar.getOuterBBox(),r)),n.getIndentData(this.node)),n}canStretch(t){if(this.stretch.dir!==yl.None)return this.stretch.dir===t;if(!this.node.attributes.get("stretchy"))return!1;const e=this.getText();if(1!==Array.from(e).length)return!1;const s=this.font.getDelimiter(e.codePointAt(0));return this.stretch=s&&s.dir===t?s:Tl,this.stretch.dir!==yl.None}getVariant(){this.node.attributes.get("largeop")?this.variant=this.node.attributes.get("displaystyle")?"-largeop":"-smallop":this.node.attributes.hasExplicit("mathvariant")||!1!==this.node.getProperty("pseudoscript")?super.getVariant():this.variant="-tex-variant"}remapChars(t){const e=this.node.getProperty("primes");if(e)return Pr(e);if(1===t.length){const e=this.node.coreParent().parent,s=this.isAccent&&!e.isKind("mrow")?"accent":"mo",i=this.font.getRemappedChar(s,t[0]);i&&(t=this.unicodeChars(i,this.variant))}return t}}}class Vl{constructor(){this.used=new Set,this.needsUpdate=[]}add(t){const e=JSON.stringify(t);this.used.has(e)||this.needsUpdate.push(t),this.used.add(e)}has(t){return this.used.has(JSON.stringify(t))}clear(){this.used.clear(),this.needsUpdate=[]}update(){const t=this.needsUpdate;return this.needsUpdate=[],t}}class Gl extends _l{constructor(){super(...arguments),this.charUsage=new Vl,this.delimUsage=new Vl,this.fontUsage={},this.newFonts=0}static charOptions(t,e){return super.charOptions(t,e)}static addFontURLs(t,e,s){for(const i of Object.keys(e)){const r=Object.assign({},e[i]);r.src=r.src.replace(/%%URL%%/,s),t[i]=r}}static addDynamicFontCss(t,e,s){const i={};for(const s of e){const e=s.slice(4);i[`@font-face /* ${e} */`]={"font-family":s,src:`url("%%URL%%/${s.toLowerCase()}.woff2") format("woff2")`},t[`.${e}`]={"font-family":`${this.defaultCssFamilyPrefix}, ${s}`}}this.addFontURLs(t,i,s)}static addExtension(t,e=""){super.addExtension(t,e),t.fonts&&this.addDynamicFontCss(this.defaultStyles,t.fonts,t.fontURL)}addExtension(t,e=""){if(super.addExtension(t,e),!t.fonts||!this.options.adaptiveCSS)return[];const s={},i=new Co;return this.constructor.addDynamicFontCss(s,t.fonts,t.fontURL),i.addStyles(s),i.getStyleRules()}adaptiveCSS(t){this.options.adaptiveCSS=t}clearCache(){this.options.adaptiveCSS&&(this.charUsage.clear(),this.delimUsage.clear())}createVariant(t,e=null,s=null){super.createVariant(t,e,s),this.variant[t].letter=this.constructor.defaultVariantLetters[t]}defineChars(t,e){super.defineChars(t,e);const s=this.variant[t].letter,i=this.constructor;for(const t of Object.keys(e)){const r=parseInt(t);if(!Array.isArray(e[r]))continue;const n=i.charOptions(e,r);void 0===n.f&&(n.f=s);for(const[t,e]of i.combiningChars)if(r>=t&&r<=e){n.cmb=!0;break}}}addDynamicFontCss(t,e=this.options.fontURL){this.constructor.addDynamicFontCss(this.fontUsage,t,e)}updateDynamicStyles(){const t=this.fontUsage;return this.fontUsage={},this.options.adaptiveCSS||this.updateStyles(t),t}get styles(){const t=this.constructor,e=Object.assign(Object.assign({},t.defaultStyles),this.fontUsage);return this.fontUsage={},t.addFontURLs(e,t.defaultFonts,this.options.fontURL),this.options.adaptiveCSS?this.updateStyles(e):this.allStyles(e),e}updateStyles(t){for(const e of this.delimUsage.update())this.addDelimiterStyles(t,e,this.getDelimiter(e));for(const[e,s]of this.charUsage.update()){const i=this.variant[e];this.addCharStyles(t,i.letter,s,i.chars[s])}return t}allStyles(t){var e;for(const e of Object.keys(this.delimiters)){const s=parseInt(e);this.addDelimiterStyles(t,s,this.delimiters[s])}for(const s of Object.keys(this.variant)){const i=this.variant[s],r=i.letter;for(const s of Object.keys(i.chars)){const n=parseInt(s),o=i.chars[n];!(null===(e=null==o?void 0:o[3])||void 0===e?void 0:e.smp)&&Array.isArray(o)&&(o.length<4&&(o[3]={}),this.addCharStyles(t,r,n,o))}}}addDelimiterStyles(t,e,s){if(!s.stretch)return;const i=s.c&&s.c!==e?this.charSelector(s.c):this.charSelector(e);s.dir===yl.Vertical?this.addDelimiterVStyles(t,e,i,s):this.addDelimiterHStyles(t,e,i,s)}addDelimiterVStyles(t,e,s,i){const r=i.HDW,[n,o,a,c]=i.stretch,[l,h,d,u]=this.getStretchVariants(e),p=this.addDelimiterVPart(t,s,"beg",n,l,r);this.addDelimiterVPart(t,s,"ext",o,h,r);const m=this.addDelimiterVPart(t,s,"end",a,d,r);if(c){const e=this.addDelimiterVPart(t,s,"mid",c,u,r),i=this.em(e/2-.03);t[`mjx-stretchy-v${s} > mjx-ext:first-of-type`]={height:"50%","border-width":`${this.em1(p-.03)} 0 ${i}`},t[`mjx-stretchy-v${s} > mjx-ext:last-of-type`]={height:"50%","border-width":`${i} 0 ${this.em1(m-.03)}`}}else(m||p)&&(t[`mjx-stretchy-v${s} > mjx-ext`]["border-width"]=`${this.em1(p-.03)} 0 ${this.em1(m-.03)}`)}addDelimiterVPart(t,e,s,i,r,n){if(!i)return 0;const[o,a,c]=this.getChar(r,i),l={width:this.em0(c)};if("ext"!==s){const t=c>n[2]?this.em((n[2]-c)/2):"auto",e="beg"===s?o:"end"===s?-a:(o-a)/2;l.margin=`${this.em(e)} ${t} ${this.em(-e)}`}else l["line-height"]=this.em0(o+a+.005),t[`mjx-stretchy-v${e} > mjx-${s} > mjx-spacer`]={"margin-top":this.em(-a)};return t[`mjx-stretchy-v${e} > mjx-${s}`]=l,o+a}addDelimiterHStyles(t,e,s,i){const r=[...i.HDW],[n,o,a,c]=i.stretch,[l,h,d,u]=this.getStretchVariants(e);if(i.hd&&!this.options.mathmlSpacing){const t=this.params.extender_factor;r[0]=r[0]*(1-t)+i.hd[0]*t,r[1]=r[1]*(1-t)+i.hd[1]*t}const p=this.addDelimiterHPart(t,s,"beg",n,l,r);this.addDelimiterHPart(t,s,"ext",o,h,r);const m=this.addDelimiterHPart(t,s,"end",a,d,r);if(c){const e=this.addDelimiterHPart(t,s,"mid",c,u,r),i=this.em0(e/2-.03);t[`mjx-stretchy-h${s} > mjx-ext:first-of-type`]={width:"50%","border-width":`0 ${i} 0 ${this.em0(p-.03)}`},t[`mjx-stretchy-h${s} > mjx-ext:last-of-type`]={width:"50%","border-width":`0 ${this.em0(m-.03)} 0 ${i}`}}else(p||m)&&(t[`mjx-stretchy-h${s} > mjx-ext`]["border-width"]=`0 ${this.em0(m-.06)} 0 ${this.em0(p-.06)}`);i.ext&&(t[`mjx-stretchy-h${s} > mjx-ext > mjx-spacer`]["letter-spacing"]=this.em(-i.ext))}addDelimiterHPart(t,e,s,i,r,n){if(!i)return 0;let[,,o,a]=this.getChar(r,i);const c={padding:this.padding(n,o-n[2])};return"ext"===s?(!o&&a.dx&&(o=2*a.dx-.06),t[`mjx-stretchy-h${e} > mjx-${s} > mjx-spacer`]={"margin-left":this.em(-o/2)},a.cmb&&(t[`mjx-stretchy-h${e} > mjx-${s} > mjx-c`]={width:this.em(o),"text-align":"right"})):("mid"===s?c.margin=`0 ${this.em(-o/2)}`:c["end"==s?"margin-left":"margin-right"]=this.em(-o),this.checkCombiningChar(a,c)),t[`mjx-stretchy-h${e} > mjx-${s}`]=c,o}addCharStyles(t,e,s,i){const r=i[3],n=void 0!==r.f?r.f:e,o=r.ff||(n?`${this.cssFontPrefix}-${n}`:""),a="mjx-c"+this.charSelector(s)+(o?"."+o:""),c=r.oc||r.ic||0;t[a]={padding:this.padding(i,c)},r.oc&&(t[a+"[noic]"]={"padding-right":this.em(i[2])}),this.checkCombiningChar(r,t[a])}checkCombiningChar(t,e){if(!t.cmb)return;const s=e.padding.split(/ /);e.width=s[1],s[1]="0",s[3]||s.pop(),e.padding=s.join(" ")}em(t){return uo(t)}em0(t){return uo(Math.max(0,t))}em1(t){const e=uo(Math.max(0,t));return"0"===e?".1px":e}padding([t,e,s],i=0){return[t,s+i,e,0].map(this.em0).join(" ")}charSelector(t){return".mjx-c"+t.toString(16).toUpperCase()}}function Jl(t,e){for(const s of Object.keys(e)){const i=parseInt(s),r=e[i];r.c&&(r.c=r.c.replace(/\\[0-9A-F]+/gi,(t=>String.fromCodePoint(parseInt(t.substring(1),16))))),Object.assign(_l.charOptions(t,i),r)}return t}Gl.OPTIONS=Object.assign(Object.assign({},_l.OPTIONS),{dynamicPrefix:"./chtml/dynamic",fontURL:"./chtml/woff2"}),Gl.JAX="CHTML",Gl.defaultVariantLetters={},Gl.defaultStyles={},Gl.defaultFonts={},Gl.combiningChars=[[768,879],[8400,8447]];const Kl=function(){var t;const e=Xl(Ul);return t=class extends e{toCHTML(t){const e=this.adaptor,s=this.node.attributes,i=s.get("symmetric")&&this.stretch.dir!==yl.Horizontal,r=this.stretch.dir!==yl.None;r&&null===this.size&&this.getStretchedVariant([]),t.length>1&&t.forEach((t=>e.append(t,this.html("mjx-linestrut"))));const n=this.standardChtmlNodes(t);if(n.length>1&&"duplicate"!==this.breakStyle){const t="after"===this.breakStyle?1:0;e.remove(n[t]),n[t]=null}if(r&&this.size<0)this.stretchHTML(n);else{if(i||s.get("largeop")){const t=this.em(this.getCenterOffset());"0"!==t&&n.forEach((s=>s&&e.setStyle(s,"verticalAlign",t)))}this.node.getProperty("mathaccent")&&n.forEach((t=>{e.setStyle(t,"width","0"),e.setStyle(t,"margin-left",this.em(this.getAccentOffset()))})),n[0]&&this.addChildren([n[0]]),n[1]&&(this.multChar||this).addChildren([n[1]])}}stretchHTML(t){const e=this.getText().codePointAt(0);this.font.delimUsage.add(e),this.childNodes[0].markUsed();const s=this.stretch,i=s.stretch,r=this.font.getStretchVariants(e),n=[],o=[];for(let t=0;t<i.length;t++)i[t]&&(o[t]=this.font.getChar(r[t],i[t]));const{h:a,d:c,w:l}=this.bbox,h={};s.dir===yl.Vertical?(this.createAssembly(o,i,r,n,a+c,.05,"\n"),n.push(this.html("mjx-mark")),h.height=this.em(a+c),h.verticalAlign=this.em(-c)):(this.createAssembly(o,i,r,n,l,s.ext||0),h.width=this.em(l));const d={class:this.char(s.c||e),style:h},u=this.html("mjx-stretchy-"+s.dir,d,n),p=this.adaptor;t[0]&&p.append(t[0],u),t[1]&&p.append(t[1],t[0]?p.clone(u):u)}createAssembly(t,e,s,i,r,n,o=""){t=[...t,null,null,null].slice(0,4);let[a,c,l,h]=t.map((t=>t?o?t[0]+t[1]:t[2]:0));c=Math.max(0,c-n);const[d,u]=t[3]?[(r-h)/2-a,(r-h)/2-l]:[r-a-l,0];this.createPart("mjx-beg",t[0],e[0],s[0],i),this.createPart("mjx-ext",t[1],e[1],s[1],i,d,c,o),t[3]&&(this.createPart("mjx-mid",t[3],e[3],s[3],i),this.createPart("mjx-ext",t[1],e[1],s[1],i,u,c,o)),this.createPart("mjx-end",t[2],e[2],s[2],i)}createPart(t,e,s,i,r,n=0,o=0,a=""){if(s){const c=e[3],l=c.f||("normal"===i?"":this.font.getVariant(i).letter),h=c.ff||(l?`${this.font.cssFontPrefix}-${l}`:""),d=c.c||String.fromCodePoint(s);let u=[];if("mjx-ext"===t&&(o||c.dx)){o||(o=Math.max(.06,2*c.dx-.06));const t=Math.min(Math.ceil(n/o)+1,500);if(c.cmb){u.push(this.html("mjx-spacer"));for(let e=0;e<t;e++)u.push(this.html("mjx-c",{},[this.text(d)]))}else u=[this.html("mjx-spacer",{},[this.text(Array(t).fill(d).join(a))])]}else u=[this.text(d)];r.push(this.html(t,h?{class:h}:{},u))}}},t.kind=Hr.prototype.kind,t.styles={"mjx-stretchy-h":{display:"inline-block"},"mjx-stretchy-h > *":{display:"inline-block",width:0,"text-align":"right"},"mjx-stretchy-h > mjx-ext":{"clip-path":"padding-box xywh(0 -1em 100% calc(100% + 2em))",width:"100%",border:"0px solid transparent","box-sizing":"border-box","text-align":"left"},"mjx-stretchy-v":{display:"inline-block","text-align":"center"},"mjx-stretchy-v > *":{display:"block",height:0,margin:"0 auto"},"mjx-stretchy-v > mjx-ext > mjx-spacer":{display:"block"},"mjx-stretchy-v > mjx-ext":{"clip-path":"padding-box xywh(-1em 0 calc(100% + 2em) 100%)",height:"100%",border:"0.1px solid transparent","box-sizing":"border-box","white-space":"wrap"},"mjx-mark":{display:"inline-block",height:0}},t}();function $l(t){return class extends t{remapChars(t){if(t.length){const e=this.font.getRemappedChar("mn",t[0]);if(e){const s=this.unicodeChars(e,this.variant);1===s.length?t[0]=s[0]:t=s.concat(t.slice(1))}}return t}}}const Yl=function(){var t;const e=$l(Ul);return(t=class extends e{}).kind=kr.prototype.kind,t}();function Ql(t){return class extends t{createText(t){const e=this.wrap(this.mmlText(t));return e.parent=this,e}constructor(t,e,s=null){super(t,e,s);const i=this.node.attributes,r=i.getList("lquote","rquote");"monospace"!==this.variant&&(i.isSet("lquote")||'"'!==r.lquote||(r.lquote="\u201c"),i.isSet("rquote")||'"'!==r.rquote||(r.rquote="\u201d")),this.childNodes.unshift(this.createText(r.lquote)),this.childNodes.push(this.createText(r.rquote))}}}const Zl=function(){var t;const e=Ql(Ul);return(t=class extends e{}).kind=Xr.prototype.kind,t}();function th(t){var e;return e=class extends t{constructor(){super(...arguments),this.breakPoints=[]}textWidth(t){let e=this.textNode;if(!e){const t=this.node.factory.create("text");t.parent=this.node,e=this.textNode=this.factory.wrap(t),e.parent=this}return e.node.setText(t),e.invalidateBBox(!1),e.getBBox().w}get breakCount(){return this.breakPoints.length}getVariant(){const t=this.jax.options,e=this.jax.math.outputData,s=(!!e.merrorFamily||!!t.merrorFont)&&this.node.Parent.isKind("merror");if(e.mtextFamily||t.mtextFont||s){const i=this.node.attributes.get("mathvariant"),r=this.constructor.INHERITFONTS[i]||this.jax.font.getCssFont(i),n=r[0]||(s?e.merrorFamily||t.merrorFont:e.mtextFamily||t.mtextFont);this.variant=this.explicitVariant(n,r[2]?"bold":"",r[1]?"italic":"")}else super.getVariant()}setBreakAt(t){this.breakPoints.push(t)}clearBreakPoints(){this.breakPoints=[]}computeLineBBox(t){const e=kl.from(this.getOuterBBox(),this.linebreakOptions.lineleading);return this.breakCount?(e.w=this.getBreakWidth(t),0===t?(e.R=0,this.addLeftBorders(e)):(e.L=0,e.indentData=[["left","0"],["left","0"],["left","0"]],t===this.breakCount&&this.addRightBorders(e)),e):e}getBreakWidth(t){const e=this.childNodes;let[s,i]=this.breakPoints[t-1]||[0,0];const[r,n]=this.breakPoints[t]||[e.length,0];let o=e[s].node.getText().split(/ /);if(s===r)return this.textWidth(o.slice(i,n).join(" "));let a=this.textWidth(o.slice(i).join(" "));for(;++s<r&&s<e.length;)a+=e[s].getBBox().w;return s<e.length&&(o=e[s].node.getText().split(/ /),a+=this.textWidth(o.slice(0,n).join(" "))),a}},e.INHERITFONTS={normal:["",!1,!1],bold:["",!1,!0],italic:["",!0,!1],"bold-italic":["",!0,!0]},e}const eh=function(){var t;const e=th(Ul);return(t=class extends e{toCHTML(t){if(!this.breakCount)return void super.toCHTML(t);const e=this.standardChtmlNodes(t),s=this.textNode.node,i=this.childNodes;for(const t of e.keys()){const r=[e[t]];this.adaptor.append(e[t],this.html("mjx-linestrut"));let[n,o]=this.breakPoints[t-1]||[0,0];const[a,c]=this.breakPoints[t]||[i.length,0];let l=i[n].node.getText().split(/ /);if(n!==a){for(s.setText(l.slice(o).join(" ")),this.textNode.toCHTML(r);++n<a&&n<i.length;)i[n].toCHTML(r);n<i.length&&(l=i[n].node.getText().split(/ /),s.setText(l.slice(0,c).join(" ")),this.textNode.toCHTML(r))}else s.setText(l.slice(o,c).join(" ")),this.textNode.toCHTML(r)}}}).kind=Wr.prototype.kind,t}();function sh(t){return class extends t{get canBreak(){return this.node.canBreak}get breakCount(){return this.breakStyle?1:0}setBreakStyle(t=""){this.breakStyle=t||(this.node.hasNewline||this.node.getProperty("forcebreak")?"before":"")}constructor(t,e,s=null){super(t,e,s),this.setBreakStyle()}computeBBox(t,e=!1){const s=this.node.attributes;t.w=this.length2em(s.get("width"),0),t.h=this.length2em(s.get("height"),0),t.d=this.length2em(s.get("depth"),0)}computeLineBBox(t){const e=this.node.attributes.get("data-lineleading"),s=this.length2em(e,this.linebreakOptions.lineleading),i=kl.from(mo.zero(),s);return 1===t&&(i.getIndentData(this.node),i.w=this.getBBox().w,i.isFirst=0===i.w),i}}}const ih=function(){var t;const e=sh(Ul);return(t=class extends e{toCHTML(t){t.length>1&&t.forEach((t=>this.adaptor.append(t,this.html("mjx-linestrut"))));const e=this.standardChtmlNodes(t);let{w:s,h:i,d:r}=this.getBBox();s<0&&(this.adaptor.setStyle(e[0],"marginRight",this.em(s)),s=0),s&&!this.breakCount&&this.adaptor.setStyle(e[0],"width",this.em(s)),i=Math.max(0,i+r),i&&this.adaptor.setStyle(e[0],"height",this.em(Math.max(0,i))),r&&this.adaptor.setStyle(e[0],"verticalAlign",this.em(-r))}}).kind=zr.prototype.kind,t}();function rh(t){return class extends t{getDimens(){const t=this.node.attributes.getList("width","height","depth","lspace","voffset"),e=this.childNodes[0].getOuterBBox();let{w:s,h:i,d:r}=e;const n=s,o=i,a=r;let c=0,l=0,h=0;""!==t.width&&(s=this.dimen(t.width,e,"w",0)),""!==t.height&&(i=this.dimen(t.height,e,"h",0)),""!==t.depth&&(r=this.dimen(t.depth,e,"d",0)),""!==t.voffset&&(l=this.dimen(t.voffset,e)),""!==t.lspace&&(c=this.dimen(t.lspace,e));const d=this.node.attributes.get("data-align");return d&&(h=this.getAlignX(s,e,d)),[o,a,n,i-o,r-a,s-n,c,l,h]}dimen(t,e,s="",i=null){const r=(t=String(t)).match(/width|height|depth/),n=r?e[r[0].charAt(0)]:s?e[s]:0;let o=this.length2em(t,n)||0;return t.match(/^[-+]/)&&s&&(o+=n),null!=i&&(o=Math.max(i,o)),o}setBBoxDimens(t){const[e,s,i,r,n,o]=this.getDimens();t.w=i+o,t.h=e+r,t.d=s+n}computeBBox(t,e=!1){this.setBBoxDimens(t);if(this.childNodes[0].getOuterBBox().w>t.w){const e=this.node.attributes.get("data-overflow");("linebreak"===e||"auto"===e&&"linebreak"===this.jax.math.root.attributes.get("overflow"))&&(this.childNodes[0].breakToWidth(t.w),this.setBBoxDimens(t))}this.setChildPWidths(e,t.w)}getWrapWidth(t){return this.getBBox().w}getChildAlign(t){return this.node.attributes.get("data-align")||"left"}}}const nh=function(){var t;const e=rh(Ul);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;let e=this.standardChtmlNodes(t);const s=[],i={},[,,r,n,o,a,c,l,h]=this.getDimens();if((a||this.childNodes[0].getBBox().pwidth)&&(i.width=this.em(r+a)),(n||o)&&(i.margin=this.em(n)+" 0 "+this.em(o)),c+h||l){i.position="relative";const t=this.html("mjx-rbox",{style:{left:this.em(c+h),top:this.em(-l),"max-width":i.width}});c+h&&this.childNodes[0].getBBox().pwidth&&(this.adaptor.setAttribute(t,"width","full"),this.adaptor.setStyle(t,"left",this.em(c))),s.push(t)}e=[this.adaptor.append(e[0],this.html("mjx-block",{style:i},s))],this.childNodes[0].childNodes.length?this.childNodes[0].toCHTML([s[0]||e[0]]):(n||o)&&this.adaptor.append(s[0]||e[0],this.html("mjx-box"))}}).kind=Zr.prototype.kind,t.styles={"mjx-mpadded":{display:"inline-block"},"mjx-rbox":{display:"inline-block",position:"relative"}},t}(),oh=4,ah=1,ch=2,lh=.067,hh=.2,dh=lh+"em solid",uh={top:0,right:1,bottom:2,left:3},ph=Object.keys(uh),mh=t=>new Array(4).fill(t.thickness+t.padding),fh=t=>new Array(4).fill(t.padding),gh=t=>new Array(4).fill(t.thickness),bh=t=>Math.max(t.padding,t.thickness*(t.arrowhead.x+t.arrowhead.dx+1)),Eh=(t,e)=>{if(t.childNodes[0]){const{h:s,d:i}=t.childNodes[0].getBBox();e[0]=e[2]=Math.max(0,t.thickness*t.arrowhead.y-(s+i)/2)}return e},Nh=(t,e)=>{if(t.childNodes[0]){const{w:s}=t.childNodes[0].getBBox();e[1]=e[3]=Math.max(0,t.thickness*t.arrowhead.y-s/2)}return e},yh={up:[-Math.PI/2,!1,!0,"verticalstrike"],down:[Math.PI/2,!1,!0,"verticakstrike"],right:[0,!1,!1,"horizontalstrike"],left:[Math.PI,!1,!1,"horizontalstrike"],updown:[Math.PI/2,!0,!0,"verticalstrike uparrow downarrow"],leftright:[0,!0,!1,"horizontalstrike leftarrow rightarrow"]},xh={updiagonal:[-1,0,!1,"updiagonalstrike northeastarrow"],northeast:[-1,0,!1,"updiagonalstrike updiagonalarrow"],southeast:[1,0,!1,"downdiagonalstrike"],northwest:[1,Math.PI,!1,"downdiagonalstrike"],southwest:[-1,Math.PI,!1,"updiagonalstrike"],northeastsouthwest:[-1,0,!0,"updiagonalstrike northeastarrow updiagonalarrow southwestarrow"],northwestsoutheast:[1,0,!0,"downdiagonalstrike northwestarrow southeastarrow"]},vh={up:t=>Nh(t,[bh(t),0,t.padding,0]),down:t=>Nh(t,[t.padding,0,bh(t),0]),right:t=>Eh(t,[0,bh(t),0,t.padding]),left:t=>Eh(t,[0,t.padding,0,bh(t)]),updown:t=>Nh(t,[bh(t),0,bh(t),0]),leftright:t=>Eh(t,[0,bh(t),0,bh(t)])},Ch=function(t){return e=>{const s=uh[e];return[e,{renderer:t,bbox:t=>{const e=[0,0,0,0];return e[s]=t.thickness+t.padding,e},border:t=>{const e=[0,0,0,0];return e[s]=t.thickness,e}}]}},Th=function(t){return(e,s,i)=>{const r=uh[s],n=uh[i];return[e,{renderer:t,bbox:t=>{const e=t.thickness+t.padding,s=[0,0,0,0];return s[r]=s[n]=e,s},border:t=>{const e=[0,0,0,0];return e[r]=e[n]=t.thickness,e},remove:s+" "+i}]}},wh=function(t){return e=>{const s="mjx-"+e.charAt(0)+"strike";return[e+"diagonalstrike",{renderer:t(s),bbox:mh}]}},_h=function(t){return e=>{const[s,i,r,n]=xh[e];return[e+"arrow",{renderer:(e,n)=>{const[o,a]=e.arrowAW(),c=e.arrow(a,s*(o-i),r);t(e,c)},bbox:t=>{const{a:e,x:s,y:i}=t.arrowData(),[r,n,o]=[t.arrowhead.x,t.arrowhead.y,t.arrowhead.dx],[a,c]=t.getArgMod(r+o,n),l=i+(a>e?t.thickness*c*Math.sin(a-e):0),h=s+(a>Math.PI/2-e?t.thickness*c*Math.sin(a+e-Math.PI/2):0);return[l,h,l,h]},remove:n}]}},kh=function(t){return e=>{const[s,i,r,n]=yh[e];return[e+"arrow",{renderer:(e,n)=>{const{w:o,h:a,d:c}=e.getBBox(),[l,h]=r?[a+c,"X"]:[o,"Y"],d=e.getOffset(h),u=e.arrow(l,s,i,h,d);t(e,u)},bbox:vh[e],remove:n}]}};function Ah(t){return class extends t{getParameters(){const t=this.node.attributes,e=t.get("data-padding");void 0!==e&&(this.padding=this.length2em(e,hh));const s=t.get("data-thickness");void 0!==s&&(this.thickness=this.length2em(s,lh));const i=t.get("data-arrowhead");if(void 0!==i){const[t,e,s]=jr(i);this.arrowhead={x:t?parseFloat(t):oh,y:e?parseFloat(e):ch,dx:s?parseFloat(s):ah}}}getNotations(){const t=this.constructor.notations;for(const e of jr(this.node.attributes.get("notation"))){const s=t.get(e);s&&(this.notations[e]=s,s.renderChild&&(this.renderChild=s.renderer))}}removeRedundantNotations(){for(const t of Object.keys(this.notations))if(this.notations[t]){const e=this.notations[t].remove||"";for(const t of e.split(/ /))delete this.notations[t]}}initializeNotations(){for(const t of Object.keys(this.notations)){const e=this.notations[t].init;e&&e(this)}}getBBoxExtenders(){const t=[0,0,0,0];for(const e of Object.keys(this.notations))this.maximizeEntries(t,this.notations[e].bbox(this));return t}getPadding(){const t=[0,0,0,0];for(const e of Object.keys(this.notations)){const s=this.notations[e].border;s&&this.maximizeEntries(t,s(this))}return[0,1,2,3].map((e=>this.TRBL[e]-t[e]))}maximizeEntries(t,e){for(let s=0;s<t.length;s++)t[s]<e[s]&&(t[s]=e[s])}getOffset(t){const[e,s,i,r]=this.TRBL,n=("X"===t?s-r:i-e)/2;return Math.abs(n)>.001?n:0}getArgMod(t,e){return[Math.atan2(e,t),Math.sqrt(t*t+e*e)]}arrow(t,e,s,i="",r=0){return null}arrowData(){const[t,e]=[this.padding,this.thickness],s=e*(this.arrowhead.x+Math.max(1,this.arrowhead.dx)),{h:i,d:r,w:n}=this.childNodes[0].getBBox(),o=i+r,a=Math.sqrt(o*o+n*n),c=Math.max(t,s*n/a),l=Math.max(t,s*o/a),[h,d]=this.getArgMod(n+2*c,o+2*l);return{a:h,W:d,x:c,y:l}}arrowAW(){const{h:t,d:e,w:s}=this.childNodes[0].getBBox(),[i,r,n,o]=this.TRBL;return this.getArgMod(o+s+r,i+t+e+n)}createMsqrt(t){const e=this.node.factory.create("msqrt");e.inheritAttributesFrom(this.node),e.childNodes[0]=t.node;const s=this.wrap(e);return s.parent=this,s}sqrtTRBL(){const t=this.msqrt.getBBox(),e=this.msqrt.childNodes[0].getBBox();return[t.h-e.h,0,t.d-e.d,t.w-e.w]}constructor(t,e,s=null){super(t,e,s),this.notations={},this.renderChild=null,this.msqrt=null,this.padding=hh,this.thickness=lh,this.arrowhead={x:oh,y:ch,dx:ah},this.TRBL=[0,0,0,0],this.getParameters(),this.getNotations(),this.removeRedundantNotations(),this.initializeNotations(),this.TRBL=this.getBBoxExtenders()}computeBBox(t,e=!1){const[s,i,r,n]=this.TRBL,o=this.childNodes[0].getBBox();t.combine(o,n,0),t.h+=s,t.d+=r,t.w+=i,this.setChildPWidths(e)}}}const Lh=function(t,e=""){return(s,i)=>{const r=s.adjustBorder(s.html("mjx-"+t));if(e){const t=s.getOffset(e);if(s.thickness!==lh||t){const i=`translate${e}(${s.Em(s.thickness/2-t)})`;s.adaptor.setStyle(r,"transform",i)}}s.adaptor.append(s.dom[0],r)}},Mh=function(t){return Ch(((e,s)=>{e.adaptor.setStyle(s,"border-"+t,e.Em(e.thickness)+" solid")}))(t)},Ih=function(t,e,s){return Th(((t,i)=>{const r=t.Em(t.thickness)+" solid";t.adaptor.setStyle(i,"border-"+e,r),t.adaptor.setStyle(i,"border-"+s,r)}))(t,e,s)},Sh=function(t,e){return wh((t=>(s,i)=>{const{w:r,h:n,d:o}=s.getBBox(),[a,c]=s.getArgMod(r,n+o),l=e*s.thickness/2,h=s.adjustBorder(s.html(t,{style:{width:s.Em(c),transform:"rotate("+s.fixed(-e*a)+"rad) translateY("+l+"em)"}}));s.adaptor.append(s.dom[0],h)}))(t)},Rh=function(t){return _h(((t,e)=>{t.adaptor.append(t.dom[0],e)}))(t)},Oh=function(t){return kh(((t,e)=>{t.adaptor.append(t.dom[0],e)}))(t)};function Dh(t,e){return Math.atan2(t,e).toFixed(3).replace(/\.?0+$/,"")}const Ph=Dh(ah,ch),Bh=function(){var t;const e=Ah(Ul);return(t=class extends e{adjustArrow(t,e){const s=this.thickness,i=this.arrowhead;if(i.x===oh&&i.y===ch&&i.dx===ah&&s===lh)return;const[r,n]=[s*i.x,s*i.y].map((t=>this.em(t))),o=Dh(i.dx,i.y),[a,c,l,h,d]=this.adaptor.childNodes(t);this.adjustHead(c,[n,"0","1px",r],o),this.adjustHead(l,["1px","0",n,r],"-"+o),this.adjustHead(h,[n,r,"1px","0"],"-"+o),this.adjustHead(d,["1px",r,n,"0"],o),this.adjustLine(a,s,i.x,e)}adjustHead(t,e,s){t&&(this.adaptor.setStyle(t,"border-width",e.join(" ")),this.adaptor.setStyle(t,"transform","skewX("+s+"rad)"))}adjustLine(t,e,s,i){this.adaptor.setStyle(t,"borderTop",this.em(e)+" solid"),this.adaptor.setStyle(t,"top",this.em(-e/2)),this.adaptor.setStyle(t,"right",this.em(e*(s-1))),i&&this.adaptor.setStyle(t,"left",this.em(e*(s-1)))}moveArrow(t,e,s){if(!s)return;const i=this.adaptor.getStyle(t,"transform");this.adaptor.setStyle(t,"transform",`translate${e}(${this.em(-s)})${i?" "+i:""}`)}adjustBorder(t){return this.thickness!==lh&&this.adaptor.setStyle(t,"borderWidth",this.em(this.thickness)),t}adjustThickness(t){return this.thickness!==lh&&this.adaptor.setStyle(t,"strokeWidth",this.fixed(this.thickness)),t}fixed(t,e=3){return Math.abs(t)<6e-4?"0":t.toFixed(e).replace(/\.?0+$/,"")}Em(t){return super.em(t)}toCHTML(t){const e=this.adaptor,s=this.standardChtmlNodes(t),i=e.append(s[0],this.html("mjx-box"));this.renderChild?this.renderChild(this,i):this.childNodes[0].toCHTML([i]);for(const t of Object.keys(this.notations)){const e=this.notations[t];e.renderChild||e.renderer(this,i)}const r=this.getPadding();for(const t of ph){const s=uh[t];r[s]>0&&e.setStyle(i,"padding-"+t,this.em(r[s]))}}arrow(t,e,s,i="",r=0){const n=this.getBBox().w,o={width:this.em(t)};n!==t&&(o.left=this.em((n-t)/2)),e&&(o.transform="rotate("+this.fixed(e)+"rad)");const a=this.html("mjx-arrow",{style:o},[this.html("mjx-aline"),this.html("mjx-rthead"),this.html("mjx-rbhead")]);return s&&(this.adaptor.append(a,this.html("mjx-lthead")),this.adaptor.append(a,this.html("mjx-lbhead")),this.adaptor.setAttribute(a,"double","true")),this.adjustArrow(a,s),this.moveArrow(a,i,r),a}}).kind=sn.prototype.kind,t.styles={"mjx-menclose":{position:"relative"},"mjx-menclose > mjx-dstrike":{display:"inline-block",left:0,top:0,position:"absolute","border-top":dh,"transform-origin":"top left"},"mjx-menclose > mjx-ustrike":{display:"inline-block",left:0,bottom:0,position:"absolute","border-top":dh,"transform-origin":"bottom left"},"mjx-menclose > mjx-hstrike":{"border-top":dh,position:"absolute",left:0,right:0,bottom:"50%",transform:"translateY("+uo(lh/2)+")"},"mjx-menclose > mjx-vstrike":{"border-left":dh,position:"absolute",top:0,bottom:0,right:"50%",transform:"translateX("+uo(lh/2)+")"},"mjx-menclose > mjx-rbox":{position:"absolute",top:0,bottom:0,right:0,left:0,border:dh,"border-radius":uo(lh+hh)},"mjx-menclose > mjx-cbox":{position:"absolute",top:0,bottom:0,right:0,left:0,border:dh,"border-radius":"50%"},"mjx-menclose > mjx-arrow":{position:"absolute",left:0,bottom:"50%",height:0,width:0},"mjx-menclose > mjx-arrow > *":{display:"block",position:"absolute","transform-origin":"bottom","border-left":uo(lh*oh)+" solid","border-right":0,"box-sizing":"border-box"},"mjx-menclose > mjx-arrow > mjx-aline":{left:0,top:uo(-lh/2),right:uo(lh*(oh-1)),height:0,"border-top":uo(lh)+" solid","border-left":0},"mjx-menclose > mjx-arrow[double] > mjx-aline":{left:uo(lh*(oh-1)),height:0},"mjx-menclose > mjx-arrow > mjx-rthead":{transform:"skewX("+Ph+"rad)",right:0,bottom:"-1px","border-bottom":"1px solid transparent","border-top":uo(lh*ch)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-rbhead":{transform:"skewX(-"+Ph+"rad)","transform-origin":"top",right:0,top:"-1px","border-top":"1px solid transparent","border-bottom":uo(lh*ch)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-lthead":{transform:"skewX(-"+Ph+"rad)",left:0,bottom:"-1px","border-left":0,"border-right":uo(lh*oh)+" solid","border-bottom":"1px solid transparent","border-top":uo(lh*ch)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-lbhead":{transform:"skewX("+Ph+"rad)","transform-origin":"top",left:0,top:"-1px","border-left":0,"border-right":uo(lh*oh)+" solid","border-top":"1px solid transparent","border-bottom":uo(lh*ch)+" solid transparent"},"mjx-menclose > mjx-dbox-top":{position:"absolute",top:0,bottom:"50%",left:0,width:uo(1.5*hh),border:uo(lh)+" solid","border-style":"solid solid none none","border-radius":"0 100% 0 0","box-sizing":"border-box"},"mjx-menclose > mjx-dbox-bot":{position:"absolute",top:"50%",bottom:0,left:0,width:uo(1.5*hh),"border-width":uo(lh),"border-style":"none solid solid none","border-radius":"0 0 100% 0","box-sizing":"border-box"}},t.notations=new Map([Mh("top"),Mh("right"),Mh("bottom"),Mh("left"),Ih("actuarial","top","right"),Ih("madruwb","bottom","right"),Sh("up",1),Sh("down",-1),["horizontalstrike",{renderer:Lh("hstrike","Y"),bbox:t=>[0,t.padding,0,t.padding]}],["verticalstrike",{renderer:Lh("vstrike","X"),bbox:t=>[t.padding,0,t.padding,0]}],["box",{renderer:(t,e)=>{t.adaptor.setStyle(e,"border",t.Em(t.thickness)+" solid")},bbox:mh,border:gh,remove:"left right top bottom"}],["roundedbox",{renderer:Lh("rbox"),bbox:mh}],["circle",{renderer:Lh("cbox"),bbox:mh}],["phasorangle",{renderer:(t,e)=>{const{h:s,d:i}=t.getBBox(),[r,n]=t.getArgMod(1.75*t.padding,s+i),o=t.thickness*Math.sin(r)*.9;t.adaptor.setStyle(e,"border-bottom",t.Em(t.thickness)+" solid");const a=t.adjustBorder(t.html("mjx-ustrike",{style:{width:t.Em(n),transform:`translateX(${t.Em(o)}) rotate(${t.fixed(-r)}rad)`}}));t.adaptor.append(t.dom[0],a)},bbox:t=>{const e=t.padding/2,s=t.thickness;return[2*e,e,e+s,3*e+s]},border:t=>[0,0,t.thickness,0],remove:"bottom"}],Oh("up"),Oh("down"),Oh("left"),Oh("right"),Oh("updown"),Oh("leftright"),Rh("updiagonal"),Rh("northeast"),Rh("southeast"),Rh("northwest"),Rh("southwest"),Rh("northeastsouthwest"),Rh("northwestsoutheast"),["longdiv",{renderer:(t,e)=>{const s=t.adaptor;s.setStyle(e,"border-top",t.Em(t.thickness)+" solid");const i=s.append(t.dom[0],t.html("mjx-dbox-top")),r=s.append(t.dom[0],t.html("mjx-dbox-bot")),n=t.thickness,o=t.padding;n!==lh&&(s.setStyle(i,"border-width",t.Em(n)),s.setStyle(r,"border-width",t.Em(n))),o!==hh&&(s.setStyle(i,"width",t.Em(1.5*o)),s.setStyle(r,"width",t.Em(1.5*o)))},bbox:t=>{const e=t.padding,s=t.thickness;return[e+s,e,e,2*e+s/2]}}],["radical",{renderer:(t,e)=>{t.msqrt.toCHTML([e]);const s=t.sqrtTRBL();t.adaptor.setStyle(t.msqrt.dom[0],"margin",s.map((e=>t.Em(-e))).join(" "))},init:t=>{t.msqrt=t.createMsqrt(t.childNodes[0])},bbox:t=>t.sqrtTRBL(),renderChild:!0}]]),t}();function Fh(t){return class extends t{stretchChildren(){const t=[];for(const e of this.childNodes)e.canStretch(yl.Vertical)&&t.push(e);const e=t.length,s=this.childNodes.length;if(e&&s>1){let i=0,r=0;const n=e>1&&e===s;for(const t of this.childNodes){const e=t.stretch.dir===yl.None;if(n||e){const e=t.getBBox().rscale;let[s,n]=t.getUnbrokenHD();s*=e,n*=e,s>i&&(i=s),n>r&&(r=n)}}for(const e of t){const t=e.coreRScale();e.coreMO().getStretchedVariant([i/t,r/t])}}}get fixesPWidth(){return!1}get breakCount(){return this._breakCount<0&&(this._breakCount=this.childNodes.length?this.childNodes.reduce(((t,e)=>t+e.breakCount),0):0),this._breakCount}breakTop(t,e){const s=this;return this.isStack?this.parent.breakTop(s,s):s}constructor(t,e,s=null){super(t,e,s),this.dh=0;const i=this;this.isStack=!this.parent||this.parent.node.isInferred||this.parent.breakTop(i,i)!==i,this.stretchChildren();for(const t of this.childNodes)if(t.bbox.pwidth){this.bbox.pwidth=mo.fullWidth;break}}computeBBox(t,e=!1){const s=this.breakCount;this.lineBBox=s?[new kl({h:.75,d:.25,w:0},[0,0])]:[],t.empty();for(const e of this.childNodes.keys()){const i=this.childNodes[e];t.append(i.getOuterBBox()),s&&this.computeChildLineBBox(i,e)}t.clean(),s&&!this.coreMO().node.isEmbellished&&this.computeLinebreakBBox(t),this.fixesPWidth&&this.setChildPWidths(e)&&this.computeBBox(t,!0),this.vboxAdjust(t)}computeLinebreakBBox(t){var e;t.empty();const s=this.isStack,i=this.lineBBox,r=i.length-1;if(s)for(const t of i.keys()){const e=i[t];this.addMiddleBorders(e),0===t&&this.addLeftBorders(e),t===r&&this.addRightBorders(e)}let n=0;for(const s of i.keys()){const r=i[s];t.combine(r,0,n),n-=Math.max(.25,r.d)+r.lineLeading+Math.max(.75,(null===(e=i[s+1])||void 0===e?void 0:e.h)||0)}s?(i[0].L=this.bbox.L,i[r].R=this.bbox.R):(t.w=Math.max(...this.lineBBox.map((t=>t.w))),this.shiftLines(t.w),this.jax.math.display||this.linebreakOptions.inline||(t.pwidth=mo.fullWidth,this.node.isInferred&&(this.parent.bbox.pwidth=mo.fullWidth))),t.clean()}vboxAdjust(t){if(!this.parent)return;const e=this.breakCount,s=this.parent.node.attributes.get("data-vertical-align");if(e&&"bottom"===s)this.dh=e?t.d-this.lineBBox[e-1].d:0;else{if(!("center"===s||e&&"middle"===s))return void(this.dh=0);{const{h:e,d:s}=t,i=this.font.params.axis_height;this.dh=(e+s)/2+i-e}}t.h+=this.dh,t.d-=this.dh}computeChildLineBBox(t,e){const s=this.lineBBox[this.lineBBox.length-1];s.end=[e,0],s.append(t.getLineBBox(0));const i=t.breakCount+1;if(1!==i)for(let s=1;s<i;s++){const i=new kl({h:.75,d:.25,w:0});i.start=i.end=[e,s],i.isFirst=!0,i.append(t.getLineBBox(s)),this.lineBBox.push(i)}}getLineBBox(t){return this.getBBox(),this.isStack?super.getLineBBox(t):kl.from(this.getOuterBBox(),this.linebreakOptions.lineleading)}shiftLines(t){var e,s;const i=this.lineBBox,r=i.length-1,[n,o]=(null===(e=i[1].indentData)||void 0===e?void 0:e[0])||["left","0"];for(const e of i.keys()){const a=i[e],[c,l]=0===e?[n,o]:(null===(s=a.indentData)||void 0===s?void 0:s[e===r?2:1])||["left","0"],[h,d]=this.processIndent(c,l,n,o,t);a.L=0,a.L=this.getAlignX(t,a,h)+d}}setChildPWidths(t,e=null,s=!0){return this.breakCount?!t&&(null!==e&&this.bbox.w!==e&&(this.bbox.w=e,this.shiftLines(e)),!0):super.setChildPWidths(t,e,s)}breakToWidth(t){this.linebreaks.breakToWidth(this,t)}}}function jh(t){return class extends t{getScale(){this.bbox.scale=this.parent.bbox.scale,this.bbox.rscale=1}}}const Uh=function(){var t;const e=Fh(Ul);return t=class extends e{constructor(){super(...arguments),this.linebreakCount=0}toCHTML(t){const e=this.linebreakCount=this.isStack?0:this.breakCount;e||!this.node.isInferred?t=this.standardChtmlNodes(t):this.dom=t,this.addChildren(t),e?this.placeLines(t,e):(this.handleVerticalAlign(t[0]),this.handleNegativeWidth(t[0]))}placeLines(t,e){var s,i;this.getBBox();const r=this.lineBBox,n=this.adaptor,[o,a]=(null===(s=r[1].indentData)||void 0===s?void 0:s[0])||["left","0"];for(const s of t.keys()){const c=r[s],[l,h]=0===s?[o,a]:(null===(i=c.indentData)||void 0===i?void 0:i[s===e?2:1])||["left","0"],[d,u]=this.processIndent(l,h,o,a);n.setAttribute(t[s],"align",d),u&&(n.setStyle(t[s],"position","relative"),n.setStyle(t[s],"left",this.em(u))),s<e&&this.jax.math.display&&n.setStyle(t[s],"margin-bottom",this.em(c.lineLeading))}}handleVerticalAlign(t){this.dh&&this.adaptor.setStyle(this.adaptor.parent(t),"vertical-align",this.em(this.dh))}handleNegativeWidth(t){const{w:e}=this.getBBox();e<0&&(this.adaptor.setStyle(t,"width",this.em(Math.max(0,e))),this.adaptor.setStyle(t,"marginRight",this.em(e)))}createChtmlNodes(t){const e=this.linebreakCount;if(!e)return super.createChtmlNodes(t);const s=this.adaptor,i=this.node.isInferred?"mjx-linestack":"mjx-"+this.node.kind;if(this.dom=[s.append(t[0],this.html(i))],"mjx-mrow"!==i||this.isStack||s.setAttribute(this.dom[0],"break-top","true"),this.node.getProperty("process-breaks")&&s.setAttribute(this.dom[0],"breakable","true"),this.node.isInferred||!this.isStack){const t=this.parent.node.attributes.get("data-vertical-align");"middle"!==t&&"center"!==t&&"bottom"!==t||s.setAttribute(this.dom[0],"break-align",t)}this.dom=[s.append(this.handleHref(t)[0],this.dom[0])];const r=Array(e);for(let t=0;t<=e;t++)r[t]=s.append(this.dom[0],this.html("mjx-linebox",{lineno:t}));return r}addChildren(t){let e=0;for(const s of this.childNodes){const i=s.breakCount;s.toCHTML(t.slice(e,e+i+1)),e+=i}}},t.kind=Vr.prototype.kind,t.styles={"mjx-linestack, mjx-mrow[break-top]":{display:"inline-table",width:"100%"},'mjx-linestack[break-align="bottom"], mjx-mrow[break-top][break-align="bottom"]':{display:"inline-block"},'mjx-linestack[break-align="middle"], mjx-mrow[break-top][break-align="middle"]':{"vertical-align":"middle"},'mjx-linestack[break-align="center"], mjx-mrow[break-top][break-align="center"]':{"vertical-align":"middle"},"mjx-linestack[breakable]":{display:"inline"},"mjx-linestack[breakable] > mjx-linebox":{display:"inline"},"mjx-linestack[breakable] > mjx-linebox::before":{"white-space":"pre",content:'"\\A"'},"mjx-linestack[breakable] > mjx-linebox::after":{"white-space":"normal",content:'" "',"letter-spacing":"-.999em","font-family":"MJX-BRK"},"mjx-linestack[breakable] > mjx-linebox:first-of-type::before":{display:"none"},"mjx-linestack[breakable] > mjx-linebox:last-of-type::after":{display:"none"},"mjx-linebox":{display:"block"},'mjx-linebox[align="left"]':{"text-align":"left"},'mjx-linebox[align="center"]':{"text-align":"center"},'mjx-linebox[align="right"]':{"text-align":"right"},"mjx-linestrut":{display:"inline-block",height:"1em","vertical-align":"-.25em"}},t}(),qh=function(){var t;const e=jh(Uh);return(t=class extends e{}).kind=Gr.prototype.kind,t}();function Hh(t){return class extends t{createMrow(){const t=this.node.factory.create("inferredMrow");t.inheritAttributesFrom(this.node),this.mrow=this.wrap(t),this.mrow.parent=this}addMrowChildren(){const t=this.node,e=this.mrow;this.addMo(t.open),this.childNodes.length&&e.childNodes.push(this.childNodes[0]);let s=0;for(const i of this.childNodes.slice(1))this.addMo(t.separators[s++]),e.childNodes.push(i);this.addMo(t.close),e.stretchChildren()}addMo(t){if(!t)return;const e=this.wrap(t);this.mrow.childNodes.push(e),e.parent=this.mrow}constructor(t,e,s=null){super(t,e,s),this.mrow=null,this.createMrow(),this.addMrowChildren()}computeBBox(t,e=!1){t.updateFrom(this.mrow.getOuterBBox()),this.setChildPWidths(e)}get breakCount(){return this.mrow.breakCount}computeLineBBox(t){return this.mrow.getLineBBox(t)}}}const Wh=function(){var t;const e=Hh(Ul);return(t=class extends e{toCHTML(t){const e=this.standardChtmlNodes(t);this.mrow.toCHTML(e)}}).kind=en.prototype.kind,t}();function zh(t){return class extends t{getFractionBBox(t,e,s){const i=this.childNodes[0].getOuterBBox(),r=this.childNodes[1].getOuterBBox(),n=this.font.params.axis_height,{T:o,u:a,v:c}=this.getTUV(e,s);t.combine(i,0,n+o+Math.max(i.d*i.rscale,a)),t.combine(r,0,n-o-Math.max(r.h*r.rscale,c)),t.w+=2*this.pad+.2}getTUV(t,e){const s=this.font.params,i=s.axis_height,r=(t?3.5:1.5)*e;return{T:(t?3.5:1.5)*e,u:(t?s.num1:s.num2)-i-r,v:(t?s.denom1:s.denom2)+i-r}}getAtopBBox(t,e){const{u:s,v:i,nbox:r,dbox:n}=this.getUVQ(e);t.combine(r,0,s),t.combine(n,0,-i),t.w+=2*this.pad}getUVQ(t){const e=this.childNodes[0].getOuterBBox(),s=this.childNodes[1].getOuterBBox(),i=this.font.params;let[r,n]=t?[i.num1,i.denom1]:[i.num3,i.denom2];const o=(t?7:3)*i.rule_thickness;let a=r-e.d*e.scale-(s.h*s.scale-n);return a<o&&(r+=(o-a)/2,n+=(o-a)/2,a=o),{u:r,v:n,q:a,nbox:e,dbox:s}}getBevelledBBox(t,e){const{u:s,v:i,delta:r,nbox:n,dbox:o}=this.getBevelData(e),a=this.bevel.getOuterBBox();t.combine(n,0,s),t.combine(a,t.w-r/2,0),t.combine(o,t.w-r/2,i)}getBevelData(t){const e=this.childNodes[0].getOuterBBox(),s=this.childNodes[1].getOuterBBox(),i=t?.4:.15,r=Math.max(e.scale*(e.h+e.d),s.scale*(s.h+s.d))+2*i,n=this.font.params.axis_height;return{H:r,delta:i,u:e.scale*(e.d-e.h)/2+n+i,v:s.scale*(s.d-s.h)/2+n-i,nbox:e,dbox:s}}isDisplay(){const{displaystyle:t,scriptlevel:e}=this.node.attributes.getList("displaystyle","scriptlevel");return t&&0===e}constructor(t,e,s=null){if(super(t,e,s),this.bevel=null,this.pad=this.node.getProperty("withDelims")?0:this.font.params.nulldelimiterspace,this.node.attributes.get("bevelled")){const{H:t}=this.getBevelData(this.isDisplay()),e=this.bevel=this.createMo("/");e.node.attributes.set("symmetric",!0),e.canStretch(yl.Vertical),e.getStretchedVariant([t],!0)}}computeBBox(t,e=!1){t.empty();const{linethickness:s,bevelled:i}=this.node.attributes.getList("linethickness","bevelled"),r=this.isDisplay();let n=null;if(i)this.getBevelledBBox(t,r);else{const e=this.length2em(String(s),.06);n=-2*this.pad,0===e?this.getAtopBBox(t,r):(this.getFractionBBox(t,r,e),n-=.2),n+=t.w}t.clean(),this.setChildPWidths(e,n)}canStretch(t){return!1}getChildAlign(t){const e=this.node.attributes;return e.get("bevelled")?"left":e.get(["numalign","denomalign"][t])}getWrapWidth(t){const e=this.node.attributes;if(e.get("bevelled"))return this.childNodes[t].getOuterBBox().w;return this.getBBox().w-(this.length2em(e.get("linethickness"))?.2:0)-2*this.pad}}}const Xh=function(){var t;const e=zh(Ul);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;this.standardChtmlNodes(t);const{linethickness:e,bevelled:s}=this.node.attributes.getList("linethickness","bevelled"),i=this.isDisplay();if(s)this.makeBevelled(i);else{const t=this.length2em(String(e),.06);0===t?this.makeAtop(i):this.makeFraction(i,t)}}makeFraction(t,e){const{numalign:s,denomalign:i}=this.node.attributes.getList("numalign","denomalign"),r=t?{type:"d"}:{},n=this.node.getProperty("withDelims")?Object.assign(Object.assign({},r),{delims:"true"}):Object.assign({},r),o="center"!==s?{align:s}:{},a="center"!==i?{align:i}:{},c=Object.assign({},r),l=Object.assign({},r),h=this.font.params;if(.06!==e){const s=h.axis_height,i=this.font.params.rule_factor,o=this.em(e),{T:a,u:d,v:u}=this.getTUV(t,e),p=(t?this.em(3*e):o)+" -.1em";r.style={height:o,"border-top":this.em(e*i)+" solid",margin:p};const m=this.em(Math.max(0,d));l.style={height:m,"vertical-align":"-"+m},c.style={height:this.em(Math.max(0,u))},n.style={"vertical-align":this.em(s-a)}}let d,u;this.adaptor.append(this.dom[0],this.html("mjx-frac",n,[d=this.html("mjx-num",o,[this.html("mjx-nstrut",l)]),this.html("mjx-dbox",{},[this.html("mjx-dtable",{},[this.html("mjx-line",r),this.html("mjx-row",{},[u=this.html("mjx-den",a,[this.html("mjx-dstrut",c)])])])])])),this.childNodes[0].toCHTML([d]),this.childNodes[1].toCHTML([u])}makeAtop(t){const{numalign:e,denomalign:s}=this.node.attributes.getList("numalign","denomalign"),i=t?{type:"d",atop:!0}:{atop:!0},r=this.node.getProperty("withDelims")?Object.assign(Object.assign({},i),{delims:!0}):Object.assign({},i),n="center"!==e?{align:e}:{},o="center"!==s?{align:s}:{},{v:a,q:c}=this.getUVQ(t);let l,h;n.style={"padding-bottom":this.em(c)},r.style={"vertical-align":this.em(-a)},this.adaptor.append(this.dom[0],this.html("mjx-frac",r,[l=this.html("mjx-num",n),h=this.html("mjx-den",o)])),this.childNodes[0].toCHTML([l]),this.childNodes[1].toCHTML([h])}makeBevelled(t){const e=this.adaptor;e.setAttribute(this.dom[0],"bevelled","ture");const s=e.append(this.dom[0],this.html("mjx-num"));this.childNodes[0].toCHTML([s]),this.bevel.toCHTML(this.dom);const i=e.append(this.dom[0],this.html("mjx-den"));this.childNodes[1].toCHTML([i]);const{u:r,v:n,delta:o,nbox:a,dbox:c}=this.getBevelData(t);r&&e.setStyle(s,"verticalAlign",this.em(r/a.scale)),n&&e.setStyle(i,"verticalAlign",this.em(n/c.scale));const l=this.em(-o/2);e.setStyle(this.bevel.dom[0],"marginLeft",l),e.setStyle(this.bevel.dom[0],"marginRight",l)}}).kind=Jr.prototype.kind,t.styles={"mjx-frac":{display:"inline-block","vertical-align":"0.17em",padding:"0 .22em"},'mjx-frac[type="d"]':{"vertical-align":".04em"},"mjx-frac[delims]":{padding:"0 .1em"},"mjx-frac[atop]":{padding:"0 .12em"},"mjx-frac[atop][delims]":{padding:"0"},"mjx-dtable":{display:"inline-table",width:"100%"},"mjx-dtable > *":{"font-size":"2000%"},"mjx-dbox":{display:"block","font-size":"5%"},"mjx-num":{display:"block","text-align":"center"},"mjx-den":{display:"block","text-align":"center"},"mjx-mfrac[bevelled] > mjx-num":{display:"inline-block"},"mjx-mfrac[bevelled] > mjx-den":{display:"inline-block"},'mjx-den[align="right"], mjx-num[align="right"]':{"text-align":"right"},'mjx-den[align="left"], mjx-num[align="left"]':{"text-align":"left"},"mjx-nstrut":{display:"inline-block",height:".054em",width:0,"vertical-align":"-.054em"},'mjx-nstrut[type="d"]':{height:".217em","vertical-align":"-.217em"},"mjx-dstrut":{display:"inline-block",height:".505em",width:0},'mjx-dstrut[type="d"]':{height:".726em"},"mjx-line":{display:"block","box-sizing":"border-box","min-height":"1px",height:".06em","border-top":".075em solid",margin:".06em -.1em",overflow:"hidden"},'mjx-line[type="d"]':{margin:".18em -.1em"}},t}();function Vh(t){return class extends t{get base(){return 0}get root(){return null}combineRootBBox(t,e,s){}getPQ(t){const e=this.font.params.rule_thickness,s=this.font.params.surd_height,i=this.node.attributes.get("displaystyle")?this.font.params.x_height:e;return[i,t.h+t.d>this.surdH?(t.h+t.d-(this.surdH-e-s-i/2))/2:s+i/4]}getRootDimens(t,e){return[0,0,0,0]}rootWidth(){return 1.25}getStretchedSurd(){const t=this.font.params.rule_thickness,e=this.font.params.surd_height,s=this.node.attributes.get("displaystyle")?this.font.params.x_height:t,{h:i,d:r}=this.childNodes[this.base].getOuterBBox();this.surdH=i+r+t+e+s/4,this.surd.getStretchedVariant([this.surdH-r,r],!0)}constructor(t,e,s=null){super(t,e,s),this.surd=this.createMo("\u221a"),this.surd.canStretch(yl.Vertical),this.getStretchedSurd()}computeBBox(t,e=!1){t.empty();const s=this.surd.getBBox(),i=new mo(this.childNodes[this.base].getOuterBBox()),r=this.getPQ(s)[1],n=this.font.params.rule_thickness,o=this.font.params.surd_height,a=i.h+r+n,[c]=this.getRootDimens(s,a);t.h=a+o,this.combineRootBBox(t,s,a),t.combine(s,c,a-s.h),t.combine(i,c+s.w,0),t.clean(),this.setChildPWidths(e)}invalidateBBox(){super.invalidateBBox(),this.surd.childNodes[0].invalidateBBox()}}}const Gh=function(){var t;const e=Vh(Ul);return t=class extends e{toCHTML(t){const e=this.surd,s=this.childNodes[this.base],i=e.getBBox(),r=s.getOuterBBox(),[,n]=this.getPQ(i),o=this.font.params.surd_height,a=r.h+n+o,c=this.adaptor,l=this.standardChtmlNodes(t);let h,d,u,p;null!=this.root&&(u=c.append(l[0],this.html("mjx-root")),p=this.childNodes[this.root]);const m=c.append(l[0],this.html("mjx-sqrt",{},[h=this.html("mjx-surd"),d=this.html("mjx-box",{style:{paddingTop:this.em(n)}})]));.06!==o&&c.setStyle(d,"border-top-width",this.em(o*this.font.params.rule_factor)),this.addRoot(u,p,i,a),e.toCHTML([h]),s.toCHTML([d]),e.size<0&&c.addClass(m,"mjx-tall")}addRoot(t,e,s,i){}},t.kind=Kr.prototype.kind,t.styles={"mjx-root":{display:"inline-block","white-space":"nowrap"},"mjx-surd":{display:"inline-block","vertical-align":"top"},"mjx-sqrt":{display:"inline-block","padding-top":".075em"},"mjx-sqrt > mjx-box":{"border-top":".075em solid","padding-left":".03em","margin-left":"-.03em"},"mjx-sqrt.mjx-tall > mjx-box":{"padding-left":".3em","margin-left":"-.3em"}},t}();function Jh(t){return class extends t{get root(){return 1}combineRootBBox(t,e,s){const i=this.childNodes[this.root].getOuterBBox(),r=this.getRootDimens(e,s)[1];t.combine(i,0,r)}getRootDimens(t,e){const s=this.surd,i=this.childNodes[this.root].getOuterBBox(),r=(s.size<0?.5:.6)*t.w,{w:n,rscale:o}=i,a=Math.max(n,r/o),c=Math.max(0,a-n);return[a*o-r,this.rootHeight(i,t,s.size,e),c]}rootHeight(t,e,s,i){const r=e.h+e.d;return(s<0?1.9:.55*r)-(r-i)+Math.max(0,t.d*t.rscale)}rootWidth(){const t=this.childNodes[this.root].getOuterBBox();return.4+t.w*t.rscale}}}const Kh=function(){var t;const e=Jh(Gh);return t=class extends e{addRoot(t,e,s,i){e.toCHTML([t]);const r=this.adaptor,[n,o,a]=this.getRootDimens(s,i);r.setStyle(t,"verticalAlign",this.em(o)),r.setStyle(t,"width",this.em(n)),a&&r.setStyle(r.firstChild(t),"paddingLeft",this.em(a))}},t.kind=$r.prototype.kind,t}();function $h(t){var e;return(e=class extends t{get scriptChild(){return this.childNodes[this.node.sub]}getOffset(){return[this.baseIsChar?0:this.getAdjustedIc(),-this.getV()]}}).useIC=!1,e}function Yh(t){return class extends t{get scriptChild(){return this.childNodes[this.node.sup]}getOffset(){return[this.getAdjustedIc()-(this.baseRemoveIc?0:this.baseIc),this.getU()]}}}function Qh(t){var e;return e=class extends t{constructor(){super(...arguments),this.UVQ=null}get subChild(){return this.childNodes[this.node.sub]}get supChild(){return this.childNodes[this.node.sup]}get scriptChild(){return this.supChild}getUVQ(t=this.subChild.getOuterBBox(),e=this.supChild.getOuterBBox()){const s=this.baseCore,i=s.getLineBBox(s.breakCount);if(this.UVQ)return this.UVQ;const r=this.font.params,n=3*r.rule_thickness,o=this.length2em(this.node.attributes.get("subscriptshift"),r.sub2),a=this.baseCharZero(i.d*this.baseScale+r.sub_drop*t.rscale),c=e.d*e.rscale,l=t.h*t.rscale;let[h,d]=[this.getU(),Math.max(a,o)],u=h-c-(l-d);if(u<n){d+=n-u;const t=.8*r.x_height-(h-c);t>0&&(h+=t,d-=t)}return h=Math.max(this.length2em(this.node.attributes.get("superscriptshift"),h),h),d=Math.max(this.length2em(this.node.attributes.get("subscriptshift"),d),d),u=h-c-(l-d),this.UVQ=[h,-d,u],this.UVQ}appendScripts(t){const[e,s]=[this.subChild.getOuterBBox(),this.supChild.getOuterBBox()],i=this.getBaseWidth(),r=this.getAdjustedIc(),[n,o]=this.getUVQ(),a=t.d-this.baseChild.getLineBBox(this.baseChild.breakCount).d;return t.combine(e,i+(this.baseIsChar?0:r),o-a),t.combine(s,i+r,n-a),t.w+=this.font.params.scriptspace,t}},e.useIC=!1,e}function Zh(t){var e;return e=class extends t{get baseChild(){return this.childNodes[this.node.base]}get scriptChild(){return this.childNodes[1]}getBaseCore(){let t=this.getSemanticBase()||this.childNodes[0],e=null==t?void 0:t.node;for(;t&&(1===t.childNodes.length&&(e.isKind("mrow")||e.isKind("TeXAtom")||e.isKind("mstyle")||e.isKind("mpadded")&&!e.getProperty("vbox")||e.isKind("mphantom")||e.isKind("semantics"))||e.isKind("munderover")&&t.isMathAccent);)this.setBaseAccentsFor(t),t=t.childNodes[0],e=null==t?void 0:t.node;return t||(this.baseHasAccentOver=this.baseHasAccentUnder=!1),t||this.childNodes[0]}setBaseAccentsFor(t){t.node.isKind("munderover")&&(null===this.baseHasAccentOver&&(this.baseHasAccentOver=!!t.node.attributes.get("accent")),null===this.baseHasAccentUnder&&(this.baseHasAccentUnder=!!t.node.attributes.get("accentunder")))}getSemanticBase(){const t=this.node.attributes.getExplicit("data-semantic-fencepointer");return this.getBaseFence(this.baseChild,t)}getBaseFence(t,e){if(!t||!t.node.attributes||!e)return null;if(t.node.attributes.getExplicit("data-semantic-id")===e)return t;for(const s of t.childNodes){const t=this.getBaseFence(s,e);if(t)return t}return null}getBaseScale(){let t=this.baseCore,e=1;for(;t&&t!==this;){e*=t.getOuterBBox().rscale,t=t.parent}return e}getBaseIc(){return this.baseCore.getOuterBBox().ic*this.baseScale}getAdjustedIc(){return this.baseIc?1.05*this.baseIc+.05:0}isCharBase(){const t=this.baseCore;return(t.node.isKind("mo")&&null===t.size||t.node.isKind("mi")||t.node.isKind("mn"))&&1===t.bbox.rscale&&1===Array.from(t.getText()).length}checkLineAccents(){if(this.node.isKind("munderover"))if(this.node.isKind("mover"))this.isLineAbove=this.isLineAccent(this.scriptChild);else if(this.node.isKind("munder"))this.isLineBelow=this.isLineAccent(this.scriptChild);else{const t=this;this.isLineAbove=this.isLineAccent(t.overChild),this.isLineBelow=this.isLineAccent(t.underChild)}}isLineAccent(t){const e=t.coreMO().node;return e.isToken&&"\u2015"===e.getText()}getBaseWidth(){const t=this.baseChild.getLineBBox(this.baseChild.breakCount);return t.w*t.rscale-(this.baseRemoveIc?this.baseIc:0)+this.font.params.extra_ic}getOffset(){return[0,0]}baseCharZero(t){const e=!!this.baseCore.node.attributes.get("largeop"),s=!(!this.baseCore.node.isKind("mo")||!this.baseCore.size),i=this.baseScale;return!this.baseIsChar||e||s||1!==i?t:0}getV(){const t=this.baseCore,e=t.getLineBBox(t.breakCount),s=this.scriptChild.getOuterBBox(),i=this.font.params,r=this.length2em(this.node.attributes.get("subscriptshift"),i.sub1);return Math.max(this.baseCharZero(e.d*this.baseScale+i.sub_drop*s.rscale),r,s.h*s.rscale-.8*i.x_height)}getU(){const t=this.baseCore,e=t.getLineBBox(t.breakCount),s=this.scriptChild.getOuterBBox(),i=this.font.params,r=this.node.attributes.getList("displaystyle","superscriptshift"),n=this.node.getProperty("texprimestyle")?i.sup3:r.displaystyle?i.sup1:i.sup2,o=this.length2em(r.superscriptshift,n);return Math.max(this.baseCharZero(e.h*this.baseScale-i.sup_drop*s.rscale),o,s.d*s.rscale+1/4*i.x_height)}hasMovableLimits(){const t=this.node.attributes.get("displaystyle"),e=this.baseChild.coreMO().node;return!t&&!!e.attributes.get("movablelimits")}getOverKU(t,e){const s=this.node.attributes.get("accent"),i=this.font.params,r=e.d*e.rscale,n=i.rule_thickness*i.separation_factor,o=this.baseHasAccentOver?n:0,a=this.isLineAbove?3*i.rule_thickness:n,c=(s?a:Math.max(i.big_op_spacing1,i.big_op_spacing3-Math.max(0,r)))-o;return[c,t.h*t.rscale+c+r]}getUnderKV(t,e){const s=this.node.attributes.get("accentunder"),i=this.font.params,r=e.h*e.rscale,n=i.rule_thickness*i.separation_factor,o=this.baseHasAccentUnder?n:0,a=this.isLineBelow?3*i.rule_thickness:n,c=(s?a:Math.max(i.big_op_spacing2,i.big_op_spacing4-r))-o;return[c,-(t.d*t.rscale+c+r)]}getDeltaW(t,e=[0,0,0]){const s=this.node.attributes.get("align"),i=t.map((t=>t.w*t.rscale));i[0]-=this.baseRemoveIc&&!this.baseCore.node.attributes.get("largeop")?this.baseIc:0;const r=Math.max(...i),n=[];let o=0;for(const t of i.keys())n[t]=("center"===s?(r-i[t])/2:"right"===s?r-i[t]:0)+e[t],n[t]<o&&(o=-n[t]);if(o)for(const t of n.keys())n[t]+=o;return[1,2].map((e=>n[e]+=t[e]?t[e].dx*t[0].rscale:0)),n}getDelta(t,e=!1){const s=this.node.attributes.get("accent");let{sk:i,ic:r}=this.baseCore.getOuterBBox();return s&&(i-=t.getOuterBBox().sk),((s&&!e?i:0)+this.font.skewIcFactor*r)*this.baseScale}stretchChildren(){const t=[];for(const e of this.childNodes)e.canStretch(yl.Horizontal)&&t.push(e);const e=t.length,s=this.childNodes.length;if(e&&s>1){let i=0;const r=e>1&&e===s;for(const t of this.childNodes){const e=t.stretch.dir===yl.None;if(r||e){const{w:s,rscale:r}=t.getOuterBBox(e);s*r>i&&(i=s*r)}}for(const e of t){const t=e.coreMO();null===t.size&&t.getStretchedVariant([i/e.coreRScale()])}}}constructor(t,e,s=null){super(t,e,s),this.baseScale=1,this.baseIc=0,this.baseRemoveIc=!1,this.baseIsChar=!1,this.baseHasAccentOver=null,this.baseHasAccentUnder=null,this.isLineAbove=!1,this.isLineBelow=!1,this.isMathAccent=!1;const i=this.baseCore=this.getBaseCore();i&&(this.setBaseAccentsFor(i),this.baseScale=this.getBaseScale(),this.baseIc=this.getBaseIc(),this.baseIsChar=this.isCharBase(),this.isMathAccent=this.baseIsChar&&this.scriptChild&&void 0!==this.scriptChild.coreMO().node.getProperty("mathaccent"),this.checkLineAccents(),this.baseRemoveIc=!this.isLineAbove&&!this.isLineBelow&&(!this.constructor.useIC||this.isMathAccent))}computeBBox(t,e=!1){t.empty(),t.append(this.baseChild.getOuterBBox()),this.appendScripts(t),t.clean(),this.setChildPWidths(e)}appendScripts(t){const e=this.getBaseWidth(),[s,i]=this.getOffset();return t.combine(this.scriptChild.getOuterBBox(),e+s,i),t.w+=this.font.params.scriptspace,t}get breakCount(){return this._breakCount<0&&(this._breakCount=this.node.isEmbellished?this.coreMO().embellishedBreakCount:this.node.linebreakContainer?0:this.childNodes[0].breakCount),this._breakCount}breakTop(t,e){return this.node.linebreakContainer||!this.parent||this.node.childIndex(e.node)?t:this.parent.breakTop(t,this)}computeLineBBox(t){const e=this.breakCount;if(!e)return kl.from(this.getOuterBBox(),this.linebreakOptions.lineleading);const s=this.baseChild.getLineBBox(t).copy();return t<e?(0===t&&this.addLeftBorders(s),this.addMiddleBorders(s)):(this.appendScripts(s),this.addMiddleBorders(s),this.addRightBorders(s)),s}},e.useIC=!0,e}const td=function(){var t;const e=Zh(Ul);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;this.dom=this.standardChtmlNodes(t);const[e,s]=this.getOffset(),i=e-(this.baseRemoveIc?this.baseIc:0),r={"vertical-align":this.em(s)};i&&(r["margin-left"]=this.em(i)),this.baseChild.toCHTML(this.dom);const n=this.dom[this.dom.length-1];this.scriptChild.toCHTML([this.adaptor.append(n,this.html("mjx-script",{style:r}))])}markUsed(){super.markUsed(),this.jax.wrapperUsage.add(id.kind)}setDeltaW(t,e){for(let s=0;s<e.length;s++)e[s]&&this.adaptor.setStyle(t[s],"paddingLeft",this.em(e[s]))}adjustOverDepth(t,e){e.d>=0||this.adaptor.setStyle(t,"marginBottom",this.em(e.d*e.rscale))}adjustUnderDepth(t,e){if(e.d>=0)return;const s=this.adaptor,i=this.em(e.d),r=this.html("mjx-box",{style:{"margin-bottom":i,"vertical-align":i}});for(const e of s.childNodes(s.firstChild(t)))s.append(r,e);s.append(s.firstChild(t),r)}adjustBaseHeight(t,e){if(this.node.attributes.get("accent")){const s=this.font.params.x_height*this.baseScale;e.h<s&&(this.adaptor.setStyle(t,"paddingTop",this.em(s-e.h)),e.h=s)}}}).kind="scriptbase",t}(),ed=function(){var t;const e=$h(td);return(t=class extends e{}).kind=on.prototype.kind,t}(),sd=function(){var t;const e=Yh(td);return(t=class extends e{}).kind=an.prototype.kind,t}(),id=function(){var t;const e=Qh(td);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;const e=this.adaptor,s=this.standardChtmlNodes(t),[i,r,n]=[this.baseChild,this.supChild,this.subChild],[,o,a]=this.getUVQ(),c={"vertical-align":this.em(o)};i.toCHTML(s);const l=e.append(s[s.length-1],this.html("mjx-script",{style:c}));r.toCHTML([l]),e.append(l,this.html("mjx-spacer",{style:{"margin-top":this.em(a)}})),n.toCHTML([l]);const h=this.getAdjustedIc();h&&(e.setStyle(r.dom[0],"marginLeft",this.em(h/r.bbox.rscale)),this.baseIsChar||e.setStyle(n.dom[0],"marginLeft",this.em(h/r.bbox.rscale))),this.baseRemoveIc&&e.setStyle(l,"marginLeft",this.em(-this.baseIc))}}).kind=nn.prototype.kind,t.styles={"mjx-script":{display:"inline-block","padding-right":".05em","padding-left":".033em"},"mjx-script > mjx-spacer":{display:"block"}},t}();function rd(t){return class extends t{get scriptChild(){return this.childNodes[this.node.under]}constructor(...t){super(...t),this.stretchChildren()}computeBBox(t,e=!1){if(this.hasMovableLimits())return void super.computeBBox(t,e);t.empty();const s=this.baseChild.getOuterBBox(),i=this.scriptChild.getOuterBBox(),r=this.getUnderKV(s,i)[1],n=this.isLineBelow?0:this.getDelta(this.scriptChild,!0),[o,a]=this.getDeltaW([s,i],[0,-n]);t.combine(s,o,0),t.combine(i,a,r),t.d+=this.font.params.big_op_spacing5,t.clean(),this.setChildPWidths(e)}}}function nd(t){return class extends t{get scriptChild(){return this.childNodes[this.node.over]}constructor(...t){super(...t),this.stretchChildren()}computeBBox(t){if(this.hasMovableLimits())return void super.computeBBox(t);t.empty();const e=this.baseChild.getOuterBBox(),s=this.scriptChild.getOuterBBox();this.node.attributes.get("accent")&&(e.h=Math.max(e.h,this.font.params.x_height*this.baseScale));const i=this.getOverKU(e,s)[1],r=this.isLineAbove?0:this.getDelta(this.scriptChild),[n,o]=this.getDeltaW([e,s],[0,r]);t.combine(e,n,0),t.combine(s,o,i),t.h+=this.font.params.big_op_spacing5,t.clean()}}}function od(t){return class extends t{get underChild(){return this.childNodes[this.node.under]}get overChild(){return this.childNodes[this.node.over]}get subChild(){return this.underChild}get supChild(){return this.overChild}constructor(...t){super(...t),this.stretchChildren()}computeBBox(t){if(this.hasMovableLimits())return void super.computeBBox(t);t.empty();const e=this.overChild.getOuterBBox(),s=this.baseChild.getOuterBBox(),i=this.underChild.getOuterBBox();this.node.attributes.get("accent")&&(s.h=Math.max(s.h,this.font.params.x_height*this.baseScale));const r=this.getOverKU(s,e)[1],n=this.getUnderKV(s,i)[1],o=this.getDelta(this.overChild),a=this.getDelta(this.underChild,!0),[c,l,h]=this.getDeltaW([s,i,e],[0,this.isLineBelow?0:-a,this.isLineAbove?0:o]);t.combine(s,c,0),t.combine(e,h,r),t.combine(i,l,n);const d=this.font.params.big_op_spacing5;t.h+=d,t.d+=d,t.clean()}}}const ad=function(){var t;const e=rd(ed);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;if(this.hasMovableLimits())return super.toCHTML(t),void this.adaptor.setAttribute(this.dom[0],"limits","false");this.dom=this.standardChtmlNodes(t);const e=this.adaptor.append(this.adaptor.append(this.dom[0],this.html("mjx-row")),this.html("mjx-base")),s=this.adaptor.append(this.adaptor.append(this.dom[0],this.html("mjx-row")),this.html("mjx-under"));this.baseChild.toCHTML([e]),this.scriptChild.toCHTML([s]);const i=this.baseChild.getOuterBBox(),r=this.scriptChild.getOuterBBox(),n=this.getUnderKV(i,r)[0],o=this.isLineBelow?0:this.getDelta(this.scriptChild,!0);this.adaptor.setStyle(s,"paddingTop",this.em(n)),this.setDeltaW([e,s],this.getDeltaW([i,r],[0,-o])),this.adjustUnderDepth(s,r)}}).kind=ln.prototype.kind,t.styles={"mjx-over":{"text-align":"left"},'mjx-munder:not([limits="false"])':{display:"inline-table"},"mjx-munder > mjx-row":{"text-align":"left"},"mjx-under":{"padding-bottom":".1em"}},t}(),cd=function(){var t;const e=nd(sd);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;if(this.hasMovableLimits())return super.toCHTML(t),void this.adaptor.setAttribute(this.dom[0],"limits","false");this.dom=this.standardChtmlNodes(t);const e=this.adaptor.append(this.dom[0],this.html("mjx-over")),s=this.adaptor.append(this.dom[0],this.html("mjx-base"));this.scriptChild.toCHTML([e]),this.baseChild.toCHTML([s]);const i=this.scriptChild.getOuterBBox(),r=this.baseChild.getOuterBBox();this.adjustBaseHeight(s,r);const n=this.getOverKU(r,i)[0],o=this.isLineAbove?0:this.getDelta(this.scriptChild);this.adaptor.setStyle(e,"paddingBottom",this.em(n)),this.setDeltaW([s,e],this.getDeltaW([r,i],[0,o])),this.adjustOverDepth(e,i)}}).kind=hn.prototype.kind,t.styles={'mjx-mover:not([limits="false"])':{"padding-top":".1em"},'mjx-mover:not([limits="false"]) > *':{display:"block","text-align":"left"}},t}(),ld=function(){var t;const e=od(id);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;if(this.hasMovableLimits())return super.toCHTML(t),void this.adaptor.setAttribute(this.dom[0],"limits","false");this.dom=this.standardChtmlNodes(t);const e=this.adaptor.append(this.dom[0],this.html("mjx-over")),s=this.adaptor.append(this.adaptor.append(this.dom[0],this.html("mjx-box")),this.html("mjx-munder")),i=this.adaptor.append(this.adaptor.append(s,this.html("mjx-row")),this.html("mjx-base")),r=this.adaptor.append(this.adaptor.append(s,this.html("mjx-row")),this.html("mjx-under"));this.overChild.toCHTML([e]),this.baseChild.toCHTML([i]),this.underChild.toCHTML([r]);const n=this.overChild.getOuterBBox(),o=this.baseChild.getOuterBBox(),a=this.underChild.getOuterBBox();this.adjustBaseHeight(i,o);const c=this.getOverKU(o,n)[0],l=this.getUnderKV(o,a)[0],h=this.getDelta(this.overChild),d=this.getDelta(this.underChild,!0);this.adaptor.setStyle(e,"paddingBottom",this.em(c)),this.adaptor.setStyle(r,"paddingTop",this.em(l)),this.setDeltaW([i,r,e],this.getDeltaW([o,a,n],[0,this.isLineBelow?0:-d,this.isLineAbove?0:h])),this.adjustOverDepth(e,n),this.adjustUnderDepth(r,a)}}).kind=cn.prototype.kind,t.styles={'mjx-munderover:not([limits="false"])':{"padding-top":".1em"},'mjx-munderover:not([limits="false"]) > *':{display:"block"}},t}(),hd={base:"subList",subList:"supList",supList:"subList",psubList:"psupList",psupList:"psubList"},dd=["sup","sup","psup","psub"];function ud(t){return class extends t{combinePrePost(t,e){const s=new mo(t);return s.combine(e,0,0),s}getScriptData(){const t=this.scriptData={base:null,sub:mo.empty(),sup:mo.empty(),psub:mo.empty(),psup:mo.empty(),numPrescripts:0,numScripts:0},e=this.getScriptBBoxLists();this.combineBBoxLists(t.sub,t.sup,e.subList,e.supList),this.combineBBoxLists(t.psub,t.psup,e.psubList,e.psupList),t.base=e.base[0],t.numPrescripts=e.psubList.length,t.numScripts=e.subList.length}getScriptBBoxLists(){const t={base:[],subList:[],supList:[],psubList:[],psupList:[]};let e="base";for(const s of this.childNodes)s.node.isKind("mprescripts")?e="psubList":(t[e].push(s.getOuterBBox()),e=hd[e]);return this.firstPrescript=t.subList.length+t.supList.length+2,this.padLists(t.subList,t.supList),this.padLists(t.psubList,t.psupList),t}padLists(t,e){t.length>e.length&&e.push(mo.empty())}combineBBoxLists(t,e,s,i){for(let r=0;r<s.length;r++){const[n,o,a]=this.getScaledWHD(s[r]),[c,l,h]=this.getScaledWHD(i[r]),d=Math.max(n,c);t.w+=d,e.w+=d,o>t.h&&(t.h=o),a>t.d&&(t.d=a),l>e.h&&(e.h=l),h>e.d&&(e.d=h)}}getScaledWHD(t){const{w:e,h:s,d:i,rscale:r}=t;return[e*r,s*r,i*r]}getCombinedUV(){const t=this.scriptData,e=this.combinePrePost(t.sub,t.psub),s=this.combinePrePost(t.sup,t.psup);return this.getUVQ(e,s)}addPrescripts(t,e,s){const i=this.scriptData;if(i.numPrescripts){const r=this.font.params.scriptspace;t.combine(i.psup,r,e),t.combine(i.psub,r,s)}return t}addPostscripts(t,e,s){const i=this.scriptData;if(i.numScripts){const r=t.w;t.combine(i.sup,r,e),t.combine(i.sub,r,s),t.w+=this.font.params.scriptspace}return t}constructor(...t){super(...t),this.scriptData=null,this.firstPrescript=0,this.getScriptData()}appendScripts(t){t.empty();const[e,s]=this.getCombinedUV();return this.addPrescripts(t,e,s),t.append(this.scriptData.base),this.addPostscripts(t,e,s),t.clean(),t}computeLineBBox(t){const e=this.baseChild.breakCount,s=this.baseChild.getLineBBox(t).copy();let i=s;const[r,n]=this.getCombinedUV();return 0===t?(i=kl.from(this.addPrescripts(mo.zero(),r,n),this.linebreakOptions.lineleading),i.append(s),this.addLeftBorders(i),i.L=this.bbox.L):t===e&&(i=this.addPostscripts(i,r,n),this.addRightBorders(i),i.R=this.bbox.R),this.addMiddleBorders(i),i}getUVQ(t,e){if(!this.UVQ){let[s,i,r]=[0,0,0];0===t.w?s=this.getU():0===e.w?s=-this.getV():[s,i,r]=super.getUVQ(t,e),this.UVQ=[s,i,r]}return this.UVQ}}}const pd=function(){var t;const e=ud(id);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;const e=this.standardChtmlNodes(t),s=this.scriptData,i=this.node.getProperty("scriptalign")||"right left",[r,n]=jr(i+" "+i),[o,a]=this.getCombinedUV();if(s.numPrescripts){const t=this.addScripts(this.dom[0],o,-a,!0,s.psub,s.psup,this.firstPrescript,s.numPrescripts);"right"!==r&&this.adaptor.setAttribute(t,"script-align",r)}if(this.childNodes[0].toCHTML(e),s.numScripts){const t=this.addScripts(this.dom[this.dom.length-1],o,-a,!1,s.sub,s.sup,1,s.numScripts);"left"!==n&&this.adaptor.setAttribute(t,"script-align",n)}}addScripts(t,e,s,i,r,n,o,a){const c=this.adaptor,l=e-n.d+(s-r.h),h=e<0&&0===s?r.h+e:e,d=l>0?{style:{height:this.em(l)}}:{},u=h?{style:{"vertical-align":this.em(h)}}:{},p=this.html("mjx-row"),m=this.html("mjx-row",d),f=this.html("mjx-row"),g="mjx-"+(i?"pre":"")+"scripts",b=o+2*a;for(;o<b;)this.childNodes[o++].toCHTML([c.append(f,this.html("mjx-cell"))]),this.childNodes[o++].toCHTML([c.append(p,this.html("mjx-cell"))]);return c.append(t,this.html(g,u,[p,m,f]))}}).kind=dn.prototype.kind,t.styles={"mjx-prescripts":{display:"inline-table","padding-left":".05em"},"mjx-scripts":{display:"inline-table","padding-right":".05em"},"mjx-prescripts > mjx-row > mjx-cell":{"text-align":"right"},'[script-align="left"] > mjx-row > mjx-cell':{"text-align":"left"},'[script-align="center"] > mjx-row > mjx-cell':{"text-align":"center"},'[script-align="right"] > mjx-row > mjx-cell':{"text-align":"right"},"mjx-none":{display:"inline-block",height:"1px"}},t}(),md=.333;function fd(t){return class extends t{get tableRows(){return this.childNodes}findContainer(){let t=this,e=t.parent;for(;e&&(e.node.notParent||e.node.isKind("mrow"));)t=e,e=e.parent;this.container=e,this.containerI=t.node.childPosition()}getPercentageWidth(){if(this.hasLabels)this.bbox.pwidth=mo.fullWidth;else{const t=this.node.attributes.get("width");Fr(t)&&(this.bbox.pwidth=t)}}stretchRows(){const t=this.node.attributes.get("equalrows"),e=t?this.getEqualRowHeight():0,{H:s,D:i}=t?this.getTableData():{H:[0],D:[0]},r=this.tableRows;for(let n=0;n<this.numRows;n++){const o=t?[(e+s[n]-i[n])/2,(e-s[n]+i[n])/2]:null;r[n].stretchChildren(o)}}stretchColumns(){const t=this.getColumnAttributes("columnwidth",0);for(let e=0;e<this.numCols;e++){const s="number"==typeof this.cWidths[e]?this.cWidths[e]:null;this.stretchColumn(e,s),null!==s&&this.breakColumn(e,s,t[e])}}stretchColumn(t,e){const s=[];for(const e of this.tableRows){const i=e.getChild(t);if(i){const t=i.childNodes[0];t.stretch.dir===yl.None&&t.canStretch(yl.Horizontal)&&s.push(t)}}const i=s.length,r=this.childNodes.length;if(i&&r>1&&null===e){e=0;const s=i>1&&i===r;for(const i of this.tableRows){const r=i.getChild(t);if(r){const t=r.childNodes[0],i=t.stretch.dir===yl.None;if(s||i){const{w:s}=t.getBBox(i);s>e&&(e=s)}}}}if(null!==e)for(const t of s)t.coreMO().getStretchedVariant([Math.max(e,t.getBBox().w)/t.coreRScale()])}breakColumn(t,e,s){if("linebreak"!==this.jax.math.root.attributes.get("overflow")||!this.jax.math.display)return;const{D:i}=this.getTableData();let r=0,n=0;for(const s of this.tableRows){const o=s.getChild(t);if(o&&o.getBBox().w>e){o.childNodes[0].breakToWidth(e);const t=o.getBBox();i[r]=Math.max(i[r],t.d),t.w>n&&(n=t.w)}r++}("fit"===s||"auto"===s||Fr(s)||n>this.cWidths[t])&&(this.cWidths[t]=n)}getTableData(){if(this.data)return this.data;const t=new Array(this.numRows).fill(0),e=new Array(this.numRows).fill(0),s=new Array(this.numCols).fill(0),i=new Array(this.numRows),r=new Array(this.numRows),n=[0],o=this.tableRows;for(let a=0;a<o.length;a++){let c=0;const l=o[a],h=l.node.attributes.get("rowalign");for(let i=0;i<l.numCells;i++){const r=l.getChild(i);c=this.updateHDW(r,i,a,h,t,e,s,c),this.recordPWidthCell(r,i)}i[a]=t[a],r[a]=e[a],l.labeled&&(c=this.updateHDW(l.childNodes[0],0,a,h,t,e,n,c)),this.extendHD(a,t,e,c),this.extendHD(a,i,r,c)}const a=n[0];return this.data={H:t,D:e,W:s,NH:i,ND:r,L:a},this.data}updateHDW(t,e,s,i,r,n,o,a){let{h:c,d:l,w:h}=t.getBBox();const d=t.parent.bbox.rscale;1!==t.parent.bbox.rscale&&(c*=d,l*=d,h*=d),this.node.getProperty("useHeight")&&(c<.75&&(c=.75),l<.25&&(l=.25));let u=0;return"baseline"!==(i=t.node.attributes.get("rowalign")||i)&&"axis"!==i&&(u=c+l,c=l=0),c>r[s]&&(r[s]=c),l>n[s]&&(n[s]=l),u>a&&(a=u),o&&h>o[e]&&(o[e]=h),a}extendHD(t,e,s,i){const r=(i-(e[t]+s[t]))/2;r<1e-5||(e[t]+=r,s[t]+=r)}recordPWidthCell(t,e){t.childNodes[0]&&t.childNodes[0].getBBox().pwidth&&this.pwidthCells.push([t,e])}setColumnPWidths(){const t=this.cWidths;for(const[e,s]of this.pwidthCells)e.setChildPWidths(!1,t[s])&&(e.invalidateBBox(),e.getBBox())}getBBoxHD(t){const[e,s]=this.getAlignmentRow();if(null===s){const s=this.font.params.axis_height,i=t/2;return{top:[0,t],center:[i,i],bottom:[t,0],baseline:[i,i],axis:[i+s,i-s]}[e]||[i,i]}{const i=this.getVerticalPosition(s,e);return[i,t-i]}}getBBoxLR(){var t;if(this.hasLabels){const t=this.node.attributes,e=t.get("side");let[s,i]=this.getPadAlignShift(e);const r=this.hasLabels&&!!t.get("data-width-includes-label");return r&&this.frame&&this.fSpace[0]&&(s-=this.fSpace[0]),"center"!==i||r?"left"===e?[s,0]:[0,s]:[s,s]}return[(null===(t=this.bbox)||void 0===t?void 0:t.L)||0,0]}getPadAlignShift(t){const{L:e}=this.getTableData();let s=e+this.length2em(this.node.attributes.get("minlabelspacing"));const[i,r]=null==this.styles?["",""]:[this.styles.get("padding-left"),this.styles.get("padding-right")];(i||r)&&(s=Math.max(s,this.length2em(i||"0"),this.length2em(r||"0")));let[n,o]=this.getAlignShift();return n===t&&(o="left"===t?Math.max(s,o)-s:Math.min(-s,o)+s),[s,n,o]}getWidth(){return this.pWidth||this.getBBox().w}adjustWideTable(){const t=this.node.attributes;if("auto"!==t.get("width"))return;const[e,s]=this.getPadAlignShift(t.get("side")),i=Math.max(this.containerWidth/10,this.containerWidth-e-("center"===s?e:0));this.naturalWidth()>i&&this.adjustColumnWidths(i)}naturalWidth(){return Do(this.getComputedWidths().concat(this.cLines,this.cSpace))+2*this.fLine+this.fSpace[0]+this.fSpace[2]}getEqualRowHeight(){const{H:t,D:e}=this.getTableData(),s=Array.from(t.keys()).map((s=>t[s]+e[s]));return Math.max(...s)}getComputedWidths(){const t=this.getTableData().W;let e=Array.from(t.keys()).map((e=>"number"==typeof this.cWidths[e]?this.cWidths[e]:t[e]));return this.node.attributes.get("equalcolumns")&&(e=Array(e.length).fill(Po(e))),e}getColumnWidths(){const t=this.node.attributes.get("width");if(this.node.attributes.get("equalcolumns"))return this.getEqualColumns(t);const e=this.getColumnAttributes("columnwidth",0);return"auto"===t?this.getColumnWidthsAuto(e):Fr(t)?this.getColumnWidthsPercent(e):this.getColumnWidthsFixed(e,this.length2em(t))}getEqualColumns(t){const e=Math.max(1,this.numCols);let s;if("auto"===t){const{W:t}=this.getTableData();s=Po(t)}else if(Fr(t))s=this.percent(1/e);else{const i=Do([].concat(this.cLines,this.cSpace))+this.fSpace[0]+this.fSpace[2];s=Math.max(0,this.length2em(t)-i)/e}return Array(this.numCols).fill(s)}getColumnWidthsAuto(t){return t.map((t=>"auto"===t||"fit"===t?null:Fr(t)?t:this.length2em(t)))}getColumnWidthsPercent(t){const e=t.includes("fit"),{W:s}=e?this.getTableData():{W:null};return Array.from(t.keys()).map((i=>{const r=t[i];return"fit"===r?null:"auto"===r?e?s[i]:null:Fr(r)?r:this.length2em(r)}))}getColumnWidthsFixed(t,e){const s=Array.from(t.keys()),i=s.filter((e=>"fit"===t[e])),r=s.filter((e=>"auto"===t[e])),n=i.length||r.length,{W:o}=n?this.getTableData():{W:null},a=e-Do([].concat(this.cLines,this.cSpace))-this.fSpace[0]-this.fSpace[2];let c=a;s.forEach((e=>{const s=t[e];c-="fit"===s||"auto"===s?o[e]:this.length2em(s,a)}));const l=n&&c>0?c/n:0;return s.map((e=>{const s=t[e];return"fit"===s?o[e]+l:"auto"===s?o[e]+(0===i.length?l:0):this.length2em(s,a)}))}adjustColumnWidths(t){const{W:e}=this.getTableData(),s=this.getColumnAttributes("columnwidth",0),i=Array.from(s.keys()),r=[...i.filter((t=>"fit"===s[t])).sort(((t,s)=>e[s]-e[t])),...i.filter((t=>"auto"===s[t])).sort(((t,s)=>e[s]-e[t])),...i.filter((t=>Fr(s[t]))).sort(((t,s)=>e[s]-e[t])),...i.filter((t=>"fit"!==s[t]&&"auto"!==s[t]&&!Fr(s[t]))).sort(((t,s)=>e[s]-e[t]))];if(!r.length)return;this.cWidths=i.map((t=>"number"==typeof this.cWidths[t]?this.cWidths[t]:e[t]));const n=t-Do([].concat(this.cLines,this.cSpace))-this.fSpace[0]-this.fSpace[2];let o=Do(this.cWidths)-n,a=0,c=0;for(;c<r.length&&(a+=e[r[c++]],!(a&&o/a<md)););o=1-o/a,r.slice(0,c).forEach((t=>this.cWidths[t]*=o))}getVerticalPosition(t,e){const s=this.node.attributes.get("equalrows"),{H:i,D:r}=this.getTableData(),n=s?this.getEqualRowHeight():0,o=this.getRowHalfSpacing();let a=this.fLine;for(let e=0;e<t;e++)a+=o[e]+(s?n:i[e]+r[e])+o[e+1]+this.rLines[e];const[c,l]=s?[(n+i[t]-r[t])/2,(n-i[t]+r[t])/2]:[i[t],r[t]];return a+={top:0,center:o[t]+(c+l)/2,bottom:o[t]+c+l+o[t+1],baseline:o[t]+c,axis:o[t]+c-.25}[e]||0,a}getFrameSpacing(){const t=this.fframe?this.convertLengths(this.getAttributeArray("framespacing")):[0,0];t[2]=t[0];const e=this.node.attributes.get("data-array-padding");if(e){const[s,i]=this.convertLengths(jr(e));t[0]=s,t[2]=i}return t}getEmHalfSpacing(t,e,s=1){const i=this.addEm(e,2/s);return i.unshift(this.em(t[0]*s)),i.push(this.em(t[1]*s)),i}getRowHalfSpacing(){const t=this.rSpace.map((t=>t/2));return t.unshift(this.fSpace[1]),t.push(this.fSpace[1]),t}getColumnHalfSpacing(){const t=this.cSpace.map((t=>t/2));return t.unshift(this.fSpace[0]),t.push(this.fSpace[2]),t}getAlignmentRow(){const[t,e]=jr(this.node.attributes.get("align"));if(null==e)return[t,null];let s=parseInt(e);return s<0&&(s+=this.numRows+1),[t,s<1||s>this.numRows?null:s-1]}getColumnAttributes(t,e=1){const s=this.numCols-e,i=this.getAttributeArray(t);if(0===i.length)return null;for(;i.length<s;)i.push(i[i.length-1]);return i.length>s&&i.splice(s),i}getRowAttributes(t,e=1){const s=this.numRows-e,i=this.getAttributeArray(t);if(0===i.length)return null;for(;i.length<s;)i.push(i[i.length-1]);return i.length>s&&i.splice(s),i}getAttributeArray(t){const e=this.node.attributes.get(t);return e?jr(e):[this.node.attributes.getDefault(t)]}addEm(t,e=1){return t?t.map((t=>this.em(t/e))):null}convertLengths(t){return t?t.map((t=>this.length2em(t))):null}constructor(t,e,s=null){super(t,e,s),this.numCols=0,this.numRows=0,this.data=null,this.pwidthCells=[],this.pWidth=0,this.numCols=Po(this.tableRows.map((t=>t.numCells))),this.numRows=this.childNodes.length,this.hasLabels=this.childNodes.reduce(((t,e)=>t||e.node.isKind("mlabeledtr")),!1),this.findContainer(),this.isTop=!this.container||this.container.node.isKind("math")&&!this.container.parent,this.isTop&&(this.jax.table=this),this.getPercentageWidth();const i=this.node.attributes,r=i.get("frame");this.frame="none"!==r,this.fframe=this.frame||void 0!==i.get("data-frame-styles"),this.fLine=this.frame?.07:0,this.fSpace=this.getFrameSpacing(),this.cSpace=this.convertLengths(this.getColumnAttributes("columnspacing")),this.rSpace=this.convertLengths(this.getRowAttributes("rowspacing")),this.cLines=this.getColumnAttributes("columnlines").map((t=>"none"===t?0:.07)),this.rLines=this.getRowAttributes("rowlines").map((t=>"none"===t?0:.07)),this.cWidths=this.getColumnWidths(),this.adjustWideTable(),this.stretchColumns(),this.stretchRows()}getStyles(){super.getStyles();const t=this.node.attributes.get("data-frame-styles");if(!t)return;this.styles||(this.styles=new Oo(""));const e=t.split(/ /);for(const t of To.keys()){const s=e[t];"none"!==s&&this.styles.set(`border-${To[t]}`,`.07em ${s}`)}}computeBBox(t,e=!1){const{H:s,D:i}=this.getTableData();let r,n;if(this.node.attributes.get("equalrows")){const t=this.getEqualRowHeight();r=Do([].concat(this.rLines,this.rSpace))+t*this.numRows}else r=Do(s.concat(i,this.rLines,this.rSpace));r+=2*(this.fLine+this.fSpace[1]),n=this.naturalWidth();const o=this.node.attributes.get("width");"auto"!==o&&(n=Math.max(this.length2em(o,0)+2*this.fLine,n));const[a,c]=this.getBBoxHD(r);t.h=a,t.d=c,t.w=n;const[l,h]=this.getBBoxLR();t.L=l,t.R=h,Fr(o)||this.setColumnPWidths()}setChildPWidths(t,e,s){const i=this.node.attributes.get("width");if(!Fr(i))return!1;this.hasLabels||(this.bbox.pwidth="",this.container.bbox.pwidth="");const{w:r,L:n,R:o}=this.bbox,a=this.node.attributes.get("data-width-includes-label"),c=Math.max(r,this.length2em(i,Math.max(e,n+r+o)))-(a?n+o:0),l=this.node.attributes.get("equalcolumns")?Array(this.numCols).fill(this.percent(1/Math.max(1,this.numCols))):this.getColumnAttributes("columnwidth",0);return this.cWidths=this.getColumnWidthsFixed(l,c),this.pWidth=this.naturalWidth(),this.isTop&&(this.bbox.w=this.pWidth),this.setColumnPWidths(),this.pWidth!==r&&this.parent.invalidateBBox(),this.pWidth!==r}getAlignShift(){return this.isTop?super.getAlignShift():[this.container.getChildAlign(this.containerI),0]}}}const gd=function(){var t;const e=fd(Ul);return t=class extends e{constructor(t,e,s=null){super(t,e,s),this.itable=this.html("mjx-itable"),this.labels=this.html("mjx-itable")}getAlignShift(){const t=super.getAlignShift();return this.isTop||(t[1]=0),t}toCHTML(t){const e=this.standardChtmlNodes(t);this.adaptor.append(e[0],this.html("mjx-table",{},[this.itable]));for(const t of this.childNodes)t.toCHTML([this.itable]);this.padRows(),this.handleColumnSpacing(),this.handleColumnLines(),this.handleColumnWidths(),this.handleRowSpacing(),this.handleRowLines(),this.handleRowHeights(),this.handleFrame(),this.handleWidth(),this.handleLabels(),this.handleAlign(),this.handleJustify(),this.shiftColor()}shiftColor(){const t=this.adaptor,e=t.getStyle(this.dom[0],"backgroundColor");e&&(t.setStyle(this.dom[0],"backgroundColor",""),t.setStyle(this.itable,"backgroundColor",e))}padRows(){const t=this.adaptor;for(const e of t.childNodes(this.itable))for(;t.childNodes(e).length<this.numCols;)t.append(e,this.html("mjx-mtd",{extra:!0}))}handleColumnSpacing(){const t=this.childNodes[0]?1/this.childNodes[0].getBBox().rscale:1,e=this.getEmHalfSpacing([this.fSpace[0],this.fSpace[2]],this.cSpace,t);for(const t of this.tableRows){let s=0;for(const i of t.tableCells){const r=e[s++],n=e[s],o=i?i.dom[0]:this.adaptor.childNodes(t.dom[0])[s];(s>1&&"0.4em"!==r||"0"!==r&&1===s)&&this.adaptor.setStyle(o,"paddingLeft",r),(s<this.numCols&&"0.4em"!==n||"0"!==n&&s===this.numCols)&&this.adaptor.setStyle(o,"paddingRight",n)}}}handleColumnLines(){if("none"===this.node.attributes.get("columnlines"))return;const t=this.getColumnAttributes("columnlines");for(const e of this.childNodes){let s=0;const i=this.adaptor.childNodes(e.dom[0]).slice(1);for(const e of i){const i=t[s++];"none"!==i&&this.adaptor.setStyle(e,"borderLeft",".07em "+i)}}}handleColumnWidths(){for(const t of this.childNodes){let e=0;for(const s of this.adaptor.childNodes(t.dom[0])){const t=this.cWidths[e++];if(null!==t){const e="number"==typeof t?this.em(t):t;this.adaptor.setStyle(s,"width",e),this.adaptor.setStyle(s,"maxWidth",e),this.adaptor.setStyle(s,"minWidth",e)}}}}handleRowSpacing(){const t=this.childNodes[0]?1/this.childNodes[0].getBBox().rscale:1,e=this.getEmHalfSpacing([this.fSpace[1],this.fSpace[1]],this.rSpace,t),s=this.fframe;let i=0;for(const t of this.childNodes){const r=e[i++],n=e[i];for(const e of t.childNodes)(i>1&&"0.215em"!==r||s&&1===i)&&this.adaptor.setStyle(e.dom[0],"paddingTop",r),(i<this.numRows&&"0.215em"!==n||s&&i===this.numRows)&&this.adaptor.setStyle(e.dom[0],"paddingBottom",n)}}handleRowLines(){if("none"===this.node.attributes.get("rowlines"))return;const t=this.getRowAttributes("rowlines");let e=0;for(const s of this.childNodes.slice(1)){const i=t[e++];if("none"!==i)for(const t of this.adaptor.childNodes(s.dom[0]))this.adaptor.setStyle(t,"borderTop",".07em "+i)}}handleRowHeights(){this.node.attributes.get("equalrows")&&this.handleEqualRows()}handleEqualRows(){const t=this.getRowHalfSpacing(),{H:e,D:s,NH:i,ND:r}=this.getTableData(),n=this.getEqualRowHeight();for(let o=0;o<this.numRows;o++){const a=this.childNodes[o];this.setRowHeight(a,n+t[o]+t[o+1]+this.rLines[o]),n!==i[o]+r[o]&&this.setRowBaseline(a,n,(n-e[o]+s[o])/2)}}setRowHeight(t,e){this.adaptor.setStyle(t.dom[0],"height",this.em(e))}setRowBaseline(t,e,s){const i=t.node.attributes.get("rowalign");for(const r of t.childNodes)if(this.setCellBaseline(r,i,e,s))break}setCellBaseline(t,e,s,i){const r=t.node.attributes.get("rowalign");if("baseline"===r||"axis"===r){const r=this.adaptor,n=r.lastChild(t.dom[0]);r.setStyle(n,"height",this.em(s)),r.setStyle(n,"verticalAlign",this.em(-i));const o=t.parent;if(!(o.node.isKind("mlabeledtr")&&t===o.childNodes[0]||"baseline"!==e&&"axis"!==e))return!0}return!1}handleFrame(){if(this.frame&&this.fLine){const t=this.node.attributes.get("frame");this.adaptor.setStyle(this.itable,"border",`${this.em(this.fLine)} ${t}`)}}handleWidth(){const t=this.adaptor,e=this.dom[0],{w:s,L:i,R:r}=this.getBBox();t.setStyle(e,"minWidth",this.em(i+s+r));let n=this.node.attributes.get("width");if(Fr(n))t.setStyle(e,"width",""),t.setAttribute(e,"width","full");else if(!this.hasLabels){if("auto"===n)return;n=this.em(this.length2em(n)+2*this.fLine)}const o=t.firstChild(e);if(t.setStyle(o,"width",n),t.setStyle(o,"minWidth",this.em(s)),i||r){t.setStyle(e,"margin","");const s=this.node.attributes.get("data-width-includes-label")?"padding":"margin";i===r?t.setStyle(o,s,"0 "+this.em(r)):t.setStyle(o,s,"0 "+this.em(r)+" 0 "+this.em(i))}t.setAttribute(this.itable,"width","full")}handleAlign(){const[t,e]=this.getAlignmentRow(),s=this.dom[0];if(null===e)"axis"!==t&&this.adaptor.setAttribute(s,"align",t);else{const i=this.getVerticalPosition(e,t);this.adaptor.setAttribute(s,"align","top"),this.adaptor.setStyle(s,"verticalAlign",this.em(i))}}handleJustify(){const t=this.getAlignShift()[0];"center"!==t&&this.adaptor.setAttribute(this.dom[0],"justify",t)}handleLabels(){if(!this.hasLabels)return;const t=this.labels,e=this.node.attributes,s=this.adaptor,i=e.get("side");s.setAttribute(this.dom[0],"side",i),s.setAttribute(t,"align",i),s.setStyle(t,i,"0");const[r,n]=this.addLabelPadding(i);if(n){const t=s.firstChild(this.dom[0]);this.setIndent(t,r,n)}this.updateRowHeights(),this.addLabelSpacing()}addLabelPadding(t){const[,e,s]=this.getPadAlignShift(t),i={};if("right"===t&&!this.node.attributes.get("data-width-includes-label")){const t=this.node.attributes.get("width"),{w:e,L:s,R:r}=this.getBBox();i.style={width:Fr(t)?"calc("+t+" + "+this.em(s+r)+")":this.em(s+e+r)}}return this.adaptor.append(this.dom[0],this.html("mjx-labels",i,[this.labels])),[e,s]}updateRowHeights(){const{H:t,D:e,NH:s,ND:i}=this.getTableData(),r=this.getRowHalfSpacing();for(let n=0;n<this.numRows;n++){const o=this.childNodes[n];this.setRowHeight(o,t[n]+e[n]+r[n]+r[n+1]+this.rLines[n]),t[n]!==s[n]||e[n]!==i[n]?this.setRowBaseline(o,t[n]+e[n],e[n]):o.node.isKind("mlabeledtr")&&this.setCellBaseline(o.childNodes[0],"",t[n]+e[n],e[n])}}addLabelSpacing(){const t=this.adaptor,e=this.node.attributes.get("equalrows"),{H:s,D:i}=this.getTableData(),r=e?this.getEqualRowHeight():0,n=this.getRowHalfSpacing();let o=this.fLine,a=t.firstChild(this.labels);for(let c=0;c<this.numRows;c++){this.childNodes[c].node.isKind("mlabeledtr")?(o&&t.insert(this.html("mjx-mtr",{style:{height:this.em(o)}}),a),t.setStyle(a,"height",this.em((e?r:s[c]+i[c])+n[c]+n[c+1])),a=t.next(a),o=this.rLines[c]):o+=n[c]+(e?r:s[c]+i[c])+n[c+1]+this.rLines[c]}}},t.kind=mn.prototype.kind,t.styles={"mjx-mtable":{"vertical-align":".25em","text-align":"center",position:"relative","box-sizing":"border-box","border-spacing":0,"border-collapse":"collapse"},'mjx-mstyle[size="s"] mjx-mtable':{"vertical-align":".354em"},"mjx-labels":{position:"absolute",left:0,top:0},"mjx-table":{display:"inline-block","vertical-align":"-.5ex","box-sizing":"border-box"},"mjx-table > mjx-itable":{"vertical-align":"middle","text-align":"left","box-sizing":"border-box"},"mjx-labels > mjx-itable":{position:"absolute",top:0},'mjx-mtable[justify="left"]':{"text-align":"left"},'mjx-mtable[justify="right"]':{"text-align":"right"},'mjx-mtable[justify="left"][side="left"]':{"padding-right":"0 ! important"},'mjx-mtable[justify="left"][side="right"]':{"padding-left":"0 ! important"},'mjx-mtable[justify="right"][side="left"]':{"padding-right":"0 ! important"},'mjx-mtable[justify="right"][side="right"]':{"padding-left":"0 ! important"},"mjx-mtable[align]":{"vertical-align":"baseline"},'mjx-mtable[align="top"] > mjx-table':{"vertical-align":"top"},'mjx-mtable[align="bottom"] > mjx-table':{"vertical-align":"bottom"},'mjx-mtable[side="right"] mjx-labels':{"min-width":"100%"}},t}();function bd(t){return class extends t{get numCells(){return this.childNodes.length}get labeled(){return!1}get tableCells(){return this.childNodes}getChild(t){return this.childNodes[t]}getChildBBoxes(){return this.childNodes.map((t=>t.getBBox()))}stretchChildren(t=null){const e=[],s=this.labeled?this.childNodes.slice(1):this.childNodes;for(const t of s){const s=t.childNodes[0];s.canStretch(yl.Vertical)&&e.push(s)}const i=e.length,r=this.childNodes.length;if(i&&r>1&&!t){let e=0,n=0;const o=i>1&&i===r;for(const t of s){const s=t.childNodes[0],i=s.stretch.dir===yl.None;if(o||i){const{h:t,d:r}=s.getBBox(i);t>e&&(e=t),r>n&&(n=r)}}t=[e,n]}if(t)for(const s of e){const e=s.coreRScale();s.coreMO().getStretchedVariant(t.map((t=>t*e)))}}get fixesPWidth(){return!1}}}function Ed(t){return class extends t{get numCells(){return Math.max(0,this.childNodes.length-1)}get labeled(){return!0}get tableCells(){return this.childNodes.slice(1)}getChild(t){return this.childNodes[t+1]}getChildBBoxes(){return this.childNodes.slice(1).map((t=>t.getBBox()))}}}const Nd=function(){var t;const e=bd(Ul);return(t=class extends e{toCHTML(t){super.toCHTML(t);const e=this.node.attributes.get("rowalign");"baseline"!==e&&this.adaptor.setAttribute(this.dom[0],"rowalign",e)}}).kind=fn.prototype.kind,t.styles={"mjx-mtr":{display:"table-row"},'mjx-mtr[rowalign="top"] > mjx-mtd':{"vertical-align":"top"},'mjx-mtr[rowalign="center"] > mjx-mtd':{"vertical-align":"middle"},'mjx-mtr[rowalign="bottom"] > mjx-mtd':{"vertical-align":"bottom"},'mjx-mtr[rowalign="baseline"] > mjx-mtd':{"vertical-align":"baseline"},'mjx-mtr[rowalign="axis"] > mjx-mtd':{"vertical-align":".25em"}},t}(),yd=function(){var t;const e=Ed(Nd);return(t=class extends e{toCHTML(t){super.toCHTML(t);const e=this.adaptor.firstChild(this.dom[0]);if(e){this.adaptor.remove(e);const t=this.node.attributes.get("rowalign"),s="baseline"!==t&&"axis"!==t?{rowalign:t}:{},i=this.html("mjx-mtr",s,[e]);this.adaptor.append(this.parent.labels,i)}}markUsed(){super.markUsed(),this.jax.wrapperUsage.add(Nd.kind)}}).kind=gn.prototype.kind,t.styles={"mjx-mlabeledtr":{display:"table-row"},'mjx-mlabeledtr[rowalign="top"] > mjx-mtd':{"vertical-align":"top"},'mjx-mlabeledtr[rowalign="center"] > mjx-mtd':{"vertical-align":"middle"},'mjx-mlabeledtr[rowalign="bottom"] > mjx-mtd':{"vertical-align":"bottom"},'mjx-mlabeledtr[rowalign="baseline"] > mjx-mtd':{"vertical-align":"baseline"},'mjx-mlabeledtr[rowalign="axis"] > mjx-mtd':{"vertical-align":".25em"}},t}();function xd(t){return class extends t{get fixesPWidth(){return!1}invalidateBBox(){this.bboxComputed=!1,this.lineBBox=[]}getWrapWidth(t){const e=this.parent.parent,s=this.parent,i=this.node.childPosition()-(s.labeled?1:0);return"number"==typeof e.cWidths[i]?e.cWidths[i]:e.getTableData().W[i]}getChildAlign(t){return this.node.attributes.get("columnalign")}}}const vd=function(){var t;const e=xd(Ul);return(t=class extends e{toCHTML(t){super.toCHTML(t);const e=this.node.attributes.get("rowalign"),s=this.node.attributes.get("columnalign");e!==this.parent.node.attributes.get("rowalign")&&this.adaptor.setAttribute(this.dom[0],"rowalign",e),"center"===s||"mlabeledtr"===this.parent.kind&&this===this.parent.childNodes[0]&&s===this.parent.parent.node.attributes.get("side")||this.adaptor.setStyle(this.dom[0],"textAlign",s),this.parent.parent.node.getProperty("useHeight")&&this.adaptor.append(this.dom[0],this.html("mjx-tstrut"))}}).kind=bn.prototype.kind,t.styles={"mjx-mtd":{display:"table-cell","text-align":"center",padding:".215em .4em"},"mjx-mtd:first-child":{"padding-left":0},"mjx-mtd:last-child":{"padding-right":0},"mjx-mtable > * > mjx-itable > *:first-child > mjx-mtd":{"padding-top":0},"mjx-mtable > * > mjx-itable > *:last-child > mjx-mtd":{"padding-bottom":0},"mjx-tstrut":{display:"inline-block",height:"1em","vertical-align":"-.25em"},'mjx-labels[align="left"] > mjx-mtr > mjx-mtd':{"text-align":"left"},'mjx-labels[align="right"] > mjx-mtr > mjx-mtd':{"text-align":"right"},"mjx-mtd[extra]":{padding:0},'mjx-mtd[rowalign="top"]':{"vertical-align":"top"},'mjx-mtd[rowalign="center"]':{"vertical-align":"middle"},'mjx-mtd[rowalign="bottom"]':{"vertical-align":"bottom"},'mjx-mtd[rowalign="baseline"]':{"vertical-align":"baseline"},'mjx-mtd[rowalign="axis"]':{"vertical-align":".25em"}},t}(),Cd={dx:".2em",dy:".1em",postDelay:600,clearDelay:100,hoverTimer:new Map,clearTimer:new Map,stopTimers:(t,e)=>{e.clearTimer.has(t)&&(clearTimeout(e.clearTimer.get(t)),e.clearTimer.delete(t)),e.hoverTimer.has(t)&&(clearTimeout(e.hoverTimer.get(t)),e.hoverTimer.delete(t))}};function Td(t){return class extends t{get selected(){const t=this.node.attributes.get("selection"),e=Math.max(1,Math.min(this.childNodes.length,t))-1;return this.childNodes[e]||this.wrap(this.node.selected)}getParameters(){const t=this.node.attributes.get("data-offsets"),[e,s]=jr(t||"");this.tipDx=this.length2em(e||Cd.dx),this.tipDy=this.length2em(s||Cd.dy)}constructor(t,e,s=null){super(t,e,s);const i=this.constructor.actions,r=this.node.attributes.get("actiontype"),[n,o]=i.get(r)||[(t,e)=>{},{}];this.action=n,this.data=o,this.getParameters()}computeBBox(t,e=!1){t.updateFrom(this.selected.getOuterBBox()),this.selected.setChildPWidths(e)}get breakCount(){return this.node.isEmbellished?this.selected.coreMO().embellishedBreakCount:this.selected.breakCount}computeLineBBox(t){return this.getChildLineBBox(this.selected,t)}}}const wd=function(){var t;const e=Td(Ul);return(t=class extends e{setEventHandler(t,e,s=null){(s?[s]:this.dom).forEach((s=>s.addEventListener(t,e)))}Em(t){return this.em(t)}toCHTML(t){if(this.toEmbellishedCHTML(t))return;const e=this.standardChtmlNodes(t);this.selected.toCHTML(e),this.action(this,this.data)}}).kind=rn.prototype.kind,t.styles={"mjx-maction":{position:"relative"},"mjx-maction > mjx-tool":{display:"none",position:"absolute",bottom:0,right:0,width:0,height:0,"z-index":500},"mjx-tool > mjx-tip":{display:"inline-block","line-height":0,padding:".2em",border:"1px solid #888","background-color":"#F8F8F8",color:"black","box-shadow":"2px 2px 5px #AAAAAA"},"mjx-maction[toggle]":{cursor:"pointer"},"mjx-status":{display:"block",position:"fixed",left:"1em",bottom:"1em","min-width":"25%",padding:".2em .4em",border:"1px solid #888","font-size":"90%","background-color":"#F8F8F8",color:"black"}},t.actions=new Map([["toggle",[(t,e)=>{t.dom.forEach((e=>{t.adaptor.setAttribute(e,"toggle",t.node.attributes.get("selection"))}));const s=t.factory.jax.math,i=t.factory.jax.document,r=t.node;t.setEventHandler("click",(t=>{s.end.node||(s.start.node=s.end.node=s.typesetRoot,s.start.n=s.end.n=0),r.nextToggleSelection(),s.rerender(i,r.attributes.get("data-maction-id")?rr.ENRICHED:rr.RERENDER),t.stopPropagation()}))},{}]],["tooltip",[(t,e)=>{const s=t.childNodes[1];if(s)if(s.node.isKind("mtext")){const e=s.node.getText();t.dom.forEach((s=>t.adaptor.setAttribute(s,"title",e)))}else{const i=t.adaptor;for(const r of t.dom){const n=i.append(r,t.html("mjx-tool",{style:{bottom:t.Em(-t.tipDy),right:t.Em(-t.tipDx)}},[t.html("mjx-tip")]));s.toCHTML([i.firstChild(n)]),t.setEventHandler("mouseover",(t=>{e.stopTimers(r,e);const s=setTimeout((()=>i.setStyle(n,"display","block")),e.postDelay);e.hoverTimer.set(r,s),t.stopPropagation()}),r),t.setEventHandler("mouseout",(t=>{e.stopTimers(r,e);const s=setTimeout((()=>i.setStyle(n,"display","")),e.clearDelay);e.clearTimer.set(r,s),t.stopPropagation()}),r)}}},Cd]],["statusline",[(t,e)=>{const s=t.childNodes[1];if(s&&s.node.isKind("mtext")){const i=t.adaptor,r=s.node.getText();t.dom.forEach((t=>i.setAttribute(t,"statusline",r))),t.setEventHandler("mouseover",(s=>{if(null===e.status){const s=i.body(i.document);e.status=i.append(s,t.html("mjx-status",{},[t.text(r)]))}s.stopPropagation()})),t.setEventHandler("mouseout",(t=>{e.status&&(i.remove(e.status),e.status=null),t.stopPropagation()}))}},{status:null}]]]),t}();function _d(t){return class extends t{constructor(t,e,s=null){super(t,e,s),this.getParameters()}getParameters(){const{width:t,height:e,valign:s,src:i,index:r}=this.node.attributes.getList("width","height","valign","src","index");if(i)this.width="auto"===t?1:this.length2em(t),this.height="auto"===e?1:this.length2em(e),this.valign=this.length2em(s||"0");else{const t=String.fromCodePoint(parseInt(r)),e=this.node.factory;this.charWrapper=this.wrap(e.create("text").setText(t)),this.charWrapper.parent=this}}computeBBox(t,e=!1){this.charWrapper?t.updateFrom(this.charWrapper.getBBox()):(t.w=this.width,t.h=this.height+this.valign,t.d=-this.valign)}}}const kd=function(){var t;const e=_d(Ul);return(t=class extends e{toCHTML(t){const e=this.standardChtmlNodes(t);if(this.charWrapper)return void this.charWrapper.toCHTML(e);const{src:s,alt:i}=this.node.attributes.getList("src","alt"),r={width:this.em(this.width),height:this.em(this.height)};this.valign&&(r.verticalAlign=this.em(this.valign));const n=this.html("img",{src:s,style:r,alt:i,title:i});this.adaptor.append(e[0],n)}}).kind=yn.prototype.kind,t.styles={"mjx-mglyph > img":{display:"inline-block",border:0,padding:0}},t}();function Ad(t){return class extends t{computeBBox(t,e=!1){if(this.childNodes.length){const{w:e,h:s,d:i}=this.childNodes[0].getBBox();t.w=e,t.h=s,t.d=i}}get breakCount(){return this.node.isEmbellished?this.coreMO().embellishedBreakCount:this.childNodes[0].breakCount}}}function Ld(t){class e extends t{constructor(t,e,s=null){super(t,e,s),this.rscale=this.getRScale()}computeBBox(t,e=!1){const s=this.node.getXML(),i=this.getHDW(s,"use","force"),{h:r,d:n,w:o}=i?this.splitHDW(i):this.measureXmlNode(s);t.w=o,t.h=r,t.d=n}getHTML(){let t=this.adaptor.clone(this.node.getXML());const e=this.getFontStyles();return(this.getHDW(t,"force")||1!==this.jax.options.scale)&&(t=this.addHDW(t,e)),this.html("mjx-html",{variant:this.parent.variant,style:e},[t])}getHDW(t,e,s=e){const i=this.jax.options.htmlHDW,r=this.adaptor.getAttribute(t,"data-mjx-hdw");return!r||i!==e&&i!==s?null:r}splitHDW(t){const e=1/this.metrics.scale,[s,i,r]=jr(t).map((t=>this.length2em(t||"0")*e));return{h:s,d:i,w:r}}getFontStyles(){var t;const e=this.adaptor,s=this.metrics;return{"font-family":(null===(t=this.parent.styles)||void 0===t?void 0:t.get("font-family"))||s.family||e.fontFamily(e.parent(this.jax.math.start.node))||"initial","font-size":this.jax.fixed(s.em*this.rscale)+"px"}}measureXmlNode(t){const e=this.adaptor,s=this.html("mjx-xml-block",{style:{display:"inline-block"}},[e.clone(t)]),i=this.html("mjx-baseline",{style:{display:"inline-block",width:0,height:0}}),r=this.getFontStyles(),n=this.html("mjx-measure-xml",{style:r},[i,s]),o=this.jax.container;e.append(e.parent(this.jax.math.start.node),o),e.append(o,n);const a=this.metrics,c=a.em*a.scale*this.rscale,{left:l,right:h,bottom:d,top:u}=e.nodeBBox(s),p=(h-l)/c,m=(e.nodeBBox(i).top-u)/c,f=(d-u)/c-m;return e.remove(o),e.remove(n),{w:p,h:m,d:f}}getStyles(){}getScale(){}getVariant(){}}return e.autoStyle=!1,e.styles={"mjx-measure-xml":{position:"absolute",left:0,top:0,display:"inline-block","line-height":"normal","white-space":"normal"},"mjx-html":{display:"inline-block","line-height":"normal","text-align":"initial","white-space":"initial"},"mjx-html-holder":{display:"block",position:"absolute",top:0,left:0,bottom:0,right:0}},e}const Md=function(){var t;const e=Ad(Ul);return(t=class extends e{toCHTML(t){if(this.toEmbellishedCHTML(t))return;const e=this.standardChtmlNodes(t);this.childNodes.length&&this.childNodes[0].toCHTML(e)}}).kind=xn.prototype.kind,t}(),Id=((Sd=class extends Ul{toCHTML(t){super.toCHTML(t)}computeBBox(){return this.bbox}}).kind=Cn.prototype.kind,Sd);var Sd;const Rd=function(){var t;return(t=class extends Ul{}).kind=vn.prototype.kind,t.styles={"mjx-annotation-xml":{"font-family":"initial","line-height":"normal"}},t}(),Od=function(){var t;const e=Ld(Ul);return(t=class extends e{toCHTML(t){this.markUsed(),this.dom=[this.adaptor.append(t[0],this.getHTML())]}addHDW(t,e){const s=this.jax.options.scale,{h:i,d:r,w:n}=this.bbox,o=s*this.metrics.scale;return e.width=this.em(n*o),e.height=this.em((i+r)*o),e["vertical-align"]=this.em(-r*o),e.position="relative",this.html("mjx-html-holder",{style:{transform:`scale(${this.jax.fixed(s)})`,"transform-origin":"top left"}},[t])}}).kind=Tr.prototype.kind,t}();function Dd(t){return class extends t{computeBBox(t,e=!1){super.computeBBox(t,e),this.childNodes[0]&&this.childNodes[0].bbox.ic&&(t.ic=this.childNodes[0].bbox.ic)}}}const Pd=function(){var t;const e=Dd(Ul);return(t=class extends e{toCHTML(t){super.toCHTML(t),this.dom.forEach((t=>this.adaptor.setAttribute(t,"texclass",pr[this.node.texClass])))}}).kind=Tn.prototype.kind,t}();function Bd(t){return class extends t{remappedText(t,e){const s=this.parent.stretch.c;return s?[s]:this.parent.remapChars(this.unicodeChars(t,e))}computeBBox(t,e=!1){const s=this.parent.variant,i=this.node.getText();if("-explicitFont"===s){const e=this.jax.getFontData(this.parent.styles),{w:r,h:n,d:o}=this.jax.measureText(i,s,e);t.h=n,t.d=o,t.w=r}else{const e=this.remappedText(i,s);let r="";t.empty();for(let i=0;i<e.length;i++){const[n,o,a,c]=this.getVariantChar(s,e[i]);if(c.unknown)r+=String.fromCodePoint(e[i]);else{if(r=this.addUtextBBox(t,r,s),this.updateBBox(t,n,o,a),t.ic=c.ic||0,t.sk=c.sk||0,t.dx=c.dx||0,!c.oc||i<e.length-1)continue;const l=this.parent.childNodes;if(this.node!==l[l.length-1].node)continue;const h=this.parent.parent.node;let d=h.isKind("mrow")||h.isInferred?h.childNodes[h.childIndex(this.parent.node)+1]:null;(null==d?void 0:d.isKind("mo"))&&"\u2062"===d.getText()&&(d=h.childNodes[h.childIndex(d)+1]),d&&d.attributes.get("mathvariant")===s?t.oc=c.oc:t.ic=c.oc}}this.addUtextBBox(t,r,s),e.length>1&&(t.sk=0),t.clean()}}addUtextBBox(t,e,s){if(e){const{h:i,d:r,w:n}=this.jax.measureText(e,s);this.updateBBox(t,i,r,n)}return""}updateBBox(t,e,s,i){t.w+=i,e>t.h&&(t.h=e),s>t.d&&(t.d=s)}getStyles(){}getVariant(){}getScale(){}getSpace(){}}}const Fd=function(){var t;const e=Bd(Ul);return t=class extends e{toCHTML(t){this.markUsed();const e=t[0],s=this.adaptor,i=this.parent.variant,r=this.node.getText();if(0===r.length)return;const n=this.getBBox();if("-explicitFont"===i)s.append(e,this.jax.unknownText(r,i,n.w));else{let t="";const o=this.remappedText(r,i),a=o.length>1?this.em(this.parent.getBBox().h):"",c=o.length;for(let r=0;r<c;r++){const l=o[r],h=this.getVariantChar(i,l)[3];if(h.unknown)t+=String.fromCodePoint(l);else{t=this.addUtext(t,i,e);const o=h.ff||(h.f?`${this.font.cssFontPrefix}-${h.f}`:""),d=s.append(e,this.html("mjx-c",{class:this.char(l)+(o?" "+o:"")},[this.text(h.c||String.fromCodePoint(l))]));(r<c-1||n.oc)&&s.setAttribute(d,"noic","true"),a&&s.setStyle(d,"padding-top",a),this.font.charUsage.add([i,l])}}this.addUtext(t,i,e)}}addUtext(t,e,s){return t&&this.adaptor.append(s,this.jax.unknownText(t,e)),""}},t.kind=Cr.prototype.kind,t.autoStyle=!1,t.styles={"mjx-c":{display:"inline-block",width:0,"text-align":"right"},"mjx-utext":{display:"inline-block",padding:".75em 0 .2em 0"}},t}(),jd=function(){var t;return(t=class extends Od{}).kind=_n.prototype.kind,t}(),Ud={[Hl.kind]:Hl,[Uh.kind]:Uh,[qh.kind]:qh,[zl.kind]:zl,[Kl.kind]:Kl,[Yl.kind]:Yl,[Zl.kind]:Zl,[eh.kind]:eh,[ih.kind]:ih,[nh.kind]:nh,[Bh.kind]:Bh,[Xh.kind]:Xh,[Gh.kind]:Gh,[Kh.kind]:Kh,[ed.kind]:ed,[sd.kind]:sd,[id.kind]:id,[ad.kind]:ad,[cd.kind]:cd,[ld.kind]:ld,[pd.kind]:pd,[Wh.kind]:Wh,[gd.kind]:gd,[Nd.kind]:Nd,[yd.kind]:yd,[vd.kind]:vd,[wd.kind]:wd,[kd.kind]:kd,[Md.kind]:Md,[Id.kind]:Id,[Rd.kind]:Rd,[Od.kind]:Od,[Pd.kind]:Pd,[Fd.kind]:Fd,[jd.kind]:jd,[Ul.kind]:Ul};class qd extends Rl{}qd.defaultNodes=Ud;const Hd={40:{dir:xl,sizes:[.997,1.095,1.195,1.445,1.793,2.093,2.393,2.991],stretch:[9115,9116,9117],HDW:[.748,.248,.875]},41:{dir:xl,sizes:[.997,1.095,1.195,1.445,1.793,2.093,2.393,2.991],stretch:[9118,9119,9120],HDW:[.748,.248,.875]},45:{c:8722,dir:vl,stretch:[0,8722],HDW:[.583,.083,.778],ext:.112,hd:[.583,.083]},47:{dir:xl,sizes:[1.001,1.311,1.717,2.249,2.945,3.859,5.055,6.621]},61:{dir:vl,stretch:[0,61],HDW:[.367,-.133,.778],ext:.112,hd:[.367,-.133]},91:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[9121,9122,9123],HDW:[.75,.25,.667]},92:{dir:xl,sizes:[1.001,1.311,1.717,2.249,2.945,3.859,5.055,6.621]},93:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[9124,9125,9126],HDW:[.75,.25,.667]},94:{c:770,dir:vl,sizes:[.5,.644,.768,.919,1.1,1.32,1.581,1.896]},95:{c:8211,dir:vl,stretch:[0,8211],HDW:[.277,-.255,.5],ext:.001,hd:[.277,-.255]},123:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[9127,123,9129,9128],stretchv:[0,1,0,0],HDW:[.75,.25,.902]},124:{dir:xl,sizes:[1.001,1.203,1.443,1.735,2.085,2.505,3.005,3.605],schar:[124,8739],stretch:[0,8739],stretchv:[0,2],HDW:[.75,.25,.333]},125:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[9131,123,9133,9132],stretchv:[0,1,0,0],HDW:[.75,.25,.902]},126:{c:771,dir:vl,sizes:[.5,.652,.778,.931,1.115,1.335,1.599,1.915]},175:{c:773,dir:vl,sizes:[.392,.568],stretch:[0,773],stretchv:[0,1],HDW:[.67,-.63,0],hd:[.67,-.63]},710:{c:770,dir:vl,sizes:[.5,.644,.768,.919,1.1,1.32,1.581,1.896]},711:{c:780,dir:vl,sizes:[.366,.644,.768,.919,1.1,1.32,1.581,1.896]},713:{c:773,dir:vl,sizes:[.392,.568],stretch:[0,773],stretchv:[0,1],HDW:[.67,-.63,0],hd:[.67,-.63]},728:{c:774,dir:vl,sizes:[.376,.658,.784,.937,1.12,1.341,1.604,1.92]},732:{c:771,dir:vl,sizes:[.5,.652,.778,.931,1.115,1.335,1.599,1.915]},770:{dir:vl,sizes:[.5,.644,.768,.919,1.1,1.32,1.581,1.896]},771:{dir:vl,sizes:[.5,.652,.778,.931,1.115,1.335,1.599,1.915]},773:{dir:vl,sizes:[.392,.568],stretch:[0,773],stretchv:[0,1],HDW:[.67,-.63,0],hd:[.67,-.63]},774:{dir:vl,sizes:[.376,.658,.784,.937,1.12,1.341,1.604,1.92]},780:{dir:vl,sizes:[.366,.644,.768,.919,1.1,1.32,1.581,1.896]},8211:{dir:vl,stretch:[0,8211],HDW:[.277,-.255,.5],ext:.001,hd:[.277,-.255]},8212:{dir:vl,stretch:[0,8212],HDW:[.277,-.255,1],ext:.001,hd:[.277,-.255]},8213:{dir:vl,stretch:[0,8213],HDW:[.27,-.23,1.152],ext:.112,hd:[.27,-.23]},8214:{dir:xl,sizes:[1.001,1.203,1.443,1.735,2.085,2.503,3.004,3.607],schar:[8214,8741],stretch:[0,8741],stretchv:[0,2],HDW:[.75,.25,.555]},8254:{c:175,dir:vl,sizes:[.392,.568],stretch:[0,773],stretchv:[0,1],HDW:[.67,-.63,0],hd:[.67,-.63]},8260:{dir:xl,sizes:[1.001,1.311,1.717,2.249,2.945,3.859,5.055,6.621]},8400:{dir:vl,sizes:[.422,.667],stretch:[8400,8400],stretchv:[3,1],HDW:[.711,-.601,0],hd:[.631,-.601]},8401:{dir:vl,sizes:[.422,.667],stretch:[0,8400,8401],stretchv:[0,1,4],HDW:[.711,-.601,0],hd:[.631,-.601]},8406:{dir:vl,sizes:[.416,.659],stretch:[8406,8400],stretchv:[3,1],HDW:[.711,-.521,0],hd:[.631,-.601]},8407:{dir:vl,sizes:[.416,.659],stretch:[0,8400,8407],stretchv:[0,1,4],HDW:[.711,-.521,0],hd:[.631,-.601]},8417:{dir:vl,sizes:[.47,.715],stretch:[8406,8400,8407],stretchv:[3,1,4],HDW:[.711,-.521,0],hd:[.631,-.601]},8428:{dir:vl,sizes:[.422,.667],stretch:[0,845,8428],stretchv:[0,1,4],HDW:[-.171,.281,0],hd:[-.171,.201]},8429:{dir:vl,sizes:[.422,.667],stretch:[8429,845],stretchv:[3,1],HDW:[-.171,.281,0],hd:[-.171,.201]},8430:{dir:vl,sizes:[.416,.659],stretch:[8430,845],stretchv:[3,1],HDW:[-.091,.281,0],hd:[-.171,.201]},8431:{dir:vl,sizes:[.416,.659],stretch:[0,845,8431],stretchv:[0,1,4],HDW:[-.091,.281,0],hd:[-.171,.201]},8512:{dir:xl,sizes:[.684,1.401],variants:[0,2]},8592:{dir:vl,sizes:[1,1.463],variants:[0,0],schar:[8592,10229],stretch:[8592,8592],stretchv:[3,1],HDW:[.51,.01,1],hd:[.274,-.226]},8593:{dir:xl,sizes:[.883,1.349],variants:[0,2],stretch:[8593,8593],stretchv:[3,1],HDW:[.679,.203,.5]},8594:{dir:vl,sizes:[1,1.463],variants:[0,0],schar:[8594,10230],stretch:[0,8592,8594],stretchv:[0,1,4],HDW:[.51,.01,1],hd:[.274,-.226]},8595:{dir:xl,sizes:[.883,1.349],variants:[0,2],stretch:[0,8593,8595],stretchv:[0,1,4],HDW:[.703,.179,.5]},8596:{dir:vl,sizes:[1,1.442],variants:[0,0],schar:[8596,10231],stretch:[8592,8592,8594],stretchv:[3,1,4],HDW:[.51,.01,1],hd:[.274,-.226]},8597:{dir:xl,sizes:[1.015,1.015],variants:[0,2],stretch:[8593,8593,8595],stretchv:[3,1,4],HDW:[.757,.257,.5]},8598:{dir:xl,sizes:[.918,1.384],variants:[0,2]},8599:{dir:xl,sizes:[.918,1.384],variants:[0,2]},8600:{dir:xl,sizes:[.918,1.384],variants:[0,2]},8601:{dir:xl,sizes:[.918,1.384],variants:[0,2]},8602:{dir:vl,sizes:[.997,1.463],variants:[0,2],stretch:[8602,8592,0,8602],stretchv:[3,1,0,1],HDW:[.51,.01,.997],hd:[.274,-.226]},8603:{dir:vl,sizes:[.997,1.463],variants:[0,2],stretch:[0,8592,8603,8602],stretchv:[0,1,4,1],HDW:[.51,.01,.997],hd:[.274,-.226]},8606:{dir:vl,sizes:[1.017,1.463],variants:[0,2],stretch:[8606,8592],stretchv:[3,1],HDW:[.51,.01,1.017],hd:[.274,-.226]},8608:{dir:vl,sizes:[1.017,1.463],variants:[0,2],stretch:[0,8592,8608],stretchv:[0,1,4],HDW:[.51,.01,1.017],hd:[.274,-.226]},8610:{dir:vl,sizes:[1.192,1.658],variants:[0,2],stretch:[8592,8592,8610],stretchv:[3,1,4],HDW:[.51,.01,1.192],hd:[.274,-.226]},8611:{dir:vl,sizes:[1.192,1.658],variants:[0,2],stretch:[8611,8592,8594],stretchv:[3,1,4],HDW:[.51,.01,1.192],hd:[.274,-.226]},8612:{dir:vl,sizes:[.977,1.443],variants:[0,0],schar:[8612,10235],stretch:[8592,8592,8612],stretchv:[3,1,4],HDW:[.51,.011,.977],hd:[.274,-.226]},8614:{dir:vl,sizes:[.977,1.443],variants:[0,0],schar:[8614,10236],stretch:[8614,8592,8594],stretchv:[3,1,4],HDW:[.51,.011,.977],hd:[.274,-.226]},8617:{dir:vl,sizes:[.997,1.463],variants:[0,2],stretch:[8592,8617,8617],stretchv:[3,1,4],HDW:[.546,.01,.997],hd:[.274,-.226]},8618:{dir:vl,sizes:[.997,1.463],variants:[0,2],stretch:[8618,8617,8594],stretchv:[3,1,4],HDW:[.546,.01,.997],hd:[.274,-.226]},8619:{dir:vl,sizes:[.997,1.463],variants:[0,2],stretch:[8592,8617,8619],stretchv:[3,1,4],HDW:[.55,.05,.997],hd:[.274,-.226]},8620:{dir:vl,sizes:[.997,1.463],variants:[0,2],stretch:[8620,8617,8594],stretchv:[3,1,4],HDW:[.55,.05,.997],hd:[.274,-.226]},8630:{dir:vl,sizes:[.98,1.33],variants:[0,2]},8631:{dir:vl,sizes:[.98,1.33],variants:[0,2]},8636:{dir:vl,sizes:[1,1.478],variants:[0,2],stretch:[8636,8636],stretchv:[3,1],HDW:[.499,-.226,1],hd:[.273,-.226]},8637:{dir:vl,sizes:[1.012,1.478],variants:[0,2],stretch:[8637,8636],stretchv:[3,1],HDW:[.273,0,1.012],hd:[.273,-.226]},8638:{dir:xl,sizes:[.901,1.367],variants:[0,2],stretch:[8638,8638],stretchv:[3,1],HDW:[.697,.203,.441]},8639:{dir:xl,sizes:[.901,1.367],variants:[0,2],stretch:[8639,8639],stretchv:[3,1],HDW:[.697,.203,.441]},8640:{dir:vl,sizes:[1,1.478],variants:[0,2],stretch:[0,8636,8640],stretchv:[0,1,4],HDW:[.499,-.226,1],hd:[.273,-.226]},8641:{dir:vl,sizes:[1.012,1.478],variants:[0,2],stretch:[0,8636,8641],stretchv:[0,1,4],HDW:[.273,0,1.012],hd:[.273,-.226]},8642:{dir:xl,sizes:[.901,1.367],variants:[0,2],stretch:[0,8638,8642],stretchv:[0,1,4],HDW:[.703,.197,.441]},8643:{dir:xl,sizes:[.901,1.367],variants:[0,2],stretch:[0,8639,8643],stretchv:[0,1,4],HDW:[.703,.197,.441]},8644:{dir:vl,sizes:[1.018,1.484],variants:[0,2],stretch:[8644,8644,8644],stretchv:[3,1,4],HDW:[.669,.172,1.018],hd:[.432,-.065]},8645:{dir:xl,sizes:[.907,1.373],variants:[0,2],stretch:[8645,8645,8645],stretchv:[3,1,4],HDW:[.703,.203,.896]},8646:{dir:vl,sizes:[1.018,1.484],variants:[0,2],stretch:[8646,8644,8646],stretchv:[3,1,4],HDW:[.669,.172,1.018],hd:[.432,-.065]},8647:{dir:vl,sizes:[.997,1.463],variants:[0,2],stretch:[8647,8647],stretchv:[3,1],HDW:[.75,.25,.997],hd:[.512,.012]},8648:{dir:xl,sizes:[.883,1.349],variants:[0,2],stretch:[8648,8648],stretchv:[3,1],HDW:[.679,.203,.992]},8649:{dir:vl,sizes:[.997,1.463],variants:[0,2],stretch:[0,8647,8649],stretchv:[0,1,4],HDW:[.75,.25,.997],hd:[.512,.012]},8650:{dir:xl,sizes:[.883,1.349],variants:[0,2],stretch:[0,8648,8650],stretchv:[0,1,4],HDW:[.703,.179,.992]},8651:{dir:vl,sizes:[1.018,1.484],variants:[0,2],stretch:[8651,8651,8651],stretchv:[3,1,4],HDW:[.598,.098,1.018],hd:[.369,-.131]},8652:{dir:vl,sizes:[1.018,1.484],variants:[0,2],stretch:[8652,8651,8652],stretchv:[3,1,4],HDW:[.598,.098,1.018],hd:[.369,-.131]},8653:{dir:vl,sizes:[.991,1.457],variants:[0,2],stretch:[8653,8654,0,8653],stretchv:[3,1,0,1],HDW:[.52,.02,.991],hd:[.369,-.131]},8654:{dir:vl,sizes:[1.068,1.534],variants:[0,2],stretch:[8656,8654,8658,8653],stretchv:[3,1,4,1],HDW:[.52,.02,1.068],hd:[.369,-.131]},8655:{dir:vl,sizes:[.991,1.457],variants:[0,2],stretch:[0,8654,8658,8653],stretchv:[0,1,4,1],HDW:[.52,.02,.991],hd:[.369,-.131]},8656:{dir:vl,sizes:[1,1.457],variants:[0,0],schar:[8656,10232],stretch:[8656,8656],stretchv:[3,1],HDW:[.52,.02,1],hd:[.369,-.131]},8657:{dir:xl,sizes:[.88,1.346],variants:[0,2],stretch:[8657,8657],stretchv:[3,1],HDW:[.676,.203,.652]},8658:{dir:vl,sizes:[1,1.457],variants:[0,0],schar:[8658,10233],stretch:[0,8656,8658],stretchv:[0,1,4],HDW:[.52,.02,1],hd:[.369,-.131]},8659:{dir:xl,sizes:[.88,1.346],variants:[0,2],stretch:[0,8657,8659],stretchv:[0,1,4],HDW:[.703,.176,.652]},8660:{dir:vl,sizes:[1,1.534],variants:[0,0],schar:[8660,10234],stretch:[8656,8656,8658],stretchv:[3,1,4],HDW:[.52,.02,1],hd:[.369,-.131]},8661:{dir:xl,sizes:[.957,1.423],variants:[0,2],stretch:[8657,8657,8659],stretchv:[3,1,4],HDW:[.728,.228,.652]},8666:{dir:vl,sizes:[1.015,1.461],variants:[0,2],stretch:[8666,8666],stretchv:[3,1],HDW:[.617,.117,1.015],hd:[.466,-.034]},8667:{dir:vl,sizes:[1.015,1.461],variants:[0,2],stretch:[0,8666,8667],stretchv:[0,1,4],HDW:[.617,.117,1.015],hd:[.466,-.034]},8693:{dir:xl,sizes:[.907,1.373],variants:[0,2],stretch:[8693,8645,8693],stretchv:[3,1,4],HDW:[.703,.203,.896]},8694:{dir:vl,sizes:[.997,1.463],variants:[0,2],stretch:[0,8694,8694],stretchv:[0,1,4],HDW:[.99,.49,.997],hd:[.751,.251]},8719:{dir:xl,sizes:[1.001,1.401],variants:[0,2]},8720:{dir:xl,sizes:[1.001,1.401],variants:[0,2]},8721:{dir:xl,sizes:[1.001,1.401],variants:[0,2]},8722:{dir:vl,stretch:[0,8722],HDW:[.583,.083,.778],ext:.112,hd:[.583,.083]},8725:{c:47,dir:xl,sizes:[1.001,1.311,1.717,2.249,2.945,3.859,5.055,6.621]},8730:{dir:xl,sizes:[1.001,1.201,1.801,2.401,3.001],stretch:[8730,8730,9143],stretchv:[3,1,0],HDW:[.04,.96,1.056],fullExt:[.64,2.44]},8739:{dir:xl,sizes:[1.001,1.203,1.443,1.735,2.085,2.505,3.005,3.605],stretch:[0,8739],stretchv:[0,2],HDW:[.75,.25,.333]},8741:{dir:xl,sizes:[1.001,1.203,1.443,1.735,2.085,2.503,3.004,3.607],stretch:[0,8741],stretchv:[0,2],HDW:[.75,.25,.555]},8747:{dir:xl,sizes:[1.112,2.223],variants:[0,2],stretch:[8992,9134,8993],HDW:[.805,.306,1.185]},8748:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},8749:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},8750:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},8751:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},8752:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},8753:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},8754:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},8755:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},8801:{dir:vl,stretch:[0,8801],HDW:[.464,-.036,.778],ext:.112,hd:[.464,-.036]},8803:{dir:vl,stretch:[0,8803],HDW:[.561,.061,.778],ext:.112,hd:[.561,.061]},8866:{dir:xl,sizes:[.685,.869],variants:[0,0],schar:[8866,10205]},8867:{dir:xl,sizes:[.685,.869],variants:[0,0],schar:[8867,10206]},8868:{dir:xl,sizes:[.685,.869],variants:[0,0],schar:[8868,10201]},8869:{dir:xl,sizes:[.685,.869],variants:[0,0],schar:[8869,10200]},8896:{dir:xl,sizes:[1.045,1.394],variants:[0,2]},8897:{dir:xl,sizes:[1.045,1.394],variants:[0,2]},8898:{dir:xl,sizes:[1.023,1.357],variants:[0,2]},8899:{dir:xl,sizes:[1.023,1.357],variants:[0,2]},8968:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[9121,9122],HDW:[.75,.25,.667]},8969:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[9124,9125],HDW:[.75,.25,.667]},8970:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[0,9122,9123],HDW:[.75,.25,.667]},8971:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[0,9125,9126],HDW:[.75,.25,.667]},8978:{c:9180,dir:vl,sizes:[.504,1.006,1.508,2.012,2.516,3.02,3.524,4.032],stretch:[9180,9180,9180],stretchv:[3,1,4],HDW:[.796,-.502,.504],hd:[.796,-.689]},8994:{c:9180,dir:vl,sizes:[.504,1.006,1.508,2.012,2.516,3.02,3.524,4.032],stretch:[9180,9180,9180],stretchv:[3,1,4],HDW:[.796,-.502,.504],hd:[.796,-.689]},8995:{c:9181,dir:vl,sizes:[.504,1.006,1.508,2.012,2.516,3.02,3.524,4.032],stretch:[9181,9181,9181],stretchv:[3,1,4],HDW:[-.072,.366,.504],hd:[-.259,.366]},9001:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],schar:[9001,10216]},9002:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],schar:[9002,10217]},9130:{dir:xl,sizes:[.748],stretch:[0,9130],HDW:[.748,0,.902]},9135:{c:8211,dir:vl,stretch:[0,8211],HDW:[.277,-.255,.5],ext:.001,hd:[.277,-.255]},9136:{dir:xl,sizes:[1.125],stretch:[9127,9130,9133],HDW:[.75,.375,.902]},9137:{dir:xl,sizes:[1.125],stretch:[9131,9130,9129],HDW:[.75,.375,.902]},9140:{dir:vl,sizes:[.36,.735,1.11,1.485,1.86,2.235,2.61,2.985],stretch:[9140,9140,9140],stretchv:[3,1,4],HDW:[.772,-.504,.36],hd:[.772,-.706]},9141:{dir:vl,sizes:[.36,.735,1.11,1.485,1.86,2.235,2.61,2.985],stretch:[9141,9141,9141],stretchv:[3,1,4],HDW:[-.074,.342,.36],hd:[-.276,.342]},9168:{dir:xl,sizes:[.642],stretch:[0,9168],HDW:[.642,0,.333]},9180:{dir:vl,sizes:[.504,1.006,1.508,2.012,2.516,3.02,3.524,4.032],stretch:[9180,9180,9180],stretchv:[3,1,4],HDW:[.796,-.502,.504],hd:[.796,-.689]},9181:{dir:vl,sizes:[.504,1.006,1.508,2.012,2.516,3.02,3.524,4.032],stretch:[9181,9181,9181],stretchv:[3,1,4],HDW:[-.072,.366,.504],hd:[-.259,.366]},9182:{dir:vl,sizes:[.492,.993,1.494,1.996,2.498,3,3.502,4.006],stretch:[9182,175,9182,9182],stretchv:[3,1,4,1],HDW:[.85,-.493,.492],hd:[.724,-.618]},9183:{dir:vl,sizes:[.492,.993,1.494,1.996,2.498,3,3.502,4.006],stretch:[9183,95,9183,9183],stretchv:[3,1,4,1],HDW:[-.062,.419,.492],hd:[-.188,.294]},9184:{dir:vl,sizes:[.546,1.048,1.55,2.056,2.564,3.068,3.574,4.082],stretch:[9184,9184,9184],stretchv:[3,1,4],HDW:[.873,-.605,.546],hd:[.873,-.766]},9185:{dir:vl,sizes:[.546,1.048,1.55,2.056,2.564,3.068,3.574,4.082],stretch:[9185,9185,9185],stretchv:[3,1,4],HDW:[-.175,.443,.546],hd:[-.336,.443]},9472:{c:8211,dir:vl,stretch:[0,8211],HDW:[.277,-.255,.5],ext:.001,hd:[.277,-.255]},10072:{c:8739,dir:xl,sizes:[1.001,1.203,1.443,1.735,2.085,2.505,3.005,3.605],stretch:[0,8739],stretchv:[0,2],HDW:[.75,.25,.333]},10197:{dir:xl,sizes:[.511,.628],variants:[0,2]},10198:{dir:xl,sizes:[.511,.628],variants:[0,2]},10199:{dir:xl,sizes:[.511,.628],variants:[0,2]},10214:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[10214,10214,10214],stretchv:[3,1,4],HDW:[.75,.25,1.007]},10215:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],stretch:[10215,10215,10215],stretchv:[3,1,4],HDW:[.75,.25,1.007]},10216:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10217:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10218:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10219:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10222:{dir:xl,sizes:[1.025,1.127,1.229,1.483,1.837,2.141,2.445,3.053],stretch:[10222,10222,10222],stretchv:[3,1,4],HDW:[.762,.262,.647]},10223:{dir:xl,sizes:[1.025,1.127,1.229,1.483,1.837,2.141,2.445,3.053],stretch:[10223,10223,10223],stretchv:[3,1,4],HDW:[.762,.262,.647]},10229:{c:8592,dir:vl,sizes:[1,1.463],variants:[0,0],schar:[8592,10229],stretch:[8592,8592],stretchv:[3,1],HDW:[.51,.01,1],hd:[.274,-.226]},10230:{c:8594,dir:vl,sizes:[1,1.463],variants:[0,0],schar:[8594,10230],stretch:[0,8592,8594],stretchv:[0,1,4],HDW:[.51,.01,1],hd:[.274,-.226]},10231:{c:8596,dir:vl,sizes:[1,1.442],variants:[0,0],schar:[8596,10231],stretch:[8592,8592,8594],stretchv:[3,1,4],HDW:[.51,.01,1],hd:[.274,-.226]},10232:{c:8656,dir:vl,sizes:[1,1.457],variants:[0,0],schar:[8656,10232],stretch:[8656,8656],stretchv:[3,1],HDW:[.52,.02,1],hd:[.369,-.131]},10233:{c:8658,dir:vl,sizes:[1,1.457],variants:[0,0],schar:[8658,10233],stretch:[0,8656,8658],stretchv:[0,1,4],HDW:[.52,.02,1],hd:[.369,-.131]},10234:{c:8660,dir:vl,sizes:[1,1.534],variants:[0,0],schar:[8660,10234],stretch:[8656,8656,8658],stretchv:[3,1,4],HDW:[.52,.02,1],hd:[.369,-.131]},10235:{c:8612,dir:vl,sizes:[.977,1.443],variants:[0,0],schar:[8612,10235],stretch:[8592,8592,8612],stretchv:[3,1,4],HDW:[.51,.011,.977],hd:[.274,-.226]},10236:{c:8614,dir:vl,sizes:[.977,1.443],variants:[0,0],schar:[8614,10236],stretch:[8614,8592,8594],stretchv:[3,1,4],HDW:[.51,.011,.977],hd:[.274,-.226]},10570:{dir:vl,sizes:[1.012],stretch:[8636,8636,8641],stretchv:[3,1,4],HDW:[.499,0,1.012],hd:[.273,-.226]},10571:{dir:vl,sizes:[1.012],stretch:[8637,8636,8640],stretchv:[3,1,4],HDW:[.499,0,1.012],hd:[.273,-.226]},10574:{dir:vl,sizes:[1],stretch:[8636,8636,8640],stretchv:[3,1,4],HDW:[.499,-.226,1],hd:[.273,-.226]},10576:{dir:vl,sizes:[1],stretch:[8637,8636,8641],stretchv:[3,1,4],HDW:[.273,0,1],hd:[.273,-.226]},10586:{dir:vl,sizes:[1],stretch:[8636,8636,8612],stretchv:[3,1,4],HDW:[.51,.011,1],hd:[.273,-.226]},10587:{dir:vl,sizes:[1],stretch:[8614,8636,8640],stretchv:[3,1,4],HDW:[.51,.011,1],hd:[.273,-.226]},10590:{dir:vl,sizes:[1],stretch:[8637,8636,8612],stretchv:[3,1,4],HDW:[.51,.011,1],hd:[.273,-.226]},10591:{dir:vl,sizes:[1],stretch:[8614,8636,8641],stretchv:[3,1,4],HDW:[.51,.011,1],hd:[.273,-.226]},10627:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10628:{dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10629:{dir:xl,sizes:[.997,1.095,1.195,1.445,1.793,2.093,2.393,2.991]},10630:{dir:xl,sizes:[.997,1.095,1.195,1.445,1.793,2.093,2.393,2.991]},10744:{dir:xl,sizes:[1.076,1.917],variants:[0,2]},10745:{dir:xl,sizes:[1.076,1.917],variants:[0,2]},10748:{dir:xl,sizes:[1.001,1.083,1.185,1.433,1.793,2.093,2.383,2.997]},10749:{dir:xl,sizes:[1.001,1.083,1.185,1.433,1.793,2.093,2.383,2.997]},10752:{dir:xl,sizes:[.987,1.305],variants:[0,2]},10753:{dir:xl,sizes:[.987,1.305],variants:[0,2]},10754:{dir:xl,sizes:[.987,1.305],variants:[0,2]},10755:{dir:xl,sizes:[1.023,1.357],variants:[0,2]},10756:{dir:xl,sizes:[1.023,1.357],variants:[0,2]},10757:{dir:xl,sizes:[1.029,1.373],variants:[0,2]},10758:{dir:xl,sizes:[1.029,1.373],variants:[0,2]},10759:{dir:xl,sizes:[1.045,1.907],variants:[0,2]},10760:{dir:xl,sizes:[1.045,1.907],variants:[0,2]},10761:{dir:xl,sizes:[.981,1.261],variants:[0,2]},10762:{dir:xl,sizes:[1.001,1.401],variants:[0,2]},10763:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10764:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10765:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10766:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10767:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10768:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10769:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10770:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10771:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10772:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10773:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10774:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10775:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10776:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10777:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10778:{dir:xl,sizes:[1.112,2.223],variants:[0,2]},10779:{dir:xl,sizes:[1.274,2.464],variants:[0,2]},10780:{dir:xl,sizes:[1.274,2.486],variants:[0,2]},10781:{dir:xl,sizes:[.767,1.073],variants:[0,2]},10782:{dir:xl,sizes:[.767,1.074],variants:[0,2]},10784:{dir:xl,sizes:[.595,.835],variants:[0,2]},10785:{dir:xl,sizes:[.901,1.261],variants:[0,2]},11004:{dir:xl,sizes:[1.001,1.915],variants:[0,2]},11007:{dir:xl,sizes:[1.241,1.915],variants:[0,2]},12296:{c:10216,dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},12297:{c:10217,dir:xl,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},65079:{c:9182,dir:vl,sizes:[.492,.993,1.494,1.996,2.498,3,3.502,4.006],stretch:[9182,175,9182,9182],stretchv:[3,1,4,1],HDW:[.85,-.493,.492],hd:[.724,-.618]},65080:{c:9183,dir:vl,sizes:[.492,.993,1.494,1.996,2.498,3,3.502,4.006],stretch:[9183,95,9183,9183],stretchv:[3,1,4,1],HDW:[-.062,.419,.492],hd:[-.188,.294]},126704:{dir:xl,sizes:[.527,.738]},126705:{dir:xl,sizes:[.531,.744]}},Wd=function(t){var e;return(e=class extends t{}).defaultVariants=[..._l.defaultVariants,["-size3","normal"],["-size4","normal"],["-size5","normal"],["-size6","normal"],["-size7","normal"],["-lf-tp","normal"],["-rt-bt","normal"],["-ex-md","normal"],["-bbold","normal"],["-upsmall","normal"],["-uplarge","normal"]],e.VariantSmp=Object.assign(Object.assign({},_l.VariantSmp),{"-bbold":[120120,120146,,,120792]}),e.defaultCssFonts=Object.assign(Object.assign({},_l.defaultCssFonts),{"-size3":["serif",!1,!1],"-size4":["serif",!1,!1],"-size5":["serif",!1,!1],"-size6":["serif",!1,!1],"-size7":["serif",!1,!1],"-lf-tp":["serif",!1,!1],"-rt-bt":["serif",!1,!1],"-ex-md":["serif",!1,!1],"-bbold":["serif",!1,!1],"-upsmall":["serif",!1,!1],"-uplarge":["serif",!1,!1]}),e.defaultAccentMap={94:"\u02c6",126:"\u02dc",768:"\u02cb",769:"\u02ca",770:"\u02c6",771:"\u02dc",772:"\u02c9",774:"\u02d8",775:"\u02d9",776:"\xa8",778:"\u02da",780:"\u02c7",8594:"\u20d7"},e.defaultParams=Object.assign(Object.assign({},_l.defaultParams),{x_height:.442}),e.defaultSizeVariants=["normal","-smallop","-largeop","-size3","-size4","-size5","-size6","-size7"],e.defaultStretchVariants=["normal","-ex-md","-size3","-lf-tp","-rt-bt"],e}(Gl);class zd extends Wd{constructor(){super(...arguments),this.cssFontPrefix="NCM"}}zd.NAME="MathJaxNewcm",zd.OPTIONS=Object.assign(Object.assign({},Wd.OPTIONS),{fontURL:"@mathjax/mathjax-newcm-font/js/chtml/woff2",dynamicPrefix:"@mathjax/mathjax-newcm-font/js/chtml/dynamic"}),zd.defaultCssFamilyPrefix="MJX-NCM-ZERO",zd.defaultVariantLetters={normal:"",bold:"B",italic:"I","bold-italic":"BI","double-struck":"DS",fraktur:"F","bold-fraktur":"FB","sans-serif":"SS","bold-sans-serif":"SSB","sans-serif-italic":"SSI","sans-serif-bold-italic":"SSBI",monospace:"M","-smallop":"SO","-largeop":"LO","-size3":"S3","-size4":"S4","-size5":"S5","-size6":"S6","-size7":"S7","-tex-mathit":"MI","-tex-calligraphic":"C","-tex-bold-calligraphic":"CB","-tex-oldstyle":"OS","-tex-bold-oldstyle":"OB","-tex-variant":"V","-lf-tp":"LT","-rt-bt":"RB","-ex-md":"EM","-bbold":"Be","-upsmall":"U","-uplarge":"Ue",script:"S","bold-script":"SB"},zd.defaultDelimiters=Hd,zd.defaultChars={normal:{32:[0,0,.332],33:[.716,0,.278],34:[.705,-.423,.374],35:[.694,.194,.833],36:[.75,.056,.5],37:[.75,.056,.833],38:[.716,.022,.778],39:[.705,-.423,.278],40:[.748,.248,.389],41:[.748,.248,.389],42:[.75,-.32,.5],43:[.583,.083,.778],44:[.106,.193,.278],45:[.245,-.187,.333],46:[.106,0,.278],47:[.75,.25,.5],48:[.666,.022,.5],49:[.666,0,.5],50:[.666,0,.5,{sk:-.01}],51:[.666,.022,.5],52:[.677,0,.5,{sk:.103}],53:[.666,.022,.5],54:[.666,.022,.5,{sk:.068}],55:[.676,.022,.5,{sk:-.147}],56:[.666,.022,.5,{sk:.011}],57:[.666,.022,.5],58:[.431,0,.278],59:[.431,.193,.278],60:[.547,.052,.778],61:[.367,-.133,.778],62:[.547,.047,.778],63:[.705,0,.472],64:[.705,.011,.778],65:[.716,0,.75],66:[.683,0,.708,{sk:-.014}],67:[.705,.022,.722,{sk:.044}],68:[.683,0,.764],69:[.68,0,.681,{sk:.013}],70:[.68,0,.653],71:[.705,.022,.785,{sk:.013}],72:[.683,0,.75],73:[.683,0,.361],74:[.683,.022,.514,{sk:.06}],75:[.683,0,.778,{sk:-.011}],76:[.683,0,.625,{sk:-.119}],77:[.683,0,.917],78:[.683,0,.75],79:[.705,.022,.778],80:[.683,0,.681],81:[.705,.194,.778],82:[.683,.022,.736,{sk:-.026}],83:[.705,.022,.556],84:[.677,0,.722],85:[.683,.022,.75,{sk:.02}],86:[.683,.022,.75],87:[.683,.022,1.028],88:[.683,0,.75],89:[.683,0,.75],90:[.683,0,.611,{sk:.011}],91:[.75,.25,.278],92:[.75,.25,.5],93:[.75,.25,.278],94:[.745,-.561,.556,{ic:.006}],95:[-.1,.14,.333],96:[.698,-.509,.5,{sk:-.031}],97:[.448,.011,.5,{sk:-.036}],98:[.694,.011,.556,{sk:-.142}],99:[.448,.011,.444,{sk:.027}],100:[.694,.011,.556,{sk:.109}],101:[.448,.011,.444,{sk:.014}],102:[.705,0,.306,{ic:.051,sk:.043}],103:[.453,.206,.5,{sk:-.024}],104:[.694,0,.556,{sk:-.132}],105:[.657,0,.278],106:[.657,.205,.306],107:[.694,0,.528,{sk:-.128}],108:[.694,0,.278],109:[.442,0,.833],110:[.442,0,.556,{sk:.013}],111:[.448,.011,.5],112:[.442,.194,.556,{sk:.032}],113:[.442,.194,.528],114:[.442,0,.392,{sk:-.015}],115:[.448,.011,.394],116:[.615,.011,.389,{sk:-.034}],117:[.442,.011,.556,{sk:-.017}],118:[.431,.011,.528,{sk:.014}],119:[.431,.011,.722],120:[.431,0,.528],121:[.431,.205,.528],122:[.431,0,.444],123:[.75,.25,.5],124:[.75,.25,.278],125:[.75,.25,.5],126:[.309,-.191,.556,{ic:.001}],160:[0,0,.332],163:[.683,.035,.75],165:[.683,0,.75],167:[.705,.205,.444],168:[.652,-.557,.5],172:[.367,-.133,.667],175:[.62,-.589,.5],176:[.683,-.406,.375],177:[.583,.084,.778],180:[.698,-.509,.5,{sk:.031}],181:[.441,.194,.556],182:[.694,.194,.611],183:[.303,-.197,.278],215:[.491,-.009,.778],240:[.696,.011,.5],247:[.504,.004,.778],305:[.442,0,.278],567:[.442,.205,.306],710:[.694,-.515,.5],711:[.693,-.514,.5],713:[.62,-.589,.5],714:[.698,-.509,.5,{sk:.031}],715:[.698,-.509,.5,{sk:-.031}],717:[-.193,.233,.333,{ic:.018}],728:[.69,-.518,.5],729:[.657,-.551,.278],730:[.705,-.529,.75],732:[.653,-.556,.5],767:[-.025,.275,0,{dx:.274}],768:[.733,-.544,0,{dx:.294}],769:[.733,-.544,0,{dx:.234}],770:[.694,-.515,.5],771:[.653,-.556,.5,{sk:.016}],772:[.64,-.609,0,{dx:.264}],773:[.67,-.63,0,{dx:.264}],774:[.73,-.592,0,{dx:.264}],775:[.677,-.571,0,{dx:.265}],776:[.672,-.577,0,{dx:.264}],778:[.725,-.549,0,{dx:.264}],780:[.726,-.577,0,{dx:.264}],824:[.75,.25,0,{sk:-.263}],913:[.716,0,.75],914:[.683,0,.708,{sk:-.068}],915:[.68,0,.625,{sk:-.015}],916:[.716,0,.833],917:[.68,0,.681,{sk:-.022}],918:[.683,0,.611,{sk:.011}],919:[.683,0,.75],920:[.705,.022,.778],921:[.683,0,.361],922:[.683,0,.778,{sk:-.011}],923:[.716,0,.694],924:[.683,0,.917],925:[.683,0,.75],926:[.677,0,.667],927:[.705,.022,.778],928:[.68,0,.75],929:[.683,0,.681,{sk:-.058}],931:[.683,0,.722,{sk:-.011}],932:[.677,0,.722],933:[.705,0,.778],934:[.683,0,.722],935:[.683,0,.75,{sk:-.014}],936:[.683,0,.778],937:[.705,0,.722],945:[.442,.011,.641,{ic:.006,sk:.031}],946:[.706,.194,.558],947:[.442,.215,.586],948:[.712,.011,.474],949:[.453,.022,.535,{sk:-.024}],950:[.697,.205,.53,{sk:-.041}],951:[.442,.216,.53,{sk:-.047}],952:[.705,.011,.488],953:[.442,.011,.308,{sk:-.056}],954:[.442,.011,.53,{sk:-.018}],955:[.694,.013,.537,{ic:.029,sk:-.204}],956:[.442,.216,.53,{sk:-.028}],957:[.442,0,.502,{sk:-.042}],958:[.697,.205,.53,{sk:-.069}],959:[.448,.011,.5],960:[.431,.011,.586,{sk:-.014}],961:[.442,.216,.488],962:[.442,.108,.474],963:[.431,.011,.599],964:[.431,.012,.53,{sk:-.033}],965:[.442,.011,.53,{sk:-.014}],966:[.442,.218,.641,{sk:-.018}],967:[.442,.205,.641,{ic:.004,sk:-.057}],968:[.694,.205,.641,{sk:.028}],969:[.442,.011,.641],977:[.705,.011,.53,{sk:.026}],978:[.715,0,.778],981:[.694,.205,.641],982:[.431,.011,.836,{sk:-.014}],1008:[.442,.012,.624,{sk:-.015}],1009:[.442,.194,.488],1012:[.705,.022,.778],1013:[.431,.011,.414,{ic:.015,sk:.024}],1014:[.431,.011,.414,{ic:.058}],8192:[0,0,.5],8193:[0,0,1],8194:[0,0,.5],8195:[0,0,1],8196:[0,0,.333],8197:[0,0,.25],8198:[0,0,.167],8199:[0,0,.5],8200:[0,0,.25],8201:[0,0,.2],8202:[0,0,.1],8203:[0,0,0],8208:[.245,-.187,.333],8209:[.245,-.187,.333],8210:[.342,-.302,.68],8211:[.277,-.255,.5],8212:[.277,-.255,1],8213:[.27,-.23,1.152],8214:[.75,.25,.398],8216:[.693,-.394,.278],8217:[.694,-.395,.278],8220:[.693,-.394,.472],8221:[.694,-.395,.472],8224:[.705,.216,.444],8225:[.705,.205,.444],8230:[.106,0,.837],8231:[.266,-.16,.276],8239:[0,0,.2],8242:[.748,-.43,.311],8243:[.748,-.43,.511],8244:[.748,-.43,.711],8245:[.748,-.43,.311],8246:[.748,-.43,.511],8247:[.748,-.43,.711],8260:[.75,.25,.5],8279:[.748,-.43,.911],8287:[0,0,.222],8288:[0,0,0],8289:[0,0,0],8290:[0,0,0],8291:[0,0,0],8292:[0,0,0],8356:[.683,.035,.75],8364:[.705,.022,.627],8400:[.711,-.601,0,{dx:.264}],8401:[.711,-.601,0,{dx:.264}],8402:[.75,.25,0,{sk:-.264}],8406:[.711,-.521,0,{dx:.264}],8407:[.711,-.521,0,{dx:.264}],8411:[.696,-.604,0,{dx:.264}],8412:[.696,-.604,0,{dx:.264}],8417:[.711,-.521,0,{dx:.264}],8428:[-.171,.281,0,{dx:.264}],8429:[-.171,.281,0,{dx:.264}],8430:[-.091,.281,0,{dx:.264}],8431:[-.091,.281,0,{dx:.264}],8455:[.705,.022,.53],8462:[.694,.011,.576,{sk:-.033}],8463:[.694,.011,.576],8486:[.705,0,.722],8487:[.684,.021,.722],8490:[.683,0,.778,{sk:-.011}],8491:[.892,0,.75],8498:[.68,0,.653],8501:[.693,0,.611],8502:[.723,.04,.604],8503:[.721,.03,.528],8504:[.71,.035,.574],8592:[.51,.01,1],8593:[.679,.203,.5],8594:[.51,.01,1],8595:[.703,.179,.5],8596:[.51,.01,1],8597:[.757,.257,.5],8598:[.714,.203,1],8599:[.714,.203,1],8600:[.703,.214,1],8601:[.703,.214,1],8602:[.51,.01,.997],8603:[.51,.01,.997],8606:[.51,.01,1.017],8608:[.51,.01,1.017],8610:[.51,.01,1.192],8611:[.51,.01,1.192],8612:[.51,.011,.977],8614:[.51,.011,.977],8617:[.55,.01,.997],8618:[.55,.01,.997],8619:[.55,.05,.997],8620:[.55,.05,.997],8622:[.51,.01,.996],8630:[.562,-.229,.98],8631:[.562,-.229,.98],8634:[.68,.06,.771],8635:[.68,.06,.771],8636:[.503,-.23,1],8637:[.27,.003,1.012],8638:[.697,.203,.441],8639:[.697,.203,.441],8640:[.503,-.23,1],8641:[.27,.003,1.012],8642:[.703,.197,.441],8643:[.703,.197,.441],8644:[.672,.172,1.018],8645:[.703,.203,.896],8646:[.672,.172,1.018],8647:[.75,.25,.997],8648:[.679,.203,.992],8649:[.75,.25,.997],8650:[.703,.179,.992],8651:[.6,.1,1.018],8652:[.6,.1,1.018],8653:[.52,.02,.991],8654:[.52,.02,1.068],8655:[.52,.02,.991],8656:[.52,.02,1],8657:[.676,.203,.611],8658:[.52,.02,1],8659:[.703,.176,.611],8660:[.52,.02,1],8661:[.728,.228,.611],8666:[.617,.117,1.015],8667:[.617,.117,1.015],8672:[.51,.01,1],8673:[.692,.192,.684],8674:[.51,.01,1],8675:[.692,.192,.684],8676:[.51,.01,1.018],8677:[.51,.01,1.018],8693:[.703,.203,.896],8694:[.99,.49,.997],8704:[.688,-.002,.666],8705:[.684,0,.556],8706:[.716,.022,.586],8707:[.684,0,.556],8708:[.789,.105,.556],8709:[.772,.078,.5],8710:[.716,0,.833],8711:[.683,.033,.833],8712:[.543,.043,.667],8713:[.73,.23,.667],8715:[.543,.043,.667],8716:[.73,.23,.667],8718:[.554,0,.666],8719:[.75,.25,.944],8720:[.75,.25,.944],8721:[.75,.25,1.056],8722:[.583,.083,.778],8723:[.584,.083,.778],8724:[.785,.083,.778],8725:[.603,.103,.568],8726:[.603,.103,.568],8727:[.462,-.039,.5],8728:[.4,-.1,.412],8729:[.445,-.055,.5],8730:[.04,.96,.833,{ic:.02}],8733:[.442,.011,.778],8734:[.442,.011,1],8735:[.679,-.013,.778],8736:[.724,-.013,.778],8737:[.724,.109,.778],8738:[.562,.062,.778],8739:[.75,.25,.278],8740:[.75,.25,.388],8741:[.75,.25,.5],8742:[.75,.25,.556],8743:[.602,.02,.667],8744:[.601,.02,.667],8745:[.604,.02,.667],8746:[.604,.02,.667],8747:[.805,.306,.545,{ic:.12}],8748:[.805,.306,.915,{ic:.12}],8749:[.805,.306,1.285,{ic:.12}],8750:[.805,.306,.615,{ic:.05}],8751:[.805,.306,.985,{ic:.05}],8752:[.805,.306,1.355,{ic:.05}],8753:[.805,.306,.675,{ic:.02}],8754:[.805,.306,.662,{ic:.02}],8755:[.805,.306,.662,{ic:.02}],8756:[.416,-.084,.516],8757:[.416,-.084,.516],8758:[.422,-.078,.278],8759:[.422,-.078,.516],8760:[.504,-.23,.778],8761:[.422,-.078,.906],8764:[.366,-.134,.773],8765:[.366,-.134,.773],8766:[.466,-.034,.901],8767:[.492,-.008,.778],8768:[.583,.083,.28],8769:[.482,-.018,.773],8770:[.38,-.032,.778],8771:[.468,-.12,.778],8772:[.603,.103,.778],8773:[.552,-.036,.778],8774:[.614,.048,.778],8775:[.603,.103,.778],8776:[.457,-.043,.773],8777:[.603,.103,.773],8778:[.541,-.036,.778],8779:[.541,.041,.773],8780:[.541,-.036,.778],8781:[.498,-.002,.778],8784:[.601,-.133,.778],8788:[.422,-.078,.906],8789:[.422,-.078,.906],8797:[.793,-.133,.778],8799:[.803,-.133,.778],8800:[.73,.23,.778],8801:[.464,-.036,.778],8802:[.73,.23,.778],8803:[.561,.061,.778],8804:[.631,.119,.778],8805:[.631,.119,.778],8806:[.715,.203,.778],8807:[.715,.203,.778],8808:[.715,.287,.778],8809:[.715,.287,.778],8810:[.554,.047,1],8811:[.546,.054,1],8812:[.77,.27,.434],8813:[.73,.23,.778],8814:[.73,.23,.778],8815:[.73,.23,.778],8816:[.73,.23,.778],8817:[.73,.23,.778],8818:[.636,.125,.776],8819:[.636,.125,.776],8820:[.691,.191,.776],8821:[.691,.191,.776],8822:[.741,.241,.778],8823:[.741,.241,.778],8824:[.776,.276,.778],8825:[.776,.276,.778],8826:[.547,.047,.778],8827:[.547,.047,.778],8828:[.639,.139,.738],8829:[.639,.139,.738],8830:[.682,.17,.773],8831:[.682,.17,.773],8832:[.73,.23,.778],8833:[.73,.23,.778],8834:[.543,.043,.778],8835:[.543,.043,.778],8836:[.73,.23,.778],8837:[.73,.23,.778],8838:[.627,.127,.778],8839:[.627,.127,.778],8840:[.73,.23,.778],8841:[.73,.23,.778],8842:[.627,.211,.778],8843:[.627,.211,.778],8845:[.604,.02,.667],8846:[.604,.02,.667],8847:[.543,.043,.778],8848:[.543,.043,.778],8849:[.627,.127,.778],8850:[.627,.127,.778],8851:[.604,.02,.667],8852:[.604,.02,.667],8853:[.591,.093,.782],8854:[.591,.093,.782],8855:[.591,.093,.782],8856:[.591,.093,.782],8857:[.591,.093,.782],8858:[.591,.093,.782],8859:[.591,.093,.782],8860:[.591,.093,.782],8861:[.591,.093,.782],8862:[.583,.083,.778],8863:[.583,.083,.778],8864:[.583,.083,.778],8865:[.583,.083,.778],8866:[.684,0,.611],8867:[.684,0,.611],8868:[.664,.02,.778],8869:[.684,0,.778],8870:[.684,0,.445],8871:[.684,0,.445],8872:[.684,0,.612],8873:[.684,0,.673],8874:[.684,0,.841],8875:[.684,0,.653],8876:[.684,0,.565],8877:[.684,0,.732],8878:[.684,0,.793],8879:[.684,0,.773],8880:[.563,.063,.778],8881:[.563,.063,.778],8882:[.547,.047,.738],8883:[.547,.047,.738],8884:[.605,.105,.738],8885:[.605,.105,.738],8890:[.664,.02,.778],8896:[.78,.282,.833],8897:[.783,.28,.833],8898:[.772,.25,.833],8899:[.75,.272,.833],8900:[.48,-.02,.5],8901:[.303,-.197,.278],8902:[.486,-.008,.5],8904:[.505,.005,.623],8905:[.505,.005,.623],8906:[.505,.005,.623],8907:[.505,.005,.623],8908:[.505,.005,.623],8909:[.468,-.12,.778],8910:[.584,.02,.733],8911:[.584,.02,.733],8930:[.73,.23,.778],8931:[.73,.23,.778],8938:[.73,.23,.738],8939:[.73,.23,.738],8940:[.73,.23,.738],8941:[.73,.23,.738],8942:[.582,.082,.218],8943:[.303,-.197,.776],8944:[.5,0,.613],8945:[.5,0,.613],8967:[.783,.313,.28],8968:[.75,.25,.444],8969:[.75,.25,.444],8970:[.75,.25,.444],8971:[.75,.25,.444],8972:[.274,.103,.818],8973:[.274,.103,.818],8974:[.603,-.226,.818],8975:[.603,-.226,.818],8976:[.367,-.133,.667],8985:[.367,-.133,.667],8988:[.77,-.49,.392],8989:[.77,-.49,.392],8990:[.01,.27,.392],8991:[.01,.27,.392],8992:[1.344,0,1.185],8993:[.806,.538,1.185],8994:[.381,-.13,1],8995:[.371,-.133,1],9001:[.75,.25,.389],9002:[.75,.25,.389],9115:[1.495,0,.875],9116:[.498,0,.875],9117:[1.495,0,.875],9118:[1.495,0,.875],9119:[.498,0,.875],9120:[1.495,0,.875],9121:[1.5,0,.667],9122:[1,0,.667],9123:[1.5,0,.667],9124:[1.5,0,.667],9125:[1,0,.667],9126:[1.5,0,.667],9127:[.75,0,.902],9128:[1.5,0,.902],9129:[.75,0,.902],9130:[.748,0,.902],9131:[.75,0,.902],9132:[1.5,0,.902],9133:[.75,0,.902],9134:[.806,0,1.185],9135:[.27,-.23,.396],9136:[.75,.375,.752],9137:[.75,.375,.752],9138:[.846,0,1.576],9139:[.847,0,1.576],9140:[.726,-.552,.36],9141:[-.122,.296,.36],9143:[1.82,0,1.056],9144:[1.765,.235,.659],9145:[1.765,.235,.659],9168:[.642,0,.333],9180:[.727,-.572,.504],9181:[-.142,.297,.504],9182:[.783,-.539,.492],9183:[-.109,.353,.492],9184:[.829,-.657,.546,{ic:.006}],9185:[-.227,.399,.546,{ic:.006}],9204:[.422,-.082,.356],9205:[.422,-.078,.356],9206:[.38,-.12,.356],9207:[.38,-.12,.356],9632:[.583,.083,.778],9633:[.583,.083,.778],9642:[.358,-.142,.328],9643:[.358,-.142,.328],9650:[.741,.005,.968],9651:[.741,.005,.968],9652:[.592,-.144,.626],9653:[.592,-.144,.626],9654:[.678,.178,.858],9655:[.678,.178,.858],9656:[.625,-.111,.626],9657:[.625,-.111,.626],9658:[.625,-.111,.866],9659:[.625,-.111,.866],9660:[.505,.241,.968],9661:[.505,.241,.968],9662:[.592,-.144,.626],9663:[.592,-.144,.626],9664:[.678,.178,.858],9665:[.678,.178,.858],9666:[.625,-.111,.626],9667:[.625,-.111,.626],9668:[.625,-.111,.866],9669:[.625,-.111,.866],9670:[.713,.213,1.025],9671:[.713,.213,1.025],9674:[.61,.11,.572],9675:[.592,.092,.796],9679:[.592,.092,.796],9702:[.445,-.055,.5],9711:[.701,.201,1.013],9720:[.679,-.013,.778],9721:[.679,-.013,.778],9722:[.679,-.013,.778],9723:[.533,.033,.706],9724:[.533,.033,.706],9725:[.483,-.017,.566],9726:[.483,-.017,.566],9727:[.679,-.013,.778],10072:[.694,.083,.525],10200:[.684,.184,.946],10201:[.684,.184,.986],10205:[.684,.184,.946],10206:[.684,.184,.946],10214:[.75,.25,.41],10215:[.75,.25,.41],10216:[.75,.25,.389],10217:[.75,.25,.389],10218:[.75,.25,.57],10219:[.75,.25,.57],10220:[.748,.248,.389],10221:[.748,.248,.389],10222:[.762,.262,.287],10223:[.762,.262,.287],10229:[.51,.01,1.463],10230:[.51,.01,1.463],10231:[.51,.01,1.442],10232:[.52,.02,1.457],10233:[.52,.02,1.457],10234:[.52,.02,1.534],10235:[.51,.011,1.443],10236:[.51,.011,1.443],10237:[.52,.021,1.437],10238:[.52,.021,1.437],10506:[.702,.202,.846],10507:[.702,.202,.846],10570:[.503,.003,1.012],10571:[.503,.003,1.012],10574:[.503,-.23,1],10576:[.27,.003,1],10578:[.503,.019,1.088],10579:[.503,.019,1.088],10582:[.502,.019,1.088],10583:[.502,.019,1.088],10586:[.51,.011,1],10587:[.51,.011,1],10590:[.51,.011,1],10591:[.51,.011,1],10602:[.6,-.133,1.018],10603:[.368,.099,1.018],10604:[.6,-.133,1.018],10605:[.368,.099,1.018],10606:[.703,.203,.8],10607:[.703,.203,.8],10620:[.563,.063,.778],10621:[.563,.063,.778],10622:[.546,.046,.726],10623:[.546,.046,.726],10624:[.75,.25,.694],10647:[.748,.248,.278],10648:[.748,.248,.278],10741:[.603,.103,.556],10743:[.603,.103,.556],10744:[.75,.325,.5],10745:[.75,.325,.5],10752:[.743,.243,1.111],10753:[.743,.243,1.111],10754:[.743,.243,1.111],10755:[.75,.272,.833],10756:[.75,.272,.833],10757:[.764,.264,.833],10758:[.764,.264,.833],10759:[.78,.282,1.082],10760:[.799,.264,1.082],10761:[.74,.24,1.092],10764:[.805,.306,1.655,{ic:.12}],10765:[.805,.306,.615,{ic:.05}],10766:[.805,.306,.615,{ic:.05}],10767:[.805,.306,.615,{ic:.05}],10768:[.805,.306,.615,{ic:.05}],10769:[.805,.306,.675,{ic:.02}],10770:[.805,.306,.615,{ic:.05}],10771:[.805,.306,.615,{ic:.05}],10772:[.805,.306,.615,{ic:.05}],10773:[.805,.306,.545,{ic:.12}],10774:[.805,.306,.545,{ic:.12}],10775:[.805,.306,.794],10776:[.805,.306,.665],10777:[.805,.306,.665],10778:[.805,.306,.645,{ic:.02}],10779:[.967,.306,.545,{ic:.12}],10780:[.805,.468,.645,{ic:.02}],10799:[.496,-.004,.778],10815:[.683,0,.75],10877:[.634,.134,.778],10878:[.634,.134,.778],10885:[.721,.205,.776],10886:[.721,.205,.776],10887:[.667,.167,.778],10888:[.667,.167,.778],10889:[.753,.321,.776],10890:[.721,.289,.776],10891:[.977,.477,.778],10892:[.977,.477,.778],10901:[.629,.134,.778],10902:[.629,.129,.778],10927:[.631,.119,.778],10928:[.631,.119,.778],10929:[.631,.203,.778],10930:[.631,.203,.778],10931:[.716,.203,.778],10932:[.716,.203,.778],10933:[.716,.287,.778],10934:[.716,.287,.778],10935:[.816,.205,.776],10936:[.816,.205,.776],10937:[.816,.321,.776],10938:[.816,.321,.776],10949:[.543,.203,.698],10950:[.543,.203,.698],10955:[.543,.287,.698],10956:[.543,.287,.698],10974:[.684,0,.381],10975:[.342,.02,.778],10976:[.342,.02,.778],10977:[.684,0,.778],10978:[.684,0,.612],10979:[.684,0,.673],10980:[.684,0,.612],10981:[.684,0,.653],10982:[.684,0,.673],10983:[.622,-.062,.784],10984:[.622,-.062,.784],10985:[.812,.02,.778],10986:[.592,-.092,.784],10987:[.592,-.092,.784],10994:[.75,.25,.62],10995:[.75,.25,.773],10996:[.75,.25,.694],10997:[.75,.25,.694],11004:[.75,.25,.694],119808:[.698,0,.869],119809:[.686,0,.818,{sk:-.026}],119810:[.697,.011,.831,{sk:.051}],119811:[.686,0,.882,{sk:-.04}],119812:[.68,0,.756],119813:[.68,0,.724,{sk:-.02}],119814:[.697,.011,.904,{sk:.015}],119815:[.686,0,.9],119816:[.686,0,.436],119817:[.686,.011,.594,{sk:.051}],119818:[.686,0,.901,{sk:-.013}],119819:[.686,0,.692,{sk:-.114}],119820:[.686,0,1.092],119821:[.686,0,.9],119822:[.697,.011,.864],119823:[.686,0,.786,{sk:-.021}],119824:[.697,.194,.864],119825:[.686,.011,.863,{sk:-.044}],119826:[.697,.011,.639,{sk:-.025}],119827:[.675,0,.8],119828:[.686,.011,.885],119829:[.686,.008,.869],119830:[.686,.008,1.189],119831:[.686,0,.869,{sk:-.017}],119832:[.686,0,.869],119833:[.686,0,.703,{sk:.013}],119834:[.453,.006,.559,{sk:-.049}],119835:[.694,.006,.639,{sk:-.194}],119836:[.453,.006,.511,{sk:.043}],119837:[.694,.006,.639,{sk:.124}],119838:[.453,.006,.527,{sk:.018}],119839:[.7,0,.351,{ic:.086,sk:.033}],119840:[.455,.201,.575,{sk:-.032}],119841:[.694,0,.639,{sk:-.172}],119842:[.685,0,.319],119843:[.685,.2,.351,{sk:.013}],119844:[.694,0,.607,{sk:-.177}],119845:[.694,0,.319,{sk:-.024}],119846:[.45,0,.958,{sk:.012}],119847:[.45,0,.639],119848:[.453,.006,.575],119849:[.45,.194,.639,{sk:.043}],119850:[.45,.194,.607,{sk:-.013}],119851:[.45,0,.474,{sk:-.021}],119852:[.453,.006,.454],119853:[.635,.006,.447,{sk:-.029}],119854:[.45,.006,.639,{sk:-.024}],119855:[.444,.004,.607],119856:[.444,.004,.831],119857:[.444,0,.607],119858:[.444,.2,.607],119859:[.444,0,.511],119860:[.716,0,.75,{sk:.175}],119861:[.683,0,.759,{sk:.115}],119862:[.705,.022,.715,{ic:.045,sk:.105}],119863:[.683,0,.828,{sk:.088}],119864:[.68,0,.738,{ic:.028,sk:.115}],119865:[.68,0,.643,{ic:.108,sk:.102}],119866:[.705,.022,.786,{sk:.093}],119867:[.683,0,.831,{ic:.05,sk:.089}],119868:[.684,.001,.44,{ic:.057,sk:.084}],119869:[.683,.022,.555,{ic:.078,sk:.151}],119870:[.684,0,.849,{ic:.04,sk:.09}],119871:[.684,0,.681,{sk:.019}],119872:[.683,0,.97,{ic:.074,sk:.085}],119873:[.683,0,.803,{ic:.078,sk:.082}],119874:[.705,.022,.763,{sk:.114}],119875:[.683,0,.642,{ic:.112,sk:.072}],119876:[.705,.194,.791,{sk:.1}],119877:[.683,.022,.759,{sk:.084}],119878:[.705,.022,.613,{ic:.032,sk:.093}],119879:[.677,0,.584,{ic:.12,sk:.016}],119880:[.683,.022,.683,{ic:.077,sk:.022}],119881:[.683,.022,.583,{ic:.187,sk:-.019}],119882:[.683,.022,.944,{ic:.104}],119883:[.683,0,.828,{ic:.023,sk:.097}],119884:[.683,.001,.581,{ic:.181,sk:-.027}],119885:[.683,0,.683,{ic:.04,sk:.114}],119886:[.442,.011,.529,{sk:.022}],119887:[.694,.011,.429,{sk:-.011}],119888:[.442,.011,.433,{sk:.101}],119889:[.694,.011,.52,{sk:.182}],119890:[.442,.011,.466,{sk:.067}],119891:[.705,.205,.49,{ic:.062,sk:.172}],119892:[.442,.205,.477,{sk:.077}],119894:[.661,.011,.345,{sk:.074}],119895:[.661,.205,.412,{sk:.153}],119896:[.694,.011,.521,{sk:-.011}],119897:[.694,.011,.298,{sk:.055}],119898:[.442,.011,.878,{sk:.017}],119899:[.442,.011,.6,{sk:.025}],119900:[.442,.011,.485,{sk:.072}],119901:[.442,.194,.503,{sk:.092}],119902:[.442,.194,.446,{ic:.006,sk:.053}],119903:[.442,.011,.451,{sk:.021}],119904:[.442,.011,.469,{sk:.061}],119905:[.626,.011,.361,{sk:.044}],119906:[.442,.011,.572,{sk:.019}],119907:[.442,.011,.485,{sk:.051}],119908:[.442,.011,.716,{sk:.047}],119909:[.442,.011,.572,{sk:.043}],119910:[.442,.205,.49,{sk:.059}],119911:[.442,.011,.465,{ic:.002,sk:.102}],119912:[.711,0,.869,{sk:.173}],119913:[.686,0,.866,{sk:.11}],119914:[.703,.017,.817,{ic:.038,sk:.113}],119915:[.686,0,.938,{sk:.063}],119916:[.68,0,.81,{ic:.015,sk:.124}],119917:[.68,0,.689,{ic:.12,sk:.104}],119918:[.703,.017,.887,{sk:.102}],119919:[.686,0,.982,{ic:.045,sk:.091}],119920:[.686,0,.511,{ic:.055,sk:.086}],119921:[.686,.017,.631,{ic:.063,sk:.176}],119922:[.686,0,.971,{ic:.032,sk:.137}],119923:[.686,0,.756,{sk:.018}],119924:[.686,0,1.142,{ic:.074,sk:.086}],119925:[.686,0,.95,{ic:.077,sk:.083}],119926:[.703,.017,.837,{sk:.11}],119927:[.686,0,.723,{ic:.126,sk:.07}],119928:[.703,.194,.869,{sk:.093}],119929:[.686,.017,.872,{ic:.009,sk:.1}],119930:[.703,.017,.693,{ic:.021,sk:.097}],119931:[.675,0,.637,{ic:.135,sk:.014}],119932:[.686,.017,.8,{ic:.077,sk:.06}],119933:[.686,.017,.678,{ic:.207,sk:.016}],119934:[.686,.017,1.093,{ic:.114}],119935:[.686,0,.947,{ic:.006,sk:.132}],119936:[.686,0,.675,{ic:.2,sk:.022}],119937:[.686,0,.773,{ic:.032,sk:.122}],119938:[.452,.008,.633,{sk:.019}],119939:[.694,.008,.521,{sk:-.035}],119940:[.452,.008,.513,{sk:.101}],119941:[.694,.008,.61,{sk:.219}],119942:[.452,.008,.554,{sk:.063}],119943:[.702,.202,.568,{ic:.058,sk:.169}],119944:[.452,.202,.545,{sk:.067}],119945:[.694,.008,.668,{sk:-.078}],119946:[.694,.008,.405,{sk:.08}],119947:[.694,.202,.471,{sk:.163}],119948:[.694,.008,.604,{sk:-.026}],119949:[.694,.008,.348,{sk:.074}],119950:[.452,.008,1.032,{sk:.06}],119951:[.452,.008,.713,{sk:.032}],119952:[.452,.008,.585,{sk:.074}],119953:[.452,.194,.601,{sk:.112}],119954:[.452,.194,.542,{ic:.001,sk:.059}],119955:[.452,.008,.529,{sk:.018}],119956:[.452,.008,.531,{sk:.059}],119957:[.643,.008,.415,{sk:.063}],119958:[.452,.008,.681,{sk:.038}],119959:[.453,.008,.567,{sk:.069}],119960:[.453,.008,.831,{sk:.101}],119961:[.452,.008,.659,{sk:.029}],119962:[.452,.202,.59,{sk:.078}],119963:[.452,.008,.555,{sk:.076}],120484:[.442,.011,.322],120485:[.442,.205,.384,{sk:.083}],120488:[.698,0,.869],120489:[.686,0,.818,{sk:-.075}],120490:[.68,0,.692,{sk:-.019}],120491:[.698,0,.958],120492:[.68,0,.756,{sk:-.027}],120493:[.686,0,.703,{sk:.013}],120494:[.686,0,.9],120495:[.697,.011,.894],120496:[.686,0,.436],120497:[.686,0,.901,{sk:-.013}],120498:[.698,0,.806],120499:[.686,0,1.092],120500:[.686,0,.9],120501:[.675,0,.767],120502:[.697,.011,.864],120503:[.68,0,.9],120504:[.686,0,.786,{sk:-.063}],120505:[.697,.011,.894],120506:[.686,0,.831,{sk:-.015}],120507:[.675,0,.8],120508:[.697,0,.894],120509:[.686,0,.831],120510:[.686,0,.869,{sk:-.017}],120511:[.686,0,.894],120512:[.697,0,.831],120513:[.686,.025,.958],120514:[.452,.008,.743,{ic:.007,sk:.015}],120515:[.703,.194,.647],120516:[.452,.211,.679],120517:[.718,.008,.551,{sk:-.011}],120518:[.461,.017,.597,{sk:-.025}],120519:[.703,.202,.615,{sk:-.041}],120520:[.452,.211,.615,{sk:-.051}],120521:[.702,.008,.567],120522:[.452,.008,.359,{ic:.004,sk:-.068}],120523:[.452,.008,.615,{ic:.004,sk:-.034}],120524:[.694,.012,.618,{ic:.048,sk:-.227}],120525:[.452,.211,.615,{ic:.004,sk:-.036}],120526:[.453,0,.583,{sk:-.04}],120527:[.703,.202,.615,{sk:-.072}],120528:[.453,.006,.575],120529:[.444,.009,.679,{sk:-.011}],120530:[.452,.211,.567],120531:[.452,.105,.551],120532:[.444,.008,.695],120533:[.444,.012,.615,{sk:-.035}],120534:[.453,.008,.615,{sk:-.019}],120535:[.452,.216,.743,{sk:-.015}],120536:[.452,.202,.743,{ic:.003,sk:-.063}],120537:[.694,.202,.743,{sk:.032}],120538:[.453,.008,.743],120539:[.711,.017,.679],120540:[.444,.008,.506,{ic:.003,sk:.04}],120541:[.702,.008,.615,{sk:.033}],120542:[.452,.01,.724,{sk:-.018}],120543:[.694,.202,.743],120544:[.452,.194,.567],120545:[.444,.008,.966,{sk:-.01}],120546:[.716,0,.75,{sk:.177}],120547:[.683,0,.759,{sk:.077}],120548:[.68,0,.615,{ic:.108,sk:.072}],120549:[.716,0,.833,{sk:.17}],120550:[.68,0,.738,{ic:.028,sk:.092}],120551:[.683,0,.683,{ic:.04,sk:.11}],120552:[.683,0,.831,{ic:.05,sk:.089}],120553:[.705,.022,.763,{sk:.117}],120554:[.684,.001,.44,{ic:.057,sk:.084}],120555:[.684,0,.849,{ic:.04,sk:.09}],120556:[.716,0,.694,{sk:.17}],120557:[.683,0,.97,{ic:.074,sk:.085}],120558:[.683,0,.803,{ic:.078,sk:.082}],120559:[.677,0,.742,{ic:.035,sk:.097}],120560:[.705,.022,.763,{sk:.117}],120561:[.68,0,.831,{ic:.049,sk:.089}],120562:[.683,0,.642,{ic:.112,sk:.049}],120563:[.705,.022,.763,{sk:.117}],120564:[.683,0,.78,{ic:.026,sk:.104}],120565:[.677,0,.584,{ic:.12,sk:.012}],120566:[.705,0,.583,{ic:.118}],120567:[.683,0,.667,{sk:.082}],120568:[.683,0,.828,{ic:.023,sk:.097}],120569:[.683,0,.612,{ic:.081,sk:.025}],120570:[.705,0,.772,{ic:.014,sk:.137}],120571:[.683,.033,.833],120572:[.442,.011,.64,{sk:.072}],120573:[.706,.194,.566,{ic:.008,sk:.148}],120574:[.442,.215,.518,{ic:.025,sk:.111}],120575:[.712,.011,.444,{ic:.008,sk:.107}],120576:[.453,.022,.466,{sk:.051}],120577:[.697,.205,.438,{ic:.036,sk:.067}],120578:[.442,.216,.497,{sk:.1}],120579:[.705,.011,.469,{sk:.075}],120580:[.442,.011,.354],120581:[.442,.011,.576,{sk:.043}],120582:[.694,.013,.583,{sk:-.053}],120583:[.442,.216,.603,{sk:.048}],120584:[.442,0,.494,{ic:.03,sk:.028}],120585:[.697,.205,.438,{ic:.008,sk:.06}],120586:[.442,.011,.485],120587:[.431,.011,.57,{sk:.043}],120588:[.442,.216,.517,{sk:.096}],120589:[.442,.108,.363,{ic:.046,sk:.044}],120590:[.431,.011,.571],120591:[.431,.012,.437,{ic:.074}],120592:[.442,.011,.54,{sk:.036}],120593:[.442,.218,.654,{sk:.028}],120594:[.442,.205,.626,{sk:.018}],120595:[.694,.205,.651,{sk:.143}],120596:[.442,.011,.622,{sk:.034}],120597:[.716,.022,.531,{ic:.035,sk:.069}],120598:[.431,.011,.406,{sk:.066}],120599:[.705,.011,.591,{sk:.116}],120600:[.442,.012,.624,{sk:.053}],120601:[.694,.205,.596,{sk:.125}],120602:[.442,.194,.517,{sk:.102}],120603:[.431,.011,.828,{sk:.039}],120604:[.711,0,.869,{sk:.174}],120605:[.686,0,.866,{sk:.069}],120606:[.68,0,.657,{ic:.12,sk:.071}],120607:[.711,0,.958,{sk:.168}],120608:[.68,0,.81,{ic:.015,sk:.098}],120609:[.686,0,.773,{ic:.032,sk:.117}],120610:[.686,0,.982,{ic:.045,sk:.09}],120611:[.703,.017,.867,{sk:.108}],120612:[.686,0,.511,{ic:.055,sk:.085}],120613:[.686,0,.971,{ic:.032,sk:.093}],120614:[.711,0,.806,{sk:.167}],120615:[.686,0,1.142,{ic:.074,sk:.085}],120616:[.686,0,.95,{ic:.077,sk:.082}],120617:[.675,0,.841,{ic:.026,sk:.104}],120618:[.703,.017,.837,{sk:.111}],120619:[.68,0,.982,{ic:.044,sk:.09}],120620:[.686,0,.723,{ic:.126,sk:.039}],120621:[.703,.017,.867,{sk:.108}],120622:[.686,0,.885,{ic:.019,sk:.108}],120623:[.675,0,.637,{ic:.135,sk:.01}],120624:[.703,0,.671,{ic:.131}],120625:[.686,0,.767,{sk:.08}],120626:[.686,0,.947,{ic:.006,sk:.106}],120627:[.686,0,.714,{ic:.078,sk:.029}],120628:[.703,0,.879,{ic:.007,sk:.135}],120629:[.686,.025,.958],120630:[.452,.008,.761,{sk:.059}],120631:[.703,.194,.66,{sk:.153}],120632:[.452,.211,.59,{ic:.027,sk:-.02}],120633:[.718,.008,.522,{sk:.115}],120634:[.461,.017,.529,{sk:.058}],120635:[.703,.202,.508,{ic:.014,sk:.083}],120636:[.452,.211,.6,{sk:.019}],120637:[.702,.008,.562,{sk:.062}],120638:[.452,.008,.412],120639:[.452,.008,.668,{sk:.025}],120640:[.694,.012,.671,{sk:-.072}],120641:[.452,.211,.708,{sk:.042}],120642:[.453,0,.577,{ic:.026,sk:.028}],120643:[.703,.202,.508,{sk:.061}],120644:[.452,.008,.585],120645:[.444,.009,.682,{sk:.046}],120646:[.452,.211,.612,{sk:.1}],120647:[.452,.105,.424,{ic:.038,sk:-.029}],120648:[.444,.008,.686],120649:[.444,.012,.521,{ic:.083}],120650:[.453,.008,.631,{sk:.037}],120651:[.452,.216,.747,{sk:.033}],120652:[.452,.202,.718,{sk:.011}],120653:[.694,.202,.758,{sk:.151}],120654:[.453,.008,.718,{sk:.039}],120655:[.711,.017,.628,{ic:.029,sk:.079}],120656:[.444,.008,.483,{sk:.074}],120657:[.702,.008,.692,{sk:.119}],120658:[.452,.01,.724,{sk:.053}],120659:[.694,.202,.713,{sk:.126}],120660:[.452,.194,.612,{sk:.094}],120661:[.444,.008,.975,{sk:.043}],120778:[.68,0,.783],120779:[.445,.267,.628],120782:[.655,.011,.575],120783:[.655,0,.575],120784:[.655,0,.575,{sk:-.011}],120785:[.655,.011,.575],120786:[.656,0,.575,{sk:.127}],120787:[.655,.011,.575],120788:[.655,.011,.575,{sk:.048}],120789:[.676,.011,.575,{sk:-.164}],120790:[.655,.011,.575,{sk:.011}],120791:[.655,.011,.575]},bold:{32:[0,0,.383],33:[.705,0,.35],34:[.697,-.418,.481],35:[.694,.194,.958],36:[.75,.056,.575],37:[.75,.056,.958],38:[.705,.011,.894],39:[.697,-.418,.319],40:[.75,.249,.447],41:[.75,.249,.447],42:[.75,-.306,.575],43:[.633,.132,.894],44:[.156,.194,.319],45:[.271,-.174,.383],46:[.156,0,.319],47:[.75,.25,.575],58:[.444,0,.319],59:[.444,.194,.319],60:[.587,.086,.894],61:[.393,-.108,.894],62:[.587,.086,.894],63:[.7,0,.543],64:[.7,.006,.894],91:[.75,.25,.319],92:[.75,.25,.575],93:[.75,.25,.319],94:[.744,-.562,.556,{ic:.005}],95:[-.101,.189,.869],96:[.704,-.509,.575],123:[.75,.25,.575],124:[.76,.26,.319],125:[.75,.25,.575],126:[.311,-.189,.556,{ic:.001}],160:[0,0,.575],163:[.686,.031,.869],165:[.686,0,.869],167:[.712,.212,.695],168:[.677,-.537,.575],172:[.403,-.098,.894],175:[.633,-.581,.575],176:[.686,-.367,.431],177:[.693,0,.894],180:[.704,-.509,.575],181:[.45,.194,.639],182:[.694,.194,.703],183:[.396,-.24,.278],215:[.543,.042,.894],240:[.702,.006,.575],247:[.582,.08,.894],305:[.45,0,.319],567:[.45,.2,.351],710:[.71,-.503,.575],711:[.71,-.503,.575],713:[.633,-.581,.575],714:[.704,-.509,.575],715:[.704,-.509,.575],717:[-.247,.307,.383,{ic:.029}],728:[.7,-.513,.575],729:[.685,-.529,.319],730:[.714,-.492,.338],732:[.661,-.553,.575],767:[-.035,.286,0,{dx:.287}],768:[.704,-.509,0,{dx:.317}],769:[.704,-.509,0,{dx:.242}],770:[.71,-.503,0,{dx:.279}],771:[.661,-.553,0,{dx:.279}],772:[.633,-.581,0,{dx:.279}],773:[.697,-.636,.894],774:[.7,-.513,0,{dx:.279}],775:[.685,-.529,0,{dx:.279}],776:[.677,-.537,0,{dx:.28}],778:[.764,-.542,0,{dx:.28}],780:[.71,-.503,0,{dx:.279}],824:[.748,.249,0],978:[.697,0,.87],1014:[.442,.011,.43],8192:[0,0,.575],8193:[0,0,1.15],8194:[0,0,.575],8195:[0,0,1.15],8196:[0,0,.383],8197:[0,0,.288],8198:[0,0,.192],8199:[0,0,.575],8200:[0,0,.319],8201:[0,0,.23],8202:[0,0,.032],8203:[0,0,0],8208:[.271,-.174,.383],8209:[.271,-.174,.383],8210:[.312,-.236,.575],8211:[.312,-.236,.575],8212:[.312,-.236,1.15],8214:[.75,.25,.499],8216:[.694,-.344,.319],8217:[.694,-.344,.319],8220:[.694,-.344,.571],8221:[.694,-.344,.571],8224:[.702,.211,.511],8225:[.702,.202,.511],8230:[.156,0,.838],8260:[.696,.01,.648],8356:[.686,.031,.869],8364:[.697,.011,.72],8486:[.697,0,.831],8487:[.686,.011,.831],8592:[.5,0,1.15],8593:[.694,.204,.575],8594:[.5,0,1.15],8595:[.704,.194,.575],8599:[.725,0,.894],8600:[.694,.031,.894],8710:[.698,0,1.028],8722:[.281,-.22,.894],8730:[.757,.094,.543,{ic:.064}],8734:[.47,.026,1.15],8738:[.634,.132,.894],8902:[.501,-.001,.575],8994:[.365,-.15,.894],9001:[.751,.25,.447],9002:[.751,.25,.447],9675:[.761,.261,1.277],9702:[.381,-.077,.894],10214:[.751,.249,.463],10215:[.751,.249,.463]},italic:{32:[0,0,.358],33:[.716,0,.307,{ic:.068}],34:[.705,-.423,.401,{ic:.048}],35:[.694,.194,.818,{ic:.01}],36:[.75,.056,.5,{ic:.091}],37:[.75,.056,.818,{ic:.028}],38:[.716,.022,.767,{ic:.037}],39:[.705,-.423,.307,{ic:.048}],40:[.75,.25,.409,{ic:.107}],41:[.75,.25,.409],42:[.75,-.319,.511,{ic:.072}],43:[.557,.057,.767],44:[.106,.193,.307],45:[.243,-.187,.358],46:[.106,0,.307],47:[.75,.25,.511,{ic:.105}],48:[.666,.022,.511,{ic:.044}],49:[.666,0,.511],50:[.666,.022,.511,{ic:.04}],51:[.666,.022,.511,{ic:.051}],52:[.666,.194,.511],53:[.665,.022,.511,{ic:.056}],54:[.666,.022,.511,{ic:.057}],55:[.666,.022,.511,{ic:.114}],56:[.666,.022,.511,{ic:.043}],57:[.666,.022,.511,{ic:.042}],58:[.431,0,.307],59:[.431,.193,.307],60:[.54,.04,.778,{ic:.049}],61:[.367,-.133,.767,{ic:.01}],62:[.54,.04,.778],63:[.716,0,.511,{ic:.04}],64:[.705,.011,.767,{ic:.022}],91:[.75,.25,.307,{ic:.139}],92:[.75,.25,.5],93:[.75,.25,.307,{ic:.052}],94:[.745,-.561,.556,{ic:.153}],95:[-.11,.14,.743],96:[.696,-.505,.511],123:[.75,.25,.5,{ic:.113}],124:[.75,.25,.278,{ic:.066}],125:[.75,.25,.5],126:[.309,-.191,.556,{ic:.072}],160:[0,0,.511],168:[.649,-.553,.511,{ic:.032}],175:[.616,-.586,.511,{ic:.061}],176:[.683,-.428,.383,{ic:.079}],180:[.696,-.505,.511,{ic:.028}],305:[.442,.011,.322],567:[.442,.205,.384,{sk:.083}],710:[.686,-.509,.511,{ic:.024}],711:[.692,-.515,.511,{ic:.061}],713:[.616,-.586,.511,{ic:.061}],714:[.696,-.505,.511,{ic:.028}],715:[.696,-.505,.511],728:[.686,-.516,.511,{ic:.052}],729:[.654,-.548,.307,{ic:.051}],730:[.705,-.529,.831],732:[.651,-.55,.511,{ic:.057}],767:[-.025,.275,0,{dx:.275}],768:[.696,-.505,0,{dx:.136}],769:[.696,-.505,0,{dx:.077}],770:[.686,-.509,0,{dx:.123}],771:[.651,-.55,0,{dx:.105}],772:[.616,-.586,0,{dx:.105}],773:[.681,-.641,.766,{ic:.062}],774:[.686,-.516,0,{dx:.089}],775:[.654,-.548,0,{dx:.105}],776:[.649,-.553,0,{dx:.096}],778:[.705,-.529,0,{dx:.101}],780:[.692,-.515,0,{dx:.086}],824:[.748,.248,0],978:[.722,0,.778,{ic:.007}],1014:[.442,.011,.43],8192:[0,0,.511],8193:[0,0,1.022],8194:[0,0,.511],8195:[0,0,1.022],8196:[0,0,.341],8197:[0,0,.256],8198:[0,0,.17],8199:[0,0,.511],8200:[0,0,.307],8201:[0,0,.204],8202:[0,0,.026],8203:[0,0,0],8208:[.243,-.187,.358,{ic:.001}],8209:[.243,-.187,.358,{ic:.001}],8210:[.277,-.255,.511,{ic:.04}],8211:[.277,-.255,.511,{ic:.04}],8212:[.277,-.255,1.022,{ic:.014}],8214:[.75,.25,.398,{ic:.066}],8216:[.693,-.394,.307,{ic:.053}],8217:[.694,-.395,.307,{ic:.066}],8220:[.693,-.394,.49,{ic:.053}],8221:[.694,-.395,.49,{ic:.064}],8230:[.106,0,.684],8260:[.683,0,.603,{ic:.093}],8356:[.683,.032,.743,{ic:.003}],8364:[.705,.022,.576,{ic:.126}],8486:[.705,0,.716,{ic:.043}],8487:[.684,.021,.716,{ic:.071}],8592:[.512,.011,.971],8593:[.694,.195,.512,{ic:.07}],8594:[.513,.01,.971],8595:[.695,.194,.512],8710:[.716,0,.833],8722:[.27,-.23,.767],8730:[.735,.104,.46,{ic:.226}],8734:[.456,.025,.92,{ic:.022}],8738:[.557,.057,.767,{ic:.047}],8902:[.483,-.019,.511,{ic:.063}],9001:[.751,.249,.409,{ic:.105}],9002:[.751,.249,.409],9675:[.772,.272,1.073,{ic:.003}],9702:[.379,-.081,.767],10214:[.751,.249,.422,{ic:.138}],10215:[.751,.249,.422,{ic:.052}]},"bold-italic":{32:[0,0,.414],33:[.711,0,.386,{ic:.044}],34:[.703,-.422,.518,{ic:.048}],35:[.694,.194,.944],36:[.75,.056,.575,{ic:.079}],37:[.75,.056,.944,{ic:.002}],38:[.711,.017,.886,{ic:.011}],39:[.703,-.422,.356,{ic:.048}],40:[.75,.249,.473,{ic:.094}],41:[.75,.249,.473],42:[.75,-.306,.591,{ic:.057}],43:[.603,.102,.886],44:[.147,.194,.356],45:[.269,-.175,.414],46:[.147,0,.356],47:[.75,.25,.591,{ic:.09}],48:[.661,.017,.591,{ic:.045}],49:[.661,0,.591],50:[.661,.017,.591,{ic:.027}],51:[.661,.017,.591,{ic:.037}],52:[.661,.194,.591],53:[.661,.017,.591,{ic:.037}],54:[.661,.017,.591,{ic:.037}],55:[.661,.017,.591,{ic:.115}],56:[.661,.017,.591,{ic:.027}],57:[.661,.017,.591,{ic:.03}],58:[.444,0,.356],59:[.444,.194,.356],60:[.587,.086,.894,{ic:.046}],61:[.393,-.108,.886],62:[.587,.086,.894],63:[.711,0,.591,{ic:.023}],64:[.702,.008,.886,{ic:.01}],91:[.75,.25,.356,{ic:.129}],92:[.75,.25,.575],93:[.75,.25,.356,{ic:.036}],94:[.744,-.562,.556,{ic:.151}],95:[-.097,.153,.866],96:[.699,-.502,.591],123:[.75,.25,.575,{ic:.109}],124:[.75,.25,.319,{ic:.059}],125:[.75,.25,.575],126:[.307,-.193,.556,{ic:.071}],160:[0,0,.591],168:[.667,-.535,.591,{ic:.045}],175:[.626,-.576,.591,{ic:.047}],176:[.686,-.392,.443,{ic:.081}],180:[.699,-.502,.591,{ic:.005}],305:[.452,.008,.394,{sk:-.012}],567:[.452,.202,.439,{sk:.063}],710:[.704,-.497,.591,{ic:.012}],711:[.704,-.497,.591,{ic:.052}],713:[.626,-.576,.591,{ic:.047}],714:[.699,-.502,.591,{ic:.005}],715:[.699,-.502,.591],717:[-.247,.307,.383,{ic:.032}],728:[.69,-.511,.591,{ic:.037}],729:[.674,-.527,.356,{ic:.048}],730:[.702,-.534,.949],732:[.66,-.541,.591,{ic:.042}],767:[-.035,.286,0,{dx:.272}],768:[.699,-.502,0,{dx:.188}],769:[.699,-.502,0,{dx:.113}],770:[.704,-.497,0,{dx:.165}],771:[.66,-.541,0,{dx:.145}],772:[.626,-.576,0,{dx:.145}],773:[.708,-.647,.885,{ic:.049}],774:[.69,-.511,0,{dx:.13}],775:[.674,-.527,0,{dx:.144}],776:[.667,-.535,0,{dx:.145}],778:[.702,-.534,0,{dx:.141}],780:[.704,-.497,0,{dx:.124}],824:[.749,.249,0],978:[.697,0,.87,{ic:.103}],1014:[.442,.011,.43,{ic:.04}],8192:[0,0,.591],8193:[0,0,1.182],8194:[0,0,.591],8195:[0,0,1.182],8196:[0,0,.394],8197:[0,0,.296],8198:[0,0,.197],8199:[0,0,.591],8200:[0,0,.355],8201:[0,0,.236],8202:[0,0,.029],8203:[0,0,0],8208:[.269,-.175,.414],8209:[.269,-.175,.414],8210:[.293,-.257,.591,{ic:.036}],8211:[.292,-.256,.591,{ic:.037}],8212:[.292,-.256,1.182,{ic:.006}],8214:[.75,.25,.499,{ic:.059}],8216:[.694,-.353,.356,{ic:.037}],8217:[.694,-.353,.356,{ic:.059}],8220:[.694,-.353,.59,{ic:.038}],8221:[.694,-.353,.59,{ic:.059}],8230:[.147,0,.842],8260:[.696,.01,.713,{ic:.08}],8356:[.686,.031,.866,{ic:.008}],8364:[.703,.017,.664,{ic:.115}],8486:[.703,0,.827,{ic:.031}],8487:[.686,.017,.827,{ic:.056}],8592:[.518,.017,1.121],8593:[.694,.204,.592,{ic:.069}],8594:[.518,.017,1.121],8595:[.704,.194,.592],8710:[.699,0,1.028],8722:[.281,-.22,.886],8730:[.757,.094,.531,{ic:.243}],8734:[.473,.029,1.06,{ic:.044}],8738:[.604,.102,.886,{ic:.035}],8902:[.501,-.001,.591,{ic:.048}],9001:[.75,.25,.473,{ic:.09}],9002:[.751,.25,.473],9675:[.772,.272,1.239],9702:[.386,-.072,.886],10214:[.751,.249,.488,{ic:.129}],10215:[.751,.249,.488,{ic:.037}]},"double-struck":{},fraktur:{},"bold-fraktur":{},"sans-serif":{717:[-.208,.286,.333,{ic:.038}],767:[-.023,.277,0,{dx:.274}],824:[.749,.25,0],8192:[0,0,.5],8193:[0,0,1],8194:[0,0,.5],8195:[0,0,1],8196:[0,0,.333],8197:[0,0,.25],8198:[0,0,.167],8199:[0,0,.5],8200:[0,0,.278],8201:[0,0,.2],8202:[0,0,.028],8203:[0,0,0],8356:[.694,.022,.667],8599:[.718,-.001,.778],8600:[.694,.024,.778],8710:[.694,0,.833],8902:[.491,.006,.5,{ic:.023}],8994:[.363,-.133,.778],9675:[.772,.272,1.111]},"bold-sans-serif":{717:[-.253,.389,.367,{ic:.067}],767:[-.025,.319,0,{dx:.294}],824:[.759,.257,0],8192:[0,0,.55],8193:[0,0,1.1],8194:[0,0,.55],8195:[0,0,1.1],8196:[0,0,.367],8197:[0,0,.275],8198:[0,0,.183],8199:[0,0,.55],8200:[0,0,.305],8201:[0,0,.22],8202:[0,0,.031],8203:[0,0,0],8356:[.694,.047,.733],8599:[.734,.023,.856],8600:[.72,.037,.856],8710:[.694,0,.916],8902:[.519,.031,.55,{ic:.015}],8994:[.381,-.095,.856],9675:[.772,.272,1.222]},"sans-serif-italic":{717:[-.208,.286,.333],767:[-.023,.277,0,{dx:.272}],824:[.749,.25,0],8192:[0,0,.5],8193:[0,0,.5],8194:[0,0,.333],8195:[0,0,.25],8196:[0,0,.167],8197:[0,0,.5],8198:[0,0,.278],8199:[0,0,.2],8200:[0,0,.028],8201:[0,0,0],8202:[0,0,0],8203:[0,0,0],8356:[.694,.022,.667],8599:[.718,-.001,.778,{ic:.095}],8600:[.694,.025,.778,{ic:.029}],8710:[.694,0,.833],8902:[.515,.008,.5,{ic:.09}],8994:[.364,-.133,.778],9675:[.772,.272,1.111,{ic:.008}]},"sans-serif-bold-italic":{717:[-.253,.389,.367,{ic:.003}],767:[-.025,.319,0,{dx:.327}],824:[.759,.257,0],8192:[0,0,.55],8193:[0,0,1.1],8194:[0,0,.55],8195:[0,0,1.1],8196:[0,0,.367],8197:[0,0,.275],8198:[0,0,.183],8199:[0,0,.55],8200:[0,0,.305],8201:[0,0,.22],8202:[0,0,.031],8203:[0,0,0],8356:[.694,.047,.733],8599:[.734,.023,.856,{ic:.086}],8600:[.72,.037,.856,{ic:.049}],8710:[.694,0,.916],8902:[.519,.031,.55,{ic:.076}],8994:[.381,-.095,.856],9675:[.772,.272,1.222,{ic:.046}]},monospace:{717:[-.025,.095,.525,{ic:.035}],767:[-.008,.359,.525],824:[.694,.083,.525],8193:[0,0,.525],8195:[0,0,.525],8199:[0,0,.525],8200:[0,0,.525],8356:[.611,.011,.525],8599:[.619,0,.525,{ic:.035}],8600:[.611,.008,.525,{ic:.035}],8710:[.651,0,.525],8902:[.555,-.057,.525],8994:[.414,-.195,.525],9675:[.705,.233,.525,{ic:.075}],64263:[0,0,.525]},"-smallop":{40:[.797,.297,.422],41:[.797,.297,.422],47:[.905,.405,.617],91:[.8,.3,.34],92:[.905,.405,.617],93:[.8,.3,.34],123:[.801,.301,.54],125:[.801,.301,.54],770:[.746,-.571,.644,{ic:.001}],771:[.751,-.55,.652],773:[.67,-.63,.568],774:[.743,-.578,.658,{ic:.001}],780:[.741,-.566,.644,{ic:.001}],8260:[.905,.405,.617],8400:[.711,-.601,.667],8401:[.711,-.601,.667],8406:[.711,-.521,.659],8407:[.711,-.521,.659],8417:[.711,-.521,.715],8428:[-.171,.281,.667],8429:[-.171,.281,.667],8430:[-.091,.281,.659],8431:[-.091,.281,.659],8725:[.605,.105,.572],8726:[.605,.105,.572],8730:[.85,.35,1,{ic:.02}],8739:[.851,.351,.333],8741:[.851,.351,.555],8968:[.8,.3,.458],8969:[.8,.3,.458],8970:[.8,.3,.458],8971:[.8,.3,.458],9140:[.73,-.546,.735],9141:[-.116,.3,.735],9180:[.745,-.54,1.006],9181:[-.11,.315,1.006],9182:[.815,-.509,.993,{ic:.001}],9183:[-.079,.385,.993],9184:[.853,-.613,1.048,{ic:.006}],9185:[-.183,.423,1.048,{ic:.006}],10214:[.8,.3,.444],10215:[.8,.3,.444],10216:[.8,.3,.428],10217:[.8,.3,.428],10218:[.8,.3,.623],10219:[.8,.3,.623],10222:[.813,.313,.305],10223:[.813,.313,.305],10627:[.801,.301,.54],10628:[.801,.301,.54],10629:[.797,.297,.422],10630:[.797,.297,.422],10748:[.791,.291,.422],10749:[.791,.291,.422],126704:[.72,.017,1.953,{sk:-.102}],126705:[.708,.035,2.524]},"-largeop":{40:[.847,.347,.458],41:[.847,.347,.458],47:[1.108,.608,.768],91:[.85,.35,.417],92:[1.108,.608,.768],93:[.85,.35,.417],123:[.85,.35,.583],125:[.85,.35,.583],770:[.746,-.571,.768,{ic:.001}],771:[.753,-.548,.778],774:[.743,-.578,.784,{ic:.001}],780:[.741,-.566,.768,{ic:.001}],8260:[1.108,.608,.768],8512:[.95,.45,1.353,{sk:.067}],8719:[.95,.45,1.278],8720:[.95,.45,1.278],8721:[.95,.45,1.444],8725:[.608,.107,.577],8726:[.608,.107,.577],8730:[1.15,.651,1,{ic:.02}],8739:[.971,.471,.333],8741:[.971,.471,.555],8747:[1.361,.861,.669,{ic:.33}],8748:[1.361,.861,1.089,{ic:.33}],8749:[1.361,.861,1.509,{ic:.33}],8750:[1.361,.861,.669,{ic:.33}],8751:[1.361,.861,1.089,{ic:.33}],8752:[1.361,.861,1.509,{ic:.33}],8753:[1.361,.861,.669,{ic:.33}],8754:[1.361,.861,.669,{ic:.33}],8755:[1.361,.861,.669,{ic:.33}],8896:[.958,.456,1.111],8897:[.956,.458,1.111],8898:[.939,.417,1.111],8899:[.917,.439,1.111],8968:[.85,.35,.472],8969:[.85,.35,.472],8970:[.85,.35,.472],8971:[.85,.35,.472],9140:[.735,-.541,1.11],9141:[-.111,.305,1.11],9180:[.761,-.511,1.508],9181:[-.081,.331,1.508],9182:[.818,-.509,1.494],9183:[-.078,.387,1.494],9184:[.854,-.612,1.55,{ic:.006}],9185:[-.182,.424,1.55,{ic:.006}],10145:[.469,-.031,1.423],10197:[.621,.006,.888,{sk:.09}],10198:[.621,.006,.888,{sk:-.07}],10199:[.621,.006,1.03],10214:[.85,.35,.48],10215:[.85,.35,.48],10216:[.85,.35,.472],10217:[.85,.35,.472],10218:[.85,.35,.682],10219:[.85,.35,.682],10222:[.864,.364,.323],10223:[.864,.364,.323],10627:[.85,.35,.583],10628:[.85,.35,.583],10629:[.847,.347,.458],10630:[.847,.347,.458],10744:[1.239,.677,.597,{ic:.053}],10745:[1.239,.677,.5,{ic:.15}],10748:[.842,.342,.422],10749:[.842,.342,.422],10752:[.902,.402,1.511],10753:[.902,.402,1.511],10754:[.902,.402,1.511],10755:[.917,.439,1.111],10756:[.917,.439,1.111],10757:[.936,.436,1.111],10758:[.936,.436,1.111],10759:[1.225,.693,1.945,{sk:.015}],10760:[1.23,.681,1.945],10761:[.88,.38,1.371],10762:[.95,.45,1.474,{sk:-.011}],10763:[1.361,.861,1.056],10764:[1.361,.861,1.929,{ic:.33}],10765:[1.361,.861,.669,{ic:.33}],10766:[1.361,.861,.669,{ic:.33}],10767:[1.361,.861,.669,{ic:.33}],10768:[1.361,.861,.669,{ic:.33}],10769:[1.361,.861,.669,{ic:.33}],10770:[1.361,.861,.669,{ic:.33}],10771:[1.361,.861,.669,{ic:.33}],10772:[1.361,.861,.669,{ic:.33}],10773:[1.361,.861,.669,{ic:.33}],10774:[1.361,.861,.669,{ic:.33}],10775:[1.361,.861,.669,{ic:.33}],10776:[1.361,.861,.669,{ic:.33}],10777:[1.361,.861,.849,{ic:.15}],10778:[1.361,.861,.849,{ic:.15}],10779:[1.602,.861,.763,{ic:.44}],10780:[1.361,1.124,.789,{ic:.33}],10781:[.921,.151,1.291],10782:[.885,.188,1.046,{sk:.083}],10784:[.774,.081,1.52],10785:[.976,.284,.784],11004:[1.237,.677,.694],11007:[1.237,.677,.478]},"-size3":{40:[.972,.472,.523],41:[.972,.472,.523],47:[1.374,.874,.964],91:[.975,.475,.444],92:[1.374,.874,.964],93:[.975,.475,.444],123:[.975,.475,.624],125:[.975,.475,.624],770:[.747,-.571,.919,{ic:.001}],771:[.757,-.543,.931],774:[.743,-.577,.937,{ic:.001}],780:[.741,-.565,.919,{ic:.001}],8260:[1.374,.874,.964],8725:[.61,.109,.581],8726:[.61,.109,.581],8730:[1.45,.951,1,{ic:.02}],8739:[1.117,.617,.333],8741:[1.117,.617,.555],8968:[.975,.475,.499],8969:[.975,.475,.499],8970:[.975,.475,.499],8971:[.975,.475,.499],9140:[.742,-.535,1.485],9141:[-.105,.312,1.485],9180:[.767,-.509,2.012],9181:[-.079,.337,2.012],9182:[.825,-.506,1.996],9183:[-.075,.394,1.996],9184:[.858,-.61,2.056,{ic:.006}],9185:[-.18,.428,2.056,{ic:.006}],10214:[.975,.475,.555],10215:[.975,.475,.555],10216:[.975,.475,.537],10217:[.975,.475,.537],10218:[.975,.475,.781],10219:[.975,.475,.781],10222:[.991,.491,.37],10223:[.991,.491,.37],10627:[.975,.475,.624],10628:[.975,.475,.624],10629:[.972,.472,.523],10630:[.972,.472,.523],10748:[.966,.466,.467],10749:[.966,.466,.467]},"-size4":{40:[1.146,.646,.597],41:[1.146,.646,.597],47:[1.722,1.222,1.222],91:[1.15,.65,.472],92:[1.722,1.222,1.222],93:[1.15,.65,.472],123:[1.15,.65,.667],125:[1.15,.65,.667],770:[.747,-.57,1.1,{ic:.001}],771:[.762,-.539,1.115],774:[.743,-.576,1.12,{ic:.001}],780:[.742,-.565,1.1,{ic:.001}],8260:[1.722,1.222,1.222],8725:[.613,.113,.588],8726:[.613,.113,.588],8730:[1.75,1.25,1,{ic:.02}],8739:[1.292,.792,.333],8741:[1.292,.792,.555],8968:[1.15,.65,.528],8969:[1.15,.65,.528],8970:[1.15,.65,.528],8971:[1.15,.65,.528],9140:[.75,-.527,1.86],9141:[-.097,.32,1.86],9180:[.774,-.506,2.516],9181:[-.076,.344,2.516],9182:[.833,-.502,2.498],9183:[-.071,.402,2.498],9184:[.863,-.607,2.564,{ic:.006}],9185:[-.177,.433,2.564,{ic:.006}],10214:[1.15,.65,.66],10215:[1.15,.65,.66],10216:[1.15,.65,.611],10217:[1.15,.65,.611],10218:[1.15,.65,.905],10219:[1.15,.65,.905],10222:[1.168,.668,.432],10223:[1.168,.668,.432],10627:[1.15,.65,.667],10628:[1.15,.65,.667],10629:[1.146,.646,.597],10630:[1.146,.646,.597],10748:[1.146,.646,.467,{ic:.023}],10749:[1.146,.646,.467,{ic:.023}]},"-size5":{40:[1.296,.796,.663],41:[1.296,.796,.663],47:[2.179,1.679,1.557],91:[1.3,.8,.499],92:[2.179,1.679,1.557],93:[1.3,.8,.499],123:[1.3,.8,.707],125:[1.3,.8,.707],770:[.748,-.569,1.32,{ic:.001}],771:[.766,-.534,1.335],774:[.743,-.575,1.341,{ic:.001}],780:[.743,-.564,1.32,{ic:.001}],8260:[2.179,1.679,1.557],8725:[.616,.115,.593],8726:[.616,.115,.593],8739:[1.502,1.002,.333],8741:[1.501,1.001,.555],8968:[1.3,.8,.555],8969:[1.3,.8,.555],8970:[1.3,.8,.555],8971:[1.3,.8,.555],9140:[.757,-.521,2.235],9141:[-.091,.327,2.235],9180:[.78,-.506,3.02],9181:[-.076,.35,3.02],9182:[.838,-.5,3],9183:[-.07,.408,3],9184:[.866,-.607,3.068,{ic:.006}],9185:[-.177,.436,3.068,{ic:.006}],10214:[1.3,.8,.75],10215:[1.3,.8,.75],10216:[1.3,.8,.677],10217:[1.3,.8,.677],10218:[1.3,.8,1.011],10219:[1.3,.8,1.011],10222:[1.32,.82,.485],10223:[1.32,.82,.485],10627:[1.3,.8,.707],10628:[1.3,.8,.707],10629:[1.296,.796,.663],10630:[1.296,.796,.663],10748:[1.296,.796,.467,{ic:.077}],10749:[1.296,.796,.467,{ic:.077}]},"-size6":{40:[1.446,.946,.736],41:[1.446,.946,.736],47:[2.777,2.277,1.997],91:[1.45,.95,.528],92:[2.777,2.277,1.997],93:[1.45,.95,.528],123:[1.45,.95,.75],125:[1.45,.95,.75],770:[.748,-.57,1.581,{ic:.001}],771:[.769,-.532,1.599],774:[.744,-.574,1.604,{ic:.001}],780:[.742,-.564,1.581,{ic:.001}],8260:[2.777,2.277,1.997],8725:[.619,.119,.6],8726:[.619,.119,.6],8739:[1.752,1.252,.333],8741:[1.751,1.252,.555],8968:[1.45,.95,.583],8969:[1.45,.95,.583],8970:[1.45,.95,.583],8971:[1.45,.95,.583],9140:[.764,-.513,2.61],9141:[-.083,.334,2.61],9180:[.787,-.505,3.524],9181:[-.075,.357,3.524],9182:[.845,-.498,3.502],9183:[-.067,.414,3.502],9184:[.869,-.606,3.574,{ic:.006}],9185:[-.176,.439,3.574,{ic:.006}],10214:[1.45,.95,.838],10215:[1.45,.95,.838],10216:[1.45,.95,.75],10217:[1.45,.95,.75],10218:[1.45,.95,1.124],10219:[1.45,.95,1.124],10222:[1.472,.972,.541],10223:[1.472,.972,.541],10627:[1.45,.95,.75],10628:[1.45,.95,.75],10629:[1.446,.946,.736],10630:[1.446,.946,.736],10748:[1.447,.936,.467,{ic:.131}],10749:[1.447,.936,.467,{ic:.131}]},"-size7":{40:[1.745,1.245,.875],41:[1.745,1.245,.875],47:[3.56,3.06,2.572],91:[1.75,1.25,.667],92:[3.56,3.06,2.572],93:[1.75,1.25,.667],123:[1.75,1.25,.902],125:[1.75,1.25,.902],770:[.749,-.569,1.896],771:[.773,-.527,1.915],774:[.744,-.573,1.92,{ic:.001}],780:[.743,-.563,1.896],8260:[3.56,3.06,2.572],8725:[.623,.122,.607],8726:[.623,.122,.607],8739:[2.052,1.552,.333],8741:[2.053,1.553,.555],8968:[1.75,1.25,.623],8969:[1.75,1.25,.623],8970:[1.75,1.25,.623],8971:[1.75,1.25,.623],9140:[.772,-.504,2.985],9141:[-.074,.342,2.985],9180:[.796,-.502,4.032],9181:[-.072,.366,4.032],9182:[.854,-.493,4.006],9183:[-.062,.423,4.006],9184:[.873,-.605,4.082,{ic:.006}],9185:[-.175,.443,4.082,{ic:.006}],10214:[1.75,1.25,1.007],10215:[1.75,1.25,1.007],10216:[1.75,1.25,.908],10217:[1.75,1.25,.908],10218:[1.75,1.25,1.362],10219:[1.75,1.25,1.362],10222:[1.776,1.276,.647],10223:[1.776,1.276,.647],10627:[1.75,1.25,.902],10628:[1.75,1.25,.902],10629:[1.745,1.245,.875],10630:[1.745,1.245,.875],10748:[1.751,1.251,.467,{ic:.257}],10749:[1.751,1.251,.467,{ic:.592}]},"-tex-mathit":{65:[.716,0,.743],66:[.683,0,.704,{oc:.03}],67:[.705,.022,.716,{oc:.096}],68:[.683,0,.755,{oc:.02}],69:[.68,0,.678,{oc:.069}],70:[.68,0,.653,{oc:.082}],71:[.705,.022,.774,{oc:.038}],72:[.683,0,.743,{oc:.109}],73:[.683,0,.386,{oc:.115}],74:[.683,.022,.525,{oc:.097}],75:[.683,0,.769,{oc:.09}],76:[.683,0,.627],77:[.683,0,.897,{oc:.105}],78:[.683,0,.743,{oc:.109}],79:[.705,.022,.767,{oc:.021}],80:[.683,0,.678,{oc:.052}],81:[.705,.194,.767,{oc:.021}],82:[.683,.022,.729],83:[.705,.022,.562,{oc:.07}],84:[.677,0,.716,{oc:.09}],85:[.683,.022,.743,{oc:.109}],86:[.683,.022,.743,{oc:.125}],87:[.683,.022,.999,{oc:.125}],88:[.683,0,.743,{oc:.082}],89:[.683,0,.743,{oc:.131}],90:[.683,0,.613,{oc:.091}],97:[.442,.011,.511,{oc:.014}],98:[.694,.011,.46],99:[.442,.011,.46,{oc:.01}],100:[.694,.011,.511,{oc:.049}],101:[.442,.011,.46,{oc:.008}],102:[.705,.205,.307,{oc:.145}],103:[.442,.205,.46,{oc:.027}],104:[.694,.011,.511,{oc:.024}],105:[.654,.011,.307,{oc:.051}],106:[.654,.205,.307,{oc:.051}],107:[.694,.011,.46,{oc:.042}],108:[.694,.011,.256,{oc:.05}],109:[.442,.011,.818,{oc:.024}],110:[.442,.011,.562,{oc:.024}],111:[.442,.011,.511],112:[.442,.194,.511],113:[.442,.194,.46,{oc:.037}],114:[.442,.011,.422,{oc:.067}],115:[.442,.011,.409,{oc:.01}],116:[.626,.011,.332,{oc:.041}],117:[.442,.011,.537,{oc:.024}],118:[.442,.011,.46,{oc:.033}],119:[.442,.011,.664,{oc:.033}],120:[.442,.011,.464,{oc:.054}],121:[.442,.205,.486,{oc:.03}],122:[.442,.011,.409,{oc:.055}]},"-tex-calligraphic":{},"-tex-bold-calligraphic":{},"-tex-oldstyle":{48:[.472,.022,.57],49:[.472,0,.404],50:[.472,0,.554],51:[.472,.216,.563],52:[.485,.194,.517],53:[.472,.216,.547],54:[.666,.022,.563],55:[.485,.213,.503],56:[.666,.022,.563],57:[.472,.216,.563]},"-tex-bold-oldstyle":{48:[.461,.011,.654],49:[.461,0,.494],50:[.461,0,.636],51:[.461,.205,.648],52:[.488,.194,.595],53:[.461,.205,.63],54:[.655,.011,.648],55:[.488,.199,.579],56:[.655,.011,.648],57:[.461,.205,.648]},"-tex-variant":{8216:[.549,-.096,.407],8217:[.549,-.096,.407],8218:[.549,-.096,.407],8219:[.549,-.096,.407],8220:[.549,-.096,.647],8221:[.549,-.096,.647],8222:[.549,-.096,.647],8223:[.549,-.096,.647],8242:[.549,-.096,.407],8243:[.549,-.096,.647],8244:[.549,-.096,.887],8245:[.549,-.096,.407],8246:[.549,-.096,.647],8247:[.549,-.096,.887],8279:[.549,-.096,1.127],8463:[.694,.011,.511,{ic:.024}],8592:[.437,-.063,.5],8594:[.437,-.063,.5],8709:[.597,.097,.778],8722:[.27,-.23,.5],8726:[.431,.022,.777],8730:[.75,.25,.833,{ic:.02}],8733:[.472,-.028,.777],8739:[.431,.022,.222],8740:[.431,.022,.222,{ic:.019}],8741:[.431,.022,.388],8742:[.431,.022,.388,{ic:.02}],8764:[.367,-.133,.777],8776:[.483,-.056,.777],8808:[.753,.276,.777],8809:[.753,.276,.777],8816:[.92,.42,.777],8817:[.92,.42,.777],8840:[.828,.328,.777],8841:[.828,.328,.777],8842:[.636,.248,.777],8843:[.636,.248,.777],8902:[.485,-.019,.5],8994:[.378,-.122,.777],8995:[.378,-.142,.777],10887:[.803,.303,.777],10888:[.803,.303,.777],10955:[.753,.325,.777],10956:[.753,.325,.777]},"-lf-tp":{8400:[.711,-.601,.208],8406:[.711,-.521,.205],8429:[-.171,.281,.208],8430:[-.091,.281,.205],8592:[.51,.01,.507],8593:[.505,0,.5],8602:[.51,.01,.386],8606:[.51,.01,.507],8607:[.505,0,.572],8611:[.51,.01,.58],8614:[.51,.011,.499],8615:[.498,0,.632],8618:[.546,-.226,.507],8620:[.55,.05,.507],8636:[.499,-.226,.513],8637:[.273,0,.512],8638:[.513,0,.441],8639:[.513,0,.441],8644:[.432,.172,.515],8645:[.514,0,.896],8646:[.669,-.065,.514],8647:[.75,.25,.507],8648:[.505,0,.992],8651:[.598,-.131,.515],8652:[.369,.098,.514],8653:[.52,.02,.384],8656:[.52,.02,.504],8657:[.504,0,.652],8666:[.617,.117,.506],8693:[.515,0,.896],8730:[.62,0,1.056,{ic:.013}],9140:[.772,-.504,1.493],9141:[-.074,.342,1.493],9180:[.796,-.502,2.016],9181:[-.072,.366,2.016],9182:[.724,-.493,1.002],9183:[-.062,.294,1.002],9184:[.873,-.605,2.041],9185:[-.175,.443,2.041],10214:[1,0,1.007],10215:[1,0,1.007],10222:[1.526,0,.647],10223:[1.526,0,.647],10572:[.513,0,.616],10573:[.513,0,.616],11057:[.99,.49,.507]},"-rt-bt":{8401:[.711,-.601,.208],8407:[.711,-.521,.205],8428:[-.171,.281,.208],8431:[-.091,.281,.205],8594:[.51,.01,.507],8595:[.505,0,.5],8603:[.51,.01,.386],8608:[.51,.01,.507],8609:[.505,0,.572],8610:[.51,.01,.58],8612:[.51,.011,.499],8613:[.498,0,.632],8617:[.546,-.226,.507],8619:[.55,.05,.507],8640:[.499,-.226,.513],8641:[.273,0,.513],8642:[.513,0,.441],8643:[.513,0,.441],8644:[.669,-.065,.514],8645:[.515,0,.896],8646:[.432,.172,.515],8649:[.75,.25,.507],8650:[.505,0,.992],8651:[.369,.098,.514],8652:[.598,-.131,.515],8654:[.52,.02,.406],8658:[.52,.02,.504],8659:[.504,0,.652],8667:[.617,.117,.506],8693:[.514,0,.896],8694:[.99,.49,.507],9140:[.772,-.504,1.492],9141:[-.074,.342,1.492],9180:[.796,-.502,2.016],9181:[-.072,.366,2.016],9182:[.724,-.493,1.001],9183:[-.062,.294,1.001],9184:[.873,-.605,2.041,{ic:.006}],9185:[-.175,.443,2.041,{ic:.006}],10214:[1,0,1.007],10215:[1,0,1.007],10222:[1.526,0,.647],10223:[1.526,0,.647],10572:[.513,0,.616],10573:[.513,0,.616]},"-ex-md":{95:[-.188,.294,.994],123:[.748,0,.902],175:[.724,-.618,.994],773:[.67,-.63,.19],8400:[.631,-.601,.139],8592:[.274,-.226,.337],8593:[.337,0,.5],8602:[.51,.01,.386],8617:[.274,-.226,.337],8636:[.273,-.226,.341],8638:[.341,0,.441],8639:[.341,0,.441],8644:[.432,-.065,.343],8645:[.343,0,.896],8647:[.512,.012,.337],8648:[.337,0,.992],8651:[.369,-.131,.343],8653:[.52,.02,.384],8654:[.369,-.131,.102],8656:[.369,-.131,.336],8657:[.336,0,.652],8666:[.466,-.034,.337],8694:[.751,.251,.337],8730:[.64,0,1.056],9140:[.772,-.706,.995],9141:[-.276,.342,.995],9180:[.796,-.689,.994],9181:[-.259,.366,.994],9182:[.85,-.618,2.003],9183:[-.188,.419,2.003],9184:[.873,-.766,1.36],9185:[-.336,.443,1.36],10214:[1,0,1.007],10215:[1,0,1.007],10222:[.998,0,.647],10223:[.998,0,.647],10572:[.337,0,.616]},"-bbold":{8450:[.705,.022,.722,{sk:.042}],8461:[.683,0,.833,{sk:.052}],8469:[.683,0,.833],8473:[.683,0,.736],8474:[.705,.194,.778],8477:[.683,.022,.792],8484:[.683,0,.75,{sk:.021}],8508:[.431,.011,.687,{sk:.085}],8509:[.442,.215,.518,{ic:.025,sk:.098}],8510:[.68,0,.737,{sk:.026}],8511:[.68,0,.862,{sk:.056}],8512:[.683,0,.839,{sk:.048}],8517:[.683,0,.794,{ic:.023,sk:.115}],8518:[.694,.011,.673,{ic:.042,sk:.245}],8519:[.448,.011,.444,{ic:.03,sk:.082}],8520:[.691,0,.395,{ic:.028,sk:.119}],8521:[.691,.205,.423,{ic:.038,sk:.12}],120120:[.683,0,.863,{sk:-.025}],120121:[.683,0,.764],120123:[.683,0,.794,{sk:-.043}],120124:[.68,0,.736,{sk:.03}],120125:[.68,0,.709,{sk:.013}],120126:[.705,.022,.785],120128:[.683,0,.467,{sk:.015}],120129:[.683,.022,.597,{sk:.065}],120130:[.683,0,.833,{sk:.022}],120131:[.683,0,.68,{sk:-.08}],120132:[.684,0,1,{sk:.051}],120134:[.705,.022,.778],120138:[.705,.022,.556,{sk:-.018}],120139:[.677,0,.754,{sk:.023}],120140:[.683,.022,.806,{sk:.045}],120141:[.683,.008,.804,{sk:.059}],120142:[.683,.022,1.058,{sk:.015}],120143:[.683,0,.866,{sk:.043}],120144:[.683,0,.868,{sk:.057}],120146:[.448,.011,.614,{sk:-.013}],120147:[.694,.011,.673,{sk:-.126}],120148:[.448,.011,.444,{sk:.026}],120149:[.694,.011,.673,{sk:.152}],120150:[.448,.011,.444,{sk:.014}],120151:[.705,0,.423,{ic:.051,sk:-.028}],120152:[.453,.206,.5,{sk:-.026}],120153:[.694,0,.676,{sk:-.117}],120154:[.691,0,.395],120155:[.691,.205,.423,{sk:.015}],120156:[.694,0,.648,{sk:-.109}],120157:[.694,0,.394,{sk:.018}],120158:[.442,0,.95,{sk:-.037}],120159:[.442,0,.673],120160:[.448,.011,.5],120161:[.442,.194,.673],120162:[.442,.194,.645,{sk:.019}],120163:[.442,0,.509,{sk:-.051}],120164:[.448,.011,.394],120165:[.615,.011,.506,{sk:-.037}],120166:[.442,.011,.673,{sk:.024}],120167:[.431,.011,.635,{sk:.053}],120168:[.431,.011,.635,{ic:.155,sk:.012}],120169:[.431,0,.645,{sk:.049}],120170:[.431,.205,.635,{sk:.05}],120171:[.431,0,.561,{sk:.046}],120792:[.666,.022,.5],120793:[.666,0,.624,{sk:.025}],120794:[.666,0,.5],120795:[.666,.022,.5],120796:[.677,0,.627,{sk:.11}],120797:[.666,.022,.5,{sk:.011}],120798:[.666,.022,.5,{sk:.013}],120799:[.676,.022,.55,{sk:.038}],120800:[.666,.022,.5],120801:[.666,.022,.5]},"-upsmall":{8747:[.805,.306,.665],8748:[.805,.306,1.035],8749:[.805,.306,1.405],8750:[.81,.312,.665],8751:[.805,.306,1.035],8752:[.805,.306,1.405],8753:[.805,.306,.695],8754:[.805,.306,.665],8755:[.805,.306,.665],10764:[.805,.306,1.775],10765:[.805,.306,.665],10766:[.805,.306,.665],10776:[.805,.306,.665],10777:[.805,.306,.665],10778:[.805,.306,.665],10779:[.967,.306,.665,{ic:.002}],10780:[.805,.468,.665],58230:[.805,.306,.665],58231:[.805,.306,.665],58261:[.805,.306,.665],58263:[.805,.306,.665],58264:[.805,.306,.665],58265:[.805,.306,.665],58266:[.805,.306,.665,{ic:.085}],58267:[.798,.299,.695],58323:[.805,.306,.665],59991:[.805,.306,.707]},"-uplarge":{8747:[1.361,.861,.763],8748:[1.361,.861,1.175],8749:[1.361,.861,1.623],8750:[1.363,.861,.899],8751:[1.361,.861,1.295],8752:[1.361,.861,1.699],8753:[1.361,.861,.999],8754:[1.361,.861,.999],8755:[1.361,.861,.999],10763:[1.361,.861,1.056],10764:[1.361,.861,2.019],10765:[1.361,.861,.999],10766:[1.361,.861,.999],10767:[1.361,.861,.999],10768:[1.361,.861,.999],10769:[1.361,.861,.999],10770:[1.361,.861,.895],10771:[1.361,.861,.871],10772:[1.361,.861,.831,{ic:.077}],10773:[1.361,.861,.903],10774:[1.361,.861,.883],10775:[1.361,.861,.967],10776:[1.361,.861,.875],10777:[1.361,.861,.955],10778:[1.361,.861,.967],10779:[1.602,.861,.999],10780:[1.361,1.124,.807]},script:{},"bold-script":{}},zd.defaultStyles=Object.assign(Object.assign({},Gl.defaultStyles),{'mjx-container[jax="CHTML"] > mjx-math.NCM-N[breakable] > *':{"font-family":"MJX-NCM-ZERO, MJX-NCM-N"},".NCM-N":{"font-family":"MJX-NCM-ZERO, MJX-NCM-N"},".NCM-B":{"font-family":"MJX-NCM-ZERO, MJX-NCM-B"},".NCM-I":{"font-family":"MJX-NCM-ZERO, MJX-NCM-I"},".NCM-BI":{"font-family":"MJX-NCM-ZERO, MJX-NCM-BI"},".NCM-DS":{"font-family":"MJX-NCM-ZERO, MJX-NCM-DS"},".NCM-F":{"font-family":"MJX-NCM-ZERO, MJX-NCM-F"},".NCM-FB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-FB"},".NCM-SS":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SS"},".NCM-SSB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SSB"},".NCM-SSI":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SSI"},".NCM-SSBI":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SSBI"},".NCM-M":{"font-family":"MJX-NCM-ZERO, MJX-NCM-M"},".NCM-SO":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SO"},".NCM-LO":{"font-family":"MJX-NCM-ZERO, MJX-NCM-LO"},".NCM-S3":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S3"},".NCM-S4":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S4"},".NCM-S5":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S5"},".NCM-S6":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S6"},".NCM-S7":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S7"},".NCM-MI":{"font-family":"MJX-NCM-ZERO, MJX-NCM-MI"},".NCM-C":{"font-family":"MJX-NCM-ZERO, MJX-NCM-C"},".NCM-CB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-CB"},".NCM-OS":{"font-family":"MJX-NCM-ZERO, MJX-NCM-OS"},".NCM-OB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-OB"},".NCM-V":{"font-family":"MJX-NCM-ZERO, MJX-NCM-V"},".NCM-LT":{"font-family":"MJX-NCM-ZERO, MJX-NCM-LT"},".NCM-RB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-RB"},".NCM-EM":{"font-family":"MJX-NCM-ZERO, MJX-NCM-EM"},".NCM-Be":{"font-family":"MJX-NCM-ZERO, MJX-NCM-Be"},".NCM-U":{"font-family":"MJX-NCM-ZERO, MJX-NCM-U"},".NCM-Ue":{"font-family":"MJX-NCM-ZERO, MJX-NCM-Ue"},".NCM-S":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S"},".NCM-SB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SB"}}),zd.defaultFonts=Object.assign(Object.assign({},Gl.defaultFonts),{"@font-face /* MJX-NCM-ZERO */":{"font-family":"MJX-NCM-ZERO",src:'url("%%URL%%/mjx-ncm-zero.woff2") format("woff2")'},"@font-face /* MJX-BRK */":{"font-family":"MJX-BRK",src:'url("%%URL%%/mjx-ncm-brk.woff2") format("woff2")'},"@font-face /* MJX-NCM-N */":{"font-family":"MJX-NCM-N",src:'url("%%URL%%/mjx-ncm-n.woff2") format("woff2")'},"@font-face /* MJX-NCM-B */":{"font-family":"MJX-NCM-B",src:'url("%%URL%%/mjx-ncm-b.woff2") format("woff2")'},"@font-face /* MJX-NCM-I */":{"font-family":"MJX-NCM-I",src:'url("%%URL%%/mjx-ncm-i.woff2") format("woff2")'},"@font-face /* MJX-NCM-BI */":{"font-family":"MJX-NCM-BI",src:'url("%%URL%%/mjx-ncm-bi.woff2") format("woff2")'},"@font-face /* MJX-NCM-DS */":{"font-family":"MJX-NCM-DS",src:'url("%%URL%%/mjx-ncm-ds.woff2") format("woff2")'},"@font-face /* MJX-NCM-F */":{"font-family":"MJX-NCM-F",src:'url("%%URL%%/mjx-ncm-f.woff2") format("woff2")'},"@font-face /* MJX-NCM-FB */":{"font-family":"MJX-NCM-FB",src:'url("%%URL%%/mjx-ncm-fb.woff2") format("woff2")'},"@font-face /* MJX-NCM-SS */":{"font-family":"MJX-NCM-SS",src:'url("%%URL%%/mjx-ncm-ss.woff2") format("woff2")'},"@font-face /* MJX-NCM-SSB */":{"font-family":"MJX-NCM-SSB",src:'url("%%URL%%/mjx-ncm-ssb.woff2") format("woff2")'},"@font-face /* MJX-NCM-SSI */":{"font-family":"MJX-NCM-SSI",src:'url("%%URL%%/mjx-ncm-ssi.woff2") format("woff2")'},"@font-face /* MJX-NCM-SSBI */":{"font-family":"MJX-NCM-SSBI",src:'url("%%URL%%/mjx-ncm-ssbi.woff2") format("woff2")'},"@font-face /* MJX-NCM-M */":{"font-family":"MJX-NCM-M",src:'url("%%URL%%/mjx-ncm-m.woff2") format("woff2")'},"@font-face /* MJX-NCM-SO */":{"font-family":"MJX-NCM-SO",src:'url("%%URL%%/mjx-ncm-so.woff2") format("woff2")'},"@font-face /* MJX-NCM-LO */":{"font-family":"MJX-NCM-LO",src:'url("%%URL%%/mjx-ncm-lo.woff2") format("woff2")'},"@font-face /* MJX-NCM-S3 */":{"font-family":"MJX-NCM-S3",src:'url("%%URL%%/mjx-ncm-s3.woff2") format("woff2")'},"@font-face /* MJX-NCM-S4 */":{"font-family":"MJX-NCM-S4",src:'url("%%URL%%/mjx-ncm-s4.woff2") format("woff2")'},"@font-face /* MJX-NCM-S5 */":{"font-family":"MJX-NCM-S5",src:'url("%%URL%%/mjx-ncm-s5.woff2") format("woff2")'},"@font-face /* MJX-NCM-S6 */":{"font-family":"MJX-NCM-S6",src:'url("%%URL%%/mjx-ncm-s6.woff2") format("woff2")'},"@font-face /* MJX-NCM-S7 */":{"font-family":"MJX-NCM-S7",src:'url("%%URL%%/mjx-ncm-s7.woff2") format("woff2")'},"@font-face /* MJX-NCM-MI */":{"font-family":"MJX-NCM-MI",src:'url("%%URL%%/mjx-ncm-mi.woff2") format("woff2")'},"@font-face /* MJX-NCM-C */":{"font-family":"MJX-NCM-C",src:'url("%%URL%%/mjx-ncm-c.woff2") format("woff2")'},"@font-face /* MJX-NCM-CB */":{"font-family":"MJX-NCM-CB",src:'url("%%URL%%/mjx-ncm-cb.woff2") format("woff2")'},"@font-face /* MJX-NCM-OS */":{"font-family":"MJX-NCM-OS",src:'url("%%URL%%/mjx-ncm-os.woff2") format("woff2")'},"@font-face /* MJX-NCM-OB */":{"font-family":"MJX-NCM-OB",src:'url("%%URL%%/mjx-ncm-ob.woff2") format("woff2")'},"@font-face /* MJX-NCM-V */":{"font-family":"MJX-NCM-V",src:'url("%%URL%%/mjx-ncm-v.woff2") format("woff2")'},"@font-face /* MJX-NCM-LT */":{"font-family":"MJX-NCM-LT",src:'url("%%URL%%/mjx-ncm-lt.woff2") format("woff2")'},"@font-face /* MJX-NCM-RB */":{"font-family":"MJX-NCM-RB",src:'url("%%URL%%/mjx-ncm-rb.woff2") format("woff2")'},"@font-face /* MJX-NCM-EM */":{"font-family":"MJX-NCM-EM",src:'url("%%URL%%/mjx-ncm-em.woff2") format("woff2")'},"@font-face /* MJX-NCM-Be */":{"font-family":"MJX-NCM-Be",src:'url("%%URL%%/mjx-ncm-be.woff2") format("woff2")'},"@font-face /* MJX-NCM-U */":{"font-family":"MJX-NCM-U",src:'url("%%URL%%/mjx-ncm-u.woff2") format("woff2")'},"@font-face /* MJX-NCM-Ue */":{"font-family":"MJX-NCM-Ue",src:'url("%%URL%%/mjx-ncm-ue.woff2") format("woff2")'},"@font-face /* MJX-NCM-S */":{"font-family":"MJX-NCM-S",src:'url("%%URL%%/mjx-ncm-s.woff2") format("woff2")'},"@font-face /* MJX-NCM-SB */":{"font-family":"MJX-NCM-SB",src:'url("%%URL%%/mjx-ncm-sb.woff2") format("woff2")'}}),zd.dynamicFiles=Gl.defineDynamicFiles([["latin",{normal:[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7835],7838,[7840,7929],11377]}],["latin-b",{bold:[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["latin-i",{italic:[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929]]}],["latin-bi",{"bold-italic":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929]]}],["double-struck",{normal:[8450,8461,8469,8473,8474,8477,8484,[8508,8512],[8517,8521],120120,120121,[120123,120126],[120128,120132],120134,[120138,120144],[120146,120171],[120792,120801]],"double-struck":[305,567]}],["fraktur",{normal:[8460,8465,8476,8488,8493,120068,120069,[120071,120074],[120077,120084],[120086,120092],[120094,120119],[120172,120223]],fraktur:[305,567],"bold-fraktur":[305,567]}],["script",{normal:[8458,8459,8464,8466,8467,8472,8475,8492,[8495,8497],8499,8500,119964,119966,119967,119970,119973,119974,[119977,119980],[119982,119993],119995,[119997,120003],[120005,120067]],script:[],"bold-script":[]}],["sans-serif",{normal:[[8513,8516],[120224,120431],[120662,120777],[120802,120821]],"sans-serif":[[32,47],[58,64],[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[713,715],[728,730],732,[768,776],778,780,[913,929],[931,937],[945,969],977,978,981,982,1008,1009,[1012,1014],[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734],"bold-sans-serif":[32,33,[35,47],58,59,61,63,64,[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[713,715],[728,730],732,[768,776],778,780,978,1014,[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734],"sans-serif-italic":[[32,64],[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[713,715],[728,730],732,[768,776],778,780,[913,929],[931,937],[945,969],977,978,981,982,1008,1009,[1012,1014],[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734],"sans-serif-bold-italic":[32,33,[35,59],61,63,64,[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[713,715],[728,730],732,[768,776],778,780,978,1014,[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734]}],["sans-serif-r",{"sans-serif":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["sans-serif-b",{"bold-sans-serif":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["sans-serif-i",{"sans-serif-italic":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["sans-serif-bi",{"sans-serif-bold-italic":[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["sans-serif-ex",{"sans-serif":[161,162,164,166,[169,171],173,174,184,[186,191],[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879],3647,7620,7621,7624,7625,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9474,9553,9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59959,59962,59966,59970,59973,60163,60164,60168,60175,60177,60178,60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64260],65126],"bold-sans-serif":[161,162,164,166,[169,171],173,174,184,[186,191],[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879],3647,7620,7621,7624,7625,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9474,9553,9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64260],65126],"sans-serif-italic":[161,162,164,166,[169,171],173,174,184,[186,191],[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879],3647,7620,7621,7624,7625,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9474,9553,9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64260],65126],"sans-serif-bold-italic":[161,162,164,166,[169,171],173,174,184,[186,191],[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,879],3647,7620,7621,7624,7625,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9474,9553,9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64260],65126]}],["monospace",{normal:[[120432,120483],[120822,120831]],monospace:[[32,47],[58,64],[91,96],[123,126],160,163,165,167,168,172,[175,177],[180,183],215,240,247,305,567,710,711,[728,730],732,[768,776],778,780,[913,929],[931,937],[945,969],977,978,981,982,1008,1009,[1012,1014],[8208,8212],8214,8216,8217,8220,8221,8224,8225,8230,8260,8364,8486,8487,[8592,8595],8722,8734]}],["monospace-l",{monospace:[[192,214],[216,239],[241,246],[248,304],[306,566],[568,591],[7680,7699],[7704,7707],[7710,7719],[7722,7755],[7764,7779],[7784,7799],[7804,7833],7835,7838,[7840,7929],11377]}],["monospace-ex",{monospace:[161,162,164,166,[169,171],173,174,184,[186,191],[592,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,995],1010,1011,[1015,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309],3647,7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575,7620,7621,7624,7625,[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,[8592,8595],8730,8738,8960,9001,9002,9250,9251,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,[9552,9579],9702,9773,9792,9834,9901,9902,9906,10013,10214,10215,11800,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198,[64256,64262],65126]}],["calligraphic",{"-tex-calligraphic":[[65,90]],"-tex-bold-calligraphic":[[65,90]]}],["math",{normal:[8714,8717,8731,8732,8762,8763,8782,8783,[8785,8787],[8790,8796],8798,8844,[8886,8889],[8891,8895],8903,[8912,8929],[8932,8937],[8946,8959],[10176,10199],[10202,10204],[10207,10213],[10625,10646],[10649,10740],10742,[10746,10751],10762,10763,[10781,10798],[10800,10814],[10816,10876],[10879,10884],[10893,10900],[10903,10926],[10939,10948],[10951,10954],[10957,10973],[10988,10993],[10998,11003],[11005,11007]]}],["symbols",{normal:[127,161,162,164,166,[169,171],173,174,178,179,[185,191],3647,8204,8205,8215,8218,8219,8222,8223,[8226,8229],8233,8240,8241,[8248,8259],[8261,8278],[8280,8286],8319,8320,8353,8358,[8361,8363],8369,8370,8448,8449,[8451,8454],8456,8457,8468,8470,8471,[8478,8483],8485,8489,8494,[8505,8507],[8522,8527],[8960,8966],[8977,8984],8986,8987,[8996,9e3],[9003,9114],9142,[9146,9165],9167,[9169,9179],[9186,9203],[9208,9215],9250,9251,11159,11193,11209,[11216,11241],[11248,11263],11800,12306,12310,12311,12336,[64256,64262],65126,65279]},[8215]],["symbols-b-i",{bold:[161,162,164,166,[169,171],173,174,[186,191],3647,8204,8205,8218,8219,8222,8223,8226,8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8319,8320,8353,8358,[8361,8363],8369,8370,8451,8470,8471,8478,8480,8482,8494,8960,9250,9251,11800,[64256,64262],65126],italic:[[161,167],[169,174],177,[181,183],[186,191],215,240,247,3647,8204,8205,8218,8219,[8222,8226],8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8320,8353,8358,8361,8363,8369,8370,8451,8470,8471,8478,8480,8482,8494,8960,9250,9251,11800,[64256,64262],65126],"bold-italic":[[161,167],[169,174],177,[181,183],[186,191],215,240,247,3647,8204,8205,8218,8219,[8222,8226],8233,8240,8241,[8249,8251],8253,8255,8256,8261,8262,8274,8276,8320,8353,8358,[8361,8363],8369,8370,8451,8470,8471,8478,8480,8482,8494,8960,9250,9251,11800,[64256,64262],65126]}],["greek",{normal:[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[11392,11507],[11513,11519]],bold:[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,987],[990,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[11392,11507],[11513,11519]],italic:[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[11392,11507],[11513,11519]],"bold-italic":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[11392,11507],[11513,11519]]}],["greek-ss",{"sans-serif":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190]],"bold-sans-serif":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8121],[8123,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190]],"sans-serif-italic":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190]],"sans-serif-bold-italic":[[880,887],[890,895],[900,906],908,[910,912],[938,944],[970,976],979,980,[983,1007],1010,1011,[1015,1023],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],8025,8027,8029,[8031,8061],[8064,8116],[8118,8121],[8123,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190]]}],["cyrillic",{normal:[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],bold:[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],italic:[[1024,1143],[1146,1158],[1160,1225],[1227,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],"bold-italic":[[1024,1143],[1146,1158],[1160,1225],[1227,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]]}],["cyrillic-ss",{"sans-serif":[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],"bold-sans-serif":[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],"sans-serif-italic":[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]],"sans-serif-bold-italic":[[1024,1143],[1146,1158],[1160,1230],[1232,1273],[1276,1279],1298,1299,[1306,1309]]}],["phonetics",{normal:[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],bold:[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],italic:[[592,685],687],"bold-italic":[[592,687]]}],["phonetics-ss",{"sans-serif":[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],"bold-sans-serif":[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],"sans-serif-italic":[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575],"sans-serif-bold-italic":[[592,687],7424,7431,7434,7435,7437,7448,7449,7452,[7491,7499],7501,[7503,7507],[7510,7512],7514,7515,7517,7518,7520,7521,7544,[7568,7571],7575]}],["hebrew",{normal:[[1425,1479],[1488,1514],[1519,1525],1527,[64285,64335]],bold:[[1425,1479],[1488,1515],[1519,1525],1527,[64285,64335]],italic:[[1425,1479],[1488,1514],[1519,1525],1527,[64285,64335]],"bold-italic":[[1425,1479],[1488,1515],[1519,1525],1527,[64285,64335]]}],["devanagari",{normal:[[2304,2431]],bold:[],italic:[],"bold-italic":[]}],["cherokee",{normal:[[5024,5109],[5112,5117]],bold:[[5024,5109],[5112,5117]],italic:[[5024,5115]],"bold-italic":[[5024,5115]]}],["arabic",{normal:[[126464,126498],126500,126503,[126505,126514],[126516,126519],126521,126523,126530,126535,126537,126539,[126541,126543],126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],126704,126705],bold:[],italic:[],"bold-italic":[]}],["braille-d",{normal:[[10240,10495]]}],["braille",{"sans-serif":[[10240,10495]]}],["arrows",{normal:[8604,8605,8607,8609,8613,8615,8616,8621,[8623,8629],8632,8633,[8662,8665],[8668,8671],[8678,8692],[8695,8703],9166,10145,[10224,10228],10239,[10496,10505],[10508,10569],10572,10573,10575,10577,10580,10581,10584,10585,10588,10589,[10592,10601],[10608,10619],[11008,11026],[11056,11087],[11098,11123],[11126,11157],[11160,11192],[11244,11247]],"-largeop":[8593,8595,[8597,8603],[8606,8611],8613,8615,[8617,8622],[8624,8627],8630,8631,[8636,8655],8657,8659,[8661,8667],[8678,8681],8691,8693,8694,[11012,11015],11020,11021,11057],"-lf-tp":[[8678,8681],10503,11013,11014],"-rt-bt":[[8678,8681],10502,11015,11020],"-ex-md":[8678,8679,11013,11014]},[8607,8609,8613,8615,8621,8622,[8624,8627],[8662,8665],8668,8669,[8678,8681],8691,10145,10237,10238,10502,10503,10572,10573,10575,10577,10588,10589,10592,10593,[11012,11015],11020,11021,11057]],["marrows",{normal:[[129024,129035],[129040,129095],[129104,129113],[129120,129159],[129168,129197],129200,129201]}],["accents",{normal:[184,[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,879],7620,7621,7624,7625,[8403,8405],8408,[8413,8415],[8420,8427],8432],"-smallop":[785,[812,816],818,819,831,845],"-largeop":[785,[812,816]],"-size3":[785,[812,816]],"-size4":[785,[812,816]],"-size5":[785,[812,816]],"-size6":[785,[812,816]],"-size7":[785,[812,816]],"-ex-md":[818,819,831,845]},[785,[812,816],818,819,831,845,8425]],["accents-b-i",{bold:[184,[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879],7620,7621,7624,7625],italic:[184,[688,700],[702,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879]],"bold-italic":[184,[688,709],712,716,[718,727],731,[733,766],777,779,[781,823],[825,846],[848,879]]}],["shapes",{normal:[8962,[8998,9e3],9003,[9211,9214],[9472,9631],[9634,9641],[9644,9649],9672,9673,[9676,9678],[9680,9701],[9703,9710],[9712,9719],9728,9733,9734,9737,9761,9773,[9785,9790],9792,9794,[9824,9831],[9833,9835],[9837,9839],9854,[9856,9865],9893,[9898,9902],9906,10003,10013,10016,10026,10038,10045,10098,10099,10139,10145,[11026,11055],[11088,11097],[11194,11208],[11210,11215],11242,11243],bold:[9474,9553,9773,9792,9834,9901,9902,9906,10013],italic:[9773,9834,9901,9902,10013],"bold-italic":[9773,9834,9901,9902,10013]}],["mshapes",{normal:[[128896,128984],[128992,129003]]}],["variants",{"-tex-variant":[34,39,42,96,126,170,176,178,179,185,186,8212,8289,8304,8305,[8308,8334]]}],["PUA",{normal:[[57344,57395],[57409,57458],[59264,59274],59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198],bold:[59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,[61761,61766],[61771,61788],[61791,61797],61800,[61804,61810],61813,[61817,61819],[61822,61824],61826,61828,61829,[61832,61839],61842,61850,61854,61855,61857,61859,61860,[61863,61877],62082,62083,62110,62113,62116,[62119,62121],62124,62126,62127,[62560,62568],[62570,62578],63166,[63187,63190],63198],italic:[59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,61867,61868,[61873,61877],62082,62083,62110,62113,62116,62119,62120,[62560,62568],[62570,62578],63166,63172,[63174,63176],[63187,63190],63198],"bold-italic":[59395,[59908,59910],59913,59915,59917,59920,59927,59930,59932,59934,59935,59942,59946,59948,59951,59957,59962,59966,59970,59973,60163,60164,60168,[60175,60178],60182,60185,60190,60191,60200,60201,60203,60209,60213,60214,60218,60219,60224,60232,60233,60237,60257,60259,60261,60270,60271,[60424,60430],60432,60433,61699,61700,61705,[61719,61726],[61729,61731],[61734,61741],61743,[61747,61752],61757,61867,61868,[61873,61877],62082,62083,62110,62113,62116,62119,62120,[62560,62568],[62570,62578],63166,63172,[63174,63176],[63187,63190],63198]}]]);const Xd={fontName:"mathjax-newcm",DefaultFont:zd},Vd=Xd.fontName,Gd=Xd.DefaultFont;class Jd extends Sl{constructor(t={}){super(t,qd,Gd),this.chtmlStyles=null,this.font.adaptiveCSS(this.options.adaptiveCSS),this.wrapperUsage=new Vl}addExtension(t,e=""){const s=super.addExtension(t,e);return s.length&&this.options.adaptiveCSS&&this.chtmlStyles&&this.adaptor.insertRules(this.chtmlStyles,s),[]}escaped(t,e){return this.setDocument(e),this.html("span",{},[this.text(t.math)])}styleSheet(t){if(this.chtmlStyles){const t=new Co;return this.options.adaptiveCSS&&(this.addWrapperStyles(t),this.updateFontStyles(t)),t.addStyles(this.font.updateDynamicStyles()),this.adaptor.insertRules(this.chtmlStyles,t.getStyleRules()),this.chtmlStyles}const e=this.chtmlStyles=super.styleSheet(t);return this.adaptor.setAttribute(e,"id",Jd.STYLESHEETID),this.wrapperUsage.update(),e}updateFontStyles(t){t.addStyles(this.font.updateStyles({}))}addWrapperStyles(t){if(this.options.adaptiveCSS)for(const e of this.wrapperUsage.update()){const s=this.factory.getNodeClass(e);s&&this.addClassStyles(s,t)}else super.addWrapperStyles(t)}addClassStyles(t,e){const s=t;s.autoStyle&&"unknown"!==s.kind&&e.addStyles({["mjx-"+s.kind]:{display:"inline-block","text-align":"left"}}),this.wrapperUsage.add(s.kind),super.addClassStyles(t,e)}insertStyles(t){this.chtmlStyles&&this.adaptor.insertRules(this.chtmlStyles,new Co(t).getStyleRules())}processMath(t,e){t.toCHTML([e])}clearCache(){this.styleJson.clear(),this.font.clearCache(),this.wrapperUsage.clear(),this.chtmlStyles=null}reset(){this.clearCache()}unknownText(t,e,s=null){const i={},r=100/this.math.metrics.scale;if(100!==r&&(i["font-size"]=this.fixed(r,1)+"%",i.padding=uo(75/r)+" 0 "+uo(20/r)+" 0"),"-explicitFont"!==e){const s=Pr(t);(1!==s.length||s[0]<119808||s[0]>120831)&&this.cssFontStyles(this.font.getCssFont(e),i)}return null!==s&&(i.width=this.fixed(s*this.math.metrics.scale)+"em"),this.html("mjx-utext",{variant:e,style:i},[this.text(t)])}measureTextNode(t){const e=this.adaptor,s=e.clone(t);e.setStyle(s,"font-family",e.getStyle(s,"font-family").replace(/MJXZERO, /g,""));const i=this.math.metrics.em,r={position:"absolute",top:0,left:0,"white-space":"nowrap","font-size":this.fixed(i,3)+"px"},n=this.html("mjx-measure-text",{style:r},[s]);e.append(e.parent(this.math.start.node),this.container),e.append(this.container,n);const o=e.nodeSize(s,i)[0];return e.remove(this.container),e.remove(n),{w:o,h:.75,d:.2}}}function Kd(t,e){const s={};for(const i of Object.keys(t)){const r=t[i];for(const t of Object.keys(r)){s[t]||(s[t]={});const n=r[t];if(i)for(const t of Object.keys(n)){const s=n[parseInt(t)];s[3]||(s[3]={}),e?s[3].ff=e+"-"+i:s[3].f=i}Object.assign(s[t],n)}}return s}Jd.NAME="CHTML",Jd.OPTIONS=Object.assign(Object.assign({},Sl.OPTIONS),{adaptiveCSS:!0,matchFontHeight:!0}),Jd.commonStyles=Object.assign(Object.assign({},Sl.commonStyles),{'mjx-container[jax="CHTML"]':{"white-space":"nowrap"},[["mjx-mo > mjx-c","mjx-mi > mjx-c","mjx-mn > mjx-c","mjx-ms > mjx-c","mjx-mtext > mjx-c"].join(", ")]:{"clip-path":"padding-box xywh(-1em -2px calc(100% + 2em) calc(100% + 4px))"},"mjx-stretchy-h":{"clip-path":"padding-box xywh(0 -2px 100% calc(100% + 4px))"},"mjx-stretchy-v":{"clip-path":"padding-box xywh(-2px 0 calc(100% + 4px) 100%)"},'mjx-container [space="1"]':{"margin-left":".111em"},'mjx-container [space="2"]':{"margin-left":".167em"},'mjx-container [space="3"]':{"margin-left":".222em"},'mjx-container [space="4"]':{"margin-left":".278em"},'mjx-container [space="5"]':{"margin-left":".333em"},'mjx-container [rspace="1"]':{"margin-right":".111em"},'mjx-container [rspace="2"]':{"margin-right":".167em"},'mjx-container [rspace="3"]':{"margin-right":".222em"},'mjx-container [rspace="4"]':{"margin-right":".278em"},'mjx-container [rspace="5"]':{"margin-right":".333em"},'mjx-container [size="s"]':{"font-size":"70.7%"},'mjx-container [size="ss"]':{"font-size":"50%"},'mjx-container [size="Tn"]':{"font-size":"60%"},'mjx-container [size="sm"]':{"font-size":"85%"},'mjx-container [size="lg"]':{"font-size":"120%"},'mjx-container [size="Lg"]':{"font-size":"144%"},'mjx-container [size="LG"]':{"font-size":"173%"},'mjx-container [size="hg"]':{"font-size":"207%"},'mjx-container [size="HG"]':{"font-size":"249%"},'mjx-container [width="full"]':{width:"100%"},"mjx-box":{display:"inline-block"},"mjx-block":{display:"block"},"mjx-itable":{display:"inline-table"},"mjx-row":{display:"table-row"},"mjx-row > *":{display:"table-cell"},"mjx-container [inline-breaks]":{display:"inline"},"mjx-mtext":{display:"inline-block"},"mjx-mstyle":{display:"inline-block"},"mjx-merror":{display:"inline-block",color:"red","background-color":"yellow"},"mjx-mphantom":{visibility:"hidden"}}),Jd.STYLESHEETID="MJX-CHTML-styles",MathJax.loader&&MathJax.loader.checkVersion("output/chtml",si,"output"),ai({_:{output:{chtml_ts:Is,chtml:{DefaultFont:Ms,DynamicFonts:Ss,FontData:Me,Notation:ze,Usage:Le,Wrapper:Ce,WrapperFactory:Ls,Wrappers_ts:As,Wrappers:{HtmlNode:ks,TeXAtom:Ts,TextNode:_s,maction:bs,math:we,menclose:Xe,mfenced:Ke,mfrac:Ye,mglyph:Ns,mi:ke,mmultiscripts:ls,mn:Re,mo:Ie,mpadded:qe,mroot:es,mrow:Ge,ms:De,mspace:je,msqrt:Ze,msubsup:ns,mtable:ds,mtd:fs,mtext:Be,mtr:ps,munderover:as,scriptbase:rs,semantics:vs}},common_ts:ye,common:{Direction:ge,FontData:be,LineBBox:Ee,LinebreakVisitor:Ne,Notation:He,Wrapper:ve,WrapperFactory:xe,Wrappers:{TeXAtom:Cs,TextNode:ws,XmlNode:xs,maction:gs,math:Te,menclose:We,mfenced:Je,mfrac:$e,mglyph:Es,mi:_e,mmultiscripts:cs,mn:Se,mo:Ae,mpadded:Ue,mroot:ts,mrow:Ve,ms:Oe,mspace:Fe,msqrt:Qe,msubsup:ss,mtable:hs,mtd:ms,mtext:Pe,mtr:us,munderover:os,scriptbase:is,semantics:ys}}}}});const $d=li?"https://cdn.jsdelivr.net/npm/@mathjax/%%FONT%%-font":"@mathjax/%%FONT%%-font",Yd={config(t,e,s,i){if(MathJax.loader){oi(MathJax.config,t,MathJax.config.output||{});let e=MathJax.config[t],r=e.font||e.fontData||s;if("string"!=typeof r&&(e.fontData=r,e.font=r=r.NAME),"["!==r.charAt(0)){const s=e.fontPath||$d,i=r.match(/^[a-z]+:/)?(r.match(/[^/:\\]*$/)||[t])[0]:r;oi(MathJax.config.loader,"paths",{[i]:i===r?s.replace(/%%FONT%%/g,r):r}),r=`[${i}]`}const n=r.substring(1,r.length-1);if(n===s&&i){const e=MathJax.config.loader[`${r}/${t}`]?.extraLoads;e&&MathJax.loader.addPackageData(`output/${t}`,{extraLoads:e}),ai({_:{output:{fonts:{[n]:{[t+"_ts"]:{[i.NAME+"Font"]:i}}}}}}),oi(MathJax,"config",{output:{font:r},[t]:{fontData:i,dynamicPrefix:`${r}/${t}/dynamic`}}),"chtml"===t&&oi(MathJax.config,t,{fontURL:ui.resolvePath(`${r}/${t}/woff2`,!1)})}else MathJax.loader.addPackageData(`output/${t}`,{extraLoads:[`${r}/${t}`]})}MathJax.startup&&(MathJax.startup.registerConstructor(t,e),MathJax.startup.useOutput(t))},loadFont:(t,e,s,i)=>MathJax.loader?(i&&MathJax.loader.preLoaded(`[${s}]/${e}`),ui.loadPromise(`output/${e}`).then(t)):t};var Qd;Yd.config("chtml",Jd,Vd,Gd),function(t){t[t.RETURN=13]="RETURN",t[t.ESCAPE=27]="ESCAPE",t[t.SPACE=32]="SPACE",t[t.LEFT=37]="LEFT",t[t.UP=38]="UP",t[t.RIGHT=39]="RIGHT",t[t.DOWN=40]="DOWN"}(Qd||(Qd={}));const Zd="click",tu="dblclick",eu="mousedown",su="mouseup",iu="mouseover",ru="mouseout",nu="selectstart";class ou{constructor(){this.bubble=!1}bubbleKey(){this.bubble=!0}keydown(t){switch(t.keyCode){case Qd.ESCAPE:this.escape(t);break;case Qd.RIGHT:this.right(t);break;case Qd.LEFT:this.left(t);break;case Qd.UP:this.up(t);break;case Qd.DOWN:this.down(t);break;case Qd.RETURN:case Qd.SPACE:this.space(t);break;default:return}this.bubble?this.bubble=!1:this.stop(t)}escape(t){}space(t){}left(t){}right(t){}up(t){}down(t){}stop(t){t&&(t.stopPropagation(),t.preventDefault(),t.cancelBubble=!0)}mousedown(t){return this.stop(t)}mouseup(t){return this.stop(t)}mouseover(t){return this.stop(t)}mouseout(t){return this.stop(t)}click(t){return this.stop(t)}addEvents(t){t.addEventListener(eu,this.mousedown.bind(this)),t.addEventListener(su,this.mouseup.bind(this)),t.addEventListener(iu,this.mouseover.bind(this)),t.addEventListener(ru,this.mouseout.bind(this)),t.addEventListener(Zd,this.click.bind(this)),t.addEventListener("keydown",this.keydown.bind(this)),t.addEventListener("dragstart",this.stop.bind(this)),t.addEventListener(nu,this.stop.bind(this)),t.addEventListener("contextmenu",this.stop.bind(this)),t.addEventListener(tu,this.stop.bind(this))}}class au extends ou{addAttributes(t){for(const e in t)this.html.setAttribute(e,t[e])}get html(){return this._html||this.generateHtml(),this._html}set html(t){this._html=t,this.addEvents(t)}generateHtml(){const t=document.createElement("div");t.classList.add(this.className),t.setAttribute("role",this.role),this.html=t}focus(){const t=this.html;t.setAttribute("tabindex","0"),t.focus()}unfocus(){const t=this.html;t.hasAttribute("tabindex")&&t.setAttribute("tabindex","-1");try{t.blur()}catch(t){}t.blur()}}class cu extends au{constructor(){super(...arguments),this.posted=!1}isPosted(){return this.posted}post(t,e){this.posted||(void 0!==t&&void 0!==e&&this.html.setAttribute("style","left: "+t+"px; top: "+e+"px;"),this.display(),this.posted=!0)}unpost(){if(!this.posted)return;const t=this.html;t.parentNode&&t.parentNode.removeChild(t),this.posted=!1}}function lu(t){return"CtxtMenu_"+t}function hu(t){return lu(t)}function du(t){return lu(t)}const uu={ATTACHED:hu("Attached"),CONTEXTMENU:hu("ContextMenu"),MENU:hu("Menu"),MENUARROW:hu("MenuArrow"),MENUACTIVE:hu("MenuActive"),MENUCHECK:hu("MenuCheck"),MENUCLOSE:hu("MenuClose"),MENUCOMBOBOX:hu("MenuComboBox"),MENUDISABLED:hu("MenuDisabled"),MENUFRAME:hu("MenuFrame"),MENUITEM:hu("MenuItem"),MENULABEL:hu("MenuLabel"),MENURADIOCHECK:hu("MenuRadioCheck"),MENUINPUTBOX:hu("MenuInputBox"),MENURULE:hu("MenuRule"),MENUSLIDER:hu("MenuSlider"),MOUSEPOST:hu("MousePost"),RTL:hu("RTL"),INFO:hu("Info"),INFOCLOSE:hu("InfoClose"),INFOCONTENT:hu("InfoContent"),INFOSIGNATURE:hu("InfoSignature"),INFOTITLE:hu("InfoTitle"),SLIDERVALUE:hu("SliderValue"),SLIDERBAR:hu("SliderBar"),SELECTION:hu("Selection"),SELECTIONBOX:hu("SelectionBox"),SELECTIONMENU:hu("SelectionMenu"),SELECTIONDIVIDER:hu("SelectionDivider"),SELECTIONITEM:hu("SelectionItem")},pu={COUNTER:du("Counter"),KEYDOWNFUNC:du("keydownFunc"),CONTEXTMENUFUNC:du("contextmenuFunc"),OLDTAB:du("Oldtabindex"),TOUCHFUNC:du("TouchFunc")};class mu extends au{constructor(t,e){super(),this._menu=t,this._type=e,this.className=uu.MENUITEM,this.role="menuitem",this.hidden=!1}get menu(){return this._menu}set menu(t){this._menu=t}get type(){return this._type}hide(){this.hidden=!0,this.menu.generateMenu()}show(){this.hidden=!1,this.menu.generateMenu()}isHidden(){return this.hidden}}function fu(t){const e=t.menu;e.baseMenu?e.baseMenu.unpost():e.unpost()}function gu(t){const e=t.menu;return(e.baseMenu?e.baseMenu:e).store.active}function bu(t,e){console.error("ContextMenu Error: "+e)}function Eu(){return Nu++}let Nu=0;class yu extends mu{constructor(t,e,s,i){super(t,e),this._content=s,this.disabled=!1,this.callbacks=[],this._id=i||s}get content(){return this._content}set content(t){this._content=t,this.generateHtml(),this.menu&&this.menu.generateHtml()}get id(){return this._id}press(){this.disabled||(this.executeAction(),this.executeCallbacks_())}executeAction(){}registerCallback(t){-1===this.callbacks.indexOf(t)&&this.callbacks.push(t)}unregisterCallback(t){const e=this.callbacks.indexOf(t);-1!==e&&this.callbacks.splice(e,1)}mousedown(t){this.press(),this.stop(t)}mouseover(t){this.focus(),this.stop(t)}mouseout(t){this.deactivate(),this.stop(t)}generateHtml(){super.generateHtml();const t=this.html;t.setAttribute("aria-disabled","false"),t.textContent=this.content}activate(){this.disabled||this.html.classList.add(uu.MENUACTIVE)}deactivate(){this.html.classList.remove(uu.MENUACTIVE)}focus(){this.menu.focused=this,super.focus(),this.activate()}unfocus(){this.deactivate(),super.unfocus()}escape(t){fu(this)}up(t){this.menu.up(t)}down(t){this.menu.down(t)}left(t){this.menu.left(t)}right(t){this.menu.right(t)}space(t){this.press()}disable(){this.disabled=!0;const t=this.html;t.classList.add(uu.MENUDISABLED),t.setAttribute("aria-disabled","true")}enable(){this.disabled=!1;const t=this.html;t.classList.remove(uu.MENUDISABLED),t.removeAttribute("aria-disabled")}executeCallbacks_(){for(const t of this.callbacks)try{t(this)}catch(t){bu(0,"Callback for menu entry "+this.id+" failed.")}}}class xu extends yu{static fromJson(t,{content:e,menu:s,id:i},r){const n=new this(r,e,i),o=t.get("subMenu")(t,s,n);return n.submenu=o,n}constructor(t,e,s){super(t,"submenu",e,s),this._submenu=null}set submenu(t){this._submenu=t}get submenu(){return this._submenu}mouseover(t){this.focus(),this.stop(t)}mouseout(t){this.stop(t)}unfocus(){if(this.submenu.isPosted()){if(this.menu.focused!==this)return super.unfocus(),void this.menu.unpostSubmenus();this.html.setAttribute("tabindex","-1"),this.html.blur()}else super.unfocus()}focus(){super.focus(),this.submenu.isPosted()||this.disabled||this.submenu.post()}executeAction(){this.submenu.isPosted()?this.submenu.unpost():this.submenu.post()}generateHtml(){super.generateHtml();const t=this.html;this.span=document.createElement("span"),this.span.textContent="\u25ba",this.span.classList.add(uu.MENUARROW),t.appendChild(this.span),t.setAttribute("aria-haspopup","true")}left(t){this.submenu.isPosted()?this.submenu.unpost():super.left(t)}right(t){this.submenu.isPosted()?this.submenu.down(t):this.submenu.post()}toJson(){return{type:""}}}class vu extends cu{constructor(){super(...arguments),this.className=uu.CONTEXTMENU,this.role="menu",this._items=[],this._baseMenu=null}set baseMenu(t){this._baseMenu=t}get baseMenu(){return this._baseMenu}get items(){return this._items}set items(t){this._items=t}get pool(){return this.variablePool}get focused(){return this._focused}set focused(t){if(this._focused===t)return;this._focused||this.unfocus();const e=this._focused;this._focused=t,e&&e.unfocus()}up(t){const e=this.items.filter((t=>t instanceof yu&&!t.isHidden()));if(0===e.length)return;if(!this.focused)return void e[e.length-1].focus();let s=e.indexOf(this.focused);-1!==s&&(s=s?--s:e.length-1,e[s].focus())}down(t){const e=this.items.filter((t=>t instanceof yu&&!t.isHidden()));if(0===e.length)return;if(!this.focused)return void e[0].focus();let s=e.indexOf(this.focused);-1!==s&&(s++,s=s===e.length?0:s,e[s].focus())}generateHtml(){super.generateHtml(),this.generateMenu()}generateMenu(){const t=this.html;t.classList.add(uu.MENU);for(const e of this.items){if(!e.isHidden()){t.appendChild(e.html);continue}const s=e.html;s.parentNode&&s.parentNode.removeChild(s)}}post(t,e){this.variablePool.update(),super.post(t,e)}unpostSubmenus(){const t=this.items.filter((t=>t instanceof xu));for(const e of t)e.submenu.unpost(),e!==this.focused&&e.unfocus()}unpost(){super.unpost(),this.unpostSubmenus(),this.focused=null}find(t){for(const e of this.items)if("rule"!==e.type){if(e.id===t)return e;if("submenu"===e.type){const s=e.submenu.find(t);if(s)return s}}return null}}class Cu{constructor(t){this.menu=t,this.store=[],this._active=null,this.counter=0,this.attachedClass=uu.ATTACHED+"_"+Eu(),this.taborder=!0,this.attrMap={}}set active(t){do{if(-1!==this.store.indexOf(t)){this._active=t;break}t=t.parentNode}while(t)}get active(){return this._active}next(){const t=this.store.length;if(0===t)return this.active=null,null;let e=this.store.indexOf(this.active);return e=-1===e?0:e<t-1?e+1:0,this.active=this.store[e],this.active}previous(){const t=this.store.length;if(0===t)return this.active=null,null;const e=t-1;let s=this.store.indexOf(this.active);return s=-1===s||0===s?e:s-1,this.active=this.store[s],this.active}clear(){this.remove(this.store)}insert(t){const e=t instanceof HTMLElement?[t]:t;for(const t of e)this.insertElement(t);this.sort()}remove(t){const e=t instanceof HTMLElement?[t]:t;for(const t of e)this.removeElement(t);this.sort()}inTaborder(t){this.taborder&&!t&&this.removeTaborder(),!this.taborder&&t&&this.insertTaborder(),this.taborder=t}insertTaborder(){this.taborder&&this.insertTaborder_()}removeTaborder(){this.taborder&&this.removeTaborder_()}insertElement(t){t.classList.contains(this.attachedClass)||(t.classList.add(this.attachedClass),this.taborder&&this.addTabindex(t),this.addEvents(t))}removeElement(t){t.classList.contains(this.attachedClass)&&(t.classList.remove(this.attachedClass),this.taborder&&this.removeTabindex(t),this.removeEvents(t))}sort(){const t=document.getElementsByClassName(this.attachedClass);this.store=[].slice.call(t)}insertTaborder_(){this.store.forEach((t=>t.setAttribute("tabindex","0")))}removeTaborder_(){this.store.forEach((t=>t.setAttribute("tabindex","-1")))}addTabindex(t){t.hasAttribute("tabindex")&&t.setAttribute(pu.OLDTAB,t.getAttribute("tabindex")),t.setAttribute("tabindex","0")}removeTabindex(t){t.hasAttribute(pu.OLDTAB)?(t.setAttribute("tabindex",t.getAttribute(pu.OLDTAB)),t.removeAttribute(pu.OLDTAB)):t.removeAttribute("tabindex")}addEvents(t){t.hasAttribute(pu.COUNTER)||(this.addEvent(t,"contextmenu",this.menu.post.bind(this.menu)),this.addEvent(t,"keydown",this.keydown.bind(this)),t.setAttribute(pu.COUNTER,this.counter.toString()),this.counter++)}addEvent(t,e,s){const i=pu[e.toUpperCase()+"FUNC"];this.attrMap[i+this.counter]=s,t.addEventListener(e,s)}removeEvents(t){if(!t.hasAttribute(pu.COUNTER))return;const e=t.getAttribute(pu.COUNTER);this.removeEvent(t,"contextmenu",e),this.removeEvent(t,"keydown",e),t.removeAttribute(pu.COUNTER)}removeEvent(t,e,s){const i=pu[e.toUpperCase()+"FUNC"],r=this.attrMap[i+s];t.removeEventListener(e,r)}keydown(t){t.keyCode===Qd.SPACE&&(this.menu.post(t),t.preventDefault(),t.stopImmediatePropagation())}}class Tu{constructor(){this.pool={}}insert(t){this.pool[t.name]=t}lookup(t){return this.pool[t]}remove(t){delete this.pool[t]}update(){for(const t in this.pool)this.pool[t].update()}}class wu extends vu{static fromJson(t,{pool:e,items:s,id:i=""}){const r=new this(t);r.id=i;const n=t.get("variable");e.forEach((e=>n(t,e,r.pool)));const o=t.get("items")(t,s,r);return r.items=o,r}constructor(t){super(),this.factory=t,this.id="",this.moving=!1,this._store=new Cu(this),this.widgets=[],this.variablePool=new Tu}generateHtml(){this.isPosted()&&this.unpost(),super.generateHtml(),this._frame=document.createElement("div"),this._frame.classList.add(uu.MENUFRAME);const t="left: 0px; top: 0px; z-index: 200; width: 100%; height: 100%; border: 0px; padding: 0px; margin: 0px;";this._frame.setAttribute("style","position: absolute; "+t);const e=document.createElement("div");e.setAttribute("style","position: fixed; "+t),this._frame.appendChild(e),e.addEventListener("mousedown",function(t){this.unpost(),this.unpostWidgets(),this.stop(t)}.bind(this))}display(){document.body.appendChild(this.frame),this.frame.appendChild(this.html),this.focus()}escape(t){this.unpost(),this.unpostWidgets()}unpost(){if(super.unpost(),this.widgets.length>0)return;this.frame.parentNode.removeChild(this.frame);const t=this.store;this.moving||t.insertTaborder(),t.active.focus()}left(t){this.move_(this.store.previous())}right(t){this.move_(this.store.next())}get frame(){return this._frame}get store(){return this._store}post(t,e){if(void 0!==e)return this.moving||this.store.removeTaborder(),void super.post(t,e);const s=t;let i,r,n;if(s instanceof Event?(i=s.target,this.stop(s)):i=s,s instanceof MouseEvent&&(r=s.pageX,n=s.pageY,r||n||!s.clientX||(r=s.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n=s.clientY+document.body.scrollTop+document.documentElement.scrollTop)),!r&&!n&&i){const t=window.pageXOffset||document.documentElement.scrollLeft,e=window.pageYOffset||document.documentElement.scrollTop,s=i.getBoundingClientRect();r=(s.right+s.left)/2+t,n=(s.bottom+s.top)/2+e}this.store.active=i,this.anchor=this.store.active;const o=this.html;r+o.offsetWidth>document.body.offsetWidth-5&&(r=document.body.offsetWidth-o.offsetWidth-5),this.post(r,n)}registerWidget(t){this.widgets.push(t)}unregisterWidget(t){const e=this.widgets.indexOf(t);e>-1&&this.widgets.splice(e,1),0===this.widgets.length&&this.unpost()}unpostWidgets(){this.widgets.forEach((t=>t.unpost()))}toJson(){return{type:""}}move_(t){this.anchor&&t!==this.anchor&&(this.moving=!0,this.unpost(),this.post(t),this.moving=!1)}}class _u extends vu{static fromJson(t,{items:e},s){const i=new this(s),r=t.get("items")(t,e,i);return i.items=r,i}constructor(t){super(),this._anchor=t,this.variablePool=this.anchor.menu.pool,this.setBaseMenu()}get anchor(){return this._anchor}post(){if(!this.anchor.menu.isPosted())return;let t=this.anchor.html;const e=this.html,s=this.baseMenu.frame,i=t.offsetWidth;let r=i-2,n=0;for(;t&&t!==s;)r+=t.offsetLeft,n+=t.offsetTop,t=t.parentNode;r+e.offsetWidth>document.body.offsetWidth-5&&(r=Math.max(5,r-i-e.offsetWidth+6)),super.post(r,n)}display(){this.baseMenu.frame.appendChild(this.html)}setBaseMenu(){let t=this;do{t=t.anchor.menu}while(t instanceof _u);this.baseMenu=t}left(t){this.focused=null,this.anchor.focus()}toJson(){return{type:""}}}class ku extends cu{constructor(t){super(),this.element=t,this.className=uu.MENUCLOSE,this.role="button"}generateHtml(){const t=document.createElement("span");t.classList.add(this.className),t.setAttribute("role",this.role),t.setAttribute("tabindex","0");const e=document.createElement("span");e.textContent="\xd7",t.appendChild(e),this.html=t}display(){}unpost(){super.unpost(),this.element.unpost()}keydown(t){this.bubbleKey(),super.keydown(t)}space(t){this.unpost(),this.stop(t)}mousedown(t){this.unpost(),this.stop(t)}}class Au extends cu{constructor(t,e,s){super(),this.title=t,this.signature=s,this.className=uu.INFO,this.role="dialog",this.contentDiv=this.generateContent(),this.close=this.generateClose(),this.content=e||function(){return""}}attachMenu(t){this.menu=t}generateHtml(){super.generateHtml();const t=this.html;t.appendChild(this.generateTitle()),t.appendChild(this.contentDiv),t.appendChild(this.generateSignature()),t.appendChild(this.close.html),t.setAttribute("tabindex","0")}post(){super.post();const t=document.documentElement,e=this.html,s=window.innerHeight||t.clientHeight||t.scrollHeight||0,i=Math.floor(-e.offsetWidth/2),r=Math.floor((s-e.offsetHeight)/3);e.setAttribute("style","margin-left: "+i+"px; top: "+r+"px;"),window.event instanceof MouseEvent&&e.classList.add(uu.MOUSEPOST),e.focus()}display(){this.menu.registerWidget(this),this.contentDiv.innerHTML=this.content();const t=this.menu.html;t.parentNode&&t.parentNode.removeChild(t),this.menu.frame.appendChild(this.html)}click(t){}keydown(t){this.bubbleKey(),super.keydown(t)}escape(t){this.unpost()}unpost(){super.unpost(),this.html.classList.remove(uu.MOUSEPOST),this.menu.unregisterWidget(this)}generateClose(){const t=new ku(this),e=t.html;return e.classList.add(uu.INFOCLOSE),e.setAttribute("aria-label","Close Dialog Box"),t}generateTitle(){const t=document.createElement("span");return t.innerHTML=this.title,t.classList.add(uu.INFOTITLE),t}generateContent(){const t=document.createElement("div");return t.classList.add(uu.INFOCONTENT),t.setAttribute("tabindex","0"),t}generateSignature(){const t=document.createElement("span");return t.innerHTML=this.signature,t.classList.add(uu.INFOSIGNATURE),t}toJson(){return{type:""}}}class Lu extends yu{generateHtml(){super.generateHtml();const t=this.html;this.span||this.generateSpan(),t.appendChild(this.span),this.update()}register(){this.variable.register(this)}unregister(){this.variable.unregister(this)}update(){this.updateAria(),this.span&&this.updateSpan()}}class Mu extends Lu{static fromJson(t,{content:e,variable:s,id:i},r){return new this(r,e,s,i)}constructor(t,e,s,i){super(t,"radio",e,i),this.role="menuitemradio",this.variable=t.pool.lookup(s),this.register()}executeAction(){this.variable.setValue(this.id),fu(this)}generateSpan(){this.span=document.createElement("span"),this.span.textContent="\u2713",this.span.classList.add(uu.MENURADIOCHECK)}updateAria(){this.html.setAttribute("aria-checked",this.variable.getValue()===this.id?"true":"false")}updateSpan(){this.span.style.display=this.variable.getValue()===this.id?"":"none"}toJson(){return{type:""}}}class Iu extends mu{static fromJson(t,e,s){return new this(s)}constructor(t){super(t,"rule"),this.className=uu.MENUITEM,this.role="separator"}generateHtml(){super.generateHtml();const t=this.html;t.classList.add(uu.MENURULE),t.setAttribute("aria-orientation","vertical")}addEvents(t){}toJson(){return{type:"rule"}}}class Su extends yu{static fromJson(t,{content:e,action:s,id:i},r){return new this(r,e,s,i)}constructor(t,e,s,i){super(t,"command",e,i),this.command=s}executeAction(){try{this.command(gu(this))}catch(t){bu(0,"Illegal command callback.")}fu(this)}toJson(){return{type:""}}}class Ru{static fromJson(t,{name:e,getter:s,setter:i},r){const n=new this(e,s,i);r.insert(n)}constructor(t,e,s){this._name=t,this.getter=e,this.setter=s,this.items=[]}get name(){return this._name}getValue(t){try{return this.getter(t)}catch(t){return bu(0,"Command of variable "+this.name+" failed."),null}}setValue(t,e){try{this.setter(t,e)}catch(t){bu(0,"Command of variable "+this.name+" failed.")}this.update()}register(t){-1===this.items.indexOf(t)&&this.items.push(t)}unregister(t){const e=this.items.indexOf(t);-1!==e&&this.items.splice(e,1)}update(){this.items.forEach((t=>t.update()))}registerCallback(t){this.items.forEach((e=>e.registerCallback(t)))}unregisterCallback(t){this.items.forEach((e=>e.unregisterCallback(t)))}toJson(){return{type:"variable",name:this.name,getter:this.getter.toString(),setter:this.setter.toString()}}}class Ou extends Lu{static fromJson(t,{content:e,variable:s,id:i},r){return new this(r,e,s,i)}constructor(t,e,s,i){super(t,"checkbox",e,i),this.role="menuitemcheckbox",this.variable=t.pool.lookup(s),this.register()}executeAction(){this.variable.setValue(!this.variable.getValue()),fu(this)}generateSpan(){this.span=document.createElement("span"),this.span.textContent="\u2713",this.span.classList.add(uu.MENUCHECK)}updateAria(){this.html.setAttribute("aria-checked",this.variable.getValue()?"true":"false")}updateSpan(){this.span.style.display=this.variable.getValue()?"":"none"}toJson(){return{type:""}}}class Du extends Lu{static fromJson(t,{content:e,variable:s,id:i},r){return new this(r,e,s,i)}constructor(t,e,s,i){super(t,"combobox",e,i),this.role="combobox",this.inputEvent=!1,this.variable=t.pool.lookup(s),this.register()}executeAction(){this.variable.setValue(this.input.value,gu(this))}space(t){super.space(t),fu(this)}focus(){super.focus(),this.input.focus()}unfocus(){super.unfocus(),this.updateSpan()}generateHtml(){super.generateHtml();this.html.classList.add(uu.MENUCOMBOBOX)}generateSpan(){this.span=document.createElement("span"),this.span.classList.add(uu.MENUINPUTBOX),this.input=document.createElement("input"),this.input.addEventListener("keydown",this.inputKey.bind(this)),this.input.setAttribute("size","10em"),this.input.setAttribute("type","text"),this.input.setAttribute("tabindex","-1"),this.span.appendChild(this.input)}inputKey(t){this.bubbleKey(),this.inputEvent=!0}keydown(t){if(this.inputEvent&&t.keyCode!==Qd.ESCAPE&&t.keyCode!==Qd.RETURN)return this.inputEvent=!1,void t.stopPropagation();super.keydown(t),t.stopPropagation()}updateAria(){}updateSpan(){let t;try{t=this.variable.getValue(gu(this))}catch(e){t=""}this.input.value=t}toJson(){return{type:""}}}class Pu extends yu{static fromJson(t,{content:e,id:s},i){return new this(i,e,s)}constructor(t,e,s){super(t,"label",e,s)}generateHtml(){super.generateHtml();this.html.classList.add(uu.MENULABEL)}toJson(){return{type:""}}}class Bu extends Lu{static fromJson(t,{content:e,variable:s,id:i},r){return new this(r,e,s,i)}constructor(t,e,s,i){super(t,"slider",e,i),this.role="slider",this.labelId="ctx_slideLabel"+Eu(),this.valueId="ctx_slideValue"+Eu(),this.inputEvent=!1,this.variable=t.pool.lookup(s),this.register()}executeAction(){this.variable.setValue(this.input.value,gu(this)),this.update()}space(t){super.space(t),fu(this)}focus(){super.focus(),this.input.focus()}unfocus(){super.unfocus(),this.updateSpan()}generateHtml(){super.generateHtml();this.html.classList.add(uu.MENUSLIDER),this.valueSpan=document.createElement("span"),this.valueSpan.setAttribute("id",this.valueId),this.valueSpan.classList.add(uu.SLIDERVALUE),this.html.appendChild(this.valueSpan)}generateSpan(){this.span=document.createElement("span"),this.labelSpan=document.createElement("span"),this.labelSpan.setAttribute("id",this.labelId),this.labelSpan.appendChild(this.html.childNodes[0]),this.html.appendChild(this.labelSpan),this.input=document.createElement("input"),this.input.setAttribute("type","range"),this.input.setAttribute("min","0"),this.input.setAttribute("max","100"),this.input.setAttribute("aria-valuemin","0"),this.input.setAttribute("aria-valuemax","100"),this.input.setAttribute("aria-labelledby",this.labelId),this.input.addEventListener("keydown",this.inputKey.bind(this)),this.input.addEventListener("input",this.executeAction.bind(this)),this.input.classList.add(uu.SLIDERBAR),this.span.appendChild(this.input)}inputKey(t){this.inputEvent=!0}mousedown(t){t.stopPropagation()}mouseup(t){event.stopPropagation()}keydown(t){const e=t.keyCode;return e===Qd.UP||e===Qd.DOWN?(t.preventDefault(),void super.keydown(t)):this.inputEvent&&e!==Qd.ESCAPE&&e!==Qd.RETURN?(this.inputEvent=!1,void t.stopPropagation()):(super.keydown(t),void t.stopPropagation())}updateAria(){const t=this.variable.getValue();t&&this.input&&(this.input.setAttribute("aria-valuenow",t),this.input.setAttribute("aria-valuetext",t+"%"))}updateSpan(){let t;try{t=this.variable.getValue(gu(this)),this.valueSpan.innerHTML=t+"%"}catch(e){t=""}this.input.value=t}toJson(){return{type:""}}}class Fu extends vu{static fromJson(t,{title:e,values:s,variable:i},r){const n=new this(r),o=t.get("label")(t,{content:e||"",id:e||"id"},n),a=t.get("rule")(t,{},n),c=s.map((e=>t.get("radio")(t,{content:e,variable:i,id:e},n))),l=[o,a].concat(c);return n.items=l,n}constructor(t){super(),this.anchor=t,this.className=uu.SELECTIONMENU,this.variablePool=this.anchor.menu.pool,this.baseMenu=this.anchor.menu}generateHtml(){super.generateHtml(),this.items.forEach((t=>t.html.classList.add(uu.SELECTIONITEM)))}display(){}right(t){this.anchor.right(t)}left(t){this.anchor.left(t)}}class ju extends Au{static fromJson(t,{title:e,signature:s,selections:i,order:r,grid:n},o){const a=new this(e,s,r,n);a.attachMenu(o);const c=i.map((e=>t.get("selectionMenu")(t,e,a)));return a.selections=c,a}constructor(t,e,s="none",i="vertical"){super(t,null,e),this.style=s,this.grid=i,this._selections=[],this.prefix="ctxt-selection",this._balanced=!0}attachMenu(t){this.menu=t}get selections(){return this._selections}set selections(t){this._selections=[],t.forEach((t=>this.addSelection(t)))}addSelection(t){t.anchor=this,this._selections.push(t)}rowDiv(t){const e=document.createElement("div");this.contentDiv.appendChild(e);const s=t.map((t=>(e.appendChild(t.html),t.html.id||(t.html.id=this.prefix+Eu()),t.html.getBoundingClientRect()))),i=s.map((t=>t.width)),r=i.reduce(((t,e)=>t+e),0),n=s.reduce(((t,e)=>Math.max(t,e.height)),0);return e.classList.add(uu.SELECTIONDIVIDER),e.setAttribute("style","height: "+n+"px;"),[e,r,n,i]}display(){if(super.display(),this.order(),!this.selections.length)return;const t=[];let e=0,s=[];const i=this.getChunkSize(this.selections.length);for(let r=0;r<this.selections.length;r+=i){const n=this.selections.slice(r,r+i),[o,a,c,l]=this.rowDiv(n);t.push(o),e=Math.max(e,a),n.forEach((t=>t.html.style.height=c+"px")),s=this.combineColumn(s,l)}this._balanced&&(this.balanceColumn(t,s),e=s.reduce(((t,e)=>t+e),20)),t.forEach((t=>t.style.width=e+"px"))}getChunkSize(t){switch(this.grid){case"square":return Math.floor(Math.sqrt(t));case"horizontal":return Math.floor(t/ju.chunkSize);default:return ju.chunkSize}}balanceColumn(t,e){t.forEach((t=>{const s=Array.from(t.children);for(let t,i=0;t=s[i];i++)t.style.width=e[i]+"px"}))}combineColumn(t,e){let s=[],i=0;for(;t[i]||e[i];){if(!t[i]){s=s.concat(e.slice(i));break}if(!e[i]){s=s.concat(t.slice(i));break}s.push(Math.max(t[i],e[i])),i++}return s}left(t){this.move(t,(t=>(0===t?this.selections.length:t)-1))}right(t){this.move(t,(t=>t===this.selections.length-1?0:t+1))}generateHtml(){super.generateHtml(),this.html.classList.add(uu.SELECTION)}generateContent(){const t=super.generateContent();return t.classList.add(uu.SELECTIONBOX),t.removeAttribute("tabindex"),t}findSelection(t){const e=t.target;let s=null;if(e.id&&(s=this.selections.find((t=>t.html.id===e.id))),!s){const t=e.parentElement.id;s=this.selections.find((e=>e.html.id===t))}return s}move(t,e){const s=this.findSelection(t);s.focused&&s.focused.unfocus();const i=e(this.selections.indexOf(s));this.selections[i].focus()}order(){this.selections.sort(ju.orderMethod.get(this.style))}toJson(){return{type:""}}}ju.chunkSize=4,ju.orderMethod=new Map([["alphabetical",(t,e)=>t.items[0].content.localeCompare(e.items[0].content)],["none",(t,e)=>1],["decreasing",(t,e)=>{const s=t.items.length,i=e.items.length;return s<i?1:i<s?-1:0}],["increasing",(t,e)=>{const s=t.items.length,i=e.items.length;return s<i?-1:i<s?1:0}]]);class Uu{constructor(t){this._parser=new Map(t)}get(t){return this._parser.get(t)}add(t,e){this._parser.set(t,e)}}var qu=function(t,e){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(s[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(s[i[r]]=t[i[r]])}return s};class Hu{constructor(t=[]){this._initList=[["command",Su.fromJson.bind(Su)],["checkbox",Ou.fromJson.bind(Ou)],["combo",Du.fromJson.bind(Du)],["slider",Bu.fromJson.bind(Bu)],["label",Pu.fromJson.bind(Pu)],["radio",Mu.fromJson.bind(Mu)],["rule",Iu.fromJson.bind(Iu)],["submenu",xu.fromJson.bind(xu)],["contextMenu",wu.fromJson.bind(wu)],["subMenu",_u.fromJson.bind(_u)],["variable",Ru.fromJson.bind(Ru)],["items",this.items.bind(this)],["selectionMenu",Fu.fromJson.bind(Fu)],["selectionBox",ju.fromJson.bind(ju)]],this._factory=new Uu(this._initList),t.forEach((([t,e])=>this.factory.add(t,e)))}get factory(){return this._factory}items(t,e,s){const i=[];for(const t of e){const e=this.parse(t,s);e&&(s.items.push(e),t.disabled&&e.disable(),t.hidden&&i.push(e))}return i.forEach((t=>t.hide())),s.items}parse(t,...e){var{type:s}=t,i=qu(t,["type"]);const r=this.factory.get(s);return r?r(this.factory,i,...e):null}}function Wu(t){return"."+(uu[t]||t)}const zu={};zu[Wu("INFOCLOSE")]="{ top:.2em; right:.2em;}",zu[Wu("INFOCONTENT")]="{ overflow:auto; text-align:left; font-size:80%; padding:.4em .6em; border:1px inset; margin:1em 0px; max-height:20em; max-width:30em; background-color:#EEEEEE; white-space:normal;}",zu[Wu("INFO")+Wu("MOUSEPOST")]="{outline:none;}",zu[Wu("INFO")]='{ position:fixed; left:50%; width:auto; text-align:center; border:3px outset; padding:1em 2em; background-color:#DDDDDD; color:black; cursor:default; font-family:message-box; font-size:120%; font-style:normal; text-indent:0; text-transform:none; line-height:normal; letter-spacing:normal; word-spacing:normal; word-wrap:normal; white-space:nowrap; float:none; z-index:201; border-radius: 15px; /* Opera 10.5 and IE9 */ -webkit-border-radius:15px; /* Safari and Chrome */ -moz-border-radius:15px; /* Firefox */ -khtml-border-radius:15px; /* Konqueror */ box-shadow:0px 10px 20px #808080; /* Opera 10.5 and IE9 */ -webkit-box-shadow:0px 10px 20px #808080; /* Safari 3 & Chrome */ -moz-box-shadow:0px 10px 20px #808080; /* Forefox 3.5 */ -khtml-box-shadow:0px 10px 20px #808080; /* Konqueror */ filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color="gray", Positive="true"); /* IE */}';const Xu={};Xu[Wu("MENU")]="{ position:absolute; background-color:white; color:black; width:auto; padding:5px 0px; border:1px solid #CCCCCC; margin:0; cursor:default; font: menu; text-align:left; text-indent:0; text-transform:none; line-height:normal; letter-spacing:normal; word-spacing:normal; word-wrap:normal; white-space:nowrap; float:none; z-index:201; border-radius: 5px; /* Opera 10.5 and IE9 */ -webkit-border-radius: 5px; /* Safari and Chrome */ -moz-border-radius: 5px; /* Firefox */ -khtml-border-radius: 5px; /* Konqueror */ box-shadow:0px 10px 20px #808080; /* Opera 10.5 and IE9 */ -webkit-box-shadow:0px 10px 20px #808080; /* Safari 3 & Chrome */ -moz-box-shadow:0px 10px 20px #808080; /* Forefox 3.5 */ -khtml-box-shadow:0px 10px 20px #808080; /* Konqueror */}",Xu[Wu("MENUITEM")]="{ padding: 1px 2em; background:transparent;}",Xu[Wu("MENUARROW")]="{ position:absolute; right:.5em; padding-top:.25em; color:#666666; font-family: null; font-size: .75em}",Xu[Wu("MENUACTIVE")+" "+Wu("MENUARROW")]="{color:white}",Xu[Wu("MENUARROW")+Wu("RTL")]="{left:.5em; right:auto}",Xu[Wu("MENUCHECK")]="{ position:absolute; left:.7em; font-family: null}",Xu[Wu("MENUCHECK")+Wu("RTL")]="{ right:.7em; left:auto }",Xu[Wu("MENURADIOCHECK")]="{ position:absolute; left: .7em;}",Xu[Wu("MENURADIOCHECK")+Wu("RTL")]="{ right: .7em; left:auto}",Xu[Wu("MENUINPUTBOX")]="{ padding-left: 1em; right:.5em; color:#666666; font-family: null;}",Xu[Wu("MENUINPUTBOX")+Wu("RTL")]="{ left: .1em;}",Xu[Wu("MENUCOMBOBOX")]="{ left:.1em; padding-bottom:.5em;}",Xu[Wu("MENUSLIDER")]="{ left: .1em;}",Xu[Wu("SLIDERVALUE")]="{ position:absolute; right:.1em; padding-top:.25em; color:#333333; font-size: .75em}",Xu[Wu("SLIDERBAR")]="{ outline: none; background: #d3d3d3}",Xu[Wu("MENULABEL")]="{ padding: 1px 2em 3px 1.33em; font-style:italic}",Xu[Wu("MENURULE")]="{ border-top: 1px solid #DDDDDD; margin: 4px 3px;}",Xu[Wu("MENUDISABLED")]="{ color:GrayText}",Xu[Wu("MENUACTIVE")]="{ background-color: #606872; color: white;}",Xu[Wu("MENUDISABLED")+":focus"]="{ background-color: #E8E8E8}",Xu[Wu("MENULABEL")+":focus"]="{ background-color: #E8E8E8}",Xu[Wu("CONTEXTMENU")+":focus"]="{ outline:none}",Xu[Wu("CONTEXTMENU")+" "+Wu("MENUITEM")+":focus"]="{ outline:none}",Xu[Wu("SELECTIONMENU")]="{ position:relative; float:left; border-bottom: none; -webkit-box-shadow:none; -webkit-border-radius:0px; }",Xu[Wu("SELECTIONITEM")]="{ padding-right: 1em;}",Xu[Wu("SELECTION")]="{ right: 40%; width:50%; }",Xu[Wu("SELECTIONBOX")]="{ padding: 0em; max-height:20em; max-width: none; background-color:#FFFFFF;}",Xu[Wu("SELECTIONDIVIDER")]="{ clear: both; border-top: 2px solid #000000;}",Xu[Wu("MENU")+" "+Wu("MENUCLOSE")]="{ top:-10px; left:-10px}";const Vu={};Vu[Wu("MENUCLOSE")]='{ position:absolute; cursor:pointer; display:inline-block; border:2px solid #AAA; border-radius:18px; -webkit-border-radius: 18px; /* Safari and Chrome */ -moz-border-radius: 18px; /* Firefox */ -khtml-border-radius: 18px; /* Konqueror */ font-family: "Courier New", Courier; font-size:24px; color:#F0F0F0}',Vu[Wu("MENUCLOSE")+" span"]="{ display:block; background-color:#AAA; border:1.5px solid; border-radius:18px; -webkit-border-radius: 18px; /* Safari and Chrome */ -moz-border-radius: 18px; /* Firefox */ -khtml-border-radius: 18px; /* Konqueror */ line-height:0; padding:8px 0 6px /* may need to be browser-specific */}",Vu[Wu("MENUCLOSE")+":hover"]="{ color:white!important; border:2px solid #CCC!important}",Vu[Wu("MENUCLOSE")+":hover span"]="{ background-color:#CCC!important}",Vu[Wu("MENUCLOSE")+":hover:focus"]="{ outline:none}";let Gu=!1,Ju=!1,Ku=!1;function $u(t){Ku||(Yu(Vu,t),Ku=!0)}function Yu(t,e){const s=e||document,i=s.createElement("style");i.type="text/css";let r="";for(const e in t)r+=e,r+=" ",r+=t[e],r+="\n";i.innerHTML=r,s.head.appendChild(i)}class Qu extends wu{constructor(){super(...arguments),this.mathItem=null,this.nofocus=!1,this.errorMsg=""}post(t,e){var s,i;if(this.mathItem){const r=null===(i=null===(s=this.mathItem)||void 0===s?void 0:s.explorers)||void 0===i?void 0:i.speech;(null==r?void 0:r.active)&&(r.restarted=r.semanticFocus()),void 0!==e&&(this.getOriginalMenu(),this.getSemanticsMenu(),this.getSpeechMenu(),this.getBrailleMenu(),this.getSvgMenu(),this.getErrorMessage(),this.dynamicSubmenus()),super.post(t,e)}}unpost(){super.unpost(),this.mathItem&&(this.mathItem.outputData.nofocus=this.nofocus),this.mathItem=null,this.nofocus=!1}findID(...t){let e=this,s=null;for(const i of t){if(!e)return null;for(s of e.items){if(s.id===i){e=s instanceof xu?s.submenu:null;break}e=s=null}}return s}setJax(t){this.jax=t}getOriginalMenu(){const t=this.mathItem.inputJax.name,e=this.findID("Show","Original");e.content="MathML"===t?"Original MathML":t+" Commands";this.findID("Copy","Original").content=e.content}getSemanticsMenu(){const t=this.findID("Settings","MathmlIncludes","semantics");"MathML"===this.mathItem.inputJax.name?t.disable():t.enable()}getSpeechMenu(){const t=this.mathItem.outputData.speech;this.findID("Show","Speech")[t?"enable":"disable"](),this.findID("Copy","Speech")[t?"enable":"disable"]()}getBrailleMenu(){const t=this.mathItem.outputData.braille;this.findID("Show","Braille")[t?"enable":"disable"](),this.findID("Copy","Braille")[t?"enable":"disable"]()}getSvgMenu(){const t=this.jax.SVG;this.findID("Show","SVG")[t?"enable":"disable"](),this.findID("Copy","SVG")[t?"enable":"disable"]()}getErrorMessage(){const t=this.mathItem.root.childNodes[0].childNodes;let e=!0;if(this.errorMsg="",1===t.length&&t[0].isKind("merror")){const s=t[0].attributes;this.errorMsg=s.get("data-mjx-error")||s.get("data-mjx-message")||"",e=!this.errorMsg}this.findID("Show","Error")[e?"disable":"enable"](),this.findID("Copy","Error")[e?"disable":"enable"]()}dynamicSubmenus(){for(const[t,[e,s]]of Qu.DynamicSubmenus){const i=this.find(t);i&&e(this,i,(t=>{var e;i.submenu=t,!(null===(e=null==t?void 0:t.items)||void 0===e?void 0:e.length)||s&&!this.settings[s]?i.disable():i.enable()}))}}}var Zu,tp,ep;Qu.DynamicSubmenus=new Map,function(t){t.DOMAIN="domain",t.STYLE="style",t.LOCALE="locale",t.TOPIC="topic",t.MODALITY="modality"}(Zu||(Zu={}));class sp{static createProp(...t){const e=ip.DEFAULT_ORDER,s={};for(let i=0,r=t.length,n=e.length;i<r&&i<n;i++)s[e[i]]=t[i];return new sp(s)}constructor(t,e=Object.keys(t)){this.properties=t,this.order=e}getProperties(){return this.properties}getOrder(){return this.order}getAxes(){return this.order}getProperty(t){return this.properties[t]}updateProperties(t){this.properties=t}allProperties(){const t=[];return this.order.forEach((e=>t.push(this.getProperty(e).slice()))),t}toString(){const t=[];return this.order.forEach((e=>t.push(e+": "+this.getProperty(e).toString()))),t.join("\n")}}class ip extends sp{static createCstr(...t){const e=ip.DEFAULT_ORDER,s={};for(let i=0,r=t.length,n=e.length;i<r&&i<n;i++)s[e[i]]=t[i];return new ip(s)}static defaultCstr(){return ip.createCstr.apply(null,ip.DEFAULT_ORDER.map((function(t){return ip.DEFAULT_VALUES[t]})))}static validOrder(t){const e=ip.DEFAULT_ORDER.slice();return t.every((t=>{const s=e.indexOf(t);return-1!==s&&e.splice(s,1)}))}constructor(t,e){const s={};for(const[e,i]of Object.entries(t))s[e]=[i];super(s,e),this.components=t}getComponents(){return this.components}getValue(t){return this.components[t]}getValues(){return this.order.map((t=>this.getValue(t)))}allProperties(){const t=super.allProperties();for(let e,s,i=0;e=t[i],s=this.order[i];i++){const t=this.getValue(s);-1===e.indexOf(t)&&e.unshift(t)}return t}toString(){return this.getValues().join(".")}equal(t){const e=t.getAxes();if(this.order.length!==e.length)return!1;for(let s,i=0;s=e[i];i++){const e=this.getValue(s);if(!e||t.getValue(s)!==e)return!1}return!0}}ip.DEFAULT_ORDER=[Zu.LOCALE,Zu.MODALITY,Zu.DOMAIN,Zu.STYLE,Zu.TOPIC],ip.BASE_LOCALE="base",ip.DEFAULT_VALUE="default",ip.DEFAULT_VALUES={[Zu.LOCALE]:"en",[Zu.DOMAIN]:ip.DEFAULT_VALUE,[Zu.STYLE]:ip.DEFAULT_VALUE,[Zu.TOPIC]:ip.DEFAULT_VALUE,[Zu.MODALITY]:"speech"};class rp{constructor(t){this.order=t}parse(t){const e=t.split("."),s={};if(e.length>this.order.length)throw new Error("Invalid dynamic constraint: "+s);let i=0;for(let t,r=0;t=this.order[r],e.length;r++,i++){const i=e.shift();s[t]=i}return new ip(s,this.order.slice(0,i))}}class np{constructor(t,e=new sp(t.getProperties(),t.getOrder())){this.reference=t,this.fallback=e,this.order=this.reference.getOrder()}getReference(){return this.reference}setReference(t,e){this.reference=t,this.fallback=e||new sp(t.getProperties(),t.getOrder()),this.order=this.reference.getOrder()}match(t){const e=t.getAxes();return e.length===this.reference.getAxes().length&&e.every((e=>{const s=t.getValue(e);return s===this.reference.getValue(e)||-1!==this.fallback.getProperty(e).indexOf(s)}))}compare(t,e){let s=!1;for(let i,r=0;i=this.order[r];r++){const r=t.getValue(i),n=e.getValue(i);if(!s){const t=this.reference.getValue(i);if(t===r&&t!==n)return-1;if(t===n&&t!==r)return 1;if(t===r&&t===n)continue;t!==r&&t!==n&&(s=!0)}const o=this.fallback.getProperty(i),a=o.indexOf(r),c=o.indexOf(n);if(a<c)return-1;if(c<a)return 1}return 0}toString(){return this.reference.toString()+"\n"+this.fallback.toString()}}!function(t){t.SYNC="sync",t.ASYNC="async",t.HTTP="http"}(tp||(tp={})),function(t){t.PITCH="pitch",t.RATE="rate",t.VOLUME="volume",t.PAUSE="pause",t.JOIN="join",t.LAYOUT="layout"}(ep||(ep={}));ep.PITCH,ep.RATE,ep.VOLUME,ep.PAUSE,ep.JOIN;var op,ap;!function(t){t.NONE="none",t.SHALLOW="shallow",t.DEEP="deep"}(op||(op={})),function(t){t.NONE="none",t.LAYOUT="layout",t.COUNTING="counting",t.PUNCTUATION="punctuation",t.SSML="ssml",t.ACSS="acss",t.SABLE="sable",t.VOICEXML="voicexml"}(ap||(ap={}));var cp=__webpack_require__(74);function lp(t){return t.match("/$")?t:t+"/"}class hp{static getInstance(){return hp.instance=hp.instance||new hp,hp.instance}init(t){return t&&this.startDebugFile_(t),this.isActive_=!0,this.fileHandle}output(...t){this.isActive_&&this.output_(t)}generate(t){this.isActive_&&this.output_(t.apply(t,[]))}exit(t=()=>{}){this.fileHandle.then((()=>{this.isActive_&&this.stream_&&this.stream_.end("","",t)}))}constructor(){this.isActive_=!1,this.fileHandle=Promise.resolve(),this.stream_=null}startDebugFile_(t){this.fileHandle=cp.f.fs.promises.open(t,"w"),this.fileHandle=this.fileHandle.then((e=>{this.stream_=e.createWriteStream(t),this.outputFunction=function(...t){this.stream_.write(t.join(" ")),this.stream_.write("\n")}.bind(this),this.stream_.on("error",function(t){console.info("Invalid log file. Debug information sent to console."),this.outputFunction=console.info}.bind(this)),this.stream_.on("finish",(function(){console.info("Finalizing debug file.")}))}))}output_(t){this.stream_?this.fileHandle.then((()=>this.outputFunction.apply(this.outputFunction,["Speech Rule Engine Debugger:"].concat(t)))):console.info.apply(console,["Speech Rule Engine Debugger:"].concat(t))}}var dp=__webpack_require__(714);class up{constructor(t={}){this.delay=!1,this.domain="clearspeak",this.style=ip.DEFAULT_VALUES[Zu.STYLE],this.locale=ip.DEFAULT_VALUES[Zu.LOCALE],this.subiso="",this.modality=ip.DEFAULT_VALUES[Zu.MODALITY],this.speech=op.NONE,this.markup=ap.NONE,this.mark=!0,this.automark=!1,this.character=!0,this.cleanpause=!0,this.cayleyshort=!0,this.linebreaks=!1,this.rate="100",this.walker="Table",this.structure=!1,this.aria=!1,this.tree=!1,this.strict=!1,this.pprint=!1,this.rules="",this.prune="",this.set(t)}set(t){this.ensureDomain(t);for(const[e,s]of Object.entries(t))(up.BINARY_FEATURES.includes(e)||up.STRING_FEATURES.includes(e))&&(this[e]=s)}json(){const t={};return[].concat(up.STRING_FEATURES,up.BINARY_FEATURES).forEach((e=>t[e]=this[e])),t}ensureDomain(t){if(t.modality&&"speech"!==t.modality||!t.modality&&"speech"!==this.modality)return;if(!t.domain&&!t.locale)return;if("default"===t.domain)return void(t.domain="mathspeak");const e=t.locale||this.locale,s=t.domain||this.domain;-1===pp.indexOf(e)||"mathspeak"===s?"en"!==e?"mathspeak"!==s&&"clearspeak"!==s&&(t.domain="mathspeak"):-1===mp.indexOf(s)&&(t.domain="mathspeak"):t.domain="mathspeak"}}up.BINARY_FEATURES=["automark","mark","character","cleanpause","strict","structure","aria","pprint","cayleyshort","linebreaks","tree"],up.STRING_FEATURES=["markup","style","domain","speech","walker","locale","delay","modality","rate","rules","subiso","prune"];const pp=["ca","da","es"],mp=["chromevox","clearspeak","mathspeak","emacspeak","html"];class fp extends Error{constructor(t=""){super(),this.message=t,this.name="SRE Error"}}class gp{set defaultLocale(t){this._defaultLocale=dp.u.ensureLocale(t,this._defaultLocale)}get defaultLocale(){return this._defaultLocale}static getInstance(){return gp.instance=gp.instance||new gp,gp.instance}static defaultEvaluator(t,e){return t}static evaluateNode(t){return gp.nodeEvaluator(t)}getRate(){const t=parseInt(this.options.rate,10);return isNaN(t)?100:t}setDynamicCstr(t){if(this.defaultLocale&&(ip.DEFAULT_VALUES[Zu.LOCALE]=this.defaultLocale),t){const e=Object.keys(t);for(let s=0;s<e.length;s++){const i=e[s];if(-1!==ip.DEFAULT_ORDER.indexOf(i)){const e=t[i];this.options[i]=e}}}const e=[this.options.locale,this.options.modality,this.options.domain,this.options.style].join("."),s=sp.createProp([ip.DEFAULT_VALUES[Zu.LOCALE]],[ip.DEFAULT_VALUES[Zu.MODALITY]],[ip.DEFAULT_VALUES[Zu.DOMAIN]],[ip.DEFAULT_VALUES[Zu.STYLE]]),i=this.comparators[this.options.domain],r=this.parsers[this.options.domain];this.parser=r||this.defaultParser,this.dynamicCstr=this.parser.parse(e),this.dynamicCstr.updateProperties(s.getProperties()),this.comparator=i?i():new np(this.dynamicCstr)}constructor(){this.options=new up,this.config=!1,this.customLoader=null,this.parsers={},this.comparator=null,this.mode=tp.SYNC,this.init=!0,this.comparators={},this._defaultLocale=ip.DEFAULT_VALUES[Zu.LOCALE],this.options.locale=this.defaultLocale,this.evaluator=gp.defaultEvaluator,this.defaultParser=new rp(ip.DEFAULT_ORDER),this.parser=this.defaultParser,this.dynamicCstr=ip.defaultCstr()}configurate(t){this.mode!==tp.HTTP||cp.f.webworker||this.config||(!function(t){const e=document.documentElement.querySelectorAll('script[type="text/x-sre-config"]');for(let s=0,i=e.length;s<i;s++){let i;try{i=e[s].innerHTML;const r=JSON.parse(i);for(const[e,s]of Object.entries(r))t[e]=s}catch(t){hp.getInstance().output("Illegal configuration ",i)}}}(t),this.config=!0),function(t){if("undefined"!=typeof SREfeature)for(const[e,s]of Object.entries(SREfeature))t[e]=s}(t)}setCustomLoader(t){t&&(this.customLoader=t)}setup(t){void 0!==t.mode&&(this.mode=t.mode),this.configurate(t),this.options.set(t),t.json&&(cp.f.jsonPath=lp(t.json)),this.setCustomLoader(t.custom)}json(){return Object.assign({mode:this.mode},this.options.json())}reset(){this.options=new up}}gp.nodeEvaluator=function(t){return[]};class bp{static get(t=gp.getInstance().options.locale){return bp.promises[t]||Promise.resolve("")}static getall(){return Promise.all(Object.values(bp.promises))}}bp.loaded={},bp.promises={};const Ep=cp.f.xpath,Np={xhtml:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",mml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function yp(t){return Np[t]||null}class xp{constructor(){this.lookupNamespaceURI=yp}}function vp(t,e,s){return Ep.evaluate(t,e,new xp,s,null)}function Cp(t){const e=[];for(let s=0,i=t.length;s<i;s++)e.push(t[s]);return e}function Tp(t){const e=new cp.f.xmldom.DOMParser,s=function(t){return(t=t.replace(/&nbsp;/g,"\xa0")).replace(/>[ \f\n\r\t\v\u200b]+</g,"><").trim()}(t),i=!!s.match(/&(?!lt|gt|amp|quot|apos)\w+;/g);if(!s)throw new Error("Empty input!");try{const t=e.parseFromString(s,i?"text/html":"text/xml");return gp.getInstance().mode===tp.HTTP?(Ep.currentDocument=t,i?t.body.childNodes[0]:t.documentElement):t.documentElement}catch(t){throw new fp("Illegal input: "+t.message)}}var wp;function _p(t,e){t.parentNode&&(t.parentNode.insertBefore(e,t),t.parentNode.removeChild(t))}function kp(t){return cp.f.document.createElement(t)}function Ap(t){let e="",s=/(>)(<)(\/*)/g,i=0,r=(t=t.replace(s,"$1\r\n$2$3")).split("\r\n");for(s=/(\.)*(<)(\/*)/g,r=r.map((t=>t.replace(s,"$1\r\n$2$3").split("\r\n"))).reduce(((t,e)=>t.concat(e)),[]);r.length;){let t=r.shift();if(!t)continue;let s=0;if(t.match(/^<\w[^>/]*>[^>]+$/)){const e=Lp(t,r[0]);e[0]?e[1]?(t+=r.shift().slice(0,-e[1].length),e[1].trim()&&r.unshift(e[1])):t+=r.shift():s=1}else if(t.match(/^<\/\w/))0!==i&&(i-=1);else if(t.match(/^<\w[^>]*[^/]>.*$/))s=1;else if(t.match(/^<\w[^>]*\/>.+$/)){const e=t.indexOf(">")+1,s=t.slice(e);s.trim()&&r.unshift(),t=t.slice(0,e)+s}else s=0;e+=new Array(i+1).join(" ")+t+"\r\n",i+=s}return e}function Lp(t,e){if(!e)return[!1,""];const s=t.match(/^<([^> ]+).*>/),i=e.match(/^<\/([^>]+)>(.*)/);return s&&i&&s[1]===i[1]?[!0,i[2]]:[!1,""]}function Mp(t){return t.tagName.toUpperCase()}function Ip(t){return(new cp.f.xmldom.XMLSerializer).serializeToString(t)}!function(t){t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t[t.NOTATION_NODE=12]="NOTATION_NODE"}(wp||(wp={}));class Sp{constructor(t,e,s){this.domain=t,this.name=e,this.func=s,this.active=!1}annotate(t){t.childNodes.forEach(this.annotate.bind(this)),t.contentNodes.forEach(this.annotate.bind(this)),t.addAnnotation(this.domain,this.func(t))}}class Rp{constructor(t,e,s,i={}){this.domain=t,this.name=e,this.func=s,this.def=i,this.active=!1}visit(t,e){let s=this.func(t,e);t.addAnnotation(this.domain,s[0]);for(let e,i=0;e=t.childNodes[i];i++)s=this.visit(e,s[1]);for(let e,i=0;e=t.contentNodes[i];i++)s=this.visit(e,s[1]);return s}}const Op=new Map,Dp=new Map;function Pp(t){const e=t.domain+":"+t.name;t instanceof Sp?Op.set(e,t):Dp.set(e,t)}function Bp(t,e){const s=t+":"+e,i=Op.get(s)||Dp.get(s);i&&(i.active=!0)}var Fp,jp,Up;function qp(t){const e=t.toString(16).toUpperCase();return e.length>3?e:("000"+e).slice(-4)}function Hp([t,e],s){const i=parseInt(t,16),r=parseInt(e,16),n=[];for(let t=i;t<=r;t++){let e=qp(t);!1!==s[e]&&(e=s[e]||e,n.push(e))}return n}function Wp(t,e={}){return Hp(t,e).map((t=>String.fromCodePoint(parseInt(t,16))))}!function(t){t.BOLD="bold",t.BOLDFRAKTUR="bold-fraktur",t.BOLDITALIC="bold-italic",t.BOLDSCRIPT="bold-script",t.DOUBLESTRUCK="double-struck",t.DOUBLESTRUCKITALIC="double-struck-italic",t.FULLWIDTH="fullwidth",t.FRAKTUR="fraktur",t.ITALIC="italic",t.MONOSPACE="monospace",t.NORMAL="normal",t.SCRIPT="script",t.SANSSERIF="sans-serif",t.SANSSERIFITALIC="sans-serif-italic",t.SANSSERIFBOLD="sans-serif-bold",t.SANSSERIFBOLDITALIC="sans-serif-bold-italic"}(Fp||(Fp={})),function(t){t.SUPER="super",t.SUB="sub",t.CIRCLED="circled",t.PARENTHESIZED="parenthesized",t.PERIOD="period",t.NEGATIVECIRCLED="negative-circled",t.DOUBLECIRCLED="double-circled",t.CIRCLEDSANSSERIF="circled-sans-serif",t.NEGATIVECIRCLEDSANSSERIF="negative-circled-sans-serif",t.COMMA="comma",t.SQUARED="squared",t.NEGATIVESQUARED="negative-squared"}(jp||(jp={})),function(t){t.LATINCAP="latinCap",t.LATINSMALL="latinSmall",t.GREEKCAP="greekCap",t.GREEKSMALL="greekSmall",t.DIGIT="digit"}(Up||(Up={}));const zp=[{interval:["1D400","1D419"],base:Up.LATINCAP,subst:{},capital:!0,category:"Lu",font:Fp.BOLD},{interval:["1D41A","1D433"],base:Up.LATINSMALL,subst:{},capital:!1,category:"Ll",font:Fp.BOLD},{interval:["1D56C","1D585"],base:Up.LATINCAP,subst:{},capital:!0,category:"Lu",font:Fp.BOLDFRAKTUR},{interval:["1D586","1D59F"],base:Up.LATINSMALL,subst:{},capital:!1,category:"Ll",font:Fp.BOLDFRAKTUR},{interval:["1D468","1D481"],base:Up.LATINCAP,subst:{},capital:!0,category:"Lu",font:Fp.BOLDITALIC},{interval:["1D482","1D49B"],base:Up.LATINSMALL,subst:{},capital:!1,category:"Ll",font:Fp.BOLDITALIC},{interval:["1D4D0","1D4E9"],base:Up.LATINCAP,subst:{},capital:!0,category:"Lu",font:Fp.BOLDSCRIPT},{interval:["1D4EA","1D503"],base:Up.LATINSMALL,subst:{},capital:!1,category:"Ll",font:Fp.BOLDSCRIPT},{interval:["1D538","1D551"],base:Up.LATINCAP,subst:{"1D53A":"2102","1D53F":"210D","1D545":"2115","1D547":"2119","1D548":"211A","1D549":"211D","1D551":"2124"},capital:!0,category:"Lu",font:Fp.DOUBLESTRUCK},{interval:["1D552","1D56B"],base:Up.LATINSMALL,subst:{},capital:!1,category:"Ll",font:Fp.DOUBLESTRUCK},{interval:["1D504","1D51D"],base:Up.LATINCAP,subst:{"1D506":"212D","1D50B":"210C","1D50C":"2111","1D515":"211C","1D51D":"2128"},capital:!0,category:"Lu",font:Fp.FRAKTUR},{interval:["1D51E","1D537"],base:Up.LATINSMALL,subst:{},capital:!1,category:"Ll",font:Fp.FRAKTUR},{interval:["FF21","FF3A"],base:Up.LATINCAP,subst:{},capital:!0,category:"Lu",font:Fp.FULLWIDTH},{interval:["FF41","FF5A"],base:Up.LATINSMALL,subst:{},capital:!1,category:"Ll",font:Fp.FULLWIDTH},{interval:["1D434","1D44D"],base:Up.LATINCAP,subst:{},capital:!0,category:"Lu",font:Fp.ITALIC},{interval:["1D44E","1D467"],base:Up.LATINSMALL,subst:{"1D455":"210E"},capital:!1,category:"Ll",font:Fp.ITALIC},{interval:["1D670","1D689"],base:Up.LATINCAP,subst:{},capital:!0,category:"Lu",font:Fp.MONOSPACE},{interval:["1D68A","1D6A3"],base:Up.LATINSMALL,subst:{},capital:!1,category:"Ll",font:Fp.MONOSPACE},{interval:["0041","005A"],base:Up.LATINCAP,subst:{},capital:!0,category:"Lu",font:Fp.NORMAL},{interval:["0061","007A"],base:Up.LATINSMALL,subst:{},capital:!1,category:"Ll",font:Fp.NORMAL},{interval:["1D49C","1D4B5"],base:Up.LATINCAP,subst:{"1D49D":"212C","1D4A0":"2130","1D4A1":"2131","1D4A3":"210B","1D4A4":"2110","1D4A7":"2112","1D4A8":"2133","1D4AD":"211B"},capital:!0,category:"Lu",font:Fp.SCRIPT},{interval:["1D4B6","1D4CF"],base:Up.LATINSMALL,subst:{"1D4BA":"212F","1D4BC":"210A","1D4C4":"2134"},capital:!1,category:"Ll",font:Fp.SCRIPT},{interval:["1D5A0","1D5B9"],base:Up.LATINCAP,subst:{},capital:!0,category:"Lu",font:Fp.SANSSERIF},{interval:["1D5BA","1D5D3"],base:Up.LATINSMALL,subst:{},capital:!1,category:"Ll",font:Fp.SANSSERIF},{interval:["1D608","1D621"],base:Up.LATINCAP,subst:{},capital:!0,category:"Lu",font:Fp.SANSSERIFITALIC},{interval:["1D622","1D63B"],base:Up.LATINSMALL,subst:{},capital:!1,category:"Ll",font:Fp.SANSSERIFITALIC},{interval:["1D5D4","1D5ED"],base:Up.LATINCAP,subst:{},capital:!0,category:"Lu",font:Fp.SANSSERIFBOLD},{interval:["1D5EE","1D607"],base:Up.LATINSMALL,subst:{},capital:!1,category:"Ll",font:Fp.SANSSERIFBOLD},{interval:["1D63C","1D655"],base:Up.LATINCAP,subst:{},capital:!0,category:"Lu",font:Fp.SANSSERIFBOLDITALIC},{interval:["1D656","1D66F"],base:Up.LATINSMALL,subst:{},capital:!1,category:"Ll",font:Fp.SANSSERIFBOLDITALIC},{interval:["0391","03A9"],base:Up.GREEKCAP,subst:{"03A2":"03F4"},capital:!0,category:"Lu",font:Fp.NORMAL},{interval:["03B0","03D0"],base:Up.GREEKSMALL,subst:{"03B0":"2207","03CA":"2202","03CB":"03F5","03CC":"03D1","03CD":"03F0","03CE":"03D5","03CF":"03F1","03D0":"03D6"},capital:!1,category:"Ll",font:Fp.NORMAL},{interval:["1D6A8","1D6C0"],base:Up.GREEKCAP,subst:{},capital:!0,category:"Lu",font:Fp.BOLD},{interval:["1D6C1","1D6E1"],base:Up.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:Fp.BOLD},{interval:["1D6E2","1D6FA"],base:Up.GREEKCAP,subst:{},capital:!0,category:"Lu",font:Fp.ITALIC},{interval:["1D6FB","1D71B"],base:Up.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:Fp.ITALIC},{interval:["1D71C","1D734"],base:Up.GREEKCAP,subst:{},capital:!0,category:"Lu",font:Fp.BOLDITALIC},{interval:["1D735","1D755"],base:Up.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:Fp.BOLDITALIC},{interval:["1D756","1D76E"],base:Up.GREEKCAP,subst:{},capital:!0,category:"Lu",font:Fp.SANSSERIFBOLD},{interval:["1D76F","1D78F"],base:Up.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:Fp.SANSSERIFBOLD},{interval:["1D790","1D7A8"],base:Up.GREEKCAP,subst:{},capital:!0,category:"Lu",font:Fp.SANSSERIFBOLDITALIC},{interval:["1D7A9","1D7C9"],base:Up.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:Fp.SANSSERIFBOLDITALIC},{interval:["0030","0039"],base:Up.DIGIT,subst:{},offset:0,category:"Nd",font:Fp.NORMAL},{interval:["2070","2079"],base:Up.DIGIT,subst:{2071:"00B9",2072:"00B2",2073:"00B3"},offset:0,category:"No",font:jp.SUPER},{interval:["2080","2089"],base:Up.DIGIT,subst:{},offset:0,category:"No",font:jp.SUB},{interval:["245F","2473"],base:Up.DIGIT,subst:{"245F":"24EA"},offset:0,category:"No",font:jp.CIRCLED},{interval:["3251","325F"],base:Up.DIGIT,subst:{},offset:21,category:"No",font:jp.CIRCLED},{interval:["32B1","32BF"],base:Up.DIGIT,subst:{},offset:36,category:"No",font:jp.CIRCLED},{interval:["2474","2487"],base:Up.DIGIT,subst:{},offset:1,category:"No",font:jp.PARENTHESIZED},{interval:["2487","249B"],base:Up.DIGIT,subst:{2487:"1F100"},offset:0,category:"No",font:jp.PERIOD},{interval:["2775","277F"],base:Up.DIGIT,subst:{2775:"24FF"},offset:0,category:"No",font:jp.NEGATIVECIRCLED},{interval:["24EB","24F4"],base:Up.DIGIT,subst:{},offset:11,category:"No",font:jp.NEGATIVECIRCLED},{interval:["24F5","24FE"],base:Up.DIGIT,subst:{},offset:1,category:"No",font:jp.DOUBLECIRCLED},{interval:["277F","2789"],base:Up.DIGIT,subst:{"277F":"1F10B"},offset:0,category:"No",font:jp.CIRCLEDSANSSERIF},{interval:["2789","2793"],base:Up.DIGIT,subst:{2789:"1F10C"},offset:0,category:"No",font:jp.NEGATIVECIRCLEDSANSSERIF},{interval:["FF10","FF19"],base:Up.DIGIT,subst:{},offset:0,category:"Nd",font:Fp.FULLWIDTH},{interval:["1D7CE","1D7D7"],base:Up.DIGIT,subst:{},offset:0,category:"Nd",font:Fp.BOLD},{interval:["1D7D8","1D7E1"],base:Up.DIGIT,subst:{},offset:0,category:"Nd",font:Fp.DOUBLESTRUCK},{interval:["1D7E2","1D7EB"],base:Up.DIGIT,subst:{},offset:0,category:"Nd",font:Fp.SANSSERIF},{interval:["1D7EC","1D7F5"],base:Up.DIGIT,subst:{},offset:0,category:"Nd",font:Fp.SANSSERIFBOLD},{interval:["1D7F6","1D7FF"],base:Up.DIGIT,subst:{},offset:0,category:"Nd",font:Fp.MONOSPACE},{interval:["1F101","1F10A"],base:Up.DIGIT,subst:{},offset:0,category:"No",font:jp.COMMA},{interval:["24B6","24CF"],base:Up.LATINCAP,subst:{},capital:!0,category:"So",font:jp.CIRCLED},{interval:["24D0","24E9"],base:Up.LATINSMALL,subst:{},capital:!1,category:"So",font:jp.CIRCLED},{interval:["1F110","1F129"],base:Up.LATINCAP,subst:{},capital:!0,category:"So",font:jp.PARENTHESIZED},{interval:["249C","24B5"],base:Up.LATINSMALL,subst:{},capital:!1,category:"So",font:jp.PARENTHESIZED},{interval:["1F130","1F149"],base:Up.LATINCAP,subst:{},capital:!0,category:"So",font:jp.SQUARED},{interval:["1F170","1F189"],base:Up.LATINCAP,subst:{},capital:!0,category:"So",font:jp.NEGATIVESQUARED},{interval:["1F150","1F169"],base:Up.LATINCAP,subst:{},capital:!0,category:"So",font:jp.NEGATIVECIRCLED}],Xp=new Map;function Vp(t,e){return t+e.split("-").map((t=>t[0].toUpperCase()+t.slice(1))).join("")}for(const t of zp){const e=Vp(t.base,t.font),s=Wp(t.interval,t.subst);let i=Xp.get(e);i?i.unicode=i.unicode.concat(s):(i=t,i.unicode=s,Xp.set(e,i))}var Gp;!function(t){t.PUNCTUATION="punctuation",t.FENCE="fence",t.NUMBER="number",t.IDENTIFIER="identifier",t.TEXT="text",t.OPERATOR="operator",t.RELATION="relation",t.LARGEOP="largeop",t.FUNCTION="function",t.ACCENT="accent",t.FENCED="fenced",t.FRACTION="fraction",t.PUNCTUATED="punctuated",t.RELSEQ="relseq",t.MULTIREL="multirel",t.INFIXOP="infixop",t.PREFIXOP="prefixop",t.POSTFIXOP="postfixop",t.APPL="appl",t.INTEGRAL="integral",t.BIGOP="bigop",t.SQRT="sqrt",t.ROOT="root",t.LIMUPPER="limupper",t.LIMLOWER="limlower",t.LIMBOTH="limboth",t.SUBSCRIPT="subscript",t.SUPERSCRIPT="superscript",t.UNDERSCORE="underscore",t.OVERSCORE="overscore",t.TENSOR="tensor",t.TABLE="table",t.MULTILINE="multiline",t.MATRIX="matrix",t.VECTOR="vector",t.CASES="cases",t.ROW="row",t.LINE="line",t.CELL="cell",t.ENCLOSE="enclose",t.INFERENCE="inference",t.RULELABEL="rulelabel",t.CONCLUSION="conclusion",t.PREMISES="premises",t.UNKNOWN="unknown",t.EMPTY="empty"}(Gp||(Gp={}));const Jp=Object.assign({},Gp);var Kp;!function(t){t.COMMA="comma",t.SEMICOLON="semicolon",t.ELLIPSIS="ellipsis",t.FULLSTOP="fullstop",t.QUESTION="question",t.EXCLAMATION="exclamation",t.QUOTES="quotes",t.DASH="dash",t.TILDE="tilde",t.PRIME="prime",t.DEGREE="degree",t.VBAR="vbar",t.COLON="colon",t.OPENFENCE="openfence",t.CLOSEFENCE="closefence",t.APPLICATION="application",t.DUMMY="dummy",t.UNIT="unit",t.LABEL="label",t.OPEN="open",t.CLOSE="close",t.TOP="top",t.BOTTOM="bottom",t.NEUTRAL="neutral",t.METRIC="metric",t.LATINLETTER="latinletter",t.GREEKLETTER="greekletter",t.OTHERLETTER="otherletter",t.NUMBERSET="numbersetletter",t.INTEGER="integer",t.FLOAT="float",t.OTHERNUMBER="othernumber",t.INFTY="infty",t.MIXED="mixed",t.MULTIACCENT="multiaccent",t.OVERACCENT="overaccent",t.UNDERACCENT="underaccent",t.UNDEROVER="underover",t.SUBSUP="subsup",t.LEFTSUB="leftsub",t.LEFTSUPER="leftsuper",t.RIGHTSUB="rightsub",t.RIGHTSUPER="rightsuper",t.LEFTRIGHT="leftright",t.ABOVEBELOW="abovebelow",t.INTERVAL="interval",t.SETEMPTY="set empty",t.SETEXT="set extended",t.SETSINGLE="set singleton",t.SETCOLLECT="set collection",t.STRING="string",t.SPACE="space",t.ANNOTATION="annotation",t.TEXT="text",t.SEQUENCE="sequence",t.ENDPUNCT="endpunct",t.STARTPUNCT="startpunct",t.NEGATIVE="negative",t.POSITIVE="positive",t.NEGATION="negation",t.MULTIOP="multiop",t.PREFIXOP="prefix operator",t.POSTFIXOP="postfix operator",t.LIMFUNC="limit function",t.INFIXFUNC="infix function",t.PREFIXFUNC="prefix function",t.POSTFIXFUNC="postfix function",t.SIMPLEFUNC="simple function",t.COMPFUNC="composed function",t.SUM="sum",t.INTEGRAL="integral",t.GEOMETRY="geometry",t.BOX="box",t.BLOCK="block",t.ADDITION="addition",t.MULTIPLICATION="multiplication",t.SUBTRACTION="subtraction",t.IMPLICIT="implicit",t.DIVISION="division",t.VULGAR="vulgar",t.EQUALITY="equality",t.INEQUALITY="inequality",t.ARROW="arrow",t.ELEMENT="element",t.NONELEMENT="nonelement",t.REELEMENT="reelement",t.RENONELEMENT="renonelement",t.SET="set",t.DETERMINANT="determinant",t.ROWVECTOR="rowvector",t.BINOMIAL="binomial",t.SQUAREMATRIX="squarematrix",t.CYCLE="cycle",t.MULTILINE="multiline",t.MATRIX="matrix",t.VECTOR="vector",t.CASES="cases",t.TABLE="table",t.CAYLEY="cayley",t.PROOF="proof",t.LEFT="left",t.RIGHT="right",t.UP="up",t.DOWN="down",t.FINAL="final",t.SINGLE="single",t.HYP="hyp",t.AXIOM="axiom",t.LOGIC="logic",t.UNKNOWN="unknown",t.MGLYPH="mglyph"}(Kp||(Kp={}));const $p=Object.assign({},Kp);var Yp;!function(t){t.CALIGRAPHIC="caligraphic",t.CALIGRAPHICBOLD="caligraphic-bold",t.OLDSTYLE="oldstyle",t.OLDSTYLEBOLD="oldstyle-bold",t.UNKNOWN="unknown"}(Yp||(Yp={}));const Qp=Object.assign(Object.assign(Object.assign({},Fp),Yp),jp);var Zp;!function(t){t.ALLLETTERS="allLetters",t.D="d",t.BAR="bar",t.TILDE="tilde"}(Zp||(Zp={}));const tm=Object.assign(Object.assign({},Up),Zp);var em=function(t,e){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(s[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(s[i[r]]=t[i[r]])}return s};const sm={functionApplication:String.fromCodePoint(8289),invisibleTimes:String.fromCodePoint(8290),invisibleComma:String.fromCodePoint(8291),invisiblePlus:String.fromCodePoint(8292)};class im extends Map{get(t){return super.get(t)||{role:$p.UNKNOWN,type:Jp.UNKNOWN,font:Qp.UNKNOWN}}}class rm extends Map{set(t,e,s=""){return super.set(this.secKey(e,t),s||e),this}has(t,e){return super.has(this.secKey(e,t))}get(t,e){return super.get(this.secKey(e,t))}secKey(t,e){return e?`${t} ${e}`:`${t}`}}const nm={Meaning:new im,Secondary:new rm,FencesHoriz:new Map,FencesVert:new Map,LatexCommands:new Map};function om(t,e){for(const s of t)nm.Meaning.set(s,{role:e.role||$p.UNKNOWN,type:e.type||Jp.UNKNOWN,font:e.font||Qp.UNKNOWN}),e.secondary&&nm.Secondary.set(s,e.secondary)}function am(t,e,s=1){const i={},r=function(t){let e=[];for(const s of t)Array.isArray(s)?e=e.concat(Hp(s,{}).map((t=>parseInt(t,16)))):e.push(parseInt(s,16));return e}(e);for(const e of r)i[e]||(t.set(String.fromCodePoint(e),String.fromCodePoint(e+s)),i[e]=!0,i[e+s]=!0)}const cm=["cos","cot","csc","sec","sin","tan","arccos","arccot","arccsc","arcsec","arcsin","arctan"].concat(["cosh","coth","csch","sech","sinh","tanh","arcosh","arcoth","arcsch","arsech","arsinh","artanh"],["deg","det","dim","hom","ker","Tr"],["log","ln","lg","exp","gcd","lcm","arg","im","re","Pr"]);function lm(t,e,s,i,r,n=[],o={},a={}){const c=Xp.get(Vp(t,i));c&&(c.unicode.forEach((t=>{nm.Meaning.set(t,{type:e,role:s,font:r}),n.forEach((e=>nm.Secondary.set(t,e)))})),function(t,e){for(const[s,i]of Object.entries(e)){const e=t[s];void 0!==e&&nm.Meaning.set(e,i)}}(c.unicode,o),function(t,e){for(const[s,i]of Object.entries(e)){const e=t[s];void 0!==e&&nm.Secondary.set(e,i)}}(c.unicode,a))}[{set:["23","26","40","5c","a1","a7","b6","bf","2017",["2022","2025"],"2027","203b","203c",["2041","2043"],["2047","2049"],["204b","204d"],"2050","2055","2056",["2058","205e"],"2234","2235","fe45","fe46","fe5f","fe60","fe68","fe6b","ff03","ff06","ff0f","ff20","ff3c"],type:Jp.PUNCTUATION,role:$p.UNKNOWN},{set:["22","ab","bb","2dd",["2018","201f"],"2039","203a",["301d","301f"],"fe10","ff02","ff07"],type:Jp.PUNCTUATION,role:$p.QUOTES},{set:["3b","204f","2a1f","2a3e","fe14","fe54","ff1b"],type:Jp.PUNCTUATION,role:$p.SEMICOLON},{set:["3f","203d","fe16","fe56","ff1f"],type:Jp.PUNCTUATION,role:$p.QUESTION},{set:["21","fe15","fe57","ff01"],type:Jp.PUNCTUATION,role:$p.EXCLAMATION},{set:["5e","60","a8","aa","b4","ba","2c7",["2d8","2da"],"2040","207a","207d","207e","ff3e","ff40"],type:Jp.PUNCTUATION,role:$p.OVERACCENT},{set:["b8","2db","2038","203f","2054","208a","208d","208e"],type:Jp.PUNCTUATION,role:$p.UNDERACCENT},{set:["3a","2982","fe13","fe30","fe55","ff1a"],type:Jp.PUNCTUATION,role:$p.COLON},{set:["2c","2063","fe50","ff0c"],type:Jp.PUNCTUATION,role:$p.COMMA},{set:["2026",["22ee","22f1"],"fe19"],type:Jp.PUNCTUATION,role:$p.ELLIPSIS},{set:["2e","fe52","ff0e"],type:Jp.PUNCTUATION,role:$p.FULLSTOP},{set:["2d","207b","208b","2212","2796","fe63","ff0d"],type:Jp.OPERATOR,role:$p.DASH,secondary:tm.BAR},{set:["5f","af",["2010","2015"],"203e","208b",["fe49","fe4f"],"fe58","ff3f","ffe3"],type:Jp.PUNCTUATION,role:$p.DASH,secondary:tm.BAR},{set:["7e","2dc","2f7","303","330","334","2053","223c","223d","301c","ff5e"],type:Jp.OPERATOR,role:$p.TILDE,secondary:tm.TILDE},{set:["27","2b9","2ba",["2032","2037"],"2057"],type:Jp.PUNCTUATION,role:$p.PRIME},{set:["b0"],type:Jp.PUNCTUATION,role:$p.DEGREE},{set:["2b","b1","2064","2213","2214","2228","222a",["228c","228e"],"2294","2295","229d","229e","22bb","22bd","22c4","22ce","22d3","2304","271b","271c","2795","27cf","29fa","29fb","29fe",["2a22","2a28"],"2a2d","2a2e","2a39","2a42","2a45","2a46","2a48","2a4a","2a4c","2a4f","2a50","2a52","2a54","2a56","2a57","2a59","2a5b","2a5d",["2a61","2a63"],"2adc","2add","fe62","ff0b"],type:Jp.OPERATOR,role:$p.ADDITION},{set:["2a","b7","d7","2020","2021","204e","2051","2062",["2217","2219"],"2227","2229","2240","2293","2297",["2299","229b"],"22a0","22a1","22b9","22bc",["22c5","22cc"],"22cf","22d2","22d4","2303","2305","2306","25cb","2715","2716","27ce","27d1",["29d1","29d7"],"29e2","2a1d",["2a2f","2a37"],["2a3b","2a3d"],"2a40","2a43","2a44","2a47","2a49","2a4b","2a4d","2a4e","2a51","2a53","2a55","2a58","2a5a","2a5c",["2a5e","2a60"],"2ada","2adb","fe61","ff0a"],type:Jp.OPERATOR,role:$p.MULTIPLICATION},{set:["2d","af","2010","2011","2052","207b","208b","2212","2216","2238","2242","2296","229f","2796","29ff",["2a29","2a2c"],"2a3a","2a41","fe63","ff0d"],type:Jp.OPERATOR,role:$p.SUBTRACTION},{set:["2f","f7","2044","2215","2298","2797","27cc","29bc",["29f5","29f9"],"2a38"],type:Jp.OPERATOR,role:$p.DIVISION},{set:["25","2030","2031","ff05","fe6a"],type:Jp.OPERATOR,role:$p.POSTFIXOP},{set:["ac","2200","2201","2203","2204","2206",["221a","221c"],"2310","ffe2"],type:Jp.OPERATOR,role:$p.PREFIXOP},{set:["2320","2321","23aa","23ae","23af","23b2","23b3","23b6","23b7"],type:Jp.OPERATOR,role:$p.PREFIXOP},{set:["1d7ca","1d7cb"],type:Jp.OPERATOR,role:$p.PREFIXOP,font:Qp.BOLD},{set:["3d","7e","207c","208c","221d","2237",["223a","223f"],"2243","2245","2248",["224a","224e"],["2251","225f"],"2261","2263","229c","22cd","22d5","29e4","29e6","2a66","2a67",["2a6a","2a6c"],["2a6c","2a78"],"fe66","ff1d"],type:Jp.RELATION,role:$p.EQUALITY},{set:["3c","3e","2241","2242","2244","2246","2247","2249","224f","2250","2260","2262",["2264","2281"],"22b0","22b1",["22d6","22e1"],["22e6","22e9"],["2976","2978"],"29c0","29c1","29e1","29e3","29e5",["2a79","2abc"],["2af7","2afa"],"fe64","fe65","ff1c","ff1e"],type:Jp.RELATION,role:$p.INEQUALITY},{set:[["2282","228b"],["228f","2292"],["22b2","22b8"],"22d0","22d1",["22e2","22e5"],["22ea","22ed"],"27c3","27c4",["27c7","27c9"],["27d5","27d7"],"27dc",["2979","297b"],"29df",["2abd","2ad8"]],type:Jp.RELATION,role:$p.SET},{set:["2236",["27e0","27e5"],"292b","292c",["29b5","29bb"],"29be","29bf",["29c2","29d0"]],type:Jp.RELATION,role:$p.UNKNOWN},{set:["2205",["29b0","29b4"]],type:Jp.IDENTIFIER,role:$p.SETEMPTY},{set:["1ab2","221e",["29dc","29de"]],type:Jp.IDENTIFIER,role:$p.INFTY},{set:["22a2","22a3",["22a6","22af"],"27da","27db","27dd","27de","2ade",["2ae2","2ae6"],"2aec","2aed"],type:Jp.RELATION,role:$p.LOGIC},{set:["22a4","22a5","22ba","27d8","27d9","27df","2adf","2ae0",["2ae7","2aeb"],"2af1"],type:Jp.IDENTIFIER,role:$p.LOGIC},{set:[["2190","21ff"],"2301","2324","238b","2794",["2798","27af"],["27b1","27be"],["27f0","27ff"],["2900","292a"],["292d","2975"],["297c","297f"],["2b00","2b11"],["2b30","2b4c"],["ffe9","ffec"]],type:Jp.RELATION,role:$p.ARROW},{set:["2208","220a",["22f2","22f9"],"22ff","27d2","2ad9"],type:Jp.OPERATOR,role:$p.ELEMENT},{set:["2209"],type:Jp.OPERATOR,role:$p.NONELEMENT},{set:["220b","220d",["22fa","22fe"]],type:Jp.OPERATOR,role:$p.REELEMENT},{set:["220c"],type:Jp.OPERATOR,role:$p.RENONELEMENT},{set:[["220f","2211"],["22c0","22c3"],["2a00","2a0b"],"2a3f","2afc","2aff"],type:Jp.LARGEOP,role:$p.SUM},{set:["2140"],type:Jp.LARGEOP,role:$p.SUM,font:Qp.DOUBLESTRUCK},{set:[["222b","2233"],["2a0c","2a17"],["2a17","2a1c"]],type:Jp.LARGEOP,role:$p.INTEGRAL},{set:[["2500","257F"]],type:Jp.RELATION,role:$p.BOX},{set:[["2580","259F"]],type:Jp.IDENTIFIER,role:$p.BLOCK},{set:[["25A0","25FF"],["2B12","2B2F"],["2B50","2B59"]],type:Jp.RELATION,role:$p.GEOMETRY},{set:["220e","2300","2302","2311","29bd","29e0",["29e8","29f3"],"2a1e","2afe","ffed","ffee"],type:Jp.OPERATOR,role:$p.GEOMETRY},{set:[["221f","2222"],"22be","22bf",["2312","2314"],"237c","27c0",["299b","29af"]],type:Jp.OPERATOR,role:$p.GEOMETRY},{set:["24",["a2","a5"],"b5","2123",["2125","2127"],"212a","212b","fe69","ff04","ffe0","ffe1","ffe5","ffe6"],type:Jp.IDENTIFIER,role:$p.UNKNOWN},{set:["a9","ae","210f","2114","2116","2117",["211e","2122"],"212e","2132",["2139","213b"],["2141","2144"],"214d","214e",["1f12a","1f12c"],"1f18a"],type:Jp.IDENTIFIER,role:$p.OTHERLETTER},{set:["2224","2226","2239","2307","27b0","27bf","27c1","27c2","27ca","27cb","27cd","27d0","27d3","27d4","2981","2999","299a","29e7","29f4","2a20","2a21","2a64","2a65","2a68","2a69","2ae1",["2aee","2af0"],"2af2","2af3","2af5","2af6","2afb","2afd"],type:Jp.OPERATOR,role:$p.UNKNOWN},{set:["2605","2606","26aa","26ab",["2720","274d"]],type:Jp.OPERATOR,role:$p.UNKNOWN},{set:[["2145","2149"]],type:Jp.IDENTIFIER,role:$p.LATINLETTER,font:Qp.DOUBLESTRUCKITALIC,secondary:tm.ALLLETTERS},{set:[["213c","213f"]],type:Jp.IDENTIFIER,role:$p.GREEKLETTER,font:Qp.DOUBLESTRUCK,secondary:tm.ALLLETTERS},{set:["3d0","3d7","3f6",["1d26","1d2a"],"1d5e","1d60",["1d66","1d6a"]],type:Jp.IDENTIFIER,role:$p.GREEKLETTER,font:Qp.NORMAL,secondary:tm.ALLLETTERS},{set:[["2135","2138"]],type:Jp.IDENTIFIER,role:$p.OTHERLETTER,font:Qp.NORMAL,secondary:tm.ALLLETTERS},{set:["131","237"],type:Jp.IDENTIFIER,role:$p.LATINLETTER,font:Qp.NORMAL},{set:["1d6a4","1d6a5"],type:Jp.IDENTIFIER,role:$p.LATINLETTER,font:Qp.ITALIC},{set:["2113","2118"],type:Jp.IDENTIFIER,role:$p.LATINLETTER,font:Qp.SCRIPT},{set:[["c0","d6"],["d8","f6"],["f8","1bf"],["1c4","2af"],["1d00","1d25"],["1d6b","1d9a"],["1e00","1ef9"],["363","36f"],["1dd3","1de6"],["1d62","1d65"],"1dca","2071","207f",["2090","209c"],"2c7c"],type:Jp.IDENTIFIER,role:$p.LATINLETTER,font:Qp.NORMAL},{set:[["00bc","00be"],["2150","215f"],"2189"],type:Jp.NUMBER,role:$p.FLOAT},{set:["23E8",["3248","324f"]],type:Jp.NUMBER,role:$p.INTEGER},{set:[["214A","214C"],"2705","2713","2714","2717","2718"],type:Jp.IDENTIFIER,role:$p.UNKNOWN},{set:["20","a0","ad",["2000","200f"],["2028","202f"],["205f","2060"],"206a","206b","206e","206f","feff",["fff9","fffb"]],type:Jp.TEXT,role:$p.SPACE},{set:["7c","a6","2223","23b8","23b9","23d0","2758",["fe31","fe34"],"ff5c","ffe4","ffe8"],type:Jp.FENCE,role:$p.NEUTRAL},{set:["2016","2225","2980","2af4"],type:Jp.FENCE,role:$p.METRIC}].forEach((t=>{var{set:e}=t,s=em(t,["set"]);return om(function(t){let e=[];for(const s of t)Array.isArray(s)?e=e.concat(Wp(s)):e.push(String.fromCodePoint(parseInt(s,16)));return e}(e),s)})),am(nm.FencesVert,["23b4",["23dc","23e1"],["fe35","fe44"],"fe47"]),am(nm.FencesHoriz,["28","2045","207D","208D",["2308","230f"],["231c","231f"],"2329","23b0",["2768","2775"],"27c5",["27e6","27ef"],["2983","2998"],["29d8","29db"],"29fc",["2e22","2e29"],["3008","3011"],["3014","301b"],"fd3e","fe17",["fe59","fe5e"],"ff08","ff5f","ff62"]),am(nm.FencesHoriz,["5b","7b","ff3b","ff5b"],2),am(nm.FencesHoriz,[["239b","23a6"]],3),am(nm.FencesHoriz,[["23a7","23a9"]],4),om([...nm.FencesHoriz.keys()],{type:Jp.FENCE,role:$p.OPEN}),om([...nm.FencesHoriz.values()],{type:Jp.FENCE,role:$p.CLOSE}),om([...nm.FencesVert.keys()],{type:Jp.FENCE,role:$p.TOP}),om([...nm.FencesVert.values()],{type:Jp.FENCE,role:$p.BOTTOM}),function(){for(const[t,e]of Object.entries(Qp)){const s=!!jp[t]?Qp.UNKNOWN:e===Qp.FULLWIDTH?Qp.NORMAL:e;lm(Up.LATINCAP,Jp.IDENTIFIER,$p.LATINLETTER,e,s,[tm.ALLLETTERS]),lm(Up.LATINSMALL,Jp.IDENTIFIER,$p.LATINLETTER,e,s,[tm.ALLLETTERS],{},{3:tm.D}),lm(Up.GREEKCAP,Jp.IDENTIFIER,$p.GREEKLETTER,e,s,[tm.ALLLETTERS]),lm(Up.GREEKSMALL,Jp.IDENTIFIER,$p.GREEKLETTER,e,s,[tm.ALLLETTERS],{0:{type:Jp.OPERATOR,role:$p.PREFIXOP,font:s},26:{type:Jp.OPERATOR,role:$p.PREFIXOP,font:s}}),lm(Up.DIGIT,Jp.NUMBER,$p.INTEGER,e,s)}}(),om(["inf","lim","liminf","limsup","max","min","sup","injlim","projlim"],{type:Jp.FUNCTION,role:$p.LIMFUNC}),om(cm,{type:Jp.FUNCTION,role:$p.PREFIXFUNC}),om(["mod","rem"],{type:Jp.OPERATOR,role:$p.PREFIXFUNC});const hm=[];function dm(t,e){for(let s,i=0;s=hm[i];i++){const i=s.compare(t,e);if(0!==i)return i}return 0}function um(t){if(t.length<=1)return t;const e=t.slice();!function(t){t.sort(dm)}(e);const s=[];let i;do{i=e.pop(),s.push(i)}while(i&&e.length&&0===dm(e[e.length-1],i));return s}function pm(t,e){return t.match(/^.+:.+$/)||!e?t:t+":"+e}new class{constructor(t,e=null){this.comparator=t,this.type=e,function(t){hm.push(t)}(this)}compare(t,e){return this.type&&this.type===t.type&&this.type===e.type?this.comparator(t,e):0}}((function(t,e){return t.role===$p.SIMPLEFUNC?1:e.role===$p.SIMPLEFUNC?-1:0}),Jp.IDENTIFIER);class mm extends Map{set(t,e){return super.set(pm(t,e.font),e),this}setNode(t){this.set(t.textContent,t.meaning())}get(t,e=null){return super.get(pm(t,e))}getNode(t){return this.get(t.textContent,t.font)}}class fm extends Map{add(t,e){const s=this.get(t);s?s.push(e):super.set(t,[e])}get(t,e=null){return super.get(pm(t,e))}getNode(t){return this.get(t.textContent,t.font)}minimize(){for(const[t,e]of this)1===e.length&&this.delete(t)}isMultiValued(){for(const t of this.values())if(t.length>1)return!0;return!1}}class gm extends fm{add(t,e){super.add(pm(t,e.font),e)}addNode(t){this.add(t.textContent,t)}toString(){const t=[];for(const[e,s]of this){const i=Array(e.length+3).join(" "),r=s.map((t=>t.toString())).join("\n"+i);t.push(e+": "+r)}return t.join("\n")}collateMeaning(){const t=new bm;for(const[e,s]of this)t.set(e,s.map((t=>t.meaning())));return t}}class bm extends fm{add(t,e){const s=this.get(t,e.font);s&&s.find((function(t){return i=e,(s=t).type===i.type&&s.role===i.role&&s.font===i.font;var s,i}))||super.add(pm(t,e.font),e)}addNode(t){this.add(t.textContent,t.meaning())}toString(){const t=[];for(const[e,s]of this){const i=Array(e.length+3).join(" "),r=s.map((t=>`{type: ${t.type}, role: ${t.role}, font: ${t.font}}`)).join("\n"+i);t.push(e+": "+r)}return t.join("\n")}reduce(){for(const[t,e]of this)1!==e.length&&this.set(t,um(e))}default(){const t=new mm;for(const[e,s]of this)1===s.length&&t.set(e,s[0]);return t}newDefault(){const t=this.default();this.reduce();const e=this.default();return t.size!==e.size?e:null}}var Em;!function(t){t.ANNOTATION="ANNOTATION",t.ANNOTATIONXML="ANNOTATION-XML",t.MACTION="MACTION",t.MALIGNGROUP="MALIGNGROUP",t.MALIGNMARK="MALIGNMARK",t.MATH="MATH",t.MENCLOSE="MENCLOSE",t.MERROR="MERROR",t.MFENCED="MFENCED",t.MFRAC="MFRAC",t.MGLYPH="MGLYPH",t.MI="MI",t.MLABELEDTR="MLABELEDTR",t.MMULTISCRIPTS="MMULTISCRIPTS",t.MN="MN",t.MO="MO",t.MOVER="MOVER",t.MPADDED="MPADDED",t.MPHANTOM="MPHANTOM",t.MPRESCRIPTS="MPRESCRIPTS",t.MROOT="MROOT",t.MROW="MROW",t.MS="MS",t.MSPACE="MSPACE",t.MSQRT="MSQRT",t.MSTYLE="MSTYLE",t.MSUB="MSUB",t.MSUBSUP="MSUBSUP",t.MSUP="MSUP",t.MTABLE="MTABLE",t.MTD="MTD",t.MTEXT="MTEXT",t.MTR="MTR",t.MUNDER="MUNDER",t.MUNDEROVER="MUNDEROVER",t.NONE="NONE",t.SEMANTICS="SEMANTICS"}(Em||(Em={}));const Nm=Object.values(Em),ym=[Em.MO,Em.MI,Em.MN,Em.MTEXT,Em.MS,Em.MSPACE],xm=[Em.MERROR,Em.MPHANTOM,Em.MALIGNGROUP,Em.MALIGNMARK,Em.MPRESCRIPTS,Em.ANNOTATION,Em.ANNOTATIONXML],vm=[Em.MATH,Em.MROW,Em.MPADDED,Em.MACTION,Em.NONE,Em.MSTYLE,Em.SEMANTICS],Cm=[Em.MROOT,Em.MSQRT],Tm=["aria-label","exact-speech","alt"];function wm(t){return!!t&&Mp(t)===Em.MATH}function _m(t){return!!t&&(xm.includes(Mp(t))||!Nm.includes(Mp(t)))}function km(t){return!!t&&vm.includes(Mp(t))}function Am(t){return!!t&&Mp(t)===Em.MGLYPH&&!function(t){return!!t&&ym.includes(Mp(t))}(t.parentNode)}function Lm(t){const e=[];for(let s,i=0;s=t[i];i++){if(s.nodeType!==wp.ELEMENT_NODE)continue;const t=Mp(s);xm.includes(t)||(vm.includes(t)&&0===s.childNodes.length||e.push(s))}return e}function Mm(t,e){var s;if(null===(s=e.attributes)||void 0===s?void 0:s.length){const s=e.attributes;for(let e=s.length-1;e>=0;e--){const i=s[e].name;i.match(/^ext/)&&(t.attributes[i]=s[e].value,t.nobreaking=!0),Tm.includes(i)&&(t.attributes["ext-speech"]=s[e].value,t.nobreaking=!0),i.match(/texclass$/)&&(t.attributes.texclass=s[e].value),"data-latex"===i.toLowerCase()&&(t.attributes.latex=s[e].value),"href"===i&&(t.attributes.href=s[e].value,t.nobreaking=!0)}}}function Im(t){return t&&t.embellished&&t.childNodes.length>0?Im(t.childNodes[0]):t}function Sm(t,e,s){s&&t.reverse();const i=[];for(let r,n=0;r=t[n];n++){if(e(r))return s?{head:t.slice(n+1).reverse(),div:r,tail:i.reverse()}:{head:i,div:r,tail:t.slice(n+1)};i.push(r)}return s?{head:[],div:null,tail:i.reverse()}:{head:i,div:null,tail:[]}}function Rm(t,e){let s=t;const i=[],r=[];let n=null;do{n=Sm(s,e),r.push(n.head),i.push(n.div),s=n.tail}while(n.div);return i.pop(),{rel:i,comp:r}}var Om;!function(t){t.EMBELLISHED="embellished",t.FENCEPOINTER="fencepointer",t.FONT="font",t.ID="id",t.ANNOTATION="annotation",t.ROLE="role",t.TYPE="type",t.CHILDREN="children",t.CONTENT="content",t.TEXT="$t"}(Om||(Om={}));class Dm{static fromXml(t){const e=parseInt(t.getAttribute("id"),10),s=new Dm(e);return s.type=t.tagName,Dm.setAttribute(s,t,"role"),Dm.setAttribute(s,t,"font"),Dm.setAttribute(s,t,"embellished"),Dm.setAttribute(s,t,"fencepointer","fencePointer"),t.getAttribute("annotation")&&s.parseAnnotation(t.getAttribute("annotation")),Mm(s,t),Dm.processChildren(s,t),s}static setAttribute(t,e,s,i){i=i||s;const r=e.getAttribute(s);r&&(t[i]=r)}static processChildren(t,e){for(const s of Cp(e.childNodes)){if(s.nodeType===wp.TEXT_NODE){t.textContent=s.textContent;continue}const e=Cp(s.childNodes).map(Dm.fromXml);e.forEach((e=>e.parent=t)),"CONTENT"===Mp(s)?t.contentNodes=e:t.childNodes=e}}constructor(t){this.id=t,this.mathml=[],this.parent=null,this.type=Jp.UNKNOWN,this.role=$p.UNKNOWN,this.font=Qp.UNKNOWN,this.embellished=null,this.fencePointer="",this.childNodes=[],this.textContent="",this.mathmlTree=null,this.contentNodes=[],this.annotation={},this.attributes={},this.nobreaking=!1}querySelectorAll(t){let e=[];for(let s,i=0;s=this.childNodes[i];i++)e=e.concat(s.querySelectorAll(t));for(let s,i=0;s=this.contentNodes[i];i++)e=e.concat(s.querySelectorAll(t));return t(this)&&e.unshift(this),e}xml(t,e){const s=function(s,i){const r=i.map((function(s){return s.xml(t,e)})),n=t.createElementNS("",s);for(let t,e=0;t=r[e];e++)n.appendChild(t);return n},i=t.createElementNS("",this.type);return e||this.xmlAttributes(i),i.textContent=this.textContent,this.contentNodes.length>0&&i.appendChild(s(Om.CONTENT,this.contentNodes)),this.childNodes.length>0&&i.appendChild(s(Om.CHILDREN,this.childNodes)),i}toString(t=!1){const e=Tp("<snode/>");return Ip(this.xml(e.ownerDocument,t))}allAttributes(){const t=[];return t.push([Om.ROLE,this.role]),this.font!==Qp.UNKNOWN&&t.push([Om.FONT,this.font]),Object.keys(this.annotation).length&&t.push([Om.ANNOTATION,this.annotationXml()]),this.embellished&&t.push([Om.EMBELLISHED,this.embellished]),this.fencePointer&&t.push([Om.FENCEPOINTER,this.fencePointer]),t.push([Om.ID,this.id.toString()]),t}annotationXml(){const t=[];for(const[e,s]of Object.entries(this.annotation))s.forEach((s=>t.push(e+":"+s)));return t.join(";")}attributesXml(){const t=[];for(const[e,s]of Object.entries(this.attributes))t.push(e+":"+Dm.escapeValue(s));return t.join(";")}toJson(){const t={};t[Om.TYPE]=this.type;const e=this.allAttributes();for(let s,i=0;s=e[i];i++)t[s[0]]=s[1].toString();return this.textContent&&(t[Om.TEXT]=this.textContent),this.childNodes.length&&(t[Om.CHILDREN]=this.childNodes.map((function(t){return t.toJson()}))),this.contentNodes.length&&(t[Om.CONTENT]=this.contentNodes.map((function(t){return t.toJson()}))),t}updateContent(t,e){const s=e?t.replace(/^[ \f\n\r\t\v\u200b]*/,"").replace(/[ \f\n\r\t\v\u200b]*$/,""):t.trim();if(t=t&&!s?t:s,this.textContent===t)return;const i=nm.Meaning.get(t.replace(/\s/g," "));this.textContent=t,this.role=i.role,this.type=i.type,this.font=i.font}addMathmlNodes(t){for(let e,s=0;e=t[s];s++)-1===this.mathml.indexOf(e)&&this.mathml.push(e)}appendChild(t){this.childNodes.push(t),this.addMathmlNodes(t.mathml),t.parent=this}replaceChild(t,e){const s=this.childNodes.indexOf(t);if(-1===s)return;t.parent=null,e.parent=this,this.childNodes[s]=e;const i=t.mathml.filter((function(t){return-1===e.mathml.indexOf(t)})),r=e.mathml.filter((function(e){return-1===t.mathml.indexOf(e)}));this.removeMathmlNodes(i),this.addMathmlNodes(r)}appendContentNode(t){t&&(this.contentNodes.push(t),this.addMathmlNodes(t.mathml),t.parent=this)}removeContentNode(t){if(t){const e=this.contentNodes.indexOf(t);-1!==e&&this.contentNodes.slice(e,1)}}equals(t){if(!t)return!1;if(this.type!==t.type||this.role!==t.role||this.textContent!==t.textContent||this.childNodes.length!==t.childNodes.length||this.contentNodes.length!==t.contentNodes.length)return!1;for(let e,s,i=0;e=this.childNodes[i],s=t.childNodes[i];i++)if(!e.equals(s))return!1;for(let e,s,i=0;e=this.contentNodes[i],s=t.contentNodes[i];i++)if(!e.equals(s))return!1;return!0}displayTree(){console.info(this.displayTree_(0))}addAnnotation(t,e){e&&this.addAnnotation_(t,e)}getAnnotation(t){const e=this.annotation[t];return e||[]}hasAnnotation(t,e){const s=this.annotation[t];return!!s&&-1!==s.indexOf(e)}parseAnnotation(t){const e=t.split(";");for(let t=0,s=e.length;t<s;t++){const s=e[t].split(":");this.addAnnotation(s[0],s[1])}}meaning(){return{type:this.type,role:this.role,font:this.font}}xmlAttributes(t){const e=this.allAttributes();for(let s,i=0;s=e[i];i++)t.setAttribute(s[0],s[1]);this.addExternalAttributes(t)}addExternalAttributes(t){for(const[e,s]of Object.entries(this.attributes))t.setAttribute(e,s)}static escapeValue(t){return t.replace(/;/g,"\\0003B")}parseAttributes(t){if(!t)return;const e=t.split(";");for(let t=0,s=e.length;t<s;t++){const[s,...i]=e[t].split(":");s&&(this.attributes[s]=i.join("").replace(/\\0003B/g,";"))}}removeMathmlNodes(t){const e=this.mathml;for(let s,i=0;s=t[i];i++){const t=e.indexOf(s);-1!==t&&e.splice(t,1)}this.mathml=e}displayTree_(t){t++;const e=Array(t).join(" ");let s="";s+="\n"+e+this.toString(),s+="\n"+e+"MathmlTree:",s+="\n"+e+this.mathmlTreeString(),s+="\n"+e+"MathML:";for(let t,i=0;t=this.mathml[i];i++)s+="\n"+e+t.toString();return s+="\n"+e+"Begin Content",this.contentNodes.forEach((function(e){s+=e.displayTree_(t)})),s+="\n"+e+"End Content",s+="\n"+e+"Begin Children",this.childNodes.forEach((function(e){s+=e.displayTree_(t)})),s+="\n"+e+"End Children",s}mathmlTreeString(){return this.mathmlTree?this.mathmlTree.toString():"EMPTY"}addAnnotation_(t,e){const s=this.annotation[t];s&&!s.includes(e)?s.push(e):this.annotation[t]=[e]}}class Pm{constructor(){this.leafMap=new gm,this.defaultMap=new mm,this.idCounter_=-1}makeNode(t){return this.createNode_(t)}makeUnprocessed(t){const e=this.createNode_();return e.mathml=[t],e.mathmlTree=t,e}makeEmptyNode(){const t=this.createNode_();return t.type=Jp.EMPTY,t}makeContentNode(t){const e=this.createNode_();return e.updateContent(t),e}makeMultipleContentNodes(t,e){const s=[];for(let i=0;i<t;i++)s.push(this.makeContentNode(e));return s}makeLeafNode(t,e){if(!t)return this.makeEmptyNode();const s=this.makeContentNode(t);s.font=e||s.font;const i=this.defaultMap.getNode(s);return i&&(s.type=i.type,s.role=i.role,s.font=i.font),this.leafMap.addNode(s),s}makeBranchNode(t,e,s,i){const r=this.createNode_();return i&&r.updateContent(i),r.type=t,r.childNodes=e,r.contentNodes=s,e.concat(s).forEach((function(t){t.parent=r,r.addMathmlNodes(t.mathml)})),r}createNode_(t){return void 0!==t?this.idCounter_=Math.max(this.idCounter_,t):t=++this.idCounter_,new Dm(t)}}class Bm{constructor(t){this.type=t,this.factory_=new Pm}getFactory(){return this.factory_}setFactory(t){this.factory_=t}getType(){return this.type}parseList(t){const e=[];for(let s,i=0;s=t[i];i++)e.push(this.parse(s));return e}}function Fm(t,e){return t.type===e}function jm(t,e){return t.embellished===e}function Um(t,e){return t.role===e}function qm(t){return Fm(t,Jp.FENCE)||Fm(t,Jp.PUNCTUATION)||Fm(t,Jp.OPERATOR)||Fm(t,Jp.RELATION)}function Hm(t){return Jm(t)&&!Um(t,$p.DIVISION)||Fm(t,Jp.APPL)||Vm(t)}function Wm(t){return Jm(t)||Vm(t)}function zm(t,e){return!!e&&Fm(e,Jp.IDENTIFIER)&&nm.Secondary.has(t.textContent,tm.D)}function Xm(t){if(Fm(t,Jp.IDENTIFIER)){const e=t.textContent[0];return e&&t.textContent[1]&&nm.Secondary.has(e,tm.D)}return!1}function Vm(t){return Km(t)||$m(t)}function Gm(t){return t.embellished?t.embellished:(e=t.type)===Jp.OPERATOR||e===Jp.RELATION||e===Jp.FENCE||e===Jp.PUNCTUATION?t.type:null;var e}function Jm(t){return Fm(t,Jp.OPERATOR)||jm(t,Jp.OPERATOR)}function Km(t){return Fm(t,Jp.RELATION)||jm(t,Jp.RELATION)}function $m(t){return Fm(t,Jp.PUNCTUATION)||jm(t,Jp.PUNCTUATION)}function Ym(t){return Fm(t,Jp.FENCE)||jm(t,Jp.FENCE)}function Qm(t){return!(!t||!Ym(t))&&(!t.embellished||Zm(t))}function Zm(t){return!t.embellished||!function(t){return Fm(t,Jp.TENSOR)&&(!Fm(t.childNodes[1],Jp.EMPTY)||!Fm(t.childNodes[2],Jp.EMPTY))&&(!Fm(t.childNodes[3],Jp.EMPTY)||!Fm(t.childNodes[4],Jp.EMPTY))}(t)&&((!Um(t,$p.CLOSE)||!Fm(t,Jp.TENSOR))&&((!Um(t,$p.OPEN)||!Fm(t,Jp.SUBSCRIPT)&&!Fm(t,Jp.SUPERSCRIPT))&&Zm(t.childNodes[0])))}function tf(t){return!!t&&(Fm(t,Jp.TABLE)||Fm(t,Jp.MULTILINE))}function ef(t){return!!t&&sf(t)&&tf(t.childNodes[0])}function sf(t){return!!t&&Fm(t,Jp.FENCED)&&(Um(t,$p.LEFTRIGHT)||bf(t))&&1===t.childNodes.length}function rf(t,e){return e.length>0&&Um(e[e.length-1],$p.OPENFENCE)}function nf(t){return t.childNodes.every((function(t){return t.childNodes.length<=1}))}function of(t){return Fm(t,Jp.LARGEOP)||Fm(t,Jp.LIMBOTH)||Fm(t,Jp.LIMLOWER)||Fm(t,Jp.LIMUPPER)||Fm(t,Jp.FUNCTION)&&Um(t,$p.LIMFUNC)||(Fm(t,Jp.OVERSCORE)||Fm(t,Jp.UNDERSCORE))&&of(t.childNodes[0])}function af(t,e,s){return 1===e.length&&(t[s].type===Jp.PUNCTUATION||t[s].embellished===Jp.PUNCTUATION)&&t[s]===e[0]}function cf(t){return Fm(t,Jp.IDENTIFIER)&&Um(t,$p.SIMPLEFUNC)}const lf=[Jp.PUNCTUATION,Jp.PUNCTUATED,Jp.RELSEQ,Jp.MULTIREL,Jp.TABLE,Jp.MULTILINE,Jp.CASES,Jp.INFERENCE],hf=[Jp.LIMUPPER,Jp.LIMLOWER,Jp.LIMBOTH,Jp.SUBSCRIPT,Jp.SUPERSCRIPT,Jp.UNDERSCORE,Jp.OVERSCORE,Jp.TENSOR];function df(t){const e=t.type;return-1===lf.indexOf(e)&&(e!==Jp.INFIXOP||t.role===$p.IMPLICIT)&&(e===Jp.FENCED?t.role!==$p.LEFTRIGHT||df(t.childNodes[0]):-1===hf.indexOf(e)||df(t.childNodes[0]))}function uf(t){return function(t){return t.type===Jp.NUMBER&&(t.role===$p.INTEGER||t.role===$p.FLOAT)}(t)||t.role===$p.VULGAR||t.role===$p.MIXED}function pf(t){const e=t.childNodes;return t.role===$p.UNIT&&(!e.length||e[0].role===$p.UNIT)}function mf(t){const e=t.childNodes;return t.type===Jp.INFIXOP&&(t.role===$p.MULTIPLICATION||t.role===$p.IMPLICIT)&&e.length&&(pf(e[0])||uf(e[0]))&&t.childNodes.slice(1).every(pf)}function ff(t){return t.type===Jp.INFIXOP&&(t.role===$p.IMPLICIT||t.role===$p.UNIT&&!!t.contentNodes.length&&t.contentNodes[0].textContent===sm.invisibleTimes)}function gf(t){return t.type===Jp.INFIXOP&&t.role===$p.IMPLICIT}function bf(t){return t.role===$p.NEUTRAL||t.role===$p.METRIC}function Ef(t,e){return bf(t)&&bf(e)&&Im(t).textContent===Im(e).textContent}function Nf(t){return!!bf(t)&&(!t.embellished||t.type!==Jp.SUPERSCRIPT&&t.type!==Jp.SUBSCRIPT&&(t.type!==Jp.TENSOR||t.childNodes[3].type===Jp.EMPTY&&t.childNodes[4].type===Jp.EMPTY))}function yf(t){return!!bf(t)&&(!t.embellished||(t.type!==Jp.TENSOR||t.childNodes[1].type===Jp.EMPTY&&t.childNodes[2].type===Jp.EMPTY))}function xf(t){return[$p.ELEMENT,$p.NONELEMENT,$p.REELEMENT,$p.RENONELEMENT].includes(t.role)}const vf={factory:null,options:new up,updateFactory:function(t){vf.factory=t},heuristics:new Map,flags:{combine_juxtaposition:!0,convert_juxtaposition:!0,multioperator:!0},blacklist:{},add:function(t){const e=t.name;vf.heuristics.set(e,t),vf.flags[e]||(vf.flags[e]=!1)},run:function(t,e,s){const i=vf.heuristics.get(t);return i&&!vf.blacklist[t]&&(vf.flags[t]||i.applicable(e))?i.apply(e):s?s(e):e}};class Cf{static getInstance(){return Cf.instance=Cf.instance||new Cf,Cf.instance}static tableToMultiline(t){if(!nf(t))return vf.run("rewrite_subcases",t,Cf.classifyTable);t.type=Jp.MULTILINE;for(let e,s=0;e=t.childNodes[s];s++)Cf.rowToLine_(e,$p.MULTILINE);var e;return 1!==t.childNodes.length||Fm(e=t.childNodes[0],Jp.LINE)&&e.contentNodes.length&&Um(e.contentNodes[0],$p.LABEL)||!sf(t.childNodes[0].childNodes[0])||Cf.tableToMatrixOrVector_(Cf.rewriteFencedLine_(t)),Cf.binomialForm_(t),Cf.classifyMultiline(t),t}static number(t){t.type!==Jp.UNKNOWN&&t.type!==Jp.IDENTIFIER||(t.type=Jp.NUMBER),Cf.meaningFromContent(t,Cf.numberRole_),Cf.exprFont_(t)}static classifyMultiline(t){let e=0;const s=t.childNodes.length;let i;for(;e<s&&(!(i=t.childNodes[e])||!i.childNodes.length);)e++;if(e>=s)return;const r=i.childNodes[0].role;r!==$p.UNKNOWN&&t.childNodes.every((function(t){const e=t.childNodes[0];return!e||e.role===r&&(Fm(e,Jp.RELATION)||Fm(e,Jp.RELSEQ))}))&&(t.role=r)}static classifyTable(t){const e=Cf.computeColumns_(t);return Cf.classifyByColumns_(t,e,$p.EQUALITY)||Cf.classifyByColumns_(t,e,$p.INEQUALITY,[$p.EQUALITY])||Cf.classifyByColumns_(t,e,$p.ARROW)||Cf.detectCaleyTable(t),t}static detectCaleyTable(t){if(!t.mathmlTree)return!1;const e=t.mathmlTree,s=e.getAttribute("columnlines"),i=e.getAttribute("rowlines");return!(!s||!i)&&(!(!Cf.cayleySpacing(s)||!Cf.cayleySpacing(i))&&(t.role=$p.CAYLEY,!0))}static cayleySpacing(t){const e=t.split(" ");return("solid"===e[0]||"dashed"===e[0])&&e.slice(1).every((t=>"none"===t))}static proof(t,e,s){const i=Cf.separateSemantics(e);return Cf.getInstance().proof(t,i,s)}static findSemantics(t,e,s){const i=null==s?null:s,r=Cf.getSemantics(t);return!!r&&(!!r[e]&&(null==i||r[e]===i))}static getSemantics(t){const e=t.getAttribute("semantics");return e?Cf.separateSemantics(e):null}static removePrefix(t){const[,...e]=t.split("_");return e.join("_")}static separateSemantics(t){const e={};return t.split(";").forEach((function(t){const[s,i]=t.split(":");e[Cf.removePrefix(s)]=i})),e}static matchSpaces_(t,e){for(let s,i=0;s=e[i];i++){const e=t[i].mathmlTree,r=t[i+1].mathmlTree;if(!e||!r)continue;const n=e.nextSibling;if(!n||n===r)continue;const o=Cf.getSpacer_(n);o&&(s.mathml.push(o),s.mathmlTree=o,s.role=$p.SPACE)}}static getSpacer_(t){if(Mp(t)===Em.MSPACE)return t;for(;km(t)&&1===t.childNodes.length;)if(Mp(t=t.childNodes[0])===Em.MSPACE)return t;return null}static fenceToPunct_(t){const e=Cf.FENCE_TO_PUNCT_[t.role];if(e){for(;t.embellished;)t.embellished=Jp.PUNCTUATION,Um(t,$p.SUBSUP)||Um(t,$p.UNDEROVER)||(t.role=e),t=t.childNodes[0];t.type=Jp.PUNCTUATION,t.role=e}}static classifyFunction_(t,e){if(t.type===Jp.APPL||t.type===Jp.BIGOP||t.type===Jp.INTEGRAL)return"";if(e[0]&&e[0].textContent===sm.functionApplication){Cf.getInstance().funcAppls[t.id]=e.shift();let s=$p.SIMPLEFUNC;return vf.run("simple2prefix",t),t.role!==$p.PREFIXFUNC&&t.role!==$p.LIMFUNC||(s=t.role),Cf.propagateFunctionRole_(t,s),"prefix"}const s=Cf.CLASSIFY_FUNCTION_[t.role];return s||((i=t).type===Jp.IDENTIFIER||i.role===$p.LATINLETTER||i.role===$p.GREEKLETTER||i.role===$p.OTHERLETTER?"simple":"");var i}static propagateFunctionRole_(t,e){if(t){if(t.type===Jp.INFIXOP)return;Um(t,$p.SUBSUP)||Um(t,$p.UNDEROVER)||(t.role=e),Cf.propagateFunctionRole_(t.childNodes[0],e)}}static getFunctionOp_(t,e){if(e(t))return t;for(let s,i=0;s=t.childNodes[i];i++){const t=Cf.getFunctionOp_(s,e);if(t)return t}return null}static tableToMatrixOrVector_(t){const e=t.childNodes[0];Fm(e,Jp.MULTILINE)?Cf.tableToVector_(t):Cf.tableToMatrix_(t),t.contentNodes.forEach(e.appendContentNode.bind(e));for(let t,s=0;t=e.childNodes[s];s++)Cf.assignRoleToRow_(t,Cf.getComponentRoles_(e));return e.parent=null,e}static tableToVector_(t){const e=t.childNodes[0];e.type=Jp.VECTOR,1!==e.childNodes.length?Cf.binomialForm_(e):Cf.tableToSquare_(t)}static binomialForm_(t){Um(t,$p.UNKNOWN)&&(2===t.childNodes.length&&(t.role=$p.BINOMIAL,t.childNodes[0].role=$p.BINOMIAL,t.childNodes[1].role=$p.BINOMIAL))}static tableToMatrix_(t){const e=t.childNodes[0];e.type=Jp.MATRIX,e.childNodes&&e.childNodes.length>0&&e.childNodes[0].childNodes&&e.childNodes.length===e.childNodes[0].childNodes.length?Cf.tableToSquare_(t):e.childNodes&&1===e.childNodes.length&&(e.role=$p.ROWVECTOR)}static tableToSquare_(t){const e=t.childNodes[0];Um(e,$p.UNKNOWN)&&(bf(t)?e.role=$p.DETERMINANT:e.role=$p.SQUAREMATRIX)}static getComponentRoles_(t){const e=t.role;return e&&e!==$p.UNKNOWN?e:t.type.toLowerCase()||$p.UNKNOWN}static tableToCases_(t,e){for(let e,s=0;e=t.childNodes[s];s++)Cf.assignRoleToRow_(e,$p.CASES);return t.type=Jp.CASES,t.appendContentNode(e),nf(t)&&Cf.binomialForm_(t),t}static rewriteFencedLine_(t){const e=t.childNodes[0],s=t.childNodes[0].childNodes[0],i=t.childNodes[0].childNodes[0].childNodes[0];return s.parent=t.parent,t.parent=s,i.parent=e,s.childNodes=[t],e.childNodes=[i],s}static rowToLine_(t,e){const s=e||$p.UNKNOWN;Fm(t,Jp.ROW)&&(t.type=Jp.LINE,t.role=s,1===t.childNodes.length&&Fm(t.childNodes[0],Jp.CELL)&&(t.childNodes=t.childNodes[0].childNodes,t.childNodes.forEach((function(e){e.parent=t}))))}static assignRoleToRow_(t,e){Fm(t,Jp.LINE)?t.role=e:Fm(t,Jp.ROW)&&(t.role=e,t.childNodes.forEach((function(t){Fm(t,Jp.CELL)&&(t.role=e)})))}static nextSeparatorFunction_(t){let e;if(t){if(t.match(/^\s+$/))return null;e=t.replace(/\s/g,"").split("").filter((function(t){return t}))}else e=[","];return function(){return e.length>1?e.shift():e[0]}}static meaningFromContent(t,e){const s=[...t.textContent].filter((t=>t.match(/[^\s]/))),i=s.map((t=>nm.Meaning.get(t)));e(t,s,i)}static numberRole_(t,e,s){if(t.role===$p.UNKNOWN)return s.every((function(t){return t.type===Jp.NUMBER&&t.role===$p.INTEGER||t.type===Jp.PUNCTUATION&&t.role===$p.COMMA}))?(t.role=$p.INTEGER,void("0"===e[0]&&t.addAnnotation("general","basenumber"))):void(s.every((function(t){return t.type===Jp.NUMBER&&t.role===$p.INTEGER||t.type===Jp.PUNCTUATION}))?t.role=$p.FLOAT:t.role=$p.OTHERNUMBER)}static exprFont_(t){t.font===Qp.UNKNOWN&&Cf.compSemantics(t,"font",Qp)}static compSemantics(t,e,s){const i=[...t.textContent].map((t=>nm.Meaning.get(t))).reduce((function(t,i){return t&&i[e]&&i[e]!==s.UNKNOWN&&i[e]!==t?t===s.UNKNOWN?i[e]:null:t}),s.UNKNOWN);i&&(t[e]=i)}static purgeFences_(t){const e=t.rel,s=t.comp,i=[],r=[];for(;e.length>0;){const t=e.shift();let n=s.shift();Qm(t)?(i.push(t),r.push(n)):(Cf.fenceToPunct_(t),n.push(t),n=n.concat(s.shift()),s.unshift(n))}return r.push(s.shift()),{rel:i,comp:r}}static rewriteFencedNode_(t){const e=t.contentNodes[0],s=t.contentNodes[1];let i=Cf.rewriteFence_(t,e);return t.contentNodes[0]=i.fence,i=Cf.rewriteFence_(i.node,s),t.contentNodes[1]=i.fence,t.contentNodes[0].parent=t,t.contentNodes[1].parent=t,i.node.parent=null,i.node}static rewriteFence_(t,e){if(!e.embellished)return{node:t,fence:e};const s=e.childNodes[0],i=Cf.rewriteFence_(t,s);return Fm(e,Jp.SUPERSCRIPT)||Fm(e,Jp.SUBSCRIPT)||Fm(e,Jp.TENSOR)?(Um(e,$p.SUBSUP)||(e.role=t.role),s!==i.node&&(e.replaceChild(s,i.node),s.parent=t),Cf.propagateFencePointer_(e,s),{node:e,fence:i.fence}):(e.replaceChild(s,i.fence),e.mathmlTree&&-1===e.mathml.indexOf(e.mathmlTree)&&e.mathml.push(e.mathmlTree),{node:i.node,fence:e})}static propagateFencePointer_(t,e){t.fencePointer=e.fencePointer||e.id.toString(),t.embellished=null}static classifyByColumns_(t,e,s,i=[]){const r=[s].concat(i);return!!(3===e.length&&Cf.testColumns_(e,1,(t=>Cf.isPureRelation_(t,r)))||2===e.length&&(Cf.testColumns_(e,1,(t=>Cf.isEndRelation_(t,r)||Cf.isPureRelation_(t,r)))||Cf.testColumns_(e,0,(t=>Cf.isEndRelation_(t,r,!0)||Cf.isPureRelation_(t,r)))))&&(t.role=s,!0)}static isEndRelation_(t,e,s){const i=s?t.childNodes.length-1:0;return Fm(t,Jp.RELSEQ)&&e.some((e=>Um(t,e)))&&Fm(t.childNodes[i],Jp.EMPTY)}static isPureRelation_(t,e){return Fm(t,Jp.RELATION)&&e.some((e=>Um(t,e)))}static computeColumns_(t){const e=[];for(let s,i=0;s=t.childNodes[i];i++)for(let t,i=0;t=s.childNodes[i];i++){e[i]?e[i].push(t):e[i]=[t]}return e}static testColumns_(t,e,s){const i=t[e];return!!i&&(i.some((function(t){return t.childNodes.length&&s(t.childNodes[0])}))&&i.every((function(t){return!t.childNodes.length||s(t.childNodes[0])})))}setNodeFactory(t){Cf.getInstance().factory_=t,vf.updateFactory(Cf.getInstance().factory_)}getNodeFactory(){return Cf.getInstance().factory_}identifierNode(t,e,s){if("MathML-Unit"===s)t.type=Jp.IDENTIFIER,t.role=$p.UNIT;else if(!e&&1===t.textContent.length&&(t.role===$p.INTEGER||t.role===$p.LATINLETTER||t.role===$p.GREEKLETTER)&&t.font===Qp.NORMAL)return t.font=Qp.ITALIC,vf.run("simpleNamedFunction",t);return t.type===Jp.UNKNOWN&&(t.type=Jp.IDENTIFIER),Cf.exprFont_(t),vf.run("simpleNamedFunction",t)}implicitNode(t){if(t=Cf.getInstance().getMixedNumbers_(t),1===(t=Cf.getInstance().combineUnits_(t)).length)return t[0];const e=Cf.getInstance().implicitNode_(t);return vf.run("combine_juxtaposition",e)}text(t,e){return Cf.exprFont_(t),t.type=Jp.TEXT,e===Em.ANNOTATIONXML?(t.role=$p.ANNOTATION,t):e===Em.MS?(t.role=$p.STRING,t):e===Em.MSPACE||t.textContent.match(/^\s*$/)?(t.role=$p.SPACE,t):/\s/.exec(t.textContent)?(t.role=$p.TEXT,t):(t.role=$p.UNKNOWN,t)}row(t){return 0===(t=t.filter((function(t){return!Fm(t,Jp.EMPTY)}))).length?Cf.getInstance().factory_.makeEmptyNode():(t=Cf.getInstance().getFencesInRow_(t),t=Cf.getInstance().tablesInRow(t),t=Cf.getInstance().getPunctuationInRow_(t),t=Cf.getInstance().getTextInRow_(t),t=Cf.getInstance().getFunctionsInRow_(t),Cf.getInstance().relationsInRow_(t))}limitNode(t,e){if(!e.length)return Cf.getInstance().factory_.makeEmptyNode();let s,i=e[0],r=Jp.UNKNOWN;if(!e[1])return i;if(vf.run("op_with_limits",e),of(i)){s=Cf.MML_TO_LIMIT_[t];const n=s.length;if(r=s.type,e=e.slice(0,s.length+1),1===n&&qm(e[1])||2===n&&qm(e[1])&&qm(e[2]))return s=Cf.MML_TO_BOUNDS_[t],Cf.getInstance().accentNode_(i,e,s.type,s.length,s.accent);if(2===n){if(qm(e[1]))return i=Cf.getInstance().accentNode_(i,[i,e[1]],{MSUBSUP:Jp.SUBSCRIPT,MUNDEROVER:Jp.UNDERSCORE}[t],1,!0),e[2]?Cf.getInstance().makeLimitNode_(i,[i,e[2]],null,Jp.LIMUPPER):i;if(e[2]&&qm(e[2]))return i=Cf.getInstance().accentNode_(i,[i,e[2]],{MSUBSUP:Jp.SUPERSCRIPT,MUNDEROVER:Jp.OVERSCORE}[t],1,!0),Cf.getInstance().makeLimitNode_(i,[i,e[1]],null,Jp.LIMLOWER);e[n]||(r=Jp.LIMLOWER)}return Cf.getInstance().makeLimitNode_(i,e,null,r)}return s=Cf.MML_TO_BOUNDS_[t],Cf.getInstance().accentNode_(i,e,s.type,s.length,s.accent)}tablesInRow(t){let e=Rm(t,ef),s=[];for(let t,i=0;t=e.rel[i];i++)s=s.concat(e.comp.shift()),s.push(Cf.tableToMatrixOrVector_(t));s=s.concat(e.comp.shift()),e=Rm(s,tf),s=[];for(let t,i=0;t=e.rel[i];i++){const i=e.comp.shift();rf(0,i)&&Cf.tableToCases_(t,i.pop()),s=s.concat(i),s.push(t)}return s.concat(e.comp.shift())}mfenced(t,e,s,i){if(s&&i.length>0){const t=Cf.nextSeparatorFunction_(s),e=[i.shift()];i.forEach((s=>{e.push(Cf.getInstance().factory_.makeContentNode(t())),e.push(s)})),i=e}return t&&e?Cf.getInstance().horizontalFencedNode_(Cf.getInstance().factory_.makeContentNode(t),Cf.getInstance().factory_.makeContentNode(e),i):(t&&i.unshift(Cf.getInstance().factory_.makeContentNode(t)),e&&i.push(Cf.getInstance().factory_.makeContentNode(e)),Cf.getInstance().row(i))}fractionLikeNode(t,e,s,i){let r;if(!i&&function(t){if(!t)return!1;if(["negativeveryverythinmathspace","negativeverythinmathspace","negativethinmathspace","negativemediummathspace","negativethickmathspace","negativeverythickmathspace","negativeveryverythickmathspace"].includes(t))return!0;const e=t.match(/[0-9.]+/);return!!e&&0===parseFloat(e[0])}(s)){const s=Cf.getInstance().factory_.makeBranchNode(Jp.LINE,[t],[]),i=Cf.getInstance().factory_.makeBranchNode(Jp.LINE,[e],[]);return r=Cf.getInstance().factory_.makeBranchNode(Jp.MULTILINE,[s,i],[]),Cf.binomialForm_(r),Cf.classifyMultiline(r),r}return r=Cf.getInstance().fractionNode_(t,e),i&&r.addAnnotation("general","bevelled"),r}tensor(t,e,s,i,r){const n=Cf.getInstance().factory_.makeBranchNode(Jp.TENSOR,[t,Cf.getInstance().scriptNode_(e,$p.LEFTSUB),Cf.getInstance().scriptNode_(s,$p.LEFTSUPER),Cf.getInstance().scriptNode_(i,$p.RIGHTSUB),Cf.getInstance().scriptNode_(r,$p.RIGHTSUPER)],[]);return n.role=t.role,n.embellished=Gm(t),n}pseudoTensor(t,e,s){const i=t=>!Fm(t,Jp.EMPTY),r=e.filter(i).length,n=s.filter(i).length;if(!r&&!n)return t;const o=r?n?Em.MSUBSUP:Em.MSUB:Em.MSUP,a=[t];return r&&a.push(Cf.getInstance().scriptNode_(e,$p.RIGHTSUB,!0)),n&&a.push(Cf.getInstance().scriptNode_(s,$p.RIGHTSUPER,!0)),Cf.getInstance().limitNode(o,a)}font(t){const e=Cf.MATHJAX_FONTS[t];return e||t}proof(t,e,s){if(e.inference||e.axiom||console.log("Noise"),e.axiom){const e=Cf.getInstance().cleanInference(t.childNodes),i=e.length?Cf.getInstance().factory_.makeBranchNode(Jp.INFERENCE,s(e),[]):Cf.getInstance().factory_.makeEmptyNode();return i.role=$p.AXIOM,i.mathmlTree=t,i}const i=Cf.getInstance().inference(t,e,s);return e.proof&&(i.role=$p.PROOF,i.childNodes[0].role=$p.FINAL),i}inference(t,e,s){if(e.inferenceRule){const e=Cf.getInstance().getFormulas(t,[],s);return Cf.getInstance().factory_.makeBranchNode(Jp.INFERENCE,[e.conclusion,e.premises],[])}const i=e.labelledRule,r=Cp(t.childNodes),n=[];"left"!==i&&"both"!==i||n.push(Cf.getInstance().getLabel(t,r,s,$p.LEFT)),"right"!==i&&"both"!==i||n.push(Cf.getInstance().getLabel(t,r,s,$p.RIGHT));const o=Cf.getInstance().getFormulas(t,r,s),a=Cf.getInstance().factory_.makeBranchNode(Jp.INFERENCE,[o.conclusion,o.premises],n);return a.mathmlTree=t,a}getLabel(t,e,s,i){const r=Cf.getInstance().findNestedRow(e,"prooflabel",i),n=Cf.getInstance().factory_.makeBranchNode(Jp.RULELABEL,s(Cp(r.childNodes)),[]);return n.role=i,n.mathmlTree=r,n}getFormulas(t,e,s){const i=e.length?Cf.getInstance().findNestedRow(e,"inferenceRule"):t,r="up"===Cf.getSemantics(i).inferenceRule,n=r?i.childNodes[1]:i.childNodes[0],o=r?i.childNodes[0]:i.childNodes[1],a=n.childNodes[0].childNodes[0],c=Cp(a.childNodes[0].childNodes),l=[];let h=1;for(const t of c)h%2&&l.push(t.childNodes[0]),h++;const d=s(l),u=s(Cp(o.childNodes[0].childNodes))[0],p=Cf.getInstance().factory_.makeBranchNode(Jp.PREMISES,d,[]);p.mathmlTree=a;const m=Cf.getInstance().factory_.makeBranchNode(Jp.CONCLUSION,[u],[]);return m.mathmlTree=o.childNodes[0].childNodes[0],{conclusion:m,premises:p}}findNestedRow(t,e,s){return Cf.getInstance().findNestedRow_(t,e,0,s)}cleanInference(t){return Cp(t).filter((function(t){return"MSPACE"!==Mp(t)}))}operatorNode(t){return t.type===Jp.UNKNOWN&&(t.type=Jp.OPERATOR),vf.run("multioperator",t)}constructor(){this.funcAppls={},this.splitRoles=new Map([[$p.SUBTRACTION,$p.NEGATIVE],[$p.ADDITION,$p.POSITIVE]]),this.splitOps=["\u2212","-","\u2010","\u2011","+"],this.factory_=new Pm,vf.updateFactory(this.factory_)}implicitNode_(t){const e=Cf.getInstance().factory_.makeMultipleContentNodes(t.length-1,sm.invisibleTimes);Cf.matchSpaces_(t,e);const s=Cf.getInstance().infixNode_(t,e[0]);return s.role=$p.IMPLICIT,e.forEach((function(t){t.parent=s})),s.contentNodes=e,s}infixNode_(t,e){let s=Cf.getInstance().factory_.makeBranchNode(Jp.INFIXOP,t,[e],Im(e).textContent);return s.role=e.role,s=vf.run("propagateInterval",s),vf.run("propagateSimpleFunction",s)}explicitMixed_(t){const e=Rm(t,(function(t){return t.textContent===sm.invisiblePlus}));if(!e.rel.length)return t;let s=[];for(let t,i=0;t=e.rel[i];i++){const r=e.comp[i],n=e.comp[i+1],o=r.length-1;if(r[o]&&n[0]&&Fm(r[o],Jp.NUMBER)&&!Um(r[o],$p.MIXED)&&Fm(n[0],Jp.FRACTION)){const t=Cf.getInstance().factory_.makeBranchNode(Jp.NUMBER,[r[o],n[0]],[]);t.role=$p.MIXED,s=s.concat(r.slice(0,o)),s.push(t),n.shift()}else s=s.concat(r),s.push(t)}return s.concat(e.comp[e.comp.length-1])}concatNode_(t,e,s){if(0===e.length)return t;const i=e.map((function(t){return Im(t).textContent})).join(" "),r=Cf.getInstance().factory_.makeBranchNode(s,[t],e,i);return e.length>1&&(r.role=$p.MULTIOP),r}prefixNode_(t,e){const s=this.splitSingles(e);let i=t;for(;s.length>0;){const t=s.pop();i=Cf.getInstance().concatNode_(i,t,Jp.PREFIXOP),1===t.length&&-1!==this.splitOps.indexOf(t[0].textContent)&&(i.role=this.splitRoles.get(t[0].role))}return i}splitSingles(t){let e=0;const s=[];let i=0;for(;i<t.length;){const r=t[i];!this.splitRoles.has(r.role)||t[i-1]&&t[i-1].role===r.role||t[i+1]&&t[i+1].role===r.role||-1===this.splitOps.indexOf(r.textContent)||(s.push(t.slice(e,i)),s.push(t.slice(i,i+1)),e=i+1),i++}return e<i&&s.push(t.slice(e,i)),s}postfixNode_(t,e){return e.length?Cf.getInstance().concatNode_(t,e,Jp.POSTFIXOP):t}combineUnits_(t){const e=Rm(t,(function(t){return!Um(t,$p.UNIT)}));if(t.length===e.rel.length)return e.rel;const s=[];let i,r;do{const t=e.comp.shift();i=e.rel.shift();let n=null;r=s.pop(),r&&(t.length&&uf(r)?t.unshift(r):s.push(r)),1===t.length&&(n=t.pop()),t.length>1&&(n=Cf.getInstance().implicitNode_(t),n.role=$p.UNIT),n&&s.push(n),i&&s.push(i)}while(i);return s}getMixedNumbers_(t){const e=Rm(t,(function(t){return Fm(t,Jp.FRACTION)&&Um(t,$p.VULGAR)}));if(!e.rel.length)return t;let s=[];for(let t,i=0;t=e.rel[i];i++){const r=e.comp[i],n=r.length-1;if(r[n]&&Fm(r[n],Jp.NUMBER)&&(Um(r[n],$p.INTEGER)||Um(r[n],$p.FLOAT))){const e=Cf.getInstance().factory_.makeBranchNode(Jp.NUMBER,[r[n],t],[]);e.role=$p.MIXED,s=s.concat(r.slice(0,n)),s.push(e)}else s=s.concat(r),s.push(t)}return s.concat(e.comp[e.comp.length-1])}getTextInRow_(t){if(0===t.length)return t;if(1===t.length)return t[0].type===Jp.TEXT&&t[0].role===$p.UNKNOWN&&(t[0].role=$p.ANNOTATION),t;const{rel:e,comp:s}=Rm(t,(t=>Fm(t,Jp.TEXT)));if(0===e.length)return t;const i=[];let r=s.shift();for(;e.length>0;){let t=e.shift(),n=s.shift();const o=[];for(;!n.length&&e.length&&t.role!==$p.SPACE&&e[0].role!==$p.SPACE;)o.push(t),t=e.shift(),n=s.shift();if(o.length){r.length&&i.push(Cf.getInstance().row(r)),o.push(t);const e=Cf.getInstance().dummyNode_(o);i.push(e),r=n;continue}if(t.role!==$p.UNKNOWN){r.length&&i.push(Cf.getInstance().row(r)),i.push(t),r=n;continue}const a=nm.Meaning.get(t.textContent);a.type!==Jp.PUNCTUATION?a.type===Jp.UNKNOWN?(Cf.meaningFromContent(t,((t,e,s)=>{if(t.role===$p.UNKNOWN){if(Cf.numberRole_(t,e,s),t.role===$p.OTHERNUMBER)return s.some((t=>t.type!==Jp.NUMBER&&t.type!==Jp.IDENTIFIER))?(t.type=Jp.TEXT,void(t.role=$p.ANNOTATION)):void(t.role=$p.UNKNOWN);t.type=Jp.NUMBER}})),t.type!==Jp.TEXT||t.role===$p.UNKNOWN?(t.role===$p.UNKNOWN&&(e.length||n.length?n.length&&n[0].type===Jp.FENCED?(t.type=Jp.FUNCTION,t.role=$p.PREFIXFUNC):t.role=$p.TEXT:(t.type=Jp.IDENTIFIER,t.role=$p.UNIT)),r.push(t),r=r.concat(n)):(r.length&&i.push(Cf.getInstance().row(r)),i.push(t),r=n)):(t.type=a.type,t.role=a.role,t.font=a.font,t.addAnnotation("general","text"),r.push(t),r=r.concat(n)):(t.role=a.role,t.font=a.font,r.length&&i.push(Cf.getInstance().row(r)),i.push(t),r=n)}return r.length>0&&i.push(Cf.getInstance().row(r)),i.length>1?[Cf.getInstance().dummyNode_(i)]:i}relationsInRow_(t){const e=Rm(t,Km),s=e.rel[0];if(!s)return Cf.getInstance().operationsInRow_(t);if(1===t.length)return t[0];const i=e.comp.map(Cf.getInstance().operationsInRow_);let r;return e.rel.some((function(t){return!t.equals(s)}))?(r=Cf.getInstance().factory_.makeBranchNode(Jp.MULTIREL,i,e.rel),e.rel.every((function(t){return t.role===s.role}))&&(r.role=s.role),r):(r=Cf.getInstance().factory_.makeBranchNode(Jp.RELSEQ,i,e.rel,Im(s).textContent),r.role=s.role,r)}operationsInRow_(t){if(0===t.length)return Cf.getInstance().factory_.makeEmptyNode();if(1===(t=Cf.getInstance().explicitMixed_(t)).length)return t[0];const e=[];for(;t.length>0&&Jm(t[0]);)e.push(t.shift());if(0===t.length)return Cf.getInstance().prefixNode_(e.pop(),e);if(1===t.length)return Cf.getInstance().prefixNode_(t[0],e);const s=Sm(t=vf.run("convert_juxtaposition",t),Jm),i=Cf.getInstance().wrapFactor(e,s);return Cf.getInstance().addFactor(i,s)}wrapPostfix(t){var e;(null===(e=t.div)||void 0===e?void 0:e.role)===$p.POSTFIXOP&&(t.tail.length&&t.tail[0].type!==Jp.OPERATOR?t.div.role=$p.DIVISION:(t.head=[Cf.getInstance().postfixNode_(Cf.getInstance().implicitNode(t.head),[t.div])],t.div=t.tail.shift(),Cf.getInstance().wrapPostfix(t)))}wrapFactor(t,e){return Cf.getInstance().wrapPostfix(e),Cf.getInstance().prefixNode_(Cf.getInstance().implicitNode(e.head),t)}addFactor(t,e){return e.div?Cf.getInstance().operationsTree_(e.tail,t,e.div):(mf(t)&&(t.role=$p.UNIT),t)}operationsTree_(t,e,s,i=[]){if(0===t.length){if(i.unshift(s),e.type===Jp.INFIXOP){const t=Cf.getInstance().postfixNode_(e.childNodes.pop(),i);return e.appendChild(t),e}return Cf.getInstance().postfixNode_(e,i)}const r=Sm(t,Jm);if(0===r.head.length)return i.push(r.div),Cf.getInstance().operationsTree_(r.tail,e,s,i);const n=Cf.getInstance().wrapFactor(i,r),o=Cf.getInstance().appendOperand_(e,s,n);return Cf.getInstance().addFactor(o,r)}appendOperand_(t,e,s){if(t.type!==Jp.INFIXOP)return Cf.getInstance().infixNode_([t,s],e);const i=Cf.getInstance().appendDivisionOp_(t,e,s);return i||(Cf.getInstance().appendExistingOperator_(t,e,s)?t:e.role===$p.MULTIPLICATION?Cf.getInstance().appendMultiplicativeOp_(t,e,s):Cf.getInstance().appendAdditiveOp_(t,e,s))}appendDivisionOp_(t,e,s){return e.role===$p.DIVISION?ff(t)?Cf.getInstance().infixNode_([t,s],e):Cf.getInstance().appendLastOperand_(t,e,s):t.role===$p.DIVISION?Cf.getInstance().infixNode_([t,s],e):null}appendLastOperand_(t,e,s){let i=t,r=t.childNodes[t.childNodes.length-1];for(;r&&r.type===Jp.INFIXOP&&!ff(r);)i=r,r=i.childNodes[t.childNodes.length-1];const n=Cf.getInstance().infixNode_([i.childNodes.pop(),s],e);return i.appendChild(n),t}appendMultiplicativeOp_(t,e,s){if(ff(t))return Cf.getInstance().infixNode_([t,s],e);let i=t,r=t.childNodes[t.childNodes.length-1];for(;r&&r.type===Jp.INFIXOP&&!ff(r);)i=r,r=i.childNodes[t.childNodes.length-1];const n=Cf.getInstance().infixNode_([i.childNodes.pop(),s],e);return i.appendChild(n),t}appendAdditiveOp_(t,e,s){return Cf.getInstance().infixNode_([t,s],e)}appendExistingOperator_(t,e,s){return!(!t||t.type!==Jp.INFIXOP||ff(t))&&(t.contentNodes[0].equals(e)?(t.appendContentNode(e),t.appendChild(s),!0):Cf.getInstance().appendExistingOperator_(t.childNodes[t.childNodes.length-1],e,s))}getFencesInRow_(t){let e=Rm(t,Ym);e=Cf.purgeFences_(e);const s=e.comp.shift();return Cf.getInstance().fences_(e.rel,e.comp,[],[s])}fences_(t,e,s,i){if(0===t.length&&0===s.length)return i[0];const r=vf.run("bracketed_interval",[t[0],t[1],...e[0]||[]],(()=>null));if(r){t.shift(),t.shift(),e.shift();const n=i.pop()||[];return i.push([...n,r,...e.shift()]),Cf.getInstance().fences_(t,e,s,i)}const n=t=>Um(t,$p.OPEN);if(0===t.length){const t=i.shift();for(;s.length>0;){if(n(s[0])){const e=s.shift();Cf.fenceToPunct_(e),t.push(e)}else{const e=Sm(s,n),r=e.head.length-1,o=Cf.getInstance().neutralFences_(e.head,i.slice(0,r));i=i.slice(r),t.push(...o),e.div&&e.tail.unshift(e.div),s=e.tail}t.push(...i.shift())}return t}const o=s[s.length-1],a=t[0].role;if(a===$p.OPEN||bf(t[0])&&(!o||!Ef(t[0],o))){s.push(t.shift());const r=e.shift();return r&&i.push(r),Cf.getInstance().fences_(t,e,s,i)}if(o&&a===$p.CLOSE&&o.role===$p.OPEN){const r=Cf.getInstance().horizontalFencedNode_(s.pop(),t.shift(),i.pop());return i.push(i.pop().concat([r],e.shift())),Cf.getInstance().fences_(t,e,s,i)}if(o&&Ef(t[0],o)){if(!Nf(o)||!yf(t[0])){s.push(t.shift());const r=e.shift();return r&&i.push(r),Cf.getInstance().fences_(t,e,s,i)}const r=Cf.getInstance().horizontalFencedNode_(s.pop(),t.shift(),i.pop());return i.push(i.pop().concat([r],e.shift())),Cf.getInstance().fences_(t,e,s,i)}if(o&&a===$p.CLOSE&&bf(o)&&s.some(n)){const r=Sm(s,n,!0),o=i.pop(),a=i.length-r.tail.length+1,c=Cf.getInstance().neutralFences_(r.tail,i.slice(a));i=i.slice(0,a);const l=Cf.getInstance().horizontalFencedNode_(r.div,t.shift(),i.pop().concat(c,o));return i.push(i.pop().concat([l],e.shift())),Cf.getInstance().fences_(t,e,r.head,i)}const c=t.shift();return Cf.fenceToPunct_(c),i.push(i.pop().concat([c],e.shift())),Cf.getInstance().fences_(t,e,s,i)}neutralFences_(t,e){if(0===t.length)return t;if(1===t.length)return Cf.fenceToPunct_(t[0]),t;const s=t.shift();if(!Nf(s)){Cf.fenceToPunct_(s);const i=e.shift();return i.unshift(s),i.concat(Cf.getInstance().neutralFences_(t,e))}const i=Sm(t,(function(t){return Ef(t,s)}));if(!i.div){Cf.fenceToPunct_(s);const i=e.shift();return i.unshift(s),i.concat(Cf.getInstance().neutralFences_(t,e))}if(!yf(i.div))return Cf.fenceToPunct_(i.div),t.unshift(s),Cf.getInstance().neutralFences_(t,e);const r=Cf.getInstance().combineFencedContent_(s,i.div,i.head,e);if(i.tail.length>0){const t=r.shift(),e=Cf.getInstance().neutralFences_(i.tail,r);return t.concat(e)}return r[0]}combineFencedContent_(t,e,s,i){if(0===s.length){const s=Cf.getInstance().horizontalFencedNode_(t,e,i.shift());return i.length>0?i[0].unshift(s):i=[[s]],i}const r=i.shift(),n=s.length-1,o=i.slice(0,n),a=(i=i.slice(n)).shift(),c=Cf.getInstance().neutralFences_(s,o);r.push(...c),r.push(...a);const l=Cf.getInstance().horizontalFencedNode_(t,e,r);return i.length>0?i[0].unshift(l):i=[[l]],i}horizontalFencedNode_(t,e,s){const i=Cf.getInstance().row(s);let r=Cf.getInstance().factory_.makeBranchNode(Jp.FENCED,[i],[t,e]);return t.role===$p.OPEN?(Cf.getInstance().classifyHorizontalFence_(r),r=vf.run("propagateComposedFunction",r)):r.role=t.role,r=vf.run("detect_cycle",r),Cf.rewriteFencedNode_(r)}classifyHorizontalFence_(t){if(vf.run("interval_heuristic",t),t.role===$p.INTERVAL)return;t.role=$p.LEFTRIGHT;const e=t.childNodes;if(!function(t){return function(t){return!!t&&-1!==["{","\ufe5b","\uff5b"].indexOf(t.textContent)}(t.contentNodes[0])&&function(t){return!!t&&-1!==["}","\ufe5c","\uff5d"].indexOf(t.textContent)}(t.contentNodes[1])}(t)||e.length>1)return;if(0===e.length||e[0].type===Jp.EMPTY)return void(t.role=$p.SETEMPTY);const s=e[0].type;if(1===e.length&&df(e[0]))return void(t.role=$p.SETSINGLE);const i=e[0].role;if(s===Jp.PUNCTUATED&&i===$p.SEQUENCE){if(e[0].contentNodes[0].role!==$p.COMMA)return 1!==e[0].contentNodes.length||e[0].contentNodes[0].role!==$p.VBAR&&e[0].contentNodes[0].role!==$p.COLON?void 0:(t.role=$p.SETEXT,void Cf.getInstance().setExtension_(t));t.role=$p.SETCOLLECT}}setExtension_(t){const e=t.childNodes[0].childNodes[0];e&&e.type===Jp.INFIXOP&&1===e.contentNodes.length&&xf(e.contentNodes[0])&&(e.addAnnotation("set","intensional"),e.contentNodes[0].addAnnotation("set","intensional"))}getPunctuationInRow_(t){if(t.length<=1)return t;const e=t=>{const e=t.type;return"punctuation"===e||"text"===e||"operator"===e||"relation"===e},s=Rm(t,(function(s){if(!$m(s))return!1;if($m(s)&&!Um(s,$p.ELLIPSIS))return!0;const i=t.indexOf(s);if(0===i)return!t[1]||!e(t[1]);const r=t[i-1];if(i===t.length-1)return!e(r);const n=t[i+1];return!e(r)||!e(n)}));if(0===s.rel.length)return t;let i=[],r=s.comp.shift();r.length>0&&i.push(Cf.getInstance().row(r));let n=0;for(;s.comp.length>0;){let t=[];const e=n;do{t.push(s.rel[n++]),r=s.comp.shift()}while(s.rel[n]&&r&&0===r.length);t=vf.run("ellipses",t),s.rel.splice(e,n-e,...t),n=e+t.length,i=i.concat(t),r&&r.length>0&&i.push(Cf.getInstance().row(r))}return 1===i.length&&1===s.rel.length?i:[Cf.getInstance().punctuatedNode_(i,s.rel)]}punctuatedNode_(t,e){const s=Cf.getInstance().factory_.makeBranchNode(Jp.PUNCTUATED,t,e);if(e.length===t.length){const t=e[0].role;if(t!==$p.UNKNOWN&&e.every((function(e){return e.role===t})))return s.role=t,s}const i=e[0];return af(t,e,0)?s.role=i.childNodes.length&&!i.embellished?i.role:$p.STARTPUNCT:af(t,e,t.length-1)?s.role=i.childNodes.length&&!i.embellished?i.role:$p.ENDPUNCT:e.every((t=>Um(t,$p.DUMMY)))?s.role=$p.TEXT:e.every((t=>Um(t,$p.SPACE)))?s.role=$p.SPACE:s.role=$p.SEQUENCE,s}dummyNode_(t){const e=Cf.getInstance().factory_.makeMultipleContentNodes(t.length-1,sm.invisibleComma);return e.forEach((function(t){t.role=$p.DUMMY})),Cf.getInstance().punctuatedNode_(t,e)}accentRole_(t,e){if(!qm(t))return!1;const s=t.textContent,i=nm.Secondary.get(s,tm.BAR)||nm.Secondary.get(s,tm.TILDE)||t.role;return t.role=e===Jp.UNDERSCORE?$p.UNDERACCENT:$p.OVERACCENT,t.addAnnotation("accent",i),!0}accentNode_(t,e,s,i,r){const n=(e=e.slice(0,i+1))[1],o=e[2];let a;if(!r&&o&&(a=Cf.getInstance().factory_.makeBranchNode(Jp.SUBSCRIPT,[t,n],[]),a.role=$p.SUBSUP,e=[a,o],s=Jp.SUPERSCRIPT),r){const i=Cf.getInstance().accentRole_(n,s);if(o){Cf.getInstance().accentRole_(o,Jp.OVERSCORE)&&!i?(a=Cf.getInstance().factory_.makeBranchNode(Jp.OVERSCORE,[t,o],[]),e=[a,n],s=Jp.UNDERSCORE):(a=Cf.getInstance().factory_.makeBranchNode(Jp.UNDERSCORE,[t,n],[]),e=[a,o],s=Jp.OVERSCORE),a.role=$p.UNDEROVER}}return Cf.getInstance().makeLimitNode_(t,e,a,s)}makeLimitNode_(t,e,s,i){if(i===Jp.LIMUPPER&&t.type===Jp.LIMLOWER)return t.childNodes.push(e[1]),e[1].parent=t,t.type=Jp.LIMBOTH,t;if(i===Jp.LIMLOWER&&t.type===Jp.LIMUPPER)return t.childNodes.splice(1,-1,e[1]),e[1].parent=t,t.type=Jp.LIMBOTH,t;const r=Cf.getInstance().factory_.makeBranchNode(i,e,[]),n=Gm(t);return s&&(s.embellished=n),r.embellished=n,r.role=t.role,r}getFunctionsInRow_(t,e){const s=e||[];if(0===t.length)return s;const i=t.shift(),r=Cf.classifyFunction_(i,t);if(!r)return s.push(i),Cf.getInstance().getFunctionsInRow_(t,s);const n=Cf.getInstance().getFunctionsInRow_(t,[]),o=Cf.getInstance().getFunctionArgs_(i,n,r);return s.concat(o)}getFunctionArgs_(t,e,s){let i,r,n;switch(s){case"integral":{const s=Cf.getInstance().getIntegralArgs_(e);if(!s.intvar&&!s.integrand.length)return s.rest.unshift(t),s.rest;const i=Cf.getInstance().row(s.integrand);return n=Cf.getInstance().integralNode_(t,i,s.intvar),vf.run("intvar_from_fraction",n),s.rest.unshift(n),s.rest}case"prefix":if(e[0]&&e[0].type===Jp.FENCED){const s=e.shift();return bf(s)||(s.role=$p.LEFTRIGHT),n=Cf.getInstance().functionNode_(t,s),e.unshift(n),e}if(i=Sm(e,Hm),i.head.length)r=Cf.getInstance().row(i.head),i.div&&i.tail.unshift(i.div);else{if(!i.div||!Fm(i.div,Jp.APPL))return e.unshift(t),e;r=i.div}return n=Cf.getInstance().functionNode_(t,r),i.tail.unshift(n),i.tail;case"bigop":return i=Sm(e,Wm),i.head.length?(r=Cf.getInstance().row(i.head),n=Cf.getInstance().bigOpNode_(t,r),i.div&&i.tail.unshift(i.div),i.tail.unshift(n),i.tail):(e.unshift(t),e);default:{if(0===e.length)return[t];const s=e[0];return s.type===Jp.FENCED&&!bf(s)&&function(t){const e=t.childNodes;if(0===e.length)return!0;if(e.length>1)return!1;const s=e[0];if(s.type===Jp.INFIXOP){if(s.role!==$p.IMPLICIT)return!1;if(s.childNodes.some((t=>Fm(t,Jp.INFIXOP))))return!1}return!0}(s)?(s.role=$p.LEFTRIGHT,Cf.propagateFunctionRole_(t,$p.SIMPLEFUNC),n=Cf.getInstance().functionNode_(t,e.shift()),e.unshift(n),e):(e.unshift(t),e)}}}getIntegralArgs_(t,e=[]){if(0===t.length){const t=Sm(e,Wm);return t.div&&t.tail.unshift(t.div),{integrand:t.head,intvar:null,rest:t.tail}}vf.run("intvar_from_implicit",t);const s=t[0];if(Vm(s)){const{integrand:s,rest:i}=Cf.getInstance().getIntegralArgs_(e);return{integrand:s,intvar:null,rest:i.concat(t)}}if(Xm(s))return s.role=$p.INTEGRAL,{integrand:e,intvar:s,rest:t.slice(1)};if(t[1]&&zm(s,t[1])){const i=Cf.getInstance().prefixNode_(t[1],[s]);return i.role=$p.INTEGRAL,{integrand:e,intvar:i,rest:t.slice(2)}}return e.push(t.shift()),Cf.getInstance().getIntegralArgs_(t,e)}functionNode_(t,e){const s=Cf.getInstance().factory_.makeContentNode(sm.functionApplication),i=Cf.getInstance().funcAppls[t.id];i&&(s.mathmlTree=i.mathmlTree,s.mathml=i.mathml,s.annotation=i.annotation,s.attributes=i.attributes,delete Cf.getInstance().funcAppls[t.id]),s.type=Jp.PUNCTUATION,s.role=$p.APPLICATION;const r=Cf.getFunctionOp_(t,(function(t){return Fm(t,Jp.FUNCTION)||Fm(t,Jp.IDENTIFIER)&&Um(t,$p.SIMPLEFUNC)}));return Cf.getInstance().functionalNode_(Jp.APPL,[t,e],r,[s])}bigOpNode_(t,e){const s=Cf.getFunctionOp_(t,(t=>Fm(t,Jp.LARGEOP)));return Cf.getInstance().functionalNode_(Jp.BIGOP,[t,e],s,[])}integralNode_(t,e,s){e=e||Cf.getInstance().factory_.makeEmptyNode(),s=s||Cf.getInstance().factory_.makeEmptyNode();const i=Cf.getFunctionOp_(t,(t=>Fm(t,Jp.LARGEOP)));return Cf.getInstance().functionalNode_(Jp.INTEGRAL,[t,e,s],i,[])}functionalNode_(t,e,s,i){const r=e[0];let n;s&&(n=s.parent,i.push(s));const o=Cf.getInstance().factory_.makeBranchNode(t,e,i);return o.role=r.role,n&&(s.parent=n),o}fractionNode_(t,e){const s=Cf.getInstance().factory_.makeBranchNode(Jp.FRACTION,[t,e],[]);return s.role=s.childNodes.every((function(t){return Fm(t,Jp.NUMBER)&&Um(t,$p.INTEGER)}))?$p.VULGAR:s.childNodes.every(pf)?$p.UNIT:$p.DIVISION,vf.run("propagateSimpleFunction",s)}scriptNode_(t,e,s){let i;switch(t.length){case 0:i=Cf.getInstance().factory_.makeEmptyNode();break;case 1:if(i=t[0],s)return i;break;default:i=Cf.getInstance().dummyNode_(t)}return i.role=e,i}findNestedRow_(t,e,s,i){if(s>3)return null;for(let r,n=0;r=t[n];n++){const t=Mp(r);if(t!==Em.MSPACE){if(t===Em.MROW)return Cf.getInstance().findNestedRow_(Cp(r.childNodes),e,s+1,i);if(Cf.findSemantics(r,e,i))return r}}return null}}Cf.FENCE_TO_PUNCT_={[$p.METRIC]:$p.METRIC,[$p.NEUTRAL]:$p.VBAR,[$p.OPEN]:$p.OPENFENCE,[$p.CLOSE]:$p.CLOSEFENCE},Cf.MML_TO_LIMIT_={[Em.MSUB]:{type:Jp.LIMLOWER,length:1},[Em.MUNDER]:{type:Jp.LIMLOWER,length:1},[Em.MSUP]:{type:Jp.LIMUPPER,length:1},[Em.MOVER]:{type:Jp.LIMUPPER,length:1},[Em.MSUBSUP]:{type:Jp.LIMBOTH,length:2},[Em.MUNDEROVER]:{type:Jp.LIMBOTH,length:2}},Cf.MML_TO_BOUNDS_={[Em.MSUB]:{type:Jp.SUBSCRIPT,length:1,accent:!1},[Em.MSUP]:{type:Jp.SUPERSCRIPT,length:1,accent:!1},[Em.MSUBSUP]:{type:Jp.SUBSCRIPT,length:2,accent:!1},[Em.MUNDER]:{type:Jp.UNDERSCORE,length:1,accent:!0},[Em.MOVER]:{type:Jp.OVERSCORE,length:1,accent:!0},[Em.MUNDEROVER]:{type:Jp.UNDERSCORE,length:2,accent:!0}},Cf.CLASSIFY_FUNCTION_={[$p.INTEGRAL]:"integral",[$p.SUM]:"bigop",[$p.PREFIXFUNC]:"prefix",[$p.LIMFUNC]:"prefix",[$p.SIMPLEFUNC]:"prefix",[$p.COMPFUNC]:"prefix"},Cf.MATHJAX_FONTS={"-tex-caligraphic":Qp.CALIGRAPHIC,"-tex-caligraphic-bold":Qp.CALIGRAPHICBOLD,"-tex-calligraphic":Qp.CALIGRAPHIC,"-tex-calligraphic-bold":Qp.CALIGRAPHICBOLD,"-tex-oldstyle":Qp.OLDSTYLE,"-tex-oldstyle-bold":Qp.OLDSTYLEBOLD,"-tex-mathit":Qp.ITALIC};class Tf extends Bm{static getAttribute_(t,e,s){if(!t.hasAttribute(e))return s;const i=t.getAttribute(e);return i.match(/^\s*$/)?null:i}constructor(t){super("MathML"),this.options=t,vf.options=t,this.parseMap_=new Map([[Em.SEMANTICS,this.semantics_.bind(this)],[Em.MATH,this.rows_.bind(this)],[Em.MROW,this.rows_.bind(this)],[Em.MPADDED,this.rows_.bind(this)],[Em.MSTYLE,this.rows_.bind(this)],[Em.MFRAC,this.fraction_.bind(this)],[Em.MSUB,this.limits_.bind(this)],[Em.MSUP,this.limits_.bind(this)],[Em.MSUBSUP,this.limits_.bind(this)],[Em.MOVER,this.limits_.bind(this)],[Em.MUNDER,this.limits_.bind(this)],[Em.MUNDEROVER,this.limits_.bind(this)],[Em.MROOT,this.root_.bind(this)],[Em.MSQRT,this.sqrt_.bind(this)],[Em.MTABLE,this.table_.bind(this)],[Em.MLABELEDTR,this.tableLabeledRow_.bind(this)],[Em.MTR,this.tableRow_.bind(this)],[Em.MTD,this.tableCell_.bind(this)],[Em.MS,this.text_.bind(this)],[Em.MTEXT,this.text_.bind(this)],[Em.MSPACE,this.space_.bind(this)],[Em.ANNOTATIONXML,this.text_.bind(this)],[Em.MI,this.identifier_.bind(this)],[Em.MN,this.number_.bind(this)],[Em.MO,this.operator_.bind(this)],[Em.MFENCED,this.fenced_.bind(this)],[Em.MENCLOSE,this.enclosed_.bind(this)],[Em.MMULTISCRIPTS,this.multiscripts_.bind(this)],[Em.ANNOTATION,this.empty_.bind(this)],[Em.NONE,this.empty_.bind(this)],[Em.MACTION,this.action_.bind(this)]]);const e={type:Jp.IDENTIFIER,role:$p.NUMBERSET,font:Qp.DOUBLESTRUCK};["C","H","N","P","Q","R","Z","\u2102","\u210d","\u2115","\u2119","\u211a","\u211d","\u2124"].forEach((t=>this.getFactory().defaultMap.set(t,e)).bind(this))}parse(t){Cf.getInstance().setNodeFactory(this.getFactory());const e=Cp(t.childNodes),s=Mp(t),i=this.parseMap_.get(s),r=(i||this.dummy_.bind(this))(t,e);return Mm(r,t),-1!==[Em.MATH,Em.MROW,Em.MPADDED,Em.MSTYLE,Em.SEMANTICS,Em.MACTION].indexOf(s)||(r.mathml.unshift(t),r.mathmlTree=t),r}semantics_(t,e){return e.length?this.parse(e[0]):this.getFactory().makeEmptyNode()}rows_(t,e){const s=t.getAttribute("semantics");if(s&&s.match("bspr_"))return Cf.proof(t,s,this.parseList.bind(this));let i;if(1===(e=Lm(e)).length)i=this.parse(e[0]),i.type!==Jp.EMPTY||i.mathmlTree||(i.mathmlTree=t);else{const s=vf.run("function_from_identifiers",t);i=s&&s!==t?s:Cf.getInstance().row(this.parseList(e))}return i.mathml.unshift(t),i}fraction_(t,e){if(!e.length)return this.getFactory().makeEmptyNode();const s=this.parse(e[0]),i=e[1]?this.parse(e[1]):this.getFactory().makeEmptyNode();return Cf.getInstance().fractionLikeNode(s,i,t.getAttribute("linethickness"),"true"===t.getAttribute("bevelled"))}limits_(t,e){return Cf.getInstance().limitNode(Mp(t),this.parseList(e))}root_(t,e){return e[1]?this.getFactory().makeBranchNode(Jp.ROOT,[this.parse(e[1]),this.parse(e[0])],[]):this.sqrt_(t,e)}sqrt_(t,e){const s=this.parseList(Lm(e));return this.getFactory().makeBranchNode(Jp.SQRT,[Cf.getInstance().row(s)],[])}table_(t,e){const s=t.getAttribute("semantics");if(s&&s.match("bspr_"))return Cf.proof(t,s,this.parseList.bind(this));const i=this.getFactory().makeBranchNode(Jp.TABLE,this.parseList(e),[]);return i.mathmlTree=t,Cf.tableToMultiline(i)}tableRow_(t,e){const s=this.getFactory().makeBranchNode(Jp.ROW,this.parseList(e),[]);return s.role=$p.TABLE,s}tableLabeledRow_(t,e){var s;if(!e.length)return this.tableRow_(t,e);const i=this.parse(e[0]);i.role=$p.LABEL,(null===(s=i.childNodes[0])||void 0===s?void 0:s.type)===Jp.TEXT&&(i.childNodes[0].role=$p.LABEL);const r=this.getFactory().makeBranchNode(Jp.ROW,this.parseList(e.slice(1)),[i]);return r.role=$p.TABLE,r}tableCell_(t,e){const s=this.parseList(Lm(e));let i;i=s.length?1===s.length&&Fm(s[0],Jp.EMPTY)?s:[Cf.getInstance().row(s)]:[];const r=this.getFactory().makeBranchNode(Jp.CELL,i,[]);return r.role=$p.TABLE,r}space_(t,e){const s=t.getAttribute("width"),i=s&&s.match(/[a-z]*$/);if(!i)return this.empty_(t,e);const r=i[0],n=parseFloat(s.slice(0,i.index)),o={cm:.4,pc:.5,em:.5,ex:1,in:.15,pt:5,mm:5}[r];if(!o||isNaN(n)||n<o)return this.empty_(t,e);const a=this.getFactory().makeUnprocessed(t);return Cf.getInstance().text(a,Mp(t))}text_(t,e){const s=this.leaf_(t,e);return t.textContent?(s.updateContent(t.textContent,!0),Cf.getInstance().text(s,Mp(t))):s}identifier_(t,e){const s=this.leaf_(t,e);return Cf.getInstance().identifierNode(s,Cf.getInstance().font(t.getAttribute("mathvariant")),t.getAttribute("class"))}number_(t,e){const s=this.leaf_(t,e);return Cf.number(s),s}operator_(t,e){const s=this.leaf_(t,e);return Cf.getInstance().operatorNode(s),s}fenced_(t,e){const s=this.parseList(Lm(e)),i=Tf.getAttribute_(t,"separators",","),r=Tf.getAttribute_(t,"open","("),n=Tf.getAttribute_(t,"close",")"),o=Cf.getInstance().mfenced(r,n,i,s);return Cf.getInstance().tablesInRow([o])[0]}enclosed_(t,e){const s=this.parseList(Lm(e)),i=this.getFactory().makeBranchNode(Jp.ENCLOSE,[Cf.getInstance().row(s)],[]);return i.role=t.getAttribute("notation")||$p.UNKNOWN,i}multiscripts_(t,e){if(!e.length)return this.getFactory().makeEmptyNode();const s=this.parse(e.shift());if(!e.length)return s;const i=[],r=[],n=[],o=[];let a=!1,c=0;for(let t,s=0;t=e[s];s++)Mp(t)!==Em.MPRESCRIPTS?(a?1&c?i.push(t):r.push(t):1&c?n.push(t):o.push(t),c++):(a=!0,c=0);return Lm(i).length||Lm(r).length?Cf.getInstance().tensor(s,this.parseList(r),this.parseList(i),this.parseList(o),this.parseList(n)):Cf.getInstance().pseudoTensor(s,this.parseList(o),this.parseList(n))}empty_(t,e){return this.getFactory().makeEmptyNode()}action_(t,e){const s=e[t.hasAttribute("selection")?parseInt(t.getAttribute("selection"),10)-1:0],i=this.parse(s);return i.mathmlTree=s,i}dummy_(t,e){const s=this.getFactory().makeUnprocessed(t);return s.role=t.tagName,s.textContent=t.textContent,s}leaf_(t,e){if(1===e.length&&e[0].nodeType!==wp.TEXT_NODE){const s=this.getFactory().makeUnprocessed(t);return s.role=e[0].tagName,Mm(s,e[0]),s}const s=this.getFactory().makeLeafNode(t.textContent,Cf.getInstance().font(t.getAttribute("mathvariant")));return t.hasAttribute("data-latex")&&nm.LatexCommands.set(t.getAttribute("data-latex"),t.textContent),s}}class wf{constructor(t,e,s=t=>!1){this.name=t,this.apply=e,this.applicable=s}}class _f extends wf{}class kf extends wf{}function Af(t,e){const s=[];for(;t.length||e.length;)t.length&&s.push(t.shift()),e.length&&s.push(e.shift());return s}const Lf="data-semantic-";var Mf;!function(t){t.ADDED="data-semantic-added",t.ALTERNATIVE="data-semantic-alternative",t.CHILDREN="data-semantic-children",t.COLLAPSED="data-semantic-collapsed",t.CONTENT="data-semantic-content",t.EMBELLISHED="data-semantic-embellished",t.FENCEPOINTER="data-semantic-fencepointer",t.FONT="data-semantic-font",t.ID="data-semantic-id",t.ANNOTATION="data-semantic-annotation",t.ATTRIBUTES="data-semantic-attributes",t.OPERATOR="data-semantic-operator",t.OWNS="data-semantic-owns",t.PARENT="data-semantic-parent",t.POSTFIX="data-semantic-postfix",t.PREFIX="data-semantic-prefix",t.ROLE="data-semantic-role",t.SPEECH="data-semantic-speech",t.STRUCTURE="data-semantic-structure",t.SUMMARY="data-semantic-summary",t.TYPE="data-semantic-type"}(Mf||(Mf={}));const If=[Mf.ADDED,Mf.ALTERNATIVE,Mf.CHILDREN,Mf.COLLAPSED,Mf.CONTENT,Mf.EMBELLISHED,Mf.FENCEPOINTER,Mf.FONT,Mf.ID,Mf.ANNOTATION,Mf.ATTRIBUTES,Mf.OPERATOR,Mf.OWNS,Mf.PARENT,Mf.POSTFIX,Mf.PREFIX,Mf.ROLE,Mf.SPEECH,Mf.STRUCTURE,Mf.SUMMARY,Mf.TYPE];function Sf(t){return t.map((function(t){return t.id})).join(",")}function Rf(t,e){t.setAttribute(Mf.TYPE,e.type);const s=e.allAttributes();for(let e,i=0;e=s[i];i++)t.setAttribute(Lf+e[0].toLowerCase(),e[1]);e.childNodes.length&&t.setAttribute(Mf.CHILDREN,Sf(e.childNodes)),e.contentNodes.length&&t.setAttribute(Mf.CONTENT,Sf(e.contentNodes)),e.parent&&t.setAttribute(Mf.PARENT,e.parent.id.toString());const i=e.attributesXml();i&&t.setAttribute(Mf.ATTRIBUTES,i),function(t,e){const s=[];e.role===$p.MGLYPH&&s.push("image");e.attributes.href&&s.push("link");s.length&&t.setAttribute(Mf.POSTFIX,s.join(" "))}(t,e)}function Of(){const t=kp("mrow");return t.setAttribute(Mf.ADDED,"true"),t}class Df{static fromTree(t){return Df.fromNode(t.root)}static fromNode(t){return new Df(Df.fromNode_(t))}static fromString(t){return new Df(Df.fromString_(t))}static simpleCollapseStructure(t){return"number"==typeof t}static contentCollapseStructure(t){return!!t&&!Df.simpleCollapseStructure(t)&&"c"===t[0]}static interleaveIds(t,e){return Af(Df.collapsedLeafs(t),Df.collapsedLeafs(e))}static collapsedLeafs(...t){return t.reduce(((t,e)=>{return t.concat((s=e,Df.simpleCollapseStructure(s)?[s]:Df.contentCollapseStructure(s[1])?s.slice(2):s.slice(1)));var s}),[])}static fromStructure(t,e,s){return new Df(Df.tree_(t,e.root,s))}static combineContentChildren(t,e,s,i){switch(t){case Jp.RELSEQ:case Jp.INFIXOP:case Jp.MULTIREL:return Af(i,s);case Jp.PREFIXOP:return s.concat(i);case Jp.POSTFIXOP:return i.concat(s);case Jp.MATRIX:case Jp.VECTOR:case Jp.FENCED:return i.unshift(s[0]),i.push(s[1]),i;case Jp.CASES:return i.unshift(s[0]),i;case Jp.APPL:return[i[0],s[0],i[1]];case Jp.ROOT:return[i[0],i[1]];case Jp.ROW:case Jp.LINE:return s.length&&i.unshift(s[0]),i;default:return i}}static makeSexp_(t){return Df.simpleCollapseStructure(t)?t.toString():Df.contentCollapseStructure(t)?"(c "+t.slice(1).map(Df.makeSexp_).join(" ")+")":"("+t.map(Df.makeSexp_).join(" ")+")"}static fromString_(t){let e=t.replace(/\(/g,"[");return e=e.replace(/\)/g,"]"),e=e.replace(/ /g,","),e=e.replace(/c/g,'"c"'),JSON.parse(e)}static fromNode_(t){if(!t)return[];const e=t.contentNodes;let s;e.length&&(s=e.map(Df.fromNode_),s.unshift("c"));const i=t.childNodes;if(!i.length)return e.length?[t.id,s]:t.id;const r=i.map(Df.fromNode_);return e.length&&r.unshift(s),r.unshift(t.id),r}static tree_(t,e,s,i=0,r=1,n=1){if(!e)return[];const o=e.id,a=[o];!function(t){if(gp.getInstance().mode!==tp.HTTP)return;let e=t;for(;e&&!e.evaluate;)e=e.parentNode;e&&e.evaluate?Ep.currentDocument=e:t.ownerDocument&&(Ep.currentDocument=t.ownerDocument)}(t);const c=function(t,e){let s;try{s=vp(t,e,Ep.result.ORDERED_NODE_ITERATOR_TYPE)}catch(t){return[]}const i=[];for(let t=s.iterateNext();t;t=s.iterateNext())i.push(t);return i}(`.//self::*[@${Mf.ID}=${o}]`,t)[0];if(!e.childNodes.length)return Df.addAria(c,i,r,n,s),e.id;const l=Df.combineContentChildren(e.type,e.role,e.contentNodes.map((function(t){return t})),e.childNodes.map((function(t){return t})));c&&Df.addOwns_(c,l);for(let e,r=0,n=l.length;e=l[r];r++)a.push(Df.tree_(t,e,s,i+1,r+1,n));return Df.addAria(c,i,r,n,s),a}static addAria(t,e,s,i,r){const n=r.tree?e?"treeitem":"tree":"treeitem";r.aria&&t&&(t.setAttribute("aria-level",e.toString()),t.setAttribute("aria-posinset",s.toString()),t.setAttribute("aria-setsize",i.toString()),t.setAttribute("role",n),t.hasAttribute(Mf.OWNS)&&t.setAttribute("aria-owns",t.getAttribute(Mf.OWNS)))}static addOwns_(t,e){const s=t.getAttribute(Mf.COLLAPSED),i=s?Df.realLeafs_(Df.fromString(s).array):e.map((t=>t.id));t.setAttribute(Mf.OWNS,i.join(" "))}static realLeafs_(t){if(Df.simpleCollapseStructure(t))return[t];if(Df.contentCollapseStructure(t))return[];let e=[];for(let s=1;s<t.length;s++)e=e.concat(Df.realLeafs_(t[s]));return e}constructor(t){this.parents=null,this.levelsMap=null,t=0===t?t:t||[],this.array=t}populate(){this.parents&&this.levelsMap||(this.parents={},this.levelsMap={},this.populate_(this.array,this.array,[]))}toString(){return Df.makeSexp_(this.array)}populate_(t,e,s){if(Df.simpleCollapseStructure(t))return this.levelsMap[t]=e,void(this.parents[t]=t===s[0]?s.slice(1):s);const i=Df.contentCollapseStructure(t)?t.slice(1):t,r=[i[0]].concat(s);for(let e=0,s=i.length;e<s;e++){const s=i[e];this.populate_(s,t,r)}}isRoot(t){return t===this.levelsMap[t][0]}directChildren(t){if(!this.isRoot(t))return[];return this.levelsMap[t].slice(1).map((t=>Df.simpleCollapseStructure(t)?t:Df.contentCollapseStructure(t)?t[1]:t[0]))}subtreeNodes(t){if(!this.isRoot(t))return[];const e=(t,s)=>{Df.simpleCollapseStructure(t)?s.push(t):(Df.contentCollapseStructure(t)&&(t=t.slice(1)),t.forEach((t=>e(t,s))))},s=this.levelsMap[t],i=[];return e(s.slice(1),i),i}}function Pf(t,e,s){let i=null;if(!t.length)return i;const r=s[s.length-1],n=r&&r.length,o=e&&e.length,a=Cf.getInstance();if(n&&o){if(e[0].type===Jp.INFIXOP&&e[0].role===$p.IMPLICIT)return i=t.pop(),r.push(a.postfixNode_(r.pop(),t)),i;i=t.shift();const s=a.prefixNode_(e.shift(),t);return e.unshift(s),i}return n?(r.push(a.postfixNode_(r.pop(),t)),i):(o&&e.unshift(a.prefixNode_(e.shift(),t)),i)}function Bf(t,e,s){if(!e.length)return t;const i=t.pop(),r=e.shift(),n=s.shift();if(r.type===Jp.INFIXOP&&(r.role===$p.IMPLICIT||r.role===$p.UNIT)){hp.getInstance().output("Juxta Heuristic Case 2");const o=(i?[i,r]:[r]).concat(n);return Bf(t.concat(o),e,s)}if(!i)return hp.getInstance().output("Juxta Heuristic Case 3"),Bf([r].concat(n),e,s);const o=n.shift();if(!o){hp.getInstance().output("Juxta Heuristic Case 9");const n=vf.factory.makeBranchNode(Jp.INFIXOP,[i,e.shift()],[r],r.textContent);return n.role=$p.IMPLICIT,vf.run("combine_juxtaposition",n),e.unshift(n),Bf(t,e,s)}if(Jm(i)||Jm(o))return hp.getInstance().output("Juxta Heuristic Case 4"),Bf(t.concat([i,r,o]).concat(n),e,s);let a=null;return gf(i)&&gf(o)?(hp.getInstance().output("Juxta Heuristic Case 5"),i.contentNodes.push(r),i.contentNodes=i.contentNodes.concat(o.contentNodes),i.childNodes.push(o),i.childNodes=i.childNodes.concat(o.childNodes),o.childNodes.forEach((t=>t.parent=i)),r.parent=i,i.addMathmlNodes(r.mathml),i.addMathmlNodes(o.mathml),a=i):gf(i)?(hp.getInstance().output("Juxta Heuristic Case 6"),i.contentNodes.push(r),i.childNodes.push(o),o.parent=i,r.parent=i,i.addMathmlNodes(r.mathml),i.addMathmlNodes(o.mathml),a=i):gf(o)?(hp.getInstance().output("Juxta Heuristic Case 7"),o.contentNodes.unshift(r),o.childNodes.unshift(i),i.parent=o,r.parent=o,o.addMathmlNodes(r.mathml),o.addMathmlNodes(i.mathml),a=o):(hp.getInstance().output("Juxta Heuristic Case 8"),a=vf.factory.makeBranchNode(Jp.INFIXOP,[i,o],[r],r.textContent),a.role=$p.IMPLICIT),t.push(a),Bf(t.concat(n),e,s)}function Ff(t){return t.childNodes[0]&&t.childNodes[0].childNodes[0]&&Mp(t.childNodes[0])===Em.MPADDED&&Mp(t.childNodes[0].childNodes[0])===Em.MPADDED&&Mp(t.childNodes[0].childNodes[t.childNodes[0].childNodes.length-1])===Em.MPHANTOM}vf.add(new _f("combine_juxtaposition",(function(t){for(let e,s=t.childNodes.length-1;e=t.childNodes[s];s--)gf(e)&&!e.nobreaking&&(t.childNodes.splice(s,1,...e.childNodes),t.contentNodes.splice(s,0,...e.contentNodes),e.childNodes.concat(e.contentNodes).forEach((function(e){e.parent=t})),t.addMathmlNodes(e.mathml));return t}))),vf.add(new _f("propagateSimpleFunction",(t=>(t.type!==Jp.INFIXOP&&t.type!==Jp.FRACTION||!t.childNodes.every(cf)||(t.role=$p.COMPFUNC),t)),(t=>"clearspeak"===vf.options.domain))),vf.add(new _f("simpleNamedFunction",(t=>(t.role!==$p.UNIT&&-1!==["f","g","h","F","G","H"].indexOf(t.textContent)&&(t.role=$p.SIMPLEFUNC),t)),(t=>"clearspeak"===vf.options.domain))),vf.add(new _f("propagateComposedFunction",(t=>(t.type===Jp.FENCED&&t.childNodes[0].role===$p.COMPFUNC&&(t.role=$p.COMPFUNC),t)),(t=>"clearspeak"===vf.options.domain))),vf.add(new _f("multioperator",(t=>{t.role!==$p.UNKNOWN||t.textContent.length<=1||(Cf.compSemantics(t,"role",$p),Cf.compSemantics(t,"type",Jp))}))),vf.add(new kf("convert_juxtaposition",(t=>{let e=Rm(t,(function(t){return t.textContent===sm.invisibleTimes&&t.type===Jp.OPERATOR}));e=e.rel.length?function(t){const e=[],s=[];let i=t.comp.shift(),r=null,n=[];for(;t.comp.length;)if(n=[],i.length)r&&e.push(r),s.push(i),r=t.rel.shift(),i=t.comp.shift();else{for(r&&n.push(r);!i.length&&t.comp.length;)i=t.comp.shift(),n.push(t.rel.shift());r=Pf(n,i,s)}n.length||i.length?(e.push(r),s.push(i)):(n.push(r),Pf(n,i,s));return{rel:e,comp:s}}(e):e,t=e.comp[0];for(let s,i,r=1;s=e.comp[r],i=e.rel[r-1];r++)t.push(i),t=t.concat(s);return e=Rm(t,(function(t){return t.textContent===sm.invisibleTimes&&(t.type===Jp.OPERATOR||t.type===Jp.INFIXOP)})),e.rel.length?Bf(e.comp.shift(),e.rel,e.comp):t}))),vf.add(new _f("simple2prefix",(t=>(t.textContent.length>1&&!t.textContent[0].match(/[A-Z]/)&&(t.role=$p.PREFIXFUNC),t)),(t=>"braille"===vf.options.modality&&t.type===Jp.IDENTIFIER))),vf.add(new _f("detect_cycle",(t=>{t.type=Jp.MATRIX,t.role=$p.CYCLE;const e=t.childNodes[0];return e.type=Jp.ROW,e.role=$p.CYCLE,e.textContent="",e.contentNodes=[],t}),(t=>t.type===Jp.FENCED&&t.childNodes[0].type===Jp.INFIXOP&&t.childNodes[0].role===$p.IMPLICIT&&t.childNodes[0].childNodes.every((function(t){return t.type===Jp.NUMBER}))&&t.childNodes[0].contentNodes.every((function(t){return t.role===$p.SPACE}))))),vf.add(new kf("intvar_from_implicit",(function(t){const e=t[0].childNodes;t.splice(0,1,...e)}),(t=>t[0]&&ff(t[0])))),vf.add(new _f("intvar_from_fraction",(function(t){const e=t.childNodes[1],s=e.childNodes[0];if(Xm(s))return void(s.role=$p.INTEGRAL);if(!ff(s))return;const i=s.childNodes.length,r=s.childNodes[i-2],n=s.childNodes[i-1];if(Xm(n))return void(n.role=$p.INTEGRAL);if(zm(r,n)){const t=Cf.getInstance().prefixNode_(n,[r]);t.role=$p.INTEGRAL,2===i?e.childNodes[0]=t:(s.childNodes.pop(),s.contentNodes.pop(),s.childNodes[i-2]=t,t.parent=s)}}),(t=>{if(t.type!==Jp.INTEGRAL)return!1;const[,e,s]=t.childNodes;return s.type===Jp.EMPTY&&e.type===Jp.FRACTION}))),vf.add(new _f("rewrite_subcases",(function(t){t.addAnnotation("Emph","top");let e=[];if(t.hasAnnotation("Emph","left")){const s=Uf(t.childNodes[0].childNodes[0].childNodes[0],!0);s.forEach((t=>t.addAnnotation("Emph","left"))),e=e.concat(s);for(let e,s=0;e=t.childNodes[s];s++)e.childNodes.shift()}if(e.push(t),t.hasAnnotation("Emph","right")){const s=Uf(t.childNodes[0].childNodes[t.childNodes[0].childNodes.length-1].childNodes[0]);s.forEach((t=>t.addAnnotation("Emph","left"))),e=e.concat(s),t.childNodes[0].childNodes.pop()}Cf.tableToMultiline(t);const s=Cf.getInstance().row(e),i=t.annotation.Emph;return t.annotation.Emph=["table"],i.forEach((t=>s.addAnnotation("Emph",t))),s}),(t=>{let e=!0,s=!0;if(Ff(t.childNodes[0].childNodes[0].mathmlTree)){for(let s,i=1;s=t.childNodes[i];i++)if(s.childNodes[0].childNodes.length){e=!1;break}}else e=!1;e&&t.addAnnotation("Emph","left");if(Ff(t.childNodes[0].childNodes[t.childNodes[0].childNodes.length-1].mathmlTree)){const e=t.childNodes[0].childNodes.length;for(let i,r=1;i=t.childNodes[r];r++)if(i.childNodes.length>=e){s=!1;break}}else s=!1;return s&&t.addAnnotation("Emph","right"),e||s})));const jf=[Jp.PUNCTUATED,Jp.RELSEQ,Jp.MULTIREL,Jp.INFIXOP,Jp.PREFIXOP,Jp.POSTFIXOP];function Uf(t,e){if(!t.childNodes.length)return Hf(t),[t];let s=null;if(t.type===Jp.PUNCTUATED&&(e?t.role===$p.ENDPUNCT:t.role===$p.STARTPUNCT)){const i=t.childNodes;Hf(i[e?i.length-1:0])&&(t=i[e?0:i.length-1],s=i[e?i.length-1:0])}if(-1!==jf.indexOf(t.type)){const i=t.childNodes;Hf(i[e?i.length-1:0]);const r=Df.combineContentChildren(t.type,t.role,t.contentNodes,t.childNodes);return s&&(e?r.push(s):r.unshift(s)),r}return s?e?[t,s]:[s,t]:[t]}const qf={[$p.METRIC]:$p.METRIC,[$p.VBAR]:$p.NEUTRAL,[$p.OPENFENCE]:$p.OPEN,[$p.CLOSEFENCE]:$p.CLOSE};function Hf(t){if(t.type!==Jp.PUNCTUATION)return!1;const e=qf[t.role];return!!e&&(t.role=e,t.type=Jp.FENCE,t.addAnnotation("Emph","fence"),!0)}function Wf(t,e,s,i=s){const r=[];for(;t&&t.role===s;)r.push(t),t=e.shift();return r.length?(t&&e.unshift(t),[1===r.length?r[0]:zf(r,i),e]):[t,e]}function zf(t,e){const s=vf.factory.makeBranchNode(Jp.PUNCTUATION,t,[]);return s.role=e,s}function Xf(t){return["[","\uff3b"].includes(t)}function Vf(t){return["]","\uff3d"].includes(t)}function Gf(t){return["(","\u207d","\u208d"].includes(t)}function Jf(t){return[")","\u207e","\u208e"].includes(t)}function Kf(t){return t.role===$p.INFTY||t.type===Jp.PREFIXOP&&t.childNodes[0].role===$p.INFTY}function $f(t){const e=t.childNodes[0];if(t.type!==Jp.FENCED||(null==e?void 0:e.type)!==Jp.PUNCTUATED||3!==(null==e?void 0:e.childNodes.length)||1!==(null==e?void 0:e.contentNodes.length)||(null==e?void 0:e.childNodes[1].role)!==$p.COMMA)return!1;const s=t.childNodes[0].childNodes[0],i=t.childNodes[0].childNodes[2],r=t.contentNodes[0].textContent,n=t.contentNodes[1].textContent;return!!(Xf(r)&&Jf(n)||Gf(r)&&Vf(n))||!(!Gf(r)||!Jf(n)||!Kf(s)&&!Kf(i))}function Yf(t){return eg(t)||function(t){return Zf(t)||t.type===Jp.INFIXOP&&t.role===$p.IMPLICIT&&(2===t.childNodes.length&&(Zf(t.childNodes[0])||eg(t.childNodes[0]))&&Zf(t.childNodes[1])||3===t.childNodes.length&&eg(t.childNodes[0])&&Zf(t.childNodes[1])&&Zf(t.childNodes[2]))}(t)||function(t){return t.type===Jp.PUNCTUATED&&t.role===$p.ENDPUNCT&&2===t.childNodes.length&&t.childNodes[1].role===$p.DEGREE&&(Zf(t.childNodes[0])||tg(t.childNodes[0])||t.childNodes[0].type===Jp.PREFIXOP&&t.childNodes[0].role===$p.NEGATIVE&&(Zf(t.childNodes[0].childNodes[0])||tg(t.childNodes[0].childNodes[0])))}(t)||function(t){return t.type===Jp.PREFIXOP&&t.role===$p.NEGATIVE&&Qf(t.childNodes[0])&&t.childNodes[0].type!==Jp.PREFIXOP&&t.childNodes[0].type!==Jp.APPL&&t.childNodes[0].type!==Jp.PUNCTUATED}(t)||function(t){return t.type===Jp.APPL&&(t.childNodes[0].role===$p.PREFIXFUNC||t.childNodes[0].role===$p.SIMPLEFUNC)&&(Qf(t.childNodes[1])||t.childNodes[1].type===Jp.FENCED&&Qf(t.childNodes[1].childNodes[0]))}(t)}function Qf(t){return t.hasAnnotation("clearspeak","simple")}function Zf(t){return t.type===Jp.IDENTIFIER&&(t.role===$p.LATINLETTER||t.role===$p.GREEKLETTER||t.role===$p.OTHERLETTER||t.role===$p.SIMPLEFUNC)}function tg(t){return t.type===Jp.NUMBER&&(t.role===$p.INTEGER||t.role===$p.FLOAT)}function eg(t){return tg(t)||function(t){if(sg("Fraction_Over")||sg("Fraction_FracOver"))return!1;if(t.type!==Jp.FRACTION||t.role!==$p.VULGAR)return!1;if(sg("Fraction_Ordinal"))return!0;const e=parseInt(t.childNodes[0].textContent,10),s=parseInt(t.childNodes[1].textContent,10);return e>0&&e<20&&s>0&&s<11}(t)}function sg(t){return gp.getInstance().options.style===t}function ig(t){return t.type===Jp.TEXT&&t.role!==$p.LABEL||t.type===Jp.PUNCTUATED&&t.role===$p.TEXT&&tg(t.childNodes[0])&&function(t){for(let e=0;e<t.length-1;e++)if(t[e].type!==Jp.TEXT||""!==t[e].textContent)return!1;return t[t.length-1].type===Jp.TEXT}(t.childNodes.slice(1))||t.type===Jp.IDENTIFIER&&t.role===$p.UNIT||t.type===Jp.INFIXOP&&(t.role===$p.IMPLICIT||t.role===$p.UNIT)}vf.add(new kf("ellipses",(t=>{const e=[];let s=t.shift();for(;s;)[s,t]=Wf(s,t,$p.FULLSTOP,$p.ELLIPSIS),[s,t]=Wf(s,t,$p.DASH),e.push(s),s=t.shift();return e}),(t=>t.length>1))),vf.add(new kf("op_with_limits",(t=>{const e=t[0];return e.type=Jp.LARGEOP,e.role=$p.SUM,t}),(t=>t[0].type===Jp.OPERATOR&&t.slice(1).some((t=>t.type===Jp.RELSEQ||t.type===Jp.MULTIREL||t.type===Jp.INFIXOP&&t.role===$p.ELEMENT||t.type===Jp.PUNCTUATED&&t.role===$p.SEQUENCE))))),vf.add(new class extends wf{}("function_from_identifiers",(t=>{const e=Cp(t.childNodes).map((t=>t.textContent.trim())).join("");if(nm.Meaning.get(e).type===Jp.UNKNOWN)return t;const s=vf.factory.makeLeafNode(e,Cf.getInstance().font(t.getAttribute("mathvariant")));return s.mathmlTree=t,s}),(t=>{const e=Cp(t.childNodes);return!(e.length<2)&&e.every((t=>Mp(t)===Em.MI&&nm.Meaning.get(t.textContent.trim()).role===$p.LATINLETTER))}))),vf.add(new kf("bracketed_interval",(t=>{const e=t[0],s=t[1],i=t.slice(2),r=Cf.getInstance().row(i),n=vf.factory.makeBranchNode(Jp.FENCED,[r],[e,s]);return n.role=$p.INTERVAL,n}),(t=>{const e=t[0],s=t[1],i=t.slice(2);if(!(e&&s&&(Vf(e.textContent)&&(Xf(s.textContent)||Vf(s.textContent))||Xf(s.textContent)&&(Xf(e.textContent)||Vf(e.textContent)))))return!1;if(1===i.length&&i[0].type===Jp.PUNCTUATED&&1===i[0].contentNodes.length)return!0;const r=Rm(i,$m);return!(1!==r.rel.length||!r.comp[0].length||!r.comp[1].length)}))),vf.add(new _f("interval_heuristic",(t=>(t.role=$p.INTERVAL,t)),(t=>$f(t)))),vf.add(new _f("propagateInterval",(t=>(t.childNodes.forEach((t=>{$f(t)&&(t.role=$p.INTERVAL)})),t)),(t=>xf(t)))),Pp(new Sp("clearspeak","simple",(function(t){return Yf(t)?"simple":""}))),Bp("clearspeak","simple"),Pp(new Sp("clearspeak","unit",(function(t){return ig(t)?"unit":""}))),Bp("clearspeak","unit");const rg=[Jp.MULTIREL,Jp.RELSEQ,Jp.APPL,Jp.ROW,Jp.LINE],ng=[Jp.SUBSCRIPT,Jp.SUPERSCRIPT,Jp.OVERSCORE,Jp.UNDERSCORE];function og(t,e){const s=t.parent;if(!s)return!1;const i=s.type;return-1!==rg.indexOf(i)||i===Jp.PREFIXOP&&s.role===$p.NEGATIVE&&!e.script&&!e.enclosed||i===Jp.PREFIXOP&&s.role===$p.GEOMETRY||!(i!==Jp.PUNCTUATED||e.enclosed&&s.role!==$p.TEXT)}Pp(new Rp("nemeth","number",(function(t,e){return t.childNodes.length?(-1!==ng.indexOf(t.type)&&(e.script=!0),t.type===Jp.FENCED?(e.number=!1,e.enclosed=!0,["",e]):t.type===Jp.PREFIXOP&&t.role!==$p.GEOMETRY&&t.role!==$p.NEGATIVE?(e.number=!1,["",e]):(og(t,e)&&(e.number=!0,e.enclosed=!1),["",e])):(og(t,e)&&(e.number=!0,e.script=!1,e.enclosed=!1),[e.number?"number":"",{number:!1,enclosed:e.enclosed,script:e.script}])}),{number:!0})),Bp("nemeth","number"),Pp(new Rp("depth","depth",(function(t){return t.parent?[parseInt(t.parent.annotation.depth[0])+1]:[1]}))),Bp("depth","depth");class ag{static empty(){const t=Tp("<math/>"),e=new ag(t,new up);return e.mathml=t,e}static fromNode(t,e){const s=ag.empty();return s.root=t,e&&(s.mathml=e),s}static fromRoot(t,e){let s=t;for(;s.parent;)s=s.parent;const i=ag.fromNode(s);return e&&(i.mathml=e),i}static fromXml(t){const e=ag.empty();return t.childNodes[0]&&(e.root=Dm.fromXml(t.childNodes[0])),e}constructor(t,e){this.mathml=t,this.options=e,this.parser=new Tf(e),this.root=this.parser.parse(t),this.collator=this.parser.getFactory().leafMap.collateMeaning();const s=this.collator.newDefault();s&&(this.parser=new Tf(e),this.parser.getFactory().defaultMap=s,this.root=this.parser.parse(t)),cg.visit(this.root,{}),function(t){for(const e of Op.values())e.active&&e.annotate(t);for(const e of Dp.values())e.active&&e.visit(t,Object.assign({},e.def))}(this.root)}xml(t){const e=Tp("<stree></stree>"),s=this.root.xml(e.ownerDocument,t);return e.appendChild(s),e}toString(t){return Ip(this.xml(t))}formatXml(t){return Ap(this.toString(t))}displayTree(){this.root.displayTree()}replaceNode(t,e){const s=t.parent;s?s.replaceChild(t,e):this.root=e}toJson(){const t={};return t.stree=this.root.toJson(),t}}const cg=new Rp("general","unit",((t,e)=>(mf(t)&&(t.role=$p.UNIT),!1)));function lg(t,e){return new ag(t,e)}const hg=[],dg=!0,ug=new Map;function pg(t){hp.getInstance().generate((()=>["WALKING START: ",t.toString()]));const e=function(t){for(let e,s=0;e=hg[s];s++)if(e.test(t))return e.constr(t);return null}(t);let s;if(e)return s=e.getMathml(),hp.getInstance().generate((()=>["WALKING END: ",t.toString()])),Tg(s);if(1===t.mathml.length){if(hp.getInstance().output("Walktree Case 0"),!t.childNodes.length)return hp.getInstance().output("Walktree Case 0.1"),s=t.mathml[0],Rf(s,t),hp.getInstance().generate((()=>["WALKING END: ",t.toString()])),Tg(s);const e=t.childNodes[0];if(1===t.childNodes.length&&e.type===Jp.EMPTY)return hp.getInstance().output("Walktree Case 0.2"),s=t.mathml[0],Rf(s,t),s.appendChild(pg(e)),hp.getInstance().generate((()=>["WALKING END: ",t.toString()])),Tg(s);t.childNodes.forEach((t=>{t.mathml.length||(t.mathml=[Sg(t)])}))}const i=t.contentNodes.map(Mg);Rg(t,i);const r=t.childNodes.map(pg),n=Df.combineContentChildren(t.type,t.role,i,r);if(s=t.mathmlTree,null===s)hp.getInstance().output("Walktree Case 1"),s=mg(n,t);else{const t=xg(n);hp.getInstance().output("Walktree Case 2"),t?(hp.getInstance().output("Walktree Case 2.1"),s=Ag(t)):(hp.getInstance().output("Walktree Case 2.2"),s=Og(s))}return s=Ig(s),function(t,e,s){if(!e.length)return;if(1===e.length&&t===e[0])return;const i=s.role===$p.IMPLICIT&&vf.flags.combine_juxtaposition?function(t,e,s){const i=[];let r=Cp(t.childNodes),n=!1;for(;r.length;){const t=r.shift();if(t.hasAttribute(Mf.TYPE)){i.push(t);continue}const s=gg(t,e);0!==s.length&&(1!==s.length?(n?t.setAttribute("AuxiliaryImplicit",!0):n=!0,r=s.concat(r)):i.push(t))}const o=[],a=s.childNodes.map((function(t){return t.mathmlTree}));for(;a.length;){const t=a.pop();if(t){if(-1!==i.indexOf(t))break;-1!==e.indexOf(t)&&o.unshift(t)}}return i.concat(o)}(t,e,s):Cp(t.childNodes);if(!i.length)return void e.forEach((function(e){t.appendChild(e)}));let r=0;for(;e.length;){const s=e[0];if(i[r]===s||Ng(i[r],s)){e.shift(),r++;continue}if(i[r]&&-1===e.indexOf(i[r])){r++;continue}if(Eg(s,t)){e.shift();continue}const n=i[r];if(n)bg(t,n,s),e.shift();else{if(s.parentNode){t=Ag(s),e.shift();continue}const i=e[1];if(i&&i.parentNode){(t=Ag(i)).insertBefore(s,i),e.shift(),e.shift();continue}t.insertBefore(s,null),e.shift()}}}(s,n,t),ug.has(t.id)||(ug.set(t.id,!0),Rf(s,t)),hp.getInstance().generate((()=>["WALKING END: ",t.toString()])),Tg(s)}function mg(t,e){const s=function(t){const e=xg(t);if(!e)return{type:yg.INVALID,node:null};const s=xg(t.slice().reverse());if(e===s)return{type:yg.VALID,node:e};const i=vg(e),r=function(t,e){let s=0;for(;t[s]&&-1===e.indexOf(t[s]);)s++;return t.slice(0,s+1)}(i,t),n=vg(s,(function(t){return-1!==r.indexOf(t)})),o=n[0],a=r.indexOf(o);if(-1===a)return{type:yg.INVALID,node:null};return{type:r.length!==i.length?yg.PRUNED:Cg(r[a+1],n[1])?yg.VALID:yg.INVALID,node:o}}(t);let i=s.node;const r=s.type;if(r!==yg.VALID||!km(i)||!i.parentNode&&e.parent)if(hp.getInstance().output("Walktree Case 1.1"),i=Of(),r===yg.PRUNED)hp.getInstance().output("Walktree Case 1.1.0"),i=function(t,e,s){let i=wg(e);if(wm(i)){hp.getInstance().output("Walktree Case 1.1.0.0"),fg(i,t),Cp(i.childNodes).forEach((function(e){t.appendChild(e)}));const e=t;t=i,i=e}const r=s.indexOf(e);return s[r]=i,_p(i,t),t.appendChild(i),s.forEach((function(e){t.appendChild(e)})),t}(i,s.node,t);else if(t[0]){hp.getInstance().output("Walktree Case 1.1.1");const e=xg(t);if(e){const s=function(t,e){const s=Cp(t.childNodes);let i=1/0,r=-1/0;return e.forEach((function(t){const e=s.indexOf(t);-1!==e&&(i=Math.min(i,e),r=Math.max(r,e))})),s.slice(i,r+1)}(Ag(e),t);_p(e,i),s.forEach((function(t){i.appendChild(t)}))}else fg(i,t[0]),i=t[0]}return e.mathmlTree||(e.mathmlTree=i),i}function fg(t,e){for(const s of If)t.hasAttribute(s)&&(e.setAttribute(s,t.getAttribute(s)),t.removeAttribute(s))}function gg(t,e){const s=[];let i=Cp(t.childNodes);for(;i.length;){const t=i.shift();t.nodeType===wp.ELEMENT_NODE&&(t.hasAttribute(Mf.TYPE)||-1!==e.indexOf(t)?s.push(t):i=Cp(t.childNodes).concat(i))}return s}function bg(t,e,s){let i=e,r=Ag(i);for(;r&&r.firstChild===i&&!i.hasAttribute("AuxiliaryImplicit")&&r!==t;)i=r,r=Ag(i);r&&(r.insertBefore(s,i),i.removeAttribute("AuxiliaryImplicit"))}function Eg(t,e){if(!t)return!1;do{if((t=Ag(t))===e)return!0}while(t);return!1}function Ng(t,e){const s=sm.functionApplication;if(t&&e&&t.textContent&&e.textContent&&t.textContent===s&&e.textContent===s&&"true"===e.getAttribute(Mf.ADDED)){for(let s,i=0;s=t.attributes[i];i++)e.hasAttribute(s.nodeName)||e.setAttribute(s.nodeName,s.nodeValue);return _p(t,e),!0}return!1}var yg;function xg(t){let e=0,s=null;for(;!s&&e<t.length;)t[e].parentNode&&(s=t[e]),e++;return s}function vg(t,e){const s=e||(t=>!1),i=[t];for(;!s(t)&&!wm(t)&&t.parentNode;)t=Ag(t),i.unshift(t);return i}function Cg(t,e){return!(!t||!e||t.previousSibling||e.nextSibling)}function Tg(t){for(;!wm(t)&&_g(t);)t=Ag(t);return t}function wg(t){const e=Cp(t.childNodes);if(!e)return t;const s=e.filter((function(t){return t.nodeType===wp.ELEMENT_NODE&&!_m(t)}));return 1===s.length&&km(s[0])&&!s[0].hasAttribute(Mf.TYPE)?wg(s[0]):t}function _g(t){const e=Ag(t);return!(!e||!km(e))&&Cp(e.childNodes).every((function(e){return e===t||kg(e)}))}function kg(t){if(t.nodeType!==wp.ELEMENT_NODE)return!0;if(!t||_m(t))return!0;const e=Cp(t.childNodes);return!(!km(t)&&e.length||function(t){return!!t&&Cm.includes(Mp(t))}(t)||t.hasAttribute(Mf.TYPE)||Am(t))&&Cp(t.childNodes).every(kg)}function Ag(t){return t.parentNode}function Lg(t,e){const s=new Df(e);t.setAttribute(Mf.COLLAPSED,s.toString())}function Mg(t){if(t.mathml.length)return pg(t);const e=dg?Sg(t):Of();return t.mathml=[e],e}function Ig(t){if(Mp(t)!==Em.MFENCED)return t;const e=Of();for(let s,i=0;s=t.attributes[i];i++)-1===["open","close","separators"].indexOf(s.name)&&e.setAttribute(s.name,s.value);return Cp(t.childNodes).forEach((function(t){e.appendChild(t)})),_p(t,e),e}function Sg(t){const e=kp("mo"),s=(i=t.textContent,cp.f.document.createTextNode(i));var i;return e.appendChild(s),Rf(e,t),e.setAttribute(Mf.ADDED,"true"),e}function Rg(t,e){const s=t.type+(t.textContent?","+t.textContent:"");e.forEach((function(t){Og(t).setAttribute(Mf.OPERATOR,s)}))}function Og(t){const e=Cp(t.childNodes);if(!e)return t;const s=e.filter((function(t){return!kg(t)})),i=[];for(let t,e=0;t=s[e];e++)if(km(t)&&t.getAttribute(Mf.TYPE)!==Jp.PUNCTUATION){const e=Og(t);e&&e!==t&&i.push(e)}else i.push(t);return 1===i.length?i[0]:t}function Dg(t){return Ap(t.toString()).toString().replace(new RegExp(Lf,"g"),"")}function Pg(t,e){const s=!!e,i=e||[],r=t.parent,n=t.contentNodes.map((function(t){return t.id}));n.unshift("c");const o=[t.id,n];for(let e,n=0;e=t.childNodes[n];n++){const t=pg(e);i.push(t);const n=Og(t);r&&!s&&n.setAttribute(Mf.PARENT,r.id.toString()),o.push(e.id)}return o}!function(t){t.VALID="valid",t.INVALID="invalid",t.PRUNED="pruned"}(yg||(yg={}));class Bg{constructor(t){this.semantic=t}}class Fg extends Bg{static test(t){return!t.mathmlTree&&t.type===Jp.LINE&&t.role===$p.BINOMIAL}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){if(!this.semantic.childNodes.length)return this.mml;const t=this.semantic.childNodes[0];if(this.mml=pg(t),this.mml.hasAttribute(Mf.TYPE)){const t=Of();_p(this.mml,t),t.appendChild(this.mml),this.mml=t}return Rf(this.mml,this.semantic),this.mml}}class jg extends Bg{static test(t){if(!t.mathmlTree||!t.childNodes.length)return!1;const e=Mp(t.mathmlTree),s=t.childNodes[0].role;return e===Em.MSUBSUP&&s===$p.SUBSUP||e===Em.MUNDEROVER&&s===$p.UNDEROVER}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){const t=this.semantic.childNodes[0],e=t.childNodes[0],s=this.semantic.childNodes[1],i=t.childNodes[1],r=pg(s),n=pg(e),o=pg(i);return Rf(this.mml,this.semantic),this.mml.setAttribute(Mf.CHILDREN,Sf([e,i,s])),[n,o,r].forEach((t=>Og(t).setAttribute(Mf.PARENT,this.mml.getAttribute(Mf.ID)))),this.mml.setAttribute(Mf.TYPE,t.role),Lg(this.mml,[this.semantic.id,[t.id,e.id,i.id],s.id]),this.mml}}class Ug extends Bg{static multiscriptIndex(t){return t.type===Jp.PUNCTUATED&&t.contentNodes[0].role===$p.DUMMY?Pg(t):(pg(t),t.id)}static createNone_(t){const e=kp("none");return t&&Rf(e,t),e.setAttribute(Mf.ADDED,"true"),e}constructor(t){super(t),this.mml=t.mathmlTree}completeMultiscript(t,e){const s=Cp(this.mml.childNodes).slice(1);let i=0;const r=t=>{for(const e of t){const t=s[i];if(t&&e===parseInt(t.getAttribute(Mf.ID)))t.setAttribute(Mf.PARENT,this.semantic.id.toString()),i++;else if(t&&e===parseInt(Og(t).getAttribute(Mf.ID)))Og(t).setAttribute(Mf.PARENT,this.semantic.id.toString()),i++;else{const s=this.semantic.querySelectorAll((t=>t.id===e));this.mml.insertBefore(Ug.createNone_(s[0]),t||null)}}};r(t),s[i]&&Mp(s[i])!==Em.MPRESCRIPTS?this.mml.insertBefore(s[i],kp("mprescripts")):i++,r(e)}}class qg extends Ug{static test(t){if(!t.mathmlTree)return!1;return Mp(t.mathmlTree)===Em.MMULTISCRIPTS&&(t.type===Jp.SUPERSCRIPT||t.type===Jp.SUBSCRIPT)}constructor(t){super(t)}getMathml(){let t,e,s;if(Rf(this.mml,this.semantic),this.semantic.childNodes[0]&&this.semantic.childNodes[0].role===$p.SUBSUP){const i=this.semantic.childNodes[0];t=i.childNodes[0],e=Ug.multiscriptIndex(this.semantic.childNodes[1]),s=Ug.multiscriptIndex(i.childNodes[1]);const r=[this.semantic.id,[i.id,t.id,s],e];Lg(this.mml,r),this.mml.setAttribute(Mf.TYPE,i.role),this.completeMultiscript(Df.interleaveIds(s,e),[])}else{t=this.semantic.childNodes[0],e=Ug.multiscriptIndex(this.semantic.childNodes[1]);const s=[this.semantic.id,t.id,e];Lg(this.mml,s)}const i=Df.collapsedLeafs(s||[],e);return Og(pg(t)).setAttribute(Mf.PARENT,this.semantic.id.toString()),i.unshift(t.id),this.mml.setAttribute(Mf.CHILDREN,i.join(",")),this.mml}}class Hg extends Ug{static test(t){return!!t.mathmlTree&&t.type===Jp.TENSOR}constructor(t){super(t)}getMathml(){pg(this.semantic.childNodes[0]);const t=Ug.multiscriptIndex(this.semantic.childNodes[1]),e=Ug.multiscriptIndex(this.semantic.childNodes[2]),s=Ug.multiscriptIndex(this.semantic.childNodes[3]),i=Ug.multiscriptIndex(this.semantic.childNodes[4]);Rf(this.mml,this.semantic);const r=[this.semantic.id,this.semantic.childNodes[0].id,t,e,s,i];Lg(this.mml,r);const n=Df.collapsedLeafs(t,e,s,i);return n.unshift(this.semantic.childNodes[0].id),this.mml.setAttribute(Mf.CHILDREN,n.join(",")),this.completeMultiscript(Df.interleaveIds(s,i),Df.interleaveIds(t,e)),this.mml}}class Wg extends Bg{static test(t){return!(!t.mathmlTree||!t.fencePointer||t.mathmlTree.getAttribute("data-semantic-type"))}static makeEmptyNode_(t){const e=Of(),s=new Dm(t);return s.type=Jp.EMPTY,s.mathmlTree=e,s}static fencedMap_(t,e){e[t.id]=t.mathmlTree,t.embellished&&Wg.fencedMap_(t.childNodes[0],e)}constructor(t){super(t),this.fenced=null,this.fencedMml=null,this.fencedMmlNodes=[],this.ofence=null,this.ofenceMml=null,this.ofenceMap={},this.cfence=null,this.cfenceMml=null,this.cfenceMap={},this.parentCleanup=[]}getMathml(){this.getFenced_(),this.fencedMml=pg(this.fenced),this.getFencesMml_(),this.fenced.type!==Jp.EMPTY||this.fencedMml.parentNode||(this.fencedMml.setAttribute(Mf.ADDED,"true"),this.cfenceMml.parentNode.insertBefore(this.fencedMml,this.cfenceMml)),this.getFencedMml_();return this.rewrite_()}fencedElement(t){return t.type===Jp.FENCED||t.type===Jp.MATRIX||t.type===Jp.VECTOR}getFenced_(){let t=this.semantic;for(;!this.fencedElement(t);)t=t.childNodes[0];this.fenced=t.childNodes[0],this.ofence=t.contentNodes[0],this.cfence=t.contentNodes[1],Wg.fencedMap_(this.ofence,this.ofenceMap),Wg.fencedMap_(this.cfence,this.cfenceMap)}getFencedMml_(){let t=this.ofenceMml.nextSibling;for(t=t===this.fencedMml?t:this.fencedMml;t&&t!==this.cfenceMml;)this.fencedMmlNodes.push(t),t=t.nextSibling}getFencesMml_(){let t=this.semantic;const e=Object.keys(this.ofenceMap),s=Object.keys(this.cfenceMap);for(;!(this.ofenceMml&&this.cfenceMml||t===this.fenced);)-1===e.indexOf(t.fencePointer)||this.ofenceMml||(this.ofenceMml=t.mathmlTree),-1===s.indexOf(t.fencePointer)||this.cfenceMml||(this.cfenceMml=t.mathmlTree),t=t.childNodes[0];this.ofenceMml||(this.ofenceMml=this.ofence.mathmlTree),this.cfenceMml||(this.cfenceMml=this.cfence.mathmlTree),this.ofenceMml&&(this.ofenceMml=Tg(this.ofenceMml)),this.cfenceMml&&(this.cfenceMml=Tg(this.cfenceMml))}rewrite_(){let t=this.semantic,e=null;const s=this.introduceNewLayer_();for(Rf(s,this.fenced.parent);!this.fencedElement(t);){const i=t.mathmlTree,r=this.specialCase_(t,i);if(r)t=r;else{Rf(i,t);const e=[];for(let s,i=1;s=t.childNodes[i];i++)e.push(pg(s));t=t.childNodes[0]}const n=kp("dummy"),o=i.childNodes[0];_p(i,n),_p(s,i),_p(i.childNodes[0],s),_p(n,o),e||(e=i)}return pg(this.ofence),pg(this.cfence),this.cleanupParents_(),e||s}specialCase_(t,e){const s=Mp(e);let i,r=null;if(s===Em.MSUBSUP?(r=t.childNodes[0],i=jg):s===Em.MMULTISCRIPTS&&(t.type===Jp.SUPERSCRIPT||t.type===Jp.SUBSCRIPT?i=qg:t.type===Jp.TENSOR&&(i=Hg),r=i&&t.childNodes[0]&&t.childNodes[0].role===$p.SUBSUP?t.childNodes[0]:t),!r)return null;const n=r.childNodes[0],o=Wg.makeEmptyNode_(n.id);return r.childNodes[0]=o,e=new i(t).getMathml(),r.childNodes[0]=n,this.parentCleanup.push(e),r.childNodes[0]}introduceNewLayer_(){const t=this.fullFence(this.ofenceMml),e=this.fullFence(this.cfenceMml);let s=Of();if(_p(this.fencedMml,s),this.fencedMmlNodes.forEach((t=>s.appendChild(t))),s.insertBefore(t,this.fencedMml),s.appendChild(e),!s.parentNode){const t=Of();for(;s.childNodes.length>0;)t.appendChild(s.childNodes[0]);s.appendChild(t),s=t}return s}fullFence(t){const e=this.fencedMml.parentNode;let s=t;for(;s.parentNode&&s.parentNode!==e;)s=s.parentNode;return s}cleanupParents_(){this.parentCleanup.forEach((function(t){const e=t.childNodes[1].getAttribute(Mf.PARENT);t.childNodes[0].setAttribute(Mf.PARENT,e)}))}}class zg extends Bg{static test(t){return!!t.mathmlTree&&t.hasAnnotation("Emph","top")}constructor(t){super(t),this.mrows=[],this.mml=t.mathmlTree}getMathml(){if(this.recurseToTable(this.semantic),this.mrows.length){const t=Of();this.mml.parentNode.insertBefore(t,this.mml);for(const e of this.mrows)t.appendChild(e);t.appendChild(this.mml)}return this.mml}recurseToTable(t){var e,s;if(t.hasAnnotation("Emph","top")||t.hasAnnotation("Emph","fence")||!t.hasAnnotation("Emph","left")&&!t.hasAnnotation("Emph","right")){if(!t.mathmlTree||Mp(t.mathmlTree)===Em.MTABLE&&(null===(e=t.annotation.Emph)||void 0===e?void 0:e.length)&&"table"!==t.annotation.Emph[0]){const e=Of();Rf(e,t),this.mrows.unshift(e)}else{if(Mp(t.mathmlTree)===Em.MTABLE&&(null===(s=t.annotation.Emph)||void 0===s?void 0:s.length)&&"table"===t.annotation.Emph[0])return void this.finalizeTable(t);Rf(t.mathmlTree,t)}if(t.childNodes.forEach(this.recurseToTable.bind(this)),t.textContent||"punctuated"===t.type){const e=t.contentNodes.map((t=>{const e=Mg(t);return e.hasAttribute("data-semantic-added")?this.mrows.unshift(e):this.recurseToTable(t),e}));Rg(t,e)}else t.contentNodes.forEach(this.recurseToTable.bind(this))}else pg(t)}finalizeTable(t){Rf(t.mathmlTree,t),t.contentNodes.forEach((t=>{pg(t)})),t.childNodes.forEach((t=>{pg(t)}))}}class Xg extends Bg{static test(t){if(!t.mathmlTree||!t.childNodes.length)return!1;const e=Mp(t.mathmlTree),s=t.type;return(s===Jp.LIMUPPER||s===Jp.LIMLOWER)&&(e===Em.MSUBSUP||e===Em.MUNDEROVER)||s===Jp.LIMBOTH&&(e===Em.MSUB||e===Em.MUNDER||e===Em.MSUP||e===Em.MOVER)}static walkTree_(t){t&&pg(t)}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){const t=this.semantic.childNodes;return this.semantic.type!==Jp.LIMBOTH&&this.mml.childNodes.length>=3&&(this.mml=mg([this.mml],this.semantic)),Rf(this.mml,this.semantic),t[0].mathmlTree||(t[0].mathmlTree=this.semantic.mathmlTree),t.forEach(Xg.walkTree_),this.mml}}class Vg extends Bg{static test(t){return!!t.mathmlTree&&t.type===Jp.LINE}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){return this.semantic.contentNodes.length&&pg(this.semantic.contentNodes[0]),this.semantic.childNodes.length&&pg(this.semantic.childNodes[0]),Rf(this.mml,this.semantic),this.mml}}class Gg extends Bg{static test(t){return!!t.mathmlTree&&(t.type===Jp.INFERENCE||t.type===Jp.PREMISES)}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){return this.semantic.childNodes.length?(this.semantic.contentNodes.forEach((function(t){pg(t),Rf(t.mathmlTree,t)})),this.semantic.childNodes.forEach((function(t){pg(t)})),Rf(this.mml,this.semantic),this.mml.getAttribute("data-semantic-id")===this.mml.getAttribute("data-semantic-parent")&&this.mml.removeAttribute("data-semantic-parent"),this.mml):this.mml}}class Jg extends Bg{static test(t){return t.type===Jp.MATRIX||t.type===Jp.VECTOR||t.type===Jp.CASES}constructor(t){super(t),this.inner=[],this.mml=t.mathmlTree}getMathml(){const t=Mg(this.semantic.contentNodes[0]),e=this.semantic.contentNodes[1]?Mg(this.semantic.contentNodes[1]):null;if(this.inner=this.semantic.childNodes.map(pg),this.mml)if(Mp(this.mml)===Em.MFENCED){const s=this.mml.childNodes;this.mml.insertBefore(t,s[0]||null),e&&this.mml.appendChild(e),this.mml=Ig(this.mml)}else{const s=[t,this.mml];e&&s.push(e),this.mml=mg(s,this.semantic)}else this.mml=mg([t].concat(this.inner,[e]),this.semantic);return Rf(this.mml,this.semantic),this.mml}}class Kg extends Bg{static test(t){return t.type===Jp.PUNCTUATED&&(t.role===$p.TEXT||t.contentNodes.every((t=>t.role===$p.DUMMY)))}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){const t=[],e=Pg(this.semantic,t);return this.mml=mg(t,this.semantic),Rf(this.mml,this.semantic),this.mml.removeAttribute(Mf.CONTENT),Lg(this.mml,e),this.mml}}function $g(t,e){const s=t.cloneNode(!0);return function(t,e,s){return hp.getInstance().generate((()=>["Original MathML",Dg(t)])),ug.clear(),pg(e.root),s.structure&&t.setAttribute(Mf.STRUCTURE,Df.fromStructure(t,e,s).toString()),hp.getInstance().generate((()=>["Semantic Tree\n",Dg(e),"Semantically enriched MathML\n",Dg(t)])),t}(s,lg(s,e),e)}hg.push({test:Xg.test,constr:t=>new Xg(t)},{test:Wg.test,constr:t=>new Wg(t)},{test:jg.test,constr:t=>new jg(t)},{test:Hg.test,constr:t=>new Hg(t)},{test:qg.test,constr:t=>new qg(t)},{test:Vg.test,constr:t=>new Vg(t)},{test:Fg.test,constr:t=>new Fg(t)},{test:Gg.test,constr:t=>new Gg(t)},{test:zg.test,constr:t=>new zg(t)},{test:Jg.test,constr:t=>new Jg(t)},{test:Kg.test,constr:t=>new Kg(t)});const Yg=new sp({AbsoluteValue:["Auto","AbsEnd","Cardinality","Determinant"],Bar:["Auto","Conjugate"],Caps:["Auto","SayCaps"],CombinationPermutation:["Auto","ChoosePermute"],Currency:["Auto","Position","Prefix"],Ellipses:["Auto","AndSoOn"],Enclosed:["Auto","EndEnclose"],Exponent:["Auto","AfterPower","Ordinal","OrdinalPower","Exponent"],Fraction:["Auto","EndFrac","FracOver","General","GeneralEndFrac","Ordinal","Over","OverEndFrac","Per"],Functions:["Auto","None","Reciprocal"],Inference:["Auto","Long"],ImpliedTimes:["Auto","MoreImpliedTimes","None"],Log:["Auto","LnAsNaturalLog"],Matrix:["Auto","Combinatoric","EndMatrix","EndVector","SilentColNum","SpeakColNum","Vector"],MultiLineLabel:["Auto","Case","Constraint","Equation","Line","None","Row","Step"],MultiLineOverview:["Auto","None"],MultiLinePausesBetweenColumns:["Auto","Long","Short"],MultsymbolDot:["Auto","Dot"],MultsymbolX:["Auto","By","Cross"],Paren:["Auto","CoordPoint","Interval","Silent","Speak","SpeakNestingLevel"],Prime:["Auto","Angle","Length"],Roots:["Auto","PosNegSqRoot","PosNegSqRootEnd","RootEnd"],SetMemberSymbol:["Auto","Belongs","Element","Member","In"],Sets:["Auto","SilentBracket","woAll"],TriangleSymbol:["Auto","Delta"],Trig:["Auto","ArcTrig","TrigInverse","Reciprocal"],VerticalLine:["Auto","Divides","Given","SuchThat"]}),Qg="Auto";function Zg(t){const e=t.split(":"),s={},i=Yg.getProperties(),r=Object.keys(i);for(let t,n=0;t=e[n];n++){const e=t.split("_");if(-1===r.indexOf(e[0]))continue;const n=e[1];n&&n!==Qg&&-1!==i[e[0]].indexOf(n)&&(s[e[0]]=e[1])}return s}function tb(t){const e=Object.keys(t),s=[];for(let i=0;i<e.length;i++)s.push(e[i]+"_"+t[e[i]]);return s.length?s.join(":"):ip.DEFAULT_VALUE}const eb=dp.u.LOCALES,sb=t=>gp.getInstance().setup(t),ib=()=>gp.getInstance().json(),rb=t=>function(t,e){const s=Tp(t);try{return $g(s,e)}catch(t){return console.error(t),s}}(t,gp.getInstance().options),nb=Tp,ob=function(t,e,s){if("default"===t)return e+"_"+s;const i=Zg(t);return i[e]=s,tb(i)},ab=Zg,cb=tb;var lb=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};let hb={},db=null;function ub(t){var e,s;const i=null==t?void 0:t.match(/^clearspeak-(.*)/);return db=null!==(s=null!==(e=i&&i[1])&&void 0!==e?e:db)&&void 0!==s?s:"default",db}const pb=new Map;const mb=new Map;let fb=0;function gb(t,e){const s=pb.get(e);!function(t,e){const s=t.pool.lookup("speechRules"),i=ub(t.settings.speechRules);hb=ab(i);for(const i of e)t.factory.get("variable")(t.factory,{name:"csprf_"+i,setter:t=>{hb[i]=t,s.setValue("clearspeak-"+cb(hb))},getter:()=>hb[i]||"Auto"},t.pool)}(t,Object.keys(s));const i=[];for(const t of Object.getOwnPropertyNames(s))i.push({title:t,values:s[t].map((e=>e.replace(RegExp("^"+t+"_"),""))),variable:"csprf_"+t});const r=t.factory.get("selectionBox")(t.factory,{title:"Clearspeak Preferences",signature:"",order:"alphabetic",grid:"square",selections:i},t);return{type:"command",id:"ClearspeakPreferences",content:"Select Preferences",action:()=>r.post(0,0)}}function bb(t,e,s){return lb(this,void 0,void 0,(function*(){var i,r;const n=i=>{s(t.factory.get("subMenu")(t.factory,{items:i,id:"Clearspeak"},e))};if(!t.settings.speech||!t.settings.enrich)return void n([]);const o=t.pool.lookup("locale").getValue();if(yield function(t,e){return lb(this,void 0,void 0,(function*(){pb.has(e)||(yield t.mathItem.generatorPool.getLocalePreferences(pb))}))}(t,o),!pb.get(o))return void n([]);const a=gb(t,o);let c=[];if(t.settings.speech){const e=t.mathItem,s=null===(i=null==e?void 0:e.explorers)||void 0===i?void 0:i.speech,n=ub(t.settings.speechRules);c=c.concat(function(t){return[{type:"radio",content:"No Preferences",id:"clearspeak-default",variable:"speechRules"},{type:"radio",content:"Current Preferences",id:"clearspeak-"+t,variable:"speechRules"},{type:"rule"}]}(n));const a=null==s?void 0:s.refocus,l=null!==(r=null==a?void 0:a.getAttribute("data-semantic-id"))&&void 0!==r?r:null,h=fb++;yield e.generatorPool.getRelevantPreferences(e,l,mb,h);const d=mb.get(h);if(mb.delete(h),d){const t=function(t,e,s){const i=pb.get(s);return[{type:"label",content:"Preferences for "+e},{type:"rule"}].concat(i[e].map((function(e){const[s,i]=e.split("_");return{type:"radioCompare",content:i,id:"clearspeak-"+ob(t,s,i),variable:"speechRules",comparator:(t,e)=>{if(t===e)return!0;if("Auto"!==i)return!1;const[r,n]=t.split("-"),[o]=e.split("-");return r===o&&!ab(n)[s]}}})))}(n,d,o);c=c.concat(t)}}c.splice(2,0,a),n(c)}))}Qu.DynamicSubmenus.set("Clearspeak",[bb,"speech"]);let Eb=null;function Nb(t,e,s){if(Eb)return void s(Eb);const i=[];for(const t of eb.keys())"nemeth"!==t&&"euro"!==t&&i.push({type:"radio",id:t,content:eb.get(t)||t,variable:"locale"});i.sort(((t,e)=>t.content.localeCompare(e.content,"en"))),Eb=t.factory.get("subMenu")(t.factory,{items:i,id:"Language"},e),s(Eb)}Qu.DynamicSubmenus.set("A11yLanguage",[Nb,"speech"]);const yb="MacOS"===hi.os;function xb(t){const e=hi.document,s=e.createElement("textarea");s.value=t,s.setAttribute("readonly",""),s.style.cssText="height: 1px; width: 1px; padding: 1px; position: absolute; left: -10px",e.body.appendChild(s),s.select();try{e.execCommand("copy")}catch(t){alert(`Can't copy to clipboard: ${t.message}`)}e.body.removeChild(s)}function vb(t,e,s){return(i,r)=>(function(t,e,s){if(!t)return;for(const i of t.childNodes)if(i.isKind("annotation")){const t=Tb(i,e);if(t){const e=i.childNodes.reduce(((t,e)=>t+e.toString()),"");s.push([t,e])}}}(function(t){var e;let s=null===(e=t.mathItem)||void 0===e?void 0:e.root;for(;s&&!s.isKind("semantics");){if(s.isToken||1!==s.childNodes.length)return null;s=s.childNodes[0]}return s}(i),e,s),t.attachMenu(i),_b(i,r,s,(()=>t.post())))}function Cb(t){return(e,s)=>{const i=t.slice();return t.length=0,_b(e,s,i,(()=>xb(wb.trim())))}}function Tb(t,e){const s=t.attributes.get("encoding");for(const t of Object.keys(e))if(e[t].includes(s))return t;return null}let wb="";function _b(t,e,s,i){return t.factory.get("subMenu")(t.factory,{items:s.map((([t,e])=>({type:"command",id:t,content:t,action:()=>{wb=e,i()}}))),id:"annotations"},e)}class kb extends Mu{static fromJson(t,{content:e,variable:s,id:i,comparator:r},n){return new this(n,e,s,i,r)}constructor(t,e,s,i,r){super(t,e,s,i),this.comparator=r,this.role="menuitemradiocompare"}updateAria(){this.html.setAttribute("aria-checked",this.comparator(this.variable.getValue(),this.id)?"true":"false")}updateSpan(){this.span.style.display=this.comparator(this.variable.getValue(),this.id)?"":"none"}}class Ab extends Jn{constructor(){super(...arguments),this.options={filterSRE:!0,filterTex:!0,texHints:!0,semantics:!1},this.mathItem=null}visitTree(t,e=null,s={}){return this.mathItem=e,Oi(this.options,s),this.visitNode(t,"")}visitTeXAtomNode(t,e){return this.options.texHints?super.visitDefault(t,e):t.childNodes[0]&&1===t.childNodes[0].childNodes.length?this.visitNode(t.childNodes[0],e):`${e}<mrow${this.getAttributes(t)}>\n`+this.childNodeMml(t,e+" ","\n")+`${e}</mrow>`}visitMathNode(t,e){if(!this.options.semantics||"TeX"!==this.mathItem.inputJax.name)return super.visitDefault(t,e);const s=t.childNodes.length&&t.childNodes[0].childNodes.length>1;return`${e}<math${this.getAttributes(t)}>\n${e} <semantics>\n`+(s?e+" <mrow>\n":"")+this.childNodeMml(t,e+(s?" ":" "),"\n")+(s?e+" </mrow>\n":"")+`${e} <annotation encoding="application/x-tex">`+this.mathItem.math+`</annotation>\n${e} </semantics>\n${e}</math>`}getAttributeList(t){const e=super.getAttributeList(t);if(this.options.filterTex&&(delete e["data-latex"],delete e["data-latex-item"]),this.options.filterSRE){const t=Object.keys(e).filter((t=>t.match(/^(?:data-semantic-.*?|data-speech-node|role|aria-(?:level|posinset|setsize|owns))$/)));for(const s of t)delete e[s]}return e}}class Lb extends Au{keydown(t){if("a"===t.key&&(t.ctrlKey||t.metaKey))return this.selectAll(),void this.stop(t);super.keydown(t)}selectAll(){document.getSelection().selectAllChildren(this.html.querySelector(".CtxtMenu_InfoContent").firstChild)}copyToClipboard(){this.selectAll();try{document.execCommand("copy")}catch(t){alert(`Can't copy to clipboard: ${t.message}`)}document.getSelection().removeAllRanges()}generateHtml(){super.generateHtml();const t=this.html.querySelector("span."+uu.INFOSIGNATURE).appendChild(document.createElement("input"));t.type="button",t.value="Copy to Clipboard",t.addEventListener("click",(t=>this.copyToClipboard()))}}var Mb=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};const Ib=ci;class Sb{get isLoading(){return Sb.loading>0}get loadingPromise(){return this.isLoading?(Sb._loadingPromise||(Sb._loadingPromise=new Promise(((t,e)=>{Sb._loadingOK=t,Sb._loadingFailed=e}))),Sb._loadingPromise):Promise.resolve()}postInfo(t){this.menu.mathItem&&(this.menu.nofocus=!!this.menu.mathItem.outputData.nofocus),t.post()}constructor(t,e={}){this.settings=null,this.defaultSettings=null,this.menu=null,this.current=null,this.MmlVisitor=new Ab,this.jax={CHTML:null,SVG:null},this.rerenderStart=rr.LAST,this.requiredExtensions=[],this.about=new Au('<b style="font-size:120%;">MathJax</b> v'+Yn.version,(()=>{const t=[];return t.push("Input Jax: "+this.document.inputJax.map((t=>t.name)).join(", ")),t.push("Output Jax: "+this.document.outputJax.name),t.push("Document Type: "+this.document.kind),t.join("<br/>")}),'<a href="https://www.mathjax.org">www.mathjax.org</a>'),this.help=new Au("<b>MathJax Help</b>",(()=>["<p><b>MathJax</b> is a JavaScript library that allows page"," authors to include mathematics within their web pages."," As a reader, you don't need to do anything to make that happen.</p>","<p><b>Browsers</b>: MathJax works with all modern browsers including"," Edge, Firefox, Chrome, Safari, Opera, and most mobile browsers.</p>","<p><b>Math Menu</b>: MathJax adds a contextual menu to equations."," Right-click or CTRL-click on any mathematics to access the menu.</p>",'<div style="margin-left: 1em;">',"<p><b>Show Math As:</b> These options allow you to view the formula's"," source markup (as MathML or in its original format).</p>","<p><b>Copy to Clipboard:</b> These options copy the formula's source markup,"," as MathML or in its original format, to the clipboard"," (in browsers that support that).</p>","<p><b>Math Settings:</b> These give you control over features of MathJax,"," such the size of the mathematics, the mechanism used to display equations,"," how to handle equations that are too wide, and the language to use for"," MathJax's menus and error messages (not yet implemented in v4).","</p>","<p><b>Accessibility</b>: MathJax can work with screen"," readers to make mathematics accessible to the visually impaired."," Turn on speech or braille generation to enable creation of speech strings"," and the ability to investigate expressions interactively. You can control"," the style of the explorer in its menu.</p>","</div>","<p><b>Math Zoom</b>: If you are having difficulty reading an"," equation, MathJax can enlarge it to help you see it better, or"," you can scale all the math on the page to make it larger."," Turn these features on in the <b>Math Settings</b> menu.</p>","<p><b>Preferences</b>: MathJax uses your browser's localStorage database"," to save the preferences set via this menu locally in your browser. These"," are not used to track you, and are not transferred or used remotely by"," MathJax in any way.</p>"].join("\n")),'<a href="https://www.mathjax.org">www.mathjax.org</a>'),this.mathmlCode=new Lb("MathJax MathML Expression",(()=>{if(!this.menu.mathItem)return"";const t=this.toMML(this.menu.mathItem);return"<pre>"+this.formatSource(t)+"</pre>"}),""),this.originalText=new Lb("MathJax Original Source",(()=>{if(!this.menu.mathItem)return"";const t=this.menu.mathItem.math;return'<pre style="font-size:125%; margin:0">'+this.formatSource(t)+"</pre>"}),""),this.annotationBox=new Lb("MathJax Annotation Text",(()=>{const t=wb;return'<pre style="font-size:125%; margin:0">'+this.formatSource(t)+"</pre>"}),""),this.svgImage=new Lb("MathJax SVG Image",(()=>'<div id="svg-image" style="font-family: monospace; font-size:125%; margin:0">Generative SVG Image...</div>'),""),this.speechText=new Lb("MathJax Speech Text",(()=>this.menu.mathItem?'<div style="font-size:125%; margin:0">'+this.formatSource(this.menu.mathItem.outputData.speech)+"</div>":""),""),this.brailleText=new Lb("MathJax Braille Code",(()=>this.menu.mathItem?'<div style="font-size:125%; margin:0">'+this.formatSource(this.menu.mathItem.outputData.braille)+"</div>":""),""),this.errorMessage=new Lb("MathJax Error Message",(()=>this.menu.mathItem?'<pre style="font-size:125%; margin:0">'+this.formatSource(this.menu.errorMsg)+"</pre>":""),""),this.zoomBox=new Au("MathJax Zoomed Expression",(()=>{if(!this.menu.mathItem)return"";const t=this.menu.mathItem.typesetRoot.cloneNode(!0);t.style.margin="0";return'<div style="font-size: '+1.25*parseFloat(this.settings.zscale)+'%">'+t.outerHTML+"</div>"}),""),this.document=t,this.options=Oi(Ri({},this.constructor.OPTIONS),e),this.initSettings(),this.mergeUserSettings(),this.initMenu(),this.applySettings()}initSettings(){var t;this.settings=this.options.settings,this.jax=this.options.jax;const e=this.document.outputJax;this.jax[e.name]=e,this.settings.renderer=e.name,this.settings.scale=e.options.scale,e.options.displayOverflow&&(this.settings.overflow=e.options.displayOverflow.substring(0,1).toUpperCase()+e.options.displayOverflow.substring(1).toLowerCase()),this.settings.breakInline=null===(t=e.options.linebreaks)||void 0===t?void 0:t.inline,this.defaultSettings=Object.assign({},this.document.options.a11y,this.settings),this.setA11y({roleDescription:this.settings.roleDescription})}initMenu(){const t=new Hu([["contextMenu",Qu.fromJson.bind(Qu)],["radioCompare",kb.fromJson.bind(kb)]]);this.menu=t.parse({type:"contextMenu",id:"MathJax_Menu",pool:[this.variable("showSRE"),this.variable("showTex"),this.variable("texHints"),this.variable("semantics"),this.variable("zoom"),this.variable("zscale"),this.variable("renderer",(t=>this.setRenderer(t))),this.variable("overflow",(t=>this.setOverflow(t))),this.variable("breakInline",(t=>this.setInlineBreaks(t))),this.variable("alt"),this.variable("cmd"),this.variable("ctrl"),this.variable("shift"),this.variable("scale",(t=>this.setScale(t))),this.a11yVar("speech",(t=>this.setSpeech(t))),this.a11yVar("braille",(t=>this.setBraille(t))),this.variable("brailleCode",(t=>this.setBrailleCode(t))),this.a11yVar("highlight",(t=>this.setHighlight(t))),this.a11yVar("backgroundColor"),this.a11yVar("backgroundOpacity"),this.a11yVar("foregroundColor"),this.a11yVar("foregroundOpacity"),this.a11yVar("subtitles"),this.a11yVar("viewBraille"),this.a11yVar("voicing"),this.a11yVar("roleDescription",(()=>this.setRoleDescription())),this.a11yVar("help"),this.a11yVar("locale",(t=>this.setLocale(t))),this.variable("speechRules",(t=>{const[e,s]=t.split("-");this.document.options.sre.domain=e,this.document.options.sre.style=s,this.rerender(rr.COMPILED)})),this.a11yVar("magnification"),this.a11yVar("magnify"),this.a11yVar("treeColoring"),this.a11yVar("infoType"),this.a11yVar("infoRole"),this.a11yVar("infoPrefix"),this.variable("autocollapse"),this.variable("collapsible",(t=>this.setCollapsible(t))),this.variable("enrich",(t=>this.setEnrichment(t))),this.variable("inTabOrder",(t=>this.setTabOrder(t))),this.a11yVar("tabSelects"),this.variable("assistiveMml",(t=>this.setAssistiveMml(t)))],items:[this.submenu("Show","Show Math As",[this.command("MathMLcode","MathML Code",(()=>this.postInfo(this.mathmlCode))),this.command("Original","Original Form",(()=>this.postInfo(this.originalText))),this.rule(),this.command("Speech","Speech Text",(()=>this.postInfo(this.speechText)),{disabled:!0}),this.command("Braille","Braille Code",(()=>this.postInfo(this.brailleText)),{disabled:!0}),this.command("SVG","SVG Image",(()=>this.postSvgImage()),{disabled:!0}),this.submenu("ShowAnnotation","Annotation"),this.rule(),this.command("Error","Error Message",(()=>this.postInfo(this.errorMessage)),{disabled:!0})]),this.submenu("Copy","Copy to Clipboard",[this.command("MathMLcode","MathML Code",(()=>this.copyMathML())),this.command("Original","Original Form",(()=>this.copyOriginal())),this.rule(),this.command("Speech","Speech Text",(()=>this.copySpeechText()),{disabled:!0}),this.command("Braille","Braille Code",(()=>this.copyBrailleText()),{disabled:!0}),this.command("SVG","SVG Image",(()=>this.copySvgImage()),{disabled:!0}),this.submenu("CopyAnnotation","Annotation"),this.rule(),this.command("Error","Error Message",(()=>this.copyErrorMessage()),{disabled:!0})]),this.rule(),this.submenu("Settings","Math Settings",[this.submenu("Renderer","Math Renderer",this.radioGroup("renderer",[["CHTML"],["SVG"]])),this.submenu("Overflow","Wide Expressions",[this.radioGroup("overflow",[["Overflow"],["Scroll"],["Linebreak"],["Scale"],["Truncate"],["Elide"]]),this.rule(),this.checkbox("BreakInline","Allow In-line Breaks","breakInline")]),this.rule(),this.submenu("MathmlIncludes","MathML/SVG has",[this.checkbox("showSRE","Semantic attributes","showSRE"),this.checkbox("showTex","LaTeX attributes","showTex"),this.checkbox("texHints","TeX hints","texHints"),this.checkbox("semantics","Original as annotation","semantics")]),this.submenu("Language","Language"),this.rule(),this.submenu("ZoomTrigger","Zoom Trigger",[this.command("ZoomNow","Zoom Once Now",(()=>this.zoom(null,"",this.menu.mathItem))),this.rule(),this.radioGroup("zoom",[["Click"],["DoubleClick","Double-Click"],["NoZoom","No Zoom"]]),this.rule(),this.label("TriggerRequires","Trigger Requires:"),this.checkbox(yb?"Option":"Alt",yb?"Option":"Alt","alt"),this.checkbox("Command","Command","cmd",{hidden:!yb}),this.checkbox("Control","Control","ctrl",{hiddne:yb}),this.checkbox("Shift","Shift","shift")]),this.submenu("ZoomFactor","Zoom Factor",this.radioGroup("zscale",[["150%"],["175%"],["200%"],["250%"],["300%"],["400%"]])),this.rule(),this.command("Scale","Scale All Math...",(()=>this.scaleAllMath())),this.rule(),this.command("Reset","Reset to defaults",(()=>this.resetDefaults()))]),this.rule(),this.label("Accessibility","\xa0\xa0 Accessibility:"),this.submenu("Speech","\xa0 \xa0 Speech",[this.checkbox("Generate","Generate","speech"),this.checkbox("Subtitles","Show Subtitles","subtitles"),this.checkbox("Auto Voicing","Auto Voicing","voicing"),this.rule(),this.label("Rules","Rules:"),this.submenu("Mathspeak","Mathspeak",this.radioGroup("speechRules",[["mathspeak-default","Verbose"],["mathspeak-brief","Brief"],["mathspeak-sbrief","Superbrief"]])),this.submenu("Clearspeak","Clearspeak",this.radioGroup("speechRules",[["clearspeak-default","Auto"]])),this.rule(),this.submenu("A11yLanguage","Language")]),this.submenu("Braille","\xa0 \xa0 Braille",[this.checkbox("Generate","Generate","braille"),this.checkbox("Subtitles","Show Subtitles","viewBraille"),this.rule(),this.label("Code","Code Format:"),this.radioGroup("brailleCode",[["nemeth","Nemeth"],["ueb","UEB"],["euro","Euro"]])]),this.submenu("Explorer","\xa0 \xa0 Explorer",[this.submenu("Highlight","Highlight",[this.submenu("Background","Background",this.radioGroup("backgroundColor",[["Blue"],["Red"],["Green"],["Yellow"],["Cyan"],["Magenta"],["White"],["Black"]])),{type:"slider",variable:"backgroundOpacity",content:" "},this.submenu("Foreground","Foreground",this.radioGroup("foregroundColor",[["Black"],["White"],["Magenta"],["Cyan"],["Yellow"],["Green"],["Red"],["Blue"]])),{type:"slider",variable:"foregroundOpacity",content:" "},this.rule(),this.radioGroup("highlight",[["None"],["Hover"],["Flame"]]),this.rule(),this.checkbox("TreeColoring","Tree Coloring","treeColoring")]),this.submenu("Magnification","Magnification",[this.radioGroup("magnification",[["None"],["Keyboard"],["Mouse"]]),this.rule(),this.radioGroup("magnify",[["200%"],["300%"],["400%"],["500%"]])]),this.submenu("Semantic Info","Semantic Info",[this.checkbox("Type","Type","infoType"),this.checkbox("Role","Role","infoRole"),this.checkbox("Prefix","Prefix","infoPrefix")]),this.rule(),this.submenu("Role Description","Describe math as",[this.radioGroup("roleDescription",[["MathJax expression"],["MathJax"],["math"],["clickable math"],["explorable math"],["none"]])]),this.checkbox("Math Help","Help message on focus","help")]),this.submenu("Options","\xa0 \xa0 Options",[this.checkbox("Enrich","Semantic Enrichment","enrich"),this.checkbox("Collapsible","Collapsible Math","collapsible"),this.checkbox("AutoCollapse","Auto Collapse","autocollapse",{disabled:!0}),this.rule(),this.checkbox("InTabOrder","Include in Tab Order","inTabOrder"),this.submenu("TabSelects","Tabbing Focuses on",[this.radioGroup("tabSelects",[["all","Whole Expression"],["last","Last Explored Node"]])]),this.rule(),this.checkbox("AssistiveMml","Include Hidden MathML","assistiveMml")]),this.rule(),this.command("About","About MathJax",(()=>this.postInfo(this.about))),this.command("Help","MathJax Help",(()=>this.postInfo(this.help)))]});const e=this.menu;e.settings=this.settings,e.findID("Settings","Overflow","Elide").disable(),e.findID("Braille","ueb").hide(),e.setJax(this.jax),this.attachDialogMenus(e),this.checkLoadableItems();const s=[];var i;Qu.DynamicSubmenus.set("ShowAnnotation",[vb(this.annotationBox,this.options.annotationTypes,s),""]),Qu.DynamicSubmenus.set("CopyAnnotation",[Cb(s),""]),i=this.document.document,Gu||(Yu(zu,i),Gu=!0,$u(i)),function(t){Ju||(Yu(Xu,t),Ju=!0,$u(t))}(this.document.document)}attachDialogMenus(t){this.about.attachMenu(t),this.help.attachMenu(t),this.originalText.attachMenu(t),this.mathmlCode.attachMenu(t),this.originalText.attachMenu(t),this.svgImage.attachMenu(t),this.speechText.attachMenu(t),this.brailleText.attachMenu(t),this.errorMessage.attachMenu(t),this.zoomBox.attachMenu(t)}checkLoadableItems(){var t,e,s,i,r,n;if(Ib&&Ib._&&Ib.loader&&Ib.startup){const o=this.settings,a=this.document.options;(o.enrich||o.speech&&a.enableSpeech||o.braille&&a.enableBraille)&&!(null===(e=null===(t=Ib._)||void 0===t?void 0:t.a11y)||void 0===e?void 0:e.explorer)&&this.loadA11y("explorer"),o.collapsible&&!(null===(i=null===(s=Ib._)||void 0===s?void 0:s.a11y)||void 0===i?void 0:i.complexity)&&this.loadA11y("complexity"),o.assistiveMml&&!(null===(n=null===(r=Ib._)||void 0===r?void 0:r.a11y)||void 0===n?void 0:n["assistive-mml"])&&this.loadA11y("assistive-mml")}else{const t=this.menu;for(const e of Object.keys(this.jax))this.jax[e]||t.findID("Settings","Renderer",e).disable();t.findID("Speech").disable(),t.findID("Braille").disable(),t.findID("Explorer").disable(),t.findID("Options","AutoCollapse").disable(),t.findID("Options","Collapsible").disable(),t.findID("Options","Enrich").disable(),t.findID("Options","AssistiveMml").disable()}}enableAccessibilityItems(t,e){const s=this.menu.findID(t).submenu;for(const t of s.items.slice(1))t instanceof Iu||(!e||t instanceof xu&&!t.submenu.items.length?t.disable():t.enable())}mergeUserSettings(){try{const t=localStorage.getItem(Sb.MENU_STORAGE);if(!t)return;Object.assign(this.settings,JSON.parse(t)),this.setA11y(this.settings)}catch(t){console.log("MathJax localStorage error: "+t.message)}}saveUserSettings(){const t={};for(const e of Object.keys(this.settings))this.settings[e]!==this.defaultSettings[e]&&(t[e]=this.settings[e]);try{Object.keys(t).length?localStorage.setItem(Sb.MENU_STORAGE,JSON.stringify(t)):localStorage.removeItem(Sb.MENU_STORAGE)}catch(t){console.log("MathJax localStorage error: "+t.message)}}setA11y(t){var e,s;(null===(s=null===(e=Ib._)||void 0===e?void 0:e.a11y)||void 0===s?void 0:s.explorer)&&Ib._.a11y.explorer_ts.setA11yOptions(this.document,t)}getA11y(t){var e,s;if(null===(s=null===(e=Ib._)||void 0===e?void 0:e.a11y)||void 0===s?void 0:s.explorer)return void 0!==this.document.options.a11y[t]?this.document.options.a11y[t]:this.document.options.sre[t]}applySettings(){this.setTabOrder(this.settings.inTabOrder);this.document.options.enableAssistiveMml=this.settings.assistiveMml,this.enableAccessibilityItems("Speech",this.settings.speech),this.enableAccessibilityItems("Braille",this.settings.braille),this.setAccessibilityMenus();const t=this.settings.renderer.replace(/[^a-zA-Z0-9]/g,"")||"CHTML";(Sb._loadingPromise||Promise.resolve()).then((()=>{const e=this.settings,s=this.document.outputJax.options;if(s.scale=parseFloat(e.scale),s.displayOverflow=e.overflow.toLowerCase(),s.linebreaks&&(s.linebreaks.inline=e.breakInline),!e.speechRules){const t=this.document.options.sre;e.speechRules=`${t.domain||"clearspeak"}-${t.style||"default"}`}t!==this.defaultSettings.renderer&&this.document.whenReady((()=>this.setRenderer(t,!1)))}))}setOverflow(t){this.document.outputJax.options.displayOverflow=t.toLowerCase(),Sb.loading||this.document.rerenderPromise()}setInlineBreaks(t){this.document.outputJax.options.linebreaks.inline=t,Sb.loading||this.document.rerenderPromise()}setScale(t){this.document.outputJax.options.scale=parseFloat(t),Sb.loading||this.document.rerenderPromise()}setRenderer(t,e=!0){if(Object.hasOwn(this.jax,t)&&this.jax[t])return this.setOutputJax(t,e);const s=t.toLowerCase();return new Promise(((i,r)=>{this.loadComponent("output/"+s,(()=>{const n=Ib.startup;if(!(s in n.constructors))return r(new Error(`Component ${s} not loaded`));n.useOutput(s,!0),n.output=n.getOutputJax(),n.output.setAdaptor(this.document.adaptor),n.output.initialize(),this.jax[t]=n.output,this.setOutputJax(t,e).then((()=>i())).catch((t=>r(t)))}))}))}setOutputJax(t,e=!0){this.jax[t].setAdaptor(this.document.adaptor),this.document.outputJax=this.jax[t];const s=this.loadRequiredExtensions();return e?s.then((()=>Yn.handleRetriesFor((()=>this.rerender())))):s.then((()=>{}))}loadRequiredExtensions(){const t=this.document.outputJax.name.toLowerCase(),e=[];for(const s of this.requiredExtensions)e.push(Ib.loader.load(`[${s}]/${t}`));return this.requiredExtensions=[],Promise.all(e)}addRequiredExtensions(t){if(t){const e=new Set([...this.requiredExtensions,...t]);this.requiredExtensions=[...e]}}setTabOrder(t){const e=this.menu.findID("Options","TabSelects");t?e.enable():e.disable(),this.menu.store.inTaborder(t)}setAssistiveMml(t){var e,s;this.document.options.enableAssistiveMml=t,!t||(null===(s=null===(e=Ib._)||void 0===e?void 0:e.a11y)||void 0===s?void 0:s["assistive-mml"])?this.rerender():this.loadA11y("assistive-mml")}setAccessibilityMenus(){const t=this.settings.enrich,e=t?"enable":"disable";["Speech","Braille","Explorer"].forEach((t=>this.menu.findID(t)[e]()));const s=this.document.options;s.enableSpeech=s.enableBraille=s.enableExplorer=t,t||(this.settings.collapsible=!1,this.document.options.enableCollapsible=!1)}setSpeech(t){var e,s;this.enableAccessibilityItems("Speech",t),this.document.options.enableSpeech=t,!t||(null===(s=null===(e=Ib._)||void 0===e?void 0:e.a11y)||void 0===s?void 0:s.explorer)?this.rerender(rr.COMPILED):this.loadA11y("explorer")}setBraille(t){var e,s;this.enableAccessibilityItems("Braille",t),this.document.options.enableBraille=t,!t||(null===(s=null===(e=Ib._)||void 0===e?void 0:e.a11y)||void 0===s?void 0:s.explorer)?this.rerender(rr.COMPILED):this.loadA11y("explorer")}setBrailleCode(t){this.document.options.sre.braille=t,this.rerender(rr.COMPILED)}setLocale(t){this.document.options.sre.locale=t,this.rerender(rr.COMPILED)}setRoleDescription(){this.rerender(rr.COMPILED)}setEnrichment(t){var e,s;this.document.options.enableEnrichment=t,this.setAccessibilityMenus(),!t||(null===(s=null===(e=Ib._)||void 0===e?void 0:e.a11y)||void 0===s?void 0:s.explorer)?this.rerender(rr.COMPILED):this.loadA11y("explorer")}setCollapsible(t){var e,s,i,r;this.document.options.enableComplexity=t,t&&!this.settings.enrich&&(this.settings.enrich=this.document.options.enableEnrichment=!0,this.setAccessibilityMenus()),t||this.menu.pool.lookup("highlight").setValue("None"),!t||(null===(s=null===(e=Ib._)||void 0===e?void 0:e.a11y)||void 0===s?void 0:s.complexity)?this.rerender(rr.COMPILED):(this.loadA11y("complexity"),(null===(r=null===(i=Ib._)||void 0===i?void 0:i.a11y)||void 0===r?void 0:r.explorer)||this.loadA11y("explorer"))}setHighlight(t){var e,s;if("None"!==t){if(!this.settings.collapsible){const t=this.menu.pool.lookup("collapsible");t.setValue(!0),null===(s=null===(e=t.items[0])||void 0===e?void 0:e.executeCallbacks_)||void 0===s||s.call(e)}Sb.loadingPromises.has("a11y/complexity")||this.rerender(rr.COMPILED)}}scaleAllMath(){const t=(100*parseFloat(this.settings.scale)).toFixed(1).replace(/.0$/,""),e=prompt("Scale all mathematics (compared to surrounding text) by",t+"%");if(this.current){const t=this.menu.mathItem.explorers.speech;t.refocus=this.current,t.focus()}if(e)if(e.match(/^\s*\d+(\.\d*)?\s*%?\s*$/)){const t=parseFloat(e)/100;t?this.menu.pool.lookup("scale").setValue(String(t)):alert("The scale should not be zero")}else alert("The scale should be a percentage (e.g., 120%)")}resetDefaults(){Sb.loading++;const t=this.menu.pool,e=this.defaultSettings;for(const s of Object.keys(e)){const i=t.lookup(s);if(i){if(i.getValue()!==e[s]){i.setValue(e[s]);const t=i.items[0];t&&t.executeCallbacks_()}}else Object.hasOwn(this.settings,s)&&(this.settings[s]=e[s])}Sb.loading--,this.rerender(rr.COMPILED)}checkComponent(t){const e=Sb.loadingPromises.get(t);e&&Yn.retryAfter(e)}loadComponent(t,e){if(Sb.loadingPromises.has(t))return;const s=Ib.loader;if(!s)return;Sb.loading++;const i=s.load(t).then((()=>{Sb.loading--,Sb.loadingPromises.delete(t),0===Sb.loading&&Sb._loadingPromise&&(Sb._loadingPromise=null,Sb._loadingOK()),e()})).catch((t=>{Sb._loadingPromise?(Sb._loadingPromise=null,Sb._loadingFailed(t)):console.log(t)}));Sb.loadingPromises.set(t,i)}loadA11y(t){const e=!rr.ENRICHED;this.loadComponent("a11y/"+t,(()=>{var s,i;const r=Ib.startup;Yn.handlers.unregister(r.handler),r.handler=r.getHandler(),Yn.handlers.register(r.handler);const n=this.document;this.document=r.document=r.getDocument(),this.document.processed=n.processed,this.document.menu=this,n.webworker&&(this.document.webworker=n.webworker),this.setA11y(this.settings),this.defaultSettings=Object.assign({},this.document.options.a11y,(null===(i=null===(s=Ib.config)||void 0===s?void 0:s.options)||void 0===i?void 0:i.a11y)||{},this.defaultSettings),this.document.outputJax.reset(),this.transferMathList(n),this.document.processed=n.processed,Sb._loadingPromise||(this.document.outputJax.reset(),Yn.handleRetriesFor((()=>{this.rerender("complexity"===t||e?rr.COMPILED:rr.TYPESET)})))}))}transferMathList(t){const e=this.document.options.MathItem;for(const s of t.math){const t=new e;Object.assign(t,s),this.document.math.push(t)}}formatSource(t){return t.trim().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}toMML(t){return this.MmlVisitor.visitTree(t.root,t,{filterSRE:!this.settings.showSRE,filterTex:!this.settings.showTex,texHints:this.settings.texHints,semantics:this.settings.semantics&&"MathML"!==t.inputJax.name})}toSVG(t){const e=this.jax.SVG;if(!e)return Promise.resolve("SVG can't be produced.<br>Try switching to SVG output first.");const s=e.adaptor,i=e.options.fontCache,r=!!t.root.getProperty("process-breaks");if("global"!==i&&(t.display||!r)&&"SVG"===s.getAttribute(t.typesetRoot,"jax"))for(const e of s.childNodes(t.typesetRoot))if("svg"===s.kind(e))return Promise.resolve(this.formatSvg(s.serializeXML(e)));return this.typesetSVG(t,i,r)}typesetSVG(t,e,s){return Mb(this,void 0,void 0,(function*(){const i=this.jax.SVG,r=i.html("div");"global"===e&&(i.options.fontCache="local");const n=t.root;t.root=n.copy(!0),t.root.setInheritedAttributes({},t.display,0,!1),s&&(i.unmarkInlineBreaks(t.root),t.root.setProperty("inlineMarked",!1));return Yn.handleRetriesFor((()=>{i.toDOM(t,r,i.document)})).then((()=>(t.root=n,i.options.fontCache=e,this.formatSvg(i.adaptor.innerHTML(r)))))}))}formatSvg(t){const e=this.constructor.SvgCss;return t=(t=t.match(/^<svg.*?><defs>/)?t.replace(/<defs>/,`<defs><style>${e}</style>`):t.replace(/^(<svg.*?>)/,`$1<defs><style>${e}</style></defs>`)).replace(/ (?:role|focusable)=".*?"/g,"").replace(/"currentColor"/g,'"black"'),this.settings.showSRE||(t=t.replace(/ (?:data-semantic-.*?|data-speech-node|role|aria-(?:level|posinset|setsize|owns))=".*?"/g,"")),this.settings.showTex||(t=t.replace(/ data-latex(?:-item)?=".*?"/g,"")),this.settings.texHints||(t=t.replace(/ data-mjx-(?:texclass|alternate|variant|pseudoscript|smallmatrix|mathaccent|auto-op|script-align|vbox)=".*?"/g,"").replace(/ data-mml-node="TeXAtom"/g,"")),`<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n${t}`}postSvgImage(){this.postInfo(this.svgImage),this.toSVG(this.menu.mathItem).then((t=>{this.svgImage.html.querySelector("#svg-image").innerHTML=this.formatSource(t).replace(/\n/g,"<br>")}))}zoom(t,e,s){t&&!this.isZoomEvent(t,e)||(this.menu.mathItem=s,t&&this.menu.post(t),this.postInfo(this.zoomBox))}isZoomEvent(t,e){return this.settings.zoom===e&&(!this.settings.alt||t.altKey)&&(!this.settings.ctrl||t.ctrlKey)&&(!this.settings.cmd||t.metaKey)&&(!this.settings.shift||t.shiftKey)}rerender(t=rr.TYPESET){this.rerenderStart=Math.min(t,this.rerenderStart);const e=Ib.startup;!Sb.loading&&e.hasTypeset&&e.document.whenReady((()=>Mb(this,void 0,void 0,(function*(){this.rerenderStart<=rr.COMPILED&&this.document.reset({inputJax:[]}),yield this.document.rerenderPromise(this.rerenderStart),this.rerenderStart=rr.LAST}))))}copyMathML(){xb(this.toMML(this.menu.mathItem))}copyOriginal(){xb(this.menu.mathItem.math.trim())}copySvgImage(){this.toSVG(this.menu.mathItem).then((t=>{xb(t)}))}copySpeechText(){xb(this.menu.mathItem.outputData.speech)}copyBrailleText(){xb(this.menu.mathItem.outputData.braille)}copyErrorMessage(){xb(this.menu.errorMsg.trim())}addMenu(t){this.addEvents(t),this.menu.store.insert(t.typesetRoot),t.typesetRoot.tabIndex=this.settings.inTabOrder?0:-1}addEvents(t){const e=t.typesetRoot;e.addEventListener("mousedown",(()=>{var e,s;this.menu.mathItem=t,this.current=null===(s=null===(e=t.explorers)||void 0===e?void 0:e.speech)||void 0===s?void 0:s.current}),!0),e.addEventListener("contextmenu",(()=>{var e;this.menu.mathItem=t;const s=null===(e=t.explorers)||void 0===e?void 0:e.speech;s&&(t.outputData.nofocus=!this.current,s.refocus=this.current)}),!0),e.addEventListener("keydown",(()=>this.menu.mathItem=t),!0),e.addEventListener("click",(e=>this.zoom(e,"Click",t)),!0),e.addEventListener("dblclick",(e=>this.zoom(e,"DoubleClick",t)),!0)}clear(){this.menu.store.clear()}variable(t,e){return{name:t,getter:()=>this.settings[t],setter:s=>{this.settings[t]=s,e&&e(s),this.saveUserSettings()}}}a11yVar(t,e){return{name:t,getter:()=>this.getA11y(t),setter:s=>{this.settings[t]=s,this.setA11y({[t]:s}),e&&e(s),this.saveUserSettings()}}}submenu(t,e,s=[],i=!1){let r=[];for(const t of s)Array.isArray(t)?r=r.concat(t):r.push(t);return{type:"submenu",id:t,content:e,menu:{items:r},disabled:0===r.length||i}}command(t,e,s,i={}){return Object.assign({type:"command",id:t,content:e,action:s},i)}checkbox(t,e,s,i={}){return Object.assign({type:"checkbox",id:t,content:e,variable:s},i)}radioGroup(t,e){return e.map((e=>this.radio(e[0],e[1]||e[0],t)))}radio(t,e,s,i={}){return Object.assign({type:"radio",id:t,content:e,variable:s},i)}label(t,e){return{type:"label",id:t,content:e}}rule(){return{type:"rule"}}}function Rb(t){return class extends t{addMenu(t,e=!1){this.state()>=rr.CONTEXT_MENU||(this.isEscaped||!t.options.enableMenu&&!e||t.menu.addMenu(this),this.state(rr.CONTEXT_MENU))}getMenus(t){t.menu.menu.store.sort()}checkLoading(t){t.checkLoading()}}}function Ob(t){var e;return e=class extends t{constructor(...t){super(...t),this.menu=new this.options.MenuClass(this,this.options.menuOptions);const e=this.constructor.ProcessBits;e.has("context-menu")||e.allocate("context-menu"),this.options.MathItem=Rb(this.options.MathItem);const s=this.menu.settings,i=this.options,r=i.enableEnrichment=s.enrich;i.enableSpeech=s.speech&&r,i.enableBraille=s.braille&&r,i.enableComplexity=s.collapsible&&r,i.enableExplorer=r}addMenu(){if(!this.processed.isSet("context-menu")){for(const t of this.math)t.addMenu(this);this.processed.set("context-menu")}return this}getMenus(){this.menu.menu.store.sort()}checkLoading(){let t=!0;try{this._checkLoading(),t=!1}catch(t){if(!t.retry)throw t}return t}_checkLoading(){return this.menu.isLoading&&Yn.retryAfter(this.menu.loadingPromise.catch((t=>console.log(t)))),this.options.enableComplexity&&this.menu.checkComponent("a11y/complexity"),this.options.enableExplorer&&this.menu.checkComponent("a11y/explorer"),this}state(t,e=!1){return super.state(t,e),t<rr.CONTEXT_MENU&&this.processed.clear("context-menu"),this}},e.OPTIONS=Object.assign(Object.assign({enableEnrichment:!0,enableComplexity:!0,enableSpeech:!0,enableBraille:!0,enableExplorer:!0,enrichSpeech:"none",enrichError:(t,e,s)=>console.warn("Enrichment Error:",s)},t.OPTIONS),{MenuClass:Sb,menuOptions:Sb.OPTIONS,enableMenu:!0,sre:t.OPTIONS.sre||Ai({}),a11y:t.OPTIONS.a11y||Ai({}),renderActions:Ai(Object.assign(Object.assign({},t.OPTIONS.renderActions),{addMenu:[rr.CONTEXT_MENU],getMenus:[rr.INSERTED+5,!1],checkLoading:[rr.UNPROCESSED+1,t=>t.checkLoading(),"",!1]}))}),e}function Db(t){return t.documentClass=Ob(t.documentClass),t}Sb.MENU_STORAGE="MathJax-Menu-Settings",Sb.OPTIONS={settings:{showSRE:!1,showTex:!1,texHints:!0,semantics:!1,zoom:"NoZoom",zscale:"200%",renderer:"CHTML",alt:!1,cmd:!1,ctrl:!1,shift:!1,scale:1,overflow:"Scroll",breakInline:!0,autocollapse:!1,collapsible:!1,enrich:!0,inTabOrder:!0,assistiveMml:!1,speech:!0,braille:!0,brailleCode:"nemeth",speechRules:"clearspeak-default",roleDescription:"math",tabSelects:"all"},jax:{CHTML:null,SVG:null},annotationTypes:Ai({TeX:["TeX","LaTeX","application/x-tex"],StarMath:["StarMath 5.0"],Maple:["Maple"],ContentMathML:["MathML-Content","application/mathml-content+xml"],OpenMath:["OpenMath"]})},Sb.SvgCss=["svg a{fill:blue;stroke:blue}",'[data-mml-node="merror"]>g{fill:red;stroke:red}','[data-mml-node="merror"]>rect[data-background]{fill:yellow;stroke:none}',"[data-frame],[data-line]{stroke-width:70px;fill:none}",".mjx-dashed{stroke-dasharray:140}",".mjx-dotted{stroke-linecap:round;stroke-dasharray:0,140}","use[data-c]{stroke-width:3px}"].join(""),Sb.loading=0,Sb.loadingPromises=new Map,Sb._loadingPromise=null,Sb._loadingOK=null,Sb._loadingFailed=null,nr("CONTEXT_MENU",170),MathJax.loader&&MathJax.loader.checkVersion("ui/menu",si,"ui"),ai({_:{a11y:{speech:{SpeechMenu:Ds}},ui:{menu:{AnnotationMenu:Bs,MJContextMenu:Rs,Menu:qs,MenuHandler:Hs,MenuUtil:Ps,MmlVisitor:js,RadioCompare:Fs,SelectableInfo:Us}}}}),MathJax.startup&&li&&MathJax.startup.extendHandler((t=>Db(t)),20),MathJax.loader&&MathJax.loader.checkVersion("a11y/sre",si,"a11y"),ai({_:{a11y:{sre_ts:Os}}}),nr("ENRICHED",rr.COMPILED+10);class Pb extends Jn{visitTree(t,e){this.mactionId=0;const s=super.visitTree(t);return this.mactionId&&(e.inputData.hasMaction=!0),s}visitHtmlNode(t,e){return t.getSerializedXML()}visitMactionNode(t,e){const[s,i]=0===t.childNodes.length?["",""]:["\n",e],r=this.childNodeMml(t,e+" ",s);let n=this.getAttributes(t);if("toggle"===t.attributes.get("actiontype")){const e=++this.mactionId;t.setProperty("mactionId",e),n=` data-maction-id="${e}" selection="${t.attributes.get("selection")}"`+n.replace(/ selection="\d+"/,"").replace(/ data-maction-id="\d+"/,"")}return`${e}<maction${n}>`+(r.match(/\S/)?s+r+i:"")+"</maction>"}}function Bb(t,e,s){return class extends t{constructor(){super(...arguments),this.toMathML=s}serializeMml(t){if("outerHTML"in t)return t.outerHTML;if("undefined"!=typeof Element&&"undefined"!=typeof window&&t instanceof Element){const e=window.document.createElement("div");return e.appendChild(t),e.innerHTML}return t.toString()}enrich(t,s=!1){if(!(this.state()>=rr.ENRICHED)){if(!this.isEscaped&&(t.options.enableEnrichment||s)){const s=new t.options.MathItem("",e);try{let e;e=this.inputData.originalMml?this.adjustSelections():this.inputData.originalMml=this.toMathML(this.root,this);const i=rb(e);this.inputData.enrichedMml=s.math=this.serializeMml(i),s.math=s.math.replace(/ role="treeitem"/g,' data-speech-node="true"').replace(/ aria-(?:posinset|owns|setsize)=".*?"/g,""),s.display=this.display,s.compile(t),this.root=s.root}catch(e){t.options.enrichError(t,this,e)}}this.state(rr.ENRICHED)}}toEnriched(t){return this.serializeMml(rb(t))}unEnrich(t){const s=this.inputData.originalMml;if(!s)return;const i=new t.options.MathItem("",e);i.math=s,i.display=this.display,i.compile(t),this.root=i.root}adjustSelections(){const t=this.inputData.originalMml;if(!this.inputData.hasMaction)return t;const e=[];return this.root.walkTree((t=>{t.isKind("maction")&&(e[t.attributes.get("data-maction-id")]=t)})),t.replace(/(data-maction-id="(\d+)" selection=)"\d+"/g,((t,s,i)=>`${s}"${e[i].attributes.get("selection")}"`))}}}function Fb(t,e){var s;return(s=class extends t{constructor(...t){super(...t),e.setMmlFactory(this.mmlFactory);const s=this.constructor.ProcessBits;s.has("enriched")||s.allocate("enriched");const i=new Pb(this.mmlFactory);this.options.MathItem=Bb(this.options.MathItem,e,((t,e)=>i.visitTree(t,e)))}enrich(){if(!this.processed.isSet("enriched")){if(this.options.enableEnrichment){sb(this.options.sre);for(const t of this.math)t.enrich(this)}this.processed.set("enriched")}return this}enrichError(t,e,s){console.warn("Enrichment error:",s)}state(t,e=!1){if(super.state(t,e),t<rr.ENRICHED&&(this.processed.clear("enriched"),t>=rr.COMPILED))for(const t of this.math)t.unEnrich(this);return this}}).OPTIONS=Object.assign(Object.assign({},t.OPTIONS),{enableEnrichment:!0,enrichError:(t,e,s)=>t.enrichError(t,e,s),renderActions:Ai(Object.assign(Object.assign({},t.OPTIONS.renderActions),{enrich:[rr.ENRICHED]})),sre:Ai({speech:"none",locale:"en",domain:"clearspeak",style:"default",braille:"nemeth",structure:!0,aria:!0})}),s}function jb(t,e){return e.setAdaptor(t.adaptor),t.documentClass=Fb(t.documentClass,e),t}MathJax.loader&&MathJax.loader.checkVersion("a11y/semantic-enrich",si,"a11y"),ai({_:{a11y:{"semantic-enrich":Ws}}}),MathJax.startup&&MathJax.startup.extendHandler((t=>jb(t,new Nl({allowHtmlInTokenNodes:!0}))));const Ub=["pitch","rate","volume"];function qb(t){const e=nb(t),s=[],i=[];return Hb(Array.from(e.childNodes),s,i),[i.join(" "),s]}function Hb(t,e,s,i={}){for(const r of t)if(3!==r.nodeType){if(1===r.nodeType){const t=r,n=t.tagName;if("speak"===n)continue;if("prosody"===n){Hb(Array.from(r.childNodes),e,s,zb(t,i));continue}switch(n){case"break":e.push({pause:t.getAttribute("time")});break;case"mark":e.push({mark:t.getAttribute("name")});break;case"say-as":{const r=t.textContent;e.push(Object.assign({text:r,character:!0},i)),s.push(r);break}}}}else{const t=r.textContent.trim();t&&(s.push(t),e.push(Object.assign({text:t},i)))}}const Wb={pitch:(t,e)=>t/100*1,volume:(t,e)=>t/100*.5,rate:(t,e)=>t/100*1};function zb(t,e){const s={};for(const i of Ub)if(t.hasAttribute(i)){const[r,n]=Vb(t.getAttribute(i));if(!r){s[i]="volume"===i?.5:1;continue}let o=e[i];o=o||("volume"===i?.5:1);const a=Wb[i](parseInt(n,10),r);s[i]="-"===r?o-a:o+a}return s}const Xb=/([+-]?)([0-9]+)%/;function Vb(t){const e=t.match(Xb);return e?[e[1],e[2]]:(console.warn("Something went wrong with the prosody matching."),["","100"])}function Gb(t,e,s,i=" "){if(!t)return"";const r=[t];return e&&r.unshift(e),s&&r.push(s),r.join(i)}function Jb(t,e="en",s="100"){return qb(`<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="${e}"><prosody rate="${s}%">${t}</prosody></speak>`)}function Kb(){const t=new AudioContext,e=t.createOscillator();e.frequency.value=300,e.connect(t.destination),e.start(t.currentTime),e.stop(t.currentTime+.05)}var $b,Yb;!function(t){t[t.NONE=0]="NONE",t[t.DEPTH=1]="DEPTH",t[t.SUMMARY=2]="SUMMARY"}($b||($b={})),function(t){t.SPEECH="data-semantic-speech-none",t.SPEECH_SSML="data-semantic-speech",t.SUMMARY="data-semantic-summary-none",t.SUMMARY_SSML="data-semantic-summary",t.PREFIX="data-semantic-prefix-none",t.PREFIX_SSML="data-semantic-prefix",t.POSTFIX="data-semantic-postfix-none",t.POSTFIX_SSML="data-semantic-postfix",t.BRAILLE="data-semantic-braille"}(Yb||(Yb={}));class Qb{constructor(){this.promise=Promise.resolve(),this.adaptor=null,this._options={},this._init=!1}set element(t){this._element=t}get element(){return this._element}set options(t){this._options=Object.assign({},(null==t?void 0:t.sre)||{},{enableSpeech:t.enableSpeech,enableBraille:t.enableBraille}),delete this._options.custom}get options(){return this._options}init(t,e,s){this.options=t,this._init||(this.adaptor=e,this.webworker=s,this._init=!0)}update(t){Object.assign(this.options,t)}Speech(t){const e=t.outputData.mml,s=Object.assign({},this.options,{modality:"speech"});return this.promise=this.webworker.Speech(e,s,t)}SpeechFor(t,e){const s=Object.assign({},this.options,{modality:"speech"});return this.webworker.speechFor(e,s,t)}cancel(t){var e;null===(e=this.webworker)||void 0===e||e.Cancel(t)}updateRegions(t,e,s){e.Update(this.getLabel(t)),s.Update(this.getBraille(t))}getOptions(t){var e,s,i,r;return{locale:null!==(e=this.adaptor.getAttribute(t,"data-semantic-locale"))&&void 0!==e?e:"",domain:null!==(s=this.adaptor.getAttribute(t,"data-semantic-domain"))&&void 0!==s?s:"",style:null!==(i=this.adaptor.getAttribute(t,"data-semantic-style"))&&void 0!==i?i:"",domain2style:null!==(r=this.adaptor.getAttribute(t,"data-semantic-domain2style"))&&void 0!==r?r:""}}nextRules(t){const e=this.getOptions(t.typesetRoot);return this.update(e),this.promise=this.webworker.nextRules(t.outputData.mml,Object.assign({},this.options,{modality:"speech"}),t)}nextStyle(t,e){const s=this.getOptions(e.typesetRoot);return this.update(s),this.promise=this.webworker.nextStyle(e.outputData.mml,Object.assign({},this.options,{modality:"speech"}),this.adaptor.getAttribute(t,"data-semantic-id"),e)}getLabel(t,e="",s=" "){const i=this.adaptor;return Gb(i.getAttribute(t,Yb.SPEECH_SSML),i.getAttribute(t,Yb.PREFIX_SSML),i.getAttribute(t,Yb.POSTFIX_SSML),s)||i.getAttribute(t,"aria-label")}getBraille(t){const e=this.adaptor;return e.getAttribute(t,"aria-braillelabel")||e.getAttribute(t,Yb.BRAILLE)}getLocalePreferences(t){return this.promise=this.webworker.clearspeakLocalePreferences(this.options,t)}getRelevantPreferences(t,e,s,i){const r=t.outputData.mml;return this.promise=this.webworker.clearspeakRelevantPreferences(r,e,s,i)}}var Zb=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};class tE{constructor(t,e,s,i){this.cmd=t,this.item=e,this.resolve=s,this.reject=i}}class eE{constructor(t,e){this.adaptor=t,this.options=e,this.ready=!1,this.tasks=[],this.Commands={Ready(t,e){t.ready=!0,t.postNext()},Finished(t,e){const s=t.tasks.shift();e.success?s.resolve(e.result):s.reject(e.error),t.postNext()},Log(t,e){t.options.debug&&console.log("Log:",e)}}}Start(){return Zb(this,void 0,void 0,(function*(){if(this.ready)throw Error("Worker already started");this.worker=yield this.adaptor.createWorker(this.Listener.bind(this),this.options)}))}debug(t,...e){this.options.debug&&console.info(t,...e)}Listener(t){this.debug("Worker >>> Client:",t.data),Object.hasOwn(this.Commands,t.data.cmd)?this.Commands[t.data.cmd](this,t.data.data):this.debug("Invalid command from worker: "+t.data.cmd)}Post(t,e){const s=new Promise(((s,i)=>{this.tasks.push(new tE(t,e,s,i))}));return this.ready&&1===this.tasks.length&&this.postNext(),s}postNext(){if(this.tasks.length){const t=Object.assign({},this.tasks[0].cmd,{debug:this.options.debug});this.worker.postMessage(t)}}Cancel(t){const e=this.tasks.findIndex((e=>e.item===t));e>0&&(this.tasks[e].reject(`Task ${this.tasks[e].cmd.cmd} cancelled`),this.tasks.splice(e,1))}Setup(t){return this.Post({cmd:"setup",data:{domain:t.domain,style:t.style,locale:t.locale,modality:t.modality}})}Speech(t,e,s){return Zb(this,void 0,void 0,(function*(){this.Attach(s,e.enableSpeech,e.enableBraille,yield this.Post({cmd:"speech",data:{mml:t,options:e}},s))}))}nextRules(t,e,s){return Zb(this,void 0,void 0,(function*(){this.Attach(s,e.enableSpeech,e.enableBraille,yield this.Post({cmd:"nextRules",data:{mml:t,options:e}},s))}))}nextStyle(t,e,s,i){return Zb(this,void 0,void 0,(function*(){this.Attach(i,e.enableSpeech,e.enableBraille,yield this.Post({cmd:"nextStyle",data:{mml:t,options:e,nodeId:s}},i))}))}speechFor(t,e,s){return Zb(this,void 0,void 0,(function*(){const i=yield this.Post({cmd:"speech",data:{mml:t,options:e}},s);return JSON.parse(i)}))}Attach(t,e,s,i){const r=JSON.parse(i),n=t.typesetRoot;if(!n)return;this.setSpecialAttributes(n,r.options,"data-semantic-",["locale","domain","style","domain2style"]);const o=this.adaptor;this.setSpecialAttributes(n,r.translations,"data-semantic-");for(const[t,e]of Object.entries(r.mactions)){let s=o.getElement("#"+t,n);s&&o.childNodes(s)[0]&&(s=o.childNodes(s)[0],o.setAttribute(s,"data-semantic-type","dummy"),this.setSpecialAttributes(s,e,""))}this.setSpeechAttributes(o.childNodes(n)[0],"",r,e,s),e&&(r.label&&(o.setAttribute(n,Yb.SPEECH,r.label),o.setAttribute(n,Yb.SPEECH_SSML,r.ssml),t.outputData.speech=r.label),o.setAttribute(n,"data-speech-attached","true")),s&&(r.braillelabel&&(o.setAttribute(n,Yb.BRAILLE,r.braillelabel),t.outputData.braille=r.braillelabel),r.braille&&o.setAttribute(n,"data-braille-attached","true"))}setSpeechAttribute(t,e,s,i){var r,n;const o=this.adaptor,a=o.getAttribute(t,"data-semantic-id");if(o.removeAttribute(t,"data-speech-node"),s&&e.speech[a]["speech-none"]){o.setAttribute(t,"data-speech-node","true");for(let[s,i]of Object.entries(e.speech[a]))s=s.replace(/-ssml$/,""),i&&o.setAttribute(t,`data-semantic-${s}`,i)}if(i&&(null===(n=null===(r=e.braille)||void 0===r?void 0:r[a])||void 0===n?void 0:n["braille-none"])){o.setAttribute(t,"data-speech-node","true");const s=e.braille[a]["braille-none"];o.setAttribute(t,Yb.BRAILLE,s)}}setSpeechAttributes(t,e,s,i,r){const n=this.adaptor;if(!t||"#text"===n.kind(t)||"#comment"===n.kind(t))return e;n.hasAttribute(t,"data-semantic-id")&&(this.setSpeechAttribute(t,s,i,r),e||n.hasAttribute(t,"data-semantic-parent")||(e=n.getAttribute(t,"data-semantic-id")));for(const o of Array.from(n.childNodes(t)))e=this.setSpeechAttributes(o,e,s,i,r);return e}setSpecialAttributes(t,e,s,i){if(e){i=i||Object.keys(e);for(const r of i){const i=e[r];i&&this.adaptor.setAttribute(t,`${s}${r.toLowerCase()}`,i)}}}Detach(t){const e=t.typesetRoot;this.adaptor.removeAttribute(e,"data-speech-attached"),this.adaptor.removeAttribute(e,"data-braille-attached"),this.detachSpeech(e)}detachSpeech(t){const e=this.adaptor,s=e.childNodes(t);if(s){if("#text"!==e.kind(t))for(const s of["none","summary-none","speech","speech-none","summary","braille"])e.removeAttribute(t,`data-semantic-${s}`);for(const t of s)this.detachSpeech(t)}}Terminate(){this.debug("Terminating pending tasks");for(const t of this.tasks)t.reject(`${t.cmd.data.cmd} cancelled by WorkerHandler termination`);return this.tasks=[],this.debug("Terminating worker"),this.worker.terminate()}Stop(){return Zb(this,void 0,void 0,(function*(){if(!this.worker)throw Error("Worker has not been started");yield this.Terminate(),this.worker=null,this.ready=!1}))}clearspeakLocalePreferences(t,e){return Zb(this,void 0,void 0,(function*(){yield this.Post({cmd:"localePreferences",data:{options:t}}).then((s=>{e.set(t.locale,JSON.parse(s))}))}))}clearspeakRelevantPreferences(t,e,s,i){return Zb(this,void 0,void 0,(function*(){yield this.Post({cmd:"relevantPreferences",data:{mml:t,id:e}}).then((t=>{s.set(i,t)}))}))}}const sE=ci.config||{},iE=()=>(sE?.loader?.paths?.mathjax||sE?.__dirname||"/")+"/sre";var rE=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};function nE(t){return class extends t{constructor(){super(...arguments),this.generatorPool=new Qb}attachSpeech(t){if(this.outputData.speechPromise=null,this.state()>=rr.ATTACHSPEECH)return;if(this.state(rr.ATTACHSPEECH),this.isEscaped||!t.options.enableSpeech&&!t.options.enableBraille||!t.options.enableEnrichment)return;t.getWebworker(),this.generatorPool.init(t.options,t.adaptor,t.webworker),this.outputData.mml=this.toMathML(this.root,this);const e=this.generatorPool.Speech(this).catch((e=>t.options.speechError(t,this,e)));t.savePromise(e),this.outputData.speechPromise=e}detachSpeech(t){t.webworker.Detach(this)}speechFor(t){return rE(this,void 0,void 0,(function*(){t=this.toEnriched(t);const e=yield this.generatorPool.SpeechFor(this,t);return[e.label,e.braillelabel]}))}clear(){this.generatorPool.cancel(this)}}}function oE(t){var e;return e=class extends t{constructor(...t){super(...t),this.webworker=null;const e=this.constructor.ProcessBits;e.has("attach-speech")||e.allocate("attach-speech"),this.options.MathItem=nE(this.options.MathItem)}getWebworker(){this.webworker||(this.webworker=new eE(this.adaptor,this.options.worker),this.webworker.Start())}attachSpeech(){if(!this.processed.isSet("attach-speech")){const t=this.options;if(t.enableEnrichment&&(t.enableSpeech||t.enableBraille)){this.getWebworker();for(const t of this.math)t.attachSpeech(this)}this.processed.set("attach-speech")}return this}speechError(t,e,s){console.warn("Speech generation error:",s)}state(t,e=!1){if(super.state(t,e),t<rr.ATTACHSPEECH&&(this.processed.clear("attach-speech"),t>=rr.TYPESET))for(const t of this.math)t.detachSpeech(this);return this}done(){const t=Object.create(null,{done:{get:()=>super.done}});return rE(this,void 0,void 0,(function*(){var e;return yield null===(e=this.webworker)||void 0===e?void 0:e.Stop(),t.done.call(this)}))}},e.OPTIONS=Object.assign(Object.assign({},t.OPTIONS),{enableSpeech:!0,enableBraille:!0,speechError:(t,e,s)=>t.speechError(t,e,s),renderActions:Ai(Object.assign(Object.assign({},t.OPTIONS.renderActions),{attachSpeech:[rr.ATTACHSPEECH]})),worker:{path:iE(),maps:iE().replace(/[cm]js\/a11y\/sre$/,"bundle/sre/mathmaps"),worker:"speech-worker.js",debug:!1},a11y:Ai({speech:!0,braille:!0})}),e}function aE(t,e){return!t.documentClass.prototype.enrich&&e&&(t=jb(t,e)),t.documentClass=oE(t.documentClass),t}if(nr("ATTACHSPEECH",rr.INSERTED+10),MathJax.loader&&MathJax.loader.checkVersion("a11y/speech",si,"a11y"),ai({_:{a11y:{speech_ts:Gs,speech:{GeneratorPool:Xs,SpeechUtil:zs,WebWorker:Vs}}}}),MathJax.loader){let t=ui.resolvePath("[sre]",!1),e=ui.resolvePath("[mathmaps]",!1);if(li)t=new URL(t,location).href,e=new URL(e,location).href;else{const s="undefined"!=typeof require?require:MathJax.config.loader.require;s?.resolve?(t=s.resolve(`${t}/require.mjs`).replace(/\/[^\/]*$/,""),e=s.resolve(`${e}/base.json`).replace(/\/[^\/]*$/,"")):t=e=""}t&&oi(MathJax.config,"options",{worker:{path:t,maps:e}})}MathJax.startup&&MathJax.startup.extendHandler((t=>aE(t)));const cE={red:{red:255,green:0,blue:0},green:{red:0,green:255,blue:0},blue:{red:0,green:0,blue:255},yellow:{red:255,green:255,blue:0},cyan:{red:0,green:255,blue:255},magenta:{red:255,green:0,blue:255},white:{red:255,green:255,blue:255},black:{red:0,green:0,blue:0}};function lE(t,e){var s;const i=cE[t.color]||cE[e.color];return i.alpha=null!==(s=t.alpha)&&void 0!==s?s:e.alpha,function(t){var e;return`rgba(${t.red},${t.green},${t.blue},${null!==(e=t.alpha)&&void 0!==e?e:1})`}(i)}const hE={color:"blue",alpha:1},dE={color:"black",alpha:1};let uE=0;class pE{constructor(){this.counter=uE++,this.ATTR="sre-highlight-"+this.counter.toString(),this.mactionName="",this.currentHighlights=[]}highlight(t){this.currentHighlights.push(t.map((t=>{const e=this.highlightNode(t);return this.setHighlighted(t),e})))}highlightAll(t){const e=this.getMactionNodes(t);for(let t,s=0;t=e[s];s++)this.highlight([t])}unhighlight(){const t=this.currentHighlights.pop();t&&t.forEach((t=>{this.isHighlighted(t.node)&&(this.unhighlightNode(t),this.unsetHighlighted(t.node))}))}unhighlightAll(){for(;this.currentHighlights.length>0;)this.unhighlight()}setColor(t,e){this._foreground=lE(e,dE),this._background=lE(t,hE)}get foreground(){return this._foreground}get background(){return this._background}getMactionNodes(t){return Array.from(t.getElementsByClassName(this.mactionName))}isMactionNode(t){const e=t.className||t.getAttribute("class");return!!e&&!!e.match(new RegExp(this.mactionName))}isHighlighted(t){return t.hasAttribute(this.ATTR)}setHighlighted(t){t.setAttribute(this.ATTR,"true")}unsetHighlighted(t){t.removeAttribute(this.ATTR)}}class mE extends pE{constructor(){super(),this.mactionName="mjx-maction"}highlightNode(t){const e={node:t,background:t.style.backgroundColor,foreground:t.style.color};return this.isHighlighted(t)||(t.style.backgroundColor=this.background,t.style.color=this.foreground),e}unhighlightNode(t){t.node.style.backgroundColor=t.background,t.node.style.color=t.foreground}isMactionNode(t){var e;return(null===(e=t.tagName)||void 0===e?void 0:e.toUpperCase())===this.mactionName.toUpperCase()}getMactionNodes(t){return Array.from(t.getElementsByTagName(this.mactionName))}}function fE(t,e,s){const i=new gE[s];return i.setColor(t,e),i}const gE={SVG:class extends pE{constructor(){super(),this.mactionName="maction"}highlightNode(t){let e;if(this.isHighlighted(t))return e={node:t,background:this.background,foreground:this.foreground},e;if("svg"===t.tagName||"MJX-CONTAINER"===t.tagName)return e={node:t,background:t.style.backgroundColor,foreground:t.style.color},t.style.backgroundColor=this.background,t.style.color=this.foreground,e;const s=document.createElementNS("http://www.w3.org/2000/svg","rect");s.setAttribute("sre-highlighter-added","true");const i=t.getBBox();s.setAttribute("x",(i.x-40).toString()),s.setAttribute("y",(i.y-40).toString()),s.setAttribute("width",(i.width+80).toString()),s.setAttribute("height",(i.height+80).toString());const r=t.getAttribute("transform");return r&&s.setAttribute("transform",r),s.setAttribute("fill",this.background),t.setAttribute(this.ATTR,"true"),t.parentNode.insertBefore(s,t),e={node:t,foreground:t.getAttribute("fill")},"rect"!==t.nodeName&&t.setAttribute("fill",this.foreground),e}setHighlighted(t){"svg"===t.tagName&&super.setHighlighted(t)}unhighlightNode(t){const e=t.node.previousSibling;if(e&&e.hasAttribute("sre-highlighter-added"))return t.foreground?t.node.setAttribute("fill",t.foreground):t.node.removeAttribute("fill"),void t.node.parentNode.removeChild(e);t.node.style.backgroundColor=t.background,t.node.style.color=t.foreground}isMactionNode(t){return t.getAttribute("data-mml-node")===this.mactionName}getMactionNodes(t){return Array.from(t.querySelectorAll(`[data-mml-node="${this.mactionName}"]`))}},CHTML:mE,generic:mE};class bE{constructor(t){this.document=t,this.CLASS=this.constructor,this.AddStyles()}AddStyles(){if(this.CLASS.styleAdded)return;const t=this.document.adaptor.node("style");t.innerHTML=this.CLASS.style.cssText,this.document.adaptor.head(this.document.adaptor.document).appendChild(t),this.CLASS.styleAdded=!0}AddElement(){if(this.div)return;const t=this.document.adaptor.node("div");t.classList.add(this.CLASS.className),this.div=t,this.inner=this.document.adaptor.node("div"),this.div.appendChild(this.inner),this.document.adaptor.body(this.document.adaptor.document).appendChild(this.div)}Show(t,e){this.AddElement(),this.position(t),this.highlight(e),this.div.classList.add(this.CLASS.className+"_Show")}Hide(){this.div&&(this.div.parentNode.removeChild(this.div),this.div=null,this.inner=null)}stackRegions(t){const e=t.getBoundingClientRect();let s=0,i=Number.POSITIVE_INFINITY;const r=this.document.adaptor.document.getElementsByClassName(this.CLASS.className+"_Show");for(let t,e=0;t=r[e];e++)t!==this.div&&(s=Math.max(t.getBoundingClientRect().bottom,s),i=Math.min(t.getBoundingClientRect().left,i));const n=(s||e.bottom+10)+window.scrollY,o=(i<Number.POSITIVE_INFINITY?i:e.left)+window.scrollX;this.div.style.top=n+"px",this.div.style.left=o+"px"}}bE.styleAdded=!1;class EE extends bE{Clear(){}Update(){}Hide(){}Show(){}AddElement(){}AddStyles(){}position(){}highlight(t){}}class NE extends bE{Clear(){this.div&&(this.Update(""),this.inner.style.top="",this.inner.style.backgroundColor="")}Update(t){t&&this.AddElement(),this.inner&&(this.inner.textContent="",this.inner.textContent=t||"\xa0")}position(t){this.stackRegions(t)}highlight(t){this.div&&(this.inner.style.backgroundColor=t.background,this.inner.style.color=t.foreground)}}class yE extends NE{}yE.className="MJX_ToolTip",yE.style=new Co({["."+yE.className]:{width:"auto",height:"auto",opacity:1,"text-align":"center","border-radius":"4px",padding:0,"border-bottom":"1px dotted black",position:"absolute",display:"inline-block","background-color":"white","z-index":202},["."+yE.className+" > div"]:{"border-radius":"inherit",padding:"0 2px"}});class xE extends NE{}xE.className="MJX_LiveRegion",xE.style=new Co({["."+xE.className]:{position:"absolute",top:0,display:"none",width:"auto",height:"auto",padding:0,opacity:1,"z-index":"202",left:0,right:0,margin:"0 auto","background-color":"white","box-shadow":"0px 5px 20px #888",border:"2px solid #CCCCCC"},["."+xE.className+"_Show"]:{display:"block"}});class vE extends xE{constructor(){super(...arguments),this.active=!1,this.node=null,this.clear=!1,this.highlighter=fE({color:"red"},{color:"black"},this.document.outputJax.name),this.voiceRequest=!1,this.voiceCancelled=!1}Show(t,e){super.Update("\xa0"),this.node=t,super.Show(t,e)}Update(t){if(this.voiceRequest)return void this.makeVoice(t);speechSynthesis.onvoiceschanged=(()=>this.voiceRequest=!0).bind(this);new Promise((t=>{setTimeout((()=>{this.voiceRequest?t(!0):setTimeout((()=>{this.voiceRequest=!0,t(!0)}),100)}),100)})).then((()=>this.makeVoice(t)))}makeVoice(t){this.active=this.document.options.a11y.voicing&&!!speechSynthesis.getVoices().length,speechSynthesis.cancel(),this.clear=!0;const[e,s]=Jb(t,this.document.options.sre.locale,this.document.options.sre.rate);super.Update(e),this.active&&e&&this.makeUtterances(s,this.document.options.sre.locale)}makeUtterances(t,e){this.voiceCancelled=!1;let s=null;for(const i of t)if(i.mark){if(!s){this.highlightNode(i.mark,!0);continue}s.addEventListener("end",(t=>{this.voiceCancelled||this.highlightNode(i.mark)}))}else if(i.pause){const t=parseInt(i.pause.match(/^[0-9]+/)[0]);if(isNaN(t)||!s)continue;s.addEventListener("end",(e=>{speechSynthesis.pause(),setTimeout((()=>{speechSynthesis.resume()}),t)}))}else s=new SpeechSynthesisUtterance(i.text),i.rate&&(s.rate=i.rate),i.pitch&&(s.pitch=i.pitch),s.lang=e,speechSynthesis.speak(s);s&&s.addEventListener("end",(t=>{this.highlighter.unhighlight()}))}Hide(){this.cancelVoice(),super.Hide()}cancelVoice(){this.voiceCancelled=!0,speechSynthesis.cancel(),this.highlighter.unhighlight()}highlightNode(t,e=!1){this.highlighter.unhighlight();const s=Array.from(this.node.querySelectorAll(`[data-semantic-id="${t}"]`));this.clear&&!e||this.highlighter.highlight(s),this.clear=!1}}class CE extends bE{position(t){const e=t.getBoundingClientRect(),s=this.div.getBoundingClientRect();let i,r=e.left+e.width/2-s.width/2;switch(r=r<0?0:r,r+=window.scrollX,this.document.options.a11y.align){case"top":i=e.top-s.height-10;break;case"bottom":i=e.bottom+10;break;default:i=e.top+e.height/2-s.height/2}i+=window.scrollY,i=i<0?0:i,this.div.style.top=i+"px",this.div.style.left=r+"px"}highlight(t){this.div&&(this.inner.firstChild&&!this.inner.firstChild.hasAttribute("sre-highlight")||(this.inner.style.backgroundColor=t.background,this.inner.style.color=t.foreground))}Show(t,e){this.AddElement(),this.div.style.fontSize=this.document.options.a11y.magnify,this.Update(t),super.Show(t,e)}Clear(){this.div&&(this.inner.textContent="",this.inner.style.top="",this.inner.style.backgroundColor="")}Update(t){if(!this.div)return;this.Clear();const e=this.cloneNode(t),s=e.querySelector("[data-mjx-clone]");this.inner.style.backgroundColor=t.style.backgroundColor,s.style.backgroundColor="",s.classList.remove("mjx-selected"),this.inner.appendChild(e),this.position(t)}cloneNode(t){let e=t.cloneNode(!0);if(e.setAttribute("data-mjx-clone","true"),"MJX-CONTAINER"!==e.nodeName){"g"!==e.nodeName&&(e.style.marginLeft=e.style.marginRight="0");let s=t;for(;s&&"MJX-CONTAINER"!==s.nodeName;)s=s.parentNode;if("MJX-MATH"!==e.nodeName&&"svg"!==e.nodeName){if(e=s.firstChild.cloneNode(!1).appendChild(e).parentNode,"svg"===e.nodeName){e.firstChild.setAttribute("transform","matrix(1 0 0 -1 0 0)");const i=parseFloat(e.getAttribute("viewBox").split(/ /)[2]),r=parseFloat(e.getAttribute("width")),{x:n,y:o,width:a,height:c}=t.getBBox();e.setAttribute("viewBox",[n,-(o+c),a,c].join(" ")),e.removeAttribute("style"),e.setAttribute("width",r/i*a+"ex"),e.setAttribute("height",r/i*c+"ex"),s.setAttribute("sre-highlight","false")}}e=s.cloneNode(!1).appendChild(e).parentNode,e.style.margin="0"}return e}}CE.className="MJX_HoverRegion",CE.style=new Co({["."+CE.className]:{display:"block",position:"absolute",width:"max-content",height:"auto",padding:0,opacity:1,"z-index":"202",margin:"0 auto","background-color":"white","line-height":0,"box-shadow":"0px 10px 20px #888",border:"2px solid #CCCCCC"},["."+CE.className+" > div"]:{overflow:"hidden"}});class TE{get highlighter(){return this.pool.highlighter}static stopEvent(t){t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopImmediatePropagation?t.stopImmediatePropagation():t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0}static create(t,e,s,i,...r){return new this(t,e,s,i,...r)}constructor(t,e,s,i,...r){this.document=t,this.pool=e,this.region=s,this.node=i,this.stoppable=!0,this.events=[],this._active=!1}Events(){return this.events}get active(){return this._active}set active(t){this._active=t}Attach(){this.AddEvents()}Detach(){this.RemoveEvents()}Start(){this.active=!0}Stop(){this.active&&(this.region.Clear(),this.region.Hide(),this.active=!1)}AddEvents(){for(const[t,e]of this.events)this.node.addEventListener(t,e)}RemoveEvents(){for(const[t,e]of this.events)this.node.removeEventListener(t,e)}Update(t=!1){}stopEvent(t){this.stoppable&&TE.stopEvent(t)}}var wE=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){function o(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}c((i=i.apply(t,e||[])).next())}))};const _E="[data-speech-node]";function kE(t){return t.matches("mjx-container")}function AE(t,e=!0){return t.shiftKey&&e||t.metaKey||t.altKey||t.ctrlKey}const LE=new Map([["MacOS",["on MacOS and iOS using VoiceOver",", or the VoiceOver arrow keys to select an expression"]],["Windows",["in Windows using NVDA or JAWS",". The screen reader should enter focus or forms mode automatically\nwhen the expression gets the browser focus, but if not, you can toggle\nfocus mode using NVDA+space in NVDA; for JAWS, Enter should start\nforms mode while Numpad Plus leaves it. Also note that you can use\nthe NVDA or JAWS key plus the arrow keys to explore the expression\neven in browse mode, and you can use NVDA+shift+arrow keys to\nnavigate out of an expression that has the focus in NVDA"]],["Unix",["in Unix using Orca",", and Orca should enter focus mode automatically. If not, use the\nOrca+a key to toggle focus mode on or off. Also note that you can use\nOrca+arrow keys to explore expressions even in browse mode"]],["unknown",["with a Screen Reader.",""]]]);class ME extends TE{get generators(){var t;return null===(t=this.item)||void 0===t?void 0:t.generatorPool}get role(){return this.item.ariaRole}get description(){return this.item.roleDescription}get none(){return this.item.none}FocusIn(t){this.item.outputData.nofocus?this.item.outputData.nofocus=!1:(this.clicked||this.Start(),this.clicked=null)}FocusOut(t){this.current&&!this.focusSpeech&&(this.setCurrent(null),this.Stop(),document.hasFocus()||this.focusTop())}KeyDown(t){if(this.pendingIndex.shift(),this.region.cancelVoice(),AE(t,!1))return;const e=this.constructor,s=1===t.key.length?t.key.toLowerCase():t.key,[i,r]=e.keyMap.get(s)||[],n=i?void 0===r||this.active?i(this,t):r:this.undefinedKey(t);n||(this.stopEvent(t),!1===n&&this.sound&&this.NoMove())}MouseDown(t){var e;if(this.pendingIndex=[],this.region.cancelVoice(),AE(t)||2===t.buttons)return void(this.item.outputData.nofocus=!0);const s=this.findClicked(t.target,t.x,t.y);s!==this.document.infoIcon?(null===(e=document.getSelection())||void 0===e||e.removeAllRanges(),t.target.getAttribute("sre-highlighter-added")?this.refocus=s:this.clicked=s):this.stopEvent(t)}Click(t){if(AE(t)||2===t.buttons||"Range"===document.getSelection().type)return void this.FocusOut(null);const e=this.findClicked(t.target,t.x,t.y);if(e===this.document.infoIcon)return this.stopEvent(t),void this.help();e&&!this.node.contains(e)||(this.stopEvent(t),this.refocus=e,this.triggerLinkMouse()||this.Start())}DblClick(t){var e;const s=null!==(e=document.getSelection().direction)&&void 0!==e?e:"none";AE(t)||2===t.buttons||"none"!==s?this.FocusOut(null):(this.stopEvent(t),this.refocus=this.rootNode(),this.Start())}spaceKey(){return this.refocus=this.current,!0}hKey(){this.refocus=this.current,this.help()}escapeKey(){return this.Stop(),this.focusTop(),!0}enterKey(t){if(this.active)if(this.triggerLinkKeyboard(t))this.Stop();else{const t=this.actionable(this.current);if(!t)return!1;this.refocus=t,t.dispatchEvent(new Event("click"))}else this.Start()}homeKey(){this.setCurrent(this.rootNode())}moveDown(t){return t?this.moveToNeighborCell(1,0):this.moveTo(this.firstNode(this.current))}moveUp(t){return t?this.moveToNeighborCell(-1,0):this.moveTo(this.getParent(this.current))}moveRight(t){return t?this.moveToNeighborCell(0,1):this.moveTo(this.nextSibling(this.current))}moveLeft(t){return t?this.moveToNeighborCell(0,-1):this.moveTo(this.prevSibling(this.current))}moveTo(t){if(!t)return!1;this.setCurrent(t)}moveToNeighborCell(t,e){const s=this.tableCell(this.current);if(!s)return!1;const[i,r]=this.cellPosition(s);if(null==i)return!1;const n=this.cellAt(this.cellTable(s),i+t,r+e);if(!n)return!1;this.setCurrent(n)}undefinedKey(t){return!this.active||AE(t)}addMark(){this.current===this.marks[this.marks.length-1]?this.setCurrent(this.current):(this.currentMark=this.marks.length-1,this.marks.push(this.current),this.speak("Position marked"))}prevMark(){if(this.currentMark<0){if(0===this.marks.length)return void this.setCurrent(this.lastMark||this.rootNode());this.currentMark=this.marks.length-1}const t=this.currentMark;this.setCurrent(this.marks[t]),this.currentMark=t-1}clearMarks(){this.marks=[],this.currentMark=-1,this.prevMark()}autoVoice(){const t=!this.document.options.a11y.voicing;this.document.menu?this.document.menu.menu.pool.lookup("voicing").setValue(t):this.document.options.a11y.voicing=t,this.Update()}numberKey(t){if(!this.tableCell(this.current))return!1;if(0===t&&(t=10),this.pendingIndex.length){const e=this.cellTable(this.tableCell(this.current)),s=this.cellAt(e,this.pendingIndex[0]-1,t-1);if(this.pendingIndex=[],this.speak(String(t)),!s)return!1;setTimeout((()=>this.setCurrent(s)),500)}else this.pendingIndex=[null,t],this.speak(`Jump to row ${t} and column`)}depth(){var t,e,s;if("d"===this.speechType)return void this.setCurrent(this.current);this.speechType="d";const i=[[null!==(t=this.node.getAttribute("data-semantic-level"))&&void 0!==t?t:"Level",null!==(e=this.current.getAttribute("aria-level"))&&void 0!==e?e:"0"].join(" ").trim()],r=this.actionable(this.current);r&&i.unshift(null!==(s=this.node.getAttribute("1"===r.getAttribute("toggle")?"data-semantic-expandable":"data-semantic-collapsible"))&&void 0!==s?s:""),this.speak(i.join(" "),this.current.getAttribute(Yb.BRAILLE))}summary(){if("x"===this.speechType)return void this.setCurrent(this.current);this.speechType="x";const t=this.current.getAttribute(Yb.SUMMARY);this.speak(t,this.current.getAttribute(Yb.BRAILLE),this.SsmlAttributes(this.current,Yb.SUMMARY_SSML))}nextRules(){this.node.removeAttribute("data-speech-attached"),this.restartAfter(this.generators.nextRules(this.item))}nextStyle(){this.node.removeAttribute("data-speech-attached"),this.restartAfter(this.generators.nextStyle(this.current,this.item))}details(){const t=this.actionable(this.current);if(!t||!t.getAttribute("data-collapsible")||"1"!==t.getAttribute("toggle")||"z"===this.speechType)return void this.setCurrent(this.current);this.speechType="z";const e=this.nodeId(this.current);let s;this.item.root.walkTree((t=>{t.attributes.get("data-semantic-id")===e&&(s=t)}));let i=this.item.toMathML(s,this.item);s.isKind("math")||(i=`<math>${i}</math>`),i=i.replace(/ (?:data-semantic-|aria-|data-speech-|data-latex).*?=".*?"/g,""),this.item.speechFor(i).then((([t,e])=>this.speak(t,e)))}help(){const t=this.document.adaptor,e=t.node("mjx-help-background"),s=t=>{e.remove(),this.node.focus(),this.stopEvent(t)};e.addEventListener("click",s);const i=t.node("mjx-help-sizer",{},[t.node("mjx-help-dialog",{tabindex:0,role:"dialog","aria-labeledby":"mjx-help-label"},[t.node("h1",{id:"mjx-help-label"},[t.text("MathJax Expression Explorer Help")]),t.node("div"),t.node("input",{type:"button",value:"Close"})])]);e.append(i);const r=i.firstChild;r.addEventListener("click",(t=>this.stopEvent(t))),r.lastChild.addEventListener("click",s),r.addEventListener("keydown",(t=>{"Escape"===t.code&&s(t)}));const[n,o]=LE.get(hi.os);r.childNodes[1].innerHTML=function(t,e){return`\n<H2>Exploring expressions ${t}</h2>\n\n<p>The mathematics on this page is being rendered by <a\nhref="https://www.mathjax.org/" target="_blank">MathJax</a>, which\ngenerates both the text spoken by screen readers, as well as the\nvisual layout for sighted users.</p>\n\n<p>Expressions typeset by MathJax can be explored interactively, and\nare focusable. You can use the <kbd>Tab</kbd> key to move to a typeset\nexpression${e}. Initially, the expression will be read in full,\nbut you can use the following keys to explore the expression\nfurther:<p>\n\n<ul>\n\n<li><kbd>Down Arrow</kbd> moves one level deeper into the expression to\nallow you to explore the current subexpression term by term.</li>\n\n<li><kbd>Up Arrow</kbd> moves back up a level within the expression.</li>\n\n<li><kbd>Right Arrow</kbd> moves to the next term in the current\nsubexpression.</li>\n\n<li><kbd>Left Arrow</kbd> moves to the next term in the current\nsubexpression.</li>\n\n<li><kbd>Shift</kbd>+<kbd>Arrow</kbd> moves to a neighboring cell within a table.\n\n<li><kbd>0-9</kbd>+<kbd>0-9</kbd> jumps to a cell by its index in the table, where 0 = 10.\n\n<li><kbd>Home</kbd> takes you to the top of the expression.</li>\n\n<li><kbd>Enter</kbd> or <kbd>Return</kbd> clicks a link or activates an active\nsubexpression.</li>\n\n<li><kbd>Space</kbd> opens the MathJax contextual menu where you can view\nor copy the source format of the expression, or modify MathJax's\nsettings.</li>\n\n<li><kbd>Escape</kbd> exits the expression explorer.</li>\n\n<li><kbd>x</kbd> gives a summary of the current subexpression.</li>\n\n<li><kbd>z</kbd> gives the full text of a collapsed expression.</li>\n\n<li><kbd>d</kbd> gives the current depth within the expression.</li>\n\n<li><kbd>s</kbd> starts or stops auto-voicing with synchronized highlighting.</li>\n\n<li><kbd>v</kbd> marks the current position in the expression.</li>\n\n<li><kbd>p</kbd> cycles through the marked positions in the expression.</li>\n\n<li><kbd>u</kbd> clears all marked positions and returns to the starting position.</li>\n\n<li><kbd>&gt;</kbd> cycles through the available speech rule sets\n(MathSpeak, ClearSpeak).</li>\n\n<li><kbd>&lt;</kbd> cycles through the verbosity levels for the current\nrule set.</li>\n\n<li><kbd>h</kbd> produces this help listing.</li>\n</ul>\n\n<p>The MathJax contextual menu allows you to enable or disable speech\nor Braille generation for mathematical expressions, the language to\nuse for the spoken mathematics, and other features of MathJax. In\nparticular, the Explorer submenu allows you to specify how the\nmathematics should be identified in the page (e.g., by saying "math"\nwhen the expression is spoken), and whether or not to include a\nmessage about the letter "h" bringing up this dialog box.</p>\n\n<p>The contextual menu also provides options for viewing or copying a\nMathML version of the expression or its original source format,\ncreating an SVG version of the expression, and viewing various other\ninformation.</p>\n\n<p>For more help, see the <a\nhref="https://docs.mathjax.org/en/latest/basic/accessibility.html"\ntarge="_blank">MathJax accessibility documentation.</a></p>\n`}(n,o),document.body.append(e),r.focus()}setCurrent(t,e=!1){if(this.speechType="",document.hasFocus()||(this.refocus=this.current),this.node.setAttribute("aria-busy","true"),this.current){for(const t of this.getSplitNodes(this.current))t.classList.remove("mjx-selected");this.pool.unhighlight(),"last"===this.document.options.a11y.tabSelects&&(this.refocus=this.current),t||(this.lastMark=this.current,this.removeSpeech()),this.current=null}if(this.current=t,this.currentMark=-1,this.current){const s=this.getSplitNodes(this.current);for(const t of s)t.classList.add("mjx-selected");this.pool.highlight(s),this.addSpeech(t,e)}this.node.removeAttribute("aria-busy")}getSplitNodes(t){const e=this.nodeId(t);return e?Array.from(this.node.querySelectorAll(`[data-semantic-id="${e}"]`)):[t]}addSpeech(t,e){var s;null===(s=this.img)||void 0===s||s.remove();let i=[t.getAttribute(Yb.PREFIX),t.getAttribute(Yb.SPEECH),t.getAttribute(Yb.POSTFIX)].join(" ").trim();if(e){let t=this.description===this.none?"":", "+this.description;this.document.options.a11y.help&&(t+=", press h for help"),i+=t}this.speak(i,t.getAttribute(Yb.BRAILLE),this.SsmlAttributes(t,Yb.SPEECH_SSML)),this.node.setAttribute("tabindex","-1")}removeSpeech(){this.speech&&(this.speech.remove(),this.speech=null,this.img&&this.node.append(this.img),this.node.setAttribute("tabindex","0"))}speak(t,e="",s=null,i=this.none){const r=this.speech;this.speech=document.createElement("mjx-speech"),this.speech.setAttribute("role",this.role),this.speech.setAttribute("aria-label",t),this.speech.setAttribute(Yb.SPEECH,t),s&&(this.speech.setAttribute(Yb.PREFIX_SSML,s[0]||""),this.speech.setAttribute(Yb.SPEECH_SSML,s[1]||""),this.speech.setAttribute(Yb.POSTFIX_SSML,s[2]||"")),e&&this.speech.setAttribute("aria-braillelabel",e),this.speech.setAttribute("aria-roledescription",i),this.speech.setAttribute("tabindex","0"),this.node.append(this.speech),this.focusSpeech=!0,this.speech.focus(),this.focusSpeech=!1,this.Update(),r&&setTimeout((()=>r.remove()),100)}attachSpeech(){var t;const e=this.item,s=this.node;if(!s.hasAttribute("has-speech")){for(const t of Array.from(s.childNodes))t.setAttribute("aria-hidden","true");s.setAttribute("has-speech","true")}const i=e.roleDescription,r=(s.getAttribute(Yb.SPEECH)||"")+(i?", "+i:"");null===(t=this.img)||void 0===t||t.remove(),this.img=this.document.adaptor.node("mjx-speech",{"aria-label":r,role:"img","aria-roledescription":e.none}),s.appendChild(this.img)}detachSpeech(){var t;const e=this.node;null===(t=this.img)||void 0===t||t.remove(),e.removeAttribute("has-speech");for(const t of Array.from(e.childNodes))t.removeAttribute("aria-hidden")}focus(){this.node.focus()}nodeId(t){return t.getAttribute("data-semantic-id")}parentId(t){return t.getAttribute("data-semantic-parent")}getNode(t){return t?this.node.querySelector(`[data-semantic-id="${t}"]`):null}getParent(t){return this.getNode(this.parentId(t))}childArray(t){return t?t.getAttribute("data-semantic-children").split(/,/):[]}isCell(t){return!!t&&this.cellTypes.includes(t.getAttribute("data-semantic-type"))}isRow(t){return!!t&&"row"===t.getAttribute("data-semantic-type")}tableCell(t){for(;t&&t!==this.node;){if(this.isCell(t))return t;t=t.parentNode}return null}cellTable(t){const e=this.getParent(t);return this.isRow(e)?this.getParent(e):e}cellPosition(t){const e=this.getParent(t),s=this.childArray(e).indexOf(this.nodeId(t));if(!this.isRow(e))return[s,1];const i=this.getParent(e);return[this.childArray(i).indexOf(this.nodeId(e)),s]}cellAt(t,e,s){const i=this.getNode(this.childArray(t)[e]);if(!this.isRow(i))return 1===s?i:null;return this.getNode(this.childArray(i)[s])}firstNode(t){const e=t.getAttribute("data-semantic-owns");if(!e)return t.querySelector(_E);const s=e.split(/ /);for(const t of s){const e=this.getNode(t);if(null==e?void 0:e.hasAttribute("data-speech-node"))return e}return t.querySelector(_E)}rootNode(){const t=this.node.querySelector("[data-semantic-structure]");if(!t)return this.node.querySelector(_E);const e=t.getAttribute("data-semantic-structure").split(/ /)[0].replace("(","");return this.getNode(e)}nextSibling(t){var e;const s=this.parentId(t);if(!s)return null;const i=null===(e=this.getNode(s).getAttribute("data-semantic-owns"))||void 0===e?void 0:e.split(/ /);if(!i)return null;let r,n=i.indexOf(this.nodeId(t));do{r=this.getNode(i[++n])}while(r&&!r.hasAttribute("data-speech-node"));return r}prevSibling(t){var e;const s=this.parentId(t);if(!s)return null;const i=null===(e=this.getNode(s).getAttribute("data-semantic-owns"))||void 0===e?void 0:e.split(/ /);if(!i)return null;let r,n=i.indexOf(this.nodeId(t));do{r=this.getNode(i[--n])}while(r&&!r.hasAttribute("data-speech-node"));return r}findClicked(t,e,s){const i=this.document.infoIcon;if(i===t||i.contains(t))return i;if("SVG"!==this.node.getAttribute("jax"))return t.closest(_E);let r=null,n=this.node;for(;n;){n.matches(_E)&&(r=n);const t=Array.from(n.childNodes);n=null;for(const i of t)if(i!==this.speech&&i!==this.img&&"rect"!==i.tagName.toLowerCase()){const{left:t,right:r,top:o,bottom:a}=i.getBoundingClientRect();if(t<=e&&e<=r&&o<=s&&s<=a){n=i;break}}}return r}focusTop(){this.focusSpeech=!0,this.node.focus(),this.focusSpeech=!1}SsmlAttributes(t,e){return[t.getAttribute(Yb.PREFIX_SSML),t.getAttribute(e),t.getAttribute(Yb.POSTFIX_SSML)]}restartAfter(t){return wE(this,void 0,void 0,(function*(){yield t,this.attachSpeech();const e=this.current;this.current=null,this.pool.unhighlight(),this.setCurrent(e)}))}constructor(t,e,s,i,r,n,o,a){super(t,e,null,i),this.document=t,this.pool=e,this.region=s,this.node=i,this.brailleRegion=r,this.magnifyRegion=n,this.item=a,this.sound=!1,this.current=null,this.clicked=null,this.refocus=null,this.focusSpeech=!1,this.restarted=null,this.speech=null,this.speechType="",this.img=null,this.attached=!1,this.eventsAttached=!1,this.marks=[],this.currentMark=-1,this.lastMark=null,this.pendingIndex=[],this.cellTypes=["cell","line"],this.events=super.Events().concat([["focusin",this.FocusIn.bind(this)],["focusout",this.FocusOut.bind(this)],["keydown",this.KeyDown.bind(this)],["mousedown",this.MouseDown.bind(this)],["click",this.Click.bind(this)],["dblclick",this.DblClick.bind(this)]])}findStartNode(){let t=this.refocus||this.current;return!t&&this.restarted&&(t=this.node.querySelector(this.restarted)),this.refocus=this.restarted=null,t}Start(){const t=Object.create(null,{Start:{get:()=>super.Start}});return wE(this,void 0,void 0,(function*(){if(!this.attached||this.active)return;if(this.document.activeItem=this.item,this.item.state()<rr.ATTACHSPEECH&&(this.item.attachSpeech(this.document),yield this.generators.promise),this.focusSpeech)return;this.node.classList.add("mjx-explorer-active"),this.node.append(this.document.infoIcon);const e=this.findStartNode();this.setCurrent(e||this.rootNode(),!e),t.Start.call(this);const s=this.document.options,i=s.a11y;i.subtitles&&i.speech&&s.enableSpeech&&this.region.Show(this.node,this.highlighter),i.viewBraille&&i.braille&&s.enableBraille&&this.brailleRegion.Show(this.node,this.highlighter),i.keyMagnifier&&this.magnifyRegion.Show(this.current,this.highlighter),this.Update()}))}Stop(){if(this.active){const t=this.description;this.node.getAttribute("aria-roledescription")!==t&&this.node.setAttribute("aria-roledescription",t),this.node.classList.remove("mjx-explorer-active"),this.document.infoIcon.remove(),this.pool.unhighlight(),this.magnifyRegion.Hide(),this.region.Hide(),this.brailleRegion.Hide()}super.Stop()}Update(){this.active&&(this.region.node=this.node,this.generators.updateRegions(this.speech||this.node,this.region,this.brailleRegion),this.magnifyRegion.Update(this.current))}Attach(){this.attached||(super.Attach(),this.node.setAttribute("tabindex","0"),this.attached=!0)}Detach(){var t;super.RemoveEvents(),this.node.removeAttribute("role"),this.node.removeAttribute("aria-roledescription"),this.node.removeAttribute("aria-label"),null===(t=this.img)||void 0===t||t.remove(),this.active&&this.node.setAttribute("tabindex","0"),this.attached=!1}NoMove(){Kb()}AddEvents(){this.eventsAttached||(super.AddEvents(),this.eventsAttached=!0)}actionable(t){const e=null==t?void 0:t.parentNode;return e&&this.highlighter.isMactionNode(e)?e:null}triggerLinkKeyboard(t){return this.current?this.triggerLink(this.current):t.target instanceof HTMLAnchorElement&&(t.target.dispatchEvent(new MouseEvent("click")),!0)}triggerLink(t){var e;if(null===(e=null==t?void 0:t.getAttribute("data-semantic-postfix"))||void 0===e?void 0:e.match(/(^| )link($| )/))for(;t&&t!==this.node;){if(t instanceof HTMLAnchorElement)return t.dispatchEvent(new MouseEvent("click")),setTimeout((()=>this.FocusOut(null)),50),!0;t=t.parentNode}return!1}triggerLinkMouse(){let t=this.refocus;for(;t&&t!==this.node;){if(this.triggerLink(t))return!0;t=t.parentNode}return!1}semanticFocus(){const t=[];let e="data-semantic-id",s=this.current||this.refocus||this.node;const i=this.actionable(s);i&&(e=i.hasAttribute("data-maction-id")?"data-maction-id":"id",s=i,t.push(_E));const r=s.getAttribute(e);return r&&t.unshift(`[${e}="${r}"]`),t.join(" ")}}ME.keyMap=new Map([["Tab",[()=>!0]],["Escape",[t=>t.escapeKey()]],["Enter",[(t,e)=>t.enterKey(e)]],["Home",[t=>t.homeKey()]],["ArrowDown",[(t,e)=>t.moveDown(e.shiftKey),!0]],["ArrowUp",[(t,e)=>t.moveUp(e.shiftKey),!0]],["ArrowLeft",[(t,e)=>t.moveLeft(e.shiftKey),!0]],["ArrowRight",[(t,e)=>t.moveRight(e.shiftKey),!0]],[" ",[t=>t.spaceKey()]],["h",[t=>t.hKey()]],[">",[t=>t.nextRules(),!1]],["<",[t=>t.nextStyle(),!1]],["x",[t=>t.summary(),!1]],["z",[t=>t.details(),!1]],["d",[t=>t.depth(),!1]],["v",[t=>t.addMark(),!1]],["p",[t=>t.prevMark(),!1]],["u",[t=>t.clearMarks(),!1]],["s",[t=>t.autoVoice(),!1]],...[..."0123456789"].map((t=>[t,[e=>e.numberKey(parseInt(t)),!1]]))]);class IE extends TE{constructor(){super(...arguments),this.events=super.Events().concat([["mouseover",this.MouseOver.bind(this)],["mouseout",this.MouseOut.bind(this)]])}MouseOver(t){this.Start()}MouseOut(t){this.Stop()}}class SE extends IE{constructor(t,e,s,i,r,n){super(t,e,s,i),this.document=t,this.pool=e,this.region=s,this.node=i,this.nodeQuery=r,this.nodeAccess=n}MouseOut(t){this.highlighter.unhighlight(),this.region.Hide(),super.MouseOut(t)}MouseOver(t){super.MouseOver(t);const e=t.target,[s,i]=this.getNode(e);s&&(this.highlighter.unhighlight(),this.highlighter.highlight([s]),this.region.Update(i),this.region.Show(s,this.highlighter))}getNode(t){const e=t;for(;t&&t!==this.node;){if(this.nodeQuery(t))return[t,this.nodeAccess(t)];t=t.parentNode}for(t=e;t;){if(this.nodeQuery(t))return[t,this.nodeAccess(t)];const e=t.childNodes[0];t=e&&"defs"===e.tagName?t.childNodes[1]:e}return[null,null]}}class RE extends SE{}class OE extends SE{}class DE extends SE{constructor(t,e,s,i){super(t,e,new EE(t),i,(t=>this.highlighter.isMactionNode(t)),(()=>{})),this.document=t,this.pool=e,this.node=i}}class PE extends TE{constructor(t,e,s,i,r){super(t,e,null,i),this.document=t,this.pool=e,this.region=s,this.node=i,this.mml=r,this.stoppable=!1}Attach(){super.Attach(),this.Start()}Detach(){this.Stop(),super.Detach()}}class BE extends PE{Start(){this.active||(this.active=!0,this.highlighter.highlightAll(this.node))}Stop(){this.active&&this.highlighter.unhighlightAll(),this.active=!1}}class FE extends PE{constructor(){super(...arguments),this.contrast=new jE,this.leaves=[],this.modality="data-semantic-foreground"}Start(){this.active||(this.active=!0,this.node.hasAttribute("hasforegroundcolor")||(this.colorLeaves(),this.node.setAttribute("hasforegroundcolor","true")),this.leaves.forEach((t=>this.colorize(t))))}Stop(){this.active&&this.leaves.forEach((t=>this.uncolorize(t))),this.active=!1}colorLeaves(){this.leaves=Array.from(this.node.querySelectorAll("[data-semantic-id]:not([data-semantic-children])"));for(const t of this.leaves)t.setAttribute(this.modality,this.contrast.generate()),this.contrast.increment()}colorize(t){t.hasAttribute(this.modality)&&(t.setAttribute(this.modality+"-old",t.style.color),t.style.color=t.getAttribute(this.modality))}uncolorize(t){const e=this.modality+"-old";t.hasAttribute(e)&&(t.style.color=t.getAttribute(e))}}class jE{constructor(){this.hue=10,this.sat=100,this.light=50,this.incr=53}generate(){return jE.hsl2rgb(this.hue,this.sat,this.light)}increment(){this.hue=(this.hue+this.incr)%360}static hsl2rgb(t,e,s){e=e>1?e/100:e,s=s>1?s/100:s;const i=(1-Math.abs(2*s-1))*e,r=i*(1-Math.abs(t/60%2-1)),n=s-i/2;let o=0,a=0,c=0;return 0<=t&&t<60?[o,a,c]=[i,r,0]:60<=t&&t<120?[o,a,c]=[r,i,0]:120<=t&&t<180?[o,a,c]=[0,i,r]:180<=t&&t<240?[o,a,c]=[0,r,i]:240<=t&&t<300?[o,a,c]=[r,0,i]:300<=t&&t<360&&([o,a,c]=[i,0,r]),`rgb(${255*(o+n)}, ${255*(a+n)}, ${255*(c+n)})`}}class UE{constructor(t){this.document=t,this.speechRegion=new vE(this.document),this.brailleRegion=new xE(this.document),this.magnifier=new CE(this.document),this.tooltip1=new yE(this.document),this.tooltip2=new yE(this.document),this.tooltip3=new yE(this.document)}}const qE={speech:(t,e,s,...i)=>{const r=ME.create(t,e,t.explorerRegions.speechRegion,s,t.explorerRegions.brailleRegion,t.explorerRegions.magnifier,i[0],i[1]);return r.sound=!0,r},mouseMagnifier:(t,e,s,...i)=>OE.create(t,e,t.explorerRegions.magnifier,s,(t=>t.hasAttribute("data-semantic-type")),(t=>t)),hover:(t,e,s,...i)=>DE.create(t,e,null,s),infoType:(t,e,s,...i)=>RE.create(t,e,t.explorerRegions.tooltip1,s,(t=>t.hasAttribute("data-semantic-type")),(t=>t.getAttribute("data-semantic-type"))),infoRole:(t,e,s,...i)=>RE.create(t,e,t.explorerRegions.tooltip2,s,(t=>t.hasAttribute("data-semantic-role")),(t=>t.getAttribute("data-semantic-role"))),infoPrefix:(t,e,s,...i)=>RE.create(t,e,t.explorerRegions.tooltip3,s,(t=>{var e;return null===(e=t.hasAttribute)||void 0===e?void 0:e.call(t,"data-semantic-prefix-none")}),(t=>{var e;return null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-semantic-prefix-none")})),flame:(t,e,s,...i)=>BE.create(t,e,null,s),treeColoring:(t,e,s,...i)=>FE.create(t,e,null,s,...i)};class HE{constructor(){this.explorers={},this.attached=[],this._restart=[],this.speechExplorerKeys=["speech","braille","keyMagnifier"]}get highlighter(){if(this._renderer!==this.document.outputJax.name)return this._renderer=this.document.outputJax.name,this.setPrimaryHighlighter(),this._highlighter;const[t,e]=this.colorOptions();return this._highlighter.setColor(e,t),this._highlighter}init(t,e,s,i){this.document=t,this.mml=s,this.node=e,this.setPrimaryHighlighter();for(const t of Object.keys(qE))this.explorers[t]=qE[t](this.document,this,this.node,this.mml,i);this.setSecondaryHighlighter(),this.attach()}attach(){this.attached=[];const t=[],e=this.document.options.a11y;for(const[s,i]of Object.entries(this.explorers))i instanceof ME?(i.stoppable=!1,t.unshift(i),this.speechExplorerKeys.some((t=>this.document.options.a11y[t]))?(i.Attach(),this.attached.push(s)):i.Detach()):e[s]||"speech"===s&&(e.braille||e.keyMagnifier)?(i.Attach(),this.attached.push(s)):i.Detach();for(const e of t)if(e.attached){e.stoppable=!0;break}}reattach(){for(const t of this.attached){const e=this.explorers[t];e.active&&(this._restart.push(t),e.Stop())}}restart(){this._restart.forEach((t=>{this.explorers[t].Start()})),this._restart=[]}setPrimaryHighlighter(){const[t,e]=this.colorOptions();this._highlighter=fE(e,t,this.document.outputJax.name)}setSecondaryHighlighter(){this.secondaryHighlighter=fE({color:"red"},{color:"black"},this.document.outputJax.name),this.speech.region.highlighter=this.secondaryHighlighter}highlight(t){this.highlighter.highlight(t)}unhighlight(){this.secondaryHighlighter.unhighlight(),this.highlighter.unhighlight()}get speech(){return this.explorers.speech}colorOptions(){const t=this.document.options.a11y;return[{color:t.foregroundColor.toLowerCase(),alpha:t.foregroundOpacity/100},{color:t.backgroundColor.toLowerCase(),alpha:t.backgroundOpacity/100}]}}const WE="Unix"===hi.os;function zE(t,e){var s;return s=class extends t{constructor(){super(...arguments),this.refocus=null}get ariaRole(){return this.constructor.ariaRole}get roleDescription(){const t=this.constructor;return"none"===t.roleDescription?t.none:t.roleDescription}get none(){return this.constructor.none}attachSpeech(t){var e,s;super.attachSpeech(t),null===(s=null===(e=this.outputData.speechPromise)||void 0===e?void 0:e.then((()=>this.explorers.speech.attachSpeech())))||void 0===s||s.then((()=>{var t;(null===(t=this.explorers)||void 0===t?void 0:t.speech)&&(this.explorers.speech.restarted=this.refocus),this.refocus=null,this.explorers&&this.explorers.restart()}))}detachSpeech(t){super.detachSpeech(t),this.explorers.speech.detachSpeech()}explorable(t,s=!1){if(!(this.state()>=rr.EXPLORER)){if(!this.isEscaped&&(t.options.enableExplorer||s)){const s=this.typesetRoot,i=e(this.root);this.explorers||(this.explorers=new HE),this.explorers.init(t,s,i,this)}this.state(rr.EXPLORER)}}state(t=null,e=!1){if(t<rr.EXPLORER&&this.explorers)for(const t of Object.values(this.explorers.explorers))t.active&&t.Stop();return super.state(t,e)}rerender(t,e=rr.RERENDER){const s=this.setTemporaryFocus(t);super.rerender(t,e),this.clearTemporaryFocus(s)}setTemporaryFocus(t){var e;let s=null;if(this.explorers){const i=this.explorers.speech;if(s=(null==i?void 0:i.attached)?t.tmpFocus:null,s){this.refocus=null!==(e=i.semanticFocus())&&void 0!==e?e:null;const r=t.adaptor;r.append(r.body(),s)}this.explorers.reattach(),null==s||s.focus()}return s}clearTemporaryFocus(t){var e;if(t){(null!==(e=this.outputData.speechPromise)&&void 0!==e?e:Promise.resolve()).then((()=>setTimeout((()=>t.remove()),100)))}}},s.ariaRole=WE?"tree":"application",s.roleDescription="math",s.none="\x91",s}function XE(t){var e;return e=class extends t{constructor(...t){super(...t),this.explorerRegions=null,this.activeItem=null;const e=this.constructor.ProcessBits;e.has("explorer")||e.allocate("explorer");const s=new Jn(this.mmlFactory),i=this.options;i.a11y.speechRules||(i.a11y.speechRules=`${i.sre.domain}-${i.sre.style}`);const r=i.MathItem=zE(i.MathItem,(t=>s.visitTree(t)));r.roleDescription=i.roleDescription,this.explorerRegions=new UE(this),"addStyles"in this&&this.addStyles(this.constructor.speechStyles);const n=this.adaptor,o="http://www.w3.org/2000/svg";this.infoIcon=n.node("mjx-help",{},[n.node("svg",{viewBox:"0 0 18 18",xmlns:o,"aria-hidden":"true"},[n.node("circle",{stroke:"none"},[],o),n.node("circle",{},[],o),n.node("line",{x1:9,y1:9,x2:9,y2:13},[],o),n.node("line",{x1:9,y1:5.5,x2:9,y2:5.5},[],o)],o)]),this.tmpFocus=this.adaptor.node("mjx-focus",{tabIndex:0,style:{outline:"none",display:"block",position:"absolute",top:0,left:"-10px",width:"1px",height:"1px",overflow:"hidden"},role:r.ariaRole,"aria-label":r.none,"aria-roledescription":r.none})}explorable(){if(!this.processed.isSet("explorer")){if(this.options.enableExplorer)for(const t of this.math)t.explorable(this);this.processed.set("explorer")}return this}rerender(t){const e=this.activeItem,s=null==e?void 0:e.setTemporaryFocus(this);return super.rerender(t),null==e||e.clearTemporaryFocus(s),this}state(t,e=!1){return super.state(t,e),t<rr.EXPLORER&&this.processed.clear("explorer"),this}},e.OPTIONS=Object.assign(Object.assign({},t.OPTIONS),{enableExplorer:li,renderActions:Ai(Object.assign(Object.assign({},t.OPTIONS.renderActions),{explorable:[rr.EXPLORER]})),sre:Ai(Object.assign(Object.assign({},t.OPTIONS.sre),{speech:"none"})),a11y:Object.assign(Object.assign({},t.OPTIONS.a11y),{align:"top",backgroundColor:"Blue",backgroundOpacity:20,flame:!1,foregroundColor:"Black",foregroundOpacity:100,highlight:"None",hover:!1,infoPrefix:!1,infoRole:!1,infoType:!1,keyMagnifier:!1,magnification:"None",magnify:"400%",mouseMagnifier:!1,subtitles:!1,treeColoring:!1,viewBraille:!1,voicing:!1,help:!0,roleDescription:"math",tabSelects:"all"})}),e.speechStyles={'mjx-container[has-speech="true"]':{position:"relative",cursor:"default"},"mjx-speech":{position:"absolute","z-index":-1,left:0,top:0,bottom:0,right:0},"mjx-speech:focus":{outline:"none"},"mjx-container .mjx-selected":{outline:"2px solid black"},"mjx-container > mjx-help":{display:"none",position:"absolute",top:"-.33em",right:"-.5em",width:".6em",height:".6em",cursor:"pointer"},'mjx-container[display="true"] > mjx-help':{right:0},"mjx-help > svg":{stroke:"black",width:"100%",height:"100%"},"mjx-help > svg > circle":{"stroke-width":"1.5px",cx:"9px",cy:"9px",r:"9px",fill:"white"},"mjx-help > svg > circle:nth-child(2)":{fill:"rgba(0, 0, 255, 0.2)",r:"7px"},"mjx-help > svg > line":{"stroke-width":"2.5px","stroke-linecap":"round"},"mjx-help:hover > svg > circle:nth-child(2)":{fill:"white"},"mjx-container.mjx-explorer-active > mjx-help":{display:"inline-flex","align-items":"center"},"mjx-help-sizer":{position:"fixed",width:"40%","max-width":"30em",top:"3em",left:"50%"},"mjx-help-dialog":{position:"absolute",width:"200%",left:"-100%",border:"3px outset","border-radius":"15px",color:"black","background-color":"#DDDDDD","z-index":"301","text-align":"right","font-style":"normal","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal",float:"none","box-shadow":"0px 10px 20px #808080",outline:"none"},"mjx-help-dialog > h1":{"font-size":"24px","text-align":"center",margin:".5em 0"},"mjx-help-dialog > div":{margin:"0 1em",padding:"3px",overflow:"auto",height:"20em",border:"2px inset black","background-color":"white","text-align":"left"},"mjx-help-dialog > input":{margin:".5em 2em"},"mjx-help-dialog kbd":{display:"inline-block",padding:"3px 5px","font-size":"11px","line-height":"10px",color:"#444d56","vertical-align":"middle","background-color":"#fafbfc",border:"solid 1.5px #c6cbd1","border-bottom-color":"#959da5","border-radius":"3px","box-shadow":"inset -.5px -1px 0 #959da5"},"mjx-help-dialog ul":{"list-style-type":"none"},"mjx-help-dialog li":{"margin-bottom":".5em"},"mjx-help-background":{position:"fixed",top:0,left:0,right:0,bottom:0}},e}function VE(t,e=null){return t.documentClass.prototype.attachSpeech||(t=aE(t,e)),t.documentClass=XE(t.documentClass),t}function GE(t,e){var s;const i=ib();for(const s in e)void 0!==t.options.a11y[s]?JE(t,s,e[s]):void 0!==i[s]&&(t.options.sre[s]=e[s]);e.roleDescription&&(t.options.MathItem.roleDescription=e.roleDescription);for(const e of t.math)null===(s=null==e?void 0:e.explorers)||void 0===s||s.attach()}function JE(t,e,s){switch(e){case"speechRules":{const[e,i]=s.split("-");t.options.sre.domain=e,t.options.sre.style=i;break}case"magnification":switch(s){case"None":t.options.a11y.magnification=s,t.options.a11y.keyMagnifier=!1,t.options.a11y.mouseMagnifier=!1;break;case"Keyboard":t.options.a11y.magnification=s,t.options.a11y.keyMagnifier=!0,t.options.a11y.mouseMagnifier=!1;break;case"Mouse":t.options.a11y.magnification=s,t.options.a11y.keyMagnifier=!1,t.options.a11y.mouseMagnifier=!0}break;case"highlight":switch(s){case"None":t.options.a11y.highlight=s,t.options.a11y.hover=!1,t.options.a11y.flame=!1;break;case"Hover":t.options.a11y.highlight=s,t.options.a11y.hover=!0,t.options.a11y.flame=!1;break;case"Flame":t.options.a11y.highlight=s,t.options.a11y.hover=!1,t.options.a11y.flame=!0}break;case"locale":t.options.sre.locale=s;break;default:t.options.a11y[e]=s}}nr("EXPLORER",rr.INSERTED+30),MathJax.loader&&MathJax.loader.checkVersion("a11y/explorer",si,"a11y"),ai({_:{a11y:{explorer_ts:ei,explorer:{Explorer:$s,ExplorerPool:ti,Highlighter:Js,KeyExplorer:Ys,MouseExplorer:Qs,Region:Ks,TreeExplorer:Zs}}}}),MathJax.startup&&li&&MathJax.startup.extendHandler((t=>VE(t))),Ni.preLoaded("a11y/sre","a11y/semantic-enrich","a11y/speech","a11y/explorer"),Ni.preLoaded("loader","startup","core","input/tex","input/mml","output/chtml","ui/menu"),Ni.saveVersion("tex-mml-chtml"),function(t,e){Yd.loadFont(t,"chtml",Vd,e)}((function(t){return Ni.load(...xi.load).then((()=>(t||function(){})())).then((()=>xi.ready())).catch((t=>xi.failed(t)))}),!0)})()})();