(function(){var a;function diff_match_patch(){function b(){for(var c=0,e=1,d=2;e!=d;){c++;e=d;d<<=1}return c}this.Diff_Timeout=1;this.Diff_EditCost=4;this.Diff_DualThreshold=32;this.Match_Threshold=0.5;this.Match_Distance=1E3;this.Patch_DeleteThreshold=0.5;this.Patch_Margin=4;this.Match_MaxBits=b()}a=diff_match_patch.prototype;
a.diff_main=function(b,c,e){if(b==c)return[[0,b]];if(typeof e=="undefined")e=true;var d=e,f=this.diff_commonPrefix(b,c);e=b.substring(0,f);b=b.substring(f);c=c.substring(f);f=this.diff_commonSuffix(b,c);var h=b.substring(b.length-f);b=b.substring(0,b.length-f);c=c.substring(0,c.length-f);b=this.diff_compute(b,c,d);e&&b.unshift([0,e]);h&&b.push([0,h]);this.diff_cleanupMerge(b);return b};
a.diff_compute=function(b,c,e){var d;if(!b)return[[1,c]];if(!c)return[[-1,b]];d=b.length>c.length?b:c;var f=b.length>c.length?c:b,h=d.indexOf(f);if(h!=-1){d=[[1,d.substring(0,h)],[0,f],[1,d.substring(h+f.length)]];if(b.length>c.length)d[0][0]=d[2][0]=-1;return d}if(d=this.diff_halfMatch(b,c)){var g=d[0];b=d[1];f=d[2];c=d[3];d=d[4];g=this.diff_main(g,f,e);e=this.diff_main(b,c,e);return g.concat([[0,d]],e)}if(e&&(b.length<100||c.length<100))e=false;if(e){g=this.diff_linesToChars(b,c);b=g[0];c=g[1];
g=g[2]}(d=this.diff_map(b,c))||(d=[[-1,b],[1,c]]);if(e){this.diff_charsToLines(d,g);this.diff_cleanupSemantic(d);d.push([0,""]);c=b=e=0;for(f=g="";e<d.length;){switch(d[e][0]){case 1:c++;f+=d[e][1];break;case -1:b++;g+=d[e][1];break;case 0:if(b>=1&&c>=1){g=this.diff_main(g,f,false);d.splice(e-b-c,b+c);e=e-b-c;for(b=g.length-1;b>=0;b--)d.splice(e,0,g[b]);e+=g.length}b=c=0;f=g="";break}e++}d.pop()}return d};
a.diff_linesToChars=function(b,c){function e(h){for(var g="",i=0,k=-1,j=d.length;k<h.length-1;){k=h.indexOf("\n",i);if(k==-1)k=h.length-1;var l=h.substring(i,k+1);i=k+1;if(f.hasOwnProperty?f.hasOwnProperty(l):f[l]!==undefined)g+=String.fromCharCode(f[l]);else{g+=String.fromCharCode(j);f[l]=j;d[j++]=l}}return g}var d=[],f={};d[0]="";b=e(b);c=e(c);return[b,c,d]};a.diff_charsToLines=function(b,c){for(var e=0;e<b.length;e++){for(var d=b[e][1],f=[],h=0;h<d.length;h++)f[h]=c[d.charCodeAt(h)];b[e][1]=f.join("")}};
a.diff_map=function(b,c){var e=(new Date).getTime()+this.Diff_Timeout*1E3,d=b.length,f=c.length,h=d+f-1,g=this.Diff_DualThreshold*2<h,i=[],k=[],j={},l={};j[1]=0;l[1]=0;for(var m,o,p,n={},u=false,s=!!n.hasOwnProperty,r=(d+f)%2,q=0;q<h;q++){if(this.Diff_Timeout>0&&(new Date).getTime()>e)return null;i[q]={};for(var t=-q;t<=q;t+=2){m=t==-q||t!=q&&j[t-1]<j[t+1]?j[t+1]:j[t-1]+1;o=m-t;if(g){p=m+","+o;if(r&&(s?n.hasOwnProperty(p):n[p]!==undefined))u=true;r||(n[p]=q)}for(;!u&&m<d&&o<f&&b.charAt(m)==c.charAt(o);){m++;
o++;if(g){p=m+","+o;if(r&&(s?n.hasOwnProperty(p):n[p]!==undefined))u=true;r||(n[p]=q)}}j[t]=m;i[q][m+","+o]=true;if(m==d&&o==f)return this.diff_path1(i,b,c);else if(u){k=k.slice(0,n[p]+1);e=this.diff_path1(i,b.substring(0,m),c.substring(0,o));return e.concat(this.diff_path2(k,b.substring(m),c.substring(o)))}}if(g){k[q]={};for(t=-q;t<=q;t+=2){m=t==-q||t!=q&&l[t-1]<l[t+1]?l[t+1]:l[t-1]+1;o=m-t;p=d-m+","+(f-o);if(!r&&(s?n.hasOwnProperty(p):n[p]!==undefined))u=true;if(r)n[p]=q;for(;!u&&m<d&&o<f&&b.charAt(d-
m-1)==c.charAt(f-o-1);){m++;o++;p=d-m+","+(f-o);if(!r&&(s?n.hasOwnProperty(p):n[p]!==undefined))u=true;if(r)n[p]=q}l[t]=m;k[q][m+","+o]=true;if(u){i=i.slice(0,n[p]+1);e=this.diff_path1(i,b.substring(0,d-m),c.substring(0,f-o));return e.concat(this.diff_path2(k,b.substring(d-m),c.substring(f-o)))}}}}return null};
a.diff_path1=function(b,c,e){for(var d=[],f=c.length,h=e.length,g=null,i=b.length-2;i>=0;i--)for(;1;)if(b[i].hasOwnProperty?b[i].hasOwnProperty(f-1+","+h):b[i][f-1+","+h]!==undefined){f--;if(g===-1)d[0][1]=c.charAt(f)+d[0][1];else d.unshift([-1,c.charAt(f)]);g=-1;break}else if(b[i].hasOwnProperty?b[i].hasOwnProperty(f+","+(h-1)):b[i][f+","+(h-1)]!==undefined){h--;if(g===1)d[0][1]=e.charAt(h)+d[0][1];else d.unshift([1,e.charAt(h)]);g=1;break}else{f--;h--;if(g===0)d[0][1]=c.charAt(f)+d[0][1];else d.unshift([0,
c.charAt(f)]);g=0}return d};
a.diff_path2=function(b,c,e){for(var d=[],f=0,h=c.length,g=e.length,i=null,k=b.length-2;k>=0;k--)for(;1;)if(b[k].hasOwnProperty?b[k].hasOwnProperty(h-1+","+g):b[k][h-1+","+g]!==undefined){h--;if(i===-1)d[f-1][1]+=c.charAt(c.length-h-1);else d[f++]=[-1,c.charAt(c.length-h-1)];i=-1;break}else if(b[k].hasOwnProperty?b[k].hasOwnProperty(h+","+(g-1)):b[k][h+","+(g-1)]!==undefined){g--;if(i===1)d[f-1][1]+=e.charAt(e.length-g-1);else d[f++]=[1,e.charAt(e.length-g-1)];i=1;break}else{h--;g--;if(i===0)d[f-
1][1]+=c.charAt(c.length-h-1);else d[f++]=[0,c.charAt(c.length-h-1)];i=0}return d};a.diff_commonPrefix=function(b,c){if(!b||!c||b.charCodeAt(0)!==c.charCodeAt(0))return 0;for(var e=0,d=Math.min(b.length,c.length),f=d,h=0;e<f;){if(b.substring(h,f)==c.substring(h,f))h=e=f;else d=f;f=Math.floor((d-e)/2+e)}return f};
a.diff_commonSuffix=function(b,c){if(!b||!c||b.charCodeAt(b.length-1)!==c.charCodeAt(c.length-1))return 0;for(var e=0,d=Math.min(b.length,c.length),f=d,h=0;e<f;){if(b.substring(b.length-f,b.length-h)==c.substring(c.length-f,c.length-h))h=e=f;else d=f;f=Math.floor((d-e)/2+e)}return f};
a.diff_halfMatch=function(b,c){function e(i,k,j){for(var l=i.substring(j,j+Math.floor(i.length/4)),m=-1,o="",p,n,u,s;(m=k.indexOf(l,m+1))!=-1;){var r=h.diff_commonPrefix(i.substring(j),k.substring(m)),q=h.diff_commonSuffix(i.substring(0,j),k.substring(0,m));if(o.length<q+r){o=k.substring(m-q,m)+k.substring(m,m+r);p=i.substring(0,j-q);n=i.substring(j+r);u=k.substring(0,m-q);s=k.substring(m+r)}}return o.length>=i.length/2?[p,n,u,s,o]:null}var d=b.length>c.length?b:c,f=b.length>c.length?c:b;if(d.length<
10||f.length<1)return null;var h=this,g=e(d,f,Math.ceil(d.length/4));d=e(d,f,Math.ceil(d.length/2));if(!g&&!d)return null;else g=d?g?g[4].length>d[4].length?g:d:d:g;if(b.length>c.length){b=g[0];c=g[1];d=g[2];f=g[3]}else{d=g[0];f=g[1];b=g[2];c=g[3]}g=g[4];return[b,c,d,f,g]};
a.diff_cleanupSemantic=function(b){for(var c=false,e=[],d=0,f=null,h=0,g=0,i=0;h<b.length;){if(b[h][0]==0){e[d++]=h;g=i;i=0;f=b[h][1]}else{i+=b[h][1].length;if(f!==null&&f.length<=g&&f.length<=i){b.splice(e[d-1],0,[-1,f]);b[e[d-1]+1][0]=1;d--;d--;h=d>0?e[d-1]:-1;i=g=0;f=null;c=true}}h++}c&&this.diff_cleanupMerge(b);this.diff_cleanupSemanticLossless(b)};
a.diff_cleanupSemanticLossless=function(b){function c(s,r){if(!s||!r)return 5;var q=0;if(s.charAt(s.length-1).match(e)||r.charAt(0).match(e)){q++;if(s.charAt(s.length-1).match(d)||r.charAt(0).match(d)){q++;if(s.charAt(s.length-1).match(f)||r.charAt(0).match(f)){q++;if(s.match(h)||r.match(g))q++}}}return q}for(var e=/[^a-zA-Z0-9]/,d=/\s/,f=/[\r\n]/,h=/\n\r?\n$/,g=/^\r?\n\r?\n/,i=1;i<b.length-1;){if(b[i-1][0]==0&&b[i+1][0]==0){var k=b[i-1][1],j=b[i][1],l=b[i+1][1],m=this.diff_commonSuffix(k,j);if(m){var o=
j.substring(j.length-m);k=k.substring(0,k.length-m);j=o+j.substring(0,j.length-m);l=o+l}m=k;o=j;for(var p=l,n=c(k,j)+c(j,l);j.charAt(0)===l.charAt(0);){k+=j.charAt(0);j=j.substring(1)+l.charAt(0);l=l.substring(1);var u=c(k,j)+c(j,l);if(u>=n){n=u;m=k;o=j;p=l}}if(b[i-1][1]!=m){if(m)b[i-1][1]=m;else{b.splice(i-1,1);i--}b[i][1]=o;if(p)b[i+1][1]=p;else{b.splice(i+1,1);i--}}}i++}};
a.diff_cleanupEfficiency=function(b){for(var c=false,e=[],d=0,f="",h=0,g=false,i=false,k=false,j=false;h<b.length;){if(b[h][0]==0){if(b[h][1].length<this.Diff_EditCost&&(k||j)){e[d++]=h;g=k;i=j;f=b[h][1]}else{d=0;f=""}k=j=false}else{if(b[h][0]==-1)j=true;else k=true;if(f&&(g&&i&&k&&j||f.length<this.Diff_EditCost/2&&g+i+k+j==3)){b.splice(e[d-1],0,[-1,f]);b[e[d-1]+1][0]=1;d--;f="";if(g&&i){k=j=true;d=0}else{d--;h=d>0?e[d-1]:-1;k=j=false}c=true}}h++}c&&this.diff_cleanupMerge(b)};
a.diff_cleanupMerge=function(b){b.push([0,""]);for(var c=0,e=0,d=0,f="",h="",g;c<b.length;)switch(b[c][0]){case 1:d++;h+=b[c][1];c++;break;case -1:e++;f+=b[c][1];c++;break;case 0:if(e!==0||d!==0){if(e!==0&&d!==0){g=this.diff_commonPrefix(h,f);if(g!==0){if(c-e-d>0&&b[c-e-d-1][0]==0)b[c-e-d-1][1]+=h.substring(0,g);else{b.splice(0,0,[0,h.substring(0,g)]);c++}h=h.substring(g);f=f.substring(g)}g=this.diff_commonSuffix(h,f);if(g!==0){b[c][1]=h.substring(h.length-g)+b[c][1];h=h.substring(0,h.length-g);f=
f.substring(0,f.length-g)}}if(e===0)b.splice(c-e-d,e+d,[1,h]);else d===0?b.splice(c-e-d,e+d,[-1,f]):b.splice(c-e-d,e+d,[-1,f],[1,h]);c=c-e-d+(e?1:0)+(d?1:0)+1}else if(c!==0&&b[c-1][0]==0){b[c-1][1]+=b[c][1];b.splice(c,1)}else c++;e=d=0;h=f="";break}b[b.length-1][1]===""&&b.pop();e=false;for(c=1;c<b.length-1;){if(b[c-1][0]==0&&b[c+1][0]==0)if(b[c][1].substring(b[c][1].length-b[c-1][1].length)==b[c-1][1]){b[c][1]=b[c-1][1]+b[c][1].substring(0,b[c][1].length-b[c-1][1].length);b[c+1][1]=b[c-1][1]+b[c+
1][1];b.splice(c-1,1);e=true}else if(b[c][1].substring(0,b[c+1][1].length)==b[c+1][1]){b[c-1][1]+=b[c+1][1];b[c][1]=b[c][1].substring(b[c+1][1].length)+b[c+1][1];b.splice(c+1,1);e=true}c++}e&&this.diff_cleanupMerge(b)};a.diff_xIndex=function(b,c){var e=0,d=0,f=0,h=0,g;for(g=0;g<b.length;g++){if(b[g][0]!==1)e+=b[g][1].length;if(b[g][0]!==-1)d+=b[g][1].length;if(e>c)break;f=e;h=d}if(b.length!=g&&b[g][0]===-1)return h;return h+(c-f)};
a.diff_prettyHtml=function(b){for(var c=[],e=0,d=0;d<b.length;d++){var f=b[d][0],h=b[d][1],g=h.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"&para;<BR>");switch(f){case 1:c[d]='<INS STYLE="background:#E6FFE6;" TITLE="i='+e+'">'+g+"</INS>";break;case -1:c[d]='<DEL STYLE="background:#FFE6E6;" TITLE="i='+e+'">'+g+"</DEL>";break;case 0:c[d]='<SPAN TITLE="i='+e+'">'+g+"</SPAN>";break}if(f!==-1)e+=h.length}return c.join("")};
a.diff_text1=function(b){for(var c=[],e=0;e<b.length;e++)if(b[e][0]!==1)c[e]=b[e][1];return c.join("")};a.diff_text2=function(b){for(var c=[],e=0;e<b.length;e++)if(b[e][0]!==-1)c[e]=b[e][1];return c.join("")};a.diff_levenshtein=function(b){for(var c=0,e=0,d=0,f=0;f<b.length;f++){var h=b[f][0],g=b[f][1];switch(h){case 1:e+=g.length;break;case -1:d+=g.length;break;case 0:c+=Math.max(e,d);d=e=0;break}}c+=Math.max(e,d);return c};
a.diff_toDelta=function(b){for(var c=[],e=0;e<b.length;e++)switch(b[e][0]){case 1:c[e]="+"+encodeURI(b[e][1]);break;case -1:c[e]="-"+b[e][1].length;break;case 0:c[e]="="+b[e][1].length;break}return c.join("\t").replace(/\x00/g,"%00").replace(/%20/g," ")};
a.diff_fromDelta=function(b,c){var e=[],d=0,f=0;c=c.replace(/%00/g,"\u0000");c=c.split(/\t/g);for(var h=0;h<c.length;h++){var g=c[h].substring(1);switch(c[h].charAt(0)){case "+":try{e[d++]=[1,decodeURI(g)]}catch(i){throw new Error("Illegal escape in diff_fromDelta: "+g);}break;case "-":case "=":var k=parseInt(g,10);if(isNaN(k)||k<0)throw new Error("Invalid number in diff_fromDelta: "+g);g=b.substring(f,f+=k);if(c[h].charAt(0)=="=")e[d++]=[0,g];else e[d++]=[-1,g];break;default:if(c[h])throw new Error("Invalid diff operation in diff_fromDelta: "+
c[h]);}}if(f!=b.length)throw new Error("Delta length ("+f+") does not equal source text length ("+b.length+").");return e};a.match_main=function(b,c,e){e=Math.max(0,Math.min(e,b.length));return b==c?0:b.length?b.substring(e,e+c.length)==c?e:this.match_bitap(b,c,e):-1};
a.match_bitap=function(b,c,e){function d(s,r){s=s/c.length;r=Math.abs(e-r);if(!h.Match_Distance)return r?1:s;return s+r/h.Match_Distance}if(c.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var f=this.match_alphabet(c),h=this,g=this.Match_Threshold,i=b.indexOf(c,e);if(i!=-1){g=Math.min(d(0,i),g);i=b.lastIndexOf(c,e+c.length);if(i!=-1)g=Math.min(d(0,i),g)}var k=1<<c.length-1;i=-1;for(var j,l,m=c.length+b.length,o,p=0;p<c.length;p++){j=0;for(l=m;j<l;){if(d(p,e+l)<=g)j=
l;else m=l;l=Math.floor((m-j)/2+j)}m=l;j=Math.max(1,e-l+1);var n=Math.min(e+l,b.length)+c.length;l=Array(n+2);l[n+1]=(1<<p)-1;for(n=n;n>=j;n--){var u=f[b.charAt(n-1)];l[n]=p===0?(l[n+1]<<1|1)&u:(l[n+1]<<1|1)&u|(o[n+1]|o[n])<<1|1|o[n+1];if(l[n]&k){u=d(p,n-1);if(u<=g){g=u;i=n-1;if(i>e)j=Math.max(1,2*e-i);else break}}}if(d(p+1,e)>g)break;o=l}return i};a.match_alphabet=function(b){for(var c={},e=0;e<b.length;e++)c[b.charAt(e)]=0;for(e=0;e<b.length;e++)c[b.charAt(e)]|=1<<b.length-e-1;return c};
a.patch_addContext=function(b,c){if(c.length!=0){for(var e=c.substring(b.start2,b.start2+b.length1),d=0;c.indexOf(e)!=c.lastIndexOf(e)&&e.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;){d+=this.Patch_Margin;e=c.substring(b.start2-d,b.start2+b.length1+d)}d+=this.Patch_Margin;(e=c.substring(b.start2-d,b.start2))&&b.diffs.unshift([0,e]);(c=c.substring(b.start2+b.length1,b.start2+b.length1+d))&&b.diffs.push([0,c]);b.start1-=e.length;b.start2-=e.length;b.length1+=e.length+c.length;b.length2+=
e.length+c.length}};
a.patch_make=function(b,c,e){var d;if(typeof b=="string"&&typeof c=="string"&&typeof e=="undefined"){d=b;c=this.diff_main(d,c,true);if(c.length>2){this.diff_cleanupSemantic(c);this.diff_cleanupEfficiency(c)}}else if(typeof b=="object"&&typeof c=="undefined"&&typeof e=="undefined"){c=b;d=this.diff_text1(c)}else if(typeof b=="string"&&typeof c=="object"&&typeof e=="undefined"){d=b;c=c}else if(typeof b=="string"&&typeof c=="string"&&typeof e=="object"){d=b;c=e}else throw new Error("Unknown call format to patch_make.");if(c.length===
0)return[];e=[];b=new patch_obj;var f=0,h=0,g=0,i=d;d=d;for(var k=0;k<c.length;k++){var j=c[k][0],l=c[k][1];if(!f&&j!==0){b.start1=h;b.start2=g}switch(j){case 1:b.diffs[f++]=c[k];b.length2+=l.length;d=d.substring(0,g)+l+d.substring(g);break;case -1:b.length1+=l.length;b.diffs[f++]=c[k];d=d.substring(0,g)+d.substring(g+l.length);break;case 0:if(l.length<=2*this.Patch_Margin&&f&&c.length!=k+1){b.diffs[f++]=c[k];b.length1+=l.length;b.length2+=l.length}else if(l.length>=2*this.Patch_Margin)if(f){this.patch_addContext(b,
i);e.push(b);b=new patch_obj;f=0;i=d;h=g}break}if(j!==1)h+=l.length;if(j!==-1)g+=l.length}if(f){this.patch_addContext(b,i);e.push(b)}return e};a.patch_deepCopy=function(b){for(var c=[],e=0;e<b.length;e++){var d=b[e],f=new patch_obj;f.diffs=[];for(var h=0;h<d.diffs.length;h++)f.diffs[h]=d.diffs[h].slice();f.start1=d.start1;f.start2=d.start2;f.length1=d.length1;f.length2=d.length2;c[e]=f}return c};
a.patch_apply=function(b,c){if(b.length==0)return[c,[]];b=this.patch_deepCopy(b);var e=this.patch_addPadding(b);c=e+c+e;this.patch_splitMax(b);for(var d=0,f=[],h=0;h<b.length;h++){var g=b[h].start2+d,i=this.diff_text1(b[h].diffs),k,j=-1;if(i.length>this.Match_MaxBits){k=this.match_main(c,i.substring(0,this.Match_MaxBits),g);if(k!=-1){j=this.match_main(c,i.substring(i.length-this.Match_MaxBits),g+i.length-this.Match_MaxBits);if(j==-1||k>=j)k=-1}}else k=this.match_main(c,i,g);if(k==-1){f[h]=false;d-=
b[h].length2-b[h].length1}else{f[h]=true;d=k-g;g=j==-1?c.substring(k,k+i.length):c.substring(k,j+this.Match_MaxBits);if(i==g)c=c.substring(0,k)+this.diff_text2(b[h].diffs)+c.substring(k+i.length);else{g=this.diff_main(i,g,false);if(i.length>this.Match_MaxBits&&this.diff_levenshtein(g)/i.length>this.Patch_DeleteThreshold)f[h]=false;else{this.diff_cleanupSemanticLossless(g);i=0;var l;for(j=0;j<b[h].diffs.length;j++){var m=b[h].diffs[j];if(m[0]!==0)l=this.diff_xIndex(g,i);if(m[0]===1)c=c.substring(0,
k+l)+m[1]+c.substring(k+l);else if(m[0]===-1)c=c.substring(0,k+l)+c.substring(k+this.diff_xIndex(g,i+m[1].length));if(m[0]!==-1)i+=m[1].length}}}}}c=c.substring(e.length,c.length-e.length);return[c,f]};
a.patch_addPadding=function(b){for(var c=this.Patch_Margin,e="",d=1;d<=c;d++)e+=String.fromCharCode(d);for(d=0;d<b.length;d++){b[d].start1+=c;b[d].start2+=c}d=b[0];var f=d.diffs;if(f.length==0||f[0][0]!=0){f.unshift([0,e]);d.start1-=c;d.start2-=c;d.length1+=c;d.length2+=c}else if(c>f[0][1].length){var h=c-f[0][1].length;f[0][1]=e.substring(f[0][1].length)+f[0][1];d.start1-=h;d.start2-=h;d.length1+=h;d.length2+=h}d=b[b.length-1];f=d.diffs;if(f.length==0||f[f.length-1][0]!=0){f.push([0,e]);d.length1+=
c;d.length2+=c}else if(c>f[f.length-1][1].length){h=c-f[f.length-1][1].length;f[f.length-1][1]+=e.substring(0,h);d.length1+=h;d.length2+=h}return e};
a.patch_splitMax=function(b){for(var c=0;c<b.length;c++)if(b[c].length1>this.Match_MaxBits){var e=b[c];b.splice(c--,1);for(var d=this.Match_MaxBits,f=e.start1,h=e.start2,g="";e.diffs.length!==0;){var i=new patch_obj,k=true;i.start1=f-g.length;i.start2=h-g.length;if(g!==""){i.length1=i.length2=g.length;i.diffs.push([0,g])}for(;e.diffs.length!==0&&i.length1<d-this.Patch_Margin;){g=e.diffs[0][0];var j=e.diffs[0][1];if(g===1){i.length2+=j.length;h+=j.length;i.diffs.push(e.diffs.shift());k=false}else if(g===
-1&&i.diffs.length==1&&i.diffs[0][0]==0&&j.length>2*d){i.length1+=j.length;f+=j.length;k=false;i.diffs.push([g,j]);e.diffs.shift()}else{j=j.substring(0,d-i.length1-this.Patch_Margin);i.length1+=j.length;f+=j.length;if(g===0){i.length2+=j.length;h+=j.length}else k=false;i.diffs.push([g,j]);if(j==e.diffs[0][1])e.diffs.shift();else e.diffs[0][1]=e.diffs[0][1].substring(j.length)}}g=this.diff_text2(i.diffs);g=g.substring(g.length-this.Patch_Margin);j=this.diff_text1(e.diffs).substring(0,this.Patch_Margin);
if(j!==""){i.length1+=j.length;i.length2+=j.length;if(i.diffs.length!==0&&i.diffs[i.diffs.length-1][0]===0)i.diffs[i.diffs.length-1][1]+=j;else i.diffs.push([0,j])}k||b.splice(++c,0,i)}}};a.patch_toText=function(b){for(var c=[],e=0;e<b.length;e++)c[e]=b[e];return c.join("")};
a.patch_fromText=function(b){var c=[];if(!b)return c;b=b.replace(/%00/g,"\u0000");b=b.split("\n");for(var e=0;e<b.length;){var d=b[e].match(/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/);if(!d)throw new Error("Invalid patch string: "+b[e]);var f=new patch_obj;c.push(f);f.start1=parseInt(d[1],10);if(d[2]===""){f.start1--;f.length1=1}else if(d[2]=="0")f.length1=0;else{f.start1--;f.length1=parseInt(d[2],10)}f.start2=parseInt(d[3],10);if(d[4]===""){f.start2--;f.length2=1}else if(d[4]=="0")f.length2=0;else{f.start2--;
f.length2=parseInt(d[4],10)}for(e++;e<b.length;){d=b[e].charAt(0);try{var h=decodeURI(b[e].substring(1))}catch(g){throw new Error("Illegal escape in patch_fromText: "+h);}if(d=="-")f.diffs.push([-1,h]);else if(d=="+")f.diffs.push([1,h]);else if(d==" ")f.diffs.push([0,h]);else if(d=="@")break;else if(d!=="")throw new Error('Invalid patch mode "'+d+'" in: '+h);e++}}return c};function patch_obj(){this.diffs=[];this.start2=this.start1=null;this.length2=this.length1=0}
patch_obj.prototype.toString=function(){var b,c;b=this.length1===0?this.start1+",0":this.length1==1?this.start1+1:this.start1+1+","+this.length1;c=this.length2===0?this.start2+",0":this.length2==1?this.start2+1:this.start2+1+","+this.length2;b=["@@ -"+b+" +"+c+" @@\n"];var e;for(c=0;c<this.diffs.length;c++){switch(this.diffs[c][0]){case 1:e="+";break;case -1:e="-";break;case 0:e=" ";break}b[c+1]=e+encodeURI(this.diffs[c][1])+"\n"}return b.join("").replace(/\x00/g,"%00").replace(/%20/g," ")};
window.diff_match_patch=diff_match_patch;window.patch_obj=patch_obj;window.DIFF_DELETE=-1;window.DIFF_INSERT=1;window.DIFF_EQUAL=0;})()
