(this.webpackJsonpstreamlit_ace=this.webpackJsonpstreamlit_ace||[]).push([[0],{476:function(e,t,n){},477:function(e,t,n){"use strict";n.r(t);var o=n(1),r=n.n(o),i=n(14),a=n.n(i),c=n(4),l=n(3),u=n(30),d=n(37),s=n.n(d),m=n(497),b=n(498),j=n(499),v=n(495),f=n(42),p=(n(59),n(473),n(474),n(11)),O=Object(u.b)((function(e){var t,n,r=e.args,i=e.theme,a=Object(o.useState)({}),d=Object(l.a)(a,2),O=d[0],h=d[1],x=Object(o.useState)(!1),C=Object(l.a)(x,2),g=C[0],y=C[1],k=Object(o.useRef)(null),w=Object(o.useRef)(0),E=function(e){u.a.setComponentValue(e),y(!1)};Object(o.useEffect)((function(){if(k.current){var e=k.current.editor;e.commands.removeCommand("addLineAfter"),e.commands.addCommand({name:"updateStreamlit",bindKey:{mac:"cmd-return",win:"ctrl-return"},exec:function(e){r.autoUpdate?(e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")):g&&E(e.getValue())}}),w.current=r.autoUpdate?200:0}})),Object(o.useEffect)((function(){h({palette:{primary:{main:null===i||void 0===i?void 0:i.primaryColor,background:{default:null===i||void 0===i?void 0:i.backgroundColor},text:{primary:null===i||void 0===i?void 0:i.textColor}}}})}),[null===i||void 0===i?void 0:i.primaryColor,null===i||void 0===i?void 0:i.backgroundColor,null===i||void 0===i?void 0:i.textColor]),r.enableBasicAutocompletion=!0,r.enableLiveAutocompletion=!0,r.onChange=function(e){clearTimeout(n),n=setTimeout((function(){r.autoUpdate?E(e):y(!0)}),w.current)},r.width="100%",r.height||(r.maxLines=1/0);var S=new ResizeObserver((function(e){u.a.setFrameHeight(e[0].contentRect.height+15)}));return Object(p.jsx)("div",{ref:function(e){null!==e?S.observe(e):S.disconnect()},children:Object(p.jsxs)(v.a,{theme:Object(f.a)(O),children:[Object(p.jsx)(m.a,{children:Object(p.jsx)(s.a,Object(c.a)({ref:k},r))}),r.autoUpdate?null:Object(p.jsx)(b.a,{container:!0,justifyContent:"flex-end",children:Object(p.jsxs)(j.a,{variant:"contained",color:"primary",disabled:!g,style:{marginTop:10},onClick:function(){var e;return E(null===(e=k.current)||void 0===e?void 0:e.editor.getValue())},children:["Apply (","mac"===(null===(t=k.current)||void 0===t?void 0:t.editor.commands.platform)?"Cmd":"Ctrl","+Enter)"]})})]})})}));n(476);a.a.render(Object(p.jsx)(r.a.StrictMode,{children:Object(p.jsx)(O,{})}),document.getElementById("root"))}},[[477,1,2]]]);