(this.webpackChunktocco_legacy_bundle=this.webpackChunktocco_legacy_bundle||[]).push([[43636],{43636(e,n,t){e=t.nmd(e),ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],(function(e,n,t){"use strict";var r=e("../range").Range;function a(e,n){for(var t=n.column||e.getOption("printMarginColumn"),a=0!=n.allowMerge,o=Math.min(n.startRow,n.endRow),s=Math.max(n.startRow,n.endRow),i=e.session;o<=s;){var l=i.getLine(o);if(l.length>t){if(d=m(l,t,5)){var c=/^\s*/.exec(l)[0];i.replace(new r(o,d.start,o,d.end),"\n"+c)}s++}else if(a&&/\S/.test(l)&&o!=s){var g=i.getLine(o+1);if(g&&/\S/.test(g)){var d,h=l.replace(/\s+$/,""),u=g.replace(/^\s+/,""),f=h+" "+u;if((d=m(f,t,5))&&d.start>h.length||f.length<t){var p=new r(o,h.length,o+1,g.length-u.length);i.replace(p," "),o--,s--}else h.length<l.length&&i.remove(new r(o,h.length,o,l.length))}}o++}function m(e,n,t){if(!(e.length<n)){var r=e.slice(0,n),a=e.slice(n),o=/^(?:(\s+)|(\S+)(\s+))/.exec(a),s=/(?:(\s+)|(\s+)(\S+))$/.exec(r),i=0,l=0;return s&&!s[2]&&(i=n-s[1].length,l=n),o&&!o[2]&&(i||(i=n),l=n+o[1].length),i?{start:i,end:l}:s&&s[2]&&s.index>t?{start:s.index,end:s.index+s[2].length}:o&&o[2]?{start:i=n+o[2].length,end:i+o[3].length}:void 0}}}function o(e){if("insertstring"==e.command.name&&/\S/.test(e.args)){var n=e.editor,t=n.selection.cursor;if(t.column<=n.renderer.$printMarginColumn)return;var r=n.session.$undoManager.$lastDelta;a(n,{startRow:t.row,endRow:t.row,allowMerge:!1}),r!=n.session.$undoManager.$lastDelta&&n.session.markUndoGroup()}}var s=e("../editor").Editor;e("../config").defineOptions(s.prototype,"editor",{hardWrap:{set:function(e){e?this.commands.on("afterExec",o):this.commands.off("afterExec",o)},value:!1}}),n.hardWrap=a})),ace.require(["ace/ext/hardwrap"],(function(n){e&&(e.exports=n)}))}}]);