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