@yungu-fed/rich-text-editor 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/asyncToGenerator-BybRvmWW.js +32 -0
- package/dist/asyncToGenerator-DBdSXsy1.mjs +27 -0
- package/dist/index.css +1 -1
- package/dist/index.js +14039 -9774
- package/dist/index.mjs +10073 -0
- package/dist/mathlive.min-BNsIlja9.js +1 -0
- package/dist/{mathlive.min-DhvSIziw.js → mathlive.min-DIRFgINt.mjs} +5968 -5936
- package/dist/package.json +3 -0
- package/dist/rich-text-editor/primitives/Editor.d.ts.map +1 -1
- package/dist/rich-text-editor/primitives/ToolbarAction.d.ts.map +1 -1
- package/dist/rich-text-editor/primitives/context.d.ts.map +1 -1
- package/dist/rich-text-editor/primitives/slateRuntime.d.ts +2 -1
- package/dist/rich-text-editor/primitives/slateRuntime.d.ts.map +1 -1
- package/dist/rich-text-editor/styled/MathFieldInput.d.ts +0 -1
- package/dist/rich-text-editor/styled/MathFieldInput.d.ts.map +1 -1
- package/dist/rich-text-editor/styled/mathliveLoader.d.ts +1 -5
- package/dist/rich-text-editor/styled/mathliveLoader.d.ts.map +1 -1
- package/dist/vendor/mathlive.d.ts +7 -0
- package/dist/vendor/mathlive.d.ts.map +1 -0
- package/package.json +9 -8
- package/dist/index.cjs +0 -9
- package/dist/mathlive.min-e1W1EjoF.cjs +0 -3237
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _wrapNativeSuper(t){var r="function"==typeof Map?new Map():void 0;return _wrapNativeSuper=function _wrapNativeSuper(t){if(null===t||!_isNativeFunction(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,Wrapper);}function Wrapper(){return _construct(t,arguments,_getPrototypeOf(this).constructor);}return Wrapper.prototype=Object.create(t.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,t);},_wrapNativeSuper(t);}function _construct(t,e,r){if(_isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var p=new(t.bind.apply(t,o))();return r&&_setPrototypeOf(p,r.prototype),p;}function _isNativeFunction(t){try{return-1!==Function.toString.call(t).indexOf("[native code]");}catch(n){return"function"==typeof t;}}function _regenerator(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a;}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0));}if(o||r>1)return a;throw y=!0,n;}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0);}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e;}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break;}catch(t){i=e,c=1,u=t;}finally{f=1;}}return{value:t,done:y};};}(r,o,i),!0),u;}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this;}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e;}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this;}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]";}),(_regenerator=function _regenerator(){return{w:i,m:f};})();}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e);});}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2));},_regeneratorDefine2(e,r,n,t);}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _toArray(r){return _arrayWithHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableRest();}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n227=0,F=function F(){};return{s:F,n:function n(){return _n227>=r.length?{done:!0}:{done:!1,value:r[_n227++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t.return||t.return();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}var e=require("./asyncToGenerator-BybRvmWW.js");var t=Object.defineProperty,n=Object.defineProperties,r=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,s=function s(e,n,r){return n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;},c=function c(e,t){for(var n in t||(t={}))a.call(t,n)&&s(e,n,t[n]);if(i){var _iterator=_createForOfIteratorHelper(i(t)),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var n=_step.value;o.call(t,n)&&s(e,n,t[n]);}}catch(err){_iterator.e(err);}finally{_iterator.f();}}return e;},l=function l(e,t){return n(e,r(t));},u=function u(e){return _typeof(e)=="symbol"?e:e+"";},d=function d(e,t){var n={};for(var r in e)a.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&i){var _iterator2=_createForOfIteratorHelper(i(e)),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var r=_step2.value;t.indexOf(r)<0&&o.call(e,r)&&(n[r]=e[r]);}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}}return n;};function f(){return"window"in globalThis&&"document"in globalThis;}function p(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0;}function m(){try{return window.self!==window.top;}catch(e){return!0;}}function h(){return _typeof(navigator.vibrate)=="function";}function g(){var e,t;if(!f())return"other";var n=(t=(e=navigator.userAgentData)==null?void 0:e.platform)==null?navigator.platform:t;return /^mac/i.test(n)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(n)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other";}function _(){if(!f())return!0;if(/firefox/i.test(navigator.userAgent)){var _e2=navigator.userAgent.match(/firefox\/(\d+)/i);return _e2?parseInt(_e2[1])>=78:!1;}if(/trident/i.test(navigator.userAgent))return!1;if(/edge/i.test(navigator.userAgent)){var _e3=navigator.userAgent.match(/edg\/(\d+)/i);return _e3?parseInt(_e3[1])>=79:!1;}return!0;}function v(){return HTMLElement.prototype.hasOwnProperty("popover");}var y={id:"dvorak",locale:"en",displayName:"Dvorak",virtualLayout:"dvorak",platform:"",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["x","X","\u2248","\u02DB"],KeyC:["j","J","\u2206","\xD4"],KeyD:["e","E","\xB4","\xB4"],KeyE:[".",">","\u2265","\u02D8"],KeyF:["u","U","\xA8","\xA8"],KeyG:["i","I","\u02C6","\u02C6"],KeyH:["d","D","\u2202","\xCE"],KeyI:["c","C","\xE7","\xC7"],KeyJ:["h","H","\u02D9","\xD3"],KeyK:["t","T","\u2020","\u02C7"],KeyL:["n","N","\u02DC","\u02DC"],KeyM:["m","M","\xB5","\xC2"],KeyN:["b","B","\u222B","\u0131"],KeyO:["r","R","\xAE","\u2030"],KeyP:["l","L","\xAC","\xD2"],KeyQ:["'","\"","\xE6","\xC6"],KeyR:["p","P","\u03C0","\u220F"],KeyS:["o","O","\xF8","\xD8"],KeyT:["y","Y","\xA5","\xC1"],KeyU:["g","G","\xA9","\u02DD"],KeyV:["k","K","\u02DA","\uF8FF"],KeyW:[",","<","\u2264","\xAF"],KeyX:["q","Q","\u0153","\u0152"],KeyY:["f","F","\u0192","\xCF"],KeyZ:[";",":","\u2026","\xDA"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["[","{","\u201C","\u201D"],Equal:["]","}","\u2018","\u2019"],BracketLeft:["/","?","\xF7","\xBF"],BracketRight:["=","+","\u2260","\xB1"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:["s","S","\xDF","\xCD"],Quote:["-","_","\u2013","\u2014"],Backquote:["`","~","`","`"],Comma:["w","W","\u2211","\u201E"],Period:["v","V","\u221A","\u25CA"],Slash:["z","Z","\u03A9","\xB8"],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:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},b={id:"apple.en-intl",displayName:"English (international)",virtualLayout:"qwerty",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u0131"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\xCE"],KeyE:["e","E","\xB4","\xB4"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\u02DD"],KeyH:["h","H","\u02D9","\xD3"],KeyI:["i","I","\u02C6","\u02C6"],KeyJ:["j","J","\u2206","\xD4"],KeyK:["k","K","\u02DA","\uF8FF"],KeyL:["l","L","\xAC","\xD2"],KeyM:["m","M","\xB5","\xC2"],KeyN:["n","N","\u02DC","\u02DC"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE","\u2030"],KeyS:["s","S","\xDF","\xCD"],KeyT:["t","T","\u2020","\u02C7"],KeyU:["u","U","\xA8","\xA8"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\u02DB"],KeyY:["y","Y","\xA5","\xC1"],KeyZ:["z","Z","\u03A9","\xB8"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["-","_","\u2013","\u2014"],Equal:["=","+","\u2260","\xB1"],BracketLeft:["[","{","\u201C","\u201D"],BracketRight:["]","}","\u2018","\u2019"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:[";",":","\u2026","\xDA"],Quote:["'","\"","\xE6","\xC6"],Backquote:["`","\u02DC","`","`"],Comma:[",","<","\u2264","\xAF"],Period:[".",">","\u2265","\u02D8"],Slash:["/","?","\xF7","\xBF"],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:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},x={id:"windows.en-intl",displayName:"English (international)",platform:"windows",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","\xE1","\xC1"],KeyB:["b","B","",""],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\xE9","\xC9"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","\xED","\xCD"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","\xF8","\xD8"],KeyM:["m","M","\xB5",""],KeyN:["n","N","\xF1","\xD1"],KeyO:["o","O","\xF3","\xD3"],KeyP:["p","P","\xF6","\xD6"],KeyQ:["q","Q","\xE4","\xC4"],KeyR:["r","R","\xAE",""],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\xFE","\xDE"],KeyU:["u","U","\xFA","\xDA"],KeyV:["v","V","",""],KeyW:["w","W","\xE5","\xC5"],KeyX:["x","X","",""],KeyY:["y","Y","\xFC","\xDC"],KeyZ:["z","Z","\xE6","\xC6"],Digit1:["1","!","\xA1","\xB9"],Digit2:["2","@","\xB2",""],Digit3:["3","#","\xB3",""],Digit4:["4","$","\xA4","\xA3"],Digit5:["5","%","\u20AC",""],Digit6:["6","^","\xBC",""],Digit7:["7","&","\xBD",""],Digit8:["8","*","\xBE",""],Digit9:["9","(","\u2018",""],Digit0:["0",")","\u2019",""],Space:[" "," ","",""],Minus:["-","_","\xA5",""],Equal:["=","+","\xD7","\xF7"],BracketLeft:["[","{","\xAB",""],BracketRight:["]","}","\xBB",""],Backslash:["\\","|","\xAC","\xA6"],Semicolon:[";",":","\xB6","\xB0"],Quote:["'","\"","\xB4","\xA8"],Backquote:["`","~","",""],Comma:[",","<","\xE7","\xC7"],Period:[".",">","",""],Slash:["/","?","\xBF",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}},S={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:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},ee={id:"apple.french",locale:"fr",displayName:"French",platform:"apple",virtualLayout:"azerty",score:0,mapping:{KeyA:["q","Q","\u2021","\u03A9"],KeyB:["b","B","\xDF","\u222B"],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\xEA","\xCA"],KeyF:["f","F","\u0192","\xB7"],KeyG:["g","G","\uFB01","\uFB02"],KeyH:["h","H","\xCC","\xCE"],KeyI:["i","I","\xEE","\xEF"],KeyJ:["j","J","\xCF","\xCD"],KeyK:["k","K","\xC8","\xCB"],KeyL:["l","L","\xAC","|"],KeyM:[",","?","\u221E","\xBF"],KeyN:["n","N","~","\u0131"],KeyO:["o","O","\u0153","\u0152"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xAE","\u201A"],KeyS:["s","S","\xD2","\u2211"],KeyT:["t","T","\u2020","\u2122"],KeyU:["u","U","\xBA","\xAA"],KeyV:["v","V","\u25CA","\u221A"],KeyW:["z","Z","\xC2","\xC5"],KeyX:["x","X","\u2248","\u2044"],KeyY:["y","Y","\xDA","\u0178"],KeyZ:["w","W","\u2039","\u203A"],Digit1:["&","1","\uF8FF","\xB4"],Digit2:["\xE9","2","\xEB","\u201E"],Digit3:["\"","3","\u201C","\u201D"],Digit4:["'","4","\u2018","\u2019"],Digit5:["(","5","{","["],Digit6:["\xA7","6","\xB6","\xE5"],Digit7:["\xE8","7","\xAB","\xBB"],Digit8:["!","8","\xA1","\xDB"],Digit9:["\xE7","9","\xC7","\xC1"],Digit0:["\xE0","0","\xF8","\xD8"],Space:[" "," "," "," "],Minus:[")","\xB0","}","]"],Equal:["-","_","\u2014","\u2013"],BracketLeft:["^","\xA8","\xF4","\xD4"],BracketRight:["$","*","\u20AC","\xA5"],Backslash:["`","\xA3","@","#"],Semicolon:["m","M","\xB5","\xD3"],Quote:["\xF9","%","\xD9","\u2030"],Backquote:["<",">","\u2264","\u2265"],Comma:[";",".","\u2026","\u2022"],Period:[":","/","\xF7","\\"],Slash:["=","+","\u2260","\xB1"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","\u2022","\u0178"],NumpadEqual:["=","=","=","="]}},C={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","\u20AC",""],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:["\xE9","2","~",""],Digit3:["\"","3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["\xE8","7","`",""],Digit8:["_","8","\\",""],Digit9:["\xE7","9","^",""],Digit0:["\xE0","0","@",""],Space:[" "," ","",""],Minus:[")","\xB0","]",""],Equal:["=","+","}",""],BracketLeft:["^","\xA8","",""],BracketRight:["$","\xA3","\xA4",""],Backslash:["*","\xB5","",""],Semicolon:["m","M","",""],Quote:["\xF9","%","",""],Backquote:["\xB2","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","\xA7","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},w={id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","\u03A9"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:[",","?","\u0301","\u030B"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["z","Z","\xAB","<"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["w","W","\u0142","\u0141"],Digit1:["&","1","\xB9","\xA1"],Digit2:["\xE9","2","~","\u215B"],Digit3:["\"","3","#","\xA3"],Digit4:["'","4","{","$"],Digit5:["(","5","[","\u215C"],Digit6:["-","6","|","\u215D"],Digit7:["\xE8","7","`","\u215E"],Digit8:["_","8","\\","\u2122"],Digit9:["\xE7","9","^","\xB1"],Digit0:["\xE0","0","@","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:["\t","","\t",""],Space:[" "," "," "," "],Minus:[")","\xB0","]","\xBF"],Equal:["=","+","}","\u0328"],BracketLeft:["\u0302","\u0308","\u0308","\u030A"],BracketRight:["$","\xA3","\xA4","\u0304"],Backslash:["*","\xB5","\u0300","\u0306"],Semicolon:["m","M","\xB5","\xBA"],Quote:["\xF9","%","\u0302","\u030C"],Backquote:["\xB2","~","\xAC","\xAC"],Comma:[";",".","\u2500","\xD7"],Period:[":","/","\xB7","\xF7"],Slash:["!","\xA7","\u0323","\u0307"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"]}},te={id:"apple.german",locale:"de",displayName:"German",virtualLayout:"qwertz",platform:"apple",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u2039"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\u2122"],KeyE:["e","E","\u20AC","\u2030"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\xCC"],KeyH:["h","H","\xAA","\xD3"],KeyI:["i","I","\u2044","\xDB"],KeyJ:["j","J","\xBA","\u0131"],KeyK:["k","K","\u2206","\u02C6"],KeyL:["l","L","@","\uFB02"],KeyM:["m","M","\xB5","\u02D8"],KeyN:["n","N","~","\u203A"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\xAB","\xBB"],KeyR:["r","R","\xAE","\xB8"],KeyS:["s","S","\u201A","\xCD"],KeyT:["t","T","\u2020","\u02DD"],KeyU:["u","U","\xA8","\xC1"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\xD9"],KeyY:["z","Z","\u03A9","\u02C7"],KeyZ:["y","Y","\xA5","\u2021"],Digit1:["1","!","\xA1","\xAC"],Digit2:["2","\"","\u201C","\u201D"],Digit3:["3","\xA7","\xB6","#"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","[","\uFB01"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","\u02DC"],Digit9:["9",")","}","\xB7"],Digit0:["0","=","\u2260","\xAF"],Space:[" "," "," "," "],Minus:["\xDF","?","\xBF","\u02D9"],Equal:["\xB4","`","'","\u02DA"],BracketLeft:["\xFC","\xDC","\u2022","\xB0"],BracketRight:["+","*","\xB1","\uF8FF"],Backslash:["#","'","\u2018","\u2019"],Semicolon:["\xF6","\xD6","\u0153","\u0152"],Quote:["\xE4","\xC4","\xE6","\xC6"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u221E","\u02DB"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","\xB0","\u201E","\u201C"],NumpadEqual:["=","=","=","="]}},T={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","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","\xB5",""],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","\"","\xB2",""],Digit3:["3","\xA7","\xB3",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["\xDF","?","\\","\u1E9E"],Equal:["\xB4","`","",""],BracketLeft:["\xFC","\xDC","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["\xF6","\xD6","",""],Quote:["\xE4","\xC4","",""],Backquote:["^","\xB0","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}},ne={id:"linux.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201C","\u2018"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0323","\u0307"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","\u201D","\u2019"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\u017F","\u1E9E"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201E","\u201A"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xAB","\u2039"],KeyY:["z","Z","\u2190","\xA5"],KeyZ:["y","Y","\xBB","\u203A"],Digit1:["1","!","\xB9","\xA1"],Digit2:["2","\"","\xB2","\u215B"],Digit3:["3","\xA7","\xB3","\xA3"],Digit4:["4","$","\xBC","\xA4"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:["\t","","\t",""],Space:[" "," "," "," "],Minus:["\xDF","?","\\","\xBF"],Equal:["\u0301","\u0300","\u0327","\u0328"],BracketLeft:["\xFC","\xDC","\u0308","\u030A"],BracketRight:["+","*","~","\xAF"],Backslash:["#","'","\u2019","\u0306"],Semicolon:["\xF6","\xD6","\u030B","\u0323"],Quote:["\xE4","\xC4","\u0302","\u030C"],Backquote:["\u0302","\xB0","\u2032","\u2033"],Comma:[",",";","\xB7","\xD7"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],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:["<",">","|","\u0331"],AltRight:["\r","\r","\r","\r"],MetaRight:[".",".",".","."]}},re={id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\xDF",""],KeyC:["c","C","\xA9"," "],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0192","\uFB01"],KeyG:["g","G","\uF8FF","\uFB02"],KeyH:["h","H","\u2122"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","\xB6","\xAF"],KeyK:["k","K","\xA7","\u02C7"],KeyL:["l","L"," ","\u02D8"],KeyM:["m","M","\xB5","\u02DA"],KeyN:["n","N"," ","\u02D9"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE"," "],KeyS:["s","S","\u222B"," "],KeyT:["t","T","\u2020","\u2021"],KeyU:["u","U"," "," "],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\xE6","\xC6"],KeyX:["x","X","\u2211","\u203A"],KeyY:["y","Y","\xA5"," "],KeyZ:["z","Z","\u03A9","\u2039"],Digit1:["1","!","|","\u0131"],Digit2:["2","\"","@","\u02DD"],Digit3:["3","\xB7","#","\u2022"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","\u221E","\u2030"],Digit6:["6","&","\xAC"," "],Digit7:["7","/","\xF7","\u2044"],Digit8:["8","(","\u201C","\u2018"],Digit9:["9",")","\u201D","\u2019"],Digit0:["0","=","\u2260","\u2248"],Space:[" "," "," "," "],Minus:["'","?","\xB4","\xB8"],Equal:["\xA1","\xBF","\u201A","\u02DB"],BracketLeft:["`","^","[","\u02C6"],BracketRight:["+","*","]","\xB1"],Backslash:["\xE7","\xC7","}","\xBB"],Semicolon:["\xF1","\xD1","~","\u02DC"],Quote:["\xB4","\xA8","{","\xAB"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u201E",""],Period:[".",":","\u2026","\u2026"],Slash:["-","_","\u2013","\u2014"],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:["\xBA","\xAA","\\","\xB0"]}},ie={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","\u20AC",""],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","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},ae={id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["z","Z","\xAB","<"],Digit1:["1","!","|","\xA1"],Digit2:["2","\"","@","\u215B"],Digit3:["3","\xB7","#","\xA3"],Digit4:["4","$","~","$"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:["\t","","\t",""],Space:[" "," "," "," "],Minus:["'","?","\\","\xBF"],Equal:["\xA1","\xBF","\u0303","~"],BracketLeft:["\u0300","\u0302","[","\u030A"],BracketRight:["+","*","]","\u0304"],Backslash:["\xE7","\xC7","}","\u0306"],Semicolon:["\xF1","\xD1","~","\u030B"],Quote:["\u0301","\u0308","{","{"],Backquote:["\xBA","\xAA","\\","\\"],Comma:[",",";","\u2500","\xD7"],Period:[".",":","\xB7","\xF7"],Slash:["-","_","\u0323","\u0307"],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:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}};function oe(e){var t=e.split("+"),n={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:t.pop()};return t.includes("shift")&&(n.shift=!0),t.includes("alt")&&(n.alt=!0),t.includes("ctrl")&&(n.ctrl=!0),t.includes("cmd")&&(n.cmd=!0),t.includes("win")&&(n.win=!0),t.includes("meta")&&(n.meta=!0),n;}function se(e){var 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 ce={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]"},le=[],ue;function de(){switch(g()){case"macos":case"ios":return"apple";case"windows":return"windows";}return"linux";}function E(e){(!e.platform||e.platform===de())&&le.push(e);}function fe(e,t){var n;var r={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!e)return r;for(var _i2=0,_Object$entries=Object.entries(t.mapping);_i2<_Object$entries.length;_i2++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i2],2),_n2=_Object$entries$_i[0],_i3=_Object$entries$_i[1];if(_i3[0]===e)return r.key="[".concat(_n2,"]"),r;if(_i3[1]===e)return r.shift=!0,r.key="[".concat(_n2,"]"),r;if(_i3[2]===e)return r.alt=!0,r.key="[".concat(_n2,"]"),r;if(_i3[3]===e)return r.shift=!0,r.alt=!0,r.key="[".concat(_n2,"]"),r;}return r.key=(n=ce[e])==null?"":n,r;}function pe(e){if(e.code)return e;var t=Object.entries(_e().mapping),n=!1,r=!1,i="";for(var _a2=0;_a2<4;_a2++){var _iterator3=_createForOfIteratorHelper(t),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var _step3$value=_slicedToArray(_step3.value,2),_o2=_step3$value[0],_s2=_step3$value[1];if(_s2[_a2]===e.key){i=_o2,_a2===3?(n=!0,r=!0):_a2===2?n=!0:_a2===1&&(r=!0);break;}}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}if(i)break;}return new KeyboardEvent(e.type,l(c({},e),{altKey:n,shiftKey:r,code:i}));}function me(e){var t,n;if(!e||e.key==="Unidentified"||e.key==="Dead")return;var r=e.shiftKey&&e.altKey?3:e.altKey?2:+!!e.shiftKey;for(var _i4=0,_le=le;_i4<_le.length;_i4++){var _i5=_le[_i4];((t=_i5.mapping[e.code])==null?void 0:t[r])===e.key?_i5.score+=1:(n=_i5.mapping[e.code])!=null&&n[r]&&(_i5.score=0);}le.sort(function(e,t){return t.score-e.score;});}function he(e){ue=le.find(function(t){return e.startsWith(t.locale);});}function ge(e){return ue=le.find(function(t){return t.id===e;}),ue;}function _e(){return ue==null?le[0]:ue;}function ve(){switch(de()){case"apple":return b;case"windows":return x;case"linux":return S;}return b;}switch(de()){case"apple":E(b),E(ee),E(re),E(te);break;case"windows":E(x),E(C),E(ie),E(T);break;case"linux":E(S),E(w),E(ae),E(ne);break;}E(y);function ye(e){ge(e);}function be(e){he(e);}function xe(e){return Array.isArray(e);}var D={strings:{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}f(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":"%@ \xD7 %@","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":"\u062D\u0631\u0641 \u0627\u0648 \u0631\u0645\u0632","keyboard.tooltip.greek":"\u062D\u0631\u0648\u0641 \u064A\u0648\u0646\u0627\u0646\u064A\u0629","keyboard.tooltip.numeric":"\u0627\u0644\u0631\u0642\u0645\u064A\u0629","keyboard.tooltip.alphabetic":"\u0631\u0645\u0648\u0632 \u0627\u0644\u0627\u062D\u0631\u0641 \u0627\u0644\u0631\u0648\u0645\u0627\u0646\u064A\u0629","tooltip.copy to clipboard":"\u0646\u0633\u062E \u0625\u0644\u0649 \u0627\u0644\u062D\u0627\u0641\u0638\u0629","tooltip.cut to clipboard":"\u0642\u0635 \u0625\u0644\u0649 \u0627\u0644\u062D\u0627\u0641\u0638\u0629","tooltip.paste from clipboard":"\u0644\u0635\u0642 \u0645\u0646 \u0627\u0644\u062D\u0627\u0641\u0638\u0629","tooltip.redo":"\u0627\u0644\u0625\u0639\u0627\u062F\u0629","tooltip.toggle virtual keyboard":"\u062A\u0628\u062F\u064A\u0644 \u0644\u0648\u062D\u0629 \u0627\u0644\u0645\u0641\u0627\u062A\u064A\u062D \u0627\u0644\u0625\u0641\u062A\u0631\u0627\u0636\u064A\u0629","tooltip.undo":"\u0625\u0644\u063A\u0627\u0621","menu.insert matrix":"\u0623\u062F\u062E\u0644 \u0627\u0644\u0645\u0635\u0641\u0648\u0641\u0629","menu.borders":"\u0645\u062D\u062F\u062F\u0627\u062A \u0627\u0644\u0645\u0635\u0641\u0648\u0641\u0629","menu.array.add row above":"\u0623\u0636\u0641 \u0635\u0641\u064B\u0627 \u0628\u0639\u062F \u0630\u0644\u0643","menu.array.add row below":"\u0623\u0636\u0641 \u0627\u0644\u0635\u0641 \u0642\u0628\u0644","menu.array.add column after":"\u0623\u0636\u0641 \u0627\u0644\u0639\u0645\u0648\u062F \u0628\u0639\u062F \u0630\u0644\u0643","menu.array.add column before":"\u0623\u0636\u0641 \u0627\u0644\u0639\u0645\u0648\u062F \u0642\u0628\u0644","menu.array.delete row":"\u0627\u062D\u0630\u0641 \u0635\u0641","menu.array.delete rows":"\u062D\u0630\u0641 \u0627\u0644\u0635\u0641\u0648\u0641 \u0627\u0644\u0645\u062D\u062F\u062F\u0629","menu.array.delete column":"\u062D\u0630\u0641 \u0627\u0644\u0639\u0645\u0648\u062F","menu.array.delete columns":"\u062D\u0630\u0641 \u0627\u0644\u0623\u0639\u0645\u062F\u0629 \u0627\u0644\u0645\u062D\u062F\u062F\u0629","menu.mode":"\u0648\u0636\u0639","menu.mode-math":"\u0631\u064A\u0627\u0636\u064A\u0627\u062A","menu.mode-text":"\u0646\u0635","menu.mode-latex":"\u0644\u0627\u062A\u0643\u0633","tooltip.blackboard":"\u0633\u0628\u0648\u0631\u0629","tooltip.bold":"\u0639\u0631\u064A\u0636","tooltip.italic":"\u0645\u0627\u0626\u0644","tooltip.fraktur":"\u0641\u0631\u0627\u0643\u062A\u0648\u0631","tooltip.script":"\u0633\u0643\u0631\u064A\u0628\u062A","tooltip.caligraphic":"\u0643\u0627\u0644\u064A\u062C\u0631\u0627\u0641\u064A\u0643","tooltip.typewriter":"\u0622\u0644\u0629 \u0643\u0627\u062A\u0628\u0629","tooltip.roman-upright":"\u0631\u0648\u0645\u0627\u0646\u064A \u0645\u0633\u062A\u0642\u064A\u0645","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u0646\u0645\u0637 \u0627\u0644\u062E\u0637","menu.accent":"\u062A\u0634\u0643\u064A\u0644","menu.decoration":"\u0632\u062E\u0631\u0641\u0629","menu.color":"\u0644\u0648\u0646","menu.background-color":"\u0627\u0644\u062E\u0644\u0641\u064A\u0629","menu.evaluate":"\u062A\u0642\u064A\u064A\u0645","menu.simplify":"\u062A\u0628\u0633\u064A\u0637","menu.solve":"\u062D\u0644","menu.solve-for":"\u062D\u0644 \u0644\u0640 %@","menu.cut":"\u0642\u0635","menu.copy":"\u0646\u0633\u062E","menu.copy-as-latex":"\u0646\u0633\u062E \u0643\u0640 LaTeX","menu.copy-as-ascii-math":"\u0646\u0633\u062E \u0643\u0640 ASCII Math","menu.copy-as-mathml":"\u0646\u0633\u062E \u0643\u0640 MathML","menu.paste":"\u0644\u0635\u0642","menu.select-all":"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644","color.red":"\u0623\u062D\u0645\u0631","color.orange":"\u0628\u0631\u062A\u0642\u0627\u0644\u064A","color.yellow":"\u0623\u0635\u0641\u0631","color.lime":"\u0644\u064A\u0645\u0648\u0646\u064A","color.green":"\u0623\u062E\u0636\u0631","color.teal":"\u0633\u0645\u0627\u0648\u064A","color.cyan":"\u0633\u0645\u0627\u0648\u064A \u0641\u0627\u062A\u062D","color.blue":"\u0623\u0632\u0631\u0642","color.indigo":"\u0646\u064A\u0644\u064A","color.purple":"\u0628\u0646\u0641\u0633\u062C\u064A","color.magenta":"\u0623\u0631\u062C\u0648\u0627\u0646\u064A","color.black":"\u0623\u0633\u0648\u062F","color.dark-grey":"\u0631\u0645\u0627\u062F\u064A \u063A\u0627\u0645\u0642","color.grey":"\u0631\u0645\u0627\u062F\u064A","color.light-grey":"\u0631\u0645\u0627\u062F\u064A \u0641\u0627\u062A\u062D","color.white":"\u0623\u0628\u064A\u0636"},de:{"keyboard.tooltip.symbols":"Symbole","keyboard.tooltip.greek":"Griechische Buchstaben","keyboard.tooltip.numeric":"Numerisch","keyboard.tooltip.alphabetic":"R\xF6mische 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\xFCgen","menu.borders":"Matrixtrennzeichen","menu.array.add row above":"Zeile hinzuf\xFCgen nach","menu.array.add row below":"Zeile hinzuf\xFCgen vor","menu.array.add column after":"Spalte hinzuf\xFCgen nach","menu.array.add column before":"Spalte hinzuf\xFCgen vor","menu.array.delete row":"Zeile l\xF6schen","menu.array.delete rows":"Ausgew\xE4hlte Zeilen l\xF6schen","menu.array.delete column":"Spalte l\xF6schen","menu.array.delete columns":"Ausgew\xE4hlte Spalten l\xF6schen","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\xF6misch aufrecht","tooltip.row-by-col":"%@ \xD7 %@","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\xF6sen","menu.solve-for":"L\xF6sen f\xFCr %@","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\xFCgen","menu.select-all":"Alles ausw\xE4hlen","color.red":"Rot","color.orange":"Orange","color.yellow":"Gelb","color.lime":"Limette","color.green":"Gr\xFCn","color.teal":"Blaugr\xFCn","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\xDF"},el:{"keyboard.tooltip.symbols":"\u03C3\u03CD\u03BC\u03B2\u03BF\u03BB\u03B1","keyboard.tooltip.greek":"\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC \u03B3\u03C1\u03AC\u03BC\u03BC\u03B1\u03C4\u03B1","keyboard.tooltip.numeric":"\u0391\u03C1\u03B9\u03B8\u03BC\u03B7\u03C4\u03B9\u03BA\u03CC\u03C2","keyboard.tooltip.alphabetic":"\u03A1\u03C9\u03BC\u03B1\u03CA\u03BA\u03AC \u03B3\u03C1\u03AC\u03BC\u03BC\u03B1\u03C4\u03B1","tooltip.copy to clipboard":"\u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u03C3\u03C4\u03BF \u03C0\u03C1\u03CC\u03C7\u03B5\u03B9\u03C1\u03BF","tooltip.redo":"\u039E\u03B1\u03BD\u03B1\u03BA\u03AC\u03BD\u03C9","tooltip.toggle virtual keyboard":"\u0395\u03BD\u03B1\u03BB\u03BB\u03B1\u03B3\u03AE \u03B5\u03B9\u03BA\u03BF\u03BD\u03B9\u03BA\u03BF\u03CD \u03C0\u03BB\u03B7\u03BA\u03C4\u03C1\u03BF\u03BB\u03BF\u03B3\u03AF\u03BF\u03C5","tooltip.undo":"\u039E\u03B5\u03BA\u03AC\u03BD\u03C9","menu.insert matrix":"\u0395\u03B9\u03C3\u03B1\u03B3\u03C9\u03B3\u03AE \u03BC\u03AE\u03C4\u03C1\u03B1","menu.borders":"\u039F\u03C1\u03B9\u03BF\u03B8\u03AD\u03C4\u03B5\u03C2 \u03BC\u03AE\u03C4\u03C1\u03B1","menu.array.add row above":"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C3\u03B5\u03B9\u03C1\u03AC\u03C2 \u03BC\u03B5\u03C4\u03AC","menu.array.add row below":"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C3\u03B5\u03B9\u03C1\u03AC\u03C2 \u03C0\u03C1\u03B9\u03BD","menu.array.add column after":"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C3\u03C4\u03AE\u03BB\u03B7\u03C2 \u03BC\u03B5\u03C4\u03AC","menu.array.add column before":"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C3\u03C4\u03AE\u03BB\u03B7\u03C2 \u03C0\u03C1\u03B9\u03BD","menu.array.delete row":"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03C3\u03B5\u03B9\u03C1\u03AC\u03C2","menu.array.delete rows":"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03C9\u03BD \u03C3\u03B5\u03B9\u03C1\u03CE\u03BD","menu.array.delete column":"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03C3\u03C4\u03AE\u03BB\u03B7\u03C2","menu.array.delete columns":"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03C9\u03BD \u03C3\u03C4\u03B7\u03BB\u03CE\u03BD","menu.mode":"\u039B\u03B5\u03B9\u03C4\u03BF\u03C5\u03C1\u03B3\u03AF\u03B1","menu.mode-math":"\u039C\u03B1\u03B8\u03B7\u03BC\u03B1\u03C4\u03B9\u03BA\u03AC","menu.mode-text":"\u039A\u03B5\u03AF\u03BC\u03B5\u03BD\u03BF","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u03A0\u03AF\u03BD\u03B1\u03BA\u03B1\u03C2","tooltip.bold":"\u0388\u03BD\u03C4\u03BF\u03BD\u03B7","tooltip.italic":"\u03A0\u03BB\u03AC\u03B3\u03B9\u03B1","tooltip.fraktur":"\u03A6\u03C1\u03AC\u03BA\u03C4\u03BF\u03C5\u03C1","tooltip.script":"\u03A3\u03B5\u03BD\u03AC\u03C1\u03B9\u03BF","tooltip.caligraphic":"\u039A\u03B1\u03BB\u03BB\u03B9\u03B3\u03C1\u03B1\u03C6\u03B9\u03BA\u03AE","tooltip.typewriter":"\u039C\u03B7\u03C7\u03B1\u03BD\u03AE \u03B3\u03C1\u03B1\u03C6\u03AE\u03C2","tooltip.roman-upright":"\u03A1\u03C9\u03BC\u03B1\u03CA\u03BA\u03CC \u039A\u03B1\u03C4\u03B1\u03BA\u03CC\u03C1\u03C5\u03C6\u03BF","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u03A3\u03C4\u03C5\u03BB \u03B3\u03C1\u03B1\u03BC\u03BC\u03B1\u03C4\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC\u03C2","menu.accent":"\u03A4\u03CC\u03BD\u03BF\u03C2","menu.decoration":"\u0394\u03B9\u03B1\u03BA\u03CC\u03C3\u03BC\u03B7\u03C3\u03B7","menu.color":"\u03A7\u03C1\u03CE\u03BC\u03B1","menu.background-color":"\u03A7\u03C1\u03CE\u03BC\u03B1 \u03C6\u03CC\u03BD\u03C4\u03BF\u03C5","menu.evaluate":"\u0391\u03BE\u03B9\u03BF\u03BB\u03CC\u03B3\u03B7\u03C3\u03B7","menu.simplify":"\u0391\u03C0\u03BB\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7","menu.solve":"\u039B\u03CD\u03C3\u03B7","menu.solve-for":"\u039B\u03CD\u03C3\u03B7 \u03B3\u03B9\u03B1 %@","menu.cut":"\u0391\u03C0\u03BF\u03BA\u03BF\u03C0\u03AE","menu.copy":"\u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE","menu.copy-as-latex":"\u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u03C9\u03C2 LaTeX","menu.copy-as-ascii-math":"\u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u03C9\u03C2 ASCII Math","menu.copy-as-mathml":"\u0391\u03BD\u03C4\u03B9\u03B3\u03C1\u03B1\u03C6\u03AE \u03C9\u03C2 MathML","menu.paste":"\u0395\u03C0\u03B9\u03BA\u03CC\u03BB\u03BB\u03B7\u03C3\u03B7","menu.select-all":"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03CC\u03BB\u03C9\u03BD","color.red":"\u039A\u03CC\u03BA\u03BA\u03B9\u03BD\u03BF","color.orange":"\u03A0\u03BF\u03C1\u03C4\u03BF\u03BA\u03B1\u03BB\u03AF","color.yellow":"\u039A\u03AF\u03C4\u03C1\u03B9\u03BD\u03BF","color.lime":"\u039B\u03B1\u03C7\u03B1\u03BD\u03AF","color.green":"\u03A0\u03C1\u03AC\u03C3\u03B9\u03BD\u03BF","color.teal":"\u039A\u03C5\u03B1\u03BD\u03CC","color.cyan":"\u0393\u03B1\u03BB\u03AC\u03B6\u03B9\u03BF","color.blue":"\u039C\u03C0\u03BB\u03B5","color.indigo":"\u0399\u03BD\u03B4\u03B9\u03BA\u03CC","color.purple":"\u039C\u03C9\u03B2","color.magenta":"\u039C\u03B1\u03C4\u03B6\u03AD\u03BD\u03C4\u03B1","color.black":"\u039C\u03B1\u03CD\u03C1\u03BF","color.dark-grey":"\u03A3\u03BA\u03BF\u03CD\u03C1\u03BF \u0393\u03BA\u03C1\u03B9","color.grey":"\u0393\u03BA\u03C1\u03B9","color.light-grey":"\u0391\u03BD\u03BF\u03B9\u03C7\u03C4\u03CC \u0393\u03BA\u03C1\u03B9","color.white":"\u039B\u03B5\u03C5\u03BA\u03CC"},es:{"keyboard.tooltip.symbols":"S\xEDmbolos","keyboard.tooltip.greek":"Letras griegas","keyboard.tooltip.numeric":"Num\xE9rico","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\xF1adir Matriz","menu.borders":"Delimitadores de Matriz","menu.array.add row above":"A\xF1adir L\xEDnea Antes","menu.array.add row below":"A\xF1adir L\xEDnea Despues","menu.array.add column after":"A\xF1adir Columna Despues","menu.array.add column before":"A\xF1adir Columna Antes","menu.array.delete row":"Borrar L\xEDnea","menu.array.delete rows":"Borrar L\xEDneas Seleccionadas","menu.array.delete column":"Borrar Columna","menu.array.delete columns":"Borrar Columnas Seleccionadas","menu.mode":"Modo","menu.mode-math":"Matem\xE1ticas","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\xE1fico","tooltip.typewriter":"M\xE1quina de escribir","tooltip.roman-upright":"Romano Vertical","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"Estilo de fuente","menu.accent":"Acento","menu.decoration":"Decoraci\xF3n","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":"\xCDndigo","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\xE9rique","keyboard.tooltip.alphabetic":"Lettres romaines","tooltip.menu":"Menu","tooltip.copy to clipboard":"Copier dans le presse-papiers","tooltip.redo":"R\xE9tablir","tooltip.toggle virtual keyboard":"Afficher/Masquer le clavier virtuel","tooltip.undo":"Annuler","menu.insert matrix":"Ins\xE9rer une Matrice","menu.borders":"Bords","menu.array.add row above":"Ajouter une Ligne Avant","menu.array.add row below":"Ajouter une Ligne Apr\xE8s","menu.array.add column before":"Ajouter une Colonne Avant","menu.array.add column after":"Ajouter une Colonne Apr\xE8s","menu.array.delete row":"Enlever une Ligne","menu.array.delete rows":"Enlever les Lignes S\xE9lection\xE9es","menu.array.delete column":"Enlever une Colone","menu.array.delete columns":"Enlever les Colonnes S\xE9lection\xE9es","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 \xE0 \xE9crire","tooltip.roman-upright":"Romain droit","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"Style de police","menu.accent":"Accent","menu.decoration":"D\xE9coration","menu.color":"Couleur","menu.background-color":"Arri\xE8re-plan","menu.evaluate":"\xC9valuer","menu.simplify":"Simplifier","menu.solve":"R\xE9soudre","menu.solve-for":"R\xE9soudre 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\xE9lectionner 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\xE9","color.grey":"Gris","color.light-grey":"Gris clair","color.white":"Blanc"},he:{"keyboard.tooltip.symbols":"\u05E1\u05DE\u05DC\u05D9\u05DD","keyboard.tooltip.greek":"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA \u05D9\u05D5\u05D5\u05E0\u05D9\u05D5\u05EA","keyboard.tooltip.numeric":"\u05DE\u05E1\u05E4\u05E8\u05D9","keyboard.tooltip.alphabetic":"\u05DE\u05DB\u05EA\u05D1\u05D9\u05DD \u05E8\u05D5\u05DE\u05D9\u05D9\u05DD","tooltip.copy to clipboard":"\u05D4\u05E2\u05EA\u05E7 \u05DC\u05DC\u05D5\u05D7","tooltip.redo":"\u05DC\u05B7\u05E2\u05B2\u05E9\u05C2\u05D5\u05B9\u05EA \u05E9\u05C1\u05D5\u05BC\u05D1","tooltip.toggle virtual keyboard":"\u05D4\u05D7\u05DC\u05E3 \u05D0\u05EA \u05D4\u05DE\u05E7\u05DC\u05D3\u05EA \u05D4\u05D5\u05D5\u05D9\u05E8\u05D8\u05D5\u05D0\u05DC\u05D9\u05EA","tooltip.undo":"\u05DC\u05D1\u05D8\u05DC","menu.insert matrix":"\u05D4\u05DB\u05E0\u05E1 \u05DE\u05D8\u05E8\u05D9\u05E7\u05E1","menu.borders":"\u05DE\u05E4\u05E8\u05D9\u05D3\u05D9 \u05DE\u05D8\u05E8\u05D9\u05E7\u05E1","menu.array.add row above":"\u05D4\u05D5\u05E1\u05E3 \u05E9\u05D5\u05E8\u05D4 \u05D0\u05D7\u05E8\u05D9","menu.array.add row below":"\u05D4\u05D5\u05E1\u05E3 \u05E9\u05D5\u05E8\u05D4 \u05DC\u05E4\u05E0\u05D9","menu.array.add column after":"\u05D4\u05D5\u05E1\u05E3 \u05E2\u05DE\u05D5\u05D3\u05D4 \u05D0\u05D7\u05E8\u05D9","menu.array.add column before":"\u05D4\u05D5\u05E1\u05E3 \u05E2\u05DE\u05D5\u05D3\u05D4 \u05DC\u05E4\u05E0\u05D9","menu.array.delete row":"\u05DE\u05D7\u05E7 \u05E9\u05D5\u05E8\u05D4","menu.array.delete rows":"\u05DE\u05D7\u05E7 \u05E9\u05D5\u05E8\u05D5\u05EA \u05E9\u05E0\u05D1\u05D7\u05E8\u05D5","menu.array.delete column":"\u05DE\u05D7\u05E7 \u05E2\u05DE\u05D5\u05D3\u05D4","menu.array.delete columns":"\u05DE\u05D7\u05E7 \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05E9\u05E0\u05D1\u05D7\u05E8\u05D5","menu.mode":"\u05DE\u05E6\u05D1","menu.mode-math":"\u05DE\u05EA\u05DE\u05D8\u05D9\u05E7\u05D4","menu.mode-text":"\u05D8\u05E7\u05E1\u05D8","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u05DC\u05D5\u05D7 \u05E9\u05D7\u05D5\u05E8","tooltip.bold":"\u05DE\u05D5\u05D3\u05D2\u05E9","tooltip.italic":"\u05E0\u05D8\u05D5\u05D9","tooltip.fraktur":"\u05E4\u05E8\u05E7\u05D8\u05D5\u05E8","tooltip.script":"\u05DB\u05EA\u05D1","tooltip.caligraphic":"\u05E7\u05DC\u05D9\u05D2\u05E8\u05E4\u05D9","tooltip.typewriter":"\u05DE\u05DB\u05D5\u05E0\u05EA \u05DB\u05EA\u05D9\u05D1\u05D4","tooltip.roman-upright":"\u05E8\u05D5\u05DE\u05D9 \u05D9\u05E9\u05E8","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u05E1\u05D2\u05E0\u05D5\u05DF \u05D2\u05D5\u05E4\u05DF","menu.accent":"\u05E6\u05DC\u05D9\u05DC","menu.decoration":"\u05E7\u05D9\u05E9\u05D5\u05D8","menu.color":"\u05E6\u05D1\u05E2","menu.background-color":"\u05E8\u05E7\u05E2","menu.evaluate":"\u05D7\u05E9\u05D1","menu.simplify":"\u05E4\u05E9\u05D8","menu.solve":"\u05E4\u05EA\u05D5\u05E8","menu.solve-for":"\u05E4\u05EA\u05D5\u05E8 \u05E2\u05D1\u05D5\u05E8 %@","menu.cut":"\u05D2\u05D6\u05D5\u05E8","menu.copy":"\u05D4\u05E2\u05EA\u05E7","menu.copy-as-latex":"\u05D4\u05E2\u05EA\u05E7 \u05DB\u05BELaTeX","menu.copy-as-ascii-math":"\u05D4\u05E2\u05EA\u05E7 \u05DB\u05BEASCII Math","menu.copy-as-mathml":"\u05D4\u05E2\u05EA\u05E7 \u05DB\u05BEMathML","menu.paste":"\u05D4\u05D3\u05D1\u05E7","menu.select-all":"\u05D1\u05D7\u05E8 \u05D4\u05DB\u05DC","color.red":"\u05D0\u05D3\u05D5\u05DD","color.orange":"\u05DB\u05EA\u05D5\u05DD","color.yellow":"\u05E6\u05D4\u05D5\u05D1","color.lime":"\u05D9\u05E8\u05D5\u05E7 \u05DC\u05D9\u05D9\u05DD","color.green":"\u05D9\u05E8\u05D5\u05E7","color.teal":"\u05D8\u05D9\u05DC","color.cyan":"\u05E6\u05D9\u05D0\u05DF","color.blue":"\u05DB\u05D7\u05D5\u05DC","color.indigo":"\u05D0\u05D9\u05E0\u05D3\u05D9\u05D2\u05D5","color.purple":"\u05E1\u05D2\u05D5\u05DC","color.magenta":"\u05DE\u05D2\u05E0\u05D8\u05D4","color.black":"\u05E9\u05D7\u05D5\u05E8","color.dark-grey":"\u05D0\u05E4\u05D5\u05E8 \u05DB\u05D4\u05D4","color.grey":"\u05D0\u05E4\u05D5\u05E8","color.light-grey":"\u05D0\u05E4\u05D5\u05E8 \u05D1\u05D4\u05D9\u05E8","color.white":"\u05DC\u05D1\u05DF"},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":"Delimitatori","menu.insert matrix":"Inserisci matrice","menu.array.add row above":"Aggiungi riga sopra","menu.array.add row below":"Aggiungi riga sotto","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\xE0","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 diritto","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"Stile 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":"\u30B7\u30F3\u30DC\u30EB","keyboard.tooltip.greek":"\u30AE\u30EA\u30B7\u30E3\u6587\u5B57","keyboard.tooltip.numeric":"\u6570\u5024","keyboard.tooltip.alphabetic":"\u30ED\u30FC\u30DE\u5B57","tooltip.menu":"\u30E1\u30CB\u30E5\u30FC","tooltip.copy to clipboard":"\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u306B\u30B3\u30D4\u30FC","tooltip.redo":"\u3084\u308A\u76F4\u3057","tooltip.toggle virtual keyboard":"\u4EEE\u60F3\u30AD\u30FC\u30DC\u30FC\u30C9\u306E\u5207\u308A\u66FF\u3048","tooltip.undo":"\u5143\u306B\u623B\u3059","menu.insert matrix":"\u30DE\u30C8\u30EA\u30C3\u30AF\u30B9\u3092\u633F\u5165","menu.borders":"\u884C\u5217\u533A\u5207\u308A\u6587\u5B57","menu.array.add row above":"\u5F8C\u306B\u884C\u3092\u8FFD\u52A0","menu.array.add row below":"\u524D\u306B\u884C\u3092\u8FFD\u52A0","menu.array.add column after":"\u5F8C\u306B\u5217\u3092\u8FFD\u52A0","menu.array.add column before":"\u524D\u306B\u5217\u3092\u8FFD\u52A0","menu.array.delete row":"\u884C\u3092\u524A\u9664","menu.array.delete rows":"\u9078\u629E\u3057\u305F\u884C\u3092\u524A\u9664\u3059\u308B","menu.array.delete column":"\u5217\u3092\u524A\u9664","menu.array.delete columns":"\u9078\u629E\u3057\u305F\u5217\u3092\u524A\u9664\u3059\u308B","menu.mode":"\u30E2\u30FC\u30C9","menu.mode-math":"\u6570\u5F0F","menu.mode-text":"\u30C6\u30AD\u30B9\u30C8","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u9ED2\u677F","tooltip.bold":"\u592A\u5B57","tooltip.italic":"\u30A4\u30BF\u30EA\u30C3\u30AF","tooltip.fraktur":"\u30D5\u30E9\u30AF\u30C8\u30A5\u30FC\u30EB","tooltip.script":"\u30B9\u30AF\u30EA\u30D7\u30C8","tooltip.caligraphic":"\u30AB\u30EA\u30B0\u30E9\u30D5\u30A3\u30C3\u30AF","tooltip.typewriter":"\u30BF\u30A4\u30D7\u30E9\u30A4\u30BF\u30FC","tooltip.roman-upright":"\u30ED\u30FC\u30DE\u76F4\u7ACB","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u30D5\u30A9\u30F3\u30C8\u30B9\u30BF\u30A4\u30EB","menu.accent":"\u30A2\u30AF\u30BB\u30F3\u30C8","menu.decoration":"\u88C5\u98FE","menu.color":"\u8272","menu.background-color":"\u80CC\u666F","menu.evaluate":"\u8A55\u4FA1","menu.simplify":"\u7C21\u7565\u5316","menu.solve":"\u89E3\u304F","menu.solve-for":"%@ \u3092\u89E3\u304F","menu.cut":"\u5207\u308A\u53D6\u308A","menu.copy":"\u30B3\u30D4\u30FC","menu.copy-as-latex":"LaTeX\u3068\u3057\u3066\u30B3\u30D4\u30FC","menu.copy-as-ascii-math":"ASCII Math\u3068\u3057\u3066\u30B3\u30D4\u30FC","menu.copy-as-mathml":"MathML\u3068\u3057\u3066\u30B3\u30D4\u30FC","menu.paste":"\u8CBC\u308A\u4ED8\u3051","menu.select-all":"\u3059\u3079\u3066\u9078\u629E","color.red":"\u8D64","color.orange":"\u30AA\u30EC\u30F3\u30B8","color.yellow":"\u9EC4\u8272","color.lime":"\u30E9\u30A4\u30E0","color.green":"\u7DD1","color.teal":"\u30C6\u30A3\u30FC\u30EB","color.cyan":"\u30B7\u30A2\u30F3","color.blue":"\u9752","color.indigo":"\u30A4\u30F3\u30C7\u30A3\u30B4","color.purple":"\u7D2B","color.magenta":"\u30DE\u30BC\u30F3\u30BF","color.black":"\u9ED2","color.dark-grey":"\u6FC3\u3044\u30B0\u30EC\u30FC","color.grey":"\u30B0\u30EC\u30FC","color.light-grey":"\u8584\u3044\u30B0\u30EC\u30FC","color.white":"\u767D"},ko:{"keyboard.tooltip.symbols":"\uAE30\uD638","keyboard.tooltip.greek":"\uADF8\uB9AC\uC2A4 \uBB38\uC790","keyboard.tooltip.numeric":"\uC22B\uC790","keyboard.tooltip.alphabetic":"\uB85C\uB9C8 \uBB38\uC790","tooltip.copy to clipboard":"\uD074\uB9BD \uBCF4\uB4DC\uC5D0 \uBCF5\uC0AC","tooltip.redo":"\uB2E4\uC2DC \uC2E4\uD589","tooltip.toggle virtual keyboard":"\uAC00\uC0C1 \uD0A4\uBCF4\uB4DC \uC804\uD658","tooltip.undo":"\uC2E4\uD589 \uCDE8\uC18C","menu.insert matrix":"\uD589\uB82C \uC0BD\uC785","menu.borders":"\uD589\uB82C \uAD6C\uBD84 \uAE30\uD638","menu.array.add row above":"\uB4A4\uC5D0 \uD589 \uCD94\uAC00","menu.array.add row below":"\uC55E\uC5D0 \uD589 \uCD94\uAC00","menu.array.add column after":"\uB4A4\uC5D0 \uC5F4 \uCD94\uAC00","menu.array.add column before":"\uC55E\uC5D0 \uC5F4 \uCD94\uAC00","menu.array.delete row":"\uD589 \uC0AD\uC81C","menu.array.delete rows":"\uC120\uD0DD\uD55C \uD589 \uC0AD\uC81C","menu.array.delete column":"\uC5F4 \uC0AD\uC81C","menu.array.delete columns":"\uC120\uD0DD\uD55C \uC5F4 \uC0AD\uC81C","menu.mode":"\uBAA8\uB4DC","menu.mode-math":"\uC218\uC2DD","menu.mode-text":"\uD14D\uC2A4\uD2B8","menu.mode-latex":"LaTeX","tooltip.blackboard":"\uCE60\uD310","tooltip.bold":"\uAD75\uAC8C","tooltip.italic":"\uC774\uD0E4\uB9AD","tooltip.fraktur":"\uD504\uB799\uD22C\uC5B4","tooltip.script":"\uCCA8\uC790","tooltip.caligraphic":"\uD544\uAE30\uCCB4","tooltip.typewriter":"\uD0C0\uC790\uAE30","tooltip.roman-upright":"\uC77C\uBC18 \uB85C\uB9C8\uC790","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\uAE00\uAF34 \uC2A4\uD0C0\uC77C","menu.accent":"\uBC1C\uC74C \uAE30\uD638","menu.decoration":"\uC7A5\uC2DD","menu.color":"\uC0C9\uC0C1","menu.background-color":"\uBC30\uACBD","menu.evaluate":"\uD3C9\uAC00","menu.simplify":"\uAC04\uC18C\uD654","menu.solve":"\uD574\uACB0","menu.solve-for":"%@\uC5D0 \uB300\uD574 \uD574\uACB0","menu.cut":"\uC798\uB77C\uB0B4\uAE30","menu.copy":"\uBCF5\uC0AC","menu.copy-as-latex":"LaTeX\uB85C \uBCF5\uC0AC","menu.copy-as-ascii-math":"ASCIIMath\uB85C \uBCF5\uC0AC","menu.copy-as-mathml":"MathML\uB85C \uBCF5\uC0AC","menu.paste":"\uBD99\uC5EC\uB123\uAE30","menu.select-all":"\uBAA8\uB450 \uC120\uD0DD","color.red":"\uBE68\uAC15","color.orange":"\uC8FC\uD669","color.yellow":"\uB178\uB791","color.lime":"\uB77C\uC784","color.green":"\uCD08\uB85D","color.teal":"\uCCAD\uB85D","color.cyan":"\uCCAD\uC0C9","color.blue":"\uD30C\uB791","color.indigo":"\uB0A8\uC0C9","color.purple":"\uBCF4\uB77C","color.magenta":"\uC790\uD64D","color.black":"\uAC80\uC815","color.dark-grey":"\uC9C4\uD55C \uD68C\uC0C9","color.grey":"\uD68C\uC0C9","color.light-grey":"\uC5F0\uD55C \uD68C\uC0C9","color.white":"\uD770\uC0C9"},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\xF3\u0107","tooltip.toggle virtual keyboard":"Prze\u0142\u0105cz klawiatur\u0119 wirtualn\u0105","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\u0119 po","menu.array.add column before":"Dodaj kolumn\u0119 przed","menu.array.delete row":"Usu\u0144 wiersz","menu.array.delete rows":"Usu\u0144 wybrane wiersze","menu.array.delete column":"Usu\u0144 kolumn\u0119","menu.array.delete columns":"Usu\u0144 wybrane kolumny","menu.mode":"Tryb","menu.mode-math":"Formu\u0142a","menu.mode-text":"Tekst","menu.mode-latex":"LaTeX","menu.insert":"Wstaw","menu.insert.abs":"Warto\u015B\u0107 bezwzgl\u0119dna","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\xF3\u017Cniczkowy i ca\u0142kowy","menu.insert.derivative":"Pochodna","menu.insert.derivative-template":"\\dfrac{\\mathrm{d}}{\\mathrm{d}x}f(x)\\bigm|_{x=a}","menu.insert.nth-derivative":"Pochodna n-tego rz\u0119du","menu.insert.nth-derivative-template":"\\dfrac{\\mathrm{d}^n}{\\mathrm{d}x^n}f(x)\\bigm|_{x=a}","menu.insert.integral":"Ca\u0142ka","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\u0142","menu.insert.modulus-template":"\\lvert z \\rvert","menu.insert.argument":"Argument","menu.insert.argument-template":"\\arg(z)","menu.insert.real-part":"Cz\u0119\u015B\u0107 rzeczywista","menu.insert.real-part-template":"\\Re(z)","menu.insert.imaginary-part":"Cz\u0119\u015B\u0107 urojona","menu.insert.imaginary-part-template":"\\Im(z)","menu.insert.conjugate":"Sprz\u0119\u017Cenie","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":"%@ \xD7 %@","menu.font-style":"Styl czcionki","menu.accent":"Akcent","menu.decoration":"Dekoracja","menu.color":"Kolor","menu.background-color":"T\u0142o","menu.evaluate":"Oblicz","menu.simplify":"Upro\u015B\u0107","menu.solve":"Rozwi\u0105\u017C","menu.solve-for":"Rozwi\u0105\u017C 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\u0144czowy","color.yellow":"\u017B\xF3\u0142ty","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\u0142y"},pt:{"keyboard.tooltip.symbols":"S\xEDmbolos","keyboard.tooltip.greek":"Letras gregas","keyboard.tooltip.numeric":"Num\xE9rico","keyboard.tooltip.alphabetic":"Letras romanas","tooltip.copy to clipboard":"Copiar para \xE1rea de transfer\xEAncia","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\xF3rmula","menu.mode-text":"Texto","menu.mode-latex":"LaTeX","tooltip.blackboard":"Quadro Negro","tooltip.bold":"Negrito","tooltip.italic":"It\xE1lico","tooltip.fraktur":"Fraktur","tooltip.script":"Script","tooltip.caligraphic":"Caligr\xE1fico","tooltip.typewriter":"M\xE1quina de Escrever","tooltip.roman-upright":"Romano Vertical","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"Estilo da Fonte","menu.accent":"Acento","menu.decoration":"Decora\xE7\xE3o","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":"\xCDndigo","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":"\u0421\u0438\u043C\u0432\u043E\u043B\u0438","keyboard.tooltip.greek":"\u0413\u0440\u0435\u0446\u044C\u043A\u0456 \u043B\u0456\u0442\u0435\u0440\u0438","keyboard.tooltip.numeric":"\u0427\u0438\u0441\u043B\u043E\u0432\u0438\u0439","keyboard.tooltip.alphabetic":"\u0420\u0438\u043C\u0441\u044C\u043A\u0456 \u043B\u0456\u0442\u0435\u0440\u0438","tooltip.copy to clipboard":"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0456\u043D\u0443","tooltip.cut to clipboard":"\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438 \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0456\u043D\u0443","tooltip.paste from clipboard":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0437 \u0431\u0443\u0444\u0435\u0440\u0430 \u043E\u0431\u043C\u0456\u043D\u0443","tooltip.redo":"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438","tooltip.toggle virtual keyboard":"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u0438 \u0432\u0456\u0440\u0442\u0443\u0430\u043B\u044C\u043D\u0443 \u043A\u043B\u0430\u0432\u0456\u0430\u0442\u0443\u0440\u0443","tooltip.menu":"\u041C\u0435\u043D\u044E","tooltip.undo":"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438","menu.borders":"\u041C\u0435\u0436\u0456","menu.insert matrix":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043C\u0430\u0442\u0440\u0438\u0446\u044E","menu.array.add row above":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0440\u044F\u0434\u043E\u043A \u043F\u0435\u0440\u0435\u0434","menu.array.add row below":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0440\u044F\u0434\u043E\u043A \u043F\u0456\u0441\u043B\u044F","menu.array.add column after":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0441\u0442\u043E\u0432\u043F\u0435\u0446\u044C \u043F\u0456\u0441\u043B\u044F","menu.array.add column before":"\u0414\u043E\u0434\u0430\u0442\u0438 \u0441\u0442\u043E\u0432\u043F\u0435\u0446\u044C \u043F\u0435\u0440\u0435\u0434","menu.array.delete row":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0440\u044F\u0434\u043E\u043A","menu.array.delete rows":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043D\u0456 \u0440\u044F\u0434\u043A\u0438","menu.array.delete column":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0441\u0442\u043E\u0432\u043F\u0435\u0446\u044C","menu.array.delete columns":"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043D\u0456 \u0441\u0442\u043E\u0432\u043F\u0446\u0456","menu.mode":"\u0420\u0435\u0436\u0438\u043C","menu.mode-math":"\u041C\u0430\u0442\u0435\u043C\u0430\u0442\u0438\u043A\u0430","menu.mode-text":"\u0422\u0435\u043A\u0441\u0442","menu.mode-latex":"LaTeX","menu.insert":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438","menu.insert.abs":"\u0410\u0431\u0441\u043E\u043B\u044E\u0442\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F","menu.insert.abs-template":"\\left|x\\right|","menu.insert.nth-root":"\u041A\u043E\u0440\u0456\u043D\u044C n-\u0433\u043E \u0441\u0442\u0435\u043F\u0435\u043D\u044F","menu.insert.nth-root-template":"\\sqrt[n]{x}","menu.insert.log-base":"\u041B\u043E\u0433\u0430\u0440\u0438\u0444\u043C \u0437\u0430 \u043E\u0441\u043D\u043E\u0432\u043E\u044E a","menu.insert.log-base-template":"\\log_a(x)","menu.insert.heading-calculus":"\u041E\u0431\u0447\u0438\u0441\u043B\u0435\u043D\u043D\u044F","menu.insert.derivative":"\u041F\u043E\u0445\u0456\u0434\u043D\u0430","menu.insert.derivative-template":"\\dfrac{\\mathrm{d}}{\\mathrm{d}x}f(x)\\bigm|_{x=a}","menu.insert.nth-derivative":"\u041F\u043E\u0445\u0456\u0434\u043D\u0430 n-\u0433\u043E \u043F\u043E\u0440\u044F\u0434\u043A\u0443","menu.insert.nth-derivative-template":"\\dfrac{\\mathrm{d}^n}{\\mathrm{d}x^n}f(x)\\bigm|_{x=a}","menu.insert.integral":"\u0406\u043D\u0442\u0435\u0433\u0440\u0430\u043B","menu.insert.integral-template":"$\\int_a^b f(x)\\,\\mathrm{d}x$","menu.insert.sum":"\u0421\u0443\u043C\u0430","menu.insert.sum-template":"$\\sum_{i=1}^n x_i$","menu.insert.product":"\u0414\u043E\u0431\u0443\u0442\u043E\u043A","menu.insert.product-template":"\\prod_{i=1}^n x_i","menu.insert.heading-complex-numbers":"\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0456 \u0447\u0438\u0441\u043B\u0430","menu.insert.modulus":"\u041C\u043E\u0434\u0443\u043B\u044C","menu.insert.modulus-template":"\\lvert z \\rvert","menu.insert.argument":"\u0410\u0440\u0433\u0443\u043C\u0435\u043D\u0442","menu.insert.argument-template":"\\arg(z)","menu.insert.real-part":"\u0414\u0456\u0439\u0441\u043D\u0430 \u0447\u0430\u0441\u0442\u0438\u043D\u0430","menu.insert.real-part-template":"\\Re(z)","menu.insert.imaginary-part":"\u0423\u044F\u0432\u043D\u0430 \u0447\u0430\u0441\u0442\u0438\u043D\u0430","menu.insert.imaginary-part-template":"\\Im(z)","menu.insert.conjugate":"\u0421\u043F\u0440\u044F\u0436\u0435\u043D\u0435 \u0447\u0438\u0441\u043B\u043E","menu.insert.conjugate-template":"\\overline{z}","tooltip.blackboard":"\u0414\u043E\u0448\u043A\u0430","tooltip.bold":"\u0416\u0438\u0440\u043D\u0438\u0439","tooltip.italic":"\u041A\u0443\u0440\u0441\u0438\u0432","tooltip.fraktur":"\u0424\u0440\u0430\u043A\u0442\u0443\u0440\u043D\u0438\u0439","tooltip.script":"\u0420\u0443\u043A\u043E\u043F\u0438\u0441\u043D\u0438\u0439","tooltip.caligraphic":"\u041A\u0430\u043B\u0456\u0433\u0440\u0430\u0444\u0456\u0447\u043D\u0438\u0439","tooltip.typewriter":"\u0414\u0440\u0443\u043A\u0430\u0440\u0441\u044C\u043A\u0438\u0439","tooltip.roman-upright":"\u041F\u0440\u044F\u043C\u0438\u0439 \u0440\u0438\u043C\u0441\u044C\u043A\u0438\u0439","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u0421\u0442\u0438\u043B\u044C \u0448\u0440\u0438\u0444\u0442\u0443","menu.accent":"\u0410\u043A\u0446\u0435\u043D\u0442","menu.decoration":"\u041E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u043D\u044F","menu.color":"\u041A\u043E\u043B\u0456\u0440","menu.background-color":"\u0424\u043E\u043D","menu.evaluate":"\u041E\u0431\u0447\u0438\u0441\u043B\u0438\u0442\u0438","menu.simplify":"\u0421\u043F\u0440\u043E\u0441\u0442\u0438\u0442\u0438","menu.solve":"\u0420\u043E\u0437\u0432\u2019\u044F\u0437\u0430\u0442\u0438","menu.solve-for":"\u0420\u043E\u0437\u0432\u2019\u044F\u0437\u0430\u0442\u0438 \u0434\u043B\u044F %@","menu.cut":"\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438","menu.copy":"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438","menu.copy-as-latex":"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 \u044F\u043A LaTeX","menu.copy-as-ascii-math":"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 \u044F\u043A ASCII Math","menu.copy-as-mathml":"\u041A\u043E\u043F\u0456\u044E\u0432\u0430\u0442\u0438 \u044F\u043A MathML","menu.paste":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438","menu.select-all":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u0432\u0441\u0435","color.red":"\u0427\u0435\u0440\u0432\u043E\u043D\u0438\u0439","color.orange":"\u041F\u043E\u043C\u0430\u0440\u0430\u043D\u0447\u0435\u0432\u0438\u0439","color.yellow":"\u0416\u043E\u0432\u0442\u0438\u0439","color.lime":"\u041B\u0430\u0439\u043C\u043E\u0432\u0438\u0439","color.green":"\u0417\u0435\u043B\u0435\u043D\u0438\u0439","color.teal":"\u0411\u0456\u0440\u044E\u0437\u043E\u0432\u0438\u0439","color.cyan":"\u0421\u0438\u043D\u044C\u043E-\u0437\u0435\u043B\u0435\u043D\u0438\u0439","color.blue":"\u0421\u0438\u043D\u0456\u0439","color.indigo":"\u0406\u043D\u0434\u0438\u0433\u043E","color.purple":"\u0424\u0456\u043E\u043B\u0435\u0442\u043E\u0432\u0438\u0439","color.magenta":"\u041F\u0443\u0440\u043F\u0443\u0440\u043D\u0438\u0439","color.black":"\u0427\u043E\u0440\u043D\u0438\u0439","color.dark-grey":"\u0422\u0435\u043C\u043D\u043E-\u0441\u0456\u0440\u0438\u0439","color.grey":"\u0421\u0456\u0440\u0438\u0439","color.light-grey":"\u0421\u0432\u0456\u0442\u043B\u043E-\u0441\u0456\u0440\u0438\u0439","color.white":"\u0411\u0456\u043B\u0438\u0439"},"zh-cn":{"keyboard.tooltip.symbols":"\u7B26\u53F7","keyboard.tooltip.greek":"\u5E0C\u814A\u5B57\u6BCD","keyboard.tooltip.numeric":"\u6570\u5B57","keyboard.tooltip.alphabetic":"\u7F57\u9A6C\u5B57\u6BCD","tooltip.copy to clipboard":"\u590D\u5236\u5230\u526A\u8D34\u677F","tooltip.redo":"\u91CD\u505A","tooltip.toggle virtual keyboard":"\u5207\u6362\u865A\u62DF\u952E\u76D8","tooltip.undo":"\u64A4\u6D88","menu.insert matrix":"\u63D2\u5165\u77E9\u9635","menu.borders":"\u77E9\u9635\u5206\u9694\u7B26","menu.array.add row above":"\u5728\u540E\u9762\u6DFB\u52A0\u884C","menu.array.add row below":"\u5728\u524D\u9762\u6DFB\u52A0\u884C","menu.array.add column after":"\u5728\u540E\u9762\u6DFB\u52A0\u5217r","menu.array.add column before":"\u5728\u524D\u9762\u6DFB\u52A0\u5217","menu.array.delete row":"\u5220\u9664\u884C","menu.array.delete rows":"\u5220\u9664\u9009\u5B9A\u884C","menu.array.delete column":"\u5220\u9664\u5217","menu.array.delete columns":"\u5220\u9664\u9009\u5B9A\u7684\u5217","menu.mode":"\u6A21\u5F0F","menu.mode-math":"\u6570\u5B66","menu.mode-text":"\u6587\u672C","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u9ED1\u677F","tooltip.bold":"\u7C97\u4F53","tooltip.italic":"\u659C\u4F53","tooltip.fraktur":"Fraktur","tooltip.script":"\u811A\u672C","tooltip.caligraphic":"\u8349\u4E66","tooltip.typewriter":"\u6253\u5B57\u673A","tooltip.roman-upright":"\u7F57\u9A6C\u76F4\u7ACB","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u5B57\u4F53\u6837\u5F0F","menu.accent":"\u91CD\u97F3","menu.decoration":"\u88C5\u9970","menu.color":"\u989C\u8272","menu.background-color":"\u80CC\u666F","menu.evaluate":"\u8BA1\u7B97","menu.simplify":"\u7B80\u5316","menu.solve":"\u6C42\u89E3","menu.solve-for":"\u6C42\u89E3 %@","menu.cut":"\u526A\u5207","menu.copy":"\u590D\u5236","menu.copy-as-latex":"\u590D\u5236\u4E3A LaTeX","menu.copy-as-ascii-math":"\u590D\u5236\u4E3A ASCII Math","menu.copy-as-mathml":"\u590D\u5236\u4E3A MathML","menu.paste":"\u7C98\u8D34","menu.select-all":"\u5168\u9009","color.red":"\u7EA2\u8272","color.orange":"\u6A59\u8272","color.yellow":"\u9EC4\u8272","color.lime":"\u7EFF\u9EC4\u8272","color.green":"\u7EFF\u8272","color.teal":"\u9752\u8272","color.cyan":"\u84DD\u7EFF\u8272","color.blue":"\u84DD\u8272","color.indigo":"\u975B\u84DD\u8272","color.purple":"\u7D2B\u8272","color.magenta":"\u6D0B\u7EA2\u8272","color.black":"\u9ED1\u8272","color.dark-grey":"\u6DF1\u7070\u8272","color.grey":"\u7070\u8272","color.light-grey":"\u6D45\u7070\u8272","color.white":"\u767D\u8272"},"zh-tw":{"keyboard.tooltip.symbols":"\u7B26\u865F","keyboard.tooltip.greek":"\u5E0C\u81D8\u5B57\u6BCD","keyboard.tooltip.numeric":"\u6578\u5B57","keyboard.tooltip.alphabetic":"\u7F85\u99AC\u5B57\u6BCD","tooltip.copy to clipboard":"\u8907\u88FD\u5230\u526A\u8CBC\u677F","tooltip.redo":"\u91CD\u505A","tooltip.toggle virtual keyboard":"\u5207\u63DB\u865B\u64EC\u9375\u76E4","tooltip.undo":"\u64A4\u6D88","menu.insert matrix":"\u63D2\u5165\u77E9\u9663","menu.borders":"\u77E9\u9663\u5206\u9694\u7B26","menu.array.add row above":"\u5728\u5F8C\u9762\u6DFB\u52A0\u884C","menu.array.add row below":"\u5728\u524D\u9762\u6DFB\u52A0\u884C","menu.array.add column after":"\u5728\u5F8C\u9762\u6DFB\u52A0\u5217","menu.array.add column before":"\u5728\u524D\u9762\u6DFB\u52A0\u5217","menu.array.delete row":"\u522A\u9664\u884C","menu.array.delete rows":"\u522A\u9664\u9078\u5B9A\u884C","menu.array.delete column":"\u522A\u9664\u5217","menu.array.delete columns":"\u522A\u9664\u9078\u5B9A\u7684\u5217","menu.mode":"\u6A21\u5F0F","menu.mode-math":"\u6578\u5B78","menu.mode-text":"\u6587\u672C","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u9ED1\u677F","tooltip.bold":"\u7C97\u9AD4","tooltip.italic":"\u659C\u9AD4","tooltip.fraktur":"Fraktur","tooltip.script":"\u8173\u672C","tooltip.caligraphic":"\u8349\u66F8","tooltip.typewriter":"\u6253\u5B57\u6A5F","tooltip.roman-upright":"\u7F85\u99AC\u76F4\u7ACB","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u5B57\u9AD4\u6A23\u5F0F","menu.accent":"\u91CD\u97F3","menu.decoration":"\u88DD\u98FE","menu.color":"\u984F\u8272","menu.background-color":"\u80CC\u666F","menu.evaluate":"\u8A08\u7B97","menu.simplify":"\u7C21\u5316","menu.solve":"\u6C42\u89E3","menu.solve-for":"\u6C42\u89E3 %@","menu.cut":"\u526A\u4E0B","menu.copy":"\u8907\u88FD","menu.copy-as-latex":"\u8907\u88FD\u70BA LaTeX","menu.copy-as-ascii-math":"\u8907\u88FD\u70BA ASCII Math","menu.copy-as-mathml":"\u8907\u88FD\u70BA MathML","menu.paste":"\u8CBC\u4E0A","menu.select-all":"\u5168\u9078","color.red":"\u7D05\u8272","color.orange":"\u6A59\u8272","color.yellow":"\u9EC3\u8272","color.lime":"\u7DA0\u9EC3\u8272","color.green":"\u7DA0\u8272","color.teal":"\u9752\u8272","color.cyan":"\u85CD\u7DA0\u8272","color.blue":"\u85CD\u8272","color.indigo":"\u975B\u85CD\u8272","color.purple":"\u7D2B\u8272","color.magenta":"\u6D0B\u7D05\u8272","color.black":"\u9ED1\u8272","color.dark-grey":"\u6DF1\u7070\u8272","color.grey":"\u7070\u8272","color.light-grey":"\u6DFA\u7070\u8272","color.white":"\u767D\u8272"}},_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return D._locale||(D._locale=f()?navigator.language.slice(0,5):"en-US"),D._locale;},set locale(e){D._locale=e,D._numberFormatter=void 0,D.dirty=!0;},get numberFormatter(){if(!D._numberFormatter)try{D._numberFormatter=new Intl.NumberFormat(D.locale);}catch(e){try{D._numberFormatter=new Intl.NumberFormat(D.locale.slice(0,2));}catch(e){D._numberFormatter=new Intl.NumberFormat("en-US");}}return D._numberFormatter;},merge:function merge(e,t){if(_typeof(e)=="string"&&t)D.strings[e]=c(c({},D.strings[e]),t),D.dirty=!0;else for(var _i6=0,_Object$keys=Object.keys(e);_i6<_Object$keys.length;_i6++){var _t2=_Object$keys[_i6];D.merge(_t2,e[_t2]);}},get dirty(){return D._dirty;},set dirty(e){var _this=this;D._dirty||D._dirty===e||(D._dirty=!0,setTimeout(function(){D._dirty=!1,_this._subscribers.forEach(function(e){return e==null?void 0:e();});},0));},subscribe:function subscribe(e){return D._subscribers.push(e),D._subscribers.length-1;},unsubscribe:function unsubscribe(e){e<0||e>=D._subscribers.length||(D._subscribers[e]=void 0);},update:function update(e){var t=e.querySelectorAll("[data-l10n-tooltip]");var _iterator4=_createForOfIteratorHelper(t),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var _e4=_step4.value;var _t3=_e4.getAttribute("data-l10n-tooltip");if(_t3){var _n3=O(_t3);_n3&&_e4.setAttribute("data-tooltip",_n3);}}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}t=e.querySelectorAll("[data-l10n-arial-label]");var _iterator5=_createForOfIteratorHelper(t),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var _e5=_step5.value;var _t4=_e5.getAttribute("data-l10n-arial-label");if(_t4){var _n4=O(_t4);_n4&&_e5.setAttribute("aria-label",_n4);}}}catch(err){_iterator5.e(err);}finally{_iterator5.f();}}};function O(e){if(e===void 0)return;var n="",r=D.locale;D.strings[r]&&(n=D.strings[r][e]);var i=r.slice(0,2);if(!n&&D.strings[i]&&(n=D.strings[i][e]),n||(n=D.strings.en[e]),!n)return;var a=/(%@|%([0-9]+)\$@)/g,o=a.exec(n),s=0;for(;o;){var _ref;if(_ref=s+++1,_ref<1||arguments.length<=_ref?undefined:arguments[_ref]){var _ref2;var _e6=(_ref2=(o[2]?parseInt(o[2],10)-1:s-1)+1,_ref2<1||arguments.length<=_ref2?undefined:arguments[_ref2]);_typeof(_e6)=="number"&&(_e6=D.numberFormatter.format(_e6)),n=n.replace(o[1],_e6);}o=a.exec(n);}return n=n.replace(/%%/g,"%"),n;}var Se={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},Ce={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},we={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"},Te={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"},Ee={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"},De={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 Oe(e){var t,n,r,i,a,o;var s=e.split("!"),c,l,u,d=255,f=255,p=255,m=-1,h=s.length>0&&s[0].startsWith("-");h&&(s[0]=s[0].slice(1));for(var _e7=0;_e7<s.length;_e7++){c=d,l=f,u=p;var _h2=(t=s[_e7].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:t[1],_g2=_h2==null?void 0:_h2.toLowerCase(),_2=_h2&&(o=(a=(i=(r=(n=Te[_g2])==null?Te[Ee[_h2]]:n)==null?Ce[_h2]:r)==null?De[_h2]:i)==null?Se[_h2]:a)!=null?o:s[_e7].trim(),_v2=_2.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(_v2!=null&&_v2[1]&&_v2[2]&&_v2[3])d=Math.max(0,Math.min(255,Number.parseInt(_v2[1],16))),f=Math.max(0,Math.min(255,Number.parseInt(_v2[2],16))),p=Math.max(0,Math.min(255,Number.parseInt(_v2[3],16)));else if(_v2=_2.match(/^#([\da-f]{3})$/i),_v2!=null&&_v2[1]){var _e8=Number.parseInt(_v2[1][0],16),_t5=Number.parseInt(_v2[1][1],16),_n5=Number.parseInt(_v2[1][2],16);d=Math.max(0,Math.min(255,_e8*16+_e8)),f=Math.max(0,Math.min(255,_t5*16+_t5)),p=Math.max(0,Math.min(255,_n5*16+_n5));}else if(_v2=_2.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),_v2!=null&&_v2[1]&&_v2[2]&&_v2[3])d=Math.max(0,Math.min(255,Number.parseInt(_v2[1]))),f=Math.max(0,Math.min(255,Number.parseInt(_v2[2]))),p=Math.max(0,Math.min(255,Number.parseInt(_v2[3])));else return;m>=0&&(d=(1-m)*d+m*c,f=(1-m)*f+m*l,p=(1-m)*p+m*u,m=-1),_e7+1<s.length&&(m=Math.max(0,Math.min(100,Number.parseInt(s[++_e7])))/100);}return m>=0&&(d=m*d+(1-m)*c,f=m*f+(1-m)*l,p=m*p+(1-m)*u),h&&(d=255-d,f=255-f,p=255-p),"#"+("00"+Math.round(d).toString(16)).slice(-2)+("00"+Math.round(f).toString(16)).slice(-2)+("00"+Math.round(p).toString(16)).slice(-2);}function ke(e){var t,n;return e=e.trim(),(n=(t=we[e.toLowerCase()])==null?we[Ee[e]]:t)==null?Oe(e):n;}function Ae(e){if(!e||e[0]!=="#")return;e=e.slice(1);var 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 je(e,t,n){return n<0&&(n+=6),n>=6&&(n-=6),n<1?(t-e)*n+e:n<3?t:n<4?(t-e)*(4-n)+e:e;}function Me(e){var _ref3=[e.h,e.s,e.l],t=_ref3[0],n=_ref3[1],r=_ref3[2];t=(t+360)%360/60,r=Math.max(0,Math.min(r,1)),n=Math.max(0,Math.min(n,1));var i=r<=.5?r*(n+1):r+n-r*n,a=r*2-i;return{r:Math.round(255*je(a,i,t+2)),g:Math.round(255*je(a,i,t)),b:Math.round(255*je(a,i,t-2))};}function Ne(e){return e<0?0:e>255?255:Math.round(e);}function Pe(e){var t=e.r,n=e.g,r=e.b,i=((1<<24)+(Ne(t)<<16)+(Ne(n)<<8)+Ne(r)).toString(16).slice(1);return i[0]===i[1]&&i[2]===i[3]&&i[4]===i[5]&&i[6]===i[7]&&(i=i[0]+i[2]+i[4]),"#"+i;}function Fe(e){var t=e.r,n=e.g,r=e.b;t/=255,n/=255,r/=255;var i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c;a===i?s=0:t===a?s=(n-r)/o:n===a?s=2+(r-t)/o:r===a&&(s=4+(t-n)/o),s=Math.min(s*60,360),s<0&&(s+=360);var l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),{h:s,s:c,l:l};}function Ie(e){var t=Ae(e);if(!t)return e;var _Fe=Fe(t),n=_Fe.h,r=_Fe.s,i=_Fe.l;return r+=.1,i-=.1,Pe(Me({h:n,s:r,l:i}));}var Le={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}",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"},Re={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},ze=[{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 Be(e,t,n){if(!/[A-Za-z\d]/.test(e)||(n==="up"&&(n=void 0),!t&&!n))return;var r=e.codePointAt(0);if(r===void 0)return e;var _iterator6=_createForOfIteratorHelper(ze),_step6;try{for(_iterator6.s();!(_step6=_iterator6.n()).done;){var _e9=_step6.value;if((!t||_e9.variant===t)&&(!n||_e9.style===n)&&r>=_e9.offset&&r<_e9.offset+_e9.len){var _t6=_e9.start+r-_e9.offset;return String.fromCodePoint(Re[_t6]||_t6);}}}catch(err){_iterator6.e(err);}finally{_iterator6.f();}}function Ve(e){var t;if((e<119808||e>120831)&&(e<8448||e>8527))return{char:String.fromCodePoint(e)};for(var _n6 in Re)if(Re[_n6]===e){e=(t=_n6.codePointAt(0))==null?0:t;break;}for(var _i7=0,_ze=ze;_i7<_ze.length;_i7++){var _t7=_ze[_i7];if(e>=_t7.start&&e<_t7.start+_t7.len)return{char:String.fromCodePoint(e-_t7.start+_t7.offset),variant:_t7.variant,style:_t7.style};}return{char:String.fromCodePoint(e)};}function He(e){var t;if("{}<>[]$&*#^_%:'\u02DC".includes(e)||e.length>1)return;var n=(t=e.codePointAt(0))==null?0:t,r=Le[n];if(r)return r;var _Ve=Ve(n),i=_Ve.char,a=_Ve.variant,o=_Ve.style;if(!(!a&&!o)){switch(r=i,a){case"double-struck":r="\\mathbb{".concat(r,"}");break;case"fraktur":r="\\mathfrak{".concat(r,"}");break;case"script":r="\\mathscr{".concat(r,"}");break;case"sans-serif":r="\\mathsf{".concat(r,"}");break;case"monospace":r="\\mathtt{".concat(r,"}");break;case"calligraphic":r="\\mathcal{".concat(r,"}");break;}switch(o){case"bold":r="\\mathbf{".concat(r,"}");break;case"italic":r="\\mathit{".concat(r,"}");break;case"bolditalic":r="\\mathbfit{".concat(r,"}");break;}return r;}}function k(e){return e?Array.isArray(e)?e:_typeof(e)=="object"&&"group"in e?e.group:[]:[];}var Ue={},We=c({},Le),Ge={},Ke={},qe={strut:{primitive:!0,def:"\\phantom{\\rule[0.3\\baselineskip]{0}{0.7\\baselineskip}}",args:0,captureSelection:!0},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`\u220c}",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:{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}}},"amsmath.sty":{package:{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}},primitive:!0},"texvc.sty":{package:{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}"},primitive:!1}},Je={" ":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,"\u2013":8211,"\u2014":8212,"\u2018":8216,"\u2019":8217,"\u201c":8220,"\u201d":8221,'"':8221,"\\ss":223,"\\ae":230,"\\oe":339,"\\AE":198,"\\OE":338,"\\O":216,"\\i":305,"\\j":567,"\\aa":229,"\\AA":197},Ye=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,Xe,Ze;_()?(Xe=RegExp("\\p{Letter}","u"),Ze=RegExp("[0-9\\p{Letter}]","u")):(Xe=/[a-zA-Z\u0430\u0410\u0431\u0411\u0432\u0412\u0433\u0413\u0434\u0414\u0435\u0415\u0451\u0401\u0436\u0416\u0437\u0417\u0438\u0418\u0439\u0419\u043a\u041a\u043b\u041b\u043c\u041c\u043d\u041d\u043e\u041e\u043f\u041f\u0440\u0420\u0441\u0421\u0442\u0422\u0443\u0423\u0444\u0424\u0445\u0425\u0446\u0426\u0447\u0427\u0448\u0428\u0449\u0429\u044a\u042a\u044b\u042b\u044c\u042c\u044d\u042d\u044e\u042e\u044f\u0104\u0105\u0106\u0107\u0118\u0119\u0141\u0142\u0143\u0144\u00d3\u00f3\u015a\u015b\u0179\u017a\u017b\u017c\u00e0\u00e2\u00e4\u00f4\u00e9\u00e8\u00eb\u00ea\u00ef\u00ee\u00e7\u00f9\u00fb\u00fc\u00ff\u00e6\u0153\u00c0\u00c2\u00c4\u00d4\u00c9\u00c8\u00cb\u00ca\u00cf\u00ce\u0178\u00c7\u00d9\u00db\u00dc\u00c6\u0152\u00f6\u00df\u00d6\u1e9e\u00ec\u00ed\u00f2\u00fa\u00cc\u00cd\u00d2\u00da\u00e1\u00f1\u00c1\u00d1]/,Ze=/[\da-zA-Z\u0430\u0410\u0431\u0411\u0432\u0412\u0433\u0413\u0434\u0414\u0435\u0415\u0451\u0401\u0436\u0416\u0437\u0417\u0438\u0418\u0439\u0419\u043a\u041a\u043b\u041b\u043c\u041c\u043d\u041d\u043e\u041e\u043f\u041f\u0440\u0420\u0441\u0421\u0442\u0422\u0443\u0423\u0444\u0424\u0445\u0425\u0446\u0426\u0447\u0427\u0448\u0428\u0449\u0429\u044a\u042a\u044b\u042b\u044c\u042c\u044d\u042d\u044e\u042e\u044f\u0104\u0105\u0106\u0107\u0118\u0119\u0141\u0142\u0143\u0144\u00d3\u00f3\u015a\u015b\u0179\u017a\u017b\u017c\u00e0\u00e2\u00e4\u00f4\u00e9\u00e8\u00eb\u00ea\u00ef\u00ee\u00e7\u00f9\u00fb\u00fc\u00ff\u00e6\u0153\u00c0\u00c2\u00c4\u00d4\u00c9\u00c8\u00cb\u00ca\u00cf\u00ce\u0178\u00c7\u00d9\u00db\u00dc\u00c6\u0152\u00f6\u00df\u00d6\u1e9e\u00ec\u00ed\u00f2\u00fa\u00cc\u00cd\u00d2\u00da\u00e1\u00f1\u00c1\u00d1]/);function Qe(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"mord";var r=arguments.length>3?arguments[3]:undefined;t!==void 0&&(Ue[e]={definitionType:"symbol",type:n,variant:r,codepoint:t},We[t]||(We[t]=e));}function $e(e,t,n){if(_typeof(e)=="string"){for(var _t8=0;_t8<e.length;_t8++){var _n7=e.charAt(_t8);Qe(_n7,_n7.codePointAt(0));}return;}var _iterator7=_createForOfIteratorHelper(e),_step7;try{for(_iterator7.s();!(_step7=_iterator7.n()).done;){var _step7$value=_slicedToArray(_step7.value,4),_r2=_step7$value[0],_i8=_step7$value[1],_a3=_step7$value[2],_o3=_step7$value[3];Qe(_r2,_i8,_a3==null?t:_a3,_o3==null?n:_o3);}}catch(err){_iterator7.e(err);}finally{_iterator7.f();}}function et(e,t){for(var _n8=e;_n8<=t;_n8++)Qe(String.fromCodePoint(_n8),_n8);}function tt(e){var t;return(t=Ke[e])==null?null:t;}function nt(e,t){var n,r;if(t.length===0||t==="\\"||!t.startsWith("\\"))return[];var i=[];for(var _e0 in Ge)_e0.startsWith(t)&&!Ge[_e0].infix&&i.push({match:_e0,frequency:(n=Ge[_e0].frequency)==null?0:n});for(var _e1 in Ue)_e1.startsWith(t)&&i.push({match:_e1,frequency:(r=Ue[_e1].frequency)==null?0:r});var a=t.substring(1);for(var _i9=0,_Object$keys2=Object.keys(e.options.macros);_i9<_Object$keys2.length;_i9++){var _t9=_Object$keys2[_i9];_t9.startsWith(a)&&i.push({match:"\\"+_t9,frequency:0});}return i.sort(function(e,t){var n,r;return e.frequency===t.frequency?e.match.length===t.match.length?e.match<t.match?-1:1:e.match.length-t.match.length:((n=t.frequency)==null?0:n)-((r=e.frequency)==null?0:r);}),i.map(function(e){return e.match;});}function rt(e){var t="auto",n=e.match(/:([^=]+)/);return n&&(t=n[1].trim()),t;}function it(e){if(!e)return[];var t=[],n=e.split("]");if(n[0].startsWith("[")){t.push({isOptional:!0,type:rt(n[0].slice(1))});for(var _e10=1;_e10<=n.length;_e10++)t.push.apply(t,_toConsumableArray(it(n[_e10])));}else if(n=e.split("}"),n[0].startsWith("{")){t.push({isOptional:!1,type:rt(n[0].slice(1))});for(var _e11=1;_e11<=n.length;_e11++)t.push.apply(t,_toConsumableArray(it(n[_e11])));}return t;}function at(e){if(!e)return"";var t="",n=!0;var _iterator8=_createForOfIteratorHelper(e),_step8;try{for(_iterator8.s();!(_step8=_iterator8.n()).done;){var _r3=_step8.value;_typeof(_r3.value)=="string"?t+=_r3.value:n=!1;}}catch(err){_iterator8.e(err);}finally{_iterator8.f();}return n?t:"";}function ot(e,t,n){_typeof(e)=="string"&&(e=[e]);var r={tabular:!0,rootOnly:!1,params:it(t),createAtom:n};var _iterator9=_createForOfIteratorHelper(e),_step9;try{for(_iterator9.s();!(_step9=_iterator9.n()).done;){var _t0=_step9.value;Ke[_t0]=r;}}catch(err){_iterator9.e(err);}finally{_iterator9.f();}}function st(e,t,n){var r;_typeof(e)=="string"&&(e=[e]);var i={tabular:(r=n==null?void 0:n.tabular)==null?!1:r,rootOnly:!0,params:[],createAtom:t};var _iterator0=_createForOfIteratorHelper(e),_step0;try{for(_iterator0.s();!(_step0=_iterator0.n()).done;){var _t1=_step0.value;Ke[_t1]=i;}}catch(err){_iterator0.e(err);}finally{_iterator0.f();}}function A(e,t,n){var r,i;n||(n={});var a={definitionType:"function",params:it(t),ifMode:n.ifMode,isFunction:(r=n.isFunction)==null?!1:r,applyMode:n.applyMode,infix:(i=n.infix)==null?!1:i,parse:n.parse,createAtom:n.createAtom,applyStyle:n.applyStyle,serialize:n.serialize,render:n.render};if(_typeof(e)=="string")Ge["\\"+e]=a;else{var _iterator1=_createForOfIteratorHelper(e),_step1;try{for(_iterator1.s();!(_step1=_iterator1.n()).done;){var _t10=_step1.value;Ge["\\"+_t10]=a;}}catch(err){_iterator1.e(err);}finally{_iterator1.f();}}}var ct;function lt(e){return ct||(ct=dt(qe)),e?dt(c(c({},ct),e)):ct;}function ut(e,t){var n,r,i,a;if(_typeof(e)=="string"){var _i0=0,_a4=e;return /(^|[^\\])#1/.test(_a4)&&(_i0=1),/(^|[^\\])#2/.test(_a4)&&(_i0=2),/(^|[^\\])#3/.test(_a4)&&(_i0=3),/(^|[^\\])#4/.test(_a4)&&(_i0=4),/(^|[^\\])#5/.test(_a4)&&(_i0=5),/(^|[^\\])#6/.test(_a4)&&(_i0=6),/(^|[^\\])#7/.test(_a4)&&(_i0=7),/(^|[^\\])#8/.test(_a4)&&(_i0=8),/(^|[^\\])#9/.test(_a4)&&(_i0=9),{expand:(n=t==null?void 0:t.expand)==null?!0:n,captureSelection:(r=t==null?void 0:t.captureSelection)==null?!0:r,args:_i0,def:_a4};}return c({expand:(i=t==null?void 0:t.expand)==null?!0:i,captureSelection:(a=t==null?void 0:t.captureSelection)==null?!0:a,args:0},e);}function dt(e){if(!e)return{};var t={};for(var _i1=0,_Object$keys3=Object.keys(e);_i1<_Object$keys3.length;_i1++){var _n9=_Object$keys3[_i1];var _r4=e[_n9];if(_r4==null)delete t[_n9];else if(_typeof(_r4)=="object"&&"package"in _r4)for(var _i10=0,_Object$keys4=Object.keys(_r4.package);_i10<_Object$keys4.length;_i10++){var _e12=_Object$keys4[_i10];t[_e12]=ut(_r4.package[_e12],{expand:!_r4.primitive,captureSelection:_r4.captureSelection});}else t[_n9]=ut(_r4);}return t;}function ft(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"math";if(!e||e.length===0)return null;var n=null;if(e.startsWith("\\")){if(n=Ge[e],n)return!n.ifMode||n.ifMode===t?n:null;t==="math"?n=Ue[e]:Je[e]&&(n={definitionType:"symbol",type:"mord",codepoint:Je[e]});}else if(t==="math"){if(n=Ue[e],!n&&e.length===1){var _t11=mt("math",e.codePointAt(0));return _t11.startsWith("\\")?l(c({},ft(_t11,"math")),{command:_t11}):null;}}else Je[e]?n={definitionType:"symbol",type:"mord",codepoint:Je[e]}:t==="text"&&(n={definitionType:"symbol",type:"mord",codepoint:e.codePointAt(0)});return n==null?null:n;}function pt(e,t){return e.startsWith("\\")?t[e.slice(1)]:null;}function mt(e,t){return t===void 0?"":e==="math"&&We[t]?We[t]:e==="text"&&Object.keys(Je).find(function(e){return Je[e]===t;})||String.fromCodePoint(t);}var ht=[0,.68889,0,0,.72222],gt=[0,.68889,0,0,.66667],_t=[0,.68889,0,0,.77778],vt=[0,.68889,0,0,.61111],yt=[.16667,.68889,0,0,.77778],bt=[0,.68889,0,0,.55556],j=[0,0,0,0,.25],xt=[0,.825,0,0,2.33334],St=[0,.9,0,0,2.33334],Ct=[0,.68889,0,0,.54028],wt=[-.03598,.46402,0,0,.5],Tt=[-.13313,.36687,0,0,1],Et=[.01354,.52239,0,0,1],Dt=[.01354,.52239,0,0,1.11111],Ot=[0,.54986,0,0,1],kt=[0,.69224,0,0,.5],At=[0,.43056,0,0,1],jt=[.08198,.58198,0,0,.77778],Mt=[.19444,.69224,0,0,.41667],Nt=[.1808,.675,0,0,1],Pt=[.19444,.69224,0,0,.83334],Ft=[.13667,.63667,0,0,1],It=[-.064,.437,0,0,1.334],Lt=[.08167,.58167,0,0,.77778],Rt=[0,.69224,0,0,.72222],zt=[0,.69224,0,0,.66667],Bt=[-.13313,.36687,0,0,.77778],Vt=[.06062,.54986,0,0,.77778],Ht=[0,.69224,0,0,.77778],Ut=[.25583,.75583,0,0,.77778],Wt=[.25142,.75726,0,0,.77778],Gt=[.20576,.70576,0,0,.77778],Kt=[.30274,.79383,0,0,.77778],qt=[.22958,.72958,0,0,.77778],Jt=[.1808,.675,0,0,.77778],Yt=[.13667,.63667,0,0,.77778],Xt=[.13597,.63597,0,0,.77778],Zt=[.03517,.54986,0,0,.77778],Qt=[0,.675,0,0,.77778],$t=[.19444,.69224,0,0,.61111],en=[0,.54986,0,0,.76042],tn=[0,.54986,0,0,.66667],nn=[.0391,.5391,0,0,.77778],rn=[.03517,.54986,0,0,1.33334],an=[.38569,.88569,0,0,.77778],on=[.23222,.74111,0,0,.77778],sn=[.19444,.69224,0,0,.77778],cn=[0,.37788,0,0,.5],ln=[0,.54986,0,0,.72222],un=[0,.69224,0,0,.83334],dn=[.11111,.69224,0,0,.66667],fn=[.26167,.75726,0,0,.77778],pn=[.48256,.98256,0,0,.77778],mn=[.28481,.79383,0,0,.77778],hn=[.08167,.58167,0,0,.22222],gn=[.08167,.58167,0,0,.38889],_n=[0,.43056,.04028,0,.66667],vn=[.41951,.91951,0,0,.77778],yn=[.24982,.74947,0,0,.38865],bn=[.08319,.58283,0,0,.75623],xn=[0,.10803,0,0,.27764],Sn=[0,.47534,0,0,.50181],Cn=[.18906,.47534,0,0,.50181],wn=[0,.69141,0,0,.50181],Tn=[.24982,.74947,0,0,.27764],En=[0,.69141,0,0,.21471],Dn=[.25,.75,0,0,.44722],On=[0,.64444,0,0,.575],kn=[.08556,.58556,0,0,.89444],An=[0,.69444,0,0,.89444],jn=[0,.68611,0,0,.9],Mn=[0,.68611,0,0,.86944],Nn=[.25,.75,0,0,.575],Pn=[.25,.75,0,0,.31944],Fn=[0,.69444,0,0,.63889],In=[0,.69444,0,0,.31944],Ln=[0,.44444,0,0,.63889],Rn=[0,.44444,0,0,.51111],zn=[0,.69444,0,0,.575],Bn=[.13333,.63333,0,0,.89444],Vn=[0,.44444,0,0,.31944],Hn=[0,.69444,0,0,.86944],Un=[0,.68611,0,0,.69166],Wn=[0,.68611,0,0,.83055],Gn=[0,.68611,0,0,.89444],Kn=[0,.69444,0,0,.60278],qn=[.19444,.69444,0,0,.51111],Jn=[0,.69444,0,0,.83055],Yn=[-.10889,.39111,0,0,1.14999],Xn=[.19444,.69444,0,0,.575],Zn=[.19444,.69444,0,0,1.14999],Qn=[.19444,.69444,0,0,.70277],$n=[.05556,.75,0,0,.575],er=[0,.68611,0,0,.95833],tr=[.08556,.58556,0,0,.76666],nr=[-.02639,.47361,0,0,.575],rr=[0,.44444,0,0,.89444],ir=[0,.55556,0,0,.76666],ar=[-.10889,.39111,0,0,.89444],or=[.00222,.50222,0,0,.89444],sr=[.19667,.69667,0,0,.89444],cr=[.08556,.58556,0,0,1.14999],lr=[0,.69444,0,0,.70277],ur=[-.02778,.47222,0,0,.575],dr=[.25,.75,0,0,.51111],fr=[-.13889,.36111,0,0,1.14999],pr=[.19444,.69444,0,0,1.02222],mr=[.12963,.69444,0,0,.89444],hr=[.19444,.69444,0,0,.44722],gr=[0,.64444,.13167,0,.59111],_r=[.19444,.64444,.13167,0,.59111],vr=[0,.68611,.17208,0,.8961],yr=[.19444,.44444,.105,0,.53222],br=[0,.44444,.085,0,.82666],xr=[0,.69444,.06709,0,.59111],Sr=[0,.69444,.12945,0,.35555],Cr=[0,.69444,0,0,.94888],wr=[0,.69444,.11472,0,.59111],Tr=[0,.68611,.10778,0,.88555],Er=[0,.69444,.07939,0,.62055],Dr=[0,.69444,.12417,0,.30667],Or=[0,.64444,.13556,0,.51111],kr=[.19444,.64444,.13556,0,.51111],Ar=[0,.68333,.16389,0,.74333],jr=[.19444,.43056,.08847,0,.46],Mr=[0,.43056,.07514,0,.71555],Nr=[0,.69444,.06646,0,.51111],Pr=[0,.69444,0,0,.83129],Fr=[0,.69444,.1225,0,.51111],Ir=[0,.68333,.09403,0,.76666],Lr=[0,.68333,.11111,0,.76666],Rr=[0,.69444,.06961,0,.51444],zr=[0,.69444,0,0,.27778],Br=[.25,.75,0,0,.38889],Vr=[0,.64444,0,0,.5],Hr=[0,.69444,0,0,.77778],Ur=[0,.68333,0,0,.75],Wr=[0,.68333,0,0,.77778],Gr=[0,.68333,0,0,.68056],Kr=[0,.68333,0,0,.72222],qr=[.25,.75,0,0,.5],Jr=[.25,.75,0,0,.27778],Yr=[0,.69444,0,0,.5],Xr=[0,.69444,0,0,.55556],Zr=[0,.43056,0,0,.44445],Qr=[0,.43056,0,0,.5],$r=[.19444,.43056,0,0,.55556],ei=[0,.43056,0,0,.55556],ti=[.08333,.58333,0,0,.77778],ni=[0,.43056,0,0,.27778],ri=[0,.66786,0,0,.27778],ii=[0,.69444,0,0,.75],ai=[0,.66786,0,0,.5],oi=[0,.68333,0,0,.625],si=[.19444,.69444,0,0,.44445],ci=[0,.69444,0,0,.72222],li=[.19444,.69444,0,0,.5],ui=[.19444,.69444,0,0,1],di=[.011,.511,0,0,1.126],fi=[.19444,.69444,0,0,.61111],pi=[.05556,.75,0,0,.5],mi=[0,.68333,0,0,.83334],hi=[.0391,.5391,0,0,.66667],gi=[-.05555,.44445,0,0,.5],_i=[0,.43056,0,0,.77778],vi=[0,.55556,0,0,.66667],yi=[-.03625,.46375,0,0,.77778],bi=[-.01688,.48312,0,0,.77778],xi=[.0391,.5391,0,0,1],Si=[0,.69444,0,0,.61111],Ci=[-.03472,.46528,0,0,.5],wi=[.25,.75,0,0,.44445],Ti=[-.14236,.35764,0,0,1],Ei=[.244,.744,0,0,.412],Di=[.19444,.69444,0,0,.88889],Oi=[.12963,.69444,0,0,.77778],ki=[.19444,.69444,0,0,.38889],Ai=[.011,.511,0,0,1.638],ji=[.19444,.69444,0,0,0],Mi=[0,.44444,0,0,.575],Ni=[.19444,.44444,0,0,.575],Pi=[0,.68611,0,0,.75555],Fi=[0,.69444,0,0,.66759],Ii=[0,.68611,0,0,.80555],Li=[0,.68611,.08229,0,.98229],Ri=[0,.68611,0,0,.76666],zi=[0,.44444,0,0,.58472],Bi=[.19444,.44444,0,0,.6118],Vi=[.19444,.43056,0,0,.5],Hi=[0,.68333,.02778,.08334,.76278],Ui=[0,.68333,.08125,.05556,.83125],Wi=[0,.43056,0,.05556,.48472],Gi=[.19444,.43056,0,.08334,.51702],Ki=[.25,.75,0,0,.42778],qi=[0,.69444,0,0,.55],Ji=[0,.69444,0,0,.73334],Yi=[0,.69444,0,0,.79445],Xi=[0,.69444,0,0,.51945],Zi=[0,.69444,0,0,.70278],Qi=[0,.69444,0,0,.76389],$i=[.25,.75,0,0,.34306],ea=[0,.69444,0,0,.56111],ta=[0,.69444,0,0,.25556],na=[.19444,.45833,0,0,.56111],ra=[0,.45833,0,0,.56111],ia=[0,.69444,0,0,.30556],aa=[0,.69444,0,0,.58056],oa=[0,.69444,0,0,.67223],sa=[0,.69444,0,0,.85556],ca=[0,.69444,0,0,.55834],la=[0,.65556,.11156,0,.5],ua=[0,.69444,.08094,0,.70834],da=[.17014,0,0,0,.44445],fa=[0,.69444,.0799,0,.5],pa=[0,.69444,0,0,.73752],ma=[0,.69444,.09205,0,.5],ha=[0,.69444,.09031,0,.77778],ga=[0,.69444,.07816,0,.27778],_a=[0,.69444,.00316,0,.5],va=[.19444,.69444,0,0,.83334],ya=[.05556,.75,0,0,.83334],ba=[0,.75,0,0,.5],xa=[.125,.08333,0,0,.27778],Sa=[0,.08333,0,0,.27778],Ca=[0,.65556,0,0,.5],wa=[0,.69444,0,0,.47222],Ta=[0,.69444,0,0,.66667],Ea=[0,.69444,0,0,.59722],Da=[0,.69444,0,0,.54167],Oa=[0,.69444,0,0,.70834],ka=[.25,.75,0,0,.28889],Aa=[0,.69444,0,0,.51667],ja=[0,.44444,0,0,.44445],Ma=[.19444,.44444,0,0,.51667],Na=[0,.44444,0,0,.38333],Pa=[0,.44444,0,0,.51667],Fa=[0,.69444,0,0,.83334],Ia=[.35001,.85,0,0,.45834],La=[.35001,.85,0,0,.57778],Ra=[.35001,.85,0,0,.41667],za=[.35001,.85,0,0,.58334],Ba=[0,.72222,0,0,.55556],Va=[1e-5,.6,0,0,.66667],Ha=[1e-5,.6,0,0,.77778],Ua=[.25001,.75,0,0,.94445],Wa=[.306,.805,.19445,0,.47222],Ga=[.30612,.805,.19445,0,.47222],Ka=[.25001,.75,0,0,.83334],qa=[.35001,.85,0,0,.47222],Ja=[.25001,.75,0,0,1.11111],Ya=[.65002,1.15,0,0,.59722],Xa=[.65002,1.15,0,0,.81111],Za=[.65002,1.15,0,0,.47222],Qa=[.65002,1.15,0,0,.66667],$a=[0,.75,0,0,1],eo=[.55001,1.05,0,0,1.27778],to=[.862,1.36,.44445,0,.55556],no=[.86225,1.36,.44445,0,.55556],ro=[.55001,1.05,0,0,1.11111],io=[.65002,1.15,0,0,.52778],ao=[.65002,1.15,0,0,.61111],oo=[.55001,1.05,0,0,1.51112],so=[.95003,1.45,0,0,.73611],co=[.95003,1.45,0,0,1.04445],lo=[.95003,1.45,0,0,.52778],uo=[.95003,1.45,0,0,.75],fo=[0,.75,0,0,1.44445],po=[.95003,1.45,0,0,.58334],mo=[1.25003,1.75,0,0,.79167],ho=[1.25003,1.75,0,0,1.27778],go=[1.25003,1.75,0,0,.58334],_o=[1.25003,1.75,0,0,.80556],vo=[0,.825,0,0,1.8889],yo=[1.25003,1.75,0,0,.63889],bo=[.64502,1.155,0,0,.875],xo=[1e-5,.6,0,0,.875],So=[-99e-5,.601,0,0,.66667],Co=[.64502,1.155,0,0,.66667],wo=[1e-5,.9,0,0,.88889],To=[.65002,1.15,0,0,.88889],Eo=[.90001,0,0,0,.88889],Do=[-.00499,.605,0,0,1.05556],Oo=[0,.12,0,0,.45],M=[0,.61111,0,0,.525],ko=[.08333,.69444,0,0,.525],Ao=[-.08056,.53055,0,0,.525],jo=[-.05556,.55556,0,0,.525],Mo=[0,.43056,0,0,.525],No=[.22222,.43056,0,0,.525],Po=[0,0,0,0,.525],Fo={"AMS-Regular":{32:j,65:ht,66:gt,67:ht,68:ht,69:gt,70:vt,71:_t,72:_t,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:_t,76:gt,77:[0,.68889,0,0,.94445],78:ht,79:yt,80:vt,81:yt,82:ht,83:bt,84:gt,85:ht,86:ht,87:[0,.68889,0,0,1],88:ht,89:ht,90:gt,107:bt,160:j,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:bt,295:Ct,710:xt,732:St,770:xt,771:St,989:Lt,1008:_n,8245:[0,.54986,0,0,.275],8463:Ct,8487:ht,8498:bt,8502:gt,8503:[0,.68889,0,0,.44445],8504:gt,8513:[0,.68889,0,0,.63889],8592:wt,8594:wt,8602:Tt,8603:Tt,8606:Et,8608:Et,8610:Dt,8611:Dt,8619:Ot,8620:Ot,8621:[-.13313,.37788,0,0,1.38889],8622:Tt,8624:kt,8625:kt,8630:At,8631:At,8634:jt,8635:jt,8638:Mt,8639:Mt,8642:Mt,8643:Mt,8644:Nt,8646:Nt,8647:Nt,8648:Pt,8649:Nt,8650:Pt,8651:Et,8652:Et,8653:Tt,8654:Tt,8655:Tt,8666:Ft,8667:Ft,8669:[-.13313,.37788,0,0,1],8672:It,8674:It,8705:[0,.825,0,0,.5],8708:bt,8709:Lt,8717:[0,.43056,0,0,.42917],8722:wt,8724:[.08198,.69224,0,0,.77778],8726:Lt,8733:Ht,8736:Rt,8737:Rt,8738:[.03517,.52239,0,0,.72222],8739:hn,8740:[.25142,.74111,0,0,.27778],8741:gn,8742:[.25142,.74111,0,0,.5],8756:zt,8757:zt,8764:Bt,8765:[-.13313,.37788,0,0,.77778],8769:Bt,8770:yi,8774:Kt,8776:bi,8778:Lt,8782:Vt,8783:Vt,8785:jt,8786:jt,8787:jt,8790:Ht,8791:qt,8796:[.08198,.91667,0,0,.77778],8806:Ut,8807:Ut,8808:Wt,8809:Wt,8812:[.25583,.75583,0,0,.5],8814:Gt,8815:Gt,8816:Kt,8817:Kt,8818:qt,8819:qt,8822:Jt,8823:Jt,8828:Yt,8829:Yt,8830:qt,8831:qt,8832:Gt,8833:Gt,8840:Kt,8841:Kt,8842:Xt,8843:Xt,8847:Zt,8848:Zt,8858:jt,8859:jt,8861:jt,8862:Qt,8863:Qt,8864:Qt,8865:Qt,8872:[0,.69224,0,0,.61111],8873:Rt,8874:[0,.69224,0,0,.88889],8876:vt,8877:vt,8878:ht,8879:ht,8882:Zt,8883:Zt,8884:Yt,8885:Yt,8888:[0,.54986,0,0,1.11111],8890:$r,8891:$t,8892:$t,8901:[0,.54986,0,0,.27778],8903:Lt,8905:Lt,8906:Lt,8907:Ht,8908:Ht,8909:[-.03598,.46402,0,0,.77778],8910:en,8911:en,8912:Zt,8913:Zt,8914:tn,8915:tn,8916:zt,8918:nn,8919:nn,8920:rn,8921:rn,8922:an,8923:an,8926:Yt,8927:Yt,8928:Kt,8929:Kt,8934:on,8935:on,8936:on,8937:on,8938:Gt,8939:Gt,8940:Kt,8941:Kt,8994:sn,8995:sn,9416:[.15559,.69224,0,0,.90222],9484:kt,9488:kt,9492:cn,9496:cn,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:Qt,9633:Qt,9650:ln,9651:ln,9654:Zt,9660:ln,9661:ln,9664:Zt,9674:dn,9733:[.19444,.69224,0,0,.94445],10003:un,10016:un,10731:dn,10846:[.19444,.75583,0,0,.61111],10877:Yt,10878:Yt,10885:Ut,10886:Ut,10887:Xt,10888:Xt,10889:fn,10890:fn,10891:pn,10892:pn,10901:Yt,10902:Yt,10933:Wt,10934:Wt,10935:fn,10936:fn,10937:fn,10938:fn,10949:Ut,10950:Ut,10955:mn,10956:mn,57350:hn,57351:gn,57352:Lt,57353:_n,57356:Wt,57357:Wt,57358:vn,57359:Kt,57360:Kt,57361:vn,57366:Wt,57367:Wt,57368:Wt,57369:Wt,57370:Xt,57371:Xt},"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:En,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:yn,41:yn,42:[0,.62119,0,0,.27764],43:bn,44:xn,45:bn,46:xn,47:[.24982,.74947,0,0,.50181],48:Sn,49:Sn,50:Sn,51:Cn,52:Cn,53:Cn,54:wn,55:Cn,56:wn,57:Cn,58:[0,.47534,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:Tn,93:Tn,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:En,8217:En,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:Kn,35:[.19444,.69444,0,0,.95833],36:$n,37:[.05556,.75,0,0,.95833],38:An,39:In,40:Dn,41:Dn,42:[0,.75,0,0,.575],43:Bn,44:[.19444,.15556,0,0,.31944],45:Na,46:[0,.15556,0,0,.31944],47:Nn,48:On,49:On,50:On,51:On,52:On,53:On,54:On,55:On,56:On,57:On,58:Vn,59:[.19444,.44444,0,0,.31944],60:kn,61:ar,62:kn,63:[0,.69444,0,0,.54305],64:An,65:Mn,66:[0,.68611,0,0,.81805],67:Wn,68:[0,.68611,0,0,.88194],69:Pi,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:jn,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:Un,77:[0,.68611,0,0,1.09166],78:jn,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:Mn,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:Pn,92:Nn,93:Pn,94:zn,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:Fn,99:Rn,100:Fn,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:Fn,105:In,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:In,109:[0,.44444,0,0,.95833],110:Ln,111:Mi,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:Ln,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:Rn,123:Nn,124:Pn,125:Nn,126:[.35,.34444,0,0,.575],160:j,163:[0,.69444,0,0,.86853],168:zn,172:[0,.44444,0,0,.76666],176:Hn,177:Bn,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:Bn,216:[.04861,.73472,0,0,.89444],223:Ea,230:[0,.44444,0,0,.83055],247:Bn,248:[.09722,.54167,0,0,.575],305:Vn,338:[0,.68611,0,0,1.16944],339:rr,567:[.19444,.44444,0,0,.35139],710:zn,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:zn,715:zn,728:zn,729:In,730:Hn,732:zn,733:zn,915:Un,916:er,920:Gn,923:Ii,926:Ri,928:jn,931:Wn,933:Gn,934:Wn,936:Gn,937:Wn,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:In,8217:In,8220:Kn,8221:Kn,8224:qn,8225:qn,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:Fi,8465:Jn,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:Jn,8501:lr,8592:Yn,8593:Xn,8594:Yn,8595:Xn,8596:Yn,8597:Nn,8598:Zn,8599:Zn,8600:Zn,8601:Zn,8636:Yn,8637:Yn,8640:Yn,8641:Yn,8656:Yn,8657:Qn,8658:Yn,8659:Qn,8660:Yn,8661:[.25,.75,0,0,.70277],8704:Fn,8706:[0,.69444,.06389,0,.62847],8707:Fn,8709:$n,8711:er,8712:tr,8715:tr,8722:Bn,8723:Bn,8725:Nn,8726:Nn,8727:ur,8728:nr,8729:nr,8730:[.18,.82,0,0,.95833],8733:rr,8734:[0,.44444,0,0,1.14999],8736:Rt,8739:Pn,8741:Nn,8743:ir,8744:ir,8745:ir,8746:ir,8747:[.19444,.69444,.12778,0,.56875],8764:ar,8768:[.19444,.69444,0,0,.31944],8771:or,8776:[.02444,.52444,0,0,.89444],8781:or,8801:or,8804:sr,8805:sr,8810:cr,8811:cr,8826:kn,8827:kn,8834:kn,8835:kn,8838:sr,8839:sr,8846:ir,8849:sr,8850:sr,8851:ir,8852:ir,8853:Bn,8854:Bn,8855:Bn,8856:Bn,8857:Bn,8866:lr,8867:lr,8868:An,8869:An,8900:nr,8901:[-.02639,.47361,0,0,.31944],8902:ur,8968:dr,8969:dr,8970:dr,8971:dr,8994:fr,8995:fr,9651:pr,9657:ur,9661:pr,9667:ur,9711:Zn,9824:mr,9825:mr,9826:mr,9827:mr,9837:[0,.75,0,0,.44722],9838:hr,9839:hr,10216:Dn,10217:Dn,10815:jn,10927:sr,10928:sr,57376:ji},"Main-BoldItalic":{32:j,33:[0,.69444,.11417,0,.38611],34:Er,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:Sr,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:gr,49:gr,50:gr,51:gr,52:_r,53:gr,54:gr,55:_r,56:gr,57:gr,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:wr,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:vr,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:vr,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:xr,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:yr,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:yr,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:Cr,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:br,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:br,567:[.19444,.44444,.04611,0,.385],710:xr,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:Sr,730:Cr,732:wr,733:wr,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:vr,931:[0,.68611,.11431,0,.82666],933:Tr,934:[0,.68611,.05632,0,.82666],936:Tr,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:Sr,8217:Sr,8220:[0,.69444,.16772,0,.62055],8221:Er},"Main-Italic":{32:j,33:Dr,34:Rr,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:Dr,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:Or,49:Or,50:Or,51:Or,52:kr,53:Or,54:Or,55:kr,56:Or,57:Or,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:Fr,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:Ar,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:Ar,79:Ir,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:Ar,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:Nr,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:jr,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:jr,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:Pr,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:Mr,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:Mr,710:Nr,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:Pr,732:[0,.66786,.11585,0,.51111],733:Fr,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:Ir,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:Ar,931:[0,.68333,.12028,0,.71555],933:Lr,934:[0,.68333,.05986,0,.71555],936:Lr,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:Dr,8217:Dr,8220:[0,.69444,.1685,0,.51444],8221:Rr,8463:Ct},"Main-Regular":{32:j,33:zr,34:Yr,35:va,36:pi,37:ya,38:Hr,39:zr,40:Br,41:Br,42:ba,43:ti,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:qr,48:Vr,49:Vr,50:Vr,51:Vr,52:Vr,53:Vr,54:Vr,55:Vr,56:Vr,57:Vr,58:ni,59:[.19444,.43056,0,0,.27778],60:nn,61:Bt,62:nn,63:wa,64:Hr,65:Ur,66:[0,.68333,0,0,.70834],67:Kr,68:[0,.68333,0,0,.76389],69:Gr,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:Ur,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:Wr,76:oi,77:[0,.68333,0,0,.91667],78:Ur,79:Wr,80:Gr,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:Kr,85:Ur,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:Ur,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:Jr,92:qr,93:Jr,94:Yr,95:[.31,.12056,.02778,0,.5],97:Qr,98:Xr,99:Zr,100:Xr,101:Zr,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:Xr,105:ri,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:zr,109:[0,.43056,0,0,.83334],110:ei,111:Qr,112:$r,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:ei,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:Zr,123:qr,124:Jr,125:qr,126:[.35,.31786,0,0,.5],160:j,163:[0,.69444,0,0,.76909],167:si,168:ai,172:[0,.43056,0,0,.66667],176:ii,177:ti,182:fi,184:da,198:[0,.68333,0,0,.90278],215:ti,216:[.04861,.73194,0,0,.77778],223:Yr,230:[0,.43056,0,0,.72222],247:ti,248:[.09722,.52778,0,0,.5],305:ni,338:[0,.68333,0,0,1.01389],339:_i,567:[.19444,.43056,0,0,.30556],710:Yr,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:Yr,715:Yr,728:Yr,729:ri,730:ii,732:ai,733:Yr,915:oi,916:mi,920:Wr,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:Ur,931:Kr,933:Wr,934:Kr,936:Wr,937:Kr,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:zr,8217:zr,8220:Yr,8221:Yr,8224:si,8225:si,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:Ct,8465:ci,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:ci,8501:Si,8592:Tt,8593:li,8594:Tt,8595:li,8596:Tt,8597:qr,8598:ui,8599:ui,8600:ui,8601:ui,8614:[.011,.511,0,0,1],8617:di,8618:di,8636:Tt,8637:Tt,8640:Tt,8641:Tt,8652:[.011,.671,0,0,1],8656:Tt,8657:fi,8658:Tt,8659:fi,8660:Tt,8661:[.25,.75,0,0,.61111],8704:Xr,8706:[0,.69444,.05556,.08334,.5309],8707:Xr,8709:pi,8711:mi,8712:hi,8715:hi,8722:ti,8723:ti,8725:qr,8726:qr,8727:Ci,8728:gi,8729:gi,8730:[.2,.8,0,0,.83334],8733:_i,8734:At,8736:Rt,8739:Jr,8741:qr,8743:vi,8744:vi,8745:vi,8746:vi,8747:[.19444,.69444,.11111,0,.41667],8764:Bt,8768:[.19444,.69444,0,0,.27778],8771:yi,8773:[-.022,.589,0,0,1],8776:bi,8781:yi,8784:[-.133,.67,0,0,.778],8801:yi,8804:Xt,8805:Xt,8810:xi,8811:xi,8826:nn,8827:nn,8834:nn,8835:nn,8838:Xt,8839:Xt,8846:vi,8849:Xt,8850:Xt,8851:vi,8852:vi,8853:ti,8854:ti,8855:ti,8856:ti,8857:ti,8866:Si,8867:Si,8868:Hr,8869:Hr,8872:[.249,.75,0,0,.867],8900:gi,8901:[-.05555,.44445,0,0,.27778],8902:Ci,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:wi,8969:wi,8970:wi,8971:wi,8994:Ti,8995:Ti,9136:Ei,9137:Ei,9651:Di,9657:Ci,9661:Di,9667:Ci,9711:ui,9824:Oi,9825:Oi,9826:Oi,9827:Oi,9837:[0,.75,0,0,.38889],9838:ki,9839:ki,10216:Br,10217:Br,10222:Ei,10223:Ei,10229:[.011,.511,0,0,1.609],10230:Ai,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:Ai,10815:Ur,10927:Xt,10928:Xt,57376:ji},"Math-BoldItalic":{32:j,48:Mi,49:Mi,50:Mi,51:Ni,52:Ni,53:Ni,54:On,55:Ni,56:On,57:Ni,65:Mn,66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:Li,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:Pi,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:Fi,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:zi,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:er,920:[0,.68611,.03194,0,.86722],923:Ii,926:[0,.68611,.07458,0,.84125],928:Li,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:Ri,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:zi,960:[0,.44444,.03704,0,.68241],961:Bi,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:Bi,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:j,48:Qr,49:Qr,50:Qr,51:Vi,52:Vi,53:Vi,54:Vr,55:Vi,56:Vr,57:Vi,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:Ui,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:Hi,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:Wi,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:Hi,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:Ui,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:Wi,960:[0,.43056,.03588,0,.57003],961:Gi,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:Gi,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:j,33:[0,.69444,0,0,.36667],34:ca,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:ia,40:Ki,41:Ki,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:qi,49:qi,50:qi,51:qi,52:qi,53:qi,54:qi,55:qi,56:qi,57:qi,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:Xi,64:Ji,65:Ji,66:Ji,67:Zi,68:Yi,69:[0,.69444,0,0,.64167],70:Si,71:Ji,72:Yi,73:[0,.69444,0,0,.33056],74:Xi,75:Qi,76:aa,77:[0,.69444,0,0,.97778],78:Yi,79:Yi,80:Zi,81:[.10556,.69444,0,0,.79445],82:Zi,83:Si,84:Ji,85:Qi,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:Ji,89:[0,.69444,.0275,0,.73334],90:oa,91:$i,93:$i,94:qi,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:ea,99:[0,.45833,0,0,.48889],100:ea,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:ea,105:ta,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:ta,109:[0,.45833,0,0,.86667],110:ra,111:[0,.45833,0,0,.55],112:na,113:na,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:ra,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:qi,176:Ji,180:qi,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:qi,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:qi,729:ia,730:Ji,732:qi,733:qi,915:aa,916:[0,.69444,0,0,.91667],920:sa,923:oa,926:Ji,928:Yi,931:Yi,933:sa,934:Yi,936:sa,937:Yi,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:ia,8217:ia,8220:ca,8221:ca},"SansSerif-Italic":{32:j,33:[0,.69444,.05733,0,.31945],34:_a,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:ga,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:xa,45:[0,.44444,.01946,0,.33333],46:Sa,47:[.25,.75,.13164,0,.5],48:la,49:la,50:la,51:la,52:la,53:la,54:la,55:la,56:la,57:la,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:Ta,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:ua,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:Da,77:[0,.69444,.08094,0,.875],78:ua,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:fa,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:pa,184:da,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:fa,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:ma,715:Yr,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:pa,732:[0,.67659,.08826,0,.5],733:ma,915:[0,.69444,.13372,0,.54167],916:Fa,920:[0,.69444,.07555,0,.77778],923:Si,926:[0,.69444,.12816,0,.66667],928:ua,931:[0,.69444,.11983,0,.72222],933:ha,934:[0,.69444,.04603,0,.72222],936:ha,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:ga,8217:ga,8220:[0,.69444,.14205,0,.5],8221:_a},"SansSerif-Regular":{32:j,33:[0,.69444,0,0,.31945],34:Yr,35:va,36:pi,37:ya,38:[0,.69444,0,0,.75834],39:zr,40:Br,41:Br,42:ba,43:ti,44:xa,45:[0,.44444,0,0,.33333],46:Sa,47:qr,48:Ca,49:Ca,50:Ca,51:Ca,52:Ca,53:Ca,54:Ca,55:Ca,56:Ca,57:Ca,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:wa,64:Ta,65:Ta,66:Ta,67:Fn,68:[0,.69444,0,0,.72223],69:Ea,70:[0,.69444,0,0,.56945],71:Ta,72:Oa,73:zr,74:wa,75:[0,.69444,0,0,.69445],76:Da,77:[0,.69444,0,0,.875],78:Oa,79:[0,.69444,0,0,.73611],80:Fn,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:Xr,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:Ta,89:[0,.69444,.025,0,.66667],90:Si,91:ka,93:ka,94:Yr,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:Aa,99:ja,100:Aa,101:ja,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:Aa,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:Pa,111:[0,.44444,0,0,.5],112:Ma,113:Ma,114:[0,.44444,.01389,0,.34167],115:Na,116:[0,.57143,0,0,.36111],117:Pa,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:[0,.67937,0,0,.5],176:Ta,184:da,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:Yr,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:Yr,715:Yr,728:Yr,729:[0,.67937,0,0,.27778],730:Ta,732:[0,.67659,0,0,.5],733:Yr,915:Da,916:Fa,920:Hr,923:Si,926:Ta,928:Oa,931:ci,933:Hr,934:ci,936:Hr,937:ci,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:zr,8217:zr,8220:Yr,8221:Yr},"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:Ia,41:Ia,47:La,91:Ra,92:La,93:Ra,123:za,125:za,160:j,710:Ba,732:Ba,770:Ba,771:Ba,8214:[-99e-5,.601,0,0,.77778],8593:Va,8595:Va,8657:Ha,8659:Ha,8719:Ua,8720:Ua,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:Ga,8748:Wa,8749:Wa,8750:Ga,8896:Ka,8897:Ka,8898:Ka,8899:Ka,8968:qa,8969:qa,8970:qa,8971:qa,9168:So,10216:qa,10217:qa,10752:Ja,10753:Ja,10754:Ja,10756:Ka,10758:Ka},"Size2-Regular":{32:j,40:Ya,41:Ya,47:Xa,91:Za,92:Xa,93:Za,123:Qa,125:Qa,160:j,710:$a,732:$a,770:$a,771:$a,8719:eo,8720:eo,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:no,8748:to,8749:to,8750:no,8896:ro,8897:ro,8898:ro,8899:ro,8968:io,8969:io,8970:io,8971:io,10216:ao,10217:ao,10752:oo,10753:oo,10754:oo,10756:ro,10758:ro},"Size3-Regular":{32:j,40:so,41:so,47:co,91:lo,92:co,93:lo,123:uo,125:uo,160:j,710:fo,732:fo,770:fo,771:fo,8730:[.95003,1.45,0,0,1],8968:po,8969:po,8970:po,8971:po,10216:uo,10217:uo},"Size4-Regular":{32:j,40:mo,41:mo,47:ho,91:go,92:ho,93:go,123:_o,125:_o,160:j,710:vo,732:vo,770:vo,771:vo,8730:[1.25003,1.75,0,0,1],8968:yo,8969:yo,8970:yo,8971:yo,9115:bo,9116:xo,9117:bo,9118:bo,9119:xo,9120:bo,9121:Co,9122:So,9123:Co,9124:Co,9125:So,9126:Co,9127:wo,9128:To,9129:Eo,9130:[0,.3,0,0,.88889],9131:wo,9132:To,9133:Eo,9143:[.88502,.915,0,0,1.05556],10216:_o,10217:_o,57344:Do,57345:Do,57680:Oo,57681:Oo,57682:Oo,57683:Oo},"Typewriter-Regular":{32:Po,33:M,34:M,35:M,36:ko,37:ko,38:M,39:M,40:ko,41:ko,42:[0,.52083,0,0,.525],43:Ao,44:[.13889,.125,0,0,.525],45:Ao,46:[0,.125,0,0,.525],47:ko,48:M,49:M,50:M,51:M,52:M,53:M,54:M,55:M,56:M,57:M,58:Mo,59:[.13889,.43056,0,0,.525],60:jo,61:[-.19549,.41562,0,0,.525],62:jo,63:M,64:M,65:M,66:M,67:M,68:M,69:M,70:M,71:M,72:M,73:M,74:M,75:M,76:M,77:M,78:M,79:M,80:M,81:[.13889,.61111,0,0,.525],82:M,83:M,84:M,85:M,86:M,87:M,88:M,89:M,90:M,91:ko,92:ko,93:ko,94:M,95:[.09514,0,0,0,.525],96:M,97:Mo,98:M,99:Mo,100:M,101:Mo,102:M,103:No,104:M,105:M,106:[.22222,.61111,0,0,.525],107:M,108:M,109:Mo,110:Mo,111:Mo,112:No,113:No,114:Mo,115:Mo,116:[0,.55358,0,0,.525],117:Mo,118:Mo,119:Mo,120:Mo,121:No,122:Mo,123:ko,124:ko,125:ko,126:M,127:M,160:Po,176:M,184:[.19445,0,0,0,.525],305:Mo,567:No,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:M,715:M,728:M,730:M,770:M,771:M,776:M,915:M,916:M,920:M,923:M,926:M,928:M,931:M,933:M,934:M,936:M,937:M,8216:M,8217:M,8242:M,9251:[.11111,.21944,0,0,.525]}},Io=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,Lo=10,Ro=.25,zo=1.2,Bo=.431,Vo={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[Bo,Bo,Bo],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:[Ro,Ro,Ro],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]},Ho=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Uo=5,Wo={"\xA0":" ","\u200b":" ",\u00c5:"A",\u00c7:"C",\u00d0:"D",\u00de:"o",\u00e5:"a",\u00e7:"c",\u00f0:"d",\u00fe:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041a:"K",\u041b:"N",\u041c:"M",\u041d:"H",\u041e:"O",\u041f:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042a:"B",\u042b:"X",\u042c:"B",\u042d:"3",\u042e:"X",\u042f:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043a:"n",\u043b:"n",\u043c:"m",\u043d:"n",\u043e:"o",\u043f:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044a:"a",\u044b:"m",\u044c:"a",\u044d:"e",\u044e:"m",\u044f:"r"};function Go(e,t){e===void 0&&(e=77);var n=Fo[t][e];if(n)return{defaultMetrics:!1,depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]};if(e===11034)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0,width:.8};var r=String.fromCodePoint(e);if(r in Wo)e=Wo[r].codePointAt(0);else if(Io.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 Ko={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]},qo={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]},Jo={doubleleftarrow:"M262 157\nl10-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\n 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\n 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\nc2 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\n 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\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-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\n 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\n-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\n-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\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-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\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 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\n-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\nc-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\n 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\n 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\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 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\n 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\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-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\n c -179 0 -524 -115 -524 -115\n c -5 -1 -9 -5 -9 -10\n c 0 -1 1 -2 1 -3\n l 4 -22\n c 1 -5 5 -9 11 -9\n h 2\n s 338 93 512 92\n c 174 0 513 -92 513 -92\n h 2\n c 5 0 9 4 11 9\n l 5 22\n c 1 6 -2 12 -8 13\n c 0 0 -342 115 -520 115\n z\n ",leftgroup:"M400000 80\nH435C64 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\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-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\n-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\n-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\n 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\n-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\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 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\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.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\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 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\n-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\n 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\n 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\n-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\n-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\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-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\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.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\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-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\n 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\n 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\n-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\n-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\n 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\n-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\n 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\nm0 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\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 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\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",widetilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-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\n 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\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",widetilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-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\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 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\n 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\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",widetilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -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\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-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\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-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\n-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\n-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\n-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,\n-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,\n-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,\n-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,\n-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\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-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\ns-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\n121.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\ns2.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\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-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\n13.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\n-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\n-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\n-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\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,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\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-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\nc-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\nM0 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\nc1.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,\n1c0,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,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 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\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-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\nc-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\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};function Yo(e){if(qo[e]){var _qo$e=_slicedToArray(qo[e],3),_t12=_qo$e[0],_n0=_qo$e[1],_r5=_qo$e[2],_i11="<span class=\"ML__stretchy\" style=\"height:".concat(_r5,"em\"><svg width=\"100%\" height=\"").concat(_r5,"em\" viewBox=\"0 0 ").concat(_t12," ").concat(_n0,"\" preserveAspectRatio=\"none\" ><path fill=\"currentcolor\" d=\"").concat(Jo[e],"\"></path></svg></span>");return"<span style=\"display:inline-block;height:".concat(Math.floor(100*_r5/2)/100,"em;min-width:0\">").concat(_i11,"</span>");}var _Ko$e=_slicedToArray(Ko[e],4),t=_Ko$e[0],n=_Ko$e[1],r=_Ko$e[2],i=_Ko$e[3],a,o,s=r/1e3;return t.length===3?(a=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],o=["xMinYMin","xMidYMin","xMaxYMin"]):t.length===2?(a=["slice-1-of-2","slice-2-of-2"],o=["xMinYMin","xMaxYMin"]):(a=["slice-1-of-1"],o=[i]),"<span style=\"display:inline-block;height:".concat(s,"em;min-width:").concat(n,"em;\">").concat(t.map(function(e,t){return"<span class=\"".concat(a[t],"\" style=height:").concat(s,"em><svg width=400em height=").concat(s,"em viewBox=\"0 0 400000 ").concat(r,"\" preserveAspectRatio=\"").concat(o[t]," slice\"><path fill=\"currentcolor\" d=\"").concat(Jo[e],"\"></path></svg></span>");}).join(""),"</span>");}function Xo(e){return Ko[e]?Ko[e][2]/1e3:qo[e][2];}function Zo(e){var t=[];for(var _n1=0;_n1<e.length;_n1++){var _r6=e.charCodeAt(_n1);if(_r6===13&&e.charCodeAt(_n1+1)===10&&(_r6=10,_n1++),(_r6===13||_r6===12)&&(_r6=10),_r6===0&&(_r6=65533),_r6>=55296&&_r6<=56319){var _t13=e.charCodeAt(_n1+1);if(_t13>=56320&&_t13<=57343){var _e13=_r6-55296,_i12=_t13-56320;_r6=Math.pow(2,16)+_e13*Math.pow(2,10)+_i12,_n1++;}}t.push(_r6);}return t;}var Qo=8205,$o=[[Qo,1],[65038,2],[127995,5],[129456,4],[917536,96]],es,ts=[127462,127487];function ns(e){var t;if(es===void 0){es={};for(var _i13=0,_$o=$o;_i13<_$o.length;_i13++){var _e14=_$o[_i13];for(var _t14=_e14[0];_t14<=_e14[0]+_e14[1]-1;_t14++)es[_t14]=!0;}}return(t=es[e])==null?!1:t;}function rs(e){return e>=ts[0]&&e<=ts[1];}function is(e){if(/^[\u0020-\u00FF]*$/.test(e))return e;var t=[],n=Zo(e),r=0;for(;r<n.length;){var _e15=n[r++],_i14=n[r];if(_i14===Qo){var _e16=r-1;for(r+=2;n[r]===Qo;)r+=2;t.push(String.fromCodePoint.apply(String,_toConsumableArray(n.slice(_e16,r-_e16+1))));}else if(ns(_i14)){var _e17=r-1;for(;ns(n[r]);)r+=n[r]===Qo?2:1;t.push(String.fromCodePoint.apply(String,_toConsumableArray(n.slice(_e17,2*r-_e17-1))));}else rs(_e15)?(r+=1,t.push(String.fromCodePoint.apply(String,_toConsumableArray(n.slice(r-2,2))))):t.push(String.fromCodePoint(_e15));}return t;}var as=function(){function as(e){_classCallCheck(this,as);this.obeyspaces=!1,this.pos=0,this.s=is(e);}return _createClass(as,[{key:"end",value:function end(){return this.pos>=this.s.length;}},{key:"get",value:function get(){return this.pos<this.s.length?this.s[this.pos++]:"";}},{key:"peek",value:function peek(){return this.s[this.pos];}},{key:"match",value:function match(e){var 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]):"";}},{key:"next",value:function 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>";var e=this.get();if(e==="\\"){if(!this.end()){var _e18=this.match(/^[a-zA-Z\*]+/);return _e18?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):_e18=this.get(),"\\"+_e18;}}else{if(e==="{")return"<{>";if(e==="}")return"<}>";if(e==="^"){if(this.peek()==="^"){this.get();var _e19=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(_e19)return String.fromCodePoint(Number.parseInt(_e19.slice(_e19.lastIndexOf("^")+1),16));}return e;}else if(e==="#"){if(!this.end()){var _e20=!1;if(/[\d?@]/.test(this.peek())&&(_e20=!0,this.pos+1<this.s.length)){var _t15=this.s[this.pos+1];_e20=/[^\dA-Za-z]/.test(_t15);}return _e20?"#"+this.get():"#";}}else if(e==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>";}return e;}}]);}();function os(e,t){var n,r,i,a;var o=[],s=e.next();if(s&&s!=="\\relax"){if(s==="\\noexpand")s=e.next(),s&&o.push(s);else if(s==="\\obeyspaces")e.obeyspaces=!0;else if(s==="\\bgroup")o.push("<{>");else if(s==="\\egroup")o.push("<}>");else if(s==="\\string"){if(s=e.next(),s)if(s.startsWith("\\")){var _iterator10=_createForOfIteratorHelper(s),_step10;try{for(_iterator10.s();!(_step10=_iterator10.n()).done;){var _e21=_step10.value;o.push(_e21==="\\"?"\\backslash":_e21);}}catch(err){_iterator10.e(err);}finally{_iterator10.f();}}else s==="<{>"?o.push("\\{"):s==="<space>"?o.push("~"):s==="<}>"&&o.push("\\}");}else if(s==="\\csname"){for(;e.peek()==="<space>";)e.next();var _i15="",_a5=!1,_c2=[];do{if(_c2.length===0)if(/^#[\d?@]$/.test(e.peek())){var _i16=e.get().slice(1);_c2=ss((r=(n=t==null?void 0:t(_i16))==null?t==null?void 0:t("?"):n)==null?"\\placeholder{}":r,t),s=_c2[0];}else s=e.next(),_c2=s?[s]:[];_a5=_c2.length===0,!_a5&&s==="\\endcsname"&&(_a5=!0,_c2.shift()),_a5||(_a5=s==="<$>"||s==="<$$>"||s==="<{>"||s==="<}>"||_typeof(s)=="string"&&s.length>1&&s.startsWith("\\")),_a5||(_i15+=_c2.shift());}while(!_a5);_i15&&o.push("\\"+_i15),o.push.apply(o,_toConsumableArray(_c2));}else if(s!=="\\endcsname")if(s.length>1&&s.startsWith("#")){var _e22=s.slice(1);o.push.apply(o,_toConsumableArray(ss((a=(i=t==null?void 0:t(_e22))==null?t==null?void 0:t("?"):i)==null?"\\placeholder{}":a,t)));}else o.push(s);}return o;}function ss(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;if(!e)return[];var n=[],r="";var _iterator11=_createForOfIteratorHelper(e.toString().split(/\r?\n/)),_step11;try{for(_iterator11.s();!(_step11=_iterator11.n()).done;){var _t16=_step11.value;r&&n.push(r),r=" ";var _e23=_t16.match(/((?:\\%)|[^%])*/);_e23!==null&&n.push(_e23[0]);}}catch(err){_iterator11.e(err);}finally{_iterator11.f();}var i=new as(n.join("")),a=[];do a.push.apply(a,_toConsumableArray(os(i,t)));while(!i.end());return a;}function N(e){var t="",n=[];var _iterator12=_createForOfIteratorHelper(e),_step12;try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){var _r7=_step12.value;_r7&&(t&&/^[a-zA-Z\*]/.test(_r7)&&n.push(t),n.push(_r7),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(_r7)&&n.push(" "),t=/\\[a-zA-Z]+\*?$/.test(_r7)?" ":"");}}catch(err){_iterator12.e(err);}finally{_iterator12.f();}return n.join("");}function P(e){for(var _len=arguments.length,t=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){t[_key-1]=arguments[_key];}return e.startsWith("\\"),t.length===0?e:N([e].concat(_toConsumableArray(t.map(function(e){return"{".concat(e,"}");}))));}function cs(e){return N(e.map(function(e){var t;return(t={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[e])==null?e:t;}));}var ls=function(){function e(t){_classCallCheck(this,e);e._registry[t]=this;}return _createClass(e,null,[{key:"createAtom",value:function createAtom(t,n,r){return e._registry[t].createAtom(n,ft(n,t),r);}},{key:"serialize",value:function serialize(t,n){var r;if(!t||t.length===0)return"";if((r=n.skipStyles)!=null&&r){var _r8=[];var _iterator13=_createForOfIteratorHelper(ds(t)),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var _i17=_step13.value;var _t17=e._registry[_i17[0].mode];_r8.push.apply(_r8,_toConsumableArray(_t17.serialize(_i17,n)));}}catch(err){_iterator13.e(err);}finally{_iterator13.f();}return N(_r8);}return N(_s(t,n));}},{key:"getFont",value:function getFont(t,n,r){return e._registry[t].getFont(n,r);}}]);}();ls._registry={};var us=ls;function ds(e){var t=[],n=[],r="NONE";var _iterator14=_createForOfIteratorHelper(e),_step14;try{for(_iterator14.s();!(_step14=_iterator14.n()).done;){var _i18=_step14.value;_i18.type!=="first"&&(_i18.mode===r?n.push(_i18):(n.length>0&&t.push(n),n=[_i18],r=_i18.mode));}}catch(err){_iterator14.e(err);}finally{_iterator14.f();}return n.length>0&&t.push(n),t;}function fs(e){if((e==null?void 0:e.mode)!=="math")return"";var t=e.style;return!t||!t.variantStyle?"":t.variantStyle==="bold"||t.variantStyle==="bolditalic"?"bold":"";}function ps(e){if(!e)return"";var t=e.style;if(!t)return"";var n=t.variant;return n===void 0&&(n="normal"),!["calligraphic","fraktur","double-struck","script","monospace","sans-serif"].includes(n)&&t.variantStyle&&(n+="-"+t.variantStyle),n;}function ms(e,t){var n=[],r=[],i;var _iterator15=_createForOfIteratorHelper(e),_step15;try{for(_iterator15.s();!(_step15=_iterator15.n()).done;){var _a6=_step15.value;if(_a6.type==="first")continue;var _e24=void 0;_e24=t==="variant"?ps(_a6):t==="bold"?fs(_a6):_a6.style[t],_e24===i?r.push(_a6):(r.length>0&&n.push(r),r=[_a6],i=_e24);}}catch(err){_iterator15.e(err);}finally{_iterator15.f();}return r.length>0&&n.push(r),n;}function hs(e,t){var n;var r=e[0].parent,i=r==null?void 0:r.style.color,a=[];var _iterator16=_createForOfIteratorHelper(ds(e)),_step16;try{for(_iterator16.s();!(_step16=_iterator16.n()).done;){var _o4=_step16.value;var _e25=t.defaultMode;var _iterator17=_createForOfIteratorHelper(ms(_o4,"color")),_step17;try{for(_iterator17.s();!(_step17=_iterator17.n()).done;){var _s3=_step17.value;var _o5=_s3[0].style,_u2=us._registry[_s3[0].mode].serialize(_s3,l(c({},t),{defaultMode:_e25==="text"?"text":"math"}));!t.skipStyles&&_o5.color&&_o5.color!=="none"&&(!r||i!==_o5.color)?a.push(P("\\textcolor",(n=_o5.verbatimColor)==null?_o5.color:n,N(_u2))):a.push(N(_u2));}}catch(err){_iterator17.e(err);}finally{_iterator17.f();}}}catch(err){_iterator16.e(err);}finally{_iterator16.f();}return a;}function gs(e,t){var n=e[0].parent,r=n==null?void 0:n.style.backgroundColor;return ms(e,"backgroundColor").map(function(e){var i;if(e.length>0||e[0].type!=="box"){var _a7=e[0].style;if(_a7.backgroundColor&&_a7.backgroundColor!=="none"&&(!n||r!==_a7.backgroundColor))return P("\\colorbox",(i=_a7.verbatimBackgroundColor)==null?_a7.backgroundColor:i,N(hs(e,l(c({},t),{defaultMode:"text"}))));}return N(hs(e,t));});}function _s(e,t){if(e.length===0)return[];var n=e[0].parent,r=n==null?void 0:n.style.fontSize,i=[];var _iterator18=_createForOfIteratorHelper(ms(e,"fontSize")),_step18;try{for(_iterator18.s();!(_step18=_iterator18.n()).done;){var _a8=_step18.value;var _e26=_a8[0].style.fontSize,_o6=gs(_a8,t);_o6&&(_e26&&_e26!=="auto"&&(!n||r!==_e26)?i.push.apply(i,[["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][_e26]].concat(_toConsumableArray(_o6))):i.push.apply(i,_toConsumableArray(_o6)));}}catch(err){_iterator18.e(err);}finally{_iterator18.f();}return i;}function vs(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 ys(e){if(e.length===0)return"ord";var t=vs(e[0].type),n=vs(e[e.length-1].type);return t&&t===n?t:"ord";}function bs(e,t){if(_typeof(e)=="string")return e;if(_typeof(e)=="number"){var _n10=Math.ceil(100*e)/100;return _n10===0?"0":_n10.toString()+(t==null?"":t);}return"";}var F=function(){function e(t,n){_classCallCheck(this,e);var r,i,a,o,s;if(_typeof(t)=="number"?this.value=String.fromCodePoint(t):_typeof(t)=="string"?this.value=t:xe(t)?this.children=t.filter(function(_e27){return _e27!==null;}):t&&t instanceof e&&(this.children=[t]),this.children){var _iterator19=_createForOfIteratorHelper(this.children),_step19;try{for(_iterator19.s();!(_step19=_iterator19.n()).done;){var _e28=_step19.value;_e28.parent=this;}}catch(err){_iterator19.e(err);}finally{_iterator19.f();}}this.type=(r=n==null?void 0:n.type)==null?"ignore":r,this.isSelected=(n==null?void 0:n.isSelected)===!0,n!=null&&n.caret&&(this.caret=n.caret),this.classes=(i=n==null?void 0:n.classes)==null?"":i,this.isTight=(a=n==null?void 0:n.isTight)==null?!1:a,n!=null&&n.attributes&&(this.attributes=n.attributes);var u=n==null?void 0:n.fontFamily;n!=null&&n.style&&this.value&&(u=(s=us.getFont((o=n.mode)==null?"math":o,this,l(c({variant:"normal"},n.style),{letterShapeStyle:n.letterShapeStyle})))==null?void 0:s),u||(u="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,(n==null?void 0:n.maxFontSize)!==void 0&&(this.maxFontSize=n.maxFontSize),Ts(this,u);}return _createClass(e,[{key:"atomID",set:function set(_e29){_e29===void 0||_e29.length===0||(this.id=_e29);}},{key:"selected",value:function selected(_e30){if(this.isSelected!==_e30&&(this.isSelected=_e30,this.children)){var _iterator20=_createForOfIteratorHelper(this.children),_step20;try{for(_iterator20.s();!(_step20=_iterator20.n()).done;){var _t18=_step20.value;_t18.selected(_e30);}}catch(err){_iterator20.e(err);}finally{_iterator20.f();}}}},{key:"setStyle",value:function setStyle(_e31,t,n){if(t===void 0)return;var r=bs(t,n);r.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[_e31]=r);}},{key:"setTop",value:function setTop(_e32){Number.isFinite(_e32)&&Math.abs(_e32)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=bs(_e32,"em"),this.height-=_e32,this.depth+=_e32);}},{key:"left",get:function get(){var _e33;return(_e33=this.cssProperties)!=null&&_e33["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0;},set:function set(_e34){Number.isFinite(_e34)&&(_e34===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=bs(_e34,"em")));}},{key:"right",set:function set(_e35){Number.isFinite(_e35)&&(_e35===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=bs(_e35,"em")));}},{key:"bottom",set:function set(_e36){Number.isFinite(_e36)&&(_e36===0?this.cssProperties&&delete this.cssProperties["margin-bottom"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-bottom"]=bs(_e36,"em")));}},{key:"width",get:function get(){return this._width*this.scale;},set:function set(_e37){this._width=_e37,this.hasExplicitWidth=!0;}},{key:"softWidth",set:function set(_e38){}},{key:"height",get:function get(){return this._height*this.scale;},set:function set(_e39){this._height=_e39;}},{key:"depth",get:function get(){return this._depth*this.scale;},set:function set(_e40){this._depth=_e40;}},{key:"wrap",value:function wrap(_e41){var t=_e41.parent;if(!t)return this;_e41.isPhantom&&this.setStyle("opacity",0);var n=_e41.color;n&&n!==t.color&&this.setStyle("color",n);var r=_e41.backgroundColor;this.isSelected&&(r=Ie(r)),r&&r!==t.backgroundColor&&(this.setStyle("background-color",r),this.setStyle("--bg-color",r),this.setStyle("display","inline-block"),this.setStyle("position","relative"),this.classes=this.classes?"".concat(this.classes," ML__bg"):"ML__bg");var i=_e41.scalingFactor;return this.scale=i,this.skew*=i,this.italic*=i,this;}},{key:"toMarkup",value:function toMarkup(){var _this2=this;var _e42,t,n;var r=this.value?Es(this.value):"";if(this.children){var _iterator21=_createForOfIteratorHelper(this.children),_step21;try{for(_iterator21.s();!(_step21=_iterator21.n()).done;){var _e43=_step21.value;r+=_e43.toMarkup();}}catch(err){_iterator21.e(err);}finally{_iterator21.f();}}var i="";if(this.svgBody)i=Yo(this.svgBody);else if(this.svgOverlay){i="<span style=\"",i+="display: inline-block;",i+="height:".concat(Math.floor(100*(this.height+this.depth))/100,"em;"),i+="vertical-align:".concat(Math.floor(100*this.depth)/100,"em;"),i+="\">",i+=r,i+="</span>",i+="<svg style=\"position:absolute;overflow:visible;",i+="height:".concat(Math.floor(100*(this.height+this.depth))/100,"em;");var _t19=(_e42=this.cssProperties)==null?void 0:_e42.padding;_t19?(i+="top:".concat(_t19,";"),i+="left:".concat(_t19,";"),i+="width:calc(100% - 2 * ".concat(_t19," );")):i+="top:0;left:0;width:100%;",i+="z-index:2;",i+="\"",this.svgStyle&&(i+=this.svgStyle),i+=" viewBox=\"0 0 ".concat(Math.floor(100*this.width)/100," ").concat(Math.floor(100*(this.height+this.depth))/100,"\""),i+=">".concat(this.svgOverlay,"</svg>");}var a=[],o=this.classes.split(" ");o.push((t={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])==null?"":t),this.caret==="latex"&&o.push("ML__latex-caret"),this.isSelected&&o.push("ML__selected");var s=o.length===1?o[0]:o.filter(function(_e44,t,n){return _e44.length>0&&n.indexOf(_e44)===t;}).join(" ");if(s.length>0&&a.push("class=".concat(Os("\"".concat(s,"\"")))),this.id&&a.push(" data-atom-id=".concat(Os(this.id))),this.cssId&&a.push(" id=".concat(Os("\"".concat(this.cssId.replace(/ /g,"-"),"\"")))),this.attributes&&a.push.apply(a,_toConsumableArray(Object.keys(this.attributes).map(function(_e45){return"".concat(Ds(_e45),"=").concat(Os(_this2.attributes[_e45]));}))),this.htmlData){var _e46=this.htmlData.split(",");var _iterator22=_createForOfIteratorHelper(_e46),_step22;try{for(_iterator22.s();!(_step22=_iterator22.n()).done;){var _t20=_step22.value;var _e47=_t20.match(/([^=]+)=(.+$)/);if(_e47){var _t21=Ds(_e47[1]);if(_t21)if(_t21==="href"){var _t22=new URL(_e47[2]);if(_t22.protocol!=="http:"&&_t22.protocol!=="https:")throw Error("Invalid URL: ".concat(_e47[2]));a.push("href=\"".concat(_e47[2].replace(/"/g,"""),"\""));}else a.push("data-".concat(_t21,"=").concat(Os(_e47[2])));}else{var _e48=Ds(_t20);_e48&&a.push("data-".concat(_e48," "));}}}catch(err){_iterator22.e(err);}finally{_iterator22.f();}}var c=(n=this.cssProperties)==null?{}:n;this.hasExplicitWidth&&c.width===void 0&&(c.width="".concat(Math.ceil(this._width*100)/100,"em"));var l=Object.keys(c).map(function(_e49){return"".concat(_e49,":").concat(c[_e49]);});if(this.scale!==void 0&&this.scale!==1&&(r.length>0||i.length>0)&&l.push("font-size: ".concat(Math.ceil(this.scale*1e4)/100,"%")),this.htmlStyle){var _iterator23=_createForOfIteratorHelper(this.htmlStyle.split(";")),_step23;try{for(_iterator23.s();!(_step23=_iterator23.n()).done;){var _e50=_step23.value;var _t23=_e50.match(/([^:]+):(.+$)/);if(_t23){var _e51=_t23[1].trim().replace(/ /g,"-");_e51&&l.push("".concat(_e51,":").concat(_t23[2]));}}}catch(err){_iterator23.e(err);}finally{_iterator23.f();}}l.length>0&&a.push("style=".concat(Os(l.join(";"))));var u="";return u=a.length>0||i.length>0?"<span ".concat(a.join(" "),">").concat(r).concat(i,"</span>"):r,this.caret==="text"?u+="<span class=\"ML__text-caret\"></span>":this.caret==="math"&&(u+="<span class=\"ML__caret\"></span>"),u;}},{key:"tryCoalesceWith",value:function tryCoalesceWith(_e52){if(this.svgBody||!this.value||_e52.svgBody||!_e52.value)return!1;var t=this.children&&this.children.length>0,n=_e52.children&&_e52.children.length>0;if(t||n)return!1;if(_e52.cssProperties||this.cssProperties){for(var _i19=0,_arr=["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"];_i19<_arr.length;_i19++){var _t24=_arr[_i19];if(_e52.cssProperties&&_t24 in _e52.cssProperties||this.cssProperties&&_t24 in this.cssProperties)return!1;}}var r=this.cssProperties?Object.keys(this.cssProperties).length:0;if(r!==(_e52.cssProperties?Object.keys(_e52.cssProperties).length:0))return!1;if(r>0){for(var _i20=0,_Object$keys5=Object.keys(this.cssProperties);_i20<_Object$keys5.length;_i20++){var _t25=_Object$keys5[_i20];if(this.cssProperties[_t25]!==_e52.cssProperties[_t25])return!1;}}var i=this.classes.trim().replace(/\s+/g," ").split(" "),a=_e52.classes.trim().replace(/\s+/g," ").split(" ");if(i.length!==a.length)return!1;i.sort(),a.sort();var _iterator24=_createForOfIteratorHelper(i.entries()),_step24;try{for(_iterator24.s();!(_step24=_iterator24.n()).done;){var _step24$value=_slicedToArray(_step24.value,2),_e53=_step24$value[0],_t26=_step24$value[1];if(_t26==="ML__vertical-separator"||_t26!==a[_e53])return!1;}}catch(err){_iterator24.e(err);}finally{_iterator24.f();}return this.value+=_e52.value,this.height=Math.max(this.height,_e52.height),this.depth=Math.max(this.depth,_e52.depth),this._width+=_e52._width,this.maxFontSize=Math.max(this.maxFontSize,_e52.maxFontSize),this.italic=_e52.italic,!0;}}]);}();function xs(e){if(!e||e.length===0)return[];e[0].children=xs(e[0].children);var t=[e[0]];for(var _n11=1;_n11<e.length;_n11++)t[t.length-1].tryCoalesceWith(e[_n11])||(e[_n11].children=xs(e[_n11].children),t.push(e[_n11]));return t;}function Ss(e){return e.children&&(e.children=xs(e.children)),e;}function Cs(e,t){if(!e)return new F(null,t);var n=new F(null,{classes:"ML__strut",type:"ignore"});n.setStyle("height",Math.max(0,e.height),"em");var r=[n];if(e.depth!==0){var _t27=new F(null,{classes:"ML__strut--bottom",type:"ignore"});_t27.setStyle("height",e.height+e.depth,"em"),_t27.setStyle("vertical-align",-e.depth,"em"),r.push(_t27);}return r.push(e),new F(r,l(c({},t),{type:"lift"}));}function ws(e){var t=Xo(e)/2,n=new F(null,{maxFontSize:0});return n.height=t+.166,n.depth=t-.166,n.svgBody=e,n;}function Ts(e,t){var n;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(var _n12=0;_n12<e.value.length;_n12++){var _r9=Go(e.value.codePointAt(_n12),t);e.height=Math.max(e.height,_r9.height),e.depth=Math.max(e.depth,_r9.depth),e._width+=_r9.width,e.skew=_r9.skew,e.italic=_r9.italic;}return;}if(e.children&&e.children.length>0){var _t28=-1/0,_r0=-1/0,_i21=0;var _iterator25=_createForOfIteratorHelper(e.children),_step25;try{for(_iterator25.s();!(_step25=_iterator25.n()).done;){var _a9=_step25.value;_a9.height>_t28&&(_t28=_a9.height),_a9.depth>_r0&&(_r0=_a9.depth),_i21=Math.max(_i21,(n=_a9.maxFontSize)==null?0:n);}}catch(err){_iterator25.e(err);}finally{_iterator25.f();}e.height=_t28,e.depth=_r0,e._width=e.children.reduce(function(e,t){return e+t.width;},0),e.maxFontSize=_i21;}}function Es(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");}function Ds(e){if(e=e.trim().replace(/ /g,"-"),e.length===0)throw Error("Invalid empty attribute name");if(/[\x20\x09\x0a\x0c\x0d"'>/=\x00-\x1f]/.test(e))throw Error("Invalid attribute name \"".concat(e,"\""));return e;}function Os(e){if(e=e.trim(),e.startsWith("\"")&&e.endsWith("\"")){if(/"/.test(e.slice(1,-1)))throw Error("Invalid attribute value: ".concat(e));return e;}if(e.startsWith("'")&&e.endsWith("'")){if(/'/.test(e.slice(1,-1)))throw Error("Invalid attribute value: ".concat(e));return e;}if(e.length===0)throw Error("Invalid empty attribute value");return"\"".concat(e.replace(/"/g,"""),"\"");}function ks(e){if("individualShift"in e){var _t29=e.individualShift,_n13=_t29[0];if(_n13==null)return[null,0];var _r1=[_n13],_i22=-_n13.shift-_n13.box.depth,_a0=_i22;for(var _e54=1;_e54<_t29.length;_e54++){var _i23=_t29[_e54],_o7=-_i23.shift-_a0-_i23.box.depth,_s4=_o7-(_n13.box.height+_n13.box.depth);_a0+=_o7,_r1.push(_s4),_r1.push(_i23),_n13=_i23;}return[_r1,_i22];}if("top"in e){var _t30=e.top;var _iterator26=_createForOfIteratorHelper(e.children),_step26;try{for(_iterator26.s();!(_step26=_iterator26.n()).done;){var _n14=_step26.value;_t30-=_typeof(_n14)=="number"?_n14:_n14.box.height+_n14.box.depth;}}catch(err){_iterator26.e(err);}finally{_iterator26.f();}return[e.children,_t30];}else{if("bottom"in e)return[e.children,-e.bottom];if("firstBaseline"in e){var _t31=e.firstBaseline[0];if(_typeof(_t31)=="number")throw Error("First child must be an element.");return[e.firstBaseline,-_t31.box.depth];}else if("shift"in e){var _t32=e.children[0];if(_typeof(_t32)=="number")throw Error("First child must be an element.");return[e.children,-_t32.box.depth-e.shift];}}return[null,0];}function As(e){var t;var _ks=ks(e),_ks2=_slicedToArray(_ks,2),n=_ks2[0],r=_ks2[1];if(!n)return[[],0,0];var i=new F(null,{classes:"ML__pstrut"}),a=0;var _iterator27=_createForOfIteratorHelper(n),_step27;try{for(_iterator27.s();!(_step27=_iterator27.n()).done;){var _e55=_step27.value;if(_typeof(_e55)!="number"){var _t33=_e55.box;a=Math.max(a,_t33.maxFontSize,_t33.height);}}}catch(err){_iterator27.e(err);}finally{_iterator27.f();}a+=2,i.height=a,i.setStyle("height",a,"em");var o=[],s=r,c=r,l=r,u=0;var _iterator28=_createForOfIteratorHelper(n),_step28;try{for(_iterator28.s();!(_step28=_iterator28.n()).done;){var _e56=_step28.value;if(_typeof(_e56)=="number")l+=_e56;else{var _n15=_e56.box,_r10=(t=_e56.classes)==null?[]:t,_s5=new F([i,_n15],{classes:_r10.join(" "),style:_e56.style});_n15.setStyle("height",_n15.height+_n15.depth,"em"),_n15.setStyle("display","inline-block"),_s5.setStyle("top",-a-l-_n15.depth,"em"),_e56.marginLeft&&_s5.setStyle("margin-left",_e56.marginLeft,"em"),_e56.marginRight&&_s5.setStyle("margin-right",_e56.marginRight,"em"),o.push(_s5),l+=_n15.height+_n15.depth,u=Math.max(u,_s5.width);}s=Math.min(s,l),c=Math.max(c,l);}}catch(err){_iterator28.e(err);}finally{_iterator28.f();}o.forEach(function(e){e.softWidth=u;});var d=new F(o,{classes:"ML__vlist"});if(d.softWidth=u,d.height=c,d.setStyle("height",c,"em"),s>=0)return[[new F(d,{classes:"ML__vlist-r"})],c,-s];var f=new F(new F(null),{classes:"ML__vlist"});f.height=-s,f.setStyle("height",-s,"em");var p=new F(8203,{classes:"ML__vlist-s",maxFontSize:0});return p.softWidth=0,p.height=0,p.depth=0,[[new F([d,p],{classes:"ML__vlist-r"}),new F(f,{classes:"ML__vlist-r"})],c,-s];}var js=function(_F){function js(e,t){var _this3;_classCallCheck(this,js);var n;var _As=As(e),_As2=_slicedToArray(_As,3),r=_As2[0],i=_As2[1],a=_As2[2];_this3=_callSuper(this,js,[r.length===1?r[0]:r,{type:t==null?void 0:t.type,classes:((n=t==null?void 0:t.classes)==null?"":n)+" ML__vlist-t"+(r.length===2?" ML__vlist-t2":"")}]),_this3.height=i,_this3.depth=a,_this3.softWidth=r.reduce(function(e,t){return Math.max(e,t.width);},0);return _this3;}_inherits(js,_F);return _createClass(js);}(F);function Ms(e,t){var n,r,i,a,o;var s=e.metrics,c=new F(t.base),l=(n=t.baseShift)==null?0:n,u=(r=t.slant)==null?0:r,d=0,f=0;t.above&&(d=(i=t.aboveShift)==null?Math.max(s.bigOpSpacing1,s.bigOpSpacing3-t.above.depth):i),t.below&&(f=(a=t.belowShift)==null?Math.max(s.bigOpSpacing2,s.bigOpSpacing4-t.below.height):a);var p=null;return p=t.below&&t.above?new js({bottom:s.bigOpSpacing5+t.below.height+t.below.depth+f+c.depth+l,children:[s.bigOpSpacing5,{box:t.below,marginLeft:-u,classes:["ML__center"]},f,{box:c,classes:["ML__center"]},d,{box:t.above,marginLeft:u,classes:["ML__center"]},s.bigOpSpacing5]}).wrap(e):t.below&&!t.above?new js({top:c.height-l,children:[s.bigOpSpacing5,{box:t.below,marginLeft:-u,classes:["ML__center"]},f,{box:c,classes:["ML__center"]}]}).wrap(e):!t.below&&t.above?new js({bottom:c.depth+l,children:[{box:c,classes:["ML__center"]},d,{box:t.above,marginLeft:u,classes:["ML__center"]},s.bigOpSpacing5]}).wrap(e):new js({bottom:c.depth+l,children:[{box:c},s.bigOpSpacing5]}).wrap(e),new F(p,{type:(o=t.type)==null?"op":o});}var Ns=7,Ps=6,Fs=5,Is=4,Ls=3,Rs=2,zs=1,Bs=0,Vs=function(){function Vs(e,t,n){_classCallCheck(this,Vs);this.id=e,this.sizeDelta=t,this.cramped=n;var r={"-4":2,"-3":1,0:0}[t];this.metrics=Object.keys(Vo).reduce(function(e,t){return l(c({},e),_defineProperty({},t,Vo[t][r]));},{});}return _createClass(Vs,[{key:"getFontSize",value:function getFontSize(e){return Math.max(1,e+this.sizeDelta);}},{key:"sup",get:function get(){return Us[[Bs,zs,Bs,zs,Rs,Ls,Rs,Ls][this.id]];}},{key:"sub",get:function get(){return Us[[Bs,Bs,Bs,Bs,Rs,Rs,Rs,Rs][this.id]];}},{key:"fracNum",get:function get(){return Us[[Bs,zs,Bs,zs,Rs,Ls,Is,Fs][this.id]];}},{key:"fracDen",get:function get(){return Us[[Bs,Bs,Bs,Bs,Rs,Rs,Is,Is][this.id]];}},{key:"cramp",get:function get(){return Us[[Bs,Bs,Rs,Rs,Is,Is,Ps,Ps][this.id]];}},{key:"isTight",get:function get(){return this.sizeDelta<0;}}]);}(),Hs={7:new Vs(Ns,0,!1),6:new Vs(Ps,0,!0),5:new Vs(Fs,0,!1),4:new Vs(Is,0,!0),3:new Vs(Ls,-3,!1),2:new Vs(Rs,-3,!0),1:new Vs(zs,-4,!1),0:new Vs(Bs,-4,!0)},Us=l(c({},Hs),{displaystyle:Hs[Ns],textstyle:Hs[Fs],scriptstyle:Hs[Ls],scriptscriptstyle:Hs[zs]});function Ws(e,t){var n;if(!e)return 0;var r={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:Lo,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(n=e.unit)==null?"pt":n];if(Number.isFinite(t)){var _n16=Math.pow(10,t);return Math.round(e.dimension/Lo*r*_n16)/_n16;}return e.dimension*r;}function Gs(e,t){if(e===null)return 0;var n=Ws(e)/Lo;if(Number.isFinite(t)){var _e57=Math.pow(10,t);return Math.round(n*_e57)/_e57;}return n;}function Ks(e){var t;return"".concat(e.dimension).concat((t=e.unit)==null?"pt":t);}function qs(e){var t=Ks(e.glue);return e.grow&&e.grow.dimension!==0&&(t+=" plus ".concat(Ks(e.grow))),e.shrink&&e.shrink.dimension!==0&&(t+=" minus ".concat(Ks(e.shrink))),t;}function Js(e){var t,n;if(e==null)return null;var r="";if("dimension"in e&&(r="".concat(e.dimension).concat((t=e.unit)==null?"pt":t)),"glue"in e&&(r=qs(e)),"number"in e)if(!("base"in e)||e.base==="decimal")r=Number(e.number).toString();else if(e.base==="alpha")r="`".concat(String.fromCodePoint(e.number));else{var _t34=Math.round(e.number)>>>0;e.base==="hexadecimal"?(r=Number(_t34).toString(16).toUpperCase(),r=_t34<=255?r.padStart(2,"0"):_t34<=65535?r.padStart(4,"0"):_t34<=16777215?r.padStart(6,"0"):r.padStart(8,"0"),r="\"".concat(r)):e.base==="octal"&&(r=Number(_t34).toString(8),r=_t34<=63?r.padStart(2,"0"):_t34<=30583?r.padStart(4,"0"):r.padStart(8,"0"),r="'".concat(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+="\\".concat(e.register)),"string"in e&&(r=e.string),(n=e.relax)!=null&&n&&(r+="\\relax"),r;}function Ys(e,t){return e==null?null:"number"in e?l(c({},e),{number:e.number*t}):"register"in e?"factor"in e&&e.factor?l(c({},e),{factor:e.factor*t}):l(c({},e),{factor:t}):"dimension"in e?l(c({},e),{dimension:e.dimension*t}):"glue"in e?e.shrink&&e.grow?{glue:Ys(e.glue,t),shrink:Ys(e.shrink,t),grow:Ys(e.grow,t)}:e.shrink?{glue:Ys(e.glue,t),shrink:Ys(e.shrink,t)}:e.grow?{glue:Ys(e.glue,t),grow:Ys(e.grow,t)}:{glue:Ys(e.glue,t)}:null;}var Xs={"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 Zs(){return c({},Xs);}function Qs(){return{registers:Zs(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:D.locale.startsWith("fr")?"french":"tex",minFontScale:0,maxMatrixCols:10,colorMap:Oe,backgroundColorMap:ke,getMacro:function getMacro(e){return pt(e,lt());}};}var I=function(){function e(t,n){_classCallCheck(this,e);var r,i,a,o,s,l,u,d,f,p,m,h,g,_,v;var y;t!=null&&t.parent?(this.parent=t.parent,y=t.parent,this.registers={}):(y=c(c({},Qs()),(r=t==null?void 0:t.from)==null?{}:r),this.registers=y.registers),y.atomIdsSettings&&(this.atomIdsSettings=c({},y.atomIdsSettings)),this.renderPlaceholder=y.renderPlaceholder,this.isPhantom=(o=(a=t==null?void 0:t.isPhantom)==null?(i=this.parent)==null?void 0:i.isPhantom:a)==null?!1:o,this.letterShapeStyle=y.letterShapeStyle,this.minFontScale=y.minFontScale,this.maxMatrixCols=y.maxMatrixCols,n!=null&&n.color&&n.color!=="none"?this.color=n.color:this.color=(l=(s=this.parent)==null?void 0:s.color)==null?"":l,n!=null&&n.backgroundColor&&n.backgroundColor!=="none"?this.backgroundColor=n.backgroundColor:this.backgroundColor=(d=(u=this.parent)==null?void 0:u.backgroundColor)==null?"":d,n!=null&&n.fontSize&&n.fontSize!=="auto"&&n.fontSize!==((f=this.parent)==null?void 0:f.size)?this.size=n.fontSize:this.size=(m=(p=this.parent)==null?void 0:p.size)==null?Uo:m;var b=(g=(h=this.parent)==null?void 0:h.mathstyle)==null?Us.displaystyle:g;if(_typeof(t==null?void 0:t.mathstyle)=="string"){if(y instanceof e)switch(t.mathstyle){case"cramp":b=b.cramp;break;case"superscript":b=b.sup;break;case"subscript":b=b.sub;break;case"numerator":b=b.fracNum;break;case"denominator":b=b.fracDen;break;}switch(t.mathstyle){case"textstyle":b=Us.textstyle;break;case"displaystyle":b=Us.displaystyle;break;case"scriptstyle":b=Us.scriptstyle;break;case"scriptscriptstyle":b=Us.scriptscriptstyle;break;case"":case"auto":break;}}this.mathstyle=b,this.smartFence=y.smartFence,this.placeholderSymbol=y.placeholderSymbol,this.colorMap=(_=y.colorMap)==null?function(_e58){return _e58;}:_,this.backgroundColorMap=(v=y.backgroundColorMap)==null?function(_e59){return _e59;}:v,this.getMacro=y.getMacro,this.parent!==void 0||this.registers;}return _createClass(e,[{key:"makeID",value:function makeID(){if(!this.atomIdsSettings)return;if(this.atomIdsSettings.overrideID)return this.atomIdsSettings.overrideID;if(_typeof(this.atomIdsSettings.seed)!="number")return"".concat(Date.now().toString(36).slice(-2)).concat(Math.floor(Math.random()*1e5).toString(36));var _e60=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,_e60;}},{key:"scale",value:function scale(_e61){return _e61*this.effectiveFontSize;}},{key:"scalingFactor",get:function get(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1;}},{key:"isDisplayStyle",get:function get(){return this.mathstyle.id===Ns||this.mathstyle.id===Ps;}},{key:"isCramped",get:function get(){return this.mathstyle.cramped;}},{key:"isTight",get:function get(){return this.mathstyle.isTight;}},{key:"metrics",get:function get(){return this.mathstyle.metrics;}},{key:"effectiveFontSize",get:function get(){return Math.max(Ho[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale);}},{key:"getRegister",value:function getRegister(_e62){if(this.registers&&_e62 in this.registers)return this.registers[_e62];if(this.parent)return this.parent.getRegister(_e62);}},{key:"getRegisterAsNumber",value:function getRegisterAsNumber(_e63){var t=this.getRegister(_e63);if(_typeof(t)=="number")return t;if(_typeof(t)=="string")return Number(t);}},{key:"getRegisterAsGlue",value:function getRegisterAsGlue(_e64){if(this.registers&&_e64 in this.registers){var _t35=this.registers[_e64];return _typeof(_t35)=="object"&&"glue"in _t35?_t35:_typeof(_t35)=="object"&&"dimension"in _t35?{glue:{dimension:_t35.dimension}}:_typeof(_t35)=="number"?{glue:{dimension:_t35}}:void 0;}if(this.parent)return this.parent.getRegisterAsGlue(_e64);}},{key:"getRegisterAsEm",value:function getRegisterAsEm(_e65,t){return Gs(this.getRegisterAsDimension(_e65),t);}},{key:"getRegisterAsDimension",value:function getRegisterAsDimension(_e66){if(this.registers&&_e66 in this.registers){var _t36=this.registers[_e66];return _typeof(_t36)=="object"&&"glue"in _t36?_t36.glue:_typeof(_t36)=="object"&&"dimension"in _t36?_t36:_typeof(_t36)=="number"?{dimension:_t36}:void 0;}if(this.parent)return this.parent.getRegisterAsDimension(_e66);}},{key:"setRegister",value:function setRegister(_e67,t){if(t===void 0){delete this.registers[_e67];return;}this.registers[_e67]=t;}},{key:"evaluate",value:function evaluate(_e68){if(!_e68||!("register"in _e68))return _e68;var t=this;if("global"in _e68&&_e68.global)for(;t.parent;)t=t.parent;var n=1;"factor"in _e68&&_e68.factor!==1&&_e68.factor!==void 0&&(n=_e68.factor);var r=t.getRegister(_e68.register);if(r===void 0)return;if(_typeof(r)=="string")return{string:Number(r).toString()+r};if(_typeof(r)=="number")return{number:n*r};var i=t.evaluate(r);if(i!==void 0)return"string"in i?{string:Number(r).toString()+i.string}:"number"in i?{number:n*i.number}:"dimension"in i?l(c({},i),{dimension:n*i.dimension}):"glue"in i?l(c({},i),{glue:l(c({},i.glue),{dimension:n*i.glue.dimension}),shrink:i.shrink?l(c({},i.shrink),{dimension:n*i.shrink.dimension}):void 0,grow:i.grow?l(c({},i.grow),{dimension:n*i.grow.dimension}):void 0}):_e68;}},{key:"toDimension",value:function toDimension(_e69){var t=this.evaluate(_e69);if(t===void 0)return null;if("dimension"in t)return t;if("glue"in t)return t.glue;if("number"in t)return{dimension:t.number};if("string"in t){var _e70=parseFloat(t.string),_n17=t.string.match(/(mm|cm|ex|px|em|bp|dd|pc|in|mu)$/);return _n17?{dimension:_e70,unit:_n17[0]}:{dimension:_e70};}return null;}},{key:"toEm",value:function toEm(_e71,t){if(_e71===null)return 0;var n=this.toDimension(_e71);return n===null?0:Ws(n,t)/Lo;}},{key:"toNumber",value:function toNumber(_e72){if(_e72===null)return null;var t=this.evaluate(_e72);return t===void 0?null:"number"in t?t.number:"dimension"in t?t.dimension:"glue"in t?t.glue.dimension:"string"in t?Number(t.string):null;}},{key:"toColor",value:function toColor(_e73){var t,n;if(_e73===null)return null;var r=this.evaluate(_e73);return r===void 0?null:"string"in r?(n=(t=this.colorMap)==null?void 0:t.call(this,r.string))==null?r.string:n:null;}},{key:"toBackgroundColor",value:function toBackgroundColor(_e74){var t,n;if(_e74===null)return null;var r=this.evaluate(_e74);return r===void 0?null:"string"in r?(n=(t=this.backgroundColorMap)==null?void 0:t.call(this,r.string))==null?r.string:n:null;}}]);}(),$s=["body","above","below","superscript","subscript"];function ec(e){return _typeof(e)=="string"&&$s.includes(e);}function tc(e){return e!==void 0&&Array.isArray(e)&&e.length===2;}var L=function(){function e(_e75){_classCallCheck(this,e);this.isRoot=!1;var t,n,r,i,a,o,s;this.type=_e75.type,_typeof(_e75.value)=="string"&&(this.value=_e75.value),this.command=(n=(t=_e75.command)==null?this.value:t)==null?"":n,this.mode=(r=_e75.mode)==null?"math":r,_e75.isFunction&&(this.isFunction=!0),(_e75.isRoot||this.type==="root")&&(this.isRoot=!0),_e75.limits&&(this.subsupPlacement=_e75.limits),this.style=c({},(i=_e75.style)==null?{}:i),this.displayContainsHighlight=(a=_e75.displayContainsHighlight)==null?!1:a,this.captureSelection=(o=_e75.captureSelection)==null?!1:o,this.skipBoundary=(s=_e75.skipBoundary)==null?!1:s,_e75.verbatimLatex!==void 0&&_e75.verbatimLatex!==null&&(this.verbatimLatex=_e75.verbatimLatex),_e75.args&&(this.args=_e75.args),_e75.body&&(this.body=_e75.body),this._changeCounter=0;}return _createClass(e,[{key:"toJson",value:function toJson(){if(this._json)return this._json;var _e79={};if(this.type&&(_e79.type=this.type),this.mode!=="math"&&(_e79.mode=this.mode),this.command&&this.command!==this.value&&(_e79.command=this.command),this.value!==void 0&&(_e79.value=this.value),this.style&&Object.keys(this.style).length>0&&(_e79.style=c({},this.style)),this.verbatimLatex!==void 0&&(_e79.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(_e79.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(_e79.explicitSubsupPlacement=!0),this.isFunction&&(_e79.isFunction=!0),this.displayContainsHighlight&&(_e79.displayContainsHighlight=!0),this.skipBoundary&&(_e79.skipBoundary=!0),this.captureSelection&&(_e79.captureSelection=!0),this.args&&(_e79.args=ac(this.args)),this._branches)for(var _i24=0,_Object$keys6=Object.keys(this._branches);_i24<_Object$keys6.length;_i24++){var _t37=_Object$keys6[_i24];this._branches[_t37]&&(_e79[_t37]=this._branches[_t37].filter(function(_e80){return _e80.type!=="first";}).map(function(_e81){return _e81.toJson();}));}return _e79.type==="mord"&&Object.keys(_e79).length===2&&"value"in _e79?_e79.value:(this._json=_e79,_e79);}},{key:"changeCounter",get:function get(){return this.parent?this.parent.changeCounter:this._changeCounter;}},{key:"isDirty",set:function set(_e82){_e82&&(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));}},{key:"_serialize",value:function _serialize(_e83){if(!(_e83.expandMacro||_e83.skipStyles||_e83.skipPlaceholders)&&_typeof(this.verbatimLatex)=="string")return this.verbatimLatex;var t=ft(this.command,this.mode);return t!=null&&t.serialize?t.serialize(this,_e83):this.body&&this.command?N([P(this.command,this.bodyToLatex(_e83)),this.supsubToLatex(_e83)]):this.body?N([this.bodyToLatex(_e83),this.supsubToLatex(_e83)]):!this.value||this.value==="\u200B"?"":this.command;}},{key:"bodyToLatex",value:function bodyToLatex(_e84){var t;var n=(t=_e84.defaultMode)==null?this.mode==="math"?"math":"text":t;return us.serialize(this.body,l(c({},_e84),{defaultMode:n}));}},{key:"aboveToLatex",value:function aboveToLatex(_e85){return us.serialize(this.above,_e85);}},{key:"belowToLatex",value:function belowToLatex(_e86){return us.serialize(this.below,_e86);}},{key:"supsubToLatex",value:function supsubToLatex(_e87){var t="";if(_e87=l(c({},_e87),{defaultMode:"math"}),this.branch("subscript")!==void 0){var _n18=us.serialize(this.subscript,_e87);_n18.length===0?t+="_{}":_n18.length===1&&/^[0-9]$/.test(_n18)?t+="_".concat(_n18):t+="_{".concat(_n18,"}");}if(this.branch("superscript")!==void 0){var _n19=us.serialize(this.superscript,_e87);_n19.length===0?t+="^{}":_n19.length===1?_n19==="\u2032"?t+="^\\prime ":_n19==="\u2033"?t+="^\\doubleprime ":/^[0-9]$/.test(_n19)?t+="^".concat(_n19):t+="^{".concat(_n19,"}"):t+="^{".concat(_n19,"}");}return t;}},{key:"treeDepth",get:function get(){var _e88=1,t=this.parent;for(;t;)t=t.parent,_e88+=1;return _e88;}},{key:"inCaptureSelection",get:function get(){var _e89=this;for(;_e89;){if(_e89.captureSelection)return!0;_e89=_e89.parent;}return!1;}},{key:"parentPrompt",get:function get(){var _e90=this.parent;for(;_e90;){if(_e90.type==="prompt"&&!_e90.captureSelection)return _e90;_e90=_e90.parent;}return null;}},{key:"branch",value:function branch(_e91){if(ec(_e91)&&this._branches)return this._branches[_e91];}},{key:"branches",get:function get(){if(!this._branches)return[];var _e92=[];for(var _i25=0,_$s=$s;_i25<_$s.length;_i25++){var _t38=_$s[_i25];this._branches[_t38]&&_e92.push(_t38);}return _e92;}},{key:"createBranch",value:function createBranch(_e93){return ec(_e93),ec(_e93)?(this._branches?this._branches[_e93]||(this._branches[_e93]=[this.makeFirstAtom(_e93)]):this._branches=_defineProperty({},_e93,[this.makeFirstAtom(_e93)]),this.isDirty=!0,this._branches[_e93]):[];}},{key:"row",get:function get(){return tc(this.parentBranch)?this.parentBranch[0]:-1;}},{key:"col",get:function get(){return tc(this.parentBranch)?this.parentBranch[1]:-1;}},{key:"body",get:function get(){var _e94;return(_e94=this._branches)==null?void 0:_e94.body;},set:function set(_e95){this.setChildren(_e95,"body");}},{key:"superscript",get:function get(){var _e96;return(_e96=this._branches)==null?void 0:_e96.superscript;},set:function set(_e97){this.setChildren(_e97,"superscript");}},{key:"subscript",get:function get(){var _e98;return(_e98=this._branches)==null?void 0:_e98.subscript;},set:function set(_e99){this.setChildren(_e99,"subscript");}},{key:"above",get:function get(){var _e100;return(_e100=this._branches)==null?void 0:_e100.above;},set:function set(_e101){this.setChildren(_e101,"above");}},{key:"below",get:function get(){var _e102;return(_e102=this._branches)==null?void 0:_e102.below;},set:function set(_e103){this.setChildren(_e103,"below");}},{key:"applyStyle",value:function applyStyle(_e104,t){this.isDirty=!0,t!=null&&t.unstyledOnly?(_e104.color&&!this.style.color&&(this.style.color=_e104.color),_e104.backgroundColor&&!this.style.backgroundColor&&(this.style.backgroundColor=_e104.backgroundColor),_e104.fontFamily&&!this.style.fontFamily&&(this.style.fontFamily=_e104.fontFamily),_e104.fontShape&&!this.style.fontShape&&(this.style.fontShape=_e104.fontShape),_e104.fontSeries&&!this.style.fontSeries&&(this.style.fontSeries=_e104.fontSeries),_e104.fontSize&&!this.style.fontSize&&(this.style.fontSize=_e104.fontSize),_e104.variant&&!this.style.variant&&(this.style.variant=_e104.variant),_e104.variantStyle&&!this.style.variantStyle&&(this.style.variantStyle=_e104.variantStyle)):this.style=c(c({},this.style),_e104),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;var _iterator29=_createForOfIteratorHelper(this.children),_step29;try{for(_iterator29.s();!(_step29=_iterator29.n()).done;){var _n20=_step29.value;_n20.applyStyle(_e104,t);}}catch(err){_iterator29.e(err);}finally{_iterator29.f();}}},{key:"getInitialBaseElement",value:function getInitialBaseElement(){var _e105,t,n;return this.hasEmptyBranch("body")?this:((_e105=this.body)==null||_e105[0].type,(n=(t=this.body[1])==null?void 0:t.getInitialBaseElement())==null?this:n);}},{key:"getFinalBaseElement",value:function getFinalBaseElement(){return this.hasEmptyBranch("body")?this:this.body[this.body.length-1].getFinalBaseElement();}},{key:"isCharacterBox",value:function 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";}},{key:"hasEmptyBranch",value:function hasEmptyBranch(_e106){var t=this.branch(_e106);return t?(t.length,t[0].type,t.length===1):!0;}},{key:"setChildren",value:function setChildren(_e107,t){var n;if(!_e107||(ec(t),!ec(t)))return;var r=((n=_e107[0])==null?void 0:n.type)==="first"?_toConsumableArray(_e107):[this.makeFirstAtom(t)].concat(_toConsumableArray(_e107));this._branches?this._branches[t]=r:this._branches=_defineProperty({},t,r);var _iterator30=_createForOfIteratorHelper(_e107),_step30;try{for(_iterator30.s();!(_step30=_iterator30.n()).done;){var _n21=_step30.value;_n21.parent=this,_n21.parentBranch=t;}}catch(err){_iterator30.e(err);}finally{_iterator30.f();}this.isDirty=!0;}},{key:"makeFirstAtom",value:function makeFirstAtom(t){var n=new e({type:"first",mode:this.mode});return n.parent=this,n.parentBranch=t,n;}},{key:"addChild",value:function addChild(_e108,t){_e108.type,this.createBranch(t).push(_e108),this.isDirty=!0,_e108.parent=this,_e108.parentBranch=t;}},{key:"addChildBefore",value:function addChildBefore(_e109,t){t.parentBranch;var n=this.createBranch(t.parentBranch);n.splice(n.indexOf(t),0,_e109),this.isDirty=!0,_e109.parent=this,_e109.parentBranch=t.parentBranch;}},{key:"addChildAfter",value:function addChildAfter(_e110,t){t.parentBranch;var n=this.createBranch(t.parentBranch);n.splice(n.indexOf(t)+1,0,_e110),this.isDirty=!0,_e110.parent=this,_e110.parentBranch=t.parentBranch;}},{key:"addChildren",value:function addChildren(_e111,t){var n=this.createBranch(t);var _iterator31=_createForOfIteratorHelper(_e111),_step31;try{for(_iterator31.s();!(_step31=_iterator31.n()).done;){var _r11=_step31.value;_r11.parent=this,_r11.parentBranch=t,n.push(_r11);}}catch(err){_iterator31.e(err);}finally{_iterator31.f();}this.isDirty=!0;}},{key:"addChildrenAfter",value:function addChildrenAfter(_e112,t){_e112.length===0||_e112[0].type,t.parentBranch;var n=this.createBranch(t.parentBranch);n.splice.apply(n,[n.indexOf(t)+1,0].concat(_toConsumableArray(_e112))),this.isDirty=!0;var _iterator32=_createForOfIteratorHelper(_e112),_step32;try{for(_iterator32.s();!(_step32=_iterator32.n()).done;){var _n22=_step32.value;_n22.parent=this,_n22.parentBranch=t.parentBranch;}}catch(err){_iterator32.e(err);}finally{_iterator32.f();}return _e112[_e112.length-1];}},{key:"removeBranch",value:function removeBranch(_e113){var t=this.branch(_e113);if(ec(_e113)&&(this._branches[_e113]=void 0),!t)return[];var _iterator33=_createForOfIteratorHelper(t),_step33;try{for(_iterator33.s();!(_step33=_iterator33.n()).done;){var _e114=_step33.value;_e114.parent=void 0,_e114.parentBranch=void 0;}}catch(err){_iterator33.e(err);}finally{_iterator33.f();}t[0].type;var _t39=_toArray(t),n=_t39[0],r=_arrayLikeToArray(_t39).slice(1);return this.isDirty=!0,r;}},{key:"removeChild",value:function removeChild(_e115){if(_e115.parent,_e115.type==="first")return;var t=this.branch(_e115.parentBranch),n=t.indexOf(_e115);t.splice(n,1),this.isDirty=!0,_e115.parent=void 0,_e115.parentBranch=void 0;}},{key:"siblings",get:function get(){return this.parent?this.parent.branch(this.parentBranch):[];}},{key:"firstSibling",get:function get(){return this.siblings[0];}},{key:"lastSibling",get:function get(){var _e116=this.siblings;return _e116[_e116.length-1];}},{key:"isFirstSibling",get:function get(){return this===this.firstSibling;}},{key:"isLastSibling",get:function get(){return this===this.lastSibling;}},{key:"hasNoSiblings",get:function get(){return this.siblings.length===1;}},{key:"leftSibling",get:function get(){this.parent;var _e117=this.parent.branch(this.parentBranch);return _e117[_e117.indexOf(this)-1];}},{key:"rightSibling",get:function get(){this.parent;var _e118=this.parent.branch(this.parentBranch);return _e118[_e118.indexOf(this)+1];}},{key:"hasChildren",get:function get(){return!!(this._branches&&this.children.length>0);}},{key:"firstChild",get:function get(){return this.hasChildren,this.children[0];}},{key:"lastChild",get:function get(){this.hasChildren;var _e119=this.children;return _e119[_e119.length-1];}},{key:"children",get:function get(){if(this._children)return this._children;if(!this._branches)return[];var _e120=[];for(var _i26=0,_$s2=$s;_i26<_$s2.length;_i26++){var _t40=_$s2[_i26];if(this._branches[_t40]){var _iterator34=_createForOfIteratorHelper(this._branches[_t40]),_step34;try{for(_iterator34.s();!(_step34=_iterator34.n()).done;){var _n23=_step34.value;_e120.push.apply(_e120,_toConsumableArray(_n23.children)),_e120.push(_n23);}}catch(err){_iterator34.e(err);}finally{_iterator34.f();}}}return this._children=_e120,_e120;}},{key:"render",value:function render(_e121){if(this.type==="first"&&!_e121.atomIdsSettings)return null;var t=ft(this.command,this.mode);if(t!=null&&t.render)return t.render(this,_e121);var n=new I({parent:_e121},this.style),r=this.createBox(n,{classes:this.parent?"":"ML__base"});return r?(!this.subsupPlacement&&(this.superscript||this.subscript)&&(r=this.attachSupsub(n,{base:r})),r.wrap(n)):null;}},{key:"attachSupsub",value:function attachSupsub(t,n){var r;var i=n.base,a=this.superscript,o=this.subscript;if(!a&&!o)return i;var s=null,c=null,l=(r=n.isCharacterBox)==null?this.isCharacterBox():r,u=0;if(a){var _n24=new I({parent:t,mathstyle:"superscript"});s=e.createBox(_n24,a),l||(u=i.height-t.metrics.supDrop*_n24.scalingFactor);}var d=0;if(o){var _n25=new I({parent:t,mathstyle:"subscript"});c=e.createBox(_n25,o),l||(d=i.depth+t.metrics.subDrop*_n25.scalingFactor);}var f;f=t.isDisplayStyle?t.metrics.sup1:t.isCramped?t.metrics.sup3:t.metrics.sup2;var p=.5/Lo/t.scalingFactor,m=null;if(c&&s){u=Math.max(u,f,s.depth+.25*t.metrics.xHeight),d=Math.max(d,t.metrics.sub2);var _e122=t.metrics.defaultRuleThickness;if(u-s.depth-(c.height-d)<4*_e122){d=4*_e122-(u-s.depth)+c.height;var _n26=.8*t.metrics.xHeight-(u-s.depth);_n26>0&&(u+=_n26,d-=_n26);}var _n27=this.type==="extensible-symbol"&&i.italic?-i.italic:0;m=new js({individualShift:[{box:c,shift:d,marginLeft:_n27},{box:s,shift:-u}]});}else c&&!s?(d=Math.max(d,t.metrics.sub1,c.height-.8*Bo),m=new js({shift:d,children:[{box:c,marginRight:p,marginLeft:this.isCharacterBox()?-i.italic:0}]})):!c&&s&&(u=Math.max(u,f,s.depth+.25*Bo),m=new js({shift:-u,children:[{box:s,marginRight:p}]}));return new F([i,new F(m,{caret:this.caret,isSelected:this.isSelected,classes:"ML__msubsup"})],{type:n.type});}},{key:"attachLimits",value:function attachLimits(t,n){var r=this.superscript?e.createBox(new I({parent:t,mathstyle:"superscript"},this.style),this.superscript):null,i=this.subscript?e.createBox(new I({parent:t,mathstyle:"subscript"},this.style),this.subscript):null;return!r&&!i?n.base.wrap(t):Ms(t,l(c({},n),{above:r,below:i}));}},{key:"bind",value:function bind(_e123,t){if(!t||_e123.isPhantom||this.value==="\u200B")return t;var n=this.parent;for(;n&&!n.captureSelection;)n=n.parent;return n!=null&&n.captureSelection||(this.id||(this.id=_e123.makeID()),t.atomID=this.id),t;}},{key:"createBox",value:function createBox(t,n){var r,i,a,o;var s=(r=this.value)==null?this.body:r,u=(i=n==null?void 0:n.boxType)==null?vs(this.type):i,d=(a=n==null?void 0:n.classes)==null?"":a;this.mode==="text"&&(d+=" ML__text");var f=_typeof(s)=="string"||s===void 0?new F(s==null?null:s,{type:u,isSelected:this.isSelected,mode:this.mode,maxFontSize:t.scalingFactor,style:l(c({variant:"normal"},this.style),{fontSize:Math.max(1,t.size+t.mathstyle.sizeDelta)}),letterShapeStyle:t.letterShapeStyle,classes:d}):(o=e.createBox(t,s,{type:u,classes:d}))==null?new F(null):o;return t.isTight&&(f.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&(f.italic=0),f.right=f.italic,this.bind(t,f),this.caret&&!this.superscript&&!this.subscript&&(f.caret=this.caret),f;}},{key:"isDigit",value:function isDigit(){var _e124;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((_e124=this.body)==null?void 0:_e124.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1;}},{key:"asDigit",value:function asDigit(){var _e125;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((_e125=this.body)==null?void 0:_e125.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":"";}}],[{key:"createBox",value:function createBox(_e76,t,n){var r;if(!t)return null;var i=nc(t),a=[];var _iterator35=_createForOfIteratorHelper(i),_step35;try{for(_iterator35.s();!(_step35=_iterator35.n()).done;){var _t41=_step35.value;var _n28=_t41[0].style,_r12=rc(_e76,_t41,{style:{color:_n28.color,backgroundColor:_n28.backgroundColor,fontSize:_n28.fontSize}});_r12&&a.push(_r12);}}catch(err){_iterator35.e(err);}finally{_iterator35.f();}if(a.length===0)return null;var o=((r=n==null?void 0:n.classes)==null?"":r).trim();return a.length===1&&!o&&!(n!=null&&n.type)?a[0].wrap(_e76):new F(a,{classes:o,type:n==null?void 0:n.type}).wrap(_e76);}},{key:"serialize",value:function serialize(_e77,t){return us.serialize(_e77,t);}},{key:"commonAncestor",value:function commonAncestor(_e78,t){if(_e78===t||_e78.parent===t.parent)return _e78.parent;var n=new WeakSet(),r=_e78.parent;for(;r;)n.add(r),r=r.parent;for(r=t.parent;r;){if(n.has(r))return r;r=r.parent;}}},{key:"fromJson",value:function fromJson(t){return _typeof(t)=="string"?new e({type:"mord",value:t,mode:"math"}):new e(t);}}]);}();function nc(e){var t,n=[],r=[];var _iterator36=_createForOfIteratorHelper(e),_step36;try{for(_iterator36.s();!(_step36=_iterator36.n()).done;){var _i27=_step36.value;if(_i27.type==="first"){r.push(_i27);continue;}if(!t&&!_i27.style)r.push(_i27);else{var _e126=_i27.style;t&&_e126.color===t.color&&_e126.backgroundColor===t.backgroundColor&&_e126.fontSize===t.fontSize?r.push(_i27):(r.length>0&&n.push(r),r=[_i27],t=_e126);}}}catch(err){_iterator36.e(err);}finally{_iterator36.f();}return r.length>0&&n.push(r),n;}function rc(e,t,n){var r,i,a,o,s;if(!t||t.length===0)return null;var u=new I({parent:e},n.style),d=!((r=u.atomIdsSettings)!=null&&r.groupNumbers),f=[];if(t.length===1){var _e127=t[0],_n29=_e127.render(u);_n29&&(d&&_e127.isSelected&&_n29.selected(!0),f=[_n29]);}else{var _e128="",_n30=!0;var _iterator37=_createForOfIteratorHelper(t),_step37;try{for(_iterator37.s();!(_step37=_iterator37.n()).done;){var _r13=_step37.value;(i=u.atomIdsSettings)!=null&&i.groupNumbers&&_e128&&(_n30&&_r13.isDigit()||!_n30&&ic(_r13))&&(u.atomIdsSettings.overrideID=_e128);var _t42=_r13.render(u);u.atomIdsSettings&&(u.atomIdsSettings.overrideID=void 0),_t42&&((a=u.atomIdsSettings)!=null&&a.groupNumbers&&((_r13.isDigit()||ic(_r13))&&(!_e128||_n30!==_r13.isDigit())&&(_n30=_r13.isDigit(),_e128=(o=_r13.id)==null?"":o),_e128&&(!(_r13.isDigit()||ic(_r13))||!_r13.hasEmptyBranch("superscript")||!_r13.hasEmptyBranch("subscript"))&&(_e128="")),d&&_r13.isSelected&&_t42.selected(!0),f.push(_t42));}}catch(err){_iterator37.e(err);}finally{_iterator37.f();}}if(f.length===0)return null;var p=new F(f,l(c({isTight:u.isTight},n),{type:(s=n.type)==null?"lift":s}));return p.isSelected=f.every(function(e){return e.isSelected;}),p.wrap(u);}function ic(e){return e.mode==="text";}function ac(e){return e.map(function(e){return e===null?"<null>":Array.isArray(e)&&e[0]instanceof L?{atoms:e.map(function(e){return e.toJson();})}:_typeof(e)=="object"&&"group"in e?{group:e.group.map(function(e){return e.toJson();})}:e;});}var oc=function(_L){function e(_e129,t,n){var _this4;_classCallCheck(this,e);_this4=_callSuper(this,e,[{type:"text",command:_e129,mode:"text",displayContainsHighlight:!0}]),_this4.value=t,_this4.verbatimLatex=t,_this4.applyStyle(n);return _this4;}_inherits(e,_L);return _createClass(e,[{key:"render",value:function render(_e130){var t=this.createBox(_e130);return this.caret&&(t.caret=this.caret),t;}},{key:"_serialize",value:function _serialize(_e131){var t;return(t=this.verbatimLatex)==null?mt("text",this.value.codePointAt(0)):t;}}],[{key:"fromJson",value:function fromJson(t){return new e(t.command,t.value,t.style);}}]);}(L);function sc(e,t){if(e.direction===t.direction){var _n31=e.ranges.length;if(t.ranges.length===_n31){var _r14=0;for(;_r14<_n31&&cc(e.ranges[_r14],t.ranges[_r14])==="equal";)_r14++;return _r14===_n31?"equal":"different";}}return"different";}function cc(e,t){return e[0]===t[0]&&e[1]===t[1]?"equal":"different";}function lc(e){var t=1/0,n=-1/0;var _iterator38=_createForOfIteratorHelper(e.ranges),_step38;try{for(_iterator38.s();!(_step38=_iterator38.n()).done;){var _r15=_step38.value;t=Math.min(t,_r15[0],_r15[1]),n=Math.max(n,_r15[0],_r15[1]);}}catch(err){_iterator38.e(err);}finally{_iterator38.f();}return[t,n];}function uc(e){return _typeof(e)=="number"&&!Number.isNaN(e);}function dc(e){return Array.isArray(e)&&e.length===2;}function fc(e){return _typeof(e)=="object"&&!!e&&"ranges"in e&&Array.isArray(e.ranges);}function pc(e,t){var n=e.at(t),r;if(n){r=n.mode;var _e132=n.parent;for(;!r&&_e132;)_e132&&(r=_e132.mode),_e132=_e132.parent;}return r;}function mc(e,t){if(!t)return"";if(_typeof(t)=="string")return t;if(!e||t.after===void 0)return t.value;var n=!1,r=!1,i=!1,a=!1,o=!1,s=!1,c=!1,l=!1,u=!1,d=!1,f=!1,p=!1,m=!1,h=!1,g=!1,_=e[0],v=0;for(;_!=null&&_.type&&/^(subsup|placeholder)$/.test(_.type);)v+=1,_=e[v];return n=!_||_.type==="first",_&&(h=_.mode==="text",r=!h&&_.type==="mord"&&Xe.test(_.value),i=!h&&_.type==="mord"&&/\d+$/.test(_.value),a=!h&&_.isFunction,o=_.type==="genfrac",s=_.type==="surd",c=_.type==="mbin",l=_.type==="mrel",u=_.type==="mop"||_.type==="operator"||_.type==="extensible-symbol",d=_.type==="mpunct"||_.type==="minner",f=_.type==="array",p=_.type==="mopen",m=_.type==="mclose"||_.type==="leftright",g=_.type==="space"),t.after.includes("nothing")&&n||t.after.includes("letter")&&r||t.after.includes("digit")&&i||t.after.includes("function")&&a||t.after.includes("frac")&&o||t.after.includes("surd")&&s||t.after.includes("binop")&&c||t.after.includes("relop")&&l||t.after.includes("operator")&&u||t.after.includes("punct")&&d||t.after.includes("array")&&f||t.after.includes("openfence")&&p||t.after.includes("closefence")&&m||t.after.includes("text")&&h||t.after.includes("space")&&g?t.value:"";}function hc(e,t,n){return n?mc(e,n[t]):"";}var gc={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\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","\u221e":"\\infty",oo:{after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"\u2211":"\\sum",sum:"\\sum_{#?}^{#?}",int:"\\int_{#?}^{#?}",prod:"\\prod_{#?}^{#?}",sqrt:"\\sqrt{#?}","\u2206":"\\differentialD","\u2202":"\\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","\u2260":"\\ne","!=":"\\ne","\u2265":"\\ge",">=":"\\ge","\u2264":"\\le","<=":"\\le","<<":"\\ll",">>":"\\gg","~~":"\\approx","\u2248":"\\approx","?=":"\\questeq","\u00f7":"\\div","\u00ac":"\\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"},\u00b5:"\\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",\u03a9:"\\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}",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 _c(e,t){var _wc,_wc2;var n;var r=(n=t==null?void 0:t.format)==null?"auto":n;return r==="auto"&&(_wc=wc(e),_wc2=_slicedToArray(_wc,2),r=_wc2[0],e=_wc2[1],_wc),r==="ascii-math"?(e=e.replace(RegExp("\\u2061","gu"),""),e=e.replace(RegExp("\\u3016","gu"),"{"),e=e.replace(RegExp("\\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",vc(e,{inlineShortcuts:t==null?void 0:t.inlineShortcuts})]):["latex",e];}function vc(e,t){var n;if(e=e.trim(),!e)return"";var r=(n=t.inlineShortcuts)==null?gc:n;if(e.startsWith("^")||e.startsWith("_")){var _bc=bc(e.slice(1),{inlineShortcuts:r,noWrap:!0}),_n32=_bc.match,_i28=_bc.rest;return"".concat(e[0],"{").concat(_n32,"}").concat(vc(_i28,t));}var i=e.match(/^(sqrt|\u221A)(.*)/);if(i){var _bc2=bc(i[2],{inlineShortcuts:r,noWrap:!0}),_e133=_bc2.match,_n33=_bc2.rest;return"\\sqrt{".concat(_e133==null?"\\placeholder{}":_e133,"}").concat(vc(_n33,t));}if(i=e.match(/^(\\cbrt|\u221B)(.*)/),i){var _bc3=bc(i[2],{inlineShortcuts:r,noWrap:!0}),_e134=_bc3.match,_n34=_bc3.rest;return"\\sqrt[3]{".concat(_e134==null?"\\placeholder{}":_e134,"}").concat(vc(_n34,t));}if(i=e.match(/^abs(.*)/),i){var _bc4=bc(i[1],{inlineShortcuts:r,noWrap:!0}),_e135=_bc4.match,_n35=_bc4.rest;return"\\left|".concat(_e135==null?"\\placeholder{}":_e135,"\\right|").concat(vc(_n35,t));}if(i=e.match(/^["\u201d\u201c](.*?)["\u201d\u201c](.*)/),i)return"\\text{".concat(i[1],"}").concat(vc(i[2],t));if(i=e.match(/^([^a-zA-Z0-9\(\{\[\_\^\\\s"]+)(.*)/),i)return"".concat(xc(i[1],r)).concat(vc(i[2],t));if(/^([fgh])[^a-zA-Z]/.test(e)){var _bc5=bc(e.slice(1),{inlineShortcuts:r,noWrap:!0}),_n36=_bc5.rest,_i29=_bc5.match,_a1="";return _a1=e[1]==="("?"".concat(e[0],"\\left(").concat(_i29,"\\right)"):e[0]+_i29,_a1+vc(_n36,t);}if(i=e.match(/^([a-zA-Z]+)(.*)/),i)return xc(i[1],r)+vc(i[2],t);var _bc6=bc(e,{inlineShortcuts:r,noWrap:!0}),a=_bc6.match,o=_bc6.rest;if(a&&o[0]==="/"){var _e136=bc(o.slice(1),{inlineShortcuts:r,noWrap:!0});if(_e136.match)return"\\frac{".concat(a,"}{").concat(_e136.match,"}").concat(vc(_e136.rest,t));}else return e.startsWith("(")?"\\left("+a+"\\right)"+vc(o,t):a+vc(o,t);return i=e.match(/^(\s+)(.*)$/),i?" "+vc(i[2],t):e;}var yc={"[":"\\lbrack","]":"\\rbrack","{":"\\lbrace","}":"\\rbrace"};function bc(e,t){var n,r;var i="";e=e.trim();var a=e,o=e.charAt(0),s={"(":")","{":"}","[":"]"}[o];if(s){var _c3=1,_l3=1;for(;_l3<e.length&&_c3>0;)e[_l3]===o&&_c3++,e[_l3]===s&&_c3--,_l3++;if(_c3===0){var _c4=vc(e.substring(1,_l3-1),t);i=t.noWrap&&o==="("?_c4:"\\left".concat((n=yc[o])==null?o:n).concat(_c4,"\\right").concat((r=yc[s])==null?s:r),a=e.slice(Math.max(0,_l3));}else i=e.substring(1,_l3),a="";}else{var _n37=e.match(/^([a-zA-Z]+)/);if(_n37){var _n38=hc(null,e,t.inlineShortcuts);if(_n38)return _n38=_n38.replace("_{#?}",""),_n38=_n38.replace("^{#?}",""),{match:_n38,rest:e.slice(_n38.length)};}if(_n37=e.match(/^([a-zA-Z])/),_n37)return{match:_n37[1],rest:e.slice(1)};if(_n37=e.match(/^(-)?\d+(\.\d*)?/),_n37)return{match:_n37[0],rest:e.slice(_n37[0].length)};/^\\(left|right)/.test(e)||(_n37=e.match(/^(\\[a-zA-Z]+)/),_n37&&(a=e.slice(_n37[1].length),i=_n37[1]));}return{match:i,rest:a};}function xc(e,t){var n=hc(null,e,t);return n?(n=n.replace("_{#?}",""),n=n.replace("^{#?}",""),n+=" "):n=e,n;}var Sc=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function Cc(e){var t=e.trim();var _iterator39=_createForOfIteratorHelper(Sc),_step39;try{for(_iterator39.s();!(_step39=_iterator39.n()).done;){var _e137=_step39.value;if(t.startsWith(_e137[0])&&t.endsWith(_e137[1]))return[!0,t.substring(_e137[0].length,t.length-_e137[1].length)];}}catch(err){_iterator39.e(err);}finally{_iterator39.f();}return[!1,e];}function wc(e){var _Cc,_Cc2;if(e=e.trim(),e.length<=1)return["latex",e];var t;return _Cc=Cc(e),_Cc2=_slicedToArray(_Cc,2),t=_Cc2[0],e=_Cc2[1],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{".concat(e,"}")]:[void 0,e];}var Tc="$$",Ec="$$",Dc=function Dc(e,t,n){return Sc.some(function(e){return t.startsWith(e[0])&&t.endsWith(e[1]);})||(t="".concat(Tc," ").concat(t," ").concat(Ec)),t;},Oc=function(){function e(t){_classCallCheck(this,e);e._modes[t]=this;}return _createClass(e,[{key:"onPaste",value:function onPaste(_e153,t){return!1;}},{key:"insert",value:function insert(_e154,t,n){return!1;}}],[{key:"onPaste",value:function onPaste(t,n,r){var i;if(!n.contentEditable&&n.userSelect==="none")return n.model.announce("plonk"),!1;if(_typeof(r)=="string"){var _e138=new DataTransfer();_e138.setData("text/plain",r),r=_e138;}var a=new ClipboardEvent("paste",{clipboardData:r,cancelable:!0});return(i=n.host)!=null&&i.dispatchEvent(a)?e._modes[t].onPaste(n,r):!1;}},{key:"copyToClipboard",value:function copyToClipboard(_e139,t){if(!_e139.contentEditable&&_e139.userSelect==="none"){_e139.model.announce("plonk");return;}var n=_e139.model,r=n.selectionIsCollapsed?[0,n.lastOffset]:lc(n.selection),i=n.getValue(r,t);navigator.clipboard.writeText(i).then(function(){},function(){return _e139.model.announce("plonk");});}},{key:"onCopy",value:function onCopy(_e140,t){var n;if(!t.clipboardData)return;if(!_e140.contentEditable&&_e140.userSelect==="none"){_e140.model.announce("plonk");return;}var r=_e140.model,i=r.selectionIsCollapsed?[0,r.lastOffset]:lc(r.selection),a=r.getAtoms(i);if(a.every(function(_e141){return _e141.mode==="text"||!_e141.mode;}))t.clipboardData.setData("text/plain",a.filter(function(_e142){return _e142 instanceof oc;}).map(function(_e143){return _e143.value;}).join(""));else if(a.every(function(_e144){return _e144.mode==="latex";}))t.clipboardData.setData("text/plain",r.getAtoms(i,{includeChildren:!0}).map(function(_e145){var t;return(t=_e145.value)==null?"":t;}).join(""));else{var _o8;_o8=a.length===1&&a[0].verbatimLatex!==void 0?a[0].verbatimLatex:r.getValue(i,"latex-expanded"),t.clipboardData.setData("application/x-latex",_o8);try{t.clipboardData.setData("text/plain",_e140.options.onExport(_e140,_o8,i));}catch(_e146){}if(a.length===1){var _e147=a[0];(_e147.type==="root"||_e147.type==="group")&&(a=_e147.body.filter(function(_e148){return _e148.type!=="first";}));}try{t.clipboardData.setData("application/json+mathlive",JSON.stringify(a.map(function(_e149){return _e149.toJson();})));}catch(_e150){}if((n=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&n.ComputeEngine){var _e151=globalThis.MathfieldElement.computeEngine;if(_e151)try{var _n39=_e151.jsonSerializationOptions;_e151.jsonSerializationOptions={metadata:["latex"]};var _a10=_e151.parse(r.getValue(i,"latex-unstyled"));_e151.jsonSerializationOptions=_n39;var _o9=JSON.stringify(_a10.json);_o9&&t.clipboardData.setData("application/json",_o9);}catch(_e152){}}}t.preventDefault();}},{key:"insert",value:function insert(t,n){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var i;var a=r.mode==="auto"||(i=r.mode)==null?t.mode:i;return e._modes[a].insert(t,n,r);}}]);}();Oc._modes={};var R=Oc,kc=[{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","^"]}],Ac={"\\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 jc(e){var t;return((t=e.element)==null?void 0:t.mathfield)===e;}function Mc(e){var t,n;return(n=(t=e.querySelector(".ML__caret"))==null?e.querySelector(".ML__text-caret"):t)==null?e.querySelector(".ML__latex-caret"):n;}function Nc(e){var t=Mc(e);if(!t)return null;var n=t.getBoundingClientRect();return{x:n.right,y:n.bottom,height:n.height};}function Pc(e){var t;if(!e.parent)return"root";var n=(t=e.parent.id)==null?"":t;return n+=_typeof(e.parentBranch)=="string"?"-"+e.parentBranch:"-".concat(e.parentBranch[0],"/").concat(e.parentBranch[0]),n;}function Fc(e,t,n){if(!t)return null;var r=e.field.getBoundingClientRect(),i=t.right-t.left,a=t.bottom-t.top,o=Math.ceil(t.left-r.left+e.field.scrollLeft*n),s=Math.ceil(t.top-r.top);return{left:o,right:o+i,top:s,bottom:s+a};}function Ic(e){var t=e,n=t.getBoundingClientRect();for(;n.bottom===n.top&&t.parentElement instanceof Element&&(t=t.parentElement,n=t.getBoundingClientRect(),n.bottom===n.top););var r=getComputedStyle(t),i=parseInt(r.marginRight),a=n.right-n.left,o=n.bottom-n.top;if(a===0||!Number.isFinite(a)){var _e155=parseFloat(r.width);Number.isFinite(_e155)&&_e155>0?a=_e155:t instanceof HTMLElement&&t.offsetWidth>0&&(a=t.offsetWidth);}if(o===0||!Number.isFinite(o)){var _e156=parseFloat(r.height);Number.isFinite(_e156)&&_e156>0?o=_e156:t instanceof HTMLElement&&t.offsetHeight>0&&(o=t.offsetHeight);}var s={top:n.top-1,bottom:n.top-1+o,left:n.left,right:n.left+a-1+i};if(e.children.length===0||e.tagName.toUpperCase()==="SVG")return s;var _iterator40=_createForOfIteratorHelper(e.children),_step40;try{for(_iterator40.s();!(_step40=_iterator40.n()).done;){var _t43=_step40.value;if(_t43.nodeType===1&&"atomId"in _t43.dataset&&!_t43.classList.contains("ML__pstrut")){var _e157=Ic(_t43);s.left=Math.min(s.left,_e157.left),s.right=Math.max(s.right,_e157.right),s.top=Math.min(s.top,_e157.top),s.bottom=Math.max(s.bottom,_e157.bottom);}}}catch(err){_iterator40.e(err);}finally{_iterator40.f();}return s;}function Lc(e,t){var n,r;if(!t.id)return null;var i=(r=(n=e.atomBoundsCache)==null?void 0:n.get(t.id))==null?null:r;if(i!==null)return i;var a=e.field.querySelectorAll("[data-atom-id=\"".concat(t.id,"\"]")),o=Array.from(a);if(t.type==="prompt"){var _iterator41=_createForOfIteratorHelper(o),_step41;try{for(_iterator41.s();!(_step41=_iterator41.n()).done;){var _e158=_step41.value;if(_e158.classList.contains("ML__prompt-atom")){var _t44=_e158.querySelector(".ML__prompt");if(_t44){var _e159=Ic(_t44);i?(i.left=Math.min(i.left,_e159.left),i.right=Math.max(i.right,_e159.right),i.top=Math.min(i.top,_e159.top),i.bottom=Math.max(i.bottom,_e159.bottom)):i=_e159;}}}}catch(err){_iterator41.e(err);}finally{_iterator41.f();}}for(var _i30=0,_o0=o;_i30<_o0.length;_i30++){var _e160=_o0[_i30];var _t45=Ic(_e160);i?(i.left=Math.min(i.left,_t45.left),i.right=Math.max(i.right,_t45.right),i.top=Math.min(i.top,_t45.top),i.bottom=Math.max(i.bottom,_t45.bottom)):i=_t45;}return e.atomBoundsCache&&(i?e.atomBoundsCache.set(t.id,i):e.atomBoundsCache.delete(t.id)),i==null?null:i;}function Rc(e,t){var _t46=_slicedToArray(t,2),n=_t46[0],r=_t46[1],i=null;for(var _t47=n;_t47<=r;_t47++){var _n40=Lc(e,e.model.at(_t47));_n40&&(i?(i.top=Math.min(i.top,_n40.top),i.bottom=Math.max(i.bottom,_n40.bottom),i.left=Math.min(i.left,_n40.left),i.right=Math.max(i.right,_n40.right)):i=_n40);}return i==null?{top:0,bottom:0,left:0,right:0}:i;}function zc(e,t,n){var r=new Map(),i=e.field,a=i.offsetWidth,o=Math.floor(i.getBoundingClientRect().width)/a;o=isNaN(o)?1:o;var _iterator42=_createForOfIteratorHelper(e.model.getAtoms(t,{includeChildren:!0})),_step42;try{for(_iterator42.s();!(_step42=_iterator42.n()).done;){var _i31=_step42.value;if(n!=null&&n.excludeAtomsWithBackground&&_i31.style.backgroundColor)continue;var _t48=Fc(e,Lc(e,_i31),o);if(_t48){var _e161=Pc(_i31);if(r.has(_e161)){var _n41=r.get(_e161);r.set(_e161,{left:Math.min(_n41.left,_t48.left),right:Math.max(_n41.right,_t48.right),top:Math.min(_n41.top,_t48.top),bottom:Math.max(_n41.bottom,_t48.bottom)});}else r.set(_e161,_t48);}}}catch(err){_iterator42.e(err);}finally{_iterator42.f();}return _toConsumableArray(r.values());}function Bc(e,t){return e.model.selection.ranges.reduce(function(n,r){return n.concat.apply(n,_toConsumableArray(zc(e,r,t)));},[]);}function Vc(e,t){return e==="*"||t==="none"?!0:t==="same-origin"?!window.origin||e===window.origin:_typeof(t)=="function"?t(e):!1;}function Hc(e){var t=0,n=0,r=e.offsetWidth,i=e.offsetHeight;for(;e instanceof HTMLElement;)t+=e.offsetTop,n+=e.offsetLeft,e=e.offsetParent;return new DOMRect(n,t,r,i);}function Uc(e,t){if(!e)return;var n=e.model.at(t);if(!n)return;var r={},i=Lc(e,n);i&&(r.bounds=new DOMRect(i.left,i.top,i.right-i.left,i.bottom-i.top)),r.depth=n.treeDepth-2,r.style=n.style;var a=n;for(;a;){if(a.command==="\\htmlData"&&a.args&&_typeof(a.args[0])=="string"){var _e162=a.args[0].split(",");var _iterator43=_createForOfIteratorHelper(_e162),_step43;try{for(_iterator43.s();!(_step43=_iterator43.n()).done;){var _t49=_step43.value;var _e163=_t49.match(/([^=]+)=(.+$)/);if(_e163){var _t50=_e163[1].trim().replace(/ /g,"-");_t50&&(r.data||(r.data={}),r.data[_t50]=_e163[2]);}else{var _e164=_t49.trim().replace(/ /g,"-");_e164&&(r.data||(r.data={}),r.data[_e164]=void 0);}}}catch(err){_iterator43.e(err);}finally{_iterator43.f();}}(a.command==="\\htmlId"||a.command==="\\cssId")&&!r.id&&a.args&&_typeof(a.args[0])=="string"&&(r.id=a.args[0]),a=a.parent;}return(n.mode==="math"||n.mode==="text")&&(r.latex=L.serialize([n],{defaultMode:"math"})),r;}function Wc(e,t){var n=e.model.at(t);for(;n;){if(n.command==="\\href"){var _e165=n.args[0];if(_typeof(_e165)=="string")return _e165;}n=n.parent;}return"";}var Gc="@keyframes ML__caret-blink {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n}\n:host {\n display: block;\n}\n.ML__container {\n display: inline-flex;\n flex-flow: row;\n justify-content: space-between;\n align-items: flex-end;\n min-height: 39px;\n /* Need some room for the virtual keyboard toggle */\n width: 100%;\n padding: 4px;\n box-sizing: border-box;\n /* This attribute is necessary to work around a Firefox issue where\n 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).\n */\n pointer-events: auto;\n /* Prevent the browser from trying to interpret touch gestures in the field */\n /* \"Disabling double-tap to zoom removes the need for browsers to\n delay the generation of click events when the user taps the screen.\" */\n touch-action: none;\n --_caret-color: var(--caret-color, hsl(var(--_hue), 40%, 49%));\n --_selection-color: var(--selection-color, #000);\n --_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 70%, 85%));\n --_text-highlight-background-color: var(--highlight-text, hsla(var(--_hue), 40%, 50%, 0.1));\n --_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 40%, 95%));\n --_smart-fence-color: var(--smart-fence-color, currentColor);\n --_smart-fence-opacity: var(--smart-fence-opacity, 0.5);\n --_contains-highlight-color: var(--contains-highlight-color, var(--_caret-color));\n --_latex-color: var(--latex-color, hsl(var(--_hue), 80%, 40%));\n --_correct-color: var(--correct-color, #10a000);\n --_incorrect-color: var(--incorrect-color, #a01b00);\n --_composition-background-color: var(--composition-background-color, #fff1c2);\n --_composition-text-color: var(--composition-text-color, black);\n --_composition-underline-color: var(--composition-underline-color, transparent);\n --_tooltip-border: var(--tooltip-border, 1px solid transparent);\n --_tooltip-border-radius: var(--tooltip-border-radius, 8px);\n --_tooltip-background-color: var(--tooltip-background-color, #616161);\n --_tooltip-color: var(--tooltip-color, #fff);\n --_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));\n}\n@media (prefers-color-scheme: dark) {\n .ML__container {\n --_contains-highlight-color: var(--contains-highlight-color, hsl(var(--_hue), 85%, 75%));\n --_caret-color: var(--caret-color, hsl(var(--_hue), 65%, 55%));\n --_selection-color: var(--selection-color, #fff);\n --_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 65%, 55%));\n --_text-highlight-background-color: var(--text-highlight-background-color, hsla(var(--_hue), 40%, 50%, 0.6));\n --_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 5%, 34%));\n --_latex-color: var(--primary, hsl(var(--_hue), 40%, 50%));\n --_composition-background-color: #69571c;\n --_composition-text-color: white;\n --_placeholder-color: hsl(var(--_hue), 60%, 69%);\n --_smart-fence-color: var(--smart-fence-color, #fff);\n --_smart-fence-opacity: var(--smart-fence-opacity, 0.7);\n }\n}\n@media (forced-colors: active) {\n .ML__container {\n --_caret-color: white;\n --_selection-color: white;\n --_smart-fence-color: white;\n --_latex-color: white;\n --_correct-color: white;\n --_incorrect-color: white;\n --_composition-text-color: white;\n }\n}\n@media (hover: none) and (pointer: coarse) {\n :host(:not(:focus)) .ML__container {\n pointer-events: none;\n }\n}\n/* This is the actual field content (formula) */\n.ML__content {\n display: flex;\n align-items: center;\n align-self: center;\n position: relative;\n overflow: hidden;\n padding: 2px 3px 2px 1px;\n width: 100%;\n /* Encourage the browser to use the GPU to render the field.\n Weirdly, this is required for prompts to be rendered correctly. \n */\n isolation: isolate;\n text-shadow: var(--text-shadow);\n}\n.ML__content .ML__latex {\n text-shadow: var(--text-shadow);\n}\n.ML__content .ML__sqrt-line {\n box-shadow: var(--text-shadow);\n}\n.ML__content .ML__frac-line {\n box-shadow: var(--text-shadow);\n}\n/* Container for the virtual keyboard toggle and menu toggle buttons */\n.ML__toggles {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: 0;\n align-self: flex-start;\n}\n/* Vertical layout modifier */\n.ML__toggles--vertical {\n flex-direction: column;\n align-items: center;\n gap: 4px;\n}\n.ML__toggles--vertical .ML__virtual-keyboard-toggle,\n.ML__toggles--vertical .ML__menu-toggle {\n margin-right: 0;\n}\n.ML__virtual-keyboard-toggle,\n.ML__menu-toggle {\n box-sizing: border-box;\n display: flex;\n align-self: center;\n align-items: center;\n flex-shrink: 0;\n flex-direction: column;\n justify-content: center;\n width: 34px;\n height: 34px;\n padding: 0;\n margin-right: 4px;\n cursor: pointer;\n /* Avoid some weird blinking with :hover */\n border-radius: 8px;\n border: 1px solid transparent;\n transition: background 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);\n color: hsl(var(--_hue), 40%, 50%);\n fill: currentColor;\n background: transparent;\n}\n.ML__virtual-keyboard-toggle:hover,\n.ML__menu-toggle:hover {\n background: hsla(0, 0%, 70%, 0.3);\n color: #333;\n fill: currentColor;\n}\n.ML__virtual-keyboard-toggle > span,\n.ML__menu-toggle > span {\n display: flex;\n align-self: center;\n align-items: center;\n}\n@media (pointer: coarse) {\n .ML__virtual-keyboard-toggle,\n .ML__menu-toggle {\n min-width: 60px;\n min-height: 60px;\n }\n}\n/* The invisible element used to capture keyboard events. We're just trying\n really hard to make sure it doesn't show. */\n.ML__keyboard-sink {\n display: inline-block;\n resize: none;\n outline: none;\n border: none;\n pointer-events: none;\n /* Need these for Microsoft Edge */\n position: fixed;\n clip: rect(0 0 0 0);\n /* Need this to prevent iOS Safari from auto-zooming */\n font-size: 1em;\n font-family: KaTeX_Main;\n line-height: 0.5;\n /* On Chromium, if this is 0, no keyboard events are received */\n /* Preferred over clip */\n clip-path: inset(50%);\n}\n[part='placeholder'] {\n color: var(--neutral-400);\n}\n.ML__composition {\n background: var(--_composition-background-color);\n color: var(--_composition-text-color);\n text-decoration: underline var(--_composition-underline-color);\n}\n.ML__caret {\n display: inline-block;\n}\n.ML__caret::after {\n content: '';\n visibility: hidden;\n width: 0;\n display: inline-block;\n height: 0.76em;\n --_caret-width: clamp(2px, 0.08em, 10px);\n border: none;\n border-radius: calc(var(--_caret-width) / 2);\n border-right: var(--_caret-width) solid var(--_caret-color);\n margin-right: calc(-1 * var(--_caret-width));\n position: relative;\n left: -0.045em;\n bottom: -0.05em;\n animation: ML__caret-blink 1.05s step-end forwards infinite;\n}\n.ML__text-caret::after {\n content: '';\n visibility: hidden;\n width: 0;\n display: inline-block;\n height: 0.76em;\n --_caret-width: clamp(2px, 0.08em, 10px);\n border: none;\n border-radius: calc(var(--_caret-width) / 2);\n border-right: var(--_caret-width) solid var(--_caret-color);\n margin-right: calc(-1 * var(--_caret-width));\n position: relative;\n left: -0.045em;\n bottom: -0.05em;\n animation: ML__caret-blink 1.05s step-end forwards infinite;\n}\n.ML__latex-caret::after {\n content: '';\n visibility: hidden;\n --_caret-width: clamp(2px, 0.08em, 10px);\n border: none;\n border-radius: calc(var(--_caret-width) / 2);\n border-right: var(--_caret-width) solid var(--_latex-color);\n margin-right: calc(-1 * var(--_caret-width));\n position: relative;\n left: -0.019em;\n animation: ML__caret-blink 1.05s step-end forwards infinite;\n}\n.ML__focused .ML__latex-caret::after,\n.ML__focused .ML__text-caret::after,\n.ML__focused .ML__caret::after {\n visibility: visible;\n}\n.ML__focused .ML__text {\n background: var(--_text-highlight-background-color);\n}\n/* When using smartFence, the anticipated closing fence is displayed\nwith this style */\n.ML__smart-fence__close {\n opacity: var(--_smart-fence-opacity);\n color: var(--_smart-fence-color);\n}\n.ML__focused .ML__selected,\n.ML__focused .ML__selected .ML__contains-caret,\n.ML__focused .ML__selected .ML__smart-fence__close,\n.ML__focused .ML__selected .ML__placeholder {\n color: var(--_selection-color);\n opacity: 1;\n}\n.ML__empty-line-anchor::after {\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n width: 8px;\n height: 20px;\n border-radius: 2px;\n background: transparent;\n opacity: 0;\n pointer-events: none;\n}\n.ML__focused .ML__empty-line-anchor.ML__selected::after {\n background: var(--_selection-background-color);\n opacity: 1;\n}\n.ML__selection {\n box-sizing: border-box;\n background: transparent;\n}\n:host(:focus) .ML__selection {\n background: var(--_selection-background-color) !important;\n}\n.ML__contains-caret.ML__close,\n.ML__contains-caret.ML__open,\n.ML__contains-caret > .ML__close,\n.ML__contains-caret > .ML__open,\n.ML__contains-caret .ML__sqrt-sign,\n.ML__contains-caret .ML__sqrt-line {\n color: var(--_contains-highlight-color);\n}\n.ML__contains-highlight {\n box-sizing: border-box;\n background: transparent;\n}\n.ML__focused .ML__contains-highlight {\n background: var(--_contains-highlight-background-color);\n}\n.ML__raw-latex {\n font-family: 'Berkeley Mono', 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;\n font-weight: 400;\n font-size: 0.8em;\n letter-spacing: -0.05em;\n color: var(--_latex-color);\n}\n.ML__suggestion {\n color: var(--neutral-500);\n}\n.ML__virtual-keyboard-toggle.is-visible.is-pressed:hover {\n background: hsl(var(--_hue), 25%, 35%);\n color: #fafafa;\n fill: currentColor;\n}\n.ML__virtual-keyboard-toggle.is-pressed,\n.ML__virtual-keyboard-toggle.is-active:hover,\n.ML__virtual-keyboard-toggle.is-active {\n background: hsl(var(--_hue), 25%, 35%);\n color: #fafafa;\n fill: currentColor;\n}\n/* Add an attribute 'data-tooltip' to automatically show a\n tooltip over a element on hover.\n*/\n[data-tooltip] {\n position: relative;\n}\n[data-tooltip]::after {\n content: attr(data-tooltip);\n position: absolute;\n display: block;\n z-index: 2;\n pointer-events: none;\n right: auto;\n top: calc(-100% - 4px);\n width: max-content;\n max-width: 200px;\n padding: 8px 8px;\n border-radius: 4px;\n background: #616161;\n color: #fff;\n 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);\n text-align: center;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 13px;\n /* Phone */\n opacity: 0;\n transform: scale(0.5);\n}\n@media only screen and (max-width: 767px) {\n [data-tooltip]::after {\n padding: 8px 16px;\n font-size: 16px;\n }\n}\nmenu [data-tooltip]::after {\n left: 100%;\n top: 0%;\n}\nmenu .ML__base {\n cursor: default;\n}\n/** Don't display if we're tracking, i.e. have the pointer down */\n.tracking [data-tooltip]:hover::after {\n /* Use visibility, not display. Display will remove the after from the DOM, and the override below will not work */\n visibility: hidden;\n}\n/** But do display if tracking and inside a menu */\n.tracking menu li[data-tooltip]:hover::after,\n[data-tooltip]:hover::after {\n visibility: visible;\n opacity: 1;\n transform: scale(1);\n transition-property: opacity, scale;\n transition-duration: 0.15s;\n transition-delay: 1s;\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n}\n.ML__prompt {\n border-radius: 2px;\n}\n.ML__editablePromptBox {\n outline: 1px solid #acacac;\n border-radius: 2px;\n z-index: -1;\n}\n.ML__focused .ML__focusedPromptBox {\n outline: highlight auto 1px;\n}\n.ML__lockedPromptBox {\n background-color: rgba(142, 142, 141, 0.4);\n z-index: -1;\n}\n.ML__correctPromptBox {\n outline: 1px solid var(--_correct-color);\n box-shadow: 0 0 5px var(--_correct-color);\n}\n.ML__incorrectPromptBox {\n outline: 1px solid var(--_incorrect-color);\n box-shadow: 0 0 5px var(--_incorrect-color);\n}\n.variant-submenu {\n display: flex;\n flex-direction: column;\n padding: 8px;\n}\n.variant-submenu [part='menu-item'].ML__xl {\n font-size: 2rem;\n text-align: center;\n margin: 0;\n}\n.ML__center-menu .label {\n text-align: center;\n}\n.insert-matrix-submenu {\n /* Grid doesn't work on Safari */\n --_menu-item-size: 25px;\n width: calc(5 * var(--_menu-item-size));\n display: flex;\n flex-wrap: wrap;\n padding: 8px;\n align-content: center;\n justify-content: center;\n}\n.insert-matrix-submenu [part='menu-item'] {\n width: var(--_menu-item-size);\n height: var(--_menu-item-size);\n font-size: 21px;\n border: none;\n border-radius: 0;\n line-height: 21px;\n text-align: center;\n padding: 0;\n margin: 0;\n}\n.border-submenu [part='menu-item'] {\n font-size: 2rem;\n line-height: 1.2;\n text-align: center;\n}\n.swatches-submenu {\n --_swatch-size: 2rem;\n --_columns: 4;\n display: flex;\n flex-flow: wrap;\n padding: 8px;\n max-width: calc(var(--_columns) * (var(--_swatch-size) + 18px) + 16px);\n box-sizing: border-box;\n}\n.menu-swatch {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: fit-content;\n height: fit-content;\n margin: 2px;\n padding: 0;\n background: var(--neutral-200);\n}\n.menu-swatch > .label {\n padding: 0;\n margin: 0;\n line-height: 0;\n}\n.menu-swatch > .label > span {\n display: inline-block;\n margin: 6px;\n min-width: var(--_swatch-size);\n min-height: var(--_swatch-size);\n border-radius: 50%;\n}\n.menu-swatch.active {\n background: var(--neutral-100);\n z-index: 1;\n scale: 1.4;\n}\n.menu-swatch.active > .label > span {\n border-radius: 2px;\n}\n.menu-swatch .ui-checkmark,\n.menu-swatch .ui-mixedmark {\n position: absolute;\n margin: 0;\n padding: 0;\n color: white;\n}\n.menu-swatch.dark-contrast .ui-checkmark,\n.menu-swatch.dark-contrast .ui-mixedmark {\n color: #000;\n}\n.ML__insert-template {\n font-size: 1em;\n}\n.ML__insert-label {\n opacity: 0.5;\n margin-left: 2ex;\n}\n",Kc=".ML__container {\n min-height: auto !important;\n --_hue: var(--hue, 212);\n --_placeholder-color: var(--placeholder-color, hsl(var(--_hue), 40%, 49%));\n --_placeholder-opacity: var(--placeholder-opacity, 0.4);\n --_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);\n}\n.ML__sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.ML__is-inline {\n display: inline-block;\n}\n.ML__base {\n visibility: inherit;\n display: inline-block;\n position: relative;\n cursor: text;\n padding: 0;\n margin: 0;\n box-sizing: content-box;\n border: 0;\n outline: 0;\n vertical-align: baseline;\n font-weight: inherit;\n font-family: inherit;\n font-style: inherit;\n text-decoration: none;\n width: min-content;\n}\n.ML__strut,\n.ML__strut--bottom {\n display: inline-block;\n min-height: 0.5em;\n}\n.ML__small-delim {\n font-family: KaTeX_Main;\n}\n/* Text mode */\n.ML__text {\n font-family: var(--_text-font-family);\n white-space: pre;\n}\n/* Use cmr for 'math upright' */\n.ML__cmr {\n font-family: KaTeX_Main;\n font-style: normal;\n}\n.ML__mathit {\n font-family: KaTeX_Math;\n /* The KaTeX_Math font is italic by default, so the font-style below is only \n useful when a fallback font is used\n */\n font-style: italic;\n}\n.ML__mathbf {\n font-family: KaTeX_Main;\n font-weight: bold;\n}\n/* Lowercase greek symbols should stick to math font when \\mathbf is applied \n to match TeX idiosyncratic behavior */\n.lcGreek.ML__mathbf {\n font-family: KaTeX_Math;\n}\n.ML__mathbfit {\n font-family: KaTeX_Math;\n font-weight: bold;\n font-style: italic;\n}\n.ML__ams {\n font-family: KaTeX_AMS;\n}\n/* Blackboard */\n.ML__bb {\n font-family: KaTeX_AMS;\n}\n.ML__cal {\n font-family: KaTeX_Caligraphic;\n}\n.ML__frak {\n font-family: KaTeX_Fraktur;\n}\n.ML__tt {\n font-family: KaTeX_Typewriter;\n}\n.ML__script {\n font-family: KaTeX_Script;\n}\n.ML__sans {\n font-family: KaTeX_SansSerif;\n}\n.ML__series_ul {\n font-weight: 100;\n}\n.ML__series_el {\n font-weight: 100;\n}\n.ML__series_l {\n font-weight: 200;\n}\n.ML__series_sl {\n font-weight: 300;\n}\n.ML__series_sb {\n font-weight: 500;\n}\n.ML__bold {\n font-weight: 700;\n}\n.ML__series_eb {\n font-weight: 800;\n}\n.ML__series_ub {\n font-weight: 900;\n}\n.ML__series_uc {\n font-stretch: ultra-condensed;\n}\n.ML__series_ec {\n font-stretch: extra-condensed;\n}\n.ML__series_c {\n font-stretch: condensed;\n}\n.ML__series_sc {\n font-stretch: semi-condensed;\n}\n.ML__series_sx {\n font-stretch: semi-expanded;\n}\n.ML__series_x {\n font-stretch: expanded;\n}\n.ML__series_ex {\n font-stretch: extra-expanded;\n}\n.ML__series_ux {\n font-stretch: ultra-expanded;\n}\n.ML__it {\n font-style: italic;\n}\n.ML__shape_ol {\n -webkit-text-stroke: 1px black;\n text-stroke: 1px black;\n color: transparent;\n}\n.ML__shape_sc {\n font-variant: small-caps;\n}\n.ML__shape_sl {\n font-style: oblique;\n}\n/* First level emphasis */\n.ML__emph {\n color: #bc2612;\n}\n/* Second level emphasis */\n.ML__emph .ML__emph {\n color: #0c7f99;\n}\n.ML__highlight {\n color: #007cb2;\n background: #edd1b0;\n}\n.ML__center {\n text-align: center;\n}\n.ML__left {\n text-align: left;\n}\n.ML__right {\n text-align: right;\n}\n.ML__label_padding {\n padding: 0 0.5em;\n}\n.ML__frac-line {\n width: 100%;\n min-height: 1px;\n}\n.ML__frac-line:after {\n content: '';\n display: block;\n margin-top: max(-1px, -0.04em);\n min-height: max(1px, 0.04em);\n /* Ensure the line is visible when printing even if \"turn off background images\" is on*/\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n /* There's a bug since Chrome 62 where \n sub-pixel border lines don't draw at some zoom \n levels (110%, 90%). \n Setting the min-height used to work around it, but that workaround\n broke in Chrome 84 or so.\n Setting the background (and the min-height) seems to work for now.\n */\n background: currentColor;\n box-sizing: content-box;\n /* Vuetify sets the box-sizing to inherit \n causes the fraction line to not draw at all sizes (see #26) */\n /* On some versions of Firefox on Windows, the line fails to \n draw at some zoom levels, but setting the transform triggers\n the hardware accelerated path, which works */\n transform: translate(0, 0);\n forced-color-adjust: preserve-parent-color;\n}\n@media (forced-colors: active) {\n .ML__frac-line {\n min-height: 0px;\n }\n}\n.ML__sqrt {\n display: inline-block;\n}\n.ML__sqrt-sign {\n display: inline-block;\n position: relative;\n}\n.ML__sqrt-line {\n display: inline-block;\n height: max(1px, 0.04em);\n width: 100%;\n}\n.ML__sqrt-line:before {\n content: '';\n display: block;\n margin-top: min(-1px, -0.04em);\n min-height: max(1px, 0.04em);\n /* Ensure the line is visible when printing even if \"turn off background images\" is on*/\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n background: currentColor;\n /* On some versions of Firefox on Windows, the line fails to \n draw at some zoom levels, but setting the transform triggers\n the hardware accelerated path, which works */\n transform: translate(0, 0);\n forced-color-adjust: preserve-parent-color;\n}\n@media (forced-colors: active) {\n .ML__sqrt-line:after {\n background: white !important;\n }\n}\n.ML__sqrt-line:after {\n border-bottom-width: 1px;\n content: ' ';\n display: block;\n margin-top: -0.1em;\n}\n.ML__sqrt-index {\n margin-left: 0.27777778em;\n margin-right: -0.55555556em;\n}\n.ML__delim-size1 {\n font-family: KaTeX_Size1;\n}\n.ML__delim-size2 {\n font-family: KaTeX_Size2;\n}\n.ML__delim-size3 {\n font-family: KaTeX_Size3;\n}\n.ML__delim-size4 {\n font-family: KaTeX_Size4;\n}\n.ML__delim-mult .delim-size1 > span {\n font-family: KaTeX_Size1;\n}\n.ML__delim-mult .delim-size4 > span {\n font-family: KaTeX_Size4;\n}\n.ML__accent-body {\n font-family: KaTeX_Main;\n}\n.ML__accent-combining-char {\n position: relative;\n left: 0.24em;\n}\n/** The markup for a LaTeX formula, either in an editable mathfield or \n in a static display.\n*/\n.ML__latex {\n display: inline-block;\n direction: ltr;\n text-align: left;\n text-indent: 0;\n text-rendering: auto;\n font-family: inherit;\n font-style: normal;\n font-size-adjust: none;\n font-stretch: normal;\n font-variant-caps: normal;\n letter-spacing: normal;\n line-height: 1.2;\n word-wrap: normal;\n word-spacing: normal;\n white-space: nowrap;\n text-shadow: none;\n -webkit-user-select: none;\n user-select: none;\n width: min-content;\n forced-color-adjust: preserve-parent-color;\n}\n.ML__latex .style-wrap {\n position: relative;\n}\n.ML__latex .ML__mfrac {\n display: inline-block;\n}\n.ML__latex .ML__left-right {\n display: inline-block;\n}\n.ML__latex .ML__vlist-t {\n display: inline-table;\n table-layout: fixed;\n border-collapse: collapse;\n}\n.ML__latex .ML__vlist-r {\n display: table-row;\n}\n.ML__latex .ML__vlist {\n display: table-cell;\n vertical-align: bottom;\n position: relative;\n}\n.ML__latex .ML__vlist > span {\n display: block;\n height: 0;\n position: relative;\n}\n.ML__latex .ML__vlist > span > span {\n display: inline-block;\n}\n.ML__latex .ML__vlist > span > .ML__pstrut {\n overflow: hidden;\n width: 0;\n}\n.ML__latex .ML__vlist-t2 {\n margin-right: -2px;\n}\n.ML__latex .ML__vlist-s {\n display: table-cell;\n vertical-align: bottom;\n font-size: 1px;\n width: 2px;\n min-width: 2px;\n}\n.ML__latex .ML__msubsup {\n text-align: left;\n}\n.ML__latex .ML__negativethinspace {\n display: inline-block;\n margin-left: -0.16667em;\n height: 0.71em;\n}\n.ML__latex .ML__thinspace {\n display: inline-block;\n width: 0.16667em;\n height: 0.71em;\n}\n.ML__latex .ML__mediumspace {\n display: inline-block;\n width: 0.22222em;\n height: 0.71em;\n}\n.ML__latex .ML__thickspace {\n display: inline-block;\n width: 0.27778em;\n height: 0.71em;\n}\n.ML__latex .ML__enspace {\n display: inline-block;\n width: 0.5em;\n height: 0.71em;\n}\n.ML__latex .ML__quad {\n display: inline-block;\n width: 1em;\n height: 0.71em;\n}\n.ML__latex .ML__qquad {\n display: inline-block;\n width: 2em;\n height: 0.71em;\n}\n.ML__latex .ML__llap,\n.ML__latex .ML__rlap {\n width: 0;\n position: relative;\n display: inline-block;\n}\n.ML__latex .ML__llap > .ML__inner,\n.ML__latex .ML__rlap > .ML__inner {\n position: absolute;\n}\n.ML__latex .ML__llap > .ML__fix,\n.ML__latex .ML__rlap > .ML__fix {\n display: inline-block;\n}\n.ML__latex .ML__llap > .ML__inner {\n right: 0;\n}\n.ML__latex .ML__rlap > .ML__inner {\n left: 0;\n}\n.ML__latex .ML__rule {\n display: inline-block;\n border: solid 0;\n position: relative;\n box-sizing: border-box;\n}\n.ML__latex .overline .overline-line,\n.ML__latex .underline .underline-line {\n width: 100%;\n}\n.ML__latex .overline .overline-line:before,\n.ML__latex .underline .underline-line:before {\n content: '';\n border-bottom-style: solid;\n border-bottom-width: max(1px, 0.04em);\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n display: block;\n}\n.ML__latex .overline .overline-line:after,\n.ML__latex .underline .underline-line:after {\n border-bottom-style: solid;\n border-bottom-width: max(1px, 0.04em);\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n content: '';\n display: block;\n margin-top: -1px;\n}\n.ML__latex .ML__stretchy {\n display: block;\n position: absolute;\n width: 100%;\n left: 0;\n overflow: hidden;\n}\n.ML__latex .ML__stretchy:before,\n.ML__latex .ML__stretchy:after {\n content: '';\n}\n.ML__latex .ML__stretchy svg {\n display: block;\n position: absolute;\n width: 100%;\n height: inherit;\n fill: currentColor;\n stroke: currentColor;\n fill-rule: nonzero;\n fill-opacity: 1;\n stroke-width: 1;\n stroke-linecap: butt;\n stroke-linejoin: miter;\n stroke-miterlimit: 4;\n stroke-dasharray: none;\n stroke-dashoffset: 0;\n stroke-opacity: 1;\n}\n.ML__latex .slice-1-of-2 {\n display: inline-flex;\n position: absolute;\n left: 0;\n width: 50.2%;\n overflow: hidden;\n}\n.ML__latex .slice-2-of-2 {\n display: inline-flex;\n position: absolute;\n right: 0;\n width: 50.2%;\n overflow: hidden;\n}\n.ML__latex .slice-1-of-3 {\n display: inline-flex;\n position: absolute;\n left: 0;\n width: 25.1%;\n overflow: hidden;\n}\n.ML__latex .slice-2-of-3 {\n display: inline-flex;\n position: absolute;\n left: 25%;\n width: 50%;\n overflow: hidden;\n}\n.ML__latex .slice-3-of-3 {\n display: inline-flex;\n position: absolute;\n right: 0;\n width: 25.1%;\n overflow: hidden;\n}\n.ML__latex .slice-1-of-1 {\n display: inline-flex;\n position: absolute;\n width: 100%;\n left: 0;\n overflow: hidden;\n}\n.ML__latex .ML__nulldelimiter {\n display: inline-block;\n}\n.ML__latex .ML__op-group {\n display: inline-block;\n}\n.ML__latex .ML__op-symbol {\n position: relative;\n}\n.ML__latex .ML__op-symbol.ML__small-op {\n font-family: KaTeX_Size1;\n}\n.ML__latex .ML__op-symbol.ML__large-op {\n font-family: KaTeX_Size2;\n}\n.ML__latex:has(.ML__center_environment),\n.ML__latex:has(.ML__multiline_environment),\n.ML__latex:has(.ML__align_environment),\n.ML__latex:has(.ML__eqnarray_environment),\n.ML__latex:has(.ML__gather_environment) {\n width: 100%;\n}\n.ML__latex .ML__multiline_environment {\n display: inline-flex;\n width: 100%;\n}\n.ML__latex .ML__center_environment {\n display: inline-flex;\n width: 100%;\n justify-content: center;\n}\n.ML__latex .ML__align_environment,\n.ML__latex .ML__eqnarray_environment,\n.ML__latex .ML__gather_environment {\n display: inline-block;\n}\n.ML__latex .ML__mtable .ML__vertical-separator {\n display: inline-block;\n min-width: 1px;\n box-sizing: border-box;\n}\n.ML__latex .ML__mtable .ML__arraycolsep {\n display: inline-block;\n}\n.ML__latex .ML__mtable .col-align-m > .ML__vlist-t {\n text-align: center;\n}\n.ML__latex .ML__mtable .col-align-c > .ML__vlist-t {\n text-align: center;\n}\n.ML__latex .ML__mtable .col-align-l > .ML__vlist-t {\n text-align: left;\n}\n.ML__latex .ML__mtable .col-align-r > .ML__vlist-t {\n text-align: right;\n}\n[data-href] {\n cursor: pointer;\n}\n.ML__error {\n display: inline-block;\n background-image: radial-gradient(ellipse at center, hsl(341, 100%, 40%), rgba(0, 0, 0, 0) 70%);\n background-color: hsla(341, 100%, 40%, 0.1);\n background-repeat: repeat-x;\n background-size: 3px 3px;\n padding-bottom: 3px;\n background-position: 0 100%;\n}\n.ML__error > .ML__error {\n background: transparent;\n padding: 0;\n}\n.ML__placeholder {\n color: var(--_placeholder-color);\n opacity: var(--_placeholder-opacity);\n padding-left: 0.4ex;\n padding-right: 0.4ex;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;\n}\n.ML__notation {\n position: absolute;\n box-sizing: border-box;\n line-height: 0;\n}\n/* This class is used to implement the `\\mathtip` and `\\texttip` commands\n For UI elements, see `[data-ML__tooltip]`\n*/\n.ML__tooltip-container {\n position: relative;\n transform: scale(0);\n}\n.ML__tooltip-container .ML__tooltip-content {\n position: fixed;\n display: inline-table;\n visibility: hidden;\n z-index: 2;\n width: max-content;\n max-width: 400px;\n padding: 12px 12px;\n border: var(--_tooltip-border);\n border-radius: var(--_tooltip-border-radius);\n background: var(--_tooltip-background-color);\n --_selection-color: var(--_tooltip-color);\n color: var(--_tooltip-color);\n box-shadow: var(--_tooltip-box-shadow);\n opacity: 0;\n transition: opacity 0.15s cubic-bezier(0.4, 0, 1, 1);\n}\n.ML__tooltip-container .ML__tooltip-content .ML__text {\n white-space: normal;\n}\n.ML__tooltip-container .ML__tooltip-content .ML__base {\n display: contents;\n}\n.ML__tooltip-container:hover .ML__tooltip-content {\n visibility: visible;\n opacity: 1;\n font-size: 0.75em;\n transform: scale(1) translate(0, 3em);\n}\n.ML__bg {\n background-color: transparent !important;\n}\n.ML__bg::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: var(--bg-color);\n z-index: -1;\n box-sizing: border-box;\n}\n",qc="#mathlive-environment-popover.is-visible {\n visibility: visible;\n}\n#mathlive-environment-popover {\n --_environment-panel-height: var(--environment-panel-height, 70px);\n --_accent-color: var(--accent-color, #aaa);\n --_background: var(--environment-panel-background, #fff);\n --_button-background: var(--environment-panel-button-background, white);\n --_button-background-hover: var(--environment-panel-button-background-hover, #f5f5f7);\n --_button-background-active: var(--environment-panel-button-background-active, #f5f5f7);\n --_button-text: var(--environment-panel-button-text, #e3e4e8);\n position: absolute;\n width: calc(var(--_environment-panel-height) * 2);\n height: var(--_environment-panel-height);\n border-radius: 4px;\n border: 1.5px solid var(--_accent-color);\n background-color: var(--_background);\n box-shadow: 0 0 30px 0 var(--environment-shadow, rgba(0, 0, 0, 0.4));\n pointer-events: all;\n visibility: hidden;\n}\n#mathlive-environment-popover .MLEP__array-buttons {\n height: calc(var(--_environment-panel-height) * 5/4);\n width: calc(var(--_environment-panel-height) * 5/4);\n margin-left: calc(0px - var(--_environment-panel-height) * 0.16);\n margin-top: calc(0px - var(--_environment-panel-height) * 0.19);\n}\n#mathlive-environment-popover .MLEP__array-buttons .font {\n fill: white;\n}\n#mathlive-environment-popover .MLEP__array-buttons circle {\n fill: #7f7f7f;\n transition: fill 300ms;\n}\n#mathlive-environment-popover .MLEP__array-buttons .MLEP__array-insert-background {\n fill-opacity: 1;\n fill: var(--_background);\n stroke: var(--_accent-color);\n stroke-width: 3px;\n}\n#mathlive-environment-popover .MLEP__array-buttons line {\n stroke: var(--_accent-color);\n stroke-opacity: 0;\n stroke-width: 40;\n pointer-events: none;\n transition: stroke-opacity 300ms;\n stroke-linecap: round;\n}\n#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover circle {\n fill: var(--_accent-color);\n}\n#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover line {\n stroke-opacity: 1;\n}\n#mathlive-environment-popover .MLEP__environment-delimiter-controls {\n height: 100%;\n width: 50%;\n}\n#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options {\n width: var(--_environment-panel-height);\n height: var(--_environment-panel-height);\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n justify-content: space-around;\n}\n#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg {\n pointer-events: all;\n margin-top: 2px;\n width: calc(var(--_environment-panel-height) / 3 * 28 / 24);\n height: calc(var(--_environment-panel-height) / 3 - 2px);\n border-radius: calc(var(--_environment-panel-height) / 25);\n background-color: var(--_button-background);\n}\n#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg:hover {\n background-color: var(--_button-background-hover);\n}\n#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path,\n#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg line {\n stroke: var(--_button-text);\n stroke-width: 2;\n stroke-linecap: round;\n}\n#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg rect,\n#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path {\n fill-opacity: 0;\n}\n#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active {\n pointer-events: none;\n background-color: var(--_button-background-active);\n}\n#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active path,\n#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active line {\n stroke: var(--_accent-color);\n}\n#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active circle {\n fill: var(--_accent-color);\n}\n",Jc="/* The element that display info while in latex mode */\n#mathlive-suggestion-popover {\n --_suggestion-zindex: var(--suggestion-zindex, 100);\n background-color: rgba(97, 97, 97);\n color: #fff;\n text-align: center;\n border-radius: 8px;\n position: fixed;\n z-index: var(--_suggestion-zindex);\n display: none;\n flex-direction: column;\n justify-content: center;\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n}\n#mathlive-suggestion-popover.top-tip::after {\n content: '';\n position: absolute;\n top: -15px;\n left: calc(50% - 15px);\n width: 0;\n height: 0;\n border-left: 15px solid transparent;\n border-right: 15px solid transparent;\n border-bottom: 15px solid rgba(97, 97, 97);\n font-size: 1rem;\n}\n#mathlive-suggestion-popover.bottom-tip::after {\n content: '';\n position: absolute;\n bottom: -15px;\n left: calc(50% - 15px);\n width: 0;\n height: 0;\n border-left: 15px solid transparent;\n border-right: 15px solid transparent;\n border-top: 15px solid rgba(97, 97, 97);\n font-size: 1rem;\n}\n#mathlive-suggestion-popover.is-animated {\n transition: all 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);\n animation: ML__fade-in cubic-bezier(0, 0, 0.2, 1) 0.15s;\n}\n#mathlive-suggestion-popover.is-visible {\n display: flex;\n}\n@keyframes ML__fade-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* The wrapper class for the entire content of the popover panel */\n#mathlive-suggestion-popover ul {\n display: flex;\n flex-flow: column;\n list-style: none;\n margin: 0;\n padding: 0;\n align-items: flex-start;\n max-height: 400px;\n overflow-y: auto;\n}\n#mathlive-suggestion-popover li {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin: 8px;\n padding: 8px;\n width: calc(100% - 16px - 16px);\n column-gap: 1em;\n border-radius: 8px;\n cursor: pointer;\n /* Since the content can be clicked on, provide feedback on hover */\n}\n#mathlive-suggestion-popover li a {\n color: #5ea6fd;\n padding-top: 0.3em;\n margin-top: 0.4em;\n display: block;\n}\n#mathlive-suggestion-popover li a:hover {\n color: #5ea6fd;\n text-decoration: underline;\n}\n#mathlive-suggestion-popover li:hover,\n#mathlive-suggestion-popover li.is-pressed,\n#mathlive-suggestion-popover li.is-active {\n background: rgba(255, 255, 255, 0.1);\n}\n/* The command inside a popover (inside a #mathlive-suggestion-popover) */\n.ML__popover__command {\n font-size: 1.6rem;\n font-family: KaTeX_Main;\n}\n.ML__popover__current {\n background: #5ea6fd;\n color: #fff;\n}\n.ML__popover__latex {\n font-family: 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;\n align-self: center;\n}\n/* The keyboard shortcuts for a symbol as displayed in the popover */\n.ML__popover__keybinding {\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;\n font-size: 0.8em;\n opacity: 0.7;\n}\n/* Style for the character that joins the modifiers of a keyboard shortcut \n(usually a \"+\" sign)*/\n.ML__shortcut-join {\n opacity: 0.5;\n}\n",Yc="/* The element that displays the keys as the user type them */\n#mathlive-keystroke-caption-panel {\n visibility: hidden;\n /*min-width: 160px;*/\n /*background-color: rgba(97, 97, 200, .95);*/\n background: var(--secondary, hsl(var(--_hue), 19%, 26%));\n border-color: var(--secondary-border, hsl(0, 0%, 91%));\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);\n text-align: center;\n border-radius: 6px;\n padding: 16px;\n position: absolute;\n z-index: 1;\n display: flex;\n flex-direction: row-reverse;\n justify-content: center;\n --keystroke: white;\n --on-keystroke: #555;\n --keystroke-border: #f7f7f7;\n}\n@media (prefers-color-scheme: dark) {\n body:not([theme='light']) #mathlive-keystroke-caption-panel {\n --keystroke: hsl(var(--_hue), 50%, 30%);\n --on-keystroke: hsl(0, 0%, 98%);\n --keystroke-border: hsl(var(--_hue), 50%, 25%);\n }\n}\nbody[theme='dark'] #mathlive-keystroke-caption-panel {\n --keystroke: hsl(var(--_hue), 50%, 30%);\n --on-keystroke: hsl(0, 0%, 98%);\n --keystroke-border: hsl(var(--_hue), 50%, 25%);\n}\n#mathlive-keystroke-caption-panel > span {\n min-width: 14px;\n /*height: 8px;*/\n margin: 0 8px 0 0;\n padding: 4px;\n background-color: var(--keystroke);\n color: var(--on-keystroke);\n fill: currentColor;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;\n font-size: 1em;\n border-radius: 6px;\n border: 2px solid var(--keystroke-border);\n /*box-shadow: 0 7px 14px rgba(0,0,0,0.25), 0 5px 5px rgba(0,0,0,0.22);*/\n}\n",Xc=".ML__keyboard {\n --_keyboard-height: 0;\n --_keyboard-zindex: var(--keyboard-zindex, 105);\n --_accent-color: var(--keyboard-accent-color, #0c75d8);\n --_background: var(--keyboard-background, #cacfd7);\n --_border: var(--keyboard-border, #ddd);\n --_padding-horizontal: var(--keyboard-padding-horizontal, 0px);\n --_padding-top: var(--keyboard-padding-top, 5px);\n --_padding-bottom: var(--keyboard-padding-bottom, 0px);\n --_row-padding-left: var(--keyboard-row-padding-left, 0px);\n --_row-padding-right: var(--keyboard-row-padding-right, 0px);\n --_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);\n --_toolbar-text-active: var(--keyboard-toolbar-text-active, var(--_accent-color));\n --_toolbar-background: var(--keyboard-toolbar-background, transparent);\n --_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);\n --_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);\n --_toolbar-font-size: var(--keyboard-toolbar-font-size, '135%');\n --_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);\n --_keycap-background: var(--keycap-background, #f0f0f0);\n --_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);\n --_keycap-background-active: var(--keycap-background-active, var(--_accent-color));\n --_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));\n --_keycap-border: var(--keycap-border, #e5e6e9);\n --_keycap-border-bottom: var(--keycap-border-bottom, #8d8f92);\n --_keycap-text: var(--keycap-text, #000);\n --_keycap-text-active: var(--keycap-text-active, #fff);\n --_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));\n --_keycap-text-pressed: var(--keycap-text-pressed, #fff);\n --_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));\n --_keycap-primary-background: var(--keycap-primary-background, var(--_accent-color));\n --_keycap-primary-text: var(--keycap-primary-text, #ddd);\n --_keycap-primary-background-hover: var(--keycap-primary-background-hover, #0d80f2);\n --_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);\n --_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);\n --_keycap-secondary-text: var(--keycap-secondary-text, #060707);\n --_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);\n --_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);\n --_keycap-height: var(--keycap-height, 60px);\n /* Keycap width (incl. margin) */\n --_keycap-max-width: var(--keycap-max-width, 100px);\n --_keycap-gap: var(--keycap-gap, 8px);\n --_keycap-font-size: var(--keycap-font-size, clamp(16px, 4cqw, 24px));\n --_keycap-small-font-size: var(--keycap-small-font-size, calc(var(--keycap-font-size) * 0.8));\n --_keycap-extra-small-font-size: var(--keycap-extra-small-font-size, calc(var(--keycap-font-size) / 1.42));\n --_variant-panel-background: var(--variant-panel-background, #f0f0f0);\n --_variant-keycap-text: var(--variant-keycap-text, var(--_keycap-text));\n --_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));\n --_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));\n --_variant-keycap-length: var(--variant-keycap-length, 70px);\n --_variant-keycap-font-size: var(--variant-keycap-font-size, 30px);\n --_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 12px);\n --_keycap-shift-font-size: var(--keycap-shift-font-size, 16px);\n --_keycap-shift-color: var(--keycap-shift-color, var(--_accent-color));\n --_box-placeholder-color: var(--box-placeholder-color, var(--_accent-color));\n --_box-placeholder-pressed-color: var(--box-placeholder-pressed-color, var(--keycap-text-pressed));\n --_keycap-glyph-size: var(--keycap-glyph-size, 20px);\n --_keycap-glyph-size-lg: var(--keycap-glyph-size-lg, 24px);\n --_keycap-glyph-size-xl: var(--keycap-glyph-size-xl, 50px);\n}\n.is-math-mode .MLK__rows .if-text-mode,\n.is-text-mode .MLK__rows .if-math-mode {\n display: none;\n}\n.if-can-undo,\n.if-can-redo,\n.if-can-copy,\n.if-can-cut,\n.if-can-paste {\n opacity: 0.4;\n pointer-events: none;\n}\n.can-undo .if-can-undo,\n.can-redo .if-can-redo,\n.can-copy .if-can-copy,\n.can-cut .if-can-cut,\n.can-paste .if-can-paste {\n opacity: 1;\n pointer-events: all;\n}\nbody > .ML__keyboard {\n position: fixed;\n --_padding-bottom: calc(var(--keyboard-padding-bottom, 0px) + env(safe-area-inset-bottom, 0));\n}\nbody > .ML__keyboard.is-visible > .MLK__backdrop {\n box-shadow: 0 -5px 6px rgba(0, 0, 0, 0.08);\n border-top: 1px solid var(--_border);\n}\nbody > .ML__keyboard.backdrop-is-transparent.is-visible > .MLK__backdrop {\n box-shadow: none;\n border: none;\n}\nbody > .ML__keyboard.is-visible.animate > .MLK__backdrop {\n transition: 0.28s cubic-bezier(0, 0, 0.2, 1);\n transition-property: transform, opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n}\n.ML__keyboard {\n position: relative;\n overflow: hidden;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n z-index: var(--_keyboard-zindex);\n box-sizing: border-box;\n outline: none;\n border: none;\n margin: 0;\n padding: 0;\n line-height: 1;\n overflow-wrap: unset;\n text-align: left;\n vertical-align: baseline;\n cursor: auto;\n white-space: pre;\n box-shadow: none;\n opacity: 1;\n transform: none;\n pointer-events: none;\n}\n.ML__keyboard :where(div) {\n box-sizing: border-box;\n outline: none;\n border: none;\n margin: 0;\n padding: 0;\n line-height: 1;\n overflow-wrap: unset;\n text-align: left;\n vertical-align: baseline;\n cursor: auto;\n white-space: pre;\n box-shadow: none;\n transform: none;\n}\n.MLK__backdrop {\n position: absolute;\n bottom: calc(-1 * var(--_keyboard-height));\n width: 100%;\n height: var(--_keyboard-height);\n box-sizing: border-box;\n padding-top: var(--_padding-top);\n padding-bottom: var(--_padding-bottom);\n padding-left: var(--_padding-horizontal);\n padding-right: var(--_padding-horizontal);\n opacity: 0;\n visibility: hidden;\n transform: translate(0, 0);\n background: var(--_background);\n}\n.backdrop-is-transparent .MLK__backdrop {\n background: transparent;\n}\n/* If a custom layout has a custom container/backdrop\n (backdrop-is-transparent), make sure to let pointer event go through. */\n.backdrop-is-transparent .MLK__plate {\n background: transparent;\n pointer-events: none;\n}\n/* If a custom layout has a custom container/backdrop, make sure to \n allow pointer events on it. */\n.backdrop-is-transparent .MLK__layer > div > div {\n pointer-events: all;\n}\n.ML__keyboard.is-visible > .MLK__backdrop {\n transform: translate(0, calc(-1 * var(--_keyboard-height)));\n opacity: 1;\n visibility: visible;\n}\n.caps-lock-indicator {\n display: none;\n width: 8px;\n height: 8px;\n background: #0cbc0c;\n box-shadow: inset 0 0 4px 0 #13ca13, 0 0 4px 0 #a9ef48;\n border-radius: 8px;\n right: 8px;\n top: 8px;\n position: absolute;\n}\n.ML__keyboard.is-caps-lock .caps-lock-indicator {\n display: block;\n}\n.ML__keyboard.is-caps-lock .shift {\n background: var(--_keycap-background-active);\n color: var(--_keycap-text-active);\n}\n.MLK__plate {\n position: absolute;\n top: var(--_padding-top);\n left: var(--_padding-horizontal);\n width: calc(100% - 2 * var(--_padding-horizontal));\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n container-type: inline-size;\n touch-action: none;\n -webkit-user-select: none;\n user-select: none;\n pointer-events: all;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;\n font-size: 16px;\n /* Size of toolbar labels */\n font-weight: 400;\n text-shadow: none;\n}\n.ML__box-placeholder {\n color: var(--_box-placeholder-color);\n}\n.MLK__tex {\n font-family: KaTeX_Main, KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;\n}\n.MLK__tex-math {\n font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;\n font-style: italic;\n}\n.MLK__layer {\n display: none;\n outline: none;\n}\n.MLK__layer.is-visible {\n display: flex;\n flex-flow: column;\n}\n/* Keyboard layouts are made or rows of keys... */\n.MLK__rows {\n --_keycap-width: var(--keycap-width, min(var(--_keycap-max-width), 10cqw));\n display: flex;\n flex-flow: column;\n align-items: center;\n border-collapse: separate;\n clear: both;\n border: 0;\n margin: 0;\n margin-bottom: var(--_keycap-gap);\n gap: var(--_keycap-gap);\n /* If the styling include, e.g., some shadows, they will be\n cut off by the overflow. In that case, set the padding to \n compensate. */\n padding-left: var(--_row-padding-left);\n padding-right: var(--_row-padding-right);\n overflow: visible;\n touch-action: none;\n}\n.MLK__rows > .MLK__row {\n display: flex;\n flex-flow: row;\n justify-content: center;\n width: 100%;\n gap: var(--_keycap-gap);\n margin: 0;\n padding: 0;\n /* For the alignment of the text on some modifiers (e.g. shift) */\n /* Extra spacing between two adjacent keys */\n}\n.MLK__rows > .MLK__row .tex {\n font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;\n}\n.MLK__rows > .MLK__row .tex-math {\n font-family: KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;\n}\n.MLK__rows > .MLK__row .big-op {\n font-size: calc(1.25 * var(--_keycap-font-size));\n}\n.MLK__rows > .MLK__row .small {\n font-size: var(--_keycap-small-font-size);\n}\n.MLK__rows > .MLK__row .bottom {\n justify-content: flex-end;\n}\n.MLK__rows > .MLK__row .left {\n align-items: flex-start;\n padding-left: 12px;\n}\n.MLK__rows > .MLK__row .right {\n align-items: flex-end;\n padding-right: 12px;\n}\n.MLK__rows > .MLK__row .w0 {\n width: 0;\n}\n.MLK__rows > .MLK__row .w5 {\n width: calc(0.5 * var(--_keycap-width) - var(--_keycap-gap));\n}\n.MLK__rows > .MLK__row .w15 {\n width: calc(1.5 * var(--_keycap-width) - var(--_keycap-gap));\n}\n.MLK__rows > .MLK__row .w20 {\n width: calc(2 * var(--_keycap-width) - var(--_keycap-gap));\n}\n.MLK__rows > .MLK__row .w40 {\n width: calc(4 * var(--_keycap-width) - var(--_keycap-gap));\n}\n.MLK__rows > .MLK__row .w50 {\n width: calc(5 * var(--_keycap-width) - var(--_keycap-gap));\n}\n.MLK__rows > .MLK__row .MLK__keycap.w50 {\n font-size: 80%;\n padding-top: 10px;\n font-weight: 100;\n}\n.MLK__rows > .MLK__row .separator {\n background: transparent;\n border: none;\n pointer-events: none;\n}\n.MLK__rows > .MLK__row .horizontal-rule {\n height: 6px;\n margin-top: 3px;\n margin-bottom: 0;\n width: 100%;\n border-radius: 0;\n border-top: var(--_horizontal-rule);\n}\n.MLK__rows > .MLK__row .ghost {\n background: var(--_toolbar-background);\n border: none;\n color: var(--_toolbar-text);\n}\n.MLK__rows > .MLK__row .ghost:hover {\n background: var(--_toolbar-background-hover);\n}\n.MLK__rows > .MLK__row .bigfnbutton {\n font-size: var(--_keycap-extra-small-font-size);\n}\n.MLK__rows > .MLK__row .shift,\n.MLK__rows > .MLK__row .action {\n color: var(--_keycap-secondary-text);\n background: var(--_keycap-secondary-background);\n border-color: var(--_keycap-secondary-border);\n border-bottom-color: var(--_keycap-secondary-border-bottom);\n line-height: 0.8;\n font-size: min(1rem, var(--_keycap-small-font-size));\n font-weight: 600;\n padding: 8px 12px 8px 12px;\n}\n.MLK__rows > .MLK__row .shift:hover,\n.MLK__rows > .MLK__row .action:hover {\n background: var(--_keycap-secondary-background-hover);\n}\n.MLK__rows > .MLK__row .action.primary {\n background: var(--_keycap-primary-background);\n color: var(--_keycap-primary-text);\n}\n.MLK__rows > .MLK__row .action.primary:hover {\n background: var(--_keycap-primary-background-hover);\n color: var(--_keycap-primary-text);\n}\n.MLK__rows > .MLK__row .shift.selected,\n.MLK__rows > .MLK__row .action.selected {\n color: var(--_toolbar-text-active);\n}\n.MLK__rows > .MLK__row .shift.selected.is-pressed,\n.MLK__rows > .MLK__row .action.selected.is-pressed,\n.MLK__rows > .MLK__row .shift.selected.is-active,\n.MLK__rows > .MLK__row .action.selected.is-active {\n color: white;\n}\n.MLK__rows > .MLK__row .warning {\n background: #cd0030;\n color: white;\n}\n.MLK__rows > .MLK__row .warning svg.svg-glyph {\n width: var(--_keycap-glyph-size-lg);\n height: var(--_keycap-glyph-size-lg);\n min-height: var(--_keycap-glyph-size-lg);\n}\n/** A regular keycap\n * Use the :where() pseudo-class to give it a very low specifity, \n * so that it can be overriden by custom style.\n */\n:where(.MLK__rows > .MLK__row div) {\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: space-evenly;\n width: calc(var(--_keycap-width) - var(--_keycap-gap));\n height: var(--_keycap-height);\n box-sizing: border-box;\n padding: 0;\n vertical-align: top;\n text-align: center;\n float: left;\n color: var(--_keycap-text);\n fill: currentColor;\n font-size: var(--_keycap-font-size);\n background: var(--_keycap-background);\n border: 1px solid var(--_keycap-border);\n border-bottom-color: var(--_keycap-border-bottom);\n border-radius: 6px;\n cursor: pointer;\n touch-action: none;\n /* Keys with a variants panel */\n position: relative;\n overflow: hidden;\n -webkit-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n:where(.MLK__rows > .MLK__row div):hover {\n overflow: visible;\n background: var(--_keycap-background-hover);\n color: var(--_keycap-text-hover);\n}\n:where(.MLK__rows > .MLK__row div) .ML__latex {\n pointer-events: none;\n touch-action: none;\n}\n:where(.MLK__rows > .MLK__row div) svg.svg-glyph {\n margin: 8px 0;\n width: var(--_keycap-glyph-size);\n height: var(--_keycap-glyph-size);\n min-height: var(--_keycap-glyph-size);\n}\n:where(.MLK__rows > .MLK__row div) svg.svg-glyph-lg {\n margin: 8px 0;\n width: var(--_keycap-glyph-size-lg);\n height: var(--_keycap-glyph-size-lg);\n min-height: var(--_keycap-glyph-size-lg);\n}\n:where(.MLK__rows > .MLK__row div).MLK__tex-math {\n font-size: 25px;\n}\n:where(.MLK__rows > .MLK__row div).is-pressed {\n background: var(--_keycap-background-pressed);\n color: var(--_keycap-text-pressed);\n --_box-placeholder-color: var(--_box-placeholder-pressed-color);\n}\n:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,\n:where(.MLK__rows > .MLK__row div).action.is-active,\n:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,\n:where(.MLK__rows > .MLK__row div).action.is-pressed {\n z-index: calc(var(--_keyboard-zindex) - 5);\n}\n:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active aside,\n:where(.MLK__rows > .MLK__row div).action.is-active aside,\n:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed aside,\n:where(.MLK__rows > .MLK__row div).action.is-pressed aside {\n display: none;\n}\n:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active .MLK__shift,\n:where(.MLK__rows > .MLK__row div).action.is-active .MLK__shift,\n:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed .MLK__shift,\n:where(.MLK__rows > .MLK__row div).action.is-pressed .MLK__shift {\n display: none;\n}\n:where(.MLK__rows > .MLK__row div).shift.is-pressed,\n:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,\n:where(.MLK__rows > .MLK__row div).action.is-pressed {\n background: var(--_keycap-background-pressed);\n color: var(--_keycap-text-pressed);\n}\n:where(.MLK__rows > .MLK__row div).shift.is-active,\n:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,\n:where(.MLK__rows > .MLK__row div).action.is-active {\n background: var(--_keycap-background-active);\n color: var(--_keycap-text-active);\n --_box-placeholder-color: var(--_box-placeholder-pressed-color);\n}\n:where(.MLK__rows > .MLK__row div) small {\n color: var(--_keycap-secondary-text);\n}\n:where(.MLK__rows > .MLK__row div) aside {\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;\n font-size: 10px;\n line-height: 10px;\n color: var(--_keycap-secondary-text);\n}\n/* Add an attribute 'data-tooltip' to display a tooltip on hover.\nNote there are a different set of tooltip rules for the keyboard toggle\n(it's in a different CSS tree) */\n.ML__keyboard [data-tooltip] {\n position: relative;\n}\n.ML__keyboard [data-tooltip]::after {\n position: absolute;\n display: inline-table;\n content: attr(data-tooltip);\n top: inherit;\n bottom: 100%;\n width: max-content;\n max-width: 200px;\n padding: 8px 8px;\n background: #616161;\n color: #fff;\n text-align: center;\n z-index: 2;\n 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);\n border-radius: 2px;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;\n font-weight: 400;\n font-size: 12px;\n transition: all 0.15s cubic-bezier(0.4, 0, 1, 1) 1s;\n opacity: 0;\n transform: scale(0.5);\n}\n.ML__keyboard [data-tooltip]:hover {\n position: relative;\n}\n.ML__keyboard [data-tooltip]:hover::after {\n opacity: 1;\n transform: scale(1);\n}\n.MLK__toolbar {\n align-self: center;\n display: flex;\n flex-flow: row;\n justify-content: space-between;\n width: 100%;\n max-width: 996px;\n min-height: 32px;\n /* Icons for undo/redo, etc. */\n}\n.MLK__toolbar svg {\n height: 20px;\n width: 20px;\n}\n.MLK__toolbar > .left {\n position: relative;\n display: flex;\n justify-content: flex-start;\n flex-flow: row;\n}\n.MLK__toolbar > .right {\n display: flex;\n justify-content: flex-end;\n flex-flow: row;\n}\n.MLK__toolbar > div > div {\n /* \"button\" in the toolbar */\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--_toolbar-text);\n fill: currentColor;\n background: var(--_toolbar-background);\n font-size: var(--_toolbar-font-size);\n padding: 4px 15px;\n cursor: pointer;\n width: max-content;\n min-width: 42px;\n min-height: 34px;\n border: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-bottom: 8px;\n padding-top: 8px;\n margin-top: 0;\n margin-bottom: 4px;\n margin-left: 4px;\n margin-right: 4px;\n border-radius: 8px;\n box-shadow: none;\n border-bottom: 2px solid transparent;\n}\n.MLK__toolbar > div > div:not(.disabled):not(.selected):hover {\n background: var(--_toolbar-background-hover);\n}\n.MLK__toolbar > div > div.disabled svg,\n.MLK__toolbar > div > div.disabled:hover svg,\n.MLK__toolbar > div > div.disabled.is-pressed svg {\n color: var(--_toolbar-text);\n opacity: 0.2;\n}\n.MLK__toolbar > div > div:hover,\n.MLK__toolbar > div > div:active,\n.MLK__toolbar > div > div.is-pressed,\n.MLK__toolbar > div > div.is-active {\n color: var(--_toolbar-text-active);\n}\n.MLK__toolbar > div > div.selected {\n color: var(--_toolbar-text-active);\n background: var(--_toolbar-background-selected);\n border-radius: 0;\n border-bottom-color: var(--_toolbar-text-active);\n padding-bottom: 4px;\n margin-bottom: 8px;\n}\n/* This is the element that displays variants on press+hold */\n.MLK__variant-panel {\n visibility: hidden;\n position: fixed;\n display: flex;\n flex-flow: row wrap-reverse;\n justify-content: center;\n align-content: center;\n margin: 0;\n padding: 0;\n bottom: auto;\n top: 0;\n box-sizing: content-box;\n transform: none;\n z-index: calc(var(--_keyboard-zindex) + 1);\n touch-action: none;\n max-width: 350px;\n background: var(--_variant-panel-background);\n text-align: center;\n border-radius: 6px;\n padding: 6px;\n box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);\n transition: none;\n}\n.MLK__variant-panel.is-visible {\n visibility: visible;\n}\n.MLK__variant-panel.compact {\n --_variant-keycap-length: var(--variant-keycap-length, 50px);\n --_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);\n --_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 10px);\n}\n.MLK__variant-panel .item {\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n font-size: var(--_variant-keycap-font-size);\n height: var(--_variant-keycap-length);\n width: var(--_variant-keycap-length);\n margin: 0;\n box-sizing: border-box;\n border-radius: 5px;\n border: 1px solid transparent;\n background: transparent;\n pointer-events: all;\n cursor: pointer;\n color: var(--_variant-keycap-text);\n fill: currentColor;\n}\n@media (max-height: 412px) {\n .MLK__variant-panel .item {\n --_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);\n --_variant-keycap-length: var(--variant-keycap-length, 50px);\n }\n}\n.MLK__variant-panel .item .ML__latex {\n pointer-events: none;\n}\n.MLK__variant-panel .item:hover {\n color: var(--_keycap-text-hover);\n}\n.MLK__variant-panel .item.is-active {\n background: var(--_variant-keycap-background-active);\n color: var(--_variant-keycap-text-active);\n --_box-placeholder-color: var(--_box-placeholder-pressed-color);\n}\n.MLK__variant-panel .item.is-pressed {\n background: var(--_variant-keycap-background-pressed);\n color: var(--_variant-keycap-text-pressed);\n --_box-placeholder-color: var(--_box-placeholder-pressed-color);\n}\n.MLK__variant-panel .item.small {\n font-size: var(--_keycap-small-font-size);\n}\n.MLK__variant-panel .item.swatch-button {\n box-sizing: border-box;\n background: #fbfbfb;\n}\n.MLK__variant-panel .item.swatch-button > span {\n display: inline-block;\n margin: 6px;\n width: calc(100% - 12px);\n height: calc(100% - 12px);\n border-radius: 50%;\n}\n.MLK__variant-panel .item.swatch-button:hover {\n background: #f0f0f0;\n}\n.MLK__variant-panel .item.swatch-button:hover > span {\n border-radius: 2px;\n}\n.MLK__variant-panel .item.box > div,\n.MLK__variant-panel .item.box > span {\n border: 1px dashed rgba(0, 0, 0, 0.24);\n}\n.MLK__variant-panel .item .warning {\n min-height: 60px;\n min-width: 60px;\n background: #cd0030;\n color: white;\n padding: 5px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 5px;\n}\n.MLK__variant-panel .item .warning.is-pressed,\n.MLK__variant-panel .item .warning.is-active {\n background: red;\n}\n.MLK__variant-panel .item .warning svg.svg-glyph {\n width: var(--_keycap-glyph-size-xl);\n height: var(--_keycap-glyph-size-xl);\n}\n.MLK__variant-panel .item aside {\n font-size: var(--_variant-keycap-aside-font-size);\n line-height: 12px;\n opacity: 0.78;\n padding-top: 2px;\n width: 100%;\n text-align: center;\n text-wrap: wrap;\n}\n.MLK__keycap {\n position: relative;\n}\n.MLK__shift {\n display: block;\n position: absolute;\n right: 4px;\n top: 4px;\n font-size: var(--_keycap-shift-font-size);\n color: var(--_keycap-shift-color);\n}\n.hide-shift .MLK__shift {\n display: none;\n}\n@media (max-width: 414px) {\n .MLK__variant-panel {\n max-width: 350px;\n --_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);\n --_variant-keycap-length: var(--variant-keycap-length, 50px);\n }\n}\n/* @xs breakpoint: iPhone 5 */\n@container (max-width: 414px) {\n .MLK__rows {\n --_keycap-gap: max(var(--_keycap-gap, 2px), 2px);\n --_keycap-height: var(--keycap-height, 42px);\n --_keycap-width: var(--keycap-width, min(min(var(--_keycap-max-width)), 10cqw), 62px));\n }\n .MLK__toolbar > div > div {\n font-size: 100%;\n margin-left: 2px;\n margin-right: 2px;\n }\n .MLK__rows .shift,\n .MLK__rows .action {\n font-size: 65%;\n }\n .MLK__rows .warning svg.svg-glyph {\n width: 14px;\n height: 14px;\n min-height: 14px;\n }\n}\n@container (max-width: 744px) {\n .MLK__rows {\n --_keycap-gap: max(var(--keycap-gap, 2px), 2px);\n --_keycap-height: var(--keycap-height, 52px);\n --_keycap-width: var(--keycap-width, min(min(var(--_keycap-max-width), 10cqw), 62px));\n }\n .MLK__toolbar > div > div {\n padding-left: 0;\n padding-right: 0;\n }\n .MLK__tooltip::after {\n padding: 8px 16px;\n font-size: 16px;\n }\n .MLK__rows > .MLK__row > div.fnbutton {\n font-size: 16px;\n }\n .MLK__rows > .MLK__row > div.bigfnbutton {\n font-size: calc(var(--_keycap-extra-small-font-size) / 1.55);\n }\n .MLK__rows > .MLK__row > div.small {\n font-size: 13px;\n }\n .MLK__rows > .MLK__row > div > aside {\n display: none;\n }\n .MLK__shift {\n display: none;\n }\n}\n/* Medium breakpoint: larger phones */\n@container (max-width: 768px) {\n .MLK__rows {\n --_keycap-height: var(--keycap-height, 42px);\n }\n .MLK__rows > .MLK__row > div > small {\n font-size: 14px;\n }\n}\n@media (max-height: 768px) {\n .MLK__rows {\n --_keycap-height: var(--keycap-height, 42px);\n }\n .MLK__rows > .MLK__row > div > small {\n font-size: 14px;\n }\n}\n@container (max-width: 1444px) {\n .MLK__rows .if-wide {\n display: none;\n }\n}\n@media (prefers-color-scheme: dark) {\n .ML__keyboard {\n --_accent-color: var(--keyboard-accent-color, #0b5c9c);\n --_background: var(--keyboard-background, #151515);\n --_border: var(--keyboard-border, transparent);\n --_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);\n --_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);\n --keyboard-toolbar-background-hover: #303030;\n --_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);\n --_keycap-background: var(--keycap-background, #1f2022);\n --_keycap-background-hover: var(--keycap-background-hover, #2f3032);\n --_keycap-border: var(--_keycap-border, transparent);\n --_keycap-border-bottom: var(--_keycap-border-bottom, transparent);\n --_keycap-text: var(--keycap-text, #e3e4e8);\n --_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);\n --_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);\n --_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);\n --keycap-secondary-border: transparent;\n --keycap-secondary-border-bottom: transparent;\n --_keycap-secondary-border: var(--keycap-secondary-border, transparent);\n --_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);\n --_variant-panel-background: var(--variant-panel-background, #303030);\n --_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);\n }\n}\n/* Same as the media query, but with a class */\n[theme='dark'] .ML__keyboard {\n --_accent-color: var(--keyboard-accent-color, #0b5c9c);\n --_background: var(--keyboard-background, #151515);\n --_border: var(--keyboard-border, transparent);\n --_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);\n --_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);\n --keyboard-toolbar-background-hover: #303030;\n --_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);\n --_keycap-background: var(--keycap-background, #1f2022);\n --_keycap-background-hover: var(--keycap-background-hover, #2f3032);\n --_keycap-border: var(--_keycap-border, transparent);\n --_keycap-border-bottom: var(--_keycap-border-bottom, transparent);\n --_keycap-text: var(--keycap-text, #e3e4e8);\n --_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);\n --_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);\n --_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);\n --keycap-secondary-border: transparent;\n --keycap-secondary-border-bottom: transparent;\n --_keycap-secondary-border: var(--keycap-secondary-border, transparent);\n --_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);\n --_variant-panel-background: var(--variant-panel-background, #303030);\n --_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);\n}\n[theme='light'] .ML__keyboard {\n --_accent-color: var(--keyboard-accent-color, #0c75d8);\n --_background: var(--keyboard-background, #cacfd7);\n --_border: var(--keyboard-border, #ddd);\n --_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);\n --_toolbar-background: var(--keyboard-toolbar-background, transparent);\n --_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);\n --_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);\n --_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);\n --_keycap-background: var(--keycap-background, white);\n --_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);\n --_keycap-background-active: var(--keycap-background-active, var(--_accent-color));\n --_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));\n --_keycap-border: var(--_keycap-border, #e5e6e9);\n --_keycap-border-bottom: var(--_keycap-border-bottom, #8d8f92);\n --_keycap-text: var(--keycap-text, #000);\n --_keycap-text-active: var(--keycap-text-active, #fff);\n --_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));\n --_keycap-text-pressed: var(--keycap-text-pressed, #fff);\n --_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));\n --_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);\n --_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);\n --_keycap-secondary-text: var(--keycap-secondary-text, #060707);\n --_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);\n --_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);\n --_variant-panel-background: var(--variant-panel-background, #f0f0f0);\n --_variant-keycap-text: var(--variant-keycap-textvar, var(--_keycap-text));\n --_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));\n --_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));\n}\n",Zc=":host {\n --primary-color: #5898ff;\n --primary-color-dimmed: #c0c0f0;\n --primary-color-dark: var(--blue-500);\n --primary-color-light: var(--blue-100);\n --primary-color-reverse: #ffffff;\n --secondary-color: #ff8a65;\n --secondary-color-dimmed: #f0d5c5;\n --secondary-color-dark: var(--orange-500);\n --secondary-color-light: var(--orange-100);\n --secondary-color-reverse: #ffffff;\n --link-color: #5898ff;\n --link-color-dimmed: #c5c5c5;\n --link-color-dark: #121212;\n --link-color-light: #e2e2e2;\n --link-color-reverse: #ffffff;\n --semantic-blue: var(--blue-700);\n --semantic-red: var(--red-400);\n --semantic-orange: var(--orange-400);\n --semantic-green: var(--green-700);\n --neutral-100: #f5f5f5;\n --neutral-200: #eeeeee;\n --neutral-300: #e0e0e0;\n --neutral-400: #bdbdbd;\n --neutral-500: #9e9e9e;\n --neutral-600: #757575;\n --neutral-700: #616161;\n --neutral-800: #424242;\n --neutral-900: #212121;\n --red-25: #fff8f7;\n --red-50: #fff1ef;\n --red-100: #ffeae6;\n --red-200: #ffcac1;\n --red-300: #ffa495;\n --red-400: #ff7865;\n --red-500: #f21c0d;\n --red-600: #e50018;\n --red-700: #d30024;\n --red-800: #bd002c;\n --red-900: #a1002f;\n --orange-25: #fffbf8;\n --orange-50: #fff7f1;\n --orange-100: #fff3ea;\n --orange-200: #ffe1c9;\n --orange-300: #ffcca2;\n --orange-400: #ffb677;\n --orange-500: #fe9310;\n --orange-600: #f58700;\n --orange-700: #ea7c00;\n --orange-800: #dc6d00;\n --orange-900: #ca5b00;\n --brown-25: #fff8ef;\n --brown-50: #fff1df;\n --brown-100: #ffe9ce;\n --brown-200: #ebcca6;\n --brown-300: #cdaf8a;\n --brown-400: #af936f;\n --brown-500: #856a47;\n --brown-600: #7f5e34;\n --brown-700: #78511f;\n --brown-800: #6e4200;\n --brown-900: #593200;\n --yellow-25: #fffdf9;\n --yellow-50: #fffcf2;\n --yellow-100: #fffaec;\n --yellow-200: #fff2ce;\n --yellow-300: #ffe8ab;\n --yellow-400: #ffdf85;\n --yellow-500: #ffcf33;\n --yellow-600: #f1c000;\n --yellow-700: #dfb200;\n --yellow-800: #c9a000;\n --yellow-900: #ad8a00;\n --lime-25: #f4ffee;\n --lime-50: #e9ffdd;\n --lime-100: #ddffca;\n --lime-200: #a8fb6f;\n --lime-300: #94e659;\n --lime-400: #80d142;\n --lime-500: #63b215;\n --lime-600: #45a000;\n --lime-700: #268e00;\n --lime-800: #007417;\n --lime-900: #005321;\n --green-25: #f5fff5;\n --green-50: #ebffea;\n --green-100: #e0ffdf;\n --green-200: #a7ffa7;\n --green-300: #5afa65;\n --green-400: #45e953;\n --green-500: #17cf36;\n --green-600: #00b944;\n --green-700: #00a34a;\n --green-800: #008749;\n --green-900: #00653e;\n --teal-25: #f3ffff;\n --teal-50: #e6fffe;\n --teal-100: #d9fffe;\n --teal-200: #8dfffe;\n --teal-300: #57f4f4;\n --teal-400: #43e5e5;\n --teal-500: #17cfcf;\n --teal-600: #00c2c0;\n --teal-700: #00b5b1;\n --teal-800: #00a49e;\n --teal-900: #009087;\n --cyan-25: #f7fcff;\n --cyan-50: #eff8ff;\n --cyan-100: #e7f5ff;\n --cyan-200: #c2e6ff;\n --cyan-300: #95d5ff;\n --cyan-400: #61c4ff;\n --cyan-500: #13a7ec;\n --cyan-600: #069eda;\n --cyan-700: #0095c9;\n --cyan-800: #0088b2;\n --cyan-900: #0a7897;\n --blue-25: #f7faff;\n --blue-50: #eef5ff;\n --blue-100: #e5f1ff;\n --blue-200: #bfdbff;\n --blue-300: #92c2ff;\n --blue-400: #63a8ff;\n --blue-500: #0d80f2;\n --blue-600: #0077db;\n --blue-700: #006dc4;\n --blue-800: #0060a7;\n --blue-900: #005086;\n --indigo-25: #f8f7ff;\n --indigo-50: #f1efff;\n --indigo-100: #eae7ff;\n --indigo-200: #ccc3ff;\n --indigo-300: #ac99ff;\n --indigo-400: #916aff;\n --indigo-500: #63c;\n --indigo-600: #5a21b2;\n --indigo-700: #4e0b99;\n --indigo-800: #3b0071;\n --indigo-900: #220040;\n --purple-25: #fbf7ff;\n --purple-50: #f8f0ff;\n --purple-100: #f4e8ff;\n --purple-200: #e4c4ff;\n --purple-300: #d49aff;\n --purple-400: #c36aff;\n --purple-500: #a219e6;\n --purple-600: #9000c4;\n --purple-700: #7c009f;\n --purple-800: #600073;\n --purple-900: #3d0043;\n --magenta-25: #fff8fb;\n --magenta-50: #fff2f6;\n --magenta-100: #ffebf2;\n --magenta-200: #ffcddf;\n --magenta-300: #ffa8cb;\n --magenta-400: #ff7fb7;\n --magenta-500: #eb4799;\n --magenta-600: #da3689;\n --magenta-700: #c82179;\n --magenta-800: #b00065;\n --magenta-900: #8a004c;\n}\n@media (prefers-color-scheme: dark) {\n :host {\n --semantic-blue: var(--blue-700);\n --semantic-red: var(--red-400);\n --semantic-orange: var(--orange-400);\n --semantic-green: var(--green-700);\n --semantic-bg-blue: var(--blue-25);\n --semantic-bg-red: var(--red-25);\n --semantic-bg-orange: var(--orange-25);\n --semantic-bg-green: var(--green-25);\n --neutral-100: #121212;\n --neutral-200: #424242;\n --neutral-300: #616161;\n --neutral-400: #757575;\n --neutral-500: #9e9e9e;\n --neutral-600: #bdbdbd;\n --neutral-700: #e0e0e0;\n --neutral-800: #eeeeee;\n --neutral-900: #f5f5f5;\n }\n}\n:host([theme='dark']) {\n --semantic-blue: var(--blue-700);\n --semantic-red: var(--red-400);\n --semantic-orange: var(--orange-400);\n --semantic-green: var(--green-700);\n --semantic-bg-blue: var(--blue-25);\n --semantic-bg-red: var(--red-25);\n --semantic-bg-orange: var(--orange-25);\n --semantic-bg-green: var(--green-25);\n --neutral-100: #121212;\n --neutral-200: #424242;\n --neutral-300: #616161;\n --neutral-400: #757575;\n --neutral-500: #9e9e9e;\n --neutral-600: #bdbdbd;\n --neutral-700: #e0e0e0;\n --neutral-800: #eeeeee;\n --neutral-900: #f5f5f5;\n}\n/* @media (prefers-color-scheme: dark) {\n :host {\n --label-color: #fff;\n --active-label-color: #000;\n --menu-bg: #525252;\n --active-bg: #5898ff;\n --active-bg-dimmed: #5c5c5c;\n }\n} */\n:host {\n --ui-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n --ui-font-size: 14px;\n --ui-line-height: 1.5;\n --ui-letter-spacing: 0.007em;\n --mono-font-family: 'Berkeley Mono', 'JetBrains Mono', 'IBM Plex Mono', 'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;\n --ui-layer-1: var(--neutral-100);\n --ui-layer-2: var(--neutral-200);\n --ui-layer-3: var(--neutral-300);\n --ui-layer-4: var(--neutral-400);\n --ui-layer-5: var(--neutral-500);\n --ui-layer-6: var(--neutral-600);\n --ui-border-color: var(--primary-color);\n --ui-border-radius: 4px;\n --ui-text: var(--neutral-900);\n --ui-text-secondary: var(--neutral-700);\n --ui-text-placeholder: var(--neutral-500);\n --ui-text-muted: var(--neutral-300);\n /** A field is a UI element in which a user can type data, for\n * example an input or textarea element.\n */\n --ui-field-bg: var(--neutral-100);\n --ui-field-bg-hover: var(--neutral-100);\n --ui-field-bg-disabled: var(--neutral-300);\n --ui-field-bg-invalid: var(--red-100);\n --ui-field-bg-focus: var(--neutral-100);\n --ui-field-border: 0.5px solid var(--border-color);\n --ui-field-border-hover: 0.5px solid var(--border-color);\n --ui-field-border-disabled: 0.5px solid var(--border-color);\n --ui-field-border-invalid: 0.5px solid var(--border-color);\n --ui-field-border-focus: 0.5px solid var(--border-color);\n --ui-menu-bg: var(--neutral-100);\n --ui-menu-text: var(--neutral-900);\n --ui-menu-bg-hover: var(--neutral-200);\n --ui-menu-text-hover: var(--neutral-900);\n /** The `active` state is used for the state of menu items\n * when they are selected.\n */\n --ui-menu-bg-active: var(--primary-color);\n --ui-menu-text-active: var(--primary-color-reverse);\n /** The `active-muted` set is used for the state of\n * submenus when they are open.\n */\n --ui-menu-bg-active-muted: var(--neutral-300);\n --ui-menu-text-active-muted: var(--neutral-900);\n /* --ui-menu-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302),\n0 2px 6px 2px rgba(60, 64, 67, 0.149); */\n --ui-menu-shadow: 0 0 2px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2);\n --ui-menu-divider: 0.5px solid #c7c7c7;\n /* var(--neutral-300); */\n --ui-menu-z-index: 10000;\n --page-bg: var(--neutral-100);\n --content-bg: var(--neutral-200);\n}\n@media (prefers-color-scheme: dark) {\n :host {\n --ui-menu-bg: var(--neutral-200);\n }\n}\n:host([theme='dark']) {\n --ui-menu-bg: var(--neutral-200);\n}\n/* PingFang SC is a macOS font. Microsoft Yahei is a Windows font. \n Noto is a Linux/Android font.\n*/\n:lang(zh-cn),\n:lang(zh-sg),\n:lang(zh-my),\n:lang(zh) {\n --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', '\u5FAE\u8F6F\u96C5\u9ED1', SimSun, '\u5B8B\u4F53', STXihei, '\u534E\u6587\u7EC6\u9ED1', sans-serif;\n}\n:lang(zh-tw),\n:lang(zh-hk),\n:lang(zh-mo) {\n --ui-font-family: -apple-system, system-ui, 'Noto Sans', 'Microsoft JhengHei UI', 'Microsoft JhengHei', '\u5FAE\u8EDF\u6B63\u9ED1\u9AD4', '\u65B0\u7D30\u660E\u9AD4', 'PMingLiU', '\u7D30\u660E\u9AD4', 'MingLiU', sans-serif;\n}\n:lang(ja),\n:lang(ja-jp),\n:lang(ja-jp-mac) {\n --ui-font-family: -apple-system, system-ui, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Noto Sans JP', 'Noto Sans', '\u6E38\u30B4\u30B7\u30C3\u30AF', '\u6E38\u30B4\u30B7\u30C3\u30AF\u4F53', YuGothic, 'Yu Gothic', '\u30E1\u30A4\u30EA\u30AA', Meiryo, '\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF', 'MS PGothic', sans-serif;\n}\n:lang(ko),\n:lang(ko-kr),\n:lang(ko-kr-std) {\n --ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR', 'Noto Sans', 'Malgun Gothic', '\uB9D1\uC740 \uACE0\uB515', 'Apple SD Gothic Neo', '\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo', 'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;\n}\n:lang(ko-kr-apple) {\n --ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR', 'Noto Sans', 'Apple SD Gothic Neo', '\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo', 'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;\n}\n:lang(zh-cn),\n:lang(zh-sg),\n:lang(zh-my),\n:lang(zh),\n:lang(zh-tw),\n:lang(zh-hk),\n:lang(zh-mo),\n:lang(ja),\n:lang(ja-jp),\n:lang(ja-jp-mac),\n:lang(ko),\n:lang(ko-kr),\n:lang(ko-kr-std),\n:lang(ko-kr-apple) {\n --ui-font-size: 1rem;\n --ui-line-height: 1.7;\n --ui-letter-spacing: 0;\n}\n:dir(rtl) {\n --ui-line-height: auto;\n --ui-letter-spacing: 0;\n}\n",Qc=".ui-menu *,\n.ui-menu ::before,\n.ui-menu ::after {\n box-sizing: border-box;\n}\n.ui-menu {\n display: none;\n color-scheme: light dark;\n -webkit-user-select: none;\n /* Important: Safari iOS doesn't respect user-select */\n user-select: none;\n cursor: default;\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0 0 0 0);\n --active-label-color: #fff;\n /* ui-menu-text-active */\n --label-color: #121212;\n /* ui-menu-text */\n --menu-bg: #e2e2e2;\n /* ui-menu-background */\n --active-bg: #5898ff;\n /* ui-menu-background-active */\n --active-bg-dimmed: #c5c5c5;\n /* ui-menu-background-active-muted */\n}\n/** Use the :where pseudo selector to make the specificity of the\n * selector 0, so that it can be overridden by the user.\n */\n:where(.ui-menu-container) {\n position: absolute;\n overflow: visible;\n width: auto;\n height: auto;\n z-index: 10000;\n border-radius: 8px;\n background: var(--ui-menu-bg);\n box-shadow: var(--ui-menu-shadow);\n list-style: none;\n padding: 6px 0 6px 0;\n margin: 0;\n user-select: none;\n cursor: default;\n color: var(--ui-menu-text);\n font-weight: normal;\n font-style: normal;\n text-shadow: none;\n text-transform: none;\n letter-spacing: 0;\n outline: none;\n opacity: 1;\n /* The [popover] elements have a 1px solid black border. Ugh. */\n border: none;\n width: fit-content;\n height: fit-content;\n}\n:where(.ui-menu-container > li) {\n display: flex;\n flex-flow: row;\n align-items: center;\n padding: 1px 7px 1px 7px;\n margin-top: 0;\n margin-left: 6px;\n margin-right: 6px;\n border-radius: 4px;\n white-space: nowrap;\n position: relative;\n outline: none;\n fill: currentColor;\n user-select: none;\n cursor: default;\n text-align: left;\n color: inherit;\n font-family: var(--ui-font-family);\n font-size: var(--ui-font-size);\n line-height: var(--ui-line-height);\n letter-spacing: var(--ui-letter-spacing);\n}\n:where(.ui-menu-container > li > .label) {\n display: flex;\n align-items: center;\n justify-content: space-between;\n appearance: none;\n background: none;\n outline: none;\n width: 100%;\n margin: 0;\n padding: 1px 2px 1px 1px;\n overflow: visible;\n border: 1px solid transparent;\n white-space: nowrap;\n text-align: start;\n align-content: center;\n}\n:where(.ui-menu-container > li:has(.heading)) {\n margin-top: 0.5em;\n}\n:where(.ui-menu-container > li > .label.heading) {\n font-weight: bold;\n opacity: 0.4;\n}\n:where(.ui-menu-container > li.indent > .label) {\n margin-inline-start: 12px;\n}\n:where(.ui-menu-container > li > .label.indent) {\n margin-inline-start: 12px;\n}\n:where(.ui-menu-container > li[role='divider']) {\n border-bottom: 1px solid var(--ui-menu-divider);\n border-radius: 0;\n padding: 0;\n margin-left: 15px;\n margin-right: 15px;\n padding-top: 5px;\n margin-bottom: 5px;\n width: calc(100% - 30px);\n /** 100% - (margin-left + margin-right) */\n}\n:where(.ui-menu-container > li[aria-disabled='true']) {\n opacity: 0.5;\n}\n:where(.ui-menu-container > li.active) {\n background: var(--ui-menu-bg-active);\n background: -apple-system-control-accent;\n color: var(--ui-menu-text-active);\n}\n:where(.ui-menu-container > li.active.is-submenu-open) {\n background: var(--ui-menu-bg-active-muted);\n color: inherit;\n}\n:where(.ui-menu-container > li[aria-haspopup='true'] > .label) {\n padding-inline-end: 0;\n}\n:where(.ui-menu-container > li[aria-haspopup='true'].active::after) {\n color: var(--ui-menu-text-active);\n}\n/** Keyboard shortcut */\n:where(.ui-menu-container > li > kbd) {\n font-family: var(--ui-font-family);\n margin-inline-start: 12px;\n opacity: 0.4;\n}\n:where(.ui-menu-container > li.active > kbd) {\n opacity: 0.85;\n}\n.ui-trailing-chevron {\n display: flex;\n margin-inline-start: 24px;\n width: 10px;\n height: 10px;\n margin-bottom: 4px;\n}\n.ui-trailing-chevron:dir(rtl) {\n transform: scaleX(-1);\n}\n.ui-checkmark {\n display: flex;\n margin-inline-end: -11px;\n margin-inline-start: -4px;\n margin-top: 2px;\n width: 16px;\n height: 16px;\n}\n.ui-mixedmark {\n display: flex;\n margin-inline-end: -11px;\n margin-inline-start: -4px;\n margin-top: 2px;\n width: 16px;\n height: 16px;\n}\n",$c;function el(e){var t="";switch(e){case"mathfield-element":t="\n :host { display: inline-block; background-color: field; color: fieldtext; border-width: 1px; border-style: solid; border-color: #acacac; border-radius: 2px;}\n :host([hidden]) { display: none; }\n :host([disabled]), :host([disabled]:focus), :host([disabled]:focus-within) { outline: none; opacity: .5; }\n :host(:focus), :host(:focus-within) {\n outline: Highlight auto 1px; /* For Firefox */\n outline: -webkit-focus-ring-color auto 1px;\n }\n :host([readonly]:focus), :host([readonly]:focus-within),\n :host([read-only]:focus), :host([read-only]:focus-within) {\n outline: none;\n }";break;case"core":t=Kc;break;case"mathfield":t=Gc;break;case"environment-popover":t=qc;break;case"suggestion-popover":t=Jc;break;case"keystroke-caption":t=Yc;break;case"virtual-keyboard":t=Xc;break;case"ui":t=Zc;break;case"menu":t=Qc;break;default:}return t;}function tl(e){return $c||($c={}),$c[e]||($c[e]=new CSSStyleSheet(),$c[e].replaceSync(el(e))),$c[e];}var nl;function rl(e){var t;try{if(!("adoptedStyleSheets"in document)){if(window.document.getElementById("mathlive-style-".concat(e)))return;var _t51=window.document.createElement("style");_t51.id="mathlive-style-".concat(e),_t51.append(window.document.createTextNode(el(e))),window.document.head.appendChild(_t51);return;}if(nl||(nl={}),((t=nl[e])==null?0:t)!==0)nl[e]+=1;else{var _t52=tl(e);document.adoptedStyleSheets=[].concat(_toConsumableArray(document.adoptedStyleSheets),[_t52]),nl[e]=1;}}catch(t){console.error("Error injecting stylesheet",e,t);}}function il(e){if("adoptedStyleSheets"in document&&nl!=null&&nl[e]&&(--nl[e],nl[e]<=0)){var _t53=$c[e];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(function(e){return e!==_t53;});}}var al=function(_L2){function e(_e166){var _this5;_classCallCheck(this,e);var t;_this5=_callSuper(this,e,[l(c({},_e166),{type:"accent",body:(t=_e166.body)==null?void 0:t})]),_e166.accentChar?_this5.accent=_e166.accentChar:_this5.svgAccent=_e166==null?void 0:_e166.svgAccent,_this5.skipBoundary=!0,_this5.captureSelection=!0;return _this5;}_inherits(e,_L2);return _createClass(e,[{key:"toJson",value:function toJson(){return l(c({},_superPropGet(e,"toJson",this,3)([])),{accentChar:this.accent,svgAccent:this.svgAccent});}},{key:"render",value:function render(_e167){var t;var n=new I({parent:_e167,mathstyle:"cramp"},this.style),r=(t=L.createBox(n,this.body))==null?new F("\u25A1",{style:this.style}):t,i=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(i=r.skew);var a=Math.min(r.height,Bo),o;if(this.svgAccent)o=ws(this.svgAccent),a=n.metrics.bigOpSpacing1-a;else if(this.accent){var _e168=new F(this.accent,{fontFamily:"Main-Regular"});_e168.italic=0,o=new F(_e168,{classes:"ML__accent-body"+(this.accent===8407||this.accent===8411||this.accent===8412?" ML__accent-combining-char":"")});}var s=(r.width-o.width)/2+r.left+2*i;o=new js({shift:0,children:[{box:new F(r)},-a,{box:o,marginLeft:s,classes:["ML__center"]}]});var c=new F(o,{type:"ord"});return this.caret&&(c.caret=this.caret),this.bind(n,c.wrap(n)),this.attachSupsub(n,{base:c});}}],[{key:"fromJson",value:function fromJson(t){return new e(t);}}]);}(L),ol={"(":")","{":"}","[":"]","|":"|","\\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"},sl=Object.fromEntries(Object.entries(ol).map(function(_ref4){var _ref5=_slicedToArray(_ref4,2),e=_ref5[0],t=_ref5[1];return[t,e];}));function cl(e){var t;return(t={"[":91,"]":93,"(":40,")":41,"\\mid":8739,"|":8739,"\u2223":8739,"\u2225":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?e.codePointAt(0):t;}function ll(e,t,n,r){var i;var a=new F(cl(e),{fontFamily:"Main-Regular",isSelected:r.isSelected,classes:"ML__small-delim "+((i=r.classes)==null?"":i)}).wrap(t);return n&&a.setTop((1-t.scalingFactor)*Ro),a;}function ul(e,t,n,r,i){var a,o;var s=new I({parent:r,mathstyle:"textstyle"},i==null?void 0:i.style),c=new F(cl(e),{fontFamily:"Size".concat(t,"-Regular"),isSelected:i.isSelected,classes:((a=i.classes)==null?"":a)+" ML__delim-size".concat(t),type:(o=i.type)==null?"ignore":o}).wrap(s);return n&&c.setTop((1-s.scalingFactor)*Ro),c;}function dl(e,t,n,r,i){var a;var o,s,u,d;o=u=d=cl(e),s=null;var f="Size1-Regular";e==="\\vert"||e==="\\lvert"||e==="\\rvert"||e==="\\mvert"||e==="\\mid"?u=o=d=8739:e==="\\Vert"||e==="\\lVert"||e==="\\rVert"||e==="\\mVert"||e==="\\|"?u=o=d=8741:e==="\\uparrow"?u=d=9168:e==="\\Uparrow"?u=d=8214:e==="\\downarrow"?o=u=9168:e==="\\Downarrow"?o=u=8214:e==="\\updownarrow"?(o=8593,u=9168,d=8595):e==="\\Updownarrow"?(o=8657,u=8214,d=8659):e==="["||e==="\\lbrack"?(o=9121,u=9122,d=9123,f="Size4-Regular"):e==="]"||e==="\\rbrack"?(o=9124,u=9125,d=9126,f="Size4-Regular"):e==="\\lfloor"||e==="\u230A"?(u=o=9122,d=9123,f="Size4-Regular"):e==="\\lceil"||e==="\u2308"?(o=9121,u=d=9122,f="Size4-Regular"):e==="\\rfloor"||e==="\u230B"?(u=o=9125,d=9126,f="Size4-Regular"):e==="\\rceil"||e==="\u2309"?(o=9124,u=d=9125,f="Size4-Regular"):e==="("||e==="\\lparen"?(o=9115,u=9116,d=9117,f="Size4-Regular"):e===")"||e==="\\rparen"?(o=9118,u=9119,d=9120,f="Size4-Regular"):e==="\\{"||e==="\\lbrace"?(o=9127,s=9128,d=9129,u=9130,f="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o=9131,s=9132,d=9133,u=9130,f="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(o=9127,d=9129,u=9130,f="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(o=9131,d=9133,u=9130,f="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(o=9127,d=9133,u=9130,f="Size4-Regular"):e==="\\rmoustache"||e==="\u23B1"?(o=9131,d=9129,u=9130,f="Size4-Regular"):e==="\\surd"?(o=57345,d=9143,u=57344,f="Size4-Regular"):e==="\\ulcorner"?(o=9484,u=d=32):e==="\\urcorner"?(o=9488,u=d=32):e==="\\llcorner"?(d=9492,u=o=32):e==="\\lrcorner"&&(o=9496,u=o=32);var p=Go(o,f),m=p.height+p.depth,h=Go(u,f),g=h.height+h.depth,_=Go(d,f),v=_.height+_.depth,y=0,b=1;if(s!==null){var _e169=Go(s,f);y=_e169.height+_e169.depth,b=2;}var x=m+v+y,S=Math.max(0,Math.ceil((t-x)/(b*g))),ee=x+S*b*g,C=Ro;n&&(C*=r.scalingFactor);var w=ee/2-C,te=.008,T=[];T.push({box:new F(d,{fontFamily:f})}),T.push(-te);var ne=new F(u,{fontFamily:f});if(s===null)for(var _e170=0;_e170<S;_e170++)T.push({box:ne});else{for(var _e171=0;_e171<S;_e171++)T.push({box:ne});T.push(-te),T.push({box:new F(s,{fontFamily:f})}),T.push(-te);for(var _e172=0;_e172<S;_e172++)T.push({box:ne});}T.push(-te),T.push({box:new F(o,{fontFamily:f})});var re="";return f==="Size1-Regular"?re=" delim-size1":f==="Size4-Regular"&&(re=" delim-size4"),new F(new js({bottom:w,children:T},{classes:re}),l(c({},i==null?{}:i),{classes:((a=i==null?void 0:i.classes)==null?"":a)+" ML__delim-mult"}));}var fl=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),pl=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),ml=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),hl=[0,1.2,1.8,2.4,3];function gl(e,t,n,r){return e===void 0||e==="."?wl(n,r.classes):(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),fl.has(e)||ml.has(e)?ul(e,t,!1,n,r):pl.has(e)?dl(e,hl[t],!1,n,r):(""+e,null));}var _l=[{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}],vl=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],yl=[{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 bl(e){return e.type==="small"?"Main-Regular":e.type==="large"?"Size"+e.size+"-Regular":(e.type,"Size4-Regular");}function xl(e,t,n,r){var i={"-4":0,"-3":1,0:2}[r.mathstyle.sizeDelta];for(var _a11=i;_a11<n.length&&n[_a11].type!=="stack";_a11++){var _i32=Go(e,bl(n[_a11]));if(_i32.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};var _o1=_i32.height+_i32.depth;if(n[_a11].type==="small"&&(n[_a11].mathstyle==="scriptscriptstyle"?_o1*=Math.max(Ho[Math.max(1,r.size-2)],r.minFontScale):n[_a11].mathstyle==="scriptstyle"&&(_o1*=Math.max(Ho[Math.max(1,r.size-1)],r.minFontScale))),_o1>t)return n[_a11];}return n[n.length-1];}function Sl(e,t,n,r,i,a){if(!t||t.length===0||t===".")return wl(i);t==="<"||t==="\\lt"?t="\\langle":(t===">"||t==="\\gt")&&(t="\\rangle");var o;o=ml.has(t)?_l:fl.has(t)?yl:vl;var s=xl(cl(t),n,o,i),u=new I({parent:i,mathstyle:s.mathstyle},a==null?void 0:a.style);return s.type==="small"?ll(t,u,r,l(c({},a),{type:e})):s.type==="large"?ul(t,s.size,r,u,l(c({},a),{type:e})):(s.type,dl(t,n,r,u,l(c({},a),{type:e})));}function Cl(e,t,n,r,i,a){if(t===".")return wl(i,a==null?void 0:a.classes);var o=Ro*i.scalingFactor,s=5/Lo,c=Math.max(n-o,r+o);return Sl(e,t,Math.max(c/500*901,2*c-s),!0,i,a);}function wl(e,t){var n=new F(null,{classes:" ML__nulldelimiter "+(t==null?"":t),type:"ignore"});return n.width=e.getRegisterAsEm("nulldelimiterspace"),n.wrap(new I({parent:e,mathstyle:"textstyle"}));}var Tl=function(_L3){function e(_e173){var _this6;_classCallCheck(this,e);var t;_this6=_callSuper(this,e,[{type:"placeholder",command:"\\placeholder",mode:(t=_e173==null?void 0:_e173.mode)==null?"math":t,style:_e173==null?void 0:_e173.style}]),_this6.captureSelection=!0;return _this6;}_inherits(e,_L3);return _createClass(e,[{key:"toJson",value:function toJson(){return _superPropGet(e,"toJson",this,3)([]);}},{key:"render",value:function render(_e174){var t;return this.value=_e174.placeholderSymbol,t=_typeof(_e174.renderPlaceholder)=="function"?_e174.renderPlaceholder(_e174):this.createBox(_e174),this.caret&&(t.classes+=" ML__placeholder-selected"),t;}},{key:"_serialize",value:function _serialize(_e175){return _e175.skipPlaceholders?"":"\\placeholder{}";}}],[{key:"fromJson",value:function fromJson(t){return new e(t);}}]);}(L),El=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],Dl=["cases","dcases","rcases"],Ol=["align","align*","aligned","gather","gather*","gathered","split"],kl=["array","subequations","eqnarray"];function Al(e){return Ol.includes(e)||Dl.includes(e)||Dl.includes(e)||El.includes(e)||kl.includes(e);}function jl(e){return El.includes(e);}function Ml(e){return Dl.includes(e);}function Nl(e){return Ol.includes(e);}function Pl(e,t,n){var r=0;var _iterator44=_createForOfIteratorHelper(n.columns),_step44;try{for(_iterator44.s();!(_step44=_iterator44.n()).done;){var _e176=_step44.value;"align"in _e176&&(r+=1);}}catch(err){_iterator44.e(err);}finally{_iterator44.f();}r=Math.max(r,n.minColumns);var i=0,a=[];var _iterator45=_createForOfIteratorHelper(t),_step45;try{for(_iterator45.s();!(_step45=_iterator45.n()).done;){var _o11=_step45.value;i=Math.max(i,Math.min(_o11.length,r));var _t57=0;for(;_t57<_o11.length;){var _i35=[],_s6=Math.min(_o11.length,_t57+r);for(;_t57<_s6;)_i35.push(Ll(_o11[_t57],e.mode)),_t57+=1;if(_i35.length<n.minColumns)for(;_i35.length<n.minColumns;)_i35.push([new L({type:"first",mode:e.mode})]);a.push(_i35);}}}catch(err){_iterator45.e(err);}finally{_iterator45.f();}!e.isMultiline&&a.length>0&&a[a.length-1].length===1&&Rl(a[a.length-1][0])&&a.pop();var o=[];for(var _i33=0,_a12=a;_i33<_a12.length;_i33++){var _t54=_a12[_i33];if(_t54.length!==i)for(var _n42=_t54.length;_n42<i;_n42++)e.isMultiline?_t54.push([new L({type:"first",mode:e.mode})]):_t54.push([new L({type:"first",mode:e.mode}),new Tl()]);o.push(_t54);}var s=0,c=0;for(var _i34=0,_o10=o;_i34<_o10.length;_i34++){var _t55=_o10[_i34];c=0;var _iterator46=_createForOfIteratorHelper(_t55),_step46;try{for(_iterator46.s();!(_step46=_iterator46.n()).done;){var _n43=_step46.value;var _iterator47=_createForOfIteratorHelper(_n43),_step47;try{for(_iterator47.s();!(_step47=_iterator47.n()).done;){var _t56=_step47.value;_t56.parent=e,_t56.parentBranch=[s,c];}}catch(err){_iterator47.e(err);}finally{_iterator47.f();}c+=1;}}catch(err){_iterator46.e(err);}finally{_iterator46.f();}s+=1;}return e.isDirty=!0,o;}function Fl(e){return e.length>0&&e.every(function(e){return e.type==="first";});}function Il(e,t,n){var r=new F(null,{classes:"ML__empty-line-anchor"}),i=e[0];i&&(i.id||(i.id=t.makeID()),r.atomID=i.id),r.setStyle("display","inline-block"),r.setStyle("width",0),r.setStyle("position","relative"),r.setStyle("height",Math.max(0,n.height+n.depth),"em"),r.setStyle("vertical-align",-n.depth,"em"),r.height=n.height,r.depth=n.depth;var a=e.find(function(e){return e.caret;});return a!=null&&a.caret&&(r.caret=a.caret),e.some(function(e){return e.isSelected;})&&r.selected(!0),r;}function Ll(e,t){return e.length===0?[new L({type:"first",mode:t})]:e[0].type==="first"?(e.slice(1).some(function(e){return e.type==="first";}),e):[new L({type:"first",mode:t})].concat(_toConsumableArray(e));}function Rl(e){return e.length===1&&e[0].type==="first";}var z=function(_L4){function e(_e178,t,n){var _this7;var r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};_classCallCheck(this,e);var i,a,o,s;if(_this7=_callSuper(this,e,[{type:"array",isRoot:r.isRoot}]),_this7.environmentName=_e178,r.columns)r.columns.length===0?_this7.colFormat=[{align:"l"}]:_this7.colFormat=_toConsumableArray(r.columns);else if(r.minColumns){var _e179=[];for(var _t58=0;_t58<r.minColumns;_t58++)_e179.push({align:"l"});_this7.colFormat=_e179;}else _this7.colFormat=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}];_this7.minColumns=(i=r.minColumns)==null?1:i,_this7.minRows=(a=r.minRows)==null?1:a,_this7.maxRows=(o=r.maxRows)==null?1/0:o,_this7._rows=Pl(_this7,t,{columns:_this7.colFormat,minColumns:_this7.minColumns,minRows:_this7.minRows,maxRows:_this7.maxRows}),_this7.rowGaps=n,r.arraycolsep!==void 0&&(_this7.arraycolsep=r.arraycolsep),_this7.colSeparationType=r.colSeparationType,r.arraystretch!==void 0&&(_this7.arraystretch=r.arraystretch),r.mathstyleName&&(_this7.mathstyleName=r.mathstyleName),r.leftDelim&&(_this7.leftDelim=r.leftDelim),r.rightDelim&&(_this7.rightDelim=r.rightDelim),_this7.classes=(s=r.classes)==null?[]:s;return _this7;}_inherits(e,_L4);return _createClass(e,[{key:"isMultiline",get:function get(){var _e177=this.environmentName;return["lines","multline","multline*","align","split","gather","gathered"].includes(_e177);}},{key:"toJson",value:function toJson(){var _e180=l(c({},_superPropGet(e,"toJson",this,3)([])),{environmentName:this.environmentName,array:this._rows.map(function(_e181){return _e181.map(function(_e182){return _e182.map(function(_e183){return _e183.toJson();});});}),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType,minColumns:this.minColumns,minRows:this.minRows,maxRows:this.maxRows});return this.arraystretch!==void 0&&(_e180.arraystretch=this.arraystretch),this.arraycolsep!==void 0&&(_e180.arraycolsep=this.arraycolsep),this.leftDelim&&(_e180.leftDelim=this.leftDelim),this.rightDelim&&(_e180.rightDelim=this.rightDelim),this.isRoot&&(_e180.isRoot=!0),_e180.minColumns=this.minColumns,_e180.minRows=this.minRows,_e180.maxRows=this.maxRows,this.mathstyleName&&(_e180.mathstyleName=this.mathstyleName),this.classes.length>0&&(_e180.classes=this.classes),_e180;}},{key:"branch",value:function branch(_e184){var t;if(tc(_e184))return(t=this._rows[_e184[0]][_e184[1]])==null?void 0:t;}},{key:"createBranch",value:function createBranch(_e185){var t;return tc(_e185)?(this.isDirty=!0,(t=this.branch(_e185))==null?[]:t):[];}},{key:"rowCount",get:function get(){return this._rows.length;}},{key:"colCount",get:function get(){return this._rows[0].length;}},{key:"maxColumns",get:function get(){return this.colFormat.filter(function(_e186){return!!_e186.align;}).length;}},{key:"removeBranch",value:function removeBranch(_e187){if(ec(_e187))return _superPropGet(e,"removeBranch",this,3)([_e187]);var _this$branch=this.branch(_e187),_this$branch2=_toArray(_this$branch),t=_this$branch2[0],n=_arrayLikeToArray(_this$branch2).slice(1);return t.type,this._rows[_e187[0]][_e187[1]]=void 0,n.forEach(function(_e188){_e188.parent=void 0,_e188.parentBranch=void 0;}),this.isDirty=!0,n;}},{key:"hasChildren",get:function get(){return this.children.length>0;}},{key:"children",get:function get(){var _e189=[];var _iterator48=_createForOfIteratorHelper(this._rows),_step48;try{for(_iterator48.s();!(_step48=_iterator48.n()).done;){var _t59=_step48.value;var _iterator49=_createForOfIteratorHelper(_t59),_step49;try{for(_iterator49.s();!(_step49=_iterator49.n()).done;){var _n44=_step49.value;if(_n44){var _iterator50=_createForOfIteratorHelper(_n44),_step50;try{for(_iterator50.s();!(_step50=_iterator50.n()).done;){var _t60=_step50.value;_e189.push.apply(_e189,_toConsumableArray(_t60.children)),_e189.push(_t60);}}catch(err){_iterator50.e(err);}finally{_iterator50.f();}}}}catch(err){_iterator49.e(err);}finally{_iterator49.f();}}}catch(err){_iterator48.e(err);}finally{_iterator48.f();}return[].concat(_e189,_toConsumableArray(_superPropGet(e,"children",this,1)));}},{key:"render",value:function render(_e190){var t,n,r,i,a,o;var s=new I({parent:_e190,mathstyle:this.mathstyleName},this.style),c=s.getRegisterAsEm("arrayrulewidth"),l=s.getRegisterAsEm("arraycolsep"),u=s.getRegisterAsEm("doublerulesep"),d=(n=(t=this.arraystretch)==null?s.getRegisterAsNumber("arraystretch"):t)==null?1:n,f=_typeof(this.arraycolsep)=="number"?this.arraycolsep:l;this.colSeparationType==="small"&&(f=.2778*(new I({parent:_e190,mathstyle:"scriptstyle"}).scalingFactor/_e190.scalingFactor));var p=d*zo,m=.7*p,h=.3*p,g=0,_=[],v=0,y=this._rows.length;for(var _e213=0;_e213<y;++_e213){var _t61=this._rows[_e213];v=Math.max(v,_t61.length);var _n45=new I({parent:s,mathstyle:this.mathstyleName},this.style),_a13=m/_n45.scalingFactor,_o12=h/_n45.scalingFactor,_c5={cells:[],height:0,depth:0,pos:0};var _iterator51=_createForOfIteratorHelper(_t61),_step51;try{for(_iterator51.s();!(_step51=_iterator51.n()).done;){var _e192=_step51.value;var _t62=this.isMultiline&&_e192&&Fl(_e192)?Il(_e192,_n45,{height:m/_n45.scalingFactor,depth:h/_n45.scalingFactor}):(r=L.createBox(_n45,_e192,{type:"ignore"}))==null?new F(null,{type:"ignore"}):r;_o12=Math.max(_o12,_t62.depth),_a13=Math.max(_a13,_t62.height),_c5.cells.push(_t62);}}catch(err){_iterator51.e(err);}finally{_iterator51.f();}var _l4=(i=Gs(this.rowGaps[_e213]))==null?0:i;_l4>0&&(_l4+=h,_o12=Math.max(_o12,_l4),_l4=0),_e213<y-1&&!jl(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(_o12+=s.getRegisterAsEm("jot")),_c5.height=_a13,_c5.depth=_o12,g+=_a13,_c5.pos=g,g+=_o12+_l4,_.push(_c5);}var b=this.environmentName==="array"&&!this.isMultiline?_[0].height:g/2+Ro,x=[];for(var _e214=0;_e214<v;_e214++){var _t63=[];var _iterator52=_createForOfIteratorHelper(_),_step52;try{for(_iterator52.s();!(_step52=_iterator52.n()).done;){var _n46=_step52.value;var _r16=_n46.cells[_e214];_r16&&(_r16.depth=_n46.depth,_r16.height=_n46.height,_t63.push({box:_r16,shift:_n46.pos-b}));}}catch(err){_iterator52.e(err);}finally{_iterator52.f();}_t63.length>0&&x.push(new js({individualShift:_t63}));}var S=[],ee=!1,C=!1,w=0,te=!this.leftDelim,T=this.colFormat;var _iterator53=_createForOfIteratorHelper(T),_step53;try{for(_iterator53.s();!(_step53=_iterator53.n()).done;){var _t64=_step53.value;if("align"in _t64&&w>=x.length)break;if("align"in _t64)ee?S.push(Vl(2*f)):(C||te)&&S.push(Vl(f)),S.push(new F(x[w],{classes:"col-align-"+_t64.align})),w++,ee=!0,C=!1,te=!1;else if("gap"in _t64){if(_typeof(_t64.gap)=="number")S.push(Vl(_t64.gap));else{var _n47=Hl(_e190,_,b,_t64.gap);_n47&&S.push(_n47);}ee=!1,C=!1,te=!1;}else if("separator"in _t64){var _e194=new F(null,{classes:"ML__vertical-separator"});_e194.height=g,_e194.setStyle("height",g,"em"),_e194.setStyle("border-right","".concat(c,"em ").concat(_t64.separator," currentColor")),_e194.setStyle("vertical-align",-(g-b),"em");var _n48=0;C?_n48=u-c:ee&&(_n48=f-c),_e194.left=_n48,S.push(_e194),ee=!1,C=!0,te=!1;}}}catch(err){_iterator53.e(err);}finally{_iterator53.f();}ee&&!this.rightDelim&&S.push(Vl(f));var ne=new F(S,{classes:["ML__mtable"].concat(_toConsumableArray(this.classes)).join(" ")});if(this.environmentName==="array"&&!this.isMultiline&&(ne.height=_[0].height,ne.depth=g-_[0].height),(!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(ne.caret=this.caret),this.bind(_e190,ne);var re=ne.height,ie=ne.depth,ae=this.bind(_e190,new F([this.bind(_e190,Cl("open",(a=this.leftDelim)==null?".":a,re,ie,s,{isSelected:this.isSelected})),ne,this.bind(_e190,Cl("close",(o=this.rightDelim)==null?".":o,re,ie,s,{isSelected:this.isSelected}))],{type:"ord"}));return ae?(ae.setStyle("display","inline-block"),this.caret&&(ae.caret=this.caret),this.bind(_e190,this.attachSupsub(_e190,{base:ae}))):null;}},{key:"_serialize",value:function _serialize(_e195){var t;var n=[];if(this.environmentName==="lines"&&this._rows.length>1?n.push("\\displaylines{"):this.environmentName!=="lines"&&n.push("\\begin{".concat(this.environmentName,"}")),this.environmentName==="array"){if(n.push("{"),this.colFormat!==void 0){var _iterator54=_createForOfIteratorHelper(this.colFormat),_step54;try{for(_iterator54.s();!(_step54=_iterator54.n()).done;){var _e196=_step54.value;"align"in _e196&&_typeof(_e196.align)=="string"?n.push(_e196.align):"separator"in _e196&&_e196.separator==="solid"?n.push("|"):"separator"in _e196&&_e196.separator==="dashed"&&n.push(":");}}catch(err){_iterator54.e(err);}finally{_iterator54.f();}}n.push("}");}for(var _r17=0;_r17<this._rows.length;_r17++){for(var _t65=0;_t65<this._rows[_r17].length;_t65++)_t65>0&&n.push(" & "),n.push(L.serialize(this._rows[_r17][_t65],_e195));if(_r17<this._rows.length-1){var _e197=this.rowGaps[_r17];_e197!=null&&_e197.dimension?n.push("\\\\[".concat(_e197.dimension," ").concat((t=_e197.unit)==null?"pt":t,"] ")):n.push("\\\\ ");}}return this.environmentName==="lines"&&this._rows.length>1?n.push("}"):this.environmentName!=="lines"&&n.push("\\end{".concat(this.environmentName,"}")),N(n);}},{key:"forEachCell",value:function forEachCell(_e198){for(var _t66=0;_t66<this.rowCount;_t66++)for(var _n49=0;_n49<this.colCount;_n49++)_e198(this._rows[_t66][_n49],_t66,_n49);}},{key:"getCell",value:function getCell(_e199,t){var n;return(n=this._rows[_e199])==null?void 0:n[t];}},{key:"setCell",value:function setCell(_e200,t,n){this.type==="array"&&Array.isArray(this._rows)&&this._rows[_e200][t];var _iterator55=_createForOfIteratorHelper(this._rows[_e200][t]),_step55;try{for(_iterator55.s();!(_step55=_iterator55.n()).done;){var _n50=_step55.value;_n50.parent=void 0,_n50.parentBranch=void 0;}}catch(err){_iterator55.e(err);}finally{_iterator55.f();}var r=[new L({type:"first",mode:this.mode})].concat(_toConsumableArray(n.filter(function(_e201){return _e201.type!=="first";})));this._rows[_e200][t]=r,Bl(this),this.isDirty=!0;}},{key:"addRowBefore",value:function addRowBefore(_e202){var _this8=this;this.type==="array"&&Array.isArray(this._rows),this._rows.splice(_e202,0,Array.from({length:this.colCount},function(){return zl(_this8,!_this8.isMultiline);})),Bl(this),this.isDirty=!0;}},{key:"addRowAfter",value:function addRowAfter(_e203){var _this9=this;this.type==="array"&&Array.isArray(this._rows),this._rows.splice(_e203+1,0,Array.from({length:this.colCount},function(){return zl(_this9,!_this9.isMultiline);})),Bl(this),this.isDirty=!0;}},{key:"removeRow",value:function removeRow(_e204){this.type==="array"&&Array.isArray(this._rows)&&this.rowCount;var t=this._rows.splice(_e204,1);var _iterator56=_createForOfIteratorHelper(t),_step56;try{for(_iterator56.s();!(_step56=_iterator56.n()).done;){var _e205=_step56.value;var _iterator57=_createForOfIteratorHelper(_e205),_step57;try{for(_iterator57.s();!(_step57=_iterator57.n()).done;){var _t67=_step57.value;if(_t67){var _iterator58=_createForOfIteratorHelper(_t67),_step58;try{for(_iterator58.s();!(_step58=_iterator58.n()).done;){var _e206=_step58.value;_e206.parent=void 0,_e206.parentBranch=void 0;}}catch(err){_iterator58.e(err);}finally{_iterator58.f();}}}}catch(err){_iterator57.e(err);}finally{_iterator57.f();}}}catch(err){_iterator56.e(err);}finally{_iterator56.f();}Bl(this),this.isDirty=!0;}},{key:"addColumnBefore",value:function addColumnBefore(_e207){this.type==="array"&&Array.isArray(this._rows);var _iterator59=_createForOfIteratorHelper(this._rows),_step59;try{for(_iterator59.s();!(_step59=_iterator59.n()).done;){var _t68=_step59.value;_t68.splice(_e207,0,zl(this));}}catch(err){_iterator59.e(err);}finally{_iterator59.f();}Bl(this),this.isDirty=!0;}},{key:"addColumnAfter",value:function addColumnAfter(_e208){this.type==="array"&&Array.isArray(this._rows);var _iterator60=_createForOfIteratorHelper(this._rows),_step60;try{for(_iterator60.s();!(_step60=_iterator60.n()).done;){var _t69=_step60.value;_t69.splice(_e208+1,0,zl(this));}}catch(err){_iterator60.e(err);}finally{_iterator60.f();}Bl(this),this.isDirty=!0;}},{key:"addColumn",value:function addColumn(){this.addColumnAfter(this.colCount-1);}},{key:"removeColumn",value:function removeColumn(_e209){this.type==="array"&&Array.isArray(this._rows)&&this.colCount;var _iterator61=_createForOfIteratorHelper(this._rows),_step61;try{for(_iterator61.s();!(_step61=_iterator61.n()).done;){var _t70=_step61.value;var _n51=_t70.splice(_e209,1);var _iterator62=_createForOfIteratorHelper(_n51),_step62;try{for(_iterator62.s();!(_step62=_iterator62.n()).done;){var _e210=_step62.value;if(_e210){var _iterator63=_createForOfIteratorHelper(_e210),_step63;try{for(_iterator63.s();!(_step63=_iterator63.n()).done;){var _t71=_step63.value;_t71.parent=void 0,_t71.parentBranch=void 0;}}catch(err){_iterator63.e(err);}finally{_iterator63.f();}}}}catch(err){_iterator62.e(err);}finally{_iterator62.f();}}}catch(err){_iterator61.e(err);}finally{_iterator61.f();}Bl(this),this.isDirty=!0;}},{key:"cells",get:function get(){var _e211=[];var _iterator64=_createForOfIteratorHelper(this._rows),_step64;try{for(_iterator64.s();!(_step64=_iterator64.n()).done;){var _t72=_step64.value;var _iterator65=_createForOfIteratorHelper(_t72),_step65;try{for(_iterator65.s();!(_step65=_iterator65.n()).done;){var _n52=_step65.value;_n52&&_e211.push(_n52.filter(function(_e212){return _e212.type!=="first";}));}}catch(err){_iterator65.e(err);}finally{_iterator65.f();}}}catch(err){_iterator64.e(err);}finally{_iterator64.f();}return _e211;}},{key:"rows",get:function get(){return this._rows;}}],[{key:"fromJson",value:function fromJson(t){return new e(t.environmentName,t.array,t.rowGaps,t);}}]);}(L);function zl(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var n=new L({type:"first",mode:e.mode});n.parent=e;var r=[n];if(t){var _t73=new Tl();_t73.parent=e,r.push(_t73);}return r;}function Bl(e){for(var _t74=0;_t74<e.rowCount;_t74++)for(var _n53=0;_n53<e.colCount;_n53++){var _r18=e.getCell(_t74,_n53);if(_r18){var _iterator66=_createForOfIteratorHelper(_r18),_step66;try{for(_iterator66.s();!(_step66=_iterator66.n()).done;){var _i36=_step66.value;_i36&&(_i36.parent=e,_i36.parentBranch=[_t74,_n53]);}}catch(err){_iterator66.e(err);}finally{_iterator66.f();}}}}function Vl(e){var t=new F(null,{classes:"ML__arraycolsep"});return t.width=e,t;}function Hl(e,t,n,r){if(!r)return null;var i=[];var _iterator67=_createForOfIteratorHelper(t),_step67;try{for(_iterator67.s();!(_step67=_iterator67.n()).done;){var _a14=_step67.value;var _t75=L.createBox(e,r,{type:"ignore"});_t75&&(_t75.depth=_a14.depth,_t75.height=_a14.height,i.push({box:_t75,shift:_a14.pos-n}));}}catch(err){_iterator67.e(err);}finally{_iterator67.f();}return new js({individualShift:i}).wrap(e);}var Ul=function(_L5){function e(_e215){var _this0;_classCallCheck(this,e);_this0=_callSuper(this,e,[{mode:_e215.mode,command:_e215.command,style:_e215.style,body:_e215.body,type:"box"}]),_this0.framecolor=_e215.framecolor,_this0.backgroundcolor=_e215.backgroundcolor,_this0.padding=_e215.padding,_this0.offset=_e215.offset,_this0.border=_e215.border;return _this0;}_inherits(e,_L5);return _createClass(e,[{key:"toJson",value:function toJson(){return l(c({},_superPropGet(e,"toJson",this,3)([])),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border});}},{key:"render",value:function render(_e216){var t,n,r,i;var a=L.createBox(_e216,this.body,{type:"lift"});if(!a)return null;var o=_e216.toEm((t=this.offset)==null?{dimension:0}:t);a.depth+=o,a.setStyle("display","inline-block"),a.setStyle("position","relative"),a.setStyle("height",Math.floor(100*a.height+a.depth)/100,"em"),a.setStyle("vertical-align",-Math.floor(100*a.height)/100,"em");var s=new I({parent:_e216},this.style),c=s.toEm((n=this.padding)==null?{register:"fboxsep"}:n),l=new F(null,{classes:"ML__box"});l.height=a.height+c,l.depth=a.depth+c,l.setStyle("box-sizing","border-box"),l.setStyle("position","absolute"),l.setStyle("top",-c+.3,"em"),l.setStyle("left",0),l.setStyle("height",l.height+l.depth,"em"),l.setStyle("width","100%"),this.backgroundcolor&&l.setStyle("background-color",(r=s.toBackgroundColor(this.backgroundcolor))==null?"transparent":r),this.framecolor&&l.setStyle("border","".concat(s.getRegisterAsEm("fboxrule",2),"em solid ").concat((i=s.toColor(this.framecolor))==null?"black":i)),this.border&&l.setStyle("border",this.border);var u=new F([l,a],{type:"lift"});return u.setStyle("display","inline-block"),u.setStyle("position","relative"),u.setStyle("line-height",0),u.height=a.height+c+(o>0?o:0),u.depth=a.depth+c+(o<0?-o:0),u.setStyle("padding-left",c,"em"),u.setStyle("padding-right",c,"em"),u.setStyle("height",Math.floor(100*(a.height+a.depth+2*c+Math.abs(o)))/100,"em"),u.setStyle("margin-top",-c,"em"),u.setStyle("top",Math.floor(100*(a.depth-a.height+2*c-o))/100,"em"),u.setStyle("vertical-align",Math.floor(100*(a.depth+2*c))/100,"em"),this.caret&&(u.caret=this.caret),this.attachSupsub(_e216,{base:u});}},{key:"_serialize",value:function _serialize(_e217){return _e217.skipStyles?N([this.bodyToLatex(_e217),this.supsubToLatex(_e217)]):_superPropGet(e,"_serialize",this,3)([_e217]);}}],[{key:"fromJson",value:function fromJson(t){return new e(t);}}]);}(L),Wl=function(_L6){function e(_e218,t){_classCallCheck(this,e);var n;return _callSuper(this,e,[{type:"composition",mode:(n=t==null?void 0:t.mode)==null?"math":n,value:_e218}]);}_inherits(e,_L6);return _createClass(e,[{key:"toJson",value:function toJson(){return _superPropGet(e,"toJson",this,3)([]);}},{key:"render",value:function render(_e219){var t=new F(this.value,{classes:"ML__composition",type:"composition"});return this.bind(_e219,t),this.caret&&(t.caret=this.caret),t;}},{key:"_serialize",value:function _serialize(_e220){return"";}}],[{key:"fromJson",value:function fromJson(t){return new e(t.value,t);}}]);}(L),Gl=function(_L7){function e(_e221){var _this1;_classCallCheck(this,e);_this1=_callSuper(this,e,[{type:"error",value:_e221,command:_e221,mode:"math"}]),_this1.verbatimLatex=_e221;return _this1;}_inherits(e,_L7);return _createClass(e,[{key:"toJson",value:function toJson(){return _superPropGet(e,"toJson",this,3)([]);}},{key:"render",value:function render(_e222){var t=this.createBox(_e222,{classes:"ML__error"});return this.caret&&(t.caret=this.caret),t;}}],[{key:"fromJson",value:function fromJson(t){return new e(t.command);}}]);}(L),Kl=function(_L8){function e(_e223,t){var _this10;_classCallCheck(this,e);_this10=_callSuper(this,e,[{type:"group",mode:t}]),_this10.body=_e223,_this10.boxType=_e223.length>1?"ord":"ignore",_this10.skipBoundary=!0,_this10.displayContainsHighlight=!1,(_e223==null?void 0:_e223.length)===1&&_e223[0].command===","&&(_this10.captureSelection=!0);return _this10;}_inherits(e,_L8);return _createClass(e,[{key:"render",value:function render(_e224){var t=L.createBox(_e224,this.body,{type:this.boxType});return t?(this.caret&&(t.caret=this.caret),this.bind(_e224,t)):null;}},{key:"_serialize",value:function _serialize(_e225){if(!(_e225.expandMacro||_e225.skipStyles||_e225.skipPlaceholders)&&_typeof(this.verbatimLatex)=="string")return this.verbatimLatex;var t=ft(this.command,this.mode);return t!=null&&t.serialize?t.serialize(this,_e225):"{".concat(this.bodyToLatex(_e225),"}");}}],[{key:"fromJson",value:function fromJson(t){return new e(t.body,t.mode);}}]);}(L),B=function(_L9){function e(_e226,t,n){var _this11;_classCallCheck(this,e);_this11=_callSuper(this,e,[{type:"leftright",style:n.style,displayContainsHighlight:!0}]),_this11.variant=_e226,_this11.body=t,_this11.leftDelim=n.leftDelim,_this11.rightDelim=n.rightDelim;return _this11;}_inherits(e,_L9);return _createClass(e,[{key:"toJson",value:function toJson(){var _e227=_superPropGet(e,"toJson",this,3)([]);return this.variant&&(_e227.variant=this.variant),this.leftDelim&&(_e227.leftDelim=this.leftDelim),this.rightDelim&&(_e227.rightDelim=this.rightDelim),_e227;}},{key:"_serialize",value:function _serialize(_e228){var t,n;var r=this.matchingRightDelim();return this.variant==="left...right"?N(["\\left",(t=this.leftDelim)==null?".":t,this.bodyToLatex(_e228),"\\right",r]):this.variant==="mleft...mright"?N(["\\mleft",(n=this.leftDelim)==null?".":n,this.bodyToLatex(_e228),"\\mright",r]):N([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(_e228),r]);}},{key:"matchingRightDelim",value:function matchingRightDelim(){var _e229,t;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;var n=(_e229=this.leftDelim)==null?".":_e229;return(t=ol[n])==null?n:t;}},{key:"render",value:function render(_e230){var t,n;var r=new I({parent:_e230},this.style);this.body;var i=new I({parent:_e230,mathstyle:"textstyle"},this.style),a=(t=L.createBox(r,this.body,{type:"inner"}))==null?new F(null,{type:"inner"}):t,o=a.height/i.scalingFactor,s=a.depth/i.scalingFactor,c=[];if(this.leftDelim&&c.push(this.bind(i,Cl("open",this.leftDelim,o,s,i,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),a&&(ql(a.children,this,r,o,s),c.push(a)),this.rightDelim){var _e231=this.containsCaret?" ML__contains-caret":"",_t76=this.rightDelim;_t76==="?"&&(r.smartFence?(_t76=this.matchingRightDelim(),_e231+=" ML__smart-fence__close"):_t76="."),c.push(this.bind(i,Cl("close",_t76,o,s,i,{isSelected:this.isSelected,classes:_e231+" ML__close",mode:this.mode,style:this.style})));}var l=this.variant==="mleft...mright",u=this.leftSibling;u&&(!l&&u.isFunction&&(l=!0),!l&&u.type==="subsup"&&(n=u.leftSibling)!=null&&n.isFunction&&(l=!0));var d=new F(c,{type:l?"close":"inner",classes:"ML__left-right"});return d.setStyle("margin-top","".concat(-a.depth,"em")),d.setStyle("height","".concat(a.height+a.depth,"em")),this.caret&&(d.caret=this.caret),this.bind(r,d.wrap(r));}}],[{key:"fromJson",value:function fromJson(t){var n;return new e((n=t.variant)==null?"":n,t.body,t);}}]);}(L);function ql(e,t,n,r,i){if(e)for(var _a15=0;_a15<e.length;_a15++){var _o13=e[_a15];_o13.type==="middle"?(e[_a15]=t.bind(n,Cl("inner",_o13.value,r,i,n,{isSelected:t.isSelected})),e[_a15].caret=_o13.caret,e[_a15].isSelected=_o13.isSelected,e[_a15].cssId=_o13.cssId,e[_a15].htmlData=_o13.htmlData,e[_a15].htmlStyle=_o13.htmlStyle,e[_a15].attributes=_o13.attributes,e[_a15].cssProperties=_o13.cssProperties):_o13.children&&ql(_o13.children,t,n,r,i);}}var Jl=function(_L0){function e(_e232,t){var _this12;_classCallCheck(this,e);var n;_this12=_callSuper(this,e,[{type:"macro",command:_e232,style:t.style}]),_this12.body=t.body,t.captureSelection===void 0?t.args?_this12.captureSelection=!1:_this12.captureSelection=!0:_this12.captureSelection=t.captureSelection,_this12.macroArgs=t.args,_this12.expand=(n=t.expand)==null?!1:n;return _this12;}_inherits(e,_L0);return _createClass(e,[{key:"toJson",value:function toJson(){var _e233=_superPropGet(e,"toJson",this,3)([]);return this.expand&&(_e233.expand=!0),this.captureSelection!==void 0&&(_e233.captureSelection=this.captureSelection),this.macroArgs&&(_e233.args=this.macroArgs),_e233;}},{key:"_serialize",value:function _serialize(_e234){var t;return _e234.expandMacro&&this.expand?this.bodyToLatex(_e234):this.command+((t=this.macroArgs)==null?"":t);}},{key:"applyStyle",value:function applyStyle(_e235,t){var n={};_e235.color&&(n.color=_e235.color),_e235.backgroundColor&&(n.backgroundColor=_e235.backgroundColor),_superPropGet(e,"applyStyle",this,3)([n,t]);}},{key:"render",value:function render(_e236){var t=L.createBox(_e236,this.body,{type:"lift"});return t?(this.caret&&(t.caret=this.caret),this.bind(_e236,t)):null;}}],[{key:"fromJson",value:function fromJson(t){return new e(t.command,t);}}]);}(L),Yl=function(_L1){function e(){_classCallCheck(this,e);return _callSuper(this,e,[{type:"macro-argument"}]);}_inherits(e,_L1);return _createClass(e,[{key:"toJson",value:function toJson(){return _superPropGet(e,"toJson",this,3)([]);}},{key:"_serialize",value:function _serialize(_e237){return"";}},{key:"render",value:function render(_e238){return null;}}],[{key:"fromJson",value:function fromJson(t){return new e();}}]);}(L),Xl=function(_L10){function e(_e239,t){var _this13;var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;var r=arguments.length>3?arguments[3]:undefined;var i=arguments.length>4?arguments[4]:undefined;_classCallCheck(this,e);var a;_this13=_callSuper(this,e,[{type:"prompt",mode:(a=i==null?void 0:i.mode)==null?"math":a,style:i==null?void 0:i.style,command:"\\placeholder"}]),_this13.body=r,_this13.correctness=t,_this13.placeholderId=_e239,_this13.locked=n,_this13.captureSelection=_this13.locked;return _this13;}_inherits(e,_L10);return _createClass(e,[{key:"toJson",value:function toJson(){var _e240=_superPropGet(e,"toJson",this,3)([]);return this.placeholderId&&(_e240.placeholderId=this.placeholderId),this.body||delete _e240.body,this.body&&(_e240.body=this.body.filter(function(_e241){return _e241.type!=="first";}).map(function(_e242){return _e242.toJson();})),this.correctness&&(_e240.correctness=this.correctness),_e240.locked=this.locked,_e240;}},{key:"render",value:function render(_e243){var t,n,r,i,a;var o=new I({parent:_e243}),s=o.getRegisterAsEm("fboxsep"),c=s,l=s,u=L.createBox(_e243,this.body);if(!u)return null;var d=!this.body||this.body.length===0||this.body.every(function(_e244){return _e244.type==="first";})?new Tl({mode:this.mode,style:this.style}).render(new I({parent:_e243,isPhantom:!0})):null,f=(t=d==null?void 0:d.height)==null?o.metrics.xHeight:t,p=(n=d==null?void 0:d.depth)==null?f/2:n,m=Math.max((r=u.height)==null?0:r,f),h=Math.max((i=u.depth)==null?0:i,p);u.setStyle("vertical-align","calc(-".concat(m,"em + 2px)")),this.correctness==="correct"?u.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&u.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");var g=m+h+2*l-2*c,_=new F(u,{type:"ord"});_.setStyle("display","inline-block"),_.height=m,_.depth=h,_.setStyle("height",m+h,"em"),_.setStyle("vertical-align",-l,"em"),((a=u.width)==null?0:a)<g&&(_.width=g,_.setStyle("width",g,"em"));var v="ML__prompt ";this.locked?v+=" ML__lockedPromptBox ":v+=" ML__editablePromptBox ",this.correctness==="correct"?v+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(v+=" ML__incorrectPromptBox "),this.containsCaret&&(v+=" ML__focusedPromptBox ");var y=new F(null,{classes:v,attributes:{part:"prompt"}});y.height=_.height+l,y.depth=_.depth+l,y.width=_.width+2*c,y.setStyle("position","absolute"),y.setStyle("height",_.height+_.depth+2*l,"em"),c===0&&y.setStyle("width","100%"),c!==0&&(y.setStyle("width","calc(100% + ".concat(2*c,"em)")),y.setStyle("top",s,"em"),y.setStyle("left",-c,"em"));var b="";this.correctness==="incorrect"&&(b+="<line x1=\"3%\" y1=\"97%\" x2=\"97%\" y2=\"3%\" stroke-width=\"0.5\" stroke=\"var(--incorrect-color, var(--ML__incorrect-color))\" stroke-linecap=\"round\" />"),b&&(y.svgOverlay=b);var x=new F([y,_],{classes:"ML__prompt-atom"});_.setStyle("line-height",1),x.setStyle("position","relative"),x.setStyle("display","inline-block"),x.setStyle("line-height",0),x.height=m+l+.2,x.depth=h+l,x.left=c,x.right=c,x.setStyle("height",m+2*l,"em"),x.setStyle("top",h-m-l/2,"em"),x.setStyle("vertical-align",_.depth,"em"),x.setStyle("margin-left",.5,"em"),x.setStyle("margin-right",.5,"em"),this.caret&&(x.caret=this.caret);var S=this.attachSupsub(_e243,{base:x}),ee=this.bind(o,S);return ee&&this.id&&(y.atomID=this.id,_.atomID=this.id,x.atomID=this.id),ee;}},{key:"_serialize",value:function _serialize(_e245){var t;var n=(t=this.bodyToLatex(_e245))==null?"":t;if(_e245.skipPlaceholders)return n;var r="\\placeholder";return this.placeholderId&&(r+="[".concat(this.placeholderId,"]")),this.correctness==="correct"?r+="[correct]":this.correctness==="incorrect"&&(r+="[incorrect]"),this.locked&&(r+="[locked]"),P(r,n);}}],[{key:"fromJson",value:function fromJson(t){return new e(t.placeholderId,t.correctness,t.locked,t.body,t);}}]);}(L),Zl=function(_L11){function e(_e246){var _this14;_classCallCheck(this,e);_this14=_callSuper(this,e,[{type:"subsup",style:_e246==null?void 0:_e246.style}]),_this14.subsupPlacement="auto";return _this14;}_inherits(e,_L11);return _createClass(e,[{key:"children",get:function get(){if(!this._children){var _e247=[],_t77=this.branch("subscript");if(_t77){var _iterator68=_createForOfIteratorHelper(_t77),_step68;try{for(_iterator68.s();!(_step68=_iterator68.n()).done;){var _n54=_step68.value;_e247.push.apply(_e247,_toConsumableArray(_n54.children)),_e247.push(_n54);}}catch(err){_iterator68.e(err);}finally{_iterator68.f();}}var _n55=this.branch("superscript");if(_n55){var _iterator69=_createForOfIteratorHelper(_n55),_step69;try{for(_iterator69.s();!(_step69=_iterator69.n()).done;){var _t78=_step69.value;_e247.push.apply(_e247,_toConsumableArray(_t78.children)),_e247.push(_t78);}}catch(err){_iterator69.e(err);}finally{_iterator69.f();}}this._children=_e247;}return this._children;}},{key:"render",value:function render(_e249){var t;var n=new I({parent:_e249,isPhantom:!0}),r=this.leftSibling,i=(t=r.render(n))==null?new F(null):t,a=new F(null);return a.height=i.height,a.depth=i.depth,this.attachSupsub(_e249,{base:a,isCharacterBox:r.isCharacterBox(),type:"ignore"});}},{key:"_serialize",value:function _serialize(_e250){return this.supsubToLatex(_e250);}}],[{key:"fromJson",value:function fromJson(t){var n=new e(t);for(var _i37=0,_$s3=$s;_i37<_$s3.length;_i37++){var _e248=_$s3[_i37];t[_e248]&&n.setChildren(t[_e248],_e248);}return n;}}]);}(L);function Ql(e){return e?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(e):!1;}var $l=function(){function $l(e,t,n){_classCallCheck(this,$l);this.errors=[],this.index=0,this.endCount=0;var r,i,a,o;n!=null||(n={}),this.tokens=e,this.context=t instanceof I&&!(n!=null&&n.parseMode)&&!n.mathstyle?t:new I({from:t,mathstyle:n.mathstyle},n.style),this.args=(r=n.args)==null?void 0:r,this.smartFence=this.context.smartFence,this.parsingContext={parent:void 0,mathlist:[],style:(i=n.style)==null?{}:i,parseMode:(a=n.parseMode)==null?"math":a,mathstyle:(o=n.mathstyle)==null?"displaystyle":o,tabular:!1};}return _createClass($l,[{key:"beginContext",value:function beginContext(e){var t,n,r,i,a,o;if(e!=null&&e.root){this.parsingContext={parent:this.parsingContext.parent,mathlist:[],style:{},parseMode:(t=e==null?void 0:e.mode)==null?"math":t,mathstyle:(n=e==null?void 0:e.mathstyle)==null?"displaystyle":n,tabular:(r=e==null?void 0:e.tabular)==null?!1:r};return;}var s=this.parsingContext,l={parent:s,mathlist:[],style:c({},s.style),parseMode:(i=e==null?void 0:e.mode)==null?s.parseMode:i,mathstyle:(a=e==null?void 0:e.mathstyle)==null?s.mathstyle:a,tabular:(o=e==null?void 0:e.tabular)==null?!1:o};this.parsingContext=l;}},{key:"endContext",value:function endContext(){this.parsingContext=this.parsingContext.parent;}},{key:"onError",value:function onError(e){this.errors.push(c({before:cs(this.tokens.slice(this.index,this.index+10)),after:cs(this.tokens.slice(Math.max(0,this.index-10),this.index))},e));}},{key:"mathlist",get:function get(){return this.parsingContext.mathlist;},set:function set(e){this.parsingContext.mathlist=e;}},{key:"parseMode",get:function get(){return this.parsingContext.parseMode;},set:function set(e){this.parsingContext.parseMode=e;}},{key:"tabularMode",get:function get(){return this.parsingContext.tabular;}},{key:"style",get:function get(){var e=this.parsingContext;for(;e;){if(e.style)return c({},e.style);e=e.parent;}return{};},set:function set(e){this.parsingContext.style=e;}},{key:"end",value:function end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3;}},{key:"next",value:function next(){this.index+=1;}},{key:"get",value:function get(){return this.endCount=0,this.index<this.tokens.length?this.tokens[this.index++]:"";}},{key:"peek",value:function peek(){return this.tokens[this.index];}},{key:"expandUnicode",value:function expandUnicode(){var _this$tokens;if(!this.peek()||this.parseMode!=="math")return;var e=He(this.peek());e&&(_this$tokens=this.tokens).splice.apply(_this$tokens,[this.index,1].concat(_toConsumableArray(ss(e))));}},{key:"match",value:function match(e){return this.tokens[this.index]===e?(this.index++,!0):!1;}},{key:"lastSubsupAtom",value:function lastSubsupAtom(){var e;return this.mathlist.length>0&&(e=this.mathlist[this.mathlist.length-1],e.type==="subsup"||e.subsupPlacement!==void 0)||(e=new Zl({style:this.style}),this.mathlist.push(e)),e;}},{key:"hasPattern",value:function hasPattern(e){return e.test(this.tokens[this.index]);}},{key:"hasInfixCommand",value:function hasInfixCommand(){var e;var t=this.index;if(t<this.tokens.length&&this.tokens[t].startsWith("\\")){var _n56=ft(this.tokens[t],this.parseMode);return!_n56||_n56.definitionType==="symbol"||_n56.ifMode&&!_n56.ifMode.includes(this.parseMode)||(e=_n56.infix)==null?!1:e;}return!1;}},{key:"matchColumnSeparator",value:function matchColumnSeparator(){return!this.tabularMode||this.peek()!=="&"?!1:(this.index++,!0);}},{key:"matchRowSeparator",value:function matchRowSeparator(){if(!this.tabularMode)return!1;var e=this.peek();return e!=="\\\\"&&e!=="\\cr"&&e!=="\\tabularnewline"?!1:(this.index++,!0);}},{key:"placeholder",value:function placeholder(){var e;var t=(e=this.args)==null?void 0:e.call(this,"?");return t?eu(t,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new Tl({mode:this.parseMode,style:this.style})];}},{key:"skipWhitespace",value:function skipWhitespace(){for(;this.match("<space>"););}},{key:"skipUntilToken",value:function skipUntilToken(e){var t=this.tokens[this.index];for(;t&&t!==e;)t=this.tokens[++this.index];t===e&&this.index++;}},{key:"skipFiller",value:function skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}},{key:"matchKeyword",value:function matchKeyword(e){var t=this.index,n=this.end(),r="";for(;!n;){var _t79=this.get();Ql(_t79)?(r+=_t79,n=this.end()||r.length>=e.length):n=!0;}var i=e.toUpperCase()===r.toUpperCase();return i||(this.index=t),i;}},{key:"scanString",value:function scanString(){var e="";for(;!this.end();){var _t80=this.peek();if(_t80==="]")return e;if(_t80==="<space>")e+=" ";else if(_t80.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),e+=_t80.substring(1);else if(Ql(_t80))e+=_t80;else return e;this.next();}return e;}},{key:"scanBalancedString",value:function scanBalancedString(){var e="",t=this.end(),n=1;for(;!t;){var _r19=this.get();_r19==="<space>"?e+=" ":_r19==="<{>"?(e+="{",n+=1):_r19==="<}>"?(--n,n>0?e+="}":--this.index):_r19==="<$>"?e+="$":_r19==="<$$>"?e+="$$":e+=_r19,t=n===0||this.end();}return e;}},{key:"scanLiteralGroup",value:function scanLiteralGroup(){var e;if(!this.match("<{>"))return"";var t="",n=1;for(;n>0&&!this.end();){var _r20=this.get();_r20==="<}>"?(--n,n>0&&(t+="}")):_r20==="<{>"?(n+=1,t+="{"):(/\\[a-zA-Z]+$/.test(t)&&/^[a-zA-Z]/.test(_r20)&&(t+=" "),t+=(e={"<space>":" ","<$$>":"$$","<$>":"$"}[_r20])==null?_r20:e);}return t;}},{key:"scanNumber",value:function scanNumber(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!0;var t,n;var r=!1,i=this.peek();for(;i==="<space>"||i==="+"||i==="-";)this.get(),i==="-"&&(r=!r),i=this.peek();e=!!e;var a=10,o=/\d/;if(this.match("'"))a=8,o=/[0-7]/,e=!0;else if(this.match("\""))a=16,o=/[\dA-F]/,e=!0;else if(this.match("x"))a=16,o=/[\dA-Fa-f]/,e=!0;else if(this.match("`"))return i=this.get(),i?i.length===2&&i.startsWith("\\")?{number:(r?-1:1)*((t=i.codePointAt(1))==null?0:t),base:"alpha"}:{number:(r?-1:1)*((n=i.codePointAt(0))==null?0:n),base:"alpha"}:null;var s="";for(;this.hasPattern(o);)s+=this.get();if(!e&&(this.match(".")||this.match(",")))for(s+=".";this.hasPattern(o);)s+=this.get();var c=e?Number.parseInt(s,a):Number.parseFloat(s);return Number.isNaN(c)?null:{number:r?-c:c,base:a===16?"hexadecimal":a===8?"octal":"decimal"};}},{key:"scanRegister",value:function scanRegister(){var e;var t=this.index,n=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return n;var r=!1;if(n===null)for(;;){var _e251=this.peek();if(_e251==="-")r=!r;else if(_e251!=="+")break;this.next(),this.skipWhitespace();}if(this.match("\\global")){this.skipWhitespace();var _e252=this.get();return _e252.startsWith("\\")?n?{register:_e252,global:!0,factor:(r?-1:1)*n.number}:r?{register:_e252,global:!0,factor:-1}:{register:_e252,global:!0}:(this.index=t,null);}var i=this.get();return i!=null&&i.startsWith("\\")?(i=i.substring(1),this.context.registers[i]?!r||n!==null?{register:i,factor:(r?-1:1)*((e=n==null?void 0:n.number)==null?1:e)}:{register:i}:(this.index=t,null)):(this.index=t,null);}},{key:"scanValue",value:function scanValue(){var e=this.scanRegister();if(e)return e;var t=this.index,n=this.scanGlueOrDimen();if(n&&("unit"in n||"glue"in n&&"unit"in n.glue))return n;this.index=t;var r=this.scanNumber();if(r)return r;if(this.end()||!Ql(this.peek()))return null;var i=this.scanString();return i.length>0?{string:i}:null;}},{key:"scanDimen",value:function scanDimen(){var e=this.scanNumber(!1);if(e===null)return null;var t=e.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();var n;return this.matchKeyword("pt")?n="pt":this.matchKeyword("mm")?n="mm":this.matchKeyword("cm")?n="cm":this.matchKeyword("ex")?n="ex":this.matchKeyword("px")?n="px":this.matchKeyword("em")?n="em":this.matchKeyword("bp")?n="bp":this.matchKeyword("dd")?n="dd":this.matchKeyword("pc")?n="pc":this.matchKeyword("in")?n="in":this.matchKeyword("mu")&&(n="mu"),n?{dimension:t,unit:n}:{dimension:t};}},{key:"scanGlueOrDimen",value:function scanGlueOrDimen(){var e=this.scanDimen();if(e===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return e;var t={glue:e};if(this.matchKeyword("plus")){var _e253=this.scanDimen();if(_e253)t.grow=_e253;else return t;}if(this.skipWhitespace(),this.match("\\relax"))return t;if(this.skipWhitespace(),this.matchKeyword("minus")){var _e254=this.scanDimen();if(_e254)t.shrink=_e254;else return t;}return!t.grow&&!t.shrink?e:t;}},{key:"scanColspec",value:function scanColspec(){this.skipWhitespace();var e=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){var _t81=this.get();_t81==="c"||_t81==="r"||_t81==="l"?e.push({align:_t81}):_t81==="|"?e.push({separator:"solid"}):_t81===":"?e.push({separator:"dashed"}):_t81==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),e.push({gap:this.scan(function(e){return e==="<}>";})}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}));}return e;}},{key:"scanModeSet",value:function scanModeSet(){var e;if(this.match("\\(")&&(e="textstyle"),!e&&this.match("\\[")&&(e="displaystyle"),!e)return null;this.beginContext({mode:"math",mathstyle:e});var t=this.scan(function(t){return t===(e==="displaystyle"?"\\]":"\\)");});return this.match(e==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t;}},{key:"scanModeShift",value:function scanModeShift(){var e="";if(this.match("<$>")&&(e="<$>"),!e&&this.match("<$$>")&&(e="<$$>"),!e)return null;this.beginContext({mode:"math",mathstyle:e==="<$>"?"textstyle":"displaystyle"});var t=this.scan(function(t){return t===e;});return this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t;}},{key:"scanEnvironment",value:function scanEnvironment(){if(!this.match("\\begin"))return null;var e=this.scanArgument("string");if(!e)return null;var t=tt(e);if(!t)return this.onError({code:"unknown-environment",arg:e}),null;var n=[];if(t.params){var _iterator70=_createForOfIteratorHelper(t.params),_step70;try{for(_iterator70.s();!(_step70=_iterator70.n()).done;){var _r21=_step70.value;if(_r21.isOptional)n.push(this.scanOptionalArgument(_r21.type));else{var _t82=this.scanArgument(_r21.type);_t82||this.onError({code:"missing-argument",arg:e}),n.push(_t82);}}}catch(err){_iterator70.e(err);}finally{_iterator70.f();}}this.beginContext({tabular:t.tabular,root:t.rootOnly});var r=[],i=[],a=[],o=!1;do{var _this$mathlist;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())a.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){a.push(this.mathlist),this.mathlist=[];var _e255=null;this.skipWhitespace(),this.match("[")&&(_e255=this.scanDimen(),this.skipWhitespace(),this.match("]")),i.push(_e255==null?{dimension:0}:_e255),r.push(a),a=[];}else(_this$mathlist=this.mathlist).push.apply(_this$mathlist,_toConsumableArray(this.scan(function(e){return["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(e);})));}while(!o);return a.push(this.mathlist),a.length>0&&r.push(a),this.endContext(),t.rootOnly&&(this.index=this.tokens.length),t.createAtom(e,r,i,n,this.context.maxMatrixCols);}},{key:"scanExpression",value:function scanExpression(){var e=this.mathlist;if(this.mathlist=[],this.parseExpression()){var _t83=this.mathlist;return this.mathlist=e,_t83;}return this.mathlist=e,null;}},{key:"scan",value:function scan(e){this.beginContext(),e||(e=function e(_e256){return _e256==="<}>";});var t="",n=null,r=[],i=null;for(;!this.end()&&!e(this.peek());)this.hasInfixCommand()&&!t?(t=this.get(),n=ft(t,"math"),n&&(r=this.scanArguments(n)[1]),i=this.mathlist,this.mathlist=[]):this.parseExpression();var a;return t?(r.unshift(this.mathlist),i&&r.unshift(i),a=[n.createAtom({command:t,args:r,style:this.style,mode:this.parseMode})]):a=this.mathlist,this.endContext(),a;}},{key:"scanGroup",value:function scanGroup(){var e=this.index;if(!this.match("<{>"))return null;var t=this.scan(function(e){return e==="<}>";});if(this.match("<}>")||this.onError({code:"unbalanced-braces"}),t.length===1&&t[0].type==="placeholder")return t[0];var n=new Kl(t,this.parseMode);return n.verbatimLatex=cs(this.tokens.slice(e,this.index)),n;}},{key:"scanSmartFence",value:function scanSmartFence(){if(this.skipWhitespace(),!this.match("("))return null;this.beginContext();var e=1;for(;!this.end()&&e!==0;)this.match("(")&&(e+=1),this.match(")")&&--e,e!==0&&this.parseExpression();var t=new B("",this.mathlist,{leftDelim:"(",rightDelim:e===0?")":"?"});return this.endContext(),t;}},{key:"scanDelim",value:function scanDelim(){this.skipWhitespace();var e=this.peek();if(!e)return this.onError({code:"unexpected-end-of-string"}),null;if(!Ql(e)&&!e.startsWith("\\"))return null;this.next();var t=ft(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);}},{key:"scanLeftRight",value:function scanLeftRight(){var e;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new Gl("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new Gl("\\mright");var t="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;t="\\mright";}var n=this.scanDelim();if(!n)return this.onError({code:"unexpected-delimiter"}),new Gl(t==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(t);)this.parseExpression();var r=this.mathlist;this.endContext();var i=(e=this.scanDelim())==null?".":e;return new B(t==="\\right"?"left...right":"mleft...mright",r,{leftDelim:n,rightDelim:i,style:this.style});}},{key:"parseSupSub",value:function parseSupSub(){if(this.parseMode!=="math")return!1;var e=this.peek();if(e!=="^"&&e!=="_"&&e!=="'")return!1;var t=this.lastSubsupAtom();for(;e==="^"||e==="_"||e==="'";)this.match("'")?this.match("'")?t.addChild(new L({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):t.addChild(new L({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&t.addChildren(k(this.scanArgument("expression")),e==="_"?"subscript":"superscript"),e=this.peek();return!0;}},{key:"parseLimits",value:function parseLimits(){if(this.parseMode!=="math")return!1;var e=this.match("\\limits"),t=!e&&this.match("\\nolimits"),n=!t&&!e&&this.match("\\displaylimits");if(!e&&!t&&!n)return!1;var 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"),n&&(r.subsupPlacement="auto"),!0);}},{key:"scanArguments",value:function scanArguments(e){if(!(e!=null&&e.params))return[void 0,[]];var t,n=[],r=e.infix?2:0;for(;r<e.params.length;){var _i38=e.params[r];_i38.type==="rest"?n.push(this.scan(function(e){return["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(e);})):_i38.isOptional?n.push(this.scanOptionalArgument(_i38.type)):_i38.type.endsWith("*")?t=_i38.type.slice(0,-1):n.push(this.scanArgument(_i38.type)),r+=1;}return[t,n];}},{key:"scanSymbolOrLiteral",value:function scanSymbolOrLiteral(){var e=this.peek();if(!e)return null;this.next();var t;if(Ql(e)){var _t84=us.createAtom(this.parseMode,e,c({},this.style));return _t84?[_t84]:null;}if(t=this.scanMacro(e),t)return[t];if(e.startsWith("\\")){var _n57=ft(e,this.parseMode);if(!_n57)return this.onError({code:"unknown-command",arg:e}),[new Gl(e)];if(_n57.definitionType==="symbol"){var _r22=c({},this.style);_n57.variant&&(_r22.variant=_n57.variant),t=new L({type:_n57.type,command:e,style:_r22,value:String.fromCodePoint(_n57.codepoint),mode:this.parseMode,verbatimLatex:e});}else{if(_n57.applyMode||_n57.applyStyle||_n57.infix)return this.onError({code:"invalid-command",arg:e}),[new Gl(e)];_n57.createAtom&&(t=_n57.createAtom({command:e,args:[],style:this.style,mode:this.parseMode}));}}return t?[t]:null;}},{key:"scanArgument",value:function scanArgument(e){var t;this.skipFiller();var n=this.parseMode;if(e==="auto"&&(e=n),!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!==n&&this.beginContext({mode:"math"});var _t85=this.scanSymbolOrLiteral();return e!==n&&this.endContext(),_t85;}if(e==="text"){e!==n&&this.beginContext({mode:"text"});var _t86=this.scanSymbolOrLiteral();return e!==n&&this.endContext(),_t86;}return e==="balanced-string"?null:e==="rest"?this.scan(function(e){return["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(e);}):null;}if(e==="text"){this.beginContext({mode:"text"});do{var _this$mathlist2;(_this$mathlist2=this.mathlist).push.apply(_this$mathlist2,_toConsumableArray(this.scan()));}while(!this.match("<}>")&&!this.end());var _e257=this.mathlist;return this.endContext(),{group:_e257};}if(e==="math"){this.beginContext({mode:"math"});do{var _this$mathlist3;(_this$mathlist3=this.mathlist).push.apply(_this$mathlist3,_toConsumableArray(this.scan()));}while(!this.match("<}>")&&!this.end());var _e258=this.mathlist;return this.endContext(),{group:_e258};}if(e==="rest"){var _e259=this.scan();return this.match("<}>")||this.onError({code:"unbalanced-braces"}),{group:_e259};}var r=null;if(e==="expression"){this.beginContext({mode:"math"});do{var _this$mathlist4;(_this$mathlist4=this.mathlist).push.apply(_this$mathlist4,_toConsumableArray(this.scan()));}while(!this.match("<}>")&&!this.end());var _e260=this.mathlist;return this.endContext(),{group:_e260};}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;}},{key:"scanOptionalArgument",value:function scanOptionalArgument(e){if(e=e==="auto"?this.parseMode:e,this.skipFiller(),!this.match("["))return null;var 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"){var _e261={},_n58=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);var _iterator71=_createForOfIteratorHelper(_n58),_step71;try{for(_iterator71.s();!(_step71=_iterator71.n()).done;){var _t87=_step71.value;var _n59=_t87.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(_n59)_e261.padding={dimension:Number.parseFloat(_n59[1]),unit:_n59[2]};else{var _n60=_t87.match(/^\s*border\s*:\s*(.*)/);_n60?_e261.border=_n60[1]:_e261.backgroundcolor={string:_t87};}}}catch(err){_iterator71.e(err);}finally{_iterator71.f();}t=_e261;}else e==="math"&&(this.beginContext({mode:"math"}),t=this.mathlist.concat(this.scan(function(e){return e==="]";})),this.endContext());return t;}},{key:"scanSymbolOrCommand",value:function scanSymbolOrCommand(e){var _this15=this;var t,n,r;if(e==="\\placeholder"){var _e262=this.scanOptionalArgument("string"),_t88=this.scanOptionalArgument("math"),_n61=L.serialize(_t88,{defaultMode:"math"}),_r23=[],_i39;!_i39&&_n61==="correct"?_i39="correct":!_i39&&_n61==="incorrect"?_i39="incorrect":_n61!==""&&(_r23=_t88);var _a16=this.scanOptionalArgument("string")==="locked",_o14=this.scanArgument("auto"),_s7;return _s7=_o14&&Array.isArray(_o14)&&_o14.length>0?_o14:_o14&&_typeof(_o14)=="object"&&"group"in _o14?_o14.group:_r23,_e262?[new Xl(_e262,_i39,_a16,_s7==null?_r23:_s7,{mode:this.parseMode,style:this.style})]:[new Tl({mode:this.parseMode,style:this.style})];}if(e==="\\renewcommand"||e==="\\newcommand"||e==="\\providecommand"||e==="\\def"){var _t89=this.index,_n62=this.scanLiteralGroup()||this.next();if(!_n62)return null;if(this.context.registers[_n62.substring(1)]){var _r24=this.scanArgument("string");return _r24!==null&&(this.context.registers[_n62.substring(1)]=_r24),[new L({type:"text",value:"",verbatimLatex:N([e,cs(this.tokens.slice(_t89,this.index))])})];}}var i=this.scanMacro(e);if(i)return[i];var a=ft(e,this.parseMode);if(!a)return this.parseMode==="text"?(/[a-zA-Z]/.test((t=this.peek())==null?"":t)&&(e+=" "),_toConsumableArray(e).map(function(e){return new L({type:"text",value:e,mode:"text",style:_this15.style});})):(this.onError({code:"unknown-command",arg:e}),[new Gl(e)]);var o=this.index;if(a.definitionType==="symbol"){var _t90=c({},this.style);a.variant&&(_t90.variant=a.variant),i=new L({type:a.type,command:e,style:_t90,value:String.fromCodePoint(a.codepoint),mode:this.parseMode});}else{var _this$scanArguments,_this$scanArguments2;if(a.ifMode&&!a.ifMode.includes(this.parseMode))return[];var _t91=this.parseMode;a.applyMode&&(this.parseMode=a.applyMode);var _o15,_s8=[];if(a.parse?_s8=a.parse(this):(_this$scanArguments=this.scanArguments(a),_this$scanArguments2=_slicedToArray(_this$scanArguments,2),_o15=_this$scanArguments2[0],_s8=_this$scanArguments2[1],_this$scanArguments),this.parseMode=_t91,a.applyMode&&!a.applyStyle&&!a.createAtom)return k(_s8[0]);if(a.infix)return this.onError({code:"too-many-infix-commands",arg:e}),null;if(_typeof(a.createAtom)=="function")i=a.createAtom({command:e,args:_s8,style:this.style,mode:this.parseMode}),_o15&&(i.body=k(this.scanArgument(_o15)));else if(_typeof(a.applyStyle)=="function"){var _t92=a.applyStyle(this.style,e,_s8,this.context),_n63=this.parseMode;if(a.applyMode&&(this.parseMode=a.applyMode),_o15){var _e263=this.style;this.style=_t92;var _r25=this.scanArgument(_o15);return this.style=_e263,this.parseMode=_n63,k(_r25);}this.style=_t92;}else i=new L({type:"mord",command:(n=a.command)==null?e:n,style:c({},this.style),value:e,mode:(r=a.applyMode)==null?this.parseMode:r});}if(!i)return null;if(i instanceof L&&i.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(e)){var _t93=N([e,cs(this.tokens.slice(o,this.index))]);_t93&&(i.verbatimLatex=_t93);}if(i.verbatimLatex===null&&(i.verbatimLatex=void 0),i.isFunction&&this.smartFence){var _e264=this.scanSmartFence();if(_e264)return[i,_e264];}return[i];}},{key:"scanSymbolCommandOrLiteral",value:function scanSymbolCommandOrLiteral(){this.expandUnicode();var e=this.get();if(!e)return null;if(Ql(e)){var _t94=us.createAtom(this.parseMode,e,c({},this.style));if(!_t94)return null;if(_t94.isFunction&&this.smartFence){var _e265=this.scanSmartFence();if(_e265)return[_t94,_e265];}return[_t94];}return e.startsWith("\\")?this.scanSymbolOrCommand(e):e==="<space>"?this.parseMode==="text"?[new oc(" "," ",this.style)]:null:(e==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:e}),null);}},{key:"scanMacro",value:function scanMacro(e){var t;var n=this.context.getMacro(e);if(!n)return null;var r=this.index,i=n.args,a={"?":(t=this.args)==null?void 0:t.call(this,"?")};for(var _e266=1;_e266<=i;_e266++){var _t95=this.scanLiteralGroup();if(!_t95){var _e267=this.index;this.scanExpression(),_t95=cs(this.tokens.slice(_e267,this.index));}a[_e266]=_t95;}return new Jl(e,{expand:n.expand,captureSelection:n.captureSelection,args:r===this.index?null:cs(this.tokens.slice(r,this.index)),style:this.parsingContext.style,body:eu(n.def,{context:this.context,parseMode:this.parseMode,args:function args(e){return a[e];},mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})});}},{key:"parseExpression",value:function parseExpression(){var _this$mathlist5;var e,t,n,r;var i=(r=(n=(t=(e=this.scanEnvironment())==null?this.scanModeShift():e)==null?this.scanModeSet():t)==null?this.scanGroup():n)==null?this.scanLeftRight():r;if(i===null){if(this.parseSupSub()||this.parseLimits())return!0;i=this.scanSymbolCommandOrLiteral();}return i?(xe(i)?(_this$mathlist5=this.mathlist).push.apply(_this$mathlist5,_toConsumableArray(i)):this.mathlist.push(i),!0):!1;}}]);}();function eu(e,t){var n,r,i,a;var o=(n=t==null?void 0:t.args)==null?void 0:n,s=new $l(ss(e,o),t==null?void 0:t.context,{args:o,mathstyle:(r=t==null?void 0:t.mathstyle)==null?"displaystyle":r,parseMode:(i=t==null?void 0:t.parseMode)==null?"math":i,style:(a=t==null?void 0:t.style)==null?{}:a}),c=[];for(;!s.end();)c.push.apply(c,_toConsumableArray(s.scan(function(){return!1;})));return c;}function tu(e,t){var n;var r=new $l(ss(e,null),t==null?void 0:t.context,{mathstyle:"displaystyle",parseMode:(n=t==null?void 0:t.parseMode)==null?"math":n});for(;!r.end();)r.scan();return r.errors;}var nu=function(_L12){function e(_e268,t){var _this16;_classCallCheck(this,e);_this16=_callSuper(this,e,[{type:"chem"},{command:_e268,mode:"math"}]);var n=H.go(V.go(t,_e268==="\\pu"?"pu":"ce"),!1);_this16.body=eu(n),_this16._verbatimLatex=_e268+"{"+t+"}",_this16.arg=t,_this16.captureSelection=!0;return _this16;}_inherits(e,_L12);return _createClass(e,[{key:"verbatimLatex",get:function get(){return this._verbatimLatex;},set:function set(_e269){}},{key:"toJson",value:function toJson(){return l(c({},_superPropGet(e,"toJson",this,3)([])),{arg:this.arg});}},{key:"render",value:function render(_e270){var t=L.createBox(_e270,this.body,{type:"inner"});return this.caret&&(t.caret=this.caret),this.bind(_e270,t);}},{key:"_serialize",value:function _serialize(_e271){return this.verbatimLatex,this.verbatimLatex;}}],[{key:"fromJson",value:function fromJson(t){return new e(t.command,t.arg);}}]);}(L);A(["ce","pu"],"{chemformula:balanced-string}",{createAtom:function createAtom(e){var t;return new nu(e.command,(t=e.args[0])==null?"":t);}});var V={go:function go(e,t){if(!e)return[];t===void 0&&(t="ce");var n="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 i,a=10,o=[];;){i===e?a--:(a=10,i=e);var s=V.stateMachines[t],c=s.transitions[n]||s.transitions["*"];e:for(var l=0;l<c.length;l++){var u=V.patterns.match_(c[l].pattern,e);if(u){for(var d=c[l].task,f=0;f<d.action_.length;f++){var p;if(s.actions[d.action_[f].type_])p=s.actions[d.action_[f].type_](r,u.match_,d.action_[f].option);else if(V.actions[d.action_[f].type_])p=V.actions[d.action_[f].type_](r,u.match_,d.action_[f].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+d.action_[f].type_+")"];V.concatArray(o,p);}if(n=d.nextState||n,e.length>0){if(d.revisit||(e=u.remainder),!d.toContinue)break e;}else return o;}}if(a<=0)throw["MhchemBugU","mhchem bug U. Please report."];}},concatArray:function concatArray(e,t){if(t)if(Object.prototype.toString.call(t)==="[object Array]")for(var n=0;n<t.length;n++)e.push(t[n]);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 e99(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 state_of_aggregation_$(e){var t=V.patterns.findObserveGroups(e,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(t&&t.remainder.match(/^($|[\s,;\)\]\}])/))return t;var n=e.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return n?{match_:n[0],remainder:e.substr(n[0].length)}:null;},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function _(e){return V.patterns.findObserveGroups(e,"^{","","","}");},"^($...$)":function $$(e){return V.patterns.findObserveGroups(e,"^","$","$","");},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function x(e){return V.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0);},"^\\x{}":function x(e){return V.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","");},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function _(e){return V.patterns.findObserveGroups(e,"_{","","","}");},"_($...$)":function _$$(e){return V.patterns.findObserveGroups(e,"_","$","$","");},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function _X(e){return V.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0);},"_\\x{}":function _X(e){return V.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","");},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function _(e){return V.patterns.findObserveGroups(e,"","{","}","");},"{(...)}":function _(e){return V.patterns.findObserveGroups(e,"{","","","}");},"$...$":function $$(e){return V.patterns.findObserveGroups(e,"","$","$","");},"${(...)}$":function $$(e){return V.patterns.findObserveGroups(e,"${","","","}$");},"$(...)$":function $$(e){return V.patterns.findObserveGroups(e,"$","","","$");},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function bond(e){return V.patterns.findObserveGroups(e,"\\bond{","","","}");},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function _(e){return V.patterns.findObserveGroups(e,"[","","","]");},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function x(e){return V.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0);},"\\x{}":function x(e){return V.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 frac(e){return V.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}");},"\\overset{(...)}":function overset(e){return V.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}");},"\\underset{(...)}":function underset(e){return V.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}");},"\\underbrace{(...)}":function underbrace(e){return V.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}");},"\\color{(...)}0":function color0(e){return V.patterns.findObserveGroups(e,"\\color{","","","}");},"\\color{(...)}{(...)}1":function color1(e){return V.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}");},"\\color(...){(...)}2":function color2(e){return V.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}");},"\\ce{(...)}":function ce(e){return V.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 amount(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 n=V.patterns.findObserveGroups(e,"","$","$","");return n&&(t=n.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 amount2(e){return this.amount(e);},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function formula$(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 findObserveGroups(e,t,n,r,i,a,o,s,c,l){var u=function u(e,t){if(_typeof(t)=="string")return e.indexOf(t)===0?t:null;var n=e.match(t);return n?n[0]:null;},d=function d(e,t,n){for(var r=0;t<e.length;){var i=e.charAt(t),a=u(e.substr(t),n);if(a!==null&&r===0)return{endMatchBegin:t,endMatchEnd:t+a.length};if(i==="{")r++;else if(i==="}"){if(r===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];r--;}t++;}return null;},f=u(e,t);if(f===null||(e=e.substr(f.length),f=u(e,n),f===null))return null;var p=d(e,f.length,r||i);if(p===null)return null;var m=e.substring(0,r?p.endMatchEnd:p.endMatchBegin);if(a||o){var h=this.findObserveGroups(e.substr(p.endMatchEnd),a,o,s,c);if(h===null)return null;var g=[m,h.match_];return{match_:l?g.join(""):g,remainder:h.remainder};}else return{match_:m,remainder:e.substr(p.endMatchEnd)};},match_:function match_(e,t){var n=V.patterns.patterns[e];if(n===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+e+")"];if(_typeof(n)=="function")return V.patterns.patterns[e](t);var r=t.match(n);if(r){var i;return i=r[2]?[r[1],r[2]]:r[1]?r[1]:r[0],{match_:i,remainder:t.substr(r[0].length)};}return null;}},actions:{"a=":function a(e,t){e.a=(e.a||"")+t;},"b=":function b(e,t){e.b=(e.b||"")+t;},"p=":function p(e,t){e.p=(e.p||"")+t;},"o=":function o(e,t){e.o=(e.o||"")+t;},"q=":function q(e,t){e.q=(e.q||"")+t;},"d=":function d(e,t){e.d=(e.d||"")+t;},"rm=":function rm(e,t){e.rm=(e.rm||"")+t;},"text=":function text(e,t){e.text_=(e.text_||"")+t;},insert:function insert(e,t,n){return{type_:n};},"insert+p1":function insertP1(e,t,n){return{type_:n,p1:t};},"insert+p1+p2":function insertP1P2(e,t,n){return{type_:n,p1:t[0],p2:t[1]};},copy:function copy(e,t){return t;},rm:function rm(e,t){return{type_:"rm",p1:t||""};},text:function text(e,t){return V.go(t,"text");},"{text}":function text(e,t){var n=["{"];return V.concatArray(n,V.go(t,"text")),n.push("}"),n;},"tex-math":function texMath(e,t){return V.go(t,"tex-math");},"tex-math tight":function texMath_tight(e,t){return V.go(t,"tex-math tight");},bond:function bond(e,t,n){return{type_:"bond",kind_:n||t};},"color0-output":function color0Output(e,t){return{type_:"color0",color:t[0]};},ce:function ce(e,t){return V.go(t);},"1/2":function _2(e,t){var n=[];t.match(/^[+\-]/)&&(n.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,""),n.push({type_:"frac",p1:r[1],p2:r[2]}),r[3]&&(r[3]=r[3].replace(/\$/g,""),n.push({type_:"tex-math",p1:r[3]})),n;},"9,9":function _(e,t){return V.go(t,"9,9");}},createTransitions:function createTransitions(e){var t,n,r,i,a={};for(t in e)for(n in e[t])for(r=n.split("|"),e[t][n].stateArray=r,i=0;i<r.length;i++)a[r[i]]=[];for(t in e)for(n in e[t])for(r=e[t][n].stateArray||[],i=0;i<r.length;i++){var o=e[t][n];if(o.action_){o.action_=[].concat(o.action_);for(var s=0;s<o.action_.length;s++)_typeof(o.action_[s])=="string"&&(o.action_[s]={type_:o.action_[s]});}else o.action_=[];for(var c=t.split("|"),l=0;l<c.length;l++)if(r[i]==="*")for(var u in a)a[u].push({pattern:c[l],task:o});else a[r[i]].push({pattern:c[l],task:o});}return a;},stateMachines:{}};V.stateMachines={ce:{transitions:V.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"}},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 o_after_d(e,t){var n;if((e.d||"").match(/^[0-9]+$/)){var r=e.d;e.d=void 0,n=this.output(e),e.b=r;}else n=this.output(e);return V.actions["o="](e,t),n;},"d= kv":function d_kv(e,t){e.d=t,e.dType="kv";},"charge or bond":function charge_or_bond(e,t){if(e.beginsWithBond){var n=[];return V.concatArray(n,this.output(e)),V.concatArray(n,V.actions.bond(e,t,"-")),n;}else e.d=t;},"- after o/d":function _after_o_d(e,t,n){var r=V.patterns.match_("orbital",e.o||""),i=V.patterns.match_("one lowercase greek letter $",e.o||""),a=V.patterns.match_("one lowercase latin letter $",e.o||""),o=V.patterns.match_("$one lowercase latin letter$ $",e.o||""),s=t==="-"&&(r&&r.remainder===""||i||a||o);s&&!e.a&&!e.b&&!e.p&&!e.d&&!e.q&&!r&&a&&(e.o="$"+e.o+"$");var c=[];return s?(V.concatArray(c,this.output(e)),c.push({type_:"hyphen"})):(r=V.patterns.match_("digits",e.d||""),n&&r&&r.remainder===""?(V.concatArray(c,V.actions["d="](e,t)),V.concatArray(c,this.output(e))):(V.concatArray(c,this.output(e)),V.concatArray(c,V.actions.bond(e,t,"-")))),c;},"a to o":function a_to_o(e){e.o=e.a,e.a=void 0;},"sb=true":function sbTrue(e){e.sb=!0;},"sb=false":function sbFalse(e){e.sb=!1;},"beginsWithBond=true":function beginsWithBondTrue(e){e.beginsWithBond=!0;},"beginsWithBond=false":function beginsWithBondFalse(e){e.beginsWithBond=!1;},"parenthesisLevel++":function parenthesisLevel(e){e.parenthesisLevel++;},"parenthesisLevel--":function parenthesisLevel(e){e.parenthesisLevel--;},"state of aggregation":function state_of_aggregation(e,t){return{type_:"state of aggregation",p1:V.go(t,"o")};},comma:function comma(e,t){var n=t.replace(/\s*$/,"");return n!==t&&e.parenthesisLevel===0?{type_:"comma enumeration L",p1:n}:{type_:"comma enumeration M",p1:n};},output:function output(e,t,n){var r;if(!e.r)r=[],!e.a&&!e.b&&!e.p&&!e.o&&!e.q&&!e.d&&!n||(e.sb&&r.push({type_:"entitySkip"}),!e.o&&!e.q&&!e.d&&!e.b&&!e.p&&n!==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==="kv"&&V.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:V.go(e.a,"a"),b:V.go(e.b,"bd"),p:V.go(e.p,"pq"),o:V.go(e.o,"o"),q:V.go(e.q,"pq"),d:V.go(e.d,e.dType==="oxidation"?"oxidation":"bd"),dType:e.dType}));else{var i=e.rdt==="M"?V.go(e.rd,"tex-math"):e.rdt==="T"?[{type_:"text",p1:e.rd||""}]:V.go(e.rd),a=e.rqt==="M"?V.go(e.rq,"tex-math"):e.rqt==="T"?[{type_:"text",p1:e.rq||""}]:V.go(e.rq);r={type_:"arrow",r:e.r,rd:i,rq:a};}for(var o in e)o!=="parenthesisLevel"&&o!=="beginsWithBond"&&delete e[o];return r;},"oxidation-output":function oxidationOutput(e,t){var n=["{"];return V.concatArray(n,V.go(t,"oxidation")),n.push("}"),n;},"frac-output":function fracOutput(e,t){return{type_:"frac-ce",p1:V.go(t[0]),p2:V.go(t[1])};},"overset-output":function oversetOutput(e,t){return{type_:"overset",p1:V.go(t[0]),p2:V.go(t[1])};},"underset-output":function undersetOutput(e,t){return{type_:"underset",p1:V.go(t[0]),p2:V.go(t[1])};},"underbrace-output":function underbraceOutput(e,t){return{type_:"underbrace",p1:V.go(t[0]),p2:V.go(t[1])};},"color-output":function colorOutput(e,t){return{type_:"color",color1:t[0],color2:V.go(t[1])};},"r=":function r(e,t){e.r=t;},"rdt=":function rdt(e,t){e.rdt=t;},"rd=":function rd(e,t){e.rd=t;},"rqt=":function rqt(e,t){e.rqt=t;},"rq=":function rq(e,t){e.rq=t;},operator:function operator(e,t,n){return{type_:"operator",kind_:n||t};}}},a:{transitions:V.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:V.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:V.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 output(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var n in e)delete e[n];return t;}}}},pq:{transitions:V.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 state_of_aggregation(e,t){return{type_:"state of aggregation subscript",p1:V.go(t,"o")};},"color-output":function colorOutput(e,t){return{type_:"color",color1:t[0],color2:V.go(t[1],"pq")};}}},bd:{transitions:V.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 colorOutput(e,t){return{type_:"color",color1:t[0],color2:V.go(t[1],"bd")};}}},oxidation:{transitions:V.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function romanNumeral(e,t){return{type_:"roman numeral",p1:t||""};}}},"tex-math":{transitions:V.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function output(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var n in e)delete e[n];return t;}}}},"tex-math tight":{transitions:V.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function tight_operator(e,t){e.o=(e.o||"")+"{"+t+"}";},output:function output(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var n in e)delete e[n];return t;}}}},"9,9":{transitions:V.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function comma(){return{type_:"commaDecimal"};}}},pu:{transitions:V.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 enumber(e,t){var n=[];return t[0]==="+-"||t[0]==="+/-"?n.push("\\pm "):t[0]&&n.push(t[0]),t[1]&&(V.concatArray(n,V.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?V.concatArray(n,V.go(t[2],"pu-9,9")):n.push(t[2])),(t[3]||t[4])&&(t[3]==="e"||t[4]==="*"?n.push({type_:"cdot"}):n.push({type_:"times"}))),t[5]&&n.push("10^{"+t[5]+"}"),n;},"number^":function number(e,t){var n=[];return t[0]==="+-"||t[0]==="+/-"?n.push("\\pm "):t[0]&&n.push(t[0]),V.concatArray(n,V.go(t[1],"pu-9,9")),n.push("^{"+t[2]+"}"),n;},operator:function operator(e,t,n){return{type_:"operator",kind_:n||t};},space:function space(){return{type_:"pu-space-1"};},output:function output(e){var t,n=V.patterns.match_("{(...)}",e.d||"");n&&n.remainder===""&&(e.d=n.match_);var r=V.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 i={d:V.go(e.d,"pu"),q:V.go(e.q,"pu")};e.o==="//"?t={type_:"pu-frac",p1:i.d,p2:i.q}:(t=i.d,i.d.length>1||i.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),V.concatArray(t,i.q));}else t=V.go(e.d,"pu-2");for(var a in e)delete e[a];return t;}}},"pu-2":{transitions:V.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 cdot(){return{type_:"tight cdot"};},"^(-1)":function _(e,t){e.rm+="^{"+t+"}";},space:function space(){return{type_:"pu-space-2"};},output:function output(e){var t=[];if(e.rm){var n=V.patterns.match_("{(...)}",e.rm||"");t=n&&n.remainder===""?V.go(n.match_,"pu"):{type_:"rm",p1:e.rm};}for(var r in e)delete e[r];return t;}}},"pu-9,9":{transitions:V.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 comma(){return{type_:"commaDecimal"};},"output-0":function output0(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var n=e.text_.length%3;n===0&&(n=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,n)),t.reverse();}else t.push(e.text_);for(var i in e)delete e[i];return t;},"output-o":function outputO(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var n=e.text_.length-3,r=0;r<n;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 i in e)delete e[i];return t;}}}};var H={go:function go(e,t){if(!e)return"";for(var n="",r=!1,i=0;i<e.length;i++){var a=e[i];_typeof(a)=="string"?n+=a:(n+=H._go2(a),a.type_==="1st-level escape"&&(r=!0));}return!t&&!r&&n&&(n="{"+n+"}"),n;},_goInner:function _goInner(e){return e&&H.go(e,!0);},_go2:function _go2(e){var t;switch(e.type_){case"chemfive":t="";var n={a:H._goInner(e.a),b:H._goInner(e.b),p:H._goInner(e.p),o:H._goInner(e.o),q:H._goInner(e.q),d:H._goInner(e.d)};n.a&&(n.a.match(/^[+\-]/)&&(n.a="{"+n.a+"}"),t+=n.a+"\\,"),(n.b||n.p)&&(t+="{\\vphantom{X}}",t+="^{\\hphantom{"+(n.b||"")+"}}_{\\hphantom{"+(n.p||"")+"}}",t+="{\\vphantom{X}}",t+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(n.b||"")+"}}",t+="_{\\vphantom{2}\\llap{\\smash[t]{"+(n.p||"")+"}}}"),n.o&&(n.o.match(/^[+\-]/)&&(n.o="{"+n.o+"}"),t+=n.o),e.dType==="kv"?((n.d||n.q)&&(t+="{\\vphantom{X}}"),n.d&&(t+="^{"+n.d+"}"),n.q&&(t+="_{\\smash[t]{"+n.q+"}}")):e.dType==="oxidation"?(n.d&&(t+="{\\vphantom{X}}",t+="^{"+n.d+"}"),n.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+n.q+"}}")):(n.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+n.q+"}}"),n.d&&(t+="{\\vphantom{X}}",t+="^{"+n.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 "+H._goInner(e.p1);break;case"state of aggregation subscript":t="\\mskip1mu "+H._goInner(e.p1);break;case"bond":if(t=H._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 i="\\frac{"+H._goInner(e.p1)+"}{"+H._goInner(e.p2)+"}";t="\\mathchoice{\\textstyle"+i+"}{"+i+"}{"+i+"}{"+i+"}";break;case"tex-math":t=e.p1+" ";break;case"frac-ce":t="\\frac{"+H._goInner(e.p1)+"}{"+H._goInner(e.p2)+"}";break;case"overset":t="\\overset{"+H._goInner(e.p1)+"}{"+H._goInner(e.p2)+"}";break;case"underset":t="\\underset{"+H._goInner(e.p1)+"}{"+H._goInner(e.p2)+"}";break;case"underbrace":t="\\underbrace{"+H._goInner(e.p1)+"}_{"+H._goInner(e.p2)+"}";break;case"color":t="{\\color{"+e.color1+"}{"+H._goInner(e.color2)+"}}";break;case"color0":t="\\color{"+e.color+"}";break;case"arrow":var a={rd:H._goInner(e.rd),rq:H._goInner(e.rq)},o=H._getArrow(e.r);a.rd||a.rq?e.r==="<=>"||e.r==="<=>>"||e.r==="<<=>"||e.r==="<-->"?(o="\\long"+o,a.rd&&(o="\\overset{"+a.rd+"}{"+o+"}"),a.rq&&(o=e.r==="<-->"?"\\underset{\\lower2mu{"+a.rq+"}}{"+o+"}":"\\underset{\\lower6mu{"+a.rq+"}}{"+o+"}"),o=" {}\\mathrel{"+o+"}{} "):(a.rq&&(o+="[{"+a.rq+"}]"),o+="{"+a.rd+"}",o=" {}\\mathrel{\\x"+o+"}{} "):o=" {}\\mathrel{\\long"+o+"}{} ",t=o;break;case"operator":t=H._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 _getArrow(e){switch(e){case"->":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"leftrightarrows";case"<=>":return"rightleftharpoons";case"\u21CC":return"rightleftharpoons";case"<=>>":return"Rightleftharpoons";case"<<=>":return"Leftrightharpoons";default:throw["MhchemBugT","mhchem bug T. Please report."];}},_getBond:function _getBond(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 _getOperator(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."];}}},ru=function(_L13){function e(_e272){var _this17;_classCallCheck(this,e);_this17=_callSuper(this,e,[l(c({},_e272),{type:"delim"})]),_this17.value=_e272.delim,_this17.size=_e272.size;return _this17;}_inherits(e,_L13);return _createClass(e,[{key:"toJson",value:function toJson(){return l(c({},_superPropGet(e,"toJson",this,3)([])),{delim:this.value,size:this.size});}},{key:"render",value:function render(_e273){return new F(this.value,{type:"middle"});}},{key:"_serialize",value:function _serialize(_e274){if(!(_e274.expandMacro||_e274.skipStyles||_e274.skipPlaceholders)&&_typeof(this.verbatimLatex)=="string")return this.verbatimLatex;var t=ft(this.command,this.mode);return t!=null&&t.serialize?t.serialize(this,_e274):P(this.command,this.value);}}],[{key:"fromJson",value:function fromJson(t){return new e(t);}}]);}(L),iu=function(_L14){function e(_e275){var _this18;_classCallCheck(this,e);_this18=_callSuper(this,e,[l(c({},_e275),{type:"sizeddelim",value:_e275.delim})]),_this18.delimType=_e275.delimType,_this18.size=_e275.size;return _this18;}_inherits(e,_L14);return _createClass(e,[{key:"toJson",value:function toJson(){return l(c({},_superPropGet(e,"toJson",this,3)([])),{delim:this.value,size:this.size,delimType:this.delimType});}},{key:"render",value:function render(_e276){var t=gl(this.value,this.size,_e276,{classes:{open:"ML__open",close:"ML__close"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return t?(t=this.bind(_e276,t),this.caret&&(t.caret=this.caret),t):null;}},{key:"_serialize",value:function _serialize(_e277){if(!(_e277.expandMacro||_e277.skipStyles||_e277.skipPlaceholders)&&_typeof(this.verbatimLatex)=="string")return this.verbatimLatex;var t=ft(this.command,this.mode);return t!=null&&t.serialize?t.serialize(this,_e277):P(this.command,this.value);}}],[{key:"fromJson",value:function fromJson(t){return new e(t);}}]);}(L);function au(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">");}var ou=function(_L15){function e(_e278,t,n,r){var _this19;_classCallCheck(this,e);var i,a;_this19=_callSuper(this,e,[{type:"enclose",command:_e278,style:r.style}]),_this19.body=t,_this19.backgroundcolor=r.backgroundcolor,n.updiagonalarrow&&(n.updiagonalstrike=!1),n.box&&(n.left=!1,n.right=!1,n.bottom=!1,n.top=!1),_this19.notation=n,_this19.shadow=(i=r.shadow)==null?"none":i,_this19.strokeWidth=(a=r.strokeWidth)==null?"0.06em":a,_this19.strokeWidth||(_this19.strokeWidth="0.06em"),_this19.strokeStyle=r.strokeStyle,_this19.svgStrokeStyle=r.svgStrokeStyle,_this19.strokeColor=r.strokeColor,_this19.borderStyle=r.borderStyle,_this19.padding=r.padding,_this19.captureSelection=!1;return _this19;}_inherits(e,_L15);return _createClass(e,[{key:"toJson",value:function toJson(){return l(c({},_superPropGet(e,"toJson",this,3)([])),{notation:this.notation,shadow:this.shadow,strokeWidth:this.strokeWidth,strokeStyle:this.strokeStyle,svgStrokeStyle:this.svgStrokeStyle,strokeColor:this.strokeColor,borderStyle:this.borderStyle,padding:this.padding});}},{key:"_serialize",value:function _serialize(_e279){var t;if(!(_e279.expandMacro||_e279.skipStyles||_e279.skipPlaceholders)&&_typeof(this.verbatimLatex)=="string")return this.verbatimLatex;var n=ft(this.command,this.mode);if(n!=null&&n.serialize)return n.serialize(this,_e279);var r=(t=this.command)==null?"":t;if(this.command==="\\enclose"){r+="{"+Object.keys(this.notation).join(" ")+"}";var _e280="",_t96="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(_e280+=_t96+"mathbackground=\""+this.backgroundcolor+"\"",_t96=","),this.shadow&&this.shadow!=="auto"&&(_e280+=_t96+"shadow=\""+this.shadow+"\"",_t96=","),this.strokeWidth||this.strokeStyle!=="solid"?(_e280+=_t96+this.borderStyle,_t96=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(_e280+=_t96+"mathcolor=\""+this.strokeColor+"\"",_t96=","),_e280&&(r+="[".concat(_e280,"]"));}return P(r,this.bodyToLatex(_e279));}},{key:"render",value:function render(_e281){var t,n,r,i,a;var o=new I({parent:_e281},this.style),s=L.createBox(o,this.body);if(!s)return null;var c=cu(this.borderStyle),l=o.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");var u=new F(null,{classes:"ML__notation"}),d=s.height+s.depth+2*l,f=s.width+2*l,p="",m=Math.min(l*.2,.05);if(this.notation.horizontalstrike){var _e282=2*l+s.height-Bo/2;p+=this.line((l+m).toString(),_e282.toString(),(l+s.width-m).toString(),_e282.toString());}if(this.notation.verticalstrike){var _e283=l+s.width/2;p+=this.line(_e283.toString(),(l+m).toString(),_e283.toString(),(d-l-m).toString());}if(this.notation.updiagonalstrike&&(p+=this.line((l+m).toString(),(d-l-m).toString(),(l+s.width-m).toString(),(l+m).toString())),this.notation.downdiagonalstrike&&(p+=this.line((l+m).toString(),(l+m).toString(),(l+s.width-m).toString(),(d-l-m).toString())),this.notation.updiagonalarrow){p+=this.line(l.toString(),(2*l+s.depth+s.height).toString(),(l+s.width).toString(),l.toString());var _e284=.03*Math.sqrt(f*f+d*d)*1,_n64=s.width*_e284,_r26=(s.depth+s.height)*_e284,_i40=l+s.width,_a17=l;_a17+_r26-.4*_n64<0&&(_a17=.4*_n64-_r26),p+="<polygon points=\"",p+="".concat(_i40,",").concat(_a17," ").concat(_i40-_n64-.4*_r26,",").concat(_a17+_r26-.4*_n64," "),p+="".concat(_i40-.7*_n64,",").concat(_a17+.7*_r26," ").concat(_i40-_n64+.4*_r26,",").concat(_a17+_r26+.4*_n64," "),p+="".concat(_i40,",").concat(_a17),p+="\" stroke='none' fill=\"".concat(au((t=this.strokeColor)==null?"":t),"\""),p+="/>";}var h=0;if(this.notation.phasorangle){var _e285=uu(o),_t97=(s.height+s.depth+2*_e285+2*l).toString(),_n65=(s.height+s.depth)/2;p+=this.line(l.toString(),_t97,(l+_n65+s.width).toString(),_t97),p+=this.line(l.toString(),_t97,(l+_n65).toString(),(l-_e285).toString()),d+=_e285,h=_n65,s.left+=d/2-l;}if(this.notation.longdiv){var _e286=uu(o);d+=_e286,p+=this.line(l.toString(),l.toString(),(l+s.width).toString(),l.toString());var _t98=.3;h=_t98+_e286,s.left+=_t98+_e286,s.setTop(l+_e286),p+="<path d=\"",p+="M ".concat(l," ").concat(l," a").concat(_t98," ").concat((s.depth+s.height+2*_e286)/2,", 0, 1, 1, 0 ").concat(s.depth+s.height+2*_e286," \""),p+=" stroke-width=\"".concat(lu(o),"\" stroke=\"").concat(au((n=this.strokeColor)==null?"":n),"\" fill=\"none\""),p+="/>";}if(u.width=s.width+2*l+h,u.height=s.height+2*l,u.depth=s.depth,u.setStyle("box-sizing","border-box"),u.setStyle("left","calc(-1 * ".concat(c," - ").concat(l,"em)")),u.setStyle("height","calc( ".concat(s.height+s.depth+2*l,"em + ").concat(c,")")),u.setStyle("top","0em"),u.setStyle("width","calc(".concat(s.width+2*l,"em + ").concat(c,")")),this.backgroundcolor&&u.setStyle("background-color",this.backgroundcolor),this.notation.box&&u.setStyle("border","1px solid red"),this.notation.actuarial&&(u.setStyle("border-top",this.borderStyle),u.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(u.setStyle("border-bottom",this.borderStyle),u.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(u.setStyle("border-radius","8px"),u.setStyle("border",this.borderStyle)),this.notation.circle&&(u.setStyle("border-radius","50%"),u.setStyle("border",this.borderStyle)),this.notation.top&&u.setStyle("border-top",this.borderStyle),this.notation.left&&u.setStyle("border-left",this.borderStyle),this.notation.right&&u.setStyle("border-right",this.borderStyle),this.notation.bottom&&u.setStyle("border-bottom",this.borderStyle),p){var _e287="";this.shadow==="auto"&&(_e287+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(_e287+="filter: drop-shadow(".concat(au((r=this.shadow)==null?"":r),")")),_e287+=" stroke-width=\"".concat(au((i=this.strokeWidth)==null?"":i),"\" stroke=\"").concat(au((a=this.strokeColor)==null?"":a),"\""),_e287+=" stroke-linecap=\"round\"",this.svgStrokeStyle&&(_e287+=" stroke-dasharray=\"".concat(au(this.svgStrokeStyle),"\"")),u.svgStyle=_e287,u.svgOverlay=p;}var g=new F([u,s]);return g.setStyle("position","relative"),g.setStyle("height","".concat(Math.floor(100*(u.depth+u.height))/100,"em")),g.setStyle("display","inline-block"),g.height=u.height,g.depth=u.depth,g.width=u.width-2*l,g.left=l,g.right=l,this.caret&&(g.caret=this.caret),g.wrap(o);}},{key:"line",value:function line(_e288,t,n,r){return"<line x1=\"".concat(su(_e288),"\" y1=\"").concat(su(t),"\" x2=\"").concat(su(n),"\" y2=\"").concat(su(r),"\" vector-effect=\"non-scaling-stroke\"></line>");}}],[{key:"fromJson",value:function fromJson(t){return new e(t.command,t.body,t.notation,t);}}]);}(L);function su(e){return _typeof(e)=="number"?"".concat(Math.floor(100*e)/100,"%"):e;}function cu(e){if(!e)return"1px";var t=e.match(/([0-9][a-zA-Z\%]+)/);return t===null?"1px":t[1];}function lu(e){return(Math.floor(100*e.metrics.sqrtRuleThickness/e.scalingFactor)/100/10).toString()+"em";}function uu(e){var t=e.isDisplayStyle?Bo:e.metrics.defaultRuleThickness;return e.metrics.defaultRuleThickness+e.scalingFactor*t/4;}var du={fractionNavigationOrder:"numerator-denominator"},fu=function(_L16){function e(_e289,t,n){var _this20;_classCallCheck(this,e);var r,i,a;_this20=_callSuper(this,e,[l(c({},n),{type:"genfrac",displayContainsHighlight:!0})]),_this20.above=_e289,_this20.below=t,_this20.hasBarLine=(r=n==null?void 0:n.hasBarLine)==null?!0:r,_this20.continuousFraction=(i=n==null?void 0:n.continuousFraction)==null?!1:i,_this20.align=(a=n==null?void 0:n.align)==null?"center":a,_this20.numerPrefix=n==null?void 0:n.numerPrefix,_this20.denomPrefix=n==null?void 0:n.denomPrefix,_this20.mathstyleName=n==null?void 0:n.mathstyleName,_this20.leftDelim=n==null?void 0:n.leftDelim,_this20.rightDelim=n==null?void 0:n.rightDelim;return _this20;}_inherits(e,_L16);return _createClass(e,[{key:"toJson",value:function toJson(){var _e290={};return this.continuousFraction&&(_e290.continuousFraction=!0),this.align!=="center"&&(_e290.align=this.align),this.numerPrefix&&(_e290.numerPrefix=this.numerPrefix),this.denomPrefix&&(_e290.denomPrefix=this.denomPrefix),this.leftDelim&&(_e290.leftDelim=this.leftDelim),this.rightDelim&&(_e290.rightDelim=this.rightDelim),this.hasBarLine||(_e290.hasBarLine=!1),this.mathstyleName&&(_e290.mathstyleName=this.mathstyleName),c(c({},_superPropGet(e,"toJson",this,3)([])),_e290);}},{key:"children",get:function get(){if(this._children)return this._children;var _e291=[];if(du.fractionNavigationOrder==="denominator-numerator"){var _iterator72=_createForOfIteratorHelper(this.below),_step72;try{for(_iterator72.s();!(_step72=_iterator72.n()).done;){var _t99=_step72.value;_e291.push.apply(_e291,_toConsumableArray(_t99.children)),_e291.push(_t99);}}catch(err){_iterator72.e(err);}finally{_iterator72.f();}var _iterator73=_createForOfIteratorHelper(this.above),_step73;try{for(_iterator73.s();!(_step73=_iterator73.n()).done;){var _t100=_step73.value;_e291.push.apply(_e291,_toConsumableArray(_t100.children)),_e291.push(_t100);}}catch(err){_iterator73.e(err);}finally{_iterator73.f();}}else{var _iterator74=_createForOfIteratorHelper(this.above),_step74;try{for(_iterator74.s();!(_step74=_iterator74.n()).done;){var _t101=_step74.value;_e291.push.apply(_e291,_toConsumableArray(_t101.children)),_e291.push(_t101);}}catch(err){_iterator74.e(err);}finally{_iterator74.f();}var _iterator75=_createForOfIteratorHelper(this.below),_step75;try{for(_iterator75.s();!(_step75=_iterator75.n()).done;){var _t102=_step75.value;_e291.push.apply(_e291,_toConsumableArray(_t102.children)),_e291.push(_t102);}}catch(err){_iterator75.e(err);}finally{_iterator75.f();}}return this._children=_e291,_e291;}},{key:"render",value:function render(_e292){var t,n;var r=new I({parent:_e292,mathstyle:this.mathstyleName},this.style),i=r.metrics,a=new I({parent:r,mathstyle:this.continuousFraction?"":"numerator"},this.style),o=this.numerPrefix?new F([new F(this.numerPrefix),L.createBox(a,this.above)],{isTight:a.isTight,type:"ignore"}):(t=L.createBox(a,this.above,{type:"ignore"}))==null?new F(null,{type:"ignore"}):t,s=new I({parent:r,mathstyle:this.continuousFraction?"":"denominator"},this.style),c=this.denomPrefix?new F([new F(this.denomPrefix),L.createBox(s,this.below,{type:"ignore"})]):(n=L.createBox(s,this.below,{type:"ignore"}))==null?new F(null,{type:"ignore"}):n,l=this.hasBarLine?i.defaultRuleThickness:0,u,d=0,f;r.isDisplayStyle?(u=a.metrics.num1,d=l>0?3*l:7*l,f=s.metrics.denom1):(l>0?(u=a.metrics.num2,d=l):(u=a.metrics.num3,d=3*i.defaultRuleThickness),f=s.metrics.denom2);var p=[];this.isSelected&&p.push("ML__selected");var m=o.depth,h=c.height,g;if(l<=0){var _e293=u-m-(h-f);_e293<d&&(u+=(d-_e293)/2,f+=(d-_e293)/2),g=new js({individualShift:[{box:o,shift:-u,classes:[].concat(p,[pu(this.align)])},{box:c,shift:f,classes:[].concat(p,[pu(this.align)])}]}).wrap(r);}else{var _e294=new F(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});_e294.softWidth=Math.max(o.width,c.width),_e294.height=l/2,_e294.depth=l/2;var _t103=Ro+l/2;u<d+m+_t103&&(u=d+m+_t103);var _n66=Ro-l/2;f<d+h-_n66&&(f=d+h-_n66),g=new js({individualShift:[{box:c,shift:f,classes:[].concat(p,[pu(this.align)])},{box:_e294,shift:-_n66,classes:p},{box:o,shift:-u,classes:[].concat(p,[pu(this.align)])}]}).wrap(r);}var _=r.isDisplayStyle?i.delim1:i.delim2,v=this.leftDelim?this.bind(_e292,Sl("open",this.leftDelim,_,!0,_e292,{style:this.style,mode:this.mode,isSelected:this.isSelected})):wl(r,"ML__open"),y=null;y=this.continuousFraction?new F(null,{type:"close"}):this.rightDelim?this.bind(_e292,Sl("close",this.rightDelim,_,!0,_e292,{style:this.style,mode:this.mode,isSelected:this.isSelected})):wl(r,"ML__close");var b=new F([v,g,y],{isTight:r.isTight,type:"inner",classes:"ML__mfrac"}),x=this.bind(_e292,b);return this.caret&&(x.caret=this.caret),this.attachSupsub(_e292,{base:x});}}],[{key:"fromJson",value:function fromJson(t){return new e(t.above,t.below,t);}}]);}(L);function pu(e){var t;return(t={left:"ML__left",right:"ML__right",center:"ML__center"}[e])==null?"ML__center":t;}var mu=function(_L17){function e(_e295,t){var _this21;_classCallCheck(this,e);var n;_this21=_callSuper(this,e,[{type:"latex",value:_e295,mode:"latex"}]),_this21.isSuggestion=(n=t==null?void 0:t.isSuggestion)==null?!1:n,_this21.isError=!1;return _this21;}_inherits(e,_L17);return _createClass(e,[{key:"toJson",value:function toJson(){var _e296={};return this.isSuggestion&&(_e296.isSuggestion=!0),this.isError&&(_e296.isError=!0),c({type:"latex",value:this.value},_e296);}},{key:"render",value:function render(_e297){var t=new F(this.value,{classes:this.isSuggestion?"ML__suggestion":this.isError?"ML__error":"",type:"latex",maxFontSize:1});return t?(this.caret&&(t.caret=this.caret),this.bind(_e297,t)):null;}}],[{key:"fromJson",value:function fromJson(t){var n=new e(t.value);return t.isSuggestion&&(n.isSuggestion=!0),t.isError&&(n.isError=!0),n;}}]);}(L),hu=function(_L18){function e(){var _this22;var _e298=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";_classCallCheck(this,e);_this22=_callSuper(this,e,[{type:"latexgroup",mode:"latex"}]),_this22.body=_toConsumableArray(_e298).map(function(_e299){return new mu(_e299);}),_this22.skipBoundary=!0;return _this22;}_inherits(e,_L18);return _createClass(e,[{key:"toJson",value:function toJson(){return _superPropGet(e,"toJson",this,3)([]);}},{key:"render",value:function render(_e300){var t=L.createBox(_e300,this.body);return t?(this.caret&&(t.caret=this.caret),this.bind(_e300,t)):null;}},{key:"_serialize",value:function _serialize(_e301){var t,n;return(n=(t=this.body)==null?void 0:t.map(function(_e302){return _e302.value;}).join(""))==null?"":n;}}],[{key:"fromJson",value:function fromJson(t){return new e();}}]);}(L),gu=function(_L19){function e(_e303,t){var _this23;_classCallCheck(this,e);_this23=_callSuper(this,e,[l(c({},t),{type:"extensible-symbol",isFunction:t==null?void 0:t.isFunction})]),_this23.value=_e303,_this23.variant=t==null?void 0:t.variant,_this23.subsupPlacement=t==null?void 0:t.limits;return _this23;}_inherits(e,_L19);return _createClass(e,[{key:"toJson",value:function toJson(){var _e304=_superPropGet(e,"toJson",this,3)([]);return this.variant&&(_e304.variant=this.variant),this.subsupPlacement&&(_e304.limits=this.subsupPlacement),this.value&&(_e304.symbol=this.value),_e304;}},{key:"render",value:function render(_e305){var t;var n=_e305.isDisplayStyle&&this.value!=="\\smallint",r=new F(this.value,{fontFamily:n?"Size2-Regular":"Size1-Regular",classes:"ML__op-symbol "+(n?"ML__large-op":"ML__small-op"),type:"op",maxFontSize:_e305.scalingFactor,isSelected:this.isSelected});if(!r)return null;r.right=r.italic;var i=(r.height-r.depth)/2-Ro*_e305.scalingFactor,a=r.italic;r.setTop(i);var o=r;if(this.superscript||this.subscript){var _n67=(t=this.subsupPlacement)==null?"auto":t;_n67==="auto"&&_e305.isDisplayStyle&&(_n67="over-under"),o=_n67==="over-under"?this.attachLimits(_e305,{base:r,baseShift:i,slant:a}):this.attachSupsub(_e305,{base:r});}return new F(this.bind(_e305,o),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"ML__op-group"}).wrap(_e305);}},{key:"_serialize",value:function _serialize(_e306){if(!(_e306.expandMacro||_e306.skipStyles||_e306.skipPlaceholders)&&_typeof(this.verbatimLatex)=="string")return this.verbatimLatex;var t=ft(this.command,this.mode);if(t!=null&&t.serialize)return t.serialize(this,_e306);var n=[];return n.push(this.command),this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&n.push("\\limits"),this.subsupPlacement==="adjacent"&&n.push("\\nolimits"),this.subsupPlacement==="auto"&&n.push("\\displaylimits")),n.push(this.supsubToLatex(_e306)),N(n);}}],[{key:"fromJson",value:function fromJson(t){return new e(t.symbol,t);}}]);}(L),_u=function(_L20){function e(_e307){var _this24;_classCallCheck(this,e);var t=_e307.body;_this24=_callSuper(this,e,[l(c({},_e307),{type:"overlap",body:_typeof(t)=="string"?[new L({value:t})]:t,style:_e307==null?void 0:_e307.style})]),_this24.skipBoundary=!0,_this24.align=_e307==null?void 0:_e307.align,_this24.boxType=_e307==null?void 0:_e307.boxType;return _this24;}_inherits(e,_L20);return _createClass(e,[{key:"toJson",value:function toJson(){var _e308={};return this.align&&(_e308.align=this.align),this.boxType&&(_e308.boxType=this.boxType),c(c({},_superPropGet(e,"toJson",this,3)([])),_e308);}},{key:"render",value:function render(_e309){var t=L.createBox(_e309,this.body,{classes:"ML__inner"});return t?(this.caret&&(t.caret=this.caret),this.bind(_e309,new F([t,new F(null,{classes:"ML__fix"})],{classes:this.align==="right"?"ML__rlap":"ML__llap",type:this.boxType}))):null;}}],[{key:"fromJson",value:function fromJson(t){return new e(t);}}]);}(L),vu=function(_L21){function e(_e310){var _this25;_classCallCheck(this,e);var t,n,r,i;_this25=_callSuper(this,e,[{type:"overunder",command:_e310.command,style:_e310.style,mode:_e310.mode,body:_e310.body,skipBoundary:(t=_e310.skipBoundary)==null?!0:t}]),_this25.subsupPlacement=_e310.supsubPlacement,_this25.svgAbove=_e310.svgAbove,_this25.svgBelow=_e310.svgBelow,_this25.svgBody=_e310.svgBody,_this25.above=_e310.above,_this25.below=_e310.below,_this25.boxType=(n=_e310.boxType)==null?"ord":n,_this25.paddedBody=(r=_e310.paddedBody)==null?!1:r,_this25.paddedLabels=(i=_e310.paddedLabels)==null?!1:i;return _this25;}_inherits(e,_L21);return _createClass(e,[{key:"toJson",value:function toJson(){var _e311=_superPropGet(e,"toJson",this,3)([]);return this.skipBoundary||(_e311.skipBoundary=!1),this.subsupPlacement&&(_e311.subsupPlacement=this.subsupPlacement),this.svgAbove&&(_e311.svgAbove=this.svgAbove),this.svgBelow&&(_e311.svgBelow=this.svgBelow),this.svgBody&&(_e311.svgBody=this.svgBody),this.boxType!=="ord"&&(_e311.boxType=this.boxType),this.paddedBody&&(_e311.paddedBody=!0),this.paddedLabels&&(_e311.paddedLabels=!0),_e311;}},{key:"render",value:function render(_e312){var t=this.svgBody?ws(this.svgBody):L.createBox(_e312,this.body,{type:"ignore"}),n=new I({parent:_e312,mathstyle:"scriptstyle"},this.style),r=null;this.svgAbove?r=ws(this.svgAbove):this.above&&(r=L.createBox(n,this.above,{type:"ignore"}));var i=null;this.svgBelow?i=ws(this.svgBelow):this.below&&(i=L.createBox(n,this.below,{type:"ignore"})),this.paddedBody&&(t=new F([wl(_e312,"ML__open"),t,wl(_e312,"ML__close")],{type:"ignore"}));var a=yu(_e312,{base:t,above:r,below:i,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return a?(a=this.subsupPlacement==="over-under"?this.attachLimits(_e312,{base:a,type:a.type}):this.attachSupsub(_e312,{base:a}),this.caret&&(a.caret=this.caret),this.bind(_e312,a)):null;}}],[{key:"fromJson",value:function fromJson(t){return new e(t);}}]);}(L);function yu(e,t){if(!t.base)return null;if(!t.above&&!t.below){var _e313=new F(t.base,{type:t.type});return _e313.setStyle("position","relative"),_e313;}var n=0;t.above&&(n=e.metrics.bigOpSpacing5);var r=null,i=t.base,a=["ML__center"];return t.paddedAboveBelow&&a.push("ML__label_padding"),t.below&&t.above?r=new js({bottom:e.metrics.bigOpSpacing5+t.below.height+t.below.depth+i.depth+0,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:a},{box:i,classes:["ML__center"]},n,{box:t.above,classes:a},e.metrics.bigOpSpacing5]}):t.below?r=new js({top:i.height-0,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:a},{box:i,classes:["ML__center"]}]}):t.above&&(r=new js({bottom:i.depth+0,children:[{box:i,classes:["ML__center"]},n,{box:t.above,classes:a},e.metrics.bigOpSpacing5]})),new F(r,{type:t.type});}var bu=function(_L22){function e(_e314){var _this26;_classCallCheck(this,e);var t,n,r,i;_this26=_callSuper(this,e,[l(c({},_e314),{type:"phantom"})]),_this26.captureSelection=!0,_this26.isInvisible=(t=_e314.isInvisible)==null?!1:t,_this26.smashDepth=(n=_e314.smashDepth)==null?!1:n,_this26.smashHeight=(r=_e314.smashHeight)==null?!1:r,_this26.smashWidth=(i=_e314.smashWidth)==null?!1:i;return _this26;}_inherits(e,_L22);return _createClass(e,[{key:"toJson",value:function toJson(){var _e315={};return this.isInvisible&&(_e315.isInvisible=!0),this.smashDepth&&(_e315.smashDepth=!0),this.smashHeight&&(_e315.smashHeight=!0),this.smashWidth&&(_e315.smashWidth=!0),c(c({},_superPropGet(e,"toJson",this,3)([])),_e315);}},{key:"render",value:function render(_e316){var t=new I({parent:_e316,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return this.isInvisible,L.createBox(t,this.body,{classes:"ML__inner"});var n=L.createBox(this.isInvisible?t:_e316,this.body);if(!n)return null;if(this.smashWidth)return new F([n,new F(null,{classes:"ML__fix"})],{classes:"ML__rlap"}).wrap(_e316);if(!this.smashHeight&&!this.smashDepth)return n;if(this.smashHeight&&(n.height=0),this.smashDepth&&(n.depth=0),n.children){var _iterator76=_createForOfIteratorHelper(n.children),_step76;try{for(_iterator76.s();!(_step76=_iterator76.n()).done;){var _e317=_step76.value;this.smashHeight&&(_e317.height=0),this.smashDepth&&(_e317.depth=0);}}catch(err){_iterator76.e(err);}finally{_iterator76.f();}}return new js({firstBaseline:[{box:n}]},{type:n.type}).wrap(_e316);}}],[{key:"fromJson",value:function fromJson(t){return new e(t);}}]);}(L),xu=function(_L23){function e(_e318){var _this27;_classCallCheck(this,e);var t;_this27=_callSuper(this,e,[c({type:"spacing"},_e318)]),_this27.width=_e318==null?void 0:_e318.width,_this27._braced=(t=_e318==null?void 0:_e318.braced)==null?!1:t;return _this27;}_inherits(e,_L23);return _createClass(e,[{key:"toJson",value:function toJson(){var _e319=_superPropGet(e,"toJson",this,3)([]);return this.width!==void 0&&(_e319.width=this.width),this._braced&&(_e319.braced=!0),_e319;}},{key:"render",value:function render(_e320){var t;if(this.command==="space")return new F(this.mode==="math"?null:" ");var n;return this.width===void 0?n=new F(null,{classes:(t={"\\qquad":"ML__qquad","\\quad":"ML__quad","\\enspace":"ML__enspace","\\;":"ML__thickspace","\\:":"ML__mediumspace","\\>":"ML__mediumspace","\\,":"ML__thinspace","\\!":"ML__negativethinspace"}[this.command])==null?"ML__mediumspace":t}):(n=new F(null,{classes:"ML__mspace"}),n.left=_e320.toEm(this.width)),n=this.bind(_e320,n),this.caret&&(n.caret=this.caret),n;}},{key:"_serialize",value:function _serialize(_e321){var t;if(!_e321.expandMacro&&_typeof(this.verbatimLatex)=="string")return this.verbatimLatex;var n=ft(this.command,this.mode);if(n!=null&&n.serialize)return n.serialize(this,_e321);var r=(t=this.command)==null?"":t;return this.width===void 0?r:this._braced&&!("register"in this.width)?"".concat(r,"{").concat(Js(this.width),"}"):"".concat(r).concat(Js(this.width));}}],[{key:"fromJson",value:function fromJson(t){return new e(t);}}]);}(L),Su=function(_L24){function e(_e322){var _this28;_classCallCheck(this,e);var t;_this28=_callSuper(this,e,[l(c({},_e322),{type:"surd",mode:(t=_e322.mode)==null?"math":t,style:_e322.style,displayContainsHighlight:!0,body:_e322.body})]),_this28.above=_e322.index;return _this28;}_inherits(e,_L24);return _createClass(e,[{key:"_serialize",value:function _serialize(_e323){if(!(_e323.expandMacro||_e323.skipStyles||_e323.skipPlaceholders)&&_typeof(this.verbatimLatex)=="string")return this.verbatimLatex;var t=ft(this.command,this.mode);if(t!=null&&t.serialize)return t.serialize(this,_e323);var n=this.command,r=this.bodyToLatex(_e323);return this.above&&!this.hasEmptyBranch("above")?P("".concat(n,"[").concat(this.aboveToLatex(_e323),"]"),r):/^[0-9]$/.test(r)?"".concat(n).concat(r):P(n,r);}},{key:"children",get:function get(){if(this._children)return this._children;var _e324=[];if(this.above){var _iterator77=_createForOfIteratorHelper(this.above),_step77;try{for(_iterator77.s();!(_step77=_iterator77.n()).done;){var _t104=_step77.value;_e324.push.apply(_e324,_toConsumableArray(_t104.children)),_e324.push(_t104);}}catch(err){_iterator77.e(err);}finally{_iterator77.f();}}if(this.body){var _iterator78=_createForOfIteratorHelper(this.body),_step78;try{for(_iterator78.s();!(_step78=_iterator78.n()).done;){var _t105=_step78.value;_e324.push.apply(_e324,_toConsumableArray(_t105.children)),_e324.push(_t105);}}catch(err){_iterator78.e(err);}finally{_iterator78.f();}}return this._children=_e324,_e324;}},{key:"render",value:function render(_e325){var t;var n=new I({parent:_e325,mathstyle:"cramp"},this.style),r=(t=L.createBox(n,this.body,{type:"inner"}))==null?new F(null):t,i=n.scalingFactor,a=n.metrics.defaultRuleThickness/i,o=_e325.isDisplayStyle?Bo:a,s=new F(null,{classes:"ML__sqrt-line",style:this.style});s.height=a,s.softWidth=r.width;var c=i*(a+o/4),l=Math.max(i*2*o,r.height+r.depth)+c+a,u=new I({parent:_e325},this.style),d=this.bind(u,new F(Sl("inner","\\surd",l,!1,u,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!d)return null;var f=d.height+d.depth-a;f>r.height+r.depth+c&&(c=(c+f-(r.height+r.depth))/2),d.setTop(d.height-r.height-c);var p=this.bind(_e325,new js({firstBaseline:[{box:new F(r)},c-2*a,{box:s},a]})),m=L.createBox(new I({parent:_e325,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!m){var _t106=new F([d,p],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return _t106.setStyle("display","inline-block"),_t106.setStyle("height",_t106.height+_t106.depth,"em"),this.caret&&(_t106.caret=this.caret),this.bind(_e325,_t106);}var h=new F([new F(new js({shift:-.6*(Math.max(d.height,p.height)-Math.max(d.depth,p.depth)),children:[{box:m}]}),{classes:"ML__sqrt-index",type:"ignore"}),d,p],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return h.height=d.height,h.depth=d.depth,this.caret&&(h.caret=this.caret),this.bind(_e325,h);}}],[{key:"fromJson",value:function fromJson(t){return new e(l(c({},t),{index:t.above}));}}]);}(L),Cu=function(_F2){function Cu(e){var _this29;_classCallCheck(this,Cu);_this29=_callSuper(this,Cu,[null,{type:"skip"}]),_this29._width=e;return _this29;}_inherits(Cu,_F2);return _createClass(Cu,[{key:"toMarkup",value:function toMarkup(){return"<span style=\"display:inline-block;width:".concat(Math.ceil(this.width*100)/100,"em\"></span>");}}]);}(F);function wu(e,t){if(!e.parent)return;var n=e.parent.children,r=n.indexOf(e),i=r-1;for(;i>=0&&n[i].type==="ignore";)--i;if(i<0&&e.parent.parent&&e.parent.type==="lift"){wu(e.parent,t);return;}r>0&&n[r-1].type==="skip"?n[r-1].width+=t:n.splice(r,0,new Cu(t));}var Tu={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}},Eu={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function Du(e){ku(e,function(e,t){t.type==="bin"&&(!e||/^(middle|bin|op|rel|open|punct)$/.test(e.type))&&(t.type="ord"),(e==null?void 0:e.type)==="bin"&&/^(rel|close|punct)$/.test(t.type)&&(e.type="ord"),t.type!=="ignore"&&(e=t);});}function Ou(e,t){if(!e.children)return e;var n=e.children;Du(n);var r=t.getRegisterAsEm("thinmuskip"),i=t.getRegisterAsEm("medmuskip"),a=t.getRegisterAsEm("thickmuskip");return ku(n,function(e,t){var n,o,s;if(!e)return;var c=e.type,l=t.isTight?(n=Eu[c])==null?null:n:(o=Tu[c])==null?null:o,u=(s=l==null?void 0:l[t.type])==null?null:s;u===3&&wu(t,r),u===4&&wu(t,i),u===5&&wu(t,a);}),e;}function ku(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:void 0;if(!e)return n;e=_toConsumableArray(e);var _iterator79=_createForOfIteratorHelper(e),_step79;try{for(_iterator79.s();!(_step79=_iterator79.n()).done;){var _r27=_step79.value;_r27.type==="lift"?n=ku(_r27.children,t,n):_r27.type==="ignore"?ku(_r27.children,t):(t(n,_r27),ku(_r27.children,t),n=_r27);}}catch(err){_iterator79.e(err);}finally{_iterator79.f();}return n;}var Au=function(_L25){function e(_e326){var _this30;_classCallCheck(this,e);_this30=_callSuper(this,e,[{type:"tooltip",command:_e326.command,mode:_e326.mode,style:_e326.style,body:_e326.body,displayContainsHighlight:!0}]),_this30.tooltip=new L({type:"root",mode:_e326.content,body:_e326.tooltip,style:{}}),_this30.skipBoundary=!0,_this30.captureSelection=!1;return _this30;}_inherits(e,_L25);return _createClass(e,[{key:"toJson",value:function toJson(){var _e327;var t=(_e327=this.tooltip.body)==null?void 0:_e327.filter(function(_e328){return _e328.type!=="first";}).map(function(_e329){return _e329.toJson();});return l(c({},_superPropGet(e,"toJson",this,3)([])),{tooltip:t});}},{key:"render",value:function render(_e330){var t=L.createBox(_e330,this.body);if(!t)return null;var n=new I({parent:_e330,mathstyle:"displaystyle"},{fontSize:Uo}),r=new F([Ss(Ou(new F(this.tooltip.render(n),{classes:"ML__tooltip-content"}),n)),t],{classes:"ML__tooltip-container"});return this.caret&&(r.caret=this.caret),this.bind(_e330,r);}}],[{key:"fromJson",value:function fromJson(t){return new e(l(c({},t),{tooltip:Mu(t.tooltip)}));}}]);}(L),ju=function(_L26){function e(_e331,t){var _this31;_classCallCheck(this,e);_this31=_callSuper(this,e,[l(c({},t),{type:"operator",isFunction:t==null?void 0:t.isFunction})]),_this31.value=_e331,_this31.variant=t==null?void 0:t.variant,_this31.variantStyle=t==null?void 0:t.variantStyle,_this31.subsupPlacement=t==null?void 0:t.limits;return _this31;}_inherits(e,_L26);return _createClass(e,[{key:"toJson",value:function toJson(){var _e332=_superPropGet(e,"toJson",this,3)([]);return this.variant&&(_e332.variant=this.variant),this.variantStyle&&(_e332.variantStyle=this.variantStyle),this.subsupPlacement&&(_e332.limits=this.subsupPlacement),this.value&&(_e332.symbol=this.value),_e332;}},{key:"render",value:function render(_e333){var t;var n=new F(this.value,{type:"op",mode:"math",maxFontSize:_e333.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:_e333.letterShapeStyle}),r=n;if(this.superscript||this.subscript){var _i41=(t=this.subsupPlacement)==null?"auto":t;r=_i41==="over-under"||_i41==="auto"&&_e333.isDisplayStyle?this.attachLimits(_e333,{base:n}):this.attachSupsub(_e333,{base:n});}return new F(this.bind(_e333,r),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"ML__op-group"}).wrap(_e333);}},{key:"_serialize",value:function _serialize(_e334){if(!(_e334.expandMacro||_e334.skipStyles||_e334.skipPlaceholders)&&_typeof(this.verbatimLatex)=="string")return this.verbatimLatex;var t=ft(this.command,this.mode);if(t!=null&&t.serialize)return t.serialize(this,_e334);var n=[this.command];return this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&n.push("\\limits"),this.subsupPlacement==="adjacent"&&n.push("\\nolimits"),this.subsupPlacement==="auto"&&n.push("\\displaylimits")),n.push(this.supsubToLatex(_e334)),N(n);}}],[{key:"fromJson",value:function fromJson(t){return new e(t.symbol,t);}}]);}(L);function Mu(e){if(xe(e))return e.map(function(e){return Mu(e);});if(_typeof(e)=="string")return L.fromJson(e);e=c({},e);var _iterator80=_createForOfIteratorHelper($s),_step80;try{for(_iterator80.s();!(_step80=_iterator80.n()).done;){var _t107=_step80.value;e[_t107]&&(e[_t107]=Mu(e[_t107]));}}catch(err){_iterator80.e(err);}finally{_iterator80.f();}e.args&&(e.args=Nu(e.args)),e.array&&(e.array=Mu(e.array));var t=e.type,n;t==="accent"&&(n=al.fromJson(e)),t==="array"&&(n=z.fromJson(e)),t==="box"&&(n=Ul.fromJson(e)),t==="chem"&&(n=nu.fromJson(e)),t==="composition"&&(n=Wl.fromJson(e)),t==="delim"&&(n=ru.fromJson(e)),t==="enclose"&&(n=ou.fromJson(e)),t==="error"&&(n=Gl.fromJson(e)),t==="extensible-symbol"&&(n=gu.fromJson(e)),t==="genfrac"&&(n=fu.fromJson(e)),t==="group"&&(n=Kl.fromJson(e)),t==="latex"&&(n=mu.fromJson(e)),t==="latexgroup"&&(n=hu.fromJson(e)),t==="leftright"&&(n=B.fromJson(e)),t==="macro"&&(n=Jl.fromJson(e)),t==="macro-argument"&&(n=Yl.fromJson(e)),t==="operator"&&(n=ju.fromJson(e)),t==="overlap"&&(n=_u.fromJson(e)),t==="overunder"&&(n=vu.fromJson(e)),t==="placeholder"&&(n=Tl.fromJson(e)),t==="prompt"&&(n=Xl.fromJson(e)),t==="phantom"&&(n=bu.fromJson(e)),t==="sizeddelim"&&(n=iu.fromJson(e)),t==="spacing"&&(n=xu.fromJson(e)),t==="subsup"&&(n=Zl.fromJson(e)),t==="surd"&&(n=Su.fromJson(e)),t==="text"&&(n=oc.fromJson(e)),t==="tooltip"&&(n=Au.fromJson(e)),n||(!t||["first","mbin","mrel","mclose","minner","mop","mopen","mord","mpunct","root","space"].includes(t),"".concat(t),n=L.fromJson(e));var _iterator81=_createForOfIteratorHelper($s),_step81;try{for(_iterator81.s();!(_step81=_iterator81.n()).done;){var _t108=_step81.value;e[_t108]&&n.setChildren(e[_t108],_t108);}}catch(err){_iterator81.e(err);}finally{_iterator81.f();}return e.verbatimLatex!==void 0&&(n.verbatimLatex=e.verbatimLatex),e.subsupPlacement&&(n.subsupPlacement=e.subsupPlacement),e.explicitSubsupPlacement&&(n.explicitSubsupPlacement=!0),e.isFunction&&(n.isFunction=!0),e.skipBoundary&&(n.skipBoundary=!0),e.captureSelection&&(n.captureSelection=!0),n;}function Nu(e){if(e){if(_typeof(e)=="string")return e;if(Array.isArray(e))return e.map(function(e){return e==="<null>"?null:_typeof(e)=="object"&&"group"in e?{group:e.group.map(function(e){return Mu(e);})}:_typeof(e)=="object"&&"atoms"in e?e.atoms.map(function(e){return Mu(e);}):e;});}}function Pu(e,t){!e||!t||(xe(e)?e.forEach(function(e){return Pu(e,t);}):_typeof(e)=="object"&&e.applyStyle(t,{unstyledOnly:!0}));}function Fu(e,t,n,r){function i(e,t){var _iterator82=_createForOfIteratorHelper(a),_step82;try{for(_iterator82.s();!(_step82=_iterator82.n()).done;){var _n68=_step82.value;if(_n68.style[e]!==t)return!1;}}catch(err){_iterator82.e(err);}finally{_iterator82.f();}return!0;}if(t=e.normalizeRange(t),t[0]===t[1])return!1;var a=e.getAtoms(t,{includeChildren:!0});r.operation==="toggle"&&(n.color&&i("color",n.color)&&(n.color="none",delete n.verbatimColor),n.backgroundColor&&i("backgroundColor",n.backgroundColor)&&(n.backgroundColor="none",delete n.verbatimBackgroundColor),n.fontFamily&&i("fontFamily",n.fontFamily)&&(n.fontFamily="none"),n.fontSeries&&i("fontSeries",n.fontSeries)&&(n.fontSeries="auto"),n.fontShape&&i("fontShape",n.fontShape)&&(n.fontShape="auto"),n.fontSize&&i("fontSize",n.fontSize)&&(n.fontSize=Uo),n.variant&&i("variant",n.variant)&&(n.variant="normal"),n.variantStyle&&i("variantStyle",n.variantStyle)&&(n.variantStyle=""));var _iterator83=_createForOfIteratorHelper(a),_step83;try{for(_iterator83.s();!(_step83=_iterator83.n()).done;){var _e335=_step83.value;_e335.applyStyle(n);}}catch(err){_iterator83.e(err);}finally{_iterator83.f();}return!0;}function Iu(e){return{up:"italic",bold:"bolditalic",italic:"italic",bolditalic:"bolditalic","":"italic"}[e==null?"":e];}function Lu(e){return{up:"up",bold:"bold",italic:void 0,bolditalic:"bold","":void 0}[e==null?"":e];}var Ru={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};A(Object.keys(Ru),"{body:auto}",{createAtom:function createAtom(e){return new al(l(c({},e),{body:k(e.args[0]),accentChar:Ru[e.command.slice(1)]}));}}),A(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:function createAtom(e){var t=at(k(e.args[0]));return new al(l(c({},e),{body:k(e.args[0]),svgAccent:e.command.slice(1)+(t.length>5?"4":["1","1","2","2","3","3"][t.length])}));}}),A(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:function createAtom(e){return new al(l(c({},e),{body:k(e.args[0]),svgAccent:"overarc"}));}}),A(["underarc","underparen"],"{body:auto}",{createAtom:function createAtom(e){return new vu(l(c({},e),{body:k(e.args[0]),svgBelow:"underarc"}));}}),A("utilde","{body:auto}",{createAtom:function createAtom(e){var t=k(e.args[0]),n=at(t),r="widetilde"+(n.length>5?"4":["1","1","2","2","3","3"][n.length]);return new vu(l(c({},e),{body:t,svgBelow:r,boxType:ys(t)}));}}),A("^","{:string}",{createAtom:function createAtom(e){var t;return new L(l(c({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE2",e:"\xEA",i:"\xEE",o:"\xF4",u:"\xFB",A:"\xC2",E:"\xCA",I:"\xCE",O:"\xD4",U:"\xDB"}[e.args[0]])!=null?t:"^"}));}}),A("`","{:string}",{createAtom:function createAtom(e){var t;return new L(l(c({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE0",e:"\xE8",i:"\xEC",o:"\xF2",u:"\xF9",A:"\xC0",E:"\xC8",I:"\xCC",O:"\xD2",U:"\xD9"}[e.args[0]])!=null?t:"`"}));}}),A("'","{:string}",{createAtom:function createAtom(e){var t;return new L(l(c({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE1",e:"\xE9",i:"\xED",o:"\xF3",u:"\xFA",A:"\xC1",E:"\xC9",I:"\xCD",O:"\xD3",U:"\xDA"}[e.args[0]])!=null?t:"'"}));}}),A("\"","{:string}",{createAtom:function createAtom(e){var t,n;return new L(l(c({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(n={a:"\xE4",e:"\xEB",i:"\xEF",o:"\xF6",u:"\xFC",A:"\xC4",E:"\xCB",I:"\xCB",O:"\xD6",U:"\xDC"}[e.args[0]])==null?"\""+e.args[0]:n:"\""}));}}),A(".","{:string}",{createAtom:function createAtom(e){var t,n;return new L(l(c({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(n={a:"\u0227",e:"\u0117",i:"\u0307i",o:"\u022F",u:"\u0307u",A:"\u0226",E:"\u0116",I:"\u0130",O:"\u022E",U:"\u0307U"}[e.args[0]])==null?"."+e.args[0]:n:"."}));}}),A("=","{:string}",{createAtom:function createAtom(e){var t,n;return new L(l(c({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(n={a:"\u0101",e:"\u0113",i:"\u012B",o:"\u014D",u:"\u016B",A:"\u0100",E:"\u0112",I:"\u012A",O:"\u014C",U:"\u016A"}[e.args[0]])==null?"="+e.args[0]:n:"="}));}}),A("~","{:string}",{createAtom:function createAtom(e){var t;return new L(l(c({type:"mord"},e),{isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={n:"\xF1",N:"\xD1",a:"\xE3",o:"\xF5",A:"\xC3",O:"\xD5"}[e.args[0]])!=null?t:"\xB4"}));}}),A("c","{:string}",{createAtom:function createAtom(e){var t;return new L(l(c({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={c:"\xE7",C:"\xC7"}[e.args[0]])!=null?t:""}));}}),A("enclose","{notation:string}[style:string]{body:auto}",{createAtom:function createAtom(e){var t,n;var r=e.args,i={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]){var _e336=r[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);var _iterator84=_createForOfIteratorHelper(_e336),_step84;try{for(_iterator84.s();!(_step84=_iterator84.n()).done;){var _t109=_step84.value;var _e337=_t109.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(_e337)i.strokeWidth=_e337[1],i.strokeStyle=_e337[2],i.strokeColor=_e337[3];else{var _e338=_t109.match(/\s*([a-z]*)\s*=\s*"(.*)"/);_e338&&(_e338[1]==="mathbackground"?i.backgroundcolor=_e338[2]:_e338[1]==="mathcolor"?i.strokeColor=_e338[2]:_e338[1]==="padding"?i.padding=_e338[2]:_e338[1]==="shadow"&&(i.shadow=_e338[2]));}}}catch(err){_iterator84.e(err);}finally{_iterator84.f();}i.strokeStyle==="dashed"?i.svgStrokeStyle="5,5":i.strokeStyle==="dotted"&&(i.svgStrokeStyle="1,5");}i.borderStyle="".concat(i.strokeWidth," ").concat(i.strokeStyle," ").concat(i.strokeColor);var a={};return((n=r[0])==null?"":n).split(/[, ]/).filter(function(e){return e.length>0;}).forEach(function(e){a[e.toLowerCase()]=!0;}),new ou(e.command,k(r[2]),a,i);}}),A("cancel","{body:auto}",{createAtom:function createAtom(e){var t;return new ou(e.command,k(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});}}),A("bcancel","{body:auto}",{createAtom:function createAtom(e){var t;return new ou(e.command,k(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});}}),A("xcancel","{body:auto}",{createAtom:function createAtom(e){var t;return new ou(e.command,k(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});}}),st(["math","displaymath"],zu),st("center",zu),ot(["multline","multline*"],"",zu),A("displaylines","",{parse:function parse(e){if(e.skipWhitespace(),!e.match("<{>"))return[];var t=[],n=[];e.mathlist.length>0&&t.push([e.mathlist]),e.beginContext({tabular:!0,root:!0});do{var _n69;if(e.end()||e.match("<}>"))break;e.matchColumnSeparator()||e.matchRowSeparator()?(t.push([n]),n=[]):(_n69=n).push.apply(_n69,_toConsumableArray(e.scan(function(e){return["<}>","&","\\cr","\\\\","\\tabularnewline"].includes(e);})));}while(!0);e.endContext(),t.push([n]);var r=e.scan();return r.length>0&&t.push([r]),t;},createAtom:function createAtom(e){return new z("lines",e.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}],classes:["ML__multiline_environment"],isRoot:!0,minColumns:1,maxColumns:1,minRows:1});}}),ot("split","",zu),ot(["gather","gather*","gathered"],"",zu),ot(["equation","equation*","subequations"],"",zu),st(["align","align*","eqnarray"],zu,{tabular:!0}),ot(["aligned"],"",zu),ot("array","{columns:colspec}",function(e,t,n,r){return new z(e,t,n,{columns:r[0],mathstyleName:"textstyle"});}),ot(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",zu),ot(["smallmatrix","smallmatrix*"],"[columns:colspec]",zu),ot(["cases","dcases","rcases"],"",zu);function zu(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[[[]]];var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];var r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:[];var i=arguments.length>4?arguments[4]:undefined;switch(e){case"math":return new z(e,t,n,{mathstyleName:"textstyle",isRoot:!0,minColumns:1,maxColumns:1,minRows:1,maxRows:1});case"displaymath":return new z(e,t,n,{mathstyleName:"textstyle",isRoot:!0,minColumns:1,maxColumns:1,minRows:1,maxRows:1});case"center":return new z(e,t,n,{columns:[{align:"c"}],classes:["ML__center_environment"],isRoot:!0,minColumns:1,maxColumns:1,minRows:1,maxRows:1});case"multline":case"multline*":return new z(e,t,n,{columns:[{align:"m"}],leftDelim:".",rightDelim:".",isRoot:!0,minColumns:1,maxColumns:1,minRows:1});case"split":return new z(e,t,n,{columns:[{align:"r"},{align:"l"}],minColumns:2,minRows:1,isRoot:!1});case"gather":case"gather*":return new z(e,t,n,{columns:[{gap:.25},{align:"c"},{gap:0}],minColumns:1,maxColumns:1,minRows:1,isRoot:!0,classes:["ML__gather_environment"]});case"gathered":return new z(e,t,n,{columns:[{gap:.25},{align:"c"},{gap:0}],minColumns:1,maxColumns:1,minRows:1});case"equation":case"equation*":case"subequations":return new z(e,t,n,{columns:[{align:"c"}],isRoot:!0,minColumns:1,maxColumns:1,minRows:1});case"aligned":{var _r28=0;var _iterator85=_createForOfIteratorHelper(t),_step85;try{for(_iterator85.s();!(_step85=_iterator85.n()).done;){var _e339=_step85.value;_r28=Math.max(_r28,_e339.length);}}catch(err){_iterator85.e(err);}finally{_iterator85.f();}var _i42=[{gap:0},{align:"r"},{gap:.25},{align:"l"}],_a18=2;for(;_a18<_r28;)_i42.push({gap:1},{align:"r"},{gap:.25},{align:"l"}),_a18+=2;return _i42.push({gap:0}),new z(e,t,n,{arraycolsep:0,columns:_i42,minColumns:2,minRows:1,isRoot:e!=="aligned"});}case"eqnarray":return new z(e,t,n,{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 z(e,t,n,{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 z(e,t,n,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:Bu(r[0],i)});case"bmatrix":case"bmatrix*":return new z(e,t,n,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:Bu(r[0],i)});case"Bmatrix":case"Bmatrix*":return new z(e,t,n,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:Bu(r[0],i)});case"vmatrix":case"vmatrix*":return new z(e,t,n,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:Bu(r[0],i)});case"Vmatrix":case"Vmatrix*":return new z(e,t,n,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:Bu(r[0],i)});case"matrix":case"matrix*":return new z(e,t,n,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:Bu(r==null?void 0:r[0],i)});case"smallmatrix":case"smallmatrix*":return new z(e,t,n,{mathstyleName:"scriptstyle",columns:Bu(r==null?void 0:r[0],i),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new z(e,t,n,{mathstyleName:e==="dcases"?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:Vu()});case"rcases":return new z(e,t,n,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:Vu()});case"lines":return new z(e,t,n,{leftDelim:".",rightDelim:".",columns:[{align:"l"}],isRoot:!0,minColumns:1,maxColumns:1,minRows:1});}return new z(e,t,n,{mathstyleName:"textstyle"});}function Bu(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:10;return e==null?Array(t).fill({align:"c"}):e;}function Vu(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:10;var t=[];for(var _n70=0;_n70<e;_n70++)_n70>0&&t.push({gap:1}),t.push({align:"l"});return t;}A(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:function createAtom(e){var t;return new vu(l(c({},e),{body:k((t=e.args)==null?void 0:t[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:e.command.slice(1)}));}}),A("overbrace","{:auto}",{createAtom:function createAtom(e){return new vu(l(c({},e),{body:k(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:e.command.slice(1)}));}}),A(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:function createAtom(e){return new vu(l(c({},e),{body:k(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:e.command.slice(1)}));}}),A(["underbrace"],"{:auto}",{createAtom:function createAtom(e){return new vu(l(c({},e),{body:k(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:e.command.slice(1)}));}}),A("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".split("."),"[:auto]{:auto}",{createAtom:function createAtom(e){var t,n,r,i,a;return new vu(l(c({},e),{svgBody:e.command.slice(1),above:((n=k((t=e.args)==null?void 0:t[1]))==null?void 0:n.length)===0?void 0:k((r=e.args)==null?void 0:r[1]),below:(a=k((i=e.args)==null?void 0:i[0]))==null?null:a,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"}));},serialize:function serialize(e,t){return e.command+(e.hasEmptyBranch("below")?"":"[".concat(e.belowToLatex(t),"]"))+"{".concat(e.aboveToLatex(t),"}").concat(e.supsubToLatex(t));}}),A("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".split("."),"",{isFunction:!0,ifMode:"math",createAtom:function createAtom(e){return new ju(e.command.slice(1),l(c({},e),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}));}}),A(["liminf","limsup"],"",{ifMode:"math",createAtom:function createAtom(e){return new ju({"\\liminf":"lim inf","\\limsup":"lim sup"}[e.command],l(c({},e),{limits:"over-under",variant:"main"}));}}),A(["lim","mod"],"",{ifMode:"math",createAtom:function createAtom(e){return new ju(e.command.slice(1),l(c({},e),{limits:"over-under",variant:"main"}));}}),A(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:function createAtom(e){return new ju(e.command.slice(1),l(c({},e),{limits:"over-under",isFunction:!0,variant:"main"}));}}),A("ang","{:math}",{ifMode:"math",createAtom:function createAtom(e){return new L(l(c({},e),{body:k(e.args[0])}));},serialize:function serialize(e,t){return"\\ang{".concat(e.bodyToLatex(t),"}");},render:function render(e,t){var n=e.createBox(t),r=n.caret;return n.caret=void 0,new F([n,new F("\xB0",{style:l(c({},e.style),{variant:"normal",variantStyle:"up"})})],{type:"inner",isSelected:e.isSelected,caret:r});}}),A("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:function createAtom(e){return new Su(l(c({},e),{body:k(e.args[1]),index:e.args[0]?k(e.args[0]):void 0}));}}),A(["frac","dfrac","tfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:function createAtom(e){var t=c({},e),n=e.command,r=e.args;switch(n){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;default:}switch(n){case"\\dfrac":case"\\dbinom":t.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":t.mathstyleName="textstyle";break;default:}return new fu(r[0]?k(r[0]):[new Tl()],r[1]?k(r[1]):[new Tl()],t);},serialize:function serialize(e,t){var n=e.aboveToLatex(t),r=e.belowToLatex(t);return /^[0-9]$/.test(n)&&/^[0-9]$/.test(r)?"".concat(e.command).concat(n).concat(r):P(e.command,n,r);}}),A(["cfrac"],"[:string]{:expression}{:expression}",{ifMode:"math",createAtom:function createAtom(e){var t=c({},e),n=e.args;return t.hasBarLine=!0,t.continuousFraction=!0,n[0]==="r"&&(t.align="right"),n[0]==="l"&&(t.align="left"),new fu(n[1]?k(n[1]):[new Tl()],n[2]?k(n[2]):[new Tl()],t);},serialize:function serialize(e,t){var n=e.aboveToLatex(t),r=e.belowToLatex(t);return P(e.command,n,r);}}),A(["brace","brack"],"",{infix:!0,createAtom:function createAtom(e){return new fu(k(e.args[0]),k(e.args[1]),l(c({},e),{hasBarLine:!1,leftDelim:e.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:e.command==="\\brace"?"\\rbrace":"\\rbrack"}));},serialize:function serialize(e,t){return N([e.aboveToLatex(t),e.command,e.belowToLatex(t)]);}}),A(["over","atop","choose"],"",{infix:!0,createAtom:function createAtom(e){var t,n,r=e.args;return e.command==="\\choose"&&(t="(",n=")"),new fu(k(r[0]),k(r[1]),l(c({},e),{hasBarLine:e.command==="\\over",leftDelim:t,rightDelim:n}));},serialize:function serialize(e,t){return N([e.aboveToLatex(t),e.command,e.belowToLatex(t)]);}}),A(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:function createAtom(e){var t,n;var r=e.args;return new fu(k(r[0]),k(r[1]),l(c({},e),{leftDelim:(t=r[2])==null?".":t,rightDelim:(n=r[3])==null?".":n,hasBarLine:!1}));},serialize:function serialize(e,t){return"".concat(e.aboveToLatex(t)," ").concat(e.command).concat(e.leftDelim).concat(e.rightDelim).concat(e.belowToLatex(t));}}),A("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:function createAtom(e){return new fu(k(e.args[0]),k(e.args[1]),l(c({},e),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}));},serialize:function serialize(e,t){return N([e.aboveToLatex(t),e.command,e.belowToLatex(t)]);}}),A(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:function createAtom(e){return new gu({coprod:"\u2210",bigvee:"\u22C1",bigwedge:"\u22C0",biguplus:"\u2A04",bigcap:"\u22C2",bigcup:"\u22C3",intop:"\u222B",prod:"\u220F",sum:"\u2211",bigotimes:"\u2A02",bigoplus:"\u2A01",bigodot:"\u2A00",bigsqcup:"\u2A06",smallint:"\u222B"}[e.command.slice(1)],l(c({},e),{limits:"auto",variant:"main"}));}}),A("smallint","",{ifMode:"math",createAtom:function createAtom(e){return new ju("\u222B",l(c({},e),{limits:"adjacent",variant:"main"}));}});var Hu={int:"\u222B",iint:"\u222C",iiint:"\u222D",oint:"\u222E",oiint:"\u222F",oiiint:"\u2230",intclockwise:"\u2231",varointclockwise:"\u2232",ointctrclockwise:"\u2233",intctrclockwise:"\u2A11",sqcup:"\u2294",sqcap:"\u2293",uplus:"\u228E",wr:"\u2240",amalg:"\u2A3F",Cap:"\u22D2",Cup:"\u22D3",doublecap:"\u22D2",doublecup:"\u22D3"};A(Object.keys(Hu),"",{ifMode:"math",createAtom:function createAtom(e){var t=Hu[e.command.slice(1)];return new gu(t,l(c({},e),{limits:"adjacent",variant:{"\u22d2":"ams","\u22d3":"ams"}[t]}));}}),A(["Re","Im"],"",{ifMode:"math",createAtom:function createAtom(e){return new ju({"\\Re":"\u211C","\\Im":"\u2111"}[e.command],l(c({},e),{limits:"adjacent",isFunction:!0,variant:"fraktur"}));}}),A("middle","{:delim}",{ifMode:"math",createAtom:function createAtom(e){var t;return new ru(l(c({},e),{delim:(t=e.args[0])==null?"|":t,size:1}));}}),A("the","{:value}",{createAtom:function createAtom(e){return new L(l(c({},e),{captureSelection:!0,verbatimLatex:null}));},render:function render(e,t){var n;var r=new I({parent:t},e.style),i="";return e.isSelected&&(i+=" ML__selected"),new F(((n=Js(r.evaluate(e.args[0])))==null?"":n).split("").map(function(t){return new F(t,{type:"ord",classes:i,mode:e.mode,isSelected:e.isSelected,style:c({variant:"main"},e.style)});}),{type:"lift",style:e.style,caret:e.caret,isSelected:e.isSelected,classes:i}).wrap(r);},serialize:function serialize(e){var t;return"\\the".concat((t=Js(e.args[0]))==null?"\\relax":t);}}),A("mathtip","{:auto}{:math}",{createAtom:function createAtom(e){return new Au(l(c({},e),{body:k(e.args[0]),tooltip:k(e.args[1]),content:"math"}));},serialize:function serialize(e,t){return t.skipStyles?e.bodyToLatex(t):"\\mathtip{".concat(e.bodyToLatex(t),"}{").concat(L.serialize([e.tooltip],l(c({},t),{defaultMode:"math"})),"}");}}),A("texttip","{:auto}{:text}",{createAtom:function createAtom(e){return new Au(l(c({},e),{body:k(e.args[0]),tooltip:k(e.args[1]),content:"text"}));},serialize:function serialize(e,t){return t.skipStyles?e.bodyToLatex(t):"\\texttip{".concat(e.bodyToLatex(t),"}{").concat(L.serialize([e.tooltip],l(c({},t),{defaultMode:"text"})),"}");}}),A("error","{:math}",{createAtom:function createAtom(e){return new L(l(c({},e),{body:k(e.args[0])}));},serialize:function serialize(e,t){return"\\error{".concat(e.bodyToLatex(t),"}");},render:function render(e,t){return e.createBox(t,{classes:"ML__error"});}}),A("ensuremath","{:math}",{createAtom:function createAtom(e){return new L(l(c({},e),{body:k(e.args[0])}));},serialize:function serialize(e,t){return"".concat(e.command,"{").concat(e.bodyToLatex(l(c({},t),{defaultMode:"math"})),"}");}}),A("color","{:value}",{applyStyle:function applyStyle(e,t,n,r){var i,a;return l(c({},e),{verbatimColor:(i=Js(n[0]))==null?void 0:i,color:r.toColor((a=n[0])==null?{string:"red"}:a)});}}),A("textcolor","{:value}{content:auto*}",{applyStyle:function applyStyle(e,t,n,r){var i,a;return l(c({},e),{verbatimColor:(i=Js(n[0]))==null?void 0:i,color:r.toColor((a=n[0])==null?{string:"red"}:a)});}}),A("boxed","{content:math}",{createAtom:function createAtom(e){return new Ul(l(c({},e),{body:k(e.args[0]),framecolor:{string:"black"}}));}}),A("colorbox","{:value}{:text*}",{applyStyle:function applyStyle(e,t,n,r){var i,a;return l(c({},e),{verbatimBackgroundColor:(i=Js(n[0]))==null?void 0:i,backgroundColor:r.toBackgroundColor((a=n[0])==null?{string:"yellow"}:a)});}}),A("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:function createAtom(e){var t,n;return new Ul(l(c({},e),{body:k(e.args[2]),framecolor:(t=e.args[0])==null?{string:"blue"}:t,backgroundcolor:(n=e.args[1])==null?{string:"yellow"}:n}));},serialize:function serialize(e,t){var n,r;return t.skipStyles?e.bodyToLatex(l(c({},t),{defaultMode:"text"})):P(e.command,(n=Js(e.framecolor))==null?"":n,(r=Js(e.backgroundcolor))==null?"":r,e.bodyToLatex(l(c({},t),{defaultMode:"text"})));}}),A("bbox","[:bbox]{body:auto}",{createAtom:function createAtom(e){var t;var n=e.args[0],r=k(e.args[1]);return n?new Ul(l(c({},e),{body:r,padding:n.padding,border:n.border,backgroundcolor:(t=n.backgroundcolor)==null?void 0:t})):new Ul(l(c({},e),{body:r}));},serialize:function serialize(e,t){var n,r;if(t.skipStyles)return e.bodyToLatex(t);var i=e.command;if(Number.isFinite(e.padding)||e.border!==void 0||e.backgroundcolor!==void 0){var _t110=[];e.padding&&_t110.push((n=Js(e.padding))==null?"":n),e.border&&_t110.push("border: ".concat(e.border)),e.backgroundcolor&&_t110.push((r=Js(e.backgroundcolor))==null?"":r),i+="[".concat(_t110.join(","),"]");}return P(i,e.bodyToLatex(t));}}),A(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:function createAtom(e){return new L(l(c({},e),{body:k(e.args[0])}));},render:function render(e,t){var n=new I({parent:t,mathstyle:e.command.slice(1)},e.style),r=L.createBox(n,e.body,{type:"lift"});return e.caret&&(r.caret=e.caret),e.bind(t,r);},serialize:function serialize(e,t){return t.skipStyles?e.bodyToLatex(t):"{".concat(N([e.command,e.bodyToLatex(t)]),"}");}}),A(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{applyStyle:function applyStyle(e,t){return l(c({},e),{fontSize:{"\\tiny":1,"\\scriptsize":2,"\\footnotesize":3,"\\small":4,"\\normalsize":5,"\\large":6,"\\Large":7,"\\LARGE":8,"\\huge":9,"\\Huge":10}[t]});}}),A("fontseries","{:string}",{ifMode:"text",applyStyle:function applyStyle(e,t,n){var r;return l(c({},e),{fontSeries:(r=n[0])==null?"auto":r});}}),A("fontshape","{:string}",{ifMode:"text",applyStyle:function applyStyle(e,t,n){var r;return l(c({},e),{fontShape:(r=n[0])==null?"auto":r});}}),A("fontfamily","{:string}",{ifMode:"text",applyStyle:function applyStyle(e,t,n){var r;return l(c({},e),{fontFamily:(r=n[0])==null?"roman":r});}}),A("selectfont","",{ifMode:"text",applyStyle:function applyStyle(e){return e;}}),A("bf","{:rest*}",{applyStyle:function applyStyle(e){return l(c({},e),{fontSeries:"b",fontShape:"n",fontFamily:"roman"});}}),A(["boldsymbol","bm","bold"],"{:math*}",{applyMode:"math",applyStyle:function applyStyle(e){return l(c({},e),{variantStyle:"bold"});}}),A("bfseries","{:rest*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontSeries:"b"});}}),A("mdseries","{:rest*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontSeries:"m"});}}),A("upshape","{:rest*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontShape:"n"});}}),A("slshape","{:rest*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontShape:"sl"});}}),A("scshape","{:rest*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontShape:"sc"});}}),A("textbf","{:text*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontSeries:"b"});}}),A("textmd","{:text*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontSeries:"m"});}}),A("textup","{:text*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontShape:"n"});}}),A("textnormal","{:text*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontShape:"n",fontSeries:"m"});}}),A("textsl","{:text*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontShape:"sl"});}}),A("textit","{:text*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontShape:"it"});}}),A("textsc","{:text*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontShape:"sc"});}}),A("textrm","{:text*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontFamily:"roman"});}}),A("textsf","{:text*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontFamily:"sans-serif"});}}),A("texttt","{:text*}",{applyMode:"text",applyStyle:function applyStyle(e){return l(c({},e),{fontFamily:"monospace"});}}),A("mathbf","{:math*}",{applyMode:"math",applyStyle:function applyStyle(e){return l(c({},e),{variant:"normal",variantStyle:"bold"});}}),A("mathit","{:math*}",{applyMode:"math",applyStyle:function applyStyle(e){return l(c({},e),{variant:"main",variantStyle:"italic"});}}),A("mathnormal","{:math*}",{applyMode:"math",applyStyle:function applyStyle(e){return l(c({},e),{variant:"normal",variantStyle:"italic"});}}),A("mathbfit","{:math*}",{applyMode:"math",applyStyle:function applyStyle(e){return l(c({},e),{variant:"main",variantStyle:"bolditalic"});}}),A("mathrm","{:math*}",{applyMode:"math",applyStyle:function applyStyle(e){return l(c({},e),{variant:"normal",variantStyle:"up"});}}),A("mathsf","{:math*}",{applyMode:"math",applyStyle:function applyStyle(e){return l(c({},e),{variant:"sans-serif",variantStyle:"up"});}}),A("mathtt","{:math*}",{applyMode:"math",applyStyle:function applyStyle(e){return l(c({},e),{variant:"monospace",variantStyle:"up"});}}),A("it","{:rest*}",{applyStyle:function applyStyle(e){return l(c({},e),{fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"});}}),A("rmfamily","{:rest*}",{applyStyle:function applyStyle(e){return l(c({},e),{fontFamily:"roman"});}}),A("sffamily","{:rest*}",{applyStyle:function applyStyle(e){return l(c({},e),{fontFamily:"sans-serif"});}}),A("ttfamily","{:rest*}",{applyStyle:function applyStyle(e){return l(c({},e),{fontFamily:"monospace"});}}),A(["Bbb","mathbb"],"{:math*}",{applyStyle:function applyStyle(e){return l(c({},e),{variant:"double-struck",variantStyle:Lu(e.variantStyle)});}}),A(["frak","mathfrak"],"{:math*}",{applyStyle:function applyStyle(e){return l(c({},e),{variant:"fraktur",variantStyle:Lu(e.variantStyle)});}}),A("mathcal","{:math*}",{applyStyle:function applyStyle(e){return l(c({},e),{variant:"calligraphic",variantStyle:Lu(e.variantStyle)});}}),A("mathscr","{:math*}",{applyStyle:function applyStyle(e){return l(c({},e),{variant:"script",variantStyle:Lu(e.variantStyle)});}}),A("mbox","{:text}",{ifMode:"math",createAtom:function createAtom(e){return new L(l(c({},e),{type:"mord",body:k(e.args[0]),mode:"math"}));},serialize:function serialize(e,t){return P("\\mbox",e.bodyToLatex(l(c({},t),{defaultMode:"text"})));}}),A("text","{:text}",{ifMode:"math",applyMode:"text"}),A(["class","htmlClass"],"{name:string}{content:auto*}",{createAtom:function createAtom(e){return new L(l(c({},e),{type:"mord",body:k(e.args[1])}));},serialize:function serialize(e,t){return!e.args[0]||t.skipStyles?e.bodyToLatex(t):"".concat(e.command,"{").concat(e.args[0],"}{").concat(e.bodyToLatex(t),"}");},render:function render(e,t){var n;return e.createBox(t,{classes:(n=e.args[0])==null?"":n,boxType:"lift"});}}),A(["cssId","htmlId"],"{id:string}{content:auto*}",{createAtom:function createAtom(e){return new L(l(c({},e),{type:"mord",body:k(e.args[1])}));},serialize:function serialize(e,t){var n;return!((n=e.args)!=null&&n[0])||t.skipStyles?e.bodyToLatex(t):"".concat(e.command,"{").concat(e.args[0],"}{").concat(e.bodyToLatex(t),"}");},render:function render(e,t){var n;var r=e.createBox(t);return r.cssId=(n=e.args[0])==null?"":n,r;}}),A("htmlData","{data:string}{content:auto*}",{createAtom:function createAtom(e){return new L(l(c({},e),{type:"mord",body:k(e.args[1])}));},serialize:function serialize(e,t){var n;return!((n=e.args)!=null&&n[0])||t.skipStyles?e.bodyToLatex(t):"\\htmlData{".concat(e.args[0],"}{").concat(e.bodyToLatex(t),"}");},render:function render(e,t){var n;var r=e.createBox(t);return r.htmlData=(n=e.args[0])==null?"":n,r;}}),A(["style","htmlStyle"],"{data:string}{content:auto*}",{createAtom:function createAtom(e){return new L(l(c({},e),{type:"mord",body:k(e.args[1])}));},serialize:function serialize(e,t){var n;return!((n=e.args)!=null&&n[0])||t.skipStyles?e.bodyToLatex(t):"".concat(e.command,"{").concat(e.args[0],"}{").concat(e.bodyToLatex(t),"}");},render:function render(e,t){var n;var r=e.createBox(t);return r.htmlStyle=(n=e.args[0])==null?"":n,r;}}),A("href","{url:string}{content:auto*}",{createAtom:function createAtom(e){return new L(l(c({},e),{type:"mord",body:k(e.args[1])}));},render:function render(e,t){var n;var r=e.createBox(t),i=(n=e.args[0])==null?"":n;return i&&(r.htmlData="href=".concat(i)),r;}}),A("em","{:rest}",{createAtom:function createAtom(e){return new L(l(c({},e),{body:k(e.args[0])}));},serialize:function serialize(e,t){return t.skipStyles?e.bodyToLatex(t):"{\\em ".concat(e.bodyToLatex(t),"}");},render:function render(e,t){return e.createBox(t,{classes:"ML__emph",boxType:"lift"});}}),A("emph","{:auto}",{createAtom:function createAtom(e){return new L(l(c({},e),{body:k(e.args[1])}));},serialize:function serialize(e,t){return t.skipStyles?e.bodyToLatex(t):"\\emph{".concat(e.bodyToLatex(t),"}");},render:function render(e,t){return e.createBox(t,{classes:"ML__emph",boxType:"lift"});}});var Uu={"\\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}};A(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:function createAtom(e){var t;return new iu(l(c({},e),{delim:(t=e.args[0])==null?".":t,size:Uu[e.command].size,delimType:Uu[e.command].mclass}));},serialize:function serialize(e,t){return N([e.command,/^[a-zA-Z]/.test(e.value)?"{".concat(e.value,"}"):e.value]);}}),A(["hspace","hspace*"],"{width:value}",{createAtom:function createAtom(e){var t;return new xu(l(c({},e),{width:(t=e.args[0])==null?{dimension:0}:t}));}}),A(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:function createAtom(e){var t;return new xu(l(c({},e),{width:(t=e.args[0])==null?{dimension:0}:t}));}}),A("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:function createAtom(e){return new L(e);},render:function render(e,t){var n=0,r=t.mathstyle.id;(r===Fs||r===Is)&&(n=1),(r===Ls||r===Rs)&&(n=2),(r===zs||r===Bs)&&(n=3);var i=k(e.args[n]);return L.createBox(t,i);},serialize:function serialize(e,t){return"\\mathchoice{".concat(L.serialize(e.args[0],t),"}{").concat(L.serialize(e.args[1],t),"}{").concat(L.serialize(e.args[2],t),"}{").concat(L.serialize(e.args[3],t),"}");}}),A("mathop","{:auto}",{createAtom:function createAtom(e){return new L(l(c({},e),{type:"mop",body:k(e.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0}));},render:function render(e,t){var n;var r=L.createBox(t,e.body);if(e.superscript||e.subscript){var _i43=(n=e.subsupPlacement)==null?"auto":n;r=_i43==="over-under"||_i43==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:r}):e.attachSupsub(t,{base:r});}return e.caret&&(r.caret=e.caret),new F(e.bind(t,r),{type:"op",isSelected:e.isSelected,classes:"ML__op-group"});},serialize:function serialize(e,t){var n=[P(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&n.push("\\limits"),e.subsupPlacement==="adjacent"&&n.push("\\nolimits"),e.subsupPlacement==="auto"&&n.push("\\displaylimits")),n.push(e.supsubToLatex(t)),N(n);}}),A(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:function createAtom(e){return new L(l(c({},e),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[e.command],body:k(e.args[0])}));}}),A(["operatorname","operatorname*"],"{operator:math}",{createAtom:function createAtom(e){var t=k(e.args[0]).map(function(e){var t;return e.type!=="first"&&(e.type="mord",e.value=(t={"\u2217":"*","\u2212":"-"}[e.value])==null?e.value:t,e.isFunction=!1,!e.style.variant&&!e.style.variantStyle&&(e.style.variant="main",e.style.variantStyle="up")),e;});return new L(l(c({},e),{type:"mop",body:t,isFunction:!0,limits:e.command==="\\operatorname"?"adjacent":"over-under"}));},render:function render(e,t){var n;var r=L.createBox(t,e.body);if(e.superscript||e.subscript){var _i44=(n=e.subsupPlacement)==null?"auto":n;r=_i44==="over-under"||_i44==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:r}):e.attachSupsub(t,{base:r});}return e.caret&&(r.caret=e.caret),new F(e.bind(t,r),{type:"op",isSelected:e.isSelected,classes:"ML__op-group"});},serialize:function serialize(e,t){var n=[P(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&n.push("\\limits"),e.subsupPlacement==="adjacent"&&n.push("\\nolimits"),e.subsupPlacement==="auto"&&n.push("\\displaylimits")),n.push(e.supsubToLatex(t)),N(n);}}),A(["char","unicode"],"{charcode:value}",{createAtom:function createAtom(e){return new L(l(c({},e),{type:e.mode==="text"?"text":"mord"}));},serialize:function serialize(e){var t;return"".concat(e.command).concat(Js((t=e.args[0])==null?{number:10067,base:"hexadecimal"}:t));},render:function render(e,t){var n=t.evaluate(e.args[0]);return(!n||!("number"in n))&&(n={number:10067,base:"hexadecimal"}),e.value=String.fromCodePoint(n.number),e.createBox(t);}}),A("rule","[raise:value]{width:value}{thickness:value}",{createAtom:function createAtom(e){return new L(e);},render:function render(e,t){var n,r,i;var a=new I({parent:t,mathstyle:"textstyle"},e.style),o=a.toEm((n=e.args[0])==null?{dimension:0}:n),s=a.toEm((r=e.args[1])==null?{dimension:10}:r),c=a.toEm((i=e.args[2])==null?{dimension:10}:i),l=new F(null,{classes:"ML__rule",type:"ord"});return l.width=s,l.height=c+o,l.depth=-o,l.setStyle("border-right-width",s,"em"),l.setStyle("border-top-width",c,"em"),l.setStyle("border-color",e.style.color),l.setStyle("vertical-align",o,"em"),e.isSelected&&l.setStyle("opacity","50%"),e.bind(a,l),e.caret&&(l.caret=e.caret),l.wrap(t);},serialize:function serialize(e){return"\\rule".concat(e.args[0]?"[".concat(Js(e.args[0]),"]"):"","{").concat(Js(e.args[1]),"}{").concat(Js(e.args[2]),"}");}}),A(["overline","underline"],"{:auto}",{createAtom:function createAtom(e){return new L(l(c({},e),{body:k(e.args[0])}));},render:function render(e,t){var n=e.command.substring(1),r=new I({parent:t,mathstyle:"cramp"},e.style),i=L.createBox(r,e.body);if(!i)return null;var a=r.metrics.defaultRuleThickness/r.scalingFactor,o=new F(null,{classes:n+"-line"});o.height=a,o.maxFontSize=a*1.125*r.scalingFactor;var s;return s=n==="overline"?new js({shift:0,children:[{box:i},3*a,{box:o},a]}):new js({top:i.height,children:[a,{box:o},3*a,{box:i}]}),e.caret&&(s.caret=e.caret),new F(s,{classes:n,type:"ignore"});}}),A("overset","{:auto}{base:auto}",{createAtom:function createAtom(e){var t=k(e.args[1]);return new vu(l(c({},e),{above:k(e.args[0]),body:t,skipBoundary:!1,boxType:ys(t)}));},serialize:function serialize(e,t){return P(e.command,e.aboveToLatex(t),e.bodyToLatex(t));}}),A("underset","{:auto}{base:auto}",{createAtom:function createAtom(e){var t=k(e.args[1]);return new vu(l(c({},e),{below:k(e.args[0]),body:t,skipBoundary:!1,boxType:ys(t)}));},serialize:function serialize(e,t){return P(e.command,e.belowToLatex(t),e.bodyToLatex(t));}}),A("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:function createAtom(e){var t=k(e.args[2]);return new vu(l(c({},e),{above:k(e.args[0]),below:k(e.args[1]),body:t,skipBoundary:!1,boxType:ys(t)}));},serialize:function serialize(e,t){return P(e.command,e.belowToLatex(t),e.bodyToLatex(t));}}),A(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:function createAtom(e){return new vu(l(c({},e),{body:k(e.args[2]),above:k(e.args[1]),below:k(e.args[0]),skipBoundary:!1,boxType:e.command==="\\stackrel"?"rel":"bin"}));},serialize:function serialize(e,t){return P(e.command,e.aboveToLatex(t),e.bodyToLatex(t));}}),A("smash","[:string]{:auto}",{createAtom:function createAtom(e){var t,n,r,i;return new bu(l(c({},e),{body:k(e.args[1]),smashHeight:(n=(t=e.args[0])==null?void 0:t.includes("t"))==null?!0:n,smashDepth:(i=(r=e.args[0])==null?void 0:r.includes("b"))==null?!0:i}));}}),A("vphantom","{:auto}",{createAtom:function createAtom(e){return new bu(l(c({},e),{body:k(e.args[0]),isInvisible:!0,smashWidth:!0}));}}),A("hphantom","{:auto}",{createAtom:function createAtom(e){return new bu(l(c({},e),{body:k(e.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}));}}),A("phantom","{:auto}",{createAtom:function createAtom(e){return new bu(l(c({},e),{body:k(e.args[0]),isInvisible:!0}));}}),A("mathstrut","",{createAtom:function createAtom(e){return new bu(l(c({},e),{body:[new L({value:"("})],isInvisible:!0}));}}),A("not","{:math}",{createAtom:function createAtom(e){var t=k(e.args[0]);return t.length===0?new L(l(c({},e),{type:"mrel",value:"\uE020"})):new L(l(c({},e),{body:[new _u(l(c({},e),{body:"\uE020",align:"right"}))].concat(_toConsumableArray(t)),captureSelection:!0}));},serialize:function serialize(e,t){var n=e.args[0],r=n&&_typeof(n)=="object"&&"group"in n;return e.value==="\uE020"?r?"\\not{}":"\\not":r?"\\not{".concat(L.serialize(n.group,t),"}"):"\\not".concat(L.serialize(n,t));},render:function render(e,t){if(e.value)return e.createBox(t);var n=e.args[0]&&_typeof(e.args[0])=="object"&&"group"in e.args[0]?"ord":ys(k(e.args[0])),r=L.createBox(t,e.body,{type:n});return e.caret&&(r.caret=e.caret),e.bind(t,r);}}),A(["ne","neq"],"",{createAtom:function createAtom(e){return new L(l(c({},e),{type:"mrel",body:[new _u(l(c({},e),{body:"\uE020",align:"right",boxType:"rel"})),new L(l(c({},e),{value:"="}))],captureSelection:!0}));},serialize:function serialize(e){return e.command;}}),A("rlap","{:auto}",{createAtom:function createAtom(e){return new _u(l(c({},e),{body:k(e.args[0]),align:"right"}));}}),A("llap","{:auto}",{createAtom:function createAtom(e){return new _u(l(c({},e),{body:k(e.args[0]),align:"left"}));}}),A("mathrlap","{:math}",{createAtom:function createAtom(e){return new _u(l(c({},e),{body:k(e.args[0]),align:"right"}));}}),A("mathllap","{:math}",{createAtom:function createAtom(e){return new _u(l(c({},e),{body:k(e.args[0]),align:"left"}));}}),A("raisebox","{:value}{:text}",{createAtom:function createAtom(e){var t;return new Ul(l(c({},e),{body:k(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])==null?{dimension:0}:t}));},serialize:function serialize(e,t){var n;return P("\\raisebox",(n=Js(e.offset))==null?"0pt":n,e.bodyToLatex(t));}}),A("raise","{:value}{:auto}",{createAtom:function createAtom(e){var t;return new Ul(l(c({},e),{body:k(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])==null?{dimension:0}:t}));},serialize:function serialize(e,t){var n;return P("\\raise",(n=Js(e.offset))==null?"0pt":n,e.bodyToLatex(t));}}),A("lower","{:value}{:auto}",{createAtom:function createAtom(e){var t;return new Ul(l(c({},e),{body:k(e.args[1]),padding:{dimension:0},offset:(t=Ys(e.args[0],-1))==null?{dimension:0}:t}));},serialize:function serialize(e,t){var n,r;return P("\\lower",(r=Js(Ys((n=e.offset)==null?{dimension:0}:n,-1)))==null?"0pt":r,e.bodyToLatex(t));}}),$e("0123456789/@.?!"),et(65,90),et(97,122),$e([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),$e([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),$e([["\\backslash",92],["\\nabla",8711],["\\partial",8706],["\\ell",8467],["\\hbar",8463],["\\pounds",163],["\\euro",8364]]),$e([["\\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"),$e([["\\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"]]),$e([["\\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"]]),$e([["\\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",8913],["\\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"),$e([["+",43],["-",8722],["\u2212",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"),$e([["\\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"),$e([["\\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]]),$e([["=",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"),$e([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),$e([["\\wp",8472],["\\aleph",8501]]),$e([["\\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"),$e([["\\ ",160],["~",160]],"space"),A(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:function createAtom(e){return new xu(e);}}),A("space","",{createAtom:function createAtom(e){return new xu(e);}}),$e([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),$e([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),$e([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],["\"",8221]]);var Wu={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__ams"],"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"]},Gu={"double-struck":/^[A-Z ]$/,script:/^[A-Z ]$/,calligraphic:/^[\dA-Z ]$/,fraktur:/^[\dA-Za-z ]$|^[!"#$%&'()*+,\-./:;=?[]^\u2019\u2018]$/,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]$/},Ku=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,qu=[/^[a-z]$/,/^[A-Z]$/,Ku,/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/],Ju={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},Yu=function(_us){function Yu(){_classCallCheck(this,Yu);return _callSuper(this,Yu,["math"]);}_inherits(Yu,_us);return _createClass(Yu,[{key:"createAtom",value:function createAtom(e,t,n){var r,i,a,o,s,c;if(t===null)return new L({type:"mord",mode:"math",command:e,value:e,style:n});var l;try{l=(a=(i=globalThis.MathfieldElement)==null?void 0:i.isFunction((r=t.command)==null?e:r))==null?!1:a;}catch(e){l=!1;}if(t.definitionType==="symbol"){var _r29=new L({type:(o=t.type)==null?"mord":o,mode:"math",command:(s=t.command)==null?e:s,value:String.fromCodePoint(t.codepoint),isFunction:l,style:n});return e.startsWith("\\")&&(_r29.verbatimLatex=e),_r29;}var u=new L({type:"mord",mode:"math",command:(c=t.command)==null?e:c,value:e,isFunction:l,style:n});return e.startsWith("\\")&&(u.verbatimLatex=e),u;}},{key:"serialize",value:function serialize(e,t){var n=Xu(e,l(c({},t),{defaultMode:"math"}));return n.length===0||t.defaultMode!=="text"?n:["$ "].concat(_toConsumableArray(n),[" $"]);}},{key:"getFont",value:function getFont(e,t){var n,r,i;if(t.variant,t.fontFamily){var _r30=t.fontFamily;t.fontSeries==="b"&&t.fontShape==="it"?_r30+="-bolditalic":t.fontSeries==="b"?_r30+="-bold":t.fontShape==="it"&&(_r30+="-italic");var _i45=(n=Wu[_r30])==null?Wu[t.fontFamily]:n;if(!_i45)return console.error("Unknown font family variant: ".concat(_r30)),null;var _i46=_slicedToArray(_i45,2),_a19=_i46[0],_o16=_i46[1];return _o16&&(e.classes+=" "+_o16),_a19;}var a=t.variant,o=t.variantStyle;if(a==="normal"&&!o&&/[\u00A3\u0131\u0237]/.test(e.value)&&(a="main",o="italic"),a==="normal"&&!o&&e.value.length===1){var _n71=!1;qu.forEach(function(r,i){var a;r.test(e.value)&&Ju[(a=t.letterShapeStyle)==null?"tex":a][i]==="it"&&(_n71=!0);}),_n71&&(o=Iu(o));}o==="up"&&(o=void 0);var s=o?a+"-"+o:a;Wu[s];var _Wu$s=_slicedToArray(Wu[s],2),c=_Wu$s[0],l=_Wu$s[1];if(Gu[a]&&!Gu[a].test(e.value)){var _t111=Be(e.value,a,o);return _t111||(_t111=(r=Be(e.value,a))==null?e.value:r,e.classes+=(i={bold:" ML__bold",italic:" ML__it","bold-italic":" ML__bold ML__it"}[o==null?"":o])==null?"":i),e.value=_t111,null;}return Ku.test(e.value)&&(e.classes+=" lcGreek"),l&&(e.classes+=" "+l),c;}}]);}(us);function Xu(e,t){return ms(e,"bold").map(function(e){if(fs(e[0])!=="bold"||fs(e[0].parent)==="bold")return N(Zu(e,t));var n=N(e.map(function(e){var t;return(t=e.value)==null?"":t;}));return /^[a-zA-Z0-9]+$/.test(n)?P("\\mathbf",N(Zu(e,t))):P("\\bm",N(Zu(e,t)));});}function Zu(e,t){var n=e[0].parent,r=ps(n);return ms(e,"variant").map(function(e){var n=ps(e[0]),i="";n&&n!==r&&(i={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]);var a="",o=e[e.length-1],s=i&&e.length>0&&(o.branch("subscript")!==void 0||o.branch("superscript")!==void 0);s&&(a=o.supsubToLatex(t));var c=N(e.map(function(n,r){if(s&&r===e.length-1){var _e340=ft(n.command,n.mode);return _e340!=null&&_e340.serialize?_e340.serialize(n,t):n.body&&n.command?P(n.command,n.bodyToLatex(t)):n.body?n.bodyToLatex(t):!n.value||n.value==="\u200B"?"":n.command||n.value;}return n._serialize(t);}));return i?P(i,c)+a:c;});}new Yu();function Qu(e,t){return e.map(function(e){return e._serialize(t);});}function $u(e,t){return ms(e,"fontShape").map(function(e){var n=Qu(e,t),r=e[0].style.fontShape,i="";return r==="it"&&(i="\\textit"),r==="sl"&&(i="\\textsl"),r==="sc"&&(i="\\textsc"),r==="n"&&(i="\\textup"),!i&&r?"{".concat(P("\\fontshape",r)).concat(N(n),"}"):i?P(i,N(n)):N(n);});}function ed(e,t){return ms(e,"fontSeries").map(function(e){var n=$u(e,t),r=e[0].style.fontSeries,i="";return r==="b"&&(i="\\textbf"),r==="l"&&(i="\\textlf"),r==="m"&&(i="\\textmd"),r&&!i?"{".concat(P("\\fontseries",r)).concat(N(n),"}"):i?P(i,N(n)):N(n);});}function td(e,t){return ms(e,"fontSize").map(function(e){var n,r;var i=ed(e,t),a=(r=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(n=e[0].style.fontSize)==null?"":n])==null?"":r;return a?"".concat(a," ").concat(N(i)):N(i);});}function nd(e,t,n){return ms(e,"fontFamily").map(function(e){var r;n=n&&!e.every(function(e){return e.style.fontFamily||e.style.fontShape||e.style.fontSeries||e.style.fontSize;});var i=td(e,t),a=e[0].style.fontFamily,o=(r={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[a==null?"":a])==null?"":r;return o?"\\".concat(o,"{").concat(N(i),"}"):a?"{\\fontfamily{".concat(e[0].style.fontFamily,"} ").concat(N(i),"}"):n?"\\text{".concat(N(i),"}"):N(i);});}var rd={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"};new(function(_us2){function _class(){_classCallCheck(this,_class);return _callSuper(this,_class,["text"]);}_inherits(_class,_us2);return _createClass(_class,[{key:"createAtom",value:function createAtom(e,t,n){return t&&t.definitionType==="symbol"?new oc(e,String.fromCodePoint(t.codepoint),n==null?{}:n):null;}},{key:"serialize",value:function serialize(e,t){return nd(e,l(c({},t),{defaultMode:"text"}),t.defaultMode!=="text");}},{key:"getFont",value:function getFont(e,t){var n,r,i,a,o;var s=t.fontFamily;if(rd[s]?e.classes+=" "+rd[s]:s&&e.setStyle("font-family",s),t.fontShape&&(e.classes+=" ",e.classes+=(n={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[t.fontShape])==null?"":n),t.fontSeries){var _n72=t.fontSeries.match(/(.?[lbm])?(.?[cx])?/);_n72&&(e.classes+=" ",e.classes+=(i={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=_n72[1])==null?"":r])==null?"":i,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"}[(a=_n72[2])==null?"":a])==null?"":o);}return"Main-Regular";}}]);}(us))(),new(function(_us3){function _class2(){_classCallCheck(this,_class2);return _callSuper(this,_class2,["latex"]);}_inherits(_class2,_us3);return _createClass(_class2,[{key:"createAtom",value:function createAtom(e){return new mu(e);}},{key:"serialize",value:function serialize(e,t){return e.filter(function(e){return e instanceof mu&&!e.isSuggestion;}).map(function(e){return e.value;});}},{key:"getFont",value:function getFont(){return null;}}]);}(us))();function id(e){var t;var n=/macos|ios/.test(g()),r=e.split("+"),i="";var _iterator86=_createForOfIteratorHelper(r),_step86;try{for(_iterator86.s();!(_step86=_iterator86.n()).done;){var _e341=_step86.value;i&&(i+=n?"\u2009":"<span class=\"ML__shortcut-join\">+</span>"),_e341.startsWith("[Key")?i+=_e341.slice(4,5):_e341.startsWith("Key")?i+=_e341.slice(3,4):_e341.startsWith("[Digit")?i+=_e341.slice(6,7):_e341.startsWith("Digit")?i+=_e341.slice(5,6):i+=(t={cmd:"\u2318",meta:n?"\u2318":"Ctrl",shift:n?"\u21E7":"Shift",alt:n?"\u2325":"Alt",ctrl:n?"\u2303":"Ctrl","\n":n?"\u23CE":"Return","[return]":n?"\u23CE":"Return","[enter]":n?"\u2324":"Enter","[tab]":n?"\u21E5":"Tab","[escape]":"Esc","[backspace]":n?"\u232B":"Backspace","[delete]":n?"\u2326":"Del","[pageup]":n?"\u21DE":"Page Up","[pagedown]":n?"\u21DF":"Page Down","[home]":n?"\u2912":"Home","[end]":n?"\u2913":"End","[space]":"Space","[equal]":"=","[minus]":"-","[comma]":",","[slash]":"/","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* 🔢",numpaddivide:"/ 🔢",numpadsubtract:"- 🔢",numpadadd:"+ 🔢",numpaddecimal:". 🔢",numpadcomma:", 🔢",help:"help",left:"\u21E0",up:"\u21E1",right:"\u21E2",down:"\u21E3","[arrowleft]":"\u21E0","[arrowup]":"\u21E1","[arrowright]":"\u21E2","[arrowdown]":"\u21E3"}[_e341.toLowerCase()])==null?_e341.toUpperCase():t;}}catch(err){_iterator86.e(err);}finally{_iterator86.f();}return i;}function ad(e){if(e instanceof MouseEvent||e instanceof PointerEvent)return{x:e.clientX,y:e.clientY};if((typeof TouchEvent==="undefined"?"undefined":_typeof(TouchEvent))<"u"&&e instanceof TouchEvent){var _t112=_toConsumableArray(e.touches).reduce(function(e,t){return{x:e.x+t.clientX,y:e.y+t.clientY};},{x:0,y:0}),_n73=e.touches.length;return{x:_t112.x/_n73,y:_t112.y/_n73};}}function od(e){var t={alt:!1,control:!1,shift:!1,meta:!1};return(e instanceof MouseEvent||e instanceof PointerEvent||(typeof TouchEvent==="undefined"?"undefined":_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 sd(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 cd=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".split("."));function ld(e){return e.ctrlKey||e.metaKey||["Dead","Process"].includes(e.key)?!1:e.code===""?!0:cd.has(e.code);}function ud(){var e;var t=document.activeElement;for(;(e=t==null?void 0:t.shadowRoot)!=null&&e.activeElement;)t=t.shadowRoot.activeElement;return t;}var dd=function(){function e(_e342){_classCallCheck(this,e);var t,n;this.lightDismiss=(t=_e342==null?void 0:_e342.lightDismiss)==null?!0:t,this.translucent=(n=_e342==null?void 0:_e342.translucent)==null?!1:n,this.state="closed";}return _createClass(e,[{key:"element",get:function get(){if(this._element)return this._element;var _e343=document.createElement("div");return _e343.setAttribute("role","presentation"),_e343.style.position="fixed",_e343.style.contain="content",_e343.style.top="0",_e343.style.left="0",_e343.style.right="0",_e343.style.bottom="0",_e343.style.zIndex="var(--scrim-zindex, 10099)",_e343.style.outline="none",this.translucent?(_e343.style.background="rgba(255, 255, 255, .2)",_e343.style.backdropFilter="contrast(40%)"):_e343.style.background="transparent",this._element=_e343,_e343;}},{key:"open",value:function open(_e344){var t;if(this.state!=="closed")return;this.state="opening",this.onDismiss=_e344==null?void 0:_e344.onDismiss,this.savedActiveElement=ud();var n=this.element;((t=_e344==null?void 0:_e344.root)==null?document.body:t).appendChild(n),n.addEventListener("click",this),document.addEventListener("touchmove",this,!1),document.addEventListener("scroll",this,!1);var r=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";var i=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight="".concat(i+r,"px");var a=document.querySelector(".MLK__plate");if(a instanceof HTMLElement){this.savedMlkPaddingRight=a.style.paddingRight;var _e345=Number.parseFloat(getComputedStyle(a).paddingRight);a.style.paddingRight="".concat(_e345+r,"px");}_e344!=null&&_e344.child&&n.append(_e344.child),this.state="open";}},{key:"close",value:function close(){var _e346,t,n,r,i;if(this.state!=="open"){this.element.parentElement;return;}this.state="closing",_typeof(this.onDismiss)=="function"&&this.onDismiss(),this.onDismiss=void 0;var a=this.element;a.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),a.remove(),document.body.style.overflow=(_e346=this.savedOverflow)==null?"":_e346,document.body.style.marginRight=(t=this.savedMarginRight)==null?"":t;var o=document.querySelector(".MLK__plate");o instanceof HTMLElement&&(o.style.paddingRight=(n=this.savedMlkPaddingRight)==null?"":n),ud()!==this.savedActiveElement&&((i=(r=this.savedActiveElement)==null?void 0:r.focus)==null||i.call(r)),a.innerHTML="",this.state="closed";}},{key:"handleEvent",value:function handleEvent(_e347){this.lightDismiss&&(_e347.target===this._element&&_e347.type==="click"||_e347.target===document&&(_e347.type==="touchmove"||_e347.type==="scroll"))&&(this.close(),_e347.preventDefault(),_e347.stopPropagation());}}],[{key:"scrim",get:function get(){return e._scrim||(e._scrim=new e()),e._scrim;}},{key:"open",value:function open(t){e.scrim.open(t);}},{key:"close",value:function close(){e.scrim.close();}},{key:"state",get:function get(){return e.scrim.state;}},{key:"element",get:function get(){return e.scrim.element;}}]);}();function fd(e,t,n){var r=null,i=null,a=!1,o=!1,s=!1,c=new AbortController(),l=c.signal;return e.addEventListener("keydown",function(t){if(a||t.key==="Process"||t.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test(t.code)){r=null;return;}r=t,i=null,n.onKeystroke(t)?e.textContent="":r=null;},{capture:!0,signal:l}),e.addEventListener("keypress",function(e){a||(r&&i&&n.onKeystroke(r),i=e);},{capture:!0,signal:l}),e.addEventListener("compositionstart",function(t){e.textContent="",a=!0,n.onCompositionStart(t.data);},{capture:!0,signal:l}),e.addEventListener("compositionupdate",function(e){a&&n.onCompositionUpdate(e.data);},{capture:!0,signal:l}),e.addEventListener("compositionend",function(t){e.textContent="",a&&(a=!1,n.onCompositionEnd(t.data));},{capture:!0,signal:l}),e.addEventListener("beforeinput",function(e){return e.stopImmediatePropagation();},{signal:l}),e.addEventListener("input",function(t){var r;if(!a&&(e.textContent="",t.inputType!=="insertCompositionText")){if(t.inputType==="insertFromPaste"){t.preventDefault(),t.stopPropagation();return;}n.onInput((r=t.data)==null?"":r),t.preventDefault(),t.stopPropagation();}},{signal:l}),e.addEventListener("paste",function(t){e.focus({preventScroll:!0}),e.textContent="",n.onPaste(t)||t.preventDefault(),t.stopImmediatePropagation();},{signal:l}),e.addEventListener("cut",function(e){return n.onCut(e);},{capture:!0,signal:l}),e.addEventListener("copy",function(e){return n.onCopy(e);},{capture:!0,signal:l}),e.addEventListener("blur",function(a){var c,l;if(((l=(c=a.relatedTarget)==null?void 0:c._mathfield)==null?void 0:l.element)===t){e.focus({preventScroll:!0}),a.preventDefault(),a.stopPropagation();return;}var u=!1,d=a.relatedTarget;for(;d;){if(d.classList.contains("ML__keyboard")){u=!0;break;}d=d.parentElement;}if(u){e.focus({preventScroll:!0}),a.preventDefault(),a.stopPropagation();return;}var f=dd.state;if(f==="open"||f==="opening"){a.preventDefault(),a.stopPropagation();return;}if(a.relatedTarget===a.target.getRootNode().host){a.preventDefault(),a.stopPropagation();return;}s||o||(s=!0,r=null,i=null,n.onBlur(),s=!1);},{capture:!0,signal:l}),e.addEventListener("focus",function(e){s||o||(o=!0,n.onFocus(),o=!1);},{capture:!0,signal:l}),{dispose:function dispose(){return c.abort();},cancelComposition:function cancelComposition(){a&&(_typeof(e.blur)=="function"&&e.blur(),requestAnimationFrame(function(){return e.focus({preventScroll:!0});}));},blur:function blur(){_typeof(e.blur)=="function"&&(s=!0,e.blur(),s=!1);},focus:function focus(){!o&&_typeof(e.focus)=="function"&&(o=!0,e.focus({preventScroll:!0}),o=!1);},hasFocus:function hasFocus(){return ud()===e;},setAriaLabel:function setAriaLabel(t){return e.setAttribute("aria-label",t);},setValue:function setValue(t){var n;e.textContent!==t&&(e.textContent=t,e.style.left="-1000px",(n=window.getSelection())==null||n.selectAllChildren(e));},moveTo:function moveTo(t,n){e.style.top="".concat(n,"px"),e.style.left="".concat(t,"px");}};}function pd(e){var t;if(!e||!ld(e))return"";var n;return e.key==="Unidentified"&&e.target&&(n=e.target.value),n=(t=n==null?e.key:n)==null?e.code:t,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(n)&&(n=""),n;}function md(e){e=pe(e);var 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?"[".concat(e.code,"]"):(t.push("[".concat(e.code,"]")),t.join("+"));}function hd(e){if(f()){var _t113=g(),_n74=e.startsWith("!"),_r31=e.endsWith(_t113);if(_n74&&!_r31||!_n74&&_r31)return!0;}return e==="!other"?!1:e==="other";}function gd(e,t,n){if(e.length===0)return"";var r=se(oe(md(n))),i=se({key:n.key,shift:n.shiftKey,alt:n.altKey,ctrl:n.ctrlKey,meta:n.metaKey||n.ctrlKey&&/macos|ios/.test(g()),cmd:!1,win:!1});for(var _n75=e.length-1;_n75>=0;_n75--)if((e[_n75].key===r||e[_n75].key===i)&&(!e[_n75].ifMode||e[_n75].ifMode===t))return e[_n75].command;return"";}function _d(e){var t=e;return xe(t)&&(t=t.length>0?t[0]+"("+t.slice(1).join("")+")":""),t;}function vd(e,t){var n=[];if(_typeof(t)=="string"){var _e348=Ac[t];xe(_e348)?n=_e348.slice():_e348&&n.push(_e348);}var r=_d(t),i=RegExp("^"+r.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");var _iterator87=_createForOfIteratorHelper(e),_step87;try{for(_iterator87.s();!(_step87=_iterator87.n()).done;){var _t114=_step87.value;i.test(_d(_t114.command))&&n.push(_t114.key);}}catch(err){_iterator87.e(err);}finally{_iterator87.f();}return n.map(id);}function yd(e,t){if(e.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(e.ifPlatform))throw Error("Unexpected platform \"".concat(e.ifPlatform,"\" for keybinding ").concat(e.key));if(e.ifLayout!==void 0&&(t.score===0||!e.ifLayout.includes(t.id)))return;var n=oe(e.key),r=e.ifPlatform;if(n.cmd){if(r&&r!=="macos"&&r!=="ios")throw Error("Unexpected \"cmd\" modifier with platform \""+r+"\"\n\"cmd\" modifier can only be used with macOS or iOS platform.");r||(r=g()==="ios"?"ios":"macos"),n.win=!1,n.cmd=!1,n.meta=!0;}if(n.win){if(r&&r!=="windows")throw Error("Unexpected \"win\" modifier with platform \""+r+"\"\n\"win\" modifier can only be used with Windows platform.");r="windows",n.win=!1,n.cmd=!1,n.meta=!0;}if(r&&!hd(r))return;if(/^\[.+\]$/.test(n.key))return l(c({},e),{key:se(n)});var i=fe(n.key,t);if(!i)return l(c({},e),{key:se(n)});if(i.shift&&n.shift||i.alt&&n.alt)throw Error("The keybinding ".concat(e.key," (").concat(bd(e.command),") is conflicting with the key combination ").concat(se(i)," using the ").concat(t.displayName," keyboard layout"));return i.shift=i.shift||n.shift,i.alt=i.alt||n.alt,i.meta=n.meta,i.ctrl=n.ctrl,l(c({},e),{key:se(i)});}function bd(e){if(Array.isArray(e)){var _t115=_toConsumableArray(e);return _t115.shift()+"("+_t115.map(function(e){return _typeof(e)=="string"?"\"".concat(e,"\""):e.toString();}).join(", ")+")";}return e;}function xd(e,t){var n=[],r=[];var _iterator88=_createForOfIteratorHelper(e),_step88;try{var _loop=function _loop(){var i=_step88.value;try{var _e349=yd(i,t);if(!_e349)return 1;var _n76=r.find(function(t){return t.key===_e349.key&&t.ifMode===_e349.ifMode;});if(_n76)throw Error("Ambiguous key binding ".concat(i.key," (").concat(bd(i.command),") matches ").concat(_n76.key," (").concat(bd(_n76.command),") with the ").concat(t.displayName," keyboard layout"));r.push(_e349);}catch(e){e instanceof Error&&n.push(e.message);}};for(_iterator88.s();!(_step88=_iterator88.n()).done;){if(_loop())continue;}}catch(err){_iterator88.e(err);}finally{_iterator88.f();}return[r,n];}var Sd=function(_R){function Sd(){_classCallCheck(this,Sd);return _callSuper(this,Sd,["latex"]);}_inherits(Sd,_R);return _createClass(Sd,[{key:"createAtom",value:function createAtom(e){return new mu(e);}},{key:"onPaste",value:function onPaste(e,t){if(!t)return!1;var n=_typeof(t)=="string"?t:t.getData("application/x-latex")||t.getData("text/plain");return n&&e.model.contentWillChange({inputType:"insertFromPaste",data:n})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,n)&&(e.startRecording(),e.snapshot("paste"),e.model.contentDidChange({inputType:"insertFromPaste"}),U(e)),e.startRecording(),!0):!1;}},{key:"insert",value:function insert(e,t,n){if(!e.contentWillChange({data:t,inputType:"insertText"}))return!1;n||(n={}),n.insertionMode||(n.insertionMode="replaceSelection"),n.selectionMode||(n.selectionMode="placeholder");var r=e.silenceNotifications;n.silenceNotifications&&(e.silenceNotifications=!0);var i=e.silenceNotifications;e.silenceNotifications=!0,n.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(lc(e.selection)):n.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):n.insertionMode==="insertBefore"?e.collapseSelection("backward"):n.insertionMode==="insertAfter"&&e.collapseSelection("forward");var a=[];var _iterator89=_createForOfIteratorHelper(t),_step89;try{for(_iterator89.s();!(_step89=_iterator89.n()).done;){var _e351=_step89.value;Ye.test(_e351)&&a.push(new mu(_e351));}}catch(err){_iterator89.e(err);}finally{_iterator89.f();}var o=e.at(e.position);if(o instanceof hu&&(o=o.lastChild),!(o.parent instanceof hu)){var _e350=new hu();o.parent.addChildAfter(_e350,o),o=_e350.firstChild;}var s=o.parent.addChildrenAfter(a,o);return e.silenceNotifications=i,n.selectionMode==="before"||(n.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(s)):s&&(e.position=e.offsetOf(s))),e.contentDidChange({data:t,inputType:"insertText"}),e.silenceNotifications=r,!0;}}]);}(R);function Cd(e){return e.atoms.find(function(e){return e.type==="latexgroup";});}function wd(e){var t,n;var r=Cd(e);return(n=(t=r==null?void 0:r.body)==null?void 0:t.filter(function(e){return e.type==="latex";}))==null?[]:n;}function Td(e,t){var n;var r=0,i=!1,a=Number.isFinite(t==null?void 0:t.before)?(n=t==null?void 0:t.before)==null?0:n:e.lastOffset;for(;r<=a&&!i;){var _t116=e.at(r);i=_t116 instanceof mu&&_t116.isSuggestion,i||r++;}if(!i)return[void 0,void 0];var o=r,s=!1;for(;o<=a&&!s;){var _t117=e.at(o);s=!(_t117 instanceof mu&&_t117.isSuggestion),s||o++;}return[r-1,o-1];}new Sd();function Ed(e,t){e.flushInlineShortcutBuffer(),e.stopCoalescingUndo();var n=Dd(e,t),r=e.model;return r.selectionIsCollapsed?(e.defaultStyle.fontSeries&&n.fontSeries===e.defaultStyle.fontSeries&&(n.fontSeries="auto"),n.fontShape&&n.fontShape===e.defaultStyle.fontShape&&(n.fontShape="auto"),n.color&&n.color===e.defaultStyle.color&&(n.color="none"),n.backgroundColor&&n.backgroundColor===e.defaultStyle.backgroundColor&&(n.backgroundColor="none"),n.fontSize&&n.fontSize===e.defaultStyle.fontSize&&(n.fontSize="auto"),e.defaultStyle=c(c({},e.defaultStyle),n)):e.model.deferNotifications({content:!0,type:"insertText"},function(){r.selection.ranges.forEach(function(e){return Fu(r,e,n,{operation:"toggle"});}),e.snapshot("style-change");}),!0;}hf({applyStyle:Ed},{target:"mathfield",canUndo:!0,changeContent:!0});function Dd(e,t){var n,r,i,a,o,s,c,l,u,d;var f={};if(_typeof(t.color)=="string"){var _a20=(r=e.colorMap((n=t.color)==null?t.verbatimColor:n))==null?"none":r;_a20!==t.color&&(f.verbatimColor=(i=t.verbatimColor)==null?t.color:i),f.color=_a20;}if(_typeof(t.backgroundColor)=="string"){var _n77=(o=e.backgroundColorMap((a=t.backgroundColor)==null?t.verbatimBackgroundColor:a))==null?"none":o;_n77!==t.backgroundColor&&(f.verbatimBackgroundColor=(s=t.verbatimBackgroundColor)==null?t.backgroundColor:s),f.backgroundColor=_n77;}_typeof(t.fontFamily)=="string"&&(f.fontFamily=t.fontFamily),_typeof(t.series)=="string"&&(f.fontSeries=t.series),_typeof(t.fontSeries)=="string"&&(f.fontSeries=t.fontSeries.toLowerCase()),f.fontSeries&&(f.fontSeries=(c={bold:"b",medium:"m",normal:"m"}[f.fontSeries])==null?f.fontSeries:c),_typeof(t.shape)=="string"&&(f.fontShape=t.shape),_typeof(t.fontShape)=="string"&&(f.fontShape=t.fontShape.toLowerCase()),f.fontShape&&(f.fontShape=(l={italic:"it",up:"n",upright:"n",normal:"n"}[f.fontShape])==null?f.fontShape:l),t.variant&&(f.variant=t.variant.toLowerCase()),t.variantStyle!==void 0&&(f.variantStyle=_typeof(t.variantStyle)=="string"&&t.variantStyle!==""?t.variantStyle.toLowerCase():t.variantStyle);var p=(u=t.size)==null?t.fontSize:u;return _typeof(p)=="number"?f.fontSize=Math.max(1,Math.min(10,p)):_typeof(p)=="string"&&(f.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?{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[p]:d),f;}function Od(e,t,n){var r,i;var a=e.model;if(a.mode==="latex")return{};var o=e.styleBias;if(o==="none")return e.defaultStyle;if(a.mode==="text")return(i=(r=a.at(o==="right"?n.after:n.before))==null?void 0:r.style)==null?e.defaultStyle:i;if(a.mode==="math"){var _t118=a.at(o==="right"?n.after:n.before);return c(_t118?l(c({},_t118.style),{variant:"normal"}):{variant:"normal"},e.defaultStyle);}return{};}function kd(e){var t=e.options.onInsertStyle;if(t===null)return{};t===void 0&&(t=Od);var n=e.model,r=e.styleBias,i=n.at(n.position),a=Ad(n,i,r),o=Ad(n,i.rightSibling,r);return t(e,n.position,{before:a,after:o});}function Ad(e,t,n){var r;return!t||t.type==="first"&&n!=="right"?-1:t.type==="group"?!t.body||t.body.length<2?-1:((r=t.body)==null?void 0:r.length)===1||n!=="right"?e.offsetOf(t.body[0]):e.offsetOf(t.body[t.body.length-1]):e.offsetOf(t);}function jd(e){var t=wd(e.model).filter(function(e){return e.isSuggestion;});if(t.length!==0){e.model.position=e.model.offsetOf(t[0].leftSibling);var _iterator90=_createForOfIteratorHelper(t),_step90;try{for(_iterator90.s();!(_step90=_iterator90.n()).done;){var _e352=_step90.value;_e352.parent.removeChild(_e352);}}catch(err){_iterator90.e(err);}finally{_iterator90.f();}}}function Md(e,t){var n;var r=e.model;jd(e);var _iterator91=_createForOfIteratorHelper(wd(r)),_step91;try{for(_iterator91.s();!(_step91=_iterator91.n()).done;){var _e354=_step91.value;_e354.isError=!1;}}catch(err){_iterator91.e(err);}finally{_iterator91.f();}if(!r.selectionIsCollapsed||e.options.popoverPolicy==="off"){Hd(e);return;}var i=[],a=r.at(r.position);for(;a&&a instanceof mu&&/^[a-zA-Z\*]$/.test(a.value);)a=a.leftSibling;if(a&&a instanceof mu&&a.value==="\\")for(i.push(a),a=a.rightSibling;a&&a instanceof mu&&/^[a-zA-Z\*]$/.test(a.value);)i.push(a),a=a.rightSibling;var o=i.map(function(e){return e.value;}).join(""),s=nt(e,o);if(s.length===0){if(/^\\[a-zA-Z\*]+$/.test(o)){var _iterator92=_createForOfIteratorHelper(i),_step92;try{for(_iterator92.s();!(_step92=_iterator92.n()).done;){var _e353=_step92.value;_e353.isError=!0;}}catch(err){_iterator92.e(err);}finally{_iterator92.f();}}Hd(e);return;}var c=(n=t==null?void 0:t.atIndex)==null?0:n;e.suggestionIndex=c<0?s.length-1:c%s.length;var l=s[e.suggestionIndex];if(l!==o){var _t119=i[i.length-1];_t119.parent.addChildrenAfter(_toConsumableArray(l.slice(o.length-l.length)).map(function(e){return new mu(e,{isSuggestion:!0});}),_t119),cf(e,{interactive:!0});}zd(e,s);}function Nd(e){var _Td=Td(e,{before:e.position}),_Td2=_slicedToArray(_Td,2),t=_Td2[0],n=_Td2[1];if(t===void 0||n===void 0)return!1;var r=!1;return e.getAtoms([t,n]).forEach(function(e){e.isSuggestion&&(e.isSuggestion=!1,r=!0);}),r;}function Pd(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"accept";var n=arguments.length>2?arguments[2]:undefined;var r,i;Hd(e);var a=Cd(e.model);if(!a)return!1;if(t==="accept-suggestion"||t==="accept-all"){var _n78=wd(e.model).filter(function(e){return e.isSuggestion;});if(_n78.length!==0){var _iterator93=_createForOfIteratorHelper(_n78),_step93;try{for(_iterator93.s();!(_step93=_iterator93.n()).done;){var _e355=_step93.value;_e355.isSuggestion=!1;}}catch(err){_iterator93.e(err);}finally{_iterator93.f();}e.model.position=e.model.offsetOf(_n78[_n78.length-1]);}if(t==="accept-suggestion")return _n78.length!==0;}var o=wd(e.model).filter(function(e){return!e.isSuggestion;}).map(function(e){return e.value;}).join(""),s=a.leftSibling;if(a.parent.removeChild(a),e.model.position=e.model.offsetOf(s),e.switchMode((r=n==null?void 0:n.mode)==null?"math":r),t==="reject")return!0;var l=c({},kd(e));return!/^[a-zA-Z0-9]$/.test(o)&&e.styleBias!=="none"&&(l.variant="normal",l.variantStyle=void 0),R.insert(e.model,o,{selectionMode:(i=n==null?void 0:n.selectItem)!=null&&i?"item":"placeholder",format:"latex",mode:"math",style:l}),e.snapshot(),e.model.announce("replacement"),e.switchMode("math"),!0;}function Fd(e){var t;var n=document.getElementById(e);return n?n.dataset.refcount=Number(Number.parseInt((t=n.dataset.refcount)==null?"0":t)+1).toString():(n=document.createElement("div"),n.setAttribute("aria-hidden","true"),n.dataset.refcount="1",n.id=e,document.body.append(n)),n;}function Id(e){var t;var n=document.getElementById(e);if(!n)return;var r=Number.parseInt((t=n.getAttribute("data-refcount"))==null?"0":t);r<=1?n.remove():n.dataset.refcount=Number(r-1).toString();}function Ld(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">");}function Rd(e,t){var n=new I({from:e.context});return Cs(Ss(Ou(new F(new L({mode:"math",type:"root",body:eu(t,{context:n})}).render(n),{classes:"ML__base"}),n)),{classes:"ML__latex"}).toMarkup();}function zd(e,t){var n;if(t.length===0){Hd(e);return;}var r="";var _iterator94=_createForOfIteratorHelper(t.entries()),_step94;try{for(_iterator94.s();!(_step94=_iterator94.n()).done;){var _step94$value=_slicedToArray(_step94.value,2),_n79=_step94$value[0],_i47=_step94$value[1];var _t120=_i47,_a21=Rd(e,_i47),_o17=vd(e.keybindings,_t120).join("<br>");r+="<li role=\"button\" data-command=\"".concat(Ld(_t120),"\" ").concat(_n79===e.suggestionIndex?"class=ML__popover__current":"","><span class=\"ML__popover__latex\">").concat(Ld(_t120),"</span><span class=\"ML__popover__command\">").concat(_a21,"</span>"),_o17&&(r+="<span class=\"ML__popover__keybinding\">".concat(_o17,"</span>")),r+="</li>";}}catch(err){_iterator94.e(err);}finally{_iterator94.f();}var i=Ud(e,"<ul>".concat(r,"</ul>"));Bd()&&((n=i.querySelector(".ML__popover__current"))==null||n.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(function(){var t;i&&!Bd()&&(i.classList.add("is-visible"),Vd(e),(t=i.querySelector(".ML__popover__current"))==null||t.scrollIntoView({block:"nearest",inline:"nearest"}));},32);}function Bd(){var e=document.getElementById("mathlive-suggestion-popover");return e?e.classList.contains("is-visible"):!1;}function Vd(e,t){var n,r,i;if(!e.element||e.element.mathfield!==e||!Bd())return;if(((n=e.model.at(e.model.position))==null?void 0:n.type)!=="latex"){Hd(e);return;}if(t!=null&&t.deferred){setTimeout(function(){return Vd(e);},32);return;}var a=Nc(e.field);if(!a)return;var o=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,s=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,c=window.innerWidth-document.documentElement.clientWidth,l=window.innerHeight-document.documentElement.clientHeight,u=(i=(r=window.mathVirtualKeyboard)==null?void 0:r.boundingRect.height)==null?0:i,d=document.getElementById("mathlive-suggestion-popover");a.x+d.offsetWidth/2>s-c?d.style.left="".concat(s-d.offsetWidth-c,"px"):a.x-d.offsetWidth/2<0?d.style.left="0":d.style.left="".concat(a.x-d.offsetWidth/2,"px");var f=a.y-a.height;o-l-u-a.y<f?(d.classList.add("ML__popover--reverse-direction"),d.classList.remove("top-tip"),d.classList.add("bottom-tip"),d.style.top="".concat(a.y-a.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="".concat(a.y+15,"px"));}function Hd(e){e.suggestionIndex=0,document.getElementById("mathlive-suggestion-popover")&&Id("mathlive-suggestion-popover");}function Ud(e,t){var n=document.getElementById("mathlive-suggestion-popover");return n?Id("mathlive-suggestion-popover"):(rl("suggestion-popover"),rl("core")),n=Fd("mathlive-suggestion-popover"),n.addEventListener("pointerdown",function(e){return e.preventDefault();}),n.addEventListener("click",function(t){var n=t.target;for(;n&&!n.dataset.command;)n=n.parentElement;n&&(Pd(e,"reject"),R.insert(e.model,n.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),e.dirty=!0,e.focus());}),n.innerHTML=globalThis.MathfieldElement.createHTML(t),n;}function Wd(){document.getElementById("mathlive-suggestion-popover")&&(Id("mathlive-suggestion-popover"),il("suggestion-popover"),il("core"));}function Gd(){var e=String(Error().stack).replace(/^Error.*\n/,"").split("\n");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 \"".concat(Error().stack,"\").")),"";var t=e[1],n=t.match(/http.*\.ts[\?:]/);return n&&(t=e[2]),n=t.match(/(https?:.*):[0-9]+:[0-9]+/),n||(n=t.match(/at (.*(\.ts))[\?:]/),n||(n=t.match(/at (.*(\.mjs|\.js))[\?:]/))),n?n[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 \"".concat(t,"\").")),"");}var Kd=null,qd,Jd,Yd=((Jd=(qd=globalThis==null?void 0:globalThis.document)==null?void 0:qd.currentScript)==null?void 0:Jd.src)||Gd();function Xd(e){return Zd.apply(this,arguments);}function Zd(){return Zd=e.t(_regenerator().m(function _callee(e){var _e356,_t121,_t122,_t123;return _regenerator().w(function(_context){while(1)switch(_context.p=_context.n){case 0:if(!/^(?:[a-z+]+:)?\/\//i.test(e)){_context.n=6;break;}_context.p=1;return _context.a(2,new URL(e).href);case 2:_context.p=2;_t121=_context.v;if(!e.startsWith("//")){_context.n=5;break;}_context.p=3;return _context.a(2,new URL("".concat(window.location.protocol).concat(e)).href);case 4:_context.p=4;_t122=_context.v;case 5:return _context.a(2,e);case 6:if(!(Kd===null)){_context.n=10;break;}_context.p=7;_context.n=8;return fetch(Yd,{method:"HEAD"});case 8:_e356=_context.v;_e356.status===200&&(Kd=_e356.url,Kd=Kd.replace(/\/\+esm$/,"/"),Kd.includes("jsdelivr.net/")&&(Kd+="/"));_context.n=10;break;case 9:_context.p=9;_t123=_context.v;console.error("Invalid URL \"".concat(e,"\" (relative to \"").concat(Yd,"\")"));case 10:return _context.a(2,new URL(e,Kd==null?Yd:Kd).href);}},_callee,null,[[7,9],[3,4],[1,2]]);})),Zd.apply(this,arguments);}function Qd(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return new FontFace(e,"url(".concat(t,".woff2) format('woff2')"),n);}var $d="not-loaded";function ef(){return tf.apply(this,arguments);}function tf(){return tf=e.t(_regenerator().m(function _callee2(){return _regenerator().w(function(_context2){while(1)switch(_context2.n){case 0:return _context2.a(2,($d="not-loaded",nf()));}},_callee2);})),tf.apply(this,arguments);}function nf(){return rf.apply(this,arguments);}function rf(){return rf=e.t(_regenerator().m(function _callee3(){var e,_e357,_t124,_n80,_r32,_t125;return _regenerator().w(function(_context3){while(1)switch(_context3.p=_context3.n){case 0:if(!($d==="not-loaded")){_context3.n=9;break;}if(!($d="loading",(e=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null&&e)){_context3.n=1;break;}$d="ready";return _context3.a(2);case 1:if(!(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document)){_context3.n=9;break;}_e357=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Typewriter","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"],_t124=Array.from(document.fonts).map(function(e){return e.family;});if(!_e357.every(function(e){return _t124.includes(e);})){_context3.n=2;break;}$d="ready";return _context3.a(2);case 2:if(globalThis.MathfieldElement.fontsDirectory){_context3.n=3;break;}$d="not-loaded";return _context3.a(2);case 3:_context3.n=4;return Xd(globalThis.MathfieldElement.fontsDirectory);case 4:_n80=_context3.v;if(_n80){_context3.n=5;break;}document.body.classList.add("ML__fonts-did-not-load"),$d="error";return _context3.a(2);case 5:_n80.endsWith("/")&&(_n80=_n80.slice(0,-1));_r32=[["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(function(e){return Qd(e[0].replace(/-[a-zA-Z]+$/,""),"".concat(_n80,"/").concat(e[0]),e[1]);});_context3.p=6;_context3.n=7;return Promise.all(_r32.map(function(e){try{return e.load();}catch(e){}}));case 7:_context3.v.forEach(function(e){return document.fonts.add(e);});$d="ready";return _context3.a(2);case 8:_context3.p=8;_t125=_context3.v;console.error("MathLive 0.110.0: The math fonts could not be loaded from \"".concat(_n80,"\""),{cause:_t125}),document.body.classList.add("ML__fonts-did-not-load");$d="error";case 9:return _context3.a(2);}},_callee3,null,[[6,8]]);})),rf.apply(this,arguments);}function af(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var n=3735928559^t,r=1103547991^t;for(var _t126=0;_t126<e.length;_t126++){var _i48=e.charCodeAt(_t126);n=Math.imul(n^_i48,2654435761),r=Math.imul(r^_i48,1597334677);}return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),4294967296*(2097151&r)+(n>>>0);}function U(e,t){!e||e.dirty||!e.field||(e.resizeObserver.unobserve(e.field),e.dirty=!0,requestAnimationFrame(function(){jc(e)&&e.dirty&&(e.atomBoundsCache=new Map(),cf(e,t),e.resizeObserver.observe(e.field),e.resizeObserverStarted=!0);}));}function of(e,t){var n;t=t==null?{}:t;var r=new I({from:l(c({},e.context),{atomIdsSettings:{seed:t.forHighlighting?af(L.serialize([e.model.root],{expandMacro:!1,defaultMode:e.options.defaultMode})):"random",groupNumbers:(n=t.forHighlighting)==null?!1:n},letterShapeStyle:e.options.letterShapeStyle}),mathstyle:e.options.defaultMode==="inline-math"?"textstyle":"displaystyle"});return Cs(Ou(e.model.root.render(r),r),{classes:e.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}});}function sf(e,t){try{var _n81=e.model;_n81.root.caret=void 0,_n81.root.isSelected=!1,_n81.root.containsCaret=!0;var _iterator95=_createForOfIteratorHelper(_n81.atoms),_step95;try{for(_iterator95.s();!(_step95=_iterator95.n()).done;){var _e359=_step95.value;_e359.caret=void 0,_e359.isSelected=!1,_e359.containsCaret=!1;}}catch(err){_iterator95.e(err);}finally{_iterator95.f();}if(_n81.selectionIsCollapsed){var _t127=_n81.at(_n81.position);_t127.caret=e.model.mode;var _r33=_t127.parent;for(;_r33;)_r33.containsCaret=!0,_r33=_r33.parent;}else{var _e358=_n81.getAtoms(_n81.selection,{includeChildren:!0,includeFirstAtoms:!0});var _iterator96=_createForOfIteratorHelper(_e358),_step96;try{for(_iterator96.s();!(_step96=_iterator96.n()).done;){var _t128=_step96.value;_t128.isSelected=!0;}}catch(err){_iterator96.e(err);}finally{_iterator96.f();}}return of(e,t).toMarkup();}catch(e){return console.error(e),"<span class=\"ML__latex\" translate=\"no\" aria-hidden=\"true\">\uD83D\uDEAB</span>";}}function cf(e,t){if(!jc(e))return;t!=null||(t={});var n=e.element.querySelector("[part=virtual-keyboard-toggle]");n&&(n.style.display=e.hasEditableContent?"":"none");var r=e.field;if(!r)return;var i=e.isSelectionEditable&&e.hasFocus(),a=r.classList.contains("ML__focused");a&&!i?r.classList.remove("ML__focused"):!a&&i&&r.classList.add("ML__focused");var o=sf(e,t),s=e.element.querySelector("[part=menu-toggle]");if(s){var _t129=!1;(e.disabled||e.readOnly&&!e.hasEditableContent||e.userSelect==="none")&&(_t129=!0),!_t129&&e.element.offsetWidth<50&&(_t129=!0),s.style.display=_t129?"none":"";}if(e.model.atoms.length<=1){var _t130=e.options.contentPlaceholder;_t130&&(o+="<span part=placeholder class=\"ML__content-placeholder\">".concat(X(_t130),"</span>"));}r.innerHTML=globalThis.MathfieldElement.createHTML(o),lf(e,t.interactive),e.updateToggleLayout(),e.dirty=!1;}function lf(e,t){var n;var r=e.field;if(!r)return;var _iterator97=_createForOfIteratorHelper(r.querySelectorAll(".ML__selection, .ML__contains-highlight")),_step97;try{for(_iterator97.s();!(_step97=_iterator97.n()).done;){var _e361=_step97.value;_e361.remove();}}catch(err){_iterator97.e(err);}finally{_iterator97.f();}if(!(t!=null&&t)&&$d!=="error"&&$d!=="ready"){setTimeout(function(){$d==="ready"?lf(e):setTimeout(function(){return lf(e);},128);},32);return;}var i=e.model;(n=e.atomBoundsCache)==null||n.clear();var a,o=function o(){if(a!==void 0)return a;var e=r.offsetWidth,t=r.getBoundingClientRect().width;return a=Math.floor(t)/e,isNaN(a)&&(a=1),a;};if(i.selectionIsCollapsed){Vd(e,{deferred:!0});var _t131=i.at(i.position);for(;_t131&&_t131.type!=="prompt"&&!(_t131.containsCaret&&_t131.displayContainsHighlight);)_t131=_t131.parent;if(_t131!=null&&_t131.containsCaret&&_t131.displayContainsHighlight){var _n82=o(),_i49=Fc(e,Lc(e,_t131),_n82);if(_i49){_i49.left/=_n82,_i49.right/=_n82,_i49.top/=_n82,_i49.bottom/=_n82;var _e360=document.createElement("div");_e360.classList.add("ML__contains-highlight"),_e360.style.position="absolute",_e360.style.left="".concat(_i49.left+1,"px"),_e360.style.top="".concat(Math.ceil(_i49.top),"px"),_e360.style.width="".concat(Math.ceil(_i49.right-_i49.left),"px"),_e360.style.height="".concat(Math.ceil(_i49.bottom-_i49.top),"px"),r.insertBefore(_e360,r.childNodes[0]);}}return;}var s=o(),c=uf(Bc(e,{excludeAtomsWithBackground:!0}));var _iterator98=_createForOfIteratorHelper(c),_step98;try{for(_iterator98.s();!(_step98=_iterator98.n()).done;){var _e362=_step98.value;_e362.left/=s,_e362.right/=s,_e362.top/=s,_e362.bottom/=s;var _t132=document.createElement("div");_t132.classList.add("ML__selection"),_t132.style.position="absolute",_t132.style.left="".concat(_e362.left,"px"),_t132.style.top="".concat(_e362.top,"px"),_t132.style.width="".concat(Math.ceil(_e362.right-_e362.left),"px"),_t132.style.height="".concat(Math.max(1,Math.ceil(_e362.bottom-_e362.top-1)),"px"),r.insertBefore(_t132,r.childNodes[0]);}}catch(err){_iterator98.e(err);}finally{_iterator98.f();}}function uf(e){var t=[];var _iterator99=_createForOfIteratorHelper(e),_step99;try{for(_iterator99.s();!(_step99=_iterator99.n()).done;){var _n83=_step99.value;var _e363=!1;var _iterator101=_createForOfIteratorHelper(t),_step101;try{for(_iterator101.s();!(_step101=_iterator101.n()).done;){var _r34=_step101.value;if(_n83.left===_r34.left&&_n83.right===_r34.right&&_n83.top===_r34.top&&_n83.bottom===_r34.bottom){_e363=!0;break;}}}catch(err){_iterator101.e(err);}finally{_iterator101.f();}_e363||t.push(_n83);}}catch(err){_iterator99.e(err);}finally{_iterator99.f();}e=t,t=[];var _iterator100=_createForOfIteratorHelper(e),_step100;try{for(_iterator100.s();!(_step100=_iterator100.n()).done;){var _n84=_step100.value;var _r35=0;var _iterator102=_createForOfIteratorHelper(e),_step102;try{for(_iterator102.s();!(_step102=_iterator102.n()).done;){var _t133=_step102.value;if(_n84.left>=_t133.left&&_n84.right<=_t133.right&&_n84.top>=_t133.top&&_n84.bottom<=_t133.bottom&&(_r35+=1,_r35>1))break;}}catch(err){_iterator102.e(err);}finally{_iterator102.f();}_r35===1&&t.push(_n84);}}catch(err){_iterator100.e(err);}finally{_iterator100.f();}return t;}function df(e){if(!e)return;var t=e.model,n=t.selection,r=L.serialize([t.root],{expandMacro:!1,defaultMode:e.options.defaultMode});R.insert(t,r,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",silenceNotifications:!0,mode:"math"});var i=t.silenceNotifications;t.silenceNotifications=!0,t.selection=n,t.silenceNotifications=i,U(e);}function ff(){var _iterator103=_createForOfIteratorHelper(document.querySelectorAll(".ML__mathfield")),_step103;try{for(_iterator103.s();!(_step103=_iterator103.n()).done;){var e=_step103.value;"_mathfield"in e&&df(e._mathfield);}}catch(err){_iterator103.e(err);}finally{_iterator103.f();}}var pf=3,mf;function hf(e,t){t=c({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},t==null?{}:t),mf||(mf={});for(var _i50=0,_Object$keys7=Object.keys(e);_i50<_Object$keys7.length;_i50++){var _n85=_Object$keys7[_i50];mf[_n85],mf[_n85]=l(c({},t),{fn:e[_n85]});}}function gf(e){var t;if(Array.isArray(e)){if(e[0]==="performWithFeedback")return gf(e[1]);t=e[0];}else t=e;return mf[t];}function _f(e){var t;return(t=gf(e))==null?void 0:t.target;}function vf(e,t){var n,r;if(t=Sf(t),!t)return!1;var i,a=[],o=!1,s=!1;xe(t)?(i=t[0],a=t.slice(1)):i=t;var c=mf[i],l=c==null?void 0:c.target;if(l==="model"){var _mf$i;if(!e.isSelectionEditable&&c!=null&&c.changeContent)return e.model.announce("plonk"),!1;/^(delete|add)/.test(i)&&(i!=="deleteBackward"&&e.flushInlineShortcutBuffer(),e.snapshot(i)),/^complete/.test(i)||jd(e),(_mf$i=mf[i]).fn.apply(_mf$i,[e.model].concat(_toConsumableArray(a))),Md(e),s=!0,o=!0;}else if(l==="virtual-keyboard")s=(r=(n=window.mathVirtualKeyboard)==null?void 0:n.executeCommand(t))==null?!1:r,o=!0;else if(mf[i]){var _mf$i2;if(!e.isSelectionEditable&&c!=null&&c.changeContent)return e.model.announce("plonk"),!1;/^(undo|redo)/.test(i)&&e.flushInlineShortcutBuffer(),s=(_mf$i2=mf[i]).fn.apply(_mf$i2,[e].concat(_toConsumableArray(a))),o=!0;}else throw Error("Unknown command \"".concat(i,"\""));return l!=="virtual-keyboard"&&(!e.model.selectionIsCollapsed||c!=null&&c.changeSelection&&i!=="deleteBackward")&&(e.flushInlineShortcutBuffer(),c!=null&&c.changeContent||e.stopCoalescingUndo(),e.defaultStyle={}),s&&(c!=null&&c.changeSelection&&o?(e.dirty=!0,e.scrollIntoView()):U(e)),o;}function yf(e,t){var n;if(!e)return!1;e.focus(),K_.keypressVibration&&h()&&navigator.vibrate(pf);var r=gf(t);globalThis.MathfieldElement.playSound((n=r==null?void 0:r.audioFeedback)==null?"keypress":n);var i=e.executeCommand(t);return e.scrollIntoView(),i;}hf({performWithFeedback:function performWithFeedback(e,t){return yf(e,t);}});function bf(e){return Md(e,{atIndex:e.suggestionIndex+1}),!1;}function xf(e){return Md(e,{atIndex:e.suggestionIndex-1}),!1;}hf({complete:Pd},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),hf({dispatchEvent:function dispatchEvent(e,t,n){var r,i;return(i=(r=e.host)==null?void 0:r.dispatchEvent(new CustomEvent(t,{detail:n})))==null?!1:i;}},{target:"mathfield"}),hf({nextSuggestion:bf,previousSuggestion:xf},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});function Sf(e){if(!e)return;if(xe(e)&&e.length>0){var _t134=e[0];return _t134=_t134.replace(/-\w/g,function(e){return e[1].toUpperCase();}),_t134==="performWithFeedback"&&e.length===2?[_t134,Sf(e[1])]:[_t134].concat(_toConsumableArray(e.slice(1)));}if(_typeof(e)!="string")return;var t=e.trim().match(/^([a-zA-Z0-9-]+)\((.*)\)$/);return t?[t[1].replace(/-\w/g,function(e){return e[1].toUpperCase();})].concat(_toConsumableArray(t[2].split(",").map(function(e){return e.trim();}).map(function(e){if(/"[^"]*"/.test(e)||/'[^']*'/.test(e))return e.slice(1,-1);if(/^true$/.test(e))return!0;if(/^false$/.test(e))return!1;if(/^[-]?\d+$/.test(e))return parseInt(e,10);if(/^\{.*\}$/.test(e))try{return JSON.parse(e);}catch(t){return console.error("Invalid argument:",e),e;}return Sf(e);}))):e.replace(/-\w/g,function(e){return e[1].toUpperCase();});}var Cf="mathlive#virtual-keyboard-message";function wf(e){var t;return e.type==="message"?((t=e.data)==null?void 0:t.type)===Cf:!1;}var Tf=function(){function e(){_classCallCheck(this,e);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={};}return _createClass(e,[{key:"getKeycap",value:function getKeycap(_e364){}},{key:"setKeycap",value:function setKeycap(_e365,t){this.sendMessage("update-setting",{setKeycap:{keycap:_e365,value:t}});}},{key:"alphabeticLayout",set:function set(_e366){this.sendMessage("update-setting",{alphabeticLayout:_e366});}},{key:"layouts",set:function set(_e367){this.sendMessage("update-setting",{layouts:_e367});}},{key:"normalizedLayouts",get:function get(){return[];}},{key:"editToolbar",set:function set(_e368){this.sendMessage("update-setting",{editToolbar:_e368});}},{key:"container",set:function set(_e369){throw Error("Container inside an iframe cannot be changed");}},{key:"show",value:function show(_e370){this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:!0},bubbles:!0,cancelable:!0,composed:!0}))&&(this.sendMessage("show",_e370),this.dispatchEvent(new Event("virtual-keyboard-toggle")));}},{key:"hide",value:function hide(_e371){this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:!1},bubbles:!0,cancelable:!0,composed:!0}))&&(this.sendMessage("hide",_e371),this.dispatchEvent(new Event("virtual-keyboard-toggle")));}},{key:"isShifted",get:function get(){return this._isShifted;}},{key:"visible",get:function get(){return this._boundingRect.height>0;},set:function set(_e372){_e372?this.show():this.hide();}},{key:"boundingRect",get:function get(){return this._boundingRect;}},{key:"executeCommand",value:function executeCommand(_e373){return this.sendMessage("execute-command",{command:_e373}),!0;}},{key:"updateToolbar",value:function updateToolbar(_e374){this.sendMessage("update-toolbar",_e374);}},{key:"update",value:function update(_e375){this.sendMessage("update-setting",_e375);}},{key:"connect",value:function connect(){this.sendMessage("connect");}},{key:"disconnect",value:function disconnect(){this.sendMessage("disconnect");}},{key:"addEventListener",value:function addEventListener(_e376,t,n){this.listeners[_e376]||(this.listeners[_e376]=new Set()),this.listeners[_e376].has(t)||this.listeners[_e376].add(t);}},{key:"dispatchEvent",value:function dispatchEvent(_e377){return!this.listeners[_e377.type]||this.listeners[_e377.type].size===0?!0:(this.listeners[_e377.type].forEach(function(t){_typeof(t)=="function"?t(_e377):t==null||t.handleEvent(_e377);}),!_e377.defaultPrevented);}},{key:"removeEventListener",value:function removeEventListener(_e378,t,n){this.listeners[_e378]&&this.listeners[_e378].delete(t);}},{key:"handleEvent",value:function handleEvent(_e379){if(wf(_e379)){if(!Vc(_e379.origin,this.originValidator))throw new DOMException("Message from unknown origin (".concat(_e379.origin,") cannot be handled"),"SecurityError");this.handleMessage(_e379.data);}}},{key:"handleMessage",value:function handleMessage(_e380){var t=_e380.action;if(t==="execute-command"){var _t135=_e380.command;_f(_t135)==="virtual-keyboard"&&this.executeCommand(_t135);return;}if(t==="synchronize-proxy"){this._boundingRect=_e380.boundingRect,this._isShifted=_e380.isShifted;return;}if(t==="geometry-changed"){this._boundingRect=_e380.boundingRect,this.dispatchEvent(new Event("geometrychange"));return;}}},{key:"sendMessage",value:function sendMessage(_e381){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};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(c({type:Cf,action:_e381},t),this.targetOrigin);}}],[{key:"singleton",get:function get(){return this._singleton||(this._singleton=new e()),this._singleton;}}]);}(),Ef={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:"\\exponentialE",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:"\u2264"}},{label:">",latex:">",class:"hide-shift",shift:{latex:"\\ge",label:"\u2265"}},"[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:"αβγ",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"<i>φ</i>",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"<i>ς</i>",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"<i>ϵ</i>",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"epsilon",shift:"\\char\"0190"},{label:"<i>ρ</i>",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:"\\char\"3A1"},{label:"<i>τ</i>",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:"\\char\"3A4"},{label:"<i>υ</i>",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"<i>θ</i>",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"<i>ι</i>",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:"\\char\"399"},{label:"<i>ο</i>",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:"\\char\"39F"},{label:"<i>π</i>",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"<i>α</i>",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:"\\char\"391"},{label:"<i>σ</i>",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"<i>δ</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>γ</i>",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"<i>η</i>",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:"\\char\"397"},{label:"<i>ξ</i>",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"<i>κ</i>",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"<i>λ</i>",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"<i>ζ</i>",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:"\\char\"396"},{label:"<i>χ</i>",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:"\\char\"3A7"},{label:"<i>ψ</i>",class:"MLK__tex hide-shift",insert:"\\psi",aside:"psi",shift:"\\Psi"},{label:"<i>ω</i>",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"<i>β</i>",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:"\\char\"392"},{label:"<i>ν</i>",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:"\\char\"39D"},{label:"<i>μ</i>",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:"\\char\"39C"},"[backspace]"],["[separator]",{label:"<i>ε</i>",class:"MLK__tex",insert:"\\varepsilon",aside:"epsilon var."},{label:"<i>ϑ</i>",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"<i>ϰ</i>",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"<i>ϖ</i>",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"<i>ϱ</i>",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"∞\u2260\u2208",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"},"[hide-keyboard]"]]},minimalist:{label:"minimalist",layers:[{style:"\n div.minimalist-backdrop {\n display: flex;\n justify-content: center;\n } \n div.minimalist-container {\n --keycap-height: 40px;\n --keycap-max-width: 53px;\n --keycap-small-font-size: 12px;\n background: var(--keyboard-background);\n padding: 20px 20px 0px 20px;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n border: 1px solid var(--keyboard-border);\n box-shadow: 0 0 32px rgb(0 0 0 / 30%);\n } \n ",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]"]]}},Df={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"},"\xE5","\xE0","\xE1","\xE2","\xE4","\xE6"],A:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"},"\xC5","\xC0","\xC1","\xC2","\xC4","\xC6"],b:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"},"\xE7"],d:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn\u2019t"},"\xE8","\xE9","\xEA","\xEB"],E:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn\u2019t"},"\xC8","\xC9","\xCA","\xCB"],g:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"},"\xEC","\xED","\xEE","\xEF"],I:[{latex:"\\imaginaryI",aside:"imaginary i"},"\xCC","\xCD","\xCE","\xCF"],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\mathbb{N}",aside:"set of natural numbers"},"\xF1"],o:["\xF8","\u0153","\xF2","\xF3","\xF4","\xF6"],O:["\xF8","\u0152","\xD2","\xD3","\xD4","\xD6"],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:["\xF9","\xFA","\xFB","\xFC"],U:["\xD9","\xDA","\xDB","\xDC"],z:[{latex:"\\mathbb{Z}",aside:"set of integers"}],y:["\xFD","\xFF"],Y:["\u0178"],space:[{latex:"\\char\"203A\\!\\char\"2039",insert:"\\!",aside:"negative thin space<br>\u207B\xB3\u29F8\u2081\u2088 em"},{latex:"\\char\"203A\\,\\char\"2039",insert:"\\,",aside:"thin space<br>\xB3\u29F8\u2081\u2088 em"},{latex:"\\char\"203A\\:\\char\"2039",insert:"\\:",aside:"medium space<br>\u2074\u29F8\u2081\u2088 em"},{latex:"\\char\"203A\\;\\char\"2039",insert:"\\;",aside:"thick space<br>\u2075\u29F8\u2081\u2088 em"},{latex:"\\char\"203A\\ \\char\"2039",insert:"\\ ",aside:"\u2153 em"},{latex:"\\char\"203A\\enspace\\char\"2039",insert:"\\enspace",aside:"\xBD em"},{latex:"\\char\"203A\\quad\\char\"2039",insert:"\\quad",aside:"1 em"},{latex:"\\char\"203A\\qquad\\char\"2039",insert:"\\qquad",aside:"2 em"}]},Of;function kf(e,t){var n,r,i,a,o;var s=dp.singleton;if(!s)return;var c=lp(e),l="";if(window.mathVirtualKeyboard.isShifted){var _e382=(n=s.getKeycap(c==null?void 0:c.id))==null?void 0:n.shift;_typeof(_e382)=="object"&&"variants"in _e382&&(l=(r=_e382.variants)==null?"":r);}else l=(a=(i=s.getKeycap(c==null?void 0:c.id))==null?void 0:i.variants)==null?"":a;if(_typeof(l)=="string"&&!Mf(l)||Array.isArray(l)&&l.length===0){t==null||t();return;}var u={},d="";var _iterator104=_createForOfIteratorHelper(Nf(l)),_step104;try{for(_iterator104.s();!(_step104=_iterator104.n()).done;){var _e384=_step104.value;var _t136=rp(_e384),_n87=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);u[_n87]=_t136;var _tp=tp(_t136),_tp2=_slicedToArray(_tp,2),_r36=_tp2[0],_i51=_tp2[1];d+="<div id=".concat(_n87," class=\"item ").concat(_i51,"\">").concat(_r36,"</div>");}}catch(err){_iterator104.e(err);}finally{_iterator104.f();}var f=document.createElement("div");f.setAttribute("aria-hidden","true"),f.className="MLK__variant-panel",f.style.height="auto";var p=Object.keys(u).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),f.style.width="calc(var(--variant-keycap-length) * ".concat(m," + 12px)"),f.innerHTML=K_.createHTML(d),dd.open({root:(o=s==null?void 0:s.container)==null?void 0:o.querySelector(".ML__keyboard"),child:f}),Of=new AbortController();var _Of=Of,h=_Of.signal,g=e==null?void 0:e.getBoundingClientRect();if(g){g.top-f.clientHeight<0&&(f.style.width="auto",p<=6?f.style.height="56px":p<=12?f.style.height="108px":p<=18?f.style.height="205px":f.classList.add("compact"));var _e383=Math.max(0,Math.min(window.innerWidth-f.offsetWidth,(g.left+g.right-f.offsetWidth)/2)),_n86=g.top-f.clientHeight+5;f.style.left="".concat(_e383,"px"),f.style.top="".concat(_n86,"px"),f.classList.add("is-visible"),requestAnimationFrame(function(){var e;f.addEventListener("pointerup",function(e){var n=lp(e.target);!(n!=null&&n.id)||!u[n.id]||(sp(u[n.id]),Af(),t==null||t(),e.preventDefault());},{capture:!0,passive:!1,signal:h}),f.addEventListener("pointerenter",function(e){var t=lp(e.target);!(t!=null&&t.id)||!u[t.id]||t.classList.add("is-active");},{capture:!0,signal:h}),f.addEventListener("pointerleave",function(e){var t=lp(e.target);e.target&&"tagName"in e.target&&_typeof(e.target.tagName)=="string"&&e.target.tagName.toUpperCase()==="ASIDE"||!(t!=null&&t.id)||!u[t.id]||t.classList.remove("is-active");},{capture:!0,signal:h}),(e=s.getKeycap(c==null?void 0:c.id))!=null&&e.stickyVariantPanel?window.addEventListener("pointerdown",function(e){if(!(e.target instanceof Node))return;var n=f.contains(e.target);e.target===f||n||(Af(),t==null||t());},{signal:h}):(window.addEventListener("pointercancel",function(){Af(),t==null||t();},{signal:h}),window.addEventListener("pointerup",function(){Af(),t==null||t();},{signal:h}));});}}function Af(){Of==null||Of.abort(),Of=null,dd.state==="open"&&dd.close();}function jf(e){if(e==="foreground-color"){var _e385=[];for(var _i52=0,_Object$keys8=Object.keys(Te);_i52<_Object$keys8.length;_i52++){var _t137=_Object$keys8[_i52];_e385.push({class:"swatch-button",label:"<span style=\"border: 3px solid "+Te[_t137]+"\"></span>",command:["applyStyle",{color:_t137}]});}return _e385;}if(e==="background-color"){var _e386=[];for(var _i53=0,_Object$keys9=Object.keys(we);_i53<_Object$keys9.length;_i53++){var _t138=_Object$keys9[_i53];_e386.push({class:"swatch-button",label:"<span style=\"background:"+we[_t138]+"\"></span>",command:["applyStyle",{backgroundColor:_t138}]});}return _e386;}}function Mf(e){return Df[e]!==void 0;}function Nf(e){var t;return _typeof(e)=="string"?(Df[e]||(Df[e]=(t=jf(e))==null?[]:t),Df[e]):e;}function Pf(e){return _typeof(e)=="string"?e:Object.entries(e).map(function(_ref6){var _ref7=_slicedToArray(_ref6,2),e=_ref7[0],t=_ref7[1];return"".concat(e,":").concat(t," !important");}).join(";");}function Ff(e){return Object.keys(e).map(function(t){return"".concat(t," {").concat(Pf(e[t]),"}");}).join("");}function If(e){if(!e)return"";var t=new I();return Cs(Ss(Ou(new F(new L({mode:"math",type:"root",body:eu(e,{context:t,args:function args(e){return e==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}";}})}).render(t),{classes:"ML__base"}),t)),{classes:"ML__latex"}).toMarkup();}function Lf(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">");}function Rf(e){return e.replace(/<\/?[^>]+(>|$)/g," ");}function zf(e){var t,n,r,i;var a=(i=(r=(n=(t=e.tooltip)==null?_typeof(e.label)=="string"?Rf(e.label):void 0:t)==null?e.insert:n)==null?e.latex:r)==null?e.key:i;return a&&a.replace(/\s+/g," ").trim()||null;}function Bf(e){if(e==null)return null;try{return JSON.stringify(e);}catch(e){return null;}}function Vf(e){var t,n;var r=(n=(t=e.insert)==null?e.latex:t)==null?e.key:n;return r==null?null:r;}function Hf(e){if(Array.isArray(e))return e.map(function(e){return Hf(e);}).flat();var t=_typeof(e)=="string"?{markup:e}:e;return"rows"in t&&Array.isArray(t.rows)&&(t.rows=t.rows.map(function(e){return e.map(function(e){return rp(e);});})),t.id!=null||(t.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[t];}function Uf(){var e,t;var n=window.mathVirtualKeyboard.alphabeticLayout;if(n==="auto"){var _t139=_e();_t139&&(n=_t139.virtualLayout),(!n||n==="auto")&&(n=(e={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[D.locale.slice(0,2)])==null?"qwerty":e);}var r={qwerty:["qwertyuiop"," asdfghjkl ","^zxcvbnm~"],azerty:["azertyuiop","qsdfghjklm","^ wxcvbn ~"],qwertz:["qwertzuiop"," asdfghjkl ","^yxcvbnm~"],dvorak:["^ pyfgcrl ","aoeuidhtns","qjkxbmwvz~"],colemak:[" qwfpgjluy ","arstdhneio","^zxcvbkm~"]},i=(t=r[n])==null?r.qwerty:t,a=n==="azerty"?[[{label:"1",variants:"1"},{label:"2",shift:{latex:"\xE9"},variants:"2"},{label:"3",shift:{latex:"\xF9"},variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{label:"(",latex:"("},variants:"5"},{label:"6",shift:{label:")",latex:")"},variants:"6"},{label:"7",shift:{latex:"\xE8"},variants:"7"},{label:"8",shift:{latex:"\xEA"},variants:"8"},{label:"9",shift:{latex:"\xE7"},variants:"9"},{label:"0",shift:{latex:"\xE0"},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"}]];var _iterator105=_createForOfIteratorHelper(i),_step105;try{for(_iterator105.s();!(_step105=_iterator105.n()).done;){var _e387=_step105.value;var _t140=[];var _iterator106=_createForOfIteratorHelper(_e387),_step106;try{for(_iterator106.s();!(_step106=_iterator106.n()).done;){var _r37=_step106.value;/[a-z]/.test(_r37)?_t140.push({label:_r37,class:"hide-shift",shift:{label:_r37.toUpperCase(),variants:Mf(_r37.toUpperCase())?_r37.toUpperCase():void 0},variants:Mf(_r37)?_r37:void 0}):_r37==="~"?n==="dvorak"?_t140.push({label:"[backspace]",width:1}):_t140.push("[backspace]"):_r37==="^"?_t140.push("[shift]"):_r37===" "&&_t140.push("[separator-5]");}}catch(err){_iterator106.e(err);}finally{_iterator106.f();}a.push(_t140);}}catch(err){_iterator105.e(err);}finally{_iterator105.f();}return a.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:Hf({rows:a})};}function Wf(e){if(e==="alphabetic")return Uf();if(_typeof(e)=="string")return Ef[e],"".concat(e),Wf(Ef[e]);var t;if("rows"in e&&Array.isArray(e.rows)){"layers"in e||"markup"in e;var _n88=e,_r38=_n88.rows;t=l(c({},d(_n88,["rows"])),{layers:Hf({rows:e.rows})});}else if("markup"in e&&_typeof(e.markup)=="string"){var _n89=e,_r39=_n89.markup;t=l(c({},d(_n89,["markup"])),{layers:Hf(e.markup)});}else t=c({},e),"layers"in e?t.layers=Hf(e.layers):console.error("MathLive 0.110.0: provide either a \"rows\", \"markup\" or \"layers\" property");var n=!1,r=!1;var _iterator107=_createForOfIteratorHelper(t.layers),_step107;try{for(_iterator107.s();!(_step107=_iterator107.n()).done;){var _e388=_step107.value;if(_e388.rows){var _iterator108=_createForOfIteratorHelper(_e388.rows.flat()),_step108;try{for(_iterator108.s();!(_step108=_iterator108.n()).done;){var _t141=_step108.value;up(_t141)&&(n=!0);var _e389=_t141.command;_typeof(_e389)=="string"&&["undo","redo","cut","copy","paste"].includes(_e389)&&(r=!0);}}catch(err){_iterator108.e(err);}finally{_iterator108.f();}}}}catch(err){_iterator107.e(err);}finally{_iterator107.f();}return(!("displayShiftedKeycaps"in e)||e.displayShiftedKeycaps===void 0)&&(t.displayShiftedKeycaps=n),(!("displayEditToolbar"in e)||e.displayEditToolbar===void 0)&&(t.displayEditToolbar=!r),t;}function Gf(e,t){var n,r;var i="<div class=\"left\">";if(e.normalizedLayouts.length>1){var _iterator109=_createForOfIteratorHelper(e.normalizedLayouts.entries()),_step109;try{for(_iterator109.s();!(_step109=_iterator109.n()).done;){var _step109$value=_slicedToArray(_step109.value,2),_a22=_step109$value[0],_o18=_step109$value[1];var _e390=_o18,_s9=[_a22===t?"selected":"layer-switch"];_e390.tooltip&&_s9.push("MLK__tooltip"),_e390.labelClass&&_s9.push.apply(_s9,_toConsumableArray(_e390.labelClass.split(" "))),i+="<div class=\"".concat(_s9.join(" "),"\""),_e390.tooltip&&(i+=" data-tooltip='"+((n=O(_e390.tooltip))==null?_e390.tooltip:n)+"' "),_a22!==t&&(i+="data-layer=\"".concat(_e390.layers[0].id,"\"")),i+=">".concat((r=_e390.label)==null?"untitled":r,"</div>");}}catch(err){_iterator109.e(err);}finally{_iterator109.f();}}return i+="</div>",i;}function Kf(e,t){var n="";if(e.editToolbar==="none")return"";var r=[];t.selectionIsCollapsed?r.push("undo","redo","pasteFromClipboard"):r.push("cutToClipboard","copyToClipboard","pasteFromClipboard");var i={undo:"<div class='action ".concat(t.canUndo===!1?"disabled":"","'\n data-command='\"undo\"'\n data-tooltip='").concat(O("tooltip.undo"),"'>\n <svg><use xlink:href='#svg-undo' /></svg>\n </div>"),redo:"<div class='action ".concat(t.canRedo===!1?"disabled":"","'\n data-command='\"redo\"'\n data-tooltip='").concat(O("tooltip.redo"),"'>\n <svg><use xlink:href='#svg-redo' /></svg>\n </div>"),cutToClipboard:"\n <div class='action'\n data-command='\"cutToClipboard\"'\n data-tooltip='".concat(O("tooltip.cut to clipboard"),"'>\n <svg><use xlink:href='#svg-cut' /></svg>\n </div>\n "),copyToClipboard:"\n <div class='action'\n data-command='\"copyToClipboard\"'\n data-tooltip='".concat(O("tooltip.copy to clipboard"),"'>\n <svg><use xlink:href='#svg-copy' /></svg>\n </div>\n "),pasteFromClipboard:"\n <div class='action'\n data-command='\"pasteFromClipboard\"'\n data-tooltip='".concat(O("tooltip.paste from clipboard"),"'>\n <svg><use xlink:href='#svg-paste' /></svg>\n </div>\n ")};return n+=r.map(function(e){return i[e];}).join(""),n;}function qf(e){var _iterator110=_createForOfIteratorHelper(e),_step110;try{for(_iterator110.s();!(_step110=_iterator110.n()).done;){var _t142=_step110.value;Jf(_t142);}}catch(err){_iterator110.e(err);}finally{_iterator110.f();}}function Jf(e){var t=dp.singleton;if(!t)return;var n={};if(!e.id){if(e.hasAttribute("data-label")&&(n.label=e.dataset.label),e.hasAttribute("data-latex")&&(n.latex=e.dataset.latex),e.hasAttribute("data-key")&&(n.key=e.dataset.key),e.hasAttribute("data-insert")&&(n.insert=e.dataset.insert),e.hasAttribute("data-variants")&&(n.variants=e.dataset.variants),e.hasAttribute("data-aside")&&(n.aside=e.dataset.aside),e.className&&(n.class=e.className),!n.label&&!n.latex&&!n.key&&!n.insert&&(n.latex=e.innerText,n.label=e.innerHTML),e.hasAttribute("data-command"))try{n.command=JSON.parse(e.dataset.command);}catch(e){console.warn("Invalid JSON in data-command attribute",e);}e.id=t.registerKeycap(n);}if(!e.innerHTML){var _tp3=tp(n),_tp4=_slicedToArray(_tp3,2),_t143=_tp4[0],_r40=_tp4[1];e.innerHTML=globalThis.MathfieldElement.createHTML(_t143);}}function Yf(){rl("virtual-keyboard"),rl("core"),nf();}function Xf(){il("core"),il("virtual-keyboard");}var Zf="<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"display: none;\">\n\n<symbol id=\"svg-delete-backward\" viewBox=\"0 0 576 512\">\n <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\"/>\n</symbol>\n\n<symbol id=\"svg-shift\" viewBox=\"0 0 384 512\">\n <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\"/>\n</symbol>\n\n<symbol id=\"svg-commit\" viewBox=\"0 0 512 512\">\n <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\"/>\n</symbol>\n\n\n<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>\n\n<symbol id=\"svg-command\" viewBox=\"0 0 640 512\">\n <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\"/>\n</symbol>\n\n<symbol id=\"svg-undo\" viewBox=\"0 0 512 512\">\n <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\"/>\n</symbol>\n<symbol id=\"svg-redo\" viewBox=\"0 0 512 512\">\n <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\"/>\n</symbol>\n<symbol id=\"svg-arrow-left\" viewBox=\"0 0 320 512\">\n <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\"/>\n</symbol>\n<symbol id=\"svg-arrow-right\" viewBox=\"0 0 320 512\">\n <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\"/>\n</symbol>\n<symbol id=\"svg-tab\" viewBox=\"0 0 448 512\">\n <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\"/>\n</symbol>\n<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>\n<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>\n<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\"/>\n</symbol>\n<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\"/>\n</symbol>\n<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\"/>\n</symbol>\n<symbol id=\"svg-trash\" viewBox=\"0 0 448 512\">\n <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\"/>\n</symbol>\n<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>\n</svg>";function Qf(e){e.resetKeycapRegistry(),Yf();var t=document.createElement("div");t.className="ML__keyboard";var n=document.createElement("div");n.className="MLK__plate",n.innerHTML=globalThis.MathfieldElement.createHTML(Zf+e.normalizedLayouts.map(function(t,n){return $f(e,t,n);}).join(""));var r=document.createElement("div");r.className="MLK__backdrop",r.appendChild(n),t.appendChild(r),t.addEventListener("pointerdown",ap,{passive:!1});var i=t.querySelectorAll(".ML__edit-toolbar");if(i){var _iterator111=_createForOfIteratorHelper(i),_step111;try{for(_iterator111.s();!(_step111=_iterator111.n()).done;){var _t144=_step111.value;_t144.addEventListener("click",function(t){var n,r;var i=t.target,a="";for(;i&&!a;)a=(n=i==null?void 0:i.getAttribute("data-command"))==null?"":n,i=(r=i==null?void 0:i.parentElement)==null?null:r;a&&e.executeCommand(JSON.parse(a));});}}catch(err){_iterator111.e(err);}finally{_iterator111.f();}}qf(t.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));var a=t.querySelectorAll(".MLK__layer");a.length;var _iterator112=_createForOfIteratorHelper(a),_step112;try{for(_iterator112.s();!(_step112=_iterator112.n()).done;){var _e391=_step112.value;_e391.addEventListener("pointerdown",function(e){return e.preventDefault();});}}catch(err){_iterator112.e(err);}finally{_iterator112.f();}return e.currentLayer=e.latentLayer,t;}function $f(e,t,n){var r;var i=[];if(!("layers"in t))return"";var _iterator113=_createForOfIteratorHelper(t.layers),_step113;try{for(_iterator113.s();!(_step113=_iterator113.n()).done;){var _a23=_step113.value;i.push("<div tabindex=\"-1\" class=\"MLK__layer\" id=\"".concat(_a23.id,"\">")),(e.normalizedLayouts.length>1||t.displayEditToolbar)&&(i.push("<div class='MLK__toolbar' role='toolbar'>"),i.push(Gf(e,n)),((r=t.displayEditToolbar)==null||r)&&i.push("<div class=\"ML__edit-toolbar right\"></div>"),i.push("</div>")),i.push(ep(e,_a23)),i.push("</div>");}}catch(err){_iterator113.e(err);}finally{_iterator113.f();}return i.join("");}function ep(e,t){if(_typeof(t)=="string")return t;var n="";if(_typeof(t.style)=="string"?n+="<style>".concat(t.style,"</style>"):_typeof(t.style)=="object"&&(n+="<style>".concat(Ff(t.style),"</style>")),t.backdrop&&(n+="<div class='".concat(t.backdrop,"'>")),t.container&&(n+="<div class='".concat(t.container,"'>")),t.rows){n+="<div class=MLK__rows>";var _iterator114=_createForOfIteratorHelper(t.rows),_step114;try{for(_iterator114.s();!(_step114=_iterator114.n()).done;){var _r41=_step114.value;n+="<div dir=\"ltr\" class=MLK__row>";var _iterator115=_createForOfIteratorHelper(_r41),_step115;try{for(_iterator115.s();!(_step115=_iterator115.n()).done;){var _t145=_step115.value;if(_t145){var _r42=e.registerKeycap(_t145),_tp5=tp(_t145),_tp6=_slicedToArray(_tp5,2),_i54=_tp6[0],_a24=_tp6[1];/(^|\s)separator/.test(_a24)?n+="<div class=\"".concat(_a24,"\""):n+="<div tabindex=\"-1\" id=\"".concat(_r42,"\" class=\"").concat(_a24,"\""),_t145.tooltip&&(n+=" data-tooltip=\"".concat(Lf(_t145.tooltip),"\""));var _o19=zf(_t145);_o19&&(n+=" aria-label=\"".concat(Lf(_o19),"\""));var _s0=Bf(_t145.command);_s0&&(n+=" data-command=\"".concat(Lf(_s0),"\""));var _c6=Vf(_t145);_c6&&(n+=" data-keycap-value=\"".concat(Lf(_c6),"\"")),n+=">".concat(_i54,"</div>");}}}catch(err){_iterator115.e(err);}finally{_iterator115.f();}n+="</div>";}}catch(err){_iterator114.e(err);}finally{_iterator114.f();}n+="</div>";}else t.markup&&(n+=t.markup);return t.container&&(n+="</div>"),t.backdrop&&(n+="</div>"),n;}function tp(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{shifted:!1};var n,r,i,a,o,s,c;var l="",u=(n=e.class)==null?"":n;if(t.shifted&&up(e)&&(u+=" is-active"),t.shifted&&"shift"in e)_typeof(e.shift)=="string"?l=If(e.shift):_typeof(e.shift)=="object"&&(l=e.shift.label?e.shift.label:(r=If(e.shift.latex||e.shift.insert||"")||e.shift.key)==null?"":r),_typeof(e.shift)=="object"&&(u=(a=(i=e.shift.class)==null?e.class:i)==null?"":a);else{if(l=e.label?e.label:(o=If(e.latex||e.insert||"")||e.key)==null?"":o,e.shift){var _t146;_t146=_typeof(e.shift)=="string"?If(e.shift):e.shift.label?e.shift.label:(s=If(e.shift.latex||e.shift.insert||"")||e.shift.key)==null?"":s,l+="<span class=\"MLK__shift\">".concat(_t146,"</span>");}e.aside&&(l+="<aside>".concat(e.aside,"</aside>"));}return e.layer&&!/layer-switch/.test(u)&&(u+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test(u)||(u+=" MLK__keycap"),!/\bw[0-9]+\b/.test(u)&&e.width&&(u+=(c={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[e.width])==null?"":c),[l,u||"MLK__keycap"];}var np={"[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>",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:"\u2191",command:"performWithFeedback(moveUp)",shift:{label:"\u219F",command:"performWithFeedback(extendSelectionUpward)"}},"[down]":{class:"action hide-shift",label:"\u2193",command:"performWithFeedback(moveDown)",shift:{label:"\u21A1",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:"−",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"÷"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes","\\cdot"],latex:"\\cdot",label:"×",shift:{latex:"\\times"},class:"big-op hide-shift"},"[=]":{variants:["\\neq","\\equiv","\\varpropto","\\thickapprox","\\lt","\\gt","\\le","\\ge"],latex:"=",label:"=",shift:{label:"\u2260",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"}},"[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 rp(e){var t;if(_typeof(e)=="string"){if(e==="[.]"&&globalThis.MathfieldElement.decimalSeparator===","&&(e="[,]"),!np[e])return{latex:e};e={label:e};}var n;return"label"in e&&e.label&&np[e.label]&&(n=l(c(c({},np[e.label]),e),{label:np[e.label].label})),"key"in e&&e.key&&np[e.key]&&(n=l(c(c({},np[e.key]),e),{key:np[e.key].key})),n?(n.command==="insertDecimalSeparator"&&(n.label=(t=globalThis.MathfieldElement.decimalSeparator)==null?".":t),(n.tooltip===void 0||n.tooltip===null||n.tooltip===!1)&&delete n.tooltip,(n.tooltip===void 0||n.tooltip===null||n.tooltip===!1)&&delete n.tooltip,(n.aside===void 0||n.aside===null||n.aside===!1)&&delete n.aside,(n.variants===void 0||n.variants===null||n.variants===!1)&&delete n.variants,(n.shift===void 0||n.shift===null||n.shift===!1)&&delete n.shift,n):e;}var ip;function ap(e){var t,n,r,i;if(e.button!==0)return;var a=dp.singleton;if(!a)return;var o=e.target;for(;o&&!o.getAttribute("data-layer");)o=o.parentElement;if(o){a.currentLayer=(t=o.getAttribute("data-layer"))==null?"":t,e.preventDefault();return;}var s=lp(e.target);if(!(s!=null&&s.id))return;var c=a.getKeycap(s.id);if(!c)return;e.type;var l=a;if(!l.connectedMathfieldWindow){var _e392=(n=window.focusedMathfield)==null?void 0:n.call(window);if(_e392){var _t147=(i=(r=_e392.element)==null?void 0:r.ownerDocument)==null?void 0:i.defaultView;_t147&&_t147!==window&&(l.connectedMathfieldWindow=_t147);}}var u=new AbortController(),d=u.signal;s.classList.add("is-pressed"),s.addEventListener("pointerenter",op(u),{capture:!0,signal:d}),s.addEventListener("pointerleave",op(u),{capture:!0,signal:d}),s.addEventListener("pointercancel",op(u),{signal:d}),s.addEventListener("pointerup",op(u),{signal:d}),up(c)&&(s.classList.add("is-active"),a.shiftPressCount++),c.variants&&(ip&&clearTimeout(ip),ip=setTimeout(function(){s.classList.contains("is-pressed")&&(s.classList.remove("is-pressed"),s.classList.add("is-active"),e.target&&"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId),kf(s,function(){u.abort(),s==null||s.classList.remove("is-active");}));},c.stickyVariantPanel?0:300)),e.preventDefault();}function op(e){return function(t){var n=lp(t.target);if(!(n!=null&&n.id))return;var r=dp.singleton;if(!r)return;var i=r.getKeycap(n.id);if(i){if(t.type==="pointerenter"&&t.target===n&&t.isPrimary&&n.classList.add("is-pressed"),t.type==="pointercancel"){n.classList.remove("is-pressed"),up(i)&&(r.shiftPressCount--,n.classList.toggle("is-active",r.isShifted)),e.abort();return;}if(t.type==="pointerleave"&&t.target===n){n.classList.remove("is-pressed"),up(i)&&(r.shiftPressCount--,n.classList.toggle("is-active",r.isShifted));return;}if(t.type==="pointerup"){ip&&clearTimeout(ip),up(i)?n.classList.toggle("is-active",r.isShifted):n.classList.contains("is-pressed")&&(n.classList.remove("is-pressed"),r.isShifted&&i.shift?_typeof(i.shift)=="string"?r.executeCommand(["insert",i.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):sp(i.shift):sp(i),r.shiftPressCount===1&&!t.shiftKey&&(r.shiftPressCount=0)),e.abort(),t.preventDefault();return;}}};}function sp(e){var 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}]),dp.singleton&&dp.singleton.executeCommand(t);}function cp(e){if(e.nodeType!==1)return!1;var t=e.classList;return t.contains("MLK__keycap")||t.contains("shift")||t.contains("action")||t.contains("fnbutton")||t.contains("bigfnbutton");}function lp(e){if(!e)return;var t=e;for(;t&&!cp(t);)t=t.parentElement;return t==null?void 0:t;}function up(e){return!!e.class&&/(^|\s)shift($|\s)/.test(e.class);}var dp=function(){function e(){var _this32=this;_classCallCheck(this,e);this.originalContainerBottomPadding=null,this.keycapRegistry={},this._shiftPressCount=0,this.isSandbox=!1;var _e393;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(function(_e394){_this32.adjustBoundingRect(),_this32.dispatchEvent(new Event("geometrychange")),_this32.sendMessage("geometry-changed",{boundingRect:_this32.boundingRect});}),this.listeners={};try{(_e393=window.top)==null||_e393.addEventListener("message",this);}catch(_e395){window.addEventListener("message",this);}p()&&document.addEventListener("focusin",function(_e396){var t=_e396.target;t!=null&&t.isConnected&&setTimeout(function(){var _e397=fp();_e397&&_e397.mathVirtualKeyboardPolicy==="auto"&&_e397.hasEditableContent&&_this32.show({animate:!0});},300);}),document.addEventListener("focusout",function(_e398){_e398.target instanceof H_&&_e398.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(function(){fp()||_this32.hide();},300);});}return _createClass(e,[{key:"currentLayer",get:function get(){var _e399,t,n;return(n=(t=(_e399=this._element)==null?void 0:_e399.querySelector(".MLK__layer.is-visible"))==null?void 0:t.id)==null?"":n;},set:function set(_e400){var t;if(!this._element){this.latentLayer=_e400;return;}var n=_e400?this._element.querySelector("#".concat(_e400,".MLK__layer")):null;n||(n=this._element.querySelector(".MLK__layer")),n&&((t=this._element.querySelector(".MLK__layer.is-visible"))==null||t.classList.remove("is-visible"),n.classList.add("is-visible")),this.render();}},{key:"shiftPressCount",get:function get(){return this._shiftPressCount;},set:function set(_e401){var t;this._shiftPressCount=_e401>2||_e401<0?0:_e401,(t=this._element)==null||t.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render();}},{key:"isShifted",get:function get(){return this._shiftPressCount>0;}},{key:"resetKeycapRegistry",value:function resetKeycapRegistry(){this.keycapRegistry={};}},{key:"registerKeycap",value:function registerKeycap(_e402){var t="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[t]=_e402,t;}},{key:"setKeycap",value:function setKeycap(_e403,t){np[_e403]=rp(t),this.rebuild();}},{key:"getKeycap",value:function getKeycap(_e404){var t;return _e404?(t=np[_e404])==null?this.keycapRegistry[_e404]:t:void 0;}},{key:"getLayer",value:function getLayer(_e405){var t=this.normalizedLayouts;var _iterator116=_createForOfIteratorHelper(t),_step116;try{for(_iterator116.s();!(_step116=_iterator116.n()).done;){var _n90=_step116.value;var _iterator117=_createForOfIteratorHelper(_n90.layers),_step117;try{for(_iterator117.s();!(_step117=_iterator117.n()).done;){var _t148=_step117.value;if(_t148.id===_e405)return _t148;}}catch(err){_iterator117.e(err);}finally{_iterator117.f();}}}catch(err){_iterator116.e(err);}finally{_iterator116.f();}}},{key:"alphabeticLayout",get:function get(){return this._alphabeticLayout;},set:function set(_e406){this._alphabeticLayout=_e406,this._normalizedLayouts=void 0,this.rebuild();}},{key:"layouts",get:function get(){return this._layouts;},set:function set(_e407){this.updateNormalizedLayouts(_e407),this.rebuild();}},{key:"updateNormalizedLayouts",value:function updateNormalizedLayouts(_e408){var t=Array.isArray(_e408)?_toConsumableArray(_e408):[_e408],n=t.findIndex(function(_e409){return _e409==="default";});n>=0&&t.splice(n,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(t),this._normalizedLayouts=t.map(function(_e410){return Wf(_e410);});}},{key:"normalizedLayouts",get:function get(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts;}},{key:"editToolbar",get:function get(){return this._editToolbar;},set:function set(_e411){this._editToolbar=_e411,this.rebuild();}},{key:"container",get:function get(){return this._container===void 0?window.document.body:this._container;},set:function set(_e412){this._container=_e412,this.rebuild();}},{key:"style",get:function get(){return this._style;}},{key:"addEventListener",value:function addEventListener(_e414,t,n){this.listeners[_e414]||(this.listeners[_e414]=new Set()),this.listeners[_e414].has(t)||this.listeners[_e414].add(t);}},{key:"dispatchEvent",value:function dispatchEvent(_e415){return!this.listeners[_e415.type]||this.listeners[_e415.type].size===0?!0:(this.listeners[_e415.type].forEach(function(t){_typeof(t)=="function"?t(_e415):t==null||t.handleEvent(_e415);}),!_e415.defaultPrevented);}},{key:"removeEventListener",value:function removeEventListener(_e416,t,n){this.listeners[_e416]&&this.listeners[_e416].delete(t);}},{key:"element",get:function get(){return this._element;},set:function set(_e417){var t;this._element!==_e417&&((t=this._element)==null||t.remove(),this._element=_e417);}},{key:"visible",get:function get(){return this._visible;},set:function set(_e418){_e418?this.show():this.hide();}},{key:"boundingRect",get:function get(){var _e419;if(!this._visible)return new DOMRect();var t=(_e419=this._element)==null?void 0:_e419.getElementsByClassName("MLK__plate")[0];return t?t.getBoundingClientRect():new DOMRect();}},{key:"adjustBoundingRect",value:function adjustBoundingRect(){if(!this._element)return;var _e420=this.boundingRect.height;if(this.container===document.body){this._element.style.setProperty("--_keyboard-height","calc(".concat(_e420,"px + var(--_padding-top) + var(--_padding-bottom))"));var _t149=_e420-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?"calc(".concat(this.originalContainerBottomPadding," + ").concat(_t149,"px)"):"".concat(_t149,"px");}else this._element.style.setProperty("--_keyboard-height","".concat(_e420,"px"));}},{key:"rebuild",value:function rebuild(){var _this33=this;if(this._rebuilding||!this._element)return;this._rebuilding=!0;var _e421=this.currentLayer;requestAnimationFrame(function(){_this33._rebuilding=!1,_this33._element&&(_this33._element.remove(),_this33._element=void 0),_this33.visible&&(_this33.buildAndAttachElement(),_this33.currentLayer=_e421,_this33.render(),_this33.adjustBoundingRect(),_this33._element.classList.add("is-visible"));});}},{key:"render",value:function render(){var _e422;if(!this._element)return;var t=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(t&&(t.backdrop||t.container)));var n=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(!n)return;var r=this.isShifted;var _iterator118=_createForOfIteratorHelper(n),_step118;try{for(_iterator118.s();!(_step118=_iterator118.n()).done;){var _t150=_step118.value;var _n91=this.getKeycap(_t150.id);if(_n91){var _tp7=tp(_n91,{shifted:r}),_tp8=_slicedToArray(_tp7,2),_i55=_tp8[0],_a25=_tp8[1];_t150.innerHTML=globalThis.MathfieldElement.createHTML(_i55),_t150.className=_a25,r&&_typeof(_n91.shift)=="object"&&(_e422=_n91.shift)!=null&&_e422.tooltip?_t150.dataset.tooltip=_n91.shift.tooltip:!r&&_n91.tooltip&&(_t150.dataset.tooltip=_n91.tooltip);}}}catch(err){_iterator118.e(err);}finally{_iterator118.f();}}},{key:"show",value:function show(_e423){var _this34=this;var t;if(this._visible)return;var n=this.container;if(n&&window.mathVirtualKeyboard&&this.stateWillChange(!0)){if(this._element||(this.buildAndAttachElement(),this.adjustBoundingRect()),!this._visible){var _e424=this._element.getElementsByClassName("MLK__plate")[0];if(_e424&&this.observer.observe(_e424),n===window.document.body){var _t151=n.style.paddingBottom;this.originalContainerBottomPadding=_t151;var _r43=_e424.offsetHeight-1;n.style.paddingBottom=_t151?"calc(".concat(_t151," + ").concat(_r43,"px)"):"".concat(_r43,"px");}window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("keydown",this,{capture:!0}),window.addEventListener("keyup",this,{capture:!0}),(t=this._element)==null||t.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer;}this._visible=!0,_e423!=null&&_e423.animate?requestAnimationFrame(function(){_this34._element&&(_this34._element.classList.add("animate"),_this34._element.addEventListener("transitionend",function(){var _e425;return(_e425=_this34._element)==null?void 0:_e425.classList.remove("animate");},{once:!0}),_this34._element.classList.add("is-visible"),_this34.stateChanged());}):(this._element.classList.add("is-visible"),this.stateChanged());}}},{key:"hide",value:function hide(_e426){var t;var n=this.container;if(n&&this._visible&&this.stateWillChange(!1)){if(this._visible=!1,this._element){this.latentLayer=this.currentLayer;var _e427=this._element.getElementsByClassName("MLK__plate")[0];_e427&&this.observer.unobserve(_e427),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}),Af(),Xf(),(t=this._element)==null||t.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(n.style.paddingBottom=this.originalContainerBottomPadding);}this.stateChanged();}}},{key:"height",get:function get(){var _e428,t;return(t=(_e428=this.element)==null?void 0:_e428.offsetHeight)==null?0:t;}},{key:"buildAndAttachElement",value:function buildAndAttachElement(){var _e429;this.element,this.element=Qf(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",function(_e430){_e430.shiftKey||((_e430.ctrlKey||_e430.button===2)&&kf(_e430.target),_e430.preventDefault(),_e430.stopPropagation());},{capture:!0}),(_e429=this.container)==null||_e429.appendChild(this.element);}},{key:"handleEvent",value:function handleEvent(_e431){if(wf(_e431)){if(!Vc(_e431.origin,this.originValidator))throw new DOMException("Message from unknown origin (".concat(_e431.origin,") cannot be handled"),"SecurityError");if(_e431.data.action==="disconnect"){if(this._visible)return;this.connectedMathfieldWindow=void 0;}else _e431.data.action!=="update-setting"&&_e431.data.action!=="proxy-created"&&_e431.data.action!=="execute-command"&&(_e431.source,this.connectedMathfieldWindow=_e431.source);this.handleMessage(_e431.data,_e431.source);}if(this._element)switch(_e431.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":_e431.button!==2&&_e431.preventDefault();break;case"keydown":_e431.key==="Shift"&&!_e431.repeat&&(this.shiftPressCount=1);break;case"keyup":(_e431.key==="Shift"||!_e431.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break;}}},{key:"handleMessage",value:function handleMessage(_e432,t){var n=_e432.action;if(n==="execute-command"){var _n92=_e432.command,_r44=_f(_n92);if(window===window.top&&t!==window||t===window&&_r44!=="virtual-keyboard")return;this.executeCommand(_n92);return;}if((n==="connect"||n==="show")&&this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},t),n!=="disconnect"&&!this.isSandbox){if(n==="show"){_e432.animate===void 0?this.show():this.show({animate:_e432.animate});return;}if(n==="hide"){_e432.animate===void 0?this.hide():this.hide({animate:_e432.animate});return;}if(n==="update-setting"){if(_e432.alphabeticLayout&&(this.alphabeticLayout=_e432.alphabeticLayout),_e432.layouts&&(this.layouts=_e432.layouts),_e432.editToolbar&&(this.editToolbar=_e432.editToolbar),_e432.setKeycap){var _e432$setKeycap=_e432.setKeycap,_t152=_e432$setKeycap.keycap,_n93=_e432$setKeycap.value;this.setKeycap(_t152,_n93),this.render();}return;}if(n==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},t);return;}}}},{key:"sendMessage",value:function sendMessage(_e433,t,n){if(t.command&&this.dispatchEvent(new CustomEvent("math-virtual-keyboard-command",{detail:t.command})),n||(n=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||n===window){window.dispatchEvent(new MessageEvent("message",{source:window,origin:window.origin,data:c({type:Cf,action:_e433},t)}));return;}if(n)n.postMessage(c({type:Cf,action:_e433},t),{targetOrigin:this.targetOrigin});else if(_e433==="execute-command"&&Array.isArray(t.command)&&t.command[0]==="insert"){var _e434=t.command[1].split("");var _iterator119=_createForOfIteratorHelper(_e434),_step119;try{for(_iterator119.s();!(_step119=_iterator119.n()).done;){var _t153=_step119.value;this.dispatchEvent(new KeyboardEvent("keydown",{key:_t153,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:_t153,bubbles:!0}));}}catch(err){_iterator119.e(err);}finally{_iterator119.f();}}}},{key:"stateWillChange",value:function stateWillChange(_e435){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:_e435},bubbles:!0,cancelable:!0,composed:!0}));}},{key:"stateChanged",value:function stateChanged(){this.dispatchEvent(new Event("virtual-keyboard-toggle")),this._visible||(this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect}));}},{key:"focus",value:function focus(){this.sendMessage("focus",{});}},{key:"blur",value:function blur(){this.sendMessage("blur",{});}},{key:"updateToolbar",value:function updateToolbar(_e436){var t=this._element;if(!t)return;t.classList.toggle("is-math-mode",_e436.mode==="math"),t.classList.toggle("is-text-mode",_e436.mode==="text"),t.classList.toggle("can-undo",_e436.canUndo),t.classList.toggle("can-redo",_e436.canRedo),t.classList.toggle("can-copy",!_e436.selectionIsCollapsed),t.classList.toggle("can-cut",!_e436.selectionIsCollapsed),t.classList.toggle("can-paste",!0);var n=t.querySelectorAll(".ML__edit-toolbar");if(n){var _iterator120=_createForOfIteratorHelper(n),_step120;try{for(_iterator120.s();!(_step120=_iterator120.n()).done;){var _t154=_step120.value;_t154.innerHTML=Kf(this,_e436);}}catch(err){_iterator120.e(err);}finally{_iterator120.f();}}}},{key:"update",value:function update(_e437){this._style=_e437.style,this.updateToolbar(_e437);}},{key:"connect",value:function connect(){this.connectedMathfieldWindow=window;}},{key:"disconnect",value:function disconnect(){this._visible||(this.connectedMathfieldWindow=void 0);}},{key:"executeCommand",value:function executeCommand(_e438){var _mf$t;if(_e438=Sf(_e438),!_e438)return!1;var t,n=[],r=_f(_e438);return xe(_e438)?(t=_e438[0],t==="performWithFeedback"&&(r=_f(_e438.slice(1))),n=_e438.slice(1)):t=_e438,r==="virtual-keyboard"?(_mf$t=mf[t]).fn.apply(_mf$t,[void 0].concat(_toConsumableArray(n))):(this.sendMessage("execute-command",{command:_e438}),!1);}},{key:"dispose",value:function dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this);}}],[{key:"singleton",get:function get(){if(this._singleton===void 0)try{this._singleton=new e();}catch(_e413){this._singleton=null;}return this._singleton;}}]);}();function fp(){var e=ud(),t=null;for(;e;){if("host"in e&&e.host instanceof H_){t=e.host;break;}e=e.parentNode;}return t;}f()&&!("mathVirtualKeyboard"in window)&&(window===window.top?pp():Object.defineProperty(window,"mathVirtualKeyboard",{get:function get(){return Tf.singleton;},configurable:!0}));function pp(){var e=dp.singleton;return window.mathVirtualKeyboard!==e&&Object.defineProperty(window,"mathVirtualKeyboard",{get:function get(){return e;}}),e;}function mp(e){var t={};for(var _i56=0,_Object$keys0=Object.keys(e);_i56<_Object$keys0.length;_i56++){var _n94=_Object$keys0[_i56];switch(_n94){case"scriptDepth":var _r45=e.scriptDepth;if(xe(_r45))t.scriptDepth=[_r45[0],_r45[1]];else if(_typeof(_r45)=="number")t.scriptDepth=[_r45,_r45];else if(_typeof(_r45)=="string"){var _r45$split$map=_r45.split(",").map(function(e){return parseInt(e.trim());}),_r45$split$map2=_slicedToArray(_r45$split$map,2),_e439=_r45$split$map2[0],_n95=_r45$split$map2[1];t.scriptDepth=[_e439,_n95];}else throw TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":var _i57=e.mathVirtualKeyboardPolicy.toLowerCase();if(_i57==="sandboxed"){var _e440=pp();_e440&&(_e440.isSandbox=!0),_i57="manual";}t.mathVirtualKeyboardPolicy=_i57;break;case"letterShapeStyle":e.letterShapeStyle==="auto"?D.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.110.0: valid values for defaultMode are \"text\", \"math\" or \"inline-math\""),t.defaultMode="math");break;case"macros":t.macros=dt(e.macros);break;default:xe(e[_n94])?t[_n94]=_toConsumableArray(e[_n94]):_typeof(e[_n94])=="object"&&!(e[_n94]instanceof Element)&&_n94!=="computeEngine"?t[_n94]=c({},e[_n94]):t[_n94]=e[_n94];}}return t;}function hp(e,t){var n;n=_typeof(t)=="string"?[t]:t===void 0?Object.keys(e):t;var r={};var _iterator121=_createForOfIteratorHelper(n),_step121;try{for(_iterator121.s();!(_step121=_iterator121.n()).done;){var _t155=_step121.value;e[_t155]===null?r[_t155]=null:xe(e[_t155])?r[_t155]=_toConsumableArray(e[_t155]):_typeof(e[_t155])=="object"&&!(e[_t155]instanceof Element)&&_t155!=="computeEngine"?r[_t155]=c({},e[_t155]):r[_t155]=e[_t155];}}catch(err){_iterator121.e(err);}finally{_iterator121.f();}return _typeof(t)=="string"?r[t]:r;}function gp(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:Oe,backgroundColorMap:ke,letterShapeStyle:D.locale.startsWith("fr")?"french":"tex",minFontScale:0,maxMatrixCols:10,smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,isImplicitFunction:function isImplicitFunction(e){return"\\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".split(".").includes(e);},mathModeSpace:"",placeholderSymbol:"\u25A2",contentPlaceholder:"",popoverPolicy:"auto",environmentPopoverPolicy:"off",keybindings:kc,inlineShortcuts:gc,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",originValidator:"none",onInsertStyle:Od,onInlineShortcut:function onInlineShortcut(){return"";},onScrollIntoView:null,onExport:Dc,value:""};}function _p(e){return e.defaultMode==="inline-math"?"math":e.defaultMode;}function vp(e,t){var n=e.at(e.position);if(n.type==="composition")n.value=t;else{var _r46=n.caret;n.caret=void 0;var _i58=new Wl(t,{mode:n.mode});_i58.caret=_r46,n.parent.addChildAfter(_i58,n),e.position+=1;}}function yp(e){var t=e.at(e.position);t.type==="composition"&&(t.parent.removeChild(t),--e.position);}function bp(e){var t=e.at(e.position);for(;t&&!tc(t.parentBranch);)t=t.parent;return[t.firstSibling,t.lastSibling];}function xp(e,t){var n=e.at(e.position);for(;n&&!(n.parent instanceof z);)n=n.parent;if((n==null?void 0:n.type)==="array"&&n.environmentName,!n||!(n.parent instanceof z)){var _r47=e.at(e.position);if(n=_r47,!n.parent.parent){var _n96=e.extractAtoms([e.position,e.lastOffset]),_i59=e.extractAtoms([0,e.position]),_a26;return t.endsWith("column")?(_i59.length===0&&(_i59=Fp()),_n96.length===0&&(_n96=Fp()),_a26=zu("split",[[_i59,_n96]]),e.root=_a26,Sp(_a26,0,0)?wp(e,_a26,0,0):Sp(_a26,0,1)?wp(e,_a26,0,1):e.position=e.offsetOf(_r47)):(_a26=zu("lines",[[_i59],[_n96]]),e.root=_a26,wp(e,_a26,1,0)),[void 0,[0,0]];}if(n.parent instanceof B){var _r48=n.parent,_i60=e.extractAtoms([e.position,e.offsetOf(_r48.lastChild)]),_a27=e.extractAtoms([e.offsetOf(_r48.firstChild),e.position]);_a27.length===0&&(_a27=Fp()),_i60.length===0&&(_i60=Fp());var _o20="pmatrix",_s1=_r48.leftDelim,_c7=_r48.rightDelim;_s1==="("&&(_c7===")"||_c7==="?")?_o20="pmatrix":(_s1==="["||_s1==="\\lbrack")&&(_c7==="]"||_c7==="\\rbrack"||_c7==="?")?_o20="bmatrix":_s1==="\\vert"&&_c7==="\\vert"?_o20="vmatrix":_s1==="\\Vert"&&_c7==="\\Vert"?_o20="Vmatrix":(_s1==="{"||_s1==="\\lbrace")&&(_c7==="."||_c7==="?")&&(_o20="cases");var _l5=zu(_o20,t.endsWith("column")?[[_a27,_i60]]:[[_a27],[_i60]]);return _r48.parent.addChildBefore(_l5,_r48),_r48.parent.removeChild(_r48),Sp(_l5,0,0)?wp(e,_l5,0,0):t.endsWith("column")?Sp(_l5,0,1)?wp(e,_l5,0,1):e.position=e.offsetOf(n):Sp(_l5,1,0)?wp(e,_l5,1,0):e.position=e.offsetOf(n),[void 0,[0,0]];}}return n&&n.parent instanceof z?[n.parent,n.parentBranch]:[void 0,[0,0]];}function Sp(e,t,n){var r=e.getCell(t,n);return(r==null?void 0:r.length)===2?r[1].type==="placeholder":!1;}function Cp(e,t,n,r){var i=t.getCell(n,r);return i?[e.offsetOf(i[0]),e.offsetOf(i[i.length-1])]:-1;}function wp(e,t,n,r){var i=Cp(e,t,n,r);_typeof(i)!="number"&&e.setSelection(i);}function Tp(e,t,n,r,i){var a=t.getCell(n,r);a&&e.setPositionHandlingPlaceholder(e.offsetOf(a[i==="start"?0:a.length-1]));}function Ep(e,t){var _xp=xp(e,t),_xp2=_slicedToArray(_xp,2),n=_xp2[0],_xp2$=_slicedToArray(_xp2[1],2),r=_xp2$[0],i=_xp2$[1];if(n)switch(t){case"after row":n.addRowAfter(r),Tp(e,n,r+1,0,"end");break;case"after column":if(n.maxColumns<=n.colCount){e.announce("plonk");return;}n.addColumnAfter(i),Tp(e,n,r,i+1,"end");break;case"before row":n.addRowBefore(r),Tp(e,n,r,0,"start");break;case"before column":if(n.maxColumns<=n.colCount){e.announce("plonk");return;}n.addColumnBefore(i),Tp(e,n,r,i,"start");break;}}function Dp(e){var t;var n=e.at(e.position);if(!tc(n.parentBranch)&&n.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(lc(e.selection));var _bp=bp(e),_bp2=_slicedToArray(_bp,2),_t156=_bp2[0],_n97=_bp2[1],_r49=e.extractAtoms([e.position,e.offsetOf(_n97)]),_i61=e.extractAtoms([e.offsetOf(_t156),e.position]),_a28=_t156.parent,_t$parentBranch=_slicedToArray(_t156.parentBranch,2),_o21=_t$parentBranch[0],_s10=_t$parentBranch[1];return _a28.setCell(_o21,_s10,_i61),Ep(e,"after row"),_a28.setCell(_o21+1,_s10,_r49),e.position=e.offsetOf(_a28.getCell(_o21+1,_s10)[0]),e.contentDidChange({inputType:"insertText"}),!0;}return Ep(e,"after row"),e.contentDidChange({inputType:"insertText"}),!0;}function Op(e){return e.contentWillChange({inputType:"insertText"})?(Ep(e,"before row"),e.contentDidChange({inputType:"insertText"}),!0):!1;}function kp(e){return e.contentWillChange({inputType:"insertText"})?(Ep(e,"after column"),e.contentDidChange({inputType:"insertText"}),!0):!1;}function Ap(e){return e.contentWillChange({inputType:"insertText"})?(Ep(e,"before column"),e.contentDidChange({inputType:"insertText"}),!0):!1;}function jp(e,t){if(!e.contentWillChange({}))return!1;e.mathfield.snapshot();var n=".",r=".";switch(t){case"pmatrix":case"pmatrix*":n="(",r=")";break;case"bmatrix":case"bmatrix*":n="[",r="]";break;case"Bmatrix":case"Bmatrix*":n="\\lbrace",r="\\rbrace";break;case"vmatrix":case"vmatrix*":n="\\vert",r="\\vert";break;case"Vmatrix":case"Vmatrix*":n="\\Vert",r="\\Vert";break;case"matrix":case"matrix*":n=".",r=".";break;case"cases":case"dcases":n="\\lbrace";break;case"rcases":r="\\rbrace";break;}var i=e.at(e.position),a=i.type==="array"?i:e.parentEnvironment;return a.environmentName=t,a.leftDelim=n,a.rightDelim=r,e.contentDidChange({}),!0;}function Mp(e,t){var n=e.at(e.position);for(;n&&!(Array.isArray(n.parentBranch)&&n.parent instanceof z);)n=n.parent;if(Array.isArray(n==null?void 0:n.parentBranch)&&(n==null?void 0:n.parent)instanceof z){var _r50=n.parent,_i62=n.parentBranch,_a29;switch(t){case"row":if(_r50.rowCount>1){_r50.removeRow(_i62[0]);var _t157=_r50.getCell(Math.max(0,_i62[0]-1),_i62[1]);_a29=e.offsetOf(_t157[_t157.length-1]);}break;case"column":if(_r50.colCount>_r50.minColumns){_r50.removeColumn(_i62[1]);var _t158=_r50.getCell(_i62[0],Math.max(0,_i62[1]-1));_a29=e.offsetOf(_t158[_t158.length-1]);}break;}_a29!==void 0&&e.setPositionHandlingPlaceholder(_a29);}}function Np(e){return e.contentWillChange({inputType:"deleteContent"})?(Mp(e,"row"),e.contentDidChange({inputType:"deleteContent"}),!0):!1;}function Pp(e){return e.contentWillChange({inputType:"deleteContent"})?(Mp(e,"column"),e.contentDidChange({inputType:"deleteContent"}),!0):!1;}hf({addRowAfter:Dp,addColumnAfter:kp,addRowBefore:Op,addColumnBefore:Ap,removeRow:Np,removeColumn:Pp,setEnvironment:jp},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function Fp(){return[new Tl()];}var Ip=function(){function e(_e441){_classCallCheck(this,e);this.recording=!1,this.model=_e441,this.reset();}return _createClass(e,[{key:"reset",value:function reset(){this.stack=[],this.index=-1,this.lastOp="";}},{key:"startRecording",value:function startRecording(){this.recording=!0;}},{key:"stopRecording",value:function stopRecording(){this.recording=!1;}},{key:"canUndo",value:function canUndo(){return this.index-1>=0;}},{key:"canRedo",value:function canRedo(){return this.stack.length-1>this.index;}},{key:"stopCoalescing",value:function stopCoalescing(_e442){_e442&&this.index>=0&&(this.stack[this.index].selection=_e442),this.lastOp="";}},{key:"undo",value:function undo(){if(!this.canUndo())return!1;var _e443=this.stack[this.index-1];return--this.index,this.lastOp="",this.model.setState(_e443,{silenceNotifications:!1,type:"undo"}),!0;}},{key:"redo",value:function redo(){if(!this.canRedo())return!1;var _e444=this.stack[this.index+1];return this.index+=1,this.lastOp="",this.model.setState(_e444,{silenceNotifications:!1,type:"redo"}),!0;}},{key:"pop",value:function pop(){this.canUndo()&&(this.stack.splice(this.index,this.stack.length-this.index),--this.index);}},{key:"snapshot",value:function 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>e.maximumDepth&&(this.stack.shift(),--this.index),this.lastOp=t==null?"":t,!0):!1;}}]);}();Ip.maximumDepth=1e3;var Lp=Ip;function Rp(e,t,n,r){var i,a,o,s,c,l;var u=n.parent;if(tc(r)&&n instanceof z&&n.isMultiline&&Hp(e,n,r[0],t))return!0;if(u&&n instanceof B){var _i63=!r&&t==="forward"||r==="body"&&t==="backward",_a30=_i63?e.offsetOf(n.firstChild):e.offsetOf(n.lastChild);return _i63?n.rightDelim!=="?"&&n.rightDelim!=="."?(n.leftDelim=".",n.isDirty=!0):(u.addChildrenAfter(n.removeBranch("body"),n),u.removeChild(n),_a30--):n.leftDelim!=="?"&&n.leftDelim!=="."?(n.rightDelim=".",n.isDirty=!0):(u.addChildrenAfter(n.removeBranch("body"),n),u.removeChild(n),_a30--),e.position=_a30,!0;}if(u&&n.type==="surd"){if(t==="forward"&&!r||t==="backward"&&r==="body"){var _t159=n.leftSibling;n.hasChildren&&u.addChildrenAfter(n.removeBranch("body"),n),u.removeChild(n),e.position=e.offsetOf(_t159);}else t==="forward"&&r==="body"?e.position=e.offsetOf(n):!r&&t==="backward"?n.hasChildren?e.position=e.offsetOf(n.lastChild):(e.position=Math.max(0,e.offsetOf(n)-1),u.removeChild(n)):r==="above"&&(n.hasEmptyBranch("above")&&n.removeBranch("above"),t==="backward"?e.position=e.offsetOf(n.leftSibling):e.position=e.offsetOf(n.body[0]));return!0;}if(u&&(n.type==="box"||n.type==="enclose")){var _i64=r&&t==="backward"||!r&&t==="forward"?n.leftSibling:n.lastChild;return u.addChildrenAfter(n.removeBranch("body"),n),u.removeChild(n),e.position=e.offsetOf(_i64),!0;}if(n.type==="genfrac"||n.type==="overunder"){if(!r)return n.type==="overunder"&&n.hasEmptyBranch("body")||n.type==="genfrac"&&n.hasEmptyBranch("below")&&n.hasEmptyBranch("above")?!1:(e.position=e.offsetOf(t==="forward"?n.firstChild:n.lastChild),!0);var _i65=H_.fractionNavigationOrder==="numerator-denominator"?"above":"below",_a31=_i65==="above"?"below":"above";if(u&&(t==="forward"&&r===_i65||t==="backward"&&r===_a31)){var _t160=n.removeBranch(_i65),_r51=n.removeBranch(_a31);return u.addChildrenAfter([].concat(_toConsumableArray(_t160),_toConsumableArray(_r51)),n),u.removeChild(n),e.position=e.offsetOf(_t160.length>0?_t160[_t160.length-1]:_r51[0]),!0;}return t==="backward"?e.position=e.offsetOf(n.leftSibling):e.position=e.offsetOf(n),!0;}if(n.type==="extensible-symbol"||n.type==="subsup"||n.type==="operator"){if(!r&&t==="forward")return!1;if(!r){if(n.subscript||n.superscript){var _r52=t==="forward"?(o=(i=n.superscript)==null?void 0:i[0])==null?(a=n.subscript)==null?void 0:a[0]:o:(l=(s=n.subscript)==null?void 0:s[0].lastSibling)==null?(c=n.superscript)==null?void 0:c[0].lastSibling:l;return _r52&&(e.position=e.offsetOf(_r52)),!0;}return!1;}if(!n.hasChildren&&n.type==="subsup"){var _r53=t==="forward"?e.offsetOf(n):Math.max(0,e.offsetOf(n)-1);return n.parent.removeChild(n),e.position=_r53,!0;}if(r&&n.hasEmptyBranch(r)){if(n.removeBranch(r),n.type==="subsup"&&!n.subscript&&!n.superscript){var _r54=t==="forward"?e.offsetOf(n):Math.max(0,e.offsetOf(n)-1);return n.parent.removeChild(n),e.position=_r54,!0;}return r==="superscript"&&t==="backward"?e.position=e.offsetOf(n.firstChild)-1:r==="subscript"&&t==="backward"?n.superscript?e.position=e.offsetOf(n.superscript[0].lastSibling):e.position=e.offsetOf(n.firstChild)-1:e.position=e.offsetOf(n),!0;}return r==="superscript"?t==="backward"?e.position=e.offsetOf(n.firstChild)-1:n.subscript?e.position=e.offsetOf(n.subscript[0]):e.position=e.offsetOf(n):r==="subscript"&&(t==="backward"&&n.superscript?e.position=e.offsetOf(n.superscript[0].lastSibling):t==="backward"?e.position=e.offsetOf(n.firstChild)-1:e.position=e.offsetOf(n)),!0;}if((u==null?void 0:u.type)==="genfrac"&&!r&&n.type!=="first"){var _t161=e.offsetOf(n.leftSibling);return u.removeChild(n),u.hasEmptyBranch("above")&&u.hasEmptyBranch("below")?(_t161=e.offsetOf(u.leftSibling),u.parent.removeChild(u),e.announce("delete",void 0,[u]),e.position=_t161,!0):(e.announce("delete",void 0,[n]),e.position=_t161,!0);}if(t==="backward"&&((u==null?void 0:u.command)==="\\ln"||(u==null?void 0:u.command)==="\\log")&&n.parentBranch!=="body"){var _t162=e.offsetOf(u.leftSibling);return u.parent.removeChild(u),e.announce("delete",void 0,[u]),e.position=_t162,!0;}return!1;}function zp(e){return!e.mathfield.isSelectionEditable||!e.contentWillChange({inputType:"deleteContentBackward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},function(){var t;var n=e.at(e.position);if(n&&Rp(e,"backward",n))return;if(n!=null&&n.isFirstSibling){if(Rp(e,"backward",n.parent,n.parentBranch))return;n=null;}if(!n){e.announce("plonk");return;}var r=n.parent;if(e.position=e.offsetOf(n.leftSibling),r.removeChild(n),e.announce("delete",void 0,[n]),r.type==="latexgroup"&&r.hasEmptyBranch("body")){var _n98=e.offsetOf(r.leftSibling);(t=r.parent)==null||t.removeChild(r),e.position=Math.max(0,_n98);}e.root.hasEmptyBranch("body")&&e.mathfield.flushInlineShortcutBuffer();}):Vp(e,lc(e.selection),"deleteContentBackward");}function Bp(e){return!e.mathfield.isSelectionEditable||!e.contentWillChange({inputType:"deleteContentForward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},function(){var t,n,r;var i=e.at(e.position).rightSibling;if(i&&Rp(e,"forward",i))return;if(i){if(e.at(e.position).isLastSibling&&Rp(e,"forward",i.parent,i.parentBranch))return;}else{if(i=e.at(e.position),i.isLastSibling&&Rp(e,"forward",i.parent,i.parentBranch))return;i=void 0;}if(e.position===e.lastOffset||!i){e.announce("plonk");return;}var a=i.parent;a.removeChild(i);var o=(t=e.at(e.position))==null?void 0:t.rightSibling;for(;(o==null?void 0:o.type)==="subsup";)o.parent.removeChild(o),o=(n=e.at(e.position))==null?void 0:n.rightSibling;if(e.announce("delete",void 0,[i]),a.type==="latexgroup"&&a.hasEmptyBranch("body")){var _t163=e.offsetOf(a.leftSibling);(r=a.parent)==null||r.removeChild(a),e.position=Math.max(0,_t163);}e.root.hasEmptyBranch("body")&&e.mathfield.flushInlineShortcutBuffer();}):Vp(e,lc(e.selection),"deleteContentForward");}function Vp(e,t,n){var r=e.getAtoms(t);if(r.length>0&&r[0].parent){var _i66=r[0];for(;_i66&&!(_i66 instanceof z);)_i66=_i66.parent;var _a32=r[r.length-1];for(;_a32&&!(_a32 instanceof z);)_a32=_a32.parent;if(_i66&&_i66 instanceof z){var _t164=_i66;if(_t164&&_a32===_t164&&_t164.isMultiline){var _ref8=[Math.min(e.position,e.anchor),Math.max(e.position,e.anchor)],_r55=_ref8[0],_i67=_ref8[1],_e$at$parentBranch=_slicedToArray(e.at(_r55).parentBranch,2),_a33=_e$at$parentBranch[0],_o22=_e$at$parentBranch[1],_e$at$parentBranch2=_slicedToArray(e.at(_i67).parentBranch,2),_s11=_e$at$parentBranch2[0],_c8=_e$at$parentBranch2[1];if(_s11-_a33+1>=2)return e.deferNotifications({content:!0,selection:!0,type:n},function(){var n;var l=_t164.getCell(_a33,_o22),u=_t164.getCell(_s11,_c8);if(!l||!u)return;e.extractAtoms([_r55,_i67]);var d=_t164.getCell(_a33,_o22);_t164.getCell(_s11,_c8);for(var _e445=_s11-1;_e445>_a33;_e445--)_t164.removeRow(_e445);if(_a33!==_s11){var _e446=_t164.getCell(_a33+1,_o22);if(d&&_e446){var _n99=[].concat(_toConsumableArray(d.filter(function(e){return e.type!=="first";})),_toConsumableArray(_e446.filter(function(e){return e.type!=="first";})));_t164.setCell(_a33,_o22,_n99),_t164.removeRow(_a33+1);}}var f=_t164.getCell(_a33,_o22);if(f){var _t165=d?d.filter(function(e){return e.type!=="first";}).length:0;e.position=e.offsetOf((n=f[_t165])==null?f[0]:n);}else e.position=_r55;_t164.isDirty=!0;});}}var _o23=r[0].parent.firstChild;_o23.type==="first"&&(_o23=_o23.rightSibling);var _s12=r[r.length-1].parent.lastChild,_c9=r[0];_c9.type==="first"&&(_c9=_c9.rightSibling);var _l6=r[r.length-1];if(_c9===_o23&&_l6===_s12){var _n100=r[0].parent;_n100.parent&&_n100.type!=="prompt"&&(t=[e.offsetOf(_n100.leftSibling),e.offsetOf(_n100)]);}if(r.length===1&&r[0].type==="placeholder"&&r[0].parent.type==="genfrac"){var _t166=r[0].parent,_i68=r[0].parentBranch==="below"?"above":"below",_a34=e.offsetOf(_t166.leftSibling);return e.deferNotifications({content:!0,selection:!0,type:n},function(){var n,r;var o=_t166.removeBranch(_i68);if(o.length===1&&o[0].type==="placeholder")(r=_t166.parent)==null||r.removeChild(_t166),e.position=Math.max(0,_a34);else{var _r56=_t166.parent.addChildrenAfter(o,_t166);(n=_t166.parent)==null||n.removeChild(_t166),e.position=e.offsetOf(_r56);}});}}return e.deferNotifications({content:!0,selection:!0,type:n},function(){var n=new Map();if(r.length>0){var _e447=r[0],_t167=r[r.length-1],_i69=new Set(),_a35=_e447.parent;for(;_a35;)(_a35.type==="surd"||_a35.type==="box"||_a35.type==="enclose"||_a35.type==="leftright"||_a35.type==="genfrac"||_a35.type==="overunder")&&_a35.parent&&_i69.add(_a35),_a35=_a35.parent;var _o24=new Set();for(_a35=_t167.parent;_a35;)(_a35.type==="surd"||_a35.type==="box"||_a35.type==="enclose"||_a35.type==="leftright"||_a35.type==="genfrac"||_a35.type==="overunder")&&_a35.parent&&_o24.add(_a35),_a35=_a35.parent;var _iterator122=_createForOfIteratorHelper(r),_step122;try{for(_iterator122.s();!(_step122=_iterator122.n()).done;){var _e448=_step122.value;for(_a35=_e448.parent;_a35;){if((_a35.type==="surd"||_a35.type==="box"||_a35.type==="enclose"||_a35.type==="leftright"||_a35.type==="genfrac"||_a35.type==="overunder")&&_a35.parent){n.has(_a35)||n.set(_a35,{containsStart:_i69.has(_a35),containsEnd:_o24.has(_a35)});break;}_a35=_a35.parent;}}}catch(err){_iterator122.e(err);}finally{_iterator122.f();}}var i=Math.min.apply(Math,_toConsumableArray(t));e.deleteAtoms(t);var _iterator123=_createForOfIteratorHelper(n),_step123;try{for(_iterator123.s();!(_step123=_iterator123.n()).done;){var _step123$value=_slicedToArray(_step123.value,2),_t168=_step123$value[0],_r57=_step123$value[1];if(!_t168.parent)continue;var _n101=_r57.containsStart!==_r57.containsEnd;if(_t168.type==="surd"||_t168.type==="box"||_t168.type==="enclose"||_t168.type==="leftright"){var _i70=_t168.branch("body");if(!_i70||_i70.length===0||_i70.length===1&&_i70[0].type==="placeholder"){var _n102=e.offsetOf(_t168.leftSibling);_t168.parent.removeChild(_t168),e.position=Math.max(0,_n102);}else if(_n101&&!_r57.containsStart&&_r57.containsEnd){var _n103=e.offsetOf(_t168.leftSibling),_r58=_t168.removeBranch("body");_r58&&_r58.length>0&&_t168.parent.addChildrenAfter(_r58,_t168),_t168.parent.removeChild(_t168),e.position=Math.max(0,_n103);}}if(_t168.type==="genfrac"){var _i71=_t168.branch("above"),_a36=_t168.branch("below"),_o25=!_i71||_i71.length===0||_i71.length===1&&_i71[0].type==="placeholder",_s13=!_a36||_a36.length===0||_a36.length===1&&_a36[0].type==="placeholder";if(_o25&&_s13){var _n104=e.offsetOf(_t168.leftSibling);_t168.parent.removeChild(_t168),e.position=Math.max(0,_n104);}else if(_o25&&!_s13){var _n105=e.offsetOf(_t168.leftSibling),_r59=_t168.removeBranch("below");_r59&&_r59.length>0&&_t168.parent.addChildrenAfter(_r59,_t168),_t168.parent.removeChild(_t168),e.position=Math.max(0,_n105);}else if(!_o25&&_s13){var _n106=e.offsetOf(_t168.leftSibling),_r60=_t168.removeBranch("above");_r60&&_r60.length>0&&_t168.parent.addChildrenAfter(_r60,_t168),_t168.parent.removeChild(_t168),e.position=Math.max(0,_n106);}else if(_n101&&!_r57.containsStart&&_r57.containsEnd&&!_o25&&!_s13){var _n107=e.offsetOf(_t168.leftSibling),_r61=_t168.removeBranch("above");_r61&&_r61.length>0&&_t168.parent.addChildrenAfter(_r61,_t168),_t168.parent.removeChild(_t168),e.position=Math.max(0,_n107);}}}}catch(err){_iterator123.e(err);}finally{_iterator123.f();}n.size===0&&(e.position=i),e.root.hasEmptyBranch("body")&&e.mathfield.flushInlineShortcutBuffer();});}function Hp(e,t,n,r){if(!(t instanceof z)||!t.isMultiline||t.rows.length===1||t.rows[n].length>1)return!1;var i=t.getCell(n,0);if(!i)return!1;if(t.removeRow(n),r==="backward"){var _r62=t.getCell(n-1,0);if(!_r62)return e.position=e.offsetOf(t),!0;_r62.length>0?e.position=e.offsetOf(_r62[_r62.length-1]):e.position=e.offsetOf(t),t.setCell(n-1,0,[].concat(_toConsumableArray(_r62),_toConsumableArray(i)));}else{var _r63=t.getCell(n,0);if(!_r63)return e.position=e.offsetOf(t),!0;_r63.length>0?e.position=e.offsetOf(_r63[0]):e.position=e.offsetOf(t),t.setCell(n,0,[].concat(_toConsumableArray(i),_toConsumableArray(_r63)));}return!0;}function Up(e,t,n){var r,i;if(e.at(t).mode!=="text")return t;var a=n==="backward"?-1:1,o;if(Ze.test(e.at(t).value)){var _n108=t,_r64;do _r64=e.at(_n108).mode==="text"&&Ze.test(e.at(_n108).value),_n108+=a;while(e.at(_n108)&&_r64);o=e.at(_n108)?_n108-2*a:_n108-a;}else if(/\s/.test(e.at(t).value)){var _n109=t;for(;((r=e.at(_n109))==null?void 0:r.mode)==="text"&&/\s/.test(e.at(_n109).value);)_n109+=a;if(!e.at(_n109))o=_n109-a;else{var _t169=!0;do _t169=e.at(_n109).mode==="text"&&!/\s/.test(e.at(_n109).value),_n109+=a;while(e.at(_n109)&&_t169);o=e.at(_n109)?_n109-2*a:_n109-a;}}else{var _n110=t;for(;((i=e.at(_n110))==null?void 0:i.mode)==="text"&&!/\s/.test(e.at(_n110).value);)_n110+=a;o=e.at(_n110)?_n110:_n110-a;var _r65=!0;for(;e.at(_n110)&&_r65;)_r65=e.at(_n110).mode==="text"&&/\s/.test(e.at(_n110).value),_r65&&(o=_n110),_n110+=a;o=e.at(_n110)?_n110-2*a:_n110-a;}return o-(a>0?0:1);}function Wp(e,t,n){var r,i,a,o,s,c,l,u;var d=e.position;(r=n==null?void 0:n.extend)!=null&&r||e.collapseSelection(t);var f=e.at(e.position);if(t==="forward"&&(f.type==="subsup"?(f=f.rightSibling,f||(f=e.at(e.position+1))):f=e.at(e.position+1)),!f)return e.announce("plonk"),!1;var p=e.offsetOf(f);if(f instanceof oc)p=Up(e,p,t);else if(f instanceof mu){if(f.isSuggestion)for(;f&&f instanceof mu;)f.isSuggestion=!1,p=e.offsetOf(f),f=f.rightSibling;else if(t==="forward"){if(f=f.rightSibling,!f||!(f instanceof mu))return e.announce("plonk"),!1;for(;f&&f instanceof mu&&/[a-zA-Z\*]/.test(f.value);)p=e.offsetOf(f),f=f.rightSibling;}else{if(f=f.leftSibling,!f||!(f instanceof mu))return e.announce("plonk"),!1;for(;f&&f instanceof mu&&/[a-zA-Z\*]/.test(f.value);)p=e.offsetOf(f),f=f.leftSibling;}}else if(t==="forward"&&f.type==="mopen"){var _t170=0;do f.type==="mopen"?_t170+=1:f.type==="mclose"&&--_t170,f=f.rightSibling;while(!f.isLastSibling&&_t170!==0);p=e.offsetOf(f.leftSibling);}else if(t==="backward"&&f.type==="mclose"){var _t171=0;do f.type==="mopen"?_t171+=1:f.type==="mclose"&&--_t171,f=f.leftSibling;while(!f.isFirstSibling&&_t171!==0);p=e.offsetOf(f);}else if(t==="backward"){if(f.type==="first")for(;p>0&&f.type==="first";)--p,f=e.at(p);else{var _t172=f.type;f.type==="subsup"&&(p=e.offsetOf(e.at(p).leftSibling)),--p;var _n111=(i=e.at(p))==null?void 0:i.type;for(;p>=0&&_n111===_t172;)((a=e.at(p))==null?void 0:a.type)==="subsup"?p=e.offsetOf(e.at(p).leftSibling):--p,_n111=e.at(p).type;}}else{var _f2=f,_t173=_f2.type,_n112=(o=e.at(p))==null?void 0:o.type,_r66=e.lastOffset;for(;p<=_r66&&(_n112===_t173||_n112==="subsup");){for(;((s=e.at(p).rightSibling)==null?void 0:s.type)==="subsup";)p=e.offsetOf(e.at(p).rightSibling);p+=1,_n112=(c=e.at(p))==null?void 0:c.type;}--p;}if((l=n==null?void 0:n.extend)!=null&&l){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;(u=n==null?void 0:n.delete)!=null&&u?t==="forward"?Vp(e,[d,p],"deleteWordForward"):(Vp(e,[d,p],"deleteWordBackward"),e.position=p):(e.position=p,e.announce("move",d));}return e.mathfield.stopCoalescingUndo(),!0;}function Gp(e,t,n){var r,i;if(n=n==null?{extend:!1}:n,e.mathfield.styleBias=t==="backward"?"right":"left",t!=="forward"){var _Td3=Td(e),_Td4=_slicedToArray(_Td3,2),_t174=_Td4[0],_n113=_Td4[1];_t174!==void 0&&_n113!==void 0&&e.deleteAtoms([_t174,_n113]);}if(t==="upward")return Xp(e,n);if(t==="downward")return Zp(e,n);if(n.extend){var _n114=Kp(e,e.position,t);_n114<0&&(_n114=0),_n114>e.lastOffset&&(_n114=e.lastOffset);var _r67=e.setSelection(e.anchor,_n114);return e.mathfield.stopCoalescingUndo(),_r67;}if(e.selectionIsPlaceholder){e.collapseSelection(t);var _n115=Gp(e,t);return e.mathfield.stopCoalescingUndo(),_n115;}var a=e.position,o=a;if(e.collapseSelection(t)?(a=e.position,qp(e,a)||(a=Kp(e,a,t))):a=Kp(e,a,t),a<0||a>e.lastOffset){var _n116=!0;return e.silenceNotifications||(_n116=(i=(r=e.mathfield.host)==null?void 0:r.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))==null?!0:i),_n116&&e.announce("plonk"),_n116;}return e.setPositionHandlingPlaceholder(a),e.mathfield.stopCoalescingUndo(),e.announce("move",o),!0;}function Kp(e,t,n){return t+=n==="forward"?1:-1,t<0||t>e.lastOffset||qp(e,t)?t:Kp(e,t,n);}function qp(e,t){var n;var r=e.at(t),i=r.parent;for(;i&&!i.inCaptureSelection;)i=i.parent;return!(i!=null&&i.inCaptureSelection||(n=r.parent)!=null&&n.skipBoundary&&(!r.isFirstSibling&&r.isLastSibling||r.type==="first")||e.mathfield.hasEditablePrompts&&!r.parentPrompt);}function Jp(e,t,n){var r=1/0,i=0;for(;i<t.length;i++){var _a37=t[i],_o26=e.getHTMLElement(_a37);if(!_o26)continue;var _s14=Hc(_o26).right,_c0=Math.abs(n-_s14);if(_c0<=r)r=_c0;else break;}return t[i-1];}function Yp(e,t,n,r,i){var a=e.mathfield.hasEditablePrompts,o=a?n.filter(function(e){return e.type==="prompt"&&!e.captureSelection;}):n,s=Hc(e.mathfield.getHTMLElement(t)).right,c=e.offsetOf(Jp(e.mathfield,o,s))-+!!a;if(r){var _e$selection$ranges$=_slicedToArray(e.selection.ranges[0],2),_t175=_e$selection$ranges$[0],_n117=_e$selection$ranges$[1],_r68;_r68=c<(i==="up"?_t175:_n117)?{ranges:[[c,_n117]],direction:"backward"}:{ranges:[[_t175,c]],direction:"forward"},e.setSelection(_r68);}else e.setPositionHandlingPlaceholder(c);e.announce("move ".concat(i));}function Xp(e,t){var n,r;var i=(n=t==null?void 0:t.extend)==null?!1:n;i||e.collapseSelection("backward");var a=function a(){var t,n;var r=!0;return e.silenceNotifications||(r=(n=(t=e.mathfield.host)==null?void 0:t.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))==null?!0:n),e.announce(r?"line":"plonk"),r;},o=e.at(e.position),s=o;for(;s&&s.parentBranch!=="below"&&!(Array.isArray(s.parentBranch)&&s.parent instanceof z);)s=s.parent;if(Array.isArray(s==null?void 0:s.parentBranch)&&s.parent instanceof z){var _t176=s.parent;if(s.parentBranch[0]<1)return a();var _n118=s.parentBranch[0]-1,_r69=_t176.getCell(_n118,s.parentBranch[1]);if(!_r69.some(function(e){return e.type==="prompt"&&!e.captureSelection;})&&e.mathfield.hasEditablePrompts)return a();Yp(e,o,_r69,i,"up");}else if(s){var _t177=(r=s.parent.branch("above"))==null?s.parent.createBranch("above"):r;if(!_t177.some(function(e){return e.type==="prompt"&&e.placeholderId;})&&e.mathfield.hasEditablePrompts)return a();Yp(e,o,_t177,i,"up");}else return a();return e.mathfield.stopCoalescingUndo(),!0;}function Zp(e,t){var n,r;var i=(n=t==null?void 0:t.extend)==null?!1:n;i||e.collapseSelection("forward");var a=function a(){var t,n;var r=!0;return e.silenceNotifications||(r=(n=(t=e.mathfield.host)==null?void 0:t.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))==null?!0:n),e.announce(r?"line":"plonk"),r;},o=e.at(e.position),s=o;for(;s&&s.parentBranch!=="above"&&!(tc(s.parentBranch)&&s.parent instanceof z);)s=s.parent;if(tc(s==null?void 0:s.parentBranch)&&s.parent instanceof z){var _t178=s.parent;if(s.parentBranch[0]+1>_t178.rows.length-1)return a();var _n119=s.parentBranch[0]+1,_r70=_t178.getCell(_n119,s.parentBranch[1]);if(!_r70.some(function(e){return e.type==="prompt"&&!e.captureSelection;})&&e.mathfield.hasEditablePrompts)return a();Yp(e,o,_r70,i,"down");}else if(s){var _t179=(r=s.parent.branch("below"))==null?s.parent.createBranch("below"):r;if(!_t179.some(function(e){return e.type==="prompt";})&&e.mathfield.hasEditablePrompts)return a();Yp(e,o,_t179,i,"down");}else return a();return!0;}function Qp(e){var t=e.position,n=e.at(t).parent;return n!=null&&n.parent?(e.position=e.offsetOf(n),e.mathfield.stopCoalescingUndo(),e.announce("move",t),!0):(e.announce("plonk"),!1);}function $p(e){var t=0,n=e.at(e.position),r=!1;for(;n;)n.hasEmptyBranch("superscript")?n.hasEmptyBranch("subscript")||(r=!1):(t+=1,r=!0),n=n.parent;return r?t:0;}function em(e){var t=0,n=e.at(e.position),r=!1;for(;n;)n.hasEmptyBranch("subscript")?n.hasEmptyBranch("superscript")||(r=!1):(t+=1,r=!0),n=n.parent;return r?t:0;}function tm(e){if(e.collapseSelection(),$p(e)>=e.mathfield.options.scriptDepth[1])return e.announce("plonk"),!1;var t=e.at(e.position);if(t.subsupPlacement===void 0){var _e449=t.rightSibling;(_e449==null?void 0:_e449.type)!=="subsup"&&(_e449=new Zl({style:t.style}),t.parent.addChildAfter(_e449,t)),t=_e449;}return t.createBranch("superscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(t.superscript[0]))),!0;}function nm(e){if(e.collapseSelection(),em(e)>=e.mathfield.options.scriptDepth[0])return e.announce("plonk"),!1;var t=e.at(e.position);if(t.subsupPlacement===void 0){var _e450=t.rightSibling;(_e450==null?void 0:_e450.type)!=="subsup"&&(_e450=new Zl({style:t.style}),t.parent.addChildAfter(_e450,t)),t=_e450;}return t.createBranch("subscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(t.subscript[0]))),!0;}function rm(){function e(e){var n=[],i=[];return _toConsumableArray(e.querySelectorAll("input, select, textarea, a[href], button,\n [tabindex], audio[controls], video[controls],\n [contenteditable]:not([contenteditable=\"false\"]), details>summary")).filter(t).forEach(function(e,t){var a=r(e);a===0?n.push(e):i.push({documentOrder:t,tabIndex:a,node:e});}),i.sort(function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex;}).map(function(e){return e.node;}).concat(n);}function t(e){return!(!n(e)||i(e)||r(e)<0);}function n(e){return!(e.disabled||e.type==="hidden"&&e.tagName.toUpperCase()==="INPUT"||s(e));}function r(e){var t;var n=Number.parseInt((t=e.getAttribute("tabindex"))==null?"NaN":t,10);return Number.isNaN(n)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO")&&e.getAttribute("tabindex")===null?0:e.tabIndex:n;}function i(e){return e.tagName.toUpperCase()==="INPUT"&&e.type==="radio"&&!o(e);}function a(e,t){var _iterator124=_createForOfIteratorHelper(e),_step124;try{for(_iterator124.s();!(_step124=_iterator124.n()).done;){var _n120=_step124.value;if(_n120.checked&&_n120.form===t)return _n120;}}catch(err){_iterator124.e(err);}finally{_iterator124.f();}return null;}function o(e){var t;if(!e.name)return!0;var n=a(((t=e.form)==null?e.ownerDocument:t).querySelectorAll("input[type=\"radio\"][name=\""+e.name+"\"]"),e.form);return!n||n===e;}function s(e){if(!f()||e===document.activeElement||e.contains(document.activeElement))return!1;if(getComputedStyle(e).visibility==="hidden")return!0;var t=e.getBoundingClientRect();if(t.width===0||t.height===0)return!0;for(;e;){if(getComputedStyle(e).display==="none")return!0;e=e.parentElement;}return!1;}return f()?e(document.body):[];}function im(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"forward";var r=e.position;if(xe(t)){var _i72=e.offsetOf(t[0]),_a38=e.offsetOf(t[t.length-1]);return n==="forward"?e.setSelection(_i72,_a38):e.setSelection(_a38,_i72),e.announce("move",r),e.mathfield.stopCoalescingUndo(),!0;}return n==="forward"?im(e,[t.leftSibling,t]):im(e,[t,t.leftSibling]);}function am(e,t){var n=e.position;if(_typeof(t)=="number"&&(t=e.at(t)),t.type==="prompt")e.setSelection(e.offsetOf(t.firstChild),e.offsetOf(t.lastChild));else{var _n121=e.offsetOf(t);t.type==="placeholder"?e.setSelection(_n121-1,_n121):e.position=_n121;}return e.announce("move",n),e.mathfield.stopCoalescingUndo(),!0;}function om(e,t){var n,r;var i=t==="forward"?1:-1;e.at(e.anchor).type==="placeholder"&&Gp(e,t);var a,o=e.at(e.anchor).parentPrompt;a=o?t==="forward"?e.offsetOf(o)+1:e.offsetOf(o.leftSibling):Math.max(e.position+i,0);var s=sm(e,a,t);if(!s||t==="forward"&&e.offsetOf(s)<a||t==="backward"&&e.offsetOf(s)>a){if(!((r=(n=e.mathfield.host)==null?void 0:n.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))==null||r))return e.announce("plonk"),!1;var _a39=rm();if(!document.activeElement||_a39.length<=1)return e.announce("plonk"),!1;var _o27=_a39.indexOf(document.activeElement)+i;return _o27<0&&(_o27=_a39.length-1),_o27>=_a39.length&&(_o27=0),_a39[_o27].focus(),e.mathfield.stopCoalescingUndo(),!0;}return am(e,s),!0;}function sm(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"forward";return e.findAtom(function(t){return t.type==="placeholder"||t.type==="prompt"||!e.mathfield.readOnly&&t.treeDepth>2&&t.isFirstSibling&&t.isLastSibling;},t,n);}hf({moveToOpposite:function moveToOpposite(e){var t={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},n=e.at(e.position),r=n.parent;if(!r)return e.announce("plonk"),!1;var i=n.parentBranch,a;if(_typeof(i)=="string"&&(a=t[i]),!a){var _t180=n.subsupPlacement?nm(e):tm(e);return e.mathfield.stopCoalescingUndo(),_t180;}r.branch(a)||r.createBranch(a);var o=e.setSelection(e.getBranchRange(e.offsetOf(r),a));return e.mathfield.stopCoalescingUndo(),o;},moveBeforeParent:function moveBeforeParent(e){var _e$at=e.at(e.position),t=_e$at.parent;return t?(e.position=e.offsetOf(t),e.mathfield.stopCoalescingUndo(),!0):(e.announce("plonk"),!1);},moveAfterParent:function moveAfterParent(e){return Qp(e);},moveToNextChar:function moveToNextChar(e){return Gp(e,"forward");},moveToPreviousChar:function moveToPreviousChar(e){return Gp(e,"backward");},moveUp:function moveUp(e){return Gp(e,"upward");},moveDown:function moveDown(e){return Gp(e,"downward");},moveToNextWord:function moveToNextWord(e){return Wp(e,"forward");},moveToPreviousWord:function moveToPreviousWord(e){return Wp(e,"backward");},moveToGroupStart:function moveToGroupStart(e){var t=e.offsetOf(e.at(e.position).firstSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0);},moveToGroupEnd:function moveToGroupEnd(e){var t=e.offsetOf(e.at(e.position).lastSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0);},moveToNextGroup:function moveToNextGroup(e){var t,n,r,i;if(e.position===e.lastOffset&&e.anchor===e.lastOffset)return om(e,"forward");var a=e.at(e.position);if(a.mode==="text"){if(e.selectionIsCollapsed){var _n122=a;for(;(_n122==null?void 0:_n122.mode)==="text";)_n122=_n122.leftSibling;var _r71=a;for(;((t=_r71.rightSibling)==null?void 0:t.mode)==="text";)_r71=_r71.rightSibling;if(_n122&&_r71)return im(e,[_n122,_r71]);}if(a.rightSibling.mode==="text"){var _t181=a;for(;(_t181==null?void 0:_t181.mode)==="text";)_t181=_t181.rightSibling;return _t181?(am(e,(n=_t181.leftSibling)==null?_t181:n),e.mathfield.switchMode("math"),!0):am(e,e.lastOffset);}}var o=e.at(e.anchor).parentPrompt,s=o?e.offsetOf(o)+1:Math.max(e.position+1,0),c=sm(e,s,"forward");if(c&&e.offsetOf(c)<s)return om(e,"forward");if(c)return am(e,c);var l=cm(e,a,function(e){return e.type==="leftright"||e.type==="text";},"forward");if(l){if(l.mode==="text"){var _t182=l;for(;(_t182==null?void 0:_t182.mode)==="text";)_t182=_t182.rightSibling;return im(e,[(r=l.leftSibling)==null?l:r,(i=_t182.leftSibling)==null?_t182:i]);}return im(e,l);}var u=a.parent;if(u){if(u.type==="leftright"||u.type==="surd")return im(e,u);if(a.parentBranch==="superscript"&&u.subscript)return im(e,u.subscript);if(a.parentBranch==="above"&&u.below)return im(e,u.below);if(a.parentBranch==="superscript"||a.parentBranch==="subscript")return am(e,u);if(a.parentBranch==="above"||a.parentBranch==="below")return im(e,u);}return am(e,e.lastOffset);},moveToPreviousGroup:function moveToPreviousGroup(e){var t;if(e.position===0&&e.anchor===0)return om(e,"backward");var n=e.at(e.position),r=n.mode;if(r==="text"){if(e.selectionIsCollapsed){var _r72=n;for(;(_r72==null?void 0:_r72.mode)==="text";)_r72=_r72.leftSibling;var _i73=n;for(;((t=_i73.rightSibling)==null?void 0:t.mode)==="text";)_i73=_i73.rightSibling;if(_r72&&_i73)return im(e,[_r72,_i73]);}for(;(n==null?void 0:n.mode)==="text";)n=n.leftSibling;return n?am(e,n):am(e,0);}var i=e.at(e.anchor).parentPrompt,a=i?e.offsetOf(i.leftSibling):Math.max(e.position-1,0),o=sm(e,a,"backward");if(o&&e.offsetOf(o)>a)return om(e,"backward");if(o)return am(e,o);if(r==="math"){var _t183=cm(e,n,function(e){return e.type==="leftright"||e.type==="text";},"backward");if(_t183){if(_t183.mode==="text"){var _n123=_t183;for(;(_n123==null?void 0:_n123.mode)==="text";)_n123=_n123.leftSibling;return im(e,[_t183,_n123]);}return im(e,_t183);}var _r73=n.parent;if(_r73){if(_r73.type==="leftright"||_r73.type==="surd")return im(e,_r73);if(n.parentBranch==="subscript"&&_r73.superscript)return im(e,_r73.superscript);if(n.parentBranch==="below"&&_r73.above)return im(e,_r73.above);if(n.parentBranch==="superscript"||n.parentBranch==="subscript")return am(e,_r73);if(n.parentBranch==="above"||n.parentBranch==="below")return im(e,_r73);}return am(e,0);}return!1;},moveToMathfieldStart:function moveToMathfieldStart(e){return e.selectionIsCollapsed&&e.position===0?(e.announce("plonk"),!1):(e.position=0,e.mathfield.stopCoalescingUndo(),!0);},moveToMathfieldEnd:function moveToMathfieldEnd(e){return e.selectionIsCollapsed&&e.position===e.lastOffset?(e.announce("plonk"),!1):(e.position=e.lastOffset,e.mathfield.stopCoalescingUndo(),!0);},moveToSuperscript:tm,moveToSubscript:nm},{target:"model",changeSelection:!0}),hf({moveToNextPlaceholder:function moveToNextPlaceholder(e){return om(e,"forward");},moveToPreviousPlaceholder:function moveToPreviousPlaceholder(e){return om(e,"backward");}},{target:"model",changeSelection:!0,audioFeedback:"return"});function cm(e,t,n,r){if(r==="forward"){var _e451=t.rightSibling;for(;_e451&&!n(_e451);)_e451=_e451.rightSibling;return _e451;}var i=t.leftSibling;for(;i&&!n(i);)i=i.leftSibling;return i;}function lm(e,t,n){_typeof(t)=="function"&&(n=t,t=1/0),t===void 0&&(t=1/0);var r=e.position,i=!1,a="";for(;!i;){var _o28=e.at(r);i=t===0||_o28===void 0||_o28.type==="first"||_o28.mode!=="math"||!(_o28.type&&/mord|mpunct|operator/.test(_o28.type)||_o28.type==="mop"&&/[a-zA-Z ]+/.test(_o28.value))||!_o28.hasEmptyBranch("superscript")||!_o28.hasEmptyBranch("subscript")||_typeof(n)=="function"&&!n(_o28),i||(_o28.mode="text",_o28.command=_o28.value,_o28.verbatimLatex=void 0,a+=_o28.value),--r,--t;}e.contentDidChange({data:a,inputType:"insertText"});}function um(e,t,n){_typeof(t)=="function"&&(n=t,t=1/0),t===void 0&&(t=1/0);var r=e.position,i=!1,a=[];for(;!i;){var _o29=e.at(r);i=t===0||!_o29||_o29.type==="first"||_o29.isFirstSibling||_o29.mode!=="text"||_o29.value===" "||_typeof(n)=="function"&&!n(_o29),i||(a.push(L.serialize([_o29],{defaultMode:"math"})),_o29.mode="math"),--r,--t;}dm(e),e.contentDidChange({data:N(a),inputType:"insertText"});}function dm(e){var t;var n=e.position-1;for(;n>=0&&((t=e.at(n))==null?void 0:t.mode)==="math";)--n;if(!(n<0)&&e.at(n).mode==="text"&&e.at(n).value===" "&&e.at(n-1).mode==="math"){e.at(n-1).parent.removeChild(e.at(n-1));var _t184=e.silenceNotifications;e.silenceNotifications=!0,--e.position,e.silenceNotifications=_t184,e.contentDidChange({inputType:"deleteContent"});}}function fm(e){var t="",n=e.position,r=!1;for(;!r;){var _i74=e.at(n);r=!(_i74&&(_i74.mode==="text"||_i74.mode==="math"&&_i74.type&&/mord|mpunct/.test(_i74.type))),r||(t=_i74.value+t),--n;}return t;}function pm(e,t,n){var r=e.model;if(r.mode==="latex"||!r.at(r.position).isLastSibling||!n||!ld(n))return!1;var i=pd(n);if(!r.selectionIsCollapsed)return!!(e.model.mode==="text"&&/[/_^]/.test(i));var a=fm(r)+i;if(e.model.mode==="text"){if(t==="Esc"||/[/\\]/.test(i))return!0;if(/[\^_]/.test(i))return /(^|\s)[a-zA-Z][^_]$/.test(a)&&um(r,1),!0;var _e452={")":"(","}":"{","]":"["}[i],_r$at=r.at(r.position),_n124=_r$at.parent;if(_e452&&_n124 instanceof B&&_n124.leftDelim===_e452)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(a))return!1;if(RegExp("[$\u20AC\xA3\u20A4\u20BA\xA5\xA4\u0E3F\xA2\u20A1\u20A7\u20A8\u20B9\u20A9\u20B1]","u").test(i))return!0;if(/(^|[^a-zA-Z'\u2019])[a-zA-Z] $/.test(a))return um(r,1),!1;if(/\D\.[^\d\s]$/.test(a)){um(r,1);var _e453=r.at(r.position);return _e453.value="\u22C5",_e453.style.variant="normal",_e453.command="\\cdot",_e453.verbatimLatex=void 0,r.contentDidChange({data:"\\cdot",inputType:"insertText"}),!0;}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(a)||/\.\d$/.test(a)||/\([\d+\-.]$/.test(a))return um(r,1),!0;if(/\([a-z][,;]$/.test(a))return um(r,2),!0;if(/[\d+\-=><*|]$/.test(i))return dm(r),!0;}else{if(t==="[Space]")return lm(r,void 0,function(e){return /[a-z][:,;.]$/.test(e.value);}),!0;if(/[a-zA-Z]{3,}$/.test(a)&&!/(dxd|abc|xyz|uvw)$/.test(a))return lm(r,void 0,function(e){return /[a-zA-Z]/.test(e.value);}),!0;if(/(^|\W)(if)$/i.test(a))return lm(r,1),!0;if(RegExp("(\\u0393|\\u0394|\\u0398|\\u039B|\\u039E|\\u03A0|\\u03A3|\\u03A5|\\u03A6|\\u03A8|\\u03A9|[\\u03B1-\\u03C9]|\\u03D1|\\u03D5|\\u03D6|\\u03F1|\\u03F5){3,}$","u").test(a)&&!/(\u03b1\u03b2\u03b3)$/.test(a))return lm(r,void 0,function(e){return RegExp("(:|,|;|.|\\u0393|\\u0394|\\u0398|\\u039B|\\u039E|\\u03A0|\\u03A3|\\u03A5|\\u03A6|\\u03A8|\\u03A9|[\\u03B1-\\u03C9]|\\u03D1|\\u03D5|\\u03D6|\\u03F1|\\u03F5)","u").test(e.value);}),!0;if(i==="?"||i==="."&&!/[\d-+]\.$/.test(a))return!0;}return!1;}function mm(e,t){if(!e.isSelectionEditable||!e.keystrokeCaptionVisible)return;var n=gm(),r=e.element.getBoundingClientRect();n.style.left="".concat(r.left,"px"),n.style.top="".concat(r.top-64,"px"),n.innerHTML=globalThis.MathfieldElement.createHTML("<span>"+(id(t)||t)+"</span>"+n.innerHTML),n.style.visibility="visible",setTimeout(function(){n.childNodes.length>0&&n.childNodes[n.childNodes.length-1].remove(),n.childNodes.length===0&&(n.style.visibility="hidden");},3e3);}function hm(e){if(e.keystrokeCaptionVisible=!e.keystrokeCaptionVisible,e.keystrokeCaptionVisible){var _e454=gm();_e454.innerHTML="";}else{var _e455=Fd("mathlive-keystroke-caption-panel");_e455.style.visibility="hidden";}return!1;}function gm(){return document.getElementById("mathlive-keystroke-caption-panel")||(rl("keystroke-caption"),rl("core"),Fd("mathlive-keystroke-caption-panel"));}function _m(){document.getElementById("mathlive-keystroke-caption-panel")&&(Id("mathlive-keystroke-caption-panel"),il("core"),il("keystroke-caption"));}function vm(e,t){var n,r,i,a;var o=e.model,s=md(t);if(t.isTrusted){me(t);var _n125=_e();e.keyboardLayout!==_n125.id&&(e.keyboardLayout=_n125.id,e._keybindings=void 0);}if(clearTimeout(e.inlineShortcutBufferFlushTimer),e.inlineShortcutBufferFlushTimer=0,mm(e,s),t.isTrusted&&t.defaultPrevented)return e.flushInlineShortcutBuffer(),!1;var c,l=0,u="",d=0,f=e.inlineShortcutBuffer,p=!1;if(e.isSelectionEditable&&o.selectionIsPlaceholder&&ld(t)&&(e.flushInlineShortcutBuffer(),o.deleteAtoms(lc(o.selection)),e.snapshot("delete"),p=!0),e.isSelectionEditable){if(o.mode==="math"&&(!o.selectionIsPlaceholder||p))if(s==="[Backspace]")e.undoManager.lastOp==="insert-shortcut"?u="undo":f.pop();else if(!ld(t))e.flushInlineShortcutBuffer();else{var _i75=pd(t),_a40=[].concat(_toConsumableArray((r=(n=f[f.length-1])==null?void 0:n.keystrokes)==null?[]:r),[_i75]);f.push({state:o.getState(),keystrokes:_a40,leftSiblings:Cm(e)}),l=0;var _s15="";for(;!c&&l<_a40.length;)d=f.length-(_a40.length-l),_s15=_a40.slice(l).join(""),c=hc(f[d].leftSiblings,_s15,e.options.inlineShortcuts),!c&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(_s15)&&(c=e.options.onInlineShortcut(e,_s15)),l+=1;e.flushInlineShortcutBuffer({defer:!0});}e.options.smartMode&&(c?e.switchMode("math"):pm(e,s,t)&&(e.switchMode({math:"text",text:"math"}[o.mode]),u=""));}if(!c){if(u||(u=gd(e.keybindings,o.mode,t)),!u&&(s==="[Enter]"||s==="[Return]")){var _n126=!0;return o.contentWillChange({inputType:"insertLineBreak"})&&(e.host&&(_n126=e.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),!_n126&&t.preventDefault?(t.preventDefault(),t.stopPropagation()):((i=o.parentEnvironment)!=null&&i.isMultiline&&e.executeCommand("addRowAfter"),o.contentDidChange({inputType:"insertLineBreak"}))),_n126;}if(s==="[Space]"&&o.mode==="latex"&&Pd(e,"accept-all"))return e.dirty=!0,e.scrollIntoView(),t.preventDefault&&(t.preventDefault(),t.stopPropagation()),!1;if((!u||s==="[Space]")&&o.mode==="math"){if(s==="[Space]"){if(e.styleBias="none",e.flushInlineShortcutBuffer(),e.options.mathModeSpace)return R.insert(o,e.options.mathModeSpace,{format:"latex",mode:"math"}),e.snapshot("insert-space"),u="",e.dirty=!0,e.scrollIntoView(),t.preventDefault&&(t.preventDefault(),t.stopPropagation()),!1;var _n127=o.at(o.position+1),_r74=o.at(o.position-1);if((_n127==null?void 0:_n127.mode)==="text"||(_r74==null?void 0:_r74.mode)==="text")return R.insert(o," ",{mode:"text"}),e.snapshot("insert-space"),e.dirty=!0,e.scrollIntoView(),!1;}(a=o.at(o.position))!=null&&a.isDigit()&&globalThis.MathfieldElement.decimalSeparator===","&&pd(t)===","&&(u="insertDecimalSeparator");}}if(!c&&!u){if(o.mathfield.smartFence){if(Em(o,pd(t),kd(e)))return e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1;}else{var _o$at=o.at(o.position),_n128=_o$at.parent;if(_n128 instanceof B&&_n128.rightDelim==="?"&&o.at(o.position).isLastSibling&&/^[)}\]|]$/.test(s))return e.snapshot(),_n128.isDirty=!0,_n128.rightDelim=s,o.position+=1,o.selectionDidChange(),o.contentDidChange({data:pd(t),inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1;if(!o.selectionIsCollapsed){var _n129=pd(t);if(_n129==="("||_n129==="{"||_n129==="["){var _r75={"(":"(","{":"\\lbrace","[":"\\lbrack"}[_n129],_i76={"(":")","{":"\\rbrace","[":"\\rbrack"}[_n129],_lc=lc(o.selection),_lc2=_slicedToArray(_lc,2),_a41=_lc2[0],_s16=_lc2[1];return e.snapshot(),o.position=_s16,R.insert(o,_i76,{format:"latex"}),o.position=_a41,R.insert(o,_r75,{format:"latex"}),o.setSelection(_a41+1,_s16+1),o.contentDidChange({data:_n129,inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1;}}}return!0;}var m=o.at(Math.max(o.position,o.anchor)),h=m.parent;if(u==="moveAfterParent"&&h instanceof B&&m.isLastSibling&&e.options.smartFence&&h.rightDelim==="?"&&(e.snapshot(),h.rightDelim=h.matchingRightDelim(),h.isDirty=!0,o.contentDidChange({inputType:"insertText"}),e.snapshot("insert-fence")),e.keyboardDelegate.cancelComposition(),u)e.executeCommand(u);else if(c){var _t185=kd(e);o.setState(f[d].state);var _n130=f[f.length-1].keystrokes;_n130=_n130.slice(l-1);var _iterator125=_createForOfIteratorHelper(_n130),_step125;try{for(_iterator125.s();!(_step125=_iterator125.n()).done;){var _e456=_step125.value;R.insert(o,_e456,{silenceNotifications:!0,style:_t185});}}catch(err){_iterator125.e(err);}finally{_iterator125.f();}e.snapshot("insert-shortcut"),o.setState(f[d].state),o.deferNotifications({content:!0,selection:!0,data:c,type:"insertText"},function(){return R.insert(o,c,{format:"latex",style:_t185}),dm(e.model),c.endsWith(" ")&&(e.switchMode("text"),R.insert(o," ",{style:_t185,mode:"text"})),e.snapshot(),o.selectionIsCollapsed||e.flushInlineShortcutBuffer(),!0;}),e.dirty=!0,o.announce("replacement");}return e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1;}function ym(e){var t,n;var r=e.position,i=r,a=[];for(;i>0;){var _t186=e.at(i),_n131=_t186.value;if(_t186.type==="mord"||_t186.type==="mbin"&&(_n131==="+"||_n131==="-"||_n131==="\u2212"))a.unshift(_t186),i--;else break;}if(a.length===0)return null;var o=a.map(function(e){return e.value;}).join(""),s=((n=(t=globalThis.MathfieldElement)==null?void 0:t.decimalSeparator)==null?".":n)==="."?"\\.":",",c=RegExp("^(\\d+(?:".concat(s,"\\d*)?)[eE]([+\\-\u2212]?)(\\d+)$")),l=o.match(c);if(!l)return null;var u=l[1],d=l[2]+l[3];return{startOffset:i,endOffset:r,significand:u,exponent:d};}function bm(e,t){var n;var r=(n=globalThis.MathfieldElement)==null?void 0:n.scientificNotationTemplate;if(!r||r===""||!r.includes("#1")||!r.includes("#2"))return null;var i=r.replace("#1",e);return i=i.replace("#2",t),i;}function xm(e){var t=e.model;if(t.mode!=="math")return!1;var n=ym(t);if(!n)return!1;var r=bm(n.significand,n.exponent);return r?(t.deferNotifications({content:!0,selection:!0,type:"insertText"},function(){t.selection={ranges:[[n.startOffset,n.endOffset]],direction:"forward"},R.insert(t,r,{insertionMode:"replaceSelection",selectionMode:"after"});}),e.snapshot("format-scientific-notation"),e.dirty=!0,e.scrollIntoView(),!0):!1;}function Sm(e,t,n){var r=e.model;if(!e.isSelectionEditable){r.announce("plonk");return;}n!=null||(n={}),n.focus&&e.focus(),n.feedback&&globalThis.MathfieldElement.playSound("keypress"),_typeof(n.mode)=="string"&&(e.switchMode(n.mode),e.snapshot());var i=is(t),a=window.mathVirtualKeyboard;if(a!=null&&a.isShifted&&(i=_typeof(i)=="string"?i.toUpperCase():i.map(function(e){return e.toUpperCase();})),n.simulateKeystroke){var _t187=!0;var _iterator126=_createForOfIteratorHelper(i),_step126;try{for(_iterator126.s();!(_step126=_iterator126.n()).done;){var _n132=_step126.value;vm(e,new KeyboardEvent("keypress",{key:_n132}))&&(_t187=!1);}}catch(err){_iterator126.e(err);}finally{_iterator126.f();}if(_t187)return;}if(r.mode==="latex"){if(r.deferNotifications({content:!0,selection:!0,data:t,type:"insertText"},function(){jd(e);var _iterator127=_createForOfIteratorHelper(i),_step127;try{for(_iterator127.s();!(_step127=_iterator127.n()).done;){var _e457=_step127.value;R.insert(r,_e457,{insertionMode:"replaceSelection"});}}catch(err){_iterator127.e(err);}finally{_iterator127.f();}e.snapshot("insert-latex"),Md(e);}),t==="}"){var _t188=wd(r).map(function(e){return e.value;}).join(""),_n133=_t188.match(/^\\([a-zA-Z]+)/);if(_n133){var _r76=ft("\\"+_n133[1],"math");if((_r76==null?void 0:_r76.definitionType)==="function"){var _n134=_r76.params.filter(function(e){return!e.isOptional;}).length;if(_n134>0){var _r77=0,_i77=0,_a42=!0;for(var _e458=0;_e458<_t188.length;_e458++){var _n135=_t188[_e458];if(_a42){if(_n135==="\\"||/[a-zA-Z]/.test(_n135))continue;_a42=!1;}_n135==="{"?_r77++:_n135==="}"&&(_r77--,_r77===0&&_i77++);}if(_r77===0&&_i77===_n134&&Pd(e,"accept-all")){e.dirty=!0,e.scrollIntoView();return;}}}}}}else if(r.mode==="text"){var _t189=c(c({},Tm(r)),e.defaultStyle);var _iterator128=_createForOfIteratorHelper(i),_step128;try{for(_iterator128.s();!(_step128=_iterator128.n()).done;){var _e459=_step128.value;R.insert(r,_e459,{style:_t189,insertionMode:"replaceSelection"});}}catch(err){_iterator128.e(err);}finally{_iterator128.f();}e.snapshot("insert-text");}else if(r.mode==="math"){var _iterator129=_createForOfIteratorHelper(i),_step129;try{for(_iterator129.s();!(_step129=_iterator129.n()).done;){var _t190=_step129.value;wm(e,_t190);}}catch(err){_iterator129.e(err);}finally{_iterator129.f();}}e.dirty=!0,e.scrollIntoView();}function Cm(e){var t=e.model,n=[],r=t.at(Math.min(t.position,t.anchor));for(;r.type!=="first";)n.push(r),r=r.leftSibling;return n;}function wm(e,t){var n=e.model;/\d/.test(t)||xm(e);var r={"^":"moveToSuperscript",_:"moveToSubscript"," ":e.options.mathModeSpace?["insert",e.options.mathModeSpace]:"moveAfterParent"}[t];if(r==="moveAfterParent"){var _t191=n.at(Math.max(n.position,n.anchor)),_r78=_t191.parent;_r78 instanceof B&&_t191.isLastSibling&&e.options.smartFence&&_r78.rightDelim==="?"&&(e.snapshot(),_r78.rightDelim=_r78.matchingRightDelim(),_r78.isDirty=!0,n.contentDidChange({inputType:"insertText"}),e.snapshot("insert-fence"));}if(r){e.executeCommand(r);return;}var i=c({},kd(e));!/[a-zA-Z0-9]/.test(t)&&e.styleBias!=="none"&&(i.variant="normal",i.variantStyle=void 0);var a=n.at(n.position),o=n.selectionIsPlaceholder;if(/\d/.test(t)&&e.options.smartSuperscript&&a.parentBranch==="superscript"&&a.parent.type!=="mop"&&a.parent.type!=="operator"&&a.parent.type!=="extensible-symbol"&&a.hasNoSiblings){if(!R.insert(n,t,{style:i,insertionMode:"replaceSelection",selectionMode:o?"after":"placeholder"})){e.undoManager.pop();return;}e.snapshot("insert-mord"),Qp(n);return;}var s=t;if(s==="{"?s="\\lbrace":s==="}"?s="\\rbrace":s==="&"?s="\\&":s==="#"?s="\\#":s==="$"?s="\\$":s==="%"?s="\\%":s==="~"?s="\\~":s==="\\"&&(s="\\backslash"),R.insert(n,s,{style:i,insertionMode:"replaceSelection",selectionMode:o?"after":"placeholder"})&&(e.snapshot("insert-".concat(n.at(n.position).type)),/\d/.test(t))){var _t192=e.options.inlineShortcutTimeout>0?e.options.inlineShortcutTimeout:1e3;clearTimeout(e.scientificNotationTimer),e.scientificNotationTimer=setTimeout(function(){xm(e);},_t192);}}function Tm(e){var t,n,r,i;if(e.selectionIsCollapsed)return(n=(t=e.at(e.position))==null?void 0:t.style)==null?{}:n;var a=lc(e.selection)[0];return(i=(r=e.at(a+1))==null?void 0:r.style)==null?{}:i;}function Em(e,t,n){var r;if(!t||e.mode!=="math")return!1;var i=e.at(e.position),a=i.parent,o={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[t];if(!o)return!1;var s=sl[o],c=ol[o];if(!e.selectionIsCollapsed){e.mathfield.snapshot();var _lc3=lc(e.selection),_lc4=_slicedToArray(_lc3,2),_t193=_lc4[0],_n136=_lc4[1],_r79=e.extractAtoms([_t193,_n136]);_r79=_r79.filter(function(e){return e.type!=="first";});var _i78=a.addChildrenAfter([new B("left...right",_r79,{leftDelim:o,rightDelim:c})],e.at(_t193));return e.setSelection(e.offsetOf(_i78.firstChild),e.offsetOf(_i78.lastChild)),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:o,inputType:"insertText"}),!0;}if(o==="|"){var _t194=a instanceof B?a.leftDelim+a.rightDelim:"";if(_t194==="\\lbrace\\rbrace"||_t194==="\\{\\}"||_t194==="\\lbrace?")return e.mathfield.snapshot(),R.insert(e,"\\,\\middle\\vert\\,",{format:"latex",style:n}),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:o,inputType:"insertText"}),!0;}if(c){if(a instanceof B&&a.firstChild===i&&(a.leftDelim==="?"||a.leftDelim==="."))return a.leftDelim=o,a.isDirty=!0,e.mathfield.snapshot(),e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(!(a instanceof B)){var _t195=i;for(;_t195&&!(_t195.type==="mclose"&&_t195.value===c);)_t195=_t195.rightSibling;if(_t195){e.mathfield.snapshot();var _n137=e.extractAtoms([e.offsetOf(i),e.offsetOf(_t195)]);_n137.pop(),_n137=_n137.filter(function(e){return e.type!=="first";});var _r80=new B("left...right",_n137,{leftDelim:o,rightDelim:c});return a.addChildrenAfter([_r80],i),e.position=e.offsetOf(_r80.firstChild),e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;}}var _t196=e.offsetOf(i.lastSibling),_s17;for(_s17=e.position;_s17<=_t196;_s17++){var _t197=e.at(_s17);if(_t197 instanceof B&&(_t197.leftDelim==="?"||_t197.leftDelim===".")&&Om(o,_t197.rightDelim))break;}var _l7=e.at(_s17);if(_s17<=_t196&&_l7 instanceof B){_l7.leftDelim=o,e.mathfield.snapshot();var _t198=e.extractAtoms([e.position,_s17-1]);return _t198=_t198.filter(function(e){return e.type!=="first";}),_l7.addChildren(_t198,_l7.parentBranch),e.position+=1,e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;}if(a instanceof B&&(a.leftDelim==="?"||a.leftDelim===".")&&Om(o,a.rightDelim)){a.isDirty=!0,a.leftDelim=o,e.mathfield.snapshot();var _t199=e.extractAtoms([e.offsetOf(i.firstSibling),e.position]);var _iterator130=_createForOfIteratorHelper(_t199),_step130;try{for(_iterator130.s();!(_step130=_iterator130.n()).done;){var _e460=_step130.value;a.parent.addChildBefore(_e460,a);}}catch(err){_iterator130.e(err);}finally{_iterator130.f();}return e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;}if(!(a instanceof B&&a.leftDelim==="|")){if(o==="("){var _t200=e.position-1,_n138=!1;for(;_t200>=0;){var _i79=e.at(_t200);if(_i79.type==="first")break;if(_i79.type==="mord"&&_i79.value&&/^[\d]$/.test(_i79.value)){--_t200;continue;}if(_i79.type==="group"&&((r=_i79.body)==null?void 0:r.length)===2&&_i79.body[0].type==="first"&&_i79.body[1].value===","){_n138=!0;break;}if(_i79.type==="mord"&&(_i79.value===","||_i79.value===".")){_n138=!0;break;}break;}if(_n138)return!1;}if(e.mathfield.snapshot(),R.insert(e,"\\left".concat(o,"\\right?"),{format:"latex",style:n}),i.lastSibling.type!=="first"){var _t201=e.offsetOf(i.lastSibling),_n139=e.extractAtoms([e.position,_t201]);e.at(e.position).body=_n139,--e.position;}return e.mathfield.snapshot("insert-fence"),!0;}}if(s){if(o===")"){var _t202=e.position-1,_n140=!1;for(;_t202>=0;){var _r81=e.at(_t202);if(_r81.type==="first")break;if(_r81.type==="mord"&&_r81.value&&/^[\d]$/.test(_r81.value)){_n140=!0,--_t202;continue;}break;}if(_n140&&e.at(_t202).type==="mopen"&&e.at(_t202).value==="(")return!1;}var _t203=i;for(;_t203;){if(_t203.type==="mopen"&&_t203.value===s){e.mathfield.snapshot();var _n141=_t203.leftSibling,_r82=e.extractAtoms([e.offsetOf(_t203.leftSibling),e.offsetOf(i)]);var _r83=_r82;var _r84=_toArray(_r83);_r82=_arrayLikeToArray(_r84).slice(1);var _c1=new B("left...right",_r82,{leftDelim:s,rightDelim:o});return a.addChildrenAfter([_c1],_n141),e.position=e.offsetOf(_c1),e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;}_t203=_t203.leftSibling;}if(a instanceof B&&i.isLastSibling&&Dm(a.leftDelim,o))return e.mathfield.snapshot(),a.isDirty=!0,a.rightDelim=o,e.position+=1,e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;var _r85=e.offsetOf(i.firstSibling),_c10;for(_c10=e.position;_c10>=_r85;_c10--){var _t204=e.at(_c10);if(_t204 instanceof B&&(_t204.rightDelim==="?"||_t204.rightDelim===".")&&Dm(_t204.leftDelim,o))break;}var _l8=e.at(_c10);if(_c10>=_r85&&_l8 instanceof B)return e.mathfield.snapshot(),_l8.rightDelim=o,_l8.addChildren(e.extractAtoms([_c10,e.position]),_l8.parentBranch),e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(a instanceof B&&(a.rightDelim==="?"||a.rightDelim===".")&&Dm(a.leftDelim,o))return e.mathfield.snapshot(),a.isDirty=!0,a.rightDelim=o,a.parent.addChildren(e.extractAtoms([e.position,e.offsetOf(i.lastSibling)]),a.parentBranch),e.position=e.offsetOf(a),e.contentDidChange({data:o,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;var _u3=a.parent;return _u3 instanceof B&&(_u3.rightDelim==="?"||_u3.rightDelim===".")&&e.at(e.position).isLastSibling?(e.position=e.offsetOf(_u3),Em(e,o,n)):!1;}return!1;}function Dm(e,t){return e?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t):ol[e]===t:!0;}function Om(e,t){return t?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e):sl[t]===e:!0;}hf({scrollIntoView:function scrollIntoView(e){return e.scrollIntoView(),!0;},scrollToStart:function scrollToStart(e){return e.field.scroll(0,0),!0;},scrollToEnd:function scrollToEnd(e){var t=e.field.getBoundingClientRect();return e.field.scroll(t.left-window.scrollX,0),!0;},toggleKeystrokeCaption:hm,toggleContextMenu:function toggleContextMenu(e){var t=e.toggleContextMenu();return t||e.model.announce("plonk"),t;},plonk:function plonk(e){return e.model.announce("plonk"),!0;},switchMode:function switchMode(e,t,n,r){return e.switchMode(t,n,r),!0;}}),hf({undo:function undo(e){return e.undo(),!0;},redo:function redo(e){return e.redo(),!0;}},{target:"mathfield",changeContent:!0}),hf({insert:function insert(e,t,n){return e.insert(t,n);},typedText:function typedText(e,t,n){return Sm(e,t,n),!0;},insertDecimalSeparator:function insertDecimalSeparator(e){var 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:function commit(e){var t,n;var r=e.model;return r.contentWillChange({inputType:"insertLineBreak"})&&((t=e.host)==null||t.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),(n=r.parentEnvironment)!=null&&n.isMultiline&&e.executeCommand("addRowAfter"),r.contentDidChange({inputType:"insertLineBreak"})),!0;},insertPrompt:function insertPrompt(e,t,n){var r=e.getPrompts(),i="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),a=0;for(;r.includes(i)&&a<100;){if(a===99)return console.error("could not find a unique ID after 100 tries"),!1;i="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),a++;}return e.insert("\\placeholder[".concat(t==null?i:t,"]{}"),n),!0;}},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0}),hf({copyToClipboard:function copyToClipboard(e){return 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"}),hf({cutToClipboard:function cutToClipboard(e){return 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:function pasteFromClipboard(e){return e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("paste")?(document.execCommand("paste"),!0):(navigator.clipboard.readText().then(function(t){t&&e.model.contentWillChange({inputType:"insertFromPaste",data:t})?(e.stopCoalescingUndo(),e.stopRecording(),e.insert(t,{mode:e.model.mode})&&(Md(e),e.startRecording(),e.snapshot("paste"),e.model.contentDidChange({inputType:"insertFromPaste"}),U(e))):e.model.announce("plonk"),e.startRecording();}).catch(function(){e.model.announce("plonk"),e.startRecording();}),!0);}},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function km(e){var _lc5=lc(e.selection),_lc6=_slicedToArray(_lc5,2),t=_lc6[0],n=_lc6[1];if(t=Am(e,t,"backward"),n=Am(e,n,"forward"),t===n){var _r86=e.at(t);if(_r86.type==="leftright")return e.setSelection(e.offsetOf(_r86.firstChild)-1,n);if(_r86.type==="first"&&(_r86.parent.type==="leftright"||_r86.parent.type==="surd"))return e.setSelection(t-1,e.offsetOf(_r86.parent.lastChild)+1);e.setSelection(t-1,n);}else e.setSelection(t,n);return!0;}function Am(e,t,n){var r;var i=e.at(t);if(!i)return t;var a=n==="forward"?1:-1;if(i.mode==="text"){for(;i&&!(i.mode!=="text"||!Ze.test(i.value));)t+=a,i=e.at(t);return n==="backward"?t-1:t;}if(i.mode==="latex"){if(/[a-zA-Z\\*]/.test(i.value)){if(n==="backward")for(;(i==null?void 0:i.mode)==="latex"&&i.value!=="\\"&&/[a-zA-Z]/.test(i.value);)t+=a,i=e.at(t);else for(;(i==null?void 0:i.mode)==="latex"&&/[a-zA-Z\\*]/.test(i.value);)t+=a,i=e.at(t);}else if(i.value==="{"){if(n==="forward"){for(;(i==null?void 0:i.mode)==="latex"&&i.value!=="}";)t+=a,i=e.at(t);return t;}return t-1;}else if(i.value==="}"){if(n==="backward"){for(;(i==null?void 0:i.mode)==="latex"&&i.value!=="{";)t+=a,i=e.at(t);return t-1;}return t;}return t-1;}if(i.mode==="math"){if(i.isDigit()){for(;(r=e.at(t+a))!=null&&r.isDigit();)t+=a;return n==="backward"?t-1:t;}if(i.style.variant||i.style.variantStyle){var _r87=i.style.variant,_o30=i.style.variantStyle;for(;;){var _n142=e.at(t+a);if(!_n142||_n142.style.variant!==_r87||_n142.style.variantStyle!==_o30)break;t+=a;}return n==="backward"?t-1:t;}return t;}return t;}hf({selectGroup:function selectGroup(e){var t=km(e);return t||e.announce("plonk"),t;},selectAll:function selectAll(e){return e.setSelection(0,e.lastOffset);},extendSelectionForward:function extendSelectionForward(e){return Gp(e,"forward",{extend:!0});},extendSelectionBackward:function extendSelectionBackward(e){return Gp(e,"backward",{extend:!0});},extendToNextWord:function extendToNextWord(e){return Wp(e,"forward",{extend:!0});},extendToPreviousWord:function extendToPreviousWord(e){return Wp(e,"backward",{extend:!0});},extendSelectionUpward:function extendSelectionUpward(e){return Gp(e,"upward",{extend:!0});},extendSelectionDownward:function extendSelectionDownward(e){return Gp(e,"downward",{extend:!0});},extendToNextBoundary:function extendToNextBoundary(e){return Wp(e,"forward",{extend:!0});},extendToPreviousBoundary:function extendToPreviousBoundary(e){return Wp(e,"backward",{extend:!0});},extendToGroupStart:function extendToGroupStart(e){var t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).firstSibling));return t||e.announce("plonk"),t;},extendToGroupEnd:function extendToGroupEnd(e){var t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).lastSibling));return t||e.announce("plonk"),t;},extendToMathFieldStart:function extendToMathFieldStart(e){var t=e.setSelection(e.anchor,0);return t||e.announce("plonk"),t;},extendToMathFieldEnd:function extendToMathFieldEnd(e){var t=e.setSelection(e.anchor,e.lastOffset);return t||e.announce("plonk"),t;}},{target:"model",changeSelection:!0});var jm=null,Mm=0,Nm=function(){function e(){_classCallCheck(this,e);}return _createClass(e,null,[{key:"start",value:function start(t,n,r,i){var a;e.element=t,(a=e.controller)==null||a.abort(),e.controller=new AbortController();var o={signal:e.controller.signal};"PointerEvent"in window?(t.addEventListener("pointermove",r,o),t.addEventListener("pointerup",i,o),t.addEventListener("pointercancel",i,o),Pm(n)&&(e.pointerId=n.pointerId,t.setPointerCapture(n.pointerId))):(window.addEventListener("mousemove",r,o),window.addEventListener("blur",i,o),window.addEventListener("mouseup",i,o));}},{key:"stop",value:function stop(){var t;(t=e.controller)==null||t.abort(),e.controller=void 0,_typeof(e.pointerId)=="number"&&(e.element.releasePointerCapture(e.pointerId),e.pointerId=void 0);}}]);}();function Pm(e){return e!==null&&globalThis.PointerEvent!==void 0&&e instanceof PointerEvent;}function Fm(e,t,n){return e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom;}function Im(e,t,n){return e<t?t:e>n?n:e;}function Lm(e,t){var n,r,i,a,o,s;if(t.buttons>1)return;e.atomBoundsCache?e.atomBoundsCache.clear():e.atomBoundsCache=new Map();var c=e,l,u=!1,d=!1,f="none",p=!1,m=!1,h=t.clientX,g=t.clientY,_=Date.now(),v=c.field,y=setInterval(function(){p?v.scroll({top:0,left:v.scrollLeft-16}):m&&v.scroll({top:0,left:v.scrollLeft+16});},32);function b(){Nm.stop(),u=!1,clearInterval(y),e.element.classList.remove("tracking"),t&&t.preventDefault();}function x(t){if(!c.hasFocus()){b();return;}var n=t.clientX,r=t.clientY,i=Pm(t)&&t.pointerType==="touch"?20:5;if(Date.now()<_+500&&Math.abs(h-n)<i&&Math.abs(g-r)<i){t.preventDefault(),t.stopPropagation();return;}var a=v.getBoundingClientRect();m=n>a.right,p=n<a.left;var o=l;Pm(t)&&(t.isPrimary||(o=Vm(c,t.clientX,t.clientY,{bias:0})));var s=Vm(c,n,r,{bias:n<=h?n===h?0:-1:1});o>=0&&s>=0&&(c.model.extendSelectionTo(o,s),U(e)),d&&km(c.model);}jm&&Math.abs(jm.x-h)<5&&Math.abs(jm.y-g)<5&&Date.now()<jm.time+500?(Mm+=1,jm.time=_):(jm={x:h,y:g,time:_},Mm=1);var S=v.getBoundingClientRect(),ee=(r=(n=e.container)==null?void 0:n.getBoundingClientRect())==null?e.element.getBoundingClientRect():r,C=(a=(i=e.element)==null?void 0:i.getBoundingClientRect())==null?ee:a,w=Fm(h,g,S),te=!w&&ee?Fm(h,g,ee):!1,T=!w&&!te&&C?Fm(h,g,C):!1,ne=w?h:te||T?Im(h,S.left,S.right):h,re=w?g:te||T?Im(g,S.top,S.bottom):g;if(w||te||T){if(e.flushInlineShortcutBuffer(),l=Vm(e,ne,re,{bias:0}),l!==e.model.anchor){var _t205=e.defaultStyle.variantStyle;e.defaultStyle=_t205===void 0?{}:{variantStyle:_t205},e.styleBias="left";}if(l>=0){if(e.element.classList.add("tracking"),t.shiftKey){var _t206=e.model.selectionIsCollapsed;e.model.extendSelectionTo(e.model.anchor,l),f=Nd(e.model)||_t206?"all":"selection";}else if(e.model.at(l).type==="placeholder"||e.model.at(l).type==="prompt"){var _t207=e.model.at(l);_t207.hasChildren&&_t207.firstChild?e.model.position=e.model.offsetOf(_t207.firstChild):e.model.setSelection(l-1,l),f="selection";}else if(((o=e.model.at(l).rightSibling)==null?void 0:o.type)==="placeholder"||((s=e.model.at(l).rightSibling)==null?void 0:s.type)==="prompt"){var _t208=e.model.at(l).rightSibling;_t208.hasChildren&&_t208.firstChild?e.model.position=e.model.offsetOf(_t208.firstChild):e.model.setSelection(l,l+1),f="selection";}else{var _t209=e.model.at(l);if(_t209.captureSelection&&_t209.hasChildren&&_t209.body&&_t209.body.length>0){var _n143=_t209.body.find(function(e){return e.type!=="first";});_n143&&(_n143.type==="placeholder"||_n143.type==="prompt")&&_n143.hasChildren&&_n143.firstChild?(e.model.position=e.model.offsetOf(_n143.firstChild),f="selection"):(e.model.position=l,f=Nd(e.model)?"all":"selection");}else e.model.position=l,f=Nd(e.model)?"all":"selection";}t.detail===3||Mm>2?(b(),(t.detail===3||Mm===3)&&(e.model.selection={ranges:[[0,e.model.lastOffset]]},f="all")):u||(u=!0,Nm.start(v,t,x,b),(t.detail===2||Mm===2)&&(d=!0,km(e.model),f="all"));}e.hasFocus()||(f="none",e.onFocus(),e.model.announce("line"));}else jm=null;e.stopCoalescingUndo(),f!=="none"&&(e.model.selectionIsCollapsed&&(f="all"),U(e)),t.preventDefault();}function Rm(e,t,n){if(e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom)return 0;var r=e-(n.left+n.right)/2,i=t-(n.top+n.bottom)/2;return r*r+i*i;}function zm(e,t,n,r,i){if(!n.id)return[1/0,null];if(t.has(n.id))return t.get(n.id);var a=Lc(e,n);if(!a)return[1/0,null];var o=[1/0,null],s=e.model;if(n instanceof z){var _a43=-1,_s18=1/0;for(var _t210=0;_t210<n.rows.length;_t210++){var _r88=n.rows[_t210];if(!_r88||_r88.length===0)continue;var _o31=1/0,_c11=-1/0;var _iterator131=_createForOfIteratorHelper(_r88),_step131;try{for(_iterator131.s();!(_step131=_iterator131.n()).done;){var _t211=_step131.value;if(_t211){var _iterator132=_createForOfIteratorHelper(_t211),_step132;try{for(_iterator132.s();!(_step132=_iterator132.n()).done;){var _n144=_step132.value;var _t212=Lc(e,_n144);_t212&&(_o31=Math.min(_o31,_t212.top),_c11=Math.max(_c11,_t212.bottom));}}catch(err){_iterator132.e(err);}finally{_iterator132.f();}}}}catch(err){_iterator131.e(err);}finally{_iterator131.f();}if(_o31!==1/0&&_c11!==-1/0){var _e461=void 0;_e461=i<_o31?_o31-i:i>_c11?i-_c11:0,_e461<_s18&&(_s18=_e461,_a43=_t210);}}var _c12=_a43>=0?[n.rows[_a43]]:n.rows;var _iterator133=_createForOfIteratorHelper(_c12),_step133;try{for(_iterator133.s();!(_step133=_iterator133.n()).done;){var _n146=_step133.value;var _iterator135=_createForOfIteratorHelper(_n146),_step135;try{for(_iterator135.s();!(_step135=_iterator135.n()).done;){var _a45=_step135.value;if(_a45){var _iterator136=_createForOfIteratorHelper(_a45),_step136;try{for(_iterator136.s();!(_step136=_iterator136.n()).done;){var _n147=_step136.value;var _a46=zm(e,t,_n147,r,i);_a46[0]<=o[0]&&(o=_a46);}}catch(err){_iterator136.e(err);}finally{_iterator136.f();}}}}catch(err){_iterator135.e(err);}finally{_iterator135.f();}}}catch(err){_iterator133.e(err);}finally{_iterator133.f();}if(!n.isMultiline){var _iterator134=_createForOfIteratorHelper(n.children),_step134;try{for(_iterator134.s();!(_step134=_iterator134.n()).done;){var _a44=_step134.value;var _n145=zm(e,t,_a44,r,i);_n145[0]<=o[0]&&(o=_n145);}}catch(err){_iterator134.e(err);}finally{_iterator134.f();}}}else if(n.hasChildren&&!n.captureSelection&&r>=a.left&&r<=a.right){var _a47=n.children;var _iterator137=_createForOfIteratorHelper(_a47),_step137;try{for(_iterator137.s();!(_step137=_iterator137.n()).done;){var _n148=_step137.value;var _a48=zm(e,t,_n148,r,i);_a48[0]<=o[0]&&(o=_a48);}}catch(err){_iterator137.e(err);}finally{_iterator137.f();}var _iterator138=_createForOfIteratorHelper(n.branches),_step138;try{for(_iterator138.s();!(_step138=_iterator138.n()).done;){var _a49=_step138.value;var _c13=n.branch(_a49);if(!_c13||_c13.length===0)continue;var _l9=Rc(e,[s.offsetOf(_c13[0]),s.offsetOf(_c13[_c13.length-1])]);if(i>=_l9.top&&i<=_l9.bottom){var _iterator139=_createForOfIteratorHelper(_c13),_step139;try{for(_iterator139.s();!(_step139=_iterator139.n()).done;){var _n149=_step139.value;var _a50=zm(e,t,_n149,r,i);_a50[0]<=o[0]&&(o=_a50);}}catch(err){_iterator139.e(err);}finally{_iterator139.f();}}}}catch(err){_iterator138.e(err);}finally{_iterator138.f();}}return o[1]||(o=[Rm(r,i,a),n]),t.set(n.id,o),o;}function Bm(e,t,n){var _zm=zm(e,new Map(),e.model.root,t,n),_zm2=_slicedToArray(_zm,2),r=_zm2[1];return r;}function Vm(e,t,n,r){var i;var a=e.field.querySelector(".ML__latex").getBoundingClientRect();if(!a)return 0;if(t>a.right||n>a.bottom+8)return e.model.lastOffset;if(t<a.left||n<a.top-8)return 0;r=r==null?{}:r,r.bias=(i=r.bias)==null?0:i;var o=Bm(e,t,n),s=[],c=o;for(;c;)s.unshift(c),c=c.parent;for(var _i80=0,_s19=s;_i80<_s19.length;_i80++){var _e462=_s19[_i80];if(_e462.captureSelection){o=_e462;break;}}var l=e.model.offsetOf(o);if(l<0)return-1;if(o.leftSibling){var _n150=o.type==="placeholder"||o.type==="prompt";if(r.bias===0&&!_n150){var _n151=Lc(e,o);_n151&&t<(_n151.left+_n151.right)/2&&(l=e.model.offsetOf(o.leftSibling));}else r.bias<0&&(l=e.model.offsetOf(o.leftSibling));}return l;}var Hm=function(_R2){function Hm(){_classCallCheck(this,Hm);return _callSuper(this,Hm,["math"]);}_inherits(Hm,_R2);return _createClass(Hm,[{key:"onPaste",value:function onPaste(e,t){if(!t||!e.model.contentWillChange({data:_typeof(t)=="string"?t:null,dataTransfer:_typeof(t)=="string"?null:t,inputType:"insertFromPaste"}))return!1;var n="",r="auto",i=_typeof(t)=="string"?"":t.getData("application/json+mathlive");if(i)try{var _t213=JSON.parse(i);if(_t213&&Array.isArray(_t213)){e.snapshot();var _n152=Mu(_t213),_r89=e.model;_r89.selectionIsCollapsed||_r89.deleteAtoms(lc(_r89.selection));var _i81=_r89.at(_r89.position);if(_i81.parent instanceof z){_i81.parentBranch;var _e463=[],_t214=[];_n152[0].type==="first"&&_n152.shift(),_n152[_n152.length-1].type==="first"&&_n152.pop();var _iterator140=_createForOfIteratorHelper(_n152),_step140;try{for(_iterator140.s();!(_step140=_iterator140.n()).done;){var _r91=_step140.value;_r91.type==="first"&&_t214.length>0?(_e463.push(_t214),_t214=[_r91]):_t214.push(_r91);}}catch(err){_iterator140.e(err);}finally{_iterator140.f();}_t214.length>0&&_e463.push(_t214);var _r90=Number(_i81.parentBranch[0]),_a51=Number(_i81.parentBranch[1]),_o32=_i81.parent.maxColumns;for(;_i81.parent.colCount-_a51<_e463.length&&_i81.parent.colCount<_o32;)_i81.parent.addColumn();_i81.parent.addChildrenAfter(_e463[0],_i81);for(var _t215=1;_t215<_e463.length;_t215++)_a51++,_a51>=_o32&&(_a51=0,_i81.parent.addRowAfter(_r90),_r90++),_i81.parent.setCell(_r90,_a51,_e463[_t215]);}else _i81.parent.addChildrenAfter(_n152.filter(function(e){return e.type!=="first";}),_i81);return _r89.position=_r89.offsetOf(_n152[_n152.length-1]),_r89.contentDidChange({inputType:"insertFromPaste"}),U(e),!0;}}catch(e){}if(i=_typeof(t)=="string"?"":t.getData("application/json"),i&&globalThis.MathfieldElement.computeEngine)try{var _e464=JSON.parse(i);if(_typeof(_e464)=="object"&&"latex"in _e464&&_e464.latex&&(n=_e464.latex),!n){var _t216=globalThis.MathfieldElement.computeEngine.box(_e464);_t216&&!_t216.has("Error")&&(n=_t216.latex);}n||(r="latex");}catch(e){}if(!n&&_typeof(t)!="string"&&(n=t.getData("application/x-latex"),n&&(r="latex")),n||(n=_typeof(t)=="string"?t:t.getData("text/plain")),n){var _Cc3,_Cc4;var _t217;return _Cc3=Cc(n),_Cc4=_slicedToArray(_Cc3,2),_t217=_Cc4[0],n=_Cc4[1],r==="auto"&&_t217&&(r="latex"),e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,n,{format:r})&&(e.startRecording(),e.snapshot("paste"),U(e)),e.startRecording(),!0;}return!1;}},{key:"insert",value:function insert(e,t,n){var _Um3,_Um4;var r,i,a,o;var s=_typeof(t)=="string"?t:(i=(r=globalThis.MathfieldElement.computeEngine)==null?void 0:r.box(t).latex)==null?"":i;if(!n.silenceNotifications&&!e.contentWillChange({data:s,inputType:"insertText"}))return!1;n.insertionMode||(n.insertionMode="replaceSelection"),n.selectionMode||(n.selectionMode="placeholder"),n.format||(n.format="auto");var c=e.silenceNotifications;n.silenceNotifications&&(e.silenceNotifications=!0);var l=e.silenceNotifications;e.silenceNotifications=!0;var u={"?":"\\placeholder{}","@":"\\placeholder{}"};u[0]=n.insertionMode==="replaceAll"?"":e.getValue(e.selection,"latex-unstyled"),n.insertionMode==="replaceSelection"?e.deleteAtoms(lc(e.selection)):n.insertionMode==="replaceAll"?e.deleteAtoms():n.insertionMode==="insertBefore"?e.collapseSelection("backward"):n.insertionMode==="insertAfter"&&e.collapseSelection("forward");var d=e.at(e.position);d&&!d.isLastSibling&&((a=e.at(e.position+1))==null?void 0:a.type)==="placeholder"?e.deleteAtoms([e.position,e.position+1]):(d==null?void 0:d.type)==="placeholder"&&e.deleteAtoms([e.position-1,e.position]);var f=-1;u[0]?u["@"]=u[0]:_typeof(t)=="string"&&/(^|[^\\])#@/.test(t)&&(f=Gm(e),f>=0&&(u["@"]=e.getValue(f,e.position,"latex"))),u[0]||(u[0]=u["?"]);var p=!1,m=function m(e){return p=!0,u[e];},_Um=Um(e,t,m,n),_Um2=_slicedToArray(_Um,2),h=_Um2[0],g=_Um2[1];if(!g)return!1;var _=g.length===1&&g[0].type==="genfrac",v=e.at(e.position);_&&f>=0&&_typeof(e.mathfield.options.isImplicitFunction)=="function"&&v&&e.mathfield.options.isImplicitFunction(v.command)&&(u["@"]=u["?"],p=!1,_Um3=Um(e,t,m,n),_Um4=_slicedToArray(_Um3,2),h=_Um4[0],g=_Um4[1]);var y=e.position;if(g.length===1&&g[0].isRoot)e.root=g[0];else{var _n153=e.at(e.position),_r92=(o=_n153==null?void 0:_n153.parent)==null?e.root:o,_i82=_r92.hasEmptyBranch("body");if(_&&h!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&_r92 instanceof B&&_r92.leftDelim==="("&&_i82){var _e465=_r92.parent,_t218=_r92.parentBranch;_e465.removeChild(_r92),_e465.setChildren(g,_t218);}var _a52=e.at(e.position);if(_a52)_a52.parent.addChildrenAfter(g,_a52);else{var _e466=_r92.branch("body"),_t219=_e466==null?void 0:_e466[0];_t219?_r92.addChildrenAfter(g,_t219):_r92.setChildren(g,"body");}if(f>=0){e.deleteAtoms([f,y]);var _t220=e.root.branch("body");if(_t220){var _iterator141=_createForOfIteratorHelper(_t220),_step141;try{for(_iterator141.s();!(_step141=_iterator141.n()).done;){var _n154=_step141.value;_n154.parent!==e.root&&(_n154.parent=e.root,_n154.parentBranch="body");}}catch(err){_iterator141.e(err);}finally{_iterator141.f();}}}h==="latex"&&_typeof(t)=="string"&&(_r92==null?void 0:_r92.type)==="root"&&_i82&&!p&&(_r92.verbatimLatex=t);}e.silenceNotifications=l;var b=g[g.length-1];if(n.selectionMode==="placeholder"){var _t221;if(g.length===1&&g[0].type==="genfrac"){var _e467=g[0].branch("above");if(_t221=_e467==null?void 0:_e467.find(function(e){return e.type==="placeholder";}),!_t221){var _e468=g[0].branch("below");_t221=_e468==null?void 0:_e468.find(function(e){return e.type==="placeholder";});}}if(_t221||(_t221=g.flatMap(function(e){return[e].concat(_toConsumableArray(e.children));}).find(function(e){return e.type==="placeholder";})),_t221){var _n155=e.offsetOf(_t221);e.setSelection(_n155-1,_n155),e.announce("move");}else if(b){var _t222=b.body,_n156=b.hasEmptyBranch("body");_t222&&_n156?e.setSelection(e.offsetOf(_t222[0]),e.offsetOf(_t222[_t222.length-1])+1):e.position=e.offsetOf(b);}}else n.selectionMode==="before"||(n.selectionMode==="after"?b&&(e.position=e.offsetOf(b)):n.selectionMode==="item"&&e.setSelection(e.anchor,e.offsetOf(b)));return e.contentDidChange({data:s,inputType:"insertText"}),e.silenceNotifications=c,!0;}}]);}(R);function Um(e,t,n,r){var _c14,_c15,_c16,_c17,_Cc5,_Cc6;var i;var a,o=[];if(_typeof(t)!="string"||r.format==="math-json"){var _ref9;var _n157=globalThis.MathfieldElement.computeEngine;if(!_n157)return["math-json",[]];_ref9=["latex",_n157.box(t).latex],a=_ref9[0],t=_ref9[1],o=eu(t,{context:e.mathfield.context});}else _typeof(t)=="string"&&r.format==="ascii-math"?(_c14=_c(t,{format:"ascii-math",inlineShortcuts:e.mathfield.options.inlineShortcuts}),_c15=_slicedToArray(_c14,2),a=_c15[0],t=_c15[1],o=eu(t,{context:e.mathfield.context}),a!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&(o=o.map(function(e){return Wm(e);}))):(r.format==="auto"||(i=r.format)!=null&&i.startsWith("latex"))&&(r.format==="auto"&&(_c16=_c(t,{format:"auto",inlineShortcuts:e.mathfield.options.inlineShortcuts}),_c17=_slicedToArray(_c16,2),a=_c17[0],t=_c17[1],_c16),r.format==="latex"&&(_Cc5=Cc(t),_Cc6=_slicedToArray(_Cc5,2),t=_Cc6[1],_Cc5),o=eu(t,{context:e.mathfield.context,args:n}),r.format!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&(o=o.map(function(e){return Wm(e);})));return Pu(o,r.style),[a==null?"latex":a,o];}function Wm(e){var t;if(e instanceof B&&e.leftDelim!=="("&&e.rightDelim===")"){var _n158=(t=e.body)==null?void 0:t.filter(function(e){return e.type!=="first";});if((_n158==null?void 0:_n158.length)===1&&_n158[0].type==="genfrac")return _n158[0];}var _iterator142=_createForOfIteratorHelper(e.branches),_step142;try{for(_iterator142.s();!(_step142=_iterator142.n()).done;){var _t223=_step142.value;e.hasEmptyBranch(_t223)||e.setChildren(e.branch(_t223).map(function(e){return Wm(e);}),_t223);}}catch(err){_iterator142.e(err);}finally{_iterator142.f();}return e instanceof z&&e.forEachCell(function(t,n,r){e.setCell(n,r,t.map(function(e){return Wm(e);}));}),e;}function Gm(e){var t=e.at(e.position);if(!t)return-1;if(t.mode==="text"){for(;!t.isFirstSibling&&t.mode==="text";)t=t.leftSibling;return e.offsetOf(t);}var n=t,r=!1;if(t.type==="mclose"){var _e469=sl[t.value];for(;!t.isFirstSibling&&!(t.type==="mopen"&&t.value===_e469);){var _e470=t.leftSibling;if(!_e470)break;t=_e470;}if(!t.isFirstSibling){var _e471=t.leftSibling;_e471&&(t=_e471);}r=!0;}else if(t.type==="leftright"){var _e472=t.leftSibling;_e472&&(t=_e472),r=!0;}if(r)for(;!t.isFirstSibling&&(t.isFunction||qm(t));){var _e473=t.leftSibling;if(!_e473)break;t=_e473;}else{var _e474=[];for(;!t.isFirstSibling&&(qm(t)||_e474.length>0);){t.type==="mclose"&&_e474.unshift(t.value),t.type==="mopen"&&_e474.length>0&&t.value===sl[_e474[0]]&&_e474.shift();var _n159=t.leftSibling;if(!_n159)break;t=_n159;}}return n===t?-1:e.offsetOf(t);}function Km(e){if(e.type==="mord"&&e.value==="e"){var _t224=e.leftSibling;if(_t224&&_t224.isDigit())return!0;}if(e.type==="mbin"&&(e.value==="+"||e.value==="-"||e.value==="\u2212")){var _t225=e.leftSibling,_n160=e.rightSibling;if((_t225==null?void 0:_t225.type)==="mord"&&_t225.value==="e"&&_n160&&_n160.isDigit()){var _e475=_t225.leftSibling;if(_e475&&_e475.isDigit())return!0;}}if(e.type==="subsup"){var _t226=e.leftSibling;if(_t226&&_t226.isDigit()&&_t226.value==="0"){var _e476=_t226.leftSibling;if(_e476&&_e476.isDigit()&&_e476.value==="1"){var _t227=_e476.leftSibling;if((_t227==null?void 0:_t227.type)==="mbin"&&(_t227.value==="\xD7"||_t227.value==="\\times")){var _e477=_t227.leftSibling;if(_e477&&_e477.isDigit())return!0;}}}}if(e.isDigit()&&e.value==="0"){var _t228=e.leftSibling,_n161=e.rightSibling;if(_t228&&_t228.isDigit()&&_t228.value==="1"&&(_n161==null?void 0:_n161.type)==="subsup"){var _e478=_t228.leftSibling;if((_e478==null?void 0:_e478.type)==="mbin"&&(_e478.value==="\xD7"||_e478.value==="\\times")){var _t229=_e478.leftSibling;if(_t229&&_t229.isDigit())return!0;}}}if(e.isDigit()&&e.value==="1"){var _t230=e.rightSibling;if(_t230&&_t230.isDigit()&&_t230.value==="0"){var _n162=_t230.rightSibling;if((_n162==null?void 0:_n162.type)==="subsup"){var _t231=e.leftSibling;if((_t231==null?void 0:_t231.type)==="mbin"&&(_t231.value==="\xD7"||_t231.value==="\\times")){var _e479=_t231.leftSibling;if(_e479&&_e479.isDigit())return!0;}}}}if(e.type==="mbin"&&(e.value==="\xD7"||e.value==="\\times")){var _t232=e.leftSibling,_n163=e.rightSibling;if(_t232&&_t232.isDigit()&&_n163&&_n163.isDigit()&&_n163.value==="1"){var _e480=_n163.rightSibling;if(_e480&&_e480.isDigit()&&_e480.value==="0"){var _t233=_e480.rightSibling;if((_t233==null?void 0:_t233.type)==="subsup")return!0;}}}return!1;}function qm(e){return e.isDigit()||Km(e)?!0:e.type&&/^(mord|surd|subsup|leftright|mop|mclose)$/.test(e.type)?e.type!=="extensible-symbol":!1;}new Hm();var Jm=function(_R3){function Jm(){_classCallCheck(this,Jm);return _callSuper(this,Jm,["text"]);}_inherits(Jm,_R3);return _createClass(Jm,[{key:"onPaste",value:function onPaste(e,t){if(!t)return!1;var n=_typeof(t)=="string"?t:t.getData("text/plain");return n&&e.model.contentWillChange({inputType:"insertFromPaste",data:n})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,n)&&(e.model.contentDidChange({inputType:"insertFromPaste"}),e.startRecording(),e.snapshot("paste"),U(e)),e.startRecording(),!0):!1;}},{key:"insert",value:function insert(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!e.contentWillChange({data:t,inputType:"insertText"}))return!1;n.insertionMode||(n.insertionMode="replaceSelection"),n.selectionMode||(n.selectionMode="placeholder"),n.format||(n.format="auto");var r=e.silenceNotifications;n.silenceNotifications&&(e.silenceNotifications=!0);var i=e.silenceNotifications;e.silenceNotifications=!0,n.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(lc(e.selection)):n.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):n.insertionMode==="insertBefore"?e.collapseSelection("backward"):n.insertionMode==="insertAfter"&&e.collapseSelection("forward");var a=Ym(t,e.mathfield.context);if(Pu(a,n.style),!a)return!1;var o=e.at(e.position),s=o.parent.addChildrenAfter(a,o);return e.silenceNotifications=i,n.selectionMode==="before"||(n.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(s)):s&&(e.position=e.offsetOf(s))),e.contentDidChange({data:t,inputType:"insertText"}),e.silenceNotifications=r,!0;}}]);}(R);function Ym(e,t){if(e.includes("$")){var _n164=[],_r93=0,_i83=!1,_a53="";for(;_r93<e.length;)e[_r93]==="$"?_r93+1<e.length&&e[_r93+1]==="$"?(!_i83&&_a53?(_n164.push(Xm(_a53)),_a53=""):_i83&&_a53&&(_n164.push(_a53),_a53=""),_n164.push("$$"),_i83=!_i83,_r93+=2):(!_i83&&_a53?(_n164.push(Xm(_a53)),_a53=""):_i83&&_a53&&(_n164.push(_a53),_a53=""),_n164.push("$"),_i83=!_i83,_r93+=1):(_a53+=e[_r93],_r93+=1);return _a53&&(_i83?_n164.push(_a53):_n164.push(Xm(_a53))),eu(_n164.join(""),{context:t,parseMode:"text"});}return eu(Xm(e),{context:t,parseMode:"text"});}function Xm(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(/\u00a3/g,"\\textsterling "),e;}new Jm();function Zm(e){return{value:e.model.getValue(),selectionIsCollapsed:e.model.selectionIsCollapsed,canUndo:e.canUndo(),canRedo:e.canRedo(),style:Qm(e.model),mode:e.model.mode};}function Qm(e){var t;if(e.selectionIsCollapsed)return(t=e.at(e.position))==null?void 0:t.style;var n=e.getAtoms(e.selection);if(n.length===0)return{};var r=c({},n[0].style);var _iterator143=_createForOfIteratorHelper(n),_step143;try{for(_iterator143.s();!(_step143=_iterator143.n()).done;){var _e481=_step143.value;for(var _i84=0,_Object$entries2=Object.entries(_e481.style);_i84<_Object$entries2.length;_i84++){var _Object$entries2$_i=_slicedToArray(_Object$entries2[_i84],2),_t234=_Object$entries2$_i[0],_n165=_Object$entries2$_i[1];r[_t234]!==_n165&&delete r[_t234];}}}catch(err){_iterator143.e(err);}finally{_iterator143.f();}return r;}var W=4,$m=20,G=2*($m+W),eh=function eh(e,t){return"\n <line x1=\"".concat(e+$m,"\" y1=\"").concat(t+$m,"\" \n x2=\"").concat(e>t?e+$m:7*$m+10*W,"\" \n y2=\"").concat(e<t?t+$m:7*$m+10*W,"\"/>\n <svg id=\"plus\" viewBox=\"0 0 40 40\" x=\"").concat(e,"\" y=\"").concat(t,"\" width=\"40\" height=\"40\">\n <circle class=\"cls-2\" cx=\"20\" cy=\"20\" r=\"20\"/>\n <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\"/>\n </svg>");},th=function th(e,t){return"\n <line x1=\"".concat(e+$m,"\" y1=\"").concat(t+$m,"\" \n x2=\"").concat(e>t?e+$m:7*$m+10*W,"\" \n y2=\"").concat(e<t?t+$m:7*$m+10*W,"\"/>\n <svg id=\"minus\" viewBox=\"0 0 40 40\" x=\"").concat(e,"\" y=\"").concat(t,"\" width=\"40\" height=\"40\">\n <circle class=\"cls-2\" cx=\"20\" cy=\"20\" r=\"20\"/>\n <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\"/>\n </svg>");},nh=function nh(e,t,n){return"\n <svg id=\"arrow\" viewBox=\"0 0 40 40\" x=\"".concat(e,"\" y=\"").concat(t,"\" width=\"40\" height=\"40\">\n <circle class=\"cls-2\" cx=\"20\" cy=\"20\" r=\"20\"/>\n <g transform=\"rotate(").concat(n,")\" transform-origin=\"20 20\">\n <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\"/>\n </g> \n </svg>");},rh="\n<svg class=\"MLEP__array-buttons\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" \nviewBox=\n\"-2 -2 ".concat(8*$m+10*W+5," ").concat(8*$m+10*W+5,"\">\n <rect \n class=\"MLEP__array-insert-background rows\"\n x=\"0\" \n y=\"").concat(G+W,"\" \n height=\"").concat(3*G,"\" \n width=\"").concat(G,"\" \n rx=\"").concat(G/2,"\"/>\n <rect \n class=\"MLEP__array-insert-background columns\"\n x=\"").concat(G+W,"\" \n y=\"0\" \n height=\"").concat(G,"\" \n width=\"").concat(3*G,"\" \n rx=\"").concat(G/2,"\"/>\n <g data-command='\"moveDown\"'>\n ").concat(nh(2*(W+G),2*W+3*G,0),"\n </g>\n <g data-command='\"moveUp\"'>\n ").concat(nh(2*(W+G),2*W+G,180),"\n </g>\n <g data-command='\"moveToNextWord\"'>\n ").concat(nh(2*W+3*G,2*(W+G),-90),"\n </g>\n <g data-command='\"moveToPreviousWord\"'>\n ").concat(nh(2*W+G,2*(W+G),90),"\n </g>\n <g>\n\n <g data-command='\"addColumnBefore\"'>\n ").concat(eh(2*W+G,W),"\n </g>\n <g data-command='\"removeColumn\"'>\n ").concat(th(2*W+2*G,W),"\n </g>\n <g data-command='\"addColumnAfter\"'>\n ").concat(eh(2*W+3*G,W),"\n </g>\n <g data-command='\"addRowBefore\"'>\n ").concat(eh(W,2*W+G),"\n </g>\n <g data-command='\"removeRow\"'>\n ").concat(th(W,2*W+2*G),"\n </g>\n <g data-command='\"addRowAfter\"'>\n ").concat(eh(W,2*W+3*G),"\n </g>\n</svg>"),ih=function ih(e){return"\n<svg id=\"matrix\" class=\"".concat(e,"\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 28 24\" \n data-command='[\"setEnvironment\",\"matrix\"]'>\n <rect class=\"cls-1\" width=\"28\" height=\"24\"/>\n <circle cx=\"10\" cy=\"8\" r=\"1\"/>\n <circle cx=\"14\" cy=\"12\" r=\"1\"/>\n <circle cx=\"18\" cy=\"16\" r=\"1\"/></svg>");},ah=function ah(e){return"\n<svg id=\"pmatrix\" class=\"".concat(e,"\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 28 24\" \ndata-command='[\"setEnvironment\",\"pmatrix\"]'>\n <rect class=\"cls-1\" width=\"28\" height=\"24\"/>\n <path class=\"cls-2\" d=\"m6,4c-3.96,4.6-3.96,11.4,0,16\"/>\n <path class=\"cls-2\" d=\"m22,4c3.96,4.6,3.96,11.4,0,16\"/>\n <circle cx=\"10\" cy=\"8\" r=\"1\"/>\n <circle cx=\"14\" cy=\"12\" r=\"1\"/>\n <circle cx=\"18\" cy=\"16\" r=\"1\"/></svg>");},oh=function oh(e){return"\n<svg id=\"Bmatrix\" class=\"".concat(e,"\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 28 24\" \n data-command='[\"setEnvironment\",\"Bmatrix\"]'>\n <rect class=\"cls-1\" width=\"28\" height=\"24\"/>\n <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\"/>\n <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\"/>\n <circle cx=\"10\" cy=\"8\" r=\"1\"/>\n <circle cx=\"14\" cy=\"12\" r=\"1\"/>\n <circle cx=\"18\" cy=\"16\" r=\"1\"/>\n</svg>");},sh=function sh(e){return"\n<svg id=\"bmatrix\" class=\"".concat(e,"\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 28 24\" \n data-command='[\"setEnvironment\",\"bmatrix\"]'>\n <rect class=\"cls-1\" width=\"28\" height=\"24\"/>\n <path class=\"cls-2\" d=\"m6,4h-3v16h3\"/>\n <path class=\"cls-2\" d=\"m22,4h3v16h-3\"/>\n <circle cx=\"10\" cy=\"8\" r=\"1\"/>\n <circle cx=\"14\" cy=\"12\" r=\"1\"/>\n <circle cx=\"18\" cy=\"16\" r=\"1\"/>\n</svg>");},ch=function ch(e){return"\n<svg id=\"vmatrix\" class=\"".concat(e,"\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 28 24\" \n data-command='[\"setEnvironment\",\"vmatrix\"]'>\n <rect class=\"cls-1\" width=\"28\" height=\"24\"/>\n <circle cx=\"10\" cy=\"8\" r=\"1\"/>\n <circle cx=\"14\" cy=\"12\" r=\"1\"/>\n <circle cx=\"18\" cy=\"16\" r=\"1\"/>\n <line class=\"cls-2\" x1=\"4\" y1=\"4\" x2=\"4\" y2=\"20\"/>\n <line class=\"cls-2\" x1=\"24\" y1=\"4\" x2=\"24\" y2=\"20\"/>\n</svg>");},lh=function lh(e){return"\n<svg id=\"Vmatrix\" class=\"".concat(e,"\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-3.5 -3 35 30\" \n data-command='[\"setEnvironment\",\"Vmatrix\"]'>\n <rect class=\"cls-1\" width=\"28\" height=\"24\"/>\n <circle cx=\"10\" cy=\"8\" r=\"1\"/>\n <circle cx=\"14\" cy=\"12\" r=\"1\"/>\n <circle cx=\"18\" cy=\"16\" r=\"1\"/>\n <line class=\"cls-2\" x1=\"6\" y1=\"4\" x2=\"6\" y2=\"20\"/>\n <line class=\"cls-2\" x1=\"22\" y1=\"4\" x2=\"22\" y2=\"20\"/>\n <line class=\"cls-2\" x1=\"2\" y1=\"4\" x2=\"2\" y2=\"20\"/>\n <line class=\"cls-2\" x1=\"26\" y1=\"4\" x2=\"26\" y2=\"20\"/>\n</svg>");},uh=function uh(e){return"\n<svg id=\"cases\" class=\"".concat(e,"\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 28 24\" \n data-command='[\"setEnvironment\",\"cases\"]'>\n <rect class=\"cls-1\" width=\"28\" height=\"24\"/>\n <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\"/>\n <circle cx=\"13\" cy=\"8\" r=\"1\"/>\n <circle cx=\"13\" cy=\"16\" r=\"1\"/>\n <circle cx=\"21\" cy=\"8\" r=\"1\"/>\n <circle cx=\"21\" cy=\"16\" r=\"1\"/>\n</svg>");},dh=function dh(e){return"\n<svg id=\"rcases\" class=\"".concat(e,"\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 28 24\" \n data-command='[\"setEnvironment\",\"rcases\"]'>\n <rect class=\"cls-1\" width=\"28\" height=\"24\"/>\n <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\"/>\n <circle cx=\"15\" cy=\"8\" r=\"1\"/>\n <circle cx=\"15\" cy=\"16\" r=\"1\"/>\n <circle cx=\"7\" cy=\"8\" r=\"1\"/>\n <circle cx=\"7\" cy=\"16\" r=\"1\"/>\n</svg>");},fh={matrix:ih,pmatrix:ah,bmatrix:sh,Bmatrix:oh,vmatrix:ch,Vmatrix:lh},ph={cases:uh,rcases:dh,Bmatrix:oh};function mh(e){var t,n;var r=(t=e.model.parentEnvironment)==null?void 0:t.rows;if(!r)return;var i=0;r.forEach(function(e){(!i||e.length>i)&&(i=e.length);});var a=document.getElementById("mathlive-environment-popover");a||(a=Fd("mathlive-environment-popover"),rl("environment-popover"),rl("core"),a.setAttribute("aria-hidden","true"));var o,s=a.querySelector(".MLEP__environment-controls");s?o=s:(o=document.createElement("div"),a.innerHTML="",a.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=rh;var c=[],l="",f=e.model.parentEnvironment.environmentName;if(jl(f)){var _e482=vh(f);l=fh[_e482]("active");var _t235=fh,_n166=_t235[_e482],_r94=d(_t235,[u(_e482)]);c=Object.values(_r94).map(function(e){return e("inactive");});}else if(Ml(f)){var _e483=yh(f);l=ph[_e483]("active");var _t236=ph,_n167=_t236[_e483],_r95=d(_t236,[u(_e483)]);c=Object.values(_r95).map(function(e){return e("inactive");});}else Nl(f)&&(l=fh.matrix("active"),c=Object.values(ph).map(function(e){return e("inactive");}));var p=document.createElement("div");p.className="MLEP__environment-delimiter-controls",p.style.display="flex",p.style.flexDirection="column",p.innerHTML="\n <div class='MLEP__array-delimiter-options'>\n ".concat(l,"\n ").concat(c.join(""),"\n </div>"),l&&o.appendChild(p),o.querySelectorAll("[data-command]").forEach(function(t){var n=t.dataset.command,r=n;try{r=JSON.parse(n);}catch(e){}t.addEventListener("mousedown",function(e){return e.preventDefault();}),r&&t.addEventListener("click",function(){return e.executeCommand(r);});});var m=(n=e.field)==null?void 0:n.getBoundingClientRect();m&&(a.style.top="".concat(window.scrollY+(m.top-a.clientHeight-15),"px"),a.style.left="".concat(m.left+20,"px"),a.classList.add("is-visible"));}function hh(){var e=document.getElementById("mathlive-environment-popover");e==null||e.classList.remove("is-visible");}function gh(){document.getElementById("mathlive-environment-popover")&&(Id("mathlive-environment-popover"),il("environment-popover"),il("core"));}function _h(e){if(!e.hasFocus())return;var t=!1;if(e.model.mode==="math"){var _n168=e.model.parentEnvironment;if(_n168!=null&&_n168.rows&&Al(_n168.environmentName)){var _n169=e.options.environmentPopoverPolicy;t=_n169==="auto"||_n169==="on";}}t?mh(e):hh();}function vh(e){return e.replace("*","");}function yh(e){return e==="dcases"?"cases":e;}function bh(e){var t=getComputedStyle(e).direction;return t==="ltr"||t==="rtl"?t:"ltr";}function xh(e,t,n){return t==="left"||t==="leading"&&n==="ltr"||t==="trailing"&&n==="rtl"?e.left:e.right;}function Sh(e,t,n,r){return n==="middle"?e-t/2:n==="start"&&r==="rtl"||n==="end"&&r==="ltr"||n==="top"||n==="right"?Math.max(0,e-t):e;}function Ch(e,t,n,r){return n==="middle"?e-t/2:n==="start"&&r==="ltr"||n==="end"&&r==="rtl"||n==="top"||n==="right"?e:e-t;}function wh(e,t){var n,r,i;var a=(n=bh(e))==null?"ltr":n;e.style.position="fixed",e.style.left="",e.style.top="",e.style.right="",e.style.bottom="",e.style.height="",e.style.width="";var o=e.getBoundingClientRect(),s=Number.isFinite(t.maxHeight)?Math.min(t.maxHeight,window.innerHeight):window.innerHeight,c=Math.min(s,(r=t.height)==null?o.height:r),l=Sh(t.location.y,c,t.verticalPos,a);l+c>window.innerHeight-8&&(t.alternateLocation?(l=Sh(t.alternateLocation.y,c,t.verticalPos,a),l+c>window.innerHeight-8&&(l=void 0)):l=void 0),Number.isFinite(l)||(l=Math.max(8,window.innerHeight-8-c),8+c>window.innerHeight-8&&(e.style.bottom="8px")),c=Math.min(l+c,window.innerHeight-8)-l;var u=Number.isFinite(t.maxWidth)?Math.min(t.maxWidth,window.innerWidth):window.innerWidth,d=Math.min(u,(i=t.width)==null?o.width:i),f=Sh(t.location.x,d,t.horizontalPos,a);f+d>window.innerWidth-8&&(t.alternateLocation?(f=Ch(t.alternateLocation.x,d,t.verticalPos,a),f+d>window.innerWidth-8&&(f=void 0)):f=void 0),Number.isFinite(f)||(f=Math.max(8,window.innerWidth-8-d),8+d>window.innerWidth-8&&(e.style.right="8px")),d=Math.min(f+d,window.innerWidth-8)-f,a==="rtl"?e.style.right="".concat(Math.ceil(window.innerWidth-f-d).toString(),"px"):e.style.left="".concat(Math.ceil(f).toString(),"px"),e.style.top="".concat(Math.ceil(l).toString(),"px"),c!==o.height&&(e.style.height="".concat(Math.ceil(c).toString(),"px")),d!==o.width&&(e.style.width="".concat(Math.ceil(d).toString(),"px"));}function Th(e,t){return Math.hypot(t.x-e.x,t.y-e.y);}function Eh(e){return"submenu"in e;}function Dh(e){return"type"in e&&e.type==="command"||"onMenuSelect"in e||"id"in e;}function Oh(e){return"type"in e&&e.type==="divider";}function kh(e){return"type"in e&&e.type==="heading";}var Ah={};function jh(e){var t=Ah[e];if(!t){var _n170;switch(e){case"checkmark":_n170="<span aria-hidden=\"true\" class=\"ui-checkmark\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><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>\n </span>";break;case"trailing-chevron":_n170="<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":_n170="<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(_n170){var _r96=document.createElement("template");_r96.innerHTML=_n170,Ah[e]=_r96,t=_r96;}}if(t){if("content"in t)return t.content.cloneNode(!0);var _e484=document.createElement("svg");return _e484.innerHTML=t.innerHTML,_e484;}}var Mh=80,Nh=function(){function Nh(e,t){_classCallCheck(this,Nh);this._className="",this._element=null;var n;this.parentMenu=t,this._declaration=e,Object.freeze(this._declaration),Eh(e)?(this.type="submenu",this.submenu=new Ih(e.submenu,{parentMenu:t,submenuClass:e.submenuClass,columnCount:e.columnCount})):this.type=(n=e.type)==null?"command":n,this.hasCheck=Dh(e)&&e.checked!==void 0;}return _createClass(Nh,[{key:"rootMenu",get:function get(){return this.parentMenu.rootMenu;}},{key:"abortController",get:function get(){return this._abortController||(this._abortController=new AbortController()),this._abortController;}},{key:"dispose",value:function 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;}},{key:"menuItem",get:function get(){return this._declaration;}},{key:"label",get:function get(){var e;return(e=this._label)==null?"":e;},set:function set(e){e===void 0&&(e=""),e!==this._label&&(this._label=e,this.dirty=!0);}},{key:"visible",get:function get(){return this._visible;},set:function set(e){e!==this._visible&&(this._visible=e,this.dirty=!0);}},{key:"enabled",get:function get(){return this._enabled;},set:function set(e){this._enabled=e,this.element&&(e?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")),this.dirty=!0;}},{key:"checked",get:function get(){return this._checked;},set:function set(e){this._checked=e,this.dirty=!0;}},{key:"tooltip",get:function get(){return this._tooltip;},set:function set(e){e!==this._tooltip&&(this._tooltip=e,this.dirty=!0);}},{key:"ariaLabel",get:function get(){return this._ariaLabel;},set:function set(e){e!==this._ariaLabel&&(this._ariaLabel=e,this.dirty=!0);}},{key:"active",get:function get(){var e,t;return(t=(e=this.element)==null?void 0:e.classList.contains("active"))==null?!1:t;},set:function set(e){this.element&&this.element.classList.toggle("active",e);}},{key:"updateState",value:function updateState(e){var t,n,r;var i=this._declaration;if(Oh(i)){this.enabled=!1,this.checked=!1;return;}kh(i)&&(this.enabled=!1,this.checked=!1,this.visible=!0),Dh(i)&&(this.checked=(t=Fh(i.checked,e))==null?!1:t),(Dh(i)||Eh(i))&&(this.enabled=(n=Fh(i.enabled,e))==null?!0:n,this.visible=(r=Fh(i.visible,e))==null?!0:r,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(e),this.submenu.visible||(this.visible=!1))),(Dh(i)||kh(i)||Eh(i))&&(this.label=Fh(i.label,e),this._className=Fh(i.class,e),this.tooltip=Fh(i.tooltip,e),this.ariaLabel=Fh(i.ariaLabel,e)),this._element&&this.updateElement();}},{key:"dirty",set:function set(e){e&&this.parentMenu&&(this.parentMenu.dirty=!0);}},{key:"updateElement",value:function updateElement(){var e;if(!this.visible||!this.element)return;var 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(jh("checkmark"))):this.checked==="mixed"?(t.setAttribute("aria-checked","mixed"),t.append(jh("mixedmark"))):t.removeAttribute("aria-checked"),this.ariaLabel&&t.setAttribute("aria-label",this.ariaLabel);var n=document.createElement("span");if(n.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&n.classList.add("heading"),n.innerHTML=this.label,t.append(n),this._tooltip&&t.setAttribute("data-tooltip",this._tooltip),Dh(this._declaration)&&this._declaration.keyboardShortcut){var _e485=document.createElement("kbd");_e485.innerHTML=id(this._declaration.keyboardShortcut),t.append(_e485);}this.type==="submenu"&&t.append(jh("trailing-chevron"));}},{key:"element",get:function get(){if(this._element)return this._element;if(Oh(this._declaration)){var _e486=document.createElement("li");return _e486.setAttribute("part","menu-divider"),_e486.setAttribute("role","divider"),this._element=_e486,_e486;}var e=document.createElement("li");this._element=e,(Dh(this._declaration)||kh(this._declaration)||Eh(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"));var 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;}},{key:"dispatchSelect",value:function dispatchSelect(){var e;if(!Dh(this._declaration))return;var 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?void 0:e,modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data});}},{key:"handleEvent",value:function handleEvent(e){var _this35=this;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"){var _n171=e;this.rootMenu.cancelDelayedOperation(),this.parentMenu.isSubmenuOpen&&(t=this.parentMenu.activeMenuItem)!=null&&t.movingTowardSubmenu(_n171)?this.rootMenu.scheduleOperation(function(){_this35.parentMenu.activeMenuItem=_this35,_this35.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;}}}},{key:"select",value:function select(){var _this36=this;if(this.rootMenu.cancelDelayedOperation(),this.type==="submenu"){this.openSubmenu();return;}this.active=!1,setTimeout(function(){_this36.active=!0,setTimeout(function(){_this36.active=!1,_this36.rootMenu.hide(),_this36.dispatchSelect();},Mh);},Mh);}},{key:"openSubmenu",value:function openSubmenu(e){var _this37=this;var t;if(this.type!=="submenu"||!this.element)return;if((t=e==null?void 0:e.withDelay)!=null&&t){this.rootMenu.scheduleOperation(function(){return _this37.openSubmenu();});return;}var n=this.element.getBoundingClientRect(),r=bh(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:xh(n,"trailing",r),y:n.top-4},alternateLocation:{x:xh(n,"leading",r),y:n.top-4}});}},{key:"movingTowardSubmenu",value:function movingTowardSubmenu(e){if(!this.element||this.type!=="submenu")return!1;var t=this.rootMenu.lastMoveEvent;if(!t)return!1;var n=e.timeStamp-t.timeStamp;if(n>500)return!1;var r=e.clientX-t.clientX;if(Ph(r,t.clientY-e.clientY,n)<=.2)return!1;var i="right";if(this.submenu.element){var _e487=this.submenu.element.getBoundingClientRect(),_t237=this.element.getBoundingClientRect();_e487.left<_t237.left+_t237.width/2&&(i="left");}return i==="right"?r>0:r<0;}}]);}();function Ph(e,t,n){return Math.hypot(e,t)/n;}function Fh(e,t){return e===void 0||_typeof(e)!="function"?e:(t!=null||(t={alt:!1,control:!1,shift:!1,meta:!1}),e(t));}var Ih=function(){function e(_e488,t){_classCallCheck(this,e);this._element=null,this._activeMenuItem=null,this._dirty=!0;var n,r;this.parentMenu=(n=t==null?void 0:t.parentMenu)==null?null:n,this._submenuClass=t==null?void 0:t.submenuClass,this.columnCount=(r=t==null?void 0:t.columnCount)==null?1:r,this.isSubmenuOpen=!1,this.menuItems=_e488;}return _createClass(e,[{key:"children",get:function get(){return Object.freeze(_toConsumableArray(this._menuItems));}},{key:"menuItems",set:function set(_e489){var _this38=this;var t=this.parentMenu;this.dispose(),this.parentMenu=t,_e489=_toConsumableArray(_e489),this._menuItems=_e489.map(function(_e490){return _e490.onCreate?_e490.onCreate(_e490,_this38):new Nh(_e490,_this38);}),this.hasCheck=void 0,this.dirty=!0;}},{key:"dispose",value:function dispose(){var _e491;this.hide(),this._element&&this._element.remove(),this._abortController&&this._abortController.abort(),(_e491=this._menuItems)==null||_e491.forEach(function(_e492){return _e492.dispose();}),this._menuItems=[],this._activeMenuItem=null,this.parentMenu=null;}},{key:"handleEvent",value:function handleEvent(_e493){if(_e493.type==="wheel"&&this._element){var _t238=_e493;this._element.scrollBy(0,_t238.deltaY),_e493.stopPropagation();}}},{key:"dispatchEvent",value:function dispatchEvent(_e494){return this.rootMenu.dispatchEvent(_e494);}},{key:"host",get:function get(){return this.rootMenu.host;}},{key:"rootMenu",get:function get(){return this.parentMenu.rootMenu;}},{key:"updateState",value:function updateState(_e495){var t,n,r;this._menuItems.forEach(function(t){return t.updateState(_e495);});var i=this.hasCheck;this.hasCheck=this._menuItems.some(function(_e496){return _e496.visible&&_e496.hasCheck;}),this.hasCheck!==i&&this._menuItems.forEach(function(t){return t.updateState(_e495);});var a,o=0;var _iterator144=_createForOfIteratorHelper(this._menuItems),_step144;try{for(_iterator144.s();!(_step144=_iterator144.n()).done;){var _e497=_step144.value;_e497.type==="heading"?(a&&o===0&&(a.visible=!1),a=_e497,o=0):_e497.type==="divider"&&a?(a.visible=o>0,a=void 0,o=0):a&&_e497.visible&&(o+=1);}}catch(err){_iterator144.e(err);}finally{_iterator144.f();}a&&(a.visible=o>0);var s=!0;var _iterator145=_createForOfIteratorHelper(this._menuItems),_step145;try{for(_iterator145.s();!(_step145=_iterator145.n()).done;){var _e498=_step145.value;_e498.type==="divider"?(_e498.visible=!s,s=!0):_e498.visible&&(s=!1);}}catch(err){_iterator145.e(err);}finally{_iterator145.f();}(t=this.activeMenuItem)!=null&&t.visible||(this.activeMenuItem=null),!((n=this.activeMenuItem)!=null&&n.enabled)&&((r=this.activeMenuItem)==null?void 0:r.type)==="submenu"&&this._activeMenuItem.submenu.hide(),this._dirty=!1;}},{key:"enabled",get:function get(){return this.updateIfDirty(),this._menuItems.some(function(_e499){return _e499.type!=="divider"&&_e499.visible&&_e499.enabled;});}},{key:"visible",get:function get(){return this.updateIfDirty(),this._menuItems.some(function(_e500){return _e500.type!=="divider"&&_e500.visible;});}},{key:"dirty",set:function set(_e501){this._dirty!==_e501&&_e501&&this.parentMenu&&(this._dirty=!0,this.parentMenu.dirty=!0);}},{key:"updateIfDirty",value:function updateIfDirty(){this._dirty&&this.updateState(this.rootMenu.modifiers);}},{key:"updateElement",value:function updateElement(){var _e502;if(this._element){this._element.textContent="";var _iterator146=_createForOfIteratorHelper(this._menuItems),_step146;try{for(_iterator146.s();!(_step146=_iterator146.n()).done;){var _step146$value=_step146.value,_e503=_step146$value.element,_t239=_step146$value.visible;_e503&&_t239&&this._element.append(_e503);}}catch(err){_iterator146.e(err);}finally{_iterator146.f();}(_e502=this._element.querySelector("li:first-of-type"))==null||_e502.setAttribute("tabindex","0");}}},{key:"element",get:function get(){if(this._element)return this._element;var _e504=document.createElement("menu");_e504.setAttribute("role","menu"),_e504.setAttribute("tabindex","-1"),_e504.setAttribute("aria-orientation","vertical"),_e504.setAttribute("part","ui-menu-container"),this._submenuClass&&_e504.classList.add(this._submenuClass),_e504.classList.add("ui-menu-container"),this._abortController||(this._abortController=new AbortController());var t=this._abortController.signal;return _e504.addEventListener("focus",this,{signal:t}),_e504.addEventListener("wheel",this,{passive:!0,signal:t}),this._element=_e504,this.updateElement(),_e504;}},{key:"activeMenuItem",get:function get(){return this._activeMenuItem;},set:function set(_e505){var t,n,r,i;if(this.rootMenu.cancelDelayedOperation(),_e505!==this._activeMenuItem){if(this.activeMenuItem){var _e506=this.activeMenuItem;_e506.active=!1,(t=_e506.submenu)==null||t.hide();}if(!((n=_e505==null?void 0:_e505.visible)==null||n)){this._activeMenuItem=null;return;}this._activeMenuItem=_e505,_e505&&(_e505.active=!0);}_e505?(r=_e505.element)==null||r.focus({preventScroll:!0}):(i=this._element)==null||i.focus({preventScroll:!0});}},{key:"firstMenuItem",get:function get(){this.updateIfDirty();var _e507=0,t=!1,n=this._menuItems;for(;!t&&_e507<=n.length-1;){var _r97=n[_e507];t=_r97.type!=="divider"&&_r97.visible&&_r97.enabled,_e507+=1;}return t?n[_e507-1]:null;}},{key:"lastMenuItem",get:function get(){this.updateIfDirty();var _e508=this._menuItems,t=_e508.length-1,n=!1;for(;!n&&t>=0;){var _r98=_e508[t];n=_r98.type!=="divider"&&_r98.visible&&_r98.enabled,--t;}return n?_e508[t+1]:null;}},{key:"nextMenuItem",value:function nextMenuItem(_e509){if(_e509===0)return this._activeMenuItem;if(!this._activeMenuItem)return _e509>0?this.firstMenuItem:this.lastMenuItem;if(!this.firstMenuItem||!this.lastMenuItem||!this._activeMenuItem)return null;this.updateIfDirty();var t=this._menuItems.indexOf(this.firstMenuItem),n=this._menuItems.indexOf(this.lastMenuItem),r=this._menuItems.indexOf(this._activeMenuItem),i=1;for(;r>=t&&r<=n;){r+=_e509>0?1:-1;var _t240=this._menuItems[r];if(!_t240)break;if(_t240.visible&&_t240.enabled){if(i===Math.abs(_e509))return this._menuItems[r];i+=1;}}return _e509>0?this.lastMenuItem:this.firstMenuItem;}},{key:"getMenuItemColumn",value:function getMenuItemColumn(_e510){this.updateIfDirty();var t=this._menuItems.filter(function(_e511){return _e511.visible&&_e511.enabled;}).indexOf(_e510);return t<0?-1:t%this.columnCount;}},{key:"findMenuItem",value:function findMenuItem(t){var n;this.updateIfDirty();var r=this._menuItems.filter(function(_e512){return _e512.type!=="divider"&&_e512.visible&&_e512.enabled;});if(r.length===0)return null;var i=Math.max.apply(Math,_toConsumableArray(r.map(function(_e513){return _e513.label.length;})))-t.length;if(i<0)return null;var a=null,o=0;for(;o<i&&!a;)a=(n=r.find(function(n){return e.collator.compare(t,n.label.substring(o,t.length))===0;}))==null?null:n,o++;return a;}},{key:"show",value:function show(_e514){return!this.visible||!_e514.container?!1:(this.updateElement(),_e514.container.appendChild(this.element),v()&&(this.element.popover="manual",this.element.showPopover()),_e514.location&&wh(this.element,{location:_e514.location,alternateLocation:_e514.alternateLocation,verticalPos:"bottom",horizontalPos:"start"}),Lh(),this.element.focus({preventScroll:!0}),zh(),this.parentMenu&&(this.parentMenu.openSubmenu=this),!0);}},{key:"hide",value:function hide(){var _e515,t,n,r,i,a;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),!(!((_e515=this._element)!=null&&_e515.isConnected)||!this._element.parentElement)&&(v()&&(t=this._element)!=null&&t.popover&&this._element.hidePopover(),Lh(),(r=(n=this.parentMenu)==null?void 0:n.element)==null||r.focus(),(a=(i=this._element)==null?void 0:i.parentNode)==null||a.removeChild(this._element),zh());}},{key:"openSubmenu",set:function set(_e516){var t,n,r,i;var a=_e516!==null;((t=this.activeMenuItem)==null?void 0:t.type)==="submenu"&&((n=this.activeMenuItem.element)==null||n.setAttribute("aria-expanded",a.toString())),(i=(r=this.activeMenuItem)==null?void 0:r.element)==null||i.classList.toggle("is-submenu-open",a),this.isSubmenuOpen=a;}}],[{key:"collator",get:function get(){return e._collator||(e._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),e._collator;}}]);}();function Lh(){document.addEventListener("focusin",Rh,!0),document.addEventListener("focusout",Rh,!0),document.addEventListener("focus",Rh,!0),document.addEventListener("blur",Rh,!0);}function Rh(e){e.stopImmediatePropagation(),e.preventDefault();}function zh(){document.removeEventListener("focusin",Rh,!0),document.removeEventListener("focusout",Rh,!0),document.removeEventListener("focus",Rh,!0),document.removeEventListener("blur",Rh,!0);}var Bh=function(_Ih){function e(_e517,t){var _this39;_classCallCheck(this,e);var n;_this39=_callSuper(this,e,[_e517]),_this39.state="closed",_this39.typingBufferResetTimer=0,_this39.hysteresisTimer=0,_this39._updating=!1,_this39._host=(n=t==null?void 0:t.host)==null?null:n,_this39.isDynamic=_e517.some(Hh),_this39._modifiers={shift:!1,control:!1,alt:!1,meta:!1},_this39.typingBuffer="",_this39.state="closed";return _this39;}_inherits(e,_Ih);return _createClass(e,[{key:"modifiers",get:function get(){return this._modifiers;},set:function set(_e518){sd(this._modifiers,_e518)||(this._modifiers=_e518,this.dirty=!0);}},{key:"activeSubmenu",get:function get(){var _e519=this;for(;_e519.isSubmenuOpen;)_e519=_e519.activeMenuItem.submenu;return _e519;}},{key:"dirty",set:function set(_e520){var _this40=this;this._updating||this._dirty!==_e520&&(this._dirty=!0,_e520&&setTimeout(function(){_this40.updateState(_this40.modifiers),_this40.updateElement();}));}},{key:"updateState",value:function updateState(_e521){this._updating=!0,this.modifiers=_e521==null?this.modifiers:_e521,_superPropGet(e,"updateState",this,3)([this.modifiers]),this._updating=!1;}},{key:"handleKeyupEvent",value:function handleKeyupEvent(_e522){this.isDynamic&&(this.modifiers=od(_e522)),_e522.stopImmediatePropagation();}},{key:"handleKeydownEvent",value:function handleKeydownEvent(_e523){var _this41=this;var t,n,r;if(_e523.key==="Tab"||_e523.key==="Escape"){this.hide();return;}this.isDynamic&&(this.modifiers=od(_e523));var i=!0,a=this.activeSubmenu,o=a.activeMenuItem;switch(_e523.key){case" ":case"Space":case"Return":case"Enter":o==null||o.select(od(_e523));break;case"ArrowRight":if((o==null?void 0:o.type)==="submenu")o.select(od(_e523)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!o)a.activeMenuItem=a.firstMenuItem;else{var _e524=(t=a.getMenuItemColumn(o))==null?-1:t;if(_e524>=0&&_e524<((n=a.columnCount)==null?1:n)-1){var _e525=a.nextMenuItem(1);_e525&&(a.activeMenuItem=_e525);}}break;case"ArrowLeft":if(a===this.rootMenu)o||(a.activeMenuItem=a.firstMenuItem);else if((o&&(r=a.getMenuItemColumn(o))!=null?r:-1)<=0||!o){a.hide();var _e526=a.parentMenu.activeMenuItem;if(_e526){var _t241=_e526.element;_t241==null||_t241.focus(),_t241==null||_t241.classList.remove("is-submenu-open");}}else{var _e527=a.nextMenuItem(-1);_e527&&(a.activeMenuItem=_e527);}break;case"ArrowDown":a.activeMenuItem=a.nextMenuItem(a.columnCount);break;case"ArrowUp":a.activeMenuItem=a.nextMenuItem(-a.columnCount);break;case"Home":case"PageUp":a.activeMenuItem=a.firstMenuItem;break;case"End":case"PageDown":a.activeMenuItem=a.lastMenuItem;break;case"Backspace":if(this.typingBuffer&&(this.typingBuffer=this.typingBuffer.slice(0,-1),this.typingBuffer)){clearTimeout(this.typingBufferResetTimer);var _e528=a.findMenuItem(this.typingBuffer);_e528&&(a.activeMenuItem=_e528),this.typingBufferResetTimer=setTimeout(function(){_this41.typingBuffer="";},500);}break;default:if(ld(_e523)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=_e523.key;var _t242=a.findMenuItem(this.typingBuffer);_t242&&(a.activeMenuItem=_t242),this.typingBufferResetTimer=setTimeout(function(){_this41.typingBuffer="";},500);}else i=!1;}i&&(_e523.preventDefault(),_e523.stopPropagation());}},{key:"handleEvent",value:function handleEvent(_e529){if(_e529.type==="keydown")this.handleKeydownEvent(_e529);else if(_e529.type==="keyup")this.handleKeyupEvent(_e529);else if(_e529.type==="pointermove")this.lastMoveEvent=_e529;else if(_e529.type==="pointerup")Number.isFinite(this.rootMenu._openTimestamp)&&Date.now()-this.rootMenu._openTimestamp<120?this.state="modal":this.state==="modal"&&_e529.target===this.scrim&&this.hide();else if(_e529.type==="contextmenu"){_e529.preventDefault(),_e529.stopPropagation();return;}_superPropGet(e,"handleEvent",this,3)([_e529]);}},{key:"dispatchEvent",value:function dispatchEvent(_e530){return this._host?this._host.dispatchEvent(_e530):!0;}},{key:"host",get:function get(){return this._host;}},{key:"scrim",get:function get(){return dd.element;}},{key:"connectScrim",value:function connectScrim(_e531){var _this42=this;var t=this.scrim;t.addEventListener("pointerup",this,!0),t.addEventListener("contextmenu",this),t.addEventListener("keydown",this),t.addEventListener("keyup",this),t.addEventListener("pointermove",this),dd.open({root:_e531,onDismiss:function onDismiss(){return _this42.hide();}});}},{key:"disconnectScrim",value:function disconnectScrim(){var _e532=this.scrim;_e532.removeEventListener("pointerup",this,!0),_e532.removeEventListener("contextmenu",this),_e532.removeEventListener("keydown",this),_e532.removeEventListener("keyup",this),_e532.removeEventListener("pointermove",this),dd.state==="open"&&dd.scrim.close();}},{key:"rootMenu",get:function get(){return this;}},{key:"show",value:function show(_e533){return this._onDismiss=_e533==null?void 0:_e533.onDismiss,_e533!=null&&_e533.modifiers&&(this.modifiers=_e533.modifiers),this.updateState(),this.connectScrim(_e533==null?void 0:_e533.target),_superPropGet(e,"show",this,3)([l(c({},_e533),{container:this.scrim})])?(this._openTimestamp=Date.now(),this.state="open",!0):(this.disconnectScrim(),!1);}},{key:"hide",value:function hide(){this.cancelDelayedOperation(),this.state!==void 0&&(this.state!=="closed"&&(this.activeMenuItem=null,dd.element.parentElement.focus(),_superPropGet(e,"hide",this,3)([]),this.state="closed",this.disconnectScrim()),this._onDismiss&&(this._onDismiss(),this._onDismiss=void 0));}},{key:"scheduleOperation",value:function scheduleOperation(t){var _this43=this;this.cancelDelayedOperation();var n=e.SUBMENU_DELAY;if(n<=0){t();return;}this.hysteresisTimer=setTimeout(function(){_this43.hysteresisTimer=0,t();},n);}},{key:"cancelDelayedOperation",value:function cancelDelayedOperation(){this.hysteresisTimer&&(clearTimeout(this.hysteresisTimer),this.hysteresisTimer=0);}}]);}(Ih);Bh.SUBMENU_DELAY=120;var Vh=Bh;function Hh(e){return Oh(e)?!1:_typeof(e.label)=="function"||_typeof(e.ariaLabel)=="function"||_typeof(e.tooltip)=="function"||(Dh(e)||Eh(e))&&(_typeof(e.enabled)=="function"||_typeof(e.visible)=="function")||Dh(e)&&_typeof(e.checked)=="function"?!0:Eh(e)?e.submenu.some(Hh):!1;}var Uh=_createClass(function Uh(){_classCallCheck(this,Uh);});Uh.DELAY=300,Uh.MAX_DISTANCE=10;function Wh(e){return new Promise(function(t,n){var r=ad(e);r||t(!1);var i=r,a=setTimeout(function(){o.abort(),t(Th(i,r)<Uh.MAX_DISTANCE);},Uh.DELAY),o=new AbortController(),s=o.signal;for(var _i85=0,_arr2=["pointermove","pointerup","pointercancel"];_i85<_arr2.length;_i85++){var _e534=_arr2[_i85];window.addEventListener(_e534,function(e){if(e.type==="pointerup"||e.type==="pointercancel")clearTimeout(a),o.abort(),t(!1);else if(e.type==="pointermove"){var _t243=ad(e);_t243&&(i=_t243);}},{passive:!0,signal:s});}});}function Gh(e,t,n){return Kh.apply(this,arguments);}function Kh(){return Kh=e.t(_regenerator().m(function _callee4(e,t,n){var _r99,_r100,_i86,_r101,_i87;return _regenerator().w(function(_context4){while(1)switch(_context4.n){case 0:if(!e.defaultPrevented){_context4.n=1;break;}return _context4.a(2,!1);case 1:if(!(e.type==="contextmenu")){_context4.n=2;break;}_r99=e;if(!(e.preventDefault(),e.stopPropagation(),n.show({target:t,location:ad(_r99),modifiers:od(_r99)}))){_context4.n=2;break;}return _context4.a(2,!0);case 2:if(!(e.type==="keydown")){_context4.n=3;break;}_r100=e;if(!(_r100.code==="ContextMenu"||_r100.code==="F10"&&_r100.shiftKey)){_context4.n=3;break;}_i86=t==null?void 0:t.getBoundingClientRect();if(!(qh(t)&&_i86&&n.show({target:t,location:{x:Math.ceil(_i86.left+_i86.width/2),y:Math.ceil(_i86.top+_i86.height/2)},modifiers:od(_r100)}))){_context4.n=3;break;}return _context4.a(2,(e.preventDefault(),e.stopPropagation(),!0));case 3:if(!(e.type==="pointerdown"&&e.pointerType!=="mouse"&&e.button===0)){_context4.n=6;break;}_r101=e.target;for(;_r101&&t!==_r101;)_r101=_r101.parentNode;if(!(!_r101||!n.visible)){_context4.n=4;break;}return _context4.a(2,!1);case 4:_i87=ad(e);_context4.n=5;return Wh(e);case 5:if(!_context4.v){_context4.n=6;break;}return _context4.a(2,n.state!=="closed"||!qh(t)?!1:(n.show({target:t,location:_i87}),!0));case 6:return _context4.a(2,!1);}},_callee4);})),Kh.apply(this,arguments);}function qh(e){return e.dispatchEvent(new Event("contextmenu",{cancelable:!0}));}var Jh="<mo>⁡</mo>",Yh="<mo>⁢</mo>";function Xh(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">");}function K(e,t){return!e||!t.generateID?"":" extid=\"".concat(e,"\"");}function Zh(e,t,n){var r,i,a,o,s,c,l,u;var d=!1;t=t==null?e.atoms.length:t;var f="",p="",m=e.atoms[e.index],h=(r=m.style)==null?void 0:r.variant,g=(i=m.style)==null?void 0:i.variantStyle,_="";if(m.value&&(h||g)){var _t244=(a=Be(m.value,h,g))==null?m.value:a;if(_t244!==m.value)return e.index+=1,f="<mi".concat(K(m.id,n),">").concat(_t244,"</mi>"),eg(f,e,n)||(e.mathML+=f,e.lastType="mi"),!0;_=(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"}[(g==null?"":g)+(h==null?"":h)])==null?"":o,_&&(_=" mathvariant=\"".concat(_,"\""));}var v={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(m.command==="!")return e.index+=1,f="<mo>!</mo>",eg(f,e,n)||(e.mathML+=f,e.lastType="mo"),!0;if(v[m.command]){e.index+=1;var _t245="<mi".concat(K(m.id,n)).concat(_,">").concat(v[m.command],"</mi>");return(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mtext"||e.lastType==="fence")&&(_t245=Yh+_t245),eg(_t245,e,n)||(e.mathML+=_t245,e.lastType="mi"),!0;}if(m.command==="\\operatorname")p=og(m.body),e.index+=1;else if(h||g)for(;e.index<t&&(m.type==="mord"||m.type==="macro")&&!m.isDigit()&&h===((c=(s=m.style)==null?void 0:s.variant)==null?"":c)&&g===((u=(l=m.style)==null?void 0:l.variantStyle)==null?"":u);)p+=og([m]),e.index+=1,m=e.atoms[e.index];else(m.type==="mord"||m.type==="macro")&&!m.isDigit()&&(p+=og([m]),e.index+=1);if(p.length>0){d=!0,f="<mi".concat(_,">").concat(p,"</mi>");var _t246=e.lastType;f.endsWith(">f</mi>")||f.endsWith(">g</mi>")?(f+=Jh,e.lastType="applyfunction"):e.lastType=/^<mo>(.*)<\/mo>$/.test(f)?"mo":"mi",eg(f,e,n)||((_t246==="mi"||_t246==="mn"||_t246==="mtext"||_t246==="fence")&&(f=Yh+f),e.mathML+=f);}return d;}function Qh(e){return e.index<e.atoms.length&&e.atoms[e.index].superscript&&e.atoms[e.index].type==="subsup";}function $h(e){var t=-1,n=e.index,r=!1,i=!1;for(;n<e.atoms.length&&!r&&!i;){var _t247=e.atoms[n];r=!_t247.isDigit(),i=!r&&_t247.superscript!==void 0,n++;}return i&&(t=n-1),t;}function eg(e,t,n){var r;var i=t.atoms[t.index-1];if(!i)return!1;if(!i.superscript&&!i.subscript)if(((r=t.atoms[t.index])==null?void 0:r.type)==="subsup")i=t.atoms[t.index],t.index+=1;else return!1;var a=t.lastType;t.lastType="";var o=q(i.superscript,n);t.lastType="";var s=q(i.subscript,n);if(t.lastType=a,!o&&!s)return!1;var c="";return o&&s?c="<msubsup>".concat(e).concat(s).concat(o,"</msubsup>"):o?c="<msup>".concat(e).concat(o,"</msup>"):s&&(c="<msub>".concat(e).concat(s,"</msub>")),t.mathML+=c,t.lastType="",!0;}function tg(e,t,n){t=t==null?e.atoms.length:t;var r=e.index,i="",a=$h(e);for(a>=0&&a<t&&(t=a);e.index<t&&e.atoms[e.index].mode==="text";)i+=e.atoms[e.index].value?e.atoms[e.index].value:" ",e.index+=1;return i.length>0?(i="<mtext ".concat(K(e.atoms[r].id,n),">").concat(Xh(i),"</mtext>"),a<0&&Qh(e)&&(a=e.index,e.index+=1),eg(i,e,n)||(e.mathML+=i,e.lastType="mtext"),!0):!1;}function ng(e,t,n){t=t==null?e.atoms.length:t;var r=e.index,i="",a=$h(e);for(a>=0&&a<t&&(t=a);e.index<t&&e.atoms[e.index].isDigit();)i+=e.atoms[e.index].asDigit(),e.index+=1;return i.length<=0?!1:(i="<mn"+K(e.atoms[r].id,n)+">"+i+"</mn>",a<0&&Qh(e)&&(a=e.index,e.index+=1),eg(i,e,n)||(e.mathML+=i,e.lastType="mn"),!0);}function rg(e,t,n){var r=!1;t=t==null?e.atoms.length:t;var i="",a="";if(e.index<t&&e.atoms[e.index].type==="mopen"){var _o33=!1,_s20=0,_c18=e.index,_l0=-1,_u4=_c18+1;for(;_u4<t&&!_o33;)e.atoms[_u4].type==="mopen"?_s20+=1:e.atoms[_u4].type==="mclose"&&--_s20,_s20===-1&&(_o33=!0,_l0=_u4),_u4+=1;_o33&&(i="<mrow>",i+=ag(e.atoms[_c18],n),i+=q(e.atoms,n,_c18+1,_l0),i+=ag(e.atoms[_l0],n),i+="</mrow>",e.index=_l0+1,(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mfrac"||e.lastType==="fence")&&(e.mathML+=Yh),eg(i,e,n)&&(r=!0,e.lastType="",i=""),a="fence");}return i.length>0&&(r=!0,e.mathML+=i,e.lastType=a),r;}function ig(e,t,n){var r=!1;t=t==null?e.atoms.length:t;var i="",a="",o=e.atoms[e.index];if(!o)return!1;var s={"\\ne":"≠","\\neq":"≠","\\pm":"±","\\times":"×","\\colon":":","\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lbrack":"[","\\rbrack":"]","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"};if(s[o.command]){e.index+=1;var _t248="<mo".concat(K(o.id,n),">").concat(s[o.command],"</mo>");return eg(_t248,e,n)||(e.mathML+=_t248,e.lastType="mo"),!0;}if(e.index<t&&(o.type==="mbin"||o.type==="mrel"))i+=sg(e.atoms[e.index],n),e.index+=1,a="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)){var _t249=ag(o,n);return o.superscript&&o.subscript?(i+="<munderover>"+_t249,i+=q(o.subscript,n),i+=q(o.superscript,n),i+="</munderover>"):o.superscript?(i+="<mover>"+_t249,i+=q(o.superscript,n),i+="</mover>"):o.subscript&&(i+="<munder>"+_t249,i+=q(o.subscript,n),i+="</munder>"),e.mathML+=i,e.lastType="mo",e.index+=1,!0;}{var _t250=e.atoms[e.index],_r102=_t250.value==="\\operatorname",_o34=_r102?"<mi class=\"MathML-Unit\""+K(_t250.id,n)+">"+og(_t250.value)+"</mi>":ag(_t250,n);i+=_o34,!_r102&&!/^<mo>(.*)<\/mo>$/.test(_o34)?(i+=Jh,a="applyfunction"):a=_r102?"mi":"mo";}(e.lastType==="mi"||e.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(i)&&(i=Yh+i),e.index+=1;}return i.length>0&&(r=!0,eg(i,e,n)||(e.mathML+=i,e.lastType=a)),r;}function q(e,t,n,r){t!=null||(t={});var i={atoms:[],index:n==null?0:n,mathML:"",lastType:""};if(_typeof(e)=="number"||_typeof(e)=="boolean")i.mathML=e.toString();else if(_typeof(e)=="string")i.mathML=e;else if(e instanceof L)i.mathML=sg(e,t);else if(Array.isArray(e)){i.atoms=e;var _n172=0;for(r=r||(e?e.length:0);i.index<r;)if(tg(i,r,t)||ng(i,r,t)||Zh(i,r,t)||ig(i,r,t)||rg(i,r,t))_n172+=1;else if(i.index<r){var _e535=sg(i.atoms[i.index],t);i.lastType==="mn"&&_e535.length>0&&i.atoms[i.index].type==="genfrac"&&(_e535="<mo>⁤</mo>"+_e535),i.atoms[i.index].type==="genfrac"?i.lastType="mfrac":i.lastType="",i.index+=1,eg(_e535,i,t)?_n172+=1:_e535.length>0&&(i.mathML+=_e535,_n172+=1);}_n172>1&&(i.mathML="<mrow>"+i.mathML+"</mrow>");}return i.mathML;}function ag(e,t){var n="",r=og(e.value);return r&&(n="<mo"+K(e.id,t)+">"+r+"</mo>"),n;}function og(e){if(!e)return"";if(_typeof(e)=="string")return Xh(e);if(!Array.isArray(e)&&_typeof(e.body)=="string")return Xh(e.body);var t="";var _iterator147=_createForOfIteratorHelper(e),_step147;try{for(_iterator147.s();!(_step147=_iterator147.n()).done;){var _n173=_step147.value;_typeof(_n173.value)=="string"&&(t+=_n173.value);}}catch(err){_iterator147.e(err);}finally{_iterator147.f();}return Xh(t);}function sg(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,ee,C;if(e.mode==="text")return"<mi".concat(K(e.id,t),">").concat(Xh(e.value),"</mi>");var w={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",longleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",longrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",longrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xleftrightarrows:"\u21C4",xRightleftharpoons:"\u21CC",longRightleftharpoons:"\u21CC",xLeftrightharpoons:"\u21CB",longLeftrightharpoons:"\u21CB"},te={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5},T="",ne="",re,ie,ae,oe,se,ce,le=e.command;if(e.command==="\\error")return"<merror".concat(K(e.id,t),">").concat(q(e.body,t),"</merror>");var ue={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},de={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(e.type){case"first":break;case"error":if(e.command==="\\\\")break;T="<merror".concat(K(e.id,t),">").concat(q(e.body,t),"</merror>");break;case"group":case"root":T=q(e.body,t);break;case"array":var _E=e;if((_E.leftDelim&&_E.leftDelim!=="."||_E.rightDelim&&_E.rightDelim!==".")&&(T+="<mrow>",_E.leftDelim&&_E.leftDelim!=="."&&(T+="<mo>".concat(Xh(ue[_E.leftDelim]||_E.leftDelim),"</mo>"))),T+="<mtable",_E.colFormat){for(T+=" columnalign=\"",ae=0;ae<_E.colFormat.length;ae++){var _e536=_E.colFormat[ae];"align"in _e536&&(T+={l:"left",c:"center",r:"right"}[_e536.align]+" ");}T+="\"";}for(T+=">",ie=0;ie<_E.rows.length;ie++){for(T+="<mtr>",re=0;re<_E.rows[ie].length;re++)T+="<mtd>"+q(_E.rows[ie][re],t)+"</mtd>";T+="</mtr>";}T+="</mtable>",(_E.leftDelim&&_E.leftDelim!=="."||_E.rightDelim&&_E.rightDelim!==".")&&(_E.rightDelim&&_E.rightDelim!=="."&&(T+="<mo>".concat(Xh(ue[_E.rightDelim]||_E.rightDelim),"</mo>")),T+="</mrow>");break;case"genfrac":var _fe=e;(_fe.leftDelim||_fe.rightDelim)&&(T+="<mrow>"),_fe.leftDelim&&_fe.leftDelim!=="."&&(T+="<mo"+K(e.id,t)+">"+Xh(ue[_fe.leftDelim]||_fe.leftDelim)+"</mo>"),_fe.hasBarLine?(T+="<mfrac>",T+=q(e.above,t)||"<mi> </mi>",T+=q(e.below,t)||"<mi> </mi>",T+="</mfrac>"):(T+="<mtable"+K(e.id,t)+">",T+="<mtr>"+q(e.above,t)+"</mtr>",T+="<mtr>"+q(e.below,t)+"</mtr>",T+="</mtable>"),_fe.rightDelim&&_fe.rightDelim!=="."&&(T+="<mo"+K(e.id,t)+">"+Xh(ue[_fe.rightDelim]||_fe.rightDelim)+"</mo>"),(_fe.leftDelim||_fe.rightDelim)&&(T+="</mrow>");break;case"surd":e.hasEmptyBranch("above")?(T+="<msqrt"+K(e.id,t)+">",T+=q(e.body,t),T+="</msqrt>"):(T+="<mroot"+K(e.id,t)+">",T+=q(e.body,t),T+=q(e.above,t),T+="</mroot>");break;case"leftright":var _pe=e,_me=_pe.leftDelim;T="<mrow>",_me&&_me!=="."&&(T+="<mo".concat(K(e.id,t),">").concat(Xh((n=ue[_me])==null?_me:n),"</mo>")),e.body&&(T+=q(e.body,t));var _he=_pe.matchingRightDelim();_he&&_he!=="."&&(T+="<mo".concat(K(e.id,t),">").concat(Xh((r=ue[_he])==null?_he:r),"</mo>")),T+="</mrow>";break;case"sizeddelim":case"delim":T+="<mo".concat(K(e.id,t),">").concat(Xh(ue[e.value]||e.value),"</mo>");break;case"accent":var _ge=e;T+="<mover accent=\"true\""+K(e.id,t)+">",T+=q(e.body,t),T+="<mo>"+(de[le]||_ge.accent)+"</mo>",T+="</mover>";break;case"line":case"overlap":break;case"overunder":var _e537=e;se=e.above,oe=e.below,(_e537.svgAbove||se)&&(_e537.svgBelow||oe)?ce=e.body:se&&se.length>0?(ce=e.body,(a=(i=e.body)==null?void 0:i[0])!=null&&a.below?(oe=e.body[0].below,ce=e.body[0].body):((s=(o=e.body)==null?void 0:o[0])==null?void 0:s.type)==="first"&&(l=(c=e.body)==null?void 0:c[1])!=null&&l.below&&(oe=e.body[1].below,ce=e.body[1].body)):oe&&oe.length>0&&(ce=e.body,(d=(u=e.body)==null?void 0:u[0])!=null&&d.above?(se=e.body[0].above,ce=e.body[0].body):((p=(f=e.body)==null?void 0:f[0])==null?void 0:p.type)==="first"&&(h=(m=e.body)==null?void 0:m[1])!=null&&h.above&&(se=e.body[1].above,ce=e.body[1].body)),(_e537.svgAbove||se)&&(_e537.svgBelow||oe)?(T+="<munderover ".concat(K(e.id,t),">"),T+=(g=w[_e537.svgBody])==null?q(ce,t):g,T+=(_=w[_e537.svgBelow])==null?q(oe,t):_,T+=(v=w[_e537.svgAbove])==null?q(se,t):v,T+="</munderover>"):_e537.svgAbove||se?(T+="<mover ".concat(K(e.id,t),">")+((y=w[_e537.svgBody])==null?q(ce,t):y),T+=(b=w[_e537.svgAbove])==null?q(se,t):b,T+="</mover>"):(_e537.svgBelow||oe)&&(T+="<munder ".concat(K(e.id,t),">")+((x=w[_e537.svgBody])==null?q(ce,t):x),T+=(S=w[_e537.svgBelow])==null?q(oe,t):S,T+="</munder>");break;case"placeholder":T+="?";break;case"mord":{if(T=_typeof(e.value)=="string"?e.value:le,T.length>0&&T.startsWith("\\"))_typeof(e.value)=="string"&&e.value.charCodeAt(0)>255?T=String.fromCodePoint(e.value.codePointAt(0)):_typeof(e.value)=="string"&&(T=e.value.charAt(0));else if(e.command==="\\char"){var _t251=(ee=e.args)==null?void 0:ee[0];if(_t251!==void 0&&"number"in _t251){var _e538=_t251.number;_typeof(_e538)=="number"&&_e538>=0&&_e538<=1114111&&(T=String.fromCodePoint(_e538));}}else _typeof(e.value)=="string"?T=e.value:(console.error("Did not expect this"),T="");var _n174=/\d/.test(T)?"mn":"mi";T="<".concat(_n174).concat(K(e.id,t),">").concat(Xh(T),"</").concat(_n174,">");break;}case"mbin":case"mrel":case"minner":T=ag(e,t);break;case"mpunct":T="<mo separator=\"true\""+K(e.id,t)+">"+le+"</mo>";break;case"mop":case"operator":case"extensible-symbol":e.value!=="\u200B"&&(T="<mo"+K(e.id,t)+">",T+=le==="\\operatorname"?e.body:le||e.body,T+="</mo>");break;case"box":var _ve=e;T="<menclose notation=\"box\"",_ve.backgroundcolor&&(T+=" mathbackground=\""+_ve.backgroundcolor+"\""),T+=K(e.id,t)+">"+q(e.body,t)+"</menclose>";break;case"spacing":T+="<mspace width=\""+((C=te[le])==null?0:C)+"em\"/>";break;case"enclose":var _ye=e;T="<menclose notation=\"";for(var _e539 in _ye.notation)Object.prototype.hasOwnProperty.call(_ye.notation,_e539)&&_ye.notation[_e539]&&(T+=ne+_e539,ne=" ");T+=K(e.id,t)+"\">"+q(e.body,t)+"</menclose>";break;case"prompt":T="<menclose notation=\"roundexbox\"\"\">"+q(e.body,t)+"</menclose>";break;case"space":T+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":T+=ag(e,t);break;case"mclose":T+=ag(e,t);break;case"macro":{var _n175=e.command+og(e.macroArgs);_n175&&(T+="<mo ".concat(K(e.id,t),">").concat(_n175,"</mo>"));}break;case"latexgroup":T+=q(e.body,t);break;case"latex":T+="<mtext"+K(e.id,t)+">"+Xh(e.value)+"</mtext>";break;case"tooltip":T+=q(e.body,t);break;case"text":T+="<mtext ".concat(K(e.id,t),"x>").concat(Xh(e.value),"</mtext>");break;default:if(e.command==="\\displaystyle")return"<mrow ".concat(K(e.id,t)," displaystyle=\"true\">").concat(q(e.body,t),"</mrow>");if(e.command==="\\textstyle")return"<mrow ".concat(K(e.id,t)," displaystyle=\"false\">").concat(q(e.body,t),"</mrow>");console.info("Unexpected element in conversion to MathML:",e);}return T;}var cg={"\\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 ","\u200b":"","\u2212":"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"},lg={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 ug(e){var t="";return e.startsWith("\\")&&(t=" "+e.replace("\\","")+" "),t;}function dg(e){var t=0;if(xe(e)){var _iterator148=_createForOfIteratorHelper(e),_step148;try{for(_iterator148.s();!(_step148=_iterator148.n()).done;){var _n176=_step148.value;_n176.type!=="first"&&(t+=1);}}catch(err){_iterator148.e(err);}finally{_iterator148.f();}}return t===1;}function fg(e){if(xe(e)){var _iterator149=_createForOfIteratorHelper(e),_step149;try{for(_iterator149.s();!(_step149=_iterator149.n()).done;){var _t252=_step149.value;if(_t252.type!=="first"&&_t252.id)return _t252.id.toString();}}catch(err){_iterator149.e(err);}finally{_iterator149.f();}}return"";}function pg(e){var t="";if(xe(e)){var _iterator150=_createForOfIteratorHelper(e),_step150;try{for(_iterator150.s();!(_step150=_iterator150.n()).done;){var _n177=_step150.value;_n177.type!=="first"&&_typeof(_n177.value)=="string"&&(t+=_n177.value);}}catch(err){_iterator150.e(err);}finally{_iterator150.f();}}return t;}function mg(e){return e?e.map(function(e){return e.value;}).join(""):"";}function hg(e){if(e&&!e.some(function(e){return e.type!=="first"&&e.value===void 0;}))return e.map(function(e){return e.value;}).join("");}function gg(e){return"<emphasis>".concat(e,"</emphasis>");}function _g(e,t){var n;var r="",i=!1,a=!1;for(var _o35=0;_o35<t.length;_o35++)t[_o35].type!=="first"&&(t[_o35].mode!=="text"&&(a=!1),_o35<t.length-2&&t[_o35].type==="mopen"&&t[_o35+2].type==="mclose"&&t[_o35+1].type==="mord"?(r+=" of ",r+=gg(J(e,t[_o35+1])),_o35+=2):t[_o35].mode==="text"?a?r+=(n=t[_o35].value)==null?" ":n:(a=!0,r+=J("text",t[_o35])):t[_o35].isDigit()?i?r+=t[_o35].asDigit():(i=!0,r+=J(e,t[_o35])):(i=!1,r+=J(e,t[_o35])));return r;}function J(e,t){var n,r,i,a,o,s,c,l;function u(e){return globalThis.MathfieldElement.textToSpeechMarkup?/[a-z]/.test(e)?" <say-as interpret-as=\"character\">".concat(e,"</say-as>"):/[A-Z]/.test(e)?"capital <say-as interpret-as=\"character\">".concat(e.toLowerCase(),"</say-as>"):e:/[a-z]/.test(e)?" '"+e.toUpperCase()+"'":/[A-Z]/.test(e)?" 'capital "+e.toUpperCase()+"'":e;}if(!t)return"";if(xe(t))return _g(e,t);var d="";if(t.id&&e==="math"&&(d+="<mark name=\""+t.id.toString()+"\"/>"),t.mode==="text")return d+t.value;var f="",p="",m="",h=!1,g=t.command;switch(g){case"\\vec":return"vector "+J(e,t.body);case"\\acute":return J(e,t.body)+" acute";case"\\grave":return J(e,t.body)+" grave";case"\\dot":return"dot over"+J(e,t.body);case"\\ddot":return"double dot over"+J(e,t.body);case"\\mathring":return"ring over"+J(e,t.body);case"\\tilde":case"\\widetilde":return"tilde over"+J(e,t.body);case"\\bar":return J(e,t.body)+" bar";case"\\breve":return J(e,t.body)+" breve";case"\\check":case"\\widecheck":return"check over "+J(e,t.body);case"\\hat":case"\\widehat":return"hat over"+J(e,t.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+J(e,t.body);case"\\underarc":case"\\underparen":return"arc under "+J(e,t.body);case"\\mathop":return(n=hg(t.body))==null?J(e,t.body):n;case"\\mathit":return(r=hg(t.body))==null?J(e,t.body):r;case"\\mathrm":return(i=hg(t.body))==null?J(e,t.body):i;case"\\mathbb":return"blackboard"+((a=hg(t.body))==null?J(e,t.body):a);}switch(t.type){case"prompt":var _n178=t.body.length>1?"start input . <break time=\"500ms\"/> "+J(e,t.body)+". <break time=\"500ms\"/> end input":"blank";d+=" <break time=\"300ms\"/> "+_n178+". <break time=\"700ms\"/>"+((o=t.correctness)==null?"":o)+" . <break time=\"700ms\"/> ";break;case"array":var _r103=t.rows,_i88=t.environmentName;if(Object.keys(lg).includes(_i88)){d+=" begin ".concat(lg[_i88]," ");for(var _e540=0;_e540<_r103.length;_e540++){_e540>0&&(d+=","),d+=" row ".concat(_e540+1," ");for(var _t253=0;_t253<_r103[_e540].length;_t253++)_t253>0&&(d+=","),d+=" column ".concat(_t253+1,": "),d+=J("math",_r103[_e540][_t253]);}d+=" end ".concat(lg[_i88]," ");}break;case"group":g==="\\ne"?d+=" not equal ":(g==="\\not"&&(d+=" not "),d+=J("math",t.body));break;case"root":d+=J("math",t.body);break;case"genfrac":if(f=J("math",t.above),p=J("math",t.below),dg(t.above)&&dg(t.below)){var _e541={"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 "}[pg(t.above)+"/"+pg(t.below)];_e541?d=_e541:d+=f+" over "+p;}else d+=" the fraction <break time=\"150ms\"/>"+f+" over <break time=\"150ms\"/>"+p+".<break time=\"150ms\"/> End fraction.<break time=\"150ms\"/>";break;case"surd":if(m=J("math",t.body),t.hasEmptyBranch("above"))d+=dg(t.body)?" the square root of "+m+" , ":" the square root of <break time=\"200ms\"/>"+m+". <break time=\"200ms\"/> End square root";else{var _e542=J("math",t.above);_e542=_e542.trim();var _n179=_e542.replace(/<mark([^/]*)\/>/g,"");_n179==="3"?d+=" the cube root of <break time=\"200ms\"/>"+m+". <break time=\"200ms\"/> End cube root":_n179==="n"?d+=" the nth root of <break time=\"200ms\"/>"+m+". <break time=\"200ms\"/> End root":d+=" the root with index: <break time=\"200ms\"/>"+_e542+", of <break time=\"200ms\"/>"+m+". <break time=\"200ms\"/> End root";}break;case"leftright":{var _e543=t;d+=(s=_e543.leftDelim?cg[_e543.leftDelim]:void 0)==null?_e543.leftDelim:s,d+=J("math",t.body),d+=(c=_e543.rightDelim?cg[_e543.rightDelim]:void 0)==null?_e543.rightDelim:c;}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":var _a54=g.replace(/^\\/g,""),_3=lt()[_a54];_3!=null&&_3.expand?d+=J("math",t.body):d+="".concat(_a54," ");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(g==="\\mathbin"||g==="\\mathrel"||g==="\\mathopen"||g==="\\mathclose"||g==="\\mathpunct"||g==="\\mathord"||g==="\\mathinner"){d=J(e,t.body);break;}var _n180=t.isDigit()?t.asDigit():t.value,_r104=t.command;if((t.type==="delim"||t.type==="sizeddelim")&&(_r104=t.value,_n180=_r104),e==="text")d+=_n180;else{if(t.type==="mbin"&&(d+="<break time=\"150ms\"/>"),_n180){var _e544=cg[_n180]||(_r104?cg[_r104.trim()]:"");if(_e544)d+=" "+_e544;else{var _e545=_r104?ug(_r104.trim()):"";d+=_e545||u(_n180);}}else d+=J("math",t.body);t.type==="mbin"&&(d+="<break time=\"150ms\"/>");}break;}case"mop":case"operator":case"extensible-symbol":if(t.value!=="\u200B"){var _e546=t.command;if(_e546==="\\sum"){if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){var _e547=J("math",t.superscript);_e547=_e547.trim();var _n181=J("math",t.subscript);_n181=_n181.trim(),d+=" the summation from <break time=\"200ms\"/>"+_n181+"<break time=\"200ms\"/> to <break time=\"200ms\"/>"+_e547+"<break time=\"200ms\"/> of <break time=\"150ms\"/>",h=!0;}else if(t.hasEmptyBranch("subscript"))d+=" the summation of";else{var _e548=J("math",t.subscript);_e548=_e548.trim(),d+=" the summation from <break time=\"200ms\"/>"+_e548+"<break time=\"200ms\"/> of <break time=\"150ms\"/>",h=!0;}}else if(_e546==="\\prod"){if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){var _e549=J("math",t.superscript);_e549=_e549.trim();var _n182=J("math",t.subscript);_n182=_n182.trim(),d+=" the product from <break time=\"200ms\"/>"+_n182+"<break time=\"200ms\"/> to <break time=\"200ms\"/>"+_e549+"<break time=\"200ms\"/> of <break time=\"150ms\"/>",h=!0;}else if(t.hasEmptyBranch("subscript"))d+=" the product of ";else{var _e550=J("math",t.subscript);_e550=_e550.trim(),d+=" the product from <break time=\"200ms\"/>"+_e550+"<break time=\"200ms\"/> of <break time=\"150ms\"/>",h=!0;}}else if(_e546==="\\int"){if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){var _e551=J("math",t.superscript);_e551=_e551.trim();var _n183=J("math",t.subscript);_n183=_n183.trim(),d+=" the integral from <break time=\"200ms\"/>"+gg(_n183)+"<break time=\"200ms\"/> to <break time=\"200ms\"/>"+gg(_e551)+" <break time=\"200ms\"/> of ",h=!0;}else d+=" the integral of <break time=\"200ms\"/> ";}else if(_e546==="\\operatorname"||_e546==="\\operatorname*")d+=mg(t.body)+" ";else if(_typeof(t.value)=="string"){var _e552=(l=cg[t.value])==null?t.command?cg[t.command]:void 0:l;d+=_e552||" "+t.value;}else t.command&&(t.command==="\\mathop"?d+=J("math",t.body):d+=t.command.startsWith("\\")?" "+t.command.slice(1):" "+t.command);}break;case"enclose":m=J("math",t.body),d+=" crossed out "+m+". End crossed out.";break;case"space":case"spacing":break;}if(!h&&!t.hasEmptyBranch("superscript")){var _n184=J(e,t.superscript);_n184=_n184.trim();var _r105=_n184.replace(/<[^>]*>/g,"");if(dg(t.superscript)){if(e==="math"){var _e553=fg(t.superscript);_e553&&(d+="<mark name=\""+_e553+"\"/>");}_r105==="\u2032"?d+=" prime ":_r105==="2"?d+=" squared ":_r105==="3"?d+=" cubed ":Number.isNaN(Number.parseInt(_r105))?d+=" to the "+_n184+"; ":d+=" to the <say-as interpret-as=\"ordinal\">"+_r105+"</say-as> power; ";}else Number.isNaN(Number.parseInt(_r105))?d+=" raised to the "+_n184+"; ":d+=" raised to the <say-as interpret-as=\"ordinal\">"+_r105+"</say-as> power; ";}if(!h&&!t.hasEmptyBranch("subscript")){var _e554=J("math",t.subscript);_e554=_e554.trim(),d+=dg(t.subscript)?" sub "+_e554:" subscript "+_e554+". End subscript. ";}return d;}function vg(e){var t,n;var r=globalThis.MathfieldElement;if(r.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){var _i89=q(e);if(_i89){r.textToSpeechMarkup&&(r.textToSpeechRulesOptions=(t=r.textToSpeechRulesOptions)==null?{}:t,r.textToSpeechRulesOptions=l(c({},r.textToSpeechRulesOptions),{markup:r.textToSpeechMarkup}),r.textToSpeechRulesOptions.markup==="ssml"&&(r.textToSpeechRulesOptions=l(c({},r.textToSpeechRulesOptions),{markup:"ssml_step"})),r.textToSpeechRulesOptions=l(c({},r.textToSpeechRulesOptions),{rate:r.speechEngineRate}));var _e555=(n=window.SRE)==null?globalThis.sre.System.getInstance():n;r.textToSpeechRulesOptions&&_e555.setupEngine(r.textToSpeechRulesOptions);var _a55="";try{_a55=_e555.toSpeech(_i89);}catch(e){console.error("MathLive 0.110.0: `SRE.toSpeech()` runtime error",e);}return _a55;}return"";}var i=J("math",e);if(r.textToSpeechMarkup==="ssml"){var _e556="";r.speechEngineRate&&(_e556="<prosody rate=\""+r.speechEngineRate+"\">"),i="<?xml version=\"1.0\"?><speak version=\"1.1\" xmlns=\"http://www.w3.org/2001/10/synthesis\" xml:lang=\"en-US\"><amazon:auto-breaths>"+_e556+"<p><s>"+i+"</s></p>"+(_e556?"</prosody>":"")+"</amazon:auto-breaths></speak>";}else i=r.textToSpeechMarkup==="mac"&&g()==="macos"?i.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,""):i.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return i;}var yg={"\\ne":"\u2260","\\neq":"\u2260","\u2212":"-","-":"-","\\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"},bg={"\\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":"@"},xg={"\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrack":"[","\\rbrack":"]","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)"};function Sg(e){var t="";var _iterator151=_createForOfIteratorHelper(e),_step151;try{for(_iterator151.s();!(_step151=_iterator151.n()).done;){var _n185=_step151.value;var _e557=t[t.length-1];_e557!==void 0&&(/\d$/.test(_e557)&&/^\d/.test(_n185)||/[a-zA-Z]$/.test(_e557)&&/^[a-zA-Z]/.test(_n185))&&(t+=" "),t+=_n185;}}catch(err){_iterator151.e(err);}finally{_iterator151.f();}return t;}function Y(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b;if(!e)return"";if(xe(e)){if(e.length===0)return"";if(e[0].mode==="latex")return e.map(function(e){return Y(e);}).join("");if(e[0].mode==="text"){var _r106=0,_i90="";for(;((n=e[_r106])==null?void 0:n.mode)==="text";)_i90+=e[_r106].body?Y(e[_r106].body,t):e[_r106].value,_r106++;return t!=null&&t.plain?_i90+Y(e.slice(_r106),t):"\"".concat(_i90,"\" ").concat(Y(e.slice(_r106)));}var _a56=0,_o36=[];for(;((r=e[_a56])==null?void 0:r.mode)==="math";){var _n186="";for(;((i=e[_a56])==null?void 0:i.type)==="mord"&&/\d/.test(e[_a56].value);)_n186+=e[_a56++].value;_n186?_o36.push(_n186):_o36.push(Y(e[_a56++],t));}return _o36.push(Y(e.slice(_a56),t)),Sg(_o36);}if(e.mode==="text")return t!=null&&t.plain?e.value:"\"".concat(e.value,"\"");var x="",S=e.command,ee;if(S==="\\placeholder")return"(".concat(Y(e.body,t),")");var C=L.serialize([e],{expandMacro:!1,defaultMode:"math"});switch(e.type){case"accent":var _n187={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[S];x="".concat(_n187==null?"":_n187," ").concat(Y(e.body,t)," ");break;case"first":return"";case"latexgroup":return e.body.map(function(e){return e.value;}).join("");case"group":case"root":x=(a=yg[S])==null?Y(e.body,t):a;break;case"genfrac":{var _n188=e;(_n188.leftDelim||_n188.rightDelim)&&(x=_n188.leftDelim==="."||!_n188.leftDelim?"{:":_n188.leftDelim),_n188.hasBarLine?(x+="(",x+=Y(_n188.above,t),x+=")/(",x+=Y(_n188.below,t),x+=")"):(x+="((",x+=Y(_n188.above,t),x+=") choose (",x+=Y(_n188.below,t),x+="))"),(_n188.leftDelim||_n188.rightDelim)&&(x+=_n188.rightDelim==="."||!_n188.rightDelim?"{:":_n188.rightDelim);}break;case"surd":e.hasEmptyBranch("above")?x+="sqrt(".concat(Y(e.body,t),")"):x+="root(".concat(Y(e.above,t),")(").concat(Y(e.body,t),")");break;case"latex":x=e.value;break;case"leftright":{var _n189=e,_r107=_n189.leftDelim;_r107&&xg[_r107]&&(_r107=xg[_r107]),x+=_r107==="."||!_r107?"{:":_r107,x+=Y(_n189.body,t);var _i91=_n189.matchingRightDelim();_i91&&xg[_i91]&&(_i91=xg[_i91]),x+=_i91==="."||!_i91?":}":_i91;}break;case"sizeddelim":case"delim":x=e.value;break;case"overlap":break;case"overunder":break;case"mord":if(yg[C])return yg[C];x=(c=(s=(o=yg[S])==null?S:o)==null?S:s)==null?_typeof(e.value)=="string"?e.value:"":c,x.startsWith("\\")&&(x+=" "),ee=S?S.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,ee?x=String.fromCodePoint(Number.parseInt("0x"+ee[1])):x.length>0&&x.startsWith("\\")&&(x=_typeof(e.value)=="string"?e.value.charAt(0):e.command),x=Cg(x,e.style);break;case"mbin":case"mrel":case"minner":x=(d=(u=(l=yg[C])==null?yg[S]:l)==null?bg[S]:u)==null?e.value:d;break;case"mopen":case"mclose":x=e.value;break;case"mpunct":x=(f=bg[S])==null?S:f;break;case"mop":case"operator":case"extensible-symbol":e.value!=="\u200B"&&(x=bg[S]?bg[S]:S==="\\operatorname"?Y(e.body,t):(p=e.value)==null?S:p,x+=" ");break;case"array":var _r108=e.environmentName;if(e.isMultiline)x=e.rows.map(function(e){return e.map(function(e){return Y(e,t);}).join("");}).join("\n");else{var _n190=(m={bmatrix:["[","]"],"bmatrix*":["[","]"]}[_r108])==null?["(",")"]:m,_i92=[],_a57=e.rows;var _iterator152=_createForOfIteratorHelper(_a57),_step152;try{for(_iterator152.s();!(_step152=_iterator152.n()).done;){var _e558=_step152.value;var _r109=[];var _iterator153=_createForOfIteratorHelper(_e558),_step153;try{for(_iterator153.s();!(_step153=_iterator153.n()).done;){var _n191=_step153.value;_r109.push(Y(_n191,t));}}catch(err){_iterator153.e(err);}finally{_iterator153.f();}_i92.push(_n190[0]+_r109.join(",")+_n190[1]);}}catch(err){_iterator152.e(err);}finally{_iterator152.f();}var _o37=(h={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[_r108])==null?["(",")"]:h;x=_o37[0]+_i92.join(",")+_o37[1];}break;case"box":break;case"spacing":x=(_=(g=yg[C])==null?yg[S]:g)==null?" ":_;break;case"enclose":x="("+Y(e.body,t)+")";break;case"space":x=" ";break;case"subsup":x="";break;case"macro":x=(b=(y=(v=yg[C])==null?yg[S]:v)==null?bg[S]:y)==null?Y(e.body,t):b;break;}if(!e.hasEmptyBranch("subscript")){x+="_";var _n192=Y(e.subscript,t);x+=_n192.length===1?_n192:"(".concat(_n192,")");}if(!e.hasEmptyBranch("superscript")){x+="^";var _n193=Y(e.superscript,t);x+=_n193.length===1?_n193:"(".concat(_n193,")");}return x;}function Cg(e,t){if(!t)return e;var n=e;return t.variant==="double-struck"&&(n="bbb \"".concat(n,"\"")),t.variant==="script"&&(n="cc \"".concat(n,"\"")),t.variant==="fraktur"&&(n="fr \"".concat(n,"\"")),t.variant==="sans-serif"&&(n="sf \"".concat(n,"\"")),t.variant==="monospace"&&(n="tt \"".concat(n,"\"")),t.variantStyle==="bold"&&(n="bb \"".concat(n,"\"")),t.color?"color({".concat(t.color,"})(").concat(n,")"):n;}function X(e,t){var n;var r=l(c({},Qs()),{renderPlaceholder:function renderPlaceholder(){return new F(160,{maxFontSize:1});}});if(t!=null&&t.letterShapeStyle&&(t==null?void 0:t.letterShapeStyle)!=="auto"&&(r.letterShapeStyle=t.letterShapeStyle),t!=null&&t.macros){var _e559=dt(t==null?void 0:t.macros);r.getMacro=function(t){return pt(t,_e559);};}t!=null&&t.registers&&(r.registers=c(c({},r.registers),t.registers));var i=(n=t==null?void 0:t.defaultMode)==null?"math":n,a="math",o="displaystyle";i==="inline-math"?o="textstyle":i==="math"?o="displaystyle":i==="text"&&(o="textstyle",a="text");var s=new I({from:r}),u=new L({type:"root",mode:a,body:eu(e,{context:s,parseMode:a,mathstyle:o})}).render(s);return u?(Ss(Ou(u,s)),Cs(u,{classes:"ML__latex"}).toMarkup()):"";}function wg(e,t){var n=c({},Qs());if(t!=null&&t.macros){var _e560=dt(t.macros);n.getMacro=function(t){return pt(t,_e560);};}return tu(e,{context:n});}function Tg(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return q(eu(e,{parseMode:"math",args:function args(){return"";},mathstyle:"displaystyle"}),t);}function Eg(e){return vg(eu(e,{parseMode:"math",mathstyle:"displaystyle"}));}var Dg;function Og(e){var t,n;if(!Dg){var _e561=(t=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;_e561?Dg=new _e561():console.error("MathLive 0.110.0: The CortexJS Compute Engine library is not available.\n \n Load the library, for example with:\n \n import \"https://esm.run/@cortex-js/compute-engine\"");}return(n=Dg==null?void 0:Dg.box(e).latex)==null?"":n;}function kg(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"math";return Y(new L({type:"root",body:eu(e,{parseMode:t})}));}function Ag(e){return _c(e,{format:"ascii-math"})[1];}function jg(e){if(_typeof(e)=="string"){var _t254=Ng(e);if(!_t254)throw Error("Invalid color: ".concat(e));return _t254;}return"C"in e?Bg(e):"a"in e?zg(e):e;}function Mg(e){return e<0?0:e>255?255:Math.round(e);}function Ng(e){if(!e||e[0]!=="#")return;e=e.slice(1);var 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==null?void 0:t.a)===void 0&&(t.a=1),t;}function Pg(e){var _ref0=[e.L,e.C,e.H],t=_ref0[0],n=_ref0[1],r=_ref0[2],i=r*Math.PI/180,a={L:t,a:n*Math.cos(i),b:n*Math.sin(i)};return e.alpha!==void 0&&(a.alpha=e.alpha),a;}function Fg(e){var _ref1=[e.L,e.a,e.b],t=_ref1[0],n=_ref1[1],r=_ref1[2],i={L:t,C:Math.sqrt(n*n+r*r),H:Math.atan2(r,n)*180/Math.PI};return e.alpha!==void 0&&(i.alpha=e.alpha),i;}function Ig(e){var _ref10=[e.L,e.a,e.b],t=_ref10[0],n=_ref10[1],r=_ref10[2],i=Math.pow(.9999999984505198*t+.39633779217376786*n+.2158037580607588*r,3),a=Math.pow(1.00000000888176*t-.10556134232365635*n-.0638541747717059*r,3),o=Math.pow(t*1.000000054672411-.0894841820949657*n-1.2914855378640917*r,3),s=4.076741661347994*i-3.307711590408193*a+.230969928729428*o,c=-1.2684380040921763*i+2.6097574006633715*a-.3413193963102197*o,l=-.004196086541837188*i-.7034186144594493*a+1.7076147009309444*o,u=function u(e){var t=Math.abs(e);return t<=.0031308?e*12.92:(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055);};return[u(s),u(c),u(l)];}function Lg(e){var _e562=_slicedToArray(e,3),t=_e562[0],n=_e562[1],r=_e562[2];return t>=0&&t<=1&&n>=0&&n<=1&&r>=0&&r<=1;}function Rg(e,t){var _e563=_slicedToArray(e,3),n=_e563[0],r=_e563[1],i=_e563[2];return n=Mg(n*255),r=Mg(r*255),i=Mg(i*255),t===void 0?{r:n,g:r,b:i}:{r:n,g:r,b:i,alpha:t};}function zg(e){var _Ig3,_Ig4;var _Ig=Ig(e),_Ig2=_slicedToArray(_Ig,3),t=_Ig2[0],n=_Ig2[1],r=_Ig2[2];if(Lg([t,n,r]))return Rg([t,n,r],e.alpha);var i=Fg(e);if(i.C=0,_Ig3=Ig(Pg(i)),_Ig4=_slicedToArray(_Ig3,3),t=_Ig4[0],n=_Ig4[1],r=_Ig4[2],!Lg([t,n,r]))return Rg([t,n,r],e.alpha);var a=0,o=e.L,s=(a+o)/2;i.C=s;var c=.36/Math.pow(2,12);for(;o-a>c;){var _Ig5,_Ig6;s=(a+o)/2,i.C=s,_Ig5=Ig(Pg(i)),_Ig6=_slicedToArray(_Ig5,3),t=_Ig6[0],n=_Ig6[1],r=_Ig6[2],Lg([t,n,r])?a=s:o=s;}return Rg([t,n,r],e.alpha);}function Bg(e){return zg(Pg(e));}function Vg(e,t){var n=jg(e),r=jg(t),i=.022;function a(e){return e>=i?e:e+Math.pow(i-e,1.414);}function o(e){return(e<0?-1:1)*Math.pow(Math.abs(e),2.4);}var s=a(o(r.r/255)*.2126729+o(r.g/255)*.7151522+o(r.b/255)*.072175),c=a(o(n.r/255)*.2126729+o(n.g/255)*.7151522+o(n.b/255)*.072175),l,u,d;return Math.abs(c-s)<5e-4?u=0:c>s?(l=Math.pow(c,.56)-Math.pow(s,.57),u=l*1.14):(l=Math.pow(c,.65)-Math.pow(s,.62),u=l*1.14),d=Math.abs(u)<.1?0:u>0?u-.027:u+.027,d*100;}function Hg(e,t,n){n!=null||(n="#fff"),t!=null||(t="#000");var r=Vg(e,n),i=Vg(e,t);return Math.abs(r)>Math.abs(i)?n:t;}function Ug(e){var t=jg(e),n=((1<<24)+(Mg(t.r)<<16)+(Mg(t.g)<<8)+Mg(t.b)).toString(16).slice(1);return t.alpha!==void 0&&t.alpha<1&&(n+=("00"+Math.round(t.alpha*255).toString(16)).slice(-2)),n[0]===n[1]&&n[2]===n[3]&&n[4]===n[5]&&n[6]===n[7]&&(n=n[0]+n[2]+n[4]+(t.alpha!==void 0&&t.alpha<1?n[6]:"")),"#"+n;}function Z(e){var t=Wg(e),n="";var _iterator154=_createForOfIteratorHelper(t),_step154;try{for(_iterator154.s();!(_step154=_iterator154.n()).done;){var _e564=_step154.value;if(_typeof(_e564.value)!="string")return"";n+=_e564.value;}}catch(err){_iterator154.e(err);}finally{_iterator154.f();}return n;}function Wg(e){var t=e.model.selection.ranges;if(t.length!==1)return[];var n=e.model.getAtoms(t[0]);return n.length===1&&n[0].isRoot&&(n=n[0].children),n.filter(function(e){return e.type!=="first";});}function Gg(e,t){var n=Wg(e);if(n.length!==1)return!1;var r=Gu[t];return r?!!r.test(n[0].value):!1;}function Kg(e){return[s_(e,"double-struck","mathbb","tooltip.blackboard"),s_(e,"fraktur","mathfrak","tooltip.fraktur"),s_(e,"calligraphic","mathcal","tooltip.caligraphic"),c_(e,"up","mathrm","tooltip.roman-upright"),c_(e,"bold","bm","tooltip.bold"),c_(e,"italic","mathit","tooltip.italic")];}function qg(e){return[{id:"accent-vec",class:"ML__center-menu",label:function label(){return X("\\vec{".concat(Z(e),"}"));},visible:function visible(){return Z(e).length===1;},onMenuSelect:function onMenuSelect(){return e.insert("\\vec{#@}",{selectionMode:"item"});}},{id:"accent-overrightarrow",class:"ML__center-menu",label:function label(){return X("\\overrightarrow{".concat(Z(e),"}"));},visible:function visible(){return Z(e).length>0;},onMenuSelect:function onMenuSelect(){return e.insert("\\overrightarrow{#@}",{selectionMode:"item"});}},{id:"accent-overleftarrow",class:"ML__center-menu",label:function label(){return X("\\overleftarrow{".concat(Z(e),"}"));},visible:function visible(){return Z(e).length>0;},onMenuSelect:function onMenuSelect(){return e.insert("\\overleftarrow{#@}",{selectionMode:"item"});}},{id:"accent-dot",class:"ML__center-menu",label:function label(){return X("\\dot{".concat(Z(e),"}"));},visible:function visible(){return Z(e).length===1;},onMenuSelect:function onMenuSelect(){return e.insert("\\dot{#@}",{selectionMode:"item"});}},{id:"accent-ddot",class:"ML__center-menu",label:function label(){return X("\\ddot{".concat(Z(e),"}"));},visible:function visible(){return Z(e).length===1;},onMenuSelect:function onMenuSelect(){return e.insert("\\ddot{#@}",{selectionMode:"item"});}},{id:"accent-bar",class:"ML__center-menu",label:function label(){return X("\\bar{".concat(Z(e),"}"));},visible:function visible(){return Z(e).length===1;},onMenuSelect:function onMenuSelect(){return e.insert("\\bar{#@}",{selectionMode:"item"});}},{id:"accent-overline",class:"ML__center-menu",label:function label(){return X("\\overline{".concat(Z(e),"}"));},visible:function visible(){return Z(e).length>0;},onMenuSelect:function onMenuSelect(){return e.insert("\\overline{#@}",{selectionMode:"item"});}},{id:"accent-overgroup",class:"ML__center-menu",label:function label(){return X("\\overgroup{".concat(Z(e),"}"));},visible:function visible(){return Z(e).length>0;},onMenuSelect:function onMenuSelect(){return e.insert("\\overgroup{#@}",{selectionMode:"item"});}},{id:"accent-overbrace",class:"ML__center-menu",label:function label(){return X("\\overbrace{".concat(Z(e),"}"));},visible:function visible(){return Z(e).length>0;},onMenuSelect:function onMenuSelect(){return e.insert("\\overbrace{#@}",{selectionMode:"item"});}},{id:"accent-underline",class:"ML__center-menu",label:function label(){return X("\\underline{".concat(Z(e),"}"));},visible:function visible(){return Z(e).length>0;},onMenuSelect:function onMenuSelect(){return e.insert("\\underline{#@}",{selectionMode:"item"});}},{id:"accent-undergroup",class:"ML__center-menu",label:function label(){return X("\\undergroup{".concat(Z(e),"}"));},visible:function visible(){return Z(e).length>0;},onMenuSelect:function onMenuSelect(){return e.insert("\\undergroup{#@}",{selectionMode:"item"});}},{id:"accent-underbrace",class:"ML__center-menu",label:function label(){return X("\\underbrace{".concat(Z(e),"}"));},visible:function visible(){return Z(e).length>0;},onMenuSelect:function onMenuSelect(){return e.insert("\\underbrace{#@}",{selectionMode:"item"});}}];}function Jg(e){return[{id:"decoration-boxed",label:function label(){return X("\\boxed{".concat(e.getValue(e.model.selection),"}}"));},onMenuSelect:function onMenuSelect(){return e.insert("\\boxed{#@}",{selectionMode:"item"});}},{id:"decoration-red-box",label:function label(){return X("\\bbox[5px, border: 2px solid red]{".concat(e.getValue(e.model.selection),"}"));},onMenuSelect:function onMenuSelect(){return e.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"});}},{id:"decoration-dashed-black-box",label:function label(){return X("\\bbox[5px, border: 2px dashed black]{".concat(e.getValue(e.model.selection),"}"));},onMenuSelect:function onMenuSelect(){return e.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"});}}];}function Yg(e){var t=[];var _loop2=function _loop2(){var n=_Object$keys1[_i93];t.push({id:"background-color-".concat(n),class:(Ug(Hg(we[n]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:"<span style=\"background:".concat(we[n]," \"></span>"),ariaLabel:function ariaLabel(){var e;return(e=O(n))==null?n:e;},checked:function checked(){var t;return(t={some:"mixed",all:!0}[e.queryStyle({backgroundColor:n})])==null?!1:t;},onMenuSelect:function onMenuSelect(){return e.applyStyle({backgroundColor:n},{operation:"toggle"});}});};for(var _i93=0,_Object$keys1=Object.keys(we);_i93<_Object$keys1.length;_i93++){_loop2();}return t;}function Xg(e){var t=[];var _loop3=function _loop3(){var n=_Object$keys10[_i94];t.push({id:"color-".concat(n),class:(Hg(Te[n])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:"<span style=\"background:".concat(Te[n]," \"></span>"),ariaLabel:function ariaLabel(){var e;return(e=O(n))==null?n:e;},checked:function checked(){var t;return(t={some:"mixed",all:!0}[e.queryStyle({color:n})])==null?!1:t;},onMenuSelect:function onMenuSelect(){return e.applyStyle({color:n},{operation:"toggle"});}});};for(var _i94=0,_Object$keys10=Object.keys(Te);_i94<_Object$keys10.length;_i94++){_loop3();}return t;}var Zg=function(_Nh){function Zg(e,t,n,r){var _this44;_classCallCheck(this,Zg);_this44=_callSuper(this,Zg,[e,t]),_this44.row=n,_this44.col=r;return _this44;}_inherits(Zg,_Nh);return _createClass(Zg,[{key:"active",set:function set(e){var t=this.parentMenu.children;if(e){var _iterator155=_createForOfIteratorHelper(t),_step155;try{for(_iterator155.s();!(_step155=_iterator155.n()).done;){var _e565=_step155.value;_e565.element.classList.toggle("active",_e565.row<=this.row&&_e565.col<=this.col);}}catch(err){_iterator155.e(err);}finally{_iterator155.f();}}else{var _iterator156=_createForOfIteratorHelper(t),_step156;try{for(_iterator156.s();!(_step156=_iterator156.n()).done;){var _e566=_step156.value;_e566.element.classList.remove("active");}}catch(err){_iterator156.e(err);}finally{_iterator156.f();}}}}]);}(Nh);function Qg(e){var t=[];var _loop4=function _loop4(_n194){var _loop5=function _loop5(_r110){t.push({id:"insert-matrix-".concat(_n194,"x").concat(_r110),onCreate:function onCreate(e,t){return new Zg(e,t,_n194,_r110);},label:"\u2610",tooltip:function tooltip(){return O("tooltip.row-by-col",_n194,_r110);},data:{row:_n194,col:_r110},onMenuSelect:function onMenuSelect(){e.insert("\\begin{pmatrix}".concat(Array(_n194).fill(Array(_r110).fill("#?").join(" & ")).join("\\\\"),"\\end{pmatrix}"),{selectionMode:"item"});}});};for(var _r110=1;_r110<=5;_r110++){_loop5(_r110);}};for(var _n194=1;_n194<=5;_n194++){_loop4(_n194);}return t;}function $g(e){return[{label:function label(){return O("menu.array.add row above");},id:"add-row-above",onMenuSelect:function onMenuSelect(){return e.executeCommand("addRowBefore");},keyboardShortcut:"shift+alt+[Return]",visible:function visible(){if(!e.isSelectionEditable||!e_(e))return!1;var _r_=r_(e),_r_2=_slicedToArray(_r_,2),t=_r_2[0],n=_r_2[1],_i_=i_(e),_i_2=_slicedToArray(_i_,2),r=_i_2[0],i=_i_2[1];return t!==r;}},{label:function label(){return O("menu.array.add row below");},id:"add-row-below",onMenuSelect:function onMenuSelect(){return e.executeCommand("addRowAfter");},keyboardShortcut:"alt+[Return]",visible:function visible(){if(!e.isSelectionEditable||!e_(e))return!1;var _r_3=r_(e),_r_4=_slicedToArray(_r_3,2),t=_r_4[0],n=_r_4[1],_i_3=i_(e),_i_4=_slicedToArray(_i_3,2),r=_i_4[0],i=_i_4[1];return t!==r;}},{label:function label(){return O("menu.array.add column before");},id:"add-column-before",onMenuSelect:function onMenuSelect(){return e.executeCommand("addColumnBefore");},visible:function visible(){if(!e.isSelectionEditable||!e_(e))return!1;var _r_5=r_(e),_r_6=_slicedToArray(_r_5,2),t=_r_6[0],n=_r_6[1],_i_5=i_(e),_i_6=_slicedToArray(_i_5,2),r=_i_6[0],i=_i_6[1];return n!==i;},keyboardShortcut:"shift+alt+[Tab]",enabled:function enabled(){var t=e.model.parentEnvironment;if(!t)return!1;var _n_=n_(e),_n_2=_slicedToArray(_n_,2),n=_n_2[0],r=_n_2[1];return n<t.maxColumns;}},{label:function label(){return O("menu.array.add column after");},id:"add-column-after",onMenuSelect:function onMenuSelect(){return e.executeCommand("addColumnAfter");},keyboardShortcut:"alt+[Tab]",visible:function visible(){if(!e.isSelectionEditable||!e_(e))return!1;var _r_7=r_(e),_r_8=_slicedToArray(_r_7,2),t=_r_8[0],n=_r_8[1],_i_7=i_(e),_i_8=_slicedToArray(_i_7,2),r=_i_8[0],i=_i_8[1];return n!==i;}},{type:"divider"},{label:function label(){return O("menu.array.delete row");},id:"delete-row",onMenuSelect:function onMenuSelect(){return e.executeCommand("removeRow");},enabled:function enabled(){var _r_9=r_(e),_r_0=_slicedToArray(_r_9,2),t=_r_0[0],n=_r_0[1],_n_3=n_(e),_n_4=_slicedToArray(_n_3,2),r=_n_4[0],i=_n_4[1];return r>t;},visible:function visible(){if(!e.isSelectionEditable||!e_(e))return!1;var _r_1=r_(e),_r_10=_slicedToArray(_r_1,2),t=_r_10[0],n=_r_10[1],_i_9=i_(e),_i_0=_slicedToArray(_i_9,2),r=_i_0[0],i=_i_0[1];return t!==r;}},{label:function label(){return O("menu.array.delete column");},id:"delete-column",onMenuSelect:function onMenuSelect(){return e.executeCommand("removeColumn");},enabled:function enabled(){var _r_11=r_(e),_r_12=_slicedToArray(_r_11,2),t=_r_12[0],n=_r_12[1],_n_5=n_(e),_n_6=_slicedToArray(_n_5,2),r=_n_6[0],i=_n_6[1];return i>n;},visible:function visible(){if(!e.isSelectionEditable||!e_(e))return!1;var _r_13=r_(e),_r_14=_slicedToArray(_r_13,2),t=_r_14[0],n=_r_14[1],_i_1=i_(e),_i_10=_slicedToArray(_i_1,2),r=_i_10[0],i=_i_10[1];return n!==i;}},{type:"divider"},{label:function label(){return O("menu.borders");},visible:function visible(){return(t_(e)||e_(e))&&e.isSelectionEditable;},submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:function onMenuSelect(){return a_(e,"matrix");}},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:function onMenuSelect(){return a_(e,"pmatrix");}},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:function onMenuSelect(){return a_(e,"bmatrix");}},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:function onMenuSelect(){return a_(e,"vmatrix");}},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:function onMenuSelect(){return a_(e,"Bmatrix");}}],submenuClass:"border-submenu"},{type:"divider"},{label:function label(){return O("menu.insert matrix");},id:"insert-matrix",visible:function visible(){return e.isSelectionEditable;},submenu:Qg(e),submenuClass:"insert-matrix-submenu",columnCount:5},{type:"divider"},{label:function label(){return O("menu.insert");},id:"insert",submenu:l_(e)},{type:"divider"},{label:function label(){return O("menu.mode");},id:"mode",visible:function visible(){return e.isSelectionEditable&&e.model.selectionIsCollapsed;},submenu:[{label:function label(){return O("menu.mode-math");},id:"mode-math",onMenuSelect:function onMenuSelect(){Pd(e,"accept-all"),e.executeCommand(["switchMode","math"]);},checked:function checked(){return e.model.mode==="math";}},{label:function label(){return O("menu.mode-text");},id:"mode-text",onMenuSelect:function onMenuSelect(){Pd(e,"accept-all"),e.executeCommand(["switchMode","text"]);},checked:function checked(){return e.model.mode==="text";}},{label:function label(){return O("menu.mode-latex");},id:"mode-latex",onMenuSelect:function onMenuSelect(){return e.executeCommand(["switchMode","latex"]);},checked:function checked(){return e.model.mode==="latex";}}]},{type:"divider"},{label:function label(){return O("menu.font-style");},id:"variant",visible:function visible(){return e.isSelectionEditable;},submenu:Kg(e),submenuClass:"variant-submenu"},{label:function label(){return O("menu.color");},id:"color",visible:function visible(){return e.isSelectionEditable;},submenu:Xg(e),columnCount:4,submenuClass:"swatches-submenu"},{label:function label(){return O("menu.background-color");},id:"background-color",visible:function visible(){return e.isSelectionEditable;},submenu:Yg(e),columnCount:4,submenuClass:"swatches-submenu"},{label:function label(){return O("menu.accent");},id:"accent",visible:function visible(){return e.isSelectionEditable;},submenu:qg(e),submenuClass:"variant-submenu"},{label:function label(){return O("menu.decoration");},id:"decoration",visible:function visible(){return e.isSelectionEditable&&Z(e).length>0;},submenu:Jg(e),submenuClass:"variant-submenu"},{type:"divider"},{label:function label(){return O("menu.evaluate");},id:"ce-evaluate",visible:function visible(){return e.isSelectionEditable&&globalThis.MathfieldElement.computeEngine!==null;},onMenuSelect:function onMenuSelect(){var t=o_(e);if(!t){e.model.announce("plonk");return;}e.model.selectionIsCollapsed?(e.model.position=e.model.lastOffset,e.insert("=".concat(t),{insertionMode:"insertAfter",selectionMode:"item"})):e.insert(t,{insertionMode:"replaceSelection",selectionMode:"item"});}},{label:function label(){return O("menu.simplify");},id:"ce-simplify",visible:function visible(){return e.isSelectionEditable&&globalThis.MathfieldElement.computeEngine!==null;},onMenuSelect:function onMenuSelect(){var t,n;if(e.model.selectionIsCollapsed){var _n195=(t=e.expression)==null?void 0:t.simplify();if(e.model.position=e.model.lastOffset,!_n195){e.model.announce("plonk");return;}e.insert("=".concat(_n195.latex),{insertionMode:"insertAfter",selectionMode:"item"});}else{var _t255=(n=globalThis.MathfieldElement.computeEngine)==null?void 0:n.parse(e.getValue(e.model.selection)).simplify();if(!_t255){e.model.announce("plonk");return;}e.insert(_t255.latex,{insertionMode:"replaceSelection",selectionMode:"item"});}}},{label:function label(){var t;var n=globalThis.MathfieldElement.computeEngine;if(n===null)return"";var r=(t=e.expression)==null?void 0:t.unknowns[0];if(r){var _e567=n.box(r).latex;return O("menu.solve-for",X(_e567));}return O("menu.solve");},id:"ce-solve",visible:function 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:function onMenuSelect(){var t=e.expression,n=t==null?void 0:t.unknowns[0],r=t.solve(n),i=Array.isArray(r)?r.map(function(e){var t;return(t=e.simplify().latex)==null?"":t;}):null;if(!i){e.model.announce("plonk");return;}e.insert("".concat(n,"=").concat(i.length===1?i[0]:"\\left\\lbrace"+(i==null?void 0:i.join(", "))+"\\right\\rbrace"),{insertionMode:"replaceAll",selectionMode:"item"});}},{type:"divider"},{label:function label(){return O("menu.cut");},id:"cut",onMenuSelect:function onMenuSelect(){return e.executeCommand("cutToClipboard");},visible:function visible(){return!e.options.readOnly&&e.isSelectionEditable;},keyboardShortcut:"meta+X"},{label:function label(){return O("menu.copy");},id:"copy",submenu:[{label:function label(){return O("menu.copy-as-latex");},id:"copy-latex",onMenuSelect:function onMenuSelect(){return R.copyToClipboard(e,"latex");},keyboardShortcut:"meta+C"},{label:function label(){return O("menu.copy-as-typst");},id:"copy-latex",onMenuSelect:function onMenuSelect(){return R.copyToClipboard(e,"typst");}},{label:function label(){return O("menu.copy-as-ascii-math");},id:"copy-ascii-math",onMenuSelect:function onMenuSelect(){return R.copyToClipboard(e,"ascii-math");}},{label:function label(){return O("menu.copy-as-mathml");},id:"copy-math-ml",onMenuSelect:function onMenuSelect(){return R.copyToClipboard(e,"math-ml");}}]},{label:function label(){return O("menu.paste");},id:"paste",onMenuSelect:function onMenuSelect(){return e.executeCommand("pasteFromClipboard");},visible:function visible(){return e.hasEditableContent;},keyboardShortcut:"meta+V"},{label:function label(){return O("menu.select-all");},id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:function onMenuSelect(){return e.executeCommand("selectAll");}}];}function e_(e){var t,n;var r=(n=(t=e.model.parentEnvironment)==null?void 0:t.environmentName)==null?"":n;return["array","matrix","pmatrix","bmatrix","vmatrix","Bmatrix","cases","dcases","rcases"].includes(r);}function t_(e){var t=e.model.at(e.model.position);if(t.type!=="array")return!1;var n=t.environmentName;return["matrix","pmatrix","bmatrix","vmatrix","Bmatrix"].includes(n);}function n_(e){var t;var n=(t=e.model.parentEnvironment)==null?void 0:t.rows;return n?[n.length,n.reduce(function(e,t){return Math.max(e,t.length);},0)]:[0,0];}function r_(e){var t=e.model.parentEnvironment;return t?[t.minRows,t.minColumns]:[0,0];}function i_(e){var t=e.model.parentEnvironment;return t?[t.maxRows,t.maxColumns]:[0,0];}function a_(e,t){jd(e),e.flushInlineShortcutBuffer(),jp(e.model,t),U(e);}function o_(e){var t,n;var r;if(r=e.model.selectionIsCollapsed?(t=globalThis.MathfieldElement.computeEngine)==null?void 0:t.parse(e.getValue(),{canonical:!1}):(n=globalThis.MathfieldElement.computeEngine)==null?void 0:n.parse(e.getValue(e.model.selection),{canonical:!1}),!r)return"";var i=r.evaluate();return i.isSame(r)&&(i=r.N()),i.latex;}function s_(e,t,n,r){return{id:"variant-".concat(t),label:function label(){var t;return Z(e).length<12?X("\\".concat(n,"{").concat(Z(e),"}")):(t=O(r))==null?r:t;},class:"ML__xl",tooltip:function tooltip(){var e;return(e=O(r))==null?r:e;},visible:function visible(){return Gg(e,t);},checked:function checked(){var n;return(n={some:"mixed",all:!0}[e.queryStyle({variant:t})])==null?!1:n;},onMenuSelect:function onMenuSelect(){return e.applyStyle({variant:t},{operation:"toggle"});}};}function c_(e,t,n,r){return{id:"variant-style-".concat(t),label:function label(){var t;var i=Z(e);return i.length>0&&i.length<12?X("\\".concat(n,"{").concat(Z(e),"}")):(t=O(r))==null?r:t;},class:function _class(){var t=Z(e);return t.length>0&&t.length<12?"ML__xl":"";},tooltip:function tooltip(){var e;return(e=O(r))==null?r:e;},visible:!0,checked:function checked(){var n;return(n={some:"mixed",all:!0}[e.queryStyle({variantStyle:t})])==null?!1:n;},onMenuSelect:function onMenuSelect(){return e.applyStyle({variantStyle:t},{operation:"toggle"});}};}function l_(e){return[{label:function label(){return u_("abs");},id:"insert-abs",visible:function visible(){return e.isSelectionEditable;},onMenuSelect:function onMenuSelect(){return e.insert("|#?|");}},{label:function label(){return u_("nth-root");},id:"insert-nth-root",visible:function visible(){return e.isSelectionEditable;},onMenuSelect:function onMenuSelect(){return e.insert("\\sqrt[#?]{#?}");}},{label:function label(){return u_("log-base");},id:"insert-log-base",visible:function visible(){return e.isSelectionEditable;},onMenuSelect:function onMenuSelect(){return e.insert("\\log_{#?}{#?}");}},{type:"heading",label:function label(){return O("menu.insert.heading-calculus");}},{label:function label(){return u_("derivative");},id:"insert-derivative",visible:function visible(){return e.isSelectionEditable;},onMenuSelect:function onMenuSelect(){return e.insert("\\dfrac{\\mathrm{d}}{\\mathrm{d}x}#?\\bigm|_{x=#?}");}},{label:function label(){return u_("nth-derivative");},id:"insert-nth-derivative",visible:function visible(){return e.isSelectionEditable;},onMenuSelect:function onMenuSelect(){return e.insert("\\dfrac{\\mathrm{d}^#?}{\\mathrm{d}x^#?}#?\\bigm|_{x=#?}");}},{label:function label(){return u_("integral");},id:"insert-integral",visible:function visible(){return e.isSelectionEditable;},onMenuSelect:function onMenuSelect(){return e.insert("\\int_#?^#?#?\\,\\mathrm{d}#?");}},{label:function label(){return u_("sum");},id:"insert-sum",visible:function visible(){return e.isSelectionEditable;},onMenuSelect:function onMenuSelect(){return e.insert("\\sum_#?^#?#?");}},{label:function label(){return u_("product");},id:"insert-product",visible:function visible(){return e.isSelectionEditable;},onMenuSelect:function onMenuSelect(){return e.insert("\\prod_#?^#?#?");}},{type:"heading",label:function label(){return O("menu.insert.heading-complex-numbers");}},{label:function label(){return u_("modulus");},id:"insert-modulus",visible:function visible(){return e.isSelectionEditable;},onMenuSelect:function onMenuSelect(){return e.insert("\\lvert#?\\rvert");}},{label:function label(){return u_("argument");},id:"insert-argument",visible:function visible(){return e.isSelectionEditable;},onMenuSelect:function onMenuSelect(){return e.insert("\\arg(#?)");}},{label:function label(){return u_("real-part");},id:"insert-real-part",visible:function visible(){return e.isSelectionEditable;},onMenuSelect:function onMenuSelect(){return e.insert("\\Re(#?)");}},{label:function label(){return u_("imaginary-part");},id:"insert-imaginary-part",visible:function visible(){return e.isSelectionEditable;},onMenuSelect:function onMenuSelect(){return e.insert("\\Im(#?)");}},{label:function label(){return u_("conjugate");},id:"insert-conjugate",visible:function visible(){return e.isSelectionEditable;},onMenuSelect:function onMenuSelect(){return e.insert("\\overline{#?}");}}];}function u_(e){return"<span class='ML__insert-template'> ".concat(X(O("menu.insert.".concat(e,"-template"))),"</span><span class=\"ML__insert-label\">").concat(O("menu.insert.".concat(e)),"</span>");}var d_={"\\ne":"!=","\\neq":"!=","\u2212":"-","-":"-","\\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 ","/":"\\/","&":"&"},f_={"[":" bracket.l ","]":" bracket.r ","{":" brace.l ","}":" brace.r ","(":" paren.l ",")":" paren.r ","<":" angle.l ",">":" angle.r ",".":""},p_={" bracket.l ":"["," bracket.r ":"]"," brace.l ":"{"," brace.r ":"}"," paren.l ":"("," paren.r ":")"," angle.l ":" angle.l "," angle.r ":" angle.r "},m_={"\\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":" \u22C8 ","\\circ":" circle.stroked.small "},h_={underarc:"underparen",underparen:"underparen",underbrace:"underbrace",underline:"underline",overarc:"overparen",overparen:"overparen",overbrace:"overbrace",overline:"overline",cancel:"cancel",displaystyle:"display",textstyle:"inline"},g_={longrightarrow:function longrightarrow(e){return"arrow.r.long^(".concat(Q(e.above),")");},longleftarrow:function longleftarrow(e){return"arrow.l.long^(".concat(Q(e.above),")");}};function __(e){var t="";var _iterator157=_createForOfIteratorHelper(e),_step157;try{for(_iterator157.s();!(_step157=_iterator157.n()).done;){var _n196=_step157.value;var _e568=t[t.length-1];_e568!==void 0&&(/\d$/.test(_e568)&&/^\d/.test(_n196)||/[a-zA-Z]$/.test(_e568)&&/^[a-zA-Z]/.test(_n196))&&(t+=" "),t+=_n196;}}catch(err){_iterator157.e(err);}finally{_iterator157.f();}return t;}function Q(e){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,ee;if(!e)return"";if(xe(e)){if(e.length===0)return"";if(e[0].mode==="latex")return e.map(function(e){return Q(e);}).join("");if(e[0].mode==="text"){var _n197=0,_r111="";for(;((t=e[_n197])==null?void 0:t.mode)==="text";)_r111+=e[_n197].body?Q(e[_n197].body):e[_n197].value,_n197++;return" \"".concat(_r111,"\" ").concat(Q(e.slice(_n197)));}var _i95=0,_a58=[];for(;((n=e[_i95])==null?void 0:n.mode)==="math";){var _t256="";for(;((r=e[_i95])==null?void 0:r.type)==="mord"&&/\d/.test(e[_i95].value);)_t256+=e[_i95++].value;_t256?_a58.push(_t256):_a58.push(Q(e[_i95++]));}return _a58.push(Q(e.slice(_i95))),__(_a58);}if(e.mode==="text")return"\"".concat(e.value,"\"");var C="",w=e.command,te;if(w==="\\placeholder")return"\"".concat(Q(e.body),"\"");var T=L.serialize([e],{expandMacro:!0,defaultMode:"math"});switch(e.type){case"accent":var _t257={"\\vec":"arrow","\\dot":"dot","\\ddot":"dot.double","\\bar":"overline","\\hat":"hat","\\acute":"acute","\\grave":"grave","\\tilde":"tilde","\\breve":"breve","\\check":"caron"}[w];C="".concat(_t257==null?"":_t257,"(").concat(Q(e.body),") ");break;case"first":return"";case"latexgroup":return e.body.map(function(e){return e.value;}).join("");case"group":case"root":C=(i=d_[w])==null?Q(e.body):i;break;case"genfrac":{var _t258=e;_t258.hasBarLine?(C+="(",C+=Q(_t258.above),C+=")/(",C+=Q(_t258.below),C+=")"):C+="binom(".concat(Q(_t258.above),", ").concat(Q(_t258.below),")");}break;case"surd":e.hasEmptyBranch("above")?C+="sqrt(".concat(Q(e.body),")"):C+="root(".concat(Q(e.above),", ").concat(Q(e.body),")");break;case"latex":C=e.value;break;case"leftright":{var _t259=e,_n198=_t259.leftDelim;_n198&&d_[_n198]&&(_n198=d_[_n198]);var _r112=_t259.matchingRightDelim();_r112&&d_[_r112]&&(_r112=d_[_r112]),_n198&&(_n198=(a=f_[_n198])==null?_n198:a),_r112&&(_r112=(o=f_[_r112])==null?_r112:o),C=_n198&&_r112?"lr(".concat((s=p_[_n198])==null?_n198:s).concat(Q(_t259.body)).concat((c=p_[_r112])==null?_r112:c,")"):"lr(".concat(_n198).concat(Q(_t259.body)).concat(_r112,")");}break;case"sizeddelim":case"delim":C=e.value;break;case"overlap":break;case"mord":if(d_[T])return d_[T];C=(d=(u=(l=d_[w])==null?w:l)==null?w:u)==null?_typeof(e.value)=="string"?e.value:"":d,C.startsWith("\\")&&(C+=" "),te=w?w.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,te?C=String.fromCodePoint(Number.parseInt("0x"+te[1])):C.length>0&&C.startsWith("\\")&&(C=_typeof(e.value)=="string"?e.value.charAt(0):e.command),C=v_(C,e.style),C=" ".concat(C," ");break;case"mbin":case"mrel":case"minner":C=(m=(p=(f=d_[T])==null?d_[w]:f)==null?m_[w]:p)==null?e.value:m;break;case"mopen":case"mclose":C=(h=d_[T])==null?e.value:h;break;case"mpunct":C=(g=m_[w])==null?w:g;break;case"mop":case"operator":case"extensible-symbol":e.value!=="\u200B"&&(C=m_[w]?m_[w]:w==="\\operatorname"?Q(e.body):(_=e.value)==null?w:_,C+=" ");break;case"array":var _n199=e.environmentName;if(e.isMultiline)C=e.rows.map(function(e){return e.map(function(e){return Q(e);}).join("");}).join("\n");else{var _t260=e.rows,_r113=_t260.map(function(e){return e.map(Q).join(", ");}),_i96={pmatrix:"\"(\"",bmatrix:"\"[\"","bmatrix*":"\"[\"",Bmatrix:"\"{\"",vmatrix:"\"|\"",matrix:"#none"}[_n199];C=_i96?"mat(delim: ".concat(_i96,", ").concat(_r113.join(" ; "),")"):_n199==="cases"||_n199==="rcases"?"cases(reverse: #".concat(_n199==="rcases",", ").concat(_r113.join(", "),")"):_n199==="aligned"?_t260.map(function(e){return e.map(Q).join(" & ");}).join(" \\ "):_t260.map(function(e){return e.map(Q).join("");}).join("");}break;case"box":break;case"spacing":C=(y=(v=d_[T])==null?d_[w]:v)==null?" ":y;break;case"space":C=" ";break;case"subsup":C=(b=e.leftSibling)!=null&&b.value?"":"\"\"";break;case"macro":C=(ee=(S=(x=d_[T])==null?d_[w]:x)==null?m_[w]:S)==null?Q(e.body):ee;break;case"overunder":break;}if(!C){var _t261=h_[e.command.slice(1)];_t261&&(C="".concat(_t261,"(").concat(Q(e.body),")"));}if(!C){var _t262=g_[e.command.slice(1)];_t262&&(C=_t262(e));}if(!e.hasEmptyBranch("subscript")){C+="_";var _t263=Q(e.subscript);C+=_t263.length===1?_t263:"(".concat(_t263,")");}if(!e.hasEmptyBranch("superscript")){C+="^";var _t264=Q(e.superscript);C+=_t264.length===1?_t264:"(".concat(_t264,")");}return C;}function v_(e,t){if(!t)return e;var n=e;return t.variant==="double-struck"&&(n="bb(".concat(n,")")),t.variant==="script"&&(n="cal(".concat(n,")")),t.variant==="fraktur"&&(n="frak(".concat(n,")")),t.variant==="sans-serif"&&(n="sans(".concat(n,")")),t.variant==="monospace"&&(n="mono(".concat(n,")")),t.variantStyle==="bold"&&(n="bold(".concat(n,")")),n;}function y_(e,t){return _typeof(e)=="string"?e+vg(t):vg(e);}function b_(e){var t;var n;if(e.parent.type==="prompt")e.parentBranch==="body"&&(n="prompt");else if(e.parentBranch==="body"){if(e.type==="first"&&(e.parent.type==="root"?n="mathfield":e.parent.type==="surd"?n="radicand":e.parent.type==="genfrac"?n="fraction":e.parent.type==="sizeddelim"&&(n="delimiter"),n))return n;e.type==="subsup"?e.superscript&&e.subscript?n="superscript and subscript":e.superscript?n="superscript":e.subscript&&(n="subscript"):e.type&&(n=(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?"parent":t);}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"&&(n="index"):e.parentBranch==="superscript"?n="superscript":e.parentBranch==="subscript"&&(n="subscript");return n==null?"parent":n;}function x_(e,t,n,r){var i="";if(t==="plonk"){globalThis.MathfieldElement.playSound("plonk"),e.flushInlineShortcutBuffer();return;}if(t==="delete")i=y_("deleted: ",r);else if(t==="focus"||t.includes("move"))i=S_(e.model,n),i+=C_(e.model);else if(t==="replacement")i=y_(e.model.at(e.model.position));else if(t==="line"){var _t265=y_(e.model.root);e.keyboardDelegate.setAriaLabel(_t265);}else i=r?y_(t+" ",r):t;if(i&&e.ariaLiveText){var _t266=e.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";e.ariaLiveText.textContent=i+_t266;}}function S_(e,t){if(Number.isNaN(t))return"";var n=e.at(t);if(!n||n.treeDepth<=e.at(e.position).treeDepth)return"";var r="",i=n.parent,a=e.at(e.position).parent;for(;i!==e.root&&i!==a;)r+="out of ".concat(b_(i),";"),i=i.parent;return r;}function C_(e){if(!e.selectionIsCollapsed)return"selected: ".concat(y_(e.getAtoms(e.selection)));var t="",n=e.at(e.position);if(n.isFirstSibling&&(t="start of ".concat(b_(n),": ")),n.isLastSibling){if(!n.isFirstSibling){if(!n.parent.parent)return"".concat(y_(n),"; end of mathfield");t="".concat(y_(n),"; end of ").concat(b_(n));}}else t+=y_(n);return t;}var w_=function(){function w_(e,t,n){_classCallCheck(this,w_);this.mathfield=e,this.mode=t,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=n;}return _createClass(w_,[{key:"dispose",value:function dispose(){this.mathfield=void 0;}},{key:"getState",value:function getState(){var e={ranges:_toConsumableArray(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};}},{key:"setState",value:function setState(e,t){var n;var r=this.silenceNotifications;this.silenceNotifications=(n=t==null?void 0:t.silenceNotifications)==null?!0:n;var i={};if((t==null?void 0:t.type)==="undo"&&(i={inputType:"historyUndo"}),(t==null?void 0:t.type)==="redo"&&(i={inputType:"historyRedo"}),this.contentWillChange(i)){var _t267=this.silenceNotifications;this.silenceNotifications=!0,this.mode=e.mode,this.root=Mu(e.content),this.selection=e.selection,this.silenceNotifications=_t267,this.contentDidChange(i),this.selectionDidChange();}this.silenceNotifications=r;}},{key:"atoms",get:function get(){return this.root.children;}},{key:"selection",get:function get(){return this._selection;},set:function set(e){this.setSelection(e);}},{key:"setSelection",value:function setSelection(e,t){var _this45=this;return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0,content:!0},function(){var _s21,_s22,_s23,_s24;var n,r,i,a;var o=_this45.normalizeSelection(e,t);if(o===void 0)throw TypeError("Invalid selection");if(o.ranges.length===1&&o.ranges[0][0]===o.ranges[0][1]){var _e569=o.ranges[0][0];if(!_this45.mathfield.dirty&&!((n=_this45.at(_e569))!=null&&n.parentPrompt)&&_this45.mathfield.hasEditablePrompts){if((r=_this45.at(_e569-1))!=null&&r.parentPrompt){_this45._anchor=_this45.normalizeOffset(_e569-1),_this45._position=_this45._anchor,_this45._selection=_this45.normalizeSelection(_this45._anchor);return;}if((i=_this45.at(_e569+1))!=null&&i.parentPrompt){_this45._anchor=_this45.normalizeOffset(_e569+1),_this45._position=_this45._anchor,_this45._selection=_this45.normalizeSelection(_this45._anchor);return;}_this45._anchor=0,_this45._position=0,_this45._selection={ranges:[[0,0]]};return;}_this45._anchor=_e569,_this45._position=_e569,_this45._selection=o;return;}var s=lc(o);s=D_(_this45,s),o.direction==="backward"?(_s21=s,_s22=_slicedToArray(_s21,2),_this45._position=_s22[0],_this45._anchor=_s22[1],_s21):(_s23=s,_s24=_slicedToArray(_s23,2),_this45._anchor=_s24[0],_this45._position=_s24[1],_s23);var c=s[0]+1;for(;c<=_this45.lastOffset&&((a=_this45.at(c))==null?void 0:a.type)==="first"&&c<s[1];)c+=1;var l=c<=_this45.lastOffset?_this45.at(c):_this45.at(s[1]),u=_this45.at(s[1]),d=L.commonAncestor(l,u);(d==null?void 0:d.type)==="array"&&l.parent===d&&u.parent,_this45._selection={ranges:[s],direction:o.direction},_this45._position>=0&&(_this45._position,_this45.lastOffset);});}},{key:"setPositionHandlingPlaceholder",value:function setPositionHandlingPlaceholder(e){var t;var n=this.at(e);(n==null?void 0:n.type)==="placeholder"?this.setSelection(e-1,e):((t=n==null?void 0:n.rightSibling)==null?void 0:t.type)==="placeholder"?this.setSelection(e,e+1):this.position=e,n instanceof mu&&n.isSuggestion&&(n.isSuggestion=!1),this.mathfield.stopCoalescingUndo();}},{key:"position",get:function get(){return this._position;},set:function set(e){this.setSelection(e,e);}},{key:"anchor",get:function get(){return this._anchor;}},{key:"selectionIsCollapsed",get:function get(){return this._anchor===this._position;}},{key:"selectionIsPlaceholder",get:function get(){return Math.abs(this._anchor-this._position)===1?this.at(Math.max(this._anchor,this._position)).type==="placeholder":!1;}},{key:"collapseSelection",value:function collapseSelection(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"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);}},{key:"lastOffset",get:function get(){return this.atoms.length-1;}},{key:"at",value:function at(e){return this.atoms[e];}},{key:"offsetOf",value:function offsetOf(e){return this.atoms.indexOf(e);}},{key:"getSiblingsRange",value:function getSiblingsRange(e){var t=this.at(e),n=t.parent;if(!n)return[0,this.lastOffset];var r=t.parent.branch(t.parentBranch);return[this.offsetOf(r[0]),this.offsetOf(r[r.length-1])];}},{key:"getBranchRange",value:function getBranchRange(e,t){var n=this.at(e).branch(t);return[this.offsetOf(n[0]),this.offsetOf(n[n.length-1])];}},{key:"getCellRange",value:function getCellRange(e){var t,n;this.getParentCell(e);var r=this.at(e);if(r){for(;r&&((t=r.parent)==null?void 0:t.type)!=="array";)r=r.parent;if(((n=r==null?void 0:r.parent)==null?void 0:n.type)==="array")return[this.offsetOf(r.firstSibling),this.offsetOf(r.lastSibling)];}}},{key:"getAtoms",value:function getAtoms(e,t,n){var _this46=this,_e570,_e571;var r=n==null?{}:n;if(fc(e)){if(r=t==null?{}:t,e.ranges.length>1)return e.ranges.reduce(function(e,t){return[].concat(_toConsumableArray(e),_toConsumableArray(_this46.getAtoms(t,r)));},[]);e=e.ranges[0];}var i,a;if(uc(e)){if(i=e,!uc(t))return[];a=t;}else _e570=e,_e571=_slicedToArray(_e570,2),i=_e571[0],a=_e571[1],Object.keys(r).length===0&&(r=t==null?{}:t);if(!Number.isFinite(i))return[];r.includeChildren===void 0&&(r.includeChildren=!1),i<0&&(i=this.lastOffset-i+1),a<0&&(a=this.lastOffset+a+1);var o=Math.min(i,a),s=Math.max(i,a),c=o===0?0:o+1,l=s;if(!r.includeChildren&&c===1&&l===this.lastOffset)return[this.root];var u=[];for(var _e572=c;_e572<=l;_e572++){var _t268=this.atoms[_e572];T_(this,_t268,c,l,r.includeFirstAtoms)&&u.push(_t268);}return r.includeChildren||(u=u.filter(function(e){var t=!1,n=e.parent;for(;n&&!t;)t=T_(_this46,n,c,l,r.includeFirstAtoms),n=n.parent;return!t;})),u;}},{key:"findAtom",value:function findAtom(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"forward";var r,i=this.lastOffset;if(n==="forward"){for(var _n200=t;_n200<=i;_n200++)if(r=this.atoms[_n200],e(r))return r;for(var _n201=0;_n201<t;_n201++)if(r=this.atoms[_n201],e(r))return r;return;}for(var _n202=t;_n202>=0;_n202--)if(r=this.atoms[_n202],e(r))return r;for(var _n203=i;_n203>t;_n203--)if(r=this.atoms[_n203],e(r))return r;}},{key:"extractAtoms",value:function extractAtoms(e){var t;var n=this.getAtoms(e);n.length===1&&!n[0].parent&&n[0].isRoot&&(n=n[0]instanceof z?n[0].rows.flatMap(function(e){return e.flatMap(function(e){return e;});}):_toConsumableArray((t=n[0].body)==null?n[0].children:t),n=n.filter(function(e){return e.type!=="first";}));var _iterator158=_createForOfIteratorHelper(n),_step158;try{for(_iterator158.s();!(_step158=_iterator158.n()).done;){var _e573=_step158.value;_e573.parent.removeChild(_e573);}}catch(err){_iterator158.e(err);}finally{_iterator158.f();}return n;}},{key:"deleteAtoms",value:function deleteAtoms(e){if(e!=null||(e=[0,-1]),this.extractAtoms(e),e[0]===0&&e[1]===-1&&this.root instanceof z)for(;this.root.rowCount>1;)this.root.removeRow(1);this.position=e[0];}},{key:"atomToString",value:function atomToString(e,t){var n=t==null?"latex":t;if(n.startsWith("latex"))return L.serialize([e],{expandMacro:n==="latex-expanded",skipStyles:n==="latex-unstyled",skipPlaceholders:n==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode});if(n==="math-ml")return q(e);if(n==="spoken")return vg(e);if(n==="spoken-text"){var _t269=globalThis.MathfieldElement.textToSpeechMarkup;globalThis.MathfieldElement.textToSpeechMarkup="";var _n204=vg(e);return globalThis.MathfieldElement.textToSpeechMarkup=_t269,_n204;}if(n==="spoken-ssml"||n==="spoken-ssml-with-highlighting"){var _t270=globalThis.MathfieldElement.textToSpeechMarkup;globalThis.MathfieldElement.textToSpeechMarkup="ssml";var _n205=vg(e);return globalThis.MathfieldElement.textToSpeechMarkup=_t270,_n205;}return n==="typst"?Q(e):n==="plain-text"?Y(e,{plain:!0}):n==="ascii-math"?Y(e):(console.error("MathLive 0.110.0: Unexpected format \"".concat(n)),"");}},{key:"getValue",value:function getValue(e,t,n){var _this47=this;if(e===void 0)return this.atomToString(this.root,"latex");if(_typeof(e)=="string"&&e!=="math-json")return this.atomToString(this.root,e);var r,i;if(uc(e)&&uc(t)?(r=[this.normalizeRange([e,t])],i=n):dc(e)?(r=[this.normalizeRange(e)],i=t):fc(e)?(r=e.ranges,i=t):(r=[this.normalizeRange([0,-1])],i=e),i!=null||(i="latex"),i==="math-json"){if(!globalThis.MathfieldElement.computeEngine)return window[Symbol.for("io.cortexjs.compute-engine")]||console.error("The CortexJS Compute Engine library is not available.\nLoad the library, for example with:\nimport \"https://esm.run/@cortex-js/compute-engine\""),"[\"Error\", \"compute-engine-not-available\"]";var _e574=this.getValue({ranges:r},"latex-unstyled");try{var _t271=globalThis.MathfieldElement.computeEngine.parse(_e574);return JSON.stringify(_t271.json);}catch(e){return JSON.stringify(["Error","'".concat(e.toString(),"'")]);}}if(i.startsWith("latex")){var _e575={expandMacro:i==="latex-expanded",skipStyles:i==="latex-unstyled",skipPlaceholders:i==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode};return N(r.map(function(t){return L.serialize(_this47.getAtoms(t),_e575);}));}return r.map(function(e){return _this47.getAtoms(e).map(function(e){return _this47.atomToString(e,i);}).join("");}).join("");}},{key:"extendSelectionTo",value:function extendSelectionTo(e,t){var _this48=this;return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},function(){var _this48$normalizeRang=_this48.normalizeRange([e,t]),_this48$normalizeRang2=_slicedToArray(_this48$normalizeRang,2),n=_this48$normalizeRang2[0],r=_this48$normalizeRang2[1],i=new Set(["genfrac","subsup","accent","box","overlap","overunder"]),_this48$at=_this48.at(r),a=_this48$at.parent;if(a!=null&&a.type&&i.has(a.type))for(;a!=null&&a.type&&i.has(a.type)&&E_(_this48,a,[n,r]);)r=_this48.offsetOf(a),a=a.parent;for(a=_this48.at(n).parent;a!=null&&a.type&&i.has(a.type)&&E_(_this48,a,[n,r]);)n=_this48.offsetOf(a.leftSibling),a=a.parent;if(a=_this48.at(r).parent,a!=null&&a.type&&i.has(a.type))for(;a!=null&&a.type&&i.has(a.type)&&E_(_this48,a,[n,r]);)r=_this48.offsetOf(a),a=a.parent;_this48._position=_this48.normalizeOffset(t),_this48._selection={ranges:[[n,r]],direction:"none"};});}},{key:"announce",value:function announce(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];var r,i;((i=(r=this.mathfield.host)==null?void 0:r.dispatchEvent(new CustomEvent("announce",{detail:{command:e,previousPosition:t,atoms:n},cancelable:!0,bubbles:!0,composed:!0})))==null||i)&&x_(this.mathfield,e,t,n);}},{key:"deferNotifications",value:function deferNotifications(e,t){var n=this._selection,r=this._anchor,i=this._position,a=this.silenceNotifications;this.silenceNotifications=!0;var o=this.root.changeCounter;t(),this.silenceNotifications=a;var s=r!==this._anchor||i!==this._position||sc(this._selection,n)==="different";e.selection&&s&&this.selectionDidChange();var c=this.root.changeCounter!==o;return e.content&&c&&this.contentDidChange({inputType:e.type}),c||s;}},{key:"normalizeOffset",value:function normalizeOffset(e){return e>0?e=Math.min(e,this.lastOffset):e<0&&(e=this.lastOffset+e+1),e;}},{key:"normalizeRange",value:function normalizeRange(e){var _e576=_slicedToArray(e,2),t=_e576[0],n=_e576[1];return t=this.normalizeOffset(t),n=this.normalizeOffset(n),t<n?[t,n]:[n,t];}},{key:"normalizeSelection",value:function normalizeSelection(e,t){var _this49=this;var n;var r;if(uc(e)){var _n206=this.normalizeOffset(e);if(uc(t)){var _e577=this.normalizeOffset(t);r=_n206<=_e577?{ranges:[[_n206,_e577]],direction:"none"}:{ranges:[[_e577,_n206]],direction:"backward"};}else r={ranges:[[_n206,_n206]],direction:"none"};}else if(dc(e)){var _t272=this.normalizeOffset(e[0]),_n207=this.normalizeOffset(e[1]);r=_t272<=_n207?{ranges:[[_t272,_n207]],direction:"none"}:{ranges:[[_n207,_t272]],direction:"backward"};}else fc(e)&&(r={ranges:e.ranges.map(function(e){return _this49.normalizeRange(e);}),direction:(n=e.direction)==null?"none":n});return r;}},{key:"parentEnvironment",get:function get(){var e=this.at(this.position).parent;if(e){for(;e.parent&&e.type!=="array";)e=e.parent;if(e.type==="array")return e;}}},{key:"parentCell",get:function get(){return this.getParentCell(this.position);}},{key:"getParentCell",value:function getParentCell(e){var t,n;var r=this.at(e);if(r){for(;r&&((t=r.parent)==null?void 0:t.type)!=="array";)r=r.parent;if(((n=r==null?void 0:r.parent)==null?void 0:n.type)==="array")return r.parentBranch;}}},{key:"contentWillChange",value:function contentWillChange(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(this.silenceNotifications||!this.mathfield)return!0;var t=this.silenceNotifications;this.silenceNotifications=!0;var n=this.mathfield.onContentWillChange(e);return this.silenceNotifications=t,n;}},{key:"contentDidChange",value:function contentDidChange(e){var _this50=this;var t;if(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Zm(this.mathfield)),this.silenceNotifications||!((t=this.mathfield)!=null&&t.host))return;var n=this.silenceNotifications;this.silenceNotifications=!0,setTimeout(function(){var t;!_this50.mathfield||!jc(_this50.mathfield)||!_this50.mathfield.host||_this50.mathfield.host.dispatchEvent(new InputEvent("input",l(c({},e),{data:e.data?e.data:(t=e.inputType)==null?"":t,bubbles:!0,composed:!0})));},0),this.silenceNotifications=n;}},{key:"selectionDidChange",value:function selectionDidChange(){if(!this.mathfield)return;var e=this.silenceNotifications;e||(this.silenceNotifications=!0,this.mathfield.onSelectionDidChange()),this.silenceNotifications=e;}}]);}();function T_(e,t,n,r,i){var a=e.offsetOf(t);if(a<n||a>r)return!1;if(!t.hasChildren)return!0;var o=i?t.firstChild:k_(t);if(!o)return!0;var s=i?t.lastChild:A_(t);if(!s)return!0;var c=e.offsetOf(o);if(c>=n&&c<=r){var _t273=e.offsetOf(s);if(_t273>=n&&_t273<=r)return!0;}return!1;}function E_(e,t,n){if(!(t!=null&&t.hasChildren))return!1;var _n208=_slicedToArray(n,2),r=_n208[0],i=_n208[1],a=k_(t);if(!a)return!1;var o=A_(t);if(!o)return!1;var s=e.offsetOf(a),c=e.offsetOf(o);return s>=r&&s<=i&&c>=s&&c<=i;}function D_(e,t){var _t274=_slicedToArray(t,2),n=_t274[0],r=_t274[1],i=r+1;if(i>e.lastOffset)return t;var a=e.at(i);return O_(e,a,n,r)&&(r=e.offsetOf(a)),[n,r];}function O_(e,t,n,r){if((t==null?void 0:t.type)!=="subsup"||!E_(e,t,[n,r]))return!1;var i=t.leftSibling;if(!i)return!1;var a=e.offsetOf(i);return a>n&&a<=r;}function k_(e){var _iterator159=_createForOfIteratorHelper(e.children),_step159;try{for(_iterator159.s();!(_step159=_iterator159.n()).done;){var _t275=_step159.value;if(_t275.type!=="first")return _t275;}}catch(err){_iterator159.e(err);}finally{_iterator159.f();}}function A_(e){var t=e.children;for(var _e578=t.length-1;_e578>=0;_e578--)if(t[_e578].type!=="first")return t[_e578];}hf({deleteAll:function deleteAll(e){return e.contentWillChange({inputType:"deleteContent"})&&Vp(e,[0,-1],"deleteContent");},deleteForward:function deleteForward(e){return Bp(e);},deleteBackward:function deleteBackward(e){return zp(e);},deleteNextWord:function deleteNextWord(e){return e.contentWillChange({inputType:"deleteWordForward"})&&Wp(e,"forward",{delete:!0});},deletePreviousWord:function deletePreviousWord(e){return e.contentWillChange({inputType:"deleteWordBackward"})&&Wp(e,"backward",{delete:!0});},deleteToGroupStart:function deleteToGroupStart(e){if(!e.contentWillChange({inputType:"deleteSoftLineBackward"}))return!1;var t=e.offsetOf(e.at(e.position).firstSibling);return t===e.position?(e.announce("plonk"),!1):(e.deferNotifications({content:!0,selection:!0,type:"deleteSoftLineBackward"},function(){return e.deleteAtoms([e.anchor,t]);}),e.position=t,!0);},deleteToGroupEnd:function deleteToGroupEnd(e){if(!e.contentWillChange({inputType:"deleteSoftLineForward"}))return!1;var t=e.offsetOf(e.at(e.position).lastSibling);return t===e.position?(e.announce("plonk"),!1):(e.deferNotifications({content:!0,selection:!0,type:"deleteSoftLineForward"},function(){return e.deleteAtoms([e.anchor,t]);}),!0);},deleteToMathFieldStart:function deleteToMathFieldStart(e){return e.contentWillChange({inputType:"deleteHardLineBackward"})&&Vp(e,[e.anchor,0],"deleteHardLineBackward");},deleteToMathFieldEnd:function deleteToMathFieldEnd(e){return e.contentWillChange({inputType:"deleteHardLineForward"})&&Vp(e,[e.anchor,-1],"deleteHardLineForward");}},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var j_="<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"width: 21px;\" viewBox=\"0 0 576 512\" role=\"img\" aria-label=\"".concat(O("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>"),M_="<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"height: 18px;\" viewBox=\"0 0 448 512\" role=\"img\" aria-label=\"".concat(O("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>"),N_=function(){function t(e,_t276){var _this51=this;_classCallCheck(this,t);this.focusBlurInProgress=!1,this.programmaticFocusInProgress=!1,this.connectedToVirtualKeyboard=!1;var n,r,i;this.options=c(l(c({},gp()),{macros:lt(),registers:Zs()}),mp(_t276)),this.eventController=new AbortController();var a=this.eventController.signal;_t276.eventSink&&(this.host=_t276.eventSink),this.element=e,e.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;var o=(r=(n=_t276.value)==null?this.element.textContent:n)==null?"":r;o=o.trim();var s=_p(this.options),u=eu(o,{context:this.context}),d;d=u.length===1&&u[0].isRoot?u[0]:new L({type:"root",mode:s,body:u}),this.model=new w_(this,s,d),this.undoManager=new Lp(this.model);var f=[];if(f.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>"),f.push("<span part=container class=ML__container style=\"visibility:hidden\">"),f.push("<span part=content class=ML__content>"),f.push(sf(this)),f.push("</span>"),f.push("<div class=ML__toggles>"),window.mathVirtualKeyboard&&(f.push("<div part=virtual-keyboard-toggle class=ML__virtual-keyboard-toggle role=button ".concat(this.hasEditableContent?"":"style=\"display:none;\""," data-l10n-tooltip=\"tooltip.toggle virtual keyboard\">")),f.push(j_),f.push("</div>")),f.push("<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip=\"tooltip.menu\">"),f.push(M_),f.push("</div>"),f.push("</div>"),f.push("</span>"),f.push("<span class=ML__sr-only>"),f.push("<span role=status aria-live=assertive aria-atomic=true></span>"),f.push("</span>"),this.element.innerHTML=globalThis.MathfieldElement.createHTML(f.join("")),!this.element.children){console.error("%cMathLive 0.110.0: 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=D.subscribe(function(){return D.update(_this51.element);}),D.update(this.element),this.container=this.element.querySelector("[part=container]"),this.field=this.container.querySelector("[part=content]"),this.field.addEventListener("click",function(e){return e.stopImmediatePropagation();},{capture:!1,signal:a}),this.field.addEventListener("wheel",this,{passive:!1,signal:a});var p=this.element;if("PointerEvent"in window?p.addEventListener("pointerdown",this,{signal:a}):p.addEventListener("mousedown",this,{signal:a}),this.host){var _e579=function _e579(e){e.target===_this51.host&&_this51.handleEvent(e);};"PointerEvent"in window?this.host.addEventListener("pointerdown",_e579,{signal:a}):this.host.addEventListener("mousedown",_e579,{signal:a});}var m=this.element.querySelector("[part=virtual-keyboard-toggle]");m==null||m.addEventListener("pointerdown",function(e){e.currentTarget===m&&(window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(Zm(_this51)),setTimeout(function(){return _this51.scrollIntoView();},300)),e.preventDefault(),e.stopPropagation(),_this51.hasFocus()||_this51.focus({preventScroll:!0}));},{signal:a}),this.field.addEventListener("contextmenu",this,{signal:a});var h=this.element.querySelector("[part=menu-toggle]");h==null||h.addEventListener("pointerdown",function(e){if(e.currentTarget!==h)return;var _t277=_this51.menu;if(_t277.state!=="closed")return;_this51.element.classList.add("tracking");var n=h.getBoundingClientRect();_t277.modifiers=od(e),_t277.show({target:h,location:{x:n.left,y:n.bottom},onDismiss:function onDismiss(){return _this51.element.classList.remove("tracking");}}),e.preventDefault(),e.stopPropagation();},{signal:a}),(this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&(h.style.display="none"),this.ariaLiveText=(i=this.element.querySelector("[role=status]"))==null?void 0:i,this.keyboardDelegate=fd(this.element.querySelector(".ML__keyboard-sink"),this.element,this),window.addEventListener("resize",this,{signal:a}),document.addEventListener("scroll",this,{signal:a}),this.resizeObserver=new ResizeObserver(function(e){if(_this51.resizeObserverStarted){_this51.resizeObserverStarted=!1;return;}_this51.updateToggleLayout(),U(_this51);}),this.resizeObserverStarted=!0,this.resizeObserver.observe(this.field),this.resizeObserver.observe(this.container),setTimeout(function(){return _this51.updateToggleLayout();},100),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:a}),ue&&!D.locale.startsWith(ue.locale)&&he(D.locale),$d!=="ready"&&document.fonts.ready.then(function(){return lf(_this51);}),e.querySelector("[part=container]").style.removeProperty("visibility"),this.undoManager.startRecording(),this.undoManager.snapshot("set-value"),U(this);}return _createClass(t,[{key:"connectToVirtualKeyboard",value:function connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Zm(this)),_h(this));}},{key:"disconnectFromVirtualKeyboard",value:function disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,hh());}},{key:"showMenu",value:function showMenu(e){var _t278,n;var r=(n=(_t278=e==null?void 0:e.location)==null?Nc(this.field):_t278)==null?void 0:n,i=e==null?void 0:e.modifiers,a=this.element.querySelector("[part=container]");return this._menu.show({target:a,location:r,modifiers:i});}},{key:"colorMap",get:function get(){var _this52=this;return function(e){var _t279,n,r;return(r=(n=(_t279=_this52.options).colorMap)==null?void 0:n.call(_t279,e))==null?Oe(e):r;};}},{key:"backgroundColorMap",get:function get(){var _this53=this;return function(e){var _t280,n,r,i,a,o;return(o=(a=(n=(_t280=_this53.options).backgroundColorMap)==null?void 0:n.call(_t280,e))==null?(i=(r=_this53.options).colorMap)==null?void 0:i.call(r,e):a)==null?ke(e):o;};}},{key:"smartFence",get:function get(){var e;return(e=this.options.smartFence)==null?!1:e;}},{key:"readOnly",get:function get(){var e;return(e=this.options.readOnly)==null?!1:e;}},{key:"disabled",get:function get(){var e,_t281;return(_t281=(e=this.host)==null?void 0:e.disabled)==null?!1:_t281;}},{key:"contentEditable",get:function get(){return this.host?this.host.getAttribute("contenteditable")!=="false":!1;}},{key:"userSelect",get:function get(){if(!this.host)return"";var e=getComputedStyle(this.host);return e.getPropertyValue("user-select")||e.getPropertyValue("-webkit-user-select");}},{key:"hasEditableContent",get:function get(){return this.disabled||!this.contentEditable?!1:!this.readOnly||this.hasEditablePrompts;}},{key:"hasEditablePrompts",get:function get(){return this.readOnly&&!this.disabled&&this.contentEditable&&this.model.findAtom(function(e){return e.type==="prompt"&&!e.locked;})!==void 0;}},{key:"isSelectionEditable",get:function get(){if(this.disabled||!this.contentEditable)return!1;if(!this.readOnly)return!0;var e=this.model.at(this.model.anchor),_t282=this.model.at(this.model.position),n=L.commonAncestor(e,_t282);return!!((n==null?void 0:n.type)==="prompt"||n!=null&&n.parentPrompt);}},{key:"letterShapeStyle",get:function get(){var e;return(e=this.options.letterShapeStyle)==null?"tex":e;}},{key:"minFontScale",get:function get(){return this.options.minFontScale;}},{key:"maxMatrixCols",get:function get(){return this.options.maxMatrixCols;}},{key:"queryStyle",value:function queryStyle(e){var _t283=Dd(this,e);"verbatimColor"in _t283&&delete _t283.verbatimColor,"verbatimBackgroundColor"in _t283&&delete _t283.verbatimBackgroundColor;var n=Object.keys(_t283).length;if(n===0)return"all";if(n>1){for(var _i97=0,_Object$keys11=Object.keys(_t283);_i97<_Object$keys11.length;_i97++){var _e580=_Object$keys11[_i97];var _n209=this.queryStyle(_defineProperty({},_e580,_t283[_e580]));if(_n209==="none")return"none";if(_n209==="some")return"some";}return"all";}var r=Object.keys(_t283)[0],i=_t283[r];if(this.model.selectionIsCollapsed)return kd(this)[r]===i?"all":"none";var a=this.model.getAtoms(this.model.selection,{includeChildren:!0}),o=a.length;if(o===0)return"none";var s=0;var _iterator160=_createForOfIteratorHelper(a),_step160;try{for(_iterator160.s();!(_step160=_iterator160.n()).done;){var _e581=_step160.value;if(_e581.type==="first"){--o;continue;}_e581.style[r]===i&&(s+=1);}}catch(err){_iterator160.e(err);}finally{_iterator160.f();}return s===0?"none":s===o?"all":"some";}},{key:"keybindings",get:function get(){var e,_t284;if(this._keybindings)return this._keybindings;var _xd=xd(this.options.keybindings,(e=_e())==null?ve():e),_xd2=_slicedToArray(_xd,2),n=_xd2[0],r=_xd2[1];return((_t284=_e())==null?void 0:_t284.score)>0&&(this._keybindings=n,r.length>0&&console.error("MathLive 0.110.0: Invalid keybindings for current keyboard layout",r)),n;}},{key:"menu",get:function get(){return this._menu!=null||(this._menu=new Vh($g(this),{host:this.host})),this._menu;}},{key:"menuItems",set:function set(e){this._menu?this._menu.menuItems=e:this._menu=new Vh(e,{host:this.host});}},{key:"setOptions",value:function setOptions(e){var _t285;this.options=c(c({},this.options),mp(e)),this._keybindings=void 0,this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline");var n=this.options.defaultMode;n==="inline-math"&&(n="math"),((_t285=this.model.root.firstChild)==null?void 0:_t285.mode)!==n&&(this.model.root.firstChild.mode=n),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");var r=L.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in e||this.model.getValue()!==r)&&df(this),("value"in e||"registers"in e||"colorMap"in e||"backgroundColorMap"in e||"letterShapeStyle"in e||"minFontScale"in e||"maxMatrixCols"in e||"readOnly"in e||"contentPlaceholder"in e||"placeholderSymbol"in e)&&U(this);}},{key:"getOptions",value:function getOptions(e){return hp(this.options,e);}},{key:"getOption",value:function getOption(e){return hp(this.options,e);}},{key:"handleEvent",value:function handleEvent(_t286){var n=this;return e.t(_regenerator().m(function _callee5(){var e,r,i,_r114,_e582,_t323,_t324,_t325,_t326,_t327,_t328;return _regenerator().w(function(_context5){while(1)switch(_context5.n){case 0:if(!jc(n)){_context5.n=23;break;}if(!wf(_t286)){_context5.n=5;break;}if(Vc(_t286.origin,(e=n.options.originValidator)==null?"none":e)){_context5.n=1;break;}throw new DOMException("Message from unknown origin (".concat(_t286.origin,") cannot be handled"),"SecurityError");case 1:_r114=_t286.data.action;if(!(_r114==="execute-command")){_context5.n=3;break;}_e582=Sf(_t286.data.command);if(!(!_e582||_f(_e582)==="virtual-keyboard")){_context5.n=2;break;}return _context5.a(2);case 2:n.executeCommand(_e582);_context5.n=4;break;case 3:_r114==="update-state"||(_r114==="focus"?n.focus({preventScroll:!0}):_r114==="blur"&&n.blur());case 4:return _context5.a(2);case 5:_t323=_t286.type;_context5.n=_t323==="focus"?6:_t323==="blur"?7:_t323==="mousedown"?8:_t323==="pointerdown"?9:_t323==="contextmenu"?13:_t323==="virtual-keyboard-toggle"?17:_t323==="resize"?18:_t323==="scroll"?19:_t323==="wheel"?20:_t323==="message"?21:22;break;case 6:n.programmaticFocusInProgress||n.onFocus({suppressEvents:!0});return _context5.a(3,23);case 7:n.onBlur({dispatchEvents:!1});return _context5.a(3,23);case 8:n.userSelect!=="none"&&!((r=_t286.target)!=null&&r.closest("[part=virtual-keyboard-toggle],[part=menu-toggle]"))&&Lm(n,_t286);return _context5.a(3,23);case 9:_t324=!_t286.defaultPrevented&&n.userSelect!=="none"&&!((i=_t286.target)!=null&&i.closest("[part=virtual-keyboard-toggle],[part=menu-toggle]"));if(!_t324){_context5.n=12;break;}Lm(n,_t286);_t325=_t286.shiftKey===!1;if(!_t325){_context5.n=11;break;}_context5.n=10;return Gh(_t286,n.container,n.menu);case 10:_t325=_context5.v;case 11:_t326=_t325;if(!_t326){_context5.n=12;break;}Nm.stop();case 12:return _context5.a(3,23);case 13:_t327=n.userSelect!=="none"&&_t286.shiftKey===!1;if(!_t327){_context5.n=15;break;}_context5.n=14;return Gh(_t286,n.container,n.menu);case 14:_t327=_context5.v;case 15:_t328=_t327;if(!_t328){_context5.n=16;break;}Nm.stop();case 16:return _context5.a(3,23);case 17:n.hasFocus()&&_h(n),n.hasFocus()&&n.options.mathVirtualKeyboardPolicy!=="manual"&&(n.focusBlurInProgress=!0,n.keyboardDelegate.blur(),n.keyboardDelegate.focus(),n.focusBlurInProgress=!1);return _context5.a(3,23);case 18:n.geometryChangeTimer&&cancelAnimationFrame(n.geometryChangeTimer),n.geometryChangeTimer=requestAnimationFrame(function(){return jc(n)&&n.onGeometryChange();});return _context5.a(3,23);case 19:n.geometryChangeTimer&&cancelAnimationFrame(n.geometryChangeTimer),n.geometryChangeTimer=requestAnimationFrame(function(){return jc(n)&&n.onGeometryChange();});return _context5.a(3,23);case 20:n.onWheel(_t286);return _context5.a(3,23);case 21:return _context5.a(3,23);case 22:console.warn("Unexpected event type",_t286.type);case 23:return _context5.a(2);}},_callee5);}))();}},{key:"updateToggleLayout",value:function updateToggleLayout(){if(!this.element||!this.host)return;var e=this.element.querySelector(".ML__toggles");if(!e)return;var _t287=this.host.offsetHeight,n=e.classList.contains("ML__toggles--vertical");_t287>=100&&!n?e.classList.add("ML__toggles--vertical"):_t287<100&&n&&e.classList.remove("ML__toggles--vertical");}},{key:"dispose",value:function dispose(){if(!jc(this))return;D.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();var e=this.element;delete e.mathfield,this.element=void 0,this.host=void 0,this.field=void 0,this.ariaLiveText=void 0,_m(),Wd(),gh();}},{key:"flushInlineShortcutBuffer",value:function flushInlineShortcutBuffer(e){var _this54=this;if(e!=null||(e={defer:!1}),!e.defer){this.inlineShortcutBuffer.length=0,clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=0;return;}this.options.inlineShortcutTimeout>0&&(clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=setTimeout(function(){return _this54.flushInlineShortcutBuffer();},this.options.inlineShortcutTimeout));}},{key:"executeCommand",value:function executeCommand(e){var _this55=this;return _f(e)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(e),requestAnimationFrame(function(){return window.mathVirtualKeyboard.update(Zm(_this55));}),!1):vf(this,e);}},{key:"errors",get:function get(){return tu(this.model.getValue(),{context:this.context});}},{key:"getValue",value:function getValue(e,_t288,n){return this.model.getValue(e,_t288,n);}},{key:"setValue",value:function setValue(e,_t289){var n;_t289=_t289==null?{mode:"math"}:_t289,_t289.insertionMode===void 0&&(_t289.insertionMode="replaceAll"),(_t289.format===void 0||_t289.format==="auto")&&(_t289.format="latex"),(_t289.mode===void 0||_t289.mode==="auto")&&(_t289.mode=(n=pc(this.model,this.model.position))==null?"math":n);var r=this.undoManager.canUndo();R.insert(this.model,e,_t289)&&(U(this),r||this.undoManager.reset(),this.undoManager.snapshot("set-value"));}},{key:"expression",get:function get(){var e=globalThis.MathfieldElement.computeEngine;return e?e.box(e.parse(this.model.getValue("latex-unstyled"))):(console.error("MathLive 0.110.0: no compute engine available. Make sure the Compute Engine library is loaded."),null);}},{key:"scrollIntoView",value:function scrollIntoView(){var e;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){var _t291=window.mathVirtualKeyboard.boundingRect,_n210=this.host.getBoundingClientRect();_n210.bottom>_t291.top&&((e=window.document.scrollingElement)==null||e.scrollBy(0,_n210.bottom-_t291.top+8));}}this.dirty&&cf(this,{interactive:!0});var _t290=this.field.getBoundingClientRect(),n=null;if(this.model.selectionIsCollapsed)n=Nc(this.field);else{var _e583=Bc(this);if(_e583.length>0){var r=-1/0,i=1/0,_a59=-1/0;var _iterator161=_createForOfIteratorHelper(_e583),_step161;try{for(_iterator161.s();!(_step161=_iterator161.n()).done;){var _t292=_step161.value;_t292.right>r&&(r=_t292.right),_t292.top<i&&(i=_t292.top),_t292.bottom>_a59&&(_a59=_t292.bottom);}}catch(err){_iterator161.e(err);}finally{_iterator161.f();}var _o38=_a59-i;n={x:r+_t290.left-this.field.scrollLeft,y:i+_t290.top-this.field.scrollTop,height:_o38};}}if(this.host&&n){var _e584=this.host.getBoundingClientRect(),_t293=n.y,_r115=n.y+n.height,_i98=this.host.scrollTop;_t293<_e584.top+20?_i98=_t293-_e584.top+this.host.scrollTop-20:_r115>_e584.bottom-20&&(_i98=_r115-_e584.bottom+this.host.scrollTop+20),_i98!==this.host.scrollTop&&this.host.scroll({top:_i98,behavior:"auto"});}if(n){var _e585=n.x-window.scrollX,_r116=this.field.scrollLeft;_e585<_t290.left?_r116=_e585-_t290.left+this.field.scrollLeft-20:_e585>_t290.right&&(_r116=_e585-_t290.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:_r116});}}},{key:"insert",value:function insert(e,_t294){if(_typeof(e)!="string"||e.length===0&&((_t294==null?void 0:_t294.insertionMode)==="insertBefore"||(_t294==null?void 0:_t294.insertionMode)==="insertAfter")||e.length===0&&this.model.selectionIsCollapsed)return!1;if(this.flushInlineShortcutBuffer(),_t294=_t294==null?{mode:"math"}:_t294,_t294.focus&&this.focus(),_t294.feedback&&(globalThis.MathfieldElement.keypressVibration&&h()&&navigator.vibrate(pf),globalThis.MathfieldElement.playSound("keypress")),e==="\\\\")Dp(this.model);else if(e==="&")kp(this.model);else if(this.model.selectionIsCollapsed){var _n211=c({},kd(this));!/^[a-zA-Z0-9]$/.test(e)&&this.styleBias!=="none"&&(_n211.variant="normal",_n211.variantStyle=void 0),R.insert(this.model,e,c({style:_n211},_t294));}else R.insert(this.model,e,_t294);return this.snapshot("insert-".concat(this.model.at(this.model.position).type)),U(this),_t294.scrollIntoView&&this.scrollIntoView(),!0;}},{key:"switchMode",value:function switchMode(e){var _this56=this;var _t295=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"";if(this.model.mode===e||!this.hasEditableContent||!this.contentEditable||this.disabled)return;var r=this.model,i=r.mode;if(r.mode=e,this.host&&!this.host.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0,cancelable:!0}))){r.mode=i;return;}r.mode=i,r.deferNotifications({content:!!n||!!_t295,selection:!0,type:"insertText"},function(){var i=r.at(r.position),a=function a(e,_t296){if(!e)return;var n=r.mode==="math"?eu(_c(e,{format:"ascii-math"})[1],{context:_this56.context}):_toConsumableArray(e).map(function(e){return new oc(e,e,{});});if(_t296.select){var _e586=i.parent.addChildrenAfter(n,i);r.setSelection(r.offsetOf(n[0].leftSibling),r.offsetOf(_e586));}else r.position=r.offsetOf(i.parent.addChildrenAfter(n,i));c=!0;},o=function o(e,_t297){var n=new hu(e);i.parent.addChildAfter(n,i),_t297.select?r.setSelection(r.offsetOf(n.firstChild),r.offsetOf(n.lastChild)):r.position=r.offsetOf(n.lastChild),c=!0;},s=function s(){var _t298=e==="latex"?"latex":e==="math"?"plain-text":"ascii-math",a=lc(r.selection),o=_this56.model.getValue(a,_t298),s=_this56.model.extractAtoms(a);return s.length===1&&s[0].type==="placeholder"&&(o=n),i=r.at(a[0]),o;},c=!1;if(_this56.flushInlineShortcutBuffer(),_this56.stopCoalescingUndo(),Pd(_this56,"accept"),r.selectionIsCollapsed)a(_t295,{select:!1}),r.mode=e,e==="latex"?o(n,{select:!1}):a(n,{select:!1});else{var _t299=s();r.mode=e,e==="latex"?o(_t299,{select:!0}):a(_t299,{select:!0});}return U(_this56),_this56.undoManager.snapshot(e==="latex"?"insert-latex":"insert"),c;}),r.mode=e,window.mathVirtualKeyboard.update(Zm(this));}},{key:"hasFocus",value:function hasFocus(){return!this.blurred;}},{key:"focus",value:function focus(e){var _t300;this.disabled||this.focusBlurInProgress||(this.hasFocus()||(this.programmaticFocusInProgress=!0,this.onFocus(),this.model.announce("line")),(_t300=e==null?void 0:e.preventScroll)!=null&&_t300||this.scrollIntoView());}},{key:"blur",value:function blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur();}},{key:"select",value:function select(){this.model.selection={ranges:[[0,this.model.lastOffset]]},this.focus();}},{key:"applyStyle",value:function applyStyle(e){var _this57=this;var _t301=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n;var r,i="set",a=!1;dc(_t301)?r=_t301:(_t301.operation==="toggle"&&(i="toggle"),r=_t301.range,a=(n=_t301.silenceNotifications)==null?!1:n),r&&(r=this.model.normalizeRange(r)),r&&r[0]===r[1]&&(r=void 0);var o=Dd(this,e);if(r===void 0&&this.model.selectionIsCollapsed){if(i==="set"){var _e587=c({},this.defaultStyle);"color"in o&&delete _e587.verbatimColor,"backgroundColor"in o&&delete _e587.verbatimBackgroundColor,this.defaultStyle=c(c({},_e587),o),this.styleBias="none";return;}var _e588=kd(this),_t302=c({},this.defaultStyle);for(var _i99=0,_Object$keys12=Object.keys(o);_i99<_Object$keys12.length;_i99++){var _n212=_Object$keys12[_i99];_e588[_n212]===o[_n212]?(_n212==="color"&&delete _t302.verbatimColor,_n212==="backgroundColor"&&delete _t302.verbatimBackgroundColor,delete _t302[_n212]):_t302[_n212]=o[_n212];}this.defaultStyle=_t302,this.styleBias="none";return;}this.model.deferNotifications({content:!a,type:"insertText"},function(){if(r===void 0){var _iterator162=_createForOfIteratorHelper(_this57.model.selection.ranges),_step162;try{for(_iterator162.s();!(_step162=_iterator162.n()).done;){var _e589=_step162.value;Fu(_this57.model,_e589,o,{operation:i});}}catch(err){_iterator162.e(err);}finally{_iterator162.f();}}else Fu(_this57.model,r,o,{operation:i});}),U(this);}},{key:"toggleContextMenu",value:function toggleContextMenu(){var _this58=this;var e;var _t303=this.menu;if(!_t303.visible)return!1;if(_t303.state==="open")return _t303.hide(),!0;var n=(e=Uc(this,this.model.position))==null?void 0:e.bounds;if(!n)return!1;var r={x:n.right,y:n.bottom};return _t303.show({target:this.element.querySelector("[part=container]"),location:r,onDismiss:function onDismiss(){var e;return(e=_this58.element)==null?void 0:e.focus();}}),!0;}},{key:"getPrompt",value:function getPrompt(e){return this.model.findAtom(function(_t304){return _t304.type==="prompt"&&_t304.placeholderId===e;});}},{key:"getPromptValue",value:function getPromptValue(e,_t305){var n=this.getPrompt(e);if(!n)return"";var r=this.model.offsetOf(n.firstChild),i=this.model.offsetOf(n.lastChild);return this.model.getValue(r,i,_t305);}},{key:"getPrompts",value:function getPrompts(e){return this.model.atoms.filter(function(_t306){return _t306.type==="prompt"?e?!(e.id&&_t306.placeholderId!==e.id||e.locked&&_t306.locked!==e.locked||e.correctness==="undefined"&&_t306.correctness||e.correctness&&_t306.correctness!==e.correctness):!0:!1;}).map(function(e){return e.placeholderId;});}},{key:"setPromptValue",value:function setPromptValue(e,_t307,n){if(_t307!==void 0){var r=this.getPrompt(e);if(!r){console.error("MathLive 0.110.0: unknown prompt ".concat(e));return;}var i=this.model.getBranchRange(this.model.offsetOf(r),"body");this.model.setSelection(i),this.insert(_t307,l(c({},n),{insertionMode:"replaceSelection"}));}n!=null&&n.silenceNotifications&&(this.valueOnFocus=this.getValue()),U(this);}},{key:"setPromptState",value:function setPromptState(e,_t308,n){var r=this.getPrompt(e);if(!r){console.error("MathLive 0.110.0: unknown prompt ".concat(e));return;}_t308==="undefined"?r.correctness=void 0:_typeof(_t308)=="string"&&(r.correctness=_t308),_typeof(n)=="boolean"&&(r.locked=n,r.captureSelection=n),U(this);}},{key:"getPromptState",value:function getPromptState(e){var _t309=this.getPrompt(e);return _t309?[_t309.correctness,_t309.locked]:(console.error("MathLive 0.110.0: unknown prompt ".concat(e)),[void 0,!0]);}},{key:"getPromptRange",value:function getPromptRange(e){var _t310=this.getPrompt(e);return _t310?this.model.getBranchRange(this.model.offsetOf(_t310),"body"):(console.error("MathLive 0.110.0: unknown prompt ".concat(e)),[0,0]);}},{key:"canUndo",value:function canUndo(){return this.undoManager.canUndo();}},{key:"canRedo",value:function canRedo(){return this.undoManager.canRedo();}},{key:"popUndoStack",value:function popUndoStack(){this.undoManager.pop(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Zm(this));}},{key:"snapshot",value:function snapshot(e){var _t311;this.undoManager.snapshot(e)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Zm(this)),(_t311=this.host)==null||_t311.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"snapshot"}})));}},{key:"stopCoalescingUndo",value:function stopCoalescingUndo(){this.undoManager.stopCoalescing(this.model.selection);}},{key:"stopRecording",value:function stopRecording(){this.undoManager.stopRecording();}},{key:"startRecording",value:function startRecording(){this.undoManager.startRecording();}},{key:"undo",value:function undo(){var e;this.undoManager.undo()&&((e=this.host)==null||e.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})));}},{key:"redo",value:function redo(){var e;this.undoManager.redo()&&((e=this.host)==null||e.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"redo"}})));}},{key:"resetUndo",value:function resetUndo(){var e;(e=this.undoManager)==null||e.reset();}},{key:"onSelectionDidChange",value:function onSelectionDidChange(){var e,_t312;var n=this.model;if(n.mathfield.hasFocus()&&this.keyboardDelegate.setValue(n.getValue(n.selection,"latex-expanded")),n.selectionIsCollapsed){var _t313=Cd(n),r=n.position,i=n.at(r),_a60=(e=i.mode)==null?_p(this.options):e;if(_t313&&(r<n.offsetOf(_t313.firstChild)||r>n.offsetOf(_t313.lastChild))){Pd(this,"accept",{mode:_a60});var _e590=n.offsetOf(i);_e590>=0&&(n.position=_e590);}else{var _e591=n.at(r+1);(_e591==null?void 0:_e591.type)==="first"&&_e591.mode==="latex"?n.position=r+1:_t313&&(_e591==null?void 0:_e591.mode)!=="latex"?n.position=r-1:this.switchMode(_a60);}}(_t312=this.host)==null||_t312.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Zm(this)),_h(this);}},{key:"onContentWillChange",value:function onContentWillChange(e){var _t314,n,r;return(r=(n=this.host)==null?void 0:n.dispatchEvent(new InputEvent("beforeinput",l(c({},e),{data:e.data?e.data:(_t314=e.inputType)==null?"":_t314,cancelable:!0,bubbles:!0,composed:!0}))))==null?!0:r;}},{key:"onFocus",value:function onFocus(e){var _this59=this;if(this.disabled||this.focusBlurInProgress||!this.blurred)return;var n=t._globallyFocusedMathfield;n&&n!==this&&!n.disabled&&n.hasFocus()&&n.onBlur({dispatchEvents:!0}),this.focusBlurInProgress=!0,this.blurred=!1,t._globallyFocusedMathfield=this,this.stopCoalescingUndo(),this.valueOnFocus=this.model.getValue(),this.hasEditablePrompts&&!this.model.at(this.model.anchor).parentPrompt&&this.executeCommand("moveToNextPlaceholder"),cf(this,{interactive:!0}),setTimeout(function(){var _t315,n;if(jc(_this59))if((_t315=e==null?void 0:e.suppressEvents)!=null&&_t315){var _e592=new AbortController(),_t316=_e592.signal,r=function r(e){e.preventDefault(),e.stopPropagation();};for(var _i100=0,_arr3=["focus","focusin"];_i100<_arr3.length;_i100++){var _e593=_arr3[_i100];(n=_this59.host)==null||n.addEventListener(_e593,r,{capture:!0,signal:_t316});}_this59.focusBlurInProgress=!1,_this59.keyboardDelegate.focus(),_this59.connectToVirtualKeyboard(),setTimeout(function(){return _e592.abort();},0);}else _this59.focusBlurInProgress=!1,_this59.keyboardDelegate.focus(),_this59.connectToVirtualKeyboard(),setTimeout(function(){_this59.programmaticFocusInProgress=!1;},0);},60);}},{key:"onBlur",value:function onBlur(e){var _this60=this;var n,r,i,a;if(!(this.focusBlurInProgress||this.blurred)&&(this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,t._globallyFocusedMathfield===this&&(t._globallyFocusedMathfield=void 0),this.ariaLiveText&&(this.ariaLiveText.textContent=""),Hd(this),this.model.getValue()!==this.valueOnFocus&&((n=this.host)==null||n.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),((r=e==null?void 0:e.dispatchEvents)==null||r)&&((i=this.host)==null||i.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(a=this.host)==null||a.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0}))),U(this),this.focusBlurInProgress=!1,hh(),K_.restoreFocusWhenDocumentFocused)){var _e594=new AbortController(),_t317=_e594.signal;window.addEventListener("blur",function(){window.addEventListener("focus",function(){jc(_this60)&&_this60.focus({preventScroll:!0});},{once:!0,signal:_t317});},{once:!0,signal:_t317}),document.addEventListener("focusin",function(){return _e594.abort();},{once:!0}),document.addEventListener("click",function(){return _e594.abort();},{once:!0});}}},{key:"onInput",value:function onInput(e){Sm(this,e);}},{key:"onKeystroke",value:function onKeystroke(e){return vm(this,e);}},{key:"onCompositionStart",value:function onCompositionStart(e){var _this61=this;Vp(this.model,lc(this.model.selection),"insertText");var _t318=Nc(this.field);_t318&&requestAnimationFrame(function(){cf(_this61),_this61.keyboardDelegate.moveTo(_t318.x,_t318.y-_t318.height);});}},{key:"onCompositionUpdate",value:function onCompositionUpdate(e){vp(this.model,e),U(this);}},{key:"onCompositionEnd",value:function onCompositionEnd(e){yp(this.model),Sm(this,e,{simulateKeystroke:!0});}},{key:"onCut",value:function onCut(e){if(!this.isSelectionEditable){this.model.announce("plonk");return;}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),e.clipboardData?R.onCopy(this,e):R.copyToClipboard(this,"latex"),Vp(this.model,lc(this.model.selection),"deleteByCut"),this.snapshot("cut"),U(this));}},{key:"onCopy",value:function onCopy(e){e.clipboardData?R.onCopy(this,e):R.copyToClipboard(this,"latex");}},{key:"onPaste",value:function onPaste(e){var _t319=this.isSelectionEditable;return _t319&&(_t319=R.onPaste(this.model.at(this.model.position).mode,this,e.clipboardData)),_t319||this.model.announce("plonk"),e.preventDefault(),e.stopPropagation(),_t319;}},{key:"onGeometryChange",value:function onGeometryChange(){var e;(e=this._menu)==null||e.hide(),Vd(this),_h(this);}},{key:"onWheel",value:function onWheel(e){var _t320=5*e.deltaX;if(!Number.isFinite(_t320)||_t320===0)return;var n=this.field;_t320<0&&n.scrollLeft===0||_t320>0&&n.offsetWidth+n.scrollLeft>=n.scrollWidth||(n.scrollBy({top:0,left:_t320}),e.preventDefault(),e.stopPropagation());}},{key:"getHTMLElement",value:function getHTMLElement(e){var _t321=e;for(;!_t321.id&&_t321.hasChildren;)_t321=e.children[0];return this.field.querySelector("[data-atom-id=\"".concat(_t321.id,"\"]"));}},{key:"context",get:function get(){var _this62=this;var e,_t322;return{registers:(e=this.options.registers)==null?{}:e,smartFence:this.smartFence,letterShapeStyle:this.letterShapeStyle,minFontScale:this.minFontScale,maxMatrixCols:this.maxMatrixCols,placeholderSymbol:(_t322=this.options.placeholderSymbol)==null?"\u25A2":_t322,colorMap:function colorMap(e){return _this62.colorMap(e);},backgroundColorMap:function backgroundColorMap(e){return _this62.backgroundColorMap(e);},getMacro:function getMacro(e){return pt(e,_this62.options.macros);},atomIdsSettings:{seed:"random",groupNumbers:!1}};}}]);}();hf({speak:function speak(e,t,n){return P_(e,t,n);}},{target:"mathfield"});function P_(e,t,n){var r;n=n==null?{withHighlighting:!1}:n;var i=e.model;function a(e){var t=null;switch(e){case"all":t=i.root;break;case"selection":t=i.getAtoms(i.selection);break;case"left":t=i.getAtoms(i.offsetOf(i.at(i.position).leftSibling),i.position);break;case"right":t=i.getAtoms(i.position,i.offsetOf(i.at(i.position).rightSibling));break;case"group":t=i.getAtoms(i.getSiblingsRange(i.position));break;case"parent":{var _i$at=i.at(i.position),_e595=_i$at.parent;t=_e595!=null&&_e595.parent?_e595:i.root;break;}default:t=i.root;}return t;}function o(e){var t="";switch(e){case"all":console.error("Internal failure: speak all failed");break;case"selection":t="no selection";break;case"left":t="at start";break;case"right":t="at end";break;case"group":console.error("Internal failure: speak group failed");break;case"parent":t="no parent";break;default:console.error("unknown speak_ param value: \""+e+"\"");break;}return t;}var s=globalThis.MathfieldElement,c=a(t);if(c===null)return(r=s.speakHook)==null||r.call(s,o(t)),!1;(n.withHighlighting||s.speechEngine==="amazon")&&(s.textToSpeechMarkup=globalThis.sre&&s.textToSpeechRules==="sre"?"ssml_step":"ssml");var l=vg(c);return f()&&n.withHighlighting?(gv().readAloudMathfield=e,cf(e,{forHighlighting:!0}),s.readAloudHook&&s.readAloudHook(e.field,l)):s.speakHook&&s.speakHook(l),!1;}function F_(e){var t,n;if(!f())return;var r=globalThis.MathfieldElement;if(!r.speechEngine||r.speechEngine==="local"){var _t329=new SpeechSynthesisUtterance(e);globalThis.speechSynthesis.speak(_t329);}else if(r.speechEngine==="amazon"){if(!("AWS"in window))console.error("MathLive 0.110.0: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");else{var i=new globalThis.AWS.Polly({apiVersion:"2016-06-10"}),_a61={OutputFormat:"mp3",VoiceId:(t=r.speechEngineVoice)==null?"Joanna":t,Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((n=r.speechEngineVoice)==null?"Joanna":n)?"neural":"standard",Text:e,TextType:"ssml"};i.synthesizeSpeech(_a61,function(e,t){if(e)console.trace("MathLive 0.110.0: `polly.synthesizeSpeech()` error: ".concat(e));else if(t!=null&&t.AudioStream){var _e596=new Uint8Array(t.AudioStream),_n213=new Blob([_e596.buffer],{type:"audio/mpeg"}),_r117=URL.createObjectURL(_n213);new Audio(_r117).play().catch(function(e){return console.error(e);});}});}}else r.speechEngine==="google"&&console.error("MathLive 0.110.0: The Google speech engine is not supported yet. Please come again.");}function I_(e){if(e&&(e.classList.remove("ML__highlight"),e.children)){var _iterator163=_createForOfIteratorHelper(e.children),_step163;try{for(_iterator163.s();!(_step163=_iterator163.n()).done;){var _t330=_step163.value;I_(_t330);}}catch(err){_iterator163.e(err);}finally{_iterator163.f();}}}function L_(e,t){var n;e&&(!t||((n=e.dataset)==null?void 0:n.atomId)===t?(e.classList.add("ML__highlight"),e.children&&e.children.length>0&&_toConsumableArray(e.children).forEach(function(e){e instanceof HTMLElement&&L_(e);})):(e.classList.remove("ML__highlight"),e.children&&e.children.length>0&&_toConsumableArray(e.children).forEach(function(e){e instanceof HTMLElement&&L_(e,t);})));}function R_(e,t){var n;if(!f())return;if(globalThis.MathfieldElement.speechEngine!=="amazon"){console.error("MathLive 0.110.0: Use Amazon TTS Engine for synchronized highlighting"),_typeof(globalThis.MathfieldElement.speakHook)=="function"&&globalThis.MathfieldElement.speakHook(t);return;}if(!globalThis.AWS){console.error("MathLive 0.110.0: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");return;}var r=new globalThis.AWS.Polly({apiVersion:"2016-06-10"}),i={OutputFormat:"json",VoiceId:(n=globalThis.MathfieldElement.speechEngineVoice)==null?"Joanna":n,Engine:"standard",Text:t,TextType:"ssml",SpeechMarkTypes:["ssml"]};gv().readAloudElement=e,r.synthesizeSpeech(i,function(e,n){if(e){console.trace("MathLive 0.110.0: `polly.synthesizeSpeech()` error: ".concat(e));return;}if(!(n!=null&&n.AudioStream))return;var a=new TextDecoder("utf-8").decode(new Uint8Array(n.AudioStream));gv().readAloudMarks=a.split("\n").map(function(e){return e?JSON.parse(e):{};}),gv().readAloudTokens=[];var _iterator164=_createForOfIteratorHelper(gv().readAloudMarks),_step164;try{for(_iterator164.s();!(_step164=_iterator164.n()).done;){var _e597=_step164.value;_e597.value&&gv().readAloudTokens.push(_e597.value);}}catch(err){_iterator164.e(err);}finally{_iterator164.f();}gv().readAloudCurrentMark="",i.OutputFormat="mp3",i.SpeechMarkTypes=[],r.synthesizeSpeech(i,function(e,n){if(e){console.trace("MathLive 0.110.0: `polly.synthesizeSpeech(\"".concat(t,"\") error:").concat(e));return;}if(!(n!=null&&n.AudioStream))return;var r=new Uint8Array(n.AudioStream),i=new Blob([r.buffer],{type:"audio/mpeg"}),a=URL.createObjectURL(i),o=gv();o.readAloudAudio?o.readAloudAudio.pause():(o.readAloudAudio=new Audio(),o.readAloudAudio.addEventListener("ended",function(){var e=o.readAloudMathfield;o.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),e?(cf(e),o.readAloudElement=null,o.readAloudMathfield=null,o.readAloudTokens=[],o.readAloudMarks=[],o.readAloudCurrentMark=""):I_(o.readAloudElement);}),o.readAloudAudio.addEventListener("timeupdate",function(){var e="",t=o.readAloudAudio.currentTime*1e3+100;var _iterator165=_createForOfIteratorHelper(o.readAloudMarks),_step165;try{for(_iterator165.s();!(_step165=_iterator165.n()).done;){var _n214=_step165.value;_n214.time<t&&(e=_n214.value);}}catch(err){_iterator165.e(err);}finally{_iterator165.f();}o.readAloudCurrentMark!==e&&(o.readAloudCurrentToken=e,e&&e===o.readAloudFinalToken?o.readAloudAudio.pause():(o.readAloudCurrentMark=e,L_(o.readAloudElement,o.readAloudCurrentMark)));})),o.readAloudAudio.src=a,o.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),o.readAloudAudio.play();});});}f()||console.error('MathLive 0.110.0: 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 $=new WeakMap(),z_=.5,B_={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 = ..."},V_=function(_HTMLElement){function t(e){var _this63;_classCallCheck(this,t);if(_this63=_callSuper(this,t),_this63._observer=null,e){var _t331=[];for(var _i101=0,_Object$keys13=Object.keys(e);_i101<_Object$keys13.length;_i101++){var _n215=_Object$keys13[_i101];if(B_[_n215])if(B_[_n215].startsWith("mf.")){if(B_[_n215].startsWith("mf.".concat(_n215)))_t331.push("Option `".concat(_n215,"` cannot be used as a constructor option. Use ").concat(B_[_n215]));else{var _e598=B_[_n215].match(/([a-zA-Z]+) =/);_t331.push("Option `".concat(_n215,"` has been renamed `").concat(_e598[1],"`"));}}else _t331.push("Option `".concat(_n215,"` cannot be used as a constructor option. Use ").concat(B_[_n215]));}if(_t331.length>0){console.group("%cMathLive 0.110.0: %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.");var _iterator166=_createForOfIteratorHelper(_t331),_step166;try{for(_iterator166.s();!(_step166=_iterator166.n()).done;){var _e599=_step166.value;console.warn(_e599);}}catch(err){_iterator166.e(err);}finally{_iterator166.f();}console.groupEnd();}}if(G_()&&(_this63._internals=_this63.attachInternals(),_this63._internals.role="math",_this63._internals.ariaLabel="math input field",_this63._internals.ariaMultiLine="false"),_this63.attachShadow({mode:"open",delegatesFocus:!0}),_this63.shadowRoot&&"adoptedStyleSheets"in _this63.shadowRoot){_this63.shadowRoot.adoptedStyleSheets=[tl("core"),tl("mathfield"),tl("mathfield-element"),tl("ui"),tl("menu")],_this63.shadowRoot.appendChild(document.createElement("span"));var _e600=document.createElement("slot");_e600.style.display="none",_this63.shadowRoot.appendChild(_e600);}else _this63.shadowRoot.innerHTML="<style>"+el("core")+el("mathfield")+el("mathfield-element")+el("ui")+el("menu")+"</style><span></span><slot style=\"display:none\"></slot>";e&&_this63._setOptions(e);return _this63;}_inherits(t,_HTMLElement);return _createClass(t,[{key:"fontsDirectory",get:function get(){throw Error("Use MathfieldElement.fontsDirectory instead");},set:function set(e){throw Error("Use MathfieldElement.fontsDirectory instead");}},{key:"soundsDirectory",get:function get(){throw Error("Use MathfieldElement.soundsDirectory instead");},set:function set(e){throw Error("Use MathfieldElement.soundsDirectory instead");}},{key:"locale",get:function get(){throw Error("Use MathfieldElement.locale instead");},set:function set(e){throw Error("Use MathfieldElement.locale instead");}},{key:"strings",get:function get(){throw Error("Use MathfieldElement.strings instead");},set:function set(e){throw Error("Use MathfieldElement.strings instead");}},{key:"decimalSeparator",get:function get(){throw Error("Use MathfieldElement.decimalSeparator instead");},set:function set(e){throw Error("Use MathfieldElement.decimalSeparator instead");}},{key:"computeEngine",get:function get(){throw Error("Use MathfieldElement.computeEngine instead");},set:function set(e){throw Error("Use MathfieldElement.computeEngine instead");}},{key:"showMenu",value:function showMenu(e){var _t337,n;return(n=(_t337=this._mathfield)==null?void 0:_t337.showMenu(e))==null?!1:n;}},{key:"mathVirtualKeyboard",get:function get(){throw Error("The `mathVirtualKeyboard` property is not available on the MathfieldElement. Use `window.mathVirtualKeyboard` instead.");}},{key:"onPointerDown",value:function onPointerDown(){var _this64=this;window.addEventListener("pointerup",function(e){var n=_this64._mathfield;if(n&&e.target===_this64&&!n.disabled){_this64.dispatchEvent(new MouseEvent("click",{altKey:e.altKey,button:e.button,buttons:e.buttons,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,metaKey:e.metaKey,movementX:e.movementX,movementY:e.movementY,relatedTarget:e.relatedTarget,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey}));var r=_this64.getOffsetFromPoint(e.clientX,e.clientY);r>=0&&t.openUrl(Wc(n,r)),e.pointerType==="touch"&&_this64.selectionIsCollapsed&&(_this64.position=r);}},{once:!0});}},{key:"getPromptValue",value:function getPromptValue(e,_t338){var n,r;return(r=(n=this._mathfield)==null?void 0:n.getPromptValue(e,_t338))==null?"":r;}},{key:"setPromptValue",value:function setPromptValue(e,_t339,n){var r;(r=this._mathfield)==null||r.setPromptValue(e,_t339,n);}},{key:"getPromptRange",value:function getPromptRange(e){var _t340,n;return(n=(_t340=this._mathfield)==null?void 0:_t340.getPromptRange(e))==null?null:n;}},{key:"getPrompts",value:function getPrompts(e){var _t341,n;return(n=(_t341=this._mathfield)==null?void 0:_t341.getPrompts(e))==null?[]:n;}},{key:"hasEditableContent",get:function get(){var e,_t342;return(_t342=(e=this._mathfield)==null?void 0:e.hasEditableContent)==null?!1:_t342;}},{key:"form",get:function get(){var e;return(e=this._internals)==null?void 0:e.form;}},{key:"name",get:function get(){var e;return(e=this.getAttribute("name"))==null?"":e;}},{key:"type",get:function get(){return this.localName;}},{key:"mode",get:function get(){var e,_t343;return(_t343=(e=this._mathfield)==null?void 0:e.model.mode)==null?this.defaultMode==="text"?"text":"math":_t343;},set:function set(e){var _t344;(_t344=this._mathfield)==null||_t344.switchMode(e);}},{key:"expression",get:function get(){if(this._mathfield)return window[Symbol.for("io.cortexjs.compute-engine")]?this._mathfield.expression:(console.error("MathLive 0.110.0: The CortexJS Compute Engine library is not available.\n \n Load the library, for example with:\n \n import \"https://esm.run/@cortex-js/compute-engine\""),null);},set:function set(e){var n,r;if(!this._mathfield)return;var i=(r=(n=t.computeEngine)==null?void 0:n.box(e).latex)==null?null:r;i!==null&&this._mathfield.setValue(i),window[Symbol.for("io.cortexjs.compute-engine")]||console.error("MathLive 0.110.0: The Compute Engine library is not available.\n \n Load the library, for example with:\n \n import \"https://esm.run/@cortex-js/compute-engine\"");}},{key:"errors",get:function get(){var e,_t345;return(_t345=(e=this._mathfield)==null?void 0:e.errors)==null?[]:_t345;}},{key:"_getOptions",value:function _getOptions(e){return this._mathfield?hp(this._mathfield.options,e):$.has(this)?c({},hp(c(c({},gp()),mp($.get(this).options)),e)):null;}},{key:"getOptions",value:function getOptions(e){return console.warn("%cMathLive 0.110.0: %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?hp(this._mathfield.options,e):$.has(this)?hp(c(c({},gp()),mp($.get(this).options)),e):null;}},{key:"reflectAttributes",value:function reflectAttributes(){var _this65=this;var e=gp(),n=this._getOptions();Object.keys(t.optionsAttributes).forEach(function(r){var i=r==="placeholder"?"contentPlaceholder":U_(r);t.optionsAttributes[r]==="on/off"?e[i]===n[i]?_this65.removeAttribute(r):_this65.setAttribute(r,n[i]?"on":"off"):e[i]!==n[i]&&(t.optionsAttributes[r]==="boolean"?n[i]?_this65.setAttribute(r,""):_this65.removeAttribute(r):(_typeof(n[i])=="string"||_typeof(n[i])=="number")&&_this65.setAttribute(r,n[i].toString()));});}},{key:"getOption",value:function getOption(e){return console.warn("%cMathLive 0.110.0: %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([e])[e];}},{key:"_getOption",value:function _getOption(e){return this._getOptions([e])[e];}},{key:"_setOptions",value:function _setOptions(e){if(this._mathfield)this._mathfield.setOptions(e);else if($.has(this)){var _t346=c(c({},$.get(this).options),e);$.set(this,l(c({},$.get(this)),{selection:{ranges:_t346.readOnly?[[0,0]]:[[0,-1]]},options:_t346}));}else $.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:e,menuItems:void 0});this.reflectAttributes();}},{key:"setOptions",value:function setOptions(e){console.group("%cMathLive 0.110.0: %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(var _i102=0,_Object$keys14=Object.keys(e);_i102<_Object$keys14.length;_i102++){var _t347=_Object$keys14[_i102];B_[_t347]&&console.warn("`mf.setOptions({".concat(_t347,":...})` -> ").concat(B_[_t347]));}console.groupEnd(),this._setOptions(e);}},{key:"executeCommand",value:function executeCommand(){var _t348,n;var r;for(var _len2=arguments.length,e=new Array(_len2),_key2=0;_key2<_len2;_key2++){e[_key2]=arguments[_key2];}if(r=e.length===1?e[0]:[e[0]].concat(_toConsumableArray(e.slice(1))),r)return(n=(_t348=this._mathfield)==null?void 0:_t348.executeCommand(r))==null?!1:n;throw Error("Invalid selector");}},{key:"getValue",value:function getValue(e,_t349,n){var r,i;if(this._mathfield)return this._mathfield.model.getValue(e,_t349,n);if($.has(this)){var _e$ranges$,_e601;var _a62,_o39,_s25;if(fc(e)?(_e$ranges$=_slicedToArray(e.ranges[0],2),_a62=_e$ranges$[0],_o39=_e$ranges$[1],_s25=_t349):dc(e)?(_e601=_slicedToArray(e,2),_a62=_e601[0],_o39=_e601[1],_s25=_t349):uc(e)&&uc(_t349)?(_a62=e,_o39=_t349,_s25=n):(_a62=0,_o39=-1,_s25=e),(_s25===void 0||_s25==="latex")&&_a62===0&&_o39===-1)return(i=(r=$.get(this).value)==null?this.textContent:r)==null?"":i;}return"";}},{key:"setValue",value:function setValue(e,_t350){if(this._mathfield&&e!==void 0){if(this._mathfield.model.getValue()===e)return;_t350!=null||(_t350={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(e,_t350);return;}if($.has(this)){var _t351=$.get(this).options;$.set(this,{value:e,selection:{ranges:[[-1,-1]],direction:"forward"},options:_t351,menuItems:void 0});return;}var n=W_(this);$.set(this,{value:e,selection:{ranges:[[-1,-1]],direction:"forward"},options:n,menuItems:void 0});}},{key:"hasFocus",value:function hasFocus(){var e,_t352;return(_t352=(e=this._mathfield)==null?void 0:e.hasFocus())==null?!1:_t352;}},{key:"focus",value:function focus(){var e;this.disabled||(e=this._mathfield)==null||e.focus();}},{key:"blur",value:function blur(){var e;(e=this._mathfield)==null||e.blur();}},{key:"select",value:function select(){var e;(e=this._mathfield)==null||e.select();}},{key:"insert",value:function insert(e,_t353){var n,r;return(r=(n=this._mathfield)==null?void 0:n.insert(e,_t353))==null?!1:r;}},{key:"applyStyle",value:function applyStyle(e,_t354){var n;return(n=this._mathfield)==null?void 0:n.applyStyle(e,_t354);}},{key:"queryStyle",value:function queryStyle(e){var _t355,n;return(n=(_t355=this._mathfield)==null?void 0:_t355.queryStyle(e))==null?"none":n;}},{key:"getOffsetFromPoint",value:function getOffsetFromPoint(e,_t356,n){return this._mathfield?Vm(this._mathfield,e,_t356,n):-1;}},{key:"getElementInfo",value:function getElementInfo(e){return Uc(this._mathfield,e);}},{key:"resetUndo",value:function resetUndo(){var e;(e=this._mathfield)==null||e.resetUndo();}},{key:"canUndo",value:function canUndo(){return this._mathfield?this._mathfield.canUndo():!1;}},{key:"canRedo",value:function canRedo(){return this._mathfield?this._mathfield.canRedo():!1;}},{key:"handleEvent",value:function handleEvent(e){var _t357,n,r,i,a;if(dd.state!=="closed"||((n=(_t357=this._mathfield)==null?void 0:_t357.menu)==null?void 0:n.state)!=="closed"||(e.type==="pointerdown"&&this.onPointerDown(),e.type==="focus")||e.type!=="blur")return;var o=p();o&&(r=window==null?void 0:window.mathVirtualKeyboard)!=null&&r.visible||((i=dd.scrim)==null?void 0:i.state)!=="closed"||o&&m()||(a=this._mathfield)==null||a.onBlur({dispatchEvents:!1});}},{key:"connectedCallback",value:function connectedCallback(){var _this66=this;var e,n,r,i;var a=this.shadowRoot,o=a.host,s=window.getComputedStyle(this).userSelect!=="none";if(s)o.addEventListener("pointerdown",this,!0);else{var _e602=a.querySelector("span");_e602.style.pointerEvents="none";}o.addEventListener("focus",this,!0),o.addEventListener("blur",this,!0),this._observer=new MutationObserver(function(){var e;_this66.value=(e=_this66.textContent)==null?"":e;}),this._observer.observe(this,{childList:!0,characterData:!0,subtree:!0}),G_()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),s&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");var u=a.querySelector("slot:not([name])");if(u)try{this._style=u.assignedElements().filter(function(e){return e.tagName.toLowerCase()==="style";}).map(function(e){return e.textContent;}).join("");}catch(e){console.error(e);}if(this._style){var _e603=document.createElement("style");_e603.textContent=this._style,a.appendChild(_e603);}var d="";if(d=this.hasAttribute("value")?this.getAttribute("value"):(e=u==null?void 0:u.assignedNodes().map(function(e){return e.nodeType===3?e.textContent:"";}).join("").trim())==null?"":e,this._mathfield=new N_(a.querySelector(":host > span"),l(c({},(r=(n=$.get(this))==null?void 0:n.options)==null?W_(this):r),{eventSink:this,value:d})),!$.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(var _i103=0,_Object$keys15=Object.keys(t.optionsAttributes);_i103<_Object$keys15.length;_i103++){var _e604=_Object$keys15[_i103];this.upgradeProperty(U_(_e604));}}if(!((i=this._mathfield)!=null&&i.model)){this._mathfield=null;return;}if($.has(this)){var _e605=this._mathfield,_t358=$.get(this),_n216=_t358.menuItems;_e605.model.deferNotifications({content:!1,selection:!1},function(){var n=_t358.value;n!==void 0&&_e605.setValue(n),_e605.model.selection=_t358.selection,$.delete(_this66);}),_n216&&(this.menuItems=_n216);}window.queueMicrotask(function(){_this66.isConnected&&_this66.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}));}),nf();}},{key:"disconnectedCallback",value:function disconnectedCallback(){var _this67=this;var e,n,r;if(this.shadowRoot.host.removeEventListener("pointerdown",this,!0),!this._mathfield)return;(e=this._observer)==null||e.disconnect(),this._observer=null,window.queueMicrotask(function(){return _this67.dispatchEvent(new Event("unmount",{cancelable:!1,bubbles:!0,composed:!0}));});var i=hp(this._mathfield.options,Object.keys(t.optionsAttributes).map(function(e){return U_(e);}));$.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,menuItems:(r=(n=this._mathfield.menu)==null?void 0:n.menuItems)==null?void 0:r,options:i}),this._mathfield.dispose(),this._mathfield=null;}},{key:"upgradeProperty",value:function upgradeProperty(e){if(this.hasOwnProperty(e)){var _t359=this[e];delete this[e],(e==="readonly"||e==="read-only")&&(e="readOnly"),this[e]=_t359;}}},{key:"attributeChangedCallback",value:function attributeChangedCallback(e,_t360,n){if(_t360===n)return;var r=n!==null;switch(e){case"contenteditable":U(this._mathfield);break;case"placeholder":n===!1&&(n=""),this.placeholder=n;break;case"disabled":this.disabled=r;break;case"read-only":case"readonly":this.readOnly=r;break;default:}}},{key:"readonly",get:function get(){return this.hasAttribute("readonly")||this.hasAttribute("read-only");},set:function set(e){var _t361=!!e;_t361?(this.setAttribute("readonly",""),G_()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(G_()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:_t361});}},{key:"disabled",get:function get(){return this.hasAttribute("disabled");},set:function set(e){var _t362;var n=!!e;n?this.setAttribute("disabled",""):this.removeAttribute("disabled"),G_()?this._internals.ariaDisabled=n?"true":"false":this.setAttribute("aria-disabled",n?"true":"false"),n&&(_t362=this._mathfield)!=null&&_t362.hasFocus&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard");}},{key:"value",get:function get(){return this.getValue();},set:function set(e){this.setValue(e);}},{key:"defaultMode",get:function get(){return this._getOption("defaultMode");},set:function set(e){this._setOptions({defaultMode:e});}},{key:"macros",get:function get(){if(!this._mathfield)throw Error("Mathfield not mounted");return this._getOption("macros");},set:function set(e){this._setOptions({macros:e});}},{key:"registers",get:function get(){if(!this._mathfield)throw Error("Mathfield not mounted");var e=this;return new Proxy({},{get:function get(_t363,n){if(_typeof(n)=="string")return e._getOption("registers")[n];},set:function set(t,n,r){return _typeof(n)=="string"?(e._setOptions({registers:l(c({},e._getOption("registers")),_defineProperty({},n,r))}),!0):!1;},ownKeys:function ownKeys(){return Reflect.ownKeys(e._getOption("registers"));},getOwnPropertyDescriptor:function getOwnPropertyDescriptor(_t364,n){var r=e._getOption("registers")[n];if(r!==void 0)return{configurable:!0,enumerable:!0,value:r,writable:!0};}});},set:function set(e){this._setOptions({registers:e});}},{key:"colorMap",get:function get(){return this._getOption("colorMap");},set:function set(e){this._setOptions({colorMap:e});}},{key:"backgroundColorMap",get:function get(){return this._getOption("backgroundColorMap");},set:function set(e){this._setOptions({backgroundColorMap:e});}},{key:"letterShapeStyle",get:function get(){return this._getOption("letterShapeStyle");},set:function set(e){this._setOptions({letterShapeStyle:e});}},{key:"minFontScale",get:function get(){return this._getOption("minFontScale");},set:function set(e){this._setOptions({minFontScale:e});}},{key:"maxMatrixCols",get:function get(){return this._getOption("maxMatrixCols");},set:function set(e){this._setOptions({maxMatrixCols:e});}},{key:"smartMode",get:function get(){return this._getOption("smartMode");},set:function set(e){this._setOptions({smartMode:e});}},{key:"smartFence",get:function get(){return this._getOption("smartFence");},set:function set(e){this._setOptions({smartFence:e});}},{key:"smartSuperscript",get:function get(){return this._getOption("smartSuperscript");},set:function set(e){this._setOptions({smartSuperscript:e});}},{key:"scriptDepth",get:function get(){return this._getOption("scriptDepth");},set:function set(e){this._setOptions({scriptDepth:e});}},{key:"removeExtraneousParentheses",get:function get(){return this._getOption("removeExtraneousParentheses");},set:function set(e){this._setOptions({removeExtraneousParentheses:e});}},{key:"mathModeSpace",get:function get(){return this._getOption("mathModeSpace");},set:function set(e){this._setOptions({mathModeSpace:e});}},{key:"placeholderSymbol",get:function get(){return this._getOption("placeholderSymbol");},set:function set(e){this._setOptions({placeholderSymbol:e});}},{key:"placeholder",get:function get(){return this._getOption("contentPlaceholder");},set:function set(e){this._setOptions({contentPlaceholder:e});}},{key:"popoverPolicy",get:function get(){return this._getOption("popoverPolicy");},set:function set(e){this._setOptions({popoverPolicy:e});}},{key:"environmentPopoverPolicy",get:function get(){return this._getOption("environmentPopoverPolicy");},set:function set(e){this._setOptions({environmentPopoverPolicy:e});}},{key:"menuItems",get:function get(){var e;if(!this._mathfield)throw Error("Mathfield not mounted");return(e=this._mathfield.menu._menuItems.map(function(e){return e.menuItem;}))==null?[]:e;},set:function set(e){var _t365;if(!this._mathfield)throw Error("Mathfield not mounted");if(this._mathfield){var _n217=(_t365=this._mathfield.element)==null?void 0:_t365.querySelector("[part=menu-toggle]");_n217&&(_n217.style.display=e.length===0?"none":""),this._mathfield.menu.menuItems=e;}}},{key:"mathVirtualKeyboardPolicy",get:function get(){return this._getOption("mathVirtualKeyboardPolicy");},set:function set(e){this._setOptions({mathVirtualKeyboardPolicy:e});}},{key:"inlineShortcuts",get:function get(){if(!this._mathfield)throw Error("Mathfield not mounted");return this._getOption("inlineShortcuts");},set:function set(e){if(!this._mathfield)throw Error("Mathfield not mounted");this._setOptions({inlineShortcuts:e});}},{key:"inlineShortcutTimeout",get:function get(){return this._getOption("inlineShortcutTimeout");},set:function set(e){this._setOptions({inlineShortcutTimeout:e});}},{key:"keybindings",get:function get(){if(!this._mathfield)throw Error("Mathfield not mounted");return this._getOption("keybindings");},set:function set(e){if(!this._mathfield)throw Error("Mathfield not mounted");this._setOptions({keybindings:e});}},{key:"onInsertStyle",get:function get(){var e=this._getOption("onInsertStyle");return e===void 0?Od:e;},set:function set(e){this._setOptions({onInsertStyle:e});}},{key:"onInlineShortcut",get:function get(){return this._getOption("onInlineShortcut");},set:function set(e){this._setOptions({onInlineShortcut:e});}},{key:"onScrollIntoView",get:function get(){return this._getOption("onScrollIntoView");},set:function set(e){this._setOptions({onScrollIntoView:e});}},{key:"onExport",get:function get(){return this._getOption("onExport");},set:function set(e){this._setOptions({onExport:e});}},{key:"readOnly",get:function get(){return this._getOption("readOnly");},set:function set(e){this._setOptions({readOnly:e});}},{key:"isSelectionEditable",get:function get(){var e,_t366;return(_t366=(e=this._mathfield)==null?void 0:e.isSelectionEditable)==null?!1:_t366;}},{key:"setPromptState",value:function setPromptState(e,_t367,n){var r;(r=this._mathfield)==null||r.setPromptState(e,_t367,n);}},{key:"getPromptState",value:function getPromptState(e){var _t368,n;return(n=(_t368=this._mathfield)==null?void 0:_t368.getPromptState(e))==null?[void 0,!0]:n;}},{key:"selection",get:function get(){return this._mathfield?this._mathfield.model.selection:$.has(this)?$.get(this).selection:{ranges:[[0,0]],direction:"forward"};},set:function set(e){if(_typeof(e)=="number"&&(e={ranges:[[e,e]]}),this._mathfield){this._mathfield.model.selection=e,U(this._mathfield);return;}if($.has(this)){$.set(this,l(c({},$.get(this)),{selection:e}));return;}$.set(this,{value:void 0,selection:e,options:W_(this),menuItems:void 0});}},{key:"selectionIsCollapsed",get:function get(){var e=this.selection;return e.ranges.length===1&&e.ranges[0][0]===e.ranges[0][1];}},{key:"position",get:function get(){return this._mathfield?this._mathfield.model.position:$.has(this)?$.get(this).selection.ranges[0][0]:0;},set:function set(e){if(this._mathfield&&(this._mathfield.model.position=e,U(this._mathfield)),$.has(this)){$.set(this,l(c({},$.get(this)),{selection:{ranges:[[e,e]]}}));return;}$.set(this,{value:void 0,selection:{ranges:[[e,e]]},options:W_(this),menuItems:void 0});}},{key:"lastOffset",get:function get(){var e,_t369;return(_t369=(e=this._mathfield)==null?void 0:e.model.lastOffset)==null?-1:_t369;}}],[{key:"formAssociated",get:function get(){return G_();}},{key:"optionsAttributes",get:function get(){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"};}},{key:"observedAttributes",get:function get(){return[].concat(_toConsumableArray(Object.keys(this.optionsAttributes)),["contenteditable","disabled","readonly","read-only"]);}},{key:"fontsDirectory",get:function get(){return this._fontsDirectory;},set:function set(e){e!==this._fontsDirectory&&(this._fontsDirectory=e,ef());}},{key:"soundsDirectory",get:function get(){return this._soundsDirectory;},set:function set(e){this._soundsDirectory=e,this.audioBuffers={};}},{key:"keypressSound",get:function get(){return this._keypressSound;},set:function set(e){var _t332,n,r;this.audioBuffers={},e===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:_typeof(e)=="string"?this._keypressSound={spacebar:e,return:e,delete:e,default:e}:_typeof(e)=="object"&&"default"in e&&(this._keypressSound={spacebar:(_t332=e.spacebar)==null?e.default:_t332,return:(n=e.return)==null?e.default:n,delete:(r=e.delete)==null?e.default:r,default:e.default});}},{key:"plonkSound",get:function get(){return this._plonkSound;},set:function set(e){this.audioBuffers={},this._plonkSound=e;}},{key:"audioContext",get:function get(){return this._audioContext||(this._audioContext=new AudioContext()),this._audioContext;}},{key:"speechEngine",get:function get(){return this._speechEngine;},set:function set(e){this._speechEngine=e;}},{key:"speechEngineRate",get:function get(){return this._speechEngineRate;},set:function set(e){this._speechEngineRate=e;}},{key:"speechEngineVoice",get:function get(){return this._speechEngineVoice;},set:function set(e){this._speechEngineVoice=e;}},{key:"textToSpeechMarkup",get:function get(){return this._textToSpeechMarkup;},set:function set(e){this._textToSpeechMarkup=e;}},{key:"textToSpeechRules",get:function get(){return this._textToSpeechRules;},set:function set(e){this._textToSpeechRules=e;}},{key:"textToSpeechRulesOptions",get:function get(){return this._textToSpeechRulesOptions;},set:function set(e){this._textToSpeechRulesOptions=e;}},{key:"locale",get:function get(){return D.locale;},set:function set(e){e==="auto"&&(e=navigator.language.slice(0,5)),D.locale=e;}},{key:"strings",get:function get(){return D.strings;},set:function set(e){D.merge(e);}},{key:"decimalSeparator",get:function get(){return this._decimalSeparator;},set:function set(e){this._decimalSeparator=e,this._computeEngine&&console.warn("MathLive 0.110.0: setting MathfieldElement.decimalSeparator after the Compute Engine has been created has no effect on the engine. Reassign MathfieldElement.computeEngine with a freshly configured instance to apply the new separator.");}},{key:"scientificNotationTemplate",get:function get(){return this._scientificNotationTemplate;},set:function set(e){this._scientificNotationTemplate=e;}},{key:"fractionNavigationOrder",get:function get(){return du.fractionNavigationOrder;},set:function set(e){if(e!=="numerator-denominator"&&e!=="denominator-numerator")throw Error("Invalid value");du.fractionNavigationOrder!==e&&(du.fractionNavigationOrder=e,ff());}},{key:"computeEngine",get:function get(){var e,_t333;if(this._computeEngine===void 0){var _t334=window[Symbol.for("io.cortexjs.compute-engine")],_n218=_t334==null?void 0:_t334.ComputeEngine;if(!_n218)return null;if(this._computeEngine=new _n218(),this._computeEngine&&this.decimalSeparator===","){var _String$split$map=String((e=_t334==null?void 0:_t334.version)==null?"":e).split(".").map(function(e){return parseInt(e,10);}),_String$split$map2=_slicedToArray(_String$split$map,2),_n219=_String$split$map2[0],r=_String$split$map2[1];(_n219>0||_n219===0&&r>=58)&&(this._computeEngine.latexOptions=l(c({},this._computeEngine.latexOptions),{decimalSeparator:"{,}"}));}}return(_t333=this._computeEngine)==null?null:_t333;},set:function set(e){this._computeEngine=e;}},{key:"isFunction",get:function get(){return _typeof(this._isFunction)=="function"?this._isFunction:function(){return!1;};},set:function set(e){this._isFunction=e,ff();}},{key:"loadSound",value:function loadSound(_t335){var n=this;return e.t(_regenerator().m(function _callee6(){var e,r,i,_a63,_t370,_t371,_t372;return _regenerator().w(function(_context6){while(1)switch(_context6.p=_context6.n){case 0:delete n.audioBuffers[_t335];e="";_t370=_t335;_context6.n=_t370==="keypress"?1:_t370==="return"?2:_t370==="spacebar"?3:_t370==="delete"?4:_t370==="plonk"?5:6;break;case 1:e=n._keypressSound.default;return _context6.a(3,6);case 2:e=n._keypressSound.return;return _context6.a(3,6);case 3:e=n._keypressSound.spacebar;return _context6.a(3,6);case 4:e=n._keypressSound.delete;return _context6.a(3,6);case 5:e=n.plonkSound;return _context6.a(3,6);case 6:if(!(_typeof(e)!="string")){_context6.n=7;break;}return _context6.a(2);case 7:e=e.trim();r=n.soundsDirectory;if(r==null||r==="null"||e==="none"||e==="null"){_context6.n=14;break;}_context6.p=8;_t371=fetch;_context6.n=9;return Xd("".concat(r,"/").concat(e));case 9:_context6.n=10;return _t371(_context6.v);case 10:_context6.n=11;return _context6.v.arrayBuffer();case 11:i=_context6.v;_context6.n=12;return n.audioContext.decodeAudioData(i);case 12:_a63=_context6.v;n.audioBuffers[_t335]=_a63;_context6.n=14;break;case 13:_context6.p=13;_t372=_context6.v;case 14:return _context6.a(2);}},_callee6,null,[[8,13]]);}))();}},{key:"playSound",value:function playSound(_t336){var n=this;return e.t(_regenerator().m(function _callee7(){var e,r,_t373,_t374;return _regenerator().w(function(_context7){while(1)switch(_context7.n){case 0:_t373=n.audioContext.state==="suspended"||n.audioContext.state==="interrupted";if(!_t373){_context7.n=1;break;}_context7.n=1;return n.audioContext.resume();case 1:_t374=n.audioBuffers[_t336];if(_t374){_context7.n=2;break;}_context7.n=2;return n.loadSound(_t336);case 2:if(n.audioBuffers[_t336]){_context7.n=3;break;}return _context7.a(2);case 3:e=n.audioContext.createBufferSource();e.buffer=n.audioBuffers[_t336];r=n.audioContext.createGain();r.gain.value=z_,e.connect(r).connect(n.audioContext.destination),e.start();case 4:return _context7.a(2);}},_callee7);}))();}}]);}(_wrapNativeSuper(HTMLElement));V_.version="0.110.0",V_.openUrl=function(e){if(!e)return;var t=new URL(e);if(!["http:","https:","file:"].includes(t.protocol.toLowerCase())){V_.playSound("plonk");return;}window.open(t,"_blank");},V_._fontsDirectory="./fonts/",V_._soundsDirectory="./sounds",V_.keypressVibration=!0,V_._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},V_._plonkSound="plonk.wav",V_.audioBuffers={},V_.createHTML=function(e){return e;},V_._speechEngineRate="100%",V_._speechEngineVoice="Joanna",V_._textToSpeechMarkup="",V_._textToSpeechRules="mathlive",V_._textToSpeechRulesOptions={},V_.speakHook=F_,V_.readAloudHook=R_,V_.restoreFocusWhenDocumentFocused=!0,V_._decimalSeparator=".",V_._scientificNotationTemplate="#1\\times10^{#2}",V_._isFunction=function(e){var t,n;var r=globalThis.MathfieldElement.computeEngine;return(n=(t=r==null?void 0:r.parse(e).domain)==null?void 0:t.isFunction)==null?!1:n;};var H_=V_;function U_(e){return e.replace(/[^a-zA-Z\d]+(.)/g,function(e,t){return t.toUpperCase();});}function W_(e){var t={readOnly:!1},n=H_.optionsAttributes;return Object.keys(n).forEach(function(r){var i;if(e.hasAttribute(r)){var _a64=e.getAttribute(r);r==="placeholder"?t.contentPlaceholder=_a64==null?"":_a64:n[r]==="boolean"?t[U_(r)]=!0:n[r]==="on/off"?(_a64=(i=_a64==null?void 0:_a64.toLowerCase())==null?"":i,_a64==="on"||_a64==="true"?t[U_(r)]=!0:_a64==="off"||_a64==="false"?t[U_(r)]=!1:t[U_(r)]=void 0):n[r]==="number"?t[U_(r)]=Number.parseFloat(_a64==null?"0":_a64):t[U_(r)]=_a64;}}),t;}function G_(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype));}var K_=H_,q_,J_,Y_;if(f()&&!((q_=window.customElements)!=null&&q_.get("math-field"))){window[J_=Symbol.for("io.cortexjs.mathlive")]!=null||(window[J_]={});var _e606=window[Symbol.for("io.cortexjs.mathlive")];_e606.version="0.110.0",globalThis.MathfieldElement=H_,(Y_=window.customElements)==null||Y_.define("math-field",H_);}var X_=!1,Z_=null;function Q_(){X_||Z_||(Z_=nf().then(function(){X_=!0;}));}var $_=function(_HTMLElement2){function $_(){var _this68;_classCallCheck(this,$_);if(_this68=_callSuper(this,$_),_this68._hasRendered=!1,_this68._shadowRoot=_this68.attachShadow({mode:"open"}),"adoptedStyleSheets"in _this68._shadowRoot)_this68._shadowRoot.adoptedStyleSheets=[tl("core")];else{var _e607=document.createElement("style");_e607.textContent=el("core"),_this68._shadowRoot.appendChild(_e607);}_this68._contentSlot=document.createElement("div"),_this68._contentSlot.style.display="none",_this68._contentSlot.setAttribute("part","content"),_this68._renderContainer=document.createElement("div"),_this68._renderContainer.setAttribute("part","render"),_this68._renderContainer.setAttribute("aria-hidden","true"),_this68._errorFallback=document.createElement("div"),_this68._errorFallback.style.display="none",_this68._errorFallback.setAttribute("part","error"),_this68._shadowRoot.appendChild(_this68._contentSlot),_this68._shadowRoot.appendChild(_this68._renderContainer),_this68._shadowRoot.appendChild(_this68._errorFallback),_this68.addEventListener("keydown",_this68._handleKeydown.bind(_this68));return _this68;}_inherits($_,_HTMLElement2);return _createClass($_,[{key:"connectedCallback",value:function connectedCallback(){var _this69=this;Q_(),"IntersectionObserver"in window&&!this._hasRendered?(this._observer=new IntersectionObserver(function(e){var t;e[0].isIntersecting&&!_this69._hasRendered&&(_this69.render(),(t=_this69._observer)==null||t.disconnect());},{rootMargin:"50px"}),this._observer.observe(this)):this.render();}},{key:"disconnectedCallback",value:function disconnectedCallback(){var e;(e=this._observer)==null||e.disconnect();}},{key:"attributeChangedCallback",value:function attributeChangedCallback(e,t,n){t!==n&&this._hasRendered&&this.render();}},{key:"_handleKeydown",value:function _handleKeydown(e){if(this.getAttribute("tabindex")!==null&&(e.key===" "||e.key==="Enter")){e.preventDefault();var _t375=this.getAttribute("aria-label");if(_t375&&"speechSynthesis"in window){var _e608=new SpeechSynthesisUtterance(_t375);speechSynthesis.speak(_e608);}}}},{key:"mode",get:function get(){var e=this.getAttribute("mode");return e==="textstyle"||e==="displaystyle"?e:this.getDefaultMathstyle();},set:function set(e){this.setAttribute("mode",e);}},{key:"format",get:function get(){var e=this.getAttribute("format");return e==="latex"||e==="ascii-math"||e==="math-json"?e:"latex";},set:function set(e){this.setAttribute("format",e);}},{key:"letterShapeStyle",get:function get(){var e=this.getAttribute("letter-shape-style");if(e==="auto"||e==="tex"||e==="iso"||e==="french"||e==="upright")return e;},set:function set(e){e===void 0?this.removeAttribute("letter-shape-style"):this.setAttribute("letter-shape-style",e);}},{key:"macros",get:function get(){var e;return(e=this.getAttribute("macros"))==null?void 0:e;},set:function set(e){e===void 0?this.removeAttribute("macros"):this.setAttribute("macros",e);}},{key:"minFontScale",get:function get(){var e=this.getAttribute("min-font-scale");return e?parseFloat(e):void 0;},set:function set(e){e===void 0?this.removeAttribute("min-font-scale"):this.setAttribute("min-font-scale",String(e));}},{key:"maxMatrixCols",get:function get(){var e=this.getAttribute("max-matrix-cols");return e?parseInt(e,10):void 0;},set:function set(e){e===void 0?this.removeAttribute("max-matrix-cols"):this.setAttribute("max-matrix-cols",String(e));}},{key:"render",value:function render(){var e,t,n;try{var _n220=(t=(e=this.textContent)==null?void 0:e.trim())==null?"":t;if(!_n220){this._renderContainer.innerHTML="",this._errorFallback.style.display="none",this._renderContainer.style.display="none",this._removeMathML();return;}this._contentSlot.textContent=_n220;var r,i=this.format;r=i==="ascii-math"?Ag(_n220):i==="math-json"?Og(JSON.parse(_n220)):_n220;var _a65={defaultMode:this.mode==="displaystyle"?"math":"inline-math"};if(this.letterShapeStyle&&(_a65.letterShapeStyle=this.letterShapeStyle),this.macros)try{_a65.macros=JSON.parse(this.macros);}catch(e){console.warn("Invalid macros JSON:",e);}this.minFontScale!==void 0&&(_a65.minFontScale=this.minFontScale),this.maxMatrixCols!==void 0&&(_a65.maxMatrixCols=this.maxMatrixCols);var _o40=X(r,_a65);this._renderContainer.innerHTML=_o40,this._renderContainer.style.display=this.getDefaultDisplay(),this._errorFallback.style.display="none",this._updateAccessibility(r),this._hasRendered=!0,this.dispatchEvent(new CustomEvent("render",{bubbles:!0,composed:!0,detail:{format:i,content:r}}));}catch(e){console.error("MathLive static element render error:",e),this._renderContainer.style.display="none",this._errorFallback.textContent=(n=this.textContent)==null?"":n,this._errorFallback.style.display="block",this._removeMathML(),this.dispatchEvent(new CustomEvent("render-error",{bubbles:!0,composed:!0,detail:{error:e,content:this.textContent}}));}}},{key:"_updateAccessibility",value:function _updateAccessibility(e){if(!this.hasAttribute("aria-label"))try{var _t376=Eg(e);this.setAttribute("aria-label",_t376);}catch(e){console.warn("Could not generate speakable text:",e);}this.hasAttribute("role")||this.setAttribute("role","img"),this._addMathML(e);}},{key:"_addMathML",value:function _addMathML(e){try{var _t377=Tg(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=_t377;}catch(e){console.warn("Could not generate MathML:",e);}}},{key:"_removeMathML",value:function _removeMathML(){this._mathMLContainer&&(this._mathMLContainer.remove(),this._mathMLContainer=void 0);}}],[{key:"observedAttributes",get:function get(){return["mode","format","macros","letter-shape-style","min-font-scale","max-matrix-cols"];}}]);}(_wrapNativeSuper(HTMLElement)),ev=function(_$_){function ev(){_classCallCheck(this,ev);return _callSuper(this,ev,arguments);}_inherits(ev,_$_);return _createClass(ev,[{key:"getDefaultMathstyle",value:function getDefaultMathstyle(){return"textstyle";}},{key:"getDefaultDisplay",value:function getDefaultDisplay(){return"inline-flex";}}]);}($_),tv=function(_$_2){function tv(){_classCallCheck(this,tv);return _callSuper(this,tv,arguments);}_inherits(tv,_$_2);return _createClass(tv,[{key:"getDefaultMathstyle",value:function getDefaultMathstyle(){return"displaystyle";}},{key:"getDefaultDisplay",value:function getDefaultDisplay(){return"flex";}}]);}($_);function nv(){var e,t,n,r;(typeof window==="undefined"?"undefined":_typeof(window))<"u"&&((e=window.customElements)!=null&&e.get("math-span")||(t=window.customElements)==null||t.define("math-span",ev),(n=window.customElements)!=null&&n.get("math-div")||(r=window.customElements)==null||r.define("math-div",tv));}nv();function rv(e,t,n){var r=n,i=0,a=e.length;for(;r<t.length;){var _n221=t[r];if(i<=0&&t.slice(r,r+a)===e)return r;_n221==="\\"?r++:_n221==="{"?i++:_n221==="}"&&i--,r++;}return-1;}function iv(e,t,n,r){var i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:"latex";var a=[];var _iterator167=_createForOfIteratorHelper(e),_step167;try{for(_iterator167.s();!(_step167=_iterator167.n()).done;){var _o41=_step167.value;if(_o41.type==="text"){var _e609=_o41.data,_s26=!0,_c19=0,_l10=void 0;_l10=_e609.indexOf(t),_l10!==-1&&(_c19=_l10,_c19>0&&a.push({type:"text",data:_e609.slice(0,_c19)}),_s26=!1);var _u5=!1;for(;!_u5;){if(_s26){if(_l10=_e609.indexOf(t,_c19),_l10===-1){_u5=!0;break;}_c19!==_l10&&a.push({type:"text",data:_e609.slice(_c19,_l10)}),_c19=_l10;}else{var _c20,_c21;if(_l10=rv(n,_e609,_c19+t.length),_l10===-1){_u5=!0;break;}var _o42=_e609.slice(_c19+t.length,_l10);i==="ascii-math"&&(_c20=_c(_o42,{format:"ascii-math"}),_c21=_slicedToArray(_c20,2),_o42=_c21[1],_c20),a.push({type:"math",data:_o42,mathstyle:r}),_c19=_l10+n.length;}_s26=!_s26;}_c19<_e609.length&&a.push({type:"text",data:_e609.slice(_c19)});}else a.push(_o41);}}catch(err){_iterator167.e(err);}finally{_iterator167.f();}return a;}function av(e,t){var n,r,i,a,o,s,c,l;var u=[{type:"text",data:e}];return(r=(n=t.TeX)==null?void 0:n.delimiters)!=null&&r.display&&t.TeX.delimiters.display.forEach(function(_ref11){var _ref12=_slicedToArray(_ref11,2),e=_ref12[0],t=_ref12[1];u=iv(u,e,t,"displaystyle");}),(a=(i=t.TeX)==null?void 0:i.delimiters)!=null&&a.inline&&t.TeX.delimiters.inline.forEach(function(_ref13){var _ref14=_slicedToArray(_ref13,2),e=_ref14[0],t=_ref14[1];u=iv(u,e,t,"textstyle");}),(s=(o=t.asciiMath)==null?void 0:o.delimiters)!=null&&s.inline&&t.asciiMath.delimiters.inline.forEach(function(_ref15){var _ref16=_slicedToArray(_ref15,2),e=_ref16[0],t=_ref16[1];u=iv(u,e,t,"textstyle","ascii-math");}),(l=(c=t.asciiMath)==null?void 0:c.delimiters)!=null&&l.display&&t.asciiMath.delimiters.display.forEach(function(_ref17){var _ref18=_slicedToArray(_ref17,2),e=_ref18[0],t=_ref18[1];u=iv(u,e,t,"displaystyle","ascii-math");}),u;}function ov(e,t){var n=document.createElement("span");n.setAttribute("translate","no");try{var r="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+t.renderToMathML(e)+"</math>";n.innerHTML=globalThis.MathfieldElement.createHTML(r);}catch(t){console.error("MathLive 0.110.0: Could not convert \"".concat(e,"\"' to MathML with ").concat(t)),n.textContent=e;}return n.className="ML__sr-only",n;}function sv(e,t,n){try{var r=t.renderToMarkup(e,l(c({},t),{defaultMode:n==="displaystyle"?"math":"inline-math"})),i=document.createElement("span");return i.dataset.latex=e,i.style.display=n==="displaystyle"?"flex":"inline-flex",i.setAttribute("aria-hidden","true"),i.setAttribute("translate","no"),i.innerHTML=globalThis.MathfieldElement.createHTML(r),i;}catch(t){return console.error("Could not parse'"+e+"' with ",t),document.createTextNode(e);}}function cv(e,t,n){var r;var i=sv(e,n,t||"textstyle"),a=(r=n.renderAccessibleContent)==null?"":r;if(/\b(mathml|speakable-text)\b/i.test(a)){var _t378=document.createElement("span");if(/\bmathml\b/i.test(a)&&n.renderToMathML&&_t378.append(ov(e,n)),/\bspeakable-text\b/i.test(a)&&n.renderToSpeakableText){var _r118=document.createElement("span");_r118.setAttribute("translate","no");var _i104=n.renderToSpeakableText(e);_r118.innerHTML=globalThis.MathfieldElement.createHTML(_i104),_r118.className="ML__sr-only",_t378.append(_r118);}return _t378.append(i),_t378;}return i;}function lv(e,t){var n;if(/^\s*$/.test(e))return null;if((n=t.TeX)!=null&&n.processEnvironments&&/^\s*\\begin/.test(e))return[cv(e,"",t)];var r=av(e,t);if(r.length===1&&r[0].type==="text")return null;var i=[];var _iterator168=_createForOfIteratorHelper(r),_step168;try{for(_iterator168.s();!(_step168=_iterator168.n()).done;){var _e610=_step168.value;_e610.type==="text"?i.push(_e610.data):i.push(cv(_e610.data,_e610.mathstyle==="textstyle"?"textstyle":"displaystyle",t));}}catch(err){_iterator168.e(err);}finally{_iterator168.f();}return i;}function uv(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y;if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){var _i105=(n=e.childNodes[0].textContent)==null?"":n;if((r=t.TeX)!=null&&r.processEnvironments&&/^\s*\\begin/.test(_i105)){e.textContent="",e.append(cv(_i105,"",t));return;}var _a66=av(_i105,t);if(_a66.length===1){var _n222=_a66[0];if(_n222.type==="text")return;e.textContent="",e.append(cv(_n222.data,_n222.mathstyle==="textstyle"?"textstyle":"displaystyle",t));return;}}var b=_toConsumableArray(e.childNodes);var _iterator169=_createForOfIteratorHelper(b),_step169;try{for(_iterator169.s();!(_step169=_iterator169.n()).done;){var _e611=_step169.value;if(_e611.nodeType===3){var _n223=lv((i=_e611.textContent)==null?"":i,t);_n223&&_e611.replaceWith.apply(_e611,_toConsumableArray(_n223));}else if(_e611.nodeType===1){var _n224=_e611.nodeName.toLowerCase();if(_n224==="script"){var _n225=_e611,_r119=_n225.type.toLowerCase();if(_r119==="module"||_r119==="javascript")continue;var _i106=void 0;if((a=t.processScriptTypePattern)!=null&&a.test(_r119))_i106=(o=_n225.textContent)==null?"":o;else if((s=t.processMathJSONScriptTypePattern)!=null&&s.test(_r119))try{_i106=(l=t.serializeToLatex)==null?void 0:l.call(t,JSON.parse((c=_n225.textContent)==null?"":c));}catch(e){console.error(e);}if(_i106){var _e612="textstyle";var _iterator170=_createForOfIteratorHelper(_r119.split(";")),_step170;try{for(_iterator170.s();!(_step170=_iterator170.n()).done;){var _t379=_step170.value;var _t379$split=_t379.split("="),_t379$split2=_slicedToArray(_t379$split,2),_n226=_t379$split2[0],_r120=_t379$split2[1];_n226.trim()==="mode"&&(_e612=_r120.trim()==="display"?"displaystyle":"textstyle");}}catch(err){_iterator170.e(err);}finally{_iterator170.f();}pv(_n225,_i106,_e612,t);}}else{var _r121=_e611;if((u=t.texClassDisplayPattern)!=null&&u.test(_r121.className)){pv(_r121,(d=_r121.textContent)==null?"":d,"displaystyle",t);continue;}if((f=t.texClassInlinePattern)!=null&&f.test(_r121.className)){pv(_r121,(p=_r121.textContent)==null?"":p,"textstyle",t);continue;}((h=(m=t.processClassPattern)==null?void 0:m.test(_r121.className))!=null&&h||!((_=(g=t.skipTags)==null?void 0:g.includes(_n224))!=null&&_||(y=(v=t.ignoreClassPattern)==null?void 0:v.test(_r121.className))!=null&&y))&&uv(_r121,t);}}}}catch(err){_iterator169.e(err);}finally{_iterator169.f();}}var dv={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 fv(e,t){var n,r,i,a,o,s,l,u;try{var _d2=c(c({},dv),t);_d2.ignoreClassPattern=new RegExp((n=_d2.ignoreClass)==null?"":n),_d2.processClassPattern=new RegExp((r=_d2.processClass)==null?"":r),_d2.processScriptTypePattern=new RegExp((i=_d2.processScriptType)==null?"":i),_d2.processMathJSONScriptTypePattern=new RegExp((a=_d2.processMathJSONScriptType)==null?"":a),(s=(o=_d2.TeX)==null?void 0:o.className)!=null&&s.display&&(_d2.texClassDisplayPattern=new RegExp(_d2.TeX.className.display)),(u=(l=_d2.TeX)==null?void 0:l.className)!=null&&u.inline&&(_d2.texClassInlinePattern=new RegExp(_d2.TeX.className.inline)),nf(),rl("core"),uv(e,_d2);}catch(t){t instanceof Error?console.error("renderMathInElement(): "+t.message):console.error("renderMathInElement(): Could not render math for element",e);}}function pv(e,t,n,r){e.parentNode.replaceChild(cv(t,n,r),e);}function mv(e,t){var n=dp.singleton;return n?(n.show(),Af(),n.currentLayer=t,n.render(),n.focus(),!0):!1;}function hv(){var e=window.mathVirtualKeyboard;return e.visible?e.hide({animate:!0}):e.show({animate:!0}),!1;}hf({switchKeyboardLayer:mv,toggleVirtualKeyboard:hv,hideVirtualKeyboard:function hideVirtualKeyboard(){return window.mathVirtualKeyboard.hide({animate:!0}),!1;},showVirtualKeyboard:function showVirtualKeyboard(){return window.mathVirtualKeyboard.show({animate:!0}),!1;}},{target:"virtual-keyboard"});function gv(){var e;return globalThis[e=Symbol.for("io.cortexjs.mathlive")]!=null||(globalThis[e]={}),globalThis[Symbol.for("io.cortexjs.mathlive")];}function _v(e){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){return yv(document.body,e);}):yv(document.body,e);}function vv(e){if(_typeof(e)=="string"){var _t380=document.getElementById(e);if(_t380===null)throw Error("The element with ID \"".concat(e,"\" could not be found."));return _t380;}return e;}function yv(e,t){if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",function(){return yv(e,t);});return;}var n=vv(e);if(!n)return;var r=t==null?{}:t;r.renderToMarkup!=null||(r.renderToMarkup=X),r.renderToMathML!=null||(r.renderToMathML=Tg),r.renderToSpeakableText!=null||(r.renderToSpeakableText=Eg),r.serializeToLatex!=null||(r.serializeToLatex=Og),fv(n,r);}var bv={mathlive:"0.110.0"};exports.MathDivElement=tv,exports.MathSpanElement=ev,exports.MathfieldElement=H_,exports._renderMathInElement=fv,exports.convertAsciiMathToLatex=Ag,exports.convertLatexToAsciiMath=kg,exports.convertLatexToMarkup=X,exports.convertLatexToMathMl=Tg,exports.convertLatexToSpeakableText=Eg,exports.convertMathJsonToLatex=Og,exports.globalMathLive=gv,exports.initVirtualKeyboardInCurrentBrowsingContext=pp,exports.renderMathInDocument=_v,exports.renderMathInElement=yv,exports.setKeyboardLayout=ye,exports.setKeyboardLayoutLocale=be,exports.validateLatex=wg,exports.version=bv;
|