From 0f849d458165344ca7e7a700e16569f1a3df78c4 Mon Sep 17 00:00:00 2001 From: Rodrigo Fernandes Date: Sat, 16 Jun 2018 18:57:04 +0100 Subject: [PATCH] Release version 2.4.0 --- bower.json | 2 +- dist/diff2html-ui.min.js | 2 +- dist/diff2html.css | 24 +--- dist/diff2html.js | 293 ++++++++++++++++++++++++--------------- dist/diff2html.min.css | 2 +- dist/diff2html.min.js | 2 +- docs/demo.js | 9 +- docs/demo.min.js | 2 +- docs/main.css | 12 +- docs/main.min.css | 2 +- package.json | 2 +- 11 files changed, 203 insertions(+), 149 deletions(-) diff --git a/bower.json b/bower.json index 086824b..c10af06 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "diff2html", - "version": "2.3.3", + "version": "2.4.0", "homepage": "https://diff2html.xyz", "description": "Fast Diff to colorized HTML", "keywords": [ diff --git a/dist/diff2html-ui.min.js b/dist/diff2html-ui.min.js index 5ac92c1..3e049cb 100644 --- a/dist/diff2html-ui.min.js +++ b/dist/diff2html-ui.min.js @@ -1 +1 @@ -!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o/gm,">")}function tag(node){return node.nodeName.toLowerCase()}var ArrayProto=[];HighlightJS.prototype.nodeStream=function(node){var result=[];return function _nodeStream(node,offset){for(var child=node.firstChild;child;child=child.nextSibling)3===child.nodeType?offset+=child.nodeValue.length:1===child.nodeType&&(result.push({event:"start",offset:offset,node:child}),offset=_nodeStream(child,offset),tag(child).match(/br|hr|img|input/)||result.push({event:"stop",offset:offset,node:child}));return offset}(node,0),result},HighlightJS.prototype.mergeStreams=function(original,highlighted,value){function selectStream(){return original.length&&highlighted.length?original[0].offset!==highlighted[0].offset?original[0].offset"}function close(node){result+=""}function render(event){("start"===event.event?open:close)(event.node)}for(var processed=0,result="",nodeStack=[];original.length||highlighted.length;){var stream=selectStream();if(result+=escape(value.substring(processed,stream[0].offset)),processed=stream[0].offset,stream===original){nodeStack.reverse().forEach(close);do{render(stream.splice(0,1)[0]),stream=selectStream()}while(stream===original&&stream.length&&stream[0].offset===processed);nodeStack.reverse().forEach(open)}else"start"===stream[0].event?nodeStack.push(stream[0].node):nodeStack.pop(),render(stream.splice(0,1)[0])}return result+escape(value.substr(processed))},module.exports.HighlightJS=new HighlightJS}()},{}]},{},[1]); \ No newline at end of file +!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o/gm,">")}function tag(node){return node.nodeName.toLowerCase()}HighlightJS.prototype.nodeStream=function(node){var result=[];return function _nodeStream(node,offset){for(var child=node.firstChild;child;child=child.nextSibling)3===child.nodeType?offset+=child.nodeValue.length:1===child.nodeType&&(result.push({event:"start",offset:offset,node:child}),offset=_nodeStream(child,offset),tag(child).match(/br|hr|img|input/)||result.push({event:"stop",offset:offset,node:child}));return offset}(node,0),result},HighlightJS.prototype.mergeStreams=function(original,highlighted,value){var processed=0,result="",nodeStack=[];function selectStream(){return original.length&&highlighted.length?original[0].offset!==highlighted[0].offset?original[0].offset"}function close(node){result+=""}function render(event){("start"===event.event?open:close)(event.node)}for(;original.length||highlighted.length;){var stream=selectStream();if(result+=escape(value.substring(processed,stream[0].offset)),processed=stream[0].offset,stream===original){for(nodeStack.reverse().forEach(close);render(stream.splice(0,1)[0]),(stream=selectStream())===original&&stream.length&&stream[0].offset===processed;);nodeStack.reverse().forEach(open)}else"start"===stream[0].event?nodeStack.push(stream[0].node):nodeStack.pop(),render(stream.splice(0,1)[0])}return result+escape(value.substr(processed))},module.exports.HighlightJS=new HighlightJS}()},{}]},{},[1]); \ No newline at end of file diff --git a/dist/diff2html.css b/dist/diff2html.css index 31b97a2..9edb2e1 100644 --- a/dist/diff2html.css +++ b/dist/diff2html.css @@ -16,8 +16,6 @@ } .d2h-file-stats { - display: -webkit-box; - display: -ms-flexbox; display: flex; margin-left: auto; font-size: 14px; @@ -43,11 +41,7 @@ } .d2h-file-name-wrapper { - display: -webkit-box; - display: -ms-flexbox; display: flex; - -webkit-box-align: center; - -ms-flex-align: center; align-items: center; width: 100%; font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; @@ -149,8 +143,7 @@ } .line-num1 { - -webkit-box-sizing: border-box; - box-sizing: border-box; + box-sizing: border-box; float: left; width: 40px; overflow: hidden; @@ -159,8 +152,7 @@ } .line-num2 { - -webkit-box-sizing: border-box; - box-sizing: border-box; + box-sizing: border-box; float: right; width: 40px; overflow: hidden; @@ -169,8 +161,7 @@ } .d2h-code-linenumber { - -webkit-box-sizing: border-box; - box-sizing: border-box; + box-sizing: border-box; position: absolute; width: 86px; padding-left: 2px; @@ -184,8 +175,7 @@ } .d2h-code-side-linenumber { - -webkit-box-sizing: border-box; - box-sizing: border-box; + box-sizing: border-box; position: absolute; width: 56px; padding-left: 5px; @@ -254,8 +244,6 @@ } .d2h-file-list-line { - display: -webkit-box; - display: -ms-flexbox; display: flex; text-align: left; } @@ -310,8 +298,6 @@ } .d2h-tag { - display: -webkit-box; - display: -ms-flexbox; display: flex; font-size: 10px; margin-left: 5px; @@ -374,4 +360,4 @@ background: transparent; } -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy91aS9jc3MvZGlmZjJodG1sLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs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bmctcmlnaHQgdGQuZDJoLWNvZGUtbGluZW51bWJlcjo6c2VsZWN0aW9uLFxuLnNlbGVjdGluZy1sZWZ0IC5kMmgtY29kZS1zaWRlLWxpbmU6OnNlbGVjdGlvbixcbi5zZWxlY3RpbmctbGVmdCAuZDJoLWNvZGUtc2lkZS1saW5lICo6OnNlbGVjdGlvbixcbi5zZWxlY3RpbmctcmlnaHQgdGQuZDJoLWNvZGUtc2lkZS1saW5lbnVtYmVyOjpzZWxlY3Rpb24sXG4uc2VsZWN0aW5nLXJpZ2h0IHRkLmQyaC1jb2RlLXNpZGUtbGluZW51bWJlciAqOjpzZWxlY3Rpb24ge1xuICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcbn1cbiJdfQ== */ \ No newline at end of file diff --git a/dist/diff2html.js b/dist/diff2html.js index 355f959..78151b6 100644 --- a/dist/diff2html.js +++ b/dist/diff2html.js @@ -3,7 +3,7 @@ },{}],2:[function(require,module,exports){ /*! - diff v3.3.1 + diff v3.5.0 Software License Agreement (BSD License) @@ -326,7 +326,11 @@ return /******/ (function(modules) { // webpackBootstrap return oldPos; }, /*istanbul ignore start*/ /*istanbul ignore end*/equals: function equals(left, right) { - return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); + if (this.options.comparator) { + return this.options.comparator(left, right); + } else { + return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); + } }, /*istanbul ignore start*/ /*istanbul ignore end*/removeEmpty: function removeEmpty(array) { var ret = []; @@ -389,10 +393,11 @@ return /******/ (function(modules) { // webpackBootstrap } } - // Special case handle for when one terminal is ignored. For this case we merge the - // terminal into the prior string and drop the change. + // Special case handle for when one terminal is ignored (i.e. whitespace). + // For this case we merge the terminal into the prior string and drop the change. + // This is only available for string mode. var lastComponent = components[componentLen - 1]; - if (componentLen > 1 && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { + if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { components[componentLen - 2].value += lastComponent.value; components.pop(); } @@ -670,16 +675,16 @@ return /******/ (function(modules) { // webpackBootstrap jsonDiff.tokenize = /*istanbul ignore start*/_line.lineDiff /*istanbul ignore end*/.tokenize; jsonDiff.castInput = function (value) { - /*istanbul ignore start*/var /*istanbul ignore end*/undefinedReplacement = this.options.undefinedReplacement; + /*istanbul ignore start*/var _options = /*istanbul ignore end*/this.options, + undefinedReplacement = _options.undefinedReplacement, + _options$stringifyRep = _options.stringifyReplacer, + stringifyReplacer = _options$stringifyRep === undefined ? function (k, v) /*istanbul ignore start*/{ + return (/*istanbul ignore end*/typeof v === 'undefined' ? undefinedReplacement : v + ); + } : _options$stringifyRep; - return typeof value === 'string' ? value : JSON.stringify(canonicalize(value), function (k, v) { - if (typeof v === 'undefined') { - return undefinedReplacement; - } - - return v; - }, ' '); + return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); }; jsonDiff.equals = function (left, right) { return (/*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')) @@ -691,11 +696,15 @@ return /******/ (function(modules) { // webpackBootstrap } // This function handles the presence of circular references by bailing out when encountering an - // object that is already on the "stack" of items being processed. - function canonicalize(obj, stack, replacementStack) { + // object that is already on the "stack" of items being processed. Accepts an optional replacer + function canonicalize(obj, stack, replacementStack, replacer, key) { stack = stack || []; replacementStack = replacementStack || []; + if (replacer) { + obj = replacer(key, obj); + } + var i = /*istanbul ignore start*/void 0 /*istanbul ignore end*/; for (i = 0; i < stack.length; i += 1) { @@ -711,7 +720,7 @@ return /******/ (function(modules) { // webpackBootstrap canonicalizedObj = new Array(obj.length); replacementStack.push(canonicalizedObj); for (i = 0; i < obj.length; i += 1) { - canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack); + canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); } stack.pop(); replacementStack.pop(); @@ -727,17 +736,17 @@ return /******/ (function(modules) { // webpackBootstrap canonicalizedObj = {}; replacementStack.push(canonicalizedObj); var sortedKeys = [], - key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/; - for (key in obj) { + _key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/; + for (_key in obj) { /* istanbul ignore else */ - if (obj.hasOwnProperty(key)) { - sortedKeys.push(key); + if (obj.hasOwnProperty(_key)) { + sortedKeys.push(_key); } } sortedKeys.sort(); for (i = 0; i < sortedKeys.length; i += 1) { - key = sortedKeys[i]; - canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack); + _key = sortedKeys[i]; + canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); } stack.pop(); replacementStack.pop(); @@ -766,9 +775,12 @@ return /******/ (function(modules) { // webpackBootstrap function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /*istanbul ignore end*/var arrayDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/arrayDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/(); - arrayDiff.tokenize = arrayDiff.join = function (value) { + arrayDiff.tokenize = function (value) { return value.slice(); }; + arrayDiff.join = arrayDiff.removeEmpty = function (value) { + return value; + }; function diffArrays(oldArr, newArr, callback) { return arrayDiff.diff(oldArr, newArr, callback); @@ -830,8 +842,8 @@ return /******/ (function(modules) { // webpackBootstrap function hunkFits(hunk, toPos) { for (var j = 0; j < hunk.lines.length; j++) { var line = hunk.lines[j], - operation = line[0], - content = line.substr(1); + operation = line.length > 0 ? line[0] : ' ', + content = line.length > 0 ? line.substr(1) : line; if (operation === ' ' || operation === '-') { // Context sanity check @@ -888,8 +900,8 @@ return /******/ (function(modules) { // webpackBootstrap for (var j = 0; j < _hunk.lines.length; j++) { var line = _hunk.lines[j], - operation = line[0], - content = line.substr(1), + operation = line.length > 0 ? line[0] : ' ', + content = line.length > 0 ? line.substr(1) : line, delimiter = _hunk.linedelimiters[j]; if (operation === ' ') { @@ -1027,16 +1039,16 @@ return /******/ (function(modules) { // webpackBootstrap // Parses the --- and +++ headers, if none are found, no lines // are consumed. function parseFileHeader(index) { - var headerPattern = /^(---|\+\+\+)\s+([\S ]*)(?:\t(.*?)\s*)?$/; - var fileHeader = headerPattern.exec(diffstr[i]); + var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]); if (fileHeader) { var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new'; - var fileName = fileHeader[2].replace(/\\\\/g, '\\'); + var data = fileHeader[2].split('\t', 2); + var fileName = data[0].replace(/\\\\/g, '\\'); if (/^".*"$/.test(fileName)) { fileName = fileName.substr(1, fileName.length - 2); } index[keyPrefix + 'FileName'] = fileName; - index[keyPrefix + 'Header'] = fileHeader[3]; + index[keyPrefix + 'Header'] = (data[1] || '').trim(); i++; } @@ -1066,7 +1078,7 @@ return /******/ (function(modules) { // webpackBootstrap if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) { break; } - var operation = diffstr[i][0]; + var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { hunk.lines.push(diffstr[i]); @@ -1187,27 +1199,19 @@ return /******/ (function(modules) { // webpackBootstrap /*istanbul ignore start*/function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } /*istanbul ignore end*/function calcLineCount(hunk) { - var conflicted = false; + /*istanbul ignore start*/var _calcOldNewLineCount = /*istanbul ignore end*/calcOldNewLineCount(hunk.lines), + oldLines = _calcOldNewLineCount.oldLines, + newLines = _calcOldNewLineCount.newLines; - hunk.oldLines = 0; - hunk.newLines = 0; - - hunk.lines.forEach(function (line) { - if (typeof line !== 'string') { - conflicted = true; - return; - } - - if (line[0] === '+' || line[0] === ' ') { - hunk.newLines++; - } - if (line[0] === '-' || line[0] === ' ') { - hunk.oldLines++; - } - }); - - if (conflicted) { + if (oldLines !== undefined) { + hunk.oldLines = oldLines; + } else { delete hunk.oldLines; + } + + if (newLines !== undefined) { + hunk.newLines = newLines; + } else { delete hunk.newLines; } } @@ -1539,6 +1543,43 @@ return /******/ (function(modules) { // webpackBootstrap return true; } + function calcOldNewLineCount(lines) { + var oldLines = 0; + var newLines = 0; + + lines.forEach(function (line) { + if (typeof line !== 'string') { + var myCount = calcOldNewLineCount(line.mine); + var theirCount = calcOldNewLineCount(line.theirs); + + if (oldLines !== undefined) { + if (myCount.oldLines === theirCount.oldLines) { + oldLines += myCount.oldLines; + } else { + oldLines = undefined; + } + } + + if (newLines !== undefined) { + if (myCount.newLines === theirCount.newLines) { + newLines += myCount.newLines; + } else { + newLines = undefined; + } + } + } else { + if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { + newLines++; + } + if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { + oldLines++; + } + } + }); + + return { oldLines: oldLines, newLines: newLines }; + } + /***/ }), @@ -2734,7 +2775,7 @@ Stack.prototype.set = stackSet; module.exports = Stack; -},{"./_ListCache":7,"./_stackClear":77,"./_stackDelete":78,"./_stackGet":79,"./_stackHas":80,"./_stackSet":81}],11:[function(require,module,exports){ +},{"./_ListCache":7,"./_stackClear":78,"./_stackDelete":79,"./_stackGet":80,"./_stackHas":81,"./_stackSet":82}],11:[function(require,module,exports){ var root = require('./_root'); /** Built-in value references. */ @@ -2824,7 +2865,7 @@ function arrayLikeKeys(value, inherited) { module.exports = arrayLikeKeys; -},{"./_baseTimes":30,"./_isIndex":53,"./isArguments":86,"./isArray":87,"./isBuffer":90,"./isTypedArray":96}],15:[function(require,module,exports){ +},{"./_baseTimes":30,"./_isIndex":53,"./isArguments":87,"./isArray":88,"./isBuffer":91,"./isTypedArray":97}],15:[function(require,module,exports){ var baseAssignValue = require('./_baseAssignValue'), eq = require('./eq'); @@ -2846,7 +2887,7 @@ function assignMergeValue(object, key, value) { module.exports = assignMergeValue; -},{"./_baseAssignValue":18,"./eq":84}],16:[function(require,module,exports){ +},{"./_baseAssignValue":18,"./eq":85}],16:[function(require,module,exports){ var baseAssignValue = require('./_baseAssignValue'), eq = require('./eq'); @@ -2876,7 +2917,7 @@ function assignValue(object, key, value) { module.exports = assignValue; -},{"./_baseAssignValue":18,"./eq":84}],17:[function(require,module,exports){ +},{"./_baseAssignValue":18,"./eq":85}],17:[function(require,module,exports){ var eq = require('./eq'); /** @@ -2899,7 +2940,7 @@ function assocIndexOf(array, key) { module.exports = assocIndexOf; -},{"./eq":84}],18:[function(require,module,exports){ +},{"./eq":85}],18:[function(require,module,exports){ var defineProperty = require('./_defineProperty'); /** @@ -2958,7 +2999,7 @@ var baseCreate = (function() { module.exports = baseCreate; -},{"./isObject":93}],20:[function(require,module,exports){ +},{"./isObject":94}],20:[function(require,module,exports){ var createBaseFor = require('./_createBaseFor'); /** @@ -3026,7 +3067,7 @@ function baseIsArguments(value) { module.exports = baseIsArguments; -},{"./_baseGetTag":21,"./isObjectLike":94}],23:[function(require,module,exports){ +},{"./_baseGetTag":21,"./isObjectLike":95}],23:[function(require,module,exports){ var isFunction = require('./isFunction'), isMasked = require('./_isMasked'), isObject = require('./isObject'), @@ -3075,7 +3116,7 @@ function baseIsNative(value) { module.exports = baseIsNative; -},{"./_isMasked":56,"./_toSource":82,"./isFunction":91,"./isObject":93}],24:[function(require,module,exports){ +},{"./_isMasked":56,"./_toSource":83,"./isFunction":92,"./isObject":94}],24:[function(require,module,exports){ var baseGetTag = require('./_baseGetTag'), isLength = require('./isLength'), isObjectLike = require('./isObjectLike'); @@ -3137,7 +3178,7 @@ function baseIsTypedArray(value) { module.exports = baseIsTypedArray; -},{"./_baseGetTag":21,"./isLength":92,"./isObjectLike":94}],25:[function(require,module,exports){ +},{"./_baseGetTag":21,"./isLength":93,"./isObjectLike":95}],25:[function(require,module,exports){ var isObject = require('./isObject'), isPrototype = require('./_isPrototype'), nativeKeysIn = require('./_nativeKeysIn'); @@ -3172,13 +3213,14 @@ function baseKeysIn(object) { module.exports = baseKeysIn; -},{"./_isPrototype":57,"./_nativeKeysIn":69,"./isObject":93}],26:[function(require,module,exports){ +},{"./_isPrototype":57,"./_nativeKeysIn":69,"./isObject":94}],26:[function(require,module,exports){ var Stack = require('./_Stack'), assignMergeValue = require('./_assignMergeValue'), baseFor = require('./_baseFor'), baseMergeDeep = require('./_baseMergeDeep'), isObject = require('./isObject'), - keysIn = require('./keysIn'); + keysIn = require('./keysIn'), + safeGet = require('./_safeGet'); /** * The base implementation of `_.merge` without support for multiple sources. @@ -3202,7 +3244,7 @@ function baseMerge(object, source, srcIndex, customizer, stack) { } else { var newValue = customizer - ? customizer(object[key], srcValue, (key + ''), object, source, stack) + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { @@ -3215,7 +3257,7 @@ function baseMerge(object, source, srcIndex, customizer, stack) { module.exports = baseMerge; -},{"./_Stack":10,"./_assignMergeValue":15,"./_baseFor":20,"./_baseMergeDeep":27,"./isObject":93,"./keysIn":97}],27:[function(require,module,exports){ +},{"./_Stack":10,"./_assignMergeValue":15,"./_baseFor":20,"./_baseMergeDeep":27,"./_safeGet":75,"./isObject":94,"./keysIn":98}],27:[function(require,module,exports){ var assignMergeValue = require('./_assignMergeValue'), cloneBuffer = require('./_cloneBuffer'), cloneTypedArray = require('./_cloneTypedArray'), @@ -3229,6 +3271,7 @@ var assignMergeValue = require('./_assignMergeValue'), isObject = require('./isObject'), isPlainObject = require('./isPlainObject'), isTypedArray = require('./isTypedArray'), + safeGet = require('./_safeGet'), toPlainObject = require('./toPlainObject'); /** @@ -3247,8 +3290,8 @@ var assignMergeValue = require('./_assignMergeValue'), * counterparts. */ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = object[key], - srcValue = source[key], + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), stacked = stack.get(srcValue); if (stacked) { @@ -3310,7 +3353,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta module.exports = baseMergeDeep; -},{"./_assignMergeValue":15,"./_cloneBuffer":33,"./_cloneTypedArray":34,"./_copyArray":35,"./_initCloneObject":52,"./isArguments":86,"./isArray":87,"./isArrayLikeObject":89,"./isBuffer":90,"./isFunction":91,"./isObject":93,"./isPlainObject":95,"./isTypedArray":96,"./toPlainObject":100}],28:[function(require,module,exports){ +},{"./_assignMergeValue":15,"./_cloneBuffer":33,"./_cloneTypedArray":34,"./_copyArray":35,"./_initCloneObject":52,"./_safeGet":75,"./isArguments":87,"./isArray":88,"./isArrayLikeObject":90,"./isBuffer":91,"./isFunction":92,"./isObject":94,"./isPlainObject":96,"./isTypedArray":97,"./toPlainObject":101}],28:[function(require,module,exports){ var identity = require('./identity'), overRest = require('./_overRest'), setToString = require('./_setToString'); @@ -3329,7 +3372,7 @@ function baseRest(func, start) { module.exports = baseRest; -},{"./_overRest":73,"./_setToString":75,"./identity":85}],29:[function(require,module,exports){ +},{"./_overRest":73,"./_setToString":76,"./identity":86}],29:[function(require,module,exports){ var constant = require('./constant'), defineProperty = require('./_defineProperty'), identity = require('./identity'); @@ -3353,7 +3396,7 @@ var baseSetToString = !defineProperty ? identity : function(func, string) { module.exports = baseSetToString; -},{"./_defineProperty":40,"./constant":83,"./identity":85}],30:[function(require,module,exports){ +},{"./_defineProperty":40,"./constant":84,"./identity":86}],30:[function(require,module,exports){ /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. @@ -3887,10 +3930,13 @@ var reIsUint = /^(?:0|[1-9]\d*)$/; * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { + var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; @@ -3927,7 +3973,7 @@ function isIterateeCall(value, index, object) { module.exports = isIterateeCall; -},{"./_isIndex":53,"./eq":84,"./isArrayLike":88,"./isObject":93}],55:[function(require,module,exports){ +},{"./_isIndex":53,"./eq":85,"./isArrayLike":89,"./isObject":94}],55:[function(require,module,exports){ /** * Checks if `value` is suitable for use as unique object key. * @@ -4256,6 +4302,14 @@ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); @@ -4353,6 +4407,23 @@ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; },{"./_freeGlobal":41}],75:[function(require,module,exports){ +/** + * Gets the value at `key`, unless `key` is "__proto__". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function safeGet(object, key) { + return key == '__proto__' + ? undefined + : object[key]; +} + +module.exports = safeGet; + +},{}],76:[function(require,module,exports){ var baseSetToString = require('./_baseSetToString'), shortOut = require('./_shortOut'); @@ -4368,7 +4439,7 @@ var setToString = shortOut(baseSetToString); module.exports = setToString; -},{"./_baseSetToString":29,"./_shortOut":76}],76:[function(require,module,exports){ +},{"./_baseSetToString":29,"./_shortOut":77}],77:[function(require,module,exports){ /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800, HOT_SPAN = 16; @@ -4407,7 +4478,7 @@ function shortOut(func) { module.exports = shortOut; -},{}],77:[function(require,module,exports){ +},{}],78:[function(require,module,exports){ var ListCache = require('./_ListCache'); /** @@ -4424,7 +4495,7 @@ function stackClear() { module.exports = stackClear; -},{"./_ListCache":7}],78:[function(require,module,exports){ +},{"./_ListCache":7}],79:[function(require,module,exports){ /** * Removes `key` and its value from the stack. * @@ -4444,7 +4515,7 @@ function stackDelete(key) { module.exports = stackDelete; -},{}],79:[function(require,module,exports){ +},{}],80:[function(require,module,exports){ /** * Gets the stack value for `key`. * @@ -4460,7 +4531,7 @@ function stackGet(key) { module.exports = stackGet; -},{}],80:[function(require,module,exports){ +},{}],81:[function(require,module,exports){ /** * Checks if a stack value for `key` exists. * @@ -4476,7 +4547,7 @@ function stackHas(key) { module.exports = stackHas; -},{}],81:[function(require,module,exports){ +},{}],82:[function(require,module,exports){ var ListCache = require('./_ListCache'), Map = require('./_Map'), MapCache = require('./_MapCache'); @@ -4512,7 +4583,7 @@ function stackSet(key, value) { module.exports = stackSet; -},{"./_ListCache":7,"./_Map":8,"./_MapCache":9}],82:[function(require,module,exports){ +},{"./_ListCache":7,"./_Map":8,"./_MapCache":9}],83:[function(require,module,exports){ /** Used for built-in method references. */ var funcProto = Function.prototype; @@ -4540,7 +4611,7 @@ function toSource(func) { module.exports = toSource; -},{}],83:[function(require,module,exports){ +},{}],84:[function(require,module,exports){ /** * Creates a function that returns `value`. * @@ -4568,7 +4639,7 @@ function constant(value) { module.exports = constant; -},{}],84:[function(require,module,exports){ +},{}],85:[function(require,module,exports){ /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -4607,7 +4678,7 @@ function eq(value, other) { module.exports = eq; -},{}],85:[function(require,module,exports){ +},{}],86:[function(require,module,exports){ /** * This method returns the first argument it receives. * @@ -4630,7 +4701,7 @@ function identity(value) { module.exports = identity; -},{}],86:[function(require,module,exports){ +},{}],87:[function(require,module,exports){ var baseIsArguments = require('./_baseIsArguments'), isObjectLike = require('./isObjectLike'); @@ -4668,7 +4739,7 @@ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsAr module.exports = isArguments; -},{"./_baseIsArguments":22,"./isObjectLike":94}],87:[function(require,module,exports){ +},{"./_baseIsArguments":22,"./isObjectLike":95}],88:[function(require,module,exports){ /** * Checks if `value` is classified as an `Array` object. * @@ -4696,7 +4767,7 @@ var isArray = Array.isArray; module.exports = isArray; -},{}],88:[function(require,module,exports){ +},{}],89:[function(require,module,exports){ var isFunction = require('./isFunction'), isLength = require('./isLength'); @@ -4731,7 +4802,7 @@ function isArrayLike(value) { module.exports = isArrayLike; -},{"./isFunction":91,"./isLength":92}],89:[function(require,module,exports){ +},{"./isFunction":92,"./isLength":93}],90:[function(require,module,exports){ var isArrayLike = require('./isArrayLike'), isObjectLike = require('./isObjectLike'); @@ -4766,7 +4837,7 @@ function isArrayLikeObject(value) { module.exports = isArrayLikeObject; -},{"./isArrayLike":88,"./isObjectLike":94}],90:[function(require,module,exports){ +},{"./isArrayLike":89,"./isObjectLike":95}],91:[function(require,module,exports){ var root = require('./_root'), stubFalse = require('./stubFalse'); @@ -4806,7 +4877,7 @@ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; -},{"./_root":74,"./stubFalse":99}],91:[function(require,module,exports){ +},{"./_root":74,"./stubFalse":100}],92:[function(require,module,exports){ var baseGetTag = require('./_baseGetTag'), isObject = require('./isObject'); @@ -4845,7 +4916,7 @@ function isFunction(value) { module.exports = isFunction; -},{"./_baseGetTag":21,"./isObject":93}],92:[function(require,module,exports){ +},{"./_baseGetTag":21,"./isObject":94}],93:[function(require,module,exports){ /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; @@ -4882,7 +4953,7 @@ function isLength(value) { module.exports = isLength; -},{}],93:[function(require,module,exports){ +},{}],94:[function(require,module,exports){ /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) @@ -4915,7 +4986,7 @@ function isObject(value) { module.exports = isObject; -},{}],94:[function(require,module,exports){ +},{}],95:[function(require,module,exports){ /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". @@ -4946,7 +5017,7 @@ function isObjectLike(value) { module.exports = isObjectLike; -},{}],95:[function(require,module,exports){ +},{}],96:[function(require,module,exports){ var baseGetTag = require('./_baseGetTag'), getPrototype = require('./_getPrototype'), isObjectLike = require('./isObjectLike'); @@ -5010,7 +5081,7 @@ function isPlainObject(value) { module.exports = isPlainObject; -},{"./_baseGetTag":21,"./_getPrototype":44,"./isObjectLike":94}],96:[function(require,module,exports){ +},{"./_baseGetTag":21,"./_getPrototype":44,"./isObjectLike":95}],97:[function(require,module,exports){ var baseIsTypedArray = require('./_baseIsTypedArray'), baseUnary = require('./_baseUnary'), nodeUtil = require('./_nodeUtil'); @@ -5039,7 +5110,7 @@ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedA module.exports = isTypedArray; -},{"./_baseIsTypedArray":24,"./_baseUnary":31,"./_nodeUtil":70}],97:[function(require,module,exports){ +},{"./_baseIsTypedArray":24,"./_baseUnary":31,"./_nodeUtil":70}],98:[function(require,module,exports){ var arrayLikeKeys = require('./_arrayLikeKeys'), baseKeysIn = require('./_baseKeysIn'), isArrayLike = require('./isArrayLike'); @@ -5073,7 +5144,7 @@ function keysIn(object) { module.exports = keysIn; -},{"./_arrayLikeKeys":14,"./_baseKeysIn":25,"./isArrayLike":88}],98:[function(require,module,exports){ +},{"./_arrayLikeKeys":14,"./_baseKeysIn":25,"./isArrayLike":89}],99:[function(require,module,exports){ var baseMerge = require('./_baseMerge'), createAssigner = require('./_createAssigner'); @@ -5114,7 +5185,7 @@ var merge = createAssigner(function(object, source, srcIndex) { module.exports = merge; -},{"./_baseMerge":26,"./_createAssigner":38}],99:[function(require,module,exports){ +},{"./_baseMerge":26,"./_createAssigner":38}],100:[function(require,module,exports){ /** * This method returns `false`. * @@ -5134,7 +5205,7 @@ function stubFalse() { module.exports = stubFalse; -},{}],100:[function(require,module,exports){ +},{}],101:[function(require,module,exports){ var copyObject = require('./_copyObject'), keysIn = require('./keysIn'); @@ -5168,7 +5239,7 @@ function toPlainObject(value) { module.exports = toPlainObject; -},{"./_copyObject":36,"./keysIn":97}],101:[function(require,module,exports){ +},{"./_copyObject":36,"./keysIn":98}],102:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -5396,7 +5467,7 @@ var substr = 'ab'.substr(-1) === 'b' ; }).call(this,require('_process')) -},{"_process":102}],102:[function(require,module,exports){ +},{"_process":103}],103:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -5582,7 +5653,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],103:[function(require,module,exports){ +},{}],104:[function(require,module,exports){ /* * * Diff Parser (diff-parser.js) @@ -6029,7 +6100,7 @@ process.umask = function() { return 0; }; module.exports.DiffParser = new DiffParser(); })(); -},{"./utils.js":113}],104:[function(require,module,exports){ +},{"./utils.js":114}],105:[function(require,module,exports){ (function (global){ /* * @@ -6141,7 +6212,7 @@ process.umask = function() { return 0; }; })(); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./diff-parser.js":103,"./html-printer.js":107,"./utils.js":113}],105:[function(require,module,exports){ +},{"./diff-parser.js":104,"./html-printer.js":108,"./utils.js":114}],106:[function(require,module,exports){ /* * * FileListPrinter (file-list-printer.js) @@ -6190,7 +6261,7 @@ process.umask = function() { return 0; }; module.exports.FileListPrinter = FileListPrinter; })(); -},{"./hoganjs-utils.js":106,"./printer-utils.js":109}],106:[function(require,module,exports){ +},{"./hoganjs-utils.js":107,"./printer-utils.js":110}],107:[function(require,module,exports){ (function (__dirname){ /* * @@ -6283,7 +6354,7 @@ process.umask = function() { return 0; }; })(); }).call(this,"/src") -},{"./templates/diff2html-templates.js":112,"fs":1,"hogan.js":4,"path":101}],107:[function(require,module,exports){ +},{"./templates/diff2html-templates.js":113,"fs":1,"hogan.js":4,"path":102}],108:[function(require,module,exports){ /* * * HtmlPrinter (html-printer.js) @@ -6317,7 +6388,7 @@ process.umask = function() { return 0; }; module.exports.HtmlPrinter = new HtmlPrinter(); })(); -},{"./file-list-printer.js":105,"./line-by-line-printer.js":108,"./side-by-side-printer.js":111}],108:[function(require,module,exports){ +},{"./file-list-printer.js":106,"./line-by-line-printer.js":109,"./side-by-side-printer.js":112}],109:[function(require,module,exports){ /* * * LineByLinePrinter (line-by-line-printer.js) @@ -6542,7 +6613,7 @@ process.umask = function() { return 0; }; module.exports.LineByLinePrinter = LineByLinePrinter; })(); -},{"./diff-parser.js":103,"./hoganjs-utils.js":106,"./printer-utils.js":109,"./rematch.js":110,"./utils.js":113}],109:[function(require,module,exports){ +},{"./diff-parser.js":104,"./hoganjs-utils.js":107,"./printer-utils.js":110,"./rematch.js":111,"./utils.js":114}],110:[function(require,module,exports){ /* * * PrinterUtils (printer-utils.js) @@ -6794,7 +6865,7 @@ process.umask = function() { return 0; }; module.exports.PrinterUtils = new PrinterUtils(); })(); -},{"./rematch.js":110,"./utils.js":113,"diff":2}],110:[function(require,module,exports){ +},{"./rematch.js":111,"./utils.js":114,"diff":2}],111:[function(require,module,exports){ /* * * Rematch (rematch.js) @@ -6937,7 +7008,7 @@ process.umask = function() { return 0; }; module.exports.Rematch = Rematch; })(); -},{}],111:[function(require,module,exports){ +},{}],112:[function(require,module,exports){ /* * * HtmlPrinter (html-printer.js) @@ -7197,7 +7268,7 @@ process.umask = function() { return 0; }; module.exports.SideBySidePrinter = SideBySidePrinter; })(); -},{"./diff-parser.js":103,"./hoganjs-utils.js":106,"./printer-utils.js":109,"./rematch.js":110,"./utils.js":113}],112:[function(require,module,exports){ +},{"./diff-parser.js":104,"./hoganjs-utils.js":107,"./printer-utils.js":110,"./rematch.js":111,"./utils.js":114}],113:[function(require,module,exports){ (function (global){ (function() { if (!!!global.browserTemplates) global.browserTemplates = {}; @@ -7224,7 +7295,7 @@ module.exports = global.browserTemplates; })(); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"hogan.js":4}],113:[function(require,module,exports){ +},{"hogan.js":4}],114:[function(require,module,exports){ /* * * Utils (utils.js) @@ -7277,4 +7348,4 @@ module.exports = global.browserTemplates; module.exports.Utils = new Utils(); })(); -},{"lodash/merge":98}]},{},[104]); +},{"lodash/merge":99}]},{},[105]); diff --git a/dist/diff2html.min.css b/dist/diff2html.min.css index 7d9b53c..a3dcea0 100644 --- a/dist/diff2html.min.css +++ b/dist/diff2html.min.css @@ -1 +1 @@ -.d2h-wrapper{text-align:left}.d2h-file-header{padding:5px 10px;border-bottom:1px solid #d8d8d8;background-color:#f7f7f7}.d2h-file-stats{display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:auto;font-size:14px}.d2h-lines-added{text-align:right;border:1px solid #b4e2b4;border-radius:5px 0 0 5px;color:#399839;padding:2px;vertical-align:middle}.d2h-lines-deleted{text-align:left;border:1px solid #e9aeae;border-radius:0 5px 5px 0;color:#c33;padding:2px;vertical-align:middle;margin-left:1px}.d2h-file-name-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px}.d2h-file-name{white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;line-height:21px}.d2h-file-wrapper{border:1px solid #ddd;border-radius:3px;margin-bottom:1em}.d2h-diff-table{width:100%;border-collapse:collapse;font-family:Menlo,Consolas,monospace;font-size:13px}.d2h-diff-tbody>tr>td{height:20px;line-height:20px}.d2h-files-diff{display:block;width:100%;height:100%}.d2h-file-diff{overflow-x:scroll;overflow-y:hidden}.d2h-file-side-diff{display:inline-block;overflow-x:scroll;overflow-y:hidden;width:50%;margin-right:-4px;margin-bottom:-8px}.d2h-code-line{display:inline-block;white-space:nowrap;padding:0 10px;margin-left:80px}.d2h-code-side-line{display:inline-block;white-space:nowrap;padding:0 10px;margin-left:50px}.d2h-code-line del,.d2h-code-side-line del{display:inline-block;margin-top:-1px;text-decoration:none;background-color:#ffb6ba;border-radius:.2em}.d2h-code-line ins,.d2h-code-side-line ins{display:inline-block;margin-top:-1px;text-decoration:none;background-color:#97f295;border-radius:.2em;text-align:left}.d2h-code-line-prefix{display:inline;background:0 0;padding:0;word-wrap:normal;white-space:pre}.d2h-code-line-ctn{display:inline;background:0 0;padding:0;word-wrap:normal;white-space:pre}.line-num1{-webkit-box-sizing:border-box;box-sizing:border-box;float:left;width:40px;overflow:hidden;text-overflow:ellipsis;padding-left:3px}.line-num2{-webkit-box-sizing:border-box;box-sizing:border-box;float:right;width:40px;overflow:hidden;text-overflow:ellipsis;padding-left:3px}.d2h-code-linenumber{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;width:86px;padding-left:2px;padding-right:2px;background-color:#fff;color:rgba(0,0,0,.3);text-align:right;border:solid #eee;border-width:0 1px 0 1px;cursor:pointer}.d2h-code-side-linenumber{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;width:56px;padding-left:5px;padding-right:5px;background-color:#fff;color:rgba(0,0,0,.3);text-align:right;border:solid #eee;border-width:0 1px 0 1px;cursor:pointer;overflow:hidden;text-overflow:ellipsis}.d2h-del{background-color:#fee8e9;border-color:#e9aeae}.d2h-ins{background-color:#dfd;border-color:#b4e2b4}.d2h-info{background-color:#f8fafd;color:rgba(0,0,0,.3);border-color:#d5e4f2}.d2h-file-diff .d2h-del.d2h-change{background-color:#fdf2d0}.d2h-file-diff .d2h-ins.d2h-change{background-color:#ded}.d2h-file-list-wrapper{margin-bottom:10px}.d2h-file-list-wrapper a{text-decoration:none;color:#3572b0}.d2h-file-list-wrapper a:visited{color:#3572b0}.d2h-file-list-header{text-align:left}.d2h-file-list-title{font-weight:700}.d2h-file-list-line{display:-webkit-box;display:-ms-flexbox;display:flex;text-align:left}.d2h-file-list{display:block;list-style:none;padding:0;margin:0}.d2h-file-list>li{border-bottom:#ddd solid 1px;padding:5px 10px;margin:0}.d2h-file-list>li:last-child{border-bottom:none}.d2h-file-switch{display:none;font-size:10px;cursor:pointer}.d2h-icon-wrapper{line-height:31px}.d2h-icon{vertical-align:middle;margin-right:10px;fill:currentColor}.d2h-deleted{color:#c33}.d2h-added{color:#399839}.d2h-changed{color:#d0b44c}.d2h-moved{color:#3572b0}.d2h-tag{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:10px;margin-left:5px;padding:0 2px;background-color:#fff}.d2h-deleted-tag{border:#c33 1px solid}.d2h-added-tag{border:#399839 1px solid}.d2h-changed-tag{border:#d0b44c 1px solid}.d2h-moved-tag{border:#3572b0 1px solid}.selecting-left .d2h-code-line,.selecting-left .d2h-code-line *,.selecting-left .d2h-code-side-line,.selecting-left .d2h-code-side-line *,.selecting-right td.d2h-code-linenumber,.selecting-right td.d2h-code-linenumber *,.selecting-right td.d2h-code-side-linenumber,.selecting-right td.d2h-code-side-linenumber *{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.selecting-left .d2h-code-line ::-moz-selection,.selecting-left .d2h-code-line::-moz-selection,.selecting-left .d2h-code-side-line ::-moz-selection,.selecting-left .d2h-code-side-line::-moz-selection,.selecting-right td.d2h-code-linenumber::-moz-selection,.selecting-right td.d2h-code-side-linenumber ::-moz-selection,.selecting-right td.d2h-code-side-linenumber::-moz-selection{background:0 0}.selecting-left .d2h-code-line ::selection,.selecting-left .d2h-code-line::selection,.selecting-left .d2h-code-side-line ::selection,.selecting-left .d2h-code-side-line::selection,.selecting-right td.d2h-code-linenumber::selection,.selecting-right td.d2h-code-side-linenumber ::selection,.selecting-right td.d2h-code-side-linenumber::selection{background:0 0} \ No newline at end of file +.d2h-wrapper{text-align:left}.d2h-file-header{padding:5px 10px;border-bottom:1px solid #d8d8d8;background-color:#f7f7f7}.d2h-file-stats{display:flex;margin-left:auto;font-size:14px}.d2h-lines-added{text-align:right;border:1px solid #b4e2b4;border-radius:5px 0 0 5px;color:#399839;padding:2px;vertical-align:middle}.d2h-lines-deleted{text-align:left;border:1px solid #e9aeae;border-radius:0 5px 5px 0;color:#c33;padding:2px;vertical-align:middle;margin-left:1px}.d2h-file-name-wrapper{display:flex;align-items:center;width:100%;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px}.d2h-file-name{white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;line-height:21px}.d2h-file-wrapper{border:1px solid #ddd;border-radius:3px;margin-bottom:1em}.d2h-diff-table{width:100%;border-collapse:collapse;font-family:Menlo,Consolas,monospace;font-size:13px}.d2h-diff-tbody>tr>td{height:20px;line-height:20px}.d2h-files-diff{display:block;width:100%;height:100%}.d2h-file-diff{overflow-x:scroll;overflow-y:hidden}.d2h-file-side-diff{display:inline-block;overflow-x:scroll;overflow-y:hidden;width:50%;margin-right:-4px;margin-bottom:-8px}.d2h-code-line{display:inline-block;white-space:nowrap;padding:0 10px;margin-left:80px}.d2h-code-side-line{display:inline-block;white-space:nowrap;padding:0 10px;margin-left:50px}.d2h-code-line del,.d2h-code-side-line del{display:inline-block;margin-top:-1px;text-decoration:none;background-color:#ffb6ba;border-radius:.2em}.d2h-code-line ins,.d2h-code-side-line ins{display:inline-block;margin-top:-1px;text-decoration:none;background-color:#97f295;border-radius:.2em;text-align:left}.d2h-code-line-prefix{display:inline;background:0 0;padding:0;word-wrap:normal;white-space:pre}.d2h-code-line-ctn{display:inline;background:0 0;padding:0;word-wrap:normal;white-space:pre}.line-num1{box-sizing:border-box;float:left;width:40px;overflow:hidden;text-overflow:ellipsis;padding-left:3px}.line-num2{box-sizing:border-box;float:right;width:40px;overflow:hidden;text-overflow:ellipsis;padding-left:3px}.d2h-code-linenumber{box-sizing:border-box;position:absolute;width:86px;padding-left:2px;padding-right:2px;background-color:#fff;color:rgba(0,0,0,.3);text-align:right;border:solid #eee;border-width:0 1px 0 1px;cursor:pointer}.d2h-code-side-linenumber{box-sizing:border-box;position:absolute;width:56px;padding-left:5px;padding-right:5px;background-color:#fff;color:rgba(0,0,0,.3);text-align:right;border:solid #eee;border-width:0 1px 0 1px;cursor:pointer;overflow:hidden;text-overflow:ellipsis}.d2h-del{background-color:#fee8e9;border-color:#e9aeae}.d2h-ins{background-color:#dfd;border-color:#b4e2b4}.d2h-info{background-color:#f8fafd;color:rgba(0,0,0,.3);border-color:#d5e4f2}.d2h-file-diff .d2h-del.d2h-change{background-color:#fdf2d0}.d2h-file-diff .d2h-ins.d2h-change{background-color:#ded}.d2h-file-list-wrapper{margin-bottom:10px}.d2h-file-list-wrapper a{text-decoration:none;color:#3572b0}.d2h-file-list-wrapper a:visited{color:#3572b0}.d2h-file-list-header{text-align:left}.d2h-file-list-title{font-weight:700}.d2h-file-list-line{display:flex;text-align:left}.d2h-file-list{display:block;list-style:none;padding:0;margin:0}.d2h-file-list>li{border-bottom:#ddd solid 1px;padding:5px 10px;margin:0}.d2h-file-list>li:last-child{border-bottom:none}.d2h-file-switch{display:none;font-size:10px;cursor:pointer}.d2h-icon-wrapper{line-height:31px}.d2h-icon{vertical-align:middle;margin-right:10px;fill:currentColor}.d2h-deleted{color:#c33}.d2h-added{color:#399839}.d2h-changed{color:#d0b44c}.d2h-moved{color:#3572b0}.d2h-tag{display:flex;font-size:10px;margin-left:5px;padding:0 2px;background-color:#fff}.d2h-deleted-tag{border:#c33 1px solid}.d2h-added-tag{border:#399839 1px solid}.d2h-changed-tag{border:#d0b44c 1px solid}.d2h-moved-tag{border:#3572b0 1px solid}.selecting-left .d2h-code-line,.selecting-left .d2h-code-line *,.selecting-left .d2h-code-side-line,.selecting-left .d2h-code-side-line *,.selecting-right td.d2h-code-linenumber,.selecting-right td.d2h-code-linenumber *,.selecting-right td.d2h-code-side-linenumber,.selecting-right td.d2h-code-side-linenumber *{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.selecting-left .d2h-code-line ::-moz-selection,.selecting-left .d2h-code-line::-moz-selection,.selecting-left .d2h-code-side-line ::-moz-selection,.selecting-left .d2h-code-side-line::-moz-selection,.selecting-right td.d2h-code-linenumber::-moz-selection,.selecting-right td.d2h-code-side-linenumber ::-moz-selection,.selecting-right td.d2h-code-side-linenumber::-moz-selection{background:0 0}.selecting-left .d2h-code-line ::selection,.selecting-left .d2h-code-line::selection,.selecting-left .d2h-code-side-line ::selection,.selecting-left .d2h-code-side-line::selection,.selecting-right td.d2h-code-linenumber::selection,.selecting-right td.d2h-code-side-linenumber ::selection,.selecting-right td.d2h-code-side-linenumber::selection{background:0 0} \ No newline at end of file diff --git a/dist/diff2html.min.js b/dist/diff2html.min.js index 20d7ea7..acf2da4 100644 --- a/dist/diff2html.min.js +++ b/dist/diff2html.min.js @@ -1 +1 @@ -!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;ovalue.length?oldValue:value}),component.value=diff.join(value)}else component.value=diff.join(newString.slice(newPos,newPos+component.count));newPos+=component.count,component.added||(oldPos+=component.count)}}var lastComponent=components[componentLen-1];return componentLen>1&&(lastComponent.added||lastComponent.removed)&&diff.equals("",lastComponent.value)&&(components[componentLen-2].value+=lastComponent.value,components.pop()),components}function clonePath(path){return{newPos:path.newPos,components:path.components.slice(0)}}exports.__esModule=!0,exports.default=Diff,Diff.prototype={diff:function(oldString,newString){function done(value){return callback?(setTimeout(function(){callback(void 0,value)},0),!0):value}function execEditLength(){for(var diagonalPath=-1*editLength;diagonalPath<=editLength;diagonalPath+=2){var basePath=void 0,addPath=bestPath[diagonalPath-1],removePath=bestPath[diagonalPath+1],_oldPos=(removePath?removePath.newPos:0)-diagonalPath;addPath&&(bestPath[diagonalPath-1]=void 0);var canAdd=addPath&&addPath.newPos+1=newLen&&_oldPos+1>=oldLen)return done(buildValues(self,basePath.components,newString,oldString,self.useLongestToken));bestPath[diagonalPath]=basePath}else bestPath[diagonalPath]=void 0}editLength++}var options=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},callback=options.callback;"function"==typeof options&&(callback=options,options={}),this.options=options;var self=this;oldString=this.castInput(oldString),newString=this.castInput(newString),oldString=this.removeEmpty(this.tokenize(oldString));var newLen=(newString=this.removeEmpty(this.tokenize(newString))).length,oldLen=oldString.length,editLength=1,maxEditLength=newLen+oldLen,bestPath=[{newPos:-1,components:[]}],oldPos=this.extractCommon(bestPath[0],newString,oldString,0);if(bestPath[0].newPos+1>=newLen&&oldPos+1>=oldLen)return done([{value:this.join(newString),count:newString.length}]);if(callback)!function exec(){setTimeout(function(){if(editLength>maxEditLength)return callback();execEditLength()||exec()},0)}();else for(;editLength<=maxEditLength;){var ret=execEditLength();if(ret)return ret}},pushComponent:function(components,added,removed){var last=components[components.length-1];last&&last.added===added&&last.removed===removed?components[components.length-1]={count:last.count+1,added:added,removed:removed}:components.push({count:1,added:added,removed:removed})},extractCommon:function(basePath,newString,oldString,diagonalPath){for(var newLen=newString.length,oldLen=oldString.length,newPos=basePath.newPos,oldPos=newPos-diagonalPath,commonCount=0;newPos+12&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof uniDiff&&(uniDiff=(0,_parse.parsePatch)(uniDiff)),Array.isArray(uniDiff)){if(uniDiff.length>1)throw new Error("applyPatch only works with a single input.");uniDiff=uniDiff[0]}for(var lines=source.split(/\r\n|[\n\v\f\r\x85]/),delimiters=source.match(/\r\n|[\n\v\f\r\x85]/g)||[],hunks=uniDiff.hunks,compareLine=options.compareLine||function(lineNumber,line,operation,patchContent){return line===patchContent},errorCount=0,fuzzFactor=options.fuzzFactor||0,minLine=0,offset=0,removeEOFNL=void 0,addEOFNL=void 0,i=0;ifuzzFactor)return!1;toPos++}}return!0}(hunk,toPos+localOffset)){hunk.offset=offset+=localOffset;break}if(void 0===localOffset)return!1;minLine=hunk.offset+hunk.oldStart+hunk.oldLines}for(var diffOffset=0,_i=0;_i1&&void 0!==arguments[1]?arguments[1]:{},diffstr=uniDiff.split(/\r\n|[\n\v\f\r\x85]/),delimiters=uniDiff.match(/\r\n|[\n\v\f\r\x85]/g)||[],list=[],i=0;i0?contextLines(prev.lines.slice(-options.context)):[],oldRangeStart-=curRange.length,newRangeStart-=curRange.length)}(_curRange=curRange).push.apply(_curRange,_toConsumableArray(lines.map(function(entry){return(current.added?"+":"-")+entry}))),current.added?newLine+=lines.length:oldLine+=lines.length}else{if(oldRangeStart)if(lines.length<=2*options.context&&i=diff.length-2&&lines.length<=options.context){var oldEOFNewline=/\n$/.test(oldStr),newEOFNewline=/\n$/.test(newStr);0!=lines.length||oldEOFNewline?oldEOFNewline&&newEOFNewline||curRange.push("\\ No newline at end of file"):curRange.splice(hunk.oldLines,0,"\\ No newline at end of file")}hunks.push(hunk),oldRangeStart=0,newRangeStart=0,curRange=[]}oldLine+=lines.length,newLine+=lines.length}}(i);return{oldFileName:oldFileName,newFileName:newFileName,oldHeader:oldHeader,newHeader:newHeader,hunks:hunks}}function createTwoFilesPatch(oldFileName,newFileName,oldStr,newStr,oldHeader,newHeader,options){var diff=structuredPatch(oldFileName,newFileName,oldStr,newStr,oldHeader,newHeader,options),ret=[];oldFileName==newFileName&&ret.push("Index: "+oldFileName),ret.push("==================================================================="),ret.push("--- "+diff.oldFileName+(void 0===diff.oldHeader?"":"\t"+diff.oldHeader)),ret.push("+++ "+diff.newFileName+(void 0===diff.newHeader?"":"\t"+diff.newHeader));for(var i=0;iarray.length)return!1;for(var i=0;i/g,">"),n=n.replace(/"/g,""")}exports.__esModule=!0,exports.convertChangesToXML=function(changes){for(var ret=[],i=0;i"):change.removed&&ret.push(""),ret.push(escapeHTML(change.value)),change.added?ret.push(""):change.removed&&ret.push("")}return ret.join("")}}])})},{}],3:[function(require,module,exports){!function(Hogan){function cleanTripleStache(token){"}"===token.n.substr(token.n.length-1)&&(token.n=token.n.substring(0,token.n.length-1))}function trim(s){return s.trim?s.trim():s.replace(/^\s*|\s*$/g,"")}function tagChange(tag,text,index){if(text.charAt(index)!=tag.charAt(0))return!1;for(var i=1,l=tag.length;i0;){if(token=tokens.shift(),tail&&"<"==tail.tag&&!(token.tag in allowedInSuper))throw new Error("Illegal content in < super tag.");if(Hogan.tags[token.tag]<=Hogan.tags.$||isOpener(token,customTags))stack.push(token),token.nodes=buildTree(tokens,token.tag,stack,customTags);else{if("/"==token.tag){if(0===stack.length)throw new Error("Closing tag without opener: /"+token.n);if(opener=stack.pop(),token.n!=opener.n&&!isCloser(token.n,opener.n,customTags))throw new Error("Nesting error: "+opener.n+" vs. "+token.n);return opener.end=token.i,instructions}"\n"==token.tag&&(token.last=0==tokens.length||"\n"==tokens[0].tag)}instructions.push(token)}if(stack.length>0)throw new Error("missing closing tag: "+stack.pop().n);return instructions}function isOpener(token,tags){for(var i=0,l=tags.length;i":7,"=":8,_v:9,"{":10,"&":11,_t:12},Hogan.scan=function(text,delimiters){function addBuf(){buf.length>0&&(tokens.push({tag:"_t",text:new String(buf)}),buf="")}function lineIsWhitespace(){for(var isAllWhitespace=!0,j=lineStart;j"==next.tag&&(next.indent=tokens[j].text.toString()),tokens.splice(j,1));else noNewLine||tokens.push({tag:"\n"});seenTag=!1,lineStart=tokens.length}var len=text.length,state=0,tagType=null,tag=null,buf="",tokens=[],seenTag=!1,i=0,lineStart=0,otag="{{",ctag="}}";for(delimiters&&(delimiters=delimiters.split(" "),otag=delimiters[0],ctag=delimiters[1]),i=0;i":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),context.subs[node.n]=ctx.code,context.inPartial||(context.code+='t.sub("'+esc(node.n)+'",c,p,i);')},"\n":function(node,context){context.code+=write('"\\n"'+(node.last?"":" + i"))},_v:function(node,context){context.code+="t.b(t.v(t."+chooseMethod(node.n)+'("'+esc(node.n)+'",c,p,0)));'},_t:function(node,context){context.code+=write('"'+esc(node.text)+'"')},"{":tripleStache,"&":tripleStache},Hogan.walk=function(nodelist,context){for(var func,i=0,l=nodelist.length;i=0;i--)if(v=ctx[i],void 0!==(val=findInScope(key,v,doModelGet))){found=!0;break}return found?(returnFound||"function"!=typeof val||(val=this.mv(val,ctx,partials)),val):!returnFound&&""},ls:function(func,cx,partials,text,tags){var oldTags=this.options.delimiters;return this.options.delimiters=tags,this.b(this.ct(coerceToString(func.call(cx,text)),cx,partials)),this.options.delimiters=oldTags,!1},ct:function(text,cx,partials){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(text,this.options).render(cx,partials)},b:function(s){this.buf+=s},fl:function(){var r=this.buf;return this.buf="",r},ms:function(func,ctx,partials,inverted,start,end,tags){var textSource,cx=ctx[ctx.length-1],result=func.call(cx);return"function"==typeof result?!!inverted||(textSource=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(result,cx,partials,textSource.substring(start,end),tags)):result},mv:function(func,ctx,partials){var cx=ctx[ctx.length-1],result=func.call(cx);return"function"==typeof result?this.ct(coerceToString(result.call(cx)),cx,partials):result},sub:function(name,context,partials,indent){var f=this.subs[name];f&&(this.activeSub=name,f(context,partials,this,indent),this.activeSub=!1)}};var rAmp=/&/g,rLt=//g,rApos=/\'/g,rQuot=/\"/g,hChars=/[&<>\"\']/,isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}}(void 0!==exports?exports:Hogan)},{}],6:[function(require,module,exports){function Hash(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index1?sources[length-1]:void 0,guard=length>2?sources[2]:void 0;for(customizer=assigner.length>3&&"function"==typeof customizer?(length--,customizer):void 0,guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=length<3?void 0:customizer,length=1),object=Object(object);++index-1&&value%1==0&&value-1}},{"./_assocIndexOf":17}],62:[function(require,module,exports){var assocIndexOf=require("./_assocIndexOf");module.exports=function(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?(++this.size,data.push([key,value])):data[index][1]=value,this}},{"./_assocIndexOf":17}],63:[function(require,module,exports){var Hash=require("./_Hash"),ListCache=require("./_ListCache"),Map=require("./_Map");module.exports=function(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}},{"./_Hash":6,"./_ListCache":7,"./_Map":8}],64:[function(require,module,exports){var getMapData=require("./_getMapData");module.exports=function(key){var result=getMapData(this,key).delete(key);return this.size-=result?1:0,result}},{"./_getMapData":42}],65:[function(require,module,exports){var getMapData=require("./_getMapData");module.exports=function(key){return getMapData(this,key).get(key)}},{"./_getMapData":42}],66:[function(require,module,exports){var getMapData=require("./_getMapData");module.exports=function(key){return getMapData(this,key).has(key)}},{"./_getMapData":42}],67:[function(require,module,exports){var getMapData=require("./_getMapData");module.exports=function(key,value){var data=getMapData(this,key),size=data.size;return data.set(key,value),this.size+=data.size==size?0:1,this}},{"./_getMapData":42}],68:[function(require,module,exports){var nativeCreate=require("./_getNative")(Object,"create");module.exports=nativeCreate},{"./_getNative":43}],69:[function(require,module,exports){module.exports=function(object){var result=[];if(null!=object)for(var key in Object(object))result.push(key);return result}},{}],70:[function(require,module,exports){var freeGlobal=require("./_freeGlobal"),freeExports="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&"object"==typeof module&&module&&!module.nodeType&&module,freeProcess=freeModule&&freeModule.exports===freeExports&&freeGlobal.process,nodeUtil=function(){try{return freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch(e){}}();module.exports=nodeUtil},{"./_freeGlobal":41}],71:[function(require,module,exports){var nativeObjectToString=Object.prototype.toString;module.exports=function(value){return nativeObjectToString.call(value)}},{}],72:[function(require,module,exports){module.exports=function(func,transform){return function(arg){return func(transform(arg))}}},{}],73:[function(require,module,exports){var apply=require("./_apply"),nativeMax=Math.max;module.exports=function(func,start,transform){return start=nativeMax(void 0===start?func.length-1:start,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),array=Array(length);++index0){if(++count>=HOT_COUNT)return arguments[0]}else count=0;return func.apply(void 0,arguments)}}},{}],77:[function(require,module,exports){var ListCache=require("./_ListCache");module.exports=function(){this.__data__=new ListCache,this.size=0}},{"./_ListCache":7}],78:[function(require,module,exports){module.exports=function(key){var data=this.__data__,result=data.delete(key);return this.size=data.size,result}},{}],79:[function(require,module,exports){module.exports=function(key){return this.__data__.get(key)}},{}],80:[function(require,module,exports){module.exports=function(key){return this.__data__.has(key)}},{}],81:[function(require,module,exports){var ListCache=require("./_ListCache"),Map=require("./_Map"),MapCache=require("./_MapCache"),LARGE_ARRAY_SIZE=200;module.exports=function(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs=data.__data__;if(!Map||pairs.length-1&&value%1==0&&value<=MAX_SAFE_INTEGER}},{}],93:[function(require,module,exports){module.exports=function(value){var type=typeof value;return null!=value&&("object"==type||"function"==type)}},{}],94:[function(require,module,exports){module.exports=function(value){return null!=value&&"object"==typeof value}},{}],95:[function(require,module,exports){var baseGetTag=require("./_baseGetTag"),getPrototype=require("./_getPrototype"),isObjectLike=require("./isObjectLike"),objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);module.exports=function(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag)return!1;var proto=getPrototype(value);if(null===proto)return!0;var Ctor=hasOwnProperty.call(proto,"constructor")&&proto.constructor;return"function"==typeof Ctor&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString}},{"./_baseGetTag":21,"./_getPrototype":44,"./isObjectLike":94}],96:[function(require,module,exports){var baseIsTypedArray=require("./_baseIsTypedArray"),baseUnary=require("./_baseUnary"),nodeUtil=require("./_nodeUtil"),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;module.exports=isTypedArray},{"./_baseIsTypedArray":24,"./_baseUnary":31,"./_nodeUtil":70}],97:[function(require,module,exports){var arrayLikeKeys=require("./_arrayLikeKeys"),baseKeysIn=require("./_baseKeysIn"),isArrayLike=require("./isArrayLike");module.exports=function(object){return isArrayLike(object)?arrayLikeKeys(object,!0):baseKeysIn(object)}},{"./_arrayLikeKeys":14,"./_baseKeysIn":25,"./isArrayLike":88}],98:[function(require,module,exports){var baseMerge=require("./_baseMerge"),merge=require("./_createAssigner")(function(object,source,srcIndex){baseMerge(object,source,srcIndex)});module.exports=merge},{"./_baseMerge":26,"./_createAssigner":38}],99:[function(require,module,exports){module.exports=function(){return!1}},{}],100:[function(require,module,exports){var copyObject=require("./_copyObject"),keysIn=require("./keysIn");module.exports=function(value){return copyObject(value,keysIn(value))}},{"./_copyObject":36,"./keysIn":97}],101:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){for(var up=0,i=parts.length-1;i>=0;i--){var last=parts[i];"."===last?parts.splice(i,1):".."===last?(parts.splice(i,1),up++):up&&(parts.splice(i,1),up--)}if(allowAboveRoot)for(;up--;up)parts.unshift("..");return parts}function filter(xs,f){if(xs.filter)return xs.filter(f);for(var res=[],i=0;i=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if("string"!=typeof path)throw new TypeError("Arguments to path.resolve must be strings");path&&(resolvedPath=path+"/"+resolvedPath,resolvedAbsolute="/"===path.charAt(0))}return resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/"),(resolvedAbsolute?"/":"")+resolvedPath||"."},exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash="/"===substr(path,-1);return(path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/"))||isAbsolute||(path="."),path&&trailingSlash&&(path+="/"),(isAbsolute?"/":"")+path},exports.isAbsolute=function(path){return"/"===path.charAt(0)},exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if("string"!=typeof p)throw new TypeError("Arguments to path.join must be strings");return p}).join("/"))},exports.relative=function(from,to){function trim(arr){for(var start=0;start=0&&""===arr[end];end--);return start>end?[]:arr.slice(start,end-start+1)}from=exports.resolve(from).substr(1),to=exports.resolve(to).substr(1);for(var fromParts=trim(from.split("/")),toParts=trim(to.split("/")),length=Math.min(fromParts.length,toParts.length),samePartsLength=length,i=0;i1)for(var i=1;i1?nameSplit[nameSplit.length-1]:language}function getSrcFilename(line,cfg){return _getFilename("---",line,cfg.srcPrefix)}function getDstFilename(line,cfg){return _getFilename("\\+\\+\\+",line,cfg.dstPrefix)}function _getFilename(linePrefix,line,extraPrefix){var prefixes=["a/","b/","i/","w/","c/","o/"];extraPrefix&&prefixes.push(extraPrefix);var FilenameRegExp,filename,values=(FilenameRegExp=linePrefix?new RegExp("^"+linePrefix+' "?(.+?)"?$'):new RegExp('^"?(.+?)"?$')).exec(line);if(values&&values[1]){filename=values[1];var matchingPrefixes=prefixes.filter(function(p){return 0===filename.indexOf(p)});matchingPrefixes[0]&&(filename=filename.slice(matchingPrefixes[0].length)),filename=filename.replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [-+]\d{4}.*$/,"")}return filename}var utils=require("./utils.js").Utils,LINE_TYPE={INSERTS:"d2h-ins",DELETES:"d2h-del",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change",CONTEXT:"d2h-cntx",INFO:"d2h-info"};DiffParser.prototype.LINE_TYPE=LINE_TYPE,DiffParser.prototype.generateDiffJson=function(diffInput,configuration){function saveBlock(){currentBlock&&(currentFile.blocks.push(currentBlock),currentBlock=null)}function saveFile(){currentFile&&(currentFile.oldName||(currentFile.oldName=possibleOldName),currentFile.newName||(currentFile.newName=possibleNewName),currentFile.newName&&(files.push(currentFile),currentFile=null)),possibleOldName=void 0,possibleNewName=void 0}function startFile(){saveBlock(),saveFile(),(currentFile={}).blocks=[],currentFile.deletedLines=0,currentFile.addedLines=0}function startBlock(line){saveBlock();var values;(values=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(line))?(currentFile.isCombined=!1,oldLine=values[1],newLine=values[2]):(values=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(line))?(currentFile.isCombined=!0,oldLine=values[1],oldLine2=values[2],newLine=values[3]):(utils.startsWith(line,hunkHeaderPrefix)&&console.error("Failed to parse lines, starting in 0!"),oldLine=0,newLine=0,currentFile.isCombined=!1),(currentBlock={}).lines=[],currentBlock.oldStartLine=oldLine,currentBlock.oldStartLine2=oldLine2,currentBlock.newStartLine=newLine,currentBlock.header=line}function createLine(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))}function existHunkHeader(line,lineIdx){for(var idx=lineIdx;idx0||line.type!==diffParser.LINE_TYPE.DELETES&&oldLines.length>0)&&processChangeBlock(),line.type===diffParser.LINE_TYPE.CONTEXT?lines+=that.makeLineHtml(file.isCombined,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(file.isCombined,line.type,line.oldNumber,line.newNumber,escapedLine)}return processChangeBlock(),lines}).join("\n")},LineByLinePrinter.prototype._processLines=function(isCombined,oldLines,newLines){for(var lines="",i=0;i]*>((.|\n)*?)<\/ins>)/g,"")}function removeDel(line){return line.replace(/(]*>((.|\n)*?)<\/del>)/g,"")}var jsDiff=require("diff"),utils=require("./utils.js").Utils,Rematch=require("./rematch.js").Rematch;PrinterUtils.prototype.separatePrefix=function(isCombined,line){var prefix,lineWithoutPrefix;return isCombined?(prefix=line.substring(0,2),lineWithoutPrefix=line.substring(2)):(prefix=line.substring(0,1),lineWithoutPrefix=line.substring(1)),{prefix:prefix,line:lineWithoutPrefix}},PrinterUtils.prototype.getHtmlId=function(file){return"d2h-"+function(text){var i,len,hash=0;for(i=0,len=text.length;ii&&k>i&&oldFilenameParts[j]===newFilenameParts[k];)suffixPaths.unshift(newFilenameParts[k]),j-=1,k-=1;var finalPrefix=prefixPaths.join("/"),finalSuffix=suffixPaths.join("/"),oldRemainingPath=oldFilenameParts.slice(i,j+1).join("/"),newRemainingPath=newFilenameParts.slice(i,k+1).join("/");return finalPrefix.length&&finalSuffix.length?finalPrefix+"/{"+oldRemainingPath+" → "+newRemainingPath+"}/"+finalSuffix:finalPrefix.length?finalPrefix+"/{"+oldRemainingPath+" → "+newRemainingPath+"}":finalSuffix.length?"{"+oldRemainingPath+" → "+newRemainingPath+"}/"+finalSuffix:oldFilename+" → "+newFilename}return newFilename&&!isDevNullName(newFilename)?newFilename: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;if(config.isCombined&&(prefixSize=2),linePrefix1=diffLine1.substr(0,prefixSize),linePrefix2=diffLine2.substr(0,prefixSize),unprefixedLine1=diffLine1.substr(prefixSize),unprefixedLine2=diffLine2.substr(prefixSize),unprefixedLine1.length>config.maxLineLengthHighlight||unprefixedLine2.length>config.maxLineLengthHighlight)return{first:{prefix:linePrefix1,line:utils.escape(unprefixedLine1)},second:{prefix:linePrefix2,line:utils.escape(unprefixedLine2)}};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;void 0!==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});matcher(diff.filter(function(element){return element.added}),removed).forEach(function(chunk){1===chunk[0].length&&1===chunk[1].length&&Rematch.distance(chunk[0][0].value,chunk[1][0].value)-1?' class="d2h-change"':"",elemType=part.added?"ins":part.removed?"del":null,escapedValue=utils.escape(part.value);highlightedLine+=null!==elemType?"<"+elemType+addClass+">"+escapedValue+"":escapedValue}),{first:{prefix:linePrefix1,line:removeIns(highlightedLine)},second:{prefix:linePrefix2,line:removeDel(highlightedLine)}}},module.exports.PrinterUtils=new PrinterUtils}()},{"./rematch.js":110,"./utils.js":113,diff:2}],110:[function(require,module,exports){!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++)b.charAt(i-1)===a.charAt(j-1)?matrix[i][j]=matrix[i-1][j-1]:matrix[i][j]=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){return levenshtein(x=x.trim(),y=y.trim())/(x.length+y.length)},Rematch.rematch=function(distanceFunction){function findBestMatch(a,b,cache){for(var bestMatch,bestMatchDist=1/0,i=0;i0||bm.indexB>0)&&(result=group1.concat(result)),(a.length>tailA||b.length>tailB)&&(result=result.concat(group2)),result}return group},module.exports.Rematch=Rematch}()},{}],111:[function(require,module,exports){!function(){function SideBySidePrinter(config){this.config=config;var HoganJsUtils=require("./hoganjs-utils.js").HoganJsUtils;hoganUtils=new HoganJsUtils(config)}var hoganUtils,diffParser=require("./diff-parser.js").DiffParser,printerUtils=require("./printer-utils.js").PrinterUtils,utils=require("./utils.js").Utils,Rematch=require("./rematch.js").Rematch,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("side-by-side","file-diff"),filePathTemplate=hoganUtils.template("generic","file-path"),fileIconTemplate=hoganUtils.template("icon","file"),fileTagTemplate=hoganUtils.template("tag",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})})},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("generic","wrapper",{content:content})},SideBySidePrinter.prototype.makeSideHtml=function(blockHeader){return hoganUtils.render("generic","column-line-number",{diffParser:diffParser,blockHeader:utils.escape(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;oldLines.length*newLines.length<(that.config.matchingMaxComparisons||2500)&&("lines"===that.config.matching||"words"===that.config.matching)?(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;jcommon){var oldSlice=oldLines.slice(common),newSlice=newLines.slice(common),tmpHtml=that.processLines(file.isCombined,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;i0||line.type!==diffParser.LINE_TYPE.DELETES&&oldLines.length>0)&&processChangeBlock(),line.type===diffParser.LINE_TYPE.CONTEXT?(fileHtml.left+=that.generateSingleLineHtml(file.isCombined,line.type,line.oldNumber,escapedLine,prefix),fileHtml.right+=that.generateSingleLineHtml(file.isCombined,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(file.isCombined,diffParser.LINE_TYPE.CONTEXT,"","",""),fileHtml.right+=that.generateSingleLineHtml(file.isCombined,line.type,line.newNumber,escapedLine,prefix))}processChangeBlock()}),fileHtml},SideBySidePrinter.prototype.processLines=function(isCombined,oldLines,newLines){var that=this,fileHtml={};fileHtml.left="",fileHtml.right="";for(var maxLinesNumber=Math.max(oldLines.length,newLines.length),i=0;i'),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(" "),t.b(t.rp(""),t.b("\n"+i),t.b(' '),t.b(t.v(t.f("fileName",c,p,0))),t.b(""),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(' '),t.b(t.v(t.f("addedLines",c,p,0))),t.b(""),t.b("\n"+i),t.b(' '),t.b(t.v(t.f("deletedLines",c,p,0))),t.b(""),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b(""),t.fl()},partials:{"'),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b(' Files changed ('),t.b(t.v(t.f("filesNumber",c,p,0))),t.b(")"),t.b("\n"+i),t.b(' hide'),t.b("\n"+i),t.b(' show'),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b('
    '),t.b("\n"+i),t.b(" "),t.b(t.t(t.f("files",c,p,0))),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b(""),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(""),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b('
'),t.b(t.t(t.f("blockHeader",c,p,0))),t.b("
"),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b(""),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(""),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b(" File without changes"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b(""),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(''),t.b("\n"+i),t.b(' '),t.b(t.rp(""),t.b("\n"+i),t.b(' '),t.b(t.v(t.f("fileDiffName",c,p,0))),t.b(""),t.b("\n"+i),t.b(t.rp(""),t.fl()},partials:{""),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(" "),t.b(t.t(t.f("lineNumber",c,p,0))),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b(' '),t.b("\n"+i),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(' '),t.b(t.t(t.f("prefix",c,p,0))),t.b(""),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(' '),t.b(t.t(t.f("content",c,p,0))),t.b(""),t.b("\n"+i)}),c.pop()),t.b("
"),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b(""),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('
'),t.b("\n"+i),t.b(" "),t.b(t.t(t.f("content",c,p,0))),t.b("\n"+i),t.b("
"),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('"),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('"),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('"),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('"),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('"),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('
'),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b(" "),t.b(t.t(t.f("filePath",c,p,0))),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(" "),t.b(t.t(t.f("diffs",c,p,0))),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),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('
'),t.b(t.v(t.f("oldNumber",c,p,0))),t.b("
"),t.b("\n"+i),t.b('
'),t.b(t.v(t.f("newNumber",c,p,0))),t.b("
"),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('
'),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b(" "),t.b(t.t(t.f("filePath",c,p,0))),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(" "),t.b(t.t(t.d("diffs.left",c,p,0))),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(" "),t.b(t.t(t.d("diffs.right",c,p,0))),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),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('ADDED'),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('CHANGED'),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('DELETED'),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('RENAMED'),t.fl()},partials:{},subs:{}}),module.exports=global.browserTemplates}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"hogan.js":4}],113:[function(require,module,exports){!function(){function Utils(){}var merge=require("lodash/merge");Utils.prototype.escape=function(str){return str.slice(0).replace(/&/g,"&").replace(//g,">").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 str&&0===str.indexOf(start)},Utils.prototype.valueOrEmpty=function(value){return value||""},Utils.prototype.safeConfig=function(cfg,defaultConfig){var newCfg={};return merge(newCfg,defaultConfig,cfg),newCfg},module.exports.Utils=new Utils}()},{"lodash/merge":98}]},{},[104]); \ No newline at end of file +!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;ovalue.length?oldValue:value}),component.value=diff.join(value)}else component.value=diff.join(newString.slice(newPos,newPos+component.count));newPos+=component.count,component.added||(oldPos+=component.count)}}var lastComponent=components[componentLen-1];return 1=newLen&&oldLen<=oldPos+1)return done([{value:this.join(newString),count:newString.length}]);function execEditLength(){for(var diagonalPath=-1*editLength;diagonalPath<=editLength;diagonalPath+=2){var basePath=void 0,addPath=bestPath[diagonalPath-1],removePath=bestPath[diagonalPath+1],_oldPos=(removePath?removePath.newPos:0)-diagonalPath;addPath&&(bestPath[diagonalPath-1]=void 0);var canAdd=addPath&&addPath.newPos+1=newLen&&oldLen<=_oldPos+1)return done(buildValues(self,basePath.components,newString,oldString,self.useLongestToken));bestPath[diagonalPath]=basePath}else bestPath[diagonalPath]=void 0}var path;editLength++}if(callback)!function exec(){setTimeout(function(){if(maxEditLength=diff.length-2&&lines.length<=options.context){var oldEOFNewline=/\n$/.test(oldStr),newEOFNewline=/\n$/.test(newStr);0!=lines.length||oldEOFNewline?oldEOFNewline&&newEOFNewline||curRange.push("\\ No newline at end of file"):curRange.splice(hunk.oldLines,0,"\\ No newline at end of file")}hunks.push(hunk),newRangeStart=oldRangeStart=0,curRange=[]}oldLine+=lines.length,newLine+=lines.length}},i=0;iarray.length)return!1;for(var i=0;i/g,">")).replace(/"/g,""")}exports.__esModule=!0,exports.convertChangesToXML=function(changes){for(var ret=[],i=0;i"):change.removed&&ret.push(""),ret.push(escapeHTML(change.value)),change.added?ret.push(""):change.removed&&ret.push("")}return ret.join("")}}])},"object"==typeof exports&&"object"==typeof module?module.exports=factory():"function"==typeof define&&define.amd?define([],factory):"object"==typeof exports?exports.JsDiff=factory():root.JsDiff=factory()},{}],3:[function(require,module,exports){!function(Hogan){var rIsWhitespace=/\S/,rQuot=/\"/g,rNewline=/\n/g,rCr=/\r/g,rSlash=/\\/g,rLineSep=/\u2028/,rParagraphSep=/\u2029/;function cleanTripleStache(token){"}"===token.n.substr(token.n.length-1)&&(token.n=token.n.substring(0,token.n.length-1))}function trim(s){return s.trim?s.trim():s.replace(/^\s*|\s*$/g,"")}function tagChange(tag,text,index){if(text.charAt(index)!=tag.charAt(0))return!1;for(var i=1,l=tag.length;i":7,"=":8,_v:9,"{":10,"&":11,_t:12},Hogan.scan=function(text,delimiters){var len=text.length,state=0,tagType=null,tag=null,buf="",tokens=[],seenTag=!1,i=0,lineStart=0,otag="{{",ctag="}}";function addBuf(){0"==next.tag&&(next.indent=tokens[j].text.toString()),tokens.splice(j,1));else noNewLine||tokens.push({tag:"\n"});seenTag=!1,lineStart=tokens.length}function changeDelimiters(text,index){var close="="+ctag,closeIndex=text.indexOf(close,index),delimiters=trim(text.substring(text.indexOf("=",index)+1,closeIndex)).split(" ");return otag=delimiters[0],ctag=delimiters[delimiters.length-1],closeIndex+close.length-1}for(delimiters&&(delimiters=delimiters.split(" "),otag=delimiters[0],ctag=delimiters[1]),i=0;i":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),context.subs[node.n]=ctx.code,context.inPartial||(context.code+='t.sub("'+esc(node.n)+'",c,p,i);')},"\n":function(node,context){context.code+=write('"\\n"'+(node.last?"":" + i"))},_v:function(node,context){context.code+="t.b(t.v(t."+chooseMethod(node.n)+'("'+esc(node.n)+'",c,p,0)));'},_t:function(node,context){context.code+=write('"'+esc(node.text)+'"')},"{":tripleStache,"&":tripleStache},Hogan.walk=function(nodelist,context){for(var func,i=0,l=nodelist.length;i/g,rApos=/\'/g,rQuot=/\"/g,hChars=/[&<>\"\']/;function coerceToString(val){return String(null==val?"":val)}var isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}}(void 0!==exports?exports:{})},{}],6:[function(require,module,exports){var hashClear=require("./_hashClear"),hashDelete=require("./_hashDelete"),hashGet=require("./_hashGet"),hashHas=require("./_hashHas"),hashSet=require("./_hashSet");function Hash(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++indexconfig.maxLineLengthHighlight||unprefixedLine2.length>config.maxLineLengthHighlight)return{first:{prefix:linePrefix1,line:utils.escape(unprefixedLine1)},second:{prefix:linePrefix2,line:utils.escape(unprefixedLine2)}};diff=config.charByChar?jsDiff.diffChars(unprefixedLine1,unprefixedLine2):jsDiff.diffWordsWithSpace(unprefixedLine1,unprefixedLine2);var line,highlightedLine="",changedWords=[];if(!config.charByChar&&"words"===config.matching){var treshold=.25;void 0!==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});matcher(diff.filter(function(element){return element.added}),removed).forEach(function(chunk){1===chunk[0].length&&1===chunk[1].length&&(Rematch.distance(chunk[0][0].value,chunk[1][0].value)"+escapedValue+"":escapedValue}),{first:{prefix:linePrefix1,line:(line=highlightedLine,line.replace(/(]*>((.|\n)*?)<\/ins>)/g,""))},second:{prefix:linePrefix2,line:function(line){return line.replace(/(]*>((.|\n)*?)<\/del>)/g,"")}(highlightedLine)}}},module.exports.PrinterUtils=new PrinterUtils}()},{"./rematch.js":111,"./utils.js":114,diff:2}],111:[function(require,module,exports){!function(){var Rematch={};function levenshtein(a,b){if(0===a.length)return b.length;if(0===b.length)return a.length;var i,j,matrix=[];for(i=0;i<=b.length;i++)matrix[i]=[i];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++)b.charAt(i-1)===a.charAt(j-1)?matrix[i][j]=matrix[i-1][j-1]:matrix[i][j]=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]}Rematch.levenshtein=levenshtein,Rematch.distance=function(x,y){return levenshtein(x=x.trim(),y=y.trim())/(x.length+y.length)},Rematch.rematch=function(distanceFunction){return function group(a,b,level,cache){void 0===cache&&(cache={});var bm=function(a,b,cache){for(var bestMatch,bestMatchDist=1/0,i=0;itailA||b.length>tailB)&&(result=result.concat(group2)),result}},module.exports.Rematch=Rematch}()},{}],112:[function(require,module,exports){!function(){var hoganUtils,diffParser=require("./diff-parser.js").DiffParser,printerUtils=require("./printer-utils.js").PrinterUtils,utils=require("./utils.js").Utils,Rematch=require("./rematch.js").Rematch,matcher=Rematch.rematch(function(a,b){var amod=a.content.substr(1),bmod=b.content.substr(1);return Rematch.distance(amod,bmod)});function SideBySidePrinter(config){this.config=config;var HoganJsUtils=require("./hoganjs-utils.js").HoganJsUtils;hoganUtils=new HoganJsUtils(config)}SideBySidePrinter.prototype.makeDiffHtml=function(file,diffs){var fileDiffTemplate=hoganUtils.template("side-by-side","file-diff"),filePathTemplate=hoganUtils.template("generic","file-path"),fileIconTemplate=hoganUtils.template("icon","file"),fileTagTemplate=hoganUtils.template("tag",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})})},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("generic","wrapper",{content:content})},SideBySidePrinter.prototype.makeSideHtml=function(blockHeader){return hoganUtils.render("generic","column-line-number",{diffParser:diffParser,blockHeader:utils.escape(blockHeader),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})},SideBySidePrinter.prototype.generateSideBySideFileHtml=function(file){var that=this,fileHtml={left:"",right:""};return file.blocks.forEach(function(block){fileHtml.left+=that.makeSideHtml(block.header),fileHtml.right+=that.makeSideHtml("");var oldLines=[],newLines=[];function processChangeBlock(){var matches,insertType,deleteType;oldLines.length*newLines.length<(that.config.matchingMaxComparisons||2500)&&("lines"===that.config.matching||"words"===that.config.matching)?(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;j'),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(" "),t.b(t.rp(""),t.b("\n"+i),t.b(' '),t.b(t.v(t.f("fileName",c,p,0))),t.b(""),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(' '),t.b(t.v(t.f("addedLines",c,p,0))),t.b(""),t.b("\n"+i),t.b(' '),t.b(t.v(t.f("deletedLines",c,p,0))),t.b(""),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b(""),t.fl()},partials:{"'),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b(' Files changed ('),t.b(t.v(t.f("filesNumber",c,p,0))),t.b(")"),t.b("\n"+i),t.b(' hide'),t.b("\n"+i),t.b(' show'),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b('
    '),t.b("\n"+i),t.b(" "),t.b(t.t(t.f("files",c,p,0))),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b(""),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(""),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b('
'),t.b(t.t(t.f("blockHeader",c,p,0))),t.b("
"),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b(""),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(""),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b(" File without changes"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b(""),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(''),t.b("\n"+i),t.b(' '),t.b(t.rp(""),t.b("\n"+i),t.b(' '),t.b(t.v(t.f("fileDiffName",c,p,0))),t.b(""),t.b("\n"+i),t.b(t.rp(""),t.fl()},partials:{""),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(" "),t.b(t.t(t.f("lineNumber",c,p,0))),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b(' '),t.b("\n"+i),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(' '),t.b(t.t(t.f("prefix",c,p,0))),t.b(""),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(' '),t.b(t.t(t.f("content",c,p,0))),t.b(""),t.b("\n"+i)}),c.pop()),t.b("
"),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b(""),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('
'),t.b("\n"+i),t.b(" "),t.b(t.t(t.f("content",c,p,0))),t.b("\n"+i),t.b("
"),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('"),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('"),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('"),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('"),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('"),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('
'),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b(" "),t.b(t.t(t.f("filePath",c,p,0))),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(" "),t.b(t.t(t.f("diffs",c,p,0))),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),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('
'),t.b(t.v(t.f("oldNumber",c,p,0))),t.b("
"),t.b("\n"+i),t.b('
'),t.b(t.v(t.f("newNumber",c,p,0))),t.b("
"),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('
'),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b(" "),t.b(t.t(t.f("filePath",c,p,0))),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(" "),t.b(t.t(t.d("diffs.left",c,p,0))),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b('
'),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(' '),t.b("\n"+i),t.b(" "),t.b(t.t(t.d("diffs.right",c,p,0))),t.b("\n"+i),t.b(" "),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),t.b("\n"+i),t.b("
"),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('ADDED'),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('CHANGED'),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('DELETED'),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('RENAMED'),t.fl()},partials:{},subs:{}}),module.exports=global.browserTemplates}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"hogan.js":4}],114:[function(require,module,exports){!function(){var merge=require("lodash/merge");function Utils(){}Utils.prototype.escape=function(str){return str.slice(0).replace(/&/g,"&").replace(//g,">").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 str&&0===str.indexOf(start)},Utils.prototype.valueOrEmpty=function(value){return value||""},Utils.prototype.safeConfig=function(cfg,defaultConfig){var newCfg={};return merge(newCfg,defaultConfig,cfg),newCfg},module.exports.Utils=new Utils}()},{"lodash/merge":99}]},{},[105]); \ No newline at end of file diff --git a/docs/demo.js b/docs/demo.js index 83441ea..ac147c8 100644 --- a/docs/demo.js +++ b/docs/demo.js @@ -359,7 +359,10 @@ function parseHeaders(rawHeaders) { var headers = new Headers() - rawHeaders.split(/\r?\n/).forEach(function(line) { + // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space + // https://tools.ietf.org/html/rfc7230#section-3.2 + var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ') + preProcessedHeaders.split(/\r?\n/).forEach(function(line) { var parts = line.split(':') var key = parts.shift().trim() if (key) { @@ -378,7 +381,7 @@ } this.type = 'default' - this.status = 'status' in options ? options.status : 200 + this.status = options.status === undefined ? 200 : options.status this.ok = this.status >= 200 && this.status < 300 this.statusText = 'statusText' in options ? options.statusText : 'OK' this.headers = new Headers(options.headers) @@ -445,6 +448,8 @@ if (request.credentials === 'include') { xhr.withCredentials = true + } else if (request.credentials === 'omit') { + xhr.withCredentials = false } if ('responseType' in xhr && support.blob) { diff --git a/docs/demo.min.js b/docs/demo.min.js index 3700017..73c260e 100644 --- a/docs/demo.min.js +++ b/docs/demo.min.js @@ -1 +1 @@ -!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o-1?upcased:method}function Request(input,options){var body=(options=options||{}).body;if(input instanceof Request){if(input.bodyUsed)throw new TypeError("Already read");this.url=input.url,this.credentials=input.credentials,options.headers||(this.headers=new Headers(input.headers)),this.method=input.method,this.mode=input.mode,body||null==input._bodyInit||(body=input._bodyInit,input.bodyUsed=!0)}else this.url=String(input);if(this.credentials=options.credentials||this.credentials||"omit",!options.headers&&this.headers||(this.headers=new Headers(options.headers)),this.method=normalizeMethod(options.method||this.method||"GET"),this.mode=options.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&body)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(body)}function decode(body){var form=new FormData;return body.trim().split("&").forEach(function(bytes){if(bytes){var split=bytes.split("="),name=split.shift().replace(/\+/g," "),value=split.join("=").replace(/\+/g," ");form.append(decodeURIComponent(name),decodeURIComponent(value))}}),form}function parseHeaders(rawHeaders){var headers=new Headers;return rawHeaders.split(/\r?\n/).forEach(function(line){var parts=line.split(":"),key=parts.shift().trim();if(key){var value=parts.join(":").trim();headers.append(key,value)}}),headers}function Response(bodyInit,options){options||(options={}),this.type="default",this.status="status"in options?options.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in options?options.statusText:"OK",this.headers=new Headers(options.headers),this.url=options.url||"",this._initBody(bodyInit)}if(!self.fetch){var support={searchParams:"URLSearchParams"in self,iterable:"Symbol"in self&&"iterator"in Symbol,blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self};if(support.arrayBuffer)var viewClasses=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],isDataView=function(obj){return obj&&DataView.prototype.isPrototypeOf(obj)},isArrayBufferView=ArrayBuffer.isView||function(obj){return obj&&viewClasses.indexOf(Object.prototype.toString.call(obj))>-1};Headers.prototype.append=function(name,value){name=normalizeName(name),value=normalizeValue(value);var oldValue=this.map[name];this.map[name]=oldValue?oldValue+","+value:value},Headers.prototype.delete=function(name){delete this.map[normalizeName(name)]},Headers.prototype.get=function(name){return name=normalizeName(name),this.has(name)?this.map[name]:null},Headers.prototype.has=function(name){return this.map.hasOwnProperty(normalizeName(name))},Headers.prototype.set=function(name,value){this.map[normalizeName(name)]=normalizeValue(value)},Headers.prototype.forEach=function(callback,thisArg){for(var name in this.map)this.map.hasOwnProperty(name)&&callback.call(thisArg,this.map[name],name,this)},Headers.prototype.keys=function(){var items=[];return this.forEach(function(value,name){items.push(name)}),iteratorFor(items)},Headers.prototype.values=function(){var items=[];return this.forEach(function(value){items.push(value)}),iteratorFor(items)},Headers.prototype.entries=function(){var items=[];return this.forEach(function(value,name){items.push([name,value])}),iteratorFor(items)},support.iterable&&(Headers.prototype[Symbol.iterator]=Headers.prototype.entries);var methods=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];Request.prototype.clone=function(){return new Request(this,{body:this._bodyInit})},Body.call(Request.prototype),Body.call(Response.prototype),Response.prototype.clone=function(){return new Response(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Headers(this.headers),url:this.url})},Response.error=function(){var response=new Response(null,{status:0,statusText:""});return response.type="error",response};var redirectStatuses=[301,302,303,307,308];Response.redirect=function(url,status){if(-1===redirectStatuses.indexOf(status))throw new RangeError("Invalid status code");return new Response(null,{status:status,headers:{location:url}})},self.Headers=Headers,self.Request=Request,self.Response=Response,self.fetch=function(input,init){return new Promise(function(resolve,reject){var request=new Request(input,init),xhr=new XMLHttpRequest;xhr.onload=function(){var options={status:xhr.status,statusText:xhr.statusText,headers:parseHeaders(xhr.getAllResponseHeaders()||"")};options.url="responseURL"in xhr?xhr.responseURL:options.headers.get("X-Request-URL");var body="response"in xhr?xhr.response:xhr.responseText;resolve(new Response(body,options))},xhr.onerror=function(){reject(new TypeError("Network request failed"))},xhr.ontimeout=function(){reject(new TypeError("Network request failed"))},xhr.open(request.method,request.url,!0),"include"===request.credentials&&(xhr.withCredentials=!0),"responseType"in xhr&&support.blob&&(xhr.responseType="blob"),request.headers.forEach(function(value,name){xhr.setRequestHeader(name,value)}),xhr.send(void 0===request._bodyInit?null:request._bodyInit)})},self.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},{}],2:[function(require,module,exports){$(document).ready(function(){function getParamsFromSearch(search){var map={};try{search.split("?")[1].split("&").map(function(e){var values=e.split("=");map[values[0]]=values[1]})}catch(_ignore){}return map}function prepareUrl(url){function gitLabUrlGen(userName,projectName,type,value){return"https://crossorigin.me/https://gitlab.com/"+userName+"/"+projectName+"/"+type+"/"+value+".diff"}function gitHubUrlGen(userName,projectName,type,value){return headers.append("Accept","application/vnd.github.v3.diff"),"https://api.github.com/repos/"+userName+"/"+projectName+"/"+type+"/"+value}function bitbucketUrlGen(userName,projectName,type,value){var baseUrl="https://bitbucket.org/api/2.0/repositories/";return"pullrequests"===type?baseUrl+userName+"/"+projectName+"/pullrequests/"+value+"/diff":baseUrl+userName+"/"+projectName+"/diff/"+value}var fetchUrl,values,headers=new Headers,githubPrUrl=/^https?:\/\/(?:www\.)?github\.com\/(.*?)\/(.*?)\/pull\/(.*?)(?:\.diff)?(?:\.patch)?(?:\/.*)?$/,gitlabCommitUrl=/^https?:\/\/(?:www\.)?gitlab\.com\/(.*?)\/(.*?)\/commit\/(.*?)(?:\.diff)?(?:\.patch)?(?:\/.*)?$/,gitlabPrUrl=/^https?:\/\/(?:www\.)?gitlab\.com\/(.*?)\/(.*?)\/merge_requests\/(.*?)(?:\.diff)?(?:\.patch)?(?:\/.*)?$/,bitbucketCommitUrl=/^https?:\/\/(?:www\.)?bitbucket\.org\/(.*?)\/(.*?)\/commits\/(.*?)(?:\/raw)?(?:\/.*)?$/,bitbucketPrUrl=/^https?:\/\/(?:www\.)?bitbucket\.org\/(.*?)\/(.*?)\/pull-requests\/(.*?)(?:\/.*)?$/;return(values=/^https?:\/\/(?:www\.)?github\.com\/(.*?)\/(.*?)\/commit\/(.*?)(?:\.diff)?(?:\.patch)?(?:\/.*)?$/.exec(url))?fetchUrl=gitHubUrlGen(values[1],values[2],"commits",values[3]):(values=githubPrUrl.exec(url))?fetchUrl=gitHubUrlGen(values[1],values[2],"pulls",values[3]):(values=gitlabCommitUrl.exec(url))?fetchUrl=gitLabUrlGen(values[1],values[2],"commit",values[3]):(values=gitlabPrUrl.exec(url))?fetchUrl=gitLabUrlGen(values[1],values[2],"merge_requests",values[3]):(values=bitbucketCommitUrl.exec(url))?fetchUrl=bitbucketUrlGen(values[1],values[2],"commit",values[3]):(values=bitbucketPrUrl.exec(url))?fetchUrl=bitbucketUrlGen(values[1],values[2],"pullrequests",values[3]):(console.info("Could not parse url, using the provided url."),fetchUrl="https://crossorigin.me/"+url),{originalUrl:url,url:fetchUrl,headers:headers}}function smartDraw(urlOpt,forced){draw(prepareUrl(urlOpt||$url.val()),forced)}function draw(req,forced){if(validateUrl(req.url)){validateUrl(req.originalUrl)&&updateUrl(req.originalUrl);var outputFormat=$outputFormat.val(),showFiles=$showFiles.is(":checked"),matching=$matching.val(),wordsThreshold=$wordsThreshold.val(),matchingMaxComparisons=$matchingMaxComparisons.val();fetch(req.url,{method:"GET",headers:req.headers,mode:"cors",cache:"default"}).then(function(res){return res.text()}).then(function(data){var container="#url-diff-container",diff2htmlUi=new Diff2HtmlUI({diff:data});"side-by-side"===outputFormat?$container.css({width:"100%"}):$container.css({width:""});var params=getParamsFromSearch(window.location.search);delete params[searchParam],forced?(params.outputFormat=outputFormat,params.showFiles=showFiles,params.matching=matching,params.wordsThreshold=wordsThreshold,params.matchingMaxComparisons=matchingMaxComparisons):(params.outputFormat=params.outputFormat||outputFormat,params.showFiles="false"!==String(params.showFiles)||null===params.showFiles&&showFiles,params.matching=params.matching||matching,params.wordsThreshold=params.wordsThreshold||wordsThreshold,params.matchingMaxComparisons=params.matchingMaxComparisons||matchingMaxComparisons,$outputFormat.val(params.outputFormat),$showFiles.prop("checked",params.showFiles),$matching.val(params.matching),$wordsThreshold.val(params.wordsThreshold),$matchingMaxComparisons.val(params.matchingMaxComparisons)),params.synchronisedScroll=params.synchronisedScroll||!0,diff2htmlUi.draw(container,params),diff2htmlUi.fileListCloseable(container,params.fileListCloseable||!1),params.highlight&&diff2htmlUi.highlightCode(container)})}else console.error("Invalid url provided!")}function validateUrl(url){return/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(url)}function updateUrl(url){var params=getParamsFromSearch(window.location.search);if(params[searchParam]!==url){params[searchParam]=url;var paramString=Object.keys(params).map(function(k){return k+"="+params[k]}).join("&");window.location="demo.html?"+paramString}}require("whatwg-fetch");var searchParam="diff",$container=$(".container"),$url=$("#url"),$outputFormat=$("#diff-url-options-output-format"),$showFiles=$("#diff-url-options-show-files"),$matching=$("#diff-url-options-matching"),$wordsThreshold=$("#diff-url-options-match-words-threshold"),$matchingMaxComparisons=$("#diff-url-options-matching-max-comparisons");if(window.location.search){var url=function(search){try{return search.split("?")[1].split(searchParam+"=")[1].split("&")[0]}catch(_ignore){}return null}(window.location.search);$url.val(url),smartDraw(url)}$("#url-btn").click(function(e){e.preventDefault(),smartDraw($url.val())}),$url.on("paste",function(e){smartDraw(e.originalEvent.clipboardData.getData("Text"))}),$outputFormat.add($showFiles).add($matching).add($wordsThreshold).add($matchingMaxComparisons).change(function(e){console.log(""),console.log(e),console.log(""),smartDraw(null,!0)})})},{"whatwg-fetch":1}]},{},[2]); \ No newline at end of file +!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;oul{padding:0}@media (min-width:768px){.footer{padding:60px 0}}@media (min-width:768px){.row-centered{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}}.row-bordered{position:relative}.row-bordered:before{content:'';display:block;width:80%;position:absolute;bottom:0;left:50%;margin-left:-40%;height:1px;background:radial-gradient(ellipse at center,rgba(0,0,0,.2) 0,rgba(255,255,255,0) 75%)}.hero{position:relative;text-align:center;padding:80px 0;border-bottom:1px solid #dcdfe4}.hero-booticon{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;margin:0 auto 30px;width:100%;font-size:8vw;display:block;font-weight:500;text-align:center;cursor:default}.hero-homepage.hero{padding-top:0;padding-bottom:40px;overflow:hidden;border-bottom:0;border-bottom:1px solid #dcdfe4}.hero-homepage>.btn{margin-top:20px}.swag-line:before{content:'';position:fixed;display:block;top:0;left:0;right:0;height:5px;z-index:2;background-color:#26a65b;background:linear-gradient(45deg,#28a142,#26a65b)}.navbar{background-color:#fff;border:0 #fff}.navbar-header{text-align:center}.navbar-brand{height:auto;padding:19px 25px;font-size:16px;display:inline-block;float:none;text-align:center;margin:5px 0 0}.navbar-nav{margin-right:-15px}.navbar-nav>li>a{font-size:14px}.navbar-default .navbar-brand,.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover,.navbar-default .navbar-nav>li>a,.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{background:0 0;color:#293a46;font-weight:300}.navbar-default .navbar-toggle{position:absolute;left:0;top:7px;border-color:#fff;color:#293a46;margin-right:0}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background:#f9f9f9;border-color:#f9f9f9}@media (min-width:768px){.navbar-full .navbar-brand{margin-left:-25px}.navbar-tall{height:125px}.navbar-tall .navbar-header,.navbar-tall .navbar-nav{line-height:125px;text-align:left}.navbar-brand{float:none;display:inline-block;text-align:left;margin:0}.navbar-nav>li>a{display:inline-block;margin-left:13px}.navbar-nav>li:first-child>a{margin-left:0}}.screenshot{display:block;overflow:hidden}.screenshot>img{width:100%}.screenshots-fan{margin-top:50px}.screenshots-fan .screenshot{position:relative;width:auto;display:inline-block;text-align:center}.screenshots-fan .screenshot:first-child,.screenshots-fan .screenshot:last-child{z-index:2}.screenshots-fan .screenshot{z-index:3}@media (min-width:768px){.screenshots-fan{position:relative;overflow:hidden;margin-top:60px;height:200px}.screenshots-fan .screenshot{height:auto;top:10px;width:350px}.screenshots-fan .screenshot:first-child,.screenshots-fan .screenshot:last-child{width:250px;position:absolute;top:65px}.screenshots-fan .screenshot:first-child{left:10px}.screenshots-fan .screenshot:last-child{left:auto;right:10px}}@media (min-width:992px){.screenshots-fan{margin-top:60px;height:240px}.screenshots-fan .screenshot{width:400px}.screenshots-fan .screenshot:first-child,.screenshots-fan .screenshot:last-child{width:300px}}@media (min-width:1200px){.screenshots-fan{margin-top:80px;height:380px}.screenshots-fan .screenshot{width:550px}.screenshots-fan .screenshot:first-child,.screenshots-fan .screenshot:last-child{width:450px}}body{font-size:16px;font-family:Roboto,sans-serif;font-weight:300;line-height:1.6}h1{font-size:26px;font-weight:300}h2{font-size:18px;font-weight:300}h3{font-size:26px;font-weight:300}h4{font-size:16px;font-weight:300}h5{font-size:16px;font-weight:400}h1,h2,h3,h4,h5{line-height:1.4}h1,h2{margin:10px 0}h5{margin:6px 0}@media (min-width:768px){body{font-size:16px;font-family:Roboto,sans-serif;font-weight:300;line-height:1.6}h1{font-size:38px;font-weight:300}h2{font-size:26px;font-weight:300;line-height:1.4}h3{font-size:26px;font-weight:300}h4{font-size:18px;font-weight:300}h5{font-size:16px;font-weight:400}}body{color:#293a46}a{text-decoration:none;color:inherit}a:focus,a:hover{text-decoration:underline}.nav li a{text-decoration:none;color:inherit}.nav li a:hover{text-decoration:underline}.text-muted{color:#697176}.template-index h3{font-size:21px;margin-bottom:12px}.template-index h4{color:#697176;line-height:1.6}.template-index h4 a,.template-index p a{color:#26a65b}.template-index h5{font-size:17px;margin-bottom:8px}.homepage-code-example,.homepage-terminal-example{position:relative;font-family:monospace;background:#272b38;color:#48d8a0;border-radius:8px;padding:30px}.homepage-code-example .text-muted,.homepage-terminal-example .text-muted{color:#6a7490}@media (min-width:768px){.homepage-terminal-example{padding:50px}.homepage-code-example{padding:10px}.homepage-code-example>p{margin:0}}.hero-green{color:#26a65b}.hero-black{color:#353535}.hero-red{color:#cb2c37}.svg-icon-large{width:50px;display:block;margin:0 auto}.svg-icon-large>svg{width:100%;height:auto}.row-padded-small{padding:40px 0}.unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.url-diff-container{width:980px}.diff-url-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.diff-url-input{display:inline-block;margin-right:10px;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;height:31px}.diff-url-btn{display:inline-block;float:right;width:48px}.options-label-value{font-weight:400}.diff-url-options-container label input,.diff-url-options-container label select{display:block}.col-md- .col-md-15{width:20%} \ No newline at end of file + */.template-index{width:100%}.template-index-min{min-width:700px}.container{width:100%;padding:0 8%}.m-b-md{margin-bottom:23px!important}.p-t{padding-top:15px!important}@media (min-width:768px){p.m-b{height:75px;overflow-y:hidden}}.btn{display:inline-block;color:#fff;background:#26a65b;font-weight:400}.btn:hover{color:#fff;background:#5dbe5d}.btn-clipboard{position:absolute;top:0;right:0;z-index:10;display:block;padding:5px 8px;font-size:12px;color:#fff;background-color:#767676;border-radius:0 4px 0 4px;cursor:pointer}.btn-clipboard:hover{color:#000;background-color:#dcdfe4}.footer{position:relative;padding:40px 0;text-align:center;font-size:14px;border-top:1px solid #dcdfe4}.footer p{margin-bottom:5px}.footer a{color:#26a65b}.container a{color:#26a65b}.container a.btn{color:#fff}.footer-list-item{display:inline-block}.footer-list-item:not(:last-child):after{content:"\b7"}.footer>ul{padding:0}@media (min-width:768px){.footer{padding:60px 0}}@media (min-width:768px){.row-centered{display:flex;align-items:center}}.row-bordered{position:relative}.row-bordered:before{content:'';display:block;width:80%;position:absolute;bottom:0;left:50%;margin-left:-40%;height:1px;background:radial-gradient(ellipse at center,rgba(0,0,0,.2) 0,rgba(255,255,255,0) 75%)}.hero{position:relative;text-align:center;padding:80px 0;border-bottom:1px solid #dcdfe4}.hero-booticon{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;margin:0 auto 30px;width:100%;font-size:8vw;display:block;font-weight:500;text-align:center;cursor:default}.hero-homepage.hero{padding-top:0;padding-bottom:40px;overflow:hidden;border-bottom:0;border-bottom:1px solid #dcdfe4}.hero-homepage>.btn{margin-top:20px}.swag-line:before{content:'';position:fixed;display:block;top:0;left:0;right:0;height:5px;z-index:2;background-color:#26a65b;background:linear-gradient(45deg,#28a142,#26a65b)}.navbar{background-color:#fff;border:0 #fff}.navbar-header{text-align:center}.navbar-brand{height:auto;padding:19px 25px;font-size:16px;display:inline-block;float:none;text-align:center;margin:5px 0 0}.navbar-nav{margin-right:-15px}.navbar-nav>li>a{font-size:14px}.navbar-default .navbar-brand,.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover,.navbar-default .navbar-nav>li>a,.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{background:0 0;color:#293a46;font-weight:300}.navbar-default .navbar-toggle{position:absolute;left:0;top:7px;border-color:#fff;color:#293a46;margin-right:0}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background:#f9f9f9;border-color:#f9f9f9}@media (min-width:768px){.navbar-full .navbar-brand{margin-left:-25px}.navbar-tall{height:125px}.navbar-tall .navbar-header,.navbar-tall .navbar-nav{line-height:125px;text-align:left}.navbar-brand{float:none;display:inline-block;text-align:left;margin:0}.navbar-nav>li>a{display:inline-block;margin-left:13px}.navbar-nav>li:first-child>a{margin-left:0}}.screenshot{display:block;overflow:hidden}.screenshot>img{width:100%}.screenshots-fan{margin-top:50px}.screenshots-fan .screenshot{position:relative;width:auto;display:inline-block;text-align:center}.screenshots-fan .screenshot:first-child,.screenshots-fan .screenshot:last-child{z-index:2}.screenshots-fan .screenshot{z-index:3}@media (min-width:768px){.screenshots-fan{position:relative;overflow:hidden;margin-top:60px;height:200px}.screenshots-fan .screenshot{height:auto;top:10px;width:350px}.screenshots-fan .screenshot:first-child,.screenshots-fan .screenshot:last-child{width:250px;position:absolute;top:65px}.screenshots-fan .screenshot:first-child{left:10px}.screenshots-fan .screenshot:last-child{left:auto;right:10px}}@media (min-width:992px){.screenshots-fan{margin-top:60px;height:240px}.screenshots-fan .screenshot{width:400px}.screenshots-fan .screenshot:first-child,.screenshots-fan .screenshot:last-child{width:300px}}@media (min-width:1200px){.screenshots-fan{margin-top:80px;height:380px}.screenshots-fan .screenshot{width:550px}.screenshots-fan .screenshot:first-child,.screenshots-fan .screenshot:last-child{width:450px}}body{font-size:16px;font-family:Roboto,sans-serif;font-weight:300;line-height:1.6}h1{font-size:26px;font-weight:300}h2{font-size:18px;font-weight:300}h3{font-size:26px;font-weight:300}h4{font-size:16px;font-weight:300}h5{font-size:16px;font-weight:400}h1,h2,h3,h4,h5{line-height:1.4}h1,h2{margin:10px 0}h5{margin:6px 0}@media (min-width:768px){body{font-size:16px;font-family:Roboto,sans-serif;font-weight:300;line-height:1.6}h1{font-size:38px;font-weight:300}h2{font-size:26px;font-weight:300;line-height:1.4}h3{font-size:26px;font-weight:300}h4{font-size:18px;font-weight:300}h5{font-size:16px;font-weight:400}}body{color:#293a46}a{text-decoration:none;color:inherit}a:focus,a:hover{text-decoration:underline}.nav li a{text-decoration:none;color:inherit}.nav li a:hover{text-decoration:underline}.text-muted{color:#697176}.template-index h3{font-size:21px;margin-bottom:12px}.template-index h4{color:#697176;line-height:1.6}.template-index h4 a,.template-index p a{color:#26a65b}.template-index h5{font-size:17px;margin-bottom:8px}.homepage-code-example,.homepage-terminal-example{position:relative;font-family:monospace;background:#272b38;color:#48d8a0;border-radius:8px;padding:30px}.homepage-code-example .text-muted,.homepage-terminal-example .text-muted{color:#6a7490}@media (min-width:768px){.homepage-terminal-example{padding:50px}.homepage-code-example{padding:10px}.homepage-code-example>p{margin:0}}.hero-green{color:#26a65b}.hero-black{color:#353535}.hero-red{color:#cb2c37}.svg-icon-large{width:50px;display:block;margin:0 auto}.svg-icon-large>svg{width:100%;height:auto}.row-padded-small{padding:40px 0}.unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.url-diff-container{width:980px}.diff-url-wrapper{display:flex;width:100%}.diff-url-input{display:inline-block;margin-right:10px;flex-grow:1;height:31px}.diff-url-btn{display:inline-block;float:right;width:48px}.options-label-value{font-weight:400}.diff-url-options-container label input,.diff-url-options-container label select{display:block}.col-md- .col-md-15{width:20%} \ No newline at end of file diff --git a/package.json b/package.json index 8137e04..35579ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "diff2html", - "version": "2.3.3", + "version": "2.4.0", "homepage": "https://diff2html.xyz", "description": "Fast Diff to colorized HTML", "keywords": [