import{A as w}from"./index.f4d41e67.entry.js";function A(g,p){return p.forEach(function(a){a&&typeof a!="string"&&!Array.isArray(a)&&Object.keys(a).forEach(function(l){if(l!=="default"&&!(l in g)){var s=Object.getOwnPropertyDescriptor(a,l);Object.defineProperty(g,l,s.get?s:{enumerable:!0,get:function(){return a[l]}})}})}),Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}var x={exports:{}};(function(g,p){(function(a){a(w.exports)})(function(a){a.defineMode("stex",function(l,s){function b(t,e){t.cmdState.push(e)}function k(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function v(t){var e=t.cmdState.pop();e&&e.closeBracket()}function S(t){for(var e=t.cmdState,n=e.length-1;n>=0;n--){var i=e[n];if(i.name!="DEFAULT")return i}return{styleIdentifier:function(){return null}}}function f(t,e,n){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var r={};r.importmodule=f("importmodule","tag",["string","builtin"]),r.documentclass=f("documentclass","tag",["","atom"]),r.usepackage=f("usepackage","tag",["atom"]),r.begin=f("begin","tag",["atom"]),r.end=f("end","tag",["atom"]),r.label=f("label","tag",["atom"]),r.ref=f("ref","tag",["atom"]),r.eqref=f("eqref","tag",["atom"]),r.cite=f("cite","tag",["atom"]),r.bibitem=f("bibitem","tag",["atom"]),r.Bibitem=f("Bibitem","tag",["atom"]),r.RBibitem=f("RBibitem","tag",["atom"]),r.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function u(t,e){t.f=e}function h(t,e){var n;if(t.match(/^\\[a-zA-Z@]+/)){var i=t.current().slice(1);return n=r.hasOwnProperty(i)?r[i]:r.DEFAULT,n=new n,b(e,n),u(e,y),n.style}if(t.match(/^\\[$&%#{}_]/)||t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return u(e,function(c,m){return d(c,m,"\\]")}),"keyword";if(t.match("\\("))return u(e,function(c,m){return d(c,m,"\\)")}),"keyword";if(t.match("$$"))return u(e,function(c,m){return d(c,m,"$$")}),"keyword";if(t.match("$"))return u(e,function(c,m){return d(c,m,"$")}),"keyword";var o=t.next();if(o=="%")return t.skipToEnd(),"comment";if(o=="}"||o=="]"){if(n=k(e),n)n.closeBracket(o),u(e,y);else return"error";return"bracket"}else return o=="{"||o=="["?(n=r.DEFAULT,n=new n,b(e,n),"bracket"):/\d/.test(o)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),n=S(e),n.name=="begin"&&(n.argument=t.current()),n.styleIdentifier())}function d(t,e,n){if(t.eatSpace())return null;if(n&&t.match(n))return u(e,h),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/)||t.match(/^\\[,;!\/]/)||t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=t.next();return i=="{"||i=="}"||i=="["||i=="]"||i=="("||i==")"?"bracket":i=="%"?(t.skipToEnd(),"comment"):"error"}function y(t,e){var n=t.peek(),i;return n=="{"||n=="["?(i=k(e),i.openBracket(n),t.eat(n),u(e,h),"bracket"):/[ \t\r]/.test(n)?(t.eat(n),null):(u(e,h),v(e),h(t,e))}return{startState:function(){var t=s.inMathMode?function(e,n){return d(e,n)}:h;return{cmdState:[],f:t}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=h,t.cmdState.length=0},lineComment:"%"}}),a.defineMIME("text/x-stex","stex"),a.defineMIME("text/x-latex","stex")})})();var B=x.exports,_=A({__proto__:null,default:B},[x.exports]);export{x as a,_ as s};
