%PDF- %PDF-
Direktori : /var/www/projetos/suporte.iigd.com.br.old/public/lib/ |
Current File : /var/www/projetos/suporte.iigd.com.br.old/public/lib/jquery-prettytextdiff.min.js |
(()=>{var t={427:t=>{var e=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};var r=-1;var i=1;var n=0;e.Diff=function(t,e){return[t,e]};e.prototype.diff_main=function(t,r,i,a){if(typeof a=="undefined"){if(this.Diff_Timeout<=0){a=Number.MAX_VALUE}else{a=(new Date).getTime()+this.Diff_Timeout*1e3}}var f=a;if(t==null||r==null){throw new Error("Null input. (diff_main)")}if(t==r){if(t){return[new e.Diff(n,t)]}return[]}if(typeof i=="undefined"){i=true}var s=i;var h=this.diff_commonPrefix(t,r);var l=t.substring(0,h);t=t.substring(h);r=r.substring(h);h=this.diff_commonSuffix(t,r);var g=t.substring(t.length-h);t=t.substring(0,t.length-h);r=r.substring(0,r.length-h);var o=this.diff_compute_(t,r,s,f);if(l){o.unshift(new e.Diff(n,l))}if(g){o.push(new e.Diff(n,g))}this.diff_cleanupMerge(o);return o};e.prototype.diff_compute_=function(t,a,f,s){var h;if(!t){return[new e.Diff(i,a)]}if(!a){return[new e.Diff(r,t)]}var l=t.length>a.length?t:a;var g=t.length>a.length?a:t;var o=l.indexOf(g);if(o!=-1){h=[new e.Diff(i,l.substring(0,o)),new e.Diff(n,g),new e.Diff(i,l.substring(o+g.length))];if(t.length>a.length){h[0][0]=h[2][0]=r}return h}if(g.length==1){return[new e.Diff(r,t),new e.Diff(i,a)]}var u=this.diff_halfMatch_(t,a);if(u){var c=u[0];var v=u[1];var p=u[2];var d=u[3];var _=u[4];var b=this.diff_main(c,p,f,s);var m=this.diff_main(v,d,f,s);return b.concat([new e.Diff(n,_)],m)}if(f&&t.length>100&&a.length>100){return this.diff_lineMode_(t,a,s)}return this.diff_bisect_(t,a,s)};e.prototype.diff_lineMode_=function(t,a,f){var s=this.diff_linesToChars_(t,a);t=s.chars1;a=s.chars2;var h=s.lineArray;var l=this.diff_main(t,a,false,f);this.diff_charsToLines_(l,h);this.diff_cleanupSemantic(l);l.push(new e.Diff(n,""));var g=0;var o=0;var u=0;var c="";var v="";while(g<l.length){switch(l[g][0]){case i:u++;v+=l[g][1];break;case r:o++;c+=l[g][1];break;case n:if(o>=1&&u>=1){l.splice(g-o-u,o+u);g=g-o-u;var p=this.diff_main(c,v,false,f);for(var d=p.length-1;d>=0;d--){l.splice(g,0,p[d])}g=g+p.length}u=0;o=0;c="";v="";break}g++}l.pop();return l};e.prototype.diff_bisect_=function(t,n,a){var f=t.length;var s=n.length;var h=Math.ceil((f+s)/2);var l=h;var g=2*h;var o=new Array(g);var u=new Array(g);for(var c=0;c<g;c++){o[c]=-1;u[c]=-1}o[l+1]=0;u[l+1]=0;var v=f-s;var p=v%2!=0;var d=0;var _=0;var b=0;var m=0;for(var w=0;w<h;w++){if((new Date).getTime()>a){break}for(var x=-w+d;x<=w-_;x+=2){var D=l+x;var y;if(x==-w||x!=w&&o[D-1]<o[D+1]){y=o[D+1]}else{y=o[D-1]+1}var M=y-x;while(y<f&&M<s&&t.charAt(y)==n.charAt(M)){y++;M++}o[D]=y;if(y>f){_+=2}else if(M>s){d+=2}else if(p){var k=l+v-x;if(k>=0&&k<g&&u[k]!=-1){var E=f-u[k];if(y>=E){return this.diff_bisectSplit_(t,n,y,M,a)}}}}for(var A=-w+b;A<=w-m;A+=2){var k=l+A;var E;if(A==-w||A!=w&&u[k-1]<u[k+1]){E=u[k+1]}else{E=u[k-1]+1}var I=E-A;while(E<f&&I<s&&t.charAt(f-E-1)==n.charAt(s-I-1)){E++;I++}u[k]=E;if(E>f){m+=2}else if(I>s){b+=2}else if(!p){var D=l+v-A;if(D>=0&&D<g&&o[D]!=-1){var y=o[D];var M=l+y-D;E=f-E;if(y>=E){return this.diff_bisectSplit_(t,n,y,M,a)}}}}}return[new e.Diff(r,t),new e.Diff(i,n)]};e.prototype.diff_bisectSplit_=function(t,e,r,i,n){var a=t.substring(0,r);var f=e.substring(0,i);var s=t.substring(r);var h=e.substring(i);var l=this.diff_main(a,f,false,n);var g=this.diff_main(s,h,false,n);return l.concat(g)};e.prototype.diff_linesToChars_=function(t,e){var r=[];var i={};r[0]="";function n(t){var e="";var n=0;var f=-1;var s=r.length;while(f<t.length-1){f=t.indexOf("\n",n);if(f==-1){f=t.length-1}var h=t.substring(n,f+1);if(i.hasOwnProperty?i.hasOwnProperty(h):i[h]!==undefined){e+=String.fromCharCode(i[h])}else{if(s==a){h=t.substring(n);f=t.length}e+=String.fromCharCode(s);i[h]=s;r[s++]=h}n=f+1}return e}var a=4e4;var f=n(t);a=65535;var s=n(e);return{chars1:f,chars2:s,lineArray:r}};e.prototype.diff_charsToLines_=function(t,e){for(var r=0;r<t.length;r++){var i=t[r][1];var n=[];for(var a=0;a<i.length;a++){n[a]=e[i.charCodeAt(a)]}t[r][1]=n.join("")}};e.prototype.diff_commonPrefix=function(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0)){return 0}var r=0;var i=Math.min(t.length,e.length);var n=i;var a=0;while(r<n){if(t.substring(a,n)==e.substring(a,n)){r=n;a=r}else{i=n}n=Math.floor((i-r)/2+r)}return n};e.prototype.diff_commonSuffix=function(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1)){return 0}var r=0;var i=Math.min(t.length,e.length);var n=i;var a=0;while(r<n){if(t.substring(t.length-n,t.length-a)==e.substring(e.length-n,e.length-a)){r=n;a=r}else{i=n}n=Math.floor((i-r)/2+r)}return n};e.prototype.diff_commonOverlap_=function(t,e){var r=t.length;var i=e.length;if(r==0||i==0){return 0}if(r>i){t=t.substring(r-i)}else if(r<i){e=e.substring(0,r)}var n=Math.min(r,i);if(t==e){return n}var a=0;var f=1;while(true){var s=t.substring(n-f);var h=e.indexOf(s);if(h==-1){return a}f+=h;if(h==0||t.substring(n-f)==e.substring(0,f)){a=f;f++}}};e.prototype.diff_halfMatch_=function(t,e){if(this.Diff_Timeout<=0){return null}var r=t.length>e.length?t:e;var i=t.length>e.length?e:t;if(r.length<4||i.length*2<r.length){return null}var n=this;function a(t,e,r){var i=t.substring(r,r+Math.floor(t.length/4));var a=-1;var f="";var s,h,l,g;while((a=e.indexOf(i,a+1))!=-1){var o=n.diff_commonPrefix(t.substring(r),e.substring(a));var u=n.diff_commonSuffix(t.substring(0,r),e.substring(0,a));if(f.length<u+o){f=e.substring(a-u,a)+e.substring(a,a+o);s=t.substring(0,r-u);h=t.substring(r+o);l=e.substring(0,a-u);g=e.substring(a+o)}}if(f.length*2>=t.length){return[s,h,l,g,f]}else{return null}}var f=a(r,i,Math.ceil(r.length/4));var s=a(r,i,Math.ceil(r.length/2));var h;if(!f&&!s){return null}else if(!s){h=f}else if(!f){h=s}else{h=f[4].length>s[4].length?f:s}var l,g,o,u;if(t.length>e.length){l=h[0];g=h[1];o=h[2];u=h[3]}else{o=h[0];u=h[1];l=h[2];g=h[3]}var c=h[4];return[l,g,o,u,c]};e.prototype.diff_cleanupSemantic=function(t){var a=false;var f=[];var s=0;var h=null;var l=0;var g=0;var o=0;var u=0;var c=0;while(l<t.length){if(t[l][0]==n){f[s++]=l;g=u;o=c;u=0;c=0;h=t[l][1]}else{if(t[l][0]==i){u+=t[l][1].length}else{c+=t[l][1].length}if(h&&h.length<=Math.max(g,o)&&h.length<=Math.max(u,c)){t.splice(f[s-1],0,new e.Diff(r,h));t[f[s-1]+1][0]=i;s--;s--;l=s>0?f[s-1]:-1;g=0;o=0;u=0;c=0;h=null;a=true}}l++}if(a){this.diff_cleanupMerge(t)}this.diff_cleanupSemanticLossless(t);l=1;while(l<t.length){if(t[l-1][0]==r&&t[l][0]==i){var v=t[l-1][1];var p=t[l][1];var d=this.diff_commonOverlap_(v,p);var _=this.diff_commonOverlap_(p,v);if(d>=_){if(d>=v.length/2||d>=p.length/2){t.splice(l,0,new e.Diff(n,p.substring(0,d)));t[l-1][1]=v.substring(0,v.length-d);t[l+1][1]=p.substring(d);l++}}else{if(_>=v.length/2||_>=p.length/2){t.splice(l,0,new e.Diff(n,v.substring(0,_)));t[l-1][0]=i;t[l-1][1]=p.substring(0,p.length-_);t[l+1][0]=r;t[l+1][1]=v.substring(_);l++}}l++}l++}};e.prototype.diff_cleanupSemanticLossless=function(t){function r(t,r){if(!t||!r){return 6}var i=t.charAt(t.length-1);var n=r.charAt(0);var a=i.match(e.nonAlphaNumericRegex_);var f=n.match(e.nonAlphaNumericRegex_);var s=a&&i.match(e.whitespaceRegex_);var h=f&&n.match(e.whitespaceRegex_);var l=s&&i.match(e.linebreakRegex_);var g=h&&n.match(e.linebreakRegex_);var o=l&&t.match(e.blanklineEndRegex_);var u=g&&r.match(e.blanklineStartRegex_);if(o||u){return 5}else if(l||g){return 4}else if(a&&!s&&h){return 3}else if(s||h){return 2}else if(a||f){return 1}return 0}var i=1;while(i<t.length-1){if(t[i-1][0]==n&&t[i+1][0]==n){var a=t[i-1][1];var f=t[i][1];var s=t[i+1][1];var h=this.diff_commonSuffix(a,f);if(h){var l=f.substring(f.length-h);a=a.substring(0,a.length-h);f=l+f.substring(0,f.length-h);s=l+s}var g=a;var o=f;var u=s;var c=r(a,f)+r(f,s);while(f.charAt(0)===s.charAt(0)){a+=f.charAt(0);f=f.substring(1)+s.charAt(0);s=s.substring(1);var v=r(a,f)+r(f,s);if(v>=c){c=v;g=a;o=f;u=s}}if(t[i-1][1]!=g){if(g){t[i-1][1]=g}else{t.splice(i-1,1);i--}t[i][1]=o;if(u){t[i+1][1]=u}else{t.splice(i+1,1);i--}}}i++}};e.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;e.whitespaceRegex_=/\s/;e.linebreakRegex_=/[\r\n]/;e.blanklineEndRegex_=/\n\r?\n$/;e.blanklineStartRegex_=/^\r?\n\r?\n/;e.prototype.diff_cleanupEfficiency=function(t){var a=false;var f=[];var s=0;var h=null;var l=0;var g=false;var o=false;var u=false;var c=false;while(l<t.length){if(t[l][0]==n){if(t[l][1].length<this.Diff_EditCost&&(u||c)){f[s++]=l;g=u;o=c;h=t[l][1]}else{s=0;h=null}u=c=false}else{if(t[l][0]==r){c=true}else{u=true}if(h&&(g&&o&&u&&c||h.length<this.Diff_EditCost/2&&g+o+u+c==3)){t.splice(f[s-1],0,new e.Diff(r,h));t[f[s-1]+1][0]=i;s--;h=null;if(g&&o){u=c=true;s=0}else{s--;l=s>0?f[s-1]:-1;u=c=false}a=true}}l++}if(a){this.diff_cleanupMerge(t)}};e.prototype.diff_cleanupMerge=function(t){t.push(new e.Diff(n,""));var a=0;var f=0;var s=0;var h="";var l="";var g;while(a<t.length){switch(t[a][0]){case i:s++;l+=t[a][1];a++;break;case r:f++;h+=t[a][1];a++;break;case n:if(f+s>1){if(f!==0&&s!==0){g=this.diff_commonPrefix(l,h);if(g!==0){if(a-f-s>0&&t[a-f-s-1][0]==n){t[a-f-s-1][1]+=l.substring(0,g)}else{t.splice(0,0,new e.Diff(n,l.substring(0,g)));a++}l=l.substring(g);h=h.substring(g)}g=this.diff_commonSuffix(l,h);if(g!==0){t[a][1]=l.substring(l.length-g)+t[a][1];l=l.substring(0,l.length-g);h=h.substring(0,h.length-g)}}a-=f+s;t.splice(a,f+s);if(h.length){t.splice(a,0,new e.Diff(r,h));a++}if(l.length){t.splice(a,0,new e.Diff(i,l));a++}a++}else if(a!==0&&t[a-1][0]==n){t[a-1][1]+=t[a][1];t.splice(a,1)}else{a++}s=0;f=0;h="";l="";break}}if(t[t.length-1][1]===""){t.pop()}var o=false;a=1;while(a<t.length-1){if(t[a-1][0]==n&&t[a+1][0]==n){if(t[a][1].substring(t[a][1].length-t[a-1][1].length)==t[a-1][1]){t[a][1]=t[a-1][1]+t[a][1].substring(0,t[a][1].length-t[a-1][1].length);t[a+1][1]=t[a-1][1]+t[a+1][1];t.splice(a-1,1);o=true}else if(t[a][1].substring(0,t[a+1][1].length)==t[a+1][1]){t[a-1][1]+=t[a+1][1];t[a][1]=t[a][1].substring(t[a+1][1].length)+t[a+1][1];t.splice(a+1,1);o=true}}a++}if(o){this.diff_cleanupMerge(t)}};e.prototype.diff_xIndex=function(t,e){var n=0;var a=0;var f=0;var s=0;var h;for(h=0;h<t.length;h++){if(t[h][0]!==i){n+=t[h][1].length}if(t[h][0]!==r){a+=t[h][1].length}if(n>e){break}f=n;s=a}if(t.length!=h&&t[h][0]===r){return s}return s+(e-f)};e.prototype.diff_prettyHtml=function(t){var e=[];var a=/&/g;var f=/</g;var s=/>/g;var h=/\n/g;for(var l=0;l<t.length;l++){var g=t[l][0];var o=t[l][1];var u=o.replace(a,"&").replace(f,"<").replace(s,">").replace(h,"¶<br>");switch(g){case i:e[l]='<ins style="background:#e6ffe6;">'+u+"</ins>";break;case r:e[l]='<del style="background:#ffe6e6;">'+u+"</del>";break;case n:e[l]="<span>"+u+"</span>";break}}return e.join("")};e.prototype.diff_text1=function(t){var e=[];for(var r=0;r<t.length;r++){if(t[r][0]!==i){e[r]=t[r][1]}}return e.join("")};e.prototype.diff_text2=function(t){var e=[];for(var i=0;i<t.length;i++){if(t[i][0]!==r){e[i]=t[i][1]}}return e.join("")};e.prototype.diff_levenshtein=function(t){var e=0;var a=0;var f=0;for(var s=0;s<t.length;s++){var h=t[s][0];var l=t[s][1];switch(h){case i:a+=l.length;break;case r:f+=l.length;break;case n:e+=Math.max(a,f);a=0;f=0;break}}e+=Math.max(a,f);return e};e.prototype.diff_toDelta=function(t){var e=[];for(var a=0;a<t.length;a++){switch(t[a][0]){case i:e[a]="+"+encodeURI(t[a][1]);break;case r:e[a]="-"+t[a][1].length;break;case n:e[a]="="+t[a][1].length;break}}return e.join("\t").replace(/%20/g," ")};e.prototype.diff_fromDelta=function(t,a){var f=[];var s=0;var h=0;var l=a.split(/\t/g);for(var g=0;g<l.length;g++){var o=l[g].substring(1);switch(l[g].charAt(0)){case"+":try{f[s++]=new e.Diff(i,decodeURI(o))}catch(t){throw new Error("Illegal escape in diff_fromDelta: "+o)}break;case"-":case"=":var u=parseInt(o,10);if(isNaN(u)||u<0){throw new Error("Invalid number in diff_fromDelta: "+o)}var c=t.substring(h,h+=u);if(l[g].charAt(0)=="="){f[s++]=new e.Diff(n,c)}else{f[s++]=new e.Diff(r,c)}break;default:if(l[g]){throw new Error("Invalid diff operation in diff_fromDelta: "+l[g])}}}if(h!=t.length){throw new Error("Delta length ("+h+") does not equal source text length ("+t.length+").")}return f};e.prototype.match_main=function(t,e,r){if(t==null||e==null||r==null){throw new Error("Null input. (match_main)")}r=Math.max(0,Math.min(r,t.length));if(t==e){return 0}else if(!t.length){return-1}else if(t.substring(r,r+e.length)==e){return r}else{return this.match_bitap_(t,e,r)}};e.prototype.match_bitap_=function(t,e,r){if(e.length>this.Match_MaxBits){throw new Error("Pattern too long for this browser.")}var i=this.match_alphabet_(e);var n=this;function a(t,i){var a=t/e.length;var f=Math.abs(r-i);if(!n.Match_Distance){return f?1:a}return a+f/n.Match_Distance}var f=this.Match_Threshold;var s=t.indexOf(e,r);if(s!=-1){f=Math.min(a(0,s),f);s=t.lastIndexOf(e,r+e.length);if(s!=-1){f=Math.min(a(0,s),f)}}var h=1<<e.length-1;s=-1;var l,g;var o=e.length+t.length;var u;for(var c=0;c<e.length;c++){l=0;g=o;while(l<g){if(a(c,r+g)<=f){l=g}else{o=g}g=Math.floor((o-l)/2+l)}o=g;var v=Math.max(1,r-g+1);var p=Math.min(r+g,t.length)+e.length;var d=Array(p+2);d[p+1]=(1<<c)-1;for(var _=p;_>=v;_--){var b=i[t.charAt(_-1)];if(c===0){d[_]=(d[_+1]<<1|1)&b}else{d[_]=(d[_+1]<<1|1)&b|((u[_+1]|u[_])<<1|1)|u[_+1]}if(d[_]&h){var m=a(c,_-1);if(m<=f){f=m;s=_-1;if(s>r){v=Math.max(1,2*r-s)}else{break}}}}if(a(c+1,r)>f){break}u=d}return s};e.prototype.match_alphabet_=function(t){var e={};for(var r=0;r<t.length;r++){e[t.charAt(r)]=0}for(var r=0;r<t.length;r++){e[t.charAt(r)]|=1<<t.length-r-1}return e};e.prototype.patch_addContext_=function(t,r){if(r.length==0){return}if(t.start2===null){throw Error("patch not initialized")}var i=r.substring(t.start2,t.start2+t.length1);var a=0;while(r.indexOf(i)!=r.lastIndexOf(i)&&i.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin){a+=this.Patch_Margin;i=r.substring(t.start2-a,t.start2+t.length1+a)}a+=this.Patch_Margin;var f=r.substring(t.start2-a,t.start2);if(f){t.diffs.unshift(new e.Diff(n,f))}var s=r.substring(t.start2+t.length1,t.start2+t.length1+a);if(s){t.diffs.push(new e.Diff(n,s))}t.start1-=f.length;t.start2-=f.length;t.length1+=f.length+s.length;t.length2+=f.length+s.length};e.prototype.patch_make=function(t,a,f){var s,h;if(typeof t=="string"&&typeof a=="string"&&typeof f=="undefined"){s=t;h=this.diff_main(s,a,true);if(h.length>2){this.diff_cleanupSemantic(h);this.diff_cleanupEfficiency(h)}}else if(t&&typeof t=="object"&&typeof a=="undefined"&&typeof f=="undefined"){h=t;s=this.diff_text1(h)}else if(typeof t=="string"&&a&&typeof a=="object"&&typeof f=="undefined"){s=t;h=a}else if(typeof t=="string"&&typeof a=="string"&&f&&typeof f=="object"){s=t;h=f}else{throw new Error("Unknown call format to patch_make.")}if(h.length===0){return[]}var l=[];var g=new e.patch_obj;var o=0;var u=0;var c=0;var v=s;var p=s;for(var d=0;d<h.length;d++){var _=h[d][0];var b=h[d][1];if(!o&&_!==n){g.start1=u;g.start2=c}switch(_){case i:g.diffs[o++]=h[d];g.length2+=b.length;p=p.substring(0,c)+b+p.substring(c);break;case r:g.length1+=b.length;g.diffs[o++]=h[d];p=p.substring(0,c)+p.substring(c+b.length);break;case n:if(b.length<=2*this.Patch_Margin&&o&&h.length!=d+1){g.diffs[o++]=h[d];g.length1+=b.length;g.length2+=b.length}else if(b.length>=2*this.Patch_Margin){if(o){this.patch_addContext_(g,v);l.push(g);g=new e.patch_obj;o=0;v=p;u=c}}break}if(_!==i){u+=b.length}if(_!==r){c+=b.length}}if(o){this.patch_addContext_(g,v);l.push(g)}return l};e.prototype.patch_deepCopy=function(t){var r=[];for(var i=0;i<t.length;i++){var n=t[i];var a=new e.patch_obj;a.diffs=[];for(var f=0;f<n.diffs.length;f++){a.diffs[f]=new e.Diff(n.diffs[f][0],n.diffs[f][1])}a.start1=n.start1;a.start2=n.start2;a.length1=n.length1;a.length2=n.length2;r[i]=a}return r};e.prototype.patch_apply=function(t,e){if(t.length==0){return[e,[]]}t=this.patch_deepCopy(t);var a=this.patch_addPadding(t);e=a+e+a;this.patch_splitMax(t);var f=0;var s=[];for(var h=0;h<t.length;h++){var l=t[h].start2+f;var g=this.diff_text1(t[h].diffs);var o;var u=-1;if(g.length>this.Match_MaxBits){o=this.match_main(e,g.substring(0,this.Match_MaxBits),l);if(o!=-1){u=this.match_main(e,g.substring(g.length-this.Match_MaxBits),l+g.length-this.Match_MaxBits);if(u==-1||o>=u){o=-1}}}else{o=this.match_main(e,g,l)}if(o==-1){s[h]=false;f-=t[h].length2-t[h].length1}else{s[h]=true;f=o-l;var c;if(u==-1){c=e.substring(o,o+g.length)}else{c=e.substring(o,u+this.Match_MaxBits)}if(g==c){e=e.substring(0,o)+this.diff_text2(t[h].diffs)+e.substring(o+g.length)}else{var v=this.diff_main(g,c,false);if(g.length>this.Match_MaxBits&&this.diff_levenshtein(v)/g.length>this.Patch_DeleteThreshold){s[h]=false}else{this.diff_cleanupSemanticLossless(v);var p=0;var d;for(var _=0;_<t[h].diffs.length;_++){var b=t[h].diffs[_];if(b[0]!==n){d=this.diff_xIndex(v,p)}if(b[0]===i){e=e.substring(0,o+d)+b[1]+e.substring(o+d)}else if(b[0]===r){e=e.substring(0,o+d)+e.substring(o+this.diff_xIndex(v,p+b[1].length))}if(b[0]!==r){p+=b[1].length}}}}}}e=e.substring(a.length,e.length-a.length);return[e,s]};e.prototype.patch_addPadding=function(t){var r=this.Patch_Margin;var i="";for(var a=1;a<=r;a++){i+=String.fromCharCode(a)}for(var a=0;a<t.length;a++){t[a].start1+=r;t[a].start2+=r}var f=t[0];var s=f.diffs;if(s.length==0||s[0][0]!=n){s.unshift(new e.Diff(n,i));f.start1-=r;f.start2-=r;f.length1+=r;f.length2+=r}else if(r>s[0][1].length){var h=r-s[0][1].length;s[0][1]=i.substring(s[0][1].length)+s[0][1];f.start1-=h;f.start2-=h;f.length1+=h;f.length2+=h}f=t[t.length-1];s=f.diffs;if(s.length==0||s[s.length-1][0]!=n){s.push(new e.Diff(n,i));f.length1+=r;f.length2+=r}else if(r>s[s.length-1][1].length){var h=r-s[s.length-1][1].length;s[s.length-1][1]+=i.substring(0,h);f.length1+=h;f.length2+=h}return i};e.prototype.patch_splitMax=function(t){var a=this.Match_MaxBits;for(var f=0;f<t.length;f++){if(t[f].length1<=a){continue}var s=t[f];t.splice(f--,1);var h=s.start1;var l=s.start2;var g="";while(s.diffs.length!==0){var o=new e.patch_obj;var u=true;o.start1=h-g.length;o.start2=l-g.length;if(g!==""){o.length1=o.length2=g.length;o.diffs.push(new e.Diff(n,g))}while(s.diffs.length!==0&&o.length1<a-this.Patch_Margin){var c=s.diffs[0][0];var v=s.diffs[0][1];if(c===i){o.length2+=v.length;l+=v.length;o.diffs.push(s.diffs.shift());u=false}else if(c===r&&o.diffs.length==1&&o.diffs[0][0]==n&&v.length>2*a){o.length1+=v.length;h+=v.length;u=false;o.diffs.push(new e.Diff(c,v));s.diffs.shift()}else{v=v.substring(0,a-o.length1-this.Patch_Margin);o.length1+=v.length;h+=v.length;if(c===n){o.length2+=v.length;l+=v.length}else{u=false}o.diffs.push(new e.Diff(c,v));if(v==s.diffs[0][1]){s.diffs.shift()}else{s.diffs[0][1]=s.diffs[0][1].substring(v.length)}}}g=this.diff_text2(o.diffs);g=g.substring(g.length-this.Patch_Margin);var p=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);if(p!==""){o.length1+=p.length;o.length2+=p.length;if(o.diffs.length!==0&&o.diffs[o.diffs.length-1][0]===n){o.diffs[o.diffs.length-1][1]+=p}else{o.diffs.push(new e.Diff(n,p))}}if(!u){t.splice(++f,0,o)}}}};e.prototype.patch_toText=function(t){var e=[];for(var r=0;r<t.length;r++){e[r]=t[r]}return e.join("")};e.prototype.patch_fromText=function(t){var a=[];if(!t){return a}var f=t.split("\n");var s=0;var h=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;while(s<f.length){var l=f[s].match(h);if(!l){throw new Error("Invalid patch string: "+f[s])}var g=new e.patch_obj;a.push(g);g.start1=parseInt(l[1],10);if(l[2]===""){g.start1--;g.length1=1}else if(l[2]=="0"){g.length1=0}else{g.start1--;g.length1=parseInt(l[2],10)}g.start2=parseInt(l[3],10);if(l[4]===""){g.start2--;g.length2=1}else if(l[4]=="0"){g.length2=0}else{g.start2--;g.length2=parseInt(l[4],10)}s++;while(s<f.length){var o=f[s].charAt(0);try{var u=decodeURI(f[s].substring(1))}catch(t){throw new Error("Illegal escape in patch_fromText: "+u)}if(o=="-"){g.diffs.push(new e.Diff(r,u))}else if(o=="+"){g.diffs.push(new e.Diff(i,u))}else if(o==" "){g.diffs.push(new e.Diff(n,u))}else if(o=="@"){break}else if(o===""){}else{throw new Error('Invalid patch mode "'+o+'" in: '+u)}s++}}return a};e.patch_obj=function(){this.diffs=[];this.start1=null;this.start2=null;this.length1=0;this.length2=0};e.patch_obj.prototype.toString=function(){var t,e;if(this.length1===0){t=this.start1+",0"}else if(this.length1==1){t=this.start1+1}else{t=this.start1+1+","+this.length1}if(this.length2===0){e=this.start2+",0"}else if(this.length2==1){e=this.start2+1}else{e=this.start2+1+","+this.length2}var a=["@@ -"+t+" +"+e+" @@\n"];var f;for(var s=0;s<this.diffs.length;s++){switch(this.diffs[s][0]){case i:f="+";break;case r:f="-";break;case n:f=" ";break}a[s+1]=f+encodeURI(this.diffs[s][1])+"\n"}return a.join("").replace(/%20/g," ")};t.exports=e;t.exports.diff_match_patch=e;t.exports.DIFF_DELETE=r;t.exports.DIFF_INSERT=i;t.exports.DIFF_EQUAL=n},428:function(){ /* @preserve jQuery.PrettyTextDiff 1.0.4 See https://github.com/arnab/jQuery.PrettyTextDiff/ */ (function(){var t;t=jQuery;t.fn.extend({prettyTextDiff:function(e){var r,i;i={originalContainer:".original",changedContainer:".changed",diffContainer:".diff",cleanup:true,debug:false};i=t.extend(i,e);t.fn.prettyTextDiff.debug("Options: ",i,i);r=new diff_match_patch;return this.each((function(){var e,n,a,f;if(i.originalContent&&i.changedContent){f=t("<div />").html(i.originalContent).text();e=t("<div />").html(i.changedContent).text()}else{f=t(i.originalContainer,this).text();e=t(i.changedContainer,this).text()}t.fn.prettyTextDiff.debug("Original text found: ",f,i);t.fn.prettyTextDiff.debug("Changed text found: ",e,i);a=r.diff_main(f,e);if(i.cleanup){r.diff_cleanupSemantic(a)}t.fn.prettyTextDiff.debug("Diffs: ",a,i);n=t.map(a,(function(e){return t.fn.prettyTextDiff.createHTML(e)}));t(i.diffContainer,this).html(n.join(""));return this}))}});t.fn.prettyTextDiff.debug=function(t,e,r){if(r.debug){return console.log(t,e)}};t.fn.prettyTextDiff.createHTML=function(t){var e,r,i,n,a,f,s,h;r=[];n=/&/g;f=/</g;a=/>/g;s=/\n/g;i=t[0],e=t[1];h=e.replace(n,"&").replace(f,"<").replace(a,">").replace(s,"<br>");switch(i){case DIFF_INSERT:return"<ins>"+h+"</ins>";case DIFF_DELETE:return"<del>"+h+"</del>";case DIFF_EQUAL:return"<span>"+h+"</span>"}}}).call(this)}};var e={};function r(i){var n=e[i];if(n!==undefined){return n.exports}var a=e[i]={exports:{}};t[i].call(a.exports,a,a.exports,r);return a.exports}var i={};(()=>{ /** * --------------------------------------------------------------------- * * GLPI - Gestionnaire Libre de Parc Informatique * * http://glpi-project.org * * @copyright 2015-2022 Teclib' and contributors. * @copyright 2003-2014 by the INDEPNET Development Team. * @licence https://www.gnu.org/licenses/gpl-3.0.html * * --------------------------------------------------------------------- * * LICENSE * * This file is part of GLPI. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. * * --------------------------------------------------------------------- */ window.diff_match_patch=r(427).diff_match_patch;window.DIFF_DELETE=r(427).DIFF_DELETE;window.DIFF_INSERT=r(427).DIFF_INSERT;window.DIFF_EQUAL=r(427).DIFF_EQUAL;r(428)})()})();