PageSourceSearch

https://admissiondnrschool.web.app/assets/mathlive.min-BVnyx8g0.js

js admissiondnrschool.web.app collected 2026-10-03 12:15:34 UTC 823,866 bytes, 3,232 lines download raw bytes

vendor: 4,180 bytes, line 1
1var Ip=Object.defineProperty,Rp=Object.defineProperties,Np=Object.getOwnPropertyDescriptors,Hn=Object.getOwnPropertySymbols,L0=Object.prototype.hasOwnProperty,D0=Object.prototype.propertyIsEnumerable,$s=(e,t,i)=>t in e?Ip(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,f=(e,t)=>{for(var i in t||(t={}))L0.call(t,i)&&$s(e,i,t[i]);if(Hn)for(var i of Hn(t))D0.call(t,i)&&$s(e,i,t[i]);return e},y=(e,t)=>Rp(e,Np(t)),Ps=e=>typeof e=="symbol"?e:e+"",Wn=(e,t)=>{var i={};for(var r in e)L0.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(e!=null&&Hn)for(var r of Hn(e))t.indexOf(r)<0&&D0.call(e,r)&&(i[r]=e[r]);return i};function Ue(){return"window"in globalThis&&"document"in globalThis}function E0(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function qp(){try{return window.self!==window.top}catch{return!0}}function B0(){return typeof navigator.vibrate=="function"}function kr(){var e,t;if(!Ue())return"other";let i=(t=(e=navigator.userAgentData)==null?void 0:e.platform)!=null?t:navigator.platform;return/^mac/i.test(i)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(i)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function Vp(){if(!Ue())return!0;if(/firefox/i.test(navigator.userAgent)){let e=navigator.userAgent.match(/firefox\/(\d+)/i);return e?parseInt(e[1])>=78:!1}if(/trident/i.test(navigator.userAgent))return!1;if(/edge/i.test(navigator.userAgent)){let e=navigator.userAgent.match(/edg\/(\d+)/i);return e?parseInt(e[1])>=79:!1}return!0}function Os(){return HTMLElement.prototype.hasOwnProperty("popover")}var jp={id:"dvorak",locale:"en",displayName:"Dvorak",virtualLayout:"dvorak",platform:"",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["x","X","≈","˛"],KeyC:["j","J","∆","Ô"],KeyD:["e","E","´","´"],KeyE:[".",">","≥","˘"],KeyF:["u","U","¨","¨"],KeyG:["i","I","ˆ","ˆ"],KeyH:["d","D","∂","Î"],KeyI:["c","C","ç","Ç"],KeyJ:["h","H","˙","Ó"],KeyK:["t","T","†","ˇ"],KeyL:["n","N","˜","˜"],KeyM:["m","M","µ","Â"],KeyN:["b","B","∫","ı"],KeyO:["r","R","®","‰"],KeyP:["l","L","¬","Ò"],KeyQ:["'",'"',"æ","Æ"],KeyR:["p","P","π","∏"],KeyS:["o","O","ø","Ø"],KeyT:["y","Y","¥","Á"],KeyU:["g","G","©","˝"],KeyV:["k","K","˚",""],KeyW:[",","<","≤","¯"],KeyX:["q","Q","œ","Œ"],KeyY:["f","F","ƒ","Ï"],KeyZ:[";",":","…","Ú"],Digit1:["1","!","¡","⁄"],Digit2:["2","@","™","€"],Digit3:["3","#","£","‹"],Digit4:["4","$","¢","›"],Digit5:["5","%","∞","fi"],Digit6:["6","^","§","fl"],Digit7:["7","&","¶","‡"],Digit8:["8","*","•","°"],Digit9:["9","(","ª","·"],Digit0:["0",")","º","‚"],Space:[" "," "," "," "],Minus:["[","{","“","”"],Equal:["]","}","‘","’"],BracketLeft:["/","?","÷","¿"],BracketRight:["=","+","≠","±"],Backslash:["\\","|","«","»"],Semicolon:["s","S","ß","Í"],Quote:["-","_","–","—"],Backquote:["`","~","`","`"],Comma:["w","W","∑","„"],Period:["v","V","√","◊"],Slash:["z","Z","Ω","¸"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["§","±","§","±"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},El={id:"apple.en-intl",displayName:"English (international)",virtualLayout:"qwerty",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","∫","ı"],KeyC:["c","C","ç","Ç"],KeyD:["d","D","∂","Î"],KeyE:["e","E","´","´"],KeyF:["f","F","ƒ","Ï"],KeyG:["g","G","©","˝"],KeyH:["h","H","˙","Ó"],KeyI:["i","I","ˆ","ˆ"],KeyJ:["j","J","∆","Ô"],KeyK:["k","K","˚",""],KeyL:["l","L","¬","Ò"],KeyM:["m","M","µ","Â"],KeyN:["n","N","˜","˜"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],Ke
1yQ:["q","Q","œ","Œ"],KeyR:["r","R","®","‰"],KeyS:["s","S","ß","Í"],KeyT:["t","T","†","ˇ"],KeyU:["u","U","¨","¨"],KeyV:["v","V","√","◊"],KeyW:["w","W","∑","„"],KeyX:["x","X","≈","˛"],KeyY:["y","Y","¥","Á"],KeyZ:["z","Z","Ω","¸"],Digit1:["1","!","¡","⁄"],Digit2:["2","@","™","€"],Digit3:["3","#","£","‹"],Digit4:["4","$","¢","›"],Digit5:["5","%","∞","fi"],Digit6:["6","^","§","fl"],Digit7:["7","&","¶","‡"],Digit8:["8","*","•","°"],Digit9:["9","(","ª","·"],Digit0:["0",")","º","‚"],Space:[" "," "," "," "],Minus:["-","_","–","—"],Equal:["=","+","≠","±"],BracketLeft:["[","{","“","”"],BracketRight:["]","}","‘","’"],Backslash:["\\","|","«","»"],Semicolon:[";",":","…","Ú"],Quote:["'",'"',"æ","Æ"],Backquote:["`","˜","`","`"],Comma:[",","<","≤","¯"],Period:[".",">","≥","˘"],Slash:["/","?","÷","¿"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["§","±","§","±"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},A0={id:"windows.en-intl",displayName:"English (international)",platform:"windows",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","á","Á"],KeyB:["b","B","",""],KeyC:["c","C","©","¢"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","é","É"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","í","Í"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","ø","Ø"],KeyM:["m","M","µ",""],KeyN:["n","N","ñ","Ñ"],KeyO:["o","O","ó","Ó"],KeyP:["p","P","ö","Ö"],KeyQ:["q","Q","ä","Ä"],KeyR:["r","R","®",""],KeyS:["s","S","ß","§"],KeyT:["t","T","þ","Þ"],KeyU:["u","U","ú","Ú"],KeyV:["v","V","",""],KeyW:["w","W","å","Å"],KeyX:["x","X","",""],KeyY:["y","Y","ü","Ü"],KeyZ:["z","Z","æ","Æ"],Digit1:["1","!","¡","¹"],Digit2:["2","@","²",""],Digit3:["3","#","³",""],Digit4:["4","$","¤","£"],Digit5:["5","%","€",""],Digit6:["6","^","¼",""],Digit7:["7","&","½",""],Digit8:["8","*","¾",""],Digit9:["9","(","‘",""],Digit0:["0",")","’",""],Space:[" "," ","",""],Minus:["-","_","¥",""],Equal:["=","+","×","÷"],BracketLeft:["[","{","«",""],BracketRight:["]","}","»",""],Backslash:["\\","|","¬","¦"],Semicolon:[";",":","¶","°"],Quote:["'",'"',"´","¨"],Backquote:["`","~","",""],Comma:[",","<","ç","Ç"],Period:[".",">","",""],Slash:["/","?","¿",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}},T0={id:"linux.en",displayName:"English",platform:"linux",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},Hp={id:"apple.french",locale:"fr",displayName:"French",platform:"apple",virtualLayout:"azerty",score:0,mapping:{KeyA:["q","Q","‡","Ω"],KeyB:["b","B","ß","∫"],KeyC:["c","C","©","¢"],KeyD:["d","D","∂","∆"],KeyE:["e","E","ê","Ê"],KeyF:["f","F","ƒ","·"],KeyG:["g","G","fi","fl"],KeyH:["h","H","Ì","Î"],KeyI:["i","I","î","ï"],KeyJ:["j","J","Ï","Í"],KeyK:["k","K","È","Ë"],KeyL:["l","L","¬","|"],KeyM:[",","?","∞","¿"],KeyN:["n","N","~","ı"],KeyO:["o","O","œ","Œ"],KeyP:["p","P","π","∏"],Ke
1yQ:["a","A","æ","Æ"],KeyR:["r","R","®","‚"],KeyS:["s","S","Ò","∑"],KeyT:["t","T","†","™"],KeyU:["u","U","º","ª"],KeyV:["v","V","◊","√"],KeyW:["z","Z","Â","Å"],KeyX:["x","X","≈","⁄"],KeyY:["y","Y","Ú","Ÿ"],KeyZ:["w","W","‹","›"],Digit1:["&","1","","´"],Digit2:["é","2","ë","„"],Digit3:['"',"3","“","”"],Digit4:["'","4","‘","’"],Digit5:["(","5","{","["],Digit6:["§","6","¶","å"],Digit7:["è","7","«","»"],Digit8:["!","8","¡","Û"],Digit9:["ç","9","Ç","Á"],Digit0:["à","0","ø","Ø"],Space:[" "," "," "," "],Minus:[")","°","}","]"],Equal:["-","_","—","–"],BracketLeft:["^","¨","ô","Ô"],BracketRight:["$","*","€","¥"],Backslash:["`","£","@","#"],Semicolon:["m","M","µ","Ó"],Quote:["ù","%","Ù","‰"],Backquote:["<",">","≤","≥"],Comma:[";",".","…","•"],Period:[":","/","÷","\\"],Slash:["=","+","≠","±"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","•","Ÿ"],NumpadEqual:["=","=","=","="]}},Wp={id:"windows.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["é","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["è","7","`",""],Digit8:["_","8","\\",""],Digit9:["ç","9","^",""],Digit0:["à","0","@",""],Space:[" "," ","",""],Minus:[")","°","]",""],Equal:["=","+","}",""],BracketLeft:["^","¨","",""],BracketRight:["$","£","¤",""],Backslash:["*","µ","",""],Semicolon:["m","M","",""],Quote:["ù","%","",""],Backquote:["²","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","§","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Up={id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","Ω"],KeyB:["b","B","”","’"],KeyC:["c","C","¢","©"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","€","¢"],KeyF:["f","F","đ","ª"],KeyG:["g","G","ŋ","Ŋ"],KeyH:["h","H","ħ","Ħ"],KeyI:["i","I","→","ı"],KeyJ:["j","J","̉","̛"],KeyK:["k","K","ĸ","&"],KeyL:["l","L","ł","Ł"],KeyM:[",","?","́","̋"],KeyN:["n","N","n","N"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","þ","Þ"],KeyQ:["a","A","æ","Æ"],KeyR:["r","R","¶","®"],KeyS:["s","S","ß","§"],KeyT:["t","T","ŧ","Ŧ"],KeyU:["u","U","↓","↑"],KeyV:["v","V","“","‘"],KeyW:["z","Z","«","<"],KeyX:["x","X","»",">"],KeyY:["y","Y","←","¥"],KeyZ:["w","W","ł","Ł"],Digit1:["&","1","¹","¡"],Digit2:["é","2","~","⅛"],Digit3:['"',"3","#","£"],Digit4:["'","4","{","$"],Digit5:["(","5","[","⅜"],Digit6:["-","6","|","⅝"],Digit7:["è","7","`","⅞"],Digit8:["_","8","\\","™"],Digit9:["ç","9","^","±"],Digit0:["à","0","@","°"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:["	","","	",""],Space:[" "," "," "," "],Minus:[")","°","]","¿"],Equal:["=","+","}","̨"],BracketLeft:["̂","̈","̈","̊"],BracketRight:["$","£","¤","̄"],Backslash:["*","µ","̀","̆"],Semicolon:["m","M","µ","º"],Quote:["ù","%","̂","̌"],Backquote:["²","~","¬","¬"],Comma:[";",".","─","×"],Period:[":","/","·","÷"],Slash:["!","§","̣","̇"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"]}},Jp={id:"apple.german",locale:"de",displayName:"German",virtualLayout:"qwertz",platform:"apple",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","∫","‹"],KeyC:["c","C","ç","Ç"],KeyD:["d","D","∂","™"],KeyE:["e","E","€","‰"],KeyF:["f","F","ƒ","Ï"],Ke
1yG:["g","G","©","Ì"],KeyH:["h","H","ª","Ó"],KeyI:["i","I","⁄","Û"],KeyJ:["j","J","º","ı"],KeyK:["k","K","∆","ˆ"],KeyL:["l","L","@","fl"],KeyM:["m","M","µ","˘"],KeyN:["n","N","~","›"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","«","»"],KeyR:["r","R","®","¸"],KeyS:["s","S","‚","Í"],KeyT:["t","T","†","˝"],KeyU:["u","U","¨","Á"],KeyV:["v","V","√","◊"],KeyW:["w","W","∑","„"],KeyX:["x","X","≈","Ù"],KeyY:["z","Z","Ω","ˇ"],KeyZ:["y","Y","¥","‡"],Digit1:["1","!","¡","¬"],Digit2:["2",'"',"“","”"],Digit3:["3","§","¶","#"],Digit4:["4","$","¢","£"],Digit5:["5","%","[","fi"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","˜"],Digit9:["9",")","}","·"],Digit0:["0","=","≠","¯"],Space:[" "," "," "," "],Minus:["ß","?","¿","˙"],Equal:["´","`","'","˚"],BracketLeft:["ü","Ü","•","°"],BracketRight:["+","*","±",""],Backslash:["#","'","‘","’"],Semicolon:["ö","Ö","œ","Œ"],Quote:["ä","Ä","æ","Æ"],Backquote:["<",">","≤","≥"],Comma:[",",";","∞","˛"],Period:[".",":","…","÷"],Slash:["-","_","–","—"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","°","„","“"],NumpadEqual:["=","=","=","="]}},Xp={id:"windows.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","µ",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"²",""],Digit3:["3","§","³",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["ß","?","\\","ẞ"],Equal:["´","`","",""],BracketLeft:["ü","Ü","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["ö","Ö","",""],Quote:["ä","Ä","",""],Backquote:["^","°","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}},Gp={id:"linux.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","æ","Æ"],KeyB:["b","B","“","‘"],KeyC:["c","C","¢","©"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","€","€"],KeyF:["f","F","đ","ª"],KeyG:["g","G","ŋ","Ŋ"],KeyH:["h","H","ħ","Ħ"],KeyI:["i","I","→","ı"],KeyJ:["j","J","̣","̇"],KeyK:["k","K","ĸ","&"],KeyL:["l","L","ł","Ł"],KeyM:["m","M","µ","º"],KeyN:["n","N","”","’"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","þ","Þ"],KeyQ:["q","Q","@","Ω"],KeyR:["r","R","¶","®"],KeyS:["s","S","ſ","ẞ"],KeyT:["t","T","ŧ","Ŧ"],KeyU:["u","U","↓","↑"],KeyV:["v","V","„","‚"],KeyW:["w","W","ł","Ł"],KeyX:["x","X","«","‹"],KeyY:["z","Z","←","¥"],KeyZ:["y","Y","»","›"],Digit1:["1","!","¹","¡"],Digit2:["2",'"',"²","⅛"],Digit3:["3","§","³","£"],Digit4:["4","$","¼","¤"],Digit5:["5","%","½","⅜"],Digit6:["6","&","¬","⅝"],Digit7:["7","/","{","⅞"],Digit8:["8","(","[","™"],Digit9:["9",")","]","±"],Digit0:["0","=","}","°"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:["	","","	",""],Space:[" "," "," "," "],Minus:["ß","?","\\","¿"],Equal:["́","̀","̧","̨"],BracketLeft:["ü","Ü","̈","̊"],BracketRight:["+","*","~","¯"],Backslash:["#","'","’","̆"],Semicolon:["ö","Ö","̋","̣"],Quote:["ä","Ä","̂","̌"],Backquote:["̂","°","′","″"],Comma:[",",";","·","×"],Period:[".",":","…","÷"],Slash:["-","_","–","—"],PrintScreen:["","","",""],PageUp:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",",","",","],IntlBackslash:["<",">","|","̱"],AltRight:["\r","\r","\r","\r"],MetaRight:[".",".",".","."]}},Zp={id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","ß",""],KeyC:["c","C","©"," "],KeyD:["d","D","∂","∆"],KeyE:["e","E","€","€"],KeyF:["f","F","ƒ","fi"],KeyG:["g","G","","fl"],KeyH:["h","H","™"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","¶","¯"],KeyK:["k","K","§","ˇ"],Ke
1yL:["l","L"," ","˘"],KeyM:["m","M","µ","˚"],KeyN:["n","N"," ","˙"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","œ","Œ"],KeyR:["r","R","®"," "],KeyS:["s","S","∫"," "],KeyT:["t","T","†","‡"],KeyU:["u","U"," "," "],KeyV:["v","V","√","◊"],KeyW:["w","W","æ","Æ"],KeyX:["x","X","∑","›"],KeyY:["y","Y","¥"," "],KeyZ:["z","Z","Ω","‹"],Digit1:["1","!","|","ı"],Digit2:["2",'"',"@","˝"],Digit3:["3","·","#","•"],Digit4:["4","$","¢","£"],Digit5:["5","%","∞","‰"],Digit6:["6","&","¬"," "],Digit7:["7","/","÷","⁄"],Digit8:["8","(","“","‘"],Digit9:["9",")","”","’"],Digit0:["0","=","≠","≈"],Space:[" "," "," "," "],Minus:["'","?","´","¸"],Equal:["¡","¿","‚","˛"],BracketLeft:["`","^","[","ˆ"],BracketRight:["+","*","]","±"],Backslash:["ç","Ç","}","»"],Semicolon:["ñ","Ñ","~","˜"],Quote:["´","¨","{","«"],Backquote:["<",">","≤","≥"],Comma:[",",";","„",""],Period:[".",":","…","…"],Slash:["-","_","–","—"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["º","ª","\\","°"]}},Yp={id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","·","#",""],Digit4:["4","$","~",""],Digit5:["5","%","€",""],Digit6:["6","&","¬",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["¡","¿","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["ç","Ç","}",""],Semicolon:["ñ","Ñ","",""],Quote:["´","¨","{",""],Backquote:["º","ª","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Qp={id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","æ","Æ"],KeyB:["b","B","”","’"],KeyC:["c","C","¢","©"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","€","¢"],KeyF:["f","F","đ","ª"],KeyG:["g","G","ŋ","Ŋ"],KeyH:["h","H","ħ","Ħ"],KeyI:["i","I","→","ı"],KeyJ:["j","J","̉","̛"],KeyK:["k","K","ĸ","&"],KeyL:["l","L","ł","Ł"],KeyM:["m","M","µ","º"],KeyN:["n","N","n","N"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","þ","Þ"],KeyQ:["q","Q","@","Ω"],KeyR:["r","R","¶","®"],KeyS:["s","S","ß","§"],KeyT:["t","T","ŧ","Ŧ"],KeyU:["u","U","↓","↑"],KeyV:["v","V","“","‘"],KeyW:["w","W","ł","Ł"],KeyX:["x","X","»",">"],KeyY:["y","Y","←","¥"],KeyZ:["z","Z","«","<"],Digit1:["1","!","|","¡"],Digit2:["2",'"',"@","⅛"],Digit3:["3","·","#","£"],Digit4:["4","$","~","$"],Digit5:["5","%","½","⅜"],Digit6:["6","&","¬","⅝"],Digit7:["7","/","{","⅞"],Digit8:["8","(","[","™"],Digit9:["9",")","]","±"],Digit0:["0","=","}","°"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:["	","","	",""],Space:[" "," "," "," "],Minus:["'","?","\\","¿"],Equal:["¡","¿","̃","~"],BracketLeft:["̀","̂","[","̊"],BracketRight:["+","*","]","̄"],Backslash:["ç","Ç","}","̆"],Semicolon:["ñ","Ñ","~","̋"],Quote:["́","̈","{","{"],Backquote:["º","ª","\\","\\"],Comma:[",",";
1","─","×"],Period:[".",":","·","÷"],Slash:["-","_","̣","̇"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}};function F0(e){let t=e.split("+"),i={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:t.pop()};return t.includes("shift")&&(i.shift=!0),t.includes("alt")&&(i.alt=!0),t.includes("ctrl")&&(i.ctrl=!0),t.includes("cmd")&&(i.cmd=!0),t.includes("win")&&(i.win=!0),t.includes("meta")&&(i.meta=!0),i}function or(e){let t="";return e.shift&&(t+="shift+"),e.alt&&(t+="alt+"),e.ctrl&&(t+="ctrl+"),e.cmd&&(t+="cmd+"),e.win&&(t+="win+"),e.meta&&(t+="meta+"),t+e.key}var em={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},vr=[],zi;function cs(){switch(kr()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function Pe(e){(!e.platform||e.platform===cs())&&vr.push(e)}function tm(e,t){var i;let r={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!e)return r;for(let[a,n]of Object.entries(t.mapping)){if(n[0]===e)return r.key=`[${a}]`,r;if(n[1]===e)return r.shift=!0,r.key=`[${a}]`,r;if(n[2]===e)return r.alt=!0,r.key=`[${a}]`,r;if(n[3]===e)return r.shift=!0,r.alt=!0,r.key=`[${a}]`,r}return r.key=(i=em[e])!=null?i:"",r}function im(e){if(e.code)return e;let t=Object.entries(na().mapping),i=!1,r=!1,a="";for(let n=0;n<4;n++){for(let[o,l]of t)if(l[n]===e.key){a=o,n===3?(i=!0,r=!0):n===2?i=!0:n===1&&(r=!0);break}if(a)break}return new KeyboardEvent(e.type,y(f({},e),{altKey:i,shiftKey:r,code:a}))}function rm(e){var t,i;if(!e||e.key==="Unidentified"||e.key==="Dead")return;let r=e.shiftKey&&e.altKey?3:e.altKey?2:e.shiftKey?1:0;for(let a of vr)((t=a.mapping[e.code])==null?void 0:t[r])===e.key?a.score+=1:(i=a.mapping[e.code])!=null&&i[r]&&(a.score=0);vr.sort((a,n)=>n.score-a.score)}function z0(e){zi=vr.find(t=>e.startsWith(t.locale))}function am(e){return zi=vr.find(t=>t.id===e),zi}function na(){return zi??vr[0]}function nm(){switch(cs()){case"apple":return El;case"windows":return A0;case"linux":return T0}return El}switch(cs()){case"apple":Pe(El),Pe(Hp),Pe(Zp),Pe(Jp);break;case"windows":Pe(A0),Pe(Wp),Pe(Yp),Pe(Xp);break;case"linux":Pe(T0),Pe(Up),Pe(Qp),Pe(Gp);break}Pe(jp);function eb(e){am(e)}function tb(e){z0(e)}function ve(e){return Array.isArray(e)}var om={en:{"keyboard.tooltip.symbols":"Symbols","keyboard.tooltip.greek":"Greek Letters","keyboard.tooltip.numeric":"Numeric","keyboard.tooltip.alphabetic":"Roman Letters","tooltip.copy to clipboard":"Copy to Clipboard","tooltip.cut to clipboard":"Cut to Clipboard","tooltip.paste from clipboard":"Paste from Clipboard","tooltip.redo":"Redo","tooltip.toggle virtual keyboard":"Toggle Virtual Keyboard","tooltip.menu":"Menu","tooltip.undo":"Undo","menu.borders":"Borders","menu.insert matrix":"Insert Matrix","menu.array.add row above":"Add Row Before","menu.array.add row below":"Add Row After","menu.array.add column after":"Add Column After","menu.array.add column before":"Add Column Before","menu.array.delete row":"Delete Row","menu.array.delete rows":"Delete Selected Rows","menu.array.delete column":"Delete Column","menu.array.delete columns":"Delete Selected Columns","menu.mode":"Mode","menu.mode-math":"Math","menu.mode-text":"Text","menu.mode-latex":"LaTeX","menu.insert":"Insert","menu.insert.abs":"Absolute Value","menu.insert.abs-template":"\\left|x\\right|","menu.insert.nth-root":"n<sup>th</sup> Root","menu.insert.nth-root-template":"\\sqrt[n]{x}","menu.insert.log-base":"Logarithm base a","menu.insert.log-base-template":"\\log_a(x)","menu.insert.heading-calculus":"Calculus","menu.insert.derivative":"Derivative","menu.insert.derivative-template":"\\dfrac{\\mathrm{d}}{\\mathrm{d}x}
1f(x)\\bigm|_{x=a}","menu.insert.nth-derivative":"n<sup>th</sup> derivative","menu.insert.nth-derivative-template":"\\dfrac{\\mathrm{d}^n}{\\mathrm{d}x^n}f(x)\\bigm|_{x=a}","menu.insert.integral":"Integral","menu.insert.integral-template":"$\\int_a^b f(x)\\,\\mathrm{d}x$","menu.insert.sum":"Sum","menu.insert.sum-template":"$\\sum_{i=1}^n x_i$","menu.insert.product":"Product","menu.insert.product-template":"\\prod_{i=1}^n x_i","menu.insert.heading-complex-numbers":"Complex Numbers","menu.insert.modulus":"Modulus","menu.insert.modulus-template":"\\lvert z \\rvert","menu.insert.argument":"Argument","menu.insert.argument-template":"\\arg(z)","menu.insert.real-part":"Real Part","menu.insert.real-part-template":"\\Re(z)","menu.insert.imaginary-part":"Imaginary Part","menu.insert.imaginary-part-template":"\\Im(z)","menu.insert.conjugate":"Conjugate","menu.insert.conjugate-template":"\\overline{z}","tooltip.blackboard":"Blackboard","tooltip.bold":"Bold","tooltip.italic":"Italic","tooltip.fraktur":"Fraktur","tooltip.script":"Script","tooltip.caligraphic":"Caligraphic","tooltip.typewriter":"Typewriter","tooltip.roman-upright":"Roman Upright","tooltip.row-by-col":"%@ × %@","menu.font-style":"Font Style","menu.accent":"Accent","menu.decoration":"Decoration","menu.color":"Color","menu.background-color":"Background","menu.evaluate":"Evaluate","menu.simplify":"Simplify","menu.solve":"Solve","menu.solve-for":"Solve for %@","menu.cut":"Cut","menu.copy":"Copy","menu.copy-as-latex":"Copy as LaTeX","menu.copy-as-typst":"Copy as Typst","menu.copy-as-ascii-math":"Copy as ASCII Math","menu.copy-as-mathml":"Copy as MathML","menu.paste":"Paste","menu.select-all":"Select All","color.red":"Red","color.orange":"Orange","color.yellow":"Yellow","color.lime":"Lime","color.green":"Green","color.teal":"Teal","color.cyan":"Cyan","color.blue":"Blue","color.indigo":"Indigo","color.purple":"Purple","color.magenta":"Magenta","color.black":"Black","color.dark-grey":"Dark Grey","color.grey":"Grey","color.light-grey":"Light Grey","color.white":"White"},ar:{"keyboard.tooltip.symbols":"حرف او رمز","keyboard.tooltip.greek":"حروف يونانية","keyboard.tooltip.numeric":"الرقمية","keyboard.tooltip.alphabetic":"رموز الاحرف الرومانية","tooltip.copy to clipboard":"نسخ إلى الحافظة","tooltip.cut to clipboard":"قص إلى الحافظة","tooltip.paste from clipboard":"لصق من الحافظة","tooltip.redo":"الإعادة","tooltip.toggle virtual keyboard":"تبديل لوحة المفاتيح الإفتراضية","tooltip.undo":"إلغاء","menu.insert matrix":"أدخل المصفوفة","menu.borders":"محددات المصفوفة","menu.array.add row above":"أضف صفًا بعد ذلك","menu.array.add row below":"أضف الصف قبل","menu.array.add column after":"أضف العمود بعد ذلك","menu.array.add column before":"أضف العمود قبل","menu.array.delete row":"احذف صف","menu.array.delete rows":"حذف الصفوف المحددة","menu.array.delete column":"حذف العمود","menu.array.delete columns":"حذف الأعمدة المحددة","menu.mode":"وضع","menu.mode-math":"رياضيات","menu.mode-text":"نص","menu.mode-latex":"لاتكس","tooltip.blackboard":"سبورة","tooltip.bold":"عريض","tooltip.italic":"مائل","tooltip.fraktur":"فراكتور","tooltip.script":"سكريبت","tooltip.caligraphic":"كاليجرافيك","tooltip.typewriter":"آلة كاتبة","tooltip.roman-upright":"روماني مستقيم","tooltip.row-by-col":"%@ × %@","menu.font-style":"نمط الخط","menu.accent":"تشكيل","menu.decoration":"زخرفة","menu.color":"لون","menu.background-color":"الخلفية","menu.evaluate":"تقييم","menu.simplify":"تبسيط","menu.solve":"حل","menu.solve-for":"حل لـ %@","menu.cut":"قص","menu.copy":"نسخ","menu.copy-as-latex":"نسخ كـ LaTeX","menu.copy-as-ascii-math":"نسخ كـ ASCII Math","menu.copy-as-mathml":"نسخ كـ MathML","menu.paste":"لصق","menu.select-all":"تحديد الكل","color.red":"أحمر","color.orange":"برتقالي","color.yellow":"أصفر","color.lime":"ليموني","color.green":"أخضر","color.teal":"سماوي","color.cyan":"سماوي فاتح","color.blue":"أزرق","color.indigo":"نيلي","color.purple":"بنفسجي","color.magenta":"أرجواني","color.black":"أسود","color.dark-grey":"رمادي غامق","color.grey":"رمادي","color.light-grey":"رمادي فاتح","color.white":"أبيض"},de:{"keyboard.tooltip.symbols":"Symbole","keyboard.tooltip.greek":"Griechische Buchstaben","keyboard.tooltip.numeric":"Numerisch","keyboard.tooltip.alphabetic":"Römische Buchstaben","tooltip.copy to clipboard":"In die Zwischenablage kopieren","tooltip.redo":"Wiederholen","tooltip.toggle virtual keyboard":"Virtuelle Tastatur umschalten","tooltip.undo":"Widerrufen","menu.insert matrix":"Matrix einfügen","menu.borders":"Matrixtrennzeichen","menu.array.add row above":"Zeile hinzufügen nach","menu.array.add row below":"Zeile hinzufügen vor","menu.array.add column after":"Spalte hinzufügen nach","menu.array.add column before":"Spalte hinzufügen vor","menu.array.delete row":"Zeile löschen","menu.array.delete rows":"Ausgewählte Zeilen löschen","menu.array.delete column":"Spalte löschen","menu.array.delete columns":"Ausgewählte Spalten löschen","menu.mode":"Modus","menu.mode-math":"Mathematik","menu.mode-text":"Text","menu.mode-latex":"LaTeX","tooltip.blackboard":"Tafel","tooltip.bold":"Fett","tooltip.italic":"Kursiv","tooltip.fraktur":"Fraktur","tooltip.script":"Skript","tooltip.caligraphic":"Kalligraphie","tooltip.typewriter":"Schreibmaschine","tooltip.roman-upright":"Römisch aufrecht","tooltip.row-by-col":"%@ × %@","menu.font-style":"Schriftstil","menu.accent":"Akzent","menu.decoration":"Dekoration","menu.color":"Farbe","menu.background-color":"Hintergrund","menu.evaluate":"Auswerten","menu.simplify":"Vereinfachen","menu.solve":"Lösen","menu.solve-for":"Lösen für %@","menu.cut":"Ausschneiden","menu.copy":"Kopieren","menu.copy-as-latex":"Als LaTeX kopieren","menu.copy-as-ascii-math":"Als ASCII Math kopieren","menu.copy-as-mathml":"Als MathML kopieren","menu.paste":"Einfügen","menu.select-all":"Alles auswählen","color.red":"Rot","color.orange":"Orange","color.yellow":"Gelb","color.lime":"Limette","color.green":"Grün","color.teal":"Blaugrün","color.cyan":"Cyan","color.blue":"Blau","color.indigo":"Indigo","color.purple":"Lila","color.magenta":"Magenta","color.black":"Schwarz","color.dark-grey":"Dunkelgrau","color.grey":"Grau","color.light-grey":"Hellgrau","color.white":"Weiß"},el:{"keyboard.tooltip.symbols":"σύμβολα","keyboard.tooltip.greek":"ελληνικά γράμματα","keyboard.tooltip.numeric":"Αριθμητικός","keyboard.tooltip.alphabetic":"Ρωμαϊκά γράμματα","tooltip.copy to clipboard":"Αντιγραφή στο πρόχειρο","tooltip.redo":"Ξανακάνω","tooltip.toggle virtual keyboard":"Εναλλαγή εικονικού πληκτρολογίου","tooltip.undo":"Ξεκάνω","menu.insert matrix":"Εισαγωγή μήτρα","menu.borders":"Οριοθέτες μήτρα","menu.array.add row above":"Προσθήκη σειράς μετά","menu.array.add row below":"Προσθήκη σειράς πριν","menu.array.add column after":"Προσθήκη στήλης μετά","menu.array.add column before":"Προσθήκη στήλης πριν","menu.array.delete row":"Διαγραφή σειράς","menu.array.delete rows":"Διαγραφή επιλεγμένων σειρών","menu.array.delete column":"Διαγραφή στήλης","menu.array.delete columns":"Διαγραφή επιλεγμένων στηλών","menu.mode":"Λειτουργία","menu.mode-math":"Μαθηματικά","menu.mode-text":"Κείμενο","menu.mode-latex":"LaTeX","tooltip.blackboard":"Πίνακας","tooltip.bold":"Έντονη","tooltip.italic":"Πλάγια","tooltip.fraktur":"Φράκτουρ","tooltip.script":"Σενάριο","tooltip.caligraphic":"Καλλιγραφική","tooltip.typewriter":"Μηχανή γραφής","tooltip.roman-upright":"Ρωμαϊκό Κατακόρυφο","tooltip.row-by-col":"%@ × %@","menu.font-style":"Στυλ γραμματοσειράς","menu.accent":"Τόνος","menu.decoration":"Διακόσμηση","menu.color":"Χρώμα","menu.background-color":"Χρώμα φόντου","menu.evaluate":"Αξιολόγηση","menu.simplify":"Απλοποίηση","menu.solve":"Λύση","menu.solve-for":"Λύση για %@","menu.cut":"Αποκοπή","menu.copy":"Αντιγραφή","menu.copy-as-latex":"Αντιγραφή ως LaTeX","menu.copy-as-ascii-math":"Αντιγραφή ως ASCII Math","menu.copy-as-mathml":"Αντιγραφή ως MathML","menu.paste":"Επικόλληση","menu.select-all":"Επιλογή όλων","color.red":"Κόκκινο","color.orange":"Πορτοκαλί","color.yellow":"Κίτρινο","color.lime":"Λαχανί","color.green":"Πράσινο","color.teal":"Κυανό","color.cyan":"Γαλάζιο","color.blue":"Μπλε","color.indigo":"Ινδικό","color.purple":"Μωβ","color.magenta":"Ματζέντα","color.black":"Μαύρο","color.dark-grey":"Σκούρο Γκρι","color.grey":"Γκρι","color.light-grey":"Ανοιχτό Γκρι","color.white":"Λευκό"},es:{"keyboard.tooltip.symbols":"Símbolos","keyboard.tooltip.greek":"Letras griegas","keyboard.tooltip.numeric":"Numérico","keyboard.tooltip.alphabetic":"Letras romanas","tooltip.copy to clipboard":"Copiar al portapapeles","tooltip.redo":"Rehacer","tooltip.toggle virtual keyboard":"Alternar teclado virtual","tooltip.undo":"Deshacer","menu.insert matrix":"Añadir Matriz","menu.borders":"Delimitadores de Matriz","menu.array.add row above":"Añadir Línea Antes","menu.array.add row below":"Añadir Línea Despues","menu.array.add column after":"Añadir Columna Despues","menu.array.add column before":"Añadir Columna Antes","menu.array.delete row":"Borrar Línea","menu.array.delete rows":"Borrar Líneas Seleccionad
1as","menu.array.delete column":"Borrar Columna","menu.array.delete columns":"Borrar Columnas Seleccionadas","menu.mode":"Modo","menu.mode-math":"Matemáticas","menu.mode-text":"Texto","menu.mode-latex":"LaTeX","tooltip.blackboard":"Pizarra","tooltip.bold":"Negrita","tooltip.italic":"Cursiva","tooltip.fraktur":"Fraktur","tooltip.script":"Script","tooltip.caligraphic":"Caligráfico","tooltip.typewriter":"Máquina de escribir","tooltip.roman-upright":"Romano Vertical","tooltip.row-by-col":"%@ × %@","menu.font-style":"Estilo de fuente","menu.accent":"Acento","menu.decoration":"Decoración","menu.color":"Color","menu.background-color":"Fondo","menu.evaluate":"Evaluar","menu.simplify":"Simplificar","menu.solve":"Resolver","menu.solve-for":"Resolver para %@","menu.cut":"Cortar","menu.copy":"Copiar","menu.copy-as-latex":"Copiar como LaTeX","menu.copy-as-ascii-math":"Copiar como ASCII Math","menu.copy-as-mathml":"Copiar como MathML","menu.paste":"Pegar","menu.select-all":"Seleccionar todo","color.red":"Rojo","color.orange":"Naranja","color.yellow":"Amarillo","color.lime":"Lima","color.green":"Verde","color.teal":"Verde azulado","color.cyan":"Cian","color.blue":"Azul","color.indigo":"Índigo","color.purple":"Morado","color.magenta":"Magenta","color.black":"Negro","color.dark-grey":"Gris oscuro","color.grey":"Gris","color.light-grey":"Gris claro","color.white":"Blanco"},fr:{"keyboard.tooltip.symbols":"Symboles","keyboard.tooltip.greek":"Lettres grecques","keyboard.tooltip.numeric":"Numérique","keyboard.tooltip.alphabetic":"Lettres romaines","tooltip.menu":"Menu","tooltip.copy to clipboard":"Copier dans le presse-papiers","tooltip.redo":"Rétablir","tooltip.toggle virtual keyboard":"Afficher/Masquer le clavier virtuel","tooltip.undo":"Annuler","menu.insert matrix":"Insérer une Matrice","menu.borders":"Bords","menu.array.add row above":"Ajouter une Ligne Avant","menu.array.add row below":"Ajouter une Ligne Après","menu.array.add column before":"Ajouter une Colonne Avant","menu.array.add column after":"Ajouter une Colonne Après","menu.array.delete row":"Enlever une Ligne","menu.array.delete rows":"Enlever les Lignes Sélectionées","menu.array.delete column":"Enlever une Colone","menu.array.delete columns":"Enlever les Colonnes Sélectionées","menu.mode":"Mode","menu.mode-math":"Math","menu.mode-text":"Text","menu.mode-latex":"LaTeX","tooltip.blackboard":"Tableau noir","tooltip.bold":"Gras","tooltip.italic":"Italique","tooltip.fraktur":"Fraktur","tooltip.script":"Script","tooltip.caligraphic":"Calligraphique","tooltip.typewriter":"Machine à écrire","tooltip.roman-upright":"Romain droit","tooltip.row-by-col":"%@ × %@","menu.font-style":"Style de police","menu.accent":"Accent","menu.decoration":"Décoration","menu.color":"Couleur","menu.background-color":"Arrière-plan","menu.evaluate":"Évaluer","menu.simplify":"Simplifier","menu.solve":"Résoudre","menu.solve-for":"Résoudre pour %@","menu.cut":"Couper","menu.copy":"Copier","menu.copy-as-latex":"Copier en LaTeX","menu.copy-as-ascii-math":"Copier en ASCII Math","menu.copy-as-mathml":"Copier en MathML","menu.paste":"Coller","menu.select-all":"Sélectionner tout","color.red":"Rouge","color.orange":"Orange","color.yellow":"Jaune","color.lime":"Citron vert","color.green":"Vert","color.teal":"Turquoise","color.cyan":"Cyan","color.blue":"Bleu","color.indigo":"Indigo","color.purple":"Violet","color.magenta":"Magenta","color.black":"Noir","color.dark-grey":"Gris foncé","color.grey":"Gris","color.light-grey":"Gris clair","color.white":"Blanc"},he:{"keyboard.tooltip.symbols":"סמלים","keyboard.tooltip.greek":"אותיות יווניות","keyboard.tooltip.numeric":"מספרי","keyboard.tooltip.alphabetic":"מכתבים רומיים","tooltip.copy to clipboard":"העתק ללוח","tooltip.redo":"לַעֲשׂוֹת שׁוּב","tooltip.toggle virtual keyboard":"החלף את המקלדת הווירטואלית","tooltip.undo":"לבטל","menu.insert matrix":"הכנס מטריקס","menu.borders":"מפרידי מטריקס","menu.array.add row above":"הוסף שורה אחרי","menu.array.add row below":"הוסף שורה לפני","menu.array.add column after":"הוסף עמודה אחרי","menu.array.add column before":"הוסף עמודה לפני","menu.array.delete row":"מחק שורה","menu.array.delete rows":"מחק שורות שנבחרו","menu.array.delete column":"מחק עמודה","menu.array.delete columns":"מחק עמודות שנבחרו","menu.mode":"מצב","menu.mode-math":"מתמטיקה","menu.mode-text":"טקסט","menu.mode-latex":"LaTeX","tooltip.blackboard":"לוח שחור","tooltip.bold":"מודגש","tooltip.italic":"נטוי","tooltip.fraktur":"פרקטור","tooltip.script":"כתב","tooltip.caligraphic":"קליגרפי","tooltip.typewriter":"מכונת כתיבה","tooltip.roman-upright":"רומי ישר","tooltip.row-by-col":"%@ × %@","menu.font-style":"סגנון גופן","menu.accent":"צליל","menu.decoration":"קישוט","menu.color":"צבע","menu.background-color":"רקע","menu.evaluate":"חשב","menu.simplify":"פשט","menu.solve":"פתור","menu.solve-for":"פתור עבור %@","menu.cut":"גזור","menu.copy":"העתק","menu.copy-as-latex":"העתק כ־LaTeX","menu.copy-as-ascii-math":"העתק כ־ASCII Math","menu.copy-as-mathml":"העתק כ־MathML","menu.paste":"הדבק","menu.select-all":"בחר הכל","color.red":"אדום","color.orange":"כתום","color.yellow":"צהוב","color.lime":"ירוק ליים","color.green":"ירוק","color.teal":"טיל","color.cyan":"ציאן","color.blue":"כחול","color.indigo":"אינדיגו","color.purple":"סגול","color.magenta":"מגנטה","color.black":"שחור","color.dark-grey":"אפור כהה","color.grey":"אפור","color.light-grey":"אפור בהיר","color.white":"לבן"},it:{"keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Lettere Greche","keyboard.tooltip.numeric":"Numerico","keyboard.tooltip.alphabetic":"Lettere Romane","tooltip.copy to clipboard":"Copia negli appunti","tooltip.cut to clipboard":"Taglia negli appunti","tooltip.paste from clipboard":"Incolla dagli appunti","tooltip.redo":"Ripeti","tooltip.toggle virtual keyboard":"Attiva/Disattiva Tastiera Virtuale","tooltip.menu":"Menu","tooltip.undo":"Annulla","menu.borders":"Bordi","menu.insert matrix":"Inserisci Matr
1ice","menu.array.add row above":"Aggiungi Riga Prima","menu.array.add row below":"Aggiungi Riga Dopo","menu.array.add column after":"Aggiungi Colonna Dopo","menu.array.add column before":"Aggiungi Colonna Prima","menu.array.delete row":"Elimina Riga","menu.array.delete rows":"Elimina Righe Selezionate","menu.array.delete column":"Elimina Colonna","menu.array.delete columns":"Elimina Colonne Selezionate","menu.mode":"Modalità","menu.mode-math":"Matematica","menu.mode-text":"Testo","menu.mode-latex":"LaTeX","menu.insert":"Inserisci","menu.insert.abs":"Valore Assoluto","menu.insert.abs-template":"\\left|x\\right|","menu.insert.nth-root":"Radice n-esima","menu.insert.nth-root-template":"\\sqrt[n]{x}","menu.insert.log-base":"Logaritmo in base a","menu.insert.log-base-template":"\\log_a(x)","menu.insert.heading-calculus":"Calcolo","menu.insert.derivative":"Derivata","menu.insert.derivative-template":"\\dfrac{\\mathrm{d}}{\\mathrm{d}x}f(x)\\bigm|_{x=a}","menu.insert.nth-derivative":"Derivata n-esima","menu.insert.nth-derivative-template":"\\dfrac{\\mathrm{d}^n}{\\mathrm{d}x^n}f(x)\\bigm|_{x=a}","menu.insert.integral":"Integrale","menu.insert.integral-template":"$\\int_a^b f(x)\\,\\mathrm{d}x$","menu.insert.sum":"Somma","menu.insert.sum-template":"$\\sum_{i=1}^n x_i$","menu.insert.product":"Prodotto","menu.insert.product-template":"\\prod_{i=1}^n x_i","menu.insert.heading-complex-numbers":"Numeri Complessi","menu.insert.modulus":"Modulo","menu.insert.modulus-template":"\\lvert z \\rvert","menu.insert.argument":"Argomento","menu.insert.argument-template":"\\arg(z)","menu.insert.real-part":"Parte Reale","menu.insert.real-part-template":"\\Re(z)","menu.insert.imaginary-part":"Parte Immaginaria","menu.insert.imaginary-part-template":"\\Im(z)","menu.insert.conjugate":"Coniugato","menu.insert.conjugate-template":"\\overline{z}","tooltip.blackboard":"Lavagna","tooltip.bold":"Grassetto","tooltip.italic":"Corsivo","tooltip.fraktur":"Fraktur","tooltip.script":"Script","tooltip.caligraphic":"Calligrafico","tooltip.typewriter":"Macchina da Scrivere","tooltip.roman-upright":"Romano Dritto","tooltip.row-by-col":"%@ × %@","menu.font-style":"Stile del Carattere","menu.accent":"Accento","menu.decoration":"Decorazione","menu.color":"Colore","menu.background-color":"Sfondo","menu.evaluate":"Valuta","menu.simplify":"Semplifica","menu.solve":"Risolvi","menu.solve-for":"Risolvi per %@","menu.cut":"Taglia","menu.copy":"Copia","menu.copy-as-latex":"Copia come LaTeX","menu.copy-as-ascii-math":"Copia come ASCII Math","menu.copy-as-mathml":"Copia come MathML","menu.paste":"Incolla","menu.select-all":"Seleziona Tutto","color.red":"Rosso","color.orange":"Arancione","color.yellow":"Giallo","color.lime":"Lime","color.green":"Verde","color.teal":"Verde Acqua","color.cyan":"Ciano","color.blue":"Blu","color.indigo":"Indaco","color.purple":"Viola","color.magenta":"Magenta","color.black":"Nero","color.dark-grey":"Grigio Scuro","color.grey":"Grigio","color.light-grey":"Grigio Chiaro","color.white":"Bianco"},ja:{"keyboard.tooltip.symbols":"シンボル","keyboard.tooltip.greek":"ギリシャ文字","keyboard.tooltip.numeric":"数値","keyboard.tooltip.alphabetic":"ローマ字","tooltip.menu":"メニュー","tooltip.copy to clipboard":"クリップボードにコピー","tooltip.redo":"やり直し","tooltip.toggle virtual keyboard":"仮想キーボードの切り替え","tooltip.undo":"元に戻す","menu.insert matrix":"マトリックスを挿入","menu.borders":"行列区切り文字","menu.array.add row above":"後に行を追加","menu.array.add row below":"前に行を追加","menu.array.add column after":"後に列を追加","menu.array.add column before":"前に列を追加","menu.array.delete row":"行を削除","menu.array.delete rows":"選択した行を削除する","menu.array.delete column":"列を削除","menu.array.delete columns":"選択した列を削除する","menu.mode":"モード","menu.mode-math":"数式","menu.mode-text":"テキスト","menu.mode-latex":"LaTeX","tooltip.blackboard":"黒板","tooltip.bold":"太字","tooltip.italic":"イタリック","tooltip.fraktur":"フラクトゥール","tooltip.script":"スクリプト","tooltip.caligraphic":"カリグラフィック","tooltip.typewriter":"タイプライター","tooltip.roman-upright":"ローマ直立","tooltip.row-by-col":"%@ × %@","menu.font-style":"フォントスタイル","menu.accent":"アクセント","menu.decoration":"装飾","menu.color":"色","menu.background-color":"背景","menu.evaluate":"評価","menu.simplify":"簡略化","menu.solve":"解く","menu.solve-for":"%@ を解く","menu.cut":"切り取り","menu.copy":"コピー","menu.copy-as-latex":"LaTeXã
1¨ã—てコピー","menu.copy-as-ascii-math":"ASCII Mathとしてコピー","menu.copy-as-mathml":"MathMLとしてコピー","menu.paste":"貼り付け","menu.select-all":"すべて選択","color.red":"赤","color.orange":"オレンジ","color.yellow":"黄色","color.lime":"ライム","color.green":"緑","color.teal":"ティール","color.cyan":"シアン","color.blue":"青","color.indigo":"インディゴ","color.purple":"ç´«","color.magenta":"マゼンタ","color.black":"黒","color.dark-grey":"濃いグレー","color.grey":"グレー","color.light-grey":"薄いグレー","color.white":"白"},ko:{"keyboard.tooltip.symbols":"기호","keyboard.tooltip.greek":"그리스 문자","keyboard.tooltip.numeric":"숫자","keyboard.tooltip.alphabetic":"로마 문자","tooltip.copy to clipboard":"클립 보드에 복사","tooltip.redo":"다시 하다","tooltip.toggle virtual keyboard":"가상 키보드 전환","tooltip.undo":"실행 취소","menu.insert matrix":"매트릭스 삽입","menu.borders":"행렬 구분 기호","menu.array.add row above":"뒤에 행 추가","menu.array.add row below":"앞에 행 추가","menu.array.add column after":"뒤에 열 추가","menu.array.add column before":"앞에 열 추가","menu.array.delete row":"행 삭제","menu.array.delete rows":"선택한 행 삭제","menu.array.delete column":"열 삭제","menu.array.delete columns":"선택한 열 삭제","menu.mode":"モード","menu.mode-math":"数式","menu.mode-text":"テキスト","menu.mode-latex":"LaTeX","tooltip.blackboard":"칠판","tooltip.bold":"굵게","tooltip.italic":"이탤릭","tooltip.fraktur":"프랙투어","tooltip.script":"스크립트","tooltip.caligraphic":"캘리그래픽","tooltip.typewriter":"타자기","tooltip.roman-upright":"로마 직립","tooltip.row-by-col":"%@ × %@","menu.font-style":"글꼴 스타일","menu.accent":"악센트","menu.decoration":"장식","menu.color":"색상","menu.background-color":"ë°°ê²½","menu.evaluate":"평가","menu.simplify":"간소화","menu.solve":"해결","menu.solve-for":"%@에 대해 해결","menu.cut":"잘라내기","menu.copy":"복사","menu.copy-as-latex":"LaTeX로 복사","menu.copy-as-ascii-math":"ASCII Math로 복사","menu.copy-as-mathml":"MathML로 복사","menu.paste":"붙여넣기","menu.select-all":"모두 선택","color.red":"빨강","color.orange":"주황","color.yellow":"노랑","color.lime":"라임","color.green":"초록","color.teal":"청록","color.cyan":"청색","color.blue":"파랑","color.indigo":"남색","color.purple":"보라","color.magenta":"자홍","color.black":"검정","color.dark-grey":"진한 회색","color.grey":"회색","color.light-grey":"연한 회색","color.white":"흰색"},pl:{"keyboard.tooltip.symbols":"Symbolika","keyboard.tooltip.greek":"Litery greckie","keyboard.tooltip.numeric":"Numeryczne","keyboard.tooltip.alphabetic":"Litery rzymskie","tooltip.copy to clipboard":"Kopiuj do Schowka","tooltip.cut to clipboard":"Wytnij ze Schowka","tooltip.paste from clipboard":"Wklej ze Schowka","tooltip.redo":"Przywróć","tooltip.toggle virtual keyboard":"Przełącz klawiaturę wirtualną","tooltip.menu":"Menu","tooltip.undo":"Cofnij","menu.borders":"Ograniczniki macierzy","menu.insert matrix":"Wstaw macierz","menu.array.add row above":"Dodaj wiersz przed","menu.array.add row below":"Dodaj wiersz po","menu.array.add column after":"Dodaj kolumnę po","menu.array.add column before":"Dodaj kolumnę przed","menu.array.delete row":"Usuń wiersz","menu.array.delete rows":"Usuń wybrane wiersze","menu.array.delete column":"Usuń kolumnę","menu.array.delete columns":"Usuń wybrane kolumny","menu.mode":"Tryb","menu.mode-math":"Formuła","menu.mode-text":"Tekst","menu.mode-latex":"LaTeX","menu.insert":"Wstaw","menu.insert.abs":"Wartość bezwzględna","menu.insert.abs-template":"\\left|x\\right|","menu.insert.nth-root":"Pierwiastek n-tego stopnia","menu.insert.nth-root-template":"\\sqrt[n]{x}","menu.insert.log-base":"Logarytm o podstawie a","menu.insert.log-base-template":"\\log_a(x)","menu.insert.heading-calculus":"Rachunek różniczkowy i całkowy","menu.insert.derivative":"Pochodna","menu.insert.derivative-template":"\\dfrac{\\mathrm{d}}{\\mathrm{d}x}
1f(x)\\bigm|_{x=a}","menu.insert.nth-derivative":"Pochodna n-tego rzędu","menu.insert.nth-derivative-template":"\\dfrac{\\mathrm{d}^n}{\\mathrm{d}x^n}f(x)\\bigm|_{x=a}","menu.insert.integral":"Całka","menu.insert.integral-template":"$\\int_a^b f(x)\\,\\mathrm{d}x$","menu.insert.sum":"Suma","menu.insert.sum-template":"$\\sum_{i=1}^n x_i$","menu.insert.product":"Iloczyn","menu.insert.product-template":"\\prod_{i=1}^n x_i","menu.insert.heading-complex-numbers":"Liczby zespolone","menu.insert.modulus":"Moduł","menu.insert.modulus-template":"\\lvert z \\rvert","menu.insert.argument":"Argument","menu.insert.argument-template":"\\arg(z)","menu.insert.real-part":"Część rzeczywista","menu.insert.real-part-template":"\\Re(z)","menu.insert.imaginary-part":"Część urojona","menu.insert.imaginary-part-template":"\\Im(z)","menu.insert.conjugate":"Sprzężenie","menu.insert.conjugate-template":"\\overline{z}","tooltip.blackboard":"Tablica","tooltip.bold":"Pogrubienie","tooltip.italic":"Kursywa","tooltip.fraktur":"Fraktura","tooltip.script":"Skrypt","tooltip.caligraphic":"Kaligraficzny","tooltip.typewriter":"Maszynowy","tooltip.roman-upright":"Rzymski prosto","tooltip.row-by-col":"%@ × %@","menu.font-style":"Styl czcionki","menu.accent":"Akcent","menu.decoration":"Dekoracja","menu.color":"Kolor","menu.background-color":"Tło","menu.evaluate":"Oblicz","menu.simplify":"Uprość","menu.solve":"Rozwiąż","menu.solve-for":"Rozwiąż dla %@","menu.cut":"Wytnij","menu.copy":"Kopiuj","menu.copy-as-latex":"Kopiuj jako LaTeX","menu.copy-as-ascii-math":"Kopiuj jako ASCII Math","menu.copy-as-mathml":"Kopiuj jako MathML","menu.paste":"Wklej","menu.select-all":"Zaznacz wszystko","color.red":"Czerwony","color.orange":"Pomarańczowy","color.yellow":"Żółty","color.lime":"Limetkowy","color.green":"Zielony","color.teal":"Turkusowy","color.cyan":"Cyjan","color.blue":"Niebieski","color.indigo":"Indygo","color.purple":"Fioletowy","color.magenta":"Magenta","color.black":"Czarny","color.dark-grey":"Ciemnoszary","color.grey":"Szary","color.light-grey":"Jasnoszary","color.white":"Biały"},pt:{"keyboard.tooltip.symbols":"Símbolos","keyboard.tooltip.greek":"Letras gregas","keyboard.tooltip.numeric":"Numérico","keyboard.tooltip.alphabetic":"Letras romanas","tooltip.copy to clipboard":"Copiar para área de transferência","tooltip.redo":"Refazer","tooltip.toggle virtual keyboard":"Alternar teclado virtual","tooltip.undo":"Desfazer","menu.insert matrix":"Inserir Matriz","menu.borders":"Delimitadores de matriz","menu.array.add row above":"Adicionar linha depois","menu.array.add row below":"Adicionar linha antes","menu.array.add column after":"Adicionar coluna depois","menu.array.add column before":"Adicionar coluna antes","menu.array.delete row":"Excluir linha","menu.array.delete rows":"Excluir linhas selecionadas","menu.array.delete column":"Apagar Coluna","menu.array.delete columns":"Excluir Colunas Selecionadas","menu.mode":"Modo","menu.mode-math":"Fórmula","menu.mode-text":"Texto","menu.mode-latex":"LaTeX","tooltip.blackboard":"Quadro Negro","tooltip.bold":"Negrito","tooltip.italic":"Itálico","tooltip.fraktur":"Fraktur","tooltip.script":"Script","tooltip.caligraphic":"Caligráfico","tooltip.typewriter":"Máquina de Escrever","tooltip.roman-upright":"Romano Vertical","tooltip.row-by-col":"%@ × %@","menu.font-style":"Estilo da Fonte","menu.accent":"Acento","menu.decoration":"Decoração","menu.color":"Cor","menu.background-color":"Cor de Fundo","menu.evaluate":"Avaliar","menu.simplify":"Simplificar","menu.solve":"Resolver","menu.solve-for":"Resolver para %@","menu.cut":"Recortar","menu.copy":"Copiar","menu.copy-as-latex":"Copiar como LaTeX","menu.copy-as-ascii-math":"Copiar como ASCII Math","menu.copy-as-mathml":"Copiar como MathML","menu.paste":"Colar","menu.select-all":"Selecionar Tudo","color.red":"Vermelho","color.orange":"Laranja","color.yellow":"Amarelo","color.lime":"Verde Lima","color.green":"Verde","color.teal":"Verde-azulado","color.cyan":"Ciano","color.blue":"Azul","color.indigo":"Índigo","color.purple":"Roxo","color.magenta":"Magenta","color.black":"Preto","color.dark-grey":"Cinza Escuro","color.grey":"Cinza","color.light-grey":"Cinza Claro","color.white":"Branco"},uk:{"keyboard.tooltip.symbols":"Символи","keyboard.tooltip.greek":"Грецькі літери","keyboard.tooltip.numeric":"Числовий","keyboard.tooltip.alphabetic":"Римські літери","tooltip.copy to clipboard":"Копіювати в буфер обміну","tooltip.cut to clipboard":"ВирÑ
1–зати в буфер обміну","tooltip.paste from clipboard":"Вставити з буфера обміну","tooltip.redo":"Повторити","tooltip.toggle virtual keyboard":"Переключити віртуальну клавіатуру","tooltip.menu":"Меню","tooltip.undo":"Скасувати","menu.borders":"Межі","menu.insert matrix":"Вставити матрицю","menu.array.add row above":"Додати рядок перед","menu.array.add row below":"Додати рядок після","menu.array.add column after":"Додати стовпець після","menu.array.add column before":"Додати стовпець перед","menu.array.delete row":"Видалити рядок","menu.array.delete rows":"Видалити вибрані рядки","menu.array.delete column":"Видалити стовпець","menu.array.delete columns":"Видалити вибрані стовпці","menu.mode":"Режим","menu.mode-math":"Математика","menu.mode-text":"Текст","menu.mode-latex":"LaTeX","menu.insert":"Вставити","menu.insert.abs":"Абсолютне значення","menu.insert.abs-template":"\\left|x\\right|","menu.insert.nth-root":"Корінь n-го степеня","menu.insert.nth-root-template":"\\sqrt[n]{x}","menu.insert.log-base":"Логарифм за основою a","menu.insert.log-base-template":"\\log_a(x)","menu.insert.heading-calculus":"Обчислення","menu.insert.derivative":"Похідна","menu.insert.derivative-template":"\\dfrac{\\mathrm{d}}{\\mathrm{d}x}f(x)\\bigm|_{x=a}","menu.insert.nth-derivative":"Похідна n-го порядку","menu.insert.nth-derivative-template":"\\dfrac{\\mathrm{d}^n}{\\mathrm{d}x^n}f(x)\\bigm|_{x=a}","menu.insert.integral":"Інтеграл","menu.insert.integral-template":"$\\int_a^b f(x)\\,\\mathrm{d}x$","menu.insert.sum":"Сума","menu.insert.sum-template":"$\\sum_{i=1}^n x_i$","menu.insert.product":"Добуток","menu.insert.product-template":"\\prod_{i=1}^n x_i","menu.insert.heading-complex-numbers":"Комплексні числа","menu.insert.modulus":"Модуль","menu.insert.modulus-template":"\\lvert z \\rvert","menu.insert.argument":"Аргумент","menu.insert.argument-template":"\\arg(z)","menu.insert.real-part":"Дійсна частина","menu.insert.real-part-template":"\\Re(z)","menu.insert.imaginary-part":"Уявна частина","menu.insert.imaginary-part-template":"\\Im(z)","menu.insert.conjugate":"Спряжене число","menu.insert.conjugate-template":"\\overline{z}","tooltip.blackboard":"Дошка","tooltip.bold":"Жирний","tooltip.italic":"Курсив","tooltip.fraktur":"Фрактурний","tooltip.script":"Рукописний","tooltip.caligraphic":"Каліграфічний","tooltip.typewriter":"Друкарський","tooltip.roman-upright":"Прямий римський","tooltip.row-by-col":"%@ × %@","menu.font-style":"Стиль шрифту","menu.accent":"Акцент","menu.decoration":"Оформлення","menu.color":"Колір","menu.background-color":"Фон","menu.evaluate":"Обчислити","menu.simplify":"Спростити","menu.solve":"Розв’язати","menu.solve-for":"Розв’язати для %@","menu.cut":"Вирізати","menu.copy":"Копіювати","menu.copy-as-latex":"Копіювати як LaTeX","menu.copy-as-ascii-math":"Копіювати як ASCII Math","menu.copy-as-mathml":"Копіювати як MathML","menu.paste":"Вставити","menu.select-all":"Вибрати все","color.red":"Червоний","color.orange":"Помаранчевий","color.yellow":"Жовтий","color.lime":"Лаймовий","color.green":"Зелений","color.teal":"Бірюзовий","color.cyan":"Синьо-зелений","color.blue":"Синій","color.indigo":"Індиго","color.purple":"Фіолетовий","color.magenta":"Пурпурний","color.black":"Чорний","color.dark-grey":"Темно-сірий","color.grey":"Сірий","color.light-grey":"Світло-сірий","color.white":"Білий"},"zh-cn":{"keyboard.tooltip.symbols":"符号","keyboard.tooltip.greek":"希腊字母","keyboard.tooltip.numeric":"数字","keyboard.tooltip.alphabetic":"罗马字母","tooltip.copy to clipboard":"复制到剪贴板","tooltip.redo":"重做","tooltip.toggle virtual keyboard":"切换虚拟键盘","tooltip.undo":"撤消","menu.insert matrix":"插入矩阵","menu.borders":"矩阵分隔符","menu.array.add row above":"在后面添加行","menu.array.add row below":"在前面添加行","menu.array.add column after":"在后面添加列r","menu.array.add column before":"在前面添加列","menu.array.delete row":"删除行","menu.array.delete rows":"删除选定行","menu.array.delete column":"删除列","menu.array.delete columns":"删除选定的列","menu.mode":"模式","menu.mode-math":"数学","menu.mode-text":"文本","menu.mode-latex":"LaTeX","tooltip.blackboard":"黑板","tooltip.bold":"粗体","tooltip.italic":"斜体","tooltip.fraktur":"Fraktur","tooltip.script":"脚本","tooltip.caligraphic":"草书","tooltip.typewriter":"打字机","tooltip.roman-upright":"罗马直立","tooltip.row-by-col":"%@ × %@","menu.font-style":"字体样式","menu.accent":"重音","menu.decoration":"装饰","menu.color":"颜色","menu.background-color":"背景","menu.evaluate":"计算","menu.simplify":"简化","menu.solve":"求解","menu.solve-for":"求解 %@","menu.cut":"剪切","menu.copy":"复制","menu.copy-as-latex":"复制为 LaTeX","menu.copy-as-ascii-math":"复制为 ASCII Math","menu.copy-as-mathml":"复制为 MathML","menu.paste":"粘贴","menu.select-all":"全选","color.red":"红色","color.orange":"橙色","color.yellow":"黄色","color.lime":"绿黄色","color.green":"绿色","color.teal":"青色","color.cyan":"蓝绿色","color.blue":"蓝色","color.indigo":"靛蓝色","color.purple":"紫色","color.magenta":"洋红色","color.black":"黑色","color.dark-grey":"深灰色","color.grey":"灰色","color.light-grey":"浅灰色","color.white":"白色"},"zh-tw":{"keyboard.tooltip.symbols":"符號","keyboard.tooltip.greek":"希臘字母","keyboard.tooltip.numeric":"數字","keyboard.tooltip.alphabetic":"羅馬字母","tooltip.copy to clipboard":"複製到剪貼板","tooltip.redo":"重做","tooltip.toggle virtual keyboard":"切換虛擬鍵盤","tooltip.undo":"撤消","menu.insert matrix":"插入矩陣","menu.borders":"矩陣分隔符","menu.array.add row above":"在後面添加行","menu.array.add row below":"在前面添加行","menu.array.add column after":"在後面添加列","menu.array.add column before":"在前面添加列","menu.array.delete row":"刪除行","menu.array.delete rows":"刪除選定行","menu.array.delete column":"刪除列","menu.array.delete columns":"刪除選定的列","menu.mode":"模式","menu.mode-math":"數學","menu.mode-text":"文本","menu.mode-latex":"LaTeX","tooltip.blackboard":"黑板","tooltip.bold":"粗體","tooltip.italic":"斜體","tooltip.fraktur":"Fraktur","tooltip.script":"腳本","tooltip.caligraphic":"草書","tooltip.typewriter":"打字機","tooltip.roman-upright":"羅馬直立","tooltip.row-by-col":"%@ × %@","menu.font-style":"字體樣式","menu.accent":"重音","menu.decoration":"裝飾","menu.color":"顏色","menu.background-color":"背景","menu.evaluate":"計算","menu.simplify":"簡化","menu.solve":"求解","menu.solve-for":"求解 %@","menu.cut":"剪下","menu.copy":"複製","menu.copy-as-latex":"複製為 LaTeX","menu.copy-as-ascii-math":"複製為 ASCII Math","menu.copy-as-mathml":"複製為 MathML","menu.paste":"貼上","menu.select-all":"全選","color.red":"紅色","color.orange":"橙色","color.yellow":"黃色","color.lime":"綠黃色","color.green":"綠色","color.teal":"青色","color.cyan":"藍綠色","color.blue":"藍色","color.indigo":"靛藍色","color.purple":"紫色","color.magenta":"洋紅色","color.black":"黑色","color.dark-grey":"深灰色","color.grey":"灰色","color.light-grey":"淺灰色","color.white":"白色"}},O={strings:om,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return O._locale||(O._locale=Ue()?navigator.language.slice(0,5):"en-US"),O._locale},set locale(e){O._locale=e,O._numberFormatter=void 0,O.dirty=!0},get numberFormatter(){if(!O._numberFormatter)try{O._numberFormatter=new Intl.NumberFormat(O.locale)}catch{try{O._numberFormatter=new Intl.NumberFormat(O.locale.slice(0,2))}catch{O._numberFormatter=new Intl.NumberFormat("en-US")}}return O._numberFormatter}
vendor: 6,978 bytes, line 1
1,merge(e,t){if(typeof e=="string"&&t)O.strings[e]=f(f({},O.strings[e]),t),O.dirty=!0;else for(let i of Object.keys(e))O.merge(i,e[i])},get dirty(){return O._dirty},set dirty(e){O._dirty||O._dirty===e||(O._dirty=!0,setTimeout(()=>{O._dirty=!1,this._subscribers.forEach(t=>t==null?void 0:t())},0))},subscribe(e){return O._subscribers.push(e),O._subscribers.length-1},unsubscribe(e){e<0||e>=O._subscribers.length||(O._subscribers[e]=void 0)},update(e){let t=e.querySelectorAll("[data-l10n-tooltip]");for(let i of t){let r=i.getAttribute("data-l10n-tooltip");if(r){let a=P(r);a&&i.setAttribute("data-tooltip",a)}}t=e.querySelectorAll("[data-l10n-arial-label]");for(let i of t){let r=i.getAttribute("data-l10n-arial-label");if(r){let a=P(r);a&&i.setAttribute("aria-label",a)}}}};function P(e,...t){if(e===void 0)return;let i="",r=O.locale;O.strings[r]&&(i=O.strings[r][e]);let a=r.slice(0,2);if(!i&&O.strings[a]&&(i=O.strings[a][e]),i||(i=O.strings.en[e]),!i)return;let n=/(%@|%([0-9]+)\$@)/g,o=n.exec(i),l=0;for(;o;){if(t[l++]){let s=o[2]?parseInt(o[2],10)-1:l-1,u=t[s];typeof u=="number"&&(u=O.numberFormatter.format(u)),i=i.replace(o[1],u)}o=n.exec(i)}return i=i.replace(/%%/g,"%"),i}var lm={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},sm={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},Di={red:"#fbbbb6",orange:"#ffe0c2",yellow:"#fff1c2",lime:"#d0e8b9",green:"#bceac4",teal:"#b9f1f1",cyan:"#b8e5c9",blue:"#b6d9fb",indigo:"#d1c2f0",purple:"#e3baf8",magenta:"#f9c8e0",black:"#353535","dark-grey":"#8C8C8C",grey:"#D0D0D0","light-grey":"#F0F0F0",white:"#ffffff"},Ei={red:"#d7170b",orange:"#fe8a2b",yellow:"#ffc02b",lime:"#63b215",green:"#21ba3a",teal:"#17cfcf",cyan:"#13a7ec",blue:"#0d80f2",indigo:"#63c",purple:"#a219e6",magenta:"#eb4799",black:"#000","dark-grey":"#666",grey:"#A6A6A6","light-grey":"#d4d5d2",white:"#ffffff"},K0={Red:"red",Orange:"orange",Yellow:"yellow",LimeGreen:"lime",Green:"green",TealBlue:"teal",Blue:"blue",Violet:"indigo",Purple:"purple",Magenta:"magenta",Black:"black",Gray:"grey",White:"white"},um={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"};function uo(e){var t,i,r,a,n,o;let l=e.split("!"),s,u,c,d=255,h=255,p=255,m=-1,g=l.length>0&&l[0].startsWith("-");g&&(l[0]=l[0].slice(1));for(let v=0;v<l.length;v++){s=d,u=h,c=p;let b=(t=l[v].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:t[1],x=b==null?void 0:b.toLowerCase(),E=b&&(o=(n=(a=(r=(i=Ei[x])!=null?i:Ei[K0[b]])!=null?r:sm[b])!=null?a:um[b])!=null?n:lm[b])!=null?o:l[v].trim(),S=E.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(S!=null&&S[1]&&S[2]&&S[3])d=Math.max(0,Math.min(255,Number.parseInt(S[1],16))),h=Math.max(0,Math.min(255,Number.parseInt(S[2],16))),p=Math.max(0,Math.min(255,Number.parseInt(S[3],16)));else if(S=E.match(/^#([\da-f]{3})$/i),S!=null&&S[1]){let M=Number.parseInt(S[1][0],16),C=Number.parseInt(S[1][1],16),B=Number.parseInt(S[1][2],16);d=Math.max(0,Math.min(255,M*16+M)),h=Math.max(0,Math.min(255,C*16+C)),p=Math.max(0,Math.min(255,B*16+B))}else if(S=E.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),S!=null&&S[1]&&S[2]&&S[3])d=Math.max(0,Math.min(255,Number.parseInt(S[1]))),h=Math.max(0,Math.min(255,Number.parseInt(S[2]))),p=Math.max(0,Math.min(255,Number.parseInt(S[3])));else return;m>=0&&(d=(1-m)*d+m*s,h=(1-m)*h+m*u,p=(1-m)*p+m*c,m=-1),v+1<l.length&&(m=Math.max(0,Math.min(100,Number.parseInt(l[++v])))/100)}return m>=0&&(d=m*d+(1-m)*s,h=m*h+(1-m)*u,p=m*p+(1-m)*c),g&&(d=255-d,h=255-h,p=255-p),"#"+("00"+Math.round(d).toString(16)).slice(-2)+("00"+Math.round(h).toString(16)).slice(-2)+("00"+Math.round(p).toString(16)).slice(-2)}function ds(e){var t,i;return e=e.trim(),(i=(t=Di[e.toLowerCase()])!=null?t:Di[K0[e]])!=null?i:uo(e)}function cm(e){if(!e||e[0]!=="#")return;e=e.slice(1);let t;return e.length<=4?(t={r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)},e.length===4&&(t.a=parseInt(e[3]+e[3],16)/255)):(t={r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16)},e.length===8&&(t.a=parseInt(e[6]+e[7],16)/255)),t&&t.a===void 0&&(t.a=1),t}function So(e,t,i){return i<0&&(i+=6),i>=6&&(i-=6),i<1?(t-e)*i+e:i<3?t:i<4?(t-e)*(4-i)+e:e}function dm(e){let[t,i,r]=[e.h,e.s,e.l];t=(t+360)%360/60,r=Math.max(0,Math.min(r,1)),i=Math.max(0,Math.min(i,1));let a=r<=.5?r*(i+1):r+i-r*i,n=r*2-a;return{r:Math.round(255*So(n,a,t+2)),g:Math.round(255*So(n,a,t)),b:Math.round(255*So(n,a,t-2))}}function Co(e){return e<0?0:e>255?255:Math.round(e)}function hm(e){let{r:t,g:i,b:r}=e,a=((1<<24)+(Co(t)<<16)+(Co(i)<<8)+Co(r)).toString(16).slice(1);return a[0]===a[1]&&a[2]===a[3]&&a[4]===a[5]&&a[6]===a[7]&&(a=a[0]+a[2]+a[4]),"#"+a}function pm(e){let{r:t,g:i,b:r}=e;t=t/255,i=i/255,r=r/255;let a=Math.min(t,i,r),n=Math.max(t,i,r),o=n-a,l,s;n===a?l=0:t===n?l=(i-r)/o:i===n?l=2+(r-t)/o:r===n&&(l=4+(t-i)/o),l=Math.min(l*60,360),l<0&&(l+=360);let u=(a+n)/2;return n===a?s=0:u<=.5?s=o/(n+a):s=o/(2-n-a),{h:l,s,l:u}}function mm(e){let t=cm(e);if(!t)return e;let{h:i,s:r,l:a}=pm(t);return r+=.1,a-=.1,hm(dm({h:i,s:r,l:a}))}var $0={60:"\\lt",62:"\\gt",111:"o",38:"\\&",123:"\\lbrace",125:"\\rbrace",91:"\\lbrack",93:"\\rbrack",58:"\\colon",160:"~",172:"\\neg",183:"\\cdot",188:"\\frac{1}{4}",189:"\\frac{1}{2}",190:"\\frac{3}{4}",8304:"^{0}",8305:"^{i}",185:"^{1}",178:"^{2}",179:"^{3}",8224:"\\dagger",8225:"\\ddagger",8230:"\\ldots",8308:"^{4}",8309:"^{5}",8310:"^{6}",8311:"^{7}",8312:"^{8}",8313:"^{9}",8314:"^{+}",8315:"^{-}",8316:"^{=}",8319:"^{n}",8320:"_{0}",8321:"_{1}",8322:"_{2}",8323:"_{3}",8324:"_{4}",8325:"_{5}",8326:"_{6}",8327:"_{7}",8328:"_{8}",8329:"_{9}",8330:"_{+}",8331:"_{-}",8332:"_{=}",8336:"_{a}
1",8337:"_{e}",8338:"_{o}",8339:"_{x}",8242:"\\prime",39:"\\prime",8592:"\\gets",8594:"\\to",9651:"\\triangle",9661:"\\triangledown",8715:"\\owns",8727:"\\ast",8739:"\\vert",8741:"\\Vert",8743:"\\land",8744:"\\lor",8901:"\\cdot",8904:"\\bowtie",8800:"\\ne",8804:"\\le",8805:"\\ge",8869:"\\bot",10178:"\\perp",10231:"\\biconditional",10232:"\\impliedby",10233:"\\implies",10234:"\\iff",8450:"\\mathbb{C}",8469:"\\mathbb{N}",8473:"\\mathbb{P}",8474:"\\mathbb{Q}",8477:"\\mathbb{R}",8484:"\\mathbb{Z}",8461:"\\mathbb{H}",8476:"\\Re",8465:"\\Im",42:"\\ast",11036:"\\square",9633:"\\square",8720:"\\coprod",8716:"\\not\\ni",9671:"\\diamond",8846:"\\uplus",8851:"\\sqcap",8852:"\\sqcup",8768:"\\wr",8750:"\\oint",8226:"\\textbullet",8722:"-",978:"\\Upsilon"},Bl={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},P0=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120782,len:10,offset:48,variant:"main",style:"bold"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120822,len:10,offset:48,variant:"monospace"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"}];function Al(e,t,i){if(!/[A-Za-z\d]/.test(e)||(i==="up"&&(i=void 0),!t&&!i))return;let r=e.codePointAt(0);if(r===void 0)return e;for(let a of P0)if((!t||a.variant===t)&&(!i||a.style===i)&&r>=a.offset&&r<a.offset+a.len){let n=a.start+r-a.offset;return String.fromCodePoint(Bl[n]||n)}}function fm(e){var t;if((e<119808||e>120831)&&(e<8448||e>8527))return{char:String.fromCodePoint(e)};for(let i in Bl)if(Bl[i]===e){e=(t=i.codePointAt(0))!=null?t:0;break}for(let i of P0)if(e>=i.start&&e<i.start+i.len)return{char:String.fromCodePoint(e-i.start+i.offset),variant:i.variant,style:i.style};return{char:String.fromCodePoint(e)}}function gm(e){var t;if("{}<>[]$&*#^_%:'˜".includes(e)||e.length>1)return;let i=(t=e.codePointAt(0))!=null?t:0,r=$0[i];if(r)return r;let{char:a,variant:n,style:o}=fm(i);
vendor: 3,063 bytes, line 1
1if(!(!n&&!o)){switch(r=a,n){case"double-struck":r=`\\mathbb{${r}}`;break;case"fraktur":r=`\\mathfrak{${r}}`;break;case"script":r=`\\mathscr{${r}}`;break;case"sans-serif":r=`\\mathsf{${r}}`;break;case"monospace":r=`\\mathtt{${r}}`;break;case"calligraphic":r=`\\mathcal{${r}}`;break}switch(o){case"bold":r=`\\mathbf{${r}}`;break;case"italic":r=`\\mathit{${r}}`;break;case"bolditalic":r=`\\mathbfit{${r}}`;break}return r}}function T(e){return e?Array.isArray(e)?e:typeof e=="object"&&"group"in e?e.group:[]:[]}var oa={},Un=f({},$0),pr={},hs={},bm={darr:"\\downarrow",dArr:"\\Downarrow",Darr:"\\Downarrow",lang:"\\langle",rang:"\\rangle",uarr:"\\uparrow",uArr:"\\Uparrow",Uarr:"\\Uparrow",C:"\\mathbb{C}",H:"\\mathbb{H}",N:"\\mathbb{N}",Q:"\\mathbb{Q}",R:"\\mathbb{R}",Z:"\\mathbb{Z}",alef:"\\aleph",alefsym:"\\aleph",Alpha:"\\mathrm{A}",Beta:"\\mathrm{B}",bull:"\\bullet",Chi:"\\mathrm{X}",clubs:"\\clubsuit",cnums:"\\mathbb{C}",Complex:"\\mathbb{C}",Dagger:"\\ddagger",diamonds:"\\diamondsuit",doublecap:"\\Cap",doublecup:"\\Cup",empty:"\\emptyset",Epsilon:"\\mathrm{E}",Eta:"\\mathrm{H}",exist:"\\exists",hArr:"\\Leftrightarrow",harr:"\\leftrightarrow",Harr:"\\Leftrightarrow",hearts:"\\heartsuit",image:"\\Im",infin:"\\infty",Iota:"\\mathrm{I}",isin:"\\in",Kappa:"\\mathrm{K}",larr:"\\leftarrow",Larr:"\\Leftarrow",lArr:"\\Leftarrow",lrarr:"\\leftrightarrow",Lrarr:"\\Leftrightarrow",lrArr:"\\Leftrightarrow",Mu:"\\mathrm{M}",natnums:"\\mathbb{N}",Nu:"\\mathrm{N}",Omicron:"\\mathrm{O}",part:"\\partial",plusmn:"\\pm",rarr:"\\rightarrow",Rarr:"\\Rightarrow",rArr:"\\Rightarrow",real:"\\Re",reals:"\\mathbb{R}",Reals:"\\mathbb{R}",restriction:"\\upharpoonright",Rho:"\\mathrm{P}",sdot:"\\cdot",sect:"\\S",spades:"\\spadesuit",sub:"\\subset",sube:"\\subseteq",supe:"\\supseteq",Tau:"\\mathrm{T}",thetasym:"\\vartheta",varcoppa:"\\coppa",weierp:"\\wp",Zeta:"\\mathrm{Z}"},ym={varGamma:"\\mathit{\\Gamma}",varDelta:"\\mathit{\\Delta}",varTheta:"\\mathit{\\Theta}",varLambda:"\\mathit{\\Lambda}",varXi:"\\mathit{\\Xi}",varPi:"\\mathit{\\Pi}",varSigma:"\\mathit{\\Sigma}",varUpsilon:"\\mathit{\\Upsilon}",varPhi:"\\mathit{\\Phi}",varPsi:"\\mathit{\\Psi}",varOmega:"\\mathit{\\Omega}",pmod:{def:"\\quad(\\operatorname{mod}\\ #1)",args:1,expand:!1,captureSelection:!1},mod:{def:"\\quad\\operatorname{mod}\\,\\,#1",args:1,expand:!1},bmod:{def:"\\;\\mathbin{\\operatorname{mod }}",expand:!1}},vm={bra:{def:"\\mathinner{\\langle{#1}|}",args:1,captureSelection:!1},ket:{def:"\\mathinner{|{#1}\\rangle}",args:1,captureSelection:!1},braket:{def:"\\mathinner{\\langle{#1}\\rangle}",args:1,captureSelection:!1},set:{def:"\\mathinner{\\lbrace #1 \\rbrace}",args:1,captureSelection:!1},Bra:{def:"\\left\\langle #1\\right|",args:1,captureSelection:!1},Ket:{def:"\\left|#1\\right\\rangle",args:1,captureSelection:!1},Braket:{def:"\\left\\langle{#1}\\right\\rangle",args:1,captureSelection:!1},Set:{def:"\\left\\lbrace #1 \\right\\rbrace",args:1,captureSelection:!1}},xm={strut:{primitive:!0,def:"\\phantom{\\rule[0.3\\baselineskip]{0}{0.7\\baselineskip}}",args:0,captureSelection:!0}
vendor: 11,007 bytes, line 1
1,iff:{primitive:!0,captureSelection:!0,def:"\\;\\Longleftrightarrow\\;"},nicefrac:"^{#1}\\!\\!/\\!_{#2}",phase:{def:"\\enclose{phasorangle}{#1}",args:1,captureSelection:!1},rd:"\\mathrm{d}",rD:"\\mathrm{D}",odif:"\\mathrm{d}",doubleStruckCapitalN:"\\mathbb{N}",doubleStruckCapitalR:"\\mathbb{R}",doubleStruckCapitalQ:"\\mathbb{Q}",doubleStruckCapitalZ:"\\mathbb{Z}",doubleStruckCapitalP:"\\mathbb{P}",scriptCapitalE:"\\mathscr{E}",scriptCapitalH:"\\mathscr{H}",scriptCapitalL:"\\mathscr{L}",gothicCapitalC:"\\mathfrak{C}",gothicCapitalH:"\\mathfrak{H}",gothicCapitalI:"\\mathfrak{I}",gothicCapitalR:"\\mathfrak{R}",imaginaryI:"\\mathrm{i}",imaginaryJ:"\\mathrm{j}",exponentialE:"\\mathrm{e}",differentialD:"\\mathrm{d}",capitalDifferentialD:"\\mathrm{D}",mathstrut:{def:"\\vphantom{(}",primitive:!0},angl:"\\enclose{actuarial}{#1}",angln:"\\enclose{actuarial}{n}",anglr:"\\enclose{actuarial}{r}",anglk:"\\enclose{actuarial}{k}",mathtools:{primitive:!0,package:{ordinarycolon:":",vcentcolon:"\\mathrel{\\mathop\\ordinarycolon}",dblcolon:'{\\mathop{\\char"2237}}',coloneqq:'{\\mathop{\\char"2254}}',Coloneqq:'{\\mathop{\\char"2A74}}',coloneq:'{\\mathop{\\char"2254}}',Coloneq:'{\\mathop{\\char"2A74}}',eqqcolon:'{\\mathop{\\char"2255}}',Eqqcolon:'{\\mathop{\\char"3D\\char"2237}}',eqcolon:'{\\mathop{\\char"2255}}',Eqcolon:'{\\mathop{\\char"3D\\char"2237}}',colonapprox:'{\\mathop{\\char"003A\\char"2248}}',Colonapprox:'{\\mathop{\\char"2237\\char"2248}}',colonsim:'{\\mathop{\\char"3A\\char"223C}}',Colonsim:'{\\mathop{\\char"2237\\char"223C}}',colondash:"\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",Colondash:"\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}"}},ratio:"\\vcentcolon",coloncolon:"\\dblcolon",colonequals:"\\coloneq",coloncolonequals:"\\Coloneq",equalscolon:"\\eqcolon",equalscoloncolon:"\\Eqcolon",colonminus:"\\colondash",coloncolonminus:"\\Colondash",minuscolon:"\\dashcolon",minuscoloncolon:"\\Dashcolon",coloncolonapprox:"\\Colonapprox",coloncolonsim:"\\Colonsim",simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",simcoloncolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcoloncolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",notni:"\\mathrel{\\char`∌}",limsup:"\\operatorname*{lim\\,sup}",liminf:"\\operatorname*{lim\\,inf}",injlim:"\\operatorname*{inj\\,lim}",projlim:"\\operatorname*{proj\\,lim}",varlimsup:"\\operatorname*{\\overline{lim}}",varliminf:"\\operatorname*{\\underline{lim}}",varinjlim:"\\operatorname*{\\underrightarrow{lim}}",varprojlim:"\\operatorname*{\\underleftarrow{lim}}",argmin:"\\operatorname*{arg\\,min}",argmax:"\\operatorname*{arg\\,max}",plim:"\\mathop{\\operatorname{plim}}\\limits",tripledash:{def:"\\vphantom{-}\\raise{4mu}{\\mkern1.5mu\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2mu}}",expand:!0},"braket.sty":{package:vm},"amsmath.sty":{package:ym,primitive:!0},"texvc.sty":{package:bm,primitive:!1}},lr={" ":32,"\\!":33,"\\#":35,"\\$":36,"\\%":37,"\\&":38,"\\_":95,"-":45,"\\textunderscore":95,"\\euro":8364,"\\maltese":10016,"\\{":123,"\\}":125,"\\textbraceleft":123,"\\textbraceright":125,"\\lbrace":123,"\\rbrace":125,"\\lbrack":91,"\\rbrack":93,"\\nobreakspace":160,"\\ldots":8230,"\\textellipsis":8230,"\\backslash":92,"`":8216,"'":8217,"``":8220,"''":8221,"\\degree":176,"\\textasciicircum":94,"\\textasciitilde":126,"\\textasteriskcentered":42,"\\textbackslash":92,"\\textbullet":8226,"\\textdollar":36,"\\textsterling":163,"\\textdagger":8224,"\\textdaggerdbl":8225,"–":8211,"—":8212,"‘":8216,"’":8217,"“":8220,"”":8221,'"':8221,"\\ss":223,"\\ae":230,"\\oe":339,"\\AE":198,"\\OE":338,"\\O":216,"\\i":305,"\\j":567,"\\aa":229,"\\AA":197},_m=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,Tl,la;Vp()?(Tl=new RegExp("\\p{Letter}","u"),la=new RegExp("[0-9\\p{Letter}]","u")):(Tl=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,la=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function Fl(e,t,i="mord",r){t!==void 0&&(oa[e]={definitionType:"symbol",type:i,variant:r,codepoint:t},Un[t]||(Un[t]=e))}function xe(e,t,i){if(typeof e=="string"){for(let r=0;r<e.length;r++){let a=e.charAt(r);Fl(a,a.codePointAt(0))}return}for(let[r,a,n,o]of e)Fl(r,a,n??t,o??i)}function O0(e,t){for(let i=e;i<=t;i++)Fl(String.fromCodePoint(i),i)}function wm(e){var t;return(t=hs[e])!=null?t:null}function km(e,t){var i,r;if(t.length===0||t==="\\"||!t.startsWith("\\"))return[];let a=[];for(let o in pr)o.startsWith(t)&&!pr[o].infix&&a.push({match:o,frequency:(i=pr[o].frequency)!=null?i:0});for(let o in oa)o.startsWith(t)&&a.push({match:o,frequency:(r=oa[o].frequency)!=null?r:0});let n=t.substring(1);for(let o of Object.keys(e.options.macros))o.startsWith(n)&&a.push({match:"\\"+o,frequency:0});return a.sort((o,l)=>{var s,u;return o.frequency===l.frequency?o.match.length===l.match.length?o.match<l.match?-1:1:o.match.length-l.match.length:((s=l.frequency)!=null?s:0)-((u=o.frequency)!=null?u:0)}),a.map(o=>o.match)}function Is(e){let t="auto",i=e.match(/:([^=]+)/);return i&&(t=i[1].trim()),t}function Jn(e){if(!e)return[];let t=[],i=e.split("]");if(i[0].startsWith("[")){t.push({isOptional:!0,type:Is(i[0].slice(1))});for(let r=1;r<=i.length;r++)t.push(...Jn(i[r]))}else if(i=e.split("}"),i[0].startsWith("{")){t.push({isOptional:!1,type:Is(i[0].slice(1))});for(let r=1;r<=i.length;r++)t.push(...Jn(i[r]))}return t}function I0(e){if(!e)return"";let t="",i=!0;for(let r of e)typeof r.value=="string"?t+=r.value:i=!1;return i?t:""}function Et(e,t,i){typeof e=="string"&&(e=[e]);let r={tabular:!0,rootOnly:!1,params:Jn(t),createAtom:i};for(let a of e)hs[a]=r}function ps(e,t,i){var r;typeof e=="string"&&(e=[e]);let a={tabular:(r=i==null?void 0:i.tabular)!=null?r:!1,rootOnly:!0,params:[],createAtom:t};for(let n of e)hs[n]=a}function k(e,t,i){var r,a;i||(i={});let n={definitionType:"function",params:Jn(t),ifMode:i.ifMode,isFunction:(r=i.isFunction)!=null?r:!1,applyMode:i.applyMode,infix:(a=i.infix)!=null?a:!1,parse:i.parse,createAtom:i.createAtom,applyStyle:i.applyStyle,serialize:i.serialize,render:i.render};if(typeof e=="string")pr["\\"+e]=n;else for(let o of e)pr["\\"+o]=n}var Lo;function ms(e){return Lo||(Lo=fs(xm)),Lo}function Rs(e,t){var i,r,a,n;if(typeof e=="string"){let o=0,l=e;return/(^|[^\\])#1/.test(l)&&(o=1),/(^|[^\\])#2/.test(l)&&(o=2),/(^|[^\\])#3/.test(l)&&(o=3),/(^|[^\\])#4/.test(l)&&(o=4),/(^|[^\\])#5/.test(l)&&(o=5),/(^|[^\\])#6/.test(l)&&(o=6),/(^|[^\\])#7/.test(l)&&(o=7),/(^|[^\\])#8/.test(l)&&(o=8),/(^|[^\\])#9/.test(l)&&(o=9),{expand:(i=t==null?void 0:t.expand)!=null?i:!0,captureSelection:(r=t==null?void 0:t.captureSelection)!=null?r:!0,args:o,def:l}}return f({expand:(a=t==null?void 0:t.expand)!=null?a:!0,captureSelection:(n=t==null?void 0:t.captureSelection)!=null?n:!0,args:0},e)}function fs(e){if(!e)return{};let t={};for(let i of Object.keys(e)){let r=e[i];if(r==null)delete t[i];else if(typeof r=="object"&&"package"in r)for(let a of Object.keys(r.package))t[a]=Rs(r.package[a],{expand:!r.primitive,captureSelection:r.captureSelection});else t[i]=Rs(r)}return t}function ye(e,t="math"){if(!e||e.length===0)return null;let i=null;if(e.startsWith("\\")){if(i=pr[e],i)return!i.ifMode||i.ifMode===t?i:null;t==="math"?i=oa[e]:lr[e]&&(i={definitionType:"symbol",type:"mord",codepoint:lr[e]})}else if(t==="math"){if(i=oa[e],!i&&e.length===1){let r=R0("math",e.codePointAt(0));return r.startsWith("\\")?y(f({},ye(r,"math")),{command:r}):null}}else lr[e]?i={definitionType:"symbol",type:"mord",codepoint:lr[e]}:t==="text"&&(i={definitionType:"symbol",type:"mord",codepoint:e.codePointAt(0)});return i??null}function gs(e,t){if(!e.startsWith("\\"))return null;let i=e.slice(1);return t[i]}function R0(e,t){return t===void 0?"":e==="math"&&Un[t]?Un[t]:e==="text"&&Object.keys(lr).find(r=>lr[r]===t)||String.fromCodePoint(t)}var qe=[0,.68889,0,0,.72222],li=[0,.68889,0,0,.66667],Do=[0,.68889,0,0,.77778],Ma=[0,.68889,0,0,.61111],Ns=[.16667,.68889,0,0,.77778],Cr=[0,.68889,0,0,.55556],J=[0,0,0,0,.25],qs=[0,.825,0,0,2.33334],Vs=[0,.9,0,0,2.33334],Sa=[0,.68889,0,0,.54028],Eo=[-.03598,.46402,0,0,.5],Se=[-.13313,.36687,0,0,1],Ca=[.01354,.52239,0,0,1],js=[.01354,.52239,0,0,1.11111],Hs=[0,.54986,0,0,1],La=[0,.69224,0,0,.5],Bo=[0,.43056,0,0,1],Tt=[.08198,.58198,0,0,.77778],Da=[.19444,.69224,0,0,.41667],Ea=[.1808,.675,0,0,1],Ws=[.19444,.69224,0,0,.83334],Us=[.13667,.63667,0,0,1],Js=[-.064,.437,0,0,1.334],Ft=[.08167,.58167,0,0,.77778],Lr=[0,.69224,0,0,.72222],Ao=[0,.69224,0,0,.66667],Ba=[-.13313,.36687,0,0,.77778],Xs=[.06062,.54986,0,0,.77778],Aa=[0,.69224,0,0,.77778],Ni=[.25583,.75583,0,0,.77778],it=[.25142,.75726,0,0,.77778],qi=[.20576,.70576,0,0,.77778],Xe=[.30274,.79383,0,0,.77778],Dr=[.22958,.72958,0,0,.77778],Gs=[.1808,.675,0,0,.77778],rt=[.13667,.63667,0,0,.77778],Te=[.13597,.63597,0,0,.77778],zt=[.03517,.54986,0,0,.77778],Vi=[0,.675,0,0,.77778],Zs=[.19444,.69224,0,0,.61111],Ys=[0,.54986,0,0,.76042],Qs=[0,.54986,0,0,.66667],Kt=[.0391,.5391,0,0,.77778],eu=[.03517,.54986,0,0,1.33334],tu=[.38569,.88569,0,0,.77778],Ta=[.23222,.74111,0,0,.77778],iu=[.19444,.69224,0,0,.77778],ru=[0,.37788,0,0,.5],Fa=[0,.54986,0,0,.72222],au=[0,.69224,0,0,.83334],nu=[.11111,.69224,0,0,.66667],ji=[.26167,.75726,0,0,.77778],ou=[.48256,.98256,0,0,.77778],lu=[.28481,.79383,0,0,.77778],su=[.08167,.58167,0,0,.22222],uu=[.08167,.58167,0,0,.38889],cu=[0,.43056,.04028,0,.66667],du=[.41951,.91951,0,0,.77778],hu=[.24982,.74947,0,0,.38865],pu=[.08319,.58283,0,0,.75623],mu=[0,.10803,0,0,.27764],To=[0,.47534,0,0,.50181],Er=[.18906,.47534,0,0,.50181],fu=[0,.69141,0,0,.50181],gu=[.24982,.74947,0,0,.27764],Fo=[0,.69141,0,0,.21471],za=[.25,.75,0,0,.44722],Ve=[0,.64444,0,0,.575],Hi=[.08556,.58556,0,0,.89444],Ka=[0,.69444,0,0,.89444],$a=[0,.68611,0,0,.9],zo=[0,.68611,0,0,.86944],$t=[.25,.75,0,0,.575],Pa=[.25,.75,0,0,.31944],si=[0,.69444,0,0,.63889],Wi=[0,.69444,0,0,.31944],bu=[0,.44444,0,0,.63889],yu=[0,.44444,0,0,.51111],Pt=[0,.69444,0,0,.575],Ge=[.13333,.63333,0,0,.89444],vu=[0,.44444,0,0,.31944],xu=[0,.69444,0,0,.86944],_u=[0,.68611,0,0,.69166],Oa=[0,.68611,0,0,.83055],Ko=[0,.68611,0,0,.89444],$o=[0,.69444,0,0,.60278],wu=[.19444,.69444,0,0,.51111],ku=[0,.69444,0,0,.83055],at=[-.10889,.39111,0,0,1.14999],Mu
1=[.19444,.69444,0,0,.575],Br=[.19444,.69444,0,0,1.14999],Su=[.19444,.69444,0,0,.70277],Cu=[.05556,.75,0,0,.575],Po=[0,.68611,0,0,.95833],Lu=[.08556,.58556,0,0,.76666],Oo=[-.02639,.47361,0,0,.575],Du=[0,.44444,0,0,.89444],ui=[0,.55556,0,0,.76666],Eu=[-.10889,.39111,0,0,.89444],Io=[.00222,.50222,0,0,.89444],Ot=[.19667,.69667,0,0,.89444],Bu=[.08556,.58556,0,0,1.14999],Ro=[0,.69444,0,0,.70277],Ia=[-.02778,.47222,0,0,.575],Ra=[.25,.75,0,0,.51111],Au=[-.13889,.36111,0,0,1.14999],Tu=[.19444,.69444,0,0,1.02222],Na=[.12963,.69444,0,0,.89444],Fu=[.19444,.69444,0,0,.44722],It=[0,.64444,.13167,0,.59111],zu=[.19444,.64444,.13167,0,.59111],No=[0,.68611,.17208,0,.8961],Ku=[.19444,.44444,.105,0,.53222],$u=[0,.44444,.085,0,.82666],Pu=[0,.69444,.06709,0,.59111],qa=[0,.69444,.12945,0,.35555],Ou=[0,.69444,0,0,.94888],qo=[0,.69444,.11472,0,.59111],Iu=[0,.68611,.10778,0,.88555],Ru=[0,.69444,.07939,0,.62055],Va=[0,.69444,.12417,0,.30667],Rt=[0,.64444,.13556,0,.51111],Nu=[.19444,.64444,.13556,0,.51111],ja=[0,.68333,.16389,0,.74333],qu=[.19444,.43056,.08847,0,.46],Vu=[0,.43056,.07514,0,.71555],ju=[0,.69444,.06646,0,.51111],Hu=[0,.69444,0,0,.83129],Wu=[0,.69444,.1225,0,.51111],Uu=[0,.68333,.09403,0,.76666],Ju=[0,.68333,.11111,0,.76666],Xu=[0,.69444,.06961,0,.51444],mt=[0,.69444,0,0,.27778],Ui=[.25,.75,0,0,.38889],je=[0,.64444,0,0,.5],ci=[0,.69444,0,0,.77778],di=[0,.68333,0,0,.75],Ar=[0,.68333,0,0,.77778],Gu=[0,.68333,0,0,.68056],Tr=[0,.68333,0,0,.72222],ft=[.25,.75,0,0,.5],Ha=[.25,.75,0,0,.27778],fe=[0,.69444,0,0,.5],Ji=[0,.69444,0,0,.55556],Vo=[0,.43056,0,0,.44445],Fr=[0,.43056,0,0,.5],Zu=[.19444,.43056,0,0,.55556],Yu=[0,.43056,0,0,.55556],He=[.08333,.58333,0,0,.77778],Qu=[0,.43056,0,0,.27778],ec=[0,.66786,0,0,.27778],tc=[0,.69444,0,0,.75],ic=[0,.66786,0,0,.5],rc=[0,.68333,0,0,.625],jo=[.19444,.69444,0,0,.44445],zr=[0,.69444,0,0,.72222],ac=[.19444,.69444,0,0,.5],Kr=[.19444,.69444,0,0,1],nc=[.011,.511,0,0,1.126],Ho=[.19444,.69444,0,0,.61111],Wo=[.05556,.75,0,0,.5],oc=[0,.68333,0,0,.83334],lc=[.0391,.5391,0,0,.66667],Uo=[-.05555,.44445,0,0,.5],sc=[0,.43056,0,0,.77778],hi=[0,.55556,0,0,.66667],Wa=[-.03625,.46375,0,0,.77778],uc=[-.01688,.48312,0,0,.77778],cc=[.0391,.5391,0,0,1],Nt=[0,.69444,0,0,.61111],Ua=[-.03472,.46528,0,0,.5],Ja=[.25,.75,0,0,.44445],dc=[-.14236,.35764,0,0,1],Xa=[.244,.744,0,0,.412],hc=[.19444,.69444,0,0,.88889],Ga=[.12963,.69444,0,0,.77778],pc=[.19444,.69444,0,0,.38889],mc=[.011,.511,0,0,1.638],fc=[.19444,.69444,0,0,0],Za=[0,.44444,0,0,.575],$r=[.19444,.44444,0,0,.575],gc=[0,.68611,0,0,.75555],bc=[0,.69444,0,0,.66759],yc=[0,.68611,0,0,.80555],vc=[0,.68611,.08229,0,.98229],xc=[0,.68611,0,0,.76666],_c=[0,.44444,0,0,.58472],wc=[.19444,.44444,0,0,.6118],Pr=[.19444,.43056,0,0,.5],kc=[0,.68333,.02778,.08334,.76278],Mc=[0,.68333,.08125,.05556,.83125],Sc=[0,.43056,0,.05556,.48472],Cc=[.19444,.43056,0,.08334,.51702],Lc=[.25,.75,0,0,.42778],ke=[0,.69444,0,0,.55],gt=[0,.69444,0,0,.73334],qt=[0,.69444,0,0,.79445],Dc=[0,.69444,0,0,.51945],Jo=[0,.69444,0,0,.70278],Ec=[0,.69444,0,0,.76389],Bc=[.25,.75,0,0,.34306],Xo=[0,.69444,0,0,.56111],Ac=[0,.69444,0,0,.25556],Tc=[.19444,.45833,0,0,.56111],Fc=[0,.45833,0,0,.56111],Ya=[0,.69444,0,0,.30556],zc=[0,.69444,0,0,.58056],Kc=[0,.69444,0,0,.67223],Go=[0,.69444,0,0,.85556],Zo=[0,.69444,0,0,.55834],nt=[0,.65556,.11156,0,.5],Yo=[0,.69444,.08094,0,.70834],Qo=[.17014,0,0,0,.44445],$c=[0,.69444,.0799,0,.5],Pc=[0,.69444,0,0,.73752],Oc=[0,.69444,.09205,0,.5],Ic=[0,.69444,.09031,0,.77778],el=[0,.69444,.07816,0,.27778],Rc=[0,.69444,.00316,0,.5],Nc=[.19444,.69444,0,0,.83334],qc=[.05556,.75,0,0,.83334],Vc=[0,.75,0,0,.5],jc=[.125,.08333,0,0,.27778],Hc=[0,.08333,0,0,.27778],ot=[0,.65556,0,0,.5],tl=[0,.69444,0,0,.47222],bt=[0,.69444,0,0,.66667],Wc=[0,.69444,0,0,.59722],il=[0,.69444,0,0,.54167],rl=[0,.69444,0,0,.70834],Uc=[.25,.75,0,0,.28889],al=[0,.69444,0,0,.51667],Jc=[0,.44444,0,0,.44445],Xc=[.19444,.44444,0,0,.51667],Gc=[0,.44444,0,0,.38333],Zc=[0,.44444,0,0,.51667],Yc=[0,.69444,0,0,.83334],Qc=[.35001,.85,0,0,.45834],ed=[.35001,.85,0,0,.57778],td=[.35001,.85,0,0,.41667],id=[.35001,.85,0,0,.58334],Qa=[0,.72222,0,0,.55556],rd=[1e-5,.6,0,0,.66667],ad=[1e
vendor: 5,131 bytes, line 1
1-5,.6,0,0,.77778],nd=[.25001,.75,0,0,.94445],od=[.306,.805,.19445,0,.47222],ld=[.30612,.805,.19445,0,.47222],Xi=[.25001,.75,0,0,.83334],Gi=[.35001,.85,0,0,.47222],nl=[.25001,.75,0,0,1.11111],sd=[.65002,1.15,0,0,.59722],ud=[.65002,1.15,0,0,.81111],cd=[.65002,1.15,0,0,.47222],dd=[.65002,1.15,0,0,.66667],en=[0,.75,0,0,1],hd=[.55001,1.05,0,0,1.27778],pd=[.862,1.36,.44445,0,.55556],md=[.86225,1.36,.44445,0,.55556],Zi=[.55001,1.05,0,0,1.11111],tn=[.65002,1.15,0,0,.52778],fd=[.65002,1.15,0,0,.61111],ol=[.55001,1.05,0,0,1.51112],gd=[.95003,1.45,0,0,.73611],bd=[.95003,1.45,0,0,1.04445],yd=[.95003,1.45,0,0,.52778],rn=[.95003,1.45,0,0,.75],an=[0,.75,0,0,1.44445],nn=[.95003,1.45,0,0,.58334],vd=[1.25003,1.75,0,0,.79167],xd=[1.25003,1.75,0,0,1.27778],_d=[1.25003,1.75,0,0,.58334],on=[1.25003,1.75,0,0,.80556],ln=[0,.825,0,0,1.8889],sn=[1.25003,1.75,0,0,.63889],un=[.64502,1.155,0,0,.875],wd=[1e-5,.6,0,0,.875],ll=[-99e-5,.601,0,0,.66667],cn=[.64502,1.155,0,0,.66667],kd=[1e-5,.9,0,0,.88889],Md=[.65002,1.15,0,0,.88889],Sd=[.90001,0,0,0,.88889],Cd=[-.00499,.605,0,0,1.05556],dn=[0,.12,0,0,.45],F=[0,.61111,0,0,.525],Ze=[.08333,.69444,0,0,.525],Ld=[-.08056,.53055,0,0,.525],Dd=[-.05556,.55556,0,0,.525],Ee=[0,.43056,0,0,.525],Or=[.22222,.43056,0,0,.525],Ed=[0,0,0,0,.525],Mm={"AMS-Regular":{32:J,65:qe,66:li,67:qe,68:qe,69:li,70:Ma,71:Do,72:Do,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:Do,76:li,77:[0,.68889,0,0,.94445],78:qe,79:Ns,80:Ma,81:Ns,82:qe,83:Cr,84:li,85:qe,86:qe,87:[0,.68889,0,0,1],88:qe,89:qe,90:li,107:Cr,160:J,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:Cr,295:Sa,710:qs,732:Vs,770:qs,771:Vs,989:Ft,1008:cu,8245:[0,.54986,0,0,.275],8463:Sa,8487:qe,8498:Cr,8502:li,8503:[0,.68889,0,0,.44445],8504:li,8513:[0,.68889,0,0,.63889],8592:Eo,8594:Eo,8602:Se,8603:Se,8606:Ca,8608:Ca,8610:js,8611:js,8619:Hs,8620:Hs,8621:[-.13313,.37788,0,0,1.38889],8622:Se,8624:La,8625:La,8630:Bo,8631:Bo,8634:Tt,8635:Tt,8638:Da,8639:Da,8642:Da,8643:Da,8644:Ea,8646:Ea,8647:Ea,8648:Ws,8649:Ea,8650:Ws,8651:Ca,8652:Ca,8653:Se,8654:Se,8655:Se,8666:Us,8667:Us,8669:[-.13313,.37788,0,0,1],8672:Js,8674:Js,8705:[0,.825,0,0,.5],8708:Cr,8709:Ft,8717:[0,.43056,0,0,.42917],8722:Eo,8724:[.08198,.69224,0,0,.77778],8726:Ft,8733:Aa,8736:Lr,8737:Lr,8738:[.03517,.52239,0,0,.72222],8739:su,8740:[.25142,.74111,0,0,.27778],8741:uu,8742:[.25142,.74111,0,0,.5],8756:Ao,8757:Ao,8764:Ba,8765:[-.13313,.37788,0,0,.77778],8769:Ba,8770:Wa,8774:Xe,8776:uc,8778:Ft,8782:Xs,8783:Xs,8785:Tt,8786:Tt,8787:Tt,8790:Aa,8791:Dr,8796:[.08198,.91667,0,0,.77778],8806:Ni,8807:Ni,8808:it,8809:it,8812:[.25583,.75583,0,0,.5],8814:qi,8815:qi,8816:Xe,8817:Xe,8818:Dr,8819:Dr,8822:Gs,8823:Gs,8828:rt,8829:rt,8830:Dr,8831:Dr,8832:qi,8833:qi,8840:Xe,8841:Xe,8842:Te,8843:Te,8847:zt,8848:zt,8858:Tt,8859:Tt,8861:Tt,8862:Vi,8863:Vi,8864:Vi,8865:Vi,8872:[0,.69224,0,0,.61111],8873:Lr,8874:[0,.69224,0,0,.88889],8876:Ma,8877:Ma,8878:qe,8879:qe,8882:zt,8883:zt,8884:rt,8885:rt,8888:[0,.54986,0,0,1.11111],8890:Zu,8891:Zs,8892:Zs,8901:[0,.54986,0,0,.27778],8903:Ft,8905:Ft,8906:Ft,8907:Aa,8908:Aa,8909:[-.03598,.46402,0,0,.77778],8910:Ys,8911:Ys,8912:zt,8913:zt,8914:Qs,8915:Qs,8916:Ao,8918:Kt,8919:Kt,8920:eu,8921:eu,8922:tu,8923:tu,8926:rt,8927:rt,8928:Xe,8929:Xe,8934:Ta,8935:Ta,8936:Ta,8937:Ta,8938:qi,8939:qi,8940:Xe,8941:Xe,8994:iu,8995:iu,9416:[.15559,.69224,0,0,.90222],9484:La,9488:La,9492:ru,9496:ru,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:Vi,9633:Vi,9650:Fa,9651:Fa,9654:zt,9660:Fa,9661:Fa,9664:zt,9674:nu,9733:[.19444,.69224,0,0,.94445],10003:au,10016:au,10731:nu,10846:[.19444,.75583,0,0,.61111],10877:rt,10878:rt,10885:Ni,10886:Ni,10887:Te,10888:Te,10889:ji,10890:ji,10891:ou,10892:ou,10901:rt,10902:rt,10933:it,10934:it,10935:ji,10936:ji,10937:ji,10938:ji,10949:Ni,10950:Ni,10955:lu,10956:lu,57350:su,57351:uu,57352:Ft,57353:cu,57356:it,57357:it,57358:du,57359:Xe,57360:Xe,57361:du,57366:it,57367:it,57368:it,57369:it,57370:Te,57371:Te},"Caligraphic-Regular":{32:J,65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:J},"Fraktur-Regular":{32:J,33:[0,.69141,0,0,.29574],34:Fo,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:hu,41:hu,42:[0,.62119,0,0,.27764],43:pu,44:mu,45:pu,46:mu,47:[.24982,.74947,0,0,.50181],48:To,49:To,50:To,51:Er,52:Er,53:Er,54:fu,55:Er,56:fu,57:Er,58:[0,.47
1534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:gu,93:gu,94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:J,8216:Fo,8217:Fo,58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:J,33:[0,.69444,0,0,.35],34:$o,35:[.19444,.69444,0,0,.95833],36:Cu,37:[.05556,.75,0,0,.95833],38:Ka,39:Wi,40:za,41:za,42:[0,.75,0,0,.575],43:Ge,44:[.19444,.15556,0,0,.31944],45:Gc,46:[0,.15556,0,0,.31944],47:$t,48:Ve,49:Ve,50:Ve,51:Ve,52:Ve,53:Ve,54:Ve,55:Ve,56:Ve,57:Ve,58:vu,59:[.19444,.44444,0,0,.31944],60:Hi,61:Eu,62:Hi,63:[0,.69444,0,0,.54305],64:Ka,65:zo,66:[0,.68611,0,0,.81805],67:Oa,68:[0,.68611,0,0,.88194],69:gc,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:$a,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:_u,77:[0,.68611,0,0,1.09166],78:$a,79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:zo,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:Pa,92:$t,93:Pa,94:Pt,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:si,99:yu,100:si,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:si,105:Wi,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:Wi,109:[0,.44444,0,0,.95833],110:bu,111:Za,112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:bu,118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:yu,123:$t,124:Pa,125:$t,126:[.35,.34444,0,0,.575],160:J,163:[0,.69444,0,0,.86853],168:Pt,172:[0,.44444,0,0,.76666],176:xu,177:Ge,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:Ge,216:[.04861,.73472,0,0,.89444],223:Wc,230:[0,.44444,0,0,.83055],247:Ge,248:[.09722,.54167,0,0,.575],305:vu,338:[0,.68611,0,0,1.16944],339:Du,567:[.19444,.44444,0,0,.35139],710:Pt,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Pt,715:Pt,728:Pt,729:Wi,730:xu,732:Pt,733:Pt,915:_u,916:Po,920:Ko,923:yc,926:xc,928:$a,931:Oa,933:Ko,934:Oa,936:Ko,937:Oa,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:Wi,8217:Wi,8220:$o,8221:$o,8224:wu,8225:wu,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:bc,8465:ku,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:ku,8501:Ro,8592:at,8593:Mu,8594:at,8595:Mu,8596:at,8597:$t,8598:Br,8599:Br,8600:Br,8601:Br,8636:at,8637:at,8640:at,8641:at,8656:at,8657:Su,8658:at,8659:Su,8660:at,8661:[.25,.75,0,0,.70277],8704:si,8706:[0,.69444,.06389,0,.62847],8707:si,8709:Cu,8711:Po,8712:Lu,8715:Lu,8722:Ge,8723:Ge,8725:$t,8726:$t,8727:Ia,8728:Oo,8729:Oo,8730:[.18,.82,0,0,.95833],8733:Du,8734:[0,.44444,0,0,1.14999],8736:Lr,8739:Pa,8741:$t,8743:ui,8744
vendor: 10,362 bytes, line 1
1:ui,8745:ui,8746:ui,8747:[.19444,.69444,.12778,0,.56875],8764:Eu,8768:[.19444,.69444,0,0,.31944],8771:Io,8776:[.02444,.52444,0,0,.89444],8781:Io,8801:Io,8804:Ot,8805:Ot,8810:Bu,8811:Bu,8826:Hi,8827:Hi,8834:Hi,8835:Hi,8838:Ot,8839:Ot,8846:ui,8849:Ot,8850:Ot,8851:ui,8852:ui,8853:Ge,8854:Ge,8855:Ge,8856:Ge,8857:Ge,8866:Ro,8867:Ro,8868:Ka,8869:Ka,8900:Oo,8901:[-.02639,.47361,0,0,.31944],8902:Ia,8968:Ra,8969:Ra,8970:Ra,8971:Ra,8994:Au,8995:Au,9651:Tu,9657:Ia,9661:Tu,9667:Ia,9711:Br,9824:Na,9825:Na,9826:Na,9827:Na,9837:[0,.75,0,0,.44722],9838:Fu,9839:Fu,10216:za,10217:za,10815:$a,10927:Ot,10928:Ot,57376:fc},"Main-BoldItalic":{32:J,33:[0,.69444,.11417,0,.38611],34:Ru,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:qa,40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:It,49:It,50:It,51:It,52:zu,53:It,54:It,55:zu,56:It,57:It,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:qo,64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:No,73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:No,79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:Pu,95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:Ku,104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:Ku,114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:J,168:[0,.69444,.11473,0,.59111],176:Ou,184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:$u,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:$u,567:[.19444,.44444,.04611,0,.385],710:Pu,711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:qa,730:Ou,732:qo,733:qo,915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:No,931:[0,.68611,.11431,0,.82666],933:Iu,934:[0,.68611,.05632,0,.82666],936:Iu,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:qa,8217:qa,8220:[0,.69444,.16772,0,.62055],8221:Ru},"Main-Italic":{32:J,33:Va,34:Xu,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:Va,40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:Rt,49:Rt,50:Rt,51:Rt,52:Nu,53:Rt,54:Rt,55:Nu,56:Rt,57:Rt,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:Wu,64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:ja,73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:ja,79:Uu,80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:ja,86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:ju,95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:qu,104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:qu,114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:J,168:[0,.66786,.10474,0,.51111],176:Hu,184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:Vu,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:Vu,710:ju,711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:Hu,732:[0,.66786,.11585,0,.51111],733:Wu,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:Uu,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:ja,931:[0,.68333,.12028,0,.71555],933:Ju,934:[0,.68333,.05986,0,.71555],936:Ju,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:Va,8217:Va,8220:[0,.69444,.1685,0,.51444],8221:Xu,8463:Sa},"Main-Regular":{32:J,33:mt,34:fe,35:Nc,36:Wo,37:qc,38:ci,39:mt,40:Ui,41:Ui,42:Vc,43:He,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:ft,48:je,49:je,50:je,51:je,52:je,53:je,54:je,55:je,56:je,57:je,58:Qu,59:[.19444,.43056,0,0,.27778],60:Kt,61:Ba,62:Kt,63:tl,64:ci,65:di,66:[0,.68333,0,0,.70834],67:Tr,68:[0,.68333,0,0,.76389],69:Gu,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:di,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:Ar,76:rc,77:[0,.68333,0,0,.91667],78:di,79:Ar,80:Gu,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:Tr,85:di,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:di,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:Ha,92:ft,93:Ha,94:fe,95:[.31,.12056,.02778,0,.5],97:Fr,98:Ji,99:Vo,100:Ji,101:Vo,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:Ji,105:ec,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:mt,109:[0,.43056,0,0,.83334],110:Yu,111:Fr,112:Zu,113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:Yu,118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:Vo,123:ft,124:Ha,125:ft,126:[.35,.31786,0,0,.5],160:J,163:[0,.69444,0,0,.76909],167:jo,168:ic,172:[0,.43056,0,0,.66667],176:tc,177:He,182:Ho,184:Qo,198:[0,.68333,0,0,.90278],215:He,216:[.04861,.73194,0,0,.77778],223:fe,230:[0,.43056,0,0,.72222],247:He,248:[.09722,.52778,0,0,.5],305:Qu,338:[0,.68333,0,0,1.01389],339:sc,567:[.19444,.43056,0,0,.30556],710:fe,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:fe,715:fe,728:fe,729:ec,730:tc,732:ic,733:fe,915:rc,916:oc,920:Ar,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:di,931:Tr,933:Ar,934:Tr,936:Ar,937:Tr,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:mt,8217:mt,8220:fe,8221:fe,8224:jo,8225:jo,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:Sa,8465:zr,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:zr,8501:Nt,8592:Se,8593:ac,8594:Se,8595:ac,8596:Se,8597:ft,8598:Kr,8599:Kr,8600:Kr,8601:Kr,8614:[.011,.511,0,0,1],8617:nc,8618:nc,8636:Se,8637:Se,8640:Se,8641:Se,8652:[.011,.671,0,0,1],8656:Se,8657:Ho,8658:Se,8659:Ho,8660:Se,8661:[.25,.75,0,0,.61111],8704:Ji,8706:[0,.69444,.05556,.08334,.5309],8707:Ji,8709:Wo,8711:oc,8712:lc,8715:lc,8722:He,8723:He,8725:ft,8726:ft,8727:Ua,8728:Uo,8729:Uo,8730:[.2,.8,0,0,.83334],8733:sc,8734:Bo,8736:Lr,8739:Ha,8741:ft,8743:hi,8744:hi,8745:hi,8746:hi,8747:[.19444,.69444,.11111,0,.41667],8764:Ba,8768:[.19444,.69444,0,0,.27778],8771:Wa,8773:[-.022,.589,0,0,1],8776:uc,8781:Wa,8784:[-.133,.67,0,0,.778],8801:Wa,8804:Te,8805:Te,8810:cc,8811:cc,8826:Kt,8827:Kt,8834:Kt,8835:Kt,8838:Te,8839:Te,8846:hi,8849:Te,8850:Te,8851:hi,8852:hi,8853:He,8854:He,8855:He,8856:He,8857:He,8866:Nt,8867:Nt,8868:ci,8869:ci,8872:[.249,.75,0,0,.867],8900:Uo,8901:[-.05555,.44445,0,0,.27778],8902:Ua,8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:Ja,8969:Ja,8970:Ja,8971:Ja,8994:dc,8995:dc,9136:Xa,9137:Xa,9651:hc,9657:Ua,9661:hc,9667:Ua,9711:Kr,9824:Ga,9825:Ga,9826:Ga,9827:Ga,9837:[0,.75,0,0,.38889],9838:pc,9839:pc,10216:Ui,10217:Ui,10222:Xa,10223:Xa,10229:[.011,.511,0,0,1.609],10230:mc,10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:mc,10815:di,10927:Te,10928:Te,57376:fc},"Math-BoldItalic":{32:J,48:Za,49:Za,50:Za,51:$r,52:$r,53:$r,54:Ve,55:$r,56:Ve,57:$r,65:zo,66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[
10,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:vc,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:gc,77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:bc,105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:_c,112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:J,915:[0,.68611,.15972,0,.65694],916:Po,920:[0,.68611,.03194,0,.86722],923:yc,926:[0,.68611,.07458,0,.84125],928:vc,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:xc,936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:_c,960:[0,.44444,.03704,0,.68241],961:wc,962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:wc,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:J,48:Fr,49:Fr,50:Fr,51:Pr,52:Pr,53:Pr,54:je,55:Pr,56:je,57:Pr,65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:Mc,73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:kc,80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:Sc,112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:J,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:kc,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:Mc,931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:Sc,960:[0,.43056,.03588,0,.57003],961:Cc,962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:Cc,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]}
1,"SansSerif-Bold":{32:J,33:[0,.69444,0,0,.36667],34:Zo,35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:Ya,40:Lc,41:Lc,42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:ke,49:ke,50:ke,51:ke,52:ke,53:ke,54:ke,55:ke,56:ke,57:ke,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:Dc,64:gt,65:gt,66:gt,67:Jo,68:qt,69:[0,.69444,0,0,.64167],70:Nt,71:gt,72:qt,73:[0,.69444,0,0,.33056],74:Dc,75:Ec,76:zc,77:[0,.69444,0,0,.97778],78:qt,79:qt,80:Jo,81:[.10556,.69444,0,0,.79445],82:Jo,83:Nt,84:gt,85:Ec,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:gt,89:[0,.69444,.0275,0,.73334],90:Kc,91:Bc,93:Bc,94:ke,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:Xo,99:[0,.45833,0,0,.48889],100:Xo,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:Xo,105:Ac,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Ac,109:[0,.45833,0,0,.86667],110:Fc,111:[0,.45833,0,0,.55],112:Tc,113:Tc,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:Fc,118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:J,168:ke,176:gt,180:ke,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:ke,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:ke,729:Ya,730:gt,732:ke,733:ke,915:zc,916:[0,.69444,0,0,.91667],920:Go,923:Kc,926:gt,928:qt,931:qt,933:Go,934:qt,936:Go,937:qt,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:Ya,8217:Ya,8220:Zo,8221:Zo},"SansSerif-Italic":{32:J,33:[0,.69444,.05733,0,.31945],34:Rc,35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:el,40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:jc,45:[0,.44444,.01946,0,.33333],46:Hc,47:[.25,.75,.13164,0,.5],48:nt,49:nt,50:nt,51:nt,52:nt,53:nt,54:nt,55:nt,56:nt,57:nt,58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:bt,66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:Yo,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:il,77:[0,.69444,.08094,0,.875],78:Yo,79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:$c,95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:J,168:[0,.67937,.06385,0,.5],176:Pc,184:Qo,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:$c,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:Oc,715:fe,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:Pc,732:[0,.67659,.08826,0,.5],733:Oc,915:[0,.69444,.13372,0,.54167],916:Yc,920:[0,.69444,.07555,0,.77778],923:Nt,926:[0,.69444,.12816,0,.66667],928:Yo,931:[0,.69444,.11983,0,.72222],933:Ic,934:[0,.69444,.04603,0,.72222],936:Ic,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:el,8217:el,8220:[0,.69444,.14205,0,.5],8221:Rc},"SansSerif-Regular":{32:J,33:[0,.69444,0,0,.31945],34:fe,35:Nc,36:Wo,37:qc,38:[0,.69444,0,0,.75834],39:mt,40:Ui,41:Ui,42:Vc,43:He,44:jc,45:[0,.44444,0,0,.33333],46:Hc,47:ft,48:ot,49:ot,50:ot,51:ot,52:ot,53:ot,54:ot,55:ot,56:ot,57:ot,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:tl,64:bt,65:bt,66:bt,67:si,68:[0,.69444,0,0,.72223],69:Wc,70:[0,.69444,0,0,.56945],71:bt,72:rl,73:mt,74:tl,75:[0,.69444,0,0,.69445],76:il,77:[0,.69444,0,0,.875],78:rl,79:[0,.69444,0,0,.73611],80:si,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:Ji,84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:bt,89:[0,.69444,.025,0,.66667],90:Nt,91:Uc,93:Uc,94:fe,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:al,99:Jc,100:al,101:Jc,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:al,105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:Zc,111:[0,.44444,0,0,.5],112:Xc,113:Xc,114:[0,.44444,.01389,0,.34167],115:Gc,116:[0,.57143,0,0,.36111],117:Zc,118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:J,168:[
vendor: 10,948 bytes, lines 1-42
10,.67937,0,0,.5],176:bt,184:Qo,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:fe,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:fe,715:fe,728:fe,729:[0,.67937,0,0,.27778],730:bt,732:[0,.67659,0,0,.5],733:fe,915:il,916:Yc,920:ci,923:Nt,926:bt,928:rl,931:zr,933:ci,934:zr,936:ci,937:zr,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:mt,8217:mt,8220:fe,8221:fe},"Script-Regular":{32:J,65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:J},"Size1-Regular":{32:J,40:Qc,41:Qc,47:ed,91:td,92:ed,93:td,123:id,125:id,160:J,710:Qa,732:Qa,770:Qa,771:Qa,8214:[-99e-5,.601,0,0,.77778],8593:rd,8595:rd,8657:ad,8659:ad,8719:nd,8720:nd,8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:ld,8748:od,8749:od,8750:ld,8896:Xi,8897:Xi,8898:Xi,8899:Xi,8968:Gi,8969:Gi,8970:Gi,8971:Gi,9168:ll,10216:Gi,10217:Gi,10752:nl,10753:nl,10754:nl,10756:Xi,10758:Xi},"Size2-Regular":{32:J,40:sd,41:sd,47:ud,91:cd,92:ud,93:cd,123:dd,125:dd,160:J,710:en,732:en,770:en,771:en,8719:hd,8720:hd,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:md,8748:pd,8749:pd,8750:md,8896:Zi,8897:Zi,8898:Zi,8899:Zi,8968:tn,8969:tn,8970:tn,8971:tn,10216:fd,10217:fd,10752:ol,10753:ol,10754:ol,10756:Zi,10758:Zi},"Size3-Regular":{32:J,40:gd,41:gd,47:bd,91:yd,92:bd,93:yd,123:rn,125:rn,160:J,710:an,732:an,770:an,771:an,8730:[.95003,1.45,0,0,1],8968:nn,8969:nn,8970:nn,8971:nn,10216:rn,10217:rn},"Size4-Regular":{32:J,40:vd,41:vd,47:xd,91:_d,92:xd,93:_d,123:on,125:on,160:J,710:ln,732:ln,770:ln,771:ln,8730:[1.25003,1.75,0,0,1],8968:sn,8969:sn,8970:sn,8971:sn,9115:un,9116:wd,9117:un,9118:un,9119:wd,9120:un,9121:cn,9122:ll,9123:cn,9124:cn,9125:ll,9126:cn,9127:kd,9128:Md,9129:Sd,9130:[0,.3,0,0,.88889],9131:kd,9132:Md,9133:Sd,9143:[.88502,.915,0,0,1.05556],10216:on,10217:on,57344:Cd,57345:Cd,57680:dn,57681:dn,57682:dn,57683:dn},"Typewriter-Regular":{32:Ed,33:F,34:F,35:F,36:Ze,37:Ze,38:F,39:F,40:Ze,41:Ze,42:[0,.52083,0,0,.525],43:Ld,44:[.13889,.125,0,0,.525],45:Ld,46:[0,.125,0,0,.525],47:Ze,48:F,49:F,50:F,51:F,52:F,53:F,54:F,55:F,56:F,57:F,58:Ee,59:[.13889,.43056,0,0,.525],60:Dd,61:[-.19549,.41562,0,0,.525],62:Dd,63:F,64:F,65:F,66:F,67:F,68:F,69:F,70:F,71:F,72:F,73:F,74:F,75:F,76:F,77:F,78:F,79:F,80:F,81:[.13889,.61111,0,0,.525],82:F,83:F,84:F,85:F,86:F,87:F,88:F,89:F,90:F,91:Ze,92:Ze,93:Ze,94:F,95:[.09514,0,0,0,.525],96:F,97:Ee,98:F,99:Ee,100:F,101:Ee,102:F,103:Or,104:F,105:F,106:[.22222,.61111,0,0,.525],107:F,108:F,109:Ee,110:Ee,111:Ee,112:Or,113:Or,114:Ee,115:Ee,116:[0,.55358,0,0,.525],117:Ee,118:Ee,119:Ee,120:Ee,121:Or,122:Ee,123:Ze,124:Ze,125:Ze,126:F,127:F,160:Ed,176:F,184:[.19445,0,0,0,.525],305:Ee,567:Or,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:F,715:F,728:F,730:F,770:F,771:F,776:F,915:F,916:F,920:F,923:F,926:F,928:F,931:F,933:F,934:F,936:F,937:F,8216:F,8217:F,8242:F,9251:[.11111,.21944,0,0,.525]}},Sm=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,xr=10,et=.25,Cm=1.2,St=.431,Bd={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[St,St,St],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.5,.732,.925],num2:[.394,.384,.5],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[et,et,et],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04]},zl=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],bs=5,Ad={" ":" ","​":" ",Å:"A",Ç:"C",Ð:"D",Þ:"o",å:"a",ç:"c",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function sr(e,t){e===void 0&&(e=77);let i=Mm[t][e];if(i)return{defaultMetrics:!1,depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]};if(e===11034)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0,width:.8};let r=String.fromCodePoint(e);if(r in Ad)e=Ad[r].codePointAt(0);else if(Sm.test(r))return e=77,{defaultMetrics:!0,depth:.2,height:.9,italic:0,skew:0,width:1};return{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0,width:.8}}var Kl={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],longrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],longleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],longleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],longrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],longleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],longleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],longRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716],longLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},$l={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34],overarc:[1061,159,.3],underarc:[1061,159,.3]},Td={doubleleftarrow:`M262 157
2l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
3 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
4 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
5c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
6 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
7-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
8-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
9m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
10-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
11 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
12-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
13-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
14-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
15c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
16-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
17 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
18-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
19c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
20 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
21 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
22 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
23-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
24 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
25 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
26 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
27-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,overarc:"M529 0c179 0 524 115 524 115 5 1 9 5 9 10 0 1-1 2-1 3l-4 22c-1 5-5 9-11 9h-2s-338-93-512-92c-174 0-513 92-513 92h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13 0 0 342-115 520-115z",underarc:`m 529 160
28  c -179 0 -524 -115 -524 -115
29  c -5 -1 -9 -5 -9 -10
30  c 0 -1 1 -2 1 -3
31  l 4 -22
32  c 1 -5 5 -9 11 -9
33  h 2
34  s 338 93 512 92
35  c 174 0 513 -92 513 -92
36  h 2
37  c 5 0 9 4 11 9
38  l 5 22
39  c 1 6 -2 12 -8 13
40  c 0 0 -342 115 -520 115
41  z
42  
vendor: 5,836 bytes, lines 42-108
42`,leftgroup:`M400000 80
43H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
44 435 0h399565z`,leftgroupunder:`M400000 262
45H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
46 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
47-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
48-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
49-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
50 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
51-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
52-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
53m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
54 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
55 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
56-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
57 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
58-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
59v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
60-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
61-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
62 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
63M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
64M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
65-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
66c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
67 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
68M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
69c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
70-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
71 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
72 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
73c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
74 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
75 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
76-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
77-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
78m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
7960.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
80-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
81m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
82c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
83-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
84m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
8585.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
86-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
87m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
88c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
89-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
90 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
91 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
92-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
93-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
94 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
95-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
96s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
97c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
98 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
99-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
100 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
101 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
102-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
103-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
104 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
105-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
106 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
107m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
108 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
vendor: 7,499 bytes, lines 109-191
109-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
110-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
111 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
112 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
113-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
114m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
115 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
116-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
117 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
118M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
119 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
120-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
121-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
122 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
123-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
124-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
125-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
126 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
127c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
128 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
129 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
130-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
131 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,widetilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
132-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
133 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
134 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
135-68.267.847-113-73.952-191-73.952z`,widetilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
136-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
137 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
138c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
139 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,widetilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
140-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
141 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
142 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
143 -338 0-409-156.573-744-156.573z`,widetilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
144-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
145 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
146 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
147 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
1483.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
14910.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
150-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
151-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
152H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
153c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
154c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
155-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
156-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
157-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
158-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
159-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
160-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
161-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
162c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
163c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
164s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
165121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
166s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
167c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
168M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
169-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
17013.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
171-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
172-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
173-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
174151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
175c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
176c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
177c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
178c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
179M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
180c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
181-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
182c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
183M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
184c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1851c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
186-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
187M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
188c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
189-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
190c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
191M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`};function 
vendor: 3,595 bytes, line 191
191Lm(e){if($l[e]){let[u,c,d]=$l[e],h=`<span class="ML__stretchy" style="height:${d}em"><svg width="100%" height="${d}em" viewBox="0 0 ${u} ${c}" preserveAspectRatio="none" ><path fill="currentcolor" d="${Td[e]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*d/2)/100}em;min-width:0">${h}</span>`}let[t,i,r,a]=Kl[e],n,o,l=r/1e3;t.length===3?(n=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],o=["xMinYMin","xMidYMin","xMaxYMin"]):t.length===2?(n=["slice-1-of-2","slice-2-of-2"],o=["xMinYMin","xMaxYMin"]):(n=["slice-1-of-1"],o=[a]);let s=t.map((u,c)=>`<span class="${n[c]}" style=height:${l}em><svg width=400em height=${l}em viewBox="0 0 400000 ${r}" preserveAspectRatio="${o[c]} slice"><path fill="currentcolor" d="${Td[u]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${l}em;min-width:${i}em;">${s}</span>`}function Dm(e){return Kl[e]?Kl[e][2]/1e3:$l[e][2]}function Em(e){let t=[];for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(r===13&&e.charCodeAt(i+1)===10&&(r=10,i++),(r===13||r===12)&&(r=10),r===0&&(r=65533),r>=55296&&r<=56319){let a=e.charCodeAt(i+1);if(a>=56320&&a<=57343){let n=r-55296,o=a-56320;r=2**16+n*2**10+o,i++}}t.push(r)}return t}var Tn=8205,Bm=[[Tn,1],[65038,2],[127995,5],[129456,4],[917536,96]],hn,Fd=[127462,127487];function zd(e){var t;if(hn===void 0){hn={};for(let i of Bm)for(let r=i[0];r<=i[0]+i[1]-1;r++)hn[r]=!0}return(t=hn[e])!=null?t:!1}function Am(e){return e>=Fd[0]&&e<=Fd[1]}function N0(e){if(/^[\u0020-\u00FF]*$/.test(e))return e;let t=[],i=Em(e),r=0;for(;r<i.length;){let a=i[r++],n=i[r];if(n===Tn){let o=r-1;for(r+=2;i[r]===Tn;)r+=2;t.push(String.fromCodePoint(...i.slice(o,r-o+1)))}else if(zd(n)){let o=r-1;for(;zd(i[r]);)r+=i[r]===Tn?2:1;t.push(String.fromCodePoint(...i.slice(o,2*r-o-1)))}else Am(a)?(r+=1,t.push(String.fromCodePoint(...i.slice(r-2,2)))):t.push(String.fromCodePoint(a))}return t}var Tm=class{constructor(e){this.obeyspaces=!1,this.pos=0,this.s=N0(e)}end(){return this.pos>=this.s.length}get(){return this.pos<this.s.length?this.s[this.pos++]:""}peek(){return this.s[this.pos]}match(e){let t=typeof this.s=="string"?e.exec(this.s.slice(this.pos)):e.exec(this.s.slice(this.pos).join(""));return t!=null&&t[0]?(this.pos+=t[0].length,t[0]):""}next(){if(this.end())return null;if(!this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]+/)||this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]/))return"<space>";let e=this.get();if(e==="\\"){if(!this.end()){let t=this.match(/^[a-zA-Z\*]+/);return t?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):t=this.get(),"\\"+t}}else{if(e==="{")return"<{>";if(e==="}")return"<}>";if(e==="^"){if(this.peek()==="^"){this.get();let t=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(t)return String.fromCodePoint(Number.parseInt(t.slice(t.lastIndexOf("^")+1),16))}return e}else if(e==="#"){if(!this.end()){let t=!1;if(/[\d?@]/.test(this.peek())&&(t=!0,this.pos+1<this.s.length)){let i=this.s[this.pos+1];t=/[^\dA-Za-z]/.test(i)}return t?"#"+this.get():"#"}}else if(e==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>"}return e}};function Fm(e,t){var i,r,a,n;let o=[],l=e.next();if(l&&l!=="\\relax"){if(l==="\\noexpand")l=e.next(),l&&o.push(l);else if(l==="\\obeyspaces")e.obeyspaces=!0;else if(l==="\\bgroup")o.push("<{>");else if(l==="\\egroup")o.push("<}>");else if(l==="\\string"){if(l=e.next(),l)if(l.startsWith("\\"))for(let s of l)o.push(s==="\\"?"\\backslash":s);else l==="<{>"?o.push("\\{"):l==="<space>"?o.push("~"):l==="<}>"&&o.push("\\}")}else if(l==="\\csname"){for(;
vendor: 9,325 bytes, line 191
191e.peek()==="<space>";)e.next();let s="",u=!1,c=[];do{if(c.length===0)if(/^#[\d?@]$/.test(e.peek())){let d=e.get().slice(1);c=sa((r=(i=t==null?void 0:t(d))!=null?i:t==null?void 0:t("?"))!=null?r:"\\placeholder{}",t),l=c[0]}else l=e.next(),c=l?[l]:[];u=c.length===0,!u&&l==="\\endcsname"&&(u=!0,c.shift()),u||(u=l==="<$>"||l==="<$$>"||l==="<{>"||l==="<}>"||typeof l=="string"&&l.length>1&&l.startsWith("\\")),u||(s+=c.shift())}while(!u);s&&o.push("\\"+s),o.push(...c)}else if(l!=="\\endcsname")if(l.length>1&&l.startsWith("#")){let s=l.slice(1);o.push(...sa((n=(a=t==null?void 0:t(s))!=null?a:t==null?void 0:t("?"))!=null?n:"\\placeholder{}",t))}else o.push(l)}return o}function sa(e,t=null){if(!e)return[];let i=[],r="";for(let o of e.toString().split(/\r?\n/)){r&&i.push(r),r=" ";let l=o.match(/((?:\\%)|[^%])*/);l!==null&&i.push(l[0])}let a=new Tm(i.join("")),n=[];do n.push(...Fm(a,t));while(!a.end());return n}function R(e){let t="",i=[];for(let r of e)r&&(t&&/^[a-zA-Z\*]/.test(r)&&i.push(t),i.push(r),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(r)&&i.push(" "),t=/\\[a-zA-Z]+\*?$/.test(r)?" ":"");return i.join("")}function Q(e,...t){return e.startsWith("\\"),t.length===0?e:R([e,...t.map(i=>`{${i}}`)])}function pi(e){return R(e.map(t=>{var i;return(i={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[t])!=null?i:t}))}var q0=class Xr{constructor(t){Xr._registry[t]=this}static createAtom(t,i,r){return Xr._registry[t].createAtom(i,ye(i,t),r)}static serialize(t,i){var r;if(!t||t.length===0)return"";if((r=i.skipStyles)!=null&&r){let a=[];for(let n of V0(t)){let o=Xr._registry[n[0].mode];a.push(...o.serialize(n,i))}return R(a)}return R(Km(t,i))}static getFont(t,i,r){return Xr._registry[t].getFont(i,r)}};q0._registry={};var Re=q0;function V0(e){let t=[],i=[],r="NONE";for(let a of e)a.type!=="first"&&(a.mode!==r?(i.length>0&&t.push(i),i=[a],r=a.mode):i.push(a));return i.length>0&&t.push(i),t}function Pl(e){if((e==null?void 0:e.mode)!=="math")return"";let{style:t}=e;return!t||!t.variantStyle?"":t.variantStyle==="bold"||t.variantStyle==="bolditalic"?"bold":""}function Ol(e){if(!e)return"";let{style:t}=e;if(!t)return"";let i=t.variant;return i===void 0?"normal":(!["calligraphic","fraktur","double-struck","script","monospace","sans-serif"].includes(i)&&t.variantStyle&&(i+="-"+t.variantStyle),i)}function Bt(e,t){let i=[],r=[],a;for(let n of e){if(n.type==="first")continue;let o;t==="variant"?o=Ol(n):t==="bold"?o=Pl(n):o=n.style[t],o===a?r.push(n):(r.length>0&&i.push(r),r=[n],a=o)}return r.length>0&&i.push(r),i}function Kd(e,t){var i;let{parent:r}=e[0],a=r==null?void 0:r.style.color,n=[];for(let o of V0(e)){let l=t.defaultMode;for(let s of Bt(o,"color")){let u=s[0].style,c=Re._registry[s[0].mode].serialize(s,y(f({},t),{defaultMode:l==="text"?"text":"math"}));!t.skipStyles&&u.color&&u.color!=="none"&&(!r||a!==u.color)?n.push(Q("\\textcolor",(i=u.verbatimColor)!=null?i:u.color,R(c))):n.push(R(c))}}return n}function zm(e,t){let{parent:i}=e[0],r=i==null?void 0:i.style.backgroundColor;return Bt(e,"backgroundColor").map(a=>{var n;if(a.length>0||a[0].type!=="box"){let o=a[0].style;if(o.backgroundColor&&o.backgroundColor!=="none"&&(!i||r!==o.backgroundColor))return Q("\\colorbox",(n=o.verbatimBackgroundColor)!=null?n:o.backgroundColor,R(Kd(a,y(f({},t),{defaultMode:"text"}))))}return R(Kd(a,t))})}function Km(e,t){if(e.length===0)return[];let{parent:i}=e[0],r=i==null?void 0:i.style.fontSize,a=[];for(let n of Bt(e,"fontSize")){let o=n[0].style.fontSize,l=zm(n,t);l&&(o&&o!=="auto"&&(!i||r!==o)?a.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][o],...l):a.push(...l))}return a}function Il(e){return e?{mord:"ord",mbin:"bin",mop:"op",mrel:"rel",mopen:"open",mclose:"close",mpunct:"punct",minner:"inner",spacing:"ignore",latex:"latex",composition:"inner",error:"inner",placeholder:"ord",supsub:"ignore"}[e]:void 0}function ga(e){if(e.length===0)return"ord";let t=Il(e[0].type),i=Il(e[e.length-1].type);return t&&t===i?t:"ord"}function Ir(e,t){if(typeof e=="string")return e;if(typeof e=="number"){let i=Math.ceil(100*e)/100;return i===0?"0":i.toString()+(t??"")}return""}var A=class j0{constructor(t,i){var r,a,n,o,l;if(typeof t=="number"?this.value=String.fromCodePoint(t):typeof t=="string"?this.value=t:ve(t)?this.children=t.filter(u=>u!==null):t&&t instanceof j0&&(this.children=[t]),this.children)for(let u of this.children)u.parent=this;this.type=(r=i==null?void 0:i.type)!=null?r:"ignore",this.isSelected=(i==null?void 0:i.isSelected)===!0,i!=null&&i.caret&&(this.caret=i.caret),this.classes=(a=i==null?void 0:i.classes)!=null?a:"",this.isTight=(n=i==null?void 0:i.isTight)!=null?n:!1,i!=null&&i.attributes&&(this.attributes=i.attributes);let s=i==null?void 0:i.fontFamily;i!=null&&i.style&&this.value&&(s=(l=Re.getFont((o=i.mode)!=null?o:"math",this,y(f({variant:"normal"},i.style),{letterShapeStyle:i.letterShapeStyle})))!=null?l:void 0),s||(s="Main-Regular"),this._height=0,this._depth=0,this._width=0,this.hasExplicitWidth=!1,this.skew=0,this.italic=0,this.maxFontSize=0,this.scale=1,(i==null?void 0:i.maxFontSize)!==void 0&&(this.maxFontSize=i.maxFontSize),$m(this,s)}set atomID(t){t===void 0||t.length===0||(this.id=t)}selected(t){if(this.isSelected!==t&&(this.isSelected=t,this.children))for(let i of this.children)i.selected(t)}setStyle(t,i,r){if(i===void 0)return;let a=Ir(i,r);a.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[t]=a)}setTop(t){Number.isFinite(t)&&Math.abs(t)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=Ir(t,"em"),this.height-=t,this.depth+=t)}get left(){var t;return(t=this.cssProperties)!=null&&t["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=Ir(t,"em")))}set right(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=Ir(t,"em")))}set bottom(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-bottom"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-bottom"]=Ir(t,"em")))}get width(){return this._width*this.scale}set width(t){this._width=t,this.hasExplicitWidth=!0}set softWidth(t){}get height(){return this._height*this.scale}set height(t){this._height=t}get depth(){return this._depth*this.scale}set depth(t){this._depth=t}wrap(t){let i=t.parent;if(!i)return this;t.isPhantom&&this.setStyle("opacity",0);let r=t.color;r&&r!==i.color&&this.setStyle("color",r);let a=t.backgroundColor;this.isSelected&&(a=mm(a)),a&&a!==i.backgroundColor&&(this.setStyle("background-color",a),this.setStyle("--bg-color",a),this.setStyle("display","inline-block"),this.setStyle("position","relative"),this.classes=this.classes?`${this.classes} ML__bg`:"ML__bg");let n=t.scalingFactor;return this.scale=n,this.skew*=n,this.italic*=n,this}toMarkup(){var t,i,r,a;let n=(t=this.value)!=null?t:"";if(this.children)for(let p of this.children)n+=p.toMarkup();let o="";if(this.svgBody)o=Lm(this.svgBody);else if(this.svgOverlay){o='<span style="',o+="display: inline-block;",o+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`,o+=`vertical-align:${Math.floor(100*this.depth)/100}em;`,o+='">',o+=n,o+="</span>",o+='<svg style="position:absolute;overflow:visible;',o+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`;let p=(i=this.cssProperties)==null?void 0:i.padding;p?(o+=`top:${p};`,o+=`left:${p};`,o+=`width:calc(100% - 2 * ${p} );`):o+="top:0;left:0;width:100%;",o+="z-index:2;",o+='"',this.svgStyle&&(o+=this.svgStyle),o+=` viewBox="0 0 ${Math.floor(100*this.width)/100} ${Math.floor(100*(this.height+this.depth))/100}"`,o+=`>${this.svgOverlay}</svg>`}let l=[],s=this.classes.split(" ");s.push((r={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?r:""),this.caret==="latex"&&s.push("ML__latex-caret"),this.isSelected&&s.push("ML__selected");let u=s.length===1?s[0]:s.filter((p,m,g)=>p.length>0&&g.indexOf(p)===m).join(" ");if(u.length>0&&l.push(`class=${Yi(`"${u}"`)}`),this.id&&l.push(` data-atom-id=${Yi(this.id)}`),this.cssId&&l.push(` id=${Yi(`"${this.cssId.replace(/ /g,"-")}"`)}`),this.attributes&&l.push(...Object.keys(this.attributes).map(p=>`${sl(p)}=${Yi(this.attributes[p])}`)),this.htmlData){let p=this.htmlData.split(",");for(let m of p){let g=m.match(/([^=]+)=(.+$)/);if(g){let v=sl(g[1]);if(v)if(v==="href"){let b=new URL(g[2]);if(b.protocol!=="http:"&&b.protocol!=="https:")throw new Error(`Invalid URL: ${g[2]}`);l.push(`href="${g[2].replace(/"/g,"&quot;")}"`)}else l.push(`data-${v}=${Yi(g[2])}`)}else{let v=sl(m);v&&l.push(`data-${v} `)}}}let c=(a=this.cssProperties)!=null?a:{};this.hasExplicitWidth&&c.width===void 0&&(c.width=`${Math.ceil(this._width*100)/100}em`);let d=Object.keys(c).map(p=>`${p}:${c[p]}`);if(this.scale!==void 0&&this.scale!==1&&(n.length>0||o.length>0)&&d.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle)for(let p of this.htmlStyle.split(";")){let m=p.match(/([^:]+):(.+$)/);if(m){let g=m[1].trim().replace(/ /g,"-");g&&d.push(`${g}:${m[2]}`)}}d.length>
1910&&l.push(`style=${Yi(d.join(";"))}`);let h="";return l.length>0||o.length>0?h=`<span ${l.join(" ")}>${n}${o}</span>`:h=n,this.caret==="text"?h+='<span class="ML__text-caret"></span>':this.caret==="math"&&(h+='<span class="ML__caret"></span>'),h}tryCoalesceWith(t){if(this.svgBody||!this.value||t.svgBody||!t.value)return!1;let i=this.children&&this.children.length>0,r=t.children&&t.children.length>0;if(i||r)return!1;if(t.cssProperties||this.cssProperties){for(let s of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(t.cssProperties&&s in t.cssProperties||this.cssProperties&&s in this.cssProperties)return!1}let a=this.cssProperties?Object.keys(this.cssProperties).length:0,n=t.cssProperties?Object.keys(t.cssProperties).length:0;if(a!==n)return!1;if(a>0){for(let s of Object.keys(this.cssProperties))if(this.cssProperties[s]!==t.cssProperties[s])return!1}let o=this.classes.trim().replace(/\s+/g," ").split(" "),l=t.classes.trim().replace(/\s+/g," ").split(" ");if(o.length!==l.length)return!1;o.sort(),l.sort();for(let[s,u]of o.entries())if(u==="ML__vertical-separator"||u!==l[s])return!1;return this.value+=t.value,this.height=Math.max(this.height,t.height),this.depth=Math.max(this.depth,t.depth),this._width=this._width+t._width,this.maxFontSize=Math.max(this.maxFontSize,t.maxFontSize),this.italic=t.italic,!0}};function Rl(e){if(!e||e.length===0)return[];e[0].children=Rl(e[0].children);let t=[e[0]];for(let i=1;i<e.length;i++)t[t.length-1].tryCoalesceWith(e[i])||(e[i].children=Rl(e[i].children),t.push(e[i]));return t}function co(e){return e.children&&(e.children=Rl(e.children)),e}function ho(e,t){if(!e)return new A(null,t);let i=new A(null,{classes:"ML__strut",type:"ignore"});i.setStyle("height",Math.max(0,e.height),"em");let r=[i];if(e.depth!==0){let a=new A(null,{classes:"ML__strut--bottom",type:"ignore"});a.setStyle("height",e.height+e.depth,"em"),a.setStyle("vertical-align",-e.depth,"em"),r.push(a)}return r.push(e),new A(r,y(f({},t),{type:"lift"}))}function Fn(e){let t=Dm(e)/2,i=new A(null,{maxFontSize:0});return i.height=t+.166,i.depth=t-.166,i.svgBody=e,i}function $m(e,t){var i;if(e.type==="latex"){e.height=.9,e.depth=.2,e._width=1;return}if(e.value){e.height=-1/0,e.depth=-1/0,e._width=0,e.skew=-1/0,e.italic=-1/0;for(let r=0;r<e.value.length;r++){let a=sr(e.value.codePointAt(r),t);e.height=Math.max(e.height,a.height),e.depth=Math.max(e.depth,a.depth),e._width+=a.width,e.skew=a.skew,e.italic=a.italic}return}if(e.children&&e.children.length>0){let r=-1/0,a=-1/0,n=0;for(let o of e.children)o.height>r&&(r=o.height),o.depth>a&&(a=o.depth),n=Math.max(n,(i=o.maxFontSize)!=null?i:0);e.height=r,e.depth=a,e._width=e.children.reduce((o,l)=>o+l.width,0),e.maxFontSize=n}}function sl(e){if(e=e.trim().replace(/ /g,"-"),e.length===0)throw new Error("Invalid empty attribute name");if(/[\x20\x09\x0a\x0c\x0d"'>/=\x00-\x1f]/.test(e))throw new Error(`Invalid attribute name "${e}"`);return e}function Yi(e){if(e=e.trim(),e.startsWith('"')&&e.endsWith('"')){if(/"/.test(e.slice(1,-1)))throw new Error(`Invalid attribute value: ${e}`);return e}if(e.startsWith("'")&&e.endsWith("'")){if(/'/.test(e.slice(1,-1)))throw new Error(`Invalid attribute value: ${e}`);return e}if(e.length===0)throw new Error("Invalid empty attribute value");return`"${e.replace(/"/g,"&quot;")}"`}function Pm(e){if("individualShift"in e){let t=e.individualShift,i=t[0];if(i==null)return[null,0];let r=[i],a=-i.shift-i.box.depth,n=a;for(let o=1;o<t.length;o++){let l=t[o],s=-l.shift-n-l.box.depth,u=s-(i.box.height+i.box.depth);n=n+s,r.push(u),r.push(l),i=l}return[r,a]}if("top"in e){let t=e.top;for(let i of e.children)t-=typeof i=="number"?i:i.box.height+i.box.depth;return[e.children,t]}else{if("bottom"in e)return[e.children,-e.bottom];if("firstBaseline"in e){let t=e.firstBaseline[0];if(typeof t=="number")throw new Error("First child must be an element.");return[e.firstBaseline,-t.box.depth]}else if("shift"in e){let t=e.children[0];if(typeof t=="number")throw new Error("First child must be an element.");return[e.children,-t.box.depth-e.shift]}}return[null,0]}
vendor: 4,256 bytes, line 191
191function Om(e){var t;let[i,r]=Pm(e);if(!i)return[[],0,0];let a=new A(null,{classes:"ML__pstrut"}),n=0;for(let m of i)if(typeof m!="number"){let g=m.box;n=Math.max(n,g.maxFontSize,g.height)}n+=2,a.height=n,a.setStyle("height",n,"em");let o=[],l=r,s=r,u=r,c=0;for(let m of i){if(typeof m=="number")u+=m;else{let g=m.box,v=(t=m.classes)!=null?t:[],b=new A([a,g],{classes:v.join(" "),style:m.style});g.setStyle("height",g.height+g.depth,"em"),g.setStyle("display","inline-block"),b.setStyle("top",-n-u-g.depth,"em"),m.marginLeft&&b.setStyle("margin-left",m.marginLeft,"em"),m.marginRight&&b.setStyle("margin-right",m.marginRight,"em"),o.push(b),u+=g.height+g.depth,c=Math.max(c,b.width)}l=Math.min(l,u),s=Math.max(s,u)}o.forEach(m=>{m.softWidth=c});let d=new A(o,{classes:"ML__vlist"});if(d.softWidth=c,d.height=s,d.setStyle("height",s,"em"),l>=0)return[[new A(d,{classes:"ML__vlist-r"})],s,-l];let h=new A(new A(null),{classes:"ML__vlist"});h.height=-l,h.setStyle("height",-l,"em");let p=new A(8203,{classes:"ML__vlist-s",maxFontSize:0});return p.softWidth=0,p.height=0,p.depth=0,[[new A([d,p],{classes:"ML__vlist-r"}),new A(h,{classes:"ML__vlist-r"})],s,-l]}var pe=class extends A{constructor(e,t){var i;let[r,a,n]=Om(e);super(r.length===1?r[0]:r,{type:t==null?void 0:t.type,classes:((i=t==null?void 0:t.classes)!=null?i:"")+" ML__vlist-t"+(r.length===2?" ML__vlist-t2":"")}),this.height=a,this.depth=n,this.softWidth=r.reduce((o,l)=>Math.max(o,l.width),0)}};function Im(e,t){var i,r,a,n,o;let l=e.metrics,s=new A(t.base),u=(i=t.baseShift)!=null?i:0,c=(r=t.slant)!=null?r:0,d=0,h=0;t.above&&(d=(a=t.aboveShift)!=null?a:Math.max(l.bigOpSpacing1,l.bigOpSpacing3-t.above.depth)),t.below&&(h=(n=t.belowShift)!=null?n:Math.max(l.bigOpSpacing2,l.bigOpSpacing4-t.below.height));let p=null;if(t.below&&t.above){let m=l.bigOpSpacing5+t.below.height+t.below.depth+h+s.depth+u;p=new pe({bottom:m,children:[l.bigOpSpacing5,{box:t.below,marginLeft:-c,classes:["ML__center"]},h,{box:s,classes:["ML__center"]},d,{box:t.above,marginLeft:c,classes:["ML__center"]},l.bigOpSpacing5]}).wrap(e)}else if(t.below&&!t.above)p=new pe({top:s.height-u,children:[l.bigOpSpacing5,{box:t.below,marginLeft:-c,classes:["ML__center"]},h,{box:s,classes:["ML__center"]}]}).wrap(e);else if(!t.below&&t.above){let m=s.depth+u;p=new pe({bottom:m,children:[{box:s,classes:["ML__center"]},d,{box:t.above,marginLeft:c,classes:["ML__center"]},l.bigOpSpacing5]}).wrap(e)}else{let m=s.depth+u;p=new pe({bottom:m,children:[{box:s},l.bigOpSpacing5]}).wrap(e)}return new A(p,{type:(o=t.type)!=null?o:"op"})}var ys=7,Xn=6,po=5,ki=4,mr=3,Oe=2,Ci=1,Ce=0,Vt=class{constructor(e,t,i){this.id=e,this.sizeDelta=t,this.cramped=i;let r={"-4":2,"-3":1,0:0}[t];this.metrics=Object.keys(Bd).reduce((a,n)=>y(f({},a),{[n]:Bd[n][r]}),{})}getFontSize(e){return Math.max(1,e+this.sizeDelta)}get sup(){return ut[[Ce,Ci,Ce,Ci,Oe,mr,Oe,mr][this.id]]}get sub(){return ut[[Ce,Ce,Ce,Ce,Oe,Oe,Oe,Oe][this.id]]}get fracNum(){return ut[[Ce,Ci,Ce,Ci,Oe,mr,ki,po][this.id]]}get fracDen(){return ut[[Ce,Ce,Ce,Ce,Oe,Oe,ki,ki][this.id]]}get cramp(){return ut[[Ce,Ce,Oe,Oe,ki,ki,Xn,Xn][this.id]]}get isTight(){return this.sizeDelta<0}},Rr={7:new Vt(ys,0,!1),6:new Vt(Xn,0,!0),5:new Vt(po,0,!1),4:new Vt(ki,0,!0),3:new Vt(mr,-3,!1),2:new Vt(Oe,-3,!0),1:new Vt(Ci,-4,!1),0:new Vt(Ce,-4,!0)},ut=y(f({},Rr),{displaystyle:Rr[ys],textstyle:Rr[po],scriptstyle:Rr[mr],scriptscriptstyle:Rr[Ci]});function H0(e,t){var i;if(!e)return 0;let r={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:xr,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(i=e.unit)!=null?i:"pt"];if(Number.isFinite(t)){let a=10**t;return Math.round(e.dimension/xr*r*a)/a}return e.dimension*r}function W0(e,t){if(e===null)return 0;let i=H0(e)/xr;if(Number.isFinite(t)){let r=10**t;return Math.round(i*r)/r}return i}function ul(e){var t;return`${e.dimension}${(t=e.unit)!=null?t:"pt"}`}function Rm(e){let t=ul(e.glue);return e.grow&&e.grow.dimension!==0&&(t+=` plus ${ul(e.grow)}`),e.shrink&&e.shrink.dimension!==0&&(t+=` minus ${ul(e.shrink)}`),t}function _e(e){var t,i;if(e==null)return null;let r="";if("dimension"in e&&(r=`${e.dimension}${(t=e.unit)!=null?t:"pt"}`),"glue"in e&&(r=Rm(e)),"number"in e)if(!("base"in e)||e.base==="decimal")r=Number(e.number).toString();
vendor: 4,566 bytes, line 191
191else if(e.base==="alpha")r=`\`${String.fromCodePoint(e.number)}`;else{let a=Math.round(e.number)>>>0;e.base==="hexadecimal"?(r=Number(a).toString(16).toUpperCase(),a<=255?r=r.padStart(2,"0"):a<=65535?r=r.padStart(4,"0"):a<=16777215?r=r.padStart(6,"0"):r=r.padStart(8,"0"),r=`"${r}`):e.base==="octal"&&(r=Number(a).toString(8),a<=63?r=r.padStart(2,"0"):a<=30583?r=r.padStart(4,"0"):r=r.padStart(8,"0"),r=`'${r}`)}return"register"in e&&("factor"in e&&(e.factor===-1?r="-":e.factor!==1&&(r=Number(e.factor).toString())),"global"in e&&e.global&&(r+="\\global"),r+=`\\${e.register}`),"string"in e&&(r=e.string),(i=e.relax)!=null&&i&&(r+="\\relax"),r}function st(e,t){return e==null?null:"number"in e?y(f({},e),{number:e.number*t}):"register"in e?"factor"in e&&e.factor?y(f({},e),{factor:e.factor*t}):y(f({},e),{factor:t}):"dimension"in e?y(f({},e),{dimension:e.dimension*t}):"glue"in e?e.shrink&&e.grow?{glue:st(e.glue,t),shrink:st(e.shrink,t),grow:st(e.grow,t)}:e.shrink?{glue:st(e.glue,t),shrink:st(e.shrink,t)}:e.grow?{glue:st(e.glue,t),grow:st(e.grow,t)}:{glue:st(e.glue,t)}:null}var Nm={"p@":{dimension:1},"z@":{dimension:0},maxdimen:{dimension:16383.99999},hfuzz:{dimension:.1},vfuzz:{dimension:.1},overfullrule:{dimension:5},hsize:{dimension:6.5,unit:"in"},vsize:{dimension:8.9,unit:"in"},parindent:{dimension:20},maxdepth:{dimension:4},splitmaxdepth:{register:"maxdimen"},boxmaxdepth:{register:"maxdimen"},delimitershortfall:{dimension:5},nulldelimiterspace:{dimension:1.2,unit:"pt"},scriptspace:{dimension:.5},topskip:{dimension:10},splittopskip:{dimension:10},normalbaselineskip:{dimension:12},normallineskip:{dimension:1},normallineskiplimit:{dimension:0},jot:{dimension:3},doublerulesep:{dimension:2},arrayrulewidth:{dimension:.4},arraycolsep:{dimension:5},fboxsep:{dimension:3},fboxrule:{dimension:.4},"z@skip":{glue:{dimension:0},shrink:{dimension:0},grow:{dimension:0}},hideskip:{glue:{dimension:-1e3},grow:{dimension:1,unit:"fill"}},"@flushglue":{glue:{dimension:0},grow:{dimension:1,unit:"fill"}},parskip:{glue:{dimension:0},grow:{dimension:1}},abovedisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},abovedisplayshortskip:{glue:{dimension:0},grow:{dimension:3}},belowdisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},belowdisplayshortskip:{glue:{dimension:7},grow:{dimension:3},shrink:{dimension:4}},parfillskip:{glue:{dimension:0},grow:{dimension:1,unit:"fil"}},thinmuskip:{glue:{dimension:3,unit:"mu"}},medmuskip:{glue:{dimension:4,unit:"mu"},grow:{dimension:2,unit:"mu"},shrink:{dimension:4,unit:"mu"}},thickmuskip:{glue:{dimension:5,unit:"mu"},grow:{dimension:5,unit:"mu"}},smallskipamount:{glue:{dimension:3},grow:{dimension:1},shrink:{dimension:1}},medskipamount:{glue:{dimension:6},grow:{dimension:2},shrink:{dimension:3}},bigskipamount:{glue:{dimension:12},grow:{dimension:2},shrink:{dimension:4}},pretolerance:100,tolerance:200,hbadness:1e3,vbadness:1e3,linepenalty:10,hyphenpenalty:50,exhyphenpenalty:50,binoppenalty:700,relpenalty:500,clubpenalty:150,widowpenalty:150,displaywidowpenalty:50,brokenpenalty:100,predisplaypenalty:1e4,doublehyphendemerits:1e4,finalhyphendemerits:5e3,adjdemerits:1e4,tracinglostchars:1,uchyph:1,delimiterfactor:901,defaulthyphenchar:"\\-",defaultskewchar:-1,newlinechar:-1,showboxbreadth:5,showboxdepth:3,errorcontextlines:5,interdisplaylinepenalty:100,interfootnotelinepenalty:100,baselineSkip:1.2,arraystretch:1,month:new Date().getMonth()+1,day:new Date().getDate(),year:new Date().getFullYear()};function U0(){return f({},Nm)}function vs(){return{registers:U0(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"▢",letterShapeStyle:O.locale.startsWith("fr")?"french":"tex",minFontScale:0,maxMatrixCols:10,colorMap:uo,backgroundColorMap:ds,getMacro:e=>gs(e,ms())}}var H=class J0{constructor(t,i){var r,a,n,o,l,s,u,c,d,h,p,m,g,v,b;let x;t!=null&&t.parent?(this.parent=t.parent,x=t.parent,this.registers={}):(x=f(f({},vs()),(r=t==null?void 0:t.from)!=null?r:{}),this.registers=x.registers),x.atomIdsSettings&&(this.atomIdsSettings=f({},x.atomIdsSettings)),this.renderPlaceholder=x.renderPlaceholder,this.isPhantom=(o=(n=t==null?void 0:t.isPhantom)!=null?n:(a=this.parent)==null?void 0:a.isPhantom)!=null?o:!1,this.letterShapeStyle=x.letterShapeStyle,this.minFontScale=x.minFontScale,this.maxMatrixCols=x.maxMatrixCols,i!=null&&i.color&&i.color!=="none"?this.color=i.color:this.color=(s=(l=this.parent)==null?void 0:l.color)!=null?s:"",i!=null&&i.backgroundColor&&i.backgroundColor!=="none"?this.backgroundColor=i.backgroundColor:this.backgroundColor=(c=(u
vendor: 14,792 bytes, line 191
191=this.parent)==null?void 0:u.backgroundColor)!=null?c:"",i!=null&&i.fontSize&&i.fontSize!=="auto"&&i.fontSize!==((d=this.parent)==null?void 0:d.size)?this.size=i.fontSize:this.size=(p=(h=this.parent)==null?void 0:h.size)!=null?p:bs;let E=(g=(m=this.parent)==null?void 0:m.mathstyle)!=null?g:ut.displaystyle;if(typeof(t==null?void 0:t.mathstyle)=="string"){if(x instanceof J0)switch(t.mathstyle){case"cramp":E=E.cramp;break;case"superscript":E=E.sup;break;case"subscript":E=E.sub;break;case"numerator":E=E.fracNum;break;case"denominator":E=E.fracDen;break}switch(t.mathstyle){case"textstyle":E=ut.textstyle;break;case"displaystyle":E=ut.displaystyle;break;case"scriptstyle":E=ut.scriptstyle;break;case"scriptscriptstyle":E=ut.scriptscriptstyle;break}}this.mathstyle=E,this.smartFence=x.smartFence,this.placeholderSymbol=x.placeholderSymbol,this.colorMap=(v=x.colorMap)!=null?v:(S=>S),this.backgroundColorMap=(b=x.backgroundColorMap)!=null?b:(S=>S),this.getMacro=x.getMacro,this.parent!==void 0||this.registers}makeID(){if(!this.atomIdsSettings)return;if(this.atomIdsSettings.overrideID)return this.atomIdsSettings.overrideID;if(typeof this.atomIdsSettings.seed!="number")return`${Date.now().toString(36).slice(-2)}${Math.floor(Math.random()*1e5).toString(36)}`;let t=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,t}scale(t){return t*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===ys||this.mathstyle.id===Xn}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(zl[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(t){if(this.registers&&t in this.registers)return this.registers[t];if(this.parent)return this.parent.getRegister(t)}getRegisterAsNumber(t){let i=this.getRegister(t);if(typeof i=="number")return i;if(typeof i=="string")return Number(i)}getRegisterAsGlue(t){if(this.registers&&t in this.registers){let i=this.registers[t];return typeof i=="object"&&"glue"in i?i:typeof i=="object"&&"dimension"in i?{glue:{dimension:i.dimension}}:typeof i=="number"?{glue:{dimension:i}}:void 0}if(this.parent)return this.parent.getRegisterAsGlue(t)}getRegisterAsEm(t,i){return W0(this.getRegisterAsDimension(t),i)}getRegisterAsDimension(t){if(this.registers&&t in this.registers){let i=this.registers[t];return typeof i=="object"&&"glue"in i?i.glue:typeof i=="object"&&"dimension"in i?i:typeof i=="number"?{dimension:i}:void 0}if(this.parent)return this.parent.getRegisterAsDimension(t)}setRegister(t,i){if(i===void 0){delete this.registers[t];return}this.registers[t]=i}evaluate(t){if(!t||!("register"in t))return t;let i=this;if("global"in t&&t.global)for(;i.parent;)i=i.parent;let r=1;"factor"in t&&t.factor!==1&&t.factor!==void 0&&(r=t.factor);let a=i.getRegister(t.register);if(a===void 0)return;if(typeof a=="string")return{string:Number(a).toString()+a};if(typeof a=="number")return{number:r*a};let n=i.evaluate(a);if(n!==void 0)return"string"in n?{string:Number(a).toString()+n.string}:"number"in n?{number:r*n.number}:"dimension"in n?y(f({},n),{dimension:r*n.dimension}):"glue"in n?y(f({},n),{glue:y(f({},n.glue),{dimension:r*n.glue.dimension}),shrink:n.shrink?y(f({},n.shrink),{dimension:r*n.shrink.dimension}):void 0,grow:n.grow?y(f({},n.grow),{dimension:r*n.grow.dimension}):void 0}):t}toDimension(t){let i=this.evaluate(t);if(i===void 0)return null;if("dimension"in i)return i;if("glue"in i)return i.glue;if("number"in i)return{dimension:i.number};if("string"in i){let r=parseFloat(i.string),a=i.string.match(/(mm|cm|ex|px|em|bp|dd|pc|in|mu)$/);return a?{dimension:r,unit:a[0]}:{dimension:r}}return null}toEm(t,i){if(t===null)return 0;let r=this.toDimension(t);return r===null?0:H0(r,i)/xr}toNumber(t){if(t===null)return null;let i=this.evaluate(t);return i===void 0?null:"number"in i?i.number:"dimension"in i?i.dimension:"glue"in i?i.glue.dimension:"string"in i?Number(i.string):null}toColor(t){var i,r;if(t===null)return null;let a=this.evaluate(t);return a===void 0?null:"string"in a?(r=(i=this.colorMap)==null?void 0:i.call(this,a.string))!=null?r:a.string:null}toBackgroundColor(t){var i,r;if(t===null)return null;let a=this.evaluate(t);return a===void 0?null:"string"in a?(r=(i=this.backgroundColorMap)==null?void 0:i.call(this,a.string))!=null?r:a.string:null}},_r=["body","above","below","superscript","subscript"];function xi(e){return typeof e=="string"&&_r.includes(e)}function Lt(e){return e!==void 0&&Array.isArray(e)&&e.length===2}var w=class yt{constructor(t){this.isRoot=!1;var i,r,a,n,o,l,s;this.type=t.type,typeof t.value=="string"&&(this.value=t.value),this.command=(r=(i=t.command)!=null?i:this.value)!=null?r:"",this.mode=(a=t.mode)!=null?a:"math",t.isFunction&&(this.isFunction=!0),(t.isRoot||this.type==="root")&&(this.isRoot=!0),t.limits&&(this.subsupPlacement=t.limits),this.style=f({},(n=t.style)!=null?n:{}),this.displayContainsHighlight=(o=t.displayContainsHighlight)!=null?o:!1,this.captureSelection=(l=t.captureSelection)!=null?l:!1,this.skipBoundary=(s=t.skipBoundary)!=null?s:!1,t.verbatimLatex!==void 0&&t.verbatimLatex!==null&&(this.verbatimLatex=t.verbatimLatex),t.args&&(this.args=t.args),t.body&&(this.body=t.body),this._changeCounter=0}static createBox(t,i,r){var a;if(!i)return null;let n=qm(i),o=[];for(let s of n){let u=s[0].style,c=Vm(t,s,{style:{color:u.color,backgroundColor:u.backgroundColor,fontSize:u.fontSize}});c&&o.push(c)}if(o.length===0)return null;let l=((a=r==null?void 0:r.classes)!=null?a:"").trim();return o.length===1&&!l&&!(r!=null&&r.type)?o[0].wrap(t):new A(o,{classes:l,type:r==null?void 0:r.type}).wrap(t)}static serialize(t,i){return Re.serialize(t,i)}static commonAncestor(t,i){if(t===i||t.parent===i.parent)return t.parent;let r=new WeakSet,{parent:a}=t;for(;a;)r.add(a),a=a.parent;for(a=i.parent;a;){if(r.has(a))return a;a=a.parent}}static fromJson(t){return typeof t=="string"?new yt({type:"mord",value:t,mode:"math"}):new yt(t)}toJson(){if(this._json)return this._json;let t={};if(this.type&&(t.type=this.type),this.mode!=="math"&&(t.mode=this.mode),this.command&&this.command!==this.value&&(t.command=this.command),this.value!==void 0&&(t.value=this.value),this.style&&Object.keys(this.style).length>0&&(t.style=f({},this.style)),this.verbatimLatex!==void 0&&(t.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(t.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(t.explicitSubsupPlacement=!0),this.isFunction&&(t.isFunction=!0),this.displayContainsHighlight&&(t.displayContainsHighlight=!0),this.skipBoundary&&(t.skipBoundary=!0),this.captureSelection&&(t.captureSelection=!0),this.args&&(t.args=jm(this.args)),this._branches)for(let i of Object.keys(this._branches))this._branches[i]&&(t[i]=this._branches[i].filter(r=>r.type!=="first").map(r=>r.toJson()));return t.type==="mord"&&Object.keys(t).length===2&&"value"in t?t.value:(this._json=t,t)}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(t){t&&(this._json=void 0,this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0,this.parent&&(this.parent.isDirty=!0))}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let i=ye(this.command,this.mode);return i!=null&&i.serialize?i.serialize(this,t):this.body&&this.command?R([Q(this.command,this.bodyToLatex(t)),this.supsubToLatex(t)]):this.body?R([this.bodyToLatex(t),this.supsubToLatex(t)]):!this.value||this.value==="​"?"":this.command}bodyToLatex(t){var i;let r=(i=t.defaultMode)!=null?i:this.mode==="math"?"math":"text";return Re.serialize(this.body,y(f({},t),{defaultMode:r}))}aboveToLatex(t){return Re.serialize(this.above,t)}belowToLatex(t){return Re.serialize(this.below,t)}supsubToLatex(t){let i="";if(t=y(f({},t),{defaultMode:"math"}),this.branch("subscript")!==void 0){let r=Re.serialize(this.subscript,t);r.length===0?i+="_{}":r.length===1?/^[0-9]$/.test(r)?i+=`_${r}`:i+=`_{${r}}`:i+=`_{${r}}`}if(this.branch("superscript")!==void 0){let r=Re.serialize(this.superscript,t);r.length===0?i+="^{}":r.length===1?r==="′"?i+="^\\prime ":r==="″"?i+="^\\doubleprime ":/^[0-9]$/.test(r)?i+=`^${r}`:i+=`^{${r}}`:i+=`^{${r}}`}return i}get treeDepth(){let t=1,i=this.parent;for(;i;)i=i.parent,t+=1;return t}get inCaptureSelection(){let t=this;for(;t;){if(t.captureSelection)return!0;t=t.parent}return!1}get parentPrompt(){let t=this.parent;for(;t;){if(t.type==="prompt"&&!t.captureSelection)return t;t=t.parent}return null}branch(t){if(xi(t)&&this._branches)return this._branches[t]}get branches(){if(!this._branches)return[];let t=[];for(let i of _r)this._branches[i]&&t.push(i);return t}createBranch(t){return xi(t),xi(t)?(this._branches?this._branches[t]||(this._branches[t]=[this.makeFirstAtom(t)]):this._branches={[t]:[this.makeFirstAtom(t)]},this.isDirty=!0,this._branches[t]):[]}get row(){return Lt(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Lt(this.parentBranch)?this.parentBranch[1]:-1}get body(){var t;return(t=this._branches)==null?void 0:t.body}set body(t){this.setChildren(t,"body")}get superscript(){var t;return(t=this._branches)==null?void 0:t.superscript}set superscript(t){this.setChildren(t,"superscript")}get subscript(){var t;return(t=this._branches)==null?void 0:t.subscript}set subscript(t){this.setChildren(t,"subscript")}get above(){var t;return(t=this._branches)==null?void 0:t.above}set above(t){this.setChildren(t,"above")}get below(){var t;return(t=this._branches)==null?void 0:t.below}set below(t){this.setChildren(t,"below")}applyStyle(t,i){this.isDirty=!0,i!=null&&i.unstyledOnly?(t.color&&!this.style.color&&(this.style.color=t.color),t.backgroundColor&&!this.style.backgroundColor&&(this.style.backgroundColor=t.backgroundColor),t.fontFamily&&!this.style.fontFamily&&(this.style.fontFamily=t.fontFamily),t.fontShape&&!this.style.fontShape&&(this.style.fontShape=t.fontShape),t.fontSeries&&!this.style.fontSeries&&(this.style.fontSeries=t.fontSeries),t.fontSize&&!this.style.fontSize&&(this.style.fontSize=t.fontSize),t.variant&&!this.style.variant&&(this.style.variant=t.variant),t.variantStyle&&!this.style.variantStyle&&(this.style.variantStyle=t.variantStyle)):this.style=f(f({},this.style),t),this.style.fontFamily==="none"&&delete this.style.fontFamily,this.style.fontShape==="auto"&&delete this.style.fontShape,this.style.fontSeries==="auto"&&delete this.style.fontSeries,this.style.color==="none"&&(delete this.style.color,delete this.style.verbatimColor),this.style.backgroundColor==="none"&&(delete this.style.backgroundColor,delete this.style.verbatimBackgroundColor),this.style.fontSize==="auto"&&delete this.style.fontSize;for(let r of this.children)r.applyStyle(t,i)}getInitialBaseElement(){var t,i,r;return this.hasEmptyBranch("body")?this:((t=this.body)==null||t[0].type,(r=(i=this.body[1])==null?void 0:i.getInitialBaseElement())!=null?r:this)}getFinalBaseElement(){return this.hasEmptyBranch("body")?this:this.body[this.body.length-1].getFinalBaseElement()}isCharacterBox(){return this.type==="leftright"||this.type==="genfrac"||this.type==="subsup"||this.type==="delim"||this.type==="array"||this.type==="surd"?!1:this.getFinalBaseElement().type==="mord"}hasEmptyBranch(t){let i=this.branch(t);return i?(i.length>0,i[0].type,i.length===1):!0}setChildren(t,i){var r;if(!t||(xi(i),!xi(i)))return;let a=((r=t[0])==null?void 0:r.type)==="first"?[...t]:[this.makeFirstAtom(i),...t];this._branches?this._branches[i]=a:this._branches={[i]:a};for(let n of t)n.parent=this,n.parentBranch=i;this.isDirty=!0}makeFirstAtom(t){let i=new yt({type:"first",mode:this.mode});return i.parent=this,i.parentBranch=t,i}addChild(t,i){t.type,this.createBranch(i).push(t),this.isDirty=!0,t.parent=this,t.parentBranch=i}addChildBefore(t,i){i.parentBranch;let r=this.createBranch(i.parentBranch);r.splice(r.indexOf(i),0,t),this.isDirty=!0,t.parent=this,t.parentBranch=i.parentBranch}addChildAfter(t,i){i.parentBranch;let r=this.createBranch(i.parentBranch);r.splice(r.indexOf(i)+1,0,t),this.isDirty=!0,t.parent=this,t.parentBranch=i.parentBranch}addChildren(t,i){let r=this.createBranch(i);for(let a of t)a.parent=this,a.parentBranch=i,r.push(a);this.isDirty=!0}addChildrenAfter(t,i){t.length===0||t[0].type,i.parentBranch;let r=this.createBranch(i.parentBranch);r.splice(r.indexOf(i)+1,0,...t),this.isDirty=!0;for(let a of t)a.parent=this,a.parentBranch=i.parentBranch;return t[t.length-1]}removeBranch(t){let i=this.branch(t);if(xi(t)&&(this._branches[t]=void 0),!i)return[];for(let n of i)n.parent=void 0,n.parentBranch=void 0;i[0].type;let[r,...a]=i;return this.isDirty=!0,a}removeChild(t){if(t.parent,t.type==="first")return;let i=this.branch(t.parentBranch),r=i.indexOf(t);i.splice(r,1),this.isDirty=!0,t.parent=void 0,t.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){let{siblings:t}=this;return t[t.length-1]}get isFirstSibling(){return this===this.firstSibling}get isLastSibling(){return this===this.lastSibling}get hasNoSiblings(){return this.siblings.length===1}get leftSibling(){this.parent;let t=this.parent.branch(this.parentBranch);return t[t.indexOf(this)-1]}get rightSibling(){this.parent;let t=this.parent.branch(this.parentBranch);return t[t.indexOf(this)+1]}get hasChildren(){return!!(this._branches&&this.children.length>0)}get firstChild(){return this.hasChildren,this.children[0]}get lastChild(){this.hasChildren;let{children:t}=this;return t[t.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];let t=[];for(let i of _r)if(this._branches[i])for(let r of this._branches[i])t.push(...r.children),t.push(r);return this._children=t,t}render(t){if(this.type==="first"&&!t.atomIdsSettings)return null;let i=ye(this.command,this.mode);if(i!=null&&i.render)return i.render(this,t);let r=new H({parent:t},this.style),a=this.createBox(r,{classes:this.parent?"":"ML__base"});return a?(!this.subsupPlacement&&(this.superscript||this.subscript)&&(a=this.attachSupsub(r,{base:a})),a.wrap(r)):null}attachSupsub(t,i){var r;let a=i.base,n=this.superscript,o=this.subscript;if(!n&&!o)return a;let l=null,s=null,u=(r=i.isCharacterBox)!=null?r:this.isCharacterBox(),c=0;if(n){let g=new H({parent:t,mathstyle:"superscript"});l=yt.createBox(g,n),u||(c=a.height-t.metrics.supDrop*g.scalingFactor)}let d=0;if(o){let g=new H({parent:t,mathstyle:"subscript"});s=yt.createBox(g,o),u||(d=a.depth+t.metrics.subDrop*g.scalingFactor)}let h;t.isDisplayStyle?h=t.metrics.sup1:t.isCramped?h=t.metrics.sup3:h=t.metrics.sup2;
vendor: 5,013 bytes, line 191
191let p=.5/xr/t.scalingFactor,m=null;if(s&&l){c=Math.max(c,h,l.depth+.25*t.metrics.xHeight),d=Math.max(d,t.metrics.sub2);let g=t.metrics.defaultRuleThickness;if(c-l.depth-(s.height-d)<4*g){d=4*g-(c-l.depth)+s.height;let b=.8*t.metrics.xHeight-(c-l.depth);b>0&&(c+=b,d-=b)}let v=this.type==="extensible-symbol"&&a.italic?-a.italic:0;m=new pe({individualShift:[{box:s,shift:d,marginLeft:v},{box:l,shift:-c}]})}else s&&!l?(d=Math.max(d,t.metrics.sub1,s.height-.8*St),m=new pe({shift:d,children:[{box:s,marginRight:p,marginLeft:this.isCharacterBox()?-a.italic:0}]})):!s&&l&&(c=Math.max(c,h,l.depth+.25*St),m=new pe({shift:-c,children:[{box:l,marginRight:p}]}));return new A([a,new A(m,{caret:this.caret,isSelected:this.isSelected,classes:"ML__msubsup"})],{type:i.type})}attachLimits(t,i){let r=this.superscript?yt.createBox(new H({parent:t,mathstyle:"superscript"},this.style),this.superscript):null,a=this.subscript?yt.createBox(new H({parent:t,mathstyle:"subscript"},this.style),this.subscript):null;return!r&&!a?i.base.wrap(t):Im(t,y(f({},i),{above:r,below:a}))}bind(t,i){if(!i||t.isPhantom||this.value==="​")return i;let r=this.parent;for(;r&&!r.captureSelection;)r=r.parent;return r!=null&&r.captureSelection||(this.id||(this.id=t.makeID()),i.atomID=this.id),i}createBox(t,i){var r,a,n,o;let l=(r=this.value)!=null?r:this.body,s=(a=i==null?void 0:i.boxType)!=null?a:Il(this.type),u=(n=i==null?void 0:i.classes)!=null?n:"";this.mode==="text"&&(u+=" ML__text");let c=typeof l=="string"||l===void 0?new A(l??null,{type:s,isSelected:this.isSelected,mode:this.mode,maxFontSize:t.scalingFactor,style:y(f({variant:"normal"},this.style),{fontSize:Math.max(1,t.size+t.mathstyle.sizeDelta)}),letterShapeStyle:t.letterShapeStyle,classes:u}):(o=yt.createBox(t,l,{type:s,classes:u}))!=null?o:new A(null);return t.isTight&&(c.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(c.italic=0),c.right=c.italic,this.bind(t,c),this.caret&&!this.superscript&&!this.subscript&&(c.caret=this.caret),c}isDigit(){var t;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((t=this.body)==null?void 0:t.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1}asDigit(){var t;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((t=this.body)==null?void 0:t.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":""}};function qm(e){let t,i=[],r=[];for(let a of e)if(a.type==="first"&&r.push(a),!t&&!a.style)r.push(a);else{let n=a.style;t&&n.color===t.color&&n.backgroundColor===t.backgroundColor&&n.fontSize===t.fontSize?r.push(a):(r.length>0&&i.push(r),r=[a],t=n)}return r.length>0&&i.push(r),i}function Vm(e,t,i){var r,a,n,o,l;if(!t||t.length===0)return null;let s=new H({parent:e},i.style),u=!((r=s.atomIdsSettings)!=null&&r.groupNumbers),c=[];if(t.length===1){let h=t[0],p=h.render(s);p&&(u&&h.isSelected&&p.selected(!0),c=[p])}else{let h="",p=!0;for(let m of t){(a=s.atomIdsSettings)!=null&&a.groupNumbers&&h&&(p&&m.isDigit()||!p&&cl(m))&&(s.atomIdsSettings.overrideID=h);let g=m.render(s);s.atomIdsSettings&&(s.atomIdsSettings.overrideID=void 0),g&&((n=s.atomIdsSettings)!=null&&n.groupNumbers&&((m.isDigit()||cl(m))&&(!h||p!==m.isDigit())&&(p=m.isDigit(),h=(o=m.id)!=null?o:""),h&&(!(m.isDigit()||cl(m))||!m.hasEmptyBranch("superscript")||!m.hasEmptyBranch("subscript"))&&(h="")),u&&m.isSelected&&g.selected(!0),c.push(g))}}if(c.length===0)return null;let d=new A(c,y(f({isTight:s.isTight},i),{type:(l=i.type)!=null?l:"lift"}));return d.isSelected=c.every(h=>h.isSelected),d.wrap(s)}function cl(e){return e.mode==="text"}function jm(e){return e.map(t=>t===null?"<null>":Array.isArray(t)&&t[0]instanceof w?{atoms:t.map(i=>i.toJson())}:typeof t=="object"&&"group"in t?{group:t.group.map(i=>i.toJson())}:t)}var Mr=class X0 extends w{constructor(t,i,r){super({type:"text",command:t,mode:"text",displayContainsHighlight:!0}),this.value=i,this.verbatimLatex=i,this.applyStyle(r)}static fromJson(t){return new X0(t.command,t.value,t.style)}render(t){let i=this.createBox(t);return this.caret&&(i.caret=this.caret),i}_serialize(t){var i;return(i=this.verbatimLatex)!=null?i:R0("text",this.value.codePointAt(0))}};function Hm(e,t){if(e.direction===t.direction){let i=e.ranges.length;if(t.ranges.length===i){let r=0;for(;r<i&&Wm(e.ranges[r],t.ranges[r])==="equal";)r++;return r===i?"equal":"different"}}return"different"}function Wm(e,t){return e[0]===t[0]&&e[1]===t[1]?"equal":"different"}function we(e){let t=1/0,i=-1/0;for(let r of e.ranges)t=Math.min(t,r[0],r[1]),i=Math.max(i,r[0],r[1]);return[t,i]}function Gt(e){return typeof e=="number"&&!Number.isNaN(e)}function Gn(e){return Array.isArray(e)&&e.length===2}function zn(e){return e!=null&&typeof e=="object"&&"ranges"in e&&Array.isArray(e.ranges)}function Um(e,t){let i=e.at(t),r;if(i){r=i.mode;let a=i.parent;for(;!r&&a;)a&&(r=a.mode),a=a.parent}return r}function Jm(e,t){if(!t)return"";if(typeof t=="string")return t;if(!e||t.after===void 0)return t.value;
vendor: 6,170 bytes, line 191
191let i=!1,r=!1,a=!1,n=!1,o=!1,l=!1,s=!1,u=!1,c=!1,d=!1,h=!1,p=!1,m=!1,g=!1,v=!1,b=e[0],x=0;for(;b!=null&&b.type&&/^(subsup|placeholder)$/.test(b.type);)x+=1,b=e[x];return i=!b||b.type==="first",b&&(g=b.mode==="text",r=!g&&b.type==="mord"&&Tl.test(b.value),a=!g&&b.type==="mord"&&/\d+$/.test(b.value),n=!g&&b.isFunction,o=b.type==="genfrac",l=b.type==="surd",s=b.type==="mbin",u=b.type==="mrel",c=b.type==="mop"||b.type==="operator"||b.type==="extensible-symbol",d=b.type==="mpunct"||b.type==="minner",h=b.type==="array",p=b.type==="mopen",m=b.type==="mclose"||b.type==="leftright",v=b.type==="space"),t.after.includes("nothing")&&i||t.after.includes("letter")&&r||t.after.includes("digit")&&a||t.after.includes("function")&&n||t.after.includes("frac")&&o||t.after.includes("surd")&&l||t.after.includes("binop")&&s||t.after.includes("relop")&&u||t.after.includes("operator")&&c||t.after.includes("punct")&&d||t.after.includes("array")&&h||t.after.includes("openfence")&&p||t.after.includes("closefence")&&m||t.after.includes("text")&&g||t.after.includes("space")&&v?t.value:""}function xs(e,t,i){return i?Jm(e,i[t]):""}var G0={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\doubleprime}","'''":"^{\\prime\\prime\\prime}","''''":"^{\\prime\\prime\\prime\\prime}",alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:"\\pi",Pi:"\\Pi",theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:"\\nabla",grad:"\\nabla",del:"\\partial",deg:{after:"digit+space",value:"\\degree"},infty:"\\infty","∞":"\\infty",oo:{after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"∑":"\\sum",sum:"\\sum_{#?}^{#?}",int:"\\int_{#?}^{#?}",prod:"\\prod_{#?}^{#?}",sqrt:"\\sqrt{#?}","∆":"\\differentialD","∂":"\\differentialD",sin:"\\sin",cos:"\\cos",tan:"\\tan",arccos:"\\arccos",arcsin:"\\arcsin",arctan:"\\arctan",arctg:"\\operatorname{arctg}",arcsec:"\\operatorname{arcsec}",arccsc:"\\operatorname{arccsc}",arsinh:"\\operatorname{arsinh}",arccosh:"\\operatorname{arccosh}",arcosh:"\\operatorname{arcosh}",artanh:"\\operatorname{artanh}",arctanh:"\\operatorname{arctanh}",arcsech:"\\operatorname{arcsech}",arccsch:"\\operatorname{arccsch}",ch:"\\operatorname{ch}",cosec:"\\operatorname{cosec}",cosh:"\\cosh",cot:"\\cot",cotg:"\\operatorname{cotg}",coth:"\\coth",csc:"\\csc",ctg:"\\operatorname{ctg}",cth:"\\operatorname{cth}",sec:"\\sec",sech:"\\operatorname{sech}",sinh:"\\sinh",sh:"\\operatorname{sh}",tanh:"\\tanh",tg:"\\operatorname{tg}",th:"\\operatorname{th}",arg:"\\arg",lg:"\\lg",lb:"\\operatorname{lb}",log:"\\log_{#?}",ln:"\\ln",exp:"\\exp",lim:"\\lim_{#?\\to#?}",dx:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:"\\forall",EE:"\\exists","!EE":"\\nexists","&&":"\\land",xin:{after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},sint:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\sin t"},in:{after:"nothing+letter+closefence",value:"\\in"},"!in":"\\notin",NN:"\\mathbb{N}",ZZ:"\\mathbb{Z}",QQ:"\\mathbb{Q}",RR:"\\mathbb{R}",CC:"\\mathbb{C}",xx:"\\times","+-":"\\pm","≠":"\\ne","!=":"\\ne","≥":"\\ge",">=":"\\ge","≤":"\\le","<=":"\\le","<<":"\\ll",">>":"\\gg","~~":"\\approx","≈":"\\approx","?=":"\\questeq","÷":"\\div","¬":"\\neg",":=":"\\coloneq","::":"\\Colon","(:":"\\langle",":)":"\\rangle",beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},nu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},µ:"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega",Ω:"\\omega",forall:"\\forall",exists:"\\exists","!exists":"\\nexists",":.":"\\therefore",liminf:"\\liminf_{#?}",limsup:"\\limsup_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:"\\bmod{#?}","(mod":"\\pmod{#?}",max:"\\max",min:"\\min",erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:"\\operatorname{bessel}",mean:"\\operatorname{mean}",median:"\\operatorname{median}",fft:"\\operatorname{fft}",lcm:"\\operatorname{lcm}",gcd:"\\gcd",randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}
191",Re:"\\operatorname{Re}",Im:"\\operatorname{Im}",mm:{after:"nothing+digit+operator",value:"\\operatorname{mm}"},cm:{after:"nothing+digit+operator",value:"\\operatorname{cm}"},km:{after:"nothing+digit+operator",value:"\\operatorname{km}"},kg:{after:"nothing+digit+operator",value:"\\operatorname{kg}"},ft:{after:"nothing+digit+operator",value:"\\operatorname{ft}"},inch:{after:"nothing+digit+operator",value:"\\operatorname{inch}"},mi:{after:"nothing+digit+operator",value:"\\operatorname{mi}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","-->...":"\\longrightarrow\\cdots","->":"\\to","|->":"\\mapsto","-->":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\iff","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","*":"\\cdot","**":"\\star","***":"\\ast","//":"\\slash","\\\\":"\\backslash",setminus:"\\backslash","|><":"\\ltimes","><|":"\\rtimes","|><|":"\\bowtie","-:":"\\div",divide:"\\div","@":"\\circ","^^":"\\wedge","^^^":"\\bigwedge",vv:"\\vee",vvv:"\\bigvee",nn:"\\cap",nnn:"\\bigcap",uu:"\\cup",uuu:"\\bigcup","-=":"\\equiv","~=":"\\cong",lt:"<","lt=":"\\leq",gt:">","gt=":"\\geq","-<":"\\prec","-lt":"\\prec","-<=":"\\preceq",">-=":"\\succeq",prop:"\\propto",diamond:"\\diamond",square:"\\square",iff:"\\iff",sub:"\\subset",sup:"\\supset",sube:"\\subseteq",supe:"\\supseteq",uarr:"\\uparrow",darr:"\\downarrow",rarr:"\\rightarrow",rArr:"\\Rightarrow",larr:"\\leftarrow",lArr:"\\Leftarrow",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",aleph:"\\aleph",and:"\\land",or:"\\lor",not:"\\neg","_|_":"\\bot",TT:"\\top","|--":"\\vdash","|==":"\\models","|__":"\\lfloor","__|":"\\rfloor","|~":"\\lceil","~|":"\\rceil",">->":"\\rightarrowtail","->>":"\\twoheadrightarrow",">->>":"\\twoheadrightarrowtail",times:"\\times",of:"\\circ",infinity:"\\infty",defint:"\\int_{#?}^{#?}",approaches:"\\to",ceil:"\\left\\lceil#?\\right\\rceil",floor:"\\left\\lfloor#?\\right\\rfloor",union:"\\cup",asterisk:"\\ast",frac:"\\frac{#?}{#?}",cbrt:"\\sqrt[3]{#?}",nthroot:"\\sqrt[#?]{#?}"};function ua(e,t){var i;let r=(i=t==null?void 0:t.format)!=null?i:"auto";return r==="auto"&&([r,e]=Xm(e)),r==="ascii-math"?(e=e.replace(/\u2061/gu,""),e=e.replace(/\u3016/gu,"{"),e=e.replace(/\u3017/gu,"}"),e=e.replace(/([^\\])sinx/g,"$1\\sin x"),e=e.replace(/([^\\])cosx/g,"$1\\cos x "),e=e.replace(/\u2013/g,"-"),["ascii-math",Fe(e,{inlineShortcuts:t==null?void 0:t.inlineShortcuts})]):["latex",e]}function Fe(e,t){var i;if(e=e.trim(),!e)return"";let r=(i=t.inlineShortcuts)!=null?i:G0;if(e.startsWith("^")||e.startsWith("_")){let{match:l,rest:s}=mi(e.slice(1),{inlineShortcuts:r,noWrap:!0});return`${e[0]}{${l}}${Fe(s,t)}`}let a=e.match(/^(sqrt|\u221A)(.*)/);if(a){let{match:l,rest:s}=mi(a[2],{inlineShortcuts:r,noWrap:!0});return`\\sqrt{${l??"\\placeholder{}"}}${Fe(s,t)}`}if(a=e.match(/^(\\cbrt|\u221B)(.*)/),a){let{match:l,rest:s}=mi(a[2],{inlineShortcuts:r,noWrap:!0});return`\\sqrt[3]{${l??"\\placeholder{}"}}${Fe(s,t)}`}if(a=e.match(/^abs(.*)/),a){let{match:l,rest:s}=mi(a[1],{inlineShortcuts:r,noWrap:!0});return`\\left|${l??"\\placeholder{}"}\\right|${Fe(s,t)}`}if(a=e.match(/^["”“](.*?)["”“](.*)/),a)return`\\text{${a[1]}}${Fe(a[2],t)}`;if(a=e.match(/^([^a-zA-Z0-9\(\{\[\_\^\\\s"]+)(.*)/),a)return`${Pd(a[1],r)}${Fe(a[2],t)}`;if(/^([fgh])[^a-zA-Z]/.test(e)){let{rest:l,match:s}=mi(e.slice(1),{inlineShortcuts:r,noWrap:!0}),u="";return e[1]==="("?u=`${e[0]}\\left(${s}\\right)`:u=e[0]+s,u+Fe(l,t)}if(a=e.match(/^([a-zA-Z]+)(.*)/),a)return Pd(a[1],r)+Fe(a[2],t);let{match:n,rest:o}=mi(e,{inlineShortcuts:r,noWrap:!0});if(n&&o[0]==="/"){let l=mi(o.slice(1),{inlineShortcuts:r,noWrap:!0});if(l.match)return`\\frac{${n}}{${l.match}}${Fe(l.rest,t)}`}else return e.startsWith("(")?"\\left("+n+"\\right)"+Fe(o,t):n+Fe(o,t);return a=e.match(/^(\s+)(.*)$/),a?" "+Fe(a[2],t):e}var $d={"[":"\\lbrack","]":"\\rbrack","{":"\\lbrace","}":"\\rbrace"};function mi(e,t){var i,r;let a="";e=e.trim();let n=e,o=e.charAt(0),l={"(":")","{":"}","[":"]"}[o];if(l){let s=1,u=1;for(;u<e.length&&s>0;)e[u]===o&&s++,e[u]===l&&s--,u++;if(s===0){let c=Fe(e.substring(1,u-1),t);t.noWrap&&o==="("?a=c:a=`\\left${(i=$d[o])!=null?i:o}${c}\\right${(r=$d[l])!=null?r:l}`,n=e.slice(Math.max(0,u))}else a=e.substring(1,u),n=""}else{let s=e.match(/^([a-zA-Z]+)/);if(s){let u=xs(null,e,t.inlineShortcuts);if(u)return u=u.replace("_{#?}",""),u=u.replace("^{#?}",""),{match:u,rest:e.slice(u.length)}}if(s=e.match(/^([a-zA-Z])/),s)return{match:s[1],rest:e.slice(1)};if(s=e.match(/^(-)?\d+(\.\d*)?/),s)return{match:s[0],rest:e.slice(s[0].length)};/^\\(left|right)/.test(e)||(s=e.match(/^(\\[a-zA-Z]+)/),s&&(n=e.slice(s[1].length),a=s[1]))}return{match:a,rest:n}}function Pd(e,t){let i=xs(null,e,t);return i?(i=i.replace("_{#?}",""),i=i.replace("^{#?}",""),i+=" "):i=e,i}var Z0=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}
191"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function _s(e){let t=e.trim();for(let i of Z0)if(t.startsWith(i[0])&&t.endsWith(i[1]))return[!0,t.substring(i[0].length,t.length-i[1].length)];return[!1,e]}function Xm(e){if(e=e.trim(),e.length<=1)return["latex",e];let t;return[t,e]=_s(e),t?["latex",e]:e.startsWith("`")&&e.endsWith("`")?(e=e.substring(1,e.length-1),["ascii-math",e]):e.includes("\\")?["latex",e]:/\$.+\$/.test(e)?["latex",`\\text{${e}}`]:[void 0,e]}var Gm="$$",Zm="$$",Ym=(e,t,i)=>(Z0.some(r=>t.startsWith(r[0])&&t.endsWith(r[1]))||(t=`${Gm} ${t} ${Zm}`),t),Y0=class Kn{constructor(t){Kn._modes[t]=this}static onPaste(t,i,r){var a;if(!i.contentEditable&&i.userSelect==="none")return i.model.announce("plonk"),!1;if(typeof r=="string"){let o=new DataTransfer;o.setData("text/plain",r),r=o}let n=new ClipboardEvent("paste",{clipboardData:r,cancelable:!0});return(a=i.host)!=null&&a.dispatchEvent(n)?Kn._modes[t].onPaste(i,r):!1}static copyToClipboard(t,i){if(!t.contentEditable&&t.userSelect==="none"){t.model.announce("plonk");return}let r=t.model,a=r.selectionIsCollapsed?[0,r.lastOffset]:we(r.selection),n=r.getValue(a,i);navigator.clipboard.writeText(n).then(()=>{},()=>t.model.announce("plonk"))}static onCopy(t,i){var r;if(!i.clipboardData)return;if(!t.contentEditable&&t.userSelect==="none"){t.model.announce("plonk");return}let a=t.model,n=a.selectionIsCollapsed?[0,a.lastOffset]:we(a.selection),o=a.getAtoms(n);if(o.every(l=>l.mode==="text"||!l.mode))i.clipboardData.setData("text/plain",o.filter(l=>l instanceof Mr).map(l=>l.value).join(""));else if(o.every(l=>l.mode==="latex"))i.clipboardData.setData("text/plain",a.getAtoms(n,{includeChildren:!0}).map(l=>{var s;return(s=l.value)!=null?s:""}).join(""));else{let l;o.length===1&&o[0].verbatimLatex!==void 0?l=o[0].verbatimLatex:l=a.getValue(n,"latex-expanded"),i.clipboardData.setData("application/x-latex",l);try{i.clipboardData.setData("text/plain",t.options.onExport(t,l,n))}catch{}if(o.length===1){let s=o[0];(s.type==="root"||s.type==="group")&&(o=s.body.filter(u=>u.type!=="first"))}try{i.clipboardData.setData("application/json+mathlive",JSON.stringify(o.map(s=>s.toJson())))}catch{}if((r=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&r.ComputeEngine){let s=globalThis.MathfieldElement.computeEngine;if(s)try{let u=s.jsonSerializationOptions;s.jsonSerializationOptions={metadata:["latex"]};let c=s.parse(a.getValue(n,"latex-unstyled"));s.jsonSerializationOptions=u;let d=JSON.stringify(c.json);d&&i.clipboardData.setData("application/json",d)}catch{}}}i.preventDefault()}static insert(t,i,r={}){var a;let n=r.mode==="auto"?t.mode:(a=r.mode)!=null?a:t.mode;return Kn._modes[n].insert(t,i,r)}onPaste(t,i){return!1}insert(t,i,r){return!1}};Y0._modes={};var Z=Y0,Qm
vendor: 9,120 bytes, line 191
191=[{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendSelectionBackward"},{key:"shift+[ArrowRight]",command:"extendSelectionForward"},{key:"shift+[ArrowUp]",command:"extendSelectionUpward"},{key:"shift+[ArrowDown]",command:"extendSelectionDownward"},{key:"[Backspace]",command:"deleteBackward"},{key:"[Delete]",command:"deleteForward"},{key:"shift+[Backspace]",command:"deleteForward"},{key:"alt+[Backspace]",command:"deletePreviousWord"},{key:"alt+[Delete]",command:"deleteNextWord"},{key:"ctrl+[Backspace]",command:"deleteToGroupStart"},{key:"ctrl+[Delete]",command:"deleteToGroupEnd"},{key:"ctrl+shift+[Backspace]",command:"deleteToGroupEnd"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"shift+alt+[ArrowLeft]",command:"extendToPreviousWord"},{key:"shift+alt+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"shift+ctrl+[ArrowLeft]",command:"extendToGroupStart"},{key:"shift+ctrl+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Home]",command:"moveToMathfieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathfieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"shift+cmd+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathfieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathfieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"shift+cmd+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",command:"moveToNextGroup"},{key:"shift+[Tab]",command:"moveToPreviousGroup"},{key:"[Escape]",ifMode:"math",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"text",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"latex",command:["complete","complete",{selectItem:"true"}]},{key:"\\",ifMode:"math",command:["switchMode","latex","","\\"]},{key:"[IntlBackslash]",ifMode:"math",command:["switchMode","latex","","\\"]},{key:"[Tab]",ifMode:"latex",command:["complete","accept-suggestion"]},{key:"[Return]",ifMode:"latex",command:["complete","accept-all"]},{key:"[Enter]",ifMode:"latex",command:["complete","accept-all"]},{key:"shift+[Escape]",ifMode:"latex",command:["complete","reject"]},{key:"[ArrowDown]",ifMode:"latex",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"latex",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deleteBackward"},{key:"[Undo]",command:"undo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"cmd+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"ctrl+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"cmd+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"ctrl+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"cmd+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+y",command:"redo"},{key:"shift+ctrl+z",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+z",command:"redo"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathfieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathfieldEnd"},{key:"shift+ctrl+b",ifPlatform:"macos",command:"extendSelectionBackward"},{key:"shift+ctrl+f",ifPlatform:"macos",command:"extendSelectionForward"},{key:"shift+ctrl+p",ifPlatform:"macos",command:"extendSelectionUpward"},{key:"shift+ctrl+n",ifPlatform:"macos",command:"extendSelectionDownward"},{key:"shift+ctrl+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"shift+ctrl+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"alt+ctrl+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"alt+ctrl+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"shift+alt+ctrl+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"shift+alt+ctrl+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deleteBackward"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteForward"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Return]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Return]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"alt+p",ifMode:"math",command:["insert","\\pi"]},{key:"alt+v",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"alt+shift+v",ifMode:"math",command:["insert","\\sqrt[#0]{#1}"]},{key:"alt+o",ifMode:"math",command:["insert","\\emptyset"]},{key:"alt+d",ifMode:"math",command:["insert","\\differentialD"]},{key:"shift+alt+o",ifMode:"math",command:["insert","\\varnothing"]},{key:"shift+alt+d",ifMode:"math",command:["insert","\\partial"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","\\backslash"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+alt+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleContextMenu"},{key:"alt+shift+[Space]",command:"toggleVirtualKeyboard"},{key:"alt+ctrl+[ArrowUp]",command:["speak","all",{withHighlighting:!1}]},{key:"alt+ctrl+[ArrowDown]",command:["speak","selection",{withHighlighting:!1}]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["switchMode","text","",""]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"text",command:["switchMode","math","",""]},{key:"shift+alt+[KeyT]",ifMode:"math",command:["switchMode","text"]},{key:"shift+alt+[KeyT]",ifMode:"text",command:["switchMode","math"]},{key:"/",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+shift+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrack #0 \\right\\rbrack"]},{key:"ctrl+[Minus]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"moveToSubscript"},{key:"shift+alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrace #0 \\right\\rbrace"]},{key:"ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"shift+ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"shift+cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"alt+[Tab]",ifMode:"math",command:"addColumnAfter"},{key:"shift+alt+[Tab]",ifMode:"math",command:"addColumnBefore"},{key:"alt+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Enter]",ifMode:"math",command:"addRowBefore"},{key:"alt+[Return]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Return]",ifMode:"math",command:"addRowBefore"},{key:"shift+[Backspace]",ifMode:"math",command:"removeColumn"},{key:"shift+[Delete]",ifMode:"math",command:"removeRow"},{key:"shift+alt+[Backspace]",ifMode:"math",command:"removeRow"},{key:"alt+[Digit5]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","$\\infty"]},{key:"alt+[Digit9]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert",")"]},{key:"alt+|",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","|"]},{key:"shift+[Backquote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\~"]},{key:"[Backquote]",ifLayout:["windows.french","linux.french"],ifMode:"math",command:["insert","^2"]},{key:"[Backquote]",ifLayout:["windows.german","linux.german"],ifMode:"math",command:["insert","^"]},{key:"[IntlBackslash]",ifLayout:["apple.german"],ifMode:"math",command:["insert","^"]}],
vendor: 4,679 bytes, line 191
191ef={"\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\infty":"alt+[Digit5]","\\differentialD":"alt+d","\\partial":"shift+alt+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"shift+alt+o","\\~":"~"};function wt(e){var t;return((t=e.element)==null?void 0:t.mathfield)===e}function tf(e){var t,i;return(i=(t=e.querySelector(".ML__caret"))!=null?t:e.querySelector(".ML__text-caret"))!=null?i:e.querySelector(".ML__latex-caret")}function $n(e){let t=tf(e);if(!t)return null;let i=t.getBoundingClientRect();return{x:i.right,y:i.bottom,height:i.height}}function rf(e){var t;if(!e.parent)return"root";let i=(t=e.parent.id)!=null?t:"";return i+=typeof e.parentBranch=="string"?"-"+e.parentBranch:`-${e.parentBranch[0]}/${e.parentBranch[0]}`,i}function Q0(e,t,i){if(!t)return null;let r=e.field.getBoundingClientRect(),a=t.right-t.left,n=t.bottom-t.top,o=Math.ceil(t.left-r.left+e.field.scrollLeft*i),l=Math.ceil(t.top-r.top);return{left:o,right:o+a,top:l,bottom:l+n}}function Nl(e){let t=e,i=t.getBoundingClientRect();for(;i.bottom===i.top&&t.parentElement instanceof Element&&(t=t.parentElement,i=t.getBoundingClientRect(),i.bottom===i.top););let r=getComputedStyle(t),a=parseInt(r.marginRight),n=i.right-i.left,o=i.bottom-i.top;if(n===0||!Number.isFinite(n)){let s=parseFloat(r.width);Number.isFinite(s)&&s>0?n=s:t instanceof HTMLElement&&t.offsetWidth>0&&(n=t.offsetWidth)}if(o===0||!Number.isFinite(o)){let s=parseFloat(r.height);Number.isFinite(s)&&s>0?o=s:t instanceof HTMLElement&&t.offsetHeight>0&&(o=t.offsetHeight)}let l={top:i.top-1,bottom:i.top-1+o,left:i.left,right:i.left+n-1+a};if(e.children.length===0||e.tagName.toUpperCase()==="SVG")return l;for(let s of e.children)if(s.nodeType===1&&"atomId"in s.dataset&&!s.classList.contains("ML__pstrut")){let u=Nl(s);l.left=Math.min(l.left,u.left),l.right=Math.max(l.right,u.right),l.top=Math.min(l.top,u.top),l.bottom=Math.max(l.bottom,u.bottom)}return l}function Ki(e,t){var i,r;if(!t.id)return null;let a=(r=(i=e.atomBoundsCache)==null?void 0:i.get(t.id))!=null?r:null;if(a!==null)return a;let n=e.field.querySelectorAll(`[data-atom-id="${t.id}"]`),o=Array.from(n);if(t.type==="prompt"){for(let l of o)if(l.classList.contains("ML__prompt-atom")){let s=l.querySelector(".ML__prompt");if(s){let u=Nl(s);a?(a.left=Math.min(a.left,u.left),a.right=Math.max(a.right,u.right),a.top=Math.min(a.top,u.top),a.bottom=Math.max(a.bottom,u.bottom)):a=u}}}for(let l of o){let s=Nl(l);a?(a.left=Math.min(a.left,s.left),a.right=Math.max(a.right,s.right),a.top=Math.min(a.top,s.top),a.bottom=Math.max(a.bottom,s.bottom)):a=s}return e.atomBoundsCache&&(a?e.atomBoundsCache.set(t.id,a):e.atomBoundsCache.delete(t.id)),a??null}function af(e,t){let[i,r]=t,a=null;for(let n=i;n<=r;n++){let o=Ki(e,e.model.at(n));o&&(a?(a.top=Math.min(a.top,o.top),a.bottom=Math.max(a.bottom,o.bottom),a.left=Math.min(a.left,o.left),a.right=Math.max(a.right,o.right)):a=o)}return a??{top:0,bottom:0,left:0,right:0}}function nf(e,t,i){let r=new Map,a=e.field,n=a.offsetWidth,o=Math.floor(a.getBoundingClientRect().width)/n;o=isNaN(o)?1:o;for(let l of e.model.getAtoms(t,{includeChildren:!0})){if(i!=null&&i.excludeAtomsWithBackground&&l.style.backgroundColor)continue;let s=Q0(e,Ki(e,l),o);if(s){let u=rf(l);if(r.has(u)){let c=r.get(u);r.set(u,{left:Math.min(c.left,s.left),right:Math.max(c.right,s.right),top:Math.min(c.top,s.top),bottom:Math.max(c.bottom,s.bottom)})}else r.set(u,s)}}return[...r.values()]}function eh(e,t){return e.model.selection.ranges.reduce((i,r)=>i.concat(...nf(e,r,t)),[])}function ws(e,t){return e==="*"||t==="none"?!0:t==="same-origin"?!window.origin||e===window.origin:typeof t=="function"?t(e):!1}function th(e){let t=0,i=0,r=e.offsetWidth,a=e.offsetHeight;for(;e instanceof HTMLElement;)t+=e.offsetTop,i+=e.offsetLeft,e=e.offsetParent;return new DOMRect(i,t,r,a)}function ih(e,t){if(!e)return;let i=e.model.at(t);if(!i)return;let r={},a=Ki(e,i);a&&(r.bounds=new DOMRect(a.left,a.top,a.right-a.left,a.bottom-a.top)),r.depth=i.treeDepth-2,r.style=i.style;let n=i;for(;n;){if(n.command==="\\htmlData"&&n.args&&typeof n.args[0]=="string"){let o=n.args[0].split(",");for(let l of o){let s=l.match(/([^=]+)=(.+$)/);if(s){let u=s[1].trim().replace(/ /g,"-");u&&(r.data||(r.data={}),r.data[u]=s[2])}else{let u=l.trim().replace(/ /g,"-");u&&(r.data||(r.data={}),r.data[u]=void 0)}}}(n.command==="\\htmlId"||n.command==="\\cssId")&&!r.id&&n.args&&typeof n.args[0]=="string"&&(r.id=n.args[0]),n=n.parent}return(i.mode==="math"||i.mode==="text")&&(r.latex=w.serialize([i],{defaultMode:"math"})),r}function of(e,t){let i=e.model.at(t);for(;i;){if(i.command==="\\href"){let r=i.args[0];if(typeof r=="string")return r}i=i.parent}return""}var lf
vendor: 13,830 bytes, lines 191-667
191=`@keyframes ML__caret-blink {
192  0%,
193  100% {
194    opacity: 1;
195  }
196  50% {
197    opacity: 0;
198  }
199}
200:host {
201  display: block;
202}
203.ML__container {
204  display: inline-flex;
205  flex-flow: row;
206  justify-content: space-between;
207  align-items: flex-end;
208  min-height: 39px;
209  /* Need some room for the virtual keyboard toggle */
210  width: 100%;
211  padding: 4px;
212  box-sizing: border-box;
213  /* This attribute is necessary to work around a Firefox issue where
214  where clicking multiple times on the border leads to a focused mathfield that cannot be edited until focus is lost and regained (also fixes the multiple cursor issue on firefox that can occur with the same sequence of events).
215  */
216  pointer-events: auto;
217  /* Prevent the browser from trying to interpret touch gestures in the field */
218  /* "Disabling double-tap to zoom removes the need for browsers to
219        delay the generation of click events when the user taps the screen." */
220  touch-action: none;
221  --_caret-color: var(--caret-color, hsl(var(--_hue), 40%, 49%));
222  --_selection-color: var(--selection-color, #000);
223  --_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 70%, 85%));
224  --_text-highlight-background-color: var(--highlight-text, hsla(var(--_hue), 40%, 50%, 0.1));
225  --_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 40%, 95%));
226  --_smart-fence-color: var(--smart-fence-color, currentColor);
227  --_smart-fence-opacity: var(--smart-fence-opacity, 0.5);
228  --_contains-highlight-color: var(--contains-highlight-color, var(--_caret-color));
229  --_latex-color: var(--latex-color, hsl(var(--_hue), 80%, 40%));
230  --_correct-color: var(--correct-color, #10a000);
231  --_incorrect-color: var(--incorrect-color, #a01b00);
232  --_composition-background-color: var(--composition-background-color, #fff1c2);
233  --_composition-text-color: var(--composition-text-color, black);
234  --_composition-underline-color: var(--composition-underline-color, transparent);
235  --_tooltip-border: var(--tooltip-border, 1px solid transparent);
236  --_tooltip-border-radius: var(--tooltip-border-radius, 8px);
237  --_tooltip-background-color: var(--tooltip-background-color, #616161);
238  --_tooltip-color: var(--tooltip-color, #fff);
239  --_tooltip-box-shadow: var(--tooltip-box-shadow, 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2));
240}
241@media (prefers-color-scheme: dark) {
242  .ML__container {
243    --_contains-highlight-color: var(--contains-highlight-color, hsl(var(--_hue), 85%, 75%));
244    --_caret-color: var(--caret-color, hsl(var(--_hue), 65%, 55%));
245    --_selection-color: var(--selection-color, #fff);
246    --_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 65%, 55%));
247    --_text-highlight-background-color: var(--text-highlight-background-color, hsla(var(--_hue), 40%, 50%, 0.6));
248    --_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 5%, 34%));
249    --_latex-color: var(--primary, hsl(var(--_hue), 40%, 50%));
250    --_composition-background-color: #69571c;
251    --_composition-text-color: white;
252    --_placeholder-color: hsl(var(--_hue), 60%, 69%);
253    --_smart-fence-color: var(--smart-fence-color, #fff);
254    --_smart-fence-opacity: var(--smart-fence-opacity, 0.7);
255  }
256}
257@media (forced-colors: active) {
258  .ML__container {
259    --_caret-color: white;
260    --_selection-color: white;
261    --_smart-fence-color: white;
262    --_latex-color: white;
263    --_correct-color: white;
264    --_incorrect-color: white;
265    --_composition-text-color: white;
266  }
267}
268@media (hover: none) and (pointer: coarse) {
269  :host(:not(:focus)) .ML__container {
270    pointer-events: none;
271  }
272}
273/* This is the actual field content (formula) */
274.ML__content {
275  display: flex;
276  align-items: center;
277  align-self: center;
278  position: relative;
279  overflow: hidden;
280  padding: 2px 3px 2px 1px;
281  width: 100%;
282  /* Encourage the browser to use the GPU to render the field.
283     Weirdly, this is required for prompts to be rendered correctly. 
284   */
285  isolation: isolate;
286  text-shadow: var(--text-shadow);
287}
288.ML__content .ML__latex {
289  text-shadow: var(--text-shadow);
290}
291.ML__content .ML__sqrt-line {
292  box-shadow: var(--text-shadow);
293}
294.ML__content .ML__frac-line {
295  box-shadow: var(--text-shadow);
296}
297/* Container for the virtual keyboard toggle and menu toggle buttons */
298.ML__toggles {
299  display: flex;
300  flex-direction: row;
301  align-items: flex-start;
302  gap: 0;
303  align-self: flex-start;
304}
305/* Vertical layout modifier */
306.ML__toggles--vertical {
307  flex-direction: column;
308  align-items: center;
309  gap: 4px;
310}
311.ML__toggles--vertical .ML__virtual-keyboard-toggle,
312.ML__toggles--vertical .ML__menu-toggle {
313  margin-right: 0;
314}
315.ML__virtual-keyboard-toggle,
316.ML__menu-toggle {
317  box-sizing: border-box;
318  display: flex;
319  align-self: center;
320  align-items: center;
321  flex-shrink: 0;
322  flex-direction: column;
323  justify-content: center;
324  width: 34px;
325  height: 34px;
326  padding: 0;
327  margin-right: 4px;
328  cursor: pointer;
329  /* Avoid some weird blinking with :hover */
330  border-radius: 8px;
331  border: 1px solid transparent;
332  transition: background 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
333  color: hsl(var(--_hue), 40%, 50%);
334  fill: currentColor;
335  background: transparent;
336}
337.ML__virtual-keyboard-toggle:hover,
338.ML__menu-toggle:hover {
339  background: hsla(0, 0%, 70%, 0.3);
340  color: #333;
341  fill: currentColor;
342}
343.ML__virtual-keyboard-toggle > span,
344.ML__menu-toggle > span {
345  display: flex;
346  align-self: center;
347  align-items: center;
348}
349@media (pointer: coarse) {
350  .ML__virtual-keyboard-toggle,
351  .ML__menu-toggle {
352    min-width: 60px;
353    min-height: 60px;
354  }
355}
356/* The invisible element used to capture keyboard events. We're just trying
357 really hard to make sure it doesn't show. */
358.ML__keyboard-sink {
359  display: inline-block;
360  resize: none;
361  outline: none;
362  border: none;
363  pointer-events: none;
364  /* Need these for Microsoft Edge */
365  position: fixed;
366  clip: rect(0 0 0 0);
367  /* Need this to prevent iOS Safari from auto-zooming */
368  font-size: 1em;
369  font-family: KaTeX_Main;
370  line-height: 0.5;
371  /* On Chromium, if this is 0, no keyboard events are received */
372  /* Preferred over clip */
373  clip-path: inset(50%);
374}
375[part='placeholder'] {
376  color: var(--neutral-400);
377}
378.ML__composition {
379  background: var(--_composition-background-color);
380  color: var(--_composition-text-color);
381  text-decoration: underline var(--_composition-underline-color);
382}
383.ML__caret {
384  display: inline-block;
385}
386.ML__caret::after {
387  content: '';
388  visibility: hidden;
389  width: 0;
390  display: inline-block;
391  height: 0.76em;
392  --_caret-width: clamp(2px, 0.08em, 10px);
393  border: none;
394  border-radius: calc(var(--_caret-width) / 2);
395  border-right: var(--_caret-width) solid var(--_caret-color);
396  margin-right: calc(-1 * var(--_caret-width));
397  position: relative;
398  left: -0.045em;
399  bottom: -0.05em;
400  animation: ML__caret-blink 1.05s step-end forwards infinite;
401}
402.ML__text-caret::after {
403  content: '';
404  visibility: hidden;
405  width: 0;
406  display: inline-block;
407  height: 0.76em;
408  --_caret-width: clamp(2px, 0.08em, 10px);
409  border: none;
410  border-radius: calc(var(--_caret-width) / 2);
411  border-right: var(--_caret-width) solid var(--_caret-color);
412  margin-right: calc(-1 * var(--_caret-width));
413  position: relative;
414  left: -0.045em;
415  bottom: -0.05em;
416  animation: ML__caret-blink 1.05s step-end forwards infinite;
417}
418.ML__latex-caret::after {
419  content: '';
420  visibility: hidden;
421  --_caret-width: clamp(2px, 0.08em, 10px);
422  border: none;
423  border-radius: calc(var(--_caret-width) / 2);
424  border-right: var(--_caret-width) solid var(--_latex-color);
425  margin-right: calc(-1 * var(--_caret-width));
426  position: relative;
427  left: -0.019em;
428  animation: ML__caret-blink 1.05s step-end forwards infinite;
429}
430.ML__focused .ML__latex-caret::after,
431.ML__focused .ML__text-caret::after,
432.ML__focused .ML__caret::after {
433  visibility: visible;
434}
435.ML__focused .ML__text {
436  background: var(--_text-highlight-background-color);
437}
438/* When using smartFence, the anticipated closing fence is displayed
439with this style */
440.ML__smart-fence__close {
441  opacity: var(--_smart-fence-opacity);
442  color: var(--_smart-fence-color);
443}
444.ML__focused .ML__selected,
445.ML__focused .ML__selected .ML__contains-caret,
446.ML__focused .ML__selected .ML__smart-fence__close,
447.ML__focused .ML__selected .ML__placeholder {
448  color: var(--_selection-color);
449  opacity: 1;
450}
451.ML__empty-line-anchor::after {
452  content: '';
453  position: absolute;
454  left: 0;
455  top: 50%;
456  transform: translateY(-50%);
457  width: 8px;
458  height: 20px;
459  border-radius: 2px;
460  background: transparent;
461  opacity: 0;
462  pointer-events: none;
463}
464.ML__focused .ML__empty-line-anchor.ML__selected::after {
465  background: var(--_selection-background-color);
466  opacity: 1;
467}
468.ML__selection {
469  box-sizing: border-box;
470  background: transparent;
471}
472:host(:focus) .ML__selection {
473  background: var(--_selection-background-color) !important;
474}
475.ML__contains-caret.ML__close,
476.ML__contains-caret.ML__open,
477.ML__contains-caret > .ML__close,
478.ML__contains-caret > .ML__open,
479.ML__contains-caret .ML__sqrt-sign,
480.ML__contains-caret .ML__sqrt-line {
481  color: var(--_contains-highlight-color);
482}
483.ML__contains-highlight {
484  box-sizing: border-box;
485  background: transparent;
486}
487.ML__focused .ML__contains-highlight {
488  background: var(--_contains-highlight-background-color);
489}
490.ML__raw-latex {
491  font-family: 'Berkeley Mono', 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
492  font-weight: 400;
493  font-size: 0.8em;
494  letter-spacing: -0.05em;
495  color: var(--_latex-color);
496}
497.ML__suggestion {
498  color: var(--neutral-500);
499}
500.ML__virtual-keyboard-toggle.is-visible.is-pressed:hover {
501  background: hsl(var(--_hue), 25%, 35%);
502  color: #fafafa;
503  fill: currentColor;
504}
505.ML__virtual-keyboard-toggle.is-pressed,
506.ML__virtual-keyboard-toggle.is-active:hover,
507.ML__virtual-keyboard-toggle.is-active {
508  background: hsl(var(--_hue), 25%, 35%);
509  color: #fafafa;
510  fill: currentColor;
511}
512/* Add an attribute 'data-tooltip' to automatically show a
513   tooltip over a element on hover.
514*/
515[data-tooltip] {
516  position: relative;
517}
518[data-tooltip]::after {
519  content: attr(data-tooltip);
520  position: absolute;
521  display: block;
522  z-index: 2;
523  pointer-events: none;
524  right: auto;
525  top: calc(-100% - 4px);
526  width: max-content;
527  max-width: 200px;
528  padding: 8px 8px;
529  border-radius: 4px;
530  background: #616161;
531  color: #fff;
532  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
533  text-align: center;
534  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
535  font-style: normal;
536  font-weight: 400;
537  font-size: 13px;
538  /* Phone */
539  opacity: 0;
540  transform: scale(0.5);
541}
542@media only screen and (max-width: 767px) {
543  [data-tooltip]::after {
544    padding: 8px 16px;
545    font-size: 16px;
546  }
547}
548menu [data-tooltip]::after {
549  left: 100%;
550  top: 0%;
551}
552menu .ML__base {
553  cursor: default;
554}
555/** Don't display if we're tracking, i.e. have the pointer down */
556.tracking [data-tooltip]:hover::after {
557  /* Use visibility, not display. Display will remove the after from the DOM, and the override below will not work */
558  visibility: hidden;
559}
560/** But do display if tracking and inside a menu */
561.tracking menu li[data-tooltip]:hover::after,
562[data-tooltip]:hover::after {
563  visibility: visible;
564  opacity: 1;
565  transform: scale(1);
566  transition-property: opacity, scale;
567  transition-duration: 0.15s;
568  transition-delay: 1s;
569  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
570}
571.ML__prompt {
572  border-radius: 2px;
573}
574.ML__editablePromptBox {
575  outline: 1px solid #acacac;
576  border-radius: 2px;
577  z-index: -1;
578}
579.ML__focused .ML__focusedPromptBox {
580  outline: highlight auto 1px;
581}
582.ML__lockedPromptBox {
583  background-color: rgba(142, 142, 141, 0.4);
584  z-index: -1;
585}
586.ML__correctPromptBox {
587  outline: 1px solid var(--_correct-color);
588  box-shadow: 0 0 5px var(--_correct-color);
589}
590.ML__incorrectPromptBox {
591  outline: 1px solid var(--_incorrect-color);
592  box-shadow: 0 0 5px var(--_incorrect-color);
593}
594.variant-submenu {
595  display: flex;
596  flex-direction: column;
597  padding: 8px;
598}
599.variant-submenu [part='menu-item'].ML__xl {
600  font-size: 2rem;
601  text-align: center;
602  margin: 0;
603}
604.ML__center-menu .label {
605  text-align: center;
606}
607.insert-matrix-submenu {
608  /* Grid doesn't work on Safari */
609  --_menu-item-size: 25px;
610  width: calc(5 * var(--_menu-item-size));
611  display: flex;
612  flex-wrap: wrap;
613  padding: 8px;
614  align-content: center;
615  justify-content: center;
616}
617.insert-matrix-submenu [part='menu-item'] {
618  width: var(--_menu-item-size);
619  height: var(--_menu-item-size);
620  font-size: 21px;
621  border: none;
622  border-radius: 0;
623  line-height: 21px;
624  text-align: center;
625  padding: 0;
626  margin: 0;
627}
628.border-submenu [part='menu-item'] {
629  font-size: 2rem;
630  line-height: 1.2;
631  text-align: center;
632}
633.swatches-submenu {
634  --_swatch-size: 2rem;
635  --_columns: 4;
636  display: flex;
637  flex-flow: wrap;
638  padding: 8px;
639  max-width: calc(var(--_columns) * (var(--_swatch-size) + 18px) + 16px);
640  box-sizing: border-box;
641}
642.menu-swatch {
643  display: flex;
644  align-items: center;
645  justify-content: center;
646  box-sizing: border-box;
647  width: fit-content;
648  height: fit-content;
649  margin: 2px;
650  padding: 0;
651  background: var(--neutral-200);
652}
653.menu-swatch > .label {
654  padding: 0;
655  margin: 0;
656  line-height: 0;
657}
658.menu-swatch > .label > span {
659  display: inline-block;
660  margin: 6px;
661  min-width: var(--_swatch-size);
662  min-height: var(--_swatch-size);
663  border-radius: 50%;
664}
665.menu-swatch.active {
666  background: var(--neutral-100);
667  
667scale: 1.4;
668}
669.menu-swatch.active > .label > span {
670  border-radius: 2px;
671}
672.menu-swatch .ui-checkmark,
673.menu-swatch .ui-mixedmark {
674  position: absolute;
675  margin: 0;
676  padding: 0;
677  color: white;
678}
679.menu-swatch.dark-contrast .ui-checkmark,
680.menu-swatch.dark-contrast .ui-mixedmark {
681  color: #000;
682}
683.ML__insert-template {
684  font-size: 1em;
685}
686.ML__insert-label {
687  opacity: 0.5;
688  margin-left: 2ex;
689}
690`,sf
vendor: 14,051 bytes, lines 690-1337
690=`.ML__container {
691  min-height: auto !important;
692  --_hue: var(--hue, 212);
693  --_placeholder-color: var(--placeholder-color, hsl(var(--_hue), 40%, 49%));
694  --_placeholder-opacity: var(--placeholder-opacity, 0.4);
695  --_text-font-family: var(--text-font-family, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif);
696}
697.ML__sr-only {
698  position: absolute;
699  width: 1px;
700  height: 1px;
701  margin: -1px;
702  padding: 0;
703  overflow: hidden;
704  clip: rect(0, 0, 0, 0);
705  clip-path: inset(50%);
706  white-space: nowrap;
707  border: 0;
708}
709.ML__is-inline {
710  display: inline-block;
711}
712.ML__base {
713  visibility: inherit;
714  display: inline-block;
715  position: relative;
716  cursor: text;
717  padding: 0;
718  margin: 0;
719  box-sizing: content-box;
720  border: 0;
721  outline: 0;
722  vertical-align: baseline;
723  font-weight: inherit;
724  font-family: inherit;
725  font-style: inherit;
726  text-decoration: none;
727  width: min-content;
728}
729.ML__strut,
730.ML__strut--bottom {
731  display: inline-block;
732  min-height: 0.5em;
733}
734.ML__small-delim {
735  font-family: KaTeX_Main;
736}
737/* Text mode */
738.ML__text {
739  font-family: var(--_text-font-family);
740  white-space: pre;
741}
742/* Use cmr for 'math upright' */
743.ML__cmr {
744  font-family: KaTeX_Main;
745  font-style: normal;
746}
747.ML__mathit {
748  font-family: KaTeX_Math;
749  /* The KaTeX_Math font is italic by default, so the font-style below is only 
750     useful when a fallback font is used
751  */
752  font-style: italic;
753}
754.ML__mathbf {
755  font-family: KaTeX_Main;
756  font-weight: bold;
757}
758/* Lowercase greek symbols should stick to math font when \\mathbf is applied 
759   to match TeX idiosyncratic behavior */
760.lcGreek.ML__mathbf {
761  font-family: KaTeX_Math;
762}
763.ML__mathbfit {
764  font-family: KaTeX_Math;
765  font-weight: bold;
766  font-style: italic;
767}
768.ML__ams {
769  font-family: KaTeX_AMS;
770}
771/* Blackboard */
772.ML__bb {
773  font-family: KaTeX_AMS;
774}
775.ML__cal {
776  font-family: KaTeX_Caligraphic;
777}
778.ML__frak {
779  font-family: KaTeX_Fraktur;
780}
781.ML__tt {
782  font-family: KaTeX_Typewriter;
783}
784.ML__script {
785  font-family: KaTeX_Script;
786}
787.ML__sans {
788  font-family: KaTeX_SansSerif;
789}
790.ML__series_ul {
791  font-weight: 100;
792}
793.ML__series_el {
794  font-weight: 100;
795}
796.ML__series_l {
797  font-weight: 200;
798}
799.ML__series_sl {
800  font-weight: 300;
801}
802.ML__series_sb {
803  font-weight: 500;
804}
805.ML__bold {
806  font-weight: 700;
807}
808.ML__series_eb {
809  font-weight: 800;
810}
811.ML__series_ub {
812  font-weight: 900;
813}
814.ML__series_uc {
815  font-stretch: ultra-condensed;
816}
817.ML__series_ec {
818  font-stretch: extra-condensed;
819}
820.ML__series_c {
821  font-stretch: condensed;
822}
823.ML__series_sc {
824  font-stretch: semi-condensed;
825}
826.ML__series_sx {
827  font-stretch: semi-expanded;
828}
829.ML__series_x {
830  font-stretch: expanded;
831}
832.ML__series_ex {
833  font-stretch: extra-expanded;
834}
835.ML__series_ux {
836  font-stretch: ultra-expanded;
837}
838.ML__it {
839  font-style: italic;
840}
841.ML__shape_ol {
842  -webkit-text-stroke: 1px black;
843  text-stroke: 1px black;
844  color: transparent;
845}
846.ML__shape_sc {
847  font-variant: small-caps;
848}
849.ML__shape_sl {
850  font-style: oblique;
851}
852/* First level emphasis */
853.ML__emph {
854  color: #bc2612;
855}
856/* Second level emphasis */
857.ML__emph .ML__emph {
858  color: #0c7f99;
859}
860.ML__highlight {
861  color: #007cb2;
862  background: #edd1b0;
863}
864.ML__center {
865  text-align: center;
866}
867.ML__left {
868  text-align: left;
869}
870.ML__right {
871  text-align: right;
872}
873.ML__label_padding {
874  padding: 0 0.5em;
875}
876.ML__frac-line {
877  width: 100%;
878  min-height: 1px;
879}
880.ML__frac-line:after {
881  content: '';
882  display: block;
883  margin-top: max(-1px, -0.04em);
884  min-height: max(1px, 0.04em);
885  /* Ensure the line is visible when printing even if "turn off background images" is on*/
886  -webkit-print-color-adjust: exact;
887  print-color-adjust: exact;
888  /* There's a bug since Chrome 62 where 
889      sub-pixel border lines don't draw at some zoom 
890      levels (110%, 90%). 
891      Setting the min-height used to work around it, but that workaround
892      broke in Chrome 84 or so.
893      Setting the background (and the min-height) seems to work for now.
894      */
895  background: currentColor;
896  box-sizing: content-box;
897  /* Vuetify sets the box-sizing to inherit 
898            causes the fraction line to not draw at all sizes (see #26) */
899  /* On some versions of Firefox on Windows, the line fails to 
900            draw at some zoom levels, but setting the transform triggers
901            the hardware accelerated path, which works */
902  transform: translate(0, 0);
903  forced-color-adjust: preserve-parent-color;
904}
905@media (forced-colors: active) {
906  .ML__frac-line {
907    min-height: 0px;
908  }
909}
910.ML__sqrt {
911  display: inline-block;
912}
913.ML__sqrt-sign {
914  display: inline-block;
915  position: relative;
916}
917.ML__sqrt-line {
918  display: inline-block;
919  height: max(1px, 0.04em);
920  width: 100%;
921}
922.ML__sqrt-line:before {
923  content: '';
924  display: block;
925  margin-top: min(-1px, -0.04em);
926  min-height: max(1px, 0.04em);
927  /* Ensure the line is visible when printing even if "turn off background images" is on*/
928  -webkit-print-color-adjust: exact;
929  print-color-adjust: exact;
930  background: currentColor;
931  /* On some versions of Firefox on Windows, the line fails to 
932            draw at some zoom levels, but setting the transform triggers
933            the hardware accelerated path, which works */
934  transform: translate(0, 0);
935  forced-color-adjust: preserve-parent-color;
936}
937@media (forced-colors: active) {
938  .ML__sqrt-line:after {
939    background: white !important;
940  }
941}
942.ML__sqrt-line:after {
943  border-bottom-width: 1px;
944  content: ' ';
945  display: block;
946  margin-top: -0.1em;
947}
948.ML__sqrt-index {
949  margin-left: 0.27777778em;
950  margin-right: -0.55555556em;
951}
952.ML__delim-size1 {
953  font-family: KaTeX_Size1;
954}
955.ML__delim-size2 {
956  font-family: KaTeX_Size2;
957}
958.ML__delim-size3 {
959  font-family: KaTeX_Size3;
960}
961.ML__delim-size4 {
962  font-family: KaTeX_Size4;
963}
964.ML__delim-mult .delim-size1 > span {
965  font-family: KaTeX_Size1;
966}
967.ML__delim-mult .delim-size4 > span {
968  font-family: KaTeX_Size4;
969}
970.ML__accent-body {
971  font-family: KaTeX_Main;
972}
973.ML__accent-combining-char {
974  position: relative;
975  left: 0.24em;
976}
977/** The markup for a LaTeX formula, either in an editable mathfield or 
978    in a static display.
979*/
980.ML__latex {
981  display: inline-block;
982  direction: ltr;
983  text-align: left;
984  text-indent: 0;
985  text-rendering: auto;
986  font-family: inherit;
987  font-style: normal;
988  font-size-adjust: none;
989  font-stretch: normal;
990  font-variant-caps: normal;
991  letter-spacing: normal;
992  line-height: 1.2;
993  word-wrap: normal;
994  word-spacing: normal;
995  white-space: nowrap;
996  text-shadow: none;
997  -webkit-user-select: none;
998  user-select: none;
999  width: min-content;
1000  forced-color-adjust: preserve-parent-color;
1001}
1002.ML__latex .style-wrap {
1003  position: relative;
1004}
1005.ML__latex .ML__mfrac {
1006  display: inline-block;
1007}
1008.ML__latex .ML__left-right {
1009  display: inline-block;
1010}
1011.ML__latex .ML__vlist-t {
1012  display: inline-table;
1013  table-layout: fixed;
1014  border-collapse: collapse;
1015}
1016.ML__latex .ML__vlist-r {
1017  display: table-row;
1018}
1019.ML__latex .ML__vlist {
1020  display: table-cell;
1021  vertical-align: bottom;
1022  position: relative;
1023}
1024.ML__latex .ML__vlist > span {
1025  display: block;
1026  height: 0;
1027  position: relative;
1028}
1029.ML__latex .ML__vlist > span > span {
1030  display: inline-block;
1031}
1032.ML__latex .ML__vlist > span > .ML__pstrut {
1033  overflow: hidden;
1034  width: 0;
1035}
1036.ML__latex .ML__vlist-t2 {
1037  margin-right: -2px;
1038}
1039.ML__latex .ML__vlist-s {
1040  display: table-cell;
1041  vertical-align: bottom;
1042  font-size: 1px;
1043  width: 2px;
1044  min-width: 2px;
1045}
1046.ML__latex .ML__msubsup {
1047  text-align: left;
1048}
1049.ML__latex .ML__negativethinspace {
1050  display: inline-block;
1051  margin-left: -0.16667em;
1052  height: 0.71em;
1053}
1054.ML__latex .ML__thinspace {
1055  display: inline-block;
1056  width: 0.16667em;
1057  height: 0.71em;
1058}
1059.ML__latex .ML__mediumspace {
1060  display: inline-block;
1061  width: 0.22222em;
1062  height: 0.71em;
1063}
1064.ML__latex .ML__thickspace {
1065  display: inline-block;
1066  width: 0.27778em;
1067  height: 0.71em;
1068}
1069.ML__latex .ML__enspace {
1070  display: inline-block;
1071  width: 0.5em;
1072  height: 0.71em;
1073}
1074.ML__latex .ML__quad {
1075  display: inline-block;
1076  width: 1em;
1077  height: 0.71em;
1078}
1079.ML__latex .ML__qquad {
1080  display: inline-block;
1081  width: 2em;
1082  height: 0.71em;
1083}
1084.ML__latex .ML__llap,
1085.ML__latex .ML__rlap {
1086  width: 0;
1087  position: relative;
1088  display: inline-block;
1089}
1090.ML__latex .ML__llap > .ML__inner,
1091.ML__latex .ML__rlap > .ML__inner {
1092  position: absolute;
1093}
1094.ML__latex .ML__llap > .ML__fix,
1095.ML__latex .ML__rlap > .ML__fix {
1096  display: inline-block;
1097}
1098.ML__latex .ML__llap > .ML__inner {
1099  right: 0;
1100}
1101.ML__latex .ML__rlap > .ML__inner {
1102  left: 0;
1103}
1104.ML__latex .ML__rule {
1105  display: inline-block;
1106  border: solid 0;
1107  position: relative;
1108  box-sizing: border-box;
1109}
1110.ML__latex .overline .overline-line,
1111.ML__latex .underline .underline-line {
1112  width: 100%;
1113}
1114.ML__latex .overline .overline-line:before,
1115.ML__latex .underline .underline-line:before {
1116  content: '';
1117  border-bottom-style: solid;
1118  border-bottom-width: max(1px, 0.04em);
1119  -webkit-print-color-adjust: exact;
1120  print-color-adjust: exact;
1121  display: block;
1122}
1123.ML__latex .overline .overline-line:after,
1124.ML__latex .underline .underline-line:after {
1125  border-bottom-style: solid;
1126  border-bottom-width: max(1px, 0.04em);
1127  -webkit-print-color-adjust: exact;
1128  print-color-adjust: exact;
1129  content: '';
1130  display: block;
1131  margin-top: -1px;
1132}
1133.ML__latex .ML__stretchy {
1134  display: block;
1135  position: absolute;
1136  width: 100%;
1137  left: 0;
1138  overflow: hidden;
1139}
1140.ML__latex .ML__stretchy:before,
1141.ML__latex .ML__stretchy:after {
1142  content: '';
1143}
1144.ML__latex .ML__stretchy svg {
1145  display: block;
1146  position: absolute;
1147  width: 100%;
1148  height: inherit;
1149  fill: currentColor;
1150  stroke: currentColor;
1151  fill-rule: nonzero;
1152  fill-opacity: 1;
1153  stroke-width: 1;
1154  stroke-linecap: butt;
1155  stroke-linejoin: miter;
1156  stroke-miterlimit: 4;
1157  stroke-dasharray: none;
1158  stroke-dashoffset: 0;
1159  stroke-opacity: 1;
1160}
1161.ML__latex .slice-1-of-2 {
1162  display: inline-flex;
1163  position: absolute;
1164  left: 0;
1165  width: 50.2%;
1166  overflow: hidden;
1167}
1168.ML__latex .slice-2-of-2 {
1169  display: inline-flex;
1170  position: absolute;
1171  right: 0;
1172  width: 50.2%;
1173  overflow: hidden;
1174}
1175.ML__latex .slice-1-of-3 {
1176  display: inline-flex;
1177  position: absolute;
1178  left: 0;
1179  width: 25.1%;
1180  overflow: hidden;
1181}
1182.ML__latex .slice-2-of-3 {
1183  display: inline-flex;
1184  position: absolute;
1185  left: 25%;
1186  width: 50%;
1187  overflow: hidden;
1188}
1189.ML__latex .slice-3-of-3 {
1190  display: inline-flex;
1191  position: absolute;
1192  right: 0;
1193  width: 25.1%;
1194  overflow: hidden;
1195}
1196.ML__latex .slice-1-of-1 {
1197  display: inline-flex;
1198  position: absolute;
1199  width: 100%;
1200  left: 0;
1201  overflow: hidden;
1202}
1203.ML__latex .ML__nulldelimiter {
1204  display: inline-block;
1205}
1206.ML__latex .ML__op-group {
1207  display: inline-block;
1208}
1209.ML__latex .ML__op-symbol {
1210  position: relative;
1211}
1212.ML__latex .ML__op-symbol.ML__small-op {
1213  font-family: KaTeX_Size1;
1214}
1215.ML__latex .ML__op-symbol.ML__large-op {
1216  font-family: KaTeX_Size2;
1217}
1218.ML__latex:has(.ML__center_environment),
1219.ML__latex:has(.ML__multiline_environment),
1220.ML__latex:has(.ML__align_environment),
1221.ML__latex:has(.ML__eqnarray_environment),
1222.ML__latex:has(.ML__gather_environment) {
1223  width: 100%;
1224}
1225.ML__latex .ML__multiline_environment {
1226  display: inline-flex;
1227  width: 100%;
1228}
1229.ML__latex .ML__center_environment {
1230  display: inline-flex;
1231  width: 100%;
1232  justify-content: center;
1233}
1234.ML__latex .ML__align_environment,
1235.ML__latex .ML__eqnarray_environment,
1236.ML__latex .ML__gather_environment {
1237  display: inline-block;
1238}
1239.ML__latex .ML__mtable .ML__vertical-separator {
1240  display: inline-block;
1241  min-width: 1px;
1242  box-sizing: border-box;
1243}
1244.ML__latex .ML__mtable .ML__arraycolsep {
1245  display: inline-block;
1246}
1247.ML__latex .ML__mtable .col-align-m > .ML__vlist-t {
1248  text-align: center;
1249}
1250.ML__latex .ML__mtable .col-align-c > .ML__vlist-t {
1251  text-align: center;
1252}
1253.ML__latex .ML__mtable .col-align-l > .ML__vlist-t {
1254  text-align: left;
1255}
1256.ML__latex .ML__mtable .col-align-r > .ML__vlist-t {
1257  text-align: right;
1258}
1259[data-href] {
1260  cursor: pointer;
1261}
1262.ML__error {
1263  display: inline-block;
1264  background-image: radial-gradient(ellipse at center, hsl(341, 100%, 40%), rgba(0, 0, 0, 0) 70%);
1265  background-color: hsla(341, 100%, 40%, 0.1);
1266  background-repeat: repeat-x;
1267  background-size: 3px 3px;
1268  padding-bottom: 3px;
1269  background-position: 0 100%;
1270}
1271.ML__error > .ML__error {
1272  background: transparent;
1273  padding: 0;
1274}
1275.ML__placeholder {
1276  color: var(--_placeholder-color);
1277  opacity: var(--_placeholder-opacity);
1278  padding-left: 0.4ex;
1279  padding-right: 0.4ex;
1280  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
1281}
1282.ML__notation {
1283  position: absolute;
1284  box-sizing: border-box;
1285  line-height: 0;
1286}
1287/* This class is used to implement the \`\\mathtip\` and \`\\texttip\` commands
1288   For UI elements, see \`[data-ML__tooltip]\`
1289*/
1290.ML__tooltip-container {
1291  position: relative;
1292  transform: scale(0);
1293}
1294.ML__tooltip-container .ML__tooltip-content {
1295  position: fixed;
1296  display: inline-table;
1297  visibility: hidden;
1298  z-index: 2;
1299  width: max-content;
1300  max-width: 400px;
1301  padding: 12px 12px;
1302  border: var(--_tooltip-border);
1303  border-radius: var(--_tooltip-border-radius);
1304  background: var(--_tooltip-background-color);
1305  --_selection-color: var(--_tooltip-color);
1306  color: var(--_tooltip-color);
1307  box-shadow: var(--_tooltip-box-shadow);
1308  opacity: 0;
1309  transition: opacity 0.15s cubic-bezier(0.4, 0, 1, 1);
1310}
1311.ML__tooltip-container .ML__tooltip-content .ML__text {
1312  white-space: normal;
1313}
1314.ML__tooltip-container .ML__tooltip-content .ML__base {
1315  display: contents;
1316}
1317.ML__tooltip-container:hover .ML__tooltip-content {
1318  visibility: visible;
1319  opacity: 1;
1320  font-size: 0.75em;
1321  transform: scale(1) translate(0, 3em);
1322}
1323.ML__bg {
1324  background-color: transparent !important;
1325}
1326.ML__bg::before {
1327  content: '';
1328  position: absolute;
1329  top: 0;
1330  left: 0;
1331  right: 0;
1332  bottom: 0;
1333  background-color: var(--bg-color);
1334  z-index: -1;
1335  box-sizing: border-box;
1336}
1337`
1337,uf=`#mathlive-environment-popover.is-visible {
1338  visibility: visible;
1339}
1340#mathlive-environment-popover {
1341  --_environment-panel-height: var(--environment-panel-height, 70px);
1342  --_accent-color: var(--accent-color, #aaa);
1343  --_background: var(--environment-panel-background, #fff);
1344  --_button-background: var(--environment-panel-button-background, white);
1345  --_button-background-hover: var(--environment-panel-button-background-hover, #f5f5f7);
1346  --_button-background-active: var(--environment-panel-button-background-active, #f5f5f7);
1347  --_button-text: var(--environment-panel-button-text, #e3e4e8);
1348  position: absolute;
1349  width: calc(var(--_environment-panel-height) * 2);
1350  height: var(--_environment-panel-height);
1351  border-radius: 4px;
1352  border: 1.5px solid var(--_accent-color);
1353  background-color: var(--_background);
1354  box-shadow: 0 0 30px 0 var(--environment-shadow, rgba(0, 0, 0, 0.4));
1355  pointer-events: all;
1356  visibility: hidden;
1357}
1358#mathlive-environment-popover .MLEP__array-buttons {
1359  height: calc(var(--_environment-panel-height) * 5/4);
1360  width: calc(var(--_environment-panel-height) * 5/4);
1361  margin-left: calc(0px - var(--_environment-panel-height) * 0.16);
1362  margin-top: calc(0px - var(--_environment-panel-height) * 0.19);
1363}
1364#mathlive-environment-popover .MLEP__array-buttons .font {
1365  fill: white;
1366}
1367#mathlive-environment-popover .MLEP__array-buttons circle {
1368  fill: #7f7f7f;
1369  transition: fill 300ms;
1370}
1371#mathlive-environment-popover .MLEP__array-buttons .MLEP__array-insert-background {
1372  fill-opacity: 1;
1373  fill: var(--_background);
1374  stroke: var(--_accent-color);
1375  stroke-width: 3px;
1376}
1377#mathlive-environment-popover .MLEP__array-buttons line {
1378  stroke: var(--_accent-color);
1379  stroke-opacity: 0;
1380  stroke-width: 40;
1381  pointer-events: none;
1382  transition: stroke-opacity 300ms;
1383  stroke-linecap: round;
1384}
1385#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover circle {
1386  fill: var(--_accent-color);
1387}
1388#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover line {
1389  stroke-opacity: 1;
1390}
1391#mathlive-environment-popover .MLEP__environment-delimiter-controls {
1392  height: 100%;
1393  width: 50%;
1394}
1395#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options {
1396  width: var(--_environment-panel-height);
1397  height: var(--_environment-panel-height);
1398  display: flex;
1399  flex-wrap: wrap;
1400  flex-direction: row;
1401  justify-content: space-around;
1402}
1403#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg {
1404  pointer-events: all;
1405  margin-top: 2px;
1406  width: calc(var(--_environment-panel-height) / 3 * 28 / 24);
1407  height: calc(var(--_environment-panel-height) / 3 - 2px);
1408  border-radius: calc(var(--_environment-panel-height) / 25);
1409  background-color: var(--_button-background);
1410}
1411#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg:hover {
1412  background-color: var(--_button-background-hover);
1413}
1414#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path,
1415#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg line {
1416  stroke: var(--_button-text);
1417  stroke-width: 2;
1418  stroke-linecap: round;
1419}
1420#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg rect,
1421#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path {
1422  fill-opacity: 0;
1423}
1424#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active {
1425  pointer-events: none;
1426  background-color: var(--_button-background-active);
1427}
1428#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active path,
1429#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active line {
1430  stroke: var(--_accent-color);
1431}
1432#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active circle {
1433  fill: var(--_accent-color);
1434}
1435`,cf=`/* The element that display info while in latex mode */
1436#mathlive-suggestion-popover {
1437  --_suggestion-zindex: var(--suggestion-zindex, 100);
1438  background-color: rgba(97, 97, 97);
1439  color: #fff;
1440  text-align: center;
1441  border-radius: 8px;
1442  position: fixed;
1443  z-index: var(--_suggestion-zindex);
1444  display: none;
1445  flex-direction: column;
1446  justify-content: center;
1447  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
1448}
1449#mathlive-suggestion-popover.top-tip::after {
1450  content: '';
1451  position: absolute;
1452  top: -15px;
1453  left: calc(50% - 15px);
1454  width: 0;
1455  height: 0;
1456  border-left: 15px solid transparent;
1457  border-right: 15px solid transparent;
1458  border-bottom: 15px solid rgba(97, 97, 97);
1459  font-size: 1rem;
1460}
1461#mathlive-suggestion-popover.bottom-tip::after {
1462  content: '';
1463  position: absolute;
1464  bottom: -15px;
1465  left: calc(50% - 15px);
1466  width: 0;
1467  height: 0;
1468  border-left: 15px solid transparent;
1469  border-right: 15px solid transparent;
1470  border-top: 15px solid rgba(97, 97, 97);
1471  font-size: 1rem;
1472}
1473#mathlive-suggestion-popover.is-animated {
1474  transition: all 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
1475  animation: ML__fade-in cubic-bezier(0, 0, 0.2, 1) 0.15s;
1476}
1477#mathlive-suggestion-popover.is-visible {
1478  display: flex;
1479}
1480@keyframes ML__fade-in {
1481  from {
1482    opacity: 0;
1483  }
1484  to {
1485    opacity: 1;
1486  }
1487}
1488/* The wrapper class for the entire content of the popover panel */
1489#mathlive-suggestion-popover ul {
1490  display: flex;
1491  flex-flow: column;
1492  list-style: none;
1493  margin: 0;
1494  padding: 0;
1495  align-items: flex-start;
1496  max-height: 400px;
1497  overflow-y: auto;
1498}
1499#mathlive-suggestion-popover li {
1500  display: flex;
1501  flex-direction: row;
1502  justify-content: space-between;
1503  margin: 8px;
1504  padding: 8px;
1505  width: calc(100% - 16px - 16px);
1506  column-gap: 1em;
1507  border-radius: 8px;
1508  cursor: pointer;
1509  /* Since the content can be clicked on, provide feedback on hover */
1510}
1511#mathlive-suggestion-popover li a {
1512  color: #5ea6fd;
1513  padding-top: 0.3em;
1514  margin-top: 0.4em;
1515  display: block;
1516}
1517#mathlive-suggestion-popover li a:hover {
1518  color: #5ea6fd;
1519  text-decoration: underline;
1520}
1521#mathlive-suggestion-popover li:hover,
1522#mathlive-suggestion-popover li.is-pressed,
1523#mathlive-suggestion-popover li.is-active {
1524  background: rgba(255, 255, 255, 0.1);
1525}
1526/* The command inside a popover (inside a #mathlive-suggestion-popover) */
1527.ML__popover__command {
1528  font-size: 1.6rem;
1529  font-family: KaTeX_Main;
1530}
1531.ML__popover__current {
1532  background: #5ea6fd;
1533  color: #fff;
1534}
1535.ML__popover__latex {
1536  font-family: 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
1537  align-self: center;
1538}
1539/* The keyboard shortcuts for a symbol as displayed in the popover */
1540.ML__popover__keybinding {
1541  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
1542  font-size: 0.8em;
1543  opacity: 0.7;
1544}
1545/* Style for the character that joins the modifiers of a keyboard shortcut 
1546(usually a "+" sign)*/
1547.ML__shortcut-join {
1548  opacity: 0.5;
1549}
1550`,df=`/* The element that displays the keys as the user type them */
1551#mathlive-keystroke-caption-panel {
1552  visibility: hidden;
1553  /*min-width: 160px;*/
1554  /*background-color: rgba(97, 97, 200, .95);*/
1555  background: var(--secondary, hsl(var(--_hue), 19%, 26%));
1556  border-color: var(--secondary-border, hsl(0, 0%, 91%));
1557  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
1558  text-align: center;
1559  border-radius: 6px;
1560  padding: 16px;
1561  position: absolute;
1562  z-index: 1;
1563  display: flex;
1564  flex-direction: row-reverse;
1565  justify-content: center;
1566  --keystroke: white;
1567  --on-keystroke: #555;
1568  --keystroke-border: #f7f7f7;
1569}
1570@media (prefers-color-scheme: dark) {
1571  body:not([theme='light']) #mathlive-keystroke-caption-panel {
1572    --keystroke: hsl(var(--_hue), 50%, 30%);
1573    --on-keystroke: hsl(0, 0%, 98%);
1574    --keystroke-border: hsl(var(--_hue), 50%, 25%);
1575  }
1576}
1577body[theme='dark'] #mathlive-keystroke-caption-panel {
1578  --keystroke: hsl(var(--_hue), 50%, 30%);
1579  --on-keystroke: hsl(0, 0%, 98%);
1580  --keystroke-border: hsl(var(--_hue), 50%, 25%);
1581}
1582#mathlive-keystroke-caption-panel > span {
1583  min-width: 14px;
1584  /*height: 8px;*/
1585  margin: 0 8px 0 0;
1586  padding: 4px;
1587  background-color: var(--keystroke);
1588  color: var(--on-keystroke);
1589  fill: currentColor;
1590  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
1591  font-size: 1em;
1592  border-radius: 6px;
1593  border: 2px solid var(--keystroke-border);
1594  /*box-shadow: 0 7px 14px rgba(0,0,0,0.25), 0 5px 5px rgba(0,0,0,0.22);*/
1595}
1596`,hf
vendor: 29,498 bytes, lines 1596-2472
1596=`.ML__keyboard {
1597  --_keyboard-height: 0;
1598  --_keyboard-zindex: var(--keyboard-zindex, 105);
1599  --_accent-color: var(--keyboard-accent-color, #0c75d8);
1600  --_background: var(--keyboard-background, #cacfd7);
1601  --_border: var(--keyboard-border, #ddd);
1602  --_padding-horizontal: var(--keyboard-padding-horizontal, 0px);
1603  --_padding-top: var(--keyboard-padding-top, 5px);
1604  --_padding-bottom: var(--keyboard-padding-bottom, 0px);
1605  --_row-padding-left: var(--keyboard-row-padding-left, 0px);
1606  --_row-padding-right: var(--keyboard-row-padding-right, 0px);
1607  --_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
1608  --_toolbar-text-active: var(--keyboard-toolbar-text-active, var(--_accent-color));
1609  --_toolbar-background: var(--keyboard-toolbar-background, transparent);
1610  --_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
1611  --_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
1612  --_toolbar-font-size: var(--keyboard-toolbar-font-size, '135%');
1613  --_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
1614  --_keycap-background: var(--keycap-background, #f0f0f0);
1615  --_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
1616  --_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
1617  --_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
1618  --_keycap-border: var(--keycap-border, #e5e6e9);
1619  --_keycap-border-bottom: var(--keycap-border-bottom, #8d8f92);
1620  --_keycap-text: var(--keycap-text, #000);
1621  --_keycap-text-active: var(--keycap-text-active, #fff);
1622  --_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
1623  --_keycap-text-pressed: var(--keycap-text-pressed, #fff);
1624  --_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
1625  --_keycap-primary-background: var(--keycap-primary-background, var(--_accent-color));
1626  --_keycap-primary-text: var(--keycap-primary-text, #ddd);
1627  --_keycap-primary-background-hover: var(--keycap-primary-background-hover, #0d80f2);
1628  --_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
1629  --_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
1630  --_keycap-secondary-text: var(--keycap-secondary-text, #060707);
1631  --_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
1632  --_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
1633  --_keycap-height: var(--keycap-height, 60px);
1634  /* Keycap width (incl. margin) */
1635  --_keycap-max-width: var(--keycap-max-width, 100px);
1636  --_keycap-gap: var(--keycap-gap, 8px);
1637  --_keycap-font-size: var(--keycap-font-size, clamp(16px, 4cqw, 24px));
1638  --_keycap-small-font-size: var(--keycap-small-font-size, calc(var(--keycap-font-size) * 0.8));
1639  --_keycap-extra-small-font-size: var(--keycap-extra-small-font-size, calc(var(--keycap-font-size) / 1.42));
1640  --_variant-panel-background: var(--variant-panel-background, #f0f0f0);
1641  --_variant-keycap-text: var(--variant-keycap-text, var(--_keycap-text));
1642  --_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
1643  --_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
1644  --_variant-keycap-length: var(--variant-keycap-length, 70px);
1645  --_variant-keycap-font-size: var(--variant-keycap-font-size, 30px);
1646  --_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 12px);
1647  --_keycap-shift-font-size: var(--keycap-shift-font-size, 16px);
1648  --_keycap-shift-color: var(--keycap-shift-color, var(--_accent-color));
1649  --_box-placeholder-color: var(--box-placeholder-color, var(--_accent-color));
1650  --_box-placeholder-pressed-color: var(--box-placeholder-pressed-color, var(--keycap-text-pressed));
1651  --_keycap-glyph-size: var(--keycap-glyph-size, 20px);
1652  --_keycap-glyph-size-lg: var(--keycap-glyph-size-lg, 24px);
1653  --_keycap-glyph-size-xl: var(--keycap-glyph-size-xl, 50px);
1654}
1655.is-math-mode .MLK__rows .if-text-mode,
1656.is-text-mode .MLK__rows .if-math-mode {
1657  display: none;
1658}
1659.if-can-undo,
1660.if-can-redo,
1661.if-can-copy,
1662.if-can-cut,
1663.if-can-paste {
1664  opacity: 0.4;
1665  pointer-events: none;
1666}
1667.can-undo .if-can-undo,
1668.can-redo .if-can-redo,
1669.can-copy .if-can-copy,
1670.can-cut .if-can-cut,
1671.can-paste .if-can-paste {
1672  opacity: 1;
1673  pointer-events: all;
1674}
1675body > .ML__keyboard {
1676  position: fixed;
1677  --_padding-bottom: calc(var(--keyboard-padding-bottom, 0px) + env(safe-area-inset-bottom, 0));
1678}
1679body > .ML__keyboard.is-visible > .MLK__backdrop {
1680  box-shadow: 0 -5px 6px rgba(0, 0, 0, 0.08);
1681  border-top: 1px solid var(--_border);
1682}
1683body > .ML__keyboard.backdrop-is-transparent.is-visible > .MLK__backdrop {
1684  box-shadow: none;
1685  border: none;
1686}
1687body > .ML__keyboard.is-visible.animate > .MLK__backdrop {
1688  transition: 0.28s cubic-bezier(0, 0, 0.2, 1);
1689  transition-property: transform, opacity;
1690  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
1691}
1692.ML__keyboard {
1693  position: relative;
1694  overflow: hidden;
1695  top: 0;
1696  left: 0;
1697  height: 100%;
1698  width: 100%;
1699  z-index: var(--_keyboard-zindex);
1700  box-sizing: border-box;
1701  outline: none;
1702  border: none;
1703  margin: 0;
1704  padding: 0;
1705  line-height: 1;
1706  overflow-wrap: unset;
1707  text-align: left;
1708  vertical-align: baseline;
1709  cursor: auto;
1710  white-space: pre;
1711  box-shadow: none;
1712  opacity: 1;
1713  transform: none;
1714  pointer-events: none;
1715}
1716.ML__keyboard :where(div) {
1717  box-sizing: border-box;
1718  outline: none;
1719  border: none;
1720  margin: 0;
1721  padding: 0;
1722  line-height: 1;
1723  overflow-wrap: unset;
1724  text-align: left;
1725  vertical-align: baseline;
1726  cursor: auto;
1727  white-space: pre;
1728  box-shadow: none;
1729  transform: none;
1730}
1731.MLK__backdrop {
1732  position: absolute;
1733  bottom: calc(-1 * var(--_keyboard-height));
1734  width: 100%;
1735  height: var(--_keyboard-height);
1736  box-sizing: border-box;
1737  padding-top: var(--_padding-top);
1738  padding-bottom: var(--_padding-bottom);
1739  padding-left: var(--_padding-horizontal);
1740  padding-right: var(--_padding-horizontal);
1741  opacity: 0;
1742  visibility: hidden;
1743  transform: translate(0, 0);
1744  background: var(--_background);
1745}
1746.backdrop-is-transparent .MLK__backdrop {
1747  background: transparent;
1748}
1749/* If a custom layout has a custom container/backdrop
1750  (backdrop-is-transparent), make sure to let pointer event go through. */
1751.backdrop-is-transparent .MLK__plate {
1752  background: transparent;
1753  pointer-events: none;
1754}
1755/* If a custom layout has a custom container/backdrop, make sure to 
1756   allow pointer events on it. */
1757.backdrop-is-transparent .MLK__layer > div > div {
1758  pointer-events: all;
1759}
1760.ML__keyboard.is-visible > .MLK__backdrop {
1761  transform: translate(0, calc(-1 * var(--_keyboard-height)));
1762  opacity: 1;
1763  visibility: visible;
1764}
1765.caps-lock-indicator {
1766  display: none;
1767  width: 8px;
1768  height: 8px;
1769  background: #0cbc0c;
1770  box-shadow: inset 0 0 4px 0 #13ca13, 0 0 4px 0 #a9ef48;
1771  border-radius: 8px;
1772  right: 8px;
1773  top: 8px;
1774  position: absolute;
1775}
1776.ML__keyboard.is-caps-lock .caps-lock-indicator {
1777  display: block;
1778}
1779.ML__keyboard.is-caps-lock .shift {
1780  background: var(--_keycap-background-active);
1781  color: var(--_keycap-text-active);
1782}
1783.MLK__plate {
1784  position: absolute;
1785  top: var(--_padding-top);
1786  left: var(--_padding-horizontal);
1787  width: calc(100% - 2 * var(--_padding-horizontal));
1788  margin: 0;
1789  padding: 0;
1790  box-sizing: border-box;
1791  container-type: inline-size;
1792  touch-action: none;
1793  -webkit-user-select: none;
1794  user-select: none;
1795  pointer-events: all;
1796  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
1797  font-size: 16px;
1798  /* Size of toolbar labels */
1799  font-weight: 400;
1800  text-shadow: none;
1801}
1802.ML__box-placeholder {
1803  color: var(--_box-placeholder-color);
1804}
1805.MLK__tex {
1806  font-family: KaTeX_Main, KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
1807}
1808.MLK__tex-math {
1809  font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
1810  font-style: italic;
1811}
1812.MLK__layer {
1813  display: none;
1814  outline: none;
1815}
1816.MLK__layer.is-visible {
1817  display: flex;
1818  flex-flow: column;
1819}
1820/* Keyboard layouts are made or rows of keys... */
1821.MLK__rows {
1822  --_keycap-width: var(--keycap-width, min(var(--_keycap-max-width), 10cqw));
1823  display: flex;
1824  flex-flow: column;
1825  align-items: center;
1826  border-collapse: separate;
1827  clear: both;
1828  border: 0;
1829  margin: 0;
1830  margin-bottom: var(--_keycap-gap);
1831  gap: var(--_keycap-gap);
1832  /* If the styling include, e.g., some shadows, they will be
1833  cut off by the overflow. In that case, set the padding to 
1834  compensate. */
1835  padding-left: var(--_row-padding-left);
1836  padding-right: var(--_row-padding-right);
1837  overflow: visible;
1838  touch-action: none;
1839}
1840.MLK__rows > .MLK__row {
1841  display: flex;
1842  flex-flow: row;
1843  justify-content: center;
1844  width: 100%;
1845  gap: var(--_keycap-gap);
1846  margin: 0;
1847  padding: 0;
1848  /* For the alignment of the text on some modifiers (e.g. shift) */
1849  /* Extra spacing between two adjacent keys */
1850}
1851.MLK__rows > .MLK__row .tex {
1852  font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
1853}
1854.MLK__rows > .MLK__row .tex-math {
1855  font-family: KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
1856}
1857.MLK__rows > .MLK__row .big-op {
1858  font-size: calc(1.25 * var(--_keycap-font-size));
1859}
1860.MLK__rows > .MLK__row .small {
1861  font-size: var(--_keycap-small-font-size);
1862}
1863.MLK__rows > .MLK__row .bottom {
1864  justify-content: flex-end;
1865}
1866.MLK__rows > .MLK__row .left {
1867  align-items: flex-start;
1868  padding-left: 12px;
1869}
1870.MLK__rows > .MLK__row .right {
1871  align-items: flex-end;
1872  padding-right: 12px;
1873}
1874.MLK__rows > .MLK__row .w0 {
1875  width: 0;
1876}
1877.MLK__rows > .MLK__row .w5 {
1878  width: calc(0.5 * var(--_keycap-width) - var(--_keycap-gap));
1879}
1880.MLK__rows > .MLK__row .w15 {
1881  width: calc(1.5 * var(--_keycap-width) - var(--_keycap-gap));
1882}
1883.MLK__rows > .MLK__row .w20 {
1884  width: calc(2 * var(--_keycap-width) - var(--_keycap-gap));
1885}
1886.MLK__rows > .MLK__row .w40 {
1887  width: calc(4 * var(--_keycap-width) - var(--_keycap-gap));
1888}
1889.MLK__rows > .MLK__row .w50 {
1890  width: calc(5 * var(--_keycap-width) - var(--_keycap-gap));
1891}
1892.MLK__rows > .MLK__row .MLK__keycap.w50 {
1893  font-size: 80%;
1894  padding-top: 10px;
1895  font-weight: 100;
1896}
1897.MLK__rows > .MLK__row .separator {
1898  background: transparent;
1899  border: none;
1900  pointer-events: none;
1901}
1902.MLK__rows > .MLK__row .horizontal-rule {
1903  height: 6px;
1904  margin-top: 3px;
1905  margin-bottom: 0;
1906  width: 100%;
1907  border-radius: 0;
1908  border-top: var(--_horizontal-rule);
1909}
1910.MLK__rows > .MLK__row .ghost {
1911  background: var(--_toolbar-background);
1912  border: none;
1913  color: var(--_toolbar-text);
1914}
1915.MLK__rows > .MLK__row .ghost:hover {
1916  background: var(--_toolbar-background-hover);
1917}
1918.MLK__rows > .MLK__row .bigfnbutton {
1919  font-size: var(--_keycap-extra-small-font-size);
1920}
1921.MLK__rows > .MLK__row .shift,
1922.MLK__rows > .MLK__row .action {
1923  color: var(--_keycap-secondary-text);
1924  background: var(--_keycap-secondary-background);
1925  border-color: var(--_keycap-secondary-border);
1926  border-bottom-color: var(--_keycap-secondary-border-bottom);
1927  line-height: 0.8;
1928  font-size: min(1rem, var(--_keycap-small-font-size));
1929  font-weight: 600;
1930  padding: 8px 12px 8px 12px;
1931}
1932.MLK__rows > .MLK__row .shift:hover,
1933.MLK__rows > .MLK__row .action:hover {
1934  background: var(--_keycap-secondary-background-hover);
1935}
1936.MLK__rows > .MLK__row .action.primary {
1937  background: var(--_keycap-primary-background);
1938  color: var(--_keycap-primary-text);
1939}
1940.MLK__rows > .MLK__row .action.primary:hover {
1941  background: var(--_keycap-primary-background-hover);
1942  color: var(--_keycap-primary-text);
1943}
1944.MLK__rows > .MLK__row .shift.selected,
1945.MLK__rows > .MLK__row .action.selected {
1946  color: var(--_toolbar-text-active);
1947}
1948.MLK__rows > .MLK__row .shift.selected.is-pressed,
1949.MLK__rows > .MLK__row .action.selected.is-pressed,
1950.MLK__rows > .MLK__row .shift.selected.is-active,
1951.MLK__rows > .MLK__row .action.selected.is-active {
1952  color: white;
1953}
1954.MLK__rows > .MLK__row .warning {
1955  background: #cd0030;
1956  color: white;
1957}
1958.MLK__rows > .MLK__row .warning svg.svg-glyph {
1959  width: var(--_keycap-glyph-size-lg);
1960  height: var(--_keycap-glyph-size-lg);
1961  min-height: var(--_keycap-glyph-size-lg);
1962}
1963/** A regular keycap
1964 * Use the :where() pseudo-class to give it a very low specifity, 
1965 * so that it can be overriden by custom style.
1966 */
1967:where(.MLK__rows > .MLK__row div) {
1968  display: flex;
1969  flex-flow: column;
1970  align-items: center;
1971  justify-content: space-evenly;
1972  width: calc(var(--_keycap-width) - var(--_keycap-gap));
1973  height: var(--_keycap-height);
1974  box-sizing: border-box;
1975  padding: 0;
1976  vertical-align: top;
1977  text-align: center;
1978  float: left;
1979  color: var(--_keycap-text);
1980  fill: currentColor;
1981  font-size: var(--_keycap-font-size);
1982  background: var(--_keycap-background);
1983  border: 1px solid var(--_keycap-border);
1984  border-bottom-color: var(--_keycap-border-bottom);
1985  border-radius: 6px;
1986  cursor: pointer;
1987  touch-action: none;
1988  /* Keys with a variants panel */
1989  position: relative;
1990  overflow: hidden;
1991  -webkit-user-select: none;
1992  user-select: none;
1993  -webkit-tap-highlight-color: transparent;
1994}
1995:where(.MLK__rows > .MLK__row div):hover {
1996  overflow: visible;
1997  background: var(--_keycap-background-hover);
1998  color: var(--_keycap-text-hover);
1999}
2000:where(.MLK__rows > .MLK__row div) .ML__latex {
2001  pointer-events: none;
2002  touch-action: none;
2003}
2004:where(.MLK__rows > .MLK__row div) svg.svg-glyph {
2005  margin: 8px 0;
2006  width: var(--_keycap-glyph-size);
2007  height: var(--_keycap-glyph-size);
2008  min-height: var(--_keycap-glyph-size);
2009}
2010:where(.MLK__rows > .MLK__row div) svg.svg-glyph-lg {
2011  margin: 8px 0;
2012  width: var(--_keycap-glyph-size-lg);
2013  height: var(--_keycap-glyph-size-lg);
2014  min-height: var(--_keycap-glyph-size-lg);
2015}
2016:where(.MLK__rows > .MLK__row div).MLK__tex-math {
2017  font-size: 25px;
2018}
2019:where(.MLK__rows > .MLK__row div).is-pressed {
2020  background: var(--_keycap-background-pressed);
2021  color: var(--_keycap-text-pressed);
2022  --_box-placeholder-color: var(--_box-placeholder-pressed-color);
2023}
2024:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
2025:where(.MLK__rows > .MLK__row div).action.is-active,
2026:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
2027:where(.MLK__rows > .MLK__row div).action.is-pressed {
2028  z-index: calc(var(--_keyboard-zindex) - 5);
2029}
2030:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active aside,
2031:where(.MLK__rows > .MLK__row div).action.is-active aside,
2032:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed aside,
2033:where(.MLK__rows > .MLK__row div).action.is-pressed aside {
2034  display: none;
2035}
2036:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active .MLK__shift,
2037:where(.MLK__rows > .MLK__row div).action.is-active .MLK__shift,
2038:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed .MLK__shift,
2039:where(.MLK__rows > .MLK__row div).action.is-pressed .MLK__shift {
2040  display: none;
2041}
2042:where(.MLK__rows > .MLK__row div).shift.is-pressed,
2043:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
2044:where(.MLK__rows > .MLK__row div).action.is-pressed {
2045  background: var(--_keycap-background-pressed);
2046  color: var(--_keycap-text-pressed);
2047}
2048:where(.MLK__rows > .MLK__row div).shift.is-active,
2049:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
2050:where(.MLK__rows > .MLK__row div).action.is-active {
2051  background: var(--_keycap-background-active);
2052  color: var(--_keycap-text-active);
2053  --_box-placeholder-color: var(--_box-placeholder-pressed-color);
2054}
2055:where(.MLK__rows > .MLK__row div) small {
2056  color: var(--_keycap-secondary-text);
2057}
2058:where(.MLK__rows > .MLK__row div) aside {
2059  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
2060  font-size: 10px;
2061  line-height: 10px;
2062  color: var(--_keycap-secondary-text);
2063}
2064/* Add an attribute 'data-tooltip' to display a tooltip on hover.
2065Note there are a different set of tooltip rules for the keyboard toggle
2066(it's in a different CSS tree) */
2067.ML__keyboard [data-tooltip] {
2068  position: relative;
2069}
2070.ML__keyboard [data-tooltip]::after {
2071  position: absolute;
2072  display: inline-table;
2073  content: attr(data-tooltip);
2074  top: inherit;
2075  bottom: 100%;
2076  width: max-content;
2077  max-width: 200px;
2078  padding: 8px 8px;
2079  background: #616161;
2080  color: #fff;
2081  text-align: center;
2082  z-index: 2;
2083  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
2084  border-radius: 2px;
2085  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
2086  font-weight: 400;
2087  font-size: 12px;
2088  transition: all 0.15s cubic-bezier(0.4, 0, 1, 1) 1s;
2089  opacity: 0;
2090  transform: scale(0.5);
2091}
2092.ML__keyboard [data-tooltip]:hover {
2093  position: relative;
2094}
2095.ML__keyboard [data-tooltip]:hover::after {
2096  opacity: 1;
2097  transform: scale(1);
2098}
2099.MLK__toolbar {
2100  align-self: center;
2101  display: flex;
2102  flex-flow: row;
2103  justify-content: space-between;
2104  width: 100%;
2105  max-width: 996px;
2106  min-height: 32px;
2107  /* Icons for undo/redo, etc. */
2108}
2109.MLK__toolbar svg {
2110  height: 20px;
2111  width: 20px;
2112}
2113.MLK__toolbar > .left {
2114  position: relative;
2115  display: flex;
2116  justify-content: flex-start;
2117  flex-flow: row;
2118}
2119.MLK__toolbar > .right {
2120  display: flex;
2121  justify-content: flex-end;
2122  flex-flow: row;
2123}
2124.MLK__toolbar > div > div {
2125  /* "button" in the toolbar */
2126  display: flex;
2127  align-items: center;
2128  justify-content: center;
2129  color: var(--_toolbar-text);
2130  fill: currentColor;
2131  background: var(--_toolbar-background);
2132  font-size: var(--_toolbar-font-size);
2133  padding: 4px 15px;
2134  cursor: pointer;
2135  width: max-content;
2136  min-width: 42px;
2137  min-height: 34px;
2138  border: none;
2139  padding-left: 10px;
2140  padding-right: 10px;
2141  padding-bottom: 8px;
2142  padding-top: 8px;
2143  margin-top: 0;
2144  margin-bottom: 4px;
2145  margin-left: 4px;
2146  margin-right: 4px;
2147  border-radius: 8px;
2148  box-shadow: none;
2149  border-bottom: 2px solid transparent;
2150}
2151.MLK__toolbar > div > div:not(.disabled):not(.selected):hover {
2152  background: var(--_toolbar-background-hover);
2153}
2154.MLK__toolbar > div > div.disabled svg,
2155.MLK__toolbar > div > div.disabled:hover svg,
2156.MLK__toolbar > div > div.disabled.is-pressed svg {
2157  color: var(--_toolbar-text);
2158  opacity: 0.2;
2159}
2160.MLK__toolbar > div > div:hover,
2161.MLK__toolbar > div > div:active,
2162.MLK__toolbar > div > div.is-pressed,
2163.MLK__toolbar > div > div.is-active {
2164  color: var(--_toolbar-text-active);
2165}
2166.MLK__toolbar > div > div.selected {
2167  color: var(--_toolbar-text-active);
2168  background: var(--_toolbar-background-selected);
2169  border-radius: 0;
2170  border-bottom-color: var(--_toolbar-text-active);
2171  padding-bottom: 4px;
2172  margin-bottom: 8px;
2173}
2174/* This is the element that displays variants on press+hold */
2175.MLK__variant-panel {
2176  visibility: hidden;
2177  position: fixed;
2178  display: flex;
2179  flex-flow: row wrap-reverse;
2180  justify-content: center;
2181  align-content: center;
2182  margin: 0;
2183  padding: 0;
2184  bottom: auto;
2185  top: 0;
2186  box-sizing: content-box;
2187  transform: none;
2188  z-index: calc(var(--_keyboard-zindex) + 1);
2189  touch-action: none;
2190  max-width: 350px;
2191  background: var(--_variant-panel-background);
2192  text-align: center;
2193  border-radius: 6px;
2194  padding: 6px;
2195  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
2196  transition: none;
2197}
2198.MLK__variant-panel.is-visible {
2199  visibility: visible;
2200}
2201.MLK__variant-panel.compact {
2202  --_variant-keycap-length: var(--variant-keycap-length, 50px);
2203  --_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
2204  --_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 10px);
2205}
2206.MLK__variant-panel .item {
2207  display: flex;
2208  flex-flow: column;
2209  align-items: center;
2210  justify-content: center;
2211  font-size: var(--_variant-keycap-font-size);
2212  height: var(--_variant-keycap-length);
2213  width: var(--_variant-keycap-length);
2214  margin: 0;
2215  box-sizing: border-box;
2216  border-radius: 5px;
2217  border: 1px solid transparent;
2218  background: transparent;
2219  pointer-events: all;
2220  cursor: pointer;
2221  color: var(--_variant-keycap-text);
2222  fill: currentColor;
2223}
2224@media (max-height: 412px) {
2225  .MLK__variant-panel .item {
2226    --_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
2227    --_variant-keycap-length: var(--variant-keycap-length, 50px);
2228  }
2229}
2230.MLK__variant-panel .item .ML__latex {
2231  pointer-events: none;
2232}
2233.MLK__variant-panel .item:hover {
2234  color: var(--_keycap-text-hover);
2235}
2236.MLK__variant-panel .item.is-active {
2237  background: var(--_variant-keycap-background-active);
2238  color: var(--_variant-keycap-text-active);
2239  --_box-placeholder-color: var(--_box-placeholder-pressed-color);
2240}
2241.MLK__variant-panel .item.is-pressed {
2242  background: var(--_variant-keycap-background-pressed);
2243  color: var(--_variant-keycap-text-pressed);
2244  --_box-placeholder-color: var(--_box-placeholder-pressed-color);
2245}
2246.MLK__variant-panel .item.small {
2247  font-size: var(--_keycap-small-font-size);
2248}
2249.MLK__variant-panel .item.swatch-button {
2250  box-sizing: border-box;
2251  background: #fbfbfb;
2252}
2253.MLK__variant-panel .item.swatch-button > span {
2254  display: inline-block;
2255  margin: 6px;
2256  width: calc(100% - 12px);
2257  height: calc(100% - 12px);
2258  border-radius: 50%;
2259}
2260.MLK__variant-panel .item.swatch-button:hover {
2261  background: #f0f0f0;
2262}
2263.MLK__variant-panel .item.swatch-button:hover > span {
2264  border-radius: 2px;
2265}
2266.MLK__variant-panel .item.box > div,
2267.MLK__variant-panel .item.box > span {
2268  border: 1px dashed rgba(0, 0, 0, 0.24);
2269}
2270.MLK__variant-panel .item .warning {
2271  min-height: 60px;
2272  min-width: 60px;
2273  background: #cd0030;
2274  color: white;
2275  padding: 5px;
2276  display: flex;
2277  align-items: center;
2278  justify-content: center;
2279  border-radius: 5px;
2280}
2281.MLK__variant-panel .item .warning.is-pressed,
2282.MLK__variant-panel .item .warning.is-active {
2283  background: red;
2284}
2285.MLK__variant-panel .item .warning svg.svg-glyph {
2286  width: var(--_keycap-glyph-size-xl);
2287  height: var(--_keycap-glyph-size-xl);
2288}
2289.MLK__variant-panel .item aside {
2290  font-size: var(--_variant-keycap-aside-font-size);
2291  line-height: 12px;
2292  opacity: 0.78;
2293  padding-top: 2px;
2294  width: 100%;
2295  text-align: center;
2296  text-wrap: wrap;
2297}
2298.MLK__keycap {
2299  position: relative;
2300}
2301.MLK__shift {
2302  display: block;
2303  position: absolute;
2304  right: 4px;
2305  top: 4px;
2306  font-size: var(--_keycap-shift-font-size);
2307  color: var(--_keycap-shift-color);
2308}
2309.hide-shift .MLK__shift {
2310  display: none;
2311}
2312@media (max-width: 414px) {
2313  .MLK__variant-panel {
2314    max-width: 350px;
2315    --_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
2316    --_variant-keycap-length: var(--variant-keycap-length, 50px);
2317  }
2318}
2319/* @xs breakpoint: iPhone 5 */
2320@container (max-width: 414px) {
2321  .MLK__rows {
2322    --_keycap-gap: max(var(--_keycap-gap, 2px), 2px);
2323    --_keycap-height: var(--keycap-height, 42px);
2324    --_keycap-width: var(--keycap-width, min(min(var(--_keycap-max-width)), 10cqw), 62px));
2325  }
2326  .MLK__toolbar > div > div {
2327    font-size: 100%;
2328    margin-left: 2px;
2329    margin-right: 2px;
2330  }
2331  .MLK__rows .shift,
2332  .MLK__rows .action {
2333    font-size: 65%;
2334  }
2335  .MLK__rows .warning svg.svg-glyph {
2336    width: 14px;
2337    height: 14px;
2338    min-height: 14px;
2339  }
2340}
2341@container (max-width: 744px) {
2342  .MLK__rows {
2343    --_keycap-gap: max(var(--keycap-gap, 2px), 2px);
2344    --_keycap-height: var(--keycap-height, 52px);
2345    --_keycap-width: var(--keycap-width, min(min(var(--_keycap-max-width), 10cqw), 62px));
2346  }
2347  .MLK__toolbar > div > div {
2348    padding-left: 0;
2349    padding-right: 0;
2350  }
2351  .MLK__tooltip::after {
2352    padding: 8px 16px;
2353    font-size: 16px;
2354  }
2355  .MLK__rows > .MLK__row > div.fnbutton {
2356    font-size: 16px;
2357  }
2358  .MLK__rows > .MLK__row > div.bigfnbutton {
2359    font-size: calc(var(--_keycap-extra-small-font-size) / 1.55);
2360  }
2361  .MLK__rows > .MLK__row > div.small {
2362    font-size: 13px;
2363  }
2364  .MLK__rows > .MLK__row > div > aside {
2365    display: none;
2366  }
2367  .MLK__shift {
2368    display: none;
2369  }
2370}
2371/* Medium breakpoint: larger phones */
2372@container (max-width: 768px) {
2373  .MLK__rows {
2374    --_keycap-height: var(--keycap-height, 42px);
2375  }
2376  .MLK__rows > .MLK__row > div > small {
2377    font-size: 14px;
2378  }
2379}
2380@media (max-height: 768px) {
2381  .MLK__rows {
2382    --_keycap-height: var(--keycap-height, 42px);
2383  }
2384  .MLK__rows > .MLK__row > div > small {
2385    font-size: 14px;
2386  }
2387}
2388@container (max-width: 1444px) {
2389  .MLK__rows .if-wide {
2390    display: none;
2391  }
2392}
2393@media (prefers-color-scheme: dark) {
2394  .ML__keyboard {
2395    --_accent-color: var(--keyboard-accent-color, #0b5c9c);
2396    --_background: var(--keyboard-background, #151515);
2397    --_border: var(--keyboard-border, transparent);
2398    --_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
2399    --_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
2400    --keyboard-toolbar-background-hover: #303030;
2401    --_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
2402    --_keycap-background: var(--keycap-background, #1f2022);
2403    --_keycap-background-hover: var(--keycap-background-hover, #2f3032);
2404    --_keycap-border: var(--_keycap-border, transparent);
2405    --_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
2406    --_keycap-text: var(--keycap-text, #e3e4e8);
2407    --_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
2408    --_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
2409    --_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
2410    --keycap-secondary-border: transparent;
2411    --keycap-secondary-border-bottom: transparent;
2412    --_keycap-secondary-border: var(--keycap-secondary-border, transparent);
2413    --_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
2414    --_variant-panel-background: var(--variant-panel-background, #303030);
2415    --_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
2416  }
2417}
2418/* Same as the media query, but with a class */
2419[theme='dark'] .ML__keyboard {
2420  --_accent-color: var(--keyboard-accent-color, #0b5c9c);
2421  --_background: var(--keyboard-background, #151515);
2422  --_border: var(--keyboard-border, transparent);
2423  --_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
2424  --_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
2425  --keyboard-toolbar-background-hover: #303030;
2426  --_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
2427  --_keycap-background: var(--keycap-background, #1f2022);
2428  --_keycap-background-hover: var(--keycap-background-hover, #2f3032);
2429  --_keycap-border: var(--_keycap-border, transparent);
2430  --_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
2431  --_keycap-text: var(--keycap-text, #e3e4e8);
2432  --_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
2433  --_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
2434  --_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
2435  --keycap-secondary-border: transparent;
2436  --keycap-secondary-border-bottom: transparent;
2437  --_keycap-secondary-border: var(--keycap-secondary-border, transparent);
2438  --_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
2439  --_variant-panel-background: var(--variant-panel-background, #303030);
2440  --_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
2441}
2442[theme='light'] .ML__keyboard {
2443  --_accent-color: var(--keyboard-accent-color, #0c75d8);
2444  --_background: var(--keyboard-background, #cacfd7);
2445  --_border: var(--keyboard-border, #ddd);
2446  --_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
2447  --_toolbar-background: var(--keyboard-toolbar-background, transparent);
2448  --_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
2449  --_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
2450  --_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
2451  --_keycap-background: var(--keycap-background, white);
2452  --_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
2453  --_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
2454  --_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
2455  --_keycap-border: var(--_keycap-border, #e5e6e9);
2456  --_keycap-border-bottom: var(--_keycap-border-bottom, #8d8f92);
2457  --_keycap-text: var(--keycap-text, #000);
2458  --_keycap-text-active: var(--keycap-text-active, #fff);
2459  --_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
2460  --_keycap-text-pressed: var(--keycap-text-pressed, #fff);
2461  --_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
2462  --_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
2463  --_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
2464  --_keycap-secondary-text: var(--keycap-secondary-text, #060707);
2465  --_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
2466  --_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
2467  --_variant-panel-background: var(--variant-panel-background, #f0f0f0);
2468  --_variant-keycap-text: var(--variant-keycap-textvar, var(--_keycap-text));
2469  --_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
2470  --_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
2471}
2472`
2472,pf=`:host {
2473  --primary-color: #5898ff;
2474  --primary-color-dimmed: #c0c0f0;
2475  --primary-color-dark: var(--blue-500);
2476  --primary-color-light: var(--blue-100);
2477  --primary-color-reverse: #ffffff;
2478  --secondary-color: #ff8a65;
2479  --secondary-color-dimmed: #f0d5c5;
2480  --secondary-color-dark: var(--orange-500);
2481  --secondary-color-light: var(--orange-100);
2482  --secondary-color-reverse: #ffffff;
2483  --link-color: #5898ff;
2484  --link-color-dimmed: #c5c5c5;
2485  --link-color-dark: #121212;
2486  --link-color-light: #e2e2e2;
2487  --link-color-reverse: #ffffff;
2488  --semantic-blue: var(--blue-700);
2489  --semantic-red: var(--red-400);
2490  --semantic-orange: var(--orange-400);
2491  --semantic-green: var(--green-700);
2492  --neutral-100: #f5f5f5;
2493  --neutral-200: #eeeeee;
2494  --neutral-300: #e0e0e0;
2495  --neutral-400: #bdbdbd;
2496  --neutral-500: #9e9e9e;
2497  --neutral-600: #757575;
2498  --neutral-700: #616161;
2499  --neutral-800: #424242;
2500  --neutral-900: #212121;
2501  --red-25: #fff8f7;
2502  --red-50: #fff1ef;
2503  --red-100: #ffeae6;
2504  --red-200: #ffcac1;
2505  --red-300: #ffa495;
2506  --red-400: #ff7865;
2507  --red-500: #f21c0d;
2508  --red-600: #e50018;
2509  --red-700: #d30024;
2510  --red-800: #bd002c;
2511  --red-900: #a1002f;
2512  --orange-25: #fffbf8;
2513  --orange-50: #fff7f1;
2514  --orange-100: #fff3ea;
2515  --orange-200: #ffe1c9;
2516  --orange-300: #ffcca2;
2517  --orange-400: #ffb677;
2518  --orange-500: #fe9310;
2519  --orange-600: #f58700;
2520  --orange-700: #ea7c00;
2521  --orange-800: #dc6d00;
2522  --orange-900: #ca5b00;
2523  --brown-25: #fff8ef;
2524  --brown-50: #fff1df;
2525  --brown-100: #ffe9ce;
2526  --brown-200: #ebcca6;
2527  --brown-300: #cdaf8a;
2528  --brown-400: #af936f;
2529  --brown-500: #856a47;
2530  --brown-600: #7f5e34;
2531  --brown-700: #78511f;
2532  --brown-800: #6e4200;
2533  --brown-900: #593200;
2534  --yellow-25: #fffdf9;
2535  --yellow-50: #fffcf2;
2536  --yellow-100: #fffaec;
2537  --yellow-200: #fff2ce;
2538  --yellow-300: #ffe8ab;
2539  --yellow-400: #ffdf85;
2540  --yellow-500: #ffcf33;
2541  --yellow-600: #f1c000;
2542  --yellow-700: #dfb200;
2543  --yellow-800: #c9a000;
2544  --yellow-900: #ad8a00;
2545  --lime-25: #f4ffee;
2546  --lime-50: #e9ffdd;
2547  --lime-100: #ddffca;
2548  --lime-200: #a8fb6f;
2549  --lime-300: #94e659;
2550  --lime-400: #80d142;
2551  --lime-500: #63b215;
2552  --lime-600: #45a000;
2553  --lime-700: #268e00;
2554  --lime-800: #007417;
2555  --lime-900: #005321;
2556  --green-25: #f5fff5;
2557  --green-50: #ebffea;
2558  --green-100: #e0ffdf;
2559  --green-200: #a7ffa7;
2560  --green-300: #5afa65;
2561  --green-400: #45e953;
2562  --green-500: #17cf36;
2563  --green-600: #00b944;
2564  --green-700: #00a34a;
2565  --green-800: #008749;
2566  --green-900: #00653e;
2567  --teal-25: #f3ffff;
2568  --teal-50: #e6fffe;
2569  --teal-100: #d9fffe;
2570  --teal-200: #8dfffe;
2571  --teal-300: #57f4f4;
2572  --teal-400: #43e5e5;
2573  --teal-500: #17cfcf;
2574  --teal-600: #00c2c0;
2575  --teal-700: #00b5b1;
2576  --teal-800: #00a49e;
2577  --teal-900: #009087;
2578  --cyan-25: #f7fcff;
2579  --cyan-50: #eff8ff;
2580  --cyan-100: #e7f5ff;
2581  --cyan-200: #c2e6ff;
2582  --cyan-300: #95d5ff;
2583  --cyan-400: #61c4ff;
2584  --cyan-500: #13a7ec;
2585  --cyan-600: #069eda;
2586  --cyan-700: #0095c9;
2587  --cyan-800: #0088b2;
2588  --cyan-900: #0a7897;
2589  --blue-25: #f7faff;
2590  --blue-50: #eef5ff;
2591  --blue-100: #e5f1ff;
2592  --blue-200: #bfdbff;
2593  --blue-300: #92c2ff;
2594  --blue-400: #63a8ff;
2595  --blue-500: #0d80f2;
2596  --blue-600: #0077db;
2597  --blue-700: #006dc4;
2598  --blue-800: #0060a7;
2599  --blue-900: #005086;
2600  --indigo-25: #f8f7ff;
2601  --indigo-50: #f1efff;
2602  --indigo-100: #eae7ff;
2603  --indigo-200: #ccc3ff;
2604  --indigo-300: #ac99ff;
2605  --indigo-400: #916aff;
2606  --indigo-500: #63c;
2607  --indigo-600: #5a21b2;
2608  --indigo-700: #4e0b99;
2609  --indigo-800: #3b0071;
2610  --indigo-900: #220040;
2611  --purple-25: #fbf7ff;
2612  --purple-50: #f8f0ff;
2613  --purple-100: #f4e8ff;
2614  --purple-200: #e4c4ff;
2615  --purple-300: #d49aff;
2616  --purple-400: #c36aff;
2617  --purple-500: #a219e6;
2618  --purple-600: #9000c4;
2619  --purple-700: #7c009f;
2620  --purple-800: #600073;
2621  --purple-900: #3d0043;
2622  --magenta-25: #fff8fb;
2623  --magenta-50: #fff2f6;
2624  --magenta-100: #ffebf2;
2625  --magenta-200: #ffcddf;
2626  --magenta-300: #ffa8cb;
2627  --magenta-400: #ff7fb7;
2628  --magenta-500: #eb4799;
2629  --magenta-600: #da3689;
2630  --magenta-700: #c82179;
2631  --magenta-800: #b00065;
2632  --magenta-900: #8a004c;
2633}
2634@media (prefers-color-scheme: dark) {
2635  :host {
2636    --semantic-blue: var(--blue-700);
2637    --semantic-red: var(--red-400);
2638    --semantic-orange: var(--orange-400);
2639    --semantic-green: var(--green-700);
2640    --semantic-bg-blue: var(--blue-25);
2641    --semantic-bg-red: var(--red-25);
2642    --semantic-bg-orange: var(--orange-25);
2643    --semantic-bg-green: var(--green-25);
2644    --neutral-100: #121212;
2645    --neutral-200: #424242;
2646    --neutral-300: #616161;
2647    --neutral-400: #757575;
2648    --neutral-500: #9e9e9e;
2649    --neutral-600: #bdbdbd;
2650    --neutral-700: #e0e0e0;
2651    --neutral-800: #eeeeee;
2652    --neutral-900: #f5f5f5;
2653  }
2654}
2655:host([theme='dark']) {
2656  --semantic-blue: var(--blue-700);
2657  --semantic-red: var(--red-400);
2658  --semantic-orange: var(--orange-400);
2659  --semantic-green: var(--green-700);
2660  --semantic-bg-blue: var(--blue-25);
2661  --semantic-bg-red: var(--red-25);
2662  --semantic-bg-orange: var(--orange-25);
2663  --semantic-bg-green: var(--green-25);
2664  --neutral-100: #121212;
2665  --neutral-200: #424242;
2666  --neutral-300: #616161;
2667  --neutral-400: #757575;
2668  --neutral-500: #9e9e9e;
2669  --neutral-600: #bdbdbd;
2670  --neutral-700: #e0e0e0;
2671  --neutral-800: #eeeeee;
2672  --neutral-900: #f5f5f5;
2673}
2674/* @media (prefers-color-scheme: dark) {
2675  :host {
2676      --label-color: #fff;
2677      --active-label-color: #000;
2678      --menu-bg: #525252;
2679      --active-bg: #5898ff;
2680      --active-bg-dimmed: #5c5c5c;
2681  }
2682} */
2683:host {
2684  --ui-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
2685  --ui-font-size: 14px;
2686  --ui-line-height: 1.5;
2687  --ui-letter-spacing: 0.007em;
2688  --mono-font-family: 'Berkeley Mono', 'JetBrains Mono', 'IBM Plex Mono', 'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;
2689  --ui-layer-1: var(--neutral-100);
2690  --ui-layer-2: var(--neutral-200);
2691  --ui-layer-3: var(--neutral-300);
2692  --ui-layer-4: var(--neutral-400);
2693  --ui-layer-5: var(--neutral-500);
2694  --ui-layer-6: var(--neutral-600);
2695  --ui-border-color: var(--primary-color);
2696  --ui-border-radius: 4px;
2697  --ui-text: var(--neutral-900);
2698  --ui-text-secondary: var(--neutral-700);
2699  --ui-text-placeholder: var(--neutral-500);
2700  --ui-text-muted: var(--neutral-300);
2701  /** A field is a UI element in which a user can type data, for
2702  * example an input or textarea element.
2703  */
2704  --ui-field-bg: var(--neutral-100);
2705  --ui-field-bg-hover: var(--neutral-100);
2706  --ui-field-bg-disabled: var(--neutral-300);
2707  --ui-field-bg-invalid: var(--red-100);
2708  --ui-field-bg-focus: var(--neutral-100);
2709  --ui-field-border: 0.5px solid var(--border-color);
2710  --ui-field-border-hover: 0.5px solid var(--border-color);
2711  --ui-field-border-disabled: 0.5px solid var(--border-color);
2712  --ui-field-border-invalid: 0.5px solid var(--border-color);
2713  --ui-field-border-focus: 0.5px solid var(--border-color);
2714  --ui-menu-bg: var(--neutral-100);
2715  --ui-menu-text: var(--neutral-900);
2716  --ui-menu-bg-hover: var(--neutral-200);
2717  --ui-menu-text-hover: var(--neutral-900);
2718  /** The \`active\` state is used for the state of menu items
2719  * when they are selected.
2720  */
2721  --ui-menu-bg-active: var(--primary-color);
2722  --ui-menu-text-active: var(--primary-color-reverse);
2723  /** The \`active-muted\` set is used for the state of
2724  * submenus when they are open.
2725  */
2726  --ui-menu-bg-active-muted: var(--neutral-300);
2727  --ui-menu-text-active-muted: var(--neutral-900);
2728  /* --ui-menu-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302),
27290 2px 6px 2px rgba(60, 64, 67, 0.149); */
2730  --ui-menu-shadow: 0 0 2px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2);
2731  --ui-menu-divider: 0.5px solid #c7c7c7;
2732  /* var(--neutral-300); */
2733  --ui-menu-z-index: 10000;
2734  --page-bg: var(--neutral-100);
2735  --content-bg: var(--neutral-200);
2736}
2737@media (prefers-color-scheme: dark) {
2738  :host {
2739    --ui-menu-bg: var(--neutral-200);
2740  }
2741}
2742:host([theme='dark']) {
2743  --ui-menu-bg: var(--neutral-200);
2744}
2745/* PingFang SC is a macOS font. Microsoft Yahei is a Windows font. 
2746  Noto  is a Linux/Android font.
2747*/
2748:lang(zh-cn),
2749:lang(zh-sg),
2750:lang(zh-my),
2751:lang(zh) {
2752  --ui-font-family: -apple-system, system-ui, 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Noto Sans SC', 'Noto Sans', 'Microsoft Yahei UI', 'Microsoft YaHei New', 'Microsoft Yahei', '微软雅黑', SimSun, '宋体', STXihei, '华文细黑', sans-serif;
2753}
2754:lang(zh-tw),
2755:lang(zh-hk),
2756:lang(zh-mo) {
2757  --ui-font-family: -apple-system, system-ui, 'Noto Sans', 'Microsoft JhengHei UI', 'Microsoft JhengHei', '微軟正黑體', '新細明體', 'PMingLiU', '細明體', 'MingLiU', sans-serif;
2758}
2759:lang(ja),
2760:lang(ja-jp),
2761:lang(ja-jp-mac) {
2762  --ui-font-family: -apple-system, system-ui, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Noto Sans JP', 'Noto Sans', '游ゴシック', '游ゴシック体', YuGothic, 'Yu Gothic', 'メイリオ', Meiryo, 'MS Pゴシック', 'MS PGothic', sans-serif;
2763}
2764:lang(ko),
2765:lang(ko-kr),
2766:lang(ko-kr-std) {
2767  --ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR', 'Noto Sans', 'Malgun Gothic', '맑은 고딕', 'Apple SD Gothic Neo', '애플 SD 산돌고딕 Neo', 'Apple SD 산돌고딕 Neo', '돋움', Dotum, sans-serif;
2768}
2769:lang(ko-kr-apple) {
2770  --ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR', 'Noto Sans', 'Apple SD Gothic Neo', '애플 SD 산돌고딕 Neo', 'Apple SD 산돌고딕 Neo', '돋움', Dotum, sans-serif;
2771}
2772:lang(zh-cn),
2773:lang(zh-sg),
2774:lang(zh-my),
2775:lang(zh),
2776:lang(zh-tw),
2777:lang(zh-hk),
2778:lang(zh-mo),
2779:lang(ja),
2780:lang(ja-jp),
2781:lang(ja-jp-mac),
2782:lang(ko),
2783:lang(ko-kr),
2784:lang(ko-kr-std),
2785:lang(ko-kr-apple) {
2786  --ui-font-size: 1rem;
2787  --ui-line-height: 1.7;
2788  --ui-letter-spacing: 0;
2789}
2790:dir(rtl) {
2791  --ui-line-height: auto;
2792  --ui-letter-spacing: 0;
2793}
2794`,mf=`.ui-menu *,
2795.ui-menu ::before,
2796.ui-menu ::after {
2797  box-sizing: border-box;
2798}
2799.ui-menu {
2800  display: none;
2801  color-scheme: light dark;
2802  -webkit-user-select: none;
2803  /* Important: Safari iOS doesn't respect user-select */
2804  user-select: none;
2805  cursor: default;
2806  -webkit-touch-callout: none;
2807  -webkit-tap-highlight-color: rgba(0 0 0 0);
2808  --active-label-color: #fff;
2809  /* ui-menu-text-active */
2810  --label-color: #121212;
2811  /* ui-menu-text */
2812  --menu-bg: #e2e2e2;
2813  /* ui-menu-background */
2814  --active-bg: #5898ff;
2815  /* ui-menu-background-active */
2816  --active-bg-dimmed: #c5c5c5;
2817  /* ui-menu-background-active-muted */
2818}
2819/** Use the :where pseudo selector to make the specificity of the
2820 * selector 0, so that it can be overridden by the user.
2821 */
2822:where(.ui-menu-container) {
2823  position: absolute;
2824  overflow: visible;
2825  width: auto;
2826  height: auto;
2827  z-index: 10000;
2828  border-radius: 8px;
2829  background: var(--ui-menu-bg);
2830  box-shadow: var(--ui-menu-shadow);
2831  list-style: none;
2832  padding: 6px 0 6px 0;
2833  margin: 0;
2834  user-select: none;
2835  cursor: default;
2836  color: var(--ui-menu-text);
2837  font-weight: normal;
2838  font-style: normal;
2839  text-shadow: none;
2840  text-transform: none;
2841  letter-spacing: 0;
2842  outline: none;
2843  opacity: 1;
2844  /* The [popover] elements have a 1px solid black border. Ugh. */
2845  border: none;
2846  width: fit-content;
2847  height: fit-content;
2848}
2849:where(.ui-menu-container > li) {
2850  display: flex;
2851  flex-flow: row;
2852  align-items: center;
2853  padding: 1px 7px 1px 7px;
2854  margin-top: 0;
2855  margin-left: 6px;
2856  margin-right: 6px;
2857  border-radius: 4px;
2858  white-space: nowrap;
2859  position: relative;
2860  outline: none;
2861  fill: currentColor;
2862  user-select: none;
2863  cursor: default;
2864  text-align: left;
2865  color: inherit;
2866  font-family: var(--ui-font-family);
2867  font-size: var(--ui-font-size);
2868  line-height: var(--ui-line-height);
2869  letter-spacing: var(--ui-letter-spacing);
2870}
2871:where(.ui-menu-container > li > .label) {
2872  display: flex;
2873  align-items: center;
2874  justify-content: space-between;
2875  appearance: none;
2876  background: none;
2877  outline: none;
2878  width: 100%;
2879  margin: 0;
2880  padding: 1px 2px 1px 1px;
2881  overflow: visible;
2882  border: 1px solid transparent;
2883  white-space: nowrap;
2884  text-align: start;
2885  align-content: center;
2886}
2887:where(.ui-menu-container > li:has(.heading)) {
2888  margin-top: 0.5em;
2889}
2890:where(.ui-menu-container > li > .label.heading) {
2891  font-weight: bold;
2892  opacity: 0.4;
2893}
2894:where(.ui-menu-container > li.indent > .label) {
2895  margin-inline-start: 12px;
2896}
2897:where(.ui-menu-container > li > .label.indent) {
2898  margin-inline-start: 12px;
2899}
2900:where(.ui-menu-container > li[role='divider']) {
2901  border-bottom: 1px solid var(--ui-menu-divider);
2902  border-radius: 0;
2903  padding: 0;
2904  margin-left: 15px;
2905  margin-right: 15px;
2906  padding-top: 5px;
2907  margin-bottom: 5px;
2908  width: calc(100% - 30px);
2909  /** 100% - (margin-left + margin-right) */
2910}
2911:where(.ui-menu-container > li[aria-disabled='true']) {
2912  opacity: 0.5;
2913}
2914:where(.ui-menu-container > li.active) {
2915  background: var(--ui-menu-bg-active);
2916  background: -apple-system-control-accent;
2917  color: var(--ui-menu-text-active);
2918}
2919:where(.ui-menu-container > li.active.is-submenu-open) {
2920  background: var(--ui-menu-bg-active-muted);
2921  color: inherit;
2922}
2923:where(.ui-menu-container > li[aria-haspopup='true'] > .label) {
2924  padding-inline-end: 0;
2925}
2926:where(.ui-menu-container > li[aria-haspopup='true'].active::after) {
2927  color: var(--ui-menu-text-active);
2928}
2929/** Keyboard shortcut */
2930:where(.ui-menu-container > li > kbd) {
2931  font-family: var(--ui-font-family);
2932  margin-inline-start: 12px;
2933  opacity: 0.4;
2934}
2935:where(.ui-menu-container > li.active > kbd) {
2936  opacity: 0.85;
2937}
2938.ui-trailing-chevron {
2939  display: flex;
2940  margin-inline-start: 24px;
2941  width: 10px;
2942  height: 10px;
2943  margin-bottom: 4px;
2944}
2945.ui-trailing-chevron:dir(rtl) {
2946  transform: scaleX(-1);
2947}
2948.ui-checkmark {
2949  display: flex;
2950  margin-inline-end: -11px;
2951  margin-inline-start: -4px;
2952  margin-top: 2px;
2953  width: 16px;
2954  height: 16px;
2955}
2956.ui-mixedmark {
2957  display: flex;
2958  margin-inline-end: -11px;
2959  margin-inline-start: -4px;
2960  margin-top: 2px;
2961  width: 16px;
2962  height: 16px;
2963}
2964`,_i;function Zt(e){let t="";switch(e){case"mathfield-element":t=`
2965    :host { display: inline-block; background-color: field; color: fieldtext; border-width: 1px; border-style: solid; border-color: #acacac; border-radius: 2px;}
2966    :host([hidden]) { display: none; }
2967    :host([disabled]), :host([disabled]:focus), :host([disabled]:focus-within) { outline: none; opacity:  .5; }
2968    :host(:focus), :host(:focus-within) {
2969      outline: Highlight auto 1px;    /* For Firefox */
2970      outline: -webkit-focus-ring-color auto 1px;
2971    }
2972    :host([readonly]:focus), :host([readonly]:focus-within),
2973    :host([read-only]:focus), :host([read-only]:focus-within) {
2974      outline: none;
2975    }`;break;case"core":t=sf;break;case"mathfield":t=lf;break;case"environment-popover":t=uf;break;case"suggestion-popover":t=cf;break;case"keystroke-caption":t=df;break;case"virtual-keyboard":t=hf;break;case"ui":t=pf;break;case"menu":t=mf;break}return t}function Mi(e){return _i||(_i={}),_i[e]||(_i[e]=new CSSStyleSheet,_i[e].replaceSync(Zt(e))),_i[e]}var Mt;function Dt(e){var t;try{if(!("adoptedStyleSheets"in document)){if(window.document.getElementById(`mathlive-style-${e}`))return;let i=window.document.createElement("style");i.id=`mathlive-style-${e}`,i.append(window.document.createTextNode(Zt(e))),window.document.head.appendChild(i);return}if(Mt||(Mt={}),((t=Mt[e])!=null?t:0)!==0)Mt[e]+=1;else{let i=Mi(e);document.adoptedStyleSheets=[...document.adoptedStyleSheets,i],Mt[e]=1}}catch(i){console.error("Error injecting stylesheet",e,i)}}function ii(e){if("adoptedStyleSheets"in document&&Mt!=null&&Mt[e]&&(Mt[e]-=1,Mt[e]<=0)){let t=_i[e];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(i=>i!==t)}}var mo=class rh extends w{constructor(t){var i;super(y(f({},t),{type:"accent",body:(i=t.body)!=null?i:void 0})),t.accentChar?this.accent=t.accentChar:this.svgAccent=t==null?void 0:t.svgAccent,this.skipBoundary=!0,this.captureSelection=!0}static fromJson(t){return new rh(t)}toJson(){return y(f({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(t){var i;let r=new H({parent:t,mathstyle:"cramp"},this.style),a=(i=w.createBox(r,this.body))!=null?i:new A("□",{style:this.style}),n=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(n=a.skew);let o=Math.min(a.height,St),l;if(this.svgAccent)l=Fn(this.svgAccent),o=r.metrics.bigOpSpacing1-o;else if(this.accent){let c=new A(this.accent,{fontFamily:"Main-Regular"});c.italic=0;let d=this.accent===8407||this.accent===8411||this.accent===8412?" ML__accent-combining-char":"";l=new A(c,{classes:"ML__accent-body"+d})}let s=(a.width-l.width)/2+a.left+2*n;l=new pe({shift:0,children:[{box:new A(a)},-o,{box:l,marginLeft:s,classes:["ML__center"]}]});let u=new A(l,{type:"lift"});return this.caret&&(u.caret=this.caret),this.bind(r,u.wrap(r)),this.attachSupsub(r,{base:u})}},fo={"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\lparen":"\\rparen","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},Zn=Object.fromEntries(Object.entries(fo).map(([e,t])=>[t,e]));function go(e){var t;return(t={"[":91,"]":93,"(":40,")":41,"\\mid":8739,"|":8739,"∣":8739,"∥":8741,"\\|":8739,"\\{":123,"\\}":125,"\\lbrace":123,"\\rbrace":125,"\\lparen":40,"\\rparen":41,"\\lbrack":91,"\\rbrack":93,"\\vert":8739,"\\lvert":8739,"\\mvert":8739,"\\rvert":8739,"\\Vert":8741,"\\lVert":8741,"\\mVert":8741,"\\rVert":8741,"\\parallel":8741,"\\shortparallel":8741,"\\langle":10216,"\\rangle":10217,"\\lfloor":8970,"\\rfloor":8971,"\\lceil":8968,"\\rceil":8969,"\\ulcorner":9484,"\\urcorner":9488,"\\llcorner":9492,"\\lrcorner":9496,"\\lgroup":10222,"\\rgroup":10223,"\\lmoustache":9136,"\\rmoustache":9137,"\\surd":8730}[e])!=null?t:e.codePointAt(0)}function ff(e,t,i,r){var a;let n=new A(go(e),{fontFamily:"Main-Regular",isSelected:r.isSelected,classes:"ML__small-delim "+((a=r.classes)!=null?a:"")}).wrap(t);return i&&n.setTop((1-t.scalingFactor)*et),n}function ah(e,t,i,r,a){var n,o;let l=new H({parent:r,mathstyle:"textstyle"},a==null?void 0:a.style),s=new A(go(e),{fontFamily:`Size${t}-Regular`,isSelected:a.isSelected,classes:((n=a.classes)!=null?n:"")+` ML__delim-size${t}`,type:(o=a.type)!=null?o:"ignore"}).wrap(l);return i&&s.setTop((1-l.scalingFactor)*et),s}function nh(e,t,i,r,a){var n;let o,l,s,u;o=s=u=go(e),l=null;
vendor: 15,342 bytes, line 2975
2975let c="Size1-Regular";e==="\\vert"||e==="\\lvert"||e==="\\rvert"||e==="\\mvert"||e==="\\mid"?s=o=u=8739:e==="\\Vert"||e==="\\lVert"||e==="\\rVert"||e==="\\mVert"||e==="\\|"?s=o=u=8741:e==="\\uparrow"?s=u=9168:e==="\\Uparrow"?s=u=8214:e==="\\downarrow"?o=s=9168:e==="\\Downarrow"?o=s=8214:e==="\\updownarrow"?(o=8593,s=9168,u=8595):e==="\\Updownarrow"?(o=8657,s=8214,u=8659):e==="["||e==="\\lbrack"?(o=9121,s=9122,u=9123,c="Size4-Regular"):e==="]"||e==="\\rbrack"?(o=9124,s=9125,u=9126,c="Size4-Regular"):e==="\\lfloor"||e==="⌊"?(s=o=9122,u=9123,c="Size4-Regular"):e==="\\lceil"||e==="⌈"?(o=9121,s=u=9122,c="Size4-Regular"):e==="\\rfloor"||e==="⌋"?(s=o=9125,u=9126,c="Size4-Regular"):e==="\\rceil"||e==="⌉"?(o=9124,s=u=9125,c="Size4-Regular"):e==="("||e==="\\lparen"?(o=9115,s=9116,u=9117,c="Size4-Regular"):e===")"||e==="\\rparen"?(o=9118,s=9119,u=9120,c="Size4-Regular"):e==="\\{"||e==="\\lbrace"?(o=9127,l=9128,u=9129,s=9130,c="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o=9131,l=9132,u=9133,s=9130,c="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(o=9127,u=9129,s=9130,c="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(o=9131,u=9133,s=9130,c="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(o=9127,u=9133,s=9130,c="Size4-Regular"):e==="\\rmoustache"||e==="⎱"?(o=9131,u=9129,s=9130,c="Size4-Regular"):e==="\\surd"?(o=57345,u=9143,s=57344,c="Size4-Regular"):e==="\\ulcorner"?(o=9484,s=u=32):e==="\\urcorner"?(o=9488,s=u=32):e==="\\llcorner"?(u=9492,s=o=32):e==="\\lrcorner"&&(o=9496,s=o=32);let d=sr(o,c),h=d.height+d.depth,p=sr(s,c),m=p.height+p.depth,g=sr(u,c),v=g.height+g.depth,b=0,x=1;if(l!==null){let $=sr(l,c);b=$.height+$.depth,x=2}let E=h+v+b,S=Math.max(0,Math.ceil((t-E)/(x*m))),M=E+S*x*m,C=et;i&&(C=C*r.scalingFactor);let B=M/2-C,D=[];D.push({box:new A(u,{fontFamily:c})}),D.push(-.008);let K=new A(s,{fontFamily:c});if(l===null)for(let $=0;$<S;$++)D.push({box:K});else{for(let $=0;$<S;$++)D.push({box:K});D.push(-.008),D.push({box:new A(l,{fontFamily:c})}),D.push(-.008);for(let $=0;$<S;$++)D.push({box:K})}D.push(-.008),D.push({box:new A(o,{fontFamily:c})});let Y="";c==="Size1-Regular"?Y=" delim-size1":c==="Size4-Regular"&&(Y=" delim-size4");let _=new pe({bottom:B,children:D},{classes:Y});return new A(_,y(f({},a??{}),{classes:((n=a==null?void 0:a.classes)!=null?n:"")+" ML__delim-mult"}))}var oh=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","⌊","⌋","⌈","⌉"]),gf=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","⟮","⟯","⎰","⎱"]),lh=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),bf=[0,1.2,1.8,2.4,3];function yf(e,t,i,r){return e===void 0||e==="."?$i(i,r.classes):(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),oh.has(e)||lh.has(e)?ah(e,t,!1,i,r):gf.has(e)?nh(e,bf[t],!1,i,r):null)}var vf=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],xf=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],_f=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];function wf(e){return e.type==="small"?"Main-Regular":e.type==="large"?"Size"+e.size+"-Regular":(e.type,"Size4-Regular")}function kf(e,t,i,r){let a={"-4":0,"-3":1,0:2}[r.mathstyle.sizeDelta];for(let n=a;n<i.length&&i[n].type!=="stack";n++){let o=sr(e,wf(i[n]));if(o.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let l=o.height+o.depth;if(i[n].type==="small"&&(i[n].mathstyle==="scriptscriptstyle"?l*=Math.max(zl[Math.max(1,r.size-2)],r.minFontScale):i[n].mathstyle==="scriptstyle"&&(l*=Math.max(zl[Math.max(1,r.size-1)],r.minFontScale))),l>t)return i[n]}return i[i.length-1]}function Yn(e,t,i,r,a,n){if(!t||t.length===0||t===".")return $i(a);t==="<"||t==="\\lt"?t="\\langle":(t===">"||t==="\\gt")&&(t="\\rangle");let o;lh.has(t)?o=vf:oh.has(t)?o=_f:o=xf;let l=kf(go(t),i,o,a),s=new H({parent:a,mathstyle:l.mathstyle},n==null?void 0:n.style);return l.type==="small"?ff(t,s,r,y(f({},n),{type:e})):l.type==="large"?ah(t,l.size,r,s,y(f({},n),{type:e})):(l.type,nh(t,i,r,s,y(f({},n),{type:e})))}function ca(e,t,i,r,a,n){if(t===".")return $i(a,n==null?void 0:n.classes);let o=et*a.scalingFactor,l=901,s=5/xr,u=Math.max(i-o,r+o),c=Math.max(u/500*l,2*u-s);return Yn(e,t,c,!0,a,n)}function $i(e,t){let i=new A(null,{classes:" ML__nulldelimiter "+(t??""),type:"ignore"});return i.width=e.getRegisterAsEm("nulldelimiterspace"),i.wrap(new H({parent:e,mathstyle:"textstyle"}))}var tt=class sh extends w{constructor(t){var i;super({type:"placeholder",command:"\\placeholder",mode:(i=t==null?void 0:t.mode)!=null?i:"math",style:t==null?void 0:t.style}),this.captureSelection=!0}static fromJson(t){return new sh(t)}toJson(){return super.toJson()}render(t){let i;return this.value=t.placeholderSymbol,typeof t.renderPlaceholder=="function"?i=t.renderPlaceholder(t):i=this.createBox(t),this.caret&&(i.classes+=" ML__placeholder-selected"),i}_serialize(t){return t.skipPlaceholders?"":"\\placeholder{}"}},uh=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],ql=["cases","dcases","rcases"],ch=["align","align*","aligned","gather","gather*","gathered","split"],Mf=["array","subequations","eqnarray"];function Sf(e){return ch.includes(e)||ql.includes(e)||ql.includes(e)||uh.includes(e)||Mf.includes(e)}function dh(e){return uh.includes(e)}function Cf(e){return ql.includes(e)}function Lf(e){return ch.includes(e)}function Df(e,t,i){let r=0;for(let u of i.columns)"align"in u&&(r+=1);r=Math.max(r,i.minColumns);let a=0,n=[];for(let u of t){a=Math.max(a,Math.min(u.length,r));let c=0;for(;c<u.length;){let d=[],h=Math.min(u.length,c+r);for(;c<h;)d.push(Af(u[c],e.mode)),c+=1;if(d.length<i.minColumns)for(;d.length<i.minColumns;)d.push([new w({type:"first",mode:e.mode})]);n.push(d)}}!e.isMultiline&&n.length>0&&n[n.length-1].length===1&&Tf(n[n.length-1][0])&&n.pop();let o=[];for(let u of n){if(u.length!==a)for(let c=u.length;c<a;c++)e.isMultiline?u.push([new w({type:"first",mode:e.mode})]):u.push([new w({type:"first",mode:e.mode}),new tt]);o.push(u)}let l=0,s=0;for(let u of o){s=0;for(let c of u){for(let d of c)d.parent=e,d.parentBranch=[l,s];s+=1}l+=1}return e.isDirty=!0,o}function Ef(e){return e.length>0&&e.every(t=>t.type==="first")}function Bf(e,t,i){let r=new A(null,{classes:"ML__empty-line-anchor"}),a=e[0];a&&(a.id||(a.id=t.makeID()),r.atomID=a.id),r.setStyle("display","inline-block"),r.setStyle("width",0),r.setStyle("position","relative"),r.setStyle("height",Math.max(0,i.height+i.depth),"em"),r.setStyle("vertical-align",-i.depth,"em"),r.height=i.height,r.depth=i.depth;let n=e.find(o=>o.caret);return n!=null&&n.caret&&(r.caret=n.caret),e.some(o=>o.isSelected)&&r.selected(!0),r}function Af(e,t){return e.length===0?[new w({type:"first",mode:t})]:e[0].type!=="first"?[new w({type:"first",mode:t}),...e]:(e.slice(1).some(i=>i.type==="first"),e)}function Tf(e){return e.length===1&&e[0].type==="first"}var q=class hh extends w{get isMultiline(){let t=this.environmentName;return["lines","multline","multline*","align","split","gather","gathered"].includes(t)}constructor(t,i,r,a={}){var n,o,l,s;if(super({type:"array",isRoot:a.isRoot}),this.environmentName=t,a.columns)a.columns.length===0?this.colFormat=[{align:"l"}]:this.colFormat=[...a.columns];else if(a.minColumns){let u=[];for(let c=0;c<a.minColumns;c++)u.push({align:"l"});this.colFormat=u}else this.colFormat=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}];this.minColumns=(n=a.minColumns)!=null?n:1,this.minRows=(o=a.minRows)!=null?o:1,this.maxRows=(l=a.maxRows)!=null?l:1/0,this._rows=Df(this,i,{columns:this.colFormat,minColumns:this.minColumns,minRows:this.minRows,maxRows:this.maxRows}),this.rowGaps=r,a.arraycolsep!==void 0&&(this.arraycolsep=a.arraycolsep),this.colSeparationType=a.colSeparationType,a.arraystretch!==void 0&&(this.arraystretch=a.arraystretch),a.mathstyleName&&(this.mathstyleName=a.mathstyleName),a.leftDelim&&(this.leftDelim=a.leftDelim),a.rightDelim&&(this.rightDelim=a.rightDelim),this.classes=(s=a.classes)!=null?s:[]}static fromJson(t){return new hh(t.environmentName,t.array,t.rowGaps,t)}toJson(){let t=y(f({},super.toJson()),{environmentName:this.environmentName,array:this._rows.map(i=>i.map(r=>r.map(a=>a.toJson()))),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType,minColumns:this.minColumns,minRows:this.minRows,maxRows:this.maxRows});return this.arraystretch!==void 0&&(t.arraystretch=this.arraystretch),this.arraycolsep!==void 0&&(t.arraycolsep=this.arraycolsep),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),this.isRoot&&(t.isRoot=!0),t.minColumns=this.minColumns,t.minRows=this.minRows,t.maxRows=this.maxRows,this.mathstyleName&&(t.mathstyleName=this.mathstyleName),this.classes.length>0&&(t.classes=this.classes),t}branch(t){var i;if(Lt(t))return(i=this._rows[t[0]][t[1]])!=null?i:void 0}createBranch(t){var i;return Lt(t)?(this.isDirty=!0,(i=this.branch(t))!=null?i:[]):[]}get rowCount(){return this._rows.length}get colCount(){return this._rows[0].length}get maxColumns(){return this.colFormat.filter(t=>!!t.align).length}removeBranch(t){if(xi(t))return super.removeBranch(t);let[i,...r]=this.branch(t);return i.type,this._rows[t[0]][t[1]]=void 0,r.forEach(a=>{a.parent=void 0,a.parentBranch=void 0}),this.isDirty=!0,r}get hasChildren(){return this.children.length>0}get children(){let t=[];for(let i of this._rows)for(let r of i)if(r)for(let a of r)t.push(...a.children),t.push(a);return[...t,...super.children]}render(t){var i,r,a,n,o,l;let s=new H({parent:t,mathstyle:this.mathstyleName},this.style),u=s.getRegisterAsEm("arrayrulewidth"),c=s.getRegisterAsEm("arraycolsep"),d=s.getRegisterAsEm("doublerulesep"),h=(r=(i=this.arraystretch)!=null?i:s.getRegisterAsNumber("arraystretch"))!=null?r:1,p=typeof this.arraycolsep=="number"?this.arraycolsep:c;this.colSeparationType==="small"&&(p=.2778*(new H({parent:t,mathstyle:"scriptstyle"}).scalingFactor/t.scalingFactor));let m=h*Cm,g=.7*m,v=.3*m,b=0,x=[],E=0,S=this._rows.length;for(let V=0;V<S;++V){let ee=this._rows[V];E=Math.max(E,ee.length);let le=new H({parent:s,mathstyle:this.mathstyleName},this.style),me=g/le.scalingFactor,pt=v/le.scalingFactor,ae={cells:[],height:0,depth:0,pos:0};for(let oi of ee){let At=this.isMultiline&&oi&&Ef(oi)?Bf(oi,le,{height:g/le.scalingFactor,depth:v/le.scalingFactor}):(a=w.createBox(le,oi,{type:"ignore"}))!=null?a:new A(null,{type:"ignore"});pt=Math.max(pt,At.depth),me=Math.max(me,At.height),ae.cells.push(At)}let ge=(n=W0(this.rowGaps[V]))!=null?n:0;ge>0&&(ge+=v,pt=Math.max(pt,ge),ge=0),V<S-1&&!dh(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(pt+=s.getRegisterAsEm("jot")),ae.height=me,ae.depth=pt,b+=me,ae.pos=b,b+=pt+ge,x.push(ae)}let M=this.environmentName==="array"&&!this.isMultiline?x[0].height:b/2+et,C=[];for(let V=0;V<E;V++){let ee=[];for(let le of x){let me=le.cells[V];me&&(me.depth=le.depth,me.height=le.height,ee.push({box:me,shift:le.pos-M}))}ee.length>0&&C.push(new pe({individualShift:ee}))}let B=[],D=!1,K=!1,Y=0,_=!this.leftDelim,{colFormat:$}=this;for(let V of $){if("align"in V&&Y>=C.length)break;if("align"in V)D?B.push(mn(2*p)):(K||_)&&B.push(mn(p)),B.push(new A(C[Y],{classes:"col-align-"+V.align})),Y++,D=!0,K=!1,_=!1;else if("gap"in V){if(typeof V.gap=="number")B.push(mn(V.gap));else{let ee=Ff(t,x,M,V.gap);ee&&B.push(ee)}D=!1,K=!1,_=!1}else if("separator"in V){let ee=new A(null,{classes:"ML__vertical-separator"});ee.height=b,ee.setStyle("height",b,"em"),ee.setStyle("border-right",`${u}em ${V.separator} currentColor`),ee.setStyle("vertical-align",-(b-M),"em");let le=0;K?le=d-u:D&&(le=p-u),ee.left=le,B.push(ee),D=!1,K=!0,_=!1}}D&&!this.rightDelim&&B.push(mn(p));let W=new A(B,{classes:["ML__mtable",...this.classes].join(" ")});if(this.environmentName==="array"&&!this.isMultiline&&(W.height=x[0].height,W.depth=b-x[0].height),(!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(W.caret=this.caret),this.bind(t,W);let z=W.height,N=W.depth,j=this.bind(t,new A([this.bind(t,ca("open",(o=this.leftDelim)!=null?o:".",z,N,s,{isSelected:this.isSelected})),W,this.bind(t,ca("close",(l=this.rightDelim)!=null?l:".",z,N,s,{isSelected:this.isSelected}))],{type:"ord"}));return j?(j.setStyle("display","inline-block"),this.caret&&(j.caret=this.caret),this.bind(t,this.attachSupsub(t,{base:j}))):null}_serialize(t){var i;let r=[];if(this.environmentName==="lines"&&this._rows.length>1?r.push("\\displaylines{"):this.environmentName!=="lines"&&r.push(`\\begin{${this.environmentName}}`),this.environmentName==="array"){if(r.push("{"),this.colFormat!==void 0)for(let a of this.colFormat)"align"in a&&typeof a.align=="string"?r.push(a.align):"separator"in a&&a.separator==="solid"?r.push("|"):"separator"in a&&a.separator==="dashed"&&r.push(":");r.push("}")}for(let a=0;a<this._rows.length;a++){for(let n=0;n<this._rows[a].length;n++)n>0&&r.push(" & "),r.push(w.serialize(this._rows[a][n],t));if(a<this._rows.length-1){let n=this.rowGaps[a];n!=null&&n.dimension?r.push(`\\\\[${n.dimension} ${(i=n.unit)!=null?i:"pt"}] `):r.push("\\\\ ")}}return this.environmentName==="lines"&&this._rows.length>1?r.push("}"):this.environmentName!=="lines"&&r.push(`\\end{${this.environmentName}}`),R(r)}forEachCell(t){for(let i=0;i<this.rowCount;i++)for(let r=0;r<this.colCount;r++)t(this._rows[i][r],i,r)}getCell(t,i){var r;return(r=this._rows[t])==null?void 0:r[i]}setCell(t,i,r){this.type==="array"&&Array.isArray(this._rows)&&this._rows[t][i];for(let n of this._rows[t][i])n.parent=void 0,n.parentBranch=void 0;let a=[new w({type:"first",mode:this.mode}),...r.filter(n=>n.type!=="first")];this._rows[t][i]=a,fi(this),this.isDirty=!0}addRowBefore(t){this.type==="array"&&Array.isArray(this._rows),this._rows.splice(t,0,Array.from({length:this.colCount},()=>pn(this,!this.isMultiline))),fi(this),this.isDirty=!0}addRowAfter(t){this.type==="array"&&Array.isArray(this._rows),this._rows.splice(t+1,0,Array.from({length:this.colCount},()=>pn(this,!this.isMultiline))),fi(this),this.isDirty=!0}removeRow(t){this.type==="array"&&Array.isArray(this._rows)&&this.rowCount>t;let i=this._rows.splice(t,1);for(let r of i)for(let a of r)if(a)for(let n of a)n.parent=void 0,n.parentBranch=void 0;fi(this),this.isDirty=!0}addColumnBefore(t){this.type==="array"&&Array.isArray(this._rows);for(let i of this._rows)i.splice(t,0,pn(this));fi(this),this.isDirty=!0}addColumnAfter(t){this.type==="array"&&Array.isArray(this._rows);for(let i of this._rows)i.splice(t+1,0,pn(this));fi(this),this.isDirty=!0}addColumn(){this.addColumnAfter(this.colCount-1)}
vendor: 4,251 bytes, line 2975
2975removeColumn(t){this.type==="array"&&Array.isArray(this._rows)&&this.colCount>t;for(let i of this._rows){let r=i.splice(t,1);for(let a of r)if(a)for(let n of a)n.parent=void 0,n.parentBranch=void 0}fi(this),this.isDirty=!0}get cells(){let t=[];for(let i of this._rows)for(let r of i)r&&t.push(r.filter(a=>a.type!=="first"));return t}get rows(){return this._rows}};function pn(e,t=!1){let i=new w({type:"first",mode:e.mode});i.parent=e;let r=[i];if(t){let a=new tt;a.parent=e,r.push(a)}return r}function fi(e){for(let t=0;t<e.rowCount;t++)for(let i=0;i<e.colCount;i++){let r=e.getCell(t,i);if(r)for(let a of r)a&&(a.parent=e,a.parentBranch=[t,i])}}function mn(e){let t=new A(null,{classes:"ML__arraycolsep"});return t.width=e,t}function Ff(e,t,i,r){if(!r)return null;let a=[];for(let n of t){let o=w.createBox(e,r,{type:"ignore"});o&&(o.depth=n.depth,o.height=n.height,a.push({box:o,shift:n.pos-i}))}return new pe({individualShift:a}).wrap(e)}var ri=class ph extends w{constructor(t){super({mode:t.mode,command:t.command,style:t.style,body:t.body,type:"box"}),this.framecolor=t.framecolor,this.backgroundcolor=t.backgroundcolor,this.padding=t.padding,this.offset=t.offset,this.border=t.border}static fromJson(t){return new ph(t)}toJson(){return y(f({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(t){var i,r,a,n;let o=w.createBox(t,this.body,{type:"lift"});if(!o)return null;let l=t.toEm((i=this.offset)!=null?i:{dimension:0});o.depth+=l,o.setStyle("display","inline-block"),o.setStyle("position","relative"),o.setStyle("height",Math.floor(100*o.height+o.depth)/100,"em"),o.setStyle("vertical-align",-Math.floor(100*o.height)/100,"em");let s=new H({parent:t},this.style),u=s.toEm((r=this.padding)!=null?r:{register:"fboxsep"}),c=new A(null,{classes:"ML__box"});c.height=o.height+u,c.depth=o.depth+u,c.setStyle("box-sizing","border-box"),c.setStyle("position","absolute"),c.setStyle("top",-u+.3,"em"),c.setStyle("left",0),c.setStyle("height",c.height+c.depth,"em"),c.setStyle("width","100%"),this.backgroundcolor&&c.setStyle("background-color",(a=s.toBackgroundColor(this.backgroundcolor))!=null?a:"transparent"),this.framecolor&&c.setStyle("border",`${s.getRegisterAsEm("fboxrule",2)}em solid ${(n=s.toColor(this.framecolor))!=null?n:"black"}`),this.border&&c.setStyle("border",this.border);let d=new A([c,o],{type:"lift"});return d.setStyle("display","inline-block"),d.setStyle("position","relative"),d.setStyle("line-height",0),d.height=o.height+u+(l>0?l:0),d.depth=o.depth+u+(l<0?-l:0),d.setStyle("padding-left",u,"em"),d.setStyle("padding-right",u,"em"),d.setStyle("height",Math.floor(100*(o.height+o.depth+2*u+Math.abs(l)))/100,"em"),d.setStyle("margin-top",-u,"em"),d.setStyle("top",Math.floor(100*(o.depth-o.height+2*u-l))/100,"em"),d.setStyle("vertical-align",Math.floor(100*(o.depth+2*u))/100,"em"),this.caret&&(d.caret=this.caret),this.attachSupsub(t,{base:d})}_serialize(t){return t.skipStyles?R([this.bodyToLatex(t),this.supsubToLatex(t)]):super._serialize(t)}},mh=class fh extends w{constructor(t,i){var r;super({type:"composition",mode:(r=i==null?void 0:i.mode)!=null?r:"math",value:t})}static fromJson(t){return new fh(t.value,t)}toJson(){return super.toJson()}render(t){let i=new A(this.value,{classes:"ML__composition",type:"composition"});return this.bind(t,i),this.caret&&(i.caret=this.caret),i}_serialize(t){return""}},wi=class gh extends w{constructor(t){super({type:"error",value:t,command:t,mode:"math"}),this.verbatimLatex=t}static fromJson(t){return new gh(t.command)}toJson(){return super.toJson()}render(t){let i=this.createBox(t,{classes:"ML__error"});return this.caret&&(i.caret=this.caret),i}},bh=class yh extends w{constructor(t,i){super({type:"group",mode:i}),this.body=t,this.boxType=t.length>1?"ord":"ignore",this.skipBoundary=!0,this.displayContainsHighlight=!1,(t==null?void 0:t.length)===1&&t[0].command===","&&(this.captureSelection=!0)}static fromJson(t){return new yh(t.body,t.mode)}render(t){let i=w.createBox(t,this.body,{type:this.boxType});return i?(this.caret&&(i.caret=this.caret),this.bind(t,i)):null}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="str
2975ing")return this.verbatimLatex;let i=ye(this.command,this.mode);return i!=null&&i.serialize?i.serialize(this,t):`{${this.bodyToLatex(t)}}`}},ue=class vh extends w{constructor(t,i,r){super({type:"leftright",style:r.style,displayContainsHighlight:!0}),this.variant=t,this.body=i,this.leftDelim=r.leftDelim,this.rightDelim=r.rightDelim}static fromJson(t){var i;return new vh((i=t.variant)!=null?i:"",t.body,t)}toJson(){let t=super.toJson();return this.variant&&(t.variant=this.variant),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),t}_serialize(t){var i,r;let a=this.matchingRightDelim();return this.variant==="left...right"?R(["\\left",(i=this.leftDelim)!=null?i:".",this.bodyToLatex(t),"\\right",a]):this.variant==="mleft...mright"?R(["\\mleft",(r=this.leftDelim)!=null?r:".",this.bodyToLatex(t),"\\mright",a]):R([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(t),a])}matchingRightDelim(){var t,i;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;let r=(t=this.leftDelim)!=null?t:".";return(i=fo[r])!=null?i:r}render(t){var i,r;let a=new H({parent:t},this.style);this.body;let n=new H({parent:t,mathstyle:"textstyle"},this.style),o=(i=w.createBox(a,this.body,{type:"inner"}))!=null?i:new A(null,{type:"inner"}),l=o.height/n.scalingFactor,s=o.depth/n.scalingFactor,u=[];if(this.leftDelim&&u.push(this.bind(n,ca("open",this.leftDelim,l,s,n,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),o&&(xh(o.children,this,a,l,s),u.push(o)),this.rightDelim){let p=this.containsCaret?" ML__contains-caret":"",m=this.rightDelim;m==="?"&&(a.smartFence?(m=this.matchingRightDelim(),p+=" ML__smart-fence__close"):m="."),u.push(this.bind(n,ca("close",m,l,s,n,{isSelected:this.isSelected,classes:p+" ML__close",mode:this.mode,style:this.style})))}let c=this.variant==="mleft...mright",d=this.leftSibling;d&&(!c&&d.isFunction&&(c=!0),!c&&d.type==="subsup"&&(r=d.leftSibling)!=null&&r.isFunction&&(c=!0));let h=new A(u,{type:c?"close":"inner",classes:"ML__left-right"});return h.setStyle("margin-top",`${-o.depth}em`),h.setStyle("height",`${o.height+o.depth}em`),this.caret&&(h.caret=this.caret),this.bind(a,h.wrap(a))}};function xh(e,t,i,r,a){if(e)for(let n=0;n<e.length;n++){let o=e[n];o.type==="middle"?(e[n]=t.bind(i,ca("inner",o.value,r,a,i,{isSelected:t.isSelected})),e[n].caret=o.caret,e[n].isSelected=o.isSelected,e[n].cssId=o.cssId,e[n].htmlData=o.htmlData,e[n].htmlStyle=o.htmlStyle,e[n].attributes=o.attributes,e[n].cssProperties=o.cssProperties):o.children&&xh(o.children,t,i,r,a)}}var _h=class wh extends w{constructor(t,i){var r;super({type:"macro",command:t,style:i.style}),this.body=i.body,i.captureSelection===void 0?i.args?this.captureSelection=!1:this.captureSelection=!0:this.captureSelection=i.captureSelection,this.macroArgs=i.args,this.expand=(r=i.expand)!=null?r:!1}static fromJson(t){return new wh(t.command,t)}toJson(){let t=super.toJson();return this.expand&&(t.expand=!0),this.captureSelection!==void 0&&(t.captureSelection=this.captureSelection),this.macroArgs&&(t.args=this.macroArgs),t}_serialize(t){var i;return t.expandMacro&&this.expand?this.bodyToLatex(t):this.command+((i=this.macroArgs)!=null?i:"")}
2975applyStyle(t,i){let r={};t.color&&(r.color=t.color),t.backgroundColor&&(r.backgroundColor=t.backgroundColor),super.applyStyle(r,i)}render(t){let i=w.createBox(t,this.body,{type:"lift"});return i?(this.caret&&(i.caret=this.caret),this.bind(t,i)):null}},zf=class kh extends w{constructor(){super({type:"macro-argument"})}static fromJson(t){return new kh}toJson(){return super.toJson()}_serialize(t){return""}render(t){return null}},Mh=class Sh extends w{constructor(t,i,r=!1,a,n){var o;super({type:"prompt",mode:(o=n==null?void 0:n.mode)!=null?o:"math",style:n==null?void 0:n.style,command:"\\placeholder"}),this.body=a,this.correctness=i,this.placeholderId=t,this.locked=r,this.captureSelection=this.locked}static fromJson(t){return new Sh(t.placeholderId,t.correctness,t.locked,t.body,t)}toJson(){let t=super.toJson();return this.placeholderId&&(t.placeholderId=this.placeholderId),this.body||delete t.body,this.body&&(t.body=this.body.filter(i=>i.type!=="first").map(i=>i.toJson())),this.correctness&&(t.correctness=this.correctness),t.locked=this.locked,t}render(t){var i,r;let a=new H({parent:t}),n=a.getRegisterAsEm("fboxsep"),o=n,l=n,s=w.createBox(t,this.body);if(!s)return null;let u=!this.body||this.body.length===0||this.body.every(B=>B.type==="first"),c=u?new tt({mode:this.mode,style:this.style}).render(new H({parent:t,isPhantom:!0})):null,d=(i=c==null?void 0:c.height)!=null?i:a.metrics.xHeight,h=(r=c==null?void 0:c.depth)!=null?r:d/2;s.height||(s.height=u?d:a.metrics.xHeight),s.depth||(s.depth=u?h:a.metrics.defaultRuleThickness);let p=u?h-d:s.depth-s.height;s.setStyle("vertical-align",p,"em"),this.correctness==="correct"?s.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&s.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");let m=new A(s,{type:"ord"});m.height=s.height,m.depth=s.depth,m.setStyle("display","inline-block"),m.setStyle("height",s.height+s.depth,"em"),m.setStyle("vertical-align",-l,"em"),m.setStyle("position","relative"),m.setStyle("z-index",1);let g="ML__prompt ";this.locked?g+=" ML__lockedPromptBox ":g+=" ML__editablePromptBox ",this.correctness==="correct"?g+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(g+=" ML__incorrectPromptBox "),this.containsCaret&&(g+=" ML__focusedPromptBox ");let v=new A(null,{classes:g,attributes:{part:"prompt"}});v.height=m.height+l,v.depth=m.depth+l,v.width=m.width+2*o,v.setStyle("position","absolute"),v.setStyle("z-index",0),v.setStyle("display","block"),v.setStyle("pointer-events","auto");let b=m.height+m.depth+2*l;v.setStyle("height",Math.max(b,.6),"em");let x=m.width+2*o;u&&(x=Math.max(x,3*o||.8)),v.setStyle("width",Math.max(x,.6),"em"),v.setStyle("top",n+l,"em"),u?v.setStyle("left",-1.5*o,"em"):o!==0&&v.setStyle("left",-o,"em");let E="";this.correctness==="incorrect"&&(E+='<line x1="3%"  y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),E&&(v.svgOverlay=E);let S=new A([v,m],{classes:"ML__prompt-atom"});m.setStyle("line-height",1),S.setStyle("position","relative"),S.setStyle("display","inline-block"),S.setStyle("line-height",0),S.height=m.height+l+.2,S.depth=m.depth+l,S.left=o,S.right=o,S.setStyle("height",m.height+2*l,"em"),S.setStyle("top",m.depth-m.height-l/2,"em"),S.setStyle("vertical-align",m.depth+l/2,"em"),S.setStyle("margin-left",.5,"em"),S.setStyle("margin-right",.5,"em"),this.caret&&(S.caret=this.caret);let M=this.attachSupsub(t,{base:S}),C=this.bind(a,M);return C&&this.id&&(v.atomID=this.id,m.atomID=this.id,S.atomID=this.id),C}_serialize(t){var i;let r=(i=this.bodyToLatex(t))!=null?i:"";if(t.skipPlaceholders)return r;let a="\\placeholder";return this.placeholderId&&(a+=`[${this.placeholderId}]`),this.correctness==="correct"?a+="[correct]":this.correctness==="incorrect"&&(a+="[incorrect]"),this.locked&&(a+="[locked]"),Q(a,r)}},bo=class Ch extends w{constructor(t){super({type:"subsup",style:t==null?void 0:t.style}),this.subsupPlacement="auto"}get children(){if(!this._children){let t=[],i=this.branch("subscript");
vendor: 6,571 bytes, line 2975
2975if(i)for(let a of i)t.push(...a.children),t.push(a);let r=this.branch("superscript");if(r)for(let a of r)t.push(...a.children),t.push(a);this._children=t}return this._children}static fromJson(t){let i=new Ch(t);for(let r of _r)t[r]&&i.setChildren(t[r],r);return i}render(t){var i;let r=new H({parent:t,isPhantom:!0}),a=this.leftSibling,n=(i=a.render(r))!=null?i:new A(null),o=new A(null);return o.height=n.height,o.depth=n.depth,this.attachSupsub(t,{base:o,isCharacterBox:a.isCharacterBox(),type:"ignore"})}_serialize(t){return this.supsubToLatex(t)}};function Qi(e){return e?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(e):!1}var Lh=class{constructor(e,t,i){this.errors=[],this.index=0,this.endCount=0;var r,a,n,o;i!=null||(i={}),this.tokens=e,this.context=t instanceof H&&!(i!=null&&i.parseMode)&&!i.mathstyle?t:new H({from:t,mathstyle:i.mathstyle},i.style),this.args=(r=i.args)!=null?r:void 0,this.smartFence=this.context.smartFence,this.parsingContext={parent:void 0,mathlist:[],style:(a=i.style)!=null?a:{},parseMode:(n=i.parseMode)!=null?n:"math",mathstyle:(o=i.mathstyle)!=null?o:"displaystyle",tabular:!1}}beginContext(e){var t,i,r,a,n,o;if(e!=null&&e.root){this.parsingContext={parent:this.parsingContext.parent,mathlist:[],style:{},parseMode:(t=e==null?void 0:e.mode)!=null?t:"math",mathstyle:(i=e==null?void 0:e.mathstyle)!=null?i:"displaystyle",tabular:(r=e==null?void 0:e.tabular)!=null?r:!1};return}let l=this.parsingContext,s={parent:l,mathlist:[],style:f({},l.style),parseMode:(a=e==null?void 0:e.mode)!=null?a:l.parseMode,mathstyle:(n=e==null?void 0:e.mathstyle)!=null?n:l.mathstyle,tabular:(o=e==null?void 0:e.tabular)!=null?o:!1};this.parsingContext=s}endContext(){this.parsingContext=this.parsingContext.parent}onError(e){this.errors.push(f({before:pi(this.tokens.slice(this.index,this.index+10)),after:pi(this.tokens.slice(Math.max(0,this.index-10),this.index))},e))}get mathlist(){return this.parsingContext.mathlist}set mathlist(e){this.parsingContext.mathlist=e}get parseMode(){return this.parsingContext.parseMode}set parseMode(e){this.parsingContext.parseMode=e}get tabularMode(){return this.parsingContext.tabular}get style(){let e=this.parsingContext;for(;e;){if(e.style)return f({},e.style);e=e.parent}return{}}set style(e){this.parsingContext.style=e}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}next(){this.index+=1}get(){return this.endCount=0,this.index<this.tokens.length?this.tokens[this.index++]:""}peek(){return this.tokens[this.index]}expandUnicode(){if(!this.peek()||this.parseMode!=="math")return;let e=gm(this.peek());e&&this.tokens.splice(this.index,1,...sa(e))}match(e){return this.tokens[this.index]===e?(this.index++,!0):!1}lastSubsupAtom(){let e;return this.mathlist.length>0&&(e=this.mathlist[this.mathlist.length-1],e.type==="subsup"||e.subsupPlacement!==void 0)||(e=new bo({style:this.style}),this.mathlist.push(e)),e}hasPattern(e){return e.test(this.tokens[this.index])}hasInfixCommand(){var e;let{index:t}=this;if(t<this.tokens.length&&this.tokens[t].startsWith("\\")){let i=ye(this.tokens[t],this.parseMode);return!i||i.definitionType==="symbol"||i.ifMode&&!i.ifMode.includes(this.parseMode)?!1:(e=i.infix)!=null?e:!1}return!1}matchColumnSeparator(){return!this.tabularMode||this.peek()!=="&"?!1:(this.index++,!0)}matchRowSeparator(){if(!this.tabularMode)return!1;let e=this.peek();return e!=="\\\\"&&e!=="\\cr"&&e!=="\\tabularnewline"?!1:(this.index++,!0)}placeholder(){var e;let t=(e=this.args)==null?void 0:e.call(this,"?");return t?De(t,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new tt({mode:this.parseMode,style:this.style})]}skipWhitespace(){for(;this.match("<space>"););}skipUntilToken(e){let t=this.tokens[this.index];for(;t&&t!==e;)t=this.tokens[++this.index];t===e&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}matchKeyword(e){let t=this.index,i=this.end(),r="";for(;!i;){let n=this.get();Qi(n)?(r+=n,i=this.end()||r.length>=e.length):i=!0}let a=e.toUpperCase()===r.toUpperCase();return a||(this.index=t),a}scanString(){let e="";for(;!this.end();){let t=this.peek();if(t==="]")return e;if(t==="<space>")e+=" ";else if(t.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),e+=t.substring(1);else if(Qi(t))e+=t;else return e;this.next()}return e}scanBalancedString(){let e="",t=this.end(),i=1;for(;!t;){let r=this.get();r==="<space>"?e+=" ":r==="<{>"?(e+="{",i+=1):r==="<}>"?(i-=1,i>0?e+="}":this.index-=1):r==="<$>"?e+="$":r==="<$$>"?e+="$$":e+=r,t=i===0||this.end()}return e}scanLiteralGroup(){var e;if(!this.match("<{>"))return"";let t="",i=1;for(;i>0&&!this.end();){let r=this.get();r==="<}>"?(i-=1,i>0&&(t+="}")):r==="<{>"?(i+=1,t+="{"):(/\\[a-zA-Z]+$/.test(t)&&/^[a-zA-Z]/.test(r)&&(t+=" "),t+=(e={"<space>":" ","<$$>":"$$","<$>":"$"}[r])!=null?e:r)}return t}scanNumber(e=!0){var t,i;let r=!1,a=this.peek();for(;a==="<space>"||a==="+"||a==="-";)this.get(),a==="-"&&(r=!r),a=this.peek();e=!!e;let n=10,o=/\d/;if(this.match("'"))n=8,o=/[0-7]/,e=!0;else if(this.match('"'))n=16,o=/[\dA-F]/,e=!0;else if(this.match("x"))n=16,o=/[\dA-Fa-f]/,e=!0;else if(this.match("`"))return a=this.get(),a?a.length===2&&a.startsWith("\\")?{number:(r?-1:1)*((t=a.codePointAt(1))!=null?t:0),base:"alpha"}:{number:(r?-1:1)*((i=a.codePointAt(0))!=null?i:0),base:"alpha"}:null;let l="";for(;this.hasPattern(o);)l+=this.get();if(!e&&(this.match(".")||this.match(",")))for(l+=".";this.hasPattern(o);)l+=this.get();let s=e?Number.parseInt(l,n):Number.parseFloat(l);return Number.isNaN(s)?null:{number:r?-s:s,base:n===16?"hexadecimal":n===8?"octal":"decimal"}}scanRegister(){var e;let t=this.index,i=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return i;let r=!1;if(i===null)for(;;){let n=this.peek();if(n==="-")r=!r;else if(n!=="+")break;this.next(),this.skipWhitespace()}if(this.match("\\global")){this.skipWhitespace();let n=this.get();return n.startsWith("\\")?i?{register:n,global:!0,factor:(r?-1:1)*i.number}:r?{register:n,global:!0,factor:-1}:{register:n,global:!0}:(this.index=t,null)}let a=this.get();return a!=null&&a.startsWith("\\")?(a=a.substring(1),this.context.registers[a]?!r||i!==null?{register:a,factor:(r?-1:1)*((e=i==null?void 0:i.number)!=null?e:1)}:{register:a}:(this.index=t,null)):(this.index=t,null)}scanValue(){let e=this.scanRegister();if(e)return e;let t=this.index,i=this.scanGlueOrDimen();if(i&&("unit"in i||"glue"in i&&"unit"in i.glue))return i;this.index=t;let r=this.scanNumber();if(r)return r;if(this.end()||!Qi(this.peek()))return null;let a=this.scanString();return a.length>
vendor: 20,015 bytes, line 2975
29750?{string:a}:null}scanDimen(){let e=this.scanNumber(!1);if(e===null)return null;let t=e.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();let i;return this.matchKeyword("pt")?i="pt":this.matchKeyword("mm")?i="mm":this.matchKeyword("cm")?i="cm":this.matchKeyword("ex")?i="ex":this.matchKeyword("px")?i="px":this.matchKeyword("em")?i="em":this.matchKeyword("bp")?i="bp":this.matchKeyword("dd")?i="dd":this.matchKeyword("pc")?i="pc":this.matchKeyword("in")?i="in":this.matchKeyword("mu")&&(i="mu"),i?{dimension:t,unit:i}:{dimension:t}}scanGlueOrDimen(){let e=this.scanDimen();if(e===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return e;let t={glue:e};if(this.matchKeyword("plus")){let i=this.scanDimen();if(i)t.grow=i;else return t}if(this.skipWhitespace(),this.match("\\relax"))return t;if(this.skipWhitespace(),this.matchKeyword("minus")){let i=this.scanDimen();if(i)t.shrink=i;else return t}return!t.grow&&!t.shrink?e:t}scanColspec(){this.skipWhitespace();let e=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){let t=this.get();t==="c"||t==="r"||t==="l"?e.push({align:t}):t==="|"?e.push({separator:"solid"}):t===":"?e.push({separator:"dashed"}):t==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),e.push({gap:this.scan(i=>i==="<}>")}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}))}return e}scanModeSet(){let e;if(this.match("\\(")&&(e="textstyle"),!e&&this.match("\\[")&&(e="displaystyle"),!e)return null;this.beginContext({mode:"math",mathstyle:e});let t=this.scan(i=>i===(e==="displaystyle"?"\\]":"\\)"));return this.match(e==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t}scanModeShift(){let e="";if(this.match("<$>")&&(e="<$>"),!e&&this.match("<$$>")&&(e="<$$>"),!e)return null;this.beginContext({mode:"math",mathstyle:e==="<$>"?"textstyle":"displaystyle"});let t=this.scan(i=>i===e);return this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t}scanEnvironment(){if(!this.match("\\begin"))return null;let e=this.scanArgument("string");if(!e)return null;let t=wm(e);if(!t)return this.onError({code:"unknown-environment",arg:e}),null;let i=[];if(t.params)for(let l of t.params)if(l.isOptional)i.push(this.scanOptionalArgument(l.type));else{let s=this.scanArgument(l.type);s||this.onError({code:"missing-argument",arg:e}),i.push(s)}this.beginContext({tabular:t.tabular,root:t.rootOnly});let r=[],a=[],n=[],o=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:e}),o=!0),!o&&this.match("\\end")&&(this.scanArgument("string")!==e&&this.onError({code:"unbalanced-environment",arg:e}),o=!0),!o)if(this.matchColumnSeparator())n.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){n.push(this.mathlist),this.mathlist=[];let l=null;this.skipWhitespace(),this.match("[")&&(l=this.scanDimen(),this.skipWhitespace(),this.match("]")),a.push(l??{dimension:0}),r.push(n),n=[]}else this.mathlist.push(...this.scan(l=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(l)));while(!o);return n.push(this.mathlist),n.length>0&&r.push(n),this.endContext(),t.rootOnly&&(this.index=this.tokens.length),t.createAtom(e,r,a,i,this.context.maxMatrixCols)}scanExpression(){let e=this.mathlist;if(this.mathlist=[],this.parseExpression()){let t=this.mathlist;return this.mathlist=e,t}return this.mathlist=e,null}scan(e){this.beginContext(),e||(e=o=>o==="<}>");let t="",i=null,r=[],a=null;for(;!this.end()&&!e(this.peek());)this.hasInfixCommand()&&!t?(t=this.get(),i=ye(t,"math"),i&&(r=this.scanArguments(i)[1]),a=this.mathlist,this.mathlist=[]):this.parseExpression();let n;return t?(r.unshift(this.mathlist),a&&r.unshift(a),n=[i.createAtom({command:t,args:r,style:this.style,mode:this.parseMode})]):n=this.mathlist,this.endContext(),n}scanGroup(){let e=this.index;if(!this.match("<{>"))return null;let t=this.scan(r=>r==="<}>");if(this.match("<}>")||this.onError({code:"unbalanced-braces"}),t.length===1&&t[0].type==="placeholder")return t[0];let i=new bh(t,this.parseMode);return i.verbatimLatex=pi(this.tokens.slice(e,this.index)),i}scanSmartFence(){if(this.skipWhitespace(),!this.match("("))return null;this.beginContext();let e=1;for(;!this.end()&&e!==0;)this.match("(")&&(e+=1),this.match(")")&&(e-=1),e!==0&&this.parseExpression();let t=new ue("",this.mathlist,{leftDelim:"(",rightDelim:e===0?")":"?"});return this.endContext(),t}scanDelim(){this.skipWhitespace();let e=this.peek();if(!e)return this.onError({code:"unexpected-end-of-string"}),null;if(!Qi(e)&&!e.startsWith("\\"))return null;this.next();let t=ye(e,"math");return t?t.definitionType==="function"&&t.ifMode&&!t.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:e}),null):t.definitionType==="symbol"&&(t.type==="mopen"||t.type==="mclose")||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(e)?e:(this.onError({code:"unexpected-delimiter",arg:e}),null):(this.onError({code:"unknown-command",arg:e}),null)}scanLeftRight(){var e;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new wi("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new wi("\\mright");let t="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;t="\\mright"}let i=this.scanDelim();if(!i)return this.onError({code:"unexpected-delimiter"}),new wi(t==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(t);)this.parseExpression();let r=this.mathlist;this.endContext();let a=(e=this.scanDelim())!=null?e:".";return new ue(t==="\\right"?"left...right":"mleft...mright",r,{leftDelim:i,rightDelim:a,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let e=this.peek();if(e!=="^"&&e!=="_"&&e!=="'")return!1;let t=this.lastSubsupAtom();for(;e==="^"||e==="_"||e==="'";)this.match("'")?this.match("'")?t.addChild(new w({type:"mord",command:"\\doubleprime",mode:"math",value:"′′"}),"superscript"):t.addChild(new w({type:"mord",command:"\\prime",mode:"math",value:"′"}),"superscript"):(this.match("^")||this.match("_"))&&t.addChildren(T(this.scanArgument("expression")),e==="_"?"subscript":"superscript"),e=this.peek();return!0}parseLimits(){if(this.parseMode!=="math")return!1;let e=this.match("\\limits"),t=!e&&this.match("\\nolimits"),i=!t&&!e&&this.match("\\displaylimits");if(!e&&!t&&!i)return!1;let r=this.mathlist.length>0?this.mathlist[this.mathlist.length-1]:null;return r===null?!1:(r.explicitSubsupPlacement=!0,e&&(r.subsupPlacement="over-under"),t&&(r.subsupPlacement="adjacent"),i&&(r.subsupPlacement="auto"),!0)}scanArguments(e){if(!(e!=null&&e.params))return[void 0,[]];let t,i=[],r=e.infix?2:0;for(;r<e.params.length;){let a=e.params[r];a.type==="rest"?i.push(this.scan(n=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(n))):a.isOptional?i.push(this.scanOptionalArgument(a.type)):a.type.endsWith("*")?t=a.type.slice(0,-1):i.push(this.scanArgument(a.type)),r+=1}return[t,i]}scanSymbolOrLiteral(){let e=this.peek();if(!e)return null;this.next();let t;if(Qi(e)){let i=Re.createAtom(this.parseMode,e,f({},this.style));return i?[i]:null}if(t=this.scanMacro(e),t)return[t];if(e.startsWith("\\")){let i=ye(e,this.parseMode);if(!i)return this.onError({code:"unknown-command",arg:e}),[new wi(e)];if(i.definitionType==="symbol"){let r=f({},this.style);i.variant&&(r.variant=i.variant),t=new w({type:i.type,command:e,style:r,value:String.fromCodePoint(i.codepoint),mode:this.parseMode,verbatimLatex:e})}else{if(i.applyMode||i.applyStyle||i.infix)return this.onError({code:"invalid-command",arg:e}),[new wi(e)];i.createAtom&&(t=i.createAtom({command:e,args:[],style:this.style,mode:this.parseMode}))}}return t?[t]:null}scanArgument(e){var t;this.skipFiller();let i=this.parseMode;if(e==="auto"&&(e=i),!this.match("<{>")){if(e==="string")return this.scanString();if(e==="value")return this.scanValue();if(e==="delim")return(t=this.scanDelim())!=null?t:".";if(e==="expression")return this.scanExpression();if(e==="math"){e!==i&&this.beginContext({mode:"math"});let a=this.scanSymbolOrLiteral();return e!==i&&this.endContext(),a}if(e==="text"){e!==i&&this.beginContext({mode:"text"});let a=this.scanSymbolOrLiteral();return e!==i&&this.endContext(),a}return e==="balanced-string"?null:e==="rest"?this.scan(a=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(a)):null}if(e==="text"){this.beginContext({mode:"text"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());let a=this.mathlist;return this.endContext(),{group:a}}if(e==="math"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());let a=this.mathlist;return this.endContext(),{group:a}}if(e==="rest"){let a=this.scan();return this.match("<}>")||this.onError({code:"unbalanced-braces"}),{group:a}}let r=null;if(e==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());let a=this.mathlist;return this.endContext(),{group:a}}return e==="string"?r=this.scanString():e==="balanced-string"?r=this.scanBalancedString():e==="colspec"?r=this.scanColspec():e==="value"&&(r=this.scanValue()),this.skipUntilToken("<}>"),r}scanOptionalArgument(e){if(e=e==="auto"?this.parseMode:e,this.skipFiller(),!this.match("["))return null;let t=null;for(;!this.end()&&!this.match("]");)if(e==="string")t=this.scanString();else if(e==="value")t=this.scanValue();else if(e==="colspec")t=this.scanColspec();else if(e==="bbox"){let i={},r=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(let a of r){let n=a.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(n)i.padding={dimension:Number.parseFloat(n[1]),unit:n[2]};else{let o=a.match(/^\s*border\s*:\s*(.*)/);o?i.border=o[1]:i.backgroundcolor={string:a}}}t=i}else e==="math"&&(this.beginContext({mode:"math"}),t=this.mathlist.concat(this.scan(i=>i==="]")),this.endContext());return t}scanSymbolOrCommand(e){var t,i,r;if(e==="\\placeholder"){let l=this.scanOptionalArgument("string"),s=this.scanOptionalArgument("math"),u=w.serialize(s,{defaultMode:"math"}),c=[],d;!d&&u==="correct"?d="correct":!d&&u==="incorrect"?d="incorrect":u!==""&&(c=s);let h=this.scanOptionalArgument("string")==="locked",p=this.scanArgument("auto"),m;return p&&Array.isArray(p)&&p.length>0?m=p:p&&typeof p=="object"&&"group"in p?m=p.group:m=c,l?[new Mh(l,d,h,m??c,{mode:this.parseMode,style:this.style})]:[new tt({mode:this.parseMode,style:this.style})]}if(e==="\\renewcommand"||e==="\\newcommand"||e==="\\providecommand"||e==="\\def"){let l=this.index,s=this.scanLiteralGroup()||this.next();if(!s)return null;if(this.context.registers[s.substring(1)]){let u=this.scanArgument("string");u!==null&&(this.context.registers[s.substring(1)]=u);let c=R([e,pi(this.tokens.slice(l,this.index))]);return[new w({type:"text",value:"",verbatimLatex:c})]}}let a=this.scanMacro(e);if(a)return[a];let n=ye(e,this.parseMode);if(!n)return this.parseMode==="text"?(/[a-zA-Z]/.test((t=this.peek())!=null?t:"")&&(e+=" "),[...e].map(l=>new w({type:"text",value:l,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:e}),[new wi(e)]);let o=this.index;if(n.definitionType==="symbol"){let l=f({},this.style);n.variant&&(l.variant=n.variant),a=new w({type:n.type,command:e,style:l,value:String.fromCodePoint(n.codepoint),mode:this.parseMode})}else{if(n.ifMode&&!n.ifMode.includes(this.parseMode))return[];let l=this.parseMode;n.applyMode&&(this.parseMode=n.applyMode);let s,u=[];if(n.parse?u=n.parse(this):[s,u]=this.scanArguments(n),this.parseMode=l,n.applyMode&&!n.applyStyle&&!n.createAtom)return T(u[0]);if(n.infix)return this.onError({code:"too-many-infix-commands",arg:e}),null;if(typeof n.createAtom=="function")a=n.createAtom({command:e,args:u,style:this.style,mode:this.parseMode}),s&&(a.body=T(this.scanArgument(s)));else if(typeof n.applyStyle=="function"){let c=n.applyStyle(this.style,e,u,this.context),d=this.parseMode;if(n.applyMode&&(this.parseMode=n.applyMode),s){let h=this.style;this.style=c;let p=this.scanArgument(s);return this.style=h,this.parseMode=d,T(p)}this.style=c}else a=new w({type:"mord",command:(i=n.command)!=null?i:e,style:f({},this.style),value:e,mode:(r=n.applyMode)!=null?r:this.parseMode})}if(!a)return null;if(a instanceof w&&a.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(e)){let l=R([e,pi(this.tokens.slice(o,this.index))]);l&&(a.verbatimLatex=l)}if(a.verbatimLatex===null&&(a.verbatimLatex=void 0),a.isFunction&&this.smartFence){let l=this.scanSmartFence();if(l)return[a,l]}return[a]}scanSymbolCommandOrLiteral(){this.expandUnicode();let e=this.get();if(!e)return null;if(Qi(e)){let t=Re.createAtom(this.parseMode,e,f({},this.style));if(!t)return null;if(t.isFunction&&this.smartFence){let i=this.scanSmartFence();if(i)return[t,i]}return[t]}return e.startsWith("\\")?this.scanSymbolOrCommand(e):e==="<space>"?this.parseMode==="text"?[new Mr(" "," ",this.style)]:null:(e==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:e}),null)}scanMacro(e){var t;let i=this.context.getMacro(e);if(!i)return null;let r=this.index,a=i.args,n={"?":(t=this.args)==null?void 0:t.call(this,"?")};for(let o=1;o<=a;o++){let l=this.scanLiteralGroup();if(!l){let s=this.index;this.scanExpression(),l=pi(this.tokens.slice(s,this.index))}n[o]=l}return new _h(e,{expand:i.expand,captureSelection:i.captureSelection,args:r===this.index?null:pi(this.tokens.slice(r,this.index)),style:this.parsingContext.style,body:De(i.def,{context:this.context,parseMode:this.parseMode,args:o=>n[o],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var e,t,i,r;let a=(r=(i=(t=(e=this.scanEnvironment())!=null?e:this.scanModeShift())!=null?t:this.scanModeSet())!=null?i:this.scanGroup())!=null?r:this.scanLeftRight();if(a===null){if(this.parseSupSub()||this.parseLimits())return!0;a=this.scanSymbolCommandOrLiteral()}return a?(ve(a)?this.mathlist.push(...a):this.mathlist.push(a),!0):!1}};function De(e,t){var i,r,a,n;let o=(i=t==null?void 0:t.args)!=null?i:void 0,l=new Lh(sa(e,o),t==null?void 0:t.context,{args:o,mathstyle:(r=t==null?void 0:t.mathstyle)!=null?r:"displaystyle",parseMode:(a=t==null?void 0:t.parseMode)!=null?a:"math",style:(n=t==null?void 0:t.style)!=null?n:{}}),s=[];for(;!l.end();)s.push(...l.scan(()=>!1));return s}function Dh(e,t){var i;let r=new Lh(sa(e,null),t==null?void 0:t.context,{mathstyle:"displaystyle",parseMode:(i=t==null?void 0:t.parseMode)!=null?i:"math"});for(;!r.end();)r.scan();return r.errors}var Eh=class Bh extends w{constructor(t,i){super({type:"chem"},{command:t,mode:"math"});let r=ne.go(L.go(i,t==="\\pu"?"pu":"ce"),!1);this.body=De(r),this._verbatimLatex=t+"{"+i+"}",this.arg=i,this.captureSelection=!0}static fromJson(t){return new Bh(t.command,t.arg)}set verbatimLatex(t){}get verbatimLatex(){return this._verbatimLatex}toJson(){return y(f({},super.toJson()),{arg:this.arg})}render(t){let i=w.createBox(t,this.body,{type:"inner"});return this.caret&&(i.caret=this.caret),this.bind(t,i)}_serialize(t){return this.verbatimLatex,this.verbatimLatex}};k(["ce","pu"],"{chemformula:balanced-string}",{createAtom:e=>{var t;return new Eh(e.command,(t=e.args[0])!=null?t:"")}});var L={go:function(e,t){if(!e)return[];t===void 0&&(t="ce");var i="0",r={};r.parenthesisLevel=0,e=e.replace(/\n/g," "),e=e.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),e=e.replace(/[\u2026]/g,"...");for(var a,n=10,o=[];;){a!==e?(n=10,a=e):n--;var l=L.stateMachines[t],s=l.transitions[i]||l.transitions["*"];e:for(var u=0;u<s.length;u++){var c=L.patterns.match_(s[u].pattern,e);if(c){for(var d=s[u].task,h=0;h<d.action_.length;h++){var p;if(l.actions[d.action_[h].type_])p=l.actions[d.action_[h].type_](r,c.match_,d.action_[h].option);else if(L.actions[d.action_[h].type_])p=L.actions[d.action_[h].type_](r,c.match_,d.action_[h].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+d.action_[h].type_+")"];L.concatArray(o,p)}if(i=d.nextState||i,e.length>0){if(d.revisit||(e=c.remainder),!d.toContinue)break e}else return o}}if(n<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Object.prototype.toString.call(t)==="[object Array]")for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t)},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(e){var t=e.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 t&&t[0]?{match_:t.slice(1),remainder:e.substr(t[0].length)}:null},"(-)(9)^(-9)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return t&&t[0]?{match_:t.slice(1),remainder:e.substr(t[0].length)}:null},"state of aggregation $":function(e){var t=L.patterns.findObserveGroups(e,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(t&&t.remainder.match(/^($|[\s,;\)\]\}])/))return t;var i=e.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return i?{match_:i[0],remainder:e.substr(i[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(e){return L.patterns.findObserveGroups(e,"^{","","","}")},"^($...$)":function(e){return L.patterns.findObserveGroups(e,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(e){return L.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(e){return L.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(e){return L.patterns.findObserveGroups(e,"_{","","","}")},"_($...$)":function(e){return L.patterns.findObserveGroups(e,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(e){return L.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(e){return L.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(e){return L.patterns.findObserveGroups(e,"","{","}","")},"{(...)}":function(e){return L.patterns.findObserveGroups(e,"{","","","}")},"$...$":function(e){return L.patterns.findObserveGroups(e,"","$","$","")},"${(...)}$":function(e){return L.patterns.findObserveGroups(e,"${","","","}$")},"$(...)$":function(e){return L.patterns.findObserveGroups(e,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?
vendor: 6,728 bytes, line 2975
2975:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return L.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return L.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return L.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return L.patterns.findObserveGroups(e,"",/^\\[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(e){return L.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return L.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return L.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return L.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return L.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return L.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return L.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return L.patterns.findObserveGroups(e,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t;if(t=e.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))/),t)return{match_:t[0],remainder:e.substr(t[0].length)};var i=L.patterns.findObserveGroups(e,"","$","$","");return i&&(t=i.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),t)?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,i,r,a,n,o,l,s,u){var c=function(b,x){if(typeof x=="string")return b.indexOf(x)!==0?null:x;var E=b.match(x);return E?E[0]:null},d=function(b,x,E){for(var S=0;x<b.length;){var M=b.charAt(x),C=c(b.substr(x),E);if(C!==null&&S===0)return{endMatchBegin:x,endMatchEnd:x+C.length};if(M==="{")S++;else if(M==="}"){if(S===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];S--}x++}return null},h=c(e,t);if(h===null||(e=e.substr(h.length),h=c(e,i),h===null))return null;var p=d(e,h.length,r||a);if(p===null)return null;var m=e.substring(0,r?p.endMatchEnd:p.endMatchBegin);if(n||o){var g=this.findObserveGroups(e.substr(p.endMatchEnd),n,o,l,s);if(g===null)return null;var v=[m,g.match_];return{match_:u?v.join(""):v,remainder:g.remainder}}else return{match_:m,remainder:e.substr(p.endMatchEnd)}},match_:function(e,t){var i=L.patterns.patterns[e];if(i===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+e+")"];if(typeof i=="function")return L.patterns.patterns[e](t);var r=t.match(i);if(r){var a;return r[2]?a=[r[1],r[2]]:r[1]?a=r[1]:a=r[0],{match_:a,remainder:t.substr(r[0].length)}}return null}},actions:{"a=":function(e,t){e.a=(e.a||"")+t},"b=":function(e,t){e.b=(e.b||"")+t},"p=":function(e,t){e.p=(e.p||"")+t},"o=":function(e,t){e.o=(e.o||"")+t},"q=":function(e,t){e.q=(e.q||"")+t},"d=":function(e,t){e.d=(e.d||"")+t},"rm=":function(e,t){e.rm=(e.rm||"")+t},"text=":function(e,t){e.text_=(e.text_||"")+t},insert:function(e,t,i){return{type_:i}},"insert+p1":function(e,t,i){return{type_:i,p1:t}},"insert+p1+p2":function(e,t,i){return{type_:i,p1:t[0],p2:t[1]}},copy:function(e,t){return t},rm:function(e,t){return{type_:"rm",p1:t||""}},text:function(e,t){return L.go(t,"text")},"{text}":function(e,t){var i=["{"];return L.concatArray(i,L.go(t,"text")),i.push("}"),i},"tex-math":function(e,t){return L.go(t,"tex-math")},"tex-math tight":function(e,t){return L.go(t,"tex-math tight")},bond:function(e,t,i){return{type_:"bond",kind_:i||t}},"color0-output":function(e,t){return{type_:"color0",color:t[0]}},ce:function(e,t){return L.go(t)},"1/2":function(e,t){var i=[];t.match(/^[+\-]/)&&(i.push(t.substr(0,1)),t=t.substr(1));var r=t.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(e,t){return L.go(t,"9,9")}},createTransitions:function(e){var t,i,r,a,n={};for(t in e)for(i in e[t])for(r=i.split("|"),e[t][i].stateArray=r,a=0;a<r.length;a++)n[r[a]]=[];for(t in e)for(i in e[t])for(r=e[t][i].stateArray||[],a=0;a<r.length;a++){var o=e[t][i];if(o.action_){o.action_=[].concat(o.action_);for(var l=0;l<o.action_.length;l++)typeof o.action_[l]=="string"&&(o.action_[l]={type_:o.action_[l]})}else o.action_=[];for(var s=t.split("|"),u=0;u<s.length;u++)if(r[a]==="*")for(var c in n)n[c].push({pattern:s[u],task:o});else n[r[a]].push({pattern:s[u],task:o})}return n},stateMachines:{}};L.stateMachines={ce:{transitions:L.createTransitions({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"}}
vendor: 7,402 bytes, line 2975
2975,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":{}},space:{a:{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"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"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},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{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\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(e,t){var i;if((e.d||"").match(/^[0-9]+$/)){var r=e.d;e.d=void 0,i=this.output(e),e.b=r}else i=this.output(e);return L.actions["o="](e,t),i},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var i=[];return L.concatArray(i,this.output(e)),L.concatArray(i,L.actions.bond(e,t,"-")),i}else e.d=t},"- after o/d":function(e,t,i){var r=L.patterns.match_("orbital",e.o||""),a=L.patterns.match_("one lowercase greek letter $",e.o||""),n=L.patterns.match_("one lowercase latin letter $",e.o||""),o=L.patterns.match_("$one lowercase latin letter$ $",e.o||""),l=t==="-"&&(r&&r.remainder===""||a||n||o);l&&!e.a&&!e.b&&!e.p&&!e.d&&!e.q&&!r&&n&&(e.o="$"+e.o+"$");var s=[];return l?(L.concatArray(s,this.output(e)),s.push({type_:"hyphen"})):(r=L.patterns.match_("digits",e.d||""),i&&r&&r.remainder===""?(L.concatArray(s,L.actions["d="](e,t)),L.concatArray(s,this.output(e))):(L.concatArray(s,this.output(e)),L.concatArray(s,L.actions.bond(e,t,"-")))),s},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:L.go(t,"o")}},comma:function(e,t){var i=t.replace(/\s*$/,""),r=i!==t;return r&&e.parenthesisLevel===0?{type_:"comma enumeration L",p1:i}:{type_:"comma enumeration M",p1:i}},output:function(e,t,i){var r;if(!e.r)r=[],!e.a&&!e.b&&!e.p&&!e.o&&!e.q&&!e.d&&!i||(e.sb&&r.push({type_:"entitySkip"}),!e.o&&!e.q&&!e.d&&!e.b&&!e.p&&i!==2?(e.o=e.a,e.a=void 0):!e.o&&!e.q&&!e.d&&(e.b||e.p)?(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):e.o&&e.dType==="
2975kv"&&L.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&e.dType==="kv"&&!e.q&&(e.dType=void 0),r.push({type_:"chemfive",a:L.go(e.a,"a"),b:L.go(e.b,"bd"),p:L.go(e.p,"pq"),o:L.go(e.o,"o"),q:L.go(e.q,"pq"),d:L.go(e.d,e.dType==="oxidation"?"oxidation":"bd"),dType:e.dType}));else{var a;e.rdt==="M"?a=L.go(e.rd,"tex-math"):e.rdt==="T"?a=[{type_:"text",p1:e.rd||""}]:a=L.go(e.rd);var n;e.rqt==="M"?n=L.go(e.rq,"tex-math"):e.rqt==="T"?n=[{type_:"text",p1:e.rq||""}]:n=L.go(e.rq),r={type_:"arrow",r:e.r,rd:a,rq:n}}for(var o in e)o!=="parenthesisLevel"&&o!=="beginsWithBond"&&delete e[o];return r},"oxidation-output":function(e,t){var i=["{"];return L.concatArray(i,L.go(t,"oxidation")),i.push("}"),i},"frac-output":function(e,t){return{type_:"frac-ce",p1:L.go(t[0]),p2:L.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:L.go(t[0]),p2:L.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:L.go(t[0]),p2:L.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:L.go(t[0]),p2:L.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:L.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,i){return{type_:"operator",kind_:i||t}}}},a:{transitions:L.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:L.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:L.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var i in e)delete e[i];return t}}}},pq:{transitions:L.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{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{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(e,t){return{type_:"state of aggregation subscript",p1:L.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:L.go(t[1],"pq")}}}},bd:{transitions:L.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{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{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(e,t){return{type_:"color",color1:t[0],color2:L.go(t[1],"bd")}}}},oxidation:{transitions:L.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:L.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var i in e)delete e[i];return t}}}},"tex-math tight":{transitions:L.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var i in e)delete e[i];return t}}}},"9,9":{transitions:L.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:L.createTransitions({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":{}},"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(e,t){var i=[];return t[0]==="+-"||t[0]==="+/-"?i.push("\\pm "):t[0]&&i.push(t[0]),t[1]&&(L.concatArray(i,L.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?L.concatArray(i,L.go(t[2],"pu-9,9")):i.push(t[2])),(t[3]||t[4])&&(t[3]==="e"||t[4]==="*"?i.push({type_:"cdot"}):i.push({type_:"times"}))),t[5]&&i.push("10^{"+t[5]+"}"),i},"number^":function(e,t){var i=[];return t[0]==="+-"||t[0]==="+/-"?i.push("\\pm "):t[0]&&i.push(t[0]),L.concatArray(i,L.go(t[1],"pu-9,9")),i.push("^{"+t[2]+"}"),i},operator:function(e,t,i){return{type_:"operator",kind_:i||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,i=L.patterns.match_("{(...)}",e.d||"");i&&i.remainder===""&&(e.d=i.match_);var r=L.patterns.match_("{(...)}",e.q||"");if(r&&r.remainder===""&&(e.q=r.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var a={d:L.go(e.d,"pu"),q:L.go(e.q,"pu")};e.o==="//"?t={type_:"pu-frac",p1:a.d,p2:a.q}:(t=a.d,a.d.length>1||a.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),L.concatArray(t,a.q))}else t=L.go(e.d,"pu-2");for(var n in e)delete e[n];return t}}},"pu-2":{transitions:L.createTransitions({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(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var i=L.patterns.match_("{(...)}",e.rm||"");i&&i.remainder===""?t=L.go(i.match_,"pu"):t={type_:"rm",p1:e.rm}}for(var r in e)delete e[r];return t}}},"pu-9,9":{transitions:L.createTransitions({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(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var i=e.text_.length%3;i===0&&(i=3);for(var r=e.text_.length-3;r>0;r-=3)t.push(e.text_.substr(r,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,i)),t.reverse()}else t.push(e.text_);for(var a in e)delete e[a];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var i=e.text_.length-3,r=0;r<i;r+=3)t.push(e.text_.substr(r,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(r))}else t.push(e.text_);for(var a in e)delete e[a];return t}}}};var ne={go:function(e,t){if(!e)return"";for(var i="",r=!1,a=0;a<e.length;a++){var n=e[a];typeof n=="string"?i+=n:(i+=ne._go2(n),n.type_==="1st-level escape"&&(r=!0))}return!t&&!r&&i&&(i="{"+i+"}"),i},_goInner:function(e){return e&&ne.go(e,!0)},_go2:function(e){var t;switch(e.type_){case"chemfive":t="";var i={a:ne._goInner(e.a),b:ne._goInner(e.b),p:ne._goInner(e.p),o:ne._goInner(e.o),q:ne._goInner(e.q),d:ne._goInner(e.d)};i.a&&(i.a.match(/^[+\-]/)&&(i.a="{"+i.a+"}"),t+=i.a+"\\,"),(i.b||i.p)&&(t+="{\\vphantom{X}}",t+="^{\\hphantom{"+(i.b||"")+"}}_{\\hphantom{"+(i.p||"")+"}}",t+="{\\vphantom{X}}",t+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(i.b||"")+"}}",t+="_{\\vphantom{2}\\llap{\\smash[t]{"+(i.p||"")+"}}}"),i.o&&(i.o.match(/^[+\-]/)&&(i.o="{"+i.o+"}
2975"),t+=i.o),e.dType==="kv"?((i.d||i.q)&&(t+="{\\vphantom{X}}"),i.d&&(t+="^{"+i.d+"}"),i.q&&(t+="_{\\smash[t]{"+i.q+"}}")):e.dType==="oxidation"?(i.d&&(t+="{\\vphantom{X}}",t+="^{"+i.d+"}"),i.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+i.q+"}}")):(i.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+i.q+"}}"),i.d&&(t+="{\\vphantom{X}}",t+="^{"+i.d+"}"));break;case"rm":t="\\mathrm{"+e.p1+"}";break;case"text":e.p1.match(/[\^_]/)?(e.p1=e.p1.replace(" ","~").replace("-","\\text{-}"),t="\\mathrm{"+e.p1+"}"):t="\\text{"+e.p1+"}";break;case"roman numeral":t="\\mathrm{"+e.p1+"}";break;case"state of aggregation":t="\\mskip2mu "+ne._goInner(e.p1);break;case"state of aggregation subscript":t="\\mskip1mu "+ne._goInner(e.p1);break;case"bond":if(t=ne._getBond(e.kind_),!t)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+e.kind_+")"];break;case"frac":var r="\\frac{"+e.p1+"}{"+e.p2+"}";t="\\mathchoice{\\textstyle"+r+"}{"+r+"}{"+r+"}{"+r+"}";break;case"pu-frac":var a="\\frac{"+ne._goInner(e.p1)+"}{"+ne._goInner(e.p2)+"}";t="\\mathchoice{\\textstyle"+a+"}{"+a+"}{"+a+"}{"+a+"}";break;case"tex-math":t=e.p1+" ";break;case"frac-ce":t="\\frac{"+ne._goInner(e.p1)+"}{"+ne._goInner(e.p2)+"}";break;case"overset":t="\\overset{"+ne._goInner(e.p1)+"}{"+ne._goInner(e.p2)+"}";break;case"underset":t="\\underset{"+ne._goInner(e.p1)+"}{"+ne._goInner(e.p2)+"}";break;case"underbrace":t="\\underbrace{"+ne._goInner(e.p1)+"}_{"+ne._goInner(e.p2)+"}";break;case"color":t="{\\color{"+e.color1+"}{"+ne._goInner(e.color2)+"}}";break;case"color0":t="\\color{"+e.color+"}";break;case"arrow":var n={rd:ne._goInner(e.rd),rq:ne._goInner(e.rq)},o=ne._getArrow(e.r);n.rd||n.rq?e.r==="<=>"||e.r==="<=>>"||e.r==="<<=>"||e.r==="<-->"?(o="\\long"+o,n.rd&&(o="\\overset{"+n.rd+"}{"+o+"}"),n.rq&&(e.r==="<-->"?o="\\underset{\\lower2mu{"+n.rq+"}}{"+o+"}":o="\\underset{\\lower6mu{"+n.rq+"}}{"+o+"}"),o=" {}\\mathrel{"+o+"}{} "):(n.rq&&(o+="[{"+n.rq+"}]"),o+="{"+n.rd+"}",o=" {}\\mathrel{\\x"+o+"}{} "):o=" {}\\mathrel{\\long"+o+"}{} ",t=o;break;case"operator":t=ne._getOperator(e.kind_);break;case"1st-level escape":t=e.p1+" ";break;case"space":t=" ";break;case"entitySkip":t="~";break;case"pu-space-1":t="~";break;case"pu-space-2":t="\\mkern3mu ";break;case"1000 separator":t="\\mkern2mu ";break;case"commaDecimal":t="{,}";break;case"comma enumeration L":t="{"+e.p1+"}\\mkern6mu ";break;case"comma enumeration M":t="{"+e.p1+"}\\mkern3mu ";break;case"comma enumeration S":t="{"+e.p1+"}\\mkern1mu ";break;case"hyphen":t="\\text{-}";break;case"addition compound":t="\\,{\\cdot}\\,";break;case"electron dot":t="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":t="{\\times}";break;case"prime":t="\\prime ";break;case"cdot":t="\\cdot ";break;case"tight cdot":t="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":t="\\times ";break;case"circa":t="{\\sim}";break;case"^":t="uparrow";break;case"v":t="downarrow";break;case"ellipsis":t="\\ldots ";break;case"/":t="/";break;case" / ":t="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return t},_getArrow:function(e){switch(e){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(e){switch(e){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(e){switch(e){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."]}}},Ah=class Th extends w{constructor(t){super(y(f({},t),{type:"delim"})),this.value=t.delim,this.size=t.size}static fromJson(t){return new Th(t)}toJson(){return y(f({},super.toJson()),{delim:this.value,size:this.size})}render(t){return new A(this.value,{type:"middle"})}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="str
vendor: 5,101 bytes, line 2975
2975ing")return this.verbatimLatex;let i=ye(this.command,this.mode);return i!=null&&i.serialize?i.serialize(this,t):Q(this.command,this.value)}},Fh=class zh extends w{constructor(t){super(y(f({},t),{type:"sizeddelim",value:t.delim})),this.delimType=t.delimType,this.size=t.size}static fromJson(t){return new zh(t)}toJson(){return y(f({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(t){let i=yf(this.value,this.size,t,{classes:{open:"ML__open",close:"ML__close"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return i?(i=this.bind(t,i),this.caret&&(i.caret=this.caret),i):null}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let i=ye(this.command,this.mode);return i!=null&&i.serialize?i.serialize(this,t):Q(this.command,this.value)}};function er(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var ba=class Kh extends w{constructor(t,i,r,a){var n,o;super({type:"enclose",command:t,style:a.style}),this.body=i,this.backgroundcolor=a.backgroundcolor,r.updiagonalarrow&&(r.updiagonalstrike=!1),r.box&&(r.left=!1,r.right=!1,r.bottom=!1,r.top=!1),this.notation=r,this.shadow=(n=a.shadow)!=null?n:"none",this.strokeWidth=(o=a.strokeWidth)!=null?o:"0.06em",this.strokeWidth||(this.strokeWidth="0.06em"),this.strokeStyle=a.strokeStyle,this.svgStrokeStyle=a.svgStrokeStyle,this.strokeColor=a.strokeColor,this.borderStyle=a.borderStyle,this.padding=a.padding,this.captureSelection=!1}static fromJson(t){return new Kh(t.command,t.body,t.notation,t)}toJson(){return y(f({},super.toJson()),{notation:this.notation,shadow:this.shadow,strokeWidth:this.strokeWidth,strokeStyle:this.strokeStyle,svgStrokeStyle:this.svgStrokeStyle,strokeColor:this.strokeColor,borderStyle:this.borderStyle,padding:this.padding})}_serialize(t){var i;if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let r=ye(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);let a=(i=this.command)!=null?i:"";if(this.command==="\\enclose"){a+="{"+Object.keys(this.notation).join(" ")+"}";let n="",o="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(n+=o+'mathbackground="'+this.backgroundcolor+'"',o=","),this.shadow&&this.shadow!=="auto"&&(n+=o+'shadow="'+this.shadow+'"',o=","),this.strokeWidth||this.strokeStyle!=="solid"?(n+=o+this.borderStyle,o=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(n+=o+'mathcolor="'+this.strokeColor+'"',o=","),n&&(a+=`[${n}]`)}return Q(a,this.bodyToLatex(t))}render(t){var i,r,a,n,o;let l=new H({parent:t},this.style),s=w.createBox(l,this.body);if(!s)return null;let u=Kf(this.borderStyle),c=l.toEm(!this.padding||this.padding==="auto"?{register:"fboxsep"}:{string:this.padding});s.setStyle("position","relative"),s.setStyle("display","inline-block"),s.setStyle("height",s.height+s.depth,"em"),s.setStyle("width",s.width,"em");let d=new A(null,{classes:"ML__notation"}),h=s.height+s.depth+2*c,p=s.width+2*c,m="",g=Math.min(c*.2,.05);if(this.notation.horizontalstrike){let x=2*c+s.height-St/2;m+=this.line((c+g).toString(),x.toString(),(c+s.width-g).toString(),x.toString())}if(this.notation.verticalstrike){let x=c+s.width/2;m+=this.line(x.toString(),(c+g).toString(),x.toString(),(h-c-g).toString())}if(this.notation.updiagonalstrike&&(m+=this.line((c+g).toString(),(h-c-g).toString(),(c+s.width-g).toString(),(c+g).toString())),this.notation.downdiagonalstrike&&(m+=this.line((c+g).toString(),(c+g).toString(),(c+s.width-g).toString(),(h-c-g).toString())),this.notation.updiagonalarrow){m+=this.line(c.toString(),(2*c+s.depth+s.height).toString(),(c+s.width).toString(),c.toString());let x=.03*Math.sqrt(p*p+h*h)*1,E=s.width*x,S=(s.depth+s.height)*x,M=c+s.width,C=c;C+S-.4*E<0&&(C=.4*E-S),m+='<polygon points="',m+=`${M},${C} ${M-E-.4*S},${C+S-.4*E} `,m+=`${M-.7*E},${C+.7*S} ${M-E+.4*S},${C+S+.4*E} `,m+=`${M},${C}`,m+=`" stroke='none' fill="${er((i=this.strokeColor)!=null?i:"")}"`,m+="/>"}let v=0;if(this.notation.phasorangle){let x=Od(l),E=(s.height+s.depth+2*x+2*c).toString(),S=(s.height+s.depth)/2;m+=this.line(c.toString(),E,(c+S+s.width).toString(),E),m+=this.line(c.toString(),E,(c+S).toString(),(c-x).toString()),h+=x,v=S,s.left+=h/2-c}if(this.notation.longdiv){let x=Od(l);h+=x,m+=this.line(c.toString(),c.toString(),(c+s.width).toString(),c.toString());let E=.3;v=E+x,s.left+=E+x,s.setTop(c+x),m+='<path d="',m+=`M ${c} ${c}  a${E} ${(s.depth+s.height+2*x)/2}, 0, 1, 1, 0 ${s.depth+s.height+2*x} "`,m+=` stroke-width="${$f(l)}" stroke="${er((r=this.strokeColor)!=null?r:"")}" fill="none"`,m+="/>"}if(d.width=s.width+2*c+v,d.height=s.height+2*c,d.depth=s.depth,d.setStyle("box-sizing","border-box"),d.setStyle("left",`calc(-1 * ${u} - ${c}em)`),d.setStyle("height",`calc( ${s.height+s.depth+2*c}em + ${u})`),d.setStyle("top","0em"),d.setStyle("width",`calc(${s.width+2*c}em + ${u})`),this.backgroundcolor&&d.setStyle("background-color",this.backgroundcolor),this.notation.box&&d.setStyle("border","1p
2975x solid red"),this.notation.actuarial&&(d.setStyle("border-top",this.borderStyle),d.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(d.setStyle("border-bottom",this.borderStyle),d.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(d.setStyle("border-radius","8px"),d.setStyle("border",this.borderStyle)),this.notation.circle&&(d.setStyle("border-radius","50%"),d.setStyle("border",this.borderStyle)),this.notation.top&&d.setStyle("border-top",this.borderStyle),this.notation.left&&d.setStyle("border-left",this.borderStyle),this.notation.right&&d.setStyle("border-right",this.borderStyle),this.notation.bottom&&d.setStyle("border-bottom",this.borderStyle),m){let x="";this.shadow==="auto"&&(x+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(x+=`filter: drop-shadow(${er((a=this.shadow)!=null?a:"")})`),x+=` stroke-width="${er((n=this.strokeWidth)!=null?n:"")}" stroke="${er((o=this.strokeColor)!=null?o:"")}"`,x+=' stroke-linecap="round"',this.svgStrokeStyle&&(x+=` stroke-dasharray="${er(this.svgStrokeStyle)}"`),d.svgStyle=x,d.svgOverlay=m}let b=new A([d,s]);return b.setStyle("position","relative"),b.setStyle("height",`${Math.floor(100*(d.depth+d.height))/100}em`),b.setStyle("display","inline-block"),b.height=d.height,b.depth=d.depth,b.width=d.width-2*c,b.left=c,b.right=c,this.caret&&(b.caret=this.caret),b.wrap(l)}line(t,i,r,a){return`<line x1="${fn(t)}"  y1="${fn(i)}" x2="${fn(r)}" y2="${fn(a)}" vector-effect="non-scaling-stroke"></line>`}};function fn(e){return typeof e=="number"?`${Math.floor(100*e)/100}%`:e}function Kf(e){if(!e)return"1px";let t=e.match(/([0-9][a-zA-Z\%]+)/);return t===null?"1px":t[1]}function $f(e){return(Math.floor(100*e.metrics.sqrtRuleThickness/e.scalingFactor)/100/10).toString()+"em"}function Od(e){let t=e.isDisplayStyle?St:e.metrics.defaultRuleThickness;return e.metrics.defaultRuleThickness+e.scalingFactor*t/4}var Pn={fractionNavigationOrder:"numerator-denominator"},Oi=class $h extends w{constructor(t,i,r){var a,n,o;super(y(f({},r),{type:"genfrac",displayContainsHighlight:!0})),this.above=t,this.below=i,this.hasBarLine=(a=r==null?void 0:r.hasBarLine)!=null?a:!0,this.continuousFraction=(n=r==null?void 0:r.continuousFraction)!=null?n:!1,this.align=(o=r==null?void 0:r.align)!=null?o:"center",this.numerPrefix=r==null?void 0:r.numerPrefix,this.denomPrefix=r==null?void 0:r.denomPrefix,this.mathstyleName=r==null?void 0:r.mathstyleName,this.leftDelim=r==null?void 0:r.leftDelim,this.rightDelim=r==null?void 0:r.rightDelim}static fromJson(t){return new $h(t.above,t.below,t)}toJson(){let t={};return this.continuousFraction&&(t.continuousFraction=!0),this.align!=="center"&&(t.align=this.align),this.numerPrefix&&(t.numerPrefix=this.numerPrefix),this.denomPrefix&&(t.denomPrefix=this.denomPrefix),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),this.hasBarLine||(t.hasBarLine=!1),this.mathstyleName&&(t.mathstyleName=this.mathstyleName),f(f({},super.toJson()),t)}get children(){if(this._children)return this._children;let t=[];if(Pn.fractionNavigationOrder==="denominator-numerator"){for(let i of this.below)t.push(...i.children),t.push(i);for(let i of this.above)t.push(...i.children),t.push(i)}else{for(let i of this.above)t.push(...i.children),t.push(i);for(let i of this.below)t.push(...i.children),t.push(i)}return this._children=t,t}render(t){var i,r;let a=new H({parent:t,mathstyle:this.mathstyleName},this.style),n=a.metrics,o=new H({parent:a,mathstyle:this.continuousFraction?"":"numerator"},this.style),l=this.numerPrefix?new A([new A(this.numerPrefix),w.createBox(o,this.above)],{isTight:o.isTight,type:"ignore"}):(i=w.createBox(o,this.above,{type:"ignore"}))!=null?i:new A(null,{type:"ignore"}),s=new H({parent:a,mathstyle:this.continuousFraction?"":"denominator"},this.style),u=this.denomPrefix?new A([new A(this.denomPrefix),w.createBox(s,this.below,{type:"ignore"})]):(r=w.createBox(s,this.below,{type:"ignore"}))!=null?r:new A(null,{type:"ignore"}),c=this.hasBarLine?n.defaultRuleThickness:0,d,h=0,p;a.isDisplayStyle?(d=o.metrics.num1,h=c>0?3*c:7*c,p=s.metrics.denom1):(c>0?(d=o.metrics.num2,h=c):(d=o.metrics.num3,h=3*n.defaultRuleThickness),p=s.metrics.denom2);let m=[];this.isSelected&&m.push("ML__selected");let g=l.depth,v=u.height,b;if(c<=0){let B=d-g-(v-p);B<h&&(d+=(h-B)/2,p+=(h-B)/2),b=new pe({individualShift:[{box:l,shift:-d,classes:[...m,gn(this.align)]},{box:u,shift:p,classes:[...m,gn(this.align)]}]}).wrap(a)}else{let B=new A(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});B.softWidth=Math.max(l.width,u.width),B.height=c/2,B.depth=c/2;let D=et+c/2;d<h+g+D&&(d=h+g+D);let K=et-c/2;p<h+v-K&&(p=h+v-K),b=new pe({individualShift:[{box:u,shift:p,classes:[...m,gn(this.align)]},{box:B,shift:-K,classes:m},{box:l,shift:-d,classes:[...m,gn(this.align)]}]}).wrap(a)}let x=a.isDisplayStyle?n.delim1:n.delim2,E=this.leftDelim?this.bind(t,Yn("open",this.leftDelim,x,!0,t,{style:this.style,mode:this.mode,isSelected:this.isSelected})):$i(a,"ML__open"),S=null;this.continuousFraction?S=new A(null,{type:"close"}):this.rightDelim?S=this.bind(t,Yn("close",this.rightDelim,x,!0,t,{style:this.style,mode:this.mode,isSelected:this.isSelected})):S=$i(a,"ML__close");let M=new A([E,b,S],{isTight:a.isTight,type:"inner",classes:"ML__mfrac"}),C=this.bind(t,M);
vendor: 6,105 bytes, line 2975
2975return this.caret&&(C.caret=this.caret),this.attachSupsub(t,{base:C})}};function gn(e){var t;return(t={left:"ML__left",right:"ML__right",center:"ML__center"}[e])!=null?t:"ML__center"}var be=class Ph extends w{constructor(t,i){var r;super({type:"latex",value:t,mode:"latex"}),this.isSuggestion=(r=i==null?void 0:i.isSuggestion)!=null?r:!1,this.isError=!1}static fromJson(t){let i=new Ph(t.value);return t.isSuggestion&&(i.isSuggestion=!0),t.isError&&(i.isError=!0),i}toJson(){let t={};return this.isSuggestion&&(t.isSuggestion=!0),this.isError&&(t.isError=!0),f({type:"latex",value:this.value},t)}render(t){let i=new A(this.value,{classes:this.isSuggestion?"ML__suggestion":this.isError?"ML__error":"",type:"latex",maxFontSize:1});return i?(this.caret&&(i.caret=this.caret),this.bind(t,i)):null}},Qr=class Oh extends w{constructor(t=""){super({type:"latexgroup",mode:"latex"}),this.body=[...t].map(i=>new be(i)),this.skipBoundary=!0}static fromJson(t){return new Oh}toJson(){return super.toJson()}render(t){let i=w.createBox(t,this.body);return i?(this.caret&&(i.caret=this.caret),this.bind(t,i)):null}_serialize(t){var i,r;return(r=(i=this.body)==null?void 0:i.map(a=>a.value).join(""))!=null?r:""}},ks=class Ih extends w{constructor(t,i){super(y(f({},i),{type:"extensible-symbol",isFunction:i==null?void 0:i.isFunction})),this.value=t,this.variant=i==null?void 0:i.variant,this.subsupPlacement=i==null?void 0:i.limits}static fromJson(t){return new Ih(t.symbol,t)}toJson(){let t=super.toJson();return this.variant&&(t.variant=this.variant),this.subsupPlacement&&(t.limits=this.subsupPlacement),this.value&&(t.symbol=this.value),t}render(t){var i;let r=t.isDisplayStyle&&this.value!=="\\smallint",a=new A(this.value,{fontFamily:r?"Size2-Regular":"Size1-Regular",classes:"ML__op-symbol "+(r?"ML__large-op":"ML__small-op"),type:"op",maxFontSize:t.scalingFactor,isSelected:this.isSelected});if(!a)return null;a.right=a.italic;let n=(a.height-a.depth)/2-et*t.scalingFactor,o=a.italic;a.setTop(n);let l=a;if(this.superscript||this.subscript){let s=(i=this.subsupPlacement)!=null?i:"auto";s==="auto"&&t.isDisplayStyle&&(s="over-under"),l=s==="over-under"?this.attachLimits(t,{base:a,baseShift:n,slant:o}):this.attachSupsub(t,{base:a})}return new A(this.bind(t,l),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"ML__op-group"}).wrap(t)}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let i=ye(this.command,this.mode);if(i!=null&&i.serialize)return i.serialize(this,t);let r=[];return r.push(this.command),this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&r.push("\\limits"),this.subsupPlacement==="adjacent"&&r.push("\\nolimits"),this.subsupPlacement==="auto"&&r.push("\\displaylimits")),r.push(this.supsubToLatex(t)),R(r)}},Ii=class Rh extends w{constructor(t){let i=t.body;super(y(f({},t),{type:"overlap",body:typeof i=="string"?[new w({value:i})]:i,style:t==null?void 0:t.style})),this.skipBoundary=!0,this.align=t==null?void 0:t.align,this.boxType=t==null?void 0:t.boxType}static fromJson(t){return new Rh(t)}toJson(){let t={};return this.align&&(t.align=this.align),this.boxType&&(t.boxType=this.boxType),f(f({},super.toJson()),t)}render(t){let i=w.createBox(t,this.body,{classes:"ML__inner"});return i?(this.caret&&(i.caret=this.caret),this.bind(t,new A([i,new A(null,{classes:"ML__fix"})],{classes:this.align==="right"?"ML__rlap":"ML__llap",type:this.boxType}))):null}},Je=class Nh extends w{constructor(t){var i,r,a,n;super({type:"overunder",command:t.command,style:t.style,mode:t.mode,body:t.body,skipBoundary:(i=t.skipBoundary)!=null?i:!0}),this.subsupPlacement=t.supsubPlacement,this.svgAbove=t.svgAbove,this.svgBelow=t.svgBelow,this.svgBody=t.svgBody,this.above=t.above,this.below=t.below,this.boxType=(r=t.boxType)!=null?r:"ord",this.paddedBody=(a=t.paddedBody)!=null?a:!1,this.paddedLabels=(n=t.paddedLabels)!=null?n:!1}static fromJson(t){return new Nh(t)}toJson(){let t=super.toJson();return this.skipBoundary||(t.skipBoundary=!1),this.subsupPlacement&&(t.subsupPlacement=this.subsupPlacement),this.svgAbove&&(t.svgAbove=this.svgAbove),this.svgBelow&&(t.svgBelow=this.svgBelow),this.svgBody&&(t.svgBody=this.svgBody),this.boxType!=="ord"&&(t.boxType=this.boxType),this.paddedBody&&(t.paddedBody=!0),this.paddedLabels&&(t.paddedLabels=!0),t}render(t){let i=this.svgBody?Fn(this.svgBody):w.createBox(t,this.body,{type:"ignore"}),r=new H({parent:t,mathstyle:"scriptstyle"},this.style),a=null;this.svgAbove?a=Fn(this.svgAbove):this.above&&(a=w.createBox(r,this.above,{type:"ignore"}));let n=null;this.svgBelow?n=Fn(this.svgBelow):this.below&&(n=w.createBox(r,this.below,{type:"ignore"})),this.paddedBody&&(i=new A([$i(t,"ML__open"),i,$i(t,"ML__close")],{type:"ignore"}));let o=Pf(t,{base:i,above:a,below:n,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return o?(this.subsupPlacement==="over-under"?o=this.attachLimits(t,{base:o,type:o.type}):o=this.attachSupsub(t,{base:o}),this.caret&&(o.caret=this.caret),this.bind(t,o)):null}};function Pf(e,t){if(!t.base)return null;if(!t.above&&!t.below){let l=new A(t.base,{type:t.type});return l.setStyle("position","relative"),l}let i=0;t.above&&(i=e.metrics.bigOpSpacing5);let r=null,a=t.base,n=0,o=["ML__center"];if(t.paddedAboveBelow&&o.push("ML__label_padding"),t.below&&t.above){let l=e.metrics.bigOpSpacing5+t.below.height+t.below.depth+a.depth+n;r=new pe({bottom:l,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:o},{box:a,classes:["ML__center"]},i,{box:t.above,classes:o},e.metrics.bigOpSpacing5]})}else t.below?r=new pe({top:a.height-n,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:o},{box:a,classes:["ML__center"]}]}):t.above&&(r=new pe({bottom:a.depth+n,children:[{box:a,classes:["ML__center"]},i,{box:t.above,classes:o},e.metrics.bigOpSpacing5]}));return new A(r,{type:t.type})}var Sr=class qh extends w{constructor(t){var i,r,a,n;super(y(f({},t),{type:"phantom"})),this.captureSelection=!0,this.isInvisible=(i=t.isInvisible)!=null?i:!1,this.smashDepth=(r=t.
vendor: 7,819 bytes, line 2975
2975smashDepth)!=null?r:!1,this.smashHeight=(a=t.smashHeight)!=null?a:!1,this.smashWidth=(n=t.smashWidth)!=null?n:!1}static fromJson(t){return new qh(t)}toJson(){let t={};return this.isInvisible&&(t.isInvisible=!0),this.smashDepth&&(t.smashDepth=!0),this.smashHeight&&(t.smashHeight=!0),this.smashWidth&&(t.smashWidth=!0),f(f({},super.toJson()),t)}render(t){let i=new H({parent:t,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return this.isInvisible,w.createBox(i,this.body,{classes:"ML__inner"});let r=w.createBox(this.isInvisible?i:t,this.body);if(!r)return null;if(this.smashWidth){let a=new A(null,{classes:"ML__fix"});return new A([r,a],{classes:"ML__rlap"}).wrap(t)}if(!this.smashHeight&&!this.smashDepth)return r;if(this.smashHeight&&(r.height=0),this.smashDepth&&(r.depth=0),r.children)for(let a of r.children)this.smashHeight&&(a.height=0),this.smashDepth&&(a.depth=0);return new pe({firstBaseline:[{box:r}]},{type:r.type}).wrap(t)}},ya=class Vh extends w{constructor(t){var i;super(f({type:"spacing"},t)),this.width=t==null?void 0:t.width,this._braced=(i=t==null?void 0:t.braced)!=null?i:!1}static fromJson(t){return new Vh(t)}toJson(){let t=super.toJson();return this.width!==void 0&&(t.width=this.width),this._braced&&(t.braced=!0),t}render(t){var i;if(this.command==="space")return new A(this.mode==="math"?null:" ");let r;if(this.width!==void 0)r=new A(null,{classes:"ML__mspace"}),r.left=t.toEm(this.width);else{let a=(i={"\\qquad":"ML__qquad","\\quad":"ML__quad","\\enspace":"ML__enspace","\\;":"ML__thickspace","\\:":"ML__mediumspace","\\>":"ML__mediumspace","\\,":"ML__thinspace","\\!":"ML__negativethinspace"}[this.command])!=null?i:"ML__mediumspace";r=new A(null,{classes:a})}return r=this.bind(t,r),this.caret&&(r.caret=this.caret),r}_serialize(t){var i;if(!t.expandMacro&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let r=ye(this.command,this.mode);if(r!=null&&r.serialize)return r.serialize(this,t);let a=(i=this.command)!=null?i:"";return this.width===void 0?a:this._braced&&!("register"in this.width)?`${a}{${_e(this.width)}}`:`${a}${_e(this.width)}`}},jh=class Hh extends w{constructor(t){var i;super(y(f({},t),{type:"surd",mode:(i=t.mode)!=null?i:"math",style:t.style,displayContainsHighlight:!0,body:t.body})),this.above=t.index}static fromJson(t){return new Hh(y(f({},t),{index:t.above}))}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;let i=ye(this.command,this.mode);if(i!=null&&i.serialize)return i.serialize(this,t);let r=this.command,a=this.bodyToLatex(t);return this.above&&!this.hasEmptyBranch("above")?Q(`${r}[${this.aboveToLatex(t)}]`,a):/^[0-9]$/.test(a)?`${r}${a}`:Q(r,a)}get children(){if(this._children)return this._children;let t=[];if(this.above)for(let i of this.above)t.push(...i.children),t.push(i);if(this.body)for(let i of this.body)t.push(...i.children),t.push(i);return this._children=t,t}render(t){var i;let r=new H({parent:t,mathstyle:"cramp"},this.style),a=(i=w.createBox(r,this.body,{type:"inner"}))!=null?i:new A(null),n=r.scalingFactor,o=r.metrics.defaultRuleThickness/n,l=t.isDisplayStyle?St:o,s=new A(null,{classes:"ML__sqrt-line",style:this.style});s.height=o,s.softWidth=a.width;let u=n*(o+l/4),c=Math.max(n*2*l,a.height+a.depth)+u+o,d=new H({parent:t},this.style),h=this.bind(d,new A(Yn("inner","\\surd",c,!1,d,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!h)return null;let p=h.height+h.depth-o;p>a.height+a.depth+u&&(u=(u+p-(a.height+a.depth))/2),h.setTop(h.height-a.height-u);let m=this.bind(t,new pe({firstBaseline:[{box:new A(a)},u-2*o,{box:s},o]})),g=w.createBox(new H({parent:t,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!g){let x=new A([h,m],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return x.setStyle("display","inline-block"),x.setStyle("height",x.height+x.depth,"em"),this.caret&&(x.caret=this.caret),this.bind(t,x)}let v=new pe({shift:-.6*(Math.max(h.height,m.height)-Math.max(h.depth,m.depth)),children:[{box:g}]}),b=new A([new A(v,{classes:"ML__sqrt-index",type:"ignore"}),h,m],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return b.height=h.height,b.depth=h.depth,this.caret&&(b.caret=this.caret),this.bind(t,b)}},Of=class extends A{constructor(e){super(null,{type:"skip"}),this._width=e}toMarkup(){return`<span style="display:inline-block;width:${Math.ceil(this.width*100)/100}em"></span>`}};function On(e,t){if(!e.parent)return;let i=e.parent.children,r=i.indexOf(e),a=r-1;for(;a>=0&&i[a].type==="ignore";)a-=1;if(a<0&&e.parent.parent&&e.parent.type==="lift"){On(e.parent,t);return}r>0&&i[r-1].type==="skip"?i[r-1].width+=t:i.splice(r,0,new Of(t))}var If={ord:{op:3,bin:4,rel:5,inner:3},op:{ord:3,op:3,rel:5,inner:3},bin:{ord:4,op:4,open:4,inner:4},rel:{ord:5,op:5,open:5,inner:5},close:{op:3,bin:4,rel:5,inner:3},punct:{ord:3,op:3,rel:3,open:3,punct:3,inner:3},inner:{ord:3,op:3,bin:4,rel:5,open:3,punct:3,inner:3}},Rf={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function Nf(e){ea(e,(t,i)=>{i.type==="bin"&&(!t||/^(middle|bin|op|rel|open|punct)$/.test(t.type))&&(i.type="ord"),(t==null?void 0:t.type)==="bin"&&/^(rel|close|punct)$/.test(i.type)&&(t.type="ord"),i.type!=="ignore"&&(t=i)})}function va(e,t){if(!e.children)return e;let i=e.children;Nf(i);let r=t.getRegisterAsEm("thinmuskip"),a=t.getRegisterAsEm("medmuskip"),n=t.getRegisterAsEm("thickmuskip");return ea(i,(o,l)=>{var s,u,c;if(!o)return;let d=o.type,h=l.isTight?(s=Rf[d])!=null?s:null:(u=If[d])!=null?u:null,p=(c=h==null?void 0:h[l.type])!=null?c:null;p===3&&On(l,r),p===4&&On(l,a),p===5&&On(l,n)}),e}function ea(e,t,i=void 0){if(!e)return i;e=[...e];for(let r of e)r.type==="lift"?i=ea(r.children,t,i):r.type==="ignore"?ea(r.children,t):(t(i,r),ea(r.children,t),i=r);return i}var Ms=class Wh extends w{constructor(t){super({type:"tooltip",command:t.command,mode:t.mode,style:t.style,body:t.body,displayContainsHighlight:!0}),this.tooltip=new w({type:"root",mode:t.content,body:t.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(t){return new Wh(y(f({},t),{tooltip:ti(t.tooltip)}))}toJson(){var t;let i=(t=this.tooltip.body)==null?void 0:t.filter(r=>r.type!=="first").map(r=>r.toJson());return y(f({},super.toJson()),{tooltip:i})}render(t){let i=w.createBox(t,this.body);if(!i)return null;let r=new H({parent:t,mathstyle:"displaystyle"},{fontSize:bs}),a=co(va(new A(this.tooltip.render(r),{classes:"ML__tooltip-content"}),r)),n=new A([a,i],{classes:"ML__tooltip-container"});return this.caret&&(n.caret=this.caret),this.bind(t,n)}},Ri=class Uh extends w{constructor(t,i){super(y(f({},i),{type:"operator",isFunction:i==null?void 0:i.isFunction})),this.value=t,this.variant=i==null?void 0:i.variant,this.variantStyle=i==null?void 0:i.variantStyle,this.subsupPlacement=i==null?void 0:i.limits}static fromJson(t){return new Uh(t.symbol,t)}toJson(){let t=super.toJson();return this.variant&&(t.variant=this.variant),this.variantStyle&&(t.variantStyle=this.variantStyle),this.subsupPlacement&&(t.limits=this.subsupPlacement),this.value&&(t.symbol=this.value),t}render(t){var i;let r=new A(this.value,{type:"op",mode:"math",maxFontSize:t.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:t.letterShapeStyle}),a=r;if(this.superscript||this.subscript){let n=(i=this.subsupPlacement)!=null?i:"auto";a=n==="over-under"||n==="auto"&&t.isDisplayStyle?this.attachLimits(t,{base:r}):this.attachSupsub(t,{base:r})}return new A(this.bind(t,a),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"ML__op-group"}).wrap(t)}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="str
2975ing")return this.verbatimLatex;let i=ye(this.command,this.mode);if(i!=null&&i.serialize)return i.serialize(this,t);let r=[this.command];return this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&r.push("\\limits"),this.subsupPlacement==="adjacent"&&r.push("\\nolimits"),this.subsupPlacement==="auto"&&r.push("\\displaylimits")),r.push(this.supsubToLatex(t)),R(r)}};function ti(e){if(ve(e))return e.map(r=>ti(r));if(typeof e=="string")return w.fromJson(e);e=f({},e);for(let r of _r)e[r]&&(e[r]=ti(e[r]));e.args&&(e.args=qf(e.args)),e.array&&(e.array=ti(e.array));let t=e.type,i;t==="accent"&&(i=mo.fromJson(e)),t==="array"&&(i=q.fromJson(e)),t==="box"&&(i=ri.fromJson(e)),t==="chem"&&(i=Eh.fromJson(e)),t==="composition"&&(i=mh.fromJson(e)),t==="delim"&&(i=Ah.fromJson(e)),t==="enclose"&&(i=ba.fromJson(e)),t==="error"&&(i=wi.fromJson(e)),t==="extensible-symbol"&&(i=ks.fromJson(e)),t==="genfrac"&&(i=Oi.fromJson(e)),t==="group"&&(i=bh.fromJson(e)),t==="latex"&&(i=be.fromJson(e)),t==="latexgroup"&&(i=Qr.fromJson(e)),t==="leftright"&&(i=ue.fromJson(e)),t==="macro"&&(i=_h.fromJson(e)),t==="macro-argument"&&(i=zf.fromJson(e)),t==="operator"&&(i=Ri.fromJson(e)),t==="overlap"&&(i=Ii.fromJson(e)),t==="overunder"&&(i=Je.fromJson(e)),t==="placeholder"&&(i=tt.fromJson(e)),t==="prompt"&&(i=Mh.fromJson(e)),t==="phantom"&&(i=Sr.fromJson(e)),t==="sizeddelim"&&(i=Fh.fromJson(e)),t==="spacing"&&(i=ya.fromJson(e)),t==="subsup"&&(i=bo.fromJson(e)),t==="surd"&&(i=jh.fromJson(e)),t==="text"&&(i=Mr.fromJson(e)),t==="tooltip"&&(i=Ms.fromJson(e)),i||(i=w.fromJson(e));for(let r of _r)e[r]&&i.setChildren(e[r],r);return e.verbatimLatex!==void 0&&(i.verbatimLatex=e.verbatimLatex),e.subsupPlacement&&(i.subsupPlacement=e.subsupPlacement),e.explicitSubsupPlacement&&(i.explicitSubsupPlacement=!0),e.isFunction&&(i.isFunction=!0),e.skipBoundary&&(i.skipBoundary=!0),e.captureSelection&&(i.captureSelection=!0),i}function qf(e){if(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>t==="<null>"?null:typeof t=="object"&&"group"in t?{group:t.group.map(i=>ti(i))}:typeof t=="object"&&"atoms"in t?t.atoms.map(i=>ti(i)):t)}}function Ss(e,t){!e||!t||(ve(e)?e.forEach(i=>Ss(i,t)):typeof e=="object"&&e.applyStyle(t,{unstyledOnly:!0}))}function Vl(e,t,i,r){function a(o,l){for(let s of n)if(s.style[o]!==l)return!1;return!0}if(t=e.normalizeRange(t),t[0]===t[1])return!1;let n=e.getAtoms(t,{includeChildren:!0});r.operation==="toggle"&&(i.color&&a("color",i.color)&&(i.color="none",delete i.verbatimColor),i.backgroundColor&&a("backgroundColor",i.backgroundColor)&&(i.backgroundColor="none",delete i.verbatimBackgroundColor),i.fontFamily&&a("fontFamily",i.fontFamily)&&(i.fontFamily="none"),i.fontSeries&&a("fontSeries",i.fontSeries)&&(i.fontSeries="auto"),i.fontShape&&a("fontShape",i.fontShape)&&(i.fontShape="auto"),i.fontSize&&a("fontSize",i.fontSize)&&(i.fontSize=bs),i.variant&&a("variant",i.variant)&&(i.variant="normal"),i.variantStyle&&a("variantStyle",i.variantStyle)&&(i.variantStyle=""));for(let o of n)o.applyStyle(i);return!0}function Vf(e){return{up:"italic",bold:"bolditalic",italic:"italic",bolditalic:"bolditalic","":"italic"}[e??""]}function yo(e){return{up:"up",bold:"bold",italic:void 0,bolditalic:"bold","":void 0}[e??""]}var Id={acute:714,grave:715,dot:729,ddot:168,dddot:8411,ddddot:8412,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};k(Object.keys(Id),"{body:auto}",{createAtom:e=>new mo(y(f({},e),{body:T(e.args[0]),accentChar:Id[e.command.slice(1)]}))});k(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:e=>{let t=I0(T(e.args[0]));return new mo(y(f({},e),{body:T(e.args[0]),svgAccent:e.command.slice(1)+(t.length>5?"4":["1","1","2","2","3","3"][t.length])}))}});k(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:e=>new mo(y(f({},e),{body:T(e.args[0]),svgAccent:"overarc"}))});k(["underarc","underparen"],"{body:auto}",{createAtom:e=>new Je(y(f({},e),{body:T(e.args[0]),svgBelow:"underarc"}))});k("utilde","{body:auto}",{createAtom:e=>{let t=T(e.args[0]),i=I0(t),r="widetilde"+(i.length>5?"4":["1","1","2","2","3","3"][i.length]);return new Je(y(f({},e),{body:t,svgBelow:r,boxType:ga(t)}))}});k("^","{:string}",{createAtom:e=>{var t;return new w(y(f({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"â",e:"Ã
2975ª",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"}[e.args[0]])!=null?t:"^"}))}});k("`","{:string}",{createAtom:e=>{var t;return new w(y(f({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"}[e.args[0]])!=null?t:"`"}))}});k("'","{:string}",{createAtom:e=>{var t;return new w(y(f({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"á",e:"é",i:"í",o:"ó",u:"ú",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú"}[e.args[0]])!=null?t:"'"}))}});k('"',"{:string}",{createAtom:e=>{var t,i;return new w(y(f({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(i={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",A:"Ä",E:"Ë",I:"Ë",O:"Ö",U:"Ü"}[e.args[0]])!=null?i:'"'+e.args[0]:'"'}))}});k(".","{:string}",{createAtom:e=>{var t,i;return new w(y(f({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(i={a:"ȧ",e:"ė",i:"̇i",o:"ȯ",u:"̇u",A:"Ȧ",E:"Ė",I:"İ",O:"È®",U:"̇U"}[e.args[0]])!=null?i:"."+e.args[0]:"."}))}});k("=","{:string}",{createAtom:e=>{var t,i;return new w(y(f({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(i={a:"ā",e:"ē",i:"Ä«",o:"ō",u:"Å«",A:"Ā",E:"Ē",I:"Ī",O:"Ō",U:"Ū"}[e.args[0]])!=null?i:"="+e.args[0]:"="}))}});k("~","{:string}",{createAtom:e=>{var t;return new w(y(f({type:"mord"},e),{isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={n:"ñ",N:"Ñ",a:"ã",o:"õ",A:"Ã",O:"Õ"}[e.args[0]])!=null?t:"´"}))}});k("c","{:string}",{createAtom:e=>{var t;return new w(y(f({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={c:"ç",C:"Ç"}[e.args[0]])!=null?t:""}))}});k("enclose","{notation:string}[style:string]{body:auto}",{createAtom:e=>{var t,i;let r=e.args,a={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"none",svgStrokeStyle:void 0,borderStyle:void 0,style:(t=e.style)!=null?t:{}};if(r[1]){let o=r[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(let l of o){let s=l.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(s)a.strokeWidth=s[1],a.strokeStyle=s[2],a.strokeColor=s[3];else{let u=l.match(/\s*([a-z]*)\s*=\s*"(.*)"/);u&&(u[1]==="mathbackground"?a.backgroundcolor=u[2]:u[1]==="mathcolor"?a.strokeColor=u[2]:u[1]==="padding"?a.padding=u[2]:u[1]==="shadow"&&(a.shadow=u[2]))}}a.strokeStyle==="dashed"?a.svgStrokeStyle="5,5":a.strokeStyle==="dotted"&&(a.svgStrokeStyle="1,5")}a.borderStyle=`${a.strokeWidth} ${a.strokeStyle} ${a.strokeColor}`;let n={};return((i=r[0])!=null?i:"").split(/[, ]/).filter(o=>o.length>0).forEach(o=>{n[o.toLowerCase()]=!0}),new ba(e.command,T(r[2]),n,a)}});k("cancel","{body:auto}",{createAtom:e=>{var t;return new ba(e.command,T(e.args[0]),{updiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}});k("bcancel","{body:auto}",{createAtom:e=>{var t;return new ba(e.command,T(e.args[0]),{downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}});k("xcancel","{body:auto}",{createAtom:e=>{var t;return new ba(e.command,T(e.args[0]),{updiagonalstrike:!0,downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}});ps(["math","displaymath"],ze);ps("center",ze);Et(["multline","multline*"],"",ze);k("displaylines","",{parse:e=>{if(e.skipWhitespace(),!e.match("<{>"))return[];let t=[],i=[];e.mathlist.length>0&&t.push([e.mathlist]),e.beginContext({tabular:!0,root:!0});do{if(e.end()||e.match("<}>"))break;e.matchColumnSeparator()||e.matchRowSeparator()?(t.push([i]),i=[]):i.push(...e.scan(a=>["<}>","&","\\cr","\\\\","\\tabularnewline"].includes(a)))}while(!0);e.endContext(),t.push([i]);let r=e.scan();return r.length>0&&t.push([r]),t},createAtom:e=>new q("lines",e.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}],classes:["ML__multiline_environment"],isRoot:!0,minColumns:1,maxColumns:1,minRows:1})});Et("split","",ze);Et(["gather","gather*","gathered"],"",ze);Et(["equation","equation*","subequations"],"",ze);ps(["align","align*","eqnarray"],ze,{tabular:!0});Et(["aligned"],"",ze);Et("array","{columns:colspec}",(e,t,i,r)=>new q(e,t,i,{columns:r[0],mathstyleName:"textstyle"}));Et(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",ze);
vendor: 5,298 bytes, line 2975
2975Et(["smallmatrix","smallmatrix*"],"[columns:colspec]",ze);Et(["cases","dcases","rcases"],"",ze);function ze(e,t=[[[]]],i=[],r=[],a){switch(e){case"math":return new q(e,t,i,{mathstyleName:"textstyle",isRoot:!0,minColumns:1,maxColumns:1,minRows:1,maxRows:1});case"displaymath":return new q(e,t,i,{mathstyleName:"textstyle",isRoot:!0,minColumns:1,maxColumns:1,minRows:1,maxRows:1});case"center":return new q(e,t,i,{columns:[{align:"c"}],classes:["ML__center_environment"],isRoot:!0,minColumns:1,maxColumns:1,minRows:1,maxRows:1});case"multline":case"multline*":return new q(e,t,i,{columns:[{align:"m"}],leftDelim:".",rightDelim:".",isRoot:!0,minColumns:1,maxColumns:1,minRows:1});case"split":return new q(e,t,i,{columns:[{align:"r"},{align:"l"}],minColumns:2,minRows:1,isRoot:!1});case"gather":case"gather*":return new q(e,t,i,{columns:[{gap:.25},{align:"c"},{gap:0}],minColumns:1,maxColumns:1,minRows:1,isRoot:!0,classes:["ML__gather_environment"]});case"gathered":return new q(e,t,i,{columns:[{gap:.25},{align:"c"},{gap:0}],minColumns:1,maxColumns:1,minRows:1});case"equation":case"equation*":case"subequations":return new q(e,t,i,{columns:[{align:"c"}],isRoot:!0,minColumns:1,maxColumns:1,minRows:1});case"aligned":{let n=0;for(let s of t)n=Math.max(n,s.length);let o=[{gap:0},{align:"r"},{gap:.25},{align:"l"}],l=2;for(;l<n;)o.push({gap:1},{align:"r"},{gap:.25},{align:"l"}),l+=2;return o.push({gap:0}),new q(e,t,i,{arraycolsep:0,columns:o,minColumns:2,minRows:1,isRoot:e!=="aligned"})}case"eqnarray":return new q(e,t,i,{arraycolsep:0,columns:[{gap:0},{align:"r"},{align:"c"},{align:"l"}],minColumns:3,maxColumns:3,minRows:1,isRoot:!0,classes:["ML__eqnarray_environment"]});case"align":case"align*":return new q(e,t,i,{arraycolsep:0,columns:[{gap:0},{align:"r"},{gap:.25},{align:"l"}],minColumns:2,maxColumns:2,minRows:1,isRoot:!0,classes:["ML__align_environment"]});case"pmatrix":case"pmatrix*":return new q(e,t,i,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:gi(r[0],a)});case"bmatrix":case"bmatrix*":return new q(e,t,i,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:gi(r[0],a)});case"Bmatrix":case"Bmatrix*":return new q(e,t,i,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:gi(r[0],a)});case"vmatrix":case"vmatrix*":return new q(e,t,i,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:gi(r[0],a)});case"Vmatrix":case"Vmatrix*":return new q(e,t,i,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:gi(r[0],a)});case"matrix":case"matrix*":return new q(e,t,i,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:gi(r==null?void 0:r[0],a)});case"smallmatrix":case"smallmatrix*":return new q(e,t,i,{mathstyleName:"scriptstyle",columns:gi(r==null?void 0:r[0],a),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new q(e,t,i,{mathstyleName:e==="dcases"?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:Rd()});case"rcases":return new q(e,t,i,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:Rd()});case"lines":return new q(e,t,i,{leftDelim:".",rightDelim:".",columns:[{align:"l"}],isRoot:!0,minColumns:1,maxColumns:1,minRows:1})}return new q(e,t,i,{mathstyleName:"textstyle"})}function gi(e,t=10){return e??Array(t).fill({align:"c"})}function Rd(e=10){let t=[];for(let i=0;i<e;i++)i>0&&t.push({gap:1}),t.push({align:"l"});return t}k(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:e=>{var t;return new Je(y(f({},e),{body:T((t=e.args)==null?void 0:t[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:e.command.slice(1)}))}});k("overbrace","{:auto}",{createAtom:e=>new Je(y(f({},e),{body:T(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:e.command.slice(1)}))});k(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:e=>new Je(y(f({},e),{body:T(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:e.command.slice(1)}))});k(["underbrace"],"{:auto}",{createAtom:e=>new Je(y(f({},e),{body:T(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:e.command.slice(1)}))});k(["xrightarrow","longrightarrow","xleftarrow","longleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","longleftrightarrow","xLeftrightarrow","xrightleftharpoons","longrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xleftrightarrows","longleftrightarrows","xRightleftharpoons","longRightleftharpoons","xLeftrightharpoons","longLeftrightharpoons"],"[:auto]{:auto}",{createAtom:e=>{var t,i,r,a,n;return new Je(y(f({},e),{svgBody:e.command.slice(1),above:((i=T((t=e.args)==null?void 0:t[1]))==null?void 0:i.length)===0?void 0:T((r=e.args)==null?void 0:r[1]),below:(n=T((a=e.args)==null?void 0:a[0]))!=null?n:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"}))},serialize:(e,t)=>
vendor: 12,510 bytes, line 2975
2975e.command+(e.hasEmptyBranch("below")?"":`[${e.belowToLatex(t)}]`)+`{${e.aboveToLatex(t)}}${e.supsubToLatex(t)}`});k(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","cotg","coth","ctg","cth","csc","cosec","deg","dim","exp","gcd","hom","inf","ker","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th","arcsec","arccsc","arsinh","arcosh","artanh","arcsech","arccsch"],"",{isFunction:!0,ifMode:"math",createAtom:e=>new Ri(e.command.slice(1),y(f({},e),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))});k(["liminf","limsup"],"",{ifMode:"math",createAtom:e=>new Ri({"\\liminf":"lim inf","\\limsup":"lim sup"}[e.command],y(f({},e),{limits:"over-under",variant:"main"}))});k(["lim","mod"],"",{ifMode:"math",createAtom:e=>new Ri(e.command.slice(1),y(f({},e),{limits:"over-under",variant:"main"}))});k(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:e=>new Ri(e.command.slice(1),y(f({},e),{limits:"over-under",isFunction:!0,variant:"main"}))});k("ang","{:math}",{ifMode:"math",createAtom:e=>new w(y(f({},e),{body:T(e.args[0])})),serialize:(e,t)=>`\\ang{${e.bodyToLatex(t)}}`,render:(e,t)=>{let i=e.createBox(t),r=i.caret;i.caret=void 0;let a=new A("°",{style:y(f({},e.style),{variant:"normal",variantStyle:"up"})});return new A([i,a],{type:"inner",isSelected:e.isSelected,caret:r})}});k("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:e=>new jh(y(f({},e),{body:T(e.args[1]),index:e.args[0]?T(e.args[0]):void 0}))});k(["frac","dfrac","tfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:e=>{let t=f({},e),i=e.command,r=e.args;switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":t.hasBarLine=!0;break;case"\\atopfrac":t.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":t.hasBarLine=!1,t.leftDelim="(",t.rightDelim=")";break;case"\\cfrac":t.hasBarLine=!0,t.continuousFraction=!0;break}switch(i){case"\\dfrac":case"\\dbinom":t.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":t.mathstyleName="textstyle";break}return new Oi(r[0]?T(r[0]):[new tt],r[1]?T(r[1]):[new tt],t)},serialize:(e,t)=>{let i=e.aboveToLatex(t),r=e.belowToLatex(t);return/^[0-9]$/.test(i)&&/^[0-9]$/.test(r)?`${e.command}${i}${r}`:Q(e.command,i,r)}});k(["cfrac"],"[:string]{:expression}{:expression}",{ifMode:"math",createAtom:e=>{let t=f({},e),i=e.args;return t.hasBarLine=!0,t.continuousFraction=!0,i[0]==="r"&&(t.align="right"),i[0]==="l"&&(t.align="left"),new Oi(i[1]?T(i[1]):[new tt],i[2]?T(i[2]):[new tt],t)},serialize:(e,t)=>{let i=e.aboveToLatex(t),r=e.belowToLatex(t);return Q(e.command,i,r)}});k(["brace","brack"],"",{infix:!0,createAtom:e=>new Oi(T(e.args[0]),T(e.args[1]),y(f({},e),{hasBarLine:!1,leftDelim:e.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:e.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(e,t)=>R([e.aboveToLatex(t),e.command,e.belowToLatex(t)])});k(["over","atop","choose"],"",{infix:!0,createAtom:e=>{let t,i,r=e.args;return e.command==="\\choose"&&(t="(",i=")"),new Oi(T(r[0]),T(r[1]),y(f({},e),{hasBarLine:e.command==="\\over",leftDelim:t,rightDelim:i}))},serialize:(e,t)=>R([e.aboveToLatex(t),e.command,e.belowToLatex(t)])});k(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:e=>{var t,i;let r=e.args;return new Oi(T(r[0]),T(r[1]),y(f({},e),{leftDelim:(t=r[2])!=null?t:".",rightDelim:(i=r[3])!=null?i:".",hasBarLine:!1}))},serialize:(e,t)=>`${e.aboveToLatex(t)} ${e.command}${e.leftDelim}${e.rightDelim}${e.belowToLatex(t)}`});k("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:e=>new Oi(T(e.args[0]),T(e.args[1]),y(f({},e),{hasBarLine:!0,numerPrefix:"∂",denomPrefix:"∂"})),serialize:(e,t)=>R([e.aboveToLatex(t),e.command,e.belowToLatex(t)])});k(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:e=>new ks({coprod:"∐",bigvee:"⋁",bigwedge:"⋀",biguplus:"⨄",bigcap:"⋂",bigcup:"⋃",intop:"∫",prod:"∏",sum:"∑",bigotimes:"⨂",bigoplus:"⨁",bigodot:"⨀",bigsqcup:"⨆",smallint:"∫"}[e.command.slice(1)],y(f({},e),{limits:"auto",variant:"main"}))});k("smallint","",{ifMode:"math",createAtom:e=>new Ri("∫",y(f({},e),{limits:"adjacent",variant:"main"}))});var Nd={int:"∫",iint:"∬",iiint:"∭",oint:"∮",oiint:"∯",oiiint:"∰",intclockwise:"∱",varointclockwise:"∲",ointctrclockwise:"∳",intctrclockwise:"⨑",sqcup:"⊔",sqcap:"⊓",uplus:"⊎",wr:"≀",amalg:"⨿",Cap:"⋒",Cup:"⋓",doublecap:"⋒",doublecup:"⋓"};k(Object.keys(Nd),"",{ifMode:"math",createAtom:e=>{let t=e.command,i=Nd[t.slice(1)];return new ks(i,y(f({},e),{limits:"adjacent",variant:{"⋒":"ams","⋓":"ams"}[i]}))}});k(["Re","Im"],"",{ifMode:"math",createAtom:e=>new Ri({"\\Re":"ℜ","\\Im":"ℑ"}[e.command],y(f({},e),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))});k("middle","{:delim}",{ifMode:"math",createAtom:e=>{var t;return new Ah(y(f({},e),{delim:(t=e.args[0])!=null?t:"|",size:1}))}});k("the","{:value}",{createAtom:e=>new w(y(f({},e),{captureSelection:!0,verbatimLatex:null})),render:(e,t)=>{var i;let r=new H({parent:t},e.style),a="";e.isSelected&&(a+=" ML__selected");let n=r.evaluate(e.args[0]);return new A(((i=_e(n))!=null?i:"").split("").map(o=>new A(o,{type:"ord",classes:a,mode:e.mode,isSelected:e.isSelected,style:f({variant:"main"},e.style)})),{type:"lift",style:e.style,caret:e.caret,isSelected:e.isSelected,classes:a}).wrap(r)},serialize:e=>{var t;return`\\the${(t=_e(e.args[0]))!=null?t:"\\relax"}`}});k("mathtip","{:auto}{:math}",{createAtom:e=>new Ms(y(f({},e),{body:T(e.args[0]),tooltip:T(e.args[1]),content:"math"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\mathtip{${e.bodyToLatex(t)}}{${w.serialize([e.tooltip],y(f({},t),{defaultMode:"math"}))}}`});k("texttip","{:auto}{:text}",{createAtom:e=>new Ms(y(f({},e),{body:T(e.args[0]),tooltip:T(e.args[1]),content:"text"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\texttip{${e.bodyToLatex(t)}}{${w.serialize([e.tooltip],y(f({},t),{defaultMode:"text"}))}}`});k("error","{:math}",{createAtom:e=>new w(y(f({},e),{body:T(e.args[0])})),serialize:(e,t)=>`\\error{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__error"})});k("ensuremath","{:math}",{createAtom:e=>new w(y(f({},e),{body:T(e.args[0])})),serialize:(e,t)=>`${e.command}{${e.bodyToLatex(y(f({},t),{defaultMode:"math"}))}}`});k("color","{:value}",{applyStyle:(e,t,i,r)=>{var a,n;return y(f({},e),{verbatimColor:(a=_e(i[0]))!=null?a:void 0,color:r.toColor((n=i[0])!=null?n:{string:"red"})})}});k("textcolor","{:value}{content:auto*}",{applyStyle:(e,t,i,r)=>{var a,n;return y(f({},e),{verbatimColor:(a=_e(i[0]))!=null?a:void 0,color:r.toColor((n=i[0])!=null?n:{string:"red"})})}});k("boxed","{content:math}",{createAtom:e=>new ri(y(f({},e),{body:T(e.args[0]),framecolor:{string:"black"}}))});k("colorbox","{:value}{:text*}",{applyStyle:(e,t,i,r)=>{var a,n;return y(f({},e),{verbatimBackgroundColor:(a=_e(i[0]))!=null?a:void 0,backgroundColor:r.toBackgroundColor((n=i[0])!=null?n:{string:"yellow"})})}});k("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:e=>{var t,i;return new ri(y(f({},e),{body:T(e.args[2]),framecolor:(t=e.args[0])!=null?t:{string:"blue"},backgroundcolor:(i=e.args[1])!=null?i:{string:"yellow"}}))},serialize:(e,t)=>{var i,r;return t.skipStyles?e.bodyToLatex(y(f({},t),{defaultMode:"text"})):Q(e.command,(i=_e(e.framecolor))!=null?i:"",(r=_e(e.backgroundcolor))!=null?r:"",e.bodyToLatex(y(f({},t),{defaultMode:"text"})))}});k("bbox","[:bbox]{body:auto}",{createAtom:e=>{var t;let i=e.args[0],r=T(e.args[1]);return i?new ri(y(f({},e),{body:r,padding:i.padding,border:i.border,backgroundcolor:(t=i.backgroundcolor)!=null?t:void 0})):new ri(y(f({},e),{body:r}))},serialize:(e,t)=>{var i,r;if(t.skipStyles)return e.bodyToLatex(t);let a=e.command;if(Number.isFinite(e.padding)||e.border!==void 0||e.backgroundcolor!==void 0){let n=[];e.padding&&n.push((i=_e(e.padding))!=null?i:""),e.border&&n.push(`border: ${e.border}`),e.backgroundcolor&&n.push((r=_e(e.backgroundcolor))!=null?r:""),a+=`[${n.join(",")}]`}return Q(a,e.bodyToLatex(t))}});k(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:e=>new w(y(f({},e),{body:T(e.args[0])})),render:(e,t)=>{let i=new H({parent:t,mathstyle:e.command.slice(1)},e.style),r=w.createBox(i,e.body,{type:"lift"});return e.caret&&(r.caret=e.caret),e.bind(t,r)},serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`{${R([e.command,e.bodyToLatex(t)])}}`});k(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{applyStyle:(e,t)=>y(f({},e),{fontSize:{"\\tiny":1,"\\scriptsize":2,"\\footnotesize":3,"\\small":4,"\\normalsize":5,"\\large":6,"\\Large":7,"\\LARGE":8,"\\huge":9,"\\Huge":10}[t]})});k("fontseries","{:string}",{ifMode:"text",applyStyle:(e,t,i)=>{var r;return y(f({},e),{fontSeries:(r=i[0])!=null?r:"auto"})}});k("fontshape","{:string}",{ifMode:"text",applyStyle:(e,t,i)=>{var r;return y(f({},e),{fontShape:(r=i[0])!=null?r:"auto"})}});k("fontfamily","{:string}",{ifMode:"text",applyStyle:(e,t,i)=>{var r;return y(f({},e),{fontFamily:(r=i[0])!=null?r:"roman"})}});k("selectfont","",{ifMode:"text",applyStyle:e=>e});k("bf","{:rest*}",{applyStyle:e=>y(f({},e),{fontSeries:"b",fontShape:"n",fontFamily:"roman"})});k(["boldsymbol","bm","bold"],"{:math*}",{applyMode:"math",applyStyle:e=>y(f({},e),{variantStyle:"bold"})});k("bfseries","{:rest*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontSeries:"b"})});k("mdseries","{:rest*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontSeries:"m"})});k("upshape","{:rest*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontShape:"n"})});k("slshape","{:rest*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontShape:"sl"})});k("scshape","{:rest*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontShape:"sc"})});k("textbf","{:text*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontSeries:"b"})});k("textmd","{:text*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontSeries:"m"})});k("textup","{:text*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontShape:"n"})});k("textnormal","{:text*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontShape:"n",fontSeries:"m"})});k("textsl","{:text*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontShape:"sl"})});k("textit","{:text*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontShape:"it"})});k("textsc","{:text*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontShape:"sc"})});k("textrm","{:text*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontFamily:"roman"})});k("textsf","{:text*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontFamily:"sans-serif"})});k("texttt","{:text*}",{applyMode:"text",applyStyle:e=>y(f({},e),{fontFamily:"monospace"})});k("mathbf","{:math*}",{applyMode:"math",applyStyle:e=>y(f({},e),{variant:"normal",variantStyle:"bold"})});k("mathit","{:math*}",{applyMode:"math",applyStyle:e=>y(f({},e),{variant:"main",variantStyle:"italic"})});k("mathnormal","{:math*}",{applyMode:"math",applyStyle:e=>y(f({},e),{variant:"normal",variantStyle:"italic"})});k("mathbfit","{:math*}",{applyMode:"math",applyStyle:e=>y(f({},e),{variant:"main",variantStyle:"bolditalic"})});k("mathrm","{:math*}",{applyMode:"math",applyStyle:e=>y(f({},e),{variant:"normal",variantStyle:"up"})});k("mathsf","{:math*}",{applyMode:"math",applyStyle:e=>y(f({},e),{variant:"sans-serif",variantStyle:"up"})});k("mathtt","{:math*}",{applyMode:"math",applyStyle:e=>y(f({},e),{variant:"monospace",variantStyle:"up"})});k("it","{:rest*}",{applyStyle:e=>y(f({},e),{fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})});k("rmfamily","{:rest*}",{applyStyle:e=>y(f({},e),{fontFamily:"roman"})});k("sffamily","{:rest*}",{applyStyle:e=>y(f({},e),{fontFamily:"sans-serif"})});k("ttfamily","{:rest*}",{applyStyle:e=>y(f({},e),{fontFamily:"monospace"})});k(["Bbb","mathbb"],"{:math*}",{applyStyle:e=>y(f({},e),{variant:"double-struck",variantStyle:yo(e.variantStyle)})});k(["frak","mathfrak"],"{:math*}",{applyStyle:e=>y(f({},e),{variant:"fraktur",variantStyle:yo(e.variantStyle)})});k("mathcal","{:math*}",{applyStyle:e=>y(f({},e),{variant:"calligraphic",variantStyle:yo(e.variantStyle)})});k("mathscr","{:math*}",{applyStyle:e=>y(f({},e),{variant:"script",variantStyle:yo(e.variantStyle)})});k("mbox","{:text}",{ifMode:"math",createAtom:e=>new w(y(f({},e),{type:"mord",body:T(e.args[0]),mode:"math"})),serialize:(e,t)=>
vendor: 17,417 bytes, line 2975
2975Q("\\mbox",e.bodyToLatex(y(f({},t),{defaultMode:"text"})))});k("text","{:text}",{ifMode:"math",applyMode:"text"});k(["class","htmlClass"],"{name:string}{content:auto*}",{createAtom:e=>new w(y(f({},e),{type:"mord",body:T(e.args[1])})),serialize:(e,t)=>!e.args[0]||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`,render:(e,t)=>{var i;return e.createBox(t,{classes:(i=e.args[0])!=null?i:"",boxType:"lift"})}});k(["cssId","htmlId"],"{id:string}{content:auto*}",{createAtom:e=>new w(y(f({},e),{type:"mord",body:T(e.args[1])})),serialize:(e,t)=>{var i;return!((i=e.args)!=null&&i[0])||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var i;let r=e.createBox(t);return r.cssId=(i=e.args[0])!=null?i:"",r}});k("htmlData","{data:string}{content:auto*}",{createAtom:e=>new w(y(f({},e),{type:"mord",body:T(e.args[1])})),serialize:(e,t)=>{var i;return!((i=e.args)!=null&&i[0])||t.skipStyles?e.bodyToLatex(t):`\\htmlData{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var i;let r=e.createBox(t);return r.htmlData=(i=e.args[0])!=null?i:"",r}});k(["style","htmlStyle"],"{data:string}{content:auto*}",{createAtom:e=>new w(y(f({},e),{type:"mord",body:T(e.args[1])})),serialize:(e,t)=>{var i;return!((i=e.args)!=null&&i[0])||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var i;let r=e.createBox(t);return r.htmlStyle=(i=e.args[0])!=null?i:"",r}});k("href","{url:string}{content:auto*}",{createAtom:e=>new w(y(f({},e),{type:"mord",body:T(e.args[1])})),render:(e,t)=>{var i;let r=e.createBox(t),a=(i=e.args[0])!=null?i:"";return a&&(r.htmlData=`href=${a}`),r}});k("em","{:rest}",{createAtom:e=>new w(y(f({},e),{body:T(e.args[0])})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`{\\em ${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__emph",boxType:"lift"})});k("emph","{:auto}",{createAtom:e=>new w(y(f({},e),{body:T(e.args[1])})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\emph{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__emph",boxType:"lift"})});var qd={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}};k(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:e=>{var t;return new Fh(y(f({},e),{delim:(t=e.args[0])!=null?t:".",size:qd[e.command].size,delimType:qd[e.command].mclass}))},serialize:(e,t)=>R([e.command,/^[a-zA-Z]/.test(e.value)?`{${e.value}}`:e.value])});k(["hspace","hspace*"],"{width:value}",{createAtom:e=>{var t;return new ya(y(f({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}});k(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:e=>{var t;return new ya(y(f({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}});k("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:e=>new w(e),render:(e,t)=>{let i=0,r=t.mathstyle.id;(r===po||r===ki)&&(i=1),(r===mr||r===Oe)&&(i=2),(r===Ci||r===Ce)&&(i=3);let a=T(e.args[i]);return w.createBox(t,a)},serialize:(e,t)=>`\\mathchoice{${w.serialize(e.args[0],t)}}{${w.serialize(e.args[1],t)}}{${w.serialize(e.args[2],t)}}{${w.serialize(e.args[3],t)}}`});k("mathop","{:auto}",{createAtom:e=>new w(y(f({},e),{type:"mop",body:T(e.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(e,t)=>{var i;let r=w.createBox(t,e.body);if(e.superscript||e.subscript){let a=(i=e.subsupPlacement)!=null?i:"auto";r=a==="over-under"||a==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:r}):e.attachSupsub(t,{base:r})}return e.caret&&(r.caret=e.caret),new A(e.bind(t,r),{type:"op",isSelected:e.isSelected,classes:"ML__op-group"})},serialize:(e,t)=>{let i=[Q(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&i.push("\\limits"),e.subsupPlacement==="adjacent"&&i.push("\\nolimits"),e.subsupPlacement==="auto"&&i.push("\\displaylimits")),i.push(e.supsubToLatex(t)),R(i)}});k(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:e=>new w(y(f({},e),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[e.command],body:T(e.args[0])}))});k(["operatorname","operatorname*"],"{operator:math}",{createAtom:e=>{let t=T(e.args[0]).map(i=>{var r;return i.type!=="first"&&(i.type="mord",i.value=(r={"∗":"*","−":"-"}[i.value])!=null?r:i.value,i.isFunction=!1,!i.style.variant&&!i.style.variantStyle&&(i.style.variant="main",i.style.variantStyle="up")),i});return new w(y(f({},e),{type:"mop",body:t,isFunction:!0,limits:e.command==="\\operatorname"?"adjacent":"over-under"}))},render:(e,t)=>{var i;let r=w.createBox(t,e.body);if(e.superscript||e.subscript){let a=(i=e.subsupPlacement)!=null?i:"auto";r=a==="over-under"||a==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:r}):e.attachSupsub(t,{base:r})}return e.caret&&(r.caret=e.caret),new A(e.bind(t,r),{type:"op",isSelected:e.isSelected,classes:"ML__op-group"})},serialize:(e,t)=>{let i=[Q(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&i.push("\\limits"),e.subsupPlacement==="adjacent"&&i.push("\\nolimits"),e.subsupPlacement==="auto"&&i.push("\\displaylimits")),i.push(e.supsubToLatex(t)),R(i)}});k(["char","unicode"],"{charcode:value}",{createAtom:e=>new w(y(f({},e),{type:e.mode==="text"?"text":"mord"})),serialize:e=>{var t;return`${e.command}${_e((t=e.args[0])!=null?t:{number:10067,base:"hexadecimal"})}`},render:(e,t)=>{let i=t.evaluate(e.args[0]);return(!i||!("number"in i))&&(i={number:10067,base:"hexadecimal"}),e.value=String.fromCodePoint(i.number),e.createBox(t)}});k("rule","[raise:value]{width:value}{thickness:value}",{createAtom:e=>new w(e),render:(e,t)=>{var i,r,a;let n=new H({parent:t,mathstyle:"textstyle"},e.style),o=n.toEm((i=e.args[0])!=null?i:{dimension:0}),l=n.toEm((r=e.args[1])!=null?r:{dimension:10}),s=n.toEm((a=e.args[2])!=null?a:{dimension:10}),u=new A(null,{classes:"ML__rule",type:"ord"});return u.width=l,u.height=s+o,u.depth=-o,u.setStyle("border-right-width",l,"em"),u.setStyle("border-top-width",s,"em"),u.setStyle("border-color",e.style.color),u.setStyle("vertical-align",o,"em"),e.isSelected&&u.setStyle("opacity","50%"),e.bind(n,u),e.caret&&(u.caret=e.caret),u.wrap(t)},serialize:e=>`\\rule${e.args[0]?`[${_e(e.args[0])}]`:""}{${_e(e.args[1])}}{${_e(e.args[2])}}`});k(["overline","underline"],"{:auto}",{createAtom:e=>new w(y(f({},e),{body:T(e.args[0])})),render:(e,t)=>{let i=e.command.substring(1),r=new H({parent:t,mathstyle:"cramp"},e.style),a=w.createBox(r,e.body);if(!a)return null;let n=r.metrics.defaultRuleThickness/r.scalingFactor,o=new A(null,{classes:i+"-line"});o.height=n,o.maxFontSize=n*1.125*r.scalingFactor;let l;return i==="overline"?l=new pe({shift:0,children:[{box:a},3*n,{box:o},n]}):l=new pe({top:a.height,children:[n,{box:o},3*n,{box:a}]}),e.caret&&(l.caret=e.caret),new A(l,{classes:i,type:"ignore"})}});k("overset","{:auto}{base:auto}",{createAtom:e=>{let t=T(e.args[1]);return new Je(y(f({},e),{above:T(e.args[0]),body:t,skipBoundary:!1,boxType:ga(t)}))},serialize:(e,t)=>Q(e.command,e.aboveToLatex(t),e.bodyToLatex(t))});k("underset","{:auto}{base:auto}",{createAtom:e=>{let t=T(e.args[1]);return new Je(y(f({},e),{below:T(e.args[0]),body:t,skipBoundary:!1,boxType:ga(t)}))},serialize:(e,t)=>Q(e.command,e.belowToLatex(t),e.bodyToLatex(t))});k("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:e=>{let t=T(e.args[2]);return new Je(y(f({},e),{above:T(e.args[0]),below:T(e.args[1]),body:t,skipBoundary:!1,boxType:ga(t)}))},serialize:(e,t)=>Q(e.command,e.belowToLatex(t),e.bodyToLatex(t))});k(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:e=>new Je(y(f({},e),{body:T(e.args[2]),above:T(e.args[1]),below:T(e.args[0]),skipBoundary:!1,boxType:e.command==="\\stackrel"?"rel":"bin"})),serialize:(e,t)=>Q(e.command,e.aboveToLatex(t),e.bodyToLatex(t))});k("smash","[:string]{:auto}",{createAtom:e=>{var t,i,r,a;return new Sr(y(f({},e),{body:T(e.args[1]),smashHeight:(i=(t=e.args[0])==null?void 0:t.includes("t"))!=null?i:!0,smashDepth:(a=(r=e.args[0])==null?void 0:r.includes("b"))!=null?a:!0}))}});k("vphantom","{:auto}",{createAtom:e=>new Sr(y(f({},e),{body:T(e.args[0]),isInvisible:!0,smashWidth:!0}))});k("hphantom","{:auto}",{createAtom:e=>new Sr(y(f({},e),{body:T(e.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))});k("phantom","{:auto}",{createAtom:e=>new Sr(y(f({},e),{body:T(e.args[0]),isInvisible:!0}))});k("mathstrut","",{createAtom:e=>new Sr(y(f({},e),{body:[new w({value:"("})],isInvisible:!0}))});k("not","{:math}",{createAtom:e=>{let t=T(e.args[0]);return t.length===0?new w(y(f({},e),{type:"mrel",value:""})):new w(y(f({},e),{body:[new Ii(y(f({},e),{body:"",align:"right"})),...t],captureSelection:!0}))},serialize:(e,t)=>{let i=e.args[0],r=i&&typeof i=="object"&&"group"in i;return e.value!==""?r?`\\not{${w.serialize(i.group,t)}}`:`\\not${w.serialize(i,t)}`:r?"\\not{}":"\\not"},render:(e,t)=>{if(e.value)return e.createBox(t);let i=e.args[0]&&typeof e.args[0]=="object"&&"group"in e.args[0]?"ord":ga(T(e.args[0])),r=w.createBox(t,e.body,{type:i});return e.caret&&(r.caret=e.caret),e.bind(t,r)}});k(["ne","neq"],"",{createAtom:e=>new w(y(f({},e),{type:"mrel",body:[new Ii(y(f({},e),{body:"",align:"right",boxType:"rel"})),new w(y(f({},e),{value:"="}))],captureSelection:!0})),serialize:e=>e.command});k("rlap","{:auto}",{createAtom:e=>new Ii(y(f({},e),{body:T(e.args[0]),align:"right"}))});k("llap","{:auto}",{createAtom:e=>new Ii(y(f({},e),{body:T(e.args[0]),align:"left"}))});k("mathrlap","{:math}",{createAtom:e=>new Ii(y(f({},e),{body:T(e.args[0]),align:"right"}))});k("mathllap","{:math}",{createAtom:e=>new Ii(y(f({},e),{body:T(e.args[0]),align:"left"}))});k("raisebox","{:value}{:text}",{createAtom:e=>{var t;return new ri(y(f({},e),{body:T(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var i;return Q("\\raisebox",(i=_e(e.offset))!=null?i:"0pt",e.bodyToLatex(t))}});k("raise","{:value}{:auto}",{createAtom:e=>{var t;return new ri(y(f({},e),{body:T(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var i;return Q("\\raise",(i=_e(e.offset))!=null?i:"0pt",e.bodyToLatex(t))}});k("lower","{:value}{:auto}",{createAtom:e=>{var t;return new ri(y(f({},e),{body:T(e.args[1]),padding:{dimension:0},offset:(t=st(e.args[0],-1))!=null?t:{dimension:0}}))},serialize:(e,t)=>{var i,r;return Q("\\lower",(r=_e(st((i=e.offset)!=null?i:{dimension:0},-1)))!=null?r:"0pt",e.bodyToLatex(t))}});xe("0123456789/@.?!");O0(65,90);O0(97,122);xe([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]);xe([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]);xe([["\\backslash",92],["\\nabla",8711],["\\partial",8706],["\\ell",8467],["\\hbar",8463],["\\pounds",163],["\\euro",8364]]);xe([["\\rightarrow",8594],["\\to",8594],["\\leftarrow",8592],["\\gets",8592],["\\Rightarrow",8658],["\\Leftarrow",8656],["\\longrightarrow",10230],["\\longleftarrow",10229],["\\Longrightarrow",10233],["\\implies",10233],["\\Longleftarrow",10232],["\\impliedby",10232],["\\longleftrightarrow",10231],["\\biconditional",10231],["\\Longleftrightarrow",10234],["\\mapsto",8614],["\\longmapsto",10236],["\\uparrow",8593],["\\downarrow",8595],["\\Uparrow",8657],["\\Downarrow",8659],["\\updownarrow",8597],["\\Updownarrow",8661],["\\hookrightarrow",8618],["\\hookleftarrow",8617],["\\rightharpoonup",8640],["\\leftharpoonup",8636],["\\rightharpoondown",8641],["\\leftharpoondown",8637],["\\searrow",8600],["\\nearrow",8599],["\\swarrow",8601],["\\nwarrow",8598],["\\originalof",8886],["\\laplace",8886],["\\imageof",8887],["\\Laplace",8887]],"mrel");xe([["\\mapsfrom",8612,"mrel"],["\\Mapsfrom",10502,"mrel"],["\\MapsTo",10503,"mrel"],["\\Yup",8516,"mord"],["\\lightning",8623,"mrel"],["\\leftarrowtriangle",8701,"mrel"],["\\rightarrowtriangle",8702,"mrel"],["\\leftrightarrowtriangle",8703,"mrel"],["\\boxdot",8865,"mbin"],["\\bigtriangleup",9651,"mbin"],["\\bigtriangledown",9661,"mbin"],["\\boxbar",9707,"mbin"],["\\Lbag",10181,"mopen"],["\\Rbag",10182,"mclose"],["\\llbracket",10214,"mopen"],["\\rrbracket",10215,"mclose"],["\\longmapsfrom",10235,"mrel"],["\\Longmapsfrom",10237,"mrel"],["\\Longmapsto",10238,"mrel"],["\\boxslash",10692,"mbin"],["\\boxbslash",10693,"mbin"],["\\boxast",10694,"mbin"],["\\boxcircle",10695,"mbin"],["\\boxbox",10696,"mbin"],["\\fatsemi",10783,"mop"],["\\leftslice",10918,"mrel"],["\\rightslice",10919,"mrel"],["\\interleave",10996,"mbin"],["\\biginterleave",11004,"mop"],["\\sslash",11005,"mbin"],["\\talloblong",11006,"mbin"]]);xe([["\\lbrace",123,"mopen"],["\\rbrace",125,"mclose"],["\\lparen",40,"mopen"],["\\rparen",41,"mclose"],["\\langle",10216,"mopen"],["\\rangle",10217,"mclose"],["\\lfloor",8970,"mopen"],["\\rfloor",8971,"mclose"],["\\lceil",8968,"mopen"],["\\rceil",8969,"mclose"],["\\vert",8739],["\\lvert",8739,"mopen"],["\\rvert",8739,"mclose"],["\\|",8741],["\\Vert",8741],["\\mVert",8741],["\\lVert",8741,"mopen"],["\\rVert",8741,"mclose"],["\\lbrack",91,"mopen"],["\\rbrack",93,"mclose"],["\\{",123,"mopen"],["\\}",125,"mclose"],["(",40,"mopen"],[")",41,"mclose"],["[",91,"mopen"],["]",93,"mclose"],["\\ulcorner",9484,"mopen","ams"],["\\urcorner",9488,"mclose","ams"],["\\llcorner",9492,"mopen","ams"],["\\lrcorner",9496,"mclose","ams"],["\\lgroup",10222,"mopen"],["\\rgroup",10223,"mclose"],["\\lmoustache",9136,"mopen"],["\\rmoustache",9137,"mclose"]]);xe([["\\dashrightarrow",8674],["\\dashleftarrow",8672],["\\Rrightarrow",8667],["\\Lleftarrow",8666],["\\leftrightarrows",8646],["\\rightleftarrows",8644],["\\curvearrowright",8631],["\\curvearrowleft",8630],["\\rightrightarrows",8649],["\\leftleftarrows",8647],["\\upuparrows",8648],["\\downdownarrows",8650],["\\vartriangle",9651],["\\triangleq",8796],["\\vartriangleleft",8882],["\\trianglelefteq",8884],["\\ntriangleleft",8938],["\\ntrianglelefteq",8940],["\\vartriangleright",8883],["\\trianglerighteq",8885],["\\ntriangleright",8939],["\\ntrianglerighteq",8941],["\\blacktriangleleft",9664],["\\blacktriangleright",9654],["\\leftarrowtail",8610],["\\rightarrowtail",8611],["\\looparrowright",8620],["\\looparrowleft",8619],["\\twoheadleftarrow",8606],["\\twoheadrightarrow",8608],["\\twoheadrightarrowtail",10518],["\\rightleftharpoons",8652],["\\leftrightharpoons",8651],["\\Rsh",8625],["\\Lsh",8624],["\\circlearrowright",8635],["\\circlearrowleft",8634],["\\restriction",8638],["\\upharpoonright",8638],["\\upharpoonleft",8639],["\\downharpoonright",8642],["\\downharpoonleft",8643],["\\rightsquigarrow",8669],["\\leadsto",8669],["\\leftrightsquigarrow",8621],["\\multimap",8888],["\\nleftarrow",8602],["\\nrightarrow",8603],["\\nRightarrow",8655],["\\nLeftarrow",8653],["\\nleftrightarrow",8622],["\\nLeftrightarrow",8654],["\\nvrightarrow",8696],["\\nvtwoheadrightarrow",10496],["\\nvrightarrowtail",10516],["\\nvtwoheadrightarrowtail",10519],["\\shortparallel",8741],["\\nless",8814],["\\nleqslant",57360],["\\lneq",10887],["\\lneqq",8808],["\\nleqq",57361],["\\lvertneqq",57356],["\\lnsim",8934],["\\lnapprox",10889],["\\nprec",8832],["\\npreceq",8928],["\\precnsim",8936],["\\precnapprox",10937],["\\nsim",8769],["\\nshortmid",57350],["\\nmid",8740],["\\nvdash",8876],["\\nvDash",8877],["\\ngtr",8815],["\\ngeqslant",57359],["\\ngeqq",57358],["\\gneq",10888],["\\gneqq",8809],["\\gvertneqq",57357],["\\gnsim",8935],["\\gnapprox",10890],["\\nsucc",8833],["\\nsucceq",8929],["\\succnsim",8937],["\\succnapprox",10938],["\\ncong",8774],["\\nshortparallel",57351],["\\nparallel",8742],["\\nVDash",8879],["\\nsupseteqq",57368],["\\supsetneq",8843],["\\varsupsetneq",57371],["\\supsetneqq",10956],["\\varsupsetneqq",57369],["\\nVdash",8878],["\\precneqq",10933],["\\succneqq",10934],["\\nsubseteqq",57366],["\\leqslant",10877],["\\geqslant",10878],["\\gtrsim",8819],["\\approxeq",8778],["\\thickapprox",8776],["\\lessapprox",10885],["\\gtrapprox",10886],["\\precapprox",10935],["\\succapprox",10936],["\\thicksim",8764],["\\succsim",8831],["\\precsim",8830],["\\backsim",8765],["\\eqsim",8770],["\\backsimeq",8909],["\\lesssim",8818],["\\nleq",8816],["\\ngeq",8817],["\\smallsmile",8995],["\\smallfrown",8994],["\\leqq",8806],["\\eqslantless",10901],["\\lll",8920],["\\lessgtr",8822],["\\lesseqgtr",8922],["\\lesseqqgtr",10891],["\\risingdotseq",8787],["\\fallingdotseq",8786],["\\subseteqq",10949],["\\Subset",8912],["\\sqsubset",8847],["\\preccurlyeq",8828],["\\curlyeqprec",8926],["\\vDash",8872],["\\Vvdash",8874],["\\bumpeq",8783],["\\Bumpeq",8782],["\\geqq",8807],["\\eqslantgtr",10902],["\\ggg",8921],["\\gtrless",8823],["\\gtreqless",8923],["\\gtreqqless",10892],["\\supseteqq",10950],["\\Supset",89
vendor: 5,577 bytes, line 2975
297513],["\\sqsupset",8848],["\\succcurlyeq",8829],["\\curlyeqsucc",8927],["\\Vdash",8873],["\\shortmid",8739],["\\between",8812],["\\pitchfork",8916],["\\varpropto",8733],["\\backepsilon",8717],["\\llless",8920],["\\gggtr",8921],["\\doteqdot",8785],["\\Doteq",8785],["\\eqcirc",8790],["\\circeq",8791],["\\therefore",8756],["\\because",8757]],"mrel","ams");xe([["+",43],["-",8722],["−",8722],["\\pm",177],["\\mp",8723],["*",8727],["\\times",215],["\\div",247],["\\divides",8739],["\\cdot",8901],["\\cap",8745],["\\cup",8746],["\\setminus",8726],["\\land",8743],["\\wedge",8743],["\\lor",8744],["\\vee",8744],["\\circ",8728],["\\bigcirc",9711],["\\bullet",8729],["\\oplus",8853],["\\ominus",8854],["\\otimes",8855],["\\odot",8857],["\\oslash",8856],["\\bigtriangleup",9651],["\\bigtriangledown",9661],["\\triangleleft",9667],["\\triangleright",9657],["\\And",38],["\\dagger",8224],["\\dag",8224],["\\ddag",8225],["\\ddagger",8225],["\\ast",8727],["\\star",8902],["\\bigstar",9733],["\\diamond",8900]],"mbin");xe([["\\lhd",8882],["\\rhd",8883],["\\lessdot",8918],["\\gtrdot",8919],["\\ltimes",8905],["\\rtimes",8906],["\\leftthreetimes",8907],["\\rightthreetimes",8908],["\\intercal",8890],["\\dotplus",8724],["\\doublebarwedge",10846],["\\divideontimes",8903],["\\centerdot",8901],["\\smallsetminus",8726],["\\barwedge",8892],["\\veebar",8891],["\\nor",8891],["\\curlywedge",8911],["\\curlyvee",8910],["\\boxminus",8863],["\\boxplus",8862],["\\boxtimes",8864],["\\boxdot",8865],["\\circleddash",8861],["\\circledast",8859],["\\circledcirc",8858],["\\unlhd",8884],["\\unrhd",8885]],"mbin","ams");xe([["\\surd",8730],["\\S",167],["\\infty",8734],["\\prime",8242],["\\doubleprime",8243],["\\angle",8736],["`",8216],["\\$",36],["\\%",37],["\\_",95],["\\alpha",945],["\\beta",946],["\\gamma",947],["\\delta",948],["\\epsilon",1013],["\\varepsilon",949],["\\zeta",950],["\\eta",951],["\\theta",952],["\\vartheta",977],["\\iota",953],["\\kappa",954],["\\varkappa",1008,"mord","ams"],["\\lambda",955],["\\mu",956],["\\nu",957],["\\xi",958],["\\omicron",111],["\\pi",960],["\\varpi",982],["\\rho",961],["\\varrho",1009],["\\sigma",963],["\\varsigma",962],["\\tau",964],["\\phi",981],["\\varphi",966],["\\upsilon",965],["\\chi",967],["\\psi",968],["\\omega",969],["\\Gamma",915],["\\Delta",916],["\\Theta",920],["\\Lambda",923],["\\Xi",926],["\\Pi",928],["\\Sigma",931],["\\Upsilon",933],["\\Phi",934],["\\Psi",936],["\\Omega",937],["\\digamma",989,"mord","ams"],["\\varkappa",1008,"mord","ams"],["\\coppa",985,"mord","ams"],["\\koppa",985,"mord","ams"],["\\Coppa",984,"mord","ams"],["\\Koppa",984,"mord","ams"],["\\sampi",993,"mord","ams"],["\\Sampi",992,"mord","ams"],["\\emptyset",8709]]);xe([["=",61],["<",60],["\\lt",60],[">",62],["\\gt",62],["\\le",8804],["\\leq",8804],["\\ge",8805],["\\geq",8805],["\\ll",8810],["\\gg",8811],["\\coloneq",8788],["\\coloneqq",8788],["\\colonequals",8788],["\\measeq",8797],["\\eqdef",8798],["\\questeq",8799],[":",58],["\\cong",8773],["\\equiv",8801],["\\prec",8826],["\\preceq",10927],["\\succ",8827],["\\succeq",10928],["\\perp",10178],["\\propto",8733],["\\Colon",8759],["\\smile",8995],["\\frown",8994],["\\sim",8764],["\\doteq",8784],["\\bowtie",8904],["\\Join",8904],["\\asymp",8781],["\\sqsubseteq",8849],["\\sqsupseteq",8850],["\\approx",8776],["\\~",126],["\\leftrightarrow",8596],["\\Leftrightarrow",8660],["\\models",8872],["\\vdash",8866],["\\dashv",8867],["\\roundimplies",10608],["\\in",8712],["\\notin",8713],["\\ni",8715],["\\owns",8715],["\\subset",8834],["\\supset",8835],["\\subseteq",8838],["\\supseteq",8839],["\\differencedelta",8710],["\\mvert",8739],["\\parallel",8741],["\\simeq",8771]],"mrel");xe([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams");xe([["\\wp",8472],["\\aleph",8501]]);xe([["\\blacktriangle",9650],["\\hslash",8463],["\\Finv",8498],["\\Game",8513],["\\eth",240],["\\mho",8487],["\\Bbbk",107],["\\yen",165],["\\square",9633],["\\Box",9633],["\\blacksquare",9632],["\\circledS",9416],["\\circledR",174],["\\triangledown",9661],["\\blacktriangledown",9660],["\\checkmark",10003],["\\diagup",9585],["\\measuredangle",8737],["\\sphericalangle",8738],["\\backprime",8245],["\\backdoubleprime",8246],["\\Diamond",9674],["\\lozenge",9674],["\\blacklozenge",10731],["\\varnothing",8709],["\\complement",8705],["\\maltese",10016],["\\beth",8502],["\\daleth",8504],["\\gimel",8503]],"mord","ams");xe([["\\ ",160],["~",160]],"space");k(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:e=>new ya(e)});k("space","",{createAtom:e=>new ya(e)});xe([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct");xe([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner");xe([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var dl={main:["Main-Regular","ML__cmr"],"main-italic":["Main-Italic","ML__cmr ML__it"],"main-bold":["Main-Bold","ML__cmr ML__bold"],"main-bolditalic":["Main-BoldItalic","ML__cmr ML__bold ML__it"],normal:["Main-Regular","ML__cmr"],"normal-bold":["Main-Bold","ML__mathbf"],"normal-italic":["Math-Italic","ML__mathit"],"normal-bolditalic":["Math-BoldItalic","ML__mathbfit"],roman:["Main-Regular","ML__cmr"],"roman-bold":["Main-Bold","ML__mathbf"],"roman-italic":["Math-Italic","ML__mathit"],"roman-bolditalic":["Math-BoldItalic","ML__mathbfit"],ams:["AMS-Regular","ML__am
vendor: 4,271 bytes, line 2975
2975s"],"ams-bold":["AMS-Regular","ML__ams ML__bold"],"ams-italic":["AMS-Regular","ML__ams ML__it"],"ams-bolditalic":["AMS-Regular","ML__ams ML__bold ML__it"],"sans-serif":["SansSerif-Regular","ML__sans"],"sans-serif-bold":["SansSerif-Regular","ML__sans ML__bold"],"sans-serif-italic":["SansSerif-Regular","ML__sans ML__it"],"sans-serif-bolditalic":["SansSerif-Regular","ML__sans ML__bold ML__it"],calligraphic:["Caligraphic-Regular","ML__cal"],"calligraphic-bold":["Caligraphic-Regular","ML__cal ML__bold"],"calligraphic-italic":["Caligraphic-Regular","ML__cal ML__it"],"calligraphic-bolditalic":["Caligraphic-Regular","ML__cal ML__bold ML__it"],script:["Script-Regular","ML__script"],"script-bold":["Script-Regular","ML__script ML__bold"],"script-italic":["Script-Regular","ML__script ML__it"],"script-bolditalic":["Script-Regular","ML__script ML__bold ML__it"],fraktur:["Fraktur-Regular","ML__frak"],"fraktur-bold":["Fraktur-Regular","ML__frak ML__bold"],"fraktur-italic":["Fraktur-Regular","ML__frak ML__it"],"fraktur-bolditalic":["Fraktur-Regular","ML__frak ML__bold ML__it"],monospace:["Typewriter-Regular","ML__tt"],"monospace-bold":["Typewriter-Regular","ML__tt ML__bold"],"monospace-italic":["Typewriter-Regular","ML__tt ML__it"],"monospace-bolditalic":["Typewriter-Regular","ML__tt ML__bold ML__it"],"double-struck":["AMS-Regular","ML__bb"],"double-struck-bold":["AMS-Regular","ML__bb ML__bold"],"double-struck-italic":["AMS-Regular","ML__bb ML_italic"],"double-struck-bolditalic":["AMS-Regular","ML__bb ML_bolditalic"]},jl={"double-struck":/^[A-Z ]$/,script:/^[A-Z ]$/,calligraphic:/^[\dA-Z ]$/,fraktur:/^[\dA-Za-z ]$|^[!"#$%&'()*+,\-./:;=?[]^’‘]$/,monospace:/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/,"sans-serif":/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/},Jh=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,jf=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,Hf=[/^[a-z]$/,/^[A-Z]$/,Jh,jf],Wf={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},Uf=class extends Re{constructor(){super("math")}createAtom(e,t,i){var r,a,n,o,l,s;if(t===null)return new w({type:"mord",mode:"math",command:e,value:e,style:i});let u;try{u=(n=(a=globalThis.MathfieldElement)==null?void 0:a.isFunction((r=t.command)!=null?r:e))!=null?n:!1}catch{u=!1}if(t.definitionType==="symbol"){let d=new w({type:(o=t.type)!=null?o:"mord",mode:"math",command:(l=t.command)!=null?l:e,value:String.fromCodePoint(t.codepoint),isFunction:u,style:i});return e.startsWith("\\")&&(d.verbatimLatex=e),d}let c=new w({type:"mord",mode:"math",command:(s=t.command)!=null?s:e,value:e,isFunction:u,style:i});return e.startsWith("\\")&&(c.verbatimLatex=e),c}serialize(e,t){let i=Jf(e,y(f({},t),{defaultMode:"math"}));return i.length===0||t.defaultMode!=="text"?i:["$ ",...i," $"]}getFont(e,t){var i,r,a;if(t.variant,t.fontFamily){let c=t.fontFamily;t.fontSeries==="b"&&t.fontShape==="it"?c+="-bolditalic":t.fontSeries==="b"?c+="-bold":t.fontShape==="it"&&(c+="-italic");let d=(i=dl[c])!=null?i:dl[t.fontFamily];if(!d)return console.error(`Unknown font family variant: ${c}`),null;let[h,p]=d;return p&&(e.classes+=" "+p),h}let{variant:n}=t,{variantStyle:o}=t;if(n==="normal"&&!o&&/[\u00A3\u0131\u0237]/.test(e.value)&&(n="main",o="italic"),n==="normal"&&!o&&e.value.length===1){let c=!1;Hf.forEach((d,h)=>{var p;d.test(e.value)&&Wf[(p=t.letterShapeStyle)!=null?p:"tex"][h]==="it"&&(c=!0)}),c&&(o=Vf(o))}o==="up"&&(o=void 0);let l=o?n+"-"+o:n,[s,u]=dl[l];if(jl[n]&&!jl[n].test(e.value)){let c=Al(e.value,n,o);return c||(c=(r=Al(e.value,n))!=null?r:e.value,e.classes+=(a={bold:" ML__bold",italic:" ML__it","bold-italic":" ML__bold ML__it"}[o??""])!=null?a:""),e.value=c,null}return Jh.test(e.value)&&(e.classes+=" lcGreek"),u&&(e.classes+=" "+u),s}};function Jf(e,t){return Bt(e,"bold").map(i=>{if(Pl(i[0])!=="bold"||Pl(i[0].parent)==="bold")return R(bn(i,t));let r=R(i.map(a=>{var n;return(n=a.value)!=null?n:""}));return/^[a-zA-Z0-9]+$/.test(r)?Q("\\mathbf",R(bn(i,t))):Q("\\bm",R(bn(i,t)))})}function bn(e,t){let{parent:i}=e[0],r=Ol(i);return Bt(e,"variant").map(a=>
vendor: 14,222 bytes, lines 2975-2977
2975{let n=Ol(a[0]),o="";n&&n!==r&&(o={calligraphic:"\\mathcal","calligraphic-uo":"\\mathcal",fraktur:"\\mathfrak","fraktur-uo":"\\mathfrak","double-struck":"\\mathbb","double-struck-uo":"\\mathbb",script:"\\mathscr","script-uo":"\\mathscr",monospace:"\\mathtt","monospace-uo":"\\mathtt","sans-serif":"\\mathsf","sans-serif-uo":"\\mathsf",normal:"","normal-up":"\\mathrm","normal-italic":"\\mathnormal","normal-bold":"","normal-bolditalic":"\\mathbfit",ams:"","ams-up":"\\mathrm","ams-italic":"\\mathit","ams-bold":"","ams-bolditalic":"\\mathbfit",main:"","main-up":"\\mathrm","main-italic":"\\mathit","main-bold":"","main-bolditalic":"\\mathbfit"}[n]);let l="",s=a[a.length-1],u=o&&a.length>0&&(s.branch("subscript")!==void 0||s.branch("superscript")!==void 0);u&&(l=s.supsubToLatex(t));let c=R(a.map((d,h)=>{if(u&&h===a.length-1){let p=ye(d.command,d.mode);return p!=null&&p.serialize?p.serialize(d,t):d.body&&d.command?Q(d.command,d.bodyToLatex(t)):d.body?d.bodyToLatex(t):!d.value||d.value==="​"?"":d.command||d.value}return d._serialize(t)}));return o?Q(o,c)+l:c})}new Uf;function Xf(e,t){return e.map(i=>i._serialize(t))}function Gf(e,t){return Bt(e,"fontShape").map(i=>{let r=Xf(i,t),{fontShape:a}=i[0].style,n="";return a==="it"&&(n="\\textit"),a==="sl"&&(n="\\textsl"),a==="sc"&&(n="\\textsc"),a==="n"&&(n="\\textup"),!n&&a?`{${Q("\\fontshape",a)}${R(r)}}`:n?Q(n,R(r)):R(r)})}function Zf(e,t){return Bt(e,"fontSeries").map(i=>{let r=Gf(i,t),{fontSeries:a}=i[0].style,n="";return a==="b"&&(n="\\textbf"),a==="l"&&(n="\\textlf"),a==="m"&&(n="\\textmd"),a&&!n?`{${Q("\\fontseries",a)}${R(r)}}`:n?Q(n,R(r)):R(r)})}function Yf(e,t){return Bt(e,"fontSize").map(i=>{var r,a;let n=Zf(i,t),o=(a=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(r=i[0].style.fontSize)!=null?r:""])!=null?a:"";return o?`${o} ${R(n)}`:R(n)})}function Qf(e,t,i){return Bt(e,"fontFamily").map(r=>{var a;i=i&&!r.every(s=>s.style.fontFamily||s.style.fontShape||s.style.fontSeries||s.style.fontSize);let n=Yf(r,t),{fontFamily:o}=r[0].style,l=(a={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[o??""])!=null?a:"";return l?`\\${l}{${R(n)}}`:o?`{\\fontfamily{${r[0].style.fontFamily}} ${R(n)}}`:i?`\\text{${R(n)}}`:R(n)})}var Vd={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},e1=class extends Re{constructor(){super("text")}createAtom(e,t,i){return t&&t.definitionType==="symbol"?new Mr(e,String.fromCodePoint(t.codepoint),i??{}):null}serialize(e,t){return Qf(e,y(f({},t),{defaultMode:"text"}),t.defaultMode!=="text")}getFont(e,t){var i,r,a,n,o;let{fontFamily:l}=t;if(Vd[l]?e.classes+=" "+Vd[l]:l&&e.setStyle("font-family",l),t.fontShape&&(e.classes+=" ",e.classes+=(i={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[t.fontShape])!=null?i:""),t.fontSeries){let s=t.fontSeries.match(/(.?[lbm])?(.?[cx])?/);s&&(e.classes+=" ",e.classes+=(a={ul:"ML__series_ul",el:"ML__series_el",l:"ML__series_l",sl:"ML__series_sl",m:"",sb:"ML__series_sb",b:"ML__bold",eb:"ML__series_eb",ub:"ML__series_ub"}[(r=s[1])!=null?r:""])!=null?a:"",e.classes+=" ",e.classes+=(o={uc:"ML__series_uc",ec:"ML__series_ec",c:"ML__series_c",sc:"ML__series_sc",n:"",sx:"ML__series_sx",x:"ML__series_x",ex:"ML__series_ex",ux:"ML__series_ux"}[(n=s[2])!=null?n:""])!=null?o:"")}return"Main-Regular"}};new e1;var t1=class extends Re{constructor(){super("latex")}createAtom(e){return new be(e)}serialize(e,t){return e.filter(i=>i instanceof be&&!i.isSuggestion).map(i=>i.value)}getFont(){return null}};new t1;function Cs(e){var t;let i=/macos|ios/.test(kr()),r=e.split("+"),a="";for(let n of r)a&&(a+=i?" ":'<span class="ML__shortcut-join">+</span>'),n.startsWith("[Key")?a+=n.slice(4,5):n.startsWith("Key")?a+=n.slice(3,4):n.startsWith("[Digit")?a+=n.slice(6,7):n.startsWith("Digit")?a+=n.slice(5,6):a+=(t={cmd:"⌘",meta:i?"⌘":"Ctrl",shift:i?"⇧":"Shift",alt:i?"⌥":"Alt",ctrl:i?"⌃":"Ctrl","\n":i?"⏎":"Return","[return]":i?"⏎":"Return","[enter]":i?"⌤":"Enter","[tab]":i?"⇥":"Tab","[escape]":"Esc","[backspace]":i?"⌫":"Backspace","[delete]":i?"⌦":"Del","[pageup]":i?"⇞":"Page Up","[pagedown]":i?"⇟":"Page Down","[home]":i?"⤒":"Home","[end]":i?"⤓":"End","[space]":"Space","[equal]":"=","[minus]":"-","[comma]":",","[slash]":"/","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* &#128290;",numpaddivide:"/ &#128290;",numpadsubtract:"- &#128290;",numpadadd:"+ &#128290;",numpaddecimal:". &#128290;",numpadcomma:", &#128290;",help:"help",left:"⇠",up:"⇡",right:"⇢",down:"⇣","[arrowleft]":"⇠","[arrowup]":"⇡","[arrowright]":"⇢","[arrowdown]":"⇣"}[n.toLowerCase()])!=null?t:n.toUpperCase();return a}function Qn(e){if(e instanceof MouseEvent||e instanceof PointerEvent)return{x:e.clientX,y:e.clientY};if(typeof TouchEvent<"u"&&e instanceof TouchEvent){let t=[...e.touches].reduce((r,a)=>({x:r.x+a.clientX,y:r.y+a.clientY}),{x:0,y:0}),i=e.touches.length;return{x:t.x/i,y:t.y/i}}}function Li(e){let t={alt:!1,control:!1,shift:!1,meta:!1};return(e instanceof MouseEvent||e instanceof PointerEvent||typeof TouchEvent<"u"&&e instanceof TouchEvent||e instanceof KeyboardEvent)&&(e.altKey&&(t.alt=!0),e.ctrlKey&&(t.control=!0),e.metaKey&&(t.meta=!0),e.shiftKey&&(t.shift=!0)),t}function i1(e,t){return!e&&t||e&&!t?!1:!e||!t?!0:e.alt===t.alt&&e.control===t.control&&e.shift===t.shift&&e.meta===t.meta}var r1=new Set(["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"]);function da(e){return e.ctrlKey||e.metaKey||["Dead","Process"].includes(e.key)?!1:e.code===""?!0:r1.has(e.code)}function eo(){var e;let t=document.activeElement;for(;(e=t==null?void 0:t.shadowRoot)!=null&&e.activeElement;)t=t.shadowRoot.activeElement;return t}var Qe=class vt{static get scrim(){return vt._scrim||(vt._scrim=new vt),vt._scrim}static open(t){vt.scrim.open(t)}static close(){vt.scrim.close()}static get state(){return vt.scrim.state}static get element(){return vt.scrim.element}constructor(t){var i,r;this.lightDismiss=(i=t==null?void 0:t.lightDismiss)!=null?i:!0,this.translucent=(r=t==null?void 0:t.translucent)!=null?r:!1,this.state="closed"}get element(){if(this._element)return this._element;let t=document.createElement("div");return t.setAttribute("role","presentation"),t.style.position="fixed",t.style.contain="content",t.style.top="0",t.style.left="0",t.style.right="0",t.style.bottom="0",t.style.zIndex="var(--scrim-zindex, 10099)",t.style.outline="none",this.translucent?(t.style.background="rgba(255, 255, 255, .2)",t.style.backdropFilter="contrast(40%)"):t.style.background="transparent",this._element=t,t}open(t){var i;if(this.state!=="closed")return;this.state="opening",this.onDismiss=t==null?void 0:t.onDismiss,this.savedActiveElement=eo();let{element:r}=this;((i=t==null?void 0:t.root)!=null?i:document.body).appendChild(r),r.addEventListener("click",this),document.addEventListener("touchmove",this,!1),document.addEventListener("scroll",this,!1);let a=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";let n=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${n+a}px`;let o=document.querySelector(".MLK__plate");if(o instanceof HTMLElement){this.savedMlkPaddingRight=o.style.paddingRight;let l=Number.parseFloat(getComputedStyle(o).paddingRight);o.style.paddingRight=`${l+a}px`}t!=null&&t.child&&r.append(t.child),this.state="open"}close(){var t,i,r,a,n;if(this.state!=="open"){this.element.parentElement;return}this.state="closing",typeof this.onDismiss=="function"&&this.onDismiss(),this.onDismiss=void 0;let{element:o}=this;o.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),o.remove(),document.body.style.overflow=(t=this.savedOverflow)!=null?t:"",document.body.style.marginRight=(i=this.savedMarginRight)!=null?i:"";let l=document.querySelector(".MLK__plate");l instanceof HTMLElement&&(l.style.paddingRight=(r=this.savedMlkPaddingRight)!=null?r:""),eo()!==this.savedActiveElement&&((n=(a=this.savedActiveElement)==null?void 0:a.focus)==null||n.call(a)),o.innerHTML="",this.state="closed"}handleEvent(t){this.lightDismiss&&(t.target===this._element&&t.type==="click"?(this.close(),t.preventDefault(),t.stopPropagation()):t.target===document&&(t.type==="touchmove"||t.type==="scroll")&&(this.close(),t.preventDefault(),t.stopPropagation()))}};function a1(e,t,i){let r=null,a=null,n=!1,o=!1,l=!1,s=new AbortController,u=s.signal;return e.addEventListener("keydown",c=>{if(n||c.key==="Process"||c.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(c.code)){r=null;return}r=c,a=null,i.onKeystroke(c)?e.textContent="":r=null},{capture:!0,signal:u}),e.addEventListener("keypress",c=>{n||(r&&a&&i.onKeystroke(r),a=c)},{capture:!0,signal:u}),e.addEventListener("compositionstart",c=>{e.textContent="",n=!0,i.onCompositionStart(c.data)},{capture:!0,signal:u}),e.addEventListener("compositionupdate",c=>{n&&i.onCompositionUpdate(c.data)},{capture:!0,signal:u}),e.addEventListener("compositionend",c=>{e.textContent="",n&&(n=!1,i.onCompositionEnd(c.data))},{capture:!0,signal:u}),e.addEventListener("beforeinput",c=>c.stopImmediatePropagation(),{signal:u}),e.addEventListener("input",c=>{var d;if(!n&&(e.textContent="",c.inputType!=="insertCompositionText")){if(c.inputType==="insertFromPaste"){c.preventDefault(),c.stopPropagation();return}i.onInput((d=c.data)!=null?d:""),c.preventDefault(),c.stopPropagation()}},{signal:u}),e.addEventListener("paste",c=>{e.focus({preventScroll:!0}),e.textContent="",i.onPaste(c)||c.preventDefault(),c.stopImmediatePropagation()},{signal:u}),e.addEventListener("cut",c=>i.onCut(c),{capture:!0,signal:u}),e.addEventListener("copy",c=>i.onCopy(c),{capture:!0,signal:u}),e.addEventListener("blur",c=>{var d,h;if(((h=(d=c.relatedTarget)==null?void 0:d._mathfield)==null?void 0:h.element)===t){e.focus({preventScroll:!0}),c.preventDefault(),c.stopPropagation();return}let p=!1,m=c.relatedTarget;for(;m;){if(m.classList.contains("ML__keyboard")){p=!0;break}m=m.parentElement}if(p){e.focus({preventScroll:!0}),c.preventDefault(),c.stopPropagation();return}let g=Qe.state;if(g==="open"||g==="opening"){c.preventDefault(),c.stopPropagation();return}if(c.relatedTarget===c.target.getRootNode().host){c.preventDefault(),c.stopPropagation();return}l||o||(l=!0,r=null,a=null,i.onBlur(),l=!1)},{capture:!0,signal:u}),e.addEventListener("focus",c=>{l||o||(o=!0,i.onFocus(),o=!1)},{capture:!0,signal:u}),{dispose:()=>s.abort(),cancelComposition:()=>{n&&(typeof e.blur=="function"&&e.blur(),requestAnimationFrame(()=>e.focus({preventScroll:!0})))},blur:()=>{typeof e.blur=="function"&&(l=!0,e.blur(),l=!1)},focus:()=>{!o&&typeof e.focus=="function"&&(o=!0,e.focus({preventScroll:!0}),o=!1)},hasFocus:()=>eo()===e,setAriaLabel:c=>e.setAttribute("aria-label",c),setValue:c=>{var d;e.textContent!==c&&(e.textContent=c,e.style.left="-1000px",(d=window.getSelection())==null||d.selectAllChildren(e))},moveTo:(c,d)=>{e.style.top=`${d}px`,e.style.left=`${c}px`}}}function nr(e){var t;if(!e||!da(e))return"";let i;return e.key==="Unidentified"&&e.target&&(i=e.target.value),i=(t=i??e.key)!=null?t:e.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(i)&&(i=""),i}function Xh(e){e=im(e);let t=[];return e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),t.length===0?`[${e.code}]`:(t.push(`[${e.code}]`),t.join("+"))}function n1(e){if(Ue()){let t=kr(),i=e.startsWith("!"),r=e.endsWith(t);if(i&&!r||!i&&r)return!0}return e==="!other"?!1:e==="other"}function o1(e,t,i){if(e.length===0)return"";let r=or(F0(Xh(i))),a=or({key:i.key,shift:i.shiftKey,alt:i.altKey,ctrl:i.ctrlKey,meta:i.metaKey||i.ctrlKey&&/macos|ios/.test(kr()),cmd:!1,win:!1});for(let n=e.length-1;n>=0;n--)if((e[n].key===r||e[n].key===a)&&(!e[n].ifMode||e[n].ifMode===t))return e[n].command;return""}function jd(e){let t=e;return ve(t)&&(t=t.length>0?t[0]+"("+t.slice(1).join("")+")":""),t}function l1(e,t){let i=[];if(typeof t=="string"){let n=ef[t];ve(n)?i=n.slice():n&&i.push(n)}let r=jd(t),a=new RegExp("^"+r.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(let n of e)a.test(jd(n.command))&&i.push(n.key);return i.map(Cs)}function s1(e,t){if(e.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(e.ifPlatform))throw new Error(`Unexpected platform "${e.ifPlatform}" for keybinding ${e.key}`);if(e.ifLayout!==void 0&&(t.score===0||!e.ifLayout.includes(t.id)))return;let i=F0(e.key),r=e.ifPlatform;if(i.cmd){if(r&&r!=="macos"&&r!=="ios")throw new Error('Unexpected "cmd" modifier with platform "'+r+`"
2976"cmd" modifier can only be used with macOS or iOS platform.`);r||(r=kr()==="ios"?"ios":"macos"),i.win=!1,i.cmd=!1,i.meta=!0}if(i.win){if(r&&r!=="windows")throw new Error('Unexpected "win" modifier with platform "'+r+`"
2977"win" modifier can only be used with Windows platform.`);r="windows",i.win=!1,i.cmd=!1,i.meta=!0}if(r&&!n1(r))return;if(/^\[.+\]$/.test(i.key))return y(f({},e),{key:or(i)});let a=tm(i.key,t);if(!a)return y(f({},e),{key:or(i)});if(a.shift&&i.shift||a.alt&&i.alt)throw new Error(`The keybinding ${e.key} (${Hl(e.command)}) is conflicting with the key combination ${or(a)}
2977 using the ${t.displayName} keyboard layout`);return a.shift=a.shift||i.shift,a.alt=a.alt||i.alt,a.meta=i.meta,a.ctrl=i.ctrl,y(f({},e),{key:or(a)})}function Hl(e){if(Array.isArray(e)){let t=[...e];return t.shift()+"("+t.map(i=>typeof i=="string"?`"${i}"`:i.toString()).join(", ")+")"}return e}function u1(e,t){let i=[],r=[];for(let a of e)try{let n=s1(a,t);if(!n)continue;let o=r.find(l=>l.key===n.key&&l.ifMode===n.ifMode);if(o)throw new Error(`Ambiguous key binding ${a.key} (${Hl(a.command)}) matches ${o.key} (${Hl(o.command)}) with the ${t.displayName} keyboard layout`);r.push(n)}catch(n){n instanceof Error&&i.push(n.message)}return[r,i]}var c1=class extends Z{constructor(){super("latex")}createAtom(e){return new be(e)}onPaste(e,t){if(!t)return!1;let i=typeof t=="string"?t:t.getData("application/x-latex")||t.getData("text/plain");return i&&e.model.contentWillChange({inputType:"insertFromPaste",data:i})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,i)&&(e.startRecording(),e.snapshot("paste"),e.model.contentDidChange({inputType:"insertFromPaste"}),se(e)),e.startRecording(),!0):!1}insert(e,t,i){if(!e.contentWillChange({data:t,inputType:"insertText"}))return!1;i||(i={}),i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder");let{silenceNotifications:r}=e;i.silenceNotifications&&(e.silenceNotifications=!0);let a=e.silenceNotifications;e.silenceNotifications=!0,i.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(we(e.selection)):i.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):i.insertionMode==="insertBefore"?e.collapseSelection("backward"):i.insertionMode==="insertAfter"&&e.collapseSelection("forward");let n=[];for(let s of t)_m.test(s)&&n.push(new be(s));let o=e.at(e.position);if(o instanceof Qr&&(o=o.lastChild),!(o.parent instanceof Qr)){let s=new Qr;o.parent.addChildAfter(s,o),o=s.firstChild}let l=o.parent.addChildrenAfter(n,o);return e.silenceNotifications=a,i.selectionMode==="before"||(i.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(l)):l&&(e.position=e.offsetOf(l))),e.contentDidChange({data:t,inputType:"insertText"}),e.silenceNotifications=r,!0}};function Ls(e){return e.atoms.find(t=>t.type==="latexgroup")}function ha(e){var t,i;let r=Ls(e);return(i=(t=r==null?void 0:r.body)==null?void 0:t.filter(a=>a.type==="latex"))!=null?i:[]}function Gh(e,t){var i;let r=0,a=!1,n=Number.isFinite(t==null?void 0:t.before)?(i=t==null?void 0:t.before)!=null?i:0:e.lastOffset;for(;r<=n&&!a;){let s=e.at(r);a=s instanceof be&&s.isSuggestion,a||r++}if(!a)return[void 0,void 0];let o=r,l=!1;for(;o<=n&&!l;){let s=e.at(o);l=!(s instanceof be&&s.isSuggestion),l||o++}return[r-1,o-1]}new c1;function d1(e,t){e.flushInlineShortcutBuffer(),e.stopCoalescingUndo();let i=Wl(e,t),{model:r}=e;return r.selectionIsCollapsed?(e.defaultStyle.fontSeries&&i.fontSeries===e.defaultStyle.fontSeries&&(i.fontSeries="auto"),i.fontShape&&i.fontShape===e.defaultStyle.fontShape&&(i.fontShape="auto"),i.color&&i.color===e.defaultStyle.color&&(i.color="none"),i.backgroundColor&&i.backgroundColor===e.defaultStyle.backgroundColor&&(i.backgroundColor="none"),i.fontSize&&i.fontSize===e.defaultStyle.fontSize&&(i.fontSize="auto"),e.defaultStyle=f(f({},e.defaultStyle),i)):e.model.deferNotifications({content:!0,type:"insertText"},()=>{r.selection.ranges.forEach(a=>Vl(r,a,i,{operation:"toggle"})),e.snapshot("style-change")}),!0}Me({applyStyle:d1},{target:"mathfield",canUndo:!0,changeContent:!0});function Wl(e,t){var i,r,a,n,o,l,s,u,c,d;let h={};if(typeof t.color=="string"){let m=(r=e.colorMap((i=t.color)!=null?i:t.verbatimColor))!=null?r:"none";m!==t.color&&(h.verbatimColor=(a=t.verbatimColor)!=null?a:t.color),h.color=m}if(typeof t.backgroundColor=="string"){let m=(o=e.backgroundColorMap((n=t.backgroundColor)!=null?n:t.verbatimBackgroundColor))!=null?o:"none";m!==t.backgroundColor&&(h.verbatimBackgroundColor=(l=t.verbatimBackgroundColor)!=null?l:t.backgroundColor),h.backgroundColor=m}typeof t.fontFamily=="string"&&(h.fontFamily=t.fontFamily),typeof t.series=="string"&&(h.fontSeries=t.series),typeof t.fontSeries=="string"&&(h.fontSeries=t.fontSeries.toLowerCase()),h.fontSeries&&(h.fontSeries=(s={bold:"b",medium:"m",normal:"m"}[h.fontSeries])!=null?s:h.fontSeries),typeof t.shape=="string"&&(h.fontShape=t.shape),typeof t.fontShape=="string"&&(h.fontShape=t.fontShape.toLowerCase()),h.fontShape&&(h.fontShape=(u={italic:"it",up:"n",upright:"n",normal:"n"}[h.fontShape])!=null?u:h.fontShape),t.variant&&(h.variant=t.variant.toLowerCase()),t.variantStyle!==void 0&&(h.variantStyle=typeof t.variantStyle=="string"&&t.variantStyle!==""?t.variantStyle.toLowerCase():t.variantStyle);let p=(c=t.size)!=null?c:t.fontSize;return typeof p=="number"?h.fontSize=Math.max(1,Math.min(10,p)):typeof p=="string"&&(h.fontSize=(d={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[p.toLowerCase()])!=null?d:{tiny:1,scriptsize:2,footnotesize:3,small:4,
vendor: 20,610 bytes, lines 2977-2978
2977normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[p]),h}function Ds(e,t,i){var r,a;let n=e.model;if(n.mode==="latex")return{};let o=e.styleBias;if(o==="none")return e.defaultStyle;if(n.mode==="text")return(a=(r=n.at(o==="right"?i.after:i.before))==null?void 0:r.style)!=null?a:e.defaultStyle;if(n.mode==="math"){let l=n.at(o==="right"?i.after:i.before);return l?f(y(f({},l.style),{variant:"normal"}),e.defaultStyle):e.defaultStyle}return{}}function Bi(e){let t=e.options.onInsertStyle;if(t===null)return{};t===void 0&&(t=Ds);let i=e.model,r=e.styleBias,a=i.at(i.position),n=Hd(i,a,r),o=Hd(i,a.rightSibling,r);return t(e,i.position,{before:n,after:o})}function Hd(e,t,i){var r;return!t||t.type==="first"&&i!=="right"?-1:t.type!=="group"?e.offsetOf(t):!t.body||t.body.length<2?-1:((r=t.body)==null?void 0:r.length)===1||i!=="right"?e.offsetOf(t.body[0]):e.offsetOf(t.body[t.body.length-1])}function vo(e){let t=ha(e.model).filter(i=>i.isSuggestion);if(t.length!==0){e.model.position=e.model.offsetOf(t[0].leftSibling);for(let i of t)i.parent.removeChild(i)}}function xa(e,t){var i;let{model:r}=e;vo(e);for(let c of ha(r))c.isError=!1;if(!r.selectionIsCollapsed||e.options.popoverPolicy==="off"){wr(e);return}let a=[],n=r.at(r.position);for(;n&&n instanceof be&&/^[a-zA-Z\*]$/.test(n.value);)n=n.leftSibling;if(n&&n instanceof be&&n.value==="\\")for(a.push(n),n=n.rightSibling;n&&n instanceof be&&/^[a-zA-Z\*]$/.test(n.value);)a.push(n),n=n.rightSibling;let o=a.map(c=>c.value).join(""),l=km(e,o);if(l.length===0){if(/^\\[a-zA-Z\*]+$/.test(o))for(let c of a)c.isError=!0;wr(e);return}let s=(i=t==null?void 0:t.atIndex)!=null?i:0;e.suggestionIndex=s<0?l.length-1:s%l.length;let u=l[e.suggestionIndex];if(u!==o){let c=a[a.length-1];c.parent.addChildrenAfter([...u.slice(o.length-u.length)].map(d=>new be(d,{isSuggestion:!0})),c),Ai(e,{interactive:!0})}p1(e,l)}function hl(e){let[t,i]=Gh(e,{before:e.position});if(t===void 0||i===void 0)return!1;let r=!1;return e.getAtoms([t,i]).forEach(a=>{a.isSuggestion&&(a.isSuggestion=!1,r=!0)}),r}function ai(e,t="accept",i){var r,a;wr(e);let n=Ls(e.model);if(!n)return!1;if(t==="accept-suggestion"||t==="accept-all"){let u=ha(e.model).filter(c=>c.isSuggestion);if(u.length!==0){for(let c of u)c.isSuggestion=!1;e.model.position=e.model.offsetOf(u[u.length-1])}if(t==="accept-suggestion")return u.length!==0}let o=ha(e.model).filter(u=>!u.isSuggestion).map(u=>u.value).join(""),l=n.leftSibling;if(n.parent.removeChild(n),e.model.position=e.model.offsetOf(l),e.switchMode((r=i==null?void 0:i.mode)!=null?r:"math"),t==="reject")return!0;let s=f({},Bi(e));return!/^[a-zA-Z0-9]$/.test(o)&&e.styleBias!=="none"&&(s.variant="normal",s.variantStyle=void 0),Z.insert(e.model,o,{selectionMode:(a=i==null?void 0:i.selectItem)!=null&&a?"item":"placeholder",format:"latex",mode:"math",style:s}),e.snapshot(),e.model.announce("replacement"),e.switchMode("math"),!0}function xo(e){var t;let i=document.getElementById(e);return i?i.dataset.refcount=Number(Number.parseInt((t=i.dataset.refcount)!=null?t:"0")+1).toString():(i=document.createElement("div"),i.setAttribute("aria-hidden","true"),i.dataset.refcount="1",i.id=e,document.body.append(i)),i}function _a(e){var t;let i=document.getElementById(e);if(!i)return;let r=Number.parseInt((t=i.getAttribute("data-refcount"))!=null?t:"0");r<=1?i.remove():i.dataset.refcount=Number(r-1).toString()}function Wd(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function h1(e,t){let i=new H({from:e.context}),r=new w({mode:"math",type:"root",body:De(t,{context:i})}),a=co(va(new A(r.render(i),{classes:"ML__base"}),i));return ho(a,{classes:"ML__latex"}).toMarkup()}function p1(e,t){var i;if(t.length===0){wr(e);return}let r="";for(let[n,o]of t.entries()){let l=o,s=h1(e,o),u=l1(e.keybindings,l).join("<br>");r+=`<li role="button" data-command="${Wd(l)}" ${n===e.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${Wd(l)}</span><span class="ML__popover__command">${s}</span>`,u&&(r+=`<span class="ML__popover__keybinding">${u}</span>`),r+="</li>"}let a=m1(e,`<ul>${r}</ul>`);Ul()&&((i=a.querySelector(".ML__popover__current"))==null||i.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var n;a&&!Ul()&&(a.classList.add("is-visible"),_o(e),(n=a.querySelector(".ML__popover__current"))==null||n.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function Ul(){let e=document.getElementById("mathlive-suggestion-popover");return e?e.classList.contains("is-visible"):!1}function _o(e,t){var i,r,a;if(!e.element||e.element.mathfield!==e||!Ul())return;if(((i=e.model.at(e.model.position))==null?void 0:i.type)!=="latex"){wr(e);return}if(t!=null&&t.deferred){setTimeout(()=>_o(e),32);return}let n=$n(e.field);if(!n)return;let o=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=window.innerWidth-document.documentElement.clientWidth,u=window.innerHeight-document.documentElement.clientHeight,c=(a=(r=window.mathVirtualKeyboard)==null?void 0:r.boundingRect.height)!=null?a:0,d=document.getElementById("mathlive-suggestion-popover");n.x+d.offsetWidth/2>l-s?d.style.left=`${l-d.offsetWidth-s}px`:n.x-d.offsetWidth/2<0?d.style.left="0":d.style.left=`${n.x-d.offsetWidth/2}px`;let h=n.y-n.height;o-u-c-n.y<h?(d.classList.add("ML__popover--reverse-direction"),d.classList.remove("top-tip"),d.classList.add("bottom-tip"),d.style.top=`${n.y-n.height-d.offsetHeight-15}px`):(d.classList.remove("ML__popover--reverse-direction"),d.classList.add("top-tip"),d.classList.remove("bottom-tip"),d.style.top=`${n.y+15}px`)}function wr(e){e.suggestionIndex=0,document.getElementById("mathlive-suggestion-popover")&&_a("mathlive-suggestion-popover")}function m1(e,t){let i=document.getElementById("mathlive-suggestion-popover");return i?_a("mathlive-suggestion-popover"):(Dt("suggestion-popover"),Dt("core")),i=xo("mathlive-suggestion-popover"),i.addEventListener("pointerdown",r=>r.preventDefault()),i.addEventListener("click",r=>{let a=r.target;for(;a&&!a.dataset.command;)a=a.parentElement;a&&(ai(e,"reject"),Z.insert(e.model,a.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),e.dirty=!0,e.focus())}),i.innerHTML=globalThis.MathfieldElement.createHTML(t),i}function f1(){document.getElementById("mathlive-suggestion-popover")&&(_a("mathlive-suggestion-popover"),ii("suggestion-popover"),ii("core"))}function g1(){let e=String(new Error().stack).replace(/^Error.*\n/,"").split(`
2978`);if(e.length===0)return console.error(`Can't use relative paths to specify assets location because the sourcefile location could not be determined (unexpected stack trace format "${new Error().stack}").`),"";let t=e[1],i=t.match(/http.*\.ts[\?:]/);return i&&(t=e[2]),i=t.match(/(https?:.*):[0-9]+:[0-9]+/),i||(i=t.match(/at (.*(\.ts))[\?:]/),i||(i=t.match(/at (.*(\.mjs|\.js))[\?:]/))),i?i[1]:(console.error(e),console.error(`Can't use relative paths to specify assets location because the source file location could not be determined (unexpected location "${t}").`),"")}var jt=null,Ud,Jd,pl=((Jd=(Ud=globalThis==null?void 0:globalThis.document)==null?void 0:Ud.currentScript)==null?void 0:Jd.src)||g1();async function Zh(e){if(/^(?:[a-z+]+:)?\/\//i.test(e)){try{return new URL(e).href}catch{}if(e.startsWith("//"))try{return new URL(`${window.location.protocol}${e}`).href}catch{}return e}if(jt===null)try{let t=await fetch(pl,{method:"HEAD"});t.status===200&&(jt=t.url,jt=jt.replace(/\/\+esm$/,"/"),jt.includes("jsdelivr.net/")&&(jt+="/"))}catch{console.error(`Invalid URL "${e}" (relative to "${pl}")`)}return new URL(e,jt??pl).href}function b1(e,t,i={}){return new FontFace(e,`url(${t}.woff2) format('woff2')`,i)}var Ie="not-loaded";async function y1(){return Ie="not-loaded",wa()}async function wa(){var e;if(Ie==="not-loaded"){if(Ie="loading",(e=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?e:!1){Ie="ready";return}if(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document){let t=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Typewriter","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"],i=Array.from(document.fonts).map(n=>n.family);if(t.every(n=>i.includes(n))){Ie="ready";return}if(!globalThis.MathfieldElement.fontsDirectory){Ie="not-loaded";return}let r=await Zh(globalThis.MathfieldElement.fontsDirectory);if(!r){document.body.classList.add("ML__fonts-did-not-load"),Ie="error";return}r.endsWith("/")&&(r=r.slice(0,-1));let a=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular"],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map(n=>b1(n[0].replace(/-[a-zA-Z]+$/,""),`${r}/${n[0]}`,n[1]));try{(await Promise.all(a.map(n=>{try{return n.load()}catch{}}))).forEach(n=>document.fonts.add(n)),Ie="ready";return}catch(n){console.error(`MathLive 0.108.3: The math fonts could not be loaded from "${r}"`,{cause:n}),document.body.classList.add("ML__fonts-did-not-load")}Ie="error"}}}function v1(e,t=0){let i=3735928559^t,r=1103547991^t;for(let a=0;a<e.length;a++){let n=e.charCodeAt(a);i=Math.imul(i^n,2654435761),r=Math.imul(r^n,1597334677)}return i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(i^i>>>13,3266489909),4294967296*(2097151&r)+(i>>>0)}function se(e,t){!e||e.dirty||!e.field||(e.resizeObserver.unobserve(e.field),e.dirty=!0,requestAnimationFrame(()=>{wt(e)&&e.dirty&&(e.atomBoundsCache=new Map,Ai(e,t),e.resizeObserver.observe(e.field),e.resizeObserverStarted=!0)}))}function x1(e,t){var i;t=t??{};let r=new H({from:y(f({},e.context),{atomIdsSettings:{seed:t.forHighlighting?v1(w.serialize([e.model.root],{expandMacro:!1,defaultMode:e.options.defaultMode})):"random",groupNumbers:(i=t.forHighlighting)!=null?i:!1},letterShapeStyle:e.options.letterShapeStyle}),mathstyle:e.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),a=e.model.root.render(r);return ho(va(a,r),{classes:e.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function Yh(e,t){try{let{model:i}=e;i.root.caret=void 0,i.root.isSelected=!1,i.root.containsCaret=!0;for(let r of i.atoms)r.caret=void 0,r.isSelected=!1,r.containsCaret=!1;if(i.selectionIsCollapsed){let r=i.at(i.position);r.caret=e.model.mode;let a=r.parent;for(;a;)a.containsCaret=!0,a=a.parent}else{let r=i.getAtoms(i.selection,{includeChildren:!0,includeFirstAtoms:!0});for(let a of r)a.isSelected=!0}return x1(e,t).toMarkup()}catch(i){return console.error(i),'<span class="ML__latex" translate="no" aria-hidden="true">🚫</span>'}}function Ai(e,t){if(!wt(e))return;t!=null||(t={});let i=e.element.querySelector("[part=virtual-keyboard-toggle]");i&&(i.style.display=e.hasEditableContent?"":"none");let r=e.field;if(!r)return;let a=e.isSelectionEditable&&e.hasFocus(),n=r.classList.contains("ML__focused");n&&!a?r.classList.remove("ML__focused"):!n&&a&&r.classList.add("ML__focused");let o=Yh(e,t),l=e.element.querySelector("[part=menu-toggle]");if(l){let s=!1;(e.disabled||e.readOnly&&!e.hasEditableContent||e.userSelect==="none")&&(s=!0),!s&&e.element.offsetWidth<50&&(s=!0),l.style.display=s?"none":""}if(e.model.atoms.length<=1){let s=e.options.contentPlaceholder;s&&(o+=`<span part=placeholder class="ML__content-placeholder">${he(s)}</span>`)}r.innerHTML=globalThis.MathfieldElement.createHTML(o),to(e,t.interactive),e.updateToggleLayout(),e.dirty=!1}function to(e,t){var i;let r=e.field;if(!r)return;for(let u of r.querySelectorAll(".ML__selection, .ML__contains-highlight"))u.remove();if(!(t!=null&&t)&&Ie!=="error"&&Ie!=="ready"){setTimeout(()=>{Ie==="ready"?to(e):setTimeout(()=>to(e),128)},32);return}let a=e.model;(i=e.atomBoundsCache)==null||i.clear();let n,o=()=>{if(n!==void 0)return n;let u=r.offsetWidth,c=r.getBoundingClientRect().width;return n=Math.floor(c)/u,isNaN(n)&&(n=1),n};if(a.selectionIsCollapsed){_o(e,{deferred:!0});let u=a.at(a.position);for(;u&&u.type!=="prompt"&&!(u.containsCaret&&u.displayContainsHighlight);)u=u.parent;if(u!=null&&u.containsCaret&&u.displayContainsHighlight){let c=o(),d=Q0(e,Ki(e,u),c);if(d){d.left/=c,d.right/=c,d.top/=c,d.bottom/=c;let h=document.createElement("div");h.classList.add("ML__contains-highlight"),h.style.position="absolute",h.style.left=`${d.left+1}px`,h.style.top=`${Math.ceil(d.top)}px`,h.style.width=`${Math.ceil(d.right-d.left)}px`,h.style.height=`${Math.ceil(d.bottom-d.top)}px`,r.insertBefore(h,r.childNodes[0])}}return}let l=o(),s=_1(eh(e,{excludeAtomsWithBackground:!0}));for(let u of s){u.left/=l,u.right/=l,u.top/=l,u.bottom/=l;let c=document.createElement("div");c.classList.add("ML__selection"),c.style.position="absolute",c.style.left=`${u.left}px`,c.style.top=`${u.top}px`,c.style.width=`${Math.ceil(u.right-u.left)}px`,c.style.height=`${Math.max(1,Math.ceil(u.bottom-u.top-1))}px`,r.insertBefore(c,r.childNodes[0])}}function _1(e){let t=[];for(let i of e){let r=!1;for(let a of t)if(i.left===a.left&&i.right===a.right&&i.top===a.top&&i.bottom===a.bottom){r=!0;break}r||t.push(i)}e=t,t=[];for(let i of e){let r=0;for(let a of e)if(i.left>=a.left&&i.right<=a.right&&i.top>=a.top&&i.bottom<=a.bottom&&(r+=1,r>1))break;r===1&&t.push(i)}return t}function Qh(e){if(!e)return;let t=e.model,i=t.selection,r=w.serialize([t.root],{expandMacro:!1,defaultMode:e.options.defaultMode});Z.insert(t,r,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",silenceNotifications:!0,mode:"math"});let a=t.silenceNotifications;t.silenceNotifications=!0,t.selection=i,t.silenceNotifications=a,se(e)}function Xd(){for(let e of document.querySelectorAll(".ML__mathfield"))"_mathfield"in e&&Qh(e._mathfield)}var ep=3,ct;function Me(e,t){t=f({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},t??{}),ct||(ct={});for(let i of Object.keys(e))ct[i],ct[i]=y(f({},t),{fn:e[i]})}function Es(e){let t;if(Array.isArray(e)){if(e[0]==="performWithFeedback")return Es(e[1]);t=e[0]}else t=e;return ct[t]}function fr(e){var t;return(t=Es(e))==null?void 0:t.target}function w1(e,t){var i,r;if(t=pa(t),!t)return!1;let a,n=[],o=!1,l=!1;ve(t)?(a=t[0],n=t.slice(1)):a=t;let s=ct[a],u=s==null?void 0:s.target;if(u==="model"){if(!e.isSelectionEditable&&s!=null&&s.changeContent)return e.model.announce("plonk"),!1;/^(delete|add)/.test(a)&&(a!=="deleteBackward"&&e.flushInlineShortcutBuffer(),e.snapshot(a)),/^complete/.test(a)||vo(e),ct[a].fn(e.model,...n),xa(e),l=!0,o=!0}else if(u==="virtual-keyboard")l=(r=(i=window.mathVirtualKeyboard)==null?void 0:i.executeCommand(t))!=null?r:!1,o=!0;else if(ct[a]){if(!e.isSelectionEditable&&s!=null&&s.changeContent)return e.model.announce("plonk"),!1;/^(undo|redo)/.test(a)&&e.flushInlineShortcutBuffer(),l=ct[a].fn(e,...n),o=!0}else throw new Error(`Unknown command "${a}"`);return u!=="virtual-keyboard"&&(!e.model.selectionIsCollapsed||s!=null&&s.changeSelection&&a!=="deleteBackward")&&(e.flushInlineShortcutBuffer(),s!=null&&s.changeContent||e.stopCoalescingUndo(),e.defaultStyle={}),l&&(s!=null&&s.changeSelection&&o?(e.dirty=!0,e.scrollIntoView()):se(e)),o}function k1(e,t){var i;if(!e)return!1;e.focus(),Fs.keypressVibration&&B0()&&navigator.vibrate(ep);let r=Es(t);globalThis.MathfieldElement.playSound((i=r==null?void 0:r.audioFeedback)!=null?i:"keypress");let a=e.executeCommand(t);return e.scrollIntoView(),a}Me({performWithFeedback:(e,t)=>k1(e,t)});function M1(e){return xa(e,{atIndex:e.suggestionIndex+1}),!1}function S1(e){return xa(e,{atIndex:e.suggestionIndex-1}),!1}Me({complete:ai},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0});Me({dispatchEvent:(e,t,i)=>{var r,a;return(a=(r=e.host)==null?void 0:r.dispatchEvent(new CustomEvent(t,{detail:i})))!=null?a:!1}},{target:"mathfield"});Me({nextSuggestion:M1,previousSuggestion:S1},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});function pa(e){if(!e)return;if(ve(e)&&e.length>0){let i=e[0];return i=i.replace(/-\w/g,r=>r[1].toUpperCase()),i==="performWithFeedback"&&e.length===2?[i,pa(e[1])]:[i,...e.slice(1)]}if(typeof e!="string")return;let t=e.trim().match(/^([a-zA-Z0-9-]+)\((.*)\)$/);if(t){let i=t[1].replace(/-\w/g,a=>a[1].toUpperCase()),r=t[2].split(",").map(a=>a.trim());return[i,...r.map(a=>{if(/"[^"]*"/.test(a)||/'[^']*'/.test(a))return a.slice(1,-1);if(/^true$/.test(a))return!0;if(/^false$/.test(a))return!1;if(/^[-]?\d+$/.test(a))return parseInt(a,10);if(/^\{.*\}$/.test(a))try{return JSON.parse(a)}catch{return console.error("Invalid argument:",a),a}return pa(a)})]}return e.replace(/-\w/g,i=>i[1].toUpperCase())}var io="mathlive#virtual-keyboard-message";function Bs(e){var t;return e.type!=="message"?!1:((t=e.data)==null?void 0:t.type)===io}var C1=class tp{constructor(){this.targetOrigin=window.origin,this.originValidator="none",this.targetWindow=window.top,this._boundingRect=new DOMRect(0,0,0,0),this._isShifted=!1,window.addEventListener("message",this),this.sendMessage("proxy-created"),this.listeners={}}static get singleton(){return this._singleton||(this._singleton=new tp),this._singleton}getKeycap(t){}setKeycap(t,i){this.sendMessage("update-setting",{setKeycap:{keycap:t,value:i}})}set alphabeticLayout(t){this.sendMessage("update-setting",{alphabeticLayout:t})}set layouts(t){this.sendMessage("update-setting",{layouts:t})}get normalizedLayouts(){return[]}set editToolbar(t){this.sendMessage("update-setting",{editToolbar:t})}set container(t){throw new Error("Container inside an iframe cannot be changed")}show(t){this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:!0},bubbles:!0,cancelable:!0,composed:!0}))&&(this.sendMessage("show",t),this.dispatchEvent(new Event("virtual-keyboard-toggle")))}hide(t){this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:!1},bubbles:!0,cancelable:!0,composed:!0}))&&(this.sendMessage("hide",t),this.dispatchEvent(new Event("virtual-keyboard-toggle")))}get isShifted(){return this._isShifted}get visible(){return this._boundingRect.height>0}set visible(t){t?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(t){return this.sendMessage("execute-command",{command:t}),!0}updateToolbar(t){this.sendMessage("update-toolbar",t)}update(t){this.sendMessage("update-setting",t)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(t,i,r){this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].has(i)||this.listeners[t].add(i)}dispatchEvent(t){return!this.listeners[t.type]||this.listeners[t.type].size===0?!0:(this.listeners[t.type].forEach(i=>{typeof i=="function"?i(t):i==null||i.handleEvent(t)}),!t.defaultPrevented)}removeEventListener(t,i,r){this.listeners[t]&&this.listeners[t].delete(i)}handleEvent(t){if(Bs(t)){if(!ws(t.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");this.handleMessage(t.data)}}handleMessage(t){let{action:i}=t;if(i==="execute-command"){let{command:r}=t;fr(r)==="virtual-keyboard"&&this.executeCommand(r);return}if(i==="synchronize-proxy"){this._boundingRect=t.boundingRect,this._isShifted=t.isShifted;return}if(i==="geometry-changed"){this._boundingRect=t.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(t,i={}){if(!this.targetWindow)throw new DOMException("A frame does not have access to the top window and can't communicate with the keyboard.","SecurityError");this.targetWindow.postMessage(f({type:io,action:t},i),this.targetOrigin)}},L1={numeric:{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",rows:[[{latex:"x",shift:"y",variants:["y","z","t","r","x^2","x^n","x^{#?}","x_n","x_i","x_{#?}",{latex:"f(#?)",class:"small"},{latex:"g(#?)",class:"small"}]},{latex:"n",shift:"a",variants:["i","j","p","k","a","u"]},"[separator-5]","[7]","[8]","[9]","[/]","[separator-5]",{latex:"\\exp
2978onentialE",shift:"\\ln",variants:["\\exp","\\times 10^{#?}","\\ln","\\log_{10}","\\log","\\lg","\\operatorname{lb}"]},{latex:"\\imaginaryI",variants:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"]},{latex:"\\pi",shift:"\\sin",variants:["\\prod",{latex:"\\theta",aside:"theta"},{latex:"\\rho",aside:"rho"},{latex:"\\tau",aside:"tau"},"\\sin","\\cos","\\tan"]}],[{label:"<",latex:"<",class:"hide-shift",shift:{latex:"\\le",label:"≤"}},{label:">",latex:">",class:"hide-shift",shift:{latex:"\\ge",label:"≥"}},"[separator-5]","[4]","[5]","[6]","[*]","[separator-5]",{class:"hide-shift",latex:"#@^2}",shift:"#@^{\\prime}}"},{latex:"#@^{#0}}",class:"hide-shift",shift:"#@_{#?}"},{class:"hide-shift",latex:"\\sqrt{#0}",shift:{latex:"\\sqrt[#0]{#?}}"}}],["[(]","[)]","[separator-5]","[1]","[2]","[3]","[-]","[separator-5]",{latex:"\\int^{\\infty}_{0}\\!#?\\,\\mathrm{d}x",class:"small hide-shift",shift:"\\int",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{class:"hide-shift",latex:"\\forall",shift:"\\exists"},{label:"[backspace]",width:1}],[{label:"[shift]",width:2},"[separator-5]","[0]","[.]","[=]","[+]","[separator-5]","[left]","[right]",{label:"[action]",width:1}]]},greek:{label:"&alpha;&beta;&gamma;",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"<i>&#x03c6;</i>",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"<i>&#x03c2;</i>",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"<i>&#x03f5;</i>",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"epsilon",shift:'\\char"0190'},{label:"<i>&rho;</i>",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:'\\char"3A1'},{label:"<i>&tau;</i>",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:'\\char"3A4'},{label:"<i>&upsilon;</i>",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"<i>&theta;</i>",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"<i>&iota;</i>",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:'\\char"399'},{label:"<i>&omicron;</i>",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:'\\char"39F'},{label:"<i>&pi;</i>",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"<i>&alpha;</i>",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:'\\char"391'},{label:"<i>&sigma;</i>",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"<i>&delta;</i>",class:"MLK__tex hide-shift",insert:"\\delta",aside:"delta",shift:"\\Delta"},{latex:"\\phi",class:"MLK__tex hide-shift",insert:"\\phi",aside:"phi",shift:"\\Phi"},{label:"<i>&gamma;</i>",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"<i>&eta;</i>",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:'\\char"397'},{label:"<i>&xi;</i>",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"<i>&kappa;</i>",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"<i>&lambda;</i>",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"<i>&zeta;</i>",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:'\\char"396'},{label:"<i>&chi;</i>",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:'\\char"3A7'},{label:"<i>&psi;</i>",class:"MLK__tex hide-shift",insert:"\\psi",aside:"psi",shift:"\\Psi"},{label:"<i>&omega;</i>",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"<i>&beta;</i>",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:'\\char"392'},{label:"<i>&nu;</i>",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:'\\char"39D'},{label:"<i>&mu;</i>",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:'\\char"39C'},"[backspace]"],["[separator]",{label:"<i>&#x03b5;</i>",class:"MLK__tex",insert:"\\varepsilon",aside:"epsilon var."},{label:"<i>&#x03d1;</i>",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"<i>&#x3f0;</i>",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"<i>&#x03d6;</i>",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"<i>&#x03f1;</i>",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"&infin;≠∈",labelClass:"MLK__tex",tooltip:"keyboard.tooltip.symbols",rows:[[{latex:"\\sin",shift:"\\sin^{-1}",variants:[{class:"small",latex:"\\sinh"},{class:"small",latex:"\\sin^{-1}"},{class:"small",latex:"\\operatorname{arsinh}"}]},"\\ln",{latex:"\\mathrm{abs}",insert:"\\mathrm{abs}\\left(#0\\right)"},{latex:"\\rightarrow",shift:"\\Rightarrow",variants:[{latex:"\\implies",aside:"implies"},{latex:"\\to",aside:"to"},"\\dashv",{latex:"\\roundimplies",aside:"round implies"}]},{latex:"\\exists",variants:["\\nexists"],shift:"\\nexists"},{latex:"\\in",shift:"\\notin",variants:["\\notin","\\owns"]},"\\cup",{latex:"\\overrightarrow{#@}",shift:"\\overleftarrow{#@}",variants:["\\overleftarrow{#@}","\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"]},{class:"small hide-shift",latex:"\\lim_{#?}",shift:"\\lim_{x\\to\\infty}",variants:[{class:"small",latex:"\\liminf_{#?}"},{class:"small",latex:"\\limsup_{#?}"}]},"\\exponentialE"],[{latex:"\\cos",shift:"\\cos^{-1}",variants:[{class:"small",latex:"\\cosh"},{class:"small",latex:"\\cos^{-1}"},{class:"small",latex:"\\operatorname{arcosh}"}]},{latex:"\\log",shift:"\\log_{10}",variants:["\\log_{#0}","\\log_{10}"]},"\\left\\vert#0\\right\\vert",{latex:"\\larr",shift:"\\lArr",variants:[{latex:"\\impliedby",aside:"implied by"},{latex:"\\gets",aside:"gets"},"\\lArr","\\vdash",{latex:"\\models",aside:"models"}]},{latex:"\\forall",shift:"\\lnot",variants:[{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"}]},{latex:"\\ni",shift:"\\not\\owns"},"\\cap",{latex:"\\overline{#@}",shift:"\\underline{#@}",variants:["\\overbrace{#@}","\\overlinesegment{#@}","\\overleftrightarrow{#@}","\\overrightarrow{#@}","\\overleftarrow{#@}","\\overgroup{#@}","\\underbrace{#@}","\\underlinesegment{#@}","\\underleftrightarrow{#@}","\\underrightarrow{#@}","\\underleftarrow{#@}","\\undergroup{#@}"]},{class:"hide-shift small",latex:"\\int",shift:"\\iint",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\smallint",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\intop","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"]},{latex:"\\pi",shift:"\\tau",variants:["\\tau"]}],[{latex:"\\tan",shift:"\\tan^{-1}",variants:[{class:"small",latex:"\\tanh"},{class:"small",latex:"\\tan^{-1}"},{class:"small",latex:"\\operatorname{artanh}"},{class:"small",latex:"\\arctan"},{class:"small",latex:"\\operatorname{arctg}"},{class:"small",latex:"\\operatorname{tg}"}]},{latex:"\\exp",insert:"\\exp\\left(#0\\right)",variants:["\\exponentialE^{#0}"]},"\\left\\Vert#0\\right\\Vert",{latex:"\\lrArr",shift:"\\leftrightarrow",variants:[{latex:"\\iff",aside:"if and only if"},"\\leftrightarrow","\\leftrightarrows","\\Leftrightarrow",{latex:"^\\biconditional",aside:"biconditional"}]},{latex:"\\vert",shift:"!"},{latex:"#@^{\\complement}",aside:"complement",variants:[{latex:"\\setminus",aside:"set minus"},{latex:"\\smallsetminus",aside:"small set minus"}]},{latex:"\\subset",shift:"\\subseteq",variants:["\\subset","\\subseteq","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsubseteq","\\supset","\\supseteq","\\supsetneq","\\supsetneqq","\\nsupset","\\nsupseteq"]},{latex:"#@^{\\prime}",shift:"#@^{\\doubleprime}",variants:["#@^{\\doubleprime}","#@\\degree"]},{latex:"\\mathrm{d}",shift:"\\partial",variants:["\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{latex:"\\infty",variants:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"]}],[{label:"[shift]",width:2},{class:"box",latex:",",shift:";",variants:[";","?"]},{class:"box",latex:"\\colon",shift:"\\Colon",variants:[{latex:"\\Colon",aside:"such that",class:"box"},{latex:":",aside:"ratio",class:"box"},{latex:"\\vdots",aside:"",class:"box"},{latex:"\\ddots",aside:"",class:"box"},{latex:"\\ldotp",aside:"low dot",class:"box"},{latex:"\\cdotp",aside:"center dot",class:"box"},{latex:"\\ldots",aside:"low ellipsis",class:"box"},{latex:"\\cdots",aside:"center ellipsis",class:"box"},{latex:"\\therefore",aside:"therefore",class:"box"},{latex:"\\because",aside:"because",class:"box"}]},{class:"box",latex:"\\cdot",aside:"centered dot",shift:"\\ast",variants:["\\circ","\\bigcirc","\\bullet","\\odot","\\oslash","\\circledcirc","\\ast","\\star","\\times","\\doteq","\\doteqdot"]},"[separator]","[left]","[right]",{label:"[backspace]",width:1,class:"action hide-shift"},{label:"[action]",width:1}]]},compact:{label:"compact",rows:[["[+]","[-]","[*]","[/]","[=]","[.]","[(]","[)]","\\sqrt{#0}","#@^{#?}"],["[1]","[2]","[3]","[4]","[5]","[6]","[7]","[8]","[9]","[0]"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"}
vendor: 13,829 bytes, lines 2978-3020
2978,"[hide-keyboard]"]]},minimalist:{label:"minimalist",layers:[{style:`
2979          div.minimalist-backdrop {
2980            display: flex;
2981            justify-content: center;
2982          }          
2983          div.minimalist-container {
2984            --keycap-height: 40px;
2985            --keycap-max-width: 53px;
2986            --keycap-small-font-size: 12px;
2987            background: var(--keyboard-background);
2988            padding: 20px 20px 0px 20px;
2989            border-top-left-radius: 8px;
2990            border-top-right-radius: 8px;
2991            border: 1px solid var(--keyboard-border);
2992            box-shadow: 0 0 32px rgb(0 0 0 / 30%);
2993          }        
2994        `,backdrop:"minimalist-backdrop",container:"minimalist-container",rows:[["+","-","\\times",{latex:"\\frac{#@}{#0}",class:"small"},"=","[.]","(",")",{latex:"\\sqrt{#0}",class:"small"},{latex:"#@^{#?}",class:"small"}],["1","2","3","4","5","6","7","8","9","0"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]}]},"numeric-only":{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",id:"numeric-only",rows:[["7","8","9","[separator]",{label:"[backspace]",width:2}],["4","5","6","[separator]","[separator]","[separator]"],["1","2","3","[separator]","[separator]","[separator]"],["0",{label:"[.]",variants:[]},"-","[separator]","[left]","[right]"]]}},In={0:["\\varnothing","\\infty"],1:["\\frac{1}{#@}","#@^{-1}","\\times 10^{#?}","\\phi","\\imaginaryI"],2:["\\frac{1}{2}","#@^2","\\sqrt2","\\exponentialE"],3:["\\frac{1}{3}","#@^3","\\sqrt3","\\pi"],4:["\\frac{1}{4}","#@^4"],5:["\\frac{1}{5}","#@^5","\\sqrt5"],6:["\\frac{1}{6}","#@^6"],7:["\\frac{1}{7}","#@^7"],8:["\\frac{1}{8}","#@^8"],9:["\\frac{1}{9}","#@^9"],".":[".",",",";","\\colon"],",":["{,}",".",";","\\colon"],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"},"å","à","á","â","ä","æ"],A:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"},"Å","À","Á","Â","Ä","Æ"],b:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"},"ç"],d:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn’t"},"è","é","ê","ë"],E:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn’t"},"È","É","Ê","Ë"],g:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"},"ì","í","î","ï"],I:[{latex:"\\imaginaryI",aside:"imaginary i"},"Ì","Í","Î","Ï"],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\mathbb{N}",aside:"set of natural numbers"},"ñ"],o:["ø","œ","ò","ó","ô","ö"],O:["ø","Œ","Ò","Ó","Ô","Ö"],p:[{latex:"\\mathbb{P}",aside:"set of primes"}],q:[{latex:"\\mathbb{Q}",aside:"set of rational numbers"}],r:[{latex:"\\mathbb{R}",aside:"set of real numbers"}],u:["ù","ú","û","ü"],U:["Ù","Ú","Û","Ü"],z:[{latex:"\\mathbb{Z}",aside:"set of integers"}],y:["ý","ÿ"],Y:["Ÿ"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space<br>⁻³⧸₁₈ em"},{latex:'\\char"203A\\,\\char"2039',insert:"\\,",aside:"thin space<br>³⧸₁₈ em"},{latex:'\\char"203A\\:\\char"2039',insert:"\\:",aside:"medium space<br>⁴⧸₁₈ em"},{latex:'\\char"203A\\;\\char"2039',insert:"\\;",aside:"thick space<br>⁵⧸₁₈ em"},{latex:'\\char"203A\\ \\char"2039',insert:"\\ ",aside:"⅓ em"},{latex:'\\char"203A\\enspace\\char"2039',insert:"\\enspace",aside:"½ em"},{latex:'\\char"203A\\quad\\char"2039',insert:"\\quad",aside:"1 em"},{latex:'\\char"203A\\qquad\\char"2039',insert:"\\qquad",aside:"2 em"}]},ta;function ip(e,t){var i,r,a,n,o;let l=ni.singleton;if(!l)return;let s=cr(e),u="";if(window.mathVirtualKeyboard.isShifted){let b=(i=l.getKeycap(s==null?void 0:s.id))==null?void 0:i.shift;typeof b=="object"&&"variants"in b&&(u=(r=b.variants)!=null?r:"")}else u=(n=(a=l.getKeycap(s==null?void 0:s.id))==null?void 0:a.variants)!=null?n:"";if(typeof u=="string"&&!Jl(u)||Array.isArray(u)&&u.length===0){t==null||t();return}let c={},d="";for(let b of E1(u)){let x=As(b),E=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);c[E]=x;let[S,M]=wo(x);d+=`<div id=${E} class="item ${M}">${S}</div>`}let h=document.createElement("div");h.setAttribute("aria-hidden","true"),h.className="MLK__variant-panel",h.style.height="auto";let p=Object.keys(c).length,m=5;p===1?m=1:p===2||p===4?m=2:p===3||p===5||p===6?m=3:p>=7&&p<14&&(m=4),h.style.width=`calc(var(--variant-keycap-length) * ${m} + 12px)`,h.innerHTML=Fs.createHTML(d),Qe.open({root:(o=l==null?void 0:l.container)==null?void 0:o.querySelector(".ML__keyboard"),child:h}),ta=new AbortController;let{signal:g}=ta,v=e==null?void 0:e.getBoundingClientRect();if(v){v.top-h.clientHeight<0&&(h.style.width="auto",p<=6?h.style.height="56px":p<=12?h.style.height="108px":p<=18?h.style.height="205px":h.classList.add("compact"));let b=Math.max(0,Math.min(window.innerWidth-h.offsetWidth,(v.left+v.right-h.offsetWidth)/2)),x=v.top-h.clientHeight+5;h.style.left=`${b}px`,h.style.top=`${x}px`,h.classList.add("is-visible"),requestAnimationFrame(()=>{var E;h.addEventListener("pointerup",S=>{let M=cr(S.target);!(M!=null&&M.id)||!c[M.id]||(Xl(c[M.id]),ur(),t==null||t(),S.preventDefault())},{capture:!0,passive:!1,signal:g}),h.addEventListener("pointerenter",S=>{let M=cr(S.target);!(M!=null&&M.id)||!c[M.id]||M.classList.add("is-active")},{capture:!0,signal:g}),h.addEventListener("pointerleave",S=>{let M=cr(S.target);S.target&&"tagName"in S.target&&typeof S.target.tagName=="string"&&S.target.tagName.toUpperCase()==="ASIDE"||!(M!=null&&M.id)||!c[M.id]||M.classList.remove("is-active")},{capture:!0,signal:g}),(E=l.getKeycap(s==null?void 0:s.id))!=null&&E.stickyVariantPanel?window.addEventListener("pointerdown",S=>{if(!(S.target instanceof Node))return;let M=h.contains(S.target);S.target===h||M||(ur(),t==null||t())},{signal:g}):(window.addEventListener("pointercancel",()=>{ur(),t==null||t()},{signal:g}),window.addEventListener("pointerup",()=>{ur(),t==null||t()},{signal:g}))})}}function ur(){ta==null||ta.abort(),ta=null,Qe.state==="open"&&Qe.close()}function D1(e){if(e==="foreground-color"){let t=[];for(let i of Object.keys(Ei))t.push({class:"swatch-button",label:'<span style="border: 3px solid '+Ei[i]+'"></span>',command:["applyStyle",{color:i}]});return t}if(e==="background-color"){let t=[];for(let i of Object.keys(Di))t.push({class:"swatch-button",label:'<span style="background:'+Di[i]+'"></span>',command:["applyStyle",{backgroundColor:i}]});return t}}function Jl(e){return In[e]!==void 0}function E1(e){var t;return typeof e!="string"?e:(In[e]||(In[e]=(t=D1(e))!=null?t:[]),In[e])}function B1(e){return typeof e=="string"?e:Object.entries(e).map(([t,i])=>`${t}:${i} !important`).join(";")}function A1(e){return Object.keys(e).map(t=>`${t} {${B1(e[t])}}`).join("")}function Nr(e){if(!e)return"";let t=new H,i=new w({mode:"math",type:"root",body:De(e,{context:t,args:a=>a==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),r=co(va(new A(i.render(t),{classes:"ML__base"}),t));return ho(r,{classes:"ML__latex"}).toMarkup()}function yn(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function T1(e){return e.replace(/<\/?[^>]+(>|$)/g," ")}function F1(e){var t,i,r,a;let n=(a=(r=(i=(t=e.tooltip)!=null?t:typeof e.label=="string"?T1(e.label):void 0)!=null?i:e.insert)!=null?r:e.latex)!=null?a:e.key;return n&&n.replace(/\s+/g," ").trim()||null}function z1(e){if(typeof e>"u"||e===null)return null;try{return JSON.stringify(e)}catch{return null}}function K1(e){var t,i;let r=(i=(t=e.insert)!=null?t:e.latex)!=null?i:e.key;return r??null}function ia(e){if(Array.isArray(e))return e.map(i=>ia(i)).flat();let t=typeof e=="string"?{markup:e}:e;return"rows"in t&&Array.isArray(t.rows)&&(t.rows=t.rows.map(i=>i.map(r=>As(r)))),t.id!=null||(t.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[t]}function $1(){var e,t;let i=window.mathVirtualKeyboard.alphabeticLayout;if(i==="auto"){let o=na();o&&(i=o.virtualLayout),(!i||i==="auto")&&(i=(e={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[O.locale.slice(0,2)])!=null?e:"qwerty")}let r={qwerty:["qwertyuiop"," asdfghjkl ","^zxcvbnm~"],azerty:["azertyuiop","qsdfghjklm","^ wxcvbn ~"],qwertz:["qwertzuiop"," asdfghjkl ","^yxcvbnm~"],dvorak:["^  pyfgcrl ","aoeuidhtns","qjkxbmwvz~"],colemak:[" qwfpgjluy ","arstdhneio","^zxcvbkm~"]},a=(t=r[i])!=null?t:r.qwerty,n=i==="azerty"?[[{label:"1",variants:"1"},{label:"2",shift:{latex:"é"},variants:"2"},{label:"3",shift:{latex:"ù"},variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{label:"(",latex:"("},variants:"5"},{label:"6",shift:{label:")",latex:")"},variants:"6"},{label:"7",shift:{latex:"è"},variants:"7"},{label:"8",shift:{latex:"ê"},variants:"8"},{label:"9",shift:{latex:"ç"},variants:"9"},{label:"0",shift:{latex:"à"},variants:"0"}]]:[[{label:"1",variants:"1"},{label:"2",variants:"2"},{label:"3",variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{latex:"\\frac{#@}{#?}"},variants:"5"},{label:"6",shift:{latex:"#@^#?"},variants:"6"},{label:"7",variants:"7"},{label:"8",shift:{latex:"\\times"},variants:"8"},{label:"9",shift:{label:"(",latex:"("},variants:"9"},{label:"0",shift:{label:")",latex:")"},variants:"0"}]];for(let o of a){let l=[];for(let s of o)/[a-z]/.test(s)?l.push({label:s,class:"hide-shift",shift:{label:s.toUpperCase(),variants:Jl(s.toUpperCase())?s.toUpperCase():void 0},variants:Jl(s)?s:void 0}):s==="~"?i!=="dvorak"?l.push("[backspace]"):l.push({label:"[backspace]",width:1}):s==="^"?l.push("[shift]"):s===" "&&l.push("[separator-5]");n.push(l)}return n.push(["[-]","[+]","[=]",{label:" ",width:1.5},{label:",",shift:";",variants:".",class:"hide-shift"},"[.]","[left]","[right]",{label:"[action]",width:1.5}]),{label:"abc",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.alphabetic",layers:ia({rows:n})}}function rp(e){if(e==="alphabetic")return $1();if(typeof e=="string")return rp(L1[e]);let t;if("rows"in e&&Array.isArray(e.rows)){let a=e,{rows:n}=a,o=Wn(a,["rows"]);t=y(f({},o),{layers:ia({rows:e.rows})})}else if("markup"in e&&typeof e.markup=="string"){let a=e,{markup:n}=a,o=Wn(a,["markup"]);t=y(f({},o),{layers:ia(e.markup)})}else t=f({},e),"layers"in e?t.layers=ia(e.layers):console.error('MathLive 0.108.3: provide either a "rows", "markup" or "layers" property');let i=!1,r=!1;for(let a of t.layers)if(a.rows)for(let n of a.rows.flat()){gr(n)&&(i=!0);let o=n.command;typeof o=="string"&&["undo","redo","cut","copy","paste"].includes(o)&&(r=!0)}return(!("displayShiftedKeycaps"in e)||e.displayShiftedKeycaps===void 0)&&(t.displayShiftedKeycaps=i),(!("displayEditToolbar"in e)||e.displayEditToolbar===void 0)&&(t.displayEditToolbar=!r),t}function P1(e,t){var i,r;let a='<div class="left">';if(e.normalizedLayouts.length>1)for(let[n,o]of e.normalizedLayouts.entries()){let l=o,s=[n===t?"selected":"layer-switch"];l.tooltip&&s.push("MLK__tooltip"),l.labelClass&&s.push(...l.labelClass.split(" ")),a+=`<div class="${s.join(" ")}"`,l.tooltip&&(a+=" data-tooltip='"+((i=P(l.tooltip))!=null?i:l.tooltip)+"' "),n!==t&&(a+=`data-layer="${l.layers[0].id}"`),a+=`>${(r=l.label)!=null?r:"untitled"}</div>`}return a+="</div>",a}function O1(e,t){let i="";if(e.editToolbar==="none")return"";let r=[];t.selectionIsCollapsed?r.push("undo","redo","pasteFromClipboard"):r.push("cutToClipboard","copyToClipboard","pasteFromClipboard");let a={undo:`<div class='action ${t.canUndo===!1?"disabled":""}'
2995          data-command='"undo"'
2996          data-tooltip='${P("tooltip.undo")}'>
2997          <svg><use xlink:href='#svg-undo' /></svg>
2998      </div>`,redo:`<div class='action ${t.canRedo===!1?"disabled":""}'
2999          data-command='"redo"'
3000          data-tooltip='${P("tooltip.redo")}'>
3001          <svg><use xlink:href='#svg-redo' /></svg>
3002      </div>`,cutToClipboard:`
3003        <div class='action'
3004            data-command='"cutToClipboard"'
3005            data-tooltip='${P("tooltip.cut to clipboard")}'>
3006            <svg><use xlink:href='#svg-cut' /></svg>
3007        </div>
3008    `,copyToClipboard:`
3009        <div class='action'
3010            data-command='"copyToClipboard"'
3011            data-tooltip='${P("tooltip.copy to clipboard")}'>
3012            <svg><use xlink:href='#svg-copy' /></svg>
3013        </div>
3014    `,pasteFromClipboard:`
3015        <div class='action'
3016            data-command='"pasteFromClipboard"'
3017            data-tooltip='${P("tooltip.paste from clipboard")}'>
3018            <svg><use xlink:href='#svg-paste' /></svg>
3019        </div>
3020    `};return i+=r.map(n=>a[n]).join(""),i}function I1(e){for(let t of e)R1(t)}function R1(e){let t=ni.singleton;if(!t)return;let i={};if(!e.id){if(e.hasAttribute("data-label")&&(i.label=e.dataset.label),e.hasAttribute("data-latex")&&(i.latex=e.dataset.latex),e.hasAttribute("data-key")&&(i.key=e.dataset.key),e.hasAttribute("data-insert")&&(i.insert=e.dataset.insert),e.hasAttribute("data-variants")&&(i.variants=e.dataset.variants),e.hasAttribute("data-aside")&&(i.aside=e.dataset.aside),e.className&&(i.class=e.className),!i.label&&!i.latex&&!i.key&&!i.insert&&(i.latex=e.innerText,i.label=e.innerHTML),e.hasAttribute("data-command"))try{i.command=JSON.parse(e.dataset.command)}catch(r){console.warn("Invalid JSON in data-command attribute",r)}e.id=t.registerKeycap(i)}if(!e.innerHTML){let[r]=wo(i);e.innerHTML=globalThis.MathfieldElement.createHTML(r)}}function N1(){Dt("virtual-keyboard"),Dt("core"),wa()}function q1(){ii("core"),ii("virtual-keyboard")}var V1=
vendor: 9,880 bytes, lines 3020-3068
3020`<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
3021
3022<symbol id="svg-delete-backward" viewBox="0 0 576 512">
3023  <path d="M432.1 208.1L385.9 256L432.1 303C442.3 312.4 442.3 327.6 432.1 336.1C423.6 346.3 408.4 346.3 399 336.1L352 289.9L304.1 336.1C295.6 346.3 280.4 346.3 271 336.1C261.7 327.6 261.7 312.4 271 303L318.1 256L271 208.1C261.7 199.6 261.7 184.4 271 175C280.4 165.7 295.6 165.7 304.1 175L352 222.1L399 175C408.4 165.7 423.6 165.7 432.1 175C442.3 184.4 442.3 199.6 432.1 208.1V208.1zM512 64C547.3 64 576 92.65 576 128V384C576 419.3 547.3 448 512 448H205.3C188.3 448 172 441.3 160 429.3L9.372 278.6C3.371 272.6 0 264.5 0 256C0 247.5 3.372 239.4 9.372 233.4L160 82.75C172 70.74 188.3 64 205.3 64L512 64zM528 128C528 119.2 520.8 112 512 112H205.3C201 112 196.9 113.7 193.9 116.7L54.63 256L193.9 395.3C196.9 398.3 201 400 205.3 400H512C520.8 400 528 392.8 528 384V128z"/>
3024</symbol>
3025
3026<symbol id="svg-shift" viewBox="0 0 384 512">
3027  <path d="M2.438 252.3C7.391 264.2 19.06 272 32 272h80v160c0 26.51 21.49 48 48 48h64C250.5 480 272 458.5 272 432v-160H352c12.94 0 24.61-7.797 29.56-19.75c4.953-11.97 2.219-25.72-6.938-34.88l-160-176C208.4 35.13 200.2 32 192 32S175.6 35.13 169.4 41.38l-160 176C.2188 226.5-2.516 240.3 2.438 252.3zM192 86.63L313.4 224H224v208H160V224H70.63L192 86.63z"/>
3028</symbol>
3029
3030<symbol id="svg-commit" viewBox="0 0 512 512">
3031  <path d="M135 432.1l-128-128C2.344 300.3 0 294.2 0 288s2.344-12.28 7.031-16.97l128-128c9.375-9.375 24.56-9.375 33.94 0s9.375 24.56 0 33.94L81.94 264H464v-208C464 42.75 474.8 32 488 32S512 42.75 512 56V288c0 13.25-10.75 24-24 24H81.94l87.03 87.03c9.375 9.375 9.375 24.56 0 33.94S144.4 442.3 135 432.1z"/>
3032</symbol>
3033
3034
3035<symbol id="circle-plus" viewBox="0 0 512 512"><path d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344c0 13.3 10.7 24 24 24s24-10.7 24-24V280h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V168c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H168c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"/></symbol>
3036
3037<symbol id="svg-command" viewBox="0 0 640 512">
3038  <path d="M34.495 36.465l211.051 211.05c4.686 4.686 4.686 12.284 0 16.971L34.495 475.535c-4.686 4.686-12.284 4.686-16.97 0l-7.071-7.07c-4.686-4.686-4.686-12.284 0-16.971L205.947 256 10.454 60.506c-4.686-4.686-4.686-12.284 0-16.971l7.071-7.07c4.686-4.687 12.284-4.687 16.97 0zM640 468v-10c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h328c6.627 0 12-5.373 12-12z"/>
3039</symbol>
3040
3041<symbol id="svg-undo" viewBox="0 0 512 512">
3042  <path d="M20 8h10c6.627 0 12 5.373 12 12v110.625C85.196 57.047 165.239 7.715 256.793 8.001 393.18 8.428 504.213 120.009 504 256.396 503.786 393.181 392.834 504 256 504c-63.926 0-122.202-24.187-166.178-63.908-5.113-4.618-5.354-12.561-.482-17.433l7.069-7.069c4.503-4.503 11.749-4.714 16.482-.454C150.782 449.238 200.935 470 256 470c117.744 0 214-95.331 214-214 0-117.744-95.331-214-214-214-82.862 0-154.737 47.077-190.289 116H180c6.627 0 12 5.373 12 12v10c0 6.627-5.373 12-12 12H20c-6.627 0-12-5.373-12-12V20c0-6.627 5.373-12 12-12z"/>
3043</symbol>
3044<symbol id="svg-redo" viewBox="0 0 512 512">
3045  <path d="M492 8h-10c-6.627 0-12 5.373-12 12v110.625C426.804 57.047 346.761 7.715 255.207 8.001 118.82 8.428 7.787 120.009 8 256.396 8.214 393.181 119.166 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-7.069-7.069c-4.503-4.503-11.749-4.714-16.482-.454C361.218 449.238 311.065 470 256 470c-117.744 0-214-95.331-214-214 0-117.744 95.331-214 214-214 82.862 0 154.737 47.077 190.289 116H332c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h160c6.627 0 12-5.373 12-12V20c0-6.627-5.373-12-12-12z"/>
3046</symbol>
3047<symbol id="svg-arrow-left" viewBox="0 0 320 512">
3048  <path d="M206.7 464.6l-183.1-191.1C18.22 267.1 16 261.1 16 256s2.219-11.97 6.688-16.59l183.1-191.1c9.152-9.594 24.34-9.906 33.9-.7187c9.625 9.125 9.938 24.37 .7187 33.91L73.24 256l168 175.4c9.219 9.5 8.906 24.78-.7187 33.91C231 474.5 215.8 474.2 206.7 464.6z"/>
3049</symbol>
3050<symbol id="svg-arrow-right" viewBox="0 0 320 512">
3051  <path d="M113.3 47.41l183.1 191.1c4.469 4.625 6.688 10.62 6.688 16.59s-2.219 11.97-6.688 16.59l-183.1 191.1c-9.152 9.594-24.34 9.906-33.9 .7187c-9.625-9.125-9.938-24.38-.7187-33.91l168-175.4L78.71 80.6c-9.219-9.5-8.906-24.78 .7187-33.91C88.99 37.5 104.2 37.82 113.3 47.41z"/>
3052</symbol>
3053<symbol id="svg-tab" viewBox="0 0 448 512">
3054  <path d="M32 217.1c0-8.8 7.2-16 16-16h144v-93.9c0-7.1 8.6-10.7 13.6-5.7l143.5 143.1c6.3 6.3 6.3 16.4 0 22.7L205.6 410.4c-5 5-13.6 1.5-13.6-5.7v-93.9H48c-8.8 0-16-7.2-16-16v-77.7m-32 0v77.7c0 26.5 21.5 48 48 48h112v61.9c0 35.5 43 53.5 68.2 28.3l143.6-143c18.8-18.8 18.8-49.2 0-68L228.2 78.9c-25.1-25.1-68.2-7.3-68.2 28.3v61.9H48c-26.5 0-48 21.6-48 48zM436 64h-8c-6.6 0-12 5.4-12 12v360c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12z"/>
3055</symbol>
3056<symbol id="svg-paste" viewBox="0 0 512 512"><path d="M160 32c11.6 0 21.3 8.2 23.5 19.2C185 58.6 191.6 64 199.2 64H208c8.8 0 16 7.2 16 16V96H96V80c0-8.8 7.2-16 16-16h8.8c7.6 0 14.2-5.4 15.7-12.8C138.7 40.2 148.4 32 160 32zM64 64h2.7C65 69 64 74.4 64 80V96c0 17.7 14.3 32 32 32H224c17.7 0 32-14.3 32-32V80c0-5.6-1-11-2.7-16H256c17.7 0 32 14.3 32 32h32c0-35.3-28.7-64-64-64H210.6c-9-18.9-28.3-32-50.6-32s-41.6 13.1-50.6 32H64C28.7 32 0 60.7 0 96V384c0 35.3 28.7 64 64 64H192V416H64c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32zM288 480c-17.7 0-32-14.3-32-32V192c0-17.7 14.3-32 32-32h96v56c0 22.1 17.9 40 40 40h56V448c0 17.7-14.3 32-32 32H288zM416 165.3L474.7 224H424c-4.4 0-8-3.6-8-8V165.3zM448 512c35.3 0 64-28.7 64-64V235.9c0-12.7-5.1-24.9-14.1-33.9l-59.9-59.9c-9-9-21.2-14.1-33.9-14.1H288c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H448z"/></symbol>
3057<symbol id="svg-cut" viewBox="0 0 512 512"><path d="M485.6 444.2L333.6 314.9C326.9 309.2 326.1 299.1 331.8 292.4C337.5 285.6 347.6 284.8 354.4 290.5L506.4 419.8C513.1 425.5 513.9 435.6 508.2 442.4C502.5 449.1 492.4 449.9 485.6 444.2zM485.7 67.76C492.5 62.07 502.5 62.94 508.2 69.69C513.9 76.45 513.1 86.55 506.3 92.24L208.5 343.1C218.3 359.7 224 379.2 224 400C224 461.9 173.9 512 112 512C50.14 512 0 461.9 0 400C0 338.1 50.14 288 112 288C141.5 288 168.4 299.4 188.4 318.1L262.2 256L188.4 193.9C168.4 212.6 141.5 224 112 224C50.14 224 0 173.9 0 112C0 50.14 50.14 0 112 0C173.9 0 224 50.14 224 112C224 132.8 218.3 152.3 208.5 168.9L287 235.1L485.7 67.76zM32 112C32 156.2 67.82 192 112 192C156.2 192 192 156.2 192 112C192 67.82 156.2 32 112 32C67.82 32 32 67.82 32 112zM112 480C156.2 480 192 444.2 192 400C192 355.8 156.2 320 112 320C67.82 320 32 355.8 32 400C32 444.2 67.82 480 112 480z"/></symbol>
3058<symbol id="svg-copy" viewBox="0 0 512 512"><path d="M272 416C263.2 416 256 423.2 256 432V448c0 17.67-14.33 32-32 32H64c-17.67 0-32-14.33-32-32V192c0-17.67 14.33-32 32-32h112C184.8 160 192 152.8 192 144C192 135.2 184.8 128 176 128H63.99c-35.35 0-64 28.65-64 64l.0098 256C0 483.3 28.65 512 64 512h160c35.35 0 64-28.65 64-64v-16C288 423.2 280.8 416 272 416zM502.6 86.63l-77.25-77.25C419.4 3.371 411.2 0 402.7 0H288C252.7 0 224 28.65 224 64v256c0 35.35 28.65 64 64 64h160c35.35 0 64-28.65 64-64V109.3C512 100.8 508.6 92.63 502.6 86.63zM416 45.25L466.7 96H416V45.25zM480 320c0 17.67-14.33 32-32 32h-160c-17.67 0-32-14.33-32-32V64c0-17.67 14.33-32 32-32h96l.0026 64c0 17.67 14.33 32 32 32H480V320z"/>
3059</symbol>
3060<symbol id="svg-angle-double-right" viewBox="0 0 512 512"><path d="M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/>
3061</symbol>
3062<symbol id="svg-angle-double-left" viewBox="0 0 512 512"><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"/>
3063</symbol>
3064<symbol id="svg-trash" viewBox="0 0 448 512">
3065  <path d="M336 64l-33.6-44.8C293.3 7.1 279.1 0 264 0h-80c-15.1 0-29.3 7.1-38.4 19.2L112 64H24C10.7 64 0 74.7 0 88v2c0 3.3 2.7 6 6 6h26v368c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V96h26c3.3 0 6-2.7 6-6v-2c0-13.3-10.7-24-24-24h-88zM184 32h80c5 0 9.8 2.4 12.8 6.4L296 64H152l19.2-25.6c3-4 7.8-6.4 12.8-6.4zm200 432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V96h320v368zm-176-44V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm-80 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm160 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12z"/>
3066</symbol>
3067<symbol id="svg-keyboard-down" viewBox="0 0 576 512"><path d="M64 48c-8.8 0-16 7.2-16 16V240c0 8.8 7.2 16 16 16H512c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H64zM0 64C0 28.7 28.7 0 64 0H512c35.3 0 64 28.7 64 64V240c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM159 359c9.4-9.4 24.6-9.4 33.9 0l95 95 95-95c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L305 505c-4.5 4.5-10.6 7-17 7s-12.5-2.5-17-7L159 393c-9.4-9.4-9.4-24.6 0-33.9zm1-167c0-8.8 7.2-16 16-16H400c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V192zM120 88h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H120c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H200c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H280c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H360c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H440c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16z"/></symbol>
3068</svg>`;
vendor: 3,616 bytes, line 3068
3068function j1(e){e.resetKeycapRegistry(),N1();let t=document.createElement("div");t.className="ML__keyboard";let i=document.createElement("div");i.className="MLK__plate",i.innerHTML=globalThis.MathfieldElement.createHTML(V1+e.normalizedLayouts.map((o,l)=>H1(e,o,l)).join(""));let r=document.createElement("div");r.className="MLK__backdrop",r.appendChild(i),t.appendChild(r),t.addEventListener("pointerdown",U1,{passive:!1});let a=t.querySelectorAll(".ML__edit-toolbar");if(a)for(let o of a)o.addEventListener("click",l=>{var s,u;let c=l.target,d="";for(;c&&!d;)d=(s=c==null?void 0:c.getAttribute("data-command"))!=null?s:"",c=(u=c==null?void 0:c.parentElement)!=null?u:null;d&&e.executeCommand(JSON.parse(d))});I1(t.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));let n=t.querySelectorAll(".MLK__layer");n.length>0;for(let o of n)o.addEventListener("pointerdown",l=>l.preventDefault());return e.currentLayer=e.latentLayer,t}function H1(e,t,i){var r;let a=[];if(!("layers"in t))return"";for(let n of t.layers)a.push(`<div tabindex="-1" class="MLK__layer" id="${n.id}">`),(e.normalizedLayouts.length>1||t.displayEditToolbar)&&(a.push("<div class='MLK__toolbar' role='toolbar'>"),a.push(P1(e,i)),((r=t.displayEditToolbar)==null||r)&&a.push('<div class="ML__edit-toolbar right"></div>'),a.push("</div>")),a.push(W1(e,n)),a.push("</div>");return a.join("")}function W1(e,t){if(typeof t=="string")return t;let i="";if(typeof t.style=="string"?i+=`<style>${t.style}</style>`:typeof t.style=="object"&&(i+=`<style>${A1(t.style)}</style>`),t.backdrop&&(i+=`<div class='${t.backdrop}'>`),t.container&&(i+=`<div class='${t.container}'>`),t.rows){i+="<div class=MLK__rows>";for(let r of t.rows){i+='<div dir="ltr" class=MLK__row>';for(let a of r)if(a){let n=e.registerKeycap(a),[o,l]=wo(a);/(^|\s)separator/.test(l)?i+=`<div class="${l}"`:i+=`<div tabindex="-1" id="${n}" class="${l}"`,a.tooltip&&(i+=` data-tooltip="${yn(a.tooltip)}"`);let s=F1(a);s&&(i+=` aria-label="${yn(s)}"`);let u=z1(a.command);u&&(i+=` data-command="${yn(u)}"`);let c=K1(a);c&&(i+=` data-keycap-value="${yn(c)}"`),i+=`>${o}</div>`}i+="</div>"}i+="</div>"}else t.markup&&(i+=t.markup);return t.container&&(i+="</div>"),t.backdrop&&(i+="</div>"),i}function wo(e,t={shifted:!1}){var i,r,a,n,o,l,s;let u="",c=(i=e.class)!=null?i:"";if(t.shifted&&gr(e)&&(c+=" is-active"),t.shifted&&"shift"in e)typeof e.shift=="string"?u=Nr(e.shift):typeof e.shift=="object"&&(u=e.shift.label?e.shift.label:(r=Nr(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?r:""),typeof e.shift=="object"&&(c=(n=(a=e.shift.class)!=null?a:e.class)!=null?n:"");else{if(u=e.label?e.label:(o=Nr(e.latex||e.insert||"")||e.key)!=null?o:"",e.shift){let d;typeof e.shift=="string"?d=Nr(e.shift):e.shift.label?d=e.shift.label:d=(l=Nr(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?l:"",u+=`<span class="MLK__shift">${d}</span>`}e.aside&&(u+=`<aside>${e.aside}</aside>`)}return e.layer&&!/layer-switch/.test(c)&&(c+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(c)||(c+=" MLK__keycap"),!/\bw[0-9]+\b/.test(c)&&e.width&&(c+=(s={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[e.width])!=null?s:""),[u,c||"MLK__keycap"]}var xt={"[left]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-left /></svg>",command:"performWithFeedback(moveToPreviousChar)",shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-left /></svg>",command:"performWithFeedback(extendSelectionBackward)"}},"[right]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-right /></svg>
3068",command:"performWithFeedback(moveToNextChar)",shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-right /></svg>",command:"performWithFeedback(extendSelectionForward)"}},"[up]":{class:"action hide-shift",label:"↑",command:"performWithFeedback(moveUp)",shift:{label:"↟",command:"performWithFeedback(extendSelectionUpward)"}},"[down]":{class:"action hide-shift",label:"↓",command:"performWithFeedback(moveDown)",shift:{label:"↡",command:"performWithFeedback(extendSelectionDownward)"}},"[return]":{class:"action hide-shift",command:"performWithFeedback(commit)",shift:{command:"performWithFeedback(addRowAfter)"},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[action]":{class:"action hide-shift",command:"performWithFeedback(commit)",shift:{label:"<svg class=svg-glyph><use xlink:href=#circle-plus /></svg>",command:"performWithFeedback(addRowAfter)"},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[hr]":{class:"separator horizontal-rule"},"[hide-keyboard]":{class:"action",command:["hideVirtualKeyboard"],width:1.5,label:"<svg class=svg-glyph-lg><use xlink:href=#svg-keyboard-down /></svg>"},"[.]":{variants:".",command:"performWithFeedback(insertDecimalSeparator)",shift:",",class:"big-op hide-shift",label:"."},"[,]":{variants:",",command:"performWithFeedback(insertDecimalSeparator)",shift:".",class:"big-op hide-shift",label:","},"[+]":{variants:[{latex:"\\sum_{#0}^{#0}",class:"small"},"\\oplus"],latex:"+",label:"+",class:"big-op hide-shift",shift:{latex:"\\sum",insert:"\\sum",class:"small"}},"[-]":{variants:["\\pm","\\ominus"],latex:"-",label:"&#x2212;",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"&divide;"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes","\\cdot"],latex:"\\cdot",label:"&times;",shift:{latex:"\\times"},class:"big-op hide-shift"},"[=]":{variants:["\\neq","\\equiv","\\varpropto","\\thickapprox","\\lt","\\gt","\\le","\\ge"],latex:"=",label:"=",shift:{label:"≠",latex:"\\ne"},class:"big-op hide-shift"},"[backspace]":{class:"action bottom right hide-shift",width:1.5,command:"performWithFeedback(deleteBackward)",label:"<svg class=svg-glyph><use xlink:href=#svg-delete-backward /></svg>",shift:{class:"action warning",label:"<svg class=svg-glyph><use xlink:href=#svg-trash /></svg>",command:"deleteAll"}}
vendor: 39,416 bytes, line 3068
3068,"[undo]":{class:"ghost if-can-undo",command:"undo",label:"<svg class=svg-glyph><use xlink:href=#svg-undo /></svg>",tooltip:"tooltip.undo"},"[redo]":{class:"ghost  if-can-redo",command:"redo",label:"<svg class=svg-glyph><use xlink:href=#svg-redo /></svg>",tooltip:"tooltip.redo"},"[(]":{variants:[{latex:"\\lbrack",key:"["},"\\langle","\\lfloor","\\lceil",{latex:"\\lbrace",key:"{"}],key:"(",label:"(",shift:{label:"[",key:"["},class:"hide-shift"},"[)]":{variants:[{latex:"\\rbrack",key:"]"},"\\rangle","\\rfloor","\\rceil",{latex:"\\rbrace",key:"}"}],key:")",label:")",shift:{label:"]",latex:"\\rbrack"},class:"hide-shift"},"[0]":{variants:"0",latex:"0",label:"0",shift:"\\infty",class:"hide-shift"},"[1]":{variants:"1",latex:"1",label:"1",shift:"#@^{-1}",class:"hide-shift"},"[2]":{variants:"2",latex:"2",label:"2",shift:"#@^2",class:"hide-shift"},"[3]":{variants:"3",latex:"3",label:"3",shift:"#@^3",class:"hide-shift"},"[4]":{variants:"4",latex:"4",label:"4",shift:"#@^4",class:"hide-shift"},"[5]":{variants:"5",latex:"5",label:"5",shift:"#@^5",class:"hide-shift"},"[6]":{variants:"6",latex:"6",label:"6",shift:"#@^6",class:"hide-shift"},"[7]":{variants:"7",latex:"7",label:"7",shift:"#@^7",class:"hide-shift"},"[8]":{variants:"8",latex:"8",label:"8",shift:"#@^8",class:"hide-shift"},"[9]":{variants:"9",latex:"9",label:"9",shift:"#@^9",class:"hide-shift"},"[separator-5]":{class:"separator",width:.5},"[separator]":{class:"separator"},"[separator-10]":{class:"separator"},"[separator-15]":{class:"separator",width:1.5},"[separator-20]":{class:"separator",width:2},"[separator-50]":{class:"separator",width:5},"[shift]":{class:"shift bottom left",width:1.5,label:"<span class=caps-lock-indicator></span><svg class=svg-glyph><use xlink:href=#svg-shift /></svg>"},"[foreground-color]":{variants:"foreground-color",command:["applyStyle",{color:"red"}],label:"<span style='border-radius: 50%;width:22px;height:22px; border: 3px solid #cc2428; box-sizing: border-box'>"},"[background-color]":{variants:"background-color",command:["applyStyle",{backgroundColor:"yellow"}],label:"<span style='border-radius: 50%;width:22px;height:22px; background:#fff590; box-sizing: border-box'></span>"}};function As(e){var t;if(typeof e=="string"){if(e==="[.]"&&globalThis.MathfieldElement.decimalSeparator===","&&(e="[,]"),!xt[e])return{latex:e};e={label:e}}let i;return"label"in e&&e.label&&xt[e.label]&&(i=y(f(f({},xt[e.label]),e),{label:xt[e.label].label})),"key"in e&&e.key&&xt[e.key]&&(i=y(f(f({},xt[e.key]),e),{key:xt[e.key].key})),i?(i.command==="insertDecimalSeparator"&&(i.label=(t=globalThis.MathfieldElement.decimalSeparator)!=null?t:"."),(i.tooltip===void 0||i.tooltip===null||i.tooltip===!1)&&delete i.tooltip,(i.tooltip===void 0||i.tooltip===null||i.tooltip===!1)&&delete i.tooltip,(i.aside===void 0||i.aside===null||i.aside===!1)&&delete i.aside,(i.variants===void 0||i.variants===null||i.variants===!1)&&delete i.variants,(i.shift===void 0||i.shift===null||i.shift===!1)&&delete i.shift,i):e}var ra;function U1(e){var t,i,r,a;if(e.button!==0)return;let n=ni.singleton;if(!n)return;let o=e.target;for(;o&&!o.getAttribute("data-layer");)o=o.parentElement;if(o){n.currentLayer=(t=o.getAttribute("data-layer"))!=null?t:"",e.preventDefault();return}let l=cr(e.target);if(!(l!=null&&l.id))return;let s=n.getKeycap(l.id);if(!s)return;e.type;let u=n;if(!u.connectedMathfieldWindow){let h=(i=window.focusedMathfield)==null?void 0:i.call(window);if(h){let p=(a=(r=h.element)==null?void 0:r.ownerDocument)==null?void 0:a.defaultView;p&&p!==window&&(u.connectedMathfieldWindow=p)}}let c=new AbortController,d=c.signal;l.classList.add("is-pressed"),l.addEventListener("pointerenter",vn(c),{capture:!0,signal:d}),l.addEventListener("pointerleave",vn(c),{capture:!0,signal:d}),l.addEventListener("pointercancel",vn(c),{signal:d}),l.addEventListener("pointerup",vn(c),{signal:d}),gr(s)&&(l.classList.add("is-active"),n.shiftPressCount++),s.variants&&(ra&&clearTimeout(ra),ra=setTimeout(()=>{l.classList.contains("is-pressed")&&(l.classList.remove("is-pressed"),l.classList.add("is-active"),e.target&&"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId),ip(l,()=>{c.abort(),l==null||l.classList.remove("is-active")}))},s.stickyVariantPanel?0:300)),e.preventDefault()}function vn(e){return t=>{let i=cr(t.target);if(!(i!=null&&i.id))return;let r=ni.singleton;if(!r)return;let a=r.getKeycap(i.id);if(a){if(t.type==="pointerenter"&&t.target===i&&t.isPrimary&&i.classList.add("is-pressed"),t.type==="pointercancel"){i.classList.remove("is-pressed"),gr(a)&&(r.shiftPressCount--,i.classList.toggle("is-active",r.isShifted)),e.abort();return}if(t.type==="pointerleave"&&t.target===i){i.classList.remove("is-pressed"),gr(a)&&(r.shiftPressCount--,i.classList.toggle("is-active",r.isShifted));return}if(t.type==="pointerup"){ra&&clearTimeout(ra),gr(a)?i.classList.toggle("is-active",r.isShifted):i.classList.contains("is-pressed")&&(i.classList.remove("is-pressed"),r.isShifted&&a.shift?typeof a.shift=="string"?r.executeCommand(["insert",a.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):Xl(a.shift):Xl(a),r.shiftPressCount===1&&!t.shiftKey&&(r.shiftPressCount=0)),e.abort(),t.preventDefault();return}}}}function Xl(e){let t=e.command;!t&&e.insert&&(t=["insert",e.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),!t&&e.key&&(t=["typedText",e.key,{focus:!0,feedback:!0,simulateKeystroke:!0}]),!t&&e.latex&&(t=["insert",e.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),t||(t=["typedText",e.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),ni.singleton&&ni.singleton.executeCommand(t)}function J1(e){if(e.nodeType!==1)return!1;let t=e.classList;return t.contains("MLK__keycap")||t.contains("shift")||t.contains("action")||t.contains("fnbutton")||t.contains("bigfnbutton")}function cr(e){if(!e)return;let t=e;for(;t&&!J1(t);)t=t.parentElement;return t??void 0}function gr(e){return!!e.class&&/(^|\s)shift($|\s)/.test(e.class)}var ni=class ap{constructor(){this.originalContainerBottomPadding=null,this.keycapRegistry={},this._shiftPressCount=0,this.isSandbox=!1;var t;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts=Object.freeze(["default"]),this._editToolbar="default",this._container=void 0,this._visible=!1,this._rebuilding=!1,this.observer=new ResizeObserver(i=>{this.adjustBoundingRect(),this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect})}),this.listeners={};try{(t=window.top)==null||t.addEventListener("message",this)}catch{window.addEventListener("message",this)}E0()&&document.addEventListener("focusin",i=>{let r=i.target;r!=null&&r.isConnected&&setTimeout(()=>{let a=Gd();a&&a.mathVirtualKeyboardPolicy==="auto"&&a.hasEditableContent&&this.show({animate:!0})},300)}),document.addEventListener("focusout",i=>{i.target instanceof Pi&&i.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{Gd()||this.hide()},300)})}get currentLayer(){var t,i,r;return(r=(i=(t=this._element)==null?void 0:t.querySelector(".MLK__layer.is-visible"))==null?void 0:i.id)!=null?r:""}set currentLayer(t){var i;if(!this._element){this.latentLayer=t;return}let r=t?this._element.querySelector(`#${t}.MLK__layer`):null;r||(r=this._element.querySelector(".MLK__layer")),r&&((i=this._element.querySelector(".MLK__layer.is-visible"))==null||i.classList.remove("is-visible"),r.classList.add("is-visible")),this.render()}get shiftPressCount(){return this._shiftPressCount}set shiftPressCount(t){var i;this._shiftPressCount=t>2||t<0?0:t,(i=this._element)==null||i.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render()}get isShifted(){return this._shiftPressCount>0}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(t){let i="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[i]=t,i}setKeycap(t,i){xt[t]=As(i),this.rebuild()}getKeycap(t){var i;return t?(i=xt[t])!=null?i:this.keycapRegistry[t]:void 0}getLayer(t){let i=this.normalizedLayouts;for(let r of i)for(let a of r.layers)if(a.id===t)return a}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(t){this._alphabeticLayout=t,this._normalizedLayouts=void 0,this.rebuild()}get layouts(){return this._layouts}set layouts(t){this.updateNormalizedLayouts(t),this.rebuild()}updateNormalizedLayouts(t){let i=Array.isArray(t)?[...t]:[t],r=i.findIndex(a=>a==="default");r>=0&&i.splice(r,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(i),this._normalizedLayouts=i.map(a=>rp(a))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(t){this._editToolbar=t,this.rebuild()}get container(){return this._container===void 0?window.document.body:this._container}set container(t){this._container=t,this.rebuild()}static get singleton(){if(this._singleton===void 0)try{this._singleton=new ap}catch{this._singleton=null}return this._singleton}get style(){return this._style}addEventListener(t,i,r){this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].has(i)||this.listeners[t].add(i)}dispatchEvent(t){return!this.listeners[t.type]||this.listeners[t.type].size===0?!0:(this.listeners[t.type].forEach(i=>{typeof i=="function"?i(t):i==null||i.handleEvent(t)}),!t.defaultPrevented)}removeEventListener(t,i,r){this.listeners[t]&&this.listeners[t].delete(i)}get element(){return this._element}set element(t){var i;this._element!==t&&((i=this._element)==null||i.remove(),this._element=t)}get visible(){return this._visible}set visible(t){t?this.show():this.hide()}get boundingRect(){var t;if(!this._visible)return new DOMRect;let i=(t=this._element)==null?void 0:t.getElementsByClassName("MLK__plate")[0];return i?i.getBoundingClientRect():new DOMRect}adjustBoundingRect(){if(!this._element)return;let t=this.boundingRect.height;if(this.container===document.body){this._element.style.setProperty("--_keyboard-height",`calc(${t}px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0))`);let i=t-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${i}px)`:`${i}px`}else this._element.style.setProperty("--_keyboard-height",`${t}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;let t=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=t,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){var t;if(!this._element)return;let i=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(i&&(i.backdrop||i.container)));let r=this._element.querySelectorAll(".MLK__layer.is-visible .MLK__keycap, .MLK__layer.is-visible .action, .fnbutton, .MLK__layer.is-visible .bigfnbutton, .MLK__layer.is-visible .shift");if(!r)return;let a=this.isShifted;for(let n of r){let o=this.getKeycap(n.id);if(o){let[l,s]=wo(o,{shifted:a});n.innerHTML=globalThis.MathfieldElement.createHTML(l),n.className=s,a&&typeof o.shift=="object"&&(t=o.shift)!=null&&t.tooltip?n.dataset.tooltip=o.shift.tooltip:!a&&o.tooltip&&(n.dataset.tooltip=o.tooltip)}}}show(t){var i;if(this._visible)return;let r=this.container;if(r&&window.mathVirtualKeyboard&&this.stateWillChange(!0)){if(this._element||(this.buildAndAttachElement(),this.adjustBoundingRect()),!this._visible){let a=this._element.getElementsByClassName("MLK__plate")[0];if(a&&this.observer.observe(a),r===window.document.body){let n=r.style.paddingBottom;this.originalContainerBottomPadding=n;let o=a.offsetHeight-1;r.style.paddingBottom=n?`calc(${n} + ${o}px)`:`${o}px`}window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("keydown",this,{capture:!0}),window.addEventListener("keyup",this,{capture:!0}),(i=this._element)==null||i.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer}this._visible=!0,t!=null&&t.animate?requestAnimationFrame(()=>{this._element&&(this._element.classList.add("animate"),this._element.addEventListener("transitionend",()=>{var a;return(a=this._element)==null?void 0:a.classList.remove("animate")},{once:!0}),this._element.classList.add("is-visible"),this.stateChanged())}):(this._element.classList.add("is-visible"),this.stateChanged())}}hide(t){var i;let r=this.container;if(r&&this._visible&&this.stateWillChange(!1)){if(this._visible=!1,this._element){this.latentLayer=this.currentLayer;let a=this._element.getElementsByClassName("MLK__plate")[0];a&&this.observer.unobserve(a),window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("keydown",this,{capture:!0}),window.removeEventListener("keyup",this,{capture:!0}),window.removeEventListener("contextmenu",this,{capture:!0}),ur(),q1(),(i=this._element)==null||i.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(r.style.paddingBottom=this.originalContainerBottomPadding)}this.stateChanged()}}get height(){var t,i;return(i=(t=this.element)==null?void 0:t.offsetHeight)!=null?i:0}buildAndAttachElement(){var t;this.element,this.element=j1(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",i=>{i.shiftKey||((i.ctrlKey||i.button===2)&&ip(i.target),i.preventDefault(),i.stopPropagation())},{capture:!0}),(t=this.container)==null||t.appendChild(this.element)}handleEvent(t){if(Bs(t)){if(!ws(t.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");if(t.data.action==="disconnect"){if(this._visible)return;this.connectedMathfieldWindow=void 0}else t.data.action!=="update-setting"&&t.data.action!=="proxy-created"&&t.data.action!=="execute-command"&&(t.source,this.connectedMathfieldWindow=t.source);this.handleMessage(t.data,t.source)}if(this._element)switch(t.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":t.button!==2&&t.preventDefault();break;case"keydown":{t.key==="Shift"&&!t.repeat&&(this.shiftPressCount=1);break}case"keyup":{(t.key==="Shift"||!t.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break}}}handleMessage(t,i){let{action:r}=t;if(r==="execute-command"){let{command:a}=t,n=fr(a);if(window===window.top&&i!==window||window===window.top&&n!=="virtual-keyboard")return;this.executeCommand(a);return}if((r==="connect"||r==="show")&&this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},i),r!=="disconnect"&&!this.isSandbox){if(r==="show"){typeof t.animate<"u"?this.show({animate:t.animate}):this.show();return}if(r==="hide"){typeof t.animate<"u"?this.hide({animate:t.animate}):this.hide();return}if(r==="update-setting"){if(t.alphabeticLayout&&(this.alphabeticLayout=t.alphabeticLayout),t.layouts&&(this.layouts=t.layouts),t.editToolbar&&(this.editToolbar=t.editToolbar),t.setKeycap){let{keycap:a,value:n}=t.setKeycap;this.setKeycap(a,n),this.render()}return}if(r==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},i);return}}}sendMessage(t,i,r){if(i.command&&this.dispatchEvent(new CustomEvent("math-virtual-keyboard-command",{detail:i.command})),r||(r=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||r===window){window.dispatchEvent(new MessageEvent("message",{source:window,origin:window.origin,data:f({type:io,action:t},i)}));return}if(r)r.postMessage(f({type:io,action:t},i),{targetOrigin:this.targetOrigin});else if(t==="execute-command"&&Array.isArray(i.command)&&i.command[0]==="insert"){let a=i.command[1].split("");for(let n of a)this.dispatchEvent(new KeyboardEvent("keydown",{key:n,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:n,bubbles:!0}))}}stateWillChange(t){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:t},bubbles:!0,cancelable:!0,composed:!0}))}stateChanged(){this.dispatchEvent(new Event("virtual-keyboard-toggle")),this._visible||(this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect}))}focus(){this.sendMessage("focus",{})}blur(){this.sendMessage("blur",{})}updateToolbar(t){let i=this._element;if(!i)return;i.classList.toggle("is-math-mode",t.mode==="math"),i.classList.toggle("is-text-mode",t.mode==="text"),i.classList.toggle("can-undo",t.canUndo),i.classList.toggle("can-redo",t.canRedo),i.classList.toggle("can-copy",!t.selectionIsCollapsed),i.classList.toggle("can-cut",!t.selectionIsCollapsed),i.classList.toggle("can-paste",!0);let r=i.querySelectorAll(".ML__edit-toolbar");if(r)for(let a of r)a.innerHTML=O1(this,t)}update(t){this._style=t.style,this.updateToolbar(t)}connect(){this.connectedMathfieldWindow=window}disconnect(){this._visible||(this.connectedMathfieldWindow=void 0)}executeCommand(t){if(t=pa(t),!t)return!1;let i,r=[],a=fr(t);return ve(t)?(i=t[0],i==="performWithFeedback"&&(a=fr(t.slice(1))),r=t.slice(1)):i=t,a==="virtual-keyboard"?ct[i].fn(void 0,...r):(this.sendMessage("execute-command",{command:t}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};function Gd(){let e=eo(),t=null;for(;e;){if("host"in e&&e.host instanceof Pi){t=e.host;break}e=e.parentNode}return t}Ue()&&!("mathVirtualKeyboard"in window)&&(window===window.top?np():Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>C1.singleton,configurable:!0}));function np(){let e=ni.singleton;return window.mathVirtualKeyboard!==e&&Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>e}),e}function ro(e){let t={};for(let i of Object.keys(e))switch(i){case"scriptDepth":let r=e.scriptDepth;if(ve(r))t.scriptDepth=[r[0],r[1]];else if(typeof r=="number")t.scriptDepth=[r,r];else if(typeof r=="string"){let[n,o]=r.split(",").map(l=>parseInt(l.trim()));t.scriptDepth=[n,o]}else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let a=e.mathVirtualKeyboardPolicy.toLowerCase();if(a==="sandboxed"){let n=np();n&&(n.isSandbox=!0),a="manual"}t.mathVirtualKeyboardPolicy=a;break;case"letterShapeStyle":e.letterShapeStyle==="auto"?O.locale.startsWith("fr")?t.letterShapeStyle="french":t.letterShapeStyle="tex":t.letterShapeStyle=e.letterShapeStyle;break;case"defaultMode":["text","math","inline-math"].includes(e.defaultMode)?t.defaultMode=e.defaultMode:(console.error('MathLive 0.108.3:  valid values for defaultMode are "text", "math" or "inline-math"'),t.defaultMode="math");break;case"macros":t.macros=fs(e.macros);break;default:ve(e[i])?t[i]=[...e[i]]:typeof e[i]=="object"&&!(e[i]instanceof Element)&&i!=="computeEngine"?t[i]=f({},e[i]):t[i]=e[i]}return t}function Si(e,t){let i;typeof t=="string"?i=[t]:t===void 0?i=Object.keys(e):i=t;let r={};for(let a of i)e[a]===null?r[a]=null:ve(e[a])?r[a]=[...e[a]]:typeof e[a]=="object"&&!(e[a]instanceof Element)&&a!=="computeEngine"?r[a]=f({},e[a]):r[a]=e[a];return typeof t=="string"?r[t]:r}function Rn(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:uo,backgroundColorMap:ds,letterShapeStyle:O.locale.startsWith("fr")?"french":"tex",minFontScale:0,maxMatrixCols:10,smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,isImplicitFunction:e=>["\\sin","\\cos","\\tan","\\arcsin","\\arccos","\\arctan","\\arcsec","\\arccsc","\\arsinh","\\arcosh","\\artanh","\\arcsech","\\arccsch","\\arg","\\ch","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\sec","\\sinh","\\sh","\\tanh","\\tg","\\th","\\lg","\\lb","\\log","\\ln"].includes(e),mathModeSpace:"",placeholderSymbol:"▢",contentPlaceholder:"",popoverPolicy:"auto",environmentPopoverPolicy:"off",keybindings:Qm,inlineShortcuts:G0,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",originValidator:"none",onInsertStyle:Ds,onInlineShortcut:()=>"",onScrollIntoView:null,onExport:Ym,value:""}}function Zd(e){return e.defaultMode==="inline-math"?"math":e.defaultMode}function X1(e,t){let i=e.at(e.position);if(i.type==="composition")i.value=t;else{let{caret:r}=i;i.caret=void 0;let a=new mh(t,{mode:i.mode});a.caret=r,i.parent.addChildAfter(a,i),e.position+=1}}function G1(e){let t=e.at(e.position);t.type==="composition"&&(t.parent.removeChild(t),e.position-=1)}function Z1(e){let t=e.at(e.position);for(;t&&!Lt(t.parentBranch);)t=t.parent;return[t.firstSibling,t.lastSibling]}function Y1(e,t){let i=e.at(e.position);for(;i&&!(i.parent instanceof q);)i=i.parent;if((i==null?void 0:i.type)==="array"&&i.environmentName,!i||!(i.parent instanceof q)){let r=e.at(e.position);if(i=r,!i.parent.parent){let a=e.extractAtoms([e.position,e.lastOffset]),n=e.extractAtoms([0,e.position]),o;return t.endsWith("column")?(n.length===0&&(n=_n()),a.length===0&&(a=_n()),o=ze("split",[[n,a]]),e.root=o,qr(o,0,0)?tr(e,o,0,0):qr(o,0,1)?tr(e,o,0,1):e.position=e.offsetOf(r)):(o=ze("lines",[[n],[a]]),e.root=o,tr(e,o,1,0)),[void 0,[0,0]]}if(i.parent instanceof ue){let a=i.parent,n=e.extractAtoms([e.position,e.offsetOf(a.lastChild)]),o=e.extractAtoms([e.offsetOf(a.firstChild),e.position]);o.length===0&&(o=_n()),n.length===0&&(n=_n());let l="pmatrix",s=a.leftDelim,u=a.rightDelim;s==="("&&(u===")"||u==="?")?l="pmatrix":(s==="["||s==="\\lbrack")&&(u==="]"||u==="\\rbrack"||u==="?")?l="bmatrix":s==="\\vert"&&u==="\\vert"?l="vmatrix":s==="\\Vert"&&u==="\\Vert"?l="Vmatrix":(s==="{"||s==="\\lbrace")&&(u==="."||u==="?")&&(l="cases");let c=ze(l,t.endsWith("column")?[[o,n]]:[[o],[n]]);return a.parent.addChildBefore(c,a),a.parent.removeChild(a),qr(c,0,0)?tr(e,c,0,0):t.endsWith("column")?qr(c,0,1)?tr(e,c,0,1):e.position=e.offsetOf(i):qr(c,1,0)?tr(e,c,1,0):e.position=e.offsetOf(i),[void 0,[0,0]]}}return i&&i.parent instanceof q?[i.parent,i.parentBranch]:[void 0,[0,0]]}function qr(e,t,i){let r=e.getCell(t,i);return(r==null?void 0:r.length)!==2?!1:r[1].type==="placeholder"}function Q1(e,t,i,r){let a=t.getCell(i,r);return a?[e.offsetOf(a[0]),e.offsetOf(a[a.length-1])]:-1}function tr(e,t,i,r){let a=Q1(e,t,i,r);typeof a!="number"&&e.setSelection(a)}function xn(e,t,i,r,a){let n=t.getCell(i,r);n&&e.setPositionHandlingPlaceholder(e.offsetOf(n[a==="start"?0:n.length-1]))}function ma(e,t){let[i,[r,a]]=Y1(e,t);if(i)switch(t){case"after row":i.addRowAfter(r),xn(e,i,r+1,0,"end");break;case"after column":if(i.maxColumns<=i.colCount){e.announce("plonk");return}i.addColumnAfter(a),xn(e,i,r,a+1,"end");break;case"before row":i.addRowBefore(r),xn(e,i,r,0,"start");break;case"before column":if(i.maxColumns<=i.colCount){e.announce("plonk");return}i.addColumnBefore(a),xn(e,i,r,a,"start");break}}function op(e){var t;let i=e.at(e.position);if(!Lt(i.parentBranch)&&i.parent!==e.root&&e.root.type!=="root")return e.announce("plonk"),!1;if(!e.contentWillChange({inputType:"insertText"}))return!1;if((t=e.parentEnvironment)!=null&&t.isMultiline){e.selectionIsCollapsed||e.deleteAtoms(we(e.selection));let[r,a]=Z1(e),n=e.extractAtoms([e.position,e.offsetOf(a)]),o=e.extractAtoms([e.offsetOf(r),e.position]),l=r.parent,[s,u]=r.parentBranch;return l.setCell(s,u,o),ma(e,"after row"),l.setCell(s+1,u,n),e.position=e.offsetOf(l.getCell(s+1,u)[0]),e.contentDidChange({inputType:"insertText"}),!0}return ma(e,"after row"),e.contentDidChange({inputType:"insertText"}),!0}function eg(e){return e.contentWillChange({inputType:"insertText"})?(ma(e,"before row"),e.contentDidChange({inputType:"insertText"}),!0):!1}function lp(e){return e.contentWillChange({inputType:"insertText"})?(ma(e,"after column"),e.contentDidChange({inputType:"insertText"}),!0):!1}function tg(e){return e.contentWillChange({inputType:"insertText"})?(ma(e,"before column"),e.contentDidChange({inputType:"insertText"}),!0):!1}function sp(e,t){if(!e.contentWillChange({}))return!1;e.mathfield.snapshot();let i=".",r=".";switch(t){case"pmatrix":case"pmatrix*":i="(",r=")";break;case"bmatrix":case"bmatrix*":i="[",r="]";break;case"Bmatrix":case"Bmatrix*":i="\\lbrace",r="\\rbrace";break;case"vmatrix":case"vmatrix*":i="\\vert",r="\\vert";break;case"Vmatrix":case"Vmatrix*":i="\\Vert",r="\\Vert";break;case"matrix":case"matrix*":i=".",r=".";break;case"cases":case"dcases":i="\\lbrace";break;case"rcases":r="\\rbrace";break}let a=e.at(e.position),n=a.type==="array"?a:e.parentEnvironment;return n.environmentName=t,n.leftDelim=i,n.rightDelim=r,e.contentDidChange({}),!0}function up(e,t){let i=e.at(e.position);for(;i&&!(Array.isArray(i.parentBranch)&&i.parent instanceof q);)i=i.parent;if(Array.isArray(i==null?void 0:i.parentBranch)&&(i==null?void 0:i.parent)instanceof q){let r=i.parent,a=i.parentBranch,n;switch(t){case"row":if(r.rowCount>1){r.removeRow(a[0]);let o=r.getCell(Math.max(0,a[0]-1),a[1]);n=e.offsetOf(o[o.length-1])}break;case"column":if(r.colCount>r.minColumns){r.removeColumn(a[1]);let o=r.getCell(a[0],Math.max(0,a[1]-1));n=e.offsetOf(o[o.length-1])}break}n!==void 0&&e.setPositionHandlingPlaceholder(n)}}function ig(e){return e.contentWillChange({inputType:"deleteContent"})?(up(e,"row"),e.contentDidChange({inputType:"deleteContent"}),!0):!1}function rg(e){return e.contentWillChange({inputType:"deleteContent"})?(up(e,"column"),e.contentDidChange({inputType:"deleteContent"}),!0):!1}Me({addRowAfter:op,addColumnAfter:lp,addRowBefore:eg,addColumnBefore:tg,removeRow:ig,removeColumn:rg,setEnvironment:sp},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function _n(){return[new tt]}var cp=class dp{constructor(t){this.recording=!1,this.model=t,this.reset()}reset(){this.stack=[],this.index=-1,this.lastOp=""}startRecording(){this.recording=!0}stopRecording(){this.recording=!1}canUndo(){return this.index-1>=0}canRedo(){return this.stack.length-1>this.index}stopCoalescing(t){t&&this.index>=0&&(this.stack[this.index].selection=t),this.lastOp=""}undo(){if(!this.canUndo())return!1;let t=this.stack[this.index-1];return this.index-=1,this.lastOp="",this.model.setState(t,{silenceNotifications:!1,type:"undo"}),!0}redo(){if(!this.canRedo())return!1;let t=this.stack[this.index+1];return this.index+=1,this.lastOp="",this.model.setState(t,{silenceNotifications:!1,type:"redo"}),!0}pop(){this.canUndo()&&(this.stack.splice(this.index,this.stack.length-this.index),this.index-=1)}snapshot(t){return this.recording?(t&&t===this.lastOp&&this.pop(),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push(this.model.getState()),this.index+=1,this.stack.length>dp.maximumDepth&&(this.stack.shift(),this.index-=1),this.lastOp=t??"",!0):!1}};cp.maximumDepth=1e3;var ag=cp;function aa(e,t,i,r){var a,n,o,l,s,u;let c=i.parent;if(Lt(r)&&i instanceof q&&i.isMultiline&&lg(e,i,r[0],t))return!0;if(c&&i instanceof ue){let d=!r&&t==="forward"||r==="body"&&t==="backward",h=d?e.offsetOf(i.firstChild):e.offsetOf(i.lastChild);return d?i.rightDelim!=="?"&&i.rightDelim!=="."?(i.leftDelim=".",i.isDirty=!0):(c.addChildrenAfter(i.removeBranch("body"),i),c.removeChild(i),h--):i.leftDelim!=="?"&&i.leftDelim!=="."?(i.rightDelim=".",i.isDirty=!0):(c.addChildrenAfter(i.removeBranch("body"),i),c.removeChild(i),h--),e.position=h,!0}if(c&&i.type==="surd"){if(t==="forward"&&!r||t==="backward"&&r==="body"){let d=i.leftSibling;i.hasChildren&&c.addChildrenAfter(i.removeBranch("body"),i),c.removeChild(i),e.position=e.offsetOf(d)}else t==="forward"&&r==="body"?e.position=e.offsetOf(i):!r&&t==="backward"?i.hasChildren?e.position=e.offsetOf(i.lastChild):(e.position=Math.max(0,e.offsetOf(i)-1),c.removeChild(i)):r==="above"&&(i.hasEmptyBranch("above")&&i.removeBranch("above"),t==="backward"?e.position=e.offsetOf(i.leftSibling):e.position=e.offsetOf(i.body[0]));return!0}if(c&&(i.type==="box"||i.type==="enclose")){let d=r&&t==="backward"||!r&&t==="forward"?i.leftSibling:i.lastChild;return c.addChildrenAfter(i.removeBranch("body"),i),c.removeChild(i),e.position=e.offsetOf(d),!0}if(i.type==="genfrac"||i.type==="overunder"){if(!r)return i.type==="overunder"&&i.hasEmptyBranch("body")||i.type==="genfrac"&&i.hasEmptyBranch("below")&&i.hasEmptyBranch("above")?!1:(e.position=e.offsetOf(t==="forward"?i.firstChild:i.lastChild),!0);let d=Pi.fractionNavigationOrder==="numerator-denominator"?"above":"below",h=d==="above"?"below":"above";if(c&&(t==="forward"&&r===d||t==="backward"&&r===h)){let p=i.removeBranch(d),m=i.removeBranch(h);return c.addChildrenAfter([...p,...m],i),c.removeChild(i),e.position=e.offsetOf(p.length>0?p[p.length-1]:m[0]),!0}return t==="backward"?e.position=e.offsetOf(i.leftSibling):e.position=e.offsetOf(i),!0}if(i.type==="extensible-symbol"||i.type==="subsup"||i.type==="operator"){if(!r&&t==="forward")return!1;if(!r){if(i.subscript||i.superscript){let d=t==="forward"?(o=(a=i.superscript)==null?void 0:a[0])!=null?o:(n=i.subscript)==null?void 0:n[0]:(u=(l=i.subscript)==null?void 0:l[0].lastSibling)!=null?u:(s=i.superscript)==null?void 0:s[0].lastSibling;return d&&(e.position=e.offsetOf(d)),!0}return!1}if(!i.hasChildren&&i.type==="subsup"){let d=t==="forward"?e.offsetOf(i):Math.max(0,e.offsetOf(i)-1);return i.parent.removeChild(i),e.position=d,!0}if(r&&i.hasEmptyBranch(r)){if(i.removeBranch(r),i.type==="subsup"&&!i.subscript&&!i.superscript){let d=t==="forward"?e.offsetOf(i):Math.max(0,e.offsetOf(i)-1);return i.parent.removeChild(i),e.position=d,!0}return r==="superscript"&&t==="backward"?e.position=e.offsetOf(i.firstChild)-1:r==="subscript"&&t==="backward"?i.superscript?e.position=e.offsetOf(i.superscript[0].lastSibling):e.position=e.offsetOf(i.firstChild)-1:e.position=e.offsetOf(i),!0}if(r==="superscript")if(t==="backward"){let d=e.offsetOf(i.firstChild)-1;e.position=d}else i.subscript?e.position=e.offsetOf(i.subscript[0]):e.position=e.offsetOf(i);else r==="subscript"&&(t==="backward"&&i.superscript?e.position=e.offsetOf(i.superscript[0].lastSibling):t==="backward"?e.position=e.offsetOf(i.firstChild)-1:e.position=e.offsetOf(i));return!0}if((c==null?void 0:c.type)==="genfrac"&&!r&&i.type!=="first"){let d=e.offsetOf(i.leftSibling);return c.removeChild(i),c.hasEmptyBranch("above")&&c.hasEmptyBranch("below")?(d=e.offsetOf(c.leftSibling),c.parent.removeChild(c),e.announce("delete",void 0,[c]),e.position=d,!0):(e.announce("delete",void 0,[i]),e.position=d,!0)}if(t==="backward"&&((c==null?void 0:c.command)==="\\ln"||(c==null?void 0:c.command)==="\\log")&&i.parentBranch!=="body"){let d=e.offsetOf(c.leftSibling);return c.parent.removeChild(c),e.announce("delete",void 0,[c]),e.position=d,!0}return!1}function ng(e){return!e.mathfield.isSelectionEditable||!e.contentWillChange({inputType:"deleteContentBackward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let t=e.at(e.position);if(!(t&&aa(e,"backward",t))){if(t!=null&&t.isFirstSibling){if(aa(e,"backward",t.parent,t.parentBranch))return;t=null}if(!t){e.announce("plonk");return}e.position=e.offsetOf(t.leftSibling),t.parent.removeChild(t),e.announce("delete",void 0,[t]),e.root.hasEmptyBranch("body")&&e.mathfield.flushInlineShortcutBuffer()}}):Ct(e,we(e.selection),"deleteContentBackward")}function og(e){return!e.mathfield.isSelectionEditable||!e.contentWillChange({inputType:"deleteContentForward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var t,i;let r=e.at(e.position).rightSibling;if(r&&aa(e,"forward",r))return;if(r){if(e.at(e.position).isLastSibling&&aa(e,"forward",r.parent,r.parentBranch))return}else{if(r=e.at(e.position),r.isLastSibling&&aa(e,"forward",r.parent,r.parentBranch))return;r=void 0}if(e.position===e.lastOffset||!r){e.announce("plonk");return}r.parent.removeChild(r);let a=(t=e.at(e.position))==null?void 0:t.rightSibling;for(;(a==null?void 0:a.type)==="subsup";)a.parent.removeChild(a),a=(i=e.at(e.position))==null?void 0:i.rightSibling;e.announce("delete",void 0,[r]),e.root.hasEmptyBranch("body")&&e.mathfield.flushInlineShortcutBuffer()}):Ct(e,we(e.selection),"deleteContentForward")}function Ct(e,t,i){let r=e.getAtoms(t);if(r.length>0&&r[0].parent){let a=r[0];for(;a&&!(a instanceof q);)a=a.parent;let n=r[r.length-1];for(;n&&!(n instanceof q);)n=n.parent;if(a&&a instanceof q){let c=a;if(c&&n===c&&c.isMultiline){let[d,h]=[Math.min(e.position,e.anchor),Math.max(e.position,e.anchor)],[p,m]=e.at(d).parentBranch,[g,v]=e.at(h).parentBranch;if(g-p+1>=2)return e.deferNotifications({content:!0,selection:!0,type:i},()=>{var b;let x=c.getCell(p,m),E=c.getCell(g,v);if(!x||!E)return;e.extractAtoms([d,h]);let S=c.getCell(p,m);c.getCell(g,v);for(let C=g-1;C>p;C--)c.removeRow(C);if(p!==g){let C=c.getCell(p+1,m);if(S&&C){let B=[...S.filter(D=>D.type!=="first"),...C.filter(D=>D.type!=="first")];c.setCell(p,m,B),c.removeRow(p+1)}}let M=c.getCell(p,m);if(M){let C=S?S.filter(B=>B.type!=="first").length:0;e.position=e.offsetOf((b=M[C])!=null?b:M[0])}else e.position=d;c.isDirty=!0})}}let o=r[0].parent.firstChild;o.type==="first"&&(o=o.rightSibling);let l=r[r.length-1].parent.lastChild,s=r[0];s.type==="first"&&(s=s.rightSibling);let u=r[r.length-1];if(s===o&&u===l){let c=r[0].parent;c.parent&&c.type!=="prompt"&&(t=[e.offsetOf(c.leftSibling),e.offsetOf(c)])}if(r.length===1&&r[0].type==="placeholder"&&r[0].parent.type==="genfrac"){let c=r[0].parent,d=r[0].parentBranch==="below"?"above":"below",h=e.offsetOf(c.leftSibling);return e.deferNotifications({content:!0,selection:!0,type:i},()=>{var p,m;let g=c.removeBranch(d);if(g.length===1&&g[0].type==="placeholder")(m=c.parent)==null||m.removeChild(c),e.position=Math.max(0,h);else{let v=c.parent.addChildrenAfter(g,c);(p=c.parent)==null||p.removeChild(c),e.position=e.offsetOf(v)}})}}return e.deferNotifications({content:!0,selection:!0,type:i},()=>{let a=new Map;if(r.length>0){let o=r[0],l=r[r.length-1],s=new Set,u=o.parent;for(;u;)(u.type==="surd"||u.type==="box"||u.type==="enclose"||u.type==="leftright"||u.type==="genfrac"||u.type==="overunder")&&u.parent&&s.add(u),u=u.parent;let c=new Set;for(u=l.parent;u;)(u.type==="surd"||u.type==="box"||u.type==="enclose"||u.type==="leftright"||u.type==="genfrac"||u.type==="overunder")&&u.parent&&c.add(u),u=u.parent;for(let d of r)for(u=d.parent;u;){if((u.type==="surd"||u.type==="box"||u.type==="enclose"||u.type==="leftright"||u.type==="genfrac"||u.type==="overunder")&&u.parent){a.has(u)||a.set(u,{containsStart:s.has(u),containsEnd:c.has(u)});break}u=u.parent}}let n=Math.min(...t);e.deleteAtoms(t);for(let[o,l]of a){if(!o.parent)continue;let s=l.containsStart!==l.containsEnd;if(o.type==="surd"||o.type==="box"||o.type==="enclose"||o.type==="leftright"){let u=o.branch("body");if(!u||u.length===0||u.length===1&&u[0].type==="placeholder"){let c=e.offsetOf(o.leftSibling);o.parent.removeChild(o),e.position=Math.max(0,c)}else if(s&&!l.containsStart&&l.containsEnd){let c=e.offsetOf(o.leftSibling),d=o.removeBranch("body");d&&d.length>0&&o.parent.addChildrenAfter(d,o),o.parent.removeChild(o),e.position=Math.max(0,c)}}if(o.type==="genfrac"){let u=o.branch("above"),c=o.branch("below"),d=!u||u.length===0||u.length===1&&u[0].type==="placeholder",h=!c||c.length===0||c.length===1&&c[0].type==="placeholder";if(d&&h){let p=e.offsetOf(o.leftSibling);o.parent.removeChild(o),e.position=Math.max(0,p)}else if(d&&!h){let p=e.offsetOf(o.leftSibling),m=o.removeBranch("below");m&&m.length>0&&o.parent.addChildrenAfter(m,o),o.parent.removeChild(o),e.position=Math.max(0,p)}else if(!d&&h){let p=e.offsetOf(o.leftSibling),m=o.removeBranch("above");m&&m.length>0&&o.parent.addChildrenAfter(m,o),o.parent.removeChild(o),e.position=Math.max(0,p)}else if(s&&!l.containsStart&&l.containsEnd&&!d&&!h){let p=e.offsetOf(o.leftSibling),m=o.removeBranch("above");m&&m.length>0&&o.parent.addChildrenAfter(m,o),o.parent.removeChild(o),e.position=Math.max(0,p)}}}a.size===0&&(e.position=n),e.root.hasEmptyBranch("body")&&e.mathfield.flushInlineShortcutBuffer()})}function lg(e,t,i,r){if(!(t instanceof q)||!t.isMultiline||t.rows.length===1||t.rows[i].length>1)return!1;let a=t.getCell(i,0);if(!a)return!1;if(t.removeRow(i),r==="backward"){let n=t.getCell(i-1,0);if(!n)return e.position=e.offsetOf(t),!0;n.length>0?e.position=e.offsetOf(n[n.length-1]):e.position=e.offsetOf(t),t.setCell(i-1,0,[...n,...a])}else{let n=t.getCell(i,0);if(!n)return e.position=e.offsetOf(t),!0;n.length>0?e.position=e.offsetOf(n[0]):e.position=e.offsetOf(t),t.setCell(i,0,[...a,...n])}return!0}function sg(e,t,i){var r,a;if(e.at(t).mode!=="text")return t;let n=i==="backward"?-1:1,o;if(la.test(e.at(t).value)){let l=t,s;do s=e.at(l).mode==="text"&&la.test(e.at(l).value),l+=n;while(e.at(l)&&s);o=e.at(l)?l-2*n:l-n}else if(/\s/.test(e.at(t).value)){let l=t;for(;((r=e.at(l))==null?void 0:r.mode)==="text"&&/\s/.test(e.at(l).value);)l+=n;if(!e.at(l))o=l-n;else{let s=!0;do s=e.at(l).mode==="text"&&!/\s/.test(e.at(l).value),l+=n;while(e.at(l)&&s);o=e.at(l)?l-2*n:l-n}}else{let l=t;for(;((a=e.at(l))==null?void 0:a.mode)==="text"&&!/\s/.test(e.at(l).value);)l+=n;o=e.at(l)?l:l-n;let s=!0;for(;e.at(l)&&s;)s=e.at(l).mode==="text"&&/\s/.test(e.at(l).value),s&&(o=l),l+=n;o=e.at(l)?l-2*n:l-n}return o-(n>0?0:1)}function Yt(e,t,i){var r,a,n,o,l,s,u,c;let d=e.position;(r=i==null?void 0:i.extend)!=null&&r||e.collapseSelection(t);let h=e.at(e.position);if(t==="forward"&&(h.type==="subsup"?(h=h.rightSibling,h||(h=e.at(e.position+1))):h=e.at(e.position+1)),!h)return e.announce("plonk"),!1;let p=e.offsetOf(h);if(h instanceof Mr)p=sg(e,p,t);else if(h instanceof be)if(h.isSuggestion)for(;h&&h instanceof be;)h.isSuggestion=!1,p=e.offsetOf(h),h=h.rightSibling;else if(t==="forward"){if(h=h.rightSibling,!h||!(h instanceof be))return e.announce("plonk"),!1;for(;h&&h instanceof be&&/[a-zA-Z\*]/.test(h.value);)p=e.offsetOf(h),h=h.rightSibling}else{if(h=h.leftSibling,!h||!(h instanceof be))return e.announce("plonk"),!1;for(;h&&h instanceof be&&/[a-zA-Z\*]/.test(h.value);)p=e.offsetOf(h),h=h.leftSibling}else if(t==="forward"&&h.type==="mopen"){let m=0;do h.type==="mopen"?m+=1:h.type==="mclose"&&(m-=1),h=h.rightSibling;while(!h.isLastSibling&&m!==0);p=e.offsetOf(h.leftSibling)}else if(t==="backward"&&h.type==="mclose"){let m=0;do h.type==="mopen"?m+=1:h.type==="mclose"&&(m-=1),h=h.leftSibling;while(!h.isFirstSibling&&m!==0);p=e.offsetOf(h)}else if(t==="backward")if(h.type==="first")for(;p>0&&h.type==="first";)p-=1,h=e.at(p);else{let m=h.type;h.type==="subsup"&&(p=e.offsetOf(e.at(p).leftSibling)),p-=1;let g=(a=e.at(p))==null?void 0:a.type;for(;p>=0&&g===m;)((n=e.at(p))==null?void 0:n.type)==="subsup"?p=e.offsetOf(e.at(p).leftSibling):p-=1,g=e.at(p).type}else{let{type:m}=h,g=(o=e.at(p))==null?void 0:o.type,{lastOffset:v}=e;for(;p<=v&&(g===m||g==="subsup");){for(;((l=e.at(p).rightSibling)==null?void 0:l.type)==="subsup";)p=e.offsetOf(e.at(p).rightSibling);p+=1,g=(s=e.at(p))==null?void 0:s.type}p-=1}if((u=i==null?void 0:i.extend)!=null&&u){if(!e.setSelection(e.anchor,p))return e.announce("plonk"),!1;e.announce("move",d)}else{if(p===e.position)return e.announce("plonk"),!1;(c=i==null?void 0:i.delete)!=null&&c?t==="forward"?Ct(e,[d,p],"deleteWord
3068Forward"):(Ct(e,[d,p],"deleteWordBackward"),e.position=p):(e.position=p,e.announce("move",d))}return e.mathfield.stopCoalescingUndo(),!0}function dt(e,t,i){var r,a;if(i=i??{extend:!1},e.mathfield.styleBias=t==="backward"?"right":"left",t!=="forward"){let[l,s]=Gh(e);l!==void 0&&s!==void 0&&e.deleteAtoms([l,s])}if(t==="upward")return cg(e,i);if(t==="downward")return dg(e,i);if(i.extend){let l=Nn(e,e.position,t);l<0&&(l=0),l>e.lastOffset&&(l=e.lastOffset);let s=e.setSelection(e.anchor,l);return e.mathfield.stopCoalescingUndo(),s}if(e.selectionIsPlaceholder){e.collapseSelection(t);let l=dt(e,t);return e.mathfield.stopCoalescingUndo(),l}let n=e.position,o=n;if(e.collapseSelection(t)?(n=e.position,hp(e,n)||(n=Nn(e,n,t))):n=Nn(e,n,t),n<0||n>e.lastOffset){let l=!0;return e.silenceNotifications||(l=(a=(r=e.mathfield.host)==null?void 0:r.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))!=null?a:!0),l&&e.announce("plonk"),l}return e.setPositionHandlingPlaceholder(n),e.mathfield.stopCoalescingUndo(),e.announce("move",o),!0}function Nn(e,t,i){return t=t+(i==="forward"?1:-1),t<0||t>e.lastOffset||hp(e,t)?t:Nn(e,t,i)}function hp(e,t){var i;let r=e.at(t),a=r.parent;for(;a&&!a.inCaptureSelection;)a=a.parent;return!(a!=null&&a.inCaptureSelection||(i=r.parent)!=null&&i.skipBoundary&&(!r.isFirstSibling&&r.isLastSibling||r.type==="first")||e.mathfield.hasEditablePrompts&&!r.parentPrompt)}function ug(e,t,i){let r=1/0,a=0;for(;a<t.length;a++){let n=t[a],o=e.getHTMLElement(n);if(!o)continue;let l=th(o).right,s=Math.abs(i-l);if(s<=r)r=s;else break}return t[a-1]}function ao(e,t,i,r,a){let n=e.mathfield.hasEditablePrompts,o=n?i.filter(u=>u.type==="prompt"&&!u.captureSelection):i,l=th(e.mathfield.getHTMLElement(t)).right,s=e.offsetOf(ug(e.mathfield,o,l))-(n?1:0);if(r){let[u,c]=e.selection.ranges[0],d;s<(a==="up"?u:c)?d={ranges:[[s,c]],direction:"backward"}:d={ranges:[[u,s]],direction:"forward"},e.setSelection(d)}else e.setPositionHandlingPlaceholder(s);e.announce(`move ${a}`)}function cg(e,t){var i,r;let a=(i=t==null?void 0:t.extend)!=null?i:!1;a||e.collapseSelection("backward");let n=()=>{var s,u;let c=!0;return e.silenceNotifications||(c=(u=(s=e.mathfield.host)==null?void 0:s.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?u:!0),e.announce(c?"line":"plonk"),c},o=e.at(e.position),l=o;for(;l&&l.parentBranch!=="below"&&!(Array.isArray(l.parentBranch)&&l.parent instanceof q);)l=l.parent;if(Array.isArray(l==null?void 0:l.parentBranch)&&l.parent instanceof q){let s=l.parent;if(l.parentBranch[0]<1)return n();let u=l.parentBranch[0]-1,c=s.getCell(u,l.parentBranch[1]);if(!c.some(d=>d.type==="prompt"&&!d.captureSelection)&&e.mathfield.hasEditablePrompts)return n();ao(e,o,c,a,"up")}else if(l){let s=(r=l.parent.branch("above"))!=null?r:l.parent.createBranch("above");if(!s.some(u=>u.type==="prompt"&&u.placeholderId)&&e.mathfield.hasEditablePrompts)return n();ao(e,o,s,a,"up")}else return n();return e.mathfield.stopCoalescingUndo(),!0}function dg(e,t){var i,r;let a=(i=t==null?void 0:t.extend)!=null?i:!1;a||e.collapseSelection("forward");let n=()=>{var s,u;let c=!0;return e.silenceNotifications||(c=(u=(s=e.mathfield.host)==null?void 0:s.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?u:!0),e.announce(c?"line":"plonk"),c},o=e.at(e.position),l=o;for(;l&&l.parentBranch!=="above"&&!(Lt(l.parentBranch)&&l.parent instanceof q);)l=l.parent;if(Lt(l==null?void 0:l.parentBranch)&&l.parent instanceof q){let s=l.parent;if(l.parentBranch[0]+1>s.rows.length-1)return n();let u=l.parentBranch[0]+1,c=s.getCell(u,l.parentBranch[1]);if(!c.some(d=>d.type==="prompt"&&!d.captureSelection)&&e.mathfield.hasEditablePrompts)return n();ao(e,o,c,a,"down")}else if(l){let s=(r=l.parent.branch("below"))!=null?r:l.parent.createBranch("below");if(!s.some(u=>u.type==="prompt")&&e.mathfield.hasEditablePrompts)return n();ao(e,o,s,a,"down")}else return n();return!0}function pp(e){let t=e.position,i=e.at(t).parent;return i!=null&&i.parent?(e.position=e.offsetOf(i),e.mathfield.stopCoalescingUndo(),e.announce("move",t),!0):(e.announce("plonk"),!1)}function hg(e){let t=0,i=e.at(e.position),r=!1;for(;i;)i.hasEmptyBranch("superscript")?i.hasEmptyBranch("subscript")||(r=!1):(t+=1,r=!0),i=i.parent;return r?t:0}function pg(e){let t=0,i=e.at(e.position),r=!1;for(;i;)i.hasEmptyBranch("subscript")?i.hasEmptyBranch("superscript")||(r=!1):(t+=1,r=!0),i=i.parent;return r?t:0}function Yd(e){if(e.collapseSelection(),hg(e)>=e.mathfield.options.scriptDepth[1])return e.announce("plonk"),!1;let t=e.at(e.position);if(t.subsupPlacement===void 0){let i=t.rightSibling;(i==null?void 0:i.type)!=="subsup"&&(i=new bo({style:t.style}),t.parent.addChildAfter(i,t)),t=i}return t.createBranch("superscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(t.superscript[0]))),!0}function Qd(e){if(e.collapseSelection(),pg(e)>=e.mathfield.options.scriptDepth[0])return e.announce("plonk"),!1;let t=e.at(e.position);if(t.subsupPlacement===void 0){let i=t.rightSibling;(i==null?void 0:i.type)!=="subsup"&&(i=new bo({style:t.style}),t.parent.addChildAfter(i,t)),t=i}return t.createBranch("subscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(t.subscript[0]))),!0}function mg(){function e(s){let u=[],c=[];return[...s.querySelectorAll(`input, select, textarea, a[href], button,
3069        [tabindex], audio[controls], video[controls],
3070        [contenteditable]:not([contenteditable="false"]), details>summary`)].filter(t).forEach((d,h)=>{let p=r(d);p===0?u.push(d):c.push({documentOrder:h,tabIndex:p,node:d})}),c.sort((d,h)=>d.tabIndex===h.tabIndex?d.documentOrder-h.documentOrder:d.tabIndex-h.tabIndex).map(d=>d.node).concat(u)}function t(s){return!(!i(s)||a(s)||r(s)<0)}function i(s){return!(s.disabled||s.type==="hidden"&&s.tagName.toUpperCase()==="INPUT"||l(s))}function r(s){var u;
vendor: 56,358 bytes, lines 3070-3214
3070let c=Number.parseInt((u=s.getAttribute("tabindex"))!=null?u:"NaN",10);return Number.isNaN(c)?s.contentEditable==="true"||(s.nodeName==="AUDIO"||s.nodeName==="VIDEO")&&s.getAttribute("tabindex")===null?0:s.tabIndex:c}function a(s){return s.tagName.toUpperCase()==="INPUT"&&s.type==="radio"&&!o(s)}function n(s,u){for(let c of s)if(c.checked&&c.form===u)return c;return null}function o(s){var u;if(!s.name)return!0;let c=((u=s.form)!=null?u:s.ownerDocument).querySelectorAll('input[type="radio"][name="'+s.name+'"]'),d=n(c,s.form);return!d||d===s}function l(s){if(!Ue()||s===document.activeElement||s.contains(document.activeElement))return!1;if(getComputedStyle(s).visibility==="hidden")return!0;let u=s.getBoundingClientRect();if(u.width===0||u.height===0)return!0;for(;s;){if(getComputedStyle(s).display==="none")return!0;s=s.parentElement}return!1}return Ue()?e(document.body):[]}function Le(e,t,i="forward"){let r=e.position;if(ve(t)){let a=e.offsetOf(t[0]),n=e.offsetOf(t[t.length-1]);return i==="forward"?e.setSelection(a,n):e.setSelection(n,a),e.announce("move",r),e.mathfield.stopCoalescingUndo(),!0}return i==="forward"?Le(e,[t.leftSibling,t]):Le(e,[t,t.leftSibling])}function Ye(e,t){let i=e.position;if(typeof t=="number"&&(t=e.at(t)),t.type==="prompt")e.setSelection(e.offsetOf(t.firstChild),e.offsetOf(t.lastChild));else{let r=e.offsetOf(t);t.type==="placeholder"?e.setSelection(r-1,r):e.position=r}return e.announce("move",i),e.mathfield.stopCoalescingUndo(),!0}function dr(e,t){var i,r;let a=t==="forward"?1:-1;e.at(e.anchor).type==="placeholder"&&dt(e,t);let n,o=e.at(e.anchor).parentPrompt;o?t==="forward"?n=e.offsetOf(o)+1:n=e.offsetOf(o.leftSibling):n=Math.max(e.position+a,0);let l=Gl(e,n,t);if(!l||t==="forward"&&e.offsetOf(l)<n||t==="backward"&&e.offsetOf(l)>n){if(!((r=(i=e.mathfield.host)==null?void 0:i.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))==null||r))return e.announce("plonk"),!1;let s=mg();if(!document.activeElement||s.length<=1)return e.announce("plonk"),!1;let u=s.indexOf(document.activeElement)+a;return u<0&&(u=s.length-1),u>=s.length&&(u=0),s[u].focus(),e.mathfield.stopCoalescingUndo(),!0}return Ye(e,l),!0}function Gl(e,t=0,i="forward"){return e.findAtom(r=>r.type==="placeholder"||r.type==="prompt"||!e.mathfield.readOnly&&r.treeDepth>2&&r.isFirstSibling&&r.isLastSibling,t,i)}Me({moveToOpposite:e=>{let t={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},i=e.at(e.position),{parent:r}=i;if(!r)return e.announce("plonk"),!1;let a=i.parentBranch,n;if(typeof a=="string"&&(n=t[a]),!n){let l=i.subsupPlacement?Qd(e):Yd(e);return e.mathfield.stopCoalescingUndo(),l}r.branch(n)||r.createBranch(n);let o=e.setSelection(e.getBranchRange(e.offsetOf(r),n));return e.mathfield.stopCoalescingUndo(),o},moveBeforeParent:e=>{let{parent:t}=e.at(e.position);return t?(e.position=e.offsetOf(t),e.mathfield.stopCoalescingUndo(),!0):(e.announce("plonk"),!1)},moveAfterParent:e=>pp(e),moveToNextChar:e=>dt(e,"forward"),moveToPreviousChar:e=>dt(e,"backward"),moveUp:e=>dt(e,"upward"),moveDown:e=>dt(e,"downward"),moveToNextWord:e=>Yt(e,"forward"),moveToPreviousWord:e=>Yt(e,"backward"),moveToGroupStart:e=>{let t=e.offsetOf(e.at(e.position).firstSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:e=>{let t=e.offsetOf(e.at(e.position).lastSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0)},moveToNextGroup:e=>{var t,i,r,a;if(e.position===e.lastOffset&&e.anchor===e.lastOffset)return dr(e,"forward");let n=e.at(e.position);if(n.mode==="text"){if(e.selectionIsCollapsed){let d=n;for(;(d==null?void 0:d.mode)==="text";)d=d.leftSibling;let h=n;for(;((t=h.rightSibling)==null?void 0:t.mode)==="text";)h=h.rightSibling;if(d&&h)return Le(e,[d,h])}if(n.rightSibling.mode==="text"){let d=n;for(;(d==null?void 0:d.mode)==="text";)d=d.rightSibling;return d?(Ye(e,(i=d.leftSibling)!=null?i:d),e.mathfield.switchMode("math"),!0):Ye(e,e.lastOffset)}}let o=e.at(e.anchor).parentPrompt,l=o?e.offsetOf(o)+1:Math.max(e.position+1,0),s=Gl(e,l,"forward");if(s&&e.offsetOf(s)<l)return dr(e,"forward");if(s)return Ye(e,s);let u=e0(e,n,d=>d.type==="leftright"||d.type==="text","forward");if(u){if(u.mode==="text"){let d=u;for(;(d==null?void 0:d.mode)==="text";)d=d.rightSibling;return Le(e,[(r=u.leftSibling)!=null?r:u,(a=d.leftSibling)!=null?a:d])}return Le(e,u)}let c=n.parent;if(c){if(c.type==="leftright"||c.type==="surd")return Le(e,c);if(n.parentBranch==="superscript"&&c.subscript)return Le(e,c.subscript);if(n.parentBranch==="above"&&c.below)return Le(e,c.below);if(n.parentBranch==="superscript"||n.parentBranch==="subscript")return Ye(e,c);if(n.parentBranch==="above"||n.parentBranch==="below")return Le(e,c)}return Ye(e,e.lastOffset)},moveToPreviousGroup:e=>{var t;if(e.position===0&&e.anchor===0)return dr(e,"backward");let i=e.at(e.position),r=i.mode;if(r==="text"){if(e.selectionIsCollapsed){let l=i;for(;(l==null?void 0:l.mode)==="text";)l=l.leftSibling;let s=i;for(;((t=s.rightSibling)==null?void 0:t.mode)==="text";)s=s.rightSibling;if(l&&s)return Le(e,[l,s])}for(;(i==null?void 0:i.mode)==="text";)i=i.leftSibling;return i?Ye(e,i):Ye(e,0)}let a=e.at(e.anchor).parentPrompt,n=a?e.offsetOf(a.leftSibling):Math.max(e.position-1,0),o=Gl(e,n,"backward");if(o&&e.offsetOf(o)>n)return dr(e,"backward");if(o)return Ye(e,o);if(r==="math"){let l=e0(e,i,u=>u.type==="leftright"||u.type==="text","backward");if(l){if(l.mode==="text"){let u=l;for(;(u==null?void 0:u.mode)==="text";)u=u.leftSibling;return Le(e,[l,u])}return Le(e,l)}let s=i.parent;if(s){if(s.type==="leftright"||s.type==="surd")return Le(e,s);if(i.parentBranch==="subscript"&&s.superscript)return Le(e,s.superscript);if(i.parentBranch==="below"&&s.above)return Le(e,s.above);if(i.parentBranch==="superscript"||i.parentBranch==="subscript")return Ye(e,s);if(i.parentBranch==="above"||i.parentBranch==="below")return Le(e,s)}return Ye(e,0)}return!1},moveToMathfieldStart:e=>e.selectionIsCollapsed&&e.position===0?(e.announce("plonk"),!1):(e.position=0,e.mathfield.stopCoalescingUndo(),!0),moveToMathfieldEnd:e=>e.selectionIsCollapsed&&e.position===e.lastOffset?(e.announce("plonk"),!1):(e.position=e.lastOffset,e.mathfield.stopCoalescingUndo(),!0),moveToSuperscript:Yd,moveToSubscript:Qd},{target:"model",changeSelection:!0});Me({moveToNextPlaceholder:e=>dr(e,"forward"),moveToPreviousPlaceholder:e=>dr(e,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function e0(e,t,i,r){if(r==="forward"){let n=t.rightSibling;for(;n&&!i(n);)n=n.rightSibling;return n}let a=t.leftSibling;for(;a&&!i(a);)a=a.leftSibling;return a}function wn(e,t,i){typeof t=="function"&&(i=t,t=1/0),t===void 0&&(t=1/0);let r=e.position,a=!1,n="";for(;!a;){let o=e.at(r);a=t===0||o===void 0||o.type==="first"||o.mode!=="math"||!(o.type&&/mord|mpunct|operator/.test(o.type)||o.type==="mop"&&/[a-zA-Z ]+/.test(o.value))||!o.hasEmptyBranch("superscript")||!o.hasEmptyBranch("subscript")||typeof i=="function"&&!i(o),a||(o.mode="text",o.command=o.value,o.verbatimLatex=void 0,n+=o.value),r-=1,t-=1}e.contentDidChange({data:n,inputType:"insertText"})}function Vr(e,t,i){typeof t=="function"&&(i=t,t=1/0),t===void 0&&(t=1/0);let r=e.position,a=!1,n=[];for(;!a;){let o=e.at(r);a=t===0||!o||o.type==="first"||o.isFirstSibling||o.mode!=="text"||o.value===" "||typeof i=="function"&&!i(o),a||(n.push(w.serialize([o],{defaultMode:"math"})),o.mode="math"),r-=1,t-=1}Ts(e),e.contentDidChange({data:R(n),inputType:"insertText"})}function Ts(e){var t;let i=e.position-1;for(;i>=0&&((t=e.at(i))==null?void 0:t.mode)==="math";)i-=1;if(!(i<0)&&e.at(i).mode==="text"&&e.at(i).value===" "&&e.at(i-1).mode==="math"){e.at(i-1).parent.removeChild(e.at(i-1));let r=e.silenceNotifications;e.silenceNotifications=!0,e.position-=1,e.silenceNotifications=r,e.contentDidChange({inputType:"deleteContent"})}}function fg(e){let t="",i=e.position,r=!1;for(;!r;){let a=e.at(i);r=!(a&&(a.mode==="text"||a.mode==="math"&&a.type&&/mord|mpunct/.test(a.type))),r||(t=a.value+t),i-=1}return t}function gg(e,t,i){let{model:r}=e;if(r.mode==="latex"||!r.at(r.position).isLastSibling||!i||!da(i))return!1;let a=nr(i);if(!r.selectionIsCollapsed)return!!(e.model.mode==="text"&&/[/_^]/.test(a));let n=fg(r)+a;if(e.model.mode==="text"){if(t==="Esc"||/[/\\]/.test(a))return!0;if(/[\^_]/.test(a))return/(^|\s)[a-zA-Z][^_]$/.test(n)&&Vr(r,1),!0;let o={")":"(","}":"{","]":"["}[a],{parent:l}=r.at(r.position);if(o&&l instanceof ue&&l.leftDelim===o)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(n))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(a))return!0;if(/(^|[^a-zA-Z'’])[a-zA-Z] $/.test(n))return Vr(r,1),!1;if(/\D\.[^\d\s]$/.test(n)){Vr(r,1);let s=r.at(r.position);return s.value="⋅",s.style.variant="normal",s.command="\\cdot",s.verbatimLatex=void 0,r.contentDidChange({data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(n)||/\.\d$/.test(n)||/\([\d+\-.]$/.test(n))return Vr(r,1),!0;if(/\([a-z][,;]$/.test(n))return Vr(r,2),!0;if(/[\d+\-=><*|]$/.test(a))return Ts(r),!0}else{if(t==="[Space]")return wn(r,void 0,o=>/[a-z][:,;.]$/.test(o.value)),!0;if(/[a-zA-Z]{3,}$/.test(n)&&!/(dxd|abc|xyz|uvw)$/.test(n))return wn(r,void 0,o=>/[a-zA-Z]/.test(o.value)),!0;if(/(^|\W)(if)$/i.test(n))return wn(r,1),!0;if(/(\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5){3,}$/u.test(n)&&!/(αβγ)$/.test(n))return wn(r,void 0,o=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(o.value)),!0;if(a==="?"||a==="."&&!/[\d-+]\.$/.test(n))return!0}return!1}function bg(e,t){if(!e.isSelectionEditable||!e.keystrokeCaptionVisible)return;let i=mp(),r=e.element.getBoundingClientRect();i.style.left=`${r.left}px`,i.style.top=`${r.top-64}px`,i.innerHTML=globalThis.MathfieldElement.createHTML("<span>"+(Cs(t)||t)+"</span>"+i.innerHTML),i.style.visibility="visible",setTimeout(()=>{i.childNodes.length>0&&i.childNodes[i.childNodes.length-1].remove(),i.childNodes.length===0&&(i.style.visibility="hidden")},3e3)}function yg(e){if(e.keystrokeCaptionVisible=!e.keystrokeCaptionVisible,e.keystrokeCaptionVisible){let t=mp();t.innerHTML=""}else{let t=xo("mathlive-keystroke-caption-panel");t.style.visibility="hidden"}return!1}function mp(){return document.getElementById("mathlive-keystroke-caption-panel")||(Dt("keystroke-caption"),Dt("core"),xo("mathlive-keystroke-caption-panel"))}function vg(){document.getElementById("mathlive-keystroke-caption-panel")&&(_a("mathlive-keystroke-caption-panel"),ii("core"),ii("keystroke-caption"))}function fp(e,t){var i,r,a,n;let{model:o}=e,l=Xh(t);if(t.isTrusted){rm(t);let v=na();e.keyboardLayout!==v.id&&(e.keyboardLayout=v.id,e._keybindings=void 0)}if(clearTimeout(e.inlineShortcutBufferFlushTimer),e.inlineShortcutBufferFlushTimer=0,bg(e,l),t.isTrusted&&t.defaultPrevented)return e.flushInlineShortcutBuffer(),!1;let s,u=0,c="",d=0,h=e.inlineShortcutBuffer,p=!1;if(e.isSelectionEditable&&o.selectionIsPlaceholder&&da(t)&&(e.flushInlineShortcutBuffer(),o.deleteAtoms(we(o.selection)),e.snapshot("delete"),p=!0),e.isSelectionEditable){if(o.mode==="math"&&(!o.selectionIsPlaceholder||p))if(l==="[Backspace]")e.undoManager.lastOp==="insert-shortcut"?c="undo":h.pop();else if(!da(t))e.flushInlineShortcutBuffer();else{let v=nr(t),b=[...(r=(i=h[h.length-1])==null?void 0:i.keystrokes)!=null?r:[],v];h.push({state:o.getState(),keystrokes:b,leftSiblings:wg(e)}),u=0;let x="";for(;!s&&u<b.length;)d=h.length-(b.length-u),x=b.slice(u).join(""),s=xs(h[d].leftSiblings,x,e.options.inlineShortcuts),!s&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(x)&&(s=e.options.onInlineShortcut(e,x)),u+=1;e.flushInlineShortcutBuffer({defer:!0})}e.options.smartMode&&(s?e.switchMode("math"):gg(e,l,t)&&(e.switchMode({math:"text",text:"math"}[o.mode]),c=""))}if(!s){if(c||(c=o1(e.keybindings,o.mode,t)),!c&&(l==="[Enter]"||l==="[Return]")){let v=!0;return o.contentWillChange({inputType:"insertLineBreak"})&&(e.host&&(v=e.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),!v&&t.preventDefault?(t.preventDefault(),t.stopPropagation()):((a=o.parentEnvironment)!=null&&a.isMultiline&&e.executeCommand("addRowAfter"),o.contentDidChange({inputType:"insertLineBreak"}))),v}if(l==="[Space]"&&o.mode==="latex"&&ai(e,"accept-all"))return e.dirty=!0,e.scrollIntoView(),t.preventDefault&&(t.preventDefault(),t.stopPropagation()),!1;if((!c||l==="[Space]")&&o.mode==="math"){if(l==="[Space]"){if(e.styleBias="none",e.flushInlineShortcutBuffer(),e.options.mathModeSpace)return Z.insert(o,e.options.mathModeSpace,{format:"latex",mode:"math"}),e.snapshot("insert-space"),c="",e.dirty=!0,e.scrollIntoView(),t.preventDefault&&(t.preventDefault(),t.stopPropagation()),!1;let v=o.at(o.position+1),b=o.at(o.position-1);if((v==null?void 0:v.mode)==="text"||(b==null?void 0:b.mode)==="text")return Z.insert(o," ",{mode:"text"}),e.snapshot("insert-space"),e.dirty=!0,e.scrollIntoView(),!1}(n=o.at(o.position))!=null&&n.isDigit()&&globalThis.MathfieldElement.decimalSeparator===","&&nr(t)===","&&(c="insertDecimalSeparator")}}if(!s&&!c){if(o.mathfield.smartFence){if(Yl(o,nr(t),Bi(e)))return e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}else{let{parent:v}=o.at(o.position);if(v instanceof ue&&v.rightDelim==="?"&&o.at(o.position).isLastSibling&&/^[)}\]|]$/.test(l))return e.snapshot(),v.isDirty=!0,v.rightDelim=l,o.position+=1,o.selectionDidChange(),o.contentDidChange({data:nr(t),inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1;if(!o.selectionIsCollapsed){let b=nr(t);if(b==="("||b==="{"||b==="["){let x={"(":"(","{":"\\lbrace","[":"\\lbrack"}[b],E={"(":")","{":"\\rbrace","[":"\\rbrack"}[b],[S,M]=we(o.selection);return e.snapshot(),o.position=M,Z.insert(o,E,{format:"latex"}),o.position=S,Z.insert(o,x,{format:"latex"}),o.setSelection(S+1,M+1),o.contentDidChange({data:b,inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}}}return!0}let m=o.at(Math.max(o.position,o.anchor)),{parent:g}=m;if(c==="moveAfterParent"&&(g==null?void 0:g.type)==="leftright"&&m.isLastSibling&&e.options.smartFence&&Yl(o,".",e.defaultStyle)&&(c="",se(e)),e.keyboardDelegate.cancelComposition(),c)e.executeCommand(c);else if(s){let v=Bi(e);o.setState(h[d].state);let b=h[h.length-1].keystrokes;b=b.slice(u-1);for(let x of b)Z.insert(o,x,{silenceNotifications:!0,style:v});e.snapshot("insert-shortcut"),o.setState(h[d].state),o.deferNotifications({content:!0,selection:!0,data:s,type:"insertText"},()=>(Z.insert(o,s,{format:"latex",style:v}),Ts(e.model),s.endsWith(" ")&&(e.switchMode("text"),Z.insert(o," ",{style:v,mode:"text"})),e.snapshot(),o.selectionIsCollapsed||e.flushInlineShortcutBuffer(),!0)),e.dirty=!0,o.announce("replacement")}return e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}function xg(e){var t,i;let{position:r}=e,a=r,n=[];for(;a>0;){let m=e.at(a),g=m.value;if(m.type==="mord"||m.type==="mbin"&&(g==="+"||g==="-"||g==="−"))n.unshift(m),a--;else break}if(n.length===0)return null;let o=n.map(m=>m.value).join(""),l=((i=(t=globalThis.MathfieldElement)==null?void 0:t.decimalSeparator)!=null?i:".")==="."?"\\.":",",s=new RegExp(`^(\\d+(?:${l}\\d*)?)[eE]([+\\-−]?)(\\d+)$`),u=o.match(s);if(!u)return null;let c=u[1],d=u[2],h=u[3],p=d+h;return{startOffset:a,endOffset:r,significand:c,exponent:p}}function _g(e,t){var i;let r=(i=globalThis.MathfieldElement)==null?void 0:i.scientificNotationTemplate;if(!r||r===""||!r.includes("#1")||!r.includes("#2"))return null;let a=r.replace("#1",e);return a=a.replace("#2",t),a}function t0(e){let{model:t}=e;if(t.mode!=="math")return!1;let i=xg(t);if(!i)return!1;let r=_g(i.significand,i.exponent);return r?(t.deferNotifications({content:!0,selection:!0,type:"insertText"},()=>{t.selection={ranges:[[i.startOffset,i.endOffset]],direction:"forward"},Z.insert(t,r,{insertionMode:"replaceSelection",selectionMode:"after"})}),e.snapshot("format-scientific-notation"),e.dirty=!0,e.scrollIntoView(),!0):!1}function Zl(e,t,i){let{model:r}=e;if(!e.isSelectionEditable){r.announce("plonk");return}i!=null||(i={}),i.focus&&e.focus(),i.feedback&&globalThis.MathfieldElement.playSound("keypress"),typeof i.mode=="string"&&(e.switchMode(i.mode),e.snapshot());let a=N0(t),n=window.mathVirtualKeyboard;if(n!=null&&n.isShifted&&(a=typeof a=="string"?a.toUpperCase():a.map(o=>o.toUpperCase())),i.simulateKeystroke){let o=!0;for(let l of a)fp(e,new KeyboardEvent("keypress",{key:l}))&&(o=!1);if(o)return}if(r.mode==="latex"){if(r.deferNotifications({content:!0,selection:!0,data:t,type:"insertText"},()=>{vo(e);for(let o of a)Z.insert(r,o,{insertionMode:"replaceSelection"});e.snapshot("insert-latex"),xa(e)}),t==="}"){let o=ha(r).map(s=>s.value).join(""),l=o.match(/^\\([a-zA-Z]+)/);if(l){let s="\\"+l[1],u=ye(s,"math");if((u==null?void 0:u.definitionType)==="function"){let c=u.params.filter(d=>!d.isOptional).length;if(c>0){let d=0,h=0,p=!0;for(let m=0;m<o.length;m++){let g=o[m];if(p){if(g==="\\"||/[a-zA-Z]/.test(g))continue;p=!1}g==="{"?d++:g==="}"&&(d--,d===0&&h++)}if(d===0&&h===c&&ai(e,"accept-all")){e.dirty=!0,e.scrollIntoView();return}}}}}}else if(r.mode==="text"){let o=f(f({},Mg(r)),e.defaultStyle);for(let l of a)Z.insert(r,l,{style:o,insertionMode:"replaceSelection"});e.snapshot("insert-text")}else if(r.mode==="math")for(let o of a)kg(e,o);e.dirty=!0,e.scrollIntoView()}function wg(e){let t=e.model,i=[],r=t.at(Math.min(t.position,t.anchor));for(;r.type!=="first";)i.push(r),r=r.leftSibling;return i}function kg(e,t){let i=e.model;/\d/.test(t)||t0(e);let r={"^":"moveToSuperscript",_:"moveToSubscript"," ":e.options.mathModeSpace?["insert",e.options.mathModeSpace]:"moveAfterParent"}[t];if(r){e.executeCommand(r);return}let a=f({},Bi(e));!/[a-zA-Z0-9]/.test(t)&&e.styleBias!=="none"&&(a.variant="normal",a.variantStyle=void 0);let n=i.at(i.position),o=i.selectionIsPlaceholder;if(/\d/.test(t)&&e.options.smartSuperscript&&n.parentBranch==="superscript"&&n.parent.type!=="mop"&&n.parent.type!=="operator"&&n.parent.type!=="extensible-symbol"&&n.hasNoSiblings){if(!Z.insert(i,t,{style:a,insertionMode:"replaceSelection",selectionMode:o?"after":"placeholder"})){e.undoManager.pop();return}e.snapshot("insert-mord"),pp(i);return}let l=t;if(l==="{"?l="\\lbrace":l==="}"?l="\\rbrace":l==="&"?l="\\&":l==="#"?l="\\#":l==="$"?l="\\$":l==="%"?l="\\%":l==="~"?l="\\~":l==="\\"&&(l="\\backslash"),!!Z.insert(i,l,{style:a,insertionMode:"replaceSelection",selectionMode:o?"after":"placeholder"})&&(e.snapshot(`insert-${i.at(i.position).type}`),/\d/.test(t))){let s=e.options.inlineShortcutTimeout>0?e.options.inlineShortcutTimeout:1e3;clearTimeout(e.scientificNotationTimer),e.scientificNotationTimer=setTimeout(()=>{t0(e)},s)}}function Mg(e){var t,i,r,a;if(e.selectionIsCollapsed)return(i=(t=e.at(e.position))==null?void 0:t.style)!=null?i:{};let n=we(e.selection)[0];return(a=(r=e.at(n+1))==null?void 0:r.style)!=null?a:{}}function Yl(e,t,i){var r;if(!t||e.mode!=="math")return!1;let a=e.at(e.position),{parent:n}=a,o={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[t];if(!o)return!1;let l=Zn[o],s=fo[o];if(!e.selectionIsCollapsed){e.mathfield.snapshot();let[u,c]=we(e.selection),d=e.extractAtoms([u,c]),h=n.addChildrenAfter([new ue("left...right",d,{leftDelim:o,rightDelim:s})],e.at(u));return e.setSelection(e.offsetOf(h.firstChild),e.offsetOf(h.lastChild)),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:o,inputType:"insertText"}),!0}if(o==="|"){let u=n instanceof ue?n.leftDelim+n.rightDelim:"";if(u==="\\lbrace\\rbrace"||u==="\\{\\}"||u==="\\lbrace?")return e.mathfield.snapshot(),Z.insert(e,"\\,\\middle\\vert\\,",{format:"latex",style:i}),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:o,inputType:"insertText"}),!0}if(s){if(n instanceof ue&&n.firstChild===a&&(n.leftDelim==="?"||n.leftDelim==="."))return n.leftDelim=o,n.isDirty=!0,e.mathfield.snapshot(),e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(!(n instanceof ue)){let h=a;for(;h&&!(h.type==="mclose"&&h.value===s);)h=h.rightSibling;if(h){e.mathfield.snapshot();let p=e.extractAtoms([e.offsetOf(a),e.offsetOf(h)]);p.pop();let m=new ue("left...right",p,{leftDelim:o,rightDelim:s});return n.addChildrenAfter([m],a),e.position=e.offsetOf(m.firstChild),e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}}let u=e.offsetOf(a.lastSibling),c;for(c=e.position;c<=u;c++){let h=e.at(c);if(h instanceof ue&&(h.leftDelim==="?"||h.leftDelim===".")&&i0(o,h.rightDelim))break}let d=e.at(c);if(c<=u&&d instanceof ue){d.leftDelim=o,e.mathfield.snapshot();let h=e.extractAtoms([e.position,c-1]);return h=h.filter(p=>p.type!=="first"),d.addChildren(h,d.parentBranch),e.position+=1,e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(n instanceof ue&&(n.leftDelim==="?"||n.leftDelim===".")&&i0(o,n.rightDelim)){n.isDirty=!0,n.leftDelim=o,e.mathfield.snapshot();let h=e.extractAtoms([e.offsetOf(a.firstSibling),e.position]);for(let p of h)n.parent.addChildBefore(p,n);return e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(!(n instanceof ue&&n.leftDelim==="|")){if(o==="("){let h=e.position-1,p=!1;for(;h>=0;){let m=e.at(h);if(m.type==="first")break;if(m.type==="mord"&&m.value&&/^[\d]$/.test(m.value)){h-=1;continue}if(m.type==="group"&&((r=m.body)==null?void 0:r.length)===2&&m.body[0].type==="first"&&m.body[1].value===","){p=!0;break}if(m.type==="mord"&&(m.value===","||m.value===".")){p=!0;break}break}if(p)return!1}if(e.mathfield.snapshot(),Z.insert(e,`\\left${o}\\right?`,{format:"latex",style:i}),a.lastSibling.type!=="first"){let h=e.offsetOf(a.lastSibling),p=e.extractAtoms([e.position,h]);e.at(e.position).body=p,e.position-=1}return e.mathfield.snapshot("insert-fence"),!0}}if(l){if(o===")"){let m=e.position-1,g=!1;for(;m>=0;){let v=e.at(m);if(v.type==="first")break;if(v.type==="mord"&&v.value&&/^[\d]$/.test(v.value)){g=!0,m-=1;continue}break}if(g&&e.at(m).type==="mopen"&&e.at(m).value==="(")return!1}let u=a;for(;u;){if(u.type==="mopen"&&u.value===l){e.mathfield.snapshot();let m=u.leftSibling,g=e.extractAtoms([e.offsetOf(u.leftSibling),e.offsetOf(a)]);[,...g]=g;let v=new ue("left...right",g,{leftDelim:l,rightDelim:o});return n.addChildrenAfter([v],m),e.position=e.offsetOf(v),e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}u=u.leftSibling}if(n instanceof ue&&a.isLastSibling&&ml(n.leftDelim,o))return e.mathfield.snapshot(),n.isDirty=!0,n.rightDelim=o,e.position+=1,e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;let c=e.offsetOf(a.firstSibling),d;for(d=e.position;d>=c;d--){let m=e.at(d);if(m instanceof ue&&(m.rightDelim==="?"||m.rightDelim===".")&&ml(m.leftDelim,o))break}let h=e.at(d);if(d>=c&&h instanceof ue)return e.mathfield.snapshot(),h.rightDelim=o,h.addChildren(e.extractAtoms([d,e.position]),h.parentBranch),e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(n instanceof ue&&(n.rightDelim==="?"||n.rightDelim===".")&&ml(n.leftDelim,o))return e.mathfield.snapshot(),n.isDirty=!0,n.rightDelim=o,n.parent.addChildren(e.extractAtoms([e.position,e.offsetOf(a.lastSibling)]),n.parentBranch),e.position=e.offsetOf(n),e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;let p=n.parent;return p instanceof ue&&(p.rightDelim==="?"||p.rightDelim===".")&&e.at(e.position).isLastSibling?(e.position=e.offsetOf(p),Yl(e,o,i)):!1}return!1}function ml(e,t){return e?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t):fo[e]===t:!0}function i0(e,t){return t?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e):Zn[t]===e:!0}Me({scrollIntoView:e=>(e.scrollIntoView(),!0),scrollToStart:e=>(e.field.scroll(0,0),!0),scrollToEnd:e=>{let t=e.field.getBoundingClientRect();return e.field.scroll(t.left-window.scrollX,0),!0},toggleKeystrokeCaption:yg,toggleContextMenu:e=>{let t=e.toggleContextMenu();return t||e.model.announce("plonk"),t},plonk:e=>(e.model.announce("plonk"),!0),switchMode:(e,t,i,r)=>(e.switchMode(t,i,r),!0)});Me({undo:e=>(e.undo(),!0),redo:e=>(e.redo(),!0)},{target:"mathfield",changeContent:!0});Me({insert:(e,t,i)=>e.insert(t,i),typedText:(e,t,i)=>(Zl(e,t,i),!0),insertDecimalSeparator:e=>{let t=e.model;return t.mode==="math"&&globalThis.MathfieldElement.decimalSeparator===","&&t.at(Math.max(t.position,t.anchor)).isDigit()?(e.insert("{,}",{format:"latex"}),e.snapshot("insert-mord"),!0):(e.insert("."),!0)},commit:e=>{var t,i;let r=e.model;return r.contentWillChange({inputType:"insertLineBreak"})&&((t=e.host)==null||t.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),(i=r.parentEnvironment)!=null&&i.isMultiline&&e.executeCommand("addRowAfter"),r.contentDidChange({inputType:"insertLineBreak"})),!0},insertPrompt:(e,t,i)=>{let r=e.getPrompts(),a="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),n=0;for(;r.includes(a)&&n<100;){if(n===99)return console.error("could not find a unique ID after 100 tries"),!1;a="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),n++}return e.insert(`\\placeholder[${t??a}]{}`,i),!0}},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});Me({copyToClipboard:e=>(e.focus(),e.model.selectionIsCollapsed&&e.select(),"queryCommandSupported"in document&&document.queryCommandSupported("copy")&&document.execCommand("copy")||e.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("copy",{bubbles:!0,composed:!0})),!1)},{target:"mathfield"});Me({cutToClipboard:e=>(e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("cut")&&document.execCommand("cut")||e.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("cut",{bubbles:!0,composed:!0})),!0),pasteFromClipboard:e=>(e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("paste")?(document.execCommand("paste"),!0):(navigator.clipboard.readText().then(t=>{t&&e.model.contentWillChange({inputType:"insertFromPaste",data:t})?(e.stopCoalescingUndo(),e.stopRecording(),e.insert(t,{mode:e.model.mode})&&(xa(e),e.startRecording(),e.snapshot("paste"),e.model.contentDidChange({inputType:"insertFromPaste"}),se(e))):e.model.announce("plonk"),e.startRecording()}).catch(()=>{e.model.announce("plonk"),e.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function Ql(e){let[t,i]=we(e.selection);if(t=r0(e,t,"backward"),i=r0(e,i,"forward"),t===i){let r=e.at(t);if(r.type==="leftright")return e.setSelection(e.offsetOf(r.firstChild)-1,i);if(r.type==="first"&&(r.parent.type==="leftright"||r.parent.type==="surd"))return e.setSelection(t-1,e.offsetOf(r.parent.lastChild)+1);e.setSelection(t-1,i)}else e.setSelection(t,i);return!0}function r0(e,t,i){var r;let a=e.at(t);if(!a)return t;let n=i==="forward"?1:-1;if(a.mode==="text"){for(;a&&!(a.mode!=="text"||!la.test(a.value));)t+=n,a=e.at(t);return i==="backward"?t-1:t}if(a.mode==="latex"){if(/[a-zA-Z\\*]/.test(a.value))if(i==="backward")for(;(a==null?void 0:a.mode)==="latex"&&a.value!=="\\"&&/[a-zA-Z]/.test(a.value);)t+=n,a=e.at(t);else for(;(a==null?void 0:a.mode)==="latex"&&/[a-zA-Z\\*]/.test(a.value);)t+=n,a=e.at(t);else if(a.value==="{"){if(i==="forward"){for(;(a==null?void 0:a.mode)==="latex"&&a.value!=="}";)t+=n,a=e.at(t);return t}return t-1}else if(a.value==="}"){if(i==="backward"){for(;(a==null?void 0:a.mode)==="latex"&&a.value!=="{";)t+=n,a=e.at(t);return t-1}return t}return t-1}if(a.mode==="math"){if(a.isDigit()){for(;(r=e.at(t+n))!=null&&r.isDigit();)t+=n;return i==="backward"?t-1:t}if(a.style.variant||a.style.variantStyle){let o=a.style.variant,l=a.style.variantStyle;for(;;){let s=e.at(t+n);if(!s||s.style.variant!==o||s.style.variantStyle!==l)break;t+=n}return i==="backward"?t-1:t}return t}return t}Me({selectGroup:e=>{let t=Ql(e);return t||e.announce("plonk"),t},selectAll:e=>e.setSelection(0,e.lastOffset),extendSelectionForward:e=>dt(e,"forward",{extend:!0}),extendSelectionBackward:e=>dt(e,"backward",{extend:!0}),extendToNextWord:e=>Yt(e,"forward",{extend:!0}),extendToPreviousWord:e=>Yt(e,"backward",{extend:!0}),extendSelectionUpward:e=>dt(e,"upward",{extend:!0}),extendSelectionDownward:e=>dt(e,"downward",{extend:!0}),extendToNextBoundary:e=>Yt(e,"forward",{extend:!0}),extendToPreviousBoundary:e=>Yt(e,"backward",{extend:!0}),extendToGroupStart:e=>{let t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).firstSibling));return t||e.announce("plonk"),t},extendToGroupEnd:e=>{let t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).lastSibling));return t||e.announce("plonk"),t},extendToMathFieldStart:e=>{let t=e.setSelection(e.anchor,0);return t||e.announce("plonk"),t},extendToMathFieldEnd:e=>{let t=e.setSelection(e.anchor,e.lastOffset);return t||e.announce("plonk"),t}},{target:"model",changeSelection:!0});var bi=null,jr=0,no=class We{static start(t,i,r,a){var n;We.element=t,(n=We.controller)==null||n.abort(),We.controller=new AbortController;let o={signal:We.controller.signal};"PointerEvent"in window?(t.addEventListener("pointermove",r,o),t.addEventListener("pointerup",a,o),t.addEventListener("pointercancel",a,o),es(i)&&(We.pointerId=i.pointerId,t.setPointerCapture(i.pointerId))):(window.addEventListener("mousemove",r,o),window.addEventListener("blur",a,o),window.addEventListener("mouseup",a,o))}static stop(){var t;(t=We.controller)==null||t.abort(),We.controller=void 0,typeof We.pointerId=="number"&&(We.element.releasePointerCapture(We.pointerId),We.pointerId=void 0)}};function es(e){return e!==null&&globalThis.PointerEvent!==void 0&&e instanceof PointerEvent}function fl(e,t,i){return e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom}function a0(e,t,i){return e<t?t:e>i?i:e}function n0(e,t){var i,r,a,n,o,l;if(t.buttons>1)return;e.atomBoundsCache?e.atomBoundsCache.clear():e.atomBoundsCache=new Map;let s=e,u,c=!1,d=!1,h="none",p=!1,m=!1,g=t.clientX,v=t.clientY,b=Date.now(),x=s.field,E=setInterval(()=>{p?x.scroll({top:0,left:x.scrollLeft-16}):m&&x.scroll({top:0,left:x.scrollLeft+16})},32);function S(){no.stop(),c=!1,clearInterval(E),e.element.classList.remove("tracking"),t&&t.preventDefault()}function M(z){if(!s.hasFocus()){S();return}let N=z.clientX,j=z.clientY,V=es(z)&&z.pointerType==="touch"?20:5;if(Date.now()<b+500&&Math.abs(g-N)<V&&Math.abs(v-j)<V){z.preventDefault(),z.stopPropagation();return}let ee=x.getBoundingClientRect();m=N>ee.right,p=N<ee.left;let le=u;es(z)&&(z.isPrimary||(le=qn(s,z.clientX,z.clientY,{bias:0})));let me=qn(s,N,j,{bias:N<=g?N===g?0:-1:1});le>=0&&me>=0&&(s.model.extendSelectionTo(le,me),se(e)),d&&Ql(s.model)}bi&&Math.abs(bi.x-g)<5&&Math.abs(bi.y-v)<5&&Date.now()<bi.time+500?(jr+=1,bi.time=b):(bi={x:g,y:v,time:b},jr=1);let C=x.getBoundingClientRect(),B=(r=(i=e.container)==null?void 0:i.getBoundingClientRect())!=null?r:e.element.getBoundingClientRect(),D=(n=(a=e.element)==null?void 0:a.getBoundingClientRect())!=null?n:B,K=fl(g,v,C),Y=!K&&B?fl(g,v,B):!1,_=!K&&!Y&&D?fl(g,v,D):!1,$=K?g:Y||_?a0(g,C.left,C.right):g,W=K?v:Y||_?a0(v,C.top,C.bottom):v;if(K||Y||_){if(e.flushInlineShortcutBuffer(),u=qn(e,$,W,{bias:0}),u!==e.model.anchor){let z=e.defaultStyle.variantStyle;e.defaultStyle=z!==void 0?{variantStyle:z}:{},e.styleBias="left"}if(u>=0){if(e.element.classList.add("tracking"),t.shiftKey){let z=e.model.selectionIsCollapsed;e.model.extendSelectionTo(e.model.anchor,u),hl(e.model)||z?h="all":h="selection"}else if(e.model.at(u).type==="placeholder"||e.model.at(u).type==="prompt"){let z=e.model.at(u);z.hasChildren&&z.firstChild?e.model.position=e.model.offsetOf(z.firstChild):e.model.setSelection(u-1,u),h="selection"}else if(((o=e.model.at(u).rightSibling)==null?void 0:o.type)==="placeholder"||((l=e.model.at(u).rightSibling)==null?void 0:l.type)==="prompt"){let z=e.model.at(u).rightSibling;z.hasChildren&&z.firstChild?e.model.position=e.model.offsetOf(z.firstChild):e.model.setSelection(u,u+1),h="selection"}else{let z=e.model.at(u);if(z.captureSelection&&z.hasChildren&&z.body&&z.body.length>0){let N=z.body.find(j=>j.type!=="first");N&&(N.type==="placeholder"||N.type==="prompt")&&N.hasChildren&&N.firstChild?(e.model.position=e.model.offsetOf(N.firstChild),h="selection"):(e.model.position=u,hl(e.model)?h="all":h="selection")}else e.model.position=u,hl(e.model)?h="all":h="selection"}t.detail===3||jr>2?(S(),(t.detail===3||jr===3)&&(e.model.selection={ranges:[[0,e.model.lastOffset]]},h="all")):c||(c=!0,no.start(x,t,M,S),(t.detail===2||jr===2)&&(d=!0,Ql(e.model),h="all"))}e.hasFocus()||(h="none",e.onFocus(),e.model.announce("line"))}else bi=null;e.stopCoalescingUndo(),h!=="none"&&(e.model.selectionIsCollapsed&&(h="all"),se(e)),t.preventDefault()}function Sg(e,t,i){if(e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom)return 0;let r=e-(i.left+i.right)/2,a=t-(i.top+i.bottom)/2;return r*r+a*a}function Gr(e,t,i,r,a){if(!i.id)return[1/0,null];if(t.has(i.id))return t.get(i.id);let n=Ki(e,i);if(!n)return[1/0,null];let o=[1/0,null],l=e.model;if(i instanceof q){let s=-1,u=1/0;for(let d=0;d<i.rows.length;d++){let h=i.rows[d];if(!h||h.length===0)continue;let p=1/0,m=-1/0;for(let g of h)if(g)for(let v of g){let b=Ki(e,v);b&&(p=Math.min(p,b.top),m=Math.max(m,b.bottom))}if(p!==1/0&&m!==-1/0){let g;a<p?g=p-a:a>m?g=a-m:g=0,g<u&&(u=g,s=d)}}let c=s>=0?[i.rows[s]]:i.rows;for(let d of c)for(let h of d)if(h)for(let p of h){let m=Gr(e,t,p,r,a);m[0]<=o[0]&&(o=m)}if(!i.isMultiline)for(let d of i.children){let h=Gr(e,t,d,r,a);h[0]<=o[0]&&(o=h)}}else if(i.hasChildren&&!i.captureSelection&&r>=n.left&&r<=n.right){let s=i.children;for(let u of s){let c=Gr(e,t,u,r,a);c[0]<=o[0]&&(o=c)}for(let u of i.branches){let c=i.branch(u);if(!c||c.length===0)continue;let d=[l.offsetOf(c[0]),l.offsetOf(c[c.length-1])],h=af(e,d);if(a>=h.top&&a<=h.bottom)for(let p of c){let m=Gr(e,t,p,r,a);m[0]<=o[0]&&(o=m)}}}return o[1]||(o=[Sg(r,a,n),i]),t.set(i.id,o),o}function Cg(e,t,i){let[,r]=Gr(e,new Map,e.model.root,t,i);return r}function qn(e,t,i,r){var a;let n=e.field.querySelector(".ML__latex").getBoundingClientRect();if(!n)return 0;if(t>n.right||i>n.bottom+8)return e.model.lastOffset;if(t<n.left||i<n.top-8)return 0;r=r??{},r.bias=(a=r.bias)!=null?a:0;let o=Cg(e,t,i),l=[],s=o;for(;s;)l.unshift(s),s=s.parent;for(let c of l)if(c.captureSelection){o=c;break}let u=e.model.offsetOf(o);if(u<0)return-1;if(o.leftSibling){let c=o.type==="placeholder"||o.type==="prompt";if(r.bias===0&&!c){let d=Ki(e,o);d&&t<(d.left+d.right)/2&&(u=e.model.offsetOf(o.leftSibling))}else r.bias<0&&(u=e.model.offsetOf(o.leftSibling))}return u}var Lg=class extends Z{constructor(){super("math")}onPaste(e,t){if(!t||!e.model.contentWillChange({data:typeof t=="string"?t:null,dataTransfer:typeof t=="string"?null:t,inputType:"insertFromPaste"}))return!1;let i="",r="auto",a=typeof t!="string"?t.getData("application/json+mathlive"):"";if(a)try{let n=JSON.parse(a);if(n&&Array.isArray(n)){e.snapshot();let o=ti(n),{model:l}=e;l.selectionIsCollapsed||l.deleteAtoms(we(l.selection));let s=l.at(l.position);if(s.parent instanceof q){s.parentBranch;let u=[],c=[];o[0].type==="first"&&o.shift(),o[o.length-1].type==="first"&&o.pop();for(let m of o)m.type==="first"&&c.length>0?(u.push(c),c=[m]):c.push(m);c.length>0&&u.push(c);let d=Number(s.parentBranch[0]),h=Number(s.parentBranch[1]),p=s.parent.maxColumns;for(;s.parent.colCount-h<u.length&&s.parent.colCount<p;)s.parent.addColumn();s.parent.addChildrenAfter(u[0],s);for(let m=1;m<u.length;m++)h++,h>=p&&(h=0,s.parent.addRowAfter(d),d++),s.parent.setCell(d,h,u[m])}else s.parent.addChildrenAfter(o.filter(u=>u.type!=="first"),s);return l.position=l.offsetOf(o[o.length-1]),l.contentDidChange({inputType:"insertFromPaste"}),se(e),!0}}catch{}if(a=typeof t!="string"?t.getData("application/json"):"",a&&globalThis.MathfieldElement.computeEngine)try{let n=JSON.parse(a);if(typeof n=="object"&&"latex"in n&&n.latex&&(i=n.latex),!i){let o=globalThis.MathfieldElement.computeEngine.box(n);o&&!o.has("Error")&&(i=o.latex)}i||(r="latex")}catch{}if(!i&&typeof t!="string"&&(i=t.getData("application/x-latex"),i&&(r="latex")),i||(i=typeof t=="string"?t:t.getData("text/plain")),i){let n;return[n,i]=_s(i),r==="auto"&&n&&(r="latex"),e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,i,{format:r})&&(e.startRecording(),e.snapshot("paste"),se(e)),e.startRecording(),!0}return!1}insert(e,t,i){var r,a;let n=typeof t=="string"?t:(a=(r=globalThis.MathfieldElement.computeEngine)==null?void 0:r.box(t).latex)!=null?a:"";if(!i.silenceNotifications&&!e.contentWillChange({data:n,inputType:"insertText"}))return!1;i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder"),i.format||(i.format="auto");let{silenceNotifications:o}=e;i.silenceNotifications&&(e.silenceNotifications=!0);let l=e.silenceNotifications;e.silenceNotifications=!0;let s={"?":"\\placeholder{}","@":"\\placeholder{}"};s[0]=i.insertionMode==="replaceAll"?"":e.getValue(e.selection,"latex-unstyled"),i.insertionMode==="replaceSelection"?e.deleteAtoms(we(e.selection)):i.insertionMode==="replaceAll"?e.deleteAtoms():i.insertionMode==="insertBefore"?e.collapseSelection("backward"):i.insertionMode==="insertAfter"&&e.collapseSelection("forward"),!e.at(e.position).isLastSibling&&e.at(e.position+1).type==="placeholder"?e.deleteAtoms([e.position,e.position+1]):e.at(e.position).type==="placeholder"&&e.deleteAtoms([e.position-1,e.position]);let u=-1;s[0]?s["@"]=s[0]:typeof t=="string"&&/(^|[^\\])#@/.test(t)&&(u=Dg(e),u>=0&&(s["@"]=e.getValue(u,e.position,"latex"))),s[0]||(s[0]=s["?"]);let c=!1,d=v=>(c=!0,s[v]),[h,p]=o0(e,t,d,i);if(!p)return!1;let m=p.length===1&&p[0].type==="genfrac";if(m&&u>=0&&typeof e.mathfield.options.isImplicitFunction=="function"&&e.mathfield.options.isImplicitFunction(e.at(e.position).command)?(s["@"]=s["?"],c=!1,[h,p]=o0(e,t,d,i)):u>=0&&e.deleteAtoms([u,e.position]),p.length===1&&p[0].isRoot)e.root=p[0];else{let{parent:v}=e.at(e.position),b=v.hasEmptyBranch("body");if(m&&h!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&v instanceof ue&&v.leftDelim==="("&&b){let E=v.parent,S=v.parentBranch;E.removeChild(v),E.setChildren(p,S)}let x=e.at(e.position);x.parent.addChildrenAfter(p,x),h==="latex"&&typeof t=="string"&&(v==null?void 0:v.type)==="root"&&b&&!c&&(v.verbatimLatex=t)}e.silenceNotifications=l;let g=p[p.length-1];if(i.selectionMode==="placeholder"){let v;if(p.length===1&&p[0].type==="genfrac"){let b=p[0].branch("above");if(v=b==null?void 0:b.find(x=>x.type==="placeholder"),!v){let x=p[0].branch("below");v=x==null?void 0:x.find(E=>E.type==="placeholder")}}if(v||(v=p.flatMap(b=>[b,...b.children]).find(b=>b.type==="placeholder")),v){let b=e.offsetOf(v);e.setSelection(b-1,b),e.announce("move")}else if(g){let b=g.body,x=g.hasEmptyBranch("body");b&&x?e.setSelection(e.offsetOf(b[0]),e.offsetOf(b[b.length-1])+1):e.position=e.offsetOf(g)}}else i.selectionMode==="before"||(i.selectionMode==="after"?g&&(e.position=e.offsetOf(g)):i.selectionMode==="item"&&e.setSelection(e.anchor,e.offsetOf(g)));return e.contentDidChange({data:n,inputType:"insertText"}),e.silenceNotifications=o,!0}};function o0(e,t,i,r){var a;let n,o=[];if(typeof t!="string"||r.format==="math-json"){let l=globalThis.MathfieldElement.computeEngine;if(!l)return["math-json",[]];[n,t]=["latex",l.box(t).latex],o=De(t,{context:e.mathfield.context})}else typeof t=="string"&&r.format==="ascii-math"?([n,t]=ua(t,{format:"ascii-math",inlineShortcuts:e.mathfield.options.inlineShortcuts}),o=De(t,{context:e.mathfield.context}),n!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&(o=o.map(l=>oo(l)))):(r.format==="auto"||(a=r.format)!=null&&a.startsWith("latex"))&&(r.format==="auto"&&([n,t]=ua(t,{format:"auto",inlineShortcuts:e.mathfield.options.inlineShortcuts})),r.format==="latex"&&([,t]=_s(t)),o=De(t,{context:e.mathfield.context,args:i}),r.format!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&(o=o.map(l=>oo(l))));return Ss(o,r.style),[n??"latex",o]}function oo(e){var t;if(e instanceof ue&&e.leftDelim!=="("&&e.rightDelim===")"){let i=(t=e.body)==null?void 0:t.filter(r=>r.type!=="first");if((i==null?void 0:i.length)===1&&i[0].type==="genfrac")return i[0]}for(let i of e.branches)e.hasEmptyBranch(i)||e.setChildren(e.branch(i).map(r=>oo(r)),i);return e instanceof q&&e.forEachCell((i,r,a)=>{e.setCell(r,a,i.map(n=>oo(n)))}),e}function Dg(e){let t=e.at(e.position);if(t.mode==="text"){for(;!t.isFirstSibling&&t.mode==="text";)t=t.leftSibling;return e.offsetOf(t)}let i=t,r=!1;if(t.type==="mclose"){let a=Zn[t.value];for(;!t.isFirstSibling&&!(t.type==="mopen"&&t.value===a);)t=t.leftSibling;t.isFirstSibling||(t=t.leftSibling),r=!0}else t.type==="leftright"&&(t=t.leftSibling,r=!0);if(r)for(;!t.isFirstSibling&&(t.isFunction||l0(t));)t=t.leftSibling;else{let a=[];for(;!t.isFirstSibling&&(l0(t)||a.length>0);)t.type==="mclose"&&a.unshift(t.value),t.type==="mopen"&&a.length>0&&t.value===Zn[a[0]]&&a.shift(),t=t.leftSibling}return i===t?-1:e.offsetOf(t)}function Eg(e){if(e.type==="mord"&&e.value==="e"){let t=e.leftSibling;if(t&&t.isDigit())return!0}if(e.type==="mbin"&&(e.value==="+"||e.value==="-"||e.value==="−")){let t=e.leftSibling,i=e.rightSibling;if((t==null?void 0:t.type)==="mord"&&t.value==="e"&&i&&i.isDigit()){let r=t.leftSibling;if(r&&r.isDigit())return!0}}if(e.type==="subsup"){let t=e.leftSibling;if(t&&t.isDigit()&&t.value==="0"){let i=t.leftSibling;if(i&&i.isDigit()&&i.value==="1"){let r=i.leftSibling;if((r==null?void 0:r.type)==="mbin"&&(r.value==="×"||r.value==="\\times")){let a=r.leftSibling;if(a&&a.isDigit())return!0}}}}if(e.isDigit()&&e.value==="0"){let t=e.leftSibling,i=e.rightSibling;if(t&&t.isDigit()&&t.value==="1"&&(i==null?void 0:i.type)==="subsup"){let r=t.leftSibling;if((r==null?void 0:r.type)==="mbin"&&(r.value==="×"||r.value==="\\times")){let a=r.leftSibling;if(a&&a.isDigit())return!0}}}if(e.isDigit()&&e.value==="1"){let t=e.rightSibling;if(t&&t.isDigit()&&t.value==="0"){let i=t.rightSibling;if((i==null?void 0:i.type)==="subsup"){let r=e.leftSibling;if((r==null?void 0:r.type)==="mbin"&&(r.value==="×"||r.value==="\\times")){let a=r.leftSibling;if(a&&a.isDigit())return!0}}}}if(e.type==="mbin"&&(e.value==="×"||e.value==="\\times")){let t=e.leftSibling,i=e.rightSibling;if(t&&t.isDigit()&&i&&i.isDigit()&&i.value==="1"){let r=i.rightSibling;if(r&&r.isDigit()&&r.value==="0"){let a=r.rightSibling;if((a==null?void 0:a.type)==="subsup")return!0}}}return!1}function l0(e){return e.isDigit()||Eg(e)?!0:e.type&&/^(mord|surd|subsup|leftright|mop|mclose)$/.test(e.type)?e.type!=="extensible-symbol":!1}new Lg;var Bg=class extends Z{constructor(){super("text")}onPaste(e,t){if(!t)return!1;let i=typeof t=="string"?t:t.getData("text/plain");return i&&e.model.contentWillChange({inputType:"insertFromPaste",data:i})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,i)&&(e.model.contentDidChange({inputType:"insertFromPaste"}),e.startRecording(),e.snapshot("paste"),se(e)),e.startRecording(),!0):!1}insert(e,t,i={}){if(!e.contentWillChange({data:t,inputType:"insertText"}))return!1;i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder"),i.format||(i.format="auto");let{silenceNotifications:r}=e;i.silenceNotifications&&(e.silenceNotifications=!0);let a=e.silenceNotifications;e.silenceNotifications=!0,i.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(we(e.selection)):i.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):i.insertionMode==="insertBefore"?e.collapseSelection("backward"):i.insertionMode==="insertAfter"&&e.collapseSelection("forward");let n=Ag(t,e.mathfield.context);if(Ss(n,i.style),!n)return!1;let o=e.at(e.position),l=o.parent.addChildrenAfter(n,o);return e.silenceNotifications=a,i.selectionMode==="before"||(i.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(l)):l&&(e.position=e.offsetOf(l))),e.contentDidChange({data:t,inputType:"insertText"}),e.silenceNotifications=r,!0}};function Ag(e,t){if(e.includes("$")){let i=[],r=0,a=!1,n="";for(;r<e.length;)e[r]==="$"?r+1<e.length&&e[r+1]==="$"?(!a&&n?(i.push(kn(n)),n=""):a&&n&&(i.push(n),n=""),i.push("$$"),a=!a,r+=2):(!a&&n?(i.push(kn(n)),n=""):a&&n&&(i.push(n),n=""),i.push("$"),a=!a,r+=1):(n+=e[r],r+=1);return n&&(a?i.push(n):i.push(kn(n))),De(i.join(""),{context:t,parseMode:"text"})}return De(kn(e),{context:t,parseMode:"text"})}function kn(e){return e=e.replace(/\\/g,"\\textbackslash "),e=e.replace(/#/g,"\\#"),e=e.replace(/%/g,"\\%"),e=e.replace(/&/g,"\\&"),e=e.replace(/_/g,"\\_"),e=e.replace(/{/g,"\\textbraceleft "),e=e.replace(/}/g,"\\textbraceright "),e=e.replace(/lbrace/g,"\\textbraceleft "),e=e.replace(/rbrace/g,"\\textbraceright "),e=e.replace(/\^/g,"\\textasciicircum "),e=e.replace(/~/g,"\\textasciitilde "),e=e.replace(/£/g,"\\textsterling "),e}new Bg;function Ut(e){return{value:e.model.getValue(),selectionIsCollapsed:e.model.selectionIsCollapsed,canUndo:e.canUndo(),canRedo:e.canRedo(),style:Tg(e.model),mode:e.model.mode}}function Tg(e){var t;if(e.selectionIsCollapsed)return(t=e.at(e.position))==null?void 0:t.style;let i=e.getAtoms(e.selection);if(i.length===0)return{};let r=f({},i[0].style);for(let a of i)for(let[n,o]of Object.entries(a.style))r[n]!==o&&delete r[n];return r}var re=4,Ae=20,ce=2*(Ae+re),Mn=(e,t)=>`
3071  <line x1="${e+Ae}" y1="${t+Ae}" 
3072    x2="${e>t?e+Ae:7*Ae+10*re}" 
3073    y2="${e<t?t+Ae:7*Ae+10*re}"/>
3074  <svg id="plus" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
3075    <circle class="cls-2" cx="20" cy="20" r="20"/>
3076    <path class="font" d="m33.33,20c0,1.84-1.49,3.34-3.33,3.34h-6.67v6.66c0,1.84-1.49,3.34-3.33,3.34s-3.34-1.5-3.34-3.34v-6.66h-6.66c-1.84,0-3.34-1.5-3.34-3.34s1.5-3.33,3.34-3.33h6.66v-6.67c0-1.84,1.5-3.33,3.34-3.33s3.33,1.49,3.33,3.33v6.67h6.67c1.84,0,3.33,1.49,3.33,3.33Z"/>
3077  </svg>`,s0=(e,t)=>`
3078  <line x1="${e+Ae}" y1="${t+Ae}" 
3079    x2="${e>t?e+Ae:7*Ae+10*re}" 
3080    y2="${e<t?t+Ae:7*Ae+10*re}"/>
3081  <svg id="minus" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
3082    <circle class="cls-2" cx="20" cy="20" r="20"/>
3083    <path class="font" d="m33.33,20c0,1.84-1.49,3.33-3.33,3.33H10c-1.84,0-3.34-1.49-3.34-3.33s1.5-3.34,3.34-3.34h20c1.84,0,3.33,1.5,3.33,3.34Z"/>
3084  </svg>`,Sn=(e,t,i)=>`
3085  <svg id="arrow" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
3086    <circle class="cls-2" cx="20" cy="20" r="20"/>
3087    <g transform="rotate(${i})" transform-origin="20 20">
3088      <path class="font" d="m17.7,7.23h4.6c.52,0,.94.42.94.94v13.82c0,.52.42.94.94.94h3.39c.83,0,1.25,1.01.66,1.6l-7.56,7.56c-.37.37-.96.37-1.32,0l-7.56-7.56c-.59-.59-.17-1.6.66-1.6h3.39c.52,0,.94-.42.94-.94v-13.82c0-.52.42-.94.94-.94Z"/>
3089    </g>  
3090  </svg>`,Fg=`
3091<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" 
3092viewBox=
3093"-2 -2 ${8*Ae+10*re+5} ${8*Ae+10*re+5}">
3094  <rect 
3095      class="MLEP__array-insert-background rows"
3096      x="0" 
3097      y="${ce+re}" 
3098      height="${3*ce}" 
3099      width="${ce}" 
3100      rx="${ce/2}"/>
3101      <rect 
3102      class="MLEP__array-insert-background columns"
3103      x="${ce+re}" 
3104      y="0" 
3105      height="${ce}" 
3106      width="${3*ce}" 
3107      rx="${ce/2}"/>
3108  <g data-command='"moveDown"'>
3109  ${Sn(2*(re+ce),2*re+3*ce,0)}
3110  </g>
3111  <g data-command='"moveUp"'>
3112  ${Sn(2*(re+ce),2*re+ce,180)}
3113  </g>
3114  <g data-command='"moveToNextWord"'>
3115  ${Sn(2*re+3*ce,2*(re+ce),-90)}
3116  </g>
3117  <g data-command='"moveToPreviousWord"'>
3118  ${Sn(2*re+ce,2*(re+ce),90)}
3119  </g>
3120  <g>
3121
3122  <g data-command='"addColumnBefore"'>
3123  ${Mn(2*re+ce,re)}
3124  </g>
3125  <g data-command='"removeColumn"'>
3126  ${s0(2*re+2*ce,re)}
3127  </g>
3128  <g data-command='"addColumnAfter"'>
3129  ${Mn(2*re+3*ce,re)}
3130  </g>
3131  <g data-command='"addRowBefore"'>
3132  ${Mn(re,2*re+ce)}
3133  </g>
3134  <g data-command='"removeRow"'>
3135  ${s0(re,2*re+2*ce)}
3136  </g>
3137  <g data-command='"addRowAfter"'>
3138    ${Mn(re,2*re+3*ce)}
3139  </g>
3140</svg>`,zg=e=>`
3141<svg id="matrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24" 
3142  data-command='["setEnvironment","matrix"]'>
3143  <rect class="cls-1" width="28" height="24"/>
3144  <circle cx="10" cy="8" r="1"/>
3145  <circle cx="14" cy="12" r="1"/>
3146  <circle cx="18" cy="16" r="1"/></svg>`,Kg=e=>`
3147<svg id="pmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24" 
3148data-command='["setEnvironment","pmatrix"]'>
3149  <rect class="cls-1" width="28" height="24"/>
3150  <path class="cls-2" d="m6,4c-3.96,4.6-3.96,11.4,0,16"/>
3151  <path class="cls-2" d="m22,4c3.96,4.6,3.96,11.4,0,16"/>
3152  <circle cx="10" cy="8" r="1"/>
3153  <circle cx="14" cy="12" r="1"/>
3154  <circle cx="18" cy="16" r="1"/></svg>`,gp=e=>`
3155<svg id="Bmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24" 
3156  data-command='["setEnvironment","Bmatrix"]'>
3157  <rect class="cls-1" width="28" height="24"/>
3158  <path class="cls-2" d="m6,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
3159  <path class="cls-2" d="m22,4c1.1,0,2,.9,2,2v3c0,1.66.9,3,2,3-1.1,0-2,1.34-2,3v3c0,1.1-.9,2-2,2"/>
3160  <circle cx="10" cy="8" r="1"/>
3161  <circle cx="14" cy="12" r="1"/>
3162  <circle cx="18" cy="16" r="1"/>
3163</svg>`,$g=e=>`
3164<svg id="bmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24" 
3165  data-command='["setEnvironment","bmatrix"]'>
3166  <rect class="cls-1" width="28" height="24"/>
3167  <path class="cls-2" d="m6,4h-3v16h3"/>
3168  <path class="cls-2" d="m22,4h3v16h-3"/>
3169  <circle cx="10" cy="8" r="1"/>
3170  <circle cx="14" cy="12" r="1"/>
3171  <circle cx="18" cy="16" r="1"/>
3172</svg>`,Pg=e=>`
3173<svg id="vmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24" 
3174  data-command='["setEnvironment","vmatrix"]'>
3175  <rect class="cls-1" width="28" height="24"/>
3176  <circle cx="10" cy="8" r="1"/>
3177  <circle cx="14" cy="12" r="1"/>
3178  <circle cx="18" cy="16" r="1"/>
3179  <line class="cls-2" x1="4" y1="4" x2="4" y2="20"/>
3180  <line class="cls-2" x1="24" y1="4" x2="24" y2="20"/>
3181</svg>`,Og=e=>`
3182<svg id="Vmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="-3.5 -3 35 30" 
3183  data-command='["setEnvironment","Vmatrix"]'>
3184  <rect class="cls-1" width="28" height="24"/>
3185  <circle cx="10" cy="8" r="1"/>
3186  <circle cx="14" cy="12" r="1"/>
3187  <circle cx="18" cy="16" r="1"/>
3188  <line class="cls-2" x1="6" y1="4" x2="6" y2="20"/>
3189  <line class="cls-2" x1="22" y1="4" x2="22" y2="20"/>
3190  <line class="cls-2" x1="2" y1="4" x2="2" y2="20"/>
3191  <line class="cls-2" x1="26" y1="4" x2="26" y2="20"/>
3192</svg>`,Ig=e=>`
3193<svg id="cases" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24" 
3194  data-command='["setEnvironment","cases"]'>
3195  <rect class="cls-1" width="28" height="24"/>
3196  <path class="cls-2" d="m10,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
3197  <circle cx="13" cy="8" r="1"/>
3198  <circle cx="13" cy="16" r="1"/>
3199  <circle cx="21" cy="8" r="1"/>
3200  <circle cx="21" cy="16" r="1"/>
3201</svg>`,Rg=e=>`
3202<svg id="rcases" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24" 
3203  data-command='["setEnvironment","rcases"]'>
3204  <rect class="cls-1" width="28" height="24"/>
3205  <path class="cls-2" d="m18,20c1.1,0,2-.9,2-2v-3c0-1.66.9-3,2-3-1.1,0-2-1.34-2-3v-3c0-1.1-.9-2-2-2"/>
3206  <circle cx="15" cy="8" r="1"/>
3207  <circle cx="15" cy="16" r="1"/>
3208  <circle cx="7" cy="8" r="1"/>
3209  <circle cx="7" cy="16" r="1"/>
3210</svg>`,gl={matrix:zg,pmatrix:Kg,bmatrix:$g,Bmatrix:gp,vmatrix:Pg,Vmatrix:Og},bl={cases:Ig,rcases:Rg,Bmatrix:gp};function Ng(e){var t,i;let r=(t=e.model.parentEnvironment)==null?void 0:t.rows;if(!r)return;let a=0;r.forEach(p=>{(!a||p.length>a)&&(a=p.length)});let n=document.getElementById("mathlive-environment-popover");n||(n=xo("mathlive-environment-popover"),Dt("environment-popover"),Dt("core"),n.setAttribute("aria-hidden","true"));let o,l=n.querySelector(".MLEP__environment-controls");l?o=l:(o=document.createElement("div"),n.innerHTML="",n.appendChild(o)),o.className="MLEP__environment-controls",o.style.display="flex",o.style.width="100%",o.style.height="100%",o.style.boxSizing="border-box",o.innerHTML=Fg;let s=[],u="",c=e.model.parentEnvironment.environmentName;if(dh(c)){let p=Vg(c);u=gl[p]("active");let m=gl,{[p]:g}=m,v=Wn(m,[Ps(p)]);s=Object.values(v).map(b=>b("inactive"))}else if(Cf(c)){let p=jg(c);u=bl[p]("active");let m=bl,{[p]:g}=m,v=Wn(m,[Ps(p)]);s=Object.values(v).map(b=>b("inactive"))}else Lf(c)&&(u=gl.matrix("active"),s=Object.values(bl).map(p=>p("inactive")));let d=document.createElement("div");d.className="MLEP__environment-delimiter-controls",d.style.display="flex",d.style.flexDirection="column",d.innerHTML=`
3211  <div class='MLEP__array-delimiter-options'>
3212  ${u}
3213  ${s.join("")}
3214  </div>`,u&&o.appendChild(d),o.querySelectorAll("[data-command]").forEach(p=>{let m=p.dataset.command,g=m;try{g=JSON.parse(m)}catch{}p.addEventListener("mousedown",v=>v.preventDefault()),g&&p.addEventListener("click",()=>e.executeCommand(g))});let h=(i=e.field)==null?void 0:i.getBoundingClientRect();h&&(n.style.top=`${window.scrollY+(h.top-n.clientHeight-15)}px`,n.style.left=`${h.left+20}px`,n.classList.add("is-visible"))}function ts(){let e=document.getElementById("mathlive-environment-popover");e==null||e.classList.remove("is-visible")}function qg(){document.getElementById("mathlive-environment-popover")&&(_a("mathlive-environment-popover"),ii("environment-popover"),ii("core"))}function Cn(e){if(!e.hasFocus())return;let t=!1;if(e.model.mode==="math"){let i=e.model.parentEnvironment;if(i!=null&&i.rows&&Sf(i.environmentName)){let r=e.options.environmentPopoverPolicy;t=r==="auto"||r==="on"}}t?Ng(e):ts()}function Vg(e){return e.replace("*","")}function jg(e){return e==="dcases"?"cases":e}function bp(e){let t=getComputedStyle(e).direction;return t==="ltr"||t==="rtl"?t:"ltr"}function u0(e,t,i){return t==="left"||t==="leading"&&i==="ltr"||t==="trailing"&&i==="rtl"?e.left:e.right}function yl(e,t,i,r){return i==="middle"?e-t/2:i==="start"&&r==="rtl"||i==="end"&&r==="ltr"||i==="top"||i==="right"?Math.max(0,e-t):e}function Hg(e,t,i,r){return i==="middle"?e-t/2:i==="start"&&r==="ltr"||i==="end"&&r==="rtl"||i==="top"||i==="right"?e:e-t}function Wg(e,t){var i,r,a;let n=(i=bp(e))!=null?i:"ltr";e.style.position="fixed",e.style.left="",e.style.top="",e.style.right="",e.style.bottom="",e.style.height="",e.style.width="";let o=e.getBoundingClientRect(),l=Number.isFinite(t.maxHeight)?Math.min(t.maxHeight,window.innerHeight):window.innerHeight,s=Math.min(l,(r=t.height)!=null?r:o.height),u=yl(t.location.y,s,t.verticalPos,n);u+s>window.innerHeight-8&&(t.alternateLocation?(u=yl(t.alternateLocation.y,s,t.verticalPos,n),u+s>window.innerHeight-8&&(u=void 0)):u=void 0),Number.isFinite(u)||(u=Math.max(8,window.innerHeight-8-s),8+s>window.innerHeight-8&&(e.style.bottom="8px")),s=Math.min(u+s,window.innerHeight-8)-u;let c=Number.isFinite(t.maxWidth)?Math.min(t.maxWidth,window.innerWidth):window.innerWidth,d=Math.min(c,(a=t.width)!=null?a:o.width),h=yl(t.location.x,d,t.horizontalPos,n);h+d>window.innerWidth-8&&(t.alternateLocation?(h=Hg(t.alternateLocation.x,d,t.verticalPos,n),h+d>window.innerWidth-8&&(h=void 0)):h=void 0),Number.isFinite(h)||(h=Math.max(8,window.innerWidth-8-d),8+d>window.innerWidth-8&&(e.style.right="8px")),d=Math.min(h+d,window.innerWidth-8)-h,n==="rtl"?e.style.right=`${Math.ceil(window.innerWidth-h-d).toString()}px`:e.style.left=`${Math.ceil(h).toString()}px`,e.style.top=`${Math.ceil(u).toString()}px`,s!==o.height&&(e.style.height=`${Math.ceil(s).toString()}px`),d!==o.width&&(e.style.width=`${Math.ceil(d).toString()}px`)}function Ug(e,t){return Math.hypot(t.x-e.x,t.y-e.y)}function hr(e){return"submenu"in e}function _t(e){return"type"in e&&e.type==="command"||"onMenuSelect"in e||"id"in e}function is(e){return"type"in e&&e.type==="divider"}function vl(e){return"type"in e&&e.type==="heading"}var c0={};function xl(e){let t=c0[e];if(!t){let i;switch(e){case"checkmark":i=`<span aria-hidden="true" class="ui-checkmark"><svg  xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
3214<path fill="currentColor" d="M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"></path></svg>
3215      </span>`;break;case"trailing-chevron":i='<span aria-hidden="true" class="ui-trailing-chevron"><svg focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg></span>';break;case"mixedmark":i='<span aria-hidden="true" class="ui-mixedmark"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 512 512"><path fill="currentColor" d="M0 256c0-13.3 10.7-24 24-24H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24z"/></svg></span>'}if(i){let r=document.createElement("template");r.innerHTML=i,c0[e]=r,t=r}}if(t){if("content"in t)return t.content.cloneNode(!0);let i=document.createElement("svg");return i.innerHTML=t.innerHTML,i}}var d0=80,yp=class{constructor(e,t){this._className="",this._element=null;var i;this.parentMenu=t,this._declaration=e,Object.freeze(this._declaration),hr(e)?(this.type="submenu",this.submenu=new vp(e.submenu,{parentMenu:t,submenuClass:e.submenuClass,columnCount:e.columnCount})):this.type=(i=e.type)!=null?i:"command",this.hasCheck=_t(e)&&e.checked!==void 0}get rootMenu(){return this.parentMenu.rootMenu}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}dispose(){var e,t;(e=this._abortController)==null||e.abort(),this._abortController=void 0,(t=this._element)==null||t.remove(),this._element=null,this.submenu&&this.submenu.dispose(),this.submenu=void 0}get menuItem(){return this._declaration}get label(){var e;return(e=this._label)!=null?e:""}set label(e){e===void 0&&(e=""),e!==this._label&&(this._label=e,this.dirty=!0)}get visible(){return this._visible}set visible(e){e!==this._visible&&(this._visible=e,this.dirty=!0)}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.element&&(e?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")),this.dirty=!0}get checked(){return this._checked}set checked(e){this._checked=e,this.dirty=!0}get tooltip(){return this._tooltip}set tooltip(e){e!==this._tooltip&&(this._tooltip=e,this.dirty=!0)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){e!==this._ariaLabel&&(this._ariaLabel=e,this.dirty=!0)}get active(){var e,t;return(t=(e=this.element)==null?void 0:e.classList.contains("active"))!=null?t:!1}set active(e){this.element&&this.element.classList.toggle("active",e)}updateState(e){var t,i,r;let a=this._declaration;if(is(a)){this.enabled=!1,this.checked=!1;return}vl(a)&&(this.enabled=!1,this.checked=!1,this.visible=!0),_t(a)&&(this.checked=(t=yi(a.checked,e))!=null?t:!1),(_t(a)||hr(a))&&(this.enabled=(i=yi(a.enabled,e))!=null?i:!0,this.visible=(r=yi(a.visible,e))!=null?r:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(e),this.submenu.visible||(this.visible=!1))),(_t(a)||vl(a)||hr(a))&&(this.label=yi(a.label,e),this._className=yi(a.class,e),this.tooltip=yi(a.tooltip,e),this.ariaLabel=yi(a.ariaLabel,e)),this._element&&this.updateElement()}set dirty(e){e&&this.parentMenu&&(this.parentMenu.dirty=!0)}updateElement(){var e;if(!this.visible||!this.element)return;let t=this.element;t.textContent="",t.className="",t.className=(e=this._className)!=null?e:"",this.enabled?t.removeAttribute("aria-disabled"):t.setAttribute("aria-disabled","true"),this.checked===!0?(t.setAttribute("aria-checked","true"),t.append(xl("checkmark"))):this.checked==="mixed"?(t.setAttribute("aria-checked","mixed"),t.append(xl("mixedmark"))):t.removeAttribute("aria-checked"),this.ariaLabel&&t.setAttribute("aria-label",this.ariaLabel);let i=document.createElement("span");if(i.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&i.classList.add("heading"),i.innerHTML=this.label,t.append(i),this._tooltip&&t.setAttribute("data-tooltip",this._tooltip),_t(this._declaration)&&this._declaration.keyboardShortcut){let r=document.createElement("kbd");r.innerHTML=Cs(this._declaration.keyboardShortcut),t.append(r)}
vendor: 18,182 bytes, line 3215
3215this.type==="submenu"&&t.append(xl("trailing-chevron"))}get element(){if(this._element)return this._element;if(is(this._declaration)){let i=document.createElement("li");return i.setAttribute("part","menu-divider"),i.setAttribute("role","divider"),this._element=i,i}let e=document.createElement("li");this._element=e,(_t(this._declaration)||vl(this._declaration)||hr(this._declaration))&&e.setAttribute("part","menu-item"),e.setAttribute("tabindex","-1"),this.hasCheck?e.setAttribute("role","menuitemcheckbox"):e.setAttribute("role","menuitem"),this.type==="submenu"&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"));let t=this.abortController.signal;return e.addEventListener("pointerenter",this,{signal:t}),e.addEventListener("pointerleave",this,{signal:t}),e.addEventListener("pointerup",this,{signal:t}),e.addEventListener("click",this,{signal:t}),this._element}dispatchSelect(){var e;if(!_t(this._declaration))return;let t=new CustomEvent("menu-select",{cancelable:!0,bubbles:!0,detail:{modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data}});this.parentMenu.dispatchEvent(t)&&typeof this._declaration.onMenuSelect=="function"&&this._declaration.onMenuSelect({target:(e=this.parentMenu.host)!=null?e:void 0,modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data})}handleEvent(e){var t;if(!(!this.visible||!this.enabled)){if(e.type==="click"){this.rootMenu.state==="modal"&&this.select(),e.stopPropagation(),e.preventDefault();return}if(e.type==="pointerenter"){let i=e;this.rootMenu.cancelDelayedOperation(),this.parentMenu.isSubmenuOpen&&(t=this.parentMenu.activeMenuItem)!=null&&t.movingTowardSubmenu(i)?this.rootMenu.scheduleOperation(()=>{this.parentMenu.activeMenuItem=this,this.openSubmenu()}):(this.parentMenu.activeMenuItem=this,this.openSubmenu({withDelay:!0}));return}if(e.type==="pointerleave"){this.rootMenu.activeSubmenu===this.parentMenu&&(this.parentMenu.activeMenuItem=null);return}if(e.type==="pointerup"){this.rootMenu.state!=="modal"&&this.select(),e.stopPropagation(),e.preventDefault();return}}}select(){if(this.rootMenu.cancelDelayedOperation(),this.type==="submenu"){this.openSubmenu();return}this.active=!1,setTimeout(()=>{this.active=!0,setTimeout(()=>{this.active=!1,this.rootMenu.hide(),this.dispatchSelect()},d0)},d0)}openSubmenu(e){var t;if(this.type!=="submenu"||!this.element)return;if((t=e==null?void 0:e.withDelay)!=null&&t){this.rootMenu.scheduleOperation(()=>this.openSubmenu());return}let i=this.element.getBoundingClientRect(),r=bp(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:u0(i,"trailing",r),y:i.top-4},alternateLocation:{x:u0(i,"leading",r),y:i.top-4}})}movingTowardSubmenu(e){if(!this.element||this.type!=="submenu")return!1;let t=this.rootMenu.lastMoveEvent;if(!t)return!1;let i=e.timeStamp-t.timeStamp;if(i>500)return!1;let r=e.clientX-t.clientX;if(Jg(r,t.clientY-e.clientY,i)<=.2)return!1;let a="right";if(this.submenu.element){let n=this.submenu.element.getBoundingClientRect(),o=this.element.getBoundingClientRect();n.left<o.left+o.width/2&&(a="left")}return a==="right"?r>0:r<0}};function Jg(e,t,i){return Math.hypot(e,t)/i}function yi(e,t){return e===void 0||typeof e!="function"?e:(t!=null||(t={alt:!1,control:!1,shift:!1,meta:!1}),e(t))}var vp=class Zr{constructor(t,i){this._element=null,this._activeMenuItem=null,this._dirty=!0;var r,a;this.parentMenu=(r=i==null?void 0:i.parentMenu)!=null?r:null,this._submenuClass=i==null?void 0:i.submenuClass,this.columnCount=(a=i==null?void 0:i.columnCount)!=null?a:1,this.isSubmenuOpen=!1,this.menuItems=t}get children(){return Object.freeze([...this._menuItems])}set menuItems(t){let i=this.parentMenu;this.dispose(),this.parentMenu=i,t=[...t],this._menuItems=t.map(r=>r.onCreate?r.onCreate(r,this):new yp(r,this)),this.hasCheck=void 0,this.dirty=!0}dispose(){var t;this.hide(),this._element&&this._element.remove(),this._abortController&&this._abortController.abort(),(t=this._menuItems)==null||t.forEach(i=>i.dispose()),this._menuItems=[],this._activeMenuItem=null,this.parentMenu=null}handleEvent(t){if(t.type==="wheel"&&this._element){let i=t;this._element.scrollBy(0,i.deltaY),t.stopPropagation()}}dispatchEvent(t){return this.rootMenu.dispatchEvent(t)}get host(){return this.rootMenu.host}get rootMenu(){return this.parentMenu.rootMenu}updateState(t){var i,r,a;this._menuItems.forEach(u=>u.updateState(t));let n=this.hasCheck;this.hasCheck=this._menuItems.some(u=>u.visible&&u.hasCheck),this.hasCheck!==n&&this._menuItems.forEach(u=>u.updateState(t));let o,l=0;for(let u of this._menuItems)u.type==="heading"?(o&&l===0&&(o.visible=!1),o=u,l=0):u.type==="divider"&&o?(o.visible=l>0,o=void 0,l=0):o&&u.visible&&(l+=1);o&&(o.visible=l>0);let s=!0;for(let u of this._menuItems)u.type==="divider"?(u.visible=!s,s=!0):u.visible&&(s=!1);(i=this.activeMenuItem)!=null&&i.visible||(this.activeMenuItem=null),!((r=this.activeMenuItem)!=null&&r.enabled)&&((a=this.activeMenuItem)==null?void 0:a.type)==="submenu"&&this._activeMenuItem.submenu.hide(),this._dirty=!1}get enabled(){return this.updateIfDirty(),this._menuItems.some(t=>t.type!=="divider"&&t.visible&&t.enabled)}get visible(){return this.updateIfDirty(),this._menuItems.some(t=>t.type!=="divider"&&t.visible)}set dirty(t){this._dirty!==t&&t&&this.parentMenu&&(this._dirty=!0,this.parentMenu.dirty=!0)}updateIfDirty(){this._dirty&&this.updateState(this.rootMenu.modifiers)}updateElement(){var t;if(this._element){this._element.textContent="";for(let{element:i,visible:r}of this._menuItems)i&&r&&this._element.append(i);(t=this._element.querySelector("li:first-of-type"))==null||t.setAttribute("tabindex","0")}}get element(){if(this._element)return this._element;let t=document.createElement("menu");t.setAttribute("role","menu"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-orientation","vertical"),t.setAttribute("part","ui-menu-container"),this._submenuClass&&t.classList.add(this._submenuClass),t.classList.add("ui-menu-container"),this._abortController||(this._abortController=new AbortController);let i=this._abortController.signal;return t.addEventListener("focus",this,{signal:i}),t.addEventListener("wheel",this,{passive:!0,signal:i}),this._element=t,this.updateElement(),t}get activeMenuItem(){return this._activeMenuItem}set activeMenuItem(t){var i,r,a,n;if(this.rootMenu.cancelDelayedOperation(),t!==this._activeMenuItem){if(this.activeMenuItem){let o=this.activeMenuItem;o.active=!1,(i=o.submenu)==null||i.hide()}if(!((r=t==null?void 0:t.visible)==null||r)){this._activeMenuItem=null;return}this._activeMenuItem=t,t&&(t.active=!0)}t?(a=t.element)==null||a.focus({preventScroll:!0}):(n=this._element)==null||n.focus({preventScroll:!0})}get firstMenuItem(){this.updateIfDirty();let t=0,i=!1,r=this._menuItems;for(;!i&&t<=r.length-1;){let a=r[t];i=a.type!=="divider"&&a.visible&&a.enabled,t+=1}return i?r[t-1]:null}get lastMenuItem(){this.updateIfDirty();let t=this._menuItems,i=t.length-1,r=!1;for(;!r&&i>=0;){let a=t[i];r=a.type!=="divider"&&a.visible&&a.enabled,i-=1}return r?t[i+1]:null}nextMenuItem(t){if(t===0)return this._activeMenuItem;if(!this._activeMenuItem)return t>0?this.firstMenuItem:this.lastMenuItem;if(!this.firstMenuItem||!this.lastMenuItem||!this._activeMenuItem)return null;this.updateIfDirty();let i=this._menuItems.indexOf(this.firstMenuItem),r=this._menuItems.indexOf(this.lastMenuItem),a=this._menuItems.indexOf(this._activeMenuItem),n=1;for(;a>=i&&a<=r;){a+=t>0?1:-1;let o=this._menuItems[a];if(!o)break;if(o.visible&&o.enabled){if(n===Math.abs(t))return this._menuItems[a];n+=1}}return t>0?this.lastMenuItem:this.firstMenuItem}getMenuItemColumn(t){this.updateIfDirty();let i=this._menuItems.filter(r=>r.visible&&r.enabled).indexOf(t);return i<0?-1:i%this.columnCount}static get collator(){return Zr._collator||(Zr._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),Zr._collator}findMenuItem(t){var i;this.updateIfDirty();let r=this._menuItems.filter(l=>l.type!=="divider"&&l.visible&&l.enabled);if(r.length===0)return null;let a=Math.max(...r.map(l=>l.label.length))-t.length;if(a<0)return null;let n=null,o=0;for(;o<a&&!n;)n=(i=r.find(l=>Zr.collator.compare(t,l.label.substring(o,t.length))===0))!=null?i:null,o++;return n}show(t){return!this.visible||!t.container?!1:(this.updateElement(),t.container.appendChild(this.element),Os()&&(this.element.popover="manual",this.element.showPopover()),t.location&&Wg(this.element,{location:t.location,alternateLocation:t.alternateLocation,verticalPos:"bottom",horizontalPos:"start"}),h0(),this.element.focus({preventScroll:!0}),p0(),this.parentMenu&&(this.parentMenu.openSubmenu=this),!0)}hide(){var t,i,r,a,n,o;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),!(!((t=this._element)!=null&&t.isConnected)||!this._element.parentElement)&&(Os()&&(i=this._element)!=null&&i.popover&&this._element.hidePopover(),h0(),(a=(r=this.parentMenu)==null?void 0:r.element)==null||a.focus(),(o=(n=this._element)==null?void 0:n.parentNode)==null||o.removeChild(this._element),p0())}set openSubmenu(t){var i,r,a,n;let o=t!==null;((i=this.activeMenuItem)==null?void 0:i.type)==="submenu"&&((r=this.activeMenuItem.element)==null||r.setAttribute("aria-expanded",o.toString())),(n=(a=this.activeMenuItem)==null?void 0:a.element)==null||n.classList.toggle("is-submenu-open",o),this.isSubmenuOpen=o}};function h0(){document.addEventListener("focusin",Qt,!0),document.addEventListener("focusout",Qt,!0),document.addEventListener("focus",Qt,!0),document.addEventListener("blur",Qt,!0)}function Qt(e){e.stopImmediatePropagation(),e.preventDefault()}function p0(){document.removeEventListener("focusin",Qt,!0),document.removeEventListener("focusout",Qt,!0),document.removeEventListener("focus",Qt,!0),document.removeEventListener("blur",Qt,!0)}var xp=class _p extends vp{constructor(t,i){var r;super(t),this.state="closed",this.typingBufferResetTimer=0,this.hysteresisTimer=0,this._updating=!1,this._host=(r=i==null?void 0:i.host)!=null?r:null,this.isDynamic=t.some(wp),this._modifiers={shift:!1,control:!1,alt:!1,meta:!1},this.typingBuffer="",this.state="closed"}get modifiers(){return this._modifiers}set modifiers(t){i1(this._modifiers,t)||(this._modifiers=t,this.dirty=!0)}get activeSubmenu(){let t=this;for(;t.isSubmenuOpen;)t=t.activeMenuItem.submenu;return t}set dirty(t){this._updating||this._dirty!==t&&(this._dirty=!0,t&&setTimeout(()=>{this.updateState(this.modifiers),this.updateElement()}))}updateState(t){this._updating=!0,this.modifiers=t??this.modifiers,super.updateState(this.modifiers),this._updating=!1}handleKeyupEvent(t){this.isDynamic&&(this.modifiers=Li(t)),t.stopImmediatePropagation()}handleKeydownEvent(t){var i,r,a;if(t.key==="Tab"||t.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=Li(t));let n=!0,o=this.activeSubmenu,l=o.activeMenuItem;switch(t.key){case" ":case"Space":case"Return":case"Enter":l==null||l.select(Li(t));break;case"ArrowRight":if((l==null?void 0:l.type)==="submenu")l.select(Li(t)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!l)o.activeMenuItem=o.firstMenuItem;else{let s=(i=o.getMenuItemColumn(l))!=null?i:-1;if(s>=0&&s<((r=o.columnCount)!=null?r:1)-1){let u=o.nextMenuItem(1);u&&(o.activeMenuItem=u)}}break;case"ArrowLeft":if(o===this.rootMenu)l||(o.activeMenuItem=o.firstMenuItem);else if((l&&(a=o.getMenuItemColumn(l))!=null?a:-1)<=0||!l){o.hide();let s=o.parentMenu.activeMenuItem;if(s){let{element:u}=s;u==null||u.focus(),u==null||u.classList.remove("is-submenu-open")}}else{let s=o.nextMenuItem(-1);s&&(o.activeMenuItem=s)}break;case"ArrowDown":o.activeMenuItem=o.nextMenuItem(o.columnCount);break;case"ArrowUp":o.activeMenuItem=o.nextMenuItem(-o.columnCount);break;case"Home":case"PageUp":o.activeMenuItem=o.firstMenuItem;break;case"End":case"PageDown":o.activeMenuItem=o.lastMenuItem;break;case"Backspace":if(this.typingBuffer&&(this.typingBuffer=this.typingBuffer.slice(0,-1),this.typingBuffer)){clearTimeout(this.typingBufferResetTimer);let s=o.findMenuItem(this.typingBuffer);s&&(o.activeMenuItem=s),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(da(t)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=t.key;let s=o.findMenuItem(this.typingBuffer);s&&(o.activeMenuItem=s),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}else n=!1}n&&(t.preventDefault(),t.stopPropagation())}handleEvent(t){if(t.type==="keydown")this.handleKeydownEvent(t);else if(t.type==="keyup")this.handleKeyupEvent(t);else if(t.type==="pointermove")this.lastMoveEvent=t;else if(t.type==="pointerup")Number.isFinite(this.rootMenu._openTimestamp)&&Date.now()-this.rootMenu._openTimestamp<120?this.state="modal":this.state==="modal"&&t.target===this.scrim&&this.hide();else if(t.type==="contextmenu"){t.preventDefault(),t.stopPropagation();return}super.handleEvent(t)}dispatchEvent(t){return this._host?this._host.dispatchEvent(t):!0}get host(){return this._host}get scrim(){return Qe.element}connectScrim(t){let i=this.scrim;i.addEventListener("pointerup",this,!0),i.addEventListener("contextmenu",this),i.addEventListener("keydown",this),i.addEventListener("keyup",this),i.addEventListener("pointermove",this),Qe.open({root:t,onDismiss:()=>this.hide()})}disconnectScrim(){let t=this.scrim;t.removeEventListener("pointerup",this,!0),t.removeEventListener("contextmenu",this),t.removeEventListener("keydown",this),t.removeEventListener("keyup",this),t.removeEventListener("pointermove",this),Qe.state==="open"&&Qe.scrim.close()}get rootMenu(){return this}show(t){return this._onDismiss=t==null?void 0:t.onDismiss,t!=null&&t.modifiers&&(this.modifiers=t.modifiers),this.updateState(),this.connectScrim(t==null?void 0:t.target),super.show(y(f({},t),{container:this.scrim}))?(this._openTimestamp=Date.now(),this.state="open",!0):(this.disconnectScrim(),!1)}hide(){this.cancelDelayedOperation(),this.state!==void 0&&(this.state!=="closed"&&(this.activeMenuItem=null,Qe.element.parentElement.focus(),super.hide(),this.state="closed",this.disconnectScrim()),this._onDismiss&&(this._onDismiss(),this._onDismiss=void 0))}scheduleOperation(t){this.cancelDelayedOperation();let i=_p.SUBMENU_DELAY;if(i<=0){t();return}this.hysteresisTimer=setTimeout(()=>{this.hysteresisTimer=0,t()},i)}cancelDelayedOperation(){this.hysteresisTimer&&(clearTimeout(this.hysteresisTimer),this.hysteresisTimer=0)}};xp.SUBMENU_DELAY=120;var m0=xp;function wp(e){return is(e)?!1:typeof e.label=="function"||typeof e.ariaLabel=="function"||typeof e.tooltip=="function"||(_t(e)||hr(e))&&(typeof e.enabled=="function"||typeof e.visible=="function")||_t(e)&&typeof e.checked=="function"?!0:hr(e)?e.submenu.some(wp):!1}var lo=class{};lo.DELAY=300,lo.MAX_DISTANCE=10;function Xg(e){return new Promise((t,i)=>{let r=Qn(e);r||t(!1);let a=r,n=setTimeout(()=>{o.abort(),t(Ug(a,r)<lo.MAX_DISTANCE)},lo.DELAY),o=new AbortController,l=o.signal;for(let s of["pointermove","pointerup","pointercancel"])window.addEventListener(s,u=>{if(u.type==="pointerup"||u.type==="pointercancel")clearTimeout(n),o.abort(),t(!1);else if(u.type==="pointermove"){let c=Qn(u);c&&(a=c)}},{passive:!0,signal:l})})}async function f0(e,t,i){if(e.defaultPrevented)return!1;if(e.type==="contextmenu"){let r=e;if(e.preventDefault(),e.stopPropagation(),i.show({target:t,location:Qn(r),modifiers:Li(r)}))return!0}if(e.type==="keydown"){let r=e;if(r.code==="ContextMenu"||r.code==="F10"&&r.shiftKey){let a=t==null?void 0:t.getBoundingClientRect();if(g0(t)&&a&&i.show({target:t,location:{x:Math.ceil(a.left+a.width/2),y:Math.ceil(a.top+a.height/2)},modifiers:Li(r)}))return e.preventDefault(),e.stopPropagation(),!0}}if(e.type==="pointerdown"&&e.pointerType!=="mouse"&&e.button===0){let r=e.target;for(;r&&t!==r;)r=r.parentNode;if(!r||!i.visible)return!1;let a=Qn(e);if(await Xg(e))return i.state!=="closed"||!g0(t)?!1:(i.show({target:t,location:a}),!0)}return!1}function g0(e){return e.dispatchEvent(new Event("contextmenu",{cancelable:!0}))}var kp="<mo>&#x2061;</mo>",so="<mo>&#8290;</mo>";function Vn(e){return e.replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function G(e,t){return!e||!t.generateID?"":` extid="${e}"`}function Gg(e,t,i){var r,a,n,o,l,s,u,c;let d=!1;t=t??e.atoms.length;let h="",p="",m=e.atoms[e.index],g=(r=m.style)==null?void 0:r.variant,v=(a=m.style)==null?void 0:a.variantStyle,b="";if(m.value&&(g||v)){let E=(n=Al(m.value,g,v))!=null?n:m.value;if(E!==m.value)return e.index+=1,h=`<mi${G(m.id,i)}>${E}</mi>`,ht(h,e,i)||(e.mathML+=h,e.lastType="mi"),!0;b=(o={upnormal:"normal",boldnormal:"bold",italicmain:"italic",bolditalicmain:"bold-italic","updouble-struck":"double-struck","double-struck":"double-struck",boldfraktur:"bold-fraktur",calligraphic:"script",upcalligraphic:"script",script:"script",boldscript:"bold-script",boldcalligraphic:"bold-script",fraktur:"fraktur","upsans-serif":"sans-serif","boldsans-serif":"bold-sans-serif","italicsans-serif":"sans-serif-italic","bolditalicsans-serif":"sans-serif-bold-italic",monospace:"monospace"}[(v??"")+(g??"")])!=null?o:"",b&&(b=` mathvariant="${b}"`)}let x={"\\exponentialE":"&#x02147;","\\imaginaryI":"&#x2148;","\\differentialD":"&#x2146;","\\capitalDifferentialD":"&#x2145;","\\alpha":"&#x03b1;","\\pi":"&#x03c0;","\\infty":"&#x221e;","\\forall":"&#x2200;","\\nexists":"&#x2204;","\\exists":"&#x2203;","\\hbar":"ℏ","\\cdotp":"⋅","\\ldots":"…","\\cdots":"⋯","\\ddots":"⋱","\\vdots":"⋮","\\ldotp":"."};if(m.command==="!")return e.index+=1,h="<mo>!</mo>",ht(h,e,i)||(e.mathML+=h,e.lastType="mo"),!0;if(x[m.command]){e.index+=1;let E=`<mi${G(m.id,i)}${b}>${x[m.command]}</mi>`;return(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mtext"||e.lastType==="fence")&&(E=so+E),ht(E,e,i)||(e.mathML+=E,e.lastType="mi"),!0}if(m.command==="\\operatorname")p=br(m.body),e.index+=1;else if(g||v)for(;e.index<t&&(m.type==="mord"||m.type==="macro")&&!m.isDigit()&&g===((s=(l=m.style)==null?void 0:l.variant)!=null?s:"")&&v===((c=(u=m.style)==null?void 0:u.variantStyle)!=null?c:"");)p+=br([m]),e.index+=1,m=e.atoms[e.index];
vendor: 4,425 bytes, line 3215
3215else(m.type==="mord"||m.type==="macro")&&!m.isDigit()&&(p+=br([m]),e.index+=1);if(p.length>0){d=!0,h=`<mi${b}>${p}</mi>`;let E=e.lastType;h.endsWith(">f</mi>")||h.endsWith(">g</mi>")?(h+=kp,e.lastType="applyfunction"):e.lastType=/^<mo>(.*)<\/mo>$/.test(h)?"mo":"mi",ht(h,e,i)||((E==="mi"||E==="mn"||E==="mtext"||E==="fence")&&(h=so+h),e.mathML+=h)}return d}function Mp(e){return e.index<e.atoms.length&&e.atoms[e.index].superscript&&e.atoms[e.index].type==="subsup"}function Sp(e){let t=-1,i=e.index,r=!1,a=!1;for(;i<e.atoms.length&&!r&&!a;){let n=e.atoms[i];r=!n.isDigit(),a=!r&&n.superscript!==void 0,i++}return a&&(t=i-1),t}function ht(e,t,i){var r;let a=t.atoms[t.index-1];if(!a)return!1;if(!a.superscript&&!a.subscript)if(((r=t.atoms[t.index])==null?void 0:r.type)==="subsup")a=t.atoms[t.index],t.index+=1;else return!1;let n=t.lastType;t.lastType="";let o=U(a.superscript,i);t.lastType="";let l=U(a.subscript,i);if(t.lastType=n,!o&&!l)return!1;let s="";return o&&l?s=`<msubsup>${e}${l}${o}</msubsup>`:o?s=`<msup>${e}${o}</msup>`:l&&(s=`<msub>${e}${l}</msub>`),t.mathML+=s,t.lastType="",!0}function Zg(e,t,i){t=t??e.atoms.length;let r=e.index,a="",n=Sp(e);for(n>=0&&n<t&&(t=n);e.index<t&&e.atoms[e.index].mode==="text";)a+=e.atoms[e.index].value?e.atoms[e.index].value:" ",e.index+=1;return a.length>0?(a=`<mtext ${G(e.atoms[r].id,i)}>${a}</mtext>`,n<0&&Mp(e)&&(n=e.index,e.index+=1),ht(a,e,i)||(e.mathML+=a,e.lastType="mtext"),!0):!1}function Yg(e,t,i){t=t??e.atoms.length;let r=e.index,a="",n=Sp(e);for(n>=0&&n<t&&(t=n);e.index<t&&e.atoms[e.index].isDigit();)a+=e.atoms[e.index].asDigit(),e.index+=1;return a.length<=0?!1:(a="<mn"+G(e.atoms[r].id,i)+">"+a+"</mn>",n<0&&Mp(e)&&(n=e.index,e.index+=1),ht(a,e,i)||(e.mathML+=a,e.lastType="mn"),!0)}function Qg(e,t,i){let r=!1;t=t??e.atoms.length;let a="",n="";if(e.index<t&&e.atoms[e.index].type==="mopen"){let o=!1,l=0,s=e.index,u=-1,c=s+1;for(;c<t&&!o;)e.atoms[c].type==="mopen"?l+=1:e.atoms[c].type==="mclose"&&(l-=1),l===-1&&(o=!0,u=c),c+=1;o&&(a="<mrow>",a+=Ti(e.atoms[s],i),a+=U(e.atoms,i,s+1,u),a+=Ti(e.atoms[u],i),a+="</mrow>",e.index=u+1,(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mfrac"||e.lastType==="fence")&&(e.mathML+=so),ht(a,e,i)&&(r=!0,e.lastType="",a=""),n="fence")}return a.length>0&&(r=!0,e.mathML+=a,e.lastType=n),r}function e4(e,t,i){let r=!1;t=t??e.atoms.length;let a="",n="",o=e.atoms[e.index];if(!o)return!1;let l={"\\ne":"&ne;","\\neq":"&ne;","\\pm":"&#177;","\\times":"&#215;","\\colon":":","\\vert":"|","\\Vert":"∥","\\mid":"∣","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lbrack":"[","\\rbrack":"]","\\lparen":"(","\\rparen":")","\\langle":"⟨","\\rangle":"⟩","\\lfloor":"⌊","\\rfloor":"⌋","\\lceil":"⌈","\\rceil":"⌉"};if(l[o.command]){e.index+=1;let s=`<mo${G(o.id,i)}>${l[o.command]}</mo>`;return ht(s,e,i)||(e.mathML+=s,e.lastType="mo"),!0}if(e.index<t&&(o.type==="mbin"||o.type==="mrel"))a+=rs(e.atoms[e.index],i),e.index+=1,n="mo";else if(e.index<t&&(o.type==="mop"||o.type==="operator"||o.type==="extensible-symbol")){if(o.subsupPlacement==="over-under"&&(o.superscript||o.subscript)){let s=Ti(o,i);return o.superscript&&o.subscript?(a+="<munderover>"+s,a+=U(o.subscript,i),a+=U(o.superscript,i),a+="</munderover>"):o.superscript?(a+="<mover>"+s,a+=U(o.superscript,i),a+="</mover>"):o.subscript&&(a+="<munder>"+s,a+=U(o.subscript,i),a+="</munder>"),e.mathML+=a,e.lastType="mo",e.index+=1,!0}{let s=e.atoms[e.index],u=s.value==="\\operatorname",c=u?'<mi class="MathML-Unit"'+G(s.id,i)+">"+br(s.value)+"</mi>":Ti(s,i);a+=c,!u&&!/^<mo>(.*)<\/mo>$/.test(c)?(a+=kp,n="applyfunction"):n=u?"mi":"mo"}(e.lastType==="mi"||e.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(a)&&(a=so+a),e.index+=1}return a.length>0&&(r=!0,ht(a,e,i)||(e.mathML+=a,e.lastType=n)),r}function U(e,t,i,r){t!=null||(t={});let a={atoms:[],index:i??0,mathML:"",lastType:""};if(typeof e=="number"||typeof e=="boolean")a.mathML=e.toString();else if(typeof e=="string")a.mathML=e;else if(e instanceof w)a.mathML=rs(e,t);else if(Array.isArray(e)){a.atoms=e;let n=0;for(r=r||(e?e.length:0);a.index<r;)if(Zg(a,r,t)||Yg(a,r,t)||Gg(a,r,t)||e4(a,r,t)||Qg(a,r,t))n+=1;else if(a.index<r){let o=rs(a.atoms[a.index],t);a.lastType==="mn"&&o.length>0&&a.atoms[a.index].type==="genfrac"&&(o="<mo>&#x2064;</mo>"+o),a.atoms[a.index].type==="genfrac"?a.lastType="mfrac":a.lastType="",a.index+=1,ht(o,a,t)?n+=1:o.length>0&&(a.mathML+=o,n+=1)}n>1&&(a.mathML="<mrow>
3215"+a.mathML+"</mrow>")}return a.mathML}function Ti(e,t){let i="",r=br(e.value);return r&&(i="<mo"+G(e.id,t)+">"+r+"</mo>"),i}function br(e){if(!e)return"";if(typeof e=="string")return Vn(e);if(!Array.isArray(e)&&typeof e.body=="string")return Vn(e.body);let t="";for(let i of e)typeof i.value=="string"&&(t+=i.value);return Vn(t)}function rs(e,t){var i,r,a,n,o,l,s,u,c,d,h,p,m,g,v,b,x,E,S,M,C,B,D;if(e.mode==="text")return`<mi${G(e.id,t)}>${e.value}</mi>`;let K={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",longleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",longrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",longrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xleftrightarrows:"⇄",xRightleftharpoons:"⇌",longRightleftharpoons:"⇌",xLeftrightharpoons:"⇋",longLeftrightharpoons:"⇋"},Y={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5},_="",$="",W,z,N,j,V,ee,{command:le}=e;if(e.command==="\\error")return`<merror${G(e.id,t)}>${U(e.body,t)}</merror>`;let me={"\\vert":"|","\\Vert":"∥","\\mid":"∣","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"⟨","\\rangle":"⟩","\\lfloor":"⌊","\\rfloor":"⌋","\\lceil":"⌈","\\rceil":"⌉"},pt={"\\vec":"&#x20d7;","\\acute":"&#x00b4;","\\grave":"&#x0060;","\\dot":"&#x02d9;","\\ddot":"&#x00a8;","\\tilde":"&#x007e;","\\bar":"&#x00af;","\\breve":"&#x02d8;","\\check":"&#x02c7;","\\hat":"&#x005e;"};switch(e.type){case"first":break;case"error":if(e.command==="\\\\")break;_=`<merror${G(e.id,t)}>${U(e.body,t)}</merror>`;break;case"group":case"root":_=U(e.body,t);break;case"array":let ae=e;if((ae.leftDelim&&ae.leftDelim!=="."||ae.rightDelim&&ae.rightDelim!==".")&&(_+="<mrow>",ae.leftDelim&&ae.leftDelim!=="."&&(_+=`<mo>${me[ae.leftDelim]||ae.leftDelim}</mo>`)),_+="<mtable",ae.colFormat){for(_+=' columnalign="',N=0;N<ae.colFormat.length;N++){let Ne=ae.colFormat[N];"align"in Ne&&(_+={l:"left",c:"center",r:"right"}[Ne.align]+" ")}_+='"'}for(_+=">",z=0;z<ae.rows.length;z++){for(_+="<mtr>",W=0;W<ae.rows[z].length;W++)_+="<mtd>"+U(ae.rows[z][W],t)+"</mtd>";_+="</mtr>"}_+="</mtable>",(ae.leftDelim&&ae.leftDelim!=="."||ae.rightDelim&&ae.rightDelim!==".")&&(ae.rightDelim&&ae.rightDelim!=="."&&(_+=`<mo>${me[ae.rightDelim]||ae.rightDelim}</mo>`),_+="</mrow>");break;case"genfrac":let ge=e;(ge.leftDelim||ge.rightDelim)&&(_+="<mrow>"),ge.leftDelim&&ge.leftDelim!=="."&&(_+="<mo"+G(e.id,t)+">"+(me[ge.leftDelim]||ge.leftDelim)+"</mo>"),ge.hasBarLine?(_+="<mfrac>",_+=U(e.above,t)||"<mi>&nbsp;</mi>",_+=U(e.below,t)||"<mi>&nbsp;</mi>",_+="</mfrac>"):(_+="<mtable"+G(e.id,t)+">",_+="<mtr>"+U(e.above,t)+"</mtr>",_+="<mtr>"+U(e.below,t)+"</mtr>",_+="</mtable>"),ge.rightDelim&&ge.rightDelim!=="."&&(_+="<mo"+G(e.id,t)+">"+(me[ge.rightDelim]||ge.rightDelim)+"</mo>"),(ge.leftDelim||ge.rightDelim)&&(_+="</mrow>");break;case"surd":e.hasEmptyBranch("above")?(_+="<msqrt"+G(e.id,t)+">",_+=U(e.body,t),_+="</msqrt>"):(_+="<mroot"+G(e.id,t)+">",_+=U(e.body,t),_+=U(e.above,t),_+="</mroot>");break;case"leftright":let oi=e,At=oi.leftDelim;_="<mrow>",At&&At!=="."&&(_+=`<mo${G(e.id,t)}>${(i=me[At])!=null?i:At}</mo>`),e.body&&(_+=U(e.body,t));let ka=oi.matchingRightDelim();ka&&ka!=="."&&(_+=`<mo${G(e.id,t)}>${(r=me[ka])!=null?r:ka}</mo>`),_+="</mrow>";break;case"sizeddelim":case"delim":_+=`<mo${G(e.id,t)}>${me[e.value]||e.value}</mo>`;break;case"accent":let Op=e;_+='<mover accent="true"'+G(e.id,t)+">",_+=U(e.body,t),_+="<mo>"+(pt[le]||Op.accent)+"</mo>",_+="</mover>";break;case"line":case"overlap":break;case"overunder":let Ke=e;V=e.above,j=e.below,(Ke.svgAbove||V)&&(Ke.svgBelow||j)?ee=e.body:V&&V.length>0?(ee=e.body,(n=(a=e.body)==null?void 0:a[0])!=null&&n.below?(j=e.body[0].below,ee=e.body[0].body):((l=(o=e.body)==null?void 0:o[0])==null?void 0:l.type)==="first"&&(u=(s=e.body)==null?void 0:s[1])!=null&&u.below&&(j=e.body[1].below,ee=e.body[1].body)):j&&j.length>0&&(ee=e.body,(d=(c=e.body)==null?void 0:c[0])!=null&&d.above?(V=e.body[0].above,ee=e.body[0].body):((p=(h=e.body)==null?void 0:h[0])==null?void 0:p.type)==="first"&&(g=(m=e.body)==null?void 0:m[1])!=null&&g.above&&(V=e.body[1].above,ee=e.body[1].body)),(Ke.svgAbove||V)&&(Ke.svgBelow||j)?(_+=`<munderover ${G(e.id,t)}>`,_+=(v=K[Ke.svgBody])!=null?v:U(ee,t),_+=(b=K[Ke.svgBelow])!=null?b:U(j,t),_+=(x=K[Ke.svgAbove])!=null?x:U(V,t),_+="</munderover>"):Ke.svgAbove||V?(_+=`<mover ${G(e.id,t)}>`+((E=K[Ke.svgBody])!=null?E:U(ee,t)),_+=(S=K[Ke.svgAbove])!=null?S:U(V,t),_+="</mover>"):(Ke.svgBelow||j)&&(_+=`<munder ${G(e.id,t)}>`+((M=K[Ke.svgBody])!=null?M:U(ee,t)),_+=(C=K[Ke.svgBelow])!=null?C:U(j,t),_+="</munder>");break;case"placeholder":_+="?";break;case"mord":{if(_=typeof e.value=="string"?e.value:le,_.length>0&&_.startsWith("\\"))typeof e.value=="string"&&e.value.charCodeAt(0)>255?_="&#x"+("000000"+e.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof e.value=="string"&&(_=e.value.charAt(0));else if(e.command==="\\char"){let Mo=(B=e.args)==null?void 0:B[0];if(Mo!==void 0&&"number"in Mo){let Ks=Mo.number;typeof Ks=="number"&&(_="&#x"+("000000"+Ks.toString(16)).slice(-4)+";")}}
vendor: 21,203 bytes, lines 3215-3216
3215else typeof e.value=="string"?_=e.value:(console.error("Did not expect this"),_="");let Ne=/\d/.test(_)?"mn":"mi";_=`<${Ne}${G(e.id,t)}>${Vn(_)}</${Ne}>`;break}case"mbin":case"mrel":case"minner":_=Ti(e,t);break;case"mpunct":_='<mo separator="true"'+G(e.id,t)+">"+le+"</mo>";break;case"mop":case"operator":case"extensible-symbol":e.value!=="​"&&(_="<mo"+G(e.id,t)+">",_+=le==="\\operatorname"?e.body:le||e.body,_+="</mo>");break;case"box":let zs=e;_='<menclose notation="box"',zs.backgroundcolor&&(_+=' mathbackground="'+zs.backgroundcolor+'"'),_+=G(e.id,t)+">"+U(e.body,t)+"</menclose>";break;case"spacing":_+='<mspace width="'+((D=Y[le])!=null?D:0)+'em"/>';break;case"enclose":let ko=e;_='<menclose notation="';for(let Ne in ko.notation)Object.prototype.hasOwnProperty.call(ko.notation,Ne)&&ko.notation[Ne]&&(_+=$+Ne,$=" ");_+=G(e.id,t)+'">'+U(e.body,t)+"</menclose>";break;case"prompt":_='<menclose notation="roundexbox""">'+U(e.body,t)+"</menclose>";break;case"space":_+="&nbsp;";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":_+=Ti(e,t);break;case"mclose":_+=Ti(e,t);break;case"macro":{let Ne=e.command+br(e.macroArgs);Ne&&(_+=`<mo ${G(e.id,t)}>${Ne}</mo>`)}break;case"latexgroup":_+=U(e.body,t);break;case"latex":_+="<mtext"+G(e.id,t)+">"+e.value+"</mtext>";break;case"tooltip":_+=U(e.body,t);break;case"text":_+=`<mtext ${G(e.id,t)}x>${e.value}</mtext>`;break;default:if(e.command==="\\displaystyle")return`<mrow ${G(e.id,t)} displaystyle="true">${U(e.body,t)}</mrow>`;if(e.command==="\\textstyle")return`<mrow ${G(e.id,t)} displaystyle="false">${U(e.body,t)}</mrow>`;console.info("Unexpected element in conversion to MathML:",e)}return _}var ir={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"imaginary eye ","\\imaginaryJ":"imaginary jay ","\\sum":"Summation ","\\prod":"Product ","+":"plus ","-":"minus ",";":'<break time="150ms"/> semi-colon <break time="150ms"/>',",":'<break time="150ms"/> comma  <break time="150ms"/>',"|":'<break time="150ms"/>Vertical bar<break time="150ms"/>',"(":'<break time="150ms"/>Open paren. <break time="150ms"/>',")":'<break time="150ms"/> Close paren. <break time="150ms"/>',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\pm":"plus or minus","\\mp":"minus or plus","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","\\ne":"is not equal to ","\\neq":"is not equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","​":"","−":"minus ",":":'<break time="150ms"/> such that <break time="200ms"/> ',"\\colon":'<break time="150ms"/> such that <break time="200ms"/> ',"\\hbar":"etch bar ","\\iff":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\Longleftrightarrow":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set <break time="150ms"/><say-as interpret-as="character">n</say-as>',"\\C":'the set <break time="150ms"/><say-as interpret-as="character">c</say-as>',"\\Z":'the set <break time="150ms"/><say-as interpret-as="character">z</say-as>',"\\Q":'the set <break time="150ms"/><say-as interpret-as="character">q</say-as>',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'<break time="150ms"/>open paren<break time="150ms"/>',"\\rparen":'<break time="150ms"/>close paren<break time="150ms"/>',"\\lbrace":'<break time="150ms"/>open brace<break time="150ms"/>',"\\{":'<break time="150ms"/>open brace<break time="150ms"/>',"\\rbrace":'<break time="150ms"/>close brace<break time="150ms"/>',"\\}":'<break time="150ms"/>close brace<break time="150ms"/>',"\\langle":'<break time="150ms"/>left angle bracket<break time="150ms"/>',"\\rangle":'<break time="150ms"/>right angle bracket<break time="150ms"/>',"\\lfloor":'<break time="150ms"/>open floor<break time="150ms"/>',"\\rfloor":'<break time="150ms"/>close floor<break time="150ms"/>',"\\lceil":'<break time="150ms"/>open ceiling<break time="150ms"/>',"\\rceil":'<break time="150ms"/>close ceiling<break time="150ms"/>',"\\vert":'<break time="150ms"/>vertical bar<break time="150ms"/>',"\\mvert":'<break time="150ms"/>divides<break time="150ms"/>',"\\lvert":'<break time="150ms"/>left vertical bar<break time="150ms"/>',"\\rvert":'<break time="150ms"/>right vertical bar<break time="150ms"/>',"\\lbrack":'<break time="150ms"/> open square bracket <break time="150ms"/>',"\\rbrack":'<break time="150ms"/> close square bracket <break time="150ms"/>',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"},_l={array:"array",matrix:"matrix",pmatrix:"parenthesis matrix",bmatrix:"square brackets matrix",Bmatrix:"braces matrix",vmatrix:"bars matrix",Vmatrix:"double bars matrix","matrix*":"matrix",smallmatrix:"small matrix"};function t4(e){let t="";return e.startsWith("\\")&&(t=" "+e.replace("\\","")+" "),t}function Hr(e){let t=0;if(ve(e))for(let i of e)i.type!=="first"&&(t+=1);return t===1}function i4(e){if(ve(e)){for(let t of e)if(t.type!=="first"&&t.id)return t.id.toString()}return""}function b0(e){let t="";if(ve(e))for(let i of e)i.type!=="first"&&typeof i.value=="string"&&(t+=i.value);return t}function r4(e){return e?e.map(t=>t.value).join(""):""}function Ln(e){if(e&&!e.some(t=>t.type!=="first"&&t.value===void 0))return e.map(t=>t.value).join("")}function as(e){return`<emphasis>${e}</emphasis>`}function a4(e,t){var i;let r="",a=!1,n=!1;for(let o=0;o<t.length;o++)t[o].type!=="first"&&(t[o].mode!=="text"&&(n=!1),o<t.length-2&&t[o].type==="mopen"&&t[o+2].type==="mclose"&&t[o+1].type==="mord"?(r+=" of ",r+=as(I(e,t[o+1])),o+=2):t[o].mode==="text"?n?r+=(i=t[o].value)!=null?i:" ":(n=!0,r+=I("text",t[o])):t[o].isDigit()?a?r+=t[o].asDigit():(a=!0,r+=I(e,t[o])):(a=!1,r+=I(e,t[o])));return r}function I(e,t){var i,r,a,n,o,l,s,u;function c(b){return globalThis.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(b)?` <say-as interpret-as="character">${b}</say-as>`:/[A-Z]/.test(b)?`capital <say-as interpret-as="character">${b.toLowerCase()}</say-as>`:b:/[a-z]/.test(b)?" '"+b.toUpperCase()+"'":/[A-Z]/.test(b)?" 'capital "+b.toUpperCase()+"'":b}if(!t)return"";if(ve(t))return a4(e,t);let d="";if(t.id&&e==="math"&&(d+='<mark name="'+t.id.toString()+'"/>'),t.mode==="text")return d+t.value;let h="",p="",m="",g=!1,{command:v}=t;switch(v){case"\\vec":return"vector "+I(e,t.body);case"\\acute":return I(e,t.body)+" acute";case"\\grave":return I(e,t.body)+" grave";case"\\dot":return"dot over"+I(e,t.body);case"\\ddot":return"double dot over"+I(e,t.body);case"\\mathring":return"ring over"+I(e,t.body);case"\\tilde":case"\\widetilde":return"tilde over"+I(e,t.body);case"\\bar":return I(e,t.body)+" bar";case"\\breve":return I(e,t.body)+" breve";case"\\check":case"\\widecheck":return"check over "+I(e,t.body);case"\\hat":case"\\widehat":return"hat over"+I(e,t.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+I(e,t.body);case"\\underarc":case"\\underparen":return"arc under "+I(e,t.body);case"\\mathop":return(i=Ln(t.body))!=null?i:I(e,t.body);case"\\mathit":return(r=Ln(t.body))!=null?r:I(e,t.body);case"\\mathrm":return(a=Ln(t.body))!=null?a:I(e,t.body);case"\\mathbb":return"blackboard"+((n=Ln(t.body))!=null?n:I(e,t.body))}switch(t.type){case"prompt":let b=t.body.length>1?'start input . <break time="500ms"/> '+I(e,t.body)+'. <break time="500ms"/> end input':"blank";d+=' <break time="300ms"/> '+b+'. <break time="700ms"/>'+((o=t.correctness)!=null?o:"")+' . <break time="700ms"/> ';break;case"array":let x=t.rows,E=t.environmentName;if(Object.keys(_l).includes(E)){d+=` begin ${_l[E]} `;for(let C=0;C<x.length;C++){C>0&&(d+=","),d+=` row ${C+1} `;for(let B=0;B<x[C].length;B++)B>0&&(d+=","),d+=` column ${B+1}: `,d+=I("math",x[C][B])}d+=` end ${_l[E]} `}break;case"group":v==="\\ne"?d+=" not equal ":(v==="\\not"&&(d+=" not "),d+=I("math",t.body));break;case"root":d+=I("math",t.body);break;case"genfrac":if(h=I("math",t.above),p=I("math",t.below),Hr(t.above)&&Hr(t.below)){let C={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[b0(t.above)+"/"+b0(t.below)];C?d=C:d+=h+" over "+p}else d+=' the fraction <break time="150ms"/>'+h+' over <break time="150ms"/>'+p+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(m=I("math",t.body),t.hasEmptyBranch("above"))d+=Hr(t.body)?" the square root of "+m+" , ":' the square root of <break time="200ms"/>'+m+'. <break time="200ms"/> End square root';else{let C=I("math",t.above);C=C.trim();let B=C.replace(/<mark([^/]*)\/>/g,"");B==="3"?d+=' the cube root of <break time="200ms"/>'+m+'. <break time="200ms"/> End cube root':B==="n"?d+=' the nth root of <break time="200ms"/>'+m+'. <break time="200ms"/> End root':d+=' the root with index: <break time="200ms"/>'+C+', of <break time="200ms"/>'+m+'. <break time="200ms"/> End root'}break;case"leftright":{let C=t;d+=(l=C.leftDelim?ir[C.leftDelim]:void 0)!=null?l:C.leftDelim,d+=I("math",t.body),d+=(s=C.rightDelim?ir[C.rightDelim]:void 0)!=null?s:C.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":let S=v.replace(/^\\/g,""),M=ms()[S];M!=null&&M.expand?d+=I("math",t.body):d+=`${S} `;break;case"placeholder":d+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(v==="\\mathbin"||v==="\\mathrel"||v==="\\mathopen"||v==="\\mathclose"||v==="\\mathpunct"||v==="\\mathord"||v==="\\mathinner"){d=I(e,t.body);break}let C=t.isDigit()?t.asDigit():t.value,B=t.command;if((t.type==="delim"||t.type==="sizeddelim")&&(B=t.value,C=B),e==="text")d+=C;else{if(t.type==="mbin"&&(d+='<break time="150ms"/>'),C){let D=ir[C]||(B?ir[B.trim()]:"");if(D)d+=" "+D;else{let K=B?t4(B.trim()):"";d+=K||c(C)}}else d+=I("math",t.body);t.type==="mbin"&&(d+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(t.value!=="​"){let C=t.command;if(C==="\\sum")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let B=I("math",t.superscript);B=B.trim();let D=I("math",t.subscript);D=D.trim(),d+=' the summation from <break time="200ms"/>'+D+'<break time="200ms"/> to  <break time="200ms"/>'+B+'<break time="200ms"/> of <break time="150ms"/>',g=!0}else if(t.hasEmptyBranch("subscript"))d+=" the summation of";else{let B=I("math",t.subscript);B=B.trim(),d+=' the summation from <break time="200ms"/>'+B+'<break time="200ms"/> of <break time="150ms"/>',g=!0}else if(C==="\\prod")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let B=I("math",t.superscript);B=B.trim();let D=I("math",t.subscript);D=D.trim(),d+=' the product from <break time="200ms"/>'+D+'<break time="200ms"/> to <break time="200ms"/>'+B+'<break time="200ms"/> of <break time="150ms"/>',g=!0}else if(t.hasEmptyBranch("subscript"))d+=" the product  of ";else{let B=I("math",t.subscript);B=B.trim(),d+=' the product from <break time="200ms"/>'+B+'<break time="200ms"/> of <break time="150ms"/>',g=!0}else if(C==="\\int")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let B=I("math",t.superscript);B=B.trim();let D=I("math",t.subscript);D=D.trim(),d+=' the integral from <break time="200ms"/>'+as(D)+'<break time="200ms"/> to <break time="200ms"/>'+as(B)+' <break time="200ms"/> of ',g=!0}else d+=' the integral of <break time="200ms"/> ';else if(C==="\\operatorname"||C==="\\operatorname*")d+=r4(t.body)+" ";else if(typeof t.value=="string"){let B=(u=ir[t.value])!=null?u:t.command?ir[t.command]:void 0;d+=B||" "+t.value}else t.command&&(t.command==="\\mathop"?d+=I("math",t.body):d+=t.command.startsWith("\\")?" "+t.command.slice(1):" "+t.command)}break;case"enclose":m=I("math",t.body),d+=" crossed out "+m+". End crossed out.";break}if(!g&&!t.hasEmptyBranch("superscript")){let b=I(e,t.superscript);b=b.trim();let x=b.replace(/<[^>]*>/g,"");if(Hr(t.superscript)){if(e==="math"){let E=i4(t.superscript);E&&(d+='<mark name="'+E+'"/>')}x==="′"?d+=" prime ":x==="2"?d+=" squared ":x==="3"?d+=" cubed ":Number.isNaN(Number.parseInt(x))?d+=" to the "+b+"; ":d+=' to the <say-as interpret-as="ordinal">'+x+"</say-as> power; "}else Number.isNaN(Number.parseInt(x))?d+=" raised to the "+b+"; ":d+=' raised to the <say-as interpret-as="ordinal">'+x+"</say-as> power; "}if(!g&&!t.hasEmptyBranch("subscript")){let b=I("math",t.subscript);b=b.trim(),d+=Hr(t.subscript)?" sub "+b:" subscript "+b+". End subscript. "}return d}function Fi(e){var t,i;let r=globalThis.MathfieldElement;if(r.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){let n=U(e);if(n){r.textToSpeechMarkup&&(r.textToSpeechRulesOptions=(t=r.textToSpeechRulesOptions)!=null?t:{},r.textToSpeechRulesOptions=y(f({},r.textToSpeechRulesOptions),{markup:r.textToSpeechMarkup}),r.textToSpeechRulesOptions.markup==="ssml"&&(r.textToSpeechRulesOptions=y(f({},r.textToSpeechRulesOptions),{markup:"ssml_step"})),r.textToSpeechRulesOptions=y(f({},r.textToSpeechRulesOptions),{rate:r.speechEngineRate}));let o=(i=window.SRE)!=null?i:globalThis.sre.System.getInstance();r.textToSpeechRulesOptions&&o.setupEngine(r.textToSpeechRulesOptions);let l="";try{l=o.toSpeech(n)}catch(s){console.error("MathLive 0.108.3: `SRE.toSpeech()` runtime error",s)}return l}return""}let a=I("math",e);if(r.textToSpeechMarkup==="ssml"){let n="";r.speechEngineRate&&(n='<prosody rate="'+r.speechEngineRate+'">'),a='<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><amazon:auto-breaths>'+n+"<p><s>"+a+"</s></p>"+(n?"</prosody>":"")+"</amazon:auto-breaths></speak>"}else r.textToSpeechMarkup==="mac"&&kr()==="macos"?a=a.replace(/<mark([^/]*)\/>/g,"").replace(/<emphasis>/g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(/<break time="(\d*)ms"\/>/g,"[[slc $1]]").replace(/<say-as[^>]*>/g,"").replace(/<\/say-as>/g,""):a=a.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return a}var lt={"\\ne":"≠","\\neq":"≠","−":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega","\\exponentialE":"e","\\imaginaryI":"i","\\imaginaryJ":"j","\\!":" ","\\,":" ","\\:":" ","\\>":" ","\\;":" ","\\enskip":" ","\\enspace":" ","\\qquad":" ","\\quad":" ","\\infty":"oo","\\R":"RR","\\mathbb{R}":"RR","\\N":"NN","\\mathbb{N}":"NN","\\Z":"ZZ","\\mathbb{Z}":"ZZ","\\Q":"QQ","\\mathbb{Q}":"QQ","\\C":"CC","\\mathbb{C}":"CC","\\emptyset":"O/","\\varnothing":"O/","\\varDelta":"Delta","\\varTheta":"Theta","\\varLambda":"Lambda","\\varXi":"Xi","\\varPi":"Pi","\\varSigma":"Sigma","\\varUpsilon":"Upsilon","\\varPhi":"Phi","\\varPsi":"Psi","\\varOmega":"Omega"},Wr={"\\pm":"+-","\\colon":" : ","\\sum":" sum ","\\prod":" prod ","\\bigcap":" nnn ","\\bigcup":" uuu ","\\int":" int ","\\oint":" oint ","\\ge":">=","\\le":"<=","\\ne":"!=","\\neq":"!=","\\lt":"<","\\gt":">","\\gets":"<-","\\to":"->","\\land":" and ","\\lor":" or ","\\lnot":" not ","\\forall":" AA ","\\exists":" EE ","\\in":" in ","\\notin":" !in ","\\mapsto":"|->","\\implies":"=>","\\iff":"<=>","\\cdot":" * ","\\ast":" ** ","\\star":" *** ","\\times":" * ","\\div":" -: ","\\ltimes":" |>< ","\\rtimes":" ><| ","\\bowtie":" |><| ","\\circ":"@"},Dn={"\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrack":"[","\\rbrack":"]","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)"};function n4(e){let t="";for(let i of e){let r=t[t.length-1];r!==void 0&&(/\d$/.test(r)&&/^\d/.test(i)||/[a-zA-Z]$/.test(r)&&/^[a-zA-Z]/.test(i))&&(t+=" "),t+=i}return t}function oe(e,t){var i,r,a,n,o,l,s,u,c,d,h,p,m,g,v,b,x,E,S;if(!e)return"";if(ve(e)){if(e.length===0)return"";if(e[0].mode==="latex")return e.map(_=>oe(_)).join("");if(e[0].mode==="text"){let _=0,$="";for(;((i=e[_])==null?void 0:i.mode)==="text";)$+=e[_].body?oe(e[_].body,t):e[_].value,_++;return t!=null&&t.plain?$+oe(e.slice(_),t):`"${$}" ${oe(e.slice(_))}`}let K=0,Y=[];for(;((r=e[K])==null?void 0:r.mode)==="math";){let _="";for(;((a=e[K])==null?void 0:a.type)==="mord"&&/\d/.test(e[K].value);)_+=e[K++].value;_?Y.push(_):Y.push(oe(e[K++],t))}return Y.push(oe(e.slice(K),t)),n4(Y)}if(e.mode==="text")return t!=null&&t.plain?e.value:`"${e.value}"`;let M="",{command:C}=e,B;if(C==="\\placeholder")return`(${oe(e.body,t)})`;let D=w.serialize([e],{expandMacro:!1,defaultMode:"math"});switch(e.type){case"accent":let K={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[C];M=`${K??""} ${oe(e.body,t)} `;break;case"first":return"";case"latexgroup":return e.body.map(_=>_.value).join("");case"group":case"root":M=(n=lt[C])!=null?n:oe(e.body,t);break;case"genfrac":{let _=e;(_.leftDelim||_.rightDelim)&&(M=_.leftDelim==="."||!_.leftDelim?"{:":_.leftDelim),_.hasBarLine?(M+="(",M+=oe(_.above,t),M+=")/(",M+=oe(_.below,t),M+=")"):(M+="((",M+=oe(_.above,t),M+=") choose (",M+=oe(_.below,t),M+="))"),(_.leftDelim||_.rightDelim)&&(M+=_.rightDelim==="."||!_.rightDelim?"{:":_.rightDelim)}break;case"surd":e.hasEmptyBranch("above")?M+=`sqrt(${oe(e.body,t)})`:M+=`root(${oe(e.above,t)})(${oe(e.body,t)})`;break;case"latex":M=e.value;break;case"leftright":{let _=e,$=_.leftDelim;$&&Dn[$]&&($=Dn[$]),M+=$==="."||!$?"{:":$,M+=oe(_.body,t);let W=_.matchingRightDelim();W&&Dn[W]&&(W=Dn[W]),M+=W==="."||!W?":}":W}break;case"sizeddelim":case"delim":M=e.value;break;case"overlap":break;case"overunder":break;case"mord":if(lt[D])return lt[D];M=(s=(l=(o=lt[C])!=null?o:C)!=null?l:C)!=null?s:typeof e.value=="string"?e.value:"",M.startsWith("\\")&&(M+=" "),B=C?C.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,B?M=String.fromCodePoint(Number.parseInt("0x"+B[1])):M.length>0&&M.startsWith("\\")&&(M=typeof e.value=="string"?e.value.charAt(0):e.command),M=o4(M,e.style);break;case"mbin":case"mrel":case"minner":M=(d=(c=(u=lt[D])!=null?u:lt[C])!=null?c:Wr[C])!=null?d:e.value;break;case"mopen":case"mclose":M=e.value;break;case"mpunct":M=(h=Wr[C])!=null?h:C;break;case"mop":case"operator":case"extensible-symbol":e.value!=="​"&&(Wr[C]?M=Wr[C]:M=C==="\\operatorname"?oe(e.body,t):(p=e.value)!=null?p:C,M+=" ");break;case"array":let Y=e.environmentName;if(e.isMultiline)M=e.rows.map(_=>_.map($=>oe($,t)).join("")).join(`
3216`);else{let _=(m={bmatrix:["[","]"],"bmatrix*":["[","]"]}[Y])!=null?m:["(",")"],$=[],W=e.rows;for(let N of W){let j=[];for(let V of N)j.push(oe(V,t));$.push(_[0]+j.join(",")+_[1])}let z=(g={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[Y])!=null?g:["(",")"];M=z[0]+$.join(",")+z[1]}break;case"box":break;case"spacing":M=(b=(v=lt[D])!=null?v:lt[C])!=null?b:" ";break;case"enclose":M="("+oe(e.body,t)+")";break;case"space":M=" ";break;case"subsup":M="";break;case"macro":M=(S=(E=(x=lt[D])!=null?x:lt[C])!=null?E:Wr[C])!=null?S:oe(e.body,t);break}if(!e.hasEmptyBranch("subscript")){M+="_";let K=oe(e.subscript,t);M+=K.length!==1?`(${K})`:K}if(!e.hasEmptyBranch("superscript")){M+="^";let K=oe(e.superscript,t);M+=K.length!==1?`(${K})`:K}return M}function o4(e,t){if(!t)return e;let i=e;return t.variant==="double-struck"&&(i=`bbb "${i}"`),t.variant==="script"&&(i=`cc "${i}"`),t.variant==="fraktur"&&(i=`fr "${i}"`),t.variant==="sans-serif"&&(i=`sf "${i}"`),t.variant==="monospace"&&(i=`tt "${i}"`),t.variantStyle==="bold"&&(i=`bb "${i}"`),t.color?`color({${t.color}})(${i})`:i}function he(e,t){var i;let r=y(f({},vs()),{renderPlaceholder:()=>new A(160,{maxFontSize:1})});if(t!=null&&t.letterShapeStyle&&(t==null?void 0:t.letterShapeStyle)!=="auto"&&(r.letterShapeStyle=t.letterShapeStyle),t!=null&&t.macros){let u=fs(t==null?void 0:t.macros);r.getMacro=c=>gs(c,u)}t!=null&&t.registers&&(r.registers=f(f({},r.registers),t.registers));let a=(i=t==null?void 0:t.defaultMode)!=null?i:"math",n="math",o="displaystyle";a==="inline-math"?o="textstyle":a==="math"?o="displaystyle":a==="text"&&(o="textstyle",n="text");let l=new H({from:r}),s=new w({type:"root",mode:n,body:De(e,{context:l,parseMode:n,mathstyle:o})}).render(l);return s?(co(va(s,l)),ho(s,{classes:"ML__latex"}).toMarkup()):""}
vendor: 26,585 bytes, lines 3216-3221
3216function ib(e){return Dh(e,{context:vs()})}function Cp(e,t={}){return U(De(e,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),t)}function Lp(e){let t=De(e,{parseMode:"math",mathstyle:"displaystyle"});return Fi(t)}var En;function Dp(e){var t,i;if(!En){let r=(t=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;r?En=new r:console.error(`MathLive 0.108.3: The CortexJS Compute Engine library is not available.
3217        
3218        Load the library, for example with:
3219        
3220        import "https://esm.run/@cortex-js/compute-engine"`)}return(i=En==null?void 0:En.box(e).latex)!=null?i:""}function rb(e,t="math"){return oe(new w({type:"root",body:De(e,{parseMode:t})}))}function l4(e){return ua(e,{format:"ascii-math"})[1]}function ns(e){if(typeof e=="string"){let t=s4(e);if(!t)throw new Error(`Invalid color: ${e}`);return t}return"C"in e?c4(e):"a"in e?Ep(e):e}function yr(e){return e<0?0:e>255?255:Math.round(e)}function s4(e){if(!e||e[0]!=="#")return;e=e.slice(1);let t;return e.length<=4?(t={r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)},e.length===4&&(t.a=parseInt(e[3]+e[3],16)/255)):(t={r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16)},e.length===8&&(t.a=parseInt(e[6]+e[7],16)/255)),typeof(t==null?void 0:t.a)>"u"&&(t.a=1),t}function os(e){let[t,i,r]=[e.L,e.C,e.H],a=r*Math.PI/180,n={L:t,a:i*Math.cos(a),b:i*Math.sin(a)};return e.alpha!==void 0&&(n.alpha=e.alpha),n}function u4(e){let[t,i,r]=[e.L,e.a,e.b],a=Math.sqrt(i*i+r*r),n=Math.atan2(r,i)*180/Math.PI,o={L:t,C:a,H:n};return e.alpha!==void 0&&(o.alpha=e.alpha),o}function wl(e){let[t,i,r]=[e.L,e.a,e.b],a=Math.pow(.9999999984505198*t+.39633779217376786*i+.2158037580607588*r,3),n=Math.pow(1.00000000888176*t-.10556134232365635*i-.0638541747717059*r,3),o=Math.pow(t*1.000000054672411-.0894841820949657*i-1.2914855378640917*r,3),l=4.076741661347994*a-3.307711590408193*n+.230969928729428*o,s=-1.2684380040921763*a+2.6097574006633715*n-.3413193963102197*o,u=-.004196086541837188*a-.7034186144594493*n+1.7076147009309444*o,c=d=>{let h=Math.abs(d);return h<=.0031308?d*12.92:(Math.sign(d)||1)*(1.055*Math.pow(h,1/2.4)-.055)};return[c(l),c(s),c(u)]}function kl(e){let[t,i,r]=e;return t>=0&&t<=1&&i>=0&&i<=1&&r>=0&&r<=1}function Ml(e,t){let[i,r,a]=e;return i=yr(i*255),r=yr(r*255),a=yr(a*255),t!==void 0?{r:i,g:r,b:a,alpha:t}:{r:i,g:r,b:a}}function Ep(e){let[t,i,r]=wl(e);if(kl([t,i,r]))return Ml([t,i,r],e.alpha);let a=u4(e);if(a.C=0,[t,i,r]=wl(os(a)),!kl([t,i,r]))return Ml([t,i,r],e.alpha);let n=0,o=e.L,l=(n+o)/2;a.C=l;let s=.36/Math.pow(2,12);for(;o-n>s;)l=(n+o)/2,a.C=l,[t,i,r]=wl(os(a)),kl([t,i,r])?n=l:o=l;return Ml([t,i,r],e.alpha)}function c4(e){return Ep(os(e))}function y0(e,t){let i=ns(e),r=ns(t),a=.56,n=.57,o=.62,l=.65,s=.022,u=1.414,c=.1,d=5e-4,h=1.14,p=.027,m=1.14,g=.027;function v(B){return B>=s?B:B+(s-B)**u}function b(B){return(B<0?-1:1)*Math.pow(Math.abs(B),2.4)}let x=v(b(r.r/255)*.2126729+b(r.g/255)*.7151522+b(r.b/255)*.072175),E=v(b(i.r/255)*.2126729+b(i.g/255)*.7151522+b(i.b/255)*.072175),S,M,C;return Math.abs(E-x)<d?M=0:E>x?(S=E**a-x**n,M=S*h):(S=E**l-x**o,M=S*m),Math.abs(M)<c?C=0:M>0?C=M-g:C=M+p,C*100}function Bp(e,t,i){i!=null||(i="#fff"),t!=null||(t="#000");let r=y0(e,i),a=y0(e,t);return Math.abs(r)>Math.abs(a)?i:t}function d4(e){let t=ns(e),i=((1<<24)+(yr(t.r)<<16)+(yr(t.g)<<8)+yr(t.b)).toString(16).slice(1);return t.alpha!==void 0&&t.alpha<1&&(i+=("00"+Math.round(t.alpha*255).toString(16)).slice(-2)),i[0]===i[1]&&i[2]===i[3]&&i[4]===i[5]&&i[6]===i[7]&&(i=i[0]+i[2]+i[4]+(t.alpha!==void 0&&t.alpha<1?i[6]:"")),"#"+i}function te(e){let t=Ap(e),i="";for(let r of t){if(typeof r.value!="string")return"";i+=r.value}return i}function Ap(e){let t=e.model.selection.ranges;if(t.length!==1)return[];let i=e.model.getAtoms(t[0]);return i.length===1&&i[0].isRoot&&(i=i[0].children),i.filter(r=>r.type!=="first")}function h4(e,t){let i=Ap(e);if(i.length!==1)return!1;let r=jl[t];return r?!!r.test(i[0].value):!1}function p4(e){return[Cl(e,"double-struck","mathbb","tooltip.blackboard"),Cl(e,"fraktur","mathfrak","tooltip.fraktur"),Cl(e,"calligraphic","mathcal","tooltip.caligraphic"),Ll(e,"up","mathrm","tooltip.roman-upright"),Ll(e,"bold","bm","tooltip.bold"),Ll(e,"italic","mathit","tooltip.italic")]}function m4(e){return[{id:"accent-vec",class:"ML__center-menu",label:()=>he(`\\vec{${te(e)}}`),visible:()=>te(e).length===1,onMenuSelect:()=>e.insert("\\vec{#@}",{selectionMode:"item"})},{id:"accent-overrightarrow",class:"ML__center-menu",label:()=>he(`\\overrightarrow{${te(e)}}`),visible:()=>te(e).length>0,onMenuSelect:()=>e.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{id:"accent-overleftarrow",class:"ML__center-menu",label:()=>he(`\\overleftarrow{${te(e)}}`),visible:()=>te(e).length>0,onMenuSelect:()=>e.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{id:"accent-dot",class:"ML__center-menu",label:()=>he(`\\dot{${te(e)}}`),visible:()=>te(e).length===1,onMenuSelect:()=>e.insert("\\dot{#@}",{selectionMode:"item"})},{id:"accent-ddot",class:"ML__center-menu",label:()=>he(`\\ddot{${te(e)}}`),visible:()=>te(e).length===1,onMenuSelect:()=>e.insert("\\ddot{#@}",{selectionMode:"item"})},{id:"accent-bar",class:"ML__center-menu",label:()=>he(`\\bar{${te(e)}}`),visible:()=>te(e).length===1,onMenuSelect:()=>e.insert("\\bar{#@}",{selectionMode:"item"})},{id:"accent-overline",class:"ML__center-menu",label:()=>he(`\\overline{${te(e)}}`),visible:()=>te(e).length>0,onMenuSelect:()=>e.insert("\\overline{#@}",{selectionMode:"item"})},{id:"accent-overgroup",class:"ML__center-menu",label:()=>he(`\\overgroup{${te(e)}}`),visible:()=>te(e).length>0,onMenuSelect:()=>e.insert("\\overgroup{#@}",{selectionMode:"item"})},{id:"accent-overbrace",class:"ML__center-menu",label:()=>he(`\\overbrace{${te(e)}}`),visible:()=>te(e).length>0,onMenuSelect:()=>e.insert("\\overbrace{#@}",{selectionMode:"item"})},{id:"accent-underline",class:"ML__center-menu",label:()=>he(`\\underline{${te(e)}}`),visible:()=>te(e).length>0,onMenuSelect:()=>e.insert("\\underline{#@}",{selectionMode:"item"})},{id:"accent-undergroup",class:"ML__center-menu",label:()=>he(`\\undergroup{${te(e)}}`),visible:()=>te(e).length>0,onMenuSelect:()=>e.insert("\\undergroup{#@}",{selectionMode:"item"})},{id:"accent-underbrace",class:"ML__center-menu",label:()=>he(`\\underbrace{${te(e)}}`),visible:()=>te(e).length>0,onMenuSelect:()=>e.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function f4(e){return[{id:"decoration-boxed",label:()=>he(`\\boxed{${e.getValue(e.model.selection)}}}`),onMenuSelect:()=>e.insert("\\boxed{#@}",{selectionMode:"item"})},{id:"decoration-red-box",label:()=>he(`\\bbox[5px, border: 2px solid red]{${e.getValue(e.model.selection)}}`),onMenuSelect:()=>e.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{id:"decoration-dashed-black-box",label:()=>he(`\\bbox[5px, border: 2px dashed black]{${e.getValue(e.model.selection)}}`),onMenuSelect:()=>e.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function g4(e){let t=[];for(let i of Object.keys(Di))t.push({id:`background-color-${i}`,class:(d4(Bp(Di[i]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Di[i]} "></span>`,ariaLabel:()=>{var r;return(r=P(i))!=null?r:i},checked:()=>{var r;return(r={some:"mixed",all:!0}[e.queryStyle({backgroundColor:i})])!=null?r:!1},onMenuSelect:()=>e.applyStyle({backgroundColor:i},{operation:"toggle"})});return t}function b4(e){let t=[];for(let i of Object.keys(Ei))t.push({id:`color-${i}`,class:(Bp(Ei[i])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${Ei[i]} "></span>`,ariaLabel:()=>{var r;return(r=P(i))!=null?r:i},checked:()=>{var r;return(r={some:"mixed",all:!0}[e.queryStyle({color:i})])!=null?r:!1},onMenuSelect:()=>e.applyStyle({color:i},{operation:"toggle"})});return t}var y4=class extends yp{constructor(e,t,i,r){super(e,t),this.row=i,this.col=r}set active(e){let t=this.parentMenu.children;if(e)for(let i of t)i.element.classList.toggle("active",i.row<=this.row&&i.col<=this.col);else for(let i of t)i.element.classList.remove("active")}};function v4(e){let t=[];for(let i=1;i<=5;i++)for(let r=1;r<=5;r++)t.push({id:`insert-matrix-${i}x${r}`,onCreate:(a,n)=>new y4(a,n,i,r),label:"☐",tooltip:()=>P("tooltip.row-by-col",i,r),data:{row:i,col:r},onMenuSelect:()=>{e.insert(`\\begin{pmatrix}${Array(i).fill(Array(r).fill("#?").join(" & ")).join("\\\\")}\\end{pmatrix}`,{selectionMode:"item"})}});return t}function x4(e){return[{label:()=>P("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>e.executeCommand("addRowBefore"),keyboardShortcut:"shift+alt+[Return]",visible:()=>{if(!e.isSelectionEditable||!vi(e))return!1;let[t]=Ht(e),[i]=rr(e);return t!==i}},{label:()=>P("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>e.executeCommand("addRowAfter"),keyboardShortcut:"alt+[Return]",visible:()=>{if(!e.isSelectionEditable||!vi(e))return!1;let[t]=Ht(e),[i]=rr(e);return t!==i}},{label:()=>P("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>e.executeCommand("addColumnBefore"),visible:()=>{if(!e.isSelectionEditable||!vi(e))return!1;let[t,i]=Ht(e),[r,a]=rr(e);return i!==a},keyboardShortcut:"shift+alt+[Tab]",enabled:()=>{let t=e.model.parentEnvironment;if(!t)return!1;let[i]=Sl(e);return i<t.maxColumns}},{label:()=>P("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>e.executeCommand("addColumnAfter"),keyboardShortcut:"alt+[Tab]",visible:()=>{if(!e.isSelectionEditable||!vi(e))return!1;let[t,i]=Ht(e),[r,a]=rr(e);return i!==a}},{type:"divider"},{label:()=>P("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>e.executeCommand("removeRow"),enabled:()=>{let[t]=Ht(e),[i]=Sl(e);return i>t},visible:()=>{if(!e.isSelectionEditable||!vi(e))return!1;let[t]=Ht(e),[i]=rr(e);return t!==i}},{label:()=>P("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>e.executeCommand("removeColumn"),enabled:()=>{let[t,i]=Ht(e),[r,a]=Sl(e);return a>i},visible:()=>{if(!e.isSelectionEditable||!vi(e))return!1;let[t,i]=Ht(e),[r,a]=rr(e);return i!==a}},{type:"divider"},{label:()=>P("menu.borders"),visible:()=>(_4(e)||vi(e))&&e.isSelectionEditable,submenu:[{label:" ⋱ ",id:"environment-no-border",onMenuSelect:()=>Ur(e,"matrix")},{label:"(⋱)",id:"environment-parentheses",onMenuSelect:()=>Ur(e,"pmatrix")},{label:"[⋱]",id:"environment-brackets",onMenuSelect:()=>Ur(e,"bmatrix")},{label:"|⋱|",id:"environment-bar",onMenuSelect:()=>Ur(e,"vmatrix")},{label:"{⋱}",id:"environment-braces",onMenuSelect:()=>Ur(e,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>P("menu.insert matrix"),id:"insert-matrix",visible:()=>e.isSelectionEditable,submenu:v4(e),submenuClass:"insert-matrix-submenu",columnCount:5},{type:"divider"},{label:()=>P("menu.insert"),id:"insert",submenu:k4(e)},{type:"divider"},{label:()=>P("menu.mode"),id:"mode",visible:()=>e.isSelectionEditable&&e.model.selectionIsCollapsed,submenu:[{label:()=>P("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{ai(e,"accept-all"),e.executeCommand(["switchMode","math"])},checked:()=>e.model.mode==="math"},{label:()=>P("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{ai(e,"accept-all"),e.executeCommand(["switchMode","text"])},checked:()=>e.model.mode==="text"},{label:()=>P("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>e.executeCommand(["switchMode","latex"]),checked:()=>e.model.mode==="latex"}]},{type:"divider"},{label:()=>P("menu.font-style"),id:"variant",visible:()=>e.isSelectionEditable,submenu:p4(e),submenuClass:"variant-submenu"},{label:()=>P("menu.color"),id:"color",visible:()=>e.isSelectionEditable,submenu:b4(e),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>P("menu.background-color"),id:"background-color",visible:()=>e.isSelectionEditable,submenu:g4(e),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>P("menu.accent"),id:"accent",visible:()=>e.isSelectionEditable,submenu:m4(e),submenuClass:"variant-submenu"},{label:()=>P("menu.decoration"),id:"decoration",visible:()=>e.isSelectionEditable&&te(e).length>0,submenu:f4(e),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>P("menu.evaluate"),id:"ce-evaluate",visible:()=>e.isSelectionEditable&&globalThis.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{let t=w4(e);if(!t){e.model.announce("plonk");return}e.model.selectionIsCollapsed?(e.model.position=e.model.lastOffset,e.insert(`=${t}`,{insertionMode:"insertAfter",selectionMode:"item"})):e.insert(t,{insertionMode:"replaceSelection",selectionMode:"item"})}},{label:()=>P("menu.simplify"),id:"ce-simplify",visible:()=>e.isSelectionEditable&&globalThis.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{var t,i;if(e.model.selectionIsCollapsed){let r=(t=e.expression)==null?void 0:t.simplify();if(e.model.position=e.model.lastOffset,!r){e.model.announce("plonk");return}e.insert(`=${r.latex}`,{insertionMode:"insertAfter",selectionMode:"item"})}else{let r=(i=globalThis.MathfieldElement.computeEngine)==null?void 0:i.parse(e.getValue(e.model.selection)).simplify();if(!r){e.model.announce("plonk");return}e.insert(r.latex,{insertionMode:"replaceSelection",selectionMode:"item"})}}},{label:()=>{var t;let i=globalThis.MathfieldElement.computeEngine;if(i===null)return"";let r=(t=e.expression)==null?void 0:t.unknowns[0];if(r){let a=i.box(r).latex;return P("menu.solve-for",he(a))}return P("menu.solve")},id:"ce-solve",visible:()=>{var t;return e.isSelectionEditable&&globalThis.MathfieldElement.computeEngine!==null&&((t=e.expression)==null?void 0:t.unknowns.length)===1&&e.expression.unknowns[0]!=="Nothing"},onMenuSelect:()=>{var t;let i=e.expression,r=i==null?void 0:i.unknowns[0],a=(t=i.solve(r))==null?void 0:t.map(n=>{var o;return(o=n.simplify().latex)!=null?o:""});if(!a){e.model.announce("plonk");return}e.insert(`${r}=${a.length===1?a[0]:"\\left\\lbrace"+(a==null?void 0:a.join(", "))+"\\right\\rbrace"}`,{insertionMode:"replaceAll",selectionMode:"item"})}},{type:"divider"},{label:()=>P("menu.cut"),id:"cut",onMenuSelect:()=>e.executeCommand("cutToClipboard"),visible:()=>!e.options.readOnly&&e.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>P("menu.copy"),id:"copy",submenu:[{label:()=>P("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>Z.copyToClipboard(e,"latex"),keyboardShortcut:"meta+C"},{label:()=>P("menu.copy-as-typst"),id:"copy-latex",onMenuSelect:()=>Z.copyToClipboard(e,"typst")},{label:()=>P("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>Z.copyToClipboard(e,"ascii-math")},{label:()=>P("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>Z.copyToClipboard(e,"math-ml")}]},{label:()=>P("menu.paste"),id:"paste",onMenuSelect:()=>e.executeCommand("pasteFromClipboard"),visible:()=>e.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>P("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>e.executeCommand("selectAll")}]}function vi(e){var t,i;let r=(i=(t=e.model.parentEnvironment)==null?void 0:t.environmentName)!=null?i:"";return["array","matrix","pmatrix","bmatrix","vmatrix","Bmatrix","cases","dcases","rcases"].includes(r)}function _4(e){let t=e.model.at(e.model.position);if(t.type!=="array")return!1;let i=t.environmentName;return["matrix","pmatrix","bmatrix","vmatrix","Bmatrix"].includes(i)}function Sl(e){var t;let i=(t=e.model.parentEnvironment)==null?void 0:t.rows;return i?[i.length,i.reduce((r,a)=>Math.max(r,a.length),0)]:[0,0]}function Ht(e){let t=e.model.parentEnvironment;return t?[t.minRows,t.minColumns]:[0,0]}function rr(e){let t=e.model.parentEnvironment;return t?[t.maxRows,t.maxColumns]:[0,0]}function Ur(e,t){vo(e),e.flushInlineShortcutBuffer(),sp(e.model,t),se(e)}function w4(e){var t,i;let r;if(e.model.selectionIsCollapsed?r=(t=globalThis.MathfieldElement.computeEngine)==null?void 0:t.parse(e.getValue(),{canonical:!1}):r=(i=globalThis.MathfieldElement.computeEngine)==null?void 0:i.parse(e.getValue(e.model.selection),{canonical:!1}),!r)return"";let a=r.evaluate();return a.isSame(r)&&(a=r.N()),a.latex}function Cl(e,t,i,r){return{id:`variant-${t}`,label:()=>{var a;return te(e).length<12?he(`\\${i}{${te(e)}}`):(a=P(r))!=null?a:r},class:"ML__xl",tooltip:()=>{var a;return(a=P(r))!=null?a:r},visible:()=>h4(e,t),checked:()=>{var a;return(a={some:"mixed",all:!0}[e.queryStyle({variant:t})])!=null?a:!1},onMenuSelect:()=>e.applyStyle({variant:t},{operation:"toggle"})}}function Ll(e,t,i,r){return{id:`variant-style-${t}`,label:()=>{var a;let n=te(e);return n.length>0&&n.length<12?he(`\\${i}{${te(e)}}`):(a=P(r))!=null?a:r},class:()=>{let a=te(e);return a.length>0&&a.length<12?"ML__xl":""},tooltip:()=>{var a;return(a=P(r))!=null?a:r},visible:!0,checked:()=>{var a;return(a={some:"mixed",all:!0}[e.queryStyle({variantStyle:t})])!=null?a:!1},onMenuSelect:()=>e.applyStyle({variantStyle:t},{operation:"toggle"})}}function k4(e){return[{label:()=>$e("abs"),id:"insert-abs",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("|#?|")},{label:()=>$e("nth-root"),id:"insert-nth-root",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\sqrt[#?]{#?}")},{label:()=>$e("log-base"),id:"insert-log-base",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\log_{#?}{#?}")},{type:"heading",label:()=>P("menu.insert.heading-calculus")},{label:()=>$e("derivative"),id:"insert-derivative",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\dfrac{\\mathrm{d}}{\\mathrm{d}x}#?\\bigm|_{x=#?}")},{label:()=>$e("nth-derivative"),id:"insert-nth-derivative",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\dfrac{\\mathrm{d}^#?}{\\mathrm{d}x^#?}#?\\bigm|_{x=#?}")},{label:()=>$e("integral"),id:"insert-integral",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\int_#?^#?#?\\,\\mathrm{d}#?")},{label:()=>$e("sum"),id:"insert-sum",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\sum_#?^#?#?")},{label:()=>$e("product"),id:"insert-product",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\prod_#?^#?#?")},{type:"heading",label:()=>P("menu.insert.heading-complex-numbers")},{label:()=>$e("modulus"),id:"insert-modulus",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\lvert#?\\rvert")},{label:()=>$e("argument"),id:"insert-argument",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\arg(#?)")},{label:()=>$e("real-part"),id:"insert-real-part",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\Re(#?)")},{label:()=>$e("imaginary-part"),id:"insert-imaginary-part",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\Im(#?)")},{label:()=>$e("conjugate"),id:"insert-conjugate",visible:()=>e.isSelectionEditable,onMenuSelect:()=>e.insert("\\overline{#?}")}]}function $e(e){return`<span class='ML__insert-template'> ${he(P(`menu.insert.${e}-template`))}</span><span class="ML__insert-label">${P(`menu.insert.${e}`)}</span>`}var Be={"\\ne":"!=","\\neq":"!=","−":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon.alt","\\varepsilon":"epsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta.alt","\\vartheta":"theta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi.alt","\\varphi":"phi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega","\\exponentialE":"e","\\imaginaryI":"i","\\imaginaryJ":"j","\\!":" #h(-1em/6) ","\\,":" thin ","\\:":" med ","\\>":" med ","\\;":" thick ","\\enskip":"space.en","\\enspace":"space.en","\\qquad":"space.quad space.quad","\\quad":"space.quad","\\infty":"infinity","\\R":"RR","\\mathbb{R}":"RR","\\N":"NN","\\mathbb{N}":"NN","\\Z":"ZZ","\\mathbb{Z}":"ZZ","\\Q":"QQ","\\mathbb{Q}":"QQ","\\C":"CC","\\mathbb{C}":"CC","\\emptyset":"emptyset","\\varnothing":"nothing","\\varDelta":"Delta","\\varTheta":"Theta","\\varLambda":"Lambda","\\varXi":"Xi","\\varPi":"Pi","\\varSigma":"Sigma","\\varUpsilon":"Upsilon","\\varPhi":"Phi","\\varPsi":"Psi","\\varOmega":"Omega","\\vert":" | ","\\Vert":" || ","\\mid":" divides ","\\lbrack":" bracket.l ","\\rbrack":" bracket.r ","\\lbrace":" brace.l ","\\rbrace":" brace.r ","\\lparen":" paren.l ","\\rparen":" paren.r ","\\langle":" angle.l ","\\rangle":" angle.r ","\\differentialD":" dif ","\\diamond":" diamond.stroked.small ","\\square":" square.stroked.small ","\\lceil":" ceil.l ","\\rceil":" ceil.r ","\\lfloor":" floor.l ","\\rfloor":" floor.r ","\\aleph":" aleph ","\\bet":" bet ","\\gimel":" gimel ","\\dalet":" dalet ","\\mod":" mod ","\\equiv":" equiv ","\\subset":" subset ","\\supset":" supset ","\\subseteq":" subset.eq ","\\supseteq":" supset.eq ","\\subsetneq":" subset.neq ","\\supsetneq":" supset.neq ","\\supsetneqq":" supset.neq ","\\nsubset":" subset.not ","\\nsupset":" supset.not ","\\nsubseteq":" subset.eq.not ","\\nsupseteq":" supset.eq.not ","\\approx":" approx ","\\uparrow":" arrow.t ","\\downarrow":" arrow.b ","\\rightarrow":" arrow.r ","\\leftarrow":" arrow.l ","\\longmapsto":" mapsto.long ","\\longmapsfrom":" arrow.l.bar.long ","/":"\\/","&":"&"},v0={"[":" bracket.l ","]":" bracket.r ","{":" brace.l ","}":" brace.r ","(":" paren.l ",")":" paren.r ","<":" angle.l ",">":" angle.r ",".":""},x0={" bracket.l ":"["," bracket.r ":"]"," brace.l ":"{"," brace.r ":"}"," paren.l ":"("," paren.r ":")"," angle.l ":" angle.l "," angle.r ":" angle.r "},Jr={"\\pm":"plus.minus","\\colon":" : ","\\sum":" sum ","\\prod":" product ","\\bigcap":" inter.big ","\\bigcup":" union.big ","\\int":" integral ","\\iint":" integral.double ","\\iiint":" integral.triple ","\\intop":" integral ","\\oint":" integral.cont ","\\oiint":" integral.surf ","\\oiiint":" integral.vol ","\\setminus":" without ","\\vdots":" without ","\\ddots":" dots.down ","\\ge":">=","\\le":"<=","\\ne":"!=","\\neq":"!=","\\lt":"<","\\gt":">","\\gets":"<-","\\to":"->","\\land":" and ","\\lor":" or ","\\lnot":" not ","\\forall":" forall ","\\exists":" exists ","\\in":" in ","\\notin":" in.not ","\\mapsto":"|->","\\implies":"==>","\\iff":"<==>","\\cdot":" dot.op ","\\ast":" * ","\\star":" star.op ","\\times":" times ","\\div":" div ","\\ltimes":" times.l ","\\rtimes":" times.r ","\\bowtie":" ⋈ ","\\circ":" circle.stroked.small "},M4={underarc:"underparen",underparen:"underparen",underbrace:"underbrace",underline:"underline",overarc:"overparen",overparen:"overparen",overbrace:"overbrace",overline:"overline",cancel:"cancel",displaystyle:"display",textstyle:"inline"},S4={longrightarrow:e=>`arrow.r.long^(${ie(e.above)})`,longleftarrow:e=>`arrow.l.long^(${ie(e.above)})`};function C4(e){let t="";for(let i of e){let r=t[t.length-1];r!==void 0&&(/\d$/.test(r)&&/^\d/.test(i)||/[a-zA-Z]$/.test(r)&&/^[a-zA-Z]/.test(i))&&(t+=" "),t+=i}return t}function ie(e){var t,i,r,a,n,o,l,s,u,c,d,h,p,m,g,v,b,x,E,S,M,C,B;if(!e)return"";if(ve(e)){if(e.length===0)return"";if(e[0].mode==="latex")return e.map(z=>ie(z)).join("");if(e[0].mode==="text"){let z=0,N="";for(;((t=e[z])==null?void 0:t.mode)==="text";)N+=e[z].body?ie(e[z].body):e[z].value,z++;return` "${N}" ${ie(e.slice(z))}`}let $=0,W=[];for(;((i=e[$])==null?void 0:i.mode)==="math";){let z="";for(;((r=e[$])==null?void 0:r.type)==="mord"&&/\d/.test(e[$].value);)z+=e[$++].value;z?W.push(z):W.push(ie(e[$++]))}return W.push(ie(e.slice($))),C4(W)}if(e.mode==="text")return`"${e.value}"`;let D="",{command:K}=e,Y;if(K==="\\placeholder")return`"${ie(e.body)}"`;let _=w.serialize([e],{expandMacro:!0,defaultMode:"math"});switch(e.type){case"accent":let $={"\\vec":"arrow","\\dot":"dot","\\ddot":"dot.double","\\bar":"overline","\\hat":"hat","\\acute":"acute","\\grave":"grave","\\tilde":"tilde","\\breve":"breve","\\check":"caron"}[K];D=`${$??""}(${ie(e.body)}) `;break;case"first":return"";case"latexgroup":return e.body.map(z=>z.value).join("");case"group":case"root":D=(a=Be[K])!=null?a:ie(e.body);break;case"genfrac":{let z=e;z.hasBarLine?(D+="(",D+=ie(z.above),D+=")/(",D+=ie(z.below),D+=")"):D+=`binom(${ie(z.above)}, ${ie(z.below)})`}break;case"surd":e.hasEmptyBranch("above")?D+=`sqrt(${ie(e.body)})`:D+=`root(${ie(e.above)}, ${ie(e.body)})`;break;case"latex":D=e.value;break;case"leftright":{let z=e,N=z.leftDelim;N&&Be[N]&&(N=Be[N]);let j=z.matchingRightDelim();j&&Be[j]&&(j=Be[j]),N&&(N=(n=v0[N])!=null?n:N),j&&(j=(o=v0[j])!=null?o:j),N&&j?D=`lr(${(l=x0[N])!=null?l:N}${ie(z.body)}${(s=x0[j])!=null?s:j})`:D=`lr(${N}${ie(z.body)}${j})`}break;case"sizeddelim":case"delim":D=e.value;break;case"overlap":break;case"mord":if(Be[_])return Be[_];D=(d=(c=(u=Be[K])!=null?u:K)!=null?c:K)!=null?d:typeof e.value=="string"?e.value:"",D.startsWith("\\")&&(D+=" "),Y=K?K.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,Y?D=String.fromCodePoint(Number.parseInt("0x"+Y[1])):D.length>0&&D.startsWith("\\")&&(D=typeof e.value=="string"?e.value.charAt(0):e.command),D=L4(D,e.style),D=` ${D} `;break;case"mbin":case"mrel":case"minner":D=(m=(p=(h=Be[_])!=null?h:Be[K])!=null?p:Jr[K])!=null?m:e.value;break;case"mopen":case"mclose":D=(g=Be[_])!=null?g:e.value;break;case"mpunct":D=(v=Jr[K])!=null?v:K;break;case"mop":case"operator":case"extensible-symbol":e.value!=="​"&&(Jr[K]?D=Jr[K]:D=K==="\\operatorname"?ie(e.body):(b=e.value)!=null?b:K,D+=" ");break;case"array":let W=e.environmentName;if(e.isMultiline)D=e.rows.map(z=>z.map(N=>ie(N)).join("")).join(`
3221`);else{let z=e.rows,N=z.map(V=>V.map(ie).join(", ")),j={pmatrix:'"("',bmatrix:'"["',"bmatrix*":'"["',Bmatrix:'"{"',vmatrix:'"|"',matrix:"#none"}[W];j?D=`mat(delim: ${j}, ${N.join(" ; ")})`:W==="cases"||W==="rcases"?D=`cases(reverse: #${W==="rcases"}, ${N.join(", ")})`:W==="aligned"?D=z.map(V=>V.map(ie).join(" & ")).join(" \\ "):D=z.map(V=>V.map(ie).join("")).join("")}break;case"box":break;case"spacing":D=(E=(x=Be[_])!=null?x:Be[K])!=null?E:" ";break;case"space":D=" ";break;case"subsup":D=(S=e.leftSibling)!=null&&S.value?"":'""';break;case"macro":D=(B=(C=(M=Be[_])!=null?M:Be[K])!=null?C:Jr[K])!=null?B:ie(e.body);break}if(!D){let $=M4[e.command.slice(1)];$&&(D=`${$}(${ie(e.body)})`)}if(!D){let $=S4[e.command.slice(1)];$&&(D=$(e))}if(!e.hasEmptyBranch("subscript")){D+="_";let $=ie(e.subscript);D+=$.length!==1?`(${$})`:$}if(!e.hasEmptyBranch("superscript")){D+="^";let $=ie(e.superscript);D+=$.length!==1?`(${$})`:$}return D}function L4(e,t){if(!t)return e;let i=e;return t.variant==="double-struck"&&(i=`bb(${i})`),t.variant==="script"&&(i=`cal(${i})`),t.variant==="fraktur"&&(i=`frak(${i}
3221)`),t.variant==="sans-serif"&&(i=`sans(${i})`),t.variant==="monospace"&&(i=`mono(${i})`),t.variantStyle==="bold"&&(i=`bold(${i})`),i}function ei(e,t){return typeof e=="string"?e+Fi(t):Fi(e)}function ls(e){var t;let i;if(e.parent.type==="prompt")e.parentBranch==="body"&&(i="prompt");else if(e.parentBranch==="body"){if(e.type==="first"&&(e.parent.type==="root"?i="mathfield":e.parent.type==="surd"?i="radicand":e.parent.type==="genfrac"?i="fraction":e.parent.type==="sizeddelim"&&(i="delimiter"),i))return i;e.type==="subsup"?e.superscript&&e.subscript?i="superscript and subscript":e.superscript?i="superscript":e.subscript&&(i="subscript"):e.type&&(i=(t={accent:"accented",array:"array",box:"box",chem:"chemical formula",delim:"delimiter",enclose:"cross out","extensible-symbol":"extensible symbol",error:"error",first:"first",genfrac:"fraction",group:"group",latex:"LaTeX",leftright:"delimiter",line:"line",subsup:"subscript-superscript",operator:"operator",overunder:"over-under",placeholder:"placeholder",rule:"rule",sizeddelim:"delimiter",space:"space",spacing:"spacing",surd:"square root",text:"text",prompt:"prompt",root:"math field",mop:"operator"}[e.type])!=null?t:"parent")}else if(e.parent.type==="genfrac"){if(e.parentBranch==="above")return"numerator";if(e.parentBranch==="below")return"denominator"}else e.parent.type==="surd"?e.parentBranch==="above"&&(i="index"):e.parentBranch==="superscript"?i="superscript":e.parentBranch==="subscript"&&(i="subscript");return i??"parent"}function D4(e,t,i,r){let a="";if(t==="plonk"){globalThis.MathfieldElement.playSound("plonk"),e.flushInlineShortcutBuffer();return}if(t==="delete")a=ei("deleted: ",r);else if(t==="focus"||t.includes("move"))a=E4(e.model,i),a+=B4(e.model);else if(t==="replacement")a=ei(e.model.at(e.model.position));else if(t==="line"){let n=ei(e.model.root);e.keyboardDelegate.setAriaLabel(n)}else a=r?ei(t+" ",r):t;if(a&&e.ariaLiveText){let n=e.ariaLiveText.textContent.includes(" ")?"   ":"   ";e.ariaLiveText.textContent=a+n}}function E4(e,t){if(Number.isNaN(t))return"";let i=e.at(t);if(!i||i.treeDepth<=e.at(e.position).treeDepth)return"";let r="",a=i.parent,n=e.at(e.position).parent;for(;a!==e.root&&a!==n;)r+=`out of ${ls(a)};`,a=a.parent;return r}function B4(e){if(!e.selectionIsCollapsed)return`selected: ${ei(e.getAtoms(e.selection))}`;let t="",i=e.at(e.position);if(i.isFirstSibling&&(t=`start of ${ls(i)}: `),i.isLastSibling){if(!i.isFirstSibling){if(!i.parent.parent)return`${ei(i)}; end of mathfield`;t=`${ei(i)}; end of ${ls(i)}`}}else t+=ei(i);return t}var A4=class{constructor(e,t,i){this.mathfield=e,this.mode=t,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=i}dispose(){this.mathfield=void 0}getState(){let e={ranges:[...this._selection.ranges]};return this.selection.direction&&this.selection.direction!=="none"&&(e.direction=this.selection.direction),{content:this.root.toJson(),selection:e,mode:this.mode}}setState(e,t){var i;let r=this.silenceNotifications;this.silenceNotifications=(i=t==null?void 0:t.silenceNotifications)!=null?i:!0;let a={};if((t==null?void 0:t.type)==="undo"&&(a={inputType:"historyUndo"}),(t==null?void 0:t.type)==="redo"&&(a={inputType:"historyRedo"}),this.contentWillChange(a)){let n=this.silenceNotifications;this.silenceNotifications=!0,this.mode=e.mode,this.root=ti(e.content),this.selection=e.selection,this.silenceNotifications=n,this.contentDidChange(a),this.selectionDidChange()}this.silenceNotifications=r}get atoms(){return this.root.children}get selection(){return this._selection}set selection(e){this.setSelection(e)}setSelection(e,t){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0,content:!0},()=>{var i,r,a,n;let o=this.normalizeSelection(e,t);if(o===void 0)throw new TypeError("Invalid selection");if(o.ranges.length===1&&o.ranges[0][0]===o.ranges[0][1]){let h=o.ranges[0][0];if(!this.mathfield.dirty&&!((i=this.at(h))!=null&&i.parentPrompt)&&this.mathfield.hasEditablePrompts){if((r=this.at(h-1))!=null&&r.parentPrompt){this._anchor=this.normalizeOffset(h-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((a=this.at(h+1))!=null&&a.parentPrompt){this._anchor=this.normalizeOffset(h+1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}this._anchor=0,this._position=0,this._selection={ranges:[[0,0]]};return}this._anchor=h,this._position=h,this._selection=o;return}
vendor: 82,545 bytes, lines 3221-3232
3221let l=we(o);l=T4(this,l),o.direction==="backward"?[this._position,this._anchor]=l:[this._anchor,this._position]=l;let s=l[0]+1;for(;s<=this.lastOffset&&((n=this.at(s))==null?void 0:n.type)==="first"&&s<l[1];)s+=1;let u=s<=this.lastOffset?this.at(s):this.at(l[1]),c=this.at(l[1]),d=w.commonAncestor(u,c);(d==null?void 0:d.type)==="array"&&u.parent===d&&c.parent===d?this._selection={ranges:[l],direction:o.direction}:this._selection={ranges:[l],direction:o.direction},this._position>=0&&this._position<=this.lastOffset})}setPositionHandlingPlaceholder(e){var t;let i=this.at(e);(i==null?void 0:i.type)==="placeholder"?this.setSelection(e-1,e):((t=i==null?void 0:i.rightSibling)==null?void 0:t.type)==="placeholder"?this.setSelection(e,e+1):this.position=e,i instanceof be&&i.isSuggestion&&(i.isSuggestion=!1),this.mathfield.stopCoalescingUndo()}get position(){return this._position}set position(e){this.setSelection(e,e)}get anchor(){return this._anchor}get selectionIsCollapsed(){return this._anchor===this._position}get selectionIsPlaceholder(){return Math.abs(this._anchor-this._position)===1?this.at(Math.max(this._anchor,this._position)).type==="placeholder":!1}collapseSelection(e="forward"){return this._anchor===this._position?!1:(e==="backward"?this.position=Math.min(this._anchor,this._position):this.position=Math.max(this._anchor,this._position),!0)}get lastOffset(){return this.atoms.length-1}at(e){return this.atoms[e]}offsetOf(e){return this.atoms.indexOf(e)}getSiblingsRange(e){let t=this.at(e),{parent:i}=t;if(!i)return[0,this.lastOffset];let r=t.parent.branch(t.parentBranch);return[this.offsetOf(r[0]),this.offsetOf(r[r.length-1])]}getBranchRange(e,t){let i=this.at(e).branch(t);return[this.offsetOf(i[0]),this.offsetOf(i[i.length-1])]}getCellRange(e){var t,i;this.getParentCell(e);let r=this.at(e);if(r){for(;r&&((t=r.parent)==null?void 0:t.type)!=="array";)r=r.parent;if(((i=r==null?void 0:r.parent)==null?void 0:i.type)==="array")return[this.offsetOf(r.firstSibling),this.offsetOf(r.lastSibling)]}}getAtoms(e,t,i){let r=i??{};if(zn(e)){if(r=t??{},e.ranges.length>1)return e.ranges.reduce((d,h)=>[...d,...this.getAtoms(h,r)],[]);e=e.ranges[0]}let a,n;if(Gt(e)){if(a=e,!Gt(t))return[];n=t}else[a,n]=e,Object.keys(r).length===0&&(r=t??{});if(!Number.isFinite(a))return[];r.includeChildren===void 0&&(r.includeChildren=!1),a<0&&(a=this.lastOffset-a+1),n<0&&(n=this.lastOffset+n+1);let o=Math.min(a,n),l=Math.max(a,n),s=o===0?0:o+1,u=l;if(!r.includeChildren&&s===1&&u===this.lastOffset)return[this.root];let c=[];for(let d=s;d<=u;d++){let h=this.atoms[d];_0(this,h,s,u,r.includeFirstAtoms)&&c.push(h)}return r.includeChildren||(c=c.filter(d=>{let h=!1,{parent:p}=d;for(;p&&!h;)h=_0(this,p,s,u,r.includeFirstAtoms),p=p.parent;return!h})),c}findAtom(e,t=0,i="forward"){let r,a=this.lastOffset;if(i==="forward"){for(let n=t;n<=a;n++)if(r=this.atoms[n],e(r))return r;for(let n=0;n<t;n++)if(r=this.atoms[n],e(r))return r;return}for(let n=t;n>=0;n--)if(r=this.atoms[n],e(r))return r;for(let n=a;n>t;n--)if(r=this.atoms[n],e(r))return r}extractAtoms(e){var t;let i=this.getAtoms(e);i.length===1&&!i[0].parent&&i[0].isRoot&&(i[0]instanceof q?i=i[0].rows.flatMap(r=>r.flatMap(a=>a)):i=[...(t=i[0].body)!=null?t:i[0].children],i=i.filter(r=>r.type!=="first"));for(let r of i)r.parent.removeChild(r);return i}deleteAtoms(e){if(e!=null||(e=[0,-1]),this.extractAtoms(e),e[0]===0&&e[1]===-1&&this.root instanceof q)for(;this.root.rowCount>1;)this.root.removeRow(1);this.position=e[0]}atomToString(e,t){let i=t??"latex";if(i.startsWith("latex"))return w.serialize([e],{expandMacro:i==="latex-expanded",skipStyles:i==="latex-unstyled",skipPlaceholders:i==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode});if(i==="math-ml")return U(e);if(i==="spoken")return Fi(e);if(i==="spoken-text"){let r=globalThis.MathfieldElement.textToSpeechMarkup;globalThis.MathfieldElement.textToSpeechMarkup="";let a=Fi(e);return globalThis.MathfieldElement.textToSpeechMarkup=r,a}if(i==="spoken-ssml"||i==="spoken-ssml-with-highlighting"){let r=globalThis.MathfieldElement.textToSpeechMarkup;globalThis.MathfieldElement.textToSpeechMarkup="ssml";let a=Fi(e);return globalThis.MathfieldElement.textToSpeechMarkup=r,a}return i==="typst"?ie(e):i==="plain-text"?oe(e,{plain:!0}):i==="ascii-math"?oe(e):(console.error(`MathLive 0.108.3: Unexpected format "${i}`),"")}getValue(e,t,i){if(e===void 0)return this.atomToString(this.root,"latex");if(typeof e=="string"&&e!=="math-json")return this.atomToString(this.root,e);let r,a;if(Gt(e)&&Gt(t)?(r=[this.normalizeRange([e,t])],a=i):Gn(e)?(r=[this.normalizeRange(e)],a=t):zn(e)?(r=e.ranges,a=t):(r=[this.normalizeRange([0,-1])],a=e),a!=null||(a="latex"),a==="math-json"){if(!globalThis.MathfieldElement.computeEngine)return window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`The CortexJS Compute Engine library is not available.
3222Load the library, for example with:
3223import "https://esm.run/@cortex-js/compute-engine"`),'["Error", "compute-engine-not-available"]';let n=this.getValue({ranges:r},"latex-unstyled");try{let o=globalThis.MathfieldElement.computeEngine.parse(n);return JSON.stringify(o.json)}catch(o){return JSON.stringify(["Error",`'${o.toString()}'`])}}if(a.startsWith("latex")){let n={expandMacro:a==="latex-expanded",skipStyles:a==="latex-unstyled",skipPlaceholders:a==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode};return R(r.map(o=>w.serialize(this.getAtoms(o),n)))}return r.map(n=>this.getAtoms(n).map(o=>this.atomToString(o,a)).join("")).join("")}extendSelectionTo(e,t){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{let i=this.normalizeRange([e,t]),[r,a]=i,n=new Set(["genfrac","subsup","accent","box","overlap","overunder"]),{parent:o}=this.at(a);if(o!=null&&o.type&&n.has(o.type))for(;o!=null&&o.type&&n.has(o.type)&&jn(this,o,[r,a]);)a=this.offsetOf(o),o=o.parent;for(o=this.at(r).parent;o!=null&&o.type&&n.has(o.type)&&jn(this,o,[r,a]);)r=this.offsetOf(o.leftSibling),o=o.parent;if(o=this.at(a).parent,o!=null&&o.type&&n.has(o.type))for(;o!=null&&o.type&&n.has(o.type)&&jn(this,o,[r,a]);)a=this.offsetOf(o),o=o.parent;this._position=this.normalizeOffset(t),this._selection={ranges:[[r,a]],direction:"none"}})}announce(e,t,i=[]){var r,a;((a=(r=this.mathfield.host)==null?void 0:r.dispatchEvent(new CustomEvent("announce",{detail:{command:e,previousPosition:t,atoms:i},cancelable:!0,bubbles:!0,composed:!0})))==null||a)&&D4(this.mathfield,e,t,i)}deferNotifications(e,t){let i=this._selection,r=this._anchor,a=this._position,n=this.silenceNotifications;this.silenceNotifications=!0;let o=this.root.changeCounter;t(),this.silenceNotifications=n;let l=r!==this._anchor||a!==this._position||Hm(this._selection,i)==="different";e.selection&&l&&this.selectionDidChange();let s=this.root.changeCounter!==o;return e.content&&s&&this.contentDidChange({inputType:e.type}),s||l}normalizeOffset(e){return e>0?e=Math.min(e,this.lastOffset):e<0&&(e=this.lastOffset+e+1),e}normalizeRange(e){let[t,i]=e;return t=this.normalizeOffset(t),i=this.normalizeOffset(i),t<i?[t,i]:[i,t]}normalizeSelection(e,t){var i;let r;if(Gt(e)){let a=this.normalizeOffset(e);if(Gt(t)){let n=this.normalizeOffset(t);r=a<=n?{ranges:[[a,n]],direction:"none"}:{ranges:[[n,a]],direction:"backward"}}else r={ranges:[[a,a]],direction:"none"}}else if(Gn(e)){let a=this.normalizeOffset(e[0]),n=this.normalizeOffset(e[1]);r=a<=n?{ranges:[[a,n]],direction:"none"}:{ranges:[[n,a]],direction:"backward"}}else zn(e)&&(r={ranges:e.ranges.map(a=>this.normalizeRange(a)),direction:(i=e.direction)!=null?i:"none"});return r}get parentEnvironment(){let e=this.at(this.position).parent;if(e){for(;e.parent&&e.type!=="array";)e=e.parent;if(e.type==="array")return e}}get parentCell(){return this.getParentCell(this.position)}getParentCell(e){var t,i;let r=this.at(e);if(r){for(;r&&((t=r.parent)==null?void 0:t.type)!=="array";)r=r.parent;if(((i=r==null?void 0:r.parent)==null?void 0:i.type)==="array")return r.parentBranch}}contentWillChange(e={}){if(this.silenceNotifications||!this.mathfield)return!0;let t=this.silenceNotifications;this.silenceNotifications=!0;let i=this.mathfield.onContentWillChange(e);return this.silenceNotifications=t,i}contentDidChange(e){var t;if(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ut(this.mathfield)),this.silenceNotifications||!((t=this.mathfield)!=null&&t.host))return;let i=this.silenceNotifications;this.silenceNotifications=!0,setTimeout(()=>{var r;!this.mathfield||!wt(this.mathfield)||!this.mathfield.host||this.mathfield.host.dispatchEvent(new InputEvent("input",y(f({},e),{data:e.data?e.data:(r=e.inputType)!=null?r:"",bubbles:!0,composed:!0})))},0),this.silenceNotifications=i}selectionDidChange(){if(!this.mathfield)return;let e=this.silenceNotifications;e||(this.silenceNotifications=!0,this.mathfield.onSelectionDidChange()),this.silenceNotifications=e}};function _0(e,t,i,r,a){let n=e.offsetOf(t);if(n<i||n>r)return!1;if(!t.hasChildren)return!0;let o=a?t.firstChild:Tp(t);if(!o)return!1;let l=a?t.lastChild:Fp(t);if(!l)return!1;let s=e.offsetOf(o);if(s>=i&&s<=r){let u=e.offsetOf(l);if(u>=i&&u<=r)return!0}return!1}function jn(e,t,i){if(!(t!=null&&t.hasChildren))return!1;let[r,a]=i,n=Tp(t);if(!n)return!1;let o=Fp(t);if(!o)return!1;let l=e.offsetOf(n),s=e.offsetOf(o);return l>=r&&l<=a&&s>=l&&s<=a}function T4(e,t){let[i,r]=t,a=r+1;if(a>e.lastOffset)return t;let n=e.at(a);return F4(e,n,i,r)&&(r=e.offsetOf(n)),[i,r]}function F4(e,t,i,r){if((t==null?void 0:t.type)!=="subsup"||!jn(e,t,[i,r]))return!1;let a=t.leftSibling;if(!a)return!1;let n=e.offsetOf(a);return n>i&&n<=r}function Tp(e){for(let t of e.children)if(t.type!=="first")return t}function Fp(e){let{children:t}=e;for(let i=t.length-1;i>=0;i--)if(t[i].type!=="first")return t[i]}Me({deleteAll:e=>e.contentWillChange({inputType:"deleteContent"})&&Ct(e,[0,-1],"deleteContent"),deleteForward:e=>og(e),deleteBackward:e=>ng(e),deleteNextWord:e=>e.contentWillChange({inputType:"deleteWordForward"})&&Yt(e,"forward",{delete:!0}),deletePreviousWord:e=>e.contentWillChange({inputType:"deleteWordBackward"})&&Yt(e,"backward",{delete:!0}),deleteToGroupStart:e=>{if(!e.contentWillChange({inputType:"deleteSoftLineBackward"}))return!1;let t=e.offsetOf(e.at(e.position).firstSibling);return t===e.position?(e.announce("plonk"),!1):(e.deferNotifications({content:!0,selection:!0,type:"deleteSoftLineBackward"},()=>e.deleteAtoms([e.anchor,t])),e.position=t,!0)},deleteToGroupEnd:e=>{if(!e.contentWillChange({inputType:"deleteSoftLineForward"}))return!1;let t=e.offsetOf(e.at(e.position).lastSibling);return t===e.position?(e.announce("plonk"),!1):(e.deferNotifications({content:!0,selection:!0,type:"deleteSoftLineForward"},()=>e.deleteAtoms([e.anchor,t])),!0)},deleteToMathFieldStart:e=>e.contentWillChange({inputType:"deleteHardLineBackward"})&&Ct(e,[e.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:e=>e.contentWillChange({inputType:"deleteHardLineForward"})&&Ct(e,[e.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var z4=`<svg xmlns="http://www.w3.org/2000/svg" style="width: 21px;"  viewBox="0 0 576 512" role="img" aria-label="${P("tooltip.toggle virtual keyboard")}"><path d="M528 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm16 336c0 8.823-7.177 16-16 16H48c-8.823 0-16-7.177-16-16V112c0-8.823 7.177-16 16-16h480c8.823 0 16 7.177 16 16v288zM168 268v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-336 80v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm384 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zM120 188v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-96 152v-8c0-6.627-5.373-12-12-12H180c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h216c6.627 0 12-5.373 12-12z"/></svg>`,K4=`<svg xmlns="http://www.w3.org/2000/svg" style="height: 18px;" viewBox="0 0 448 512" role="img" aria-label="${P("tooltip.menu")}"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>`,$4=class Yr{constructor(t,i){this.focusBlurInProgress=!1,this.programmaticFocusInProgress=!1,this.connectedToVirtualKeyboard=!1;var r,a,n;this.options=f(y(f({},Rn()),{macros:ms(),registers:U0()}),ro(i)),this.eventController=new AbortController;let o=this.eventController.signal;i.eventSink&&(this.host=i.eventSink),this.element=t,t.mathfield=this,this.blurred=!0,this.keystrokeCaptionVisible=!1,this.suggestionIndex=0,this.inlineShortcutBuffer=[],this.inlineShortcutBufferFlushTimer=0,this.scientificNotationTimer=0,this.defaultStyle={},this.styleBias="left",this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline"),this.dirty=!1;let l=(a=(r=i.value)!=null?r:this.element.textContent)!=null?a:"";l=l.trim();let s=Zd(this.options),u=De(l,{context:this.context}),c;u.length===1&&u[0].isRoot?c=u[0]:c=new w({type:"root",mode:s,body:u}),this.model=new A4(this,s,c),this.undoManager=new ag(this.model);let d=[];if(d.push("<span contenteditable=true role=textbox aria-autocomplete=none aria-multiline=false part=keyboard-sink class=ML__keyboard-sink autocapitalize=off autocomplete=off autocorrect=off spellcheck=false inputmode=none tabindex=0></span>"),d.push('<span part=container class=ML__container  style="visibility:hidden">'),d.push("<span part=content class=ML__content>"),d.push(Yh(this)),d.push("</span>"),d.push("<div class=ML__toggles>"),window.mathVirtualKeyboard&&(d.push(`<div part=virtual-keyboard-toggle class=ML__virtual-keyboard-toggle role=button ${this.hasEditableContent?"":'style="display:none;"'} data-l10n-tooltip="tooltip.toggle virtual keyboard">`),d.push(z4),d.push("</div>")),d.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),d.push(K4),d.push("</div>"),d.push("</div>"),d.push("</span>"),d.push("<span class=ML__sr-only>"),d.push("<span role=status aria-live=assertive aria-atomic=true></span>"),d.push("</span>"),this.element.innerHTML=globalThis.MathfieldElement.createHTML(d.join("")),!this.element.children){console.error("%cMathLive 0.108.3: Something went wrong and the mathfield could not be created.%c\nIf you are using Vue, this may be because you are using the runtime-only build of Vue. Make sure to include `runtimeCompiler: true` in your Vue configuration. There may a warning from Vue in the log above.","color:red;font-family:system-ui;font-size:1.2rem;font-weight:bold","color:inherit;font-family:system-ui;font-size:inherit;font-weight:inherit");return}this._l10Subscription=O.subscribe(()=>O.update(this.element)),O.update(this.element),this.container=this.element.querySelector("[part=container]"),this.field=this.container.querySelector("[part=content]"),this.field.addEventListener("click",g=>g.stopImmediatePropagation(),{capture:!1,signal:o}),this.field.addEventListener("wheel",this,{passive:!1,signal:o});let h=this.element;if("PointerEvent"in window?h.addEventListener("pointerdown",this,{signal:o}):h.addEventListener("mousedown",this,{signal:o}),this.host){let g=v=>{v.target===this.host&&this.handleEvent(v)};"PointerEvent"in window?this.host.addEventListener("pointerdown",g,{signal:o}):this.host.addEventListener("mousedown",g,{signal:o})}let p=this.element.querySelector("[part=virtual-keyboard-toggle]");p==null||p.addEventListener("pointerdown",g=>{g.currentTarget===p&&(window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(Ut(this))),g.preventDefault(),g.stopPropagation())},{signal:o}),this.field.addEventListener("contextmenu",this,{signal:o});let m=this.element.querySelector("[part=menu-toggle]");m==null||m.addEventListener("pointerdown",g=>{if(g.currentTarget!==m)return;let v=this.menu;if(v.state!=="closed")return;this.element.classList.add("tracking");let b=m.getBoundingClientRect();v.modifiers=Li(g),v.show({target:m,location:{x:b.left,y:b.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),g.preventDefault(),g.stopPropagation()},{signal:o}),(this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(m.style.display="none"),this.ariaLiveText=(n=this.element.querySelector("[role=status]"))!=null?n:void 0,this.keyboardDelegate=a1(this.element.querySelector(".ML__keyboard-sink"),this.element,this),window.addEventListener("resize",this,{signal:o}),document.addEventListener("scroll",this,{signal:o}),this.resizeObserver=new ResizeObserver(g=>{if(this.resizeObserverStarted){this.resizeObserverStarted=!1;return}this.updateToggleLayout(),se(this)}),this.resizeObserverStarted=!0,this.resizeObserver.observe(this.field),this.resizeObserver.observe(this.container),setTimeout(()=>this.updateToggleLayout(),100),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:o}),zi&&!O.locale.startsWith(zi.locale)&&z0(O.locale),Ie!=="ready"&&document.fonts.ready.then(()=>to(this)),t.querySelector("[part=container]").style.removeProperty("visibility"),this.undoManager.startRecording(),this.undoManager.snapshot("set-value"),se(this)}connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ut(this)),Cn(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,ts())}showMenu(t){var i,r;let a=(r=(i=t==null?void 0:t.location)!=null?i:$n(this.field))!=null?r:void 0,n=t==null?void 0:t.modifiers,o=this.element.querySelector("[part=container]");return this._menu.show({target:o,location:a,modifiers:n})}get colorMap(){return t=>{var i,r,a;return(a=(r=(i=this.options).colorMap)==null?void 0:r.call(i,t))!=null?a:uo(t)}}get backgroundColorMap(){return t=>{var i,r,a,n,o,l;return(l=(o=(r=(i=this.options).backgroundColorMap)==null?void 0:r.call(i,t))!=null?o:(n=(a=this.options).colorMap)==null?void 0:n.call(a,t))!=null?l:ds(t)}}get smartFence(){var t;return(t=this.options.smartFence)!=null?t:!1}get readOnly(){var t;return(t=this.options.readOnly)!=null?t:!1}get disabled(){var t,i;return(i=(t=this.host)==null?void 0:t.disabled)!=null?i:!1}get contentEditable(){return this.host?this.host.getAttribute("contenteditable")!=="false":!1}get userSelect(){if(!this.host)return"";let t=getComputedStyle(this.host);return t.getPropertyValue("user-select")||t.getPropertyValue("-webkit-user-select")}get hasEditableContent(){return this.disabled||!this.contentEditable?!1:!this.readOnly||this.hasEditablePrompts}get hasEditablePrompts(){return this.readOnly&&!this.disabled&&this.contentEditable&&this.model.findAtom(t=>t.type==="prompt"&&!t.locked)!==void 0}get isSelectionEditable(){if(this.disabled||!this.contentEditable)return!1;if(!this.readOnly)return!0;let t=this.model.at(this.model.anchor),i=this.model.at(this.model.position),r=w.commonAncestor(t,i);return!!((r==null?void 0:r.type)==="prompt"||r!=null&&r.parentPrompt)}get letterShapeStyle(){var t;return(t=this.options.letterShapeStyle)!=null?t:"tex"}get minFontScale(){return this.options.minFontScale}get maxMatrixCols(){return this.options.maxMatrixCols}queryStyle(t){let i=Wl(this,t);"verbatimColor"in i&&delete i.verbatimColor,"verbatimBackgroundColor"in i&&delete i.verbatimBackgroundColor;let r=Object.keys(i).length;if(r===0)return"all";if(r>1){for(let u of Object.keys(i)){let c=this.queryStyle({[u]:i[u]});if(c==="none")return"none";if(c==="some")return"some"}return"all"}let a=Object.keys(i)[0],n=i[a];if(this.model.selectionIsCollapsed)return Bi(this)[a]===n?"all":"none";let o=this.model.getAtoms(this.model.selection,{includeChildren:!0}),l=o.length;if(l===0)return"none";let s=0;for(let u of o){if(u.type==="first"){l-=1;continue}u.style[a]===n&&(s+=1)}return s===0?"none":s===l?"all":"some"}get keybindings(){var t,i;if(this._keybindings)return this._keybindings;let[r,a]=u1(this.options.keybindings,(t=na())!=null?t:nm());return((i=na())==null?void 0:i.score)>0&&(this._keybindings=r,a.length>0&&console.error("MathLive 0.108.3: Invalid keybindings for current keyboard layout",a)),r}get menu(){return this._menu!=null||(this._menu=new m0(x4(this),{host:this.host})),this._menu}set menuItems(t){this._menu?this._menu.menuItems=t:this._menu=new m0(t,{host:this.host})}setOptions(t){var i;this.options=f(f({},this.options),ro(t)),this._keybindings=void 0,this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline");let r=this.options.defaultMode;r==="inline-math"&&(r="math"),((i=this.model.root.firstChild)==null?void 0:i.mode)!==r&&(this.model.root.firstChild.mode=r),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");let a=w.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in t||this.model.getValue()!==a)&&Qh(this),("value"in t||"registers"in t||"colorMap"in t||"backgroundColorMap"in t||"letterShapeStyle"in t||"minFontScale"in t||"maxMatrixCols"in t||"readOnly"in t||"contentPlaceholder"in t||"placeholderSymbol"in t)&&se(this)}getOptions(t){return Si(this.options,t)}getOption(t){return Si(this.options,t)}async handleEvent(t){var i,r,a;if(wt(this)){if(Bs(t)){if(!ws(t.origin,(i=this.options.originValidator)!=null?i:"none"))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");let{action:n}=t.data;if(n==="execute-command"){let o=pa(t.data.command);if(!o||fr(o)==="virtual-keyboard")return;this.executeCommand(o)}else n==="update-state"||(n==="focus"?this.focus({preventScroll:!0}):n==="blur"&&this.blur());return}switch(t.type){case"focus":this.programmaticFocusInProgress||this.onFocus({suppressEvents:!0});break;case"blur":this.onBlur({dispatchEvents:!1});break;case"mousedown":this.userSelect!=="none"&&!((r=t.target)!=null&&r.closest("[part=virtual-keyboard-toggle],[part=menu-toggle]"))&&n0(this,t);break;case"pointerdown":!t.defaultPrevented&&this.userSelect!=="none"&&!((a=t.target)!=null&&a.closest("[part=virtual-keyboard-toggle],[part=menu-toggle]"))&&(n0(this,t),t.shiftKey===!1&&await f0(t,this.container,this.menu)&&no.stop());break;case"contextmenu":this.userSelect!=="none"&&t.shiftKey===!1&&await f0(t,this.container,this.menu)&&no.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&Cn(this),this.hasFocus()&&this.options.mathVirtualKeyboardPolicy!=="manual"&&(this.keyboardDelegate.blur(),this.keyboardDelegate.focus());break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>wt(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>wt(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(t);break;case"message":break;default:console.warn("Unexpected event type",t.type)}}}updateToggleLayout(){if(!this.element||!this.host)return;let t=this.element.querySelector(".ML__toggles");if(!t)return;let i=this.host.offsetHeight,r=t.classList.contains("ML__toggles--vertical");i>=100&&!r?t.classList.add("ML__toggles--vertical"):i<100&&r&&t.classList.remove("ML__toggles--vertical")}dispose(){if(!wt(this))return;O.unsubscribe(this._l10Subscription),this.keyboardDelegate.dispose(),this.keyboardDelegate=void 0,this.eventController.abort(),this.eventController=void 0,this.resizeObserver.disconnect(),window.mathVirtualKeyboard.removeEventListener("virtual-keyboard-toggle",this),this.disconnectFromVirtualKeyboard(),this.model.dispose();let t=this.element;delete t.mathfield,this.element=void 0,this.host=void 0,this.field=void 0,this.ariaLiveText=void 0,vg(),f1(),qg()}flushInlineShortcutBuffer(t){if(t!=null||(t={defer:!1}),!t.defer){this.inlineShortcutBuffer.length=0,clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=0;return}this.options.inlineShortcutTimeout>0&&(clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=setTimeout(()=>this.flushInlineShortcutBuffer(),this.options.inlineShortcutTimeout))}executeCommand(t){return fr(t)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(t),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(Ut(this))),!1):w1(this,t)}get errors(){return Dh(this.model.getValue(),{context:this.context})}getValue(t,i,r){return this.model.getValue(t,i,r)}setValue(t,i){var r;i=i??{mode:"math"},i.insertionMode===void 0&&(i.insertionMode="replaceAll"),(i.format===void 0||i.format==="auto")&&(i.format="latex"),(i.mode===void 0||i.mode==="auto")&&(i.mode=(r=Um(this.model,this.model.position))!=null?r:"math");let a=this.undoManager.canUndo();Z.insert(this.model,t,i)&&(se(this),a||this.undoManager.reset(),this.undoManager.snapshot("set-value"))}get expression(){let t=globalThis.MathfieldElement.computeEngine;return t?t.box(t.parse(this.model.getValue("latex-unstyled"))):(console.error("MathLive 0.108.3:  no compute engine available. Make sure the Compute Engine library is loaded."),null)}scrollIntoView(){var t;if(!this.element)return;if(this.host){if(this.options.onScrollIntoView)this.options.onScrollIntoView(this);else if(this.host.scrollIntoView({block:"nearest",inline:"nearest"}),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.container===window.document.body){let a=window.mathVirtualKeyboard.boundingRect,n=this.host.getBoundingClientRect();n.bottom>a.top&&((t=window.document.scrollingElement)==null||t.scrollBy(0,n.bottom-a.top+8))}}this.dirty&&Ai(this,{interactive:!0});let i=this.field.getBoundingClientRect(),r=null;if(this.model.selectionIsCollapsed)r=$n(this.field);else{let a=eh(this);if(a.length>0){let n=-1/0,o=1/0,l=-1/0;for(let u of a)u.right>n&&(n=u.right),u.top<o&&(o=u.top),u.bottom>l&&(l=u.bottom);let s=l-o;r={x:n+i.left-this.field.scrollLeft,y:o+i.top-this.field.scrollTop,height:s}}}if(this.host&&r){let a=this.host.getBoundingClientRect(),n=20,o=r.y,l=r.y+r.height,s=this.host.scrollTop;o<a.top+n?s=o-a.top+this.host.scrollTop-n:l>a.bottom-n&&(s=l-a.bottom+this.host.scrollTop+n),s!==this.host.scrollTop&&this.host.scroll({top:s,behavior:"auto"})}if(r){let a=r.x-window.scrollX,n=this.field.scrollLeft;a<i.left?n=a-i.left+this.field.scrollLeft-20:a>i.right&&(n=a-i.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:n})}}insert(t,i){if(typeof t!="string"||t.length===0&&((i==null?void 0:i.insertionMode)==="insertBefore"||(i==null?void 0:i.insertionMode)==="insertAfter")||t.length===0&&this.model.selectionIsCollapsed)return!1;if(this.flushInlineShortcutBuffer(),i=i??{mode:"math"},i.focus&&this.focus(),i.feedback&&(globalThis.MathfieldElement.keypressVibration&&B0()&&navigator.vibrate(ep),globalThis.MathfieldElement.playSound("keypress")),t==="\\\\")op(this.model);else if(t==="&")lp(this.model);else if(this.model.selectionIsCollapsed){let r=f({},Bi(this));!/^[a-zA-Z0-9]$/.test(t)&&this.styleBias!=="none"&&(r.variant="normal",r.variantStyle=void 0),Z.insert(this.model,t,f({style:r},i))}else Z.insert(this.model,t,i);return this.snapshot(`insert-${this.model.at(this.model.position).type}`),se(this),i.scrollIntoView&&this.scrollIntoView(),!0}switchMode(t,i="",r=""){if(this.model.mode===t||!this.hasEditableContent||!this.contentEditable||this.disabled)return;let{model:a}=this,n=a.mode;if(a.mode=t,this.host&&!this.host.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0,cancelable:!0}))){a.mode=n;return}a.mode=n,a.deferNotifications({content:!!r||!!i,selection:!0,type:"insertText"},()=>{let o=a.at(a.position),l=(d,h)=>{if(!d)return;let p=a.mode==="math"?De(ua(d,{format:"ascii-math"})[1],{context:this.context}):[...d].map(m=>new Mr(m,m,{}));if(h.select){let m=o.parent.addChildrenAfter(p,o);a.setSelection(a.offsetOf(p[0].leftSibling),a.offsetOf(m))}else a.position=a.offsetOf(o.parent.addChildrenAfter(p,o));c=!0},s=(d,h)=>{let p=new Qr(d);o.parent.addChildAfter(p,o),h.select?a.setSelection(a.offsetOf(p.firstChild),a.offsetOf(p.lastChild)):a.position=a.offsetOf(p.lastChild),c=!0},u=()=>{let d=t==="latex"?"latex":t==="math"?"plain-text":"ascii-math",h=we(a.selection),p=this.model.getValue(h,d),m=this.model.extractAtoms(h);return m.length===1&&m[0].type==="placeholder"&&(p=r),o=a.at(h[0]),p},c=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),ai(this,"accept"),a.selectionIsCollapsed)l(i,{select:!1}),a.mode=t,t==="latex"?s(r,{select:!1}):l(r,{select:!1});else{let d=u();a.mode=t,t==="latex"?s(d,{select:!0}):l(d,{select:!0})}return se(this),this.undoManager.snapshot(t==="latex"?"insert-latex":"insert"),c}),a.mode=t,window.mathVirtualKeyboard.update(Ut(this))}hasFocus(){return!this.blurred}focus(t){var i;this.disabled||this.focusBlurInProgress||(this.hasFocus()||(this.programmaticFocusInProgress=!0,this.onFocus(),this.model.announce("line")),(i=t==null?void 0:t.preventScroll)!=null&&i||this.scrollIntoView())}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]},this.focus()}applyStyle(t,i={}){var r;let a,n="set",o=!1;Gn(i)?a=i:(i.operation==="toggle"&&(n="toggle"),a=i.range,o=(r=i.silenceNotifications)!=null?r:!1),a&&(a=this.model.normalizeRange(a)),a&&a[0]===a[1]&&(a=void 0);let l=Wl(this,t);if(a===void 0&&this.model.selectionIsCollapsed){if(n==="set"){let c=f({},this.defaultStyle);"color"in l&&delete c.verbatimColor,"backgroundColor"in l&&delete c.verbatimBackgroundColor,this.defaultStyle=f(f({},c),l),this.styleBias="none";return}let s=Bi(this),u=f({},this.defaultStyle);for(let c of Object.keys(l))s[c]===l[c]?(c==="color"&&delete u.verbatimColor,c==="backgroundColor"&&delete u.verbatimBackgroundColor,delete u[c]):u[c]=l[c];this.defaultStyle=u,this.styleBias="none";return}this.model.deferNotifications({content:!o,type:"insertText"},()=>{if(a===void 0)for(let s of this.model.selection.ranges)Vl(this.model,s,l,{operation:n});else Vl(this.model,a,l,{operation:n})}),se(this)}toggleContextMenu(){var t;let i=this.menu;if(!i.visible)return!1;if(i.state==="open")return i.hide(),!0;let r=(t=ih(this,this.model.position))==null?void 0:t.bounds;if(!r)return!1;let a={x:r.right,y:r.bottom};return i.show({target:this.element.querySelector("[part=container]"),location:a,onDismiss:()=>{var n;return(n=this.element)==null?void 0:n.focus()}}),!0}getPrompt(t){return this.model.findAtom(r=>r.type==="prompt"&&r.placeholderId===t)}getPromptValue(t,i){let r=this.getPrompt(t);if(!r)return"";let a=this.model.offsetOf(r.firstChild),n=this.model.offsetOf(r.lastChild);return this.model.getValue(a,n,i)}getPrompts(t){return this.model.atoms.filter(i=>i.type!=="prompt"?!1:t?!(t.id&&i.placeholderId!==t.id||t.locked&&i.locked!==t.locked||t.correctness==="undefined"&&i.correctness||t.correctness&&i.correctness!==t.correctness):!0).map(i=>i.placeholderId)}setPromptValue(t,i,r){if(i!==void 0){let a=this.getPrompt(t);if(!a){console.error(`MathLive 0.108.3: unknown prompt ${t}`);return}let n=this.model.getBranchRange(this.model.offsetOf(a),"body");this.model.setSelection(n),this.insert(i,y(f({},r),{insertionMode:"replaceSelection"}))}r!=null&&r.silenceNotifications&&(this.valueOnFocus=this.getValue()),se(this)}setPromptState(t,i,r){let a=this.getPrompt(t);if(!a){console.error(`MathLive 0.108.3: unknown prompt ${t}`);return}i==="undefined"?a.correctness=void 0:typeof i=="string"&&(a.correctness=i),typeof r=="boolean"&&(a.locked=r,a.captureSelection=r),se(this)}getPromptState(t){let i=this.getPrompt(t);return i?[i.correctness,i.locked]:(console.error(`MathLive 0.108.3: unknown prompt ${t}`),[void 0,!0])}getPromptRange(t){let i=this.getPrompt(t);return i?this.model.getBranchRange(this.model.offsetOf(i),"body"):(console.error(`MathLive 0.108.3: unknown prompt ${t}`),[0,0])}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ut(this))}snapshot(t){var i;this.undoManager.snapshot(t)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ut(this)),(i=this.host)==null||i.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"snapshot"}})))}stopCoalescingUndo(){this.undoManager.stopCoalescing(this.model.selection)}stopRecording(){this.undoManager.stopRecording()}startRecording(){this.undoManager.startRecording()}undo(){var t;this.undoManager.undo()&&((t=this.host)==null||t.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}redo(){var t;this.undoManager.redo()&&((t=this.host)==null||t.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"redo"}})))}resetUndo(){var t;(t=this.undoManager)==null||t.reset()}onSelectionDidChange(){var t,i;let r=this.model;if(r.mathfield.hasFocus()&&this.keyboardDelegate.setValue(r.getValue(r.selection,"latex-expanded")),r.selectionIsCollapsed){let a=Ls(r),n=r.position,o=r.at(n),l=(t=o.mode)!=null?t:Zd(this.options);if(a&&(n<r.offsetOf(a.firstChild)-1||n>r.offsetOf(a.lastChild)+1))ai(this,"accept",{mode:l}),r.position=r.offsetOf(o);else{let s=r.at(n+1);(s==null?void 0:s.type)==="first"&&s.mode==="latex"?r.position=n+1:a&&(s==null?void 0:s.mode)!=="latex"?r.position=n-1:this.switchMode(l)}}(i=this.host)==null||i.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Ut(this)),Cn(this)}onContentWillChange(t){var i,r,a;return(a=(r=this.host)==null?void 0:r.dispatchEvent(new InputEvent("beforeinput",y(f({},t),{data:t.data?t.data:(i=t.inputType)!=null?i:"",cancelable:!0,bubbles:!0,composed:!0}))))!=null?a:!0}onFocus(t){if(this.disabled||this.focusBlurInProgress||!this.blurred)return;let i=Yr._globallyFocusedMathfield;i&&i!==this&&!i.disabled&&i.hasFocus()&&i.onBlur({dispatchEvents:!0}),this.focusBlurInProgress=!0,this.blurred=!1,Yr._globallyFocusedMathfield=this,this.stopCoalescingUndo(),this.valueOnFocus=this.model.getValue(),this.hasEditablePrompts&&!this.model.at(this.model.anchor).parentPrompt&&this.executeCommand("moveToNextPlaceholder"),Ai(this,{interactive:!0}),setTimeout(()=>{var r,a;if(wt(this))if((r=t==null?void 0:t.suppressEvents)!=null&&r){let n=new AbortController,o=n.signal,l=s=>{s.preventDefault(),s.stopPropagation()};for(let s of["focus","focusin"])(a=this.host)==null||a.addEventListener(s,l,{capture:!0,signal:o});this.focusBlurInProgress=!1,this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),setTimeout(()=>n.abort(),0)}else this.focusBlurInProgress=!1,this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),setTimeout(()=>{this.programmaticFocusInProgress=!1},0)},60)}onBlur(t){var i,r,a,n;if(!(this.focusBlurInProgress||this.blurred)&&(this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,Yr._globallyFocusedMathfield===this&&(Yr._globallyFocusedMathfield=void 0),this.ariaLiveText&&(this.ariaLiveText.textContent=""),wr(this),this.model.getValue()!==this.valueOnFocus&&((i=this.host)==null||i.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),((r=t==null?void 0:t.dispatchEvents)==null||r)&&((a=this.host)==null||a.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(n=this.host)==null||n.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0}))),se(this),this.focusBlurInProgress=!1,ts(),Fs.restoreFocusWhenDocumentFocused)){let o=new AbortController,l=o.signal;window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{wt(this)&&this.focus({preventScroll:!0})},{once:!0,signal:l})},{once:!0,signal:l}),document.addEventListener("focusin",()=>o.abort(),{once:!0}),document.addEventListener("click",()=>o.abort(),{once:!0})}}onInput(t){Zl(this,t)}onKeystroke(t){return fp(this,t)}onCompositionStart(t){Ct(this.model,we(this.model.selection),"insertText");let i=$n(this.field);i&&requestAnimationFrame(()=>{Ai(this),this.keyboardDelegate.moveTo(i.x,i.y-i.height)})}onCompositionUpdate(t){X1(this.model,t),se(this)}onCompositionEnd(t){G1(this.model),Zl(this,t,{simulateKeystroke:!0})}onCut(t){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),t.clipboardData?Z.onCopy(this,t):Z.copyToClipboard(this,"latex"),Ct(this.model,we(this.model.selection),"deleteByCut"),this.snapshot("cut"),se(this))}onCopy(t){t.clipboardData?Z.onCopy(this,t):Z.copyToClipboard(this,"latex")}onPaste(t){let i=this.isSelectionEditable;return i&&(i=Z.onPaste(this.model.at(this.model.position).mode,this,t.clipboardData)),i||this.model.announce("plonk"),t.preventDefault(),t.stopPropagation(),i}onGeometryChange(){var t;(t=this._menu)==null||t.hide(),_o(this),Cn(this)}onWheel(t){let i=5*t.deltaX;if(!Number.isFinite(i)||i===0)return;let r=this.field;i<0&&r.scrollLeft===0||i>0&&r.offsetWidth+r.scrollLeft>=r.scrollWidth||(r.scrollBy({top:0,left:i}),t.preventDefault(),t.stopPropagation())}getHTMLElement(t){let i=t;for(;!i.id&&i.hasChildren;)i=t.children[0];return this.field.querySelector(`[data-atom-id="${i.id}"]`)}get context(){var t,i;return{registers:(t=this.options.registers)!=null?t:{},smartFence:this.smartFence,letterShapeStyle:this.letterShapeStyle,minFontScale:this.minFontScale,maxMatrixCols:this.maxMatrixCols,placeholderSymbol:(i=this.options.placeholderSymbol)!=null?i:"▢",colorMap:r=>this.colorMap(r),backgroundColorMap:r=>this.backgroundColorMap(r),getMacro:r=>gs(r,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};Me({speak:(e,t,i)=>P4(e,t,i)},{target:"mathfield"});function P4(e,t,i){var r;i=i??{withHighlighting:!1};let{model:a}=e;function n(c){let d=null;switch(c){case"all":d=a.root;break;case"selection":d=a.getAtoms(a.selection);break;case"left":{d=a.getAtoms(a.offsetOf(a.at(a.position).leftSibling),a.position);break}case"right":{d=a.getAtoms(a.position,a.offsetOf(a.at(a.position).rightSibling));break}case"group":d=a.getAtoms(a.getSiblingsRange(a.position));break;case"parent":{let{parent:h}=a.at(a.position);h!=null&&h.parent?d=h:d=a.root;break}default:d=a.root}return d}function o(c){let d="";switch(c){case"all":console.error("Internal failure: speak all failed");break;case"selection":d="no selection";break;case"left":d="at start";break;case"right":d="at end";break;case"group":console.error("Internal failure: speak group failed");break;case"parent":d="no parent";break;default:console.error('unknown speak_ param value: "'+c+'"');break}return d}let l=globalThis.MathfieldElement,s=n(t);if(s===null)return(r=l.speakHook)==null||r.call(l,o(t)),!1;(i.withHighlighting||l.speechEngine==="amazon")&&(l.textToSpeechMarkup=globalThis.sre&&l.textToSpeechRules==="sre"?"ssml_step":"ssml");let u=Fi(s);return Ue()&&i.withHighlighting?(Xt().readAloudMathfield=e,Ai(e,{forHighlighting:!0}),l.readAloudHook&&l.readAloudHook(e.field,u)):l.speakHook&&l.speakHook(u),!1}function O4(e){var t,i;if(!Ue())return;let r=globalThis.MathfieldElement;if(!r.speechEngine||r.speechEngine==="local"){let a=new SpeechSynthesisUtterance(e);globalThis.speechSynthesis.speak(a)}else if(r.speechEngine==="amazon")if(!("AWS"in window))console.error("MathLive 0.108.3: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");else{let a=new globalThis.AWS.Polly({apiVersion:"2016-06-10"}),n={OutputFormat:"mp3",VoiceId:(t=r.speechEngineVoice)!=null?t:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((i=r.speechEngineVoice)!=null?i:"Joanna")?"neural":"standard",Text:e,TextType:"ssml"};a.synthesizeSpeech(n,(o,l)=>{if(o)console.trace(`MathLive 0.108.3: \`polly.synthesizeSpeech()\` error: ${o}`);else if(l!=null&&l.AudioStream){let s=new Uint8Array(l.AudioStream),u=new Blob([s.buffer],{type:"audio/mpeg"}),c=URL.createObjectURL(u);new Audio(c).play().catch(d=>console.error(d))}})}else r.speechEngine==="google"&&console.error("MathLive 0.108.3: The Google speech engine is not supported yet. Please come again.")}function zp(e){if(e&&(e.classList.remove("ML__highlight"),e.children))for(let t of e.children)zp(t)}function ss(e,t){var i;e&&(!t||((i=e.dataset)==null?void 0:i.atomId)===t?(e.classList.add("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(r=>{r instanceof HTMLElement&&ss(r)})):(e.classList.remove("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(r=>{r instanceof HTMLElement&&ss(r,t)})))}function I4(e,t){var i;if(!Ue())return;if(globalThis.MathfieldElement.speechEngine!=="amazon"){console.error("MathLive 0.108.3: Use Amazon TTS Engine for synchronized highlighting"),typeof globalThis.MathfieldElement.speakHook=="function"&&globalThis.MathfieldElement.speakHook(t);return}if(!globalThis.AWS){console.error("MathLive 0.108.3: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");return}let r=new globalThis.AWS.Polly({apiVersion:"2016-06-10"}),a={OutputFormat:"json",VoiceId:(i=globalThis.MathfieldElement.speechEngineVoice)!=null?i:"Joanna",Engine:"standard",Text:t,TextType:"ssml",SpeechMarkTypes:["ssml"]};Xt().readAloudElement=e,r.synthesizeSpeech(a,(n,o)=>{if(n){console.trace(`MathLive 0.108.3: \`polly.synthesizeSpeech()\` error: ${n}`);return}if(!(o!=null&&o.AudioStream))return;let l=new TextDecoder("utf-8").decode(new Uint8Array(o.AudioStream));Xt().readAloudMarks=l.split(`
3224`).map(s=>s?JSON.parse(s):{}),Xt().readAloudTokens=[];for(let s of Xt().readAloudMarks)s.value&&Xt().readAloudTokens.push(s.value);Xt().readAloudCurrentMark="",a.OutputFormat="mp3",a.SpeechMarkTypes=[],r.synthesizeSpeech(a,(s,u)=>{if(s){console.trace(`MathLive 0.108.3: \`polly.synthesizeSpeech("${t}") error:${s}`);return}if(!(u!=null&&u.AudioStream))return;let c=new Uint8Array(u.AudioStream),d=new Blob([c.buffer],{type:"audio/mpeg"}),h=URL.createObjectURL(d),p=Xt();p.readAloudAudio?p.readAloudAudio.pause():(p.readAloudAudio=new Audio,p.readAloudAudio.addEventListener("ended",()=>{let m=p.readAloudMathfield;p.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),m?(Ai(m),p.readAloudElement=null,p.readAloudMathfield=null,p.readAloudTokens=[],p.readAloudMarks=[],p.readAloudCurrentMark=""):zp(p.readAloudElement)}),p.readAloudAudio.addEventListener("timeupdate",()=>{let m="",g=p.readAloudAudio.currentTime*1e3+100;for(let v of p.readAloudMarks)v.time<g&&(m=v.value);p.readAloudCurrentMark!==m&&(p.readAloudCurrentToken=m,m&&m===p.readAloudFinalToken?p.readAloudAudio.pause():(p.readAloudCurrentMark=m,ss(p.readAloudElement,p.readAloudCurrentMark)))})),p.readAloudAudio.src=h,p.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),p.readAloudAudio.play()})})}Ue()||console.error('MathLive 0.108.3: this version of the MathLive library is for use in the browser. A subset of the API is available on the server side in the "mathlive-ssr" library. If using server side rendering (with React for example) you may want to do a dynamic import of the MathLive library inside a `useEffect()` call.');var X=new WeakMap,R4=.5,Wt={letterShapeStyle:"mf.letterShapeStyle = ...",horizontalSpacingScale:'Removed. Use `"thinmuskip"`, `"medmuskip"`, and `"thickmuskip"` registers ',macros:"mf.macros = ...",registers:"mf.registers = ...",backgroundColorMap:"mf.backgroundColorMap = ...",colorMap:"mf.colorMap = ...",enablePopover:"mf.popoverPolicy = ...",mathModeSpace:"mf.mathModeSpace = ...",placeholderSymbol:"mf.placeholderSymbol = ...",readOnly:"mf.readOnly = ...",removeExtraneousParentheses:"mf.removeExtraneousParentheses = ...",scriptDepth:"mf.scriptDepth = ...",smartFence:"mf.smartFence = ...",smartMode:"mf.smartMode = ...",smartSuperscript:"mf.smartSuperscript = ...",inlineShortcutTimeout:"mf.inlineShortcutTimeout = ...",inlineShortcuts:"mf.inlineShortcuts = ...",keybindings:"mf.keybindings = ...",virtualKeyboardMode:"mf.mathVirtualKeyboardPolicy = ...",customVirtualKeyboardLayers:"mathVirtualKeyboard.layers = ...",customVirtualKeyboards:"mathVirtualKeyboard.layouts = ...",keypressSound:"mathVirtualKeyboard.keypressSound = ...",keypressVibration:"mathVirtualKeyboard.keypressVibration = ...",plonkSound:"mathVirtualKeyboard.plonkSound = ...",virtualKeyboardContainer:"mathVirtualKeyboard.container = ...",virtualKeyboardLayout:"mathVirtualKeyboard.alphabeticLayout = ...",virtualKeyboardTheme:"No longer supported",virtualKeyboardToggleGlyph:"No longer supported",virtualKeyboardToolbar:"mathVirtualKeyboard.editToolbar = ...",virtualKeyboards:"Use `mathVirtualKeyboard.layouts`",speechEngine:"`MathfieldElement.speechEngine`",speechEngineRate:"`MathfieldElement.speechEngineRate`",speechEngineVoice:"`MathfieldElement.speechEngineVoice`",textToSpeechMarkup:"`MathfieldElement.textToSpeechMarkup`",textToSpeechRules:"`MathfieldElement.textToSpeechRules`",textToSpeechRulesOptions:"`MathfieldElement.textToSpeechRulesOptions`",readAloudHook:"`MathfieldElement.readAloudHook`",speakHook:"`MathfieldElement.speakHook`",computeEngine:"`MathfieldElement.computeEngine`",fontsDirectory:"`MathfieldElement.fontsDirectory`",soundsDirectory:"`MathfieldElement.soundsDirectory`",createHTML:"`MathfieldElement.createHTML`",onExport:"`mf.onExport`",onInlineShortcut:"`mf.onInlineShortcut`",onScrollIntoView:"`mf.onScrollIntoView`",locale:"MathfieldElement.locale = ...",strings:"MathfieldElement.strings = ...",decimalSeparator:"MathfieldElement.decimalSeparator = ...",fractionNavigationOrder:"MathfieldElement.fractionNavigationOrder = ..."},de=class Jt extends HTMLElement{constructor(t){if(super(),this._observer=null,t){let i=[];for(let r of Object.keys(t))if(Wt[r])if(Wt[r].startsWith("mf."))if(Wt[r].startsWith(`mf.${r}`))i.push(`Option \`${r}\` cannot be used as a constructor option. Use ${Wt[r]}`);else{let a=Wt[r].match(/([a-zA-Z]+) =/);i.push(`Option \`${r}\` has been renamed \`${a[1]}\``)}else i.push(`Option \`${r}\` cannot be used as a constructor option. Use ${Wt[r]}`);if(i.length>0){console.group("%cMathLive 0.108.3: %cInvalid Options","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn("Some of the options passed to `new MathfieldElement(...)` are invalid. \n          See mathfield/changelog/ for details.");for(let r of i)console.warn(r);console.groupEnd()}}if(ar()&&(this._internals=this.attachInternals(),this._internals.role="math",this._internals.ariaLabel="math input field",this._internals.ariaMultiLine="false"),this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot&&"adoptedStyleSheets"in this.shadowRoot){this.shadowRoot.adoptedStyleSheets=[Mi("core"),Mi("mathfield"),Mi("mathfield-element"),Mi("ui"),Mi("menu")],this.shadowRoot.appendChild(document.createElement("span"));let i=document.createElement("slot");i.style.display="none",this.shadowRoot.appendChild(i)}else this.shadowRoot.innerHTML="<style>"+Zt("core")+Zt("mathfield")+Zt("mathfield-element")+Zt("ui")+Zt("menu")+'</style><span></span><slot style="display:none"></slot>';t&&this._setOptions(t)}static get formAssociated(){return ar()}static get optionsAttributes(){return{"default-mode":"string","letter-shape-style":"string","min-font-scale":"number","max-matrix-cols":"number","popover-policy":"string","math-mode-space":"string","read-only":"boolean","remove-extraneous-parentheses":"on/off","smart-fence":"on/off","smart-mode":"on/off","smart-superscript":"on/off","inline-shortcut-timeout":"string","script-depth":"string",placeholder:"string","virtual-keyboard-target-origin":"string","math-virtual-keyboard-policy":"string"}}static get observedAttributes(){return[...Object.keys(this.optionsAttributes),"contenteditable","disabled","readonly","read-only"]}static get fontsDirectory(){return this._fontsDirectory}static set fontsDirectory(t){t!==this._fontsDirectory&&(this._fontsDirectory=t,y1())}get fontsDirectory(){throw new Error("Use MathfieldElement.fontsDirectory instead")}set fontsDirectory(t){throw new Error("Use MathfieldElement.fontsDirectory instead")}static get soundsDirectory(){return this._soundsDirectory}static set soundsDirectory(t){this._soundsDirectory=t,this.audioBuffers={}}get soundsDirectory(){throw new Error("Use MathfieldElement.soundsDirectory instead")}set soundsDirectory(t){throw new Error("Use MathfieldElement.soundsDirectory instead")}static get keypressSound(){return this._keypressSound}static set keypressSound(t){var i,r,a;this.audioBuffers={},t===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:typeof t=="string"?this._keypressSound={spacebar:t,return:t,delete:t,default:t}:typeof t=="object"&&"default"in t&&(this._keypressSound={spacebar:(i=t.spacebar)!=null?i:t.default,return:(r=t.return)!=null?r:t.default,delete:(a=t.delete)!=null?a:t.default,default:t.default})}static get plonkSound(){return this._plonkSound}static set plonkSound(t){this.audioBuffers={},this._plonkSound=t}static get audioContext(){return this._audioContext||(this._audioContext=new AudioContext),this._audioContext}static get speechEngine(){return this._speechEngine}static set speechEngine(t){this._speechEngine=t}static get speechEngineRate(){return this._speechEngineRate}static set speechEngineRate(t){this._speechEngineRate=t}static get speechEngineVoice(){return this._speechEngineVoice}static set speechEngineVoice(t){this._speechEngineVoice=t}static get textToSpeechMarkup(){return this._textToSpeechMarkup}static set textToSpeechMarkup(t){this._textToSpeechMarkup=t}static get textToSpeechRules(){return this._textToSpeechRules}static set textToSpeechRules(t){this._textToSpeechRules=t}static get textToSpeechRulesOptions(){return this._textToSpeechRulesOptions}static set textToSpeechRulesOptions(t){this._textToSpeechRulesOptions=t}static get locale(){return O.locale}static set locale(t){t==="auto"&&(t=navigator.language.slice(0,5)),O.locale=t}get locale(){throw new Error("Use MathfieldElement.locale instead")}set locale(t){throw new Error("Use MathfieldElement.locale instead")}static get strings(){return O.strings}static set strings(t){O.merge(t)}get strings(){throw new Error("Use MathfieldElement.strings instead")}set strings(t){throw new Error("Use MathfieldElement.strings instead")}static get decimalSeparator(){return this._decimalSeparator}static set decimalSeparator(t){this._decimalSeparator=t,this._computeEngine&&(this._computeEngine.decimalSeparator=this.decimalSeparator===","?"{,}":".")}get decimalSeparator(){throw new Error("Use MathfieldElement.decimalSeparator instead")}set decimalSeparator(t){throw new Error("Use MathfieldElement.decimalSeparator instead")}static set scientificNotationTemplate(t){this._scientificNotationTemplate=t}static get scientificNotationTemplate(){return this._scientificNotationTemplate}static get fractionNavigationOrder(){return Pn.fractionNavigationOrder}static set fractionNavigationOrder(t){if(t!=="numerator-denominator"&&t!=="denominator-numerator")throw new Error("Invalid value");Pn.fractionNavigationOrder!==t&&(Pn.fractionNavigationOrder=t,Xd())}static get computeEngine(){var t,i;if(this._computeEngine===void 0){let r=(t=window[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;if(!r)return null;this._computeEngine=new r,this._computeEngine&&this.decimalSeparator===","&&(this._computeEngine.decimalSeparator="{,}")}return(i=this._computeEngine)!=null?i:null}static set computeEngine(t){this._computeEngine=t}get computeEngine(){throw new Error("Use MathfieldElement.computeEngine instead")}set computeEngine(t){throw new Error("Use MathfieldElement.computeEngine instead")}static get isFunction(){return typeof this._isFunction!="function"?()=>!1:this._isFunction}static set isFunction(t){this._isFunction=t,Xd()}static async loadSound(t){delete this.audioBuffers[t];let i="";switch(t){case"keypress":i=this._keypressSound.default;break;case"return":i=this._keypressSound.return;break;case"spacebar":i=this._keypressSound.spacebar;break;case"delete":i=this._keypressSound.delete;break;case"plonk":i=this.plonkSound;break}if(typeof i!="string")return;i=i.trim();let r=this.soundsDirectory;if(!(r==null||r==="null"||i==="none"||i==="null"))try{let a=await(await fetch(await Zh(`${r}/${i}`))).arrayBuffer(),n=await this.audioContext.decodeAudioData(a);this.audioBuffers[t]=n}catch{}}static async playSound(t){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&await this.audioContext.resume(),this.audioBuffers[t]||await this.loadSound(t),!this.audioBuffers[t])return;let i=this.audioContext.createBufferSource();i.buffer=this.audioBuffers[t];let r=this.audioContext.createGain();r.gain.value=R4,i.connect(r).connect(this.audioContext.destination),i.start()}showMenu(t){var i,r;return(r=(i=this._mathfield)==null?void 0:i.showMenu(t))!=null?r:!1}get mathVirtualKeyboard(){throw new Error("The `mathVirtualKeyboard` property is not available on the MathfieldElement. Use `window.mathVirtualKeyboard` instead.")}onPointerDown(){window.addEventListener("pointerup",t=>{let i=this._mathfield;if(i&&t.target===this&&!i.disabled){this.dispatchEvent(new MouseEvent("click",{altKey:t.altKey,button:t.button,buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,metaKey:t.metaKey,movementX:t.movementX,movementY:t.movementY,relatedTarget:t.relatedTarget,screenX:t.screenX,screenY:t.screenY,shiftKey:t.shiftKey}));let r=this.getOffsetFromPoint(t.clientX,t.clientY);r>=0&&Jt.openUrl(of(i,r)),t.pointerType==="touch"&&this.selectionIsCollapsed&&(this.position=r)}},{once:!0})}getPromptValue(t,i){var r,a;return(a=(r=this._mathfield)==null?void 0:r.getPromptValue(t,i))!=null?a:""}setPromptValue(t,i,r){var a;(a=this._mathfield)==null||a.setPromptValue(t,i,r)}getPromptRange(t){var i,r;return(r=(i=this._mathfield)==null?void 0:i.getPromptRange(t))!=null?r:null}getPrompts(t){var i,r;return(r=(i=this._mathfield)==null?void 0:i.getPrompts(t))!=null?r:[]}get hasEditableContent(){var t,i;return(i=(t=this._mathfield)==null?void 0:t.hasEditableContent)!=null?i:!1}get form(){var t;return(t=this._internals)==null?void 0:t.form}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}get type(){return this.localName}get mode(){var t,i;return(i=(t=this._mathfield)==null?void 0:t.model.mode)!=null?i:this.defaultMode==="text"?"text":"math"}set mode(t){var i;(i=this._mathfield)==null||i.switchMode(t)}get expression(){if(this._mathfield)return window[Symbol.for("io.cortexjs.compute-engine")]?this._mathfield.expression:(console.error(`MathLive 0.108.3: The CortexJS Compute Engine library is not available.
3225        
3226        Load the library, for example with:
3227        
3228        import "https://esm.run/@cortex-js/compute-engine"`),null)}set expression(t){var i,r;if(!this._mathfield)return;let a=(r=(i=Jt.computeEngine)==null?void 0:i.box(t).latex)!=null?r:null;a!==null&&this._mathfield.setValue(a),window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`MathLive 0.108.3: The Compute Engine library is not available.
3229        
3230        Load the library, for example with:
3231        
3232        import "https://esm.run/@cortex-js/compute-engine"`)}get errors(){var t,i;return(i=(t=this._mathfield)==null?void 0:t.errors)!=null?i:[]}_getOptions(t){return this._mathfield?Si(this._mathfield.options,t):X.has(this)?f({},Si(f(f({},Rn()),ro(X.get(this).options)),t)):null}getOptions(t){return console.warn("%cMathLive 0.108.3: %cDeprecated Usage%c\n      `mf.getOptions()` is deprecated. Read the property directly on the mathfield instead.\n      See mathfield/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._mathfield?Si(this._mathfield.options,t):X.has(this)?Si(f(f({},Rn()),ro(X.get(this).options)),t):null}reflectAttributes(){let t=Rn(),i=this._getOptions();Object.keys(Jt.optionsAttributes).forEach(r=>{let a=r==="placeholder"?"contentPlaceholder":kt(r);Jt.optionsAttributes[r]==="on/off"?t[a]!==i[a]?this.setAttribute(r,i[a]?"on":"off"):this.removeAttribute(r):t[a]!==i[a]&&(Jt.optionsAttributes[r]==="boolean"?i[a]?this.setAttribute(r,""):this.removeAttribute(r):(typeof i[a]=="string"||typeof i[a]=="number")&&this.setAttribute(r,i[a].toString()))})}getOption(t){return console.warn("%cMathLive 0.108.3: %cDeprecated Usage%c\n      `mf.getOption()` is deprecated. Read the property directly on the mathfield instead.\n      See mathfield/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._getOptions([t])[t]}_getOption(t){return this._getOptions([t])[t]}_setOptions(t){if(this._mathfield)this._mathfield.setOptions(t);else if(X.has(this)){let i=f(f({},X.get(this).options),t);X.set(this,y(f({},X.get(this)),{selection:{ranges:i.readOnly?[[0,0]]:[[0,-1]]},options:i}))}else X.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:t,menuItems:void 0});this.reflectAttributes()}setOptions(t){console.group("%cMathLive 0.108.3: %cDeprecated Usage","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn(" `mf.setOptions()` is deprecated. Set the property directly on the mathfield instead.\n      See mathfield/changelog/ for details.");for(let i of Object.keys(t))Wt[i]&&console.warn(`\`mf.setOptions({${i}:...})\` -> ${Wt[i]}`);console.groupEnd(),this._setOptions(t)}executeCommand(...t){var i,r;let a;if(t.length===1?a=t[0]:a=[t[0],...t.slice(1)],a)return(r=(i=this._mathfield)==null?void 0:i.executeCommand(a))!=null?r:!1;throw new Error("Invalid selector")}getValue(t,i,r){var a,n;if(this._mathfield)return this._mathfield.model.getValue(t,i,r);if(X.has(this)){let o,l,s;if(zn(t)?([o,l]=t.ranges[0],s=i):Gn(t)?([o,l]=t,s=i):Gt(t)&&Gt(i)?(o=t,l=i,s=r):(o=0,l=-1,s=t),(s===void 0||s==="latex")&&o===0&&l===-1)return(n=(a=X.get(this).value)!=null?a:this.textContent)!=null?n:""}return""}setValue(t,i){if(this._mathfield&&t!==void 0){if(this._mathfield.model.getValue()===t)return;i!=null||(i={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(t,i);return}if(X.has(this)){let a=X.get(this).options;X.set(this,{value:t,selection:{ranges:[[-1,-1]],direction:"forward"},options:a,menuItems:void 0});return}let r=Bn(this);X.set(this,{value:t,selection:{ranges:[[-1,-1]],direction:"forward"},options:r,menuItems:void 0})}hasFocus(){var t,i;return(i=(t=this._mathfield)==null?void 0:t.hasFocus())!=null?i:!1}focus(){var t;this.disabled||(t=this._mathfield)==null||t.focus()}blur(){var t;(t=this._mathfield)==null||t.blur()}select(){var t;(t=this._mathfield)==null||t.select()}insert(t,i){var r,a;return(a=(r=this._mathfield)==null?void 0:r.insert(t,i))!=null?a:!1}applyStyle(t,i){var r;return(r=this._mathfield)==null?void 0:r.applyStyle(t,i)}queryStyle(t){var i,r;return(r=(i=this._mathfield)==null?void 0:i.queryStyle(t))!=null?r:"none"}getOffsetFromPoint(t,i,r){return this._mathfield?qn(this._mathfield,t,i,r):-1}getElementInfo(t){return ih(this._mathfield,t)}resetUndo(){var t;(t=this._mathfield)==null||t.resetUndo()}canUndo(){return this._mathfield?this._mathfield.canUndo():!1}canRedo(){return this._mathfield?this._mathfield.canRedo():!1}handleEvent(t){var i,r,a,n,o;if(Qe.state!=="closed"||((r=(i=this._mathfield)==null?void 0:i.menu)==null?void 0:r.state)!=="closed"||(t.type==="pointerdown"&&this.onPointerDown(),t.type==="focus")||t.type!=="blur")return;let l=E0();l&&(a=window==null?void 0:window.mathVirtualKeyboard)!=null&&a.visible||((n=Qe.scrim)==null?void 0:n.state)!=="closed"||l&&qp()||(o=this._mathfield)==null||o.onBlur({dispatchEvents:!1})}connectedCallback(){var t,i,r,a;let n=this.shadowRoot,o=n.host,l=window.getComputedStyle(this).userSelect!=="none";if(l)o.addEventListener("pointerdown",this,!0);else{let c=n.querySelector("span");c.style.pointerEvents="none"}o.addEventListener("focus",this,!0),o.addEventListener("blur",this,!0),this._observer=new MutationObserver(()=>{var c;this.value=(c=this.textContent)!=null?c:""}),this._observer.observe(this,{childList:!0,characterData:!0,subtree:!0}),ar()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),l&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");let s=n.querySelector("slot:not([name])");if(s)try{this._style=s.assignedElements().filter(c=>c.tagName.toLowerCase()==="style").map(c=>c.textContent).join("")}catch(c){console.error(c)}if(this._style){let c=document.createElement("style");c.textContent=this._style,n.appendChild(c)}let u="";if(this.hasAttribute("value")?u=this.getAttribute("value"):u=(t=s==null?void 0:s.assignedNodes().map(c=>c.nodeType===3?c.textContent:"").join("").trim())!=null?t:"",this._mathfield=new $4(n.querySelector(":host > span"),y(f({},(r=(i=X.get(this))==null?void 0:i.options)!=null?r:Bn(this)),{eventSink:this,value:u})),!X.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(let c of Object.keys(Jt.optionsAttributes))this.upgradeProperty(kt(c))}if(!((a=this._mathfield)!=null&&a.model)){this._mathfield=null;return}if(X.has(this)){let c=this._mathfield,d=X.get(this),h=d.menuItems;c.model.deferNotifications({content:!1,selection:!1},()=>{let p=d.value;p!==void 0&&c.setValue(p),c.model.selection=d.selection,X.delete(this)}),h&&(this.menuItems=h)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),wa()}disconnectedCallback(){var t,i,r;if(this.shadowRoot.host.removeEventListener("pointerdown",this,!0),!this._mathfield)return;(t=this._observer)==null||t.disconnect(),this._observer=null,window.queueMicrotask(()=>this.dispatchEvent(new Event("unmount",{cancelable:!1,bubbles:!0,composed:!0})));let a=Si(this._mathfield.options,Object.keys(Jt.optionsAttributes).map(n=>kt(n)));X.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,menuItems:(r=(i=this._mathfield.menu)==null?void 0:i.menuItems)!=null?r:void 0,options:a}),this._mathfield.dispose(),this._mathfield=null}upgradeProperty(t){if(this.hasOwnProperty(t)){let i=this[t];delete this[t],(t==="readonly"||t==="read-only")&&(t="readOnly"),this[t]=i}}attributeChangedCallback(t,i,r){if(i===r)return;let a=r!==null;switch(t){case"contenteditable":se(this._mathfield);break;case"placeholder":r===!1&&(r=""),this.placeholder=r;break;case"disabled":this.disabled=a;break;case"read-only":case"readonly":this.readOnly=a;break}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(t){let i=!!t;i?(this.setAttribute("readonly",""),ar()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(ar()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:i})}get disabled(){return this.hasAttribute("disabled")}set disabled(t){var i;let r=!!t;r?this.setAttribute("disabled",""):this.removeAttribute("disabled"),ar()?this._internals.ariaDisabled=r?"true":"false":this.setAttribute("aria-disabled",r?"true":"false"),r&&(i=this._mathfield)!=null&&i.hasFocus&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard")}get value(){return this.getValue()}set value(t){this.setValue(t)}get defaultMode(){return this._getOption("defaultMode")}set defaultMode(t){this._setOptions({defaultMode:t})}get macros(){if(!this._mathfield)throw new Error("Mathfield not mounted");return this._getOption("macros")}set macros(t){this._setOptions({macros:t})}get registers(){if(!this._mathfield)throw new Error("Mathfield not mounted");let t=this;return new Proxy({},{get:(i,r)=>{if(typeof r=="string")return t._getOption("registers")[r]},set(i,r,a){return typeof r!="string"?!1:(t._setOptions({registers:y(f({},t._getOption("registers")),{[r]:a})}),!0)},ownKeys:()=>Reflect.ownKeys(t._getOption("registers")),getOwnPropertyDescriptor:(i,r)=>{let a=t._getOption("registers")[r];if(a!==void 0)return{configurable:!0,enumerable:!0,value:a,writable:!0}}})}set registers(t){this._setOptions({registers:t})}get colorMap(){return this._getOption("colorMap")}set colorMap(t){this._setOptions({colorMap:t})}get backgroundColorMap(){return this._getOption("backgroundColorMap")}set backgroundColorMap(t){this._setOptions({backgroundColorMap:t})}get letterShapeStyle(){return this._getOption("letterShapeStyle")}set letterShapeStyle(t){this._setOptions({letterShapeStyle:t})}get minFontScale(){return this._getOption("minFontScale")}set minFontScale(t){this._setOptions({minFontScale:t})}get maxMatrixCols(){return this._getOption("maxMatrixCols")}set maxMatrixCols(t){this._setOptions({maxMatrixCols:t})}get smartMode(){return this._getOption("smartMode")}set smartMode(t){this._setOptions({smartMode:t})}get smartFence(){return this._getOption("smartFence")}set smartFence(t){this._setOptions({smartFence:t})}get smartSuperscript(){return this._getOption("smartSuperscript")}set smartSuperscript(t){this._setOptions({smartSuperscript:t})}get scriptDepth(){return this._getOption("scriptDepth")}set scriptDepth(t){this._setOptions({scriptDepth:t})}get removeExtraneousParentheses(){return this._getOption("removeExtraneousParentheses")}set removeExtraneousParentheses(t){this._setOptions({removeExtraneousParentheses:t})}get mathModeSpace(){return this._getOption("mathModeSpace")}set mathModeSpace(t){this._setOptions({mathModeSpace:t})}get placeholderSymbol(){return this._getOption("placeholderSymbol")}set placeholderSymbol(t){this._setOptions({placeholderSymbol:t})}get placeholder(){return this._getOption("contentPlaceholder")}set placeholder(t){this._setOptions({contentPlaceholder:t})}get popoverPolicy(){return this._getOption("popoverPolicy")}set popoverPolicy(t){this._setOptions({popoverPolicy:t})}get environmentPopoverPolicy(){return this._getOption("environmentPopoverPolicy")}set environmentPopoverPolicy(t){this._setOptions({environmentPopoverPolicy:t})}get menuItems(){var t;if(!this._mathfield)throw new Error("Mathfield not mounted");return(t=this._mathfield.menu._menuItems.map(i=>i.menuItem))!=null?t:[]}set menuItems(t){var i;if(!this._mathfield)throw new Error("Mathfield not mounted");if(this._mathfield){let r=(i=this._mathfield.element)==null?void 0:i.querySelector("[part=menu-toggle]");r&&(r.style.display=t.length===0?"none":""),this._mathfield.menu.menuItems=t}}get mathVirtualKeyboardPolicy(){return this._getOption("mathVirtualKeyboardPolicy")}set mathVirtualKeyboardPolicy(t){this._setOptions({mathVirtualKeyboardPolicy:t})}get inlineShortcuts(){if(!this._mathfield)throw new Error("Mathfield not mounted");return this._getOption("inlineShortcuts")}set inlineShortcuts(t){if(!this._mathfield)throw new Error("Mathfield not mounted");this._setOptions({inlineShortcuts:t})}get inlineShortcutTimeout(){return this._getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(t){this._setOptions({inlineShortcutTimeout:t})}get keybindings(){if(!this._mathfield)throw new Error("Mathfield not mounted");return this._getOption("keybindings")}set keybindings(t){if(!this._mathfield)throw new Error("Mathfield not mounted");this._setOptions({keybindings:t})}get onInsertStyle(){let t=this._getOption("onInsertStyle");return t===void 0?Ds:t}set onInsertStyle(t){this._setOptions({onInsertStyle:t})}get onInlineShortcut(){return this._getOption("onInlineShortcut")}set onInlineShortcut(t){this._setOptions({onInlineShortcut:t})}get onScrollIntoView(){return this._getOption("onScrollIntoView")}set onScrollIntoView(t){this._setOptions({onScrollIntoView:t})}get onExport(){return this._getOption("onExport")}set onExport(t){this._setOptions({onExport:t})}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOptions({readOnly:t})}get isSelectionEditable(){var t,i;return(i=(t=this._mathfield)==null?void 0:t.isSelectionEditable)!=null?i:!1}setPromptState(t,i,r){var a;(a=this._mathfield)==null||a.setPromptState(t,i,r)}getPromptState(t){var i,r;return(r=(i=this._mathfield)==null?void 0:i.getPromptState(t))!=null?r:[void 0,!0]}get selection(){return this._mathfield?this._mathfield.model.selection:X.has(this)?X.get(this).selection:{ranges:[[0,0]],direction:"forward"}}set selection(t){if(typeof t=="number"&&(t={ranges:[[t,t]]}),this._mathfield){this._mathfield.model.selection=t,se(this._mathfield);return}if(X.has(this)){X.set(this,y(f({},X.get(this)),{selection:t}));return}X.set(this,{value:void 0,selection:t,options:Bn(this),menuItems:void 0})}get selectionIsCollapsed(){let t=this.selection;return t.ranges.length===1&&t.ranges[0][0]===t.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:X.has(this)?X.get(this).selection.ranges[0][0]:0}set position(t){if(this._mathfield&&(this._mathfield.model.position=t,se(this._mathfield)),X.has(this)){X.set(this,y(f({},X.get(this)),{selection:{ranges:[[t,t]]}}));return}X.set(this,{value:void 0,selection:{ranges:[[t,t]]},options:Bn(this),menuItems:void 0})}get lastOffset(){var t,i;return(i=(t=this._mathfield)==null?void 0:t.model.lastOffset)!=null?i:-1}};de.version="0.108.3",de.openUrl=e=>{if(!e)return;let t=new URL(e);if(!["http:","https:","file:"].includes(t.protocol.toLowerCase())){de.playSound("plonk");return}window.open(t,"_blank")},de._fontsDirectory="./fonts/",de._soundsDirectory="./sounds",de.keypressVibration=!0,de._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},de._plonkSound="plonk.wav",de.audioBuffers={},de.createHTML=e=>e,de._speechEngineRate="100%",de._speechEngineVoice="Joanna",de._textToSpeechMarkup="",de._textToSpeechRules="mathlive",de._textToSpeechRulesOptions={},de.speakHook=O4,de.readAloudHook=I4,de.restoreFocusWhenDocumentFocused=!0,de._decimalSeparator=".",de._scientificNotationTemplate="#1\\times10^{#2}",de._isFunction=e=>{var t,i;let r=globalThis.MathfieldElement.computeEngine;return(i=(t=r==null?void 0:r.parse(e).domain)==null?void 0:t.isFunction)!=null?i:!1};var Pi=de;function kt(e){return e.replace(/[^a-zA-Z\d]+(.)/g,(t,i)=>i.toUpperCase())}function Bn(e){let t={readOnly:!1},i=Pi.optionsAttributes;return Object.keys(i).forEach(r=>{var a;if(e.hasAttribute(r)){let n=e.getAttribute(r);r==="placeholder"?t.contentPlaceholder=n??"":i[r]==="boolean"?t[kt(r)]=!0:i[r]==="on/off"?(n=(a=n==null?void 0:n.toLowerCase())!=null?a:"",n==="on"||n==="true"?t[kt(r)]=!0:n==="off"||n==="false"?t[kt(r)]=!1:t[kt(r)]=void 0):i[r]==="number"?t[kt(r)]=Number.parseFloat(n??"0"):t[kt(r)]=n}}),t}function ar(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var Fs=Pi,w0,k0,M0;if(Ue()&&!((w0=window.customElements)!=null&&w0.get("math-field"))){window[k0=Symbol.for("io.cortexjs.mathlive")]!=null||(window[k0]={});let e=window[Symbol.for("io.cortexjs.mathlive")];e.version="0.108.3",globalThis.MathfieldElement=Pi,(M0=window.customElements)==null||M0.define("math-field",Pi)}function N4(e,t,i){let r=i,a=0,n=e.length;for(;r<t.length;){let o=t[r];if(a<=0&&t.slice(r,r+n)===e)return r;o==="\\"?r++:o==="{"?a++:o==="}"&&a--,r++}return-1}function An(e,t,i,r,a="latex"){let n=[];for(let o of e)if(o.type==="text"){let l=o.data,s=!0,u=0,c;c=l.indexOf(t),c!==-1&&(u=c,u>0&&n.push({type:"text",data:l.slice(0,u)}),s=!1);let d=!1;for(;!d;){if(s){if(c=l.indexOf(t,u),c===-1){d=!0;break}u!==c&&n.push({type:"text",data:l.slice(u,c)}),u=c}else{if(c=N4(i,l,u+t.length),c===-1){d=!0;break}let h=l.slice(u+t.length,c);a==="ascii-math"&&([,h]=ua(h,{format:"ascii-math"})),n.push({type:"math",data:h,mathstyle:r}),u=c+i.length}s=!s}u<l.length&&n.push({type:"text",data:l.slice(u)})}else n.push(o);return n}function Kp(e,t){var i,r,a,n,o,l,s,u;let c=[{type:"text",data:e}];return(r=(i=t.TeX)==null?void 0:i.delimiters)!=null&&r.display&&t.TeX.delimiters.display.forEach(([d,h])=>{c=An(c,d,h,"displaystyle")}),(n=(a=t.TeX)==null?void 0:a.delimiters)!=null&&n.inline&&t.TeX.delimiters.inline.forEach(([d,h])=>{c=An(c,d,h,"textstyle")}),(l=(o=t.asciiMath)==null?void 0:o.delimiters)!=null&&l.inline&&t.asciiMath.delimiters.inline.forEach(([d,h])=>{c=An(c,d,h,"textstyle","ascii-math")}),(u=(s=t.asciiMath)==null?void 0:s.delimiters)!=null&&u.display&&t.asciiMath.delimiters.display.forEach(([d,h])=>{c=An(c,d,h,"displaystyle","ascii-math")}),c}function q4(e,t){let i=document.createElement("span");i.setAttribute("translate","no");try{let r="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+t.renderToMathML(e)+"</math>";i.innerHTML=globalThis.MathfieldElement.createHTML(r)}catch(r){console.error(`MathLive 0.108.3:  Could not convert "${e}"' to MathML with ${r}`),i.textContent=e}return i.className="ML__sr-only",i}function V4(e,t,i){try{let r=t.renderToMarkup(e,y(f({},t),{defaultMode:i==="displaystyle"?"math":"inline-math"})),a=document.createElement("span");return a.dataset.latex=e,a.style.display=i==="displaystyle"?"flex":"inline-flex",a.setAttribute("aria-hidden","true"),a.setAttribute("translate","no"),a.innerHTML=globalThis.MathfieldElement.createHTML(r),a}catch(r){return console.error("Could not parse'"+e+"' with ",r),document.createTextNode(e)}}function fa(e,t,i){var r;let a=V4(e,i,t||"textstyle"),n=(r=i.renderAccessibleContent)!=null?r:"";if(/\b(mathml|speakable-text)\b/i.test(n)){let o=document.createElement("span");if(/\bmathml\b/i.test(n)&&i.renderToMathML&&o.append(q4(e,i)),/\bspeakable-text\b/i.test(n)&&i.renderToSpeakableText){let l=document.createElement("span");l.setAttribute("translate","no");let s=i.renderToSpeakableText(e);l.innerHTML=globalThis.MathfieldElement.createHTML(s),l.className="ML__sr-only",o.append(l)}return o.append(a),o}return a}function j4(e,t){var i;if(/^\s*$/.test(e))return null;if((i=t.TeX)!=null&&i.processEnvironments&&/^\s*\\begin/.test(e))return[fa(e,"",t)];let r=Kp(e,t);if(r.length===1&&r[0].type==="text")return null;let a=[];for(let n of r)n.type==="text"?a.push(n.data):a.push(fa(n.data,n.mathstyle==="textstyle"?"textstyle":"displaystyle",t));return a}function $p(e,t){var i,r,a,n,o,l,s,u,c,d,h,p,m,g,v,b,x,E;if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){let M=(i=e.childNodes[0].textContent)!=null?i:"";if((r=t.TeX)!=null&&r.processEnvironments&&/^\s*\\begin/.test(M)){e.textContent="",e.append(fa(M,"",t));return}let C=Kp(M,t);if(C.length===1){let B=C[0];if(B.type==="text")return;e.textContent="",e.append(fa(B.data,B.mathstyle==="textstyle"?"textstyle":"displaystyle",t));return}}let S=[...e.childNodes];for(let M of S)if(M.nodeType===3){let C=j4((a=M.textContent)!=null?a:"",t);C&&M.replaceWith(...C)}else if(M.nodeType===1){let C=M.nodeName.toLowerCase();if(C==="script"){let B=M,D=B.type.toLowerCase();if(D==="module"||D==="javascript")continue;let K;if((n=t.processScriptTypePattern)!=null&&n.test(D))K=(o=B.textContent)!=null?o:"";else if((l=t.processMathJSONScriptTypePattern)!=null&&l.test(D))try{K=(u=t.serializeToLatex)==null?void 0:u.call(t,JSON.parse((s=B.textContent)!=null?s:""))}catch(Y){console.error(Y)}if(K){let Y="textstyle";for(let _ of D.split(";")){let[$,W]=_.split("=");$.trim()==="mode"&&(Y=W.trim()==="display"?"displaystyle":"textstyle")}Dl(B,K,Y,t)}}else{let B=M;if((c=t.texClassDisplayPattern)!=null&&c.test(B.className)){Dl(B,(d=B.textContent)!=null?d:"","displaystyle",t);continue}if((h=t.texClassInlinePattern)!=null&&h.test(B.className)){Dl(B,(p=B.textContent)!=null?p:"","textstyle",t);continue}((g=(m=t.processClassPattern)==null?void 0:m.test(B.className))!=null&&g||!((b=(v=t.skipTags)==null?void 0:v.includes(C))!=null&&b||(E=(x=t.ignoreClassPattern)==null?void 0:x.test(B.className))!=null&&E))&&$p(B,t)}}}var H4={skipTags:["math-field","noscript","style","textarea","pre","code","annotation","annotation-xml"],processScriptType:"math/tex",processMathJSONScriptType:"math/json",ignoreClass:"^(tex2jax_ignore|ML__latex)$",processClass:"tex2jax_process",renderAccessibleContent:"mathml",asciiMath:{delimiters:{inline:[["`","`"]]}},TeX:{processEnvironments:!0,delimiters:{inline:[["\\(","\\)"]],display:[["$$","$$"],["\\[","\\]"]]}}};function W4(e,t){var i,r,a,n,o,l,s,u;try{let c=f(f({},H4),t);c.ignoreClassPattern=new RegExp((i=c.ignoreClass)!=null?i:""),c.processClassPattern=new RegExp((r=c.processClass)!=null?r:""),c.processScriptTypePattern=new RegExp((a=c.processScriptType)!=null?a:""),c.processMathJSONScriptTypePattern=new RegExp((n=c.processMathJSONScriptType)!=null?n:""),(l=(o=c.TeX)==null?void 0:o.className)!=null&&l.display&&(c.texClassDisplayPattern=new RegExp(c.TeX.className.display)),(u=(s=c.TeX)==null?void 0:s.className)!=null&&u.inline&&(c.texClassInlinePattern=new RegExp(c.TeX.className.inline)),wa(),Dt("core"),$p(e,c)}catch(c){c instanceof Error?console.error("renderMathInElement(): "+c.message):console.error("renderMathInElement(): Could not render math for element",e)}}function Dl(e,t,i,r){e.parentNode.replaceChild(fa(t,i,r),e)}function U4(e,t){let i=ni.singleton;return i?(i.show(),ur(),i.currentLayer=t,i.render(),i.focus(),!0):!1}function J4(){let e=window.mathVirtualKeyboard;return e.visible?e.hide({animate:!0}):e.show({animate:!0}),!1}Me({switchKeyboardLayer:U4,toggleVirtualKeyboard:J4,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});var S0=!1,C0=null;function X4(){S0||C0||(C0=wa().then(()=>{S0=!0}))}var Pp=class extends HTMLElement{constructor(){if(super(),this._hasRendered=!1,this._shadowRoot=this.attachShadow({mode:"open"}),"adoptedStyleSheets"in this._shadowRoot)this._shadowRoot.adoptedStyleSheets=[Mi("core")];else{let e=document.createElement("style");e.textContent=Zt("core"),this._shadowRoot.appendChild(e)}this._contentSlot=document.createElement("div"),this._contentSlot.style.display="none",this._contentSlot.setAttribute("part","content"),this._renderContainer=document.createElement("div"),this._renderContainer.setAttribute("part","render"),this._renderContainer.setAttribute("aria-hidden","true"),this._errorFallback=document.createElement("div"),this._errorFallback.style.display="none",this._errorFallback.setAttribute("part","error"),this._shadowRoot.appendChild(this._contentSlot),this._shadowRoot.appendChild(this._renderContainer),this._shadowRoot.appendChild(this._errorFallback),this.addEventListener("keydown",this._handleKeydown.bind(this))}static get observedAttributes(){return["mode","format","macros","letter-shape-style","min-font-scale","max-matrix-cols"]}connectedCallback(){X4(),"IntersectionObserver"in window&&!this._hasRendered?(this._observer=new IntersectionObserver(e=>{var t;e[0].isIntersecting&&!this._hasRendered&&(this.render(),(t=this._observer)==null||t.disconnect())},{rootMargin:"50px"}),this._observer.observe(this)):this.render()}disconnectedCallback(){var e;(e=this._observer)==null||e.disconnect()}attributeChangedCallback(e,t,i){t!==i&&this._hasRendered&&this.render()}_handleKeydown(e){if(this.getAttribute("tabindex")!==null&&(e.key===" "||e.key==="Enter")){e.preventDefault();let t=this.getAttribute("aria-label");if(t&&"speechSynthesis"in window){let i=new SpeechSynthesisUtterance(t);speechSynthesis.speak(i)}}}get mode(){let e=this.getAttribute("mode");return e==="textstyle"||e==="displaystyle"?e:this.getDefaultMathstyle()}set mode(e){this.setAttribute("mode",e)}get format(){let e=this.getAttribute("format");return e==="latex"||e==="ascii-math"||e==="math-json"?e:"latex"}set format(e){this.setAttribute("format",e)}get letterShapeStyle(){let e=this.getAttribute("letter-shape-style");if(e==="auto"||e==="tex"||e==="iso"||e==="french"||e==="upright")return e}set letterShapeStyle(e){e===void 0?this.removeAttribute("letter-shape-style"):this.setAttribute("letter-shape-style",e)}get macros(){var e;return(e=this.getAttribute("macros"))!=null?e:void 0}set macros(e){e===void 0?this.removeAttribute("macros"):this.setAttribute("macros",e)}get minFontScale(){let e=this.getAttribute("min-font-scale");return e?parseFloat(e):void 0}set minFontScale(e){e===void 0?this.removeAttribute("min-font-scale"):this.setAttribute("min-font-scale",String(e))}get maxMatrixCols(){let e=this.getAttribute("max-matrix-cols");return e?parseInt(e,10):void 0}set maxMatrixCols(e){e===void 0?this.removeAttribute("max-matrix-cols"):this.setAttribute("max-matrix-cols",String(e))}render(){var e,t,i;try{let r=(t=(e=this.textContent)==null?void 0:e.trim())!=null?t:"";if(!r){this._renderContainer.innerHTML="",this._errorFallback.style.display="none",this._renderContainer.style.display="none",this._removeMathML();return}this._contentSlot.textContent=r;let a,n=this.format;if(n==="ascii-math")a=l4(r);else if(n==="math-json"){let s=JSON.parse(r);a=Dp(s)}else a=r;let o={defaultMode:this.mode==="displaystyle"?"math":"inline-math"};
vendor: 3,645 bytes, line 3232
3232if(this.letterShapeStyle&&(o.letterShapeStyle=this.letterShapeStyle),this.macros)try{o.macros=JSON.parse(this.macros)}catch(s){console.warn("Invalid macros JSON:",s)}this.minFontScale!==void 0&&(o.minFontScale=this.minFontScale),this.maxMatrixCols!==void 0&&(o.maxMatrixCols=this.maxMatrixCols);let l=he(a,o);this._renderContainer.innerHTML=l,this._renderContainer.style.display=this.getDefaultDisplay(),this._errorFallback.style.display="none",this._updateAccessibility(a),this._hasRendered=!0,this.dispatchEvent(new CustomEvent("render",{bubbles:!0,composed:!0,detail:{format:n,content:a}}))}catch(r){console.error("MathLive static element render error:",r),this._renderContainer.style.display="none",this._errorFallback.textContent=(i=this.textContent)!=null?i:"",this._errorFallback.style.display="block",this._removeMathML(),this.dispatchEvent(new CustomEvent("render-error",{bubbles:!0,composed:!0,detail:{error:r,content:this.textContent}}))}}_updateAccessibility(e){if(!this.hasAttribute("aria-label"))try{let t=Lp(e);this.setAttribute("aria-label",t)}catch(t){console.warn("Could not generate speakable text:",t)}this.hasAttribute("role")||this.setAttribute("role","img"),this._addMathML(e)}_addMathML(e){try{let t=Cp(e);this._mathMLContainer||(this._mathMLContainer=document.createElement("div"),this._mathMLContainer.style.position="absolute",this._mathMLContainer.style.width="1px",this._mathMLContainer.style.height="1px",this._mathMLContainer.style.overflow="hidden",this._mathMLContainer.style.clip="rect(0, 0, 0, 0)",this._mathMLContainer.setAttribute("aria-hidden","false"),this._shadowRoot.appendChild(this._mathMLContainer)),this._mathMLContainer.innerHTML=t}catch(t){console.warn("Could not generate MathML:",t)}}_removeMathML(){this._mathMLContainer&&(this._mathMLContainer.remove(),this._mathMLContainer=void 0)}},G4=class extends Pp{getDefaultMathstyle(){return"textstyle"}getDefaultDisplay(){return"inline-flex"}},Z4=class extends Pp{getDefaultMathstyle(){return"displaystyle"}getDefaultDisplay(){return"flex"}};function Y4(){var e,t,i,r;typeof window<"u"&&((e=window.customElements)!=null&&e.get("math-span")||(t=window.customElements)==null||t.define("math-span",G4),(i=window.customElements)!=null&&i.get("math-div")||(r=window.customElements)==null||r.define("math-div",Z4))}Y4();function Xt(){var e;return globalThis[e=Symbol.for("io.cortexjs.mathlive")]!=null||(globalThis[e]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function ab(e){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>us(document.body,e)):us(document.body,e)}function Q4(e){if(typeof e=="string"){let t=document.getElementById(e);if(t===null)throw new Error(`The element with ID "${e}" could not be found.`);return t}return e}function us(e,t){if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",()=>us(e,t));return}let i=Q4(e);if(!i)return;let r=t??{};r.renderToMarkup!=null||(r.renderToMarkup=he),r.renderToMathML!=null||(r.renderToMathML=Cp),r.renderToSpeakableText!=null||(r.renderToSpeakableText=Lp),r.serializeToLatex!=null||(r.serializeToLatex=Dp),W4(i,r)}var nb={mathlive:"0.108.3"};export{Z4 as MathDivElement,G4 as MathSpanElement,Pi as MathfieldElement,W4 as _renderMathInElement,l4 as convertAsciiMathToLatex,rb as convertLatexToAsciiMath,he as convertLatexToMarkup,Cp as convertLatexToMathMl,Lp as convertLatexToSpeakableText,Dp as convertMathJsonToLatex,Xt as globalMathLive,np as initVirtualKeyboardInCurrentBrowsingContext,ab as renderMathInDocument,us as renderMathInElement,eb as setKeyboardLayout,tb as setKeyboardLayoutLocale,ib as validateLatex,nb as version};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.