I am facing some performance issues on some diffs which are taking too much time to render.
I've reduced the diff to a small part and it still takes 20 seconds to render here on chrome (on firefox it asks to interrupt the script two times and then renders the page - attached an image), here is a code sample with the reduced diff:
<script>
var lineDiffExample ="diff --git a\/bower.json b\/bower.json\nindex d4e58ce..0df139c 100644\n--- a\/bower.json\n+++ b\/bower.json\n@@ -1,6 +1,6 @@\n currentBlock.oldStartLine2=oldLine2,currentBlock.newStartLine=newLine,currentBlock.header=line},createLine=function(line){var currentLine={};currentLine.content=line;var newLinePrefixes=currentFile.isCombined?[\"+\",\" +\"]:[\"+\"],delLinePrefixes=currentFile.isCombined?[\"-\",\" -\"]:[\"-\"];utils.startsWith(line,newLinePrefixes)?(currentFile.addedLines++,currentLine.type=LINE_TYPE.INSERTS,currentLine.oldNumber=null,currentLine.newNumber=newLine++,currentBlock.lines.push(currentLine)):utils.startsWith(line,delLinePrefixes)?(currentFile.deletedLines++,currentLine.type=LINE_TYPE.DELETES,currentLine.oldNumber=oldLine++,currentLine.newNumber=null,currentBlock.lines.push(currentLine)):(currentLine.type=LINE_TYPE.CONTEXT,currentLine.oldNumber=oldLine++,currentLine.newNumber=newLine++,currentBlock.lines.push(currentLine))},diffLines=diffInput.replace(\/\\\\ No newline at end of file\/g,\"\").replace(\/\\r\\n?\/g,\"\\n\").split(\"\\n\"),oldMode=\/^old mode (\\d{6})\/,newMode=\/^new mode (\\d{6})\/,deletedFileMode=\/^deleted file mode (\\d{6})\/,newFileMode=\/^new file mode (\\d{6})\/,copyFrom=\/^copy from \"?(.+)\"?\/,copyTo=\/^copy to \"?(.+)\"?\/,renameFrom=\/^rename from \"?(.+)\"?\/,renameTo=\/^rename to \"?(.+)\"?\/,similarityIndex=\/^similarity index (\\d+)%\/,dissimilarityIndex=\/^dissimilarity index (\\d+)%\/,index=\/^index ([0-9a-z]+)\\.\\.([0-9a-z]+)\\s*(\\d{6})?\/,combinedIndex=\/^index ([0-9a-z]+),([0-9a-z]+)\\.\\.([0-9a-z]+)\/,combinedMode=\/^mode (\\d{6}),(\\d{6})\\.\\.(\\d{6})\/,combinedNewFile=\/^new file mode (\\d{6})\/,combinedDeletedFile=\/^deleted file mode (\\d{6}),(\\d{6})\/;return diffLines.forEach(function(line){if(line&&!utils.startsWith(line,\"*\")){(utils.startsWith(line,\"diff\")||!currentFile||currentFile&&(currentFile.oldName&&utils.startsWith(line,\"--- \")||currentFile.newName&&utils.startsWith(line,\"+++ \")))&&startFile();var values;if(currentFile&&!currentFile.oldName&&utils.startsWith(line,\"--- \")&&(values=getSrcFilename(line,config)))return currentFile.oldName=values,void(currentFile.language=getExtension(currentFile.oldName,currentFile.language));if(currentFile&&!currentFile.newName&&utils.startsWith(line,\"+++ \")&&(values=getDstFilename(line,config)))return currentFile.newName=values,void(currentFile.language=getExtension(currentFile.newName,currentFile.language));if(currentFile&&utils.startsWith(line,\"@\"))return void startBlock(line);if(currentBlock&&(utils.startsWith(line,\"+\")||utils.startsWith(line,\"-\")||utils.startsWith(line,\" \")))return void createLine(line);(currentFile&¤tFile.blocks.length||currentBlock&¤tBlock.lines.length)&&startFile(),(values=oldMode.exec(line))?currentFile.oldMode=values[1]:(values=newMode.exec(line))?currentFile.newMode=values[1]:(values=deletedFileMode.exec(line))?(currentFile.deletedFileMode=values[1],currentFile.isDeleted=!0):(values=newFileMode.exec(line))?(currentFile.newFileMode=values[1],currentFile.isNew=!0):(values=copyFrom.exec(line))?(currentFile.oldName=values[1],currentFile.isCopy=!0):(values=copyTo.exec(line))?(currentFile.newName=values[1],currentFile.isCopy=!0):(values=renameFrom.exec(line))?(currentFile.oldName=values[1],currentFile.isRename=!0):(values=renameTo.exec(line))?(currentFile.newName=values[1],currentFile.isRename=!0):(values=similarityIndex.exec(line))?currentFile.unchangedPercentage=values[1]:(values=dissimilarityIndex.exec(line))?currentFile.changedPercentage=values[1]:(values=index.exec(line))?(currentFile.checksumBefore=values[1],currentFile.checksumAfter=values[2],values[3]&&(currentFile.mode=values[3])):(values=combinedIndex.exec(line))?(currentFile.checksumBefore=[values[2],values[3]],currentFile.checksumAfter=values[1]):(values=combinedMode.exec(line))?(currentFile.oldMode=[values[2],values[3]],currentFile.newMode=values[1]):(values=combinedNewFile.exec(line))?(currentFile.newFileMode=values[1],currentFile.isNew=!0):(values=combinedDeletedFile.exec(line))&&(currentFile.deletedFileMode=values[1],currentFile.isDeleted=!0)}}),saveBlock(),saveFile(),files},module.exports.DiffParser=new DiffParser}()},{\".\/utils.js\":32}],23:[function(require,module){(function(global){!function(){function Diff2Html(){}var diffParser=require(\".\/diff-parser.js\").DiffParser,fileLister=require(\".\/file-list-printer.js\").FileListPrinter,htmlPrinter=require(\".\/html-printer.js\").HtmlPrinter;Diff2Html.prototype.getJsonFromDiff=function(diffInput,config){var configOrEmpty=config||{};return diffParser.generateDiffJson(diffInput,configOrEmpty)},Diff2Html.prototype.getPrettyHtml=function(diffInput,config){var configOrEmpty=config||{},diffJson=diffInput;configOrEmpty.inputFormat&&\"diff\"!==configOrEmpty.inputFormat||(diffJson=diffParser.generateDiffJson(diffInput,configOrEmpty));var fileList=\"\";configOrEmpty.showFiles===!0&&(fileList=fileLister.generateFileList(diffJson,configOrEmpty));var diffOutput=\"\";return diffOutput=\"side-by-side\"===configOrEmpty.outputFormat?htmlPrinter.generateSideBySideJsonHtml(diffJson,configOrEmpty):htmlPrinter.generateLineByLineJsonHtml(diffJson,configOrEmpty),fileList+diffOutput},Diff2Html.prototype.getPrettyHtmlFromDiff=function(diffInput,config){var configOrEmpty=config||{};return configOrEmpty.inputFormat=\"diff\",configOrEmpty.outputFormat=\"line-by-line\",this.getPrettyHtml(diffInput,configOrEmpty)},Diff2Html.prototype.getPrettyHtmlFromJson=function(diffJson,config){var configOrEmpty=config||{};return configOrEmpty.inputFormat=\"json\",configOrEmpty.outputFormat=\"line-by-line\",this.getPrettyHtml(diffJson,configOrEmpty)},Diff2Html.prototype.getPrettySideBySideHtmlFromDiff=function(diffInput,config){var configOrEmpty=config||{};return configOrEmpty.inputFormat=\"diff\",configOrEmpty.outputFormat=\"side-by-side\",this.getPrettyHtml(diffInput,configOrEmpty)},Diff2Html.prototype.getPrettySideBySideHtmlFromJson=function(diffJson,config){var configOrEmpty=config||{};return configOrEmpty.inputFormat=\"json\",configOrEmpty.outputFormat=\"side-by-side\",this.getPrettyHtml(diffJson,configOrEmpty)};var diffObject=new Diff2Html;module.exports.Diff2Html=diffObject,global.Diff2Html=diffObject}()}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\".\/diff-parser.js\":22,\".\/file-list-printer.js\":24,\".\/html-printer.js\":26}],24:[function(require,module){!function(){function FileListPrinter(){}var printerUtils=require(\".\/printer-utils.js\").PrinterUtils,hoganUtils=require(\".\/hoganjs-utils.js\").HoganJsUtils,baseTemplatesPath=\"file-summary\",iconsBaseTemplatesPath=\"icon\";FileListPrinter.prototype.generateFileList=function(diffFiles){var lineTemplate=hoganUtils.template(baseTemplatesPath,\"line\"),files=diffFiles.map(function(file){var fileTypeName=printerUtils.getFileTypeIcon(file),iconTemplate=hoganUtils.template(iconsBaseTemplatesPath,fileTypeName);return lineTemplate.render({fileHtmlId:printerUtils.getHtmlId(file),fileName:printerUtils.getDiffName(file),deletedLines:\"-\"+file.deletedLines,addedLines:\"+\"+file.addedLines},{fileIcon:iconTemplate})}).join(\"\\n\");return hoganUtils.render(baseTemplatesPath,\"wrapper\",{filesNumber:diffFiles.length,files:files})},module.exports.FileListPrinter=new FileListPrinter}()},{\".\/hoganjs-utils.js\":25,\".\/printer-utils.js\":28}],25:[function(require,module){(function(__dirname){!function(){function HoganJsUtils(){}var fs=require(\"fs\"),path=require(\"path\"),hogan=require(\"hogan.js\"),hoganTemplates=require(\".\/templates\/diff2html-templates.js\"),templatesPath=path.resolve(__dirname,\"templates\");HoganJsUtils.prototype.render=function(namespace,view,params,configuration){var template=this.template(namespace,view,configuration);return template?template.render(params):null},HoganJsUtils.prototype.template=function(namespace,view,configuration){var config=configuration||{},templateKey=this._templateKey(namespace,view);return this._getTemplate(templateKey,config)},HoganJsUtils.prototype._getTemplate=function(templateKey,config){var template;return config.noCache||(template=this._readFromCache(templateKey)),template||(template=this._loadTemplate(templateKey)),template},HoganJsUtils.prototype._loadTemplate=function(templateKey){var template;try{if(fs.readFileSync){var templatePath=path.join(templatesPath,templateKey),templateContent=fs.readFileSync(templatePath+\".mustache\",\"utf8\");template=hogan.compile(templateContent),hoganTemplates[templateKey]=template}}catch(e){console.error(\"Failed to read (template: \"+templateKey+\") from fs: \"+e.message)}return template},HoganJsUtils.prototype._readFromCache=function(templateKey){return hoganTemplates[templateKey]},HoganJsUtils.prototype._templateKey=function(namespace,view){return namespace+\"-\"+view},module.exports.HoganJsUtils=new HoganJsUtils}()}).call(this,\"\/src\")},{\".\/templates\/diff2html-templates.js\":31,fs:1,\"hogan.js\":20,path:2}],26:[function(require,module){!function(){function HtmlPrinter(){}var LineByLinePrinter=require(\".\/line-by-line-printer.js\").LineByLinePrinter,SideBySidePrinter=require(\".\/side-by-side-printer.js\").SideBySidePrinter;HtmlPrinter.prototype.generateLineByLineJsonHtml=function(diffFiles,config){var lineByLinePrinter=new LineByLinePrinter(config);return lineByLinePrinter.generateLineByLineJsonHtml(diffFiles)},HtmlPrinter.prototype.generateSideBySideJsonHtml=function(diffFiles,config){var sideBySidePrinter=new SideBySidePrinter(config);return sideBySidePrinter.generateSideBySideJsonHtml(diffFiles)},module.exports.HtmlPrinter=new HtmlPrinter}()},{\".\/line-by-line-printer.js\":27,\".\/side-by-side-printer.js\":30}],27:[function(require,module){!function(){function LineByLinePrinter(config){this.config=config}var diffParser=require(\".\/diff-parser.js\").DiffParser,printerUtils=require(\".\/printer-utils.js\").PrinterUtils,utils=require(\".\/utils.js\").Utils,Rematch=require(\".\/rematch.js\").Rematch,hoganUtils=require(\".\/hoganjs-utils.js\").HoganJsUtils,genericTemplatesPath=\"generic\",baseTemplatesPath=\"line-by-line\",iconsBaseTemplatesPath=\"icon\",tagsBaseTemplatesPath=\"tag\";LineByLinePrinter.prototype.makeFileDiffHtml=function(file,diffs){var fileDiffTemplate=hoganUtils.template(baseTemplatesPath,\"file-diff\"),filePathTemplate=hoganUtils.template(genericTemplatesPath,\"file-path\"),fileIconTemplate=hoganUtils.template(iconsBaseTemplatesPath,\"file\"),fileTagTemplate=hoganUtils.template(tagsBaseTemplatesPath,printerUtils.getFileTypeIcon(file));return fileDiffTemplate.render({file:file,fileHtmlId:printerUtils.getHtmlId(file),diffs:diffs,filePath:filePathTemplate.render({fileDiffName:printerUtils.getDiffName(file)},{fileIcon:fileIconTemplate,fileTag:fileTagTemplate})})},LineByLinePrinter.prototype.makeLineByLineHtmlWrapper=function(content){return hoganUtils.render(genericTemplatesPath,\"wrapper\",{content:content})},LineByLinePrinter.prototype.generateLineByLineJsonHtml=function(diffFiles){var that=this,htmlDiffs=diffFiles.map(function(file){var diffs;return diffs=file.blocks.length?that._generateFileHtml(file):that._generateEmptyDiff(),that.makeFileDiffHtml(file,diffs)});return this.makeLineByLineHtmlWrapper(htmlDiffs.join(\"\\n\"))};var matcher=Rematch.rematch(function(a,b){var amod=a.content.substr(1),bmod=b.content.substr(1);return Rematch.distance(amod,bmod)});LineByLinePrinter.prototype.makeColumnLineNumberHtml=function(block){return hoganUtils.render(genericTemplatesPath,\"column-line-number\",{diffParser:diffParser,blockHeader:block.header,lineClass:\"d2h-code-linenumber\",contentClass:\"d2h-code-line\"})},LineByLinePrinter.prototype._generateFileHtml=function(file){var that=this;return file.blocks.map(function(block){function processChangeBlock(){var matches,insertType,deleteType,comparisons=oldLines.length*newLines.length,maxComparisons=that.config.matchingMaxComparisons||2500,doMatching=maxComparisons>comparisons&&(\"lines\"===that.config.matching||\"words\"===that.config.matching);doMatching?(matches=matcher(oldLines,newLines),insertType=diffParser.LINE_TYPE.INSERT_CHANGES,deleteType=diffParser.LINE_TYPE.DELETE_CHANGES):(matches=[[oldLines,newLines]],insertType=diffParser.LINE_TYPE.INSERTS,deleteType=diffParser.LINE_TYPE.DELETES),matches.forEach(function(match){oldLines=match[0],newLines=match[1];for(var oldLine,newLine,processedOldLines=[],processedNewLines=[],common=Math.min(oldLines.length,newLines.length),j=0;common>j;j++){oldLine=oldLines[j],newLine=newLines[j],that.config.isCombined=file.isCombined;var diff=printerUtils.diffHighlight(oldLine.content,newLine.content,that.config);processedOldLines+=that.makeLineHtml(deleteType,oldLine.oldNumber,oldLine.newNumber,diff.first.line,diff.first.prefix),processedNewLines+=that.makeLineHtml(insertType,newLine.oldNumber,newLine.newNumber,diff.second.line,diff.second.prefix)}lines+=processedOldLines+processedNewLines,lines+=that._processLines(oldLines.slice(common),newLines.slice(common))}),oldLines=[],newLines=[]}for(var lines=that.makeColumnLineNumberHtml(block),oldLines=[],newLines=[],i=0;i<block.lines.length;i++){var line=block.lines[i],escapedLine=utils.escape(line.content);line.type!==diffParser.LINE_TYPE.INSERTS&&(newLines.length>0||line.type!==diffParser.LINE_TYPE.DELETES&&oldLines.length>0)&&processChangeBlock(),line.type===diffParser.LINE_TYPE.CONTEXT?lines+=that.makeLineHtml(line.type,line.oldNumber,line.newNumber,escapedLine):line.type!==diffParser.LINE_TYPE.INSERTS||oldLines.length?line.type===diffParser.LINE_TYPE.DELETES?oldLines.push(line):line.type===diffParser.LINE_TYPE.INSERTS&&Boolean(oldLines.length)?newLines.push(line):(console.error(\"Unknown state in html line-by-line generator\"),processChangeBlock()):lines+=that.makeLineHtml(line.type,line.oldNumber,line.newNumber,escapedLine)}return processChangeBlock(),lines}).join(\"\\n\")},LineByLinePrinter.prototype._processLines=function(oldLines,newLines){for(var lines=\"\",i=0;i<oldLines.length;i++){var oldLine=oldLines[i],oldEscapedLine=utils.escape(oldLine.content);lines+=this.makeLineHtml(oldLine.type,oldLine.oldNumber,oldLine.newNumber,oldEscapedLine)}for(var j=0;j<newLines.length;j++){var newLine=newLines[j],newEscapedLine=utils.escape(newLine.content);lines+=this.makeLineHtml(newLine.type,newLine.oldNumber,newLine.newNumber,newEscapedLine)}return lines},LineByLinePrinter.prototype.makeLineHtml=function(type,oldNumber,newNumber,content,prefix){var lineNumberTemplate=hoganUtils.render(baseTemplatesPath,\"numbers\",{oldNumber:utils.valueOrEmpty(oldNumber),newNumber:utils.valueOrEmpty(newNumber)});return hoganUtils.render(genericTemplatesPath,\"line\",{type:type,lineClass:\"d2h-code-linenumber\",contentClass:\"d2h-code-line\",prefix:prefix&&utils.convertWhiteSpaceToNonBreakingSpace(prefix),content:content&&utils.convertWhiteSpaceToNonBreakingSpace(content),lineNumber:lineNumberTemplate})},LineByLinePrinter.prototype._generateEmptyDiff=function(){return hoganUtils.render(genericTemplatesPath,\"empty-diff\",{contentClass:\"d2h-code-line\",diffParser:diffParser})},module.exports.LineByLinePrinter=LineByLinePrinter}()},{\".\/diff-parser.js\":22,\".\/hoganjs-utils.js\":25,\".\/printer-utils.js\":28,\".\/rematch.js\":29,\".\/utils.js\":32}],28:[function(require,module){!function(){function PrinterUtils(){}function unifyPath(path){return path?path.replace(\"\\\\\",\"\/\"):path}function isDevNullName(name){return-1!==name.indexOf(\"dev\/null\")}function removeIns(line){return line.replace(\/(<ins[^>]*>((.|\\n)*?)<\\\/ins>)\/g,\"\")}function removeDel(line){return line.replace(\/(<del[^>]*>((.|\\n)*?)<\\\/del>)\/g,\"\")}var jsDiff=require(\"diff\"),utils=require(\".\/utils.js\").Utils,Rematch=require(\".\/rematch.js\").Rematch,separator=\"\/\";PrinterUtils.prototype.getHtmlId=function(file){var hashCode=function(text){var i,chr,len,hash=0;for(i=0,len=text.length;len>i;i++)chr=text.charCodeAt(i),hash=(hash<<5)-hash+chr,hash|=0;return hash};return\"d2h-\"+hashCode(this.getDiffName(file)).toString().slice(-6)},PrinterUtils.prototype.getDiffName=function(file){var oldFilename=unifyPath(file.oldName),newFilename=unifyPath(file.newName);if(oldFilename&&newFilename&&oldFilename!==newFilename&&!isDevNullName(oldFilename)&&!isDevNullName(newFilename)){for(var prefixPaths=[],suffixPaths=[],oldFilenameParts=oldFilename.split(separator),newFilenameParts=newFilename.split(separator),oldFilenamePartsSize=oldFilenameParts.length,newFilenamePartsSize=newFilenameParts.length,i=0,j=oldFilenamePartsSize-1,k=newFilenamePartsSize-1;j>i&&k>i&&oldFilenameParts[i]===newFilenameParts[i];)prefixPaths.push(newFilenameParts[i]),i+=1;for(;j>i&&k>i&&oldFilenameParts[j]===newFilenameParts[k];)suffixPaths.unshift(newFilenameParts[k]),j-=1,k-=1;var finalPrefix=prefixPaths.join(separator),finalSuffix=suffixPaths.join(separator),oldRemainingPath=oldFilenameParts.slice(i,j+1).join(separator),newRemainingPath=newFilenameParts.slice(i,k+1).join(separator);return finalPrefix.length&&finalSuffix.length?finalPrefix+separator+\"{\"+oldRemainingPath+\" \u2192 \"+newRemainingPath+\"}\"+separator+finalSuffix:finalPrefix.length?finalPrefix+separator+\"{\"+oldRemainingPath+\" \u2192 \"+newRemainingPath+\"}\":finalSuffix.length?\"{\"+oldRemainingPath+\" \u2192 \"+newRemainingPath+\"}\"+separator+finalSuffix:oldFilename+\" \u2192 \"+newFilename}return newFilename&&!isDevNullName(newFilename)?newFilename:oldFilename?oldFilename:\"unknown\/file\/path\"},PrinterUtils.prototype.getFileTypeIcon=function(file){var templateName=\"file-changed\";return file.isRename?templateName=\"file-renamed\":file.isCopy?templateName=\"file-renamed\":file.isNew?templateName=\"file-added\":file.isDeleted?templateName=\"file-deleted\":file.newName!==file.oldName&&(templateName=\"file-renamed\"),templateName},PrinterUtils.prototype.diffHighlight=function(diffLine1,diffLine2,config){var linePrefix1,linePrefix2,unprefixedLine1,unprefixedLine2,prefixSize=1;config.isCombined&&(prefixSize=2),linePrefix1=diffLine1.substr(0,prefixSize),linePrefix2=diffLine2.substr(0,prefixSize),unprefixedLine1=diffLine1.substr(prefixSize),unprefixedLine2=diffLine2.substr(prefixSize);var diff;diff=config.charByChar?jsDiff.diffChars(unprefixedLine1,unprefixedLine2):jsDiff.diffWordsWithSpace(unprefixedLine1,unprefixedLine2);var highlightedLine=\"\",changedWords=[];if(!config.charByChar&&\"words\"===config.matching){var treshold=.25;\"undefined\"!=typeof config.matchWordsThreshold&&(treshold=config.matchWordsThreshold);var matcher=Rematch.rematch(function(a,b){var amod=a.value,bmod=b.value;return Rematch.distance(amod,bmod)}),removed=diff.filter(function(element){return element.removed}),added=diff.filter(function(element){return element.added}),chunks=matcher(added,removed);chunks.forEach(function(chunk){if(1===chunk[0].length&&1===chunk[1].length){var dist=Rematch.distance(chunk[0][0].value,chunk[1][0].value);treshold>dist&&(changedWords.push(chunk[0][0]),changedWords.push(chunk[1][0]))}})}return diff.forEach(function(part){var addClass=changedWords.indexOf(part)>-1?\' class=\"d2h-change\"\':\"\",elemType=part.added?\"ins\":part.removed?\"del\":null,escapedValue=utils.escape(part.value);highlightedLine+=null!==elemType?\"<\"+elemType+addClass+\">\"+escapedValue+\"<\/\"+elemType+\">\":escapedValue}),{first:{prefix:linePrefix1,line:removeIns(highlightedLine)},second:{prefix:linePrefix2,line:removeDel(highlightedLine)}}},module.exports.PrinterUtils=new PrinterUtils}()},{\".\/rematch.js\":29,\".\/utils.js\":32,diff:13}],29:[function(require,module){!function(){function levenshtein(a,b){if(0==a.length)return b.length;if(0==b.length)return a.length;var i,matrix=[];for(i=0;i<=b.length;i++)matrix[i]=[i];var j;for(j=0;j<=a.length;j++)matrix[0][j]=j;for(i=1;i<=b.length;i++)for(j=1;j<=a.length;j++)matrix[i][j]=b.charAt(i-1)==a.charAt(j-1)?matrix[i-1][j-1]:Math.min(matrix[i-1][j-1]+1,Math.min(matrix[i][j-1]+1,matrix[i-1][j]+1));return matrix[b.length][a.length]}var Rematch={};Rematch.levenshtein=levenshtein,Rematch.distance=function(x,y){x=x.trim(),y=y.trim();var lev=levenshtein(x,y),score=lev\/(x.length+y.length);return score},Rematch.rematch=function(distanceFunction){function findBestMatch(a,b,cache){var cachecount=0;for(var key in cache)cachecount++;for(var bestMatch,bestMatchDist=1\/0,i=0;i<a.length;++i)for(var j=0;j<b.length;++j){var md,cacheKey=JSON.stringify([a[i],b[j]]);cache.hasOwnProperty(cacheKey)?md=cache[cacheKey]:(md=distanceFunction(a[i],b[j]),cache[cacheKey]=md),bestMatchDist>md&&(bestMatchDist=md,bestMatch={indexA:i,indexB:j,score:bestMatchDist})}return bestMatch}function group(a,b,level,cache){\"undefined\"==typeof cache&&(cache={});var bm=findBestMatch(a,b,cache);if(level||(level=0),!bm||a.length+b.length<3)return[[a,b]];var a1=a.slice(0,bm.indexA),b1=b.slice(0,bm.indexB),aMatch=[a[bm.indexA]],bMatch=[b[bm.indexB]],tailA=bm.indexA+1,tailB=bm.indexB+1,a2=a.slice(tailA),b2=b.slice(tailB),group1=group(a1,b1,level+1,cache),groupMatch=group(aMatch,bMatch,level+1,cache),group2=group(a2,b2,level+1,cache),result=groupMatch;return(bm.indexA>0||bm.indexB>0)&&(result=group1.concat(result)),(a.length>tailA||b.length>tailB)&&(result=result.concat(group2)),result}return group},module.exports.Rematch=Rematch}()},{}],30:[function(require,module){!function(){function SideBySidePrinter(config){this.config=config}var diffParser=require(\".\/diff-parser.js\").DiffParser,printerUtils=require(\".\/printer-utils.js\").PrinterUtils,utils=require(\".\/utils.js\").Utils,Rematch=require(\".\/rematch.js\").Rematch,hoganUtils=require(\".\/hoganjs-utils.js\").HoganJsUtils,genericTemplatesPath=\"generic\",baseTemplatesPath=\"side-by-side\",iconsBaseTemplatesPath=\"icon\",tagsBaseTemplatesPath=\"tag\",matcher=Rematch.rematch(function(a,b){var amod=a.content.substr(1),bmod=b.content.substr(1);return Rematch.distance(amod,bmod)});SideBySidePrinter.prototype.makeDiffHtml=function(file,diffs){var fileDiffTemplate=hoganUtils.template(baseTemplatesPath,\"file-diff\"),filePathTemplate=hoganUtils.template(genericTemplatesPath,\"file-path\"),fileIconTemplate=hoganUtils.template(iconsBaseTemplatesPath,\"file\"),fileTagTemplate=hoganUtils.template(tagsBaseTemplatesPath,printerUtils.getFileTypeIcon(file));\n-\n-return fileDiffTemplate.render({file:file,fileHtmlId:printerUtils.getHtmlId(file),diffs:diffs,filePath:filePathTemplate.render({fileDiffName:printerUtils.getDiffName(file)},{fileIcon:fileIconTemplate,fileTag:fileTagTemplate})})},SideBySidePrinter.prototype.generateSideBySideJsonHtml=function(diffFiles){var that=this,content=diffFiles.map(function(file){var diffs;return diffs=file.blocks.length?that.generateSideBySideFileHtml(file):that.generateEmptyDiff(),that.makeDiffHtml(file,diffs)}).join(\"\\n\");return hoganUtils.render(genericTemplatesPath,\"wrapper\",{content:content})},SideBySidePrinter.prototype.makeSideHtml=function(blockHeader){return hoganUtils.render(genericTemplatesPath,\"column-line-number\",{diffParser:diffParser,blockHeader:blockHeader,lineClass:\"d2h-code-side-linenumber\",contentClass:\"d2h-code-side-line\"})},SideBySidePrinter.prototype.generateSideBySideFileHtml=function(file){var that=this,fileHtml={};return fileHtml.left=\"\",fileHtml.right=\"\",file.blocks.forEach(function(block){function processChangeBlock(){var matches,insertType,deleteType,comparisons=oldLines.length*newLines.length,maxComparisons=that.config.matchingMaxComparisons||2500,doMatching=maxComparisons>comparisons&&(\"lines\"===that.config.matching||\"words\"===that.config.matching);doMatching?(matches=matcher(oldLines,newLines),insertType=diffParser.LINE_TYPE.INSERT_CHANGES,deleteType=diffParser.LINE_TYPE.DELETE_CHANGES):(matches=[[oldLines,newLines]],insertType=diffParser.LINE_TYPE.INSERTS,deleteType=diffParser.LINE_TYPE.DELETES),matches.forEach(function(match){oldLines=match[0],newLines=match[1];for(var common=Math.min(oldLines.length,newLines.length),max=Math.max(oldLines.length,newLines.length),j=0;common>j;j++){var oldLine=oldLines[j],newLine=newLines[j];that.config.isCombined=file.isCombined;var diff=printerUtils.diffHighlight(oldLine.content,newLine.content,that.config);fileHtml.left+=that.generateSingleLineHtml(deleteType,oldLine.oldNumber,diff.first.line,diff.first.prefix),fileHtml.right+=that.generateSingleLineHtml(insertType,newLine.newNumber,diff.second.line,diff.second.prefix)}if(max>common){var oldSlice=oldLines.slice(common),newSlice=newLines.slice(common),tmpHtml=that.processLines(oldSlice,newSlice);fileHtml.left+=tmpHtml.left,fileHtml.right+=tmpHtml.right}}),oldLines=[],newLines=[]}fileHtml.left+=that.makeSideHtml(block.header),fileHtml.right+=that.makeSideHtml(\"\");for(var oldLines=[],newLines=[],i=0;i<block.lines.length;i++){var line=block.lines[i],prefix=line.content[0],escapedLine=utils.escape(line.content.substr(1));line.type!==diffParser.LINE_TYPE.INSERTS&&(newLines.length>0||line.type!==diffParser.LINE_TYPE.DELETES&&oldLines.length>0)&&processChangeBlock(),line.type===diffParser.LINE_TYPE.CONTEXT?(fileHtml.left+=that.generateSingleLineHtml(line.type,line.oldNumber,escapedLine,prefix),fileHtml.right+=that.generateSingleLineHtml(line.type,line.newNumber,escapedLine,prefix)):line.type!==diffParser.LINE_TYPE.INSERTS||oldLines.length?line.type===diffParser.LINE_TYPE.DELETES?oldLines.push(line):line.type===diffParser.LINE_TYPE.INSERTS&&Boolean(oldLines.length)?newLines.push(line):(console.error(\"unknown state in html side-by-side generator\"),processChangeBlock()):(fileHtml.left+=that.generateSingleLineHtml(diffParser.LINE_TYPE.CONTEXT,\"\",\"\",\"\"),fileHtml.right+=that.generateSingleLineHtml(line.type,line.newNumber,escapedLine,prefix))}processChangeBlock()}),fileHtml},SideBySidePrinter.prototype.processLines=function(oldLines,newLines){var that=this,fileHtml={};fileHtml.left=\"\",fileHtml.right=\"\";for(var maxLinesNumber=Math.max(oldLines.length,newLines.length),i=0;maxLinesNumber>i;i++){var oldContent,newContent,oldPrefix,newPrefix,oldLine=oldLines[i],newLine=newLines[i];oldLine&&(oldContent=utils.escape(oldLine.content.substr(1)),oldPrefix=oldLine.content[0]),newLine&&(newContent=utils.escape(newLine.content.substr(1)),newPrefix=newLine.content[0]),oldLine&&newLine?(fileHtml.left+=that.generateSingleLineHtml(oldLine.type,oldLine.oldNumber,oldContent,oldPrefix),fileHtml.right+=that.generateSingleLineHtml(newLine.type,newLine.newNumber,newContent,newPrefix)):oldLine?(fileHtml.left+=that.generateSingleLineHtml(oldLine.type,oldLine.oldNumber,oldContent,oldPrefix),fileHtml.right+=that.generateSingleLineHtml(diffParser.LINE_TYPE.CONTEXT,\"\",\"\",\"\")):newLine?(fileHtml.left+=that.generateSingleLineHtml(diffParser.LINE_TYPE.CONTEXT,\"\",\"\",\"\"),fileHtml.right+=that.generateSingleLineHtml(newLine.type,newLine.newNumber,newContent,newPrefix)):console.error(\"How did it get here?\")}return fileHtml},SideBySidePrinter.prototype.generateSingleLineHtml=function(type,number,content,prefix){return hoganUtils.render(genericTemplatesPath,\"line\",{type:type,lineClass:\"d2h-code-side-linenumber\",contentClass:\"d2h-code-side-line\",prefix:prefix&&utils.convertWhiteSpaceToNonBreakingSpace(prefix),content:content&&utils.convertWhiteSpaceToNonBreakingSpace(content),lineNumber:number})},SideBySidePrinter.prototype.generateEmptyDiff=function(){var fileHtml={};return fileHtml.right=\"\",fileHtml.left=hoganUtils.render(genericTemplatesPath,\"empty-diff\",{contentClass:\"d2h-code-side-line\",diffParser:diffParser}),fileHtml},module.exports.SideBySidePrinter=SideBySidePrinter}()},{\".\/diff-parser.js\":22,\".\/hoganjs-utils.js\":25,\".\/printer-utils.js\":28,\".\/rematch.js\":29,\".\/utils.js\":32}],31:[function(require,module){(function(global){!function(){global.browserTemplates||(global.browserTemplates={});var Hogan=require(\"hogan.js\");global.browserTemplates[\"file-summary-line\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<li class=\"d2h-file-list-line\">\'),t.b(\"\\n\"+i),t.b(\' <span class=\"d2h-file-name-wrapper\">\'),t.b(\"\\n\"+i),t.b(\" <span>\"),t.b(t.rp(\"<fileIcon0\",c,p,\"\")),t.b(\"<\/span>\"),t.b(\"\\n\"+i),t.b(\' <a href=\"#\'),t.b(t.v(t.f(\"fileHtmlId\",c,p,0))),t.b(\'\" class=\"d2h-file-name\">\'),t.b(t.v(t.f(\"fileName\",c,p,0))),t.b(\"<\/a>\"),t.b(\"\\n\"+i),t.b(\' <span class=\"d2h-file-stats\">\'),t.b(\"\\n\"+i),t.b(\' <span class=\"d2h-lines-added\">\'),t.b(t.v(t.f(\"addedLines\",c,p,0))),t.b(\"<\/span>\"),t.b(\"\\n\"+i),t.b(\' <span class=\"d2h-lines-deleted\">\'),t.b(t.v(t.f(\"deletedLines\",c,p,0))),t.b(\"<\/span>\"),t.b(\"\\n\"+i),t.b(\" <\/span>\"),t.b(\"\\n\"+i),t.b(\" <\/span>\"),t.b(\"\\n\"+i),t.b(\"<\/li>\"),t.fl()},partials:{\"<fileIcon0\":{name:\"fileIcon\",partials:{},subs:{}}},subs:{}}),global.browserTemplates[\"file-summary-wrapper\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<div class=\"d2h-file-list-wrapper\">\'),t.b(\"\\n\"+i),t.b(\' <div class=\"d2h-file-list-header\">\'),t.b(\"\\n\"+i),t.b(\' <span class=\"d2h-file-list-title\">Files changed (\'),t.b(t.v(t.f(\"filesNumber\",c,p,0))),t.b(\")<\/span>\"),t.b(\"\\n\"+i),t.b(\' <a class=\"d2h-file-switch d2h-hide\">hide<\/a>\'),t.b(\"\\n\"+i),t.b(\' <a class=\"d2h-file-switch d2h-show\">show<\/a>\'),t.b(\"\\n\"+i),t.b(\" <\/div>\"),t.b(\"\\n\"+i),t.b(\' <ol class=\"d2h-file-list\">\'),t.b(\"\\n\"+i),t.b(\" \"),t.b(t.t(t.f(\"files\",c,p,0))),t.b(\"\\n\"+i),t.b(\" <\/ol>\"),t.b(\"\\n\"+i),t.b(\"<\/div>\"),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"generic-column-line-number\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\"<tr>\"),t.b(\"\\n\"+i),t.b(\' <td class=\"\'),t.b(t.v(t.f(\"lineClass\",c,p,0))),t.b(\" \"),t.b(t.v(t.d(\"diffParser.LINE_TYPE.INFO\",c,p,0))),t.b(\'\"><\/td>\'),t.b(\"\\n\"+i),t.b(\' <td class=\"\'),t.b(t.v(t.d(\"diffParser.LINE_TYPE.INFO\",c,p,0))),t.b(\'\">\'),t.b(\"\\n\"+i),t.b(\' <div class=\"\'),t.b(t.v(t.f(\"contentClass\",c,p,0))),t.b(\" \"),t.b(t.v(t.d(\"diffParser.LINE_TYPE.INFO\",c,p,0))),t.b(\'\">\'),t.b(t.t(t.f(\"blockHeader\",c,p,0))),t.b(\"<\/div>\"),t.b(\"\\n\"+i),t.b(\" <\/td>\"),t.b(\"\\n\"+i),t.b(\"<\/tr>\"),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"generic-empty-diff\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\"<tr>\"),t.b(\"\\n\"+i),t.b(\' <td class=\"\'),t.b(t.v(t.d(\"diffParser.LINE_TYPE.INFO\",c,p,0))),t.b(\'\">\'),t.b(\"\\n\"+i),t.b(\' <div class=\"\'),t.b(t.v(t.f(\"contentClass\",c,p,0))),t.b(\" \"),t.b(t.v(t.d(\"diffParser.LINE_TYPE.INFO\",c,p,0))),t.b(\'\">\'),t.b(\"\\n\"+i),t.b(\" File without changes\"),t.b(\"\\n\"+i),t.b(\" <\/div>\"),t.b(\"\\n\"+i),t.b(\" <\/td>\"),t.b(\"\\n\"+i),t.b(\"<\/tr>\"),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"generic-file-path\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<span class=\"d2h-file-name-wrapper\">\'),t.b(\"\\n\"+i),t.b(\' <span class=\"d2h-icon-wrapper\">\'),t.b(t.rp(\"<fileIcon0\",c,p,\"\")),t.b(\"<\/span>\"),t.b(\"\\n\"+i),t.b(\' <span class=\"d2h-file-name\">\'),t.b(t.v(t.f(\"fileDiffName\",c,p,0))),t.b(\"<\/span>\"),t.b(\"\\n\"+i),t.b(t.rp(\"<fileTag1\",c,p,\" \")),t.b(\"<\/span>\"),t.fl()},partials:{\"<fileIcon0\":{name:\"fileIcon\",partials:{},subs:{}},\"<fileTag1\":{name:\"fileTag\",partials:{},subs:{}}},subs:{}}),global.browserTemplates[\"generic-line\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\"<tr>\"),t.b(\"\\n\"+i),t.b(\' <td class=\"\'),t.b(t.v(t.f(\"lineClass\",c,p,0))),t.b(\" \"),t.b(t.v(t.f(\"type\",c,p,0))),t.b(\'\">\'),t.b(\"\\n\"+i),t.b(\" \"),t.b(t.t(t.f(\"lineNumber\",c,p,0))),t.b(\"\\n\"+i),t.b(\" <\/td>\"),t.b(\"\\n\"+i),t.b(\' <td class=\"\'),t.b(t.v(t.f(\"type\",c,p,0))),t.b(\'\">\'),t.b(\"\\n\"+i),t.b(\' <div class=\"\'),t.b(t.v(t.f(\"contentClass\",c,p,0))),t.b(\" \"),t.b(t.v(t.f(\"type\",c,p,0))),t.b(\'\">\'),t.b(\"\\n\"+i),t.s(t.f(\"prefix\",c,p,1),c,p,0,171,247,\"{{ }}\")&&(t.rs(c,p,function(c,p,t){t.b(\' <span class=\"d2h-code-line-prefix\">\'),t.b(t.t(t.f(\"prefix\",c,p,0))),t.b(\"<\/span>\"),t.b(\"\\n\"+i)}),c.pop()),t.s(t.f(\"content\",c,p,1),c,p,0,279,353,\"{{ }}\")&&(t.rs(c,p,function(c,p,t){t.b(\' <span class=\"d2h-code-line-ctn\">\'),t.b(t.t(t.f(\"content\",c,p,0))),t.b(\"<\/span>\"),t.b(\"\\n\"+i)}),c.pop()),t.b(\" <\/div>\"),t.b(\"\\n\"+i),t.b(\" <\/td>\"),t.b(\"\\n\"+i),t.b(\"<\/tr>\"),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"generic-wrapper\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<div class=\"d2h-wrapper\">\'),t.b(\"\\n\"+i),t.b(\" \"),t.b(t.t(t.f(\"content\",c,p,0))),t.b(\"\\n\"+i),t.b(\"<\/div>\"),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"icon-file-added\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<svg aria-hidden=\"true\" class=\"d2h-icon d2h-added\" height=\"16\" title=\"added\" version=\"1.1\" viewBox=\"0 0 14 16\"\'),t.b(\"\\n\"+i),t.b(\' width=\"14\">\'),t.b(\"\\n\"+i),t.b(\' <path d=\"M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z\"><\/path>\'),t.b(\"\\n\"+i),t.b(\"<\/svg>\"),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"icon-file-changed\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<svg aria-hidden=\"true\" class=\"d2h-icon d2h-changed\" height=\"16\" title=\"modified\" version=\"1.1\"\'),t.b(\"\\n\"+i),t.b(\' viewBox=\"0 0 14 16\" width=\"14\">\'),t.b(\"\\n\"+i),t.b(\' <path d=\"M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z\"><\/path>\'),t.b(\"\\n\"+i),t.b(\"<\/svg>\"),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"icon-file-deleted\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<svg aria-hidden=\"true\" class=\"d2h-icon d2h-deleted\" height=\"16\" title=\"removed\" version=\"1.1\"\'),t.b(\"\\n\"+i),t.b(\' viewBox=\"0 0 14 16\" width=\"14\">\'),t.b(\"\\n\"+i),t.b(\' <path d=\"M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z\"><\/path>\'),t.b(\"\\n\"+i),t.b(\"<\/svg>\"),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"icon-file-renamed\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<svg aria-hidden=\"true\" class=\"d2h-icon d2h-moved\" height=\"16\" title=\"renamed\" version=\"1.1\"\'),t.b(\"\\n\"+i),t.b(\' viewBox=\"0 0 14 16\" width=\"14\">\'),t.b(\"\\n\"+i),t.b(\' <path d=\"M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z\"><\/path>\'),t.b(\"\\n\"+i),t.b(\"<\/svg>\"),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"icon-file\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<svg aria-hidden=\"true\" class=\"d2h-icon\" height=\"16\" version=\"1.1\" viewBox=\"0 0 12 16\" width=\"12\">\'),t.b(\"\\n\"+i),t.b(\' <path d=\"M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z\"><\/path>\'),t.b(\"\\n\"+i),t.b(\"<\/svg>\"),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"line-by-line-file-diff\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<div id=\"\'),t.b(t.v(t.f(\"fileHtmlId\",c,p,0))),t.b(\'\" class=\"d2h-file-wrapper\" data-lang=\"\'),t.b(t.v(t.d(\"file.language\",c,p,0))),t.b(\'\">\'),t.b(\"\\n\"+i),t.b(\' <div class=\"d2h-file-header\">\'),t.b(\"\\n\"+i),t.b(\" \"),t.b(t.t(t.f(\"filePath\",c,p,0))),t.b(\"\\n\"+i),t.b(\" <\/div>\"),t.b(\"\\n\"+i),t.b(\' <div class=\"d2h-file-diff\">\'),t.b(\"\\n\"+i),t.b(\' <div class=\"d2h-code-wrapper\">\'),t.b(\"\\n\"+i),t.b(\' <table class=\"d2h-diff-table\">\'),t.b(\"\\n\"+i),t.b(\' <tbody class=\"d2h-diff-tbody\">\'),t.b(\"\\n\"+i),t.b(\" \"),t.b(t.t(t.f(\"diffs\",c,p,0))),t.b(\"\\n\"+i),t.b(\" <\/tbody>\"),t.b(\"\\n\"+i),t.b(\" <\/table>\"),t.b(\"\\n\"+i),t.b(\" <\/div>\"),t.b(\"\\n\"+i),t.b(\" <\/div>\"),t.b(\"\\n\"+i),t.b(\"<\/div>\"),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"line-by-line-numbers\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<div class=\"line-num1\">\'),t.b(t.v(t.f(\"oldNumber\",c,p,0))),t.b(\"<\/div>\"),t.b(\"\\n\"+i),t.b(\'<div class=\"line-num2\">\'),t.b(t.v(t.f(\"newNumber\",c,p,0))),t.b(\"<\/div>\"),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"side-by-side-file-diff\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<div id=\"\'),t.b(t.v(t.f(\"fileHtmlId\",c,p,0))),t.b(\'\" class=\"d2h-file-wrapper\" data-lang=\"\'),t.b(t.v(t.d(\"file.language\",c,p,0))),t.b(\'\">\'),t.b(\"\\n\"+i),t.b(\' <div class=\"d2h-file-header\">\'),t.b(\"\\n\"+i),t.b(\" \"),t.b(t.t(t.f(\"filePath\",c,p,0))),t.b(\"\\n\"+i),t.b(\" <\/div>\"),t.b(\"\\n\"+i),t.b(\' <div class=\"d2h-files-diff\">\'),t.b(\"\\n\"+i),t.b(\' <div class=\"d2h-file-side-diff\">\'),t.b(\"\\n\"+i),t.b(\' <div class=\"d2h-code-wrapper\">\'),t.b(\"\\n\"+i),t.b(\' <table class=\"d2h-diff-table\">\'),t.b(\"\\n\"+i),t.b(\' <tbody class=\"d2h-diff-tbody\">\'),t.b(\"\\n\"+i),t.b(\" \"),t.b(t.t(t.d(\"diffs.left\",c,p,0))),t.b(\"\\n\"+i),t.b(\" <\/tbody>\"),t.b(\"\\n\"+i),t.b(\" <\/table>\"),t.b(\"\\n\"+i),t.b(\" <\/div>\"),t.b(\"\\n\"+i),t.b(\" <\/div>\"),t.b(\"\\n\"+i),t.b(\' <div class=\"d2h-file-side-diff\">\'),t.b(\"\\n\"+i),t.b(\' <div class=\"d2h-code-wrapper\">\'),t.b(\"\\n\"+i),t.b(\' <table class=\"d2h-diff-table\">\'),t.b(\"\\n\"+i),t.b(\' <tbody class=\"d2h-diff-tbody\">\'),t.b(\"\\n\"+i),t.b(\" \"),t.b(t.t(t.d(\"diffs.right\",c,p,0))),t.b(\"\\n\"+i),t.b(\" <\/tbody>\"),t.b(\"\\n\"+i),t.b(\" <\/table>\"),t.b(\"\\n\"+i),t.b(\" <\/div>\"),t.b(\"\\n\"+i),t.b(\" <\/div>\"),t.b(\"\\n\"+i),t.b(\" <\/div>\"),t.b(\"\\n\"+i),t.b(\"<\/div>\"),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"tag-file-added\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<span class=\"d2h-tag d2h-added d2h-added-tag\">ADDED<\/span>\'),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"tag-file-changed\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<span class=\"d2h-tag d2h-changed d2h-changed-tag\">CHANGED<\/span>\'),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"tag-file-deleted\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<span class=\"d2h-tag d2h-deleted d2h-deleted-tag\">DELETED<\/span>\'),t.fl()},partials:{},subs:{}}),global.browserTemplates[\"tag-file-renamed\"]=new Hogan.Template({code:function(c,p,i){var t=this;return t.b(i=i||\"\"),t.b(\'<span class=\"d2h-tag d2h-moved d2h-moved-tag\">RENAMED<\/span>\'),t.fl()},partials:{},subs:{}}),module.exports=global.browserTemplates}()}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"hogan.js\":20}],32:[function(require,module){!function(){function Utils(){}Utils.prototype.convertWhiteSpaceToNonBreakingSpace=function(str){return str.slice(0).replace(\/ \/g,\" \")},Utils.prototype.escape=function(str){return str.slice(0).replace(\/&\/g,\"&\").replace(\/<\/g,\"<\").replace(\/>\/g,\">\").replace(\/\\t\/g,\" \")},Utils.prototype.startsWith=function(str,start){if(\"object\"==typeof start){var result=!1;return start.forEach(function(s){0===str.indexOf(s)&&(result=!0)}),result}return 0===str.indexOf(start)},Utils.prototype.valueOrEmpty=function(value){return value?value:\"\"},module.exports.Utils=new Utils}()},{}]},{},[23]);\n\\ No newline at end of file\n+},Hogan.wrapMain=function(code){return\'var t=this;t.b(i=i||\"\");\'+code+\"return t.fl();\"},Hogan.template=Hogan.Template,Hogan.makeTemplate=function(codeObj,text,options){var template=this.makePartials(codeObj);return template.code=new Function(\"c\",\"p\",\"i\",this.wrapMain(codeObj.code)),new this.template(template,text,this,options)},Hogan.makePartials=function(codeObj){var key,template={subs:{},partials:codeObj.partials,name:codeObj.name};for(key in template.partials)template.partials[key]=this.makePartials(template.partials[key]);for(key in codeObj.subs)template.subs[key]=new Function(\"c\",\"p\",\"t\",\"i\",codeObj.subs[key]);return template},Hogan.codegen={\"#\":function(node,context){context.code+=\"if(t.s(t.\"+chooseMethod(node.n)+\'(\"\'+esc(node.n)+\'\",c,p,1),c,p,0,\'+node.i+\",\"+node.end+\',\"\'+node.otag+\" \"+node.ctag+\'\")){t.rs(c,p,function(c,p,t){\',Hogan.walk(node.nodes,context),context.code+=\"});c.pop();}\"},\"^\":function(node,context){context.code+=\"if(!t.s(t.\"+chooseMethod(node.n)+\'(\"\'+esc(node.n)+\'\",c,p,1),c,p,1,0,0,\"\")){\',Hogan.walk(node.nodes,context),context.code+=\"};\"},\">\":createPartial,\"<\":function(node,context){var ctx={partials:{},code:\"\",subs:{},inPartial:!0};Hogan.walk(node.nodes,ctx);var template=context.partials[createPartial(node,context)];template.subs=ctx.subs,template.partials=ctx.partials},$:function(node,context){var ctx={subs:{},code:\"\",partials:context.partials,prefix:node.n};Hogan.walk(node.nodes,ctx),";
$(document).ready(function() {
var diff2htmlUi = new Diff2HtmlUI({diff: lineDiffExample});
diff2htmlUi.draw('#line-by-line', {inputFormat: 'json', showFiles: true, matching: 'lines'});
diff2htmlUi.fileListCloseable('#line-by-line', false);
diff2htmlUi.highlightCode('#line-by-line');
diff2htmlUi.draw('#side-by-side', {
inputFormat: 'json',
showFiles: true,
matching: 'lines',
outputFormat: 'side-by-side',
synchronisedScroll: true
});
diff2htmlUi.fileListCloseable('#side-by-side', false);
diff2htmlUi.highlightCode('#side-by-side');
});
</script>