(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5619],{5619:function(c,h,x){c=x.nmd(c),ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(s,a,k){"use strict";var l=s("../lib/event");a.contextMenuHandler=function(u){var e=u.target,n=e.textInput.getElement();if(!!e.selection.isEmpty()){var f=e.getCursorPosition(),d=e.session.getWordRange(f.row,f.column),r=e.session.getTextRange(d);if(e.session.tokenRe.lastIndex=0,!!e.session.tokenRe.test(r)){var g="",i=r+" "+g;n.value=i,n.setSelectionRange(r.length,r.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,r.length);var p=!1;l.addListener(n,"keydown",function t(){l.removeListener(n,"keydown",t),p=!0}),e.textInput.setInputHandler(function(t){if(t==i)return"";if(t.lastIndexOf(i,0)===0)return t.slice(i.length);if(t.substr(n.selectionEnd)==i)return t.slice(0,-i.length);if(t.slice(-2)==g){var o=t.slice(0,-2);if(o.slice(-1)==" ")return p?o.substring(0,n.selectionEnd):(o=o.slice(0,-1),e.session.replace(d,o),"")}return t})}}};var v=s("../editor").Editor;s("../config").defineOptions(v.prototype,"editor",{spellcheck:{set:function(u){var e=this.textInput.getElement();e.spellcheck=!!u,u?this.on("nativecontextmenu",a.contextMenuHandler):this.removeListener("nativecontextmenu",a.contextMenuHandler)},value:!0}})}),function(){ace.require(["ace/ext/spellcheck"],function(s){c&&(c.exports=s)})}()}}]);