(this.webpackChunktocco_legacy_bundle=this.webpackChunktocco_legacy_bundle||[]).push([[26820],{26820(e,t,n){e=n.nmd(e),ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var r=e("../lib/lang");t.$detectIndentation=function(e,t){for(var n=[],r=[],i=0,o=0,a=Math.min(e.length,1e3),s=0;s<a;s++){var c=e[s];if(/^\s*[^*+\-\s]/.test(c)){if("\t"==c[0])i++,o=-Number.MAX_VALUE;else{var g=c.match(/^ */)[0].length;if(g&&"\t"!=c[g]){var h=g-o;!(h>0)||o%h||g%h||(r[h]=(r[h]||0)+1),n[g]=(n[g]||0)+1}o=g}for(;s<a&&"\\"==c[c.length-1];)c=e[s++]}}function l(e){for(var t=0,r=e;r<n.length;r+=e)t+=n[r]||0;return t}var u=r.reduce((function(e,t){return e+t}),0),f={score:0,length:0},d=0;for(s=1;s<12;s++){var p=l(s);1==s?(d=p,p=n[1]?.9:.8,n.length||(p=0)):p/=d,r[s]&&(p+=r[s]/u),p>f.score&&(f={score:p,length:s})}if(f.score&&f.score>1.4)var v=f.length;return i>d+1?((1==v||d<i/4||f.score<1.8)&&(v=void 0),{ch:"\t",length:v}):d>i+1?{ch:" ",length:v}:void 0},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(" "==r.ch),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),r=n.getAllLines(),i=t&&t.trimEmpty?-1:0,o=[],a=-1;t&&t.keepCursorPosition&&(e.selection.rangeCount?e.selection.rangeList.ranges.forEach((function(e,t,n){var r=n[t+1];r&&r.cursor.row==e.cursor.row||o.push(e.cursor)})):o.push(e.selection.getCursor()),a=0);for(var s=o[a]&&o[a].row,c=0,g=r.length;c<g;c++){var h=r[c],l=h.search(/\s+$/);c==s&&(l<o[a].column&&l>i&&(l=o[a].column),a++,s=o[a]?o[a].row:-1),l>i&&n.removeInLine(c,l,h.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],o=e.getTabSize();n||(n=o),t||(t=i);for(var a="\t"==t?t:r.stringRepeat(t,n),s=e.doc,c=s.getAllLines(),g={},h={},l=0,u=c.length;l<u;l++){var f=c[l].match(/^\s*/)[0];if(f){var d=e.$getStringScreenWidth(f)[0],p=Math.floor(d/o),v=d%o,m=g[p]||(g[p]=r.stringRepeat(a,p));(m+=h[v]||(h[v]=r.stringRepeat(" ",v)))!=f&&(s.removeInLine(l,0,f.length),s.insertInLine({row:l,column:0},m))}}e.setTabSize(n),e.setUseSoftTabs(" "==t)},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch="\t":/s/.test(e)&&(t.ch=" ");var n=e.match(/\d+/);return n&&(t.length=parseInt(n[0],10)),t},t.$parseArg=function(e){return e?"string"==typeof e?t.$parseStringArg(e):"string"==typeof e.text?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",description:"Detect indentation from content",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",description:"Trim trailing whitespace",exec:function(e,n){t.trimTrailingSpace(e.session,n)}},{name:"convertIndentation",description:"Convert indentation to ...",exec:function(e,n){var r=t.$parseArg(n);t.convertIndentation(e.session,r.ch,r.length)}},{name:"setIndentation",description:"Set indentation",exec:function(e,n){var r=t.$parseArg(n);r.length&&e.session.setTabSize(r.length),r.ch&&e.session.setUseSoftTabs(" "==r.ch)}}]})),ace.require(["ace/ext/whitespace"],(function(t){e&&(e.exports=t)}))}}]);