import{p as _,a as i,d as x,f as k,i as y,g as o,n as g,e as l,h as w,I as M,j as n,t as E,k as L,l as v,G as T}from"./index-BtH6urND.js";import b from"./katex-XbL3y5x-.js";/* empty css                  */var j=n('<div class="renderer-error svelte-w5v8py"> </div>'),G=n('<div class="latex svelte-w5v8py"><!></div>');function X(f,a){_(a,!0);let m=i(a,"expression",3,""),p=i(a,"displayMode",3,!0);const t=g(()=>{try{return{ok:!0,html:b.renderToString(m()||"",{displayMode:p(),throwOnError:!1})}}catch(e){return{ok:!1,error:M(e,"LaTeX render failed.")}}});var d=x(),c=k(d);{var h=e=>{var r=j(),s=v(r);E(()=>L(s,o(t).error.message)),l(e,r)},u=e=>{var r=G(),s=v(r);T(s,()=>o(t).html),l(e,r)};y(c,e=>{o(t).ok?e(u,!1):e(h)})}l(f,d),w()}export{X as default};
