(this.webpackChunktocco_admin=this.webpackChunktocco_admin||[]).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),i=Math.max(n.startRow,n.endRow),s=e.session;o<=i;){var c=s.getLine(o);if(c.length>t){if(g=m(c,t,5)){var l=/^\s*/.exec(c)[0];s.replace(new r(o,g.start,o,g.end),"\n"+l)}i++}else if(a&&/\S/.test(c)&&o!=i){var d=s.getLine(o+1);if(d&&/\S/.test(d)){var g,h=c.replace(/\s+$/,""),u=d.replace(/^\s+/,""),f=h+" "+u;if((g=m(f,t,5))&&g.start>h.length||f.length<t){var p=new r(o,h.length,o+1,d.length-u.length);s.replace(p," "),o--,i--}else h.length<c.length&&s.remove(new r(o,h.length,o,c.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),i=/(?:(\s+)|(\s+)(\S+))$/.exec(r),s=0,c=0;return i&&!i[2]&&(s=n-i[1].length,c=n),o&&!o[2]&&(s||(s=n),c=n+o[1].length),s?{start:s,end:c}:i&&i[2]&&i.index>t?{start:i.index,end:i.index+i[2].length}:o&&o[2]?{start:s=n+o[2].length,end:s+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 i=e("../editor").Editor;e("../config").defineOptions(i.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)}))}}]);