From f91c5c51d7478d9369830368bd721d37a95677f5 Mon Sep 17 00:00:00 2001 From: Tetrakern <26898880+Tetrakern@users.noreply.github.com> Date: Fri, 10 May 2024 00:05:05 +0200 Subject: [PATCH] Update config.codekit3 --- config.codekit3 | 12 ++++++++++-- js/diff-match-patch.js | 2 +- js/diff-match-patch.min.js | 1 - 3 files changed, 11 insertions(+), 4 deletions(-) delete mode 100644 js/diff-match-patch.min.js diff --git a/config.codekit3 b/config.codekit3 index 3caf1575..9a274857 100644 --- a/config.codekit3 +++ b/config.codekit3 @@ -2043,6 +2043,14 @@ "oAP" : "\/singular-index.php", "oF" : 1 }, + "\/singular-mirror-story.php" : { + "cB" : 0, + "ft" : 8192, + "hM" : 0, + "oA" : 1, + "oAP" : "\/singular-mirror-story.php", + "oF" : 1 + }, "\/singular-story.php" : { "cB" : 0, "ft" : 8192, @@ -2213,8 +2221,8 @@ "ma" : 0, "mi" : 1, "oA" : 0, - "oAP" : "\/js\/diff-match-patch.min.js", - "oF" : 1, + "oAP" : "\/js\/diff-match-patch.js", + "oF" : 3, "sC" : 3, "tS" : 0 }, diff --git a/js/diff-match-patch.js b/js/diff-match-patch.js index 0fdca2f5..4bc05a80 100644 --- a/js/diff-match-patch.js +++ b/js/diff-match-patch.js @@ -1 +1 @@ -var diff_match_patch=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},DIFF_DELETE=-1,DIFF_INSERT=1,DIFF_EQUAL=0;diff_match_patch.Diff=function(t,i){this[0]=t,this[1]=i},diff_match_patch.Diff.prototype.length=2,diff_match_patch.Diff.prototype.toString=function(){return this[0]+","+this[1]},diff_match_patch.prototype.diff_main=function(t,i,h,f){if(void 0===f&&(f=0>=this.Diff_Timeout?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout),null==t||null==i)throw Error("Null input. (diff_main)");if(t==i)return t?[new diff_match_patch.Diff(DIFF_EQUAL,t)]:[];void 0===h&&(h=!0);var e=h,n=this.diff_commonPrefix(t,i);h=t.substring(0,n),t=t.substring(n),i=i.substring(n),n=this.diff_commonSuffix(t,i);var a=t.substring(t.length-n);return t=t.substring(0,t.length-n),i=i.substring(0,i.length-n),t=this.diff_compute_(t,i,e,f),h&&t.unshift(new diff_match_patch.Diff(DIFF_EQUAL,h)),a&&t.push(new diff_match_patch.Diff(DIFF_EQUAL,a)),this.diff_cleanupMerge(t),t},diff_match_patch.prototype.diff_compute_=function(t,i,h,f){if(!t)return[new diff_match_patch.Diff(DIFF_INSERT,i)];if(!i)return[new diff_match_patch.Diff(DIFF_DELETE,t)];var e=t.length>i.length?t:i,n=t.length>i.length?i:t,a=e.indexOf(n);return-1!=a?(h=[new diff_match_patch.Diff(DIFF_INSERT,e.substring(0,a)),new diff_match_patch.Diff(DIFF_EQUAL,n),new diff_match_patch.Diff(DIFF_INSERT,e.substring(a+n.length))],t.length>i.length&&(h[0][0]=h[2][0]=DIFF_DELETE),h):1==n.length?[new diff_match_patch.Diff(DIFF_DELETE,t),new diff_match_patch.Diff(DIFF_INSERT,i)]:(e=this.diff_halfMatch_(t,i))?(i=e[1],n=e[3],t=e[4],e=this.diff_main(e[0],e[2],h,f),h=this.diff_main(i,n,h,f),e.concat([new diff_match_patch.Diff(DIFF_EQUAL,t)],h)):h&&100h);d++){for(var u=-d+l;u<=d-g;u+=2){for(var m=n+u,F=u==-d||u!=d&&r[m-1]f)g+=2;else if(D>e)l+=2;else if(c&&(0<=(m=n+_-u)&&m=E)return this.diff_bisectSplit_(t,i,F,D,h)}}for(u=-d+o;u<=d-p;u+=2){for(m=n+u,F=(E=u==-d||u!=d&&s[m-1]f)p+=2;else if(F>e)o+=2;else if(!c&&(0<=(m=n+_-u)&&m=(E=f-E))))return this.diff_bisectSplit_(t,i,F,D,h)}}return[new diff_match_patch.Diff(DIFF_DELETE,t),new diff_match_patch.Diff(DIFF_INSERT,i)]},diff_match_patch.prototype.diff_bisectSplit_=function(t,i,h,f,e){var n=t.substring(0,h),a=i.substring(0,f);return t=t.substring(h),i=i.substring(f),n=this.diff_main(n,a,!1,e),e=this.diff_main(t,i,!1,e),n.concat(e)},diff_match_patch.prototype.diff_linesToChars_=function(t,i){function h(t){for(var i="",h=0,a=-1,r=f.length;af?t=t.substring(h-f):h=t.length?[f,e,a,r,c]:null}if(0>=this.Diff_Timeout)return null;var f=t.length>i.length?t:i,e=t.length>i.length?i:t;if(4>f.length||2*e.lengthf[4].length?a:f:a,t.length>i.length){f=a[0],e=a[1];var r=a[2],s=a[3]}else r=a[0],s=a[1],f=a[2],e=a[3];return[f,e,r,s,a[4]]},diff_match_patch.prototype.diff_cleanupSemantic=function(t){for(var i=!1,h=[],f=0,e=null,n=0,a=0,r=0,s=0,_=0;n=(e=this.diff_commonOverlap_(h,i))?(f>=i.length/2||f>=h.length/2)&&(t.splice(n,0,new diff_match_patch.Diff(DIFF_EQUAL,h.substring(0,f))),t[n-1][1]=i.substring(0,i.length-f),t[n+1][1]=h.substring(f),n++):(e>=i.length/2||e>=h.length/2)&&(t.splice(n,0,new diff_match_patch.Diff(DIFF_EQUAL,i.substring(0,e))),t[n-1][0]=DIFF_INSERT,t[n-1][1]=h.substring(0,h.length-e),t[n+1][0]=DIFF_DELETE,t[n+1][1]=i.substring(e),n++),n++),n++},diff_match_patch.prototype.diff_cleanupSemanticLossless=function(t){function i(t,i){if(!t||!i)return 6;var h=t.charAt(t.length-1),f=i.charAt(0),e=h.match(diff_match_patch.nonAlphaNumericRegex_),n=f.match(diff_match_patch.nonAlphaNumericRegex_),a=e&&h.match(diff_match_patch.whitespaceRegex_),r=n&&f.match(diff_match_patch.whitespaceRegex_);h=a&&h.match(diff_match_patch.linebreakRegex_),f=r&&f.match(diff_match_patch.linebreakRegex_);var s=h&&t.match(diff_match_patch.blanklineEndRegex_),_=f&&i.match(diff_match_patch.blanklineStartRegex_);return s||_?5:h||f?4:e&&!a&&r?3:a||r?2:e||n?1:0}for(var h=1;h=_&&(_=c,a=f,r=e,s=n)}t[h-1][1]!=a&&(a?t[h-1][1]=a:(t.splice(h-1,1),h--),t[h][1]=r,s?t[h+1][1]=s:(t.splice(h+1,1),h--))}h++}},diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,diff_match_patch.whitespaceRegex_=/\s/,diff_match_patch.linebreakRegex_=/[\r\n]/,diff_match_patch.blanklineEndRegex_=/\n\r?\n$/,diff_match_patch.blanklineStartRegex_=/^\r?\n\r?\n/,diff_match_patch.prototype.diff_cleanupEfficiency=function(t){for(var i=!1,h=[],f=0,e=null,n=0,a=!1,r=!1,s=!1,_=!1;ni));h++)n=f,a=e;return t.length!=h&&t[h][0]===DIFF_DELETE?a:a+(i-n)},diff_match_patch.prototype.diff_prettyHtml=function(t){for(var i=[],h=/&/g,f=//g,n=/\n/g,a=0;a");switch(r){case DIFF_INSERT:i[a]=''+s+"";break;case DIFF_DELETE:i[a]=''+s+"";break;case DIFF_EQUAL:i[a]=""+s+""}}return i.join("")},diff_match_patch.prototype.diff_text1=function(t){for(var i=[],h=0;hthis.Match_MaxBits)throw Error("Pattern too long for this browser.");var e=this.match_alphabet_(i),n=this,a=this.Match_Threshold,r=t.indexOf(i,h);-1!=r&&(a=Math.min(f(0,r),a),-1!=(r=t.lastIndexOf(i,h+i.length))&&(a=Math.min(f(0,r),a)));var s=1<=_;p--){var d=e[t.charAt(p-1)];if(c[p]=0===o?(c[p+1]<<1|1)&d:(c[p+1]<<1|1)&d|(l[p+1]|l[p])<<1|1|l[p+1],c[p]&s&&(d=f(o,p-1))<=a){if(a=d,!((r=p-1)>h))break;_=Math.max(1,2*h-r)}}if(f(o+1,h)>a)break;l=c}return r},diff_match_patch.prototype.match_alphabet_=function(t){for(var i={},h=0;h=2*this.Patch_Margin&&e&&(this.patch_addContext_(t,r),h.push(t),t=new diff_match_patch.patch_obj,e=0,r=f,n=a)}_!==DIFF_INSERT&&(n+=c.length),_!==DIFF_DELETE&&(a+=c.length)}return e&&(this.patch_addContext_(t,r),h.push(t)),h},diff_match_patch.prototype.patch_deepCopy=function(t){for(var i=[],h=0;hthis.Match_MaxBits){var _=this.match_main(i,r.substring(0,this.Match_MaxBits),a);-1!=_&&(-1==(s=this.match_main(i,r.substring(r.length-this.Match_MaxBits),a+r.length-this.Match_MaxBits))||_>=s)&&(_=-1)}else _=this.match_main(i,r,a);if(-1==_)e[n]=!1,f-=t[n].length2-t[n].length1;else if(e[n]=!0,f=_-a,r==(a=-1==s?i.substring(_,_+r.length):i.substring(_,s+this.Match_MaxBits)))i=i.substring(0,_)+this.diff_text2(t[n].diffs)+i.substring(_+r.length);else if(a=this.diff_main(r,a,!1),r.length>this.Match_MaxBits&&this.diff_levenshtein(a)/r.length>this.Patch_DeleteThreshold)e[n]=!1;else{var c;for(this.diff_cleanupSemanticLossless(a),r=0,s=0;se[0][1].length){var n=i-e[0][1].length;e[0][1]=h.substring(e[0][1].length)+e[0][1],f.start1-=n,f.start2-=n,f.length1+=n,f.length2+=n}return 0==(e=(f=t[t.length-1]).diffs).length||e[e.length-1][0]!=DIFF_EQUAL?(e.push(new diff_match_patch.Diff(DIFF_EQUAL,h)),f.length1+=i,f.length2+=i):i>e[e.length-1][1].length&&(n=i-e[e.length-1][1].length,e[e.length-1][1]+=h.substring(0,n),f.length1+=n,f.length2+=n),h},diff_match_patch.prototype.patch_splitMax=function(t){for(var i=this.Match_MaxBits,h=0;h2*i?(r.length1+=_.length,e+=_.length,s=!1,r.diffs.push(new diff_match_patch.Diff(a,_)),f.diffs.shift()):(_=_.substring(0,i-r.length1-this.Patch_Margin),r.length1+=_.length,e+=_.length,a===DIFF_EQUAL?(r.length2+=_.length,n+=_.length):s=!1,r.diffs.push(new diff_match_patch.Diff(a,_)),_==f.diffs[0][1]?f.diffs.shift():f.diffs[0][1]=f.diffs[0][1].substring(_.length))}a=(a=this.diff_text2(r.diffs)).substring(a.length-this.Patch_Margin),""!==(_=this.diff_text1(f.diffs).substring(0,this.Patch_Margin))&&(r.length1+=_.length,r.length2+=_.length,0!==r.diffs.length&&r.diffs[r.diffs.length-1][0]===DIFF_EQUAL?r.diffs[r.diffs.length-1][1]+=_:r.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL,_))),s||t.splice(++h,0,r)}}},diff_match_patch.prototype.patch_toText=function(t){for(var i=[],h=0;h=this.Diff_Timeout?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout),null==t||null==i)throw Error("Null input. (diff_main)");if(t==i)return t?[new diff_match_patch.Diff(DIFF_EQUAL,t)]:[];void 0===h&&(h=!0);var e=h,n=this.diff_commonPrefix(t,i);h=t.substring(0,n),t=t.substring(n),i=i.substring(n),n=this.diff_commonSuffix(t,i);var a=t.substring(t.length-n);return t=t.substring(0,t.length-n),i=i.substring(0,i.length-n),t=this.diff_compute_(t,i,e,f),h&&t.unshift(new diff_match_patch.Diff(DIFF_EQUAL,h)),a&&t.push(new diff_match_patch.Diff(DIFF_EQUAL,a)),this.diff_cleanupMerge(t),t},diff_match_patch.prototype.diff_compute_=function(t,i,h,f){if(!t)return[new diff_match_patch.Diff(DIFF_INSERT,i)];if(!i)return[new diff_match_patch.Diff(DIFF_DELETE,t)];var e=t.length>i.length?t:i,n=t.length>i.length?i:t,a=e.indexOf(n);return-1!=a?(h=[new diff_match_patch.Diff(DIFF_INSERT,e.substring(0,a)),new diff_match_patch.Diff(DIFF_EQUAL,n),new diff_match_patch.Diff(DIFF_INSERT,e.substring(a+n.length))],t.length>i.length&&(h[0][0]=h[2][0]=DIFF_DELETE),h):1==n.length?[new diff_match_patch.Diff(DIFF_DELETE,t),new diff_match_patch.Diff(DIFF_INSERT,i)]:(e=this.diff_halfMatch_(t,i))?(i=e[1],n=e[3],t=e[4],e=this.diff_main(e[0],e[2],h,f),h=this.diff_main(i,n,h,f),e.concat([new diff_match_patch.Diff(DIFF_EQUAL,t)],h)):h&&100h);d++){for(var u=-d+l;u<=d-g;u+=2){for(var m=n+u,F=u==-d||u!=d&&r[m-1]f)g+=2;else if(D>e)l+=2;else if(c&&(0<=(m=n+_-u)&&m=E)return this.diff_bisectSplit_(t,i,F,D,h)}}for(u=-d+o;u<=d-p;u+=2){for(m=n+u,F=(E=u==-d||u!=d&&s[m-1]f)p+=2;else if(F>e)o+=2;else if(!c&&(0<=(m=n+_-u)&&m=(E=f-E))))return this.diff_bisectSplit_(t,i,F,D,h)}}return[new diff_match_patch.Diff(DIFF_DELETE,t),new diff_match_patch.Diff(DIFF_INSERT,i)]},diff_match_patch.prototype.diff_bisectSplit_=function(t,i,h,f,e){var n=t.substring(0,h),a=i.substring(0,f);return t=t.substring(h),i=i.substring(f),n=this.diff_main(n,a,!1,e),e=this.diff_main(t,i,!1,e),n.concat(e)},diff_match_patch.prototype.diff_linesToChars_=function(t,i){function h(t){for(var i="",h=0,a=-1,r=f.length;af?t=t.substring(h-f):h=t.length?[f,e,a,r,c]:null}if(0>=this.Diff_Timeout)return null;var f=t.length>i.length?t:i,e=t.length>i.length?i:t;if(4>f.length||2*e.lengthf[4].length?a:f:a,t.length>i.length){f=a[0],e=a[1];var r=a[2],s=a[3]}else r=a[0],s=a[1],f=a[2],e=a[3];return[f,e,r,s,a[4]]},diff_match_patch.prototype.diff_cleanupSemantic=function(t){for(var i=!1,h=[],f=0,e=null,n=0,a=0,r=0,s=0,_=0;n=(e=this.diff_commonOverlap_(h,i))?(f>=i.length/2||f>=h.length/2)&&(t.splice(n,0,new diff_match_patch.Diff(DIFF_EQUAL,h.substring(0,f))),t[n-1][1]=i.substring(0,i.length-f),t[n+1][1]=h.substring(f),n++):(e>=i.length/2||e>=h.length/2)&&(t.splice(n,0,new diff_match_patch.Diff(DIFF_EQUAL,i.substring(0,e))),t[n-1][0]=DIFF_INSERT,t[n-1][1]=h.substring(0,h.length-e),t[n+1][0]=DIFF_DELETE,t[n+1][1]=i.substring(e),n++),n++),n++},diff_match_patch.prototype.diff_cleanupSemanticLossless=function(t){function i(t,i){if(!t||!i)return 6;var h=t.charAt(t.length-1),f=i.charAt(0),e=h.match(diff_match_patch.nonAlphaNumericRegex_),n=f.match(diff_match_patch.nonAlphaNumericRegex_),a=e&&h.match(diff_match_patch.whitespaceRegex_),r=n&&f.match(diff_match_patch.whitespaceRegex_);h=a&&h.match(diff_match_patch.linebreakRegex_),f=r&&f.match(diff_match_patch.linebreakRegex_);var s=h&&t.match(diff_match_patch.blanklineEndRegex_),_=f&&i.match(diff_match_patch.blanklineStartRegex_);return s||_?5:h||f?4:e&&!a&&r?3:a||r?2:e||n?1:0}for(var h=1;h=_&&(_=c,a=f,r=e,s=n)}t[h-1][1]!=a&&(a?t[h-1][1]=a:(t.splice(h-1,1),h--),t[h][1]=r,s?t[h+1][1]=s:(t.splice(h+1,1),h--))}h++}},diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,diff_match_patch.whitespaceRegex_=/\s/,diff_match_patch.linebreakRegex_=/[\r\n]/,diff_match_patch.blanklineEndRegex_=/\n\r?\n$/,diff_match_patch.blanklineStartRegex_=/^\r?\n\r?\n/,diff_match_patch.prototype.diff_cleanupEfficiency=function(t){for(var i=!1,h=[],f=0,e=null,n=0,a=!1,r=!1,s=!1,_=!1;ni));h++)n=f,a=e;return t.length!=h&&t[h][0]===DIFF_DELETE?a:a+(i-n)},diff_match_patch.prototype.diff_prettyHtml=function(t){for(var i=[],h=/&/g,f=//g,n=/\n/g,a=0;a");switch(r){case DIFF_INSERT:i[a]=''+s+"";break;case DIFF_DELETE:i[a]=''+s+"";break;case DIFF_EQUAL:i[a]=""+s+""}}return i.join("")},diff_match_patch.prototype.diff_text1=function(t){for(var i=[],h=0;hthis.Match_MaxBits)throw Error("Pattern too long for this browser.");var e=this.match_alphabet_(i),n=this,a=this.Match_Threshold,r=t.indexOf(i,h);-1!=r&&(a=Math.min(f(0,r),a),-1!=(r=t.lastIndexOf(i,h+i.length))&&(a=Math.min(f(0,r),a)));var s=1<=_;p--){var d=e[t.charAt(p-1)];if(c[p]=0===o?(c[p+1]<<1|1)&d:(c[p+1]<<1|1)&d|(l[p+1]|l[p])<<1|1|l[p+1],c[p]&s&&(d=f(o,p-1))<=a){if(a=d,!((r=p-1)>h))break;_=Math.max(1,2*h-r)}}if(f(o+1,h)>a)break;l=c}return r},diff_match_patch.prototype.match_alphabet_=function(t){for(var i={},h=0;h=2*this.Patch_Margin&&e&&(this.patch_addContext_(t,r),h.push(t),t=new diff_match_patch.patch_obj,e=0,r=f,n=a)}_!==DIFF_INSERT&&(n+=c.length),_!==DIFF_DELETE&&(a+=c.length)}return e&&(this.patch_addContext_(t,r),h.push(t)),h},diff_match_patch.prototype.patch_deepCopy=function(t){for(var i=[],h=0;hthis.Match_MaxBits){var _=this.match_main(i,r.substring(0,this.Match_MaxBits),a);-1!=_&&(-1==(s=this.match_main(i,r.substring(r.length-this.Match_MaxBits),a+r.length-this.Match_MaxBits))||_>=s)&&(_=-1)}else _=this.match_main(i,r,a);if(-1==_)e[n]=!1,f-=t[n].length2-t[n].length1;else if(e[n]=!0,f=_-a,r==(a=-1==s?i.substring(_,_+r.length):i.substring(_,s+this.Match_MaxBits)))i=i.substring(0,_)+this.diff_text2(t[n].diffs)+i.substring(_+r.length);else if(a=this.diff_main(r,a,!1),r.length>this.Match_MaxBits&&this.diff_levenshtein(a)/r.length>this.Patch_DeleteThreshold)e[n]=!1;else{var c;for(this.diff_cleanupSemanticLossless(a),r=0,s=0;se[0][1].length){var n=i-e[0][1].length;e[0][1]=h.substring(e[0][1].length)+e[0][1],f.start1-=n,f.start2-=n,f.length1+=n,f.length2+=n}return 0==(e=(f=t[t.length-1]).diffs).length||e[e.length-1][0]!=DIFF_EQUAL?(e.push(new diff_match_patch.Diff(DIFF_EQUAL,h)),f.length1+=i,f.length2+=i):i>e[e.length-1][1].length&&(n=i-e[e.length-1][1].length,e[e.length-1][1]+=h.substring(0,n),f.length1+=n,f.length2+=n),h},diff_match_patch.prototype.patch_splitMax=function(t){for(var i=this.Match_MaxBits,h=0;h2*i?(r.length1+=_.length,e+=_.length,s=!1,r.diffs.push(new diff_match_patch.Diff(a,_)),f.diffs.shift()):(_=_.substring(0,i-r.length1-this.Patch_Margin),r.length1+=_.length,e+=_.length,a===DIFF_EQUAL?(r.length2+=_.length,n+=_.length):s=!1,r.diffs.push(new diff_match_patch.Diff(a,_)),_==f.diffs[0][1]?f.diffs.shift():f.diffs[0][1]=f.diffs[0][1].substring(_.length))}a=(a=this.diff_text2(r.diffs)).substring(a.length-this.Patch_Margin),""!==(_=this.diff_text1(f.diffs).substring(0,this.Patch_Margin))&&(r.length1+=_.length,r.length2+=_.length,0!==r.diffs.length&&r.diffs[r.diffs.length-1][0]===DIFF_EQUAL?r.diffs[r.diffs.length-1][1]+=_:r.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL,_))),s||t.splice(++h,0,r)}}},diff_match_patch.prototype.patch_toText=function(t){for(var i=[],h=0;h=this.Diff_Timeout?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout),null==t||null==i)throw Error("Null input. (diff_main)");if(t==i)return t?[new diff_match_patch.Diff(DIFF_EQUAL,t)]:[];void 0===h&&(h=!0);var e=h,n=this.diff_commonPrefix(t,i);h=t.substring(0,n),t=t.substring(n),i=i.substring(n),n=this.diff_commonSuffix(t,i);var a=t.substring(t.length-n);return t=t.substring(0,t.length-n),i=i.substring(0,i.length-n),t=this.diff_compute_(t,i,e,f),h&&t.unshift(new diff_match_patch.Diff(DIFF_EQUAL,h)),a&&t.push(new diff_match_patch.Diff(DIFF_EQUAL,a)),this.diff_cleanupMerge(t),t},diff_match_patch.prototype.diff_compute_=function(t,i,h,f){if(!t)return[new diff_match_patch.Diff(DIFF_INSERT,i)];if(!i)return[new diff_match_patch.Diff(DIFF_DELETE,t)];var e=t.length>i.length?t:i,n=t.length>i.length?i:t,a=e.indexOf(n);return-1!=a?(h=[new diff_match_patch.Diff(DIFF_INSERT,e.substring(0,a)),new diff_match_patch.Diff(DIFF_EQUAL,n),new diff_match_patch.Diff(DIFF_INSERT,e.substring(a+n.length))],t.length>i.length&&(h[0][0]=h[2][0]=DIFF_DELETE),h):1==n.length?[new diff_match_patch.Diff(DIFF_DELETE,t),new diff_match_patch.Diff(DIFF_INSERT,i)]:(e=this.diff_halfMatch_(t,i))?(i=e[1],n=e[3],t=e[4],e=this.diff_main(e[0],e[2],h,f),h=this.diff_main(i,n,h,f),e.concat([new diff_match_patch.Diff(DIFF_EQUAL,t)],h)):h&&100h);d++){for(var u=-d+l;u<=d-g;u+=2){for(var m=n+u,F=u==-d||u!=d&&r[m-1]f)g+=2;else if(D>e)l+=2;else if(c&&(0<=(m=n+_-u)&&m=E)return this.diff_bisectSplit_(t,i,F,D,h)}}for(u=-d+o;u<=d-p;u+=2){for(m=n+u,F=(E=u==-d||u!=d&&s[m-1]f)p+=2;else if(F>e)o+=2;else if(!c&&(0<=(m=n+_-u)&&m=(E=f-E))))return this.diff_bisectSplit_(t,i,F,D,h)}}return[new diff_match_patch.Diff(DIFF_DELETE,t),new diff_match_patch.Diff(DIFF_INSERT,i)]},diff_match_patch.prototype.diff_bisectSplit_=function(t,i,h,f,e){var n=t.substring(0,h),a=i.substring(0,f);return t=t.substring(h),i=i.substring(f),n=this.diff_main(n,a,!1,e),e=this.diff_main(t,i,!1,e),n.concat(e)},diff_match_patch.prototype.diff_linesToChars_=function(t,i){function h(t){for(var i="",h=0,a=-1,r=f.length;af?t=t.substring(h-f):h=t.length?[f,e,a,r,c]:null}if(0>=this.Diff_Timeout)return null;var f=t.length>i.length?t:i,e=t.length>i.length?i:t;if(4>f.length||2*e.lengthf[4].length?a:f:a,t.length>i.length){f=a[0],e=a[1];var r=a[2],s=a[3]}else r=a[0],s=a[1],f=a[2],e=a[3];return[f,e,r,s,a[4]]},diff_match_patch.prototype.diff_cleanupSemantic=function(t){for(var i=!1,h=[],f=0,e=null,n=0,a=0,r=0,s=0,_=0;n=(e=this.diff_commonOverlap_(h,i))?(f>=i.length/2||f>=h.length/2)&&(t.splice(n,0,new diff_match_patch.Diff(DIFF_EQUAL,h.substring(0,f))),t[n-1][1]=i.substring(0,i.length-f),t[n+1][1]=h.substring(f),n++):(e>=i.length/2||e>=h.length/2)&&(t.splice(n,0,new diff_match_patch.Diff(DIFF_EQUAL,i.substring(0,e))),t[n-1][0]=DIFF_INSERT,t[n-1][1]=h.substring(0,h.length-e),t[n+1][0]=DIFF_DELETE,t[n+1][1]=i.substring(e),n++),n++),n++},diff_match_patch.prototype.diff_cleanupSemanticLossless=function(t){function i(t,i){if(!t||!i)return 6;var h=t.charAt(t.length-1),f=i.charAt(0),e=h.match(diff_match_patch.nonAlphaNumericRegex_),n=f.match(diff_match_patch.nonAlphaNumericRegex_),a=e&&h.match(diff_match_patch.whitespaceRegex_),r=n&&f.match(diff_match_patch.whitespaceRegex_);h=a&&h.match(diff_match_patch.linebreakRegex_),f=r&&f.match(diff_match_patch.linebreakRegex_);var s=h&&t.match(diff_match_patch.blanklineEndRegex_),_=f&&i.match(diff_match_patch.blanklineStartRegex_);return s||_?5:h||f?4:e&&!a&&r?3:a||r?2:e||n?1:0}for(var h=1;h=_&&(_=c,a=f,r=e,s=n)}t[h-1][1]!=a&&(a?t[h-1][1]=a:(t.splice(h-1,1),h--),t[h][1]=r,s?t[h+1][1]=s:(t.splice(h+1,1),h--))}h++}},diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,diff_match_patch.whitespaceRegex_=/\s/,diff_match_patch.linebreakRegex_=/[\r\n]/,diff_match_patch.blanklineEndRegex_=/\n\r?\n$/,diff_match_patch.blanklineStartRegex_=/^\r?\n\r?\n/,diff_match_patch.prototype.diff_cleanupEfficiency=function(t){for(var i=!1,h=[],f=0,e=null,n=0,a=!1,r=!1,s=!1,_=!1;ni));h++)n=f,a=e;return t.length!=h&&t[h][0]===DIFF_DELETE?a:a+(i-n)},diff_match_patch.prototype.diff_prettyHtml=function(t){for(var i=[],h=/&/g,f=//g,n=/\n/g,a=0;a");switch(r){case DIFF_INSERT:i[a]=''+s+"";break;case DIFF_DELETE:i[a]=''+s+"";break;case DIFF_EQUAL:i[a]=""+s+""}}return i.join("")},diff_match_patch.prototype.diff_text1=function(t){for(var i=[],h=0;hthis.Match_MaxBits)throw Error("Pattern too long for this browser.");var e=this.match_alphabet_(i),n=this,a=this.Match_Threshold,r=t.indexOf(i,h);-1!=r&&(a=Math.min(f(0,r),a),-1!=(r=t.lastIndexOf(i,h+i.length))&&(a=Math.min(f(0,r),a)));var s=1<=_;p--){var d=e[t.charAt(p-1)];if(c[p]=0===o?(c[p+1]<<1|1)&d:(c[p+1]<<1|1)&d|(l[p+1]|l[p])<<1|1|l[p+1],c[p]&s&&(d=f(o,p-1))<=a){if(a=d,!((r=p-1)>h))break;_=Math.max(1,2*h-r)}}if(f(o+1,h)>a)break;l=c}return r},diff_match_patch.prototype.match_alphabet_=function(t){for(var i={},h=0;h=2*this.Patch_Margin&&e&&(this.patch_addContext_(t,r),h.push(t),t=new diff_match_patch.patch_obj,e=0,r=f,n=a)}_!==DIFF_INSERT&&(n+=c.length),_!==DIFF_DELETE&&(a+=c.length)}return e&&(this.patch_addContext_(t,r),h.push(t)),h},diff_match_patch.prototype.patch_deepCopy=function(t){for(var i=[],h=0;hthis.Match_MaxBits){var _=this.match_main(i,r.substring(0,this.Match_MaxBits),a);-1!=_&&(-1==(s=this.match_main(i,r.substring(r.length-this.Match_MaxBits),a+r.length-this.Match_MaxBits))||_>=s)&&(_=-1)}else _=this.match_main(i,r,a);if(-1==_)e[n]=!1,f-=t[n].length2-t[n].length1;else if(e[n]=!0,f=_-a,r==(a=-1==s?i.substring(_,_+r.length):i.substring(_,s+this.Match_MaxBits)))i=i.substring(0,_)+this.diff_text2(t[n].diffs)+i.substring(_+r.length);else if(a=this.diff_main(r,a,!1),r.length>this.Match_MaxBits&&this.diff_levenshtein(a)/r.length>this.Patch_DeleteThreshold)e[n]=!1;else{var c;for(this.diff_cleanupSemanticLossless(a),r=0,s=0;se[0][1].length){var n=i-e[0][1].length;e[0][1]=h.substring(e[0][1].length)+e[0][1],f.start1-=n,f.start2-=n,f.length1+=n,f.length2+=n}return 0==(e=(f=t[t.length-1]).diffs).length||e[e.length-1][0]!=DIFF_EQUAL?(e.push(new diff_match_patch.Diff(DIFF_EQUAL,h)),f.length1+=i,f.length2+=i):i>e[e.length-1][1].length&&(n=i-e[e.length-1][1].length,e[e.length-1][1]+=h.substring(0,n),f.length1+=n,f.length2+=n),h},diff_match_patch.prototype.patch_splitMax=function(t){for(var i=this.Match_MaxBits,h=0;h2*i?(r.length1+=_.length,e+=_.length,s=!1,r.diffs.push(new diff_match_patch.Diff(a,_)),f.diffs.shift()):(_=_.substring(0,i-r.length1-this.Patch_Margin),r.length1+=_.length,e+=_.length,a===DIFF_EQUAL?(r.length2+=_.length,n+=_.length):s=!1,r.diffs.push(new diff_match_patch.Diff(a,_)),_==f.diffs[0][1]?f.diffs.shift():f.diffs[0][1]=f.diffs[0][1].substring(_.length))}a=(a=this.diff_text2(r.diffs)).substring(a.length-this.Patch_Margin),""!==(_=this.diff_text1(f.diffs).substring(0,this.Patch_Margin))&&(r.length1+=_.length,r.length2+=_.length,0!==r.diffs.length&&r.diffs[r.diffs.length-1][0]===DIFF_EQUAL?r.diffs[r.diffs.length-1][1]+=_:r.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL,_))),s||t.splice(++h,0,r)}}},diff_match_patch.prototype.patch_toText=function(t){for(var i=[],h=0;h