"use strict";exports.id=3642,exports.ids=[3642],exports.modules={93642:(e,n,a)=>{a.r(n),a.d(n,{default:()=>c});var t=a(10326),i=a(42337),s=a(54511),l=a(17577),r=a(80938);let o=(0,l.forwardRef)(function({equation:e,setEquation:n,inline:a},i){let s=e=>{n(e.target.value)};return a&&i instanceof HTMLInputElement?(0,t.jsxs)("span",{className:"EquationEditor_inputBackground",children:[t.jsx("span",{className:"EquationEditor_dollarSign",children:"$"}),t.jsx("input",{className:"EquationEditor_inlineEditor",value:e,onChange:s,autoFocus:!0,ref:i}),t.jsx("span",{className:"EquationEditor_dollarSign",children:"$"})]}):(0,t.jsxs)("div",{className:"EquationEditor_inputBackground",children:[t.jsx("span",{className:"EquationEditor_dollarSign",children:"$$\n"}),t.jsx("textarea",{className:"EquationEditor_blockEditor",value:e,onChange:s,ref:i}),t.jsx("span",{className:"EquationEditor_dollarSign",children:"\n$$"})]})});var u=a(47224),d=a(11136);function c({equation:e,inline:n,nodeKey:a}){let[c]=(0,i.g)(),[E,x]=(0,l.useState)(e),[j,p]=(0,l.useState)(!1),g=(0,l.useRef)(null);return(0,l.useCallback)(e=>{p(!1),c.update(()=>{let n=(0,s.gI)(a);(0,d.kj)(n)&&(n.setEquation(E),e&&n.selectNext(0,0))})},[c,E,a]),t.jsx(t.Fragment,{children:j?t.jsx(o,{equation:E,setEquation:x,inline:n,ref:g}):t.jsx(r.SV,{onError:e=>c._onError(e),fallback:null,children:t.jsx(u.Z,{equation:E,inline:n,onDoubleClick:()=>p(!0)})})})}}};