Fix dòng
•
/
home
/
barbar84
/
www
/
wp-inclu...
/
js
/
codemirr...
•
File:
codemirror.min.js
•
Dòng [
13
/
28
]:
if(!h(o)){var w=o;o=p(o,d),o!==w&&(s=!0)}var x=h(o);return x&&x.columns&&(x=x.columns),x&&k(c,n,x,function(a){var b=o;return 1==s&&(b=u),"string"==typeof a?a=b+"."+a:(a=i(a),a.text=b+"."+a.text),e?m(a):a}),g}function o(a,b){for(var c=a.split(/\s+/),d=0;d<c.length;d++)c[d]&&b(c[d].replace(/[,;]/g,""))}function p(a,b){for(var c=b.doc,d=c.getValue(),e=a.toUpperCase(),f="",g="",i=[],j={start:v(0,0),end:v(b.lastLine(),b.getLineHandle(b.lastLine()).length)},k=d.indexOf(u.QUERY_DIV);k!=-1;)i.push(c.posFromIndex(k)),k=d.indexOf(u.QUERY_DIV,k+1);i.unshift(v(0,0)),i.push(v(b.lastLine(),b.getLineHandle(b.lastLine()).text.length));for(var l=null,m=b.getCursor(),n=0;n<i.length;n++){if((null==l||w(m,l)>0)&&w(m,i[n])<=0){j={start:l,end:i[n]};break}l=i[n]}for(var p=c.getRange(j.start,j.end,!1),n=0;n<p.length;n++){var q=p[n];if(o(q,function(a){var b=a.toUpperCase();b===e&&h(f)&&(g=f),b!==u.ALIAS_KEYWORD&&(f=a)}),g)break}return g}var q,r,s,t,u={QUERY_DIV:";",ALIAS_KEYWORD:"AS"},v=a.Pos,w=a.cmpPos;a.registerHelper("hint","sql",function(a,b){q=g(b&&b.tables);var e=b&&b.defaultTable,f=b&&b.disableKeywords;r=e&&h(e),s=c(a),t=d(a),e&&!r&&(r=p(e,a)),r=r||[],r.columns&&(r=r.columns);var i,j,l,m=a.getCursor(),o=[],u=a.getTokenAt(m);return u.end>m.ch&&(u.end=m.ch,u.string=u.string.slice(0,m.ch-u.start)),u.string.match(/^[.`"\w@]\w*$/)?(l=u.string,i=u.start,j=u.end):(i=j=m.ch,l=""),"."==l.charAt(0)||l.charAt(0)==t?i=n(m,u,o,a):(k(o,l,q,function(a){return a}),k(o,l,r,function(a){return a}),f||k(o,l,s,function(a){return a.toUpperCase()})),{list:o,from:v(m.line,i),to:v(m.line,j)}})})},{"../../lib/codemirror":59,"../../mode/sql/sql":74}],28:[function(a,b,c){!function(d){"object"==typeof c&&"object"==typeof b?d(a("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)}(function(a){"use strict";function b(b,d){var e=d&&d.schemaInfo,f=d&&d.quoteChar||'"';if(e){var g=b.getCursor(),h=b.getTokenAt(g);h.end>g.ch&&(h.end=g.ch,h.string=h.string.slice(0,g.ch-h.start));var i=a.innerMode(b.getMode(),h.state);if("xml"==i.mode.name){var j,k,l=[],m=!1,n=/\btag\b/.test(h.type)&&!/>$/.test(h.string),o=n&&/^\w/.test(h.string);if(o){var p=b.getLine(g.line).slice(Math.max(0,h.start-2),h.start),q=/<\/$/.test(p)?"close":/<$/.test(p)?"open":null;q&&(k=h.start-("close"==q?2:1))}else n&&"<"==h.string?q="open":n&&"</"==h.string&&(q="close");if(!n&&!i.state.tagName||q){o&&(j=h.string),m=q;var r=i.state.context,s=r&&e[r.tagName],t=r?s&&s.children:e["!top"];if(t&&"close"!=q)for(var u=0;u<t.length;++u)j&&0!=t[u].lastIndexOf(j,0)||l.push("<"+t[u]);else if("close"!=q)for(var v in e)!e.hasOwnProperty(v)||"!top"==v||"!attrs"==v||j&&0!=v.lastIndexOf(j,0)||l.push("<"+v);r&&(!j||"close"==q&&0==r.tagName.lastIndexOf(j,0))&&l.push("</"+r.tagName+">")}else{var s=e[i.state.tagName],w=s&&s.attrs,x=e["!attrs"];if(!w&&!x)return;if(w){if(x){var y={};for(var z in x)x.hasOwnProperty(z)&&(y[z]=x[z]);for(var z in w)w.hasOwnProperty(z)&&(y[z]=w[z]);w=y}}else w=x;if("string"==h.type||"="==h.string){var A,p=b.getRange(c(g.line,Math.max(0,g.ch-60)),c(g.line,"string"==h.type?h.start:h.end)),B=p.match(/([^\s\u00a0=<>\"\']+)=$/);if(!B||!w.hasOwnProperty(B[1])||!(A=w[B[1]]))return;if("function"==typeof A&&(A=A.call(this,b)),"string"==h.type){j=h.string;var C=0;/['"]/.test(h.string.charAt(0))&&(f=h.string.charAt(0),j=h.string.slice(1),C++);var D=h.string.length;/['"]/.test(h.string.charAt(D-1))&&(f=h.string.charAt(D-1),j=h.string.substr(C,D-2)),m=!0}for(var u=0;u<A.length;++u)j&&0!=A[u].lastIndexOf(j,0)||l.push(f+A[u]+f)}else{"attribute"==h.type&&(j=h.string,m=!0);for(var E in w)!w.hasOwnProperty(E)||j&&0!=E.lastIndexOf(j,0)||l.push(E)}}return{list:l,from:m?c(g.line,null==k?h.start:k):g,to:m?c(g.line,h.end):g}}}}var c=a.Pos;a.registerHelper("hint","xml",b)})},{"../../lib/codemirror":59}],29:[function(a,b,c){!function(d){"object"==typeof c&&"object"==typeof b?d(a("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)}(function(a){"use strict";a.registerHelper("lint","css",function(b,c){var d=[];if(!window.CSSLint)return window.console&&window.console.error("Error: window.CSSLint not defined, CodeMirror CSS linting cannot run."),d;for(var e=CSSLint.verify(b,c),f=e.messages,g=null,h=0;h<f.length;h++){g=f[h];var i=g.line-1,j=g.line-1,k=g.col-1,l=g.col;d.push({from:a.Pos(i,k),to:a.Pos(j,l),message:g.message,severity:g.type})}return d})})},{"../../lib/codemirror":59}],30:[function(a,b,c){(function(d){!function(e){"object"==typeof c&&"object"==typeof b?e(a("../../lib/codemirror"),"undefined"!=typeof window?window.HTMLHint:"undefined"!=typeof d?d.HTMLHint:null):"function"==typeof define&&define.amd?define(["../../lib/codemirror","htmlhint"],e):e(CodeMirror,window.HTMLHint)}(function(a,b){"use strict";var c={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!1,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0};a.registerHelper("lint","html",function(d,e){var f=[];if(b&&!b.verify&&(b=b.HTMLHint),b||(b=window.HTMLHint),!b)return window.console&&window.console.error("Error: HTMLHint not found, not defined on window, or not available through define/require, CodeMirror HTML linting cannot run."),f;for(var g=b.verify(d,e&&e.rules||c),h=0;h<g.length;h++){var i=g[h],j=i.line-1,k=i.line-1,l=i.col-1,m=i.col;f.push({from:a.Pos(j,l),to:a.Pos(k,m),message:i.message,severity:i.type})}return f})})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../lib/codemirror":59}],31:[function(a,b,c){!function(d){"object"==typeof c&&"object"==typeof b?d(a("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)}(function(a){"use strict";function b(a,b){if(!window.JSHINT)return window.console&&window.console.error("Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run."),[];JSHINT(a,b,b.globals);var c=JSHINT.data().errors,d=[];return c&&f(c,d),d}function c(a){return d(a,h,"warning",!0),d(a,i,"error"),e(a)?null:a}function d(a,b,c,d){var e,f,g,h,i;e=a.description;for(var j=0;j<b.length;j++)f=b[j],g="string"==typeof f?f:f[0],h="string"==typeof f?null:f[1],i=e.indexOf(g)!==-1,(d||i)&&(a.severity=c),i&&h&&(a.description=h)}function e(a){for(var b=a.description,c=0;c<g.length;c++)if(b.indexOf(g[c])!==-1)return!0;return!1}function f(b,d){for(var e=0;e<b.length;e++){var f=b[e];if(f){var g,h;if(g=[],f.evidence){var i=g[f.line];if(!i){var j=f.evidence;i=[],Array.prototype.forEach.call(j,function(a,b){"\t"===a&&i.push(b+1)}),g[f.line]=i}if(i.length>0){var k=f.character;i.forEach(function(a){k>a&&(k-=1)}),f.character=k}}var l=f.character-1,m=l+1;f.evidence&&(h=f.evidence.substring(l).search(/.\b/),h>-1&&(m+=h)),f.description=f.reason,f.start=f.character,f.end=m,f=c(f),f&&d.push({message:f.description,severity:f.severity,from:a.Pos(f.line-1,l),to:a.Pos(f.line-1,m)})}}}var g=["Dangerous comment"],h=[["Expected '{'","Statement body should be inside '{ }' braces."]],i=["Missing semicolon","Extra comma","Missing property name","Unmatched "," and instead saw"," is not defined","Unclosed string","Stopping, unable to continue"];a.registerHelper("lint","javascript",b)})},{"../../lib/codemirror":59}],32:[function(a,b,c){!function(d){"object"==typeof c&&"object"==typeof b?d(a("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)}(function(a){"use strict";a.registerHelper("lint","json",function(b){var c=[];if(!window.jsonlint)return window.console&&window.console.error("Error: window.jsonlint not defined, CodeMirror JSON linting cannot run."),c;jsonlint.parseError=function(b,d){var e=d.loc;c.push({from:a.Pos(e.first_line-1,e.first_column),to:a.Pos(e.last_line-1,e.last_column),message:b})};try{jsonlint.parse(b)}catch(d){}return c})})},{"../../lib/codemirror":59}],33:[function(a,b,c){!function(d){"object"==typeof c&&"object"==typeof b?d(a("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)}(function(a){"use strict";function b(b,c){function d(b){return e.parentNode?(e.style.top=Math.max(0,b.clientY-e.offsetHeight-5)+"px",void(e.style.left=b.clientX+5+"px")):a.off(document,"mousemove",d)}var e=document.createElement("div");return e.className="CodeMirror-lint-tooltip",e.appendChild(c.cloneNode(!0)),document.body.appendChild(e),a.on(document,"mousemove",d),d(b),null!=e.style.opacity&&(e.style.opacity=1),e}function c(a){a.parentNode&&a.parentNode.removeChild(a)}function d(a){a.parentNode&&(null==a.style.opacity&&c(a),a.style.opacity=0,setTimeout(function(){c(a)},600))}function e(c,e,f){function g(){a.off(f,"mouseout",g),h&&(d(h),h=null)}var h=b(c,e),i=setInterval(function(){if(h)for(var a=f;;a=a.parentNode){if(a&&11==a.nodeType&&(a=a.host),a==document.body)return;if(!a){g();break}}if(!h)return clearInterval(i)},400);a.on(f,"mouseout",g)}function f(a,b,c){this.marked=[],this.options=b,this.timeout=null,this.hasGutter=c,this.onMouseOver=function(b){r(a,b)},this.waitingFor=0}function g(a,b){return b instanceof Function?{getAnnotations:b}:(b&&b!==!0||(b={}),b)}function h(a){var b=a.state.lint;b.hasGutter&&a.clearGutter(s);for(var c=0;c<b.marked.length;++c)b.marked[c].clear();b.marked.length=0}function i(b,c,d,f){var g=document.createElement("div"),h=g;return g.className="CodeMirror-lint-marker-"+c,d&&(h=g.appendChild(document.createElement("div")),h.className="CodeMirror-lint-marker-multiple"),0!=f&&a.on(h,"mouseover",function(a){e(a,b,h)}),g}function j(a,b){return"error"==a?a:b}function k(a){for(var b=[],c=0;c<a.length;++c){var d=a[c],e=d.from.line;(b[e]||(b[e]=[])).push(d)}return b}function l(a){var b=a.severity;b||(b="error");var c=document.createElement("div");return c.className="CodeMirror-lint-message-"+b,"undefined"!=typeof a.messageHTML?c.innerHTML=a.messageHTML:c.appendChild(document.createTextNode(a.message)),c}function m(b,c,d){function e(){g=-1,b.off("change",e)}var f=b.state.lint,g=++f.waitingFor;b.on("change",e),c(b.getValue(),function(c,d){b.off("change",e),f.waitingFor==g&&(d&&c instanceof a&&(c=d),o(b,c))},d,b)}function n(b){var c=b.state.lint,d=c.options,e=d.options||d,f=d.getAnnotations||b.getHelper(a.Pos(0,0),"lint");if(f)if(d.async||f.async)m(b,f,e);else{var g=f(b.getValue(),e,b);if(!g)return;g.then?g.then(function(a){o(b,a)}):o(b,g)}}function o(a,b){h(a);for(var c=a.state.lint,d=c.options,e=k(b),f=0;f<e.length;++f){var g=e[f];if(g){for(var m=null,n=c.hasGutter&&document.createDocumentFragment(),o=0;o<g.length;++o){var p=g[o],q=p.severity;q||(q="error"),m=j(m,q),d.formatAnnotation&&(p=d.formatAnnotation(p)),c.hasGutter&&n.appendChild(l(p)),p.to&&c.marked.push(a.markText(p.from,p.to,{className:"CodeMirror-lint-mark-"+q,__annotation:p}))}c.hasGutter&&a.setGutterMarker(f,s,i(n,m,g.length>1,c.options.tooltips))}}d.onUpdateLinting&&d.onUpdateLinting(b,e,a)}function p(a){var b=a.state.lint;b&&(clearTimeout(b.timeout),b.timeout=setTimeout(function(){n(a)},b.options.delay||500))}function q(a,b){for(var c=b.target||b.srcElement,d=document.createDocumentFragment(),f=0;f<a.length;f++){var g=a[f];d.appendChild(l(g))}e(b,d,c)}function r(a,b){var c=b.target||b.srcElement;if(/\bCodeMirror-lint-mark-/.test(c.className)){for(var d=c.getBoundingClientRect(),e=(d.left+d.right)/2,f=(d.top+d.bottom)/2,g=a.findMarksAt(a.coordsChar({left:e,top:f},"client")),h=[],i=0;i<g.length;++i){var j=g[i].__annotation;j&&h.push(j)}h.length&&q(h,b)}}var s="CodeMirror-lint-markers";a.defineOption("lint",!1,function(b,c,d){if(d&&d!=a.Init&&(h(b),b.state.lint.options.lintOnChange!==!1&&b.off("change",p),a.off(b.getWrapperElement(),"mouseover",b.state.lint.onMouseOver),clearTimeout(b.state.lint.timeout),delete b.state.lint),c){for(var e=b.getOption("gutters"),i=!1,j=0;j<e.length;++j)e[j]==s&&(i=!0);var k=b.state.lint=new f(b,g(b,c),i);k.options.lintOnChange!==!1&&b.on("change",p),0!=k.options.tooltips&&"gutter"!=k.options.tooltips&&a.on(b.getWrapperElement(),"mouseover",k.onMouseOver),n(b)}}),a.defineExtension("performLint",function(){this.state.lint&&n(this)})})},{"../../lib/codemirror":59}],34:[function(a,b,c){!function(d){"object"==typeof c&&"object"==typeof b?d(a("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","diff_match_patch"],d):d(CodeMirror)}(function(a){"use strict";function b(a,b){this.mv=a,this.type=b,this.classes="left"==b?{chunk:"CodeMirror-merge-l-chunk",start:"CodeMirror-merge-l-chunk-start",end:"CodeMirror-merge-l-chunk-end",insert:"CodeMirror-merge-l-inserted",del:"CodeMirror-merge-l-deleted",connect:"CodeMirror-merge-l-connect"}:{chunk:"CodeMirror-merge-r-chunk",start:"CodeMirror-merge-r-chunk-start",end:"CodeMirror-merge-r-chunk-end",insert:"CodeMirror-merge-r-inserted",del:"CodeMirror-merge-r-deleted",connect:"CodeMirror-merge-r-connect"}}function c(b){b.diffOutOfDate&&(b.diff=z(b.orig.getValue(),b.edit.getValue(),b.mv.options.ignoreWhitespace),b.chunks=A(b.diff),b.diffOutOfDate=!1,a.signal(b.edit,"updateDiff",b.diff))}function d(b){function d(a){W=!0,p=!1,"full"==a&&(b.svg&&J(b.svg),b.copyButtons&&J(b.copyButtons),j(b.edit,m.marked,b.classes),j(b.orig,o.marked,b.classes),m.from=m.to=o.from=o.to=0),c(b),b.showDifferences&&(k(b.edit,b.diff,m,DIFF_INSERT,b.classes),k(b.orig,b.diff,o,DIFF_DELETE,b.classes)),"align"==b.mv.options.connect&&s(b),n(b),null!=b.needsScrollSync&&f(b,b.needsScrollSync),W=!1}function e(a){W||(b.dealigned=!0,g(a))}function g(a){W||p||(clearTimeout(l),a===!0&&(p=!0),l=setTimeout(d,a===!0?20:250))}function h(a,c){b.diffOutOfDate||(b.diffOutOfDate=!0,m.from=m.to=o.from=o.to=0),e(c.text.length-1!=c.to.line-c.from.line)}function i(){b.diffOutOfDate=!0,b.dealigned=!0,d("full")}var l,m={from:0,to:0,marked:[]},o={from:0,to:0,marked:[]},p=!1;return b.edit.on("change",h),b.orig.on("change",h),b.edit.on("swapDoc",i),b.orig.on("swapDoc",i),"align"==b.mv.options.connect&&(a.on(b.edit.state.trackAlignable,"realign",e),a.on(b.orig.state.trackAlignable,"realign",e)),b.edit.on("viewportChange",function(){g(!1)}),b.orig.on("viewportChange",function(){g(!1)}),d(),d}function e(a,b){a.edit.on("scroll",function(){f(a,!0)&&n(a)}),a.orig.on("scroll",function(){f(a,!1)&&n(a),b&&f(b,!0)&&n(b)})}function f(a,b){if(a.diffOutOfDate)return a.lockScroll&&null==a.needsScrollSync&&(a.needsScrollSync=b),!1;if(a.needsScrollSync=null,!a.lockScroll)return!0;var c,d,e=+new Date;if(b?(c=a.edit,d=a.orig):(c=a.orig,d=a.edit),c.state.scrollSetBy==a&&(c.state.scrollSetAt||0)+250>e)return!1;var f=c.getScrollInfo();if("align"==a.mv.options.connect)q=f.top;else{var h,i,j=.5*f.clientHeight,k=f.top+j,l=c.lineAtHeight(k,"local"),m=D(a.chunks,l,b),n=g(c,b?m.edit:m.orig),o=g(d,b?m.orig:m.edit),p=(k-n.top)/(n.bot-n.top),q=o.top-j+p*(o.bot-o.top);if(q>f.top&&(i=f.top/j)<1)q=q*i+f.top*(1-i);else if((h=f.height-f.clientHeight-f.top)<j){var r=d.getScrollInfo(),s=r.height-r.clientHeight-q;s>h&&(i=h/j)<1&&(q=q*i+(r.height-r.clientHeight-h)*(1-i))}}return d.scrollTo(f.left,q),d.state.scrollSetAt=e,d.state.scrollSetBy=a,!0}function g(a,b){var c=b.after;return null==c&&(c=a.lastLine()+1),{top:a.heightAtLine(b.before||0,"local"),bot:a.heightAtLine(c,"local")}}function h(a,b,c){a.lockScroll=b,b&&0!=c&&f(a,DIFF_INSERT)&&n(a),a.lockButton.innerHTML=b?"\u21db\u21da":"\u21db \u21da"}function i(a,b,c){for(var d=c.classLocation,e=0;e<d.length;e++)a.removeLineClass(b,d[e],c.chunk),a.removeLineClass(b,d[e],c.start),a.removeLineClass(b,d[e],c.end)}function j(b,c,d){for(var e=0;e<c.length;++e){var f=c[e];f instanceof a.TextMarker?f.clear():f.parent&&i(b,f,d)}c.length=0}function k(a,b,c,d,e){var f=a.getViewport();a.operation(function(){c.from==c.to||f.from-c.to>20||c.from-f.to>20?(j(a,c.marked,e),m(a,b,d,c.marked,f.from,f.to,e),c.from=f.from,c.to=f.to):(f.from<c.from&&(m(a,b,d,c.marked,f.from,c.from,e),c.from=f.from),f.to>c.to&&(m(a,b,d,c.marked,c.to,f.to,e),c.to=f.to))})}function l(a,b,c,d,e,f){for(var g=c.classLocation,h=a.getLineHandle(b),i=0;i<g.length;i++)d&&a.addLineClass(h,g[i],c.chunk),e&&a.addLineClass(h,g[i],c.start),f&&a.addLineClass(h,g[i],c.end);return h}function m(a,b,c,d,e,f,g){function h(b,c){for(var h=Math.max(e,b),i=Math.min(f,c),j=h;j<i;++j)d.push(l(a,j,g,!0,j==b,j==c-1));b==c&&h==c&&i==c&&(h?d.push(l(a,h-1,g,!1,!1,!0)):d.push(l(a,h,g,!1,!0,!1)))}for(var i=U(0,0),j=U(e,0),k=a.clipPos(U(f-1)),m=c==DIFF_DELETE?g.del:g.insert,n=0,o=!1,p=0;p<b.length;++p){var q=b[p],r=q[0],s=q[1];if(r==DIFF_EQUAL){var t=i.line+(C(b,p)?0:1);M(i,s);var u=i.line+(B(b,p)?1:0);u>t&&(o&&(h(n,t),o=!1),n=u)}else if(o=!0,r==c){var v=M(i,s,!0),w=P(j,i),x=O(k,v);Q(w,x)||d.push(a.markText(w,x,{className:m})),i=v}}o&&h(n,i.line+1)}function n(a){if(a.showDifferences){if(a.svg){J(a.svg);var b=a.gap.offsetWidth;K(a.svg,"width",b,"height",a.gap.offsetHeight)}a.copyButtons&&J(a.copyButtons);for(var c=a.edit.getViewport(),d=a.orig.getViewport(),e=a.mv.wrap.getBoundingClientRect().top,f=e-a.edit.getScrollerElement().getBoundingClientRect().top+a.edit.getScrollInfo().top,g=e-a.orig.getScrollerElement().getBoundingClientRect().top+a.orig.getScrollInfo().top,h=0;h<a.chunks.length;h++){var i=a.chunks[h];i.editFrom<=c.to&&i.editTo>=c.from&&i.origFrom<=d.to&&i.origTo>=d.from&&v(a,i,g,f,b)}}}function o(a,b){for(var c=0,d=0,e=0;e<b.length;e++){var f=b[e];if(f.editTo>a&&f.editFrom<=a)return null;if(f.editFrom>a)break;c=f.editTo,d=f.origTo}return d+(a-c)}function p(a,b,c){for(var d=a.state.trackAlignable,e=a.firstLine(),f=0,g=[],h=0;;h++){for(var i=b[h],j=i?c?i.origFrom:i.editFrom:1e9;f<d.alignable.length;f+=2){var k=d.alignable[f]+1;if(!(k<=e)){if(!(k<=j))break;g.push(k)}}if(!i)break;g.push(e=c?i.origTo:i.editTo)}return g}function q(a,b,c,d){var e=0,f=0,g=0,h=0;a:for(;;e++){var i=a[e],j=b[f];if(!i&&null==j)break;for(var k=i?i[0]:1e9,l=null==j?1e9:j;g<c.length;){var m=c[g];if(m.origFrom<=l&&m.origTo>l){f++,e--;continue a}if(m.editTo>k){if(m.editFrom<=k)continue a;break}h+=m.origTo-m.origFrom-(m.editTo-m.editFrom),g++}if(k==l-h)i[d]=l,f++;else if(k<l-h)i[d]=k+h;else{var n=[l-h,null,null];n[d]=l,a.splice(e,0,n),f++}}}function r(a,b){var c=p(a.edit,a.chunks,!1),d=[];if(b)for(var e=0,f=0;e<b.chunks.length;e++){for(var g=b.chunks[e].editTo;f<c.length&&c[f]<g;)f++;f!=c.length&&c[f]==g||c.splice(f++,0,g)}for(var e=0;e<c.length;e++)d.push([c[e],null,null]);return q(d,p(a.orig,a.chunks,!0),a.chunks,1),b&&q(d,p(b.orig,b.chunks,!0),b.chunks,2),d}function s(a,b){if(a.dealigned||b){if(!a.orig.curOp)return a.orig.operation(function(){s(a,b)});a.dealigned=!1;var d=a.mv.left==a?a.mv.right:a.mv.left;d&&(c(d),d.dealigned=!1);for(var e=r(a,d),f=a.mv.aligners,g=0;g<f.length;g++)f[g].clear();f.length=0;var h=[a.edit,a.orig],i=[];d&&h.push(d.orig);for(var g=0;g<h.length;g++)i.push(h[g].getScrollInfo().top);for(var j=0;j<e.length;j++)t(h,e[j],f);for(var g=0;g<h.length;g++)h[g].scrollTo(null,i[g])}}function t(a,b,c){for(var d=0,e=[],f=0;f<a.length;f++)if(null!=b[f]){var g=a[f].heightAtLine(b[f],"local");e[f]=g,d=Math.max(d,g)}for(var f=0;f<a.length;f++)if(null!=b[f]){var h=d-e[f];h>1&&c.push(u(a[f],b[f],h))}}function u(a,b,c){var d=!0;b>a.lastLine()&&(b--,d=!1);var e=document.createElement("div");return e.className="CodeMirror-merge-spacer",e.style.height=c+"px",e.style.minWidth="1px",a.addLineWidget(b,e,{height:c,above:d,mergeSpacer:!0,handleMouseEvents:!0})}function v(a,b,c,d,e){var f="left"==a.type,g=a.orig.heightAtLine(b.origFrom,"local",!0)-c;if(a.svg){var h=g,i=a.edit.heightAtLine(b.editFrom,"local",!0)-d;if(f){var j=h;h=i,i=j}var k=a.orig.heightAtLine(b.origTo,"local",!0)-c,l=a.edit.heightAtLine(b.editTo,"local",!0)-d;if(f){var j=k;k=l,l=j}var m=" C "+e/2+" "+i+" "+e/2+" "+h+" "+(e+2)+" "+h,n=" C "+e/2+" "+k+" "+e/2+" "+l+" -1 "+l;K(a.svg.appendChild(document.createElementNS(V,"path")),"d","M -1 "+i+m+" L "+(e+2)+" "+k+n+" z","class",a.classes.connect)}if(a.copyButtons){var o=a.copyButtons.appendChild(I("div","left"==a.type?"\u21dd":"\u21dc","CodeMirror-merge-copy")),p=a.mv.options.allowEditingOriginals;if(o.title=p?"Push to left":"Revert chunk",o.chunk=b,o.style.top=(b.origTo>b.origFrom?g:a.edit.heightAtLine(b.editFrom,"local")-d)+"px",p){var q=a.edit.heightAtLine(b.editFrom,"local")-d,r=a.copyButtons.appendChild(I("div","right"==a.type?"\u21dd":"\u21dc","CodeMirror-merge-copy-reverse"));r.title="Push to right",r.chunk={editFrom:b.origFrom,editTo:b.origTo,origFrom:b.editFrom,origTo:b.editTo},r.style.top=q+"px","right"==a.type?r.style.left="2px":r.style.right="2px"}}}function w(a,b,c,d){if(!a.diffOutOfDate){var e=d.origTo>c.lastLine()?U(d.origFrom-1):U(d.origFrom,0),f=U(d.origTo,0),g=d.editTo>b.lastLine()?U(d.editFrom-1):U(d.editFrom,0),h=U(d.editTo,0),i=a.mv.options.revertChunk;i?i(a.mv,c,e,f,b,g,h):b.replaceRange(c.getRange(e,f),g,h)}}function x(b){var c=b.lockButton=I("div",null,"CodeMirror-merge-scrolllock");c.title="Toggle locked scrolling";var d=I("div",[c],"CodeMirror-merge-scrolllock-wrap");a.on(c,"click",function(){h(b,!b.lockScroll)});var e=[d];if(b.mv.options.revertButtons!==!1&&(b.copyButtons=I("div",null,"CodeMirror-merge-copybuttons-"+b.type),a.on(b.copyButtons,"click",function(a){var c=a.target||a.srcElement;if(c.chunk)return"CodeMirror-merge-copy-reverse"==c.className?void w(b,b.orig,b.edit,c.chunk):void w(b,b.edit,b.orig,c.chunk)}),e.unshift(b.copyButtons)),"align"!=b.mv.options.connect){var f=document.createElementNS&&document.createElementNS(V,"svg");f&&!f.createSVGRect&&(f=null),b.svg=f,f&&e.push(f)}return b.gap=I("div",e,"CodeMirror-merge-gap")}function y(a){return"string"==typeof a?a:a.getValue()}function z(a,b,c){Y||(Y=new diff_match_patch);for(var d=Y.diff_main(a,b),e=0;e<d.length;++e){var f=d[e];(c?/[^ \t]/.test(f[1]):f[1])?e&&d[e-1][0]==f[0]&&(d.splice(e--,1),d[e][1]+=f[1]):d.splice(e--,1)}return d}function A(a){for(var b=[],c=0,d=0,e=U(0,0),f=U(0,0),g=0;g<a.length;++g){var h=a[g],i=h[0];if(i==DIFF_EQUAL){var j=!C(a,g)||e.line<c||f.line<d?1:0,k=e.line+j,l=f.line+j;M(e,h[1],null,f);var m=B(a,g)?1:0,n=e.line+m,o=f.line+m;n>k&&(g&&b.push({origFrom:d,origTo:l,editFrom:c,editTo:k}),c=n,d=o)}else M(i==DIFF_INSERT?e:f,h[1])}return(c<=e.line||d<=f.line)&&b.push({origFrom:d,origTo:f.line+1,editFrom:c,editTo:e.line+1}),b}function B(a,b){if(b==a.length-1)return!0;var c=a[b+1][1];return!(1==c.length&&b<a.length-2||10!=c.charCodeAt(0))&&(b==a.length-2||(c=a[b+2][1],(c.length>1||b==a.length-3)&&10==c.charCodeAt(0)))}function C(a,b){if(0==b)return!0;var c=a[b-1][1];return 10==c.charCodeAt(c.length-1)&&(1==b||(c=a[b-2][1],10==c.charCodeAt(c.length-1)))}function D(a,b,c){for(var d,e,f,g,h=0;h<a.length;h++){var i=a[h],j=c?i.editFrom:i.origFrom,k=c?i.editTo:i.origTo;null==e&&(j>b?(e=i.editFrom,g=i.origFrom):k>b&&(e=i.editTo,g=i.origTo)),k<=b?(d=i.editTo,f=i.origTo):j<=b&&(d=i.editFrom,f=i.origFrom)}return{edit:{before:d,after:e},orig:{before:f,after:g}}}function E(b,c,d){function e(){g.clear(),b.removeLineClass(c,"wrap","CodeMirror-merge-collapsed-line")}b.addLineClass(c,"wrap","CodeMirror-merge-collapsed-line");var f=document.createElement("span");f.className="CodeMirror-merge-collapsed-widget",f.title="Identical text collapsed. Click to expand.";var g=b.markText(U(c,0),U(d-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:f,clearOnEnter:!0});return a.on(f,"click",e),{mark:g,clear:e}}function F(a,b){function c(){for(var a=0;a<d.length;a++)d[a].clear()}for(var d=[],e=0;e<b.length;e++){var f=b[e],g=E(f.cm,f.line,f.line+a);d.push(g),g.mark.on("clear",c)}return d[0].mark}function G(a,b,c,d){for(var e=0;e<a.chunks.length;e++)for(var f=a.chunks[e],g=f.editFrom-b;g<f.editTo+b;g++){var h=g+c;h>=0&&h<d.length&&(d[h]=!1)}}function H(a,b){"number"!=typeof b&&(b=2);for(var c=[],d=a.editor(),e=d.firstLine(),f=e,g=d.lastLine();f<=g;f++)c.push(!0);a.left&&G(a.left,b,e,c),a.right&&G(a.right,b,e,c);for(var h=0;h<c.length;h++)if(c[h]){for(var i=h+e,j=1;h<c.length-1&&c[h+1];h++,j++);if(j>b){var k=[{line:i,cm:d}];a.left&&k.push({line:o(i,a.left.chunks),cm:a.left.orig}),a.right&&k.push({line:o(i,a.right.chunks),cm:a.right.orig});var l=F(j,k);a.options.onCollapse&&a.options.onCollapse(a,i,j,l)}}}function I(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f<b.length;++f)e.appendChild(b[f]);return e}function J(a){for(var b=a.childNodes.length;b>0;--b)a.removeChild(a.firstChild)}function K(a){for(var b=1;b<arguments.length;b+=2)a.setAttribute(arguments[b],arguments[b+1])}function L(a,b){b||(b={});for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function M(a,b,c,d){for(var e=c?U(a.line,a.ch):a,f=0;;){var g=b.indexOf("\n",f);if(g==-1)break;++e.line,d&&++d.line,f=g+1}return e.ch=(f?0:e.ch)+(b.length-f),d&&(d.ch=(f?0:d.ch)+(b.length-f)),e}function N(a){this.cm=a,this.alignable=[],this.height=a.doc.height;var b=this;a.on("markerAdded",function(a,c){if(c.collapsed){var d=c.find(1);null!=d&&b.set(d.line,_)}}),a.on("markerCleared",function(a,c,d,e){null!=e&&c.collapsed&&b.check(e,_,b.hasMarker)}),a.on("markerChanged",this.signal.bind(this)),a.on("lineWidgetAdded",function(a,c,d){c.mergeSpacer||(c.above?b.set(d-1,$):b.set(d,Z))}),a.on("lineWidgetCleared",function(a,c,d){c.mergeSpacer||(c.above?b.check(d-1,$,b.hasWidgetBelow):b.check(d,Z,b.hasWidget))}),a.on("lineWidgetChanged",this.signal.bind(this)),a.on("change",function(a,c){var d=c.from.line,e=c.to.line-c.from.line,f=c.text.length-1,g=d+f;(e||f)&&b.map(d,e,f),b.check(g,_,b.hasMarker),(e||f)&&b.check(c.from.line,_,b.hasMarker)}),a.on("viewportChange",function(){b.cm.doc.height!=b.height&&b.signal()})}function O(a,b){return(a.line-b.line||a.ch-b.ch)<0?a:b}function P(a,b){return(a.line-b.line||a.ch-b.ch)>0?a:b}function Q(a,b){return a.line==b.line&&a.ch==b.ch}function R(a,b,c){for(var d=a.length-1;d>=0;d--){var e=a[d],f=(c?e.origTo:e.editTo)-1;if(f<b)return f}}function S(a,b,c){for(var d=0;d<a.length;d++){var e=a[d],f=c?e.origFrom:e.editFrom;if(f>b)return f}}function T(b,d){var e=null,f=b.state.diffViews,g=b.getCursor().line;if(f)for(var h=0;h<f.length;h++){var i=f[h],j=b==i.orig;c(i);var k=d<0?R(i.chunks,g,j):S(i.chunks,g,j);null==k||null!=e&&!(d<0?k>e:k<e)||(e=k)}return null==e?a.Pass:void b.setCursor(e,0)}var U=a.Pos,V="http://www.w3.org/2000/svg";b.prototype={constructor:b,init:function(b,c,d){this.edit=this.mv.edit,(this.edit.state.diffViews||(this.edit.state.diffViews=[])).push(this),this.orig=a(b,L({value:c,readOnly:!this.mv.options.allowEditingOriginals},L(d))),"align"==this.mv.options.connect&&(this.edit.state.trackAlignable||(this.edit.state.trackAlignable=new N(this.edit)),this.orig.state.trackAlignable=new N(this.orig)),this.orig.state.diffViews=[this];var e=d.chunkClassLocation||"background";"[object Array]"!=Object.prototype.toString.call(e)&&(e=[e]),this.classes.classLocation=e,this.diff=z(y(c),y(d.value),this.mv.options.ignoreWhitespace),this.chunks=A(this.diff),this.diffOutOfDate=this.dealigned=!1,this.needsScrollSync=null,this.showDifferences=d.showDifferences!==!1},registerEvents:function(a){this.forceUpdate=d(this),h(this,!0,!1),e(this,a)},setShowDifferences:function(a){a=a!==!1,a!=this.showDifferences&&(this.showDifferences=a,this.forceUpdate("full"))}};var W=!1,X=a.MergeView=function(c,d){if(!(this instanceof X))return new X(c,d);this.options=d;var e=d.origLeft,f=null==d.origRight?d.orig:d.origRight,g=null!=e,h=null!=f,i=1+(g?1:0)+(h?1:0),j=[],k=this.left=null,l=this.right=null,m=this;if(g){k=this.left=new b(this,"left");var o=I("div",null,"CodeMirror-merge-pane CodeMirror-merge-left");j.push(o),j.push(x(k))}var p=I("div",null,"CodeMirror-merge-pane CodeMirror-merge-editor");if(j.push(p),h){l=this.right=new b(this,"right"),j.push(x(l));var q=I("div",null,"CodeMirror-merge-pane CodeMirror-merge-right");j.push(q)}(h?q:p).className+=" CodeMirror-merge-pane-rightmost",j.push(I("div",null,null,"height: 0; clear: both;"));var r=this.wrap=c.appendChild(I("div",j,"CodeMirror-merge CodeMirror-merge-"+i+"pane"));this.edit=a(p,L(d)),k&&k.init(o,e,d),l&&l.init(q,f,d),d.collapseIdentical&&this.editor().operation(function(){H(m,d.collapseIdentical)}),"align"==d.connect&&(this.aligners=[],s(this.left||this.right,!0)),k&&k.registerEvents(l),l&&l.registerEvents(k);var t=function(){k&&n(k),l&&n(l)};a.on(window,"resize",t);var u=setInterval(function(){for(var b=r.parentNode;b&&b!=document.body;b=b.parentNode);b||(clearInterval(u),a.off(window,"resize",t))},5e3)};X.prototype={constructor:X,editor:function(){return this.edit},rightOriginal:function(){return this.right&&this.right.orig},leftOriginal:function(){return this.left&&this.left.orig},setShowDifferences:function(a){this.right&&this.right.setShowDifferences(a),this.left&&this.left.setShowDifferences(a)},rightChunks:function(){if(this.right)return c(this.right),this.right.chunks},leftChunks:function(){if(this.left)return c(this.left),this.left.chunks}};var Y,Z=1,$=2,_=4;N.prototype={signal:function(){a.signal(this,"realign"),this.height=this.cm.doc.height},set:function(a,b){for(var c=-1;c<this.alignable.length;c+=2){var d=this.alignable[c]-a;if(0==d){if((this.alignable[c+1]&b)==b)return;return this.alignable[c+1]|=b,void this.signal()}if(d>0)break}this.signal(),this.alignable.splice(c,0,a,b)},find:function(a){for(var b=0;b<this.alignable.length;b+=2)if(this.alignable[b]==a)return b;return-1},check:function(a,b,c){var d=this.find(a);if(d!=-1&&this.alignable[d+1]&b&&!c.call(this,a)){this.signal();var e=this.alignable[d+1]&~b;e?this.alignable[d+1]=e:this.alignable.splice(d,2)}},hasMarker:function(a){var b=this.cm.getLineHandle(a);if(b.markedSpans)for(var c=0;c<b.markedSpans.length;c++)if(b.markedSpans[c].mark.collapsed&&null!=b.markedSpans[c].to)return!0;return!1},hasWidget:function(a){var b=this.cm.getLineHandle(a);if(b.widgets)for(var c=0;c<b.widgets.length;c++)if(!b.widgets[c].above&&!b.widgets[c].mergeSpacer)return!0;return!1},hasWidgetBelow:function(a){if(a==this.cm.lastLine())return!1;var b=this.cm.getLineHandle(a+1);if(b.widgets)for(var c=0;c<b.widgets.length;c++)if(b.widgets[c].above&&!b.widgets[c].mergeSpacer)return!0;return!1},map:function(a,b,c){for(var d=c-b,e=a+b,f=-1,g=-1,h=0;h<this.alignable.length;h+=2){var i=this.alignable[h];i==a&&this.alignable[h+1]&$&&(f=h),i==e&&this.alignable[h+1]&$&&(g=h),i<=a||(i<e?this.alignable.splice(h--,2):this.alignable[h]+=d)}if(f>-1){var j=this.alignable[f+1];j==$?this.alignable.splice(f,2):this.alignable[f+1]=j&~$}g>-1&&c&&this.set(a+c,$)}},a.commands.goNextDiff=function(a){return T(a,1)},a.commands.goPrevDiff=function(a){return T(a,-1)}})},{"../../lib/codemirror":59}],35:[function(a,b,c){!function(d){"object"==typeof c&&"object"==typeof b?d(a("../../lib/codemirror"),"cjs"):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],function(a){d(a,"amd")}):d(CodeMirror,"plain")}(function(b,c){function d(a,b){var c=b;return function(){0==--c&&a()}}function e(a,c){var e=b.modes[a].dependencies;if(!e)return c();for(var f=[],g=0;g<e.length;++g)b.modes.hasOwnProperty(e[g])||f.push(e[g]);if(!f.length)return c();for(var h=d(c,f.length),g=0;g<f.length;++g)b.requireMode(f[g],h)}b.modeURL||(b.modeURL="../mode/%N/%N.js");var f={};b.requireMode=function(d,g){if("string"!=typeof d&&(d=d.name),b.modes.hasOwnProperty(d))return e(d,g);if(f.hasOwnProperty(d))return f[d].push(g);var h=b.modeURL.replace(/%N/g,d);if("plain"==c){var i=document.createElement("script");i.src=h;var j=document.getElementsByTagName("script")[0],k=f[d]=[g];b.on(i,"load",function(){e(d,function(){for(var a=0;a<k.length;++a)k[a]()})}),j.parentNode.insertBefore(i,j)}else"cjs"==c?(a(h),g()):"amd"==c&&requirejs([h],g)},b.autoLoadMode=function(a,c){b.modes.hasOwnProperty(c)||b.requireMode(c,function(){a.setOption("mode",a.getOption("mode"))})}})},{"../../lib/codemirror":59}],36:[function(a,b,c){!function(d){"object"==typeof c&&"object"==typeof b?d(a("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)}(function(a){"use strict";a.multiplexingMode=function(b){
Delete
Ấn tiếp tục để lưu lại ở lại trang và ấn lưu để lưu lại và quay về List dòng
Function
Delete dòng
Edit by line
Edit text
Download
Information
Rename
Copy
Move
Delete
Chmod
List