diff --git a/assets/index-BEQyUABx.css b/assets/index-CXmNOnWM.css similarity index 95% rename from assets/index-BEQyUABx.css rename to assets/index-CXmNOnWM.css index 3b97f61..268926d 100644 --- a/assets/index-BEQyUABx.css +++ b/assets/index-CXmNOnWM.css @@ -1 +1 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.visible{visibility:visible}.fixed{position:fixed}.m-2{margin:.5rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mr-4{margin-right:1rem}.inline{display:inline}.flex{display:flex}.h-16{height:4rem}.h-9{height:2.25rem}.min-h-\[200px\]{min-height:200px}.min-h-screen{min-height:100vh}.flex-1{flex:1 1 0%}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.p-2{padding:.5rem}.p-4{padding:1rem}.text-center{text-align:center}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-medium{font-weight:500}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}@media (hover: hover) and (pointer: fine){.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}}.active\:bg-gray-400:active{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}@media (min-width: 768px){.md\:flex-row{flex-direction:row}}.bg-app[data-v-bdf32408]{background-color:#eee}.theme-app[data-v-bdf32408]{background-color:#1f2937}.text-app-blue[data-v-bdf32408]{color:#0d70b0}.text-app-light-black[data-v-bdf32408]{color:#333}#typst[data-v-bdf32408]{white-space:pre-line} +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.visible{visibility:visible}.fixed{position:fixed}.m-2{margin:.5rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mr-4{margin-right:1rem}.inline{display:inline}.flex{display:flex}.h-16{height:4rem}.h-9{height:2.25rem}.min-h-\[200px\]{min-height:200px}.min-h-screen{min-height:100vh}.flex-1{flex:1 1 0%}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.p-2{padding:.5rem}.p-4{padding:1rem}.text-center{text-align:center}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-medium{font-weight:500}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}@media (hover: hover) and (pointer: fine){.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}}.active\:bg-gray-400:active{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}@media (min-width: 768px){.md\:flex-row{flex-direction:row}}.bg-app[data-v-e813204c]{background-color:#eee}.theme-app[data-v-e813204c]{background-color:#1f2937}.text-app-blue[data-v-e813204c]{color:#0d70b0}.text-app-light-black[data-v-e813204c]{color:#333}#typst[data-v-e813204c]{white-space:pre-line} diff --git a/assets/index-BcE8uG4T.js b/assets/index-DOB8158J.js similarity index 99% rename from assets/index-BcE8uG4T.js rename to assets/index-DOB8158J.js index 80bcca8..a49dfa4 100644 --- a/assets/index-BcE8uG4T.js +++ b/assets/index-DOB8158J.js @@ -275,4 +275,4 @@ l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, ?)[ \r ]*`,ja="[̀-ͯ]",yc=new RegExp(ja+"+$"),xc="("+Gl+"+)|"+(bc+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(ja+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(ja+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+gc)+("|"+vc+")");class Wi{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(xc,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new s0("EOF",new Je(this,r,r));var a=this.tokenRegex.exec(e);if(a===null||a.index!==r)throw new N("Unexpected character: '"+e[r]+"'",new s0(e[r],new Je(this,r,r+1)));var n=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[n]===14){var i=e.indexOf(` `,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new s0(n,new Je(this,r,this.tokenRegex.lastIndex))}}class wc{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new N("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,a){if(a===void 0&&(a=!1),a){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}}var Sc=Il;f("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});f("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});f("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});f("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});f("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});f("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");f("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Yi={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};f("\\char",function(t){var e=t.popToken(),r,a="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new N("\\char` missing argument");a=e.text.charCodeAt(0)}else r=10;if(r){if(a=Yi[e.text],a==null||a>=r)throw new N("Invalid base-"+r+" digit "+e.text);for(var n;(n=Yi[t.future().text])!=null&&n{var a=t.consumeArg().tokens;if(a.length!==1)throw new N("\\newcommand's first argument must be a macro name");var n=a[0].text,i=t.isDefined(n);if(i&&!e)throw new N("\\newcommand{"+n+"} attempting to redefine "+(n+"; use \\renewcommand"));if(!i&&!r)throw new N("\\renewcommand{"+n+"} when command "+n+" does not yet exist; use \\newcommand");var s=0;if(a=t.consumeArg().tokens,a.length===1&&a[0].text==="["){for(var u="",c=t.expandNextToken();c.text!=="]"&&c.text!=="EOF";)u+=c.text,c=t.expandNextToken();if(!u.match(/^\s*[0-9]+\s*$/))throw new N("Invalid number of arguments: "+u);s=parseInt(u),a=t.consumeArg().tokens}return t.macros.set(n,{tokens:a,numArgs:s}),""};f("\\newcommand",t=>Dn(t,!1,!0));f("\\renewcommand",t=>Dn(t,!0,!1));f("\\providecommand",t=>Dn(t,!0,!0));f("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});f("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});f("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),W0[r],pe.math[r],pe.text[r]),""});f("\\bgroup","{");f("\\egroup","}");f("~","\\nobreakspace");f("\\lq","`");f("\\rq","'");f("\\aa","\\r a");f("\\AA","\\r A");f("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");f("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");f("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");f("ℬ","\\mathscr{B}");f("ℰ","\\mathscr{E}");f("ℱ","\\mathscr{F}");f("ℋ","\\mathscr{H}");f("ℐ","\\mathscr{I}");f("ℒ","\\mathscr{L}");f("ℳ","\\mathscr{M}");f("ℛ","\\mathscr{R}");f("ℭ","\\mathfrak{C}");f("ℌ","\\mathfrak{H}");f("ℨ","\\mathfrak{Z}");f("\\Bbbk","\\Bbb{k}");f("·","\\cdotp");f("\\llap","\\mathllap{\\textrm{#1}}");f("\\rlap","\\mathrlap{\\textrm{#1}}");f("\\clap","\\mathclap{\\textrm{#1}}");f("\\mathstrut","\\vphantom{(}");f("\\underbar","\\underline{\\text{#1}}");f("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');f("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");f("\\ne","\\neq");f("≠","\\neq");f("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");f("∉","\\notin");f("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");f("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");f("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");f("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");f("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");f("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");f("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");f("⟂","\\perp");f("‼","\\mathclose{!\\mkern-0.8mu!}");f("∌","\\notni");f("⌜","\\ulcorner");f("⌝","\\urcorner");f("⌞","\\llcorner");f("⌟","\\lrcorner");f("©","\\copyright");f("®","\\textregistered");f("️","\\textregistered");f("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');f("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');f("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');f("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');f("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");f("⋮","\\vdots");f("\\varGamma","\\mathit{\\Gamma}");f("\\varDelta","\\mathit{\\Delta}");f("\\varTheta","\\mathit{\\Theta}");f("\\varLambda","\\mathit{\\Lambda}");f("\\varXi","\\mathit{\\Xi}");f("\\varPi","\\mathit{\\Pi}");f("\\varSigma","\\mathit{\\Sigma}");f("\\varUpsilon","\\mathit{\\Upsilon}");f("\\varPhi","\\mathit{\\Phi}");f("\\varPsi","\\mathit{\\Psi}");f("\\varOmega","\\mathit{\\Omega}");f("\\substack","\\begin{subarray}{c}#1\\end{subarray}");f("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");f("\\boxed","\\fbox{$\\displaystyle{#1}$}");f("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");f("\\implies","\\DOTSB\\;\\Longrightarrow\\;");f("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var Xi={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};f("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in Xi?e=Xi[r]:(r.slice(0,4)==="\\not"||r in pe.math&&W.contains(["bin","rel"],pe.math[r].group))&&(e="\\dotsb"),e});var Bn={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};f("\\dotso",function(t){var e=t.future().text;return e in Bn?"\\ldots\\,":"\\ldots"});f("\\dotsc",function(t){var e=t.future().text;return e in Bn&&e!==","?"\\ldots\\,":"\\ldots"});f("\\cdots",function(t){var e=t.future().text;return e in Bn?"\\@cdots\\,":"\\@cdots"});f("\\dotsb","\\cdots");f("\\dotsm","\\cdots");f("\\dotsi","\\!\\cdots");f("\\dotsx","\\ldots\\,");f("\\DOTSI","\\relax");f("\\DOTSB","\\relax");f("\\DOTSX","\\relax");f("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");f("\\,","\\tmspace+{3mu}{.1667em}");f("\\thinspace","\\,");f("\\>","\\mskip{4mu}");f("\\:","\\tmspace+{4mu}{.2222em}");f("\\medspace","\\:");f("\\;","\\tmspace+{5mu}{.2777em}");f("\\thickspace","\\;");f("\\!","\\tmspace-{3mu}{.1667em}");f("\\negthinspace","\\!");f("\\negmedspace","\\tmspace-{4mu}{.2222em}");f("\\negthickspace","\\tmspace-{5mu}{.277em}");f("\\enspace","\\kern.5em ");f("\\enskip","\\hskip.5em\\relax");f("\\quad","\\hskip1em\\relax");f("\\qquad","\\hskip2em\\relax");f("\\tag","\\@ifstar\\tag@literal\\tag@paren");f("\\tag@paren","\\tag@literal{({#1})}");f("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new N("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});f("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");f("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");f("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");f("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");f("\\newline","\\\\\\relax");f("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var jl=R(k0["Main-Regular"][84][1]-.7*k0["Main-Regular"][65][1]);f("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+jl+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");f("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+jl+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");f("\\hspace","\\@ifstar\\@hspacer\\@hspace");f("\\@hspace","\\hskip #1\\relax");f("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");f("\\ordinarycolon",":");f("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");f("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');f("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');f("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');f("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');f("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');f("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');f("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');f("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');f("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');f("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');f("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');f("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');f("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');f("∷","\\dblcolon");f("∹","\\eqcolon");f("≔","\\coloneqq");f("≕","\\eqqcolon");f("⩴","\\Coloneqq");f("\\ratio","\\vcentcolon");f("\\coloncolon","\\dblcolon");f("\\colonequals","\\coloneqq");f("\\coloncolonequals","\\Coloneqq");f("\\equalscolon","\\eqqcolon");f("\\equalscoloncolon","\\Eqqcolon");f("\\colonminus","\\coloneq");f("\\coloncolonminus","\\Coloneq");f("\\minuscolon","\\eqcolon");f("\\minuscoloncolon","\\Eqcolon");f("\\coloncolonapprox","\\Colonapprox");f("\\coloncolonsim","\\Colonsim");f("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");f("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");f("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");f("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");f("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");f("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");f("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");f("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");f("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");f("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");f("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");f("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");f("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");f("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");f("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");f("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");f("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");f("\\nleqq","\\html@mathml{\\@nleqq}{≰}");f("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");f("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");f("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");f("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");f("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");f("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");f("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");f("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");f("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");f("\\imath","\\html@mathml{\\@imath}{ı}");f("\\jmath","\\html@mathml{\\@jmath}{ȷ}");f("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");f("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");f("⟦","\\llbracket");f("⟧","\\rrbracket");f("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");f("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");f("⦃","\\lBrace");f("⦄","\\rBrace");f("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");f("⦵","\\minuso");f("\\darr","\\downarrow");f("\\dArr","\\Downarrow");f("\\Darr","\\Downarrow");f("\\lang","\\langle");f("\\rang","\\rangle");f("\\uarr","\\uparrow");f("\\uArr","\\Uparrow");f("\\Uarr","\\Uparrow");f("\\N","\\mathbb{N}");f("\\R","\\mathbb{R}");f("\\Z","\\mathbb{Z}");f("\\alef","\\aleph");f("\\alefsym","\\aleph");f("\\Alpha","\\mathrm{A}");f("\\Beta","\\mathrm{B}");f("\\bull","\\bullet");f("\\Chi","\\mathrm{X}");f("\\clubs","\\clubsuit");f("\\cnums","\\mathbb{C}");f("\\Complex","\\mathbb{C}");f("\\Dagger","\\ddagger");f("\\diamonds","\\diamondsuit");f("\\empty","\\emptyset");f("\\Epsilon","\\mathrm{E}");f("\\Eta","\\mathrm{H}");f("\\exist","\\exists");f("\\harr","\\leftrightarrow");f("\\hArr","\\Leftrightarrow");f("\\Harr","\\Leftrightarrow");f("\\hearts","\\heartsuit");f("\\image","\\Im");f("\\infin","\\infty");f("\\Iota","\\mathrm{I}");f("\\isin","\\in");f("\\Kappa","\\mathrm{K}");f("\\larr","\\leftarrow");f("\\lArr","\\Leftarrow");f("\\Larr","\\Leftarrow");f("\\lrarr","\\leftrightarrow");f("\\lrArr","\\Leftrightarrow");f("\\Lrarr","\\Leftrightarrow");f("\\Mu","\\mathrm{M}");f("\\natnums","\\mathbb{N}");f("\\Nu","\\mathrm{N}");f("\\Omicron","\\mathrm{O}");f("\\plusmn","\\pm");f("\\rarr","\\rightarrow");f("\\rArr","\\Rightarrow");f("\\Rarr","\\Rightarrow");f("\\real","\\Re");f("\\reals","\\mathbb{R}");f("\\Reals","\\mathbb{R}");f("\\Rho","\\mathrm{P}");f("\\sdot","\\cdot");f("\\sect","\\S");f("\\spades","\\spadesuit");f("\\sub","\\subset");f("\\sube","\\subseteq");f("\\supe","\\supseteq");f("\\Tau","\\mathrm{T}");f("\\thetasym","\\vartheta");f("\\weierp","\\wp");f("\\Zeta","\\mathrm{Z}");f("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");f("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");f("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");f("\\bra","\\mathinner{\\langle{#1}|}");f("\\ket","\\mathinner{|{#1}\\rangle}");f("\\braket","\\mathinner{\\langle{#1}\\rangle}");f("\\Bra","\\left\\langle#1\\right|");f("\\Ket","\\left|#1\\right\\rangle");var Wl=t=>e=>{var r=e.consumeArg().tokens,a=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,s=e.macros.get("|"),u=e.macros.get("\\|");e.macros.beginGroup();var c=g=>w=>{t&&(w.macros.set("|",s),n.length&&w.macros.set("\\|",u));var S=g;if(!g&&n.length){var A=w.future();A.text==="|"&&(w.popToken(),S=!0)}return{tokens:S?n:a,numArgs:0}};e.macros.set("|",c(!1)),n.length&&e.macros.set("\\|",c(!0));var m=e.consumeArg().tokens,d=e.expandTokens([...i,...m,...r]);return e.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};f("\\bra@ket",Wl(!1));f("\\bra@set",Wl(!0));f("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");f("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");f("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");f("\\angln","{\\angl n}");f("\\blue","\\textcolor{##6495ed}{#1}");f("\\orange","\\textcolor{##ffa500}{#1}");f("\\pink","\\textcolor{##ff00af}{#1}");f("\\red","\\textcolor{##df0030}{#1}");f("\\green","\\textcolor{##28ae7b}{#1}");f("\\gray","\\textcolor{gray}{#1}");f("\\purple","\\textcolor{##9d38bd}{#1}");f("\\blueA","\\textcolor{##ccfaff}{#1}");f("\\blueB","\\textcolor{##80f6ff}{#1}");f("\\blueC","\\textcolor{##63d9ea}{#1}");f("\\blueD","\\textcolor{##11accd}{#1}");f("\\blueE","\\textcolor{##0c7f99}{#1}");f("\\tealA","\\textcolor{##94fff5}{#1}");f("\\tealB","\\textcolor{##26edd5}{#1}");f("\\tealC","\\textcolor{##01d1c1}{#1}");f("\\tealD","\\textcolor{##01a995}{#1}");f("\\tealE","\\textcolor{##208170}{#1}");f("\\greenA","\\textcolor{##b6ffb0}{#1}");f("\\greenB","\\textcolor{##8af281}{#1}");f("\\greenC","\\textcolor{##74cf70}{#1}");f("\\greenD","\\textcolor{##1fab54}{#1}");f("\\greenE","\\textcolor{##0d923f}{#1}");f("\\goldA","\\textcolor{##ffd0a9}{#1}");f("\\goldB","\\textcolor{##ffbb71}{#1}");f("\\goldC","\\textcolor{##ff9c39}{#1}");f("\\goldD","\\textcolor{##e07d10}{#1}");f("\\goldE","\\textcolor{##a75a05}{#1}");f("\\redA","\\textcolor{##fca9a9}{#1}");f("\\redB","\\textcolor{##ff8482}{#1}");f("\\redC","\\textcolor{##f9685d}{#1}");f("\\redD","\\textcolor{##e84d39}{#1}");f("\\redE","\\textcolor{##bc2612}{#1}");f("\\maroonA","\\textcolor{##ffbde0}{#1}");f("\\maroonB","\\textcolor{##ff92c6}{#1}");f("\\maroonC","\\textcolor{##ed5fa6}{#1}");f("\\maroonD","\\textcolor{##ca337c}{#1}");f("\\maroonE","\\textcolor{##9e034e}{#1}");f("\\purpleA","\\textcolor{##ddd7ff}{#1}");f("\\purpleB","\\textcolor{##c6b9fc}{#1}");f("\\purpleC","\\textcolor{##aa87ff}{#1}");f("\\purpleD","\\textcolor{##7854ab}{#1}");f("\\purpleE","\\textcolor{##543b78}{#1}");f("\\mintA","\\textcolor{##f5f9e8}{#1}");f("\\mintB","\\textcolor{##edf2df}{#1}");f("\\mintC","\\textcolor{##e0e5cc}{#1}");f("\\grayA","\\textcolor{##f6f7f7}{#1}");f("\\grayB","\\textcolor{##f0f1f2}{#1}");f("\\grayC","\\textcolor{##e3e5e6}{#1}");f("\\grayD","\\textcolor{##d6d8da}{#1}");f("\\grayE","\\textcolor{##babec2}{#1}");f("\\grayF","\\textcolor{##888d93}{#1}");f("\\grayG","\\textcolor{##626569}{#1}");f("\\grayH","\\textcolor{##3b3e40}{#1}");f("\\grayI","\\textcolor{##21242c}{#1}");f("\\kaBlue","\\textcolor{##314453}{#1}");f("\\kaGreen","\\textcolor{##71B307}{#1}");var Yl={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class kc{constructor(e,r,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(e),this.macros=new wc(Sc,r.macros),this.mode=a,this.stack=[]}feed(e){this.lexer=new Wi(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var r,a,n;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:n,end:a}=this.consumeArg(["]"])}else({tokens:n,start:r,end:a}=this.consumeArg());return this.pushToken(new s0("EOF",a.loc)),this.pushTokens(n),r.range(a,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],a=e&&e.length>0;a||this.consumeSpaces();var n=this.future(),i,s=0,u=0;do{if(i=this.popToken(),r.push(i),i.text==="{")++s;else if(i.text==="}"){if(--s,s===-1)throw new N("Extra }",i)}else if(i.text==="EOF")throw new N("Unexpected end of input in a macro argument, expected '"+(e&&a?e[u]:"}")+"'",i);if(e&&a)if((s===0||s===1&&e[u]==="{")&&i.text===e[u]){if(++u,u===e.length){r.splice(-u,u);break}}else u=0}while(s!==0||a);return n.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:n,end:i}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new N("The length of delimiters doesn't match the number of args!");for(var a=r[0],n=0;nthis.settings.maxExpand)throw new N("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),a=r.text,n=r.noexpand?null:this._getExpansion(a);if(n==null||e&&n.unexpandable){if(e&&n==null&&a[0]==="\\"&&!this.isDefined(a))throw new N("Undefined control sequence: "+a);return this.pushToken(r),!1}this.countExpansion(1);var i=n.tokens,s=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs){i=i.slice();for(var u=i.length-1;u>=0;--u){var c=i[u];if(c.text==="#"){if(u===0)throw new N("Incomplete placeholder at end of macro body",c);if(c=i[--u],c.text==="#")i.splice(u+1,1);else if(/^[1-9]$/.test(c.text))i.splice(u,2,...s[+c.text-1]);else throw new N("Not a valid argument number",c)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new s0(e)]):void 0}expandTokens(e){var r=[],a=this.stack.length;for(this.pushTokens(e);this.stack.length>a;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),r.push(n)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(a=>a.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var a=this.lexer.catcodes[e];if(a!=null&&a!==13)return}var n=typeof r=="function"?r(this):r;if(typeof n=="string"){var i=0;if(n.indexOf("#")!==-1)for(var s=n.replace(/##/g,"");s.indexOf("#"+(i+1))!==-1;)++i;for(var u=new Wi(n,this.settings),c=[],m=u.lex();m.text!=="EOF";)c.push(m),m=u.lex();c.reverse();var d={tokens:c,numArgs:i};return d}return n}isDefined(e){return this.macros.has(e)||W0.hasOwnProperty(e)||pe.math.hasOwnProperty(e)||pe.text.hasOwnProperty(e)||Yl.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:W0.hasOwnProperty(e)&&!W0[e].primitive}}var Ki=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,vr=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Ma={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Zi={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Qr{constructor(e,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new kc(e,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new N("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new s0("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,a}parseExpression(e,r){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(Qr.endOfExpression.indexOf(n.text)!==-1||r&&n.text===r||e&&W0[n.text]&&W0[n.text].infix)break;var i=this.parseAtom(r);if(i){if(i.type==="internal")continue}else break;a.push(i)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(e){for(var r=-1,a,n=0;n=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var u=pe[this.mode][r].group,c=Je.range(e),m;if(h4.hasOwnProperty(u)){var d=u;m={type:"atom",mode:this.mode,family:d,loc:c,text:r}}else m={type:u,mode:this.mode,loc:c,text:r};s=m}else if(r.charCodeAt(0)>=128)this.settings.strict&&(al(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),s={type:"textord",mode:"text",loc:Je.range(e),text:r};else return null;if(this.consume(),i)for(var g=0;gFe(r)),e.args.length===1&&(e=e.args[0]);break;case"leftright":{const r=Fe({type:"ordgroup",mode:"math",body:t.body});e.type="leftright";let a=t.left;a==="\\{"&&(a="{");let n=t.right;n==="\\}"&&(n="}"),e.args=[{type:"atom",content:a},r,{type:"atom",content:n}];break}case"underline":case"overline":e.type="unaryFunc",e.content="\\"+t.type,e.args=[Fe(t.body)];break;case"accent":{e.type="unaryFunc",e.content=t.label,e.args=[Fe(t.base)];break}case"sqrt":t.index&&(e.irregularData=Fe(t.index));case"font":case"operatorname":if(e.type="unaryFunc",e.content="\\"+t.type,t.type==="font"&&(e.content="\\"+t.font),Array.isArray(t.body)){const r={type:"ordgroup",mode:"math",body:t.body};e.args=[Fe(r)]}else e.args=[Fe(t.body)];break;case"horizBrace":e.type="unaryFunc",e.content=t.label,e.args=[Fe(t.base)];break;case"array":t.colSeparationType==="align"?e.type="align":e.type="matrix",e.irregularData=t.body.map(r=>r.map(a=>{if(a.type!=="styling"||a.body.length!==1)throw new It("Expecting cell.type==='\\styling' and cell.body.length===1",a);return Fe(a.body[0])}));break;case"spacing":e.type="spacing",e.content=t.text;break;case"text":{e.type="text";let r="";t.body.forEach(a=>{if(a.mode!=="text")throw new It("Expecting node.mode==='text'",t);r+=a.text}),e.content=r;break}case"kern":e.type="empty",e.content=" ";break;case"htmlmathml":{const r=t.mathml[0].body[0];if(r&&r.type==="textord"&&r.text==="≠"){e.type="symbol",e.content="\\neq";break}}case"color":if(Array.isArray(t.body)&&t.body.length===1){const r=t.body[0];if(r.type==="text"){e.type="unknownMacro";const a=r.body.map(n=>n.text).join("");if(/^\\[a-zA-Z]+$/.test(a)){e.content=a.substring(1);break}}}throw new It("Unknown error type in parsed result:",t);default:throw new It(`Unknown node type: ${t.type}`,t)}return e}catch(e){throw e}}function qc(t,e){let n={type:"ordgroup",mode:"math",body:Nc(t,{macros:e,displayMode:!0,strict:"ignore",throwOnError:!1}),loc:{}};return Fe(n)}var Mt={},ea={};Object.defineProperty(ea,"__esModule",{value:!0});ea.symbolMap=void 0;ea.symbolMap=new Map([["cdot","dot.op"],["to","arrow.r"],["rightarrow","arrow.r"],["leftarrow","arrow.l"],["gets","arrow.l"],["infty","infinity"],["nonumber",""],["vec","arrow"],["mathbf","bold"],["boldsymbol","bold"],["mathcal","cal"],["mathfrak","frak"],["doteq","dot(eq)"],["ge","gt.eq"],["geq","gt.eq"],["le","lt.eq"],["leq","lt.eq"],["neq","eq.not"],["dot","dot"],["ddot","dot.double"],["dots","dots.h"],["ldots","dots.h"],["vdots","dots.v"],["ddots","dots.down"],["cdots","dots.h.c"],["cap","sect"],["cup","union"],["hat","hat"],["widehat","hat"],["tilde","tilde"],["widetilde","tilde"],["quad","quad"],["qquad","wide"],["prod","product"],["overbrace","overbrace"],["underbrace","underbrace"],["overline","overline"],["underline","underline"],["bar","macron"],["epsilon","epsilon.alt"],["phi","phi.alt"],["varepsilon","epsilon"],["vartheta","theta.alt"],["varpi","pi.alt"],["varrho","rho.alt"],["varsigma","sigma.alt"],["varphi","phi"],["mathbb","bb"],["mathcal","cal"],["mathscr","cal"],["mathrm","upright"],["rm","upright"],["pmb","bold"],["pm","plus.minus"],["mp","minus.plus"],["oplus","xor"],["boxplus","plus.square"],["otimes","times.circle"],["boxtimes","times.square"],["neg","not"],["land","and"],["lor","or"],["in","in"],["subset","subset"],["subseteq","subset.eq"],["varnothing","diameter"],["neq","eq.not"],["leq","lt.eq"],["geq","gt.eq"],["ll","lt.double"],["gg","gt.double"],["prec","prec"],["succ","succ"],["preceq","prec.eq"],["succeq","succ.eq"],["Delta","Delta"],["nabla","nabla"],["partial","diff"],["int","integral"],["oint","integral.cont"],["iint","integral.double"],["oiint","integral.surf"],["iiint","integral.triple"],["oiiint","integral.vol"],["sum","sum"],["prod","product"],["bigcup","union.big"],["bigcap","sect.big"],["bigvee","or.big"],["bigwedge","and.big"],["bigoplus","xor.big"],["bigotimes","times.circle.big"],["bigodot","dot.circle.big"],["biguplus","union.plus.big"],["bigsqcup","union.sq.big"],["sim","tilde.op"],["approx","approx"],["cong","tilde.equiv"],["simeq","tilde.eq"],["asymp","≍"],["equiv","equiv"],["propto","prop"],["implies","arrow.r.double.long"],["Longrightarrow","arrow.r.double.long"],["iff","arrow.l.r.double.long"],["Longleftrightarrow","arrow.l.r.double.long"],["leftrightarrow","arrow.l.r"],["longleftrightarrow","arrow.l.r.long"],["rightrightarrows","arrows.rr"],["binom","binom"],["lfloor","⌊"],["rfloor","⌋"],["lceil","⌈"],["rceil","⌉"]]);Object.defineProperty(Mt,"__esModule",{value:!0});Mt.TypstWriter=Mt.TypstWriterError=void 0;const Qi=ea,Ic=["dim","id","im","mod","Pr","sech","csch"];class Ar extends Error{constructor(e,r){super(e),this.name="TypstWriterError",this.node=r}}Mt.TypstWriterError=Ar;class Oc{constructor(e,r){this.buffer="",this.queue=[],this.needSpaceAfterSingleItemScript=!1,this.insideFunctionDepth=0,this.nonStrict=e,this.preferTypstIntrinsic=r}writeBuffer(e){if(this.needSpaceAfterSingleItemScript&&/^[0-9a-zA-Z\(]/.test(e))this.buffer+=" ";else{let r=!1;r||(r=/[\(\|]$/.test(this.buffer)&&/^\w/.test(e)),r||(r=/^[}()_^,;!\|]$/.test(e)),r||(r=e==="'"),r||(r=/[0-9]$/.test(this.buffer)&&/^[0-9]/.test(e)),r||(r=/[\(\[{]\s*(-|\+)$/.test(this.buffer)||this.buffer==="-"||this.buffer==="+"),r||(r=this.buffer===""),r||(r=/[\s"_^{\(]$/.test(this.buffer)),r||(this.buffer+=" ")}this.needSpaceAfterSingleItemScript&&(this.needSpaceAfterSingleItemScript=!1),this.buffer+=e}append(e){if(e.type!=="empty")if(e.type==="ordgroup")e.args.forEach(r=>this.append(r));else if(e.type==="atom"){let r=e.content;e.content===","&&this.insideFunctionDepth>0&&(r="comma"),this.queue.push({type:"atom",content:r})}else if(e.type==="symbol")this.queue.push({type:"symbol",content:e.content});else if(e.type==="text")this.queue.push(e);else if(e.type==="supsub"){let{base:r,sup:a,sub:n}=e.irregularData;if(r&&r.type==="unaryFunc"&&r.content==="\\overbrace"&&a){this.append({type:"binaryFunc",content:"\\overbrace",args:[r.args[0],a]});return}else if(r&&r.type==="unaryFunc"&&r.content==="\\underbrace"&&n){this.append({type:"binaryFunc",content:"\\underbrace",args:[r.args[0],n]});return}r?this.appendWithBracketsIfNeeded(r):this.queue.push({type:"text",content:""});let i=!1;const s=a&&a.type==="symbol"&&a.content==="\\prime";s&&(this.queue.push({type:"atom",content:"'"}),i=!1),n&&(this.queue.push({type:"atom",content:"_"}),i=this.appendWithBracketsIfNeeded(n)),a&&!s&&(this.queue.push({type:"atom",content:"^"}),i=this.appendWithBracketsIfNeeded(a)),i&&this.queue.push({type:"softSpace",content:""})}else if(e.type==="leftright"){const[r,a,n]=e.args;if(["[]","()","{}"].includes(r.content+n.content)){this.append(r),this.append(a),this.append(n);return}const i={type:"symbol",content:"lr"};this.queue.push(i),this.insideFunctionDepth++,this.queue.push({type:"atom",content:"("}),this.append(r),this.append(a),this.append(n),this.queue.push({type:"atom",content:")"}),this.insideFunctionDepth--}else if(e.type==="binaryFunc"){const r={type:"symbol",content:e.content},[a,n]=e.args;this.queue.push(r),this.insideFunctionDepth++,this.queue.push({type:"atom",content:"("}),this.append(a),this.queue.push({type:"atom",content:","}),this.append(n),this.queue.push({type:"atom",content:")"}),this.insideFunctionDepth--}else if(e.type==="unaryFunc"){const r={type:"symbol",content:e.content},a=e.args[0];if(e.content==="\\sqrt"&&e.irregularData){r.content="root",this.queue.push(r),this.insideFunctionDepth++,this.queue.push({type:"atom",content:"("}),this.append(e.irregularData),this.queue.push({type:"atom",content:","}),this.append(a),this.queue.push({type:"atom",content:")"}),this.insideFunctionDepth--;return}else if(e.content==="\\mathbb"){const n=e.args[0];if(n.type==="symbol"&&/^[A-Z]$/.test(n.content)){this.queue.push({type:"symbol",content:n.content+n.content});return}}else if(e.content==="\\operatorname"){let n=e.args;n.length===1&&n[0].type=="ordgroup"&&(n=n[0].args);const i=n.reduce((s,u)=>(s+=es(u.content),s),"");this.preferTypstIntrinsic&&Ic.includes(i)?this.queue.push({type:"symbol",content:i}):(this.queue.push({type:"symbol",content:"op"}),this.queue.push({type:"atom",content:"("}),this.queue.push({type:"text",content:i}),this.queue.push({type:"atom",content:")"}));return}this.queue.push(r),this.insideFunctionDepth++,this.queue.push({type:"atom",content:"("}),this.append(a),this.queue.push({type:"atom",content:")"}),this.insideFunctionDepth--}else if(e.type==="align"){const r=e.irregularData;r.forEach((a,n)=>{a.forEach((i,s)=>{s>0&&this.queue.push({type:"atom",content:"&"}),this.append(i)}),n{a.forEach((i,s)=>{i.type==="ordgroup"&&i.args.length===0||(this.append(i),s{let r="";switch(e.type){case"atom":r=e.content;break;case"symbol":r=es(e.content);break;case"text":r=`"${e.content}"`;break;case"softSpace":this.needSpaceAfterSingleItemScript=!0,r="";break;default:throw new Ar(`Unexpected node type to stringify: ${e.type}`,e)}r!==""&&this.writeBuffer(r)}),this.queue=[]}appendWithBracketsIfNeeded(e){e.type,e.type==="unaryFunc"||e.type==="binaryFunc"||e.type;const r=["atom","symbol","unaryFunc","binaryFunc","leftright"].includes(e.type);return r?this.append(e):(this.queue.push({type:"atom",content:"("}),this.append(e),this.queue.push({type:"atom",content:")"})),r}finalize(){return this.flushQueue(),this.buffer}}Mt.TypstWriter=Oc;function es(t){if(/^[a-zA-Z0-9]$/.test(t))return t;if(t==="\\\\")return`\\ -`;if(t.startsWith("\\")){const e=t.slice(1);return Qi.symbolMap.has(e)?Qi.symbolMap.get(e):e}return t}Object.defineProperty(Jl,"__esModule",{value:!0});var Rc=Jl.tex2typst=Lc;const Fc=Ct,_c=Mt;function Lc(t,e){const r={nonStrict:!1,preferTypstIntrinsic:!1,customTexMacros:{}};e&&(e.nonStrict&&(r.nonStrict=e.nonStrict),e.preferTypstIntrinsic&&(r.preferTypstIntrinsic=e.preferTypstIntrinsic),e.customTexMacros&&(r.customTexMacros=e.customTexMacros));const a=(0,Fc.parseTex)(t,r.customTexMacros),n=new _c.TypstWriter(r.nonStrict,r.preferTypstIntrinsic);return n.append(a),n.finalize()}const Ql={"\\RR":"\\mathbb{R}","\\NN":"\\mathbb{N}","\\ZZ":"\\mathbb{Z}","\\QQ":"\\mathbb{Q}","\\CC":"\\mathbb{C}","\\sech":"\\operatorname{sech}","\\csch":"\\operatorname{csch}","\\dim":"\\operatorname{dim}","\\id":"\\operatorname{id}","\\im":"\\operatorname{im}","\\mod":"\\operatorname{mod}","\\Pr":"\\operatorname{Pr}"};function Hc(t){let r=Rc(t,{nonStrict:!0,preferTypstIntrinsic:!0,customTexMacros:Ql});return r=r.replaceAll("upright(d)","dif"),r=r.replaceAll('op("d")',"dif"),r}function Pc(t){var e=document.createElement("textarea");e.value=t,e.style.top="0",e.style.left="0",e.style.position="fixed",e.style.zIndex="-1",e.setAttribute("readonly",!0),document.body.appendChild(e),e.focus(),e.select();try{var r=document.execCommand("copy");r||console.log("Fallback: Error on copying text command")}catch(a){console.error("Fallback: Oops, unable to copy",a)}document.body.removeChild(e)}function Vc(t){if(!navigator.clipboard){Pc(t);return}navigator.clipboard.writeText(t).then(function(){},function(e){console.error("Async: Could not copy text: ",e)})}const $c=(t,e)=>{const r=t.__vccOpts||t;for(const[a,n]of e)r[a]=n;return r},qn=t=>(W1("data-v-bdf32408"),t=t(),Y1(),t),Uc={class:"bg-app text-app-blue min-h-screen flex flex-col"},Gc=Go('
Covert LaTeX math formula code to Typst code!
This tool runs locally in your browser. Nothing is uploaded.
',2),jc={class:"flex-1 flex md:flex-row flex-col p-4"},Wc={class:"flex-1 flex flex-col border border-gray-700 min-h-[200px] rounded-lg m-2"},Yc={class:"flex justify-between p-2 border-b border-gray-700"},Xc=qn(()=>Ne("span",{class:"text-app-blue p-2"},"LaTeX code",-1)),Kc={class:"flex-1 flex flex-col border border-gray-700 min-h-[200px] rounded-lg m-2"},Zc=qn(()=>Ne("span",{class:"text-app-blue p-2"},"Typst code",-1)),Jc={class:"flex-1 text-app-light-black p-4",id:"typst"},Qc=["innerHTML"],e2=qn(()=>Ne("footer",{class:"theme-app text-center p-4"},[Ne("p",{class:"text-white"},[Qs("Powered by "),Ne("a",{href:"https://github.com/qwinsi/tex2typst",target:"_blank"},"tex2typst")])],-1)),t2="\\prod_{p} \\frac{1}{1-p^{-s}}= \\sum _{n=1}^{\\infty} \\frac{1}{n^s}",r2={__name:"App",setup(t){const e=aa(t2),r=Fa(()=>{try{return Hc(e.value)}catch{return"[ERROR: Invalid LaTeX code]"}}),a=Fa(()=>{if(e.value==="")return'
Math formula will be rendered here.
';{const u={macros:Ql,displayMode:!0,throwOnError:!1,errorColor:"#bc6f17"};return Zl.renderToString(e.value,u)}});function n(){Vc(r.value)}const i=aa(null),s=aa(null);return qs(function(){if(i.value&&i.value.select(),s.value){const c=s.value.clientHeight;s.value.style.minHeight=c+"px"}document.querySelectorAll("button").forEach(c=>{c.addEventListener("touchstart",function(){},{passive:!1})})}),(u,c)=>(_o(),Po("div",Uc,[Gc,Ne("main",jc,[Ne("div",Wc,[Ne("div",Yc,[Xc,Ne("button",{class:"text-app-light-black p-2 rounded-lg hover:bg-gray-300 active:bg-gray-400",onClick:c[0]||(c[0]=m=>e.value="")},"Clear")]),ho(Ne("textarea",{ref_key:"inputArea",ref:i,class:"flex-1 text-app-light-black p-4","onUpdate:modelValue":c[1]||(c[1]=m=>e.value=m)},null,512),[[ku,e.value]])]),Ne("div",Kc,[Ne("div",{class:"flex justify-between p-2 border-b border-gray-700"},[Zc,Ne("button",{class:"text-app-light-black p-2 rounded-lg hover:bg-gray-300 active:bg-gray-400",onClick:n},"Copy")]),Ne("div",Jc,cs(r.value),1)])]),Ne("div",{ref_key:"renderArea",ref:s,class:"flex items-center text-center text-app-light-black p-4"},[Ne("div",{class:"flex-1",innerHTML:a.value},null,8,Qc)],512),e2]))}},a2=$c(r2,[["__scopeId","data-v-bdf32408"]]);Au(a2).mount("#app"); +`;if(t.startsWith("\\")){const e=t.slice(1);return Qi.symbolMap.has(e)?Qi.symbolMap.get(e):e}return t}Object.defineProperty(Jl,"__esModule",{value:!0});var Rc=Jl.tex2typst=Lc;const Fc=Ct,_c=Mt;function Lc(t,e){const r={nonStrict:!1,preferTypstIntrinsic:!1,customTexMacros:{}};e&&(e.nonStrict&&(r.nonStrict=e.nonStrict),e.preferTypstIntrinsic&&(r.preferTypstIntrinsic=e.preferTypstIntrinsic),e.customTexMacros&&(r.customTexMacros=e.customTexMacros));const a=(0,Fc.parseTex)(t,r.customTexMacros),n=new _c.TypstWriter(r.nonStrict,r.preferTypstIntrinsic);return n.append(a),n.finalize()}const Ql={"\\RR":"\\mathbb{R}","\\NN":"\\mathbb{N}","\\ZZ":"\\mathbb{Z}","\\QQ":"\\mathbb{Q}","\\CC":"\\mathbb{C}","\\sech":"\\operatorname{sech}","\\csch":"\\operatorname{csch}","\\dim":"\\operatorname{dim}","\\id":"\\operatorname{id}","\\im":"\\operatorname{im}","\\mod":"\\operatorname{mod}","\\Pr":"\\operatorname{Pr}"};function Hc(t){let r=Rc(t,{nonStrict:!0,preferTypstIntrinsic:!0,customTexMacros:Ql});return r=r.replaceAll("upright(d)","dif"),r=r.replaceAll('op("d")',"dif"),r}function Pc(t){var e=document.createElement("textarea");e.value=t,e.style.top="0",e.style.left="0",e.style.position="fixed",e.style.zIndex="-1",e.setAttribute("readonly",!0),document.body.appendChild(e),e.focus(),e.select();try{var r=document.execCommand("copy");r||console.log("Fallback: Error on copying text command")}catch(a){console.error("Fallback: Oops, unable to copy",a)}document.body.removeChild(e)}function Vc(t){if(!navigator.clipboard){Pc(t);return}navigator.clipboard.writeText(t).then(function(){},function(e){console.error("Async: Could not copy text: ",e)})}const $c=(t,e)=>{const r=t.__vccOpts||t;for(const[a,n]of e)r[a]=n;return r},qn=t=>(W1("data-v-e813204c"),t=t(),Y1(),t),Uc={class:"bg-app text-app-blue min-h-screen flex flex-col"},Gc=Go('
Covert LaTeX math formula code to Typst code!
This tool runs locally in your browser. Nothing is uploaded.
',2),jc={class:"flex-1 flex md:flex-row flex-col p-4"},Wc={class:"flex-1 flex flex-col border border-gray-700 min-h-[200px] rounded-lg m-2"},Yc={class:"flex justify-between p-2 border-b border-gray-700"},Xc=qn(()=>Ne("span",{class:"text-app-blue p-2"},"LaTeX code",-1)),Kc={class:"flex-1 flex flex-col border border-gray-700 min-h-[200px] rounded-lg m-2"},Zc=qn(()=>Ne("span",{class:"text-app-blue p-2"},"Typst code",-1)),Jc={class:"flex-1 text-app-light-black p-4",id:"typst"},Qc=["innerHTML"],e2=qn(()=>Ne("footer",{class:"theme-app text-center p-4"},[Ne("p",{class:"text-white"},[Qs("Powered by "),Ne("a",{href:"https://github.com/qwinsi/tex2typst",target:"_blank"},"tex2typst")])],-1)),t2="\\prod_{p} \\frac{1}{1-p^{-s}}= \\sum _{n=1}^{\\infty} \\frac{1}{n^s}",r2={__name:"App",setup(t){const e=aa(t2),r=Fa(()=>{try{return Hc(e.value)}catch{return"[ERROR: Invalid LaTeX code]"}}),a=Fa(()=>{if(e.value==="")return'
Math formula will be rendered here.
';{const u={macros:Ql,displayMode:!0,throwOnError:!1,errorColor:"#bc6f17"};return Zl.renderToString(e.value,u)}});function n(){Vc(r.value)}const i=aa(null),s=aa(null);return qs(function(){if(i.value&&i.value.select(),s.value){const u=s.value.clientHeight;s.value.style.minHeight=u+"px"}/iPad|iPhone|iPod/.test(window.navigator.userAgent)&&document.querySelectorAll("button").forEach(c=>{c.addEventListener("touchstart",function(){},{passive:!1})})}),(u,c)=>(_o(),Po("div",Uc,[Gc,Ne("main",jc,[Ne("div",Wc,[Ne("div",Yc,[Xc,Ne("button",{class:"text-app-light-black p-2 rounded-lg hover:bg-gray-300 active:bg-gray-400",onClick:c[0]||(c[0]=m=>e.value="")},"Clear")]),ho(Ne("textarea",{ref_key:"inputArea",ref:i,class:"flex-1 text-app-light-black p-4","onUpdate:modelValue":c[1]||(c[1]=m=>e.value=m)},null,512),[[ku,e.value]])]),Ne("div",Kc,[Ne("div",{class:"flex justify-between p-2 border-b border-gray-700"},[Zc,Ne("button",{class:"text-app-light-black p-2 rounded-lg hover:bg-gray-300 active:bg-gray-400",onClick:n},"Copy")]),Ne("div",Jc,cs(r.value),1)])]),Ne("div",{ref_key:"renderArea",ref:s,class:"flex items-center text-center text-app-light-black p-4"},[Ne("div",{class:"flex-1",innerHTML:a.value},null,8,Qc)],512),e2]))}},a2=$c(r2,[["__scopeId","data-v-e813204c"]]);Au(a2).mount("#app"); diff --git a/index.html b/index.html index 0d6612c..acd88fc 100644 --- a/index.html +++ b/index.html @@ -8,14 +8,14 @@ tex2typst Web App - Convert LaTex formula code to Typst - - + + -
Covert LaTeX math formula code to Typst code!
This tool runs locally in your browser. Nothing is uploaded.
LaTeX code
Typst code
product_p frac(1, 1 - p^(-s)) = sum_(n = 1)^infinity frac(1, n^s)
p11ps=n=11ns\prod_{p} \frac{1}{1-p^{-s}}= \sum _{n=1}^{\infty} \frac{1}{n^s}
+
Covert LaTeX math formula code to Typst code!
This tool runs locally in your browser. Nothing is uploaded.
LaTeX code
Typst code
product_p frac(1, 1 - p^(-s)) = sum_(n = 1)^infinity frac(1, n^s)
p11ps=n=11ns\prod_{p} \frac{1}{1-p^{-s}}= \sum _{n=1}^{\infty} \frac{1}{n^s}
- + + -
Covert LaTeX math formula code to Typst code!
This tool runs locally in your browser. Nothing is uploaded.
LaTeX code
Typst code
product_p frac(1, 1 - p^(-s)) = sum_(n = 1)^infinity frac(1, n^s)
p11ps=n=11ns\prod_{p} \frac{1}{1-p^{-s}}= \sum _{n=1}^{\infty} \frac{1}{n^s}
+
Covert LaTeX math formula code to Typst code!
This tool runs locally in your browser. Nothing is uploaded.
LaTeX code
Typst code
product_p frac(1, 1 - p^(-s)) = sum_(n = 1)^infinity frac(1, n^s)
p11ps=n=11ns\prod_{p} \frac{1}{1-p^{-s}}= \sum _{n=1}^{\infty} \frac{1}{n^s}