From e898822272c0aad5de38bdea28707c60365f29ec Mon Sep 17 00:00:00 2001
From: "13621160019@163.com" <13621160019@163.com>
Date: Tue, 17 Aug 2021 10:22:28 +0800
Subject: [PATCH] removed diff-match-patch library from Admin UI
---
.../angular-diff-match-patch.js | 212 ------------------
admin/js/plugins/diff_match_patch/COPYING | 177 ---------------
admin/js/plugins/diff_match_patch/README.txt | 43 ----
.../javascript/diff_match_patch.js | 49 ----
4 files changed, 481 deletions(-)
delete mode 100644 admin/js/plugins/angular-diff-match-patch/angular-diff-match-patch.js
delete mode 100644 admin/js/plugins/diff_match_patch/COPYING
delete mode 100644 admin/js/plugins/diff_match_patch/README.txt
delete mode 100644 admin/js/plugins/diff_match_patch/javascript/diff_match_patch.js
diff --git a/admin/js/plugins/angular-diff-match-patch/angular-diff-match-patch.js b/admin/js/plugins/angular-diff-match-patch/angular-diff-match-patch.js
deleted file mode 100644
index 2ca29808..00000000
--- a/admin/js/plugins/angular-diff-match-patch/angular-diff-match-patch.js
+++ /dev/null
@@ -1,212 +0,0 @@
-/* global DIFF_INSERT, DIFF_DELETE, DIFF_EQUAL, diff_match_patch */
-angular.module('diff-match-patch', [])
- .factory('dmp', function() {
-
- var displayType = {
- INSDEL: 0,
- LINEDIFF: 1
- };
-
- function diffClass(op) {
- switch(op) {
- case DIFF_INSERT: return 'ins';
- case DIFF_DELETE: return 'del';
- case DIFF_EQUAL: return 'match';
- }
- }
-
- function diffSymbol(op) {
- switch(op) {
- case DIFF_EQUAL: return ' ';
- case DIFF_INSERT: return '+';
- case DIFF_DELETE: return '-';
- }
- }
-
- function diffTag(op) {
- switch(op) {
- case DIFF_EQUAL: return 'span';
- case DIFF_INSERT: return 'ins';
- case DIFF_DELETE: return 'del';
- }
- }
-
- function getHtmlPrefix(op, display) {
- var retVal = '';
- switch(display) {
- case displayType.LINEDIFF:
- retVal = '
'+diffSymbol(op)+'';
- break;
- case displayType.INSDEL:
- retVal = '<'+diffTag(op)+'>';
- break;
- }
- return retVal;
- }
-
- function getHtmlSuffix(op, display) {
- var retVal = '';
- switch(display) {
- case displayType.LINEDIFF:
- retVal = '
';
- break;
- case displayType.INSDEL:
- retVal = ''+diffTag(op)+'>';
- break;
- }
- return retVal;
- }
-
- function createHtmlLines(text, op) {
- var lines = text.split('\n');
- for (var y = 0; y < lines.length; y++) {
- if (lines[y].length === 0) continue;
- lines[y] = getHtmlPrefix(op, displayType.LINEDIFF) + lines[y] + getHtmlSuffix(op, displayType.LINEDIFF);
- }
- return lines.join('');
- }
-
- function createHtmlFromDiffs(diffs, display) {
- var pattern_amp = /&/g;
- var pattern_lt = //g;
- for (var x = 0; x < diffs.length; x++) {
- var data = diffs[x][1];
- var text = data.replace(pattern_amp, '&')
- .replace(pattern_lt, '<')
- .replace(pattern_gt, '>');
- diffs[x][1] = text;
- }
-
- var html = [];
- for (var x = 0; x < diffs.length; x++) {
- var op = diffs[x][0];
- var text = diffs[x][1];
- if (display === displayType.LINEDIFF) {
- html[x] = createHtmlLines(text, op);
- } else {
- html[x] = getHtmlPrefix(op, display) + text + getHtmlSuffix(op, display);
- }
- }
- return html.join('');
- }
-
- function assertArgumentsIsStrings(left, right) {
- return angular.isString(left) && angular.isString(right);
- }
-
- return {
- createDiffHtml: function(left, right) {
- if (assertArgumentsIsStrings(left, right)) {
- var dmp = new diff_match_patch();
- var diffs = dmp.diff_main(left, right);
- return createHtmlFromDiffs(diffs, displayType.INSDEL);
- } else {
- return '';
- }
- },
-
- createProcessingDiffHtml: function(left, right) {
- if (assertArgumentsIsStrings(left, right)) {
- var dmp = new diff_match_patch();
- var diffs = dmp.diff_main(left, right);
- //dmp.Diff_EditCost = 4;
- dmp.diff_cleanupEfficiency(diffs);
- return createHtmlFromDiffs(diffs, displayType.INSDEL);
- } else {
- return '';
- }
- },
-
- createSemanticDiffHtml: function(left, right) {
- if (assertArgumentsIsStrings(left, right)) {
- var dmp = new diff_match_patch();
- var diffs = dmp.diff_main(left, right);
- dmp.diff_cleanupSemantic(diffs);
- return createHtmlFromDiffs(diffs, displayType.INSDEL);
- } else {
- return '';
- }
- },
-
- createLineDiffHtml: function(left, right) {
- if (assertArgumentsIsStrings(left, right)) {
- var dmp = new diff_match_patch();
- var a = dmp.diff_linesToChars_(left, right);
- var diffs = dmp.diff_main(a.chars1, a.chars2, false);
- dmp.diff_charsToLines_(diffs, a.lineArray);
- return createHtmlFromDiffs(diffs, displayType.LINEDIFF);
- } else {
- return '';
- }
- }
- };
- })
- .directive('diff', ['$compile', 'dmp', function factory($compile, dmp) {
- var ddo = {
- scope: {
- left: '=leftObj',
- right: '=rightObj'
- },
- link: function postLink(scope, iElement) {
- var listener = function() {
- iElement.html(dmp.createDiffHtml(scope.left, scope.right));
- $compile(iElement.contents())(scope);
- };
- scope.$watch('left', listener);
- scope.$watch('right', listener);
- }
- };
- return ddo;
- }])
- .directive('processingDiff', ['$compile', 'dmp', function factory($compile, dmp) {
- var ddo = {
- scope: {
- left: '=leftObj',
- right: '=rightObj'
- },
- link: function postLink(scope, iElement) {
- var listener = function() {
- iElement.html(dmp.createProcessingDiffHtml(scope.left, scope.right));
- $compile(iElement.contents())(scope);
- };
- scope.$watch('left', listener);
- scope.$watch('right', listener);
- }
- };
- return ddo;
- }])
- .directive('semanticDiff', ['$compile', 'dmp', function factory($compile, dmp) {
- var ddo = {
- scope: {
- left: '=leftObj',
- right: '=rightObj'
- },
- link: function postLink(scope, iElement) {
- var listener = function() {
- iElement.html(dmp.createSemanticDiffHtml(scope.left, scope.right));
- $compile(iElement.contents())(scope);
- };
- scope.$watch('left', listener);
- scope.$watch('right', listener);
- }
- };
- return ddo;
- }])
- .directive('lineDiff', ['$compile', 'dmp', function factory($compile, dmp) {
- var ddo = {
- scope: {
- left: '=leftObj',
- right: '=rightObj'
- },
- link: function postLink(scope, iElement) {
- var listener = function() {
- iElement.html(dmp.createLineDiffHtml(scope.left, scope.right));
- $compile(iElement.contents())(scope);
- };
- scope.$watch('left', listener);
- scope.$watch('right', listener);
- }
- };
- return ddo;
- }]);
\ No newline at end of file
diff --git a/admin/js/plugins/diff_match_patch/COPYING b/admin/js/plugins/diff_match_patch/COPYING
deleted file mode 100644
index f433b1a5..00000000
--- a/admin/js/plugins/diff_match_patch/COPYING
+++ /dev/null
@@ -1,177 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
diff --git a/admin/js/plugins/diff_match_patch/README.txt b/admin/js/plugins/diff_match_patch/README.txt
deleted file mode 100644
index 11eeb9c6..00000000
--- a/admin/js/plugins/diff_match_patch/README.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-Diff, Match and Patch Library
-http://code.google.com/p/google-diff-match-patch/
-Neil Fraser
-
-This library is currently available in seven different ports, all using the same API.
-Every version includes a full set of unit tests.
-
-C++:
-* Ported by Mike Slemmer.
-* Currently requires the Qt library.
-
-C#:
-* Ported by Matthaeus G. Chajdas.
-
-Dart:
-* The Dart language is still growing and evolving, so this port is only as
- stable as the underlying language.
-
-Java:
-* Included is both the source and a Maven package.
-
-JavaScript:
-* diff_match_patch_uncompressed.js is the human-readable version.
- Users of node.js should 'require' this uncompressed version since the
- compressed version is not guaranteed to work outside of a web browser.
-* diff_match_patch.js has been compressed using Google's internal JavaScript compressor.
- Non-Google hackers who wish to recompress the source can use:
- http://dean.edwards.name/packer/
-
-Lua:
-* Ported by Duncan Cross.
-* Does not support line-mode speedup.
-
-Objective C:
-* Ported by Jan Weiss.
-* Includes speed test (this is a separate bundle for other languages).
-
-Python:
-* Two versions, one for Python 2.x, the other for Python 3.x.
-* Runs 10x faster under PyPy than CPython.
-
-Demos:
-* Separate demos for Diff, Match and Patch in JavaScript.
diff --git a/admin/js/plugins/diff_match_patch/javascript/diff_match_patch.js b/admin/js/plugins/diff_match_patch/javascript/diff_match_patch.js
deleted file mode 100644
index c41b5132..00000000
--- a/admin/js/plugins/diff_match_patch/javascript/diff_match_patch.js
+++ /dev/null
@@ -1,49 +0,0 @@
-(function(){function diff_match_patch(){this.Diff_Timeout=1;this.Diff_EditCost=4;this.Match_Threshold=0.5;this.Match_Distance=1E3;this.Patch_DeleteThreshold=0.5;this.Patch_Margin=4;this.Match_MaxBits=32}
-diff_match_patch.prototype.diff_main=function(a,b,c,d){"undefined"==typeof d&&(d=0>=this.Diff_Timeout?Number.MAX_VALUE:(new Date).getTime()+1E3*this.Diff_Timeout);if(null==a||null==b)throw Error("Null input. (diff_main)");if(a==b)return a?[[0,a]]:[];"undefined"==typeof c&&(c=!0);var e=c,f=this.diff_commonPrefix(a,b);c=a.substring(0,f);a=a.substring(f);b=b.substring(f);var f=this.diff_commonSuffix(a,b),g=a.substring(a.length-f);a=a.substring(0,a.length-f);b=b.substring(0,b.length-f);a=this.diff_compute_(a,
-b,e,d);c&&a.unshift([0,c]);g&&a.push([0,g]);this.diff_cleanupMerge(a);return a};
-diff_match_patch.prototype.diff_compute_=function(a,b,c,d){if(!a)return[[1,b]];if(!b)return[[-1,a]];var e=a.length>b.length?a:b,f=a.length>b.length?b:a,g=e.indexOf(f);return-1!=g?(c=[[1,e.substring(0,g)],[0,f],[1,e.substring(g+f.length)]],a.length>b.length&&(c[0][0]=c[2][0]=-1),c):1==f.length?[[-1,a],[1,b]]:(e=this.diff_halfMatch_(a,b))?(f=e[0],a=e[1],g=e[2],b=e[3],e=e[4],f=this.diff_main(f,g,c,d),c=this.diff_main(a,b,c,d),f.concat([[0,e]],c)):c&&100c);v++){for(var n=-v+r;n<=v-t;n+=2){var l=g+n,m;m=n==-v||n!=v&&j[l-1]d)t+=2;else if(s>e)r+=2;else if(q&&(l=g+k-n,0<=l&&l=
-u)return this.diff_bisectSplit_(a,b,m,s,c)}}for(n=-v+p;n<=v-w;n+=2){l=g+n;u=n==-v||n!=v&&i[l-1]d)w+=2;else if(m>e)p+=2;else if(!q&&(l=g+k-n,0<=l&&(l=u)))return this.diff_bisectSplit_(a,b,m,s,c)}}return[[-1,a],[1,b]]};
-diff_match_patch.prototype.diff_bisectSplit_=function(a,b,c,d,e){var f=a.substring(0,c),g=b.substring(0,d);a=a.substring(c);b=b.substring(d);f=this.diff_main(f,g,!1,e);e=this.diff_main(a,b,!1,e);return f.concat(e)};
-diff_match_patch.prototype.diff_linesToChars_=function(a,b){function c(a){for(var b="",c=0,f=-1,g=d.length;fd?a=a.substring(c-d):c=a.length?[h,j,n,l,g]:null}if(0>=this.Diff_Timeout)return null;
-var d=a.length>b.length?a:b,e=a.length>b.length?b:a;if(4>d.length||2*e.lengthd[4].length?g:d:d:g;var j;a.length>b.length?(g=h[0],d=h[1],e=h[2],j=h[3]):(e=h[0],j=h[1],g=h[2],d=h[3]);h=h[4];return[g,d,e,j,h]};
-diff_match_patch.prototype.diff_cleanupSemantic=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=0,h=0,j=0,i=0;f=e){if(d>=b.length/2||d>=c.length/2)a.splice(f,0,[0,c.substring(0,d)]),a[f-1][1]=b.substring(0,b.length-d),a[f+1][1]=c.substring(d),f++}else if(e>=b.length/2||e>=c.length/2)a.splice(f,0,[0,b.substring(0,e)]),a[f-1][0]=1,a[f-1][1]=c.substring(0,c.length-e),a[f+1][0]=-1,a[f+1][1]=b.substring(e),f++;f++}f++}};
-diff_match_patch.prototype.diff_cleanupSemanticLossless=function(a){function b(a,b){if(!a||!b)return 6;var c=a.charAt(a.length-1),d=b.charAt(0),e=c.match(diff_match_patch.nonAlphaNumericRegex_),f=d.match(diff_match_patch.nonAlphaNumericRegex_),g=e&&c.match(diff_match_patch.whitespaceRegex_),h=f&&d.match(diff_match_patch.whitespaceRegex_),c=g&&c.match(diff_match_patch.linebreakRegex_),d=h&&d.match(diff_match_patch.linebreakRegex_),i=c&&a.match(diff_match_patch.blanklineEndRegex_),j=d&&b.match(diff_match_patch.blanklineStartRegex_);
-return i||j?5:c||d?4:e&&!g&&h?3:g||h?2:e||f?1:0}for(var c=1;c=i&&(i=k,g=d,h=e,j=f)}a[c-1][1]!=g&&(g?a[c-1][1]=g:(a.splice(c-1,1),c--),a[c][1]=
-h,j?a[c+1][1]=j:(a.splice(c+1,1),c--))}c++}};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(a){for(var b=!1,c=[],d=0,e=null,f=0,g=!1,h=!1,j=!1,i=!1;fb)break;e=c;f=d}return a.length!=g&&-1===a[g][0]?f:f+(b-e)};
-diff_match_patch.prototype.diff_prettyHtml=function(a){for(var b=[],c=/&/g,d=//g,f=/\n/g,g=0;g");switch(h){case 1:b[g]=''+j+"";break;case -1:b[g]=''+j+"";break;case 0:b[g]=""+j+""}}return b.join("")};
-diff_match_patch.prototype.diff_text1=function(a){for(var b=[],c=0;ci)throw Error("Invalid number in diff_fromDelta: "+h);h=a.substring(e,e+=i);"="==f[g].charAt(0)?c[d++]=[0,h]:c[d++]=[-1,h];break;default:if(f[g])throw Error("Invalid diff operation in diff_fromDelta: "+
-f[g]);}}if(e!=a.length)throw Error("Delta length ("+e+") does not equal source text length ("+a.length+").");return c};diff_match_patch.prototype.match_main=function(a,b,c){if(null==a||null==b||null==c)throw Error("Null input. (match_main)");c=Math.max(0,Math.min(c,a.length));return a==b?0:a.length?a.substring(c,c+b.length)==b?c:this.match_bitap_(a,b,c):-1};
-diff_match_patch.prototype.match_bitap_=function(a,b,c){function d(a,d){var e=a/b.length,g=Math.abs(c-d);return!f.Match_Distance?g?1:e:e+g/f.Match_Distance}if(b.length>this.Match_MaxBits)throw Error("Pattern too long for this browser.");var e=this.match_alphabet_(b),f=this,g=this.Match_Threshold,h=a.indexOf(b,c);-1!=h&&(g=Math.min(d(0,h),g),h=a.lastIndexOf(b,c+b.length),-1!=h&&(g=Math.min(d(0,h),g)));for(var j=1<=i;p--){var w=e[a.charAt(p-1)];k[p]=0===t?(k[p+1]<<1|1)&w:(k[p+1]<<1|1)&w|((r[p+1]|r[p])<<1|1)|r[p+1];if(k[p]&j&&(w=d(t,p-1),w<=g))if(g=w,h=p-1,h>c)i=Math.max(1,2*c-h);else break}if(d(t+1,c)>g)break;r=k}return h};
-diff_match_patch.prototype.match_alphabet_=function(a){for(var b={},c=0;c=2*this.Patch_Margin&&
-e&&(this.patch_addContext_(a,h),c.push(a),a=new diff_match_patch.patch_obj,e=0,h=d,f=g)}1!==i&&(f+=k.length);-1!==i&&(g+=k.length)}e&&(this.patch_addContext_(a,h),c.push(a));return c};diff_match_patch.prototype.patch_deepCopy=function(a){for(var b=[],c=0;cthis.Match_MaxBits){if(j=this.match_main(b,h.substring(0,this.Match_MaxBits),g),-1!=j&&(i=this.match_main(b,h.substring(h.length-this.Match_MaxBits),g+h.length-this.Match_MaxBits),-1==i||j>=i))j=-1}else j=this.match_main(b,h,g);
-if(-1==j)e[f]=!1,d-=a[f].length2-a[f].length1;else if(e[f]=!0,d=j-g,g=-1==i?b.substring(j,j+h.length):b.substring(j,i+this.Match_MaxBits),h==g)b=b.substring(0,j)+this.diff_text2(a[f].diffs)+b.substring(j+h.length);else if(g=this.diff_main(h,g,!1),h.length>this.Match_MaxBits&&this.diff_levenshtein(g)/h.length>this.Patch_DeleteThreshold)e[f]=!1;else{this.diff_cleanupSemanticLossless(g);for(var h=0,k,i=0;ie[0][1].length){var f=b-e[0][1].length;e[0][1]=c.substring(e[0][1].length)+e[0][1];d.start1-=f;d.start2-=f;d.length1+=f;d.length2+=f}d=a[a.length-1];e=d.diffs;0==e.length||0!=e[e.length-1][0]?(e.push([0,
-c]),d.length1+=b,d.length2+=b):b>e[e.length-1][1].length&&(f=b-e[e.length-1][1].length,e[e.length-1][1]+=c.substring(0,f),d.length1+=f,d.length2+=f);return c};
-diff_match_patch.prototype.patch_splitMax=function(a){for(var b=this.Match_MaxBits,c=0;c2*b?(h.length1+=i.length,e+=i.length,j=!1,h.diffs.push([g,i]),d.diffs.shift()):(i=i.substring(0,b-h.length1-this.Patch_Margin),h.length1+=i.length,e+=i.length,0===g?(h.length2+=i.length,f+=i.length):j=!1,h.diffs.push([g,i]),i==d.diffs[0][1]?d.diffs.shift():d.diffs[0][1]=d.diffs[0][1].substring(i.length))}g=this.diff_text2(h.diffs);g=g.substring(g.length-this.Patch_Margin);i=this.diff_text1(d.diffs).substring(0,this.Patch_Margin);""!==i&&
-(h.length1+=i.length,h.length2+=i.length,0!==h.diffs.length&&0===h.diffs[h.diffs.length-1][0]?h.diffs[h.diffs.length-1][1]+=i:h.diffs.push([0,i]));j||a.splice(++c,0,h)}}};diff_match_patch.prototype.patch_toText=function(a){for(var b=[],c=0;c