@pie-players/pie-section-player 0.3.72 → 0.3.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/README.md +198 -37
  2. package/dist/browser/assets/evaluation-worker-DkU_wGh3.js +155241 -0
  3. package/dist/browser/chunks/ItemToolBar-wr2myaah-2ce4b643.js +1 -0
  4. package/dist/browser/chunks/PUA-tLuTiQ7--f2b27953.js +1 -0
  5. package/dist/browser/chunks/ToolCoordinator-cc2dc319.js +1 -0
  6. package/dist/browser/chunks/accents-BTUYmhn9-cafeb96e.js +1 -0
  7. package/dist/browser/chunks/accents-b-i-CngHZsLL-e0eb98fd.js +1 -0
  8. package/dist/browser/chunks/arabic-BzEHMVZD-30ac1ade.js +1 -0
  9. package/dist/browser/chunks/arrows-VjxlU-jv-2e17c192.js +1 -0
  10. package/dist/browser/chunks/base-dfd67c41.js +1 -0
  11. package/dist/browser/chunks/braille-BeWC_Ruq-a3bb8ef9.js +1 -0
  12. package/dist/browser/chunks/braille-d-Dk6J96GO-d832bfbf.js +1 -0
  13. package/dist/browser/chunks/browser-a3c32178.js +36 -0
  14. package/dist/browser/chunks/calculator-element-271c142f.js +9 -0
  15. package/dist/browser/chunks/calligraphic-Cew9cU3x-04cf0735.js +1 -0
  16. package/dist/browser/chunks/cherokee-Cny3FYho-4da7d2f3.js +1 -0
  17. package/dist/browser/chunks/classPrivateFieldGet2-338e0179.js +1 -0
  18. package/dist/browser/chunks/custom-element-define-2a92deb0.js +1 -0
  19. package/dist/browser/chunks/cyrillic-CfCDulXU-5550df0b.js +1 -0
  20. package/dist/browser/chunks/cyrillic-ss-lU7bNGG9-12eb0188.js +1 -0
  21. package/dist/browser/chunks/defineProperty-a20a667d.js +1 -0
  22. package/dist/browser/chunks/devanagari-CDIz2h-r-18c38725.js +1 -0
  23. package/dist/browser/chunks/dist-41b39e7f.js +1 -0
  24. package/dist/browser/chunks/dist-59132a53.js +1 -0
  25. package/dist/browser/chunks/dist-60d7afef.js +1 -0
  26. package/dist/browser/chunks/dist-ca9b9622.js +1 -0
  27. package/dist/browser/chunks/double-struck-BpJEQk8y-500ce8dd.js +1 -0
  28. package/dist/browser/chunks/en-5ff22e17.js +1 -0
  29. package/dist/browser/chunks/es-a0ba6cb6.js +1 -0
  30. package/dist/browser/chunks/focus-trap-44913bf3.js +1 -0
  31. package/dist/browser/chunks/fraktur-rLEq9DEH-44cc14d8.js +1 -0
  32. package/dist/browser/chunks/greek-BlraJTyL-90ce8924.js +1 -0
  33. package/dist/browser/chunks/greek-ss-D-EN2PK0-91610739.js +1 -0
  34. package/dist/browser/chunks/hebrew-GiQZeybp-b583f555.js +1 -0
  35. package/dist/browser/chunks/latin-b-BhEnC7R2-d13e06ff.js +1 -0
  36. package/dist/browser/chunks/latin-bi-DqiIKv3U-1dec8705.js +1 -0
  37. package/dist/browser/chunks/latin-i-B1xtwaE1-21637466.js +1 -0
  38. package/dist/browser/chunks/latin-xfWFlLkD-5bcea5cf.js +1 -0
  39. package/dist/browser/chunks/logger-8b07fb72.js +1 -0
  40. package/dist/browser/chunks/marrows-DD1NgMQi-15b63755.js +1 -0
  41. package/dist/browser/chunks/math-DpWn1mbG-38eeb914.js +1 -0
  42. package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -0
  43. package/dist/browser/chunks/mathjax-D2JHb_R_-64780dc5.js +232 -0
  44. package/dist/browser/chunks/module-0191e321.js +74 -0
  45. package/dist/browser/chunks/module-shim-58659a86.js +0 -0
  46. package/dist/browser/chunks/module-shim-b4470740.js +12 -0
  47. package/dist/browser/chunks/monospace-D116QD2a-98d484fd.js +1 -0
  48. package/dist/browser/chunks/monospace-ex-DcXpouKS-456b403c.js +1 -0
  49. package/dist/browser/chunks/monospace-l-Ct5wkMDs-f34a4a9e.js +1 -0
  50. package/dist/browser/chunks/mshapes-DCp86WSX-c0055952.js +1 -0
  51. package/dist/browser/chunks/nds-icon-button-d602f784.js +194 -0
  52. package/dist/browser/chunks/nl-NL-364d61b9.js +1 -0
  53. package/dist/browser/chunks/nl-NL-8b7e6d4b.js +1 -0
  54. package/dist/browser/chunks/overlay-containment-edaaff13.js +1 -0
  55. package/dist/browser/chunks/overlay-placement-e8058232.js +1 -0
  56. package/dist/browser/chunks/phonetics-BwOCw2Y9-d2e3af59.js +1 -0
  57. package/dist/browser/chunks/phonetics-ss-CRtMn02f-579b6135.js +1 -0
  58. package/dist/browser/chunks/pie-api-client-687c319a.js +1 -0
  59. package/dist/browser/chunks/pie-tool-calculator-cortex-0626bc24.js +9 -0
  60. package/dist/browser/chunks/pie-tool-calculator-geogebra-561236cb.js +9 -0
  61. package/dist/browser/chunks/pointer-gesture-ce75f0a7.js +1 -0
  62. package/dist/browser/chunks/preload-helper-6ad28da3.js +1 -0
  63. package/dist/browser/chunks/provider-4c704118.js +1 -0
  64. package/dist/browser/chunks/rolldown-runtime-1287ba31.js +1 -0
  65. package/dist/browser/chunks/runtime-C7H1jS4E-64772f5e.js +8413 -0
  66. package/dist/browser/chunks/sanitize-svg-icon-b9082bba.js +3 -0
  67. package/dist/browser/chunks/sans-serif-BYPZKlE9-2efdbcd9.js +1 -0
  68. package/dist/browser/chunks/sans-serif-b-B0kRKiC--b5530dce.js +1 -0
  69. package/dist/browser/chunks/sans-serif-bi-DXWul6mu-5370dba4.js +1 -0
  70. package/dist/browser/chunks/sans-serif-ex-Boux1kMP-aa178f31.js +1 -0
  71. package/dist/browser/chunks/sans-serif-i-676RFaSO-2db54474.js +1 -0
  72. package/dist/browser/chunks/sans-serif-r-DrN9xdZt-0fc72eea.js +1 -0
  73. package/dist/browser/chunks/script-0ohehnXc-526904f4.js +1 -0
  74. package/dist/browser/chunks/shapes-BG47NodJ-d59b0eca.js +1 -0
  75. package/dist/browser/chunks/src-BcptuNS5-ed25d7fd.js +191 -0
  76. package/dist/browser/chunks/sre-engine-wf9s43gg-f09289c5.js +53 -0
  77. package/dist/browser/chunks/symbols-BqnUxf_t-83087e87.js +1 -0
  78. package/dist/browser/chunks/symbols-b-i-eg9k5hmF-9c461ac2.js +1 -0
  79. package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +248 -0
  80. package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +13 -0
  81. package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +26 -0
  82. package/dist/browser/chunks/tool-dictionary-cecff3b4.js +7 -0
  83. package/dist/browser/chunks/tool-graph-cb0338e8.js +11 -0
  84. package/dist/browser/chunks/tool-host-contract-b93b482c.js +1 -0
  85. package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +62 -0
  86. package/dist/browser/chunks/tool-periodic-table-43b133b8.js +153 -0
  87. package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +4 -0
  88. package/dist/browser/chunks/tool-protractor-23f77028.js +17 -0
  89. package/dist/browser/chunks/tool-ruler-1d9a03a6.js +15 -0
  90. package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +179 -0
  91. package/dist/browser/chunks/variants-2LRNhOUP-966fc49d.js +1 -0
  92. package/dist/browser/chunks/versioned-tag-54a76be9.js +1 -0
  93. package/dist/browser/pie-section-player.js +1613 -0
  94. package/dist/browser.d.ts +10 -0
  95. package/dist/chunks/ItemToolBar-wr2myaah-1287ba31.js +28 -0
  96. package/dist/chunks/module-shim-58659a86.js +2129 -0
  97. package/dist/chunks/{nl-NL-9312c316.js → nl-NL-364d61b9.js} +8 -2
  98. package/dist/chunks/sre-engine-wf9s43gg-f09289c5.js +8 -0
  99. package/dist/components/shared/composition.d.ts +0 -1
  100. package/dist/components/shared/layout-host-methods.d.ts +400 -0
  101. package/dist/components/shared/missing-tool-providers.d.ts +16 -0
  102. package/dist/components/shared/player-preload.d.ts +14 -10
  103. package/dist/contracts/host-hooks.d.ts +4 -5
  104. package/dist/contracts/host-hooks.js +0 -0
  105. package/dist/contracts/layout-contract.js +0 -0
  106. package/dist/contracts/layout-parity-metadata.js +87 -0
  107. package/dist/contracts/public-events.d.ts +14 -15
  108. package/dist/contracts/public-events.js +12 -0
  109. package/dist/contracts/runtime-host-contract.js +0 -0
  110. package/dist/controllers/SectionController.d.ts +21 -0
  111. package/dist/controllers/toolkit-section-contracts.d.ts +1 -17
  112. package/dist/controllers/types.d.ts +17 -10
  113. package/dist/pie-section-player.js +19353 -37273
  114. package/dist/policies/index.d.ts +9 -2
  115. package/dist/policies/index.js +25 -0
  116. package/package.json +34 -29
  117. package/dist/chunks/module-a516757f.js +0 -73997
  118. package/dist/chunks/nl-NL-ef6dd604.js +0 -505
  119. package/dist/chunks/pie-api-client-22de9d9c.js +0 -161
  120. package/dist/chunks/rolldown-runtime-1287ba31.js +0 -20
  121. package/dist/chunks/sre-0162a7a9.js +0 -17637
  122. package/dist/contracts/stages.d.ts +0 -10
  123. package/dist/utils/z-index.d.ts +0 -5
@@ -0,0 +1,232 @@
1
+ import{t as kt}from"./preload-helper-6ad28da3.js";import{a as ws,r as q1}from"./math-rendering-ready-9a0fd90a.js";function G1(t,e){let i={};for(let r of Object.keys(t)){let s=t[r];for(let n of Object.keys(s)){i[n]||(i[n]={});let a=s[n];if(r)for(let o of Object.keys(a)){let h=a[parseInt(o)];h[3]||(h[3]={}),e?h[3].ff=e+"-"+r:h[3].f=r}Object.assign(i[n],a)}}return i}var wu="4.1.3",Tr=class Iu{constructor(){this.items=[],this.items=[]}[Symbol.iterator](){let e=0,i=this.items;return{next(){return{value:i[e++],done:e>i.length}}}}add(e,i=Iu.DEFAULTPRIORITY){let r=this.items.length;do r--;while(r>=0&&i<this.items[r].priority);return this.items.splice(r+1,0,{item:e,priority:i}),e}remove(e){let i=this.items.length;do i--;while(i>=0&&this.items[i].item!==e);return i>=0&&this.items.splice(i,1),this}};Tr.DEFAULTPRIORITY=5;var V1=class extends Tr{register(t){return this.add(t,t.priority)}unregister(t){this.remove(t)}handlesDocument(t){for(let e of this){let i=e.item;if(i.handlesDocument(t))return i}throw Error("Can't find handler for document")}document(t,e=null){return this.handlesDocument(t).create(t,e)}};function va(t){return new Promise(function e(i,r){let s=n=>{n.retry instanceof Promise?n.retry.then(()=>e(i,r)).catch(a=>r(a)):n.restart?.isCallback?MathJax.Callback.After(()=>e(i,r),n.restart):r(n)};try{let n=t();n instanceof Promise?n.then(a=>i(a)).catch(a=>s(a)):i(n)}catch(n){s(n)}})}function On(t){let e=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}var Ta=typeof window<"u",X1=typeof exports<"u",ni={window:Ta?window:null,document:Ta?window.document:null,os:(()=>{if(Ta&&window.navigator){let t=window.navigator.appVersion;for(let[e,i]of[["Win","Windows"],["Mac","MacOS"],["X11","Unix"],["Linux","Unix"]])if(t.includes(e))return i;if(window.navigator.userAgent.includes("Android"))return"Unix"}else if(typeof process<"u")return{linux:"Unix",android:"Unix",aix:"Unix",freebsd:"Unix",netbsd:"Unix",openbsd:"Unix",sunos:"Unix",darwin:"MacOS",win32:"Windows",cygwin:"Windows"}[process.platform]||process.platform;return"unknown"})(),path:t=>t};ni.os==="Windows"&&(ni.path=t=>t.match(/^[/\\]?[a-zA-Z]:[/\\]/)?(X1?"":"file://")+t.replace(/\\/g,"/").replace(/^\//,""):t.replace(/^\//,"file:///"));var We={version:wu,context:ni,handlers:new V1,document:function(t,e){return We.handlers.document(t,e)},handleRetriesFor:va,retryAfter:On,asyncLoad:null,asyncIsSynchronous:!1},$1={}.constructor;function pl(t){return typeof t=="object"&&!!t&&(t.constructor===$1||t.constructor===To)}var ku={invalidOption:"warn",optionError:(t,e)=>{if(ku.invalidOption==="fatal")throw Error(t);console.warn("MathJax: "+t)}},To=class{};function qe(t){return Object.assign(Object.create(To.prototype),t)}function jo(t){return Array.isArray(t)?t:[t]}function ml(t){return t?Object.keys(t).concat(Object.getOwnPropertySymbols(t)):[]}function Ou(t){let e={};for(let i of ml(t)){let r=Object.getOwnPropertyDescriptor(t,i),s=r.value;Array.isArray(s)?r.value=Mn([],s,!1):pl(s)&&(r.value=Ou(s)),r.enumerable&&(e[i]=r)}return Object.defineProperties(t.constructor===To?qe({}):{},e)}function Mn(t,e,i=!0){for(let r of ml(e)){if(i&&t[r]===void 0&&t.constructor!==To){typeof r=="symbol"&&(r=r.toString()),ku.optionError(`Invalid option "${r}" (no default value).`,r);continue}let s=e[r],n=t[r];if(pl(s)&&n!==null&&(typeof n=="object"||typeof n=="function")){let a=ml(s);Array.isArray(n)&&(a.length===1&&(a[0]==="[+]"||a[0]==="[-]")&&Array.isArray(s[a[0]])||a.length===2&&a.sort().join(",")==="[+],[-]"&&Array.isArray(s["[+]"])&&Array.isArray(s["[-]"]))?(s["[-]"]&&(n=t[r]=n.filter(o=>s["[-]"].indexOf(o)<0)),s["[+]"]&&(t[r]=[...n,...s["[+]"]])):Mn(n,s,i)}else Array.isArray(s)?(t[r]=[],Mn(t[r],s,!1)):pl(s)?t[r]=Ou(s):t[r]=s}return t}function Xe(t,...e){return e.forEach(i=>Mn(t,i,!1)),t}function fi(t,...e){return e.forEach(i=>Mn(t,i,!0)),t}function Co(t,...e){let i=[];for(let r of e){let s={},n={};for(let a of Object.keys(t||{}))(r[a]===void 0?n:s)[a]=t[a];i.push(s),t=n}return i.unshift(t),i}function zs(t,e,i=null){return Object.hasOwn(e,t)?e[t]:i}function Mu(t){return We.asyncLoad?new Promise((e,i)=>{let r=We.asyncLoad(t);r instanceof Promise?r.then(s=>e(s)).catch(s=>i(s)):e(r)}):Promise.reject(`Can't load '${t}': No mathjax.asyncLoad method specified`)}var fe={None:"",Vertical:"v",Horizontal:"h"},B=fe.Vertical,j=fe.Horizontal,K1=function(t,e,i,r){function s(n){return n instanceof i?n:new i(function(a){a(n)})}return new(i||(i=Promise))(function(n,a){function o(p){try{d(r.next(p))}catch(E){a(E)}}function h(p){try{d(r.throw(p))}catch(E){a(E)}}function d(p){p.done?n(p.value):s(p.value).then(o,h)}d((r=r.apply(t,e||[])).next())})},xn=.07,J1=.07,fl={dir:fe.None};function $r(t,e,i){return i?Xe(t,{[e]:i})[e]:t[e]}var ae=class{get CLASS(){return this.constructor}static charOptions(t,e){let i=t[e];if(!Array.isArray(i))throw Error(`Character data hasn't been loaded for 0x${e.toString(16).toUpperCase()}`);return i.length===3&&(i[3]={}),i[3]}static defineDynamicFiles(t,e=""){let i={};return(t||[]).forEach(([r,s,n])=>{i[r]={extension:e,file:r,variants:s,delimiters:n||[],promise:null,failed:!1,setup:a=>{i[r].failed=!0}}}),i}static dynamicSetup(t,e,i,r={},s=null){let n=t?this.dynamicExtensions.get(t):null,a=t?n.files:this.dynamicFiles;a[e].setup=o=>{Object.keys(i).forEach(h=>o.defineChars(h,i[h])),o.defineDelimiters(r),t&&this.adjustDelimiters(o.delimiters,Object.keys(r),n.sizeN,n.stretchN),s&&o.addDynamicFontCss(s)}}static adjustDelimiters(t,e,i,r){e.forEach(s=>{let n=t[parseInt(s)];"dir"in n&&(n.variants&&(n.variants=this.adjustArrayIndices(n.variants,i)),n.stretchv&&(n.stretchv=this.adjustArrayIndices(n.stretchv,r)))})}static adjustArrayIndices(t,e){return t.map(i=>i<0?e-1-i:i)}static addExtension(t,e=""){let i={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,i);for(let[r,s]of[["options","OPTIONS"],["variants","defaultVariants"],["variantSmp","VariantSmp"],["cssFonts","defaultCssFonts"],["accentMap","defaultAccentMap"],["moMap","defaultMoMap"],["mnMap","defaultMnMap"],["parameters","defaultParams"],["chars","defaultChars"],["sizeVariants","defaultSizeVariants"],["stretchVariants","defaultStretchVariants"]])$r(this,s,t[r]);t.delimiters&&(Object.assign(this.defaultDelimiters,t.delimiters),this.adjustDelimiters(this.defaultDelimiters,Object.keys(t.delimiters),i.sizeN,i.stretchN))}constructor(t=null){this.variant={},this.delimiters={},this.cssFontMap={},this.cssFontPrefix="",this.remapChars={},this.skewIcFactor=.75;let e=this.CLASS;this.options=fi(Xe({},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(i=>this.defineChars(i,e.defaultChars[i])),this.defineRemap("accent",e.defaultAccentMap),this.defineRemap("mo",e.defaultMoMap),this.defineRemap("mn",e.defaultMnMap),this.defineDynamicCharacters(e.dynamicFiles),e.dynamicExtensions.forEach(i=>this.defineDynamicCharacters(i.files))}setOptions(t){Xe(this.options,t)}addExtension(t,e=""){let i=this.constructor.JAX.toLowerCase(),r={name:t.name,prefix:e||`[${t.name}-extension]/${i}/dynamic`,files:this.CLASS.defineDynamicFiles(t.ranges,e),sizeN:this.sizeVariants.length,stretchN:this.stretchVariants.length};this.CLASS.dynamicExtensions.set(t.name,r),Xe(this.options,t.options||{}),Xe(this.params,t.parameters||{}),$r(this,"sizeVariants",t.sizeVariants),$r(this,"stretchVariants",t.stretchVariants),$r(this.constructor,"VariantSmp",t.variantSmp),this.defineCssFonts($r({cssFonts:{}},"cssFonts",t.cssFonts)),this.createVariants($r({variants:[]},"variants",t.variants)),t.delimiters&&(this.defineDelimiters($r({delimiters:{}},"delimiters",t.delimiters)),this.CLASS.adjustDelimiters(this.delimiters,Object.keys(t.delimiters),r.sizeN,r.stretchN));for(let s of Object.keys(t.chars||{}))this.defineChars(s,t.chars[s]);return this.defineRemap("accent",t.accentMap),this.defineRemap("mo",t.moMap),this.defineRemap("mn",t.mnMap),t.ranges&&this.defineDynamicCharacters(r.files),[]}get styles(){return this._styles}set styles(t){this._styles=t}createVariant(t,e=null,i=null){let r={linked:[],chars:Object.create(e?this.variant[e].chars:{})};this.variant[i]&&(Object.assign(r.chars,this.variant[i].chars),this.variant[i].linked.push(r.chars),r.chars=Object.create(r.chars)),this.remapSmpChars(r.chars,t),this.variant[t]=r}remapSmpChars(t,e){let i=this.CLASS,r=i.VariantSmp[e];if(typeof r=="string"&&(r=i.VariantSmp[r]),!r)return;let s=i.SmpRemap,n=[null,null,i.SmpRemapGreekU,i.SmpRemapGreekL];for(let[o,h,d]of i.SmpRanges){let p=r[o];if(p){for(let E=h;E<=d;E++){if(E===930)continue;let y=p+E-h;t[E]=this.smpChar(s[y]||y)}if(n[o])for(let E of Object.keys(n[o]).map(y=>parseInt(y)))t[E]=this.smpChar(p+n[o][E])}}let a=r[5]||{};for(let o of Object.keys(a))t[o]=this.smpChar(r[5][o])}smpChar(t){return[,,,{smp:t}]}createVariants(t){for(let e of t)this.createVariant(e[0],e[1],e[2])}defineChars(t,e){let i=this.variant[t];Object.assign(i.chars,e);for(let r of i.linked)Object.assign(r,e)}defineCssFonts(t){Object.assign(this.cssFontMap,t);for(let e of Object.keys(t))this.cssFontMap[e][0]==="unknown"&&(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(let e of Object.keys(t)){let i=t[e];for(let r of Object.keys(i.variants))this.defineChars(r,this.flattenRanges(i.variants[r],i));this.defineDelimiters(this.flattenRanges(i.delimiters,i))}}flattenRanges(t,e){let i={};for(let r of t)if(Array.isArray(r))for(let s=r[0];s<=r[1];s++)i[s]=e;else i[r]=e;return i}dynamicFileName(t){let 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 K1(this,void 0,void 0,function*(){return t.failed?Promise.reject(Error(`dynamic file '${t.file}' failed to load`)):(t.promise||(t.promise=Mu(this.dynamicFileName(t)).catch(e=>{t.failed=!0,console.warn(e)})),t.promise.then(()=>t.setup(this)))})}loadDynamicFiles(){let t=this.CLASS.dynamicFiles,e=Object.keys(t).map(i=>this.loadDynamicFile(t[i]));for(let i of this.CLASS.dynamicExtensions.values())e.push(...Object.keys(i.files).map(r=>this.loadDynamicFile(i.files[r])));return Promise.all(e)}loadDynamicFilesSync(){if(!We.asyncIsSynchronous)throw Error(`MathJax(loadDynamicFilesSync): mathjax.asyncLoad must be specified and synchronous
2
+ Try importing #js/../components/require.mjs and #js/util/asyncLoad/node.js`);let t=this.CLASS.dynamicFiles;Object.keys(t).forEach(e=>this.loadDynamicFileSync(t[e]));for(let e of this.CLASS.dynamicExtensions.values())Object.keys(e.files).forEach(i=>this.loadDynamicFileSync(e.files[i]))}loadDynamicFileSync(t){if(!t.promise){t.promise=Promise.resolve();try{We.asyncLoad(this.dynamicFileName(t))}catch(e){t.failed=!0,console.warn(e)}t.setup(this)}}addDynamicFontCss(t,e){}getDelimiter(t){let e=this.delimiters[t];return e&&!("dir"in e)?(this.delimiters[t]=null,We.asyncIsSynchronous?(this.loadDynamicFileSync(e),this.getDelimiter(t)):(On(this.loadDynamicFile(e)),null)):e}getSizeVariant(t,e){let i=this.getDelimiter(t);return i&&i.variants&&(e=i.variants[e]),this.sizeVariants[e]}getStretchVariant(t,e){let i=this.getDelimiter(t);return this.stretchVariants[i.stretchv?i.stretchv[e]:0]}getStretchVariants(t){return[0,1,2,3].map(e=>this.getStretchVariant(t,e))}getChar(t,e){let i=this.variant[t].chars[e];if(i&&!Array.isArray(i)){let r=this.variant[t];return delete r.chars[e],r.linked.forEach(s=>delete s[e]),We.asyncIsSynchronous?(this.loadDynamicFileSync(i),this.getChar(t,e)):(On(this.loadDynamicFile(i)),null)}return i}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]}};ae.OPTIONS={unknownFamily:"serif",dynamicPrefix:"."},ae.JAX="common",ae.NAME="",ae.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"]],ae.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]},ae.defaultCssFamilyPrefix="",ae.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]},ae.SmpRanges=[[0,65,90],[1,97,122],[2,913,937],[3,945,969],[4,48,57]],ae.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},ae.SmpRemapGreekU={8711:25,1012:17},ae.SmpRemapGreekL={977:27,981:29,982:31,1008:28,1009:30,1013:26,8706:25},ae.defaultAccentMap={94:"ˆ",126:"˜",768:"ˋ",769:"ˊ",770:"ˆ",771:"˜",772:"ˉ",774:"˘",775:"˙",776:"¨",778:"˚",780:"ˇ",8594:"⃗"},ae.defaultMoMap={45:"−"},ae.defaultMnMap={45:"−"},ae.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},ae.defaultDelimiters={},ae.defaultChars={},ae.defaultSizeVariants=[],ae.defaultStretchVariants=[],ae.dynamicFiles={},ae.dynamicExtensions=new Map;var gl=class{constructor(){this.used=new Set,this.needsUpdate=[]}add(t){let 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(){let t=this.needsUpdate;return this.needsUpdate=[],t}},Cr=class{get cssText(){return this.getStyleString()}constructor(t=null){this.styles={},this.addStyles(t)}addStyles(t){if(t)for(let e of Object.keys(t))this.styles[e]||(this.styles[e]={}),Object.assign(this.styles[e],t[e])}removeStyles(...t){for(let e of t)delete this.styles[e]}clear(){this.styles={}}getStyleString(){return this.getStyleRules().join(`
3
+
4
+ `)}getStyleRules(t=this.styles,e=""){let i=Object.keys(t),r=Array(i.length),s=0;for(let n of i){let a=t[n];r[s++]=`${e}${n} {
5
+ ${this.getStyleDefString(a,e)}
6
+ ${e}}`}return r}getStyleDefString(t,e){let i=Object.keys(t),r=Array(i.length),s=0;for(let n of i)r[s++]=t[n]instanceof Object?e+this.getStyleRules({[n]:t[n]},e+" ").join(`
7
+ `+e):" "+e+n+": "+t[n]+";";return r.join(`
8
+ `+e)}},ls=1e6,lc={px:1,in:96,cm:96/2.54,mm:96/25.4},hc={em:1,ex:.431,pt:1/10,pc:12/10,mu:1/18},Re={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:ls};function Du(t,e=0,i=1,r=16){if(typeof t!="string"&&(t=String(t)),t===""||t==null)return e;if(Re[t])return Re[t];let s=t.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);if(!s||s[0]==="")return e;let n=parseFloat(s[1]||"1"),a=s[2];return Object.hasOwn(lc,a)?n*lc[a]/r/i:Object.hasOwn(hc,a)?n*hc[a]:a==="%"?n/100*e:n*e}function Pu(t){return(100*t).toFixed(1).replace(/\.?0+$/,"")+"%"}function Bt(t){return Math.abs(t)<.001?"0":t.toFixed(3).replace(/\.?0+$/,"")+"em"}function Y1(t,e=-1e6,i=16){return t*=i,e&&t<e&&(t=e),Math.abs(t)<.1?"0":t.toFixed(1).replace(/\.0$/,"")+"px"}var Vi=class extends ae{constructor(){super(...arguments),this.charUsage=new gl,this.delimUsage=new gl,this.fontUsage={},this.newFonts=0}static charOptions(t,e){return super.charOptions(t,e)}static addFontURLs(t,e,i){for(let r of Object.keys(e)){let s=Object.assign({},e[r]);s.src=s.src.replace(/%%URL%%/,i),t[r]=s}}static addDynamicFontCss(t,e,i){let r={};for(let s of e){let n=s.slice(4);r[`@font-face /* ${n} */`]={"font-family":s,src:`url("%%URL%%/${s.toLowerCase()}.woff2") format("woff2")`},t[`.${n}`]={"font-family":`${this.defaultCssFamilyPrefix}, ${s}`}}this.addFontURLs(t,r,i)}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[];let i={},r=new Cr;return this.constructor.addDynamicFontCss(i,t.fonts,t.fontURL),r.addStyles(i),r.getStyleRules()}adaptiveCSS(t){this.options.adaptiveCSS=t}clearCache(){this.options.adaptiveCSS&&(this.charUsage.clear(),this.delimUsage.clear())}createVariant(t,e=null,i=null){super.createVariant(t,e,i),this.variant[t].letter=this.constructor.defaultVariantLetters[t]}defineChars(t,e){super.defineChars(t,e);let i=this.variant[t].letter,r=this.constructor;for(let s of Object.keys(e)){let n=parseInt(s);if(!Array.isArray(e[n]))continue;let a=r.charOptions(e,n);a.f===void 0&&(a.f=i);for(let[o,h]of r.combiningChars)if(n>=o&&n<=h){a.cmb=!0;break}}}addDynamicFontCss(t,e=this.options.fontURL){this.constructor.addDynamicFontCss(this.fontUsage,t,e)}updateDynamicStyles(){let t=this.fontUsage;return this.fontUsage={},this.options.adaptiveCSS||this.updateStyles(t),t}get styles(){let 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(let e of this.delimUsage.update())this.addDelimiterStyles(t,e,this.getDelimiter(e));for(let[e,i]of this.charUsage.update()){let r=this.variant[e];this.addCharStyles(t,r.letter,i,r.chars[i])}return t}allStyles(t){for(let e of Object.keys(this.delimiters)){let i=parseInt(e);this.addDelimiterStyles(t,i,this.delimiters[i])}for(let e of Object.keys(this.variant)){let i=this.variant[e],r=i.letter;for(let s of Object.keys(i.chars)){let n=parseInt(s),a=i.chars[n];a?.[3]?.smp||!Array.isArray(a)||(a.length<4&&(a[3]={}),this.addCharStyles(t,r,n,a))}}}addDelimiterStyles(t,e,i){if(!i.stretch)return;let r=i.c&&i.c!==e?this.charSelector(i.c):this.charSelector(e);i.dir===fe.Vertical?this.addDelimiterVStyles(t,e,r,i):this.addDelimiterHStyles(t,e,r,i)}addDelimiterVStyles(t,e,i,r){let s=r.HDW,[n,a,o,h]=r.stretch,[d,p,E,y]=this.getStretchVariants(e),A=this.addDelimiterVPart(t,i,"beg",n,d,s);this.addDelimiterVPart(t,i,"ext",a,p,s);let w=this.addDelimiterVPart(t,i,"end",o,E,s);if(h){let _=this.addDelimiterVPart(t,i,"mid",h,y,s),U=this.em(_/2-.03);t[`mjx-stretchy-v${i} > mjx-ext:first-of-type`]={height:"50%","border-width":`${this.em1(A-.03)} 0 ${U}`},t[`mjx-stretchy-v${i} > mjx-ext:last-of-type`]={height:"50%","border-width":`${U} 0 ${this.em1(w-.03)}`}}else(w||A)&&(t[`mjx-stretchy-v${i} > mjx-ext`]["border-width"]=`${this.em1(A-.03)} 0 ${this.em1(w-.03)}`)}addDelimiterVPart(t,e,i,r,s,n){if(!r)return 0;let a=0,[o,h,d]=this.getChar(s,r),p={width:this.em0(d)};if(i!=="ext"){let E=d>n[2]?this.em((n[2]-d)/2):"auto",y=i==="beg"?o:i==="end"?-h:(o-h)/2;p.margin=`${this.em(y)} ${E} ${this.em(-y)}`}else{a=xn;let E=Math.max(xn,o+h-xn);p["line-height"]=this.em0(E);let y=o-E/2-xn;y&&(t[`mjx-stretchy-v${e} > mjx-ext > mjx-spacer`]={"margin-top":this.em(y)})}return t[`mjx-stretchy-v${e} > mjx-${i}`]=p,Math.max(0,o+h-a)}addDelimiterHStyles(t,e,i,r){let s=[...r.HDW],[n,a,o,h]=r.stretch,[d,p,E,y]=this.getStretchVariants(e);if(r.hd&&!this.options.mathmlSpacing){let _=this.params.extender_factor;s[0]=s[0]*(1-_)+r.hd[0]*_,s[1]=s[1]*(1-_)+r.hd[1]*_}let A=this.addDelimiterHPart(t,i,"beg",n,d,s);this.addDelimiterHPart(t,i,"ext",a,p,s);let w=this.addDelimiterHPart(t,i,"end",o,E,s);if(h){let _=this.addDelimiterHPart(t,i,"mid",h,y,s),U=this.em0(_/2-.03);t[`mjx-stretchy-h${i} > mjx-ext:first-of-type`]={width:"50%","border-width":`0 ${U} 0 ${this.em0(A-.03)}`},t[`mjx-stretchy-h${i} > mjx-ext:last-of-type`]={width:"50%","border-width":`0 ${this.em0(w-.03)} 0 ${U}`}}else(A||w)&&(t[`mjx-stretchy-h${i} > mjx-ext`]["border-width"]=`0 ${this.em0(w-.06)} 0 ${this.em0(A-.06)}`);r.ext&&(t[`mjx-stretchy-h${i} > mjx-ext > mjx-spacer`]["letter-spacing"]=this.em(-r.ext-.07))}addDelimiterHPart(t,e,i,r,s,n){if(!r)return 0;let[,,a,o]=this.getChar(s,r),h={padding:this.padding(n,a-n[2])};if(i==="ext"){let d=h.padding.split(/ /);d[1]=d[3]="0",h.padding=d.join(" "),!a&&o.dx&&(a=2*o.dx-.06),t[`mjx-stretchy-h${e} > mjx-${i} > mjx-spacer`]={"margin-left":this.em(-a/2)},o.cmb&&(t[`mjx-stretchy-h${e} > mjx-${i} > mjx-c`]={width:this.em(a),"text-align":"right"})}else i==="mid"?h.margin=`0 ${this.em(-a/2)}`:h[i=="end"?"margin-left":"margin-right"]=this.em(-a),this.checkCombiningChar(o,h);return t[`mjx-stretchy-h${e} > mjx-${i}`]=h,a}addCharStyles(t,e,i,r){let s=r[3],n=s.f===void 0?e:s.f,a=s.ff||(n?`${this.cssFontPrefix}-${n}`:""),o="mjx-c"+this.charSelector(i)+(a?"."+a:""),h=s.oc||s.ic||0,d={padding:this.padding(r,h)};s.oc&&(t[o+"[noic]"]={"padding-right":this.em(r[2])}),this.checkCombiningChar(s,d),t[o+(d["margin-left"]&&!a?`:not([class*="${this.cssFontPrefix}-"])`:"")]=d}checkCombiningChar(t,e){if(!t.cmb)return;let i=e.padding.split(/ /);e.width=i[1],i[1]="0",i[3]||i.pop(),e.padding=i.join(" "),e.width==="0"&&t.dx&&(e.width=this.em(2*t.dx),e["margin-left"]="-"+e.width)}em(t){return Bt(t)}em0(t){return Bt(Math.max(0,t))}em1(t){let e=Bt(Math.max(0,t));return e==="0"?".1px":e}padding([t,e,i],r=0){return[t,i+r,e,0].map(this.em0).join(" ")}charSelector(t){return".mjx-c"+t.toString(16).toUpperCase()}};Vi.OPTIONS=Object.assign(Object.assign({},ae.OPTIONS),{dynamicPrefix:"./chtml/dynamic",fontURL:"./chtml/woff2"}),Vi.JAX="CHTML",Vi.defaultVariantLetters={},Vi.defaultStyles={},Vi.defaultFonts={},Vi.combiningChars=[[768,879],[8400,8447]];function Z1(t){var e=class extends t{};return e.defaultVariants=[...ae.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({},ae.VariantSmp),{"-bbold":[120120,120146,,,120792]}),e.defaultCssFonts=Object.assign(Object.assign({},ae.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:"ˆ",126:"˜",768:"ˋ",769:"ˊ",770:"ˆ",771:"˜",772:"ˉ",774:"˘",775:"˙",776:"¨",778:"˚",780:"ˇ",8594:"⃗"},e.defaultParams=Object.assign(Object.assign({},ae.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}var Q1={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],8204:[0,0,0],8205:[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]},tm={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,.383],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,{sk:.262}],567:[.45,.2,.351,{sk:.197}],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],8204:[0,0,0],8205:[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]},em={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,.358],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],8204:[0,0,0],8205:[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}]},im={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,.414],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:.236}],567:[.452,.202,.439,{sk:.142}],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],8204:[0,0,0],8205:[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}]},rm={},sm={},nm={},am={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],8204:[0,0,0],8205:[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]},om={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],8204:[0,0,0],8205:[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]},lm={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],8204:[0,0,0],8205:[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}]},hm={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],8204:[0,0,0],8205:[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}]},cm={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]},dm={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:-.383}],126705:[.708,.035,2.524,{sk:-.957}]},um={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:-.418}],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:-.025}],10198:[.621,.006,.888,{sk:-.08}],10199:[.621,.006,1.03,{sk:-.143}],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:-.723}],10760:[1.23,.681,1.945],10761:[.88,.38,1.371],10762:[.95,.45,1.474,{sk:-.395}],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,{sk:-.395}],10782:[.885,.188,1.046,{sk:-.204}],10784:[.774,.081,1.52,{sk:-.253}],10785:[.976,.284,.784,{sk:.106}],11004:[1.237,.677,.694,{sk:.22}],11007:[1.237,.677,.478,{sk:.226}]},pm={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]},mm={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}]},fm={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}]},gm={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}]},bm={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}]},Em={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}]},ym={},xm={},Nm={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]},vm={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]},Tm={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]},Cm={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]},Sm={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]},Am={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]},Lm={8450:[.705,.022,.722,{sk:.386}],8461:[.683,0,.833,{sk:.234}],8469:[.683,0,.833,{sk:.256}],8473:[.683,0,.736,{sk:.289}],8474:[.705,.194,.778,{sk:.157}],8477:[.683,.022,.792,{sk:.259}],8484:[.683,0,.75,{sk:-.056}],8508:[.431,.011,.687,{sk:.237}],8509:[.442,.215,.518,{ic:.025,sk:.284}],8510:[.68,0,.737,{sk:.335}],8511:[.68,0,.862,{sk:.126}],8512:[.683,0,.839,{sk:.021}],8517:[.683,0,.794,{ic:.023,sk:.13}],8518:[.694,.011,.673,{ic:.042,sk:.073}],8519:[.448,.011,.444,{ic:.03,sk:.297}],8520:[.691,0,.395,{ic:.028,sk:.314}],8521:[.691,.205,.423,{ic:.038,sk:.357}],120120:[.683,0,.863,{sk:.23}],120121:[.683,0,.764,{sk:.298}],120123:[.683,0,.794,{sk:.221}],120124:[.68,0,.736,{sk:.394}],120125:[.68,0,.709,{sk:.065}],120126:[.705,.022,.785,{sk:.406}],120128:[.683,0,.467,{sk:.311}],120129:[.683,.022,.597,{sk:.101}],120130:[.683,0,.833,{sk:.281}],120131:[.683,0,.68,{sk:.336}],120132:[.684,0,1,{sk:.329}],120134:[.705,.022,.778,{sk:.157}],120138:[.705,.022,.556,{sk:.366}],120139:[.677,0,.754,{sk:.338}],120140:[.683,.022,.806,{sk:.301}],120141:[.683,.008,.804,{sk:.253}],120142:[.683,.022,1.058,{sk:.283}],120143:[.683,0,.866,{sk:.208}],120144:[.683,0,.868,{sk:.21}],120146:[.448,.011,.614,{sk:.034}],120147:[.694,.011,.673,{sk:.09}],120148:[.448,.011,.444,{sk:.328}],120149:[.694,.011,.673,{sk:.05}],120150:[.448,.011,.444,{sk:.251}],120151:[.705,0,.423,{ic:.051,sk:.049}],120152:[.453,.206,.5,{sk:.305}],120153:[.694,0,.676,{sk:.033}],120154:[.691,0,.395,{sk:.2}],120155:[.691,.205,.423,{sk:.215}],120156:[.694,0,.648,{sk:.129}],120157:[.694,0,.394,{sk:.085}],120158:[.442,0,.95,{sk:-.192}],120159:[.442,0,.673,{sk:.049}],120160:[.448,.011,.5,{sk:.039}],120161:[.442,.194,.673,{sk:.021}],120162:[.442,.194,.645,{sk:.225}],120163:[.442,0,.509,{sk:.311}],120164:[.448,.011,.394,{sk:.43}],120165:[.615,.011,.506,{sk:.246}],120166:[.442,.011,.673,{sk:.305}],120167:[.431,.011,.635,{sk:.013}],120168:[.431,.011,.635,{ic:.155,sk:.243}],120169:[.431,0,.645,{sk:.216}],120170:[.431,.205,.635,{sk:.122}],120171:[.431,0,.561,{sk:.025}],120792:[.666,.022,.5,{sk:.281}],120793:[.666,0,.624,{sk:.12}],120794:[.666,0,.5,{sk:.198}],120795:[.666,.022,.5,{sk:.063}],120796:[.677,0,.627,{sk:.102}],120797:[.666,.022,.5,{sk:.148}],120798:[.666,.022,.5,{sk:.304}],120799:[.676,.022,.55,{sk:.061}],120800:[.666,.022,.5,{sk:.038}],120801:[.666,.022,.5,{sk:.03}]},Rm={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]},wm={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]},Im={},km={},Om={40:{dir:B,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:B,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:j,stretch:[0,8722],HDW:[.583,.083,.778],ext:.112,hd:[.583,.083]},47:{dir:B,sizes:[1.001,1.311,1.717,2.249,2.945,3.859,5.055,6.621]},61:{dir:j,stretch:[0,61],HDW:[.367,-.133,.778],ext:.112,hd:[.367,-.133]},91:{dir:B,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:B,sizes:[1.001,1.311,1.717,2.249,2.945,3.859,5.055,6.621]},93:{dir:B,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:j,sizes:[.5,.644,.768,.919,1.1,1.32,1.581,1.896]},95:{c:8211,dir:j,stretch:[0,8211],HDW:[.277,-.255,.5],ext:.001,hd:[.277,-.255]},123:{dir:B,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:B,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:B,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:j,sizes:[.5,.652,.778,.931,1.115,1.335,1.599,1.915]},175:{c:773,dir:j,sizes:[.392,.568],stretch:[0,773],stretchv:[0,1],HDW:[.67,-.63,0],hd:[.67,-.63]},710:{c:770,dir:j,sizes:[.5,.644,.768,.919,1.1,1.32,1.581,1.896]},711:{c:780,dir:j,sizes:[.366,.644,.768,.919,1.1,1.32,1.581,1.896]},713:{c:773,dir:j,sizes:[.392,.568],stretch:[0,773],stretchv:[0,1],HDW:[.67,-.63,0],hd:[.67,-.63]},728:{c:774,dir:j,sizes:[.376,.658,.784,.937,1.12,1.341,1.604,1.92]},732:{c:771,dir:j,sizes:[.5,.652,.778,.931,1.115,1.335,1.599,1.915]},770:{dir:j,sizes:[.5,.644,.768,.919,1.1,1.32,1.581,1.896]},771:{dir:j,sizes:[.5,.652,.778,.931,1.115,1.335,1.599,1.915]},773:{dir:j,sizes:[.392,.568],stretch:[0,773],stretchv:[0,1],HDW:[.67,-.63,0],hd:[.67,-.63]},774:{dir:j,sizes:[.376,.658,.784,.937,1.12,1.341,1.604,1.92]},780:{dir:j,sizes:[.366,.644,.768,.919,1.1,1.32,1.581,1.896]},8211:{dir:j,stretch:[0,8211],HDW:[.277,-.255,.5],ext:.001,hd:[.277,-.255]},8212:{dir:j,stretch:[0,8212],HDW:[.277,-.255,1],ext:.001,hd:[.277,-.255]},8213:{dir:j,stretch:[0,8213],HDW:[.27,-.23,1.152],ext:.112,hd:[.27,-.23]},8214:{dir:B,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:j,sizes:[.392,.568],stretch:[0,773],stretchv:[0,1],HDW:[.67,-.63,0],hd:[.67,-.63]},8260:{dir:B,sizes:[1.001,1.311,1.717,2.249,2.945,3.859,5.055,6.621]},8400:{dir:j,sizes:[.422,.667],stretch:[8400,8400],stretchv:[3,1],HDW:[.711,-.601,0],hd:[.631,-.601]},8401:{dir:j,sizes:[.422,.667],stretch:[0,8400,8401],stretchv:[0,1,4],HDW:[.711,-.601,0],hd:[.631,-.601]},8406:{dir:j,sizes:[.416,.659],stretch:[8406,8400],stretchv:[3,1],HDW:[.711,-.521,0],hd:[.631,-.601]},8407:{dir:j,sizes:[.416,.659],stretch:[0,8400,8407],stretchv:[0,1,4],HDW:[.711,-.521,0],hd:[.631,-.601]},8417:{dir:j,sizes:[.47,.715],stretch:[8406,8400,8407],stretchv:[3,1,4],HDW:[.711,-.521,0],hd:[.631,-.601]},8428:{dir:j,sizes:[.422,.667],stretch:[0,845,8428],stretchv:[0,1,4],HDW:[-.171,.281,0],hd:[-.171,.201]},8429:{dir:j,sizes:[.422,.667],stretch:[8429,845],stretchv:[3,1],HDW:[-.171,.281,0],hd:[-.171,.201]},8430:{dir:j,sizes:[.416,.659],stretch:[8430,845],stretchv:[3,1],HDW:[-.091,.281,0],hd:[-.171,.201]},8431:{dir:j,sizes:[.416,.659],stretch:[0,845,8431],stretchv:[0,1,4],HDW:[-.091,.281,0],hd:[-.171,.201]},8512:{dir:B,sizes:[.684,1.401],variants:[0,2]},8592:{dir:j,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:B,sizes:[.883,1.349],variants:[0,2],stretch:[8593,8593],stretchv:[3,1],HDW:[.679,.203,.5]},8594:{dir:j,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:B,sizes:[.883,1.349],variants:[0,2],stretch:[0,8593,8595],stretchv:[0,1,4],HDW:[.703,.179,.5]},8596:{dir:j,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:B,sizes:[1.015,1.015],variants:[0,2],stretch:[8593,8593,8595],stretchv:[3,1,4],HDW:[.757,.257,.5]},8598:{dir:B,sizes:[.918,1.384],variants:[0,2]},8599:{dir:B,sizes:[.918,1.384],variants:[0,2]},8600:{dir:B,sizes:[.918,1.384],variants:[0,2]},8601:{dir:B,sizes:[.918,1.384],variants:[0,2]},8602:{dir:j,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:j,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:j,sizes:[1.017,1.463],variants:[0,2],stretch:[8606,8592],stretchv:[3,1],HDW:[.51,.01,1.017],hd:[.274,-.226]},8608:{dir:j,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:j,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:j,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:j,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:j,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:j,sizes:[.997,1.463],variants:[0,2],stretch:[8592,8617,8617],stretchv:[3,1,4],HDW:[.546,.01,.997],hd:[.274,-.226]},8618:{dir:j,sizes:[.997,1.463],variants:[0,2],stretch:[8618,8617,8594],stretchv:[3,1,4],HDW:[.546,.01,.997],hd:[.274,-.226]},8619:{dir:j,sizes:[.997,1.463],variants:[0,2],stretch:[8592,8617,8619],stretchv:[3,1,4],HDW:[.55,.05,.997],hd:[.274,-.226]},8620:{dir:j,sizes:[.997,1.463],variants:[0,2],stretch:[8620,8617,8594],stretchv:[3,1,4],HDW:[.55,.05,.997],hd:[.274,-.226]},8630:{dir:j,sizes:[.98,1.33],variants:[0,2]},8631:{dir:j,sizes:[.98,1.33],variants:[0,2]},8636:{dir:j,sizes:[1,1.478],variants:[0,2],stretch:[8636,8636],stretchv:[3,1],HDW:[.499,-.226,1],hd:[.273,-.226]},8637:{dir:j,sizes:[1.012,1.478],variants:[0,2],stretch:[8637,8636],stretchv:[3,1],HDW:[.273,0,1.012],hd:[.273,-.226]},8638:{dir:B,sizes:[.901,1.367],variants:[0,2],stretch:[8638,8638],stretchv:[3,1],HDW:[.697,.203,.441]},8639:{dir:B,sizes:[.901,1.367],variants:[0,2],stretch:[8639,8639],stretchv:[3,1],HDW:[.697,.203,.441]},8640:{dir:j,sizes:[1,1.478],variants:[0,2],stretch:[0,8636,8640],stretchv:[0,1,4],HDW:[.499,-.226,1],hd:[.273,-.226]},8641:{dir:j,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:B,sizes:[.901,1.367],variants:[0,2],stretch:[0,8638,8642],stretchv:[0,1,4],HDW:[.703,.197,.441]},8643:{dir:B,sizes:[.901,1.367],variants:[0,2],stretch:[0,8639,8643],stretchv:[0,1,4],HDW:[.703,.197,.441]},8644:{dir:j,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:B,sizes:[.907,1.373],variants:[0,2],stretch:[8645,8645,8645],stretchv:[3,1,4],HDW:[.703,.203,.896]},8646:{dir:j,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:j,sizes:[.997,1.463],variants:[0,2],stretch:[8647,8647],stretchv:[3,1],HDW:[.75,.25,.997],hd:[.512,.012]},8648:{dir:B,sizes:[.883,1.349],variants:[0,2],stretch:[8648,8648],stretchv:[3,1],HDW:[.679,.203,.992]},8649:{dir:j,sizes:[.997,1.463],variants:[0,2],stretch:[0,8647,8649],stretchv:[0,1,4],HDW:[.75,.25,.997],hd:[.512,.012]},8650:{dir:B,sizes:[.883,1.349],variants:[0,2],stretch:[0,8648,8650],stretchv:[0,1,4],HDW:[.703,.179,.992]},8651:{dir:j,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:j,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:j,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:j,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:j,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:j,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:B,sizes:[.88,1.346],variants:[0,2],stretch:[8657,8657],stretchv:[3,1],HDW:[.676,.203,.652]},8658:{dir:j,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:B,sizes:[.88,1.346],variants:[0,2],stretch:[0,8657,8659],stretchv:[0,1,4],HDW:[.703,.176,.652]},8660:{dir:j,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:B,sizes:[.957,1.423],variants:[0,2],stretch:[8657,8657,8659],stretchv:[3,1,4],HDW:[.728,.228,.652]},8666:{dir:j,sizes:[1.015,1.461],variants:[0,2],stretch:[8666,8666],stretchv:[3,1],HDW:[.617,.117,1.015],hd:[.466,-.034]},8667:{dir:j,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:B,sizes:[.907,1.373],variants:[0,2],stretch:[8693,8645,8693],stretchv:[3,1,4],HDW:[.703,.203,.896]},8694:{dir:j,sizes:[.997,1.463],variants:[0,2],stretch:[0,8694,8694],stretchv:[0,1,4],HDW:[.99,.49,.997],hd:[.751,.251]},8719:{dir:B,sizes:[1.001,1.401],variants:[0,2]},8720:{dir:B,sizes:[1.001,1.401],variants:[0,2]},8721:{dir:B,sizes:[1.001,1.401],variants:[0,2]},8722:{dir:j,stretch:[0,8722],HDW:[.583,.083,.778],ext:.112,hd:[.583,.083]},8725:{c:47,dir:B,sizes:[1.001,1.311,1.717,2.249,2.945,3.859,5.055,6.621]},8730:{dir:B,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:B,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:B,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:B,sizes:[1.112,2.223],variants:[0,2],stretch:[8992,9134,8993],HDW:[.805,.306,1.185]},8748:{dir:B,sizes:[1.112,2.223],variants:[0,2]},8749:{dir:B,sizes:[1.112,2.223],variants:[0,2]},8750:{dir:B,sizes:[1.112,2.223],variants:[0,2]},8751:{dir:B,sizes:[1.112,2.223],variants:[0,2]},8752:{dir:B,sizes:[1.112,2.223],variants:[0,2]},8753:{dir:B,sizes:[1.112,2.223],variants:[0,2]},8754:{dir:B,sizes:[1.112,2.223],variants:[0,2]},8755:{dir:B,sizes:[1.112,2.223],variants:[0,2]},8801:{dir:j,stretch:[0,8801],HDW:[.464,-.036,.778],ext:.112,hd:[.464,-.036]},8803:{dir:j,stretch:[0,8803],HDW:[.561,.061,.778],ext:.112,hd:[.561,.061]},8866:{dir:B,sizes:[.685,.869],variants:[0,0],schar:[8866,10205]},8867:{dir:B,sizes:[.685,.869],variants:[0,0],schar:[8867,10206]},8868:{dir:B,sizes:[.685,.869],variants:[0,0],schar:[8868,10201]},8869:{dir:B,sizes:[.685,.869],variants:[0,0],schar:[8869,10200]},8896:{dir:B,sizes:[1.045,1.394],variants:[0,2]},8897:{dir:B,sizes:[1.045,1.394],variants:[0,2]},8898:{dir:B,sizes:[1.023,1.357],variants:[0,2]},8899:{dir:B,sizes:[1.023,1.357],variants:[0,2]},8968:{dir:B,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:B,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:B,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:B,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:j,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:j,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:j,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:B,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],schar:[9001,10216]},9002:{dir:B,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001],schar:[9002,10217]},9130:{dir:B,sizes:[.748],stretch:[0,9130],HDW:[.748,0,.902]},9135:{c:8211,dir:j,stretch:[0,8211],HDW:[.277,-.255,.5],ext:.001,hd:[.277,-.255]},9136:{dir:B,sizes:[1.125],stretch:[9127,9130,9133],HDW:[.75,.375,.902]},9137:{dir:B,sizes:[1.125],stretch:[9131,9130,9129],HDW:[.75,.375,.902]},9140:{dir:j,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:j,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:B,sizes:[.642],stretch:[0,9168],HDW:[.642,0,.333]},9180:{dir:j,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:j,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:j,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:j,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:j,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:j,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:j,stretch:[0,8211],HDW:[.277,-.255,.5],ext:.001,hd:[.277,-.255]},10072:{c:8739,dir:B,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:B,sizes:[.511,.628],variants:[0,2]},10198:{dir:B,sizes:[.511,.628],variants:[0,2]},10199:{dir:B,sizes:[.511,.628],variants:[0,2]},10214:{dir:B,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:B,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:B,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10217:{dir:B,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10218:{dir:B,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10219:{dir:B,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10222:{dir:B,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:B,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:j,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:j,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:j,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:j,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:j,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:j,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:j,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:j,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:j,sizes:[1.012],stretch:[8636,8636,8641],stretchv:[3,1,4],HDW:[.499,0,1.012],hd:[.273,-.226]},10571:{dir:j,sizes:[1.012],stretch:[8637,8636,8640],stretchv:[3,1,4],HDW:[.499,0,1.012],hd:[.273,-.226]},10574:{dir:j,sizes:[1],stretch:[8636,8636,8640],stretchv:[3,1,4],HDW:[.499,-.226,1],hd:[.273,-.226]},10576:{dir:j,sizes:[1],stretch:[8637,8636,8641],stretchv:[3,1,4],HDW:[.273,0,1],hd:[.273,-.226]},10586:{dir:j,sizes:[1],stretch:[8636,8636,8612],stretchv:[3,1,4],HDW:[.51,.011,1],hd:[.273,-.226]},10587:{dir:j,sizes:[1],stretch:[8614,8636,8640],stretchv:[3,1,4],HDW:[.51,.011,1],hd:[.273,-.226]},10590:{dir:j,sizes:[1],stretch:[8637,8636,8612],stretchv:[3,1,4],HDW:[.51,.011,1],hd:[.273,-.226]},10591:{dir:j,sizes:[1],stretch:[8614,8636,8641],stretchv:[3,1,4],HDW:[.51,.011,1],hd:[.273,-.226]},10627:{dir:B,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10628:{dir:B,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},10629:{dir:B,sizes:[.997,1.095,1.195,1.445,1.793,2.093,2.393,2.991]},10630:{dir:B,sizes:[.997,1.095,1.195,1.445,1.793,2.093,2.393,2.991]},10744:{dir:B,sizes:[1.076,1.917],variants:[0,2]},10745:{dir:B,sizes:[1.076,1.917],variants:[0,2]},10748:{dir:B,sizes:[1.001,1.083,1.185,1.433,1.793,2.093,2.383,2.997]},10749:{dir:B,sizes:[1.001,1.083,1.185,1.433,1.793,2.093,2.383,2.997]},10752:{dir:B,sizes:[.987,1.305],variants:[0,2]},10753:{dir:B,sizes:[.987,1.305],variants:[0,2]},10754:{dir:B,sizes:[.987,1.305],variants:[0,2]},10755:{dir:B,sizes:[1.023,1.357],variants:[0,2]},10756:{dir:B,sizes:[1.023,1.357],variants:[0,2]},10757:{dir:B,sizes:[1.029,1.373],variants:[0,2]},10758:{dir:B,sizes:[1.029,1.373],variants:[0,2]},10759:{dir:B,sizes:[1.045,1.907],variants:[0,2]},10760:{dir:B,sizes:[1.045,1.907],variants:[0,2]},10761:{dir:B,sizes:[.981,1.261],variants:[0,2]},10762:{dir:B,sizes:[1.001,1.401],variants:[0,2]},10763:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10764:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10765:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10766:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10767:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10768:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10769:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10770:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10771:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10772:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10773:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10774:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10775:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10776:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10777:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10778:{dir:B,sizes:[1.112,2.223],variants:[0,2]},10779:{dir:B,sizes:[1.274,2.464],variants:[0,2]},10780:{dir:B,sizes:[1.274,2.486],variants:[0,2]},10781:{dir:B,sizes:[.767,1.073],variants:[0,2]},10782:{dir:B,sizes:[.767,1.074],variants:[0,2]},10784:{dir:B,sizes:[.595,.835],variants:[0,2]},10785:{dir:B,sizes:[.901,1.261],variants:[0,2]},11004:{dir:B,sizes:[1.001,1.915],variants:[0,2]},11007:{dir:B,sizes:[1.241,1.915],variants:[0,2]},12296:{c:10216,dir:B,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},12297:{c:10217,dir:B,sizes:[1.001,1.101,1.201,1.451,1.801,2.101,2.401,3.001]},65079:{c:9182,dir:j,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:j,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:B,sizes:[.527,.738]},126705:{dir:B,sizes:[.531,.744]}},Bu=Z1(Vi),Ni=class extends Bu{constructor(){super(...arguments),this.cssFontPrefix="NCM"}};Ni.NAME="MathJaxNewcm",Ni.OPTIONS=Object.assign(Object.assign({},Bu.OPTIONS),{fontURL:"@mathjax/mathjax-newcm-font/js/chtml/woff2",dynamicPrefix:"@mathjax/mathjax-newcm-font/js/chtml/dynamic"}),Ni.defaultCssFamilyPrefix="MJX-NCM-ZERO",Ni.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":"B-a","-upsmall":"U","-uplarge":"U-a",script:"S","bold-script":"SB"},Ni.defaultDelimiters=Om,Ni.defaultChars={normal:Q1,bold:tm,italic:em,"bold-italic":im,"double-struck":rm,fraktur:sm,"bold-fraktur":nm,"sans-serif":am,"bold-sans-serif":om,"sans-serif-italic":lm,"sans-serif-bold-italic":hm,monospace:cm,"-smallop":dm,"-largeop":um,"-size3":pm,"-size4":mm,"-size5":fm,"-size6":gm,"-size7":bm,"-tex-mathit":Em,"-tex-calligraphic":ym,"-tex-bold-calligraphic":xm,"-tex-oldstyle":Nm,"-tex-bold-oldstyle":vm,"-tex-variant":Tm,"-lf-tp":Cm,"-rt-bt":Sm,"-ex-md":Am,"-bbold":Lm,"-upsmall":Rm,"-uplarge":wm,script:Im,"bold-script":km},Ni.defaultStyles=Object.assign(Object.assign({},Vi.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-B-a":{"font-family":"MJX-NCM-ZERO, MJX-NCM-B-a"},".NCM-U":{"font-family":"MJX-NCM-ZERO, MJX-NCM-U"},".NCM-U-a":{"font-family":"MJX-NCM-ZERO, MJX-NCM-U-a"},".NCM-S":{"font-family":"MJX-NCM-ZERO, MJX-NCM-S"},".NCM-SB":{"font-family":"MJX-NCM-ZERO, MJX-NCM-SB"}}),Ni.defaultFonts=Object.assign(Object.assign({},Vi.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-B-a */":{"font-family":"MJX-NCM-B-a",src:'url("%%URL%%/mjx-ncm-b-a.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-U-a */":{"font-family":"MJX-NCM-U-a",src:'url("%%URL%%/mjx-ncm-u-a.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")'}}),Ni.dynamicFiles=Vi.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,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,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,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,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,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,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,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,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]}]]);var bE=q1({TEX_PACKAGES:()=>W1,createMathJax:()=>mE}),Mm=Object.create,Ba=Object.defineProperty,Dm=Object.getOwnPropertyDescriptor,Pm=Object.getOwnPropertyNames,Bm=Object.getPrototypeOf,Fm=Object.prototype.hasOwnProperty,_m=(t,e,i)=>()=>{if(i)throw i[0];try{return t&&(e=t(t=0)),e}catch(r){throw i=[r],r}},Lr=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),wh=(t,e)=>{let i={};for(var r in t)Ba(i,r,{get:t[r],enumerable:!0});return e||Ba(i,Symbol.toStringTag,{value:"Module"}),i},jm=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(var s=Pm(e),n=0,a=s.length,o;n<a;n++)o=s[n],!Fm.call(t,o)&&o!==i&&Ba(t,o,{get:(h=>e[h]).bind(null,o),enumerable:!(r=Dm(e,o))||r.enumerable});return t},Fu=(t,e,i)=>(i=t==null?{}:Mm(Bm(t)),jm(e||!t||!t.__esModule?Ba(i,"default",{value:t,enumerable:!0}):i,t)),bl=(t=>typeof ws<"u"?ws:typeof Proxy<"u"?new Proxy(t,{get:(e,i)=>(typeof ws<"u"?ws:e)[i]}):t)(function(t){if(typeof ws<"u")return ws.apply(this,arguments);throw Error('Calling `require` for "'+t+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});function Uo(t,e,i,r,s,n,a=null){return{open:t,math:e,close:i,n:r,start:{n:s},end:{n},display:a}}var _u=class{get isEscaped(){return this.display===null}constructor(t,e,i=!0,r={i:0,n:0,delim:""},s={i:0,n:0,delim:""}){this.root=null,this.typesetRoot=null,this.metrics={},this.inputData={},this.outputData={},this._state=z.UNPROCESSED,this.math=t,this.inputJax=e,this.display=i,this.start=r,this.end=s,this.root=null,this.typesetRoot=null,this.metrics={},this.inputData={},this.outputData={}}render(t){t.renderActions.renderMath(this,t)}rerender(t,e=z.RERENDER){this.state()>=e&&this.state(e-1),t.renderActions.renderMath(this,t,e)}convert(t,e=z.LAST){t.renderActions.renderConvert(this,t,e)}compile(t){this.state()<z.COMPILED&&(this.root=this.inputJax.compile(this,t),this.state(z.COMPILED))}typeset(t){this.state()<z.TYPESET&&(this.typesetRoot=t.outputJax[this.isEscaped?"escaped":"typeset"](this,t),this.state(z.TYPESET))}updateDocument(t){}removeFromDocument(t=!1){this.clear()}setMetrics(t,e,i,r){this.metrics={em:t,ex:e,containerWidth:i,scale:r}}state(t=null,e=!1){return t!=null&&(t<z.INSERTED&&this._state>=z.INSERTED&&this.removeFromDocument(e),t<z.TYPESET&&this._state>=z.TYPESET&&(this.outputData={}),t<z.COMPILED&&this._state>=z.COMPILED&&(this.inputData={}),this._state=t),this._state}reset(t=!1){this.state(z.UNPROCESSED,t)}clear(){}},z={UNPROCESSED:0,FINDMATH:10,COMPILED:20,CONVERT:100,METRICS:110,RERENDER:125,TYPESET:150,INSERTED:200,LAST:1e4};function Js(t,e){if(t in z)throw Error("State "+t+" already exists");z[t]=e}var Ve="_inherit_",Um=class{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==="_inherit_"&&(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(let e of t)if(this.hasExplicit(e))return!0;return!1}getList(...t){let e={};for(let i of t)e[i]=this.get(i);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}},ju=class{constructor(t,e={},i=[]){this.factory=t,this.parent=null,this.properties={},this.childNodes=[];for(let r of Object.keys(e))this.setProperty(r,e[r]);i.length&&this.setChildren(i)}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(let e of t)delete this.properties[e]}isKind(t){return this.factory.nodeIsKind(this,t)}setChildren(t){this.childNodes=[];for(let e of t)this.appendChild(e)}appendChild(t){return this.childNodes.push(t),t.parent=this,t}replaceChild(t,e){let i=this.childIndex(e);return i!==null&&(this.childNodes[i]=t,t.parent=this,e.parent===this&&(e.parent=null)),t}removeChild(t){let e=this.childIndex(t);return e!==null&&(this.childNodes.splice(e,1),t.parent=null),t}childIndex(t){let e=this.childNodes.indexOf(t);return e===-1?null:e}copy(){let t=this.factory.create(this.kind);t.properties=Object.assign({},this.properties);for(let e of this.childNodes||[])e&&t.appendChild(e.copy());return t}findNodes(t){let e=[];return this.walkTree(i=>{i.isKind(t)&&e.push(i)}),e}walkTree(t,e){t(this,e);for(let i of this.childNodes)i&&i.walkTree(t,e);return e}toString(){return this.kind+"("+this.childNodes.join(",")+")"}},Hm=class extends ju{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}},L={ORD:0,OP:1,BIN:2,REL:3,OPEN:4,CLOSE:5,PUNCT:6,INNER:7,NONE:-1},Uu=["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER"],Wm=["","thinmathspace","mediummathspace","thickmathspace"],zm=[[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]],qm=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"]),Gm=["indentalign","indentalignfirst","indentshift","indentshiftfirst"],At=class Ca extends ju{constructor(e,i={},r=[]){super(e),this.prevClass=null,this.prevLevel=null,this.texclass=null,this.arity<0&&(this.childNodes=[e.create("inferredMrow")],this.childNodes[0].parent=this),this.setChildren(r),this.attributes=new Um(e.getNodeClass(this.kind).defaults,e.getNodeClass("math").defaults),this.attributes.setList(i)}copy(e=!1){let i=this.factory.create(this.kind);if(i.properties=Object.assign({},this.properties),this.attributes){let r=this.attributes.getAllAttributes();for(let s of Object.keys(r))(s!=="id"||e)&&i.attributes.set(s,r[s])}if(this.childNodes&&this.childNodes.length){let r=this.childNodes;r.length===1&&r[0].isInferred&&(r=r[0].childNodes);for(let s of r)s?i.appendChild(s.copy()):i.childNodes.push(null)}return i}get texClass(){return this.texclass}set texClass(e){this.texclass=e}get isToken(){return!1}get isEmbellished(){return!1}get isSpacelike(){return!1}get linebreakContainer(){return!1}get linebreakAlign(){return"data-align"}get isEmpty(){for(let e of this.childNodes)if(e&&!e.isEmpty)return!1;return!0}get arity(){return 1/0}get isInferred(){return!1}get Parent(){let e=this.parent;for(;e&&e.notParent;)e=e.Parent;return e}get notParent(){return!1}setChildren(e){return this.arity<0?this.childNodes[0].setChildren(e):super.setChildren(e)}appendChild(e){if(this.arity<0)return this.childNodes[0].appendChild(e),e;if(e.isInferred){if(this.arity===1/0)return e.childNodes.forEach(r=>super.appendChild(r)),e;let i=e;e=this.factory.create("mrow"),e.setChildren(i.childNodes),e.attributes=i.attributes;for(let r of i.getPropertyNames())e.setProperty(r,i.getProperty(r))}return super.appendChild(e)}replaceChild(e,i){return this.arity<0?(this.childNodes[0].replaceChild(e,i),e):super.replaceChild(e,i)}core(){return this}coreMO(){return this}coreIndex(){return 0}childPosition(){let e=null,i=this.parent;for(;i&&i.notParent;)e=i,i=i.parent;if(e||(e=this),i){let r=0;for(let s of i.childNodes){if(s===e)return r;r++}}return null}setTeXclass(e){return this.getPrevClass(e),this.texClass==null?e:this}updateTeXclass(e){e&&(this.prevClass=e.prevClass,this.prevLevel=e.prevLevel,e.prevClass=e.prevLevel=null,this.texClass=e.texClass)}getPrevClass(e){e&&(this.prevClass=e.texClass,this.prevLevel=e.attributes.get("scriptlevel"))}texSpacing(){let e=this.prevClass==null?L.NONE:this.prevClass,i=this.texClass||L.ORD;if(e===L.NONE||i===L.NONE)return"";let r=zm[e][i];return(this.prevLevel>0||this.attributes.get("scriptlevel")>0)&&r>=0?"":Wm[Math.abs(r)]}hasSpacingAttributes(){return this.isEmbellished&&this.coreMO().hasSpacingAttributes()}setInheritedAttributes(e={},i=!1,r=0,s=!1){let n=this.attributes.getAllDefaults();for(let o of Object.keys(e)){if(Object.hasOwn(n,o)||Object.hasOwn(Ca.alwaysInherit,o)){let[h,d]=e[o];Ca.noInherit[h]?.[this.kind]?.[o]||this.attributes.setInherited(o,d)}Ca.stopInherit[this.kind]?.[o]&&(e=Object.assign({},e),delete e[o])}this.attributes.getExplicit("displaystyle")===void 0&&this.attributes.setInherited("displaystyle",i),this.attributes.getExplicit("scriptlevel")===void 0&&this.attributes.setInherited("scriptlevel",r),s&&this.setProperty("texprimestyle",s);let a=this.arity;if(a>=0&&a!==1/0&&(a===1&&this.childNodes.length===0||a!==1&&this.childNodes.length!==a))if(a<this.childNodes.length)this.childNodes=this.childNodes.slice(0,a);else for(;this.childNodes.length<a;)this.appendChild(this.factory.create("mrow"));if(this.linebreakContainer&&!this.isEmbellished){let o=this.linebreakAlign;if(o){let h=this.attributes.get(o)||"left";e=this.addInheritedAttributes(e,{indentalign:h,indentshift:"0",indentalignfirst:h,indentshiftfirst:"0",indentalignlast:"indentalign",indentshiftlast:"indentshift"})}}this.setChildInheritedAttributes(e,i,r,s)}setChildInheritedAttributes(e,i,r,s){for(let n of this.childNodes)n.setInheritedAttributes(e,i,r,s)}addInheritedAttributes(e,i){let r=Object.assign({},e);for(let s of Object.keys(i))s!=="displaystyle"&&s!=="scriptlevel"&&s!=="style"&&(r[s]=[this.kind,i[s]]);return r}inheritAttributesFrom(e){let i=e.attributes,r=i.get("displaystyle"),s=i.get("scriptlevel"),n=i.isSet("mathsize")?{mathsize:["math",i.get("mathsize")]}:{},a=e.getProperty("texprimestyle")||!1;this.setInheritedAttributes(n,r,s,a)}verifyTree(e=null){if(e===null)return;this.verifyAttributes(e);let i=this.arity;e.checkArity&&i>=0&&i!==1/0&&(i===1&&this.childNodes.length===0||i!==1&&this.childNodes.length!==i)&&this.mError('Wrong number of children for "'+this.kind+'" node',e,!0),this.verifyChildren(e)}verifyAttributes(e){if(e.checkAttributes){let i=this.attributes,r=[];for(let s of i.getExplicitNames())s.substring(0,5)!=="data-"&&i.getDefault(s)===void 0&&!s.match(/^(?:class|style|id|(?:xlink:)?href)$/)&&r.push(s);r.length&&this.mError("Unknown attributes for "+this.kind+" node: "+r.join(", "),e)}if(e.checkMathvariants){let i=this.attributes.getExplicit("mathvariant");i&&!qm.has(i)&&!this.getProperty("ignore-variant")&&this.mError(`Invalid mathvariant: ${i}`,e,!0)}}verifyChildren(e){for(let i of this.childNodes)i.verifyTree(e)}mError(e,i,r=!1){if(this.parent&&this.parent.isKind("merror"))return null;let s=this.factory.create("merror");if(s.attributes.set("data-mjx-message",e),i.fullErrors||r){let n=this.factory.create("mtext"),a=this.factory.create("text");a.setText(i.fullErrors?e:this.kind),n.appendChild(a),s.appendChild(n),this.parent.replaceChild(s,this),i.fullErrors||s.attributes.set("title",e)}else this.parent.replaceChild(s,this),s.appendChild(this);return s}};At.defaults={mathbackground:Ve,mathcolor:Ve,mathsize:Ve,dir:Ve},At.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}}},At.stopInherit={mtd:{columnalign:!0,rowalign:!0,groupalign:!0}},At.alwaysInherit={scriptminsize:!0,scriptsizemultiplier:!0,infixlinebreakstyle:!0},At.verifyDefaults={checkArity:!0,checkAttributes:!1,checkMathvariants:!0,fullErrors:!1,fixMmultiscripts:!0,fixMtables:!0};var oi=class extends At{get isToken(){return!0}get isEmpty(){for(let t of this.childNodes)if(!(t instanceof qs)||t.getText().length)return!1;return!0}getText(){let t="";for(let e of this.childNodes)e instanceof qs?t+=e.getText():"textContent"in e&&(t+=e.textContent());return t}setChildInheritedAttributes(t,e,i,r){for(let s of this.childNodes)s instanceof At&&s.setInheritedAttributes(t,e,i,r)}walkTree(t,e){t(this,e);for(let i of this.childNodes)i instanceof At&&i.walkTree(t,e);return e}};oi.defaults=Object.assign(Object.assign({},At.defaults),{mathvariant:"normal",mathsize:Ve});var Ui=class extends At{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}};Ui.defaults=At.defaults;var li=class extends At{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=L.ORD;let e=this.childNodes[0],i=null;e&&(this.isEmbellished||e.isKind("mi")?(i=e.setTeXclass(t),this.updateTeXclass(this.core())):(e.setTeXclass(null),e.isKind("TeXAtom")&&(this.texClass=e.texClass)));for(let r of this.childNodes.slice(1))r&&r.setTeXclass(null);return i||this}};li.defaults=At.defaults;var Ih=class extends Hm{get isToken(){return!1}get isEmpty(){return!0}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 L.NONE}get prevClass(){return L.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,i,r){}inheritAttributesFrom(t){}verifyTree(t){}mError(t,e,i=!1){return null}},qs=class extends Ih{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}},Fa=class extends Ih{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"}},ms=class El extends oi{constructor(){super(...arguments),this.texclass=L.ORD}get kind(){return"mi"}setInheritedAttributes(e={},i=!1,r=0,s=!1){super.setInheritedAttributes(e,i,r,s),this.getText().match(El.singleCharacter)&&!e.mathvariant&&this.attributes.setInherited("mathvariant","italic")}setTeXclass(e){this.getPrevClass(e);let i=this.getText();return i.length>1&&i.match(El.operatorName)&&this.attributes.get("mathvariant")==="normal"&&this.getProperty("autoOP")===void 0&&this.getProperty("texClass")===void 0&&(this.texClass=L.OP,this.setProperty("autoOP",!0)),this}};ms.defaults=Object.assign({},oi.defaults),ms.operatorName=/^[a-z][a-z0-9]*$/i,ms.singleCharacter=/^[\uD800-\uDBFF]?.[\u0300-\u036F\u1AB0-\u1ABE\u1DC0-\u1DFF\u20D0-\u20EF]*$/;var So=class{constructor(t=null){this.defaultKind="unknown",this.nodeMap=new Map,this.node={},t===null&&(t=this.constructor.defaultNodes);for(let 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);let i=this.nodeMap.get(t);this.node[t]=(...r)=>new i(this,...r)}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())}};So.defaultNodes={};var Vm=class extends So{create(t,e={},i=[]){return this.node[t](e,i)}},_a=class extends Ui{get kind(){return"math"}get linebreakContainer(){return!0}get linebreakAlign(){return""}setChildInheritedAttributes(t,e,i,r){this.attributes.get("mode")==="display"&&this.attributes.setInherited("display","block"),t=this.addInheritedAttributes(t,this.attributes.getAllAttributes()),e=!!this.attributes.get("displaystyle")||!this.attributes.get("displaystyle")&&this.attributes.get("display")==="block",this.attributes.setInherited("displaystyle",e),i=this.attributes.get("scriptlevel")||this.constructor.defaults.scriptlevel,super.setChildInheritedAttributes(t,e,i,r)}verifyTree(t=null){super.verifyTree(t),this.parent&&this.mError("Improper nesting of math tags",t,!0)}};_a.defaults=Object.assign(Object.assign({},Ui.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:"⁢",indentshift:"auto",indentalign:"auto",indenttarget:"",indentalignfirst:"indentalign",indentshiftfirst:"indentshift",indentalignlast:"indentalign",indentshiftlast:"indentshift"});var ja=class extends oi{constructor(){super(...arguments),this.texclass=L.ORD}get kind(){return"mn"}};ja.defaults=Object.assign({},oi.defaults);function ee(t,e,i=L.BIN,r=null){return[t,e,i,r]}var l={REL:ee(5,5,L.REL),WIDEREL:ee(5,5,L.REL,{accent:!0,stretchy:!0}),BIN4:ee(4,4,L.BIN),RELSTRETCH:ee(5,5,L.REL,{stretchy:!0}),ORD:ee(0,0,L.ORD),BIN3:ee(3,3,L.BIN),OPEN:ee(0,0,L.OPEN,{fence:!0,stretchy:!0,symmetric:!0}),CLOSE:ee(0,0,L.CLOSE,{fence:!0,stretchy:!0,symmetric:!0}),INTEGRAL:ee(3,3,L.OP,{largeop:!0,symmetric:!0}),ACCENT:ee(0,0,L.ORD,{accent:!0}),WIDEACCENT:ee(0,0,L.ORD,{accent:!0,stretchy:!0}),OP:ee(3,3,L.OP,{largeop:!0,movablelimits:!0,symmetric:!0}),RELACCENT:ee(5,5,L.REL,{accent:!0}),BIN0:ee(0,0,L.BIN),BIN5:ee(5,5,L.BIN),FENCE:ee(0,0,L.ORD,{fence:!0,stretchy:!0,symmetric:!0}),INNER:ee(1,1,L.INNER),ORD30:ee(3,0,L.ORD),NONE:ee(0,0,L.NONE),ORDSTRETCH0:ee(0,0,L.ORD,{stretchy:!0}),BINSTRETCH0:ee(0,0,L.BIN,{stretchy:!0}),RELSTRETCH0:ee(0,0,L.REL,{stretchy:!0}),CLOSE0:ee(0,0,L.CLOSE,{fence:!0}),ORD3:ee(3,3,L.ORD),PUNCT03:ee(0,3,L.PUNCT,{linebreakstyle:"after"}),OPEN0:ee(0,0,L.OPEN,{fence:!0}),STRETCH4:ee(4,4,L.BIN,{stretchy:!0})},Xm=[[32,127,L.REL,"mo"],[160,191,L.ORD,"mo"],[192,591,L.ORD,"mi"],[688,879,L.ORD,"mo"],[880,6688,L.ORD,"mi"],[6832,6911,L.ORD,"mo"],[6912,7615,L.ORD,"mi"],[7616,7679,L.ORD,"mo"],[7680,8191,L.ORD,"mi"],[8192,8303,L.ORD,"mo"],[8304,8351,L.ORD,"mo"],[8448,8527,L.ORD,"mi"],[8528,8591,L.ORD,"mn"],[8592,8703,L.REL,"mo"],[8704,8959,L.BIN,"mo"],[8960,9215,L.ORD,"mo"],[9312,9471,L.ORD,"mn"],[9472,10223,L.ORD,"mo"],[10224,10239,L.REL,"mo"],[10240,10495,L.ORD,"mtext"],[10496,10623,L.REL,"mo"],[10624,10751,L.ORD,"mo"],[10752,11007,L.BIN,"mo"],[11008,11055,L.ORD,"mo"],[11056,11087,L.REL,"mo"],[11088,11263,L.ORD,"mo"],[11264,11744,L.ORD,"mi"],[11776,11903,L.ORD,"mo"],[11904,12255,L.ORD,"mi","normal"],[12272,12351,L.ORD,"mo"],[12352,42143,L.ORD,"mi","normal"],[42192,43055,L.ORD,"mi"],[43056,43071,L.ORD,"mn"],[43072,55295,L.ORD,"mi"],[63744,64255,L.ORD,"mi","normal"],[64256,65023,L.ORD,"mi"],[65024,65135,L.ORD,"mo"],[65136,65791,L.ORD,"mi"],[65792,65935,L.ORD,"mn"],[65936,74751,L.ORD,"mi","normal"],[74752,74879,L.ORD,"mn"],[74880,113823,L.ORD,"mi","normal"],[113824,119391,L.ORD,"mo"],[119648,119679,L.ORD,"mn"],[119808,120781,L.ORD,"mi"],[120782,120831,L.ORD,"mn"],[122624,129023,L.ORD,"mo"],[129024,129279,L.REL,"mo"],[129280,129535,L.ORD,"mo"],[131072,195103,L.ORD,"mi","normal"]];function Hu(t){let e=pr.infix[t]||pr.prefix[t]||pr.postfix[t];if(e)return[0,0,e[2],"mo"];let i=t.codePointAt(0);for(let r of Xm)if(i<=r[1]){if(i>=r[0])return r;break}return[0,0,L.REL,"mo"]}var $m=[[0,0],[1,2],[3,3],[4,4],[0,0],[0,0],[0,3],[1,1]],pr={prefix:{"!":l.ORD,"(":l.OPEN,"+":l.BIN0,"-":l.BIN0,"[":l.OPEN,"{":l.OPEN,"|":l.OPEN,"||":l.BIN0,"¬":l.ORD,"±":l.BIN0,"‖":l.FENCE,"‘":l.OPEN0,"“":l.OPEN0,"ⅅ":l.ORD30,"ⅆ":l.ORD30,"∀":l.ORD,"∁":l.ORD,"∂":l.ORD30,"∃":l.ORD,"∄":l.ORD,"∇":l.ORD,"∏":l.OP,"∐":l.OP,"∑":l.OP,"−":l.BIN0,"∓":l.BIN0,"√":[3,0,L.ORD,{stretchy:!0}],"∛":l.ORD30,"∜":l.ORD30,"∟":l.ORD,"∠":l.ORD,"∡":l.ORD,"∢":l.ORD,"∫":l.INTEGRAL,"∬":l.INTEGRAL,"∭":l.INTEGRAL,"∮":l.INTEGRAL,"∯":l.INTEGRAL,"∰":l.INTEGRAL,"∱":l.INTEGRAL,"∲":l.INTEGRAL,"∳":l.INTEGRAL,"∴":l.REL,"∵":l.REL,"∼":[0,0,L.REL,{}],"⊾":l.ORD,"⊿":l.ORD,"⋀":l.OP,"⋁":l.OP,"⋂":l.OP,"⋃":l.OP,"⌈":l.OPEN,"⌊":l.OPEN,"⌐":l.ORD,"⌙":l.ORD,"❲":l.OPEN,"➕":l.ORD,"➖":l.ORD,"⟀":l.ORD,"⟦":l.OPEN,"⟨":l.OPEN,"⟪":l.OPEN,"⟬":l.OPEN,"⟮":l.OPEN,"⦀":l.FENCE,"⦃":l.OPEN,"⦅":l.OPEN,"⦇":l.OPEN,"⦉":l.OPEN,"⦋":l.OPEN,"⦍":l.OPEN,"⦏":l.OPEN,"⦑":l.OPEN,"⦓":l.OPEN,"⦕":l.OPEN,"⦗":l.OPEN,"⦙":l.FENCE,"⦛":l.ORD,"⦜":l.ORD,"⦝":l.ORD,"⦞":l.ORD,"⦟":l.ORD,"⦠":l.ORD,"⦡":l.ORD,"⦢":l.ORD,"⦣":l.ORD,"⦤":l.ORD,"⦥":l.ORD,"⦦":l.ORD,"⦧":l.ORD,"⦨":l.ORD,"⦩":l.ORD,"⦪":l.ORD,"⦫":l.ORD,"⦬":l.ORD,"⦭":l.ORD,"⦮":l.ORD,"⦯":l.ORD,"⧘":l.OPEN,"⧚":l.OPEN,"⧼":l.OPEN,"⨀":l.OP,"⨁":l.OP,"⨂":l.OP,"⨃":l.OP,"⨄":l.OP,"⨅":l.OP,"⨆":l.OP,"⨇":l.OP,"⨈":l.OP,"⨉":l.OP,"⨊":l.OP,"⨋":l.INTEGRAL,"⨌":l.INTEGRAL,"⨍":l.INTEGRAL,"⨎":l.INTEGRAL,"⨏":l.INTEGRAL,"⨐":l.INTEGRAL,"⨑":l.INTEGRAL,"⨒":l.INTEGRAL,"⨓":l.INTEGRAL,"⨔":l.INTEGRAL,"⨕":l.INTEGRAL,"⨖":l.INTEGRAL,"⨗":l.INTEGRAL,"⨘":l.INTEGRAL,"⨙":l.INTEGRAL,"⨚":l.INTEGRAL,"⨛":l.INTEGRAL,"⨜":l.INTEGRAL,"⨝":l.OP,"⨞":l.OP,"⫬":l.ORD,"⫭":l.ORD,"⫼":l.OP,"⫿":l.OP,"〈":l.OPEN},postfix:{"!!":l.BIN0,"!":l.CLOSE0,'"':l.ORD,"%":l.ORD,"&":l.ORD,"'":l.ACCENT,")":l.CLOSE,"++":l.BIN0,"--":l.BIN0,"]":l.CLOSE,"^":l.WIDEACCENT,_:l.WIDEACCENT,"`":l.ACCENT,"|":l.CLOSE,"||":l.BIN0,"}":l.CLOSE,"~":l.WIDEACCENT,"¨":l.ACCENT,"¯":l.WIDEACCENT,"°":l.ACCENT,"²":l.ORD,"³":l.ORD,"´":l.ACCENT,"¸":l.ACCENT,"¹":l.ORD,"ˆ":l.WIDEACCENT,"ˇ":l.WIDEACCENT,"ˉ":l.WIDEACCENT,"ˊ":l.ACCENT,"ˋ":l.ACCENT,"ˍ":l.WIDEACCENT,"˘":l.ACCENT,"˙":l.ACCENT,"˚":l.ACCENT,"˜":l.WIDEACCENT,"˝":l.ACCENT,"˷":l.WIDEACCENT,"̂":l.WIDEACCENT,"̑":l.ACCENT,"‖":l.FENCE,"’":l.CLOSE0,"‚":l.ORD,"‛":l.ORD,"”":l.CLOSE0,"„":l.ORD,"‟":l.ORD,"′":l.ORD,"″":l.ORD,"‴":l.ORD,"‵":l.ORD,"‶":l.ORD,"‷":l.ORD,"‾":l.WIDEACCENT,"⁗":l.ORD,"⃛":l.ACCENT,"⃜":l.ACCENT,"⌉":l.CLOSE,"⌋":l.CLOSE,"⌢":l.RELSTRETCH0,"⌣":l.RELSTRETCH0,"⎴":l.WIDEACCENT,"⎵":l.WIDEACCENT,"⏍":l.ORD,"⏜":l.WIDEACCENT,"⏝":l.WIDEACCENT,"⏞":l.WIDEACCENT,"⏟":l.WIDEACCENT,"⏠":l.WIDEACCENT,"⏡":l.WIDEACCENT,"❳":l.CLOSE,"⟧":l.CLOSE,"⟩":l.CLOSE,"⟫":l.CLOSE,"⟭":l.CLOSE,"⟯":l.CLOSE,"⦀":l.FENCE,"⦄":l.CLOSE,"⦆":l.CLOSE,"⦈":l.CLOSE,"⦊":l.CLOSE,"⦌":l.CLOSE,"⦎":l.CLOSE,"⦐":l.CLOSE,"⦒":l.CLOSE,"⦔":l.CLOSE,"⦖":l.CLOSE,"⦘":l.CLOSE,"⦙":l.FENCE,"⧙":l.CLOSE,"⧛":l.CLOSE,"⧽":l.CLOSE,"〉":l.CLOSE,"𞻰":l.BINSTRETCH0,"𞻱":l.BINSTRETCH0},infix:{"!":l.ORD,"!=":l.BIN5,"#":l.ORD,$:l.ORD,"%":l.ORD3,"&&":l.BIN4,"**":l.BIN3,"*":l.BIN3,"*=":l.BIN5,"+":l.BIN4,"+=":l.BIN5,",":l.PUNCT03,"":l.ORD,"-":l.BIN4,"-=":l.BIN5,"->":l.BIN5,".":l.ORD3,"..":l.BIN3,"...":l.INNER,"/":[4,4,L.ORD,{}],"//":l.BIN5,"/=":l.BIN5,":":[0,3,L.REL,{}],":=":l.BIN5,";":l.PUNCT03,"<":l.REL,"<=":l.REL,"<>":[3,3,L.REL,{}],"=":l.REL,"==":l.REL,">":l.REL,">=":l.REL,"?":[3,3,L.CLOSE,{fence:!0}],"@":l.ORD3,"\\":l.ORD,"^":[3,3,L.ORD,{accent:!0,stretchy:!0}],_:l.WIDEACCENT,"|":[5,5,L.ORD,{}],"||":l.BIN5,"±":l.BIN4,"·":l.BIN3,"×":l.BIN3,"÷":l.BIN4,"ʹ":l.ORD,"̀":l.ACCENT,"́":l.ACCENT,"̃":l.WIDEACCENT,"̄":l.ACCENT,"̆":l.ACCENT,"̇":l.ACCENT,"̈":l.ACCENT,"̌":l.ACCENT,"̲":l.WIDEACCENT,"̸":l.REL,"϶":l.REL,"―":l.ORDSTRETCH0,"‗":l.ORDSTRETCH0,"†":l.BIN3,"‡":l.BIN3,"•":l.BIN3,"…":l.INNER,"⁃":l.BIN3,"⁄":l.STRETCH4,"⁡":l.NONE,"⁢":l.NONE,"⁣":[0,0,L.NONE,{linebreakstyle:"after"}],"⁤":l.NONE,"⃗":l.ACCENT,ℑ:l.ORD,ℓ:l.ORD,"℘":l.ORD,ℜ:l.ORD,"←":l.WIDEREL,"↑":l.RELSTRETCH,"→":l.WIDEREL,"↓":l.RELSTRETCH,"↔":l.WIDEREL,"↕":l.RELSTRETCH,"↖":l.REL,"↗":l.REL,"↘":l.REL,"↙":l.REL,"↚":l.WIDEREL,"↛":l.WIDEREL,"↜":l.WIDEREL,"↝":l.WIDEREL,"↞":l.WIDEREL,"↟":l.RELSTRETCH,"↠":l.WIDEREL,"↡":l.RELSTRETCH,"↢":l.WIDEREL,"↣":l.WIDEREL,"↤":l.WIDEREL,"↥":l.RELSTRETCH,"↦":l.WIDEREL,"↧":l.RELSTRETCH,"↨":l.RELSTRETCH,"↩":l.WIDEREL,"↪":l.WIDEREL,"↫":l.WIDEREL,"↬":l.WIDEREL,"↭":l.WIDEREL,"↮":l.WIDEREL,"↯":l.REL,"↰":l.RELSTRETCH,"↱":l.RELSTRETCH,"↲":l.RELSTRETCH,"↳":l.RELSTRETCH,"↴":l.RELSTRETCH,"↵":l.RELSTRETCH,"↶":l.REL,"↷":l.REL,"↸":l.REL,"↹":l.WIDEREL,"↺":l.REL,"↻":l.REL,"↼":l.WIDEREL,"↽":l.WIDEREL,"↾":l.RELSTRETCH,"↿":l.RELSTRETCH,"⇀":l.WIDEREL,"⇁":l.WIDEREL,"⇂":l.RELSTRETCH,"⇃":l.RELSTRETCH,"⇄":l.WIDEREL,"⇅":l.RELSTRETCH,"⇆":l.WIDEREL,"⇇":l.WIDEREL,"⇈":l.RELSTRETCH,"⇉":l.WIDEREL,"⇊":l.RELSTRETCH,"⇋":l.WIDEREL,"⇌":l.WIDEREL,"⇍":l.WIDEREL,"⇎":l.WIDEREL,"⇏":l.WIDEREL,"⇐":l.WIDEREL,"⇑":l.RELSTRETCH,"⇒":l.WIDEREL,"⇓":l.RELSTRETCH,"⇔":l.WIDEREL,"⇕":l.RELSTRETCH,"⇖":l.REL,"⇗":l.REL,"⇘":l.REL,"⇙":l.REL,"⇚":l.WIDEREL,"⇛":l.WIDEREL,"⇜":l.WIDEREL,"⇝":l.WIDEREL,"⇞":l.RELSTRETCH,"⇟":l.RELSTRETCH,"⇠":l.WIDEREL,"⇡":l.RELSTRETCH,"⇢":l.WIDEREL,"⇣":l.RELSTRETCH,"⇤":l.WIDEREL,"⇥":l.WIDEREL,"⇦":l.WIDEREL,"⇧":l.RELSTRETCH,"⇨":l.WIDEREL,"⇩":l.RELSTRETCH,"⇪":l.RELSTRETCH,"⇫":l.RELSTRETCH,"⇬":l.RELSTRETCH,"⇭":l.RELSTRETCH,"⇮":l.RELSTRETCH,"⇯":l.RELSTRETCH,"⇰":l.WIDEREL,"⇱":l.REL,"⇲":l.REL,"⇳":l.RELSTRETCH,"⇴":l.WIDEREL,"⇵":l.RELSTRETCH,"⇶":l.WIDEREL,"⇷":l.WIDEREL,"⇸":l.WIDEREL,"⇹":l.WIDEREL,"⇺":l.WIDEREL,"⇻":l.WIDEREL,"⇼":l.WIDEREL,"⇽":l.WIDEREL,"⇾":l.WIDEREL,"⇿":l.WIDEREL,"∅":l.ORD,"∆":l.ORD,"∈":l.REL,"∉":l.REL,"∊":l.REL,"∋":l.REL,"∌":l.REL,"∍":l.REL,"−":l.BIN4,"∓":l.BIN4,"∔":l.BIN4,"∕":l.STRETCH4,"∖":l.BIN4,"∗":l.BIN3,"∘":l.BIN3,"∙":l.BIN3,"∝":l.REL,"∞":l.ORD,"∣":l.REL,"∤":l.REL,"∥":l.REL,"∦":l.REL,"∧":l.BIN4,"∨":l.BIN4,"∩":l.BIN4,"∪":l.BIN4,"∶":l.BIN4,"∷":l.REL,"∸":l.BIN4,"∹":l.REL,"∺":l.REL,"∻":l.REL,"∼":l.REL,"∽":l.REL,"∾":l.REL,"≀":l.BIN3,"≁":l.REL,"≂":l.REL,"≂̸":l.REL,"≃":l.REL,"≄":l.REL,"≅":l.REL,"≆":l.REL,"≇":l.REL,"≈":l.REL,"≉":l.REL,"≊":l.REL,"≋":l.REL,"≌":l.REL,"≍":l.REL,"≎":l.REL,"≏":l.REL,"≐":l.REL,"≑":l.REL,"≒":l.REL,"≓":l.REL,"≔":l.REL,"≕":l.REL,"≖":l.REL,"≗":l.REL,"≘":l.REL,"≙":l.REL,"≚":l.REL,"≛":l.REL,"≜":l.REL,"≝":l.REL,"≞":l.REL,"≟":l.REL,"≠":l.REL,"≡":l.REL,"≢":l.REL,"≣":l.REL,"≤":l.REL,"≥":l.REL,"≦":l.REL,"≦̸":l.REL,"≧":l.REL,"≧̸":l.REL,"≨":l.REL,"≩":l.REL,"≪":l.REL,"≪̸":l.REL,"≫":l.REL,"≫̸":l.REL,"≬":l.REL,"≭":l.REL,"≮":l.REL,"≯":l.REL,"≰":l.REL,"≱":l.REL,"≲":l.REL,"≳":l.REL,"≴":l.REL,"≵":l.REL,"≶":l.REL,"≷":l.REL,"≸":l.REL,"≹":l.REL,"≺":l.REL,"≻":l.REL,"≼":l.REL,"≽":l.REL,"≾":l.REL,"≾̸":l.REL,"≿":l.REL,"≿̸":l.REL,"⊀":l.REL,"⊁":l.REL,"⊂":l.REL,"⊃":l.REL,"⊄":l.REL,"⊅":l.REL,"⊆":l.REL,"⊇":l.REL,"⊈":l.REL,"⊉":l.REL,"⊊":l.REL,"⊋":l.REL,"⊌":l.BIN4,"⊍":l.BIN4,"⊎":l.BIN4,"⊏":l.REL,"⊏̸":l.REL,"⊐":l.REL,"⊐̸":l.REL,"⊑":l.REL,"⊒":l.REL,"⊓":l.BIN4,"⊔":l.BIN4,"⊕":l.BIN4,"⊖":l.BIN4,"⊗":l.BIN3,"⊘":l.BIN4,"⊙":l.BIN3,"⊚":l.BIN3,"⊛":l.BIN3,"⊜":l.REL,"⊝":l.BIN4,"⊞":l.BIN4,"⊟":l.BIN4,"⊠":l.BIN3,"⊡":l.BIN3,"⊢":l.REL,"⊣":l.REL,"⊤":l.ORD,"⊥":l.ORD,"⊦":l.REL,"⊧":l.REL,"⊨":l.REL,"⊩":l.REL,"⊪":l.REL,"⊫":l.REL,"⊬":l.REL,"⊭":l.REL,"⊮":l.REL,"⊯":l.REL,"⊰":l.REL,"⊱":l.REL,"⊲":l.REL,"⊳":l.REL,"⊴":l.REL,"⊵":l.REL,"⊶":l.REL,"⊷":l.REL,"⊸":l.REL,"⊺":l.BIN3,"⊻":l.BIN4,"⊼":l.BIN4,"⊽":l.BIN4,"⋄":l.BIN3,"⋅":l.BIN3,"⋆":l.BIN3,"⋇":l.BIN3,"⋈":l.REL,"⋉":l.BIN3,"⋊":l.BIN3,"⋋":l.BIN3,"⋌":l.BIN3,"⋍":l.REL,"⋎":l.BIN4,"⋏":l.BIN4,"⋐":l.REL,"⋑":l.REL,"⋒":l.BIN4,"⋓":l.BIN4,"⋔":l.REL,"⋕":l.REL,"⋖":l.REL,"⋗":l.REL,"⋘":l.REL,"⋙":l.REL,"⋚":l.REL,"⋛":l.REL,"⋜":l.REL,"⋝":l.REL,"⋞":l.REL,"⋟":l.REL,"⋠":l.REL,"⋡":l.REL,"⋢":l.REL,"⋣":l.REL,"⋤":l.REL,"⋥":l.REL,"⋦":l.REL,"⋧":l.REL,"⋨":l.REL,"⋩":l.REL,"⋪":l.REL,"⋫":l.REL,"⋬":l.REL,"⋭":l.REL,"⋮":l.ORD,"⋯":l.INNER,"⋰":l.INNER,"⋱":l.INNER,"⋲":l.REL,"⋳":l.REL,"⋴":l.REL,"⋵":l.REL,"⋶":l.REL,"⋷":l.REL,"⋸":l.REL,"⋹":l.REL,"⋺":l.REL,"⋻":l.REL,"⋼":l.REL,"⋽":l.REL,"⋾":l.REL,"⋿":l.REL,"⌁":l.REL,"⌅":l.BIN3,"⌆":l.BIN3,"〈":l.OPEN,"〉":l.CLOSE,"⍼":l.REL,"⎋":l.REL,"⎪":l.ORD,"⎯":l.ORDSTRETCH0,"⎰":l.OPEN,"⎱":l.CLOSE,"─":l.ORD,"△":l.BIN3,"▵":l.BIN3,"▹":l.BIN3,"▽":l.BIN3,"▿":l.BIN3,"◃":l.BIN3,"◯":l.BIN3,"♠":l.ORD,"♡":l.ORD,"♢":l.ORD,"♣":l.ORD,"♭":l.ORD,"♮":l.ORD,"♯":l.ORD,"❘":[5,5,L.REL,{stretchy:!0,symmetric:!0}],"➔":l.WIDEREL,"➕":l.BIN4,"➖":l.BIN4,"➗":l.BIN4,"➘":l.REL,"➙":l.WIDEREL,"➚":l.REL,"➛":l.WIDEREL,"➜":l.WIDEREL,"➝":l.WIDEREL,"➞":l.WIDEREL,"➟":l.WIDEREL,"➠":l.WIDEREL,"➡":l.WIDEREL,"➥":l.WIDEREL,"➦":l.WIDEREL,"➧":l.RELACCENT,"➨":l.WIDEREL,"➩":l.WIDEREL,"➪":l.WIDEREL,"➫":l.WIDEREL,"➬":l.WIDEREL,"➭":l.WIDEREL,"➮":l.WIDEREL,"➯":l.WIDEREL,"➱":l.WIDEREL,"➲":l.RELACCENT,"➳":l.WIDEREL,"➴":l.REL,"➵":l.WIDEREL,"➶":l.REL,"➷":l.REL,"➸":l.WIDEREL,"➹":l.REL,"➺":l.WIDEREL,"➻":l.WIDEREL,"➼":l.WIDEREL,"➽":l.WIDEREL,"➾":l.WIDEREL,"⟂":l.REL,"⟂̸":l.REL,"⟋":l.BIN3,"⟍":l.BIN3,"⟰":l.RELSTRETCH,"⟱":l.RELSTRETCH,"⟲":l.REL,"⟳":l.REL,"⟴":l.RELSTRETCH,"⟵":l.WIDEREL,"⟶":l.WIDEREL,"⟷":l.WIDEREL,"⟸":l.WIDEREL,"⟹":l.WIDEREL,"⟺":l.WIDEREL,"⟻":l.WIDEREL,"⟼":l.WIDEREL,"⟽":l.WIDEREL,"⟾":l.WIDEREL,"⟿":l.WIDEREL,"⤀":l.WIDEREL,"⤁":l.WIDEREL,"⤂":l.WIDEREL,"⤃":l.WIDEREL,"⤄":l.WIDEREL,"⤅":l.WIDEREL,"⤆":l.WIDEREL,"⤇":l.WIDEREL,"⤈":l.RELSTRETCH,"⤉":l.RELSTRETCH,"⤊":l.RELSTRETCH,"⤋":l.RELSTRETCH,"⤌":l.WIDEREL,"⤍":l.WIDEREL,"⤎":l.WIDEREL,"⤏":l.WIDEREL,"⤐":l.WIDEREL,"⤑":l.WIDEREL,"⤒":l.RELSTRETCH,"⤓":l.RELSTRETCH,"⤔":l.WIDEREL,"⤕":l.WIDEREL,"⤖":l.WIDEREL,"⤗":l.WIDEREL,"⤘":l.WIDEREL,"⤙":l.WIDEREL,"⤚":l.WIDEREL,"⤛":l.WIDEREL,"⤜":l.WIDEREL,"⤝":l.WIDEREL,"⤞":l.WIDEREL,"⤟":l.WIDEREL,"⤠":l.WIDEREL,"⤡":l.REL,"⤢":l.REL,"⤣":l.REL,"⤤":l.REL,"⤥":l.REL,"⤦":l.REL,"⤧":l.REL,"⤨":l.REL,"⤩":l.REL,"⤪":l.REL,"⤫":l.REL,"⤬":l.REL,"⤭":l.REL,"⤮":l.REL,"⤯":l.REL,"⤰":l.REL,"⤱":l.REL,"⤲":l.REL,"⤳":l.RELACCENT,"⤴":l.RELSTRETCH,"⤵":l.RELSTRETCH,"⤶":l.RELSTRETCH,"⤷":l.RELSTRETCH,"⤸":l.REL,"⤹":l.REL,"⤺":l.RELACCENT,"⤻":l.RELACCENT,"⤼":l.RELACCENT,"⤽":l.RELACCENT,"⤾":l.REL,"⤿":l.REL,"⥀":l.REL,"⥁":l.REL,"⥂":l.WIDEREL,"⥃":l.WIDEREL,"⥄":l.WIDEREL,"⥅":l.RELSTRETCH,"⥆":l.RELSTRETCH,"⥇":l.WIDEREL,"⥈":l.WIDEREL,"⥉":l.RELSTRETCH,"⥊":l.WIDEREL,"⥋":l.WIDEREL,"⥌":l.RELSTRETCH,"⥍":l.RELSTRETCH,"⥎":l.WIDEREL,"⥏":l.RELSTRETCH,"⥐":l.WIDEREL,"⥑":l.RELSTRETCH,"⥒":l.WIDEREL,"⥓":l.WIDEREL,"⥔":l.RELSTRETCH,"⥕":l.RELSTRETCH,"⥖":l.WIDEREL,"⥗":l.WIDEREL,"⥘":l.RELSTRETCH,"⥙":l.RELSTRETCH,"⥚":l.WIDEREL,"⥛":l.WIDEREL,"⥜":l.RELSTRETCH,"⥝":l.RELSTRETCH,"⥞":l.WIDEREL,"⥟":l.WIDEREL,"⥠":l.RELSTRETCH,"⥡":l.RELSTRETCH,"⥢":l.WIDEREL,"⥣":l.RELSTRETCH,"⥤":l.WIDEREL,"⥥":l.RELSTRETCH,"⥦":l.WIDEREL,"⥧":l.WIDEREL,"⥨":l.WIDEREL,"⥩":l.WIDEREL,"⥪":l.WIDEREL,"⥫":l.WIDEREL,"⥬":l.WIDEREL,"⥭":l.WIDEREL,"⥮":l.RELSTRETCH,"⥯":l.RELSTRETCH,"⥰":l.WIDEREL,"⥱":l.WIDEREL,"⥲":l.WIDEREL,"⥳":l.WIDEREL,"⥴":l.WIDEREL,"⥵":l.WIDEREL,"⥶":l.RELACCENT,"⥷":l.RELACCENT,"⥸":l.RELACCENT,"⥹":l.RELACCENT,"⥺":l.RELACCENT,"⥻":l.RELACCENT,"⥼":l.WIDEREL,"⥽":l.WIDEREL,"⥾":l.RELSTRETCH,"⥿":l.RELSTRETCH,"⦁":l.REL,"⦂":l.REL,"⦶":l.REL,"⦷":l.REL,"⦸":l.BIN4,"⦹":l.REL,"⦼":l.BIN4,"⧀":l.REL,"⧁":l.REL,"⧄":l.BIN4,"⧅":l.BIN4,"⧆":l.BIN3,"⧇":l.BIN3,"⧈":l.BIN3,"⧎":l.REL,"⧏":l.REL,"⧐":l.REL,"⧑":l.REL,"⧒":l.REL,"⧓":l.REL,"⧔":l.BIN3,"⧕":l.BIN3,"⧖":l.BIN3,"⧗":l.BIN3,"⧟":l.REL,"⧡":l.REL,"⧢":l.BIN3,"⧣":l.REL,"⧤":l.REL,"⧥":l.REL,"⧦":l.REL,"⧴":l.REL,"⧵":l.BIN4,"⧶":l.BIN4,"⧷":l.BIN4,"⧸":l.BIN4,"⧹":l.BIN4,"⧺":l.BIN4,"⧻":l.BIN4,"⨝":l.BIN3,"⨞":l.BIN3,"⨟":l.BIN4,"⨠":l.BIN4,"⨡":l.BIN4,"⨢":l.BIN4,"⨣":l.BIN4,"⨤":l.BIN4,"⨥":l.BIN4,"⨦":l.BIN4,"⨧":l.BIN4,"⨨":l.BIN4,"⨩":l.BIN4,"⨪":l.BIN4,"⨫":l.BIN4,"⨬":l.BIN4,"⨭":l.BIN4,"⨮":l.BIN4,"⨯":l.BIN3,"⨰":l.BIN3,"⨱":l.BIN3,"⨲":l.BIN3,"⨳":l.BIN3,"⨴":l.BIN3,"⨵":l.BIN3,"⨶":l.BIN3,"⨷":l.BIN3,"⨸":l.BIN4,"⨹":l.BIN4,"⨺":l.BIN4,"⨻":l.BIN3,"⨼":l.BIN3,"⨽":l.BIN3,"⨾":l.BIN4,"⨿":l.BIN3,"⩀":l.BIN4,"⩁":l.BIN4,"⩂":l.BIN4,"⩃":l.BIN4,"⩄":l.BIN4,"⩅":l.BIN4,"⩆":l.BIN4,"⩇":l.BIN4,"⩈":l.BIN4,"⩉":l.BIN4,"⩊":l.BIN4,"⩋":l.BIN4,"⩌":l.BIN4,"⩍":l.BIN4,"⩎":l.BIN4,"⩏":l.BIN4,"⩐":l.BIN3,"⩑":l.BIN4,"⩒":l.BIN4,"⩓":l.BIN4,"⩔":l.BIN4,"⩕":l.BIN4,"⩖":l.BIN4,"⩗":l.BIN4,"⩘":l.BIN4,"⩙":l.BIN4,"⩚":l.BIN4,"⩛":l.BIN4,"⩜":l.BIN4,"⩝":l.BIN4,"⩞":l.BIN4,"⩟":l.BIN4,"⩠":l.BIN4,"⩡":l.BIN4,"⩢":l.BIN4,"⩣":l.BIN4,"⩤":l.BIN3,"⩥":l.BIN3,"⩦":l.REL,"⩧":l.REL,"⩨":l.REL,"⩩":l.REL,"⩪":l.REL,"⩫":l.REL,"⩬":l.REL,"⩭":l.REL,"⩮":l.REL,"⩯":l.REL,"⩰":l.REL,"⩱":l.REL,"⩲":l.REL,"⩳":l.REL,"⩴":l.REL,"⩵":l.REL,"⩶":l.REL,"⩷":l.REL,"⩸":l.REL,"⩹":l.REL,"⩺":l.REL,"⩻":l.REL,"⩼":l.REL,"⩽":l.REL,"⩽̸":l.REL,"⩾":l.REL,"⩾̸":l.REL,"⩿":l.REL,"⪀":l.REL,"⪁":l.REL,"⪂":l.REL,"⪃":l.REL,"⪄":l.REL,"⪅":l.REL,"⪆":l.REL,"⪇":l.REL,"⪈":l.REL,"⪉":l.REL,"⪊":l.REL,"⪋":l.REL,"⪌":l.REL,"⪍":l.REL,"⪎":l.REL,"⪏":l.REL,"⪐":l.REL,"⪑":l.REL,"⪒":l.REL,"⪓":l.REL,"⪔":l.REL,"⪕":l.REL,"⪖":l.REL,"⪗":l.REL,"⪘":l.REL,"⪙":l.REL,"⪚":l.REL,"⪛":l.REL,"⪜":l.REL,"⪝":l.REL,"⪞":l.REL,"⪟":l.REL,"⪠":l.REL,"⪡":l.REL,"⪢":l.REL,"⪣":l.REL,"⪤":l.REL,"⪥":l.REL,"⪦":l.REL,"⪧":l.REL,"⪨":l.REL,"⪩":l.REL,"⪪":l.REL,"⪫":l.REL,"⪬":l.REL,"⪭":l.REL,"⪮":l.REL,"⪯":l.REL,"⪯̸":l.REL,"⪰":l.REL,"⪰̸":l.REL,"⪱":l.REL,"⪲":l.REL,"⪳":l.REL,"⪴":l.REL,"⪵":l.REL,"⪶":l.REL,"⪷":l.REL,"⪸":l.REL,"⪹":l.REL,"⪺":l.REL,"⪻":l.REL,"⪼":l.REL,"⪽":l.REL,"⪾":l.REL,"⪿":l.REL,"⫀":l.REL,"⫁":l.REL,"⫂":l.REL,"⫃":l.REL,"⫄":l.REL,"⫅":l.REL,"⫆":l.REL,"⫇":l.REL,"⫈":l.REL,"⫉":l.REL,"⫊":l.REL,"⫋":l.REL,"⫌":l.REL,"⫍":l.REL,"⫎":l.REL,"⫏":l.REL,"⫐":l.REL,"⫑":l.REL,"⫒":l.REL,"⫓":l.REL,"⫔":l.REL,"⫕":l.REL,"⫖":l.REL,"⫗":l.REL,"⫘":l.REL,"⫙":l.REL,"⫚":l.REL,"⫛":l.BIN4,"⫝":l.BIN3,"⫝̸":l.REL,"⫞":l.REL,"⫟":l.REL,"⫠":l.REL,"⫡":l.REL,"⫢":l.REL,"⫣":l.REL,"⫤":l.REL,"⫥":l.REL,"⫦":l.REL,"⫧":l.REL,"⫨":l.REL,"⫩":l.REL,"⫪":l.REL,"⫫":l.REL,"⫮":l.REL,"⫲":l.REL,"⫳":l.REL,"⫴":l.REL,"⫵":l.REL,"⫶":l.BIN4,"⫷":l.REL,"⫸":l.REL,"⫹":l.REL,"⫺":l.REL,"⫻":l.BIN4,"⫽":l.BIN4,"⫾":l.BIN3,"⬀":l.REL,"⬁":l.REL,"⬂":l.REL,"⬃":l.REL,"⬄":l.WIDEREL,"⬅":l.WIDEREL,"⬆":l.RELSTRETCH,"⬇":l.RELSTRETCH,"⬈":l.REL,"⬉":l.REL,"⬊":l.REL,"⬋":l.REL,"⬌":l.WIDEREL,"⬍":l.RELSTRETCH,"⬎":l.RELSTRETCH,"⬏":l.RELSTRETCH,"⬐":l.RELSTRETCH,"⬑":l.RELSTRETCH,"⬰":l.WIDEREL,"⬱":l.WIDEREL,"⬲":l.RELSTRETCH,"⬳":l.WIDEREL,"⬴":l.WIDEREL,"⬵":l.WIDEREL,"⬶":l.WIDEREL,"⬷":l.WIDEREL,"⬸":l.WIDEREL,"⬹":l.WIDEREL,"⬺":l.WIDEREL,"⬻":l.WIDEREL,"⬼":l.WIDEREL,"⬽":l.WIDEREL,"⬾":l.WIDEREL,"⬿":l.RELACCENT,"⭀":l.WIDEREL,"⭁":l.WIDEREL,"⭂":l.WIDEREL,"⭃":l.WIDEREL,"⭄":l.WIDEREL,"⭅":l.WIDEREL,"⭆":l.WIDEREL,"⭇":l.WIDEREL,"⭈":l.WIDEREL,"⭉":l.WIDEREL,"⭊":l.WIDEREL,"⭋":l.WIDEREL,"⭌":l.WIDEREL,"⭍":l.REL,"⭎":l.REL,"⭏":l.REL,"⭚":l.REL,"⭛":l.REL,"⭜":l.REL,"⭝":l.REL,"⭞":l.REL,"⭟":l.REL,"⭠":l.WIDEREL,"⭡":l.RELSTRETCH,"⭢":l.WIDEREL,"⭣":l.RELSTRETCH,"⭤":l.WIDEREL,"⭥":l.RELSTRETCH,"⭦":l.REL,"⭧":l.REL,"⭨":l.REL,"⭩":l.REL,"⭪":l.WIDEREL,"⭫":l.RELSTRETCH,"⭬":l.WIDEREL,"⭭":l.RELSTRETCH,"⭮":l.REL,"⭯":l.REL,"⭰":l.WIDEREL,"⭱":l.RELSTRETCH,"⭲":l.WIDEREL,"⭳":l.RELSTRETCH,"⭶":l.REL,"⭷":l.REL,"⭸":l.REL,"⭹":l.REL,"⭺":l.WIDEREL,"⭻":l.RELSTRETCH,"⭼":l.WIDEREL,"⭽":l.RELSTRETCH,"⮀":l.WIDEREL,"⮁":l.RELSTRETCH,"⮂":l.WIDEREL,"⮃":l.RELSTRETCH,"⮄":l.WIDEREL,"⮅":l.RELSTRETCH,"⮆":l.WIDEREL,"⮇":l.RELSTRETCH,"⮈":l.RELACCENT,"⮉":l.REL,"⮊":l.RELACCENT,"⮋":l.REL,"⮌":l.REL,"⮍":l.REL,"⮎":l.REL,"⮏":l.REL,"⮔":l.REL,"⮕":l.WIDEREL,"⮠":l.RELSTRETCH,"⮡":l.RELSTRETCH,"⮢":l.RELSTRETCH,"⮣":l.RELSTRETCH,"⮤":l.RELSTRETCH,"⮥":l.RELSTRETCH,"⮦":l.RELSTRETCH,"⮧":l.RELSTRETCH,"⮨":l.WIDEREL,"⮩":l.WIDEREL,"⮪":l.WIDEREL,"⮫":l.WIDEREL,"⮬":l.RELSTRETCH,"⮭":l.RELSTRETCH,"⮮":l.RELSTRETCH,"⮯":l.RELSTRETCH,"⮰":l.REL,"⮱":l.REL,"⮲":l.REL,"⮳":l.REL,"⮴":l.REL,"⮵":l.REL,"⮶":l.REL,"⮷":l.REL,"⮸":l.RELSTRETCH,"⯑":l.REL,㫜:l.BIN3,"︷":l.WIDEACCENT,"︸":l.WIDEACCENT}};function Km(t,e){return t.length===e.length?t===e?0:t<e?-1:1:e.length-t.length}function Ho(t){return t.replace(/([\^$(){}.+*?\-|[\]:\\])/g,"\\$1")}function Ao(t){return Array.from(t).map(e=>e.codePointAt(0))}function Jm(t){return String.fromCodePoint(...t)}function Oi(t){return!!t.match(/%\s*$/)}function ji(t){return t.trim().split(/\s+/)}function Ym(t){return t.replace(/\\U(?:([0-9A-Fa-f]{4})|\{\s*([0-9A-Fa-f]{1,6})\s*\})|\\./g,(e,i,r)=>e==="\\\\"?"\\":String.fromCodePoint(parseInt(i||r,16)))}function Zm(t){return`&#x${t.codePointAt(0).toString(16).toUpperCase()};`}var ri=class extends oi{constructor(){super(...arguments),this._texClass=null,this.lspace=5/18,this.rspace=5/18}get texClass(){return this._texClass===null?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,i=this.factory.getNodeClass("math");for(;e&&e.isEmbellished&&e.coreMO()===this&&!(e instanceof i);)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"))&&t.childNodes.length===1||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,e=this.coreParent().parent;if(e){let i=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":"":"";i&&(t=e.attributes.getExplicit(i)===void 0?this.attributes.get("accent"):t)}return t}setTeXclass(t){let{form:e,fence:i}=this.attributes.getList("form","fence");return this.getProperty("texClass")===void 0&&this.hasSpacingAttributes()?null:(i&&this.texClass===L.REL&&(e==="prefix"&&(this.texClass=L.OPEN),e==="postfix"&&(this.texClass=L.CLOSE)),this.adjustTeXclass(t))}adjustTeXclass(t){let e=this.texClass,i=this.prevClass;if(e===L.NONE)return t;if(t?(t.getProperty("autoOP")&&(e===L.BIN||e===L.REL)&&(i=t.texClass=L.ORD),i=this.prevClass=t.texClass||L.ORD,this.prevLevel=this.attributes.getInherited("scriptlevel")):i=this.prevClass=L.NONE,e===L.BIN&&(i===L.NONE||i===L.BIN||i===L.OP||i===L.REL||i===L.OPEN||i===L.PUNCT))this.texClass=L.ORD;else if(i===L.BIN&&(e===L.REL||e===L.CLOSE||e===L.PUNCT))t.texClass=this.prevClass=L.ORD;else if(e===L.BIN){let r=null,s=this.parent;for(;s&&s.parent&&s.isEmbellished&&(s.childNodes.length===1||!s.isKind("mrow")&&s.core()===r);)r=s,s=s.parent;r||(r=this),s.childNodes[s.childNodes.length-1]===r&&(this.texClass=L.ORD)}return this}setInheritedAttributes(t={},e=!1,i=0,r=!1){super.setInheritedAttributes(t,e,i,r);let s=this.getText();this.checkOperatorTable(s),this.checkPseudoScripts(s),this.checkPrimes(s),this.checkMathAccent(s)}getOperatorDef(t){let[e,i,r]=this.handleExplicitForm(this.getForms());this.attributes.setInherited("form",e);let s=this.constructor,n=s.OPTABLE,a=n[e][t]||n[i][t]||n[r][t];if(a)return a;this.setProperty("noDictDef",!0);let o=this.attributes.get("movablelimits");if((t.match(s.opPattern)||o)&&this.getProperty("texClass")===void 0)return ee(1,2,L.OP);let h=Hu(t),[d,p]=s.MMLSPACING[h[2]];return ee(d,p,h[2])}checkOperatorTable(t){let e=this.getOperatorDef(t);this.getProperty("texClass")===void 0&&(this.texClass=e[2]);for(let i of Object.keys(e[3]||{}))this.attributes.setInherited(i,e[3][i]);this.lspace=e[0]/18,this.rspace=e[1]/18}getForms(){let t=null,e=this.parent,i=this.Parent;for(;i&&i.isEmbellished;)t=e,e=i.parent,i=i.Parent;if(t||(t=this),e&&e.isKind("mrow")&&e.nonSpaceLength()!==1){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")){let e=this.attributes.get("form");t=[e].concat(t.filter(i=>i!==e))}return t}checkPseudoScripts(t){let e=this.constructor.pseudoScripts;if(!t.match(e))return;let i=this.coreParent().Parent,r=!i||!(i.isKind("msubsup")&&!i.isKind("msub"));this.setProperty("pseudoscript",r),r&&(this.attributes.setInherited("lspace",0),this.attributes.setInherited("rspace",0))}checkPrimes(t){let e=this.constructor.primes;if(!t.match(e))return;let i=this.constructor.remapPrimes,r=Jm(Ao(t).map(s=>i[s]));this.setProperty("primes",r)}checkMathAccent(t){let e=this.Parent;if(this.getProperty("mathaccent")!==void 0||!e||!e.isKind("munderover"))return;let[i,r,s]=e.childNodes;if(i.isEmbellished&&i.coreMO()===this)return;let n=!!(r&&r.isEmbellished&&r.coreMO()===this),a=!!(s&&s.isEmbellished&&r.coreMO()===this);!n&&!a||(this.isMathAccent(t)?this.setProperty("mathaccent",!0):this.isMathAccentWithWidth(t)&&this.setProperty("mathaccent",!1))}isMathAccent(t=this.getText()){let e=this.constructor.mathaccents;return!!t.match(e)}isMathAccentWithWidth(t=this.getText()){let e=this.constructor.mathaccentsWithWidth;return!!t.match(e)}};ri.defaults=Object.assign(Object.assign({},oi.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"}),ri.MMLSPACING=$m,ri.OPTABLE=pr,ri.pseudoScripts=new RegExp(["^[\"'*`","ª","°","²-´","¹","º","‘-‟","′-‷⁗","⁰ⁱ","⁴-ⁿ","₀-₎","]+$"].join("")),ri.primes=new RegExp([`^["'`,"‘-‟","]+$"].join("")),ri.opPattern=/^[a-zA-Z]{2,}$/,ri.remapPrimes={34:8243,39:8242,8216:8245,8217:8242,8218:8242,8219:8245,8220:8246,8221:8243,8222:8243,8223:8246},ri.mathaccents=new RegExp(["^[","´́ˊ","`̀ˋ","¨̈","~̃˜","¯̄ˉ","˘̆","ˇ̌","^̂ˆ","⃐⃑","⃖⃗⃡","˙̇","˚̊","⃛","⃜","]$"].join("")),ri.mathaccentsWithWidth=new RegExp(["^[","←→↔","⏜⏝","⏞⏟","]$"].join(""));var Dn=class Wu extends oi{constructor(){super(...arguments),this.texclass=L.ORD}get kind(){return"mtext"}get isSpacelike(){return!!this.getText().match(/^\s*$/)&&!this.attributes.hasOneOf(Wu.NONSPACELIKE)}};Dn.NONSPACELIKE=["style","mathbackground","background"],Dn.defaults=Object.assign({},oi.defaults);var Pn=class zu extends oi{constructor(){super(...arguments),this.texclass=L.NONE}setTeXclass(e){return e}get kind(){return"mspace"}get arity(){return 0}get isSpacelike(){return!this.attributes.hasExplicit("linebreak")&&this.canBreak}get hasNewline(){let e=this.attributes.get("linebreak");return this.canBreak&&(e==="newline"||e==="indentingnewline")}get canBreak(){return!this.attributes.hasOneOf(zu.NONSPACELIKE)&&String(this.attributes.get("width")).trim().charAt(0)!=="-"}};Pn.NONSPACELIKE=["height","depth","style","mathbackground","background"],Pn.defaults=Object.assign(Object.assign({},oi.defaults),{width:"0em",height:"0ex",depth:"0ex",linebreak:"auto",indentshift:"auto",indentalign:"auto",indenttarget:"",indentalignfirst:"indentalign",indentshiftfirst:"indentshift",indentalignlast:"indentalign",indentshiftlast:"indentshift"});var Ua=class extends oi{constructor(){super(...arguments),this.texclass=L.ORD}get kind(){return"ms"}};Ua.defaults=Object.assign(Object.assign({},oi.defaults),{lquote:'"',rquote:'"'});var Gs=class extends At{constructor(){super(...arguments),this._core=null}get kind(){return"mrow"}get isSpacelike(){for(let t of this.childNodes)if(!t.isSpacelike)return!1;return!0}get isEmbellished(){let t=!1,e=0;for(let i of this.childNodes){if(i){if(i.isEmbellished){if(t)return!1;t=!0,this._core=e}else if(!i.isSpacelike)return!1}e++}return t}core(){return!this.isEmbellished||this._core==null?this:this.childNodes[this._core]}coreMO(){return!this.isEmbellished||this._core==null?this:this.childNodes[this._core].coreMO()}nonSpaceLength(){let t=0;for(let e of this.childNodes)e&&!e.isSpacelike&&t++;return t}firstNonSpace(){for(let t of this.childNodes)if(t&&!t.isSpacelike)return t;return null}lastNonSpace(){let t=this.childNodes.length;for(;--t>=0;){let e=this.childNodes[t];if(e&&!e.isSpacelike)return e}return null}setTeXclass(t){if(this.getProperty("open")!=null||this.getProperty("close")!=null){this.getPrevClass(t),t=null;for(let e of this.childNodes)t=e.setTeXclass(t);return this.texClass??(this.texClass=L.INNER),this}for(let e of this.childNodes)t=e.setTeXclass(t);return this.childNodes[0]&&this.updateTeXclass(this.childNodes[0]),t}};Gs.defaults=Object.assign({},At.defaults);var Ha=class extends Gs{get kind(){return"inferredMrow"}get isInferred(){return!0}get notParent(){return!0}toString(){return"["+this.childNodes.join(",")+"]"}};Ha.defaults=Gs.defaults;var Wa=class extends li{get kind(){return"mfrac"}get arity(){return 2}get linebreakContainer(){return!0}get linebreakAlign(){return""}setTeXclass(t){this.getPrevClass(t);for(let e of this.childNodes)e.setTeXclass(null);return this}setChildInheritedAttributes(t,e,i,r){(!e||i>0)&&i++;let s=this.attributes.get("numalign"),n=this.attributes.get("denomalign"),a=this.addInheritedAttributes(Object.assign({},t),{numalign:s,indentshift:"0",indentalignfirst:s,indentshiftfirst:"0",indentalignlast:"indentalign",indentshiftlast:"indentshift"}),o=this.addInheritedAttributes(Object.assign({},t),{denalign:n,indentshift:"0",indentalignfirst:n,indentshiftfirst:"0",indentalignlast:"indentalign",indentshiftlast:"indentshift"});this.childNodes[0].setInheritedAttributes(a,!1,i,r),this.childNodes[1].setInheritedAttributes(o,!1,i,!0)}};Wa.defaults=Object.assign(Object.assign({},li.defaults),{linethickness:"medium",numalign:"center",denomalign:"center",bevelled:!1});var za=class extends At{constructor(){super(...arguments),this.texclass=L.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,i,r){this.childNodes[0].setInheritedAttributes(t,e,i,!0)}};za.defaults=Object.assign(Object.assign({},At.defaults),{"data-vertical-align":"bottom"});var qa=class extends At{constructor(){super(...arguments),this.texclass=L.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,i,r){this.childNodes[0].setInheritedAttributes(t,e,i,!0),this.childNodes[1].setInheritedAttributes(t,!1,i+2,r)}};qa.defaults=Object.assign(Object.assign({},At.defaults),{"data-vertical-align":"bottom"});var yl=class extends Ui{get kind(){return"mstyle"}get notParent(){return this.childNodes[0]&&this.childNodes[0].childNodes.length===1}setInheritedAttributes(t={},e=!1,i=0,r=!1){this.attributes.setInherited("displaystyle",e),this.attributes.setInherited("scriptlevel",i),super.setInheritedAttributes(t,e,i,r)}setChildInheritedAttributes(t,e,i,r){let s=this.attributes.getExplicit("scriptlevel");s!=null&&(s=s.toString(),s.match(/^\s*[-+]/)?i+=parseInt(s):i=parseInt(s),r=!1);let n=this.attributes.getExplicit("displaystyle");n!=null&&(e=n===!0,r=!1);let a=this.attributes.getExplicit("data-cramped");a!=null&&(r=a),t=this.addInheritedAttributes(t,this.attributes.getAllAttributes()),this.childNodes[0].setInheritedAttributes(t,e,i,r)}};yl.defaults=Object.assign(Object.assign({},Ui.defaults),{scriptlevel:Ve,displaystyle:Ve,scriptsizemultiplier:1/Math.sqrt(2),scriptminsize:".4em",mathbackground:Ve,mathcolor:Ve,dir:Ve,infixlinebreakstyle:"before"});var xl=class extends At{constructor(){super(...arguments),this.texclass=L.ORD}get kind(){return"merror"}get arity(){return-1}get linebreakContainer(){return!0}};xl.defaults=Object.assign({},At.defaults);var Ga=class extends Ui{get kind(){return"mpadded"}get linebreakContainer(){return!0}setTeXclass(t){return this.getProperty("vbox")?(this.getPrevClass(t),this.texClass=L.ORD,this.childNodes[0].setTeXclass(null),this):super.setTeXclass(t)}};Ga.defaults=Object.assign(Object.assign({},Ui.defaults),{width:"",height:"",depth:"",lspace:0,voffset:0});var Nl=class extends Ui{constructor(){super(...arguments),this.texclass=L.ORD}get kind(){return"mphantom"}};Nl.defaults=Object.assign({},Ui.defaults);var Va=class extends At{constructor(){super(...arguments),this.texclass=L.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,i=this.childNodes.length;e<i;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.open||!this.close)&&this.updateTeXclass(this.open||this.childNodes[0]||this.close),t}setChildInheritedAttributes(t,e,i,r){this.addFakeNodes();for(let s of[this.open,this.close].concat(this.separators))s&&s.setInheritedAttributes(t,e,i,r);super.setChildInheritedAttributes(t,e,i,r)}addFakeNodes(){let{open:t,close:e,separators:i}=this.attributes.getList("open","close","separators");if(t=t.replace(/[ \t\n\r]/g,""),e=e.replace(/[ \t\n\r]/g,""),i=i.replace(/[ \t\n\r]/g,""),t&&(this.open=this.fakeNode(t,{fence:!0,form:"prefix"},L.OPEN)),i){for(;i.length<this.childNodes.length-1;)i+=i.charAt(i.length-1);let r=0;for(let s of this.childNodes.slice(1))s&&this.separators.push(this.fakeNode(i.charAt(r++)))}e&&(this.close=this.fakeNode(e,{fence:!0,form:"postfix"},L.CLOSE))}fakeNode(t,e={},i=null){let r=this.factory.create("text").setText(t),s=this.factory.create("mo",e,[r]);return s.texClass=i,s.parent=this,s}};Va.defaults=Object.assign(Object.assign({},At.defaults),{open:"(",close:")",separators:","});var Xa=class extends At{constructor(){super(...arguments),this.texclass=L.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}};Xa.defaults=Object.assign(Object.assign({},At.defaults),{notation:"longdiv"});var $a=class extends At{get kind(){return"maction"}get arity(){return 1}get selected(){let 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),this.attributes.get("actiontype")!=="toggle"&&this.attributes.hasExplicit("selection")&&this.attributes.unset("selection")}setTeXclass(t){this.attributes.get("actiontype")==="tooltip"&&this.childNodes[1]&&this.childNodes[1].setTeXclass(null);let 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,i,r){var s,n;if(this.attributes.get("actiontype").toLowerCase()!=="tooltip"){super.setChildInheritedAttributes(t,e,i,r);return}(s=this.childNodes[0])==null||s.setInheritedAttributes(t,e,i,r),(n=this.childNodes[1])==null||n.setInheritedAttributes(t,!1,1,!1)}};$a.defaults=Object.assign(Object.assign({},At.defaults),{actiontype:"toggle",selection:1});var Ji=class extends li{get kind(){return"msubsup"}get arity(){return 3}get base(){return 0}get sub(){return 1}get sup(){return 2}setChildInheritedAttributes(t,e,i,r){let s=this.childNodes;s[0].setInheritedAttributes(t,e,i,r),s[1].setInheritedAttributes(t,!1,i+1,r||this.sub===1),s[2]&&s[2].setInheritedAttributes(t,!1,i+1,r||this.sub===2)}};Ji.defaults=Object.assign(Object.assign({},li.defaults),{subscriptshift:"",superscriptshift:""});var Ka=class extends Ji{get kind(){return"msub"}get arity(){return 2}};Ka.defaults=Object.assign({},Ji.defaults);var Ja=class extends Ji{get kind(){return"msup"}get arity(){return 2}get sup(){return 1}get sub(){return 2}};Ja.defaults=Object.assign({},Ji.defaults);var Sr=class extends li{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,i,r){let s=this.childNodes;s[0].setInheritedAttributes(t,e,i,r||!!s[this.over]);let n=!!(!e&&s[0].coreMO().attributes.get("movablelimits")),a=this.constructor.ACCENTS;s[1].setInheritedAttributes(t,!1,this.getScriptlevel(a[1],n,i),r||this.under===1),this.setInheritedAccent(1,a[1],e,i,r,n),s[2]&&(s[2].setInheritedAttributes(t,!1,this.getScriptlevel(a[2],n,i),r||this.under===2),this.setInheritedAccent(2,a[2],e,i,r,n))}getScriptlevel(t,e,i){return(e||!this.attributes.get(t))&&i++,i}setInheritedAccent(t,e,i,r,s,n){let a=this.childNodes[t];if(!this.attributes.hasExplicit(e)&&a.isEmbellished){let o=a.coreMO().attributes.get("accent");this.attributes.setInherited(e,o),o!==this.attributes.getDefault(e)&&a.setInheritedAttributes({},i,this.getScriptlevel(e,n,r),s)}}};Sr.defaults=Object.assign(Object.assign({},li.defaults),{accent:!1,accentunder:!1,align:"center"}),Sr.ACCENTS=["","accentunder","accent"];var Ya=class extends Sr{get kind(){return"munder"}get arity(){return 2}};Ya.defaults=Object.assign({},Sr.defaults);var Bn=class extends Sr{get kind(){return"mover"}get arity(){return 2}get over(){return 1}get under(){return 2}};Bn.defaults=Object.assign({},Sr.defaults),Bn.ACCENTS=["","accent","accentunder"];var Za=class extends Ji{get kind(){return"mmultiscripts"}get arity(){return 1}setChildInheritedAttributes(t,e,i,r){this.childNodes[0].setInheritedAttributes(t,e,i,r);let s=!1;for(let n=1,a=0;n<this.childNodes.length;n++){let o=this.childNodes[n];if(o.isKind("mprescripts")){if(!s&&(s=!0,n%2==0)){let h=this.factory.create("none");this.childNodes.splice(n,0,h),h.parent=this,n++}}else{let h=r||a%2==0;o.setInheritedAttributes(t,!1,i+1,h),a++}}this.childNodes.length%2==+!!s&&(this.appendChild(this.factory.create("none")),this.childNodes[this.childNodes.length-1].setInheritedAttributes(t,!1,i+1,r))}verifyChildren(t){let e=!1,i=t.fixMmultiscripts;for(let r=0;r<this.childNodes.length;r++){let s=this.childNodes[r];s.isKind("mprescripts")&&(e?s.mError(s.kind+" can only appear once in "+this.kind,t,!0):(e=!0,r%2==0&&!i&&this.mError("There must be an equal number of prescripts of each type",t)))}this.childNodes.length%2==+!!e&&!i&&this.mError("There must be an equal number of scripts of each type",t),super.verifyChildren(t)}};Za.defaults=Object.assign({},Ji.defaults);var vl=class extends At{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)}};vl.defaults=Object.assign({},At.defaults);var Tl=class extends At{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)}};Tl.defaults=Object.assign({},At.defaults);var Qa=class extends At{constructor(){super(...arguments),this.properties={useHeight:!0},this.texclass=L.ORD}get kind(){return"mtable"}get linebreakContainer(){return!0}get linebreakAlign(){return""}setInheritedAttributes(t,e,i,r){for(let s of Gm)t[s]&&this.attributes.setInherited(s,t[s][1]),this.attributes.hasExplicit(s)&&this.attributes.unset(s);super.setInheritedAttributes(t,e,i,r)}setChildInheritedAttributes(t,e,i,r){for(let a of this.childNodes)a.isKind("mtr")||this.replaceChild(this.factory.create("mtr"),a).appendChild(a);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")});let s=this.attributes.getExplicit("data-cramped"),n=ji(this.attributes.get("rowalign"));for(let a of this.childNodes)t.rowalign[1]=n.shift()||t.rowalign[1],a.setInheritedAttributes(t,e,i,!!s)}verifyChildren(t){let e=null,i=this.factory;for(let r=0;r<this.childNodes.length;r++){let s=this.childNodes[r];if(s.isKind("mtr"))e=null;else{let n=s.isKind("mtd");if(e?(this.removeChild(s),r--):e=this.replaceChild(i.create("mtr"),s),e.appendChild(n?s:i.create("mtd",{},[s])),!t.fixMtables){s.parent.removeChild(s),s.parent=this,n&&e.appendChild(i.create("mtd"));let a=s.mError("Children of "+this.kind+" must be mtr or mlabeledtr",t,n);e.childNodes[e.childNodes.length-1].appendChild(a)}}}super.verifyChildren(t)}setTeXclass(t){this.getPrevClass(t);for(let e of this.childNodes)e.setTeXclass(null);return this}};Qa.defaults=Object.assign(Object.assign({},At.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"});var Fn=class extends At{get kind(){return"mtr"}get linebreakContainer(){return!0}get linebreakAlign(){return""}setChildInheritedAttributes(t,e,i,r){for(let a of this.childNodes)a.isKind("mtd")||this.replaceChild(this.factory.create("mtd"),a).appendChild(a);let s=ji(this.attributes.get("columnalign")),n=ji(this.attributes.get("data-break-align"));this.arity===1&&(s.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(let a of this.childNodes)t.columnalign[1]=s.shift()||t.columnalign[1],t["data-vertical-align"]=[this.kind,n.shift()||t["data-break-align"][1]],a.setInheritedAttributes(t,e,i,r)}verifyChildren(t){if(this.parent&&!this.parent.isKind("mtable")){this.mError(this.kind+" can only be a child of an mtable",t,!0);return}for(let e of this.childNodes)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)}setTeXclass(t){this.getPrevClass(t);for(let e of this.childNodes)e.setTeXclass(null);return this}};Fn.defaults=Object.assign(Object.assign({},At.defaults),{rowalign:Ve,columnalign:Ve,groupalign:Ve,"data-break-align":"top"});var Cl=class extends Fn{get kind(){return"mlabeledtr"}get arity(){return 1}},to=class extends li{get kind(){return"mtd"}get arity(){return-1}get linebreakContainer(){return!0}get linebreakAlign(){return"columnalign"}verifyChildren(t){if(this.parent&&!this.parent.isKind("mtr")){this.mError(this.kind+" can only be a child of an mtr or mlabeledtr",t,!0);return}super.verifyChildren(t)}setTeXclass(t){return this.getPrevClass(t),this.childNodes[0].setTeXclass(null),this}};to.defaults=Object.assign(Object.assign({},li.defaults),{rowspan:1,columnspan:1,rowalign:Ve,columnalign:Ve,groupalign:Ve,"data-vertical-align":"top"});var Sl=class extends Ui{get kind(){return"maligngroup"}get isSpacelike(){return!0}setChildInheritedAttributes(t,e,i,r){t=this.addInheritedAttributes(t,this.attributes.getAllAttributes()),super.setChildInheritedAttributes(t,e,i,r)}};Sl.defaults=Object.assign(Object.assign({},Ui.defaults),{groupalign:Ve});var Al=class extends At{get kind(){return"malignmark"}get arity(){return 0}get isSpacelike(){return!0}};Al.defaults=Object.assign(Object.assign({},At.defaults),{edge:"left"});var eo=class extends oi{constructor(){super(...arguments),this.texclass=L.ORD}get kind(){return"mglyph"}verifyAttributes(t){let{src:e,fontfamily:i,index:r}=this.attributes.getList("src","fontfamily","index");e===""&&(i===""||r==="")?this.mError("mglyph must have either src or fontfamily and index attributes",t,!0):super.verifyAttributes(t)}};eo.defaults=Object.assign(Object.assign({},oi.defaults),{alt:"",src:"",index:"",width:"auto",height:"auto",valign:"0em"});var io=class extends li{get kind(){return"semantics"}get arity(){return 1}get notParent(){return!0}};io.defaults=Object.assign(Object.assign({},li.defaults),{definitionUrl:null,encoding:null});var Vs=class extends At{get kind(){return"annotation-xml"}setChildInheritedAttributes(){}};Vs.defaults=Object.assign(Object.assign({},At.defaults),{definitionUrl:null,encoding:null,cd:"mathmlkeys",name:"",src:null});var ro=class extends Vs{constructor(){super(...arguments),this.properties={isChars:!0}}get kind(){return"annotation"}};ro.defaults=Object.assign({},Vs.defaults);var _n=class extends li{get kind(){return"TeXAtom"}get arity(){return-1}get notParent(){return!0}constructor(t,e,i){super(t,e,i),this.texclass=L.ORD,this.setProperty("texClass",this.texClass)}setTeXclass(t){return this.childNodes[0].setTeXclass(null),this.adjustTeXclass(t)}adjustTeXclass(t){return t}};_n.defaults=Object.assign({},li.defaults),_n.prototype.adjustTeXclass=ri.prototype.adjustTeXclass;var Ll=class extends li{get kind(){return"MathChoice"}get arity(){return 4}get notParent(){return!0}setInheritedAttributes(t,e,i,r){let s=e?0:Math.max(0,Math.min(i,2))+1,n=this.childNodes[s]||this.factory.create("mrow");this.parent.replaceChild(n,this),n.setInheritedAttributes(t,e,i,r)}};Ll.defaults=Object.assign({},li.defaults);var Rl=class extends Fa{get kind(){return"html"}getHTML(){return this.getXML()}setHTML(t,e=null){try{e.getAttribute(t,"data-mjx-hdw")}catch{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(){let t=this.adaptor.kind(this.xml);return`HTML=<${t}>...</${t}>`}verifyTree(t){if(this.parent&&!this.parent.isToken){this.mError("HTML can only be a child of a token element",t,!0);return}}},Qm={[_a.prototype.kind]:_a,[ms.prototype.kind]:ms,[ja.prototype.kind]:ja,[ri.prototype.kind]:ri,[Dn.prototype.kind]:Dn,[Pn.prototype.kind]:Pn,[Ua.prototype.kind]:Ua,[Gs.prototype.kind]:Gs,[Ha.prototype.kind]:Ha,[Wa.prototype.kind]:Wa,[za.prototype.kind]:za,[qa.prototype.kind]:qa,[yl.prototype.kind]:yl,[xl.prototype.kind]:xl,[Ga.prototype.kind]:Ga,[Nl.prototype.kind]:Nl,[Va.prototype.kind]:Va,[Xa.prototype.kind]:Xa,[$a.prototype.kind]:$a,[Ka.prototype.kind]:Ka,[Ja.prototype.kind]:Ja,[Ji.prototype.kind]:Ji,[Ya.prototype.kind]:Ya,[Bn.prototype.kind]:Bn,[Sr.prototype.kind]:Sr,[Za.prototype.kind]:Za,[vl.prototype.kind]:vl,[Tl.prototype.kind]:Tl,[Qa.prototype.kind]:Qa,[Cl.prototype.kind]:Cl,[Fn.prototype.kind]:Fn,[to.prototype.kind]:to,[Sl.prototype.kind]:Sl,[Al.prototype.kind]:Al,[eo.prototype.kind]:eo,[io.prototype.kind]:io,[ro.prototype.kind]:ro,[Vs.prototype.kind]:Vs,[_n.prototype.kind]:_n,[Ll.prototype.kind]:Ll,[qs.prototype.kind]:qs,[Fa.prototype.kind]:Fa,[Rl.prototype.kind]:Rl},kh=class extends Vm{get MML(){return this.node}};kh.defaultNodes=Qm;var qu=class Gu{static methodName(e){return"visit"+(e.charAt(0).toUpperCase()+e.substring(1)).replace(/[^a-z0-9_]/gi,"_")+"Node"}constructor(e){this.nodeHandlers=new Map;for(let i of e.getKinds()){let r=this[Gu.methodName(i)];r&&this.nodeHandlers.set(i,r)}}visitTree(e,...i){return this.visitNode(e,...i)}visitNode(e,...i){return(this.nodeHandlers.get(e.kind)||this.visitDefault).call(this,e,...i)}visitDefault(e,...i){if("childNodes"in e)for(let r of e.childNodes)this.visitNode(r,...i)}setNodeHandler(e,i){this.nodeHandlers.set(e,i)}removeNodeHandler(e){this.nodeHandlers.delete(e)}},t0="data-mjx-",Sa=class extends qu{constructor(t=null){t||(t=new kh),super(t)}visitTextNode(t,...e){}visitXMLNode(t,...e){}visitHtmlNode(t,...e){}getKind(t){let e=t.kind;return zs(e,this.constructor.rename,e)}getAttributeList(t){let e=this.constructor,i=zs(t.kind,e.defaultAttributes,{}),r=Object.assign({},i,this.getDataAttributes(t),t.attributes.getAllAttributes()),s=e.variants;return Object.hasOwn(r,"mathvariant")&&(Object.hasOwn(s,r.mathvariant)?r.mathvariant=s[r.mathvariant]:t.getProperty("ignore-variant")&&delete r.mathvariant),r}getDataAttributes(t){let e={},i=t.attributes.getExplicit("mathvariant"),r=this.constructor.variants;i&&(t.getProperty("ignore-variant")||Object.hasOwn(r,i))&&this.setDataAttribute(e,"variant",i),t.getProperty("variantForm")&&this.setDataAttribute(e,"alternate","1"),t.getProperty("pseudoscript")&&this.setDataAttribute(e,"pseudoscript","true"),t.getProperty("autoOP")===!1&&this.setDataAttribute(e,"auto-op","false");let s=t.getProperty("vbox");s&&this.setDataAttribute(e,"vbox",s);let n=t.getProperty("scriptalign");n&&this.setDataAttribute(e,"script-align",n);let a=t.getProperty("mathaccent");a!==void 0&&(a&&!t.isMathAccent()||!a&&!t.isMathAccentWithWidth())&&this.setDataAttribute(e,"mathaccent",a.toString());let o=t.getProperty("texClass");if(o!==void 0){let h=!0;if(o===L.OP&&t.isKind("mi")){let d=t.getText();h=!(d.length>1&&d.match(ms.operatorName))}h&&this.setDataAttribute(e,"texclass",o<0?"NONE":Uu[o])}return t.getProperty("smallmatrix")&&this.setDataAttribute(e,"smallmatrix","true"),e}setDataAttribute(t,e,i){t[t0+e]=i}};Sa.rename={TeXAtom:"mrow"},Sa.variants={"-tex-calligraphic":"script","-tex-bold-calligraphic":"bold-script","-tex-oldstyle":"normal","-tex-bold-oldstyle":"bold","-tex-mathit":"italic"},Sa.defaultAttributes={math:{xmlns:"http://www.w3.org/1998/Math/MathML"}};var Lo=class extends Sa{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){let i=[];for(let r of t.childNodes)i.push(this.visitNode(r,e));return i.join(`
9
+ `)}visitAnnotationNode(t,e){let i=this.childNodeMml(t,"","");return`${e}<annotation${this.getAttributes(t)}>${i}</annotation>`}visitDefault(t,e){let i=this.getKind(t),[r,s]=t.isToken||t.childNodes.length===0?["",""]:[`
10
+ `,e],n=this.childNodeMml(t,e+" ",r),a=n.match(/\S/)?r+n+s:"";return`${e}<${i}${this.getAttributes(t)}>${a}</${i}>`}childNodeMml(t,e,i){let r="";for(let s of t.childNodes)r+=this.visitNode(s,e)+i;return r}getAttributes(t){let e=[],i=this.getAttributeList(t);for(let r of Object.keys(i)){let s=String(i[r]);s!==void 0&&e.push(r+'="'+this.quoteHTML(s)+'"')}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 Zm(t)}},e0=wh({AssistiveMmlHandler:()=>Ku,AssistiveMmlMathDocumentMixin:()=>$u,AssistiveMmlMathItemMixin:()=>Xu,LimitedMmlVisitor:()=>Vu}),Vu=class extends Lo{getAttributes(t){return super.getAttributes(t).replace(/ ?id=".*?"/,"")}};Js("ASSISTIVEMML",153);function Xu(t){return class extends t{assistiveMml(e,i=!1){if(!(this.state()>=z.ASSISTIVEMML)){if(!this.isEscaped&&(e.options.enableAssistiveMml||i)){let r=e.adaptor,s=e.toMML(this.root).replace(/\n */g,"").replace(/<!--.*?-->/g,""),n=r.firstChild(r.body(r.parse(s,"text/html"))),a=r.node("mjx-assistive-mml",{unselectable:"on",display:this.display?"block":"inline"},[n]);for(let o of r.childNodes(this.typesetRoot))r.setAttribute(o,"aria-hidden","true");r.setStyle(this.typesetRoot,"position","relative"),r.append(this.typesetRoot,a)}this.state(z.ASSISTIVEMML)}}}}function $u(t){var e=class extends t{constructor(...i){super(...i);let r=this.constructor,s=r.ProcessBits;s.has("assistive-mml")||s.allocate("assistive-mml"),this.visitor=new Vu(this.mmlFactory),this.options.MathItem=Xu(this.options.MathItem),"addStyles"in this&&this.addStyles(r.assistiveStyles)}toMML(i){return this.visitor.visitTree(i)}assistiveMml(){if(!this.processed.isSet("assistive-mml")){for(let i of this.math)i.assistiveMml(this);this.processed.set("assistive-mml")}return this}state(i,r=!1){return super.state(i,r),i<z.ASSISTIVEMML&&this.processed.clear("assistive-mml"),this}};return e.OPTIONS=Object.assign(Object.assign({},t.OPTIONS),{enableAssistiveMml:!0,renderActions:qe(Object.assign(Object.assign({},t.OPTIONS.renderActions),{assistiveMml:[z.ASSISTIVEMML]}))}),e.assistiveStyles={"mjx-assistive-mml":{position:"absolute !important",top:"0px",left:"0px",bottom:"0px",right:"0px",clip:"rect(1px, 1px, 1px, 1px)","clip-path":"polygon(0 0, 0 1px, 1px 1px, 1px 0)",padding:"1px 0px 0px 0px !important",border:"0px !important",display:"block !important",width:"auto !important",overflow:"hidden !important","text-indent":"0px ! important","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},'mjx-assistive-mml[display="block"]':{width:"100% !important"}},e}function Ku(t){return t.documentClass=$u(t.documentClass),t}var Oe;(function(t){t.DOMAIN="domain",t.STYLE="style",t.LOCALE="locale",t.TOPIC="topic",t.MODALITY="modality"})(Oe||(Oe={}));var jn=class Ju{static createProp(...e){let i=Le.DEFAULT_ORDER,r={};for(let s=0,n=e.length,a=i.length;s<n&&s<a;s++)r[i[s]]=e[s];return new Ju(r)}constructor(e,i=Object.keys(e)){this.properties=e,this.order=i}getProperties(){return this.properties}getOrder(){return this.order}getAxes(){return this.order}getProperty(e){return this.properties[e]}updateProperties(e){this.properties=e}allProperties(){let e=[];return this.order.forEach(i=>e.push(this.getProperty(i).slice())),e}toString(){let e=[];return this.order.forEach(i=>e.push(i+": "+this.getProperty(i).toString())),e.join(`
11
+ `)}},Le=class is extends jn{static createCstr(...e){let i=is.DEFAULT_ORDER,r={};for(let s=0,n=e.length,a=i.length;s<n&&s<a;s++)r[i[s]]=e[s];return new is(r)}static defaultCstr(){return is.createCstr.apply(null,is.DEFAULT_ORDER.map(function(e){return is.DEFAULT_VALUES[e]}))}static validOrder(e){let i=is.DEFAULT_ORDER.slice();return e.every(r=>{let s=i.indexOf(r);return s!==-1&&i.splice(s,1)})}constructor(e,i){let r={};for(let[s,n]of Object.entries(e))r[s]=[n];super(r,i),this.components=e}getComponents(){return this.components}getValue(e){return this.components[e]}getValues(){return this.order.map(e=>this.getValue(e))}allProperties(){let e=super.allProperties();for(let i=0,r,s;r=e[i],s=this.order[i];i++){let n=this.getValue(s);r.indexOf(n)===-1&&r.unshift(n)}return e}toString(){return this.getValues().join(".")}equal(e){let i=e.getAxes();if(this.order.length!==i.length)return!1;for(let r=0,s;s=i[r];r++){let n=this.getValue(s);if(!n||e.getValue(s)!==n)return!1}return!0}};Le.DEFAULT_ORDER=[Oe.LOCALE,Oe.MODALITY,Oe.DOMAIN,Oe.STYLE,Oe.TOPIC],Le.BASE_LOCALE="base",Le.DEFAULT_VALUE="default",Le.DEFAULT_VALUES={[Oe.LOCALE]:"en",[Oe.DOMAIN]:Le.DEFAULT_VALUE,[Oe.STYLE]:Le.DEFAULT_VALUE,[Oe.TOPIC]:Le.DEFAULT_VALUE,[Oe.MODALITY]:"speech"};var i0=class{constructor(t){this.order=t}parse(t){let e=t.split("."),i={};if(e.length>this.order.length)throw Error("Invalid dynamic constraint: "+i);let r=0;for(let s=0,n;n=this.order[s],e.length;s++,r++)i[n]=e.shift();return new Le(i,this.order.slice(0,r))}},r0=class{constructor(t,e=new jn(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 jn(t.getProperties(),t.getOrder()),this.order=this.reference.getOrder()}match(t){let e=t.getAxes();return e.length===this.reference.getAxes().length&&e.every(i=>{let r=t.getValue(i);return r===this.reference.getValue(i)||this.fallback.getProperty(i).indexOf(r)!==-1})}compare(t,e){let i=!1;for(let r=0,s;s=this.order[r];r++){let n=t.getValue(s),a=e.getValue(s);if(!i){let p=this.reference.getValue(s);if(p===n&&p!==a)return-1;if(p===a&&p!==n)return 1;if(p===n&&p===a)continue;p!==n&&p!==a&&(i=!0)}let o=this.fallback.getProperty(s),h=o.indexOf(n),d=o.indexOf(a);if(h<d)return-1;if(d<h)return 1}return 0}toString(){return this.reference.toString()+`
12
+ `+this.fallback.toString()}},Un;(function(t){t.SYNC="sync",t.ASYNC="async",t.HTTP="http"})(Un||(Un={}));var Kr;(function(t){t.PITCH="pitch",t.RATE="rate",t.VOLUME="volume",t.PAUSE="pause",t.JOIN="join",t.LAYOUT="layout"})(Kr||(Kr={})),Kr.PITCH,Kr.RATE,Kr.VOLUME,Kr.PAUSE,Kr.JOIN;var wl;(function(t){t.NONE="none",t.SHALLOW="shallow",t.DEEP="deep"})(wl||(wl={}));var Il;(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"})(Il||(Il={}));var so,Yu=_m((()=>{so={}}));Yu();var mr=class kl{static ensureLocale(e,i){return kl.LOCALES.get(e)?e:(console.error(`Locale ${e} does not exist! Using ${kl.LOCALES.get(i)} instead.`),i)}};mr.VERSION="5.0.0-rc.4",mr.LOCALES=new Map([["af","Afrikaans"],["ca","Catalan"],["da","Danish"],["de","German"],["en","English"],["es","Spanish"],["euro","Euro"],["fr","French"],["hi","Hindi"],["it","Italian"],["ko","Korean"],["nb","Bokmål"],["nn","Nynorsk"],["sv","Swedish"],["nemeth","Nemeth"]]),mr.mathjaxVersion="4.1.2",mr.url="https://cdn.jsdelivr.net/npm/speech-rule-engine@"+mr.VERSION+"/lib/mathmaps";var Ys=Lr((t=>{function e(nt,xt,jt){if(jt===void 0&&(jt=Array.prototype),nt&&typeof jt.find=="function")return jt.find.call(nt,xt);for(var Ft=0;Ft<nt.length;Ft++)if(r(nt,Ft)){var He=nt[Ft];if(xt.call(void 0,He,Ft,nt))return He}}function i(nt,xt){return xt===void 0&&(xt=Object),xt&&typeof xt.getOwnPropertyDescriptors=="function"&&(nt=xt.create(null,xt.getOwnPropertyDescriptors(nt))),xt&&typeof xt.freeze=="function"?xt.freeze(nt):nt}function r(nt,xt){return Object.prototype.hasOwnProperty.call(nt,xt)}function s(nt,xt){if(typeof nt!="object"||!nt)throw TypeError("target is not an object");for(var jt in xt)r(xt,jt)&&(nt[jt]=xt[jt]);return nt}var n=i({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});function a(nt){return r(n,nt.toLowerCase())}var o=i({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});function h(nt){return r(o,nt.toLowerCase())}var d=i({script:!1,style:!1,textarea:!0,title:!0});function p(nt){var xt=nt.toLowerCase();return r(d,xt)&&!d[xt]}function E(nt){var xt=nt.toLowerCase();return r(d,xt)&&d[xt]}function y(nt){return nt===w.HTML}function A(nt){return y(nt)||nt===w.XML_XHTML_APPLICATION}var w=i({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),_=Object.keys(w).map(function(nt){return w[nt]});function U(nt){return _.indexOf(nt)>-1}var vt=i({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/"});t.assign=s,t.find=e,t.freeze=i,t.HTML_BOOLEAN_ATTRIBUTES=n,t.HTML_RAW_TEXT_ELEMENTS=d,t.HTML_VOID_ELEMENTS=o,t.hasDefaultHTMLNamespace=A,t.hasOwn=r,t.isHTMLBooleanAttribute=a,t.isHTMLRawTextElement=p,t.isHTMLEscapableRawTextElement=E,t.isHTMLMimeType=y,t.isHTMLVoidElement=h,t.isValidMimeType=U,t.MIME_TYPE=w,t.NAMESPACE=vt})),Ro=Lr((t=>{var e=Ys();function i(A,w){A.prototype=Object.create(Error.prototype,{constructor:{value:A},name:{value:A.name,enumerable:!0,writable:w}})}var r=e.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"}),s=Object.keys(r);function n(A){return typeof A=="number"&&A>=1&&A<=25}function a(A){return typeof A=="string"&&A.substring(A.length-r.Error.length)===r.Error}function o(A,w){n(A)?(this.name=s[A],this.message=w||""):(this.message=A,this.name=a(w)?w:r.Error),Error.captureStackTrace&&Error.captureStackTrace(this,o)}i(o,!0),Object.defineProperties(o.prototype,{code:{enumerable:!0,get:function(){var A=s.indexOf(this.name);return n(A)?A:0}}});for(var h={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},d=Object.entries(h),p=0;p<d.length;p++){var E=d[p][0];o[E]=d[p][1]}function y(A,w,_){this.message=A,this.locator=w,this.cause=_,Error.captureStackTrace&&Error.captureStackTrace(this,y)}i(y),t.DOMException=o,t.DOMExceptionName=r,t.ExceptionCode=h,t.ParseError=y})),Zu=Lr((t=>{function e(Kt){try{typeof Kt!="function"&&(Kt=RegExp);var ye=new Kt("𝌆","u").exec("𝌆");return!!ye&&ye[0].length===2}catch{}return!1}var i=e();function r(Kt){if(Kt.source[0]!=="[")throw Error(Kt+" can not be used with chars");return Kt.source.slice(1,Kt.source.lastIndexOf("]"))}function s(Kt,ye){if(Kt.source[0]!=="[")throw Error("/"+Kt.source+"/ can not be used with chars_without");if(!ye||typeof ye!="string")throw Error(JSON.stringify(ye)+" is not a valid search");if(Kt.source.indexOf(ye)===-1)throw Error('"'+ye+'" is not is /'+Kt.source+"/");if(ye==="-"&&Kt.source.indexOf(ye)!==1)throw Error('"'+ye+'" is not at the first postion of /'+Kt.source+"/");return new RegExp(Kt.source.replace(ye,""),i?"u":"")}function n(Kt){var ye=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(te){var zi=typeof te=="string";if(zi&&ye===void 0&&te==="|")throw Error("use regg instead of reg to wrap expressions with `|`!");return zi?te:te.source}).join(""),i?"u":"")}function a(Kt){if(arguments.length===0)throw Error("no parameters provided");return n.apply(a,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var o="�",h=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;i&&(h=n("[",r(h),"\\u{10000}-\\u{10FFFF}","]"));var d=RegExp("[^"+r(h)+"]",i?"u":""),p=/[\x20\x09\x0D\x0A]/,E=r(p),y=n(p,"+"),A=n(p,"*"),w=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;i&&(w=n("[",r(w),"\\u{10000}-\\u{10FFFF}","]"));var _=n("[",r(w),r(/[-.0-9\xB7]/),r(/[\u0300-\u036F\u203F-\u2040]/),"]"),U=n(w,_,"*"),vt=n("^",U,"$"),nt=n(_,"+"),xt=a(n("&",U,";"),"|",a(/&#[0-9]+;|&#x[0-9a-fA-F]+;/)),jt=n("%",U,";"),Ft=a(n('"',a(/[^%&"]/,"|",jt,"|",xt),"*",'"'),"|",n("'",a(/[^%&']/,"|",jt,"|",xt),"*","'")),He=a('"',a(/[^<&"]/,"|",xt),"*",'"',"|","'",a(/[^<&']/,"|",xt),"*","'"),H=n(s(w,":"),s(_,":"),"*"),pt=n("^",H,"$"),ft=n(H,a(":",H),"?"),Dt=n("^",ft,"$"),oe=n("(",ft,")"),$t=a(/"[^"]*"|'[^']*'/),hi=n(/^<\?/,"(",U,")",a(y,"(?!",p,")(",h,"*?)"),"?",/\?>/),Ee=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,$e=a('"',Ee,'*"',"|","'",s(Ee,"'"),"*'"),P="<!--",$="-->",at=n(P,a(s(h,"-"),"|",n("-",s(h,"-"))),"*",$),ot="#PCDATA",dt=a("EMPTY","|","ANY","|",a(n(/\(/,A,ot,a(A,/\|/,A,ft),"*",A,/\)\*/),"|",n(/\(/,A,ot,A,/\)/)),"|",n(/\([^>]+\)/,/[?*+]?/)),X=n("<!ELEMENT",y,a(ft,"|",jt),y,a(dt,"|",jt),A,">"),Q=n("<!ATTLIST",y,U,a(y,U,y,a(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",a(n("NOTATION",y,/\(/,A,U,a(A,/\|/,A,U),"*",A,/\)/),"|",n(/\(/,A,nt,a(A,/\|/,A,nt),"*",A,/\)/))),y,a(/#REQUIRED|#IMPLIED/,"|",a(a("#FIXED",y),"?",He))),"*",A,">"),It="about:legacy-compat",gt=a('"'+It+'"',"|","'"+It+"'"),Y="SYSTEM",V="PUBLIC",ut=a(a(Y,y,$t),"|",a(V,y,$e,y,$t)),wt=n("^",a(a(Y,y,"(?<SystemLiteralOnly>",$t,")"),"|",a(V,y,"(?<PubidLiteral>",$e,")",y,"(?<SystemLiteral>",$t,")"))),Fe=n("^",$e,"$"),Ke=n("^",$t,"$"),ti=a(Ft,"|",a(ut,a(y,"NDATA",y,U),"?")),ke="<!ENTITY",Se=a(n(ke,y,U,y,ti,A,">"),"|",n(ke,y,"%",y,U,y,a(Ft,"|",ut),A,">")),Wi=n("<!NOTATION",y,U,y,a(ut,"|",n(V,y,$e)),A,">"),Ci=n(A,"=",A),bi=/1[.]\d+/,Tt=n(y,"version",Ci,a("'",bi,"'","|",'"',bi,'"')),Si=/[A-Za-z][-A-Za-z0-9._]*/,Ct=n(/^<\?xml/,Tt,a(y,"encoding",Ci,a('"',Si,'"',"|","'",Si,"'")),"?",a(y,"standalone",Ci,a("'",a("yes","|","no"),"'","|",'"',a("yes","|","no"),'"')),"?",A,/\?>/),le="<!DOCTYPE",Pe="<![CDATA[",Yi="]]>",Gt=n(/<!\[CDATA\[/,n(h,"*?",/\]\]>/));t.chars=r,t.chars_without=s,t.detectUnicodeSupport=e,t.reg=n,t.regg=a,t.ABOUT_LEGACY_COMPAT=It,t.ABOUT_LEGACY_COMPAT_SystemLiteral=gt,t.AttlistDecl=Q,t.CDATA_START=Pe,t.CDATA_END=Yi,t.CDSect=Gt,t.Char=h,t.Comment=at,t.COMMENT_START=P,t.COMMENT_END=$,t.DOCTYPE_DECL_START=le,t.elementdecl=X,t.EntityDecl=Se,t.EntityValue=Ft,t.ExternalID=ut,t.ExternalID_match=wt,t.Name=U,t.Name_exact=vt,t.NCName_exact=pt,t.NotationDecl=Wi,t.Reference=xt,t.PEReference=jt,t.PI=hi,t.PUBLIC=V,t.PubidLiteral=$e,t.PubidLiteral_match=Fe,t.QName=ft,t.QName_exact=Dt,t.QName_group=oe,t.S=y,t.SChar_s=E,t.S_OPT=A,t.SYSTEM=Y,t.SystemLiteral=$t,t.SystemLiteral_match=Ke,t.InvalidChar=d,t.UNICODE_REPLACEMENT_CHARACTER=o,t.UNICODE_SUPPORT=i,t.XMLDecl=Ct})),Qu=Lr((t=>{var e=Ys(),i=e.find,r=e.hasDefaultHTMLNamespace,s=e.hasOwn,n=e.isHTMLMimeType,a=e.isHTMLRawTextElement,o=e.isHTMLVoidElement,h=e.MIME_TYPE,d=e.NAMESPACE,p=Symbol(),E=Ro(),y=E.DOMException,A=E.DOMExceptionName,w=Zu();function _(m){if(m!==p)throw TypeError("Illegal constructor")}function U(m){return m!==""}function vt(m){return m?m.split(/[\t\n\f\r ]+/).filter(U):[]}function nt(m,b){return s(m,b)||(m[b]=!0),m}function xt(m){if(!m)return[];var b=vt(m);return Object.keys(b.reduce(nt,{}))}function jt(m){return function(b){return m&&m.indexOf(b)!==-1}}function Ft(m){if(!w.QName_exact.test(m))throw new y(y.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+m+'"')}function He(m,b){Ft(b),m||(m=null);var T=null,R=b;if(b.indexOf(":")>=0){var O=b.split(":");T=O[0],R=O[1]}if(T!==null&&m===null)throw new y(y.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(T==="xml"&&m!==e.NAMESPACE.XML)throw new y(y.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((T==="xmlns"||b==="xmlns")&&m!==e.NAMESPACE.XMLNS)throw new y(y.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(m===e.NAMESPACE.XMLNS&&T!=="xmlns"&&b!=="xmlns")throw new y(y.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[m,T,R]}function H(m,b){for(var T in m)s(m,T)&&(b[T]=m[T])}function pt(m,b){var T=m.prototype;if(!(T instanceof b)){let R=function(){};R.prototype=b.prototype,R=new R,H(T,R),m.prototype=T=R}T.constructor!=m&&(typeof m!="function"&&console.error("unknown Class:"+m),T.constructor=m)}var ft={},Dt=ft.ELEMENT_NODE=1,oe=ft.ATTRIBUTE_NODE=2,$t=ft.TEXT_NODE=3,hi=ft.CDATA_SECTION_NODE=4,Ee=ft.ENTITY_REFERENCE_NODE=5,$e=ft.ENTITY_NODE=6,P=ft.PROCESSING_INSTRUCTION_NODE=7,$=ft.COMMENT_NODE=8,at=ft.DOCUMENT_NODE=9,ot=ft.DOCUMENT_TYPE_NODE=10,dt=ft.DOCUMENT_FRAGMENT_NODE=11,X=ft.NOTATION_NODE=12,Q=e.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 It(m,b){if(b.length<m.length)return It(b,m);var T=null;for(var R in m){if(m[R]!==b[R])return T;T=m[R]}return T}function gt(m){return m.guid||(m.guid=Math.random()),m.guid}function Y(){}Y.prototype={length:0,item:function(m){return m>=0&&m<this.length?this[m]:null},toString:function(m){for(var b=typeof m=="function"?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:m}:m?{requireWellFormed:!!m.requireWellFormed,splitCDATASections:m.splitCDATASections!==!1,nodeFilter:m.nodeFilter||null}:{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null},T=[],R=0;R<this.length;R++)tn(this[R],T,null,b);return T.join("")},filter:function(m){return Array.prototype.filter.call(this,m)},indexOf:function(m){return Array.prototype.indexOf.call(this,m)}},Y.prototype[Symbol.iterator]=function(){var m=this,b=0;return{next:function(){return b<m.length?{value:m[b++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function V(m,b){this._node=m,this._refresh=b,ut(this)}function ut(m){var b=m._node._inc||m._node.ownerDocument._inc;if(m._inc!==b){var T=m._refresh(m._node);if(Xr(m,"length",T.length),!m.$$length||T.length<m.$$length)for(var R=T.length;R in m;R++)s(m,R)&&delete m[R];H(T,m),m._inc=b}}V.prototype.item=function(m){return ut(this),this[m]||null},pt(V,Y);function wt(){this._nsIndex=Object.create(null),this._noNsIndex=Object.create(null)}function Fe(m,b){for(var T=0;T<m.length;){if(m[T]===b)return T;T++}}function Ke(m,b,T){if(!b)return m._noNsIndex;var R=m._nsIndex[b];return!R&&T&&(R=m._nsIndex[b]=Object.create(null)),R}function ti(m,b,T){var R=Ke(m,b,!1);return R&&R[T]||null}function ke(m,b){Ke(m,b.namespaceURI,!0)[b.localName]=b}function Se(m,b){var T=Ke(m,b.namespaceURI,!1);T&&delete T[b.localName]}function Wi(m,b,T,R){if(R?b[Fe(b,R)]=T:(b[b.length]=T,b.length++),ke(b,T),m){T.ownerElement=m;var O=m.ownerDocument;O&&(R&&Gt(O,m,R),Yi(O,m,T))}}function Ci(m,b,T){var R=Fe(b,T);if(R>=0){for(var O=b.length-1;R<=O;)b[R]=b[++R];if(b.length=O,Se(b,T),m){var q=m.ownerDocument;q&&Gt(q,m,T),T.ownerElement=null}}}wt.prototype={length:0,item:Y.prototype.item,getNamedItem:function(m){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(m=m.toLowerCase());for(var b=0;b<this.length;){var T=this[b];if(T.nodeName===m)return T;b++}return null},setNamedItem:function(m){var b=m.ownerElement;if(b&&b!==this._ownerElement)throw new y(y.INUSE_ATTRIBUTE_ERR);var T=ti(this,m.namespaceURI,m.localName);return T===m?m:(Wi(this._ownerElement,this,m,T),T)},setNamedItemNS:function(m){return this.setNamedItem(m)},removeNamedItem:function(m){var b=this.getNamedItem(m);if(!b)throw new y(y.NOT_FOUND_ERR,m);return Ci(this._ownerElement,this,b),b},removeNamedItemNS:function(m,b){var T=this.getNamedItemNS(m,b);if(!T)throw new y(y.NOT_FOUND_ERR,m?m+" : "+b:b);return Ci(this._ownerElement,this,T),T},getNamedItemNS:function(m,b){m||(m=null);for(var T=0;T<this.length;){var R=this[T];if(R.localName===b&&R.namespaceURI===m)return R;T++}return null}},wt.prototype[Symbol.iterator]=function(){var m=this,b=0;return{next:function(){return b<m.length?{value:m[b++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function bi(){}bi.prototype={hasFeature:function(m,b){return!0},createDocument:function(m,b,T){var R=h.XML_APPLICATION;m===d.HTML?R=h.XML_XHTML_APPLICATION:m===d.SVG&&(R=h.XML_SVG_IMAGE);var O=new Pe(p,{contentType:R});if(O.implementation=this,O.childNodes=new Y,O.doctype=T||null,T&&O.appendChild(T),b){var q=O.createElementNS(m,b);O.appendChild(q)}return O},createDocumentType:function(m,b,T,R){Ft(m);var O=new Qi(p);return O.name=m,O.nodeName=m,O.publicId=b||"",O.systemId=T||"",O.internalSubset=R||"",O.childNodes=new Y,O},createHTMLDocument:function(m){var b=new Pe(p,{contentType:h.HTML});if(b.implementation=this,b.childNodes=new Y,m!==!1){b.doctype=this.createDocumentType("html"),b.doctype.ownerDocument=b,b.appendChild(b.doctype);var T=b.createElement("html");b.appendChild(T);var R=b.createElement("head");if(T.appendChild(R),typeof m=="string"){var O=b.createElement("title");O.appendChild(b.createTextNode(m)),R.appendChild(O)}T.appendChild(b.createElement("body"))}return b}};function Tt(m){_(m)}Tt.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 m=this.getRootNode();return m&&m.nodeType===m.DOCUMENT_NODE},contains:function(m){if(!m)return!1;var b=m;do{if(this===b)return!0;b=b.parentNode}while(b);return!1},getRootNode:function(m){var b=this;do{if(!b.parentNode)return b;b=b.parentNode}while(b)},isEqualNode:function(m){if(!m)return!1;for(var b=[{node:this,other:m}];b.length>0;){var T=b.pop(),R=T.node,O=T.other;if(R.nodeType!==O.nodeType)return!1;switch(R.nodeType){case R.DOCUMENT_TYPE_NODE:if(R.name!==O.name||R.publicId!==O.publicId||R.systemId!==O.systemId)return!1;break;case R.ELEMENT_NODE:if(R.namespaceURI!==O.namespaceURI||R.prefix!==O.prefix||R.localName!==O.localName||R.attributes.length!==O.attributes.length)return!1;for(var q=0;q<R.attributes.length;q++){var mt=R.attributes.item(q),Jt=O.getAttributeNodeNS(mt.namespaceURI,mt.localName);if(!Jt)return!1;b.push({node:mt,other:Jt})}break;case R.ATTRIBUTE_NODE:if(R.namespaceURI!==O.namespaceURI||R.localName!==O.localName||R.value!==O.value)return!1;break;case R.PROCESSING_INSTRUCTION_NODE:if(R.target!==O.target||R.data!==O.data)return!1;break;case R.TEXT_NODE:case R.CDATA_SECTION_NODE:case R.COMMENT_NODE:if(R.data!==O.data)return!1}if(R.childNodes.length!==O.childNodes.length)return!1;for(var q=R.childNodes.length-1;q>=0;q--)b.push({node:R.childNodes[q],other:O.childNodes[q]})}return!0},isSameNode:function(m){return this===m},insertBefore:function(m,b){return ei(this,m,b)},replaceChild:function(m,b){ei(this,m,b,ci),b&&this.removeChild(b)},removeChild:function(m){return ye(this,m)},appendChild:function(m){return this.insertBefore(m,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(m){return he(this.ownerDocument||this,this,m)},normalize:function(){le(this,null,{enter:function(m){for(var b=m.firstChild;b;){var T=b.nextSibling;if(T!==null&&T.nodeType===$t&&b.nodeType===$t){for(var R=[],O=T;O!==null&&O.nodeType===$t;)R.push(O.data),O=O.nextSibling;for(var q=b.nextSibling;q!==O;){var mt=q.nextSibling;q.parentNode=null,q.previousSibling=null,q.nextSibling=null,q=mt}b.nextSibling=O,O===null?m.lastChild=b:O.previousSibling=b,b.appendData(R.join("")),Kt(m.ownerDocument,m),b=O}else b=T}return!0}})},isSupported:function(m,b){return this.ownerDocument.implementation.hasFeature(m,b)},lookupPrefix:function(m){for(var b=this;b;){var T=b._nsMap;if(T){for(var R in T)if(s(T,R)&&T[R]===m)return R}b=b.nodeType==oe?b.ownerDocument:b.parentNode}return null},lookupNamespaceURI:function(m){for(var b=this;b;){var T=b._nsMap;if(T&&s(T,m))return T[m];b=b.nodeType==oe?b.ownerDocument:b.parentNode}return null},isDefaultNamespace:function(m){return this.lookupPrefix(m)==null},compareDocumentPosition:function(m){if(this===m)return 0;var b=m,T=this,R=null,O=null;if(b instanceof qi&&(R=b,b=R.ownerElement),T instanceof qi&&(O=T,T=O.ownerElement,R&&b&&T===b))for(var q=0,mt;mt=T.attributes[q];q++){if(mt===R)return Q.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+Q.DOCUMENT_POSITION_PRECEDING;if(mt===O)return Q.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+Q.DOCUMENT_POSITION_FOLLOWING}if(!b||!T||T.ownerDocument!==b.ownerDocument)return Q.DOCUMENT_POSITION_DISCONNECTED+Q.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(gt(T.ownerDocument)>gt(b.ownerDocument)?Q.DOCUMENT_POSITION_FOLLOWING:Q.DOCUMENT_POSITION_PRECEDING);if(O&&b===T)return Q.DOCUMENT_POSITION_CONTAINS+Q.DOCUMENT_POSITION_PRECEDING;if(R&&b===T)return Q.DOCUMENT_POSITION_CONTAINED_BY+Q.DOCUMENT_POSITION_FOLLOWING;for(var Jt=[],tt=b.parentNode;tt;){if(!O&&tt===T)return Q.DOCUMENT_POSITION_CONTAINED_BY+Q.DOCUMENT_POSITION_FOLLOWING;Jt.push(tt),tt=tt.parentNode}Jt.reverse();for(var Ye=[],je=T.parentNode;je;){if(!R&&je===b)return Q.DOCUMENT_POSITION_CONTAINS+Q.DOCUMENT_POSITION_PRECEDING;Ye.push(je),je=je.parentNode}Ye.reverse();var Ne=It(Jt,Ye);for(var tr in Ne.childNodes){var Ge=Ne.childNodes[tr];if(Ge===T)return Q.DOCUMENT_POSITION_FOLLOWING;if(Ge===b)return Q.DOCUMENT_POSITION_PRECEDING;if(Ye.indexOf(Ge)>=0)return Q.DOCUMENT_POSITION_FOLLOWING;if(Jt.indexOf(Ge)>=0)return Q.DOCUMENT_POSITION_PRECEDING}return 0}};function Si(m){return m=="<"&&"&lt;"||m==">"&&"&gt;"||m=="&"&&"&amp;"||m=='"'&&"&quot;"||"&#"+m.charCodeAt()+";"}H(ft,Tt),H(ft,Tt.prototype),H(Q,Tt),H(Q,Tt.prototype);function Ct(m,b){le(m,null,{enter:function(T){return!b(T)||le.STOP}})}function le(m,b,T){for(var R=[{node:m,context:b,phase:le.ENTER}];R.length>0;){var O=R.pop();if(O.phase===le.ENTER){var q=T.enter(O.node,O.context);if(q===le.STOP)return le.STOP;if(R.push({node:O.node,context:q,phase:le.EXIT}),q==null)continue;for(var mt=O.node.lastChild;mt;)R.push({node:mt,context:q,phase:le.ENTER}),mt=mt.previousSibling}else T.exit&&T.exit(O.node,O.context)}}le.STOP=Symbol("walkDOM.STOP"),le.ENTER=0,le.EXIT=1;function Pe(m,b){_(m);var T=b||{};this.ownerDocument=this,this.contentType=T.contentType||h.XML_APPLICATION,this.type=n(this.contentType)?"html":"xml"}function Yi(m,b,T){m&&m._inc++,T.namespaceURI===d.XMLNS&&(b._nsMap[T.prefix?T.localName:""]=T.value)}function Gt(m,b,T,R){m&&m._inc++,T.namespaceURI===d.XMLNS&&delete b._nsMap[T.prefix?T.localName:""]}function Kt(m,b,T){if(m&&m._inc){m._inc++;var R=b.childNodes;if(T&&!T.nextSibling)R[R.length++]=T;else{for(var O=b.firstChild,q=0;O;)R[q++]=O,O=O.nextSibling;R.length=q,delete R[R.length]}}}function ye(m,b){if(m!==b.parentNode)throw new y(y.NOT_FOUND_ERR,"child's parent is not parent");var T=b.previousSibling,R=b.nextSibling;return T?T.nextSibling=R:m.firstChild=R,R?R.previousSibling=T:m.lastChild=T,Kt(m.ownerDocument,m),b.parentNode=null,b.previousSibling=null,b.nextSibling=null,b}function te(m){return m&&(m.nodeType===Tt.DOCUMENT_NODE||m.nodeType===Tt.DOCUMENT_FRAGMENT_NODE||m.nodeType===Tt.ELEMENT_NODE)}function zi(m){return m&&(m.nodeType===Tt.CDATA_SECTION_NODE||m.nodeType===Tt.COMMENT_NODE||m.nodeType===Tt.DOCUMENT_FRAGMENT_NODE||m.nodeType===Tt.DOCUMENT_TYPE_NODE||m.nodeType===Tt.ELEMENT_NODE||m.nodeType===Tt.PROCESSING_INSTRUCTION_NODE||m.nodeType===Tt.TEXT_NODE)}function Lt(m){return m&&m.nodeType===Tt.DOCUMENT_TYPE_NODE}function xe(m){return m&&m.nodeType===Tt.ELEMENT_NODE}function Ce(m){return m&&m.nodeType===Tt.TEXT_NODE}function Zi(m,b){var T=m.childNodes||[];if(i(T,xe)||Lt(b))return!1;var R=i(T,Lt);return!(b&&R&&T.indexOf(R)>T.indexOf(b))}function Rr(m,b){var T=m.childNodes||[];function R(q){return xe(q)&&q!==b}if(i(T,R))return!1;var O=i(T,Lt);return!(b&&O&&T.indexOf(O)>T.indexOf(b))}function Et(m,b,T){if(!te(m))throw new y(y.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+m.nodeType);if(T&&T.parentNode!==m)throw new y(y.NOT_FOUND_ERR,"child not in parent");if(!zi(b)||Lt(b)&&m.nodeType!==Tt.DOCUMENT_NODE)throw new y(y.HIERARCHY_REQUEST_ERR,"Unexpected node type "+b.nodeType+" for parent node type "+m.nodeType)}function zt(m,b,T){var R=m.childNodes||[],O=b.childNodes||[];if(b.nodeType===Tt.DOCUMENT_FRAGMENT_NODE){var q=O.filter(xe);if(q.length>1||i(O,Ce))throw new y(y.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(q.length===1&&!Zi(m,T))throw new y(y.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(xe(b)&&!Zi(m,T))throw new y(y.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(Lt(b)){if(i(R,Lt))throw new y(y.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var mt=i(R,xe);if(T&&R.indexOf(mt)<R.indexOf(T))throw new y(y.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!T&&mt)throw new y(y.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function ci(m,b,T){var R=m.childNodes||[],O=b.childNodes||[];if(b.nodeType===Tt.DOCUMENT_FRAGMENT_NODE){var q=O.filter(xe);if(q.length>1||i(O,Ce))throw new y(y.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(q.length===1&&!Rr(m,T))throw new y(y.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(xe(b)&&!Rr(m,T))throw new y(y.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(Lt(b)){if(i(R,function(Jt){return Lt(Jt)&&Jt!==T}))throw new y(y.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var mt=i(R,xe);if(T&&R.indexOf(mt)<R.indexOf(T))throw new y(y.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function ei(m,b,T,R){Et(m,b,T),m.nodeType===Tt.DOCUMENT_NODE&&(R||zt)(m,b,T);var O=b.parentNode;if(O&&O.removeChild(b),b.nodeType===dt){var q=b.firstChild;if(q==null)return b;var mt=b.lastChild}else q=mt=b;var Jt=T?T.previousSibling:m.lastChild;q.previousSibling=Jt,mt.nextSibling=T,Jt?Jt.nextSibling=q:m.firstChild=q,T==null?m.lastChild=mt:T.previousSibling=mt;do q.parentNode=m;while(q!==mt&&(q=q.nextSibling));return Kt(m.ownerDocument||m,m,b),b.nodeType==dt&&(b.firstChild=b.lastChild=null),b}Pe.prototype={implementation:null,nodeName:"#document",nodeType:at,doctype:null,documentElement:null,_inc:1,insertBefore:function(m,b){if(m.nodeType===dt){for(var T=m.firstChild;T;){var R=T.nextSibling;this.insertBefore(T,b),T=R}return m}return ei(this,m,b),m.ownerDocument=this,this.documentElement===null&&m.nodeType===Dt&&(this.documentElement=m),m},removeChild:function(m){var b=ye(this,m);return b===this.documentElement&&(this.documentElement=null),b},replaceChild:function(m,b){ei(this,m,b,ci),m.ownerDocument=this,b&&this.removeChild(b),xe(m)&&(this.documentElement=m)},importNode:function(m,b){return Ae(this,m,b)},getElementById:function(m){var b=null;return Ct(this.documentElement,function(T){if(T.nodeType==Dt&&T.getAttribute("id")==m)return b=T,!0}),b},createElement:function(m){var b=new Je(p);b.ownerDocument=this,this.type==="html"&&(m=m.toLowerCase()),r(this.contentType)&&(b.namespaceURI=d.HTML),b.nodeName=m,b.tagName=m,b.localName=m,b.childNodes=new Y;var T=b.attributes=new wt;return T._ownerElement=b,b},createDocumentFragment:function(){var m=new Ut(p);return m.ownerDocument=this,m.childNodes=new Y,m},createTextNode:function(m){var b=new _e(p);return b.ownerDocument=this,b.childNodes=new Y,b.appendData(m),b},createComment:function(m){var b=new Ns(p);return b.ownerDocument=this,b.childNodes=new Y,b.appendData(m),b},createCDATASection:function(m){if(m.indexOf("]]>")!==-1)throw new y(y.INVALID_CHARACTER_ERR,'data contains "]]>"');var b=new Pi(p);return b.ownerDocument=this,b.childNodes=new Y,b.appendData(m),b},createProcessingInstruction:function(m,b){var T=new ii(p);return T.ownerDocument=this,T.childNodes=new Y,T.nodeName=T.target=m,T.nodeValue=T.data=b,T},createAttribute:function(m){if(!w.QName_exact.test(m))throw new y(y.INVALID_CHARACTER_ERR,'invalid character in name "'+m+'"');return this.type==="html"&&(m=m.toLowerCase()),this._createAttribute(m)},_createAttribute:function(m){var b=new qi(p);return b.ownerDocument=this,b.childNodes=new Y,b.name=m,b.nodeName=m,b.localName=m,b.specified=!0,b},createEntityReference:function(m){if(!w.Name_exact.test(m))throw new y(y.INVALID_CHARACTER_ERR,'not a valid xml name "'+m+'"');if(this.type==="html")throw new y("document is an html document",A.NotSupportedError);var b=new Ir(p);return b.ownerDocument=this,b.childNodes=new Y,b.nodeName=m,b},createElementNS:function(m,b){var T=He(m,b),R=new Je(p),O=R.attributes=new wt;return R.childNodes=new Y,R.ownerDocument=this,R.nodeName=b,R.tagName=b,R.namespaceURI=T[0],R.prefix=T[1],R.localName=T[2],O._ownerElement=R,R},createAttributeNS:function(m,b){var T=He(m,b),R=new qi(p);return R.ownerDocument=this,R.childNodes=new Y,R.nodeName=b,R.name=b,R.specified=!0,R.namespaceURI=T[0],R.prefix=T[1],R.localName=T[2],R}},pt(Pe,Tt);function Je(m){_(m),this._nsMap=Object.create(null)}Je.prototype={nodeType:Dt,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===d.HTML},hasAttributes:function(){return!!(this.attributes&&this.attributes.length)},hasAttribute:function(m){return!!this.getAttributeNode(m)},getAttribute:function(m){var b=this.getAttributeNode(m);return b?b.value:null},getAttributeNode:function(m){return this._isInHTMLDocumentAndNamespace()&&(m=m.toLowerCase()),this.attributes.getNamedItem(m)},setAttribute:function(m,b){this._isInHTMLDocumentAndNamespace()&&(m=m.toLowerCase());var T=this.getAttributeNode(m);T?T.value=T.nodeValue=""+b:(T=this.ownerDocument._createAttribute(m),T.value=T.nodeValue=""+b,this.setAttributeNode(T))},removeAttribute:function(m){var b=this.getAttributeNode(m);b&&this.removeAttributeNode(b)},setAttributeNode:function(m){return this.attributes.setNamedItem(m)},setAttributeNodeNS:function(m){return this.attributes.setNamedItemNS(m)},removeAttributeNode:function(m){return this.attributes.removeNamedItem(m.nodeName)},removeAttributeNS:function(m,b){var T=this.getAttributeNodeNS(m,b);T&&this.removeAttributeNode(T)},hasAttributeNS:function(m,b){return this.getAttributeNodeNS(m,b)!=null},getAttributeNS:function(m,b){var T=this.getAttributeNodeNS(m,b);return T?T.value:null},setAttributeNS:function(m,b,T){var R=He(m,b)[2],O=this.getAttributeNodeNS(m,R);O?O.value=O.nodeValue=""+T:(O=this.ownerDocument.createAttributeNS(m,b),O.value=O.nodeValue=""+T,this.setAttributeNode(O))},getAttributeNodeNS:function(m,b){return this.attributes.getNamedItemNS(m,b)},getElementsByClassName:function(m){var b=xt(m);return new V(this,function(T){var R=[];return b.length>0&&Ct(T,function(O){if(O!==T&&O.nodeType===Dt){var q=O.getAttribute("class");if(q){var mt=m===q;if(!mt){var Jt=xt(q);mt=b.every(jt(Jt))}mt&&R.push(O)}}}),R})},getElementsByTagName:function(m){var b=(this.nodeType===at?this:this.ownerDocument).type==="html",T=m.toLowerCase();return new V(this,function(R){var O=[];return Ct(R,function(q){q===R||q.nodeType!==Dt||(m==="*"||q.getQualifiedName()===(b&&q.namespaceURI===d.HTML?T:m))&&O.push(q)}),O})},getElementsByTagNameNS:function(m,b){return new V(this,function(T){var R=[];return Ct(T,function(O){O!==T&&O.nodeType===Dt&&(m==="*"||O.namespaceURI===m)&&(b==="*"||O.localName==b)&&R.push(O)}),R})}},Pe.prototype.getElementsByClassName=Je.prototype.getElementsByClassName,Pe.prototype.getElementsByTagName=Je.prototype.getElementsByTagName,Pe.prototype.getElementsByTagNameNS=Je.prototype.getElementsByTagNameNS,pt(Je,Tt);function qi(m){_(m),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}qi.prototype.nodeType=oe,pt(qi,Tt);function Ai(m){_(m)}Ai.prototype={data:"",substringData:function(m,b){return this.data.substring(m,m+b)},appendData:function(m){m=this.data+m,this.nodeValue=this.data=m,this.length=m.length},insertData:function(m,b){this.replaceData(m,0,b)},deleteData:function(m,b){this.replaceData(m,b,"")},replaceData:function(m,b,T){var R=this.data.substring(0,m),O=this.data.substring(m+b);T=R+T+O,this.nodeValue=this.data=T,this.length=T.length}},pt(Ai,Tt);function _e(m){_(m)}_e.prototype={nodeName:"#text",nodeType:$t,splitText:function(m){var b=this.data,T=b.substring(m);b=b.substring(0,m),this.data=this.nodeValue=b,this.length=b.length;var R=this.ownerDocument.createTextNode(T);return this.parentNode&&this.parentNode.insertBefore(R,this.nextSibling),R}},pt(_e,Ai);function Ns(m){_(m)}Ns.prototype={nodeName:"#comment",nodeType:$},pt(Ns,Ai);function Pi(m){_(m)}Pi.prototype={nodeName:"#cdata-section",nodeType:hi},pt(Pi,_e);function Qi(m){_(m)}Qi.prototype.nodeType=ot,pt(Qi,Tt);function wr(m){_(m)}wr.prototype.nodeType=X,pt(wr,Tt);function vs(m){_(m)}vs.prototype.nodeType=$e,pt(vs,Tt);function Ir(m){_(m)}Ir.prototype.nodeType=Ee,pt(Ir,Tt);function Ut(m){_(m)}Ut.prototype.nodeName="#document-fragment",Ut.prototype.nodeType=dt,pt(Ut,Tt);function ii(m){_(m)}ii.prototype.nodeType=P,pt(ii,Ai);function Ts(){}Ts.prototype.serializeToString=function(m,b){return na.call(m,b)},Tt.prototype.toString=na;function na(m){var b=typeof m=="function"?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:m}:m==null?{requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null}:{requireWellFormed:!!m.requireWellFormed,splitCDATASections:m.splitCDATASections!==!1,nodeFilter:m.nodeFilter||null},T=[],R=this.nodeType===at&&this.documentElement||this,O=R.prefix,q=R.namespaceURI;if(q&&O==null){var O=R.lookupPrefix(q);if(O==null)var mt=[{namespace:q,prefix:null}]}return tn(this,T,mt,b),T.join("")}function aa(m,b,T){var R=m.prefix||"",O=m.namespaceURI;if(!O||R==="xml"&&O===d.XML||O===d.XMLNS)return!1;for(var q=T.length;q--;){var mt=T[q];if(mt.prefix===R)return mt.namespace!==O}return!0}function Cs(m,b,T,R){if(R&&!w.QName_exact.test(b))throw new y('The attribute name "'+b+'" is not a valid XML QName',A.InvalidStateError);m.push(" ",b,'="',T.replace(/[<>&"\t\n\r]/g,Si),'"')}function tn(m,b,T,R){T||(T=[]);var O=R.nodeFilter,q=R.requireWellFormed,mt=R.splitCDATASections,Jt=(m.nodeType===at?m:m.ownerDocument).type==="html";le(m,{ns:T},{enter:function(tt,Ye){var je=Ye.ns;if(O)if(tt=O(tt),tt){if(typeof tt=="string")return b.push(tt),null}else return null;switch(tt.nodeType){case Dt:var Ne=tt.attributes,tr=Ne.length,Ge=tt.tagName,er=Ge;if(!Jt&&!tt.prefix&&tt.namespaceURI){for(var Ss,As=0;As<Ne.length;As++)if(Ne.item(As).name==="xmlns"){Ss=Ne.item(As).value;break}if(!Ss)for(var ir=je.length-1;ir>=0;ir--){var rr=je[ir];if(rr.prefix===""&&rr.namespace===tt.namespaceURI){Ss=rr.namespace;break}}if(Ss!==tt.namespaceURI)for(var ir=je.length-1;ir>=0;ir--){var rr=je[ir];if(rr.namespace===tt.namespaceURI){rr.prefix&&(er=rr.prefix+":"+Ge);break}}}if(q&&!w.QName_exact.test(er))throw new y('The element name "'+er+'" is not a valid XML QName',A.InvalidStateError);b.push("<",er);for(var Ei=je.slice(),Li=0;Li<tr;Li++){var yi=Ne.item(Li);yi.prefix=="xmlns"?Ei.push({prefix:yi.localName,namespace:yi.value}):yi.nodeName=="xmlns"&&Ei.push({prefix:"",namespace:yi.value})}for(var Li=0;Li<tr;Li++){var yi=Ne.item(Li);if(aa(yi,Jt,Ei)){var Or=yi.prefix||"",Ue=yi.namespaceURI;Cs(b,Or?"xmlns:"+Or:"xmlns",Ue,q),Ei.push({prefix:Or,namespace:Ue})}var sr=O?O(yi):yi;sr&&(typeof sr=="string"?b.push(sr):Cs(b,sr.name,sr.value,q))}if(Ge===er&&aa(tt,Jt,Ei)){var Ls=tt.prefix||"",Ue=tt.namespaceURI;Cs(b,Ls?"xmlns:"+Ls:"xmlns",Ue,q),Ei.push({prefix:Ls,namespace:Ue})}var Rs=!tt.firstChild;if(Rs&&(Jt||tt.namespaceURI===d.HTML)&&(Rs=o(Ge)),Rs)return b.push("/>"),null;if(b.push(">"),Jt&&a(Ge)){for(var nr=tt.firstChild;nr;)nr.data?b.push(nr.data):tn(nr,b,Ei.slice(),R),nr=nr.nextSibling;return b.push("</",er,">"),null}return{ns:Ei,tag:er};case at:case dt:if(q&&tt.nodeType===at&&tt.documentElement==null)throw new y("The Document has no documentElement",A.InvalidStateError);return{ns:je};case oe:return Cs(b,tt.name,tt.value,q),null;case $t:if(q&&w.InvalidChar.test(tt.data))throw new y("The Text node data contains characters outside the XML Char production",A.InvalidStateError);return b.push(tt.data.replace(/[<&>]/g,Si)),null;case hi:if(q&&tt.data.indexOf("]]>")!==-1)throw new y('The CDATASection data contains "]]>"',A.InvalidStateError);return mt?b.push(w.CDATA_START,tt.data.replace(/]]>/g,"]]]]><![CDATA[>"),w.CDATA_END):b.push(w.CDATA_START,tt.data,w.CDATA_END),null;case $:if(q){if(w.InvalidChar.test(tt.data))throw new y("The comment node data contains characters outside the XML Char production",A.InvalidStateError);if(tt.data.indexOf("--")!==-1||tt.data[tt.data.length-1]==="-")throw new y('The comment node data contains "--" or ends with "-"',A.InvalidStateError)}return b.push(w.COMMENT_START,tt.data,w.COMMENT_END),null;case ot:var Mr=tt.publicId,Ri=tt.systemId;if(q){if(!w.Name_exact.test(tt.name))throw new y('The doctype name "'+tt.name+'" is not a valid XML Name',A.InvalidStateError);if(Mr&&!w.PubidLiteral_match.test(Mr))throw new y("DocumentType publicId is not a valid PubidLiteral",A.InvalidStateError);if(Ri&&Ri!=="."&&!w.SystemLiteral_match.test(Ri))throw new y("DocumentType systemId is not a valid SystemLiteral",A.InvalidStateError);if(tt.internalSubset&&tt.internalSubset.indexOf("]>")!==-1)throw new y('DocumentType internalSubset contains "]>"',A.InvalidStateError)}return b.push(w.DOCTYPE_DECL_START," ",tt.name),Mr?(b.push(" ",w.PUBLIC," ",Mr),Ri&&Ri!=="."&&b.push(" ",Ri)):Ri&&Ri!=="."&&b.push(" ",w.SYSTEM," ",Ri),tt.internalSubset&&b.push(" [",tt.internalSubset,"]"),b.push(">"),null;case P:if(q){if(!w.NCName_exact.test(tt.target)||tt.target.toLowerCase()==="xml")throw new y('The processing instruction target "'+tt.target+'" is not a valid XML NCName or is reserved',A.InvalidStateError);if(w.InvalidChar.test(tt.data))throw new y("The ProcessingInstruction data contains characters outside the XML Char production",A.InvalidStateError);if(tt.data.indexOf("?>")!==-1)throw new y('The ProcessingInstruction data contains "?>"',A.InvalidStateError)}return b.push("<?",tt.target," ",tt.data,"?>"),null;case Ee:if(q&&!w.Name_exact.test(tt.nodeName))throw new y('The entity reference name "'+tt.nodeName+'" is not a valid XML Name',A.InvalidStateError);return b.push("&",tt.nodeName,";"),null;default:return b.push("??",tt.nodeName),null}},exit:function(tt,Ye){Ye&&Ye.tag&&b.push("</",Ye.tag,">")}})}function Ae(m,b,T){var R;return le(b,null,{enter:function(O,q){var mt=O.cloneNode(!1);return mt.ownerDocument=m,mt.parentNode=null,q===null?R=mt:q.appendChild(mt),O.nodeType===oe||T?mt:null}}),R}function he(m,b,T){var R;return le(b,null,{enter:function(O,q){var mt=new O.constructor(p);for(var Jt in O)if(s(O,Jt)){var tt=O[Jt];typeof tt!="object"&&tt!=mt[Jt]&&(mt[Jt]=tt)}O.childNodes&&(mt.childNodes=new Y),mt.ownerDocument=m;var Ye=T;switch(mt.nodeType){case Dt:var je=O.attributes,Ne=mt.attributes=new wt,tr=je.length;Ne._ownerElement=mt;for(var Ge=0;Ge<tr;Ge++)mt.setAttributeNode(he(m,je.item(Ge),!0));break;case oe:Ye=!0}return q===null?R=mt:q.appendChild(mt),Ye?mt:null}}),R}function Xr(m,b,T){m[b]=T}function kr(m){for(var b=[],T=m.firstChild;T;)T.nodeType===Dt&&b.push(T),T=T.nextSibling;return b}try{Object.defineProperty&&(Object.defineProperty(V.prototype,"length",{get:function(){return ut(this),this.$$length}}),Object.defineProperty(Tt.prototype,"textContent",{get:function(){if(this.nodeType===Dt||this.nodeType===dt){var m=[];return le(this,null,{enter:function(b){if(b.nodeType===Dt||b.nodeType===dt)return!0;if(b.nodeType===P||b.nodeType===$)return null;m.push(b.nodeValue)}}),m.join("")}return this.nodeValue},set:function(m){switch(this.nodeType){case Dt:case dt:for(;this.firstChild;)this.removeChild(this.firstChild);(m||String(m))&&this.appendChild(this.ownerDocument.createTextNode(m));break;default:this.data=m,this.value=m,this.nodeValue=m}}}),Object.defineProperty(Ai.prototype,"data",{get:function(){return this._data==null?"":this._data},set:function(m){this._data=m,this.length=typeof m=="string"?m.length:0}}),Object.defineProperty(Ai.prototype,"nodeValue",{get:function(){return this.data},set:function(m){this.data=m},enumerable:!0,configurable:!0}),Object.defineProperty(Je.prototype,"children",{get:function(){return new V(this,kr)}}),Object.defineProperty(Pe.prototype,"children",{get:function(){return new V(this,kr)}}),Object.defineProperty(Ut.prototype,"children",{get:function(){return new V(this,kr)}}),Xr=function(m,b,T){m["$$"+b]=T})}catch{}t._updateLiveList=ut,t.Attr=qi,t.CDATASection=Pi,t.CharacterData=Ai,t.Comment=Ns,t.Document=Pe,t.DocumentFragment=Ut,t.DocumentType=Qi,t.DOMImplementation=bi,t.Element=Je,t.Entity=vs,t.EntityReference=Ir,t.LiveNodeList=V,t.NamedNodeMap=wt,t.Node=Tt,t.NodeList=Y,t.Notation=wr,t.Text=_e,t.ProcessingInstruction=ii,t.walkDOM=le,t.XMLSerializer=Ts})),s0=Lr((t=>{var e=Ys().freeze;t.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
13
+ `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES})),n0=Lr((t=>{var e=Ys(),i=Zu(),r=Ro(),s=e.isHTMLEscapableRawTextElement,n=e.isHTMLMimeType,a=e.isHTMLRawTextElement,o=e.hasOwn,h=e.NAMESPACE,d=r.ParseError,p=r.DOMException,E=0,y=1,A=2,w=3,_=4,U=5,vt=6,nt=7;function xt(){}xt.prototype={parse:function(P,$,at){var ot=this.domBuilder;ot.startDocument(),Dt($,$=Object.create(null)),Ft(P,$,at,ot,this.errorHandler),ot.endDocument()}};var jt=/&#?\w+;?/g;function Ft(P,$,at,ot,dt){var X=n(ot.mimeType);P.indexOf(i.UNICODE_REPLACEMENT_CHARACTER)>=0&&dt.warning("Unicode replacement character detected, source encoding issues?");function Q(Et){if(Et>65535){Et-=65536;var zt=55296+(Et>>10),ci=56320+(Et&1023);return String.fromCharCode(zt,ci)}else return String.fromCharCode(Et)}function It(Et){var zt=Et[Et.length-1]===";"?Et:Et+";";if(!X&&zt!==Et)return dt.error("EntityRef: expecting ;"),Et;var ci=i.Reference.exec(zt);if(!ci||ci[0].length!==zt.length)return dt.error("entity not matching Reference production: "+Et),Et;var ei=zt.slice(1,-1);return o(at,ei)?at[ei]:ei.charAt(0)==="#"?Q(parseInt(ei.substring(1).replace("x","0x"))):(dt.error("entity not found:"+Et),Et)}function gt(Et){if(Et>ke){var zt=P.substring(ke,Et).replace(jt,It);wt&&Fe(ke),ot.characters(zt,0,Et-ke),ke=Et}}var Y=0,V=0,ut=/\r\n?|\n|$/g,wt=ot.locator;function Fe(Et,zt){for(;Et>=V&&(zt=ut.exec(P));)Y=V,V=zt.index+zt[0].length,wt.lineNumber++;wt.columnNumber=Et-Y+1}for(var Ke=[{currentNSMap:$}],ti=[],ke=0;;){try{var Se=P.indexOf("<",ke);if(Se<0){if(!X&&ti.length>0)return dt.fatalError("unclosed xml tag(s): "+ti.join(", "));if(!P.substring(ke).match(/^\s*$/)){var Wi=ot.doc,Ci=Wi.createTextNode(P.substring(ke));if(Wi.documentElement)return dt.error("Extra content at the end of the document");Wi.appendChild(Ci),ot.currentElement=Ci}return}if(Se>ke){var bi=P.substring(ke,Se);!X&&ti.length===0&&(bi=bi.replace(new RegExp(i.S_OPT.source,"g"),""),bi&&dt.error("Unexpected content outside root element: '"+bi+"'")),gt(Se)}switch(P.charAt(Se+1)){case"/":var Lt=P.indexOf(">",Se+2),Tt=P.substring(Se+2,Lt>0?Lt:void 0);if(!Tt)return dt.fatalError("end tag name missing");var Si=i.reg("^",i.QName_group,i.S_OPT,"$"),Ct=Lt>0&&Si.exec(Tt);if(!Ct){var le=Lt>0&&i.reg("^",i.QName_group).exec(Tt);if(X&&le)dt.warning('end tag name contains invalid trailing characters: "'+Tt+'"'),Ct=le;else if(le&&new RegExp(Si.source,Si.flags+"m").test(Tt))dt.error('end tag name is followed by a line break and trailing content: "'+Tt+'"'),Ct=le;else return dt.fatalError('end tag name contains invalid characters: "'+Tt+'"')}if(!ot.currentElement&&!ot.doc.documentElement)return;var Pe=ti[ti.length-1]||ot.currentElement.tagName||ot.doc.documentElement.tagName||"";if(Pe!==Ct[1]){var Yi=Ct[1].toLowerCase();if(!X||Pe.toLowerCase()!==Yi)return dt.fatalError('Opening and ending tag mismatch: "'+Pe+'" != "'+Tt+'"')}var Gt=Ke.pop();ti.pop();var Kt=Gt.localNSMap;if(ot.endElement(Gt.uri,Gt.localName,Pe),Kt)for(var ye in Kt)o(Kt,ye)&&ot.endPrefixMapping(ye);Lt++;break;case"?":wt&&Fe(Se),Lt=Ee(P,Se,ot,dt);break;case"!":wt&&Fe(Se),Lt=hi(P,Se,ot,dt,X);break;default:wt&&Fe(Se);var te=new $e,zi=Ke[Ke.length-1].currentNSMap,Lt=H(P,Se,te,zi,It,dt,X),xe=te.length;if(te.closed||(X&&e.isHTMLVoidElement(te.tagName)?te.closed=!0:ti.push(te.tagName)),wt&&xe){for(var Ce=He(wt,{}),Zi=0;Zi<xe;Zi++){var Rr=te[Zi];Fe(Rr.offset),Rr.locator=He(wt,{})}ot.locator=Ce,pt(te,ot,zi)&&Ke.push(te),ot.locator=wt}else pt(te,ot,zi)&&Ke.push(te);X&&!te.closed?Lt=ft(P,Lt,te.tagName,It,ot):Lt++}}catch(Et){if(Et instanceof d)throw Et;if(Et instanceof p)return dt.fatalError("Error constructing the DOM: "+Et.name+": "+Et.message,Et);dt.error("element parse error: "+Et),Lt=-1}Lt>ke?ke=Lt:gt(Math.max(Se,ke)+1)}}function He(P,$){return $.lineNumber=P.lineNumber,$.columnNumber=P.columnNumber,$}function H(P,$,at,ot,dt,X,Q){function It(Fe,Ke,ti){if(o(at.attributeNames,Fe))return X.fatalError("Attribute "+Fe+" redefined");if(!Q&&Ke.indexOf("<")>=0)return X.fatalError("Unescaped '<' not allowed in attributes values");at.addValue(Fe,Ke.replace(/[\t\n\r]/g," ").replace(jt,dt),ti)}for(var gt,Y,V=++$,ut=E;;){var wt=P.charAt(V);if(ut===E&&wt==="<")throw Error("unexpected < in tag name: "+P.slice($,V));switch(wt){case"=":if(ut===y)gt=P.slice($,V),ut=w;else if(ut===A)ut=w;else throw Error("attribute equal must after attrName");break;case"'":case'"':if(ut===w||ut===y)if(ut===y&&(X.warning('attribute value must after "="'),gt=P.slice($,V)),$=V+1,V=P.indexOf(wt,$),V>0)Y=P.slice($,V),It(gt,Y,$-1),ut=U;else throw Error("attribute value no end '"+wt+"' match");else if(ut==_)Y=P.slice($,V),It(gt,Y,$),X.warning('attribute "'+gt+'" missed start quot('+wt+")!!"),$=V+1,ut=U;else throw Error('attribute value must after "="');break;case"/":switch(ut){case E:at.setTagName(P.slice($,V));case U:case vt:case nt:ut=nt,at.closed=!0;case _:case y:break;case A:at.closed=!0;break;default:throw Error("attribute invalid close char('/')")}break;case"":return X.error("unexpected end of input"),ut==E&&at.setTagName(P.slice($,V)),V;case">":switch(ut){case E:at.setTagName(P.slice($,V));case U:case vt:case nt:break;case _:case y:Y=P.slice($,V),Y.slice(-1)==="/"&&(at.closed=!0,Y=Y.slice(0,-1));case A:ut===A&&(Y=gt),ut==_?(X.warning('attribute "'+Y+'" missed quot(")!'),It(gt,Y,$)):(Q||X.warning('attribute "'+Y+'" missed value!! "'+Y+'" instead!!'),It(Y,Y,$));break;case w:if(!Q)return X.fatalError(`AttValue: ' or " expected`)}return V;case"€":wt=" ";default:if(wt<=" ")switch(ut){case E:at.setTagName(P.slice($,V)),ut=vt;break;case y:gt=P.slice($,V),ut=A;break;case _:var Y=P.slice($,V);X.warning('attribute "'+Y+'" missed quot(")!!'),It(gt,Y,$);case U:ut=vt}else switch(ut){case A:Q||X.warning('attribute "'+gt+'" missed value!! "'+gt+'" instead2!!'),It(gt,gt,$),$=V,ut=y;break;case U:X.warning('attribute space is required"'+gt+'"!!');case vt:ut=y,$=V;break;case w:ut=_,$=V;break;case nt:throw Error("elements closed character '/' and '>' must be connected to")}}V++}}function pt(P,$,at){for(var ot=P.tagName,dt=null,X=P.length;X--;){var Q=P[X],It=Q.qName,gt=Q.value,wt=It.indexOf(":");if(wt>0)var Y=Q.prefix=It.slice(0,wt),V=It.slice(wt+1),ut=Y==="xmlns"&&V;else V=It,Y=null,ut=It==="xmlns"&&"";Q.localName=V,ut!==!1&&(dt??(dt=Object.create(null),at=Object.create(at)),at[ut]=dt[ut]=gt,Q.uri=h.XMLNS,$.startPrefixMapping(ut,gt))}for(var X=P.length;X--;)Q=P[X],Q.prefix&&(Q.prefix==="xml"&&(Q.uri=h.XML),Q.prefix!=="xmlns"&&(Q.uri=at[Q.prefix]));var wt=ot.indexOf(":");wt>0?(Y=P.prefix=ot.slice(0,wt),V=P.localName=ot.slice(wt+1)):(Y=null,V=P.localName=ot);var Fe=P.uri=at[Y||""];if($.startElement(Fe,V,ot,P),P.closed){if($.endElement(Fe,V,ot),dt)for(Y in dt)o(dt,Y)&&$.endPrefixMapping(Y)}else return P.currentNSMap=at,P.localNSMap=dt,!0}function ft(P,$,at,ot,dt){var X=s(at);if(X||a(at)){var Q=RegExp("</"+at.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+">","ig");Q.lastIndex=$;var It=Q.exec(P),gt=It?It.index:-1;if(gt<0)return $+1;var Y=P.substring($+1,gt);return X&&(Y=Y.replace(jt,ot)),dt.characters(Y,0,Y.length),gt}return $+1}function Dt(P,$){for(var at in P)o(P,at)&&($[at]=P[at])}function oe(P,$){var at=$;function ot(V){return V||(V=0),P.charAt(at+V)}function dt(V){V||(V=1),at+=V}function X(){for(var V=0;at<P.length;){var ut=ot();if(ut!==" "&&ut!==`
14
+ `&&ut!==" "&&ut!=="\r")return V;V++,dt()}return-1}function Q(){return P.substring(at)}function It(V){return P.substring(at,at+V.length)===V}function gt(V){return P.substring(at,at+V.length).toUpperCase()===V.toUpperCase()}function Y(V){var ut=i.reg("^",V).exec(Q());return ut?(dt(ut[0].length),ut[0]):null}return{char:ot,getIndex:function(){return at},getMatch:Y,getSource:function(){return P},skip:dt,skipBlanks:X,substringFromIndex:Q,substringStartsWith:It,substringStartsWithCaseInsensitive:gt}}function $t(P,$){function at(It,gt){var Y=i.PI.exec(It.substringFromIndex());return Y?Y[1].toLowerCase()==="xml"?gt.fatalError("xml declaration is only allowed at the start of the document, but found at position "+It.getIndex()):(It.skip(Y[0].length),Y[0]):gt.fatalError("processing instruction is not well-formed at position "+It.getIndex())}var ot=P.getSource();if(P.char()==="["){P.skip(1);for(var dt=P.getIndex();P.getIndex()<ot.length;){if(P.skipBlanks(),P.char()==="]"){var X=ot.substring(dt,P.getIndex());return P.skip(1),X}var Q=null;if(P.char()==="<"&&P.char(1)==="!")switch(P.char(2)){case"E":P.char(3)==="L"?Q=P.getMatch(i.elementdecl):P.char(3)==="N"&&(Q=P.getMatch(i.EntityDecl));break;case"A":Q=P.getMatch(i.AttlistDecl);break;case"N":Q=P.getMatch(i.NotationDecl);break;case"-":Q=P.getMatch(i.Comment)}else if(P.char()==="<"&&P.char(1)==="?")Q=at(P,$);else if(P.char()==="%")Q=P.getMatch(i.PEReference);else return $.fatalError("Error detected in Markup declaration");if(!Q)return $.fatalError("Error in internal subset at position "+P.getIndex())}return $.fatalError("doctype internal subset is not well-formed, missing ]")}}function hi(P,$,at,ot,dt){var X=oe(P,$);switch(dt?X.char(2).toUpperCase():X.char(2)){case"-":var Q=X.getMatch(i.Comment);return Q?(at.comment(Q,i.COMMENT_START.length,Q.length-i.COMMENT_START.length-i.COMMENT_END.length),X.getIndex()):ot.fatalError("comment is not well-formed at position "+X.getIndex());case"[":var It=X.getMatch(i.CDSect);return It?!dt&&!at.currentElement?ot.fatalError("CDATA outside of element"):(at.startCDATA(),at.characters(It,i.CDATA_START.length,It.length-i.CDATA_START.length-i.CDATA_END.length),at.endCDATA(),X.getIndex()):ot.fatalError("Invalid CDATA starting at position "+$);case"D":if(at.doc&&at.doc.documentElement)return ot.fatalError("Doctype not allowed inside or after documentElement at position "+X.getIndex());if(dt?!X.substringStartsWithCaseInsensitive(i.DOCTYPE_DECL_START):!X.substringStartsWith(i.DOCTYPE_DECL_START))return ot.fatalError("Expected "+i.DOCTYPE_DECL_START+" at position "+X.getIndex());if(X.skip(i.DOCTYPE_DECL_START.length),X.skipBlanks()<1)return ot.fatalError("Expected whitespace after "+i.DOCTYPE_DECL_START+" at position "+X.getIndex());var gt={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(gt.name=X.getMatch(i.Name),!gt.name)return ot.fatalError("doctype name missing or contains unexpected characters at position "+X.getIndex());if(dt&&gt.name.toLowerCase()!=="html"&&ot.warning("Unexpected DOCTYPE in HTML document at position "+X.getIndex()),X.skipBlanks(),X.substringStartsWith(i.PUBLIC)||X.substringStartsWith(i.SYSTEM)){var Y=i.ExternalID_match.exec(X.substringFromIndex());if(!Y)return ot.fatalError("doctype external id is not well-formed at position "+X.getIndex());Y.groups.SystemLiteralOnly===void 0?(gt.systemId=Y.groups.SystemLiteral,gt.publicId=Y.groups.PubidLiteral):gt.systemId=Y.groups.SystemLiteralOnly,X.skip(Y[0].length)}else if(dt&&X.substringStartsWithCaseInsensitive(i.SYSTEM)){if(X.skip(i.SYSTEM.length),X.skipBlanks()<1)return ot.fatalError("Expected whitespace after "+i.SYSTEM+" at position "+X.getIndex());if(gt.systemId=X.getMatch(i.ABOUT_LEGACY_COMPAT_SystemLiteral),!gt.systemId)return ot.fatalError("Expected "+i.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+i.SYSTEM+" at position "+X.getIndex())}return dt&&gt.systemId&&!i.ABOUT_LEGACY_COMPAT_SystemLiteral.test(gt.systemId)&&ot.warning("Unexpected doctype.systemId in HTML document at position "+X.getIndex()),dt||(X.skipBlanks(),gt.internalSubset=$t(X,ot)),X.skipBlanks(),X.char()===">"?(X.skip(1),at.startDTD(gt.name,gt.publicId,gt.systemId,gt.internalSubset),at.endDTD(),X.getIndex()):ot.fatalError("doctype not terminated with > at position "+X.getIndex());default:return ot.fatalError('Not well-formed XML starting with "<!" at position '+$)}}function Ee(P,$,at,ot){var dt=P.substring($).match(i.PI);if(!dt)return ot.fatalError("Invalid processing instruction starting at position "+$);if(dt[1].toLowerCase()==="xml"){if($>0)return ot.fatalError("processing instruction at position "+$+" is an xml declaration which is only at the start of the document");if(!i.XMLDecl.test(P.substring($)))return ot.fatalError("xml declaration is not well-formed")}return at.processingInstruction(dt[1],dt[2]),$+dt[0].length}function $e(){this.attributeNames=Object.create(null)}$e.prototype={setTagName:function(P){if(!i.QName_exact.test(P))throw Error("invalid tagName:"+P);this.tagName=P},addValue:function(P,$,at){if(!i.QName_exact.test(P))throw Error("invalid attribute:"+P);this.attributeNames[P]=this.length,this[this.length++]={qName:P,value:$,offset:at}},length:0,getLocalName:function(P){return this[P].localName},getLocator:function(P){return this[P].locator},getQName:function(P){return this[P].qName},getURI:function(P){return this[P].uri},getValue:function(P){return this[P].value}},t.XMLReader=xt,t.parseUtils=oe,t.parseDoctypeCommentOrCData=hi})),a0=Lr((t=>{var e=Ys(),i=Qu(),r=Ro(),s=s0(),n=n0(),a=i.DOMImplementation,o=e.hasDefaultHTMLNamespace,h=e.isHTMLMimeType,d=e.isValidMimeType,p=e.MIME_TYPE,E=e.NAMESPACE,y=r.ParseError,A=n.XMLReader;function w(H){return H.replace(/\r[\n\u0085]/g,`
15
+ `).replace(/[\r\u0085\u2028\u2029]/g,`
16
+ `)}function _(H){if(H||(H={}),H.locator===void 0&&(H.locator=!0),this.assign=H.assign||e.assign,this.domHandler=H.domHandler||U,this.onError=H.onError||H.errorHandler,H.errorHandler&&typeof H.errorHandler!="function")throw TypeError("errorHandler object is no longer supported, switch to onError!");H.errorHandler&&H.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=H.normalizeLineEndings||w,this.locator=!!H.locator,this.xmlns=this.assign(Object.create(null),H.xmlns)}_.prototype.parseFromString=function(H,pt){if(!d(pt))throw TypeError('DOMParser.parseFromString: the provided mimeType "'+pt+'" is not valid.');var ft=this.assign(Object.create(null),this.xmlns),Dt=s.XML_ENTITIES,oe=ft[""]||null;o(pt)?(Dt=s.HTML_ENTITIES,oe=E.HTML):pt===p.XML_SVG_IMAGE&&(oe=E.SVG),ft[""]=oe,ft.xml=ft.xml||E.XML;var $t=new this.domHandler({mimeType:pt,defaultNamespace:oe,onError:this.onError}),hi=this.locator?{}:void 0;this.locator&&$t.setDocumentLocator(hi);var Ee=new A;return Ee.errorHandler=$t,Ee.domBuilder=$t,!e.isHTMLMimeType(pt)&&typeof H!="string"&&Ee.errorHandler.fatalError("source is not a string"),Ee.parse(this.normalizeLineEndings(String(H)),ft,Dt),$t.doc.documentElement||Ee.errorHandler.fatalError("missing root element"),$t.doc};function U(H){var pt=H||{};this.mimeType=pt.mimeType||p.XML_APPLICATION,this.defaultNamespace=pt.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=pt.onError}function vt(H,pt){pt.lineNumber=H.lineNumber,pt.columnNumber=H.columnNumber}U.prototype={startDocument:function(){var H=new a;this.doc=h(this.mimeType)?H.createHTMLDocument(!1):H.createDocument(this.defaultNamespace,"")},startElement:function(H,pt,ft,Dt){var oe=this.doc,$t=oe.createElementNS(H,ft||pt),hi=Dt.length;jt(this,$t),this.currentElement=$t,this.locator&&vt(this.locator,$t);for(var Ee=0;Ee<hi;Ee++){var H=Dt.getURI(Ee),$e=Dt.getValue(Ee),ft=Dt.getQName(Ee),P=oe.createAttributeNS(H,ft);this.locator&&vt(Dt.getLocator(Ee),P),P.value=P.nodeValue=$e,$t.setAttributeNode(P)}},endElement:function(H,pt,ft){this.currentElement=this.currentElement.parentNode},startPrefixMapping:function(H,pt){},endPrefixMapping:function(H){},processingInstruction:function(H,pt){var ft=this.doc.createProcessingInstruction(H,pt);this.locator&&vt(this.locator,ft),jt(this,ft)},ignorableWhitespace:function(H,pt,ft){},characters:function(H,pt,ft){if(H=xt.apply(this,arguments),H){if(this.cdata)var Dt=this.doc.createCDATASection(H);else var Dt=this.doc.createTextNode(H);this.currentElement?this.currentElement.appendChild(Dt):/^\s*$/.test(H)&&this.doc.appendChild(Dt),this.locator&&vt(this.locator,Dt)}},skippedEntity:function(H){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(H){H&&(H.lineNumber=0),this.locator=H},comment:function(H,pt,ft){H=xt.apply(this,arguments);var Dt=this.doc.createComment(H);this.locator&&vt(this.locator,Dt),jt(this,Dt)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(H,pt,ft,Dt){var oe=this.doc.implementation;if(oe&&oe.createDocumentType){var $t=oe.createDocumentType(H,pt,ft,Dt);this.locator&&vt(this.locator,$t),jt(this,$t),this.doc.doctype=$t}},reportError:function(H,pt){if(typeof this.onError=="function")try{this.onError(H,pt,this)}catch(ft){throw new y("Reporting "+H+' "'+pt+'" caused '+ft,this.locator)}else console.error("[xmldom "+H+"] "+pt,nt(this.locator))},warning:function(H){this.reportError("warning",H)},error:function(H){this.reportError("error",H)},fatalError:function(H,pt){throw this.reportError("fatalError",H),new y(H,this.locator,pt)}};function nt(H){if(H)return`
17
+ @#[line:`+H.lineNumber+",col:"+H.columnNumber+"]"}function xt(H,pt,ft){return typeof H=="string"?H.substr(pt,ft):H.length>=pt+ft||pt?new java.lang.String(H,pt,ft)+"":H}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(H){U.prototype[H]=function(){return null}});function jt(H,pt){H.currentElement?H.currentElement.appendChild(pt):H.doc.appendChild(pt)}function Ft(H){if(H==="error")throw"onErrorStopParsing"}function He(){throw"onWarningStopParsing"}t.__DOMHandler=U,t.DOMParser=_,t.normalizeLineEndings=w,t.onErrorStopParsing=Ft,t.onWarningStopParsing=He})),o0=Lr((t=>{var e=Ys();t.assign=e.assign,t.hasDefaultHTMLNamespace=e.hasDefaultHTMLNamespace,t.isHTMLMimeType=e.isHTMLMimeType,t.isValidMimeType=e.isValidMimeType,t.MIME_TYPE=e.MIME_TYPE,t.NAMESPACE=e.NAMESPACE;var i=Ro();t.DOMException=i.DOMException,t.DOMExceptionName=i.DOMExceptionName,t.ExceptionCode=i.ExceptionCode,t.ParseError=i.ParseError;var r=Qu();t.Attr=r.Attr,t.CDATASection=r.CDATASection,t.CharacterData=r.CharacterData,t.Comment=r.Comment,t.Document=r.Document,t.DocumentFragment=r.DocumentFragment,t.DocumentType=r.DocumentType,t.DOMImplementation=r.DOMImplementation,t.Element=r.Element,t.Entity=r.Entity,t.EntityReference=r.EntityReference,t.LiveNodeList=r.LiveNodeList,t.NamedNodeMap=r.NamedNodeMap,t.Node=r.Node,t.NodeList=r.NodeList,t.Notation=r.Notation,t.ProcessingInstruction=r.ProcessingInstruction,t.Text=r.Text,t.XMLSerializer=r.XMLSerializer;var s=a0();t.DOMParser=s.DOMParser,t.normalizeLineEndings=s.normalizeLineEndings,t.onErrorStopParsing=s.onErrorStopParsing,t.onWarningStopParsing=s.onWarningStopParsing})),l0=Lr(((t,e)=>{(function(){var i=this;function r(c){var u=typeof c;if(u=="object")if(c){if(c instanceof Array)return"array";if(c instanceof Object)return u;var g=Object.prototype.toString.call(c);if(g=="[object Window]")return"object";if(g=="[object Array]"||typeof c.length=="number"&&c.splice!==void 0&&c.propertyIsEnumerable!==void 0&&!c.propertyIsEnumerable("splice"))return"array";if(g=="[object Function]"||c.call!==void 0&&c.propertyIsEnumerable!==void 0&&!c.propertyIsEnumerable("call"))return"function"}else return"null";else if(u=="function"&&c.call===void 0)return"object";return u}function s(c){return typeof c=="string"}function n(c,u,g){return c.call.apply(c.bind,arguments)}function a(c,u,g){if(!c)throw Error();if(2<arguments.length){var S=Array.prototype.slice.call(arguments,2);return function(){var I=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(I,S),c.apply(u,I)}}return function(){return c.apply(u,arguments)}}function o(c,u,g){return o=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?n:a,o.apply(null,arguments)}function h(c,u){var g=Array.prototype.slice.call(arguments,1);return function(){var S=g.slice();return S.push.apply(S,arguments),c.apply(this,S)}}function d(c){var u=xe;function g(){}g.prototype=u.prototype,c.G=u.prototype,c.prototype=new g,c.prototype.constructor=c,c.F=function(S,I,k){for(var K=Array(arguments.length-2),it=2;it<arguments.length;it++)K[it-2]=arguments[it];return u.prototype[I].apply(S,K)}}var p=String.prototype.trim?function(c){return c.trim()}:function(c){return c.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};function E(c,u){return c.indexOf(u)!=-1}function y(c,u){return c<u?-1:+(c>u)}var A=Array.prototype.indexOf?function(c,u,g){return Array.prototype.indexOf.call(c,u,g)}:function(c,u,g){if(g=g==null?0:0>g?Math.max(0,c.length+g):g,s(c))return s(u)&&u.length==1?c.indexOf(u,g):-1;for(;g<c.length;g++)if(g in c&&c[g]===u)return g;return-1},w=Array.prototype.forEach?function(c,u,g){Array.prototype.forEach.call(c,u,g)}:function(c,u,g){for(var S=c.length,I=s(c)?c.split(""):c,k=0;k<S;k++)k in I&&u.call(g,I[k],k,c)},_=Array.prototype.filter?function(c,u,g){return Array.prototype.filter.call(c,u,g)}:function(c,u,g){for(var S=c.length,I=[],k=0,K=s(c)?c.split(""):c,it=0;it<S;it++)if(it in K){var ne=K[it];u.call(g,ne,it,c)&&(I[k++]=ne)}return I},U=Array.prototype.reduce?function(c,u,g,S){return S&&(u=o(u,S)),Array.prototype.reduce.call(c,u,g)}:function(c,u,g,S){var I=g;return w(c,function(k,K){I=u.call(S,I,k,K,c)}),I},vt=Array.prototype.some?function(c,u,g){return Array.prototype.some.call(c,u,g)}:function(c,u,g){for(var S=c.length,I=s(c)?c.split(""):c,k=0;k<S;k++)if(k in I&&u.call(g,I[k],k,c))return!0;return!1};function nt(c,u){var g;t:{g=c.length;for(var S=s(c)?c.split(""):c,I=0;I<g;I++)if(I in S&&u.call(void 0,S[I],I,c)){g=I;break t}g=-1}return 0>g?null:s(c)?c.charAt(g):c[g]}function xt(c){return Array.prototype.concat.apply(Array.prototype,arguments)}function jt(c,u,g){return 2>=arguments.length?Array.prototype.slice.call(c,u):Array.prototype.slice.call(c,u,g)}var Ft;t:{var He=i.navigator;if(He){var H=He.userAgent;if(H){Ft=H;break t}}Ft=""}var pt=E(Ft,"Opera")||E(Ft,"OPR"),ft=E(Ft,"Trident")||E(Ft,"MSIE"),Dt=E(Ft,"Edge"),oe=E(Ft,"Gecko")&&!(E(Ft.toLowerCase(),"webkit")&&!E(Ft,"Edge"))&&!(E(Ft,"Trident")||E(Ft,"MSIE"))&&!E(Ft,"Edge"),$t=E(Ft.toLowerCase(),"webkit")&&!E(Ft,"Edge");function hi(){var c=i.document;return c?c.documentMode:void 0}var Ee;t:{var $e="",P=(function(){var c=Ft;if(oe)return/rv\:([^\);]+)(\)|;)/.exec(c);if(Dt)return/Edge\/([\d\.]+)/.exec(c);if(ft)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(c);if($t)return/WebKit\/(\S+)/.exec(c);if(pt)return/(?:Version)[ \/]?(\S+)/.exec(c)})();if(P&&($e=P?P[1]:""),ft){var $=hi();if($!=null&&$>parseFloat($e)){Ee=String($);break t}}Ee=$e}var at={};function ot(c){if(!at[c]){for(var u=0,g=p(String(Ee)).split("."),S=p(String(c)).split("."),I=Math.max(g.length,S.length),k=0;u==0&&k<I;k++){var K=g[k]||"",it=S[k]||"",ne=/(\d*)(\D*)/g,Ii=/(\d*)(\D*)/g;do{var Ze=ne.exec(K)||["","",""],sn=Ii.exec(it)||["","",""];if(Ze[0].length==0&&sn[0].length==0)break;u=y(Ze[1].length==0?0:parseInt(Ze[1],10),sn[1].length==0?0:parseInt(sn[1],10))||y(Ze[2].length==0,sn[2].length==0)||y(Ze[2],sn[2])}while(u==0)}at[c]=0<=u}}var dt=i.document,X=dt&&ft?hi()||(dt.compatMode=="CSS1Compat"?parseInt(Ee,10):5):void 0,Q=ft&&!(9<=Number(X)),It=ft&&!(8<=Number(X));function gt(c,u,g,S){this.a=c,this.nodeName=g,this.nodeValue=S,this.nodeType=2,this.parentNode=this.ownerElement=u}function Y(c,u){var g=It&&u.nodeName=="href"?c.getAttribute(u.nodeName,2):u.nodeValue;return new gt(u,c,u.nodeName,g)}function V(c){var u=null,g=c.nodeType;if(g==1&&(u=c.textContent,u=u==null||u==null?c.innerText:u,u=u==null||u==null?"":u),typeof u!="string")if(Q&&c.nodeName.toLowerCase()=="title"&&g==1)u=c.text;else if(g==9||g==1){c=g==9?c.documentElement:c.firstChild;for(var g=0,S=[],u="";c;){do c.nodeType!=1&&(u+=c.nodeValue),Q&&c.nodeName.toLowerCase()=="title"&&(u+=c.text),S[g++]=c;while(c=c.firstChild);for(;g&&!(c=S[--g].nextSibling););}}else u=c.nodeValue;return""+u}function ut(c,u,g){if(u===null)return!0;try{if(!c.getAttribute)return!1}catch{return!1}return It&&u=="class"&&(u="className"),g==null?!!c.getAttribute(u):c.getAttribute(u,2)==g}function wt(c,u,g,S,I){return(Q?Fe:Ke).call(null,c,u,s(g)?g:null,s(S)?S:null,I||new Ct)}function Fe(c,u,g,S,I){if(c instanceof m||c.b==8||g&&c.b===null){var k=u.all;if(!k||(c=Wi(c),c!="*"&&(k=u.getElementsByTagName(c),!k)))return I;if(g){for(var K=[],it=0;u=k[it++];)ut(u,g,S)&&K.push(u);k=K}for(it=0;u=k[it++];)c=="*"&&u.tagName=="!"||Gt(I,u);return I}return Se(c,u,g,S,I),I}function Ke(c,u,g,S,I){return u.getElementsByName&&S&&g=="name"&&!ft?(u=u.getElementsByName(S),w(u,function(k){c.a(k)&&Gt(I,k)})):u.getElementsByClassName&&S&&g=="class"?(u=u.getElementsByClassName(S),w(u,function(k){k.className==S&&c.a(k)&&Gt(I,k)})):c instanceof ii?Se(c,u,g,S,I):u.getElementsByTagName&&(u=u.getElementsByTagName(c.f()),w(u,function(k){ut(k,g,S)&&Gt(I,k)})),I}function ti(c,u,g,S,I){var k;if((c instanceof m||c.b==8||g&&c.b===null)&&(k=u.childNodes)){var K=Wi(c);return K!="*"&&(k=_(k,function(it){return it.tagName&&it.tagName.toLowerCase()==K}),!k)||(g&&(k=_(k,function(it){return ut(it,g,S)})),w(k,function(it){K=="*"&&(it.tagName=="!"||K=="*"&&it.nodeType!=1)||Gt(I,it)})),I}return ke(c,u,g,S,I)}function ke(c,u,g,S,I){for(u=u.firstChild;u;u=u.nextSibling)ut(u,g,S)&&c.a(u)&&Gt(I,u);return I}function Se(c,u,g,S,I){for(u=u.firstChild;u;u=u.nextSibling)ut(u,g,S)&&c.a(u)&&Gt(I,u),Se(c,u,g,S,I)}function Wi(c){if(c instanceof ii){if(c.b==8)return"!";if(c.b===null)return"*"}return c.f()}!oe&&!ft||ft&&9<=Number(X)||oe&&ot("1.9.1"),ft&&ot("9");function Ci(c,u){if(!c||!u)return!1;if(c.contains&&u.nodeType==1)return c==u||c.contains(u);if(c.compareDocumentPosition!==void 0)return c==u||!!(c.compareDocumentPosition(u)&16);for(;u&&c!=u;)u=u.parentNode;return u==c}function bi(c,u){if(c==u)return 0;if(c.compareDocumentPosition)return c.compareDocumentPosition(u)&2?1:-1;if(ft&&!(9<=Number(X))){if(c.nodeType==9)return-1;if(u.nodeType==9)return 1}if("sourceIndex"in c||c.parentNode&&"sourceIndex"in c.parentNode){var g=c.nodeType==1,S=u.nodeType==1;if(g&&S)return c.sourceIndex-u.sourceIndex;var I=c.parentNode,k=u.parentNode;return I==k?Si(c,u):!g&&Ci(I,u)?-1*Tt(c,u):!S&&Ci(k,c)?Tt(u,c):(g?c.sourceIndex:I.sourceIndex)-(S?u.sourceIndex:k.sourceIndex)}return S=c.nodeType==9?c:c.ownerDocument||c.document,g=S.createRange(),g.selectNode(c),g.collapse(!0),S=S.createRange(),S.selectNode(u),S.collapse(!0),g.compareBoundaryPoints(i.Range.START_TO_END,S)}function Tt(c,u){var g=c.parentNode;if(g==u)return-1;for(var S=u;S.parentNode!=g;)S=S.parentNode;return Si(S,c)}function Si(c,u){for(var g=u;g=g.previousSibling;)if(g==c)return-1;return 1}function Ct(){this.b=this.a=null,this.l=0}function le(c){this.node=c,this.a=this.b=null}function Pe(c,u){if(!c.a)return u;if(!u.a)return c;for(var g=c.a,S=u.a,I=null,k=null,K=0;g&&S;){var k=g.node,it=S.node;k==it||k instanceof gt&&it instanceof gt&&k.a==it.a?(k=g,g=g.a,S=S.a):0<bi(g.node,S.node)?(k=S,S=S.a):(k=g,g=g.a),(k.b=I)?I.a=k:c.a=k,I=k,K++}for(k=g||S;k;)k.b=I,I=I.a=k,K++,k=k.a;return c.b=I,c.l=K,c}function Yi(c,u){var g=new le(u);g.a=c.a,c.b?c.a.b=g:c.a=c.b=g,c.a=g,c.l++}function Gt(c,u){var g=new le(u);g.b=c.b,c.a?c.b.a=g:c.a=c.b=g,c.b=g,c.l++}function Kt(c){return(c=c.a)?c.node:null}function ye(c){return(c=Kt(c))?V(c):""}function te(c,u){return new zi(c,!!u)}function zi(c,u){this.f=c,this.b=(this.c=u)?c.b:c.a,this.a=null}function Lt(c){var u=c.b;if(u==null)return null;var g=c.a=u;return c.b=c.c?u.b:u.a,g.node}function xe(c){this.i=c,this.b=this.g=!1,this.f=null}function Ce(c){return`
18
+ `+c.toString().split(`
19
+ `).join(`
20
+ `)}function Zi(c,u){c.g=u}function Rr(c,u){c.b=u}function Et(c,u){var g=c.a(u);return g instanceof Ct?+ye(g):+g}function zt(c,u){var g=c.a(u);return g instanceof Ct?ye(g):""+g}function ci(c,u){var g=c.a(u);return g instanceof Ct?!!g.l:!!g}function ei(c,u,g){xe.call(this,c.i),this.c=c,this.h=u,this.o=g,this.g=u.g||g.g,this.b=u.b||g.b,this.c==Ns&&(g.b||g.g||g.i==4||g.i==0||!u.f?u.b||u.g||u.i==4||u.i==0||!g.f||(this.f={name:g.f.name,s:u}):this.f={name:u.f.name,s:g})}d(ei);function Je(c,u,g,S,I){u=u.a(S),g=g.a(S);var k;if(u instanceof Ct&&g instanceof Ct){for(u=te(u),S=Lt(u);S;S=Lt(u))for(I=te(g),k=Lt(I);k;k=Lt(I))if(c(V(S),V(k)))return!0;return!1}if(u instanceof Ct||g instanceof Ct){u instanceof Ct?(I=u,S=g):(I=g,S=u),k=te(I);for(var K=typeof S,it=Lt(k);it;it=Lt(k)){switch(K){case"number":it=+V(it);break;case"boolean":it=!!V(it);break;case"string":it=V(it);break;default:throw Error("Illegal primitive type for comparison.")}if(I==u&&c(it,S)||I==g&&c(S,it))return!0}return!1}return I?typeof u=="boolean"||typeof g=="boolean"?c(!!u,!!g):typeof u=="number"||typeof g=="number"?c(+u,+g):c(u,g):c(+u,+g)}ei.prototype.a=function(c){return this.c.m(this.h,this.o,c)},ei.prototype.toString=function(){var c="Binary Expression: "+this.c,c=c+Ce(this.h);return c+=Ce(this.o)};function qi(c,u,g,S){this.a=c,this.w=u,this.i=g,this.m=S}qi.prototype.toString=function(){return this.a};var Ai={};function _e(c,u,g,S){if(Ai.hasOwnProperty(c))throw Error("Binary operator already created: "+c);return c=new qi(c,u,g,S),Ai[c.toString()]=c}_e("div",6,1,function(c,u,g){return Et(c,g)/Et(u,g)}),_e("mod",6,1,function(c,u,g){return Et(c,g)%Et(u,g)}),_e("*",6,1,function(c,u,g){return Et(c,g)*Et(u,g)}),_e("+",5,1,function(c,u,g){return Et(c,g)+Et(u,g)}),_e("-",5,1,function(c,u,g){return Et(c,g)-Et(u,g)}),_e("<",4,2,function(c,u,g){return Je(function(S,I){return S<I},c,u,g)}),_e(">",4,2,function(c,u,g){return Je(function(S,I){return S>I},c,u,g)}),_e("<=",4,2,function(c,u,g){return Je(function(S,I){return S<=I},c,u,g)}),_e(">=",4,2,function(c,u,g){return Je(function(S,I){return S>=I},c,u,g)});var Ns=_e("=",3,2,function(c,u,g){return Je(function(S,I){return S==I},c,u,g,!0)});_e("!=",3,2,function(c,u,g){return Je(function(S,I){return S!=I},c,u,g,!0)}),_e("and",2,2,function(c,u,g){return ci(c,g)&&ci(u,g)}),_e("or",1,2,function(c,u,g){return ci(c,g)||ci(u,g)});function Pi(c,u,g){this.a=c,this.b=u||1,this.f=g||1}function Qi(c,u){if(u.a.length&&c.i!=4)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");xe.call(this,c.i),this.c=c,this.h=u,this.g=c.g,this.b=c.b}d(Qi),Qi.prototype.a=function(c){return c=this.c.a(c),Jt(this.h,c)},Qi.prototype.toString=function(){var c="Filter:"+Ce(this.c);return c+=Ce(this.h)};function wr(c,u){if(u.length<c.A)throw Error("Function "+c.j+" expects at least"+c.A+" arguments, "+u.length+" given");if(c.v!==null&&u.length>c.v)throw Error("Function "+c.j+" expects at most "+c.v+" arguments, "+u.length+" given");c.B&&w(u,function(g,S){if(g.i!=4)throw Error("Argument "+S+" to function "+c.j+" is not of type Nodeset: "+g)}),xe.call(this,c.i),this.h=c,this.c=u,Zi(this,c.g||vt(u,function(g){return g.g})),Rr(this,c.D&&!u.length||c.C&&!!u.length||vt(u,function(g){return g.b}))}d(wr),wr.prototype.a=function(c){return this.h.m.apply(null,xt(c,this.c))},wr.prototype.toString=function(){var u="Function: "+this.h;if(this.c.length)var c=U(this.c,function(g,S){return g+Ce(S)},"Arguments:"),u=u+Ce(c);return u};function vs(c,u,g,S,I,k,K,it,ne){this.j=c,this.i=u,this.g=g,this.D=S,this.C=I,this.m=k,this.A=K,this.v=it===void 0?K:it,this.B=!!ne}vs.prototype.toString=function(){return this.j};var Ir={};function Ut(c,u,g,S,I,k,K,it){if(Ir.hasOwnProperty(c))throw Error("Function already created: "+c+".");Ir[c]=new vs(c,u,g,S,!1,I,k,K,it)}Ut("boolean",2,!1,!1,function(c,u){return ci(u,c)},1),Ut("ceiling",1,!1,!1,function(c,u){return Math.ceil(Et(u,c))},1),Ut("concat",3,!1,!1,function(c,u){return U(jt(arguments,1),function(g,S){return g+zt(S,c)},"")},2,null),Ut("contains",2,!1,!1,function(c,u,g){return E(zt(u,c),zt(g,c))},2),Ut("count",1,!1,!1,function(c,u){return u.a(c).l},1,1,!0),Ut("false",2,!1,!1,function(){return!1},0),Ut("floor",1,!1,!1,function(c,u){return Math.floor(Et(u,c))},1),Ut("id",4,!1,!1,function(c,u){function g(it){if(Q){var ne=S.all[it];if(ne){if(ne.nodeType&&it==ne.id)return ne;if(ne.length)return nt(ne,function(Ii){return it==Ii.id})}return null}return S.getElementById(it)}var I=c.a,S=I.nodeType==9?I:I.ownerDocument,I=zt(u,c).split(/\s+/),k=[];w(I,function(it){it=g(it),!it||0<=A(k,it)||k.push(it)}),k.sort(bi);var K=new Ct;return w(k,function(it){Gt(K,it)}),K},1),Ut("lang",2,!1,!1,function(){return!1},1),Ut("last",1,!0,!1,function(c){if(arguments.length!=1)throw Error("Function last expects ()");return c.f},0),Ut("local-name",3,!1,!0,function(c,u){var g=u?Kt(u.a(c)):c.a;return g?g.localName||g.nodeName.toLowerCase():""},0,1,!0),Ut("name",3,!1,!0,function(c,u){var g=u?Kt(u.a(c)):c.a;return g?g.nodeName.toLowerCase():""},0,1,!0),Ut("namespace-uri",3,!0,!1,function(){return""},0,1,!0),Ut("normalize-space",3,!1,!0,function(c,u){return(u?zt(u,c):V(c.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1),Ut("not",2,!1,!1,function(c,u){return!ci(u,c)},1),Ut("number",1,!1,!0,function(c,u){return u?Et(u,c):+V(c.a)},0,1),Ut("position",1,!0,!1,function(c){return c.b},0),Ut("round",1,!1,!1,function(c,u){return Math.round(Et(u,c))},1),Ut("starts-with",2,!1,!1,function(c,u,g){return u=zt(u,c),c=zt(g,c),u.lastIndexOf(c,0)==0},2),Ut("string",3,!1,!0,function(c,u){return u?zt(u,c):V(c.a)},0,1),Ut("string-length",1,!1,!0,function(c,u){return(u?zt(u,c):V(c.a)).length},0,1),Ut("substring",3,!1,!1,function(c,u,g,S){if(g=Et(g,c),isNaN(g)||g==1/0||g==-1/0||(S=S?Et(S,c):1/0,isNaN(S)||S===-1/0))return"";g=Math.round(g)-1;var I=Math.max(g,0);return c=zt(u,c),S==1/0?c.substring(I):c.substring(I,g+Math.round(S))},2,3),Ut("substring-after",3,!1,!1,function(c,u,g){return u=zt(u,c),c=zt(g,c),g=u.indexOf(c),g==-1?"":u.substring(g+c.length)},2),Ut("substring-before",3,!1,!1,function(c,u,g){return u=zt(u,c),c=zt(g,c),c=u.indexOf(c),c==-1?"":u.substring(0,c)},2),Ut("sum",1,!1,!1,function(c,u){for(var g=te(u.a(c)),S=0,I=Lt(g);I;I=Lt(g))S+=+V(I);return S},1,1,!0),Ut("translate",3,!1,!1,function(c,u,g,S){u=zt(u,c),g=zt(g,c);var I=zt(S,c);for(c={},S=0;S<g.length;S++){var k=g.charAt(S);k in c||(c[k]=I.charAt(S))}for(g="",S=0;S<u.length;S++)k=u.charAt(S),g+=k in c?c[k]:k;return g},3),Ut("true",2,!1,!1,function(){return!0},0);function ii(c,u){switch(this.h=c,this.c=u===void 0?null:u,this.b=null,c){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 Ts(c){return c=="comment"||c=="text"||c=="processing-instruction"||c=="node"}ii.prototype.a=function(c){return this.b===null||this.b==c.nodeType},ii.prototype.f=function(){return this.h},ii.prototype.toString=function(){var c="Kind Test: "+this.h;return this.c===null||(c+=Ce(this.c)),c};function na(c){this.b=c,this.a=0}function aa(c){c=c.match(Cs);for(var u=0;u<c.length;u++)tn.test(c[u])&&c.splice(u,1);return new na(c)}var Cs=/\$?(?:(?![0-9-\.])(?:\*|[\w-\.]+):)?(?![0-9-\.])(?:\*|[\w-\.]+)|\/\/|\.\.|::|\d+(?:\.\d*)?|\.\d+|"[^"]*"|'[^']*'|[!<>]=|\s+|./g,tn=/^\s/;function Ae(c,u){return c.b[c.a+(u||0)]}function he(c){return c.b[c.a++]}function Xr(c){return c.b.length<=c.a}function kr(c){xe.call(this,3),this.c=c.substring(1,c.length-1)}d(kr),kr.prototype.a=function(){return this.c},kr.prototype.toString=function(){return"Literal: "+this.c};function m(c,u){this.j=c.toLowerCase();var g=this.j=="*"?"*":"http://www.w3.org/1999/xhtml";this.c=u?u.toLowerCase():g}m.prototype.a=function(c){var u=c.nodeType;return u!=1&&u!=2?!1:(u=c.localName===void 0?c.nodeName:c.localName,this.j!="*"&&this.j!=u.toLowerCase()?!1:this.c=="*"||this.c==(c.namespaceURI?c.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml"))},m.prototype.f=function(){return this.j},m.prototype.toString=function(){return"Name Test: "+(this.c=="http://www.w3.org/1999/xhtml"?"":this.c+":")+this.j};function b(c,u){if(xe.call(this,c.i),this.h=c,this.c=u,this.g=c.g,this.b=c.b,this.c.length==1){var g=this.c[0];g.u||g.c!=tr||(g=g.o,g.f()!="*"&&(this.f={name:g.f(),s:null}))}}d(b);function T(){xe.call(this,4)}d(T),T.prototype.a=function(c){var u=new Ct;return c=c.a,c.nodeType==9?Gt(u,c):Gt(u,c.ownerDocument),u},T.prototype.toString=function(){return"Root Helper Expression"};function R(){xe.call(this,4)}d(R),R.prototype.a=function(c){var u=new Ct;return Gt(u,c.a),u},R.prototype.toString=function(){return"Context Helper Expression"};function O(c){return c=="/"||c=="//"}b.prototype.a=function(c){var u=this.h.a(c);if(!(u instanceof Ct))throw Error("Filter expression must evaluate to nodeset.");c=this.c;for(var g=0,S=c.length;g<S&&u.l;g++){var I=c[g],k=te(u,I.c.a),K;if(I.g||I.c!=Ss)if(I.g||I.c!=ir)for(K=Lt(k),u=I.a(new Pi(K));(K=Lt(k))!=null;)K=I.a(new Pi(K)),u=Pe(u,K);else K=Lt(k),u=I.a(new Pi(K));else{for(K=Lt(k);(u=Lt(k))&&(!K.contains||K.contains(u))&&u.compareDocumentPosition(K)&8;K=u);u=I.a(new Pi(K))}}return u},b.prototype.toString=function(){var c="Path Expression:"+Ce(this.h);if(this.c.length){var u=U(this.c,function(g,S){return g+Ce(S)},"Steps:");c+=Ce(u)}return c};function q(c){xe.call(this,4),this.c=c,Zi(this,vt(this.c,function(u){return u.g})),Rr(this,vt(this.c,function(u){return u.b}))}d(q),q.prototype.a=function(c){var u=new Ct;return w(this.c,function(g){if(g=g.a(c),!(g instanceof Ct))throw Error("Path expression must evaluate to NodeSet.");u=Pe(u,g)}),u},q.prototype.toString=function(){return U(this.c,function(c,u){return c+Ce(u)},"Union Expression:")};function mt(c,u){this.a=c,this.b=!!u}function Jt(c,u,g){for(g||(g=0);g<c.a.length;g++)for(var S=c.a[g],I=te(u),k=u.l,K,it=0;K=Lt(I);it++){var ne=c.b?k-it:it+1;if(K=S.a(new Pi(K,ne,k)),typeof K=="number")ne=ne==K;else if(typeof K=="string"||typeof K=="boolean")ne=!!K;else if(K instanceof Ct)ne=0<K.l;else throw Error("Predicate.evaluate returned an unexpected type.");if(!ne){ne=I,K=ne.f;var Ze=ne.a;if(!Ze)throw Error("Next must be called at least once before remove.");var Ii=Ze.b,Ze=Ze.a;Ii?Ii.a=Ze:K.a=Ze,Ze?Ze.b=Ii:K.b=Ii,K.l--,ne.a=null}}return u}mt.prototype.toString=function(){return U(this.a,function(c,u){return c+Ce(u)},"Predicates:")};function tt(c,u,g,S){xe.call(this,4),this.c=c,this.o=u,this.h=g||new mt([]),this.u=!!S,u=this.h,u=0<u.a.length?u.a[0].f:null,c.b&&u&&(c=u.name,c=Q?c.toLowerCase():c,this.f={name:c,s:u.s});t:{for(c=this.h,u=0;u<c.a.length;u++)if(g=c.a[u],g.g||g.i==1||g.i==0){c=!0;break t}c=!1}this.g=c}d(tt),tt.prototype.a=function(c){var u=c.a,g=null,g=this.f,S=null,I=null,k=0;if(g&&(S=g.name,I=g.s?zt(g.s,c):null,k=1),this.u)if(this.g||this.c!=Ge)if(c=te(new tt(er,new ii("node")).a(c)),u=Lt(c))for(g=this.m(u,S,I,k);(u=Lt(c))!=null;)g=Pe(g,this.m(u,S,I,k));else g=new Ct;else g=wt(this.o,u,S,I),g=Jt(this.h,g,k);else g=this.m(c.a,S,I,k);return g},tt.prototype.m=function(c,u,g,S){return c=this.c.f(this.o,c,u,g),c=Jt(this.h,c,S)},tt.prototype.toString=function(){var c="Step:"+Ce("Operator: "+(this.u?"//":"/"));if(this.c.j&&(c+=Ce("Axis: "+this.c)),c+=Ce(this.o),this.h.a.length){var u=U(this.h.a,function(g,S){return g+Ce(S)},"Predicates:");c+=Ce(u)}return c};function Ye(c,u,g,S){this.j=c,this.f=u,this.a=g,this.b=S}Ye.prototype.toString=function(){return this.j};var je={};function Ne(c,u,g,S){if(je.hasOwnProperty(c))throw Error("Axis already created: "+c);return u=new Ye(c,u,g,!!S),je[c]=u}Ne("ancestor",function(c,u){for(var g=new Ct,S=u;S=S.parentNode;)c.a(S)&&Yi(g,S);return g},!0),Ne("ancestor-or-self",function(c,u){var g=new Ct,S=u;do c.a(S)&&Yi(g,S);while(S=S.parentNode);return g},!0);var tr=Ne("attribute",function(c,u){var g=new Ct,S=c.f();if(S=="style"&&Q&&u.style)return Gt(g,new gt(u.style,u,"style",u.style.cssText)),g;var I=u.attributes;if(I)if(c instanceof ii&&c.b===null||S=="*")for(var S=0,k;k=I[S];S++)Q?k.nodeValue&&Gt(g,Y(u,k)):Gt(g,k);else(k=I.getNamedItem(S))&&(Q?k.nodeValue&&Gt(g,Y(u,k)):Gt(g,k));return g},!1),Ge=Ne("child",function(c,u,g,S,I){return(Q?ti:ke).call(null,c,u,s(g)?g:null,s(S)?S:null,I||new Ct)},!1,!0);Ne("descendant",wt,!1,!0);var er=Ne("descendant-or-self",function(c,u,g,S){var I=new Ct;return ut(u,g,S)&&c.a(u)&&Gt(I,u),wt(c,u,g,S,I)},!1,!0),Ss=Ne("following",function(c,u,g,S){var I=new Ct;do for(var k=u;k=k.nextSibling;)ut(k,g,S)&&c.a(k)&&Gt(I,k),I=wt(c,k,g,S,I);while(u=u.parentNode);return I},!1,!0);Ne("following-sibling",function(c,u){for(var g=new Ct,S=u;S=S.nextSibling;)c.a(S)&&Gt(g,S);return g},!1),Ne("namespace",function(){return new Ct},!1);var As=Ne("parent",function(c,u){var g=new Ct;if(u.nodeType==9)return g;if(u.nodeType==2)return Gt(g,u.ownerElement),g;var S=u.parentNode;return c.a(S)&&Gt(g,S),g},!1),ir=Ne("preceding",function(c,u,g,S){var I=new Ct,k=[];do k.unshift(u);while(u=u.parentNode);for(var K=1,it=k.length;K<it;K++){var ne=[];for(u=k[K];u=u.previousSibling;)ne.unshift(u);for(var Ii=0,Ze=ne.length;Ii<Ze;Ii++)u=ne[Ii],ut(u,g,S)&&c.a(u)&&Gt(I,u),I=wt(c,u,g,S,I)}return I},!0,!0);Ne("preceding-sibling",function(c,u){for(var g=new Ct,S=u;S=S.previousSibling;)c.a(S)&&Yi(g,S);return g},!0);var rr=Ne("self",function(c,u){var g=new Ct;return c.a(u)&&Gt(g,u),g},!1);function Ei(c){xe.call(this,1),this.c=c,this.g=c.g,this.b=c.b}d(Ei),Ei.prototype.a=function(c){return-Et(this.c,c)},Ei.prototype.toString=function(){return"Unary Expression: -"+Ce(this.c)};function Li(c){xe.call(this,1),this.c=c}d(Li),Li.prototype.a=function(){return this.c},Li.prototype.toString=function(){return"Number: "+this.c};function yi(c,u){this.a=c,this.b=u}function Or(c){for(var u,g=[];;){Ue(c,"Missing right hand side of binary expression."),u=sc(c);var S=he(c.a);if(!S)break;var I=(S=Ai[S]||null)&&S.w;if(!I){c.a.a--;break}for(;g.length&&I<=g[g.length-1].w;)u=new ei(g.pop(),g.pop(),u);g.push(u,S)}for(;g.length;)u=new ei(g.pop(),g.pop(),u);return u}function Ue(c,u){if(Xr(c.a))throw Error(u)}function sr(c,u){var g=he(c.a);if(g!=u)throw Error("Bad token, expected: "+u+" got: "+g)}function Ls(c){if(c=he(c.a),c!=")")throw Error("Bad token: "+c)}function Rs(c){if(c=he(c.a),2>c.length)throw Error("Unclosed literal string");return new kr(c)}function nr(c){var u,g=[],S;if(O(Ae(c.a))){if(u=he(c.a),S=Ae(c.a),u=="/"&&(Xr(c.a)||S!="."&&S!=".."&&S!="@"&&S!="*"&&!/(?![0-9])[\w]/.test(S)))return new T;S=new T,Ue(c,"Missing next location step."),u=Mr(c,u),g.push(u)}else{t:{switch(u=Ae(c.a),S=u.charAt(0),S){case"$":throw Error("Variable reference not allowed in HTML XPath");case"(":he(c.a),u=Or(c),Ue(c,'unclosed "("'),sr(c,")");break;case'"':case"'":u=Rs(c);break;default:if(isNaN(+u))if(!Ts(u)&&/(?![0-9])[\w]/.test(S)&&Ae(c.a,1)=="("){for(u=he(c.a),u=Ir[u]||null,he(c.a),S=[];Ae(c.a)!=")"&&(Ue(c,"Missing function argument list."),S.push(Or(c)),Ae(c.a)==",");)he(c.a);Ue(c,"Unclosed function argument list."),Ls(c),u=new wr(u,S)}else{u=null;break t}else u=new Li(+he(c.a))}Ae(c.a)=="["&&(S=new mt(Ri(c)),u=new Qi(u,S))}if(u)if(O(Ae(c.a)))S=u;else return u;else u=Mr(c,"/"),S=new R,g.push(u)}for(;O(Ae(c.a));)u=he(c.a),Ue(c,"Missing next location step."),u=Mr(c,u),g.push(u);return new b(S,g)}function Mr(c,u){var g,S,I;if(u!="/"&&u!="//")throw Error('Step op should be "/" or "//"');if(Ae(c.a)==".")return S=new tt(rr,new ii("node")),he(c.a),S;if(Ae(c.a)=="..")return S=new tt(As,new ii("node")),he(c.a),S;var k;if(Ae(c.a)=="@")k=tr,he(c.a),Ue(c,"Missing attribute name");else if(Ae(c.a,1)=="::"){if(!/(?![0-9])[\w]/.test(Ae(c.a).charAt(0)))throw Error("Bad token: "+he(c.a));if(g=he(c.a),k=je[g]||null,!k)throw Error("No axis with name: "+g);he(c.a),Ue(c,"Missing node name")}else k=Ge;if(g=Ae(c.a),/(?![0-9])[\w\*]/.test(g.charAt(0)))if(Ae(c.a,1)=="("){if(!Ts(g))throw Error("Invalid node type: "+g);if(g=he(c.a),!Ts(g))throw Error("Invalid type name: "+g);sr(c,"("),Ue(c,"Bad nodetype"),I=Ae(c.a).charAt(0);var K=null;(I=='"'||I=="'")&&(K=Rs(c)),Ue(c,"Bad nodetype"),Ls(c),g=new ii(g,K)}else if(g=he(c.a),I=g.indexOf(":"),I==-1)g=new m(g);else{var K=g.substring(0,I),it;if(K=="*")it="*";else if(it=c.b(K),!it)throw Error("Namespace prefix not declared: "+K);g=g.substr(I+1),g=new m(g,it)}else throw Error("Bad token: "+he(c.a));return I=new mt(Ri(c),k.a),S||new tt(k,g,I,u=="//")}function Ri(c){for(var u=[];Ae(c.a)=="[";){he(c.a),Ue(c,"Missing predicate expression.");var g=Or(c);u.push(g),Ue(c,"Unclosed predicate expression."),sr(c,"]")}return u}function sc(c){if(Ae(c.a)=="-")return he(c.a),new Ei(sc(c));var u=nr(c);if(Ae(c.a)!="|")c=u;else{for(u=[u];he(c.a)=="|";)Ue(c,"Missing next union location path."),u.push(nr(c));c.a.a--,c=new q(u)}return c}function Fo(c){switch(c.nodeType){case 1:return h(ac,c);case 9:return Fo(c.documentElement);case 11:case 10:case 6:case 12:return nc;default:return c.parentNode?Fo(c.parentNode):nc}}function nc(){return null}function ac(c,u){if(c.prefix==u)return c.namespaceURI||"http://www.w3.org/1999/xhtml";var g=c.getAttributeNode("xmlns:"+u);return g&&g.specified?g.value||null:c.parentNode&&c.parentNode.nodeType!=9?ac(c.parentNode,u):null}function oc(c,u){if(!c.length)throw Error("Empty XPath expression.");var g=aa(c);if(Xr(g))throw Error("Invalid XPath expression.");u?r(u)=="function"||(u=o(u.lookupNamespaceURI,u)):u=function(){return null};var S=Or(new yi(g,u));if(!Xr(g))throw Error("Bad token: "+he(g));this.evaluate=function(I,k){return new wi(S.a(new Pi(I)),k)}}function wi(c,u){if(u==0)if(c instanceof Ct)u=4;else if(typeof c=="string")u=2;else if(typeof c=="number")u=1;else if(typeof c=="boolean")u=3;else throw Error("Unexpected evaluation result.");if(u!=2&&u!=1&&u!=3&&!(c instanceof Ct))throw Error("value could not be converted to the specified type");this.resultType=u;var g;switch(u){case 2:this.stringValue=c instanceof Ct?ye(c):""+c;break;case 1:this.numberValue=c instanceof Ct?+ye(c):+c;break;case 3:this.booleanValue=c instanceof Ct?0<c.l:!!c;break;case 4:case 5:case 6:case 7:var S=te(c);g=[];for(var I=Lt(S);I;I=Lt(S))g.push(I instanceof gt?I.a:I);this.snapshotLength=c.l,this.invalidIteratorState=!1;break;case 8:case 9:S=Kt(c),this.singleNodeValue=S instanceof gt?S.a:S;break;default:throw Error("Unknown XPathResult type.")}var k=0;this.iterateNext=function(){if(u!=4&&u!=5)throw Error("iterateNext called with wrong result type");return k>=g.length?null:g[k++]},this.snapshotItem=function(K){if(u!=6&&u!=7)throw Error("snapshotItem called with wrong result type");return K>=g.length||0>K?null:g[K]}}wi.ANY_TYPE=0,wi.NUMBER_TYPE=1,wi.STRING_TYPE=2,wi.BOOLEAN_TYPE=3,wi.UNORDERED_NODE_ITERATOR_TYPE=4,wi.ORDERED_NODE_ITERATOR_TYPE=5,wi.UNORDERED_NODE_SNAPSHOT_TYPE=6,wi.ORDERED_NODE_SNAPSHOT_TYPE=7,wi.ANY_UNORDERED_NODE_TYPE=8,wi.FIRST_ORDERED_NODE_TYPE=9;function z1(c){this.lookupNamespaceURI=Fo(c)}function _o(c,u){var g=c||i,S=g.Document&&g.Document.prototype||g.document;(!S.evaluate||u)&&(g.XPathResult=wi,S.evaluate=function(I,k,K,it){return new oc(I,K).evaluate(k,it)},S.createExpression=function(I,k){return new oc(I,k)},S.createNSResolver=function(I){return new z1(I)})}var en=["wgxpath","install"],Dr=i;en[0]in Dr||!Dr.execScript||Dr.execScript("var "+en[0]);for(var rn;en.length&&(rn=en.shift());)en.length||_o===void 0?Dr=Dr[rn]?Dr[rn]:Dr[rn]={}:Dr[rn]=_o;e.exports.install=_o,e.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(so)})),h0=Fu(o0()),c0=Fu(l0()),tp=h0,ep=new tp.DOMImplementation().createDocument("",""),d0=c0?.install||window.wgxpath.install,Wo=(function(){let t={document:{},XPathResult:{}};return d0(t),t.document.XPathResult=t.XPathResult,t.document})(),u0={currentDocument:ep,evaluate:Wo.evaluate,result:Wo.XPathResult,createNSResolver:Wo.createNSResolver};Yu();var ip=!(typeof window>"u"),zo=ip&&window.document!==void 0,qo=!(typeof DedicatedWorkerGlobalScope>"u"),oa=()=>typeof __non_webpack_require__<"u"?__non_webpack_require__:typeof process<"u"&&process.versions?.node!=null&&bl!==void 0?bl:t=>null,Wr={extRequire(t){return typeof process<"u"&&bl!==void 0?oa()(t):null},windowSupported:ip,documentSupported:zo,webworker:qo,xmldom:tp,document:ep,fs:zo||qo?null:oa()("fs"),url:mr.url,jsonPath:(function(){if(zo||qo)return mr.url;if({}.SRE_JSON_PATH||so.SRE_JSON_PATH)return{}.SRE_JSON_PATH||so.SRE_JSON_PATH;try{return oa().resolve("speech-rule-engine").replace(/sre\.js$/,"")+"mathmaps"}catch{}try{return oa().resolve(".").replace(/sre\.js$/,"")+"mathmaps"}catch{}return typeof __dirname<"u"?__dirname+(__dirname.match(/lib?$/)?"/mathmaps":"/lib/mathmaps"):process.cwd()+"/lib/mathmaps"})(),xpath:u0};function p0(t){return t.match("/$")?t:t+"/"}var Xt=class Nn{static getInstance(){return Nn.instance=Nn.instance||new Nn,Nn.instance}init(e){return e&&this.startDebugFile_(e),this.isActive_=!0,this.fileHandle}output(...e){this.isActive_&&this.output_(e)}generate(e){this.isActive_&&this.output_(e.apply(e,[]))}exit(e=()=>{}){this.stream_&&this.fileHandle.then(()=>{this.isActive_&&this.stream_&&(this.stream_.end("","",e),this.stream_=null)}),this.isActive_=!1}constructor(){this.isActive_=!1,this.fileHandle=Promise.resolve(),this.stream_=null}startDebugFile_(e){this.fileHandle=Wr.fs.promises.open(e,"w"),this.fileHandle=this.fileHandle.then(i=>{this.stream_=i.createWriteStream(e),this.outputFunction=function(...r){this.stream_.write(r.join(" ")),this.stream_.write(`
21
+ `)}.bind(this),this.stream_.on("error",function(r){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_(e){if(this.stream_){this.fileHandle.then(()=>this.outputFunction.apply(this.outputFunction,["Speech Rule Engine Debugger:"].concat(e)));return}console.info(...["Speech Rule Engine Debugger:"].concat(e))}},Xs=class vn{constructor(e={}){this.delay=!1,this.domain="clearspeak",this.style=Le.DEFAULT_VALUES[Oe.STYLE],this.locale=Le.DEFAULT_VALUES[Oe.LOCALE],this.subiso="",this.modality=Le.DEFAULT_VALUES[Oe.MODALITY],this.speech=wl.NONE,this.markup=Il.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(e)}set(e){this.ensureDomain(e);for(let[i,r]of Object.entries(e))if(vn.BINARY_FEATURES.includes(i)||vn.STRING_FEATURES.includes(i)){this[i]=r;continue}}json(){let e={};return[].concat(vn.STRING_FEATURES,vn.BINARY_FEATURES).forEach(i=>e[i]=this[i]),e}ensureDomain(e){if(e.modality&&e.modality!=="speech"||!e.modality&&this.modality!=="speech"||!e.domain&&!e.locale)return;if(e.domain==="default"){e.domain="mathspeak";return}let i=e.locale||this.locale,r=e.domain||this.domain;if(m0.indexOf(i)!==-1&&r!=="mathspeak"){e.domain="mathspeak";return}if(i==="en"){f0.indexOf(r)===-1&&(e.domain="mathspeak");return}r!=="mathspeak"&&r!=="clearspeak"&&(e.domain="mathspeak")}};Xs.BINARY_FEATURES=["automark","mark","character","cleanpause","strict","structure","aria","pprint","cayleyshort","linebreaks","tree"],Xs.STRING_FEATURES=["markup","style","domain","speech","walker","locale","delay","modality","rate","rules","subiso","prune"];var m0=["ca","da","es"],f0=["chromevox","clearspeak","mathspeak","emacspeak","html"],Ol=class extends Error{constructor(t=""){super(),this.message=t,this.name="SRE Error"}},xs=class rs{set defaultLocale(e){this._defaultLocale=mr.ensureLocale(e,this._defaultLocale)}get defaultLocale(){return this._defaultLocale}static getInstance(){return rs.instance=rs.instance||new rs,rs.instance}static defaultEvaluator(e,i){return e}static evaluateNode(e){return rs.nodeEvaluator(e)}getRate(){let e=parseInt(this.options.rate,10);return isNaN(e)?100:e}setDynamicCstr(e){if(this.defaultLocale&&(Le.DEFAULT_VALUES[Oe.LOCALE]=this.defaultLocale),e){let a=Object.keys(e);for(let o=0;o<a.length;o++){let h=a[o];if(Le.DEFAULT_ORDER.indexOf(h)!==-1){let d=e[h];this.options[h]=d}}}let i=[this.options.locale,this.options.modality,this.options.domain,this.options.style].join("."),r=jn.createProp([Le.DEFAULT_VALUES[Oe.LOCALE]],[Le.DEFAULT_VALUES[Oe.MODALITY]],[Le.DEFAULT_VALUES[Oe.DOMAIN]],[Le.DEFAULT_VALUES[Oe.STYLE]]),s=this.comparators[this.options.domain],n=this.parsers[this.options.domain];this.parser=n||this.defaultParser,this.dynamicCstr=this.parser.parse(i),this.dynamicCstr.updateProperties(r.getProperties()),this.comparator=s?s():new r0(this.dynamicCstr)}constructor(){this.options=new Xs,this.config=!1,this.customLoader=null,this.parsers={},this.comparator=null,this.mode=Un.SYNC,this.init=!0,this.comparators={},this._defaultLocale=Le.DEFAULT_VALUES[Oe.LOCALE],this.options.locale=this.defaultLocale,this.evaluator=rs.defaultEvaluator,this.defaultParser=new i0(Le.DEFAULT_ORDER),this.parser=this.defaultParser,this.dynamicCstr=Le.defaultCstr()}configurate(e){this.mode===Un.HTTP&&!Wr.webworker&&!this.config&&(b0(e),this.config=!0),g0(e)}setCustomLoader(e){e&&(this.customLoader=e)}setup(e){e.mode!==void 0&&(this.mode=e.mode),this.configurate(e),this.options.set(e),e.json&&(Wr.jsonPath=p0(e.json)),this.setCustomLoader(e.custom)}json(){return Object.assign({mode:this.mode},this.options.json())}reset(){this.options=new Xs}};xs.nodeEvaluator=function(t){return[]};function g0(t){if(typeof SREfeature<"u")for(let[e,i]of Object.entries(SREfeature))t[e]=i}function b0(t){let e=document.documentElement.querySelectorAll('script[type="text/x-sre-config"]');for(let i=0,r=e.length;i<r;i++){let s;try{s=e[i].innerHTML;let n=JSON.parse(s);for(let[a,o]of Object.entries(n))t[a]=o}catch{Xt.getInstance().output("Illegal configuration ",s)}}}var cc=class Ml{static get(e=xs.getInstance().options.locale){return Ml.promises[e]||Promise.resolve("")}static getall(){return Promise.all(Object.values(Ml.promises))}};cc.loaded={},cc.promises={};var Oh=Wr.xpath,E0={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 y0(t){return E0[t]||null}var x0=class{constructor(){this.lookupNamespaceURI=y0}};function N0(t,e,i){return Oh.evaluate(t,e,new x0,i,null)}function v0(t,e){let i;try{i=N0(t,e,Oh.result.ORDERED_NODE_ITERATOR_TYPE)}catch{return[]}let r=[];for(let s=i.iterateNext();s;s=i.iterateNext())r.push(s);return r}function be(t){let e=[];for(let i=0,r=t.length;i<r;i++)e.push(t[i]);return e}function T0(t){return t=t.replace(/&nbsp;/g," "),t.replace(/>[ \f\n\r\t\v\u200b]+</g,"><").trim()}function Hn(t){let e=new Wr.xmldom.DOMParser,i=T0(t),r=!!i.match(/&(?!lt|gt|amp|quot|apos)\w+;/g);if(!i)throw new Ol("Empty input!");try{let s=e.parseFromString(i,r?"text/html":"text/xml");return xs.getInstance().mode===Un.HTTP?(Oh.currentDocument=s,r?s.body.childNodes[0]:s.documentElement):s.documentElement}catch(s){throw new Ol("Illegal input: "+s.message)}}var zr;(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"})(zr||(zr={}));function $i(t,e){t.parentNode&&(t.parentNode.insertBefore(e,t),t.parentNode.removeChild(t))}function Wn(t){return Wr.document.createElement(t)}function C0(t){return Wr.document.createTextNode(t)}function rp(t){let e="",i=/(>)(<)(\/*)/g;t=t.replace(i,`$1\r
22
+ $2$3`);let r=0,s=t.split(`\r
23
+ `);for(i=/(\.)*(<)(\/*)/g,s=s.map(n=>n.replace(i,`$1\r
24
+ $2$3`).split(`\r
25
+ `)).reduce((n,a)=>n.concat(a),[]);s.length;){let n=s.shift();if(!n)continue;let a=0;if(n.match(/^<\w[^>/]*>[^>]+$/)){let o=S0(n,s[0]);o[0]?o[1]?(n+=s.shift().slice(0,-o[1].length),o[1].trim()&&s.unshift(o[1])):n+=s.shift():a=1}else if(n.match(/^<\/\w/))r!==0&&--r;else if(n.match(/^<\w[^>]*[^/]>.*$/))a=1;else if(n.match(/^<\w[^>]*\/>.+$/)){let o=n.indexOf(">")+1,h=n.slice(o);h.trim()&&s.unshift(),n=n.slice(0,o)+h}else a=0;e+=Array(r+1).join(" ")+n+`\r
26
+ `,r+=a}return e}function S0(t,e){if(!e)return[!1,""];let i=t.match(/^<([^> ]+).*>/),r=e.match(/^<\/([^>]+)>(.*)/);return i&&r&&i[1]===r[1]?[!0,r[2]]:[!1,""]}function A0(t,e){return t.querySelectorAll?be(t.querySelectorAll(`[${e}]`)):v0(`.//*[@${e}]`,t)}function Mt(t){return t.tagName.toUpperCase()}function L0(t){return t.cloneNode(!0)}function sp(t){return new Wr.xmldom.XMLSerializer().serializeToString(t)}var Mh=class{constructor(t,e,i){this.domain=t,this.name=e,this.func=i,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))}},Dh=class{constructor(t,e,i,r={}){this.domain=t,this.name=e,this.func=i,this.def=r,this.active=!1}visit(t,e){let i=this.func(t,e);t.addAnnotation(this.domain,i[0]);for(let r=0,s;s=t.childNodes[r];r++)i=this.visit(s,i[1]);for(let r=0,s;s=t.contentNodes[r];r++)i=this.visit(s,i[1]);return i}},Ph=new Map,Bh=new Map;function wo(t){let e=t.domain+":"+t.name;t instanceof Mh?Ph.set(e,t):Bh.set(e,t)}function Io(t,e){let i=t+":"+e,r=Ph.get(i)||Bh.get(i);r&&(r.active=!0)}function R0(t){for(let e of Ph.values())e.active&&e.annotate(t);for(let e of Bh.values())e.active&&e.visit(t,Object.assign({},e.def))}var yt;(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"})(yt||(yt={}));var ve;(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"})(ve||(ve={}));var J;(function(t){t.LATINCAP="latinCap",t.LATINSMALL="latinSmall",t.GREEKCAP="greekCap",t.GREEKSMALL="greekSmall",t.DIGIT="digit"})(J||(J={}));function w0(t){let e=t.toString(16).toUpperCase();return e.length>3?e:("000"+e).slice(-4)}function np([t,e],i){let r=parseInt(t,16),s=parseInt(e,16),n=[];for(let a=r;a<=s;a++){let o=w0(a);i[o]!==!1&&(o=i[o]||o,n.push(o))}return n}function ap(t,e={}){return np(t,e).map(i=>String.fromCodePoint(parseInt(i,16)))}function I0(t){let e=[];for(let i of t){if(Array.isArray(i)){e=e.concat(ap(i));continue}e.push(String.fromCodePoint(parseInt(i,16)))}return e}function k0(t){let e=[];for(let i of t){if(Array.isArray(i)){e=e.concat(np(i,{}).map(r=>parseInt(r,16)));continue}e.push(parseInt(i,16))}return e}var O0=[{interval:["1D400","1D419"],base:J.LATINCAP,subst:{},capital:!0,category:"Lu",font:yt.BOLD},{interval:["1D41A","1D433"],base:J.LATINSMALL,subst:{},capital:!1,category:"Ll",font:yt.BOLD},{interval:["1D56C","1D585"],base:J.LATINCAP,subst:{},capital:!0,category:"Lu",font:yt.BOLDFRAKTUR},{interval:["1D586","1D59F"],base:J.LATINSMALL,subst:{},capital:!1,category:"Ll",font:yt.BOLDFRAKTUR},{interval:["1D468","1D481"],base:J.LATINCAP,subst:{},capital:!0,category:"Lu",font:yt.BOLDITALIC},{interval:["1D482","1D49B"],base:J.LATINSMALL,subst:{},capital:!1,category:"Ll",font:yt.BOLDITALIC},{interval:["1D4D0","1D4E9"],base:J.LATINCAP,subst:{},capital:!0,category:"Lu",font:yt.BOLDSCRIPT},{interval:["1D4EA","1D503"],base:J.LATINSMALL,subst:{},capital:!1,category:"Ll",font:yt.BOLDSCRIPT},{interval:["1D538","1D551"],base:J.LATINCAP,subst:{"1D53A":"2102","1D53F":"210D","1D545":"2115","1D547":"2119","1D548":"211A","1D549":"211D","1D551":"2124"},capital:!0,category:"Lu",font:yt.DOUBLESTRUCK},{interval:["1D552","1D56B"],base:J.LATINSMALL,subst:{},capital:!1,category:"Ll",font:yt.DOUBLESTRUCK},{interval:["1D504","1D51D"],base:J.LATINCAP,subst:{"1D506":"212D","1D50B":"210C","1D50C":"2111","1D515":"211C","1D51D":"2128"},capital:!0,category:"Lu",font:yt.FRAKTUR},{interval:["1D51E","1D537"],base:J.LATINSMALL,subst:{},capital:!1,category:"Ll",font:yt.FRAKTUR},{interval:["FF21","FF3A"],base:J.LATINCAP,subst:{},capital:!0,category:"Lu",font:yt.FULLWIDTH},{interval:["FF41","FF5A"],base:J.LATINSMALL,subst:{},capital:!1,category:"Ll",font:yt.FULLWIDTH},{interval:["1D434","1D44D"],base:J.LATINCAP,subst:{},capital:!0,category:"Lu",font:yt.ITALIC},{interval:["1D44E","1D467"],base:J.LATINSMALL,subst:{"1D455":"210E"},capital:!1,category:"Ll",font:yt.ITALIC},{interval:["1D670","1D689"],base:J.LATINCAP,subst:{},capital:!0,category:"Lu",font:yt.MONOSPACE},{interval:["1D68A","1D6A3"],base:J.LATINSMALL,subst:{},capital:!1,category:"Ll",font:yt.MONOSPACE},{interval:["0041","005A"],base:J.LATINCAP,subst:{},capital:!0,category:"Lu",font:yt.NORMAL},{interval:["0061","007A"],base:J.LATINSMALL,subst:{},capital:!1,category:"Ll",font:yt.NORMAL},{interval:["1D49C","1D4B5"],base:J.LATINCAP,subst:{"1D49D":"212C","1D4A0":"2130","1D4A1":"2131","1D4A3":"210B","1D4A4":"2110","1D4A7":"2112","1D4A8":"2133","1D4AD":"211B"},capital:!0,category:"Lu",font:yt.SCRIPT},{interval:["1D4B6","1D4CF"],base:J.LATINSMALL,subst:{"1D4BA":"212F","1D4BC":"210A","1D4C4":"2134"},capital:!1,category:"Ll",font:yt.SCRIPT},{interval:["1D5A0","1D5B9"],base:J.LATINCAP,subst:{},capital:!0,category:"Lu",font:yt.SANSSERIF},{interval:["1D5BA","1D5D3"],base:J.LATINSMALL,subst:{},capital:!1,category:"Ll",font:yt.SANSSERIF},{interval:["1D608","1D621"],base:J.LATINCAP,subst:{},capital:!0,category:"Lu",font:yt.SANSSERIFITALIC},{interval:["1D622","1D63B"],base:J.LATINSMALL,subst:{},capital:!1,category:"Ll",font:yt.SANSSERIFITALIC},{interval:["1D5D4","1D5ED"],base:J.LATINCAP,subst:{},capital:!0,category:"Lu",font:yt.SANSSERIFBOLD},{interval:["1D5EE","1D607"],base:J.LATINSMALL,subst:{},capital:!1,category:"Ll",font:yt.SANSSERIFBOLD},{interval:["1D63C","1D655"],base:J.LATINCAP,subst:{},capital:!0,category:"Lu",font:yt.SANSSERIFBOLDITALIC},{interval:["1D656","1D66F"],base:J.LATINSMALL,subst:{},capital:!1,category:"Ll",font:yt.SANSSERIFBOLDITALIC},{interval:["0391","03A9"],base:J.GREEKCAP,subst:{"03A2":"03F4"},capital:!0,category:"Lu",font:yt.NORMAL},{interval:["03B0","03D0"],base:J.GREEKSMALL,subst:{"03B0":"2207","03CA":"2202","03CB":"03F5","03CC":"03D1","03CD":"03F0","03CE":"03D5","03CF":"03F1","03D0":"03D6"},capital:!1,category:"Ll",font:yt.NORMAL},{interval:["1D6A8","1D6C0"],base:J.GREEKCAP,subst:{},capital:!0,category:"Lu",font:yt.BOLD},{interval:["1D6C1","1D6E1"],base:J.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:yt.BOLD},{interval:["1D6E2","1D6FA"],base:J.GREEKCAP,subst:{},capital:!0,category:"Lu",font:yt.ITALIC},{interval:["1D6FB","1D71B"],base:J.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:yt.ITALIC},{interval:["1D71C","1D734"],base:J.GREEKCAP,subst:{},capital:!0,category:"Lu",font:yt.BOLDITALIC},{interval:["1D735","1D755"],base:J.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:yt.BOLDITALIC},{interval:["1D756","1D76E"],base:J.GREEKCAP,subst:{},capital:!0,category:"Lu",font:yt.SANSSERIFBOLD},{interval:["1D76F","1D78F"],base:J.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:yt.SANSSERIFBOLD},{interval:["1D790","1D7A8"],base:J.GREEKCAP,subst:{},capital:!0,category:"Lu",font:yt.SANSSERIFBOLDITALIC},{interval:["1D7A9","1D7C9"],base:J.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:yt.SANSSERIFBOLDITALIC},{interval:["0030","0039"],base:J.DIGIT,subst:{},offset:0,category:"Nd",font:yt.NORMAL},{interval:["2070","2079"],base:J.DIGIT,subst:{2071:"00B9",2072:"00B2",2073:"00B3"},offset:0,category:"No",font:ve.SUPER},{interval:["2080","2089"],base:J.DIGIT,subst:{},offset:0,category:"No",font:ve.SUB},{interval:["245F","2473"],base:J.DIGIT,subst:{"245F":"24EA"},offset:0,category:"No",font:ve.CIRCLED},{interval:["3251","325F"],base:J.DIGIT,subst:{},offset:21,category:"No",font:ve.CIRCLED},{interval:["32B1","32BF"],base:J.DIGIT,subst:{},offset:36,category:"No",font:ve.CIRCLED},{interval:["2474","2487"],base:J.DIGIT,subst:{},offset:1,category:"No",font:ve.PARENTHESIZED},{interval:["2487","249B"],base:J.DIGIT,subst:{2487:"1F100"},offset:0,category:"No",font:ve.PERIOD},{interval:["2775","277F"],base:J.DIGIT,subst:{2775:"24FF"},offset:0,category:"No",font:ve.NEGATIVECIRCLED},{interval:["24EB","24F4"],base:J.DIGIT,subst:{},offset:11,category:"No",font:ve.NEGATIVECIRCLED},{interval:["24F5","24FE"],base:J.DIGIT,subst:{},offset:1,category:"No",font:ve.DOUBLECIRCLED},{interval:["277F","2789"],base:J.DIGIT,subst:{"277F":"1F10B"},offset:0,category:"No",font:ve.CIRCLEDSANSSERIF},{interval:["2789","2793"],base:J.DIGIT,subst:{2789:"1F10C"},offset:0,category:"No",font:ve.NEGATIVECIRCLEDSANSSERIF},{interval:["FF10","FF19"],base:J.DIGIT,subst:{},offset:0,category:"Nd",font:yt.FULLWIDTH},{interval:["1D7CE","1D7D7"],base:J.DIGIT,subst:{},offset:0,category:"Nd",font:yt.BOLD},{interval:["1D7D8","1D7E1"],base:J.DIGIT,subst:{},offset:0,category:"Nd",font:yt.DOUBLESTRUCK},{interval:["1D7E2","1D7EB"],base:J.DIGIT,subst:{},offset:0,category:"Nd",font:yt.SANSSERIF},{interval:["1D7EC","1D7F5"],base:J.DIGIT,subst:{},offset:0,category:"Nd",font:yt.SANSSERIFBOLD},{interval:["1D7F6","1D7FF"],base:J.DIGIT,subst:{},offset:0,category:"Nd",font:yt.MONOSPACE},{interval:["1F101","1F10A"],base:J.DIGIT,subst:{},offset:0,category:"No",font:ve.COMMA},{interval:["24B6","24CF"],base:J.LATINCAP,subst:{},capital:!0,category:"So",font:ve.CIRCLED},{interval:["24D0","24E9"],base:J.LATINSMALL,subst:{},capital:!1,category:"So",font:ve.CIRCLED},{interval:["1F110","1F129"],base:J.LATINCAP,subst:{},capital:!0,category:"So",font:ve.PARENTHESIZED},{interval:["249C","24B5"],base:J.LATINSMALL,subst:{},capital:!1,category:"So",font:ve.PARENTHESIZED},{interval:["1F130","1F149"],base:J.LATINCAP,subst:{},capital:!0,category:"So",font:ve.SQUARED},{interval:["1F170","1F189"],base:J.LATINCAP,subst:{},capital:!0,category:"So",font:ve.NEGATIVESQUARED},{interval:["1F150","1F169"],base:J.LATINCAP,subst:{},capital:!0,category:"So",font:ve.NEGATIVECIRCLED}],Dl=new Map;function op(t,e){return t+e.split("-").map(i=>i[0].toUpperCase()+i.slice(1)).join("")}for(let t of O0){let e=op(t.base,t.font),i=ap(t.interval,t.subst),r=Dl.get(e);if(r){r.unicode=r.unicode.concat(i);continue}r=t,r.unicode=i,Dl.set(e,r)}var Pl;(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"})(Pl||(Pl={}));var f=Object.assign({},Pl),Bl;(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"})(Bl||(Bl={}));var x=Object.assign({},Bl),Fl;(function(t){t.CALIGRAPHIC="caligraphic",t.CALIGRAPHICBOLD="caligraphic-bold",t.OLDSTYLE="oldstyle",t.OLDSTYLEBOLD="oldstyle-bold",t.UNKNOWN="unknown"})(Fl||(Fl={}));var Qt=Object.assign(Object.assign(Object.assign({},yt),Fl),ve),_l;(function(t){t.ALLLETTERS="allLetters",t.D="d",t.BAR="bar",t.TILDE="tilde",t.CURLY="curly",t.PAREN="paren",t.BRACKET="bracket",t.FLOOR="floor",t.CEIL="ceil"})(_l||(_l={}));var Me=Object.assign(Object.assign({},J),_l),M0=function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(i[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(i[r[s]]=t[r[s]]);return i},fr={functionApplication:String.fromCodePoint(8289),invisibleTimes:String.fromCodePoint(8290),invisibleComma:String.fromCodePoint(8291),invisiblePlus:String.fromCodePoint(8292)},D0=class extends Map{get(t){return super.get(t)||{role:x.UNKNOWN,type:f.UNKNOWN,font:Qt.UNKNOWN}}},P0=class extends Map{set(t,e,i=""){return super.set(this.secKey(e,t),i||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}`}},Yt={Meaning:new D0,Secondary:new P0,FencesHoriz:new Map,FencesVert:new Map,FencesSecondary:new Map,LatexCommands:new Map};function _r(t,e){for(let i of t)Yt.Meaning.set(i,{role:e.role||x.UNKNOWN,type:e.type||f.UNKNOWN,font:e.font||Qt.UNKNOWN}),e.secondary&&Yt.Secondary.set(i,e.secondary)}function B0(){[{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:f.PUNCTUATION,role:x.UNKNOWN},{set:["22","ab","bb","2dd",["2018","201f"],"2039","203a",["301d","301f"],"fe10","ff02","ff07"],type:f.PUNCTUATION,role:x.QUOTES},{set:["3b","204f","2a1f","2a3e","fe14","fe54","ff1b"],type:f.PUNCTUATION,role:x.SEMICOLON},{set:["3f","203d","fe16","fe56","ff1f"],type:f.PUNCTUATION,role:x.QUESTION},{set:["21","fe15","fe57","ff01"],type:f.PUNCTUATION,role:x.EXCLAMATION},{set:["5e","60","a8","aa","b4","ba","2c7",["2d8","2da"],"2040","207a","207d","207e","ff3e","ff40"],type:f.PUNCTUATION,role:x.OVERACCENT},{set:["b8","2db","2038","203f","2054","208a","208d","208e"],type:f.PUNCTUATION,role:x.UNDERACCENT},{set:["3a","2982","fe13","fe30","fe55","ff1a"],type:f.PUNCTUATION,role:x.COLON},{set:["2c","2063","fe50","ff0c"],type:f.PUNCTUATION,role:x.COMMA},{set:["2026",["22ee","22f1"],"fe19"],type:f.PUNCTUATION,role:x.ELLIPSIS},{set:["2e","fe52","ff0e"],type:f.PUNCTUATION,role:x.FULLSTOP},{set:["2d","207b","208b","2212","2796","fe63","ff0d"],type:f.OPERATOR,role:x.DASH,secondary:Me.BAR},{set:["5f","af",["2010","2015"],"203e","208b",["fe49","fe4f"],"fe58","ff3f","ffe3"],type:f.PUNCTUATION,role:x.DASH,secondary:Me.BAR},{set:["7e","2dc","2f7","303","330","334","2053","223c","223d","301c","ff5e"],type:f.OPERATOR,role:x.TILDE,secondary:Me.TILDE},{set:["27","2b9","2ba",["2032","2037"],"2057"],type:f.PUNCTUATION,role:x.PRIME},{set:["b0"],type:f.PUNCTUATION,role:x.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:f.OPERATOR,role:x.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:f.OPERATOR,role:x.MULTIPLICATION},{set:["2d","af","2010","2011","2052","207b","208b","2212","2216","2238","2242","2296","229f","2796","29ff",["2a29","2a2c"],"2a3a","2a41","fe63","ff0d"],type:f.OPERATOR,role:x.SUBTRACTION},{set:["2f","f7","2044","2215","2298","2797","27cc","29bc",["29f5","29f9"],"2a38"],type:f.OPERATOR,role:x.DIVISION},{set:["25","2030","2031","ff05","fe6a"],type:f.OPERATOR,role:x.POSTFIXOP},{set:["ac","2200","2201","2203","2204","2206",["221a","221c"],"2310","ffe2"],type:f.OPERATOR,role:x.PREFIXOP},{set:["2320","2321","23aa","23ae","23af","23b2","23b3","23b6","23b7"],type:f.OPERATOR,role:x.PREFIXOP},{set:["1d7ca","1d7cb"],type:f.OPERATOR,role:x.PREFIXOP,font:Qt.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:f.RELATION,role:x.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:f.RELATION,role:x.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:f.RELATION,role:x.SET},{set:["2236",["27e0","27e5"],"292b","292c",["29b5","29bb"],"29be","29bf",["29c2","29d0"]],type:f.RELATION,role:x.UNKNOWN},{set:["2205",["29b0","29b4"]],type:f.IDENTIFIER,role:x.SETEMPTY},{set:["1ab2","221e",["29dc","29de"]],type:f.IDENTIFIER,role:x.INFTY},{set:["22a2","22a3",["22a6","22af"],"27da","27db","27dd","27de","2ade",["2ae2","2ae6"],"2aec","2aed"],type:f.RELATION,role:x.LOGIC},{set:["22a4","22a5","22ba","27d8","27d9","27df","2adf","2ae0",["2ae7","2aeb"],"2af1"],type:f.IDENTIFIER,role:x.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:f.RELATION,role:x.ARROW},{set:["2208","220a",["22f2","22f9"],"22ff","27d2","2ad9"],type:f.OPERATOR,role:x.ELEMENT},{set:["2209"],type:f.OPERATOR,role:x.NONELEMENT},{set:["220b","220d",["22fa","22fe"]],type:f.OPERATOR,role:x.REELEMENT},{set:["220c"],type:f.OPERATOR,role:x.RENONELEMENT},{set:[["220f","2211"],["22c0","22c3"],["2a00","2a0b"],"2a3f","2afc","2aff"],type:f.LARGEOP,role:x.SUM},{set:["2140"],type:f.LARGEOP,role:x.SUM,font:Qt.DOUBLESTRUCK},{set:[["222b","2233"],["2a0c","2a17"],["2a17","2a1c"]],type:f.LARGEOP,role:x.INTEGRAL},{set:[["2500","257F"]],type:f.RELATION,role:x.BOX},{set:[["2580","259F"]],type:f.IDENTIFIER,role:x.BLOCK},{set:[["25A0","25FF"],["2B12","2B2F"],["2B50","2B59"]],type:f.RELATION,role:x.GEOMETRY},{set:["220e","2300","2302","2311","29bd","29e0",["29e8","29f3"],"2a1e","2afe","ffed","ffee"],type:f.OPERATOR,role:x.GEOMETRY},{set:[["221f","2222"],"22be","22bf",["2312","2314"],"237c","27c0",["299b","29af"]],type:f.OPERATOR,role:x.GEOMETRY},{set:["24",["a2","a5"],"b5","2123",["2125","2127"],"212a","212b","fe69","ff04","ffe0","ffe1","ffe5","ffe6"],type:f.IDENTIFIER,role:x.UNKNOWN},{set:["a9","ae","210f","2114","2116","2117",["211e","2122"],"212e","2132",["2139","213b"],["2141","2144"],"214d","214e",["1f12a","1f12c"],"1f18a"],type:f.IDENTIFIER,role:x.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:f.OPERATOR,role:x.UNKNOWN},{set:["2605","2606","26aa","26ab",["2720","274d"]],type:f.OPERATOR,role:x.UNKNOWN},{set:[["2145","2149"]],type:f.IDENTIFIER,role:x.LATINLETTER,font:Qt.DOUBLESTRUCKITALIC,secondary:Me.ALLLETTERS},{set:[["213c","213f"]],type:f.IDENTIFIER,role:x.GREEKLETTER,font:Qt.DOUBLESTRUCK,secondary:Me.ALLLETTERS},{set:["3d0","3d7","3f6",["1d26","1d2a"],"1d5e","1d60",["1d66","1d6a"]],type:f.IDENTIFIER,role:x.GREEKLETTER,font:Qt.NORMAL,secondary:Me.ALLLETTERS},{set:[["2135","2138"]],type:f.IDENTIFIER,role:x.OTHERLETTER,font:Qt.NORMAL,secondary:Me.ALLLETTERS},{set:["131","237"],type:f.IDENTIFIER,role:x.LATINLETTER,font:Qt.NORMAL},{set:["1d6a4","1d6a5"],type:f.IDENTIFIER,role:x.LATINLETTER,font:Qt.ITALIC},{set:["2113","2118"],type:f.IDENTIFIER,role:x.LATINLETTER,font:Qt.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:f.IDENTIFIER,role:x.LATINLETTER,font:Qt.NORMAL},{set:[["00bc","00be"],["2150","215f"],"2189"],type:f.NUMBER,role:x.FLOAT},{set:["23E8",["3248","324f"]],type:f.NUMBER,role:x.INTEGER},{set:[["214A","214C"],"2705","2713","2714","2717","2718"],type:f.IDENTIFIER,role:x.UNKNOWN},{set:["20","a0","ad",["2000","200f"],["2028","202f"],["205f","2060"],"206a","206b","206e","206f","feff",["fff9","fffb"]],type:f.TEXT,role:x.SPACE},{set:["7c","a6","2223","23b8","23b9","23d0","2758",["fe31","fe34"],"ff5c","ffe4","ffe8"],type:f.FENCE,role:x.NEUTRAL},{set:["2016","2225","2980","2af4"],type:f.FENCE,role:x.METRIC}].forEach(t=>{var{set:e}=t,i=M0(t,["set"]);return _r(I0(e),i)})}function nn(t,e,i=1){let r={},s=k0(e);for(let n of s)r[n]||(t.set(String.fromCodePoint(n),String.fromCodePoint(n+i)),r[n]=!0,r[n+i]=!0)}var F0=["0028","0029","207D","207E","208D","208E","2768","2769","276A","276B","27EE","27EF","FE59","FE5A","FF08","FF09"],_0=["005B","005D","2045","2046","298B","298C","298D","298E","298F","2990","FF3B","FF3D"],j0=["007B","007D","2774","2775","FE5B","FE5C","FF5B","FF5D"],U0=["2308","2309","2E22","2E23","300C","300E","FF62"],H0=["230A","230B","2E24","2E25","300D","300F","FF63"];function W0(){nn(Yt.FencesVert,["23b4",["23dc","23e1"],["fe35","fe44"],"fe47"]),nn(Yt.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"]),nn(Yt.FencesHoriz,["5b","7b","ff3b","ff5b"],2),nn(Yt.FencesHoriz,[["239b","23a6"]],3),nn(Yt.FencesHoriz,[["23a7","23a9"]],4),_r([...Yt.FencesHoriz.keys()],{type:f.FENCE,role:x.OPEN}),_r([...Yt.FencesHoriz.values()],{type:f.FENCE,role:x.CLOSE}),_r([...Yt.FencesVert.keys()],{type:f.FENCE,role:x.TOP}),_r([...Yt.FencesVert.values()],{type:f.FENCE,role:x.BOTTOM}),an(F0,Me.PAREN),an(j0,Me.CURLY),an(_0,Me.BRACKET),an(U0,Me.CEIL),an(H0,Me.FLOOR)}function an(t,e){for(let i of t){let r=String.fromCodePoint(parseInt(i,16));Yt.Secondary.set(r,e),Yt.FencesSecondary.set(r,e)}}var z0="cos.cot.csc.sec.sin.tan.arccos.arccot.arccsc.arcsec.arcsin.arctan.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".split(".");function q0(){_r(["inf","lim","liminf","limsup","max","min","sup","injlim","projlim"],{type:f.FUNCTION,role:x.LIMFUNC}),_r(z0,{type:f.FUNCTION,role:x.PREFIXFUNC}),_r(["mod","rem"],{type:f.OPERATOR,role:x.PREFIXFUNC})}function G0(t,e){return t.type===e.type&&t.role===e.role&&t.font===e.font}function V0(t,e){for(let[i,r]of Object.entries(e)){let s=t[i];s!==void 0&&Yt.Meaning.set(s,r)}}function X0(t,e){for(let[i,r]of Object.entries(e)){let s=t[i];s!==void 0&&Yt.Secondary.set(s,r)}}function on(t,e,i,r,s,n=[],a={},o={}){let h=Dl.get(op(t,r));h&&(h.unicode.forEach(d=>{Yt.Meaning.set(d,{type:e,role:i,font:s}),n.forEach(p=>Yt.Secondary.set(d,p))}),V0(h.unicode,a),X0(h.unicode,o))}function $0(){for(let[t,e]of Object.entries(Qt)){let i=ve[t]?Qt.UNKNOWN:e===Qt.FULLWIDTH?Qt.NORMAL:e;on(J.LATINCAP,f.IDENTIFIER,x.LATINLETTER,e,i,[Me.ALLLETTERS]),on(J.LATINSMALL,f.IDENTIFIER,x.LATINLETTER,e,i,[Me.ALLLETTERS],{},{3:Me.D}),on(J.GREEKCAP,f.IDENTIFIER,x.GREEKLETTER,e,i,[Me.ALLLETTERS]),on(J.GREEKSMALL,f.IDENTIFIER,x.GREEKLETTER,e,i,[Me.ALLLETTERS],{0:{type:f.OPERATOR,role:x.PREFIXOP,font:i},26:{type:f.OPERATOR,role:x.PREFIXOP,font:i}}),on(J.DIGIT,f.NUMBER,x.INTEGER,e,i)}}B0(),W0(),$0(),q0();var lp=[];function K0(t){lp.push(t)}function hp(t,e){for(let i=0,r;r=lp[i];i++){let s=r.compare(t,e);if(s!==0)return s}return 0}function J0(t){t.sort(hp)}function Y0(t){if(t.length<=1)return t;let e=t.slice();J0(e);let i=[],r;do r=e.pop(),i.push(r);while(r&&e.length&&hp(e[e.length-1],r)===0);return i}var Z0=class{constructor(t,e=null){this.comparator=t,this.type=e,K0(this)}compare(t,e){return this.type&&this.type===t.type&&this.type===e.type?this.comparator(t,e):0}};function Q0(t,e){return t.role===x.SIMPLEFUNC?1:e.role===x.SIMPLEFUNC?-1:0}new Z0(Q0,f.IDENTIFIER);function zn(t,e){return t.match(/^.+:.+$/)||!e?t:t+":"+e}var cp=class extends Map{set(t,e){return super.set(zn(t,e.font),e),this}setNode(t){this.set(t.textContent,t.meaning())}get(t,e=null){return super.get(zn(t,e))}getNode(t){return this.get(t.textContent,t.font)}},dp=class extends Map{add(t,e){let i=this.get(t);i?i.push(e):super.set(t,[e])}get(t,e=null){return super.get(zn(t,e))}getNode(t){return this.get(t.textContent,t.font)}minimize(){for(let[t,e]of this)e.length===1&&this.delete(t)}isMultiValued(){for(let t of this.values())if(t.length>1)return!0;return!1}},tf=class extends dp{add(t,e){super.add(zn(t,e.font),e)}addNode(t){this.add(t.textContent,t)}toString(){let t=[];for(let[e,i]of this){let r=Array(e.length+3).join(" "),s=i.map(n=>n.toString()).join(`
27
+ `+r);t.push(e+": "+s)}return t.join(`
28
+ `)}collateMeaning(){let t=new ef;for(let[e,i]of this)t.set(e,i.map(r=>r.meaning()));return t}},ef=class extends dp{add(t,e){let i=this.get(t,e.font);(!i||!i.find(function(r){return G0(r,e)}))&&super.add(zn(t,e.font),e)}addNode(t){this.add(t.textContent,t.meaning())}toString(){let t=[];for(let[e,i]of this){let r=Array(e.length+3).join(" "),s=i.map(n=>`{type: ${n.type}, role: ${n.role}, font: ${n.font}}`).join(`
29
+ `+r);t.push(e+": "+s)}return t.join(`
30
+ `)}reduce(){for(let[t,e]of this)e.length!==1&&this.set(t,Y0(e))}default(){let t=new cp;for(let[e,i]of this)i.length===1&&t.set(e,i[0]);return t}newDefault(){let t=this.default();this.reduce();let e=this.default();return t.size===e.size?null:e}},D;(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"})(D||(D={}));var rf=Object.values(D),sf=[D.MO,D.MI,D.MN,D.MTEXT,D.MS,D.MSPACE],up=[D.MERROR,D.MPHANTOM,D.MALIGNGROUP,D.MALIGNMARK,D.MPRESCRIPTS,D.ANNOTATION,D.ANNOTATIONXML],pp=[D.MATH,D.MROW,D.MPADDED,D.MACTION,D.NONE,D.MSTYLE,D.SEMANTICS],nf=[D.MFRAC,D.MSUP,D.MSUB,D.MSUBSUP,D.MOVER,D.MUNDER,D.MUNDEROVER,D.MROOT,D.MMULTISCRIPTS],af=[D.MROOT,D.MSQRT],of=["aria-label","exact-speech","alt"];function no(t){return!!t&&Mt(t)===D.MATH}function lf(t){return!!t&&sf.includes(Mt(t))}function Fh(t){return!!t&&(up.includes(Mt(t))||!rf.includes(Mt(t)))}function qr(t){return!!t&&pp.includes(Mt(t))}function hf(t){return!!t&&af.includes(Mt(t))}function cf(t){return!!t&&Mt(t)===D.MGLYPH&&!lf(t.parentNode)}function df(t){return nf.includes(Mt(t))}var ra=1e4;function sa(t,e){let i=0;return()=>{if(++i>t)throw new Ol(typeof e=="function"?e():e)}}function Zs(t,e){if(!t)return!1;let i=sa(ra,"isDescendant cycle"),r=t.parentNode;for(;r;){if(i(),r===e)return!0;r=r.parentNode}return!1}function Is(t){let e=[];for(let i=0,r;r=t[i];i++){if(r.nodeType!==zr.ELEMENT_NODE)continue;let s=Mt(r);up.includes(s)||pp.includes(s)&&r.childNodes.length===0||e.push(r)}return e}function uf(t){return Mt(t)===D.MROW&&t.getAttribute("data-mjx-texclass")==="ORD"&&t.childNodes.length===0}function pf(t){if(!t)return!1;if(["negativeveryverythinmathspace","negativeverythinmathspace","negativethinmathspace","negativemediummathspace","negativethickmathspace","negativeverythickmathspace","negativeveryverythickmathspace"].includes(t))return!0;let e=t.match(/[0-9.]+/);return e?parseFloat(e[0])===0:!1}function jl(t,e){if(e.attributes?.length){let i=e.attributes;for(let r=i.length-1;r>=0;r--){let s=i[r].name;s.match(/^ext/)&&(t.attributes[s]=i[r].value,t.nobreaking=!0),of.includes(s)&&(t.attributes["ext-speech"]=i[r].value,t.nobreaking=!0),s==="href"&&(t.attributes.href=i[r].value,t.nobreaking=!0),(s.toLowerCase()==="data-latex"||s.toLowerCase()==="latex")&&(t.attributes.latex=i[r].value),s.match(/texclass$/)&&(t.attributes.texclass=i[r].value),(s==="color"||s==="mathcolor")&&(t.attributes.color=i[r].value)}}}function Ur(t){return t&&t.embellished&&t.childNodes.length>0?Ur(t.childNodes[0]):t}function lr(t,e,i){i&&t.reverse();let r=[];for(let s=0,n;n=t[s];s++){if(e(n))return i?{head:t.slice(s+1).reverse(),div:n,tail:r.reverse()}:{head:r,div:n,tail:t.slice(s+1)};r.push(n)}return i?{head:[],div:null,tail:r.reverse()}:{head:r,div:null,tail:[]}}function xi(t,e){let i=t,r=[],s=[],n=null;do n=lr(i,e),s.push(n.head),r.push(n.div),i=n.tail;while(n.div);return r.pop(),{rel:r,comp:s}}function mf(t,e){let i=t.parentElement;for(;i;){if(e.has(i))return!0;i=i.parentElement}return!1}function dc(t,e){if(t.mathmlTree)return;let i=new Set;if(e.forEach(r=>i.add(r.mathmlTree?.parentElement||null)),i.size===1&&!i.has(null)){let r=[...i][0];if(qr(r)&&r.childNodes.length===e.length){t.mathmlTree=r;return}return}if(i.has(null)&&i.size<=2&&(i.delete(null),e.forEach(r=>{if(!r.mathmlTree){let s=new Set(r.mathml);r.mathml.forEach(n=>{n.parentElement&&!mf(n,s)&&i.add(n.parentElement)})}})),i.size===1&&!i.has(null)){let r=[...i][0];if(qr(r)&&be(r.childNodes).every(s=>t.mathml.includes(s))){t.mathmlTree=r;return}}}function mp(t){if(!t||Mt(t)!==D.MSPACE)return!1;let e=t.getAttribute("width"),i=e&&e.match(/[a-z]*$/);if(!i)return!1;let r={cm:.4,pc:.5,em:.5,ex:1,in:.15,pt:5,mm:5},s=i[0],n=parseFloat(e.slice(0,i.index)),a=r[s];return!(!a||isNaN(n)||n<a)}var ui;(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"})(ui||(ui={}));var _h=class hr{static fromXml(e){let i=parseInt(e.getAttribute("id"),10),r=new hr(i);return r.type=e.tagName,hr.setAttribute(r,e,"role"),hr.setAttribute(r,e,"font"),hr.setAttribute(r,e,"embellished"),hr.setAttribute(r,e,"fencepointer","fencePointer"),e.getAttribute("annotation")&&r.parseAnnotation(e.getAttribute("annotation")),jl(r,e),hr.processChildren(r,e),r}static setAttribute(e,i,r,s){s||(s=r);let n=i.getAttribute(r);n&&(e[s]=n)}static processChildren(e,i){for(let r of be(i.childNodes)){if(r.nodeType===zr.TEXT_NODE){e.textContent=r.textContent;continue}let s=be(r.childNodes).map(hr.fromXml);s.forEach(n=>n.parent=e),Mt(r)==="CONTENT"?e.contentNodes=s:e.childNodes=s}}constructor(e){this.id=e,this.mathml=[],this.parent=null,this.type=f.UNKNOWN,this.role=x.UNKNOWN,this.font=Qt.UNKNOWN,this.embellished=null,this.fencePointer="",this.childNodes=[],this.textContent="",this.mathmlTree=null,this.contentNodes=[],this.annotation={},this.attributes={},this.nobreaking=!1,this.noupdate=!1}querySelectorAll(e){let i=[];for(let r=0,s;s=this.childNodes[r];r++)i=i.concat(s.querySelectorAll(e));for(let r=0,s;s=this.contentNodes[r];r++)i=i.concat(s.querySelectorAll(e));return e(this)&&i.unshift(this),i}xml(e,i){let r=function(n,a){let o=a.map(function(d){return d.xml(e,i)}),h=e.createElementNS("",n);for(let d=0,p;p=o[d];d++)h.appendChild(p);return h},s=e.createElementNS("",this.type);return i||this.xmlAttributes(s),s.textContent=this.textContent,this.contentNodes.length>0&&s.appendChild(r(ui.CONTENT,this.contentNodes)),this.childNodes.length>0&&s.appendChild(r(ui.CHILDREN,this.childNodes)),s}toString(e=!1){let i=Hn("<snode/>");return sp(this.xml(i.ownerDocument,e))}allAttributes(){let e=[];return e.push([ui.ROLE,this.role]),this.font!==Qt.UNKNOWN&&e.push([ui.FONT,this.font]),Object.keys(this.annotation).length&&e.push([ui.ANNOTATION,this.annotationXml()]),this.embellished&&e.push([ui.EMBELLISHED,this.embellished]),this.fencePointer&&e.push([ui.FENCEPOINTER,this.fencePointer]),e.push([ui.ID,this.id.toString()]),e}annotationXml(){let e=[];for(let[i,r]of Object.entries(this.annotation))r.forEach(s=>e.push(i+":"+s));return e.join(";")}attributesXml(){let e=[];for(let[i,r]of Object.entries(this.attributes))e.push(i+":"+hr.escapeValue(r));return e.join(";")}toJson(){let e={};e[ui.TYPE]=this.type;let i=this.allAttributes();for(let r=0,s;s=i[r];r++)e[s[0]]=s[1].toString();return this.textContent&&(e[ui.TEXT]=this.textContent),this.childNodes.length&&(e[ui.CHILDREN]=this.childNodes.map(function(r){return r.toJson()})),this.contentNodes.length&&(e[ui.CONTENT]=this.contentNodes.map(function(r){return r.toJson()})),e}updateContent(e,i){let r=i?e.replace(/^[ \f\n\r\t\v\u200b]*/,"").replace(/[ \f\n\r\t\v\u200b]*$/,""):e.trim();if(e=e&&!r?e:r,this.textContent===e)return;let s=Yt.Meaning.get(e.replace(/\s/g," "));this.textContent=e,this.role=s.role,this.type=s.type,this.font=s.font}addMathmlNodes(e){for(let i=0,r;r=e[i];i++)this.mathml.indexOf(r)===-1&&this.mathml.push(r)}appendChild(e){this.childNodes.push(e),this.addMathmlNodes(e.mathml),e.parent=this}replaceChild(e,i){let r=this.childNodes.indexOf(e);if(r===-1)return;e.parent=null,i.parent=this,this.childNodes[r]=i;let s=e.mathml.filter(function(a){return i.mathml.indexOf(a)===-1}),n=i.mathml.filter(function(a){return e.mathml.indexOf(a)===-1});this.removeMathmlNodes(s),this.addMathmlNodes(n)}appendContentNode(e){e&&(this.contentNodes.push(e),this.addMathmlNodes(e.mathml),e.parent=this)}removeContentNode(e){if(e){let i=this.contentNodes.indexOf(e);i!==-1&&this.contentNodes.slice(i,1)}}equals(e){if(!e||this.type!==e.type||this.role!==e.role||this.textContent!==e.textContent||this.childNodes.length!==e.childNodes.length||this.contentNodes.length!==e.contentNodes.length)return!1;for(let i=0,r,s;r=this.childNodes[i],s=e.childNodes[i];i++)if(!r.equals(s))return!1;for(let i=0,r,s;r=this.contentNodes[i],s=e.contentNodes[i];i++)if(!r.equals(s))return!1;return!0}displayTree(){console.info(this.displayTree_(0))}addAnnotation(e,i){i&&this.addAnnotation_(e,i)}getAnnotation(e){return this.annotation[e]||[]}hasAnnotation(e,i){let r=this.annotation[e];return r?r.indexOf(i)!==-1:!1}parseAnnotation(e){let i=e.split(";");for(let r=0,s=i.length;r<s;r++){let n=i[r].split(":");this.addAnnotation(n[0],n[1])}}meaning(){return{type:this.type,role:this.role,font:this.font}}xmlAttributes(e){let i=this.allAttributes();for(let r=0,s;s=i[r];r++)e.setAttribute(s[0],s[1]);this.addExternalAttributes(e)}addExternalAttributes(e){for(let[i,r]of Object.entries(this.attributes))e.setAttribute(i,r)}static escapeValue(e){return e.replace(/;/g,"\\0003B")}parseAttributes(e){if(!e)return;let i=e.split(";");for(let r=0,s=i.length;r<s;r++){let[n,...a]=i[r].split(":");n&&(this.attributes[n]=a.join(":").replace(/\\0003B/g,";"))}}removeMathmlNodes(e){let i=this.mathml;for(let r=0,s;s=e[r];r++){let n=i.indexOf(s);n!==-1&&i.splice(n,1)}this.mathml=i}displayTree_(e){e++;let i=Array(e).join(" "),r="";r+=`
31
+ `+i+this.toString(),r+=`
32
+ `+i+"MathmlTree:",r+=`
33
+ `+i+this.mathmlTreeString(),r+=`
34
+ `+i+"MathML:";for(let s=0,n;n=this.mathml[s];s++)r+=`
35
+ `+i+n.toString();return r+=`
36
+ `+i+"Begin Content",this.contentNodes.forEach(function(s){r+=s.displayTree_(e)}),r+=`
37
+ `+i+"End Content",r+=`
38
+ `+i+"Begin Children",this.childNodes.forEach(function(s){r+=s.displayTree_(e)}),r+=`
39
+ `+i+"End Children",r}mathmlTreeString(){return this.mathmlTree?this.mathmlTree.toString():"EMPTY"}addAnnotation_(e,i){let r=this.annotation[e];r&&!r.includes(i)?r.push(i):this.annotation[e]=[i]}},fp=class{constructor(){this.leafMap=new tf,this.defaultMap=new cp,this.idCounter_=-1}makeNode(t){return this.createNode_(t)}makeUnprocessed(t){let e=this.createNode_();return e.addMathmlNodes([t]),e.mathmlTree=t,e}makeEmptyNode(){let t=this.createNode_();return t.type=f.EMPTY,t}makeContentNode(t){let e=this.createNode_();return e.updateContent(t),e}makeMultipleContentNodes(t,e){let i=[];for(let r=0;r<t;r++)i.push(this.makeContentNode(e));return i}makeLeafNode(t,e){if(!t)return this.makeEmptyNode();let i=this.makeContentNode(t);i.font=e||i.font;let r=this.defaultMap.getNode(i);return r&&(i.type=r.type,i.role=r.role,i.font=r.font),this.leafMap.addNode(i),i}makeBranchNode(t,e,i,r){let s=this.createNode_();return r&&s.updateContent(r),s.type=t,s.childNodes=e,s.contentNodes=i,e.concat(i).forEach(function(n){n.parent=s,s.addMathmlNodes(n.mathml)}),s}createNode_(t){return t===void 0?t=++this.idCounter_:this.idCounter_=Math.max(this.idCounter_,t),new _h(t)}},ff=class{constructor(t){this.type=t,this.factory_=new fp}getFactory(){return this.factory_}setFactory(t){this.factory_=t}getType(){return this.type}parseList(t){let e=[];for(let i=0,r;r=t[i];i++)e.push(this.parse(r));return e}};function et(t,e){return t.type===e}function ko(t,e){return t.embellished===e}function ie(t,e){return t.role===e}function ks(t){return et(t,f.FENCE)||et(t,f.PUNCTUATION)||et(t,f.OPERATOR)||et(t,f.RELATION)}function gf(t){let e=t.childNodes;if(e.length===0)return!0;if(e.length>1)return!1;let i=e[0];return!(i.type===f.INFIXOP&&(i.role!==x.IMPLICIT||i.childNodes.some(r=>et(r,f.INFIXOP))))}function bf(t){return fs(t)&&!ie(t,x.DIVISION)||et(t,f.APPL)||jh(t)}function uc(t){return fs(t)||jh(t)}function gp(t,e){return!!e&&et(e,f.IDENTIFIER)&&Yt.Secondary.has(t.textContent,Me.D)}function Ul(t){if(et(t,f.IDENTIFIER)){let e=t.textContent[0];return e&&t.textContent[1]&&Yt.Secondary.has(e,Me.D)}return!1}function jh(t){return bp(t)||ao(t)}function pc(t){return t.embellished?t.embellished:Ef(t.type)?t.type:null}function Ef(t){return t===f.OPERATOR||t===f.RELATION||t===f.FENCE||t===f.PUNCTUATION}function fs(t){return et(t,f.OPERATOR)||ko(t,f.OPERATOR)}function bp(t){return et(t,f.RELATION)||ko(t,f.RELATION)}function ao(t){return et(t,f.PUNCTUATION)||ko(t,f.PUNCTUATION)}function Ep(t){return et(t,f.FENCE)||ko(t,f.FENCE)}function yf(t){return!t||!Ep(t)?!1:!t.embellished||yp(t)}function xf(t){return et(t,f.TENSOR)&&(!et(t.childNodes[1],f.EMPTY)||!et(t.childNodes[2],f.EMPTY))&&(!et(t.childNodes[3],f.EMPTY)||!et(t.childNodes[4],f.EMPTY))}function yp(t){return t.embellished?xf(t)||ie(t,x.CLOSE)&&et(t,f.TENSOR)||ie(t,x.OPEN)&&(et(t,f.SUBSCRIPT)||et(t,f.SUPERSCRIPT))?!1:yp(t.childNodes[0]):!0}function xp(t){return!!t&&(et(t,f.TABLE)||et(t,f.MULTILINE))}function Nf(t){return!!t&&Np(t)&&xp(t.childNodes[0])}function Np(t){return!!t&&et(t,f.FENCED)&&(ie(t,x.LEFTRIGHT)||Ki(t))&&t.childNodes.length===1}function vf(t,e){return e.length>0&&ie(e[e.length-1],x.OPENFENCE)}function mc(t){return t.childNodes.every(function(e){return e.childNodes.length<=1})}function vp(t){return et(t,f.LINE)&&t.contentNodes.length&&ie(t.contentNodes[0],x.LABEL)}function Tf(t){return t.childNodes.length===2}function Tp(t){return et(t,f.LARGEOP)||et(t,f.LIMBOTH)||et(t,f.LIMLOWER)||et(t,f.LIMUPPER)||et(t,f.FUNCTION)&&ie(t,x.LIMFUNC)||(et(t,f.OVERSCORE)||et(t,f.UNDERSCORE))&&Tp(t.childNodes[0])}function Cf(t){return t.type===f.IDENTIFIER||t.role===x.LATINLETTER||t.role===x.GREEKLETTER||t.role===x.OTHERLETTER}function fc(t,e,i){return e.length===1&&(t[i].type===f.PUNCTUATION||t[i].embellished===f.PUNCTUATION)&&t[i]===e[0]}function Sf(t){return et(t,f.IDENTIFIER)&&ie(t,x.SIMPLEFUNC)}function Af(t){return!!t&&["{","﹛","{"].indexOf(t.textContent)!==-1}function Lf(t){return!!t&&["}","﹜","}"].indexOf(t.textContent)!==-1}function Rf(t){return Af(Ur(t.contentNodes[0]))&&Lf(Ur(t.contentNodes[1]))}var wf=[f.PUNCTUATION,f.PUNCTUATED,f.RELSEQ,f.MULTIREL,f.TABLE,f.MULTILINE,f.CASES,f.INFERENCE],If=[f.LIMUPPER,f.LIMLOWER,f.LIMBOTH,f.SUBSCRIPT,f.SUPERSCRIPT,f.UNDERSCORE,f.OVERSCORE,f.TENSOR];function Hl(t){let e=t.type;return wf.indexOf(e)!==-1||e===f.INFIXOP&&t.role!==x.IMPLICIT?!1:e===f.FENCED?t.role!==x.LEFTRIGHT||Hl(t.childNodes[0]):If.indexOf(e)===-1||Hl(t.childNodes[0])}function kf(t){return t.type===f.NUMBER&&(t.role===x.INTEGER||t.role===x.FLOAT)}function Cp(t){return kf(t)||t.role===x.VULGAR||t.role===x.MIXED}function Wl(t){let e=t.childNodes;return t.role===x.UNIT&&(!e.length||e[0].role===x.UNIT)}function Sp(t){let e=t.childNodes;return t.type===f.INFIXOP&&(t.role===x.MULTIPLICATION||t.role===x.IMPLICIT)&&e.length&&(Wl(e[0])||Cp(e[0]))&&t.childNodes.slice(1).every(Wl)}function hs(t){return t.type===f.INFIXOP&&(t.role===x.IMPLICIT||t.role===x.UNIT&&!!t.contentNodes.length&&t.contentNodes[0].textContent===fr.invisibleTimes)}function Tn(t){return t.type===f.INFIXOP&&t.role===x.IMPLICIT}function Ki(t){return t.role===x.NEUTRAL||t.role===x.METRIC}function Go(t,e){return Ki(t)&&Ki(e)&&Ur(t).textContent===Ur(e).textContent}function gc(t){return Ki(t)?!t.embellished||!(t.type===f.SUPERSCRIPT||t.type===f.SUBSCRIPT||t.type===f.TENSOR&&(t.childNodes[3].type!==f.EMPTY||t.childNodes[4].type!==f.EMPTY)):!1}function bc(t){return Ki(t)?!t.embellished||!(t.type===f.TENSOR&&(t.childNodes[1].type!==f.EMPTY||t.childNodes[2].type!==f.EMPTY)):!1}function Ap(t){return[x.ELEMENT,x.NONELEMENT,x.REELEMENT,x.RENONELEMENT].includes(t.role)}function Of(t){return[x.DEGREE].includes(t.role)||[].includes(t.type)}var bt={factory:null,options:new Xs,updateFactory:function(t){bt.factory=t},heuristics:new Map,flags:{combine_juxtaposition:!0,convert_juxtaposition:!0,multioperator:!0},blacklist:{},add:function(t){let e=t.name;bt.heuristics.set(e,t),bt.flags[e]||(bt.flags[e]=!1)},run:function(t,e,i){let r=bt.heuristics.get(t);return r&&!bt.blacklist[t]&&(bt.flags[t]||r.applicable(e))?r.apply(e):i?i(e):e}},_t=class v{static getInstance(){return v.instance=v.instance||new v,v.instance}static tableToMultiline(e){if(!mc(e))return bt.run("rewrite_subcases",e,v.classifyTable);e.type=f.MULTILINE;for(let i=0,r;r=e.childNodes[i];i++)v.rowToLine_(r,x.MULTILINE);return e.childNodes.length===1&&!vp(e.childNodes[0])&&Np(e.childNodes[0].childNodes[0])&&v.tableToMatrixOrVector_(v.rewriteFencedLine_(e)),v.classifyMultiline(e)}static number(e){(e.type===f.UNKNOWN||e.type===f.IDENTIFIER)&&(e.type=f.NUMBER),v.meaningFromContent(e,v.numberRole_),v.exprFont_(e)}static classifyMultiline(e){return v.binomialForm_(e),v.classifyMultiline_(e),e}static classifyMultiline_(e){let i=0,r=e.childNodes.length,s;for(;i<r&&(!(s=e.childNodes[i])||!s.childNodes.length);)i++;if(i>=r)return;let n=s.childNodes[0].role;n!==x.UNKNOWN&&e.childNodes.every(function(a){let o=a.childNodes[0];return!o||o.role===n&&(et(o,f.RELATION)||et(o,f.RELSEQ))})&&(e.role=n)}static classifyTable(e){let i=v.computeColumns_(e);return v.classifyByColumns_(e,i,x.EQUALITY)||v.classifyByColumns_(e,i,x.INEQUALITY,[x.EQUALITY])||v.classifyByColumns_(e,i,x.ARROW)||v.detectCaleyTable(e),e}static detectCaleyTable(e){if(!e.mathmlTree)return!1;let i=e.mathmlTree,r=i.getAttribute("columnlines"),s=i.getAttribute("rowlines");return!r||!s?!1:v.cayleySpacing(r)&&v.cayleySpacing(s)?(e.role=x.CAYLEY,!0):!1}static cayleySpacing(e){let i=e.split(" ");return(i[0]==="solid"||i[0]==="dashed")&&i.slice(1).every(r=>r==="none")}static proof(e,i,r){let s=v.separateSemantics(i);return v.getInstance().proof(e,s,r)}static findSemantics(e,i,r){let s=r??null,n=v.getSemantics(e);return!n||!n[i]?!1:s==null||n[i]===s}static getSemantics(e){let i=e.getAttribute("semantics");return i?v.separateSemantics(i):null}static removePrefix(e){let[,...i]=e.split("_");return i.join("_")}static separateSemantics(e){let i={};return e.split(";").forEach(function(r){let[s,n]=r.split(":");i[v.removePrefix(s)]=n}),i}static matchSpaces_(e,i){for(let r=0,s;s=i[r];r++){let n=e[r].mathmlTree,a=e[r+1].mathmlTree;if(!n||!a)continue;let o=n.nextSibling;if(!o||o===a)continue;let h=v.getSpacer_(o);h&&h!==a&&(s.addMathmlNodes([h]),s.mathmlTree=h,s.role=x.SPACE)}}static getSpacer_(e){if(Mt(e)===D.MSPACE)return e;for(;qr(e)&&e.childNodes.length===1;)if(e=e.childNodes[0],Mt(e)===D.MSPACE)return e;return null}static fenceToPunct_(e){let i=v.FENCE_TO_PUNCT_[e.role];if(i){for(;e.embellished;)e.embellished=f.PUNCTUATION,ie(e,x.SUBSUP)||ie(e,x.UNDEROVER)||(e.role=i),e=e.childNodes[0];e.type=f.PUNCTUATION,e.role=i}}static classifyFunction_(e,i){if(e.type===f.APPL||e.type===f.BIGOP||e.type===f.INTEGRAL)return"";if(i[0]&&i[0].textContent===fr.functionApplication){v.getInstance().funcAppls[e.id]=i.shift();let r=x.SIMPLEFUNC;return bt.run("simple2prefix",e),(e.role===x.PREFIXFUNC||e.role===x.LIMFUNC)&&(r=e.role),v.propagateFunctionRole_(e,r),"prefix"}return v.CLASSIFY_FUNCTION_[e.role]||(Cf(e)?"simple":"")}static propagateFunctionRole_(e,i){if(e){if(e.type===f.INFIXOP)return;ie(e,x.SUBSUP)||ie(e,x.UNDEROVER)||(e.role=i),v.propagateFunctionRole_(e.childNodes[0],i)}}static getFunctionOp_(e,i){if(i(e))return e;for(let r=0,s;s=e.childNodes[r];r++){let n=v.getFunctionOp_(s,i);if(n)return n}return null}static tableToMatrixOrVector_(e){let i=e.childNodes[0];et(i,f.MULTILINE)?v.tableToVector_(e):v.tableToMatrix_(e),e.contentNodes.forEach(i.appendContentNode.bind(i));for(let r=0,s;s=i.childNodes[r];r++)v.assignRoleToRow_(s,v.getComponentRoles_(i));return i.parent=null,i}static tableToVector_(e){let i=e.childNodes[0];if(i.type=f.VECTOR,i.childNodes.length===1){v.tableToSquare_(e);return}v.binomialForm_(i)}static binomialForm_(e){ie(e,x.UNKNOWN)&&Tf(e)&&(e.role=x.BINOMIAL,e.childNodes[0].role=x.BINOMIAL,e.childNodes[1].role=x.BINOMIAL)}static tableToMatrix_(e){let i=e.childNodes[0];if(i.type=f.MATRIX,i.childNodes&&i.childNodes.length>0&&i.childNodes[0].childNodes&&i.childNodes.length===i.childNodes[0].childNodes.length){v.tableToSquare_(e);return}i.childNodes&&i.childNodes.length===1&&(i.role=x.ROWVECTOR)}static tableToSquare_(e){let i=e.childNodes[0];if(ie(i,x.UNKNOWN)){if(Ki(e)){i.role=x.DETERMINANT;return}i.role=x.SQUAREMATRIX}}static getComponentRoles_(e){let i=e.role;return i&&i!==x.UNKNOWN?i:e.type.toLowerCase()||x.UNKNOWN}static tableToCases_(e,i){for(let r=0,s;s=e.childNodes[r];r++)v.assignRoleToRow_(s,x.CASES);return e.type=f.CASES,e.appendContentNode(i),mc(e)&&v.binomialForm_(e),e}static rewriteFencedLine_(e){let i=e.childNodes[0],r=e.childNodes[0].childNodes[0],s=e.childNodes[0].childNodes[0].childNodes[0];return r.parent=e.parent,e.parent=r,s.parent=i,r.childNodes=[e],i.childNodes=[s],r}static rowToLine_(e,i){let r=i||x.UNKNOWN;et(e,f.ROW)&&(e.type=f.LINE,e.role=r,e.childNodes.length===1&&et(e.childNodes[0],f.CELL)&&(e.childNodes=e.childNodes[0].childNodes,e.childNodes.forEach(function(s){s.parent=e})))}static assignRoleToRow_(e,i){if(et(e,f.LINE)){e.role=i;return}et(e,f.ROW)&&(e.role=i,e.childNodes.forEach(function(r){et(r,f.CELL)&&(r.role=i)}))}static nextSeparatorFunction_(e){let i;if(e){if(e.match(/^\s+$/))return null;i=e.replace(/\s/g,"").split("").filter(function(r){return r})}else i=[","];return function(){return i.length>1?i.shift():i[0]}}static meaningFromContent(e,i){let r=[...e.textContent].filter(s=>s.match(/[^\s]/));i(e,r,r.map(s=>Yt.Meaning.get(s)))}static numberRole_(e,i,r){if(e.role===x.UNKNOWN){if(r.every(function(s){return s.type===f.NUMBER&&s.role===x.INTEGER||s.type===f.PUNCTUATION&&s.role===x.COMMA})){e.role=x.INTEGER,i[0]==="0"&&e.addAnnotation("general","basenumber");return}if(r.every(function(s){return s.type===f.NUMBER&&s.role===x.INTEGER||s.type===f.PUNCTUATION})){e.role=x.FLOAT;return}e.role=x.OTHERNUMBER}}static exprFont_(e){e.font===Qt.UNKNOWN&&v.compSemantics(e,"font",Qt)}static compSemantics(e,i,r){let s=[...e.textContent].map(n=>Yt.Meaning.get(n)).reduce(function(n,a){return!n||!a[i]||a[i]===r.UNKNOWN||a[i]===n?n:n===r.UNKNOWN?a[i]:null},r.UNKNOWN);s&&(e[i]=s)}static purgeFences_(e){let i=e.rel,r=e.comp,s=[],n=[];for(;i.length>0;){let a=i.shift(),o=r.shift();if(yf(a)){s.push(a),n.push(o);continue}v.fenceToPunct_(a),o.push(a),o=o.concat(r.shift()),r.unshift(o)}return n.push(r.shift()),{rel:s,comp:n}}static rewriteFencedNode_(e){let i=e.contentNodes[0],r=e.contentNodes[1],s=v.rewriteFence_(e,i);return e.contentNodes[0]=s.fence,s=v.rewriteFence_(s.node,r),e.contentNodes[1]=s.fence,e.contentNodes[0].parent=e,e.contentNodes[1].parent=e,Mf(e),s.node.parent=null,s.node}static rewriteFence_(e,i){if(!i.embellished)return{node:e,fence:i};let r=i.childNodes[0],s=v.rewriteFence_(e,r);return et(i,f.SUPERSCRIPT)||et(i,f.SUBSCRIPT)||et(i,f.TENSOR)?(ie(i,x.SUBSUP)||(i.role=e.role),r!==s.node&&(i.replaceChild(r,s.node),r.parent=e),v.propagateFencePointer_(i,r),{node:i,fence:s.fence}):(i.replaceChild(r,s.fence),i.mathmlTree&&i.mathml.indexOf(i.mathmlTree)===-1&&i.addMathmlNodes([i.mathmlTree]),{node:s.node,fence:i})}static propagateFencePointer_(e,i){e.fencePointer=i.fencePointer||i.id.toString(),e.embellished=null}static classifyByColumns_(e,i,r,s=[]){let n=[r].concat(s);return i.length===3&&v.testColumns_(i,1,a=>v.isPureRelation_(a,n))||i.length===2&&(v.testColumns_(i,1,a=>v.isEndRelation_(a,n)||v.isPureRelation_(a,n))||v.testColumns_(i,0,a=>v.isEndRelation_(a,n,!0)||v.isPureRelation_(a,n)))?(e.role=r,!0):!1}static isEndRelation_(e,i,r){let s=r?e.childNodes.length-1:0;return et(e,f.RELSEQ)&&i.some(n=>ie(e,n))&&et(e.childNodes[s],f.EMPTY)}static isPureRelation_(e,i){return et(e,f.RELATION)&&i.some(r=>ie(e,r))}static computeColumns_(e){let i=[];for(let r=0,s;s=e.childNodes[r];r++)for(let n=0,a;a=s.childNodes[n];n++)i[n]?i[n].push(a):i[n]=[a];return i}static testColumns_(e,i,r){let s=e[i];return s?s.some(function(n){return n.childNodes.length&&r(n.childNodes[0])})&&s.every(function(n){return!n.childNodes.length||r(n.childNodes[0])}):!1}setNodeFactory(e){v.getInstance().factory_=e,bt.updateFactory(v.getInstance().factory_)}getNodeFactory(){return v.getInstance().factory_}identifierNode(e,i,r){if(r==="MathML-Unit"&&!Of(e))e.type=f.IDENTIFIER,e.role=x.UNIT;else if(!i&&e.textContent.length===1&&(e.role===x.INTEGER||e.role===x.LATINLETTER||e.role===x.GREEKLETTER)&&e.font===Qt.NORMAL)return e.font=Qt.ITALIC,bt.run("simpleNamedFunction",e);return e.type===f.UNKNOWN&&(e.type=f.IDENTIFIER),v.exprFont_(e),bt.run("simpleNamedFunction",e)}implicitNode(e){if(e=v.getInstance().getMixedNumbers_(e),e=v.getInstance().combineUnits_(e),e=v.getInstance().combineScripts_(e),e.length===1)return e[0];let i=v.getInstance().implicitNode_(e);return bt.run("combine_juxtaposition",i)}text(e,i){if(v.exprFont_(e),e.type=f.TEXT,i===D.ANNOTATIONXML)return e.role=x.ANNOTATION,e;if(i===D.MS)return e.role=x.STRING,e;if(i===D.MSPACE||e.textContent.match(/^\s*$/))return e.role=x.SPACE,e;if(/\s/.exec(e.textContent))return e.role=x.TEXT,e;let r=[...e.textContent];if(r.length!==1)return e.role=x.UNKNOWN,e;let s=Yt.Meaning.get(r[0]);return s.type===f.UNKNOWN||s.type===f.IDENTIFIER||(e.type=s.type,e.role=s.role,e.font=s.font,e.addAnnotation("general","text")),e}row(e,i=!1){return e=e.filter(function(r){return!et(r,f.EMPTY)||r.hasAnnotation("empty","MFENCED")||i}),e.length===0?v.getInstance().factory_.makeEmptyNode():(e=v.getInstance().getFencesInRow_(e),e=v.getInstance().tablesInRow(e),e=v.getInstance().getPunctuationInRow_(e),e=v.getInstance().getTextInRow_(e),e=v.getInstance().getFunctionsInRow_(e),v.getInstance().relationsInRow_(e))}limitNode(e,i){if(!i.length)return v.getInstance().factory_.makeEmptyNode();let r=i[0],{length:s}=v.MML_TO_LIMIT_[e];if(i=i.slice(0,s+1),[e,i]=v.getInstance().cleanLimitNode(e,i,s),!i[1])return r;let{type:n,length:a}=v.MML_TO_LIMIT_[e];if(a===1&&i[1].role===x.DEGREE)return v.getInstance().row([i[0],i[1]]);if(bt.run("op_with_limits",i),Tp(r)){if(a===1&&ks(i[1])||a===2&&ks(i[1])&&ks(i[2])){let h=v.MML_TO_BOUNDS_[e];return v.getInstance().accentNode_(r,i,h.type,h.length,h.accent)}if(a===2){if(ks(i[1]))return r=v.getInstance().accentNode_(r,[r,i[1]],{MSUBSUP:f.SUBSCRIPT,MUNDEROVER:f.UNDERSCORE}[e],1,!0),i[2]?v.getInstance().makeLimitNode_(r,[r,i[2]],null,f.LIMUPPER):r;if(i[2]&&ks(i[2]))return r=v.getInstance().accentNode_(r,[r,i[2]],{MSUBSUP:f.SUPERSCRIPT,MUNDEROVER:f.OVERSCORE}[e],1,!0),v.getInstance().makeLimitNode_(r,[r,i[1]],null,f.LIMLOWER);i[a]||(n=f.LIMLOWER)}return v.getInstance().makeLimitNode_(r,i,null,n)}let o=v.MML_TO_BOUNDS_[e];return v.getInstance().accentNode_(r,i,o.type,o.length,o.accent)}cleanLimitNode(e,i,r){let s=d=>!d||et(d,f.EMPTY),n=d=>d&&et(d,f.TEXT)&&ie(d,x.SPACE),a=d=>s(d)||n(d);if(r===1)return a(i[1])?(i[0].noupdate=!0,[e,[Vo([e],i[0])]]):[e,i];let o=i[1],h=i[2];return a(o)&&a(h)?(i[0].noupdate=!0,[e,[Vo([e],i[0])]]):a(o)?[e===D.MSUBSUP?D.MSUP:D.MOVER,[i[0],h]]:a(h)?[e===D.MSUBSUP?D.MSUB:D.MUNDER,[i[0],o]]:[e,i]}tablesInRow(e){let i=xi(e,Nf),r=[];for(let s=0,n;n=i.rel[s];s++)r=r.concat(i.comp.shift()),r.push(v.tableToMatrixOrVector_(n));r=r.concat(i.comp.shift()),i=xi(r,xp),r=[];for(let s=0,n;n=i.rel[s];s++){let a=i.comp.shift();vf(n,a)&&v.tableToCases_(n,a.pop()),r=r.concat(a),(r.length||i.comp[0].length)&&(n=v.rewriteTrivialTable(n)),r.push(n)}return r.concat(i.comp.shift())}mfenced(e,i,r,s){if(r&&s.length>0){let n=v.nextSeparatorFunction_(r),a=[s.shift()];s.forEach(o=>{a.push(v.getInstance().factory_.makeContentNode(n())),a.push(o)}),s=a}return e&&i?v.getInstance().horizontalFencedNode_(v.getInstance().factory_.makeContentNode(e),v.getInstance().factory_.makeContentNode(i),s):(e&&s.unshift(v.getInstance().factory_.makeContentNode(e)),i&&s.push(v.getInstance().factory_.makeContentNode(i)),v.getInstance().row(s))}fractionLikeNode(e,i,r,s){let n;if(!s&&pf(r)){let a=v.getInstance().factory_.makeBranchNode(f.LINE,[e],[]),o=v.getInstance().factory_.makeBranchNode(f.LINE,[i],[]);return n=v.getInstance().factory_.makeBranchNode(f.MULTILINE,[a,o],[]),v.classifyMultiline(n)}else return n=v.getInstance().fractionNode_(e,i),s&&n.addAnnotation("general","bevelled"),n}tensor(e,i,r,s,n){let a=v.getInstance().factory_.makeBranchNode(f.TENSOR,[e,v.getInstance().scriptNode_(i,x.LEFTSUB),v.getInstance().scriptNode_(r,x.LEFTSUPER),v.getInstance().scriptNode_(s,x.RIGHTSUB),v.getInstance().scriptNode_(n,x.RIGHTSUPER)],[]);return a.role=e.role,a.embellished=pc(e),a}pseudoTensor(e,i,r){let s=d=>!et(d,f.EMPTY),n=i.filter(s).length,a=r.filter(s).length;if(!n&&!a)return e;let o=n?a?D.MSUBSUP:D.MSUB:D.MSUP,h=[e];return n&&h.push(v.getInstance().scriptNode_(i,x.RIGHTSUB,!0)),a&&h.push(v.getInstance().scriptNode_(r,x.RIGHTSUPER,!0)),v.getInstance().limitNode(o,h)}font(e){return v.MATHJAX_FONTS[e]||e}proof(e,i,r){if(!i.inference&&!i.axiom&&console.log("Noise"),i.axiom){let n=v.getInstance().cleanInference(e.childNodes),a=n.length?v.getInstance().factory_.makeBranchNode(f.INFERENCE,r(n),[]):v.getInstance().factory_.makeEmptyNode();return a.role=x.AXIOM,a.mathmlTree=e,a}let s=v.getInstance().inference(e,i,r);return i.proof&&(s.role=x.PROOF,s.childNodes[0].role=x.FINAL),s}inference(e,i,r){if(i.inferenceRule){let d=v.getInstance().getFormulas(e,[],r);return v.getInstance().factory_.makeBranchNode(f.INFERENCE,[d.conclusion,d.premises],[])}let s=i.labelledRule,n=be(e.childNodes),a=[];(s==="left"||s==="both")&&a.push(v.getInstance().getLabel(e,n,r,x.LEFT)),(s==="right"||s==="both")&&a.push(v.getInstance().getLabel(e,n,r,x.RIGHT));let o=v.getInstance().getFormulas(e,n,r),h=v.getInstance().factory_.makeBranchNode(f.INFERENCE,[o.conclusion,o.premises],a);return h.mathmlTree=e,h}getLabel(e,i,r,s){let n=v.getInstance().findNestedRow(i,"prooflabel",s),a=v.getInstance().factory_.makeBranchNode(f.RULELABEL,r(be(n.childNodes)),[]);return a.role=s,a.mathmlTree=n,a}getFormulas(e,i,r){let s=i.length?v.getInstance().findNestedRow(i,"inferenceRule"):e,n=v.getSemantics(s).inferenceRule==="up",a=n?s.childNodes[1]:s.childNodes[0],o=n?s.childNodes[0]:s.childNodes[1],h=a.childNodes[0].childNodes[0],d=be(h.childNodes[0].childNodes),p=[],E=1;for(let U of d)E%2&&p.push(U.childNodes[0]),E++;let y=r(p),A=r(be(o.childNodes[0].childNodes))[0],w=v.getInstance().factory_.makeBranchNode(f.PREMISES,y,[]);w.mathmlTree=h;let _=v.getInstance().factory_.makeBranchNode(f.CONCLUSION,[A],[]);return _.mathmlTree=o.childNodes[0].childNodes[0],{conclusion:_,premises:w}}findNestedRow(e,i,r){return v.getInstance().findNestedRow_(e,i,0,r)}cleanInference(e){return be(e).filter(function(i){return Mt(i)!=="MSPACE"})}operatorNode(e){return e.type===f.UNKNOWN&&(e.type=f.OPERATOR),bt.run("multioperator",e)}static rewriteTrivialTable(e){return Df(e)?v.getInstance().unwrapTrivialTable(e):e}unwrapTrivialTable(e){if(!e.childNodes[0].childNodes.length)return v.getInstance().factory_.makeEmptyNode();let i=e.childNodes[0].childNodes[0];return i.parent=null,Vo([D.MTD,D.MTR,D.MTABLE],i),i}constructor(){this.funcAppls={},this.splitRoles=new Map([[x.SUBTRACTION,x.NEGATIVE],[x.ADDITION,x.POSITIVE]]),this.splitOps=["−","-","‐","‑","+"],this.factory_=new fp,bt.updateFactory(this.factory_)}implicitNode_(e){let i=v.getInstance().factory_.makeMultipleContentNodes(e.length-1,fr.invisibleTimes);v.matchSpaces_(e,i);let r=v.getInstance().infixNode_(e,i[0]);return r.role=x.IMPLICIT,i.forEach(function(s){s.parent=r}),r.contentNodes=i,r}infixNode_(e,i){let r=v.getInstance().factory_.makeBranchNode(f.INFIXOP,e,[i],Ur(i).textContent);return r.role=i.role,r=bt.run("propagateInterval",r),bt.run("propagateSimpleFunction",r)}explicitMixed_(e){let i=xi(e,function(s){return s.textContent===fr.invisiblePlus});if(!i.rel.length)return e;let r=[];for(let s=0,n;n=i.rel[s];s++){let a=i.comp[s],o=i.comp[s+1],h=a.length-1;if(a[h]&&o[0]&&et(a[h],f.NUMBER)&&!ie(a[h],x.MIXED)&&et(o[0],f.FRACTION)){let d=v.getInstance().factory_.makeBranchNode(f.NUMBER,[a[h],o[0]],[]);d.role=x.MIXED,r=r.concat(a.slice(0,h)),r.push(d),o.shift()}else r=r.concat(a),r.push(n)}return r.concat(i.comp[i.comp.length-1])}concatNode_(e,i,r){if(i.length===0)return e;let s=i.map(function(a){return Ur(a).textContent}).join(" "),n=v.getInstance().factory_.makeBranchNode(r,[e],i,s);return i.length>1&&(n.role=x.MULTIOP),dc(n,[e,...i]),n}multiopNode_(e){let i=v.getInstance().factory_.makeBranchNode(f.OPERATOR,e,[]);return i.role=x.MULTIOP,dc(i,e),i}prefixNode_(e,i){let r=this.splitSingles(i),s=e;for(;r.length>0;){let n=r.pop();s=v.getInstance().concatNode_(s,n,f.PREFIXOP),n.length===1&&this.splitOps.indexOf(n[0].textContent)!==-1&&(s.role=this.splitRoles.get(n[0].role))}return s}splitSingles(e){let i=0,r=[],s=0;for(;s<e.length;){let n=e[s];this.splitRoles.has(n.role)&&(!e[s-1]||e[s-1].role!==n.role)&&(!e[s+1]||e[s+1].role!==n.role)&&this.splitOps.indexOf(n.textContent)!==-1&&(r.push(e.slice(i,s)),r.push(e.slice(s,s+1)),i=s+1),s++}return i<s&&r.push(e.slice(i,s)),r}postfixNode_(e,i){return i.length?v.getInstance().concatNode_(e,i,f.POSTFIXOP):e}combineScripts_(e){let i=xi(e,s=>et(s,f.SUPERSCRIPT)&&et(s.childNodes[0],f.EMPTY)||et(s,f.SUBSCRIPT)&&et(s.childNodes[0],f.EMPTY));if(!i.rel.length)return e;let r=[];do{let s=i.comp.shift(),n=i.rel.shift();if(!s.length){r.push(n);continue}let a=s.pop();if(et(a,f.NUMBER)||et(a,f.IDENTIFIER)){n.childNodes[0]=a,a.parent=n,n.role=a.type.toLowerCase(),n.addAnnotation("collapsed",a.type.toLowerCase()),r=r.concat(s),r.push(n);continue}if(et(a,f.SUBSCRIPT)&&et(n,f.SUPERSCRIPT)){n.childNodes[0]=a,a.parent=n,n.role=a.type.toLowerCase(),n.addAnnotation("collapsed",a.type.toLowerCase()),a.role=x.SUBSUP,r=r.concat(s),r.push(n);continue}r=r.concat(s),r.push(a),r.push(n)}while(i.rel.length);return r=r.concat(i.comp.pop()),r}combineUnits_(e){let i=xi(e,function(a){return!ie(a,x.UNIT)});if(e.length===i.rel.length)return i.rel;let r=[],s,n;do{let a=i.comp.shift();s=i.rel.shift();let o=null;n=r.pop(),n&&(!a.length||!Cp(n)?r.push(n):a.unshift(n)),a.length===1&&(o=a.pop()),a.length>1&&(o=v.getInstance().implicitNode_(a),o.role=x.UNIT),o&&r.push(o),s&&r.push(s)}while(s);return r}getMixedNumbers_(e){let i=xi(e,function(s){return et(s,f.FRACTION)&&ie(s,x.VULGAR)});if(!i.rel.length)return e;let r=[];for(let s=0,n;n=i.rel[s];s++){let a=i.comp[s],o=a.length-1;if(a[o]&&et(a[o],f.NUMBER)&&(ie(a[o],x.INTEGER)||ie(a[o],x.FLOAT))){let h=v.getInstance().factory_.makeBranchNode(f.NUMBER,[a[o],n],[]);h.role=x.MIXED,r=r.concat(a.slice(0,o)),r.push(h)}else r=r.concat(a),r.push(n)}return r.concat(i.comp[i.comp.length-1])}getTextInRow_(e){if(e.length===0)return e;if(e.length===1)return e[0].type===f.TEXT&&e[0].role===x.UNKNOWN&&(e[0].role=x.ANNOTATION),e;let{rel:i,comp:r}=xi(e,a=>et(a,f.TEXT)&&!a.annotation.factor);if(i.length===0)return e;let s=[],n=r.shift();for(;i.length>0;){let a=i.shift(),o=r.shift(),h=[];for(;!o.length&&i.length&&a.role!==x.SPACE&&i[0].role!==x.SPACE;)h.push(a),a=i.shift(),o=r.shift();if(h.length&&(h.push(a),a=v.getInstance().dummyNode_(h)),a.role!==x.UNKNOWN){let E=Ec(n,a,o);if(E){n=E;continue}n.length&&s.push(v.getInstance().row(n)),s.push(a),n=o;continue}let d=Yt.Meaning.get(a.textContent);if(d.type!==f.UNKNOWN){a.type=d.type,a.role=d.role,a.font=d.font,a.addAnnotation("general","text"),n.push(a),n=n.concat(o);continue}if(v.meaningFromContent(a,(E,y,A)=>{if(E.role===x.UNKNOWN){if(v.numberRole_(E,y,A),E.role!==x.OTHERNUMBER){E.type=f.NUMBER;return}if(A.some(w=>w.type!==f.NUMBER&&w.type!==f.IDENTIFIER)){E.type=f.TEXT,E.role=x.ANNOTATION;return}E.role=x.UNKNOWN}}),a.role===x.UNKNOWN&&(i.length||o.length?o.length&&o[0].type===f.FENCED?(a.type=f.FUNCTION,a.role=x.PREFIXFUNC):a.role=x.TEXT:(a.type=f.IDENTIFIER,a.role=x.UNIT)),a.type!==f.TEXT){n.push(a),n=n.concat(o);continue}let p=Ec(n,a,o);if(p){n=p;continue}n.length&&s.push(v.getInstance().row(n)),s.push(a),n=o}return n.length>0&&s.push(v.getInstance().row(n)),s.length>1?[v.getInstance().dummyNode_(s)]:s}relationsInRow_(e){let i=xi(e,bp),r=i.rel[0];if(!r)return v.getInstance().operationsInRow_(e);if(e.length===1)return e[0];let s=i.comp.map(v.getInstance().operationsInRow_),n;return i.rel.some(function(a){return!a.equals(r)})?(n=v.getInstance().factory_.makeBranchNode(f.MULTIREL,s,i.rel),i.rel.every(function(a){return a.role===r.role})&&(n.role=r.role),n):(n=v.getInstance().factory_.makeBranchNode(f.RELSEQ,s,i.rel,Ur(r).textContent),n.role=r.role,n)}operationsInRow_(e){if(e.length===0)return v.getInstance().factory_.makeEmptyNode();if(e=v.getInstance().explicitMixed_(e),e.length===1)return e[0];let i=[];for(;e.length>0&&fs(e[0]);)i.push(e.shift());if(e.length===0)return v.getInstance().multiopNode_(i);if(e.length===1)return v.getInstance().prefixNode_(e[0],i);e=bt.run("convert_juxtaposition",e);let r=lr(e,fs),s=v.getInstance().wrapFactor(i,r);return v.getInstance().addFactor(s,r)}wrapPostfix(e){e.div?.role===x.POSTFIXOP&&(!e.tail.length||e.tail[0].type===f.OPERATOR?(e.head=[v.getInstance().postfixNode_(v.getInstance().implicitNode(e.head),[e.div])],e.div=e.tail.shift(),v.getInstance().wrapPostfix(e)):e.div.role=x.DIVISION)}wrapFactor(e,i){return v.getInstance().wrapPostfix(i),v.getInstance().prefixNode_(v.getInstance().implicitNode(i.head),e)}addFactor(e,i){return i.div?v.getInstance().operationsTree_(i.tail,e,i.div):(Sp(e)&&(e.role=x.UNIT),e)}operationsTree_(e,i,r,s=[]){if(e.length===0){if(s.unshift(r),i.type===f.INFIXOP){let h=v.getInstance().postfixNode_(i.childNodes.pop(),s);return i.appendChild(h),i}return v.getInstance().postfixNode_(i,s)}let n=lr(e,fs);if(n.head.length===0)return s.push(n.div),v.getInstance().operationsTree_(n.tail,i,r,s);let a=v.getInstance().wrapFactor(s,n),o=v.getInstance().appendOperand_(i,r,a);return v.getInstance().addFactor(o,n)}appendOperand_(e,i,r){return e.type===f.INFIXOP?v.getInstance().appendDivisionOp_(e,i,r)||(v.getInstance().appendExistingOperator_(e,i,r)?e:i.role===x.MULTIPLICATION?v.getInstance().appendMultiplicativeOp_(e,i,r):v.getInstance().appendAdditiveOp_(e,i,r)):v.getInstance().infixNode_([e,r],i)}appendDivisionOp_(e,i,r){return i.role===x.DIVISION?hs(e)?v.getInstance().infixNode_([e,r],i):v.getInstance().appendLastOperand_(e,i,r):e.role===x.DIVISION?v.getInstance().infixNode_([e,r],i):null}appendLastOperand_(e,i,r){let s=e,n=e.childNodes[e.childNodes.length-1];for(;n&&n.type===f.INFIXOP&&!hs(n);)s=n,n=s.childNodes[s.childNodes.length-1];let a=v.getInstance().infixNode_([s.childNodes.pop(),r],i);return s.appendChild(a),e}appendMultiplicativeOp_(e,i,r){if(hs(e))return v.getInstance().infixNode_([e,r],i);let s=e,n=e.childNodes[e.childNodes.length-1];for(;n&&n.type===f.INFIXOP&&!hs(n);)s=n,n=s.childNodes[s.childNodes.length-1];let a=v.getInstance().infixNode_([s.childNodes.pop(),r],i);return s.appendChild(a),e}appendAdditiveOp_(e,i,r){return v.getInstance().infixNode_([e,r],i)}appendExistingOperator_(e,i,r){return!e||e.type!==f.INFIXOP||hs(e)?!1:e.contentNodes[0].equals(i)?(e.appendContentNode(i),e.appendChild(r),!0):v.getInstance().appendExistingOperator_(e.childNodes[e.childNodes.length-1],i,r)}getFencesInRow_(e){let i=xi(e,Ep);i=v.purgeFences_(i);let r=i.comp.shift();return v.getInstance().fences_(i.rel,i.comp,[],[r])}fences_(e,i,r,s){if(e.length===0&&r.length===0)return s[0];let n=bt.run("bracketed_interval",[e[0],e[1],...i[0]||[]],()=>null);if(n){e.shift(),e.shift(),i.shift();let p=s.pop()||[];return s.push([...p,n,...i.shift()]),v.getInstance().fences_(e,i,r,s)}let a=p=>ie(p,x.OPEN);if(e.length===0){let p=s.shift();for(;r.length>0;){if(a(r[0])){let E=r.shift();v.fenceToPunct_(E),p.push(E)}else{let E=lr(r,a),y=E.head.length-1,A=v.getInstance().neutralFences_(E.head,s.slice(0,y));s=s.slice(y),p.push(...A),E.div&&E.tail.unshift(E.div),r=E.tail}p.push(...s.shift())}return p}let o=r[r.length-1],h=e[0].role;if(h===x.OPEN||Ki(e[0])&&!(o&&Go(e[0],o))){r.push(e.shift());let p=i.shift();return p&&s.push(p),v.getInstance().fences_(e,i,r,s)}if(o&&h===x.CLOSE&&o.role===x.OPEN){let p=v.getInstance().horizontalFencedNode_(r.pop(),e.shift(),s.pop());return s.push(s.pop().concat([p],i.shift())),v.getInstance().fences_(e,i,r,s)}if(o&&Go(e[0],o)){if(!gc(o)||!bc(e[0])){r.push(e.shift());let E=i.shift();return E&&s.push(E),v.getInstance().fences_(e,i,r,s)}let p=v.getInstance().horizontalFencedNode_(r.pop(),e.shift(),s.pop());return s.push(s.pop().concat([p],i.shift())),v.getInstance().fences_(e,i,r,s)}if(o&&h===x.CLOSE&&Ki(o)&&r.some(a)){let p=lr(r,a,!0),E=s.pop(),y=s.length-p.tail.length+1,A=v.getInstance().neutralFences_(p.tail,s.slice(y));s=s.slice(0,y);let w=v.getInstance().horizontalFencedNode_(p.div,e.shift(),s.pop().concat(A,E));return s.push(s.pop().concat([w],i.shift())),v.getInstance().fences_(e,i,p.head,s)}let d=e.shift();return v.fenceToPunct_(d),s.push(s.pop().concat([d],i.shift())),v.getInstance().fences_(e,i,r,s)}neutralFences_(e,i){if(e.length===0)return e;if(e.length===1)return v.fenceToPunct_(e[0]),e;let r=e.shift();if(!gc(r)){v.fenceToPunct_(r);let a=i.shift();return a.unshift(r),a.concat(v.getInstance().neutralFences_(e,i))}let s=lr(e,function(a){return Go(a,r)});if(!s.div){v.fenceToPunct_(r);let a=i.shift();return a.unshift(r),a.concat(v.getInstance().neutralFences_(e,i))}if(!bc(s.div))return v.fenceToPunct_(s.div),e.unshift(r),v.getInstance().neutralFences_(e,i);let n=v.getInstance().combineFencedContent_(r,s.div,s.head,i);if(s.tail.length>0){let a=n.shift(),o=v.getInstance().neutralFences_(s.tail,n);return a.concat(o)}return n[0]}combineFencedContent_(e,i,r,s){if(r.length===0){let E=v.getInstance().horizontalFencedNode_(e,i,s.shift());return s.length>0?s[0].unshift(E):s=[[E]],s}let n=s.shift(),a=r.length-1,o=s.slice(0,a);s=s.slice(a);let h=s.shift(),d=v.getInstance().neutralFences_(r,o);n.push(...d),n.push(...h);let p=v.getInstance().horizontalFencedNode_(e,i,n);return s.length>0?s[0].unshift(p):s=[[p]],s}horizontalFencedNode_(e,i,r){let s=v.getInstance().row(r),n=e.mathmlTree?.nextSibling;et(s,f.EMPTY)&&!s.mathmlTree&&e.mathmlTree&&i.mathmlTree!==n&&!Zs(i.mathmlTree,n)&&(s.mathmlTree=n,s.addMathmlNodes([n]));let a=v.getInstance().factory_.makeBranchNode(f.FENCED,[s],[e,i]);return e.role===x.OPEN?(v.getInstance().classifyHorizontalFence_(a),a=bt.run("propagateComposedFunction",a)):a.role=e.role,a=bt.run("detect_cycle",a),v.rewriteFencedNode_(a)}classifyHorizontalFence_(e){if(bt.run("interval_heuristic",e),e.role===x.INTERVAL)return;e.role=x.LEFTRIGHT;let i=e.childNodes;if(!Rf(e)||i.length>1)return;if(i.length===0||i[0].type===f.EMPTY){e.role=x.SETEMPTY;return}let r=i[0].type;if(i.length===1&&Hl(i[0])){e.role=x.SETSINGLE;return}let s=i[0].role;if(!(r!==f.PUNCTUATED||s!==x.SEQUENCE)){if(i[0].contentNodes[0].role===x.COMMA){e.role=x.SETCOLLECT;return}if(i[0].contentNodes.length===1&&(i[0].contentNodes[0].role===x.VBAR||i[0].contentNodes[0].role===x.COLON)){e.role=x.SETEXT,v.getInstance().setExtension_(e);return}}}setExtension_(e){let i=e.childNodes[0].childNodes[0];i&&i.type===f.INFIXOP&&i.contentNodes.length===1&&Ap(i.contentNodes[0])&&(i.addAnnotation("set","intensional"),i.contentNodes[0].addAnnotation("set","intensional"))}getPunctuationInRow_(e){if(e.length<=1)return e;let i=o=>{let h=o.type;return h==="punctuation"||h==="text"||h==="operator"||h==="relation"},r=xi(e,function(o){if(!ao(o))return!1;if(ao(o)&&!ie(o,x.ELLIPSIS))return!0;let h=e.indexOf(o);if(h===0)return!(e[1]&&i(e[1]));let d=e[h-1];if(h===e.length-1)return!i(d);let p=e[h+1];return!(i(d)&&i(p))});if(r.rel.length===0)return e;let s=[],n=r.comp.shift();n.length>0&&s.push(v.getInstance().row(n));let a=0;for(;r.comp.length>0;){let o=[],h=a;do o.push(r.rel[a++]),n=r.comp.shift();while(r.rel[a]&&n&&n.length===0);o=bt.run("ellipses",o),r.rel.splice(h,a-h,...o),a=h+o.length,s=s.concat(o),n&&n.length>0&&s.push(v.getInstance().row(n))}return s.length===1&&r.rel.length===1?s:[v.getInstance().punctuatedNode_(s,r.rel)]}punctuatedNode_(e,i){let r=v.getInstance().factory_.makeBranchNode(f.PUNCTUATED,e,i);if(i.length===e.length){let n=i[0].role;if(n!==x.UNKNOWN&&i.every(function(a){return a.role===n}))return r.role=n,r}let s=i[0];return fc(e,i,0)?r.role=s.childNodes.length&&!s.embellished?s.role:x.STARTPUNCT:fc(e,i,e.length-1)?r.role=s.childNodes.length&&!s.embellished?s.role:x.ENDPUNCT:i.every(n=>ie(n,x.DUMMY))?r.role=x.TEXT:i.every(n=>ie(n,x.SPACE))?r.role=x.SPACE:r.role=x.SEQUENCE,r}dummyNode_(e){let i=v.getInstance().factory_.makeMultipleContentNodes(e.length-1,fr.invisibleComma);return i.forEach(function(r){r.role=x.DUMMY}),v.getInstance().punctuatedNode_(e,i)}accentRole_(e,i){if(!ks(e))return!1;let r=e.textContent,s=Yt.Secondary.get(r,Me.BAR)||Yt.Secondary.get(r,Me.TILDE)||e.role;return e.role=i===f.UNDERSCORE?x.UNDERACCENT:x.OVERACCENT,e.addAnnotation("accent",s),!0}accentNode_(e,i,r,s,n){i=i.slice(0,s+1);let a=i[1],o=i[2],h;if(!n&&o&&(h=v.getInstance().factory_.makeBranchNode(f.SUBSCRIPT,[e,a],[]),h.role=x.SUBSUP,i=[h,o],r=f.SUPERSCRIPT),n){let d=v.getInstance().accentRole_(a,r);o&&(v.getInstance().accentRole_(o,f.OVERSCORE)&&!d?(h=v.getInstance().factory_.makeBranchNode(f.OVERSCORE,[e,o],[]),i=[h,a],r=f.UNDERSCORE):(h=v.getInstance().factory_.makeBranchNode(f.UNDERSCORE,[e,a],[]),i=[h,o],r=f.OVERSCORE),h.role=x.UNDEROVER)}return v.getInstance().makeLimitNode_(e,i,h,r)}makeLimitNode_(e,i,r,s){if(s===f.LIMUPPER&&e.type===f.LIMLOWER)return e.childNodes.push(i[1]),i[1].parent=e,e.type=f.LIMBOTH,e;if(s===f.LIMLOWER&&e.type===f.LIMUPPER)return e.childNodes.splice(1,-1,i[1]),i[1].parent=e,e.type=f.LIMBOTH,e;let n=v.getInstance().factory_.makeBranchNode(s,i,[]),a=pc(e);return r&&(r.embellished=a),n.embellished=a,n.role=e.role,n}getFunctionsInRow_(e,i){let r=i||[];if(e.length===0)return r;let s=e.shift(),n=v.classifyFunction_(s,e);if(!n)return r.push(s),v.getInstance().getFunctionsInRow_(e,r);let a=v.getInstance().getFunctionsInRow_(e,[]),o=v.getInstance().getFunctionArgs_(s,a,n);return r.concat(o)}getFunctionArgs_(e,i,r){let s,n,a;switch(r){case"integral":{let o=v.getInstance().getIntegralArgs_(i);if(!o.intvar&&!o.integrand.length)return o.rest.unshift(e),o.rest;let h=v.getInstance().row(o.integrand);return a=v.getInstance().integralNode_(e,h,o.intvar),bt.run("intvar_from_fraction",a),o.rest.unshift(a),o.rest}case"prefix":if(i[0]&&i[0].type===f.FENCED){let o=i.shift();return Ki(o)||(o.role=x.LEFTRIGHT),a=v.getInstance().functionNode_(e,o),i.unshift(a),i}if(s=lr(i,bf),s.head.length)n=v.getInstance().row(s.head),s.div&&s.tail.unshift(s.div);else{if(!s.div||!et(s.div,f.APPL))return i.unshift(e),i;n=s.div}return a=v.getInstance().functionNode_(e,n),s.tail.unshift(a),s.tail;case"bigop":return s=lr(i,uc),s.head.length?(n=v.getInstance().row(s.head),a=v.getInstance().bigOpNode_(e,n),s.div&&s.tail.unshift(s.div),s.tail.unshift(a),s.tail):(i.unshift(e),i);default:{if(i.length===0)return[e];let o=i[0];return o.type===f.FENCED&&!Ki(o)&&gf(o)?(o.role=x.LEFTRIGHT,v.propagateFunctionRole_(e,x.SIMPLEFUNC),a=v.getInstance().functionNode_(e,i.shift()),i.unshift(a),i):(i.unshift(e),i)}}}getIntegralArgs_(e,i=[]){if(e.length===0){let s=lr(i,uc);return s.div&&s.tail.unshift(s.div),{integrand:s.head,intvar:null,rest:s.tail}}bt.run("intvar_from_implicit",e);let r=e[0];if(jh(r)){let{integrand:s,rest:n}=v.getInstance().getIntegralArgs_(i);return{integrand:s,intvar:null,rest:n.concat(e)}}if(Ul(r))return r.role=x.INTEGRAL,{integrand:i,intvar:r,rest:e.slice(1)};if(e[1]&&gp(r,e[1])){let s=v.getInstance().prefixNode_(e[1],[r]);return s.role=x.INTEGRAL,{integrand:i,intvar:s,rest:e.slice(2)}}return i.push(e.shift()),v.getInstance().getIntegralArgs_(e,i)}functionNode_(e,i){let r=v.getInstance().factory_.makeContentNode(fr.functionApplication),s=v.getInstance().funcAppls[e.id];s&&(r.mathmlTree=s.mathmlTree,r.addMathmlNodes(s.mathml),r.annotation=s.annotation,r.attributes=s.attributes,delete v.getInstance().funcAppls[e.id]),r.type=f.PUNCTUATION,r.role=x.APPLICATION;let n=v.getFunctionOp_(e,function(a){return et(a,f.FUNCTION)||et(a,f.IDENTIFIER)&&ie(a,x.SIMPLEFUNC)});return v.getInstance().functionalNode_(f.APPL,[e,i],n,[r])}bigOpNode_(e,i){let r=v.getFunctionOp_(e,s=>et(s,f.LARGEOP));return v.getInstance().functionalNode_(f.BIGOP,[e,i],r,[])}integralNode_(e,i,r){i||(i=v.getInstance().factory_.makeEmptyNode()),r||(r=v.getInstance().factory_.makeEmptyNode());let s=v.getFunctionOp_(e,n=>et(n,f.LARGEOP));return v.getInstance().functionalNode_(f.INTEGRAL,[e,i,r],s,[])}functionalNode_(e,i,r,s){let n=i[0],a;r&&(a=r.parent,s.push(r));let o=v.getInstance().factory_.makeBranchNode(e,i,s);return o.role=n.role,a&&(r.parent=a),o}fractionNode_(e,i){let r=v.getInstance().factory_.makeBranchNode(f.FRACTION,[e,i],[]);return r.role=r.childNodes.every(function(s){return et(s,f.NUMBER)&&ie(s,x.INTEGER)})?x.VULGAR:r.childNodes.every(Wl)?x.UNIT:x.DIVISION,bt.run("propagateSimpleFunction",r)}scriptNode_(e,i,r){let s;switch(e.length){case 0:s=v.getInstance().factory_.makeEmptyNode();break;case 1:if(s=e[0],r)return s;break;default:s=v.getInstance().dummyNode_(e),s.addAnnotation("general","script")}return s.role=i,s}findNestedRow_(e,i,r,s){if(r>3)return null;for(let n=0,a;a=e[n];n++){let o=Mt(a);if(o!==D.MSPACE){if(o===D.MROW)return v.getInstance().findNestedRow_(be(a.childNodes),i,r+1,s);if(v.findSemantics(a,i,s))return a}}return null}};_t.FENCE_TO_PUNCT_={[x.METRIC]:x.METRIC,[x.NEUTRAL]:x.VBAR,[x.OPEN]:x.OPENFENCE,[x.CLOSE]:x.CLOSEFENCE},_t.MML_TO_LIMIT_={[D.MSUB]:{type:f.LIMLOWER,length:1},[D.MUNDER]:{type:f.LIMLOWER,length:1},[D.MSUP]:{type:f.LIMUPPER,length:1},[D.MOVER]:{type:f.LIMUPPER,length:1},[D.MSUBSUP]:{type:f.LIMBOTH,length:2},[D.MUNDEROVER]:{type:f.LIMBOTH,length:2}},_t.MML_TO_BOUNDS_={[D.MSUB]:{type:f.SUBSCRIPT,length:1,accent:!1},[D.MSUP]:{type:f.SUPERSCRIPT,length:1,accent:!1},[D.MSUBSUP]:{type:f.SUBSCRIPT,length:2,accent:!1},[D.MUNDER]:{type:f.UNDERSCORE,length:1,accent:!0},[D.MOVER]:{type:f.OVERSCORE,length:1,accent:!0},[D.MUNDEROVER]:{type:f.UNDERSCORE,length:2,accent:!0}},_t.CLASSIFY_FUNCTION_={[x.INTEGRAL]:"integral",[x.SUM]:"bigop",[x.PREFIXFUNC]:"prefix",[x.LIMFUNC]:"prefix",[x.SIMPLEFUNC]:"prefix",[x.COMPFUNC]:"prefix"},_t.MATHJAX_FONTS={"-tex-caligraphic":Qt.CALIGRAPHIC,"-tex-caligraphic-bold":Qt.CALIGRAPHICBOLD,"-tex-calligraphic":Qt.CALIGRAPHIC,"-tex-calligraphic-bold":Qt.CALIGRAPHICBOLD,"-tex-oldstyle":Qt.OLDSTYLE,"-tex-oldstyle-bold":Qt.OLDSTYLEBOLD,"-tex-mathit":Qt.ITALIC};function Ec(t,e,i){let r=t[t.length-1];if(r&&(r.type===f.RELATION||r.type===f.OPERATOR))return e.addAnnotation("factor",r.type),[...t,e,...i];let s=i[0];return s&&(s.type===f.RELATION||s.type===f.OPERATOR)?(e.addAnnotation("factor",s.type),[...t,e,...i]):null}function Mf(t){let e=Yt.FencesSecondary.get(t.contentNodes[0].textContent);e===Yt.FencesSecondary.get(t.contentNodes[1].textContent)&&t.addAnnotation("fences",e)}function Df(t){return et(t,f.MULTILINE)&&t.childNodes.length===1&&t.childNodes[0].childNodes.length&&!vp(t.childNodes[0])}function Vo(t,e){return t.forEach(i=>e.addAnnotation("empty",i)),e}var yc=class Aa extends ff{static getAttribute_(e,i,r){if(!e.hasAttribute(i))return r;let s=e.getAttribute(i);return s.match(/^\s*$/)?null:s}constructor(e){super("MathML"),this.options=e,bt.options=e,this.parseMap_=new Map([[D.SEMANTICS,this.semantics_.bind(this)],[D.MATH,this.rows_.bind(this)],[D.MROW,this.rows_.bind(this)],[D.MPADDED,this.rows_.bind(this)],[D.MSTYLE,this.rows_.bind(this)],[D.MFRAC,this.fraction_.bind(this)],[D.MSUB,this.limits_.bind(this)],[D.MSUP,this.limits_.bind(this)],[D.MSUBSUP,this.limits_.bind(this)],[D.MOVER,this.limits_.bind(this)],[D.MUNDER,this.limits_.bind(this)],[D.MUNDEROVER,this.limits_.bind(this)],[D.MROOT,this.root_.bind(this)],[D.MSQRT,this.sqrt_.bind(this)],[D.MTABLE,this.table_.bind(this)],[D.MLABELEDTR,this.tableLabeledRow_.bind(this)],[D.MTR,this.tableRow_.bind(this)],[D.MTD,this.tableCell_.bind(this)],[D.MS,this.text_.bind(this)],[D.MTEXT,this.text_.bind(this)],[D.MSPACE,this.space_.bind(this)],[D.ANNOTATIONXML,this.text_.bind(this)],[D.MI,this.identifier_.bind(this)],[D.MN,this.number_.bind(this)],[D.MO,this.operator_.bind(this)],[D.MFENCED,this.fenced_.bind(this)],[D.MENCLOSE,this.enclosed_.bind(this)],[D.MMULTISCRIPTS,this.multiscripts_.bind(this)],[D.ANNOTATION,this.empty_.bind(this)],[D.NONE,this.empty_.bind(this)],[D.MACTION,this.action_.bind(this)],[D.MPHANTOM,this.phantom_.bind(this)]]);let i={type:f.IDENTIFIER,role:x.NUMBERSET,font:Qt.DOUBLESTRUCK};["C","H","N","P","Q","R","Z","ℂ","ℍ","ℕ","ℙ","ℚ","ℝ","ℤ"].forEach((r=>this.getFactory().defaultMap.set(r,i)).bind(this))}parse(e){_t.getInstance().setNodeFactory(this.getFactory());let i=be(e.childNodes),r=Mt(e),s=(this.parseMap_.get(r)||this.dummy_.bind(this))(e,i);return s.noupdate||(jl(s,e),[D.MATH,D.MROW,D.MPADDED,D.MSTYLE,D.SEMANTICS,D.MACTION].indexOf(r)!==-1)||(s.mathml.unshift(e),s.mathmlTree=e),s}semantics_(e,i){return i.length?this.parse(i[0]):this.getFactory().makeEmptyNode()}rows_(e,i){let r=e.getAttribute("semantics");if(r&&r.match("bspr_"))return _t.proof(e,r,this.parseList.bind(this));i=Is(i);let s;if(i.length===1)s=this.parse(i[0]),s.type===f.EMPTY&&!s.mathmlTree&&(s.mathmlTree=e);else{let n=bt.run("function_from_identifiers",e),a=this.parseList(i),o=Mt(e)===D.MSTYLE;s=n&&n!==e?n:_t.getInstance().row(a,o)}return s.mathml.unshift(e),s}fraction_(e,i){if(!i.length)return this.getFactory().makeEmptyNode();let r=this.parse(i[0]),s=i[1]?this.parse(i[1]):this.getFactory().makeEmptyNode();return _t.getInstance().fractionLikeNode(r,s,e.getAttribute("linethickness"),e.getAttribute("bevelled")==="true")}limits_(e,i){return _t.getInstance().limitNode(Mt(e),this.parseList(i))}root_(e,i){return i[1]?this.getFactory().makeBranchNode(f.ROOT,[this.parse(i[1]),this.parse(i[0])],[]):this.sqrt_(e,i)}sqrt_(e,i){let r=this.parseList(Is(i));return this.getFactory().makeBranchNode(f.SQRT,[_t.getInstance().row(r)],[])}table_(e,i){let r=e.getAttribute("semantics");if(r&&r.match("bspr_"))return _t.proof(e,r,this.parseList.bind(this));let s=this.getFactory().makeBranchNode(f.TABLE,this.parseList(i),[]);return s.mathmlTree=e,_t.tableToMultiline(s)}tableRow_(e,i){let r=this.getFactory().makeBranchNode(f.ROW,this.parseList(i),[]);return r.role=x.TABLE,r}tableLabeledRow_(e,i){if(!i.length)return this.tableRow_(e,i);let r=this.parse(i[0]);r.role=x.LABEL,r.childNodes[0]?.type===f.TEXT&&(r.childNodes[0].role=x.LABEL);let s=this.getFactory().makeBranchNode(f.ROW,this.parseList(i.slice(1)),[r]);return s.role=x.TABLE,s}tableCell_(e,i){let r=this.parseList(Is(i)),s;s=r.length?r.length===1&&et(r[0],f.EMPTY)?r:[_t.getInstance().row(r)]:[];let n=this.getFactory().makeBranchNode(f.CELL,s,[]);return n.role=x.TABLE,n}phantom_(e,i){let r;return i.length?(r=this.getFactory().makeUnprocessed(e),r.type=f.TEXT,r.role=x.SPACE):r=this.empty_(e,i),r}space_(e,i){if(!mp(e))return this.empty_(e,i);let r=this.getFactory().makeUnprocessed(e);return _t.getInstance().text(r,Mt(e))}text_(e,i){let r=this.leaf_(e,i);return e.textContent?(r.updateContent(e.textContent,!0),_t.getInstance().text(r,Mt(e))):r}identifier_(e,i){let r=this.leaf_(e,i);return _t.getInstance().identifierNode(r,_t.getInstance().font(e.getAttribute("mathvariant")),e.getAttribute("class"))}number_(e,i){let r=this.leaf_(e,i);return _t.number(r),r}operator_(e,i){let r=this.leaf_(e,i);return _t.getInstance().operatorNode(r),r}fenced_(e,i){let r=this.parseList(i);r.forEach(h=>{et(h,f.EMPTY)&&h.addAnnotation("empty","MFENCED")});let s=Aa.getAttribute_(e,"separators",","),n=Aa.getAttribute_(e,"open","("),a=Aa.getAttribute_(e,"close",")"),o=_t.getInstance().mfenced(n,a,s,r);return o.mathmlTree=e,o.addMathmlNodes([e]),_t.getInstance().tablesInRow([o])[0]}enclosed_(e,i){let r=this.parseList(Is(i)),s=this.getFactory().makeBranchNode(f.ENCLOSE,[_t.getInstance().row(r)],[]);return s.role=e.getAttribute("notation")||x.UNKNOWN,s}multiscripts_(e,i){if(!i.length)return this.getFactory().makeEmptyNode();let r=this.parse(i.shift());if(!i.length)return r;let s=[],n=[],a=[],o=[],h=!1,d=0;for(let p=0,E;E=i[p];p++){if(Mt(E)===D.MPRESCRIPTS){h=!0,d=0;continue}h?d&1?s.push(E):n.push(E):d&1?a.push(E):o.push(E),d++}return!Is(s).length&&!Is(n).length?_t.getInstance().pseudoTensor(r,this.parseList(o),this.parseList(a)):_t.getInstance().tensor(r,this.parseList(n),this.parseList(s),this.parseList(o),this.parseList(a))}empty_(e,i){let r=this.getFactory().makeEmptyNode();return r.addMathmlNodes([e]),r.mathmlTree=e,r}action_(e,i){let r=i[e.hasAttribute("selection")?parseInt(e.getAttribute("selection"),10)-1:0],s=this.parse(r);return s.mathmlTree=r,s}dummy_(e,i){let r=this.getFactory().makeUnprocessed(e);return r.role=e.tagName,r.textContent=e.textContent,r}leaf_(e,i){if(i.length===1&&i[0].nodeType!==zr.TEXT_NODE){let s=this.getFactory().makeUnprocessed(e);return s.role=i[0].tagName,jl(s,i[0]),s}let r=this.getFactory().makeLeafNode(e.textContent,_t.getInstance().font(e.getAttribute("mathvariant")));return e.hasAttribute("data-latex")&&Yt.LatexCommands.set(e.getAttribute("data-latex"),e.textContent),r}},Uh=class{constructor(t,e,i=r=>!1){this.name=t,this.apply=e,this.applicable=i}},_i=class extends Uh{},qn=class extends Uh{},Pf=class extends Uh{};function xc(t,e){let i=[];for(;t.length||e.length;)t.length&&i.push(t.shift()),e.length&&i.push(e.shift());return i}var Lp="data-semantic-",st;(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"})(st||(st={}));var Bf=[st.ADDED,st.ALTERNATIVE,st.CHILDREN,st.COLLAPSED,st.CONTENT,st.EMBELLISHED,st.FENCEPOINTER,st.FONT,st.ID,st.ANNOTATION,st.ATTRIBUTES,st.OPERATOR,st.OWNS,st.PARENT,st.POSTFIX,st.PREFIX,st.ROLE,st.SPEECH,st.STRUCTURE,st.SUMMARY,st.TYPE];function zl(t){return t.map(function(e){return e.id}).join(",")}function we(t,e){t.setAttribute(st.TYPE,e.type);let i=e.allAttributes();for(let s=0,n;n=i[s];s++)t.setAttribute(Lp+n[0].toLowerCase(),n[1]);e.childNodes.length&&t.setAttribute(st.CHILDREN,zl(e.childNodes)),e.contentNodes.length&&t.setAttribute(st.CONTENT,zl(e.contentNodes)),e.parent&&t.setAttribute(st.PARENT,e.parent.id.toString());let r=e.attributesXml();r&&t.setAttribute(st.ATTRIBUTES,r),Ff(t,e)}function Ff(t,e){let i=[];e.role===x.MGLYPH&&i.push("image"),e.attributes.href&&i.push("link"),i.length&&t.setAttribute(st.POSTFIX,i.join(" "))}function _f(t){return t.toString().replace(new RegExp(Lp,"g"),"")}function Nr(){let t=Wn("mrow");return t.setAttribute(st.ADDED,"true"),t}var vr=class Pt{static fromTree(e){return Pt.fromNode(e.root)}static fromNode(e){return new Pt(Pt.fromNode_(e))}static fromString(e){return new Pt(Pt.fromString_(e))}static simpleCollapseStructure(e){return typeof e=="number"}static contentCollapseStructure(e){return!!e&&!Pt.simpleCollapseStructure(e)&&e[0]==="c"}static interleaveIds(e,i){return xc(Pt.collapsedLeafs(e),Pt.collapsedLeafs(i))}static collapsedLeafs(...e){let i=r=>Pt.simpleCollapseStructure(r)?[r]:(r=r,Pt.contentCollapseStructure(r[1])?r.slice(2):r.slice(1));return e.reduce((r,s)=>r.concat(i(s)),[])}static fromStructure(e,i,r){let s=new Map;e.hasAttribute(st.ID)&&s.set(e.getAttribute(st.ID),e);for(let n of A0(e,st.ID))s.set(n.getAttribute(st.ID),n);return new Pt(Pt.tree_(s,i.root,r))}static combineContentChildren(e,i,r,s){switch(e){case f.RELSEQ:case f.INFIXOP:case f.MULTIREL:return xc(s,r);case f.PREFIXOP:return r.concat(s);case f.POSTFIXOP:return s.concat(r);case f.MATRIX:case f.VECTOR:case f.FENCED:return s.unshift(r[0]),s.push(r[1]),s;case f.CASES:return s.unshift(r[0]),s;case f.APPL:return[s[0],r[0],s[1]];case f.ROOT:return[s[0],s[1]];case f.ROW:case f.LINE:return r.length&&s.push(r[0]),s;default:return s}}static makeSexp_(e){return Pt.simpleCollapseStructure(e)?e.toString():Pt.contentCollapseStructure(e)?"(c "+e.slice(1).map(Pt.makeSexp_).join(" ")+")":"("+e.map(Pt.makeSexp_).join(" ")+")"}static fromString_(e){let i=e.replace(/\(/g,"[");return i=i.replace(/\)/g,"]"),i=i.replace(/ /g,","),i=i.replace(/c/g,'"c"'),JSON.parse(i)}static fromNode_(e){if(!e)return[];let i=e.contentNodes,r;i.length&&(r=i.map(Pt.fromNode_),r.unshift("c"));let s=e.childNodes;if(!s.length)return i.length?[e.id,r]:e.id;let n=s.map(Pt.fromNode_);return i.length&&n.unshift(r),n.unshift(e.id),n}static tree_(e,i,r,s=0,n=1,a=1){if(!i)return[];let o=i.id,h=[o],d=e.get(o.toString());if(!i.childNodes.length)return Pt.addAria(d,s,n,a,r),i.id;let p=Pt.combineContentChildren(i.type,i.role,i.contentNodes,i.childNodes);d&&Pt.addOwns_(d,p);for(let E=0,y=p.length,A;A=p[E];E++)h.push(Pt.tree_(e,A,r,s+1,E+1,y));return Pt.addAria(d,s,n,a,r),h}static addAria(e,i,r,s,n){let a=n.tree?i?"treeitem":"tree":"treeitem";!n.aria||!e||(e.setAttribute("aria-level",i.toString()),e.setAttribute("aria-posinset",r.toString()),e.setAttribute("aria-setsize",s.toString()),e.setAttribute("role",a),e.hasAttribute(st.OWNS)&&e.setAttribute("aria-owns",e.getAttribute(st.OWNS)))}static addOwns_(e,i){let r=e.getAttribute(st.COLLAPSED),s=r?Pt.realLeafs_(Pt.fromString(r).array):i.map(n=>n.id);e.setAttribute(st.OWNS,s.join(" "))}static realLeafs_(e){if(Pt.simpleCollapseStructure(e))return[e];if(Pt.contentCollapseStructure(e))return[];e=e;let i=[];for(let r=1;r<e.length;r++)i=i.concat(Pt.realLeafs_(e[r]));return i}constructor(e){this.parents=null,this.levelsMap=null,e=e===0?e:e||[],this.array=e}populate(){this.parents&&this.levelsMap||(this.parents={},this.levelsMap={},this.populate_(this.array,this.array,[]))}toString(){return Pt.makeSexp_(this.array)}populate_(e,i,r){if(Pt.simpleCollapseStructure(e)){e=e,this.levelsMap[e]=i,this.parents[e]=e===r[0]?r.slice(1):r;return}let s=Pt.contentCollapseStructure(e)?e.slice(1):e,n=[s[0]].concat(r);for(let a=0,o=s.length;a<o;a++){let h=s[a];this.populate_(h,e,n)}}isRoot(e){return e===this.levelsMap[e][0]}directChildren(e){return this.isRoot(e)?this.levelsMap[e].slice(1).map(i=>Pt.simpleCollapseStructure(i)?i:Pt.contentCollapseStructure(i)?i[1]:i[0]):[]}subtreeNodes(e){if(!this.isRoot(e))return[];let i=(n,a)=>{if(Pt.simpleCollapseStructure(n)){a.push(n);return}n=n,Pt.contentCollapseStructure(n)&&(n=n.slice(1)),n.forEach(o=>i(o,a))},r=this.levelsMap[e],s=[];return i(r.slice(1),s),s}};bt.add(new _i("combine_juxtaposition",jf));function jf(t){for(let e=t.childNodes.length-1,i;i=t.childNodes[e];e--)!Tn(i)||i.nobreaking||(t.childNodes.splice(e,1,...i.childNodes),t.contentNodes.splice(e,0,...i.contentNodes),i.childNodes.concat(i.contentNodes).forEach(function(r){r.parent=t}),t.addMathmlNodes(i.mathml));return t}bt.add(new _i("propagateSimpleFunction",t=>((t.type===f.INFIXOP||t.type===f.FRACTION)&&t.childNodes.every(Sf)&&(t.role=x.COMPFUNC),t),t=>bt.options.domain==="clearspeak")),bt.add(new _i("simpleNamedFunction",t=>(t.role!==x.UNIT&&["f","g","h","F","G","H"].indexOf(t.textContent)!==-1&&(t.role=x.SIMPLEFUNC),t),t=>bt.options.domain==="clearspeak")),bt.add(new _i("propagateComposedFunction",t=>(t.type===f.FENCED&&t.childNodes[0].role===x.COMPFUNC&&(t.role=x.COMPFUNC),t),t=>bt.options.domain==="clearspeak")),bt.add(new _i("multioperator",t=>{t.role!==x.UNKNOWN||t.textContent.length<=1||(_t.compSemantics(t,"role",x),_t.compSemantics(t,"type",f))})),bt.add(new qn("convert_juxtaposition",t=>{let e=xi(t,function(i){return i.textContent===fr.invisibleTimes&&i.type===f.OPERATOR});e=e.rel.length?Uf(e):e,t=e.comp[0];for(let i=1,r,s;r=e.comp[i],s=e.rel[i-1];i++)t.push(s),t=t.concat(r);return e=xi(t,function(i){return i.textContent===fr.invisibleTimes&&(i.type===f.OPERATOR||i.type===f.INFIXOP)}),e.rel.length?Ps(e.comp.shift(),e.rel,e.comp):t})),bt.add(new _i("simple2prefix",t=>(t.textContent.length>1&&!t.textContent[0].match(/[A-Z]/)&&(t.role=x.PREFIXFUNC),t),t=>bt.options.modality==="braille"&&t.type===f.IDENTIFIER)),bt.add(new _i("detect_cycle",t=>{t.type=f.MATRIX,t.role=x.CYCLE;let e=t.childNodes[0];return e.type=f.ROW,e.role=x.CYCLE,e.textContent="",e.contentNodes=[],t},t=>t.type===f.FENCED&&t.childNodes[0].type===f.INFIXOP&&t.childNodes[0].role===x.IMPLICIT&&t.childNodes[0].childNodes.every(function(e){return e.type===f.NUMBER})&&t.childNodes[0].contentNodes.every(function(e){return e.role===x.SPACE})));function Uf(t){let e=[],i=[],r=t.comp.shift(),s=null,n=[];for(;t.comp.length;){if(n=[],r.length){s&&e.push(s),i.push(r),s=t.rel.shift(),r=t.comp.shift();continue}for(s&&n.push(s);!r.length&&t.comp.length;)r=t.comp.shift(),n.push(t.rel.shift());s=Nc(n,r,i)}return!n.length&&!r.length?(n.push(s),Nc(n,r,i)):(e.push(s),i.push(r)),{rel:e,comp:i}}function Nc(t,e,i){let r=null;if(!t.length)return r;let s=i[i.length-1],n=s&&s.length,a=e&&e.length,o=_t.getInstance();if(n&&a){if(e[0].type===f.INFIXOP&&e[0].role===x.IMPLICIT)return r=t.pop(),s.push(o.postfixNode_(s.pop(),t)),r;r=t.shift();let h=o.prefixNode_(e.shift(),t);return e.unshift(h),r}return n?(s.push(o.postfixNode_(s.pop(),t)),r):(a&&e.unshift(o.prefixNode_(e.shift(),t)),r)}function Ps(t,e,i){if(!e.length)return t;let r=t.pop(),s=e.shift(),n=i.shift();if(s.type===f.INFIXOP&&(s.role===x.IMPLICIT||s.role===x.UNIT)){Xt.getInstance().output("Juxta Heuristic Case 2");let h=(r?[r,s]:[s]).concat(n);return Ps(t.concat(h),e,i)}if(!r)return Xt.getInstance().output("Juxta Heuristic Case 3"),Ps([s].concat(n),e,i);let a=n.shift();if(!a){Xt.getInstance().output("Juxta Heuristic Case 9");let h=bt.factory.makeBranchNode(f.INFIXOP,[r,e.shift()],[s],s.textContent);return h.role=x.IMPLICIT,bt.run("combine_juxtaposition",h),e.unshift(h),Ps(t,e,i)}if(fs(r)||fs(a))return Xt.getInstance().output("Juxta Heuristic Case 4"),Ps(t.concat([r,s,a]).concat(n),e,i);let o=null;return Tn(r)&&Tn(a)?(Xt.getInstance().output("Juxta Heuristic Case 5"),r.contentNodes.push(s),r.contentNodes=r.contentNodes.concat(a.contentNodes),r.childNodes.push(a),r.childNodes=r.childNodes.concat(a.childNodes),a.childNodes.forEach(h=>h.parent=r),s.parent=r,r.addMathmlNodes(s.mathml),r.addMathmlNodes(a.mathml),o=r):Tn(r)?(Xt.getInstance().output("Juxta Heuristic Case 6"),r.contentNodes.push(s),r.childNodes.push(a),a.parent=r,s.parent=r,r.addMathmlNodes(s.mathml),r.addMathmlNodes(a.mathml),o=r):Tn(a)?(Xt.getInstance().output("Juxta Heuristic Case 7"),a.contentNodes.unshift(s),a.childNodes.unshift(r),r.parent=a,s.parent=a,a.addMathmlNodes(s.mathml),a.addMathmlNodes(r.mathml),o=a):(Xt.getInstance().output("Juxta Heuristic Case 8"),o=bt.factory.makeBranchNode(f.INFIXOP,[r,a],[s],s.textContent),o.role=x.IMPLICIT),t.push(o),Ps(t.concat(n),e,i)}bt.add(new qn("intvar_from_implicit",Hf,t=>t[0]&&hs(t[0])));function Hf(t){let e=t[0].childNodes;t.splice(0,1,...e),t.forEach(i=>i.parent=null)}bt.add(new _i("intvar_from_fraction",Wf,t=>{if(t.type!==f.INTEGRAL)return!1;let[,e,i]=t.childNodes;return i.type===f.EMPTY&&e.type===f.FRACTION}));function Wf(t){let e=t.childNodes[1],i=e.childNodes[0];if(Ul(i)){i.role=x.INTEGRAL;return}if(!hs(i))return;let r=i.childNodes.length,s=i.childNodes[r-2],n=i.childNodes[r-1];if(Ul(n)){n.role=x.INTEGRAL;return}if(gp(s,n)){let a=_t.getInstance().prefixNode_(n,[s]);a.role=x.INTEGRAL,r===2?e.childNodes[0]=a:(i.childNodes.pop(),i.contentNodes.pop(),i.childNodes[r-2]=a,a.parent=i)}}bt.add(new _i("rewrite_subcases",qf,t=>{let e=!0,i=!0,r=t.childNodes[0].childNodes[0];if(!r)return!1;if(!vc(r.mathmlTree))e=!1;else for(let n=1,a;a=t.childNodes[n];n++)if(a.childNodes[0].childNodes.length){e=!1;break}e&&t.addAnnotation("Emph","left");let s=t.childNodes[0].childNodes[t.childNodes[0].childNodes.length-1];if(!vc(s.mathmlTree))i=!1;else{let n=t.childNodes[0].childNodes.length;for(let a=1,o;o=t.childNodes[a];a++)if(o.childNodes.length>=n){i=!1;break}}return i&&t.addAnnotation("Emph","right"),e||i}));function vc(t){return t.childNodes[0]&&t.childNodes[0].childNodes[0]&&Mt(t.childNodes[0])===D.MPADDED&&Mt(t.childNodes[0].childNodes[0])===D.MPADDED&&Mt(t.childNodes[0].childNodes[t.childNodes[0].childNodes.length-1])===D.MPHANTOM}var zf=[f.PUNCTUATED,f.RELSEQ,f.MULTIREL,f.INFIXOP,f.PREFIXOP,f.POSTFIXOP];function qf(t){t.addAnnotation("Emph","top");let e=[];if(t.hasAnnotation("Emph","left")){let s=t.childNodes[0].childNodes[0].childNodes[0],n=Tc(s,!0);n.forEach(a=>a.addAnnotation("Emph","left")),e=e.concat(n);for(let a=0,o;o=t.childNodes[a];a++)o.childNodes.shift()}if(e.push(t),t.hasAnnotation("Emph","right")){let s=t.childNodes[0].childNodes[t.childNodes[0].childNodes.length-1].childNodes[0],n=Tc(s);n.forEach(a=>a.addAnnotation("Emph","left")),e=e.concat(n),t.childNodes[0].childNodes.pop()}_t.tableToMultiline(t);let i=_t.getInstance().row(e),r=t.annotation.Emph;return t.annotation.Emph=["table"],r.forEach(s=>i.addAnnotation("Emph",s)),i}function Tc(t,e){if(!t.childNodes.length)return Xo(t),[t];let i=null;if(t.type===f.PUNCTUATED&&(e?t.role===x.ENDPUNCT:t.role===x.STARTPUNCT)){let r=t.childNodes;Xo(r[e?r.length-1:0])&&(t=r[e?0:r.length-1],i=r[e?r.length-1:0])}if(zf.indexOf(t.type)!==-1){let r=t.childNodes;Xo(r[e?r.length-1:0]);let s=vr.combineContentChildren(t.type,t.role,t.contentNodes,t.childNodes);return i&&(e?s.push(i):s.unshift(i)),s}return i?e?[t,i]:[i,t]:[t]}var Gf={[x.METRIC]:x.METRIC,[x.VBAR]:x.NEUTRAL,[x.OPENFENCE]:x.OPEN,[x.CLOSEFENCE]:x.CLOSE};function Xo(t){if(t.type!==f.PUNCTUATION)return!1;let e=Gf[t.role];return e?(t.role=e,t.type=f.FENCE,t.addAnnotation("Emph","fence"),!0):!1}bt.add(new qn("ellipses",t=>{let e=[],i=t.shift();for(;i;)[i,t]=Cc(i,t,x.FULLSTOP,x.ELLIPSIS),[i,t]=Cc(i,t,x.DASH),e.push(i),i=t.shift();return e},t=>t.length>1));function Cc(t,e,i,r=i){let s=[];for(;t&&t.role===i;)s.push(t),t=e.shift();return s.length?(t&&e.unshift(t),[s.length===1?s[0]:Vf(s,r),e]):[t,e]}function Vf(t,e){let i=bt.factory.makeBranchNode(f.PUNCTUATION,t,[]);return i.role=e,i}bt.add(new qn("op_with_limits",t=>{let e=t[0];return e.type=f.LARGEOP,e.role=x.SUM,t},t=>(t[0].type===f.OPERATOR||t[0].type===f.IDENTIFIER&&t[0].attributes.texclass==="OP")&&t.slice(1).some(e=>e.type===f.RELSEQ||e.type===f.MULTIREL||e.type===f.INFIXOP&&e.role===x.ELEMENT||e.type===f.PUNCTUATED&&e.role===x.SEQUENCE))),bt.add(new Pf("function_from_identifiers",t=>{let e=be(t.childNodes).map(r=>r.textContent.trim()).join("");if(Yt.Meaning.get(e).type===f.UNKNOWN)return t;let i=bt.factory.makeLeafNode(e,_t.getInstance().font(t.getAttribute("mathvariant")));return i.mathmlTree=t,i},t=>{let e=be(t.childNodes);return e.length<2?!1:e.every(i=>Mt(i)===D.MI&&Yt.Meaning.get(i.textContent.trim()).role===x.LATINLETTER)})),bt.add(new qn("bracketed_interval",t=>{let e=t[0],i=t[1],r=t.slice(2),s=_t.getInstance().row(r),n=bt.factory.makeBranchNode(f.FENCED,[s],[e,i]);return n.role=x.INTERVAL,n},t=>{let e=t[0],i=t[1],r=t.slice(2);if(!(e&&i&&(Ra(e.textContent)&&(La(i.textContent)||Ra(i.textContent))||La(i.textContent)&&(La(e.textContent)||Ra(e.textContent)))))return!1;if(r.length===1&&r[0].type===f.PUNCTUATED&&r[0].contentNodes.length===1)return!0;let s=xi(r,ao);return!!(s.rel.length===1&&s.comp[0].length&&s.comp[1].length)}));function La(t){return["[","["].includes(t)}function Ra(t){return["]","]"].includes(t)}function Sc(t){return["(","⁽","₍"].includes(t)}function Ac(t){return[")","⁾","₎"].includes(t)}function Lc(t){return t.role===x.INFTY||t.type===f.PREFIXOP&&t.childNodes[0].role===x.INFTY}bt.add(new _i("interval_heuristic",t=>(t.role=x.INTERVAL,t),t=>Rp(t)));function Rp(t){let e=t.childNodes[0];if(t.type!==f.FENCED||e?.type!==f.PUNCTUATED||e?.childNodes.length!==3||e?.contentNodes.length!==1||e?.childNodes[1].role!==x.COMMA)return!1;let i=t.childNodes[0].childNodes[0],r=t.childNodes[0].childNodes[2],s=t.contentNodes[0].textContent,n=t.contentNodes[1].textContent;return!!(La(s)&&Ac(n)||Sc(s)&&Ra(n)||Sc(s)&&Ac(n)&&(Lc(i)||Lc(r)))}bt.add(new _i("propagateInterval",t=>(t.childNodes.forEach(e=>{Rp(e)&&(e.role=x.INTERVAL)}),t),t=>Ap(t)));function Xf(t){return Gl(t)||Yf(t)||Jf(t)||Kf(t)||$f(t)}function $f(t){return t.type===f.APPL&&(t.childNodes[0].role===x.PREFIXFUNC||t.childNodes[0].role===x.SIMPLEFUNC)&&(ql(t.childNodes[1])||t.childNodes[1].type===f.FENCED&&ql(t.childNodes[1].childNodes[0]))}function Kf(t){return t.type===f.PREFIXOP&&t.role===x.NEGATIVE&&ql(t.childNodes[0])&&t.childNodes[0].type!==f.PREFIXOP&&t.childNodes[0].type!==f.APPL&&t.childNodes[0].type!==f.PUNCTUATED}function Jf(t){return t.type===f.PUNCTUATED&&t.role===x.ENDPUNCT&&t.childNodes.length===2&&t.childNodes[1].role===x.DEGREE&&(cs(t.childNodes[0])||oo(t.childNodes[0])||t.childNodes[0].type===f.PREFIXOP&&t.childNodes[0].role===x.NEGATIVE&&(cs(t.childNodes[0].childNodes[0])||oo(t.childNodes[0].childNodes[0])))}function Yf(t){return cs(t)||t.type===f.INFIXOP&&t.role===x.IMPLICIT&&(t.childNodes.length===2&&(cs(t.childNodes[0])||Gl(t.childNodes[0]))&&cs(t.childNodes[1])||t.childNodes.length===3&&Gl(t.childNodes[0])&&cs(t.childNodes[1])&&cs(t.childNodes[2]))}function ql(t){return t.hasAnnotation("clearspeak","simple")}function cs(t){return t.type===f.IDENTIFIER&&(t.role===x.LATINLETTER||t.role===x.GREEKLETTER||t.role===x.OTHERLETTER||t.role===x.SIMPLEFUNC)}function oo(t){return t.type===f.NUMBER&&(t.role===x.INTEGER||t.role===x.FLOAT)}function Gl(t){return oo(t)||Zf(t)}function Zf(t){if($o("Fraction_Over")||$o("Fraction_FracOver")||t.type!==f.FRACTION||t.role!==x.VULGAR)return!1;if($o("Fraction_Ordinal"))return!0;let e=parseInt(t.childNodes[0].textContent,10),i=parseInt(t.childNodes[1].textContent,10);return e>0&&e<20&&i>0&&i<11}function $o(t){return xs.getInstance().options.style===t}wo(new Mh("clearspeak","simple",function(t){return Xf(t)?"simple":""})),Io("clearspeak","simple");function Qf(t){return t.type===f.TEXT&&t.role!==x.LABEL||t.type===f.PUNCTUATED&&t.role===x.TEXT&&oo(t.childNodes[0])&&tg(t.childNodes.slice(1))||t.type===f.IDENTIFIER&&t.role===x.UNIT||t.type===f.INFIXOP&&(t.role===x.IMPLICIT||t.role===x.UNIT)}function tg(t){for(let e=0;e<t.length-1;e++)if(!(t[e].type===f.TEXT&&t[e].textContent===""))return!1;return t[t.length-1].type===f.TEXT}wo(new Mh("clearspeak","unit",function(t){return Qf(t)?"unit":""})),Io("clearspeak","unit");var eg=[f.MULTIREL,f.RELSEQ,f.APPL,f.ROW,f.LINE],ig=[f.SUBSCRIPT,f.SUPERSCRIPT,f.OVERSCORE,f.UNDERSCORE];function Rc(t,e){let i=t.parent;if(!i)return!1;let r=i.type;return eg.indexOf(r)!==-1||r===f.PREFIXOP&&i.role===x.NEGATIVE&&!e.script&&!e.enclosed||r===f.PREFIXOP&&i.role===x.GEOMETRY||r===f.PUNCTUATED&&(!e.enclosed||i.role===x.TEXT)}function rg(t,e){return t.childNodes.length?(ig.indexOf(t.type)!==-1&&(e.script=!0),t.type===f.FENCED?(e.number=!1,e.enclosed=!0,["",e]):t.type===f.PREFIXOP&&t.role!==x.GEOMETRY&&t.role!==x.NEGATIVE?(e.number=!1,["",e]):(Rc(t,e)&&(e.number=!0,e.enclosed=!1),["",e])):(Rc(t,e)&&(e.number=!0,e.script=!1,e.enclosed=!1),[e.number?"number":"",{number:!1,enclosed:e.enclosed,script:e.script}])}wo(new Dh("nemeth","number",rg,{number:!0})),Io("nemeth","number");function sg(t){return t.parent?[parseInt(t.parent.annotation.depth[0])+1]:[1]}wo(new Dh("depth","depth",sg)),Io("depth","depth");function ng(t){let e=new Map,i=s=>{if(s.mathmlTree){let n=e.get(s.mathmlTree)||new Set;n.add(s),e.set(s.mathmlTree,n)}s.childNodes.forEach(i),s.contentNodes.forEach(i)};i(t);let r=[];for(let[s,n]of e)n.size>1&&r.push(`DUPLICATE mathmlTree: ${Mt(s)} shared by `+Array.from(n).map(a=>`${a.id}:${a.type}:${a.role}`).join(", "));return r}var ag=class Cn{static empty(){let e=Hn("<math/>"),i=new Cn(e,new Xs);return i.mathml=e,i}static fromNode(e,i){let r=Cn.empty();return r.root=e,i&&(r.mathml=i),r}static fromRoot(e,i){let r=e;for(;r.parent;)r=r.parent;let s=Cn.fromNode(r);return i&&(s.mathml=i),s}static fromXml(e){let i=Cn.empty();return e.childNodes[0]&&(i.root=_h.fromXml(e.childNodes[0])),i}constructor(e,i){this.mathml=e,this.options=i,this.parser=new yc(i),this.root=this.parser.parse(e),this.root=_t.rewriteTrivialTable(this.root),this.collator=this.parser.getFactory().leafMap.collateMeaning();let r=this.collator.newDefault();r&&(this.parser=new yc(i),this.parser.getFactory().defaultMap=r,this.root=this.parser.parse(e)),og.visit(this.root,{}),R0(this.root),Xt.getInstance().generate(()=>ng(this.root))}xml(e){let i=Hn("<stree></stree>"),r=this.root.xml(i.ownerDocument,e);return i.appendChild(r),i}toString(e){return sp(this.xml(e))}formatXml(e){return rp(this.toString(e))}displayTree(){this.root.displayTree()}replaceNode(e,i){let r=e.parent;if(!r){this.root=i;return}r.replaceChild(e,i)}toJson(){let e={};return e.stree=this.root.toJson(),e}},og=new Dh("general","unit",(t,e)=>(Sp(t)&&(t.role=x.UNIT),!1));function lg(t,e){return new ag(t,e)}function hg(t){for(let e=0,i;i=wp[e];e++)if(i.test(t))return i.constr(t);return null}var wp=[],cg={collapsed:!0,implicit:!0},Sn=new Map;function dg(t,e,i){return Xt.getInstance().generate(()=>["Original MathML",Ko(t)]),Sn.clear(),pe(e.root),i.structure&&t.setAttribute(st.STRUCTURE,vr.fromStructure(t,e,i).toString()),Xt.getInstance().generate(()=>[`Semantic Tree
40
+ `,Ko(e),`Semantically enriched MathML
41
+ `,Ko(t)]),t}function pe(t){Xt.getInstance().generate(()=>["WALKING START: ",t.toString()]);let e=hg(t),i;if(e)return i=e.getMathml(),Xt.getInstance().generate(()=>["WALKING END (1): ",t.toString()]),gr(i,t);if(t.mathml.length===1){if(Xt.getInstance().output("Walktree Case 0"),!t.childNodes.length){Xt.getInstance().output("Walktree Case 0.1"),i=t.mathml[0],we(i,t),Xt.getInstance().generate(()=>["WALKING END (2): ",t.toString()]);let o=t.getAnnotation("empty").length&&!t.hasAnnotation("empty","MFENCED");return gr(i,o?t:void 0)}let a=t.childNodes[0];if(t.childNodes.length===1&&a.type===f.EMPTY)return Xt.getInstance().output("Walktree Case 0.2"),i=t.mathml[0],we(i,t),i.appendChild(pe(a)),Xt.getInstance().generate(()=>["WALKING END (3): ",t.toString()]),gr(i);t.childNodes.forEach(o=>{o.mathml.length||o.addMathmlNodes([Dp(o)])})}let r=t.contentNodes.map(uo);Pp(t,r);let s=t.childNodes.map(pe),n=vr.combineContentChildren(t.type,t.role,r,s);if(i=t.mathmlTree,i===null)Xt.getInstance().output("Walktree Case 1"),i=$s(n,t);else{i=Mp(i);let a=co(n);if(Xt.getInstance().output("Walktree Case 2"),a){Xt.getInstance().output("Walktree Case 2.1");let o=ai(a);if(o&&t.parent&&a!==i&&Zs(i,o)){Xt.getInstance().output("Walktree Case 2.1.fallback");let h=Ar(i);if(h!==i&&h.hasAttribute(st.ID))return wc(ai(i)||i,n,t),Sn.has(t.id)||(Sn.set(t.id,!0),we(i,t)),Xt.getInstance().generate(()=>["WALKING END (4): ",t.toString()]),gr(i,t);i=h}else i=o}else Xt.getInstance().output("Walktree Case 2.2"),i=Ar(i)}return wc(i,n,t),Sn.has(t.id)||(Sn.set(t.id,!0),we(i,t)),Xt.getInstance().generate(()=>["WALKING END (5): ",t.toString()]),gr(i,t)}function $s(t,e){let i=xg(t),r=i.node,s=i.type;if(s!==Xi.VALID||!qr(r)||!r.parentNode&&e.parent){if(Xt.getInstance().output("Walktree Case 1.1"),r=Nr(),s===Xi.PRUNED)Xt.getInstance().output("Walktree Case 1.1.0"),r=pg(r,i.node,t);else if(t[0]){Xt.getInstance().output("Walktree Case 1.1.1");let n=co(t);if(n){Xt.getInstance().output("Walktree Case 1.1.1.0");let a=mg(ai(n),t);ug(e,a),$i(n,r),a.forEach(function(o){r.appendChild(o)})}else Xt.getInstance().output("Walktree Case 1.1.1.1"),Ip(r,t[0]),r=t[0]}}return e.mathmlTree||(e.mathmlTree=r),r}function ug(t,e){if(t.type!=="postfixop")return;let i=e[e.length-1].nextSibling;i&&uf(i)&&e.push(i)}function pg(t,e,i){let r=kp(e);if(no(r)){Xt.getInstance().output("Walktree Case 1.1.0.0"),Ip(r,t),be(r.childNodes).forEach(function(a){t.appendChild(a)});let n=t;t=r,r=n}let s=i.indexOf(e);return i[s]=r,$i(r,t),t.appendChild(r),i.forEach(function(n){t.appendChild(n)}),t}function Ip(t,e){for(let i of Bf)t.hasAttribute(i)&&(e.setAttribute(i,t.getAttribute(i)),t.removeAttribute(i))}function mg(t,e){let i=be(t.childNodes),r=1/0,s=-1/0;return e.forEach(function(n){let a=i.indexOf(n);a!==-1&&(r=Math.min(r,a),s=Math.max(s,a))}),i.slice(r,s+1)}function fg(t,e,i){let r=[],s=be(t.childNodes),n=!1;for(;s.length;){let h=s.shift();if(h.hasAttribute(st.TYPE)){r.push(h);continue}let d=gg(h,e);if(d.length!==0){if(d.length===1){r.push(h);continue}n?h.setAttribute("AuxiliaryImplicit",!0):n=!0,s=d.concat(s)}}let a=[],o=i.childNodes.map(function(h){return h.mathmlTree});for(;o.length;){let h=o.pop();if(h){if(r.indexOf(h)!==-1)break;e.indexOf(h)!==-1&&a.unshift(h)}}return r.concat(a)}function gg(t,e){let i=[],r=be(t.childNodes);for(;r.length;){let s=r.shift();if(s.nodeType===zr.ELEMENT_NODE){if(s.hasAttribute(st.TYPE)||e.indexOf(s)!==-1){i.push(s);continue}r=be(s.childNodes).concat(r)}}return i}function wc(t,e,i){if(!e.length||e.length===1&&t===e[0])return;let r=i.role===x.IMPLICIT&&bt.flags.combine_juxtaposition?fg(t,e,i):be(t.childNodes);if(!r.length){e.forEach(function(a){ho(t,a)||t.appendChild(a)});return}let s=0,n=sa(ra,"mergeChildren infinite loop");for(;e.length;){n();let a=e[0];if(r[s]===a||yg(r[s],a)){e.shift(),s++;continue}if(r[s]&&e.indexOf(r[s])===-1){s++;continue}if(Zs(a,t)){e.shift();continue}let o=r[s];if(!o){if(a.parentNode){t=ai(a),e.shift();continue}let h=e[1];if(h&&h.parentNode){let d=ai(h),p=h;for(;d&&d!==t&&df(d);)p=d,d=ai(d);t=d,lo(t,a,p),e.shift(),e.shift();continue}lo(t,a,null),e.shift();continue}bg(t,o,a),e.shift()}}function bg(t,e,i){let r=e,s=ai(r),n=sa(ra,()=>`insertNewChild loop: next=${s?.tagName} parent=${r?.tagName}`);for(;s&&Eg(s,r)&&!r.hasAttribute("AuxiliaryImplicit")&&s!==t;)n(),r=s,s=ai(r);s&&(lo(s,i,r),r.removeAttribute("AuxiliaryImplicit"))}function lo(t,e,i){if(!ho(t,e)){if(Mt(t)!==D.MACTION){t.insertBefore(e,i);return}lo(ai(t),e,t)}}function ho(t,e){return t===e||Zs(t,e)}function Eg(t,e){if(Mt(t)!==D.MACTION)return t.firstChild===e;let i=parseInt(t.getAttribute("selection"))||1;return t.childNodes[i-1]===e}function yg(t,e){let i=fr.functionApplication;if(t&&e&&t.textContent&&e.textContent&&t.textContent===i&&e.textContent===i&&e.getAttribute(st.ADDED)==="true"){for(let r=0,s;s=t.attributes[r];r++)e.hasAttribute(s.nodeName)||e.setAttribute(s.nodeName,s.nodeValue);return $i(t,e),!0}return!1}var Xi;(function(t){t.VALID="valid",t.INVALID="invalid",t.PRUNED="pruned"})(Xi||(Xi={}));function xg(t){let e=co(t);if(!e)return{type:Xi.INVALID,node:null};let i=co(t.slice().reverse());if(e===i)return{type:Xi.VALID,node:e};let r=Ic(e),s=Ng(r,t),n=Ic(i,function(h){return s.indexOf(h)!==-1}),a=n[0],o=s.indexOf(a);return o===-1?{type:Xi.INVALID,node:null}:{type:s.length===r.length?vg(s[o+1],n[1])?Xi.VALID:Xi.INVALID:Xi.PRUNED,node:a}}function Ng(t,e){let i=0;for(;t[i]&&e.indexOf(t[i])===-1;)i++;return t.slice(0,i+1)}function co(t){let e=0,i=null;for(;!i&&e<t.length;)t[e].parentNode&&(i=t[e]),e++;return i}function Ic(t,e){let i=e||(n=>!1),r=[t],s=sa(ra,()=>`pathToRoot infinite loop at ${t.tagName} parent=${t.parentNode?.tagName}`);for(;!i(t)&&!no(t)&&t.parentNode;)s(),t=ai(t),r.unshift(t);return r}function vg(t,e){return!!(t&&e&&!kc(t,"previousSibling")&&!kc(e,"nextSibling"))}function kc(t,e){let i=t[e];for(;i;){if(!Oo(i))return!0;i=i[e]}return!1}function gr(t,e){let i=e&&!e.hasAnnotation("empty","MFENCED")&&e.getAnnotation("empty"),r=e?.parent?.mathmlTree,s=sa(ra,()=>`ascendNewNode infinite loop at ${t.tagName} parent=${t.parentNode?.tagName}`),n=!!(e&&e.parent);for(;t!==r&&!no(t)&&!(n&&no(ai(t)))&&(Tg(t)||i&&t.parentNode&&(!r||Zs(t,r))&&i.includes(ai(t).tagName?.toUpperCase())&&Op(t));)s(),t=ai(t);return t}function kp(t){let e=be(t.childNodes);if(!e)return t;let i=e.filter(function(r){return r.nodeType===zr.ELEMENT_NODE&&!Fh(r)});return i.length===1&&qr(i[0])&&!i[0].hasAttribute(st.TYPE)?kp(i[0]):t}function Tg(t){let e=ai(t);return!e||!qr(e)?!1:Op(t)}function Op(t){let e=ai(t);return e?be(e.childNodes).every(function(i){return i===t||Oo(i)}):!1}function Oo(t){if(t.nodeType!==zr.ELEMENT_NODE||!t||Fh(t))return!0;let e=be(t.childNodes);return!qr(t)&&e.length||hf(t)||mp(t)||t.hasAttribute(st.TYPE)||cf(t)?!1:be(t.childNodes).every(Oo)}function ai(t){return t.parentNode}function Gn(t,e){let i=new vr(e);t.setAttribute(st.COLLAPSED,i.toString())}function uo(t){if(t.mathml.length)return gr(pe(t),t);let e=cg.implicit?Dp(t):Nr();return t.addMathmlNodes([e]),e}function Mp(t){if(Mt(t)!==D.MFENCED)return t;let e=Nr();for(let i=0,r;r=t.attributes[i];i++)["open","close","separators"].indexOf(r.name)===-1&&e.setAttribute(r.name,r.value);return be(t.childNodes).forEach(function(i){e.appendChild(i)}),$i(t,e),e}function Dp(t){let e=Wn("mo"),i=C0(t.textContent);return e.appendChild(i),we(e,t),e.setAttribute(st.ADDED,"true"),e}function Pp(t,e){let i=t.type+(t.textContent?","+t.textContent:"");e.forEach(function(r){Ar(r).setAttribute(st.OPERATOR,i)})}function Ar(t){if(Fh(t))return t;let e=be(t.childNodes);if(!e)return t;let i=e.filter(function(s){return!Oo(s)}),r=[];for(let s=0,n;n=i[s];s++)if(qr(n)&&n.getAttribute(st.TYPE)!==f.PUNCTUATION){let a=Ar(n);a&&a!==n&&r.push(a)}else r.push(n);return r.length===1?r[0]:t}function Ko(t){return _f(rp(t.toString()))}function Bp(t,e){let i=!!e,r=e||[],s=t.parent,n=t.contentNodes.map(function(o){return o.id});n.unshift("c");let a=[t.id,n];for(let o=0,h;h=t.childNodes[o];o++){let d=pe(h);r.push(d);let p=Ar(d);s&&!i&&p.setAttribute(st.PARENT,s.id.toString()),a.push(h.id)}return a}var Hi=class{constructor(t){this.semantic=t}},Oc=class extends Hi{static test(t){return!t.mathmlTree&&t.type===f.LINE&&t.role===x.BINOMIAL}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){if(!this.semantic.childNodes.length)return this.mml;let t=this.semantic.childNodes[0];if(this.mml=pe(t),this.mml.hasAttribute(st.TYPE)){let e=Nr();$i(this.mml,e),e.appendChild(this.mml),this.mml=e}return we(this.mml,this.semantic),this.mml}},Mc=class extends Hi{static test(t){return t.getAnnotation("collapsed").length?t.mathmlTree?.parentNode?.childNodes.length>2:!1}getMathml(){pe(this.semantic.childNodes[0]),pe(this.semantic.childNodes[1]);let t=this.semantic.mathmlTree,e=this.semantic.childNodes[0].mathmlTree,i=$s([e,t],this.semantic);return we(i,this.semantic),i}},Vl=class extends Hi{static test(t){if(!t.mathmlTree||!t.childNodes.length)return!1;let e=Mt(t.mathmlTree),i=t.childNodes[0].role;return e===D.MSUBSUP&&i===x.SUBSUP||e===D.MUNDEROVER&&i===x.UNDEROVER}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){let t=this.semantic.childNodes[0],e=t.childNodes[0],i=this.semantic.childNodes[1],r=t.childNodes[1],s=pe(i),n=pe(e),a=pe(r);return we(this.mml,this.semantic),this.mml.setAttribute(st.CHILDREN,zl([e,r,i])),[n,a,s].forEach(o=>Ar(o).setAttribute(st.PARENT,this.mml.getAttribute(st.ID))),this.mml.setAttribute(st.TYPE,t.role),Gn(this.mml,[this.semantic.id,[t.id,e.id,r.id],i.id]),this.mml}},br=class Fp extends Hi{static multiscriptIndex(e){return e.type===f.PUNCTUATED&&e.contentNodes[0].role===x.DUMMY&&e.hasAnnotation("general","script")?Bp(e):(pe(e),e.id)}static createNone_(e){let i=Wn("none");return e&&we(i,e),i.setAttribute(st.ADDED,"true"),i}constructor(e){super(e),this.mml=e.mathmlTree}completeMultiscript(e,i){let r=be(this.mml.childNodes).slice(1),s=0,n=a=>{for(let o of a){let h=r[s];if(h&&o===parseInt(h.getAttribute(st.ID)))h.setAttribute(st.PARENT,this.semantic.id.toString()),s++;else if(!h||o!==parseInt(Ar(h).getAttribute(st.ID))){let d=this.semantic.querySelectorAll(p=>p.id===o);this.mml.insertBefore(Fp.createNone_(d[0]),h||null)}else Ar(h).setAttribute(st.PARENT,this.semantic.id.toString()),s++}};n(e),r[s]&&Mt(r[s])!==D.MPRESCRIPTS?this.mml.insertBefore(r[s],Wn("mprescripts")):s++,n(i)}},Xl=class extends br{static test(t){return t.mathmlTree?Mt(t.mathmlTree)===D.MMULTISCRIPTS&&(t.type===f.SUPERSCRIPT||t.type===f.SUBSCRIPT):!1}constructor(t){super(t)}getMathml(){we(this.mml,this.semantic);let t,e,i;if(this.semantic.childNodes[0]&&this.semantic.childNodes[0].role===x.SUBSUP){let s=this.semantic.childNodes[0];t=s.childNodes[0],e=br.multiscriptIndex(this.semantic.childNodes[1]),i=br.multiscriptIndex(s.childNodes[1]);let n=[this.semantic.id,[s.id,t.id,i],e];Gn(this.mml,n),this.mml.setAttribute(st.TYPE,s.role),this.completeMultiscript(vr.interleaveIds(i,e),[])}else{t=this.semantic.childNodes[0],e=br.multiscriptIndex(this.semantic.childNodes[1]);let s=[this.semantic.id,t.id,e];Gn(this.mml,s)}let r=vr.collapsedLeafs(i||[],e);return Ar(pe(t)).setAttribute(st.PARENT,this.semantic.id.toString()),r.unshift(t.id),this.mml.setAttribute(st.CHILDREN,r.join(",")),this.mml}},$l=class extends br{static test(t){return!!t.mathmlTree&&t.type===f.TENSOR}constructor(t){super(t)}getMathml(){pe(this.semantic.childNodes[0]);let t=br.multiscriptIndex(this.semantic.childNodes[1]),e=br.multiscriptIndex(this.semantic.childNodes[2]),i=br.multiscriptIndex(this.semantic.childNodes[3]),r=br.multiscriptIndex(this.semantic.childNodes[4]);we(this.mml,this.semantic);let s=[this.semantic.id,this.semantic.childNodes[0].id,t,e,i,r];Gn(this.mml,s);let n=vr.collapsedLeafs(t,e,i,r);return n.unshift(this.semantic.childNodes[0].id),this.mml.setAttribute(st.CHILDREN,n.join(",")),this.completeMultiscript(vr.interleaveIds(i,r),vr.interleaveIds(t,e)),this.mml}},Dc=class An extends Hi{static test(e){return!!(e.mathmlTree&&e.fencePointer&&!e.mathmlTree.getAttribute("data-semantic-type"))}static makeEmptyNode_(e){let i=Nr(),r=new _h(e);return r.type=f.EMPTY,r.mathmlTree=i,r}static fencedMap_(e,i){i[e.id]=e.mathmlTree,e.embellished&&An.fencedMap_(e.childNodes[0],i)}constructor(e){super(e),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(){return this.getFenced_(),this.fencedMml=gr(pe(this.fenced),this.fenced),this.getFencesMml_(),this.fenced.type===f.EMPTY&&!this.fencedMml.parentNode&&(this.fencedMml.setAttribute(st.ADDED,"true"),this.cfenceMml.parentNode.insertBefore(this.fencedMml,this.cfenceMml)),this.getFencedMml_(),this.rewrite_()}fencedElement(e){return e.type===f.FENCED||e.type===f.MATRIX||e.type===f.VECTOR}getFenced_(){let e=this.semantic;for(;!this.fencedElement(e);)e=e.childNodes[0];this.fenced=e.childNodes[0],this.ofence=e.contentNodes[0],this.cfence=e.contentNodes[1],An.fencedMap_(this.ofence,this.ofenceMap),An.fencedMap_(this.cfence,this.cfenceMap)}getFencedMml_(){let e=this.ofenceMml.nextSibling;for(e=e===this.fencedMml?e:this.fencedMml;e&&e!==this.cfenceMml&&(this.fencedMmlNodes.push(e),!Zs(this.cfenceMml,e));)e=e.nextSibling}getFencesMml_(){let e=this.semantic,i=Object.keys(this.ofenceMap),r=Object.keys(this.cfenceMap);for(;(!this.ofenceMml||!this.cfenceMml)&&e!==this.fenced;)i.indexOf(e.fencePointer)!==-1&&!this.ofenceMml&&(this.ofenceMml=e.mathmlTree),r.indexOf(e.fencePointer)!==-1&&!this.cfenceMml&&(this.cfenceMml=e.mathmlTree),e=e.childNodes[0];this.ofenceMml||(this.ofenceMml=this.ofence.mathmlTree),this.cfenceMml||(this.cfenceMml=this.cfence.mathmlTree),this.ofenceMml&&(this.ofenceMml=gr(this.ofenceMml)),this.cfenceMml&&(this.cfenceMml=gr(this.cfenceMml))}rewrite_(){let e=this.semantic,i=null,r=this.introduceNewLayer_();for(we(r,this.fenced.parent);!this.fencedElement(e);){let s=e.mathmlTree,n=this.specialCase_(e,s);if(n)e=n;else{we(s,e);let h=[];for(let d=1,p;p=e.childNodes[d];d++)h.push(pe(p));e=e.childNodes[0]}let a=Wn("dummy"),o=s.childNodes[0];$i(s,a),$i(r,s),$i(s.childNodes[0],r),$i(a,o),i||(i=s)}return pe(this.ofence),pe(this.cfence),this.cleanupParents_(),i||r}specialCase_(e,i){let r=Mt(i),s=null,n;if(r===D.MSUBSUP?e.childNodes[0]?.role===x.SUBSUP&&(s=e.childNodes[0],n=Vl):r===D.MMULTISCRIPTS&&(e.type===f.SUPERSCRIPT||e.type===f.SUBSCRIPT?n=Xl:e.type===f.TENSOR&&(n=$l),s=n&&e.childNodes[0]&&e.childNodes[0].role===x.SUBSUP?e.childNodes[0]:e),!s)return null;let a=s.childNodes[0],o=An.makeEmptyNode_(a.id);return s.childNodes[0]=o,i=new n(e).getMathml(),s.childNodes[0]=a,this.parentCleanup.push(i),s.childNodes[0]}introduceNewLayer_(){let e=this.fullFence(this.ofenceMml),i=this.fullFence(this.cfenceMml),r=Nr();if($i(this.fencedMml,r),this.fencedMmlNodes.forEach(s=>r.appendChild(s)),ho(r,e)||r.insertBefore(e,this.fencedMml),ho(r,i)||r.appendChild(i),!r.parentNode){let s=Nr();for(;r.childNodes.length>0;)s.appendChild(r.childNodes[0]);r.appendChild(s),r=s}return r}fullFence(e){let i=this.fencedMml.parentNode,r=e;for(;r.parentNode&&r.parentNode!==i;)r=r.parentNode;return r}cleanupParents_(){this.parentCleanup.forEach(function(e){let i=e.childNodes[1].getAttribute(st.PARENT);e.childNodes[0].setAttribute(st.PARENT,i)})}},Pc=class extends Hi{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){let t=Nr();this.mml.parentNode.insertBefore(t,this.mml);for(let e of this.mrows)t.appendChild(e);t.appendChild(this.mml)}return this.mml}recurseToTable(t){if(!(t.hasAnnotation("Emph","top")||t.hasAnnotation("Emph","fence"))&&(t.hasAnnotation("Emph","left")||t.hasAnnotation("Emph","right"))){pe(t);return}if(!t.mathmlTree||Mt(t.mathmlTree)===D.MTABLE&&t.annotation.Emph?.length&&t.annotation.Emph[0]!=="table"){let e=Nr();we(e,t),this.mrows.unshift(e)}else{if(Mt(t.mathmlTree)===D.MTABLE&&t.annotation.Emph?.length&&t.annotation.Emph[0]==="table"){this.finalizeTable(t);return}we(t.mathmlTree,t)}if(t.childNodes.forEach(this.recurseToTable.bind(this)),t.textContent||t.type==="punctuated"){Pp(t,t.contentNodes.map(e=>{let i=uo(e);return i.hasAttribute("data-semantic-added")?this.mrows.unshift(i):this.recurseToTable(e),i}));return}t.contentNodes.forEach(this.recurseToTable.bind(this))}finalizeTable(t){we(t.mathmlTree,t),t.contentNodes.forEach(e=>{pe(e)}),t.childNodes.forEach(e=>{pe(e)})}},Bc=class _p extends Hi{static test(e){if(!e.mathmlTree||!e.childNodes.length)return!1;let i=Mt(e.mathmlTree),r=e.type;return(r===f.LIMUPPER||r===f.LIMLOWER)&&(i===D.MSUBSUP||i===D.MUNDEROVER)||r===f.LIMBOTH&&(i===D.MSUB||i===D.MUNDER||i===D.MSUP||i===D.MOVER)}static walkTree_(e){e&&pe(e)}constructor(e){super(e),this.mml=e.mathmlTree}getMathml(){let e=this.semantic.childNodes;return this.semantic.type!==f.LIMBOTH&&this.mml.childNodes.length>=3&&(this.mml=$s([this.mml],this.semantic)),we(this.mml,this.semantic),e[0].mathmlTree||(e[0].mathmlTree=this.semantic.mathmlTree),e.forEach(_p.walkTree_),this.mml}},Fc=class extends Hi{static test(t){return!!t.mathmlTree&&t.type===f.LINE}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){return this.semantic.contentNodes.length&&pe(this.semantic.contentNodes[0]),this.semantic.childNodes.length&&pe(this.semantic.childNodes[0]),we(this.mml,this.semantic),this.mml}},_c=class extends Hi{static test(t){return!!t.mathmlTree&&(t.type===f.INFERENCE||t.type===f.PREMISES)}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){return this.semantic.childNodes.length?(this.semantic.contentNodes.forEach(function(t){pe(t),we(t.mathmlTree,t)}),this.semantic.childNodes.forEach(function(t){pe(t)}),we(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}},jc=class extends Hi{static test(t){return t.type===f.MATRIX||t.type===f.VECTOR||t.type===f.CASES}constructor(t){super(t),this.inner=[],this.mml=t.mathmlTree}getMathml(){let t=uo(this.semantic.contentNodes[0]),e=this.semantic.contentNodes[1]?uo(this.semantic.contentNodes[1]):null;if(this.inner=this.semantic.childNodes.map(pe),!this.mml)this.mml=$s([t].concat(this.inner,[e]),this.semantic);else if(Mt(this.mml)===D.MFENCED){let i=this.mml.childNodes;this.mml.insertBefore(t,i[0]||null),e&&this.mml.appendChild(e),this.mml=Mp(this.mml)}else{let i=[t,this.mml];e&&i.push(e),this.mml=$s(i,this.semantic)}return we(this.mml,this.semantic),this.mml}},Uc=class extends Hi{static test(t){return t.type===f.PUNCTUATED&&(t.role===x.TEXT||t.contentNodes.every(e=>e.role===x.DUMMY))}constructor(t){super(t),this.mml=t.mathmlTree}getMathml(){let t=[],e=Bp(this.semantic,t);return this.mml=$s(t,this.semantic),we(this.mml,this.semantic),this.mml.removeAttribute(st.CONTENT),Gn(this.mml,e),this.mml}};wp.push({test:Bc.test,constr:t=>new Bc(t)},{test:Dc.test,constr:t=>new Dc(t)},{test:Mc.test,constr:t=>new Mc(t)},{test:Vl.test,constr:t=>new Vl(t)},{test:$l.test,constr:t=>new $l(t)},{test:Xl.test,constr:t=>new Xl(t)},{test:Fc.test,constr:t=>new Fc(t)},{test:Oc.test,constr:t=>new Oc(t)},{test:_c.test,constr:t=>new _c(t)},{test:Pc.test,constr:t=>new Pc(t)},{test:jc.test,constr:t=>new jc(t)},{test:Uc.test,constr:t=>new Uc(t)});function Cg(t,e){let i=L0(t);return dg(i,lg(i,e),e)}function Sg(t,e){let i=Hn(t);try{return Cg(i,e)}catch(r){return console.error(r),i}}var Ag=new jn({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"]}),Lg="Auto";function jp(t){let e=t.split(":"),i={},r=Ag.getProperties(),s=Object.keys(r);for(let n=0,a;a=e[n];n++){let o=a.split("_");if(s.indexOf(o[0])===-1)continue;let h=o[1];h&&h!==Lg&&r[o[0]].indexOf(h)!==-1&&(i[o[0]]=o[1])}return i}function Up(t){let e=Object.keys(t),i=[];for(let r=0;r<e.length;r++)i.push(e[r]+"_"+t[e[r]]);return i.length?i.join(":"):Le.DEFAULT_VALUE}function Rg(t,e,i){if(t==="default")return e+"_"+i;let r=jp(t);return r[e]=i,Up(r)}var Hc=mr.LOCALES,wg=t=>xs.getInstance().setup(t),Ig=()=>xs.getInstance().json(),Wc=t=>Sg(t,xs.getInstance().options),kg=Hn,Og=Rg,Hp=jp,Mg=Up;Js("ENRICHED",z.COMPILED+10);var Dg=class extends Lo{visitTree(t,e){this.mactionId=0;let i=super.visitTree(t);return this.mactionId&&(e.inputData.hasMaction=!0),i}visitHtmlNode(t,e){return t.getSerializedXML()}visitMactionNode(t,e){let[i,r]=t.childNodes.length===0?["",""]:[`
42
+ `,e],s=this.childNodeMml(t,e+" ",i),n=this.getAttributes(t);if(t.attributes.get("actiontype")==="toggle"){let a=++this.mactionId;t.setProperty("mactionId",a),n=` data-maction-id="${a}" selection="${t.attributes.get("selection")}"`+n.replace(/ selection="\d+"/,"").replace(/ data-maction-id="\d+"/,"")}return`${e}<maction${n}>`+(s.match(/\S/)?i+s+r:"")+"</maction>"}};function Pg(t,e,i){return class extends t{constructor(){super(...arguments),this.toMathML=i}serializeMml(r){if("outerHTML"in r)return r.outerHTML;if(typeof Element<"u"&&typeof window<"u"&&r instanceof Element){let s=window.document.createElement("div");return s.appendChild(r),s.innerHTML}return r.toString()}enrich(r,s=!1){if(!(this.state()>=z.ENRICHED)){if(!this.isEscaped&&(r.options.enableEnrichment||s)){let n=new r.options.MathItem("",e);try{let a;a=this.inputData.originalMml?this.adjustSelections():this.inputData.originalMml=this.toMathML(this.root,this);let o=Wc(a);this.inputData.enrichedMml=n.math=this.serializeMml(o),n.math=n.math.replace(/ role="treeitem"/g,' data-speech-node="true"').replace(/ aria-level/g," data-semantic-level-number").replace(/ aria-(?:posinset|owns|setsize)=".*?"/g,""),n.display=this.display,n.compile(r),this.root=n.root}catch(a){r.options.enrichError(r,this,a)}}this.state(z.ENRICHED)}}toEnriched(r){return this.serializeMml(Wc(r))}unEnrich(r){let s=this.inputData.originalMml;if(!s)return;let n=new r.options.MathItem("",e);n.math=s,n.display=this.display,n.compile(r),this.root=n.root}adjustSelections(){let r=this.inputData.originalMml;if(!this.inputData.hasMaction)return r;let s=[];return this.root.walkTree(n=>{n.isKind("maction")&&(s[n.attributes.get("data-maction-id")]=n)}),r.replace(/(data-maction-id="(\d+)" selection=)"\d+"/g,(n,a,o)=>`${a}"${s[o].attributes.get("selection")}"`)}}}function Bg(t,e){var i=class extends t{constructor(...r){super(...r),e.setMmlFactory(this.mmlFactory);let s=this.constructor.ProcessBits;s.has("enriched")||s.allocate("enriched");let n=new Dg(this.mmlFactory),a=(o,h)=>n.visitTree(o,h);this.options.MathItem=Pg(this.options.MathItem,e,a)}enrich(){if(!this.processed.isSet("enriched")){if(this.options.enableEnrichment){wg(this.options.sre);for(let r of this.math)r.enrich(this)}this.processed.set("enriched")}return this}enrichError(r,s,n){console.warn("Enrichment error:",n)}state(r,s=!1){if(super.state(r,s),r<z.ENRICHED&&(this.processed.clear("enriched"),r>=z.COMPILED))for(let n of this.math)n.unEnrich(this);return this}};return i.OPTIONS=Object.assign(Object.assign({},t.OPTIONS),{enableEnrichment:!0,enrichError:(r,s,n)=>r.enrichError(r,s,n),renderActions:qe(Object.assign(Object.assign({},t.OPTIONS.renderActions),{enrich:[z.ENRICHED]})),sre:qe({speech:"none",locale:"en",domain:"clearspeak",style:"default",braille:"nemeth",structure:!0,aria:!0})}),i}function Wp(t,e){return e.setAdaptor(t.adaptor),t.documentClass=Bg(t.documentClass,e),t}var Fg=["pitch","rate","volume"];function _g(t){let e=kg(t),i=[],r=[];return zp(Array.from(e.childNodes),i,r),[r.join(" "),i]}function zp(t,e,i,r={}){for(let s of t){if(s.nodeType===3){let n=s.textContent.trim();n&&(i.push(n),e.push(Object.assign({text:n},r)));continue}if(s.nodeType===1){let n=s,a=n.tagName;if(a==="speak")continue;if(a==="prosody"){zp(Array.from(s.childNodes),e,i,Ug(n,r));continue}switch(a){case"break":e.push({pause:n.getAttribute("time")});break;case"mark":e.push({mark:n.getAttribute("name")});break;case"say-as":{let o=n.textContent;e.push(Object.assign({text:o,character:!0},r)),i.push(o);break}}}}}var jg={pitch:(t,e)=>t/100*1,volume:(t,e)=>t/100*.5,rate:(t,e)=>t/100*1};function Ug(t,e){let i={};for(let r of Fg)if(t.hasAttribute(r)){let[s,n]=Wg(t.getAttribute(r));if(!s){i[r]=r==="volume"?.5:1;continue}let a=e[r];a||(a=r==="volume"?.5:1);let o=jg[r](parseInt(n,10),s);i[r]=s==="-"?a-o:a+o}return i}var Hg=/([+-]?)([0-9]+)%/;function Wg(t){let e=t.match(Hg);return e?[e[1],e[2]]:(console.warn("Something went wrong with the prosody matching."),["","100"])}function zg(t,e,i,r=" "){if(!t)return"";let s=[t];return e&&s.unshift(e),i&&s.push(i),s.join(r)}function qg(t,e="en",i="100"){return _g(`<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="${e}"><prosody rate="${i}%">${t}</prosody></speak>`)}function Gg(){let t=new AudioContext,e=t.createOscillator();e.frequency.value=300,e.connect(t.destination),e.start(t.currentTime),e.stop(t.currentTime+.05)}var zc;(function(t){t[t.NONE=0]="NONE",t[t.DEPTH=1]="DEPTH",t[t.SUMMARY=2]="SUMMARY"})(zc||(zc={}));var de;(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"})(de||(de={}));var Vg=class{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({},t?.sre||{},{enableSpeech:t.enableSpeech,enableBraille:t.enableBraille}),delete this._options.custom}get options(){return this._options}init(t,e,i){this.options=t,!this._init&&(this.adaptor=e,this.webworker=i,this._init=!0)}update(t){Object.assign(this.options,t)}Speech(t){let e=t.outputData.mml,i=Object.assign({},this.options,{modality:"speech"});return this.promise=this.webworker.Speech(e,i,t)}SpeechFor(t,e){let i=Object.assign({},this.options,{modality:"speech"});return this.webworker.speechFor(e,i,t)}cancel(t){var e;(e=this.webworker)==null||e.Cancel(t)}updateRegions(t,e,i){e.Update(this.getLabel(t)),i.Update(this.getBraille(t))}getOptions(t){return{locale:this.adaptor.getAttribute(t,"data-semantic-locale")??"",domain:this.adaptor.getAttribute(t,"data-semantic-domain")??"",style:this.adaptor.getAttribute(t,"data-semantic-style")??"",domain2style:this.adaptor.getAttribute(t,"data-semantic-domain2style")??""}}nextRules(t){let 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){let i=this.getOptions(e.typesetRoot);return this.update(i),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="",i=" "){let r=this.adaptor;return zg(r.getAttribute(t,de.SPEECH_SSML),r.getAttribute(t,de.PREFIX_SSML),r.getAttribute(t,de.POSTFIX_SSML),i)||r.getAttribute(t,"aria-label")}getBraille(t){let e=this.adaptor;return e.getAttribute(t,"aria-braillelabel")||e.getAttribute(t,de.BRAILLE)}getLocalePreferences(t){return this.promise=this.webworker.clearspeakLocalePreferences(this.options,t)}getRelevantPreferences(t,e,i,r){let s=t.outputData.mml;return this.promise=this.webworker.clearspeakRelevantPreferences(s,e,i,r)}},Pr=function(t,e,i,r){function s(n){return n instanceof i?n:new i(function(a){a(n)})}return new(i||(i=Promise))(function(n,a){function o(p){try{d(r.next(p))}catch(E){a(E)}}function h(p){try{d(r.throw(p))}catch(E){a(E)}}function d(p){p.done?n(p.value):s(p.value).then(o,h)}d((r=r.apply(t,e||[])).next())})},Xg=class{constructor(t,e,i,r){this.cmd=t,this.item=e,this.resolve=i,this.reject=r}},$g=class{constructor(t,e){this.adaptor=t,this.options=e,this.ready=!1,this.tasks=[],this.Commands={Ready(i,r){i.ready=!0,i.postNext()},Finished(i,r){let s=i.tasks.shift();r.success?s.resolve(r.result):s.reject(r.error),i.postNext()},Log(i,r){i.options.debug&&console.log("Log:",r)}}}Start(){return Pr(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){let i=new Promise((r,s)=>{this.tasks.push(new Xg(t,e,r,s))});return this.ready&&this.tasks.length===1&&this.postNext(),i}postNext(){if(this.tasks.length){let t=Object.assign({},this.tasks[0].cmd,{debug:this.options.debug});this.worker.postMessage(t)}}Cancel(t){let e=this.tasks.findIndex(i=>i.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,i){return Pr(this,void 0,void 0,function*(){this.Attach(i,e.enableSpeech,e.enableBraille,yield this.Post({cmd:"speech",data:{mml:t,options:e}},i))})}nextRules(t,e,i){return Pr(this,void 0,void 0,function*(){this.Attach(i,e.enableSpeech,e.enableBraille,yield this.Post({cmd:"nextRules",data:{mml:t,options:e}},i))})}nextStyle(t,e,i,r){return Pr(this,void 0,void 0,function*(){this.Attach(r,e.enableSpeech,e.enableBraille,yield this.Post({cmd:"nextStyle",data:{mml:t,options:e,nodeId:i}},r))})}speechFor(t,e,i){return Pr(this,void 0,void 0,function*(){let r=yield this.Post({cmd:"speech",data:{mml:t,options:e}},i);return JSON.parse(r)})}Attach(t,e,i,r){let s=JSON.parse(r),n=t.typesetRoot;if(!n)return;this.setSpecialAttributes(n,s.options,"data-semantic-",["locale","domain","style","domain2style"]);let a=this.adaptor;this.setSpecialAttributes(n,s.translations,"data-semantic-");for(let[o,h]of Object.entries(s.mactions)){let d=a.getElement("#"+o,n);!d||!a.childNodes(d)[0]||(d=a.childNodes(d)[0],a.kind(d)==="rect"&&(d=a.next(d)),a.setAttribute(d,"data-semantic-type","dummy"),this.setSpecialAttributes(d,h,""))}for(let o of a.childNodes(n))(a.kind(o)==="mjx-math"||a.kind(o)==="svg")&&this.setSpeechAttributes(o,"",s,e,i);e&&(s.label&&(a.setAttribute(n,de.SPEECH,s.label),a.setAttribute(n,de.SPEECH_SSML,s.ssml),t.outputData.speech=s.label),a.setAttribute(n,"data-speech-attached","true")),i&&(s.braillelabel&&(a.setAttribute(n,de.BRAILLE,s.braillelabel),t.outputData.braille=s.braillelabel),s.braille&&a.setAttribute(n,"data-braille-attached","true"))}setSpeechAttribute(t,e,i,r){let s=this.adaptor,n=s.getAttribute(t,"data-semantic-id");if(s.removeAttribute(t,"data-speech-node"),i&&e.speech[n]["speech-none"]){s.setAttribute(t,"data-speech-node","true");for(let[a,o]of Object.entries(e.speech[n]))a=a.replace(/-ssml$/,""),o&&s.setAttribute(t,`data-semantic-${a}`,o)}if(r&&e.braille?.[n]?.["braille-none"]){s.setAttribute(t,"data-speech-node","true");let a=e.braille[n]["braille-none"];s.setAttribute(t,de.BRAILLE,a)}}setSpeechAttributes(t,e,i,r,s){let n=this.adaptor;if(!t||n.kind(t)==="#text"||n.kind(t)==="#comment")return e;t=t,n.hasAttribute(t,"data-semantic-id")&&(this.setSpeechAttribute(t,i,r,s),!e&&!n.hasAttribute(t,"data-semantic-parent")&&(e=n.getAttribute(t,"data-semantic-id")));for(let a of Array.from(n.childNodes(t)))e=this.setSpeechAttributes(a,e,i,r,s);return e}setSpecialAttributes(t,e,i,r){if(e){r||(r=Object.keys(e));for(let s of r){let n=e[s];n&&this.adaptor.setAttribute(t,`${i}${s.toLowerCase()}`,n)}}}Detach(t){let e=t.typesetRoot;this.adaptor.removeAttribute(e,"data-speech-attached"),this.adaptor.removeAttribute(e,"data-braille-attached"),this.detachSpeech(e)}detachSpeech(t){let e=this.adaptor,i=e.childNodes(t);if(i){if(e.kind(t)!=="#text")for(let r of["none","summary-none","speech","speech-none","summary","braille"])e.removeAttribute(t,`data-semantic-${r}`);for(let r of i)this.detachSpeech(r)}}Terminate(){this.debug("Terminating pending tasks");for(let 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 Pr(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 Pr(this,void 0,void 0,function*(){yield this.Post({cmd:"localePreferences",data:{options:t}}).then(i=>{e.set(t.locale,JSON.parse(i))})})}clearspeakRelevantPreferences(t,e,i,r){return Pr(this,void 0,void 0,function*(){yield this.Post({cmd:"relevantPreferences",data:{mml:t,id:e}}).then(s=>{i.set(r,s)})})}};function qc(){return ni.path(new URL(import.meta.url).pathname).replace(/components\/[cm]js\/sre-root.js$/,"a11y/sre")}var qp=function(t,e,i,r){function s(n){return n instanceof i?n:new i(function(a){a(n)})}return new(i||(i=Promise))(function(n,a){function o(p){try{d(r.next(p))}catch(E){a(E)}}function h(p){try{d(r.throw(p))}catch(E){a(E)}}function d(p){p.done?n(p.value):s(p.value).then(o,h)}d((r=r.apply(t,e||[])).next())})};Js("ATTACHSPEECH",z.INSERTED+10);function Kg(t){return class extends t{constructor(){super(...arguments),this.generatorPool=new Vg}attachSpeech(e){if(this.outputData.speechPromise=null,this.state()>=z.ATTACHSPEECH||(this.state(z.ATTACHSPEECH),this.isEscaped||!(e.options.enableSpeech||e.options.enableBraille)||!e.options.enableEnrichment))return;e.getWebworker(),this.generatorPool.init(e.options,e.adaptor,e.webworker),this.outputData.mml=this.toMathML(this.root,this);let i=this.generatorPool.Speech(this).catch(r=>e.options.speechError(e,this,r));e.savePromise(i),this.outputData.speechPromise=i}detachSpeech(e){e.webworker.Detach(this)}speechFor(e){return qp(this,void 0,void 0,function*(){e=this.toEnriched(e);let i=yield this.generatorPool.SpeechFor(this,e);return[i.label,i.braillelabel]})}clear(){this.generatorPool.cancel(this)}}}function Jg(t){var e=class extends t{constructor(...i){super(...i),this.webworker=null;let r=this.constructor.ProcessBits;r.has("attach-speech")||r.allocate("attach-speech"),this.options.MathItem=Kg(this.options.MathItem)}getWebworker(){this.webworker||(this.webworker=new $g(this.adaptor,this.options.worker),this.webworker.Start())}attachSpeech(){if(!this.processed.isSet("attach-speech")){let i=this.options;if(i.enableEnrichment&&(i.enableSpeech||i.enableBraille)){this.getWebworker();for(let r of this.math)r.attachSpeech(this)}this.processed.set("attach-speech")}return this}speechError(i,r,s){console.warn("Speech generation error:",s)}state(i,r=!1){if(super.state(i,r),i<z.ATTACHSPEECH&&(this.processed.clear("attach-speech"),i>=z.TYPESET))for(let s of this.math)s.detachSpeech(this);return this}done(){let i=Object.create(null,{done:{get:()=>super.done}});return qp(this,void 0,void 0,function*(){return yield this.webworker?.Stop(),i.done.call(this)})}};return e.OPTIONS=Object.assign(Object.assign({},t.OPTIONS),{enableSpeech:!0,enableBraille:!0,speechError:(i,r,s)=>i.speechError(i,r,s),renderActions:qe(Object.assign(Object.assign({},t.OPTIONS.renderActions),{attachSpeech:[z.ATTACHSPEECH]})),worker:{path:qc(),maps:qc().replace(/[cm]js\/a11y\/sre$/,"bundle/sre/mathmaps"),worker:"speech-worker.js",debug:!1},a11y:qe({speech:!0,braille:!0})}),e}function Gp(t,e){return!t.documentClass.prototype.enrich&&e&&(t=Wp(t,e)),t.documentClass=Jg(t.documentClass),t}var Yg=wh({AbstractRegion:()=>Mo,DummyRegion:()=>Vp,HoverRegion:()=>ds,LiveRegion:()=>Di,SpeechRegion:()=>Wh,StringRegion:()=>Hh,ToolTip:()=>Er}),Mo=class{constructor(t){this.document=t,this.CLASS=this.constructor,this.AddStyles()}static get sheetId(){return"MJX-"+this.name+"-styles"}static get styleSheet(){return document.head.querySelector("#"+this.sheetId)}AddStyles(){let t=this.CLASS.sheetId;if(!this.CLASS.style||this.document.adaptor.head().querySelector("#"+t))return;let e=this.document.adaptor.node("style",{id:t});e.innerHTML=this.CLASS.style.cssText,this.document.adaptor.head().appendChild(e)}AddElement(){if(this.div)return;let 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){this.AddElement(),this.position(t),this.div.classList.add(this.CLASS.className+"_Show")}Hide(){this.div&&(this.div.remove(),this.div=null,this.inner=null)}stackRegions(t){let e=t.getBoundingClientRect(),i=0,r=1/0,s=this.document.adaptor.document.getElementsByClassName(this.CLASS.className+"_Show");for(let o=0,h;h=s[o];o++)h!==this.div&&(i=Math.max(h.getBoundingClientRect().bottom,i),r=Math.min(h.getBoundingClientRect().left,r));let n=(i||e.bottom+10)+window.scrollY,a=(r<1/0?r:e.left)+window.scrollX;this.div.style.top=n+"px",this.div.style.left=a+"px"}},Vp=class extends Mo{Clear(){}Update(){}Hide(){}Show(){}AddElement(){}AddStyles(){}position(){}},Hh=class extends Mo{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||" ")}position(t){this.stackRegions(t)}},Er=class extends Hh{};Er.className="MJX_ToolTip",Er.style=new Cr({[`.${Er.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},[`.${Er.className} > div`]:{"border-radius":"inherit",padding:"0 2px"},"@media (prefers-color-scheme: dark)":{["."+Er.className]:{"background-color":"#222025","box-shadow":"0px 5px 20px #000",border:"1px solid #7C7C7C"}}});var Di=class extends Hh{static setColor(t,e,i,r){let s=this.styleSheet;if(s){let n=s.sheet.cssRules[0].style,a=r===1?1:`var(--mjx-${t}${e}-alpha)`,o=`--mjx-${t}${e}-color`,h=`rgba(var(--mjx-${t}-${i}), ${a})`;n.getPropertyValue(o)!==h&&n.setProperty(o,h);let d=`--mjx-${t}${e}-alpha`;n.getPropertyValue(d)!==String(r)&&(n.setProperty(d,r),s.sheet.cssRules[1].cssRules[0].style.setProperty(d,r**.7071))}}};Di.className="MJX_LiveRegion",Di.priority={primary:1,secondary:2},Di.style=new Cr({":root":{"--mjx-fg-red":"255, 0, 0","--mjx-fg-green":"0, 255, 0","--mjx-fg-blue":"0, 0, 255","--mjx-fg-yellow":"255, 255, 0","--mjx-fg-cyan":"0, 255, 255","--mjx-fg-magenta":"255, 0, 255","--mjx-fg-white":"255, 255, 255","--mjx-fg-black":"0, 0, 0","--mjx-bg-red":"255, 0, 0","--mjx-bg-green":"0, 255, 0","--mjx-bg-blue":"0, 0, 255","--mjx-bg-yellow":"255, 255, 0","--mjx-bg-cyan":"0, 255, 255","--mjx-bg-magenta":"255, 0, 255","--mjx-bg-white":"255, 255, 255","--mjx-bg-black":"0, 0, 0","--mjx-live-bg-color":"white","--mjx-live-shadow-color":"#888","--mjx-live-border-color":"#CCCCCC","--mjx-bg1-color":"rgba(var(--mjx-bg-blue), var(--mjx-bg1-alpha))","--mjx-fg1-color":"rgba(var(--mjx-fg-black), 1)","--mjx-bg2-color":"rgba(var(--mjx-bg-red), 1)","--mjx-fg2-color":"rgba(var(--mjx-fg-black), 1)","--mjx-bg1-alpha":.2,"--mjx-fg1-alpha":1,"--mjx-bg2-alpha":1,"--mjx-fg2-alpha":1},"@media (prefers-color-scheme: dark)":{":root":{"--mjx-bg-blue":"132, 132, 255","--mjx-bg-white":"0, 0, 0","--mjx-bg-black":"255, 255, 255","--mjx-fg-white":"0, 0, 0","--mjx-fg-black":"255, 255, 255","--mjx-live-bg-color":"#222025","--mjx-live-shadow-color":"black","--mjx-live-border-color":"#7C7C7C","--mjx-bg1-alpha":.3,"--mjx-fg1-alpha":1,"--mjx-bg2-alpha":1,"--mjx-fg2-alpha":1}},[`.${Di.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":"var(--mjx-live-bg-color)","box-shadow":"0px 5px 20px var(--mjx-live-shadow-color)",border:"2px solid var(--mjx-live-border-color)"},[`.${Di.className}_Show`]:{display:"block"},[`.${Di.className} > div`]:{color:"var(--mjx-fg1-color)","background-color":"var(--mjx-bg1-color)"},"mjx-container [data-sre-highlight-1]:not([data-mjx-collapsed], rect)":{color:"var(--mjx-fg1-color) ! important",fill:"var(--mjx-fg1-color) ! important"},[["mjx-container:not([data-mjx-clone-container])","[data-sre-highlight-1]:not([data-sre-enclosed], rect)"].join(" ")]:{"background-color":"var(--mjx-bg1-color) ! important"},"mjx-container rect[data-sre-highlight-1]:not([data-sre-enclosed])":{fill:"var(--mjx-bg1-color) ! important"},"mjx-container [data-sre-highlight-2]":{color:"var(--mjx-fg2-color) ! important","background-color":"var(--mjx-bg2-color) ! important",fill:"var(--mjx-fg2-color) ! important"},"mjx-container rect[data-sre-highlight-2]":{fill:"var(--mjx-bg2-color) ! important"}});var Wh=class extends Di{constructor(){super(...arguments),this.active=!1,this.node=null,this.clear=!1,this.voiceRequest=!1,this.voiceCancelled=!1}Show(t){super.Update(" "),this.node=t,super.Show(t)}Update(t){if(this.voiceRequest){this.makeVoice(t);return}speechSynthesis.onvoiceschanged=(()=>this.voiceRequest=!0).bind(this),new Promise(e=>{setTimeout(()=>{this.voiceRequest?e(!0):setTimeout(()=>{this.voiceRequest=!0,e(!0)},100)},100)}).then(()=>this.makeVoice(t))}makeVoice(t){this.active=this.document.options.a11y.voicing&&!!speechSynthesis.getVoices().length,speechSynthesis.cancel(),this.clear=!0;let[e,i]=qg(t,this.document.options.sre.locale,this.document.options.sre.rate);super.Update(e),this.active&&e&&this.makeUtterances(i,this.document.options.sre.locale)}makeUtterances(t,e){this.voiceCancelled=!1;let i=null;for(let r of t){if(r.mark){if(!i){this.highlightNode(r.mark,!0);continue}i.addEventListener("end",s=>{this.voiceCancelled||this.highlightNode(r.mark)});continue}if(r.pause){let s=parseInt(r.pause.match(/^[0-9]+/)[0]);if(isNaN(s)||!i)continue;i.addEventListener("end",n=>{speechSynthesis.pause(),setTimeout(()=>{speechSynthesis.resume()},s)});continue}i=new SpeechSynthesisUtterance(r.text),r.rate&&(i.rate=r.rate),r.pitch&&(i.pitch=r.pitch),i.lang=e,speechSynthesis.speak(i)}i&&i.addEventListener("end",r=>{this.highlighter.unhighlight()})}Hide(){this.cancelVoice(),super.Hide()}cancelVoice(){this.voiceCancelled=!0,speechSynthesis.cancel(),this.highlighter.unhighlight()}highlightNode(t,e=!1){this.highlighter.unhighlight();let i=Array.from(this.node.querySelectorAll(`[data-semantic-id="${t}"]`));(!this.clear||e)&&this.highlighter.highlight(i),this.clear=!1}};Wh.style=null;var ds=class extends Mo{position(t){let e=t.getBoundingClientRect(),i=this.div.getBoundingClientRect(),r=e.left+e.width/2-i.width/2;r=r<0?0:r,r+=window.scrollX;let s;switch(this.document.options.a11y.align){case"top":s=e.top-i.height-10;break;case"bottom":s=e.bottom+10;break;default:s=e.top+e.height/2-i.height/2}s+=window.scrollY,s=s<0?0:s,this.div.style.top=s+"px",this.div.style.left=r+"px"}Show(t){this.AddElement(),this.div.style.fontSize=this.document.options.a11y.magnify,this.Update(t),super.Show(t)}Clear(){this.div&&(this.inner.textContent="",this.inner.style.top="",this.inner.style.backgroundColor="")}Update(t){if(!this.div)return;this.Clear();let e=this.cloneNode(t),i=e.querySelector("[data-mjx-clone]");this.inner.style.backgroundColor=t.style.backgroundColor,i.style.backgroundColor="",i.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"),e.nodeName!=="MJX-CONTAINER"){e.nodeName!=="g"&&(e.style.marginLeft=e.style.marginRight="0");let i=t.closest("mjx-container");if(e.nodeName!=="MJX-MATH"&&e.nodeName!=="svg"){let r=i.firstChild;r.nodeName==="MJX-BBOX"&&(r=r.nextSibling),e=r.cloneNode(!1).appendChild(e).parentElement;let s=Array.from(i.querySelectorAll("[data-sre-enclosed]"));r.nodeName==="svg"?this.svgClone(t,s,e,i):this.chtmlClone(t,s,e)}e=i.cloneNode(!1).appendChild(e).parentElement,e.style.margin="0",e.style.minWidth=""}return e.setAttribute("data-mjx-clone-container","true"),e}chtmlClone(t,e,i){for(let r of e)if(r!==t){let s=r.getAttribute("data-semantic-id");(!s||!i.querySelector(`[data-semantic-id="${s}"]`))&&i.appendChild(r.cloneNode(!0))}}svgClone(t,e,i,r){var s;let{x:n,y:a,width:o,height:h}=t.getBBox();if(e.length){i.firstChild.remove();let y=r.querySelector("g").cloneNode(!1);for(let vt of e){let nt=y.appendChild(vt.cloneNode(!0));vt===t&&nt.setAttribute("data-mjx-clone","true");let[xt,jt]=this.xy(vt);nt.setAttribute("transform",`translate(${xt}, ${jt})`)}i.appendChild(y);let A=t.previousSibling,w=A.getBBox();o=w.width,h=w.height;let[_,U]=this.xy(A);n=_,a=U+w.y}let d=r.querySelector("g");if(r.getAttribute("width")==="full"&&d.firstChild.lastChild===t){i.innerHTML="",i.appendChild(r.cloneNode(!0).firstChild),i.querySelector(".mjx-selected").setAttribute("data-mjx-clone","true"),(s=i.querySelector("[data-sre-highlighter-added]"))==null||s.remove();return}i.firstChild.setAttribute("transform","scale(1, -1)");let p=parseFloat((i.getAttribute("viewBox")||i.getAttribute("data-mjx-viewBox")).split(/ /)[2]),E=parseFloat(i.style.minWidth||i.getAttribute("width"));i.setAttribute("viewBox",[n,-(a+h),o,h].join(" ")),i.removeAttribute("style"),i.setAttribute("width",E/p*o+"ex"),i.setAttribute("height",E/p*h+"ex")}xy(t){let e=DOMPoint.fromPoint({x:0,y:0}).matrixTransform(t.getCTM().inverse());return[-e.x,-e.y]}};ds.className="MJX_HoverRegion",ds.style=new Cr({[`.${ds.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"},[`.${ds.className} > div`]:{overflow:"hidden",color:"var(--mjx-fg1-color)","background-color":"var(--mjx-bg1-color)"},"@media (prefers-color-scheme: dark)":{["."+ds.className]:{"background-color":"#222025","box-shadow":"0px 5px 20px #000",border:"1px solid #7C7C7C"}},"mjx-container[data-mjx-clone-container]":{padding:"2px ! important"},"mjx-math > mjx-mlabeledtr":{display:"inline-block","margin-right":".5em ! important"},"mjx-math > mjx-mtd":{float:"right"}});var zh=class Xp{get highlighter(){return this.pool.highlighter}static stopEvent(e){e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopImmediatePropagation?e.stopImmediatePropagation():e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0}static create(e,i,r,s,...n){return new this(e,i,r,s,...n)}constructor(e,i,r,s,...n){this.document=e,this.pool=i,this.region=r,this.node=s,this.stoppable=!0,this.events=[],this._active=!1}Events(){return this.events}get active(){return this._active}set active(e){this._active=e}Attach(){this.AddEvents()}Detach(){this.RemoveEvents()}Start(){this.active=!0}Stop(){this.active&&(this.active=(this.region.Clear(),this.region.Hide(),!1))}AddEvents(){for(let[e,i]of this.events)this.node.addEventListener(e,i)}RemoveEvents(){for(let[e,i]of this.events)this.node.removeEventListener(e,i)}Update(e=!1){}stopEvent(e){this.stoppable&&Xp.stopEvent(e)}},Jo=!!ni.window?.HTMLDialogElement,ss=class wa{constructor(e){this.minW=200,this.minH=80,this.tx=0,this.ty=0,this.dragging=!1,this.events=[["mousemove",this.MouseMove.bind(this)],["mouseup",this.MouseUp.bind(this)]],this.mode="",this.actions={down:{move:a=>{a.dialog.classList.add("mjx-moving")}},move:{move:(a,o)=>[o.x-a.x,o.y-a.y,0,0],top:(a,o)=>[0,(o.y-a.y)/2,0,a.y-o.y],bottom:(a,o)=>[0,(o.y-a.y)/2,0,o.y-a.y],left:(a,o)=>[(o.x-a.x)/2,0,a.x-o.x,0],right:(a,o)=>[(o.x-a.x)/2,0,o.x-a.x,0],topleft:(a,o)=>[(o.x-a.x)/2,(o.y-a.y)/2,a.x-o.x,a.y-o.y],topright:(a,o)=>[(o.x-a.x)/2,(o.y-a.y)/2,o.x-a.x,a.y-o.y],botleft:(a,o)=>[(o.x-a.x)/2,(o.y-a.y)/2,a.x-o.x,o.y-a.y],botright:(a,o)=>[(o.x-a.x)/2,(o.y-a.y)/2,o.x-a.x,o.y-a.y]},up:{move:a=>{a.dialog.classList.remove("mjx-moving")}},keymove:{left:()=>[-5,0,0,0],right:()=>[5,0,0,0],up:()=>[0,-5,0,0],down:()=>[0,5,0,0]},bigmove:{left:()=>[-20,0,0,0],right:()=>[20,0,0,0],up:()=>[0,-20,0,0],down:()=>[0,20,0,0]},keysize:{left:()=>[-3,0,-6,0],right:()=>[3,0,6,0],up:()=>[0,-3,0,-6],down:()=>[0,3,0,6]},bigsize:{left:()=>[-10,0,-20,0],right:()=>[10,0,20,0],up:()=>[0,-10,0,-20],down:()=>[0,10,0,20]}};let{adaptor:i,node:r=null}=e;this.init(i),this.node=r,this.background=Jo?null:i.node("mjx-dialog-background"),this.x=this.y=0,this.dragging=!1,this.action="",this.dialog=this.html(e),this.title=this.dialog.firstChild.firstChild.firstChild,this.content=this.dialog.firstChild.firstChild.nextSibling;let s=this.dialog.lastChild;s.addEventListener("click",this.closeDialog.bind(this)),s.addEventListener("keydown",this.actionKey.bind(this,this.closeDialog.bind(this)));let n=this.dialog.lastChild.previousSibling;n.addEventListener("click",this.helpDialog.bind(this,i)),n.addEventListener("keydown",this.actionKey.bind(this,this.helpDialog.bind(this,i))),this.noDrag=Array.from(this.dialog.querySelectorAll('[data-drag="none"]'))}init(e){let i=this.constructor;if(!e.document.head.querySelector("#"+i.styleId)){let r=e.node("style",{id:i.styleId});r.textContent=new Cr(i.styles).cssText,e.document.head.append(r)}}html(e){let{title:i,message:r,adaptor:s,styles:n=null,extraNodes:a=[],className:o=wa.className}=e;if(n){let p=s.node("style");p.textContent=new Cr(n).cssText,a.unshift(p)}let h="mjx-dialog-label-"+wa.id++,d=s.node("dialog",{closedby:"any",class:("mjx-dialog "+o).trim()},[s.node("mjx-dialog",{"aria-labeledby":h},[s.node("mjx-title",{},[s.node("h1",{id:h,tabIndex:0})]),s.node("div",{"data-drag":"none",tabIndex:0})]),...a,s.node("mjx-dialog-spacer",{"aria-hidden":!0}),s.node("mjx-dialog-drag",{"data-drag":"top","aria-hidden":!0}),s.node("mjx-dialog-drag",{"data-drag":"bottom","aria-hidden":!0}),s.node("mjx-dialog-drag",{"data-drag":"left","aria-hidden":!0}),s.node("mjx-dialog-drag",{"data-drag":"right","aria-hidden":!0}),s.node("mjx-dialog-drag",{"data-drag":"topleft","aria-hidden":!0}),s.node("mjx-dialog-drag",{"data-drag":"topright","aria-hidden":!0}),s.node("mjx-dialog-drag",{"data-drag":"botleft","aria-hidden":!0}),s.node("mjx-dialog-drag",{"data-drag":"botright","aria-hidden":!0}),s.node("mjx-dialog-help",{class:"mjx-dialog-button","data-drag":"none",tabIndex:0,role:"button","aria-label":"Dialog Help"},[s.node("mjx-dialog-icon",{"aria-hidden":!0},[s.text("?")])]),s.node("mjx-dialog-close",{class:"mjx-dialog-button","data-drag":"none",tabIndex:0,role:"button","aria-label":"Close Dialog Box"},[s.node("mjx-dialog-icon",{"aria-hidden":!0},[s.text("×")])])]);return d.firstChild.firstChild.firstChild.innerHTML=i,d.firstChild.childNodes[1].innerHTML=r,d}attach(){Jo?(this.dialog.addEventListener("mousedown",this.MouseDown.bind(this)),this.dialog.addEventListener("keydown",this.KeyDown.bind(this),!0),document.body.append(this.dialog),this.dialog.showModal()):(this.background.addEventListener("mousedown",this.MouseDown.bind(this)),this.background.addEventListener("keydown",this.KeyDown.bind(this),!0),this.dialog.setAttribute("tabindex","0"),this.dialog.addEventListener("click",this.stop),this.background.append(this.dialog),document.body.append(this.background)),ni.window.addEventListener("visibilitychange",this.Visibility.bind(this)),this.minW=Math.min(this.minW,this.dialog.clientWidth-8),this.minH=Math.min(this.minH,this.dialog.clientHeight-this.title.offsetHeight-8),this.title.focus()}dragAction(e,i=null){i&&this.stop(i);let r=this.actions[e][this.action],s=r?r(this,i):null;if(!s)return;let[n,a,o,h]=s;if(o){let d=this.w+o;d>=this.minW?(this.x=i?.x,this.w=d,this.dialog.style.maxWidth=this.dialog.style.width=d+"px"):n=0}if(h){let d=this.h+h;d>=this.minH+this.title.offsetHeight?(this.y=i?.y,this.h=d,this.dialog.style.maxHeight=this.dialog.style.height=d+"px"):a=0}(n||a)&&(n&&(this.x=i?.x,this.tx+=n||0),a&&(this.y=i?.y,this.ty+=a||0),this.dialog.style.transform=`translate(${this.tx}px, ${this.ty}px)`)}MouseDown(e){let i=e.target;if(!(e.buttons!==1||e.shiftKey||e.metaKey||e.altKey||e.ctrlKey)){if(!this.inDialog(e)){this.closeDialog(e);return}for(let r of this.noDrag)if(i===r||r.contains(i))return;this.action=i.getAttribute("data-drag")||"move",this.startDrag(e),this.dragAction("down",e)}}MouseMove(e){e.buttons!==1&&this.endDrag(),this.dragging&&this.dragAction("move",e)}MouseUp(e){this.dragging&&(this.dragAction("up",e),this.endDrag())}Visibility(){ni.document.hidden&&this.closeDialog()}KeyDown(e){let i=this.constructor.keyActions.get(e.key);i&&i(this,e)}escKey(e){this.closeDialog(e)}aKey(e){(e.ctrlKey||e.metaKey)&&(this.selectAll(),this.stop(e))}mKey(e){this.mode=this.mode==="move"?"":"move",this.stop(e)}sKey(e){this.mode=this.mode==="size"?"":"size",this.stop(e)}arrowKey(e,i){e.ctrlKey||this.dragging||(this.action=i,this.getWH(),e.altKey||this.mode==="move"?(this.dragAction(e.shiftKey?"bigmove":"keymove"),this.stop(e)):(e.metaKey||this.mode==="size")&&(this.dragAction(e.shiftKey?"bigsize":"keysize"),this.stop(e)),this.action="")}actionKey(e,i){(i.code==="Enter"||i.code==="Space")&&e(i)}selectAll(){document.getSelection().selectAllChildren(this.content)}copyToClipboard(){this.selectAll();try{document.execCommand("copy")}catch(e){alert(`Can't copy to clipboard: ${e.message}`)}document.getSelection().removeAllRanges()}startDrag(e){this.x=e.x,this.y=e.y,this.getWH(),this.dragging=!0;let i=this.background||this.dialog;for(let[r,s]of this.events)i.addEventListener(r,s)}getWH(){this.w=this.dialog.clientWidth-8,this.h=this.dialog.clientHeight-8}endDrag(){this.action="",this.dragging=!1;let e=this.background||this.dialog;for(let[i,r]of this.events)e.removeEventListener(i,r)}closeDialog(e){var i;Jo?(this.dialog.close(),this.dialog.remove()):this.background.remove(),(i=this.node)==null||i.focus(),e&&this.stop(e)}helpDialog(e,i){new wa({title:"MathJax Dialog Help",message:this.constructor.helpMessage,adaptor:e,className:"mjx-dialog-help",styles:{".mjx-dialog-help":{"max-width":"calc(min(50em, 80%))"}}}).attach(),this.stop(i)}inDialog(e){if(!this.dialog.contains(e.target))return!1;let{x:i,y:r}=e,{left:s,right:n,top:a,bottom:o}=this.dialog.getBoundingClientRect();return i>=s&&i<=n&&r>=a&&r<=o}stop(e){e.preventDefault&&e.preventDefault(),e.stopImmediatePropagation?e.stopImmediatePropagation():e.stopPropagation&&e.stopPropagation()}};ss.keyActions=new Map([["Escape",(t,e)=>t.escKey(e)],["a",(t,e)=>t.aKey(e)],["m",(t,e)=>t.mKey(e)],["s",(t,e)=>t.sKey(e)],["ArrowRight",(t,e)=>t.arrowKey(e,"right")],["ArrowLeft",(t,e)=>t.arrowKey(e,"left")],["ArrowUp",(t,e)=>t.arrowKey(e,"up")],["ArrowDown",(t,e)=>t.arrowKey(e,"down")]]),ss.styleId="MJX-DIALOG-styles",ss.className="",ss.id=0,ss.styles={"mjx-dialog-background":{display:"flex","flex-direction":"column","justify-content":"center",position:"fixed",top:0,left:0,right:0,bottom:0,"z-index":1001},".mjx-dialog":{"max-width":"calc(min(60em, 90%))","max-height":"calc(min(50em, 85%))",border:"3px outset","border-radius":"15px",color:"black","background-color":"#DDDDDD","box-shadow":"0px 10px 20px #808080",padding:"4px 4px",cursor:"grab",overflow:"visible",display:"flex","flex-direction":"column","align-items":"center",position:"fixed",top:"-4%"},".mjx-dialog *":{"box-sizing":"content-box"},".mjx-dialog.mjx-moving":{cursor:"grabbing"},'.mjx-dialog > input[type="button"]':{width:"fit-content"},".mjx-dialog > mjx-dialog-spacer":{display:"block",height:".75em","flex-shrink":0},".mjx-dialog::backdrop":{opacity:0,cursor:"default"},"mjx-dialog":{all:"initial",cursor:"inherit",width:"100%",display:"flex","flex-direction":"column","flex-grow":1,"flex-shrink":1,overflow:"hidden"},"mjx-dialog > mjx-title":{display:"block","text-align":"center",margin:".25em 1.75em",overflow:"hidden","white-space":"nowrap","-webkit-user-select":"none","user-select":"none","flex-shrink":0},"mjx-dialog > mjx-title > h1":{"font-size":"125%",margin:0},"mjx-dialog > div":{margin:"0 1em .5em",padding:"8px 18px",overflow:"auto",border:"2px inset black","background-color":"white","text-align":"left",cursor:"default","flex-grow":1,"flex-shrink":1},"mjx-dialog > div > pre":{margin:0},".mjx-dialog-button":{position:"absolute",top:"6px",height:"17px",width:"17px",cursor:"default",display:"block",border:"2px solid #AAA","border-radius":"18px","font-family":'"Courier New", Courier',"text-align":"center",color:"#F0F0F0","-webkit-user-select":"none","user-select":"none"},".mjx-dialog-button:hover":{color:"white !important",border:"2px solid #CCC !important"},".mjx-dialog-button > mjx-dialog-icon":{display:"block","background-color":"#AAA",border:"1.5px solid","border-radius":"18px","line-height":0,padding:"8px 0 6px"},".mjx-dialog-button > mjx-dialog-icon:hover":{"background-color":"#CCC !important"},"mjx-dialog-close":{right:"6px","font-size":"20px;"},"mjx-dialog-help":{left:"6px","font-size":"14px;","font-weight":"bold"},".mjx-dialog-help mjx-dialog-help":{display:"none"},"mjx-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-dialog-drag[data-drag="top"]':{height:"5px",position:"absolute",top:"-3px",left:"10px",right:"10px",cursor:"ns-resize"},'mjx-dialog-drag[data-drag="bottom"]':{height:"5px",position:"absolute",bottom:"-3px",left:"10px",right:"10px",cursor:"ns-resize"},'mjx-dialog-drag[data-drag="left"]':{width:"5px",position:"absolute",left:"-3px",top:"10px",bottom:"10px",cursor:"ew-resize"},'mjx-dialog-drag[data-drag="right"]':{width:"5px",position:"absolute",right:"-3px",top:"10px",bottom:"10px",cursor:"ew-resize"},'mjx-dialog-drag[data-drag="topleft"]':{width:"13px",height:"13px",position:"absolute",left:"-3px",top:"-3px",cursor:"nwse-resize"},'mjx-dialog-drag[data-drag="topright"]':{width:"13px",height:"13px",position:"absolute",right:"-3px",top:"-3px",cursor:"nesw-resize"},'mjx-dialog-drag[data-drag="botleft"]':{width:"13px",height:"13px",position:"absolute",left:"-3px",bottom:"-3px",cursor:"nesw-resize"},'mjx-dialog-drag[data-drag="botright"]':{width:"13px",height:"13px",position:"absolute",right:"-3px",bottom:"-3px",cursor:"nwse-resize"},"@media (prefers-color-scheme: dark)":{".mjx-dialog":{"background-color":"#303030","box-shadow":"0px 10px 20px #000",border:"3px outset #7C7C7C"},"mjx-dialog":{color:"#E0E0E0"},"mjx-dialog > div":{border:"2px inset #7C7C7C","background-color":"#222025"},".mjx-dialog a[href]":{color:"#86A7F5"},".mjx-dialog a[href]:visited":{color:"#DD98E2"},"mjx-dialog kbd":{color:"#F8F8F8","background-color":"#545454",border:"solid 1.5px #7A7C7E","border-bottom-color":"#707070","box-shadow":"inset -.5px -1px 0 #818589"},".mjx-dialog-button":{border:"2px solid #686868",color:"#A4A4A4"},".mjx-dialog-button:hover":{color:"#CBCBCB !important",border:"2px solid #888888 !important"},".mjx-dialog-button > mjx-dialog-icon":{"background-color":"#646464"},".mjx-dialog-button > mjx-dialog-icon:hover":{"background-color":"#888888 !important"}}},ss.helpMessage=`
43
+ <p>The dialog boxes in MathJax are movable and sizeable.</p>
44
+
45
+ <p>For mouse users, dragging any of the edges will enlarge or shrink
46
+ the dialog box by moving that side. Dragging any of the corners
47
+ changes the two sides that meet at that corner. Dragging elsewhere on
48
+ the dialog frame will move the dialog without changing its size.</p>
49
+
50
+ <p>For keyboard users, there are two ways to adjust the position
51
+ and size of the dialog box. The first is to hold the
52
+ <kbd>Alt</kbd> or <kbd>Option</kbd> key and press any of the arrow
53
+ keys to move the dialog box in the given direction. Hold the
54
+ <kbd>Win</kbd> or <kbd>Command</kbd> key and press any of the
55
+ arrow keys to enlarge or shrink the dialog box. Left and right
56
+ move the right-hand edge of the dialog, while up and down move the
57
+ bottom edge of the dialog.
58
+ </p>
59
+
60
+ <p>For some users, holding two keys down at once may be difficult,
61
+ so the second way is to press the <kbd>m</kbd> to start "move"
62
+ mode, then use the arrow keys to move the dialog box in the given
63
+ direction. Press <kbd>m</kbd> again to stop moving the dialog.
64
+ Similarly, press <kbd>s</kbd> to start and stop "sizing" mode,
65
+ where the arrows will change the size of the dialog box.</p>
66
+
67
+ <p>Holding a <kbd>shift</kbd> key along with the arrow key will
68
+ make larger changes in the size or position, for either method
69
+ described above.</p>
70
+
71
+ <p>Use <kbd>Tab</kbd> to move among the text, buttons, and links
72
+ within the dialog. The <kbd>Enter</kbd> or <kbd>Space</kbd> key
73
+ activates the focused item. The <kbd>Escape</kbd> key closes the
74
+ dialog, as does clicking outside the dialog box, or clicking the
75
+ "×" icon in the upper right-hand corner of the dialog.</p>
76
+ `;var Us=class extends ss{static post(t){let e=new this(t);return e.attach(),e}},Gc=function(t,e,i,r){function s(n){return n instanceof i?n:new i(function(a){a(n)})}return new(i||(i=Promise))(function(n,a){function o(p){try{d(r.next(p))}catch(E){a(E)}}function h(p){try{d(r.throw(p))}catch(E){a(E)}}function d(p){p.done?n(p.value):s(p.value).then(o,h)}d((r=r.apply(t,e||[])).next())})},Vc=ni.os==="Windows",Xc=Array(40).fill("⠀").join(""),Jr="[data-speech-node]";function ln(t,e=!0){return t.shiftKey&&e||t.metaKey||t.altKey||t.ctrlKey}var po=class extends zh{static helpMessage(t,e,i){return`
77
+ <h2 role="heading" aria-level="2">Exploring expressions ${t}</h2>
78
+
79
+ <p>The mathematics on this page is being rendered by <a
80
+ href="https://www.mathjax.org/" target="_blank">MathJax</a>, which
81
+ generates both the text spoken by screen readers, as well as the
82
+ visual layout for sighted users.</p>
83
+
84
+ <p>Expressions typeset by MathJax can be explored interactively, and
85
+ are focusable. You can use the <kbd>Tab</kbd> key to move to a typeset
86
+ expression${e}. Initially, the expression will be read in full,
87
+ but you can use the following keys to explore the expression
88
+ further:</p>
89
+
90
+ <ul>
91
+
92
+ <li><kbd>Down Arrow</kbd> moves one level deeper into the
93
+ expression to allow you to explore the current subexpression term by
94
+ term.</li>
95
+
96
+ <li><kbd>Up Arrow</kbd> moves back up a level within the
97
+ expression.</li>
98
+
99
+ <li><kbd>Right Arrow</kbd> moves to the next term in the
100
+ current subexpression.</li>
101
+
102
+ <li><kbd>Left Arrow</kbd> moves to the next term in the
103
+ current subexpression.</li>
104
+
105
+ <li><kbd>Shift</kbd>+<kbd>Arrow</kbd> moves to a
106
+ neighboring cell within a table.</li>
107
+
108
+ <li><kbd>0-9</kbd>+<kbd>0-9</kbd> jumps to a cell
109
+ by its index in the table, where 0 = 10.</li>
110
+
111
+ <li><kbd>Home</kbd> takes you to the top of the
112
+ expression.</li>
113
+
114
+ <li><kbd>Enter</kbd> or <kbd>Return</kbd> clicks a
115
+ link or activates an active subexpression.</li>
116
+
117
+ <li><kbd>Space</kbd> opens the MathJax contextual menu
118
+ where you can view or copy the source format of the expression, or
119
+ modify MathJax's settings.</li>
120
+
121
+ <li><kbd>Escape</kbd> exits the expression
122
+ explorer.</li>
123
+
124
+ <li><kbd>x</kbd> gives a summary of the current
125
+ subexpression.</li>
126
+
127
+ <li><kbd>z</kbd> gives the full text of a collapsed
128
+ expression.</li>
129
+
130
+ <li><kbd>d</kbd> gives the current depth within the
131
+ expression.</li>
132
+
133
+ <li><kbd>s</kbd> starts or stops auto-voicing with
134
+ synchronized highlighting.</li>
135
+
136
+ <li><kbd>v</kbd> marks the current position in the
137
+ expression.</li>
138
+
139
+ <li><kbd>p</kbd> cycles through the marked positions in
140
+ the expression.</li>
141
+
142
+ <li><kbd>u</kbd> clears all marked positions and returns
143
+ to the starting position.</li>
144
+
145
+ <li><kbd>&gt;</kbd> cycles through the available speech
146
+ rule sets (MathSpeak, ClearSpeak).</li>
147
+
148
+ <li><kbd>&lt;</kbd> cycles through the verbosity levels
149
+ for the current rule set.</li>
150
+
151
+ <li><kbd>b</kbd> toggles whether Braille notation is combined
152
+ with speech text for tactile Braille devices, as discussed
153
+ below.
154
+
155
+ <li><kbd>h</kbd> produces this help listing.</li>
156
+ </ul>
157
+
158
+ <p>The MathJax contextual menu allows you to enable or disable speech
159
+ or Braille generation for mathematical expressions, the language to
160
+ use for the spoken mathematics, and other features of MathJax. In
161
+ particular, the Explorer submenu allows you to specify how the
162
+ mathematics should be identified in the page (e.g., by saying "math"
163
+ when the expression is spoken), and whether or not to include a
164
+ message about the letter "h" bringing up this dialog box. Turning off
165
+ speech and Braille will disable the expression explorer, its
166
+ highlighting, and its help icon.</p>
167
+
168
+ <p>Support for tactile Braille devices varies across screen readers,
169
+ browsers, and operative systems. If you are using a Braille output
170
+ device, you may need to select the "Combine with Speech" option in the
171
+ contextual menu's Braille submenu in order to obtain Nemeth or Euro
172
+ Braille output rather than the speech text on your Braille
173
+ device. ${i}</p>
174
+
175
+ <p>The contextual menu also provides options for viewing or copying a
176
+ MathML version of the expression or its original source format,
177
+ creating an SVG version of the expression, and viewing various other
178
+ information.</p>
179
+
180
+ <p>Finally, selecting the "Insert Hidden MathML" item from the options
181
+ submenu will turn of MathJax's speech and Braille generation and
182
+ instead use visually hidden MathML that some screen readers can voice,
183
+ though support for this is not universal across all screen readers and
184
+ operating systems. Selecting speech or Braille generation in their
185
+ submenus will remove the hidden MathML again.</p>
186
+
187
+ <p>For more help, see the <a
188
+ href="https://docs.mathjax.org/en/latest/basic/accessibility.html"
189
+ target="_blank">MathJax accessibility documentation.</a></p>
190
+ `}get generators(){return this.item?.generatorPool}get role(){return this.item.ariaRole}get description(){return this.item.roleDescription}get none(){return this.document.options.a11y.brailleSpeech?this.item.brailleNone:this.item.none}get brailleNone(){return this.item.brailleNone}FocusIn(t){if(!t.target.closest("mjx-html")){if(this.item.outputData.nofocus){this.item.outputData.nofocus=!1;return}this.clicked||(this.Start(),this.backTab=t.target===this.img),this.clicked=null}}FocusOut(t){this.current&&!this.focusSpeech&&(this.document.options.keepRegions||(this.setCurrent(null),this.Stop()),document.hasFocus()||this.focusTop())}KeyDown(t){if(this.pendingIndex.shift(),this.region.cancelVoice(),ln(t,!1))return;let e=this.constructor,i=t.key.length===1?t.key.toLowerCase():t.key,[r,s]=e.keyMap.get(i)||[],n=r?s===void 0||this.active?r(this,t):s:this.undefinedKey(t);n||(this.stopEvent(t),n===!1&&this.sound&&this.NoMove())}MouseDown(t){var e;if(this.pendingIndex=[],this.region.cancelVoice(),ln(t)||t.buttons===2){this.item.outputData.nofocus=!0;return}let i=this.findClicked(t.target,t.x,t.y);if(i===this.document.infoIcon){this.stopEvent(t);return}(e=document.getSelection())==null||e.removeAllRanges(),t.target.getAttribute("sre-highlighter-added")?this.refocus=i:this.clicked=i}Click(t){if(ln(t)||t.buttons===2||document.getSelection().type==="Range"){this.FocusOut(null);return}let e=this.findClicked(t.target,t.x,t.y);if(e===this.document.infoIcon){this.stopEvent(t),this.help();return}!this.clicked&&(!e||this.node.contains(e))&&(this.refocus=e,this.triggerLinkMouse()||this.Start())}DblClick(t){let e=document.getSelection().direction??"none";ln(t)||t.buttons===2||e!=="none"?this.FocusOut(null):(this.refocus=this.rootNode(),this.Start())}spaceKey(){return this.refocus=this.current,!0}hKey(){if(!this.document.options.enableExplorerHelp)return!0;this.refocus=this.current,this.help()}escapeKey(t){return t.target.closest("mjx-html")?(this.refocus=t.target.closest(Jr),this.Start()):(this.Stop(),this.focusTop(),this.setCurrent(null)),!0}tabKey(t){let e=this.current??(this.node.contains(document.activeElement)?document.activeElement:null);if(this.tabs.length===0||!e)return!0;if(this.backTab){if(!t.shiftKey)return!0;this.tabTo(this.tabs[this.tabs.length-1]);return}let[i,r,s]=t.shiftKey?[this.tabs.slice(0).reverse(),Node.DOCUMENT_POSITION_PRECEDING,this.current&&this.isLink()?this.getAnchor():e]:[this.tabs,Node.DOCUMENT_POSITION_FOLLOWING,e];for(let n of i)if(s.compareDocumentPosition(n)&r){this.tabTo(n);return}return t.shiftKey&&this.current===this.rootNode()&&this.tabOut(),!0}tabTo(t){t.getAttribute("data-mjx-href")?this.setCurrent(this.linkFor(t)):t.focus()}tabOut(){let t=Array.from(this.node.querySelectorAll("mjx-html"));t.length&&(t.forEach(e=>{e.style.display="none"}),setTimeout(()=>{t.forEach(e=>{e.style.display=""})},0))}enterKey(t){if(this.active)if(this.triggerLinkKeyboard(t))this.Stop();else{let e=this.actionable(this.current);if(e){this.refocus=e,e.dispatchEvent(new Event("click"));return}let i=this.getInternalTabs(this.current).filter(r=>!r.getAttribute("data-mjx-href"));if(i.length){i[0].focus();return}}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){let i=this.tableCell(this.current);if(!i)return!1;let[r,s]=this.cellPosition(i);if(r==null)return!1;let n=this.cellAt(this.cellTable(i),r+t,s+e);if(!n)return!1;this.setCurrent(n)}undefinedKey(t){return!this.active||ln(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(this.marks.length===0){this.setCurrent(this.lastMark||this.rootNode());return}this.currentMark=this.marks.length-1}let t=this.currentMark;this.setCurrent(this.marks[t]),this.currentMark=t-1}clearMarks(){this.marks=[],this.currentMark=-1,this.prevMark()}autoVoice(){let 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()}toggleBraille(){let t=!this.document.options.a11y.brailleCombine;this.document.menu?this.document.menu.menu.pool.lookup("brailleCombine").setValue(t):this.document.options.a11y.brailleCombine=t}numberKey(t){if(!this.tableCell(this.current))return!1;if(t===0&&(t=10),this.pendingIndex.length){let e=this.cellTable(this.tableCell(this.current)),i=this.cellAt(e,this.pendingIndex[0]-1,t-1);if(this.pendingIndex=[],this.speak(String(t)),!i)return!1;setTimeout(()=>this.setCurrent(i),500)}else this.pendingIndex=[null,t],this.speak(`Jump to row ${t} and column`)}depth(){if(this.speechType==="d"){this.setCurrent(this.current);return}this.speechType="d";let t=[[this.node.getAttribute("data-semantic-level")??"Level",this.current.getAttribute("data-semantic-level-number")??"0"].join(" ").trim()],e=this.actionable(this.current);e&&t.unshift(this.node.getAttribute(e.getAttribute("toggle")==="1"?"data-semantic-expandable":"data-semantic-collapsible")??""),this.speak(t.join(" "),this.current.getAttribute(de.BRAILLE))}summary(){if(this.speechType==="x"){this.setCurrent(this.current);return}this.speechType="x";let t=this.current.getAttribute(de.SUMMARY);this.speak(t,this.current.getAttribute(de.BRAILLE),this.SsmlAttributes(this.current,de.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(){let t=this.actionable(this.current);if(!t||!t.getAttribute("data-collapsible")||t.getAttribute("toggle")!=="1"||this.speechType==="z"){this.setCurrent(this.current);return}this.speechType="z";let e=this.nodeId(this.current),i;this.item.root.walkTree(s=>{s.attributes.get("data-semantic-id")===e&&(i=s)});let r=this.item.toMathML(i,this.item);i.isKind("math")||(r=`<math>${r}</math>`),r=r.replace(/ (?:data-semantic-|aria-|data-speech-|data-latex).*?=".*?"/g,""),this.item.speechFor(r).then(([s,n])=>this.speak(s,n))}help(){if(!this.document.options.enableExplorerHelp)return;let t=this.constructor,[e,i,r]=t.helpData.get(ni.os);Us.post({title:"MathJax Expression Explorer Help",message:t.helpMessage(e,i,r),node:this.node,adaptor:this.document.adaptor,styles:{".mjx-dialog":{"max-height":"calc(min(35em, 90%))"},"mjx-dialog mjx-title":{"font-size":"133%",margin:".5em 1.75em"},"mjx-dialog h2":{"font-size":"20px",margin:".5em 0"},"mjx-dialog ul":{"list-style-type":"none"},"mjx-dialog li":{"margin-bottom":".5em"}}})}setCurrent(t,e=!1){if(this.backTab=!1,this.speechType="",document.hasFocus()||(this.refocus=this.current),this.node.setAttribute("aria-busy","true"),this.current){this.pool.unhighlight();for(let i of Array.from(this.node.querySelectorAll(".mjx-selected")))i.classList.remove("mjx-selected");this.document.options.a11y.tabSelects==="last"&&(this.refocus=this.current),t||(this.lastMark=this.current,this.removeSpeech()),this.current=null}if(this.current=t,this.currentMark=-1,this.current){let i=[...this.getSplitNodes(this.current)];this.highlighter.encloseNodes(i,this.node);for(let r of i)r.getAttribute("data-sre-enclosed")||r.classList.add("mjx-selected");this.pool.highlight(i),this.addSpeech(t,e),this.node.setAttribute("tabindex","-1"),this.Update()}this.node.removeAttribute("aria-busy")}getSplitNodes(t){let e=this.nodeId(t);if(!e)return[t];if(this.cacheParts.has(e))return this.cacheParts.get(e);let i=Array.from(this.node.querySelectorAll(`[data-semantic-id="${e}"]`)),r=this.subtree(e,i);return this.cacheParts.set(e,[...i,...r]),this.cacheParts.get(e)}subtree(t,e){let i=this.subtrees.get(t),r=new Set;for(let s of e)Array.from(s.querySelectorAll("[data-semantic-id]")).forEach(n=>r.add(this.nodeId(n)));return[...t2(i,r)].map(s=>this.getNode(s)).filter(s=>s!==null)}addSpeech(t,e){var i;if(!this.document.options.enableSpeech&&!this.document.options.enableBraille)return;this.anchors.length?setTimeout(()=>this.img?.remove(),10):(i=this.img)==null||i.remove();let r=this.addComma([t.getAttribute(de.PREFIX),t.getAttribute(de.SPEECH),t.getAttribute(de.POSTFIX)]).join(" ").trim();if(e){let s=this.description===this.none?"":", "+this.description;this.document.options.a11y.help&&this.document.options.enableExplorerHelp&&(s+=", press h for help"),r+=s}this.speak(r,t.getAttribute(de.BRAILLE),this.SsmlAttributes(t,de.SPEECH_SSML))}addComma(t){return t[2]&&(t[1]||t[0])&&(t[1]+=","),t}removeSpeech(){this.speech&&(this.unspeak(this.speech),this.speech=null,this.img&&this.node.append(this.img),this.node.setAttribute("tabindex",this.tabIndex))}speak(t,e="",i=null,r=this.none){let s=this.speech,n=this.speech=document.createElement("mjx-speech");if(n.setAttribute("role",this.role),n.setAttribute("aria-label",t||this.none),n.setAttribute("aria-roledescription",r||this.none),n.setAttribute(de.SPEECH,t),i&&(n.setAttribute(de.PREFIX_SSML,i[0]||""),n.setAttribute(de.SPEECH_SSML,i[1]||""),n.setAttribute(de.POSTFIX_SSML,i[2]||"")),e&&(this.document.options.a11y.brailleSpeech&&(n.setAttribute("aria-label",e),n.setAttribute("aria-roledescription",this.brailleNone)),n.setAttribute("aria-braillelabel",e),n.setAttribute("aria-brailleroledescription",this.brailleNone),this.document.options.a11y.brailleCombine&&n.setAttribute("aria-label",e+Xc+t)),n.setAttribute("tabindex","0"),Vc){let a=document.createElement("mjx-speech-container");a.setAttribute("role","application"),a.setAttribute("aria-roledescription",this.none),a.setAttribute("aria-brailleroledescription",this.brailleNone),a.append(n),this.node.append(a),n.setAttribute("role","img")}else this.node.append(n);this.focusSpeech=!0,n.focus(),this.focusSpeech=!1,this.Update(),s&&setTimeout(()=>this.unspeak(s),100)}unspeak(t){Vc&&(t=t.parentElement),t.remove()}attachSpeech(){var t;let e=this.item,i=this.node;if(!i.hasAttribute("has-speech")){for(let a of Array.from(i.childNodes))a.setAttribute("aria-hidden","true");i.setAttribute("has-speech","true")}let r=e.roleDescription,s=(i.getAttribute(de.SPEECH)||"")+(r?", "+r:"");(t=this.img)==null||t.remove(),this.img=this.document.adaptor.node("mjx-speech",{"aria-label":s,role:"img","aria-roledescription":e.none});let n=i.getAttribute(de.BRAILLE);n&&(this.document.options.a11y.brailleSpeech&&(this.img.setAttribute("aria-label",n),this.img.setAttribute("aria-roledescription",this.brailleNone)),this.img.setAttribute("aria-braillelabel",n),this.img.setAttribute("aria-brailleroledescription",this.brailleNone),this.document.options.a11y.brailleCombine&&this.img.setAttribute("aria-label",n+Xc+s)),i.appendChild(this.img),this.adjustAnchors(),this.getTabs()}detachSpeech(){var t;let e=this.node;(t=this.img)==null||t.remove(),e.removeAttribute("has-speech");for(let i of Array.from(e.childNodes))i.removeAttribute("aria-hidden");this.restoreAnchors()}adjustAnchors(){this.anchors=Array.from(this.node.querySelectorAll("a[href]"));for(let t of this.anchors){let e=t.getAttribute("href");t.setAttribute("data-mjx-href",e),t.removeAttribute("href")}this.anchors.length&&this.img.setAttribute("tabindex","0")}restoreAnchors(){for(let t of this.anchors)t.setAttribute("href",t.getAttribute("data-mjx-href")),t.removeAttribute("data-mjx-href");this.anchors=[]}getTabs(){this.tabs=this.getInternalTabs(this.node)}getInternalTabs(t){return Array.from(t.querySelectorAll('button, [data-mjx-href], input, select, textarea, [tabindex]:not([tabindex="-1"],mjx-speech)'))}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&&t.getAttribute("data-semantic-type")==="row"}tableCell(t){for(;t&&t!==this.node;){if(this.isCell(t))return t;t=t.parentNode}return null}cellTable(t){let e=this.getParent(t);return this.isRow(e)?this.getParent(e):e}cellPosition(t){let e=this.getParent(t),i=this.childArray(e).indexOf(this.nodeId(t));if(!this.isRow(e))return[i,1];let r=this.getParent(e);return[this.childArray(r).indexOf(this.nodeId(e)),i]}cellAt(t,e,i){let r=this.getNode(this.childArray(t)[e]);return this.isRow(r)?this.getNode(this.childArray(r)[i]):i===1?r:null}firstNode(t){let e=t.getAttribute("data-semantic-owns");if(!e)return t.querySelector(Jr);let i=e.split(/ /);for(let r of i){let s=this.getNode(r);if(s?.hasAttribute("data-speech-node"))return s}return t.querySelector(Jr)}rootNode(){let t=this.node.querySelector("[data-semantic-structure]");if(!t)return this.node.querySelector(Jr);let e=t.getAttribute("data-semantic-structure").split(/ /)[0].replace("(","");return this.getNode(e)}nextSibling(t){let e=this.parentId(t);if(!e)return null;let i=this.getNode(e).getAttribute("data-semantic-owns")?.split(/ /);if(!i)return null;let r=i.indexOf(this.nodeId(t)),s;do s=this.getNode(i[++r]);while(s&&!s.hasAttribute("data-speech-node"));return s}prevSibling(t){let e=this.parentId(t);if(!e)return null;let i=this.getNode(e).getAttribute("data-semantic-owns")?.split(/ /);if(!i)return null;let r=i.indexOf(this.nodeId(t)),s;do s=this.getNode(i[--r]);while(s&&!s.hasAttribute("data-speech-node"));return s}findClicked(t,e,i){let r=this.document.infoIcon;if(r===t||r.contains(t))return r;if(this.node.getAttribute("jax")!=="SVG")return t.closest(Jr);let s=null,n=this.node;for(;n;){n.matches(Jr)&&(s=n);let a=Array.from(n.childNodes);n=null;for(let o of a)if(o!==this.speech&&o!==this.img&&o.tagName&&o.tagName.toLowerCase()!=="rect"){let{left:h,right:d,top:p,bottom:E}=o.getBoundingClientRect();if(h<=e&&e<=d&&p<=i&&i<=E){n=o;break}}}return s}isLink(t=this.current){return!!t?.getAttribute("data-semantic-attributes")?.includes("href:")}getAnchor(t=this.current){let e=t.closest("a");return e&&this.node.contains(e)?e:null}linkFor(t){return t?.querySelector('[data-semantic-attributes*="href:"]')}parentLink(t){let e=t?.closest('[data-semantic-attributes*="href:"]');return e&&this.node.contains(e)?e:null}focusTop(){this.focusSpeech=!0,this.node.focus(),this.focusSpeech=!1}SsmlAttributes(t,e){return[t.getAttribute(de.PREFIX_SSML),t.getAttribute(e),t.getAttribute(de.POSTFIX_SSML)]}restartAfter(t){return Gc(this,void 0,void 0,function*(){yield t,this.attachSpeech();let e=this.current;this.current=null,this.pool.unhighlight(),this.setCurrent(e)})}constructor(t,e,i,r,s,n,a,o){super(t,e,null,r),this.document=t,this.pool=e,this.region=i,this.node=r,this.brailleRegion=s,this.magnifyRegion=n,this.item=o,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.backTab=!1,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)]]),this.subtrees=null,this.cacheParts=new Map}findStartNode(){let t=this.refocus||this.current;return!t&&this.restarted&&(t=this.node.querySelector(this.restarted)),this.refocus=this.restarted=null,t}Start(){let t=Object.create(null,{Start:{get:()=>super.Start}});return Gc(this,void 0,void 0,function*(){if(this.subtrees||(this.subtrees=new Map,this.getSubtrees()),!this.attached||this.active||(this.document.activeItem=this.item,this.item.state()<z.ATTACHSPEECH&&(this.item.attachSpeech(this.document),yield this.generators.promise),this.focusSpeech))return;this.node.classList.add("mjx-explorer-active"),this.document.options.enableExplorerHelp&&this.node.append(this.document.infoIcon);let e=this.findStartNode();this.setCurrent(e||this.rootNode(),!e),t.Start.call(this);let i=this.document.options,r=i.a11y;r.subtitles&&r.speech&&i.enableSpeech&&this.region.Show(this.node),r.viewBraille&&r.braille&&i.enableBraille&&this.brailleRegion.Show(this.node),r.keyMagnifier&&this.magnifyRegion.Show(this.current),this.Update()})}Stop(){this.active&&(this.node.classList.remove("mjx-explorer-active"),this.document.options.enableExplorerHelp&&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.document.options.enableSpeech||this.document.options.enableBraille)&&this.generators.updateRegions(this.speech||this.node,this.region,this.brailleRegion),this.magnifyRegion.Update(this.current))}get tabIndex(){return this.document.options.a11y.inTabOrder?"0":"-1"}Attach(){this.attached||(this.attached=(super.Attach(),this.node.setAttribute("tabindex",this.tabIndex),!0))}Detach(){var t;super.RemoveEvents(),this.node.removeAttribute("role"),this.node.removeAttribute("aria-roledescription"),this.node.removeAttribute("aria-label"),(t=this.img)==null||t.remove(),this.active&&this.node.setAttribute("tabindex",this.tabIndex),this.attached=!1}NoMove(){Gg()}AddEvents(){this.eventsAttached||(this.eventsAttached=(super.AddEvents(),this.addHtmlEvents(),!0))}addHtmlEvents(){for(let t of Array.from(this.node.querySelectorAll("mjx-html"))){let e=i=>{t.contains(document.activeElement)&&(i instanceof KeyboardEvent?(this.clicked=null,i.key!=="Tab"&&i.key!=="Escape"&&i.stopPropagation()):this.clicked=i.target)};t.addEventListener("mousedown",e),t.addEventListener("click",e),t.addEventListener("keydown",e),t.addEventListener("dblclick",e)}}actionable(t){let e=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):!1}triggerLink(t){if(this.isLink(t)){let e=this.getAnchor(t);return e.classList.add("mjx-visited"),setTimeout(()=>this.FocusOut(null),50),window.location.href=e.getAttribute("data-mjx-href"),!0}return!1}triggerLinkMouse(){let t=this.parentLink(this.refocus);return!!this.triggerLink(t)}semanticFocus(){let t=[],e="data-semantic-id",i=this.current||this.refocus||this.node,r=this.actionable(i);r&&(e=r.hasAttribute("data-maction-id")?"data-maction-id":"id",i=r,t.push(Jr));let s=i.getAttribute(e);return s&&t.unshift(`[${e}="${s}"]`),t.join(" ")}getSubtrees(){let t=this.node.querySelector("[data-semantic-structure]");t&&$p(Qg(Zg(t.getAttribute("data-semantic-structure"))),this.subtrees)}};po.helpData=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
191
+ when the expression gets the browser focus, but if not, you can toggle
192
+ focus mode using NVDA+space in NVDA; for JAWS, Enter should start
193
+ forms mode while Numpad Plus leaves it. Also note that you can use
194
+ the NVDA or JAWS key plus the arrow keys to explore the expression
195
+ even in browse mode, and you can use NVDA+shift+arrow keys to
196
+ navigate out of an expression that has the focus in NVDA`,`NVDA users need to select this option, while JAWS users should be able
197
+ to get Braille output without changing this setting.`]],["Unix",["in Unix using Orca",`, and Orca should enter focus mode automatically. If not, use the
198
+ Orca+a key to toggle focus mode on or off. Also note that you can use
199
+ Orca+arrow keys to explore expressions even in browse mode`,""]],["unknown",["with a Screen Reader.","",""]]]),po.keyMap=new Map([["Tab",[(t,e)=>t.tabKey(e)]],["Escape",[(t,e)=>t.escapeKey(e)]],["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]],["b",[t=>t.toggleBraille(),!1]],...[..."0123456789"].map(t=>[t,[e=>e.numberKey(parseInt(t)),!1]])]);function Zg(t){return t.replace(/\(/g," ( ").replace(/\)/g," ) ").trim().split(/\s+/)}function Qg(t){let e=[[]];for(let i of t)if(i==="("){let r=[];e[e.length-1].push(r),e.push(r)}else i===")"?e.pop():e[e.length-1].push(i);return e[0][0]}function $p(t,e){if(typeof t=="string")return e.has(t)||e.set(t,new Set),new Set;let[i,...r]=t,s=i,n=new Set;for(let a of r){let o=typeof a=="string"?a:a[0],h=$p(a,e);n.add(o),h.forEach(d=>n.add(d))}return e.set(s,n),n}function t2(t,e){return t?e?new Set([...t].filter(i=>!e.has(i))):t:new Set}var e2=class extends zh{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()}},qh=class extends e2{constructor(t,e,i,r,s,n){super(t,e,i,r),this.document=t,this.pool=e,this.region=i,this.node=r,this.nodeQuery=s,this.nodeAccess=n}MouseOut(t){this.highlighter.unhighlight(),this.region.Hide(),super.MouseOut(t)}MouseOver(t){super.MouseOver(t);let e=t.target,[i,r]=this.getNode(e);i&&(this.highlighter.unhighlight(),this.highlighter.highlight([i]),this.region.Update(r),this.region.Show(i))}getNode(t){let 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)];let i=t.childNodes[0];t=i&&i.tagName==="defs"?t.childNodes[1]:i}return[null,null]}},Yo=class extends qh{},i2=class extends qh{},r2=class extends qh{constructor(t,e,i,r){super(t,e,new Vp(t),r,s=>this.highlighter.isMactionNode(s),()=>{}),this.document=t,this.pool=e,this.node=r}},Kp=class extends zh{constructor(t,e,i,r,s){super(t,e,null,r),this.document=t,this.pool=e,this.region=i,this.node=r,this.mml=s,this.stoppable=!1}Attach(){super.Attach(),this.Start()}Detach(){this.Stop(),super.Detach()}},s2=class extends Kp{Start(){this.active||(this.active=!0,this.highlighter.highlightAll(this.node))}Stop(){this.active&&this.highlighter.unhighlightAll(),this.active=!1}},n2=class extends Kp{constructor(){super(...arguments),this.contrast=new a2,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(let 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){let e=this.modality+"-old";t.hasAttribute(e)&&(t.style.color=t.getAttribute(e))}},a2=class Jp{constructor(){this.hue=10,this.sat=100,this.light=50,this.incr=53}generate(){return Jp.hsl2rgb(this.hue,this.sat,this.light)}increment(){this.hue=(this.hue+this.incr)%360}static hsl2rgb(e,i,r){i=i>1?i/100:i,r=r>1?r/100:r;let s=(1-Math.abs(2*r-1))*i,n=s*(1-Math.abs(e/60%2-1)),a=r-s/2,o=0,h=0,d=0;return 0<=e&&e<60?[o,h,d]=[s,n,0]:60<=e&&e<120?[o,h,d]=[n,s,0]:120<=e&&e<180?[o,h,d]=[0,s,n]:180<=e&&e<240?[o,h,d]=[0,n,s]:240<=e&&e<300?[o,h,d]=[n,0,s]:300<=e&&e<360&&([o,h,d]=[s,0,n]),`rgb(${(o+a)*255}, ${(h+a)*255}, ${(d+a)*255})`}},o2={color:"blue",alpha:.2},l2={color:"black",alpha:1},Fr={ENCLOSED:"data-sre-enclosed",BBOX:"data-sre-highlighter-bbox",ADDED:"data-sre-highlighter-added"},Yp=class{constructor(t){this.currentHighlights=[],this.priority=t,this.ATTR="data-sre-highlight-"+t}highlight(t){this.currentHighlights.push(t);for(let e of t)this.highlightNode(e),this.setHighlighted(e)}highlightAll(t){let e=this.getMactionNodes(t);for(let i of e)this.highlight([i])}unhighlight(){let t=this.currentHighlights.pop();t&&t.forEach(e=>{this.isHighlighted(e)&&(this.unhighlightNode(e),this.unsetHighlighted(e))})}unhighlightAll(){for(;this.currentHighlights.length>0;)this.unhighlight()}encloseNodes(t,e){if(t.length===1)return t;let i=this.constructor,r=i.lineSelector,s=i.lineAttr,n=new Map;for(let a of t){let o=a.closest(r),h=o?o.getAttribute(s):"";n.has(h)||n.set(h,[]),n.get(h).push(a)}for(let a of n.values())if(a.length>1){let[o,h,d,p]=[1/0,1/0,-1/0,-1/0];for(let y of a){y.setAttribute(Fr.ENCLOSED,"true");let{left:A,top:w,right:_,bottom:U}=y.getBoundingClientRect();w===U&&A===_||(A<o&&(o=A),w<h&&(h=w),U>p&&(p=U),_>d&&(d=_))}let E=this.createEnclosure(o,p,d-o,p-h,e,a[0]);t.push(E)}return t}setColorCSS(t,e,i){let r=e.color??i.color,s=e.alpha??i.alpha;Di.setColor(t,this.priority,r,s)}setColor(t,e){this.setColorCSS("fg",e,l2),this.setColorCSS("bg",t,o2)}isHighlighted(t){return t.hasAttribute(this.ATTR)}setHighlighted(t){t.setAttribute(this.ATTR,"true")}unsetHighlighted(t){t.removeAttribute(this.ATTR),t.removeAttribute(Fr.ENCLOSED)}},Kl=class extends Yp{highlightNode(t){if(this.isHighlighted(t)||t.tagName==="svg"||t.tagName==="MJX-CONTAINER"||t.hasAttribute(Fr.BBOX)||t.hasAttribute(Fr.ENCLOSED))return;let{x:e,y:i,width:r,height:s}=t.getBBox(),n=this.createRect(e,i,r,s,t.getAttribute("transform"));this.setHighlighted(n),t.parentNode.insertBefore(n,t)}unhighlightNode(t){if(t.hasAttribute(Fr.BBOX)){t.remove();return}let e=t.previousSibling;e?.hasAttribute(Fr.ADDED)&&e.remove()}createEnclosure(t,e,i,r,s,n){let[a,o]=this.screen2svg(t,e,n),[h,d]=this.screen2svg(t+i,e-r,n),p=this.createRect(a,o,h-a,d-o,n.getAttribute("transform"));return p.setAttribute(Fr.BBOX,"true"),n.parentNode.insertBefore(p,n),p}screen2svg(t,e,i){let r=i,s=DOMPoint.fromPoint({x:t,y:e}).matrixTransform(r.getScreenCTM().inverse());return[s.x,s.y]}createRect(t,e,i,r,s){let n=document.createElementNS("http://www.w3.org/2000/svg","rect");return n.setAttribute(Fr.ADDED,"true"),n.setAttribute("x",String(t-40)),n.setAttribute("y",String(e-40)),n.setAttribute("width",String(i+80)),n.setAttribute("height",String(r+80)),s&&n.setAttribute("transform",s),n}isMactionNode(t){return t.getAttribute("data-mml-node")==="maction"}getMactionNodes(t){return Array.from(t.querySelectorAll('[data-mml-node="maction"]'))}};Kl.lineSelector="[data-mjx-linebox]",Kl.lineAttr="data-mjx-lineno";var mo=class extends Yp{highlightNode(t){}unhighlightNode(t){t.tagName.toLowerCase()==="mjx-bbox"&&t.remove()}createEnclosure(t,e,i,r,s){let n=s.getBoundingClientRect(),a=document.createElement("mjx-bbox");return a.style.width=i+"px",a.style.height=r+"px",a.style.left=t-n.left+"px",a.style.top=e-r-n.top+"px",a.style.position="absolute",s.prepend(a),a}isMactionNode(t){return t.tagName?.toLowerCase()==="mjx-maction"}getMactionNodes(t){return Array.from(t.querySelectorAll("mjx-maction"))}};mo.lineSelector="mjx-linebox",mo.lineAttr="lineno";function $c(t,e,i,r){let s=new h2[r](t);return s.setColor(e,i),s}var h2={SVG:Kl,CHTML:mo,generic:mo},c2=class{constructor(t){this.document=t,this.speechRegion=new Wh(this.document),this.brailleRegion=new Di(this.document),this.magnifier=new ds(this.document),this.tooltip1=new Er(this.document),this.tooltip2=new Er(this.document),this.tooltip3=new Er(this.document)}},Kc={speech:(t,e,i,...r)=>{let s=po.create(t,e,t.explorerRegions.speechRegion,i,t.explorerRegions.brailleRegion,t.explorerRegions.magnifier,r[0],r[1]);return s.sound=!0,s},mouseMagnifier:(t,e,i,...r)=>i2.create(t,e,t.explorerRegions.magnifier,i,s=>s.hasAttribute("data-semantic-type"),s=>s),hover:(t,e,i,...r)=>r2.create(t,e,null,i),infoType:(t,e,i,...r)=>Yo.create(t,e,t.explorerRegions.tooltip1,i,s=>s.hasAttribute("data-semantic-type"),s=>s.getAttribute("data-semantic-type")),infoRole:(t,e,i,...r)=>Yo.create(t,e,t.explorerRegions.tooltip2,i,s=>s.hasAttribute("data-semantic-role"),s=>s.getAttribute("data-semantic-role")),infoPrefix:(t,e,i,...r)=>Yo.create(t,e,t.explorerRegions.tooltip3,i,s=>s.hasAttribute?.call(s,"data-semantic-prefix-none"),s=>s.getAttribute?.call(s,"data-semantic-prefix-none")),flame:(t,e,i,...r)=>s2.create(t,e,null,i),treeColoring:(t,e,i,...r)=>n2.create(t,e,null,i,...r)},d2=class{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;let[t,e]=this.colorOptions();return this._highlighter.setColor(e,t),this._highlighter}init(t,e,i,r){this.document=t,this.mml=i,this.node=e,this.setPrimaryHighlighter();for(let s of Object.keys(Kc))this.explorers[s]=Kc[s](this.document,this,this.node,this.mml,r);this.setSecondaryHighlighter(),this.attach()}attach(){this.attached=[];let t=[],e=this.document.options.a11y;for(let[i,r]of Object.entries(this.explorers)){if(r instanceof po){r.stoppable=!1,t.unshift(r),this.speechExplorerKeys.some(s=>this.document.options.a11y[s])?(r.Attach(),this.attached.push(i)):r.Detach();continue}e[i]||i==="speech"&&(e.braille||e.keyMagnifier)?(r.Attach(),this.attached.push(i)):r.Detach()}for(let i of t)if(i.attached){i.stoppable=!0;break}}reattach(){for(let t of this.attached){let e=this.explorers[t];e.active&&(this._restart.push(t),e.Stop())}}restart(){this._restart.forEach(t=>{this.explorers[t].Start()}),this._restart=[]}setPrimaryHighlighter(){let[t,e]=this.colorOptions();this._highlighter=$c(Di.priority.primary,e,t,this.document.outputJax.name)}setSecondaryHighlighter(){this.secondaryHighlighter=$c(Di.priority.secondary,{color:"red",alpha:.8},{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(){let t=this.document.options.a11y;return[{color:t.foregroundColor.toLowerCase(),alpha:t.foregroundOpacity/100},{color:t.backgroundColor.toLowerCase(),alpha:t.backgroundOpacity/100}]}},u2=wh({ExplorerHandler:()=>t1,ExplorerMathDocumentMixin:()=>Qp,ExplorerMathItemMixin:()=>Zp,setA11yOption:()=>e1,setA11yOptions:()=>m2}),p2=ni.os==="Unix";Js("EXPLORER",z.INSERTED+30);function Zp(t,e){var i=class extends t{constructor(){super(...arguments),this.refocus=null}get ariaRole(){return this.constructor.ariaRole}get roleDescription(){let r=this.constructor;return r.roleDescription==="none"?r.none:r.roleDescription}get none(){return this.constructor.none}get brailleNone(){return this.constructor.brailleNone}attachSpeech(r){var s;super.attachSpeech(r),(s=this.outputData.speechPromise?.then(()=>this.explorers.speech.attachSpeech()))==null||s.then(()=>{this.explorers?.speech&&(this.explorers.speech.restarted=this.refocus),this.refocus=null,this.explorers&&this.explorers.restart()})}detachSpeech(r){super.detachSpeech(r),this.explorers.speech.detachSpeech()}explorable(r,s=!1){if(!(this.state()>=z.EXPLORER)){if(!this.isEscaped&&(r.options.enableExplorer||s)){let n=this.typesetRoot,a=e(this.root);this.explorers||(this.explorers=new d2),this.explorers.init(r,n,a,this)}this.state(z.EXPLORER)}}state(r=null,s=!1){if(r<z.EXPLORER&&this.explorers)for(let n of Object.values(this.explorers.explorers))n.active&&n.Stop();return super.state(r,s)}rerender(r,s=z.RERENDER){let n=this.setTemporaryFocus(r);super.rerender(r,s),this.clearTemporaryFocus(n)}setTemporaryFocus(r){let s=null;if(this.explorers){let n=this.explorers.speech;if(s=n?.attached?r.tmpFocus:null,s){this.refocus=n.semanticFocus()??null;let a=r.adaptor;a.append(a.body(),s)}this.explorers.reattach(),s?.focus()}return s}clearTemporaryFocus(r){r&&(this.outputData.speechPromise??Promise.resolve()).then(()=>setTimeout(()=>r.remove(),100))}};return i.ariaRole=p2?"tree":"application",i.roleDescription="math",i.none="‘",i.brailleNone="⠀",i}function Qp(t){var e=class extends t{constructor(...i){super(...i),this.explorerRegions=null,this.activeItem=null;let r=this.constructor.ProcessBits;r.has("explorer")||r.allocate("explorer");let s=new Lo(this.mmlFactory),n=p=>s.visitTree(p),a=this.options;a.a11y.speechRules||(a.a11y.speechRules=`${a.sre.domain}-${a.sre.style}`);let o=a.MathItem=Zp(a.MathItem,n);o.roleDescription=a.roleDescription,this.explorerRegions=new c2(this),"addStyles"in this&&this.addStyles(this.constructor.speechStyles);let h=this.adaptor,d="http://www.w3.org/2000/svg";this.infoIcon=h.node("mjx-help",{},[h.node("svg",{viewBox:"0 0 18 18",xmlns:d,"aria-hidden":"true"},[h.node("circle",{stroke:"none"},[],d),h.node("circle",{},[],d),h.node("line",{x1:9,y1:9,x2:9,y2:13},[],d),h.node("line",{x1:9,y1:5.5,x2:9,y2:5.5},[],d)],d)]),this.tmpFocus=h.node("mjx-focus",{tabIndex:0,style:{outline:"none",display:"block",position:"absolute",top:0,left:"-10px",width:"1px",height:"1px",overflow:"hidden"},role:o.ariaRole,"aria-label":o.none,"aria-roledescription":o.none})}explorable(){if(!this.processed.isSet("explorer")){if(this.options.enableExplorer)for(let i of this.math)i.explorable(this);this.processed.set("explorer")}return this}rerender(i){let r=this.activeItem,s=r?.setTemporaryFocus(this);return super.rerender(i),r?.clearTemporaryFocus(s),this}state(i,r=!1){return super.state(i,r),i<z.EXPLORER&&this.processed.clear("explorer"),this}};return e.OPTIONS=Object.assign(Object.assign({},t.OPTIONS),{enableExplorer:Ta,enableExplorerHelp:!0,renderActions:qe(Object.assign(Object.assign({},t.OPTIONS.renderActions),{explorable:[z.EXPLORER]})),sre:qe(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,brailleSpeech:!1,brailleCombine:!1,help:!0,roleDescription:"math",inTabOrder:!0,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 a[data-mjx-href]":{color:"LinkText",cursor:"pointer"},"mjx-container a[data-mjx-href].mjx-visited":{color:"VisitedText"},"mjx-container > mjx-help":{display:"none",position:"absolute",top:"-.3em",right:"-.5em",width:".6em",height:".6em",cursor:"pointer"},'mjx-container[display="true"] > mjx-help':{position:"sticky",inset:"-100% 0 100% 0",margin:"-.3em -.5em 0 -.1em",right:0,top:"initial"},"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:"var(--mjx-bg1-color)",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"},"@media (prefers-color-scheme: dark) /* explorer */":{"mjx-help > svg":{stroke:"#E0E0E0"},"mjx-help > svg > circle":{fill:"#404040"},"mjx-help > svg > circle:nth-child(2)":{fill:"rgba(132, 132, 255, .3)"},"mjx-help:hover > svg > circle:nth-child(2)":{stroke:"#AAAAAA",fill:"#404040"}}},e}function t1(t,e=null){return t.documentClass.prototype.attachSpeech||(t=Gp(t,e)),t.documentClass=Qp(t.documentClass),t}function m2(t,e){var i;let r=Ig();for(let s in e)t.options.a11y[s]===void 0?r[s]!==void 0&&(t.options.sre[s]=e[s]):e1(t,s,e[s]);e.roleDescription&&(t.options.MathItem.roleDescription=e.roleDescription);for(let s of t.math)(i=s?.explorers)==null||i.attach()}function e1(t,e,i){switch(e){case"speechRules":{let[r,s]=i.split("-");t.options.sre.domain=r,t.options.sre.style=s;break}case"magnification":switch(i){case"None":t.options.a11y.magnification=i,t.options.a11y.keyMagnifier=!1,t.options.a11y.mouseMagnifier=!1;break;case"Keyboard":t.options.a11y.magnification=i,t.options.a11y.keyMagnifier=!0,t.options.a11y.mouseMagnifier=!1;break;case"Mouse":t.options.a11y.magnification=i,t.options.a11y.keyMagnifier=!1,t.options.a11y.mouseMagnifier=!0}break;case"highlight":switch(i){case"None":t.options.a11y.highlight=i,t.options.a11y.hover=!1,t.options.a11y.flame=!1;break;case"Hover":t.options.a11y.highlight=i,t.options.a11y.hover=!0,t.options.a11y.flame=!1;break;case"Flame":t.options.a11y.highlight=i,t.options.a11y.hover=!1,t.options.a11y.flame=!0}break;case"locale":t.options.sre.locale=i;break;default:t.options.a11y[e]=i}}var f2=class{constructor(t=null){this.canMeasureNodes=!0,this.document=t}node(t,e={},i=[],r){let s=this.create(t,r);this.setAttributes(s,e);for(let n of i)this.append(s,n);return s}setProperty(t,e,i){t[e]=i}getProperty(t,e){return t[e]}setAttributes(t,e){if(e.style&&typeof e.style!="string")for(let i of Object.keys(e.style))this.setStyle(t,i.replace(/-([a-z])/g,(r,s)=>s.toUpperCase()),e.style[i]);if(e.properties)for(let i of Object.keys(e.properties))t[i]=e.properties[i];for(let i of Object.keys(e))(i!=="style"||typeof e.style=="string")&&i!=="properties"&&this.setAttribute(t,i,e[i])}replace(t,e){return this.insert(t,e),this.remove(e),e}childNode(t,e){return this.childNodes(t)[e]}allClasses(t){let e=this.getAttribute(t,"class");return e?e.replace(/ +/g," ").replace(/^ /,"").replace(/ $/,"").split(/ /):[]}cssText(t){return this.kind(t)==="style"?this.textContent(t):""}},g2=function(t,e,i,r){function s(n){return n instanceof i?n:new i(function(a){a(n)})}return new(i||(i=Promise))(function(n,a){function o(p){try{d(r.next(p))}catch(E){a(E)}}function h(p){try{d(r.throw(p))}catch(E){a(E)}}function d(p){p.done?n(p.value):s(p.value).then(o,h)}d((r=r.apply(t,e||[])).next())})},i1=class extends f2{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,i=null){let r=i?t.getElementsByTagNameNS(i,e):t.getElementsByTagName(e);return Array.from(r)}getElements(t,e){let i=[];for(let r of t)typeof r=="string"?i=i.concat(Array.from(this.document.querySelectorAll(r))):Array.isArray(r)||r instanceof this.window.NodeList||r instanceof this.window.HTMLCollection?i=i.concat(Array.from(r)):i.push(r);return i}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){let e=t.nodeType;return e===1||e===3||e===8?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,i,r=null){return r?(e=r.replace(/.*\//,"")+":"+e.replace(/^.*:/,""),t.setAttributeNS(r,e,i)):(e==="style"&&(i=i.replace(/\n/g," ")),t.setAttribute(e,i))}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(e=>({name:e.name,value:e.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(i=>i!==e).join(" ")}hasClass(t,e){return t.classList?t.classList.contains(e):t.className.split(/ /).includes(e)}setStyle(t,e,i){t.style[e]=String(i).replace(/\n/g," ")}getStyle(t,e){return t.style[e]}allStyles(t){return t.style.cssText}insertRules(t,e){for(let i of e)try{t.sheet.insertRule(i,t.sheet.cssRules.length)}catch(r){console.warn(`MathJax: can't insert css rule '${i}': ${r.message}`)}}cssText(t){return this.kind(t)==="style"?Array.from(t.sheet.cssRules).map(e=>e.cssText).join(`
200
+ `):""}fontSize(t){let e=this.window.getComputedStyle(t);return parseFloat(e.fontSize||String(this.constructor.DEFAULT_FONT_SIZE))}fontFamily(t){return this.window.getComputedStyle(t).fontFamily||""}nodeSize(t,e=1,i=!1){if(i&&t.getBBox){let{width:r,height:s}=t.getBBox();return[r/e,s/e]}return[t.offsetWidth/e,t.offsetHeight/e]}nodeBBox(t){let{left:e,right:i,top:r,bottom:s}=t.getBoundingClientRect();return{left:e,right:i,top:r,bottom:s}}createWorker(t,e){return g2(this,void 0,void 0,function*(){let{path:i,maps:r,worker:s}=e,n=`${i}/${s}`,a=`
201
+ self.maps = '${Jc(r)}';
202
+ importScripts('${Jc(n)}');
203
+ `,o=URL.createObjectURL(new Blob([a],{type:"text/javascript"})),h=new Worker(o);return h.onmessage=t,URL.revokeObjectURL(o),h})}};i1.DEFAULT_FONT_SIZE=16;function Jc(t){return[...t].map(e=>(e==="\\"||e==="'"?e="\\"+e:(e<" "||e>"~")&&(e=`\\u{${e.codePointAt(0).toString(16)}}`),e)).join("")}function b2(){return new i1(window)}var Gr=class extends Tr{constructor(t=null){super(),t&&this.addList(t)}addList(t){for(let e of t)Array.isArray(e)?this.add(e[0],e[1]):this.add(e)}execute(...t){for(let e of this)if(e.item(...t)===!1)return!1;return!0}asyncExecute(...t){let e=-1,i=this.items;return new Promise((r,s)=>{(function n(){for(;++e<i.length;){let a=i[e].item(...t);if(a instanceof Promise){a.then(n).catch(o=>s(o));return}if(a===!1){r(!1);return}}r(!0)})()})}},Es=class{constructor(t={}){this.adaptor=null,this.mmlFactory=null;let e=this.constructor;this.options=fi(Xe({},e.OPTIONS),t),this.preFilters=new Gr(this.options.preFilters),this.postFilters=new Gr(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,i,r){let s={math:e,document:i,data:r};return t.execute(s),s.data}};Es.NAME="generic",Es.OPTIONS={preFilters:[],postFilters:[]};var Vn=class{constructor(t={}){this.adaptor=null;let e=this.constructor;this.options=fi(Xe({},e.OPTIONS),t),this.preFilters=new Gr(this.options.preFilters),this.postFilters=new Gr(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,i,r){let s={math:e,document:i,data:r};return t.execute(s),s.data}};Vn.NAME="generic",Vn.OPTIONS={preFilters:[],postFilters:[]};var Gi=Symbol(),la=class{constructor(t=null){this.next=null,this.prev=null,this.data=t}},E2=class r1{constructor(...e){this.list=new la(Gi),this.list.next=this.list.prev=this.list,this.push(...e)}isBefore(e,i){return e<i}push(...e){for(let i of e){let r=new la(i);r.next=this.list,r.prev=this.list.prev,this.list.prev=r,r.prev.next=r}return this}pop(){let e=this.list.prev;return e.data===Gi?null:(this.list.prev=e.prev,e.prev.next=this.list,e.next=e.prev=null,e.data)}unshift(...e){for(let i of e.slice(0).reverse()){let r=new la(i);r.next=this.list.next,r.prev=this.list,this.list.next=r,r.next.prev=r}return this}shift(){let e=this.list.next;return e.data===Gi?null:(this.list.next=e.next,e.next.prev=this.list,e.next=e.prev=null,e.data)}remove(...e){let i=new Map;for(let s of e)i.set(s,!0);let r=this.list.next;for(;r.data!==Gi;){let s=r.next;i.has(r.data)&&(r.prev.next=r.next,r.next.prev=r.prev,r.next=r.prev=null),r=s}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 e=this.list.next;for(;e.data!==Gi;)yield e.data,e=e.next}*reversed(){let e=this.list.prev;for(;e.data!==Gi;)yield e.data,e=e.prev}insert(e,i=null){i===null&&(i=this.isBefore.bind(this));let r=new la(e),s=this.list.next;for(;s.data!==Gi&&i(s.data,r.data);)s=s.next;return r.prev=s.prev,r.next=s,s.prev.next=s.prev=r,this}sort(e=null){e===null&&(e=this.isBefore.bind(this));let i=[];for(let r of this)i.push(new r1(r));for(this.list.next=this.list.prev=this.list;i.length>1;){let r=i.shift(),s=i.shift();r.merge(s,e),i.push(r)}return i.length&&(this.list=i[0].list),this}merge(e,i=null){i===null&&(i=this.isBefore.bind(this));let r=this.list.next,s=e.list.next;for(;r.data!==Gi&&s.data!==Gi;)i(s.data,r.data)?([s.prev.next,r.prev.next]=[r,s],[s.prev,r.prev]=[r.prev,s.prev],[this.list.prev.next,e.list.prev.next]=[e.list,this.list],[this.list.prev,e.list.prev]=[e.list.prev,this.list.prev],[r,s]=[s.next,r]):r=r.next;return s.data!==Gi&&(this.list.prev.next=e.list.next,e.list.next.prev=this.list.prev,e.list.prev.next=this.list,this.list.prev=e.list.prev,e.list.next=e.list.prev=e.list),this}},s1=class extends E2{isBefore(t,e){return t.start.i<e.start.i||t.start.i===e.start.i&&t.start.n<e.start.n}},Ia=class n1{constructor(){this.bits=0}static allocate(...e){for(let i of e){if(this.has(i))throw Error("Bit already allocated for "+i);if(this.next===n1.MAXBIT)throw Error("Maximum number of bits already allocated");this.names.set(i,this.next),this.next<<=1}}static has(e){return this.names.has(e)}set(e){this.bits|=this.getBit(e)}clear(e){this.bits&=~this.getBit(e)}isSet(e){return!!(this.bits&this.getBit(e))}reset(){this.bits=0}getBit(e){let i=this.constructor.names.get(e);if(!i)throw Error("Unknown bit-field name: "+e);return i}};Ia.MAXBIT=1<<31,Ia.next=1,Ia.names=new Map;function y2(...t){let e=class extends Ia{};return e.allocate(...t),e}var Zo=function(t,e,i,r){function s(n){return n instanceof i?n:new i(function(a){a(n)})}return new(i||(i=Promise))(function(n,a){function o(p){try{d(r.next(p))}catch(E){a(E)}}function h(p){try{d(r.throw(p))}catch(E){a(E)}}function d(p){p.done?n(p.value):s(p.value).then(o,h)}d((r=r.apply(t,e||[])).next())})},Yc=class extends Tr{static create(t){let e=new this;for(let i of Object.keys(t)){let[r,s]=this.action(i,t[i]);s&&e.add(r,s)}return e}static action(t,e){let i,r,s=!0,n=e[0];if(e.length===1||typeof e[1]=="boolean")e.length===2&&(s=e[1]),[i,r]=this.methodActions(t);else if(typeof e[1]=="string")if(typeof e[2]=="string"){e.length===4&&(s=e[3]);let[a,o]=e.slice(1);[i,r]=this.methodActions(a,o)}else e.length===3&&(s=e[2]),[i,r]=this.methodActions(e[1]);else e.length===4&&(s=e[3]),[i,r]=e.slice(1);return[{id:t,renderDoc:i,renderMath:r,convert:s},n]}static methodActions(t,e=t){return[i=>(t&&i[t](),!1),(i,r)=>(e&&i[e](r),!1)]}renderDoc(t,e=z.UNPROCESSED){for(let i of this.items)if(i.priority>=e&&i.item.renderDoc(t))return}renderMath(t,e,i=z.UNPROCESSED){for(let r of this.items)if(r.priority>=i&&r.item.renderMath(t,e))return}renderConvert(t,e,i=z.LAST){for(let r of this.items)if(r.priority>i||r.item.convert&&r.item.renderMath(t,e))return}findID(t){for(let e of this.items)if(e.item.id===t)return e.item;return null}},x2={all:!1,processed:!1,inputJax:null,outputJax:null},N2={all:!0,processed:!0,inputJax:[],outputJax:[]},v2=class extends Es{compile(t){return null}},T2=class extends Vn{typeset(t,e=null){return null}escaped(t,e){return null}},a1=class extends s1{},C2=class extends _u{},gs=class o1{constructor(e,i,r){let s=this.constructor;this.document=e,this.options=fi(Xe({},s.OPTIONS),r),this.math=new(this.options.MathList||a1),this.renderActions=Yc.create(this.options.renderActions),this._actionPromises=[],this._readyPromise=Promise.resolve(),this.processed=new o1.ProcessBits,this.outputJax=this.options.OutputJax||new T2;let n=this.options.InputJax||[new v2];Array.isArray(n)||(n=[n]),this.inputJax=n,this.adaptor=i,this.outputJax.setAdaptor(i),this.inputJax.map(a=>a.setAdaptor(i)),this.mmlFactory=this.options.MmlFactory||new kh,this.inputJax.map(a=>a.setMmlFactory(this.mmlFactory)),this.outputJax.initialize(),this.inputJax.map(a=>a.initialize())}get kind(){return this.constructor.KIND}addRenderAction(e,...i){let[r,s]=Yc.action(e,i);this.renderActions.add(r,s)}removeRenderAction(e){let i=this.renderActions.findID(e);i&&this.renderActions.remove(i)}render(){return this.clearPromises(),this.renderActions.renderDoc(this),this}renderPromise(){return this.whenReady(()=>va(()=>Zo(this,void 0,void 0,function*(){return this.render(),yield this.actionPromises(),this.clearPromises(),this})))}rerender(e=z.RERENDER){return this.state(e-1),this.render(),this}rerenderPromise(e=z.RERENDER){return this.whenReady(()=>va(()=>Zo(this,void 0,void 0,function*(){return this.rerender(e),yield this.actionPromises(),this.clearPromises(),this})))}convert(e,i={}){let{format:r,display:s,end:n,ex:a,em:o,containerWidth:h,scale:d,family:p}=fi({format:this.inputJax[0].name,display:!0,end:z.LAST,em:16,ex:8,containerWidth:null,scale:1,family:""},i);h===null&&(h=80*a);let E=this.inputJax.reduce((A,w)=>w.name===r?w:A,null),y=new this.options.MathItem(e,E,s);return y.start.node=this.adaptor.body(this.document),y.setMetrics(o,a,h,d),p&&this.outputJax.options.mtextInheritFont&&(y.outputData.mtextFamily=p),p&&this.outputJax.options.merrorInheritFont&&(y.outputData.merrorFamily=p),this.clearPromises(),y.convert(this,n),y.typesetRoot||y.root}convertPromise(e,i={}){return this.whenReady(()=>va(()=>Zo(this,void 0,void 0,function*(){let r=this.convert(e,i);return yield this.actionPromises(),this.clearPromises(),r})))}whenReady(e){return this._readyPromise=this._readyPromise.catch(i=>{}).then(()=>{let i=this._readyPromise;this._readyPromise=Promise.resolve();let r=e(),s=this._readyPromise.then(()=>r);return this._readyPromise=i,s})}actionPromises(){return Promise.all(this._actionPromises)}clearPromises(){this._actionPromises=[]}savePromise(e){this._actionPromises.push(e)}findMath(e=null){return this.processed.set("findMath"),this}compile(){if(!this.processed.isSet("compile")){let e=[];for(let i of this.math)this.compileMath(i),i.inputData.recompile!==void 0&&e.push(i);for(let i of e){let r=i.inputData.recompile;i.state(r.state),i.inputData.recompile=r,this.compileMath(i)}this.processed.set("compile")}return this}compileMath(e){try{e.compile(this)}catch(i){if(i.retry||i.restart)throw i;this.options.compileError(this,e,i),e.inputData.error=i}}compileError(e,i){e.root=this.mmlFactory.create("math",null,[this.mmlFactory.create("merror",{"data-mjx-error":i.message,title:i.message},[this.mmlFactory.create("mtext",null,[this.mmlFactory.create("text").setText("Math input error")])])]),e.display&&e.root.attributes.set("display","block"),e.inputData.error=i.message}typeset(){if(!this.processed.isSet("typeset")){for(let e of this.math)try{e.typeset(this)}catch(i){if(i.retry||i.restart)throw i;this.options.typesetError(this,e,i),e.outputData.error=i}this.processed.set("typeset")}return this}typesetError(e,i){e.typesetRoot=this.adaptor.node("mjx-container",{class:"MathJax mjx-output-error",jax:this.outputJax.name},[this.adaptor.node("span",{"data-mjx-error":i.message,title:i.message,style:{color:"red","background-color":"yellow","line-height":"normal"}},[this.adaptor.text("Math output error")])]),e.display&&this.adaptor.setAttributes(e.typesetRoot,{style:{display:"block",margin:"1em 0","text-align":"center"}}),e.outputData.error=i.message}getMetrics(){return this.processed.isSet("getMetrics")||(this.outputJax.getMetrics(this),this.processed.set("getMetrics")),this}updateDocument(){if(!this.processed.isSet("updateDocument")){for(let e of this.math.reversed())e.updateDocument(this);this.processed.set("updateDocument")}return this}removeFromDocument(e=!1){return this}state(e,i=!1){for(let r of this.math)r.state(e,i);return e<z.INSERTED&&this.processed.clear("updateDocument"),e<z.TYPESET&&(this.processed.clear("typeset"),this.processed.clear("getMetrics")),e<z.COMPILED&&this.processed.clear("compile"),e<z.FINDMATH&&this.processed.clear("findMath"),this}reset(e={processed:!0}){return e=fi(Object.assign({},x2),e),e.all&&Object.assign(e,N2),e.processed&&this.processed.reset(),e.inputJax&&this.inputJax.forEach(i=>i.reset(...e.inputJax)),e.outputJax&&this.outputJax.reset(...e.outputJax),this}clear(){return this.reset(),this.math.clear(),this}done(){return Promise.resolve()}concat(e){return this.math.merge(e),this}clearMathItemsWithin(e){let i=this.getMathItemsWithin(e);for(let r of i.slice(0).reverse())r.clear();return this.math.remove(...i),i}getMathItemsWithin(e){Array.isArray(e)||(e=[e]);let i=this.adaptor,r=[],s=i.getElements(e,this.document);t:for(let n of this.math)for(let a of s)if(n.start.node&&i.contains(a,n.start.node)){r.push(n);continue t}return r}};gs.KIND="MathDocument",gs.OPTIONS={OutputJax:null,InputJax:null,MmlFactory:null,MathList:a1,MathItem:C2,compileError:(t,e,i)=>{t.compileError(e,i)},typesetError:(t,e,i)=>{t.typesetError(e,i)},renderActions:qe({find:[z.FINDMATH,"findMath","",!1],compile:[z.COMPILED],metrics:[z.METRICS,"getMetrics","",!1],typeset:[z.TYPESET],update:[z.INSERTED,"updateDocument",!1]})},gs.ProcessBits=y2("findMath","compile","getMetrics","typeset","updateDocument");var S2=class extends gs{},l1=class{constructor(t,e=5){this.documentClass=S2,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)}};l1.NAME="generic";var A2=class extends _u{get adaptor(){return this.inputJax.adaptor}constructor(t,e,i=!0,r={node:null,n:0,delim:""},s={node:null,n:0,delim:""}){super(t,e,i,r,s)}updateDocument(t){if(this.state()<z.INSERTED){if(this.inputJax.processStrings){let e=this.start.node;if(e===this.end.node)this.end.n&&this.end.n<this.adaptor.value(this.end.node).length&&this.adaptor.split(this.end.node,this.end.n),this.start.n&&(e=this.adaptor.split(this.start.node,this.start.n)),this.adaptor.parent(e)&&this.adaptor.replace(this.typesetRoot,e);else{for(this.start.n&&(e=this.adaptor.split(e,this.start.n));e!==this.end.node;){let i=this.adaptor.next(e);this.adaptor.remove(e),e=i}this.adaptor.insert(this.typesetRoot,e),this.end.n<this.adaptor.value(e).length&&this.adaptor.split(e,this.end.n),this.adaptor.remove(e)}}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(z.INSERTED)}}updateStyleSheet(t){t.addStyleSheet()}removeFromDocument(t=!1){if(super.removeFromDocument(t),this.state()>=z.TYPESET){let e=this.adaptor,i=this.start.node,r=e.text("");if(t){let s=this.start.delim+this.math+this.end.delim;if(this.inputJax.processStrings)r=e.text(s);else{let n=e.parse(s,"text/html");r=e.firstChild(e.body(n))}}e.parent(i)&&e.replace(r,i),this.start.node=this.end.node=r,this.start.n=this.end.n=0}}},L2=class extends s1{},Jl=class{constructor(t=null){let e=this.constructor;this.options=fi(Xe({},e.OPTIONS),t),this.init(),this.getPatterns()}init(){this.strings=[],this.string="",this.snodes=[],this.nodes=[],this.stack=[]}getPatterns(){let t=jo(this.options.skipHtmlTags),e=jo(this.options.ignoreHtmlClass),i=jo(this.options.processHtmlClass);this.skipHtmlTags=RegExp("^(?:"+t.join("|")+")$","i"),this.ignoreHtmlClass=RegExp("(?:^| )(?:"+e.join("|")+")(?: |$)"),this.processHtmlClass=RegExp("(?:^| )(?:"+i+")(?: |$)")}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){let i=this.options.includeHtmlTags[this.adaptor.kind(t)];i instanceof Function?this.extendString(t,i(t,this.adaptor)):this.extendString(t,i)}return this.adaptor.next(t)}handleContainer(t,e){this.pushString();let i=this.adaptor.getAttribute(t,"class")||"",r=this.adaptor.kind(t)||"",s=this.processHtmlClass.exec(i),n=t;return this.adaptor.firstChild(t)&&!this.adaptor.getAttribute(t,"data-MJX")&&(s||!this.skipHtmlTags.exec(r))?(this.adaptor.next(t)&&this.stack.push([this.adaptor.next(t),e]),n=this.adaptor.firstChild(t),e=(e||this.ignoreHtmlClass.exec(i))&&!s):n=this.adaptor.next(t),[n,e]}handleOther(t,e){return this.pushString(),this.adaptor.next(t)}find(t){this.init();let e=this.adaptor.next(t),i=!1,r=this.options.includeHtmlTags;for(;t&&t!==e;){let n=this.adaptor.kind(t);n==="#text"?t=this.handleText(t,i):Object.hasOwn(r,n)?t=this.handleTag(t,i):n?[t,i]=this.handleContainer(t,i):t=this.handleOther(t,i),!t&&this.stack.length&&(this.pushString(),[t,i]=this.stack.pop())}this.pushString();let s=[this.strings,this.nodes];return this.init(),s}};Jl.OPTIONS={skipHtmlTags:["script","noscript","style","textarea","pre","code","math","select","option","mjx-container"],includeHtmlTags:qe({br:`
204
+ `,wbr:"","#comment":""}),ignoreHtmlClass:"mathjax_ignore",processHtmlClass:"mathjax_process"},Js("STYLES",z.INSERTED+1);var Yl=class extends gs{constructor(t,e,i){let[r,s]=Co(i,Jl.OPTIONS);super(t,e,r),this.domStrings=this.options.DomStrings||new Jl(s),this.domStrings.adaptor=e,this.styles=[]}findPosition(t,e,i,r){let s=this.adaptor,n=1/(r[t].length||1),a=t;for(let[o,h]of r[t]){if(e<=h&&s.kind(o)==="#text")return{i:a,node:o,n:Math.max(e,0),delim:i};e-=h,a+=n}return{node:null,n:0,delim:i}}mathItem(t,e,i){let r=t.math,s=this.findPosition(t.n,t.start.n,t.open,i),n=this.findPosition(t.n,t.end.n,t.close,i);return new this.options.MathItem(r,e,t.display,s,n)}findMath(t){if(!this.processed.isSet("findMath")){this.adaptor.document=this.document,t=fi({elements:this.options.elements||[this.adaptor.body(this.document)]},t);let e=this.adaptor.getElements(t.elements,this.document);for(let i of this.inputJax){let r=i.processStrings?this.findMathFromStrings(i,e):this.findMathFromDOM(i,e);this.math.merge(r)}this.processed.set("findMath")}return this}findMathFromStrings(t,e){let i=[],r=[];for(let n of e){let[a,o]=this.domStrings.find(n);i.push(...a),r.push(...o)}let s=new this.options.MathList;for(let n of t.findMath(i))s.push(this.mathItem(n,t,r));return s}findMathFromDOM(t,e){let i=[];for(let r of e)for(let s of t.findMath(r))i.push(new this.options.MathItem(s.math,t,s.display,s.start,s.end));return new this.options.MathList(...i)}updateDocument(){return this.processed.isSet("updateDocument")||(this.addPageElements(),this.addStyleSheet(),super.updateDocument(),this.processed.set("updateDocument")),this}addPageElements(){let t=this.adaptor,e=t.body(this.document),i=this.documentPageElements();if(i){let r=t.firstChild(e);r?t.insert(i,r):t.append(e,i)}}addStyleSheet(){let t=this.documentStyleSheet(),e=this.adaptor;if(t&&!e.parent(t)){let i=e.head(this.document),r=this.findSheet(i,e.getAttribute(t,"id"));r?e.replace(t,r):e.append(i,t)}}findSheet(t,e){if(e){for(let i of this.adaptor.tags(t,"style"))if(this.adaptor.getAttribute(i,"id")===e)return i}return null}removeFromDocument(t=!1){if(this.processed.isSet("updateDocument"))for(let e of this.math)e.state()>=z.INSERTED&&e.state(z.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}};Yl.KIND="HTML",Yl.OPTIONS=Object.assign(Object.assign({},gs.OPTIONS),{renderActions:qe(Object.assign(Object.assign({},gs.OPTIONS.renderActions),{styles:[z.STYLES,"","updateStyleSheet",!1]})),MathList:L2,MathItem:A2,DomStrings:null});var R2=class extends l1{constructor(){super(...arguments),this.documentClass=Yl}handlesDocument(t){let e=this.adaptor;if(typeof t=="string")try{t=e.parse(t,"text/html")}catch{}return t instanceof e.window.Document||t instanceof e.window.HTMLElement||t instanceof e.window.DocumentFragment}create(t,e){let i=this.adaptor;if(typeof t=="string")t=i.parse(t,"text/html");else if(t instanceof i.window.HTMLElement||t instanceof i.window.DocumentFragment){let r=t;t=i.parse("","text/html"),i.append(i.body(t),r)}return super.create(t,e)}},Gh=class{constructor(t){let e=this.constructor;this.options=fi(Xe({},e.OPTIONS),t)}};Gh.OPTIONS={};var Zc="http://www.w3.org/1998/Math/MathML",Zl=class extends Gh{findMath(t){let e=new Set;this.findMathNodes(t,e),this.findMathPrefixed(t,e);let i=this.adaptor.root(this.adaptor.document);return this.adaptor.kind(i)==="html"&&e.size===0&&this.findMathNS(t,e),this.processMath(e)}findMathNodes(t,e){for(let i of this.adaptor.tags(t,"math"))e.add(i)}findMathPrefixed(t,e){let i=this.adaptor.root(this.adaptor.document);for(let r of this.adaptor.allAttributes(i))if(r.name.substring(0,6)==="xmlns:"&&r.value===Zc){let s=r.name.substring(6);for(let n of this.adaptor.tags(t,s+":math"))e.add(n)}}findMathNS(t,e){for(let i of this.adaptor.tags(t,"math",Zc))e.add(i)}processMath(t){let e=this.adaptor,i=[];for(let r of t.values()){if(e.kind(e.parent(r))==="mjx-assistive-mml")continue;let s=e.getAttribute(r,"display")==="block"||e.getAttribute(r,"mode")==="display",n={node:r,n:0,delim:""},a={node:r,n:0,delim:""};i.push({math:e.outerHTML(r),start:n,end:a,display:s})}return i}};Zl.OPTIONS={};var w2={loadMissingEntities:!0},Hr={ApplyFunction:"⁡",Backslash:"∖",Because:"∵",Breve:"˘",Cap:"⋒",CenterDot:"·",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",Congruent:"≡",ContourIntegral:"∮",Coproduct:"∐",Cross:"⨯",Cup:"⋓",CupCap:"≍",Dagger:"‡",Del:"∇",Delta:"Δ",Diamond:"⋄",DifferentialD:"ⅆ",DotEqual:"≐",DoubleDot:"¨",DoubleRightTee:"⊨",DoubleVerticalBar:"∥",DownArrow:"↓",DownLeftVector:"↽",DownRightVector:"⇁",DownTee:"⊤",Downarrow:"⇓",Element:"∈",EqualTilde:"≂",Equilibrium:"⇌",Exists:"∃",ExponentialE:"ⅇ",FilledVerySmallSquare:"▪",ForAll:"∀",Gamma:"Γ",Gg:"⋙",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Hacek:"ˇ",Hat:"^",HumpDownHump:"≎",HumpEqual:"≏",Im:"ℑ",ImaginaryI:"ⅈ",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Lambda:"Λ",Larr:"↞",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDownVector:"⇃",LeftFloor:"⌊",LeftRightArrow:"↔",LeftTee:"⊣",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpVector:"↿",LeftVector:"↼",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessSlantEqual:"⩽",LessTilde:"≲",Ll:"⋘",Lleftarrow:"⇚",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lsh:"↰",MinusPlus:"∓",NestedGreaterGreater:"≫",NestedLessLess:"≪",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotPrecedes:"⊀",NotPrecedesSlantEqual:"⋠",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsSlantEqual:"⋡",NotSupersetEqual:"⊉",NotTilde:"≁",NotVerticalBar:"∤",Omega:"Ω",OverBar:"‾",OverBrace:"⏞",PartialD:"∂",Phi:"Φ",Pi:"Π",PlusMinus:"±",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Product:"∏",Proportional:"∝",Psi:"Ψ",Rarr:"↠",Re:"ℜ",ReverseEquilibrium:"⇋",RightAngleBracket:"⟩",RightArrow:"→",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDownVector:"⇂",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpVector:"↾",RightVector:"⇀",Rightarrow:"⇒",Rrightarrow:"⇛",Rsh:"↱",Sigma:"Σ",SmallCircle:"∘",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Star:"⋆",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",Therefore:"∴",Theta:"Θ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",UnderBar:"_",UnderBrace:"⏟",Union:"⋃",UnionPlus:"⊎",UpArrow:"↑",UpDownArrow:"↕",UpTee:"⊥",Uparrow:"⇑",Updownarrow:"⇕",Upsilon:"Υ",Vdash:"⊩",Vee:"⋁",VerticalBar:"∣",VerticalTilde:"≀",Vvdash:"⊪",Wedge:"⋀",Xi:"Ξ",amp:"&",acute:"´",aleph:"ℵ",alpha:"α",amalg:"⨿",and:"∧",ang:"∠",angmsd:"∡",angsph:"∢",ape:"≊",backprime:"‵",backsim:"∽",backsimeq:"⋍",beta:"β",beth:"ℶ",between:"≬",bigcirc:"◯",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",blacklozenge:"⧫",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",bowtie:"⋈",boxdl:"┐",boxdr:"┌",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxur:"└",bsol:"\\",bull:"•",cap:"∩",check:"✓",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",clubs:"♣",colon:":",comp:"∁",ctdot:"⋯",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cup:"∪",curarr:"↷",curlyvee:"⋎",curlywedge:"⋏",dagger:"†",daleth:"ℸ",ddarr:"⇊",deg:"°",delta:"δ",digamma:"ϝ",div:"÷",divideontimes:"⋇",dot:"˙",doteqdot:"≑",dotplus:"∔",dotsquare:"⊡",dtdot:"⋱",ecir:"≖",efDot:"≒",egs:"⪖",ell:"ℓ",els:"⪕",empty:"∅",epsi:"ε",epsiv:"ϵ",erDot:"≓",eta:"η",eth:"ð",flat:"♭",fork:"⋔",frown:"⌢",gEl:"⪌",gamma:"γ",gap:"⪆",gimel:"ℷ",gnE:"≩",gnap:"⪊",gne:"⪈",gnsim:"⋧",gt:">",gtdot:"⋗",harrw:"↭",hbar:"ℏ",hellip:"…",hookleftarrow:"↩",hookrightarrow:"↪",imath:"ı",infin:"∞",intcal:"⊺",iota:"ι",jmath:"ȷ",kappa:"κ",kappav:"ϰ",lEg:"⪋",lambda:"λ",lap:"⪅",larrlp:"↫",larrtl:"↢",lbrace:"{",lbrack:"[",le:"≤",leftleftarrows:"⇇",leftthreetimes:"⋋",lessdot:"⋖",lmoust:"⎰",lnE:"≨",lnap:"⪉",lne:"⪇",lnsim:"⋦",longmapsto:"⟼",looparrowright:"↬",lowast:"∗",loz:"◊",lt:"<",ltimes:"⋉",ltri:"◃",macr:"¯",malt:"✠",mho:"℧",mu:"μ",multimap:"⊸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",natur:"♮",nearr:"↗",nharr:"↮",nlarr:"↚",not:"¬",nrarr:"↛",nu:"ν",nvDash:"⊭",nvdash:"⊬",nwarr:"↖",omega:"ω",omicron:"ο",or:"∨",osol:"⊘",period:".",phi:"φ",phiv:"ϕ",pi:"π",piv:"ϖ",prap:"⪷",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",prime:"′",psi:"ψ",quot:'"',rarrtl:"↣",rbrace:"}",rbrack:"]",rho:"ρ",rhov:"ϱ",rightrightarrows:"⇉",rightthreetimes:"⋌",ring:"˚",rmoust:"⎱",rtimes:"⋊",rtri:"▹",scap:"⪸",scnE:"⪶",scnap:"⪺",scnsim:"⋩",sdot:"⋅",searr:"↘",sect:"§",sharp:"♯",sigma:"σ",sigmav:"ς",simne:"≆",smile:"⌣",spades:"♠",sub:"⊂",subE:"⫅",subnE:"⫋",subne:"⊊",supE:"⫆",supnE:"⫌",supne:"⊋",swarr:"↙",tau:"τ",theta:"θ",thetav:"ϑ",tilde:"˜",times:"×",triangle:"▵",triangleq:"≜",upsi:"υ",upuparrows:"⇈",veebar:"⊻",vellip:"⋮",weierp:"℘",xi:"ξ",yen:"¥",zeta:"ζ",zigrarr:"⇝",nbsp:" ",rsquo:"’",lsquo:"‘"},Qc={};function I2(t){return t.replace(/&([a-z][a-z0-9]*|#(?:[0-9]+|x[0-9a-f]+));/gi,k2)}function k2(t,e){if(e.charAt(0)==="#")return h1(e.slice(1));if(Hr[e])return Hr[e];if(w2.loadMissingEntities){let i=e.match(/^[a-zA-Z](fr|scr|opf)$/)?RegExp.$1:e.charAt(0).toLowerCase();Qc[i]||(Qc[i]=!0,On(Mu("./util/entities/"+i+".js")))}return t}function h1(t){let e=t.charAt(0)==="x"?parseInt(t.slice(1),16):parseInt(t);return String.fromCodePoint(e)}var Ql=class{constructor(t={}){let e=this.constructor;this.options=fi(Xe({},e.OPTIONS),t)}setMmlFactory(t){this.factory=t}compile(t){let e=this.makeNode(t);return e.verifyTree(this.options.verify),e.setInheritedAttributes({},!1,0,!1),e.walkTree(this.markMrows),e}makeNode(t){let e=this.adaptor,i=!1,r=e.kind(t).replace(/^.*:/,""),s=e.getAttribute(t,"data-mjx-texclass")||"";s&&(s=this.filterAttribute("data-mjx-texclass",s)||"");let n=s&&r==="mrow"?"TeXAtom":r;for(let a of this.filterClassList(e.allClasses(t)))a.match(/^MJX-TeXAtom-/)&&r==="mrow"?(s=a.substring(12),n="TeXAtom"):a==="MJX-fixedlimits"&&(i=!0);return this.factory.getNodeClass(n)?this.createMml(n,t,s,i):this.unknownNode(n,t)}createMml(t,e,i,r){let s=this.factory.create(t);return t==="TeXAtom"&&i==="OP"&&!r&&(s.setProperty("movesupsub",!0),s.attributes.setInherited("movablelimits",!0)),i&&(s.texClass=L[i],s.setProperty("texClass",s.texClass)),this.addAttributes(s,e),this.checkClass(s,e),this.addChildren(s,e),s}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 i=!1;for(let r of this.adaptor.allAttributes(e)){let s=r.name,n=this.filterAttribute(s,r.value);if(!(n===null||s==="xmlns")){if(s.substring(0,9)==="data-mjx-")switch(s.substring(9)){case"alternate":t.setProperty("variantForm",!0);break;case"variant":t.attributes.set("mathvariant",n),t.setProperty("ignore-variant",!0),i=!0;break;case"smallmatrix":t.setProperty("smallmatrix",!0),t.setProperty("useHeight",!1);break;case"mathaccent":t.setProperty("mathaccent",n==="true");break;case"auto-op":t.setProperty("autoOP",n==="true");break;case"script-align":t.setProperty("scriptalign",n);break;case"vbox":t.setProperty("vbox",n);break;default:t.attributes.set(s,n)}else if(s!=="class"){let a=n.toLowerCase();a==="true"||a==="false"?t.attributes.set(s,a==="true"):(!i||s!=="mathvariant")&&t.attributes.set(s,n)}}}}filterAttribute(t,e){return e}filterClassList(t){return t}addChildren(t,e){if(t.arity===0)return;let i=this.adaptor;for(let r of i.childNodes(e)){let s=i.kind(r);if(s!=="#comment")if(s==="#text")this.addText(t,r);else if(t.isKind("annotation-xml"))t.appendChild(this.factory.create("XML").setXML(r,i));else{let n=t.appendChild(this.makeNode(r));n.arity===0&&i.childNodes(r).length&&!n.isKind("html")&&(this.options.fixMisplacedChildren?this.addChildren(t,r):n.mError("There should not be children for "+n.kind+" nodes",this.options.verify,!0))}}t.isToken&&this.trimSpace(t)}addText(t,e){let i=this.adaptor.value(e);(t.isToken||t.getProperty("isChars"))&&t.arity?(t.isToken&&(i=I2(i),i=this.normalizeSpace(i)),t.appendChild(this.factory.create("text").setText(i))):i.match(/\S/)&&this.error('Unexpected text node "'+i+'"')}checkClass(t,e){let i=[];for(let r of this.filterClassList(this.adaptor.allClasses(e)))r.substring(0,4)==="MJX-"?r==="MJX-variant"?t.setProperty("variantForm",!0):r.substring(0,11)!=="MJX-TeXAtom"&&t.attributes.set("mathvariant",this.fixCalligraphic(r.substring(3))):i.push(r);i.length&&t.attributes.set("class",i.join(" "))}fixCalligraphic(t){return t.replace(/caligraphic/,"calligraphic")}markMrows(t){if(t.isKind("mrow")&&!t.isInferred&&t.childNodes.length>=2){let e=t.childNodes[0],i=t.childNodes[t.childNodes.length-1];e.isKind("mo")&&e.attributes.get("fence")&&e.attributes.get("stretchy")&&i.isKind("mo")&&i.attributes.get("fence")&&i.attributes.get("stretchy")&&(e.childNodes.length&&t.setProperty("open",e.getText()),i.childNodes.length&&t.setProperty("close",i.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 Error(t)}};Ql.OPTIONS={MmlFactory:null,allowHtmlInTokenNodes:!1,fixMisplacedChildren:!0,verify:Object.assign({},At.verifyDefaults),translateEntities:!0};var fo=class extends Es{constructor(t={}){let[e,i,r]=Co(t,Zl.OPTIONS,Ql.OPTIONS);super(e),this.findMathML=this.options.FindMathML||new Zl(i),this.mathml=this.options.MathMLCompile||new Ql(r),this.mmlFilters=new Gr(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 i=t.start.node;if(!i||!t.end.node||this.options.forceReparse||this.adaptor.kind(i)==="#text"){let s=this.executeFilters(this.preFilters,t,e,(t.math||"<math></math>").trim());this.options.parseAs==="html"&&(s=`<html><head></head><body>${s}</body></html>`);let n=this.checkForErrors(this.adaptor.parse(s,"text/"+this.options.parseAs)),a=this.adaptor.body(n);this.adaptor.childNodes(a).length!==1&&this.error("MathML must consist of a single element"),i=this.adaptor.remove(this.adaptor.firstChild(a)),this.adaptor.kind(i).replace(/^[a-z]+:/,"")!=="math"&&this.error("MathML must be formed by a <math> element, not <"+this.adaptor.kind(i)+">")}i=this.executeFilters(this.mmlFilters,t,e,i);let r=this.mathml.compile(i);return r=this.executeFilters(this.postFilters,t,e,r),t.display=r.attributes.get("display")==="block",r}checkForErrors(t){let 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 Error(t)}findMath(t){return this.findMathML.findMath(t)}};fo.NAME="MathML",fo.OPTIONS=Xe({parseAs:"html",forceReparse:!1,mmlFilters:[],FindMathML:null,MathMLCompile:null,parseError:function(t){this.error(this.adaptor.textContent(t).replace(/\n.*/g,""))}},Es.OPTIONS);var th=class extends Gh{constructor(t){super(t),this.getPatterns()}getPatterns(){let t=this.options,e=[],i=[],r=[];this.end={},this.env=this.sub=0;let s=1;t.inlineMath.forEach(n=>this.addPattern(e,n,!1)),t.displayMath.forEach(n=>this.addPattern(e,n,!0)),e.length&&i.push(e.sort(Km).join("|")),t.processEnvironments&&(i.push("\\\\begin\\s*\\{([^}]*)\\}"),this.env=s,s++),t.processEscapes&&r.push("\\\\([\\\\$])"),t.processRefs&&r.push("(\\\\(?:eq)?ref\\s*\\{[^}]*\\})"),r.length&&(i.push("("+r.join("|")+")"),this.sub=s),this.start=new RegExp(i.join("|"),"g"),this.hasPatterns=i.length>0}addPattern(t,e,i){let[r,s]=e;t.push(Ho(r)),this.end[r]=[s,i,this.endPattern(s)]}endPattern(t,e){return RegExp((e||Ho(t))+"|\\\\(?:[a-zA-Z]|.)|[{}]","g")}findEnd(t,e,i,r){let[s,n,a]=r,o=a.lastIndex=i.index+i[0].length,h,d=0;for(;h=a.exec(t);){if((h[1]||h[0])===s&&d===0)return Uo(i[0],t.substring(o,h.index),h[0],e,i.index,h.index+h[0].length,n);h[0]==="{"?d++:h[0]==="}"&&d&&d--}return null}findMathInString(t,e,i){let r,s;for(this.start.lastIndex=0;r=this.start.exec(i);){if(r[this.env]!==void 0&&this.env){let n="\\\\end\\s*(\\{"+Ho(r[this.env])+"\\})";s=this.findEnd(i,e,r,["{"+r[this.env]+"}",!0,this.endPattern(null,n)]),s&&(s.math=s.open+s.math+s.close,s.open=s.close="")}else if(r[this.sub]!==void 0&&this.sub){let n=r[this.sub],a=r.index+r[this.sub].length;s=n.length===2?Uo("\\",n.substring(1),"",e,r.index,a):Uo("",n,"",e,r.index,a,!1)}else s=this.findEnd(i,e,r,this.end[r[0]]);s&&(t.push(s),this.start.lastIndex=s.end.n)}}findMath(t){let e=[];if(this.hasPatterns)for(let i=0,r=t.length;i<r;i++)this.findMathInString(e,i,t[i]);return e}};th.OPTIONS={inlineMath:[["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],processEscapes:!0,processEnvironments:!0,processRefs:!0};var C={attrs:new Set(["autoOP","fnOP","movesupsub","subsupOK","texprimestyle","useHeight","variantForm","withDelims","mathaccent","open","close"]),createEntity(t){return String.fromCodePoint(parseInt(t,16))},getChildren(t){return t.childNodes},getText(t){return t.getText()},appendChildren(t,e){for(let i of e)t.appendChild(i)},setAttribute(t,e,i){t.attributes.set(e,i)},setProperty(t,e,i){t.setProperty(e,i)},setProperties(t,e){for(let i of Object.keys(e)){let r=e[i];i==="texClass"?(t.texClass=r,t.setProperty(i,r)):i==="movablelimits"?(t.setProperty("movablelimits",r),(t.isKind("mo")||t.isKind("mstyle"))&&t.attributes.set("movablelimits",r)):i==="inferred"||(C.attrs.has(i)?t.setProperty(i,r):t.attributes.set(i,r))}},getProperty(t,e){return t.getProperty(e)},getAttribute(t,e){return t.attributes.get(e)},removeAttribute(t,e){t.attributes.unset(e)},removeProperties(t,...e){t.removeProperty(...e)},getChildAt(t,e){return t.childNodes[e]},setChild(t,e,i){let r=t.childNodes;r[e]=i,i&&(i.parent=t)},copyChildren(t,e){let i=t.childNodes;for(let r=0;r<i.length;r++)this.setChild(e,r,i[r])},copyAttributes(t,e){e.attributes=t.attributes;for(let[i,r]of Object.entries(t.getAllProperties()))e.setProperty(i,r)},isType(t,e){return t.isKind(e)},isEmbellished(t){return t.isEmbellished},getTexClass(t){return t.texClass},getCoreMO(t){return t.coreMO()},isNode(t){return t instanceof At||t instanceof Ih},isInferred(t){return t.isInferred},getForm(t){if(!t.isKind("mo"))return null;let e=t,i=e.getForms();for(let r of i){let s=this.getOp(e,r);if(s)return s}return null},getOp(t,e="infix"){return ri.OPTABLE[e][t.getText()]||null},getMoAttribute(t,e){if(!t.attributes.isSet(e))for(let i of["infix","postfix","prefix"]){let r=this.getOp(t,i)?.[3]?.[e];if(r!==void 0)return r}return t.attributes.get(e)}},lt={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"}};function O2(t,e,i){let r=e.attributes,s=i.attributes;t.forEach(n=>{let a=s.getExplicit(n);a!=null&&r.set(n,a)})}function M2(t,e){let i=(o,h)=>o.getExplicitNames().filter(d=>d!==h&&(d!=="stretchy"||o.getExplicit("stretchy"))&&d!=="data-latex"&&d!=="data-latex-item"),r=t.attributes,s=e.attributes,n=i(r,"lspace"),a=i(s,"rspace");if(n.length!==a.length)return!1;for(let o of n)if(r.getExplicit(o)!==s.getExplicit(o))return!1;return!0}function td(t,e,i){let r=[];for(let s of t.getList("m"+e+i)){let n=s.childNodes;if(n[s[e]]&&n[s[i]])continue;let a=s.parent,o=n[s[e]]?t.nodeFactory.create("node","m"+e,[n[s.base],n[s[e]]]):t.nodeFactory.create("node","m"+i,[n[s.base],n[s[i]]]);C.copyAttributes(s,o),a.replaceChild(o,s),r.push(s)}t.removeFromList("m"+e+i,r)}function Qo(t,e,i){let r=[];for(let s of t.getList(e)){if(s.attributes.get("displaystyle"))continue;let n=s.childNodes[s.base],a=n.coreMO();if(n.getProperty("movablelimits")&&!a.attributes.hasExplicit("movablelimits")){let o=t.nodeFactory.create("node",i,s.childNodes);C.copyAttributes(s,o),s.parent.replaceChild(o,s),r.push(s)}}t.removeFromList(e,r)}var Yr={cleanStretchy(t){let e=t.data;for(let i of e.getList("fixStretchy"))C.getProperty(i,"fixStretchy")&&(C.getForm(i)?.[3]?.stretchy&&C.setAttribute(i,"stretchy",!1),C.removeProperties(i,"fixStretchy"))},cleanAttributes(t){t.data.root.walkTree(e=>{let i=new Set((e.getProperty("keep-attrs")||"").split(/ /)),r=e.attributes;r.unset(lt.Attr.LATEXITEM);for(let s of r.getExplicitNames())!i.has(s)&&r.get(s)===r.getInherited(s)&&r.unset(s)})},combineRelations(t){let e=[];for(let i of t.data.getList("mo")){if(i.getProperty("relationsCombined")||!i.parent||i.parent&&!C.isType(i.parent,"mrow")||C.getTexClass(i)!==L.REL)continue;let r=i.parent,s,n=r.childNodes,a=n.indexOf(i)+1,o=C.getProperty(i,"variantForm");for(;a<n.length&&(s=n[a])&&C.isType(s,"mo")&&C.getTexClass(s)===L.REL;)if(o===C.getProperty(s,"variantForm")&&M2(i,s)){C.appendChildren(i,C.getChildren(s)),O2(["stretchy","rspace"],i,s);for(let h of s.getPropertyNames())i.setProperty(h,s.getProperty(h));s.attributes.get("data-latex")&&i.attributes.set("data-latex",i.attributes.get("data-latex")+s.attributes.get("data-latex")),n.splice(a,1),e.push(s),s.parent=null,s.setProperty("relationsCombined",!0),i.setProperty("texClass",L.REL)}else{i.attributes.hasExplicit("rspace")||C.setAttribute(i,"rspace","0pt"),s.attributes.hasExplicit("lspace")||C.setAttribute(s,"lspace","0pt");break}i.attributes.setInherited("form",i.getForms()[0])}t.data.removeFromList("mo",e)},cleanSubSup(t){let e=t.data;e.error||(td(e,"sub","sup"),td(e,"under","over"))},moveLimits(t){let e=t.data;Qo(e,"munderover","msubsup"),Qo(e,"munder","msub"),Qo(e,"mover","msup")},setInherited(t){t.data.root.setInheritedAttributes({},t.math.display,0,!1)},checkScriptlevel(t){let e=t.data,i=[];for(let r of e.getList("mstyle")){if(r.childNodes[0].childNodes.length!==1)continue;let s=r.attributes;for(let a of["displaystyle","scriptlevel"])s.getExplicit(a)===s.getInherited(a)&&s.unset(a);let n=s.getExplicitNames();if(n.filter(a=>a.substring(0,10)!=="data-latex").length===0){let a=r.childNodes[0].childNodes[0];n.forEach(o=>a.attributes.set(o,s.get(o))),r.parent.replaceChild(a,r),i.push(r)}}e.removeFromList("mstyle",i)}},ct;(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"})(ct||(ct={}));var ht;(function(t){t.DELIMITER="delimiter",t.MACRO="macro",t.CHARACTER="character",t.ENVIRONMENT="environment"})(ht||(ht={}));var D2=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):!1}},ha=7.2,P2=72;function B2([t,e,i]){return e==="mu"?[Ot.em(Ot.UNIT_CASES.get(e)*parseFloat(t)).slice(0,-2),"em",i]:[t,e,i]}var Ot={UNIT_CASES:new D2([["em",1],["ex",.43],["pt",1/10],["pc",1.2],["px",ha/P2],["in",ha],["cm",ha/2.54],["mm",ha/25.4],["mu",1/18]]),matchDimen(t,e=!1){let i=t.match(e?Ot.UNIT_CASES.dimenRest:Ot.UNIT_CASES.dimenEnd);return i?B2([i[1].replace(/,/,"."),i[4],i[0].length]):[null,null,0]},dimen2em(t){let[e,i]=Ot.matchDimen(t),r=parseFloat(e||"1");return Ot.UNIT_CASES.get(i)*r},em(t){return Math.abs(t)<6e-4?"0em":t.toFixed(3).replace(/\.?0+$/,"")+"em"},trimSpaces(t){if(typeof t!="string")return t;let e=t.trim();return e.match(/\\$/)&&t.match(/ $/)&&(e+=" "),e}},c1=class{constructor(t,e,i){this._factory=t,this._env=e,this.global={},this.stack=[],this.global={isInner:i},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(let e of t){if(!e)continue;let i=C.isNode(e)?this._factory.create("mml",e):e;i.global=this.global;let[r,s]=this.stack.length?this.Top().checkItem(i):[null,!0];if(s){if(r){this.Pop(),this.Push(...r);continue}i.isKind("null")||this.stack.push(i),i.env?(i.copyEnv&&Object.assign(i.env,this.env),this.env=i.env):i.env=this.env}}}Pop(){let 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){let e=this.Top();return t?e.First:e.Pop()}get height(){return this.stack.length}toString(){return`stack[
205
+ `+this.stack.join(`
206
+ `)+`
207
+ ]`}},M=class eh{static processString(e,i){let r=e.split(eh.pattern);for(let s=1,n=r.length;s<n;s+=2){let a=r[s].charAt(0);a>="0"&&a<="9"?(r[s]=i[parseInt(r[s],10)-1],typeof r[s]=="number"&&(r[s]=r[s].toString())):a==="{"&&(a=r[s].substring(1),a>="0"&&a<="9"?(r[s]=i[parseInt(r[s].substring(1,r[s].length-1),10)-1],typeof r[s]=="number"&&(r[s]=r[s].toString())):r[s].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/)&&(r[s]="%"+r[s]))}return r.join("")}constructor(e,i,...r){this.id=e,this.message=eh.processString(i,r)}};M.pattern=/%(\d+|\{\d+\}|\{[a-z]+:%\d+(?:\|(?:%\{\d+\}|%.|[^}])*)+\}|.)/g;var F2=class{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 t??(t=1),this._nodes.slice(this.Size()-t)}Size(){return this._nodes.length}Clear(){this._nodes=[]}toMml(t=!0,e){return this._nodes.length===1&&!e?this.First:this.create("node",t?"inferredMrow":"mrow",this._nodes,{})}create(t,...e){return this.factory.configuration.nodeFactory.create(t,...e)}},St=class Ln extends F2{constructor(e,...i){super(i),this.factory=e,this.global={},this._properties={},this.isOpen&&(this._env={})}get kind(){return"base"}get env(){return this._env}set env(e){this._env=e}get copyEnv(){return!0}getProperty(e){return this._properties[e]}setProperty(e,i){return this._properties[e]=i,this}get isOpen(){return!1}get isClose(){return!1}get isFinal(){return!1}isKind(e){return e===this.kind}checkItem(e){if(e.isKind("over")&&this.isOpen&&(e.setProperty("num",this.toMml(!1)),this.Clear()),e.isKind("cell")&&this.isOpen){if(e.getProperty("linebreak"))return Ln.fail;throw new M("Misplaced","Misplaced %1",e.getName())}if(e.isClose&&this.getErrors(e.kind)){let[i,r]=this.getErrors(e.kind);throw new M(i,r,e.getName())}return e.isFinal?(this.Push(e.First),Ln.fail):Ln.success}clearEnv(){for(let e of Object.keys(this.env))delete this.env[e]}setProperties(e){return Object.assign(this._properties,e),this}getName(){return this.getProperty("name")}toString(){return this.kind+"["+this.nodes.join("; ")+"]"}getErrors(e){return this.constructor.errors[e]||Ln.errors[e]}addLatexItem(e,i=""){let r=this.startStr.slice(this.startI,this.stopI);if(r){let s=i?i+r:r;e.attributes.set(lt.Attr.LATEXITEM,s),s!=="}"&&e.attributes.set(lt.Attr.LATEX,s)}}};St.fail=[null,!1],St.success=[null,!0],St.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"]};var ue=class ih{constructor(e,i,r){this._string=e,this.configuration=r,this.macroCount=0,this.i=0,this.currentCS="",this.saveI=0;let s=Object.hasOwn(i,"isInner"),n=i.isInner;delete i.isInner;let a;if(i){a={};for(let o of Object.keys(i))a[o]=i[o]}this.configuration.pushParser(this),this.stack=new c1(this.itemFactory,a,!s||n),this.Parse(),this.Push(this.itemFactory.create("stop")),this.stack.env=a}get options(){return this.configuration.options}get itemFactory(){return this.configuration.itemFactory}get tags(){return this.configuration.tags}set string(e){this._string=e}get string(){return this._string}parse(e,i){let r=this.saveI;this.saveI=this.i-(e==="character"&&i[1]!=="&"?i[1].length:0);let s=this.configuration.handlers.get(e).parse(i);return e!=="macro"&&this.updateResult(i[1],r),this.saveI=r,s}lookup(e,i){return this.configuration.handlers.get(e).lookup(i)}contains(e,i){return this.configuration.handlers.get(e).contains(i)}toString(){let e="";for(let i of Array.from(this.configuration.handlers.keys()))e+=i+": "+this.configuration.handlers.get(i)+`
208
+ `;return e}Parse(){let e;for(;this.i<this.string.length;)e=this.getCodePoint(),this.i+=e.length,this.parse(ht.CHARACTER,[this,e])}Push(e){e instanceof St&&(e.startI=this.saveI,e.stopI=this.i,e.startStr=this.string),e instanceof At&&e.isInferred?this.PushAll(e.childNodes):this.stack.Push(e)}PushAll(e){for(let i of e)this.stack.Push(i)}mml(){if(this.configuration.popParser(),!this.stack.Top().isKind("mml"))return null;let e=this.stack.Top().First,i=this.trimTex(this.string);return i&&e.attributes.set(lt.Attr.LATEX,i),e}convertDelimiter(e){return this.lookup(ht.DELIMITER,e)?.char??null}getCodePoint(){let e=this.string.codePointAt(this.i);return e===void 0?"":String.fromCodePoint(e)}nextIsSpace(){return!!this.string.charAt(this.i).match(/\s/)}GetNext(){for(;this.nextIsSpace();)this.i++;return this.getCodePoint()}GetCS(){let e=this.string.slice(this.i).match(/^(([a-z]+) ?|[\uD800-\uDBFF].|.)/i);return e?(this.i+=e[0].length,e[2]||e[1]):(this.i++," ")}GetArgument(e,i=!1){switch(this.GetNext()){case"":if(!i)throw new M("MissingArgFor","Missing argument for %1",this.currentCS);return null;case"}":if(!i)throw new M("ExtraCloseMissingOpen","Extra close brace or missing open brace");return null;case"\\":return this.i++,"\\"+this.GetCS();case"{":{let s=++this.i,n=1;for(;this.i<this.string.length;)switch(this.string.charAt(this.i++)){case"\\":this.i++;break;case"{":n++;break;case"}":if(--n===0)return this.string.slice(s,this.i-1)}throw new M("MissingCloseBrace","Missing close brace")}}let r=this.getCodePoint();return this.i+=r.length,r}GetBrackets(e,i,r=!1){if(this.GetNext()!=="[")return i;let s=++this.i,n=0,a=0;for(;this.i<this.string.length;)switch(this.string.charAt(this.i++)){case"{":n++;break;case"\\":this.i++;break;case"}":if(n--<=0)throw new M("ExtraCloseLooking","Extra close brace while looking for %1","']'");break;case"[":n===0&&a++;break;case"]":if(n===0){if(!r||a===0)return this.string.slice(s,this.i-1);a--}}throw new M("MissingCloseBracket","Could not find closing ']' for argument to %1",this.currentCS)}GetDelimiter(e,i=!1){let r=this.GetNext();if(this.i+=r.length,this.i<=this.string.length&&(r==="\\"?r+=this.GetCS():r==="{"&&i&&(this.i--,r=this.GetArgument(e).trim()),this.contains(ht.DELIMITER,r)))return this.convertDelimiter(r);throw new M("MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",this.currentCS)}GetDimen(e){if(this.GetNext()==="{"){let i=this.GetArgument(e),[r,s]=Ot.matchDimen(i);if(r)return r+s}else{let i=this.string.slice(this.i),[r,s,n]=Ot.matchDimen(i,!0);if(r)return this.i+=n,r+s}throw new M("MissingDimOrUnits","Missing dimension or its units for %1",this.currentCS)}GetUpTo(e,i){for(;this.nextIsSpace();)this.i++;let r=this.i,s=0;for(;this.i<this.string.length;){let n=this.i,a=this.GetNext();switch(this.i+=a.length,a){case"\\":a+=this.GetCS();break;case"{":s++;break;case"}":if(s===0)throw new M("ExtraCloseLooking","Extra close brace while looking for %1",i);s--}if(s===0&&a===i)return this.string.slice(r,n)}throw new M("TokenNotFoundForCommand","Could not find %1 for %2",i,this.currentCS)}ParseArg(e){return new ih(this.GetArgument(e),this.stack.env,this.configuration).mml()}ParseUpTo(e,i){return new ih(this.GetUpTo(e,i),this.stack.env,this.configuration).mml()}GetDelimiterArg(e){let i=Ot.trimSpaces(this.GetArgument(e));if(i==="")return null;if(this.contains(ht.DELIMITER,i))return i;throw new M("MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",this.currentCS)}GetStar(){let e=this.GetNext()==="*";return e&&this.i++,e}create(e,...i){let r=this.configuration.nodeFactory.create(e,...i);return r.isToken&&r.attributes.hasExplicit("mathvariant")&&r.attributes.get("mathvariant").charAt(0)==="-"&&r.setProperty("ignore-variant",!0),r}trimTex(e){return e.trim()+(e.match(/(?:^|[^\\])(?:\\\\)*\\\s+$/)?" ":"")}updateResult(e,i){let r=this.stack.Prev(!0);if(!r)return;let s=lt.Attr.LATEX,n=r.attributes.get(s),a=r.attributes.get(lt.Attr.LATEXITEM);if(a!==void 0){n||(e==="}"||a==="}"?this.composeBraces(r):r.attributes.set(s,a));return}i=i<this.saveI?this.saveI:i;let o=this.trimTex(i===this.i?e:this.string.slice(i,this.i));if(!(!o||o===n||e==="\\"&&o==="\\")){if(o==="_"||o==="^")r.setProperty("sub-sup",o);else{switch(r.getProperty("sub-sup")){case"^":if(r.childNodes[2]&&(o==="}"?this.composeBraces(r.childNodes[2]):r.childNodes[2].attributes.hasExplicit(s)||r.childNodes[2].attributes.set(s,o)),r.childNodes[1]){let h=r.childNodes[1].attributes.get(s);this.composeLatex(r,`_${h}^`,0,2)}else this.composeLatex(r,"^",0,2);return;case"_":if(r.childNodes[1]&&(o==="}"?this.composeBraces(r.childNodes[1]):r.childNodes[1].attributes.hasExplicit(s)||r.childNodes[1].attributes.set(s,o)),r.childNodes[2]){let h=r.childNodes[2].attributes.get(s);this.composeLatex(r,`^${h}_`,0,1)}else this.composeLatex(r,"_",0,1);return}if(o==="}"){this.composeBraces(r);return}}r.attributes.set(s,o)}}composeLatex(e,i,r,s){if(!e.childNodes[r]||!e.childNodes[s])return;let n=lt.Attr.LATEX,a=(e.childNodes[r].attributes.get(n)||"")+i+e.childNodes[s].attributes.get(n);e.attributes.set(n,a)}composeBraces(e){let i=this.composeBracedContent(e);e.attributes.set(lt.Attr.LATEX,`{${i}}`)}composeBracedContent(e){let i=e.childNodes[0]?.childNodes||[],r="";for(let s of i){let n=s?.attributes?.get(lt.Attr.LATEX)||"";n&&(r+=r&&r.match(/[a-zA-Z]$/)&&n.match(/^[a-zA-Z]/)?" "+n:n)}return r}},ed=class extends St{},d1=class extends So{constructor(){super(...arguments),this.defaultKind="dummy",this.configuration=null}};d1.DefaultStackItems={[ed.prototype.kind]:ed};var u1=class Rn{constructor(){this.mmlFactory=null,this.factory={node:Rn.createNode,token:Rn.createToken,text:Rn.createText,error:Rn.createError}}static createNode(e,i,r=[],s={},n){let a=e.mmlFactory.create(i);return a.setChildren(r),n&&a.appendChild(n),C.setProperties(a,s),a}static createToken(e,i,r={},s=""){let n=e.create("text",s);return e.create("node",i,[],r,n)}static createText(e,i){return i==null?null:e.mmlFactory.create("text").setText(i)}static createError(e,i){let r=e.create("text",i),s=e.create("node","mtext",[],{},r);return e.create("node","merror",[s],{"data-mjx-error":i})}setMmlFactory(e){this.mmlFactory=e}set(e,i){this.factory[e]=i}setCreators(e){for(let i in e)this.set(i,e[i])}create(e,...i){let r=(this.factory[e]||this.factory.node)(this,i[0],...i.slice(1));return e==="node"&&this.configuration.addNode(i[0],r),r}get(e){return this.factory[e]}},Bs=class{static oneof(...t){return new this("string",e=>t.includes(e),e=>e)}constructor(t,e,i){this.name=t,this.verify=e,this.convert=i}};new Bs("boolean",t=>t==="true"||t==="false",t=>t==="true"),new Bs("number",t=>!!t.match(/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[-+]?\d+)?$/),t=>parseFloat(t)),new Bs("integer",t=>!!t.match(/^[-+]?\d+$/),t=>parseInt(t)),new Bs("string",t=>!0,t=>t),new Bs("dimen",t=>Ot.matchDimen(t)[0]!==null,t=>t);function _2(t,e=!1){let i={},r=t,s,n,a,o=!0;for(;r;)[n,s,r]=id(r,["=",","],e,o),o=!1,s==="="?([a,s,r]=id(r,[","],e),a=a==="false"||a==="true"?JSON.parse(a):a,i[n]=a):n&&(i[n]=!0);return i}function tl(t,e){if(e===0)return t.replace(/^\s+/,"").replace(/([^\\\s]|^)((?:\\\\)*(?:\\\s)?)?\s+$/,"$1$2");for(;e>0;)t=t.trim().slice(1,-1),e--;return t}function id(t,e,i=!1,r=!1){let s=t.length,n=0,a="",o=0,h=0,d=!0;for(;o<s;){let p=t[o++];switch(p){case"\\":a+=p+(t[o++]||""),d=!1;continue;case" ":break;case"{":d&&h++,n++;break;case"}":if(!n)throw new M("ExtraCloseMissingOpen","Extra close brace or missing open brace");n--,d=!1;break;default:if(!n&&e.includes(p))return[tl(a,i?Math.min(1,h):h),p,t.slice(o)];h>n&&(h=n),d=!1}a+=p}if(n)throw new M("ExtraOpenMissingClose","Extra open brace or missing close brace");return r&&h?["","",tl(a,1)]:[tl(a,i?Math.min(1,h):h),"",t.slice(o)]}var Z={cols(...t){return t.map(e=>Ot.em(e)).join(" ")},fenced(t,e,i,r,s="",n=""){let a=t.nodeFactory,o=a.create("node","mrow",[],{open:e,close:r,texClass:L.INNER}),h;if(s)h=new ue("\\"+s+"l"+e,t.parser.stack.env,t).mml();else{let d=a.create("text",e);h=a.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:L.OPEN},d)}if(C.appendChildren(o,[h,i]),s)h=new ue("\\"+s+"r"+r,t.parser.stack.env,t).mml();else{let d=a.create("text",r);h=a.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:L.CLOSE},d)}return n&&h.attributes.set("mathcolor",n),C.appendChildren(o,[h]),o},fixedFence(t,e,i,r){let s=t.nodeFactory.create("node","mrow",[],{open:e,close:r,texClass:L.ORD});return e&&C.appendChildren(s,[Z.mathPalette(t,e,"l")]),C.isType(i,"mrow")?C.appendChildren(s,C.getChildren(i)):C.appendChildren(s,[i]),r&&C.appendChildren(s,[Z.mathPalette(t,r,"r")]),s},mathPalette(t,e,i){(e==="{"||e==="}")&&(e="\\"+e);let r="{\\bigg"+i+" "+e+"}",s="{\\big"+i+" "+e+"}";return new ue("\\mathchoice"+r+s+s+s,{},t).mml()},fixInitialMO(t,e){for(let i=0,r=e.length;i<r;i++){let s=e[i];if(s&&!C.isType(s,"mspace")&&(!C.isType(s,"TeXAtom")||C.getChildren(s)[0]&&C.getChildren(C.getChildren(s)[0]).length)){if(C.isEmbellished(s)||C.isType(s,"TeXAtom")&&C.getTexClass(s)===L.REL){let n=t.nodeFactory.create("node","mi");e.unshift(n)}break}}},internalMath(t,e,i,r){if(e=e.replace(/ +/g," "),t.configuration.options.internalMath)return t.configuration.options.internalMath(t,e,i,r);let s=r||t.stack.env.font,n=s?{mathvariant:s}:{},a=[],o=0,h=0,d,p,E="",y=0;if(e.match(/\\?[${}\\]|\\\(|\\(?:eq)?ref\s*\{|\\U/)){for(;o<e.length;)if(d=e.charAt(o++),d==="$")E==="$"&&y===0?(p=t.create("node","TeXAtom",[new ue(e.slice(h,o-1),{},t.configuration).mml()]),a.push(p),E="",h=o):E===""&&(h<o-1&&a.push(Z.internalText(t,e.slice(h,o-1),n)),E="$",h=o);else if(d==="{"&&E!=="")y++;else if(d==="}")if(E==="}"&&y===0){let A=new ue(e.slice(h,o),{},t.configuration).mml();p=t.create("node","TeXAtom",[A],n),a.push(p),E="",h=o}else E!==""&&y&&y--;else if(d==="\\"){if(E===""&&e.substring(o).match(/^(eq)?ref\s*\{/)){let A=RegExp["$&"].length;h<o-1&&a.push(Z.internalText(t,e.slice(h,o-1),n)),E="}",h=o-1,o+=A}else if(d=e.charAt(o++),d==="("&&E==="")h<o-2&&a.push(Z.internalText(t,e.slice(h,o-2),n)),E=")",h=o;else if(d===")"&&E===")"&&y===0)p=t.create("node","TeXAtom",[new ue(e.slice(h,o-2),{},t.configuration).mml()]),a.push(p),E="",h=o;else if(d.match(/[${}\\]/)&&E==="")o--,e=e.substring(0,o-1)+e.substring(o);else if(d==="U"){let A=e.substring(o).match(/^\s*(?:([0-9A-F])|\{\s*([0-9A-F]+)\s*\})/);if(!A)throw new M("BadRawUnicode","Argument to %1 must a hexadecimal number with 1 to 6 digits","\\U");let w=String.fromCodePoint(parseInt(A[1]||A[2],16));e=e.substring(0,o-2)+w+e.substring(o+A[0].length),o=o-2+w.length}}if(E!=="")throw new M("MathNotTerminated","Math mode is not properly terminated")}return h<e.length&&a.push(Z.internalText(t,e.slice(h),n)),i==null?a.length>1&&(a=[t.create("node","mrow",a)]):a=[t.create("node","mstyle",a,{displaystyle:!1,scriptlevel:i})],a},internalText(t,e,i){e=e.replace(/\n+/g," ").replace(/^ +/,Hr.nbsp).replace(/ +$/,Hr.nbsp);let r=t.create("text",e);return t.create("node","mtext",[],i,r)},underOver(t,e,i,r,s){if(Z.checkMovableLimits(e),C.isType(e,"munderover")&&C.isEmbellished(e)){C.setProperties(C.getCoreMO(e),{lspace:0,rspace:0});let o=t.create("node","mo",[],{rspace:0});e=t.create("node","mrow",[o,e])}let n=t.create("node","munderover",[e]);C.setChild(n,r==="over"?n.over:n.under,i);let a=n;return s&&(a=t.create("node","TeXAtom",[t.create("node","mstyle",[n],{displaystyle:!0,scriptlevel:0})],{texClass:L.OP,movesupsub:!0})),C.setProperty(a,"subsupOK",!0),a},checkMovableLimits(t){let e=C.isType(t,"mo")?C.getForm(t):null;(C.getProperty(t,"movablelimits")||e&&e[3]&&e[3].movablelimits)&&C.setProperties(t,{movablelimits:!1})},setArrayAlign(t,e,i){return i||(e=Ot.trimSpaces(e||"")),e==="t"?t.arraydef.align="baseline 1":e==="b"?t.arraydef.align="baseline -1":e==="c"?t.arraydef.align="axis":e&&(i?(i.string=`[${e}]`+i.string.slice(i.i),i.i=0):t.arraydef.align=e),t},substituteArgs(t,e,i){let r="",s="",n=0;for(;n<i.length;){let a=i.charAt(n++);if(a==="\\")r+=a+i.charAt(n++);else if(a==="#")if(a=i.charAt(n++),a==="#")r+=a;else{if(!a.match(/[1-9]/)||parseInt(a,10)>e.length)throw new M("IllegalMacroParam","Illegal macro parameter reference");s=Z.addArgs(t,Z.addArgs(t,s,r),e[parseInt(a,10)-1]),r=""}else r+=a}return Z.addArgs(t,s,r)},addArgs(t,e,i){if(i.match(/^[a-z]/i)&&e.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)&&(e+=" "),e.length+i.length>t.configuration.options.maxBuffer)throw new M("MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?");return e+i},checkMaxMacros(t,e=!0){if(!(++t.macroCount<=t.configuration.options.maxMacros))throw e?new M("MaxMacroSub1","MathJax maximum macro substitution count exceeded; is here a recursive macro call?"):new M("MaxMacroSub2","MathJax maximum substitution count exceeded; is there a recursive latex environment?")},checkEqnEnv(t,e=!0){let i=t.stack.Top(),r=i.First;if(!(i.getProperty("nestable")&&e&&!r||i.getProperty("nestStart"))&&(!i.isKind("start")||r))throw new M("ErroneousNestingEq","Erroneous nesting of equation structures")},copyNode(t,e){let i=t.copy(),r=e.configuration;return i.walkTree(s=>{r.addNode(s.kind,s);let n=(s.getProperty("in-lists")||"").split(/,/);for(let a of n)a&&r.addNode(a,s)}),i},mmlFilterAttribute(t,e,i){return i},getFontDef(t){let e=t.stack.env.font;return e?{mathvariant:e}:{}},keyvalOptions(t,e=null,i=!1,r=!1){let s=_2(t,r);if(e)for(let n of Object.keys(s))if(Object.hasOwn(e,n)){if(e[n]instanceof Bs){let a=e[n],o=String(s[n]);if(!a.verify(o))throw new M("InvalidValue","Value for key '%1' is not of the expected type",n);s[n]=a.convert(o)}}else{if(i)throw new M("InvalidOption","Invalid option: %1",n);delete s[n]}return s},isLatinOrGreekChar(t){return!!t.normalize("NFD").match(/[a-zA-Z\u0370-\u03F0]/)}},j2=class{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]=this.getBraces(t)+(t.cstart[t.j]||""),"<":t=>t.cend[t.j-1]=this.getBraces(t)+(t.cend[t.j-1]||""),"@":t=>this.addAt(t,this.getBraces(t)),"!":t=>this.addBang(t,this.getBraces(t)),"*":t=>this.repeat(t),"{":t=>this.brace(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=>{},"\n":t=>{}},this.MAXCOLUMNS=1e4}process(t,e,i){let r={parser:t,template:e,i:0,j:0,c:"",cwidth:[],calign:[],cspace:[],clines:[],cstart:i.cstart,cend:i.cend,ralign:i.ralign,cextra:i.cextra};if(e.charAt(0)==="{"&&e.slice(-1)==="}"){let n=this.getBraces(r);n.length===e.length-2&&(r.template=n),r.i=0}let s=0;for(;r.i<r.template.length;){if(s++>this.MAXCOLUMNS)throw new M("MaxColumns","Too many column specifiers (perhaps looping column definitions?)");let n=r.template.codePointAt(r.i),a=r.c=String.fromCodePoint(n);r.i+=a.length,this.processColumn(r,a)}this.setColumnAlign(r,i),this.setColumnWidths(r,i),this.setColumnSpacing(r,i),this.setColumnLines(r,i),this.setPadding(r,i)}processColumn(t,e){if(!Object.hasOwn(this.columnHandler,e))throw new M("BadPreamToken","Illegal pream-token (%1)",e);this.columnHandler[e](t)}setColumnAlign(t,e){e.arraydef.columnalign=t.calign.join(" ")}setColumnWidths(t,e){if(!t.cwidth.length)return;let i=[...t.cwidth];i.length<t.calign.length&&i.push("auto"),e.arraydef.columnwidth=i.map(r=>r||"auto").join(" ")}setColumnSpacing(t,e){if(!t.cspace.length)return;let i=[...t.cspace];i.length<t.calign.length&&i.push("1em"),e.arraydef.columnspacing=i.slice(1).map(r=>r||"1em").join(" ")}setColumnLines(t,e){if(!t.clines.length)return;let i=[...t.clines];i[0]&&e.frame.push(["left",i[0]]),i.length>t.calign.length?e.frame.push(["right",i.pop()]):i.length<t.calign.length&&i.push("none"),i.length>1&&(e.arraydef.columnlines=i.slice(1).map(r=>r||"none").join(" "))}setPadding(t,e){if(!t.cextra[0]&&!t.cextra[t.calign.length-1])return;let i=t.calign.length-1,r=t.cspace,s=t.cextra[i]?r[i]:null;e.arraydef["data-array-padding"]=`${r[0]||".5em"} ${s||".5em"}`}getColumn(t,e,i="left"){t.calign[t.j]=i||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){let e=this.getBraces(t);if(!Ot.matchDimen(e)[0])throw new M("MissingColumnDimOrUnits","Missing dimension or its units for %1 column declaration",t.c);return e}getAlign(t){return zs(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 M("MissingArgForColumn","Missing argument for %1 column declaration",t.c);if(t.template[t.i]!=="{")return t.template[t.i++];let e=++t.i,i=1;for(;t.i<t.template.length;)switch(t.template.charAt(t.i++)){case"\\":t.i++;break;case"{":i++;break;case"}":if(--i===0)return t.template.slice(e,t.i-1)}throw new M("MissingCloseBrace","Missing close brace")}macroColumn(t,e,i){let r=[];for(;i>0&&i--;)r.push(this.getBraces(t));t.template=Z.substituteArgs(t.parser,r,e)+t.template.slice(t.i),t.i=0}addRule(t,e){t.clines[t.j]&&this.addAt(t,"\\,"),t.clines[t.j]=e,t.cspace[t.j]==="0"&&(t.cstart[t.j]="\\hspace{.5em}")}addAt(t,e){let{cstart:i,cspace:r,j:s}=t;t.cextra[s]=!0,t.calign[s]="center",t.clines[s]&&(r[s]===".5em"?i[s-1]+="\\hspace{.25em}":r[s]||(t.cend[s-1]=(t.cend[s-1]||"")+"\\hspace{.5em}")),i[s]=e,r[s]="0",r[++t.j]="0"}addBang(t,e){let{cstart:i,cspace:r,j:s}=t;t.cextra[s]=!0,t.calign[s]="center",i[s]=(r[s]==="0"&&t.clines[s]?"\\hspace{.25em}":"")+e,r[s]||(r[s]=".5em"),r[++t.j]=".5em"}repeat(t){let e=this.getBraces(t),i=this.getBraces(t),r=parseInt(e);if(String(r)!==e)throw new M("ColArgNotNum","First argument to %1 column specifier must be a number","*");t.template=Array(r).fill(i).join("")+t.template.substring(t.i),t.i=0}brace(t){t.i--,this.processColumn(t,this.getBraces(t))}},hn=lt.Variant,Vh=class rh{constructor(e,i=[]){this.options={},this.columnParser=new j2,this.packageData=new Map,this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.handlers=e.handlers,this.nodeFactory=new u1,this.nodeFactory.configuration=this,this.nodeFactory.setCreators(e.nodes),this.itemFactory=new d1(e.items),this.itemFactory.configuration=this,Xe(this.options,...i),Xe(this.options,e.options),this.mathStyle=rh.getVariant.get(this.options.mathStyle)||rh.getVariant.get("TeX")}pushParser(e){this.parsers.unshift(e)}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(e,i){let r=this.nodeLists[e];if(r||(r=this.nodeLists[e]=[]),r.push(i),i.kind!==e){let s=C.getProperty(i,"in-lists")||"",n=(s?s.split(/,/):[]).concat(e).join(",");C.setProperty(i,"in-lists",n)}}getList(e){let i=this.nodeLists[e]||[],r=[];for(let s of i)this.inTree(s)&&r.push(s);return this.nodeLists[e]=r,r}removeFromList(e,i){let r=this.nodeLists[e]||[];for(let s of i){let n=r.indexOf(s);n>=0&&r.splice(n,1)}}inTree(e){for(;e&&e!==this.root;)e=e.parent;return!!e}};Vh.getVariant=new Map([["TeX",(t,e)=>e&&t.match(/^[\u0391-\u03A9\u03F4]/)?hn.NORMAL:""],["ISO",t=>hn.ITALIC],["French",t=>t.normalize("NFD").match(/^[a-z]/)?hn.ITALIC:hn.NORMAL],["upright",t=>hn.NORMAL]]);var sh=class{constructor(t="???",e=""){this.tag=t,this.id=e}},el=class{constructor(t="",e=!1,i=!1,r=null,s="",n="",a=!1,o=""){this.env=t,this.taggable=e,this.defaultTags=i,this.tag=r,this.tagId=s,this.tagFormat=n,this.noTag=a,this.labelId=o}},go=class{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 el,this.history=[],this.stack=[],this.enTag=function(t,e){let i=this.configuration.nodeFactory,r=i.create("node","mtd",[t]),s=i.create("node","mlabeledtr",[e,r]);return i.create("node","mtable",[s],{side:this.configuration.options.tagSide,minlabelspacing:this.configuration.options.tagIndent,displaystyle:!0})}}start(t,e,i){this.currentTag&&this.stack.push(this.currentTag);let r=this.label;this.currentTag=new el(t,e,i),this.label=r}get env(){return this.currentTag.env}end(){this.history.push(this.currentTag);let 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(){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();let 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 el("",void 0,void 0),this.labels={},this.ids={},this.counter=this.allCounter,this.redo=!1;let 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||this.currentTag.tag==null)return t;let i=this.makeTag();return this.enTag(t,i)}makeId(){this.currentTag.tagId=this.formatId(this.configuration.options.useLabelIds&&this.label||this.currentTag.tag)}makeTag(){this.makeId(),this.label&&(this.label=(this.labels[this.label]=new sh(this.currentTag.tag,this.currentTag.tagId),""));let t=this.currentTag.tagFormat,e=new ue((Array.isArray(t)?t:t.match(/^(\(|\[|\{)(.*)(\}|\]|\))$/)?.slice(1)||[t]).map(i=>i?`\\text{${i}}`:"").join(""),{},this.configuration).mml();return this.configuration.nodeFactory.create("node","mtd",[e],{id:this.currentTag.tagId,rowalign:this.configuration.options.tagAlign})}},il=new Map([["none",class extends go{autoTag(){}getTag(){return this.currentTag.tag?super.getTag():null}}],["all",class extends go{finalize(t,e){if(!e.display||this.history.find(function(r){return r.taggable}))return t;let i=this.getTag(!0);return this.enTag(t,i)}}]]),ca="none",yr={OPTIONS:{tags:ca,tagSide:"right",tagIndent:"0.8em",useLabelIds:!0,ignoreDuplicateLabels:!1,tagAlign:"baseline"},add(t,e){il.set(t,e)},addTags(t){for(let e of Object.keys(t))yr.add(e,t[e])},create(t){let e=il.get(t)||il.get(ca);if(!e)throw Error("Unknown tags class");return new e},setDefault(t){ca=t},getDefault(){return yr.create(ca)}},nh=class{constructor(t,e,i){this._token=t,this._char=e,this._attributes=i}get token(){return this._token}get char(){return this._char}get attributes(){return this._attributes}},bs=class{constructor(t,e,i=[]){this._token=t,this._func=e,this._args=i}get token(){return this._token}get func(){return this._func}get args(){return this._args}};function Do(t){return t===void 0||t}var p1=class{constructor(t,e){this._name=t,this._parser=e,Po.register(this)}get name(){return this._name}parserFor(t){return this.contains(t)?this.parser:null}parse([t,e]){let i=this.parserFor(e),r=this.lookup(e);return i&&r?Do(i(t,r)):null}set parser(t){this._parser=t}get parser(){return this._parser}},Hs=class extends p1{constructor(t,e,i){super(t,e),this._regExp=i}contains(t){return this._regExp.test(t)}lookup(t){return this.contains(t)?t:null}},m1=class extends p1{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)}},pi=class extends m1{constructor(t,e,i){super(t,e);for(let r of Object.keys(i)){let s=i[r],[n,a]=typeof s=="string"?[s,null]:s,o=new nh(r,n,a);this.add(r,o)}}},Xn=class extends pi{parse([t,e]){return super.parse([t,"\\"+e])}},Vr=class extends m1{constructor(t,e,i={}){super(t,null);let r=s=>typeof s=="string"?i[s]:s;for(let[s,n]of Object.entries(e)){let a,o;Array.isArray(n)?(a=r(n[0]),o=n.slice(1)):(a=r(n),o=[]);let h=new bs(s,a,o);this.add(s,h)}}parserFor(t){let e=this.lookup(t);return e?e.func:null}parse([t,e]){let i=this.lookup(e),r=this.parserFor(e);return!i||!r?null:Do(r(t,i.token,...i.args))}},De=class extends Vr{parse([t,e]){let i=this.lookup(e),r=this.parserFor(e);if(!i||!r)return null;let s=t.currentCS;t.currentCS="\\"+e;let n=r(t,"\\"+i.token,...i.args);return t.currentCS=s,Do(n)}},Qs=class extends Vr{constructor(t,e,i,r={}){super(t,i,r),this.parser=e}parse([t,e]){let i=this.lookup(e),r=this.parserFor(e);return!i||!r?null:Do(this.parser(t,i.token,r,i.args))}},rd=new Map,Po={register(t){rd.set(t.name,t)},getMap(t){return rd.get(t)}},Xh=class f1{constructor(){this._configuration=new Tr,this._fallback=new Gr}add(e,i,r=Tr.DEFAULTPRIORITY){for(let s of e.slice().reverse()){let n=Po.getMap(s);if(!n){this.warn(`Configuration '${s}' not found! Omitted.`);return}this._configuration.add(n,r)}i&&this._fallback.add(i,r)}remove(e,i=null){for(let r of e){let s=this.retrieve(r);s&&this._configuration.remove(s)}i&&this._fallback.remove(i)}parse(e){for(let{item:s}of this._configuration){let n=s.parse(e);if(n===f1.FALLBACK)break;if(n)return n}let[i,r]=e;Array.from(this._fallback)[0].item(i,r)}lookup(e){let i=this.applicable(e);return i?i.lookup(e):null}contains(e){let i=this.applicable(e);return!!i&&!(i instanceof pi&&i.lookup(e).char===null)}toString(){let e=[];for(let{item:i}of this._configuration)e.push(i.name);return e.join(", ")}applicable(e){for(let{item:i}of this._configuration)if(i.contains(e))return i;return null}retrieve(e){for(let{item:i}of this._configuration)if(i.name===e)return i;return null}warn(e){console.log("TexParser Warning: "+e)}};Xh.FALLBACK=Symbol("fallback");var U2=class{constructor(){this.map=new Map}add(t,e,i=Tr.DEFAULTPRIORITY){for(let r of Object.keys(t)){let s=r,n=this.get(s);n||(n=new Xh,this.set(s,n)),n.add(t[s],e[s],i)}}remove(t,e){for(let i of Object.keys(t)){let r=this.get(i);r&&r.remove(t[i],e[i])}}set(t,e){this.map.set(t,e)}get(t){return this.map.get(t)}retrieve(t){for(let e of this.map.values()){let i=e.retrieve(t);if(i)return i}return null}keys(){return this.map.keys()}},Ie=class ka{static makeProcessor(e,i){return Array.isArray(e)?e:[e,i]}static _create(e,i={}){let r=i.priority??Tr.DEFAULTPRIORITY,s=i.init?this.makeProcessor(i.init,r):null,n=i.config?this.makeProcessor(i.config,r):null,a=(i.preprocessors||[]).map(d=>this.makeProcessor(d,r)),o=(i.postprocessors||[]).map(d=>this.makeProcessor(d,r)),h=i.parser||"tex";return new ka(e,i[ct.HANDLER]||{},i[ct.FALLBACK]||{},i[ct.ITEMS]||{},i[ct.TAGS]||{},i[ct.OPTIONS]||{},i[ct.NODES]||{},a,o,s,n,r,h)}static create(e,i={}){let r=ka._create(e,i);return g1.set(e,r),r}static local(e={}){return ka._create("",e)}constructor(e,i={},r={},s={},n={},a={},o={},h=[],d=[],p=null,E=null,y,A){this.name=e,this.handler=i,this.fallback=r,this.items=s,this.tags=n,this.options=a,this.nodes=o,this.preprocessors=h,this.postprocessors=d,this.initMethod=p,this.configMethod=E,this.priority=y,this.parser=A,this.handler=Object.assign({[ht.CHARACTER]:[],[ht.DELIMITER]:[],[ht.MACRO]:[],[ht.ENVIRONMENT]:[]},i)}get init(){return this.initMethod?this.initMethod[0]:null}get config(){return this.configMethod?this.configMethod[0]:null}},rl=new Map,g1={set(t,e){rl.set(t,e)},get(t){return rl.get(t)},keys(){return rl.keys()}},b1=class{constructor(t,e=["tex"]){this.initMethod=new Gr,this.configMethod=new Gr,this.configurations=new Tr,this.parsers=[],this.handlers=new U2,this.items={},this.tags={},this.options={},this.nodes={},this.parsers=e;for(let i of t.slice().reverse())this.addPackage(i);for(let{item:i,priority:r}of this.configurations)this.append(i,r)}init(){this.initMethod.execute(this)}config(t){this.configMethod.execute(this,t);for(let e of this.configurations)this.addFilters(t,e.item)}addPackage(t){let e=typeof t=="string"?t:t[0],i=this.getPackage(e);i&&this.configurations.add(i,typeof t=="string"?i.priority:t[1])}add(t,e,i={}){let r=this.getPackage(t);this.append(r),this.configurations.add(r,r.priority),this.init();let s=e.parseOptions;s.nodeFactory.setCreators(r.nodes);for(let n of Object.keys(r.items))s.itemFactory.setNodeClass(n,r.items[n]);yr.addTags(r.tags),Xe(s.options,r.options),fi(s.options,i),this.addFilters(e,r),r.config&&r.config(this,e)}getPackage(t){let e=g1.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),Xe(this.options,t.options),Object.assign(this.nodes,t.nodes)}addFilters(t,e){for(let[i,r]of e.preprocessors)t.preFilters.add(i,r);for(let[i,r]of e.postprocessors)t.postFilters.add(i,r)}warn(t){console.warn("MathJax Warning: "+t)}},ur=["top","right","bottom","left"],cn=["width","style","color"];function $h(t){let e=t.split(/((?:'[^'\n]*'|"[^"\n]*"|,[\s\n]|[^\s\n])*)/g),i=[];for(;e.length>1;)e.shift(),i.push(e.shift());return i}function dn(t){let e=$h(this.styles[t]);e.length===0&&e.push(""),e.length===1&&e.push(e[0]),e.length===2&&e.push(e[0]),e.length===3&&e.push(e[1]);for(let i of gi.connect[t].children)this.setStyle(this.childName(t,i),e.shift())}function ah(t){let e=gi.connect[t].children,i=[];for(let r of e){let s=this.styles[this.childName(t,r)];if(!s){delete this.styles[t];return}i.push(s)}i[3]===i[1]&&(i.pop(),i[2]===i[0]&&(i.pop(),i[1]===i[0]&&i.pop())),this.styles[t]=i.join(" ")}function sl(t){ah.call(this,t),this.combineChildren(t),Kh.call(this,t),this.combineParent(t)}function H2(t){for(let e of gi.connect[t].children)this.setStyle(this.childName(t,e),this.styles[t])}function Kh(t){if(!gi.connect[t])return;let e=[...gi.connect[t].children],i=this.styles[this.childName(t,e.shift())];for(let r of e)if(this.styles[this.childName(t,r)]!==i){delete this.styles[t];return}i&&(this.styles[t]=i)}var sd={width:/^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,style:/^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/};function da(t){let e={width:"",style:"",color:""};for(let i of $h(this.styles[t]))i.match(sd.width)&&e.width===""?e.width=i:i.match(sd.style)&&e.style===""?e.style=i:e.color=i;for(let i of gi.connect[t].children)this.setStyle(this.childName(t,i),e[i])}function ua(t){let e=[];for(let i of gi.connect[t].children){let r=this.styles[this.childName(t,i)];r&&e.push(r)}e.length>1?this.styles[t]=e.join(" "):delete this.styles[t]}var nd={style:/^(?:normal|italic|oblique|inherit|initial|unset)$/,variant: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:RegExp("^(?:"+["normal","(?:(?:ultra|extra|semi)-)?(?:condensed|expanded)","inherit|initial|unset"].join("|")+")$"),size: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 W2(t){let e=$h(this.styles[t]),i={style:"",variant:[],weight:"",stretch:"",size:"",family:"","line-height":""};for(let r of e){i.family||(i.family=r);for(let s of Object.keys(nd))if((Array.isArray(i[s])||i[s]==="")&&r.match(nd[s]))if(i.family===r&&(i.family=""),s==="size"){let[n,a]=r.split(/\//);i[s]=n,a&&(i["line-height"]=a)}else i.size===""&&(Array.isArray(i[s])?i[s].push(r):i[s]===""&&(i[s]=r))}z2.call(this,t,i),delete this.styles[t]}function z2(t,e){for(let i of gi.connect[t].children){let r=this.childName(t,i);if(Array.isArray(e[i])){let s=e[i];s.length&&(this.styles[r]=s.join(" "))}else e[i]!==""&&(this.styles[r]=e[i])}}function q2(t){}var gi=class Fi{constructor(e=""){this.parse(e)}sanitizeValue(e){let i=this.constructor.pattern;if(!e.match(i.sanitize))return e;e=e.replace(i.value,"$1");let r=e.replace(/\\./g,"").replace(/(['"]).*?\1/g,"").replace(/[^'"]/g,"");return r.length&&(e+=r.charAt(0)),e}get cssText(){let e=[];for(let i of Object.keys(this.styles)){let r=this.parentName(i),s=i.replace(/.*-/,""),n=this.childName(this.parentName(r),s);this.styles[i]&&!this.styles[n]&&(!this.styles[r]||!Fi.connect[r]?.children?.includes(s))&&e.push(`${i}: ${this.styles[i]};`)}return e.join(" ")}get styleList(){return Object.assign({},this.styles)}set(e,i){e=this.normalizeName(e),this.setStyle(e,String(i));let r=Fi.connect[e];if(r?.subPart){r.combine.call(this,e);return}if(this.combineParent(e),e.match(/-.*-/)){let s=e.replace(/-.*-/,"-");Kh.call(this,s)}}combineParent(e){for(;e.match(/-/);){let r=e;e=this.parentName(e);let s=Fi.connect[e];if(!Fi.connect[r]&&!s?.children?.includes(r.substring(e.length+1)))break;s.combine.call(this,e)}if(!this.styles[e])return;let i=Fi.connect[e];for(let r of i?.parts||[])delete this.styles[this.childName(e,r)]}get(e){return e=this.normalizeName(e),Object.hasOwn(this.styles,e)?this.styles[e]:""}setStyle(e,i){this.styles[e]=this.sanitizeValue(i),Fi.connect[e]?.children&&Fi.connect[e].split.call(this,e),i===""&&delete this.styles[e]}combineChildren(e){let i=this.parentName(e);for(let r of Fi.connect[e].children){let s=this.childName(i,r);Fi.connect[s].combine.call(this,s)}}parentName(e){let i=e.replace(/-[^-]*$/,"");return e===i?"":i}childName(e,i){return i.match(/-/)?i:(Fi.connect[e]?.subPart&&(i+=e.replace(/.*-/,"-"),e=this.parentName(e)),e+"-"+i)}normalizeName(e){return e.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())}parse(e=""){let i=this.constructor.pattern;this.styles={};let r=e.replace(/\n/g," ").replace(i.comment,"").split(i.style);for(;r.length>1;){let[s,n,a]=r.splice(0,3);if(s.match(/[^\s\n;]/))return;this.set(n,a)}}};gi.pattern={sanitize:/['";]/,value:/^((:?'(?:\\.|[^'])*(?:'|$)|"(?:\\.|[^"])*(?:"|$)|\n|\\.|[^'";])*?)[\s\n]*(?:;|$).*/,style:/([-a-z]+)[\s\n]*:[\s\n]*((?:'(?:\\.|[^'])*(?:'|$)|"(?:\\.|[^"])*(?:"|$)|\n|\\.|[^'";])*?)[\s\n]*(?:;|$)/g,comment:/\/\*[^]*?\*\//g},gi.connect={padding:{children:ur,split:dn,combine:ah},margin:{children:ur,split:dn,combine:ah},border:{children:ur,parts:cn,split:H2,combine:Kh},"border-top":{children:cn,split:da,combine:ua},"border-right":{children:cn,split:da,combine:ua},"border-bottom":{children:cn,split:da,combine:ua},"border-left":{children:cn,split:da,combine:ua},"border-width":{children:ur,split:dn,combine:sl,subPart:!0},"border-style":{children:ur,split:dn,combine:sl,subPart:!0},"border-color":{children:ur,split:dn,combine:sl,subPart:!0},font:{children:["style","variant","weight","stretch","line-height","size","family"],split:W2,combine:q2}};var bo=class extends St{constructor(t,e){super(t),this.global=e}get kind(){return"start"}get isOpen(){return!0}checkItem(t){if(t.isKind("stop")){let e=this.toMml();return this.global.isInner||(e=this.factory.configuration.tags.finalize(e,this.env)),[[this.factory.create("mml",e)],!0]}return super.checkItem(t)}},$n=class extends St{get kind(){return"stop"}get isClose(){return!0}},oh=class extends St{get kind(){return"open"}get isOpen(){return!0}checkItem(t){if(t.isKind("close")){let e=this.toMml(),i=this.create("node","TeXAtom",[e]);return t.addLatexItem(i),[[this.factory.create("mml",i)],!0]}return super.checkItem(t)}};oh.errors=Object.assign(Object.create(St.errors),{stop:["ExtraOpenMissingClose","Extra open brace or missing close brace"]});var ad=class extends St{get kind(){return"close"}get isClose(){return!0}},od=class extends St{get kind(){return"null"}},ld=class extends St{get kind(){return"prime"}checkItem(t){let[e,i]=this.Peek(2),r=(C.isType(e,"msubsup")||C.isType(e,"msup"))&&!C.getChildAt(e,e.sup),s=(C.isType(e,"munderover")||C.isType(e,"mover"))&&!C.getChildAt(e,e.over)&&!C.getProperty(e,"subsupOK");if(!r&&!s)return[[this.create("node",e.getProperty("movesupsub")?"mover":"msup",[e,i]),t],!0];let n=r?e.sup:e.over;return C.setChild(e,n,i),[[e,t],!0]}},lh=class extends St{get kind(){return"subsup"}checkItem(t){if(t.isKind("open")||t.isKind("left"))return St.success;let e=this.First,i=this.getProperty("position");if(t.isKind("mml"))return this.getProperty("primes")&&(i===2?(C.setProperty(this.getProperty("primes"),"variantForm",!0),t.First=this.create("node","mrow",[this.getProperty("primes"),t.First])):C.setChild(e,2,this.getProperty("primes"))),C.setChild(e,i,t.First),this.getProperty("movesupsub")!=null&&C.setProperty(e,"movesupsub",this.getProperty("movesupsub")),[[this.factory.create("mml",e)],!0];super.checkItem(t);let r=this.getErrors(["","sub","sup"][i]);throw new M(r[0],r[1],...r.splice(2))}};lh.errors=Object.assign(Object.create(St.errors),{stop:["MissingScript","Missing superscript or subscript argument"],sup:["MissingOpenForSup","Missing open brace for superscript"],sub:["MissingOpenForSub","Missing open brace for subscript"]});var hd=class extends St{constructor(t){super(t),this.setProperty("name","\\over")}get kind(){return"over"}get isClose(){return!0}checkItem(t){if(t.isKind("over"))throw new M("AmbiguousUseOf","Ambiguous use of %1",t.getName());if(t.isClose){let e=this.create("node","mfrac",[this.getProperty("num"),this.toMml(!1)]);return this.getProperty("thickness")!=null&&C.setAttribute(e,"linethickness",this.getProperty("thickness")),(this.getProperty("ldelim")||this.getProperty("rdelim"))&&(C.setProperty(e,"withDelims",!0),e=Z.fixedFence(this.factory.configuration,this.getProperty("ldelim"),e,this.getProperty("rdelim"))),e.attributes.set(lt.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("; ")+"]"}},hh=class extends St{constructor(t,e){super(t),this.setProperty("delim",e)}get kind(){return"left"}get isOpen(){return!0}checkItem(t){if(t.isKind("right")){let e=Z.fenced(this.factory.configuration,this.getProperty("delim"),this.toMml(),t.getProperty("delim"),"",t.getProperty("color")),i=e.childNodes[0],r=e.childNodes[e.childNodes.length-1],s=this.factory.create("mml",e);return this.addLatexItem(i,"\\left"),t.addLatexItem(r,"\\right"),s.Peek()[0].attributes.set(lt.Attr.LATEXITEM,"\\left"+t.startStr.slice(this.startI,t.stopI)),[[s],!0]}if(t.isKind("middle")){let e={stretchy:!0,symmetric:!0};t.getProperty("color")&&(e.mathcolor=t.getProperty("color"));let i=this.create("token","mo",e,t.getProperty("delim"));return t.addLatexItem(i,"\\middle"),this.Push(this.create("node","TeXAtom",[],{texClass:L.CLOSE}),i,this.create("node","TeXAtom",[],{texClass:L.OPEN})),this.env={},[[this],!0]}return super.checkItem(t)}};hh.errors=Object.assign(Object.create(St.errors),{stop:["ExtraLeftMissingRight","Extra \\left or missing \\right"]});var cd=class extends St{constructor(t,e,i){super(t),this.setProperty("delim",e),i&&this.setProperty("color",i)}get kind(){return"middle"}get isClose(){return!0}},dd=class extends St{constructor(t,e,i){super(t),this.setProperty("delim",e),i&&this.setProperty("color",i)}get kind(){return"right"}get isClose(){return!0}},ud=class extends St{get kind(){return"break"}constructor(t,e,i){super(t),this.setProperty("linebreak",e),this.setProperty("insert",i)}checkItem(t){let e=this.getProperty("linebreak");if(t.isKind("mml")){let r=t.First;if(r.isKind("mo")){if((C.getOp(r)?.[3]?.linebreakstyle||C.getAttribute(r,"linebreakstyle"))!=="after")return C.setAttribute(r,"linebreak",e),[[t],!0];if(!this.getProperty("insert"))return[[t],!0]}}let i=this.create("token","mspace",{linebreak:e});return[[this.factory.create("mml",i),t],!0]}},ch=class extends St{get kind(){return"begin"}get isOpen(){return!0}checkItem(t){if(t.isKind("end")){if(t.getName()!==this.getName())throw new M("EnvBadEnd","\\begin{%1} ended with \\end{%2}",this.getName(),t.getName());let e=this.toMml();return t.addLatexItem(e),[[this.factory.create("mml",e)],!0]}if(t.isKind("stop"))throw new M("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}},pd=class extends St{get kind(){return"end"}get isClose(){return!0}},Kn=class extends St{get kind(){return"style"}checkItem(t){if(!t.isClose)return super.checkItem(t);let e=this.create("node","mstyle",this.nodes,this.getProperty("styles"));return[[this.factory.create("mml",e),t],!0]}},md=class extends St{get kind(){return"position"}checkItem(t){if(t.isClose)throw new M("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)}},fd=class extends St{get kind(){return"cell"}get isClose(){return!0}},Eo=class extends St{get isFinal(){return!0}get kind(){return"mml"}},gd=class extends St{get kind(){return"fn"}checkItem(t){let e=this.First;if(e){if(t.isOpen)return St.success;if(!t.isKind("fn")){let i=t.First;if(!t.isKind("mml")||!i||C.isType(i,"mstyle")&&i.childNodes.length&&C.isType(i.childNodes[0].childNodes[0],"mspace")||C.isType(i,"mspace"))return[[e,t],!0];C.isEmbellished(i)&&(i=C.getCoreMO(i));let r=C.getForm(i);if(r!=null&&[0,0,1,1,0,1,1,0,0,0][r[2]])return[[e,t],!0]}return e.isKind("TeXAtom")&&e.isEmpty?[[e,t],!0]:[[e,this.create("token","mo",{texClass:L.NONE},Hr.ApplyFunction),t],!0]}return super.checkItem(t)}},bd=class extends St{constructor(){super(...arguments),this.remap=Po.getMap("not_remap")}get kind(){return"not"}checkItem(t){let e,i,r;if(t.isKind("open")||t.isKind("left"))return St.success;if(t.isKind("mml")&&(C.isType(t.First,"mo")||C.isType(t.First,"mi")||C.isType(t.First,"mtext"))&&(e=t.First,i=C.getText(e),i.length===1&&!C.getProperty(e,"movesupsub")&&C.getChildren(e).length===1))return this.remap.contains(i)?(r=this.create("text",this.remap.lookup(i).char),C.setChild(e,0,r)):(r=this.create("text","̸"),C.appendChildren(e,[r])),[[t],!0];r=this.create("text","⧸");let s=this.create("node","mtext",[],{},r),n=this.create("node","mpadded",[s],{width:0});return e=this.create("node","TeXAtom",[n],{texClass:L.REL}),[[e,t],!0]}},Ed=class extends St{get kind(){return"nonscript"}checkItem(t){if(t.isKind("mml")&&t.Size()===1){let e=t.First;if(e.isKind("mstyle")&&e.notParent&&(e=C.getChildren(C.getChildren(e)[0])[0]),e.isKind("mspace")){if(e!==t.First){let i=this.create("node","mrow",[t.Pop()]);t.Push(i)}this.factory.configuration.addNode("nonscript",t.First)}}return[[t],!0]}},yd=class extends St{get kind(){return"dots"}checkItem(t){if(t.isKind("open")||t.isKind("left"))return St.success;let e=this.getProperty("ldots"),i=t.First;if(t.isKind("mml")&&C.isEmbellished(i)){let r=C.getTexClass(C.getCoreMO(i));(r===L.BIN||r===L.REL)&&(e=this.getProperty("cdots"))}return[[e,t],!0]}},jr=class extends St{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(),St.fail;if(t.getProperty("isCR"))return this.EndEntry(),this.EndRow(),this.clearEnv(),this.StartEntry(),St.fail;this.EndTable(),this.clearEnv();let e=this.factory.create("mml",this.createMml());if(this.getProperty("requireClose")){if(t.isKind("close"))return[[e],!0];throw new M("MissingCloseBrace","Missing close brace")}return[[e,t],!0]}return super.checkItem(t)}createMml(){let 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&&C.setAttribute(e,"data-break-align",this.breakAlign.table),this.getProperty("arrayPadding")&&(C.setAttribute(e,"data-frame-styles",""),C.setAttribute(e,"framespacing",this.getProperty("arrayPadding"))),e=this.handleFrame(e),t!==void 0&&(e=this.create("node","mstyle",[e],{scriptlevel:t})),(this.getProperty("open")||this.getProperty("close"))&&(e=Z.fenced(this.factory.configuration,this.getProperty("open"),e,this.getProperty("close"))),e}handleFrame(t){if(!this.frame.length)return t;let e=new Map(this.frame),i=this.frame.reduce((s,[,n])=>n===s?n:"",this.frame[0][1]);if(i){if(this.frame.length===4)return C.setAttribute(t,"frame",i),C.removeAttribute(t,"data-frame-styles"),t;if(i==="solid")return C.setAttribute(t,"data-frame-styles",""),t=this.create("node","menclose",[t],{notation:Array.from(e.keys()).join(" "),"data-padding":0}),t}let r=ur.map(s=>e.get(s)||"none").join(" ");return C.setAttribute(t,"data-frame-styles",r),t}StartEntry(){let t=this.row.length,e=this.cstart[t],i=this.cend[t],r=this.ralign[t],s=this.cextra;if(!e&&!i&&!r&&!s[t]&&!s[t+1])return;let[n,a,o,h]=this.getEntry();if(s[t]&&(!this.atEnd||s[t+1])&&(e+="&"),o!=="&"&&(h=!!a.trim()||!!(t||o&&o.substring(0,4)!=="\\end"),s[t+1]&&!s[t]&&(i=(i||"")+"&",this.atEnd=!0)),!h&&!n)return;let d=this.parser;if(h&&(e&&(a=Z.addArgs(d,e,a)),i&&(a=Z.addArgs(d,a,i)),r&&(a="\\text{"+a.trim()+"}"),(e||i||r)&&++this.templateSubs>d.configuration.options.maxTemplateSubtitutions))throw new M("MaxTemplateSubs","Maximum template substitutions exceeded; is there an invalid use of \\\\ in the template?");n&&(a=Z.addArgs(d,n,a)),d.string=Z.addArgs(d,a,d.string),d.i=0}getEntry(){let t=this.parser,e=/^([^]*?)([&{}]|\\\\|\\(?:begin|end)\s*\{array\}|\\cr|\\)/,i=0,r=0,s=t.i,n,a=["","","",!1];for(;(n=t.string.slice(s).match(e))!==null;)switch(s+=n[0].length,n[2]){case"\\":s++;break;case"{":i++;break;case"}":if(!i)return a;i--;break;case"\\begin{array}":i||r++;break;case"\\end{array}":if(!i&&r){r--;break}default:{if(i||r)continue;s-=n[2].length;let o=t.string.slice(t.i,s).trim(),h=o.match(/^(?:\s*\\(?:h(?:dash)?line|hfil{1,3}|rowcolor\s*\{.*?\}))+/);return h&&(o=o.slice(h[0].length)),t.string=t.string.slice(s),t.i=0,[h?.[0]||"",o,n[2],!0]}}return a}EndEntry(){let t=this.create("node","mtd",this.nodes);this.hfill.length&&(this.hfill[0]===0&&C.setAttribute(t,"columnalign","right"),this.hfill[this.hfill.length-1]===this.Size()&&C.setAttribute(t,"columnalign",C.getAttribute(t,"columnalign")?"center":"left"));let e=this.ralign[this.row.length];if(e){let[i,r,s]=e,n=this.create("node","mpadded",t.childNodes[0].childNodes,{width:r,"data-overflow":"auto","data-align":s,"data-vertical-align":i});n.setProperty("vbox",i),t.childNodes[0].childNodes=[],t.appendChild(n)}else this.breakAlign.cell&&C.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")&&this.row.length===3?(this.row.unshift(this.row.pop()),t="mlabeledtr"):this.getProperty("isLabeled")&&(t="mlabeledtr",this.setProperty("isLabeled",!1));let e=this.create("node",t,this.row);this.breakAlign.row&&(C.setAttribute(e,"data-break-align",this.breakAlign.row),this.breakAlign.row=""),this.addLatexItem(e),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){let 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")){let 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){let e=this.arraydef.rowspacing.split(/ /);if(!this.getProperty("rowspacing")){let r=Ot.dimen2em(e[0]);this.setProperty("rowspacing",r)}let i=this.getProperty("rowspacing");for(;e.length<this.table.length;)e.push(Ot.em(i));e[this.table.length-1]=Ot.em(Math.max(0,i+Ot.dimen2em(t))),this.arraydef.rowspacing=e.join(" ")}}},dh=class extends jr{constructor(t,...e){super(t),this.maxrow=0,this.factory.configuration.tags.start(e[0],e[2],e[1])}get kind(){return"eqnarray"}EndEntry(){let t=this.arraydef.columnalign.split(/ /);(this.row.length&&t.length?t[this.row.length%t.length]:"right")!=="right"&&Z.fixInitialMO(this.factory.configuration,this.nodes),super.EndEntry()}EndRow(){this.row.length>this.maxrow&&(this.maxrow=this.row.length);let 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;let i=this.arraydef[t].split(/ /),r=[...i];if(r.length>1){for(;r.length<e;)r.push(...i);this.arraydef[t]=r.slice(0,e).join(" ")}}addIndentshift(){let t=this.arraydef.columnalign.split(/ /),e="";for(let i of t.keys()){if(t[i]==="left"&&i>0){let r=e==="center"?".7em":"2em";for(let s of this.table){let n=s.childNodes[s.isKind("mlabeledtr")?i+1:i];if(n){let a=this.create("node","mstyle",n.childNodes[0].childNodes,{indentshift:r});n.childNodes[0].childNodes=[],n.appendChild(a)}}}e=t[i]}}},xd=class extends ch{get kind(){return"mstyle"}constructor(t,e,i){super(t),this.attrList=e,this.setProperty("name",i)}checkItem(t){return t.isKind("end")&&t.getName()===this.getName()?[[this.create("node","mstyle",[this.toMml()],this.attrList)],!0]:super.checkItem(t)}},Nd=class extends St{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")){let e=this.toMml(),i=this.factory.configuration.tags.getTag();return this.factory.configuration.tags.end(),[[i?this.factory.configuration.tags.enTag(e,i):e,t],!0]}if(t.isKind("stop"))throw new M("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}},G2=1.2/.85,V2={fontfamily:1,fontsize:1,fontweight:1,fontstyle:1,color:1,background:1,id:1,class:1,href:1,style:1};function Fs(t,e=1/0){let i=t.replace(/\s+/g,"").split("").map(r=>{let s={t:"top",b:"bottom",m:"middle",c:"center"}[r];if(!s)throw new M("BadBreakAlign","Invalid alignment character: %1",r);return s});if(i.length>e)throw new M("TooManyAligns","Too many alignment characters: %1",t);return e===1?i[0]:i.join(" ")}function vd(t,e){let i=t.stack.env,r=i.inRoot;i.inRoot=!0;let s=new ue(e,i,t.configuration),n=s.mml(),a=s.stack.global;if(a.leftRoot||a.upRoot){let o={};a.leftRoot&&(o.width=a.leftRoot),a.upRoot&&(o.voffset=a.upRoot,o.height=a.upRoot),n=t.create("node","mpadded",[n],o)}return i.inRoot=r,n}var N={Open(t,e){t.Push(t.itemFactory.create("open"))},Close(t,e){t.Push(t.itemFactory.create("close"))},Bar(t,e){let i=t.create("token","mo",{stretchy:!1,texClass:L.ORD},e);i.setProperty("keep-attrs","stretchy"),t.Push(i)},Tilde(t,e){t.Push(t.create("token","mtext",{},Hr.nbsp))},Space(t,e){},Superscript(t,e){t.GetNext().match(/\d/)&&(t.string=t.string.substring(0,t.i+1)+" "+t.string.substring(t.i+1));let i,r,s=t.stack.Top();s.isKind("prime")?([r,i]=s.Peek(2),t.stack.Pop()):(r=t.stack.Prev(),r||(r=t.create("token","mi",{},"")));let n=C.getProperty(r,"movesupsub"),a=C.isType(r,"msubsup")?r.sup:r.over;if(C.isType(r,"msubsup")&&!C.isType(r,"msup")&&C.getChildAt(r,r.sup)||C.isType(r,"munderover")&&!C.isType(r,"mover")&&C.getChildAt(r,r.over)&&!C.getProperty(r,"subsupOK"))throw new M("DoubleExponent","Double exponent: use braces to clarify");(!C.isType(r,"msubsup")||C.isType(r,"msup"))&&(n?((!C.isType(r,"munderover")||C.isType(r,"mover")||C.getChildAt(r,r.over))&&(r=t.create("node","munderover",[r],{movesupsub:!0})),a=r.over):(r=t.create("node","msubsup",[r]),a=r.sup)),t.Push(t.itemFactory.create("subsup",r).setProperties({position:a,primes:i,movesupsub:n}))},Subscript(t,e){t.GetNext().match(/\d/)&&(t.string=t.string.substring(0,t.i+1)+" "+t.string.substring(t.i+1));let i,r,s=t.stack.Top();s.isKind("prime")?([r,i]=s.Peek(2),t.stack.Pop()):(r=t.stack.Prev(),r||(r=t.create("token","mi",{},"")));let n=C.getProperty(r,"movesupsub"),a=C.isType(r,"msubsup")?r.sub:r.under;if(C.isType(r,"msubsup")&&!C.isType(r,"msup")&&C.getChildAt(r,r.sub)||C.isType(r,"munderover")&&!C.isType(r,"mover")&&C.getChildAt(r,r.under)&&!C.getProperty(r,"subsupOK"))throw new M("DoubleSubscripts","Double subscripts: use braces to clarify");(!C.isType(r,"msubsup")||C.isType(r,"msup"))&&(n?((!C.isType(r,"munderover")||C.isType(r,"mover")||C.getChildAt(r,r.under))&&(r=t.create("node","munderover",[r],{movesupsub:!0})),a=r.under):(r=t.create("node","msubsup",[r]),a=r.sub)),t.Push(t.itemFactory.create("subsup",r).setProperties({position:a,primes:i,movesupsub:n}))},Prime(t,e){let i=t.stack.Prev();if(i||(i=t.create("token","mi")),C.isType(i,"msubsup")&&!C.isType(i,"msup")&&C.getChildAt(i,i.sup)||C.isType(i,"munderover")&&!C.isType(i,"mover")&&C.getChildAt(i,i.over)&&!C.getProperty(i,"subsupOK"))throw new M("DoubleExponentPrime","Prime causes double exponent: use braces to clarify");let r="";t.i--;do r+=Hr.prime,t.i++,e=t.GetNext();while(e==="'"||e===Hr.rsquo);r=["","′","″","‴","⁗"][r.length]||r;let s=t.create("token","mo",{variantForm:!0},r);t.Push(t.itemFactory.create("prime",i,s))},Comment(t,e){for(;t.i<t.string.length&&t.string.charAt(t.i)!==`
209
+ `;)t.i++},Hash(t,e){throw new M("CantUseHash1","You can't use 'macro parameter character #' in math mode")},MathFont(t,e,i,r=""){let s=new ue(t.GetArgument(e),Object.assign(Object.assign({multiLetterIdentifiers:t.options.identifierPattern},t.stack.env),{font:i,italicFont:r,noAutoOP:!0}),t.configuration).mml();t.Push(t.create("node","TeXAtom",[s]))},SetFont(t,e,i){t.stack.env.font=i,t.Push(t.itemFactory.create("null"))},SetStyle(t,e,i,r,s){t.stack.env.style=i,t.stack.env.level=s,t.Push(t.itemFactory.create("style").setProperty("styles",{displaystyle:r,scriptlevel:s}))},SetSize(t,e,i){t.stack.env.size=i,t.Push(t.itemFactory.create("style").setProperty("styles",{mathsize:Bt(i)}))},Spacer(t,e,i){let r=t.create("node","mspace",[],{width:Bt(i)}),s=t.create("node","mstyle",[r],{scriptlevel:0});t.Push(s)},DiscretionaryTimes(t,e){t.Push(t.create("token","mo",{linebreakmultchar:"×"},"⁢"))},AllowBreak(t,e){t.Push(t.create("token","mspace"))},Break(t,e){t.Push(t.create("token","mspace",{linebreak:lt.LineBreak.NEWLINE}))},Linebreak(t,e,i){let r=!0,s=t.stack.Prev(!0);s&&s.isKind("mo")&&C.getMoAttribute(s,"linebreakstyle")!==lt.LineBreakStyle.BEFORE&&(s.attributes.set("linebreak",i),r=!1),t.Push(t.itemFactory.create("break",i,r))},LeftRight(t,e){let i=e.substring(1);t.Push(t.itemFactory.create(i,t.GetDelimiter(e),t.stack.env.color))},NamedFn(t,e,i){i||(i=e.substring(1));let r=t.create("token","mi",{texClass:L.OP},i);t.Push(t.itemFactory.create("fn",r))},NamedOp(t,e,i){i||(i=e.substring(1)),i=i.replace(/&thinsp;/," ");let r=t.create("token","mo",{movablelimits:!0,movesupsub:!0,form:lt.Form.PREFIX,texClass:L.OP},i);t.Push(r)},Limits(t,e,i){let r=t.stack.Prev(!0);if(!r||C.getTexClass(C.getCoreMO(r))!==L.OP&&C.getProperty(r,"movesupsub")==null)throw new M("MisplacedLimits","%1 is allowed only on operators",t.currentCS);let s=t.stack.Top(),n;C.isType(r,"munderover")&&!i?(n=t.create("node","msubsup"),C.copyChildren(r,n),r=s.First=n):C.isType(r,"msubsup")&&i&&(n=t.create("node","munderover"),C.copyChildren(r,n),r=s.First=n),C.setProperty(r,"movesupsub",!!i),C.setProperties(C.getCoreMO(r),{movablelimits:!1}),((C.isType(r,"mo")?C.getMoAttribute(r,"movableLimits"):C.getAttribute(r,"movablelimits"))||C.getProperty(r,"movablelimits"))&&C.setProperties(r,{movablelimits:!1})},Over(t,e,i,r){let s=t.itemFactory.create("over").setProperty("name",t.currentCS);i||r?(s.setProperty("ldelim",i),s.setProperty("rdelim",r)):e.match(/withdelims$/)&&(s.setProperty("ldelim",t.GetDelimiter(e)),s.setProperty("rdelim",t.GetDelimiter(e))),e.match(/^\\above/)?s.setProperty("thickness",t.GetDimen(e)):(e.match(/^\\atop/)||i||r)&&s.setProperty("thickness",0),t.Push(s)},Frac(t,e){let i=t.ParseArg(e),r=t.ParseArg(e),s=t.create("node","mfrac",[i,r]);t.Push(s)},Sqrt(t,e){let i=t.GetBrackets(e),r=t.GetArgument(e);r==="\\frac"&&(r+="{"+t.GetArgument(r)+"}{"+t.GetArgument(r)+"}");let s=new ue(r,t.stack.env,t.configuration).mml();s=i?t.create("node","mroot",[s,vd(t,i)]):t.create("node","msqrt",[s]),t.Push(s)},Root(t,e){let i=t.GetUpTo(e,"\\of"),r=t.ParseArg(e),s=t.create("node","mroot",[r,vd(t,i)]);t.Push(s)},MoveRoot(t,e,i){if(!t.stack.env.inRoot)throw new M("MisplacedMoveRoot","%1 can appear only within a root",t.currentCS);if(t.stack.global[i])throw new M("MultipleMoveRoot","Multiple use of %1",t.currentCS);let r=t.GetArgument(e);if(!r.match(/-?[0-9]+/))throw new M("IntegerArg","The argument to %1 must be an integer",t.currentCS);r=parseInt(r,10)/15+"em",r.substring(0,1)!=="-"&&(r="+"+r),t.stack.global[i]=r},Accent(t,e,i,r){let s=t.ParseArg(e),n=Object.assign(Object.assign({},Z.getFontDef(t)),{accent:!0,mathaccent:r===void 0||r}),a=C.createEntity(i),o=t.create("token","mo",n,a);C.setAttribute(o,"stretchy",!!r);let h=C.isEmbellished(s)?C.getCoreMO(s):s;(C.isType(h,"mo")||C.getProperty(h,"movablelimits"))&&C.setProperties(h,{movablelimits:!1});let d=t.create("node","munderover");C.setChild(d,0,s),C.setChild(d,1,null),C.setChild(d,2,o);let p=t.create("node","TeXAtom",[d]);t.Push(p)},UnderOver(t,e,i,r){let s=C.createEntity(i),n=t.create("token","mo",{stretchy:!0,accent:!0},s);s.match(ri.mathaccentsWithWidth)&&n.setProperty("mathaccent",!1);let a=e.charAt(1)==="o"?"over":"under",o=t.ParseArg(e);t.Push(Z.underOver(t,o,n,a,r))},Overset(t,e){let i=t.ParseArg(e),r=t.ParseArg(e),s=i.coreMO(),n=s.isKind("mo")&&C.getMoAttribute(s,"accent")===!0;Z.checkMovableLimits(r);let a=t.create("node","mover",[r,i],{accent:n});t.Push(a)},Underset(t,e){let i=t.ParseArg(e),r=t.ParseArg(e),s=i.coreMO(),n=s.isKind("mo")&&C.getMoAttribute(s,"accent")===!0;Z.checkMovableLimits(r);let a=t.create("node","munder",[r,i],{accentunder:n});t.Push(a)},Overunderset(t,e){let i=t.ParseArg(e),r=t.ParseArg(e),s=t.ParseArg(e),n=i.coreMO(),a=r.coreMO(),o=n.isKind("mo")&&C.getMoAttribute(n,"accent")===!0,h=a.isKind("mo")&&C.getMoAttribute(a,"accent")===!0;Z.checkMovableLimits(s);let d=t.create("node","munderover",[s,r,i],{accent:o,accentunder:h});t.Push(d)},TeXAtom(t,e,i){let r={texClass:i},s,n;if(i===L.OP){r.movesupsub=r.movablelimits=!0;let a=t.GetArgument(e),o=a.match(/^\s*\\rm\s+([a-zA-Z0-9 ]+)$/);if(o)r.mathvariant=lt.Variant.NORMAL,n=t.create("token","mi",r,o[1]);else{let h=new ue(a,t.stack.env,t.configuration).mml();n=t.create("node","TeXAtom",[h],r)}s=t.itemFactory.create("fn",n)}else s=t.create("node","TeXAtom",[t.ParseArg(e)],r);t.Push(s)},VBox(t,e,i){let r=new ue(t.GetArgument(e),t.stack.env,t.configuration),s={"data-vertical-align":i,texClass:L.ORD};r.stack.env.hsize&&(s.width=r.stack.env.hsize,s["data-overflow"]="linebreak");let n=t.create("node","mpadded",[r.mml()],s);n.setProperty("vbox",i),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){let i=t.GetBrackets(e,"c"),r=t.GetDimen(e),s=Z.internalMath(t,t.GetArgument(e)),n=Fs(i,1),a=t.create("node","mpadded",s,{width:r,"data-overflow":"linebreak","data-vertical-align":n});a.setProperty("vbox",n),t.Push(a)},BreakAlign(t,e){let i=t.stack.Top();if(!(i instanceof jr))throw new M("BreakNotInArray","%1 must be used in an alignment environment",t.currentCS);switch(t.GetArgument(e).trim()){case"c":if(i.First)throw new M("BreakFirstInEntry","%1 must be at the beginning of an alignment entry",t.currentCS+"{c}");i.breakAlign.cell=Fs(t.GetArgument(e),1);break;case"r":if(i.row.length||i.First)throw new M("BreakFirstInRow","%1 must be at the beginning of an alignment row",t.currentCS+"{r}");i.breakAlign.row=Fs(t.GetArgument(e));break;case"t":if(i.table.length||i.row.length||i.First)throw new M("BreakFirstInTable","%1 must be at the beginning of an alignment",t.currentCS+"{t}");i.breakAlign.table=Fs(t.GetArgument(e));break;default:throw new M("BreakType","First argument to %1 must be one of c, r, or t",t.currentCS)}},MmlToken(t,e){let i=t.GetArgument(e),r=t.GetBrackets(e,"").replace(/^\s+/,""),s=t.GetArgument(e),n={},a=[],o;try{o=t.create("node",i)}catch{o=null}if(!o||!o.isToken)throw new M("NotMathMLToken","%1 is not a token element",i);for(;r!=="";){let d=r.match(/^([a-z]+)\s*=\s*('[^'\n]*'|"[^"\n]*"|[^ ,\n]*)[\s\n]*,?[\s\n]*/i);if(!d)throw new M("InvalidMathMLAttr","Invalid MathML attribute: %1",r.split(/[\s\n=]/)[0]);if(!o.attributes.hasDefault(d[1])&&!V2[d[1]])throw new M("UnknownAttrForElement","%1 is not a recognized attribute for %2",d[1],i);let p=Z.mmlFilterAttribute(t,d[1],d[2].replace(/^(['"])(.*)\1$/,"$2"));p&&(p.toLowerCase()==="true"?p=!0:p.toLowerCase()==="false"&&(p=!1),n[d[1]]=p,a.push(d[1])),r=r.substring(d[0].length)}a.length&&o.setProperty("keep-attrs",a.join(" "));let h=t.create("text",Ym(s));o.appendChild(h),C.setProperties(o,n),t.Push(o)},Strut(t,e){let i=t.create("node","mrow"),r=t.create("node","mpadded",[i],{height:"8.6pt",depth:"3pt",width:0});t.Push(r)},Phantom(t,e,i,r){let s=t.create("node","mphantom",[t.ParseArg(e)]);(i||r)&&(s=t.create("node","mpadded",[s]),r&&(C.setAttribute(s,"height",0),C.setAttribute(s,"depth",0)),i&&C.setAttribute(s,"width",0));let n=t.create("node","TeXAtom",[s]);t.Push(n)},Smash(t,e){let i=Ot.trimSpaces(t.GetBrackets(e,"")),r=t.create("node","mpadded",[t.ParseArg(e)]);switch(i){case"b":C.setAttribute(r,"depth",0);break;case"t":C.setAttribute(r,"height",0);break;default:C.setAttribute(r,"height",0),C.setAttribute(r,"depth",0)}let s=t.create("node","TeXAtom",[r]);t.Push(s)},Lap(t,e){let i=t.create("node","mpadded",[t.ParseArg(e)],{width:0});e==="\\llap"&&C.setAttribute(i,"lspace","-1width");let r=t.create("node","TeXAtom",[i]);t.Push(r)},RaiseLower(t,e){let i=t.GetDimen(e),r=t.itemFactory.create("position").setProperties({name:t.currentCS,move:"vertical"});i.charAt(0)==="-"&&(i=i.slice(1),e=e.substring(1)==="raise"?"\\lower":"\\raise"),e==="\\lower"?(r.setProperty("dh","-"+i),r.setProperty("dd","+"+i)):(r.setProperty("dh","+"+i),r.setProperty("dd","-"+i)),t.Push(r)},MoveLeftRight(t,e){let i=t.GetDimen(e),r=i.charAt(0)==="-"?i.slice(1):"-"+i;if(e==="\\moveleft"){let s=i;i=r,r=s}t.Push(t.itemFactory.create("position").setProperties({name:t.currentCS,move:"horizontal",left:t.create("node","mspace",[],{width:i}),right:t.create("node","mspace",[],{width:r})}))},Hskip(t,e,i=!1){let r=t.create("node","mspace",[],{width:t.GetDimen(e)});i&&C.setAttribute(r,"linebreak","nobreak"),t.Push(r)},Nonscript(t,e){t.Push(t.itemFactory.create("nonscript"))},Rule(t,e,i){let r={width:t.GetDimen(e),height:t.GetDimen(e),depth:t.GetDimen(e)};i!=="blank"&&(r.mathbackground=t.stack.env.color||"black");let s=t.create("node","mspace",[],r);t.Push(s)},rule(t,e){let i=t.GetBrackets(e),r=t.GetDimen(e),s=t.GetDimen(e),n=t.create("node","mspace",[],{width:r,height:s,mathbackground:t.stack.env.color||"black"});i&&(n=t.create("node","mpadded",[n],{voffset:i}),i.match(/^-/)?(C.setAttribute(n,"height",i),C.setAttribute(n,"depth","+"+i.substring(1))):C.setAttribute(n,"height","+"+i)),t.Push(n)},MakeBig(t,e,i,r){r*=G2;let s=String(r).replace(/(\.\d\d\d).+/,"$1")+"em",n=t.GetDelimiter(e,!0),a=t.create("token","mo",{minsize:s,maxsize:s,fence:!0,stretchy:!0,symmetric:!0},n),o=t.create("node","TeXAtom",[a],{texClass:i});t.Push(o)},BuildRel(t,e){let i=t.ParseUpTo(e,"\\over"),r=t.ParseArg(e),s=t.create("node","munderover");C.setChild(s,0,r),C.setChild(s,1,null),C.setChild(s,2,i);let n=t.create("node","TeXAtom",[s],{texClass:L.REL});t.Push(n)},HBox(t,e,i,r){t.PushAll(Z.internalMath(t,t.GetArgument(e),i,r))},FBox(t,e){let i=Z.internalMath(t,t.GetArgument(e)),r=t.create("node","menclose",i,{notation:"box"});t.Push(r)},FrameBox(t,e){let i=t.GetBrackets(e),r=t.GetBrackets(e)||"c",s=Z.internalMath(t,t.GetArgument(e));i&&(s=[t.create("node","mpadded",s,{width:i,"data-align":zs(r,{l:"left",r:"right"},"center")})]);let n=t.create("node","TeXAtom",[t.create("node","menclose",s,{notation:"box"})],{texClass:L.ORD});t.Push(n)},MakeBox(t,e){let i=t.GetBrackets(e),r=t.GetBrackets(e,"c"),s=t.create("node","mpadded",Z.internalMath(t,t.GetArgument(e)));i&&C.setAttribute(s,"width",i);let n=zs(r.toLowerCase(),{c:"center",r:"right"},"");n&&C.setAttribute(s,"data-align",n),r.toLowerCase()!==r&&C.setAttribute(s,"data-overflow","linebreak"),t.Push(s)},Not(t,e){t.Push(t.itemFactory.create("not"))},Dots(t,e){let i=C.createEntity("2026"),r=C.createEntity("22EF"),s=t.create("token","mo",{stretchy:!1},i),n=t.create("token","mo",{stretchy:!1},r);t.Push(t.itemFactory.create("dots").setProperties({ldots:s,cdots:n}))},Matrix(t,e,i,r,s,n,a,o,h,d){let p=t.GetNext();if(p==="")throw new M("MissingArgFor","Missing argument for %1",t.currentCS);p==="{"?t.i++:(t.string=p+"}"+t.string.slice(t.i+1),t.i=0);let E=t.itemFactory.create("array").setProperty("requireClose",!0);(i||!s)&&E.setProperty("arrayPadding",".2em .125em"),E.arraydef={rowspacing:a||"4pt",columnspacing:n||"1em"},h&&E.setProperty("isCases",!0),d&&(E.setProperty("isNumbered",!0),E.arraydef.side=d),(i||r)&&(E.setProperty("open",i),E.setProperty("close",r)),o==="D"&&(E.arraydef.displaystyle=!0),s!=null&&(E.arraydef.columnalign=s),t.Push(E)},Entry(t,e){t.Push(t.itemFactory.create("cell").setProperties({isEntry:!0,name:e}));let i=t.stack.Top(),r=i.getProperty("casesEnv");if(!i.getProperty("isCases")&&!r)return;let s=t.string,n=0,a=-1,o=t.i,h=s.length,d=r?RegExp(`^\\\\end\\s*\\{${r.replace(/\*/,"\\*")}\\}`):null;for(;o<h;){let E=s.charAt(o);if(E==="{")n++,o++;else if(E==="}")n===0?h=0:(n--,n===0&&a<0&&(a=o-t.i),o++);else{if(E==="&"&&n===0)throw new M("ExtraAlignTab","Extra alignment tab in \\cases text");if(E==="\\"){let y=s.substring(o);y.match(/^((\\cr)[^a-zA-Z]|\\\\)/)||d&&y.match(d)?h=0:o+=2}else o++}}let p=s.substring(t.i,o);if(!p.match(/^\s*\\text[^a-zA-Z]/)||a!==p.replace(/\s+$/,"").length-1){let E=Z.internalMath(t,Ot.trimSpaces(p),0);t.PushAll(E),t.i=o}},Cr(t,e){t.Push(t.itemFactory.create("cell").setProperties({isCR:!0,name:e}))},CrLaTeX(t,e,i=!1){let r;if(!i&&(t.string.charAt(t.i)==="*"&&t.i++,t.string.charAt(t.i)==="[")){let a=t.GetBrackets(e,""),[o,h]=Ot.matchDimen(a);if(a&&!o)throw new M("BracketMustBeDimension","Bracket argument to %1 must be a dimension",t.currentCS);r=o+h}t.Push(t.itemFactory.create("cell").setProperties({isCR:!0,name:e,linebreak:!0}));let s=t.stack.Top(),n;s instanceof jr?r&&s.addRowSpacing(r):(n=t.create("node","mspace",[],{linebreak:lt.LineBreak.NEWLINE}),r&&C.setAttribute(n,"data-lineleading",r),t.Push(n))},HLine(t,e,i){i??(i="solid");let r=t.stack.Top();if(!(r instanceof jr)||r.Size())throw new M("Misplaced","Misplaced %1",t.currentCS);if(!r.table.length)r.frame.push(["top",i]);else{let s=r.arraydef.rowlines?r.arraydef.rowlines.split(/ /):[];for(;s.length<r.table.length;)s.push("none");s[r.table.length-1]=i,r.arraydef.rowlines=s.join(" ")}},HFill(t,e){let i=t.stack.Top();if(i instanceof jr)i.hfill.push(i.Size());else throw new M("UnsupportedHFill","Unsupported use of %1",t.currentCS)},NewColumnType(t,e){let i=t.GetArgument(e),r=t.GetBrackets(e,"0"),s=t.GetArgument(e);if(i.length!==1)throw new M("BadColumnName","Column specifier must be exactly one character: %1",i);if(!r.match(/^\d+$/))throw new M("PositiveIntegerArg","Argument to %1 must be a positive integer",r);let n=t.configuration.columnParser;n.columnHandler[i]=a=>n.macroColumn(a,s,parseInt(r)),t.Push(t.itemFactory.create("null"))},BeginEnd(t,e){let i=t.GetArgument(e);if(i.match(/\\/))throw new M("InvalidEnv","Invalid environment name '%1'",i);let r=t.configuration.handlers.get(ht.ENVIRONMENT).lookup(i);if(r&&e==="\\end"){if(!r.args[0]){let s=t.itemFactory.create("end").setProperty("name",i);t.Push(s);return}t.stack.env.closing=i}Z.checkMaxMacros(t,!1),t.parse(ht.ENVIRONMENT,[t,i])},Array(t,e,i,r,s,n,a,o,h){s||(s=t.GetArgument("\\begin{"+e.getName()+"}"));let d=t.itemFactory.create("array");return e.getName()==="array"&&d.setProperty("arrayPadding",".5em .125em"),d.parser=t,d.arraydef={columnspacing:n||"1em",rowspacing:a||"4pt"},t.configuration.columnParser.process(t,s,d),i&&d.setProperty("open",t.convertDelimiter(i)),r&&d.setProperty("close",t.convertDelimiter(r)),(o||"").charAt(1)==="'"&&(d.arraydef["data-cramped"]=!0,o=o.charAt(0)),o==="D"?d.arraydef.displaystyle=!0:o&&(d.arraydef.displaystyle=!1),d.arraydef.scriptlevel=+(o==="S"),h&&(d.arraydef.useHeight=!1),t.Push(e),d.StartEntry(),d},AlignedArray(t,e,i=""){let r=t.GetBrackets("\\begin{"+e.getName()+"}"),s=N.Array(t,e,null,null,null,null,null,i);return Z.setArrayAlign(s,r)},IndentAlign(t,e){let i=`\\begin{${e.getName()}}`,r=t.GetBrackets(i,""),s=t.GetBrackets(i,""),n=t.GetBrackets(i,"");if(r&&!Ot.matchDimen(r)[0]||s&&!Ot.matchDimen(s)[0]||n&&!Ot.matchDimen(n)[0])throw new M("BracketMustBeDimension","Bracket argument to %1 must be a dimension",i);let a=t.GetArgument(i);if(a&&!a.match(/^([lcr]{1,3})?$/))throw new M("BadAlignment","Alignment must be one to three copies of l, c, or r");let o=[...a].map(d=>({l:"left",c:"center",r:"right"})[d]);o.length===1&&o.push(o[0]);let h={};for(let[d,p]of[["indentshiftfirst",r],["indentshift",s||r],["indentshiftlast",n],["indentalignfirst",o[0]],["indentalign",o[1]],["indentalignlast",o[2]]])p&&(h[d]=p);t.Push(t.itemFactory.create("mstyle",h,e.getName()))},Equation(t,e,i,r=!0){return t.configuration.mathItem.display=r,t.stack.env.display=r,Z.checkEqnEnv(t),t.Push(e),t.itemFactory.create("equation",i).setProperty("name",e.getName())},EqnArray(t,e,i,r,s,n,a){let o=e.getName(),h=o==="gather"||o==="gather*";r&&Z.checkEqnEnv(t,!h),t.Push(e),s=s.replace(/[^clr]/g,"").split("").join(" "),s=s.replace(/l/g,"left").replace(/r/g,"right").replace(/c/g,"center"),n=Fs(n);let d=t.itemFactory.create("eqnarray",o,i,r,t.stack.global);return d.arraydef={displaystyle:!0,columnalign:s,columnspacing:a||"1em",rowspacing:"3pt","data-break-align":n,side:t.options.tagSide,minlabelspacing:t.options.tagIndent},h&&d.setProperty("nestable",!0),d},HandleNoTag(t,e){t.tags.notag()},HandleLabel(t,e){let i=t.GetArgument(e);if(i!==""){if(t.tags.label)throw new M("MultipleCommand","Multiple %1",t.currentCS);if(t.tags.label=i,!t.tags.refUpdate){if((t.tags.allLabels[i]||t.tags.labels[i])&&!t.options.ignoreDuplicateLabels)throw new M("MultipleLabel","Label '%1' multiply defined",i);t.tags.labels[i]=new sh}}},HandleRef(t,e,i){let r=t.GetArgument(e),s=t.tags.allLabels[r]||t.tags.labels[r];s||(s=(t.tags.refUpdate||(t.tags.redo=!0),new sh));let n=s.tag;i&&(n=t.tags.formatRef(n));let a=t.create("node","mrow",Z.internalMath(t,Array.isArray(n)?n.join(""):n),{href:t.tags.formatUrl(s.id,t.options.baseURL),class:"MathJax_ref"});t.Push(a)},Macro(t,e,i,r,s){if(r){let n=[];if(s!=null){let a=t.GetBrackets(e);n.push(a??s)}for(let a=n.length;a<r;a++)n.push(t.GetArgument(e));i=Z.substituteArgs(t,n,i)}t.string=Z.addArgs(t,i,t.string.slice(t.i)),t.i=0,Z.checkMaxMacros(t)},MathChoice(t,e){let i=t.ParseArg(e),r=t.ParseArg(e),s=t.ParseArg(e),n=t.ParseArg(e);t.Push(t.create("node","MathChoice",[i,r,s,n]))}},un=lt.Variant,Te={variable(t,e){let i=Z.getFontDef(t),r=t.stack.env;if(r.multiLetterIdentifiers&&r.font!==""&&(e=t.string.substring(t.i-1).match(r.multiLetterIdentifiers)?.[0]||e,t.i+=e.length-1,i.mathvariant===un.NORMAL&&r.noAutoOP&&e.length>1&&(i.autoOP=!1)),!i.mathvariant&&Z.isLatinOrGreekChar(e)){let n=t.configuration.mathStyle(e);n&&(i.mathvariant=n)}let s=t.create("token","mi",i,e);t.Push(s)},digit(t,e){let i=t.configuration.options.numberPattern,r=t.string.slice(t.i-1).match(i);if(!r)return!1;let s=Z.getFontDef(t),n=t.create("token","mn",s,r[0].replace(/[{}]/g,""));return t.i+=r[0].length-1,t.Push(n),!0},controlSequence(t,e){let i=t.GetCS();t.parse(ht.MACRO,[t,i])},lcGreek(t,e){let i={mathvariant:t.configuration.mathStyle(e.char)||un.ITALIC},r=t.create("token","mi",i,e.char);t.Push(r)},ucGreek(t,e){let i={mathvariant:t.stack.env.font||t.configuration.mathStyle(e.char,!0)||un.NORMAL},r=t.create("token","mi",i,e.char);t.Push(r)},mathchar0mi(t,e){let i=e.attributes||{mathvariant:un.ITALIC},r=t.create("token","mi",i,e.char);t.Push(r)},mathchar0mo(t,e){let i=e.attributes||{};i.stretchy=!1;let r=t.create("token","mo",i,e.char);C.setProperty(r,"fixStretchy",!0),t.configuration.addNode("fixStretchy",r),t.Push(r)},mathchar7(t,e){let i=e.attributes||{mathvariant:un.NORMAL};t.stack.env.font&&(i.mathvariant=t.stack.env.font);let r=t.create("token","mi",i,e.char);t.Push(r)},delimiter(t,e){let i=e.attributes||{};i=Object.assign({fence:!1,stretchy:!1},i);let r=t.create("token","mo",i,e.char);e.char==="|"&&r.setProperty("keep-attrs","stretchy"),t.Push(r)},environment(t,e,i,r){let s=t.itemFactory.create("begin").setProperty("name",e);t.Push(i(t,s,...r.slice(1)))}},pn=Bt(Re.thickmathspace),G=lt.Variant;new Hs("letter",Te.variable,/[a-z]/i),new Hs("digit",Te.digit,/[0-9.,]/),new Hs("command",Te.controlSequence,/^\\/),new Vr("special",{"{":N.Open,"}":N.Close,"~":N.Tilde,"^":N.Superscript,_:N.Subscript,"|":N.Bar," ":N.Space," ":N.Space,"\r":N.Space,"\n":N.Space,"'":N.Prime,"%":N.Comment,"&":N.Entry,"#":N.Hash," ":N.Space,"’":N.Prime}),new pi("lcGreek",Te.lcGreek,{alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ϵ",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigma:"σ",tau:"τ",upsilon:"υ",phi:"ϕ",chi:"χ",psi:"ψ",omega:"ω",varepsilon:"ε",vartheta:"ϑ",varpi:"ϖ",varrho:"ϱ",varsigma:"ς",varphi:"φ"}),new pi("ucGreek",Te.ucGreek,{Gamma:"Γ",Delta:"Δ",Theta:"Θ",Lambda:"Λ",Xi:"Ξ",Pi:"Π",Sigma:"Σ",Upsilon:"Υ",Phi:"Φ",Psi:"Ψ",Omega:"Ω"}),new pi("mathchar0mi",Te.mathchar0mi,{AA:"Å",S:["§",{mathvariant:G.NORMAL}],aleph:["ℵ",{mathvariant:G.NORMAL}],hbar:["ℏ",{variantForm:!0}],imath:"ı",jmath:"ȷ",ell:"ℓ",wp:["℘",{mathvariant:G.NORMAL}],Re:["ℜ",{mathvariant:G.NORMAL}],Im:["ℑ",{mathvariant:G.NORMAL}],partial:["∂",{mathvariant:G.ITALIC}],infty:["∞",{mathvariant:G.NORMAL}],prime:["′",{variantForm:!0}],emptyset:["∅",{mathvariant:G.NORMAL}],nabla:["∇",{mathvariant:G.NORMAL}],top:["⊤",{mathvariant:G.NORMAL}],bot:["⊥",{mathvariant:G.NORMAL}],angle:["∠",{mathvariant:G.NORMAL}],triangle:["△",{mathvariant:G.NORMAL}],backslash:["\\",{mathvariant:G.NORMAL}],forall:["∀",{mathvariant:G.NORMAL}],exists:["∃",{mathvariant:G.NORMAL}],neg:["¬",{mathvariant:G.NORMAL}],lnot:["¬",{mathvariant:G.NORMAL}],flat:["♭",{mathvariant:G.NORMAL}],natural:["♮",{mathvariant:G.NORMAL}],sharp:["♯",{mathvariant:G.NORMAL}],clubsuit:["♣",{mathvariant:G.NORMAL}],diamondsuit:["♢",{mathvariant:G.NORMAL}],heartsuit:["♡",{mathvariant:G.NORMAL}],spadesuit:["♠",{mathvariant:G.NORMAL}]}),new pi("mathchar0mo",Te.mathchar0mo,{surd:["√",{symmetric:!0}],coprod:["∐",{movesupsub:!0}],bigvee:["⋁",{movesupsub:!0}],bigwedge:["⋀",{movesupsub:!0}],biguplus:["⨄",{movesupsub:!0}],bigcap:["⋂",{movesupsub:!0}],bigcup:["⋃",{movesupsub:!0}],int:"∫",intop:["∫",{movesupsub:!0,movablelimits:!0}],iint:"∬",iiint:"∭",prod:["∏",{movesupsub:!0}],sum:["∑",{movesupsub:!0}],bigotimes:["⨂",{movesupsub:!0}],bigoplus:["⨁",{movesupsub:!0}],bigodot:["⨀",{movesupsub:!0}],oint:"∮",ointop:["∮",{movesupsub:!0,movablelimits:!0}],oiint:"∯",oiiint:"∰",bigsqcup:["⨆",{movesupsub:!0}],smallint:["∫",{largeop:!1}],triangleleft:"◃",triangleright:"▹",bigtriangleup:"△",bigtriangledown:"▽",wedge:"∧",land:"∧",vee:"∨",lor:"∨",cap:"∩",cup:"∪",ddagger:"‡",dagger:"†",sqcap:"⊓",sqcup:"⊔",uplus:"⊎",amalg:"⨿",diamond:"⋄",bullet:"∙",wr:"≀",div:"÷",odot:["⊙",{largeop:!1}],oslash:["⊘",{largeop:!1}],otimes:["⊗",{largeop:!1}],ominus:["⊖",{largeop:!1}],oplus:["⊕",{largeop:!1}],mp:"∓",pm:"±",circ:"∘",bigcirc:"◯",setminus:"∖",cdot:"⋅",ast:"∗",times:"×",star:"⋆",propto:"∝",sqsubseteq:"⊑",sqsupseteq:"⊒",parallel:"∥",mid:"∣",dashv:"⊣",vdash:"⊢",leq:"≤",le:"≤",geq:"≥",ge:"≥",lt:"<",gt:">",succ:"≻",prec:"≺",approx:"≈",succeq:"⪰",preceq:"⪯",supset:"⊃",subset:"⊂",supseteq:"⊇",subseteq:"⊆",in:"∈",ni:"∋",notin:"∉",owns:"∋",gg:"≫",ll:"≪",sim:"∼",simeq:"≃",perp:"⟂",equiv:"≡",asymp:"≍",smile:"⌣",frown:"⌢",ne:"≠",neq:"≠",cong:"≅",doteq:"≐",bowtie:"⋈",models:"⊧",notChar:"⧸",Leftrightarrow:"⇔",Leftarrow:"⇐",Rightarrow:"⇒",leftrightarrow:"↔",leftarrow:"←",gets:"←",rightarrow:"→",to:["→",{accent:!1}],mapsto:"↦",leftharpoonup:"↼",leftharpoondown:"↽",rightharpoonup:"⇀",rightharpoondown:"⇁",nearrow:"↗",searrow:"↘",nwarrow:"↖",swarrow:"↙",rightleftharpoons:"⇌",hookrightarrow:"↪",hookleftarrow:"↩",longleftarrow:"⟵",Longleftarrow:"⟸",longrightarrow:"⟶",Longrightarrow:"⟹",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",ldots:"…",cdots:"⋯",vdots:"⋮",ddots:"⋱",iddots:"⋰",dotsc:"…",dotsb:"⋯",dotsm:"⋯",dotsi:"⋯",dotso:"…",ldotp:[".",{texClass:L.PUNCT}],cdotp:["⋅",{texClass:L.PUNCT}],colon:[":",{texClass:L.PUNCT}]}),new pi("mathchar7",Te.mathchar7,{_:"_","#":"#",$:"$","%":"%","&":"&",And:"&"}),new Xn("delimiter",Te.delimiter,{"(":"(",")":")","[":"[","]":"]","<":"⟨",">":"⟩","\\lt":"⟨","\\gt":"⟩","/":"/","|":["|",{texClass:L.ORD}],".":"","\\lmoustache":"⎰","\\rmoustache":"⎱","\\lgroup":"⟮","\\rgroup":"⟯","\\arrowvert":"⏐","\\Arrowvert":"‖","\\bracevert":"⎪","\\Vert":["‖",{texClass:L.ORD}],"\\|":["‖",{texClass:L.ORD}],"\\vert":["|",{texClass:L.ORD}],"\\uparrow":"↑","\\downarrow":"↓","\\updownarrow":"↕","\\Uparrow":"⇑","\\Downarrow":"⇓","\\Updownarrow":"⇕","\\backslash":"\\","\\rangle":"⟩","\\langle":"⟨","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"⌉","\\lceil":"⌈","\\rfloor":"⌋","\\lfloor":"⌊","\\lbrack":"[","\\rbrack":"]"}),new De("macros",{displaystyle:[N.SetStyle,"D",!0,0],textstyle:[N.SetStyle,"T",!1,0],scriptstyle:[N.SetStyle,"S",!1,1],scriptscriptstyle:[N.SetStyle,"SS",!1,2],rm:[N.SetFont,G.NORMAL],mit:[N.SetFont,G.ITALIC],oldstyle:[N.SetFont,G.OLDSTYLE],cal:[N.SetFont,G.CALLIGRAPHIC],it:[N.SetFont,G.MATHITALIC],bf:[N.SetFont,G.BOLD],sf:[N.SetFont,G.SANSSERIF],tt:[N.SetFont,G.MONOSPACE],frak:[N.MathFont,G.FRAKTUR],Bbb:[N.MathFont,G.DOUBLESTRUCK],mathrm:[N.MathFont,G.NORMAL],mathup:[N.MathFont,G.NORMAL],mathnormal:[N.MathFont,""],mathbf:[N.MathFont,G.BOLD],mathbfup:[N.MathFont,G.BOLD],mathit:[N.MathFont,G.MATHITALIC],mathbfit:[N.MathFont,G.BOLDITALIC],mathbb:[N.MathFont,G.DOUBLESTRUCK],mathfrak:[N.MathFont,G.FRAKTUR],mathbffrak:[N.MathFont,G.BOLDFRAKTUR],mathscr:[N.MathFont,G.SCRIPT],mathbfscr:[N.MathFont,G.BOLDSCRIPT],mathsf:[N.MathFont,G.SANSSERIF],mathsfup:[N.MathFont,G.SANSSERIF],mathbfsf:[N.MathFont,G.BOLDSANSSERIF],mathbfsfup:[N.MathFont,G.BOLDSANSSERIF],mathsfit:[N.MathFont,G.SANSSERIFITALIC],mathbfsfit:[N.MathFont,G.SANSSERIFBOLDITALIC],mathtt:[N.MathFont,G.MONOSPACE],mathcal:[N.MathFont,G.CALLIGRAPHIC],mathbfcal:[N.MathFont,G.BOLDCALLIGRAPHIC],symrm:[N.MathFont,G.NORMAL],symup:[N.MathFont,G.NORMAL],symnormal:[N.MathFont,""],symbf:[N.MathFont,G.BOLD,G.BOLDITALIC],symbfup:[N.MathFont,G.BOLD],symit:[N.MathFont,G.ITALIC],symbfit:[N.MathFont,G.BOLDITALIC],symbb:[N.MathFont,G.DOUBLESTRUCK],symfrak:[N.MathFont,G.FRAKTUR],symbffrak:[N.MathFont,G.BOLDFRAKTUR],symscr:[N.MathFont,G.SCRIPT],symbfscr:[N.MathFont,G.BOLDSCRIPT],symsf:[N.MathFont,G.SANSSERIF,G.SANSSERIFITALIC],symsfup:[N.MathFont,G.SANSSERIF],symbfsf:[N.MathFont,G.BOLDSANSSERIF],symbfsfup:[N.MathFont,G.BOLDSANSSERIF],symsfit:[N.MathFont,G.SANSSERIFITALIC],symbfsfit:[N.MathFont,G.SANSSERIFBOLDITALIC],symtt:[N.MathFont,G.MONOSPACE],symcal:[N.MathFont,G.CALLIGRAPHIC],symbfcal:[N.MathFont,G.BOLDCALLIGRAPHIC],textrm:[N.HBox,null,G.NORMAL],textup:[N.HBox,null,G.NORMAL],textnormal:[N.HBox],textit:[N.HBox,null,G.ITALIC],textbf:[N.HBox,null,G.BOLD],textsf:[N.HBox,null,G.SANSSERIF],texttt:[N.HBox,null,G.MONOSPACE],Tiny:[N.SetSize,.5],tiny:[N.SetSize,.6],scriptsize:[N.SetSize,.7],SMALL:[N.SetSize,.7],Small:[N.SetSize,.8],footnotesize:[N.SetSize,.8],small:[N.SetSize,.9],normalsize:[N.SetSize,1],large:[N.SetSize,1.095],Large:[N.SetSize,1.2],LARGE:[N.SetSize,1.44],huge:[N.SetSize,1.728],Huge:[N.SetSize,2.074],HUGE:[N.SetSize,2.49],arcsin:N.NamedFn,arccos:N.NamedFn,arctan:N.NamedFn,arg:N.NamedFn,cos:N.NamedFn,cosh:N.NamedFn,cot:N.NamedFn,coth:N.NamedFn,csc:N.NamedFn,deg:N.NamedFn,det:N.NamedOp,dim:N.NamedFn,exp:N.NamedFn,gcd:N.NamedOp,hom:N.NamedFn,inf:N.NamedOp,ker:N.NamedFn,lg:N.NamedFn,lim:N.NamedOp,liminf:[N.NamedOp,"lim&thinsp;inf"],limsup:[N.NamedOp,"lim&thinsp;sup"],ln:N.NamedFn,log:N.NamedFn,max:N.NamedOp,min:N.NamedOp,Pr:N.NamedOp,sec:N.NamedFn,sin:N.NamedFn,sinh:N.NamedFn,sup:N.NamedOp,tan:N.NamedFn,tanh:N.NamedFn,limits:[N.Limits,!0],nolimits:[N.Limits,!1],overline:[N.UnderOver,"2015"],underline:[N.UnderOver,"2015"],overbrace:[N.UnderOver,"23DE",!0],underbrace:[N.UnderOver,"23DF",!0],overparen:[N.UnderOver,"23DC"],underparen:[N.UnderOver,"23DD"],overrightarrow:[N.UnderOver,"2192"],underrightarrow:[N.UnderOver,"2192"],overleftarrow:[N.UnderOver,"2190"],underleftarrow:[N.UnderOver,"2190"],overleftrightarrow:[N.UnderOver,"2194"],underleftrightarrow:[N.UnderOver,"2194"],overset:N.Overset,underset:N.Underset,overunderset:N.Overunderset,stackrel:[N.Macro,"\\mathrel{\\mathop{#2}\\limits^{#1}}",2],stackbin:[N.Macro,"\\mathbin{\\mathop{#2}\\limits^{#1}}",2],over:N.Over,overwithdelims:N.Over,atop:N.Over,atopwithdelims:N.Over,above:N.Over,abovewithdelims:N.Over,brace:[N.Over,"{","}"],brack:[N.Over,"[","]"],choose:[N.Over,"(",")"],frac:N.Frac,sqrt:N.Sqrt,root:N.Root,uproot:[N.MoveRoot,"upRoot"],leftroot:[N.MoveRoot,"leftRoot"],left:N.LeftRight,right:N.LeftRight,middle:N.LeftRight,llap:N.Lap,rlap:N.Lap,raise:N.RaiseLower,lower:N.RaiseLower,moveleft:N.MoveLeftRight,moveright:N.MoveLeftRight,",":[N.Spacer,Re.thinmathspace],":":[N.Spacer,Re.mediummathspace],">":[N.Spacer,Re.mediummathspace],";":[N.Spacer,Re.thickmathspace],"!":[N.Spacer,Re.negativethinmathspace],enspace:[N.Spacer,.5],quad:[N.Spacer,1],qquad:[N.Spacer,2],thinspace:[N.Spacer,Re.thinmathspace],negthinspace:[N.Spacer,Re.negativethinmathspace],"*":N.DiscretionaryTimes,allowbreak:N.AllowBreak,goodbreak:[N.Linebreak,lt.LineBreak.GOODBREAK],badbreak:[N.Linebreak,lt.LineBreak.BADBREAK],nobreak:[N.Linebreak,lt.LineBreak.NOBREAK],break:N.Break,hskip:N.Hskip,hspace:N.Hskip,kern:[N.Hskip,!0],mskip:N.Hskip,mspace:N.Hskip,mkern:[N.Hskip,!0],rule:N.rule,Rule:[N.Rule],Space:[N.Rule,"blank"],nonscript:N.Nonscript,big:[N.MakeBig,L.ORD,.85],Big:[N.MakeBig,L.ORD,1.15],bigg:[N.MakeBig,L.ORD,1.45],Bigg:[N.MakeBig,L.ORD,1.75],bigl:[N.MakeBig,L.OPEN,.85],Bigl:[N.MakeBig,L.OPEN,1.15],biggl:[N.MakeBig,L.OPEN,1.45],Biggl:[N.MakeBig,L.OPEN,1.75],bigr:[N.MakeBig,L.CLOSE,.85],Bigr:[N.MakeBig,L.CLOSE,1.15],biggr:[N.MakeBig,L.CLOSE,1.45],Biggr:[N.MakeBig,L.CLOSE,1.75],bigm:[N.MakeBig,L.REL,.85],Bigm:[N.MakeBig,L.REL,1.15],biggm:[N.MakeBig,L.REL,1.45],Biggm:[N.MakeBig,L.REL,1.75],mathord:[N.TeXAtom,L.ORD],mathop:[N.TeXAtom,L.OP],mathopen:[N.TeXAtom,L.OPEN],mathclose:[N.TeXAtom,L.CLOSE],mathbin:[N.TeXAtom,L.BIN],mathrel:[N.TeXAtom,L.REL],mathpunct:[N.TeXAtom,L.PUNCT],mathinner:[N.TeXAtom,L.INNER],vtop:[N.VBox,"top"],vcenter:[N.VBox,"center"],vbox:[N.VBox,"bottom"],hsize:N.Hsize,parbox:N.ParBox,breakAlign:N.BreakAlign,buildrel:N.BuildRel,hbox:[N.HBox,0],text:N.HBox,mbox:[N.HBox,0],fbox:N.FBox,boxed:[N.Macro,"\\fbox{$\\displaystyle{#1}$}",1],framebox:N.FrameBox,makebox:N.MakeBox,strut:N.Strut,mathstrut:[N.Macro,"\\vphantom{(}"],phantom:N.Phantom,vphantom:[N.Phantom,1,0],hphantom:[N.Phantom,0,1],smash:N.Smash,acute:[N.Accent,"00B4"],grave:[N.Accent,"0060"],ddot:[N.Accent,"00A8"],dddot:[N.Accent,"20DB"],ddddot:[N.Accent,"20DC"],tilde:[N.Accent,"007E"],bar:[N.Accent,"00AF"],breve:[N.Accent,"02D8"],check:[N.Accent,"02C7"],hat:[N.Accent,"005E"],vec:[N.Accent,"2192",!1],dot:[N.Accent,"02D9"],widetilde:[N.Accent,"007E",!0],widehat:[N.Accent,"005E",!0],matrix:N.Matrix,array:N.Matrix,pmatrix:[N.Matrix,"(",")"],cases:[N.Matrix,"{","","left left",null,".2em",null,!0],eqalign:[N.Matrix,null,null,"right left",pn,".5em","D"],displaylines:[N.Matrix,null,null,"center",null,".5em","D"],cr:N.Cr,"\\":N.CrLaTeX,newline:[N.CrLaTeX,!0],hline:N.HLine,hdashline:[N.HLine,"dashed"],eqalignno:[N.Matrix,null,null,"right left",pn,".5em","D",null,"right"],leqalignno:[N.Matrix,null,null,"right left",pn,".5em","D",null,"left"],hfill:N.HFill,hfil:N.HFill,hfilll:N.HFill,bmod:[N.Macro,`\\mmlToken{mo}[lspace="${pn}" rspace="${pn}"]{mod}`],pmod:[N.Macro,"\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:[N.Macro,"\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:[N.Macro,"\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:[N.Macro,"\\;\\Longleftrightarrow\\;"],skew:[N.Macro,"{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],pmb:[N.Macro,"\\rlap{#1}\\kern1px{#1}",1],TeX:[N.Macro,"T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:[N.Macro,"L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"],not:N.Not,dots:N.Dots,space:N.Tilde," ":N.Tilde," ":N.Tilde,begin:N.BeginEnd,end:N.BeginEnd,label:N.HandleLabel,ref:N.HandleRef,nonumber:N.HandleNoTag,newcolumntype:N.NewColumnType,mathchoice:N.MathChoice,mmlToken:N.MmlToken}),new Qs("environment",Te.environment,{displaymath:[N.Equation,null,!1],math:[N.Equation,null,!1,!1],array:[N.AlignedArray],darray:[N.AlignedArray,null,"D"],equation:[N.Equation,null,!0],eqnarray:[N.EqnArray,null,!0,!0,"rcl","bmt",Z.cols(0,Re.thickmathspace),".5em"],indentalign:[N.IndentAlign]}),new pi("not_remap",null,{"←":"↚","→":"↛","↔":"↮","⇐":"⇍","⇒":"⇏","⇔":"⇎","∈":"∉","∋":"∌","∣":"∤","∥":"∦","∼":"≁","~":"≁","≃":"≄","≅":"≇","≈":"≉","≍":"≭","=":"≠","≡":"≢","<":"≮",">":"≯","≤":"≰","≥":"≱","≲":"≴","≳":"≵","≶":"≸","≷":"≹","≺":"⊀","≻":"⊁","⊂":"⊄","⊃":"⊅","⊆":"⊈","⊇":"⊉","⊢":"⊬","⊨":"⊭","⊩":"⊮","⊫":"⊯","≼":"⋠","≽":"⋡","⊑":"⋢","⊒":"⋣","⊲":"⋪","⊳":"⋫","⊴":"⋬","⊵":"⋭","∃":"∄"});var X2=lt.Variant;new pi("remap",null,{"-":"−","*":"∗","`":"‘"});function Jh(t,e){let i=t.stack.env.font,r=t.stack.env.italicFont,s=i?{mathvariant:i}:{},n=Po.getMap("remap").lookup(e),a=Hu(e),o=a[3],h=t.create("token",o,s,n?n.char:e),d=Z.isLatinOrGreekChar(e)?t.configuration.mathStyle(e,!0)||r:"",p=a[4]||(i&&d===X2.NORMAL?"":d);p&&h.attributes.set("mathvariant",p),o==="mo"&&(C.setProperty(h,"fixStretchy",!0),t.configuration.addNode("fixStretchy",h)),t.Push(h)}function $2(t,e){throw new M("UndefinedControlSequence","Undefined control sequence %1","\\"+e)}function K2(t,e){throw new M("UnknownEnv","Unknown environment '%1'",e)}function J2({data:t}){for(let e of t.getList("nonscript"))if(e.attributes.get("scriptlevel")>0){let i=e.parent;if(i.childNodes.splice(i.childIndex(e),1),t.removeFromList(e.kind,[e]),e.isKind("mrow")){let r=e.childNodes[0];t.removeFromList("mstyle",[r]),t.removeFromList("mspace",r.childNodes[0].childNodes)}}else e.isKind("mrow")&&(e.parent.replaceChild(e.childNodes[0],e),t.removeFromList("mrow",[e]))}var Y2=class extends go{};Ie.create("base",{[ct.CONFIG]:function(t,e){let i=e.parseOptions.options;i.digits&&(i.numberPattern=i.digits),new Hs("digit",Te.digit,i.initialDigit),new Hs("letter",Te.variable,i.initialLetter),t.handlers.get(ht.CHARACTER).add(["letter","digit"],null,4)},[ct.HANDLER]:{[ht.CHARACTER]:["command","special"],[ht.DELIMITER]:["delimiter"],[ht.MACRO]:["delimiter","macros","lcGreek","ucGreek","mathchar0mi","mathchar0mo","mathchar7"],[ht.ENVIRONMENT]:["environment"]},[ct.FALLBACK]:{[ht.CHARACTER]:Jh,[ht.MACRO]:$2,[ht.ENVIRONMENT]:K2},[ct.ITEMS]:{[bo.prototype.kind]:bo,[$n.prototype.kind]:$n,[oh.prototype.kind]:oh,[ad.prototype.kind]:ad,[od.prototype.kind]:od,[ld.prototype.kind]:ld,[lh.prototype.kind]:lh,[hd.prototype.kind]:hd,[hh.prototype.kind]:hh,[cd.prototype.kind]:cd,[dd.prototype.kind]:dd,[ud.prototype.kind]:ud,[ch.prototype.kind]:ch,[pd.prototype.kind]:pd,[Kn.prototype.kind]:Kn,[md.prototype.kind]:md,[fd.prototype.kind]:fd,[Eo.prototype.kind]:Eo,[gd.prototype.kind]:gd,[bd.prototype.kind]:bd,[Ed.prototype.kind]:Ed,[yd.prototype.kind]:yd,[jr.prototype.kind]:jr,[dh.prototype.kind]:dh,[Nd.prototype.kind]:Nd,[xd.prototype.kind]:xd},[ct.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:!ni.document||ni.document.getElementsByTagName("base").length===0?"":String(ni.document.location).replace(/#.*$/,"")},[ct.TAGS]:{base:Y2},[ct.POSTPROCESSORS]:[[J2,-4]]});var uh=class Oa extends Es{static configure(e){let i=new b1(e,["tex"]);return i.init(),i}static tags(e,i){yr.addTags(i.tags),yr.setDefault(e.options.tags),e.tags=yr.getDefault(),e.tags.configuration=e}constructor(e={}){let[i,r,s]=Co(e,Oa.OPTIONS,th.OPTIONS);super(r),this.findTeX=this.options.FindTeX||new th(s);let n=this.options.packages,a=this.configuration=Oa.configure(n),o=this._parseOptions=new Vh(a,[this.options,yr.OPTIONS]);fi(o.options,i),a.config(this),Oa.tags(o,a),this.postFilters.addList([[Yr.cleanSubSup,-7],[Yr.setInherited,-6],[Yr.checkScriptlevel,-5],[Yr.moveLimits,-4],[Yr.cleanStretchy,-3],[Yr.cleanAttributes,-2],[Yr.combineRelations,-1]])}setMmlFactory(e){super.setMmlFactory(e),this._parseOptions.nodeFactory.setMmlFactory(e)}get parseOptions(){return this._parseOptions}reset(e=0){this.parseOptions.clear(),this.parseOptions.tags.reset(e)}compile(e,i){this.parseOptions.clear(),this.parseOptions.mathItem=e,this.executeFilters(this.preFilters,e,i,this.parseOptions),this.latex=e.math;let r;this.parseOptions.tags.startEquation(e);let s;try{s=new ue(this.latex,{display:e.display,isInner:!1},this.parseOptions),r=s.mml()}catch(n){if(!(n instanceof M))throw n;this.parseOptions.error=!0,r=this.options.formatError(this,n)}return r=this.parseOptions.nodeFactory.create("node","math",[r]),r.attributes.set(lt.Attr.LATEX,this.latex),e.display&&C.setAttribute(r,"display","block"),this.parseOptions.tags.finishEquation(e),this.parseOptions.root=r,this.executeFilters(this.postFilters,e,i,this.parseOptions),s&&s.stack.env.hsize&&(C.setAttribute(r,"maxwidth",s.stack.env.hsize),C.setAttribute(r,"overflow","linebreak")),this.mathNode=this.parseOptions.root,this.mathNode}findMath(e){return this.findTeX.findMath(e)}formatError(e){let i=e.message.replace(/\n.*/,"");return this.parseOptions.nodeFactory.create("error",i,e.id,this.latex)}};uh.NAME="TeX",uh.OPTIONS=Object.assign(Object.assign({},Es.OPTIONS),{FindTeX:null,packages:["base"],maxBuffer:5120,maxTemplateSubtitutions:1e4,mathStyle:"TeX",formatError:(t,e)=>t.formatError(e)});var ge=class Ma{static zero(){return new Ma({h:0,d:0,w:0})}static empty(){return new Ma}constructor(e={w:0,h:-ls,d:-ls}){this.w=e.w||0,this.h="h"in e?e.h:-ls,this.d="d"in e?e.d:-ls,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=-ls,this}clean(){this.w===-1e6&&(this.w=0),this.h===-1e6&&(this.h=0),this.d===-1e6&&(this.d=0)}rescale(e){this.w*=e,this.h*=e,this.d*=e}combine(e,i=0,r=0){let s=e.rscale,n=i+s*(e.w+e.L+e.R),a=r+s*e.h,o=s*e.d-r;n>this.w&&(this.w=n),a>this.h&&(this.h=a),o>this.d&&(this.d=o)}append(e){let i=e.rscale;this.w+=i*(e.w+e.L+e.R),i*e.h>this.h&&(this.h=i*e.h),i*e.d>this.d&&(this.d=i*e.d)}updateFrom(e){this.h=e.h,this.d=e.d,this.w=e.w,e.pwidth&&(this.pwidth=e.pwidth)}copy(){let e=new Ma;return Object.assign(e,this),e}};ge.fullWidth="100%",ge.boxSides=[["Top",0,"h"],["Right",1,"w"],["Bottom",2,"d"],["Left",3,"w"]];var Ti=class E1 extends ge{static from(e,i,r=null){let s=new this;return Object.assign(s,e),s.lineLeading=i,r&&(s.indentData=r),s}constructor(e,i=null){super(e),this.indentData=null,this.isFirst=!1,this.originalL=this.L,i&&(this.start=i)}append(e){this.isFirst&&(e.originalL+=e.L,e.L=0),e.indentData&&(this.indentData=e.indentData),this.lineLeading=e.lineLeading,super.append(e),this.isFirst=e.isFirst}copy(){let e=E1.from(this,this.lineLeading);return e.indentData=this.indentData,e.lineLeading=this.lineLeading,e}getIndentData(e){let{indentalign:i,indentshift:r,indentalignfirst:s,indentshiftfirst:n,indentalignlast:a,indentshiftlast:o}=e.attributes.getAllAttributes();s==="indentalign"&&(s=e.attributes.getInherited("indentalign")),n==="indentshift"&&(n=e.attributes.getInherited("indentshift")),a==="indentalign"&&(a=i),o==="indentshift"&&(o=r),this.indentData=[[s,n],[i,r],[a,o]]}copyIndentData(e){return e.indentData.map(([i,r])=>[i,r])}},mn=1e6,Z2=class extends qu{breakToWidth(t,e){}},Q2=class extends Z2{constructor(){super(...arguments),this.PENALTY={newline:t=>0,nobreak:t=>mn,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)=>{let i=e.node.prevClass;if(i===L.BIN||i===L.REL||i===L.OP)return t+5e3;let r=this.getPrevious(e);if(r&&(r.attributes.get("form")!=="postfix"||r.attributes.get("linebreak")==="nobreak"))return t+5e3;let s=e.node.Parent;return s?.isKind("mmultiscripts")&&e.node===this.getFirstToken(s)&&s.childNodes.filter(n=>n.isKind("mprescripts")).length?mn:t-500},close:(t,e)=>{let i=e.node.Parent;return i?.isKind("msubsup")&&!(i.isKind("mmultiscripts")&&i.childNodes[1]?.isKind("mprescripts"))&&e.node===this.getLastToken(i.childNodes[0])?mn:t+500},space:(t,e)=>{let i=e;if(!i.canBreak)return mn;let r=i.getBBox().w;return r<0?mn:r<1?t:t-100*(r+4)},separator:t=>t+500,fuzz:t=>t*.99},this.TEXCLASS={[L.BIN]:t=>t-250,[L.REL]:t=>t-500}}breakToWidth(t,e){let i=this.state;this.state=this.createState(t),this.state.width=e;let r=t.breakCount;for(let s=0;s<=r;s++)(t.lineBBox[s]||t.getLineBBox(s)).w>e&&this.breakLineToWidth(t,s);for(let[s,n]of this.state.breaks){if(n===null){let a=s.coreMO();a.setBreakStyle(a.node.attributes.get("linebreakstyle")||"before")}else s.setBreakAt(n);s.invalidateBBox()}this.state=i}createState(t){let 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){let i=this.state;i.potential=[],i.w=0,i.prevWidth=0,i.prevBreak=null,i.depth=0,this.visitNode(t,e)}addWidth(t,e=null){e===null&&(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(){let t=this.state;for(;t.potential.length&&t.w>this.state.width;){let e=t.potential.pop(),[i,,r,s,n]=e;t.breaks.add(i),t.w=t.potential.reduce((a,o)=>a+o[4],s+n),t.prevBreak&&t.prevWidth+r<=t.width?(t.breaks.delete(t.prevBreak[0]),t.prevWidth+=r):t.prevWidth=r+s,t.potential.forEach(a=>a[2]-=r),t.prevBreak=e,t.mathLeft-=r}}pushBreak(t,e,i,r){let s=this.state;if(!(e>=1e6||s.w===0&&s.prevWidth===0)){for(;s.potential.length&&s.potential[0][1]>this.FACTORS.fuzz(e);){let n=s.potential.shift();s.potential.length&&(s.potential[0][4]+=n[4])}s.potential.unshift([[t,r],e,s.w-(s.prevBreak?.[3]||0),i,0])}}getBorderLR(t){let e=t.styleData;if(!e)return[0,0];let i=e?.border?.width||[0,0,0,0],r=e?.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){let i=t.getLineBBox(e);if(t.node.isToken||t.node.linebreakContainer||!t.childNodes?.[0])this.addWidth(i);else{let[r,s]=this.getBorderLR(t);e===0&&this.addWidth(i,i.L+r),this.visitNode(t.childNodes[0],e),e===t.breakCount&&this.addWidth(i,i.R+s)}}visitEmbellishedOperator(t,e){let i=t.coreMO(),r=Ti.from(t.getOuterBBox(),t.linebreakOptions.lineleading);r.getIndentData(i.node);let s=i.getBreakStyle(i.node.attributes.get("linebreakstyle")),n=i.processIndent("",r.indentData[1][1],"",r.indentData[0][1],this.state.width)[1],a=this.moPenalty(i);if(s==="before")this.pushBreak(t,a,n-r.L,null),this.addWidth(r);else{this.addWidth(r);let o=(s==="after"?0:i.multChar?i.multChar.getBBox().w:r.w)+n;this.pushBreak(t,a,o,null)}}visitMoNode(t,e){let i=t,r=Ti.from(i.getOuterBBox(),i.linebreakOptions.lineleading);r.getIndentData(i.node);let s=i.getBreakStyle(i.node.attributes.get("linebreakstyle")),n=i.processIndent("",r.indentData[1][1],"",r.indentData[0][1],this.state.width)[1],a=this.moPenalty(i);if(s==="before")this.pushBreak(t,a,n-r.L,null),this.addWidth(r);else{this.addWidth(r);let o=(s==="after"?0:i.multChar?i.multChar.getBBox().w:r.w)+n;this.pushBreak(t,a,o,null)}}moPenalty(t){let{linebreak:e,fence:i,form:r}=t.node.attributes.getList("linebreak","fence","form"),s=this.FACTORS,n=s.tail(s.width(0)),a=i&&r==="prefix"||t.node.texClass===L.OPEN,o=i&&r==="postfix"||t.node.texClass===L.CLOSE;return a&&(n=s.open(n,t),this.state.depth++),o&&(n=s.close(n,t),this.state.depth--),n=(this.TEXCLASS[t.node.texClass]||(h=>h))(n),(this.PENALTY[e]||(h=>h))(s.depth(n))}getPrevious(t){let e=t.node,i=e.parent,r=i.childIndex(e);for(;i&&(i.notParent||i.isKind("mrow"))&&r===0;)e=i,i=e.parent,r=i.childIndex(e);if(!i||!r)return null;let s=i.childNodes[r-1];return s.isEmbellished?s.coreMO():null}visitMspaceNode(t,e){let i=t.getLineBBox(e),r=t;if(r.canBreak){let s=this.mspacePenalty(r);i.getIndentData(t.node);let n=t.processIndent("",i.indentData[1][1],"",i.indentData[0][1],this.state.width)[1];this.pushBreak(t,s,n-i.w,null)}this.addWidth(i)}mspacePenalty(t){let e=t.node.attributes.get("linebreak"),i=this.FACTORS,r=i.space(i.tail(i.width(0)),t);return(this.PENALTY[e]||(s=>s))(i.depth(r))}visitMtextNode(t,e){if(!t.getText().match(/ /)){this.visitDefault(t,e);return}let i=t;i.clearBreakPoints();let r=i.textWidth(" "),s=t.getBBox(),[n,a]=this.getBorderLR(t);this.addWidth(s,s.L+n);let o=i.childNodes;for(let h of o.keys()){let d=o[h];if(d.node.isKind("text")){let p=d.node.getText().split(/ /),E=p.pop();for(let y of p.keys())this.addWidth(s,i.textWidth(p[y])),this.pushBreak(t,this.mtextPenalty(),-r,[h,y+1]),this.addWidth(s,r);this.addWidth(s,i.textWidth(E))}else this.addWidth(d.getBBox())}this.addWidth(s,s.R+a)}mtextPenalty(){let t=this.FACTORS;return t.depth(t.tail(t.width(0)))}visitMrowNode(t,e){let i=t.lineBBox[e]||t.getLineBBox(e),[r,s]=i.start||[0,0],[n,a]=i.end||[t.childNodes.length-1,0],[o,h]=this.getBorderLR(t);this.addWidth(i,i.L+o);for(let d=r;d<=n;d++)this.visitNode(t.childNodes[d],d===r?s:d===n?a:0);this.addWidth(i,i.R+h)}visitInferredMrowNode(t,e){this.state.depth--,this.visitMrowNode(t,e),this.state.depth++}visitMfracNode(t,e){let i=t;!i.node.attributes.get("bevelled")&&i.getOuterBBox().w>this.state.width&&(this.breakToWidth(i.childNodes[0],this.state.width),this.breakToWidth(i.childNodes[1],this.state.width)),this.visitDefault(t,e)}visitMsqrtNode(t,e){if(t.getOuterBBox().w>this.state.width){let i=t,r=i.childNodes[i.base];this.breakToWidth(r,this.state.width-i.rootWidth()),i.getStretchedSurd()}this.visitDefault(t,e)}visitMrootNode(t,e){this.visitMsqrtNode(t,e)}visitMsubNode(t,e){this.visitDefault(t,e);let i=t,r=i.getOffset()[0],s=i.scriptChild.getOuterBBox(),[n,a]=this.getBorderLR(t);this.addWidth(i.getLineBBox(e),r+n+s.rscale*s.w+i.font.params.scriptspace+a)}visitMsupNode(t,e){this.visitDefault(t,e);let i=t,r=i.getOffset()[0],s=i.scriptChild.getOuterBBox(),[n,a]=this.getBorderLR(t);this.addWidth(i.getLineBBox(e),r+n+s.rscale*s.w+i.font.params.scriptspace+a)}visitMsubsupNode(t,e){this.visitDefault(t,e);let i=t,r=i.subChild.getOuterBBox(),s=i.supChild.getOuterBBox(),n=i.getAdjustedIc(),a=Math.max(r.rscale*r.w,n+s.rscale*s.w)+i.font.params.scriptspace,[o,h]=this.getBorderLR(t);this.addWidth(t.getLineBBox(e),o+a+h)}visitMmultiscriptsNode(t,e){let i=t,r=i.scriptData;if(r.numPrescripts){let s=Math.max(r.psup.rscale*r.psup.w,r.psub.rscale*r.psub.w);this.addWidth(t.getLineBBox(e),s+i.font.params.scriptspace)}if(this.visitDefault(t,e),r.numScripts){let s=Math.max(r.sup.rscale*r.sup.w,r.sub.rscale*r.sub.w);this.addWidth(t.getLineBBox(e),s+i.font.params.scriptspace)}}visitMfencedNode(t,e){let i=t,r=t.getLineBBox(e),[s,n]=this.getBorderLR(t);e===0&&this.addWidth(r,r.L+s),this.visitNode(i.mrow,e),e===t.breakCount&&this.addWidth(r,r.R+n)}visitMactionNode(t,e){let i=t,r=t.getLineBBox(e),[s,n]=this.getBorderLR(t);e===0&&this.addWidth(r,r.L+s),this.visitNode(i.selected,e),e===t.breakCount&&this.addWidth(r,r.R+n)}};(function(){for(let t of Object.keys(pr.postfix)){let e=pr.postfix[t][3];e&&e.fence&&(e.linebreakstyle="after")}pr.infix["⁡"]=[...pr.infix["⁡"]],pr.infix["⁡"][3]={linebreak:"nobreak"}})();var tb="@mathjax/%%FONT%%-font",Ws=class extends Vn{get forceInlineBreaks(){return!1}constructor(t={},e=null,i=null){let[r,s]=t.fontData instanceof ae?[t.fontData.constructor,t.fontData]:[t.fontData||i,null],[n,a]=Co(t,r.OPTIONS);super(n),this.factory=this.options.wrapperFactory||new e,this.factory.jax=this,this.styleJson=this.options.styleJson||new Cr,this.font=s||new r(a),this.font.setOptions({mathmlSpacing:this.options.mathmlSpacing}),this.constructor.genericFont=r,this.unknownCache=new Map;let o=this.options.linebreaks.LinebreakVisitor||Q2;this.linebreaks=new o(this.factory)}setAdaptor(t){super.setAdaptor(t),this.options.htmlHDW==="auto"&&(this.options.htmlHDW=t.canMeasureNodes?"ignore":"force")}addExtension(t,e=""){return this.font.addExtension(t,e)}typeset(t,e){let i=this.constructor,r=i.genericFont;i.genericFont=this.font.constructor,this.setDocument(e);let s=this.createNode();try{this.toDOM(t,s,e)}finally{i.genericFont=r}return s}createNode(){let t=this.constructor.NAME;return this.html("mjx-container",{class:"MathJax",jax:t})}setScale(t,e){let i=this.getInitialScale()*this.options.scale;if(e.node.attributes.get("overflow")==="scale"&&this.math.display){let r=e.getOuterBBox().w,s=Math.max(0,this.math.metrics.containerWidth-4)/this.pxPerEm;r>s&&r&&(i*=s/r)}i!==1&&this.adaptor.setStyle(t,"fontSize",Pu(i))}getInitialScale(){return this.math.metrics.scale}toDOM(t,e,i=null){this.setDocument(i),this.math=t,this.container=e,this.pxPerEm=t.metrics.ex/this.font.params.x_height,this.executeFilters(this.preFilters,t,i,e),this.nodeMap=new Map,t.root.attributes.getAllInherited().overflow=this.options.displayOverflow;let r=t.root.attributes.get("overflow");this.adaptor.setAttribute(e,"overflow",r),r==="linebreak"&&this.getLinebreakWidth();let s=this.options.linebreaks.inline&&!t.display,n=!!t.root.getProperty("inlineMarked");n&&(!s||this.forceInlineBreaks!==t.root.getProperty("inlineForced"))&&(this.unmarkInlineBreaks(t.root),t.root.removeProperty("inlineMarked"),t.root.removeProperty("inlineForced"),n=!1),s&&!n&&(this.markInlineBreaks(t.root.childNodes?.[0]),t.root.setProperty("inlineMarked",!0),t.root.setProperty("inlineForced",this.forceInlineBreaks)),t.root.setTeXclass(null);let a=this.factory.wrap(t.root);this.setScale(e,a),this.processMath(a,e),this.nodeMap=null,this.executeFilters(this.postFilters,t,i,e)}getBBox(t,e){this.setDocument(e),this.math=t,t.root.setTeXclass(null),this.nodeMap=new Map;let i=this.factory.wrap(t.root).getOuterBBox();return this.nodeMap=null,i}getLinebreakWidth(){let t=this.math.metrics.containerWidth/this.pxPerEm,e=this.math.root.attributes.get("maxwidth")||this.options.linebreaks.width;this.containerWidth=Du(e,t,1,this.pxPerEm)}markInlineBreaks(t){if(!t)return;let e=this.forceInlineBreaks,i=!1,r=!1,s="";for(let n of t.childNodes)if(s)r=this.markInlineBreak(r,e,s,t,n),s="",i=!1;else if(n.isEmbellished){if(n===t.childNodes[0])continue;let a=n.coreMO(),o=a.texClass,h=a.attributes.get("linebreak"),d=a.attributes.get("linebreakstyle");(o===L.BIN||o===L.REL||o===L.ORD&&a.hasSpacingAttributes()||h!=="auto")&&h!=="nobreak"&&(d==="before"?(!i||h!=="auto")&&(r=this.markInlineBreak(r,e,h,t,n,a)):s=h),i=h==="newline"&&d==="after"}else if(n.isKind("mspace")){let a=n.attributes.get("linebreak");a!=="nobreak"&&n.canBreak&&(r=this.markInlineBreak(r,e,a,t,n)),i=a==="newline"}else i=!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,i,r,s,n=null){return s.setProperty("breakable",!0),e&&i!=="newline"?(s.setProperty("forcebreak",!0),n?.setProperty("forcebreak",!0)):(s.removeProperty("forcebreak"),n?.removeProperty("forcebreak"),i==="newline"&&s.setProperty("newline",!0)),t||(t=(r.setProperty("process-breaks",!0),r.parent.setProperty("process-breaks",!0),!0)),t}unmarkInlineBreaks(t){if(t&&(t.removeProperty("forcebreak"),t.removeProperty("breakable"),t.coreMO().removeProperty("forcebreak"),t.getProperty("process-breaks"))){t.removeProperty("process-breaks");for(let e of t.childNodes)this.unmarkInlineBreaks(e)}}getMetrics(t){this.setDocument(t);let e=this.adaptor,i=this.getMetricMaps(t);for(let r of t.math){let s=e.parent(r.start.node);if(r.state()<z.METRICS&&s){let{em:n,ex:a,containerWidth:o,scale:h,family:d}=i[+!!r.display].get(s);r.setMetrics(n,a,o,h),this.options.mtextInheritFont&&(r.outputData.mtextFamily=d),this.options.merrorInheritFont&&(r.outputData.merrorFamily=d),r.state(z.METRICS)}}}getMetricsFor(t,e){let i=this.options.mtextInheritFont||this.options.merrorInheritFont,r=this.getTestElement(t,e),s=Object.assign(Object.assign({},this.measureMetrics(r,i)),{display:e});return this.adaptor.remove(r),s}getMetricMaps(t){let e=this.adaptor,i=[new Map,new Map];for(let n of t.math){let a=e.parent(n.start.node);if(a&&n.state()<z.METRICS){let o=i[+!!n.display];o.has(a)||o.set(a,this.getTestElement(a,n.display))}}let r=this.options.mtextInheritFont||this.options.merrorInheritFont,s=[new Map,new Map];for(let n of s.keys())for(let a of i[n].keys())s[n].set(a,this.measureMetrics(i[n].get(a),r));for(let n of s.keys())for(let a of i[n].values())e.remove(a);return s}getTestElement(t,e){let i=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=i.clone(this.testInline),i.setStyle(this.testDisplay,"display","table"),i.setStyle(this.testDisplay,"margin-right",""),i.setStyle(i.firstChild(this.testDisplay),"display","none");let r=i.lastChild(this.testDisplay);i.setStyle(r,"display","table-cell"),i.setStyle(r,"width","10000em"),i.setStyle(r,"float","")}return i.append(t,i.clone(e?this.testDisplay:this.testInline))}measureMetrics(t,e){let i=this.adaptor,r=e?i.fontFamily(t):"",s=i.fontSize(t),[n,a]=i.nodeSize(i.childNode(t,1)),o=n?a/60:s*this.options.exFactor;return{em:s,ex:o,containerWidth:n?i.getStyle(t,"display")==="table"?i.nodeSize(i.lastChild(t))[0]-1:i.nodeBBox(i.lastChild(t)).left-i.nodeBBox(i.firstChild(t)).left-2:1e6,scale:Math.max(this.options.minScale,this.options.matchFontHeight?o/this.font.params.x_height/s:1),family:r}}styleSheet(t){if(this.setDocument(t),this.styleJson.clear(),this.styleJson.addStyles(this.constructor.commonStyles),"getStyles"in t)for(let e of t.getStyles())this.styleJson.addStyles(e);return this.addWrapperStyles(this.styleJson),this.addFontStyles(this.styleJson),this.html("style",{id:"MJX-styles"},[this.text(`
210
+ `+this.styleJson.cssText+`
211
+ `)])}addFontStyles(t){t.addStyles(this.font.styles)}addWrapperStyles(t){for(let 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={},i=[],r){return this.adaptor.node(t,e,i,r)}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,i=["",!1,!1]){let r=this.unknownText(t,e);if(e==="-explicitFont"){let s=this.cssFontStyles(i);this.adaptor.setAttributes(r,{style:s})}return this.measureTextNodeWithCache(r,t,e,i)}measureTextNodeWithCache(t,e,i,r=["",!1,!1]){i==="-explicitFont"&&(i=[r[0],r[1]?"T":"F",r[2]?"T":"F",""].join("-")),this.unknownCache.has(i)||this.unknownCache.set(i,new Map);let s=this.unknownCache.get(i),n=s.get(e);if(n)return n;let a=this.measureTextNode(t);return s.set(e,a),a}cssFontStyles(t,e={}){let[i,r,s]=t;return e["font-family"]=this.font.getFamily(i),r&&(e["font-style"]="italic"),s&&(e["font-weight"]="bold"),e}getFontData(t){return t||(t=new gi),[this.font.getFamily(t.get("font-family")),t.get("font-style")==="italic",t.get("font-weight")==="bold"]}};Ws.NAME="Common",Ws.OPTIONS=Object.assign(Object.assign({},Vn.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:"",fontExtensions:[],htmlHDW:"auto",wrapperFactory:null,fontData:null,fontPath:tb,styleJson:null}),Ws.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:".7em 0",padding:".3em 2px"},'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"}};var eb=class extends So{wrap(t,...e){return this.create(t.kind,t,...e)}},y1=class extends eb{constructor(){super(...arguments),this.jax=null}get Wrappers(){return this.node}};y1.defaultNodes={};var ib=class{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(let i of this.childNodes)i&&i.walkTree(t,e);return e}},nl=2/18,rb=5/18;function Td(t,e,i){return e?t?nl:rb:t?i<nl?0:nl:i}var pa={[Bt(0)]:"0",[Bt(2/18)]:"1",[Bt(3/18)]:"2",[Bt(4/18)]:"3",[Bt(5/18)]:"4",[Bt(6/18)]:"5"},ns=class wn extends ib{static addStyles(e,i){e.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.parent?this.parent.containerWidth: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){let e=this.node;this._breakCount=e.isEmbellished?this.coreMO().embellishedBreakCount:e.arity<0&&!e.linebreakContainer&&this.childNodes[0].isStack?this.childNodes[0].breakCount:0}return this._breakCount}breakTop(e,i){return this.node.linebreakContainer||!this.parent?e:this.parent.breakTop(e,this)}constructor(e,i,r=null){super(e,i),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=fl,this.font=null,this.parent=r,this.font=e.jax.font,this.bbox=ge.zero(),this.getStyles(),this.getStyleData(),this.getVariant(),this.getScale(),this.getSpace(),this.childNodes=i.childNodes.map(s=>{let n=this.wrap(s);return n.bbox.pwidth&&(i.notParent||i.isKind("math"))&&(this.bbox.pwidth=ge.fullWidth),n})}wrap(e,i=null){let r=this.factory.wrap(e,i||this);return i&&i.childNodes.push(r),this.jax.nodeMap.set(e,r),r}getBBox(e=!0){if(this.bboxComputed)return this.bbox;let i=e?this.bbox:ge.zero();return this.computeBBox(i),this.bboxComputed=e,i}getOuterBBox(e=!0){let i=this.getBBox(e);if(!this.styleData)return i;let r=this.styleData.padding,s=this.styleData.border?.width||[0,0,0,0],n=this.styleData.margin||[0,0,0,0],a=i.copy();for(let[,o,h]of ge.boxSides)a[h]+=r[o]+s[o]+n[o];return a}getUnbrokenHD(){let e=this.breakCount+1,i=0,r=0;for(let s=0;s<e;s++){let{h:n,d:a}=this.getLineBBox(s);n>i&&(i=n),a>r&&(r=a)}return[i,r]}computeBBox(e,i=!1){e.empty();for(let r of this.childNodes)e.append(r.getOuterBBox());e.clean(),this.fixesPWidth&&this.setChildPWidths(i)&&this.computeBBox(e,!0)}getLineBBox(e){if(!this.lineBBox[e]){let i=this.breakCount;if(i){let r=this.embellishedBBox(e)||this.computeLineBBox(e);this.lineBBox[e]=r,e===0&&(!this.node.isKind("mo")&&this.node.isEmbellished?r.originalL=this.getBBox().L:r.L=this.getBBox().L),e===i&&(r.R=this.getBBox().R)}else{let r=this.getOuterBBox();this.lineBBox[e]=Ti.from(r,this.linebreakOptions.lineleading)}}return this.lineBBox[e]}embellishedBBox(e){if(!this.node.isEmbellished||this.node.isKind("mo"))return null;let i=this.coreMO();return i.moLineBBox(e,i.embellishedBreakStyle,this.getOuterBBox())}computeLineBBox(e){return this.getChildLineBBox(this.childNodes[0],e)}getBreakNode(e){if(!e.start)return[this,null];let[i,r]=e.start;if(this.node.isEmbellished)return[this,this.coreMO()];let s=this.childNodes[0]?.node?.isInferred||this.node.isKind("semantics")?this.childNodes[0].childNodes:this.childNodes;return this.node.isToken||!s[i]?[this,null]:s[i].getBreakNode(s[i].getLineBBox(r))}getChildLineBBox(e,i){let r=this.breakCount,s=e.getLineBBox(i);return(this.styleData||this.bbox.L||this.bbox.R)&&(s=s.copy()),this.addMiddleBorders(s),i===0?(s.L+=this.bbox.L,this.addLeftBorders(s)):i===r&&(s.R+=this.bbox.R,this.addRightBorders(s)),s}sideStyleSize(e){let i=this.styleData.border,r=this.styleData.padding,s=this.styleData.margin;return(i?.width?.[e]||0)+(r?.[e]||0)+(s?.[e]||0)}addLeftBorders(e){this.styleData&&(e.w+=this.sideStyleSize(3))}addMiddleBorders(e){this.styleData&&(e.h+=this.sideStyleSize(0),e.d+=this.sideStyleSize(2))}addRightBorders(e){this.styleData&&(e.w+=this.sideStyleSize(1))}setChildPWidths(e,i=null,r=!0){if(e)return!1;r&&(this.bbox.pwidth="");let s=!1;for(let n of this.childNodes){let a=n.getBBox();a.pwidth&&n.setChildPWidths(e,i===null?a.w:i,r)&&(s=!0)}return s}breakToWidth(e){}invalidateBBox(e=!0){(this.bboxComputed||this._breakCount>=0)&&(this.bboxComputed=!1,this.lineBBox=[],this._breakCount=-1,this.parent&&e&&this.parent.invalidateBBox())}copySkewIC(e){let i=this.childNodes[0];i?.bbox?.sk&&(e.sk=i.bbox.sk),i?.bbox?.dx&&(e.dx=i.bbox.dx);let r=this.childNodes[this.childNodes.length-1];r?.bbox?.ic&&(e.ic=r.bbox.ic,e.w+=e.ic)}getStyles(){let e=this.node.attributes.getExplicit("style");if(!e)return;let i=this.styles=new gi(e);for(let r=0,s=wn.removeStyles.length;r<s;r++){let n=wn.removeStyles[r];i.get(n)&&(this.removedStyles||(this.removedStyles={}),this.removedStyles[n]=i.get(n),i.set(n,""))}}getStyleData(){if(!this.styles)return;let e=[,,,,].fill(0),i=[,,,,].fill(0),r=[,,,,].fill(0),s=[,,,,],n=[,,,,],a=!1,o=!1,h=!1;for(let[d,p]of ge.boxSides){let E="border"+d,y=this.styles.get(E+"Width");y&&(o=!0,r[p]=Math.max(0,this.length2em(y,1)),s[p]=this.styles.get(E+"Style")||"solid",n[p]=this.styles.get(E+"Color"));let A=this.styles.get("padding"+d);A&&(a=!0,e[p]=Math.max(0,this.length2em(A,1)));let w=this.styles.get("margin"+d);w&&(h=!0,i[p]=this.length2em(w,1))}this.styleData=a||o||h?{padding:e,margin:i,border:o?{width:r,style:s,color:n}:null}:null}getVariant(){if(!this.node.isToken)return;let e=this.node.attributes,i=e.get("mathvariant");if(e.hasExplicit("mathvariant"))this.font.getVariant(i)||(console.warn(`Invalid variant: ${i}`),i="normal");else{let r=e.getList("fontfamily","fontweight","fontstyle");if(this.removedStyles){let s=this.removedStyles;s.fontFamily&&(r.family=s.fontFamily),s.fontWeight&&(r.weight=s.fontWeight),s.fontStyle&&(r.style=s.fontStyle)}r.fontfamily&&(r.family=r.fontfamily),r.fontweight&&(r.weight=r.fontweight),r.fontstyle&&(r.style=r.fontstyle),r.weight&&r.weight.match(/^\d+$/)&&(r.weight=parseInt(r.weight)>600?"bold":"normal"),r.family?i=this.explicitVariant(r.family,r.weight,r.style):(this.node.getProperty("variantForm")&&(i="-tex-variant"),i=(wn.BOLDVARIANTS[r.weight]||{})[i]||i,i=(wn.ITALICVARIANTS[r.style]||{})[i]||i)}this.variant=i}explicitVariant(e,i,r){let s=this.styles;return s||(s=this.styles=new gi),s.set("fontFamily",e),i&&s.set("fontWeight",i),r&&s.set("fontStyle",r),"-explicitFont"}getScale(){let e=1,i=this.parent,r=i?i.bbox.scale:1,s=this.node.attributes,n=Math.min(s.get("scriptlevel"),2),a=s.get("fontsize"),o=this.node.isToken||this.node.isKind("mstyle")?s.get("mathsize"):s.getInherited("mathsize");if(n!==0&&(e=s.get("scriptsizemultiplier")**+n),this.removedStyles&&this.removedStyles.fontSize&&!a&&(a=this.removedStyles.fontSize),a&&!s.hasExplicit("mathsize")&&(o=a),o!=="1"&&(e*=this.length2em(o,1,1)),n!==0){let h=this.length2em(s.get("scriptminsize"),.4,1);e<h&&(e=h)}this.bbox.scale=e,this.bbox.rscale=e/r}getSpace(){let e=this.isTopEmbellished(),i=this.node.hasSpacingAttributes();this.jax.options.mathmlSpacing||i?e&&this.getMathMLSpacing():this.getTeXSpacing(e,i)}getMathMLSpacing(){let e=this.node.coreMO(),i=e.coreParent(),r=i.parent;if(!r||!r.isKind("mrow")||r.childNodes.length===1)return;let s=r.childIndex(i);if(s===null)return;let n=e.getProperty("noDictDef"),a=e.attributes,o=a.get("scriptlevel")>0;if(this.bbox.L=a.isSet("lspace")?Math.max(0,this.length2em(a.get("lspace"))):Td(o,n,e.lspace),this.bbox.R=a.isSet("rspace")?Math.max(0,this.length2em(a.get("rspace"))):Td(o,n,e.rspace),!s)return;let h=r.childNodes[s-1];if(!h.isEmbellished)return;let d=this.jax.nodeMap.get(h).getBBox();d.R&&(this.bbox.L=Math.max(0,this.bbox.L-d.R))}getTeXSpacing(e,i){if(!i){let r=this.node.texSpacing();r&&(this.bbox.L=this.length2em(r))}if(e||i){let r=this.node.coreMO().attributes;r.isSet("lspace")&&(this.bbox.L=Math.max(0,this.length2em(r.get("lspace")))),r.isSet("rspace")&&(this.bbox.R=Math.max(0,this.length2em(r.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 e=this.bbox.rscale,i=this.coreMO();for(;i!==this&&i;)e*=i.bbox.rscale,i=i.parent;return e}getRScale(){let e=1,i=this;for(;i;)e*=i.bbox.rscale,i=i.parent;return e}getText(){let e="";if(this.node.isToken)for(let i of this.node.childNodes)i instanceof qs&&(e+=i.getText());return e}canStretch(e){if(this.stretch=fl,this.node.isEmbellished){let i=this.core();i&&i.node!==this.node&&i.canStretch(e)&&(this.stretch=i.stretch)}return this.stretch.dir!==fe.None}getAlignShift(){let{indentalign:e,indentshift:i,indentalignfirst:r,indentshiftfirst:s}=this.node.attributes.getAllAttributes();return r!=="indentalign"&&(e=r),s!=="indentshift"&&(i=s),this.processIndent(e,i)}processIndent(e,i,r="",s="",n=this.metrics.containerWidth){if(!this.jax.math.display)return["left",0];(!r||r==="auto")&&(r=this.jax.math.root.getProperty("inlineMarked")?"left":this.jax.options.displayAlign),(!s||s==="auto")&&(s=this.jax.math.root.getProperty("inlineMarked")?"0":this.jax.options.displayIndent),e==="auto"&&(e=r),i==="auto"&&(i=s,e==="right"&&!i.match(/^\s*0[a-z]*\s*$/)&&(i=("-"+i.trim()).replace(/^--/,"")));let a=this.length2em(i,n);return[e,a]}getAlignX(e,i,r){return r==="right"?e-(i.w+i.R)*i.rscale:r==="left"?i.L*i.rscale:(e-i.w*i.rscale)/2}getAlignY(e,i,r,s,n){return n==="top"?e-r:n==="bottom"?s-i:n==="center"?(e-r-(i-s))/2:0}getWrapWidth(e){return this.childNodes[e].getBBox().w}getChildAlign(e){return"left"}percent(e){return Pu(e)}em(e){return Bt(e)}px(e,i=-ls){return Y1(e,i,this.metrics.em)}length2em(e,i=1,r=null){r===null&&(r=this.bbox.scale);let s=this.font.params.rule_thickness,n=zs(e,{medium:1,thin:2/3,thick:5/3},0);return n?n*s:Du(e,i,r,this.jax.pxPerEm)}unicodeChars(e,i=this.variant){let r=Ao(e),s=this.font.getVariant(i);if(s&&s.chars){let n=s.chars;r=r.map(a=>n[a]?.[3]?.smp||a)}return r}remapChars(e){return e}mmlText(e){return this.node.factory.create("text").setText(e)}mmlNode(e,i={},r=[]){return this.node.factory.create(e,i,r)}createMo(e){let i=this.node.factory,r=i.create("text").setText(e),s=i.create("mo",{stretchy:!0},[r]);s.inheritAttributesFrom(this.node),s.parent=this.node.parent;let n=this.wrap(s);return n.parent=this,n}getVariantChar(e,i){let r=this.font.getChar(e,i)||[0,0,0,{unknown:!0}];return r.length===3&&(r[3]={}),r}html(e,i={},r=[]){return this.jax.html(e,i,r)}};ns.kind="unknown",ns.styles={},ns.removeStyles=["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","font"],ns.skipAttributes={fontfamily:!0,fontsize:!0,fontweight:!0,fontstyle:!0,color:!0,background:!0,class:!0,href:!0,style:!0,xmlns:!0},ns.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"}},ns.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"}};var Cd={"70.7%":"s","70%":"s","50%":"ss","60%":"Tn","85%":"sm","120%":"lg","144%":"Lg","173%":"LG","207%":"hg","249%":"HG"},se=class x1 extends ns{toCHTML(e){this.toEmbellishedCHTML(e)||this.addChildren(this.standardChtmlNodes(e))}toEmbellishedCHTML(e){if(e.length<=1||!this.node.isEmbellished)return!1;let i=this.adaptor;e.forEach(n=>i.append(n,this.html("mjx-linestrut")));let r=this.coreMO().embellishedBreakStyle,s=[];for(let[n,a]of[[e[0],"before"],[e[1],"after"]])r===a?s.push(this.createChtmlNodes([n])[0]):(this.toCHTML([n]),s.push(this.dom[0]),a==="after"&&i.removeAttribute(this.dom[0],"space"));return this.dom=s,!0}addChildren(e){for(let i of this.childNodes)i.toCHTML(e)}standardChtmlNodes(e){this.markUsed();let i=this.createChtmlNodes(e);return this.handleStyles(),this.handleScale(),this.handleBorders(),this.handleColor(),this.handleSpace(),this.handleAttributes(),this.handlePWidth(),i}markUsed(){this.jax.wrapperUsage.add(this.kind)}createChtmlNodes(e){this.dom=e.map(i=>this.html("mjx-"+this.node.kind)),e=this.handleHref(e);for(let i of e.keys())this.adaptor.append(e[i],this.dom[i]);return this.dom}handleHref(e){let i=this.node.attributes.get("href");return i?e.map(r=>this.adaptor.append(r,this.html("a",{href:i}))):e}handleStyles(){if(!this.styles)return;let e=this.styles.cssText;if(e){let i=this.adaptor;this.dom.forEach(s=>i.setAttribute(s,"style",e));let r=this.styles.get("font-family");r&&this.dom.forEach(s=>i.setStyle(s,"font-family",this.font.cssFamilyPrefix+", "+r))}}handleScale(){this.dom.forEach(e=>this.setScale(e,this.bbox.rscale))}setScale(e,i){let r=Math.abs(i-1)<.001?1:i;if(e&&r!==1){let s=this.percent(r);Cd[s]?this.adaptor.setAttribute(e,"size",Cd[s]):this.adaptor.setStyle(e,"fontSize",s)}return e}handleSpace(){let e=this.adaptor,i=!!this.node.getProperty("breakable")&&!this.node.getProperty("newline"),r=this.dom.length-1;for(let s of[[this.getLineBBox(0).L,"space","marginLeft",0],[this.getLineBBox(r).R,"rspace","marginRight",r]]){let[n,a,o,h]=s,d=this.em(n);if(i&&a==="space"){let p=e.node("mjx-break",pa[d]?{size:pa[d]}:{style:`letter-spacing: ${this.em(n-1)}`},[e.text(" ")]);e.insert(p,this.dom[h])}else n&&(pa[d]?e.setAttribute(this.dom[h],a,pa[d]):e.setStyle(this.dom[h],o,d))}}handleBorders(){let e=this.styleData?.border,i=this.styleData?.padding,r=this.dom.length-1;if(!e||!r)return;let s=this.adaptor;for(let n of this.dom.keys()){let a=this.dom[n];n&&(e.width[3]&&s.setStyle(a,"border-left"," none"),i[3]&&s.setStyle(a,"padding-left","0")),n!==r&&(e.width[1]&&s.setStyle(a,"border-right","none"),i[1]&&s.setStyle(a,"padding-right","0"))}}handleColor(){let e=this.adaptor,i=this.node.attributes,r=i.getExplicit("mathcolor")||i.getExplicit("color"),s=i.getExplicit("mathbackground")||i.getExplicit("background")||this.styles?.get("background-color");r&&this.dom.forEach(n=>e.setStyle(n,"color",r)),s&&this.dom.forEach(n=>e.setStyle(n,"backgroundColor",s))}handleAttributes(){let e=this.adaptor,i=this.node.attributes,r=i.getAllDefaults(),s=x1.skipAttributes;for(let n of i.getExplicitNames())if(s[n]===!1||!(n in r)&&!s[n]&&!e.hasAttribute(this.dom[0],n)){let a=i.getExplicit(n);this.dom.forEach(o=>e.setAttribute(o,n,a))}if(i.get("class")){let n=i.get("class").trim().split(/ +/);for(let a of n)this.dom.forEach(o=>e.addClass(o,a))}this.node.getProperty("inline-breaks")&&this.dom.forEach(n=>e.setAttribute(n,"inline-breaks","true"))}handlePWidth(){if(this.bbox.pwidth){let e=this.adaptor;this.bbox.pwidth===ge.fullWidth?this.dom.forEach(i=>e.setAttribute(i,"width","full")):this.dom.forEach(i=>e.setStyle(i,"width",this.bbox.pwidth))}}setIndent(e,i,r){let s=this.adaptor;if(i==="center"||i==="left"){let n=this.getBBox().L;r+n&&s.setStyle(e,"margin-left",this.em(r+n))}if(i==="center"||i==="right"){let n=this.getBBox().R;r+n&&s.setStyle(e,"margin-right",this.em(-r+n))}}drawBBox(){let{w:e,h:i,d:r,R:s}=this.getOuterBBox(),n=this.html("mjx-box",{style:{opacity:.25,"margin-left":this.em(-e-s)}},[this.html("mjx-box",{style:{height:this.em(i),width:this.em(e),"background-color":"red"}}),this.html("mjx-box",{style:{height:this.em(r),width:this.em(e),"margin-left":this.em(-e),"vertical-align":this.em(-r),"background-color":"green"}})]),a=this.dom[0]||this.parent.dom[0],o=this.adaptor.getAttribute(a,"size");o&&this.adaptor.setAttribute(n,"size",o);let h=this.adaptor.getStyle(a,"fontSize");h&&this.adaptor.setStyle(n,"fontSize",h),this.adaptor.append(this.adaptor.parent(a),n),this.adaptor.setStyle(a,"backgroundColor","#FFEE00")}html(e,i={},r=[]){return this.jax.html(e,i,r)}text(e){return this.jax.text(e)}char(e){return this.font.charSelector(e).substring(1)}};se.kind="unknown",se.autoStyle=!0;function sb(t){return class extends t{getWrapWidth(e){return this.parent?this.getBBox().w:this.metrics.containerWidth/this.jax.pxPerEm}computeBBox(e,i=!1){super.computeBBox(e,i);let r=this.node.attributes;if(!this.parent&&this.jax.math.display&&r.get("overflow")==="linebreak"){let s=this.containerWidth;e.w>s&&this.childNodes[0].breakToWidth(s),e.updateFrom(this.childNodes[0].getBBox())}}}}var Sd=(function(){var t;let e=sb(se);return t=class extends e{handleDisplay(i){let r=this.adaptor,[s,n]=this.getAlignShift();if(s!=="center"&&r.setAttribute(i,"justify",s),this.bbox.pwidth===ge.fullWidth){if(r.setAttribute(i,"width","full"),this.jax.table){let{L:a,w:o,R:h}=this.jax.table.getOuterBBox();s==="right"?h=Math.max(h||-n,-n):s==="left"?a=Math.max(a||n,n):s==="center"&&(o+=2*Math.abs(n));let d=this.em(Math.max(0,a+o+h));r.setStyle(i,"min-width",d),r.setStyle(this.jax.table.dom[0],"min-width",d)}}else this.setIndent(this.dom[0],s,n)}handleInline(i){let r=this.adaptor,s=r.getStyle(this.dom[0],"margin-right");s&&(r.setStyle(this.dom[0],"margin-right",""),r.setStyle(i,"margin-right",s),r.setStyle(i,"width","0"))}toCHTML(i){super.toCHTML(i);let r=this.adaptor;this.node.attributes.get("display")==="block"?(r.setAttribute(this.dom[0],"display","true"),r.setAttribute(i[0],"display","true"),this.handleDisplay(i[0])):this.handleInline(i[0]),r.addClass(this.dom[0],`${this.font.cssFontPrefix}-N`)}setChildPWidths(i,r=null,s=!0){return this.parent?super.setChildPWidths(i,r,s):!1}handleAttributes(){super.handleAttributes();let i=this.adaptor;this.node.getProperty("process-breaks")&&this.dom.forEach(r=>i.setAttribute(r,"breakable","true"))}},t.kind=_a.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 nb(t){return class extends t{computeBBox(e,i=!1){super.computeBBox(e),this.copySkewIC(e)}}}var Ad=(function(){var t;let e=nb(se);return t=class extends e{},t.kind=ms.prototype.kind,t})();function ab(t){return class extends t{get breakCount(){return+!!this.breakStyle}get embellishedBreakCount(){return+!!this.embellishedBreakStyle}get embellishedBreakStyle(){return this.breakStyle||this.getBreakStyle()}protoBBox(e){let i=this.stretch.dir!==fe.None;i&&this.size===null&&this.getStretchedVariant([0]),!(i&&this.size<0)&&(super.computeBBox(e),e.w===0&&this.node.attributes.hasExplicit("fence")&&this.node.getText()===""&&(this.node.texClass===L.OPEN||this.node.texClass===L.CLOSE)&&!this.jax.options.mathmlSpacing&&(e.R=this.font.params.nulldelimiterspace),this.copySkewIC(e))}getAccentOffset(){let e=ge.empty();return this.protoBBox(e),-e.w/2}getCenterOffset(e=null){return e||(e=ge.empty(),super.computeBBox(e)),(e.h+e.d)/2+this.font.params.axis_height-e.h}getStretchedVariant(e,i=!1){if(this.stretch.dir===fe.None)return;let r=this.getWH(e),s=this.getSize("minsize",0),n=this.getSize("maxsize",1/0),a=this.node.getProperty("mathaccent");r=Math.max(s,Math.min(n,r));let o=this.font.params.delimiterfactor/1e3,h=this.font.params.delimitershortfall,d=s||i?r:a?Math.min(r/o,r+h):Math.max(r*o,r-h),p=this.getText().codePointAt(0),E=this.stretch;this.size&&(this.size=(this.stretch=E=this.font.getDelimiter(p),null));let y=E.c||p,A=0;if(E.sizes)for(let w of E.sizes){if(w>=d){a&&A&&A--,this.setDelimSize(y,A);return}A++}E.stretch?(this.size=-1,this.invalidateBBox(),this.getStretchBBox(e,this.checkExtendedHeight(r,E),E)):this.setDelimSize(y,A-1)}setDelimSize(e,i){let r=this.stretch;this.variant=this.font.getSizeVariant(e,i),this.size=i;let s=r.schar&&r.schar[Math.min(i,r.schar.length-1)]||e;this.stretch=Object.assign(Object.assign({},r),{c:s}),this.childNodes[0].invalidateBBox()}getSize(e,i){let r=this.node.attributes;return r.isSet(e)&&(i=this.length2em(r.get(e),1,1)),i}getWH(e){if(e.length===0)return 0;if(e.length===1)return e[0];let[i,r]=e,s=this.font.params.axis_height;return this.node.attributes.get("symmetric")?2*Math.max(i-s,r+s):i+r}getStretchBBox(e,i,r){Object.hasOwn(r,"min")&&r.min>i&&(i=r.min);let[s,n,a]=r.HDW;if(this.stretch.dir===fe.Vertical)[s,n]=this.getBaseline(e,i,r);else if(a=i,this.stretch.hd&&!this.jax.options.mathmlSpacing){let o=this.font.params.extender_factor;s=s*(1-o)+this.stretch.hd[0]*o,n=n*(1-o)+this.stretch.hd[1]*o}this.bbox.h=s,this.bbox.d=n,this.bbox.w=a}getBaseline(e,i,r){let s=e.length===2&&e[0]+e[1]===i,n=this.node.attributes.get("symmetric"),[a,o]=s?e:[i,0],[h,d]=[a+o,0];if(n){let p=this.font.params.axis_height;s&&(h=2*Math.max(a-p,o+p)),d=h/2-p}else if(s)d=o;else{let[p,E]=r.HDW||[.75,.25];d=E*(h/(p+E))}return[h-d,d]}checkExtendedHeight(e,i){if(i.fullExt){let[r,s]=i.fullExt;e=s+Math.ceil(Math.max(0,e-s)/r)*r}return e}setBreakStyle(e=""){if(this.breakStyle=this.node.parent?.isEmbellished&&!e?"":this.getBreakStyle(e),this.breakCount&&this.multChar){let i=this.parent.node.childIndex(this.node),r=this.parent.node.childNodes[i+1];r&&r.setTeXclass(this.multChar.node)}}getBreakStyle(e=""){let i=this.node.attributes,r=e||(i.get("linebreak")==="newline"||this.node.getProperty("forcebreak")?i.get("linebreakstyle"):"");return r==="infixlinebreakstyle"&&(r=i.get(r)),r}getMultChar(){let e=this.node.attributes.get("linebreakmultchar");e&&this.getText()==="⁢"&&e!=="⁢"&&(this.multChar=this.createMo(e))}constructor(e,i,r=null){super(e,i,r),this.size=null,this.isAccent=this.node.isAccent,this.getMultChar(),this.setBreakStyle()}computeBBox(e,i=!1){if(this.protoBBox(e),this.node.attributes.get("symmetric")&&this.stretch.dir!==fe.Horizontal){let r=this.getCenterOffset(e);e.h+=r,e.d-=r}this.node.getProperty("mathaccent")&&(this.stretch.dir===fe.None||this.size>=0)&&(e.w=0)}computeLineBBox(e){return this.moLineBBox(e,this.breakStyle)}moLineBBox(e,i,r=null){let s=this.node.attributes.get("lineleading"),n=this.length2em(s,this.linebreakOptions.lineleading);if(e===0&&i==="before"){let o=Ti.from(ge.zero(),n);return o.originalL=this.bbox.L,this.bbox.L=0,o}let a=Ti.from(r||this.getOuterBBox(),n);return e===1&&(i==="after"?(a.w=a.h=a.d=0,a.isFirst=!0,this.bbox.R=0):i==="duplicate"?a.L=0:this.multChar&&(a=Ti.from(this.multChar.getOuterBBox(),n)),a.getIndentData(this.node)),a}canStretch(e){if(this.stretch.dir!==fe.None)return this.stretch.dir===e;if(!this.node.attributes.get("stretchy"))return!1;let i=this.getText();if(Array.from(i).length!==1)return!1;let r=this.font.getDelimiter(i.codePointAt(0));return this.stretch=r&&r.dir===e?r:fl,this.stretch.dir!==fe.None}getVariant(){if(this.node.attributes.get("largeop")){this.variant=this.node.attributes.get("displaystyle")?"-largeop":"-smallop";return}if(!this.node.attributes.hasExplicit("mathvariant")&&this.node.getProperty("pseudoscript")===!1){this.variant="-tex-variant";return}super.getVariant()}remapChars(e){let i=this.node.getProperty("primes");if(i)return Ao(i);if(e.length===1){let r=this.node.coreParent().parent,s=this.isAccent&&!r.isKind("mrow")?"accent":"mo",n=this.font.getRemappedChar(s,e[0]);n&&(e=this.unicodeChars(n,this.variant))}return e}}}var Ld=(function(){var t;let e=ab(se);return t=class extends e{toCHTML(i){let r=this.adaptor,s=this.node.attributes,n=s.get("symmetric")&&this.stretch.dir!==fe.Horizontal,a=this.stretch.dir!==fe.None;a&&this.size===null&&this.getStretchedVariant([]),i.length>1&&i.forEach(h=>r.append(h,this.html("mjx-linestrut")));let o=this.standardChtmlNodes(i);if(o.length>1&&this.breakStyle!=="duplicate"){let h=+(this.breakStyle==="after");r.remove(o[h]),o[h]=null}if(a&&this.size<0)this.stretchHTML(o);else{if(n||s.get("largeop")){let h=this.em(this.getCenterOffset());h!=="0"&&o.forEach(d=>d&&r.setStyle(d,"verticalAlign",h))}this.node.getProperty("mathaccent")&&o.forEach(h=>{r.setStyle(h,"width","0"),r.setStyle(h,"margin-left",this.em(this.getAccentOffset()))}),o[0]&&this.addChildren([o[0]]),o[1]&&(this.multChar||this).addChildren([o[1]])}}stretchHTML(i){let r=this.getText().codePointAt(0);this.font.delimUsage.add(r),this.childNodes[0].markUsed();let s=this.stretch,n=s.stretch,a=this.font.getStretchVariants(r),o=[],h=[];for(let U=0;U<n.length;U++)n[U]&&(h[U]=this.font.getChar(a[U],n[U]));let{h:d,d:p,w:E}=this.bbox,y={};if(s.dir===fe.Vertical)this.createAssembly(h,n,a,o,d+p,xn,`
212
+ `),o.push(this.html("mjx-mark")),y.height=this.em(d+p),y.verticalAlign=this.em(-p);else{let U=(s.ext||0)+J1;this.createAssembly(h,n,a,o,E,U),y.width=this.em(E)}let A={class:this.char(s.c||r),style:y},w=this.html("mjx-stretchy-"+s.dir,A,o),_=this.adaptor;i[0]&&_.append(i[0],w),i[1]&&_.append(i[1],i[0]?_.clone(w):w)}createAssembly(i,r,s,n,a,o,h=""){i=[...i,null,null,null].slice(0,4);let[d,p,E,y]=i.map(_=>_?h?_[0]+_[1]:_[2]:0);p=Math.max(0,p-o);let[A,w]=i[3]?[(a-y)/2-d,(a-y)/2-E]:[a-d-E,0];this.createPart("mjx-beg",i[0],r[0],s[0],n),this.createPart("mjx-ext",i[1],r[1],s[1],n,A,p,h,d,y/2||E),i[3]&&(this.createPart("mjx-mid",i[3],r[3],s[3],n),this.createPart("mjx-ext",i[1],r[1],s[1],n,w,p,h,y/2,E)),this.createPart("mjx-end",i[2],r[2],s[2],n)}createPart(i,r,s,n,a,o=0,h=0,d="",p=0,E=0){if(s){let y=r[3],A=y.f||(n==="normal"?"":this.font.getVariant(n).letter),w=y.ff||(A?`${this.font.cssFontPrefix}-${A}`:""),_=y.c||String.fromCodePoint(s),U=[];if(i==="mjx-ext"&&(h||y.dx)){if(o<0&&d){a.push(this.html(i,Object.assign(Object.assign({},w?{class:w}:{}),{style:{"border-width":`${this.em(p+o/2)} 0 ${this.em(E+o/2)}`,"clip-path":"none"}})));return}h||(h=Math.max(.07,2*y.dx-.07));let vt=Math.min(Math.ceil(o/h)+1,500);if(y.cmb){U.push(this.html("mjx-spacer"));for(let nt=0;nt<vt;nt++)U.push(this.html("mjx-c",{},[this.text(_)]))}else U=[this.html("mjx-spacer",{},[this.text(Array(vt).fill(_).join(d))])]}else U=[this.text(_)];a.push(this.html(i,w?{class:w}:{},U))}}},t.kind=ri.prototype.kind,t.styles={"mjx-stretchy-h":{display:"inline-block"},[["beg","ext","end","mid"].map(i=>`mjx-stretchy-h > mjx-${i}`).join(", ")]:{display:"inline-block",width:0,"text-align":"right"},"mjx-stretchy-h > mjx-ext":{"clip-path":"padding-box polygon(0 -1em, 100% -1em, 100% calc(100% + 1em), 0 calc(100% + 1em))",width:"100%",border:"0px solid transparent","box-sizing":"border-box","text-align":"left"},"mjx-stretchy-v":{display:"inline-block","text-align":"center"},[["beg","ext","end","mid"].map(i=>`mjx-stretchy-v > mjx-${i}`).join(", ")]:{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 polygon(-1em 0, calc(100% + 1em) 0, calc(100% + 1em) 100%, -1em 100%)",height:"100%",border:"0.1px solid transparent","box-sizing":"border-box","white-space":"pre"},"mjx-mark":{display:"inline-block",height:0}},t})();function ob(t){return class extends t{remapChars(e){if(e.length){let i=this.font.getRemappedChar("mn",e[0]);if(i){let r=this.unicodeChars(i,this.variant);r.length===1?e[0]=r[0]:e=r.concat(e.slice(1))}}return e}}}var Rd=(function(){var t;let e=ob(se);return t=class extends e{},t.kind=ja.prototype.kind,t})();function lb(t){return class extends t{createText(e){let i=this.wrap(this.mmlText(e));return i.parent=this,i}constructor(e,i,r=null){super(e,i,r);let s=this.node.attributes,n=s.getList("lquote","rquote");this.variant!=="monospace"&&(!s.isSet("lquote")&&n.lquote==='"'&&(n.lquote="“"),!s.isSet("rquote")&&n.rquote==='"'&&(n.rquote="”")),this.childNodes.unshift(this.createText(n.lquote)),this.childNodes.push(this.createText(n.rquote))}}}var wd=(function(){var t;let e=lb(se);return t=class extends e{},t.kind=Ua.prototype.kind,t})();function hb(t){var e=class extends t{constructor(){super(...arguments),this.breakPoints=[]}textWidth(i){let r=this.textNode;if(!r){let s=this.node.factory.create("text");s.parent=this.node,r=this.textNode=this.factory.wrap(s),r.parent=this}return r.node.setText(i),r.invalidateBBox(!1),r.getBBox().w}get breakCount(){return this.breakPoints.length}getVariant(){let i=this.jax.options,r=this.jax.math.outputData,s=(!!r.merrorFamily||!!i.merrorFont)&&this.node.Parent.isKind("merror");if(r.mtextFamily||i.mtextFont||s){let n=this.node.attributes.get("mathvariant"),a=this.constructor.INHERITFONTS[n]||this.jax.font.getCssFont(n),o=a[0]||(s?r.merrorFamily||i.merrorFont:r.mtextFamily||i.mtextFont);this.variant=this.explicitVariant(o,a[2]?"bold":"",a[1]?"italic":"");return}super.getVariant()}setBreakAt(i){this.breakPoints.push(i)}clearBreakPoints(){this.breakPoints=[]}computeLineBBox(i){let r=Ti.from(this.getOuterBBox(),this.linebreakOptions.lineleading);return this.breakCount&&(r.w=this.getBreakWidth(i),i===0?(r.R=0,this.addLeftBorders(r)):(r.L=0,r.indentData=[["left","0"],["left","0"],["left","0"]],i===this.breakCount&&this.addRightBorders(r))),r}getBreakWidth(i){let r=this.childNodes,[s,n]=this.breakPoints[i-1]||[0,0],[a,o]=this.breakPoints[i]||[r.length,0],h=r[s].node.getText().split(/ /);if(s===a)return this.textWidth(h.slice(n,o).join(" "));let d=this.textWidth(h.slice(n).join(" "));for(;++s<a&&s<r.length;)d+=r[s].getBBox().w;return s<r.length&&(h=r[s].node.getText().split(/ /),d+=this.textWidth(h.slice(0,o).join(" "))),d}};return e.INHERITFONTS={normal:["",!1,!1],bold:["",!1,!0],italic:["",!0,!1],"bold-italic":["",!0,!0]},e}var Id=(function(){var t;let e=hb(se);return t=class extends e{toCHTML(i){if(!this.breakCount){super.toCHTML(i);return}let r=this.standardChtmlNodes(i),s=this.textNode.node,n=this.childNodes;for(let a of r.keys()){let o=[r[a]];this.adaptor.append(r[a],this.html("mjx-linestrut"));let[h,d]=this.breakPoints[a-1]||[0,0],[p,E]=this.breakPoints[a]||[n.length,0],y=n[h].node.getText().split(/ /);if(h===p){s.setText(y.slice(d,E).join(" ")),this.textNode.toCHTML(o);continue}for(s.setText(y.slice(d).join(" ")),this.textNode.toCHTML(o);++h<p&&h<n.length;)n[h].toCHTML(o);h<n.length&&(y=n[h].node.getText().split(/ /),s.setText(y.slice(0,E).join(" ")),this.textNode.toCHTML(o))}}},t.kind=Dn.prototype.kind,t})();function cb(t){return class extends t{get canBreak(){return this.node.canBreak}get breakCount(){return+!!this.breakStyle}setBreakStyle(e=""){this.breakStyle=e||(this.node.hasNewline||this.node.getProperty("forcebreak")?"before":"")}constructor(e,i,r=null){super(e,i,r),this.setBreakStyle()}computeBBox(e,i=!1){let r=this.node.attributes;e.w=this.length2em(r.get("width"),0),e.h=this.length2em(r.get("height"),0),e.d=this.length2em(r.get("depth"),0)}computeLineBBox(e){let i=this.node.attributes.get("data-lineleading"),r=this.length2em(i,this.linebreakOptions.lineleading),s=Ti.from(ge.zero(),r);return e===1&&(s.getIndentData(this.node),s.w=this.getBBox().w,s.isFirst=s.w===0),s}}}var kd=(function(){var t;let e=cb(se);return t=class extends e{toCHTML(i){i.length>1&&i.forEach(o=>this.adaptor.append(o,this.html("mjx-linestrut")));let r=this.standardChtmlNodes(i),{w:s,h:n,d:a}=this.getBBox();s<0&&(this.adaptor.setStyle(r[0],"marginRight",this.em(s)),s=0),s&&!this.breakCount&&this.adaptor.setStyle(r[0],"width",this.em(s)),n=Math.max(0,n+a),n&&this.adaptor.setStyle(r[0],"height",this.em(Math.max(0,n))),a&&this.adaptor.setStyle(r[0],"verticalAlign",this.em(-a))}},t.kind=Pn.prototype.kind,t})();function db(t){return class extends t{get containerWidth(){let e=this.node.attributes,i=e.get("width").toString();return!i.match(/^[-+]|%$/)&&e.get("data-overflow")==="linebreak"?this.length2em(i):this.parent.containerWidth}getDimens(){let e=this.node.attributes.getList("width","height","depth","lspace","voffset"),i=this.childNodes[0].getOuterBBox(),{w:r,h:s,d:n}=i,a=r,o=s,h=n,d=0,p=0,E=0;e.width!==""&&(r=this.dimen(e.width,i,"w",0)),e.height!==""&&(s=this.dimen(e.height,i,"h",0)),e.depth!==""&&(n=this.dimen(e.depth,i,"d",0)),e.voffset!==""&&(p=this.dimen(e.voffset,i)),e.lspace!==""&&(d=this.dimen(e.lspace,i));let y=this.node.attributes.get("data-align");return y&&(E=this.getAlignX(r,i,y)),[o,h,a,s-o,n-h,r-a,d,p,E]}dimen(e,i,r="",s=null){e=String(e);let n=e.match(/width|height|depth/),a=n?i[n[0].charAt(0)]:r?i[r]:0,o=this.length2em(e,a)||0;return e.match(/^[-+]/)&&r&&(o+=a),s!=null&&(o=Math.max(s,o)),o}setBBoxDimens(e){let[i,r,s,n,a,o]=this.getDimens();e.w=s+o,e.h=i+n,e.d=r+a}computeBBox(e,i=!1){if(this.setBBoxDimens(e),this.childNodes[0].getOuterBBox().w>e.w){let r=this.node.attributes.get("data-overflow");(r==="linebreak"||r==="auto"&&this.jax.math.root.attributes.get("overflow")==="linebreak")&&(this.childNodes[0].breakToWidth(e.w),this.setBBoxDimens(e))}this.setChildPWidths(i,e.w)}getWrapWidth(e){return this.getBBox().w}getChildAlign(e){return this.node.attributes.get("data-align")||"left"}}}var Od=(function(){var t;let e=db(se);return t=class extends e{toCHTML(i){if(this.toEmbellishedCHTML(i))return;let r=this.standardChtmlNodes(i),s=[],n={},[,,a,o,h,d,p,E,y]=this.getDimens();if((d||this.childNodes[0].getBBox().pwidth)&&(n.width=this.em(a+d)),(o||h)&&(n.margin=this.em(o)+" 0 "+this.em(h)),p+y||E){n.position="relative";let A=this.html("mjx-rbox",{style:{left:this.em(p+y),top:this.em(-E),"max-width":n.width}});p+y&&this.childNodes[0].getBBox().pwidth&&(this.adaptor.setAttribute(A,"width","full"),this.adaptor.setStyle(A,"left",this.em(p))),s.push(A)}r=[this.adaptor.append(r[0],this.html("mjx-block",{style:n},s))],this.childNodes[0].childNodes.length?this.childNodes[0].toCHTML([s[0]||r[0]]):(o||h)&&this.adaptor.append(s[0]||r[0],this.html("mjx-box"))}},t.kind=Ga.prototype.kind,t.styles={"mjx-mpadded":{display:"inline-block"},"mjx-rbox":{display:"inline-block",position:"relative"}},t})(),Be=.067,In=.2,Os="0.067em solid",Jn={top:0,right:1,bottom:2,left:3},ub=Object.keys(Jn),Da=(t=>[,,,,].fill(t.thickness+t.padding)),pb=(t=>[,,,,].fill(t.thickness)),Br=t=>Math.max(t.padding,t.thickness*(t.arrowhead.x+t.arrowhead.dx+1)),al=(t,e)=>{if(t.childNodes[0]){let{h:i,d:r}=t.childNodes[0].getBBox();e[0]=e[2]=Math.max(0,t.thickness*t.arrowhead.y-(i+r)/2)}return e},ol=(t,e)=>{if(t.childNodes[0]){let{w:i}=t.childNodes[0].getBBox();e[1]=e[3]=Math.max(0,t.thickness*t.arrowhead.y-i/2)}return e},mb={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"]},fb={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"]},gb={up:t=>ol(t,[Br(t),0,t.padding,0]),down:t=>ol(t,[t.padding,0,Br(t),0]),right:t=>al(t,[0,Br(t),0,t.padding]),left:t=>al(t,[0,t.padding,0,Br(t)]),updown:t=>ol(t,[Br(t),0,Br(t),0]),leftright:t=>al(t,[0,Br(t),0,Br(t)])},bb=function(t){return e=>{let i=Jn[e];return[e,{renderer:t,bbox:r=>{let s=[0,0,0,0];return s[i]=r.thickness+r.padding,s},border:r=>{let s=[0,0,0,0];return s[i]=r.thickness,s}}]}},Eb=function(t){return(e,i,r)=>{let s=Jn[i],n=Jn[r];return[e,{renderer:t,bbox:a=>{let o=a.thickness+a.padding,h=[0,0,0,0];return h[s]=h[n]=o,h},border:a=>{let o=[0,0,0,0];return o[s]=o[n]=a.thickness,o},remove:i+" "+r}]}},yb=function(t){return e=>{let i="mjx-"+e.charAt(0)+"strike";return[e+"diagonalstrike",{renderer:t(i),bbox:Da}]}},xb=function(t){return e=>{let[i,r,s,n]=fb[e];return[e+"arrow",{renderer:(a,o)=>{let[h,d]=a.arrowAW();t(a,a.arrow(d,i*(h-r),s))},bbox:a=>{let{a:o,x:h,y:d}=a.arrowData(),[p,E,y]=[a.arrowhead.x,a.arrowhead.y,a.arrowhead.dx],[A,w]=a.getArgMod(p+y,E),_=d+(A>o?a.thickness*w*Math.sin(A-o):0),U=h+(A>Math.PI/2-o?a.thickness*w*Math.sin(A+o-Math.PI/2):0);return[_,U,_,U]},remove:n}]}},Nb=function(t){return e=>{let[i,r,s,n]=mb[e];return[e+"arrow",{renderer:(a,o)=>{let{w:h,h:d,d:p}=a.getBBox(),[E,y]=s?[d+p,"X"]:[h,"Y"],A=a.getOffset(y);t(a,a.arrow(E,i,r,y,A))},bbox:gb[e],remove:n}]}};function vb(t){return class extends t{getParameters(){let e=this.node.attributes,i=e.get("data-padding");i!==void 0&&(this.padding=this.length2em(i,In));let r=e.get("data-thickness");r!==void 0&&(this.thickness=this.length2em(r,Be));let s=e.get("data-arrowhead");if(s!==void 0){let[n,a,o]=ji(s);this.arrowhead={x:n?parseFloat(n):4,y:a?parseFloat(a):2,dx:o?parseFloat(o):1}}}getNotations(){let e=this.constructor.notations;for(let i of ji(this.node.attributes.get("notation"))){let r=e.get(i);r&&(this.notations[i]=r,r.renderChild&&(this.renderChild=r.renderer))}}removeRedundantNotations(){for(let e of Object.keys(this.notations))if(this.notations[e]){let i=this.notations[e].remove||"";for(let r of i.split(/ /))delete this.notations[r]}}initializeNotations(){for(let e of Object.keys(this.notations)){let i=this.notations[e].init;i&&i(this)}}getBBoxExtenders(){let e=[0,0,0,0];for(let i of Object.keys(this.notations))this.maximizeEntries(e,this.notations[i].bbox(this));return e}getPadding(){let e=[0,0,0,0];for(let i of Object.keys(this.notations)){let r=this.notations[i].border;r&&this.maximizeEntries(e,r(this))}return[0,1,2,3].map(i=>this.TRBL[i]-e[i])}maximizeEntries(e,i){for(let r=0;r<e.length;r++)e[r]<i[r]&&(e[r]=i[r])}getOffset(e){let[i,r,s,n]=this.TRBL,a=(e==="X"?r-n:s-i)/2;return Math.abs(a)>.001?a:0}getArgMod(e,i){return[Math.atan2(i,e),Math.sqrt(e*e+i*i)]}arrow(e,i,r,s="",n=0){return null}arrowData(){let[e,i]=[this.padding,this.thickness],r=i*(this.arrowhead.x+Math.max(1,this.arrowhead.dx)),{h:s,d:n,w:a}=this.childNodes[0].getBBox(),o=s+n,h=Math.sqrt(o*o+a*a),d=Math.max(e,r*a/h),p=Math.max(e,r*o/h),[E,y]=this.getArgMod(a+2*d,o+2*p);return{a:E,W:y,x:d,y:p}}arrowAW(){let{h:e,d:i,w:r}=this.childNodes[0].getBBox(),[s,n,a,o]=this.TRBL;return this.getArgMod(o+r+n,s+e+i+a)}createMsqrt(e){let i=this.node.factory.create("msqrt");i.inheritAttributesFrom(this.node),i.childNodes[0]=e.node;let r=this.wrap(i);return r.parent=this,r}sqrtTRBL(){let e=this.msqrt.getBBox(),i=this.msqrt.childNodes[0].getBBox();return[e.h-i.h,0,e.d-i.d,e.w-i.w]}constructor(e,i,r=null){super(e,i,r),this.notations={},this.renderChild=null,this.msqrt=null,this.padding=In,this.thickness=Be,this.arrowhead={x:4,y:2,dx:1},this.TRBL=[0,0,0,0],this.getParameters(),this.getNotations(),this.removeRedundantNotations(),this.initializeNotations(),this.TRBL=this.getBBoxExtenders()}computeBBox(e,i=!1){let[r,s,n,a]=this.TRBL,o=this.childNodes[0].getBBox();e.combine(o,a,0),e.h+=r,e.d+=n,e.w+=s,this.setChildPWidths(i)}}}var ma=function(t,e=""){return((i,r)=>{let s=i.adjustBorder(i.html("mjx-"+t));if(e){let n=i.getOffset(e);if(i.thickness!==.067||n){let a=`translate${e}(${i.Em(i.thickness/2-n)})`;i.adaptor.setStyle(s,"transform",a)}}i.adaptor.append(i.dom[0],s)})},fa=function(t){return bb((e,i)=>{e.adaptor.setStyle(i,"border-"+t,e.Em(e.thickness)+" solid")})(t)},Md=function(t,e,i){return Eb((r,s)=>{let n=r.Em(r.thickness)+" solid";r.adaptor.setStyle(s,"border-"+e,n),r.adaptor.setStyle(s,"border-"+i,n)})(t,e,i)},Dd=function(t,e){return yb(i=>(r,s)=>{let{w:n,h:a,d:o}=r.getBBox(),[h,d]=r.getArgMod(n,a+o),p=e*r.thickness/2,E=r.adjustBorder(r.html(i,{style:{width:r.Em(d),transform:"rotate("+r.fixed(-e*h)+"rad) translateY("+p+"em)"}}));r.adaptor.append(r.dom[0],E)})(t)},Zr=function(t){return xb((e,i)=>{e.adaptor.append(e.dom[0],i)})(t)},Ms=function(t){return Nb((e,i)=>{e.adaptor.append(e.dom[0],i)})(t)};function N1(t,e){return Math.atan2(t,e).toFixed(3).replace(/\.?0+$/,"")}var ga=N1(1,2),Pd=(function(){var t;let e=vb(se);return t=class extends e{adjustArrow(i,r){let s=this.thickness,n=this.arrowhead;if(n.x===4&&n.y===2&&n.dx===1&&s===.067)return;let[a,o]=[s*n.x,s*n.y].map(w=>this.em(w)),h=N1(n.dx,n.y),[d,p,E,y,A]=this.adaptor.childNodes(i);this.adjustHead(p,[o,"0","1px",a],h),this.adjustHead(E,["1px","0",o,a],"-"+h),this.adjustHead(y,[o,a,"1px","0"],"-"+h),this.adjustHead(A,["1px",a,o,"0"],h),this.adjustLine(d,s,n.x,r)}adjustHead(i,r,s){i&&(this.adaptor.setStyle(i,"border-width",r.join(" ")),this.adaptor.setStyle(i,"transform","skewX("+s+"rad)"))}adjustLine(i,r,s,n){this.adaptor.setStyle(i,"borderTop",this.em(r)+" solid"),this.adaptor.setStyle(i,"top",this.em(-r/2)),this.adaptor.setStyle(i,"right",this.em(r*(s-1))),n&&this.adaptor.setStyle(i,"left",this.em(r*(s-1)))}moveArrow(i,r,s){if(!s)return;let n=this.adaptor.getStyle(i,"transform");this.adaptor.setStyle(i,"transform",`translate${r}(${this.em(-s)})${n?" "+n:""}`)}adjustBorder(i){return this.thickness!==.067&&this.adaptor.setStyle(i,"borderWidth",this.em(this.thickness)),i}adjustThickness(i){return this.thickness!==.067&&this.adaptor.setStyle(i,"strokeWidth",this.fixed(this.thickness)),i}fixed(i,r=3){return Math.abs(i)<6e-4?"0":i.toFixed(r).replace(/\.?0+$/,"")}Em(i){return super.em(i)}toCHTML(i){let r=this.adaptor,s=this.standardChtmlNodes(i),n=r.append(s[0],this.html("mjx-box"));this.renderChild?this.renderChild(this,n):this.childNodes[0].toCHTML([n]);for(let o of Object.keys(this.notations)){let h=this.notations[o];h.renderChild||h.renderer(this,n)}let a=this.getPadding();for(let o of ub){let h=Jn[o];a[h]>0&&r.setStyle(n,"padding-"+o,this.em(a[h]))}}arrow(i,r,s,n="",a=0){let o=this.getBBox().w,h={width:this.em(i)};o!==i&&(h.left=this.em((o-i)/2)),r&&(h.transform="rotate("+this.fixed(r)+"rad)");let d=this.html("mjx-arrow",{style:h},[this.html("mjx-aline"),this.html("mjx-rthead"),this.html("mjx-rbhead")]);return s&&(this.adaptor.append(d,this.html("mjx-lthead")),this.adaptor.append(d,this.html("mjx-lbhead")),this.adaptor.setAttribute(d,"double","true")),this.adjustArrow(d,s),this.moveArrow(d,n,a),d}},t.kind=Xa.prototype.kind,t.styles={"mjx-menclose":{position:"relative"},"mjx-menclose > mjx-dstrike":{display:"inline-block",left:0,top:0,position:"absolute","border-top":Os,"transform-origin":"top left"},"mjx-menclose > mjx-ustrike":{display:"inline-block",left:0,bottom:0,position:"absolute","border-top":Os,"transform-origin":"bottom left"},"mjx-menclose > mjx-hstrike":{"border-top":Os,position:"absolute",left:0,right:0,bottom:"50%",transform:"translateY("+Bt(Be/2)+")"},"mjx-menclose > mjx-vstrike":{"border-left":Os,position:"absolute",top:0,bottom:0,right:"50%",transform:"translateX("+Bt(Be/2)+")"},"mjx-menclose > mjx-rbox":{position:"absolute",top:0,bottom:0,right:0,left:0,border:Os,"border-radius":Bt(Be+In)},"mjx-menclose > mjx-cbox":{position:"absolute",top:0,bottom:0,right:0,left:0,border:Os,"border-radius":"50%"},"mjx-menclose > mjx-arrow":{position:"absolute",left:0,bottom:"50%",height:0,width:0},"mjx-menclose > mjx-arrow > mjx-aline":{display:"block",position:"absolute","box-sizing":"border-box","transform-origin":"bottom",left:0,top:Bt(-Be/2),right:Bt(Be*3),height:0,"border-top":Bt(Be)+" solid","border-left":0,"border-right":0},"mjx-menclose > mjx-arrow[double] > mjx-aline":{display:"block",position:"absolute","box-sizing":"border-box","transform-origin":"bottom",left:Bt(Be*3),height:0,"border-left":Bt(Be*4)+" solid","border-right":0},"mjx-menclose > mjx-arrow > mjx-rthead":{display:"block",position:"absolute","box-sizing":"border-box","transform-origin":"bottom",transform:"skewX("+ga+"rad)",right:0,bottom:"-1px","border-left":Bt(Be*4)+" solid","border-right":0,"border-bottom":"1px solid transparent","border-top":Bt(Be*2)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-rbhead":{display:"block",position:"absolute","box-sizing":"border-box",transform:"skewX(-"+ga+"rad)","transform-origin":"top",right:0,top:"-1px","border-left":Bt(Be*4)+" solid","border-right":0,"border-top":"1px solid transparent","border-bottom":Bt(Be*2)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-lthead":{display:"block",position:"absolute","box-sizing":"border-box",transform:"skewX(-"+ga+"rad)","transform-origin":"bottom",left:0,bottom:"-1px","border-left":0,"border-right":Bt(Be*4)+" solid","border-bottom":"1px solid transparent","border-top":Bt(Be*2)+" solid transparent"},"mjx-menclose > mjx-arrow > mjx-lbhead":{display:"block",position:"absolute","box-sizing":"border-box",transform:"skewX("+ga+"rad)","transform-origin":"top",left:0,top:"-1px","border-left":0,"border-right":Bt(Be*4)+" solid","border-top":"1px solid transparent","border-bottom":Bt(Be*2)+" solid transparent"},"mjx-menclose > mjx-dbox-top":{position:"absolute",top:0,bottom:"50%",left:0,width:Bt(1.5*In),"border-width":Bt(Be),"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:Bt(1.5*In),"border-width":Bt(Be),"border-style":"none solid solid none","border-radius":"0 0 100% 0","box-sizing":"border-box"}},t.notations=new Map([fa("top"),fa("right"),fa("bottom"),fa("left"),Md("actuarial","top","right"),Md("madruwb","bottom","right"),Dd("up",1),Dd("down",-1),["horizontalstrike",{renderer:ma("hstrike","Y"),bbox:i=>[0,i.padding,0,i.padding]}],["verticalstrike",{renderer:ma("vstrike","X"),bbox:i=>[i.padding,0,i.padding,0]}],["box",{renderer:(i,r)=>{i.adaptor.setStyle(r,"border",i.Em(i.thickness)+" solid")},bbox:Da,border:pb,remove:"left right top bottom"}],["roundedbox",{renderer:ma("rbox"),bbox:Da}],["circle",{renderer:ma("cbox"),bbox:Da}],["phasorangle",{renderer:(i,r)=>{let{h:s,d:n}=i.getBBox(),[a,o]=i.getArgMod(1.75*i.padding,s+n),h=i.thickness*Math.sin(a)*.9;i.adaptor.setStyle(r,"border-bottom",i.Em(i.thickness)+" solid");let d=i.adjustBorder(i.html("mjx-ustrike",{style:{width:i.Em(o),transform:`translateX(${i.Em(h)}) rotate(${i.fixed(-a)}rad)`}}));i.adaptor.append(i.dom[0],d)},bbox:i=>{let r=i.padding/2,s=i.thickness;return[2*r,r,r+s,3*r+s]},border:i=>[0,0,i.thickness,0],remove:"bottom"}],Ms("up"),Ms("down"),Ms("left"),Ms("right"),Ms("updown"),Ms("leftright"),Zr("updiagonal"),Zr("northeast"),Zr("southeast"),Zr("northwest"),Zr("southwest"),Zr("northeastsouthwest"),Zr("northwestsoutheast"),["longdiv",{renderer:(i,r)=>{let s=i.adaptor;s.setStyle(r,"border-top",i.Em(i.thickness)+" solid");let n=s.append(i.dom[0],i.html("mjx-dbox-top")),a=s.append(i.dom[0],i.html("mjx-dbox-bot")),o=i.thickness,h=i.padding;o!==.067&&(s.setStyle(n,"border-width",i.Em(o)),s.setStyle(a,"border-width",i.Em(o))),h!==.2&&(s.setStyle(n,"width",i.Em(1.5*h)),s.setStyle(a,"width",i.Em(1.5*h)))},bbox:i=>{let r=i.padding,s=i.thickness;return[r+s,r,r,2*r+s/2]}}],["radical",{renderer:(i,r)=>{i.msqrt.toCHTML([r]);let s=i.sqrtTRBL();i.adaptor.setStyle(i.msqrt.dom[0],"margin",s.map(n=>i.Em(-n)).join(" "))},init:i=>{i.msqrt=i.createMsqrt(i.childNodes[0])},bbox:i=>i.sqrtTRBL(),renderChild:!0}]]),t})();function Tb(t){return class extends t{stretchChildren(){let e=[];for(let s of this.childNodes)s.canStretch(fe.Vertical)&&e.push(s);let i=e.length,r=this.childNodes.length;if(i&&r>1){let s=0,n=0,a=i>1&&i===r;for(let o of this.childNodes){let h=o.stretch.dir===fe.None;if(a||h){let d=o.getBBox().rscale,[p,E]=o.getUnbrokenHD();p*=d,E*=d,p>s&&(s=p),E>n&&(n=E)}}for(let o of e){let h=o.coreRScale();o.coreMO().getStretchedVariant([s/h,n/h])}}}get fixesPWidth(){return!1}get breakCount(){return this._breakCount<0&&(this._breakCount=this.childNodes.length?this.childNodes.reduce((e,i)=>e+i.breakCount,0):0),this._breakCount}breakTop(e,i){let r=this;return this.isStack?this.parent.breakTop(r,r):r}constructor(e,i,r=null){super(e,i,r),this.dh=0;let s=this;this.isStack=!this.parent||this.parent.node.isInferred||this.parent.breakTop(s,s)!==s,this.stretchChildren();for(let n of this.childNodes)if(n.bbox.pwidth){this.bbox.pwidth=ge.fullWidth;break}}computeBBox(e,i=!1){let r=this.breakCount;this.lineBBox=r?[new Ti({h:.75,d:.25,w:0},[0,0])]:[],e.empty();for(let s of this.childNodes.keys()){let n=this.childNodes[s];e.append(n.getOuterBBox()),r&&this.computeChildLineBBox(n,s)}e.clean(),r&&!this.coreMO().node.isEmbellished&&this.computeLinebreakBBox(e),this.fixesPWidth&&this.setChildPWidths(i)&&this.computeBBox(e,!0),this.vboxAdjust(e)}computeLinebreakBBox(e){e.empty();let i=this.isStack,r=this.lineBBox,s=r.length-1;if(i)for(let a of r.keys()){let o=r[a];this.addMiddleBorders(o),a===0&&this.addLeftBorders(o),a===s&&this.addRightBorders(o)}let n=0;for(let a of r.keys()){let o=r[a];e.combine(o,0,n),n-=Math.max(.25,o.d)+o.lineLeading+Math.max(.75,r[a+1]?.h||0)}i?(r[0].L=this.bbox.L,r[s].R=this.bbox.R):(e.w=Math.max(...this.lineBBox.map(a=>a.w)),this.shiftLines(e),!this.jax.math.display&&!this.linebreakOptions.inline&&(e.pwidth=ge.fullWidth,this.node.isInferred&&(this.parent.bbox.pwidth=ge.fullWidth))),e.clean()}vboxAdjust(e){if(!this.parent)return;let i=this.breakCount,r=this.parent.node.attributes.get("data-vertical-align");if(i&&r==="bottom")this.dh=i?e.d-this.lineBBox[i-1].d:0;else if(r==="center"||i&&r==="middle"){let{h:s,d:n}=e,a=this.font.params.axis_height;this.dh=(s+n)/2+a-s}else{this.dh=0;return}e.h+=this.dh,e.d-=this.dh}computeChildLineBBox(e,i){let r=this.lineBBox[this.lineBBox.length-1];r.end=[i,0],r.append(e.getLineBBox(0));let s=e.breakCount+1;if(s!==1)for(let n=1;n<s;n++){let a=new Ti({h:.75,d:.25,w:0});a.start=a.end=[i,n],a.isFirst=!0,a.append(e.getLineBBox(n)),this.lineBBox.push(a)}}getLineBBox(e){return this.getBBox(),this.isStack?super.getLineBBox(e):Ti.from(this.getOuterBBox(),this.linebreakOptions.lineleading)}shiftLines(e){let i=e.w,r=this.lineBBox,s=r.length-1,[n,a]=r[1].indentData?.[0]||["left","0"];for(let o of r.keys()){let h=r[o],[d,p]=o===0?[n,a]:h.indentData?.[o===s?2:1]||["left","0"],[E,y]=this.processIndent(d,p,n,a,i);h.L=0,h.L=this.getAlignX(i,h,E)+y;let A=h.L+h.w;A>e.w&&(e.w=A)}}setChildPWidths(e,i=null,r=!0){return this.breakCount?e?!1:(i!==null&&this.bbox.w!==i&&(this.bbox.w=i,this.shiftLines(this.bbox)),!0):super.setChildPWidths(e,i,r)}breakToWidth(e){this.linebreaks.breakToWidth(this,e)}}}function Cb(t){return class extends t{getScale(){this.bbox.scale=this.parent.bbox.scale,this.bbox.rscale=1}}}var ph=(function(){var t;let e=Tb(se);return t=class extends e{constructor(){super(...arguments),this.linebreakCount=0}toCHTML(i){let r=this.linebreakCount=this.isStack?0:this.breakCount;r||!this.node.isInferred?i=this.standardChtmlNodes(i):this.dom=i,this.addChildren(i),r?this.placeLines(i,r):(this.handleVerticalAlign(i[0]),this.handleNegativeWidth(i[0]))}placeLines(i,r){this.getBBox();let s=this.lineBBox,n=this.adaptor,[a,o]=s[1].indentData?.[0]||["left","0"];for(let h of i.keys()){let d=s[h],[p,E]=h===0?[a,o]:d.indentData?.[h===r?2:1]||["left","0"],[y,A]=this.processIndent(p,E,a,o);n.setAttribute(i[h],"align",y),A&&n.setStyle(i[h],"margin-left",this.em(A)),h<r&&this.jax.math.display&&n.setStyle(i[h],"margin-bottom",this.em(d.lineLeading))}}handleVerticalAlign(i){this.dh&&this.adaptor.setStyle(this.adaptor.parent(i),"vertical-align",this.em(this.dh))}handleNegativeWidth(i){let{w:r}=this.getBBox();r<0&&(this.adaptor.setStyle(i,"width",this.em(Math.max(0,r))),this.adaptor.setStyle(i,"marginRight",this.em(r)))}createChtmlNodes(i){let r=this.linebreakCount;if(!r)return super.createChtmlNodes(i);let s=this.adaptor,n=this.node.isInferred?"mjx-linestack":"mjx-"+this.node.kind;if(this.dom=[s.append(i[0],this.html(n))],n==="mjx-mrow"&&!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){let o=this.parent.node.attributes.get("data-vertical-align");(o==="middle"||o==="center"||o==="bottom")&&s.setAttribute(this.dom[0],"break-align",o)}this.dom=[s.append(this.handleHref(i)[0],this.dom[0])];let a=Array(r);for(let o=0;o<=r;o++)a[o]=s.append(this.dom[0],this.html("mjx-linebox",{lineno:o}));return a}addChildren(i){let r=0;for(let s of this.childNodes){let n=s.breakCount;s.toCHTML(i.slice(r,r+n+1)),r+=n}}},t.kind=Gs.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})(),Bd=(function(){var t;let e=Cb(ph);return t=class extends e{},t.kind=Ha.prototype.kind,t})();function Sb(t){return class extends t{createMrow(){let e=this.node.factory.create("inferredMrow");e.inheritAttributesFrom(this.node),this.mrow=this.wrap(e),this.mrow.parent=this}addMrowChildren(){let e=this.node,i=this.mrow;this.addMo(e.open),this.childNodes.length&&i.childNodes.push(this.childNodes[0]);let r=0;for(let s of this.childNodes.slice(1))this.addMo(e.separators[r++]),i.childNodes.push(s);this.addMo(e.close),i.stretchChildren()}addMo(e){if(!e)return;let i=this.wrap(e);this.mrow.childNodes.push(i),i.parent=this.mrow}constructor(e,i,r=null){super(e,i,r),this.mrow=null,this.createMrow(),this.addMrowChildren()}computeBBox(e,i=!1){e.updateFrom(this.mrow.getOuterBBox()),this.setChildPWidths(i)}get breakCount(){return this.mrow.breakCount}computeLineBBox(e){return this.mrow.getLineBBox(e)}}}var Fd=(function(){var t;let e=Sb(se);return t=class extends e{toCHTML(i){let r=this.standardChtmlNodes(i);this.mrow.toCHTML(r)}},t.kind=Va.prototype.kind,t})();function Ab(t){return class extends t{getFractionBBox(e,i,r){let s=this.childNodes[0].getOuterBBox(),n=this.childNodes[1].getOuterBBox(),a=this.font.params.axis_height,{T:o,u:h,v:d}=this.getTUV(i,r);e.combine(s,0,a+o+Math.max(s.d*s.rscale,h)),e.combine(n,0,a-o-Math.max(n.h*n.rscale,d)),e.w+=2*this.pad+.2}getTUV(e,i){let r=this.font.params,s=r.axis_height,n=(e?3.5:1.5)*i;return{T:(e?3.5:1.5)*i,u:(e?r.num1:r.num2)-s-n,v:(e?r.denom1:r.denom2)+s-n}}getAtopBBox(e,i){let{u:r,v:s,nbox:n,dbox:a}=this.getUVQ(i);e.combine(n,0,r),e.combine(a,0,-s),e.w+=2*this.pad}getUVQ(e){let i=this.childNodes[0].getOuterBBox(),r=this.childNodes[1].getOuterBBox(),s=this.font.params,[n,a]=e?[s.num1,s.denom1]:[s.num3,s.denom2],o=(e?7:3)*s.rule_thickness,h=n-i.d*i.scale-(r.h*r.scale-a);return h<o&&(n+=(o-h)/2,a+=(o-h)/2,h=o),{u:n,v:a,q:h,nbox:i,dbox:r}}getBevelledBBox(e,i){let{u:r,v:s,delta:n,nbox:a,dbox:o}=this.getBevelData(i),h=this.bevel.getOuterBBox();e.combine(a,0,r),e.combine(h,e.w-n/2,0),e.combine(o,e.w-n/2,s)}getBevelData(e){let i=this.childNodes[0].getOuterBBox(),r=this.childNodes[1].getOuterBBox(),s=e?.4:.15,n=Math.max(i.scale*(i.h+i.d),r.scale*(r.h+r.d))+2*s,a=this.font.params.axis_height;return{H:n,delta:s,u:i.scale*(i.d-i.h)/2+a+s,v:r.scale*(r.d-r.h)/2+a-s,nbox:i,dbox:r}}isDisplay(){let{displaystyle:e,scriptlevel:i}=this.node.attributes.getList("displaystyle","scriptlevel");return e&&i===0}constructor(e,i,r=null){if(super(e,i,r),this.bevel=null,this.pad=this.node.getProperty("withDelims")?0:this.font.params.nulldelimiterspace,this.node.attributes.get("bevelled")){let{H:s}=this.getBevelData(this.isDisplay()),n=this.bevel=this.createMo("/");n.node.attributes.set("symmetric",!0),n.canStretch(fe.Vertical),n.getStretchedVariant([s],!0)}}computeBBox(e,i=!1){e.empty();let{linethickness:r,bevelled:s}=this.node.attributes.getList("linethickness","bevelled"),n=this.isDisplay(),a=null;if(s)this.getBevelledBBox(e,n);else{let o=this.length2em(String(r),.06);a=-2*this.pad,o===0?this.getAtopBBox(e,n):(this.getFractionBBox(e,n,o),a-=.2),a+=e.w}e.clean(),this.setChildPWidths(i,a)}canStretch(e){return!1}getChildAlign(e){let i=this.node.attributes;return i.get("bevelled")?"left":i.get(["numalign","denomalign"][e])}getWrapWidth(e){let i=this.node.attributes;return i.get("bevelled")?this.childNodes[e].getOuterBBox().w:this.getBBox().w-(this.length2em(i.get("linethickness"))?.2:0)-2*this.pad}}}var _d=(function(){var t;let e=Ab(se);return t=class extends e{toCHTML(i){if(this.toEmbellishedCHTML(i))return;this.standardChtmlNodes(i);let{linethickness:r,bevelled:s}=this.node.attributes.getList("linethickness","bevelled"),n=this.isDisplay();if(s)this.makeBevelled(n);else{let a=this.length2em(String(r),.06);a===0?this.makeAtop(n):this.makeFraction(n,a)}}makeFraction(i,r){let{numalign:s,denomalign:n}=this.node.attributes.getList("numalign","denomalign"),a=this.node.getProperty("withDelims"),o=i?{type:"d"}:{},h=a?Object.assign(Object.assign({},o),{delims:"true"}):Object.assign({},o),d=s==="center"?{}:{align:s},p=n==="center"?{}:{align:n},E=Object.assign({},o),y=Object.assign({},o),A=this.font.params;if(r!==.06){let U=A.axis_height,vt=this.font.params.rule_factor,nt=this.em(r),{T:xt,u:jt,v:Ft}=this.getTUV(i,r),He=(i?this.em(3*r):nt)+" -.1em";o.style={height:nt,"border-top":this.em(r*vt)+" solid",margin:He};let H=this.em(Math.max(0,jt));y.style={height:H,"vertical-align":"-"+H},E.style={height:this.em(Math.max(0,Ft))},h.style={"vertical-align":this.em(U-xt)}}let w,_;this.adaptor.append(this.dom[0],this.html("mjx-frac",h,[w=this.html("mjx-num",d,[this.html("mjx-nstrut",y)]),this.html("mjx-dbox",{},[this.html("mjx-dtable",{},[this.html("mjx-line",o),this.html("mjx-row",{},[_=this.html("mjx-den",p,[this.html("mjx-dstrut",E)])])])])])),this.childNodes[0].toCHTML([w]),this.childNodes[1].toCHTML([_])}makeAtop(i){let{numalign:r,denomalign:s}=this.node.attributes.getList("numalign","denomalign"),n=this.node.getProperty("withDelims"),a=i?{type:"d",atop:!0}:{atop:!0},o=n?Object.assign(Object.assign({},a),{delims:!0}):Object.assign({},a),h=r==="center"?{}:{align:r},d=s==="center"?{}:{align:s},{v:p,q:E}=this.getUVQ(i);h.style={"padding-bottom":this.em(E)},o.style={"vertical-align":this.em(-p)};let y,A;this.adaptor.append(this.dom[0],this.html("mjx-frac",o,[y=this.html("mjx-num",h),A=this.html("mjx-den",d)])),this.childNodes[0].toCHTML([y]),this.childNodes[1].toCHTML([A])}makeBevelled(i){let r=this.adaptor;r.setAttribute(this.dom[0],"bevelled","ture");let s=r.append(this.dom[0],this.html("mjx-num"));this.childNodes[0].toCHTML([s]),this.bevel.toCHTML(this.dom);let n=r.append(this.dom[0],this.html("mjx-den"));this.childNodes[1].toCHTML([n]);let{u:a,v:o,delta:h}=this.getBevelData(i);a&&r.setStyle(s,"verticalAlign",this.em(a)),o&&r.setStyle(n,"verticalAlign",this.em(o));let d=this.em(-h/2);r.setStyle(this.bevel.dom[0],"marginLeft",d),r.setStyle(this.bevel.dom[0],"marginRight",d)}},t.kind=Wa.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 > mjx-line, mjx-dtable > mjx-row":{"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 Lb(t){return class extends t{get base(){return 0}get root(){return null}combineRootBBox(e,i,r){}getPQ(e){let i=this.font.params.rule_thickness,r=this.font.params.surd_height,s=this.node.attributes.get("displaystyle")?this.font.params.x_height:i;return[s,e.h+e.d>this.surdH?(e.h+e.d-(this.surdH-i-r-s/2))/2:r+s/4]}getRootDimens(e,i){return[0,0,0,0]}rootWidth(){return 1.25}getStretchedSurd(){let e=this.font.params.rule_thickness,i=this.font.params.surd_height,r=this.node.attributes.get("displaystyle")?this.font.params.x_height:e,{h:s,d:n}=this.childNodes[this.base].getOuterBBox();this.surdH=s+n+e+i+r/4,this.surd.getStretchedVariant([this.surdH-n,n],!0)}constructor(e,i,r=null){super(e,i,r),this.surd=this.createMo("√"),this.surd.canStretch(fe.Vertical),this.getStretchedSurd()}computeBBox(e,i=!1){e.empty();let r=this.surd.getBBox(),s=new ge(this.childNodes[this.base].getOuterBBox()),n=this.getPQ(r)[1],a=this.font.params.rule_thickness,o=this.font.params.surd_height,h=s.h+n+a,[d]=this.getRootDimens(r,h);e.h=h+o,this.combineRootBBox(e,r,h),e.combine(r,d,h-r.h),e.combine(s,d+r.w,0),e.clean(),this.setChildPWidths(i)}invalidateBBox(){super.invalidateBBox(),this.surd.childNodes[0].invalidateBBox()}}}var mh=(function(){var t;let e=Lb(se);return t=class extends e{toCHTML(i){let r=this.surd,s=this.childNodes[this.base],n=r.getBBox(),a=s.getOuterBBox(),[,o]=this.getPQ(n),h=this.font.params.surd_height,d=a.h+o+h,p=this.adaptor,E=this.standardChtmlNodes(i),y,A,w,_;this.root!=null&&(w=p.append(E[0],this.html("mjx-root")),_=this.childNodes[this.root]);let U=p.append(E[0],this.html("mjx-sqrt",{},[y=this.html("mjx-surd"),A=this.html("mjx-box",{style:{paddingTop:this.em(o)}})]));h!==.06&&p.setStyle(A,"border-top-width",this.em(h*this.font.params.rule_factor)),this.addRoot(w,_,n,d),r.toCHTML([y]),s.toCHTML([A]),r.size<0&&p.addClass(U,"mjx-tall")}addRoot(i,r,s,n){}},t.kind=za.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 Rb(t){return class extends t{get root(){return 1}combineRootBBox(e,i,r){let s=this.childNodes[this.root].getOuterBBox(),n=this.getRootDimens(i,r)[1];e.combine(s,0,n)}getRootDimens(e,i){let r=this.surd,s=this.childNodes[this.root].getOuterBBox(),n=(r.size<0?.5:.6)*e.w,{w:a,rscale:o}=s,h=Math.max(a,n/o),d=Math.max(0,h-a),p=this.rootHeight(s,e,r.size,i);return[h*o-n,p,d]}rootHeight(e,i,r,s){let n=i.h+i.d;return(r<0?1.9:.55*n)-(n-s)+Math.max(0,e.d*e.rscale)}rootWidth(){let e=this.childNodes[this.root].getOuterBBox();return .4+e.w*e.rscale}}}var jd=(function(){var t;let e=Rb(mh);return t=class extends e{addRoot(i,r,s,n){r.toCHTML([i]);let a=this.adaptor,[o,h,d]=this.getRootDimens(s,n);a.setStyle(i,"verticalAlign",this.em(h)),a.setStyle(i,"width",this.em(o)),d&&a.setStyle(a.firstChild(i),"paddingLeft",this.em(d))}},t.kind=qa.prototype.kind,t})();function wb(t){var e=class extends t{get scriptChild(){return this.childNodes[this.node.sub]}getOffset(){return[this.baseIsChar?0:this.getAdjustedIc(),-this.getV()]}};return e.useIC=!1,e}function Ib(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 kb(t){var 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(i=this.subChild.getOuterBBox(),r=this.supChild.getOuterBBox()){let s=this.baseCore,n=s.getLineBBox(s.breakCount);if(this.UVQ)return this.UVQ;let a=this.font.params,o=3*a.rule_thickness,h=this.length2em(this.node.attributes.get("subscriptshift"),a.sub2),d=this.baseCharZero(n.d*this.baseScale+a.sub_drop*i.rscale),p=r.d*r.rscale,E=i.h*i.rscale,[y,A]=[this.getU(),Math.max(d,h)],w=y-p-(E-A);if(w<o){A+=o-w;let _=4/5*a.x_height-(y-p);_>0&&(y+=_,A-=_)}return y=Math.max(this.length2em(this.node.attributes.get("superscriptshift"),y),y),A=Math.max(this.length2em(this.node.attributes.get("subscriptshift"),A),A),w=y-p-(E-A),this.UVQ=[y,-A,w],this.UVQ}appendScripts(i){let[r,s]=[this.subChild.getOuterBBox(),this.supChild.getOuterBBox()],n=this.getBaseWidth(),a=this.getAdjustedIc(),[o,h]=this.getUVQ(),d=i.d-this.baseChild.getLineBBox(this.baseChild.breakCount).d;return i.combine(r,n+(this.baseIsChar?0:a),h-d),i.combine(s,n+a,o-d),i.w+=this.font.params.scriptspace,i}};return e.useIC=!1,e}function Ob(t){var e=class extends t{get baseChild(){return this.childNodes[this.node.base]}get scriptChild(){return this.childNodes[1]}getBaseCore(){let i=this.getSemanticBase()||this.childNodes[0],r=i?.node;for(;i&&(i.childNodes.length===1&&(r.isKind("mrow")||r.isKind("TeXAtom")||r.isKind("mstyle")||r.isKind("mpadded")&&!r.getProperty("vbox")||r.isKind("mphantom")||r.isKind("semantics"))||r.isKind("munderover")&&i.isMathAccent);)this.setBaseAccentsFor(i),i=i.childNodes[0],r=i?.node;return i||(this.baseHasAccentOver=this.baseHasAccentUnder=!1),i||this.childNodes[0]}setBaseAccentsFor(i){i.node.isKind("munderover")&&(this.baseHasAccentOver===null&&(this.baseHasAccentOver=!!i.node.attributes.get("accent")),this.baseHasAccentUnder===null&&(this.baseHasAccentUnder=!!i.node.attributes.get("accentunder")))}getSemanticBase(){let i=this.node.attributes.getExplicit("data-semantic-fencepointer");return this.getBaseFence(this.baseChild,i)}getBaseFence(i,r){if(!i||!i.node.attributes||!r)return null;if(i.node.attributes.getExplicit("data-semantic-id")===r)return i;for(let s of i.childNodes){let n=this.getBaseFence(s,r);if(n)return n}return null}getBaseScale(){let i=this.baseCore,r=1;for(;i&&i!==this;){let s=i.getOuterBBox();r*=s.rscale,i=i.parent}return r}getBaseIc(){return this.baseCore.getOuterBBox().ic*this.baseScale}getAdjustedIc(){return this.baseIc?1.05*this.baseIc+.05:0}isCharBase(){let i=this.baseCore;return(i.node.isKind("mo")&&i.size===null||i.node.isKind("mi")||i.node.isKind("mn"))&&i.bbox.rscale===1&&Array.from(i.getText()).length===1}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{let i=this;this.isLineAbove=this.isLineAccent(i.overChild),this.isLineBelow=this.isLineAccent(i.underChild)}}isLineAccent(i){let r=i.coreMO().node;return r.isToken&&r.getText()==="―"}getBaseWidth(){let i=this.baseChild.getLineBBox(this.baseChild.breakCount);return i.w*i.rscale-(this.baseRemoveIc?this.baseIc:0)+this.font.params.extra_ic}getOffset(){return[0,0]}baseCharZero(i){let r=!!this.baseCore.node.attributes.get("largeop"),s=!!(this.baseCore.node.isKind("mo")&&this.baseCore.size),n=this.baseScale;return this.baseIsChar&&!r&&!s&&n===1?0:i}getV(){let i=this.baseCore,r=i.getLineBBox(i.breakCount),s=this.scriptChild.getOuterBBox(),n=this.font.params,a=this.length2em(this.node.attributes.get("subscriptshift"),n.sub1);return Math.max(this.baseCharZero(r.d*this.baseScale+n.sub_drop*s.rscale),a,s.h*s.rscale-.8*n.x_height)}getU(){let i=this.baseCore,r=i.getLineBBox(i.breakCount),s=this.scriptChild.getOuterBBox(),n=this.font.params,a=this.node.attributes.getList("displaystyle","superscriptshift"),o=this.node.getProperty("texprimestyle")?n.sup3:a.displaystyle?n.sup1:n.sup2,h=this.length2em(a.superscriptshift,o);return Math.max(this.baseCharZero(r.h*this.baseScale-n.sup_drop*s.rscale),h,s.d*s.rscale+.25*n.x_height)}hasMovableLimits(){let i=this.node.attributes.get("displaystyle"),r=this.baseChild.coreMO().node;return!i&&!!r.attributes.get("movablelimits")}getOverKU(i,r){let s=this.node.attributes.get("accent"),n=this.font.params,a=r.d*r.rscale,o=n.rule_thickness*n.separation_factor,h=this.baseHasAccentOver?o:0,d=this.isLineAbove?3*n.rule_thickness:o,p=(s?d:Math.max(n.big_op_spacing1,n.big_op_spacing3-Math.max(0,a)))-h;return[p,i.h*i.rscale+p+a]}getUnderKV(i,r){let s=this.node.attributes.get("accentunder"),n=this.font.params,a=r.h*r.rscale,o=n.rule_thickness*n.separation_factor,h=this.baseHasAccentUnder?o:0,d=this.isLineBelow?3*n.rule_thickness:o,p=(s?d:Math.max(n.big_op_spacing2,n.big_op_spacing4-a))-h;return[p,-(i.d*i.rscale+p+a)]}getDeltaW(i,r=[0,0,0]){let s=this.node.attributes.get("align"),n=i.map(d=>d.w*d.rscale);n[0]-=this.baseRemoveIc&&!this.baseCore.node.attributes.get("largeop")?this.baseIc:0;let a=Math.max(...n),o=[],h=0;for(let d of n.keys())o[d]=(s==="center"?(a-n[d])/2:s==="right"?a-n[d]:0)+r[d],o[d]<h&&(h=-o[d]);if(h)for(let d of o.keys())o[d]+=h;return[1,2].map(d=>o[d]+=i[d]?i[d].dx*i[0].rscale:0),o}getDelta(i,r=!1){let s=this.node.attributes.get("accent"),{sk:n,ic:a}=this.baseCore.getOuterBBox();return s&&(n-=i.getOuterBBox().sk),((s&&!r?n:0)+this.font.skewIcFactor*a)*this.baseScale}stretchChildren(){let i=[];for(let n of this.childNodes)n.canStretch(fe.Horizontal)&&i.push(n);let r=i.length,s=this.childNodes.length;if(r&&s>1){let n=0,a=r>1&&r===s;for(let o of this.childNodes){let h=o.stretch.dir===fe.None;if(a||h){let{w:d,rscale:p}=o.getOuterBBox(h);d*p>n&&(n=d*p)}}for(let o of i){let h=o.coreMO();h.size===null&&h.getStretchedVariant([n/o.coreRScale()])}}}constructor(i,r,s=null){super(i,r,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;let n=this.baseCore=this.getBaseCore();n&&(this.setBaseAccentsFor(n),this.baseScale=this.getBaseScale(),this.baseIc=this.getBaseIc(),this.baseIsChar=this.isCharBase(),this.isMathAccent=this.baseIsChar&&this.scriptChild&&this.scriptChild.coreMO().node.getProperty("mathaccent")!==void 0,this.checkLineAccents(),this.baseRemoveIc=!this.isLineAbove&&!this.isLineBelow&&(!this.constructor.useIC||this.isMathAccent))}computeBBox(i,r=!1){i.empty(),i.append(this.baseChild.getOuterBBox()),this.appendScripts(i),i.clean(),this.setChildPWidths(r)}appendScripts(i){let r=this.getBaseWidth(),[s,n]=this.getOffset();return i.combine(this.scriptChild.getOuterBBox(),r+s,n),i.w+=this.font.params.scriptspace,i}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(i,r){return this.node.linebreakContainer||!this.parent||this.node.childIndex(r.node)?i:this.parent.breakTop(i,this)}computeLineBBox(i){let r=this.breakCount;if(!r)return Ti.from(this.getOuterBBox(),this.linebreakOptions.lineleading);let s=this.baseChild.getLineBBox(i).copy();return i<r?(i===0&&this.addLeftBorders(s),this.addMiddleBorders(s)):(this.appendScripts(s),this.addMiddleBorders(s),this.addRightBorders(s)),s}};return e.useIC=!0,e}var Yh=(function(){var t;let e=Ob(se);return t=class extends e{toCHTML(i){if(this.toEmbellishedCHTML(i))return;this.dom=this.standardChtmlNodes(i);let[r,s]=this.getOffset(),n=r-(this.baseRemoveIc?this.baseIc:0),a={"vertical-align":this.em(s)};n&&(a["margin-left"]=this.em(n)),this.baseChild.toCHTML(this.dom);let o=this.dom[this.dom.length-1];this.scriptChild.toCHTML([this.adaptor.append(o,this.html("mjx-script",{style:a}))])}markUsed(){super.markUsed(),this.jax.wrapperUsage.add(Yn.kind)}setDeltaW(i,r){for(let s=0;s<r.length;s++)r[s]&&this.adaptor.setStyle(i[s],"paddingLeft",this.em(r[s]))}adjustOverDepth(i,r){r.d>=0||this.adaptor.setStyle(i,"marginBottom",this.em(r.d*r.rscale))}adjustUnderDepth(i,r){if(r.d>=0)return;let s=this.adaptor,n=this.em(r.d),a=this.html("mjx-box",{style:{"margin-bottom":n,"vertical-align":n}});for(let o of s.childNodes(s.firstChild(i)))s.append(a,o);s.append(s.firstChild(i),a)}adjustBaseHeight(i,r){if(this.node.attributes.get("accent")){let s=this.font.params.x_height*this.baseScale;r.h<s&&(this.adaptor.setStyle(i,"paddingTop",this.em(s-r.h)),r.h=s)}}},t.kind="scriptbase",t})(),fh=(function(){var t;let e=wb(Yh);return t=class extends e{},t.kind=Ka.prototype.kind,t})(),gh=(function(){var t;let e=Ib(Yh);return t=class extends e{},t.kind=Ja.prototype.kind,t})(),Yn=(function(){var t;let e=kb(Yh);return t=class extends e{toCHTML(i){if(this.toEmbellishedCHTML(i))return;let r=this.adaptor,s=this.standardChtmlNodes(i),[n,a,o]=[this.baseChild,this.supChild,this.subChild],[,h,d]=this.getUVQ(),p={"vertical-align":this.em(h)};n.toCHTML(s);let E=r.append(s[s.length-1],this.html("mjx-script",{style:p}));a.toCHTML([E]),r.append(E,this.html("mjx-spacer",{style:{"margin-top":this.em(d)}})),o.toCHTML([E]);let y=this.getAdjustedIc();y&&(r.setStyle(a.dom[0],"marginLeft",this.em(y/a.bbox.rscale)),this.baseIsChar||r.setStyle(o.dom[0],"marginLeft",this.em(y/a.bbox.rscale))),this.baseRemoveIc&&r.setStyle(E,"marginLeft",this.em(-this.baseIc))}},t.kind=Ji.prototype.kind,t.styles={"mjx-script":{display:"inline-block","padding-right":".05em","padding-left":".033em"},"mjx-script > mjx-spacer":{display:"block"}},t})();function Mb(t){return class extends t{get scriptChild(){return this.childNodes[this.node.under]}constructor(...e){super(...e),this.stretchChildren()}computeBBox(e,i=!1){if(this.hasMovableLimits()){super.computeBBox(e,i);return}e.empty();let r=this.baseChild.getOuterBBox(),s=this.scriptChild.getOuterBBox(),n=this.getUnderKV(r,s)[1],a=this.isLineBelow?0:this.getDelta(this.scriptChild,!0),[o,h]=this.getDeltaW([r,s],[0,-a]);e.combine(r,o,0),e.combine(s,h,n),e.d+=this.font.params.big_op_spacing5,e.clean(),this.setChildPWidths(i)}}}function Db(t){return class extends t{get scriptChild(){return this.childNodes[this.node.over]}constructor(...e){super(...e),this.stretchChildren()}computeBBox(e){if(this.hasMovableLimits()){super.computeBBox(e);return}e.empty();let i=this.baseChild.getOuterBBox(),r=this.scriptChild.getOuterBBox();this.node.attributes.get("accent")&&(i.h=Math.max(i.h,this.font.params.x_height*this.baseScale));let s=this.getOverKU(i,r)[1],n=this.isLineAbove?0:this.getDelta(this.scriptChild),[a,o]=this.getDeltaW([i,r],[0,n]);e.combine(i,a,0),e.combine(r,o,s),e.h+=this.font.params.big_op_spacing5,e.clean()}}}function Pb(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(...e){super(...e),this.stretchChildren()}computeBBox(e){if(this.hasMovableLimits()){super.computeBBox(e);return}e.empty();let i=this.overChild.getOuterBBox(),r=this.baseChild.getOuterBBox(),s=this.underChild.getOuterBBox();this.node.attributes.get("accent")&&(r.h=Math.max(r.h,this.font.params.x_height*this.baseScale));let n=this.getOverKU(r,i)[1],a=this.getUnderKV(r,s)[1],o=this.getDelta(this.overChild),h=this.getDelta(this.underChild,!0),[d,p,E]=this.getDeltaW([r,s,i],[0,this.isLineBelow?0:-h,this.isLineAbove?0:o]);e.combine(r,d,0),e.combine(i,E,n),e.combine(s,p,a);let y=this.font.params.big_op_spacing5;e.h+=y,e.d+=y,e.clean()}}}var Ud=(function(){var t;let e=Mb(fh);return t=class extends e{toCHTML(i){if(this.toEmbellishedCHTML(i))return;if(this.hasMovableLimits()){super.toCHTML(i),this.adaptor.setAttribute(this.dom[0],"limits","false");return}this.dom=this.standardChtmlNodes(i);let r=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([r]),this.scriptChild.toCHTML([s]);let n=this.baseChild.getOuterBBox(),a=this.scriptChild.getOuterBBox(),o=this.getUnderKV(n,a)[0],h=this.isLineBelow?0:this.getDelta(this.scriptChild,!0);this.adaptor.setStyle(s,"paddingTop",this.em(o)),this.setDeltaW([r,s],this.getDeltaW([n,a],[0,-h])),this.adjustUnderDepth(s,a)}},t.kind=Ya.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})(),Hd=(function(){var t;let e=Db(gh);return t=class extends e{toCHTML(i){if(this.toEmbellishedCHTML(i))return;if(this.hasMovableLimits()){super.toCHTML(i),this.adaptor.setAttribute(this.dom[0],"limits","false");return}this.dom=this.standardChtmlNodes(i);let r=this.adaptor.append(this.dom[0],this.html("mjx-over")),s=this.adaptor.append(this.dom[0],this.html("mjx-base"));this.scriptChild.toCHTML([r]),this.baseChild.toCHTML([s]);let n=this.scriptChild.getOuterBBox(),a=this.baseChild.getOuterBBox();this.adjustBaseHeight(s,a);let o=this.getOverKU(a,n)[0],h=this.isLineAbove?0:this.getDelta(this.scriptChild);this.adaptor.setStyle(r,"paddingBottom",this.em(o)),this.setDeltaW([s,r],this.getDeltaW([a,n],[0,h])),this.adjustOverDepth(r,n)}},t.kind=Bn.prototype.kind,t.styles={'mjx-mover:not([limits="false"])':{"padding-top":".1em"},[["base","over"].map(i=>`mjx-mover:not([limits="false"]) > mjx-${i}`).join(", ")]:{display:"block","text-align":"left"}},t})(),Wd=(function(){var t;let e=Pb(Yn);return t=class extends e{toCHTML(i){if(this.toEmbellishedCHTML(i))return;if(this.hasMovableLimits()){super.toCHTML(i),this.adaptor.setAttribute(this.dom[0],"limits","false");return}this.dom=this.standardChtmlNodes(i);let r=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")),n=this.adaptor.append(this.adaptor.append(s,this.html("mjx-row")),this.html("mjx-base")),a=this.adaptor.append(this.adaptor.append(s,this.html("mjx-row")),this.html("mjx-under"));this.overChild.toCHTML([r]),this.baseChild.toCHTML([n]),this.underChild.toCHTML([a]);let o=this.overChild.getOuterBBox(),h=this.baseChild.getOuterBBox(),d=this.underChild.getOuterBBox();this.adjustBaseHeight(n,h);let p=this.getOverKU(h,o)[0],E=this.getUnderKV(h,d)[0],y=this.getDelta(this.overChild),A=this.getDelta(this.underChild,!0);this.adaptor.setStyle(r,"paddingBottom",this.em(p)),this.adaptor.setStyle(a,"paddingTop",this.em(E)),this.setDeltaW([n,a,r],this.getDeltaW([h,d,o],[0,this.isLineBelow?0:-A,this.isLineAbove?0:y])),this.adjustOverDepth(r,o),this.adjustUnderDepth(a,d)}},t.kind=Sr.prototype.kind,t.styles={'mjx-munderover:not([limits="false"])':{"padding-top":".1em"},[["over","box"].map(i=>`mjx-munderover:not([limits="false"]) > mjx-${i}`).join(", ")]:{display:"block"}},t})(),Bb={base:"subList",subList:"supList",supList:"subList",psubList:"psupList",psupList:"psubList"};function Fb(t){return class extends t{combinePrePost(e,i){let r=new ge(e);return r.combine(i,0,0),r}getScriptData(){let e=this.scriptData={base:null,sub:ge.empty(),sup:ge.empty(),psub:ge.empty(),psup:ge.empty(),numPrescripts:0,numScripts:0},i=this.getScriptBBoxLists();this.combineBBoxLists(e.sub,e.sup,i.subList,i.supList),this.combineBBoxLists(e.psub,e.psup,i.psubList,i.psupList),e.base=i.base[0],e.numPrescripts=i.psubList.length,e.numScripts=i.subList.length}getScriptBBoxLists(){let e={base:[],subList:[],supList:[],psubList:[],psupList:[]},i="base";for(let r of this.childNodes)r.node.isKind("mprescripts")?i="psubList":(e[i].push(r.getOuterBBox()),i=Bb[i]);return this.firstPrescript=e.subList.length+e.supList.length+2,this.padLists(e.subList,e.supList),this.padLists(e.psubList,e.psupList),e}padLists(e,i){e.length>i.length&&i.push(ge.empty())}combineBBoxLists(e,i,r,s){for(let n=0;n<r.length;n++){let[a,o,h]=this.getScaledWHD(r[n]),[d,p,E]=this.getScaledWHD(s[n]),y=Math.max(a,d);e.w+=y,i.w+=y,o>e.h&&(e.h=o),h>e.d&&(e.d=h),p>i.h&&(i.h=p),E>i.d&&(i.d=E)}}getScaledWHD(e){let{w:i,h:r,d:s,rscale:n}=e;return[i*n,r*n,s*n]}getCombinedUV(){let e=this.scriptData,i=this.combinePrePost(e.sub,e.psub),r=this.combinePrePost(e.sup,e.psup);return this.getUVQ(i,r)}addPrescripts(e,i,r){let s=this.scriptData;if(s.numPrescripts){let n=this.font.params.scriptspace;e.combine(s.psup,n,i),e.combine(s.psub,n,r)}return e}addPostscripts(e,i,r){let s=this.scriptData;if(s.numScripts){let n=e.w;e.combine(s.sup,n,i),e.combine(s.sub,n,r),e.w+=this.font.params.scriptspace}return e}constructor(...e){super(...e),this.scriptData=null,this.firstPrescript=0,this.getScriptData()}appendScripts(e){e.empty();let[i,r]=this.getCombinedUV();return this.addPrescripts(e,i,r),e.append(this.scriptData.base),this.addPostscripts(e,i,r),e.clean(),e}computeLineBBox(e){let i=this.baseChild.breakCount,r=this.baseChild.getLineBBox(e).copy(),s=r,[n,a]=this.getCombinedUV();return e===0?(s=Ti.from(this.addPrescripts(ge.zero(),n,a),this.linebreakOptions.lineleading),s.append(r),this.addLeftBorders(s),s.L=this.bbox.L):e===i&&(s=this.addPostscripts(s,n,a),this.addRightBorders(s),s.R=this.bbox.R),this.addMiddleBorders(s),s}getUVQ(e,i){if(!this.UVQ){let[r,s,n]=[0,0,0];e.w===0?r=this.getU():i.w===0?r=-this.getV():[r,s,n]=super.getUVQ(e,i),this.UVQ=[r,s,n]}return this.UVQ}}}var zd=(function(){var t;let e=Fb(Yn);return t=class extends e{toCHTML(i){if(this.toEmbellishedCHTML(i))return;let r=this.standardChtmlNodes(i),s=this.scriptData,n=this.node.getProperty("scriptalign")||"right left",[a,o]=ji(n+" "+n),[h,d]=this.getCombinedUV();if(s.numPrescripts){let p=this.addScripts(this.dom[0],h,-d,!0,s.psub,s.psup,this.firstPrescript,s.numPrescripts);a!=="right"&&this.adaptor.setAttribute(p,"script-align",a)}if(this.childNodes[0].toCHTML(r),s.numScripts){let p=this.addScripts(this.dom[this.dom.length-1],h,-d,!1,s.sub,s.sup,1,s.numScripts);o!=="left"&&this.adaptor.setAttribute(p,"script-align",o)}}addScripts(i,r,s,n,a,o,h,d){let p=this.adaptor,E=r-o.d+(s-a.h),y=r<0&&s===0?a.h+r:r,A=E>0?{style:{height:this.em(E)}}:{},w=y?{style:{"vertical-align":this.em(y)}}:{},_=this.html("mjx-row"),U=this.html("mjx-row",A),vt=this.html("mjx-row"),nt="mjx-"+(n?"pre":"")+"scripts",xt=h+2*d;for(;h<xt;)this.childNodes[h++].toCHTML([p.append(vt,this.html("mjx-cell"))]),this.childNodes[h++].toCHTML([p.append(_,this.html("mjx-cell"))]);return p.append(i,this.html(nt,w,[_,U,vt]))}},t.kind=Za.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})();function Qr(t){return t.reduce((e,i)=>e+i,0)}function ll(t){return t.reduce((e,i)=>Math.max(e,i),0)}function _b(t){return class extends t{get tableRows(){return this.childNodes}findContainer(){let e=this,i=e.parent;for(;i&&(i.node.notParent||i.node.isKind("mrow"));)e=i,i=i.parent;this.container=i,this.containerI=e.node.childPosition()}getPercentageWidth(){if(this.hasLabels)this.bbox.pwidth=ge.fullWidth;else{let e=this.node.attributes.get("width");Oi(e)&&(this.bbox.pwidth=e)}}stretchRows(){let e=this.node.attributes.get("equalrows"),i=e?this.getEqualRowHeight():0,{H:r,D:s}=e?this.getTableData():{H:[0],D:[0]},n=this.tableRows;for(let a=0;a<this.numRows;a++){let o=e?[(i+r[a]-s[a])/2,(i-r[a]+s[a])/2]:null;n[a].stretchChildren(o)}}stretchColumns(){let e=this.getColumnAttributes("columnwidth",0);for(let i=0;i<this.numCols;i++){let r=typeof this.cWidths[i]=="number"?this.cWidths[i]:null;this.stretchColumn(i,r),r!==null&&this.breakColumn(i,r,e[i])}}stretchColumn(e,i){let r=[];for(let n of this.tableRows){let a=n.getChild(e);if(a){let o=a.childNodes[0];o.stretch.dir===fe.None&&o.canStretch(fe.Horizontal)&&r.push(o)}}let s=r.length;if(s&&i===null){i=0;let n=s===this.childNodes.length;for(let a of this.tableRows){let o=a.getChild(e);if(o){let h=o.childNodes[0],d=h.stretch.dir===fe.None;if(n||d){let{w:p}=h.getBBox(d);p>i&&(i=p)}}}}if(i!==null){let n=this.getTableData().W;for(let a of r){let o=a.getBBox().w;a.coreMO().getStretchedVariant([Math.max(i,o)/a.coreRScale()]),o=a.getBBox().w,o>n[e]&&(n[e]=o)}}}breakColumn(e,i,r){if(this.jax.math.root.attributes.get("overflow")!=="linebreak"||!this.jax.math.display)return;let{H:s,D:n}=this.getTableData(),a=0,o=0;for(let h of this.tableRows){let d=h.getChild(e);if(d){let E=h.getBBox().rscale,y=d.getBBox();if(d&&y.w*E>i){d.childNodes[0].breakToWidth(i);let A=h.node.attributes.get("rowalign");this.updateHDW(d,e,a,A,s,n)}y.w*E>o&&(o=y.w*E)}let p=h.getBBox();p.h=s[a],p.d=n[a],a++}(r==="fit"||r==="auto"||Oi(r)||o>this.cWidths[e])&&(this.cWidths[e]=o)}getTableData(){if(this.data)return this.data;let e=Array(this.numRows).fill(0),i=Array(this.numRows).fill(0),r=Array(this.numCols).fill(0),s=Array(this.numRows),n=Array(this.numRows),a=[0],o=this.tableRows;for(let d=0;d<o.length;d++){let p=o[d],E=p.node.attributes.get("rowalign");for(let y=0;y<p.numCells;y++){let A=p.getChild(y);this.updateHDW(A,y,d,E,e,i,r),this.recordPWidthCell(A,y)}s[d]=e[d],n[d]=i[d],p.labeled&&this.updateHDW(p.childNodes[0],0,d,E,e,i,a),p.bbox.h=e[d],p.bbox.d=i[d]}let h=a[0];return this.data={H:e,D:i,W:r,NH:s,ND:n,L:h},this.data}updateHDW(e,i,r,s,n,a,o=null){let{h,d,w:p}=e.getBBox(),E=e.parent.bbox.rscale;e.parent.bbox.rscale!==1&&(h*=E,d*=E,p*=E),this.node.getProperty("useHeight")&&(h<.75&&(h=.75),d<.25&&(d=.25)),s=e.node.attributes.get("rowalign")||s,Object.hasOwn(this.adjustHD,s)||(s="other"),this.adjustHD[s](h,d,n,a,r),o&&p>o[i]&&(o[i]=p)}recordPWidthCell(e,i){e.childNodes[0]&&e.childNodes[0].getBBox().pwidth&&this.pwidthCells.push([e,i])}setColumnPWidths(){let e=this.cWidths;for(let[i,r]of this.pwidthCells)i.setChildPWidths(!1,e[r])&&(i.invalidateBBox(),i.getBBox())}getBBoxHD(e){let[i,r]=this.getAlignmentRow();if(r===null){let s=this.font.params.axis_height,n=e/2;return{top:[0,e],center:[n,n],bottom:[e,0],baseline:[n,n],axis:[n+s,n-s]}[i]||[n,n]}else{let s=this.getVerticalPosition(r,i);return[s,e-s]}}getBBoxLR(){if(this.hasLabels){let e=this.node.attributes,i=e.get("side"),[r,s]=this.getPadAlignShift(i),n=this.hasLabels&&!!e.get("data-width-includes-label");return n&&this.frame&&this.fSpace[0]&&(r-=this.fSpace[0]),s==="center"&&!n?[r,r]:i==="left"?[r,0]:[0,r]}return[this.bbox?.L||0,0]}getPadAlignShift(e){let{L:i}=this.getTableData(),r=i+this.length2em(this.node.attributes.get("minlabelspacing")),[s,n]=this.styles==null?["",""]:[this.styles.get("padding-left"),this.styles.get("padding-right")];(s||n)&&(r=Math.max(r,this.length2em(s||"0"),this.length2em(n||"0")));let[a,o]=this.getAlignShift();return a===e&&(o=e==="left"?Math.max(r,o)-r:Math.min(-r,o)+r),[r,a,o]}getWidth(){return this.pWidth||this.getBBox().w}adjustWideTable(){let e=this.node.attributes;if(e.get("width")!=="auto")return;let[i,r]=this.getPadAlignShift(e.get("side")),s=Math.max(this.containerWidth/10,this.containerWidth-i-(r==="center"?i:0));this.naturalWidth()>s&&this.adjustColumnWidths(s)}naturalWidth(){return Qr(this.getComputedWidths().concat(this.cLines,this.cSpace))+2*this.fLine+this.fSpace[0]+this.fSpace[2]}getEqualRowHeight(){let{H:e,D:i}=this.getTableData(),r=Array.from(e.keys()).map(s=>e[s]+i[s]);return Math.max(...r)}getComputedWidths(){let e=this.getTableData().W,i=Array.from(e.keys()).map(r=>typeof this.cWidths[r]=="number"?this.cWidths[r]:e[r]);return this.node.attributes.get("equalcolumns")&&(i=Array(i.length).fill(ll(i))),i}getColumnWidths(){let e=this.node.attributes.get("width");if(this.node.attributes.get("equalcolumns"))return this.getEqualColumns(e);let i=this.getColumnAttributes("columnwidth",0);return e==="auto"?this.getColumnWidthsAuto(i):Oi(e)?this.getColumnWidthsPercent(i):this.getColumnWidthsFixed(i,this.length2em(e))}getEqualColumns(e){let i=Math.max(1,this.numCols),r;if(e==="auto"){let{W:s}=this.getTableData();r=ll(s)}else if(Oi(e))r=this.percent(1/i);else{let s=Qr([].concat(this.cLines,this.cSpace))+this.fSpace[0]+this.fSpace[2];r=Math.max(0,this.length2em(e)-s)/i}return Array(this.numCols).fill(r)}getColumnWidthsAuto(e){return e.map(i=>i==="auto"||i==="fit"?null:Oi(i)?i:this.length2em(i))}getColumnWidthsPercent(e){let i=e.includes("fit"),{W:r}=i?this.getTableData():{W:null};return Array.from(e.keys()).map(s=>{let n=e[s];return n==="fit"?null:n==="auto"?i?r[s]:null:Oi(n)?n:this.length2em(n)})}getColumnWidthsFixed(e,i){let r=Array.from(e.keys()),s=r.filter(E=>e[E]==="fit"),n=r.filter(E=>e[E]==="auto"),a=s.length||n.length,{W:o}=a?this.getTableData():{W:null},h=i-Qr([].concat(this.cLines,this.cSpace))-this.fSpace[0]-this.fSpace[2],d=h;r.forEach(E=>{let y=e[E];d-=y==="fit"||y==="auto"?o[E]:this.length2em(y,h)});let p=a&&d>0?d/a:0;return r.map(E=>{let y=e[E];return y==="fit"?o[E]+p:y==="auto"?o[E]+(s.length===0?p:0):this.length2em(y,h)})}adjustColumnWidths(e){let{W:i}=this.getTableData(),r=this.getColumnAttributes("columnwidth",0),s=Array.from(r.keys()),n=s.filter(w=>r[w]==="fit").sort((w,_)=>i[_]-i[w]),a=s.filter(w=>r[w]==="auto").sort((w,_)=>i[_]-i[w]),o=s.filter(w=>Oi(r[w])).sort((w,_)=>i[_]-i[w]),h=s.filter(w=>r[w]!=="fit"&&r[w]!=="auto"&&!Oi(r[w])).sort((w,_)=>i[_]-i[w]),d=[...n,...a,...o,...h];if(!d.length)return;this.cWidths=s.map(w=>typeof this.cWidths[w]=="number"?this.cWidths[w]:i[w]);let p=e-Qr([].concat(this.cLines,this.cSpace))-this.fSpace[0]-this.fSpace[2],E=Qr(this.cWidths)-p,y=0,A=0;for(;A<d.length&&(y+=i[d[A++]],!(y&&E/y<.333)););E=1-E/y,d.slice(0,A).forEach(w=>this.cWidths[w]*=E)}getVerticalPosition(e,i){let r=this.node.attributes.get("equalrows"),{H:s,D:n}=this.getTableData(),a=r?this.getEqualRowHeight():0,o=this.getRowHalfSpacing(),h=this.fLine;for(let y=0;y<e;y++)h+=o[y]+(r?a:s[y]+n[y])+o[y+1]+this.rLines[y];let[d,p]=r?[(a+s[e]-n[e])/2,(a-s[e]+n[e])/2]:[s[e],n[e]],E={top:0,center:o[e]+(d+p)/2,bottom:o[e]+d+p+o[e+1],baseline:o[e]+d,axis:o[e]+d-.25};return h+=E[i]||0,h}getFrameSpacing(){let e=this.fframe?this.convertLengths(this.getAttributeArray("framespacing")):[0,0];e[2]=e[0];let i=this.node.attributes.get("data-array-padding");if(i){let[r,s]=this.convertLengths(ji(i));e[0]=r,e[2]=s}return e}getEmHalfSpacing(e,i,r=1){let s=this.addEm(i,2/r);return s.unshift(this.em(e[0]*r)),s.push(this.em(e[1]*r)),s}getRowHalfSpacing(){let e=this.rSpace.map(i=>i/2);return e.unshift(this.fSpace[1]),e.push(this.fSpace[1]),e}getColumnHalfSpacing(){let e=this.cSpace.map(i=>i/2);return e.unshift(this.fSpace[0]),e.push(this.fSpace[2]),e}getAlignmentRow(){let[e,i]=ji(this.node.attributes.get("align"));if(i==null)return[e,null];let r=parseInt(i);return r<0&&(r+=this.numRows+1),[e,r<1||r>this.numRows?null:r-1]}getColumnAttributes(e,i=1){let r=this.numCols-i,s=this.getAttributeArray(e);if(s.length===0)return null;for(;s.length<r;)s.push(s[s.length-1]);return s.length>r&&s.splice(r),s}getRowAttributes(e,i=1){let r=this.numRows-i,s=this.getAttributeArray(e);if(s.length===0)return null;for(;s.length<r;)s.push(s[s.length-1]);return s.length>r&&s.splice(r),s}getAttributeArray(e){let i=this.node.attributes.get(e);return i?ji(i):[this.node.attributes.getDefault(e)]}addEm(e,i=1){return e?e.map(r=>this.em(r/i)):null}convertLengths(e){return e?e.map(i=>this.length2em(i)):null}constructor(e,i,r=null){super(e,i,r),this.numCols=0,this.numRows=0,this.data=null,this.pwidthCells=[],this.pWidth=0,this.adjustHD={top:(a,o,h,d,p)=>{a>h[p]&&(d[p]-=a-h[p],h[p]=a),a+o>h[p]+d[p]&&(d[p]=a+o-h[p])},bottom:(a,o,h,d,p)=>{o>d[p]&&(h[p]-=o-d[p],d[p]=o),a+o>h[p]+d[p]&&(h[p]=a+o-d[p])},center:(a,o,h,d,p)=>{a+o>h[p]+d[p]&&(h[p]=d[p]=(a+o)/2)},other:(a,o,h,d,p)=>{a>h[p]&&(h[p]=a),o>d[p]&&(d[p]=o)}},this.numCols=ll(this.tableRows.map(a=>a.numCells)),this.numRows=this.childNodes.length,this.hasLabels=this.childNodes.reduce((a,o)=>a||o.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();let s=this.node.attributes,n=s.get("frame");this.frame=n!=="none",this.fframe=this.frame||s.get("data-frame-styles")!==void 0,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(a=>a==="none"?0:.07),this.rLines=this.getRowAttributes("rowlines").map(a=>a==="none"?0:.07),this.cWidths=this.getColumnWidths(),this.adjustWideTable(),this.stretchColumns(),this.stretchRows()}getStyles(){super.getStyles();let e=this.node.attributes.get("data-frame-styles");if(!e)return;this.styles||(this.styles=new gi(""));let i=e.split(/ /);for(let r of ur.keys()){let s=i[r];s!=="none"&&this.styles.set(`border-${ur[r]}`,`.07em ${s}`)}}computeBBox(e,i=!1){let{H:r,D:s}=this.getTableData(),n,a;if(this.node.attributes.get("equalrows")){let y=this.getEqualRowHeight();n=Qr([].concat(this.rLines,this.rSpace))+y*this.numRows}else n=Qr(r.concat(s,this.rLines,this.rSpace));n+=2*(this.fLine+this.fSpace[1]),a=this.naturalWidth();let o=this.node.attributes.get("width");o!=="auto"&&(a=Math.max(this.length2em(o,0)+2*this.fLine,a));let[h,d]=this.getBBoxHD(n);e.h=h,e.d=d,e.w=a;let[p,E]=this.getBBoxLR();e.L=p,e.R=E,Oi(o)||this.setColumnPWidths()}setChildPWidths(e,i,r){let s=this.node.attributes.get("width");if(!Oi(s))return!1;this.hasLabels||(this.bbox.pwidth="",this.container.bbox.pwidth="");let{w:n,L:a,R:o}=this.bbox,h=this.node.attributes.get("data-width-includes-label"),d=Math.max(n,this.length2em(s,Math.max(i,a+n+o)))-(h?a+o:0),p=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(p,d),this.pWidth=this.naturalWidth(),this.isTop&&(this.bbox.w=this.pWidth),this.setColumnPWidths(),this.pWidth!==n&&this.parent.invalidateBBox(),this.pWidth!==n}getAlignShift(){return this.isTop?super.getAlignShift():[this.container.getChildAlign(this.containerI),0]}}}var qd=(function(){var t;let e=_b(se);return t=class extends e{constructor(i,r,s=null){super(i,r,s),this.itable=this.html("mjx-itable"),this.labels=this.html("mjx-itable")}getAlignShift(){let i=super.getAlignShift();return this.isTop||(i[1]=0),i}toCHTML(i){let r=this.standardChtmlNodes(i);this.adaptor.append(r[0],this.html("mjx-table",{},[this.itable]));for(let s of this.childNodes)s.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(){let i=this.adaptor,r=i.getStyle(this.dom[0],"backgroundColor");r&&(i.setStyle(this.dom[0],"backgroundColor",""),i.setStyle(this.itable,"backgroundColor",r))}padRows(){let i=this.adaptor;for(let r of i.childNodes(this.itable))for(;i.childNodes(r).length<this.numCols;)i.append(r,this.html("mjx-mtd",{extra:!0}))}handleColumnSpacing(){let i=this.childNodes[0]?1/this.childNodes[0].getBBox().rscale:1,r=this.getEmHalfSpacing([this.fSpace[0],this.fSpace[2]],this.cSpace,i);for(let s of this.tableRows){let n=0;for(let a of s.tableCells){let o=r[n++],h=r[n],d=a?a.dom[0]:this.adaptor.childNodes(s.dom[0])[n];(n>1&&o!=="0.4em"||o!=="0"&&n===1)&&this.adaptor.setStyle(d,"paddingLeft",o),(n<this.numCols&&h!=="0.4em"||h!=="0"&&n===this.numCols)&&this.adaptor.setStyle(d,"paddingRight",h)}}}handleColumnLines(){if(this.node.attributes.get("columnlines")==="none")return;let i=this.getColumnAttributes("columnlines");for(let r of this.childNodes){let s=0,n=this.adaptor.childNodes(r.dom[0]).slice(1);for(let a of n){let o=i[s++];o!=="none"&&this.adaptor.setStyle(a,"borderLeft",".07em "+o)}}}handleColumnWidths(){for(let i of this.childNodes){let r=0;for(let s of this.adaptor.childNodes(i.dom[0])){let n=this.cWidths[r++];if(n!==null){let a=typeof n=="number"?this.em(n):n;this.adaptor.setStyle(s,"width",a),this.adaptor.setStyle(s,"maxWidth",a),this.adaptor.setStyle(s,"minWidth",a)}}}}handleRowSpacing(){let i=this.childNodes[0]?1/this.childNodes[0].getBBox().rscale:1,r=this.getEmHalfSpacing([this.fSpace[1],this.fSpace[1]],this.rSpace,i),s=this.fframe,n=0;for(let a of this.childNodes){let o=r[n++],h=r[n];for(let d of a.childNodes)(n>1&&o!=="0.215em"||s&&n===1)&&this.adaptor.setStyle(d.dom[0],"paddingTop",o),(n<this.numRows&&h!=="0.215em"||s&&n===this.numRows)&&this.adaptor.setStyle(d.dom[0],"paddingBottom",h)}}handleRowLines(){if(this.node.attributes.get("rowlines")==="none")return;let i=this.getRowAttributes("rowlines"),r=0;for(let s of this.childNodes.slice(1)){let n=i[r++];if(n!=="none")for(let a of this.adaptor.childNodes(s.dom[0]))this.adaptor.setStyle(a,"borderTop",".07em "+n)}}handleRowHeights(){this.node.attributes.get("equalrows")&&this.handleEqualRows()}handleEqualRows(){let i=this.getRowHalfSpacing(),{H:r,D:s,NH:n,ND:a}=this.getTableData(),o=this.getEqualRowHeight();for(let h=0;h<this.numRows;h++){let d=this.childNodes[h];this.setRowHeight(d,o+i[h]+i[h+1]+this.rLines[h]),o!==n[h]+a[h]&&this.setRowBaseline(d,o,(o-r[h]+s[h])/2)}}setRowHeight(i,r){this.adaptor.setStyle(i.dom[0],"height",this.em(r))}setRowBaseline(i,r,s){let n=i.node.attributes.get("rowalign");for(let a of i.childNodes)if(this.setCellBaseline(a,n,r,s))break}setCellBaseline(i,r,s,n){let a=i.node.attributes.get("rowalign");if(a==="baseline"||a==="axis"){let o=this.adaptor,h=o.lastChild(i.dom[0]);o.setStyle(h,"height",this.em(s)),o.setStyle(h,"verticalAlign",this.em(-n));let d=i.parent;if((!d.node.isKind("mlabeledtr")||i!==d.childNodes[0])&&(r==="baseline"||r==="axis"))return!0}return!1}handleFrame(){if(this.frame&&this.fLine){let i=this.node.attributes.get("frame");this.adaptor.setStyle(this.itable,"border",`${this.em(this.fLine)} ${i}`)}}handleWidth(){let i=this.adaptor,r=this.dom[0],{w:s,L:n,R:a}=this.getBBox();i.setStyle(r,"minWidth",this.em(n+s+a));let o=this.node.attributes.get("width");if(Oi(o))i.setStyle(r,"width",""),i.setAttribute(r,"width","full");else if(!this.hasLabels){if(o==="auto")return;o=this.em(this.length2em(o)+2*this.fLine)}let h=i.firstChild(r);if(i.setStyle(h,"width",o),i.setStyle(h,"minWidth",this.em(s)),n||a){i.setStyle(r,"margin","");let d=this.node.attributes.get("data-width-includes-label")?"padding":"margin";n===a?i.setStyle(h,d,"0 "+this.em(a)):i.setStyle(h,d,"0 "+this.em(a)+" 0 "+this.em(n))}i.setAttribute(this.itable,"width","full")}handleAlign(){let[i,r]=this.getAlignmentRow(),s=this.dom[0];if(r===null)i!=="axis"&&this.adaptor.setAttribute(s,"align",i);else{let n=this.getVerticalPosition(r,i);this.adaptor.setAttribute(s,"align","top"),this.adaptor.setStyle(s,"verticalAlign",this.em(n))}}handleJustify(){let i=this.getAlignShift()[0];i!=="center"&&this.adaptor.setAttribute(this.dom[0],"justify",i)}handleLabels(){if(!this.hasLabels)return;let i=this.labels,r=this.node.attributes,s=this.adaptor,n=r.get("side");s.setAttribute(this.dom[0],"side",n),s.setAttribute(i,"align",n),s.setStyle(i,n,"0");let[a,o]=this.addLabelPadding(n);if(o){let h=s.firstChild(this.dom[0]);this.setIndent(h,a,o)}this.updateRowHeights(),this.addLabelSpacing()}addLabelPadding(i){let[,r,s]=this.getPadAlignShift(i),n={};if(i==="right"&&!this.node.attributes.get("data-width-includes-label")){let a=this.node.attributes.get("width"),{w:o,L:h,R:d}=this.getBBox();n.style={width:Oi(a)?"calc("+a+" + "+this.em(h+d)+")":this.em(h+o+d)}}return this.adaptor.append(this.dom[0],this.html("mjx-labels",n,[this.labels])),[r,s]}updateRowHeights(){let{H:i,D:r,NH:s,ND:n}=this.getTableData(),a=this.getRowHalfSpacing();for(let o=0;o<this.numRows;o++){let h=this.childNodes[o];this.setRowHeight(h,i[o]+r[o]+a[o]+a[o+1]+this.rLines[o]),i[o]!==s[o]||r[o]!==n[o]?this.setRowBaseline(h,i[o]+r[o],r[o]):h.node.isKind("mlabeledtr")&&this.setCellBaseline(h.childNodes[0],"",i[o]+r[o],r[o])}}addLabelSpacing(){let i=this.adaptor,r=this.node.attributes.get("equalrows"),{H:s,D:n}=this.getTableData(),a=r?this.getEqualRowHeight():0,o=this.getRowHalfSpacing(),h=this.fLine,d=i.firstChild(this.labels);for(let p=0;p<this.numRows;p++)this.childNodes[p].node.isKind("mlabeledtr")?(h&&i.insert(this.html("mjx-mtr",{style:{height:this.em(h)}}),d),i.setStyle(d,"height",this.em((r?a:s[p]+n[p])+o[p]+o[p+1])),d=i.next(d),h=this.rLines[p]):h+=o[p]+(r?a:s[p]+n[p])+o[p+1]+this.rLines[p]}},t.kind=Qa.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 jb(t){return class extends t{get numCells(){return this.childNodes.length}get labeled(){return!1}get tableCells(){return this.childNodes}getChild(e){return this.childNodes[e]}getChildBBoxes(){return this.childNodes.map(e=>e.getBBox())}stretchChildren(e=null){let i=[],r=this.labeled?this.childNodes.slice(1):this.childNodes;for(let a of r){let o=a.childNodes[0];o.canStretch(fe.Vertical)&&i.push(o)}let s=i.length,n=this.childNodes.length;if(s&&n>1&&!e){let a=0,o=0,h=s>1&&s===n;for(let d of r){let p=d.childNodes[0],E=p.stretch.dir===fe.None;if(h||E){let{h:y,d:A}=p.getBBox(E);y>a&&(a=y),A>o&&(o=A)}}e=[a,o]}if(e)for(let a of i){let o=a.coreRScale();a.coreMO().getStretchedVariant(e.map(h=>h*o))}}get fixesPWidth(){return!1}}}function Ub(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(e){return this.childNodes[e+1]}getChildBBoxes(){return this.childNodes.slice(1).map(e=>e.getBBox())}}}var yo=(function(){var t;let e=jb(se);return t=class extends e{toCHTML(i){super.toCHTML(i);let r=this.node.attributes.get("rowalign");r!=="baseline"&&this.adaptor.setAttribute(this.dom[0],"rowalign",r);let{h:s,d:n}=this.getBBox();this.adaptor.setStyle(this.dom[0],"height",this.em(s+n))}},t.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})(),Gd=(function(){var t;let e=Ub(yo);return t=class extends e{toCHTML(i){super.toCHTML(i);let r=this.adaptor.firstChild(this.dom[0]);if(r){this.adaptor.remove(r);let s=this.node.attributes.get("rowalign"),n=s!=="baseline"&&s!=="axis"?{rowalign:s}:{},a=this.html("mjx-mtr",n,[r]);this.adaptor.append(this.parent.labels,a)}}markUsed(){super.markUsed(),this.jax.wrapperUsage.add(yo.kind)}},t.kind=Cl.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 Hb(t){return class extends t{get fixesPWidth(){return!1}invalidateBBox(){this.bboxComputed=!1,this.lineBBox=[]}getWrapWidth(e){let i=this.parent.parent,r=this.parent,s=this.node.childPosition()-+!!r.labeled;return typeof i.cWidths[s]=="number"?i.cWidths[s]:i.getTableData().W[s]}getChildAlign(e){return this.node.attributes.get("columnalign")}}}var Vd=(function(){var t;let e=Hb(se);return t=class extends e{toCHTML(i){super.toCHTML(i);let r=this.node.attributes.get("rowalign"),s=this.node.attributes.get("columnalign");r!==this.parent.node.attributes.get("rowalign")&&this.adaptor.setAttribute(this.dom[0],"rowalign",r),s!=="center"&&(this.parent.kind!=="mlabeledtr"||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"))}},t.kind=to.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})(),bh={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 Wb(t){return class extends t{get selected(){let e=this.node.attributes.get("selection"),i=Math.max(1,Math.min(this.childNodes.length,e))-1;return this.childNodes[i]||this.wrap(this.node.selected)}getParameters(){let[e,i]=ji(this.node.attributes.get("data-offsets")||"");this.tipDx=this.length2em(e||bh.dx),this.tipDy=this.length2em(i||bh.dy)}constructor(e,i,r=null){super(e,i,r);let s=this.constructor.actions,n=this.node.attributes.get("actiontype"),[a,o]=s.get(n)||[((h,d)=>{}),{}];this.action=a,this.data=o,this.getParameters()}computeBBox(e,i=!1){e.updateFrom(this.selected.getOuterBBox()),this.selected.setChildPWidths(i)}get breakCount(){return this.node.isEmbellished?this.selected.coreMO().embellishedBreakCount:this.selected.breakCount}computeLineBBox(e){return this.getChildLineBBox(this.selected,e)}}}var Xd=(function(){var t;let e=Wb(se);return t=class extends e{setEventHandler(i,r,s=null){(s?[s]:this.dom).forEach(n=>n.addEventListener(i,r))}Em(i){return this.em(i)}toCHTML(i){if(this.toEmbellishedCHTML(i))return;let r=this.standardChtmlNodes(i);this.selected.toCHTML(r),this.action(this,this.data)}},t.kind=$a.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"},"mjx-container [data-mjx-collapsed]":{color:"#55F"},"@media (prefers-color-scheme: dark) /* chtml maction */":{"mjx-tool > mjx-tip":{border:"1px solid #888","background-color":"#303030",color:"#E0E0E0","box-shadow":"2px 2px 5px #000"},"mjx-status":{"background-color":"#303030",color:"#E0E0E0"},"mjx-container [data-mjx-collapsed]":{color:"#88F"}}},t.actions=new Map([["toggle",[(i,r)=>{i.dom.forEach(o=>{i.adaptor.setAttribute(o,"toggle",i.node.attributes.get("selection"))});let s=i.factory.jax.math,n=i.factory.jax.document,a=i.node;i.setEventHandler("click",o=>{s.end.node||(s.start.node=s.end.node=s.typesetRoot,s.start.n=s.end.n=0),a.nextToggleSelection(),s.rerender(n,a.attributes.get("data-maction-id")?z.ENRICHED:z.RERENDER),o.stopPropagation()})},{}]],["tooltip",[(i,r)=>{let s=i.childNodes[1];if(s)if(s.node.isKind("mtext")){let n=s.node.getText();i.dom.forEach(a=>i.adaptor.setAttribute(a,"title",n))}else{let n=i.adaptor;for(let a of i.dom){let o=n.append(a,i.html("mjx-tool",{style:{bottom:i.Em(-i.tipDy),right:i.Em(-i.tipDx)}},[i.html("mjx-tip")]));s.toCHTML([n.firstChild(o)]),i.setEventHandler("mouseover",h=>{r.stopTimers(a,r);let d=setTimeout(()=>n.setStyle(o,"display","block"),r.postDelay);r.hoverTimer.set(a,d),h.stopPropagation()},a),i.setEventHandler("mouseout",h=>{r.stopTimers(a,r);let d=setTimeout(()=>n.setStyle(o,"display",""),r.clearDelay);r.clearTimer.set(a,d),h.stopPropagation()},a)}}},bh]],["statusline",[(i,r)=>{let s=i.childNodes[1];if(s&&s.node.isKind("mtext")){let n=i.adaptor,a=s.node.getText();i.dom.forEach(o=>n.setAttribute(o,"statusline",a)),i.setEventHandler("mouseover",o=>{if(r.status===null){let h=n.body(n.document);r.status=n.append(h,i.html("mjx-status",{},[i.text(a)]))}o.stopPropagation()}),i.setEventHandler("mouseout",o=>{r.status&&(r.status=(n.remove(r.status),null)),o.stopPropagation()})}},{status:null}]]]),t})();function zb(t){return class extends t{constructor(e,i,r=null){super(e,i,r),this.getParameters()}getParameters(){let{width:e,height:i,valign:r,src:s,index:n}=this.node.attributes.getList("width","height","valign","src","index");if(s)this.width=e==="auto"?1:this.length2em(e),this.height=i==="auto"?1:this.length2em(i),this.valign=this.length2em(r||"0");else{let a=String.fromCodePoint(parseInt(n)),o=this.node.factory;this.charWrapper=this.wrap(o.create("text").setText(a)),this.charWrapper.parent=this}}computeBBox(e,i=!1){this.charWrapper?e.updateFrom(this.charWrapper.getBBox()):(e.w=this.width,e.h=this.height+this.valign,e.d=-this.valign)}}}var $d=(function(){var t;let e=zb(se);return t=class extends e{toCHTML(i){let r=this.standardChtmlNodes(i);if(this.charWrapper){this.charWrapper.toCHTML(r);return}let{src:s,alt:n}=this.node.attributes.getList("src","alt"),a={width:this.em(this.width),height:this.em(this.height)};this.valign&&(a.verticalAlign=this.em(this.valign));let o=this.html("img",{src:s,style:a,alt:n,title:n});this.adaptor.append(r[0],o)}},t.kind=eo.prototype.kind,t.styles={"mjx-mglyph > img":{display:"inline-block",border:0,padding:0}},t})();function qb(t){return class extends t{computeBBox(e,i=!1){if(this.childNodes.length){let{w:r,h:s,d:n}=this.childNodes[0].getBBox();e.w=r,e.h=s,e.d=n}}get breakCount(){return this.node.isEmbellished?this.coreMO().embellishedBreakCount:this.childNodes[0].breakCount}}}function Gb(t){class e extends t{constructor(r,s,n=null){super(r,s,n),this.rscale=this.getRScale()}computeBBox(r,s=!1){let n=this.node.getXML(),a=this.getHDW(n,"use","force"),{h:o,d:h,w:d}=a?this.splitHDW(a):this.measureXmlNode(n);r.w=d,r.h=o,r.d=h}getHTML(){let r=this.adaptor.clone(this.node.getXML()),s=this.getFontStyles();return(this.getHDW(r,"force")||this.jax.options.scale!==1)&&(r=this.addHDW(r,s)),this.html("mjx-html",{variant:this.parent.variant,style:s},[r])}getHDW(r,s,n=s){let a=this.jax.options.htmlHDW,o=this.adaptor.getAttribute(r,"data-mjx-hdw");return o&&(a===s||a===n)?o:null}splitHDW(r){let s=1/this.metrics.scale,[n,a,o]=ji(r).map(h=>this.length2em(h||"0")*s);return{h:n,d:a,w:o}}getFontStyles(){let r=this.adaptor,s=this.metrics;return{"font-family":this.parent.styles?.get("font-family")||s.family||r.fontFamily(r.parent(this.jax.math.start.node))||"initial","font-size":this.jax.fixed(s.em*this.rscale)+"px"}}measureXmlNode(r){let s=this.adaptor,n=this.html("mjx-xml-block",{style:{display:"inline-block"}},[s.clone(r)]),a=this.html("mjx-baseline",{style:{display:"inline-block",width:0,height:0}}),o=this.getFontStyles(),h=this.html("mjx-measure-xml",{style:o},[a,n]),d=this.jax.container;s.append(s.parent(this.jax.math.start.node),d),s.append(d,h);let p=this.metrics,E=p.em*p.scale*this.rscale,{left:y,right:A,bottom:w,top:_}=s.nodeBBox(n),U=(A-y)/E,vt=(s.nodeBBox(a).top-_)/E,nt=(w-_)/E-vt;return s.remove(d),s.remove(h),{w:U,h:vt,d:nt}}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}var Kd=(function(){var t;let e=qb(se);return t=class extends e{toCHTML(i){if(this.toEmbellishedCHTML(i))return;let r=this.standardChtmlNodes(i);this.childNodes.length&&this.childNodes[0].toCHTML(r)}},t.kind=io.prototype.kind,t})(),Jd=(function(){var t=class extends se{toCHTML(e){super.toCHTML(e)}computeBBox(){return this.bbox}};return t.kind=ro.prototype.kind,t})(),Yd=(function(){var t=class extends se{};return t.kind=Vs.prototype.kind,t.styles={"mjx-annotation-xml":{"font-family":"initial","line-height":"normal"}},t})(),Eh=(function(){var t;let e=Gb(se);return t=class extends e{toCHTML(i){this.markUsed(),this.dom=[this.adaptor.append(i[0],this.getHTML())]}addHDW(i,r){let s=this.jax.options.scale,{h:n,d:a,w:o}=this.bbox,h=s*this.metrics.scale;return r.width=this.em(o*h),r.height=this.em((n+a)*h),r["vertical-align"]=this.em(-a*h),r.position="relative",this.html("mjx-html-holder",{style:{transform:`scale(${this.jax.fixed(s)})`,"transform-origin":"top left"}},[i])}},t.kind=Fa.prototype.kind,t})();function Vb(t){return class extends t{computeBBox(e,i=!1){super.computeBBox(e,i),this.childNodes[0]&&this.childNodes[0].bbox.ic&&(e.ic=this.childNodes[0].bbox.ic)}}}var Zd=(function(){var t;let e=Vb(se);return t=class extends e{toCHTML(i){super.toCHTML(i),this.dom.forEach(r=>this.adaptor.setAttribute(r,"texclass",Uu[this.node.texClass]))}},t.kind=_n.prototype.kind,t})();function Xb(t){return class extends t{remappedText(e,i){let r=this.parent.stretch.c;return r?[r]:this.parent.remapChars(this.unicodeChars(e,i))}computeBBox(e,i=!1){let r=this.parent.variant,s=this.node.getText();if(r==="-explicitFont"){let n=this.jax.getFontData(this.parent.styles),{w:a,h:o,d:h}=this.jax.measureText(s,r,n);e.h=o,e.d=h,e.w=a}else{let n=this.remappedText(s,r),a="";e.empty();for(let o=0;o<n.length;o++){let[h,d,p,E]=this.getVariantChar(r,n[o]);if(E.unknown)a+=String.fromCodePoint(n[o]);else{if(a=this.addUtextBBox(e,a,r),this.updateBBox(e,h,d,p),e.ic=E.ic||0,e.sk=E.sk||0,e.dx=E.dx||0,!E.oc||o<n.length-1)continue;let y=this.parent.childNodes;if(this.node!==y[y.length-1].node)continue;let A=this.parent.parent.node,w=A.isKind("mrow")||A.isInferred?A.childNodes[A.childIndex(this.parent.node)+1]:null;w?.isKind("mo")&&w.getText()==="⁢"&&(w=A.childNodes[A.childIndex(w)+1]),!w||w.attributes.get("mathvariant")!==r?e.ic=E.oc:e.oc=E.oc}}this.addUtextBBox(e,a,r),n.length>1&&(e.sk=0),e.clean()}}addUtextBBox(e,i,r){if(i){let{h:s,d:n,w:a}=this.jax.measureText(i,r);this.updateBBox(e,s,n,a)}return""}updateBBox(e,i,r,s){e.w+=s,i>e.h&&(e.h=i),r>e.d&&(e.d=r)}getStyles(){}getVariant(){}getScale(){}getSpace(){}}}var Qd=(function(){var t;let e=Xb(se);return t=class extends e{toCHTML(i){this.markUsed();let r=i[0],s=this.adaptor,n=this.parent.variant,a=this.node.getText();if(a.length===0)return;let o=this.getBBox();if(n==="-explicitFont")s.append(r,this.jax.unknownText(a,n,o.w));else{let h="",d=this.remappedText(a,n),p=d.length>1?this.em(this.parent.getBBox().h):"",E=d.length;for(let y=0;y<E;y++){let A=d[y],w=this.getVariantChar(n,A)[3];if(w.unknown)h+=String.fromCodePoint(A);else{h=this.addUtext(h,n,r);let _=w.ff||(w.f?`${this.font.cssFontPrefix}-${w.f}`:""),U=s.append(r,this.html("mjx-c",{class:this.char(A)+(_?" "+_:"")},[this.text(w.c||String.fromCodePoint(A))]));(y<E-1||o.oc)&&s.setAttribute(U,"noic","true"),p&&s.setStyle(U,"padding-top",p),this.font.charUsage.add([n,A])}}this.addUtext(h,n,r)}}addUtext(i,r,s){return i&&this.adaptor.append(s,this.jax.unknownText(i,r)),""}},t.kind=qs.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})(),tu=(function(){var t=class extends Eh{};return t.kind=Rl.prototype.kind,t})(),$b={[Sd.kind]:Sd,[ph.kind]:ph,[Bd.kind]:Bd,[Ad.kind]:Ad,[Ld.kind]:Ld,[Rd.kind]:Rd,[wd.kind]:wd,[Id.kind]:Id,[kd.kind]:kd,[Od.kind]:Od,[Pd.kind]:Pd,[_d.kind]:_d,[mh.kind]:mh,[jd.kind]:jd,[fh.kind]:fh,[gh.kind]:gh,[Yn.kind]:Yn,[Ud.kind]:Ud,[Hd.kind]:Hd,[Wd.kind]:Wd,[zd.kind]:zd,[Fd.kind]:Fd,[qd.kind]:qd,[yo.kind]:yo,[Gd.kind]:Gd,[Vd.kind]:Vd,[Xd.kind]:Xd,[$d.kind]:$d,[Kd.kind]:Kd,[Jd.kind]:Jd,[Yd.kind]:Yd,[Eh.kind]:Eh,[Zd.kind]:Zd,[Qd.kind]:Qd,[tu.kind]:tu,[se.kind]:se},v1=class extends y1{};v1.defaultNodes=$b;var T1={fontName:"mathjax-newcm",DefaultFont:Ni};T1.fontName;var Kb=T1.DefaultFont,js=class C1 extends Ws{constructor(e={}){super(e,v1,Kb),this.chtmlStyles=null,this.font.adaptiveCSS(this.options.adaptiveCSS),this.wrapperUsage=new gl}addExtension(e,i=""){let r=super.addExtension(e,i);return r.length&&this.options.adaptiveCSS&&this.chtmlStyles&&this.adaptor.insertRules(this.chtmlStyles,r),[]}escaped(e,i){return this.setDocument(i),this.html("span",{},[this.text(e.math)])}styleSheet(e){if(this.chtmlStyles){let r=new Cr;return this.options.adaptiveCSS&&(this.addWrapperStyles(r),this.updateFontStyles(r)),r.addStyles(this.font.updateDynamicStyles()),this.adaptor.insertRules(this.chtmlStyles,r.getStyleRules()),this.chtmlStyles}let i=this.chtmlStyles=super.styleSheet(e);return this.adaptor.setAttribute(i,"id",C1.STYLESHEETID),this.wrapperUsage.update(),i}updateFontStyles(e){e.addStyles(this.font.updateStyles({}))}addWrapperStyles(e){if(!this.options.adaptiveCSS){super.addWrapperStyles(e);return}for(let i of this.wrapperUsage.update()){let r=this.factory.getNodeClass(i);r&&this.addClassStyles(r,e)}}addClassStyles(e,i){let r=e;r.autoStyle&&r.kind!=="unknown"&&i.addStyles({["mjx-"+r.kind]:{display:"inline-block","text-align":"left"}}),this.wrapperUsage.add(r.kind),super.addClassStyles(e,i)}insertStyles(e){this.chtmlStyles&&this.adaptor.insertRules(this.chtmlStyles,new Cr(e).getStyleRules())}processMath(e,i){e.toCHTML([i])}clearCache(){this.styleJson.clear(),this.font.clearCache(),this.wrapperUsage.clear(),this.chtmlStyles=null}reset(){this.clearCache()}unknownText(e,i,r=null){let s={},n=100/this.math.metrics.scale;if(n!==100&&(s["font-size"]=this.fixed(n,1)+"%",s.padding=Bt(75/n)+" 0 "+Bt(20/n)+" 0"),i!=="-explicitFont"){let a=Ao(e);(a.length!==1||a[0]<119808||a[0]>120831)&&this.cssFontStyles(this.font.getCssFont(i),s)}return r!==null&&(s.width=this.fixed(r*this.math.metrics.scale)+"em"),this.html("mjx-utext",{variant:i,style:s},[this.text(e)])}measureTextNode(e){let i=this.adaptor,r=i.clone(e);i.setStyle(r,"font-family",i.getStyle(r,"font-family").replace(/MJXZERO, /g,""));let s=this.math.metrics.em,n={position:"absolute",top:0,left:0,"white-space":"nowrap","font-size":this.fixed(s,3)+"px"},a=this.html("mjx-measure-text",{style:n},[r]);i.append(i.parent(this.math.start.node),this.container),i.append(this.container,a);let o=i.nodeSize(r,s)[0];return i.remove(this.container),i.remove(a),{w:o,h:.75,d:.2}}};js.NAME="CHTML",js.OPTIONS=Object.assign(Object.assign({},Ws.OPTIONS),{adaptiveCSS:!0,matchFontHeight:!0}),js.commonStyles=Object.assign(Object.assign({},Ws.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 polygon("+["-1em -2px","calc(100% + 1em) -2px","calc(100% + 1em) calc(100% + 2px)","-1em calc(100% + 2px)"].join(", ")+")"},"mjx-stretchy-h":{"clip-path":"padding-box polygon(0 -2px, 100% -2px, 100% calc(100% + 2px), 0 calc(100% + 2px))"},"mjx-stretchy-v":{"clip-path":"padding-box polygon(-2px 0, calc(100% + 2px) 0, calc(100% + 2px) 100%, -2px 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"},[["cell","base","under","over","den"].map(t=>`mjx-row > mjx-${t}`).join(", ")]:{display:"table-cell"},"mjx-container [inline-breaks]":{display:"inline"},"mjx-container .mjx-selected":{outline:"2px solid black"},"@media (prefers-color-scheme: dark)":{"mjx-container .mjx-selected":{outline:"2px solid #C8C8C8"}},"mjx-mtext":{display:"inline-block"},"mjx-mstyle":{display:"inline-block"},"mjx-merror":{display:"inline-block",color:"red","background-color":"yellow"},"mjx-mphantom":{visibility:"hidden"}}),js.STYLESHEETID="MJX-CHTML-styles";var Jb={};function eu(t){return typeof t=="object"&&!!t}function S1(t,e,i){t[e]||(t[e]={});let r=t[e];for(let s of Object.keys(i))eu(r[s])&&eu(i[s])?S1(r,s,i[s]):r[s]==null&&i[s]!=null&&(r[s]=i[s]);return r}var dr={version:wu,_:{},config:{}};Jb.MathJax=dr;var ts=class extends Us{static post(t){return super.post(t)}html(t){t.extraNodes??(t.extraNodes=[]);let e=t.adaptor.node("input",{type:"button",value:"Copy to Clipboard","data-drag":"none"});return e.addEventListener("click",this.copyToClipboard.bind(this)),t.extraNodes.push(e),t.code&&(t.message="<pre>"+this.formatSource(t.message)+"</pre>"),super.html(t)}formatSource(t){return t.trim().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}},ba=ni.os==="MacOS";function as(t){let e=ni.document,i=e.createElement("textarea");i.value=t,i.setAttribute("readonly",""),i.style.cssText="height: 1px; width: 1px; padding: 1px; position: absolute; left: -10px",e.body.appendChild(i),i.select();try{e.execCommand("copy")}catch(r){alert(`Can't copy to clipboard: ${r.message}`)}e.body.removeChild(i)}function Yb(t,e,i){return(r,s,n)=>{t8(Qb(r),e,i),n(A1(r,s,i,t))}}function Zb(t){return(e,i,r)=>{let s=t.slice();t.length=0,r(A1(e,i,s,()=>as(Zh.trim())))}}function Qb(t){let e=t.mathItem?.root;for(;e&&!e.isKind("semantics");){if(e.isToken||e.childNodes.length!==1)return null;e=e.childNodes[0]}return e}function t8(t,e,i){if(t){for(let r of t.childNodes)if(r.isKind("annotation")){let s=e8(r,e);if(s){let n=r.childNodes.reduce((a,o)=>a+o.toString(),"");i.push([s,n])}}}}function e8(t,e){let i=t.attributes.get("encoding");for(let r of Object.keys(e))if(e[r].includes(i))return r;return null}var Zh="";function A1(t,e,i,r){return t.factory.get("subMenu")(t.factory,{items:i.map(([s,n])=>({type:"command",id:s,content:s,action:()=>{Zh=n,r()}})),id:"annotations"},e)}var Qe;(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"})(Qe||(Qe={}));var es={CLICK:"click",DBLCLICK:"dblclick",DOWN:"mousedown",UP:"mouseup",OVER:"mouseover",OUT:"mouseout",MOVE:"mousemove",SELECTEND:"selectend",SELECTSTART:"selectstart"},i8=class{constructor(){this.bubble=!1}bubbleKey(){this.bubble=!0}keydown(t){switch(t.keyCode){case Qe.ESCAPE:this.escape(t);break;case Qe.RIGHT:this.right(t);break;case Qe.LEFT:this.left(t);break;case Qe.UP:this.up(t);break;case Qe.DOWN:this.down(t);break;case Qe.RETURN:case Qe.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(es.DOWN,this.mousedown.bind(this)),t.addEventListener(es.UP,this.mouseup.bind(this)),t.addEventListener(es.OVER,this.mouseover.bind(this)),t.addEventListener(es.OUT,this.mouseout.bind(this)),t.addEventListener(es.CLICK,this.click.bind(this)),t.addEventListener("keydown",this.keydown.bind(this)),t.addEventListener("dragstart",this.stop.bind(this)),t.addEventListener(es.SELECTSTART,this.stop.bind(this)),t.addEventListener("contextmenu",this.stop.bind(this)),t.addEventListener(es.DBLCLICK,this.stop.bind(this))}},L1=class extends i8{addAttributes(t){for(let 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(){let t=document.createElement("div");t.classList.add(this.className),t.setAttribute("role",this.role),this.html=t}focus(){let t=this.html;t.setAttribute("tabindex","0"),setTimeout(()=>t.focus(),50)}unfocus(){let t=this.html;t.hasAttribute("tabindex")&&t.setAttribute("tabindex","-1");try{t.blur()}catch{}t.blur()}},Qh=class extends L1{constructor(){super(...arguments),this.posted=!1}isPosted(){return this.posted}post(t,e){this.posted||(this.posted=(t!==void 0&&e!==void 0&&this.html.setAttribute("style","left: "+t+"px; top: "+e+"px;"),this.display(),!0))}unpost(){if(!this.posted)return;let t=this.html;t.parentNode&&t.parentNode.removeChild(t),this.posted=!1}};function R1(t){return"CtxtMenu_"+t}function Zt(t){return R1(t)}function fn(t){return R1(t)}var Wt={ATTACHED:Zt("Attached"),CONTEXTMENU:Zt("ContextMenu"),MENU:Zt("Menu"),MENUARROW:Zt("MenuArrow"),MENUACTIVE:Zt("MenuActive"),MENUCHECK:Zt("MenuCheck"),MENUCLOSE:Zt("MenuClose"),MENUCOMBOBOX:Zt("MenuComboBox"),MENUDISABLED:Zt("MenuDisabled"),MENUFRAME:Zt("MenuFrame"),MENUITEM:Zt("MenuItem"),MENULABEL:Zt("MenuLabel"),MENURADIOCHECK:Zt("MenuRadioCheck"),MENUINPUTBOX:Zt("MenuInputBox"),MENURULE:Zt("MenuRule"),MENUSLIDER:Zt("MenuSlider"),MOUSEPOST:Zt("MousePost"),RTL:Zt("RTL"),INFO:Zt("Info"),INFOCLOSE:Zt("InfoClose"),INFOCONTENT:Zt("InfoContent"),INFOSIGNATURE:Zt("InfoSignature"),INFOTITLE:Zt("InfoTitle"),SLIDERVALUE:Zt("SliderValue"),SLIDERBAR:Zt("SliderBar"),SELECTION:Zt("Selection"),SELECTIONBOX:Zt("SelectionBox"),SELECTIONMENU:Zt("SelectionMenu"),SELECTIONDIVIDER:Zt("SelectionDivider"),SELECTIONITEM:Zt("SelectionItem")},Bi={COUNTER:fn("Counter"),KEYDOWNFUNC:fn("keydownFunc"),CONTEXTMENUFUNC:fn("contextmenuFunc"),OLDTAB:fn("Oldtabindex"),TOUCHFUNC:fn("TouchFunc")},w1=class extends L1{constructor(t,e){super(),this._menu=t,this._type=e,this.className=Wt.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 ys(t){let e=t.menu;e.baseMenu?e.baseMenu.unpost():e.unpost()}function Zn(t){let e=t.menu;return(e.baseMenu?e.baseMenu:e).store.active}function xo(t,e){console.error("ContextMenu Error: "+e)}function No(){return r8++}var r8=0,Ks=class extends w1{constructor(t,e,i,r){super(t,e),this._content=i,this.disabled=!1,this.callbacks=[],this._id=r||i}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){this.callbacks.indexOf(t)===-1&&this.callbacks.push(t)}unregisterCallback(t){let e=this.callbacks.indexOf(t);e!==-1&&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();let t=this.html;t.setAttribute("aria-disabled","false"),t.textContent=this.content}activate(){this.disabled||this.html.classList.add(Wt.MENUACTIVE)}deactivate(){this.html.classList.remove(Wt.MENUACTIVE)}focus(){this.menu.focused=this,super.focus(),this.activate()}unfocus(){this.deactivate(),super.unfocus()}escape(t){ys(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;let t=this.html;t.classList.add(Wt.MENUDISABLED),t.setAttribute("aria-disabled","true")}enable(){this.disabled=!1;let t=this.html;t.classList.remove(Wt.MENUDISABLED),t.removeAttribute("aria-disabled")}executeCallbacks_(){for(let t of this.callbacks)try{t(this)}catch(e){xo(e,"Callback for menu entry "+this.id+" failed.")}}},Qn=class extends Ks{static fromJson(t,{content:e,menu:i,id:r},s){let n=new this(s,e,r);return n.submenu=t.get("subMenu")(t,i,n),n}constructor(t,e,i){super(t,"submenu",e,i),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()){super.unfocus();return}if(this.menu.focused!==this){super.unfocus(),this.menu.unpostSubmenus();return}this.html.setAttribute("tabindex","-1"),this.html.blur()}focus(){super.focus(),!this.submenu.isPosted()&&!this.disabled&&this.submenu.post()}executeAction(){this.submenu.isPosted()?this.submenu.unpost():this.submenu.post()}generateHtml(){super.generateHtml();let t=this.html;this.span=document.createElement("span"),this.span.textContent="►",this.span.classList.add(Wt.MENUARROW),this.span.setAttribute("aria-hidden","true"),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:""}}},tc=class extends Qh{constructor(){super(...arguments),this.className=Wt.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();let e=this._focused;this._focused=t,e&&e.unfocus()}up(t){let e=this.items.filter(r=>r instanceof Ks&&!r.isHidden());if(e.length===0)return;if(!this.focused){e[e.length-1].focus();return}let i=e.indexOf(this.focused);i!==-1&&(i=i?--i:e.length-1,e[i].focus())}down(t){let e=this.items.filter(r=>r instanceof Ks&&!r.isHidden());if(e.length===0)return;if(!this.focused){e[0].focus();return}let i=e.indexOf(this.focused);i!==-1&&(i++,i=i===e.length?0:i,e[i].focus())}generateHtml(){super.generateHtml(),this.generateMenu()}generateMenu(){let t=this.html;t.classList.add(Wt.MENU);for(let e of this.items){if(!e.isHidden()){t.appendChild(e.html);continue}let i=e.html;i.parentNode&&i.parentNode.removeChild(i)}}post(t,e){this.variablePool.update(),super.post(t,e)}unpostSubmenus(){let t=this.items.filter(e=>e instanceof Qn);for(let e of t)e.submenu.unpost(),e!==this.focused&&e.unfocus()}unpost(){super.unpost(),this.unpostSubmenus(),this.focused=null}find(t){for(let e of this.items)if(e.type!=="rule"){if(e.id===t)return e;if(e.type==="submenu"){let i=e.submenu.find(t);if(i)return i}}return null}},s8=class{constructor(t){this.menu=t,this.store=[],this._active=null,this.counter=0,this.attachedClass=Wt.ATTACHED+"_"+No(),this.taborder=!0,this.attrMap={}}set active(t){do{if(this.store.indexOf(t)!==-1){this._active=t;break}t=t.parentNode}while(t)}get active(){return this._active}next(){let t=this.store.length;if(t===0)return this.active=null,null;let e=this.store.indexOf(this.active);return e=e===-1?0:e<t-1?e+1:0,this.active=this.store[e],this.active}previous(){let t=this.store.length;if(t===0)return this.active=null,null;let e=t-1,i=this.store.indexOf(this.active);return i=i===-1||i===0?e:i-1,this.active=this.store[i],this.active}clear(){this.remove(this.store)}insert(t){let e=t instanceof HTMLElement?[t]:t;for(let i of e)this.insertElement(i);this.sort()}remove(t){let e=t instanceof HTMLElement?[t]:t;for(let i of e)this.removeElement(i);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(){let 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(Bi.OLDTAB,t.getAttribute("tabindex")),t.setAttribute("tabindex","0")}removeTabindex(t){t.hasAttribute(Bi.OLDTAB)?(t.setAttribute("tabindex",t.getAttribute(Bi.OLDTAB)),t.removeAttribute(Bi.OLDTAB)):t.removeAttribute("tabindex")}addEvents(t){t.hasAttribute(Bi.COUNTER)||(this.addEvent(t,"contextmenu",this.menu.post.bind(this.menu)),this.addEvent(t,"keydown",this.keydown.bind(this)),t.setAttribute(Bi.COUNTER,this.counter.toString()),this.counter++)}addEvent(t,e,i){let r=Bi[e.toUpperCase()+"FUNC"];this.attrMap[r+this.counter]=i,t.addEventListener(e,i)}removeEvents(t){if(!t.hasAttribute(Bi.COUNTER))return;let e=t.getAttribute(Bi.COUNTER);this.removeEvent(t,"contextmenu",e),this.removeEvent(t,"keydown",e),t.removeAttribute(Bi.COUNTER)}removeEvent(t,e,i){let r=Bi[e.toUpperCase()+"FUNC"],s=this.attrMap[r+i];t.removeEventListener(e,s)}keydown(t){t.keyCode===Qe.SPACE&&(this.menu.post(t),t.preventDefault(),t.stopImmediatePropagation())}},n8=class{constructor(){this.pool={}}insert(t){this.pool[t.name]=t}lookup(t){return this.pool[t]}remove(t){delete this.pool[t]}update(){for(let t in this.pool)this.pool[t].update()}},yh=class extends tc{static fromJson(t,{pool:e,items:i,id:r=""}){let s=new this(t);s.id=r;let n=t.get("variable");return e.forEach(a=>n(t,a,s.pool)),s.items=t.get("items")(t,i,s),s}constructor(t){super(),this.factory=t,this.id="",this.moving=!1,this._store=new s8(this),this.widgets=[],this.variablePool=new n8}generateHtml(){this.isPosted()&&this.unpost(),super.generateHtml(),this._frame=document.createElement("div"),this._frame.classList.add(Wt.MENUFRAME),this._frame.setAttribute("style","position: absolute; left: 0px; top: 0px; z-index: 200; width: 100%; height: 100%; border: 0px; padding: 0px; margin: 0px;");let t=document.createElement("div");t.setAttribute("style","position: fixed; left: 0px; top: 0px; z-index: 200; width: 100%; height: 100%; border: 0px; padding: 0px; margin: 0px;"),this._frame.appendChild(t),t.addEventListener("mousedown",function(e){this.unpost(),this.unpostWidgets(),this.stop(e)}.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);let 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(e!==void 0){this.moving||this.store.removeTaborder(),super.post(t,e);return}let i=t,r;i instanceof Event?(r=i.target,this.stop(i)):r=i;let s,n;if(i instanceof MouseEvent&&(s=i.pageX,n=i.pageY,!s&&!n&&i.clientX&&(s=i.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n=i.clientY+document.body.scrollTop+document.documentElement.scrollTop)),!s&&!n&&r){let o=window.pageXOffset||document.documentElement.scrollLeft,h=window.pageYOffset||document.documentElement.scrollTop,d=r.getBoundingClientRect();s=(d.right+d.left)/2+o,n=(d.bottom+d.top)/2+h}this.store.active=r,this.anchor=this.store.active;let a=this.html;s+a.offsetWidth>document.body.offsetWidth-5&&(s=document.body.offsetWidth-a.offsetWidth-5),this.post(s,n)}registerWidget(t){this.widgets.push(t)}unregisterWidget(t){let e=this.widgets.indexOf(t);e>-1&&this.widgets.splice(e,1),this.widgets.length===0&&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)}},iu=class I1 extends tc{static fromJson(e,{items:i},r){let s=new this(r);return s.items=e.get("items")(e,i,s),s}constructor(e){super(),this._anchor=e,this.variablePool=this.anchor.menu.pool,this.setBaseMenu()}get anchor(){return this._anchor}post(){if(!this.anchor.menu.isPosted())return;let e=this.anchor.html,i=this.html,r=this.baseMenu.frame,s=e.offsetWidth,n=s-2,a=0;for(;e&&e!==r;)n+=e.offsetLeft,a+=e.offsetTop,e=e.parentNode;n+i.offsetWidth>document.body.offsetWidth-5&&(n=Math.max(5,n-s-i.offsetWidth+6)),super.post(n,a)}display(){this.baseMenu.frame.appendChild(this.html)}setBaseMenu(){let e=this;do e=e.anchor.menu;while(e instanceof I1);this.baseMenu=e}left(e){this.focused=null,this.anchor.focus()}toJson(){return{type:""}}},Bo=class extends Ks{generateHtml(){super.generateHtml();let 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()}},xh=class extends Bo{static fromJson(t,{content:e,variable:i,id:r},s){return new this(s,e,i,r)}constructor(t,e,i,r){super(t,"radio",e,r),this.role="menuitemradio",this.variable=t.pool.lookup(i),this.register()}executeAction(){this.variable.setValue(this.id),ys(this)}generateSpan(){this.span=document.createElement("span"),this.span.textContent="✓",this.span.classList.add(Wt.MENURADIOCHECK),this.span.setAttribute("aria-hidden","true")}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:""}}},Nh=class extends w1{static fromJson(t,e,i){return new this(i)}constructor(t){super(t,"rule"),this.className=Wt.MENUITEM,this.role="separator"}generateHtml(){super.generateHtml();let t=this.html;t.classList.add(Wt.MENURULE),t.setAttribute("aria-orientation","vertical")}addEvents(t){}toJson(){return{type:"rule"}}},a8=class{constructor(t){this._parser=new Map(t)}get(t){return this._parser.get(t)}add(t,e){this._parser.set(t,e)}},ru=class extends Ks{static fromJson(t,{content:e,action:i,id:r},s){return new this(s,e,i,r)}constructor(t,e,i,r){super(t,"command",e,r),this.command=i}mousedown(t){this.stop(t)}mouseup(t){this.press(),this.stop(t)}executeAction(){try{this.command(Zn(this))}catch(t){xo(t,"Illegal command callback.")}ys(this)}toJson(){return{type:""}}},su=class{static fromJson(t,{name:e,getter:i,setter:r},s){let n=new this(e,i,r);s.insert(n)}constructor(t,e,i){this._name=t,this.getter=e,this.setter=i,this.items=[]}get name(){return this._name}getValue(t){try{return this.getter(t)}catch(e){return xo(e,"Command of variable "+this.name+" failed."),null}}setValue(t,e){try{this.setter(t,e)}catch(i){xo(i,"Command of variable "+this.name+" failed.")}this.update()}register(t){this.items.indexOf(t)===-1&&this.items.push(t)}unregister(t){let e=this.items.indexOf(t);e!==-1&&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()}}},nu=class extends Bo{static fromJson(t,{content:e,variable:i,id:r},s){return new this(s,e,i,r)}constructor(t,e,i,r){super(t,"checkbox",e,r),this.role="menuitemcheckbox",this.variable=t.pool.lookup(i),this.register()}executeAction(){this.variable.setValue(!this.variable.getValue()),ys(this)}generateSpan(){this.span=document.createElement("span"),this.span.textContent="✓",this.span.classList.add(Wt.MENUCHECK),this.span.setAttribute("aria-hidden","true")}updateAria(){this.html.setAttribute("aria-checked",this.variable.getValue()?"true":"false")}updateSpan(){this.span.style.display=this.variable.getValue()?"":"none"}toJson(){return{type:""}}},au=class extends Bo{static fromJson(t,{content:e,variable:i,id:r},s){return new this(s,e,i,r)}constructor(t,e,i,r){super(t,"combobox",e,r),this.role="combobox",this.inputEvent=!1,this.variable=t.pool.lookup(i),this.register()}executeAction(){this.variable.setValue(this.input.value,Zn(this))}space(t){super.space(t),ys(this)}focus(){super.focus(),this.input.focus()}unfocus(){super.unfocus(),this.updateSpan()}generateHtml(){super.generateHtml(),this.html.classList.add(Wt.MENUCOMBOBOX)}generateSpan(){this.span=document.createElement("span"),this.span.classList.add(Wt.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!==Qe.ESCAPE&&t.keyCode!==Qe.RETURN){this.inputEvent=!1,t.stopPropagation();return}super.keydown(t),t.stopPropagation()}updateAria(){}updateSpan(){let t;try{t=this.variable.getValue(Zn(this))}catch{t=""}this.input.value=t}toJson(){return{type:""}}},ou=class extends Ks{static fromJson(t,{content:e,id:i},r){return new this(r,e,i)}constructor(t,e,i){super(t,"label",e,i)}generateHtml(){super.generateHtml(),this.html.classList.add(Wt.MENULABEL)}toJson(){return{type:""}}},lu=class extends Bo{static fromJson(t,{content:e,variable:i,id:r},s){return new this(s,e,i,r)}constructor(t,e,i,r){super(t,"slider",e,r),this.role="slider",this.labelId="ctx_slideLabel"+No(),this.valueId="ctx_slideValue"+No(),this.inputEvent=!1,this.variable=t.pool.lookup(i),this.register()}executeAction(){this.variable.setValue(this.input.value,Zn(this)),this.update()}space(t){super.space(t),ys(this)}focus(){super.focus(),this.input.focus()}unfocus(){super.unfocus(),this.updateSpan()}generateHtml(){super.generateHtml(),this.html.classList.add(Wt.MENUSLIDER),this.valueSpan=document.createElement("span"),this.valueSpan.setAttribute("id",this.valueId),this.valueSpan.classList.add(Wt.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(Wt.SLIDERBAR),this.span.appendChild(this.input)}inputKey(t){this.inputEvent=!0}mousedown(t){t.stopPropagation()}mouseup(t){ys(this),t.stopPropagation()}keydown(t){let e=t.keyCode;if(e===Qe.UP||e===Qe.DOWN){t.preventDefault(),super.keydown(t);return}if(this.inputEvent&&e!==Qe.ESCAPE&&e!==Qe.RETURN){this.inputEvent=!1,t.stopPropagation();return}super.keydown(t),t.stopPropagation()}updateAria(){let 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(Zn(this)),this.valueSpan.innerHTML=t+"%"}catch{t=""}this.input.value=t}toJson(){return{type:""}}},o8=class extends Qh{constructor(t){super(),this.element=t,this.className=Wt.MENUCLOSE,this.role="button"}generateHtml(){let t=document.createElement("span");t.classList.add(this.className),t.setAttribute("role",this.role),t.setAttribute("tabindex","0");let e=document.createElement("span");e.textContent="×",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)}},l8=class extends Qh{constructor(t,e,i){super(),this.title=t,this.signature=i,this.className=Wt.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();let 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();let t=document.documentElement,e=this.html,i=window.innerHeight||t.clientHeight||t.scrollHeight||0,r=Math.floor(-e.offsetWidth/2),s=Math.floor((i-e.offsetHeight)/3);e.setAttribute("style","margin-left: "+r+"px; top: "+s+"px;"),window.event instanceof MouseEvent&&e.classList.add(Wt.MOUSEPOST),e.focus()}display(){this.menu.registerWidget(this),this.contentDiv.innerHTML=this.content();let 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(Wt.MOUSEPOST),this.menu.unregisterWidget(this)}generateClose(){let t=new o8(this),e=t.html;return e.classList.add(Wt.INFOCLOSE),e.setAttribute("aria-label","Close Dialog Box"),t}generateTitle(){let t=document.createElement("span");return t.innerHTML=this.title,t.classList.add(Wt.INFOTITLE),t}generateContent(){let t=document.createElement("div");return t.classList.add(Wt.INFOCONTENT),t.setAttribute("tabindex","0"),t}generateSignature(){let t=document.createElement("span");return t.innerHTML=this.signature,t.classList.add(Wt.INFOSIGNATURE),t}toJson(){return{type:""}}},hu=class extends tc{static fromJson(t,{title:e,values:i,variable:r},s){let n=new this(s),a=t.get("label")(t,{content:e||"",id:e||"id"},n),o=t.get("rule")(t,{},n),h=i.map(d=>t.get("radio")(t,{content:d,variable:r,id:d},n));return n.items=[a,o].concat(h),n}constructor(t){super(),this.anchor=t,this.className=Wt.SELECTIONMENU,this.variablePool=this.anchor.menu.pool,this.baseMenu=this.anchor.menu}generateHtml(){super.generateHtml(),this.items.forEach(t=>t.html.classList.add(Wt.SELECTIONITEM))}display(){}right(t){this.anchor.right(t)}left(t){this.anchor.left(t)}},ta=class Pa extends l8{static fromJson(e,{title:i,signature:r,selections:s,order:n,grid:a},o){let h=new this(i,r,n,a);return h.attachMenu(o),h.selections=s.map(d=>e.get("selectionMenu")(e,d,h)),h}constructor(e,i,r="none",s="vertical"){super(e,null,i),this.style=r,this.grid=s,this._selections=[],this.prefix="ctxt-selection",this._balanced=!0}attachMenu(e){this.menu=e}get selections(){return this._selections}set selections(e){this._selections=[],e.forEach(i=>this.addSelection(i))}addSelection(e){e.anchor=this,this._selections.push(e)}rowDiv(e){let i=document.createElement("div");this.contentDiv.appendChild(i);let r=e.map(o=>(i.appendChild(o.html),o.html.id||(o.html.id=this.prefix+No()),o.html.getBoundingClientRect())),s=r.map(o=>o.width),n=s.reduce((o,h)=>o+h,0),a=r.reduce((o,h)=>Math.max(o,h.height),0);return i.classList.add(Wt.SELECTIONDIVIDER),i.setAttribute("style","height: "+a+"px;"),[i,n,a,s]}display(){if(super.display(),this.order(),!this.selections.length)return;let e=[],i=0,r=[],s=this.getChunkSize(this.selections.length);for(let n=0;n<this.selections.length;n+=s){let a=this.selections.slice(n,n+s),[o,h,d,p]=this.rowDiv(a);e.push(o),i=Math.max(i,h),a.forEach(E=>E.html.style.height=d+"px"),r=this.combineColumn(r,p)}this._balanced&&(this.balanceColumn(e,r),i=r.reduce((n,a)=>n+a,20)),e.forEach(n=>n.style.width=i+"px")}getChunkSize(e){switch(this.grid){case"square":return Math.floor(Math.sqrt(e));case"horizontal":return Math.floor(e/Pa.chunkSize);default:return Pa.chunkSize}}balanceColumn(e,i){e.forEach(r=>{let s=Array.from(r.children);for(let n=0,a;a=s[n];n++)a.style.width=i[n]+"px"})}combineColumn(e,i){let r=[],s=0;for(;e[s]||i[s];){if(!e[s]){r=r.concat(i.slice(s));break}if(!i[s]){r=r.concat(e.slice(s));break}r.push(Math.max(e[s],i[s])),s++}return r}left(e){this.move(e,i=>(i===0?this.selections.length:i)-1)}right(e){this.move(e,i=>i===this.selections.length-1?0:i+1)}generateHtml(){super.generateHtml(),this.html.classList.add(Wt.SELECTION)}generateContent(){let e=super.generateContent();return e.classList.add(Wt.SELECTIONBOX),e.removeAttribute("tabindex"),e}findSelection(e){let i=e.target,r=null;if(i.id&&(r=this.selections.find(s=>s.html.id===i.id)),!r){let s=i.parentElement.id;r=this.selections.find(n=>n.html.id===s)}return r}move(e,i){let r=this.findSelection(e);r.focused&&r.focused.unfocus();let s=i(this.selections.indexOf(r));this.selections[s].focus()}order(){this.selections.sort(Pa.orderMethod.get(this.style))}toJson(){return{type:""}}};ta.chunkSize=4,ta.orderMethod=new Map([["alphabetical",(t,e)=>t.items[0].content.localeCompare(e.items[0].content)],["none",(t,e)=>1],["decreasing",(t,e)=>{let i=t.items.length,r=e.items.length;return i<r?1:r<i?-1:0}],["increasing",(t,e)=>{let i=t.items.length,r=e.items.length;return i<r?-1:+(r<i)}]]);var h8=function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(i[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(i[r[s]]=t[r[s]]);return i},c8=class{constructor(t=[]){this._initList=[["command",ru.fromJson.bind(ru)],["checkbox",nu.fromJson.bind(nu)],["combo",au.fromJson.bind(au)],["slider",lu.fromJson.bind(lu)],["label",ou.fromJson.bind(ou)],["radio",xh.fromJson.bind(xh)],["rule",Nh.fromJson.bind(Nh)],["submenu",Qn.fromJson.bind(Qn)],["contextMenu",yh.fromJson.bind(yh)],["subMenu",iu.fromJson.bind(iu)],["variable",su.fromJson.bind(su)],["items",this.items.bind(this)],["selectionMenu",hu.fromJson.bind(hu)],["selectionBox",ta.fromJson.bind(ta)]],this._factory=new a8(this._initList),t.forEach(([e,i])=>this.factory.add(e,i))}get factory(){return this._factory}items(t,e,i){let r=[];for(let s of e){let n=this.parse(s,i);n&&(i.items.push(n),s.disabled&&n.disable(),s.hidden&&r.push(n))}return r.forEach(s=>s.hide()),i.items}parse(t,...e){var{type:i}=t,r=h8(t,["type"]);let s=this.factory.get(i);return s?s(this.factory,r,...e):null}};function Nt(t){return"."+(Wt[t]||t)}function Rt(t,e=";"){return`{
213
+ `+t.join(e+`
214
+ `)+`;
215
+ }`}var Vt={};Vt[Nt("MENU")]=Rt(["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: 1001","border-radius: 5px","box-shadow: 0px 10px 20px #808080"]),Vt[Nt("MENUITEM")]=Rt(["padding: 1px 2em","background: transparent"]),Vt[Nt("MENUARROW")]=Rt(["position: absolute","right: 0.5em","padding-top: 0.25em","color: #666666","font-family: null","font-size: 0.75em"]),Vt[Nt("MENUACTIVE")+" "+Nt("MENUARROW")]=Rt(["color: white"]),Vt[Nt("MENUARROW")+Nt("RTL")]=Rt(["left: 0.5em","right: auto"]),Vt[Nt("MENUCHECK")]=Rt(["position: absolute","left: 0.7em","font-family: null"]),Vt[Nt("MENUCHECK")+Nt("RTL")]=Rt(["right: 0.7em","left: auto"]),Vt[Nt("MENURADIOCHECK")]=Rt(["position: absolute","left: 0.7em"]),Vt[Nt("MENURADIOCHECK")+Nt("RTL")]=Rt(["right: 0.7em","left: auto"]),Vt[Nt("MENUINPUTBOX")]=Rt(["padding-left: 1em","right: 0.5em","color: #666666","font-family: null"]),Vt[Nt("MENUINPUTBOX")+Nt("RTL")]=Rt(["left: 0.1em"]),Vt[Nt("MENUCOMBOBOX")]=Rt(["left: 0.1em","padding-bottom: 0.5em"]),Vt[Nt("MENUSLIDER")]=Rt(["left: 0.1em"]),Vt[Nt("SLIDERVALUE")]=Rt(["position: absolute","right: 0.1em","padding-top: 0.25em","color: #333333","font-size: 0.75em"]),Vt[Nt("MENUACTIVE")+" "+Nt("SLIDERVALUE")]=Rt(["color: #DDDDDD"]),Vt[Nt("SLIDERBAR")]=Rt(["outline: none","background: #D3D3D3"]),Vt[Nt("MENULABEL")]=Rt(["padding: 1px 2em 3px 1.33em","font-style: italic"]),Vt[Nt("MENURULE")]=Rt(["border-top: 1px solid #DDDDDD","margin: 4px 3px"]),Vt[Nt("MENUDISABLED")]=Rt(["color: #999"]),Vt[Nt("MENUACTIVE")]=Rt(["background-color: #606872","color: white"]),Vt[Nt("MENUDISABLED")+":focus"]=Rt(["background-color: #E8E8E8"]),Vt[Nt("MENULABEL")+":focus"]=Rt(["background-color: #E8E8E8"]),Vt[Nt("CONTEXTMENU")+":focus"]=Rt(["outline: none"]),Vt[Nt("CONTEXTMENU")+" "+Nt("MENUITEM")+":focus"]=Rt(["outline: none"]),Vt[Nt("SELECTIONMENU")]=Rt(["position: relative","float: left","border-bottom: none","box-shadow: none ! important","border-radius: 0px !important"]),Vt[Nt("SELECTIONITEM")]=Rt(["padding-right: 1em"]),Vt[Nt("SELECTION")]=Rt(["right: 40%","width: 50%"]),Vt[Nt("SELECTIONBOX")]=Rt(["padding: 0em","max-height: 20em","max-width: none","background-color: #FFFFFF"]),Vt[Nt("SELECTIONDIVIDER")]=Rt(["clear: both","border-top: 2px solid #000000"]),Vt[Nt("MENU")+" "+Nt("MENUCLOSE")]=Rt(["top: -10px","left: -10px"]),Vt["@media (prefers-color-scheme: dark) /* menu */"]=Rt([Nt("MENU")+" "+Rt(["color: #E0E0E0","background-color: #242436","box-shadow: 0px 10px 20px #000","border: 1px solid #808080"]),Nt("SLIDERVALUE")+" "+Rt(["color: #D0D0D0"]),Nt("MENUDISABLED")+":focus "+Rt(["background-color: #383838"]),Nt("MENULABEL")+":focus "+Rt(["background-color: #585858"]),Nt("MENURULE")+" "+Rt(["border-top: 1px solid #808080"]),Nt("SELECTIONDIVIDER")+" "+Rt(["border-top: 2px solid #808080"])],"");var _s={};_s[Nt("MENUCLOSE")]=Rt(["position: absolute","cursor: pointer","display: inline-block","border: 2px solid #AAA","border-radius: 18px",'font-family: "Courier New", Courier',"font-size: 24px","color: #F0F0F0"]),_s[Nt("MENUCLOSE")+" span"]=Rt(["display: block","background-color: #AAA","border: 1.5px solid","border-radius: 18px","line-height: 0","padding: 8px 0 6px"]),_s[Nt("MENUCLOSE")+":hover"]=Rt(["color: white !important","border: 2px solid #CCC !important"]),_s[Nt("MENUCLOSE")+":hover span"]=Rt(["background-color: #CCC !important"]),_s[Nt("MENUCLOSE")+":hover:focus"]=Rt(["outline: none"]);var d8="MJX-Menu-styles";function u8(t){p8(Object.assign(Object.assign({},Vt),_s),t)}function p8(t,e=document,i=d8){if(e.head.querySelector("#"+i))return;let r=e.createElement("style");r.id=i;let s=[];for(let n in t)s.push(`${n} ${t[n]}`);r.textContent=s.join(`
216
+ `),e.head.appendChild(r)}var us=class k1 extends yh{constructor(){super(...arguments),this.mathItem=null,this.nofocus=!1,this.errorMsg=""}post(e,i){if(this.mathItem){let r=this.mathItem?.explorers?.speech;r?.active&&(r.restarted=r.semanticFocus()),i!==void 0&&(this.getOriginalMenu(),this.getSemanticsMenu(),this.getSpeechMenu(),this.getBrailleMenu(),this.getSvgMenu(),this.getErrorMessage(),this.dynamicSubmenus()),super.post(e,i)}}unpost(){this.posted&&super.unpost(),this.mathItem&&(this.mathItem.outputData.nofocus=this.nofocus),this.mathItem=null,this.nofocus=!1}findID(...e){let i=this,r=null;for(let s of e){if(!i)return null;for(r of i.items){if(r.id===s){i=r instanceof Qn?r.submenu:null;break}i=r=null}}return r}setJax(e){this.jax=e}getOriginalMenu(){let e=this.mathItem.inputJax.name,i=this.findID("Show","Original");i.content=e==="MathML"?"Original MathML":e+" Commands";let r=this.findID("Copy","Original");r.content=i.content}getSemanticsMenu(){let e=this.findID("Settings","MathmlIncludes","semantics");this.mathItem.inputJax.name==="MathML"?e.disable():e.enable()}getSpeechMenu(){let e=this.mathItem.outputData.speech;this.findID("Show","Speech")[e?"enable":"disable"](),this.findID("Copy","Speech")[e?"enable":"disable"]()}getBrailleMenu(){let e=this.mathItem.outputData.braille;this.findID("Show","Braille")[e?"enable":"disable"](),this.findID("Copy","Braille")[e?"enable":"disable"]()}getSvgMenu(){let e=this.jax.SVG;this.findID("Show","SVG")[e?"enable":"disable"](),this.findID("Copy","SVG")[e?"enable":"disable"]()}getErrorMessage(){let e=this.mathItem.root.childNodes[0].childNodes,i=!0;if(this.errorMsg="",e.length===1&&e[0].isKind("merror")){let r=e[0].attributes;this.errorMsg=r.get("data-mjx-error")||r.get("data-mjx-message")||"",i=!this.errorMsg}this.findID("Show","Error")[i?"disable":"enable"](),this.findID("Copy","Error")[i?"disable":"enable"]()}dynamicSubmenus(){for(let[e,[i,r]]of k1.DynamicSubmenus){let s=this.find(e);s&&i(this,s,n=>{s.submenu=n,n?.items?.length&&(!r||this.settings[r])?s.enable():s.disable()})}}};us.DynamicSubmenus=new Map;var cu=class extends xh{static fromJson(t,{content:e,variable:i,id:r,comparator:s},n){return new this(n,e,i,r,s)}constructor(t,e,i,r,s){super(t,e,i,r),this.comparator=s,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"}},m8=class extends Lo{constructor(){super(...arguments),this.options={filterSRE:!0,filterTex:!0,texHints:!0,semantics:!1},this.mathItem=null}visitTree(t,e=null,i={}){return this.mathItem=e,fi(this.options,i),this.visitNode(t,"")}visitTeXAtomNode(t,e){return this.options.texHints?super.visitDefault(t,e):t.childNodes[0]&&t.childNodes[0].childNodes.length===1?this.visitNode(t.childNodes[0],e):`${e}<mrow${this.getAttributes(t)}>
217
+ `+this.childNodeMml(t,e+" ",`
218
+ `)+`${e}</mrow>`}visitMathNode(t,e){if(!this.options.semantics||this.mathItem.inputJax.name!=="TeX")return super.visitDefault(t,e);let i=t.childNodes.length&&t.childNodes[0].childNodes.length>1;return`${e}<math${this.getAttributes(t)}>
219
+ ${e} <semantics>
220
+ `+(i?e+` <mrow>
221
+ `:"")+this.childNodeMml(t,e+(i?" ":" "),`
222
+ `)+(i?e+` </mrow>
223
+ `:"")+`${e} <annotation encoding="application/x-tex">`+this.mathItem.math+`</annotation>
224
+ ${e} </semantics>
225
+ ${e}</math>`}getAttributeList(t){let e=super.getAttributeList(t);if(this.options.filterTex&&(delete e["data-latex"],delete e["data-latex-item"]),this.options.filterSRE){let i=Object.keys(e).filter(r=>r.match(/^(?:data-semantic-.*?|data-speech-node|role|aria-(?:level|posinset|setsize|owns))$/));for(let r of i)delete e[r]}return e}},Ea=function(t,e,i,r){function s(n){return n instanceof i?n:new i(function(a){a(n)})}return new(i||(i=Promise))(function(n,a){function o(p){try{d(r.next(p))}catch(E){a(E)}}function h(p){try{d(r.throw(p))}catch(E){a(E)}}function d(p){p.done?n(p.value):s(p.value).then(o,h)}d((r=r.apply(t,e||[])).next())})},me=dr,f8='<?xml version="1.0" encoding="UTF-8" standalone="no"?>',Mi=class qt{get isLoading(){return qt.loading>0}get loadingPromise(){return this.isLoading?(qt._loadingPromise||(qt._loadingPromise=new Promise((e,i)=>{qt._loadingOK=e,qt._loadingFailed=i})),qt._loadingPromise):Promise.resolve()}about(){let e=[];if(e.push("Input Jax: "+this.document.inputJax.map(i=>i.name).join(", ")),e.push("Output Jax: "+this.document.outputJax.name),e.push("Document Type: "+this.document.kind),me&&me.loader){e.push("<hr/>Modules Loaded:");let i=me._.components.package.Package,r=me.loader.versions;for(let s of Array.from(i.packages.keys()).sort(this.sortPackages)){let n=r.get(i.resolvePath(s));n&&e.push(`&#xA0;&#xA0;&#xA0;&#xA0;${s} <mjx-v>(${n})</mjx-v>`)}}Us.post({title:"MathJax <mjx-v>v"+We.version+"</mjx-v>",message:e.join("<br/>"),adaptor:this.document.adaptor,styles:{".mjx-dialog":{"max-height":"calc(min(20em, 85%))"},"mjx-dialog > div":{"white-space":"nowrap"},"dialog.mjx-dialog-help > mjx-dialog > div":{"white-space":"normal"},"mjx-v":{"font-size":"80%"}},extraNodes:[this.document.adaptor.node("a",{href:"https://www.mathjax.org","data-drag":"false",target:"_blank"},[this.document.adaptor.text("https://www.mathjax.org")])]})}sortPackages(e,i){let[r,s]=e.includes("/")?e.split(/\//):["",e],[n,a]=i.includes("/")?i.split(/\//):["",i];return r===n?s<a?-1:1:r.charAt(0)==="["?n.charAt(0)==="["&&r<n?-1:1:n.charAt(0)==="["||r<n?-1:1}help(){Us.post({title:"MathJax Help",message:["<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(`
226
+ `),adaptor:this.document.adaptor,extraNodes:[this.document.adaptor.node("a",{href:"https://www.mathjax.org","data-drag":"none"},[this.document.adaptor.text("https://www.mathjax.org")])]})}mathMLCode(){ts.post({title:"MathJax MathML Expression",message:this.menu.mathItem?this.toMML(this.menu.mathItem):"",adaptor:this.document.adaptor,code:!0})}originalText(){ts.post({title:"MathJax Original Source",message:this.menu.mathItem?.math??"",adaptor:this.document.adaptor,code:!0})}annotationBox(){ts.post({title:"MathJax Annotation Text",message:Zh,adaptor:this.document.adaptor,code:!0})}svgImage(){return Ea(this,void 0,void 0,function*(){ts.post({title:"MathJax SVG Image",message:yield this.toSVG(this.menu.mathItem),adaptor:this.document.adaptor,code:!0})})}speechText(){ts.post({title:"MathJax Speech Text",message:this.menu.mathItem?.outputData?.speech??"",adaptor:this.document.adaptor,code:!0})}brailleText(){ts.post({title:"MathJax Braille Text",message:this.menu.mathItem?.outputData?.braille??"",adaptor:this.document.adaptor,code:!0})}errorMessage(){ts.post({title:"MathJax Error Message",message:this.menu.mathItem?this.menu.errorMsg:"",adaptor:this.document.adaptor,code:!0})}zoomBox(){let e="";if(this.menu.mathItem){let i=this.menu.mathItem.typesetRoot,r=this.document.adaptor.fontSize(i),s=i.cloneNode(!0);s.style.margin="0",e=`<div style="font-size: ${r*parseFloat(this.settings.zscale)/100}px">${s.outerHTML}</div>`}Us.post({title:"MathJax Zoomed Expression",message:e,adaptor:this.document.adaptor,styles:{"mjx-dialog > div":{padding:"1.8em"}}})}constructor(e,i={}){this.settings=null,this.defaultSettings=null,this.menu=null,this.current=null,this.MmlVisitor=new m8,this.initialized=!1,this.jax={CHTML:null,SVG:null},this.rerenderStart=z.LAST,this.requiredExtensions=[],this.document=e,this.options=fi(Xe({},this.constructor.OPTIONS),i),this.initSettings(),this.mergeUserSettings(),this.initMenu(),this.applySettings(),this.initialized=!0}initSettings(){this.settings=this.options.settings,this.jax=this.options.jax;let 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=e.options.linebreaks?.inline,this.defaultSettings=Object.assign({},this.document.options.a11y,this.settings),this.setA11y({roleDescription:this.settings.roleDescription})}initMenu(){let e=new c8([["contextMenu",us.fromJson.bind(us)],["radioCompare",cu.fromJson.bind(cu)]]);this.menu=e.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",s=>this.setRenderer(s)),this.variable("overflow",s=>this.setOverflow(s)),this.variable("breakInline",s=>this.setInlineBreaks(s)),this.variable("alt"),this.variable("cmd"),this.variable("ctrl"),this.variable("shift"),this.variable("scale",s=>this.setScale(s)),this.a11yVar("speech",s=>this.setSpeech(s)),this.a11yVar("braille",s=>this.setBraille(s)),this.variable("brailleCode",s=>this.setBrailleCode(s)),this.a11yVar("brailleSpeech",s=>this.setBrailleSpeech(s)),this.a11yVar("brailleCombine",s=>this.setBrailleCombine(s)),this.a11yVar("highlight",s=>this.setHighlight(s)),this.a11yVar("backgroundColor",s=>this.setColor("bg",s)),this.a11yVar("backgroundOpacity",s=>this.setColor("bg",null,s)),this.a11yVar("foregroundColor",s=>this.setColor("fg",s)),this.a11yVar("foregroundOpacity",s=>this.setColor("fg",null,s)),this.a11yVar("subtitles"),this.a11yVar("viewBraille"),this.a11yVar("voicing"),this.a11yVar("roleDescription",()=>this.setRoleDescription()),this.a11yVar("help"),this.a11yVar("locale",s=>this.setLocale(s)),this.variable("speechRules",s=>{let[n,a]=s.split("-");this.document.options.sre.domain=n,this.document.options.sre.style=a,this.rerender(z.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",s=>this.setCollapsible(s)),this.variable("enrich",s=>this.setEnrichment(s)),this.a11yVar("inTabOrder",s=>this.setTabOrder(s)),this.a11yVar("tabSelects"),this.variable("assistiveMml",s=>this.setAssistiveMml(s))],items:[this.submenu("Show","Show Math As",[this.command("MathMLcode","MathML Code",()=>this.mathMLCode()),this.command("Original","Original Form",()=>this.originalText()),this.rule(),this.command("Speech","Speech Text",()=>this.speechText(),{disabled:!0}),this.command("Braille","Braille Code",()=>this.brailleText(),{disabled:!0}),this.command("SVG","SVG Image",()=>this.svgImage(),{disabled:!0}),this.submenu("ShowAnnotation","Annotation"),this.rule(),this.command("Error","Error Message",()=>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.rule(),this.radioGroup("zoom",[["Click"],["DoubleClick","Double-Click"],["NoZoom","No Zoom"]]),this.rule(),this.label("TriggerRequires","Trigger Requires:"),this.checkbox(ba?"Option":"Alt",ba?"Option":"Alt","alt"),this.checkbox("Command","Command","cmd",{hidden:!ba}),this.checkbox("Control","Control","ctrl",{hidden:ba}),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","   Accessibility:"),this.submenu("Speech","    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","    Braille",[this.checkbox("Generate","Generate","braille"),this.checkbox("Subtitles","Show Subtitles","viewBraille"),this.checkbox("BrailleSpeech","Replace Speech","brailleSpeech",{hidden:!0}),this.checkbox("BrailleCombine","Combine with Speech","brailleCombine"),this.rule(),this.label("Code","Code Format:"),this.radioGroup("brailleCode",[["nemeth","Nemeth"],["ueb","UEB"],["euro","Euro"]])]),this.submenu("Explorer","    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","    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.about()),this.command("Help","MathJax Help",()=>this.help())]});let i=this.menu;i.settings=this.settings,i.findID("Settings","Overflow","Elide").disable(),i.findID("Braille","ueb").hide(),i.setJax(this.jax),this.checkLoadableItems();let r=[];us.DynamicSubmenus.set("ShowAnnotation",[Yb(()=>this.annotationBox(),this.options.annotationTypes,r),""]),us.DynamicSubmenus.set("CopyAnnotation",[Zb(r),""]),u8(this.document.document)}checkLoadableItems(){if(me&&me._&&me.loader&&me.startup){let e=this.settings,i=this.document.options;(e.enrich||e.speech&&i.enableSpeech||e.braille&&i.enableBraille)&&!me._?.a11y?.explorer&&this.loadA11y("explorer"),e.collapsible&&!me._?.a11y?.complexity&&this.loadA11y("complexity"),e.assistiveMml&&!me._?.a11y?.["assistive-mml"]&&this.loadA11y("assistive-mml")}else{let e=this.menu;for(let i of Object.keys(this.jax))this.jax[i]||e.findID("Settings","Renderer",i).disable();e.findID("Speech").disable(),e.findID("Braille").disable(),e.findID("Explorer").disable(),e.findID("Options","AutoCollapse").disable(),e.findID("Options","Collapsible").disable(),e.findID("Options","Enrich").disable(),e.findID("Options","AssistiveMml").disable()}}enableAccessibilityItems(e,i){let r=this.menu.findID(e).submenu;for(let s of r.items.slice(1))s instanceof Nh||(i&&(!(s instanceof Qn)||s.submenu.items.length)?s.enable():s.disable())}mergeUserSettings(){try{let e=localStorage.getItem(qt.MENU_STORAGE);if(!e)return;let i=JSON.parse(e);Object.assign(this.settings,i),this.setA11y(i)}catch(e){console.log("MathJax localStorage error: "+e.message)}}saveUserSettings(){let e={};for(let i of Object.keys(this.settings))this.settings[i]!==this.defaultSettings[i]&&(e[i]=this.settings[i]);try{Object.keys(e).length?localStorage.setItem(qt.MENU_STORAGE,JSON.stringify(e)):localStorage.removeItem(qt.MENU_STORAGE)}catch(i){console.log("MathJax localStorage error: "+i.message)}}setA11y(e){me._?.a11y?.explorer&&me._.a11y.explorer_ts.setA11yOptions(this.document,e)}getA11y(e){if(me._?.a11y?.explorer)return this.document.options.a11y[e]===void 0?this.document.options.sre[e]:this.document.options.a11y[e]}applySettings(){this.setTabOrder(this.settings.inTabOrder);let e=this.document.options;e.enableAssistiveMml=this.settings.assistiveMml,this.enableAccessibilityItems("Speech",this.settings.speech),this.enableAccessibilityItems("Braille",this.settings.braille),this.setAccessibilityMenus();let i=this.settings.renderer.replace(/[^a-zA-Z0-9]/g,"")||"CHTML";(qt._loadingPromise||Promise.resolve()).then(()=>{let r=this.settings;if(this.applyRendererOptions(this.document.outputJax),!r.speechRules){let s=this.document.options.sre;r.speechRules=`${s.domain||"clearspeak"}-${s.style||"default"}`}i!==this.defaultSettings.renderer&&this.document.whenReady(()=>this.setRenderer(i,!1))})}setOverflow(e){this.document.outputJax.options.displayOverflow=e.toLowerCase(),!qt.loading&&this.initialized&&this.document.rerenderPromise()}setInlineBreaks(e){this.document.outputJax.options.linebreaks.inline=e,!qt.loading&&this.initialized&&this.document.rerenderPromise()}setScale(e){this.document.outputJax.options.scale=parseFloat(e),!qt.loading&&this.initialized&&this.document.rerenderPromise()}setRenderer(e,i=!0){if(Object.hasOwn(this.jax,e)&&this.jax[e])return this.applyRendererOptions(this.jax[e]),this.setOutputJax(e,i);let r=e.toLowerCase();return new Promise((s,n)=>{this.loadComponent("output/"+r,()=>{let a=me.startup;if(!(r in a.constructors))return n(Error(`Component ${r} not loaded`));a.useOutput(r,!0),a.output=this.applyRendererOptions(a.getOutputJax()),a.output.setAdaptor(this.document.adaptor),a.output.initialize(),this.jax[e]=a.output,this.setOutputJax(e,i).then(()=>s()).catch(o=>n(o))})})}applyRendererOptions(e){let i=this.settings,r=e.options;return r.scale=parseFloat(i.scale),r.displayOverflow=i.overflow.toLowerCase(),r.linebreaks&&(r.linebreaks.inline=i.breakInline),e}setOutputJax(e,i=!0){this.jax[e].setAdaptor(this.document.adaptor),this.document.outputJax=this.jax[e];let r=this.loadRequiredExtensions();return i?r.then(()=>We.handleRetriesFor(()=>this.rerender())):r.then(()=>{})}loadRequiredExtensions(){let e=this.document.outputJax.name.toLowerCase(),i=[];for(let r of this.requiredExtensions)i.push(me.loader.load(`[${r}]/${e}`));return this.requiredExtensions=[],Promise.all(i)}addRequiredExtensions(e){if(e){let i=new Set([...this.requiredExtensions,...e]);this.requiredExtensions=[...i]}}setTabOrder(e){let i=this.menu.findID("Options","TabSelects");e?i.enable():i.disable(),this.menu.store.inTaborder(e)}setAssistiveMml(e){this.document.options.enableAssistiveMml=e,e&&this.noRerender(()=>{this.settings.speech&&this.menu.pool.lookup("speech").setValue(!1),this.settings.braille&&this.menu.pool.lookup("braille").setValue(!1)}),!e||me._?.a11y?.["assistive-mml"]?this.rerender():this.loadA11y("assistive-mml")}setAccessibilityMenus(){let e=this.settings.enrich,i=e?"enable":"disable";["Speech","Braille","Explorer"].forEach(s=>this.menu.findID(s)[i]());let r=this.document.options;r.enableSpeech=r.enableBraille=r.enableExplorer=e,e||(this.settings.collapsible=!1,this.document.options.enableCollapsible=!1)}setSpeech(e){this.enableAccessibilityItems("Speech",e),this.document.options.enableSpeech=e,e&&(this.settings.assistiveMml&&this.noRerender(()=>this.menu.pool.lookup("assistiveMml").setValue(!1)),this.settings.brailleSpeech&&this.noRerender(()=>this.menu.pool.lookup("brailleSpeech").setValue(!1))),!e||me._?.a11y?.explorer?this.rerender(z.COMPILED):this.loadA11y("explorer")}setBraille(e){this.enableAccessibilityItems("Braille",e),this.document.options.enableBraille=e,e&&this.settings.assistiveMml&&this.noRerender(()=>this.menu.pool.lookup("assistiveMml").setValue(!1)),!e||me._?.a11y?.explorer?this.rerender(z.COMPILED):this.loadA11y("explorer")}setBrailleCode(e){this.document.options.sre.braille=e,this.rerender(z.COMPILED)}setBrailleSpeech(e){e&&this.settings.speech?this.noRerender(()=>this.menu.pool.lookup("speech").setValue(!1)):this.enableAccessibilityItems("Speech",!0),this.settings.brailleCombine=this.document.options.a11y.brailleCombine=!1,this.rerender(z.COMPILED)}setBrailleCombine(e){this.settings.brailleSpeech&&this.menu.pool.lookup("brailleSpeech").setValue(!1),this.settings.brailleSpeech=this.document.options.a11y.brailleSpeech=!1,this.rerender(z.COMPILED)}setLocale(e){this.document.options.sre.locale=e,this.rerender(z.COMPILED)}setRoleDescription(){this.rerender(z.COMPILED)}setEnrichment(e){this.document.options.enableEnrichment=e,this.setAccessibilityMenus(),!e||me._?.a11y?.explorer?this.rerender(z.COMPILED):this.loadA11y("explorer")}setCollapsible(e){this.document.options.enableComplexity=e,e&&!this.settings.enrich&&(this.settings.enrich=this.document.options.enableEnrichment=!0,this.setAccessibilityMenus()),e||this.menu.pool.lookup("highlight").setValue("None"),!e||me._?.a11y?.complexity?this.rerender(z.COMPILED):this.loadA11y("complexity")}setHighlight(e){var i,r;if(e!=="None"){if(!this.settings.collapsible){let s=this.menu.pool.lookup("collapsible");s.setValue(!0),(r=(i=s.items[0])?.executeCallbacks_)==null||r.call(i)}qt.loadingPromises.has("a11y/complexity")||this.rerender(z.COMPILED)}}setColor(e,i,r){let s=this.document.options.a11y;i||(i=s[e==="fg"?"foregroundColor":"backgroundColor"]),r||(r=s[e==="fg"?"foregroundOpacity":"backgroundOpacity"]),me._.a11y.explorer.Region.LiveRegion.setColor(e,1,i.toLowerCase(),parseInt(r)/100)}scaleAllMath(){let e=(parseFloat(this.settings.scale)*100).toFixed(1).replace(/.0$/,""),i=prompt("Scale all mathematics (compared to surrounding text) by",e+"%");if(this.current){let r=this.menu.mathItem.explorers.speech;r.refocus=this.current,r.focus()}if(i)if(i.match(/^\s*\d+(\.\d*)?\s*%?\s*$/)){let r=parseFloat(i)/100;r?this.menu.pool.lookup("scale").setValue(String(r)):alert("The scale should not be zero")}else alert("The scale should be a percentage (e.g., 120%)")}resetDefaults(){this.noRerender(()=>{let e=this.menu.pool,i=this.defaultSettings;for(let r of Object.keys(i)){let s=e.lookup(r);if(s){if(s.getValue()!==i[r]){s.setValue(i[r]);let n=s.items[0];n&&n.executeCallbacks_()}}else Object.hasOwn(this.settings,r)&&(this.settings[r]=i[r])}}),this.rerender(z.COMPILED)}checkComponent(e){let i=qt.loadingPromises.get(e);i&&We.retryAfter(i)}loadComponent(e,i){if(qt.loadingPromises.has(e))return;let r=me.loader;if(!r)return;qt.loading++;let s=r.load(e).then(()=>{qt.loading--,qt.loadingPromises.delete(e),qt.loading===0&&qt._loadingPromise&&(qt._loadingPromise=null,qt._loadingOK()),i()}).catch(n=>{qt._loadingPromise?(qt._loadingPromise=null,qt._loadingFailed(n)):console.log(n)});qt.loadingPromises.set(e,s)}loadA11y(e){let i=!z.ENRICHED;this.loadComponent("a11y/"+e,()=>{let r=me.startup;We.handlers.unregister(r.handler),r.handler=r.getHandler(),We.handlers.register(r.handler);let s=this.document;this.document=r.document=r.getDocument(),this.document.processed=s.processed,this.document.menu=this,s.webworker&&(this.document.webworker=s.webworker),this.setA11y(this.settings),this.defaultSettings=Object.assign({},this.document.options.a11y,me.config?.options?.a11y||{},this.defaultSettings),this.document.outputJax.reset(),this.transferMathList(s),this.document.processed=s.processed,qt._loadingPromise||(this.document.outputJax.reset(),We.handleRetriesFor(()=>{this.rerender(e==="complexity"||i?z.COMPILED:z.TYPESET)}))})}transferMathList(e){let i=this.document.options.MathItem;for(let r of e.math){let s=new i;Object.assign(s,r),this.document.math.push(s)}}toMML(e){return this.MmlVisitor.visitTree(e.root,e,{filterSRE:!this.settings.showSRE,filterTex:!this.settings.showTex,texHints:this.settings.texHints,semantics:this.settings.semantics&&e.inputJax.name!=="MathML"})}toSVG(e){return Ea(this,void 0,void 0,function*(){let i=this.jax.SVG;if(!i)return"SVG can't be produced.<br>Try switching to SVG output first.";let r=i.adaptor,s=i.options.fontCache,n=!!e.root.getProperty("process-breaks");if(s!=="global"&&(e.display||!n)&&r.getAttribute(e.typesetRoot,"jax")==="SVG"){for(let a of r.childNodes(e.typesetRoot))if(r.kind(a)==="svg")return this.formatSvg(r.serializeXML(a))}return this.typesetSVG(e,s,n)})}typesetSVG(e,i,r){return Ea(this,void 0,void 0,function*(){let s=this.jax.SVG,n=s.html("div");i==="global"&&(s.options.fontCache="local");let a=e.root;return e.root=a.copy(!0),e.root.setInheritedAttributes({},e.display,0,!1),r&&(s.unmarkInlineBreaks(e.root),e.root.setProperty("inlineMarked",!1)),yield We.handleRetriesFor(()=>{s.toDOM(e,n,s.document)}),e.root=a,s.options.fontCache=i,this.formatSvg(s.adaptor.serializeXML(n))})}formatSvg(e){let i=this.constructor.SvgCss;e=e.match(/^<svg.*?><defs>/)?e.replace(/<defs>/,`<defs><style>${i}</style>`):e.replace(/^(<svg.*?>)/,`$1<defs><style>${i}</style></defs>`),e=e.replace(/ (?:role|focusable)=".*?"/g,"").replace(/"currentColor"/g,'"black"');let r=e.split(/(<\/?[a-zA-Z].*?>)/);for(let s=2,n="";s<r.length;s+=2){let a=r[s-1],o=r[s+1];a.charAt(1)!=="/"&&a.charAt(a.length-2)!=="/"&&(n+=" "),o&&(o.charAt(1)==="/"&&(n=n.slice(2)),r[s+1]=o.replace(' xmlns:xlink="http://www.w3.org/1999/xlink"',"")),r[s]&&(r[s]=`
227
+ `+n+r[s].replace(/\n/g,`
228
+ `+n)),r[s]+=`
229
+ `+n}return e=r.join(""),this.settings.showSRE||(e=e.replace(/ (?:data-semantic-.*?|data-speech-node)=".*?"/g,"")),this.settings.showTex||(e=e.replace(/ data-latex(?:-item)?=".*?"/g,"")),this.settings.texHints||(e=e.replace(/ data-mjx-(?:texclass|alternate|variant|pseudoscript|smallmatrix|mathaccent|auto-op|script-align|vbox)=".*?"/g,"").replace(/ data-mml-node="TeXAtom"/g,"")),`${f8}
230
+ ${e}`}zoom(e,i){(!e||this.isZoomEvent(e,i))&&this.zoomBox()}isZoomEvent(e,i){return this.settings.zoom===i&&(!this.settings.alt||e.altKey)&&(!this.settings.ctrl||e.ctrlKey)&&(!this.settings.cmd||e.metaKey)&&(!this.settings.shift||e.shiftKey)}rerender(e=z.TYPESET){this.rerenderStart=Math.min(e,this.rerenderStart),!qt.loading&&me.startup.hasTypeset&&this.document.whenReady(()=>Ea(this,void 0,void 0,function*(){this.rerenderStart<=z.COMPILED&&this.document.reset({inputJax:[]}),yield this.document.rerenderPromise(this.rerenderStart),this.rerenderStart=z.LAST}))}noRerender(e){qt.loading++;try{e(),qt.loading--}catch(i){throw qt.loading--,i}}copyMathML(){as(this.toMML(this.menu.mathItem))}copyOriginal(){as(this.menu.mathItem.math.trim())}copySvgImage(){this.toSVG(this.menu.mathItem).then(e=>{as(e)})}copySpeechText(){as(this.menu.mathItem.outputData.speech)}copyBrailleText(){as(this.menu.mathItem.outputData.braille)}copyErrorMessage(){as(this.menu.errorMsg.trim())}addMenu(e){this.addEvents(e),this.menu.store.insert(e.typesetRoot),e.typesetRoot.tabIndex=this.settings.inTabOrder?0:-1}addEvents(e){let i=e.typesetRoot;i.addEventListener("mousedown",()=>{this.menu.mathItem=e,this.current=e.explorers?.speech?.current},!0),i.addEventListener("contextmenu",()=>{this.menu.mathItem=e;let r=e.explorers?.speech;r&&(e.outputData.nofocus=!this.current,r.refocus=this.current)},!0),i.addEventListener("keydown",()=>this.menu.mathItem=e,!0),i.addEventListener("click",r=>this.zoom(r,"Click"),!0),i.addEventListener("dblclick",r=>this.zoom(r,"DoubleClick"),!0)}clear(){this.menu.store.clear()}variable(e,i){return{name:e,getter:()=>this.settings[e],setter:r=>{this.settings[e]=r,i&&i(r),this.saveUserSettings()}}}a11yVar(e,i){return{name:e,getter:()=>this.getA11y(e),setter:r=>{this.settings[e]=r,this.setA11y({[e]:r}),i&&i(r),this.saveUserSettings()}}}submenu(e,i,r=[],s=!1){let n=[];for(let a of r)Array.isArray(a)?n=n.concat(a):n.push(a);return{type:"submenu",id:e,content:i,menu:{items:n},disabled:n.length===0||s}}command(e,i,r,s={}){return Object.assign({type:"command",id:e,content:i,action:r},s)}checkbox(e,i,r,s={}){return Object.assign({type:"checkbox",id:e,content:i,variable:r},s)}radioGroup(e,i){return i.map(r=>this.radio(r[0],r[1]||r[0],e))}radio(e,i,r,s={}){return Object.assign({type:"radio",id:e,content:i,variable:r},s)}label(e,i){return{type:"label",id:e,content:i}}rule(){return{type:"rule"}}};Mi.MENU_STORAGE="MathJax-Menu-Settings",Mi.OPTIONS={settings:{showSRE:!1,showTex:!1,texHints:!0,semantics:!1,zoom:"NoZoom",zscale:"200%",renderer:"CHTML",alt:!0,cmd:!1,ctrl:!1,shift:!1,scale:1,overflow:"Scroll",breakInline:!0,autocollapse:!1,collapsible:!1,enrich:!0,assistiveMml:!1,speech:!0,braille:!0,brailleCode:"nemeth",brailleSpeech:!1,brailleCombine:!1,speechRules:"clearspeak-default",roleDescription:"math",inTabOrder:!0,tabSelects:"all",help:!0},jax:{CHTML:null,SVG:null},annotationTypes:qe({TeX:["TeX","LaTeX","application/x-tex"],StarMath:["StarMath 5.0"],Maple:["Maple"],ContentMathML:["MathML-Content","application/mathml-content+xml"],OpenMath:["OpenMath"]})},Mi.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(`
231
+ `),Mi.loading=0,Mi.loadingPromises=new Map,Mi._loadingPromise=null,Mi._loadingOK=null,Mi._loadingFailed=null;var g8=class extends ta{constructor(t,e,i,r,s,n){super(t,e,r,s),this.attachMenu(n);let a=n.factory;this.selections=i.map(o=>a.get("selectionMenu")(a,o,this))}post(){let t=Array.from(Object.values(this.menu.jax)).filter(i=>!!i)[0],e=new Us({title:this.title,message:"",adaptor:t.adaptor,styles:{"mjx-dialog > div":{padding:0}}});e.attach(),this.contentDiv=e.content,this.display()}display(){let t=this;if(t.order(),!this.selections.length)return;let e=[],i=0,r=[],s=t.getChunkSize(this.selections.length);for(let n=0;n<this.selections.length;n+=s){let a=this.selections.slice(n,n+s),[o,h,d,p]=t.rowDiv(a);e.push(o),i=Math.max(i,h),a.forEach(E=>E.html.style.height=d+"px"),r=t.combineColumn(r,p)}t._balanced&&(t.balanceColumn(e,r),i=r.reduce((n,a)=>n+a-2,20)),e.forEach(n=>n.style.width=i+"px")}},O1=function(t,e,i,r){function s(n){return n instanceof i?n:new i(function(a){a(n)})}return new(i||(i=Promise))(function(n,a){function o(p){try{d(r.next(p))}catch(E){a(E)}}function h(p){try{d(r.throw(p))}catch(E){a(E)}}function d(p){p.done?n(p.value):s(p.value).then(o,h)}d((r=r.apply(t,e||[])).next())})},ya={},hl=null;function M1(t){let e=t?.match(/^clearspeak-(.*)/);return hl=(e&&e[1])??hl??"default",hl}function b8(t,e){let i=t.pool.lookup("speechRules");ya=Hp(M1(t.settings.speechRules));for(let r of e)t.factory.get("variable")(t.factory,{name:"csprf_"+r,setter:s=>{ya[r]=s,i.setValue("clearspeak-"+Mg(ya))},getter:()=>ya[r]||"Auto"},t.pool)}var ea=new Map;function E8(t,e){return O1(this,void 0,void 0,function*(){ea.has(e)||(yield t.mathItem.generatorPool.getLocalePreferences(ea))})}var cl=new Map,y8=0;function x8(t,e){let i=ea.get(e);b8(t,Object.keys(i));let r=[];for(let n of Object.getOwnPropertyNames(i))r.push({title:n,values:i[n].map(a=>a.replace(RegExp("^"+n+"_"),"")),variable:"csprf_"+n});let s=new g8("Clearspeak Preferences","",r,"alphabetical","square",t);return{type:"command",id:"ClearspeakPreferences",content:"Select Preferences",action:()=>s.post()}}function N8(t){return[{type:"radio",content:"No Preferences",id:"clearspeak-default",variable:"speechRules"},{type:"radio",content:"Current Preferences",id:"clearspeak-"+t,variable:"speechRules"},{type:"rule"}]}function v8(t,e,i){let r=ea.get(i);return[{type:"label",content:"Preferences for "+e},{type:"rule"}].concat(r[e].map(function(s){let[n,a]=s.split("_");return{type:"radioCompare",content:a,id:"clearspeak-"+Og(t,n,a),variable:"speechRules",comparator:(o,h)=>{if(o===h)return!0;if(a!=="Auto")return!1;let[d,p]=o.split("-"),[E]=h.split("-");return d===E&&!Hp(p)[n]}}}))}function T8(t,e,i){return O1(this,void 0,void 0,function*(){let r=o=>{i(t.factory.get("subMenu")(t.factory,{items:o,id:"Clearspeak"},e))};if(!t.settings.speech||!t.settings.enrich){r([]);return}let s=t.pool.lookup("locale").getValue();if(yield E8(t,s),!ea.get(s)){r([]);return}let n=x8(t,s),a=[];if(t.settings.speech){let o=t.mathItem,h=o?.explorers?.speech,d=M1(t.settings.speechRules);a=a.concat(N8(d));let p=h?.refocus?.getAttribute("data-semantic-id")??null,E=y8++;yield o.generatorPool.getRelevantPreferences(o,p,cl,E);let y=cl.get(E);if(cl.delete(E),y){let A=v8(d,y,s);a=a.concat(A)}}a.splice(2,0,n),r(a)})}us.DynamicSubmenus.set("Clearspeak",[T8,"speech"]);var xa=null;function C8(t,e,i){if(xa){i(xa);return}let r=[];for(let s of Hc.keys())s==="nemeth"||s==="euro"||r.push({type:"radio",id:s,content:Hc.get(s)||s,variable:"locale"});r.sort((s,n)=>s.content.localeCompare(n.content,"en")),xa=t.factory.get("subMenu")(t.factory,{items:r,id:"Language"},e),i(xa)}us.DynamicSubmenus.set("A11yLanguage",[C8,"speech"]),Js("CONTEXT_MENU",170);function S8(t){return class extends t{addMenu(e,i=!1){this.state()>=z.CONTEXT_MENU||(!this.isEscaped&&(e.options.enableMenu||i)&&e.menu.addMenu(this),this.state(z.CONTEXT_MENU))}getMenus(e){e.menu.menu.store.sort()}checkLoading(e){e.checkLoading()}}}function A8(t){var e=class extends t{constructor(...i){super(...i),this.menu=new this.options.MenuClass(this,this.options.menuOptions);let r=this.constructor.ProcessBits;r.has("context-menu")||r.allocate("context-menu"),this.options.MathItem=S8(this.options.MathItem);let s=this.menu.settings,n=this.options,a=n.enableEnrichment=s.enrich;n.enableSpeech=s.speech&&a,n.enableBraille=s.braille&&a,n.enableComplexity=s.collapsible&&a,n.enableExplorer=a}addMenu(){if(!this.processed.isSet("context-menu")){for(let i of this.math)i.addMenu(this);this.processed.set("context-menu")}return this}getMenus(){this.menu.menu.store.sort()}checkLoading(){let i=!0;try{this._checkLoading(),i=!1}catch(r){if(!r.retry)throw r}return i}_checkLoading(){return this.menu.isLoading&&We.retryAfter(this.menu.loadingPromise.catch(i=>console.log(i))),this.options.enableComplexity&&this.menu.checkComponent("a11y/complexity"),this.options.enableExplorer&&this.menu.checkComponent("a11y/explorer"),this}state(i,r=!1){return super.state(i,r),i<z.CONTEXT_MENU&&this.processed.clear("context-menu"),this}};return e.OPTIONS=Object.assign(Object.assign({enableEnrichment:!0,enableComplexity:!0,enableSpeech:!0,enableBraille:!0,enableExplorer:!0,enableExplorerHelp:!0,enrichSpeech:"none",enrichError:(i,r,s)=>console.warn("Enrichment Error:",s)},t.OPTIONS),{MenuClass:Mi,menuOptions:Mi.OPTIONS,enableMenu:!0,sre:t.OPTIONS.sre||qe({}),a11y:t.OPTIONS.a11y||qe({}),renderActions:qe(Object.assign(Object.assign({},t.OPTIONS.renderActions),{addMenu:[z.CONTEXT_MENU],getMenus:[z.INSERTED+5,!1],checkLoading:[z.UNPROCESSED+1,i=>i.checkLoading(),"",!1]}))}),e}function L8(t){return t.documentClass=A8(t.documentClass),t}var R8={name:"mathjax-mhchem",variants:{"[+]":[["-mhchem","normal"]]},chars:G1({M:{"-mhchem":{58368:[.369,.098,.736],58369:[.368,.095,.744],58370:[.369,.098,.514],58371:[.369,-.131,.343],58372:[.598,-.131,.515],58373:[.594,-.131,.741],58374:[.598,-.131,.736],58376:[.6,.099,1.463],58377:[.594,.098,1.463],58378:[.598,.095,1.463],58384:[.274,-.226,.828],58385:[.369,-.131,.828],58386:[.464,-.036,.828],58387:[.464,-.036,.828],58400:[.51,.01,.507],58401:[.274,-.226,.337],58402:[.51,.01,.507],58403:[.432,.172,.515],58404:[.432,-.065,.343],58405:[.669,-.065,.514],58408:[.51,.01,1.463],58409:[.51,.01,1.463],58410:[.51,.01,1.463],58411:[.671,.171,1.463],58412:[.51,.01,1],58413:[.51,.01,1],58414:[.51,.01,1]}},N:{normal:{}}},"MHC"),delimiters:{58376:{dir:j,stretch:[58370,58371,58372],stretchv:[-1,-1,-1],HDW:[.598,.098,0],hd:[.369,-.131]},58377:{dir:j,stretch:[58368,58371,58373],stretchv:[-1,-1,-1],HDW:[.594,.098,0],hd:[.369,-.131]},58378:{dir:j,stretch:[58369,58371,58374],stretchv:[-1,-1,-1],HDW:[.598,.095,0],hd:[.369,-.131]},58408:{dir:j,stretch:[58400,58401],stretchv:[-1,-1],HDW:[.51,.01,0],hd:[.274,-.226]},58409:{dir:j,stretch:[0,58401,58402],stretchv:[0,-1,-1],HDW:[.51,.01,0],hd:[.274,-.226]},58410:{dir:j,stretch:[58400,58401,58402],stretchv:[-1,-1,-1],HDW:[.51,.01,0],hd:[.274,-.226]},58411:{dir:j,stretch:[58403,58404,58405],stretchv:[-1,-1,-1],HDW:[.669,.172,0],hd:[.432,-.065]},58412:{dir:j,sizes:[0],stretch:[58400,58401],stretchv:[-1,-1],HDW:[.51,.01,0],hd:[.274,-.226]},58413:{dir:j,sizes:[0],stretch:[0,58401,58402],stretchv:[0,-1,-1],HDW:[.51,.01,0],hd:[.274,-.226]},58414:{dir:j,sizes:[0],stretch:[58400,58401,58402],stretchv:[-1,-1,-1],HDW:[.51,.01,0],hd:[.274,-.226]}},sizeVariants:{"[+]":["-mhchem"]},stretchVariants:{"[+]":["-mhchem"]},fonts:["MJX-MHC-M","MJX-MHC-N"]},w8="https://cdn.jsdelivr.net/npm/@mathjax/mathjax-newcm-font@4.1.3/chtml/woff2",I8="https://cdn.jsdelivr.net/npm/@mathjax/mathjax-mhchem-font-extension@4.1.3/chtml/woff2",du="https://cdn.jsdelivr.net/npm/@mathjax/src@4.1.3/bundle/sre",D1={PUA:()=>kt(()=>import("./PUA-tLuTiQ7--f2b27953.js"),[],import.meta.url),"accents-b-i":()=>kt(()=>import("./accents-b-i-CngHZsLL-e0eb98fd.js"),[],import.meta.url),accents:()=>kt(()=>import("./accents-BTUYmhn9-cafeb96e.js"),[],import.meta.url),arabic:()=>kt(()=>import("./arabic-BzEHMVZD-30ac1ade.js"),[],import.meta.url),arrows:()=>kt(()=>import("./arrows-VjxlU-jv-2e17c192.js"),[],import.meta.url),"braille-d":()=>kt(()=>import("./braille-d-Dk6J96GO-d832bfbf.js"),[],import.meta.url),braille:()=>kt(()=>import("./braille-BeWC_Ruq-a3bb8ef9.js"),[],import.meta.url),calligraphic:()=>kt(()=>import("./calligraphic-Cew9cU3x-04cf0735.js"),[],import.meta.url),cherokee:()=>kt(()=>import("./cherokee-Cny3FYho-4da7d2f3.js"),[],import.meta.url),"cyrillic-ss":()=>kt(()=>import("./cyrillic-ss-lU7bNGG9-12eb0188.js"),[],import.meta.url),cyrillic:()=>kt(()=>import("./cyrillic-CfCDulXU-5550df0b.js"),[],import.meta.url),devanagari:()=>kt(()=>import("./devanagari-CDIz2h-r-18c38725.js"),[],import.meta.url),"double-struck":()=>kt(()=>import("./double-struck-BpJEQk8y-500ce8dd.js"),[],import.meta.url),fraktur:()=>kt(()=>import("./fraktur-rLEq9DEH-44cc14d8.js"),[],import.meta.url),"greek-ss":()=>kt(()=>import("./greek-ss-D-EN2PK0-91610739.js"),[],import.meta.url),greek:()=>kt(()=>import("./greek-BlraJTyL-90ce8924.js"),[],import.meta.url),hebrew:()=>kt(()=>import("./hebrew-GiQZeybp-b583f555.js"),[],import.meta.url),"latin-b":()=>kt(()=>import("./latin-b-BhEnC7R2-d13e06ff.js"),[],import.meta.url),"latin-bi":()=>kt(()=>import("./latin-bi-DqiIKv3U-1dec8705.js"),[],import.meta.url),"latin-i":()=>kt(()=>import("./latin-i-B1xtwaE1-21637466.js"),[],import.meta.url),latin:()=>kt(()=>import("./latin-xfWFlLkD-5bcea5cf.js"),[],import.meta.url),marrows:()=>kt(()=>import("./marrows-DD1NgMQi-15b63755.js"),[],import.meta.url),math:()=>kt(()=>import("./math-DpWn1mbG-38eeb914.js"),[],import.meta.url),"monospace-ex":()=>kt(()=>import("./monospace-ex-DcXpouKS-456b403c.js"),[],import.meta.url),"monospace-l":()=>kt(()=>import("./monospace-l-Ct5wkMDs-f34a4a9e.js"),[],import.meta.url),monospace:()=>kt(()=>import("./monospace-D116QD2a-98d484fd.js"),[],import.meta.url),mshapes:()=>kt(()=>import("./mshapes-DCp86WSX-c0055952.js"),[],import.meta.url),"phonetics-ss":()=>kt(()=>import("./phonetics-ss-CRtMn02f-579b6135.js"),[],import.meta.url),phonetics:()=>kt(()=>import("./phonetics-BwOCw2Y9-d2e3af59.js"),[],import.meta.url),"sans-serif-b":()=>kt(()=>import("./sans-serif-b-B0kRKiC--b5530dce.js"),[],import.meta.url),"sans-serif-bi":()=>kt(()=>import("./sans-serif-bi-DXWul6mu-5370dba4.js"),[],import.meta.url),"sans-serif-ex":()=>kt(()=>import("./sans-serif-ex-Boux1kMP-aa178f31.js"),[],import.meta.url),"sans-serif-i":()=>kt(()=>import("./sans-serif-i-676RFaSO-2db54474.js"),[],import.meta.url),"sans-serif-r":()=>kt(()=>import("./sans-serif-r-DrN9xdZt-0fc72eea.js"),[],import.meta.url),"sans-serif":()=>kt(()=>import("./sans-serif-BYPZKlE9-2efdbcd9.js"),[],import.meta.url),script:()=>kt(()=>import("./script-0ohehnXc-526904f4.js"),[],import.meta.url),shapes:()=>kt(()=>import("./shapes-BG47NodJ-d59b0eca.js"),[],import.meta.url),"symbols-b-i":()=>kt(()=>import("./symbols-b-i-eg9k5hmF-9c461ac2.js"),[],import.meta.url),symbols:()=>kt(()=>import("./symbols-BqnUxf_t-83087e87.js"),[],import.meta.url),variants:()=>kt(()=>import("./variants-2LRNhOUP-966fc49d.js"),[],import.meta.url)},uu=class extends jr{constructor(t,...e){super(t),this.factory.configuration.tags.start("multline",!0,e[0])}get kind(){return"multline"}EndEntry(){this.table.length&&Z.fixInitialMO(this.factory.configuration,this.nodes);let 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(this.row.length!==1)throw new M("MultlineRowsOneCol","The rows within the %1 environment must have exactly one column","multline");let t=this.create("node","mtr",this.row);this.table.push(t),this.row=[]}EndTable(){if(super.EndTable(),this.table.length){let t=this.table.length-1,e=-1;C.getAttribute(C.getChildren(this.table[0])[0],"columnalign")||C.setAttribute(C.getChildren(this.table[0])[0],"columnalign",lt.Align.LEFT),C.getAttribute(C.getChildren(this.table[t])[0],"columnalign")||C.setAttribute(C.getChildren(this.table[t])[0],"columnalign",lt.Align.RIGHT);let i=this.factory.configuration.tags.getTag();if(i){e=this.arraydef.side===lt.Align.LEFT?0:this.table.length-1;let r=this.table[e],s=this.create("node","mlabeledtr",[i].concat(C.getChildren(r)));C.copyAttributes(r,s),this.table[e]=s}}this.factory.configuration.tags.end()}},pu=class extends dh{get kind(){return"flalign"}constructor(t,e,i,r,s){super(t),this.name=e,this.numbered=i,this.padded=r,this.center=s,this.factory.configuration.tags.start(e,i,i)}EndEntry(){super.EndEntry();let t=this.getProperty("xalignat");if(t&&this.row.length>t)throw new M("XalignOverflow","Extra %1 in row of %2","&",this.name)}EndRow(){let t,e=this.row,i=this.getProperty("xalignat");for(;e.length<i;)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();let r=this.table[this.table.length-1];if(this.getProperty("zeroWidthLabel")&&r.isKind("mlabeledtr")){let s=C.getChildren(r)[0],n=this.factory.configuration.options.tagSide,a=Object.assign({width:0},n==="right"?{lspace:"-1width"}:{}),o=this.create("node","mpadded",C.getChildren(s),a);s.setChildren([o])}}EndTable(){if(super.EndTable(),this.center&&this.maxrow<=2){let t=this.arraydef;delete t.width,delete this.global.indentalign}}},si;(function(t){t.NEW_DELIMITER="new-Delimiter",t.NEW_COMMAND="new-Command",t.NEW_ENVIRONMENT="new-Environment"})(si||(si={}));var k8=-100,re={GetCSname(t,e){if(t.GetNext()!=="\\")throw new M("MissingCS","%1 must be followed by a control sequence",e);let i=Ot.trimSpaces(t.GetArgument(e)).substring(1);return this.checkProtectedMacros(t,i),i},GetCsNameArgument(t,e){let i=Ot.trimSpaces(t.GetArgument(e));if(i.charAt(0)==="\\"&&(i=i.substring(1)),!i.match(/^(.|[a-z]+)$/i))throw new M("IllegalControlSequenceName","Illegal control sequence name for %1",e);return this.checkProtectedMacros(t,i),i},GetArgCount(t,e){let i=t.GetBrackets(e);if(i&&(i=Ot.trimSpaces(i),!i.match(/^[0-9]+$/)))throw new M("IllegalParamNumber","Illegal number of parameters specified in %1",e);return i},GetTemplate(t,e,i){let r=t.GetNext(),s=[],n=0,a=t.i;for(;t.i<t.string.length;){if(r=t.GetNext(),r==="#"){if(a!==t.i&&(s[n]=t.string.substring(a,t.i)),r=t.string.charAt(++t.i),!r.match(/^[1-9]$/))throw new M("CantUseHash2","Illegal use of # in template for %1",i);if(parseInt(r)!==++n)throw new M("SequentialParam","Parameters for %1 must be numbered sequentially",i);a=t.i+1}else if(r==="{")return a!==t.i&&(s[n]=t.string.substring(a,t.i),s[n].replace(/^ +/,"")===""&&s.slice(0,n).join("")==="")?n:s.length>0?[n.toString()].concat(s):n;t.i++}throw new M("MissingReplacementString","Missing replacement string for definition of %1",e)},GetParameter(t,e,i){if(i==null)return t.GetArgument(e);let r=t.i,s=0,n=!1;for(;t.i<t.string.length;){let a=t.string.charAt(t.i);if(a==="{")n=t.i===r,t.GetArgument(e),s=t.i-r;else{if(this.MatchParam(t,i))return n&&(r++,s-=2),t.string.substring(r,r+s);if(a==="\\"){t.i++,s++,n=!1;let o=t.string.substring(t.i).match(/[a-z]+|./i);o&&(t.i+=o[0].length,s=t.i-r)}else t.i++,s++,n=!1}}throw new M("RunawayArgument","Runaway argument for %1?",e)},MatchParam(t,e){return 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,i){return t.stack.env.isGlobal?t.configuration.packageData.get("begingroup").stack.checkGlobal(e,i):i.map(r=>t.configuration.handlers.retrieve(r))},checkProtectedMacros(t,e){if(t.options.protectedMacros?.includes(e))throw new M("ProtectedMacro","The control sequence %1 can't be redefined",`\\${e}`)},addDelimiter(t,e,i,r){let s=e.substring(1);this.checkProtectedMacros(t,s);let[n,a]=re.checkGlobal(t,[s,e],[si.NEW_COMMAND,si.NEW_DELIMITER]);s!==e&&n.remove(s),a.add(e,new nh(e,i,r)),delete t.stack.env.isGlobal},addMacro(t,e,i,r,s=""){this.checkProtectedMacros(t,e);let n=re.checkGlobal(t,[e],[si.NEW_COMMAND])[0];this.undefineDelimiter(t,"\\"+e),n.add(e,new bs(s||e,i,r)),delete t.stack.env.isGlobal},addEnvironment(t,e,i,r){re.checkGlobal(t,[e],[si.NEW_ENVIRONMENT])[0].add(e,new bs(e,i,r)),delete t.stack.env.isGlobal},undefineMacro(t,e){let i=re.checkGlobal(t,[e],[si.NEW_COMMAND])[0];i.remove(e),t.configuration.handlers.get(ht.MACRO).applicable(e)&&(i.add(e,new bs(e,()=>Xh.FALLBACK,[])),this.undefineDelimiter(t,"\\"+e)),delete t.stack.env.isGlobal},undefineDelimiter(t,e){let i=re.checkGlobal(t,[e],[si.NEW_DELIMITER])[0];i.remove(e),t.configuration.handlers.get(ht.DELIMITER).applicable(e)&&i.add(e,new nh(e,null,{})),delete t.stack.env.isGlobal}};function mu(t){if(!t||t.isInferred&&t.childNodes.length===0)return[null,null];if(t.isKind("msubsup")&&fu(t))return[t,null];let e=C.getChildAt(t,0);return t.isInferred&&e&&fu(e)?(t.childNodes.splice(0,1),[e,t]):[null,t]}function fu(t){let e=t.childNodes[0];return e&&e.isKind("mi")&&e.getText()===""}var rt={AmsEqnArray(t,e,i,r,s,n,a,o){let h=t.GetBrackets("\\begin{"+e.getName()+"}"),d=N.EqnArray(t,e,i,r,s,n,a,o);return Z.setArrayAlign(d,h,t)},AlignAt(t,e,i,r){let s=e.getName(),n,a="",o="",h=[];r||(n=t.GetBrackets("\\begin{"+s+"}"));let d=t.GetArgument("\\begin{"+s+"}");if(d.match(/[^0-9]/))throw new M("PositiveIntegerArg","Argument to %1 must be a positive integer","\\begin{"+s+"}");let p=parseInt(d,10);for(;p>0;)a+="rl",o+="bt",h.push("0em 0em"),p--;let E=h.join(" ");if(r)return rt.EqnArray(t,e,i,r,a,o,E);let y=rt.EqnArray(t,e,i,r,a,o,E);return Z.setArrayAlign(y,n,t)},Multline(t,e,i){Z.checkEqnEnv(t),t.Push(e);let r=t.options.ams.multlineIndent,s=t.itemFactory.create("multline",i,t.stack);return s.arraydef={displaystyle:!0,rowspacing:".5em",columnspacing:"100%",width:t.options.ams.multlineWidth,side:t.options.tagSide,minlabelspacing:t.options.tagIndent,"data-array-padding":`${r} ${r}`,"data-width-includes-label":!0},s},XalignAt(t,e,i,r){let s=t.GetArgument("\\begin{"+e.getName()+"}");if(s.match(/[^0-9]/))throw new M("PositiveIntegerArg","Argument to %1 must be a positive integer","\\begin{"+e.getName()+"}");let n=r?"crl":"rlc",a=r?"mbt":"btm",o=r?"fit auto auto":"auto auto fit",h=rt.FlalignArray(t,e,i,r,!1,n,a,o,!0);return h.setProperty("xalignat",2*parseInt(s)),h},FlalignArray(t,e,i,r,s,n,a,o,h=!1){Z.checkEqnEnv(t),t.Push(e),n=n.split("").join(" ").replace(/r/g,"right").replace(/l/g,"left").replace(/c/g,"center"),a=Fs(a);let d=t.itemFactory.create("flalign",e.getName(),i,r,s,t.stack);return d.arraydef={width:"100%",displaystyle:!0,columnalign:n,columnspacing:"0em",columnwidth:o,rowspacing:"3pt","data-break-align":a,side:t.options.tagSide,minlabelspacing:h?"0":t.options.tagIndent,"data-width-includes-label":!0},d.setProperty("zeroWidthLabel",h),d},HandleDeclareOp(t,e){let i=t.GetStar()?"*":"",r=re.GetCsNameArgument(t,e),s=t.GetArgument(e);re.addMacro(t,r,rt.Macro,[`\\operatorname${i}{${s}}`]),t.Push(t.itemFactory.create("null"))},HandleOperatorName(t,e){let i=t.GetStar(),r=new ue(Ot.trimSpaces(t.GetArgument(e)),Object.assign(Object.assign({},t.stack.env),{font:lt.Variant.NORMAL,multiLetterIdentifiers:t.options.ams.operatornamePattern,operatorLetters:!0,noAutoOP:!0}),t.configuration).mml();if(r.isKind("mi")?r.removeProperty("autoOP"):r=t.create("node","TeXAtom",[r]),C.setProperties(r,{movesupsub:i,movablelimits:!0,texClass:L.OP}),!i){let s=t.GetNext(),n=t.i;s==="\\"&&++t.i&&t.GetCS()!=="limits"&&(t.i=n)}t.Push(t.itemFactory.create("fn",r))},SideSet(t,e){let[i,r]=mu(t.ParseArg(e)),[s,n]=mu(t.ParseArg(e)),a=t.ParseArg(e),o=a;i&&(r?i.replaceChild(t.create("node","mphantom",[t.create("node","mpadded",[Z.copyNode(a,t)],{width:0})]),C.getChildAt(i,0)):(o=t.create("node","mmultiscripts",[a]),s&&C.appendChildren(o,[C.getChildAt(s,1)||t.create("node","none"),C.getChildAt(s,2)||t.create("node","none")]),C.setProperty(o,"scriptalign","left"),C.appendChildren(o,[t.create("node","mprescripts"),C.getChildAt(i,1)||t.create("node","none"),C.getChildAt(i,2)||t.create("node","none")]))),s&&o===a&&(s.replaceChild(a,C.getChildAt(s,0)),o=s);let h=t.create("node","TeXAtom",[],{texClass:L.OP,movesupsub:!0,movablelimits:!0});r&&(i&&h.appendChild(i),h.appendChild(r)),h.appendChild(o),n&&h.appendChild(n),t.Push(h)},operatorLetter(t,e){return t.stack.env.operatorLetters?Te.variable(t,e):!1},MultiIntegral(t,e,i){let r=t.GetNext();if(r==="\\"){let s=t.i;r=t.GetArgument(e),t.i=s,r==="\\limits"&&(i="\\!\\!\\mathop{\\,\\,"+i+"}")}t.string=i+" "+t.string.slice(t.i),t.i=0},xArrow(t,e,i,r,s,n=0){let a={width:"+"+Ot.em((r+s)/18),lspace:Ot.em(r/18)},o=t.GetBrackets(e),h=t.ParseArg(e),d=t.create("node","mspace",[],{depth:".2em"}),p=t.create("token","mo",{stretchy:!0,texClass:L.ORD},String.fromCodePoint(i));n&&p.attributes.set("minsize",Ot.em(n)),p=t.create("node","mstyle",[p],{scriptlevel:0});let E=t.create("node","munderover",[p]),y=t.create("node","mpadded",[h,d],a);if(C.setAttribute(y,"voffset","-.2em"),C.setAttribute(y,"height","-.2em"),C.setChild(E,E.over,y),o){let A=new ue(o,t.stack.env,t.configuration).mml(),w=t.create("node","mspace",[],{height:".75em"});y=t.create("node","mpadded",[A,w],a),C.setAttribute(y,"voffset",".15em"),C.setAttribute(y,"depth","-.15em"),C.setChild(E,E.under,y)}C.setProperty(E,"subsupOK",!0),t.Push(t.create("node","TeXAtom",[t.create("node","TeXAtom",[],{texClass:L.NONE}),E],{texClass:L.REL}))},HandleShove(t,e,i){let r=t.stack.Top();if(r.kind!=="multline")throw new M("CommandOnlyAllowedInEnv","%1 only allowed in %2 environment",t.currentCS,"multline");if(r.Size())throw new M("CommandAtTheBeginingOfLine","%1 must come at the beginning of the line",t.currentCS);r.setProperty("shove",i)},CFrac(t,e){let i=Ot.trimSpaces(t.GetBrackets(e,"")),r=t.GetArgument(e),s=t.GetArgument(e),n={l:lt.Align.LEFT,r:lt.Align.RIGHT,"":""},a=new ue("\\strut\\textstyle{"+r+"}",t.stack.env,t.configuration).mml(),o=new ue("\\strut\\textstyle{"+s+"}",t.stack.env,t.configuration).mml(),h=t.create("node","mfrac",[a,o]);if(i=n[i],i==null)throw new M("IllegalAlign","Illegal alignment specified in %1",t.currentCS);i&&C.setProperties(h,{numalign:i,denomalign:i}),t.Push(h)},Genfrac(t,e,i,r,s,n){i??(i=t.GetDelimiterArg(e)),r??(r=t.GetDelimiterArg(e)),s??(s=t.GetArgument(e)),n??(n=Ot.trimSpaces(t.GetArgument(e)));let a=t.ParseArg(e),o=t.ParseArg(e),h=t.create("node","mfrac",[a,o]);if(s!==""&&C.setAttribute(h,"linethickness",s),(i||r)&&(C.setProperty(h,"withDelims",!0),h=Z.fixedFence(t.configuration,i,h,r)),n!==""){let d=parseInt(n,10),p=["D","T","S","SS"][d];if(p==null)throw new M("BadMathStyleFor","Bad math style for %1",t.currentCS);h=t.create("node","mstyle",[h]),p==="D"?C.setProperties(h,{displaystyle:!0,scriptlevel:0}):C.setProperties(h,{displaystyle:!1,scriptlevel:d-1})}t.Push(h)},HandleTag(t,e){if(!t.tags.currentTag.taggable&&t.tags.env)throw new M("CommandNotAllowedInEnv","%1 not allowed in %2 environment",t.currentCS,t.tags.env);if(t.tags.currentTag.tag)throw new M("MultipleCommand","Multiple %1",t.currentCS);let i=t.GetStar(),r=Ot.trimSpaces(t.GetArgument(e));t.tags.tag(r,i),t.Push(t.itemFactory.create("null"))},HandleNoTag:N.HandleNoTag,HandleRef:N.HandleRef,Macro:N.Macro,Accent:N.Accent,Tilde:N.Tilde,Array:N.Array,Spacer:N.Spacer,NamedOp:N.NamedOp,EqnArray:N.EqnArray,Equation:N.Equation};new pi("AMSmath-mathchar0mo",Te.mathchar0mo,{iiiint:["⨌",{texClass:L.OP}]}),new Hs("AMSmath-operatorLetter",rt.operatorLetter,/[-*]/i),new De("AMSmath-macros",{mathring:[rt.Accent,"02DA"],nobreakspace:rt.Tilde,negmedspace:[rt.Spacer,Re.negativemediummathspace],negthickspace:[rt.Spacer,Re.negativethickmathspace],idotsint:[rt.MultiIntegral,"\\int\\cdots\\int"],dddot:[rt.Accent,"20DB"],ddddot:[rt.Accent,"20DC"],sideset:rt.SideSet,boxed:[rt.Macro,"\\fbox{$\\displaystyle{#1}$}",1],tag:rt.HandleTag,notag:rt.HandleNoTag,eqref:[rt.HandleRef,!0],substack:[rt.Macro,"\\begin{subarray}{c}#1\\end{subarray}",1],injlim:[rt.NamedOp,"inj&thinsp;lim"],projlim:[rt.NamedOp,"proj&thinsp;lim"],varliminf:[rt.Macro,"\\mathop{\\underline{\\mmlToken{mi}{lim}}}"],varlimsup:[rt.Macro,"\\mathop{\\overline{\\mmlToken{mi}{lim}}}"],varinjlim:[rt.Macro,"\\mathop{\\underrightarrow{\\mmlToken{mi}{lim}}}"],varprojlim:[rt.Macro,"\\mathop{\\underleftarrow{\\mmlToken{mi}{lim}}}"],DeclareMathOperator:rt.HandleDeclareOp,operatorname:rt.HandleOperatorName,genfrac:rt.Genfrac,frac:[rt.Genfrac,"","","",""],tfrac:[rt.Genfrac,"","","","1"],dfrac:[rt.Genfrac,"","","","0"],binom:[rt.Genfrac,"(",")","0",""],tbinom:[rt.Genfrac,"(",")","0","1"],dbinom:[rt.Genfrac,"(",")","0","0"],cfrac:rt.CFrac,shoveleft:[rt.HandleShove,lt.Align.LEFT],shoveright:[rt.HandleShove,lt.Align.RIGHT],xrightarrow:[rt.xArrow,8594,5,10],xleftarrow:[rt.xArrow,8592,10,5]}),new Qs("AMSmath-environment",Te.environment,{"equation*":[rt.Equation,null,!1],"eqnarray*":[rt.EqnArray,null,!1,!0,"rcl","bmt",Z.cols(0,Re.thickmathspace),".5em"],align:[rt.EqnArray,null,!0,!0,"rl","bt",Z.cols(0,2)],"align*":[rt.EqnArray,null,!1,!0,"rl","bt",Z.cols(0,2)],multline:[rt.Multline,null,!0],"multline*":[rt.Multline,null,!1],split:[rt.EqnArray,null,!1,!1,"rl","bt",Z.cols(0)],gather:[rt.EqnArray,null,!0,!0,"c","m"],"gather*":[rt.EqnArray,null,!1,!0,"c","m"],alignat:[rt.AlignAt,null,!0,!0],"alignat*":[rt.AlignAt,null,!1,!0],alignedat:[rt.AlignAt,null,!1,!1],aligned:[rt.AmsEqnArray,null,null,null,"rl","bt",Z.cols(0,2),".5em","D"],gathered:[rt.AmsEqnArray,null,null,null,"c","m",null,".5em","D"],xalignat:[rt.XalignAt,null,!0,!0],"xalignat*":[rt.XalignAt,null,!1,!0],xxalignat:[rt.XalignAt,null,!1,!1],flalign:[rt.FlalignArray,null,!0,!1,!0,"rlc","btm","auto auto fit"],"flalign*":[rt.FlalignArray,null,!1,!1,!0,"rlc","btm","auto auto fit"],subarray:[rt.Array,null,null,null,null,Z.cols(0),"0.1em","S",!0],smallmatrix:[rt.Array,null,null,null,"c",Z.cols(1/3),".2em","S",!0],matrix:[rt.Array,null,null,null,"c"],pmatrix:[rt.Array,null,"(",")","c"],bmatrix:[rt.Array,null,"[","]","c"],Bmatrix:[rt.Array,null,"\\{","\\}","c"],vmatrix:[rt.Array,null,"\\vert","\\vert","c"],Vmatrix:[rt.Array,null,"\\Vert","\\Vert","c"],cases:[rt.Array,null,"\\{",".","ll",null,".2em","T"]}),new Xn("AMSmath-delimiter",Te.delimiter,{"\\lvert":["|",{texClass:L.OPEN}],"\\rvert":["|",{texClass:L.CLOSE}],"\\lVert":["‖",{texClass:L.OPEN}],"\\rVert":["‖",{texClass:L.CLOSE}]}),new pi("AMSsymbols-mathchar0mi",Te.mathchar0mi,{digamma:"ϝ",varkappa:"ϰ",varGamma:["Γ",{mathvariant:lt.Variant.ITALIC}],varDelta:["Δ",{mathvariant:lt.Variant.ITALIC}],varTheta:["Θ",{mathvariant:lt.Variant.ITALIC}],varLambda:["Λ",{mathvariant:lt.Variant.ITALIC}],varXi:["Ξ",{mathvariant:lt.Variant.ITALIC}],varPi:["Π",{mathvariant:lt.Variant.ITALIC}],varSigma:["Σ",{mathvariant:lt.Variant.ITALIC}],varUpsilon:["Υ",{mathvariant:lt.Variant.ITALIC}],varPhi:["Φ",{mathvariant:lt.Variant.ITALIC}],varPsi:["Ψ",{mathvariant:lt.Variant.ITALIC}],varOmega:["Ω",{mathvariant:lt.Variant.ITALIC}],beth:"ℶ",gimel:"ℷ",daleth:"ℸ",backprime:["‵",{variantForm:!0}],hslash:"ℏ",varnothing:["∅",{variantForm:!0}],blacktriangle:"▴",triangledown:["▽",{variantForm:!0}],blacktriangledown:"▾",square:"◻",Box:"◻",blacksquare:"◼",lozenge:"◊",Diamond:"◊",blacklozenge:"⧫",circledS:["Ⓢ",{mathvariant:lt.Variant.NORMAL}],bigstar:"★",sphericalangle:"∢",measuredangle:"∡",nexists:"∄",complement:"∁",mho:"℧",eth:["ð",{mathvariant:lt.Variant.NORMAL}],Finv:"Ⅎ",diagup:"╱",Game:"⅁",diagdown:"╲",Bbbk:["k",{mathvariant:lt.Variant.DOUBLESTRUCK}],yen:"¥",circledR:"®",checkmark:"✓",maltese:"✠"}),new pi("AMSsymbols-mathchar0mo",Te.mathchar0mo,{dotplus:"∔",ltimes:"⋉",smallsetminus:["∖",{variantForm:!0}],rtimes:"⋊",Cap:"⋒",doublecap:"⋒",leftthreetimes:"⋋",Cup:"⋓",doublecup:"⋓",rightthreetimes:"⋌",barwedge:"⊼",curlywedge:"⋏",veebar:"⊻",curlyvee:"⋎",doublebarwedge:"⩞",boxminus:"⊟",circleddash:"⊝",boxtimes:"⊠",circledast:"⊛",boxdot:"⊡",circledcirc:"⊚",boxplus:"⊞",centerdot:["⋅",{variantForm:!0}],divideontimes:"⋇",intercal:"⊺",leqq:"≦",geqq:"≧",leqslant:"⩽",geqslant:"⩾",eqslantless:"⪕",eqslantgtr:"⪖",lesssim:"≲",gtrsim:"≳",lessapprox:"⪅",gtrapprox:"⪆",approxeq:"≊",lessdot:"⋖",gtrdot:"⋗",lll:"⋘",llless:"⋘",ggg:"⋙",gggtr:"⋙",lessgtr:"≶",gtrless:"≷",lesseqgtr:"⋚",gtreqless:"⋛",lesseqqgtr:"⪋",gtreqqless:"⪌",doteqdot:"≑",Doteq:"≑",eqcirc:"≖",risingdotseq:"≓",circeq:"≗",fallingdotseq:"≒",triangleq:"≜",backsim:"∽",thicksim:["∼",{variantForm:!0}],backsimeq:"⋍",thickapprox:["≈",{variantForm:!0}],subseteqq:"⫅",supseteqq:"⫆",Subset:"⋐",Supset:"⋑",sqsubset:"⊏",sqsupset:"⊐",preccurlyeq:"≼",succcurlyeq:"≽",curlyeqprec:"⋞",curlyeqsucc:"⋟",precsim:"≾",succsim:"≿",precapprox:"⪷",succapprox:"⪸",vartriangleleft:"⊲",lhd:"⊲",vartriangleright:"⊳",rhd:"⊳",trianglelefteq:"⊴",unlhd:"⊴",trianglerighteq:"⊵",unrhd:"⊵",vDash:"⊨",Vdash:"⊩",Vvdash:"⊪",smallsmile:["⌣",{variantForm:!0}],shortmid:["∣",{variantForm:!0}],smallfrown:["⌢",{variantForm:!0}],shortparallel:["∥",{variantForm:!0}],bumpeq:"≏",between:"≬",Bumpeq:"≎",pitchfork:"⋔",varpropto:["∝",{variantForm:!0}],backepsilon:"∍",blacktriangleleft:"◂",blacktriangleright:"▸",therefore:"∴",because:"∵",eqsim:"≂",vartriangle:["△",{variantForm:!0}],Join:"⋈",nless:"≮",ngtr:"≯",nleq:"≰",ngeq:"≱",nleqslant:["⪇",{variantForm:!0}],ngeqslant:["⪈",{variantForm:!0}],nleqq:["≰",{variantForm:!0}],ngeqq:["≱",{variantForm:!0}],lneq:"⪇",gneq:"⪈",lneqq:"≨",gneqq:"≩",lvertneqq:["≨",{variantForm:!0}],gvertneqq:["≩",{variantForm:!0}],lnsim:"⋦",gnsim:"⋧",lnapprox:"⪉",gnapprox:"⪊",nprec:"⊀",nsucc:"⊁",npreceq:["⋠",{variantForm:!0}],nsucceq:["⋡",{variantForm:!0}],precneqq:"⪵",succneqq:"⪶",precnsim:"⋨",succnsim:"⋩",precnapprox:"⪹",succnapprox:"⪺",nsim:"≁",ncong:"≇",nshortmid:["∤",{variantForm:!0}],nshortparallel:["∦",{variantForm:!0}],nmid:"∤",nparallel:"∦",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",ntriangleleft:"⋪",ntriangleright:"⋫",ntrianglelefteq:"⋬",ntrianglerighteq:"⋭",nsubseteq:"⊈",nsupseteq:"⊉",nsubseteqq:["⊈",{variantForm:!0}],nsupseteqq:["⊉",{variantForm:!0}],subsetneq:"⊊",supsetneq:"⊋",varsubsetneq:["⊊",{variantForm:!0}],varsupsetneq:["⊋",{variantForm:!0}],subsetneqq:"⫋",supsetneqq:"⫌",varsubsetneqq:["⫋",{variantForm:!0}],varsupsetneqq:["⫌",{variantForm:!0}],leftleftarrows:"⇇",rightrightarrows:"⇉",leftrightarrows:"⇆",rightleftarrows:"⇄",Lleftarrow:"⇚",Rrightarrow:"⇛",twoheadleftarrow:"↞",twoheadrightarrow:"↠",leftarrowtail:"↢",rightarrowtail:"↣",looparrowleft:"↫",looparrowright:"↬",leftrightharpoons:"⇋",rightleftharpoons:["⇌",{variantForm:!0}],curvearrowleft:"↶",curvearrowright:"↷",circlearrowleft:"↺",circlearrowright:"↻",Lsh:"↰",Rsh:"↱",upuparrows:"⇈",downdownarrows:"⇊",upharpoonleft:"↿",upharpoonright:"↾",downharpoonleft:"⇃",restriction:"↾",multimap:"⊸",downharpoonright:"⇂",leftrightsquigarrow:"↭",rightsquigarrow:"⇝",leadsto:"⇝",dashrightarrow:"⇢",dashleftarrow:"⇠",nleftarrow:"↚",nrightarrow:"↛",nLeftarrow:"⇍",nRightarrow:"⇏",nleftrightarrow:"↮",nLeftrightarrow:"⇎"}),new Xn("AMSsymbols-delimiter",Te.delimiter,{"\\ulcorner":"⌜","\\urcorner":"⌝","\\llcorner":"⌞","\\lrcorner":"⌟"}),new De("AMSsymbols-macros",{implies:[rt.Macro,"\\;\\Longrightarrow\\;"],impliedby:[rt.Macro,"\\;\\Longleftarrow\\;"]});var vo=class extends St{get kind(){return"beginEnv"}get isOpen(){return!0}checkItem(t){if(t.isKind("end")){if(t.getName()!==this.getName())throw new M("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 M("EnvMissingEnd","Missing \\end{%1}",this.getName());return super.checkItem(t)}},mi={NewCommand(t,e){let i=re.GetCsNameArgument(t,e),r=re.GetArgCount(t,e),s=t.GetBrackets(e),n=t.GetArgument(e);re.addMacro(t,i,mi.Macro,[n,r,s]),t.Push(t.itemFactory.create("null"))},NewEnvironment(t,e){let i=Ot.trimSpaces(t.GetArgument(e)),r=re.GetArgCount(t,e),s=t.GetBrackets(e),n=t.GetArgument(e),a=t.GetArgument(e);re.addEnvironment(t,i,mi.BeginEnv,[!0,n,a,r,s]),t.Push(t.itemFactory.create("null"))},MacroDef(t,e){let i=re.GetCSname(t,e),r=re.GetTemplate(t,e,"\\"+i),s=t.GetArgument(e);r instanceof Array?re.addMacro(t,i,mi.MacroWithTemplate,[s].concat(r)):re.addMacro(t,i,mi.Macro,[s,r]),t.Push(t.itemFactory.create("null"))},Let(t,e){let i=re.GetCSname(t,e),r=t.GetNext();r==="="&&(t.i++,r=t.GetNext());let s=t.configuration.handlers;if(t.Push(t.itemFactory.create("null")),r==="\\"){if(e=re.GetCSname(t,e),i===e)return;let a=s.get(ht.MACRO).applicable(e);if(a instanceof Vr){let h=a.lookup(e);re.addMacro(t,i,h.func,h.args,h.token);return}if(a instanceof pi&&!(a instanceof Xn)){let h=a.lookup(e);re.addMacro(t,i,d=>a.parser(d,h),[i,h.char]);return}let o=s.get(ht.DELIMITER).lookup("\\"+e);if(o){re.addDelimiter(t,"\\"+i,o.char,o.attributes);return}re.checkProtectedMacros(t,i),re.undefineMacro(t,i),re.undefineDelimiter(t,"\\"+i);return}t.i++;let n=s.get(ht.DELIMITER).lookup(r);if(n){re.addDelimiter(t,"\\"+i,n.char,n.attributes);return}re.addMacro(t,i,mi.Macro,[r])},MacroWithTemplate(t,e,i,r,...s){let n=parseInt(r,10);if(s.length){let a=[];if(t.GetNext(),s[0]&&!re.MatchParam(t,s[0]))throw new M("MismatchUseDef","Use of %1 doesn't match its definition",e);if(n){for(let o=0;o<n;o++)a.push(re.GetParameter(t,e,s[o+1]));i=Z.substituteArgs(t,a,i)}}t.string=Z.addArgs(t,i,t.string.slice(t.i)),t.i=0,Z.checkMaxMacros(t)},BeginEnv(t,e,i,r,s,n){let a=e.getName();if(t.stack.env.closing===a){if(delete t.stack.env.closing,t.stack.global.beginEnv&&(t.stack.global.beginEnv--,r)){let o=t.string.slice(t.i);t.string=Z.addArgs(t,t.string.substring(0,t.i),r),t.Parse(),t.string=o,t.i=0}return t.itemFactory.create("end").setProperty("name",a)}if(s){let o=[];if(n!=null){let h=t.GetBrackets(`\\begin{${a}}`);o.push(h??n)}for(let h=o.length;h<s;h++)o.push(t.GetArgument(`\\begin{${a}}`));i=Z.substituteArgs(t,o,i),r=Z.substituteArgs(t,[],r)}return t.string=Z.addArgs(t,i,t.string.slice(t.i)),t.i=0,t.stack.global.beginEnv=(t.stack.global.beginEnv||0)+1,t.itemFactory.create("beginEnv").setProperty("name",a)},Macro:N.Macro};new De("Newcommand-macros",{newcommand:mi.NewCommand,renewcommand:mi.NewCommand,newenvironment:mi.NewEnvironment,renewenvironment:mi.NewEnvironment,def:mi.MacroDef,let:mi.Let});function ec(t,e){e.parseOptions.packageData.has("newcommand")||(e.parseOptions.packageData.set("newcommand",{}),new Xn(si.NEW_DELIMITER,Te.delimiter,{}),new De(si.NEW_COMMAND,{}),new Qs(si.NEW_ENVIRONMENT,Te.environment,{}),e.parseOptions.handlers.add({[ht.CHARACTER]:[],[ht.DELIMITER]:[si.NEW_DELIMITER],[ht.MACRO]:[si.NEW_DELIMITER,si.NEW_COMMAND],[ht.ENVIRONMENT]:[si.NEW_ENVIRONMENT]},{},k8))}Ie.create("newcommand",{[ct.HANDLER]:{macro:["Newcommand-macros"]},[ct.ITEMS]:{[vo.prototype.kind]:vo},[ct.OPTIONS]:{maxMacros:1e3,protectedMacros:["begingroupSandbox"]},[ct.CONFIG]:ec});var O8=class extends go{};Ie.create("ams",{[ct.HANDLER]:{[ht.CHARACTER]:["AMSmath-operatorLetter"],[ht.DELIMITER]:["AMSsymbols-delimiter","AMSmath-delimiter"],[ht.MACRO]:["AMSsymbols-mathchar0mi","AMSsymbols-mathchar0mo","AMSsymbols-delimiter","AMSsymbols-macros","AMSmath-mathchar0mo","AMSmath-macros","AMSmath-delimiter"],[ht.ENVIRONMENT]:["AMSmath-environment"]},[ct.ITEMS]:{[uu.prototype.kind]:uu,[pu.prototype.kind]:pu},[ct.TAGS]:{ams:O8},[ct.OPTIONS]:{multlineWidth:"",ams:{operatornamePattern:/^[-*a-zA-Z0-9]+/,multlineWidth:"100%",multlineIndent:"1em"}},[ct.CONFIG]:ec});var gu=class vh extends ue{get texParser(){return this.configuration.packageData.get("textmacros").texParser}get tags(){return this.texParser.tags}constructor(e,i,r,s){super(e,i,r),this.level=s}mml(){return this.copyLists(),this.configuration.popParser(),this.level==null?this.nodes.length===1?this.nodes[0]:this.create("node","mrow",this.nodes):this.create("node","mstyle",this.nodes,{displaystyle:!1,scriptlevel:this.level})}copyLists(){let e=this.texParser.configuration;for(let[i,r]of Object.entries(this.configuration.nodeLists))for(let s of r)e.addNode(i,s);this.configuration.nodeLists={}}Parse(){this.text="",this.nodes=[],this.envStack=[],super.Parse()}saveText(){if(this.text){let e=this.stack.env.mathvariant,i=Z.internalText(this,this.text,e?{mathvariant:e}:{});this.text="",this.Push(i)}}Push(e){if(this.text&&this.saveText(),e instanceof $n)return super.Push(e);if(e instanceof Kn){this.stack.env.mathcolor=this.stack.env.color;return}e instanceof At&&(this.addAttributes(e),this.nodes.push(e))}PushMath(e){let i=this.stack.env;for(let r of["mathsize","mathcolor"])i[r]&&!e.attributes.hasExplicit(r)&&(!e.isToken&&!e.isKind("mstyle")&&(e=this.create("node","mstyle",[e])),C.setAttribute(e,r,i[r]));e.isInferred&&(e=this.create("node","mrow",e.childNodes)),e.isKind("TeXAtom")||(e=this.create("node","TeXAtom",[e])),this.nodes.push(e)}addAttributes(e){let i=this.stack.env;if(e.isToken)for(let r of["mathsize","mathcolor","mathvariant"])i[r]&&!e.attributes.hasExplicit(r)&&C.setAttribute(e,r,i[r])}ParseTextArg(e,i){let r=this.GetArgument(e);return i=Object.assign(Object.assign({},this.stack.env),i),new vh(r,i,this.configuration).mml()}ParseArg(e){return new vh(this.GetArgument(e),this.stack.env,this.configuration).mml()}Error(e,i,...r){throw new M(e,i,...r)}},F={Comment(t,e){for(;t.i<t.string.length&&t.string.charAt(t.i)!==`
232
+ `;)t.i++;t.i++},Math(t,e){t.saveText();let i=t.i,r,s,n=0;for(;s=t.GetNext();)switch(r=t.i++,s){case"\\":t.GetCS()===")"&&(s="\\(");case"$":if(n===0&&e===s){let a=t.texParser.configuration,o=new ue(t.string.substring(i,r),t.stack.env,a).mml();t.PushMath(o);return}break;case"{":n++;break;case"}":n===0&&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){let i=t.stack.env;t.envStack.push(i),t.stack.env=Object.assign({},i)},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+="“",t.i++):t.text+="‘"},CloseQuote(t,e){t.string.charAt(t.i)===e?(t.text+="”",t.i++):t.text+="’"},Tilde(t,e){t.text+=" "},Space(t,e){t.text+=" ",t.GetNext()},SelfQuote(t,e){t.text+=e.substring(1)},Insert(t,e,i){t.text+=i},Accent(t,e,i){let r=t.ParseArg(e),s=t.create("token","mo",{},i);t.addAttributes(s),t.Push(t.create("node","mover",[r,s]))},Emph(t,e){let i=t.stack.env.mathvariant==="-tex-mathit"?"normal":"-tex-mathit";t.Push(t.ParseTextArg(e,{mathvariant:i}))},TextFont(t,e,i){t.saveText(),t.Push(t.ParseTextArg(e,{mathvariant:i}))},SetFont(t,e,i){t.saveText(),t.stack.env.mathvariant=i},SetSize(t,e,i){t.saveText(),t.stack.env.mathsize=i},CheckAutoload(t,e){let i=t.configuration.packageData.get("autoload"),r=t.texParser;e=e.slice(1);let s=r.lookup(ht.MACRO,e);if(!s||i&&s._func===i.Autoload){if(r.parse(ht.MACRO,[r,e]),!s)return;On(Promise.resolve())}r.parse(ht.MACRO,[t,e])},Macro:N.Macro,Spacer:N.Spacer,Hskip:N.Hskip,rule:N.rule,Rule:N.Rule,HandleRef:N.HandleRef,UnderOver:N.UnderOver,Lap:N.Lap,Phantom:N.Phantom,Smash:N.Smash,MmlToken:N.MmlToken},ar=lt.Variant;new Vr("text-special",{$:F.Math,"%":F.Comment,"^":F.MathModeOnly,_:F.MathModeOnly,"&":F.Misplaced,"#":F.Misplaced,"~":F.Tilde," ":F.Space," ":F.Space,"\r":F.Space,"\n":F.Space," ":F.Tilde,"{":F.OpenBrace,"}":F.CloseBrace,"`":F.OpenQuote,"'":F.CloseQuote}),new De("text-macros",{"(":F.Math,$:F.SelfQuote,_:F.SelfQuote,"%":F.SelfQuote,"{":F.SelfQuote,"}":F.SelfQuote," ":F.SelfQuote,"&":F.SelfQuote,"#":F.SelfQuote,"\\":[F.Macro,"$\\\\$"],"'":[F.Accent,"´"],"’":[F.Accent,"´"],"`":[F.Accent,"`"],"‘":[F.Accent,"`"],"^":[F.Accent,"^"],'"':[F.Accent,"¨"],"~":[F.Accent,"~"],"=":[F.Accent,"¯"],".":[F.Accent,"˙"],u:[F.Accent,"˘"],v:[F.Accent,"ˇ"],emph:F.Emph,rm:[F.SetFont,ar.NORMAL],mit:[F.SetFont,ar.ITALIC],oldstyle:[F.SetFont,ar.OLDSTYLE],cal:[F.SetFont,ar.CALLIGRAPHIC],it:[F.SetFont,"-tex-mathit"],bf:[F.SetFont,ar.BOLD],sf:[F.SetFont,ar.SANSSERIF],tt:[F.SetFont,ar.MONOSPACE],frak:[F.TextFont,ar.FRAKTUR],Bbb:[F.TextFont,ar.DOUBLESTRUCK],Tiny:[F.SetSize,.5],tiny:[F.SetSize,.6],scriptsize:[F.SetSize,.7],SMALL:[F.SetSize,.7],Small:[F.SetSize,.8],footnotesize:[F.SetSize,.8],small:[F.SetSize,.9],normalsize:[F.SetSize,1],large:[F.SetSize,1.095],Large:[F.SetSize,1.2],LARGE:[F.SetSize,1.44],huge:[F.SetSize,1.73],Huge:[F.SetSize,2.07],HUGE:[F.SetSize,2.49],textnormal:[F.Macro,"{\\rm #1}",1],textup:[F.Macro,"{\\rm #1}",1],textrm:[F.Macro,"{\\rm #1}",1],textit:[F.Macro,"{\\it #1}",1],textbf:[F.Macro,"{\\bf #1}",1],textsf:[F.Macro,"{\\sf #1}",1],texttt:[F.Macro,"{\\tt #1}",1],dagger:[F.Insert,"†"],ddagger:[F.Insert,"‡"],S:[F.Insert,"§"],AA:[F.Insert,"Å"],ldots:[F.Insert,"…"],vdots:[F.Insert,"⋮"],",":[F.Spacer,Re.thinmathspace],":":[F.Spacer,Re.mediummathspace],">":[F.Spacer,Re.mediummathspace],";":[F.Spacer,Re.thickmathspace],"!":[F.Spacer,Re.negativethinmathspace],enspace:[F.Spacer,.5],quad:[F.Spacer,1],qquad:[F.Spacer,2],thinspace:[F.Spacer,Re.thinmathspace],negthinspace:[F.Spacer,Re.negativethinmathspace],hskip:F.Hskip,hspace:F.Hskip,kern:F.Hskip,mskip:F.Hskip,mspace:F.Hskip,mkern:F.Hskip,rule:F.rule,Rule:[F.Rule],Space:[F.Rule,"blank"],color:F.CheckAutoload,textcolor:F.CheckAutoload,colorbox:F.CheckAutoload,fcolorbox:F.CheckAutoload,href:F.CheckAutoload,style:F.CheckAutoload,class:F.CheckAutoload,data:F.CheckAutoload,cssId:F.CheckAutoload,unicode:F.CheckAutoload,U:F.CheckAutoload,char:F.CheckAutoload,ref:[F.HandleRef,!1],eqref:[F.HandleRef,!0],underline:[F.UnderOver,"2015"],llap:F.Lap,rlap:F.Lap,phantom:F.Phantom,vphantom:[F.Phantom,1,0],hphantom:[F.Phantom,0,1],smash:F.Smash,mmlToken:F.MmlToken}),Ie.create("text-base",{[ct.PARSER]:"text",[ct.PRIORITY]:1,[ct.HANDLER]:{[ht.CHARACTER]:["command","text-special"],[ht.MACRO]:["text-macros"]},[ct.FALLBACK]:{[ht.CHARACTER]:(t,e)=>{t.text+=e},[ht.MACRO]:(t,e)=>{let i=t.texParser,r=i.lookup(ht.MACRO,e);r&&r._func!==F.Macro&&t.Error("MathMacro","%1 is only supported in math mode","\\"+e),i.parse(ht.MACRO,[t,e])}},[ct.ITEMS]:{[bo.prototype.kind]:bo,[$n.prototype.kind]:$n,[Eo.prototype.kind]:Eo,[Kn.prototype.kind]:Kn}});function M8(t,e,i,r){let s=t.configuration.packageData.get("textmacros");return t instanceof gu||(s.texParser=t),s.parseOptions.clear(),[new gu(e,r?{mathvariant:r}:{},s.parseOptions,i).mml()]}Ie.create("textmacros",{[ct.PRIORITY]:1,[ct.CONFIG]:(t,e)=>{let i=new b1(e.parseOptions.options.textmacros.packages,["tex","text"]);i.init();let r=new Vh(i,[]);r.options=e.parseOptions.options,i.config(e),yr.addTags(i.tags),r.tags=yr.getDefault(),r.tags.configuration=r,r.packageData=e.parseOptions.packageData,r.packageData.set("textmacros",{textConf:i,parseOptions:r,jax:e,texParser:null}),r.options.internalMath=M8},[ct.PREPROCESSORS]:[t=>{let e=t.data.packageData.get("textmacros");e.parseOptions.nodeFactory.setMmlFactory(e.jax.mmlFactory),e.parseOptions.clear()}],[ct.OPTIONS]:{textmacros:{packages:["text-base"]}}});function D8(t,e){let i=t.create("text","\\"+e),r=t.options.noundefined,s={};for(let n of["color","background","size"])r[n]&&(s["math"+n]=r[n]);t.Push(t.create("node","mtext",[],s,i))}Ie.create("noundefined",{[ct.FALLBACK]:{[ht.MACRO]:D8},[ct.OPTIONS]:{noundefined:{color:"red",background:"",size:""}},[ct.PRIORITY]:3});var Th="configmacros-map",Ch="configmacros-active-map",Sh="configmacros-env-map";function P8(t){new Vr(Ch,{}),new De(Th,{}),new Qs(Sh,Te.environment,{}),t.append(Ie.local({handler:{[ht.CHARACTER]:[Ch],[ht.MACRO]:[Th],[ht.ENVIRONMENT]:[Sh]},priority:3}))}function B8(t,e){F8(e),_8(e),j8(e)}function P1(t,e,i){let r=i.parseOptions.handlers.retrieve(e),s=i.parseOptions.options[t];for(let n of Object.keys(s)){let a=typeof s[n]=="string"?[s[n]]:s[n],o=Array.isArray(a[2])?new bs(n,mi.MacroWithTemplate,a.slice(0,2).concat(a[2])):new bs(n,mi.Macro,a);r.add(n,o)}}function F8(t){P1("active",Ch,t)}function _8(t){P1("macros",Th,t)}function j8(t){let e=t.parseOptions.handlers.retrieve(Sh),i=t.parseOptions.options.environments;for(let r of Object.keys(i))e.add(r,new bs(r,mi.BeginEnv,[!0].concat(i[r])))}Ie.create("configmacros",{[ct.INIT]:P8,[ct.CONFIG]:B8,[ct.ITEMS]:{[vo.prototype.kind]:vo},[ct.OPTIONS]:{active:qe({}),macros:qe({}),environments:qe({})}});var dl={Toggle(t,e){let i=[],r;for(;(r=t.GetArgument(e))!=="\\endtoggle";)i.push(new ue(r,t.stack.env,t.configuration).mml());t.Push(t.create("node","maction",i,{actiontype:"toggle"}))},Mathtip(t,e){let i=t.ParseArg(e),r=t.ParseArg(e);t.Push(t.create("node","maction",[i,r],{actiontype:"tooltip"}))},Macro:N.Macro};new De("action-macros",{toggle:dl.Toggle,mathtip:dl.Mathtip,texttip:[dl.Macro,"\\mathtip{#1}{\\text{#2}}",2]}),Ie.create("action",{[ct.HANDLER]:{[ht.MACRO]:["action-macros"]}});var ps={CD(t,e){t.Push(e);let i=t.itemFactory.create("array"),r=t.configuration.options.amscd;return i.setProperties({minw:t.stack.env.CD_minw||r.harrowsize,minh:t.stack.env.CD_minh||r.varrowsize}),i.arraydef={columnalign:"center",columnspacing:r.colspace,rowspacing:r.rowspace,displaystyle:!0},i},arrow(t,e){let i=t.i,r=t.GetNext();if(r.match(/[><VA.|=]/))t.i++;else return t.i=i,Jh(t,e);let s=t.stack.Top();(!s.isKind("array")||s.Size())&&(ps.cell(t,e),s=t.stack.Top());let n=s,a=n.table.length%2==1,o=(n.row.length+ +!a)%2;for(;o;)ps.cell(t,e),o--;let h,d={minsize:n.getProperty("minw"),stretchy:!0},p={minsize:n.getProperty("minh"),stretchy:!0,symmetric:!0,lspace:0,rspace:0};if(r==="|")h=t.create("token","mo",p,"∥");else if(r==="=")h=t.create("token","mo",d,"=");else if(r!=="."){let E={">":"→","<":"←",V:"↓",A:"↑"}[r],y=t.GetUpTo(e+r,r),A=t.GetUpTo(e+r,r);if(r===">"||r==="<"){h=t.create("token","mo",d,E),y||(y="\\kern "+n.getProperty("minw"));let w={width:"+.67em",lspace:".33em"};h=t.create("node","munderover",[h]);let _=new ue(y,t.stack.env,t.configuration).mml(),U=t.create("node","mpadded",[_],w);if(C.setAttribute(U,"voffset",".1em"),C.setChild(h,h.over,U),A){let vt=new ue(A,t.stack.env,t.configuration).mml();C.setChild(h,h.under,t.create("node","mpadded",[vt],w))}t.configuration.options.amscd.hideHorizontalLabels&&(h=t.create("node","mpadded",[h],{depth:0,height:".67em"}))}else{let w=t.create("token","mo",p,E);h=w,(y||A)&&(h=t.create("node","mrow"),y&&C.appendChildren(h,[new ue("\\scriptstyle\\raise.125em{\\vcenter{\\llap{"+y+"}}}",t.stack.env,t.configuration).mml()]),w.texClass=L.ORD,C.appendChildren(h,[w]),A&&C.appendChildren(h,[new ue("\\scriptstyle\\raise.125em{\\vcenter{\\rlap{"+A+"}}}",t.stack.env,t.configuration).mml()]))}}h&&t.Push(h),ps.cell(t,e)},cell(t,e){let i=t.stack.Top();(i.table||[]).length%2==0&&(i.row||[]).length===0&&t.Push(t.create("node","mpadded",[],{height:"8.5pt",depth:"2pt"})),t.Push(t.itemFactory.create("cell").setProperties({isEntry:!0,name:e}))},minCDarrowwidth(t,e){t.stack.env.CD_minw=t.GetDimen(e)},minCDarrowheight(t,e){t.stack.env.CD_minh=t.GetDimen(e)}};new Qs("amscd_environment",Te.environment,{CD:ps.CD}),new De("amscd_macros",{minCDarrowwidth:ps.minCDarrowwidth,minCDarrowheight:ps.minCDarrowheight}),new Vr("amscd_special",{"@":ps.arrow}),Ie.create("amscd",{[ct.HANDLER]:{[ht.CHARACTER]:["amscd_special"],[ht.MACRO]:["amscd_macros"],[ht.ENVIRONMENT]:["amscd_environment"]},[ct.OPTIONS]:{amscd:{colspace:"5pt",rowspace:"5pt",harrowsize:"2.75em",varrowsize:"1.75em",hideHorizontalLabels:!1}}});new De("bbox",{bbox:{BBox(t,e){let i=t.GetBrackets(e,""),r=t.ParseArg(e),s=i.split(/,/),n,a,o;for(let h=0,d=s.length;h<d;h++){let p=s[h].trim(),E=p.match(/^(\.\d+|\d+(\.\d*)?)(pt|em|ex|mu|px|in|cm|mm)$/);if(E){if(n)throw new M("MultipleBBoxProperty","%1 specified twice in %2","Padding",e);let y=E[1]+E[3];y&&(n={height:"+"+y,depth:"+"+y,lspace:y,width:"+"+2*parseFloat(E[1])+E[3]})}else if(p.match(/^([a-z0-9]+|#[0-9a-f]{6}|#[0-9a-f]{3})$/i)){if(a)throw new M("MultipleBBoxProperty","%1 specified twice in %2","Background",e);a=p}else if(p.match(/^[-a-z]+:/i)){if(o)throw new M("MultipleBBoxProperty","%1 specified twice in %2","Style",e);o=p}else if(p!=="")throw new M("InvalidBBoxProperty",`"%1" doesn't look like a color, a padding dimension, or a style`,p)}n&&(r=t.create("node","mpadded",[r],n)),(a||o)&&(n={},a&&Object.assign(n,{mathbackground:a}),o&&Object.assign(n,{style:o}),r=t.create("node","mstyle",[r],n)),t.Push(r)}}.BBox}),Ie.create("bbox",{[ct.HANDLER]:{[ht.MACRO]:["bbox"]}});var cr={};cr[lt.Variant.NORMAL]=lt.Variant.BOLD,cr[lt.Variant.ITALIC]=lt.Variant.BOLDITALIC,cr[lt.Variant.FRAKTUR]=lt.Variant.BOLDFRAKTUR,cr[lt.Variant.SCRIPT]=lt.Variant.BOLDSCRIPT,cr[lt.Variant.SANSSERIF]=lt.Variant.BOLDSANSSERIF,cr["-tex-calligraphic"]="-tex-bold-calligraphic",cr["-tex-oldstyle"]="-tex-bold-oldstyle",cr["-tex-mathit"]=lt.Variant.BOLDITALIC,new De("boldsymbol",{boldsymbol:{Boldsymbol(t,e){let i=t.stack.env.boldsymbol;t.stack.env.boldsymbol=!0;let r=t.ParseArg(e);t.stack.env.boldsymbol=i,t.Push(r)}}.Boldsymbol});function U8(t,e,i,r){let s=u1.createToken(t,e,i,r);return e!=="mtext"&&t.configuration.parser.stack.env.boldsymbol&&(C.setProperty(s,"fixBold",!0),t.configuration.addNode("fixBold",s)),s}function H8(t){for(let e of t.data.getList("fixBold"))if(C.getProperty(e,"fixBold")){let i=C.getAttribute(e,"mathvariant");C.setAttribute(e,"mathvariant",cr[i]||i),C.removeProperties(e,"fixBold")}}Ie.create("boldsymbol",{[ct.HANDLER]:{[ht.MACRO]:["boldsymbol"]},[ct.NODES]:{token:U8},[ct.POSTPROCESSORS]:[H8]});var bu=Bt(Re.thinmathspace),Eu=class extends St{constructor(){super(...arguments),this.barNodes=[]}get kind(){return"braket"}get isOpen(){return!0}checkItem(t){return t.isKind("close")?t.getProperty("braketbar")?(this.barNodes.push(...super.toMml(!0,!0).childNodes),this.Clear(),St.fail):[[this.factory.create("mml",this.toMml())],!0]:t.isKind("mml")?(this.Push(t.toMml()),this.getProperty("single")?[[this.toMml()],!0]:St.fail):super.checkItem(t)}toMml(t=!0,e){let i=super.toMml(t,e);if(!t)return i;let r=this.getProperty("open"),s=this.getProperty("close");if(this.barNodes.length&&(i=this.create("node","inferredMrow",[...this.barNodes,i])),this.getProperty("stretchy"))return this.getProperty("space")&&(i=this.create("node","inferredMrow",[this.create("token","mspace",{width:bu}),i,this.create("token","mspace",{width:bu})])),Z.fenced(this.factory.configuration,r,i,s);let n={fence:!0,stretchy:!1,symmetric:!0,texClass:L.OPEN},a=this.create("token","mo",n,r);n.texClass=L.CLOSE;let o=this.create("token","mo",n,s);return this.create("node","mrow",[a,i,o],{open:r,close:s})}},ki={Braket(t,e,i,r,s,n,a=!1){let o=t.i;t.GetArgument(e),t.i=o;let h=t.GetNext(),d=!0;h==="{"&&(t.i++,d=!1);let p=t.itemFactory.create("braket");p.setProperties({barcount:0,barmax:n,open:i,close:r,stretchy:s,single:d,space:a}),t.Push(p),p.env.braketItem=t.stack.height-1},Bar(t,e){let i=e==="|"?"|":"‖",r=t.stack.height-t.stack.env.braketItem,s=t.stack.Top(r);if(!s||!s.isKind("braket")||s.getProperty("barcount")>=s.getProperty("barmax"))return!1;if(i==="|"&&t.GetNext()==="|"&&(t.i++,i="‖"),!s.getProperty("stretchy")){let a=t.create("token","mo",{stretchy:!1,"data-braketbar":!0,texClass:L.ORD},i);return t.Push(a),!0}let n=t.itemFactory.create("close").setProperty("braketbar",!0);return t.Push(n),s.barNodes.push(t.create("node","TeXAtom",[],{texClass:L.CLOSE}),t.create("token","mo",{stretchy:!0,"data-braketbar":!0,texClass:L.BIN},i),t.create("node","TeXAtom",[],{texClass:L.OPEN})),s.setProperty("barcount",s.getProperty("barcount")+1),!0},Macro:N.Macro};new De("Braket-macros",{bra:[ki.Macro,"{\\langle {#1} \\vert}",1],ket:[ki.Macro,"{\\vert {#1} \\rangle}",1],braket:[ki.Braket,"⟨","⟩",!1,1/0],set:[ki.Braket,"{","}",!1,1],Bra:[ki.Macro,"{\\left\\langle {#1} \\right\\vert}",1],Ket:[ki.Macro,"{\\left\\vert {#1} \\right\\rangle}",1],Braket:[ki.Braket,"⟨","⟩",!0,1/0],Set:[ki.Braket,"{","}",!0,1,!0],ketbra:[ki.Macro,"{\\vert {#1} \\rangle\\langle {#2} \\vert}",2],Ketbra:[ki.Macro,"{\\left\\vert {#1} \\right\\rangle\\left\\langle {#2} \\right\\vert}",2],"|":ki.Bar}),new Vr("Braket-characters",{"|":ki.Bar}),Ie.create("braket",{[ct.HANDLER]:{[ht.CHARACTER]:["Braket-characters"],[ht.MACRO]:["Braket-macros"]},[ct.ITEMS]:{[Eu.prototype.kind]:Eu},[ct.PRIORITY]:3});var ia=null,Ah=null,xr=function(t){Ah.root=t;let{w:e}=ia.outputJax.getBBox(Ah,ia);return e},ic=function(t){let e=0;for(;t&&!C.isType(t,"mtable");){if(C.isType(t,"text"))return null;if(C.isType(t,"mrow")){t=t.childNodes[0],e=0;continue}t=t.parent.childNodes[e],e++}return t},B1=function(t,e){return t.childNodes[+(e==="up")].childNodes[0].childNodes[0].childNodes[0].childNodes[0]},F1=function(t,e){return t.childNodes[e].childNodes[0].childNodes[0]},_1=function(t){return F1(t,0)},W8=function(t){return F1(t,t.childNodes.length-1)},j1=function(t,e){return t.childNodes[e==="up"?0:1].childNodes[0].childNodes[0].childNodes[0]},z8=function(t){for(;t&&!C.isType(t,"mtd");)t=t.parent;return t},q8=function(t){return t.parent.childNodes[t.parent.childNodes.indexOf(t)+1]},U1=function(t){for(;t&&ze(t,"inference")==null;)t=t.parent;return t},Lh=function(t,e,i=!1){let r=0;if(t===e||(t!==e.parent&&(r+=t.getProperty(i?"proof-right":"proof-left")||0,t=e.parent),t===e))return r;let s=t.childNodes,n=i?s.length-1:0;return s[n]!==e&&(r+=xr(s[n])),r},yu=function(t,e=!1){let i=ic(t),r=j1(i,ze(i,"inferenceRule"));return Lh(t,i,e)+(xr(i)-xr(r))/2},gn=function(t,e,i,r=!1){if(i===0)return;if(ze(e,"inferenceRule")||ze(e,"labelledRule")){let a=t.nodeFactory.create("node","mrow");e.parent.replaceChild(a,e),a.setChildren([e]),G8(e,a),e=a}let s=r?"proof-right":"proof-left";e.setProperty(s,(e.getProperty(s)||0)+i);let n=[];for(let a of["left","right"]){let o=e.getProperty(`proof-${a}`);o&&n.push(`margin-${a}: ${Ot.em(o)}`)}e.attributes.set("style",n.join("; "))},G8=function(t,e){["inference","proof","labelledRule"].forEach(i=>{let r=ze(t,i);r!=null&&(vi(e,i,r),H1(t,i))})},V8=function(t){let e=t.nodeLists.sequent;if(e)for(let i=e.length-1,r;r=e[i];i--){if(ze(r,"sequentProcessed")){H1(r,"sequentProcessed");continue}let s=[],n=U1(r);if(ze(n,"inference")===1){for(s.push(r);ze(n,"inference")===1;){n=ic(n);let a=_1(B1(n,ze(n,"inferenceRule"))),o=ze(a,"inferenceRule")?j1(a,ze(a,"inferenceRule")):a;ze(o,"sequent")&&(r=o.childNodes[0],s.push(r),vi(r,"sequentProcessed",!0)),n=a}X8(t,s)}}},xu=function(t,e,i,r,s){let n=t.nodeFactory.create("node","mspace",[],{width:Ot.em(s)});if(r==="left"){let a=e.childNodes[i].childNodes[0];n.parent=a,a.childNodes.unshift(n)}else e.childNodes[i].appendChild(n);vi(e.parent,"sequentAdjust_"+r,s)},X8=function(t,e){let i=e.pop();for(;e.length;){let r=e.pop(),[s,n]=$8(i,r);ze(i.parent,"axiom")&&(xu(t,s<0?i:r,0,"left",Math.abs(s)),xu(t,n<0?i:r,2,"right",Math.abs(n))),i=r}},$8=function(t,e){let i=xr(t.childNodes[2]),r=xr(e.childNodes[2]);return[xr(t.childNodes[0])-xr(e.childNodes[0]),i-r]},K8=function(t){Ah=new t.document.options.MathItem("",null,t.math.display);let e=t.data;V8(e);let i=e.nodeLists.inference||[],r=0;for(let s of i){let n=ze(s,"proof"),a=ic(s),o=B1(a,ze(a,"inferenceRule")),h=_1(o),d=0;if(ze(h,"inference")){let U=yu(h);if(U){gn(e,h,-U);let vt=Lh(s,a,!1);gn(e,s,U-vt),d=U-vt}}let p=W8(o);if(ze(p,"inference")==null)continue;let E=yu(p,!0);gn(e,p,-E,!0);let y=Lh(s,a,!0),A=(xr(a)-xr(o.parent))/2;gn(e,s,A<d?-A:-d),r=Math.max(0,Math.max(0,r+E-y)-A);let w;if(n||!(w=z8(s))){gn(e,ze(s,"proof")?s:s.parent,r,!0);continue}let _=q8(w);if(_){let U=e.nodeFactory.create("node","mspace",[],{width:Ot.em(r)});_.appendChild(U),r=0;continue}U1(w)}},rc="bspr_",J8=RegExp("^bspr_"),vi=function(t,e,i){C.setProperty(t,rc+e,i)},ze=function(t,e){return C.getProperty(t,rc+e)},H1=function(t,e){t.removeProperty(rc+e)},Y8=function(t){t.data.root.walkTree((e,i)=>{let r=[];e.getPropertyNames().forEach(s=>{s.match(J8)&&r.push(s+":"+e.getProperty(s))}),r.length&&C.setAttribute(e,"semantics",r.join(";"))})},Z8=function(t){if(ia=t.document,!("getBBox"in ia.outputJax))throw Error("The bussproofs extension requires an output jax with a getBBox() method")},Q8=function(t){ia=null},Nu=class extends St{constructor(){super(...arguments),this.leftLabel=null,this.rigthLabel=null,this.innerStack=new c1(this.factory,{},!0)}get kind(){return"proofTree"}checkItem(t){if(t.isKind("end")&&t.getName()==="prooftree"){let e=this.toMml();return vi(e,"proof",!0),[[this.factory.create("mml",e),t],!0]}if(t.isKind("stop"))throw new M("EnvMissingEnd","Missing \\end{%1}",this.getName());return this.innerStack.Push(t),St.fail}toMml(){let t=super.toMml(),e=this.innerStack.Top();if(e.isKind("start")&&!e.Size())return t;this.innerStack.Push(this.factory.create("stop"));let i=this.innerStack.Top().toMml();return this.create("node","mrow",[i,t],{})}};function vu(t,e){let i=Z.internalMath(t,Ot.trimSpaces(e),0);if(!i[0].childNodes[0].childNodes.length)return t.create("node","mrow",[]);let r=t.create("node","mspace",[],{width:".5ex"}),s=t.create("node","mspace",[],{width:".5ex"});return t.create("node","mrow",[r,...i,s])}function Tu(t,e,i,r,s,n,a){let o=t.create("node","mtr",[t.create("node","mtd",[e],{})],{}),h=t.create("node","mtr",[t.create("node","mtd",i,{})],{}),d=t.create("node","mtable",a?[h,o]:[o,h],{align:"top 2",rowlines:n,framespacing:"0 0"});vi(d,"inferenceRule",a?"up":"down");let p,E;r&&(p=t.create("node","mpadded",[r],{height:".25em",depth:"+.25em",width:"+.5ex",voffset:"-.25em"}),vi(p,"prooflabel","left")),s&&(E=t.create("node","mpadded",[s],{height:"-.25em",depth:"+.25em",width:"+.5ex",voffset:"-.25em",lspace:".5ex"}),vi(E,"prooflabel","right"));let y,A;if(r&&s)y=[p,d,E],A="both";else if(r)y=[p,d],A="left";else if(s)y=[d,E],A="right";else return d;return d=t.create("node","mrow",y),vi(d,"labelledRule",A),d}function Cu(t,e){if(t.GetNext()!=="$")throw new M("IllegalUseOfCommand","Use of %1 does not match its definition.",e);t.i++;let i=t.GetUpTo(e,"$");if(!i.includes("\\fCenter"))throw new M("MissingProofCommand","Missing %1 in %2.","\\fCenter",e);let[r,s]=i.split("\\fCenter"),n=new ue(r,t.stack.env,t.configuration).mml(),a=new ue(s,t.stack.env,t.configuration).mml(),o=new ue("\\fCenter",t.stack.env,t.configuration).mml(),h=t.create("node","mtd",[n],{}),d=t.create("node","mtd",[o],{}),p=t.create("node","mtd",[a],{}),E=t.create("node","mtr",[h,d,p],{}),y=t.create("node","mtable",[E],{columnspacing:".5ex",columnalign:"center 2"});return vi(y,"sequent",!0),t.configuration.addNode("sequent",E),y}var Ht={Prooftree(t,e){return t.Push(e),t.itemFactory.create("proofTree").setProperties({name:e.getName(),line:"solid",currentLine:"solid",rootAtTop:!1})},Axiom(t,e){let i=t.stack.Top();if(i.kind!=="proofTree")throw new M("IllegalProofCommand","Proof commands only allowed in prooftree environment.");let r=vu(t,t.GetArgument(e));vi(r,"axiom",!0),i.Push(r)},Inference(t,e,i){let r=t.stack.Top();if(r.kind!=="proofTree")throw new M("IllegalProofCommand","Proof commands only allowed in prooftree environment.");if(r.Size()<i)throw new M("BadProofTree","Proof tree badly specified.");let s=r.getProperty("rootAtTop"),n=i===1&&!r.Peek()[0].childNodes.length?0:i,a=[];do a.length&&a.unshift(t.create("node","mtd",[],{})),a.unshift(t.create("node","mtd",[r.Pop()],{rowalign:s?"top":"bottom"})),i--;while(i>0);let o=t.create("node","mtr",a,{}),h=t.create("node","mtable",[o],{framespacing:"0 0"}),d=vu(t,t.GetArgument(e)),p=r.getProperty("currentLine");p!==r.getProperty("line")&&r.setProperty("currentLine",r.getProperty("line"));let E=Tu(t,h,[d],r.getProperty("left"),r.getProperty("right"),p,s);r.setProperty("left",null),r.setProperty("right",null),vi(E,"inference",n),t.configuration.addNode("inference",E),r.Push(E)},Label(t,e,i){let r=t.stack.Top();if(r.kind!=="proofTree")throw new M("IllegalProofCommand","Proof commands only allowed in prooftree environment.");let s=Z.internalMath(t,t.GetArgument(e),0),n=s.length>1?t.create("node","mrow",s,{}):s[0];r.setProperty(i,n)},SetLine(t,e,i,r){let s=t.stack.Top();if(s.kind!=="proofTree")throw new M("IllegalProofCommand","Proof commands only allowed in prooftree environment.");s.setProperty("currentLine",i),r&&s.setProperty("line",i)},RootAtTop(t,e,i){let r=t.stack.Top();if(r.kind!=="proofTree")throw new M("IllegalProofCommand","Proof commands only allowed in prooftree environment.");r.setProperty("rootAtTop",i)},AxiomF(t,e){let i=t.stack.Top();if(i.kind!=="proofTree")throw new M("IllegalProofCommand","Proof commands only allowed in prooftree environment.");let r=Cu(t,e);vi(r,"axiom",!0),i.Push(r)},FCenter(t,e){},InferenceF(t,e,i){let r=t.stack.Top();if(r.kind!=="proofTree")throw new M("IllegalProofCommand","Proof commands only allowed in prooftree environment.");if(r.Size()<i)throw new M("BadProofTree","Proof tree badly specified.");let s=r.getProperty("rootAtTop"),n=i===1&&!r.Peek()[0].childNodes.length?0:i,a=[];do a.length&&a.unshift(t.create("node","mtd",[],{})),a.unshift(t.create("node","mtd",[r.Pop()],{rowalign:s?"top":"bottom"})),i--;while(i>0);let o=t.create("node","mtr",a,{}),h=t.create("node","mtable",[o],{framespacing:"0 0"}),d=Cu(t,e),p=r.getProperty("currentLine");p!==r.getProperty("line")&&r.setProperty("currentLine",r.getProperty("line"));let E=Tu(t,h,[d],r.getProperty("left"),r.getProperty("right"),p,s);r.setProperty("left",null),r.setProperty("right",null),vi(E,"inference",n),t.configuration.addNode("inference",E),r.Push(E)}};new De("Bussproofs-macros",{AxiomC:Ht.Axiom,UnaryInfC:[Ht.Inference,1],BinaryInfC:[Ht.Inference,2],TrinaryInfC:[Ht.Inference,3],QuaternaryInfC:[Ht.Inference,4],QuinaryInfC:[Ht.Inference,5],RightLabel:[Ht.Label,"right"],LeftLabel:[Ht.Label,"left"],AXC:Ht.Axiom,UIC:[Ht.Inference,1],BIC:[Ht.Inference,2],TIC:[Ht.Inference,3],RL:[Ht.Label,"right"],LL:[Ht.Label,"left"],noLine:[Ht.SetLine,"none",!1],singleLine:[Ht.SetLine,"solid",!1],solidLine:[Ht.SetLine,"solid",!1],dashedLine:[Ht.SetLine,"dashed",!1],alwaysNoLine:[Ht.SetLine,"none",!0],alwaysSingleLine:[Ht.SetLine,"solid",!0],alwaysSolidLine:[Ht.SetLine,"solid",!0],alwaysDashedLine:[Ht.SetLine,"dashed",!0],rootAtTop:[Ht.RootAtTop,!0],alwaysRootAtTop:[Ht.RootAtTop,!0],rootAtBottom:[Ht.RootAtTop,!1],alwaysRootAtBottom:[Ht.RootAtTop,!1],fCenter:Ht.FCenter,Axiom:Ht.AxiomF,UnaryInf:[Ht.InferenceF,1],BinaryInf:[Ht.InferenceF,2],TrinaryInf:[Ht.InferenceF,3],QuaternaryInf:[Ht.InferenceF,4],QuinaryInf:[Ht.InferenceF,5]}),new Qs("Bussproofs-environments",Te.environment,{prooftree:[Ht.Prooftree,null,!1]}),Ie.create("bussproofs",{[ct.HANDLER]:{[ht.MACRO]:["Bussproofs-macros"],[ht.ENVIRONMENT]:["Bussproofs-environments"]},[ct.ITEMS]:{[Nu.prototype.kind]:Nu},[ct.PREPROCESSORS]:[[Z8,1]],[ct.POSTPROCESSORS]:[[Q8,3],[Y8,2],[K8,1]]});var Rh={"data-arrowhead":1,color:1,mathcolor:1,background:1,mathbackground:1,"data-padding":1,"data-thickness":1};new De("enclose",{enclose:{Enclose(t,e){let i=t.GetArgument(e).replace(/,/g," "),r=t.GetBrackets(e,""),s=t.ParseArg(e),n=Z.keyvalOptions(r,Rh);n.notation=i,t.Push(t.create("node","menclose",[s],n))}}.Enclose}),Ie.create("enclose",{[ct.HANDLER]:{[ht.MACRO]:["enclose"]}});var Na={Cancel(t,e,i){let r=t.GetBrackets(e,""),s=t.ParseArg(e),n=Z.keyvalOptions(r,Rh);n.notation=i,t.Push(t.create("node","menclose",[s],n))},CancelTo(t,e){let i=t.GetBrackets(e,""),r=t.ParseArg(e),s=t.ParseArg(e),n=Z.keyvalOptions(i,Rh);n.notation=[lt.Notation.UPDIAGONALSTRIKE,lt.Notation.UPDIAGONALARROW,lt.Notation.NORTHEASTARROW].join(" "),r=t.create("node","mpadded",[r],{depth:"-.1em",height:"+.1em",voffset:".1em"}),t.Push(t.create("node","msup",[t.create("node","menclose",[s],n),r]))}};new De("cancel",{cancel:[Na.Cancel,lt.Notation.UPDIAGONALSTRIKE],bcancel:[Na.Cancel,lt.Notation.DOWNDIAGONALSTRIKE],xcancel:[Na.Cancel,lt.Notation.UPDIAGONALSTRIKE+" "+lt.Notation.DOWNDIAGONALSTRIKE],cancelto:Na.CancelTo}),Ie.create("cancel",{[ct.HANDLER]:{[ht.MACRO]:["cancel"]}});function Su(t){let e=`+${t}`,i=t.replace(/^.*?([a-z]*)$/,"$1");return{width:`+${2*parseFloat(e)}${i}`,height:e,depth:e,lspace:t}}var bn={Color(t,e){let i=t.GetBrackets(e,""),r=t.GetArgument(e),s=t.configuration.packageData.get("color").model.getColor(i,r),n=t.itemFactory.create("style").setProperties({styles:{mathcolor:s}});t.stack.env.color=s,t.Push(n)},TextColor(t,e){let i=t.GetBrackets(e,""),r=t.GetArgument(e),s=t.configuration.packageData.get("color").model.getColor(i,r),n=t.stack.env.color;t.stack.env.color=s;let a=t.ParseArg(e);n?t.stack.env.color=n:delete t.stack.env.color;let o=t.create("node","mstyle",[a],{mathcolor:s});t.Push(o)},DefineColor(t,e){let i=t.GetArgument(e),r=t.GetArgument(e),s=t.GetArgument(e);t.configuration.packageData.get("color").model.defineColor(r,i,s),t.Push(t.itemFactory.create("null"))},ColorBox(t,e){let i=t.GetBrackets(e,""),r=t.GetArgument(e),s=Z.internalMath(t,t.GetArgument(e)),n=t.configuration.packageData.get("color").model,a=t.create("node","mpadded",s,{mathbackground:n.getColor(i,r)});C.setProperties(a,Su(t.options.color.padding)),t.Push(a)},FColorBox(t,e){let i=t.GetBrackets(e,""),r=t.GetArgument(e),s=t.GetBrackets(e,i),n=t.GetArgument(e),a=Z.internalMath(t,t.GetArgument(e)),o=t.options.color,h=t.configuration.packageData.get("color").model,d=t.create("node","mpadded",a,{mathbackground:h.getColor(s,n),style:`border: ${o.borderWidth} solid ${h.getColor(i,r)}`});C.setProperties(d,Su(o.padding)),t.Push(d)}},Au=new Map([["Apricot","#FBB982"],["Aquamarine","#00B5BE"],["Bittersweet","#C04F17"],["Black","#221E1F"],["Blue","#2D2F92"],["BlueGreen","#00B3B8"],["BlueViolet","#473992"],["BrickRed","#B6321C"],["Brown","#792500"],["BurntOrange","#F7921D"],["CadetBlue","#74729A"],["CarnationPink","#F282B4"],["Cerulean","#00A2E3"],["CornflowerBlue","#41B0E4"],["Cyan","#00AEEF"],["Dandelion","#FDBC42"],["DarkOrchid","#A4538A"],["Emerald","#00A99D"],["ForestGreen","#009B55"],["Fuchsia","#8C368C"],["Goldenrod","#FFDF42"],["Gray","#949698"],["Green","#00A64F"],["GreenYellow","#DFE674"],["JungleGreen","#00A99A"],["Lavender","#F49EC4"],["LimeGreen","#8DC73E"],["Magenta","#EC008C"],["Mahogany","#A9341F"],["Maroon","#AF3235"],["Melon","#F89E7B"],["MidnightBlue","#006795"],["Mulberry","#A93C93"],["NavyBlue","#006EB8"],["OliveGreen","#3C8031"],["Orange","#F58137"],["OrangeRed","#ED135A"],["Orchid","#AF72B0"],["Peach","#F7965A"],["Periwinkle","#7977B8"],["PineGreen","#008B72"],["Plum","#92268F"],["ProcessBlue","#00B0F0"],["Purple","#99479B"],["RawSienna","#974006"],["Red","#ED1B23"],["RedOrange","#F26035"],["RedViolet","#A1246B"],["Rhodamine","#EF559F"],["RoyalBlue","#0071BC"],["RoyalPurple","#613F99"],["RubineRed","#ED017D"],["Salmon","#F69289"],["SeaGreen","#3FBC9D"],["Sepia","#671800"],["SkyBlue","#46C5DD"],["SpringGreen","#C6DC67"],["Tan","#DA9D76"],["TealBlue","#00AEB3"],["Thistle","#D883B7"],["Turquoise","#00B4CE"],["Violet","#58429B"],["VioletRed","#EF58A0"],["White","#FFFFFF"],["WildStrawberry","#EE2967"],["Yellow","#FFF200"],["YellowGreen","#98CC70"],["YellowOrange","#FAA21A"]]),kn=new Map,tE=class{constructor(){this.userColors=new Map}normalizeColor(t,e){if(!t||t==="named"){if(e.match(/;/))throw new M("BadColorValue","Invalid color value");return e}if(kn.has(t))return kn.get(t)(e);throw new M("UndefinedColorModel","Color model '%1' not defined",t)}getColor(t,e){return!t||t==="named"?this.getColorByName(e):this.normalizeColor(t,e)}getColorByName(t){if(this.userColors.has(t))return this.userColors.get(t);if(Au.has(t))return Au.get(t);if(t.match(/;/))throw new M("BadColorValue","Invalid color value");return t}defineColor(t,e,i){let r=this.normalizeColor(t,i);this.userColors.set(e,r)}};kn.set("rgb",function(t){let e=t.trim().split(/\s*,\s*/),i="#";if(e.length!==3)throw new M("ModelArg1","Color values for the %1 model require 3 numbers","rgb");for(let r of e){if(!r.match(/^(\d+(\.\d*)?|\.\d+)$/))throw new M("InvalidDecimalNumber","Invalid decimal number");let s=parseFloat(r);if(s<0||s>1)throw new M("ModelArg2","Color values for the %1 model must be between %2 and %3","rgb","0","1");let n=Math.floor(s*255).toString(16);n.length<2&&(n="0"+n),i+=n}return i}),kn.set("RGB",function(t){let e=t.trim().split(/\s*,\s*/),i="#";if(e.length!==3)throw new M("ModelArg1","Color values for the %1 model require 3 numbers","RGB");for(let r of e){if(!r.match(/^\d+$/))throw new M("InvalidNumber","Invalid number");let s=parseInt(r);if(s>255)throw new M("ModelArg2","Color values for the %1 model must be between %2 and %3","RGB","0","255");let n=s.toString(16);n.length<2&&(n="0"+n),i+=n}return i}),kn.set("gray",function(t){if(!t.match(/^\s*(\d+(\.\d*)?|\.\d+)\s*$/))throw new M("InvalidDecimalNumber","Invalid decimal number");let e=parseFloat(t);if(e<0||e>1)throw new M("ModelArg2","Color values for the %1 model must be between %2 and %3","gray","0","1");let i=Math.floor(e*255).toString(16);return i.length<2&&(i="0"+i),`#${i}${i}${i}`}),new De("color",{color:bn.Color,textcolor:bn.TextColor,definecolor:bn.DefineColor,colorbox:bn.ColorBox,fcolorbox:bn.FColorBox});var eE=function(t,e){e.parseOptions.packageData.set("color",{model:new tE})};Ie.create("color",{[ct.HANDLER]:{[ht.MACRO]:["color"]},[ct.OPTIONS]:{color:{padding:"5px",borderWidth:"2px"}},[ct.CONFIG]:eE});var os={NewExtArrow(t,e){let i=t.GetArgument(e),r=t.GetArgument(e),s=t.GetArgument(e);if(!i.match(/^\\([a-z]+|.)$/i))throw new M("NewextarrowArg1","First argument to %1 must be a control sequence name",e);if(!r.match(/^(\d+),(\d+)$/))throw new M("NewextarrowArg2","Second argument to %1 must be two integers separated by a comma",e);if(!s.match(/^(\d+|0x[0-9A-F]+)$/i))throw new M("NewextarrowArg3","Third argument to %1 must be a unicode character number",e);i=i.substring(1);let n=r.split(",");re.addMacro(t,i,os.xArrow,[parseInt(s),parseInt(n[0]),parseInt(n[1])]),t.Push(t.itemFactory.create("null"))},xArrow:rt.xArrow};new De("extpfeil",{xtwoheadrightarrow:[os.xArrow,8608,12,16],xtwoheadleftarrow:[os.xArrow,8606,17,13],xmapsto:[os.xArrow,8614,6,7],xlongequal:[os.xArrow,61,7,7],xtofrom:[os.xArrow,8644,12,12],Newextarrow:os.NewExtArrow}),Ie.create("extpfeil",{[ct.HANDLER]:{[ht.MACRO]:["extpfeil"]},[ct.CONFIG]:ec});var iE=/[\u{FDD0}-\u{FDEF}\u{FFFE}\u{FFFF}\u{1FFFE}\u{1FFFF}\u{2FFFE}\u{2FFFF}\u{3FFFE}\u{3FFFF}\u{4FFFE}\u{4FFFF}\u{5FFFE}\u{5FFFF}\u{6FFFE}\u{6FFFF}\u{7FFFE}\u{7FFFF}\u{8FFFE}\u{8FFFF}\u{9FFFE}\u{9FFFF}\u{AFFFE}\u{AFFFF}\u{BFFFE}\u{BFFFF}\u{CFFFE}\u{CFFFF}\u{DFFFE}\u{DFFFF}\u{EFFFE}\u{EFFFF}\u{FFFFE}\u{FFFFF}\u{10FFFE}\u{10FFFF}]/u;function rE(t){return!(t.match(/[\x00-\x1f\x7f-\x9f "'>/=]/)||t.match(iE))}var En={Data(t,e){let i=t.GetArgument(e),r=yn(t,e),s=Z.keyvalOptions(i);for(let n in s){if(!rE(n))throw new M("InvalidHTMLAttr","Invalid HTML attribute: %1",`data-${n}`);C.setAttribute(r,`data-${n}`,s[n])}t.Push(r)},Href(t,e){let i=t.GetArgument(e),r=yn(t,e);C.setAttribute(r,"href",i),t.Push(r)},Class(t,e){let i=t.GetArgument(e),r=yn(t,e),s=C.getAttribute(r,"class");s&&(i=s+" "+i),C.setAttribute(r,"class",i),t.Push(r)},Style(t,e){let i=t.GetArgument(e),r=yn(t,e),s=C.getAttribute(r,"style");s&&(s.charAt(i.length-1)!==";"&&(s+=";"),i=s+" "+i),C.setAttribute(r,"style",i),t.Push(r)},Id(t,e){let i=t.GetArgument(e),r=yn(t,e);C.setAttribute(r,"id",i),t.Push(r)}},yn=function(t,e){let i=t.ParseArg(e);if(!C.isInferred(i))return i;let r=t.create("node","mrow");return C.copyChildren(i,r),C.copyAttributes(i,r),r};new De("html_macros",{data:En.Data,href:En.Href,class:En.Class,style:En.Style,cssId:En.Id}),Ie.create("html",{[ct.HANDLER]:{[ht.MACRO]:["html_macros"]}});var sE=class{static toTex(t,e){return ce.go(W.go(t,e),e!=="tex")}};function di(t){let e,i,r={};for(e in t)for(i in t[e]){let s=i.split("|");t[e][i].stateArray=s;for(let n=0;n<s.length;n++)r[s[n]]=[]}for(e in t)for(i in t[e]){let s=t[e][i].stateArray||[];for(let n=0;n<s.length;n++){let a=t[e][i];a.action_=[].concat(a.action_);for(let h=0;h<a.action_.length;h++)typeof a.action_[h]=="string"&&(a.action_[h]={type_:a.action_[h]});let o=e.split("|");for(let h=0;h<o.length;h++)if(s[n]==="*"){let d;for(d in r)r[d].push({pattern:o[h],task:a})}else r[s[n]].push({pattern:o[h],task:a})}}return r}var W={go:function(t,e){if(!t)return[];e===void 0&&(e="ce");let i="0",r={};r.parenthesisLevel=0,t=t.replace(/\n/g," "),t=t.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),t=t.replace(/[\u2026]/g,"...");let s,n=10,a=[];for(;;){s===t?n--:(n=10,s=t);let o=W.stateMachines[e],h=o.transitions[i]||o.transitions["*"];t:for(let d=0;d<h.length;d++){let p=W.patterns.match_(h[d].pattern,t);if(p){let E=h[d].task;for(let y=0;y<E.action_.length;y++){let A;if(o.actions[E.action_[y].type_])A=o.actions[E.action_[y].type_](r,p.match_,E.action_[y].option);else if(W.actions[E.action_[y].type_])A=W.actions[E.action_[y].type_](r,p.match_,E.action_[y].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+E.action_[y].type_+")"];W.concatArray(a,A)}if(i=E.nextState||i,t.length>0){if(E.revisit||(t=p.remainder),!E.toContinue)break t}else return a}}if(n<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(let i=0;i<e.length;i++)t.push(e[i]);else t.push(e)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(t){let e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:(?:([eE])|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return e&&e[0]?{match_:e.slice(1),remainder:t.substr(e[0].length)}:null},"(-)(9)^(-9)":/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/,"state of aggregation $":function(t){let e=W.patterns.findObserveGroups(t,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(e&&e.remainder.match(/^($|[\s,;\)\]\}])/))return e;let i=t.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return i?{match_:i[0],remainder:t.substr(i[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". __* ":/^([.\u22C5\u00B7\u2022]|[*])\s*/,"...":/^\.\.\.(?=$|[^.])/,"^{(...)}":function(t){return W.patterns.findObserveGroups(t,"^{","","","}")},"^($...$)":function(t){return W.patterns.findObserveGroups(t,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(t){return W.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(t){return W.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(t){return W.patterns.findObserveGroups(t,"_{","","","}")},"_($...$)":function(t){return W.patterns.findObserveGroups(t,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(t){return W.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(t){return W.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}^":/^\{\}(?=\^)/,"{}":/^\{\}/,"{...}":function(t){return W.patterns.findObserveGroups(t,"","{","}","")},"{(...)}":function(t){return W.patterns.findObserveGroups(t,"{","","","}")},"$...$":function(t){return W.patterns.findObserveGroups(t,"","$","$","")},"${(...)}$__$(...)$":function(t){return W.patterns.findObserveGroups(t,"${","","","}$")||W.patterns.findObserveGroups(t,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(t){return W.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return W.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return W.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return W.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(t){return W.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return W.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return W.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return W.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}":function(t){return W.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}":function(t){return W.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")||W.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return W.patterns.findObserveGroups(t,"\\ce{","","","}")},"\\pu{(...)}":function(t){return W.patterns.findObserveGroups(t,"\\pu{","","","}")},oxidation$:/^(?:[+-][IVX]+|(?:\\pm|\$\\pm\$|\+-|\+\/-)\s*0)$/,"d-oxidation$":/^(?:[+-]?[IVX]+|(?:\\pm|\$\\pm\$|\+-|\+\/-)\s*0)$/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(t){let e;if(e=t.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/),e)return{match_:e[0],remainder:t.substr(e[0].length)};let i=W.patterns.findObserveGroups(t,"","$","$","");return i&&(e=i.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),e)?{match_:e[0],remainder:t.substr(e[0].length)}:null},amount2:function(t){return this.amount(t)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(t){if(t.match(/^\([a-z]+\)$/))return null;let e=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:t.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,e,i,r,s,n,a,o,h,d){let p=function(_,U){if(typeof U=="string")return _.indexOf(U)===0?U:null;{let vt=_.match(U);return vt?vt[0]:null}},E=function(_,U,vt){let nt=0;for(;U<_.length;){let xt=_.charAt(U),jt=p(_.substr(U),vt);if(jt!==null&&nt===0)return{endMatchBegin:U,endMatchEnd:U+jt.length};if(xt==="{")nt++;else if(xt==="}"){if(nt===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];nt--}U++}return null},y=p(t,e);if(y===null||(t=t.substr(y.length),y=p(t,i),y===null))return null;let A=E(t,y.length,r||s);if(A===null)return null;let w=t.substring(0,r?A.endMatchEnd:A.endMatchBegin);if(n||a){let _=this.findObserveGroups(t.substr(A.endMatchEnd),n,a,o,h);if(_===null)return null;let U=[w,_.match_];return{match_:d?U.join(""):U,remainder:_.remainder}}else return{match_:w,remainder:t.substr(A.endMatchEnd)}},match_:function(t,e){let i=W.patterns.patterns[t];if(i===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+t+")"];if(typeof i=="function")return W.patterns.patterns[t](e);{let r=e.match(i);return r?r.length>2?{match_:r.slice(1),remainder:e.substr(r[0].length)}:{match_:r[1]||r[0],remainder:e.substr(r[0].length)}:null}}},actions:{"a=":function(t,e){t.a=(t.a||"")+e},"b=":function(t,e){t.b=(t.b||"")+e},"p=":function(t,e){t.p=(t.p||"")+e},"o=":function(t,e){t.o=(t.o||"")+e},"o=+p1":function(t,e,i){t.o=(t.o||"")+i},"q=":function(t,e){t.q=(t.q||"")+e},"d=":function(t,e){t.d=(t.d||"")+e},"rm=":function(t,e){t.rm=(t.rm||"")+e},"text=":function(t,e){t.text_=(t.text_||"")+e},insert:function(t,e,i){return{type_:i}},"insert+p1":function(t,e,i){return{type_:i,p1:e}},"insert+p1+p2":function(t,e,i){return{type_:i,p1:e[0],p2:e[1]}},copy:function(t,e){return e},write:function(t,e,i){return i},rm:function(t,e){return{type_:"rm",p1:e}},text:function(t,e){return W.go(e,"text")},"tex-math":function(t,e){return W.go(e,"tex-math")},"tex-math tight":function(t,e){return W.go(e,"tex-math tight")},bond:function(t,e,i){return{type_:"bond",kind_:i||e}},"color0-output":function(t,e){return{type_:"color0",color:e}},ce:function(t,e){return W.go(e,"ce")},pu:function(t,e){return W.go(e,"pu")},"1/2":function(t,e){let i=[];e.match(/^[+\-]/)&&(i.push(e.substr(0,1)),e=e.substr(1));let r=e.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return r[1]=r[1].replace(/\$/g,""),i.push({type_:"frac",p1:r[1],p2:r[2]}),r[3]&&(r[3]=r[3].replace(/\$/g,""),i.push({type_:"tex-math",p1:r[3]})),i},"9,9":function(t,e){return W.go(e,"9,9")}},stateMachines:{tex:{transitions:di({empty:{0:{action_:"copy"}},"\\ce{(...)}":{0:{action_:[{type_:"write",option:"{"},"ce",{type_:"write",option:"}"}]}},"\\pu{(...)}":{0:{action_:[{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}]}},else:{0:{action_:"copy"}}}),actions:{}},ce:{transitions:di({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{action_:[]}},space:{a:{action_:[],nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". __* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{action_:[]}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}^":{"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"tinySkip"}],nextState:"1"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\pu{(...)}":{"*":{action_:["output",{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}],nextState:"3"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(t,e){let i;if((t.d||"").match(/^[1-9][0-9]*$/)){let r=t.d;t.d=void 0,i=this.output(t),i.push({type_:"tinySkip"}),t.b=r}else i=this.output(t);return W.actions["o="](t,e),i},"d= kv":function(t,e){t.d=e,t.dType="kv"},"charge or bond":function(t,e){if(t.beginsWithBond){let i=[];return W.concatArray(i,this.output(t)),W.concatArray(i,W.actions.bond(t,e,"-")),i}else{t.d=e;return}},"- after o/d":function(t,e,i){let r=W.patterns.match_("orbital",t.o||""),s=W.patterns.match_("one lowercase greek letter $",t.o||""),n=W.patterns.match_("one lowercase latin letter $",t.o||""),a=W.patterns.match_("$one lowercase latin letter$ $",t.o||""),o=e==="-"&&(r&&r.remainder===""||s||n||a);o&&!t.a&&!t.b&&!t.p&&!t.d&&!t.q&&!r&&n&&(t.o="$"+t.o+"$");let h=[];return o?(W.concatArray(h,this.output(t)),h.push({type_:"hyphen"})):(r=W.patterns.match_("digits",t.d||""),i&&r&&r.remainder===""?(W.concatArray(h,W.actions["d="](t,e)),W.concatArray(h,this.output(t))):(W.concatArray(h,this.output(t)),W.concatArray(h,W.actions.bond(t,e,"-")))),h},"a to o":function(t){t.o=t.a,t.a=void 0},"sb=true":function(t){t.sb=!0},"sb=false":function(t){t.sb=!1},"beginsWithBond=true":function(t){t.beginsWithBond=!0},"beginsWithBond=false":function(t){t.beginsWithBond=!1},"parenthesisLevel++":function(t){t.parenthesisLevel++},"parenthesisLevel--":function(t){t.parenthesisLevel--},"state of aggregation":function(t,e){return{type_:"state of aggregation",p1:W.go(e,"o")}},comma:function(t,e){let i=e.replace(/\s*$/,"");return i!==e&&t.parenthesisLevel===0?{type_:"comma enumeration L",p1:i}:{type_:"comma enumeration M",p1:i}},output:function(t,e,i){let r;if(!t.r)r=[],!t.a&&!t.b&&!t.p&&!t.o&&!t.q&&!t.d&&!i||(t.sb&&r.push({type_:"entitySkip"}),!t.o&&!t.q&&!t.d&&!t.b&&!t.p&&i!==2?(t.o=t.a,t.a=void 0):!t.o&&!t.q&&!t.d&&(t.b||t.p)?(t.o=t.a,t.d=t.b,t.q=t.p,t.a=t.b=t.p=void 0):t.o&&t.dType==="kv"&&W.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&t.dType==="kv"&&!t.q&&(t.dType=void 0),r.push({type_:"chemfive",a:W.go(t.a,"a"),b:W.go(t.b,"bd"),p:W.go(t.p,"pq"),o:W.go(t.o,"o"),q:W.go(t.q,"pq"),d:W.go(t.d,t.dType==="oxidation"?"oxidation":"bd"),dType:t.dType}));else{let s;s=t.rdt==="M"?W.go(t.rd,"tex-math"):t.rdt==="T"?[{type_:"text",p1:t.rd||""}]:W.go(t.rd,"ce");let n;n=t.rqt==="M"?W.go(t.rq,"tex-math"):t.rqt==="T"?[{type_:"text",p1:t.rq||""}]:W.go(t.rq,"ce"),r={type_:"arrow",r:t.r,rd:s,rq:n}}for(let s in t)s!=="parenthesisLevel"&&s!=="beginsWithBond"&&delete t[s];return r},"oxidation-output":function(t,e){let i=["{"];return W.concatArray(i,W.go(e,"oxidation")),i.push("}"),i},"frac-output":function(t,e){return{type_:"frac-ce",p1:W.go(e[0],"ce"),p2:W.go(e[1],"ce")}},"overset-output":function(t,e){return{type_:"overset",p1:W.go(e[0],"ce"),p2:W.go(e[1],"ce")}},"underset-output":function(t,e){return{type_:"underset",p1:W.go(e[0],"ce"),p2:W.go(e[1],"ce")}},"underbrace-output":function(t,e){return{type_:"underbrace",p1:W.go(e[0],"ce"),p2:W.go(e[1],"ce")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:W.go(e[1],"ce")}},"r=":function(t,e){t.r=e},"rdt=":function(t,e){t.rdt=e},"rd=":function(t,e){t.rd=e},"rqt=":function(t,e){t.rqt=e},"rq=":function(t,e){t.rq=e},operator:function(t,e,i){return{type_:"operator",kind_:i||e}}}},a:{transitions:di({empty:{"*":{action_:[]}},"1/2$":{0:{action_:"1/2"}},else:{0:{action_:[],nextState:"1",revisit:!0}},"${(...)}$__$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:di({empty:{"*":{action_:[]}},"1/2$":{0:{action_:"1/2"}},else:{0:{action_:[],nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\pu{(...)}":{"*":{action_:[{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}]}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$__$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:[{type_:"write",option:"{"},"text",{type_:"write",option:"}"}]}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:di({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$__$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\pu{(...)}":{"*":{action_:["output",{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(t){if(t.text_){let e={type_:"text",p1:t.text_};for(let i in t)delete t[i];return e}}}},pq:{transitions:di({empty:{"*":{action_:[]}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{action_:[],nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{action_:[],nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{action_:[],nextState:"!f",revisit:!0}},"${(...)}$__$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}":{"*":{action_:"color-output"}},"\\color{(...)}":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\pu{(...)}":{"*":{action_:[{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(t,e){return{type_:"state of aggregation subscript",p1:W.go(e,"o")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:W.go(e[1],"pq")}}}},bd:{transitions:di({empty:{"*":{action_:[]}},x$:{0:{action_:[],nextState:"!f",revisit:!0}},formula$:{0:{action_:[],nextState:"f",revisit:!0}},else:{0:{action_:[],nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$__$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}":{"*":{action_:"color-output"}},"\\color{(...)}":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\pu{(...)}":{"*":{action_:[{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(t,e){return{type_:"color",color1:e[0],color2:W.go(e[1],"bd")}}}},oxidation:{transitions:di({empty:{"*":{action_:"roman-numeral"}},"pm-operator":{"*":{action_:{type_:"o=+p1",option:"\\pm"}}},else:{"*":{action_:"o="}}}),actions:{"roman-numeral":function(t){return{type_:"roman numeral",p1:t.o||""}}}},"tex-math":{transitions:di({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"\\pu{(...)}":{"*":{action_:["output",{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){let e={type_:"tex-math",p1:t.o};for(let i in t)delete t[i];return e}}}},"tex-math tight":{transitions:di({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"\\pu{(...)}":{"*":{action_:["output",{type_:"write",option:"{"},"pu",{type_:"write",option:"}"}]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,e){t.o=(t.o||"")+"{"+e+"}"},output:function(t){if(t.o){let e={type_:"tex-math",p1:t.o};for(let i in t)delete t[i];return e}}}},"9,9":{transitions:di({empty:{"*":{action_:[]}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:di({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{action_:[]}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(t,e){let i=[];return e[0]==="+-"||e[0]==="+/-"?i.push("\\pm "):e[0]&&i.push(e[0]),e[1]&&(W.concatArray(i,W.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?W.concatArray(i,W.go(e[2],"pu-9,9")):i.push(e[2])),(e[3]||e[4])&&(e[3]==="e"||e[4]==="*"?i.push({type_:"cdot"}):i.push({type_:"times"}))),e[5]&&i.push("10^{"+e[5]+"}"),i},"number^":function(t,e){let i=[];return e[0]==="+-"||e[0]==="+/-"?i.push("\\pm "):e[0]&&i.push(e[0]),W.concatArray(i,W.go(e[1],"pu-9,9")),i.push("^{"+e[2]+"}"),i},operator:function(t,e,i){return{type_:"operator",kind_:i||e}},space:function(){return{type_:"pu-space-1"}},output:function(t){let e,i=W.patterns.match_("{(...)}",t.d||"");i&&i.remainder===""&&(t.d=i.match_);let r=W.patterns.match_("{(...)}",t.q||"");if(r&&r.remainder===""&&(t.q=r.match_),t.d&&(t.d=(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F"))),t.q){t.q=t.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.q=t.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");let s={d:W.go(t.d,"pu"),q:W.go(t.q,"pu")};t.o==="//"?e={type_:"pu-frac",p1:s.d,p2:s.q}:(e=s.d,s.d.length>1||s.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),W.concatArray(e,s.q))}else e=W.go(t.d,"pu-2");for(let s in t)delete t[s];return e}}},"pu-2":{transitions:di({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(t,e){t.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){let e=[];if(t.rm){let i=W.patterns.match_("{(...)}",t.rm||"");e=i&&i.remainder===""?W.go(i.match_,"pu"):{type_:"rm",p1:t.rm}}for(let i in t)delete t[i];return e}}},"pu-9,9":{transitions:di({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(t){let e=[];if(t.text_=t.text_||"",t.text_.length>4){let i=t.text_.length%3;i===0&&(i=3);for(let r=t.text_.length-3;r>0;r-=3)e.push(t.text_.substr(r,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(0,i)),e.reverse()}else e.push(t.text_);for(let i in t)delete t[i];return e},"output-o":function(t){let e=[];if(t.text_=t.text_||"",t.text_.length>4){let i=t.text_.length-3,r=0;for(;r<i;r+=3)e.push(t.text_.substr(r,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(r))}else e.push(t.text_);for(let i in t)delete t[i];return e}}}}},ce={go:function(t,e){if(!t)return"";let i="",r=!1;for(let s=0;s<t.length;s++){let n=t[s];typeof n=="string"?i+=n:(i+=ce._go2(n),n.type_==="1st-level escape"&&(r=!0))}return e&&!r&&i&&(i="{"+i+"}"),i},_goInner:function(t){return ce.go(t,!1)},_go2:function(t){let e;switch(t.type_){case"chemfive":e="";let i={a:ce._goInner(t.a),b:ce._goInner(t.b),p:ce._goInner(t.p),o:ce._goInner(t.o),q:ce._goInner(t.q),d:ce._goInner(t.d)};i.a&&(i.a.match(/^[+\-]/)&&(i.a="{"+i.a+"}"),e+=i.a+"\\,"),(i.b||i.p)&&(e+="{\\vphantom{A}}",e+="^{\\hphantom{"+(i.b||"")+"}}_{\\hphantom{"+(i.p||"")+"}}",e+="\\mkern-1.5mu",e+="{\\vphantom{A}}",e+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(i.b||"")+"}}",e+="_{\\vphantom{2}\\llap{\\smash[t]{"+(i.p||"")+"}}}"),i.o&&(i.o.match(/^[+\-]/)&&(i.o="{"+i.o+"}"),e+=i.o),t.dType==="kv"?((i.d||i.q)&&(e+="{\\vphantom{A}}"),i.d&&(e+="^{"+i.d+"}"),i.q&&(e+="_{\\smash[t]{"+i.q+"}}")):t.dType==="oxidation"?(i.d&&(e+="{\\vphantom{A}}",e+="^{"+i.d+"}"),i.q&&(e+="{\\vphantom{A}}",e+="_{\\smash[t]{"+i.q+"}}")):(i.q&&(e+="{\\vphantom{A}}",e+="_{\\smash[t]{"+i.q+"}}"),i.d&&(e+="{\\vphantom{A}}",e+="^{"+i.d+"}"));break;case"rm":e="\\mathrm{"+t.p1+"}";break;case"text":t.p1.match(/[\^_]/)?(t.p1=t.p1.replace(" ","~").replace("-","\\text{-}"),e="\\mathrm{"+t.p1+"}"):e="\\text{"+t.p1+"}";break;case"roman numeral":e="\\mathrm{"+t.p1+"}";break;case"state of aggregation":e="\\mskip2mu "+ce._goInner(t.p1);break;case"state of aggregation subscript":e="\\mskip1mu "+ce._goInner(t.p1);break;case"bond":if(e=ce._getBond(t.kind_),!e)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+t.kind_+")"];break;case"frac":let r="\\frac{"+t.p1+"}{"+t.p2+"}";e="\\mathchoice{\\textstyle"+r+"}{"+r+"}{"+r+"}{"+r+"}";break;case"pu-frac":let s="\\frac{"+ce._goInner(t.p1)+"}{"+ce._goInner(t.p2)+"}";e="\\mathchoice{\\textstyle"+s+"}{"+s+"}{"+s+"}{"+s+"}";break;case"tex-math":e=t.p1+" ";break;case"frac-ce":e="\\frac{"+ce._goInner(t.p1)+"}{"+ce._goInner(t.p2)+"}";break;case"overset":e="\\overset{"+ce._goInner(t.p1)+"}{"+ce._goInner(t.p2)+"}";break;case"underset":e="\\underset{"+ce._goInner(t.p1)+"}{"+ce._goInner(t.p2)+"}";break;case"underbrace":e="\\underbrace{"+ce._goInner(t.p1)+"}_{"+ce._goInner(t.p2)+"}";break;case"color":e="{\\color{"+t.color1+"}{"+ce._goInner(t.color2)+"}}";break;case"color0":e="\\color{"+t.color+"}";break;case"arrow":let n={rd:ce._goInner(t.rd),rq:ce._goInner(t.rq)},a=ce._getArrow(t.r);n.rd||n.rq?t.r==="<=>"||t.r==="<=>>"||t.r==="<<=>"||t.r==="<-->"?(a="\\long"+a,n.rd&&(a="\\overset{"+n.rd+"}{"+a+"}"),n.rq&&(a=t.r==="<-->"?"\\underset{\\lower2mu{"+n.rq+"}}{"+a+"}":"\\underset{\\lower6mu{"+n.rq+"}}{"+a+"}"),a=" {}\\mathrel{"+a+"}{} "):(n.rq&&(a+="[{"+n.rq+"}]"),a+="{"+n.rd+"}",a=" {}\\mathrel{\\x"+a+"}{} "):a=" {}\\mathrel{\\long"+a+"}{} ",e=a;break;case"operator":e=ce._getOperator(t.kind_);break;case"1st-level escape":e=t.p1+" ";break;case"space":e=" ";break;case"tinySkip":e="\\mkern2mu";break;case"entitySkip":e="~";break;case"pu-space-1":e="~";break;case"pu-space-2":e="\\mkern3mu ";break;case"1000 separator":e="\\mkern2mu ";break;case"commaDecimal":e="{,}";break;case"comma enumeration L":e="{"+t.p1+"}\\mkern6mu ";break;case"comma enumeration M":e="{"+t.p1+"}\\mkern3mu ";break;case"comma enumeration S":e="{"+t.p1+"}\\mkern1mu ";break;case"hyphen":e="\\text{-}";break;case"addition compound":e="\\,{\\cdot}\\,";break;case"electron dot":e="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":e="{\\times}";break;case"prime":e="\\prime ";break;case"cdot":e="\\cdot ";break;case"tight cdot":e="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":e="\\times ";break;case"circa":e="{\\sim}";break;case"^":e="uparrow";break;case"v":e="downarrow";break;case"ellipsis":e="\\ldots ";break;case"/":e="/";break;case" / ":e="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return e},_getArrow:function(t){switch(t){case"->":return"rightarrow";case"→":return"rightarrow";case"⟶":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"leftrightarrows";case"<=>":return"rightleftharpoons";case"⇌":return"rightleftharpoons";case"<=>>":return"Rightleftharpoons";case"<<=>":return"Leftrightharpoons";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(t){switch(t){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}";case"~=":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"~--":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"-~-":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{-}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(t){switch(t){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}},nE={relmo(t,e){let i=Object.assign({stretchy:!0,texClass:L.REL,mathvariant:"-mhchem"},e.attributes||{}),r=t.create("token","mo",i,e.char);t.Push(r)}},aE=new Map([["\\mhchemx$3[$1]{$2}",/\\underset{\\lower2mu{(.*?)}}{\\overset{(.*?)}{\\long(.*?)}}/g],["\\mhchemx$2{$1}",/\\overset{(.*?)}{\\long(.*?)}/g],["\\mhchemBondTD",/\\rlap\{\\lower\.1em\{-\}\}\\raise\.1em\{\\tripledash\}/g],["\\mhchemBondTDD",/\\rlap\{\\lower\.2em\{-\}\}\\rlap\{\\raise\.2em\{\\tripledash\}\}-/g],["\\mhchemBondDTD",/\\rlap\{\\lower\.2em\{-\}\}\\rlap\{\\raise.2em\{-\}\}\\tripledash/g],[(t,e)=>{let i=`mhchem${e}`;return lE.lookup(i)||oE.lookup(i)?`\\${i}`:t},/\\(x?(?:long)?(?:left|right|[Ll]eftright|[Rr]ightleft)(?:arrow|harpoons))/g]]),or={Machine(t,e,i){let r=t.GetArgument(e),s;try{s=sE.toTex(r,i);for(let[n,a]of aE.entries())s=s.replace(a,n)}catch(n){throw new M(n[0],n[1])}t.string=s+t.string.substring(t.i),t.i=0},Macro:N.Macro,xArrow:rt.xArrow},oE=new De("mhchem",{ce:[or.Machine,"ce"],pu:[or.Machine,"pu"],mhchemxrightarrow:[or.xArrow,58409,5,9],mhchemxleftarrow:[or.xArrow,58408,9,5],mhchemxleftrightarrow:[or.xArrow,58410,9,9],mhchemxleftrightarrows:[or.xArrow,58411,9,9],mhchemxrightleftharpoons:[or.xArrow,58376,5,9],mhchemxRightleftharpoons:[or.xArrow,58377,5,9],mhchemxLeftrightharpoons:[or.xArrow,58378,9,11]}),lE=new pi("mhchem-chars",nE.relmo,{tripledash:["",{stretchy:!1}],mhchemBondTD:["",{stretchy:!1}],mhchemBondTDD:["",{stretchy:!1}],mhchemBondDTD:["",{stretchy:!1}],mhchemlongleftarrow:"",mhchemlongrightarrow:"",mhchemlongleftrightarrow:"",mhchemlongrightleftharpoons:"",mhchemlongRightleftharpoons:"",mhchemlongLeftrightharpoons:"",mhchemlongleftrightarrows:"",mhchemrightarrow:"",mhchemleftarrow:"",mhchemleftrightarrow:""});Ie.create("mhchem",{[ct.HANDLER]:{[ht.MACRO]:["mhchem","mhchem-chars"]}});var Ds={},ul={Unicode(t,e){let i=t.GetBrackets(e),r=null,s="";if(i&&(i.replace(/ /g,"").match(/^(\d+(\.\d*)?|\.\d+),(\d+(\.\d*)?|\.\d+)$/)?(r=i.replace(/ /g,"").split(/,/),s=t.GetBrackets(e)||""):s=i),s.match(/;/))throw new M("BadFont","Font name for %1 can't contain semicolons",t.currentCS);let n=Ot.trimSpaces(t.GetArgument(e)).replace(/^0x/,"x");if(!n.match(/^(x[0-9A-Fa-f]+|[0-9]+)$/))throw new M("BadUnicode","Argument to %1 must be a number",t.currentCS);let a=parseInt(n.match(/^x/)?"0"+n:n);Ds[a]?s||(s=Ds[a][2]):Ds[a]=[800,200,s,a],r&&(Ds[a][0]=Math.floor(parseFloat(r[0])*1e3),Ds[a][1]=Math.floor(parseFloat(r[1])*1e3));let o=t.stack.env.font,h={};s?(Ds[a][2]=h.fontfamily=s.replace(/'/g,"'"),o&&(o.match(/bold/)&&(h.fontweight="bold"),o.match(/italic|-mathit/)&&(h.fontstyle="italic"))):o&&(h.mathvariant=o);let d=t.create("token","mtext",h,h1(n));C.setProperty(d,"unicode",!0),t.Push(d)},RawUnicode(t,e){let i=t.GetArgument(e).trim();if(!i.match(/^[0-9A-F]{1,6}$/))throw new M("BadRawUnicode","Argument to %1 must a hexadecimal number with 1 to 6 digits",t.currentCS);let r=parseInt(i,16);t.string=String.fromCodePoint(r)+t.string.substring(t.i),t.i=0},Char(t,e){let i,r=t.GetNext(),s="",n=t.string.substring(t.i);if(r==="'")i=n.match(/^'([0-7]{1,7}) ?/u),i&&(s=String.fromCodePoint(parseInt(i[1],8)));else if(r==='"')i=n.match(/^"([0-9A-F]{1,6}) ?/),i&&(s=String.fromCodePoint(parseInt(i[1],16)));else if(r==="`"){if(i=n.match(/^`(?:(\\\S)|(.))/u),i)if(i[2])s=i[2];else{t.i+=2;let a=[...t.GetCS()];if(a.length>1)throw new M("InvalidAlphanumeric","Invalid alphanumeric constant for %1",t.currentCS);s=a[0],i=[""]}}else i=n.match(/^([0-9]{1,7}) ?/),i&&(s=String.fromCodePoint(parseInt(i[1])));if(!s)throw new M("MissingNumber","Missing numeric constant for %1",t.currentCS);t.i+=i[0].length,s>="0"&&s<="9"?t.Push(t.create("token","mn",{},s)):s.match(/[A-Za-z]/)?t.Push(t.create("token","mi",{},s)):Jh(t,s)}};new De("unicode",{unicode:ul.Unicode,U:ul.RawUnicode,char:ul.Char}),Ie.create("unicode",{[ct.HANDLER]:{[ht.MACRO]:["unicode"]}}),new De("verb",{verb:{Verb(t,e){let i=t.GetNext(),r=++t.i;if(i==="")throw new M("MissingArgFor","Missing argument for %1",e);for(;t.i<t.string.length&&t.string.charAt(t.i)!==i;)t.i++;if(t.i===t.string.length)throw new M("NoClosingDelim","Can't find closing delimiter for %1",t.currentCS);let s=t.string.slice(r,t.i).replace(/ /g," ");t.i++,t.Push(t.create("token","mtext",{mathvariant:lt.Variant.MONOSPACE},s))}}.Verb}),Ie.create("verb",{[ct.HANDLER]:{[ht.MACRO]:["verb"]}});var W1=["base","ams","newcommand","textmacros","noundefined","configmacros","action","amscd","bbox","boldsymbol","braket","bussproofs","cancel","color","enclose","extpfeil","html","mhchem","unicode","verb"],hE=["a11y/assistive-mml"],Lu={loader:["load","failed","output/svg"],startup:["typeset","ready"],tex:null,chtml:null,output:null,options:null};function cE(t){let e=[];for(let[i,r]of Object.entries(t)){if(!(i in Lu)){e.push(i);continue}let s=Lu[i];if(s&&r)for(let n of Object.keys(r))s.includes(n)||e.push(`${i}.${n}`)}for(let i of t.loader?.load??[])hE.includes(i)||e.push(`loader.load: ${i}`);if(t.startup?.typeset!==!1&&e.push("startup.typeset"),t.tex&&"packages"in t.tex&&e.push("tex.packages"),e.length)throw Error(`[math-rendering] The bundled MathJax does not support ${e.join(", ")}`)}for(let t of Object.values(D1))t().catch(()=>{});var Ru=`${Ni.OPTIONS.dynamicPrefix}/`;function dE(t){let e=t.startsWith(Ru)?D1[t.slice(Ru.length).replace(/\.js$/,"")]:void 0;return e?e():Promise.reject(Error(`[math-rendering] The bundled MathJax has no module '${t}'`))}var uE=class extends Mi{mergeUserSettings(){super.mergeUserSettings(),this.settings.renderer=this.document.outputJax.name,this.settings.collapsible=!1}checkLoadableItems(){for(let t of Object.keys(this.jax))this.jax[t]||this.menu.findID("Settings","Renderer",t).disable();this.menu.findID("Options","Collapsible").disable(),this.menu.findID("Options","AutoCollapse").disable()}};function pE(){return new Promise(t=>{let e=document.readyState;e==="complete"||e==="interactive"?t():window.addEventListener("DOMContentLoaded",()=>t(),{once:!0,capture:!0})})}function mE(t){if(dr.startup)throw Error("[math-rendering] The bundled MathJax starts once");cE(t),We.asyncLoad=dE;let e=t.loader?.load?.includes("a11y/assistive-mml")??!1;dr.config=t,dr._={a11y:{explorer:{Region:Yg},explorer_ts:u2,...e?{"assistive-mml":e0}:{}},output:{chtml_ts:{CHTML:js}},ui:{menu:{Menu:{Menu:Mi}}}};let i=()=>{},r=()=>{},s={promise:new Promise((n,a)=>{i=n,r=a}),hasTypeset:!1,defaultReady(){Ni.addExtension({...R8,fontURL:I8});let n=new uh({packages:W1,...t.tex}),a=new fo,o=new js(S1({chtml:{...t.chtml}},"chtml",{...t.output,fontData:Ni,fontURL:w8})),h=new R2(b2(),5);h=Wp(h,new fo({allowHtmlInTokenNodes:!0})),h=Gp(h,null),h=t1(h),e&&(h=Ku(h)),h=L8(h),We.handlers.register(h);let d=We.document(document,{...t.options,worker:{path:du,maps:`${du}/mathmaps`,...t.options?.worker},MenuClass:uE,InputJax:[n,a],OutputJax:o});s.document=d,pE().then(()=>d.menu?.loadingPromise).then(i,r)}};return dr.startup=s,dr.typesetPromise=(n=null)=>{s.hasTypeset=!0;let a=s.document;return a.whenReady(async()=>{a.options.elements=n,a.reset(),await a.renderPromise()})},dr.typesetClear=(n=null)=>{n?s.document.clearMathItemsWithin(n):s.document.clear()},dr}export{j as a,G1 as i,Ni as n,B as r,bE as t};