drill.define(async e=>{await e("./u-prompt.css");let{code:t}=await e("./u-prompt.dcode");return e=>new Promise(o=>{let{multi:r,title:l="输入",value:n=""}=e,i=$(t);i.que(".prompt_title").text=l;let s=i.que(".input_con");s.text=n,$("body").push(i),s.on("input",e=>{if(r)/\n/.test(s.text)?s.class.add("show_border"):s.class.remove("show_border");else{let{text:e}=s;/\n/.test(e)&&(s.text=e.replace(/\n/g,""))}}),s.on("keypress",e=>{r||13!=e.originalEvent.keyCode||(o(s.text.trim()),i.remove())}),i.que(".cancelbtn").on("click",e=>{o(),i.remove()}),i.que(".okbtn").on("click",e=>{o(s.text.trim()),i.remove()}),setTimeout(()=>{s.ele.focus()},500)})});